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
49,900
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan()
llama.cpp/common/json.hpp
token_type scan() { // initially, skip the BOM if (position.chars_read_total == 0 && !skip_bom()) { error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return token_type::parse_error; } // read next character and ignore whitespace skip_whitespace(); // ignore comments while (ignore_comments && current == '/') { if (!scan_comment()) { return token_type::parse_error; } // skip following whitespace skip_whitespace(); } switch (current) { // structural characters case '[': return token_type::begin_array; case ']': return token_type::end_array; case '{': return token_type::begin_object; case '}': return token_type::end_object; case ':': return token_type::name_separator; case ',': return token_type::value_separator; // literals case 't': { std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}}; return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); } case 'f': { std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}}; return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); } case 'n': { std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}}; return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); } // string case '\"': return scan_string(); // number case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return scan_number(); // end of input (the null byte is needed when parsing from // string literals) case '\0': case char_traits<char_type>::eof(): return token_type::end_of_input; // error default: error_message = "invalid literal"; return token_type::parse_error; } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx cmpq $0x0, 0x20(%rdi) jne 0x73c83 movq %rbx, %rdi callq 0x73e1a testb %al, %al je 0x73d45 movabsq $0x100002600, %r14 # imm = 0x100002600 movq %rbx, %rdi callq 0x2159e movl 0x14(%rbx), %eax cmpq $0x20, %rax ja 0x73ccd btq %rax, %r14 jb 0x73c8d jmp 0x73ccd movq %rbx, %rdi callq 0x73e5c testb %al, %al je 0x73d50 movq %rbx, %rdi callq 0x2159e movl 0x14(%rbx), %eax cmpq $0x20, %rax ja 0x73ccd btq %rax, %r14 jb 0x73cb6 cmpl $0x2f, %eax jne 0x73cd8 cmpb $0x0, 0x10(%rbx) jne 0x73ca6 cmpl $0x5a, %eax jg 0x73d08 leal -0x22(%rax), %ecx cmpl $0x18, %ecx ja 0x73d92 leaq 0x9e8e4(%rip), %rax # 0x1125d4 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx movq %rbx, %rdi addq $0x18, %rsp popq %rbx popq %r14 jmp 0x743c6 cmpl $0x6d, %eax jle 0x73d5d cmpl $0x7a, %eax jg 0x73da0 cmpl $0x6e, %eax je 0x73dda cmpl $0x74, %eax jne 0x73db1 leaq 0xc(%rsp), %rsi movl $0x65757274, (%rsi) # imm = 0x65757274 movl $0x4, %edx movq %rbx, %rdi movl $0x1, %ecx jmp 0x73df2 leaq 0xa5b19(%rip), %rax # 0x119865 movq %rax, 0x70(%rbx) movl $0xe, %eax addq $0x18, %rsp popq %rbx popq %r14 retq cmpl $0x5b, %eax je 0x73e06 cmpl $0x5d, %eax je 0x73e10 cmpl $0x66, %eax jne 0x73db1 leaq 0x10(%rsp), %rsi movb $0x65, 0x4(%rsi) movl $0x736c6166, (%rsi) # imm = 0x736C6166 movl $0x5, %edx movq %rbx, %rdi movl $0x2, %ecx jmp 0x73df2 incl %eax cmpl $0x2, %eax jae 0x73db1 movl $0xf, %eax jmp 0x73d55 cmpl $0x7b, %eax je 0x73dfc cmpl $0x7d, %eax jne 0x73db1 movl $0xb, %eax jmp 0x73d55 leaq 0xa5ada(%rip), %rax # 0x119892 jmp 0x73d4c movl $0xc, %eax jmp 0x73d55 movq %rbx, %rdi addq $0x18, %rsp popq %rbx popq %r14 jmp 0x73f54 movl $0xd, %eax jmp 0x73d55 leaq 0x8(%rsp), %rsi movl $0x6c6c756e, (%rsi) # imm = 0x6C6C756E movl $0x4, %edx movq %rbx, %rdi movl $0x3, %ecx callq 0x73ed8 jmp 0x73d55 movl $0x9, %eax jmp 0x73d55 movl $0x8, %eax jmp 0x73d55 movl $0xa, %eax jmp 0x73d55
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE4scanEv: push r14 push rbx sub rsp, 18h mov rbx, rdi cmp qword ptr [rdi+20h], 0 jnz short loc_73C83 mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE8skip_bomEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::skip_bom(void) test al, al jz loc_73D45 loc_73C83: mov r14, 100002600h loc_73C8D: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) mov eax, [rbx+14h] cmp rax, 20h ; ' ' ja short loc_73CCD bt r14, rax jb short loc_73C8D jmp short loc_73CCD loc_73CA6: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE12scan_commentEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_comment(void) test al, al jz loc_73D50 loc_73CB6: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(void) mov eax, [rbx+14h] cmp rax, 20h ; ' ' ja short loc_73CCD bt r14, rax jb short loc_73CB6 loc_73CCD: cmp eax, 2Fh ; '/' jnz short loc_73CD8 cmp byte ptr [rbx+10h], 0 jnz short loc_73CA6 loc_73CD8: cmp eax, 5Ah ; 'Z' jg short loc_73D08 lea ecx, [rax-22h]; switch 25 cases cmp ecx, 18h ja def_73CF7; jumptable 0000000000073CF7 default case lea rax, jpt_73CF7 movsxd rcx, ds:(jpt_73CF7 - 1125D4h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_73CF9: mov rdi, rbx; jumptable 0000000000073CF7 cases 45,48-57 add rsp, 18h pop rbx pop r14 jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE11scan_numberEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_number(void) loc_73D08: cmp eax, 6Dh ; 'm' jle short loc_73D5D cmp eax, 7Ah ; 'z' jg loc_73DA0 cmp eax, 6Eh ; 'n' jz loc_73DDA cmp eax, 74h ; 't' jnz loc_73DB1; jumptable 0000000000073CF7 cases 35-43,46,47 lea rsi, [rsp+28h+var_1C] mov dword ptr [rsi], 65757274h mov edx, 4 mov rdi, rbx mov ecx, 1 jmp loc_73DF2 loc_73D45: lea rax, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "... loc_73D4C: mov [rbx+70h], rax loc_73D50: mov eax, 0Eh loc_73D55: add rsp, 18h pop rbx pop r14 retn loc_73D5D: cmp eax, 5Bh ; '[' jz loc_73E06 cmp eax, 5Dh ; ']' jz loc_73E10 cmp eax, 66h ; 'f' jnz short loc_73DB1; jumptable 0000000000073CF7 cases 35-43,46,47 lea rsi, [rsp+28h+var_18] mov byte ptr [rsi+4], 65h ; 'e' mov dword ptr [rsi], 736C6166h mov edx, 5 mov rdi, rbx mov ecx, 2 jmp short loc_73DF2 def_73CF7: inc eax; jumptable 0000000000073CF7 default case cmp eax, 2 jnb short loc_73DB1; jumptable 0000000000073CF7 cases 35-43,46,47 mov eax, 0Fh jmp short loc_73D55 loc_73DA0: cmp eax, 7Bh ; '{' jz short loc_73DFC cmp eax, 7Dh ; '}' jnz short loc_73DB1; jumptable 0000000000073CF7 cases 35-43,46,47 mov eax, 0Bh jmp short loc_73D55 loc_73DB1: lea rax, aInvalidLiteral; jumptable 0000000000073CF7 cases 35-43,46,47 jmp short loc_73D4C loc_73DBA: mov eax, 0Ch; jumptable 0000000000073CF7 case 58 jmp short loc_73D55 loc_73DC1: mov rdi, rbx; jumptable 0000000000073CF7 case 34 add rsp, 18h pop rbx pop r14 jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_string(void) loc_73DD0: mov eax, 0Dh; jumptable 0000000000073CF7 case 44 jmp loc_73D55 loc_73DDA: lea rsi, [rsp+28h+var_20] mov dword ptr [rsi], 6C6C756Eh mov edx, 4 mov rdi, rbx; this mov ecx, 3 loc_73DF2: call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE12scan_literalEPKcmNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) jmp loc_73D55 loc_73DFC: mov eax, 9 jmp loc_73D55 loc_73E06: mov eax, 8 jmp loc_73D55 loc_73E10: mov eax, 0Ah jmp loc_73D55
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan( __m128i *this) { long long v1; // r14 unsigned long long v2; // rax long long result; // rax const char *v4; // rax if ( this[2].m128i_i64[0] || (unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::skip_bom((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this) ) { v1 = 0x100002600LL; do { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(this); v2 = this[1].m128i_u32[1]; } while ( v2 <= 0x20 && _bittest64(&v1, v2) ); while ( (_DWORD)v2 == 47 && this[1].m128i_i8[0] ) { if ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_comment((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this) ) return 14LL; do { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::get(this); v2 = this[1].m128i_u32[1]; } while ( v2 <= 0x20 && _bittest64(&v1, v2) ); } if ( (int)v2 <= 90 ) { switch ( (int)v2 ) { case '"': result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_string((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this); break; case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case '.': case '/': goto LABEL_33; case ',': result = 13LL; break; case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': result = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_number((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this); break; case ':': result = 12LL; break; default: if ( (unsigned int)(v2 + 1) >= 2 ) goto LABEL_33; result = 15LL; break; } return result; } if ( (int)v2 <= 109 ) { switch ( (_DWORD)v2 ) { case '[': return 8LL; case ']': return 10LL; case 'f': return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_literal((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this); } } else if ( (int)v2 > 122 ) { if ( (_DWORD)v2 == 123 ) return 9LL; if ( (_DWORD)v2 == 125 ) return 11LL; } else if ( (_DWORD)v2 == 110 || (_DWORD)v2 == 116 ) { return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::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::input_stream_adapter>::scan_literal((nlohmann::json_abi_v3_11_3::detail::input_stream_adapter *)this); } LABEL_33: v4 = "invalid literal"; } else { v4 = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; } this[7].m128i_i64[0] = (long long)v4; return 14LL; }
scan: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI CMP qword ptr [RDI + 0x20],0x0 JNZ 0x00173c83 MOV RDI,RBX CALL 0x00173e1a TEST AL,AL JZ 0x00173d45 LAB_00173c83: MOV R14,0x100002600 LAB_00173c8d: MOV RDI,RBX CALL 0x0012159e MOV EAX,dword ptr [RBX + 0x14] CMP RAX,0x20 JA 0x00173ccd BT R14,RAX JC 0x00173c8d JMP 0x00173ccd LAB_00173ca6: MOV RDI,RBX CALL 0x00173e5c TEST AL,AL JZ 0x00173d50 LAB_00173cb6: MOV RDI,RBX CALL 0x0012159e MOV EAX,dword ptr [RBX + 0x14] CMP RAX,0x20 JA 0x00173ccd BT R14,RAX JC 0x00173cb6 LAB_00173ccd: CMP EAX,0x2f JNZ 0x00173cd8 CMP byte ptr [RBX + 0x10],0x0 JNZ 0x00173ca6 LAB_00173cd8: CMP EAX,0x5a JG 0x00173d08 LEA ECX,[RAX + -0x22] CMP ECX,0x18 JA 0x00173d92 LEA RAX,[0x2125d4] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_2d: MOV RDI,RBX ADD RSP,0x18 POP RBX POP R14 JMP 0x001743c6 LAB_00173d08: CMP EAX,0x6d JLE 0x00173d5d CMP EAX,0x7a JG 0x00173da0 CMP EAX,0x6e JZ 0x00173dda CMP EAX,0x74 JNZ 0x00173db1 LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],0x65757274 MOV EDX,0x4 MOV RDI,RBX MOV ECX,0x1 JMP 0x00173df2 LAB_00173d45: LEA RAX,[0x219865] LAB_00173d4c: MOV qword ptr [RBX + 0x70],RAX LAB_00173d50: MOV EAX,0xe LAB_00173d55: ADD RSP,0x18 POP RBX POP R14 RET LAB_00173d5d: CMP EAX,0x5b JZ 0x00173e06 CMP EAX,0x5d JZ 0x00173e10 CMP EAX,0x66 JNZ 0x00173db1 LEA RSI,[RSP + 0x10] MOV byte ptr [RSI + 0x4],0x65 MOV dword ptr [RSI],0x736c6166 MOV EDX,0x5 MOV RDI,RBX MOV ECX,0x2 JMP 0x00173df2 default: INC EAX CMP EAX,0x2 JNC 0x00173db1 MOV EAX,0xf JMP 0x00173d55 LAB_00173da0: CMP EAX,0x7b JZ 0x00173dfc CMP EAX,0x7d JNZ 0x00173db1 MOV EAX,0xb JMP 0x00173d55 caseD_23: LEA RAX,[0x219892] JMP 0x00173d4c caseD_3a: MOV EAX,0xc JMP 0x00173d55 caseD_22: MOV RDI,RBX ADD RSP,0x18 POP RBX POP R14 JMP 0x00173f54 caseD_2c: MOV EAX,0xd JMP 0x00173d55 LAB_00173dda: LEA RSI,[RSP + 0x8] MOV dword ptr [RSI],0x6c6c756e MOV EDX,0x4 MOV RDI,RBX MOV ECX,0x3 LAB_00173df2: CALL 0x00173ed8 JMP 0x00173d55 LAB_00173dfc: MOV EAX,0x9 JMP 0x00173d55 LAB_00173e06: MOV EAX,0x8 JMP 0x00173d55 LAB_00173e10: MOV EAX,0xa JMP 0x00173d55
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::scan(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *this) { char cVar1; int iVar2; ulong uVar3; int8 uVar4; char *pcVar5; int8 uVar6; int4 *puVar7; int4 local_20; int4 local_1c; int4 local_18; int1 local_14; if ((*(long *)(this + 0x20) != 0) || (cVar1 = skip_bom(this), cVar1 != '\0')) { do { get(this); uVar3 = (ulong)*(uint *)(this + 0x14); if (0x20 < uVar3) break; } while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0); do { iVar2 = (int)uVar3; if ((iVar2 != 0x2f) || (this[0x10] == (lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> )0x0)) goto LAB_00173cd8; cVar1 = scan_comment(this); if (cVar1 == '\0') goto LAB_00173d50; do { get(this); uVar3 = (ulong)*(uint *)(this + 0x14); if (0x20 < uVar3) break; } while ((0x100002600U >> (uVar3 & 0x3f) & 1) != 0); } while( true ); } pcVar5 = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; goto LAB_00173d4c; LAB_00173cd8: if (0x5a < iVar2) { if (iVar2 < 0x6e) { if (iVar2 == 0x5b) { return 8; } if (iVar2 == 0x5d) { return 10; } if (iVar2 == 0x66) { puVar7 = &local_18; local_14 = 0x65; local_18 = 0x736c6166; uVar6 = 5; uVar4 = 2; goto LAB_00173df2; } } else if (iVar2 < 0x7b) { if (iVar2 == 0x6e) { puVar7 = &local_20; local_20 = 0x6c6c756e; uVar6 = 4; uVar4 = 3; LAB_00173df2: uVar4 = scan_literal(this,puVar7,uVar6,uVar4); return uVar4; } if (iVar2 == 0x74) { puVar7 = &local_1c; local_1c = 0x65757274; uVar6 = 4; uVar4 = 1; goto LAB_00173df2; } } else { if (iVar2 == 0x7b) { return 9; } if (iVar2 == 0x7d) { return 0xb; } } goto switchD_00173cf7_caseD_23; } switch(iVar2) { case 0x22: uVar4 = scan_string(this); return uVar4; case 0x2c: uVar4 = 0xd; break; case 0x2d: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: uVar4 = scan_number(this); return uVar4; case 0x3a: uVar4 = 0xc; break; default: if (iVar2 + 1U < 2) { return 0xf; } case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2e: case 0x2f: switchD_00173cf7_caseD_23: pcVar5 = "invalid literal"; LAB_00173d4c: *(char **)(this + 0x70) = pcVar5; LAB_00173d50: uVar4 = 0xe; } return uVar4; }
49,901
Catch::Benchmark::Detail::weighted_average_quantile(int, int, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
double weighted_average_quantile(int k, int q, std::vector<double>::iterator first, std::vector<double>::iterator last) { auto count = last - first; double idx = (count - 1) * k / static_cast<double>(q); int j = static_cast<int>(idx); double g = idx - j; std::nth_element(first, first + j, last); auto xj = first[j]; if ( directCompare( g, 0 ) ) { return xj; } auto xj1 = *std::min_element(first + (j + 1), last); return xj + g * (xj1 - xj); }
O3
cpp
Catch::Benchmark::Detail::weighted_average_quantile(int, int, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double>>>): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movq %rcx, %rax subq %rdx, %rax sarq $0x3, %rax leaq -0x1(%rax), %rcx movslq %edi, %rdi imulq %rcx, %rdi cvtsi2sd %rdi, %xmm3 cvtsi2sd %esi, %xmm0 divsd %xmm0, %xmm3 cvttsd2si %xmm3, %ecx cvttpd2dq %xmm3, %xmm0 cvtdq2pd %xmm0, %xmm0 subsd %xmm0, %xmm3 movslq %ecx, %rcx leaq (%rdx,%rcx,8), %r14 cmpq %rdx, %rbx je 0x49ed8 cmpq %rbx, %r14 je 0x49ed8 bsrq %rax, %rcx xorl $0x3f, %ecx addl %ecx, %ecx xorq $0x7e, %rcx movq %rdx, %rdi movq %r14, %rsi movq %rbx, %rdx movapd %xmm3, (%rsp) callq 0x7aaa5 movapd (%rsp), %xmm3 movsd (%r14), %xmm0 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm3 je 0x49f2d leaq 0x8(%r14), %rax cmpq %rbx, %rax sete %cl addq $0x10, %r14 cmpq %rbx, %r14 sete %dl orb %cl, %dl jne 0x49f1d movsd (%rax), %xmm1 movsd (%r14), %xmm2 ucomisd %xmm2, %xmm1 cmovaq %r14, %rax minsd %xmm2, %xmm1 addq $0x8, %r14 cmpq %rbx, %r14 jne 0x49f03 movsd (%rax), %xmm1 subsd %xmm0, %xmm1 mulsd %xmm3, %xmm1 addsd %xmm1, %xmm0 addq $0x18, %rsp popq %rbx popq %r14 retq
_ZN5Catch9Benchmark6Detail25weighted_average_quantileEiiN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEES8_: push r14 push rbx sub rsp, 18h mov rbx, rcx mov rax, rcx sub rax, rdx sar rax, 3 lea rcx, [rax-1] movsxd rdi, edi imul rdi, rcx cvtsi2sd xmm3, rdi cvtsi2sd xmm0, esi divsd xmm3, xmm0 cvttsd2si ecx, xmm3 cvttpd2dq xmm0, xmm3 cvtdq2pd xmm0, xmm0 subsd xmm3, xmm0 movsxd rcx, ecx lea r14, [rdx+rcx*8] cmp rbx, rdx jz short loc_49ED8 cmp r14, rbx jz short loc_49ED8 bsr rcx, rax xor ecx, 3Fh add ecx, ecx xor rcx, 7Eh mov rdi, rdx mov rsi, r14 mov rdx, rbx movapd [rsp+28h+var_28], xmm3 call _ZSt13__introselectIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEElNS0_5__ops15_Iter_less_iterEEvT_S9_S9_T0_T1_; std::__introselect<__gnu_cxx::__normal_iterator<double *,std::vector<double>>,long,__gnu_cxx::__ops::_Iter_less_iter>(__gnu_cxx::__normal_iterator<double *,std::vector<double>>,__gnu_cxx::__normal_iterator<double *,std::vector<double>>,__gnu_cxx::__normal_iterator<double *,std::vector<double>>,long,__gnu_cxx::__ops::_Iter_less_iter) movapd xmm3, [rsp+28h+var_28] loc_49ED8: movsd xmm0, qword ptr [r14] xorpd xmm1, xmm1 ucomisd xmm3, xmm1 jz short loc_49F2D lea rax, [r14+8] cmp rax, rbx setz cl add r14, 10h cmp r14, rbx setz dl or dl, cl jnz short loc_49F1D movsd xmm1, qword ptr [rax] loc_49F03: movsd xmm2, qword ptr [r14] ucomisd xmm1, xmm2 cmova rax, r14 minsd xmm1, xmm2 add r14, 8 cmp r14, rbx jnz short loc_49F03 loc_49F1D: movsd xmm1, qword ptr [rax] subsd xmm1, xmm0 mulsd xmm1, xmm3 addsd xmm0, xmm1 loc_49F2D: add rsp, 18h pop rbx pop r14 retn
double Catch::Benchmark::Detail::weighted_average_quantile( int a1, int a2, double *a3, double *a4, double a5, double a6, double a7, __m128d a8) { unsigned long long v9; // rax int v10; // ecx double *v11; // r14 unsigned long long v12; // rcx double result; // xmm0_8 double *v14; // rax bool v15; // cl double *v16; // r14 double v17; // xmm1_8 v9 = a4 - a3; a8.m128d_f64[0] = (double)(((int)v9 - 1) * a1) / (double)a2; v10 = (int)a8.m128d_f64[0]; a8.m128d_f64[0] = a8.m128d_f64[0] - _mm_cvtepi32_pd(_mm_cvttpd_epi32(a8)).m128d_f64[0]; v11 = &a3[v10]; if ( a4 != a3 && v11 != a4 ) { _BitScanReverse64(&v12, v9); std::__introselect<__gnu_cxx::__normal_iterator<double *,std::vector<double>>,long,__gnu_cxx::__ops::_Iter_less_iter>( a3, v11, a4, (2 * ((unsigned int)v12 ^ 0x3F)) ^ 0x7ELL); } result = *v11; if ( a8.m128d_f64[0] != 0.0 ) { v14 = v11 + 1; v15 = v11 + 1 == a4; v16 = v11 + 2; if ( !v15 && v16 != a4 ) { v17 = *v14; do { if ( v17 > *v16 ) v14 = v16; v17 = fmin(v17, *v16++); } while ( v16 != a4 ); } return result + (*v14 - result) * a8.m128d_f64[0]; } return result; }
weighted_average_quantile: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RCX MOV RAX,RCX SUB RAX,RDX SAR RAX,0x3 LEA RCX,[RAX + -0x1] MOVSXD RDI,EDI IMUL RDI,RCX CVTSI2SD XMM3,RDI CVTSI2SD XMM0,ESI DIVSD XMM3,XMM0 CVTTSD2SI ECX,XMM3 CVTTPD2DQ XMM0,XMM3 CVTDQ2PD XMM0,XMM0 SUBSD XMM3,XMM0 MOVSXD RCX,ECX LEA R14,[RDX + RCX*0x8] CMP RBX,RDX JZ 0x00149ed8 CMP R14,RBX JZ 0x00149ed8 BSR RCX,RAX XOR ECX,0x3f ADD ECX,ECX XOR RCX,0x7e MOV RDI,RDX MOV RSI,R14 MOV RDX,RBX MOVAPD xmmword ptr [RSP],XMM3 CALL 0x0017aaa5 MOVAPD XMM3,xmmword ptr [RSP] LAB_00149ed8: MOVSD XMM0,qword ptr [R14] XORPD XMM1,XMM1 UCOMISD XMM3,XMM1 JZ 0x00149f2d LEA RAX,[R14 + 0x8] CMP RAX,RBX SETZ CL ADD R14,0x10 CMP R14,RBX SETZ DL OR DL,CL JNZ 0x00149f1d MOVSD XMM1,qword ptr [RAX] LAB_00149f03: MOVSD XMM2,qword ptr [R14] UCOMISD XMM1,XMM2 CMOVA RAX,R14 MINSD XMM1,XMM2 ADD R14,0x8 CMP R14,RBX JNZ 0x00149f03 LAB_00149f1d: MOVSD XMM1,qword ptr [RAX] SUBSD XMM1,XMM0 MULSD XMM1,XMM3 ADDSD XMM0,XMM1 LAB_00149f2d: ADD RSP,0x18 POP RBX POP R14 RET
/* Catch::Benchmark::Detail::weighted_average_quantile(int, int, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >, __gnu_cxx::__normal_iterator<double*, std::vector<double, std::allocator<double> > >) */ double Catch::Benchmark::Detail::weighted_average_quantile (int param_1,int param_2,double *param_3,double *param_4) { double dVar1; long lVar2; ulong uVar3; double *pdVar4; double *pdVar5; double dVar6; double dVar7; double dVar8; uVar3 = (long)param_4 - (long)param_3 >> 3; dVar8 = (double)(long)((long)param_1 * (uVar3 - 1)) / (double)param_2; pdVar5 = param_3 + (int)dVar8; if ((param_4 != param_3) && (pdVar5 != param_4)) { lVar2 = 0x3f; if (uVar3 != 0) { for (; uVar3 >> lVar2 == 0; lVar2 = lVar2 + -1) { } } std:: __introselect<__gnu_cxx::__normal_iterator<double*,std::vector<double,std::allocator<double>>>,long,__gnu_cxx::__ops::_Iter_less_iter> (param_3,pdVar5,param_4,((uint)lVar2 ^ 0x3f) * 2 ^ 0x7e); } dVar6 = *pdVar5; if (dVar8 - (double)(int)dVar8 != 0.0) { pdVar4 = pdVar5 + 1; pdVar5 = pdVar5 + 2; if (pdVar5 != param_4 && pdVar4 != param_4) { dVar7 = *pdVar4; do { dVar1 = *pdVar5; if (dVar1 < dVar7) { pdVar4 = pdVar5; } if (dVar1 <= dVar7) { dVar7 = dVar1; } pdVar5 = pdVar5 + 1; } while (pdVar5 != param_4); } dVar6 = dVar6 + (*pdVar4 - dVar6) * (dVar8 - (double)(int)dVar8); } return dVar6; }
49,902
ring_buffer<int>::push_back(int const&)
monkey531[P]llama/common/sampling.cpp
void push_back(const T & value) { if (sz == capacity) { // advance the start when buffer is full first = (first + 1) % capacity; } else { sz++; } data[pos] = value; pos = (pos + 1) % capacity; }
O2
cpp
ring_buffer<int>::push_back(int const&): movq (%rdi), %rcx movq 0x8(%rdi), %r8 cmpq %rcx, %r8 jne 0x9cc7e movq 0x10(%rdi), %rax incq %rax xorl %edx, %edx divq %r8 movq %rdx, 0x10(%rdi) jmp 0x9cc85 incq %r8 movq %r8, 0x8(%rdi) movl (%rsi), %edx movq 0x18(%rdi), %rax movq 0x20(%rdi), %rsi movl %edx, (%rsi,%rax,4) incq %rax xorl %edx, %edx divq %rcx movq %rdx, 0x18(%rdi) retq nop
_ZN11ring_bufferIiE9push_backERKi: mov rcx, [rdi] mov r8, [rdi+8] cmp r8, rcx jnz short loc_9CC7E mov rax, [rdi+10h] inc rax xor edx, edx div r8 mov [rdi+10h], rdx jmp short loc_9CC85 loc_9CC7E: inc r8 mov [rdi+8], r8 loc_9CC85: mov edx, [rsi] mov rax, [rdi+18h] mov rsi, [rdi+20h] mov [rsi+rax*4], edx inc rax xor edx, edx div rcx mov [rdi+18h], rdx retn
unsigned long long ring_buffer<int>::push_back(unsigned long long *a1, _DWORD *a2) { unsigned long long v2; // rcx unsigned long long v3; // r8 unsigned long long v4; // rax unsigned long long result; // rax unsigned long long v6; // rtt v2 = *a1; v3 = a1[1]; if ( v3 == *a1 ) a1[2] = (a1[2] + 1) % v3; else a1[1] = v3 + 1; v4 = a1[3]; *(_DWORD *)(a1[4] + 4 * v4) = *a2; v6 = v4 + 1; result = (v4 + 1) / v2; a1[3] = v6 % v2; return result; }
push_back: MOV RCX,qword ptr [RDI] MOV R8,qword ptr [RDI + 0x8] CMP R8,RCX JNZ 0x0019cc7e MOV RAX,qword ptr [RDI + 0x10] INC RAX XOR EDX,EDX DIV R8 MOV qword ptr [RDI + 0x10],RDX JMP 0x0019cc85 LAB_0019cc7e: INC R8 MOV qword ptr [RDI + 0x8],R8 LAB_0019cc85: MOV EDX,dword ptr [RSI] MOV RAX,qword ptr [RDI + 0x18] MOV RSI,qword ptr [RDI + 0x20] MOV dword ptr [RSI + RAX*0x4],EDX INC RAX XOR EDX,EDX DIV RCX MOV qword ptr [RDI + 0x18],RDX RET
/* ring_buffer<int>::push_back(int const&) */ ulong __thiscall ring_buffer<int>::push_back(ring_buffer<int> *this,int *param_1) { ulong uVar1; long lVar2; ulong uVar3; uVar1 = *(ulong *)this; uVar3 = *(ulong *)(this + 8); if (uVar3 == uVar1) { *(ulong *)(this + 0x10) = (*(long *)(this + 0x10) + 1U) % uVar3; } else { *(ulong *)(this + 8) = uVar3 + 1; } lVar2 = *(long *)(this + 0x18); *(int *)(*(long *)(this + 0x20) + lVar2 * 4) = *param_1; uVar3 = lVar2 + 1; *(ulong *)(this + 0x18) = uVar3 % uVar1; return uVar3 / uVar1; }
49,903
init_class_range
bluesky950520[P]quickjs/quickjs.c
static int init_class_range(JSRuntime *rt, JSClassShortDef const *tab, int start, int count) { JSClassDef cm_s, *cm = &cm_s; int i, class_id; for(i = 0; i < count; i++) { class_id = i + start; memset(cm, 0, sizeof(*cm)); cm->finalizer = tab[i].finalizer; cm->gc_mark = tab[i].gc_mark; if (JS_NewClass1(rt, class_id, cm, tab[i].class_name) < 0) return -1; } return 0; }
O2
c
init_class_range: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %ebp movq %rsi, %r14 movq %rdi, %r15 xorl %eax, %eax testl %ecx, %ecx cmovlel %eax, %ecx imulq $0x18, %rcx, %r13 movq %rsp, %r12 xorl %ebx, %ebx cmpq %rbx, %r13 je 0x17679 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) andq $0x0, 0x20(%rsp) movaps %xmm0, (%rsp) movups 0x8(%r14,%rbx), %xmm0 movups %xmm0, 0x8(%rsp) movl (%r14,%rbx), %ecx movq %r15, %rdi movl %ebp, %esi movq %r12, %rdx callq 0x1ab3b incl %ebp addq $0x18, %rbx testl %eax, %eax jns 0x17637 pushq $-0x1 popq %rax jmp 0x1767b xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_class_range: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, edx mov r14, rsi mov r15, rdi xor eax, eax test ecx, ecx cmovle ecx, eax imul r13, rcx, 18h mov r12, rsp xor ebx, ebx loc_17637: cmp r13, rbx jz short loc_17679 xorps xmm0, xmm0 movaps [rsp+58h+var_48], xmm0 and [rsp+58h+var_38], 0 movaps [rsp+58h+var_58], xmm0 movups xmm0, xmmword ptr [r14+rbx+8] movups [rsp+58h+var_58+8], xmm0 mov ecx, [r14+rbx] mov rdi, r15 mov esi, ebp mov rdx, r12 call JS_NewClass1 inc ebp add rbx, 18h test eax, eax jns short loc_17637 push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_1767B loc_17679: xor eax, eax loc_1767B: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_class_range(long long a1, long long a2, unsigned int a3, long long a4) { long long v5; // r13 long long i; // rbx int v7; // eax __m256i v9; // [rsp+0h] [rbp-58h] BYREF long long v10; // [rsp+20h] [rbp-38h] if ( (int)a4 <= 0 ) a4 = 0LL; v5 = 24 * a4; for ( i = 0LL; v5 != i; i += 24LL ) { *(_OWORD *)&v9.m256i_u64[2] = 0LL; v10 = 0LL; *(_OWORD *)v9.m256i_i8 = 0LL; *(_OWORD *)&v9.m256i_u64[1] = *(_OWORD *)(a2 + i + 8); v7 = ((long long ( *)(long long, _QWORD, __m256i *, _QWORD))JS_NewClass1)( a1, a3++, &v9, *(unsigned int *)(a2 + i)); if ( v7 < 0 ) return -1LL; } return 0LL; }
init_class_range: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,EDX MOV R14,RSI MOV R15,RDI XOR EAX,EAX TEST ECX,ECX CMOVLE ECX,EAX IMUL R13,RCX,0x18 MOV R12,RSP XOR EBX,EBX LAB_00117637: CMP R13,RBX JZ 0x00117679 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 AND qword ptr [RSP + 0x20],0x0 MOVAPS xmmword ptr [RSP],XMM0 MOVUPS XMM0,xmmword ptr [R14 + RBX*0x1 + 0x8] MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV ECX,dword ptr [R14 + RBX*0x1] MOV RDI,R15 MOV ESI,EBP MOV RDX,R12 CALL 0x0011ab3b INC EBP ADD RBX,0x18 TEST EAX,EAX JNS 0x00117637 PUSH -0x1 POP RAX JMP 0x0011767b LAB_00117679: XOR EAX,EAX LAB_0011767b: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 init_class_range(int8 param_1,long param_2,int param_3,uint param_4) { int8 *puVar1; int iVar2; ulong uVar3; long lVar4; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; uVar3 = (ulong)param_4; if ((int)param_4 < 1) { uVar3 = 0; } lVar4 = 0; do { if (uVar3 * 0x18 - lVar4 == 0) { return 0; } uStack_40 = 0; local_38 = 0; local_58 = 0; puVar1 = (int8 *)(param_2 + 8 + lVar4); uStack_50 = *puVar1; local_48 = puVar1[1]; iVar2 = JS_NewClass1(param_1,param_3,&local_58,*(int4 *)(param_2 + lVar4)); param_3 = param_3 + 1; lVar4 = lVar4 + 0x18; } while (-1 < iVar2); return 0xffffffffffffffff; }
49,904
init_class_range
bluesky950520[P]quickjs/quickjs.c
static int init_class_range(JSRuntime *rt, JSClassShortDef const *tab, int start, int count) { JSClassDef cm_s, *cm = &cm_s; int i, class_id; for(i = 0; i < count; i++) { class_id = i + start; memset(cm, 0, sizeof(*cm)); cm->finalizer = tab[i].finalizer; cm->gc_mark = tab[i].gc_mark; if (JS_NewClass1(rt, class_id, cm, tab[i].class_name) < 0) return -1; } return 0; }
O3
c
init_class_range: testl %ecx, %ecx jle 0x1d79d pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %ebx movq %rsi, %r14 movq %rdi, %r15 movl %ecx, %eax shlq $0x3, %rax leaq (%rax,%rax,2), %r13 xorl %ebp, %ebp movq %rsp, %r12 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movq $0x0, 0x20(%rsp) movups 0x8(%r14,%rbp), %xmm0 movups %xmm0, 0x8(%rsp) movl (%r14,%rbp), %ecx movq %r15, %rdi movl %ebx, %esi movq %r12, %rdx callq 0x21097 testl %eax, %eax js 0x1d7a0 incl %ebx addq $0x18, %rbp cmpq %rbp, %r13 jne 0x1d759 xorl %eax, %eax jmp 0x1d7a5 xorl %eax, %eax retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_class_range: test ecx, ecx jle short loc_1D79D push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, edx mov r14, rsi mov r15, rdi mov eax, ecx shl rax, 3 lea r13, [rax+rax*2] xor ebp, ebp mov r12, rsp loc_1D759: xorps xmm0, xmm0 movaps [rsp+58h+var_48], xmm0 movaps [rsp+58h+var_58], xmm0 mov [rsp+58h+var_38], 0 movups xmm0, xmmword ptr [r14+rbp+8] movups [rsp+58h+var_58+8], xmm0 mov ecx, [r14+rbp] mov rdi, r15 mov esi, ebx mov rdx, r12 call JS_NewClass1 test eax, eax js short loc_1D7A0 inc ebx add rbp, 18h cmp r13, rbp jnz short loc_1D759 xor eax, eax jmp short loc_1D7A5 loc_1D79D: xor eax, eax retn loc_1D7A0: mov eax, 0FFFFFFFFh loc_1D7A5: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_class_range(long long a1, long long a2, unsigned int a3, int a4) { long long v5; // r13 long long v6; // rbp __m256i v8; // [rsp+0h] [rbp-58h] BYREF long long v9; // [rsp+20h] [rbp-38h] if ( a4 <= 0 ) return 0LL; v5 = 24LL * (unsigned int)a4; v6 = 0LL; while ( 1 ) { *(_OWORD *)&v8.m256i_u64[2] = 0LL; *(_OWORD *)v8.m256i_i8 = 0LL; v9 = 0LL; *(_OWORD *)&v8.m256i_u64[1] = *(_OWORD *)(a2 + v6 + 8); if ( (int)((long long ( *)(long long, _QWORD, __m256i *, _QWORD))JS_NewClass1)( a1, a3, &v8, *(unsigned int *)(a2 + v6)) < 0 ) break; ++a3; v6 += 24LL; if ( v5 == v6 ) return 0LL; } return 0xFFFFFFFFLL; }
init_class_range: TEST ECX,ECX JLE 0x0011d79d PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,EDX MOV R14,RSI MOV R15,RDI MOV EAX,ECX SHL RAX,0x3 LEA R13,[RAX + RAX*0x2] XOR EBP,EBP MOV R12,RSP LAB_0011d759: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x20],0x0 MOVUPS XMM0,xmmword ptr [R14 + RBP*0x1 + 0x8] MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV ECX,dword ptr [R14 + RBP*0x1] MOV RDI,R15 MOV ESI,EBX MOV RDX,R12 CALL 0x00121097 TEST EAX,EAX JS 0x0011d7a0 INC EBX ADD RBP,0x18 CMP R13,RBP JNZ 0x0011d759 XOR EAX,EAX JMP 0x0011d7a5 LAB_0011d79d: XOR EAX,EAX RET LAB_0011d7a0: MOV EAX,0xffffffff LAB_0011d7a5: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 init_class_range(int8 param_1,long param_2,int param_3,uint param_4) { int8 *puVar1; int iVar2; long lVar3; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; if ((int)param_4 < 1) { return 0; } lVar3 = 0; do { uStack_40 = 0; local_58 = 0; local_38 = 0; puVar1 = (int8 *)(param_2 + 8 + lVar3); uStack_50 = *puVar1; local_48 = puVar1[1]; iVar2 = JS_NewClass1(param_1,param_3,&local_58,*(int4 *)(param_2 + lVar3)); if (iVar2 < 0) { return 0xffffffff; } param_3 = param_3 + 1; lVar3 = lVar3 + 0x18; } while ((ulong)param_4 * 0x18 != lVar3); return 0; }
49,905
inline_mysql_file_pread
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_pread( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, uchar *buffer, size_t count, my_off_t offset, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_read; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_pread(file, buffer, count, offset, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_read= (result == 0) ? count : 0; else bytes_read= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_read); return result; } #endif result= my_pread(file, buffer, count, offset, flags); return result; }
O0
c
inline_mysql_file_pread: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x1fa2b4(%rip), %rax # 0x238fa0 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x6, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x3edff leaq 0x1fa26a(%rip), %rax # 0x238fa0 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x10(%rbp), %r8 callq 0x80950 movq %rax, -0x38(%rbp) movq 0x10(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x3edaa cmpq $0x0, -0x38(%rbp) jne 0x3ed8f movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x3ed9a xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0x3ed9a movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x3edd7 cmpq $-0x1, -0x38(%rbp) je 0x3edbe movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0x3edc9 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0x3edc9 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x1fa1c2(%rip), %rax # 0x238fa0 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x3ee23 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx movq 0x10(%rbp), %r8 callq 0x80950 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq
inline_mysql_file_pread_0: push rbp mov rbp, rsp sub rsp, 0A0h mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 6 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_3EDFF lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov r8, [rbp+arg_0] call my_pread mov [rbp+var_38], rax mov rax, [rbp+arg_0] and rax, 6 cmp rax, 0 jz short loc_3EDAA cmp [rbp+var_38], 0 jnz short loc_3ED8F mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_3ED9A loc_3ED8F: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_3ED9A: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_3EDD7 loc_3EDAA: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_3EDBE mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_3EDC9 loc_3EDBE: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_3EDC9: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_3EDD7: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_3EE23 loc_3EDFF: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] mov r8, [rbp+arg_0] call my_pread mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_3EE23: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_pread_0( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6, long long a7) { long long v8; // [rsp+0h] [rbp-A0h] long long v9; // [rsp+8h] [rbp-98h] _BYTE v10[72]; // [rsp+18h] [rbp-88h] BYREF long long v11; // [rsp+60h] [rbp-40h] long long v12; // [rsp+68h] [rbp-38h] long long v13; // [rsp+70h] [rbp-30h] long long v14; // [rsp+78h] [rbp-28h] long long v15; // [rsp+80h] [rbp-20h] unsigned int v16; // [rsp+88h] [rbp-18h] unsigned int v17; // [rsp+8Ch] [rbp-14h] long long v18; // [rsp+90h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14 = a5; v13 = a6; v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v10, a3, 6LL); if ( v11 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v11, v14, v18, v17); v12 = my_pread(v16, v15, v14, v13, a7); if ( (a7 & 6) != 0 ) { if ( v12 ) v9 = 0LL; else v9 = v14; ((void ( *)(long long, long long))PSI_server[67])(v11, v9); } else { if ( v12 == -1 ) v8 = 0LL; else v8 = v12; ((void ( *)(long long, long long))PSI_server[67])(v11, v8); } return v12; } else { return my_pread(v16, v15, v14, v13, a7); } }
inline_mysql_file_pread: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x338fa0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x6 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0013edff LEA RAX,[0x338fa0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x00180950 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + 0x10] AND RAX,0x6 CMP RAX,0x0 JZ 0x0013edaa CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0013ed8f MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x0013ed9a LAB_0013ed8f: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x0013ed9a LAB_0013ed9a: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x0013edd7 LAB_0013edaa: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x0013edbe MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x0013edc9 LAB_0013edbe: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x0013edc9 LAB_0013edc9: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_0013edd7: LEA RAX,[0x338fa0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x0013ee23 LAB_0013edff: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x00180950 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_0013ee23: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_pread (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,int8 param_6,ulong param_7) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; int8 local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6); if (local_48 == 0) { local_10 = my_pread(local_20,local_28,local_30,local_38,param_7); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_pread(local_20,local_28,local_30,local_38,param_7); if ((param_7 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
49,906
R3D_SetState
r3d/src/r3d_core.c
void R3D_SetState(unsigned int flags) { if (flags & R3D_FLAG_8_BIT_NORMALS) { TraceLog(LOG_WARNING, "R3D: Cannot set 'R3D_FLAG_8_BIT_NORMALS'; this flag must be set before R3D initialization"); flags &= ~R3D_FLAG_8_BIT_NORMALS; } R3D.state.flags |= flags; if (flags & R3D_FLAG_FXAA) { if (R3D.shader.screen.fxaa.id == 0) { r3d_shader_load_screen_fxaa(); } } }
O3
c
R3D_SetState: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edi, %ebx testb $0x20, %bl je 0xc3e65 leaq 0x4d749(%rip), %rsi # 0x11159f movl $0x4, %edi xorl %eax, %eax callq 0xa9d11 andl $-0x21, %ebx leaq 0xec144(%rip), %rax # 0x1affb0 orl %ebx, 0x1724(%rax) testb $0x1, %bl je 0xc3e8b cmpl $0x0, 0x145c(%rax) jne 0xc3e8b addq $0x8, %rsp popq %rbx popq %rbp jmp 0xc354e addq $0x8, %rsp popq %rbx popq %rbp retq
R3D_SetState: push rbp mov rbp, rsp push rbx push rax mov ebx, edi test bl, 20h jz short loc_C3E65 lea rsi, aR3dCannotSetR3; "R3D: Cannot set 'R3D_FLAG_8_BIT_NORMALS"... mov edi, 4 xor eax, eax call TraceLog and ebx, 0FFFFFFDFh loc_C3E65: lea rax, R3D or [rax+1724h], ebx test bl, 1 jz short loc_C3E8B cmp dword ptr [rax+145Ch], 0 jnz short loc_C3E8B add rsp, 8 pop rbx pop rbp jmp r3d_shader_load_screen_fxaa loc_C3E8B: add rsp, 8 pop rbx pop rbp retn
char * R3D_SetState(unsigned int a1) { unsigned int v1; // ebx char *result; // rax v1 = a1; if ( (a1 & 0x20) != 0 ) { TraceLog(4, (long long)"R3D: Cannot set 'R3D_FLAG_8_BIT_NORMALS'; this flag must be set before R3D initialization"); v1 = a1 & 0xFFFFFFDF; } result = R3D; *(_DWORD *)&R3D[5924] |= v1; if ( (v1 & 1) != 0 && !*(_DWORD *)&R3D[5212] ) return (char *)r3d_shader_load_screen_fxaa(); return result; }
R3D_SetState: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,EDI TEST BL,0x20 JZ 0x001c3e65 LEA RSI,[0x21159f] MOV EDI,0x4 XOR EAX,EAX CALL 0x001a9d11 AND EBX,0xffffffdf LAB_001c3e65: LEA RAX,[0x2affb0] OR dword ptr [RAX + 0x1724],EBX TEST BL,0x1 JZ 0x001c3e8b CMP dword ptr [RAX + 0x145c],0x0 JNZ 0x001c3e8b ADD RSP,0x8 POP RBX POP RBP JMP 0x001c354e LAB_001c3e8b: ADD RSP,0x8 POP RBX POP RBP RET
void R3D_SetState(uint param_1) { if ((param_1 & 0x20) != 0) { TraceLog(4, "R3D: Cannot set \'R3D_FLAG_8_BIT_NORMALS\'; this flag must be set before R3D initialization" ); param_1 = param_1 & 0xffffffdf; } DAT_002b16d4 = DAT_002b16d4 | param_1; if (((param_1 & 1) != 0) && (DAT_002b140c == 0)) { r3d_shader_load_screen_fxaa(); return; } return; }
49,907
check_mb_utf8mb3_valid
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_utf8mb3_valid(const char *start, const char *end) { unsigned int len = check_mb_utf8mb3_sequence(start, end); return (len > 1)? len:0; }
O3
c
check_mb_utf8mb3_valid: pushq %rbp movq %rsp, %rbp cmpq %rsi, %rdi jae 0x8d39d movb (%rdi), %al cmpb $-0x3e, %al jae 0x8d3a1 xorl %eax, %eax popq %rbp retq cmpb $-0x21, %al ja 0x8d3bb leaq 0x2(%rdi), %rax cmpq %rsi, %rax ja 0x8d39d movl $0x2, %eax cmpb $-0x40, 0x1(%rdi) jge 0x8d39d jmp 0x8d39f cmpb $-0x10, %al setae %cl leaq 0x3(%rdi), %rdx cmpq %rsi, %rdx seta %dl orb %cl, %dl jne 0x8d39d movb 0x1(%rdi), %cl cmpb $-0x41, %cl jg 0x8d39d cmpb $-0x41, 0x2(%rdi) jg 0x8d39d cmpb $-0x20, %al setne %al cmpb $-0x60, %cl setae %cl orb %al, %cl movl $0x3, %eax je 0x8d39d jmp 0x8d39f
check_mb_utf8mb3_valid: push rbp mov rbp, rsp cmp rdi, rsi jnb short loc_8D39D mov al, [rdi] cmp al, 0C2h jnb short loc_8D3A1 loc_8D39D: xor eax, eax loc_8D39F: pop rbp retn loc_8D3A1: cmp al, 0DFh ja short loc_8D3BB lea rax, [rdi+2] cmp rax, rsi ja short loc_8D39D mov eax, 2 cmp byte ptr [rdi+1], 0C0h jge short loc_8D39D jmp short loc_8D39F loc_8D3BB: cmp al, 0F0h setnb cl lea rdx, [rdi+3] cmp rdx, rsi setnbe dl or dl, cl jnz short loc_8D39D mov cl, [rdi+1] cmp cl, 0BFh jg short loc_8D39D cmp byte ptr [rdi+2], 0BFh jg short loc_8D39D cmp al, 0E0h setnz al cmp cl, 0A0h setnb cl or cl, al mov eax, 3 jz short loc_8D39D jmp short loc_8D39F
long long check_mb_utf8mb3_valid(unsigned __int8 *a1, unsigned long long a2) { unsigned __int8 v2; // al long long result; // rax char v4; // cl bool v5; // cl if ( (unsigned long long)a1 >= a2 ) return 0LL; v2 = *a1; if ( *a1 < 0xC2u ) return 0LL; if ( v2 <= 0xDFu ) { if ( (unsigned long long)(a1 + 2) <= a2 ) { result = 2LL; if ( (char)a1[1] < -64 ) return result; } return 0LL; } if ( v2 >= 0xF0u || (unsigned long long)(a1 + 3) > a2 ) return 0LL; v4 = a1[1]; if ( v4 > -65 ) return 0LL; if ( (char)a1[2] > -65 ) return 0LL; v5 = v2 != 0xE0 || (unsigned __int8)v4 >= 0xA0u; result = 3LL; if ( !v5 ) return 0LL; return result; }
check_mb_utf8mb3_valid: PUSH RBP MOV RBP,RSP CMP RDI,RSI JNC 0x0018d39d MOV AL,byte ptr [RDI] CMP AL,0xc2 JNC 0x0018d3a1 LAB_0018d39d: XOR EAX,EAX LAB_0018d39f: POP RBP RET LAB_0018d3a1: CMP AL,0xdf JA 0x0018d3bb LEA RAX,[RDI + 0x2] CMP RAX,RSI JA 0x0018d39d MOV EAX,0x2 CMP byte ptr [RDI + 0x1],0xc0 JGE 0x0018d39d JMP 0x0018d39f LAB_0018d3bb: CMP AL,0xf0 SETNC CL LEA RDX,[RDI + 0x3] CMP RDX,RSI SETA DL OR DL,CL JNZ 0x0018d39d MOV CL,byte ptr [RDI + 0x1] CMP CL,0xbf JG 0x0018d39d CMP byte ptr [RDI + 0x2],0xbf JG 0x0018d39d CMP AL,0xe0 SETNZ AL CMP CL,0xa0 SETNC CL OR CL,AL MOV EAX,0x3 JZ 0x0018d39d JMP 0x0018d39f
int8 check_mb_utf8mb3_valid(byte *param_1,byte *param_2) { byte bVar1; if ((param_1 < param_2) && (bVar1 = *param_1, 0xc1 < bVar1)) { if (bVar1 < 0xe0) { if ((param_1 + 2 <= param_2) && ((char)param_1[1] < -0x40)) { return 2; } } else if ((((param_1 + 3 <= param_2 && bVar1 < 0xf0) && ((char)param_1[1] < -0x40)) && ((char)param_1[2] < -0x40)) && (0x9f < param_1[1] || bVar1 != 0xe0)) { return 3; } } return 0; }
49,908
POINTonE2_affine_on_curve
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/e2.c
static bool_t POINTonE2_affine_on_curve(const POINTonE2_affine *p) { vec384x XXX, YY; sqr_fp2(XXX, p->X); mul_fp2(XXX, XXX, p->X); /* X^3 */ add_fp2(XXX, XXX, B_E2); /* X^3 + B */ sqr_fp2(YY, p->Y); /* Y^2 */ return vec_is_equal(XXX, YY, sizeof(XXX)); }
O3
c
POINTonE2_affine_on_curve: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rdi, %r14 leaq 0x3059c(%rip), %r15 # 0x8a910 leaq -0xf0(%rbp), %rbx movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x71ca0 movq %rbx, %rdi movq %rbx, %rsi movq %r14, %rdx movq %r15, %rcx movq %r12, %r8 callq 0x71b60 leaq 0x3147f(%rip), %rdx # 0x8b830 movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rcx callq 0x6d6e0 addq $0x60, %r14 leaq -0x90(%rbp), %r13 movq %r13, %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x71ca0 movl $0x60, %edx movq %rbx, %rdi movq %r13, %rsi callq 0x6e940 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
POINTonE2_affine_on_curve: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r14, rdi lea r15, BLS12_381_P lea rbx, [rbp+var_F0] mov r12, 89F3FFFCFFFCFFFDh mov rdi, rbx mov rsi, r14 mov rdx, r15 mov rcx, r12 call sqr_mont_384x mov rdi, rbx mov rsi, rbx mov rdx, r14 mov rcx, r15 mov r8, r12 call mul_mont_384x lea rdx, B_E2 mov rdi, rbx mov rsi, rbx mov rcx, r15 call add_mod_384x add r14, 60h ; '`' lea r13, [rbp+var_90] mov rdi, r13 mov rsi, r14 mov rdx, r15 mov rcx, r12 call sqr_mont_384x mov edx, 60h ; '`' mov rdi, rbx mov rsi, r13 call vec_is_equal_16x add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long POINTonE2_affine_on_curve(long long a1) { _BYTE v2[96]; // [rsp+0h] [rbp-F0h] BYREF _BYTE v3[144]; // [rsp+60h] [rbp-90h] BYREF sqr_mont_384x(v2, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v2, v2, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); add_mod_384x(v2, v2, &B_E2, &BLS12_381_P); sqr_mont_384x(v3, a1 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); return vec_is_equal_16x(v2, v3, 96LL); }
POINTonE2_affine_on_curve: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R14,RDI LEA R15,[0x18a910] LEA RBX,[RBP + -0xf0] MOV R12,-0x760c000300030003 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV RCX,R12 CALL 0x00171ca0 MOV RDI,RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R15 MOV R8,R12 CALL 0x00171b60 LEA RDX,[0x18b830] MOV RDI,RBX MOV RSI,RBX MOV RCX,R15 CALL 0x0016d6e0 ADD R14,0x60 LEA R13,[RBP + -0x90] MOV RDI,R13 MOV RSI,R14 MOV RDX,R15 MOV RCX,R12 CALL 0x00171ca0 MOV EDX,0x60 MOV RDI,RBX MOV RSI,R13 CALL 0x0016e940 ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void POINTonE2_affine_on_curve(long param_1) { int1 local_f8 [96]; int1 local_98 [104]; sqr_mont_384x(local_f8,param_1,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_f8,local_f8,param_1,BLS12_381_P,0x89f3fffcfffcfffd); add_mod_384x(local_f8,local_f8,B_E2,BLS12_381_P); sqr_mont_384x(local_98,param_1 + 0x60,BLS12_381_P,0x89f3fffcfffcfffd); vec_is_equal_16x(local_f8,local_98,0x60); return; }
49,909
LefDefParser::lefiSpacingTable::addParallelLength(int, double*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
void lefiSpacingTable::addParallelLength(int numLength, double *lengths) { lefiParallel *parallel; if (parallel_ == 0) { parallel = (lefiParallel*) lefMalloc(sizeof(lefiParallel)); parallel->Init(); parallel_ = parallel; } else parallel = parallel_; parallel->addParallelLength(numLength, lengths); }
O3
cpp
LefDefParser::lefiSpacingTable::addParallelLength(int, double*): pushq %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movl %esi, %ebp movq 0x10(%rdi), %rax testq %rax, %rax jne 0x16cf1 movq %rdi, %r14 movl $0x28, %edi callq 0x24985 movq $0x0, (%rax) movl $0x0, 0x8(%rax) movq %rax, 0x10(%r14) movl %ebp, (%rax) movq %rbx, 0x10(%rax) popq %rbx popq %r14 popq %rbp retq
_ZN12LefDefParser16lefiSpacingTable17addParallelLengthEiPd: push rbp push r14 push rbx mov rbx, rdx mov ebp, esi mov rax, [rdi+10h] test rax, rax jnz short loc_16CF1 mov r14, rdi mov edi, offset qword_28; this call _ZN12LefDefParser9lefMallocEm; LefDefParser::lefMalloc(ulong) mov qword ptr [rax], 0 mov dword ptr [rax+8], 0 mov [r14+10h], rax loc_16CF1: mov [rax], ebp mov [rax+10h], rbx pop rbx pop r14 pop rbp retn
long long LefDefParser::lefiSpacingTable::addParallelLength( LefDefParser::lefiSpacingTable *this, unsigned long long a2, double *a3) { long long result; // rax result = *((_QWORD *)this + 2); if ( !result ) { result = LefDefParser::lefMalloc((LefDefParser *)&qword_28, a2); *(_QWORD *)result = 0LL; *(_DWORD *)(result + 8) = 0; *((_QWORD *)this + 2) = result; } *(_DWORD *)result = a2; *(_QWORD *)(result + 16) = a3; return result; }
addParallelLength: PUSH RBP PUSH R14 PUSH RBX MOV RBX,RDX MOV EBP,ESI MOV RAX,qword ptr [RDI + 0x10] TEST RAX,RAX JNZ 0x00116cf1 MOV R14,RDI MOV EDI,0x28 CALL 0x00124985 MOV qword ptr [RAX],0x0 MOV dword ptr [RAX + 0x8],0x0 MOV qword ptr [R14 + 0x10],RAX LAB_00116cf1: MOV dword ptr [RAX],EBP MOV qword ptr [RAX + 0x10],RBX POP RBX POP R14 POP RBP RET
/* LefDefParser::lefiSpacingTable::addParallelLength(int, double*) */ void __thiscall LefDefParser::lefiSpacingTable::addParallelLength (lefiSpacingTable *this,int param_1,double *param_2) { int *extraout_RAX; int *piVar1; int4 in_register_00000034; piVar1 = *(int **)(this + 0x10); if (piVar1 == (int *)0x0) { lefMalloc((LefDefParser *)0x28,CONCAT44(in_register_00000034,param_1)); extraout_RAX[0] = 0; extraout_RAX[1] = 0; extraout_RAX[2] = 0; *(int **)(this + 0x10) = extraout_RAX; piVar1 = extraout_RAX; } *piVar1 = param_1; *(double **)(piVar1 + 4) = param_2; return; }
49,910
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/sampling.cpp
std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const llama_tokens & draft, bool grammar_first) { std::vector<int> idxs(draft.size() + 1); for (size_t i = 0; i < idxs.size(); ++i) { idxs[i] = i; } return common_sampler_sample_and_accept_n(gsmpl, ctx, idxs, draft, grammar_first); }
O1
cpp
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq 0x8(%rcx), %rsi subq (%rcx), %rsi sarq $0x2, %rsi incq %rsi leaq 0x10(%rsp), %r13 leaq 0xf(%rsp), %rdx movq %r13, %rdi callq 0x79e82 movq (%r13), %rax movq 0x8(%r13), %rdx subq %rax, %rdx je 0xcf84e sarq $0x2, %rdx cmpq $0x1, %rdx adcq $0x0, %rdx leaq 0x1(%rdx), %rcx andq $-0x2, %rcx decq %rdx movq %rdx, %xmm0 pshufd $0x44, %xmm0, %xmm0 # xmm0 = xmm0[0,1,0,1] movdqa 0x22224(%rip), %xmm1 # 0xf1a00 xorl %edx, %edx movdqa 0x19f5a(%rip), %xmm2 # 0xe9740 pxor %xmm2, %xmm0 pcmpeqd %xmm3, %xmm3 movdqa 0x28a5a(%rip), %xmm4 # 0xf8250 movdqa %xmm1, %xmm5 pxor %xmm2, %xmm5 movdqa %xmm5, %xmm6 pcmpgtd %xmm0, %xmm6 pcmpeqd %xmm0, %xmm5 pshufd $0xf5, %xmm5, %xmm7 # xmm7 = xmm5[1,1,3,3] pand %xmm6, %xmm7 pshufd $0xf5, %xmm6, %xmm5 # xmm5 = xmm6[1,1,3,3] por %xmm7, %xmm5 movd %xmm5, %esi notl %esi testb $0x1, %sil je 0xcf82b movl %edx, (%rax,%rdx,4) pxor %xmm3, %xmm5 pextrw $0x4, %xmm5, %esi testb $0x1, %sil je 0xcf841 leal 0x1(%rdx), %esi movl %esi, 0x4(%rax,%rdx,4) addq $0x2, %rdx paddq %xmm4, %xmm1 cmpq %rdx, %rcx jne 0xcf7f6 movzbl %bpl, %r9d leaq 0x10(%rsp), %rcx movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %r8 callq 0xcf5cd movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xcf87f movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x1b900 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xcf8ab movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x1b900 movq %rbx, %rdi callq 0x1bfd0
_Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEEb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebp, r8d mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov rsi, [rcx+8] sub rsi, [rcx] sar rsi, 2 inc rsi lea r13, [rsp+58h+var_48] lea rdx, [rsp+58h+var_49] mov rdi, r13 call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&) mov rax, [r13+0] mov rdx, [r13+8] sub rdx, rax jz loc_CF84E sar rdx, 2 cmp rdx, 1 adc rdx, 0 lea rcx, [rdx+1] and rcx, 0FFFFFFFFFFFFFFFEh dec rdx movq xmm0, rdx pshufd xmm0, xmm0, 44h ; 'D' movdqa xmm1, cs:xmmword_F1A00 xor edx, edx movdqa xmm2, cs:xmmword_E9740 pxor xmm0, xmm2 pcmpeqd xmm3, xmm3 movdqa xmm4, cs:xmmword_F8250 loc_CF7F6: movdqa xmm5, xmm1 pxor xmm5, xmm2 movdqa xmm6, xmm5 pcmpgtd xmm6, xmm0 pcmpeqd xmm5, xmm0 pshufd xmm7, xmm5, 0F5h pand xmm7, xmm6 pshufd xmm5, xmm6, 0F5h por xmm5, xmm7 movd esi, xmm5 not esi test sil, 1 jz short loc_CF82B mov [rax+rdx*4], edx loc_CF82B: pxor xmm5, xmm3 pextrw esi, xmm5, 4 test sil, 1 jz short loc_CF841 lea esi, [rdx+1] mov [rax+rdx*4+4], esi loc_CF841: add rdx, 2 paddq xmm1, xmm4 cmp rcx, rdx jnz short loc_CF7F6 loc_CF84E: movzx r9d, bpl lea rcx, [rsp+58h+var_48] mov rdi, rbx mov rsi, r12 mov rdx, r15 mov r8, r14 call _Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b; common_sampler_sample_and_accept_n(common_sampler *,llama_context *,std::vector<int> const&,std::vector<int> const&,bool) mov rdi, [rsp+58h+var_48]; void * test rdi, rdi jz short loc_CF87F mov rsi, [rsp+58h+var_38] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CF87F: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_8]; void * test rdi, rdi jz short loc_CF8AB mov rsi, [rsp+arg_18] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_CF8AB: mov rdi, rbx call __Unwind_Resume
long long * common_sampler_sample_and_accept_n( long long *a1, _QWORD *a2, long long a3, _QWORD *a4, unsigned __int8 a5) { _DWORD *v8; // rax long long v9; // rdx unsigned long long v10; // rcx __m128i v11; // xmm0 __m128i si128; // xmm1 long long v13; // rdx __m128i v14; // xmm2 __m128i v15; // xmm0 __m128i v16; // xmm4 __m128i v17; // xmm5 __m128i v18; // xmm6 __m128i v19; // xmm5 void *v21; // [rsp+10h] [rbp-48h] BYREF _BYTE *v22; // [rsp+18h] [rbp-40h] long long v23; // [rsp+20h] [rbp-38h] std::vector<int>::vector((long long)&v21, ((long long)(a4[1] - *a4) >> 2) + 1); v8 = v21; if ( v22 != v21 ) { v9 = ((v22 - (_BYTE *)v21) >> 2 == 0) + ((v22 - (_BYTE *)v21) >> 2); v10 = (v9 + 1) & 0xFFFFFFFFFFFFFFFELL; v11 = _mm_shuffle_epi32((__m128i)(unsigned long long)(v9 - 1), 68); si128 = _mm_load_si128((const __m128i *)&xmmword_F1A00); v13 = 0LL; v14 = _mm_load_si128((const __m128i *)&xmmword_E9740); v15 = _mm_xor_si128(v11, v14); v16 = _mm_load_si128((const __m128i *)&xmmword_F8250); do { v17 = _mm_xor_si128(si128, v14); v18 = _mm_cmpgt_epi32(v17, v15); v19 = _mm_or_si128( _mm_shuffle_epi32(v18, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v17, v15), 245), v18)); if ( (~_mm_cvtsi128_si32(v19) & 1) != 0 ) v8[v13] = v13; if ( (_mm_extract_epi16(_mm_xor_si128(v19, (__m128i)-1LL), 4) & 1) != 0 ) v8[v13 + 1] = v13 + 1; v13 += 2LL; si128 = _mm_add_epi64(si128, v16); } while ( v10 != v13 ); } common_sampler_sample_and_accept_n(a1, a2, a3, &v21, a4, a5); if ( v21 ) operator delete(v21, v23 - (_QWORD)v21); return a1; }
common_sampler_sample_and_accept_n: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV RSI,qword ptr [RCX + 0x8] SUB RSI,qword ptr [RCX] SAR RSI,0x2 INC RSI LEA R13,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RDI,R13 CALL 0x00179e82 MOV RAX,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] SUB RDX,RAX JZ 0x001cf84e SAR RDX,0x2 CMP RDX,0x1 ADC RDX,0x0 LEA RCX,[RDX + 0x1] AND RCX,-0x2 DEC RDX MOVQ XMM0,RDX PSHUFD XMM0,XMM0,0x44 MOVDQA XMM1,xmmword ptr [0x001f1a00] XOR EDX,EDX MOVDQA XMM2,xmmword ptr [0x001e9740] PXOR XMM0,XMM2 PCMPEQD XMM3,XMM3 MOVDQA XMM4,xmmword ptr [0x001f8250] LAB_001cf7f6: MOVDQA XMM5,XMM1 PXOR XMM5,XMM2 MOVDQA XMM6,XMM5 PCMPGTD XMM6,XMM0 PCMPEQD XMM5,XMM0 PSHUFD XMM7,XMM5,0xf5 PAND XMM7,XMM6 PSHUFD XMM5,XMM6,0xf5 POR XMM5,XMM7 MOVD ESI,XMM5 NOT ESI TEST SIL,0x1 JZ 0x001cf82b MOV dword ptr [RAX + RDX*0x4],EDX LAB_001cf82b: PXOR XMM5,XMM3 PEXTRW ESI,XMM5,0x4 TEST SIL,0x1 JZ 0x001cf841 LEA ESI,[RDX + 0x1] MOV dword ptr [RAX + RDX*0x4 + 0x4],ESI LAB_001cf841: ADD RDX,0x2 PADDQ XMM1,XMM4 CMP RCX,RDX JNZ 0x001cf7f6 LAB_001cf84e: MOVZX R9D,BPL LEA RCX,[RSP + 0x10] MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 MOV R8,R14 CALL 0x001cf5cd LAB_001cf868: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001cf87f MOV RSI,qword ptr [RSP + 0x20] SUB RSI,RDI CALL 0x0011b900 LAB_001cf87f: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int> > const&, bool) */ common_sampler * common_sampler_sample_and_accept_n (common_sampler *param_1,llama_context *param_2,vector *param_3,bool param_4) { int1 auVar1 [16]; long lVar2; long lVar3; int7 in_register_00000009; long lVar4; long lVar5; ulong uVar6; int1 auVar7 [16]; int1 auVar8 [16]; int1 auVar9 [16]; void *local_48; long local_40; long local_38; std::vector<int,std::allocator<int>>::vector ((ulong)&local_48, (allocator *) ((((long *)CONCAT71(in_register_00000009,param_4))[1] - *(long *)CONCAT71(in_register_00000009,param_4) >> 2) + 1)); lVar3 = _UNK_001f8258; lVar2 = _DAT_001f8250; auVar1 = _DAT_001e9740; if (local_40 - (long)local_48 != 0) { lVar4 = local_40 - (long)local_48 >> 2; lVar4 = lVar4 + (ulong)(lVar4 == 0); lVar5 = lVar4 + -1; auVar7._8_4_ = (int)lVar5; auVar7._0_8_ = lVar5; auVar7._12_4_ = (int)((ulong)lVar5 >> 0x20); uVar6 = 0; auVar7 = auVar7 ^ _DAT_001e9740; auVar8 = _DAT_001f1a00; do { auVar9 = auVar8 ^ auVar1; if ((bool)(~(auVar9._4_4_ == auVar7._4_4_ && auVar7._0_4_ < auVar9._0_4_ || auVar7._4_4_ < auVar9._4_4_) & 1)) { *(int *)((long)local_48 + uVar6 * 4) = (int)uVar6; } if ((auVar9._12_4_ != auVar7._12_4_ || auVar9._8_4_ <= auVar7._8_4_) && auVar9._12_4_ <= auVar7._12_4_) { *(int *)((long)local_48 + uVar6 * 4 + 4) = (int)uVar6 + 1; } uVar6 = uVar6 + 2; lVar5 = auVar8._8_8_; auVar8._0_8_ = auVar8._0_8_ + lVar2; auVar8._8_8_ = lVar5 + lVar3; } while ((lVar4 + 1U & 0xfffffffffffffffe) != uVar6); } /* try { // try from 001cf84e to 001cf867 has its CatchHandler @ 001cf891 */ common_sampler_sample_and_accept_n(param_1,param_2,param_3,(vector *)&local_48,param_4); if (local_48 != (void *)0x0) { operator_delete(local_48,local_38 - (long)local_48); } return param_1; }
49,911
ma_update_status_with_lock
eloqsql/storage/maria/ma_state.c
void _ma_update_status_with_lock(MARIA_HA *info) { my_bool locked= 0; if (info->state == &info->state_save) { locked= 1; mysql_mutex_lock(&info->s->lock.mutex); } (*info->s->lock.update_status)(info->lock.status_param); if (locked) mysql_mutex_unlock(&info->s->lock.mutex); }
O3
c
ma_update_status_with_lock: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rax leaq 0x28(%rdi), %rcx cmpq %rcx, 0x20(%rdi) je 0x3829f movq 0x6b8(%rbx), %rdi addq $0x8, %rsp popq %rbx popq %rbp jmpq *0x8b0(%rax) leaq 0x808(%rax), %rdi cmpq $0x0, 0x848(%rax) jne 0x382e9 callq 0x29220 movq (%rbx), %rax movq 0x6b8(%rbx), %rdi callq *0x8b0(%rax) movq (%rbx), %rbx movq 0x848(%rbx), %rdi addq $0x808, %rbx # imm = 0x808 testq %rdi, %rdi jne 0x382fc movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x291e0 leaq 0xa10f7(%rip), %rsi # 0xd93e7 movl $0x168, %edx # imm = 0x168 callq 0x2eb8f jmp 0x382b5 leaq 0x34dd0d(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x382db
_ma_update_status_with_lock: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rax, [rdi] lea rcx, [rdi+28h] cmp [rdi+20h], rcx jz short loc_3829F mov rdi, [rbx+6B8h] add rsp, 8 pop rbx pop rbp jmp qword ptr [rax+8B0h] loc_3829F: lea rdi, [rax+808h] cmp qword ptr [rax+848h], 0 jnz short loc_382E9 call _pthread_mutex_lock loc_382B5: mov rax, [rbx] mov rdi, [rbx+6B8h] call qword ptr [rax+8B0h] mov rbx, [rbx] mov rdi, [rbx+848h] add rbx, 808h test rdi, rdi jnz short loc_382FC loc_382DB: mov rdi, rbx add rsp, 8 pop rbx pop rbp jmp _pthread_mutex_unlock loc_382E9: lea rsi, aWorkspaceLlm4b_28; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 168h call psi_mutex_lock jmp short loc_382B5 loc_382FC: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_382DB
long long ma_update_status_with_lock(_QWORD *a1) { long long v2; // rax long long v4; // rdi long long v5; // rbx long long v6; // rdi long long v7; // rbx v2 = *a1; if ( (_QWORD *)a1[4] != a1 + 5 ) return (*(long long ( **)(_QWORD))(v2 + 2224))(a1[215]); v4 = v2 + 2056; if ( *(_QWORD *)(v2 + 2120) ) psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x168u); else pthread_mutex_lock(v4); (*(void ( **)(_QWORD))(*a1 + 2224LL))(a1[215]); v5 = *a1; v6 = *(_QWORD *)(v5 + 2120); v7 = v5 + 2056; if ( v6 ) ((void ( *)(long long))PSI_server[44])(v6); return pthread_mutex_unlock(v7); }
_ma_update_status_with_lock: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI] LEA RCX,[RDI + 0x28] CMP qword ptr [RDI + 0x20],RCX JZ 0x0013829f MOV RDI,qword ptr [RBX + 0x6b8] ADD RSP,0x8 POP RBX POP RBP JMP qword ptr [RAX + 0x8b0] LAB_0013829f: LEA RDI,[RAX + 0x808] CMP qword ptr [RAX + 0x848],0x0 JNZ 0x001382e9 CALL 0x00129220 LAB_001382b5: MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RBX + 0x6b8] CALL qword ptr [RAX + 0x8b0] MOV RBX,qword ptr [RBX] MOV RDI,qword ptr [RBX + 0x848] ADD RBX,0x808 TEST RDI,RDI JNZ 0x001382fc LAB_001382db: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001291e0 LAB_001382e9: LEA RSI,[0x1d93e7] MOV EDX,0x168 CALL 0x0012eb8f JMP 0x001382b5 LAB_001382fc: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x001382db
void _ma_update_status_with_lock(long *param_1) { long lVar1; lVar1 = *param_1; if ((long *)param_1[4] != param_1 + 5) { /* WARNING: Could not recover jumptable at 0x00138299. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar1 + 0x8b0))(param_1[0xd7]); return; } if (*(long *)(lVar1 + 0x848) == 0) { pthread_mutex_lock((pthread_mutex_t *)(lVar1 + 0x808)); } else { psi_mutex_lock((pthread_mutex_t *)(lVar1 + 0x808), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c",0x168); } (**(code **)(*param_1 + 0x8b0))(param_1[0xd7]); lVar1 = *param_1; if (*(long *)(lVar1 + 0x848) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(lVar1 + 0x808)); return; }
49,912
psi_cond_timedwait
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_cond_timedwait(mysql_cond_t *that, mysql_mutex_t *mutex, const struct timespec *abstime, const char *file, uint line) { PSI_cond_locker_state state; PSI_cond_locker *locker= PSI_COND_CALL(start_cond_wait) (&state, that->m_psi, mutex->m_psi, PSI_COND_TIMEDWAIT, file, line); int result= my_cond_timedwait(&that->m_cond, &mutex->m_mutex, abstime); if (psi_likely(locker)) PSI_COND_CALL(end_cond_wait)(locker, result); return result; }
O0
c
psi_cond_timedwait: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) leaq 0x1a554d(%rip), %rax # 0x1cc820 movq (%rax), %rax movq 0x1c0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rsi movq -0x10(%rbp), %rcx movq 0x40(%rcx), %rdx movq -0x20(%rbp), %r8 movl -0x24(%rbp), %r9d leaq -0x60(%rbp), %rdi movl $0x1, %ecx callq *%rax movq %rax, -0x68(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x244c0 movl %eax, -0x6c(%rbp) cmpq $0x0, -0x68(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x27347 leaq 0x1a54ec(%rip), %rax # 0x1cc820 movq (%rax), %rax movq 0x1c8(%rax), %rax movq -0x68(%rbp), %rdi movl -0x6c(%rbp), %esi callq *%rax movl -0x6c(%rbp), %eax addq $0x70, %rsp popq %rbp retq
psi_cond_timedwait: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], r8d lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C0h] mov rcx, [rbp+var_8] mov rsi, [rcx+30h] mov rcx, [rbp+var_10] mov rdx, [rcx+40h] mov r8, [rbp+var_20] mov r9d, [rbp+var_24] lea rdi, [rbp+var_60] mov ecx, 1 call rax mov [rbp+var_68], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _pthread_cond_timedwait mov [rbp+var_6C], eax cmp [rbp+var_68], 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_27347 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1C8h] mov rdi, [rbp+var_68] mov esi, [rbp+var_6C] call rax loc_27347: mov eax, [rbp+var_6C] add rsp, 70h pop rbp retn
long long psi_cond_timedwait(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { unsigned int v6; // [rsp+4h] [rbp-6Ch] long long v7; // [rsp+8h] [rbp-68h] _BYTE v8[60]; // [rsp+10h] [rbp-60h] BYREF unsigned int v9; // [rsp+4Ch] [rbp-24h] long long v10; // [rsp+50h] [rbp-20h] long long v11; // [rsp+58h] [rbp-18h] long long v12; // [rsp+60h] [rbp-10h] long long v13; // [rsp+68h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a5; v7 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, long long, _QWORD))PSI_server[0] + 56))( v8, *(_QWORD *)(a1 + 48), *(_QWORD *)(a2 + 64), 1LL, a4, a5); v6 = pthread_cond_timedwait(v13, v12, v11); if ( v7 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 57))(v7, v6); return v6; }
psi_cond_timedwait: PUSH RBP MOV RBP,RSP SUB RSP,0x70 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 dword ptr [RBP + -0x24],R8D LEA RAX,[0x2cc820] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x40] MOV R8,qword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x24] LEA RDI,[RBP + -0x60] MOV ECX,0x1 CALL RAX MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001244c0 MOV dword ptr [RBP + -0x6c],EAX CMP qword ptr [RBP + -0x68],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00127347 LEA RAX,[0x2cc820] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1c8] MOV RDI,qword ptr [RBP + -0x68] MOV ESI,dword ptr [RBP + -0x6c] CALL RAX LAB_00127347: MOV EAX,dword ptr [RBP + -0x6c] ADD RSP,0x70 POP RBP RET
int psi_cond_timedwait(pthread_cond_t *param_1,pthread_mutex_t *param_2,timespec *param_3, int8 param_4,int4 param_5) { int iVar1; long lVar2; int1 local_68 [60]; int4 local_2c; int8 local_28; timespec *local_20; pthread_mutex_t *local_18; pthread_cond_t *local_10; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1c0)) (local_68,param_1[1].__align,*(int8 *)((long)param_2 + 0x40),1,param_4, param_5); iVar1 = pthread_cond_timedwait(local_10,local_18,local_20); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1c8))(lVar2,iVar1); } return iVar1; }
49,913
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; }
O3
c
mi_ft_segiterator_dummy_init: pushq %rbp movq %rsp, %rbp movl $0x1, (%rdx) movq $0x0, 0x8(%rdx) movq %rdi, 0x18(%rdx) movl %esi, 0x4(%rdx) popq %rbp retq
_mi_ft_segiterator_dummy_init: push rbp mov rbp, rsp mov dword ptr [rdx], 1 mov qword ptr [rdx+8], 0 mov [rdx+18h], rdi mov [rdx+4], esi pop rbp retn
void mi_ft_segiterator_dummy_init(long long a1, int a2, long long a3) { *(_DWORD *)a3 = 1; *(_QWORD *)(a3 + 8) = 0LL; *(_QWORD *)(a3 + 24) = a1; *(_DWORD *)(a3 + 4) = a2; }
_mi_ft_segiterator_dummy_init: PUSH RBP MOV RBP,RSP MOV dword ptr [RDX],0x1 MOV qword ptr [RDX + 0x8],0x0 MOV qword ptr [RDX + 0x18],RDI MOV dword ptr [RDX + 0x4],ESI 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; }
49,914
my_strtoull
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static unsigned long long my_strtoull(const char *str, size_t len, const char **end, int *err) { unsigned long long val = 0; const char *p = str; const char *end_str = p + len; for (; p < end_str; p++) { if (*p < '0' || *p > '9') break; if (val > ULONGLONG_MAX /10 || val*10 > ULONGLONG_MAX - (*p - '0')) { *err = ERANGE; break; } val = val * 10 + *p -'0'; } if (p == str) /* Did not parse anything.*/ *err = ERANGE; *end = p; return val; }
O0
c
my_strtoull: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x30b8e movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0x30b26 movq -0x30(%rbp), %rax movsbl (%rax), %eax cmpl $0x39, %eax jle 0x30b28 jmp 0x30b8e movabsq $0x1999999999999999, %rax # imm = 0x1999999999999999 cmpq %rax, -0x28(%rbp) ja 0x30b59 imulq $0xa, -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movsbl (%rcx), %ecx subl $0x30, %ecx movslq %ecx, %rdx movq $-0x1, %rcx subq %rdx, %rcx cmpq %rcx, %rax jbe 0x30b65 movq -0x20(%rbp), %rax movl $0x22, (%rax) jmp 0x30b8e imulq $0xa, -0x28(%rbp), %rax movq -0x30(%rbp), %rcx movsbq (%rcx), %rcx addq %rcx, %rax subq $0x30, %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x30b00 movq -0x30(%rbp), %rax cmpq -0x8(%rbp), %rax jne 0x30ba2 movq -0x20(%rbp), %rax movl $0x22, (%rax) movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
my_strtoull: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], 0 mov rax, [rbp+var_8] mov [rbp+var_30], rax mov rax, [rbp+var_30] add rax, [rbp+var_10] mov [rbp+var_38], rax loc_30B00: mov rax, [rbp+var_30] cmp rax, [rbp+var_38] jnb loc_30B8E mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_30B26 mov rax, [rbp+var_30] movsx eax, byte ptr [rax] cmp eax, 39h ; '9' jle short loc_30B28 loc_30B26: jmp short loc_30B8E loc_30B28: mov rax, 1999999999999999h cmp [rbp+var_28], rax ja short loc_30B59 imul rax, [rbp+var_28], 0Ah mov rcx, [rbp+var_30] movsx ecx, byte ptr [rcx] sub ecx, 30h ; '0' movsxd rdx, ecx mov rcx, 0FFFFFFFFFFFFFFFFh sub rcx, rdx cmp rax, rcx jbe short loc_30B65 loc_30B59: mov rax, [rbp+var_20] mov dword ptr [rax], 22h ; '"' jmp short loc_30B8E loc_30B65: imul rax, [rbp+var_28], 0Ah mov rcx, [rbp+var_30] movsx rcx, byte ptr [rcx] add rax, rcx sub rax, 30h ; '0' mov [rbp+var_28], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp loc_30B00 loc_30B8E: mov rax, [rbp+var_30] cmp rax, [rbp+var_8] jnz short loc_30BA2 mov rax, [rbp+var_20] mov dword ptr [rax], 22h ; '"' loc_30BA2: mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_28] pop rbp retn
unsigned long long my_strtoull(char *a1, long long a2, char **a3, _DWORD *a4) { char *i; // [rsp+8h] [rbp-30h] unsigned long long v6; // [rsp+10h] [rbp-28h] v6 = 0LL; for ( i = a1; i < &a1[a2] && *i >= 48 && *i <= 57; ++i ) { if ( v6 > 0x1999999999999999LL || 10 * v6 > -1LL - (*i - 48) ) { *a4 = 34; break; } v6 = *i + 10 * v6 - 48; } if ( i == a1 ) *a4 = 34; *a3 = i; return v6; }
my_strtoull: PUSH RBP MOV RBP,RSP 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],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX LAB_00130b00: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00130b8e MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x00130b26 MOV RAX,qword ptr [RBP + -0x30] MOVSX EAX,byte ptr [RAX] CMP EAX,0x39 JLE 0x00130b28 LAB_00130b26: JMP 0x00130b8e LAB_00130b28: MOV RAX,0x1999999999999999 CMP qword ptr [RBP + -0x28],RAX JA 0x00130b59 IMUL RAX,qword ptr [RBP + -0x28],0xa MOV RCX,qword ptr [RBP + -0x30] MOVSX ECX,byte ptr [RCX] SUB ECX,0x30 MOVSXD RDX,ECX MOV RCX,-0x1 SUB RCX,RDX CMP RAX,RCX JBE 0x00130b65 LAB_00130b59: MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x22 JMP 0x00130b8e LAB_00130b65: IMUL RAX,qword ptr [RBP + -0x28],0xa MOV RCX,qword ptr [RBP + -0x30] MOVSX RCX,byte ptr [RCX] ADD RAX,RCX SUB RAX,0x30 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x00130b00 LAB_00130b8e: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x8] JNZ 0x00130ba2 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x22 LAB_00130ba2: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] POP RBP RET
ulong my_strtoull(char *param_1,long param_2,int8 *param_3,int4 *param_4) { ulong uVar1; char *local_38; ulong local_30; local_30 = 0; local_38 = param_1; while( true ) { if (((param_1 + param_2 <= local_38) || (*local_38 < '0')) || ('9' < *local_38)) goto LAB_00130b8e; if ((0x1999999999999999 < local_30) || (uVar1 = -(long)(*local_38 + -0x30) - 1, uVar1 <= local_30 * 10 && local_30 * 10 - uVar1 != 0 )) break; local_30 = (local_30 * 10 + (long)*local_38) - 0x30; local_38 = local_38 + 1; } *param_4 = 0x22; LAB_00130b8e: if (local_38 == param_1) { *param_4 = 0x22; } *param_3 = local_38; return local_30; }
49,915
maria_page_crc_check_index
eloqsql/storage/maria/ma_pagecrc.c
my_bool maria_page_crc_check_index(int res, PAGECACHE_IO_HOOK_ARGS *args) { uchar *page= args->page; pgcache_page_no_t page_no= args->pageno; MARIA_SHARE *share= (MARIA_SHARE *)args->data; uint length= _ma_get_page_used(share, page); if (res) return 1; if (length > share->block_size - CRC_SIZE) { DBUG_PRINT("error", ("Wrong page length: %u", length)); my_errno= HA_ERR_WRONG_CRC; return 1; } return maria_page_crc_check(page, (uint32) page_no, share, MARIA_NO_CRC_NORMAL_PAGE, length); }
O0
c
maria_page_crc_check_index: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq -0x28(%rbp), %rcx movl 0x744(%rcx), %ecx movzbl -0x1(%rax,%rcx), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movq -0x28(%rbp), %rdx movl 0x744(%rdx), %edx movzbl -0x2(%rcx,%rdx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0x2c(%rbp) cmpl $0x0, -0x8(%rbp) je 0x5d845 movb $0x1, -0x1(%rbp) jmp 0x5d88f movl -0x2c(%rbp), %eax movq -0x28(%rbp), %rcx movl 0x7bc(%rcx), %ecx subl $0x4, %ecx cmpl %ecx, %eax jbe 0x5d86e jmp 0x5d85b jmp 0x5d85d callq 0xf60c0 movl $0xb0, (%rax) movb $0x1, -0x1(%rbp) jmp 0x5d88f movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movl %eax, %eax movl %eax, %esi movq -0x28(%rbp), %rdx movl -0x2c(%rbp), %r8d movl $0xffffffff, %ecx # imm = 0xFFFFFFFF callq 0x5d460 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
maria_page_crc_check_index: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rcx, [rbp+var_28] mov ecx, [rcx+744h] movzx eax, byte ptr [rax+rcx-1] movzx eax, ax mov rcx, [rbp+var_18] mov rdx, [rbp+var_28] mov edx, [rdx+744h] movzx ecx, byte ptr [rcx+rdx-2] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_2C], eax cmp [rbp+var_8], 0 jz short loc_5D845 mov [rbp+var_1], 1 jmp short loc_5D88F loc_5D845: mov eax, [rbp+var_2C] mov rcx, [rbp+var_28] mov ecx, [rcx+7BCh] sub ecx, 4 cmp eax, ecx jbe short loc_5D86E jmp short $+2 loc_5D85B: jmp short $+2 loc_5D85D: call _my_thread_var mov dword ptr [rax], 0B0h mov [rbp+var_1], 1 jmp short loc_5D88F loc_5D86E: mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov eax, eax mov esi, eax mov rdx, [rbp+var_28] mov r8d, [rbp+var_2C] mov ecx, 0FFFFFFFFh call maria_page_crc_check mov [rbp+var_1], al loc_5D88F: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
bool maria_page_crc_check_index(long long a1, const char *a2) { unsigned int v3; // [rsp+4h] [rbp-2Ch] long long v4; // [rsp+8h] [rbp-28h] v4 = *((_QWORD *)a2 + 2); v3 = _byteswap_ushort(*(_WORD *)(*(_QWORD *)a2 + *(unsigned int *)(v4 + 1860) - 2LL)); if ( (_DWORD)a1 ) return 1; if ( v3 <= *(_DWORD *)(v4 + 1980) - 4 ) return maria_page_crc_check(*(_BYTE **)a2, (const char *)(unsigned int)*((_QWORD *)a2 + 1), v4, -1, v3); *(_DWORD *)my_thread_var(a1, a2) = 176; return 1; }
maria_page_crc_check_index: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x744] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RDX + 0x744] MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x8],0x0 JZ 0x0015d845 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015d88f LAB_0015d845: MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RCX + 0x7bc] SUB ECX,0x4 CMP EAX,ECX JBE 0x0015d86e JMP 0x0015d85b LAB_0015d85b: JMP 0x0015d85d LAB_0015d85d: CALL 0x001f60c0 MOV dword ptr [RAX],0xb0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015d88f LAB_0015d86e: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV EAX,EAX MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x28] MOV R8D,dword ptr [RBP + -0x2c] MOV ECX,0xffffffff CALL 0x0015d460 MOV byte ptr [RBP + -0x1],AL LAB_0015d88f: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 maria_page_crc_check_index(int param_1,long *param_2) { long lVar1; long lVar2; uint uVar3; int4 *puVar4; int1 local_9; lVar1 = *param_2; lVar2 = param_2[2]; uVar3 = (uint)CONCAT11(*(int1 *)(lVar1 + -2 + (ulong)*(uint *)(lVar2 + 0x744)), *(int1 *)(lVar1 + -1 + (ulong)*(uint *)(lVar2 + 0x744))); if (param_1 == 0) { if (*(int *)(lVar2 + 0x7bc) - 4U < uVar3) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0xb0; local_9 = 1; } else { local_9 = maria_page_crc_check(lVar1,param_2[1] & 0xffffffff,lVar2,0xffffffff,uVar3); } } else { local_9 = 1; } return local_9; }
49,916
mark_all_entries
eloqsql/storage/myisam/rt_split.c
static void mark_all_entries(SplitStruct *node, int n_entries, int n_group) { SplitStruct *cur = node; SplitStruct *end = node + n_entries; for (; cur<end; ++cur) { if (cur->n_node) { continue; } cur->n_node = n_group; } }
O0
c
mark_all_entries: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xd74a7 movq -0x18(%rbp), %rax cmpl $0x0, 0x8(%rax) je 0xd748f jmp 0xd7499 movl -0x10(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x18(%rbp), %rax addq $0x20, %rax movq %rax, -0x18(%rbp) jmp 0xd7479 popq %rbp retq nopl (%rax)
mark_all_entries_0: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] shl rcx, 5 add rax, rcx mov [rbp+var_20], rax loc_D7479: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_D74A7 mov rax, [rbp+var_18] cmp dword ptr [rax+8], 0 jz short loc_D748F jmp short loc_D7499 loc_D748F: mov ecx, [rbp+var_10] mov rax, [rbp+var_18] mov [rax+8], ecx loc_D7499: mov rax, [rbp+var_18] add rax, 20h ; ' ' mov [rbp+var_18], rax jmp short loc_D7479 loc_D74A7: pop rbp retn
unsigned long long mark_all_entries_0(unsigned long long a1, int a2, int a3) { unsigned long long result; // rax unsigned long long i; // [rsp+8h] [rbp-18h] for ( i = a1; ; i += 32LL ) { result = i; if ( i >= 32LL * a2 + a1 ) break; if ( !*(_DWORD *)(i + 8) ) *(_DWORD *)(i + 8) = a3; } return result; }
mark_all_entries: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001d7479: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001d74a7 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x8],0x0 JZ 0x001d748f JMP 0x001d7499 LAB_001d748f: MOV ECX,dword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x8],ECX LAB_001d7499: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x20 MOV qword ptr [RBP + -0x18],RAX JMP 0x001d7479 LAB_001d74a7: POP RBP RET
void mark_all_entries(ulong param_1,int param_2,int4 param_3) { int8 local_20; for (local_20 = param_1; local_20 < param_1 + (long)param_2 * 0x20; local_20 = local_20 + 0x20) { if (*(int *)(local_20 + 8) == 0) { *(int4 *)(local_20 + 8) = param_3; } } return; }
49,917
LefDefParser::defwIOTimingSlewrate(char const*, int, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwIOTimingSlewrate(const char *riseFall, int num1, int num2) { defwFunc = DEFW_IOTIMING; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (defwState != DEFW_IOTIMING) return DEFW_BAD_ORDER; if (strcmp(riseFall, "RISE") && strcmp(riseFall, "FALL")) return DEFW_BAD_DATA; fprintf(defwFile, " + %s SLEWRATE %d %d\n", riseFall, num1, num2); defwLines++; return DEFW_OK; }
O0
cpp
LefDefParser::defwIOTimingSlewrate(char const*, int, int): subq $0x18, %rsp movq %rdi, 0x8(%rsp) movl %esi, 0x4(%rsp) movl %edx, (%rsp) leaq 0xf451(%rip), %rax # 0x2b168 movl $0x41, (%rax) leaq 0xf434(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x1bd37 movl $0x1, 0x14(%rsp) jmp 0x1bdc5 leaq 0xf426(%rip), %rax # 0x2b164 cmpl $0x41, (%rax) je 0x1bd4d movl $0x2, 0x14(%rsp) jmp 0x1bdc5 movq 0x8(%rsp), %rdi leaq 0x9040(%rip), %rsi # 0x24d99 callq 0x10e0 cmpl $0x0, %eax je 0x1bd83 movq 0x8(%rsp), %rdi leaq 0x902f(%rip), %rsi # 0x24d9e callq 0x10e0 cmpl $0x0, %eax je 0x1bd83 movl $0x3, 0x14(%rsp) jmp 0x1bdc5 leaq 0xf3ce(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x8(%rsp), %rdx movl 0x4(%rsp), %ecx movl (%rsp), %r8d leaq 0x901d(%rip), %rsi # 0x24dbe movb $0x0, %al callq 0x10f0 leaq 0xf3b1(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0xf3a5(%rip), %rax # 0x2b160 movl %ecx, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nop
_ZN12LefDefParser20defwIOTimingSlewrateEPKcii: sub rsp, 18h mov [rsp+18h+var_10], rdi mov [rsp+18h+var_14], esi mov [rsp+18h+var_18], edx lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 41h ; 'A' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_1BD37 mov [rsp+18h+var_4], 1 jmp loc_1BDC5 loc_1BD37: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 41h ; 'A' jz short loc_1BD4D mov [rsp+18h+var_4], 2 jmp short loc_1BDC5 loc_1BD4D: mov rdi, [rsp+18h+var_10] lea rsi, aRise; "RISE" call _strcmp cmp eax, 0 jz short loc_1BD83 mov rdi, [rsp+18h+var_10] lea rsi, aFall; "FALL" call _strcmp cmp eax, 0 jz short loc_1BD83 mov [rsp+18h+var_4], 3 jmp short loc_1BDC5 loc_1BD83: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] mov ecx, [rsp+18h+var_14] mov r8d, [rsp+18h+var_18] lea rsi, aSSlewrateDD; " + %s SLEWRATE %d %d\n" mov al, 0 call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx mov [rsp+18h+var_4], 0 loc_1BDC5: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::defwIOTimingSlewrate(LefDefParser *this, const char *a2, int a3) { LefDefParser::defwFunc = 65; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState == 65 ) { if ( !(unsigned int)strcmp(this, "RISE") || !(unsigned int)strcmp(this, "FALL") ) { fprintf(LefDefParser::defwFile, " + %s SLEWRATE %d %d\n", (const char *)this, (_DWORD)a2, a3); ++LefDefParser::defwLines; return 0; } else { return 3; } } else { return 2; } } else { return 1; } }
defwIOTimingSlewrate: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV dword ptr [RSP + 0x4],ESI MOV dword ptr [RSP],EDX LEA RAX,[0x12b168] MOV dword ptr [RAX],0x41 LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x0011bd37 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0011bdc5 LAB_0011bd37: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x41 JZ 0x0011bd4d MOV dword ptr [RSP + 0x14],0x2 JMP 0x0011bdc5 LAB_0011bd4d: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x124d99] CALL 0x001010e0 CMP EAX,0x0 JZ 0x0011bd83 MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x124d9e] CALL 0x001010e0 CMP EAX,0x0 JZ 0x0011bd83 MOV dword ptr [RSP + 0x14],0x3 JMP 0x0011bdc5 LAB_0011bd83: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x4] MOV R8D,dword ptr [RSP] LEA RSI,[0x124dbe] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x14],0x0 LAB_0011bdc5: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::defwIOTimingSlewrate(char const*, int, int) */ int4 LefDefParser::defwIOTimingSlewrate(char *param_1,int param_2,int param_3) { int iVar1; int4 local_4; defwFunc = 0x41; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if (defwState == 0x41) { iVar1 = strcmp(param_1,"RISE"); if ((iVar1 != 0) && (iVar1 = strcmp(param_1,"FALL"), iVar1 != 0)) { return 3; } fprintf(defwFile," + %s SLEWRATE %d %d\n",param_1,(ulong)(uint)param_2,(ulong)(uint)param_3 ); defwLines = defwLines + 1; local_4 = 0; } else { local_4 = 2; } return local_4; }
49,918
google::protobuf::(anonymous namespace)::FieldSpaceUsed(google::protobuf::FieldDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/dynamic_message.cc
int FieldSpaceUsed(const FieldDescriptor* field) { typedef FieldDescriptor FD; // avoid line wrapping if (field->label() == FD::LABEL_REPEATED) { switch (field->cpp_type()) { case FD::CPPTYPE_INT32: return sizeof(RepeatedField<int32_t>); case FD::CPPTYPE_INT64: return sizeof(RepeatedField<int64_t>); case FD::CPPTYPE_UINT32: return sizeof(RepeatedField<uint32_t>); case FD::CPPTYPE_UINT64: return sizeof(RepeatedField<uint64_t>); case FD::CPPTYPE_DOUBLE: return sizeof(RepeatedField<double>); case FD::CPPTYPE_FLOAT: return sizeof(RepeatedField<float>); case FD::CPPTYPE_BOOL: return sizeof(RepeatedField<bool>); case FD::CPPTYPE_ENUM: return sizeof(RepeatedField<int>); case FD::CPPTYPE_MESSAGE: if (IsMapFieldInApi(field)) { return sizeof(DynamicMapField); } else { return sizeof(RepeatedPtrField<Message>); } case FD::CPPTYPE_STRING: switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: return sizeof(RepeatedPtrField<std::string>); } break; } } else { switch (field->cpp_type()) { case FD::CPPTYPE_INT32: return sizeof(int32_t); case FD::CPPTYPE_INT64: return sizeof(int64_t); case FD::CPPTYPE_UINT32: return sizeof(uint32_t); case FD::CPPTYPE_UINT64: return sizeof(uint64_t); case FD::CPPTYPE_DOUBLE: return sizeof(double); case FD::CPPTYPE_FLOAT: return sizeof(float); case FD::CPPTYPE_BOOL: return sizeof(bool); case FD::CPPTYPE_ENUM: return sizeof(int); case FD::CPPTYPE_MESSAGE: return sizeof(Message*); case FD::CPPTYPE_STRING: switch (field->options().ctype()) { default: // TODO(kenton): Support other string reps. case FieldOptions::STRING: return sizeof(ArenaStringPtr); } break; } } GOOGLE_LOG(DFATAL) << "Can't get here."; return 0; }
O0
cpp
google::protobuf::(anonymous namespace)::FieldSpaceUsed(google::protobuf::FieldDescriptor const*): subq $0x78, %rsp movq %rdi, 0x68(%rsp) movq 0x68(%rsp), %rdi callq 0x1be200 cmpl $0x3, %eax jne 0x3073cb movq 0x68(%rsp), %rdi callq 0x1badb0 decl %eax movl %eax, %ecx movq %rcx, 0x18(%rsp) subl $0x9, %eax ja 0x3073c6 movq 0x18(%rsp), %rax leaq 0xe8a28(%rip), %rcx # 0x3efd2c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x10, 0x74(%rsp) jmp 0x30750c movl $0x10, 0x74(%rsp) jmp 0x30750c movl $0x10, 0x74(%rsp) jmp 0x30750c movl $0x10, 0x74(%rsp) jmp 0x30750c movl $0x10, 0x74(%rsp) jmp 0x30750c movl $0x10, 0x74(%rsp) jmp 0x30750c movl $0x10, 0x74(%rsp) jmp 0x30750c movl $0x10, 0x74(%rsp) jmp 0x30750c movq 0x68(%rsp), %rdi callq 0x305980 testb $0x1, %al jne 0x307385 jmp 0x307392 movl $0x80, 0x74(%rsp) jmp 0x30750c movl $0x18, 0x74(%rsp) jmp 0x30750c movq 0x68(%rsp), %rdi callq 0x1bab40 movq %rax, %rdi callq 0x1bb850 testl %eax, %eax je 0x3073b9 jmp 0x3073b7 jmp 0x3073b9 movl $0x18, 0x74(%rsp) jmp 0x30750c jmp 0x307497 movq 0x68(%rsp), %rdi callq 0x1badb0 decl %eax movl %eax, %ecx movq %rcx, 0x10(%rsp) subl $0x9, %eax ja 0x307495 movq 0x10(%rsp), %rax leaq 0xe8911(%rip), %rcx # 0x3efd04 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0x4, 0x74(%rsp) jmp 0x30750c movl $0x8, 0x74(%rsp) jmp 0x30750c movl $0x4, 0x74(%rsp) jmp 0x30750c movl $0x8, 0x74(%rsp) jmp 0x30750c movl $0x8, 0x74(%rsp) jmp 0x30750c movl $0x4, 0x74(%rsp) jmp 0x30750c movl $0x1, 0x74(%rsp) jmp 0x30750c movl $0x4, 0x74(%rsp) jmp 0x30750c movl $0x8, 0x74(%rsp) jmp 0x30750c movq 0x68(%rsp), %rdi callq 0x1bab40 movq %rax, %rdi callq 0x1bb850 testl %eax, %eax je 0x30748b jmp 0x307489 jmp 0x30748b movl $0x8, 0x74(%rsp) jmp 0x30750c jmp 0x307497 leaq 0xe8908(%rip), %rdx # 0x3efda6 leaq 0x30(%rsp), %rdi movq %rdi, (%rsp) movl $0x2, %esi movl $0xc6, %ecx callq 0x19a670 movq (%rsp), %rdi leaq 0xdf8aa(%rip), %rsi # 0x3e6d6b callq 0x199f30 movq %rax, 0x8(%rsp) jmp 0x3074cd movq 0x8(%rsp), %rsi leaq 0x23(%rsp), %rdi callq 0x19a0e0 jmp 0x3074de leaq 0x30(%rsp), %rdi callq 0x19a6b0 movl $0x0, 0x74(%rsp) jmp 0x30750c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x30(%rsp), %rdi callq 0x19a6b0 jmp 0x307515 movl 0x74(%rsp), %eax addq $0x78, %rsp retq movq 0x28(%rsp), %rdi callq 0x90db0 nop
_ZN6google8protobuf12_GLOBAL__N_114FieldSpaceUsedEPKNS0_15FieldDescriptorE: sub rsp, 78h mov [rsp+78h+var_10], rdi mov rdi, [rsp+78h+var_10]; this call _ZNK6google8protobuf15FieldDescriptor5labelEv; google::protobuf::FieldDescriptor::label(void) cmp eax, 3 jnz loc_3073CB mov rdi, [rsp+78h+var_10]; this call _ZNK6google8protobuf15FieldDescriptor8cpp_typeEv; google::protobuf::FieldDescriptor::cpp_type(void) dec eax; switch 10 cases mov ecx, eax mov [rsp+78h+var_60], rcx sub eax, 9 ja def_30730B; jumptable 000000000030730B default case mov rax, [rsp+78h+var_60] lea rcx, jpt_30730B movsxd rax, ds:(jpt_30730B - 3EFD2Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_30730D: mov [rsp+78h+var_4], 10h; jumptable 000000000030730B case 1 jmp loc_30750C loc_30731A: mov [rsp+78h+var_4], 10h; jumptable 000000000030730B case 2 jmp loc_30750C loc_307327: mov [rsp+78h+var_4], 10h; jumptable 000000000030730B case 3 jmp loc_30750C loc_307334: mov [rsp+78h+var_4], 10h; jumptable 000000000030730B case 4 jmp loc_30750C loc_307341: mov [rsp+78h+var_4], 10h; jumptable 000000000030730B case 5 jmp loc_30750C loc_30734E: mov [rsp+78h+var_4], 10h; jumptable 000000000030730B case 6 jmp loc_30750C loc_30735B: mov [rsp+78h+var_4], 10h; jumptable 000000000030730B case 7 jmp loc_30750C loc_307368: mov [rsp+78h+var_4], 10h; jumptable 000000000030730B case 8 jmp loc_30750C loc_307375: mov rdi, [rsp+78h+var_10]; jumptable 000000000030730B case 10 call _ZN6google8protobuf12_GLOBAL__N_115IsMapFieldInApiEPKNS0_15FieldDescriptorE_0; google::protobuf::`anonymous namespace'::IsMapFieldInApi(google::protobuf::FieldDescriptor const*) test al, 1 jnz short loc_307385 jmp short loc_307392 loc_307385: mov [rsp+78h+var_4], 80h jmp loc_30750C loc_307392: mov [rsp+78h+var_4], 18h jmp loc_30750C loc_30739F: mov rdi, [rsp+78h+var_10]; jumptable 000000000030730B case 9 call _ZNK6google8protobuf15FieldDescriptor7optionsEv; google::protobuf::FieldDescriptor::options(void) mov rdi, rax; this call _ZNK6google8protobuf12FieldOptions5ctypeEv; google::protobuf::FieldOptions::ctype(void) test eax, eax jz short loc_3073B9 jmp short $+2 loc_3073B7: jmp short $+2 loc_3073B9: mov [rsp+78h+var_4], 18h jmp loc_30750C def_30730B: jmp loc_307497; jumptable 000000000030730B default case loc_3073CB: mov rdi, [rsp+78h+var_10]; this call _ZNK6google8protobuf15FieldDescriptor8cpp_typeEv; google::protobuf::FieldDescriptor::cpp_type(void) dec eax; switch 10 cases mov ecx, eax mov [rsp+78h+var_68], rcx sub eax, 9 ja def_3073FA; jumptable 00000000003073FA default case mov rax, [rsp+78h+var_68] lea rcx, jpt_3073FA movsxd rax, ds:(jpt_3073FA - 3EFD04h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_3073FC: mov [rsp+78h+var_4], 4; jumptable 00000000003073FA case 1 jmp loc_30750C loc_307409: mov [rsp+78h+var_4], 8; jumptable 00000000003073FA case 2 jmp loc_30750C loc_307416: mov [rsp+78h+var_4], 4; jumptable 00000000003073FA case 3 jmp loc_30750C loc_307423: mov [rsp+78h+var_4], 8; jumptable 00000000003073FA case 4 jmp loc_30750C loc_307430: mov [rsp+78h+var_4], 8; jumptable 00000000003073FA case 5 jmp loc_30750C loc_30743D: mov [rsp+78h+var_4], 4; jumptable 00000000003073FA case 6 jmp loc_30750C loc_30744A: mov [rsp+78h+var_4], 1; jumptable 00000000003073FA case 7 jmp loc_30750C loc_307457: mov [rsp+78h+var_4], 4; jumptable 00000000003073FA case 8 jmp loc_30750C loc_307464: mov [rsp+78h+var_4], 8; jumptable 00000000003073FA case 10 jmp loc_30750C loc_307471: mov rdi, [rsp+78h+var_10]; jumptable 00000000003073FA case 9 call _ZNK6google8protobuf15FieldDescriptor7optionsEv; google::protobuf::FieldDescriptor::options(void) mov rdi, rax; this call _ZNK6google8protobuf12FieldOptions5ctypeEv; google::protobuf::FieldOptions::ctype(void) test eax, eax jz short loc_30748B jmp short $+2 loc_307489: jmp short $+2 loc_30748B: mov [rsp+78h+var_4], 8 jmp short loc_30750C def_3073FA: jmp short $+2; jumptable 00000000003073FA default case loc_307497: lea rdx, aWorkspaceLlm4b_58; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+78h+var_48] mov [rsp+78h+var_78], rdi mov esi, 2 mov ecx, 0C6h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+78h+var_78] lea rsi, aCanTGetHere; "Can't get here." call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+78h+var_70], rax jmp short $+2 loc_3074CD: mov rsi, [rsp+78h+var_70] lea rdi, [rsp+78h+var_55] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_3074DE: lea rdi, [rsp+78h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov [rsp+78h+var_4], 0 jmp short loc_30750C mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_28]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() jmp short loc_307515 loc_30750C: mov eax, [rsp+78h+var_4] add rsp, 78h retn loc_307515: mov rdi, [rsp+arg_20] call __Unwind_Resume
long long google::protobuf::`anonymous namespace'::FieldSpaceUsed( google::protobuf::_anonymous_namespace_ *this, const google::protobuf::FieldDescriptor *a2) { google::protobuf::FieldOptions *v2; // rax google::protobuf::FieldOptions *v3; // rax google::protobuf::internal::LogMessage *v5; // [rsp+8h] [rbp-70h] _BYTE v6[13]; // [rsp+23h] [rbp-55h] BYREF _BYTE v7[56]; // [rsp+30h] [rbp-48h] BYREF google::protobuf::FieldDescriptor *v8; // [rsp+68h] [rbp-10h] unsigned int v9; // [rsp+74h] [rbp-4h] v8 = this; if ( (unsigned int)google::protobuf::FieldDescriptor::label(this) == 3 ) { switch ( (unsigned int)google::protobuf::FieldDescriptor::cpp_type(v8) ) { case 1u: v9 = 16; break; case 2u: v9 = 16; break; case 3u: v9 = 16; break; case 4u: v9 = 16; break; case 5u: v9 = 16; break; case 6u: v9 = 16; break; case 7u: v9 = 16; break; case 8u: v9 = 16; break; case 9u: v2 = (google::protobuf::FieldOptions *)google::protobuf::FieldDescriptor::options(v8); google::protobuf::FieldOptions::ctype(v2); v9 = 24; break; case 0xAu: if ( (google::protobuf::`anonymous namespace'::IsMapFieldInApi(v8, a2) & 1) != 0 ) v9 = 128; else v9 = 24; break; default: goto LABEL_26; } } else { switch ( (unsigned int)google::protobuf::FieldDescriptor::cpp_type(v8) ) { case 1u: v9 = 4; break; case 2u: v9 = 8; break; case 3u: v9 = 4; break; case 4u: v9 = 8; break; case 5u: v9 = 8; break; case 6u: v9 = 4; break; case 7u: v9 = 1; break; case 8u: v9 = 4; break; case 9u: v3 = (google::protobuf::FieldOptions *)google::protobuf::FieldDescriptor::options(v8); google::protobuf::FieldOptions::ctype(v3); v9 = 8; break; case 0xAu: v9 = 8; break; default: LABEL_26: google::protobuf::internal::LogMessage::LogMessage( (long long)v7, 2, (long long)"/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/dynamic_message.cc", 198); v5 = (google::protobuf::internal::LogMessage *)google::protobuf::internal::LogMessage::operator<<( (long long)v7, (long long)"Can't get here."); google::protobuf::internal::LogFinisher::operator=((long long)v6, v5); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v7); v9 = 0; break; } } return v9; }
__iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP],RAX MOV RSI,qword ptr [RSP] LEA RDI,[RSP + 0x10] CALL 0x0030ac40 MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0x18 RET
/* __gnu_cxx::__ops::_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator> __gnu_cxx::__ops::__iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>(google::protobuf::DynamicMapSorter::MapEntryMessageComparator) */ int8 __gnu_cxx::__ops::__iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator> (int8 param_1) { int8 local_8; _Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator>::_Iter_comp_iter ((_Iter_comp_iter<google::protobuf::DynamicMapSorter::MapEntryMessageComparator> *) &local_8,param_1); return local_8; }
49,919
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>::empty() const
monkey531[P]llama/common/json.hpp
bool empty() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return true; } case value_t::array: { // delegate call to array_t::empty() return m_data.m_value.array->empty(); } case value_t::object: { // delegate call to object_t::empty() return m_data.m_value.object->empty(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types are nonempty return false; } } }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::empty() const: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movzbl (%rax), %eax movq %rax, 0x10(%rsp) subq $0x9, %rax ja 0x11777b movq 0x10(%rsp), %rax leaq 0xfa5d7(%rip), %rcx # 0x211d14 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movb $0x1, 0x27(%rsp) jmp 0x117780 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0xb7300 andb $0x1, %al movb %al, 0x27(%rsp) jmp 0x117780 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0x117850 andb $0x1, %al movb %al, 0x27(%rsp) jmp 0x117780 jmp 0x11777b movb $0x0, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopl (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rax, [rsp+28h+var_10] mov [rsp+28h+var_20], rax movzx eax, byte ptr [rax] mov [rsp+28h+var_18], rax sub rax, 9; switch 10 cases ja short def_117744; jumptable 0000000000117744 default case mov rax, [rsp+28h+var_18] lea rcx, jpt_117744 movsxd rax, ds:(jpt_117744 - 211D14h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_117746: mov [rsp+28h+var_1], 1; jumptable 0000000000117744 case 0 jmp short loc_117780 loc_11774D: mov rax, [rsp+28h+var_20]; jumptable 0000000000117744 case 2 mov rdi, [rax+8] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE5emptyEv; 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>>::empty(void) and al, 1 mov [rsp+28h+var_1], al jmp short loc_117780 loc_117763: mov rax, [rsp+28h+var_20]; jumptable 0000000000117744 case 1 mov rdi, [rax+8] call _ZNKSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE5emptyEv; 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>>>::empty(void) and al, 1 mov [rsp+28h+var_1], al jmp short loc_117780 loc_117779: jmp short $+2; jumptable 0000000000117744 cases 3-9 def_117744: mov [rsp+28h+var_1], 0; jumptable 0000000000117744 default case loc_117780: mov al, [rsp+28h+var_1] and al, 1 add rsp, 28h retn
char nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::empty( long long a1) { char v2; // [rsp+27h] [rbp-1h] switch ( *(_BYTE *)a1 ) { case 0: v2 = 1; break; case 1: v2 = 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>>>::empty(*(_QWORD *)(a1 + 8)) & 1; break; case 2: v2 = 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>>::empty(*(_QWORD *)(a1 + 8)) & 1; break; default: v2 = 0; break; } return v2; }
49,920
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>::empty() const
monkey531[P]llama/common/json.hpp
bool empty() const noexcept { switch (m_data.m_type) { case value_t::null: { // null values are empty return true; } case value_t::array: { // delegate call to array_t::empty() return m_data.m_value.array->empty(); } case value_t::object: { // delegate call to object_t::empty() return m_data.m_value.object->empty(); } case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { // all other types are nonempty return false; } } }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::empty() const: movzbl (%rdi), %eax testl %eax, %eax je 0x6480c cmpl $0x1, %eax je 0x647fd cmpl $0x2, %eax jne 0x6480f movq 0x8(%rdi), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx sete %al retq movb $0x1, %al retq xorl %eax, %eax retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5emptyEv: movzx eax, byte ptr [rdi] test eax, eax jz short loc_6480C cmp eax, 1 jz short loc_647FD cmp eax, 2 jnz short loc_6480F loc_647FD: mov rax, [rdi+8] mov rcx, [rax] cmp rcx, [rax+8] setz al retn loc_6480C: mov al, 1 retn loc_6480F: xor eax, eax retn
bool 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>::empty( unsigned __int8 *a1) { int v1; // eax v1 = *a1; if ( !*a1 ) return 1; if ( v1 == 1 || v1 == 2 ) return **((_QWORD **)a1 + 1) == *(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL); return 0; }
empty: MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JZ 0x0016480c CMP EAX,0x1 JZ 0x001647fd CMP EAX,0x2 JNZ 0x0016480f LAB_001647fd: MOV RAX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] SETZ AL RET LAB_0016480c: MOV AL,0x1 RET LAB_0016480f: XOR EAX,EAX RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::empty() const */ int8 __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> ::empty(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> bVar1; long *plVar2; bVar1 = *this; if (bVar1 == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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) { return 1; } if ((bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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) && (bVar1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2)) { return 0; } plVar2 = *(long **)(this + 8); return CONCAT71((int7)((ulong)plVar2 >> 8),*plVar2 == plVar2[1]); }
49,921
rw_pr_wrlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_wrlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); if (rwlock->active_readers != 0) { /* There are active readers. We have to wait until they are gone. */ rwlock->writers_waiting_readers++; while (rwlock->active_readers != 0) pthread_cond_wait(&rwlock->no_active_readers, &rwlock->lock); rwlock->writers_waiting_readers--; } /* We own 'lock' mutex so there is no active writers. Also there are no active readers. This means that we can grant wr-lock. Not releasing 'lock' mutex until unlock will block both requests for rd and wr-locks. Set 'active_writer' flag to simplify unlock. Thanks to the fact wr-lock/unlock in the absence of contention from readers is essentially mutex lock/unlock with a few simple checks make this rwlock implementation wr-lock optimized. */ rwlock->active_writer= TRUE; #ifdef SAFE_MUTEX rwlock->writer_thread= pthread_self(); #endif return 0; }
O3
c
rw_pr_wrlock: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x5f2e0 cmpl $0x0, 0x58(%rbx) je 0x9f3a5 incl 0x5c(%rbx) leaq 0x28(%rbx), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x5f5a0 cmpl $0x0, 0x58(%rbx) jne 0x9f391 decl 0x5c(%rbx) movb $0x1, 0x60(%rbx) xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
rw_pr_wrlock: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi call _pthread_mutex_lock cmp dword ptr [rbx+58h], 0 jz short loc_9F3A5 inc dword ptr [rbx+5Ch] lea r14, [rbx+28h] loc_9F391: mov rdi, r14 mov rsi, rbx call _pthread_cond_wait cmp dword ptr [rbx+58h], 0 jnz short loc_9F391 dec dword ptr [rbx+5Ch] loc_9F3A5: mov byte ptr [rbx+60h], 1 xor eax, eax pop rbx pop r14 pop rbp retn
long long rw_pr_wrlock(long long a1) { pthread_mutex_lock(a1); if ( *(_DWORD *)(a1 + 88) ) { ++*(_DWORD *)(a1 + 92); do pthread_cond_wait(a1 + 40, a1); while ( *(_DWORD *)(a1 + 88) ); --*(_DWORD *)(a1 + 92); } *(_BYTE *)(a1 + 96) = 1; return 0LL; }
rw_pr_wrlock: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CALL 0x0015f2e0 CMP dword ptr [RBX + 0x58],0x0 JZ 0x0019f3a5 INC dword ptr [RBX + 0x5c] LEA R14,[RBX + 0x28] LAB_0019f391: MOV RDI,R14 MOV RSI,RBX CALL 0x0015f5a0 CMP dword ptr [RBX + 0x58],0x0 JNZ 0x0019f391 DEC dword ptr [RBX + 0x5c] LAB_0019f3a5: MOV byte ptr [RBX + 0x60],0x1 XOR EAX,EAX POP RBX POP R14 POP RBP RET
int8 rw_pr_wrlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); if (*(int *)((long)param_1 + 0x58) != 0) { *(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + 1; do { pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1); } while (*(int *)((long)param_1 + 0x58) != 0); *(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + -1; } *(int1 *)((long)param_1 + 0x60) = 1; return 0; }
49,922
my_casedn_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_casedn_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int srcres, dstres; const char *srcend= src + srclen; char *dstend= dst + dstlen, *dst0= dst; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->casedn_multiply == 1); while ((src < srcend) && (srcres= my_mb_wc_utf8mb4(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0) { my_tolower_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O0
c
my_casedn_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x58(%rbp) jmp 0x64dea jmp 0x64dec movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x59(%rbp) jae 0x64e1c movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x64960 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x64e25 jmp 0x64e78 movq -0x58(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x68dc0 movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x48(%rbp), %rcx callq 0x64990 movl %eax, -0x38(%rbp) cmpl $0x0, %eax jg 0x64e51 jmp 0x64e78 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x38(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0x64dec movq -0x20(%rbp), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_casedn_utf8mb4: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov [rbp+var_50], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_58], rax jmp short $+2 loc_64DEA: jmp short $+2 loc_64DEC: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_59], al jnb short loc_64E1C mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4 mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_59], al loc_64E1C: mov al, [rbp+var_59] test al, 1 jnz short loc_64E25 jmp short loc_64E78 loc_64E25: mov rdi, [rbp+var_58] lea rsi, [rbp+var_30] call my_tolower_utf8mb4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] mov rcx, [rbp+var_48] call my_wc_mb_utf8mb4 mov [rbp+var_38], eax cmp eax, 0 jg short loc_64E51 jmp short loc_64E78 loc_64E51: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_38] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax jmp loc_64DEC loc_64E78: mov rax, [rbp+var_20] mov rcx, [rbp+var_50] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * my_casedn_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6) { bool v7; // [rsp+7h] [rbp-59h] long long v8; // [rsp+8h] [rbp-58h] unsigned long long v10; // [rsp+18h] [rbp-48h] unsigned long long v11; // [rsp+20h] [rbp-40h] int v12; // [rsp+28h] [rbp-38h] int v13; // [rsp+2Ch] [rbp-34h] unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF _BYTE *v15; // [rsp+40h] [rbp-20h] long long v16; // [rsp+48h] [rbp-18h] unsigned long long v17; // [rsp+50h] [rbp-10h] long long v18; // [rsp+58h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14[1] = a5; v11 = a3 + a2; v10 = (unsigned long long)&a4[a5]; v8 = *(_QWORD *)(a1 + 120); while ( 1 ) { v7 = 0; if ( v17 < v11 ) { v13 = my_mb_wc_utf8mb4(v18, (long long)v14, v17, v11, a5, a6); v7 = v13 > 0; } if ( !v7 ) break; my_tolower_utf8mb4(v8, v14); v12 = my_wc_mb_utf8mb4(v18, v14[0], v15, v10); if ( v12 <= 0 ) break; v17 += v13; v15 += v12; } return (_BYTE *)(v15 - a4); }
my_casedn_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x58],RAX JMP 0x00164dea LAB_00164dea: JMP 0x00164dec LAB_00164dec: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x59],AL JNC 0x00164e1c MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x00164960 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x59],AL LAB_00164e1c: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x00164e25 JMP 0x00164e78 LAB_00164e25: MOV RDI,qword ptr [RBP + -0x58] LEA RSI,[RBP + -0x30] CALL 0x00168dc0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x48] CALL 0x00164990 MOV dword ptr [RBP + -0x38],EAX CMP EAX,0x0 JG 0x00164e51 JMP 0x00164e78 LAB_00164e51: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x00164dec LAB_00164e78: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_casedn_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5) { int8 uVar1; bool bVar2; int iVar3; int local_3c; int8 local_38; long local_30; long local_28; long local_20; ulong local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (local_18 < param_2 + param_3) { local_3c = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3); bVar2 = 0 < local_3c; } if (!bVar2) break; my_tolower_utf8mb4(uVar1,&local_38); iVar3 = my_wc_mb_utf8mb4(local_10,local_38,local_28,param_4 + param_5); if (iVar3 < 1) break; local_18 = local_18 + (long)local_3c; local_28 = local_28 + iVar3; } return local_28 - param_4; }
49,923
read_block_secondary
eloqsql/mysys/mf_keycache.c
static void read_block_secondary(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block) { KEYCACHE_THREAD_TRACE("read_block_secondary"); /* This code is executed only by threads that submitted secondary requests. At this point it could happen that the cache block is not yet assigned to the hash_link for the requested file block. But at awake from the wait this should be the case. Unfortunately we cannot assert this here because we do not know the hash_link for the requested file block nor the file and position. So we have to assert this in the caller. */ KEYCACHE_DBUG_PRINT("read_block_secondary", ("secondary request waiting for new page to be read")); wait_on_queue(&block->wqueue[COND_FOR_REQUESTED], &keycache->cache_lock); KEYCACHE_DBUG_PRINT("read_block_secondary", ("secondary request: new page in cache")); DBUG_ASSERT(keycache->can_be_used); DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); }
O0
c
read_block_secondary: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xe4182 movq -0x10(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi addq $0xc0, %rsi callq 0xe3660 jmp 0xe419c jmp 0xe419e jmp 0xe41a0 jmp 0xe41a2 jmp 0xe41a4 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
read_block_secondary: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_E4182: mov rdi, [rbp+var_10] add rdi, 28h ; '(' mov rsi, [rbp+var_8] add rsi, 0C0h call wait_on_queue jmp short $+2 loc_E419C: jmp short $+2 loc_E419E: jmp short $+2 loc_E41A0: jmp short $+2 loc_E41A2: jmp short $+2 loc_E41A4: add rsp, 10h pop rbp retn
long long read_block_secondary(long long a1, long long a2) { return wait_on_queue((long long *)(a2 + 40), (const char *)(a1 + 192)); }
read_block_secondary: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001e4182 LAB_001e4182: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc0 CALL 0x001e3660 JMP 0x001e419c LAB_001e419c: JMP 0x001e419e LAB_001e419e: JMP 0x001e41a0 LAB_001e41a0: JMP 0x001e41a2 LAB_001e41a2: JMP 0x001e41a4 LAB_001e41a4: ADD RSP,0x10 POP RBP RET
void read_block_secondary(long param_1,long param_2) { wait_on_queue(param_2 + 0x28,param_1 + 0xc0); return; }
49,924
Encoder::Encoder()
7CodeWizard[P]stablediffusion/vae.hpp
Encoder() { int len_mults = sizeof(ch_mult) / sizeof(int); int block_in = 1; for (int i = 0; i < len_mults; i++) { if (i == 0) { block_in = ch; } else { block_in = ch * ch_mult[i - 1]; } int block_out = ch * ch_mult[i]; for (int j = 0; j < num_res_blocks; j++) { down_blocks[i][j].in_channels = block_in; down_blocks[i][j].out_channels = block_out; block_in = block_out; } if (i != len_mults - 1) { down_samples[i].channels = block_in; down_samples[i].out_channels = block_in; down_samples[i].vae_downsample = true; } } mid.block_1.in_channels = block_in; mid.block_1.out_channels = block_in; mid.attn_1.in_channels = block_in; mid.block_2.in_channels = block_in; mid.block_2.out_channels = block_in; }
O0
cpp
Encoder::Encoder(): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x4, (%rax) movl $0x80, 0x4(%rax) movl $0x4, 0x8(%rax) movl $0x3, 0xc(%rax) movl $0x2, 0x10(%rax) movl $0x1, 0x14(%rax) movl $0x2, 0x18(%rax) movl $0x4, 0x1c(%rax) movl $0x4, 0x20(%rax) addq $0x2f8, %rax # imm = 0x2F8 movq %rax, %rcx addq $0x60, %rcx movq %rcx, 0x18(%rsp) movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x456d0 movq 0x8(%rsp), %rax movq 0x18(%rsp), %rcx addq $0x20, %rax cmpq %rcx, %rax movq %rax, 0x20(%rsp) jne 0x491d8 movl $0x4, 0x3c(%rsp) movl $0x1, 0x38(%rsp) movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax cmpl 0x3c(%rsp), %eax jge 0x4935e cmpl $0x0, 0x34(%rsp) jne 0x4923a movq 0x10(%rsp), %rax movl 0x4(%rax), %eax movl %eax, 0x38(%rsp) jmp 0x49255 movq 0x10(%rsp), %rcx movl 0x4(%rcx), %eax movl 0x34(%rsp), %edx subl $0x1, %edx movslq %edx, %rdx imull 0x14(%rcx,%rdx,4), %eax movl %eax, 0x38(%rsp) movq 0x10(%rsp), %rcx movl 0x4(%rcx), %eax movslq 0x34(%rsp), %rdx imull 0x14(%rcx,%rdx,4), %eax movl %eax, 0x30(%rsp) movl $0x0, 0x2c(%rsp) movq 0x10(%rsp), %rcx movl 0x2c(%rsp), %eax cmpl 0x10(%rcx), %eax jge 0x492e9 movq 0x10(%rsp), %rax movl 0x38(%rsp), %edx movq %rax, %rcx addq $0x38, %rcx movslq 0x34(%rsp), %rsi imulq $0xb0, %rsi, %rsi addq %rsi, %rcx movslq 0x2c(%rsp), %rsi imulq $0x58, %rsi, %rsi addq %rsi, %rcx movl %edx, (%rcx) movl 0x30(%rsp), %ecx addq $0x38, %rax movslq 0x34(%rsp), %rdx imulq $0xb0, %rdx, %rdx addq %rdx, %rax movslq 0x2c(%rsp), %rdx imulq $0x58, %rdx, %rdx addq %rdx, %rax movl %ecx, 0x4(%rax) movl 0x30(%rsp), %eax movl %eax, 0x38(%rsp) movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x49273 movl 0x34(%rsp), %eax movl 0x3c(%rsp), %ecx subl $0x1, %ecx cmpl %ecx, %eax je 0x4934c movq 0x10(%rsp), %rax movl 0x38(%rsp), %edx movq %rax, %rcx addq $0x2f8, %rcx # imm = 0x2F8 movslq 0x34(%rsp), %rsi shlq $0x5, %rsi addq %rsi, %rcx movl %edx, (%rcx) movl 0x38(%rsp), %edx movq %rax, %rcx addq $0x2f8, %rcx # imm = 0x2F8 movslq 0x34(%rsp), %rsi shlq $0x5, %rsi addq %rsi, %rcx movl %edx, 0x4(%rcx) addq $0x2f8, %rax # imm = 0x2F8 movslq 0x34(%rsp), %rcx shlq $0x5, %rcx addq %rcx, %rax movb $0x1, 0x18(%rax) jmp 0x4934e movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) jmp 0x49217 movq 0x10(%rsp), %rax movl 0x38(%rsp), %ecx movl %ecx, 0x358(%rax) movl 0x38(%rsp), %ecx movl %ecx, 0x35c(%rax) movl 0x38(%rsp), %ecx movl %ecx, 0x3b0(%rax) movl 0x38(%rsp), %ecx movl %ecx, 0x408(%rax) movl 0x38(%rsp), %ecx movl %ecx, 0x40c(%rax) addq $0x48, %rsp retq nopw (%rax,%rax)
_ZN7EncoderC2Ev: sub rsp, 48h mov [rsp+48h+var_8], rdi mov rax, [rsp+48h+var_8] mov [rsp+48h+var_38], rax mov dword ptr [rax], 4 mov dword ptr [rax+4], 80h mov dword ptr [rax+8], 4 mov dword ptr [rax+0Ch], 3 mov dword ptr [rax+10h], 2 mov dword ptr [rax+14h], 1 mov dword ptr [rax+18h], 2 mov dword ptr [rax+1Ch], 4 mov dword ptr [rax+20h], 4 add rax, 2F8h mov rcx, rax add rcx, 60h ; '`' mov [rsp+48h+var_30], rcx mov [rsp+48h+var_28], rax loc_491D8: mov rdi, [rsp+48h+var_28]; this mov [rsp+48h+var_40], rdi call _ZN10DownSampleC2Ev; DownSample::DownSample(void) mov rax, [rsp+48h+var_40] mov rcx, [rsp+48h+var_30] add rax, 20h ; ' ' cmp rax, rcx mov [rsp+48h+var_28], rax jnz short loc_491D8 mov [rsp+48h+var_C], 4 mov [rsp+48h+var_10], 1 mov [rsp+48h+var_14], 0 loc_49217: mov eax, [rsp+48h+var_14] cmp eax, [rsp+48h+var_C] jge loc_4935E cmp [rsp+48h+var_14], 0 jnz short loc_4923A mov rax, [rsp+48h+var_38] mov eax, [rax+4] mov [rsp+48h+var_10], eax jmp short loc_49255 loc_4923A: mov rcx, [rsp+48h+var_38] mov eax, [rcx+4] mov edx, [rsp+48h+var_14] sub edx, 1 movsxd rdx, edx imul eax, [rcx+rdx*4+14h] mov [rsp+48h+var_10], eax loc_49255: mov rcx, [rsp+48h+var_38] mov eax, [rcx+4] movsxd rdx, [rsp+48h+var_14] imul eax, [rcx+rdx*4+14h] mov [rsp+48h+var_18], eax mov [rsp+48h+var_1C], 0 loc_49273: mov rcx, [rsp+48h+var_38] mov eax, [rsp+48h+var_1C] cmp eax, [rcx+10h] jge short loc_492E9 mov rax, [rsp+48h+var_38] mov edx, [rsp+48h+var_10] mov rcx, rax add rcx, 38h ; '8' movsxd rsi, [rsp+48h+var_14] imul rsi, 0B0h add rcx, rsi movsxd rsi, [rsp+48h+var_1C] imul rsi, 58h ; 'X' add rcx, rsi mov [rcx], edx mov ecx, [rsp+48h+var_18] add rax, 38h ; '8' movsxd rdx, [rsp+48h+var_14] imul rdx, 0B0h add rax, rdx movsxd rdx, [rsp+48h+var_1C] imul rdx, 58h ; 'X' add rax, rdx mov [rax+4], ecx mov eax, [rsp+48h+var_18] mov [rsp+48h+var_10], eax mov eax, [rsp+48h+var_1C] add eax, 1 mov [rsp+48h+var_1C], eax jmp short loc_49273 loc_492E9: mov eax, [rsp+48h+var_14] mov ecx, [rsp+48h+var_C] sub ecx, 1 cmp eax, ecx jz short loc_4934C mov rax, [rsp+48h+var_38] mov edx, [rsp+48h+var_10] mov rcx, rax add rcx, 2F8h movsxd rsi, [rsp+48h+var_14] shl rsi, 5 add rcx, rsi mov [rcx], edx mov edx, [rsp+48h+var_10] mov rcx, rax add rcx, 2F8h movsxd rsi, [rsp+48h+var_14] shl rsi, 5 add rcx, rsi mov [rcx+4], edx add rax, 2F8h movsxd rcx, [rsp+48h+var_14] shl rcx, 5 add rax, rcx mov byte ptr [rax+18h], 1 loc_4934C: jmp short $+2 loc_4934E: mov eax, [rsp+48h+var_14] add eax, 1 mov [rsp+48h+var_14], eax jmp loc_49217 loc_4935E: mov rax, [rsp+48h+var_38] mov ecx, [rsp+48h+var_10] mov [rax+358h], ecx mov ecx, [rsp+48h+var_10] mov [rax+35Ch], ecx mov ecx, [rsp+48h+var_10] mov [rax+3B0h], ecx mov ecx, [rsp+48h+var_10] mov [rax+408h], ecx mov ecx, [rsp+48h+var_10] mov [rax+40Ch], ecx add rsp, 48h retn
void Encoder::Encoder(Encoder *this) { DownSample *v1; // [rsp+20h] [rbp-28h] int j; // [rsp+2Ch] [rbp-1Ch] int v3; // [rsp+30h] [rbp-18h] int i; // [rsp+34h] [rbp-14h] int v5; // [rsp+38h] [rbp-10h] *(_DWORD *)this = 4; *((_DWORD *)this + 1) = 128; *((_DWORD *)this + 2) = 4; *((_DWORD *)this + 3) = 3; *((_DWORD *)this + 4) = 2; *((_DWORD *)this + 5) = 1; *((_DWORD *)this + 6) = 2; *((_DWORD *)this + 7) = 4; *((_DWORD *)this + 8) = 4; v1 = (Encoder *)((char *)this + 760); do { DownSample::DownSample(v1); v1 = (DownSample *)((char *)v1 + 32); } while ( v1 != (Encoder *)((char *)this + 856) ); v5 = 1; for ( i = 0; i < 4; ++i ) { if ( i ) v5 = *((_DWORD *)this + i + 4) * *((_DWORD *)this + 1); else v5 = *((_DWORD *)this + 1); v3 = *((_DWORD *)this + i + 5) * *((_DWORD *)this + 1); for ( j = 0; j < *((_DWORD *)this + 4); ++j ) { *((_DWORD *)this + 44 * i + 22 * j + 14) = v5; *((_DWORD *)this + 44 * i + 22 * j + 15) = v3; v5 = v3; } if ( i != 3 ) { *((_DWORD *)this + 8 * i + 190) = v5; *((_DWORD *)this + 8 * i + 191) = v5; *((_BYTE *)this + 32 * i + 784) = 1; } } *((_DWORD *)this + 214) = v5; *((_DWORD *)this + 215) = v5; *((_DWORD *)this + 236) = v5; *((_DWORD *)this + 258) = v5; *((_DWORD *)this + 259) = v5; }
Encoder: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RAX],0x4 MOV dword ptr [RAX + 0x4],0x80 MOV dword ptr [RAX + 0x8],0x4 MOV dword ptr [RAX + 0xc],0x3 MOV dword ptr [RAX + 0x10],0x2 MOV dword ptr [RAX + 0x14],0x1 MOV dword ptr [RAX + 0x18],0x2 MOV dword ptr [RAX + 0x1c],0x4 MOV dword ptr [RAX + 0x20],0x4 ADD RAX,0x2f8 MOV RCX,RAX ADD RCX,0x60 MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x20],RAX LAB_001491d8: MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RDI CALL 0x001456d0 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x18] ADD RAX,0x20 CMP RAX,RCX MOV qword ptr [RSP + 0x20],RAX JNZ 0x001491d8 MOV dword ptr [RSP + 0x3c],0x4 MOV dword ptr [RSP + 0x38],0x1 MOV dword ptr [RSP + 0x34],0x0 LAB_00149217: MOV EAX,dword ptr [RSP + 0x34] CMP EAX,dword ptr [RSP + 0x3c] JGE 0x0014935e CMP dword ptr [RSP + 0x34],0x0 JNZ 0x0014923a MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0x38],EAX JMP 0x00149255 LAB_0014923a: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RCX + 0x4] MOV EDX,dword ptr [RSP + 0x34] SUB EDX,0x1 MOVSXD RDX,EDX IMUL EAX,dword ptr [RCX + RDX*0x4 + 0x14] MOV dword ptr [RSP + 0x38],EAX LAB_00149255: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RCX + 0x4] MOVSXD RDX,dword ptr [RSP + 0x34] IMUL EAX,dword ptr [RCX + RDX*0x4 + 0x14] MOV dword ptr [RSP + 0x30],EAX MOV dword ptr [RSP + 0x2c],0x0 LAB_00149273: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0x2c] CMP EAX,dword ptr [RCX + 0x10] JGE 0x001492e9 MOV RAX,qword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0x38] MOV RCX,RAX ADD RCX,0x38 MOVSXD RSI,dword ptr [RSP + 0x34] IMUL RSI,RSI,0xb0 ADD RCX,RSI MOVSXD RSI,dword ptr [RSP + 0x2c] IMUL RSI,RSI,0x58 ADD RCX,RSI MOV dword ptr [RCX],EDX MOV ECX,dword ptr [RSP + 0x30] ADD RAX,0x38 MOVSXD RDX,dword ptr [RSP + 0x34] IMUL RDX,RDX,0xb0 ADD RAX,RDX MOVSXD RDX,dword ptr [RSP + 0x2c] IMUL RDX,RDX,0x58 ADD RAX,RDX MOV dword ptr [RAX + 0x4],ECX MOV EAX,dword ptr [RSP + 0x30] MOV dword ptr [RSP + 0x38],EAX MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x00149273 LAB_001492e9: MOV EAX,dword ptr [RSP + 0x34] MOV ECX,dword ptr [RSP + 0x3c] SUB ECX,0x1 CMP EAX,ECX JZ 0x0014934c MOV RAX,qword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0x38] MOV RCX,RAX ADD RCX,0x2f8 MOVSXD RSI,dword ptr [RSP + 0x34] SHL RSI,0x5 ADD RCX,RSI MOV dword ptr [RCX],EDX MOV EDX,dword ptr [RSP + 0x38] MOV RCX,RAX ADD RCX,0x2f8 MOVSXD RSI,dword ptr [RSP + 0x34] SHL RSI,0x5 ADD RCX,RSI MOV dword ptr [RCX + 0x4],EDX ADD RAX,0x2f8 MOVSXD RCX,dword ptr [RSP + 0x34] SHL RCX,0x5 ADD RAX,RCX MOV byte ptr [RAX + 0x18],0x1 LAB_0014934c: JMP 0x0014934e LAB_0014934e: MOV EAX,dword ptr [RSP + 0x34] ADD EAX,0x1 MOV dword ptr [RSP + 0x34],EAX JMP 0x00149217 LAB_0014935e: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x358],ECX MOV ECX,dword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x35c],ECX MOV ECX,dword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x3b0],ECX MOV ECX,dword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x408],ECX MOV ECX,dword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x40c],ECX ADD RSP,0x48 RET
/* Encoder::Encoder() */ void __thiscall Encoder::Encoder(Encoder *this) { int iVar1; int iVar2; DownSample *local_28; int local_1c; int local_14; int local_10; *(int4 *)this = 4; *(int4 *)(this + 4) = 0x80; *(int4 *)(this + 8) = 4; *(int4 *)(this + 0xc) = 3; *(int4 *)(this + 0x10) = 2; *(int4 *)(this + 0x14) = 1; *(int4 *)(this + 0x18) = 2; *(int4 *)(this + 0x1c) = 4; *(int4 *)(this + 0x20) = 4; local_28 = (DownSample *)(this + 0x2f8); do { DownSample::DownSample(local_28); local_28 = local_28 + 0x20; } while (local_28 != (DownSample *)(this + 0x358)); local_10 = 1; for (local_14 = 0; local_14 < 4; local_14 = local_14 + 1) { if (local_14 == 0) { local_10 = *(int *)(this + 4); } else { local_10 = *(int *)(this + 4) * *(int *)(this + (long)(local_14 + -1) * 4 + 0x14); } iVar1 = *(int *)(this + 4); iVar2 = *(int *)(this + (long)local_14 * 4 + 0x14); for (local_1c = 0; local_1c < *(int *)(this + 0x10); local_1c = local_1c + 1) { *(int *)(this + (long)local_1c * 0x58 + (long)local_14 * 0xb0 + 0x38) = local_10; *(int *)(this + (long)local_1c * 0x58 + (long)local_14 * 0xb0 + 0x3c) = iVar1 * iVar2; local_10 = iVar1 * iVar2; } if (local_14 != 3) { *(int *)(this + (long)local_14 * 0x20 + 0x2f8) = local_10; *(int *)(this + (long)local_14 * 0x20 + 0x2fc) = local_10; this[(long)local_14 * 0x20 + 0x310] = (Encoder)0x1; } } *(int *)(this + 0x358) = local_10; *(int *)(this + 0x35c) = local_10; *(int *)(this + 0x3b0) = local_10; *(int *)(this + 0x408) = local_10; *(int *)(this + 0x40c) = local_10; return; }
49,925
Encoder::Encoder()
7CodeWizard[P]stablediffusion/vae.hpp
Encoder() { int len_mults = sizeof(ch_mult) / sizeof(int); int block_in = 1; for (int i = 0; i < len_mults; i++) { if (i == 0) { block_in = ch; } else { block_in = ch * ch_mult[i - 1]; } int block_out = ch * ch_mult[i]; for (int j = 0; j < num_res_blocks; j++) { down_blocks[i][j].in_channels = block_in; down_blocks[i][j].out_channels = block_out; block_in = block_out; } if (i != len_mults - 1) { down_samples[i].channels = block_in; down_samples[i].out_channels = block_in; down_samples[i].vae_downsample = true; } } mid.block_1.in_channels = block_in; mid.block_1.out_channels = block_in; mid.attn_1.in_channels = block_in; mid.block_2.in_channels = block_in; mid.block_2.out_channels = block_in; }
O2
cpp
Encoder::Encoder(): movaps 0x76135(%rip), %xmm0 # 0x99940 movups %xmm0, (%rdi) movaps 0x7613b(%rip), %xmm0 # 0x99950 movups %xmm0, 0x10(%rdi) movl $0x4, 0x20(%rdi) xorl %eax, %eax movb %al, 0x310(%rdi) movb %al, 0x330(%rdi) movb %al, 0x350(%rdi) leaq 0x2f8(%rdi), %rcx pushq $0x1 popq %r8 pushq $0x3c popq %rdx movq %rdi, %rsi movl $0x80, %r11d testq %rax, %rax je 0x2385f cmpq $0x4, %rax je 0x238b1 movl 0x10(%rdi,%rax,4), %r11d shll $0x7, %r11d movl 0x14(%rdi,%rax,4), %r9d shll $0x7, %r9d movq %rdx, %r10 movl %r11d, %r8d cmpq $0xec, %r10 je 0x23889 movl %r8d, -0x4(%rsi,%r10) movl %r9d, (%rsi,%r10) addq $0x58, %r10 movl %r9d, %r8d jmp 0x2386e cmpq $0x3, %rax je 0x238a5 movq %rax, %r9 shlq $0x5, %r9 movl %r8d, (%rcx,%r9) movl %r8d, 0x4(%rcx,%r9) movb $0x1, 0x18(%rcx,%r9) incq %rax addq $0xb0, %rsi jmp 0x23845 movl %r8d, 0x358(%rdi) movl %r8d, 0x35c(%rdi) movl %r8d, 0x3b0(%rdi) movl %r8d, 0x408(%rdi) movl %r8d, 0x40c(%rdi) retq nop
_ZN7EncoderC2Ev: movaps xmm0, cs:xmmword_99940 movups xmmword ptr [rdi], xmm0 movaps xmm0, cs:xmmword_99950 movups xmmword ptr [rdi+10h], xmm0 mov dword ptr [rdi+20h], 4 xor eax, eax mov [rdi+310h], al mov [rdi+330h], al mov [rdi+350h], al lea rcx, [rdi+2F8h] push 1 pop r8 push 3Ch ; '<' pop rdx mov rsi, rdi loc_23845: mov r11d, 80h test rax, rax jz short loc_2385F cmp rax, 4 jz short loc_238B1 mov r11d, [rdi+rax*4+10h] shl r11d, 7 loc_2385F: mov r9d, [rdi+rax*4+14h] shl r9d, 7 mov r10, rdx mov r8d, r11d loc_2386E: cmp r10, 0ECh jz short loc_23889 mov [rsi+r10-4], r8d mov [rsi+r10], r9d add r10, 58h ; 'X' mov r8d, r9d jmp short loc_2386E loc_23889: cmp rax, 3 jz short loc_238A5 mov r9, rax shl r9, 5 mov [rcx+r9], r8d mov [rcx+r9+4], r8d mov byte ptr [rcx+r9+18h], 1 loc_238A5: inc rax add rsi, 0B0h jmp short loc_23845 loc_238B1: mov [rdi+358h], r8d mov [rdi+35Ch], r8d mov [rdi+3B0h], r8d mov [rdi+408h], r8d mov [rdi+40Ch], r8d retn
void Encoder::Encoder(Encoder *this) { long long v1; // rax char *v2; // rcx int v3; // r8d Encoder *i; // rsi int v5; // r11d int v6; // r9d long long v7; // r10 long long v8; // r9 *(_OWORD *)this = xmmword_99940; *((_OWORD *)this + 1) = xmmword_99950; *((_DWORD *)this + 8) = 4; v1 = 0LL; *((_BYTE *)this + 784) = 0; *((_BYTE *)this + 816) = 0; *((_BYTE *)this + 848) = 0; v2 = (char *)this + 760; v3 = 1; for ( i = this; ; i = (Encoder *)((char *)i + 176) ) { v5 = 128; if ( v1 ) break; LABEL_5: v6 = *((_DWORD *)this + v1 + 5) << 7; v7 = 60LL; v3 = v5; while ( v7 != 236 ) { *(_DWORD *)((char *)i + v7 - 4) = v3; *(_DWORD *)((char *)i + v7) = v6; v7 += 88LL; v3 = v6; } if ( v1 != 3 ) { v8 = 32 * v1; *(_DWORD *)&v2[v8] = v3; *(_DWORD *)&v2[v8 + 4] = v3; v2[v8 + 24] = 1; } ++v1; } if ( v1 != 4 ) { v5 = *((_DWORD *)this + v1 + 4) << 7; goto LABEL_5; } *((_DWORD *)this + 214) = v3; *((_DWORD *)this + 215) = v3; *((_DWORD *)this + 236) = v3; *((_DWORD *)this + 258) = v3; *((_DWORD *)this + 259) = v3; }
Encoder: MOVAPS XMM0,xmmword ptr [0x00199940] MOVUPS xmmword ptr [RDI],XMM0 MOVAPS XMM0,xmmword ptr [0x00199950] MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOV dword ptr [RDI + 0x20],0x4 XOR EAX,EAX MOV byte ptr [RDI + 0x310],AL MOV byte ptr [RDI + 0x330],AL MOV byte ptr [RDI + 0x350],AL LEA RCX,[RDI + 0x2f8] PUSH 0x1 POP R8 PUSH 0x3c POP RDX MOV RSI,RDI LAB_00123845: MOV R11D,0x80 TEST RAX,RAX JZ 0x0012385f CMP RAX,0x4 JZ 0x001238b1 MOV R11D,dword ptr [RDI + RAX*0x4 + 0x10] SHL R11D,0x7 LAB_0012385f: MOV R9D,dword ptr [RDI + RAX*0x4 + 0x14] SHL R9D,0x7 MOV R10,RDX MOV R8D,R11D LAB_0012386e: CMP R10,0xec JZ 0x00123889 MOV dword ptr [RSI + R10*0x1 + -0x4],R8D MOV dword ptr [RSI + R10*0x1],R9D ADD R10,0x58 MOV R8D,R9D JMP 0x0012386e LAB_00123889: CMP RAX,0x3 JZ 0x001238a5 MOV R9,RAX SHL R9,0x5 MOV dword ptr [RCX + R9*0x1],R8D MOV dword ptr [RCX + R9*0x1 + 0x4],R8D MOV byte ptr [RCX + R9*0x1 + 0x18],0x1 LAB_001238a5: INC RAX ADD RSI,0xb0 JMP 0x00123845 LAB_001238b1: MOV dword ptr [RDI + 0x358],R8D MOV dword ptr [RDI + 0x35c],R8D MOV dword ptr [RDI + 0x3b0],R8D MOV dword ptr [RDI + 0x408],R8D MOV dword ptr [RDI + 0x40c],R8D RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* Encoder::Encoder() */ void __thiscall Encoder::Encoder(Encoder *this) { int iVar1; int8 uVar2; long lVar3; Encoder *pEVar4; int iVar5; long lVar6; int iVar7; uVar2 = _UNK_00199948; *(int8 *)this = _DAT_00199940; *(int8 *)(this + 8) = uVar2; uVar2 = _UNK_00199958; *(int8 *)(this + 0x10) = _DAT_00199950; *(int8 *)(this + 0x18) = uVar2; *(int4 *)(this + 0x20) = 4; lVar3 = 0; this[0x310] = (Encoder)0x0; this[0x330] = (Encoder)0x0; this[0x350] = (Encoder)0x0; iVar5 = 1; pEVar4 = this; do { iVar7 = 0x80; if (lVar3 != 0) { if (lVar3 == 4) { *(int *)(this + 0x358) = iVar5; *(int *)(this + 0x35c) = iVar5; *(int *)(this + 0x3b0) = iVar5; *(int *)(this + 0x408) = iVar5; *(int *)(this + 0x40c) = iVar5; return; } iVar7 = *(int *)(this + lVar3 * 4 + 0x10) << 7; } iVar1 = *(int *)(this + lVar3 * 4 + 0x14); iVar5 = iVar7; for (lVar6 = 0x3c; lVar6 != 0xec; lVar6 = lVar6 + 0x58) { *(int *)(pEVar4 + lVar6 + -4) = iVar5; *(int *)(pEVar4 + lVar6) = iVar1 << 7; iVar5 = iVar1 << 7; } if (lVar3 != 3) { lVar6 = lVar3 * 0x20; *(int *)(this + lVar6 + 0x2f8) = iVar5; *(int *)(this + lVar6 + 0x2fc) = iVar5; this[lVar6 + 0x310] = (Encoder)0x1; } lVar3 = lVar3 + 1; pEVar4 = pEVar4 + 0xb0; } while( true ); }
49,926
Encoder::Encoder()
7CodeWizard[P]stablediffusion/vae.hpp
Encoder() { int len_mults = sizeof(ch_mult) / sizeof(int); int block_in = 1; for (int i = 0; i < len_mults; i++) { if (i == 0) { block_in = ch; } else { block_in = ch * ch_mult[i - 1]; } int block_out = ch * ch_mult[i]; for (int j = 0; j < num_res_blocks; j++) { down_blocks[i][j].in_channels = block_in; down_blocks[i][j].out_channels = block_out; block_in = block_out; } if (i != len_mults - 1) { down_samples[i].channels = block_in; down_samples[i].out_channels = block_in; down_samples[i].vae_downsample = true; } } mid.block_1.in_channels = block_in; mid.block_1.out_channels = block_in; mid.attn_1.in_channels = block_in; mid.block_2.in_channels = block_in; mid.block_2.out_channels = block_in; }
O3
cpp
Encoder::Encoder(): movaps 0x832e9(%rip), %xmm0 # 0xbca00 movups %xmm0, (%rdi) movaps 0x832ef(%rip), %xmm0 # 0xbca10 movups %xmm0, 0x10(%rdi) movl $0x4, 0x20(%rdi) xorl %eax, %eax movb %al, 0x310(%rdi) movb %al, 0x330(%rdi) movb %al, 0x350(%rdi) leaq 0x94(%rdi), %rcx testq %rax, %rax je 0x39755 movl 0x10(%rdi,%rax), %esi shll $0x7, %esi jmp 0x3975a movl $0x80, %esi movl 0x14(%rdi,%rax), %edx shll $0x7, %edx movl %esi, -0x5c(%rcx) movl %edx, -0x58(%rcx) movl %edx, -0x4(%rcx) movl %edx, (%rcx) cmpq $0xc, %rax je 0x39795 movl %edx, 0x2f8(%rdi,%rax,8) movl %edx, 0x2fc(%rdi,%rax,8) movb $0x1, 0x310(%rdi,%rax,8) addq $0xb0, %rcx addq $0x4, %rax jmp 0x39747 movl %edx, 0x358(%rdi) movl %edx, 0x35c(%rdi) movl %edx, 0x3b0(%rdi) movl %edx, 0x408(%rdi) movl %edx, 0x40c(%rdi) retq
_ZN7EncoderC2Ev: movaps xmm0, cs:xmmword_BCA00 movups xmmword ptr [rdi], xmm0 movaps xmm0, cs:xmmword_BCA10 movups xmmword ptr [rdi+10h], xmm0 mov dword ptr [rdi+20h], 4 xor eax, eax mov [rdi+310h], al mov [rdi+330h], al mov [rdi+350h], al lea rcx, [rdi+94h] loc_39747: test rax, rax jz short loc_39755 mov esi, [rdi+rax+10h] shl esi, 7 jmp short loc_3975A loc_39755: mov esi, 80h loc_3975A: mov edx, [rdi+rax+14h] shl edx, 7 mov [rcx-5Ch], esi mov [rcx-58h], edx mov [rcx-4], edx mov [rcx], edx cmp rax, 0Ch jz short loc_39795 mov [rdi+rax*8+2F8h], edx mov [rdi+rax*8+2FCh], edx mov byte ptr [rdi+rax*8+310h], 1 add rcx, 0B0h add rax, 4 jmp short loc_39747 loc_39795: mov [rdi+358h], edx mov [rdi+35Ch], edx mov [rdi+3B0h], edx mov [rdi+408h], edx mov [rdi+40Ch], edx retn
void Encoder::Encoder(Encoder *this) { long long v1; // rax _DWORD *i; // rcx int v3; // esi int v4; // edx *(_OWORD *)this = xmmword_BCA00; *((_OWORD *)this + 1) = xmmword_BCA10; *((_DWORD *)this + 8) = 4; v1 = 0LL; *((_BYTE *)this + 784) = 0; *((_BYTE *)this + 816) = 0; *((_BYTE *)this + 848) = 0; for ( i = (_DWORD *)((char *)this + 148); ; i += 44 ) { v3 = v1 ? *(_DWORD *)((char *)this + v1 + 16) << 7 : 128; v4 = *(_DWORD *)((char *)this + v1 + 20) << 7; *(i - 23) = v3; *(i - 22) = v4; *(i - 1) = v4; *i = v4; if ( v1 == 12 ) break; *((_DWORD *)this + 2 * v1 + 190) = v4; *((_DWORD *)this + 2 * v1 + 191) = v4; *((_BYTE *)this + 8 * v1 + 784) = 1; v1 += 4LL; } *((_DWORD *)this + 214) = v4; *((_DWORD *)this + 215) = v4; *((_DWORD *)this + 236) = v4; *((_DWORD *)this + 258) = v4; *((_DWORD *)this + 259) = v4; }
49,927
init_queue
eloqsql/mysys/queues.c
int init_queue(QUEUE *queue, uint max_elements, uint offset_to_key, my_bool max_at_top, int (*compare) (void *, uchar *, uchar *), void *first_cmp_arg, uint offset_to_queue_pos, uint auto_extent) { DBUG_ENTER("init_queue"); if ((queue->root= (uchar **) my_malloc(key_memory_QUEUE, (max_elements + 1) * sizeof(void*), MYF(MY_WME))) == 0) DBUG_RETURN(1); queue->elements= 0; queue->compare= compare; queue->first_cmp_arg= first_cmp_arg; queue->max_elements= max_elements; queue->offset_to_key= offset_to_key; queue->offset_to_queue_pos= offset_to_queue_pos; queue->auto_extent= auto_extent; queue_set_max_at_top(queue, max_at_top); DBUG_RETURN(0); }
O3
c
init_queue: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, -0x30(%rbp) movq %r8, %r13 movl %ecx, %r14d movl %edx, %r12d movl %esi, %r15d movq %rdi, %rbx leaq 0xb66a7c(%rip), %rax # 0xc086c0 movl (%rax), %edi leal 0x1(%r15), %esi shlq $0x3, %rsi movl $0x10, %edx callq 0x9f97d movq %rax, (%rbx) testq %rax, %rax je 0xa1c9b movl 0x18(%rbp), %eax movl 0x10(%rbp), %ecx movl $0x0, 0x10(%rbx) movq %r13, 0x28(%rbx) movq -0x30(%rbp), %rdx movq %rdx, 0x8(%rbx) movl %r15d, 0x14(%rbx) movl %r12d, 0x18(%rbx) movl %ecx, 0x1c(%rbx) movl %eax, 0x20(%rbx) xorl %eax, %eax negb %r14b movl $0x0, %ecx sbbl %ecx, %ecx orl $0x1, %ecx movl %ecx, 0x24(%rbx) jmp 0xa1ca0 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_queue: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], r9 mov r13, r8 mov r14d, ecx mov r12d, edx mov r15d, esi mov rbx, rdi lea rax, key_memory_QUEUE mov edi, [rax] lea esi, [r15+1] shl rsi, 3 mov edx, 10h call my_malloc mov [rbx], rax test rax, rax jz short loc_A1C9B mov eax, [rbp+arg_8] mov ecx, [rbp+arg_0] mov dword ptr [rbx+10h], 0 mov [rbx+28h], r13 mov rdx, [rbp+var_30] mov [rbx+8], rdx mov [rbx+14h], r15d mov [rbx+18h], r12d mov [rbx+1Ch], ecx mov [rbx+20h], eax xor eax, eax neg r14b mov ecx, 0 sbb ecx, ecx or ecx, 1 mov [rbx+24h], ecx jmp short loc_A1CA0 loc_A1C9B: mov eax, 1 loc_A1CA0: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_queue(long long a1, int a2, int a3, char a4, long long a5, long long a6, int a7, int a8) { long long v11; // rax long long result; // rax v11 = my_malloc(key_memory_QUEUE, (const char *)(8LL * (unsigned int)(a2 + 1)), 16); *(_QWORD *)a1 = v11; if ( !v11 ) return 1LL; *(_DWORD *)(a1 + 16) = 0; *(_QWORD *)(a1 + 40) = a5; *(_QWORD *)(a1 + 8) = a6; *(_DWORD *)(a1 + 20) = a2; *(_DWORD *)(a1 + 24) = a3; *(_DWORD *)(a1 + 28) = a7; *(_DWORD *)(a1 + 32) = a8; result = 0LL; *(_DWORD *)(a1 + 36) = a4 != 0 ? -1 : 1; return result; }
init_queue: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],R9 MOV R13,R8 MOV R14D,ECX MOV R12D,EDX MOV R15D,ESI MOV RBX,RDI LEA RAX,[0xd086c0] MOV EDI,dword ptr [RAX] LEA ESI,[R15 + 0x1] SHL RSI,0x3 MOV EDX,0x10 CALL 0x0019f97d MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x001a1c9b MOV EAX,dword ptr [RBP + 0x18] MOV ECX,dword ptr [RBP + 0x10] MOV dword ptr [RBX + 0x10],0x0 MOV qword ptr [RBX + 0x28],R13 MOV RDX,qword ptr [RBP + -0x30] MOV qword ptr [RBX + 0x8],RDX MOV dword ptr [RBX + 0x14],R15D MOV dword ptr [RBX + 0x18],R12D MOV dword ptr [RBX + 0x1c],ECX MOV dword ptr [RBX + 0x20],EAX XOR EAX,EAX NEG R14B MOV ECX,0x0 SBB ECX,ECX OR ECX,0x1 MOV dword ptr [RBX + 0x24],ECX JMP 0x001a1ca0 LAB_001a1c9b: MOV EAX,0x1 LAB_001a1ca0: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool init_queue(long *param_1,int param_2,int4 param_3,char param_4,long param_5,long param_6, int4 param_7,int4 param_8) { long lVar1; lVar1 = my_malloc(key_memory_QUEUE,(ulong)(param_2 + 1) << 3,0x10); *param_1 = lVar1; if (lVar1 != 0) { *(int4 *)(param_1 + 2) = 0; param_1[5] = param_5; param_1[1] = param_6; *(int *)((long)param_1 + 0x14) = param_2; *(int4 *)(param_1 + 3) = param_3; *(int4 *)((long)param_1 + 0x1c) = param_7; *(int4 *)(param_1 + 4) = param_8; *(uint *)((long)param_1 + 0x24) = -(uint)(param_4 != '\0') | 1; } return lVar1 == 0; }
49,928
evmone::instr::core::datacopy(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline Result datacopy(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { const auto data = state.analysis.baseline->eof_data(); const auto& mem_index = stack.pop(); const auto& data_index = stack.pop(); const auto& size = stack.pop(); if (!check_memory(gas_left, state.memory, mem_index, size)) return {EVMC_OUT_OF_GAS, gas_left}; const auto dst = static_cast<size_t>(mem_index); // TODO why? const auto src = data.size() < data_index ? data.size() : static_cast<size_t>(data_index); const auto s = static_cast<size_t>(size); const auto copy_size = std::min(s, data.size() - src); if (const auto cost = copy_cost(s); (gas_left -= cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; if (copy_size > 0) std::memcpy(&state.memory[dst], &data[src], copy_size); if (s - copy_size > 0) std::memset(&state.memory[dst + copy_size], 0, s - copy_size); return {EVMC_SUCCESS, gas_left}; }
O1
cpp
evmone::instr::core::datacopy(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %rbp movq %rsi, %rbx movq %rdi, %r15 movq 0x1f8(%rdx), %rax leaq 0x48(%rax), %rdi movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x461f2 movq %rax, %r14 movq %rdx, %r8 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) xorl %eax, %eax xorl %ecx, %ecx movq (%rsp,%rax,8), %rdx xorq -0x40(%r15,%rax,8), %rdx orq %rdx, %rcx incq %rax cmpq $0x4, %rax jne 0x4626d leaq 0x8(%rbp), %r9 testq %rcx, %rcx je 0x462c8 movq -0x30(%r15), %rax orq -0x28(%r15), %rax orq -0x38(%r15), %rax jne 0x462c4 movq -0x40(%r15), %rax movq %rax, %rcx shrq $0x20, %rcx jne 0x462c4 movq 0x10(%r15), %rcx orq 0x18(%r15), %rcx orq 0x8(%r15), %rcx jne 0x462c4 movq (%r15), %rdx movq %rdx, %rcx shrq $0x20, %rcx je 0x4637e xorl %eax, %eax jmp 0x462ca movb $0x1, %al movl $0x3, %ebp testb %al, %al je 0x4636a movq -0x10(%r15), %rcx movq -0x8(%r15), %rdx xorl %esi, %esi movq %rdx, %rax orq %rcx, %rax movq -0x20(%r15), %rax cmoveq %rax, %rcx cmoveq -0x18(%r15), %rdx movl $0x0, %edi cmoveq %r14, %rdi cmpq %rcx, %rdi sbbq %rdx, %rsi movq -0x40(%r15), %r13 cmovbq %r14, %rax subq %rax, %r14 cmpq %r13, %r14 movq %r13, %r12 cmovbq %r14, %r12 leaq 0x1f(%r13), %rcx shrq $0x5, %rcx leaq (%rcx,%rcx,2), %rcx subq %rcx, %rbx js 0x4636a movq (%r15), %r15 testq %r12, %r12 je 0x4634b movq (%r9), %rdi addq %r15, %rdi addq %rax, %r8 movq %r8, %rsi movq %r12, %rdx movq %r9, %rbp callq 0x22090 movq %rbp, %r9 xorl %ebp, %ebp cmpq %r14, %r13 jbe 0x4636a addq (%r9), %r15 addq %r12, %r15 subq %r12, %r13 xorl %ebp, %ebp movq %r15, %rdi xorl %esi, %esi movq %r13, %rdx callq 0x22190 movl %ebp, %eax movq %rbx, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq %rax, %rdx cmpq 0x10(%rbp), %rdx jbe 0x463a1 movq %rbx, %rdi movq %r9, %rsi movq %r8, %rbx movq %r9, %r12 callq 0x451cc movq %r12, %r9 movq %rbx, %r8 movq %rax, %rbx testq %rbx, %rbx setns %al jmp 0x462ca
_ZN6evmone5instr4core8datacopyENS_8StackTopElRNS_14ExecutionStateE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbp, rdx mov rbx, rsi mov r15, rdi mov rax, [rdx+1F8h] lea rdi, [rax+48h] mov rsi, [rax] mov rdx, [rax+8] call _ZNK6evmone10EOF1Header8get_dataESt17basic_string_viewIhN4evmc11byte_traitsIhEEE; evmone::EOF1Header::get_data(std::basic_string_view<uchar,evmc::byte_traits<uchar>>) mov r14, rax mov r8, rdx xorps xmm0, xmm0 movaps [rsp+58h+var_48], xmm0 movaps [rsp+58h+var_58], xmm0 xor eax, eax xor ecx, ecx loc_4626D: mov rdx, qword ptr [rsp+rax*8+58h+var_58] xor rdx, [r15+rax*8-40h] or rcx, rdx inc rax cmp rax, 4 jnz short loc_4626D lea r9, [rbp+8] test rcx, rcx jz short loc_462C8 mov rax, [r15-30h] or rax, [r15-28h] or rax, [r15-38h] jnz short loc_462C4 mov rax, [r15-40h] mov rcx, rax shr rcx, 20h jnz short loc_462C4 mov rcx, [r15+10h] or rcx, [r15+18h] or rcx, [r15+8] jnz short loc_462C4 mov rdx, [r15] mov rcx, rdx shr rcx, 20h; unsigned __int64 jz loc_4637E loc_462C4: xor eax, eax jmp short loc_462CA loc_462C8: mov al, 1 loc_462CA: mov ebp, 3 test al, al jz loc_4636A mov rcx, [r15-10h] mov rdx, [r15-8] xor esi, esi mov rax, rdx or rax, rcx mov rax, [r15-20h] cmovz rcx, rax cmovz rdx, [r15-18h] mov edi, 0 cmovz rdi, r14 cmp rdi, rcx sbb rsi, rdx mov r13, [r15-40h] cmovb rax, r14 sub r14, rax cmp r14, r13 mov r12, r13 cmovb r12, r14 lea rcx, [r13+1Fh] shr rcx, 5 lea rcx, [rcx+rcx*2] sub rbx, rcx js short loc_4636A mov r15, [r15] test r12, r12 jz short loc_4634B mov rdi, [r9] add rdi, r15 add r8, rax mov rsi, r8 mov rdx, r12 mov rbp, r9 call _memcpy mov r9, rbp loc_4634B: xor ebp, ebp cmp r13, r14 jbe short loc_4636A add r15, [r9] add r15, r12 sub r13, r12 xor ebp, ebp mov rdi, r15 xor esi, esi mov rdx, r13 call _memset loc_4636A: mov eax, ebp mov rdx, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4637E: add rdx, rax; evmone::Memory * cmp rdx, [rbp+10h] jbe short loc_463A1 mov rdi, rbx; this mov rsi, r9; __int64 mov rbx, r8 mov r12, r9 call _ZN6evmone11grow_memoryElRNS_6MemoryEm; evmone::grow_memory(long,evmone::Memory &,ulong) mov r9, r12 mov r8, rbx mov rbx, rax loc_463A1: test rbx, rbx setns al jmp loc_462CA
long long evmone::instr::core::datacopy(_QWORD *a1, evmone *a2, long long a3) { void *v4; // rbx unsigned long long data; // r14 long long v7; // rax long long v8; // rcx _QWORD *v9; // r9 bool v10; // al unsigned int v11; // ebp unsigned long long v12; // rcx unsigned long long v13; // rdx unsigned __int128 v14; // rdi unsigned long long v15; // rax unsigned long long v16; // r13 unsigned long long v17; // r14 unsigned long long v18; // r12 long long v19; // r15 _QWORD *v20; // rbp evmone::Memory *v22; // rdx char *v23; // rax _OWORD v24[5]; // [rsp+0h] [rbp-58h] BYREF v4 = a2; data = evmone::EOF1Header::get_data(*(_QWORD *)(a3 + 504) + 72LL, **(_QWORD **)(a3 + 504)); memset(v24, 0, 32); v7 = 0LL; v8 = 0LL; do { v8 |= a1[v7 - 8] ^ *((_QWORD *)v24 + v7); ++v7; } while ( v7 != 4 ); v9 = (_QWORD *)(a3 + 8); if ( v8 ) { if ( *(a1 - 7) | *(a1 - 5) | *(a1 - 6) || HIDWORD(*(a1 - 8)) || a1[1] | a1[3] | a1[2] || HIDWORD(*a1) ) { v10 = 0; } else { v22 = (evmone::Memory *)(*(a1 - 8) + *a1); if ( (unsigned long long)v22 > *(_QWORD *)(a3 + 16) ) { v23 = evmone::grow_memory(a2, (evmone::Memory *)(a3 + 8), v22); v9 = (_QWORD *)(a3 + 8); v4 = v23; } v10 = (long long)v4 >= 0; } } else { v10 = 1; } v11 = 3; if ( v10 ) { v12 = *(a1 - 2); v13 = *(a1 - 1); *((_QWORD *)&v14 + 1) = 0LL; v15 = *(a1 - 4); if ( *((_OWORD *)a1 - 1) == 0LL ) { v12 = *(a1 - 4); v13 = *(a1 - 3); } *(_QWORD *)&v14 = 0LL; if ( *((_OWORD *)a1 - 1) == 0LL ) *(_QWORD *)&v14 = data; v16 = *(a1 - 8); if ( v14 < __PAIR128__(v13, v12) ) v15 = data; v17 = data - v15; v18 = *(a1 - 8); if ( v17 < v16 ) v18 = v17; if ( (long long)((long long)v4 - 3 * ((v16 + 31) >> 5)) >= 0 ) { v19 = *a1; if ( v18 ) { v20 = v9; memcpy(v19 + *v9); v9 = v20; } v11 = 0; if ( v16 > v17 ) { v11 = 0; memset(v18 + *v9 + v19, 0LL, v16 - v18); } } } return v11; }
datacopy: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBP,RDX MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr [RDX + 0x1f8] LEA RDI,[RAX + 0x48] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001461f2 MOV R14,RAX MOV R8,RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 XOR EAX,EAX XOR ECX,ECX LAB_0014626d: MOV RDX,qword ptr [RSP + RAX*0x8] XOR RDX,qword ptr [R15 + RAX*0x8 + -0x40] OR RCX,RDX INC RAX CMP RAX,0x4 JNZ 0x0014626d LEA R9,[RBP + 0x8] TEST RCX,RCX JZ 0x001462c8 MOV RAX,qword ptr [R15 + -0x30] OR RAX,qword ptr [R15 + -0x28] OR RAX,qword ptr [R15 + -0x38] JNZ 0x001462c4 MOV RAX,qword ptr [R15 + -0x40] MOV RCX,RAX SHR RCX,0x20 JNZ 0x001462c4 MOV RCX,qword ptr [R15 + 0x10] OR RCX,qword ptr [R15 + 0x18] OR RCX,qword ptr [R15 + 0x8] JNZ 0x001462c4 MOV RDX,qword ptr [R15] MOV RCX,RDX SHR RCX,0x20 JZ 0x0014637e LAB_001462c4: XOR EAX,EAX JMP 0x001462ca LAB_001462c8: MOV AL,0x1 LAB_001462ca: MOV EBP,0x3 TEST AL,AL JZ 0x0014636a MOV RCX,qword ptr [R15 + -0x10] MOV RDX,qword ptr [R15 + -0x8] XOR ESI,ESI MOV RAX,RDX OR RAX,RCX MOV RAX,qword ptr [R15 + -0x20] CMOVZ RCX,RAX CMOVZ RDX,qword ptr [R15 + -0x18] MOV EDI,0x0 CMOVZ RDI,R14 CMP RDI,RCX SBB RSI,RDX MOV R13,qword ptr [R15 + -0x40] CMOVC RAX,R14 SUB R14,RAX CMP R14,R13 MOV R12,R13 CMOVC R12,R14 LEA RCX,[R13 + 0x1f] SHR RCX,0x5 LEA RCX,[RCX + RCX*0x2] SUB RBX,RCX JS 0x0014636a MOV R15,qword ptr [R15] TEST R12,R12 JZ 0x0014634b MOV RDI,qword ptr [R9] ADD RDI,R15 ADD R8,RAX MOV RSI,R8 MOV RDX,R12 MOV RBP,R9 CALL 0x00122090 MOV R9,RBP LAB_0014634b: XOR EBP,EBP CMP R13,R14 JBE 0x0014636a ADD R15,qword ptr [R9] ADD R15,R12 SUB R13,R12 XOR EBP,EBP MOV RDI,R15 XOR ESI,ESI MOV RDX,R13 CALL 0x00122190 LAB_0014636a: MOV EAX,EBP MOV RDX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014637e: ADD RDX,RAX CMP RDX,qword ptr [RBP + 0x10] JBE 0x001463a1 MOV RDI,RBX MOV RSI,R9 MOV RBX,R8 MOV R12,R9 CALL 0x001451cc MOV R9,R12 MOV R8,RBX MOV RBX,RAX LAB_001463a1: TEST RBX,RBX SETNS AL JMP 0x001462ca
/* evmone::instr::core::datacopy(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::datacopy(ulong *param_1,long param_2,long param_3) { Memory *pMVar1; int8 *puVar2; ulong uVar3; bool bVar4; long lVar5; ulong uVar6; ulong uVar7; ulong uVar8; int8 uVar9; ulong uVar10; ulong uVar11; bool bVar12; int1 auVar13 [16]; ulong local_58 [5]; puVar2 = *(int8 **)(param_3 + 0x1f8); auVar13 = EOF1Header::get_data(puVar2 + 9,*puVar2,puVar2[1]); uVar11 = auVar13._0_8_; local_58[2] = 0; local_58[3] = 0; local_58[0] = 0; local_58[1] = 0; lVar5 = 0; uVar7 = 0; do { uVar7 = uVar7 | local_58[lVar5] ^ param_1[lVar5 + -8]; lVar5 = lVar5 + 1; } while (lVar5 != 4); pMVar1 = (Memory *)(param_3 + 8); if (uVar7 == 0) { bVar12 = true; } else if (((((param_1[-6] == 0 && param_1[-5] == 0) && param_1[-7] == 0) && (param_1[-8] >> 0x20 == 0)) && ((param_1[2] == 0 && param_1[3] == 0) && param_1[1] == 0) ) && (*param_1 >> 0x20 == 0)) { uVar7 = *param_1 + param_1[-8]; if (*(ulong *)(param_3 + 0x10) < uVar7) { param_2 = grow_memory(param_2,pMVar1,uVar7); } bVar12 = -1 < param_2; } else { bVar12 = false; } uVar9 = 3; if (bVar12) { bVar12 = param_1[-1] == 0; bVar4 = param_1[-2] == 0; uVar7 = param_1[-2]; if (bVar12 && bVar4) { uVar7 = param_1[-4]; } uVar8 = param_1[-1]; if (bVar12 && bVar4) { uVar8 = param_1[-3]; } uVar10 = 0; if (bVar12 && bVar4) { uVar10 = uVar11; } uVar3 = param_1[-8]; uVar6 = param_1[-4]; if (uVar8 != 0 || -uVar8 < (ulong)(uVar10 < uVar7)) { uVar6 = uVar11; } uVar11 = uVar11 - uVar6; uVar7 = uVar3; if (uVar11 < uVar3) { uVar7 = uVar11; } param_2 = param_2 + (uVar3 + 0x1f >> 5) * -3; if (-1 < param_2) { uVar8 = *param_1; if (uVar7 != 0) { memcpy((void *)(*(long *)pMVar1 + uVar8),(void *)(auVar13._8_8_ + uVar6),uVar7); } uVar9 = 0; if (uVar11 < uVar3) { uVar9 = 0; memset((void *)(uVar8 + *(long *)pMVar1 + uVar7),0,uVar3 - uVar7); } } } auVar13._8_8_ = param_2; auVar13._0_8_ = uVar9; return auVar13; }
49,929
my_mb_wc_gbk
eloqsql/strings/ctype-gbk.c
static int my_mb_wc_gbk(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; hi=s[0]; if (hi<0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_gbk_uni_onechar( (hi<<8) + s[1]))) return -2; return 2; }
O3
c
my_mb_wc_gbk: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x57b31 movsbq (%rdx), %rdi testq %rdi, %rdi js 0x57ab5 movq %rdi, (%rsi) movl $0x1, %eax jmp 0x57b31 leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x57b31 movzbl %dil, %ecx xorl %eax, %eax cmpl $0x80, %ecx je 0x57b31 cmpl $0xff, %ecx je 0x57b31 movzbl 0x1(%rdx), %edx leal -0x7f(%rdx), %edi cmpb $-0x3f, %dil setb %dil cmpb $-0x1, %dl setge %r8b testb %dil, %r8b jne 0x57b31 shll $0x8, %ecx leal (%rcx,%rdx), %eax addl $0xffff7ec0, %eax # imm = 0xFFFF7EC0 cmpl $0x7d10, %eax # imm = 0x7D10 jae 0x57b25 movl %eax, %eax leaq 0x147531(%rip), %rcx # 0x19f040 movzwl (%rcx,%rax,2), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0x57b31 jmp 0x57b2c movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_gbk: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb loc_57B31 movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_57AB5 mov [rsi], rdi mov eax, 1 jmp short loc_57B31 loc_57AB5: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_57B31 movzx ecx, dil xor eax, eax cmp ecx, 80h jz short loc_57B31 cmp ecx, 0FFh jz short loc_57B31 movzx edx, byte ptr [rdx+1] lea edi, [rdx-7Fh] cmp dil, 0C1h setb dil cmp dl, 0FFh setnl r8b test r8b, dil jnz short loc_57B31 shl ecx, 8 lea eax, [rcx+rdx] add eax, 0FFFF7EC0h cmp eax, 7D10h jnb short loc_57B25 mov eax, eax lea rcx, tab_gbk_uni0 movzx eax, word ptr [rcx+rax*2] movzx ecx, ax mov [rsi], rcx mov eax, 2 test cx, cx jnz short loc_57B31 jmp short loc_57B2C loc_57B25: mov qword ptr [rsi], 0 loc_57B2C: mov eax, 0FFFFFFFEh loc_57B31: pop rbp retn
long long my_mb_wc_gbk(long long a1, long long *a2, char *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi int v6; // edx unsigned int v7; // eax long long v8; // rcx result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( v5 >= 0 ) { *a2 = v5; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { result = 0LL; if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 ) { v6 = (unsigned __int8)a3[1]; if ( (unsigned __int8)(v6 - 127) >= 0xC1u || (char)v6 < -1 ) { v7 = ((unsigned __int8)v5 << 8) + v6 - 33088; if ( v7 >= 0x7D10 ) { *a2 = 0LL; } else { v8 = tab_gbk_uni0[v7]; *a2 = v8; result = 2LL; if ( (_WORD)v8 ) return result; } return 4294967294LL; } } } } return result; }
my_mb_wc_gbk: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00157b31 MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x00157ab5 MOV qword ptr [RSI],RDI MOV EAX,0x1 JMP 0x00157b31 LAB_00157ab5: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x00157b31 MOVZX ECX,DIL XOR EAX,EAX CMP ECX,0x80 JZ 0x00157b31 CMP ECX,0xff JZ 0x00157b31 MOVZX EDX,byte ptr [RDX + 0x1] LEA EDI,[RDX + -0x7f] CMP DIL,0xc1 SETC DIL CMP DL,0xff SETGE R8B TEST R8B,DIL JNZ 0x00157b31 SHL ECX,0x8 LEA EAX,[RCX + RDX*0x1] ADD EAX,0xffff7ec0 CMP EAX,0x7d10 JNC 0x00157b25 MOV EAX,EAX LEA RCX,[0x29f040] MOVZX EAX,word ptr [RCX + RAX*0x2] MOVZX ECX,AX MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST CX,CX JNZ 0x00157b31 JMP 0x00157b2c LAB_00157b25: MOV qword ptr [RSI],0x0 LAB_00157b2c: MOV EAX,0xfffffffe LAB_00157b31: POP RBP RET
int8 my_mb_wc_gbk(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ushort uVar3; uint uVar4; int8 uVar5; uVar5 = 0xffffff9b; if (param_3 < param_4) { bVar1 = *param_3; if ((long)(char)bVar1 < 0) { uVar5 = 0xffffff9a; if ((((param_3 + 2 <= param_4) && (uVar5 = 0, bVar1 != 0x80)) && (bVar1 != 0xff)) && (bVar2 = param_3[1], (char)bVar2 < -1 || 0xc0 < (byte)(bVar2 + 0x81))) { uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8140; if (uVar4 < 0x7d10) { uVar3 = *(ushort *)(&tab_gbk_uni0 + (ulong)uVar4 * 2); *param_2 = (ulong)uVar3; if (uVar3 != 0) { return 2; } } else { *param_2 = 0; } uVar5 = 0xfffffffe; } } else { *param_2 = (long)(char)bVar1; uVar5 = 1; } } return uVar5; }
49,930
multi_alloc_root
eloqsql/mysys/my_alloc.c
void *multi_alloc_root(MEM_ROOT *root, ...) { va_list args; char **ptr, *start, *res; size_t tot_length, length; DBUG_ENTER("multi_alloc_root"); /* We don't need to do DBUG_PRINT here as it will be done when alloc_root is called */ va_start(args, root); tot_length= 0; while ((ptr= va_arg(args, char **))) { length= va_arg(args, uint); tot_length+= ALIGN_SIZE(length); } va_end(args); if (!(start= (char*) alloc_root(root, tot_length))) DBUG_RETURN(0); /* purecov: inspected */ va_start(args, root); res= start; while ((ptr= va_arg(args, char **))) { *ptr= res; length= va_arg(args, uint); res+= ALIGN_SIZE(length); } va_end(args); DBUG_RETURN((void*) start); }
O0
c
multi_alloc_root: pushq %rbp movq %rsp, %rbp subq $0x170, %rsp # imm = 0x170 testb %al, %al je 0x36ef1 movaps %xmm0, -0xe0(%rbp) movaps %xmm1, -0xd0(%rbp) movaps %xmm2, -0xc0(%rbp) movaps %xmm3, -0xb0(%rbp) movaps %xmm4, -0xa0(%rbp) movaps %xmm5, -0x90(%rbp) movaps %xmm6, -0x80(%rbp) movaps %xmm7, -0x70(%rbp) movq %r9, -0xe8(%rbp) movq %r8, -0xf0(%rbp) movq %rcx, -0xf8(%rbp) movq %rdx, -0x100(%rbp) movq %rsi, -0x108(%rbp) movq %rdi, -0x10(%rbp) leaq -0x30(%rbp), %rax leaq -0x110(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x8, (%rax) movq $0x0, -0x50(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x120(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x114(%rbp) cmpl $0x28, %eax ja 0x36f7f movq -0x120(%rbp), %rcx movl -0x114(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x128(%rbp) jmp 0x36f9c movq -0x120(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x128(%rbp) movq -0x128(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0x37036 leaq -0x30(%rbp), %rax movq %rax, -0x138(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x12c(%rbp) cmpl $0x28, %eax ja 0x36fef movq -0x138(%rbp), %rcx movl -0x12c(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x140(%rbp) jmp 0x3700c movq -0x138(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x140(%rbp) movq -0x140(%rbp), %rax movl (%rax), %eax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x36f44 leaq -0x30(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x50(%rbp), %rsi callq 0x36c00 movq %rax, -0x40(%rbp) cmpq $0x0, %rax jne 0x37060 jmp 0x37053 movq $0x0, -0x8(%rbp) jmp 0x37195 leaq -0x30(%rbp), %rax leaq -0x110(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x8, (%rax) movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x150(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x144(%rbp) cmpl $0x28, %eax ja 0x370c7 movq -0x150(%rbp), %rcx movl -0x144(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x158(%rbp) jmp 0x370e4 movq -0x150(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x158(%rbp) movq -0x158(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0x37189 movq -0x48(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) leaq -0x30(%rbp), %rax movq %rax, -0x168(%rbp) movl -0x30(%rbp), %eax movl %eax, -0x15c(%rbp) cmpl $0x28, %eax ja 0x37142 movq -0x168(%rbp), %rcx movl -0x15c(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x170(%rbp) jmp 0x3715f movq -0x168(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x170(%rbp) movq -0x170(%rbp), %rax movl (%rax), %eax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax addq -0x48(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x3708c leaq -0x30(%rbp), %rax movq -0x40(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x170, %rsp # imm = 0x170 popq %rbp retq nopw %cs:(%rax,%rax)
multi_alloc_root: push rbp mov rbp, rsp sub rsp, 170h test al, al jz short loc_36EF1 movaps [rbp+var_E0], xmm0 movaps [rbp+var_D0], xmm1 movaps [rbp+var_C0], xmm2 movaps [rbp+var_B0], xmm3 movaps [rbp+var_A0], xmm4 movaps [rbp+var_90], xmm5 movaps [rbp+var_80], xmm6 movaps [rbp+var_70], xmm7 loc_36EF1: mov [rbp+var_E8], r9 mov [rbp+var_F0], r8 mov [rbp+var_F8], rcx mov [rbp+var_100], rdx mov [rbp+var_108], rsi mov [rbp+var_10], rdi lea rax, [rbp+var_30] lea rcx, [rbp+var_110] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 8 mov [rbp+var_50], 0 loc_36F44: lea rax, [rbp+var_30] mov [rbp+var_120], rax mov eax, [rbp+var_30] mov [rbp+var_114], eax cmp eax, 28h ; '(' ja short loc_36F7F mov rcx, [rbp+var_120] mov edx, [rbp+var_114] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_128], rax jmp short loc_36F9C loc_36F7F: mov rcx, [rbp+var_120] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_128], rax loc_36F9C: mov rax, [rbp+var_128] mov rax, [rax] mov [rbp+var_38], rax cmp rax, 0 jz loc_37036 lea rax, [rbp+var_30] mov [rbp+var_138], rax mov eax, [rbp+var_30] mov [rbp+var_12C], eax cmp eax, 28h ; '(' ja short loc_36FEF mov rcx, [rbp+var_138] mov edx, [rbp+var_12C] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_140], rax jmp short loc_3700C loc_36FEF: mov rcx, [rbp+var_138] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_140], rax loc_3700C: mov rax, [rbp+var_140] mov eax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_58] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h add rax, [rbp+var_50] mov [rbp+var_50], rax jmp loc_36F44 loc_37036: lea rax, [rbp+var_30] mov rdi, [rbp+var_10] mov rsi, [rbp+var_50] call alloc_root mov [rbp+var_40], rax cmp rax, 0 jnz short loc_37060 jmp short $+2 loc_37053: mov [rbp+var_8], 0 jmp loc_37195 loc_37060: lea rax, [rbp+var_30] lea rcx, [rbp+var_110] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 8 mov rax, [rbp+var_40] mov [rbp+var_48], rax loc_3708C: lea rax, [rbp+var_30] mov [rbp+var_150], rax mov eax, [rbp+var_30] mov [rbp+var_144], eax cmp eax, 28h ; '(' ja short loc_370C7 mov rcx, [rbp+var_150] mov edx, [rbp+var_144] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_158], rax jmp short loc_370E4 loc_370C7: mov rcx, [rbp+var_150] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_158], rax loc_370E4: mov rax, [rbp+var_158] mov rax, [rax] mov [rbp+var_38], rax cmp rax, 0 jz loc_37189 mov rcx, [rbp+var_48] mov rax, [rbp+var_38] mov [rax], rcx lea rax, [rbp+var_30] mov [rbp+var_168], rax mov eax, [rbp+var_30] mov [rbp+var_15C], eax cmp eax, 28h ; '(' ja short loc_37142 mov rcx, [rbp+var_168] mov edx, [rbp+var_15C] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_170], rax jmp short loc_3715F loc_37142: mov rcx, [rbp+var_168] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_170], rax loc_3715F: mov rax, [rbp+var_170] mov eax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_58] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h add rax, [rbp+var_48] mov [rbp+var_48], rax jmp loc_3708C loc_37189: lea rax, [rbp+var_30] mov rax, [rbp+var_40] mov [rbp+var_8], rax loc_37195: mov rax, [rbp+var_8] add rsp, 170h pop rbp retn
char * multi_alloc_root( _QWORD **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, char a15) { char *v15; // rax char *v16; // rax char *v17; // rax char *v18; // rax char v20; // [rsp+60h] [rbp-110h] BYREF long long v21; // [rsp+68h] [rbp-108h] long long v22; // [rsp+70h] [rbp-100h] long long v23; // [rsp+78h] [rbp-F8h] long long v24; // [rsp+80h] [rbp-F0h] long long v25; // [rsp+88h] [rbp-E8h] __m128 v26; // [rsp+90h] [rbp-E0h] __m128 v27; // [rsp+A0h] [rbp-D0h] __m128 v28; // [rsp+B0h] [rbp-C0h] __m128 v29; // [rsp+C0h] [rbp-B0h] __m128 v30; // [rsp+D0h] [rbp-A0h] __m128 v31; // [rsp+E0h] [rbp-90h] __m128 v32; // [rsp+F0h] [rbp-80h] __m128 v33; // [rsp+100h] [rbp-70h] long long v34; // [rsp+118h] [rbp-58h] long long i; // [rsp+120h] [rbp-50h] char *j; // [rsp+128h] [rbp-48h] char *v37; // [rsp+130h] [rbp-40h] char **v38; // [rsp+138h] [rbp-38h] int v39; // [rsp+140h] [rbp-30h] int v40; // [rsp+144h] [rbp-2Ch] char *v41; // [rsp+148h] [rbp-28h] char *v42; // [rsp+150h] [rbp-20h] _QWORD **v43; // [rsp+160h] [rbp-10h] v26 = a7; v27 = a8; v28 = a9; v29 = a10; v30 = a11; v31 = a12; v32 = a13; v33 = a14; v25 = a6; v24 = a5; v23 = a4; v22 = a3; v21 = a2; v43 = a1; v42 = &v20; v41 = &a15; v40 = 48; v39 = 8; for ( i = 0LL; ; i += (v34 + 7) & 0xFFFFFFFFFFFFFFF8LL ) { if ( (unsigned int)v39 > 0x28 ) { v15 = v41; v41 += 8; } else { v15 = &v42[v39]; v39 += 8; } v38 = *(char ***)v15; if ( !v38 ) break; if ( (unsigned int)v39 > 0x28 ) { v16 = v41; v41 += 8; } else { v16 = &v42[v39]; v39 += 8; } v34 = *(unsigned int *)v16; } v37 = alloc_root(v43, i); if ( !v37 ) return 0LL; v42 = &v20; v41 = &a15; v40 = 48; v39 = 8; for ( j = v37; ; j += (v34 + 7) & 0xFFFFFFFFFFFFFFF8LL ) { if ( (unsigned int)v39 > 0x28 ) { v17 = v41; v41 += 8; } else { v17 = &v42[v39]; v39 += 8; } v38 = *(char ***)v17; if ( !v38 ) break; *v38 = j; if ( (unsigned int)v39 > 0x28 ) { v18 = v41; v41 += 8; } else { v18 = &v42[v39]; v39 += 8; } v34 = *(unsigned int *)v18; } return v37; }
multi_alloc_root: PUSH RBP MOV RBP,RSP SUB RSP,0x170 TEST AL,AL JZ 0x00136ef1 MOVAPS xmmword ptr [RBP + -0xe0],XMM0 MOVAPS xmmword ptr [RBP + -0xd0],XMM1 MOVAPS xmmword ptr [RBP + -0xc0],XMM2 MOVAPS xmmword ptr [RBP + -0xb0],XMM3 MOVAPS xmmword ptr [RBP + -0xa0],XMM4 MOVAPS xmmword ptr [RBP + -0x90],XMM5 MOVAPS xmmword ptr [RBP + -0x80],XMM6 MOVAPS xmmword ptr [RBP + -0x70],XMM7 LAB_00136ef1: MOV qword ptr [RBP + -0xe8],R9 MOV qword ptr [RBP + -0xf0],R8 MOV qword ptr [RBP + -0xf8],RCX MOV qword ptr [RBP + -0x100],RDX MOV qword ptr [RBP + -0x108],RSI MOV qword ptr [RBP + -0x10],RDI LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0x110] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x8 MOV qword ptr [RBP + -0x50],0x0 LAB_00136f44: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x120],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x114],EAX CMP EAX,0x28 JA 0x00136f7f MOV RCX,qword ptr [RBP + -0x120] MOV EDX,dword ptr [RBP + -0x114] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x128],RAX JMP 0x00136f9c LAB_00136f7f: MOV RCX,qword ptr [RBP + -0x120] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x128],RAX LAB_00136f9c: MOV RAX,qword ptr [RBP + -0x128] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x00137036 LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x138],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x12c],EAX CMP EAX,0x28 JA 0x00136fef MOV RCX,qword ptr [RBP + -0x138] MOV EDX,dword ptr [RBP + -0x12c] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x140],RAX JMP 0x0013700c LAB_00136fef: MOV RCX,qword ptr [RBP + -0x138] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x140],RAX LAB_0013700c: MOV RAX,qword ptr [RBP + -0x140] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 ADD RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX JMP 0x00136f44 LAB_00137036: LEA RAX,[RBP + -0x30] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x50] CALL 0x00136c00 MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JNZ 0x00137060 JMP 0x00137053 LAB_00137053: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00137195 LAB_00137060: LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0x110] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x8 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX LAB_0013708c: LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x150],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x144],EAX CMP EAX,0x28 JA 0x001370c7 MOV RCX,qword ptr [RBP + -0x150] MOV EDX,dword ptr [RBP + -0x144] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x158],RAX JMP 0x001370e4 LAB_001370c7: MOV RCX,qword ptr [RBP + -0x150] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x158],RAX LAB_001370e4: MOV RAX,qword ptr [RBP + -0x158] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JZ 0x00137189 MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x168],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x15c],EAX CMP EAX,0x28 JA 0x00137142 MOV RCX,qword ptr [RBP + -0x168] MOV EDX,dword ptr [RBP + -0x15c] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x170],RAX JMP 0x0013715f LAB_00137142: MOV RCX,qword ptr [RBP + -0x168] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x170],RAX LAB_0013715f: MOV RAX,qword ptr [RBP + -0x170] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x48],RAX JMP 0x0013708c LAB_00137189: LEA RAX,[RBP + -0x30] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x8],RAX LAB_00137195: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x170 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ long multi_alloc_root(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; uint *local_178; uint *local_160; uint *local_148; uint *local_130; uint local_118 [2]; int8 local_110; int8 local_108; int8 local_100; int8 local_f8; int8 local_f0; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; ulong local_60; long local_58; long local_50; long local_40; uint local_38; int4 local_34; uint *local_30; uint *local_28; int8 local_18; long local_10; if (in_AL != '\0') { local_e8 = param_1; local_d8 = param_2; local_c8 = param_3; local_b8 = param_4; local_a8 = param_5; local_98 = param_6; local_88 = param_7; local_78 = param_8; } local_28 = local_118; local_30 = (uint *)&stack0x00000008; local_34 = 0x30; local_38 = 8; local_58 = 0; while( true ) { if (local_38 < 0x29) { local_130 = (uint *)((long)local_28 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_130 = local_30; local_30 = local_30 + 2; } local_40 = *(long *)local_130; if (local_40 == 0) break; if (local_38 < 0x29) { local_148 = (uint *)((long)local_28 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_148 = local_30; local_30 = local_30 + 2; } local_60 = (ulong)*local_148; local_58 = (local_60 + 7 & 0xfffffffffffffff8) + local_58; } local_110 = param_10; local_108 = param_11; local_100 = param_12; local_f8 = param_13; local_f0 = param_14; local_18 = param_9; local_10 = alloc_root(param_9,local_58); if (local_10 == 0) { local_10 = 0; } else { local_30 = (uint *)&stack0x00000008; local_38 = 8; local_50 = local_10; while( true ) { if (local_38 < 0x29) { local_160 = (uint *)((long)local_118 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_160 = local_30; local_30 = local_30 + 2; } if (*(long **)local_160 == (long *)0x0) break; **(long **)local_160 = local_50; if (local_38 < 0x29) { local_178 = (uint *)((long)local_118 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_178 = local_30; local_30 = local_30 + 2; } local_50 = ((ulong)*local_178 + 7 & 0xfffffffffffffff8) + local_50; } } return local_10; }
49,931
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
hkr04[P]cpp-mcp/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x6fc90 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x74a67 jmp 0x74a7f movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi movq 0x48(%rsp), %rsi callq 0x74500 addq $0x58, %rsp retq movb $0x1, 0x13(%rsp) movl $0x20, %edi callq 0xc440 movq 0x8(%rsp), %rdi movq %rax, (%rsp) callq 0x156d0 movq %rax, 0x20(%rsp) leaq 0x705a4(%rip), %rsi # 0xe504c leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0x74b40 jmp 0x74ab9 movq 0x8(%rsp), %rcx movq (%rsp), %rdi movl $0x131, %esi # imm = 0x131 leaq 0x28(%rsp), %rdx callq 0x15470 jmp 0x74ad3 movq (%rsp), %rdi movb $0x0, 0x13(%rsp) leaq 0xc7ff5(%rip), %rsi # 0x13cad8 leaq -0x5f36a(%rip), %rdx # 0x15780 callq 0xcdc0 jmp 0x74b37 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x74b19 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x28(%rsp), %rdi callq 0xcfd0 testb $0x1, 0x13(%rsp) jne 0x74b22 jmp 0x74b2b movq (%rsp), %rdi callq 0xc670 jmp 0x74b2d movq 0x18(%rsp), %rdi callq 0xce40 nopw (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: sub rsp, 58h mov [rsp+58h+var_8], rdi; char mov qword ptr [rsp+58h+var_10], rsi; int mov rdi, [rsp+58h+var_8] mov [rsp+58h+var_50], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_array(void) xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_74A67 jmp short loc_74A7F loc_74A67: mov rax, [rsp+58h+var_50] mov rdi, [rax+8] mov rsi, qword ptr [rsp+58h+var_10] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEixEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator[](ulong) add rsp, 58h retn loc_74A7F: mov [rsp+58h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+58h+var_50] mov [rsp+58h+var_58], rax; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+58h+var_38], rax; int lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+58h+var_30]; int lea rdx, [rsp+58h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) jmp short $+2 loc_74AB9: mov rcx, [rsp+58h+var_50] mov rdi, [rsp+58h+var_58]; int mov esi, 131h lea rdx, [rsp+58h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_74AD3: mov rdi, [rsp+58h+var_58]; void * mov [rsp+58h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( _QWORD **a1, long long a2) { int v3; // ecx int v4; // r8d int v5; // r9d int exception; // [rsp+0h] [rbp-58h] void *v7; // [rsp+0h] [rbp-58h] void *v8; // [rsp+8h] [rbp-50h] int v9; // [rsp+10h] [rbp-48h] long long v10; // [rsp+18h] [rbp-40h] int v11[2]; // [rsp+20h] [rbp-38h] BYREF int v12[8]; // [rsp+28h] [rbp-30h] BYREF int v13[2]; // [rsp+48h] [rbp-10h] void *v14; // [rsp+50h] [rbp-8h] v14 = a1; *(_QWORD *)v13 = a2; if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_array(a1) ) { HIBYTE(v9) = 1; exception = (unsigned int)__cxa_allocate_exception(0x20uLL); *(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( (int)v12, (int)"cannot use operator[] with a numeric argument with ", (int)v11, v3, v4, v5, exception, a1, v9, v10); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( (long long)v7, 305LL, (long long)v12, (long long)v8); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator[]( a1[1], *(long long *)v13); }
operator[]: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV RDI,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x8],RDI CALL 0x0016fc90 XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x00174a67 JMP 0x00174a7f LAB_00174a67: MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00174500 ADD RSP,0x58 RET LAB_00174a7f: MOV byte ptr [RSP + 0x13],0x1 MOV EDI,0x20 CALL 0x0010c440 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP],RAX CALL 0x001156d0 MOV qword ptr [RSP + 0x20],RAX LAB_00174aa1: LEA RSI,[0x1e504c] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x20] CALL 0x00174b40 JMP 0x00174ab9 LAB_00174ab9: MOV RCX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP] MOV ESI,0x131 LEA RDX,[RSP + 0x28] CALL 0x00115470 JMP 0x00174ad3 LAB_00174ad3: MOV RDI,qword ptr [RSP] MOV byte ptr [RSP + 0x13],0x0 LEA RSI,[0x23cad8] LEA RDX,[0x115780] CALL 0x0010cdc0
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { byte bVar1; int8 uVar2; char *local_38; detail local_30 [32]; ulong local_10; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_10 = param_1; local_8 = this; bVar1 = is_array(this); if ((bVar1 & 1) == 0) { uVar2 = __cxa_allocate_exception(0x20); local_38 = (char *)type_name(this); /* try { // try from 00174aa1 to 00174ab6 has its CatchHandler @ 00174af1 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_30,"cannot use operator[] with a numeric argument with ",&local_38); /* try { // try from 00174ab9 to 00174aee has its CatchHandler @ 00174b01 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x131,local_30,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::type_error::~type_error); } 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>>> ::operator[](*(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),local_10); return; }
49,932
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
hkr04[P]cpp-mcp/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0xecc3 movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0xa340 movq %rax, %rbx movq %r14, %rdi callq 0xd25a leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x3a765(%rip), %rsi # 0x4944a leaq 0x10(%rsp), %rdi callq 0xed46 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0xd10e xorl %ebp, %ebp leaq 0x67d90(%rip), %rsi # 0x76aa0 leaq 0x203(%rip), %rdx # 0xef1a movq %rbx, %rdi callq 0xaa70 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0xac20 testb %bpl, %bpl jne 0xed36 jmp 0xed3e movq %rax, %r14 movq %rbx, %rdi callq 0xa4e0 movq %r14, %rdi callq 0xaac0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_ECC3 mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_ECC3: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_ED36 jmp short loc_ED3E mov r14, rax loc_ED36: mov rdi, rbx; void * call ___cxa_free_exception loc_ED3E: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 0x131u, (long long)v4, a1); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x0010ecc3 MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0010ecc3: PUSH 0x20 POP RDI CALL 0x0010a340 MOV RBX,RAX MOV RDI,R14 CALL 0x0010d25a LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0010ecde: LEA RSI,[0x14944a] LEA RDI,[RSP + 0x10] CALL 0x0010ed46 MOV BPL,0x1 LAB_0010ecf2: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x0010d10e XOR EBP,EBP LEA RSI,[0x176aa0] LEA RDX,[0x10ef1a] MOV RDI,RBX CALL 0x0010aa70
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0010ecde to 0010ecee has its CatchHandler @ 0010ed33 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 0010ecf2 to 0010ed1e has its CatchHandler @ 0010ed1f */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
49,933
common_context_params_to_llama(common_params const&)
monkey531[P]llama/common/common.cpp
struct llama_context_params common_context_params_to_llama(const common_params & params) { auto cparams = llama_context_default_params(); cparams.n_ctx = params.n_ctx; cparams.n_seq_max = params.n_parallel; cparams.n_batch = params.n_batch; cparams.n_ubatch = params.n_ubatch; cparams.n_threads = params.cpuparams.n_threads; cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ? params.cpuparams.n_threads : params.cpuparams_batch.n_threads; cparams.logits_all = params.logits_all; cparams.embeddings = params.embedding; cparams.rope_scaling_type = params.rope_scaling_type; cparams.rope_freq_base = params.rope_freq_base; cparams.rope_freq_scale = params.rope_freq_scale; cparams.yarn_ext_factor = params.yarn_ext_factor; cparams.yarn_attn_factor = params.yarn_attn_factor; cparams.yarn_beta_fast = params.yarn_beta_fast; cparams.yarn_beta_slow = params.yarn_beta_slow; cparams.yarn_orig_ctx = params.yarn_orig_ctx; cparams.pooling_type = params.pooling_type; cparams.attention_type = params.attention_type; cparams.defrag_thold = params.defrag_thold; cparams.cb_eval = params.cb_eval; cparams.cb_eval_user_data = params.cb_eval_user_data; cparams.offload_kqv = !params.no_kv_offload; cparams.flash_attn = params.flash_attn; cparams.no_perf = params.no_perf; if (params.reranking) { cparams.embeddings = true; cparams.pooling_type = LLAMA_POOLING_TYPE_RANK; } cparams.type_k = params.cache_type_k; cparams.type_v = params.cache_type_v; return cparams; }
O0
cpp
common_context_params_to_llama(common_params const&): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rsi, 0x20(%rsp) callq 0x5b4e0 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rax movl 0x4(%rax), %eax movl %eax, (%rdi) movq 0x20(%rsp), %rax movl 0x18(%rax), %eax movl %eax, 0xc(%rdi) movq 0x20(%rsp), %rax movl 0x8(%rax), %eax movl %eax, 0x4(%rdi) movq 0x20(%rsp), %rax movl 0xc(%rax), %eax movl %eax, 0x8(%rdi) movq 0x20(%rsp), %rax movl 0x274(%rax), %eax movl %eax, 0x10(%rdi) movq 0x20(%rsp), %rax cmpl $-0x1, 0x488(%rax) jne 0xf2438 movq 0x20(%rsp), %rax movl 0x274(%rax), %eax movl %eax, 0xc(%rsp) jmp 0xf2447 movq 0x20(%rsp), %rax movl 0x488(%rax), %eax movl %eax, 0xc(%rsp) movq 0x18(%rsp), %rax movl 0xc(%rsp), %ecx movl %ecx, 0x14(%rax) movq 0x20(%rsp), %rcx movb 0xfe8(%rcx), %cl andb $0x1, %cl movb %cl, 0x60(%rax) movq 0x20(%rsp), %rcx movb 0x1038(%rcx), %cl andb $0x1, %cl movb %cl, 0x61(%rax) movq 0x20(%rsp), %rcx movl 0x6b4(%rcx), %ecx movl %ecx, 0x18(%rax) movq 0x20(%rsp), %rcx movss 0x2c(%rcx), %xmm0 movss %xmm0, 0x24(%rax) movq 0x20(%rsp), %rcx movss 0x30(%rcx), %xmm0 movss %xmm0, 0x28(%rax) movq 0x20(%rsp), %rcx movss 0x34(%rcx), %xmm0 movss %xmm0, 0x2c(%rax) movq 0x20(%rsp), %rcx movss 0x38(%rcx), %xmm0 movss %xmm0, 0x30(%rax) movq 0x20(%rsp), %rcx movss 0x3c(%rcx), %xmm0 movss %xmm0, 0x34(%rax) movq 0x20(%rsp), %rcx movss 0x40(%rcx), %xmm0 movss %xmm0, 0x38(%rax) movq 0x20(%rsp), %rcx movl 0x44(%rcx), %ecx movl %ecx, 0x3c(%rax) movq 0x20(%rsp), %rcx movl 0x6b8(%rcx), %ecx movl %ecx, 0x1c(%rax) movq 0x20(%rsp), %rcx movl 0x6bc(%rcx), %ecx movl %ecx, 0x20(%rax) movq 0x20(%rsp), %rcx movss 0x48(%rcx), %xmm0 movss %xmm0, 0x40(%rax) movq 0x20(%rsp), %rcx movq 0x6a0(%rcx), %rcx movq %rcx, 0x48(%rax) movq 0x20(%rsp), %rcx movq 0x6a8(%rcx), %rcx movq %rcx, 0x50(%rax) movq 0x20(%rsp), %rcx movb 0xfee(%rcx), %cl xorb $-0x1, %cl andb $0x1, %cl movb %cl, 0x62(%rax) movq 0x20(%rsp), %rcx movb 0xfe4(%rcx), %cl andb $0x1, %cl movb %cl, 0x63(%rax) movq 0x20(%rsp), %rcx movb 0xfe5(%rcx), %cl andb $0x1, %cl movb %cl, 0x64(%rax) movq 0x20(%rsp), %rax testb $0x1, 0x1080(%rax) je 0xf2587 movq 0x18(%rsp), %rax movb $0x1, 0x61(%rax) movl $0x4, 0x1c(%rax) movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq 0x20(%rsp), %rdx movl 0xff4(%rdx), %edx movl %edx, 0x58(%rcx) movq 0x20(%rsp), %rdx movl 0xff8(%rdx), %edx movl %edx, 0x5c(%rcx) addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_Z30common_context_params_to_llamaRK13common_params: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rax, rdi mov [rsp+28h+var_18], rax mov [rsp+28h+var_8], rsi call _llama_context_default_params mov rdi, [rsp+28h+var_10] mov rax, [rsp+28h+var_8] mov eax, [rax+4] mov [rdi], eax mov rax, [rsp+28h+var_8] mov eax, [rax+18h] mov [rdi+0Ch], eax mov rax, [rsp+28h+var_8] mov eax, [rax+8] mov [rdi+4], eax mov rax, [rsp+28h+var_8] mov eax, [rax+0Ch] mov [rdi+8], eax mov rax, [rsp+28h+var_8] mov eax, [rax+274h] mov [rdi+10h], eax mov rax, [rsp+28h+var_8] cmp dword ptr [rax+488h], 0FFFFFFFFh jnz short loc_F2438 mov rax, [rsp+28h+var_8] mov eax, [rax+274h] mov [rsp+28h+var_1C], eax jmp short loc_F2447 loc_F2438: mov rax, [rsp+28h+var_8] mov eax, [rax+488h] mov [rsp+28h+var_1C], eax loc_F2447: mov rax, [rsp+28h+var_10] mov ecx, [rsp+28h+var_1C] mov [rax+14h], ecx mov rcx, [rsp+28h+var_8] mov cl, [rcx+0FE8h] and cl, 1 mov [rax+60h], cl mov rcx, [rsp+28h+var_8] mov cl, [rcx+1038h] and cl, 1 mov [rax+61h], cl mov rcx, [rsp+28h+var_8] mov ecx, [rcx+6B4h] mov [rax+18h], ecx mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+2Ch] movss dword ptr [rax+24h], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+30h] movss dword ptr [rax+28h], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+34h] movss dword ptr [rax+2Ch], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+38h] movss dword ptr [rax+30h], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+3Ch] movss dword ptr [rax+34h], xmm0 mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+40h] movss dword ptr [rax+38h], xmm0 mov rcx, [rsp+28h+var_8] mov ecx, [rcx+44h] mov [rax+3Ch], ecx mov rcx, [rsp+28h+var_8] mov ecx, [rcx+6B8h] mov [rax+1Ch], ecx mov rcx, [rsp+28h+var_8] mov ecx, [rcx+6BCh] mov [rax+20h], ecx mov rcx, [rsp+28h+var_8] movss xmm0, dword ptr [rcx+48h] movss dword ptr [rax+40h], xmm0 mov rcx, [rsp+28h+var_8] mov rcx, [rcx+6A0h] mov [rax+48h], rcx mov rcx, [rsp+28h+var_8] mov rcx, [rcx+6A8h] mov [rax+50h], rcx mov rcx, [rsp+28h+var_8] mov cl, [rcx+0FEEh] xor cl, 0FFh and cl, 1 mov [rax+62h], cl mov rcx, [rsp+28h+var_8] mov cl, [rcx+0FE4h] and cl, 1 mov [rax+63h], cl mov rcx, [rsp+28h+var_8] mov cl, [rcx+0FE5h] and cl, 1 mov [rax+64h], cl mov rax, [rsp+28h+var_8] test byte ptr [rax+1080h], 1 jz short loc_F2587 mov rax, [rsp+28h+var_10] mov byte ptr [rax+61h], 1 mov dword ptr [rax+1Ch], 4 loc_F2587: mov rax, [rsp+28h+var_18] mov rcx, [rsp+28h+var_10] mov rdx, [rsp+28h+var_8] mov edx, [rdx+0FF4h] mov [rcx+58h], edx mov rdx, [rsp+28h+var_8] mov edx, [rdx+0FF8h] mov [rcx+5Ch], edx add rsp, 28h retn
const common_params * common_context_params_to_llama(const common_params *a1, long long a2) { const common_params *result; // rax int v3; // [rsp+Ch] [rbp-1Ch] llama_context_default_params(); *(_DWORD *)a1 = *(_DWORD *)(a2 + 4); *((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 24); *((_DWORD *)a1 + 1) = *(_DWORD *)(a2 + 8); *((_DWORD *)a1 + 2) = *(_DWORD *)(a2 + 12); *((_DWORD *)a1 + 4) = *(_DWORD *)(a2 + 628); if ( *(_DWORD *)(a2 + 1160) == -1 ) v3 = *(_DWORD *)(a2 + 628); else v3 = *(_DWORD *)(a2 + 1160); *((_DWORD *)a1 + 5) = v3; *((_BYTE *)a1 + 96) = *(_BYTE *)(a2 + 4072) & 1; *((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4152) & 1; *((_DWORD *)a1 + 6) = *(_DWORD *)(a2 + 1716); *((_DWORD *)a1 + 9) = *(_DWORD *)(a2 + 44); *((_DWORD *)a1 + 10) = *(_DWORD *)(a2 + 48); *((_DWORD *)a1 + 11) = *(_DWORD *)(a2 + 52); *((_DWORD *)a1 + 12) = *(_DWORD *)(a2 + 56); *((_DWORD *)a1 + 13) = *(_DWORD *)(a2 + 60); *((_DWORD *)a1 + 14) = *(_DWORD *)(a2 + 64); *((_DWORD *)a1 + 15) = *(_DWORD *)(a2 + 68); *((_DWORD *)a1 + 7) = *(_DWORD *)(a2 + 1720); *((_DWORD *)a1 + 8) = *(_DWORD *)(a2 + 1724); *((_DWORD *)a1 + 16) = *(_DWORD *)(a2 + 72); *((_QWORD *)a1 + 9) = *(_QWORD *)(a2 + 1696); *((_QWORD *)a1 + 10) = *(_QWORD *)(a2 + 1704); *((_BYTE *)a1 + 98) = (*(_BYTE *)(a2 + 4078) & 1) == 0; *((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4068) & 1; *((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4069) & 1; if ( (*(_BYTE *)(a2 + 4224) & 1) != 0 ) { *((_BYTE *)a1 + 97) = 1; *((_DWORD *)a1 + 7) = 4; } result = a1; *((_DWORD *)a1 + 22) = *(_DWORD *)(a2 + 4084); *((_DWORD *)a1 + 23) = *(_DWORD *)(a2 + 4088); return result; }
common_context_params_to_llama: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x20],RSI CALL 0x0015b4e0 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RDI],EAX MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x18] MOV dword ptr [RDI + 0xc],EAX MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RDI + 0x4],EAX MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RDI + 0x8],EAX MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x274] MOV dword ptr [RDI + 0x10],EAX MOV RAX,qword ptr [RSP + 0x20] CMP dword ptr [RAX + 0x488],-0x1 JNZ 0x001f2438 MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x274] MOV dword ptr [RSP + 0xc],EAX JMP 0x001f2447 LAB_001f2438: MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0x488] MOV dword ptr [RSP + 0xc],EAX LAB_001f2447: MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RSP + 0xc] MOV dword ptr [RAX + 0x14],ECX MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0xfe8] AND CL,0x1 MOV byte ptr [RAX + 0x60],CL MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0x1038] AND CL,0x1 MOV byte ptr [RAX + 0x61],CL MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x6b4] MOV dword ptr [RAX + 0x18],ECX MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x2c] MOVSS dword ptr [RAX + 0x24],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x30] MOVSS dword ptr [RAX + 0x28],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x34] MOVSS dword ptr [RAX + 0x2c],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x38] MOVSS dword ptr [RAX + 0x30],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x3c] MOVSS dword ptr [RAX + 0x34],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x40] MOVSS dword ptr [RAX + 0x38],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x44] MOV dword ptr [RAX + 0x3c],ECX MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x6b8] MOV dword ptr [RAX + 0x1c],ECX MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x6bc] MOV dword ptr [RAX + 0x20],ECX MOV RCX,qword ptr [RSP + 0x20] MOVSS XMM0,dword ptr [RCX + 0x48] MOVSS dword ptr [RAX + 0x40],XMM0 MOV RCX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RCX + 0x6a0] MOV qword ptr [RAX + 0x48],RCX MOV RCX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RCX + 0x6a8] MOV qword ptr [RAX + 0x50],RCX MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0xfee] XOR CL,0xff AND CL,0x1 MOV byte ptr [RAX + 0x62],CL MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0xfe4] AND CL,0x1 MOV byte ptr [RAX + 0x63],CL MOV RCX,qword ptr [RSP + 0x20] MOV CL,byte ptr [RCX + 0xfe5] AND CL,0x1 MOV byte ptr [RAX + 0x64],CL MOV RAX,qword ptr [RSP + 0x20] TEST byte ptr [RAX + 0x1080],0x1 JZ 0x001f2587 MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX + 0x61],0x1 MOV dword ptr [RAX + 0x1c],0x4 LAB_001f2587: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RDX + 0xff4] MOV dword ptr [RCX + 0x58],EDX MOV RDX,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RDX + 0xff8] MOV dword ptr [RCX + 0x5c],EDX ADD RSP,0x28 RET
/* common_context_params_to_llama(common_params const&) */ common_params * common_context_params_to_llama(common_params *param_1) { long in_RSI; int4 local_1c; llama_context_default_params(); *(int4 *)param_1 = *(int4 *)(in_RSI + 4); *(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18); *(int4 *)(param_1 + 4) = *(int4 *)(in_RSI + 8); *(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc); *(int4 *)(param_1 + 0x10) = *(int4 *)(in_RSI + 0x274); if (*(int *)(in_RSI + 0x488) == -1) { local_1c = *(int4 *)(in_RSI + 0x274); } else { local_1c = *(int4 *)(in_RSI + 0x488); } *(int4 *)(param_1 + 0x14) = local_1c; param_1[0x60] = (common_params)(*(byte *)(in_RSI + 0xfe8) & 1); param_1[0x61] = (common_params)(*(byte *)(in_RSI + 0x1038) & 1); *(int4 *)(param_1 + 0x18) = *(int4 *)(in_RSI + 0x6b4); *(int4 *)(param_1 + 0x24) = *(int4 *)(in_RSI + 0x2c); *(int4 *)(param_1 + 0x28) = *(int4 *)(in_RSI + 0x30); *(int4 *)(param_1 + 0x2c) = *(int4 *)(in_RSI + 0x34); *(int4 *)(param_1 + 0x30) = *(int4 *)(in_RSI + 0x38); *(int4 *)(param_1 + 0x34) = *(int4 *)(in_RSI + 0x3c); *(int4 *)(param_1 + 0x38) = *(int4 *)(in_RSI + 0x40); *(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44); *(int4 *)(param_1 + 0x1c) = *(int4 *)(in_RSI + 0x6b8); *(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc); *(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48); *(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0); *(int8 *)(param_1 + 0x50) = *(int8 *)(in_RSI + 0x6a8); param_1[0x62] = (common_params)((*(byte *)(in_RSI + 0xfee) ^ 0xff) & 1); param_1[99] = (common_params)(*(byte *)(in_RSI + 0xfe4) & 1); param_1[100] = (common_params)(*(byte *)(in_RSI + 0xfe5) & 1); if ((*(byte *)(in_RSI + 0x1080) & 1) != 0) { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int4 *)(param_1 + 0x58) = *(int4 *)(in_RSI + 0xff4); *(int4 *)(param_1 + 0x5c) = *(int4 *)(in_RSI + 0xff8); return param_1; }
49,934
common_context_params_to_llama(common_params const&)
monkey531[P]llama/common/common.cpp
struct llama_context_params common_context_params_to_llama(const common_params & params) { auto cparams = llama_context_default_params(); cparams.n_ctx = params.n_ctx; cparams.n_seq_max = params.n_parallel; cparams.n_batch = params.n_batch; cparams.n_ubatch = params.n_ubatch; cparams.n_threads = params.cpuparams.n_threads; cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ? params.cpuparams.n_threads : params.cpuparams_batch.n_threads; cparams.logits_all = params.logits_all; cparams.embeddings = params.embedding; cparams.rope_scaling_type = params.rope_scaling_type; cparams.rope_freq_base = params.rope_freq_base; cparams.rope_freq_scale = params.rope_freq_scale; cparams.yarn_ext_factor = params.yarn_ext_factor; cparams.yarn_attn_factor = params.yarn_attn_factor; cparams.yarn_beta_fast = params.yarn_beta_fast; cparams.yarn_beta_slow = params.yarn_beta_slow; cparams.yarn_orig_ctx = params.yarn_orig_ctx; cparams.pooling_type = params.pooling_type; cparams.attention_type = params.attention_type; cparams.defrag_thold = params.defrag_thold; cparams.cb_eval = params.cb_eval; cparams.cb_eval_user_data = params.cb_eval_user_data; cparams.offload_kqv = !params.no_kv_offload; cparams.flash_attn = params.flash_attn; cparams.no_perf = params.no_perf; if (params.reranking) { cparams.embeddings = true; cparams.pooling_type = LLAMA_POOLING_TYPE_RANK; } cparams.type_k = params.cache_type_k; cparams.type_v = params.cache_type_v; return cparams; }
O1
cpp
common_context_params_to_llama(common_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x1b0b0 movl 0x18(%r14), %eax movl %eax, 0xc(%rbx) movq 0x4(%r14), %rax movq %rax, (%rbx) movl 0xc(%r14), %eax movl %eax, 0x8(%rbx) movl 0x274(%r14), %eax movl %eax, 0x10(%rbx) movl 0x488(%r14), %ecx cmpl $-0x1, %ecx cmovel %eax, %ecx movl %ecx, 0x14(%rbx) movb 0xfe8(%r14), %al movb %al, 0x60(%rbx) movb 0x1038(%r14), %al movb %al, 0x61(%rbx) movups 0x2c(%r14), %xmm0 movups %xmm0, 0x24(%rbx) movsd 0x3c(%r14), %xmm0 movsd %xmm0, 0x34(%rbx) movl 0x44(%r14), %eax movl %eax, 0x3c(%rbx) movq 0x6b4(%r14), %rax movq %rax, 0x18(%rbx) movl 0x6bc(%r14), %eax movl %eax, 0x20(%rbx) movss 0x48(%r14), %xmm0 movss %xmm0, 0x40(%rbx) movups 0x6a0(%r14), %xmm0 movups %xmm0, 0x48(%rbx) movb 0xfee(%r14), %al xorb $0x1, %al movb %al, 0x62(%rbx) movb 0xfe4(%r14), %al movb %al, 0x63(%rbx) movb 0xfe5(%r14), %al movb %al, 0x64(%rbx) cmpb $0x1, 0x1080(%r14) jne 0x75d0f movb $0x1, 0x61(%rbx) movl $0x4, 0x1c(%rbx) movq 0xff4(%r14), %rax movq %rax, 0x58(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z30common_context_params_to_llamaRK13common_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi call _llama_context_default_params mov eax, [r14+18h] mov [rbx+0Ch], eax mov rax, [r14+4] mov [rbx], rax mov eax, [r14+0Ch] mov [rbx+8], eax mov eax, [r14+274h] mov [rbx+10h], eax mov ecx, [r14+488h] cmp ecx, 0FFFFFFFFh cmovz ecx, eax mov [rbx+14h], ecx mov al, [r14+0FE8h] mov [rbx+60h], al mov al, [r14+1038h] mov [rbx+61h], al movups xmm0, xmmword ptr [r14+2Ch] movups xmmword ptr [rbx+24h], xmm0 movsd xmm0, qword ptr [r14+3Ch] movsd qword ptr [rbx+34h], xmm0 mov eax, [r14+44h] mov [rbx+3Ch], eax mov rax, [r14+6B4h] mov [rbx+18h], rax mov eax, [r14+6BCh] mov [rbx+20h], eax movss xmm0, dword ptr [r14+48h] movss dword ptr [rbx+40h], xmm0 movups xmm0, xmmword ptr [r14+6A0h] movups xmmword ptr [rbx+48h], xmm0 mov al, [r14+0FEEh] xor al, 1 mov [rbx+62h], al mov al, [r14+0FE4h] mov [rbx+63h], al mov al, [r14+0FE5h] mov [rbx+64h], al cmp byte ptr [r14+1080h], 1 jnz short loc_75D0F mov byte ptr [rbx+61h], 1 mov dword ptr [rbx+1Ch], 4 loc_75D0F: mov rax, [r14+0FF4h] mov [rbx+58h], rax mov rax, rbx add rsp, 8 pop rbx pop r14 retn
const common_params * common_context_params_to_llama(const common_params *a1, long long a2) { int v2; // eax int v3; // ecx llama_context_default_params(a1); *((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 24); *(_QWORD *)a1 = *(_QWORD *)(a2 + 4); *((_DWORD *)a1 + 2) = *(_DWORD *)(a2 + 12); v2 = *(_DWORD *)(a2 + 628); *((_DWORD *)a1 + 4) = v2; v3 = *(_DWORD *)(a2 + 1160); if ( v3 == -1 ) v3 = v2; *((_DWORD *)a1 + 5) = v3; *((_BYTE *)a1 + 96) = *(_BYTE *)(a2 + 4072); *((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4152); *(_OWORD *)((char *)a1 + 36) = *(_OWORD *)(a2 + 44); *(_QWORD *)((char *)a1 + 52) = *(_QWORD *)(a2 + 60); *((_DWORD *)a1 + 15) = *(_DWORD *)(a2 + 68); *((_QWORD *)a1 + 3) = *(_QWORD *)(a2 + 1716); *((_DWORD *)a1 + 8) = *(_DWORD *)(a2 + 1724); *((_DWORD *)a1 + 16) = *(_DWORD *)(a2 + 72); *(_OWORD *)((char *)a1 + 72) = *(_OWORD *)(a2 + 1696); *((_BYTE *)a1 + 98) = *(_BYTE *)(a2 + 4078) ^ 1; *((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4068); *((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4069); if ( *(_BYTE *)(a2 + 4224) == 1 ) { *((_BYTE *)a1 + 97) = 1; *((_DWORD *)a1 + 7) = 4; } *((_QWORD *)a1 + 11) = *(_QWORD *)(a2 + 4084); return a1; }
common_context_params_to_llama: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CALL 0x0011b0b0 MOV EAX,dword ptr [R14 + 0x18] MOV dword ptr [RBX + 0xc],EAX MOV RAX,qword ptr [R14 + 0x4] MOV qword ptr [RBX],RAX MOV EAX,dword ptr [R14 + 0xc] MOV dword ptr [RBX + 0x8],EAX MOV EAX,dword ptr [R14 + 0x274] MOV dword ptr [RBX + 0x10],EAX MOV ECX,dword ptr [R14 + 0x488] CMP ECX,-0x1 CMOVZ ECX,EAX MOV dword ptr [RBX + 0x14],ECX MOV AL,byte ptr [R14 + 0xfe8] MOV byte ptr [RBX + 0x60],AL MOV AL,byte ptr [R14 + 0x1038] MOV byte ptr [RBX + 0x61],AL MOVUPS XMM0,xmmword ptr [R14 + 0x2c] MOVUPS xmmword ptr [RBX + 0x24],XMM0 MOVSD XMM0,qword ptr [R14 + 0x3c] MOVSD qword ptr [RBX + 0x34],XMM0 MOV EAX,dword ptr [R14 + 0x44] MOV dword ptr [RBX + 0x3c],EAX MOV RAX,qword ptr [R14 + 0x6b4] MOV qword ptr [RBX + 0x18],RAX MOV EAX,dword ptr [R14 + 0x6bc] MOV dword ptr [RBX + 0x20],EAX MOVSS XMM0,dword ptr [R14 + 0x48] MOVSS dword ptr [RBX + 0x40],XMM0 MOVUPS XMM0,xmmword ptr [R14 + 0x6a0] MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV AL,byte ptr [R14 + 0xfee] XOR AL,0x1 MOV byte ptr [RBX + 0x62],AL MOV AL,byte ptr [R14 + 0xfe4] MOV byte ptr [RBX + 0x63],AL MOV AL,byte ptr [R14 + 0xfe5] MOV byte ptr [RBX + 0x64],AL CMP byte ptr [R14 + 0x1080],0x1 JNZ 0x00175d0f MOV byte ptr [RBX + 0x61],0x1 MOV dword ptr [RBX + 0x1c],0x4 LAB_00175d0f: MOV RAX,qword ptr [R14 + 0xff4] MOV qword ptr [RBX + 0x58],RAX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* common_context_params_to_llama(common_params const&) */ common_params * common_context_params_to_llama(common_params *param_1) { int iVar1; int8 uVar2; int iVar3; long in_RSI; llama_context_default_params(); *(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18); *(int8 *)param_1 = *(int8 *)(in_RSI + 4); *(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc); iVar1 = *(int *)(in_RSI + 0x274); *(int *)(param_1 + 0x10) = iVar1; iVar3 = *(int *)(in_RSI + 0x488); if (*(int *)(in_RSI + 0x488) == -1) { iVar3 = iVar1; } *(int *)(param_1 + 0x14) = iVar3; param_1[0x60] = *(common_params *)(in_RSI + 0xfe8); param_1[0x61] = *(common_params *)(in_RSI + 0x1038); uVar2 = *(int8 *)(in_RSI + 0x34); *(int8 *)(param_1 + 0x24) = *(int8 *)(in_RSI + 0x2c); *(int8 *)(param_1 + 0x2c) = uVar2; *(int8 *)(param_1 + 0x34) = *(int8 *)(in_RSI + 0x3c); *(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44); *(int8 *)(param_1 + 0x18) = *(int8 *)(in_RSI + 0x6b4); *(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc); *(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48); uVar2 = *(int8 *)(in_RSI + 0x6a8); *(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0); *(int8 *)(param_1 + 0x50) = uVar2; param_1[0x62] = (common_params)(*(byte *)(in_RSI + 0xfee) ^ 1); param_1[99] = *(common_params *)(in_RSI + 0xfe4); param_1[100] = *(common_params *)(in_RSI + 0xfe5); if (*(char *)(in_RSI + 0x1080) == '\x01') { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int8 *)(param_1 + 0x58) = *(int8 *)(in_RSI + 0xff4); return param_1; }
49,935
common_context_params_to_llama(common_params const&)
monkey531[P]llama/common/common.cpp
struct llama_context_params common_context_params_to_llama(const common_params & params) { auto cparams = llama_context_default_params(); cparams.n_ctx = params.n_ctx; cparams.n_seq_max = params.n_parallel; cparams.n_batch = params.n_batch; cparams.n_ubatch = params.n_ubatch; cparams.n_threads = params.cpuparams.n_threads; cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ? params.cpuparams.n_threads : params.cpuparams_batch.n_threads; cparams.logits_all = params.logits_all; cparams.embeddings = params.embedding; cparams.rope_scaling_type = params.rope_scaling_type; cparams.rope_freq_base = params.rope_freq_base; cparams.rope_freq_scale = params.rope_freq_scale; cparams.yarn_ext_factor = params.yarn_ext_factor; cparams.yarn_attn_factor = params.yarn_attn_factor; cparams.yarn_beta_fast = params.yarn_beta_fast; cparams.yarn_beta_slow = params.yarn_beta_slow; cparams.yarn_orig_ctx = params.yarn_orig_ctx; cparams.pooling_type = params.pooling_type; cparams.attention_type = params.attention_type; cparams.defrag_thold = params.defrag_thold; cparams.cb_eval = params.cb_eval; cparams.cb_eval_user_data = params.cb_eval_user_data; cparams.offload_kqv = !params.no_kv_offload; cparams.flash_attn = params.flash_attn; cparams.no_perf = params.no_perf; if (params.reranking) { cparams.embeddings = true; cparams.pooling_type = LLAMA_POOLING_TYPE_RANK; } cparams.type_k = params.cache_type_k; cparams.type_v = params.cache_type_v; return cparams; }
O3
cpp
common_context_params_to_llama(common_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x1a0b0 movl 0x18(%r14), %eax movl %eax, 0xc(%rbx) movq 0x4(%r14), %rax movq %rax, (%rbx) movl 0xc(%r14), %eax movl %eax, 0x8(%rbx) movl 0x274(%r14), %eax movl %eax, 0x10(%rbx) movl 0x488(%r14), %ecx cmpl $-0x1, %ecx cmovel %eax, %ecx movl %ecx, 0x14(%rbx) movb 0xfe8(%r14), %al movb %al, 0x60(%rbx) movb 0x1038(%r14), %al movb %al, 0x61(%rbx) movups 0x2c(%r14), %xmm0 movups %xmm0, 0x24(%rbx) movsd 0x3c(%r14), %xmm0 movsd %xmm0, 0x34(%rbx) movl 0x44(%r14), %eax movl %eax, 0x3c(%rbx) movq 0x6b4(%r14), %rax movq %rax, 0x18(%rbx) movl 0x6bc(%r14), %eax movl %eax, 0x20(%rbx) movss 0x48(%r14), %xmm0 movss %xmm0, 0x40(%rbx) movups 0x6a0(%r14), %xmm0 movups %xmm0, 0x48(%rbx) movb 0xfee(%r14), %al xorb $0x1, %al movb %al, 0x62(%rbx) movb 0xfe4(%r14), %al movb %al, 0x63(%rbx) movb 0xfe5(%r14), %al movb %al, 0x64(%rbx) cmpb $0x1, 0x1080(%r14) jne 0x754a7 movb $0x1, 0x61(%rbx) movl $0x4, 0x1c(%rbx) movq 0xff4(%r14), %rax movq %rax, 0x58(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z30common_context_params_to_llamaRK13common_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi call _llama_context_default_params mov eax, [r14+18h] mov [rbx+0Ch], eax mov rax, [r14+4] mov [rbx], rax mov eax, [r14+0Ch] mov [rbx+8], eax mov eax, [r14+274h] mov [rbx+10h], eax mov ecx, [r14+488h] cmp ecx, 0FFFFFFFFh cmovz ecx, eax mov [rbx+14h], ecx mov al, [r14+0FE8h] mov [rbx+60h], al mov al, [r14+1038h] mov [rbx+61h], al movups xmm0, xmmword ptr [r14+2Ch] movups xmmword ptr [rbx+24h], xmm0 movsd xmm0, qword ptr [r14+3Ch] movsd qword ptr [rbx+34h], xmm0 mov eax, [r14+44h] mov [rbx+3Ch], eax mov rax, [r14+6B4h] mov [rbx+18h], rax mov eax, [r14+6BCh] mov [rbx+20h], eax movss xmm0, dword ptr [r14+48h] movss dword ptr [rbx+40h], xmm0 movups xmm0, xmmword ptr [r14+6A0h] movups xmmword ptr [rbx+48h], xmm0 mov al, [r14+0FEEh] xor al, 1 mov [rbx+62h], al mov al, [r14+0FE4h] mov [rbx+63h], al mov al, [r14+0FE5h] mov [rbx+64h], al cmp byte ptr [r14+1080h], 1 jnz short loc_754A7 mov byte ptr [rbx+61h], 1 mov dword ptr [rbx+1Ch], 4 loc_754A7: mov rax, [r14+0FF4h] mov [rbx+58h], rax mov rax, rbx add rsp, 8 pop rbx pop r14 retn
const common_params * common_context_params_to_llama(const common_params *a1, long long a2) { int v2; // eax int v3; // ecx llama_context_default_params(a1); *((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 24); *(_QWORD *)a1 = *(_QWORD *)(a2 + 4); *((_DWORD *)a1 + 2) = *(_DWORD *)(a2 + 12); v2 = *(_DWORD *)(a2 + 628); *((_DWORD *)a1 + 4) = v2; v3 = *(_DWORD *)(a2 + 1160); if ( v3 == -1 ) v3 = v2; *((_DWORD *)a1 + 5) = v3; *((_BYTE *)a1 + 96) = *(_BYTE *)(a2 + 4072); *((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4152); *(_OWORD *)((char *)a1 + 36) = *(_OWORD *)(a2 + 44); *(_QWORD *)((char *)a1 + 52) = *(_QWORD *)(a2 + 60); *((_DWORD *)a1 + 15) = *(_DWORD *)(a2 + 68); *((_QWORD *)a1 + 3) = *(_QWORD *)(a2 + 1716); *((_DWORD *)a1 + 8) = *(_DWORD *)(a2 + 1724); *((_DWORD *)a1 + 16) = *(_DWORD *)(a2 + 72); *(_OWORD *)((char *)a1 + 72) = *(_OWORD *)(a2 + 1696); *((_BYTE *)a1 + 98) = *(_BYTE *)(a2 + 4078) ^ 1; *((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4068); *((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4069); if ( *(_BYTE *)(a2 + 4224) == 1 ) { *((_BYTE *)a1 + 97) = 1; *((_DWORD *)a1 + 7) = 4; } *((_QWORD *)a1 + 11) = *(_QWORD *)(a2 + 4084); return a1; }
common_context_params_to_llama: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CALL 0x0011a0b0 MOV EAX,dword ptr [R14 + 0x18] MOV dword ptr [RBX + 0xc],EAX MOV RAX,qword ptr [R14 + 0x4] MOV qword ptr [RBX],RAX MOV EAX,dword ptr [R14 + 0xc] MOV dword ptr [RBX + 0x8],EAX MOV EAX,dword ptr [R14 + 0x274] MOV dword ptr [RBX + 0x10],EAX MOV ECX,dword ptr [R14 + 0x488] CMP ECX,-0x1 CMOVZ ECX,EAX MOV dword ptr [RBX + 0x14],ECX MOV AL,byte ptr [R14 + 0xfe8] MOV byte ptr [RBX + 0x60],AL MOV AL,byte ptr [R14 + 0x1038] MOV byte ptr [RBX + 0x61],AL MOVUPS XMM0,xmmword ptr [R14 + 0x2c] MOVUPS xmmword ptr [RBX + 0x24],XMM0 MOVSD XMM0,qword ptr [R14 + 0x3c] MOVSD qword ptr [RBX + 0x34],XMM0 MOV EAX,dword ptr [R14 + 0x44] MOV dword ptr [RBX + 0x3c],EAX MOV RAX,qword ptr [R14 + 0x6b4] MOV qword ptr [RBX + 0x18],RAX MOV EAX,dword ptr [R14 + 0x6bc] MOV dword ptr [RBX + 0x20],EAX MOVSS XMM0,dword ptr [R14 + 0x48] MOVSS dword ptr [RBX + 0x40],XMM0 MOVUPS XMM0,xmmword ptr [R14 + 0x6a0] MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV AL,byte ptr [R14 + 0xfee] XOR AL,0x1 MOV byte ptr [RBX + 0x62],AL MOV AL,byte ptr [R14 + 0xfe4] MOV byte ptr [RBX + 0x63],AL MOV AL,byte ptr [R14 + 0xfe5] MOV byte ptr [RBX + 0x64],AL CMP byte ptr [R14 + 0x1080],0x1 JNZ 0x001754a7 MOV byte ptr [RBX + 0x61],0x1 MOV dword ptr [RBX + 0x1c],0x4 LAB_001754a7: MOV RAX,qword ptr [R14 + 0xff4] MOV qword ptr [RBX + 0x58],RAX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* common_context_params_to_llama(common_params const&) */ common_params * common_context_params_to_llama(common_params *param_1) { int iVar1; int8 uVar2; int iVar3; long in_RSI; llama_context_default_params(); *(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18); *(int8 *)param_1 = *(int8 *)(in_RSI + 4); *(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc); iVar1 = *(int *)(in_RSI + 0x274); *(int *)(param_1 + 0x10) = iVar1; iVar3 = *(int *)(in_RSI + 0x488); if (*(int *)(in_RSI + 0x488) == -1) { iVar3 = iVar1; } *(int *)(param_1 + 0x14) = iVar3; param_1[0x60] = *(common_params *)(in_RSI + 0xfe8); param_1[0x61] = *(common_params *)(in_RSI + 0x1038); uVar2 = *(int8 *)(in_RSI + 0x34); *(int8 *)(param_1 + 0x24) = *(int8 *)(in_RSI + 0x2c); *(int8 *)(param_1 + 0x2c) = uVar2; *(int8 *)(param_1 + 0x34) = *(int8 *)(in_RSI + 0x3c); *(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44); *(int8 *)(param_1 + 0x18) = *(int8 *)(in_RSI + 0x6b4); *(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc); *(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48); uVar2 = *(int8 *)(in_RSI + 0x6a8); *(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0); *(int8 *)(param_1 + 0x50) = uVar2; param_1[0x62] = (common_params)(*(byte *)(in_RSI + 0xfee) ^ 1); param_1[99] = *(common_params *)(in_RSI + 0xfe4); param_1[100] = *(common_params *)(in_RSI + 0xfe5); if (*(char *)(in_RSI + 0x1080) == '\x01') { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int8 *)(param_1 + 0x58) = *(int8 *)(in_RSI + 0xff4); return param_1; }
49,936
ast_create_function_def
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_function_def(Arena* arena, AstNode* name, Parameter** params, AstNode** param_nodes, size_t param_count, Type* return_type, AstNode* body, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_FUNCTION_DEF, line, column); if (!node) { return NULL; } node->as.function_def.name = name; node->as.function_def.params = params; node->as.function_def.param_nodes = param_nodes; node->as.function_def.param_count = param_count; node->as.function_def.return_type = return_type; node->as.function_def.body = body; return node; }
O3
c
ast_create_function_def: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r9, %rbx movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq 0x38(%rsp), %rdx movq 0x40(%rsp), %rcx movl $0x1b, %esi callq 0x465c testq %rax, %rax je 0x4be3 movq 0x30(%rsp), %rcx movq %r13, 0x48(%rax) movq %r12, 0x50(%rax) movq %r15, 0x58(%rax) movq %r14, 0x60(%rax) movq %rbx, 0x68(%rax) movq %rcx, 0x70(%rax) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
ast_create_function_def: push r15 push r14 push r13 push r12 push rbx mov rbx, r9 mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rdx, [rsp+28h+arg_8] mov rcx, [rsp+28h+arg_10] mov esi, 1Bh call ast_create_node test rax, rax jz short loc_4BE3 mov rcx, [rsp+28h+arg_0] mov [rax+48h], r13 mov [rax+50h], r12 mov [rax+58h], r15 mov [rax+60h], r14 mov [rax+68h], rbx mov [rax+70h], rcx loc_4BE3: pop rbx pop r12 pop r13 pop r14 pop r15 retn
_QWORD * ast_create_function_def( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, long long a8, long long a9) { _QWORD *result; // rax result = (_QWORD *)ast_create_node(a1, 27, a8, a9); if ( result ) { result[9] = a2; result[10] = a3; result[11] = a4; result[12] = a5; result[13] = a6; result[14] = a7; } return result; }
ast_create_function_def: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,R9 MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RDX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x40] MOV ESI,0x1b CALL 0x0010465c TEST RAX,RAX JZ 0x00104be3 MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x48],R13 MOV qword ptr [RAX + 0x50],R12 MOV qword ptr [RAX + 0x58],R15 MOV qword ptr [RAX + 0x60],R14 MOV qword ptr [RAX + 0x68],RBX MOV qword ptr [RAX + 0x70],RCX LAB_00104be3: POP RBX POP R12 POP R13 POP R14 POP R15 RET
void ast_create_function_def (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9) { long lVar1; lVar1 = ast_create_node(param_1,0x1b,param_8,param_9); if (lVar1 != 0) { *(int8 *)(lVar1 + 0x48) = param_2; *(int8 *)(lVar1 + 0x50) = param_3; *(int8 *)(lVar1 + 0x58) = param_4; *(int8 *)(lVar1 + 0x60) = param_5; *(int8 *)(lVar1 + 0x68) = param_6; *(int8 *)(lVar1 + 0x70) = param_7; } return; }
49,937
js_thisBooleanValue
bluesky950520[P]quickjs/quickjs.c
static JSValue js_thisBooleanValue(JSContext *ctx, JSValue this_val) { if (JS_VALUE_GET_TAG(this_val) == JS_TAG_BOOL) return js_dup(this_val); if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(this_val); if (p->class_id == JS_CLASS_BOOLEAN) { if (JS_VALUE_GET_TAG(p->u.object_data) == JS_TAG_BOOL) return p->u.object_data; } } return JS_ThrowTypeError(ctx, "not a boolean"); }
O1
c
js_thisBooleanValue: pushq %rbx subq $0x10, %rsp movq %rsi, (%rsp) cmpl $-0x1, %edx je 0x7a852 cmpl $0x1, %edx jne 0x7a874 movq %rsi, %rbx movq %rsi, 0x8(%rsp) cmpl $-0x9, %edx jb 0x7a889 movq 0x8(%rsp), %rax incl (%rax) jmp 0x7a889 movq (%rsp), %rcx movb $0x1, %al cmpw $0x6, 0x6(%rcx) jne 0x7a870 movq 0x38(%rcx), %rdx cmpl $0x1, %edx jne 0x7a870 movq 0x30(%rcx), %rbx xorl %eax, %eax jmp 0x7a870 testb %al, %al je 0x7a889 leaq 0x2779f(%rip), %rsi # 0xa201a xorl %ebx, %ebx xorl %eax, %eax callq 0x22567 movl $0x6, %edx movq %rbx, %rax addq $0x10, %rsp popq %rbx retq
js_thisBooleanValue: push rbx sub rsp, 10h mov [rsp+18h+var_18], rsi cmp edx, 0FFFFFFFFh jz short loc_7A852 cmp edx, 1 jnz short loc_7A874 mov rbx, rsi mov [rsp+18h+var_10], rsi cmp edx, 0FFFFFFF7h jb short loc_7A889 mov rax, [rsp+18h+var_10] inc dword ptr [rax] jmp short loc_7A889 loc_7A852: mov rcx, [rsp+18h+var_18] mov al, 1 cmp word ptr [rcx+6], 6 jnz short loc_7A870 mov rdx, [rcx+38h] cmp edx, 1 jnz short loc_7A870 mov rbx, [rcx+30h] xor eax, eax jmp short $+2 loc_7A870: test al, al jz short loc_7A889 loc_7A874: lea rsi, aNotABoolean; "not a boolean" xor ebx, ebx xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_7A889: mov rax, rbx add rsp, 10h pop rbx retn
long long js_thisBooleanValue( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx char v15; // al if ( (_DWORD)a3 != -1 ) { if ( (_DWORD)a3 == 1 ) return a2; LABEL_8: v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a boolean", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a2); return v14; } a4 = a2; v15 = 1; if ( *(_WORD *)(a2 + 6) == 6 ) { a3 = *(_QWORD *)(a2 + 56); if ( (_DWORD)a3 == 1 ) { v14 = *(_QWORD *)(a2 + 48); v15 = 0; } } if ( v15 ) goto LABEL_8; return v14; }
49,938
js_thisBooleanValue
bluesky950520[P]quickjs/quickjs.c
static JSValue js_thisBooleanValue(JSContext *ctx, JSValue this_val) { if (JS_VALUE_GET_TAG(this_val) == JS_TAG_BOOL) return js_dup(this_val); if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(this_val); if (p->class_id == JS_CLASS_BOOLEAN) { if (JS_VALUE_GET_TAG(p->u.object_data) == JS_TAG_BOOL) return p->u.object_data; } } return JS_ThrowTypeError(ctx, "not a boolean"); }
O3
c
js_thisBooleanValue: pushq %rbx movq %rsi, %rbx cmpl $0x1, %edx je 0x7d1b9 cmpl $-0x1, %edx jne 0x7d1a4 cmpw $0x6, 0x6(%rbx) jne 0x7d1a4 movq 0x38(%rbx), %rdx cmpl $0x1, %edx jne 0x7d1a4 movq 0x30(%rbx), %rbx jmp 0x7d1b9 leaq 0x27e19(%rip), %rsi # 0xa4fc4 xorl %ebx, %ebx xorl %eax, %eax callq 0x22d8b movl $0x6, %edx movq %rbx, %rax popq %rbx retq
js_thisBooleanValue: push rbx mov rbx, rsi cmp edx, 1 jz short loc_7D1B9 cmp edx, 0FFFFFFFFh jnz short loc_7D1A4 cmp word ptr [rbx+6], 6 jnz short loc_7D1A4 mov rdx, [rbx+38h] cmp edx, 1 jnz short loc_7D1A4 mov rbx, [rbx+30h] jmp short loc_7D1B9 loc_7D1A4: lea rsi, aNotABoolean; "not a boolean" xor ebx, ebx xor eax, eax call JS_ThrowTypeError mov edx, 6 loc_7D1B9: mov rax, rbx pop rbx retn
long long js_thisBooleanValue( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx char v16; // [rsp+0h] [rbp-8h] v14 = a2; if ( (_DWORD)a3 != 1 ) { if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 6 && (a3 = *(_QWORD *)(a2 + 56), (_DWORD)a3 == 1) ) { return *(_QWORD *)(a2 + 48); } else { v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a boolean", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16); } } return v14; }
js_thisBooleanValue: PUSH RBX MOV RBX,RSI CMP EDX,0x1 JZ 0x0017d1b9 CMP EDX,-0x1 JNZ 0x0017d1a4 CMP word ptr [RBX + 0x6],0x6 JNZ 0x0017d1a4 MOV RDX,qword ptr [RBX + 0x38] CMP EDX,0x1 JNZ 0x0017d1a4 MOV RBX,qword ptr [RBX + 0x30] JMP 0x0017d1b9 LAB_0017d1a4: LEA RSI,[0x1a4fc4] XOR EBX,EBX XOR EAX,EAX CALL 0x00122d8b MOV EDX,0x6 LAB_0017d1b9: MOV RAX,RBX POP RBX RET
int1 [16] js_thisBooleanValue(int8 param_1,long param_2,int8 param_3) { int1 auVar1 [16]; if ((int)param_3 != 1) { if ((((int)param_3 == -1) && (*(short *)(param_2 + 6) == 6)) && (param_3 = *(int8 *)(param_2 + 0x38), (int)param_3 == 1)) { param_2 = *(long *)(param_2 + 0x30); } else { param_2 = 0; JS_ThrowTypeError(param_1,"not a boolean"); param_3 = 6; } } auVar1._8_8_ = param_3; auVar1._0_8_ = param_2; return auVar1; }
49,939
main
vsennov[P]tictactoe-course/tests/test_my_player.cpp
int main(int argc, char *argv[]) { std::cout << "Hello!\n"; if (argc >= 2) { std::srand(atoi(argv[1])); } ttt::game::State::Opts opts; opts.rows = opts.cols = 5; opts.win_len = 5; opts.max_moves = 0; ttt::my_player::MyPlayer p1("p1"), p2("p2"); ttt::my_player::ConsoleWriter obs; ttt::game::Game game(opts); game.add_player(ttt::game::Sign::X, &p1); game.add_player(ttt::game::Sign::O, &p2); game.add_observer(&obs); std::cout << "\n"; while (game.process() == ttt::game::MoveResult::OK) { for (int y = 0; y < opts.rows; ++y) { for (int x = 0; x < opts.cols; ++x) { char c = '.'; switch (game.get_state().get_value(x, y)) { case ttt::game::Sign::X: c = 'X'; break; case ttt::game::Sign::O: c = 'O'; break; default: break; } std::cout << c; } std::cout << "\n"; } std::cout << "\n"; } }
O0
cpp
main: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movl $0x0, -0x4(%rbp) movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq 0x5cf8(%rip), %rdi # 0x7fd8 leaq 0x2d1d(%rip), %rsi # 0x5004 callq 0x20a0 cmpl $0x2, -0x8(%rbp) jl 0x2306 movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi callq 0x2100 movl %eax, %edi callq 0x2090 movl $0x5, -0x1c(%rbp) movl $0x5, -0x20(%rbp) movl $0x5, -0x18(%rbp) movl $0x0, -0x14(%rbp) leaq 0x2ce3(%rip), %rsi # 0x500c leaq -0x38(%rbp), %rdi callq 0x2580 leaq 0x2cd6(%rip), %rsi # 0x500f leaq -0x50(%rbp), %rdi callq 0x2580 jmp 0x2344 leaq -0x68(%rbp), %rdi callq 0x25d0 leaq -0xb8(%rbp), %rdi leaq -0x20(%rbp), %rsi callq 0x2c90 jmp 0x235f leaq -0xb8(%rbp), %rdi xorl %esi, %esi leaq -0x38(%rbp), %rdx callq 0x2df0 jmp 0x2373 leaq -0xb8(%rbp), %rdi movl $0x1, %esi leaq -0x50(%rbp), %rdx callq 0x2df0 jmp 0x238a leaq -0xb8(%rbp), %rdi leaq -0x68(%rbp), %rsi callq 0x2f10 jmp 0x239c movq 0x5c35(%rip), %rdi # 0x7fd8 leaq 0x2c60(%rip), %rsi # 0x500a callq 0x20a0 jmp 0x23b1 jmp 0x23b3 leaq -0xb8(%rbp), %rdi callq 0x3160 movl %eax, -0xc8(%rbp) jmp 0x23c7 movl -0xc8(%rbp), %eax cmpl $0x0, %eax jne 0x2520 movl $0x0, -0xbc(%rbp) movl -0xbc(%rbp), %eax cmpl -0x20(%rbp), %eax jge 0x2506 movl $0x0, -0xc0(%rbp) movl -0xc0(%rbp), %eax cmpl -0x1c(%rbp), %eax jge 0x24db movb $0x2e, -0xc1(%rbp) leaq -0xb8(%rbp), %rdi callq 0x2d70 movq %rax, -0xd0(%rbp) jmp 0x2424 movq -0xd0(%rbp), %rdi movl -0xc0(%rbp), %esi movl -0xbc(%rbp), %edx callq 0x3f50 movl %eax, -0xd4(%rbp) jmp 0x2444 movl -0xd4(%rbp), %eax testl %eax, %eax je 0x249c jmp 0x2450 movl -0xd4(%rbp), %eax subl $0x1, %eax je 0x24a5 jmp 0x24ae movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x2565 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x2553 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0xb8(%rbp), %rdi callq 0x2610 jmp 0x2553 movb $0x58, -0xc1(%rbp) jmp 0x24b0 movb $0x4f, -0xc1(%rbp) jmp 0x24b0 jmp 0x24b0 movsbl -0xc1(%rbp), %esi movq 0x5b1a(%rip), %rdi # 0x7fd8 callq 0x20d0 jmp 0x24c5 jmp 0x24c7 movl -0xc0(%rbp), %eax addl $0x1, %eax movl %eax, -0xc0(%rbp) jmp 0x23f9 movq 0x5af6(%rip), %rdi # 0x7fd8 leaq 0x2b21(%rip), %rsi # 0x500a callq 0x20a0 jmp 0x24f0 jmp 0x24f2 movl -0xbc(%rbp), %eax addl $0x1, %eax movl %eax, -0xbc(%rbp) jmp 0x23e0 movq 0x5acb(%rip), %rdi # 0x7fd8 leaq 0x2af6(%rip), %rsi # 0x500a callq 0x20a0 jmp 0x251b jmp 0x23b3 leaq -0xb8(%rbp), %rdi callq 0x2610 leaq -0x68(%rbp), %rdi callq 0x2640 leaq -0x50(%rbp), %rdi callq 0x2660 leaq -0x38(%rbp), %rdi callq 0x2660 movl -0x4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq leaq -0x68(%rbp), %rdi callq 0x2640 leaq -0x50(%rbp), %rdi callq 0x2660 leaq -0x38(%rbp), %rdi callq 0x2660 movq -0x58(%rbp), %rdi callq 0x2130 nopw (%rax,%rax)
main: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_4], 0 mov [rbp+var_8], edi mov [rbp+var_10], rsi mov rdi, cs:_ZSt4cout_ptr lea rsi, aHello; "Hello!\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) cmp [rbp+var_8], 2 jl short loc_2306 mov rax, [rbp+var_10] mov rdi, [rax+8] call _atoi mov edi, eax call _srand loc_2306: mov [rbp+var_1C], 5 mov [rbp+var_20], 5 mov [rbp+var_18], 5 mov [rbp+var_14], 0 lea rsi, aP1; "p1" lea rdi, [rbp+var_38]; this call _ZN3ttt9my_player8MyPlayerC2EPKc; ttt::my_player::MyPlayer::MyPlayer(char const*) lea rsi, aP2; "p2" lea rdi, [rbp+var_50]; this call _ZN3ttt9my_player8MyPlayerC2EPKc; ttt::my_player::MyPlayer::MyPlayer(char const*) jmp short $+2 loc_2344: lea rdi, [rbp+var_68]; this call _ZN3ttt9my_player13ConsoleWriterC2Ev; ttt::my_player::ConsoleWriter::ConsoleWriter(void) lea rdi, [rbp+var_B8] lea rsi, [rbp+var_20] call _ZN3ttt4game4GameC2ERKNS0_5State4OptsE; ttt::game::Game::Game(ttt::game::State::Opts const&) jmp short $+2 loc_235F: lea rdi, [rbp+var_B8] xor esi, esi lea rdx, [rbp+var_38] call _ZN3ttt4game4Game10add_playerENS0_4SignEPNS0_7IPlayerE; ttt::game::Game::add_player(ttt::game::Sign,ttt::game::IPlayer *) jmp short $+2 loc_2373: lea rdi, [rbp+var_B8] mov esi, 1 lea rdx, [rbp+var_50] call _ZN3ttt4game4Game10add_playerENS0_4SignEPNS0_7IPlayerE; ttt::game::Game::add_player(ttt::game::Sign,ttt::game::IPlayer *) jmp short $+2 loc_238A: lea rdi, [rbp+var_B8]; this lea rsi, [rbp+var_68]; ttt::game::IObserver * call _ZN3ttt4game4Game12add_observerEPNS0_9IObserverE; ttt::game::Game::add_observer(ttt::game::IObserver *) jmp short $+2 loc_239C: mov rdi, cs:_ZSt4cout_ptr lea rsi, aHello+6; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_23B1: jmp short $+2 loc_23B3: lea rdi, [rbp+var_B8]; this call _ZN3ttt4game4Game7processEv; ttt::game::Game::process(void) mov [rbp+var_C8], eax jmp short $+2 loc_23C7: mov eax, [rbp+var_C8] cmp eax, 0 jnz loc_2520 mov [rbp+var_BC], 0 loc_23E0: mov eax, [rbp+var_BC] cmp eax, [rbp+var_20] jge loc_2506 mov [rbp+var_C0], 0 loc_23F9: mov eax, [rbp+var_C0] cmp eax, [rbp+var_1C] jge loc_24DB mov [rbp+var_C1], 2Eh ; '.' lea rdi, [rbp+var_B8]; this call _ZNK3ttt4game4Game9get_stateEv; ttt::game::Game::get_state(void) mov [rbp+var_D0], rax jmp short $+2 loc_2424: mov rdi, [rbp+var_D0]; this mov esi, [rbp+var_C0]; int mov edx, [rbp+var_BC]; int call _ZNK3ttt4game5State9get_valueEii; ttt::game::State::get_value(int,int) mov [rbp+var_D4], eax jmp short $+2 loc_2444: mov eax, [rbp+var_D4] test eax, eax jz short loc_249C jmp short $+2 loc_2450: mov eax, [rbp+var_D4] sub eax, 1 jz short loc_24A5 jmp short loc_24AE mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp loc_2565 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp loc_2553 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_B8]; this call _ZN3ttt4game4GameD2Ev; ttt::game::Game::~Game() jmp loc_2553 loc_249C: mov [rbp+var_C1], 58h ; 'X' jmp short loc_24B0 loc_24A5: mov [rbp+var_C1], 4Fh ; 'O' jmp short loc_24B0 loc_24AE: jmp short $+2 loc_24B0: movsx esi, [rbp+var_C1] mov rdi, cs:_ZSt4cout_ptr call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) jmp short $+2 loc_24C5: jmp short $+2 loc_24C7: mov eax, [rbp+var_C0] add eax, 1 mov [rbp+var_C0], eax jmp loc_23F9 loc_24DB: mov rdi, cs:_ZSt4cout_ptr lea rsi, aHello+6; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_24F0: jmp short $+2 loc_24F2: mov eax, [rbp+var_BC] add eax, 1 mov [rbp+var_BC], eax jmp loc_23E0 loc_2506: mov rdi, cs:_ZSt4cout_ptr lea rsi, aHello+6; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_251B: jmp loc_23B3 loc_2520: lea rdi, [rbp+var_B8]; this call _ZN3ttt4game4GameD2Ev; ttt::game::Game::~Game() lea rdi, [rbp+var_68]; this call _ZN3ttt9my_player13ConsoleWriterD2Ev; ttt::my_player::ConsoleWriter::~ConsoleWriter() lea rdi, [rbp+var_50]; this call _ZN3ttt9my_player8MyPlayerD2Ev; ttt::my_player::MyPlayer::~MyPlayer() lea rdi, [rbp+var_38]; this call _ZN3ttt9my_player8MyPlayerD2Ev; ttt::my_player::MyPlayer::~MyPlayer() mov eax, [rbp+var_4] add rsp, 0E0h pop rbp retn loc_2553: lea rdi, [rbp+var_68]; this call _ZN3ttt9my_player13ConsoleWriterD2Ev; ttt::my_player::ConsoleWriter::~ConsoleWriter() lea rdi, [rbp+var_50]; this call _ZN3ttt9my_player8MyPlayerD2Ev; ttt::my_player::MyPlayer::~MyPlayer() loc_2565: lea rdi, [rbp+var_38]; this call _ZN3ttt9my_player8MyPlayerD2Ev; ttt::my_player::MyPlayer::~MyPlayer() mov rdi, [rbp+var_58] call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { unsigned int v3; // eax long long v4; // rdx long long v5; // rdx int value; // [rsp+Ch] [rbp-D4h] ttt::game::State *state; // [rsp+10h] [rbp-D0h] char v9; // [rsp+1Fh] [rbp-C1h] int j; // [rsp+20h] [rbp-C0h] int i; // [rsp+24h] [rbp-BCh] _BYTE v12[80]; // [rsp+28h] [rbp-B8h] BYREF _BYTE v13[12]; // [rsp+78h] [rbp-68h] BYREF _BYTE v14[24]; // [rsp+90h] [rbp-50h] BYREF _BYTE v15[24]; // [rsp+A8h] [rbp-38h] BYREF int v16; // [rsp+C0h] [rbp-20h] BYREF int v17; // [rsp+C4h] [rbp-1Ch] int v18; // [rsp+C8h] [rbp-18h] int v19; // [rsp+CCh] [rbp-14h] const char **v20; // [rsp+D0h] [rbp-10h] int v21; // [rsp+D8h] [rbp-8h] int v22; // [rsp+DCh] [rbp-4h] v22 = 0; v21 = argc; v20 = argv; std::operator<<<std::char_traits<char>>(&std::cout, "Hello!\n", envp); if ( argc >= 2 ) { v3 = atoi(v20[1]); srand(v3); } v17 = 5; v16 = 5; v18 = 5; v19 = 0; ttt::my_player::MyPlayer::MyPlayer((ttt::my_player::MyPlayer *)v15, "p1"); ttt::my_player::MyPlayer::MyPlayer((ttt::my_player::MyPlayer *)v14, "p2"); ttt::my_player::ConsoleWriter::ConsoleWriter((ttt::my_player::ConsoleWriter *)v13); ttt::game::Game::Game(v12, &v16); ttt::game::Game::add_player(v12, 0LL, v15); ttt::game::Game::add_player(v12, 1LL, v14); ttt::game::Game::add_observer((ttt::game::Game *)v12, (ttt::game::IObserver *)v13); std::operator<<<std::char_traits<char>>(&std::cout, "\n", v4); while ( !(unsigned int)ttt::game::Game::process((ttt::game::Game *)v12) ) { for ( i = 0; i < v16; ++i ) { for ( j = 0; j < v17; ++j ) { v9 = 46; state = (ttt::game::State *)ttt::game::Game::get_state((ttt::game::Game *)v12); value = ttt::game::State::get_value(state, j, i); if ( value ) { if ( value == 1 ) v9 = 79; } else { v9 = 88; } std::operator<<<std::char_traits<char>>(&std::cout, (unsigned int)v9); } std::operator<<<std::char_traits<char>>(&std::cout, "\n", v5); } std::operator<<<std::char_traits<char>>(&std::cout, "\n", v5); } ttt::game::Game::~Game((ttt::game::Game *)v12); ttt::my_player::ConsoleWriter::~ConsoleWriter((ttt::my_player::ConsoleWriter *)v13); ttt::my_player::MyPlayer::~MyPlayer((ttt::my_player::MyPlayer *)v14); ttt::my_player::MyPlayer::~MyPlayer((ttt::my_player::MyPlayer *)v15); return v22; }
main: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV dword ptr [RBP + -0x4],0x0 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [0x00107fd8] LEA RSI,[0x105004] CALL 0x001020a0 CMP dword ptr [RBP + -0x8],0x2 JL 0x00102306 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00102100 MOV EDI,EAX CALL 0x00102090 LAB_00102306: MOV dword ptr [RBP + -0x1c],0x5 MOV dword ptr [RBP + -0x20],0x5 MOV dword ptr [RBP + -0x18],0x5 MOV dword ptr [RBP + -0x14],0x0 LEA RSI,[0x10500c] LEA RDI,[RBP + -0x38] CALL 0x00102580 LAB_00102332: LEA RSI,[0x10500f] LEA RDI,[RBP + -0x50] CALL 0x00102580 JMP 0x00102344 LAB_00102344: LEA RDI,[RBP + -0x68] CALL 0x001025d0 LAB_0010234d: LEA RDI,[RBP + -0xb8] LEA RSI,[RBP + -0x20] CALL 0x00102c90 JMP 0x0010235f LAB_0010235f: LEA RDI,[RBP + -0xb8] XOR ESI,ESI LEA RDX,[RBP + -0x38] CALL 0x00102df0 JMP 0x00102373 LAB_00102373: LEA RDI,[RBP + -0xb8] MOV ESI,0x1 LEA RDX,[RBP + -0x50] CALL 0x00102df0 JMP 0x0010238a LAB_0010238a: LEA RDI,[RBP + -0xb8] LEA RSI,[RBP + -0x68] CALL 0x00102f10 JMP 0x0010239c LAB_0010239c: MOV RDI,qword ptr [0x00107fd8] LEA RSI,[0x10500a] CALL 0x001020a0 JMP 0x001023b1 LAB_001023b1: JMP 0x001023b3 LAB_001023b3: LEA RDI,[RBP + -0xb8] CALL 0x00103160 MOV dword ptr [RBP + -0xc8],EAX JMP 0x001023c7 LAB_001023c7: MOV EAX,dword ptr [RBP + -0xc8] CMP EAX,0x0 JNZ 0x00102520 MOV dword ptr [RBP + -0xbc],0x0 LAB_001023e0: MOV EAX,dword ptr [RBP + -0xbc] CMP EAX,dword ptr [RBP + -0x20] JGE 0x00102506 MOV dword ptr [RBP + -0xc0],0x0 LAB_001023f9: MOV EAX,dword ptr [RBP + -0xc0] CMP EAX,dword ptr [RBP + -0x1c] JGE 0x001024db MOV byte ptr [RBP + -0xc1],0x2e LEA RDI,[RBP + -0xb8] CALL 0x00102d70 MOV qword ptr [RBP + -0xd0],RAX JMP 0x00102424 LAB_00102424: MOV RDI,qword ptr [RBP + -0xd0] MOV ESI,dword ptr [RBP + -0xc0] MOV EDX,dword ptr [RBP + -0xbc] CALL 0x00103f50 MOV dword ptr [RBP + -0xd4],EAX JMP 0x00102444 LAB_00102444: MOV EAX,dword ptr [RBP + -0xd4] TEST EAX,EAX JZ 0x0010249c JMP 0x00102450 LAB_00102450: MOV EAX,dword ptr [RBP + -0xd4] SUB EAX,0x1 JZ 0x001024a5 JMP 0x001024ae LAB_0010249c: MOV byte ptr [RBP + -0xc1],0x58 JMP 0x001024b0 LAB_001024a5: MOV byte ptr [RBP + -0xc1],0x4f JMP 0x001024b0 LAB_001024ae: JMP 0x001024b0 LAB_001024b0: MOVSX ESI,byte ptr [RBP + -0xc1] MOV RDI,qword ptr [0x00107fd8] CALL 0x001020d0 JMP 0x001024c5 LAB_001024c5: JMP 0x001024c7 LAB_001024c7: MOV EAX,dword ptr [RBP + -0xc0] ADD EAX,0x1 MOV dword ptr [RBP + -0xc0],EAX JMP 0x001023f9 LAB_001024db: MOV RDI,qword ptr [0x00107fd8] LEA RSI,[0x10500a] CALL 0x001020a0 JMP 0x001024f0 LAB_001024f0: JMP 0x001024f2 LAB_001024f2: MOV EAX,dword ptr [RBP + -0xbc] ADD EAX,0x1 MOV dword ptr [RBP + -0xbc],EAX JMP 0x001023e0 LAB_00102506: MOV RDI,qword ptr [0x00107fd8] LEA RSI,[0x10500a] CALL 0x001020a0 LAB_00102519: JMP 0x0010251b LAB_0010251b: JMP 0x001023b3 LAB_00102520: LEA RDI,[RBP + -0xb8] CALL 0x00102610 LEA RDI,[RBP + -0x68] CALL 0x00102640 LEA RDI,[RBP + -0x50] CALL 0x00102660 LEA RDI,[RBP + -0x38] CALL 0x00102660 MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xe0 POP RBP RET
int4 main(int param_1,long param_2) { uint __seed; int iVar1; State *this; char local_c9; int local_c8; int local_c4; Game local_c0 [80]; ConsoleWriter local_70 [24]; MyPlayer local_58 [24]; MyPlayer local_40 [24]; int local_28; int local_24; int4 local_20; int4 local_1c; long local_18; int local_10; int4 local_c; local_c = 0; local_18 = param_2; local_10 = param_1; std::operator<<((ostream *)PTR_cout_00107fd8,"Hello!\n"); if (1 < local_10) { __seed = atoi(*(char **)(local_18 + 8)); srand(__seed); } local_24 = 5; local_28 = 5; local_20 = 5; local_1c = 0; ttt::my_player::MyPlayer::MyPlayer(local_40,"p1"); /* try { // try from 00102332 to 00102341 has its CatchHandler @ 0010245d */ ttt::my_player::MyPlayer::MyPlayer(local_58,"p2"); ttt::my_player::ConsoleWriter::ConsoleWriter(local_70); /* try { // try from 0010234d to 0010235c has its CatchHandler @ 0010246e */ ttt::game::Game::Game(local_c0,(Opts *)&local_28); /* try { // try from 0010235f to 00102518 has its CatchHandler @ 0010247f */ ttt::game::Game::add_player(local_c0,0,local_40); ttt::game::Game::add_player(local_c0,1,local_58); ttt::game::Game::add_observer(local_c0,(IObserver *)local_70); std::operator<<((ostream *)PTR_cout_00107fd8,"\n"); while (iVar1 = ttt::game::Game::process(local_c0), iVar1 == 0) { for (local_c4 = 0; local_c4 < local_28; local_c4 = local_c4 + 1) { for (local_c8 = 0; local_c8 < local_24; local_c8 = local_c8 + 1) { local_c9 = '.'; this = (State *)ttt::game::Game::get_state(local_c0); iVar1 = ttt::game::State::get_value(this,local_c8,local_c4); if (iVar1 == 0) { local_c9 = 'X'; } else if (iVar1 == 1) { local_c9 = 'O'; } std::operator<<((ostream *)PTR_cout_00107fd8,local_c9); } std::operator<<((ostream *)PTR_cout_00107fd8,"\n"); } std::operator<<((ostream *)PTR_cout_00107fd8,"\n"); } ttt::game::Game::~Game(local_c0); ttt::my_player::ConsoleWriter::~ConsoleWriter(local_70); ttt::my_player::MyPlayer::~MyPlayer(local_58); ttt::my_player::MyPlayer::~MyPlayer(local_40); return local_c; }
49,940
main
vsennov[P]tictactoe-course/tests/test_my_player.cpp
int main(int argc, char *argv[]) { std::cout << "Hello!\n"; if (argc >= 2) { std::srand(atoi(argv[1])); } ttt::game::State::Opts opts; opts.rows = opts.cols = 5; opts.win_len = 5; opts.max_moves = 0; ttt::my_player::MyPlayer p1("p1"), p2("p2"); ttt::my_player::ConsoleWriter obs; ttt::game::Game game(opts); game.add_player(ttt::game::Sign::X, &p1); game.add_player(ttt::game::Sign::O, &p2); game.add_observer(&obs); std::cout << "\n"; while (game.process() == ttt::game::MoveResult::OK) { for (int y = 0; y < opts.rows; ++y) { for (int x = 0; x < opts.cols; ++x) { char c = '.'; switch (game.get_state().get_value(x, y)) { case ttt::game::Sign::X: c = 'X'; break; case ttt::game::Sign::O: c = 'O'; break; default: break; } std::cout << c; } std::cout << "\n"; } std::cout << "\n"; } }
O2
cpp
main: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rsi, %rbx movl %edi, %ebp movq 0x4d2f(%rip), %rdi # 0x5fd8 leaq 0x1d70(%rip), %rsi # 0x3020 callq 0x10b0 cmpl $0x2, %ebp jl 0x12ca movq 0x8(%rbx), %rdi callq 0x1100 movl %eax, %edi callq 0x10a0 movaps 0x1d3f(%rip), %xmm0 # 0x3010 leaq 0x10(%rsp), %rsi movaps %xmm0, (%rsi) leaq 0x49b8(%rip), %rax # 0x5c98 addq $0x10, %rax leaq 0x90(%rsp), %rbx movq %rax, (%rbx) pushq $0x2 popq %rcx movl %ecx, 0x8(%rbx) leaq 0x1d2c(%rip), %rdx # 0x3028 movq %rdx, 0x10(%rbx) movq %rax, 0x28(%rsp) movl %ecx, 0x30(%rsp) leaq 0x1d1b(%rip), %rax # 0x302b movq %rax, 0x38(%rsp) leaq 0x49fc(%rip), %rax # 0x5d18 addq $0x10, %rax movq %rax, 0x8(%rsp) leaq 0x40(%rsp), %r14 movq %r14, %rdi callq 0x1748 movq %r14, %rdi xorl %esi, %esi movq %rbx, %rdx callq 0x17ec leaq 0x40(%rsp), %rdi pushq $0x1 popq %rsi leaq 0x28(%rsp), %rdx callq 0x17ec leaq 0x40(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x1866 movq 0x4c71(%rip), %rdi # 0x5fd8 leaq 0x1cb8(%rip), %rsi # 0x3026 callq 0x10b0 leaq 0x40(%rsp), %rbx pushq $0x4f popq %r13 pushq $0x58 popq %r15 movq 0x4c51(%rip), %r14 # 0x5fd8 movq %rbx, %rdi callq 0x19c0 testl %eax, %eax jne 0x13fc xorl %ebp, %ebp cmpl 0x10(%rsp), %ebp jge 0x13eb xorl %r12d, %r12d cmpl 0x14(%rsp), %r12d jge 0x13d8 movq %rbx, %rdi callq 0x17d0 movq %rax, %rdi movl %r12d, %esi movl %ebp, %edx callq 0x2080 movl %r13d, %esi cmpl $0x1, %eax je 0x13c5 pushq $0x2e popq %rsi testl %eax, %eax cmovel %r15d, %esi movq %r14, %rdi callq 0x10d0 incl %r12d jmp 0x139e movq %r14, %rdi leaq 0x1c44(%rip), %rsi # 0x3026 callq 0x10b0 incl %ebp jmp 0x1395 movq %r14, %rdi leaq 0x1c31(%rip), %rsi # 0x3026 callq 0x10b0 jmp 0x1387 leaq 0x40(%rsp), %rdi callq 0x1436 xorl %eax, %eax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x1420 jmp 0x1420 jmp 0x1420 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x1436 movq %rbx, %rdi callq 0x1130 nop
main: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov rbx, rsi mov ebp, edi mov rdi, cs:_ZSt4cout_ptr lea rsi, aHello; "Hello!\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) cmp ebp, 2 jl short loc_12CA mov rdi, [rbx+8] call _atoi mov edi, eax call _srand loc_12CA: movaps xmm0, cs:xmmword_3010 lea rsi, [rsp+0D8h+var_C8] movaps xmmword ptr [rsi], xmm0 lea rax, _ZTVN3ttt9my_player8MyPlayerE; `vtable for'ttt::my_player::MyPlayer add rax, 10h lea rbx, [rsp+0D8h+var_48] mov [rbx], rax push 2 pop rcx mov [rbx+8], ecx lea rdx, aP1; "p1" mov [rbx+10h], rdx mov [rsp+0D8h+var_B0], rax mov [rsp+0D8h+var_A8], ecx lea rax, aP2; "p2" mov [rsp+0D8h+var_A0], rax lea rax, _ZTVN3ttt9my_player13ConsoleWriterE; `vtable for'ttt::my_player::ConsoleWriter add rax, 10h mov qword ptr [rsp+0D8h+var_D0], rax; int lea r14, [rsp+0D8h+var_98] mov rdi, r14; this call _ZN3ttt4game4GameC2ERKNS0_5State4OptsE; ttt::game::Game::Game(ttt::game::State::Opts const&) mov rdi, r14; this xor esi, esi mov rdx, rbx call _ZN3ttt4game4Game10add_playerENS0_4SignEPNS0_7IPlayerE; ttt::game::Game::add_player(ttt::game::Sign,ttt::game::IPlayer *) lea rdi, [rsp+0D8h+var_98]; this push 1 pop rsi lea rdx, [rsp+0D8h+var_B0] call _ZN3ttt4game4Game10add_playerENS0_4SignEPNS0_7IPlayerE; ttt::game::Game::add_player(ttt::game::Sign,ttt::game::IPlayer *) lea rdi, [rsp+0D8h+var_98]; this lea rsi, [rsp+0D8h+var_D0]; ttt::game::IObserver * call _ZN3ttt4game4Game12add_observerEPNS0_9IObserverE; ttt::game::Game::add_observer(ttt::game::IObserver *) mov rdi, cs:_ZSt4cout_ptr lea rsi, aHello+6; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rbx, [rsp+0D8h+var_98] push 4Fh ; 'O' pop r13 push 58h ; 'X' pop r15 mov r14, cs:_ZSt4cout_ptr loc_1387: mov rdi, rbx; this call _ZN3ttt4game4Game7processEv; ttt::game::Game::process(void) test eax, eax jnz short loc_13FC xor ebp, ebp loc_1395: cmp ebp, [rsp+0D8h+var_C8] jge short loc_13EB xor r12d, r12d loc_139E: cmp r12d, [rsp+0D8h+var_C4] jge short loc_13D8 mov rdi, rbx; this call _ZNK3ttt4game4Game9get_stateEv; ttt::game::Game::get_state(void) mov rdi, rax; this mov esi, r12d; int mov edx, ebp; int call _ZNK3ttt4game5State9get_valueEii; ttt::game::State::get_value(int,int) mov esi, r13d cmp eax, 1 jz short loc_13C5 push 2Eh ; '.' pop rsi loc_13C5: test eax, eax cmovz esi, r15d mov rdi, r14 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) inc r12d jmp short loc_139E loc_13D8: mov rdi, r14 lea rsi, aHello+6; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) inc ebp jmp short loc_1395 loc_13EB: mov rdi, r14 lea rsi, aHello+6; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short loc_1387 loc_13FC: lea rdi, [rsp+0D8h+var_98]; this call _ZN3ttt4game4GameD2Ev; ttt::game::Game::~Game() xor eax, eax add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_1420 jmp short loc_1420 jmp short $+2 loc_1420: mov rbx, rax lea rdi, [rsp+arg_38]; this call _ZN3ttt4game4GameD2Ev; ttt::game::Game::~Game() mov rdi, rbx call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { unsigned int v3; // eax long long v4; // rdx long long v5; // rdx int i; // ebp int j; // r12d ttt::game::State *state; // rax int value; // eax long long v10; // rsi int v12; // [rsp+0h] [rbp-D8h] int v13[2]; // [rsp+8h] [rbp-D0h] BYREF int v14; // [rsp+10h] [rbp-C8h] int v15; // [rsp+14h] [rbp-C4h] long long v16; // [rsp+18h] [rbp-C0h] long long *v17; // [rsp+28h] [rbp-B0h] int v18; // [rsp+30h] [rbp-A8h] const char *v19; // [rsp+38h] [rbp-A0h] _BYTE v20[80]; // [rsp+40h] [rbp-98h] BYREF long long *v21; // [rsp+90h] [rbp-48h] int v22; // [rsp+98h] [rbp-40h] const char *v23; // [rsp+A0h] [rbp-38h] std::operator<<<std::char_traits<char>>(&std::cout, "Hello!\n", envp); if ( argc >= 2 ) { v3 = atoi(argv[1]); srand(v3); } v16 = 5LL; v21 = &`vtable for'ttt::my_player::MyPlayer + 2; v22 = 2; v23 = "p1"; v17 = &`vtable for'ttt::my_player::MyPlayer + 2; v18 = 2; v19 = "p2"; ttt::game::Game::Game((ttt::game::Game *)v20, v12, (int)(&`vtable for'ttt::my_player::ConsoleWriter + 2), 5); ttt::game::Game::add_player((ttt::game::ComposedObserver *)v20); ttt::game::Game::add_player((ttt::game::ComposedObserver *)v20); ttt::game::Game::add_observer((ttt::game::Game *)v20, (ttt::game::IObserver *)v13); std::operator<<<std::char_traits<char>>(&std::cout, "\n", v4); while ( !(unsigned int)ttt::game::Game::process((ttt::game::Game *)v20) ) { for ( i = 0; i < v14; ++i ) { for ( j = 0; j < v15; ++j ) { state = (ttt::game::State *)ttt::game::Game::get_state((ttt::game::Game *)v20); value = ttt::game::State::get_value(state, j, i); v10 = 79LL; if ( value != 1 ) v10 = 46LL; if ( !value ) v10 = 88LL; std::operator<<<std::char_traits<char>>(&std::cout, v10); } std::operator<<<std::char_traits<char>>(&std::cout, "\n", v5); } std::operator<<<std::char_traits<char>>(&std::cout, "\n", v5); } ttt::game::Game::~Game((ttt::game::Game *)v20); return 0; }
main: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV RBX,RSI MOV EBP,EDI MOV RDI,qword ptr [0x00105fd8] LEA RSI,[0x103020] CALL 0x001010b0 CMP EBP,0x2 JL 0x001012ca MOV RDI,qword ptr [RBX + 0x8] CALL 0x00101100 MOV EDI,EAX CALL 0x001010a0 LAB_001012ca: MOVAPS XMM0,xmmword ptr [0x00103010] LEA RSI,[RSP + 0x10] MOVAPS xmmword ptr [RSI],XMM0 LEA RAX,[0x105c98] ADD RAX,0x10 LEA RBX,[RSP + 0x90] MOV qword ptr [RBX],RAX PUSH 0x2 POP RCX MOV dword ptr [RBX + 0x8],ECX LEA RDX,[0x103028] MOV qword ptr [RBX + 0x10],RDX MOV qword ptr [RSP + 0x28],RAX MOV dword ptr [RSP + 0x30],ECX LEA RAX,[0x10302b] MOV qword ptr [RSP + 0x38],RAX LEA RAX,[0x105d18] ADD RAX,0x10 MOV qword ptr [RSP + 0x8],RAX LEA R14,[RSP + 0x40] MOV RDI,R14 CALL 0x00101748 LAB_00101332: MOV RDI,R14 XOR ESI,ESI MOV RDX,RBX CALL 0x001017ec LEA RDI,[RSP + 0x40] PUSH 0x1 POP RSI LEA RDX,[RSP + 0x28] CALL 0x001017ec LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x8] CALL 0x00101866 MOV RDI,qword ptr [0x00105fd8] LEA RSI,[0x103026] CALL 0x001010b0 LEA RBX,[RSP + 0x40] PUSH 0x4f POP R13 PUSH 0x58 POP R15 MOV R14,qword ptr [0x00105fd8] LAB_00101387: MOV RDI,RBX CALL 0x001019c0 TEST EAX,EAX JNZ 0x001013fc XOR EBP,EBP LAB_00101395: CMP EBP,dword ptr [RSP + 0x10] JGE 0x001013eb XOR R12D,R12D LAB_0010139e: CMP R12D,dword ptr [RSP + 0x14] JGE 0x001013d8 LAB_001013a5: MOV RDI,RBX CALL 0x001017d0 MOV RDI,RAX MOV ESI,R12D MOV EDX,EBP CALL 0x00102080 MOV ESI,R13D CMP EAX,0x1 JZ 0x001013c5 PUSH 0x2e POP RSI LAB_001013c5: TEST EAX,EAX CMOVZ ESI,R15D MOV RDI,R14 CALL 0x001010d0 INC R12D JMP 0x0010139e LAB_001013d8: MOV RDI,R14 LEA RSI,[0x103026] CALL 0x001010b0 INC EBP JMP 0x00101395 LAB_001013eb: MOV RDI,R14 LEA RSI,[0x103026] CALL 0x001010b0 LAB_001013fa: JMP 0x00101387 LAB_001013fc: LEA RDI,[RSP + 0x40] CALL 0x00101436 XOR EAX,EAX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 main(int param_1,long param_2) { int *puVar1; uint __seed; int iVar2; int iVar3; State *this; char cVar4; int iVar5; int **local_d0; int8 local_c8; int8 uStack_c0; int **local_b0; int4 local_a8; int *local_a0; Game local_98 [80]; int **local_48; int4 local_40; int *local_38; std::operator<<((ostream *)PTR_cout_00105fd8,"Hello!\n"); if (1 < param_1) { __seed = atoi(*(char **)(param_2 + 8)); srand(__seed); } local_c8 = _DAT_00103010; uStack_c0 = _UNK_00103018; local_48 = &PTR_handle_event_00105ca8; local_a8 = 2; local_38 = &DAT_00103028; local_b0 = &PTR_handle_event_00105ca8; local_a0 = &DAT_0010302b; local_d0 = &PTR_handle_event_00105d28; local_40 = local_a8; ttt::game::Game::Game(local_98,(Opts *)&local_c8); /* try { // try from 00101332 to 00101372 has its CatchHandler @ 0010141a */ ttt::game::Game::add_player(local_98,0,&local_48); ttt::game::Game::add_player(local_98,1,&local_b0); ttt::game::Game::add_observer(local_98,(IObserver *)&local_d0); std::operator<<((ostream *)PTR_cout_00105fd8,"\n"); puVar1 = PTR_cout_00105fd8; while( true ) { /* try { // try from 00101387 to 0010138e has its CatchHandler @ 0010141c */ iVar2 = ttt::game::Game::process(local_98); if (iVar2 != 0) break; for (iVar2 = 0; iVar2 < (int)local_c8; iVar2 = iVar2 + 1) { for (iVar5 = 0; iVar5 < local_c8._4_4_; iVar5 = iVar5 + 1) { /* try { // try from 001013a5 to 001013d2 has its CatchHandler @ 00101420 */ this = (State *)ttt::game::Game::get_state(local_98); iVar3 = ttt::game::State::get_value(this,iVar5,iVar2); cVar4 = 'O'; if (iVar3 != 1) { cVar4 = '.'; } if (iVar3 == 0) { cVar4 = 'X'; } std::operator<<((ostream *)puVar1,cVar4); } /* try { // try from 001013d8 to 001013e6 has its CatchHandler @ 0010141e */ std::operator<<((ostream *)puVar1,"\n"); } /* try { // try from 001013eb to 001013f9 has its CatchHandler @ 0010141c */ std::operator<<((ostream *)puVar1,"\n"); } ttt::game::Game::~Game(local_98); return 0; }
49,941
testing::internal::RE::Init(char const*)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc
void RE::Init(const char* regex) { pattern_ = regex; // NetBSD (and Android, which takes its regex implemntation from NetBSD) does // not include the GNU regex extensions (such as Perl style character classes // like \w) in REG_EXTENDED. REG_EXTENDED is only specified to include the // [[:alpha:]] style character classes. Enable REG_GNU wherever it is defined // so users can use those extensions. #if defined(REG_GNU) constexpr int reg_flags = REG_EXTENDED | REG_GNU; #else constexpr int reg_flags = REG_EXTENDED; #endif // Reserves enough bytes to hold the regular expression used for a // full match. const size_t full_regex_len = strlen(regex) + 10; char* const full_pattern = new char[full_regex_len]; snprintf(full_pattern, full_regex_len, "^(%s)$", regex); is_valid_ = regcomp(&full_regex_, full_pattern, reg_flags) == 0; // We want to call regcomp(&partial_regex_, ...) even if the // previous expression returns false. Otherwise partial_regex_ may // not be properly initialized can may cause trouble when it's // freed. // // Some implementation of POSIX regex (e.g. on at least some // versions of Cygwin) doesn't accept the empty string as a valid // regex. We change it to an equivalent form "()" to be safe. if (is_valid_) { const char* const partial_regex = (*regex == '\0') ? "()" : regex; is_valid_ = regcomp(&partial_regex_, partial_regex, reg_flags) == 0; } EXPECT_TRUE(is_valid_) << "Regular expression \"" << regex << "\" is not a valid POSIX Extended regular expression."; delete[] full_pattern; }
O0
cpp
testing::internal::RE::Init(char const*): subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rdi movq %rdi, 0x40(%rsp) movq 0xb8(%rsp), %rsi callq 0x1243b0 movl $0x1, 0xb4(%rsp) movq 0xb8(%rsp), %rdi callq 0x152e0 addq $0xa, %rax movq %rax, 0xa8(%rsp) movq 0xa8(%rsp), %rdi callq 0x15050 movq %rax, 0xa0(%rsp) movq 0xa0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xb8(%rsp), %rcx leaq 0x5ba2c(%rip), %rdx # 0x155055 movb $0x0, %al callq 0x15ca0 movq 0x40(%rsp), %rdi addq $0x28, %rdi movq 0xa0(%rsp), %rsi movl $0x1, %edx callq 0x15880 movl %eax, %ecx movq 0x40(%rsp), %rax cmpl $0x0, %ecx sete %cl andb $0x1, %cl movb %cl, 0x20(%rax) testb $0x1, 0x20(%rax) je 0xf96ca movq 0xb8(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0xf9682 leaq 0x55cc6(%rip), %rax # 0x14f341 movq %rax, 0x38(%rsp) jmp 0xf968f movq 0xb8(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rax movq %rax, 0x98(%rsp) addq $0x68, %rdi movq 0x98(%rsp), %rsi movl $0x1, %edx callq 0x15880 movl %eax, %ecx movq 0x40(%rsp), %rax cmpl $0x0, %ecx sete %cl andb $0x1, %cl movb %cl, 0x20(%rax) movq 0x40(%rsp), %rsi addq $0x20, %rsi xorl %eax, %eax movl %eax, %edx leaq 0x88(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x1235b0 movq 0x28(%rsp), %rdi callq 0x1e120 movb %al, 0x37(%rsp) jmp 0xf96f9 movb 0x37(%rsp), %al testb $0x1, %al jne 0xf9703 jmp 0xf971e jmp 0xf984e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xf9880 leaq 0x70(%rsp), %rdi callq 0x101550 jmp 0xf972a leaq 0x5b92b(%rip), %rsi # 0x15505c leaq 0x70(%rsp), %rdi callq 0x124cf0 movq %rax, 0x20(%rsp) jmp 0xf9742 movq 0x20(%rsp), %rdi leaq 0xb8(%rsp), %rsi callq 0x552b0 movq %rax, 0x18(%rsp) jmp 0xf975b movq 0x18(%rsp), %rdi leaq 0x5b90a(%rip), %rsi # 0x155071 callq 0x124d30 movq %rax, 0x10(%rsp) jmp 0xf9773 leaq 0x5b991(%rip), %rdx # 0x15510b leaq 0x58d76(%rip), %rcx # 0x1524f7 leaq 0x58d6a(%rip), %r8 # 0x1524f2 leaq 0x48(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0xf98a0 jmp 0xf979c leaq 0x48(%rsp), %rdi callq 0x20e00 movq %rax, %r8 leaq 0x5b8f5(%rip), %rdx # 0x1550a5 leaq 0x68(%rsp), %rdi movl $0x1, %esi movl $0x2e9, %ecx # imm = 0x2E9 callq 0xfd2e0 jmp 0xf97c6 movq 0x10(%rsp), %rsi leaq 0x68(%rsp), %rdi callq 0xf9a20 jmp 0xf97d7 leaq 0x68(%rsp), %rdi callq 0xfd370 leaq 0x48(%rsp), %rdi callq 0x1c160 leaq 0x70(%rsp), %rdi callq 0x1e140 jmp 0xf984e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xf9842 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0xf9838 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x68(%rsp), %rdi callq 0xfd370 leaq 0x48(%rsp), %rdi callq 0x1c160 leaq 0x70(%rsp), %rdi callq 0x1e140 jmp 0xf9880 leaq 0x88(%rsp), %rdi callq 0x1e150 movq 0xa0(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, %rax je 0xf9878 movq 0x8(%rsp), %rdi callq 0x159f0 addq $0xc8, %rsp retq leaq 0x88(%rsp), %rdi callq 0x1e150 movq 0x80(%rsp), %rdi callq 0x15dd0 nopw (%rax,%rax)
_ZN7testing8internal2RE4InitEPKc: sub rsp, 0C8h mov qword ptr [rsp+0C8h+var_8], rdi mov qword ptr [rsp+0C8h+var_10], rsi mov rdi, qword ptr [rsp+0C8h+var_8] mov qword ptr [rsp+0C8h+var_88], rdi; __int16 mov rsi, qword ptr [rsp+0C8h+var_10] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) mov [rsp+0C8h+var_14], 1 mov rdi, qword ptr [rsp+0C8h+var_10] call _strlen add rax, 0Ah mov [rsp+0C8h+var_20], rax mov rdi, [rsp+0C8h+var_20]; unsigned __int64 call __Znam; operator new[](ulong) mov [rsp+0C8h+var_28], rax mov rdi, [rsp+0C8h+var_28] mov rsi, [rsp+0C8h+var_20] mov rcx, qword ptr [rsp+0C8h+var_10] lea rdx, aS; "^(%s)$" mov al, 0 call _snprintf mov rdi, qword ptr [rsp+0C8h+var_88] add rdi, 28h ; '(' mov rsi, [rsp+0C8h+var_28] mov edx, 1 call _regcomp mov ecx, eax mov rax, qword ptr [rsp+0C8h+var_88] cmp ecx, 0 setz cl and cl, 1 mov [rax+20h], cl test byte ptr [rax+20h], 1 jz short loc_F96CA mov rax, qword ptr [rsp+0C8h+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_F9682 lea rax, aPoppedLoad+0Bh; "()" mov qword ptr [rsp+0C8h+var_90], rax jmp short loc_F968F loc_F9682: mov rax, qword ptr [rsp+0C8h+var_10] mov qword ptr [rsp+0C8h+var_90], rax; int loc_F968F: mov rdi, qword ptr [rsp+0C8h+var_88] mov rax, qword ptr [rsp+0C8h+var_90] mov [rsp+0C8h+var_30], rax add rdi, 68h ; 'h' mov rsi, [rsp+0C8h+var_30] mov edx, 1 call _regcomp mov ecx, eax mov rax, qword ptr [rsp+0C8h+var_88] cmp ecx, 0 setz cl and cl, 1 mov [rax+20h], cl loc_F96CA: mov rsi, qword ptr [rsp+0C8h+var_88] add rsi, 20h ; ' ' xor eax, eax mov edx, eax lea rdi, [rsp+0C8h+var_40] mov qword ptr [rsp+0C8h+var_A0], rdi; int call _ZN7testing15AssertionResultC2IbEERKT_PNSt9enable_ifIXntsr3std14is_convertibleIS2_S0_EE5valueEvE4typeE mov rdi, qword ptr [rsp+0C8h+var_A0] call _ZNK7testing15AssertionResultcvbEv; testing::AssertionResult::operator bool(void) mov [rsp+0C8h+var_91], al jmp short $+2 loc_F96F9: mov al, [rsp+0C8h+var_91] test al, 1 jnz short loc_F9703 jmp short loc_F971E loc_F9703: jmp loc_F984E mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp loc_F9880 loc_F971E: lea rdi, [rsp+0C8h+var_58]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) jmp short $+2 loc_F972A: lea rsi, aRegularExpress; "Regular expression \"" lea rdi, [rsp+0C8h+var_58] call _ZN7testing7MessagelsIA21_cEERS0_RKT_; testing::Message::operator<<<char [21]>(char [21] const&) mov qword ptr [rsp+0C8h+var_A8], rax; int jmp short $+2 loc_F9742: mov rdi, qword ptr [rsp+0C8h+var_A8] lea rsi, [rsp+0C8h+var_10] call _ZN7testing7MessagelsIKcEERS0_RKPT_; testing::Message::operator<<<char const>(char const * const&) mov qword ptr [rsp+0C8h+var_B0], rax; int jmp short $+2 loc_F975B: mov rdi, qword ptr [rsp+0C8h+var_B0] lea rsi, aIsNotAValidPos; "\" is not a valid POSIX Extended regula"... call _ZN7testing7MessagelsIA52_cEERS0_RKT_; testing::Message::operator<<<char [52]>(char [52] const&) mov [rsp+0C8h+var_B8], rax; int jmp short $+2 loc_F9773: lea rdx, aIsValid; "is_valid_" lea rcx, aFalse; "false" lea r8, aTrue; "true" lea rdi, [rsp+0C8h+var_80] lea rsi, [rsp+0C8h+var_40] call _ZN7testing8internal30GetBoolAssertionFailureMessageB5cxx11ERKNS_15AssertionResultEPKcS5_S5_; testing::internal::GetBoolAssertionFailureMessage(testing::AssertionResult const&,char const*,char const*,char const*) jmp short $+2 loc_F979C: lea rdi, [rsp+0C8h+var_80] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov r8, rax; int lea rdx, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+0C8h+var_60]; int mov esi, 1; int mov ecx, 2E9h; int call _ZN7testing8internal12AssertHelperC2ENS_14TestPartResult4TypeEPKciS5_; testing::internal::AssertHelper::AssertHelper(testing::TestPartResult::Type,char const*,int,char const*) jmp short $+2 loc_F97C6: mov rsi, [rsp+0C8h+var_B8]; int lea rdi, [rsp+0C8h+var_60]; char call _ZNK7testing8internal12AssertHelperaSERKNS_7MessageE; testing::internal::AssertHelper::operator=(testing::Message const&) jmp short $+2 loc_F97D7: lea rdi, [rsp+0C8h+var_60]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() lea rdi, [rsp+0C8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_58]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_F984E mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_F9842 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_F9838 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_60]; this call _ZN7testing8internal12AssertHelperD2Ev; testing::internal::AssertHelper::~AssertHelper() loc_F9838: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_F9842: lea rdi, [rsp+arg_68]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp short loc_F9880 loc_F984E: lea rdi, [rsp+0C8h+var_40]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() mov rax, [rsp+0C8h+var_28] mov [rsp+0C8h+var_C0], rax cmp rax, 0 jz short loc_F9878 mov rdi, [rsp+0C8h+var_C0]; void * call __ZdaPv; operator delete[](void *) loc_F9878: add rsp, 0C8h retn loc_F9880: lea rdi, [rsp+arg_80]; this call _ZN7testing15AssertionResultD2Ev; testing::AssertionResult::~AssertionResult() mov rdi, [rsp+arg_78] call __Unwind_Resume
void testing::internal::RE::Init(testing::internal::RE *this, const char *a2) { int v2; // r9d int v3; // eax int v4; // r9d void *v5; // [rsp+0h] [rbp-C8h] int v6; // [rsp+0h] [rbp-C8h] int v7; // [rsp+8h] [rbp-C0h] int v8; // [rsp+8h] [rbp-C0h] long long v9; // [rsp+10h] [rbp-B8h] int v10; // [rsp+10h] [rbp-B8h] long long v11; // [rsp+18h] [rbp-B0h] long long v12; // [rsp+20h] [rbp-A8h] int v13; // [rsp+30h] [rbp-98h] char *v14; // [rsp+38h] [rbp-90h] long long v15; // [rsp+48h] [rbp-80h] BYREF char v16; // [rsp+50h] [rbp-78h] int v17; // [rsp+58h] [rbp-70h] int v18; // [rsp+60h] [rbp-68h] char v19[4]; // [rsp+68h] [rbp-60h] BYREF char v20[24]; // [rsp+70h] [rbp-58h] BYREF _BYTE v21[16]; // [rsp+88h] [rbp-40h] BYREF char *v22; // [rsp+98h] [rbp-30h] void *v23; // [rsp+A0h] [rbp-28h] unsigned long long v24; // [rsp+A8h] [rbp-20h] int v25; // [rsp+B4h] [rbp-14h] int v26[2]; // [rsp+B8h] [rbp-10h] BYREF __int16 v27[4]; // [rsp+C0h] [rbp-8h] *(_QWORD *)v27 = this; *(_QWORD *)v26 = a2; std::string::operator=(this, a2); v25 = 1; v24 = strlen(a2) + 10; v23 = (void *)operator new[](v24); snprintf(v23, v24, "^(%s)$", a2); *((_BYTE *)this + 32) = (unsigned int)regcomp((char *)this + 40, v23, 1LL) == 0; if ( (*((_BYTE *)this + 32) & 1) != 0 ) { if ( **(_BYTE **)v26 ) v14 = *(char **)v26; else v14 = "()"; v22 = v14; *((_BYTE *)this + 32) = (unsigned int)regcomp((char *)this + 104, v14, 1LL) == 0; } testing::AssertionResult::AssertionResult<bool>(v21, (char *)this + 32, 0LL); if ( (testing::AssertionResult::operator bool(v21) & 1) == 0 ) { testing::Message::Message((testing::Message *)v20); v12 = testing::Message::operator<<<char [21]>(v20, "Regular expression \""); v11 = testing::Message::operator<<<char const>(v12, v26); v9 = testing::Message::operator<<<char [52]>(v11, "\" is not a valid POSIX Extended regular expression."); testing::internal::GetBoolAssertionFailureMessage[abi:cxx11]( (unsigned int)&v15, (unsigned int)v21, (unsigned int)"is_valid_", (unsigned int)"false", (unsigned int)"true", v2); v3 = std::string::c_str((long long)&v15); testing::internal::AssertHelper::AssertHelper( (int)v19, 1, (int)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc", 745, v3, v4, v5, v7, v9); testing::internal::AssertHelper::operator=( (char)v19, v10, v6, v8, v10, v11, v12, (int)v21, v13, (int)v14, (__int16)this, v15, v16, v17, v18, *(int *)v19, v20[0]); testing::internal::AssertHelper::~AssertHelper((testing::internal::AssertHelper *)v19); std::string::~string(&v15); testing::Message::~Message((testing::Message *)v20); } testing::AssertionResult::~AssertionResult((testing::AssertionResult *)v21); if ( v23 ) operator delete[](v23); }
Init: SUB RSP,0xc8 MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV RDI,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x40],RDI MOV RSI,qword ptr [RSP + 0xb8] CALL 0x002243b0 MOV dword ptr [RSP + 0xb4],0x1 MOV RDI,qword ptr [RSP + 0xb8] CALL 0x001152e0 ADD RAX,0xa MOV qword ptr [RSP + 0xa8],RAX MOV RDI,qword ptr [RSP + 0xa8] CALL 0x00115050 MOV qword ptr [RSP + 0xa0],RAX MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0xa8] MOV RCX,qword ptr [RSP + 0xb8] LEA RDX,[0x255055] MOV AL,0x0 CALL 0x00115ca0 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0x28 MOV RSI,qword ptr [RSP + 0xa0] MOV EDX,0x1 CALL 0x00115880 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x40] CMP ECX,0x0 SETZ CL AND CL,0x1 MOV byte ptr [RAX + 0x20],CL TEST byte ptr [RAX + 0x20],0x1 JZ 0x001f96ca MOV RAX,qword ptr [RSP + 0xb8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x001f9682 LEA RAX,[0x24f341] MOV qword ptr [RSP + 0x38],RAX JMP 0x001f968f LAB_001f9682: MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x38],RAX LAB_001f968f: MOV RDI,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x98],RAX ADD RDI,0x68 MOV RSI,qword ptr [RSP + 0x98] MOV EDX,0x1 CALL 0x00115880 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x40] CMP ECX,0x0 SETZ CL AND CL,0x1 MOV byte ptr [RAX + 0x20],CL LAB_001f96ca: MOV RSI,qword ptr [RSP + 0x40] ADD RSI,0x20 XOR EAX,EAX MOV EDX,EAX LEA RDI,[RSP + 0x88] MOV qword ptr [RSP + 0x28],RDI CALL 0x002235b0 MOV RDI,qword ptr [RSP + 0x28] LAB_001f96ee: CALL 0x0011e120 MOV byte ptr [RSP + 0x37],AL JMP 0x001f96f9 LAB_001f96f9: MOV AL,byte ptr [RSP + 0x37] TEST AL,0x1 JNZ 0x001f9703 JMP 0x001f971e LAB_001f9703: JMP 0x001f984e LAB_001f971e: LEA RDI,[RSP + 0x70] CALL 0x00201550 JMP 0x001f972a LAB_001f972a: LEA RSI,[0x25505c] LEA RDI,[RSP + 0x70] CALL 0x00224cf0 MOV qword ptr [RSP + 0x20],RAX JMP 0x001f9742 LAB_001f9742: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0xb8] CALL 0x001552b0 MOV qword ptr [RSP + 0x18],RAX JMP 0x001f975b LAB_001f975b: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x255071] CALL 0x00224d30 MOV qword ptr [RSP + 0x10],RAX JMP 0x001f9773 LAB_001f9773: LEA RDX,[0x25510b] LEA RCX,[0x2524f7] LEA R8,[0x2524f2] LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x88] CALL 0x001f98a0 JMP 0x001f979c LAB_001f979c: LEA RDI,[RSP + 0x48] CALL 0x00120e00 MOV R8,RAX LAB_001f97a9: LEA RDX,[0x2550a5] LEA RDI,[RSP + 0x68] MOV ESI,0x1 MOV ECX,0x2e9 CALL 0x001fd2e0 JMP 0x001f97c6 LAB_001f97c6: MOV RSI,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x68] CALL 0x001f9a20 LAB_001f97d5: JMP 0x001f97d7 LAB_001f97d7: LEA RDI,[RSP + 0x68] CALL 0x001fd370 LEA RDI,[RSP + 0x48] CALL 0x0011c160 LEA RDI,[RSP + 0x70] CALL 0x0011e140 JMP 0x001f984e LAB_001f984e: LEA RDI,[RSP + 0x88] CALL 0x0011e150 MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x8],RAX CMP RAX,0x0 JZ 0x001f9878 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001159f0 LAB_001f9878: ADD RSP,0xc8 RET
/* testing::internal::RE::Init(char const*) */ void __thiscall testing::internal::RE::Init(RE *this,char *param_1) { bool bVar1; int iVar2; size_t sVar3; Message *pMVar4; int8 uVar5; char *local_90; internal local_80 [32]; AssertHelper local_60 [8]; Message local_58 [24]; AssertionResult local_40 [16]; char *local_30; char *local_28; size_t local_20; int4 local_14; char *local_10; RE *local_8; local_10 = param_1; local_8 = this; std::__cxx11::string::operator=((string *)this,param_1); local_14 = 1; sVar3 = strlen(local_10); local_20 = sVar3 + 10; local_28 = (char *)operator_new__(local_20); snprintf(local_28,local_20,"^(%s)$",local_10); iVar2 = regcomp((regex_t *)(this + 0x28),local_28,1); this[0x20] = (RE)(iVar2 == 0); if (((byte)this[0x20] & 1) != 0) { if (*local_10 == '\0') { local_90 = "()"; } else { local_90 = local_10; } local_30 = local_90; iVar2 = regcomp((regex_t *)(this + 0x68),local_90,1); this[0x20] = (RE)(iVar2 == 0); } AssertionResult::AssertionResult<bool>(local_40,(bool *)(this + 0x20),(type *)0x0); /* try { // try from 001f96ee to 001f9727 has its CatchHandler @ 001f9708 */ bVar1 = AssertionResult::operator_cast_to_bool(local_40); if (!bVar1) { Message::Message(local_58); /* try { // try from 001f972a to 001f9799 has its CatchHandler @ 001f97f7 */ pMVar4 = Message::operator<<(local_58,"Regular expression \""); pMVar4 = Message::operator<<(pMVar4,&local_10); pMVar4 = Message::operator<<(pMVar4,"\" is not a valid POSIX Extended regular expression."); GetBoolAssertionFailureMessage_abi_cxx11_(local_80,local_40,"is_valid_","false","true"); uVar5 = std::__cxx11::string::c_str((string *)local_80); /* try { // try from 001f97a9 to 001f97c3 has its CatchHandler @ 001f980a */ AssertHelper::AssertHelper (local_60,1, "/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-port.cc" ,0x2e9,uVar5); /* try { // try from 001f97c6 to 001f97d4 has its CatchHandler @ 001f981d */ AssertHelper::operator=(local_60,pMVar4); AssertHelper::~AssertHelper(local_60); std::__cxx11::string::~string((string *)local_80); Message::~Message(local_58); } AssertionResult::~AssertionResult(local_40); if (local_28 != (char *)0x0) { operator_delete__(local_28); } return; }
49,942
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/minja.hpp
static std::string error_location_suffix(const std::string & source, size_t pos) { auto get_line = [&](size_t line) { auto start = source.begin(); for (size_t i = 1; i < line; ++i) { start = std::find(start, source.end(), '\n') + 1; } auto end = std::find(start, source.end(), '\n'); return std::string(start, end); }; auto start = source.begin(); auto end = source.end(); auto it = start + pos; auto line = std::count(start, it, '\n') + 1; auto max_line = std::count(start, end, '\n') + 1; auto col = pos - std::string(start, it).rfind('\n'); std::ostringstream out; out << " at row " << line << ", column " << col << ":\n"; if (line > 1) out << get_line(line - 1) << "\n"; out << get_line(line) << "\n"; out << std::string(col - 1, ' ') << "^\n"; if (line < max_line) out << get_line(line + 1) << "\n"; return out.str(); }
O0
cpp
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): subq $0xb8, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq %rdx, 0xa0(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x18(%rsp) movq (%rax), %rdi callq 0x5a390 movq %rax, 0x98(%rsp) movq $0x1, 0x90(%rsp) movq 0x90(%rsp), %rax cmpq 0xa0(%rsp), %rax jae 0x1d9f4e movq 0x18(%rsp), %rax movq 0x98(%rsp), %rcx movq %rcx, 0x78(%rsp) movq (%rax), %rdi callq 0x5b260 movq %rax, 0x70(%rsp) movb $0xa, 0x6f(%rsp) movq 0x78(%rsp), %rdi movq 0x70(%rsp), %rsi leaq 0x6f(%rsp), %rdx callq 0x146020 movq %rax, 0x80(%rsp) leaq 0x80(%rsp), %rdi movl $0x1, %esi callq 0x10eb40 movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x90(%rsp), %rax addq $0x1, %rax movq %rax, 0x90(%rsp) jmp 0x1d9eb5 movq 0x18(%rsp), %rax movq 0x98(%rsp), %rcx movq %rcx, 0x58(%rsp) movq (%rax), %rdi callq 0x5b260 movq %rax, 0x50(%rsp) movb $0xa, 0x4f(%rsp) movq 0x58(%rsp), %rdi movq 0x50(%rsp), %rsi leaq 0x4f(%rsp), %rdx callq 0x146020 movq %rax, 0x60(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x37(%rsp), %rdi movq %rdi, (%rsp) callq 0x5b0e0 movq 0x8(%rsp), %rdi movq (%rsp), %rcx movq 0x40(%rsp), %rsi movq 0x38(%rsp), %rdx callq 0xe7fd0 jmp 0x1d9fca leaq 0x37(%rsp), %rdi callq 0x5b560 movq 0x10(%rsp), %rax addq $0xb8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x37(%rsp), %rdi callq 0x5b560 movq 0x28(%rsp), %rdi callq 0x5aba0 nopw %cs:(%rax,%rax)
_ZZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmENK3$_0clB5cxx11Em_0: sub rsp, 0B8h mov [rsp+0B8h+var_B0], rdi mov rax, rdi mov [rsp+0B8h+var_A8], rax mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi mov [rsp+0B8h+var_18], rdx mov rax, [rsp+0B8h+var_10] mov [rsp+0B8h+var_A0], rax mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5beginEv; std::string::begin(void) mov [rsp+0B8h+var_20], rax mov [rsp+0B8h+var_28], 1 loc_1D9EB5: mov rax, [rsp+0B8h+var_28] cmp rax, [rsp+0B8h+var_18] jnb loc_1D9F4E mov rax, [rsp+0B8h+var_A0] mov rcx, [rsp+0B8h+var_20] mov [rsp+0B8h+var_40], rcx mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+0B8h+var_48], rax mov [rsp+0B8h+var_49], 0Ah mov rdi, [rsp+0B8h+var_40] mov rsi, [rsp+0B8h+var_48] lea rdx, [rsp+0B8h+var_49] call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcET_SB_SB_RKT0_; std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&) mov [rsp+0B8h+var_38], rax lea rdi, [rsp+0B8h+var_38] mov esi, 1 call _ZNK9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEplEl; __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(long) mov [rsp+0B8h+var_30], rax mov rax, [rsp+0B8h+var_30] mov [rsp+0B8h+var_20], rax mov rax, [rsp+0B8h+var_28] add rax, 1 mov [rsp+0B8h+var_28], rax jmp loc_1D9EB5 loc_1D9F4E: mov rax, [rsp+0B8h+var_A0] mov rcx, [rsp+0B8h+var_20] mov [rsp+0B8h+var_60], rcx mov rdi, [rax] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE3endEv; std::string::end(void) mov [rsp+0B8h+var_68], rax mov [rsp+0B8h+var_69], 0Ah mov rdi, [rsp+0B8h+var_60] mov rsi, [rsp+0B8h+var_68] lea rdx, [rsp+0B8h+var_69] call _ZSt4findIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcET_SB_SB_RKT0_; std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,char const&) mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_78], rax mov rax, [rsp+0B8h+var_58] mov [rsp+0B8h+var_80], rax lea rdi, [rsp+0B8h+var_81] mov [rsp+0B8h+var_B8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+0B8h+var_B0] mov rcx, [rsp+0B8h+var_B8] mov rsi, [rsp+0B8h+var_78] mov rdx, [rsp+0B8h+var_80] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IN9__gnu_cxx17__normal_iteratorIPKcS4_EEvEET_SB_RKS3_; std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<char> const&) jmp short $+2 loc_1D9FCA: lea rdi, [rsp+0B8h+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+0B8h+var_A8] add rsp, 0B8h retn mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_2F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+arg_20] call __Unwind_Resume
long long minja::error_location_suffix(std::string const&,unsigned long)::$_0::operator()[abi:cxx11]( long long a1, _QWORD *a2, unsigned long long a3) { long long v3; // rsi char v5; // [rsp+37h] [rbp-81h] BYREF long long v6; // [rsp+38h] [rbp-80h] long long v7; // [rsp+40h] [rbp-78h] char v8; // [rsp+4Fh] [rbp-69h] BYREF long long v9; // [rsp+50h] [rbp-68h] long long v10; // [rsp+58h] [rbp-60h] long long v11; // [rsp+60h] [rbp-58h] char v12; // [rsp+6Fh] [rbp-49h] BYREF long long v13; // [rsp+70h] [rbp-48h] long long v14; // [rsp+78h] [rbp-40h] long long v15; // [rsp+80h] [rbp-38h] BYREF long long v16; // [rsp+88h] [rbp-30h] unsigned long long i; // [rsp+90h] [rbp-28h] long long v18; // [rsp+98h] [rbp-20h] unsigned long long v19; // [rsp+A0h] [rbp-18h] _QWORD *v20; // [rsp+A8h] [rbp-10h] long long v21; // [rsp+B0h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; v18 = std::string::begin(*a2); for ( i = 1LL; i < v19; ++i ) { v14 = v18; v13 = std::string::end(*a2); v12 = 10; v15 = std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v14, v13, (long long)&v12); v16 = __gnu_cxx::__normal_iterator<char const*,std::string>::operator+(&v15, 1LL); v18 = v16; } v10 = v18; v9 = std::string::end(*a2); v8 = 10; v3 = v9; v11 = std::find<__gnu_cxx::__normal_iterator<char const*,std::string>,char>(v10, v9, (long long)&v8); v7 = v18; v6 = v11; std::allocator<char>::allocator(&v5, v3); std::string::basic_string<__gnu_cxx::__normal_iterator<char const*,std::string>,void>(a1, v7, v6, (long long)&v5); std::allocator<char>::~allocator(&v5); return a1; }
49,943
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/minja.hpp
static std::string error_location_suffix(const std::string & source, size_t pos) { auto get_line = [&](size_t line) { auto start = source.begin(); for (size_t i = 1; i < line; ++i) { start = std::find(start, source.end(), '\n') + 1; } auto end = std::find(start, source.end(), '\n'); return std::string(start, end); }; auto start = source.begin(); auto end = source.end(); auto it = start + pos; auto line = std::count(start, it, '\n') + 1; auto max_line = std::count(start, end, '\n') + 1; auto col = pos - std::string(start, it).rfind('\n'); std::ostringstream out; out << " at row " << line << ", column " << col << ":\n"; if (line > 1) out << get_line(line - 1) << "\n"; out << get_line(line) << "\n"; out << std::string(col - 1, ' ') << "^\n"; if (line < max_line) out << get_line(line + 1) << "\n"; return out.str(); }
O3
cpp
minja::error_location_suffix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rdx, %r8 movq %rsi, %r14 movq %rdi, 0x38(%rsp) movq (%rsi), %rsi movq 0x8(%r14), %rax testq %rdx, %rdx je 0xd7b82 xorl %ecx, %ecx xorl %r12d, %r12d xorl %edx, %edx cmpb $0xa, (%rsi,%rcx) sete %dl addq %rdx, %r12 incq %rcx cmpq %rcx, %r8 jne 0xd7b6c jmp 0xd7b85 xorl %r12d, %r12d leaq (%rsi,%r8), %rdx testq %rax, %rax movq %r8, 0x28(%rsp) je 0xd7baf xorl %ecx, %ecx xorl %r15d, %r15d xorl %edi, %edi cmpb $0xa, (%rsi,%rcx) sete %dil addq %rdi, %r15 incq %rcx cmpq %rcx, %rax jne 0xd7b98 jmp 0xd7bb2 xorl %r15d, %r15d leaq 0x50(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x40(%rsp), %rbx movq %rbx, %rdi callq 0x70172 movq %rbx, %rdi movl $0xa, %esi movq $-0x1, %rdx callq 0x1b160 movq %rax, %r13 movq (%rbx), %rdi cmpq %rbp, %rdi je 0xd7bf4 movq 0x50(%rsp), %rsi incq %rsi callq 0x1a8f0 leaq 0x40(%rsp), %rbx movq %rbx, %rdi callq 0x1aba0 leaq 0x18e11(%rip), %rsi # 0xf0a19 movl $0x8, %edx movq %rbx, %rdi callq 0x1aa10 movq 0x28(%rsp), %rbx leaq 0x1(%r12), %rsi leaq 0x40(%rsp), %rdi movq %rsi, 0x30(%rsp) callq 0x1a860 movq %rax, %rbp leaq 0x15338(%rip), %rsi # 0xecf70 movl $0x9, %edx movq %rax, %rdi callq 0x1aa10 subq %r13, %rbx movq %rbp, %rdi movq %rbx, %rsi callq 0x1a610 leaq 0x1cbd5(%rip), %rsi # 0xf482f movl $0x2, %edx movq %rax, %rdi callq 0x1aa10 testq %r12, %r12 jle 0xd7d16 movq (%r14), %r13 cmpq $0x1, %r12 jne 0xd7c7e movq %r13, %rsi jmp 0xd7caa leaq -0x1(%r12), %rbp movq (%r14), %rsi addq 0x8(%r14), %rsi movb $0xa, 0x7(%rsp) movq %r13, %rdi leaq 0x7(%rsp), %rdx callq 0x98940 movq %rax, %r13 incq %r13 decq %rbp jne 0xd7c83 movq (%r14), %rsi addq 0x8(%r14), %rsi leaq 0x7(%rsp), %rdx movb $0xa, (%rdx) movq %r13, %rdi callq 0x98940 leaq 0x18(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x8(%rsp), %rdi movq %r13, %rsi movq %rax, %rdx callq 0x70172 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x1aa10 leaq 0xe68e(%rip), %rsi # 0xe6380 movl $0x1, %edx movq %rax, %rdi callq 0x1aa10 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0xd7d16 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 movq (%r14), %r13 cmpq $0x2, 0x30(%rsp) jb 0xd7d5a movq %rbx, 0x28(%rsp) leaq 0x7(%rsp), %rbp movq %r12, %rbx movq (%r14), %rsi addq 0x8(%r14), %rsi movb $0xa, 0x7(%rsp) movq %r13, %rdi movq %rbp, %rdx callq 0x98940 movq %rax, %r13 incq %r13 decq %rbx jne 0xd7d2e movq (%r14), %rsi movq 0x28(%rsp), %rbx jmp 0xd7d5d movq %r13, %rsi addq 0x8(%r14), %rsi leaq 0x7(%rsp), %rdx movb $0xa, (%rdx) movq %r13, %rdi callq 0x98940 leaq 0x18(%rsp), %rbp movq %rbp, -0x10(%rbp) leaq 0x8(%rsp), %rdi movq %r13, %rsi movq %rax, %rdx callq 0x70172 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x1aa10 leaq 0xe5db(%rip), %rsi # 0xe6380 movl $0x1, %edx movq %rax, %rdi callq 0x1aa10 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0xd7dc9 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 decq %rbx leaq 0x8(%rsp), %rdi movq %rbp, (%rdi) movq %rbx, %rsi movl $0x20, %edx callq 0x1aa40 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x1aa10 leaq 0x18c26(%rip), %rsi # 0xf0a22 movl $0x2, %edx movq %rax, %rdi callq 0x1aa10 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0xd7e20 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 cmpq %r15, %r12 jge 0xd7ecc movq (%r14), %r15 cmpq $-0x3, %r12 ja 0xd7e63 leaq 0x7(%rsp), %r13 movq 0x30(%rsp), %rbx movq (%r14), %rsi addq 0x8(%r14), %rsi movb $0xa, 0x7(%rsp) movq %r15, %rdi movq %r13, %rdx callq 0x98940 movq %rax, %r15 incq %r15 decq %rbx jne 0xd7e3c movq (%r14), %rsi jmp 0xd7e66 movq %r15, %rsi addq 0x8(%r14), %rsi leaq 0x7(%rsp), %rdx movb $0xa, (%rdx) movq %r15, %rdi callq 0x98940 leaq 0x8(%rsp), %rdi movq %rbp, (%rdi) movq %r15, %rsi movq %rax, %rdx callq 0x70172 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x1aa10 leaq 0xe4d8(%rip), %rsi # 0xe6380 movl $0x1, %edx movq %rax, %rdi callq 0x1aa10 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0xd7ecc movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 leaq 0x48(%rsp), %rsi movq 0x38(%rsp), %rdi callq 0x1add0 movq 0x54096(%rip), %rsi # 0x12bf78 leaq 0x40(%rsp), %rdi callq 0x1a4c0 leaq 0xb0(%rsp), %rdi callq 0x1a2d0 addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xd7f35 jmp 0xd7f35 jmp 0xd7f19 jmp 0xd7f35 jmp 0xd7f35 jmp 0xd7f19 jmp 0xd7f19 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0xd7f38 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8f0 jmp 0xd7f38 movq %rax, %rbx movq 0x54039(%rip), %rsi # 0x12bf78 leaq 0x40(%rsp), %rdi callq 0x1a4c0 leaq 0xb0(%rsp), %rdi callq 0x1a2d0 movq %rbx, %rdi callq 0x1afd0
_ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm_0: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov r8, rdx mov r14, rsi mov [rsp+1E8h+var_1B0], rdi mov rsi, [rsi] mov rax, [r14+8] test rdx, rdx jz short loc_D7B82 xor ecx, ecx xor r12d, r12d loc_D7B6C: xor edx, edx cmp byte ptr [rsi+rcx], 0Ah setz dl add r12, rdx inc rcx cmp r8, rcx jnz short loc_D7B6C jmp short loc_D7B85 loc_D7B82: xor r12d, r12d loc_D7B85: lea rdx, [rsi+r8] test rax, rax mov [rsp+1E8h+var_1C0], r8 jz short loc_D7BAF xor ecx, ecx xor r15d, r15d loc_D7B98: xor edi, edi cmp byte ptr [rsi+rcx], 0Ah setz dil add r15, rdi inc rcx cmp rax, rcx jnz short loc_D7B98 jmp short loc_D7BB2 loc_D7BAF: xor r15d, r15d loc_D7BB2: lea rbp, [rsp+1E8h+var_198] mov [rbp-10h], rbp lea rbx, [rsp+1E8h+var_1A8] mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rdi, rbx mov esi, 0Ah mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) mov r13, rax mov rdi, [rbx]; void * cmp rdi, rbp jz short loc_D7BF4 mov rsi, [rsp+1E8h+var_198] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D7BF4: lea rbx, [rsp+1E8h+var_1A8] mov rdi, rbx call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, aAtRow; " at row " mov edx, 8 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, [rsp+1E8h+var_1C0] lea rsi, [r12+1] lea rdi, [rsp+1E8h+var_1A8] mov [rsp+1E8h+var_1B8], rsi call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long) mov rbp, rax lea rsi, aColumn; ", column " mov edx, 9 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) sub rbx, r13 mov rdi, rbp mov rsi, rbx call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, aJsonSchemaConv+1Dh; ":\n" mov edx, 2 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r12, r12 jle loc_D7D16 mov r13, [r14] cmp r12, 1 jnz short loc_D7C7E mov rsi, r13 jmp short loc_D7CAA loc_D7C7E: lea rbp, [r12-1] loc_D7C83: mov rsi, [r14] add rsi, [r14+8] mov [rsp+1E8h+var_1E1], 0Ah mov rdi, r13 lea rdx, [rsp+1E8h+var_1E1] call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) mov r13, rax inc r13 dec rbp jnz short loc_D7C83 mov rsi, [r14] loc_D7CAA: add rsi, [r14+8] lea rdx, [rsp+1E8h+var_1E1] mov byte ptr [rdx], 0Ah mov rdi, r13 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) lea rbp, [rsp+1E8h+var_1D0] mov [rbp-10h], rbp lea rdi, [rsp+1E8h+var_1E0] mov rsi, r13 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aTarget+8; "\n" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * cmp rdi, rbp jz short loc_D7D16 mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D7D16: mov r13, [r14] cmp [rsp+1E8h+var_1B8], 2 jb short loc_D7D5A mov [rsp+1E8h+var_1C0], rbx lea rbp, [rsp+1E8h+var_1E1] mov rbx, r12 loc_D7D2E: mov rsi, [r14] add rsi, [r14+8] mov [rsp+1E8h+var_1E1], 0Ah mov rdi, r13 mov rdx, rbp call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) mov r13, rax inc r13 dec rbx jnz short loc_D7D2E mov rsi, [r14] mov rbx, [rsp+1E8h+var_1C0] jmp short loc_D7D5D loc_D7D5A: mov rsi, r13 loc_D7D5D: add rsi, [r14+8] lea rdx, [rsp+1E8h+var_1E1] mov byte ptr [rdx], 0Ah mov rdi, r13 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) lea rbp, [rsp+1E8h+var_1D0] mov [rbp-10h], rbp lea rdi, [rsp+1E8h+var_1E0] mov rsi, r13 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aTarget+8; "\n" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * cmp rdi, rbp jz short loc_D7DC9 mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D7DC9: dec rbx lea rdi, [rsp+1E8h+var_1E0] mov [rdi], rbp mov rsi, rbx mov edx, 20h ; ' ' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, asc_F0A22; "^\n" mov edx, 2 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * cmp rdi, rbp jz short loc_D7E20 mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D7E20: cmp r12, r15 jge loc_D7ECC mov r15, [r14] cmp r12, 0FFFFFFFFFFFFFFFDh ja short loc_D7E63 lea r13, [rsp+1E8h+var_1E1] mov rbx, [rsp+1E8h+var_1B8] loc_D7E3C: mov rsi, [r14] add rsi, [r14+8] mov [rsp+1E8h+var_1E1], 0Ah mov rdi, r15 mov rdx, r13 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) mov r15, rax inc r15 dec rbx jnz short loc_D7E3C mov rsi, [r14] jmp short loc_D7E66 loc_D7E63: mov rsi, r15 loc_D7E66: add rsi, [r14+8] lea rdx, [rsp+1E8h+var_1E1] mov byte ptr [rdx], 0Ah mov rdi, r15 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS0_5__ops16_Iter_equals_valIS2_EEET_SE_SE_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>,std::random_access_iterator_tag) lea rdi, [rsp+1E8h+var_1E0] mov [rdi], rbp mov rsi, r15 mov rdx, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, aTarget+8; "\n" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * cmp rdi, rbp jz short loc_D7ECC mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_D7ECC: lea rsi, [rsp+1E8h+var_1A0] mov rdi, [rsp+1E8h+var_1B0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1E8h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+1E8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_D7F35 jmp short loc_D7F35 jmp short loc_D7F19 jmp short loc_D7F35 jmp short loc_D7F35 jmp short loc_D7F19 jmp short $+2 loc_D7F19: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, rbp jz short loc_D7F38 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_D7F38 loc_D7F35: mov rbx, rax loc_D7F38: mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_38] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_A8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
void minja::error_location_suffix(long long a1, long long a2, long long a3) { _BYTE *v4; // rsi long long v5; // rax long long v6; // rcx long long v7; // r12 long long v8; // rcx long long v9; // r15 long long v10; // r13 long long v11; // rbp long long v12; // rbx long long v13; // rax _BYTE *v14; // r13 _BYTE *v15; // rsi long long v16; // rbp long long v17; // rsi long long v18; // rsi _BYTE *v19; // rax long long v20; // rax _BYTE *v21; // r13 long long v22; // rbx long long v23; // rsi _BYTE *v24; // rsi long long v25; // rsi _BYTE *v26; // rax long long v27; // rax long long v28; // rax _BYTE *v29; // r15 unsigned long long v30; // rbx long long v31; // rsi _BYTE *v32; // rsi long long v33; // rsi _BYTE *v34; // rax long long v35; // rax char v36; // [rsp+7h] [rbp-1E1h] BYREF void *v37; // [rsp+8h] [rbp-1E0h] BYREF long long v38; // [rsp+10h] [rbp-1D8h] _QWORD v39[2]; // [rsp+18h] [rbp-1D0h] BYREF long long v40; // [rsp+28h] [rbp-1C0h] unsigned long long v41; // [rsp+30h] [rbp-1B8h] long long v42; // [rsp+38h] [rbp-1B0h] _QWORD *v43; // [rsp+40h] [rbp-1A8h] BYREF _BYTE v44[8]; // [rsp+48h] [rbp-1A0h] BYREF _QWORD v45[12]; // [rsp+50h] [rbp-198h] BYREF _BYTE v46[312]; // [rsp+B0h] [rbp-138h] BYREF v42 = a1; v4 = *(_BYTE **)a2; v5 = *(_QWORD *)(a2 + 8); if ( a3 ) { v6 = 0LL; v7 = 0LL; do v7 += v4[v6++] == 10; while ( a3 != v6 ); } else { v7 = 0LL; } v40 = a3; if ( v5 ) { v8 = 0LL; v9 = 0LL; do v9 += v4[v8++] == 10; while ( v5 != v8 ); } else { v9 = 0LL; } v43 = v45; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v43, v4, (long long)&v4[a3]); v10 = std::string::rfind(&v43, 10LL, -1LL); if ( v43 != v45 ) operator delete(v43, v45[0] + 1LL); std::ostringstream::basic_ostringstream(&v43); std::__ostream_insert<char,std::char_traits<char>>(&v43, " at row ", 8LL); v41 = v7 + 1; v11 = std::ostream::_M_insert<long>(&v43); std::__ostream_insert<char,std::char_traits<char>>(v11, ", column ", 9LL); v12 = v40 - v10; v13 = std::ostream::_M_insert<unsigned long>(v11, v40 - v10); std::__ostream_insert<char,std::char_traits<char>>(v13, ":\n", 2LL); if ( v7 > 0 ) { v14 = *(_BYTE **)a2; if ( v7 == 1 ) { v15 = *(_BYTE **)a2; } else { v16 = v7 - 1; do { v17 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2; v36 = 10; v14 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v14, v17, &v36) + 1; --v16; } while ( v16 ); v15 = *(_BYTE **)a2; } v18 = (long long)&v15[*(_QWORD *)(a2 + 8)]; v36 = 10; v19 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v14, v18, &v36); v37 = v39; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v14, (long long)v19); v20 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38); std::__ostream_insert<char,std::char_traits<char>>(v20, "\n", 1LL); if ( v37 != v39 ) operator delete(v37, v39[0] + 1LL); } v21 = *(_BYTE **)a2; if ( v41 < 2 ) { v24 = *(_BYTE **)a2; } else { v40 = v12; v22 = v7; do { v23 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2; v36 = 10; v21 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v21, v23, &v36) + 1; --v22; } while ( v22 ); v24 = *(_BYTE **)a2; v12 = v40; } v25 = (long long)&v24[*(_QWORD *)(a2 + 8)]; v36 = 10; v26 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v21, v25, &v36); v37 = v39; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v21, (long long)v26); v27 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38); std::__ostream_insert<char,std::char_traits<char>>(v27, "\n", 1LL); if ( v37 != v39 ) operator delete(v37, v39[0] + 1LL); v37 = v39; std::string::_M_construct(&v37, v12 - 1, 32LL); v28 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38); std::__ostream_insert<char,std::char_traits<char>>(v28, "^\n", 2LL); if ( v37 != v39 ) operator delete(v37, v39[0] + 1LL); if ( v7 < v9 ) { v29 = *(_BYTE **)a2; if ( (unsigned long long)v7 > 0xFFFFFFFFFFFFFFFDLL ) { v32 = *(_BYTE **)a2; } else { v30 = v41; do { v31 = *(_QWORD *)(a2 + 8) + *(_QWORD *)a2; v36 = 10; v29 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v29, v31, &v36) + 1; --v30; } while ( v30 ); v32 = *(_BYTE **)a2; } v33 = (long long)&v32[*(_QWORD *)(a2 + 8)]; v36 = 10; v34 = std::__find_if<__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__ops::_Iter_equals_val<char const>>( v29, v33, &v36); v37 = v39; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)&v37, v29, (long long)v34); v35 = std::__ostream_insert<char,std::char_traits<char>>(&v43, v37, v38); std::__ostream_insert<char,std::char_traits<char>>(v35, "\n", 1LL); if ( v37 != v39 ) operator delete(v37, v39[0] + 1LL); } std::stringbuf::str(v42, v44); std::ostringstream::~ostringstream(&v43, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v46); }
error_location_suffix: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV R8,RDX MOV R14,RSI MOV qword ptr [RSP + 0x38],RDI MOV RSI,qword ptr [RSI] MOV RAX,qword ptr [R14 + 0x8] TEST RDX,RDX JZ 0x001d7b82 XOR ECX,ECX XOR R12D,R12D LAB_001d7b6c: XOR EDX,EDX CMP byte ptr [RSI + RCX*0x1],0xa SETZ DL ADD R12,RDX INC RCX CMP R8,RCX JNZ 0x001d7b6c JMP 0x001d7b85 LAB_001d7b82: XOR R12D,R12D LAB_001d7b85: LEA RDX,[RSI + R8*0x1] TEST RAX,RAX MOV qword ptr [RSP + 0x28],R8 JZ 0x001d7baf XOR ECX,ECX XOR R15D,R15D LAB_001d7b98: XOR EDI,EDI CMP byte ptr [RSI + RCX*0x1],0xa SETZ DIL ADD R15,RDI INC RCX CMP RAX,RCX JNZ 0x001d7b98 JMP 0x001d7bb2 LAB_001d7baf: XOR R15D,R15D LAB_001d7bb2: LEA RBP,[RSP + 0x50] MOV qword ptr [RBP + -0x10],RBP LEA RBX,[RSP + 0x40] MOV RDI,RBX CALL 0x00170172 MOV RDI,RBX MOV ESI,0xa MOV RDX,-0x1 CALL 0x0011b160 MOV R13,RAX MOV RDI,qword ptr [RBX] CMP RDI,RBP JZ 0x001d7bf4 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011a8f0 LAB_001d7bf4: LEA RBX,[RSP + 0x40] MOV RDI,RBX CALL 0x0011aba0 LAB_001d7c01: LEA RSI,[0x1f0a19] MOV EDX,0x8 MOV RDI,RBX CALL 0x0011aa10 MOV RBX,qword ptr [RSP + 0x28] LEA RSI,[R12 + 0x1] LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x30],RSI CALL 0x0011a860 MOV RBP,RAX LEA RSI,[0x1ecf70] MOV EDX,0x9 MOV RDI,RAX CALL 0x0011aa10 SUB RBX,R13 MOV RDI,RBP MOV RSI,RBX CALL 0x0011a610 LEA RSI,[0x1f482f] MOV EDX,0x2 MOV RDI,RAX CALL 0x0011aa10 TEST R12,R12 JLE 0x001d7d16 MOV R13,qword ptr [R14] CMP R12,0x1 JNZ 0x001d7c7e MOV RSI,R13 JMP 0x001d7caa LAB_001d7c7e: LEA RBP,[R12 + -0x1] LAB_001d7c83: MOV RSI,qword ptr [R14] ADD RSI,qword ptr [R14 + 0x8] MOV byte ptr [RSP + 0x7],0xa MOV RDI,R13 LEA RDX,[RSP + 0x7] CALL 0x00198940 MOV R13,RAX INC R13 DEC RBP JNZ 0x001d7c83 MOV RSI,qword ptr [R14] LAB_001d7caa: ADD RSI,qword ptr [R14 + 0x8] LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0xa MOV RDI,R13 CALL 0x00198940 LEA RBP,[RSP + 0x18] MOV qword ptr [RBP + -0x10],RBP LAB_001d7cc7: LEA RDI,[RSP + 0x8] MOV RSI,R13 MOV RDX,RAX CALL 0x00170172 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001d7ce1: LEA RDI,[RSP + 0x40] CALL 0x0011aa10 LEA RSI,[0x1e6380] MOV EDX,0x1 MOV RDI,RAX CALL 0x0011aa10 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001d7d16 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_001d7d16: MOV R13,qword ptr [R14] CMP qword ptr [RSP + 0x30],0x2 JC 0x001d7d5a MOV qword ptr [RSP + 0x28],RBX LEA RBP,[RSP + 0x7] MOV RBX,R12 LAB_001d7d2e: MOV RSI,qword ptr [R14] ADD RSI,qword ptr [R14 + 0x8] MOV byte ptr [RSP + 0x7],0xa MOV RDI,R13 MOV RDX,RBP CALL 0x00198940 MOV R13,RAX INC R13 DEC RBX JNZ 0x001d7d2e MOV RSI,qword ptr [R14] MOV RBX,qword ptr [RSP + 0x28] JMP 0x001d7d5d LAB_001d7d5a: MOV RSI,R13 LAB_001d7d5d: ADD RSI,qword ptr [R14 + 0x8] LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0xa MOV RDI,R13 CALL 0x00198940 LEA RBP,[RSP + 0x18] MOV qword ptr [RBP + -0x10],RBP LAB_001d7d7a: LEA RDI,[RSP + 0x8] MOV RSI,R13 MOV RDX,RAX CALL 0x00170172 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001d7d94: LEA RDI,[RSP + 0x40] CALL 0x0011aa10 LEA RSI,[0x1e6380] MOV EDX,0x1 MOV RDI,RAX CALL 0x0011aa10 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001d7dc9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_001d7dc9: DEC RBX LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RBP LAB_001d7dd4: MOV RSI,RBX MOV EDX,0x20 CALL 0x0011aa40 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001d7deb: LEA RDI,[RSP + 0x40] CALL 0x0011aa10 LEA RSI,[0x1f0a22] MOV EDX,0x2 MOV RDI,RAX CALL 0x0011aa10 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001d7e20 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_001d7e20: CMP R12,R15 JGE 0x001d7ecc MOV R15,qword ptr [R14] CMP R12,-0x3 JA 0x001d7e63 LEA R13,[RSP + 0x7] MOV RBX,qword ptr [RSP + 0x30] LAB_001d7e3c: MOV RSI,qword ptr [R14] ADD RSI,qword ptr [R14 + 0x8] MOV byte ptr [RSP + 0x7],0xa MOV RDI,R15 MOV RDX,R13 CALL 0x00198940 MOV R15,RAX INC R15 DEC RBX JNZ 0x001d7e3c MOV RSI,qword ptr [R14] JMP 0x001d7e66 LAB_001d7e63: MOV RSI,R15 LAB_001d7e66: ADD RSI,qword ptr [R14 + 0x8] LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0xa MOV RDI,R15 CALL 0x00198940 LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],RBP LAB_001d7e82: MOV RSI,R15 MOV RDX,RAX CALL 0x00170172 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001d7e97: LEA RDI,[RSP + 0x40] CALL 0x0011aa10 LEA RSI,[0x1e6380] MOV EDX,0x1 MOV RDI,RAX CALL 0x0011aa10 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001d7ecc MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8f0 LAB_001d7ecc: LEA RSI,[RSP + 0x48] LAB_001d7ed1: MOV RDI,qword ptr [RSP + 0x38] CALL 0x0011add0 LAB_001d7edb: MOV RSI,qword ptr [0x0022bf78] LEA RDI,[RSP + 0x40] CALL 0x0011a4c0 LEA RDI,[RSP + 0xb0] CALL 0x0011a2d0 ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::error_location_suffix(std::__cxx11::string const&, unsigned long) */ void __thiscall minja::error_location_suffix(minja *this,string *param_1,ulong param_2) { long lVar1; ostream *poVar2; int8 uVar3; ulong uVar4; long lVar5; ulong uVar6; long lVar7; ulong uVar8; long lVar9; int1 local_1e1; long *local_1e0; long local_1d8; long local_1d0 [2]; ulong local_1c0; ulong local_1b8; minja *local_1b0; long *local_1a8 [2]; long local_198 [12]; ios_base local_138 [264]; lVar1 = *(long *)param_1; if (param_2 == 0) { uVar8 = 0; } else { uVar4 = 0; uVar8 = 0; do { uVar8 = uVar8 + (*(char *)(lVar1 + uVar4) == '\n'); uVar4 = uVar4 + 1; } while (param_2 != uVar4); } if (*(long *)(param_1 + 8) == 0) { lVar9 = 0; } else { lVar5 = 0; lVar9 = 0; do { lVar9 = lVar9 + (ulong)(*(char *)(lVar1 + lVar5) == '\n'); lVar5 = lVar5 + 1; } while (*(long *)(param_1 + 8) != lVar5); } local_1c0 = param_2; local_1b0 = this; local_1a8[0] = local_198; std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (local_1a8,lVar1,lVar1 + param_2); lVar1 = std::__cxx11::string::rfind((char)local_1a8,10); if (local_1a8[0] != local_198) { operator_delete(local_1a8[0],local_198[0] + 1); } std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8); /* try { // try from 001d7c01 to 001d7c66 has its CatchHandler @ 001d7f35 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8," at row ",8); uVar4 = local_1c0; local_1b8 = uVar8 + 1; poVar2 = std::ostream::_M_insert<long>((long)local_1a8); std::__ostream_insert<char,std::char_traits<char>>(poVar2,", column ",9); uVar4 = uVar4 - lVar1; poVar2 = std::ostream::_M_insert<unsigned_long>((ulong)poVar2); std::__ostream_insert<char,std::char_traits<char>>(poVar2,":\n",2); if (0 < (long)uVar8) { lVar1 = *(long *)param_1; lVar5 = lVar1; if (uVar8 != 1) { lVar7 = uVar8 - 1; do { local_1e1 = 10; lVar5 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1); lVar5 = lVar5 + 1; lVar7 = lVar7 + -1; } while (lVar7 != 0); lVar1 = *(long *)param_1; } local_1e1 = 10; uVar3 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar5,lVar1 + *(long *)(param_1 + 8)); /* try { // try from 001d7cc7 to 001d7cd6 has its CatchHandler @ 001d7f0d */ local_1e0 = local_1d0; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (&local_1e0,lVar5,uVar3); /* try { // try from 001d7ce1 to 001d7cfe has its CatchHandler @ 001d7f15 */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_1e0,local_1d8); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } } lVar1 = *(long *)param_1; lVar5 = lVar1; if (1 < local_1b8) { uVar6 = uVar8; local_1c0 = uVar4; do { local_1e1 = 10; lVar5 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar5,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1); lVar5 = lVar5 + 1; uVar6 = uVar6 - 1; } while (uVar6 != 0); lVar1 = *(long *)param_1; uVar4 = local_1c0; } local_1e1 = 10; uVar3 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar5,lVar1 + *(long *)(param_1 + 8)); /* try { // try from 001d7d7a to 001d7d89 has its CatchHandler @ 001d7f13 */ local_1e0 = local_1d0; std::__cxx11::string::_M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (&local_1e0,lVar5,uVar3); /* try { // try from 001d7d94 to 001d7db1 has its CatchHandler @ 001d7f19 */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_1e0,local_1d8); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } local_1e0 = local_1d0; /* try { // try from 001d7dd4 to 001d7de0 has its CatchHandler @ 001d7f11 */ std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar4 + -1); /* try { // try from 001d7deb to 001d7e08 has its CatchHandler @ 001d7f17 */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_1e0,local_1d8); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"^\n",2); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } if ((long)uVar8 < lVar9) { lVar1 = *(long *)param_1; lVar9 = lVar1; if (uVar8 < 0xfffffffffffffffe) { uVar8 = local_1b8; do { local_1e1 = 10; lVar9 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar9,*(long *)param_1 + *(long *)(param_1 + 8),&local_1e1); lVar9 = lVar9 + 1; uVar8 = uVar8 - 1; } while (uVar8 != 0); lVar1 = *(long *)param_1; } local_1e1 = 10; uVar3 = std:: __find_if<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,__gnu_cxx::__ops::_Iter_equals_val<char_const>> (lVar9,lVar1 + *(long *)(param_1 + 8)); local_1e0 = local_1d0; /* try { // try from 001d7e82 to 001d7e8c has its CatchHandler @ 001d7f0b */ std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>> (&local_1e0,lVar9,uVar3); /* try { // try from 001d7e97 to 001d7eb4 has its CatchHandler @ 001d7f0f */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,(char *)local_1e0,local_1d8); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"\n",1); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } } /* try { // try from 001d7ed1 to 001d7eda has its CatchHandler @ 001d7f35 */ std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8); std::ios_base::~ios_base(local_138); return; }
49,944
my_strntoull_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr + l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) res) : (longlong) res); }
O0
c
my_strntoull_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movl $0x0, -0x3c(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0x10e421 movq -0x50(%rbp), %rax addq $-0x9, %rax movq %rax, -0x90(%rbp) subq $0x24, %rax ja 0x10e41d movq -0x90(%rbp), %rax leaq 0x172751(%rip), %rcx # 0x280b4c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0x10e41f jmp 0x10e41f cmpl $0x0, -0x3c(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x3c(%rbp) jmp 0x10e41f jmp 0x10e41f jmp 0x10e478 jmp 0x10e459 cmpq $0x0, -0x30(%rbp) je 0x10e433 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %edx movl $0x21, %ecx movl $0x54, %eax cmpl $0x0, %edx cmovel %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x10e65c movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) movb $0x1, %al testb $0x1, %al jne 0x10e3ba jmp 0x10e476 jmp 0x10e478 movl $0x0, -0x40(%rbp) movq $0x0, -0x70(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x88(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x60(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x64(%rbp) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0x10e5a5 movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) cmpq $0x30, -0x50(%rbp) jb 0x10e50a cmpq $0x39, -0x50(%rbp) ja 0x10e50a movq -0x50(%rbp), %rax subq $0x30, %rax movq %rax, -0x50(%rbp) jmp 0x10e553 cmpq $0x41, -0x50(%rbp) jb 0x10e52a cmpq $0x5a, -0x50(%rbp) ja 0x10e52a movq -0x50(%rbp), %rax subq $0x41, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0x10e551 cmpq $0x61, -0x50(%rbp) jb 0x10e54a cmpq $0x7a, -0x50(%rbp) ja 0x10e54a movq -0x50(%rbp), %rax subq $0x61, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0x10e54f jmp 0x10e5e4 jmp 0x10e551 jmp 0x10e553 movq -0x50(%rbp), %rax cmpl -0x24(%rbp), %eax jl 0x10e561 jmp 0x10e5e4 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax ja 0x10e581 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x10e58a movq -0x50(%rbp), %rax movl -0x64(%rbp), %ecx cmpq %rcx, %rax jbe 0x10e58a movl $0x1, -0x40(%rbp) jmp 0x10e5a3 movslq -0x24(%rbp), %rax imulq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x50(%rbp), %rax addq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0x10e5d6 cmpl $0x0, -0x44(%rbp) jne 0x10e5d4 cmpq $0x0, -0x30(%rbp) je 0x10e5bd movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movl $0x54, (%rax) movq $0x0, -0x8(%rbp) jmp 0x10e65c jmp 0x10e5e4 jmp 0x10e5d8 movb $0x1, %al testb $0x1, %al jne 0x10e4bb jmp 0x10e5e4 cmpq $0x0, -0x30(%rbp) je 0x10e5f6 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x10e617 movq -0x38(%rbp), %rax movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0x10e65c cmpl $0x0, -0x40(%rbp) je 0x10e631 movq -0x38(%rbp), %rax movl $0x22, (%rax) movq $-0x1, -0x8(%rbp) jmp 0x10e65c cmpl $0x0, -0x3c(%rbp) je 0x10e646 xorl %eax, %eax subq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x10e651 movq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopl (%rax)
my_strntoull_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov [rbp+var_3C], 0 mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov [rbp+var_78], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_80], rax mov rax, [rbp+var_38] mov dword ptr [rax], 0 loc_10E3BA: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle short loc_10E421 mov rax, [rbp+var_50] add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases mov [rbp+var_90], rax sub rax, 24h ja short def_10E402; jumptable 000000000010E402 default case, cases 10-31,33-42,44 mov rax, [rbp+var_90] lea rcx, jpt_10E402 movsxd rax, ds:(jpt_10E402 - 280B4Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_10E404: jmp short loc_10E41F; jumptable 000000000010E402 case 32 loc_10E406: jmp short loc_10E41F; jumptable 000000000010E402 case 9 loc_10E408: cmp [rbp+var_3C], 0; jumptable 000000000010E402 case 45 setnz al xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_3C], eax jmp short loc_10E41F loc_10E41B: jmp short loc_10E41F; jumptable 000000000010E402 case 43 def_10E402: jmp short loc_10E478; jumptable 000000000010E402 default case, cases 10-31,33-42,44 loc_10E41F: jmp short loc_10E459 loc_10E421: cmp [rbp+var_30], 0 jz short loc_10E433 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_10E433: mov edx, [rbp+var_44] mov ecx, 21h ; '!' mov eax, 54h ; 'T' cmp edx, 0 cmovz ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov [rbp+var_8], 0 jmp loc_10E65C loc_10E459: mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax mov al, 1 test al, 1 jnz loc_10E3BA jmp short $+2 loc_10E476: jmp short $+2 loc_10E478: mov [rbp+var_40], 0 mov [rbp+var_70], 0 mov rax, [rbp+var_78] mov [rbp+var_88], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_60], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_64], eax loc_10E4BB: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle loc_10E5A5 mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax cmp [rbp+var_50], 30h ; '0' jb short loc_10E50A cmp [rbp+var_50], 39h ; '9' ja short loc_10E50A mov rax, [rbp+var_50] sub rax, 30h ; '0' mov [rbp+var_50], rax jmp short loc_10E553 loc_10E50A: cmp [rbp+var_50], 41h ; 'A' jb short loc_10E52A cmp [rbp+var_50], 5Ah ; 'Z' ja short loc_10E52A mov rax, [rbp+var_50] sub rax, 41h ; 'A' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_10E551 loc_10E52A: cmp [rbp+var_50], 61h ; 'a' jb short loc_10E54A cmp [rbp+var_50], 7Ah ; 'z' ja short loc_10E54A mov rax, [rbp+var_50] sub rax, 61h ; 'a' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_10E54F loc_10E54A: jmp loc_10E5E4 loc_10E54F: jmp short $+2 loc_10E551: jmp short $+2 loc_10E553: mov rax, [rbp+var_50] cmp eax, [rbp+var_24] jl short loc_10E561 jmp loc_10E5E4 loc_10E561: mov rax, [rbp+var_70] cmp rax, [rbp+var_60] ja short loc_10E581 mov rax, [rbp+var_70] cmp rax, [rbp+var_60] jnz short loc_10E58A mov rax, [rbp+var_50] mov ecx, [rbp+var_64] cmp rax, rcx jbe short loc_10E58A loc_10E581: mov [rbp+var_40], 1 jmp short loc_10E5A3 loc_10E58A: movsxd rax, [rbp+var_24] imul rax, [rbp+var_70] mov [rbp+var_70], rax mov rax, [rbp+var_50] add rax, [rbp+var_70] mov [rbp+var_70], rax loc_10E5A3: jmp short loc_10E5D6 loc_10E5A5: cmp [rbp+var_44], 0 jnz short loc_10E5D4 cmp [rbp+var_30], 0 jz short loc_10E5BD mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_10E5BD: mov rax, [rbp+var_38] mov dword ptr [rax], 54h ; 'T' mov [rbp+var_8], 0 jmp loc_10E65C loc_10E5D4: jmp short loc_10E5E4 loc_10E5D6: jmp short $+2 loc_10E5D8: mov al, 1 test al, 1 jnz loc_10E4BB jmp short $+2 loc_10E5E4: cmp [rbp+var_30], 0 jz short loc_10E5F6 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_10E5F6: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_10E617 mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp short loc_10E65C loc_10E617: cmp [rbp+var_40], 0 jz short loc_10E631 mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_10E65C loc_10E631: cmp [rbp+var_3C], 0 jz short loc_10E646 xor eax, eax sub rax, [rbp+var_70] mov [rbp+var_98], rax jmp short loc_10E651 loc_10E646: mov rax, [rbp+var_70] mov [rbp+var_98], rax loc_10E651: mov rax, [rbp+var_98] mov [rbp+var_8], rax loc_10E65C: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long my_strntoull_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { int v6; // ecx long long v9; // [rsp+18h] [rbp-88h] long long v10; // [rsp+20h] [rbp-80h] long long v11; // [rsp+28h] [rbp-78h] unsigned long long v12; // [rsp+30h] [rbp-70h] unsigned int v13; // [rsp+3Ch] [rbp-64h] unsigned long long v14; // [rsp+40h] [rbp-60h] long long ( *v15)(long long, unsigned long long *, long long, long long); // [rsp+48h] [rbp-58h] unsigned long long v16; // [rsp+50h] [rbp-50h] BYREF int v17; // [rsp+5Ch] [rbp-44h] int v18; // [rsp+60h] [rbp-40h] BOOL v19; // [rsp+64h] [rbp-3Ch] int *v20; // [rsp+68h] [rbp-38h] _QWORD *v21; // [rsp+70h] [rbp-30h] int v22; // [rsp+7Ch] [rbp-24h] long long v23; // [rsp+80h] [rbp-20h] long long v24; // [rsp+88h] [rbp-18h] long long v25; // [rsp+90h] [rbp-10h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = a5; v20 = a6; v19 = 0; v15 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v11 = a2; v10 = a3 + a2; *a6 = 0; while ( 2 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) { if ( v21 ) *v21 = v11; v6 = 33; if ( !v17 ) v6 = 84; *v20 = v6; return 0LL; } else { switch ( v16 ) { case 9uLL: case 0x20uLL: case 0x2BuLL: goto LABEL_10; case 0x2DuLL: v19 = !v19; LABEL_10: v11 += v17; continue; default: v18 = 0; v12 = 0LL; v9 = v11; v14 = 0xFFFFFFFFFFFFFFFFLL / v22; v13 = 0xFFFFFFFFFFFFFFFFLL % v22; break; } while ( 1 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) break; v11 += v17; if ( v16 < 0x30 || v16 > 0x39 ) { if ( v16 < 0x41 || v16 > 0x5A ) { if ( v16 < 0x61 || v16 > 0x7A ) goto LABEL_33; v16 = v16 - 97 + 10; } else { v16 = v16 - 65 + 10; } } else { v16 -= 48LL; } if ( (int)v16 >= v22 ) goto LABEL_33; if ( v12 > v14 || v12 == v14 && v16 > v13 ) v18 = 1; else v12 = v12 * v22 + v16; } if ( v17 ) { LABEL_33: if ( v21 ) *v21 = v11; if ( v11 == v9 ) { *v20 = 33; return 0LL; } else if ( v18 ) { *v20 = 34; return -1LL; } else if ( v19 ) { return -(long long)v12; } else { return v12; } } if ( v21 ) *v21 = v11; *v20 = 84; return 0LL; } } }
49,945
my_strntoull_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr + l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) res) : (longlong) res); }
O3
c
my_strntoull_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, -0x40(%rbp) movl %ecx, -0x44(%rbp) movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 movq 0xb8(%rdi), %rax movq 0x28(%rax), %r12 addq %rsi, %r13 movq %r9, -0x50(%rbp) movl $0x0, (%r9) leaq -0x30(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0xc9b3e movl $0x0, -0x34(%rbp) leaq -0x30(%rbp), %rbx movq -0x30(%rbp), %rcx cmpq $0x2a, %rcx jg 0xc9b0e cmpq $0x9, %rcx je 0xc9b26 cmpq $0x20, %rcx je 0xc9b26 jmp 0xc9b70 cmpq $0x2b, %rcx je 0xc9b26 cmpq $0x2d, %rcx jne 0xc9b70 xorl %ecx, %ecx cmpl $0x0, -0x34(%rbp) sete %cl movl %ecx, -0x34(%rbp) movl %eax, %eax addq %rax, %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jg 0xc9af6 movq -0x40(%rbp), %rcx testq %rcx, %rcx je 0xc9b4a movq %r15, (%rcx) testl %eax, %eax movl $0x54, %eax movl $0x21, %ecx cmovel %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) xorl %eax, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movslq -0x44(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx movq %rcx, -0x60(%rbp) divq %rcx movq %rdx, %rbx movq %rax, -0x58(%rbp) leaq -0x30(%rbp), %rsi movq %r14, %rdi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0xc9c4a movq %r12, -0x70(%rbp) movl %ebx, %ecx movq %rcx, -0x68(%rbp) xorl %ecx, %ecx movq %r15, %rbx xorl %edi, %edi movq %rbx, %rsi movl %eax, %ebx addq %rsi, %rbx movq -0x30(%rbp), %rsi leaq -0x30(%rsi), %rax cmpq $0x9, %rax ja 0xc9bd0 movq %rax, -0x30(%rbp) jmp 0xc9bf5 leaq -0x41(%rsi), %rax cmpq $0x19, %rax ja 0xc9be0 addq $-0x37, %rsi jmp 0xc9bee leaq -0x61(%rsi), %rax cmpq $0x19, %rax ja 0xc9c5b addq $-0x57, %rsi movq %rsi, -0x30(%rbp) movq %rsi, %rax cmpl -0x44(%rbp), %eax jge 0xc9c5b movl $0x1, %esi cmpq -0x58(%rbp), %rcx jbe 0xc9c0a movq %rcx, %r12 jmp 0xc9c23 jne 0xc9c16 movq -0x58(%rbp), %r12 cmpq -0x68(%rbp), %rax ja 0xc9c23 imulq -0x60(%rbp), %rcx addq %rcx, %rax movl %edi, %esi movq %rax, %r12 movq %rsi, -0x78(%rbp) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %rbx, %rdx movq %r13, %rcx callq *-0x70(%rbp) movq -0x78(%rbp), %rsi movq %r12, %rcx movl %esi, %edi testl %eax, %eax jg 0xc9bb4 jmp 0xc9c52 xorl %r12d, %r12d movq %r15, %rbx xorl %esi, %esi testl %eax, %eax je 0xc9c95 movl %esi, %edi movq %r12, %rcx movq -0x40(%rbp), %rax testq %rax, %rax je 0xc9c67 movq %rbx, (%rax) cmpq %r15, %rbx je 0xc9c86 testl %edi, %edi je 0xc9cb0 movq -0x50(%rbp), %rax movl $0x22, (%rax) movq $-0x1, %rax jmp 0xc9b61 movq -0x50(%rbp), %rax movl $0x21, (%rax) jmp 0xc9b5f movq -0x40(%rbp), %rax testq %rax, %rax je 0xc9ca1 movq %rbx, (%rax) movq -0x50(%rbp), %rax movl $0x54, (%rax) jmp 0xc9b5f movq %rcx, %rax negq %rax cmpl $0x0, -0x34(%rbp) cmoveq %rcx, %rax jmp 0xc9b61
my_strntoull_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_40], r8 mov [rbp+var_44], ecx mov r13, rdx mov r15, rsi mov r14, rdi mov rax, [rdi+0B8h] mov r12, [rax+28h] add r13, rsi mov [rbp+var_50], r9 mov dword ptr [r9], 0 lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle short loc_C9B3E mov [rbp+var_34], 0 lea rbx, [rbp+var_30] loc_C9AF6: mov rcx, [rbp+var_30] cmp rcx, 2Ah ; '*' jg short loc_C9B0E cmp rcx, 9 jz short loc_C9B26 cmp rcx, 20h ; ' ' jz short loc_C9B26 jmp short loc_C9B70 loc_C9B0E: cmp rcx, 2Bh ; '+' jz short loc_C9B26 cmp rcx, 2Dh ; '-' jnz short loc_C9B70 xor ecx, ecx cmp [rbp+var_34], 0 setz cl mov [rbp+var_34], ecx loc_C9B26: mov eax, eax add r15, rax mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, r13 call r12 test eax, eax jg short loc_C9AF6 loc_C9B3E: mov rcx, [rbp+var_40] test rcx, rcx jz short loc_C9B4A mov [rcx], r15 loc_C9B4A: test eax, eax mov eax, 54h ; 'T' mov ecx, 21h ; '!' cmovz ecx, eax mov rax, [rbp+var_50] mov [rax], ecx loc_C9B5F: xor eax, eax loc_C9B61: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_C9B70: movsxd rcx, [rbp+var_44] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx mov [rbp+var_60], rcx div rcx mov rbx, rdx mov [rbp+var_58], rax lea rsi, [rbp+var_30] mov rdi, r14 mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle loc_C9C4A mov [rbp+var_70], r12 mov ecx, ebx mov [rbp+var_68], rcx xor ecx, ecx mov rbx, r15 xor edi, edi loc_C9BB4: mov rsi, rbx mov ebx, eax add rbx, rsi mov rsi, [rbp+var_30] lea rax, [rsi-30h] cmp rax, 9 ja short loc_C9BD0 mov [rbp+var_30], rax jmp short loc_C9BF5 loc_C9BD0: lea rax, [rsi-41h] cmp rax, 19h ja short loc_C9BE0 add rsi, 0FFFFFFFFFFFFFFC9h jmp short loc_C9BEE loc_C9BE0: lea rax, [rsi-61h] cmp rax, 19h ja short loc_C9C5B add rsi, 0FFFFFFFFFFFFFFA9h loc_C9BEE: mov [rbp+var_30], rsi mov rax, rsi loc_C9BF5: cmp eax, [rbp+var_44] jge short loc_C9C5B mov esi, 1 cmp rcx, [rbp+var_58] jbe short loc_C9C0A mov r12, rcx jmp short loc_C9C23 loc_C9C0A: jnz short loc_C9C16 mov r12, [rbp+var_58] cmp rax, [rbp+var_68] ja short loc_C9C23 loc_C9C16: imul rcx, [rbp+var_60] add rax, rcx mov esi, edi mov r12, rax loc_C9C23: mov [rbp+var_78], rsi mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, rbx mov rcx, r13 call [rbp+var_70] mov rsi, [rbp+var_78] mov rcx, r12 mov edi, esi test eax, eax jg loc_C9BB4 jmp short loc_C9C52 loc_C9C4A: xor r12d, r12d mov rbx, r15 xor esi, esi loc_C9C52: test eax, eax jz short loc_C9C95 mov edi, esi mov rcx, r12 loc_C9C5B: mov rax, [rbp+var_40] test rax, rax jz short loc_C9C67 mov [rax], rbx loc_C9C67: cmp rbx, r15 jz short loc_C9C86 test edi, edi jz short loc_C9CB0 mov rax, [rbp+var_50] mov dword ptr [rax], 22h ; '"' mov rax, 0FFFFFFFFFFFFFFFFh jmp loc_C9B61 loc_C9C86: mov rax, [rbp+var_50] mov dword ptr [rax], 21h ; '!' jmp loc_C9B5F loc_C9C95: mov rax, [rbp+var_40] test rax, rax jz short loc_C9CA1 mov [rax], rbx loc_C9CA1: mov rax, [rbp+var_50] mov dword ptr [rax], 54h ; 'T' jmp loc_C9B5F loc_C9CB0: mov rax, rcx neg rax cmp [rbp+var_34], 0 cmovz rax, rcx jmp loc_C9B61
long long my_strntoull_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { long long v6; // r15 long long ( *v8)(long long, _QWORD *, long long, long long); // r12 long long v9; // r13 int v10; // eax int v11; // ecx long long result; // rax int v13; // eax unsigned long long v14; // rcx long long v15; // rbx int v16; // edi unsigned long long v17; // rax long long v18; // rsi int v19; // esi unsigned long long v20; // r12 long long ( *v21)(long long, _QWORD *, long long, long long); // [rsp+10h] [rbp-70h] unsigned long long v22; // [rsp+28h] [rbp-58h] BOOL v26; // [rsp+4Ch] [rbp-34h] _QWORD v27[6]; // [rsp+50h] [rbp-30h] BYREF v6 = a2; v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v9 = a2 + a3; *a6 = 0; v10 = v8(a1, v27, a2, a2 + a3); if ( v10 <= 0 ) { LABEL_11: if ( a5 ) *a5 = v6; v11 = 33; if ( !v10 ) v11 = 84; *a6 = v11; return 0LL; } v26 = 0; while ( v27[0] > 42LL ) { if ( v27[0] != 43LL ) { if ( v27[0] != 45LL ) goto LABEL_17; v26 = !v26; } LABEL_10: v6 += (unsigned int)v10; v10 = v8(a1, v27, v6, v9); if ( v10 <= 0 ) goto LABEL_11; } if ( v27[0] == 9LL || v27[0] == 32LL ) goto LABEL_10; LABEL_17: v22 = 0xFFFFFFFFFFFFFFFFLL / a4; v13 = v8(a1, v27, v6, v9); if ( v13 <= 0 ) { v20 = 0LL; v15 = v6; v19 = 0; LABEL_35: if ( v13 ) { v16 = v19; v14 = v20; goto LABEL_37; } if ( a5 ) *a5 = v15; *a6 = 84; return 0LL; } v21 = v8; v14 = 0LL; v15 = v6; v16 = 0; while ( 1 ) { v15 += (unsigned int)v13; v17 = v27[0] - 48LL; if ( (unsigned long long)(v27[0] - 48LL) > 9 ) { if ( (unsigned long long)(v27[0] - 65LL) > 0x19 ) { if ( (unsigned long long)(v27[0] - 97LL) > 0x19 ) break; v18 = v27[0] - 87LL; } else { v18 = v27[0] - 55LL; } v27[0] = v18; v17 = v18; } else { v27[0] -= 48LL; } if ( (int)v17 >= a4 ) break; v19 = 1; if ( v14 <= v22 ) { if ( v14 != v22 || (v20 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) ) { v19 = v16; v20 = a4 * v14 + v17; } } else { v20 = v14; } v13 = v21(a1, v27, v15, v9); v14 = v20; v16 = v19; if ( v13 <= 0 ) goto LABEL_35; } LABEL_37: if ( a5 ) *a5 = v15; if ( v15 == v6 ) { *a6 = 33; return 0LL; } if ( v16 ) { *a6 = 34; return -1LL; } else { result = -(long long)v14; if ( !v26 ) return v14; } return result; }
my_strntoull_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x40],R8 MOV dword ptr [RBP + -0x44],ECX MOV R13,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R12,qword ptr [RAX + 0x28] ADD R13,RSI MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [R9],0x0 LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x001c9b3e MOV dword ptr [RBP + -0x34],0x0 LEA RBX,[RBP + -0x30] LAB_001c9af6: MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x2a JG 0x001c9b0e CMP RCX,0x9 JZ 0x001c9b26 CMP RCX,0x20 JZ 0x001c9b26 JMP 0x001c9b70 LAB_001c9b0e: CMP RCX,0x2b JZ 0x001c9b26 CMP RCX,0x2d JNZ 0x001c9b70 XOR ECX,ECX CMP dword ptr [RBP + -0x34],0x0 SETZ CL MOV dword ptr [RBP + -0x34],ECX LAB_001c9b26: MOV EAX,EAX ADD R15,RAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JG 0x001c9af6 LAB_001c9b3e: MOV RCX,qword ptr [RBP + -0x40] TEST RCX,RCX JZ 0x001c9b4a MOV qword ptr [RCX],R15 LAB_001c9b4a: TEST EAX,EAX MOV EAX,0x54 MOV ECX,0x21 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_001c9b5f: XOR EAX,EAX LAB_001c9b61: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001c9b70: MOVSXD RCX,dword ptr [RBP + -0x44] MOV RAX,-0x1 XOR EDX,EDX MOV qword ptr [RBP + -0x60],RCX DIV RCX MOV RBX,RDX MOV qword ptr [RBP + -0x58],RAX LEA RSI,[RBP + -0x30] MOV RDI,R14 MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x001c9c4a MOV qword ptr [RBP + -0x70],R12 MOV ECX,EBX MOV qword ptr [RBP + -0x68],RCX XOR ECX,ECX MOV RBX,R15 XOR EDI,EDI LAB_001c9bb4: MOV RSI,RBX MOV EBX,EAX ADD RBX,RSI MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[RSI + -0x30] CMP RAX,0x9 JA 0x001c9bd0 MOV qword ptr [RBP + -0x30],RAX JMP 0x001c9bf5 LAB_001c9bd0: LEA RAX,[RSI + -0x41] CMP RAX,0x19 JA 0x001c9be0 ADD RSI,-0x37 JMP 0x001c9bee LAB_001c9be0: LEA RAX,[RSI + -0x61] CMP RAX,0x19 JA 0x001c9c5b ADD RSI,-0x57 LAB_001c9bee: MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI LAB_001c9bf5: CMP EAX,dword ptr [RBP + -0x44] JGE 0x001c9c5b MOV ESI,0x1 CMP RCX,qword ptr [RBP + -0x58] JBE 0x001c9c0a MOV R12,RCX JMP 0x001c9c23 LAB_001c9c0a: JNZ 0x001c9c16 MOV R12,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RBP + -0x68] JA 0x001c9c23 LAB_001c9c16: IMUL RCX,qword ptr [RBP + -0x60] ADD RAX,RCX MOV ESI,EDI MOV R12,RAX LAB_001c9c23: MOV qword ptr [RBP + -0x78],RSI MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,RBX MOV RCX,R13 CALL qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] MOV RCX,R12 MOV EDI,ESI TEST EAX,EAX JG 0x001c9bb4 JMP 0x001c9c52 LAB_001c9c4a: XOR R12D,R12D MOV RBX,R15 XOR ESI,ESI LAB_001c9c52: TEST EAX,EAX JZ 0x001c9c95 MOV EDI,ESI MOV RCX,R12 LAB_001c9c5b: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x001c9c67 MOV qword ptr [RAX],RBX LAB_001c9c67: CMP RBX,R15 JZ 0x001c9c86 TEST EDI,EDI JZ 0x001c9cb0 MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x22 MOV RAX,-0x1 JMP 0x001c9b61 LAB_001c9c86: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x21 JMP 0x001c9b5f LAB_001c9c95: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x001c9ca1 MOV qword ptr [RAX],RBX LAB_001c9ca1: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x54 JMP 0x001c9b5f LAB_001c9cb0: MOV RAX,RCX NEG RAX CMP dword ptr [RBP + -0x34],0x0 CMOVZ RAX,RCX JMP 0x001c9b61
ulong my_strntoull_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; bool bVar4; bool bVar5; ulong uVar6; bool bVar7; uint uVar8; ulong uVar9; int4 uVar10; ulong uVar11; long lVar12; ulong uVar13; ulong local_38; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); param_3 = param_3 + param_2; *param_6 = 0; uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); if (0 < (int)uVar8) { bVar4 = false; do { if ((long)local_38 < 0x2b) { if ((local_38 != 9) && (local_38 != 0x20)) { LAB_001c9b70: auVar2._8_8_ = 0; auVar2._0_8_ = (long)param_4; auVar3 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff); uVar9 = SUB168(auVar3 / auVar2,0); uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); lVar12 = param_2; if ((int)uVar8 < 1) { uVar11 = 0; bVar5 = false; goto LAB_001c9c52; } uVar11 = 0; bVar5 = false; goto LAB_001c9bb4; } } else if (local_38 != 0x2b) { if (local_38 != 0x2d) goto LAB_001c9b70; bVar4 = !bVar4; } param_2 = param_2 + (ulong)uVar8; uVar8 = (*pcVar1)(param_1,&local_38,param_2,param_3); } while (0 < (int)uVar8); } if (param_5 != (long *)0x0) { *param_5 = param_2; } uVar10 = 0x21; if (uVar8 == 0) { uVar10 = 0x54; } *param_6 = uVar10; return 0; while( true ) { if (param_4 <= (int)uVar13) goto LAB_001c9c5b; uVar6 = uVar11; bVar7 = true; if ((uVar11 <= uVar9) && ((uVar11 != uVar9 || (uVar6 = uVar9, uVar13 <= (SUB168(auVar3 % auVar2,0) & 0xffffffff))))) { uVar6 = uVar13 + uVar11 * (long)param_4; bVar7 = bVar5; } bVar5 = bVar7; uVar11 = uVar6; local_38 = uVar13; uVar8 = (*pcVar1)(param_1,&local_38,lVar12,param_3); if ((int)uVar8 < 1) break; LAB_001c9bb4: lVar12 = (ulong)uVar8 + lVar12; uVar13 = local_38 - 0x30; if (9 < uVar13) { if (local_38 - 0x41 < 0x1a) { uVar13 = local_38 - 0x37; } else { if (0x19 < local_38 - 0x61) goto LAB_001c9c5b; uVar13 = local_38 - 0x57; } } } LAB_001c9c52: if (uVar8 == 0) { if (param_5 != (long *)0x0) { *param_5 = lVar12; } *param_6 = 0x54; } else { LAB_001c9c5b: if (param_5 != (long *)0x0) { *param_5 = lVar12; } if (lVar12 != param_2) { if (bVar5) { *param_6 = 0x22; return 0xffffffffffffffff; } if (!bVar4) { return uVar11; } return -uVar11; } *param_6 = 0x21; } return 0; }
49,946
map_hash_key
bluesky950520[P]quickjs/quickjs.c
static uint32_t map_hash_key(JSContext *ctx, JSValue key) { uint32_t tag = JS_VALUE_GET_NORM_TAG(key); uint32_t h; double d; JSFloat64Union u; bf_t *a; switch(tag) { case JS_TAG_BOOL: h = JS_VALUE_GET_INT(key); break; case JS_TAG_STRING: h = hash_string(JS_VALUE_GET_STRING(key), 0); break; case JS_TAG_OBJECT: case JS_TAG_SYMBOL: h = (uintptr_t)JS_VALUE_GET_PTR(key) * 3163; break; case JS_TAG_INT: d = JS_VALUE_GET_INT(key); goto hash_float64; case JS_TAG_BIG_INT: a = JS_GetBigInt(key); h = hash_string8((void *)a->tab, a->len * sizeof(*a->tab), 0); break; case JS_TAG_FLOAT64: d = JS_VALUE_GET_FLOAT64(key); /* normalize the NaN */ if (isnan(d)) d = JS_FLOAT64_NAN; hash_float64: u.d = d; h = (u.u32[0] ^ u.u32[1]) * 3163; return h ^= JS_TAG_FLOAT64; default: h = 0; break; } h ^= tag; return h; }
O1
c
map_hash_key: pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, 0x8(%rsp) xorl %eax, %eax leal 0x9(%rsi), %ecx cmpl $0x10, %ecx ja 0x4759d leaq 0x557b3(%rip), %rdx # 0x9ccdc movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx imull $0xc5b, 0x8(%rsp), %eax # imm = 0xC5B jmp 0x4759d movl 0x8(%rsp), %eax jmp 0x4759d movq %rdi, %xmm1 movdqa %xmm1, %xmm0 cmpunordsd %xmm1, %xmm0 movsd 0x57390(%rip), %xmm2 # 0x9e8e8 andpd %xmm0, %xmm2 andnpd %xmm1, %xmm0 orpd %xmm2, %xmm0 jmp 0x475a7 movq 0x20(%rdi), %rcx shlq $0x3, %rcx testq %rcx, %rcx je 0x4759d movq 0x28(%rdi), %rdx xorl %esi, %esi xorl %eax, %eax imull $0x107, %eax, %edi # imm = 0x107 movzbl (%rdx,%rsi), %eax addl %edi, %eax incq %rsi cmpq %rsi, %rcx jne 0x4757b jmp 0x4759d movq 0x8(%rsp), %rdi xorl %esi, %esi callq 0x3bb46 xorl %ebx, %eax jmp 0x475be cvtsi2sdl 0x8(%rsp), %xmm0 movq %xmm0, %rax movq %rax, %rcx shrq $0x20, %rcx xorl %eax, %ecx imull $0xc5b, %ecx, %eax # imm = 0xC5B xorl $0x7, %eax addq $0x10, %rsp popq %rbx retq
map_hash_key: push rbx sub rsp, 10h mov rbx, rsi mov [rsp+18h+var_10], rdi xor eax, eax lea ecx, [rsi+9]; switch 17 cases cmp ecx, 10h ja short def_47530; jumptable 0000000000047530 default case, cases -6--2,2-6 lea rdx, jpt_47530 movsxd rcx, ds:(jpt_47530 - 9CCDCh)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_47532: imul eax, dword ptr [rsp+18h+var_10], 0C5Bh; jumptable 0000000000047530 cases -8,-1 jmp short def_47530; jumptable 0000000000047530 default case, cases -6--2,2-6 loc_4753C: mov eax, dword ptr [rsp+18h+var_10]; jumptable 0000000000047530 case 1 jmp short def_47530; jumptable 0000000000047530 default case, cases -6--2,2-6 loc_47542: movq xmm1, rdi; jumptable 0000000000047530 case 7 movdqa xmm0, xmm1 cmpunordsd xmm0, xmm1 movsd xmm2, cs:qword_9E8E8 andpd xmm2, xmm0 andnpd xmm0, xmm1 orpd xmm0, xmm2 jmp short loc_475A7 loc_47566: mov rcx, [rdi+20h]; jumptable 0000000000047530 case -9 shl rcx, 3 test rcx, rcx jz short def_47530; jumptable 0000000000047530 default case, cases -6--2,2-6 mov rdx, [rdi+28h] xor esi, esi xor eax, eax loc_4757B: imul edi, eax, 107h movzx eax, byte ptr [rdx+rsi] add eax, edi inc rsi cmp rcx, rsi jnz short loc_4757B jmp short def_47530; jumptable 0000000000047530 default case, cases -6--2,2-6 loc_47591: mov rdi, [rsp+18h+var_10]; jumptable 0000000000047530 case -7 xor esi, esi call hash_string def_47530: xor eax, ebx; jumptable 0000000000047530 default case, cases -6--2,2-6 jmp short loc_475BE loc_475A1: cvtsi2sd xmm0, dword ptr [rsp+18h+var_10]; jumptable 0000000000047530 case 0 loc_475A7: movq rax, xmm0 mov rcx, rax shr rcx, 20h xor ecx, eax imul eax, ecx, 0C5Bh xor eax, 7 loc_475BE: add rsp, 10h pop rbx retn
long long map_hash_key(long long a1, int a2) { int v3; // eax double v4; // xmm0_8 double v5; // xmm0_8 long long v6; // rcx long long v7; // rsi long long result; // rax v3 = 0; switch ( a2 ) { case -9: v6 = 8LL * *(_QWORD *)(a1 + 32); if ( v6 ) { v7 = 0LL; v3 = 0; do v3 = 263 * v3 + *(unsigned __int8 *)(*(_QWORD *)(a1 + 40) + v7++); while ( v6 != v7 ); } goto LABEL_10; case -8: case -1: v3 = 3163 * a1; goto LABEL_10; case -7: v3 = hash_string(a1, 0); goto LABEL_10; case 0: v5 = (double)(int)a1; goto LABEL_12; case 1: v3 = a1; goto LABEL_10; case 7: v4 = _mm_cmpunord_sd((__m128d)(unsigned long long)a1, (__m128d)(unsigned long long)a1).m128d_f64[0]; *(_QWORD *)&v5 = ~*(_QWORD *)&v4 & a1 | *(_QWORD *)&v4 & 0x7FF8000000000000LL; LABEL_12: result = (3163 * (LODWORD(v5) ^ HIDWORD(v5))) ^ 7u; break; default: LABEL_10: result = a2 ^ (unsigned int)v3; break; } return result; }
map_hash_key: PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV qword ptr [RSP + 0x8],RDI XOR EAX,EAX LEA ECX,[RSI + 0x9] CMP ECX,0x10 JA 0x0014759d LEA RDX,[0x19ccdc] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_fffffff8: IMUL EAX,dword ptr [RSP + 0x8],0xc5b JMP 0x0014759d caseD_1: MOV EAX,dword ptr [RSP + 0x8] JMP 0x0014759d caseD_7: MOVQ XMM1,RDI MOVDQA XMM0,XMM1 CMPUNORDSD XMM0,XMM1 MOVSD XMM2,qword ptr [0x0019e8e8] ANDPD XMM2,XMM0 ANDNPD XMM0,XMM1 ORPD XMM0,XMM2 JMP 0x001475a7 caseD_fffffff7: MOV RCX,qword ptr [RDI + 0x20] SHL RCX,0x3 TEST RCX,RCX JZ 0x0014759d MOV RDX,qword ptr [RDI + 0x28] XOR ESI,ESI XOR EAX,EAX LAB_0014757b: IMUL EDI,EAX,0x107 MOVZX EAX,byte ptr [RDX + RSI*0x1] ADD EAX,EDI INC RSI CMP RCX,RSI JNZ 0x0014757b JMP 0x0014759d caseD_fffffff9: MOV RDI,qword ptr [RSP + 0x8] XOR ESI,ESI CALL 0x0013bb46 caseD_fffffffa: XOR EAX,EBX JMP 0x001475be caseD_0: CVTSI2SD XMM0,dword ptr [RSP + 0x8] LAB_001475a7: MOVQ RAX,XMM0 MOV RCX,RAX SHR RCX,0x20 XOR ECX,EAX IMUL EAX,ECX,0xc5b XOR EAX,0x7 LAB_001475be: ADD RSP,0x10 POP RBX RET
uint map_hash_key(double param_1,uint param_2) { uint uVar1; long lVar2; long lVar3; double dVar4; uint local_10; uVar1 = 0; local_10 = SUB84(param_1,0); switch(param_2) { case 0: dVar4 = (double)(int)local_10; goto LAB_001475a7; case 1: uVar1 = local_10; break; case 7: dVar4 = (double)(~-(ulong)NAN(param_1) & (ulong)param_1 | DAT_0019e8e8 & -(ulong)NAN(param_1)); LAB_001475a7: return ((uint)((ulong)dVar4 >> 0x20) ^ SUB84(dVar4,0)) * 0xc5b ^ 7; case 0xfffffff7: lVar2 = *(long *)((long)param_1 + 0x20) << 3; if (lVar2 != 0) { lVar3 = 0; uVar1 = 0; do { uVar1 = (uint)*(byte *)(*(long *)((long)param_1 + 0x28) + lVar3) + uVar1 * 0x107; lVar3 = lVar3 + 1; } while (lVar2 != lVar3); } break; case 0xfffffff8: case 0xffffffff: uVar1 = local_10 * 0xc5b; break; case 0xfffffff9: uVar1 = hash_string(param_1,0); } return uVar1 ^ param_2; }
49,947
PFS_table_share::find_or_create_index_stat(TABLE_SHARE const*, unsigned int)
eloqsql/storage/perfschema/pfs_instr_class.cc
PFS_table_share_index* PFS_table_share::find_or_create_index_stat(const TABLE_SHARE *server_share, uint index) { assert(index <= MAX_INDEXES); void *addr= & this->m_race_index_stat[index]; void * volatile * typed_addr= static_cast<void * volatile *>(addr); void *ptr; /* (1) Atomic Load */ ptr= my_atomic_loadptr(typed_addr); PFS_table_share_index *pfs; if (ptr != NULL) { pfs= static_cast<PFS_table_share_index *>(ptr); return pfs; } /* (2) Create an index stat */ pfs= create_table_share_index_stat(server_share, index); if (pfs == NULL) return NULL; pfs->m_owner= this; void *old_ptr= NULL; ptr= pfs; /* (3) Atomic CAS */ if (my_atomic_casptr(typed_addr, & old_ptr, ptr)) { /* Ok. */ return pfs; } /* Collision with another thread that also executed (2) and (3). */ release_table_share_index_stat(pfs); pfs= static_cast<PFS_table_share_index *>(old_ptr); return pfs; }
O0
cpp
PFS_table_share::find_or_create_index_stat(TABLE_SHARE const*, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) movl -0x1c(%rbp), %ecx leaq 0x1c8(%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) je 0x39aa4 movq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x39b4a movq -0x18(%rbp), %rdi movl -0x1c(%rbp), %esi callq 0x39b60 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) jne 0x39ac8 movq $0x0, -0x8(%rbp) jmp 0x39b4a movq -0x68(%rbp), %rcx movq -0x48(%rbp), %rax movq %rcx, 0x150(%rax) movq $0x0, -0x50(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rcx movq -0x38(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movq -0x58(%rbp), %rdx lock cmpxchgq %rdx, (%rcx) movq %rax, %rcx sete %al movb %al, -0x71(%rbp) movq %rcx, -0x70(%rbp) testb $0x1, %al jne 0x39b19 movq -0x70(%rbp), %rax movq %rax, -0x50(%rbp) movb -0x71(%rbp), %al andb $0x1, %al movb %al, -0x59(%rbp) testb $0x1, -0x59(%rbp) je 0x39b31 movq -0x48(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x39b4a movq -0x48(%rbp), %rdi callq 0x39c30 movq -0x50(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x80, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN15PFS_table_share25find_or_create_index_statEPK11TABLE_SHAREj: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov [rbp+var_68], rax mov ecx, [rbp+var_1C] lea rax, [rax+rcx*8+1C8h] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_38], rax cmp [rbp+var_38], 0 jz short loc_39AA4 mov rax, [rbp+var_38] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov [rbp+var_8], rax jmp loc_39B4A loc_39AA4: mov rdi, [rbp+var_18]; TABLE_SHARE * mov esi, [rbp+var_1C]; unsigned int call _Z29create_table_share_index_statPK11TABLE_SHAREj; create_table_share_index_stat(TABLE_SHARE const*,uint) mov [rbp+var_48], rax cmp [rbp+var_48], 0 jnz short loc_39AC8 mov [rbp+var_8], 0 jmp loc_39B4A loc_39AC8: mov rcx, [rbp+var_68] mov rax, [rbp+var_48] mov [rax+150h], rcx mov [rbp+var_50], 0 mov rax, [rbp+var_48] mov [rbp+var_38], rax mov rcx, [rbp+var_30] mov rax, [rbp+var_38] mov [rbp+var_58], rax mov rax, [rbp+var_50] mov rdx, [rbp+var_58] lock cmpxchg [rcx], rdx mov rcx, rax setz al mov [rbp+var_71], al mov [rbp+var_70], rcx test al, 1 jnz short loc_39B19 mov rax, [rbp+var_70] mov [rbp+var_50], rax loc_39B19: mov al, [rbp+var_71] and al, 1 mov [rbp+var_59], al test [rbp+var_59], 1 jz short loc_39B31 mov rax, [rbp+var_48] mov [rbp+var_8], rax jmp short loc_39B4A loc_39B31: mov rdi, [rbp+var_48] call _Z30release_table_share_index_statP21PFS_table_share_index; release_table_share_index_stat(PFS_table_share_index *) mov rax, [rbp+var_50] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov [rbp+var_8], rax loc_39B4A: mov rax, [rbp+var_8] add rsp, 80h pop rbp retn
long long PFS_table_share::find_or_create_index_stat( PFS_table_share *this, const TABLE_SHARE *a2, unsigned int a3) { signed long long v3; // rcx signed long long v5; // [rsp+30h] [rbp-50h] signed long long table_share_index_stat; // [rsp+38h] [rbp-48h] volatile signed long long *v7; // [rsp+50h] [rbp-30h] v7 = (volatile signed long long *)((char *)this + 8 * a3 + 456); if ( *v7 ) return *((_QWORD *)this + a3 + 57); table_share_index_stat = create_table_share_index_stat(a2, a3); if ( !table_share_index_stat ) return 0LL; *(_QWORD *)(table_share_index_stat + 336) = this; v3 = _InterlockedCompareExchange64(v7, table_share_index_stat, 0LL); if ( !v3 ) return table_share_index_stat; v5 = v3; release_table_share_index_stat(table_share_index_stat); return v5; }
find_or_create_index_stat: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x68],RAX MOV ECX,dword ptr [RBP + -0x1c] LEA RAX,[RAX + RCX*0x8 + 0x1c8] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JZ 0x00139aa4 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x8],RAX JMP 0x00139b4a LAB_00139aa4: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x1c] CALL 0x00139b60 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JNZ 0x00139ac8 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00139b4a LAB_00139ac8: MOV RCX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RAX + 0x150],RCX MOV qword ptr [RBP + -0x50],0x0 MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x58] CMPXCHG.LOCK qword ptr [RCX],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x71],AL MOV qword ptr [RBP + -0x70],RCX TEST AL,0x1 JNZ 0x00139b19 MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x50],RAX LAB_00139b19: MOV AL,byte ptr [RBP + -0x71] AND AL,0x1 MOV byte ptr [RBP + -0x59],AL TEST byte ptr [RBP + -0x59],0x1 JZ 0x00139b31 MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x8],RAX JMP 0x00139b4a LAB_00139b31: MOV RDI,qword ptr [RBP + -0x48] CALL 0x00139c30 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x8],RAX LAB_00139b4a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x80 POP RBP RET
/* PFS_table_share::find_or_create_index_stat(TABLE_SHARE const*, unsigned int) */ PFS_table_share_index * __thiscall PFS_table_share::find_or_create_index_stat(PFS_table_share *this,TABLE_SHARE *param_1,uint param_2) { PFS_table_share *pPVar1; PFS_table_share_index *pPVar2; bool bVar3; PFS_table_share_index *local_10; pPVar1 = this + (ulong)param_2 * 8 + 0x1c8; local_10 = *(PFS_table_share_index **)pPVar1; if (local_10 == (PFS_table_share_index *)0x0) { local_10 = (PFS_table_share_index *)create_table_share_index_stat(param_1,param_2); if (local_10 == (PFS_table_share_index *)0x0) { local_10 = (PFS_table_share_index *)0x0; } else { *(PFS_table_share **)(local_10 + 0x150) = this; LOCK(); pPVar2 = *(PFS_table_share_index **)pPVar1; bVar3 = pPVar2 == (PFS_table_share_index *)0x0; if (bVar3) { *(PFS_table_share_index **)pPVar1 = local_10; pPVar2 = (PFS_table_share_index *)0x0; } UNLOCK(); if (!bVar3) { release_table_share_index_stat(local_10); local_10 = pPVar2; } } } return local_10; }
49,948
js_object_constructor
bluesky950520[P]quickjs/quickjs.h
static inline JS_BOOL JS_IsUndefined(JSValue v) { return JS_VALUE_GET_TAG(v) == JS_TAG_UNDEFINED; }
O3
c
js_object_constructor: cmpl $0x3, %edx je 0x38764 movq 0x18(%rdi), %rax movq 0x108(%rax), %rax cmpq %rsi, 0x8(%rax) jne 0x38790 movq 0x8(%r8), %rdx movl %edx, %eax andl $-0x2, %eax cmpl $0x2, %eax jne 0x38788 movq 0x40(%rdi), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movl $0x1, %ecx jmp 0x20a15 movq (%r8), %rsi jmp 0x268d8 movl $0x1, %ecx jmp 0x373f3
js_object_constructor: cmp edx, 3 jz short loc_38764 mov rax, [rdi+18h] mov rax, [rax+108h] cmp [rax+8], rsi jnz short loc_38790 loc_38764: mov rdx, [r8+8] mov eax, edx and eax, 0FFFFFFFEh cmp eax, 2 jnz short loc_38788 mov rax, [rdi+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov ecx, 1 jmp JS_NewObjectProtoClass loc_38788: mov rsi, [r8] jmp JS_ToObject loc_38790: mov ecx, 1 jmp js_create_from_ctor
unsigned long long js_object_constructor( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { if ( (_DWORD)a3 != 3 && *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 264LL) + 8LL) != a2 ) return js_create_from_ctor(a1, a2, a3, 1); if ( (a5[1] & 0xFFFFFFFE) == 2 ) return JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL), 1u); return JS_ToObject(a1, *a5, a5[1], a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); }
js_object_constructor: CMP EDX,0x3 JZ 0x00138764 MOV RAX,qword ptr [RDI + 0x18] MOV RAX,qword ptr [RAX + 0x108] CMP qword ptr [RAX + 0x8],RSI JNZ 0x00138790 LAB_00138764: MOV RDX,qword ptr [R8 + 0x8] MOV EAX,EDX AND EAX,0xfffffffe CMP EAX,0x2 JNZ 0x00138788 MOV RAX,qword ptr [RDI + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV ECX,0x1 JMP 0x00120a15 LAB_00138788: MOV RSI,qword ptr [R8] JMP 0x001268d8 LAB_00138790: MOV ECX,0x1 JMP 0x001373f3
void js_object_constructor (long param_1,long param_2,int param_3,int8 param_4,int8 *param_5) { if ((param_3 != 3) && (*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x108) + 8) != param_2)) { js_create_from_ctor(); return; } if (((uint)param_5[1] & 0xfffffffe) == 2) { JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1); return; } JS_ToObject(param_1,*param_5); return; }
49,949
save_pack_length
eloqsql/storage/myisam/mi_packrec.c
uint save_pack_length(uint version, uchar *block_buff, ulong length) { if (length < 254) { *(uchar*) block_buff= (uchar) length; return 1; } if (length <= 65535) { *(uchar*) block_buff=254; int2store(block_buff+1,(uint) length); return 3; } *(uchar*) block_buff=255; if (version == 1) /* old format */ { DBUG_ASSERT(length <= 0xFFFFFF); int3store(block_buff + 1, (ulong) length); return 4; } else { int4store(block_buff + 1, (ulong) length); return 5; } }
O3
c
save_pack_length: pushq %rbp movq %rsp, %rbp cmpq $0xfd, %rdx ja 0x83960 movb %dl, (%rsi) movl $0x1, %eax jmp 0x8399a cmpq $0xffff, %rdx # imm = 0xFFFF ja 0x83977 movb $-0x2, (%rsi) movw %dx, 0x1(%rsi) movl $0x3, %eax jmp 0x8399a movb $-0x1, (%rsi) cmpl $0x1, %edi jne 0x83992 movb %dl, 0x1(%rsi) movb %dh, 0x2(%rsi) shrl $0x10, %edx movb %dl, 0x3(%rsi) movl $0x4, %eax jmp 0x8399a movl %edx, 0x1(%rsi) movl $0x5, %eax popq %rbp retq
save_pack_length: push rbp mov rbp, rsp cmp rdx, 0FDh ja short loc_83960 mov [rsi], dl mov eax, 1 jmp short loc_8399A loc_83960: cmp rdx, 0FFFFh ja short loc_83977 mov byte ptr [rsi], 0FEh mov [rsi+1], dx mov eax, 3 jmp short loc_8399A loc_83977: mov byte ptr [rsi], 0FFh cmp edi, 1 jnz short loc_83992 mov [rsi+1], dl mov [rsi+2], dh shr edx, 10h mov [rsi+3], dl mov eax, 4 jmp short loc_8399A loc_83992: mov [rsi+1], edx mov eax, 5 loc_8399A: pop rbp retn
long long save_pack_length(int a1, long long a2, unsigned long long a3) { if ( a3 > 0xFD ) { if ( a3 > 0xFFFF ) { *(_BYTE *)a2 = -1; if ( a1 == 1 ) { *(_WORD *)(a2 + 1) = a3; *(_BYTE *)(a2 + 3) = BYTE2(a3); return 4LL; } else { *(_DWORD *)(a2 + 1) = a3; return 5LL; } } else { *(_BYTE *)a2 = -2; *(_WORD *)(a2 + 1) = a3; return 3LL; } } else { *(_BYTE *)a2 = a3; return 1LL; } }
save_pack_length: PUSH RBP MOV RBP,RSP CMP RDX,0xfd JA 0x00183960 MOV byte ptr [RSI],DL MOV EAX,0x1 JMP 0x0018399a LAB_00183960: CMP RDX,0xffff JA 0x00183977 MOV byte ptr [RSI],0xfe MOV word ptr [RSI + 0x1],DX MOV EAX,0x3 JMP 0x0018399a LAB_00183977: MOV byte ptr [RSI],0xff CMP EDI,0x1 JNZ 0x00183992 MOV byte ptr [RSI + 0x1],DL MOV byte ptr [RSI + 0x2],DH SHR EDX,0x10 MOV byte ptr [RSI + 0x3],DL MOV EAX,0x4 JMP 0x0018399a LAB_00183992: MOV dword ptr [RSI + 0x1],EDX MOV EAX,0x5 LAB_0018399a: POP RBP RET
int8 save_pack_length(int param_1,int1 *param_2,ulong param_3) { int8 uVar1; if (param_3 < 0xfe) { *param_2 = (char)param_3; uVar1 = 1; } else if (param_3 < 0x10000) { *param_2 = 0xfe; *(short *)(param_2 + 1) = (short)param_3; uVar1 = 3; } else { *param_2 = 0xff; if (param_1 == 1) { param_2[1] = (char)param_3; param_2[2] = (char)(param_3 >> 8); param_2[3] = (char)(param_3 >> 0x10); uVar1 = 4; } else { *(int *)(param_2 + 1) = (int)param_3; uVar1 = 5; } } return uVar1; }
49,950
LoadShaderFromMemory
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode) { Shader shader = { 0 }; shader.id = rlLoadShaderCode(vsCode, fsCode); // After shader loading, we TRY to set default location names if (shader.id > 0) { // Default shader attribute locations have been binded before linking: // vertex position location = 0 // vertex texcoord location = 1 // vertex normal location = 2 // vertex color location = 3 // vertex tangent location = 4 // vertex texcoord2 location = 5 // vertex boneIds location = 6 // vertex boneWeights location = 7 // NOTE: If any location is not found, loc point becomes -1 shader.locs = (int *)RL_CALLOC(RL_MAX_SHADER_LOCATIONS, sizeof(int)); // All locations reset to -1 (no location) for (int i = 0; i < RL_MAX_SHADER_LOCATIONS; i++) shader.locs[i] = -1; // Get handles to GLSL input attribute locations shader.locs[SHADER_LOC_VERTEX_POSITION] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION); shader.locs[SHADER_LOC_VERTEX_TEXCOORD01] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD); shader.locs[SHADER_LOC_VERTEX_TEXCOORD02] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2); shader.locs[SHADER_LOC_VERTEX_NORMAL] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL); shader.locs[SHADER_LOC_VERTEX_TANGENT] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT); shader.locs[SHADER_LOC_VERTEX_COLOR] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR); shader.locs[SHADER_LOC_VERTEX_BONEIDS] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_BONEIDS); shader.locs[SHADER_LOC_VERTEX_BONEWEIGHTS] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS); // Get handles to GLSL uniform locations (vertex shader) shader.locs[SHADER_LOC_MATRIX_MVP] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_MVP); shader.locs[SHADER_LOC_MATRIX_VIEW] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW); shader.locs[SHADER_LOC_MATRIX_PROJECTION] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION); shader.locs[SHADER_LOC_MATRIX_MODEL] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL); shader.locs[SHADER_LOC_MATRIX_NORMAL] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL); shader.locs[SHADER_LOC_BONE_MATRICES] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_BONE_MATRICES); // Get handles to GLSL uniform locations (fragment shader) shader.locs[SHADER_LOC_COLOR_DIFFUSE] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR); shader.locs[SHADER_LOC_MAP_DIFFUSE] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0); // SHADER_LOC_MAP_ALBEDO shader.locs[SHADER_LOC_MAP_SPECULAR] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1); // SHADER_LOC_MAP_METALNESS shader.locs[SHADER_LOC_MAP_NORMAL] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2); } return shader; }
O0
c
LoadShaderFromMemory: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) leaq -0x10(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0xa2d0 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xb6fb0 movl %eax, -0x10(%rbp) cmpl $0x0, -0x10(%rbp) jbe 0xcfd53 movl $0x20, %edi movl $0x4, %esi callq 0xa340 movq %rax, -0x8(%rbp) movl $0x0, -0x24(%rbp) cmpl $0x20, -0x24(%rbp) jge 0xcfba4 movq -0x8(%rbp), %rax movslq -0x24(%rbp), %rcx movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xcfb84 movl -0x10(%rbp), %edi leaq 0xe544d(%rip), %rsi # 0x1b4ffb callq 0xb7540 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movl -0x10(%rbp), %edi leaq 0xe5445(%rip), %rsi # 0x1b500a callq 0xb7540 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x4(%rax) movl -0x10(%rbp), %edi leaq 0xe5463(%rip), %rsi # 0x1b5040 callq 0xb7540 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x8(%rax) movl -0x10(%rbp), %edi leaq 0xe5424(%rip), %rsi # 0x1b5019 callq 0xb7540 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0xc(%rax) movl -0x10(%rbp), %edi leaq 0xe5425(%rip), %rsi # 0x1b5032 callq 0xb7540 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x10(%rax) movl -0x10(%rbp), %edi leaq 0xe5401(%rip), %rsi # 0x1b5026 callq 0xb7540 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x14(%rax) movl -0x10(%rbp), %edi leaq 0xe5413(%rip), %rsi # 0x1b5050 callq 0xb7540 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x68(%rax) movl -0x10(%rbp), %edi leaq 0xe5409(%rip), %rsi # 0x1b505e callq 0xb7540 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x6c(%rax) movl -0x10(%rbp), %edi leaq 0xe5ec9(%rip), %rsi # 0x1b5b36 callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x18(%rax) movl -0x10(%rbp), %edi leaq 0xe5eb5(%rip), %rsi # 0x1b5b3a callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x1c(%rax) movl -0x10(%rbp), %edi leaq 0xe5ea5(%rip), %rsi # 0x1b5b42 callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x20(%rax) movl -0x10(%rbp), %edi leaq 0xe5e9b(%rip), %rsi # 0x1b5b50 callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x24(%rax) movl -0x10(%rbp), %edi leaq 0xe5e8c(%rip), %rsi # 0x1b5b59 callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x28(%rax) movl -0x10(%rbp), %edi leaq 0xe5e7e(%rip), %rsi # 0x1b5b63 callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x70(%rax) movl -0x10(%rbp), %edi leaq 0xe5e73(%rip), %rsi # 0x1b5b70 callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x30(%rax) movl -0x10(%rbp), %edi leaq 0xe5e66(%rip), %rsi # 0x1b5b7b callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x3c(%rax) movl -0x10(%rbp), %edi leaq 0xe5e57(%rip), %rsi # 0x1b5b84 callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x40(%rax) movl -0x10(%rbp), %edi leaq 0xe5e48(%rip), %rsi # 0x1b5b8d callq 0xb7500 movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x44(%rax) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0x30, %rsp popq %rbp retq
LoadShaderFromMemory: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_18], rdi mov [rbp+var_20], rsi lea rdi, [rbp+var_10] xor esi, esi mov edx, 10h call _memset mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call rlLoadShaderCode mov [rbp+var_10], eax cmp [rbp+var_10], 0 jbe loc_CFD53 mov edi, 20h ; ' ' mov esi, 4 call _calloc mov [rbp+var_8], rax mov [rbp+var_24], 0 loc_CFB84: cmp [rbp+var_24], 20h ; ' ' jge short loc_CFBA4 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_24] mov dword ptr [rax+rcx*4], 0FFFFFFFFh mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_CFB84 loc_CFBA4: mov edi, [rbp+var_10] lea rsi, aVertexposition; "vertexPosition" call rlGetLocationAttrib mov ecx, eax mov rax, [rbp+var_8] mov [rax], ecx mov edi, [rbp+var_10] lea rsi, aVertextexcoord; "vertexTexCoord" call rlGetLocationAttrib mov ecx, eax mov rax, [rbp+var_8] mov [rax+4], ecx mov edi, [rbp+var_10] lea rsi, aVertextexcoord_0; "vertexTexCoord2" call rlGetLocationAttrib mov ecx, eax mov rax, [rbp+var_8] mov [rax+8], ecx mov edi, [rbp+var_10] lea rsi, aVertexnormal; "vertexNormal" call rlGetLocationAttrib mov ecx, eax mov rax, [rbp+var_8] mov [rax+0Ch], ecx mov edi, [rbp+var_10] lea rsi, aVertextangent; "vertexTangent" call rlGetLocationAttrib mov ecx, eax mov rax, [rbp+var_8] mov [rax+10h], ecx mov edi, [rbp+var_10] lea rsi, aVertexcolor; "vertexColor" call rlGetLocationAttrib mov ecx, eax mov rax, [rbp+var_8] mov [rax+14h], ecx mov edi, [rbp+var_10] lea rsi, aVertexboneids; "vertexBoneIds" call rlGetLocationAttrib mov ecx, eax mov rax, [rbp+var_8] mov [rax+68h], ecx mov edi, [rbp+var_10] lea rsi, aVertexboneweig; "vertexBoneWeights" call rlGetLocationAttrib mov ecx, eax mov rax, [rbp+var_8] mov [rax+6Ch], ecx mov edi, [rbp+var_10] lea rsi, aMvp; "mvp" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+18h], ecx mov edi, [rbp+var_10] lea rsi, aMatview; "matView" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+1Ch], ecx mov edi, [rbp+var_10] lea rsi, aMatprojection; "matProjection" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+20h], ecx mov edi, [rbp+var_10] lea rsi, aMatmodel; "matModel" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+24h], ecx mov edi, [rbp+var_10] lea rsi, aMatnormal; "matNormal" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+28h], ecx mov edi, [rbp+var_10] lea rsi, aBonematrices; "boneMatrices" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+70h], ecx mov edi, [rbp+var_10] lea rsi, aColdiffuse; "colDiffuse" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+30h], ecx mov edi, [rbp+var_10] lea rsi, aTexture0; "texture0" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+3Ch], ecx mov edi, [rbp+var_10] lea rsi, aTexture1; "texture1" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+40h], ecx mov edi, [rbp+var_10] lea rsi, aTexture2; "texture2" call rlGetLocationUniform mov ecx, eax mov rax, [rbp+var_8] mov [rax+44h], ecx loc_CFD53: mov eax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 30h pop rbp retn
long long LoadShaderFromMemory(long long a1, long long a2) { int LocationAttrib; // eax int v3; // eax int v4; // eax int v5; // eax int v6; // eax int v7; // eax int v8; // eax int v9; // eax int LocationUniform; // eax int v11; // eax int v12; // eax int v13; // eax int v14; // eax int v15; // eax int v16; // eax int v17; // eax int v18; // eax int v19; // eax int i; // [rsp+Ch] [rbp-24h] unsigned int ShaderCode; // [rsp+20h] [rbp-10h] BYREF _DWORD *v23; // [rsp+28h] [rbp-8h] memset(&ShaderCode, 0LL, 16LL); ShaderCode = rlLoadShaderCode(a1, a2); if ( ShaderCode ) { v23 = (_DWORD *)calloc(32LL, 4LL); for ( i = 0; i < 32; ++i ) v23[i] = -1; LocationAttrib = rlGetLocationAttrib(ShaderCode, (long long)"vertexPosition"); *v23 = LocationAttrib; v3 = rlGetLocationAttrib(ShaderCode, (long long)"vertexTexCoord"); v23[1] = v3; v4 = rlGetLocationAttrib(ShaderCode, (long long)"vertexTexCoord2"); v23[2] = v4; v5 = rlGetLocationAttrib(ShaderCode, (long long)"vertexNormal"); v23[3] = v5; v6 = rlGetLocationAttrib(ShaderCode, (long long)"vertexTangent"); v23[4] = v6; v7 = rlGetLocationAttrib(ShaderCode, (long long)"vertexColor"); v23[5] = v7; v8 = rlGetLocationAttrib(ShaderCode, (long long)"vertexBoneIds"); v23[26] = v8; v9 = rlGetLocationAttrib(ShaderCode, (long long)"vertexBoneWeights"); v23[27] = v9; LocationUniform = rlGetLocationUniform(ShaderCode, (long long)"mvp"); v23[6] = LocationUniform; v11 = rlGetLocationUniform(ShaderCode, (long long)"matView"); v23[7] = v11; v12 = rlGetLocationUniform(ShaderCode, (long long)"matProjection"); v23[8] = v12; v13 = rlGetLocationUniform(ShaderCode, (long long)"matModel"); v23[9] = v13; v14 = rlGetLocationUniform(ShaderCode, (long long)"matNormal"); v23[10] = v14; v15 = rlGetLocationUniform(ShaderCode, (long long)"boneMatrices"); v23[28] = v15; v16 = rlGetLocationUniform(ShaderCode, (long long)"colDiffuse"); v23[12] = v16; v17 = rlGetLocationUniform(ShaderCode, (long long)"texture0"); v23[15] = v17; v18 = rlGetLocationUniform(ShaderCode, (long long)"texture1"); v23[16] = v18; v19 = rlGetLocationUniform(ShaderCode, (long long)"texture2"); v23[17] = v19; } return ShaderCode; }
LoadShaderFromMemory: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI LEA RDI,[RBP + -0x10] XOR ESI,ESI MOV EDX,0x10 CALL 0x0010a2d0 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001b6fb0 MOV dword ptr [RBP + -0x10],EAX CMP dword ptr [RBP + -0x10],0x0 JBE 0x001cfd53 MOV EDI,0x20 MOV ESI,0x4 CALL 0x0010a340 MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x24],0x0 LAB_001cfb84: CMP dword ptr [RBP + -0x24],0x20 JGE 0x001cfba4 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x24] MOV dword ptr [RAX + RCX*0x4],0xffffffff MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001cfb84 LAB_001cfba4: MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b4ffb] CALL 0x001b7540 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b500a] CALL 0x001b7540 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5040] CALL 0x001b7540 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5019] CALL 0x001b7540 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5032] CALL 0x001b7540 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5026] CALL 0x001b7540 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5050] CALL 0x001b7540 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x68],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b505e] CALL 0x001b7540 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x6c],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b36] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x18],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b3a] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x1c],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b42] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x20],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b50] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b59] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x28],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b63] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x70],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b70] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x30],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b7b] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x3c],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b84] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x40],ECX MOV EDI,dword ptr [RBP + -0x10] LEA RSI,[0x2b5b8d] CALL 0x001b7500 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x44],ECX LAB_001cfd53: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int1 [16] LoadShaderFromMemory(int8 param_1,int8 param_2) { int4 uVar1; int1 auVar2 [16]; int local_2c; uint local_18 [2]; int4 *local_10; memset(local_18,0,0x10); local_18[0] = rlLoadShaderCode(param_1,param_2); if (local_18[0] != 0) { local_10 = (int4 *)calloc(0x20,4); for (local_2c = 0; local_2c < 0x20; local_2c = local_2c + 1) { local_10[local_2c] = 0xffffffff; } uVar1 = rlGetLocationAttrib(local_18[0],"vertexPosition"); *local_10 = uVar1; uVar1 = rlGetLocationAttrib(local_18[0],"vertexTexCoord"); local_10[1] = uVar1; uVar1 = rlGetLocationAttrib(local_18[0],"vertexTexCoord2"); local_10[2] = uVar1; uVar1 = rlGetLocationAttrib(local_18[0],"vertexNormal"); local_10[3] = uVar1; uVar1 = rlGetLocationAttrib(local_18[0],"vertexTangent"); local_10[4] = uVar1; uVar1 = rlGetLocationAttrib(local_18[0],"vertexColor"); local_10[5] = uVar1; uVar1 = rlGetLocationAttrib(local_18[0],"vertexBoneIds"); local_10[0x1a] = uVar1; uVar1 = rlGetLocationAttrib(local_18[0],"vertexBoneWeights"); local_10[0x1b] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],&DAT_002b5b36); local_10[6] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],"matView"); local_10[7] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],"matProjection"); local_10[8] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],"matModel"); local_10[9] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],"matNormal"); local_10[10] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],"boneMatrices"); local_10[0x1c] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],"colDiffuse"); local_10[0xc] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],"texture0"); local_10[0xf] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],"texture1"); local_10[0x10] = uVar1; uVar1 = rlGetLocationUniform(local_18[0],"texture2"); local_10[0x11] = uVar1; } auVar2._4_4_ = 0; auVar2._0_4_ = local_18[0]; auVar2._8_8_ = local_10; return auVar2; }
49,951
LoadShaderFromMemory
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode) { Shader shader = { 0 }; shader.id = rlLoadShaderCode(vsCode, fsCode); // After shader loading, we TRY to set default location names if (shader.id > 0) { // Default shader attribute locations have been binded before linking: // vertex position location = 0 // vertex texcoord location = 1 // vertex normal location = 2 // vertex color location = 3 // vertex tangent location = 4 // vertex texcoord2 location = 5 // vertex boneIds location = 6 // vertex boneWeights location = 7 // NOTE: If any location is not found, loc point becomes -1 shader.locs = (int *)RL_CALLOC(RL_MAX_SHADER_LOCATIONS, sizeof(int)); // All locations reset to -1 (no location) for (int i = 0; i < RL_MAX_SHADER_LOCATIONS; i++) shader.locs[i] = -1; // Get handles to GLSL input attribute locations shader.locs[SHADER_LOC_VERTEX_POSITION] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION); shader.locs[SHADER_LOC_VERTEX_TEXCOORD01] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD); shader.locs[SHADER_LOC_VERTEX_TEXCOORD02] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2); shader.locs[SHADER_LOC_VERTEX_NORMAL] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL); shader.locs[SHADER_LOC_VERTEX_TANGENT] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT); shader.locs[SHADER_LOC_VERTEX_COLOR] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR); shader.locs[SHADER_LOC_VERTEX_BONEIDS] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_BONEIDS); shader.locs[SHADER_LOC_VERTEX_BONEWEIGHTS] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS); // Get handles to GLSL uniform locations (vertex shader) shader.locs[SHADER_LOC_MATRIX_MVP] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_MVP); shader.locs[SHADER_LOC_MATRIX_VIEW] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW); shader.locs[SHADER_LOC_MATRIX_PROJECTION] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION); shader.locs[SHADER_LOC_MATRIX_MODEL] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL); shader.locs[SHADER_LOC_MATRIX_NORMAL] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL); shader.locs[SHADER_LOC_BONE_MATRICES] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_BONE_MATRICES); // Get handles to GLSL uniform locations (fragment shader) shader.locs[SHADER_LOC_COLOR_DIFFUSE] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR); shader.locs[SHADER_LOC_MAP_DIFFUSE] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0); // SHADER_LOC_MAP_ALBEDO shader.locs[SHADER_LOC_MAP_SPECULAR] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1); // SHADER_LOC_MAP_METALNESS shader.locs[SHADER_LOC_MAP_NORMAL] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2); } return shader; }
O2
c
LoadShaderFromMemory: pushq %r14 pushq %rbx pushq %rax callq 0x553bf movl %eax, %ebx testl %eax, %eax je 0x62973 pushq $0x20 popq %rdi pushq $0x4 popq %rsi callq 0x9320 movq %rax, %r14 xorl %eax, %eax cmpq $0x20, %rax je 0x6281c orl $-0x1, (%r14,%rax,4) incq %rax jmp 0x6280c leaq 0x62f00(%rip), %rsi # 0xc5723 movl %ebx, %edi callq *0xc3285(%rip) # 0x125ab0 movl %eax, (%r14) leaq 0x62efd(%rip), %rsi # 0xc5732 movl %ebx, %edi callq *0xc3273(%rip) # 0x125ab0 movl %eax, 0x4(%r14) leaq 0x62f20(%rip), %rsi # 0xc5768 movl %ebx, %edi callq *0xc3260(%rip) # 0x125ab0 movl %eax, 0x8(%r14) leaq 0x62ee6(%rip), %rsi # 0xc5741 movl %ebx, %edi callq *0xc324d(%rip) # 0x125ab0 movl %eax, 0xc(%r14) leaq 0x62eec(%rip), %rsi # 0xc575a movl %ebx, %edi callq *0xc323a(%rip) # 0x125ab0 movl %eax, 0x10(%r14) leaq 0x62ecd(%rip), %rsi # 0xc574e movl %ebx, %edi callq *0xc3227(%rip) # 0x125ab0 movl %eax, 0x14(%r14) leaq 0x62ee4(%rip), %rsi # 0xc5778 movl %ebx, %edi callq *0xc3214(%rip) # 0x125ab0 movl %eax, 0x68(%r14) leaq 0x62edf(%rip), %rsi # 0xc5786 movl %ebx, %edi callq *0xc3201(%rip) # 0x125ab0 movl %eax, 0x6c(%r14) leaq 0x63970(%rip), %rsi # 0xc622a movl %ebx, %edi callq *0xc35fe(%rip) # 0x125ec0 movl %eax, 0x18(%r14) leaq 0x63961(%rip), %rsi # 0xc622e movl %ebx, %edi callq *0xc35eb(%rip) # 0x125ec0 movl %eax, 0x1c(%r14) leaq 0x63956(%rip), %rsi # 0xc6236 movl %ebx, %edi callq *0xc35d8(%rip) # 0x125ec0 movl %eax, 0x20(%r14) leaq 0x63951(%rip), %rsi # 0xc6244 movl %ebx, %edi callq *0xc35c5(%rip) # 0x125ec0 movl %eax, 0x24(%r14) leaq 0x63947(%rip), %rsi # 0xc624d movl %ebx, %edi callq *0xc35b2(%rip) # 0x125ec0 movl %eax, 0x28(%r14) leaq 0x6393e(%rip), %rsi # 0xc6257 movl %ebx, %edi callq *0xc359f(%rip) # 0x125ec0 movl %eax, 0x70(%r14) leaq 0x63938(%rip), %rsi # 0xc6264 movl %ebx, %edi callq *0xc358c(%rip) # 0x125ec0 movl %eax, 0x30(%r14) leaq 0x63930(%rip), %rsi # 0xc626f movl %ebx, %edi callq *0xc3579(%rip) # 0x125ec0 movl %eax, 0x3c(%r14) leaq 0x63926(%rip), %rsi # 0xc6278 movl %ebx, %edi callq *0xc3566(%rip) # 0x125ec0 movl %eax, 0x40(%r14) leaq 0x6391c(%rip), %rsi # 0xc6281 movl %ebx, %edi callq *0xc3553(%rip) # 0x125ec0 movl %eax, 0x44(%r14) jmp 0x62976 xorl %r14d, %r14d movl %ebx, %eax movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r14 retq
LoadShaderFromMemory: push r14 push rbx push rax call rlLoadShaderCode mov ebx, eax test eax, eax jz loc_62973 push 20h ; ' ' pop rdi push 4 pop rsi call _calloc mov r14, rax xor eax, eax loc_6280C: cmp rax, 20h ; ' ' jz short loc_6281C or dword ptr [r14+rax*4], 0FFFFFFFFh inc rax jmp short loc_6280C loc_6281C: lea rsi, aVertexposition; "vertexPosition" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14], eax lea rsi, aVertextexcoord; "vertexTexCoord" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+4], eax lea rsi, aVertextexcoord_0; "vertexTexCoord2" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+8], eax lea rsi, aVertexnormal; "vertexNormal" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+0Ch], eax lea rsi, aVertextangent; "vertexTangent" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+10h], eax lea rsi, aVertexcolor; "vertexColor" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+14h], eax lea rsi, aVertexboneids; "vertexBoneIds" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+68h], eax lea rsi, aVertexboneweig; "vertexBoneWeights" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+6Ch], eax lea rsi, aMvp; "mvp" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+18h], eax lea rsi, aMatview; "matView" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+1Ch], eax lea rsi, aMatprojection; "matProjection" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+20h], eax lea rsi, aMatmodel; "matModel" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+24h], eax lea rsi, aMatnormal; "matNormal" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+28h], eax lea rsi, aBonematrices; "boneMatrices" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+70h], eax lea rsi, aColdiffuse; "colDiffuse" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+30h], eax lea rsi, aTexture0; "texture0" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+3Ch], eax lea rsi, aTexture1; "texture1" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+40h], eax lea rsi, aTexture2; "texture2" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+44h], eax jmp short loc_62976 loc_62973: xor r14d, r14d loc_62976: mov eax, ebx mov rdx, r14 add rsp, 8 pop rbx pop r14 retn
long long LoadShaderFromMemory(long long a1, long long a2) { unsigned int ShaderCode; // ebx _DWORD *v3; // r14 long long i; // rax ShaderCode = rlLoadShaderCode(a1, a2); if ( ShaderCode ) { v3 = (_DWORD *)calloc(32LL, 4LL); for ( i = 0LL; i != 32; ++i ) v3[i] = -1; *v3 = glad_glGetAttribLocation(ShaderCode, "vertexPosition"); v3[1] = glad_glGetAttribLocation(ShaderCode, "vertexTexCoord"); v3[2] = glad_glGetAttribLocation(ShaderCode, "vertexTexCoord2"); v3[3] = glad_glGetAttribLocation(ShaderCode, "vertexNormal"); v3[4] = glad_glGetAttribLocation(ShaderCode, "vertexTangent"); v3[5] = glad_glGetAttribLocation(ShaderCode, "vertexColor"); v3[26] = glad_glGetAttribLocation(ShaderCode, "vertexBoneIds"); v3[27] = glad_glGetAttribLocation(ShaderCode, "vertexBoneWeights"); v3[6] = glad_glGetUniformLocation(ShaderCode, "mvp"); v3[7] = glad_glGetUniformLocation(ShaderCode, "matView"); v3[8] = glad_glGetUniformLocation(ShaderCode, "matProjection"); v3[9] = glad_glGetUniformLocation(ShaderCode, "matModel"); v3[10] = glad_glGetUniformLocation(ShaderCode, "matNormal"); v3[28] = glad_glGetUniformLocation(ShaderCode, "boneMatrices"); v3[12] = glad_glGetUniformLocation(ShaderCode, "colDiffuse"); v3[15] = glad_glGetUniformLocation(ShaderCode, "texture0"); v3[16] = glad_glGetUniformLocation(ShaderCode, "texture1"); v3[17] = glad_glGetUniformLocation(ShaderCode, "texture2"); } return ShaderCode; }
LoadShaderFromMemory: PUSH R14 PUSH RBX PUSH RAX CALL 0x001553bf MOV EBX,EAX TEST EAX,EAX JZ 0x00162973 PUSH 0x20 POP RDI PUSH 0x4 POP RSI CALL 0x00109320 MOV R14,RAX XOR EAX,EAX LAB_0016280c: CMP RAX,0x20 JZ 0x0016281c OR dword ptr [R14 + RAX*0x4],0xffffffff INC RAX JMP 0x0016280c LAB_0016281c: LEA RSI,[0x1c5723] MOV EDI,EBX CALL qword ptr [0x00225ab0] MOV dword ptr [R14],EAX LEA RSI,[0x1c5732] MOV EDI,EBX CALL qword ptr [0x00225ab0] MOV dword ptr [R14 + 0x4],EAX LEA RSI,[0x1c5768] MOV EDI,EBX CALL qword ptr [0x00225ab0] MOV dword ptr [R14 + 0x8],EAX LEA RSI,[0x1c5741] MOV EDI,EBX CALL qword ptr [0x00225ab0] MOV dword ptr [R14 + 0xc],EAX LEA RSI,[0x1c575a] MOV EDI,EBX CALL qword ptr [0x00225ab0] MOV dword ptr [R14 + 0x10],EAX LEA RSI,[0x1c574e] MOV EDI,EBX CALL qword ptr [0x00225ab0] MOV dword ptr [R14 + 0x14],EAX LEA RSI,[0x1c5778] MOV EDI,EBX CALL qword ptr [0x00225ab0] MOV dword ptr [R14 + 0x68],EAX LEA RSI,[0x1c5786] MOV EDI,EBX CALL qword ptr [0x00225ab0] MOV dword ptr [R14 + 0x6c],EAX LEA RSI,[0x1c622a] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x18],EAX LEA RSI,[0x1c622e] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x1c],EAX LEA RSI,[0x1c6236] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x20],EAX LEA RSI,[0x1c6244] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x24],EAX LEA RSI,[0x1c624d] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x28],EAX LEA RSI,[0x1c6257] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x70],EAX LEA RSI,[0x1c6264] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x30],EAX LEA RSI,[0x1c626f] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x3c],EAX LEA RSI,[0x1c6278] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x40],EAX LEA RSI,[0x1c6281] MOV EDI,EBX CALL qword ptr [0x00225ec0] MOV dword ptr [R14 + 0x44],EAX JMP 0x00162976 LAB_00162973: XOR R14D,R14D LAB_00162976: MOV EAX,EBX MOV RDX,R14 ADD RSP,0x8 POP RBX POP R14 RET
int1 [16] LoadShaderFromMemory(void) { uint uVar1; int4 uVar2; int4 *puVar3; long lVar4; ulong uVar5; int1 auVar6 [16]; uVar1 = rlLoadShaderCode(); uVar5 = CONCAT44(0,uVar1); if (uVar1 == 0) { puVar3 = (int4 *)0x0; } else { puVar3 = (int4 *)calloc(0x20,4); for (lVar4 = 0; lVar4 != 0x20; lVar4 = lVar4 + 1) { puVar3[lVar4] = 0xffffffff; } uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexPosition"); *puVar3 = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexTexCoord"); puVar3[1] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexTexCoord2"); puVar3[2] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexNormal"); puVar3[3] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexTangent"); puVar3[4] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexColor"); puVar3[5] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexBoneIds"); puVar3[0x1a] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexBoneWeights"); puVar3[0x1b] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,&DAT_001c622a); puVar3[6] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"matView"); puVar3[7] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"matProjection"); puVar3[8] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"matModel"); puVar3[9] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"matNormal"); puVar3[10] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"boneMatrices"); puVar3[0x1c] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar5,"colDiffuse"); puVar3[0xc] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar5,"texture0"); puVar3[0xf] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar5,"texture1"); puVar3[0x10] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar5,"texture2"); puVar3[0x11] = uVar2; } auVar6._8_8_ = puVar3; auVar6._0_8_ = uVar5; return auVar6; }
49,952
LoadShaderFromMemory
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
Shader LoadShaderFromMemory(const char *vsCode, const char *fsCode) { Shader shader = { 0 }; shader.id = rlLoadShaderCode(vsCode, fsCode); // After shader loading, we TRY to set default location names if (shader.id > 0) { // Default shader attribute locations have been binded before linking: // vertex position location = 0 // vertex texcoord location = 1 // vertex normal location = 2 // vertex color location = 3 // vertex tangent location = 4 // vertex texcoord2 location = 5 // vertex boneIds location = 6 // vertex boneWeights location = 7 // NOTE: If any location is not found, loc point becomes -1 shader.locs = (int *)RL_CALLOC(RL_MAX_SHADER_LOCATIONS, sizeof(int)); // All locations reset to -1 (no location) for (int i = 0; i < RL_MAX_SHADER_LOCATIONS; i++) shader.locs[i] = -1; // Get handles to GLSL input attribute locations shader.locs[SHADER_LOC_VERTEX_POSITION] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_POSITION); shader.locs[SHADER_LOC_VERTEX_TEXCOORD01] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD); shader.locs[SHADER_LOC_VERTEX_TEXCOORD02] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_TEXCOORD2); shader.locs[SHADER_LOC_VERTEX_NORMAL] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_NORMAL); shader.locs[SHADER_LOC_VERTEX_TANGENT] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_TANGENT); shader.locs[SHADER_LOC_VERTEX_COLOR] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_COLOR); shader.locs[SHADER_LOC_VERTEX_BONEIDS] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_BONEIDS); shader.locs[SHADER_LOC_VERTEX_BONEWEIGHTS] = rlGetLocationAttrib(shader.id, RL_DEFAULT_SHADER_ATTRIB_NAME_BONEWEIGHTS); // Get handles to GLSL uniform locations (vertex shader) shader.locs[SHADER_LOC_MATRIX_MVP] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_MVP); shader.locs[SHADER_LOC_MATRIX_VIEW] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_VIEW); shader.locs[SHADER_LOC_MATRIX_PROJECTION] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_PROJECTION); shader.locs[SHADER_LOC_MATRIX_MODEL] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_MODEL); shader.locs[SHADER_LOC_MATRIX_NORMAL] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_NORMAL); shader.locs[SHADER_LOC_BONE_MATRICES] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_BONE_MATRICES); // Get handles to GLSL uniform locations (fragment shader) shader.locs[SHADER_LOC_COLOR_DIFFUSE] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_UNIFORM_NAME_COLOR); shader.locs[SHADER_LOC_MAP_DIFFUSE] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE0); // SHADER_LOC_MAP_ALBEDO shader.locs[SHADER_LOC_MAP_SPECULAR] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE1); // SHADER_LOC_MAP_METALNESS shader.locs[SHADER_LOC_MAP_NORMAL] = rlGetLocationUniform(shader.id, RL_DEFAULT_SHADER_SAMPLER2D_NAME_TEXTURE2); } return shader; }
O3
c
LoadShaderFromMemory: pushq %r14 pushq %rbx pushq %rax callq 0x652da movl %eax, %ebx testl %eax, %eax je 0x74623 movl $0x20, %edi movl $0x4, %esi callq 0xa330 movq %rax, %r14 pcmpeqd %xmm0, %xmm0 movdqu %xmm0, 0x2c(%rax) movdqu %xmm0, 0x3c(%rax) movdqu %xmm0, 0x4c(%rax) movdqu %xmm0, 0x5c(%rax) movdqu %xmm0, 0x6c(%rax) movl $0xffffffff, 0x7c(%rax) # imm = 0xFFFFFFFF leaq 0x6b0c8(%rip), %rsi # 0xdf59b movl %ebx, %edi callq *0xc55b5(%rip) # 0x139a90 movl %eax, (%r14) leaq 0x6b0c5(%rip), %rsi # 0xdf5aa movl %ebx, %edi callq *0xc55a3(%rip) # 0x139a90 movl %eax, 0x4(%r14) leaq 0x6b0e8(%rip), %rsi # 0xdf5e0 movl %ebx, %edi callq *0xc5590(%rip) # 0x139a90 movl %eax, 0x8(%r14) leaq 0x6b0ae(%rip), %rsi # 0xdf5b9 movl %ebx, %edi callq *0xc557d(%rip) # 0x139a90 movl %eax, 0xc(%r14) leaq 0x6b0b4(%rip), %rsi # 0xdf5d2 movl %ebx, %edi callq *0xc556a(%rip) # 0x139a90 movl %eax, 0x10(%r14) leaq 0x6b095(%rip), %rsi # 0xdf5c6 movl %ebx, %edi callq *0xc5557(%rip) # 0x139a90 movl %eax, 0x14(%r14) leaq 0x6b0ac(%rip), %rsi # 0xdf5f0 movl %ebx, %edi callq *0xc5544(%rip) # 0x139a90 movl %eax, 0x68(%r14) leaq 0x6b0a7(%rip), %rsi # 0xdf5fe movl %ebx, %edi callq *0xc5531(%rip) # 0x139a90 movl %eax, 0x6c(%r14) leaq 0x6bb38(%rip), %rsi # 0xe00a2 movl %ebx, %edi callq *0xc592e(%rip) # 0x139ea0 movl %eax, 0x18(%r14) leaq 0x6bb29(%rip), %rsi # 0xe00a6 movl %ebx, %edi callq *0xc591b(%rip) # 0x139ea0 movl %eax, 0x1c(%r14) leaq 0x6bb1e(%rip), %rsi # 0xe00ae movl %ebx, %edi callq *0xc5908(%rip) # 0x139ea0 movl %eax, 0x20(%r14) leaq 0x6bb19(%rip), %rsi # 0xe00bc movl %ebx, %edi callq *0xc58f5(%rip) # 0x139ea0 movl %eax, 0x24(%r14) leaq 0x6bb0f(%rip), %rsi # 0xe00c5 movl %ebx, %edi callq *0xc58e2(%rip) # 0x139ea0 movl %eax, 0x28(%r14) leaq 0x6bb06(%rip), %rsi # 0xe00cf movl %ebx, %edi callq *0xc58cf(%rip) # 0x139ea0 movl %eax, 0x70(%r14) leaq 0x6bb00(%rip), %rsi # 0xe00dc movl %ebx, %edi callq *0xc58bc(%rip) # 0x139ea0 movl %eax, 0x30(%r14) leaq 0x6baf8(%rip), %rsi # 0xe00e7 movl %ebx, %edi callq *0xc58a9(%rip) # 0x139ea0 movl %eax, 0x3c(%r14) leaq 0x6baee(%rip), %rsi # 0xe00f0 movl %ebx, %edi callq *0xc5896(%rip) # 0x139ea0 movl %eax, 0x40(%r14) leaq 0x6bae4(%rip), %rsi # 0xe00f9 movl %ebx, %edi callq *0xc5883(%rip) # 0x139ea0 movl %eax, 0x44(%r14) jmp 0x74626 xorl %r14d, %r14d movl %ebx, %eax movq %r14, %rdx addq $0x8, %rsp popq %rbx popq %r14 retq
LoadShaderFromMemory: push r14 push rbx push rax call rlLoadShaderCode mov ebx, eax test eax, eax jz loc_74623 mov edi, 20h ; ' ' mov esi, 4 call _calloc mov r14, rax pcmpeqd xmm0, xmm0 movdqu xmmword ptr [rax+2Ch], xmm0 movdqu xmmword ptr [rax+3Ch], xmm0 movdqu xmmword ptr [rax+4Ch], xmm0 movdqu xmmword ptr [rax+5Ch], xmm0 movdqu xmmword ptr [rax+6Ch], xmm0 mov dword ptr [rax+7Ch], 0FFFFFFFFh lea rsi, aVertexposition; "vertexPosition" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14], eax lea rsi, aVertextexcoord; "vertexTexCoord" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+4], eax lea rsi, aVertextexcoord_0; "vertexTexCoord2" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+8], eax lea rsi, aVertexnormal; "vertexNormal" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+0Ch], eax lea rsi, aVertextangent; "vertexTangent" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+10h], eax lea rsi, aVertexcolor; "vertexColor" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+14h], eax lea rsi, aVertexboneids; "vertexBoneIds" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+68h], eax lea rsi, aVertexboneweig; "vertexBoneWeights" mov edi, ebx call cs:glad_glGetAttribLocation mov [r14+6Ch], eax lea rsi, aMvp; "mvp" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+18h], eax lea rsi, aMatview; "matView" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+1Ch], eax lea rsi, aMatprojection; "matProjection" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+20h], eax lea rsi, aMatmodel; "matModel" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+24h], eax lea rsi, aMatnormal; "matNormal" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+28h], eax lea rsi, aBonematrices; "boneMatrices" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+70h], eax lea rsi, aColdiffuse; "colDiffuse" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+30h], eax lea rsi, aTexture0; "texture0" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+3Ch], eax lea rsi, aTexture1; "texture1" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+40h], eax lea rsi, aTexture2; "texture2" mov edi, ebx call cs:glad_glGetUniformLocation mov [r14+44h], eax jmp short loc_74626 loc_74623: xor r14d, r14d loc_74626: mov eax, ebx mov rdx, r14 add rsp, 8 pop rbx pop r14 retn
long long LoadShaderFromMemory(long long a1, long long a2) { unsigned int ShaderCode; // ebx long long v3; // r14 ShaderCode = rlLoadShaderCode(a1, a2); if ( ShaderCode ) { v3 = calloc(32LL, 4LL); *(_OWORD *)(v3 + 44) = -1LL; *(_OWORD *)(v3 + 60) = -1LL; *(_OWORD *)(v3 + 76) = -1LL; *(_OWORD *)(v3 + 92) = -1LL; *(_OWORD *)(v3 + 108) = -1LL; *(_DWORD *)(v3 + 124) = -1; *(_DWORD *)v3 = glad_glGetAttribLocation(ShaderCode, "vertexPosition"); *(_DWORD *)(v3 + 4) = glad_glGetAttribLocation(ShaderCode, "vertexTexCoord"); *(_DWORD *)(v3 + 8) = glad_glGetAttribLocation(ShaderCode, "vertexTexCoord2"); *(_DWORD *)(v3 + 12) = glad_glGetAttribLocation(ShaderCode, "vertexNormal"); *(_DWORD *)(v3 + 16) = glad_glGetAttribLocation(ShaderCode, "vertexTangent"); *(_DWORD *)(v3 + 20) = glad_glGetAttribLocation(ShaderCode, "vertexColor"); *(_DWORD *)(v3 + 104) = glad_glGetAttribLocation(ShaderCode, "vertexBoneIds"); *(_DWORD *)(v3 + 108) = glad_glGetAttribLocation(ShaderCode, "vertexBoneWeights"); *(_DWORD *)(v3 + 24) = glad_glGetUniformLocation(ShaderCode, "mvp"); *(_DWORD *)(v3 + 28) = glad_glGetUniformLocation(ShaderCode, "matView"); *(_DWORD *)(v3 + 32) = glad_glGetUniformLocation(ShaderCode, "matProjection"); *(_DWORD *)(v3 + 36) = glad_glGetUniformLocation(ShaderCode, "matModel"); *(_DWORD *)(v3 + 40) = glad_glGetUniformLocation(ShaderCode, "matNormal"); *(_DWORD *)(v3 + 112) = glad_glGetUniformLocation(ShaderCode, "boneMatrices"); *(_DWORD *)(v3 + 48) = glad_glGetUniformLocation(ShaderCode, "colDiffuse"); *(_DWORD *)(v3 + 60) = glad_glGetUniformLocation(ShaderCode, "texture0"); *(_DWORD *)(v3 + 64) = glad_glGetUniformLocation(ShaderCode, "texture1"); *(_DWORD *)(v3 + 68) = glad_glGetUniformLocation(ShaderCode, "texture2"); } return ShaderCode; }
LoadShaderFromMemory: PUSH R14 PUSH RBX PUSH RAX CALL 0x001652da MOV EBX,EAX TEST EAX,EAX JZ 0x00174623 MOV EDI,0x20 MOV ESI,0x4 CALL 0x0010a330 MOV R14,RAX PCMPEQD XMM0,XMM0 MOVDQU xmmword ptr [RAX + 0x2c],XMM0 MOVDQU xmmword ptr [RAX + 0x3c],XMM0 MOVDQU xmmword ptr [RAX + 0x4c],XMM0 MOVDQU xmmword ptr [RAX + 0x5c],XMM0 MOVDQU xmmword ptr [RAX + 0x6c],XMM0 MOV dword ptr [RAX + 0x7c],0xffffffff LEA RSI,[0x1df59b] MOV EDI,EBX CALL qword ptr [0x00239a90] MOV dword ptr [R14],EAX LEA RSI,[0x1df5aa] MOV EDI,EBX CALL qword ptr [0x00239a90] MOV dword ptr [R14 + 0x4],EAX LEA RSI,[0x1df5e0] MOV EDI,EBX CALL qword ptr [0x00239a90] MOV dword ptr [R14 + 0x8],EAX LEA RSI,[0x1df5b9] MOV EDI,EBX CALL qword ptr [0x00239a90] MOV dword ptr [R14 + 0xc],EAX LEA RSI,[0x1df5d2] MOV EDI,EBX CALL qword ptr [0x00239a90] MOV dword ptr [R14 + 0x10],EAX LEA RSI,[0x1df5c6] MOV EDI,EBX CALL qword ptr [0x00239a90] MOV dword ptr [R14 + 0x14],EAX LEA RSI,[0x1df5f0] MOV EDI,EBX CALL qword ptr [0x00239a90] MOV dword ptr [R14 + 0x68],EAX LEA RSI,[0x1df5fe] MOV EDI,EBX CALL qword ptr [0x00239a90] MOV dword ptr [R14 + 0x6c],EAX LEA RSI,[0x1e00a2] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x18],EAX LEA RSI,[0x1e00a6] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x1c],EAX LEA RSI,[0x1e00ae] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x20],EAX LEA RSI,[0x1e00bc] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x24],EAX LEA RSI,[0x1e00c5] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x28],EAX LEA RSI,[0x1e00cf] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x70],EAX LEA RSI,[0x1e00dc] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x30],EAX LEA RSI,[0x1e00e7] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x3c],EAX LEA RSI,[0x1e00f0] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x40],EAX LEA RSI,[0x1e00f9] MOV EDI,EBX CALL qword ptr [0x00239ea0] MOV dword ptr [R14 + 0x44],EAX JMP 0x00174626 LAB_00174623: XOR R14D,R14D LAB_00174626: MOV EAX,EBX MOV RDX,R14 ADD RSP,0x8 POP RBX POP R14 RET
int1 [16] LoadShaderFromMemory(void) { uint uVar1; int4 uVar2; int4 *puVar3; ulong uVar4; int1 auVar5 [16]; uVar1 = rlLoadShaderCode(); uVar4 = CONCAT44(0,uVar1); if (uVar1 == 0) { puVar3 = (int4 *)0x0; } else { puVar3 = (int4 *)calloc(0x20,4); puVar3[0xb] = 0xffffffff; puVar3[0xc] = 0xffffffff; puVar3[0xd] = 0xffffffff; puVar3[0xe] = 0xffffffff; puVar3[0xf] = 0xffffffff; puVar3[0x10] = 0xffffffff; puVar3[0x11] = 0xffffffff; puVar3[0x12] = 0xffffffff; puVar3[0x13] = 0xffffffff; puVar3[0x14] = 0xffffffff; puVar3[0x15] = 0xffffffff; puVar3[0x16] = 0xffffffff; puVar3[0x17] = 0xffffffff; puVar3[0x18] = 0xffffffff; puVar3[0x19] = 0xffffffff; puVar3[0x1a] = 0xffffffff; puVar3[0x1b] = 0xffffffff; puVar3[0x1c] = 0xffffffff; puVar3[0x1d] = 0xffffffff; puVar3[0x1e] = 0xffffffff; puVar3[0x1f] = 0xffffffff; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexPosition"); *puVar3 = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexTexCoord"); puVar3[1] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexTexCoord2"); puVar3[2] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexNormal"); puVar3[3] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexTangent"); puVar3[4] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexColor"); puVar3[5] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexBoneIds"); puVar3[0x1a] = uVar2; uVar2 = (*glad_glGetAttribLocation)(uVar1,"vertexBoneWeights"); puVar3[0x1b] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,&DAT_001e00a2); puVar3[6] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"matView"); puVar3[7] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"matProjection"); puVar3[8] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"matModel"); puVar3[9] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"matNormal"); puVar3[10] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar1,"boneMatrices"); puVar3[0x1c] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar4,"colDiffuse"); puVar3[0xc] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar4,"texture0"); puVar3[0xf] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar4,"texture1"); puVar3[0x10] = uVar2; uVar2 = (*glad_glGetUniformLocation)(uVar4,"texture2"); puVar3[0x11] = uVar2; } auVar5._8_8_ = puVar3; auVar5._0_8_ = uVar4; return auVar5; }
49,953
my_fcvt
eloqsql/strings/dtoa.c
size_t my_fcvt(double x, int precision, char *to, my_bool *error) { int decpt, sign, len, i; char *res, *src, *end, *dst= to; char buf[DTOA_BUFF_SIZE]; DBUG_ASSERT(precision >= 0 && precision < DECIMAL_NOT_SPECIFIED && to != NULL); res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf)); if (decpt == DTOA_OVERFLOW) { dtoa_free(res, buf, sizeof(buf)); *to++= '0'; *to= '\0'; if (error != NULL) *error= TRUE; return 1; } src= res; len= (int)(end - src); if (sign) *dst++= '-'; if (decpt <= 0) { *dst++= '0'; *dst++= '.'; for (i= decpt; i < 0; i++) *dst++= '0'; } for (i= 1; i <= len; i++) { *dst++= *src++; if (i == decpt && i < len) *dst++= '.'; } while (i++ <= decpt) *dst++= '0'; if (precision > 0) { if (len <= decpt) *dst++= '.'; for (i= precision - MY_MAX(0, (len - decpt)); i > 0; i--) *dst++= '0'; } *dst= '\0'; if (error != NULL) *error= FALSE; dtoa_free(res, buf, sizeof(buf)); return dst - to; }
O0
c
my_fcvt: pushq %rbp movq %rsp, %rbp subq $0xee0, %rsp # imm = 0xEE0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movsd %xmm0, -0xe80(%rbp) movl %edi, -0xe84(%rbp) movq %rsi, -0xe90(%rbp) movq %rdx, -0xe98(%rbp) movq -0xe90(%rbp), %rax movq %rax, -0xec8(%rbp) jmp 0x76e24 movsd -0xe80(%rbp), %xmm0 movl -0xe84(%rbp), %esi leaq -0xe70(%rbp), %r9 movl $0x5, %edi leaq -0xe9c(%rbp), %rdx leaq -0xea0(%rbp), %rcx leaq -0xec0(%rbp), %r8 movq $0xe60, (%rsp) # imm = 0xE60 callq 0x77190 movq %rax, -0xeb0(%rbp) cmpl $0x270f, -0xe9c(%rbp) # imm = 0x270F jne 0x76ed1 movq -0xeb0(%rbp), %rdi leaq -0xe70(%rbp), %rsi movl $0xe60, %edx # imm = 0xE60 callq 0x787e0 movq -0xe90(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xe90(%rbp) movb $0x30, (%rax) movq -0xe90(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xe98(%rbp) je 0x76ec1 movq -0xe98(%rbp), %rax movb $0x1, (%rax) movq $0x1, -0xe78(%rbp) jmp 0x77158 movq -0xeb0(%rbp), %rax movq %rax, -0xeb8(%rbp) movq -0xec0(%rbp), %rax movq -0xeb8(%rbp), %rcx subq %rcx, %rax movl %eax, -0xea4(%rbp) cmpl $0x0, -0xea0(%rbp) je 0x76f17 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2d, (%rax) cmpl $0x0, -0xe9c(%rbp) jg 0x76f90 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2e, (%rax) movl -0xe9c(%rbp), %eax movl %eax, -0xea8(%rbp) cmpl $0x0, -0xea8(%rbp) jge 0x76f8e movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) movl -0xea8(%rbp), %eax addl $0x1, %eax movl %eax, -0xea8(%rbp) jmp 0x76f5c jmp 0x76f90 movl $0x1, -0xea8(%rbp) movl -0xea8(%rbp), %eax cmpl -0xea4(%rbp), %eax jg 0x77020 movq -0xeb8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xeb8(%rbp) movb (%rax), %cl movq -0xec8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0xec8(%rbp) movb %cl, (%rax) movl -0xea8(%rbp), %eax cmpl -0xe9c(%rbp), %eax jne 0x7700a movl -0xea8(%rbp), %eax cmpl -0xea4(%rbp), %eax jge 0x7700a movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2e, (%rax) jmp 0x7700c movl -0xea8(%rbp), %eax addl $0x1, %eax movl %eax, -0xea8(%rbp) jmp 0x76f9a jmp 0x77022 movl -0xea8(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0xea8(%rbp) cmpl -0xe9c(%rbp), %eax jg 0x77055 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) jmp 0x77022 cmpl $0x0, -0xe84(%rbp) jle 0x7710a movl -0xea4(%rbp), %eax cmpl -0xe9c(%rbp), %eax jg 0x77088 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2e, (%rax) movl -0xe84(%rbp), %eax movl %eax, -0xecc(%rbp) movl -0xea4(%rbp), %ecx subl -0xe9c(%rbp), %ecx xorl %eax, %eax cmpl %ecx, %eax jle 0x770b0 xorl %eax, %eax movl %eax, -0xed0(%rbp) jmp 0x770c2 movl -0xea4(%rbp), %eax subl -0xe9c(%rbp), %eax movl %eax, -0xed0(%rbp) movl -0xecc(%rbp), %eax movl -0xed0(%rbp), %ecx subl %ecx, %eax movl %eax, -0xea8(%rbp) cmpl $0x0, -0xea8(%rbp) jle 0x77108 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) movl -0xea8(%rbp), %eax addl $-0x1, %eax movl %eax, -0xea8(%rbp) jmp 0x770d6 jmp 0x7710a movq -0xec8(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xe98(%rbp) je 0x77128 movq -0xe98(%rbp), %rax movb $0x0, (%rax) movq -0xeb0(%rbp), %rdi leaq -0xe70(%rbp), %rsi movl $0xe60, %edx # imm = 0xE60 callq 0x787e0 movq -0xec8(%rbp), %rax movq -0xe90(%rbp), %rcx subq %rcx, %rax movq %rax, -0xe78(%rbp) movq -0xe78(%rbp), %rax movq %rax, -0xed8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x77188 movq -0xed8(%rbp), %rax addq $0xee0, %rsp # imm = 0xEE0 popq %rbp retq callq 0x25330 nopl (%rax)
my_fcvt: push rbp mov rbp, rsp sub rsp, 0EE0h mov rax, fs:28h mov [rbp+var_8], rax movsd [rbp+var_E80], xmm0 mov [rbp+var_E84], edi mov [rbp+var_E90], rsi mov [rbp+var_E98], rdx mov rax, [rbp+var_E90] mov [rbp+var_EC8], rax jmp short $+2 loc_76E24: movsd xmm0, [rbp+var_E80] mov esi, [rbp+var_E84] lea r9, [rbp+var_E70] mov edi, 5 lea rdx, [rbp+var_E9C] lea rcx, [rbp+var_EA0] lea r8, [rbp+var_EC0] mov [rsp+0EE0h+var_EE0], 0E60h call dtoa mov [rbp+var_EB0], rax cmp [rbp+var_E9C], 270Fh jnz short loc_76ED1 mov rdi, [rbp+var_EB0] lea rsi, [rbp+var_E70] mov edx, 0E60h call dtoa_free mov rax, [rbp+var_E90] mov rcx, rax add rcx, 1 mov [rbp+var_E90], rcx mov byte ptr [rax], 30h ; '0' mov rax, [rbp+var_E90] mov byte ptr [rax], 0 cmp [rbp+var_E98], 0 jz short loc_76EC1 mov rax, [rbp+var_E98] mov byte ptr [rax], 1 loc_76EC1: mov [rbp+var_E78], 1 jmp loc_77158 loc_76ED1: mov rax, [rbp+var_EB0] mov [rbp+var_EB8], rax mov rax, [rbp+var_EC0] mov rcx, [rbp+var_EB8] sub rax, rcx mov [rbp+var_EA4], eax cmp [rbp+var_EA0], 0 jz short loc_76F17 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Dh ; '-' loc_76F17: cmp [rbp+var_E9C], 0 jg short loc_76F90 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Eh ; '.' mov eax, [rbp+var_E9C] mov [rbp+var_EA8], eax loc_76F5C: cmp [rbp+var_EA8], 0 jge short loc_76F8E mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' mov eax, [rbp+var_EA8] add eax, 1 mov [rbp+var_EA8], eax jmp short loc_76F5C loc_76F8E: jmp short $+2 loc_76F90: mov [rbp+var_EA8], 1 loc_76F9A: mov eax, [rbp+var_EA8] cmp eax, [rbp+var_EA4] jg short loc_77020 mov rax, [rbp+var_EB8] mov rcx, rax add rcx, 1 mov [rbp+var_EB8], rcx mov cl, [rax] mov rax, [rbp+var_EC8] mov rdx, rax add rdx, 1 mov [rbp+var_EC8], rdx mov [rax], cl mov eax, [rbp+var_EA8] cmp eax, [rbp+var_E9C] jnz short loc_7700A mov eax, [rbp+var_EA8] cmp eax, [rbp+var_EA4] jge short loc_7700A mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Eh ; '.' loc_7700A: jmp short $+2 loc_7700C: mov eax, [rbp+var_EA8] add eax, 1 mov [rbp+var_EA8], eax jmp loc_76F9A loc_77020: jmp short $+2 loc_77022: mov eax, [rbp+var_EA8] mov ecx, eax add ecx, 1 mov [rbp+var_EA8], ecx cmp eax, [rbp+var_E9C] jg short loc_77055 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' jmp short loc_77022 loc_77055: cmp [rbp+var_E84], 0 jle loc_7710A mov eax, [rbp+var_EA4] cmp eax, [rbp+var_E9C] jg short loc_77088 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Eh ; '.' loc_77088: mov eax, [rbp+var_E84] mov [rbp+var_ECC], eax mov ecx, [rbp+var_EA4] sub ecx, [rbp+var_E9C] xor eax, eax cmp eax, ecx jle short loc_770B0 xor eax, eax mov [rbp+var_ED0], eax jmp short loc_770C2 loc_770B0: mov eax, [rbp+var_EA4] sub eax, [rbp+var_E9C] mov [rbp+var_ED0], eax loc_770C2: mov eax, [rbp+var_ECC] mov ecx, [rbp+var_ED0] sub eax, ecx mov [rbp+var_EA8], eax loc_770D6: cmp [rbp+var_EA8], 0 jle short loc_77108 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' mov eax, [rbp+var_EA8] add eax, 0FFFFFFFFh mov [rbp+var_EA8], eax jmp short loc_770D6 loc_77108: jmp short $+2 loc_7710A: mov rax, [rbp+var_EC8] mov byte ptr [rax], 0 cmp [rbp+var_E98], 0 jz short loc_77128 mov rax, [rbp+var_E98] mov byte ptr [rax], 0 loc_77128: mov rdi, [rbp+var_EB0] lea rsi, [rbp+var_E70] mov edx, 0E60h call dtoa_free mov rax, [rbp+var_EC8] mov rcx, [rbp+var_E90] sub rax, rcx mov [rbp+var_E78], rax loc_77158: mov rax, [rbp+var_E78] mov [rbp+var_ED8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_77188 mov rax, [rbp+var_ED8] add rsp, 0EE0h pop rbp retn loc_77188: call ___stack_chk_fail
long long my_fcvt(int a1, _BYTE *a2, _BYTE *a3, double a4) { _BYTE *v4; // rax _BYTE *v5; // rax _BYTE *v6; // rax char *v7; // rax char v8; // cl _BYTE *v9; // rax _BYTE *v10; // rax int v11; // eax _BYTE *v12; // rax _BYTE *v13; // rax _BYTE *v14; // rax int v16; // [rsp+10h] [rbp-ED0h] _BYTE *v17; // [rsp+18h] [rbp-EC8h] long long v18; // [rsp+20h] [rbp-EC0h] BYREF char *v19; // [rsp+28h] [rbp-EB8h] long long v20; // [rsp+30h] [rbp-EB0h] int i; // [rsp+38h] [rbp-EA8h] int v22; // [rsp+3Ch] [rbp-EA4h] int v23; // [rsp+40h] [rbp-EA0h] BYREF int v24; // [rsp+44h] [rbp-E9Ch] BYREF _BYTE *v25; // [rsp+48h] [rbp-E98h] _BYTE *v26; // [rsp+50h] [rbp-E90h] int v27; // [rsp+5Ch] [rbp-E84h] double v28; // [rsp+60h] [rbp-E80h] _BYTE v30[3688]; // [rsp+70h] [rbp-E70h] BYREF unsigned long long v31; // [rsp+ED8h] [rbp-8h] v31 = __readfsqword(0x28u); v28 = a4; v27 = a1; v26 = a2; v25 = a3; v17 = a2; v20 = dtoa(5, a1, (unsigned int)&v24, (unsigned int)&v23, (unsigned int)&v18, (unsigned int)v30, 3680LL); if ( v24 == 9999 ) { dtoa_free(v20, v30, 3680LL, a4); v4 = v26++; *v4 = 48; *v26 = 0; if ( v25 ) *v25 = 1; return 1LL; } else { v19 = (char *)v20; v22 = v18 - v20; if ( v23 ) { v17 = a2 + 1; *a2 = 45; } if ( v24 <= 0 ) { *v17 = 48; v5 = v17 + 1; v17 += 2; *v5 = 46; for ( i = v24; i < 0; ++i ) { v6 = v17++; *v6 = 48; } } for ( i = 1; i <= v22; ++i ) { v7 = v19++; v8 = *v7; v9 = v17++; *v9 = v8; if ( i == v24 && i < v22 ) { v10 = v17++; *v10 = 46; } } while ( 1 ) { v11 = i++; if ( v11 > v24 ) break; v12 = v17++; *v12 = 48; } if ( v27 > 0 ) { if ( v22 <= v24 ) { v13 = v17++; *v13 = 46; } if ( v22 - v24 >= 0 ) v16 = v22 - v24; else v16 = 0; for ( i = v27 - v16; i > 0; --i ) { v14 = v17++; *v14 = 48; } } *v17 = 0; if ( v25 ) *v25 = 0; dtoa_free(v20, v30, 3680LL, a4); return v17 - v26; } }
my_fcvt: PUSH RBP MOV RBP,RSP SUB RSP,0xee0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOVSD qword ptr [RBP + -0xe80],XMM0 MOV dword ptr [RBP + -0xe84],EDI MOV qword ptr [RBP + -0xe90],RSI MOV qword ptr [RBP + -0xe98],RDX MOV RAX,qword ptr [RBP + -0xe90] MOV qword ptr [RBP + -0xec8],RAX JMP 0x00176e24 LAB_00176e24: MOVSD XMM0,qword ptr [RBP + -0xe80] MOV ESI,dword ptr [RBP + -0xe84] LEA R9,[RBP + -0xe70] MOV EDI,0x5 LEA RDX,[RBP + -0xe9c] LEA RCX,[RBP + -0xea0] LEA R8,[RBP + -0xec0] MOV qword ptr [RSP],0xe60 CALL 0x00177190 MOV qword ptr [RBP + -0xeb0],RAX CMP dword ptr [RBP + -0xe9c],0x270f JNZ 0x00176ed1 MOV RDI,qword ptr [RBP + -0xeb0] LEA RSI,[RBP + -0xe70] MOV EDX,0xe60 CALL 0x001787e0 MOV RAX,qword ptr [RBP + -0xe90] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xe90],RCX MOV byte ptr [RAX],0x30 MOV RAX,qword ptr [RBP + -0xe90] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xe98],0x0 JZ 0x00176ec1 MOV RAX,qword ptr [RBP + -0xe98] MOV byte ptr [RAX],0x1 LAB_00176ec1: MOV qword ptr [RBP + -0xe78],0x1 JMP 0x00177158 LAB_00176ed1: MOV RAX,qword ptr [RBP + -0xeb0] MOV qword ptr [RBP + -0xeb8],RAX MOV RAX,qword ptr [RBP + -0xec0] MOV RCX,qword ptr [RBP + -0xeb8] SUB RAX,RCX MOV dword ptr [RBP + -0xea4],EAX CMP dword ptr [RBP + -0xea0],0x0 JZ 0x00176f17 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2d LAB_00176f17: CMP dword ptr [RBP + -0xe9c],0x0 JG 0x00176f90 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2e MOV EAX,dword ptr [RBP + -0xe9c] MOV dword ptr [RBP + -0xea8],EAX LAB_00176f5c: CMP dword ptr [RBP + -0xea8],0x0 JGE 0x00176f8e MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 MOV EAX,dword ptr [RBP + -0xea8] ADD EAX,0x1 MOV dword ptr [RBP + -0xea8],EAX JMP 0x00176f5c LAB_00176f8e: JMP 0x00176f90 LAB_00176f90: MOV dword ptr [RBP + -0xea8],0x1 LAB_00176f9a: MOV EAX,dword ptr [RBP + -0xea8] CMP EAX,dword ptr [RBP + -0xea4] JG 0x00177020 MOV RAX,qword ptr [RBP + -0xeb8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xeb8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0xec8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0xec8],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0xea8] CMP EAX,dword ptr [RBP + -0xe9c] JNZ 0x0017700a MOV EAX,dword ptr [RBP + -0xea8] CMP EAX,dword ptr [RBP + -0xea4] JGE 0x0017700a MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2e LAB_0017700a: JMP 0x0017700c LAB_0017700c: MOV EAX,dword ptr [RBP + -0xea8] ADD EAX,0x1 MOV dword ptr [RBP + -0xea8],EAX JMP 0x00176f9a LAB_00177020: JMP 0x00177022 LAB_00177022: MOV EAX,dword ptr [RBP + -0xea8] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RBP + -0xea8],ECX CMP EAX,dword ptr [RBP + -0xe9c] JG 0x00177055 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 JMP 0x00177022 LAB_00177055: CMP dword ptr [RBP + -0xe84],0x0 JLE 0x0017710a MOV EAX,dword ptr [RBP + -0xea4] CMP EAX,dword ptr [RBP + -0xe9c] JG 0x00177088 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2e LAB_00177088: MOV EAX,dword ptr [RBP + -0xe84] MOV dword ptr [RBP + -0xecc],EAX MOV ECX,dword ptr [RBP + -0xea4] SUB ECX,dword ptr [RBP + -0xe9c] XOR EAX,EAX CMP EAX,ECX JLE 0x001770b0 XOR EAX,EAX MOV dword ptr [RBP + -0xed0],EAX JMP 0x001770c2 LAB_001770b0: MOV EAX,dword ptr [RBP + -0xea4] SUB EAX,dword ptr [RBP + -0xe9c] MOV dword ptr [RBP + -0xed0],EAX LAB_001770c2: MOV EAX,dword ptr [RBP + -0xecc] MOV ECX,dword ptr [RBP + -0xed0] SUB EAX,ECX MOV dword ptr [RBP + -0xea8],EAX LAB_001770d6: CMP dword ptr [RBP + -0xea8],0x0 JLE 0x00177108 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 MOV EAX,dword ptr [RBP + -0xea8] ADD EAX,-0x1 MOV dword ptr [RBP + -0xea8],EAX JMP 0x001770d6 LAB_00177108: JMP 0x0017710a LAB_0017710a: MOV RAX,qword ptr [RBP + -0xec8] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xe98],0x0 JZ 0x00177128 MOV RAX,qword ptr [RBP + -0xe98] MOV byte ptr [RAX],0x0 LAB_00177128: MOV RDI,qword ptr [RBP + -0xeb0] LEA RSI,[RBP + -0xe70] MOV EDX,0xe60 CALL 0x001787e0 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,qword ptr [RBP + -0xe90] SUB RAX,RCX MOV qword ptr [RBP + -0xe78],RAX LAB_00177158: MOV RAX,qword ptr [RBP + -0xe78] MOV qword ptr [RBP + -0xed8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00177188 MOV RAX,qword ptr [RBP + -0xed8] ADD RSP,0xee0 POP RBP RET LAB_00177188: CALL 0x00125330
long my_fcvt(int8 param_1,int param_2,int1 *param_3,int1 *param_4) { int1 *puVar1; long in_FS_OFFSET; int local_ed8; int1 *local_ed0; int local_ec8 [2]; int1 *local_ec0; int1 *local_eb8; int local_eb0; int local_eac; int local_ea8; int local_ea4; int1 *local_ea0; int1 *local_e98; int local_e8c; int8 local_e88; long local_e80; int1 local_e78 [3688]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_ea0 = param_4; local_e98 = param_3; local_e8c = param_2; local_e88 = param_1; local_eb8 = (int1 *)dtoa(param_1,5,param_2,&local_ea4,&local_ea8,local_ec8,local_e78,0xe60); if (local_ea4 == 9999) { dtoa_free(local_eb8,local_e78,0xe60); *local_e98 = 0x30; local_e98[1] = 0; if (local_ea0 != (int1 *)0x0) { *local_ea0 = 1; } local_e80 = 1; local_e98 = local_e98 + 1; } else { local_eac = local_ec8[0] - (int)local_eb8; local_ed0 = param_3; if (local_ea8 != 0) { local_ed0 = param_3 + 1; *param_3 = 0x2d; } if (local_ea4 < 1) { *local_ed0 = 0x30; local_ed0[1] = 0x2e; local_ed0 = local_ed0 + 2; for (local_eb0 = local_ea4; local_eb0 < 0; local_eb0 = local_eb0 + 1) { *local_ed0 = 0x30; local_ed0 = local_ed0 + 1; } } local_ec0 = local_eb8; for (local_eb0 = 1; local_eb0 <= local_eac; local_eb0 = local_eb0 + 1) { puVar1 = local_ed0 + 1; *local_ed0 = *local_ec0; if ((local_eb0 == local_ea4) && (local_eb0 < local_eac)) { *puVar1 = 0x2e; puVar1 = local_ed0 + 2; } local_ed0 = puVar1; local_ec0 = local_ec0 + 1; } while (local_eb0 <= local_ea4) { *local_ed0 = 0x30; local_ed0 = local_ed0 + 1; local_eb0 = local_eb0 + 1; } local_eb0 = local_eb0 + 1; if (0 < local_e8c) { if (local_eac <= local_ea4) { *local_ed0 = 0x2e; local_ed0 = local_ed0 + 1; } if (local_eac - local_ea4 < 0) { local_ed8 = 0; } else { local_ed8 = local_eac - local_ea4; } for (local_eb0 = local_e8c - local_ed8; 0 < local_eb0; local_eb0 = local_eb0 + -1) { *local_ed0 = 0x30; local_ed0 = local_ed0 + 1; } } *local_ed0 = 0; if (local_ea0 != (int1 *)0x0) { *local_ea0 = 0; } dtoa_free(local_eb8,local_e78,0xe60); local_e80 = (long)local_ed0 - (long)local_e98; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_e80; }
49,954
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&)
monkey531[P]llama/common/json.hpp
static std::string position_string(const position_t& pos) { return concat(" at line ", std::to_string(pos.lines_read + 1), ", column ", std::to_string(pos.chars_read_current_line)); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %rsi incq %rsi leaq 0x28(%rsp), %rdi callq 0x42751 movq 0x8(%r14), %rsi leaq 0x8(%rsp), %rdi callq 0x42751 leaq 0x6d83c(%rip), %rsi # 0xb2e0f leaq 0x6d83f(%rip), %rcx # 0xb2e19 leaq 0x28(%rsp), %rdx leaq 0x8(%rsp), %r8 movq %rbx, %rdi callq 0x457ca leaq 0x8(%rsp), %rdi callq 0x251d8 leaq 0x28(%rsp), %rdi callq 0x251d8 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x251d8 jmp 0x4561d movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x251d8 movq %rbx, %rdi callq 0x24f80 nop
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE: push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi mov rsi, [rsi+10h] inc rsi; unsigned __int64 lea rdi, [rsp+58h+var_30]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) mov rsi, [r14+8]; unsigned __int64 lea rdi, [rsp+58h+var_50]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea rsi, aAtLine; " at line " lea rcx, aColumn; ", column " lea rdx, [rsp+58h+var_30] lea r8, [rsp+58h+var_50] mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA10_KcS8_SB_S8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>(char const(&)[10],std::string,char const(&)[10],std::string &&) lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+58h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 48h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_4561D mov rbx, rax loc_4561D: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](long long a1, long long a2) { _BYTE v3[32]; // [rsp+8h] [rbp-50h] BYREF _BYTE v4[48]; // [rsp+28h] [rbp-30h] BYREF std::to_string((std::__cxx11 *)v4, *(_QWORD *)(a2 + 16) + 1LL); std::to_string((std::__cxx11 *)v3, *(_QWORD *)(a2 + 8)); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>( a1, " at line ", v4, ", column ", v3); std::string::~string(v3); std::string::~string(v4); return a1; }
position_string[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x10] INC RSI LEA RDI,[RSP + 0x28] CALL 0x00142751 MOV RSI,qword ptr [R14 + 0x8] LAB_001455c2: LEA RDI,[RSP + 0x8] CALL 0x00142751 LAB_001455cc: LEA RSI,[0x1b2e0f] LEA RCX,[0x1b2e19] LEA RDX,[RSP + 0x28] LEA R8,[RSP + 0x8] MOV RDI,RBX CALL 0x001457ca LAB_001455ec: LEA RDI,[RSP + 0x8] CALL 0x001251d8 LEA RDI,[RSP + 0x28] CALL 0x001251d8 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&) */ parse_error * __thiscall nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_ (parse_error *this,position_t *param_1) { __cxx11 local_50 [32]; __cxx11 local_30 [32]; std::__cxx11::to_string(local_30,*(long *)(param_1 + 0x10) + 1); /* try { // try from 001455c2 to 001455cb has its CatchHandler @ 0014561a */ std::__cxx11::to_string(local_50,*(ulong *)(param_1 + 8)); /* try { // try from 001455cc to 001455eb has its CatchHandler @ 0014560b */ concat<std::__cxx11::string,char_const(&)[10],std::__cxx11::string,char_const(&)[10],std::__cxx11::string> ((detail *)this," at line ",(string *)local_30,", column ",(string *)local_50); std::__cxx11::string::~string((string *)local_50); std::__cxx11::string::~string((string *)local_30); return this; }
49,955
my_xml_scan
eloqsql/strings/xml.c
static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a) { int lex; for (; ( p->cur < p->end) && my_xml_is_space(p->cur[0]) ; p->cur++); if (p->cur >= p->end) { a->beg=p->end; a->end=p->end; lex=MY_XML_EOF; goto ret; } a->beg=p->cur; a->end=p->cur; if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<!--"))) { for (; p->cur < p->end; p->cur++) { if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("-->"))) { p->cur+= 3; break; } } a->end=p->cur; lex=MY_XML_COMMENT; } else if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<![CDATA["))) { p->cur+= 9; for (; p->cur < p->end - 2 ; p->cur++) { if (p->cur[0] == ']' && p->cur[1] == ']' && p->cur[2] == '>') { p->cur+= 3; a->end= p->cur; break; } } lex= MY_XML_CDATA; } else if (strchr("?=/<>!",p->cur[0])) { p->cur++; a->end=p->cur; lex=a->beg[0]; } else if ( (p->cur[0] == '"') || (p->cur[0] == '\'') ) { /* "string" or 'string' found. Scan until the closing quote/doublequote, or until the END-OF-INPUT. */ p->cur++; for (; ( p->cur < p->end ) && (p->cur[0] != a->beg[0]); p->cur++) {} a->end=p->cur; if (p->cur < p->end) /* Closing quote or doublequote has been found */ p->cur++; a->beg++; if (!(p->flags & MY_XML_FLAG_SKIP_TEXT_NORMALIZATION)) my_xml_norm_text(a); lex=MY_XML_STRING; } else if (my_xml_is_id0(p->cur[0])) { p->cur++; while (p->cur < p->end && my_xml_is_id1(p->cur[0])) p->cur++; a->end=p->cur; my_xml_norm_text(a); lex=MY_XML_IDENT; } else lex= MY_XML_UNKNOWN; #if 0 printf("LEX=%s[%d]\n",lex2str(lex),a->end-a->beg); #endif ret: return lex; }
O0
c
my_xml_scan: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq 0x138(%rdx), %rcx movb %al, -0x15(%rbp) jae 0x878b4 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x3110dc(%rip), %rax # 0x398980 movsbl (%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x15(%rbp) movb -0x15(%rbp), %al testb $0x1, %al jne 0x878bd jmp 0x878d7 jmp 0x878bf movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x87870 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x138(%rcx), %rax jb 0x87920 movq -0x8(%rbp), %rax movq 0x138(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x138(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movl $0x45, -0x14(%rbp) jmp 0x87d10 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rdi leaq 0x6f75(%rip), %rsi # 0x8e8c5 movl $0x4, %edx callq 0x88550 cmpb $0x0, %al jne 0x879e6 jmp 0x87964 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x138(%rcx), %rax jae 0x879c7 movq -0x8(%rbp), %rdi leaq 0x6f43(%rip), %rsi # 0x8e8ca movl $0x3, %edx callq 0x88550 cmpb $0x0, %al jne 0x879ad movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x3, %rcx movq %rcx, 0x130(%rax) jmp 0x879c7 jmp 0x879af movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x87964 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movl $0x43, -0x14(%rbp) jmp 0x87d0e movq -0x8(%rbp), %rdi leaq 0x6edd(%rip), %rsi # 0x8e8ce movl $0x9, %edx callq 0x88550 cmpb $0x0, %al jne 0x87acb movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x9, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x8(%rbp), %rcx movq 0x138(%rcx), %rcx addq $-0x2, %rcx cmpq %rcx, %rax jae 0x87abf movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %eax cmpl $0x5d, %eax jne 0x87aa2 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl 0x1(%rax), %eax cmpl $0x5d, %eax jne 0x87aa2 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl 0x2(%rax), %eax cmpl $0x3e, %eax jne 0x87aa2 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x3, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) jmp 0x87abf jmp 0x87aa4 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x87a19 movl $0x44, -0x14(%rbp) jmp 0x87d0c movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %esi leaq 0x6df8(%rip), %rdi # 0x8e8d8 callq 0x25120 cmpq $0x0, %rax je 0x87b26 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movsbl (%rax), %eax movl %eax, -0x14(%rbp) jmp 0x87d0a movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %eax cmpl $0x22, %eax je 0x87b50 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %eax cmpl $0x27, %eax jne 0x87c38 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq 0x138(%rdx), %rcx movb %al, -0x16(%rbp) jae 0x87ba3 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movsbl (%rax), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movsbl (%rcx), %ecx cmpl %ecx, %eax setne %al movb %al, -0x16(%rbp) movb -0x16(%rbp), %al testb $0x1, %al jne 0x87bac jmp 0x87bc6 jmp 0x87bae movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x87b66 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movq -0x8(%rbp), %rcx cmpq 0x138(%rcx), %rax jae 0x87c07 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x8(%rbp), %rax movl (%rax), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x87c2c movq -0x10(%rbp), %rdi callq 0x88280 movl $0x53, -0x14(%rbp) jmp 0x87d08 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x310d31(%rip), %rax # 0x398980 movsbl (%rax,%rcx), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x87cff movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x8(%rbp), %rdx xorl %eax, %eax cmpq 0x138(%rdx), %rcx movb %al, -0x17(%rbp) jae 0x87cb9 movq -0x8(%rbp), %rax movq 0x130(%rax), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x310cd7(%rip), %rax # 0x398980 movsbl (%rax,%rcx), %eax andl $0x2, %eax cmpl $0x0, %eax setne %al movb %al, -0x17(%rbp) movb -0x17(%rbp), %al testb $0x1, %al jne 0x87cc2 jmp 0x87cda movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x130(%rax) jmp 0x87c75 movq -0x8(%rbp), %rax movq 0x130(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rdi callq 0x88280 movl $0x49, -0x14(%rbp) jmp 0x87d06 movl $0x55, -0x14(%rbp) jmp 0x87d08 jmp 0x87d0a jmp 0x87d0c jmp 0x87d0e jmp 0x87d10 movl -0x14(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
my_xml_scan: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi loc_87870: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx+138h] mov [rbp+var_15], al jnb short loc_878B4 mov rax, [rbp+var_8] mov rax, [rax+130h] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_xml_ctype movsx eax, byte ptr [rax+rcx] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_15], al loc_878B4: mov al, [rbp+var_15] test al, 1 jnz short loc_878BD jmp short loc_878D7 loc_878BD: jmp short $+2 loc_878BF: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp short loc_87870 loc_878D7: mov rax, [rbp+var_8] mov rax, [rax+130h] mov rcx, [rbp+var_8] cmp rax, [rcx+138h] jb short loc_87920 mov rax, [rbp+var_8] mov rcx, [rax+138h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+138h] mov rax, [rbp+var_10] mov [rax+8], rcx mov [rbp+var_14], 45h ; 'E' jmp loc_87D10 loc_87920: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov rdi, [rbp+var_8] lea rsi, asc_8E8C5; "<!--" mov edx, 4 call my_xml_parser_prefix_cmp cmp al, 0 jnz loc_879E6 jmp short $+2 loc_87964: mov rax, [rbp+var_8] mov rax, [rax+130h] mov rcx, [rbp+var_8] cmp rax, [rcx+138h] jnb short loc_879C7 mov rdi, [rbp+var_8] lea rsi, asc_8E8CA; "-->" mov edx, 3 call my_xml_parser_prefix_cmp cmp al, 0 jnz short loc_879AD mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 3 mov [rax+130h], rcx jmp short loc_879C7 loc_879AD: jmp short $+2 loc_879AF: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp short loc_87964 loc_879C7: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov [rbp+var_14], 43h ; 'C' jmp loc_87D0E loc_879E6: mov rdi, [rbp+var_8] lea rsi, aCdata; "<![CDATA[" mov edx, 9 call my_xml_parser_prefix_cmp cmp al, 0 jnz loc_87ACB mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 9 mov [rax+130h], rcx loc_87A19: mov rax, [rbp+var_8] mov rax, [rax+130h] mov rcx, [rbp+var_8] mov rcx, [rcx+138h] add rcx, 0FFFFFFFFFFFFFFFEh cmp rax, rcx jnb loc_87ABF mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax] cmp eax, 5Dh ; ']' jnz short loc_87AA2 mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax+1] cmp eax, 5Dh ; ']' jnz short loc_87AA2 mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax+2] cmp eax, 3Eh ; '>' jnz short loc_87AA2 mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 3 mov [rax+130h], rcx mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx jmp short loc_87ABF loc_87AA2: jmp short $+2 loc_87AA4: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp loc_87A19 loc_87ABF: mov [rbp+var_14], 44h ; 'D' jmp loc_87D0C loc_87ACB: mov rax, [rbp+var_8] mov rax, [rax+130h] movsx esi, byte ptr [rax] lea rdi, asc_8E8D8; "?=/<>!" call _strchr cmp rax, 0 jz short loc_87B26 mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov rax, [rax] movsx eax, byte ptr [rax] mov [rbp+var_14], eax jmp loc_87D0A loc_87B26: mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax] cmp eax, 22h ; '"' jz short loc_87B50 mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax] cmp eax, 27h ; ''' jnz loc_87C38 loc_87B50: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx loc_87B66: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx+138h] mov [rbp+var_16], al jnb short loc_87BA3 mov rax, [rbp+var_8] mov rax, [rax+130h] movsx eax, byte ptr [rax] mov rcx, [rbp+var_10] mov rcx, [rcx] movsx ecx, byte ptr [rcx] cmp eax, ecx setnz al mov [rbp+var_16], al loc_87BA3: mov al, [rbp+var_16] test al, 1 jnz short loc_87BAC jmp short loc_87BC6 loc_87BAC: jmp short $+2 loc_87BAE: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp short loc_87B66 loc_87BC6: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_8] mov rax, [rax+130h] mov rcx, [rbp+var_8] cmp rax, [rcx+138h] jnb short loc_87C07 mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx loc_87C07: mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_8] mov eax, [rax] and eax, 2 cmp eax, 0 jnz short loc_87C2C mov rdi, [rbp+var_10] call my_xml_norm_text loc_87C2C: mov [rbp+var_14], 53h ; 'S' jmp loc_87D08 loc_87C38: mov rax, [rbp+var_8] mov rax, [rax+130h] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_xml_ctype movsx eax, byte ptr [rax+rcx] and eax, 1 cmp eax, 0 jz loc_87CFF mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx loc_87C75: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rdx, [rbp+var_8] xor eax, eax cmp rcx, [rdx+138h] mov [rbp+var_17], al jnb short loc_87CB9 mov rax, [rbp+var_8] mov rax, [rax+130h] movzx eax, byte ptr [rax] mov ecx, eax lea rax, my_xml_ctype movsx eax, byte ptr [rax+rcx] and eax, 2 cmp eax, 0 setnz al mov [rbp+var_17], al loc_87CB9: mov al, [rbp+var_17] test al, 1 jnz short loc_87CC2 jmp short loc_87CDA loc_87CC2: mov rax, [rbp+var_8] mov rcx, [rax+130h] add rcx, 1 mov [rax+130h], rcx jmp short loc_87C75 loc_87CDA: mov rax, [rbp+var_8] mov rcx, [rax+130h] mov rax, [rbp+var_10] mov [rax+8], rcx mov rdi, [rbp+var_10] call my_xml_norm_text mov [rbp+var_14], 49h ; 'I' jmp short loc_87D06 loc_87CFF: mov [rbp+var_14], 55h ; 'U' loc_87D06: jmp short $+2 loc_87D08: jmp short $+2 loc_87D0A: jmp short $+2 loc_87D0C: jmp short $+2 loc_87D0E: jmp short $+2 loc_87D10: mov eax, [rbp+var_14] add rsp, 20h pop rbp retn
long long my_xml_scan(long long a1, char **a2) { bool v3; // [rsp+9h] [rbp-17h] bool v4; // [rsp+Ah] [rbp-16h] bool v5; // [rsp+Bh] [rbp-15h] while ( 1 ) { v5 = 0; if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) v5 = (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 8) != 0; if ( !v5 ) break; ++*(_QWORD *)(a1 + 304); } if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) { *a2 = *(char **)(a1 + 304); a2[1] = *(char **)(a1 + 304); if ( (unsigned __int8)my_xml_parser_prefix_cmp(a1, "<!--", 4LL) ) { if ( (unsigned __int8)my_xml_parser_prefix_cmp(a1, "<![CDATA[", 9LL) ) { if ( strchr("?=/<>!", (unsigned int)**(char **)(a1 + 304)) ) { a2[1] = (char *)++*(_QWORD *)(a1 + 304); return (unsigned int)**a2; } else if ( **(_BYTE **)(a1 + 304) == 34 || **(_BYTE **)(a1 + 304) == 39 ) { ++*(_QWORD *)(a1 + 304); while ( 1 ) { v4 = 0; if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) v4 = **(char **)(a1 + 304) != **a2; if ( !v4 ) break; ++*(_QWORD *)(a1 + 304); } a2[1] = *(char **)(a1 + 304); if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) ++*(_QWORD *)(a1 + 304); ++*a2; if ( (*(_DWORD *)a1 & 2) == 0 ) my_xml_norm_text(a2); return 83; } else if ( (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 1) != 0 ) { ++*(_QWORD *)(a1 + 304); while ( 1 ) { v3 = 0; if ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) v3 = (my_xml_ctype[**(unsigned __int8 **)(a1 + 304)] & 2) != 0; if ( !v3 ) break; ++*(_QWORD *)(a1 + 304); } a2[1] = *(char **)(a1 + 304); my_xml_norm_text(a2); return 73; } else { return 85; } } else { for ( *(_QWORD *)(a1 + 304) += 9LL; *(_QWORD *)(a1 + 304) < (unsigned long long)(*(_QWORD *)(a1 + 312) - 2LL); ++*(_QWORD *)(a1 + 304) ) { if ( **(_BYTE **)(a1 + 304) == 93 && *(_BYTE *)(*(_QWORD *)(a1 + 304) + 1LL) == 93 && *(_BYTE *)(*(_QWORD *)(a1 + 304) + 2LL) == 62 ) { *(_QWORD *)(a1 + 304) += 3LL; a2[1] = *(char **)(a1 + 304); break; } } return 68; } } else { while ( *(_QWORD *)(a1 + 304) < *(_QWORD *)(a1 + 312) ) { if ( !(unsigned __int8)my_xml_parser_prefix_cmp(a1, "-->", 3LL) ) { *(_QWORD *)(a1 + 304) += 3LL; break; } ++*(_QWORD *)(a1 + 304); } a2[1] = *(char **)(a1 + 304); return 67; } } else { *a2 = *(char **)(a1 + 312); a2[1] = *(char **)(a1 + 312); return 69; } }
my_xml_scan: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI LAB_00187870: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x138] MOV byte ptr [RBP + -0x15],AL JNC 0x001878b4 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x498980] MOVSX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x15],AL LAB_001878b4: MOV AL,byte ptr [RBP + -0x15] TEST AL,0x1 JNZ 0x001878bd JMP 0x001878d7 LAB_001878bd: JMP 0x001878bf LAB_001878bf: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x00187870 LAB_001878d7: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x138] JC 0x00187920 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x138] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x138] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x14],0x45 JMP 0x00187d10 LAB_00187920: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x18e8c5] MOV EDX,0x4 CALL 0x00188550 CMP AL,0x0 JNZ 0x001879e6 JMP 0x00187964 LAB_00187964: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x138] JNC 0x001879c7 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x18e8ca] MOV EDX,0x3 CALL 0x00188550 CMP AL,0x0 JNZ 0x001879ad MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x3 MOV qword ptr [RAX + 0x130],RCX JMP 0x001879c7 LAB_001879ad: JMP 0x001879af LAB_001879af: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x00187964 LAB_001879c7: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x14],0x43 JMP 0x00187d0e LAB_001879e6: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x18e8ce] MOV EDX,0x9 CALL 0x00188550 CMP AL,0x0 JNZ 0x00187acb MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x9 MOV qword ptr [RAX + 0x130],RCX LAB_00187a19: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x138] ADD RCX,-0x2 CMP RAX,RCX JNC 0x00187abf MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5d JNZ 0x00187aa2 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x5d JNZ 0x00187aa2 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX + 0x2] CMP EAX,0x3e JNZ 0x00187aa2 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x3 MOV qword ptr [RAX + 0x130],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX JMP 0x00187abf LAB_00187aa2: JMP 0x00187aa4 LAB_00187aa4: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x00187a19 LAB_00187abf: MOV dword ptr [RBP + -0x14],0x44 JMP 0x00187d0c LAB_00187acb: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX ESI,byte ptr [RAX] LEA RDI,[0x18e8d8] CALL 0x00125120 CMP RAX,0x0 JZ 0x00187b26 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x14],EAX JMP 0x00187d0a LAB_00187b26: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX] CMP EAX,0x22 JZ 0x00187b50 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX] CMP EAX,0x27 JNZ 0x00187c38 LAB_00187b50: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX LAB_00187b66: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x138] MOV byte ptr [RBP + -0x16],AL JNC 0x00187ba3 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVSX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOVSX ECX,byte ptr [RCX] CMP EAX,ECX SETNZ AL MOV byte ptr [RBP + -0x16],AL LAB_00187ba3: MOV AL,byte ptr [RBP + -0x16] TEST AL,0x1 JNZ 0x00187bac JMP 0x00187bc6 LAB_00187bac: JMP 0x00187bae LAB_00187bae: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x00187b66 LAB_00187bc6: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x138] JNC 0x00187c07 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX LAB_00187c07: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] AND EAX,0x2 CMP EAX,0x0 JNZ 0x00187c2c MOV RDI,qword ptr [RBP + -0x10] CALL 0x00188280 LAB_00187c2c: MOV dword ptr [RBP + -0x14],0x53 JMP 0x00187d08 LAB_00187c38: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x498980] MOVSX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x1 CMP EAX,0x0 JZ 0x00187cff MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX LAB_00187c75: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RDX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RDX + 0x138] MOV byte ptr [RBP + -0x17],AL JNC 0x00187cb9 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x130] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x498980] MOVSX EAX,byte ptr [RAX + RCX*0x1] AND EAX,0x2 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x17],AL LAB_00187cb9: MOV AL,byte ptr [RBP + -0x17] TEST AL,0x1 JNZ 0x00187cc2 JMP 0x00187cda LAB_00187cc2: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] ADD RCX,0x1 MOV qword ptr [RAX + 0x130],RCX JMP 0x00187c75 LAB_00187cda: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00188280 MOV dword ptr [RBP + -0x14],0x49 JMP 0x00187d06 LAB_00187cff: MOV dword ptr [RBP + -0x14],0x55 LAB_00187d06: JMP 0x00187d08 LAB_00187d08: JMP 0x00187d0a LAB_00187d0a: JMP 0x00187d0c LAB_00187d0c: JMP 0x00187d0e LAB_00187d0e: JMP 0x00187d10 LAB_00187d10: MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0x20 POP RBP RET
int my_xml_scan(uint *param_1,long *param_2) { char cVar1; char *pcVar2; bool bVar3; int local_1c; while( true ) { bVar3 = false; if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { bVar3 = (my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 8) != 0; } if (!bVar3) break; *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { *param_2 = *(long *)(param_1 + 0x4c); param_2[1] = *(long *)(param_1 + 0x4c); cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_0018e8c5,4); if (cVar1 == '\0') { while (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_0018e8ca,3); if (cVar1 == '\0') { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 3; break; } *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } param_2[1] = *(long *)(param_1 + 0x4c); local_1c = 0x43; } else { cVar1 = my_xml_parser_prefix_cmp(param_1,&DAT_0018e8ce,9); if (cVar1 == '\0') { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 9; while (*(ulong *)(param_1 + 0x4c) < *(long *)(param_1 + 0x4e) - 2U) { if (((**(char **)(param_1 + 0x4c) == ']') && (*(char *)(*(long *)(param_1 + 0x4c) + 1) == ']')) && (*(char *)(*(long *)(param_1 + 0x4c) + 2) == '>')) { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 3; param_2[1] = *(long *)(param_1 + 0x4c); break; } *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } local_1c = 0x44; } else { pcVar2 = strchr("?=/<>!",(int)**(char **)(param_1 + 0x4c)); if (pcVar2 == (char *)0x0) { if ((**(char **)(param_1 + 0x4c) == '\"') || (**(char **)(param_1 + 0x4c) == '\'')) { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; while( true ) { bVar3 = false; if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { bVar3 = **(char **)(param_1 + 0x4c) != *(char *)*param_2; } if (!bVar3) break; *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } param_2[1] = *(long *)(param_1 + 0x4c); if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } *param_2 = *param_2 + 1; if ((*param_1 & 2) == 0) { my_xml_norm_text(param_2); } local_1c = 0x53; } else if ((my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 1) == 0) { local_1c = 0x55; } else { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; while( true ) { bVar3 = false; if (*(ulong *)(param_1 + 0x4c) < *(ulong *)(param_1 + 0x4e)) { bVar3 = (my_xml_ctype[**(byte **)(param_1 + 0x4c)] & 2) != 0; } if (!bVar3) break; *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; } param_2[1] = *(long *)(param_1 + 0x4c); my_xml_norm_text(param_2); local_1c = 0x49; } } else { *(long *)(param_1 + 0x4c) = *(long *)(param_1 + 0x4c) + 1; param_2[1] = *(long *)(param_1 + 0x4c); local_1c = (int)*(char *)*param_2; } } } } else { *param_2 = *(long *)(param_1 + 0x4e); param_2[1] = *(long *)(param_1 + 0x4e); local_1c = 0x45; } return local_1c; }
49,956
testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void ReportFailureInUnknownLocation(TestPartResult::Type result_type, const std::string& message) { // This function is a friend of UnitTest and as such has access to // AddTestPartResult. UnitTest::GetInstance()->AddTestPartResult( result_type, nullptr, // No info about the source file where the exception occurred. -1, // We have no info on which line caused the exception. message, ""); // No stack trace, either. }
O1
cpp
testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movl %edi, %ebp callq 0x19012 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x22dda(%rip), %rdx # 0x432de leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %rdx, %rsi callq 0x39504 leaq 0x39255(%rip), %rdi # 0x59770 movl %ebp, %esi xorl %edx, %edx movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movq %rbx, %r8 movq %r14, %r9 callq 0x19082 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x20546 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x2056b movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal30ReportFailureInUnknownLocationENS_14TestPartResult4TypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push rbx sub rsp, 28h mov rbx, rsi mov ebp, edi call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rdx, aSFromSSMsTotal+1Ah; "" lea r14, [rsp+48h+var_40] mov rdi, r14 mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, _ZZN7testing8UnitTest11GetInstanceEvE8instance; testing::UnitTest::GetInstance(void)::instance mov esi, ebp xor edx, edx mov ecx, 0FFFFFFFFh mov r8, rbx mov r9, r14 call _ZN7testing8UnitTest17AddTestPartResultENS_14TestPartResult4TypeEPKciRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_; testing::UnitTest::AddTestPartResult(testing::TestPartResult::Type,char const*,int,std::string const&,std::string const&) mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_20546 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_20546: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r15 jz short loc_2056B mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2056B: mov rdi, rbx call __Unwind_Resume
void testing::internal::ReportFailureInUnknownLocation(testing::UnitTest *a1, _QWORD *a2) { void *v2[2]; // [rsp+8h] [rbp-40h] BYREF _QWORD v3[6]; // [rsp+18h] [rbp-30h] BYREF testing::UnitTest::GetInstance(a1); v2[0] = v3; std::string::_M_construct<char const*>(v2, "", ""); testing::UnitTest::AddTestPartResult( (long long)&testing::UnitTest::GetInstance(void)::instance, (unsigned int)a1, 0LL, 0xFFFFFFFF, a2, v2); if ( v2[0] != v3 ) operator delete(v2[0], v3[0] + 1LL); }
ReportFailureInUnknownLocation: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV EBP,EDI CALL 0x00119012 LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LEA RDX,[0x1432de] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,RDX CALL 0x00139504 LAB_00120514: LEA RDI,[0x159770] MOV ESI,EBP XOR EDX,EDX MOV ECX,0xffffffff MOV R8,RBX MOV R9,R14 CALL 0x00119082 LAB_0012052f: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x00120546 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_00120546: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* testing::internal::ReportFailureInUnknownLocation(testing::TestPartResult::Type, std::__cxx11::string const&) */ void testing::internal::ReportFailureInUnknownLocation(int4 param_1,int8 param_2) { long *local_40 [2]; long local_30 [2]; UnitTest::GetInstance(); local_40[0] = local_30; std::__cxx11::string::_M_construct<char_const*>(local_40,""); /* try { // try from 00120514 to 0012052e has its CatchHandler @ 00120551 */ UnitTest::AddTestPartResult ((UnitTest *)UnitTest::GetInstance()::instance,param_1,0,0xffffffff,param_2,local_40); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return; }
49,957
my_hash_sort_ucs2_nopad
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e=s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_ucs2_uni(cs,&wc, (uchar *)s, (uchar*)e)) >0) { my_tosort_ucs2(uni_plane, &wc); MY_HASH_ADD_16(m1, m2, wc); s+=res; } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_ucs2_nopad: movq (%rcx), %r9 movq (%r8), %rax cmpq $0x2, %rdx jl 0x84ac5 pushq %rbp movq %rsp, %rbp pushq %rbx addq %rsi, %rdx movq 0x78(%rdi), %rdi movq 0x8(%rdi), %rdi movzbl (%rsi), %r10d movzbl 0x1(%rsi), %r11d movq (%rdi,%r10,8), %rbx testq %rbx, %rbx je 0x84a61 leaq (%r11,%r11,2), %r10 movl 0x8(%rbx,%r10,4), %r10d jmp 0x84a68 shll $0x8, %r10d orq %r11, %r10 movl %r9d, %r11d andl $0x3f, %r11d addq %rax, %r11 movzbl %r10b, %ebx imulq %r11, %rbx movq %r9, %r11 shlq $0x8, %r11 addq %rbx, %r11 xorq %r9, %r11 movl %r11d, %r9d andl $0x3f, %r9d addq %rax, %r9 addq $0x3, %r9 shrl $0x8, %r10d imulq %r9, %r10 movq %r11, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r11, %r9 addq $0x6, %rax leaq 0x2(%rsi), %r10 cmpq %rdx, %r10 jae 0x84ac3 addq $0x4, %rsi cmpq %rdx, %rsi movq %r10, %rsi jbe 0x84a44 popq %rbx popq %rbp movq %r9, (%rcx) movq %rax, (%r8) retq
my_hash_sort_ucs2_nopad: mov r9, [rcx] mov rax, [r8] cmp rdx, 2 jl loc_84AC5 push rbp mov rbp, rsp push rbx add rdx, rsi mov rdi, [rdi+78h] mov rdi, [rdi+8] loc_84A44: movzx r10d, byte ptr [rsi] movzx r11d, byte ptr [rsi+1] mov rbx, [rdi+r10*8] test rbx, rbx jz short loc_84A61 lea r10, [r11+r11*2] mov r10d, [rbx+r10*4+8] jmp short loc_84A68 loc_84A61: shl r10d, 8 or r10, r11 loc_84A68: mov r11d, r9d and r11d, 3Fh add r11, rax movzx ebx, r10b imul rbx, r11 mov r11, r9 shl r11, 8 add r11, rbx xor r11, r9 mov r9d, r11d and r9d, 3Fh add r9, rax add r9, 3 shr r10d, 8 imul r10, r9 mov r9, r11 shl r9, 8 add r9, r10 xor r9, r11 add rax, 6 lea r10, [rsi+2] cmp r10, rdx jnb short loc_84AC3 add rsi, 4 cmp rsi, rdx mov rsi, r10 jbe short loc_84A44 loc_84AC3: pop rbx pop rbp loc_84AC5: mov [rcx], r9 mov [r8], rax retn
long long my_hash_sort_ucs2_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long v5; // r9 long long result; // rax unsigned long long v7; // rdx long long v8; // rdi long long v9; // r10 long long v10; // r11 long long v11; // rbx unsigned int v12; // r10d long long v13; // rbx bool v14; // cc v5 = *a4; result = *a5; if ( a3 >= 2 ) { v7 = (unsigned long long)&a2[a3]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL); do { v9 = *a2; v10 = a2[1]; v11 = *(_QWORD *)(v8 + 8 * v9); if ( v11 ) v12 = *(_DWORD *)(v11 + 12 * v10 + 8); else v12 = v10 | ((_DWORD)v9 << 8); v13 = (result + (v5 & 0x3F)) * (unsigned __int8)v12; v5 ^= (v13 + (v5 << 8)) ^ ((result + (((unsigned __int8)v5 ^ (unsigned __int8)v13) & 0x3F) + 3) * (v12 >> 8) + ((v5 ^ (v13 + (v5 << 8))) << 8)); result += 6LL; if ( (unsigned long long)(a2 + 2) >= v7 ) break; v14 = (unsigned long long)(a2 + 4) <= v7; a2 += 2; } while ( v14 ); } *a4 = v5; *a5 = result; return result; }
my_hash_sort_ucs2_nopad: MOV R9,qword ptr [RCX] MOV RAX,qword ptr [R8] CMP RDX,0x2 JL 0x00184ac5 PUSH RBP MOV RBP,RSP PUSH RBX ADD RDX,RSI MOV RDI,qword ptr [RDI + 0x78] MOV RDI,qword ptr [RDI + 0x8] LAB_00184a44: MOVZX R10D,byte ptr [RSI] MOVZX R11D,byte ptr [RSI + 0x1] MOV RBX,qword ptr [RDI + R10*0x8] TEST RBX,RBX JZ 0x00184a61 LEA R10,[R11 + R11*0x2] MOV R10D,dword ptr [RBX + R10*0x4 + 0x8] JMP 0x00184a68 LAB_00184a61: SHL R10D,0x8 OR R10,R11 LAB_00184a68: MOV R11D,R9D AND R11D,0x3f ADD R11,RAX MOVZX EBX,R10B IMUL RBX,R11 MOV R11,R9 SHL R11,0x8 ADD R11,RBX XOR R11,R9 MOV R9D,R11D AND R9D,0x3f ADD R9,RAX ADD R9,0x3 SHR R10D,0x8 IMUL R10,R9 MOV R9,R11 SHL R9,0x8 ADD R9,R10 XOR R9,R11 ADD RAX,0x6 LEA R10,[RSI + 0x2] CMP R10,RDX JNC 0x00184ac3 ADD RSI,0x4 CMP RSI,RDX MOV RSI,R10 JBE 0x00184a44 LAB_00184ac3: POP RBX POP RBP LAB_00184ac5: MOV qword ptr [RCX],R9 MOV qword ptr [R8],RAX RET
void my_hash_sort_ucs2_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { long lVar1; long lVar2; byte *pbVar3; byte *pbVar4; ulong uVar5; ulong uVar6; uVar6 = *param_4; lVar2 = *param_5; if (1 < param_3) { pbVar3 = param_2; do { lVar1 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*pbVar3 * 8); if (lVar1 == 0) { uVar5 = (ulong)CONCAT11(*pbVar3,pbVar3[1]); } else { uVar5 = (ulong)*(uint *)(lVar1 + 8 + (ulong)pbVar3[1] * 0xc); } uVar6 = uVar6 * 0x100 + (uVar5 & 0xff) * ((ulong)((uint)uVar6 & 0x3f) + lVar2) ^ uVar6; uVar6 = uVar6 * 0x100 + (uVar5 >> 8) * ((ulong)((uint)uVar6 & 0x3f) + lVar2 + 3) ^ uVar6; lVar2 = lVar2 + 6; } while ((pbVar3 + 2 < param_2 + param_3) && (pbVar4 = pbVar3 + 4, pbVar3 = pbVar3 + 2, pbVar4 <= param_2 + param_3)); } *param_4 = uVar6; *param_5 = lVar2; return; }
49,958
my_handler_delete_with_symlink
eloqsql/mysys/my_symlink2.c
int my_handler_delete_with_symlink(const char *filename, myf sync_dir) { char real[FN_REFLEN]; int res= 0; DBUG_ENTER("my_handler_delete_with_symlink"); if (my_is_symlink(filename)) { /* Delete the symlinked file only if the symlink is not pointing into datadir. */ if (!(my_realpath(real, filename, MYF(0)) || mysys_test_invalid_symlink(real))) res= my_delete(real, MYF(MY_NOSYMLINKS | sync_dir)); } DBUG_RETURN(my_delete(filename, sync_dir) || res); }
O0
c
my_handler_delete_with_symlink: pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movl $0x0, -0x224(%rbp) movq -0x218(%rbp), %rdi callq 0xbfce0 cmpl $0x0, %eax je 0xc0737 leaq -0x210(%rbp), %rdi movq -0x218(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xbfd40 cmpl $0x0, %eax jne 0xc0735 leaq 0x1c873c(%rip), %rax # 0x288e40 movq (%rax), %rax leaq -0x210(%rbp), %rdi callq *%rax cmpl $0x0, %eax jne 0xc0735 leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi orq $0x200, %rsi # imm = 0x200 callq 0xb6320 movl %eax, -0x224(%rbp) jmp 0xc0737 jmp 0xc0739 movq -0x218(%rbp), %rdi movq -0x220(%rbp), %rsi callq 0xb6320 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x225(%rbp) jne 0xc076b cmpl $0x0, -0x224(%rbp) setne %al movb %al, -0x225(%rbp) movb -0x225(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x22c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xc079d movl -0x22c(%rbp), %eax addq $0x230, %rsp # imm = 0x230 popq %rbp retq callq 0x272b0 nopw %cs:(%rax,%rax) nopl (%rax)
my_handler_delete_with_symlink: push rbp mov rbp, rsp sub rsp, 230h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov [rbp+var_224], 0 mov rdi, [rbp+var_218] call my_is_symlink cmp eax, 0 jz short loc_C0737 lea rdi, [rbp+var_210] mov rsi, [rbp+var_218] xor eax, eax mov edx, eax call my_realpath cmp eax, 0 jnz short loc_C0735 lea rax, mysys_test_invalid_symlink mov rax, [rax] lea rdi, [rbp+var_210] call rax cmp eax, 0 jnz short loc_C0735 lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] or rsi, 200h call my_delete mov [rbp+var_224], eax loc_C0735: jmp short $+2 loc_C0737: jmp short $+2 loc_C0739: mov rdi, [rbp+var_218] mov rsi, [rbp+var_220] call my_delete mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_225], al jnz short loc_C076B cmp [rbp+var_224], 0 setnz al mov [rbp+var_225], al loc_C076B: mov al, [rbp+var_225] and al, 1 movzx eax, al mov [rbp+var_22C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_C079D mov eax, [rbp+var_22C] add rsp, 230h pop rbp retn loc_C079D: call ___stack_chk_fail
_BOOL8 my_handler_delete_with_symlink(const char *a1, const char *a2) { bool v3; // [rsp+Bh] [rbp-225h] int v4; // [rsp+Ch] [rbp-224h] _BYTE v5[520]; // [rsp+20h] [rbp-210h] BYREF unsigned long long v6; // [rsp+228h] [rbp-8h] v6 = __readfsqword(0x28u); v4 = 0; if ( my_is_symlink((long long)a1) && !(unsigned int)my_realpath((long long)v5, a1, 0) && !(unsigned int)mysys_test_invalid_symlink() ) { v4 = my_delete((long long)v5, (const char *)((unsigned long long)a2 | 0x200)); } v3 = 1; if ( !(unsigned int)my_delete((long long)a1, a2) ) return v4 != 0; return v3; }
my_handler_delete_with_symlink: PUSH RBP MOV RBP,RSP SUB RSP,0x230 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV dword ptr [RBP + -0x224],0x0 MOV RDI,qword ptr [RBP + -0x218] CALL 0x001bfce0 CMP EAX,0x0 JZ 0x001c0737 LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x218] XOR EAX,EAX MOV EDX,EAX CALL 0x001bfd40 CMP EAX,0x0 JNZ 0x001c0735 LEA RAX,[0x388e40] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x210] CALL RAX CMP EAX,0x0 JNZ 0x001c0735 LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] OR RSI,0x200 CALL 0x001b6320 MOV dword ptr [RBP + -0x224],EAX LAB_001c0735: JMP 0x001c0737 LAB_001c0737: JMP 0x001c0739 LAB_001c0739: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x220] CALL 0x001b6320 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x225],AL JNZ 0x001c076b CMP dword ptr [RBP + -0x224],0x0 SETNZ AL MOV byte ptr [RBP + -0x225],AL LAB_001c076b: MOV AL,byte ptr [RBP + -0x225] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x22c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001c079d MOV EAX,dword ptr [RBP + -0x22c] ADD RSP,0x230 POP RBP RET LAB_001c079d: CALL 0x001272b0
bool my_handler_delete_with_symlink(int8 param_1,ulong param_2) { int iVar1; long in_FS_OFFSET; bool local_22d; int local_22c; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_22c = 0; iVar1 = my_is_symlink(param_1); if (((iVar1 != 0) && (iVar1 = my_realpath(local_218,param_1,0), iVar1 == 0)) && (iVar1 = (*(code *)mysys_test_invalid_symlink)(local_218), iVar1 == 0)) { local_22c = my_delete(local_218,param_2 | 0x200); } iVar1 = my_delete(param_1,param_2); local_22d = iVar1 != 0 || local_22c != 0; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_22d; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
49,959
js_std_popen
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_popen(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *filename, *mode = NULL; FILE *f; int err; filename = JS_ToCString(ctx, argv[0]); if (!filename) goto fail; mode = JS_ToCString(ctx, argv[1]); if (!mode) goto fail; if (mode[strspn(mode, "rw")] != '\0') { JS_ThrowTypeError(ctx, "invalid file mode"); goto fail; } f = popen(filename, mode); if (!f) err = errno; else err = 0; if (argc >= 3) js_set_error_object(ctx, argv[2], err); JS_FreeCString(ctx, filename); JS_FreeCString(ctx, mode); if (!f) return JS_NULL; return js_new_std_file(ctx, f, TRUE); fail: JS_FreeCString(ctx, filename); JS_FreeCString(ctx, mode); return JS_EXCEPTION; }
O0
c
js_std_popen: subq $0x78, %rsp movq %rsi, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq %rdi, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq %r8, 0x40(%rsp) movq $0x0, 0x30(%rsp) movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x147e0 movq %rax, 0x38(%rsp) cmpq $0x0, 0x38(%rsp) jne 0x1617d jmp 0x162a0 movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x147e0 movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) jne 0x161a6 jmp 0x162a0 movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rdi leaq 0xf3c85(%rip), %rsi # 0x109e41 callq 0xe3f0 movq %rax, %rcx movq 0x8(%rsp), %rax movzbl (%rax,%rcx), %eax cmpl $0x0, %eax je 0x161f4 movq 0x50(%rsp), %rdi leaq 0xf3c4b(%rip), %rsi # 0x109e29 movb $0x0, %al callq 0x2d300 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) jmp 0x162a0 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0xe7b0 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) jne 0x1621d callq 0xe0b0 movl (%rax), %eax movl %eax, 0x24(%rsp) jmp 0x16225 movl $0x0, 0x24(%rsp) cmpl $0x3, 0x4c(%rsp) jl 0x16247 movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movl 0x24(%rsp), %ecx movq 0x20(%rax), %rsi movq 0x28(%rax), %rdx callq 0x16870 movq 0x50(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x29e50 movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x29e50 cmpq $0x0, 0x28(%rsp) jne 0x16280 movl $0x0, 0x68(%rsp) movq $0x2, 0x70(%rsp) jmp 0x162cf movq 0x50(%rsp), %rdi movq 0x28(%rsp), %rsi movl $0x1, %edx callq 0x126c0 movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) jmp 0x162cf movq 0x50(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x29e50 movq 0x50(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x29e50 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rdx addq $0x78, %rsp retq nop
js_std_popen: sub rsp, 78h mov [rsp+78h+var_20], rsi mov [rsp+78h+var_18], rdx mov [rsp+78h+var_28], rdi mov [rsp+78h+var_2C], ecx mov [rsp+78h+var_38], r8 mov [rsp+78h+var_48], 0 mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ToCString mov [rsp+78h+var_40], rax cmp [rsp+78h+var_40], 0 jnz short loc_1617D jmp loc_162A0 loc_1617D: mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_ToCString mov [rsp+78h+var_48], rax cmp [rsp+78h+var_48], 0 jnz short loc_161A6 jmp loc_162A0 loc_161A6: mov rax, [rsp+78h+var_48] mov [rsp+78h+var_70], rax mov rdi, [rsp+78h+var_48] lea rsi, aRw; "rw" call _strspn mov rcx, rax mov rax, [rsp+78h+var_70] movzx eax, byte ptr [rax+rcx] cmp eax, 0 jz short loc_161F4 mov rdi, [rsp+78h+var_28] lea rsi, aInvalidFileMod; "invalid file mode" mov al, 0 call JS_ThrowTypeError mov [rsp+78h+var_68], rax mov [rsp+78h+var_60], rdx jmp loc_162A0 loc_161F4: mov rdi, [rsp+78h+var_40] mov rsi, [rsp+78h+var_48] call _popen mov [rsp+78h+var_50], rax cmp [rsp+78h+var_50], 0 jnz short loc_1621D call ___errno_location mov eax, [rax] mov [rsp+78h+var_54], eax jmp short loc_16225 loc_1621D: mov [rsp+78h+var_54], 0 loc_16225: cmp [rsp+78h+var_2C], 3 jl short loc_16247 mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov ecx, [rsp+78h+var_54] mov rsi, [rax+20h] mov rdx, [rax+28h] call js_set_error_object loc_16247: mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_40] call JS_FreeCString mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_48] call JS_FreeCString cmp [rsp+78h+var_50], 0 jnz short loc_16280 mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 2 jmp short loc_162CF loc_16280: mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_50] mov edx, 1 call js_new_std_file mov [rsp+78h+var_10], rax mov [rsp+78h+var_8], rdx jmp short loc_162CF loc_162A0: mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_40] call JS_FreeCString mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_48] call JS_FreeCString mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 6 loc_162CF: mov rax, [rsp+78h+var_10] mov rdx, [rsp+78h+var_8] add rsp, 78h retn
long long js_std_popen(long long a1, long long a2, long long a3, int a4, long long *a5) { long long v5; // rax int v6; // edx int v7; // r8d int v8; // r9d _BYTE v10[12]; // [rsp+24h] [rbp-54h] long long v11; // [rsp+30h] [rbp-48h] long long v12; // [rsp+38h] [rbp-40h] long long v15; // [rsp+68h] [rbp-10h] v11 = 0LL; v12 = JS_ToCString(a1, *a5, a5[1]); if ( !v12 ) goto LABEL_13; v11 = JS_ToCString(a1, a5[2], a5[3]); if ( !v11 ) goto LABEL_13; v5 = strspn(v11, "rw"); if ( *(_BYTE *)(v11 + v5) ) { JS_ThrowTypeError(a1, (unsigned int)"invalid file mode", v6, v5, v7, v8); LABEL_13: JS_FreeCString(a1, v12); JS_FreeCString(a1, v11); LODWORD(v15) = 0; return v15; } *(_QWORD *)&v10[4] = popen(v12, v11); if ( *(_QWORD *)&v10[4] ) *(_DWORD *)v10 = 0; else *(_QWORD *)v10 = *(unsigned int *)__errno_location(); if ( a4 >= 3 ) js_set_error_object(a1, a5[4], a5[5], *(unsigned int *)v10); JS_FreeCString(a1, v12); JS_FreeCString(a1, v11); if ( *(_QWORD *)&v10[4] ) return js_new_std_file(a1, *(long long *)&v10[4], 1); LODWORD(v15) = 0; return v15; }
js_std_popen: SUB RSP,0x78 MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],ECX MOV qword ptr [RSP + 0x40],R8 MOV qword ptr [RSP + 0x30],0x0 MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001147e0 MOV qword ptr [RSP + 0x38],RAX CMP qword ptr [RSP + 0x38],0x0 JNZ 0x0011617d JMP 0x001162a0 LAB_0011617d: MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x001147e0 MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x30],0x0 JNZ 0x001161a6 JMP 0x001162a0 LAB_001161a6: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[0x209e41] CALL 0x0010e3f0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x0 JZ 0x001161f4 MOV RDI,qword ptr [RSP + 0x50] LEA RSI,[0x209e29] MOV AL,0x0 CALL 0x0012d300 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX JMP 0x001162a0 LAB_001161f4: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] CALL 0x0010e7b0 MOV qword ptr [RSP + 0x28],RAX CMP qword ptr [RSP + 0x28],0x0 JNZ 0x0011621d CALL 0x0010e0b0 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x24],EAX JMP 0x00116225 LAB_0011621d: MOV dword ptr [RSP + 0x24],0x0 LAB_00116225: CMP dword ptr [RSP + 0x4c],0x3 JL 0x00116247 MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RSP + 0x24] MOV RSI,qword ptr [RAX + 0x20] MOV RDX,qword ptr [RAX + 0x28] CALL 0x00116870 LAB_00116247: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00129e50 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x30] CALL 0x00129e50 CMP qword ptr [RSP + 0x28],0x0 JNZ 0x00116280 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x2 JMP 0x001162cf LAB_00116280: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x28] MOV EDX,0x1 CALL 0x001126c0 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX JMP 0x001162cf LAB_001162a0: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00129e50 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x30] CALL 0x00129e50 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 LAB_001162cf: MOV RAX,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
int1 [16] js_std_popen(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { char *__command; size_t sVar1; FILE *pFVar2; int *piVar3; int1 auVar4 [16]; int local_54; char *local_48; int4 local_10; int4 uStack_c; int8 local_8; local_48 = (char *)0x0; __command = (char *)JS_ToCString(param_1,*param_5,param_5[1]); if ((__command != (char *)0x0) && (local_48 = (char *)JS_ToCString(param_1,param_5[2],param_5[3]), local_48 != (char *)0x0)) { sVar1 = strspn(local_48,"rw"); if (local_48[sVar1] == '\0') { pFVar2 = popen(__command,local_48); if (pFVar2 == (FILE *)0x0) { piVar3 = __errno_location(); local_54 = *piVar3; } else { local_54 = 0; } if (2 < param_4) { js_set_error_object(param_1,param_5[4],param_5[5],local_54); } JS_FreeCString(param_1,__command); JS_FreeCString(param_1,local_48); if (pFVar2 == (FILE *)0x0) { local_10 = 0; local_8 = 2; } else { auVar4 = js_new_std_file(param_1,pFVar2,1); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; } goto LAB_001162cf; } JS_ThrowTypeError(param_1,"invalid file mode"); } JS_FreeCString(param_1,__command); JS_FreeCString(param_1,local_48); local_10 = 0; local_8 = 6; LAB_001162cf: auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
49,960
js_std_popen
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_popen(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *filename, *mode = NULL; FILE *f; int err; filename = JS_ToCString(ctx, argv[0]); if (!filename) goto fail; mode = JS_ToCString(ctx, argv[1]); if (!mode) goto fail; if (mode[strspn(mode, "rw")] != '\0') { JS_ThrowTypeError(ctx, "invalid file mode"); goto fail; } f = popen(filename, mode); if (!f) err = errno; else err = 0; if (argc >= 3) js_set_error_object(ctx, argv[2], err); JS_FreeCString(ctx, filename); JS_FreeCString(ctx, mode); if (!f) return JS_NULL; return js_new_std_file(ctx, f, TRUE); fail: JS_FreeCString(ctx, filename); JS_FreeCString(ctx, mode); return JS_EXCEPTION; }
O1
c
js_std_popen: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r15 movl %ecx, %ebp movq %rdi, %rbx movq (%r8), %rdx movq 0x8(%r8), %rcx xorl %r13d, %r13d xorl %esi, %esi xorl %r8d, %r8d callq 0x20bf7 movq %rax, %r14 testq %rax, %rax je 0x17b1d movq 0x10(%r15), %rdx movq 0x18(%r15), %rcx xorl %r13d, %r13d movq %rbx, %rdi xorl %esi, %esi xorl %r8d, %r8d callq 0x20bf7 testq %rax, %rax je 0x17b1d movq %rax, %r12 leaq 0x8422f(%rip), %rsi # 0x9bd29 movq %rax, %rdi callq 0xe3f0 cmpb $0x0, (%r12,%rax) je 0x17b4e leaq 0x84201(%rip), %rsi # 0x9bd11 movq %rbx, %rdi xorl %eax, %eax callq 0x22567 movq %r12, %r13 movq %rbx, %rdi movq %r14, %rsi callq 0x20edd movq %rbx, %rdi movq %r13, %rsi callq 0x20edd movl $0x6, %edx xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi movq %r12, %rsi callq 0xe7c0 movq %rax, %r13 testq %rax, %rax je 0x17b66 xorl %r8d, %r8d jmp 0x17b6e callq 0xe0b0 movl (%rax), %r8d cmpl $0x3, %ebp jl 0x17b92 movq 0x28(%r15), %rdx cmpl $0x3, %edx je 0x17b92 movq 0x20(%r15), %rsi leaq 0x8419c(%rip), %rcx # 0x9bd23 movq %rbx, %rdi xorl %r9d, %r9d callq 0x25428 movq %rbx, %rdi movq %r14, %rsi callq 0x20edd movq %rbx, %rdi movq %r12, %rsi callq 0x20edd testq %r13, %r13 je 0x17bd1 movq %rbx, %rdi movq %r13, %rsi movl $0x1, %edx callq 0x15d77 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax jmp 0x17b3c xorl %eax, %eax movl $0x2, %edx jmp 0x17b3a
js_std_popen: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, r8 mov ebp, ecx mov rbx, rdi mov rdx, [r8] mov rcx, [r8+8] xor r13d, r13d xor esi, esi xor r8d, r8d call JS_ToCStringLen2 mov r14, rax test rax, rax jz short loc_17B1D mov rdx, [r15+10h] mov rcx, [r15+18h] xor r13d, r13d mov rdi, rbx xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_17B1D mov r12, rax lea rsi, aRw; "rw" mov rdi, rax call _strspn cmp byte ptr [r12+rax], 0 jz short loc_17B4E lea rsi, aInvalidFileMod; "invalid file mode" mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r13, r12 loc_17B1D: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov rdi, rbx mov rsi, r13 call JS_FreeCString mov edx, 6 xor eax, eax loc_17B3A: xor ecx, ecx loc_17B3C: or rax, rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_17B4E: mov rdi, r14 mov rsi, r12 call _popen mov r13, rax test rax, rax jz short loc_17B66 xor r8d, r8d jmp short loc_17B6E loc_17B66: call ___errno_location mov r8d, [rax] loc_17B6E: cmp ebp, 3 jl short loc_17B92 mov rdx, [r15+28h] cmp edx, 3 jz short loc_17B92 mov rsi, [r15+20h] lea rcx, aErrno; "errno" mov rdi, rbx xor r9d, r9d call JS_SetPropertyStr loc_17B92: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov rdi, rbx mov rsi, r12 call JS_FreeCString test r13, r13 jz short loc_17BD1 mov rdi, rbx mov rsi, r13 mov edx, 1 call js_new_std_file mov rcx, 0FFFFFFFF00000000h and rcx, rax mov eax, eax jmp loc_17B3C loc_17BD1: xor eax, eax mov edx, 2 jmp loc_17B3A
unsigned long long js_std_popen(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { long long v7; // r13 long long v8; // r14 long long v9; // rax long long v10; // r12 int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d unsigned long long v15; // rax unsigned long long v16; // rcx long long v18; // r13 long long v19; // r8 long long v20; // rdx v7 = 0LL; v8 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL); if ( !v8 ) goto LABEL_5; v7 = 0LL; v9 = JS_ToCStringLen2(a1, 0LL, a5[2], a5[3], 0LL); if ( !v9 ) goto LABEL_5; v10 = v9; if ( *(_BYTE *)(v9 + strspn(v9, "rw")) ) { JS_ThrowTypeError(a1, (unsigned int)"invalid file mode", v11, v12, v13, v14); v7 = v10; LABEL_5: JS_FreeCString(a1, v8); JS_FreeCString(a1, v7); v15 = 0LL; goto LABEL_6; } v18 = popen(v8, v10); if ( v18 ) v19 = 0LL; else v19 = *(unsigned int *)__errno_location(v8); if ( a4 >= 3 ) { v20 = a5[5]; if ( (_DWORD)v20 != 3 ) JS_SetPropertyStr(a1, a5[4], v20, "errno", v19, 0LL); } JS_FreeCString(a1, v8); JS_FreeCString(a1, v10); if ( v18 ) { v15 = js_new_std_file(a1, v18, 1); v16 = v15 & 0xFFFFFFFF00000000LL; v15 = (unsigned int)v15; return v16 | v15; } v15 = 0LL; LABEL_6: v16 = 0LL; return v16 | v15; }
49,961
js_std_popen
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_popen(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *filename, *mode = NULL; FILE *f; int err; filename = JS_ToCString(ctx, argv[0]); if (!filename) goto fail; mode = JS_ToCString(ctx, argv[1]); if (!mode) goto fail; if (mode[strspn(mode, "rw")] != '\0') { JS_ThrowTypeError(ctx, "invalid file mode"); goto fail; } f = popen(filename, mode); if (!f) err = errno; else err = 0; if (argc >= 3) js_set_error_object(ctx, argv[2], err); JS_FreeCString(ctx, filename); JS_FreeCString(ctx, mode); if (!f) return JS_NULL; return js_new_std_file(ctx, f, TRUE); fail: JS_FreeCString(ctx, filename); JS_FreeCString(ctx, mode); return JS_EXCEPTION; }
O2
c
js_std_popen: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r12 movl %ecx, %ebp movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx callq 0x11a6c movq %rax, %r14 testq %rax, %rax je 0x1281c movq 0x10(%r12), %rsi movq 0x18(%r12), %rdx movq %rbx, %rdi callq 0x11a6c testq %rax, %rax je 0x1281c movq %rax, %r15 leaq 0x704d8(%rip), %rsi # 0x82cd2 movq %rax, %rdi callq 0xe400 cmpb $0x0, (%r15,%rax) je 0x1284e leaq 0x704aa(%rip), %rsi # 0x82cba movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d jmp 0x1281f xorl %r15d, %r15d movq %rbx, %rdi movq %r14, %rsi callq 0x1b057 movq %rbx, %rdi movq %r15, %rsi callq 0x1b057 pushq $0x6 popq %rdx xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi movq %r15, %rsi callq 0xe7e0 movq %rax, %r13 xorl %ecx, %ecx testq %rax, %rax jne 0x1286a callq 0xe0b0 movl (%rax), %ecx cmpl $0x3, %ebp jl 0x12881 movq 0x20(%r12), %rsi movq 0x28(%r12), %rdx movq %rbx, %rdi callq 0x12b1d movq %rbx, %rdi movq %r14, %rsi callq 0x1b057 movq %rbx, %rdi movq %r15, %rsi callq 0x1b057 testq %r13, %r13 je 0x128bb pushq $0x1 popq %rdx movq %rbx, %rdi movq %r13, %rsi callq 0x10c2a movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax jmp 0x1283c xorl %eax, %eax pushq $0x2 popq %rdx jmp 0x1283a
js_std_popen: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, r8 mov ebp, ecx mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] call JS_ToCString mov r14, rax test rax, rax jz short loc_1281C mov rsi, [r12+10h] mov rdx, [r12+18h] mov rdi, rbx call JS_ToCString test rax, rax jz short loc_1281C mov r15, rax lea rsi, aRw; "rw" mov rdi, rax call _strspn cmp byte ptr [r15+rax], 0 jz short loc_1284E lea rsi, aInvalidFileMod; "invalid file mode" mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp short loc_1281F loc_1281C: xor r15d, r15d loc_1281F: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov rdi, rbx mov rsi, r15 call JS_FreeCString push 6 pop rdx xor eax, eax loc_1283A: xor ecx, ecx loc_1283C: or rax, rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1284E: mov rdi, r14 mov rsi, r15 call _popen mov r13, rax xor ecx, ecx test rax, rax jnz short loc_1286A call ___errno_location mov ecx, [rax] loc_1286A: cmp ebp, 3 jl short loc_12881 mov rsi, [r12+20h] mov rdx, [r12+28h] mov rdi, rbx call js_set_error_object loc_12881: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov rdi, rbx mov rsi, r15 call JS_FreeCString test r13, r13 jz short loc_128BB push 1 pop rdx mov rdi, rbx mov rsi, r13 call js_new_std_file mov rcx, 0FFFFFFFF00000000h and rcx, rax mov eax, eax jmp short loc_1283C loc_128BB: xor eax, eax push 2 pop rdx jmp loc_1283A
unsigned long long js_std_popen(long long a1, long long a2, long long a3, int a4, long long *a5) { long long v7; // r14 long long v8; // rax long long v9; // r15 int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d unsigned long long v14; // rax unsigned long long v15; // rcx long long v17; // r13 long long v18; // rcx v7 = JS_ToCString(a1, *a5, a5[1]); if ( !v7 || (v8 = JS_ToCString(a1, a5[2], a5[3])) == 0 ) { v9 = 0LL; goto LABEL_6; } v9 = v8; if ( *(_BYTE *)(v8 + strspn(v8, "rw")) ) { JS_ThrowTypeError(a1, (unsigned int)"invalid file mode", v10, v11, v12, v13); LABEL_6: JS_FreeCString(a1, v7); JS_FreeCString(a1, v9); v14 = 0LL; goto LABEL_7; } v17 = popen(v7, v9); v18 = 0LL; if ( !v17 ) v18 = *(unsigned int *)__errno_location(v7); if ( a4 >= 3 ) js_set_error_object(a1, a5[4], a5[5], v18); JS_FreeCString(a1, v7); JS_FreeCString(a1, v9); if ( v17 ) { v14 = js_new_std_file(a1, v17, 1); v15 = v14 & 0xFFFFFFFF00000000LL; v14 = (unsigned int)v14; return v15 | v14; } v14 = 0LL; LABEL_7: v15 = 0LL; return v15 | v14; }
js_std_popen: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,R8 MOV EBP,ECX MOV RBX,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] CALL 0x00111a6c MOV R14,RAX TEST RAX,RAX JZ 0x0011281c MOV RSI,qword ptr [R12 + 0x10] MOV RDX,qword ptr [R12 + 0x18] MOV RDI,RBX CALL 0x00111a6c TEST RAX,RAX JZ 0x0011281c MOV R15,RAX LEA RSI,[0x182cd2] MOV RDI,RAX CALL 0x0010e400 CMP byte ptr [R15 + RAX*0x1],0x0 JZ 0x0011284e LEA RSI,[0x182cba] MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d JMP 0x0011281f LAB_0011281c: XOR R15D,R15D LAB_0011281f: MOV RDI,RBX MOV RSI,R14 CALL 0x0011b057 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b057 PUSH 0x6 POP RDX XOR EAX,EAX LAB_0011283a: XOR ECX,ECX LAB_0011283c: OR RAX,RCX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011284e: MOV RDI,R14 MOV RSI,R15 CALL 0x0010e7e0 MOV R13,RAX XOR ECX,ECX TEST RAX,RAX JNZ 0x0011286a CALL 0x0010e0b0 MOV ECX,dword ptr [RAX] LAB_0011286a: CMP EBP,0x3 JL 0x00112881 MOV RSI,qword ptr [R12 + 0x20] MOV RDX,qword ptr [R12 + 0x28] MOV RDI,RBX CALL 0x00112b1d LAB_00112881: MOV RDI,RBX MOV RSI,R14 CALL 0x0011b057 MOV RDI,RBX MOV RSI,R15 CALL 0x0011b057 TEST R13,R13 JZ 0x001128bb PUSH 0x1 POP RDX MOV RDI,RBX MOV RSI,R13 CALL 0x00110c2a MOV RCX,-0x100000000 AND RCX,RAX MOV EAX,EAX JMP 0x0011283c LAB_001128bb: XOR EAX,EAX PUSH 0x2 POP RDX JMP 0x0011283a
ulong js_std_popen(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { char *__command; char *__s; size_t sVar1; FILE *pFVar2; int *piVar3; ulong uVar4; int iVar5; ulong uVar6; __command = (char *)JS_ToCString(param_1,*param_5,param_5[1]); if ((__command == (char *)0x0) || (__s = (char *)JS_ToCString(param_1,param_5[2],param_5[3]), __s == (char *)0x0)) { __s = (char *)0x0; LAB_0011281f: JS_FreeCString(param_1,__command); JS_FreeCString(param_1,__s); } else { sVar1 = strspn(__s,"rw"); if (__s[sVar1] != '\0') { JS_ThrowTypeError(param_1,"invalid file mode"); goto LAB_0011281f; } pFVar2 = popen(__command,__s); iVar5 = 0; if (pFVar2 == (FILE *)0x0) { piVar3 = __errno_location(); iVar5 = *piVar3; } if (2 < param_4) { js_set_error_object(param_1,param_5[4],param_5[5],iVar5); } JS_FreeCString(param_1,__command); JS_FreeCString(param_1,__s); if (pFVar2 != (FILE *)0x0) { uVar4 = js_new_std_file(param_1,pFVar2,1); uVar6 = uVar4 & 0xffffffff00000000; uVar4 = uVar4 & 0xffffffff; goto LAB_0011283c; } } uVar4 = 0; uVar6 = 0; LAB_0011283c: return uVar4 | uVar6; }
49,962
httpclient_write_stream
qoraal-tictactoe/build_O0/_deps/qoraal_http-src/src/httpclient.c
static int32_t httpclient_write_stream (HTTP_CLIENT_T* client, HTTP_STREAM_NEXT_T stream, uint32_t parm, int32_t len, uint32_t timeout) { int32_t sent_bytes = 0; int32_t total = 0 ; setsockopt (client->socket, SOL_SOCKET, SO_SNDTIMEO, (char *)&timeout, sizeof(timeout)); do { #if !defined CFG_HTTPCLIENT_TLS_DISABLE if (client->ssl) { sent_bytes = stream((HTTP_STREAM_WRITE)ssl_socket_send, (uint32_t) client->ssl, parm, len-total) ; } else #endif { sent_bytes = stream((HTTP_STREAM_WRITE)socket_send, (uint32_t) client->socket, parm, len-total) ; } if (sent_bytes <= 0) { DBG_MESSAGE_HTTP_CLIENT (DBG_MESSAGE_SEVERITY_ERROR, "httpserver_write : ERROR: socket 0x%x sent_bytes %d", client->socket, sent_bytes); return HTTP_CLIENT_E_CONNECTION ; } else { total += sent_bytes ; } } while (total < len) ; return total ; }
O0
c
httpclient_write_stream: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl %ecx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movl $0x0, -0x28(%rbp) movl $0x0, -0x2c(%rbp) movq -0x10(%rbp), %rax movl (%rax), %edi movl $0x1, %esi movl $0x15, %edx leaq -0x24(%rbp), %rcx movl $0x4, %r8d callq 0x6110 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movl (%rcx), %esi movl -0x1c(%rbp), %edx movl -0x20(%rbp), %ecx subl -0x2c(%rbp), %ecx leaq 0xd7f(%rip), %rdi # 0x2f0e0 callq *%rax movl %eax, -0x28(%rbp) cmpl $0x0, -0x28(%rbp) jg 0x2e394 movq -0x10(%rbp), %rax movl (%rax), %ecx movl -0x28(%rbp), %r8d movl $0x2, %edi xorl %esi, %esi leaq 0x13937(%rip), %rdx # 0x41cbb movb $0x0, %al callq 0x1e560 movl $0xfffffffe, -0x4(%rbp) # imm = 0xFFFFFFFE jmp 0x2e3ad movl -0x28(%rbp), %eax addl -0x2c(%rbp), %eax movl %eax, -0x2c(%rbp) jmp 0x2e39f movl -0x2c(%rbp), %eax cmpl -0x20(%rbp), %eax jl 0x2e347 movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
httpclient_write_stream: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_20], ecx mov [rbp+var_24], r8d mov [rbp+var_28], 0 mov [rbp+var_2C], 0 mov rax, [rbp+var_10] mov edi, [rax] mov esi, 1 mov edx, 15h lea rcx, [rbp+var_24] mov r8d, 4 call _setsockopt loc_2E347: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov esi, [rcx] mov edx, [rbp+var_1C] mov ecx, [rbp+var_20] sub ecx, [rbp+var_2C] lea rdi, socket_send call rax mov [rbp+var_28], eax cmp [rbp+var_28], 0 jg short loc_2E394 mov rax, [rbp+var_10] mov ecx, [rax] mov r8d, [rbp+var_28] mov edi, 2 xor esi, esi lea rdx, aHttpserverWrit; "httpserver_write : ERROR: socket 0x%x s"... mov al, 0 call svc_logger_type_log mov [rbp+var_4], 0FFFFFFFEh jmp short loc_2E3AD loc_2E394: mov eax, [rbp+var_28] add eax, [rbp+var_2C] mov [rbp+var_2C], eax jmp short $+2 loc_2E39F: mov eax, [rbp+var_2C] cmp eax, [rbp+var_20] jl short loc_2E347 mov eax, [rbp+var_2C] mov [rbp+var_4], eax loc_2E3AD: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long httpclient_write_stream( unsigned int *a1, long long ( *a2)(long long ( *)(), _QWORD, _QWORD, _QWORD), unsigned int a3, int a4, int a5) { unsigned int v6; // [rsp+4h] [rbp-2Ch] int v7; // [rsp+8h] [rbp-28h] int v8; // [rsp+Ch] [rbp-24h] BYREF int v9; // [rsp+10h] [rbp-20h] unsigned int v10; // [rsp+14h] [rbp-1Ch] long long ( *v11)(long long ( *)(), _QWORD, _QWORD, _QWORD); // [rsp+18h] [rbp-18h] unsigned int *v12; // [rsp+20h] [rbp-10h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; v8 = a5; v6 = 0; setsockopt(*a1, 1LL, 21LL, &v8, 4LL); do { v7 = v11(socket_send, *v12, v10, v9 - v6); if ( v7 <= 0 ) { svc_logger_type_log(2u, 0, (long long)"httpserver_write : ERROR: socket 0x%x sent_bytes %d", *v12, v7); return (unsigned int)-2; } v6 += v7; } while ( (int)v6 < v9 ); return v6; }
httpclient_write_stream: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV dword ptr [RBP + -0x20],ECX MOV dword ptr [RBP + -0x24],R8D MOV dword ptr [RBP + -0x28],0x0 MOV dword ptr [RBP + -0x2c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX] MOV ESI,0x1 MOV EDX,0x15 LEA RCX,[RBP + -0x24] MOV R8D,0x4 CALL 0x00106110 LAB_0012e347: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] MOV ECX,dword ptr [RBP + -0x20] SUB ECX,dword ptr [RBP + -0x2c] LEA RDI,[0x12f0e0] CALL RAX MOV dword ptr [RBP + -0x28],EAX CMP dword ptr [RBP + -0x28],0x0 JG 0x0012e394 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX] MOV R8D,dword ptr [RBP + -0x28] MOV EDI,0x2 XOR ESI,ESI LEA RDX,[0x141cbb] MOV AL,0x0 CALL 0x0011e560 MOV dword ptr [RBP + -0x4],0xfffffffe JMP 0x0012e3ad LAB_0012e394: MOV EAX,dword ptr [RBP + -0x28] ADD EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x2c],EAX JMP 0x0012e39f LAB_0012e39f: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x20] JL 0x0012e347 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_0012e3ad: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int httpclient_write_stream (int *param_1,code *param_2,int4 param_3,int param_4,int4 param_5) { int iVar1; int local_34; int4 local_2c; int local_28; int4 local_24; code *local_20; int *local_18; local_34 = 0; local_2c = param_5; local_28 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; setsockopt(*param_1,1,0x15,&local_2c,4); do { iVar1 = (*local_20)(socket_send,*local_18,local_24,local_28 - local_34); if (iVar1 < 1) { svc_logger_type_log(2,0,s_httpserver_write___ERROR__socket_00141cbb,*local_18,iVar1); return -2; } local_34 = iVar1 + local_34; } while (local_34 < local_28); return local_34; }
49,963
nlohmann::json_abi_v3_11_3::detail::other_error nlohmann::json_abi_v3_11_3::detail::other_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
static other_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("other_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::other_error nlohmann::json_abi_v3_11_3::detail::other_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0xd0(%rbp) movq %rdi, %rax movq %rax, -0xc8(%rbp) movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq -0x81(%rbp), %rdi movq %rdi, -0xc0(%rbp) callq 0x611c0 movq -0xc0(%rbp), %rdx leaq 0x1bcab(%rip), %rsi # 0x8e097 leaq -0x80(%rbp), %rdi callq 0x60e40 jmp 0x723f7 movl -0xc(%rbp), %edx leaq -0x60(%rbp), %rdi leaq -0x80(%rbp), %rsi callq 0x5c9f0 jmp 0x72409 xorl %eax, %eax movl %eax, %esi leaq -0xb8(%rbp), %rdi callq 0x5cb10 jmp 0x7241b movq -0x18(%rbp), %rcx leaq -0x40(%rbp), %rdi leaq -0x60(%rbp), %rsi leaq -0xb8(%rbp), %rdx callq 0x60150 jmp 0x72435 leaq -0xb8(%rbp), %rdi callq 0x5cfd0 leaq -0x60(%rbp), %rdi callq 0x5cfd0 leaq -0x80(%rbp), %rdi callq 0x5cfd0 leaq -0x81(%rbp), %rdi callq 0x5eab0 movl -0xc(%rbp), %eax movl %eax, -0xd4(%rbp) leaq -0x40(%rbp), %rdi callq 0x5c260 movq -0xd0(%rbp), %rdi movl -0xd4(%rbp), %esi movq %rax, %rdx callq 0x5f680 jmp 0x72488 leaq -0x40(%rbp), %rdi callq 0x5cfd0 movq -0xc8(%rbp), %rax addq $0xe0, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x90(%rbp) movl %eax, -0x94(%rbp) jmp 0x7250d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x90(%rbp) movl %eax, -0x94(%rbp) jmp 0x72504 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x90(%rbp) movl %eax, -0x94(%rbp) jmp 0x724fb movq %rax, %rcx movl %edx, %eax movq %rcx, -0x90(%rbp) movl %eax, -0x94(%rbp) leaq -0xb8(%rbp), %rdi callq 0x5cfd0 leaq -0x60(%rbp), %rdi callq 0x5cfd0 leaq -0x80(%rbp), %rdi callq 0x5cfd0 leaq -0x81(%rbp), %rdi callq 0x5eab0 jmp 0x72536 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x90(%rbp) movl %eax, -0x94(%rbp) leaq -0x40(%rbp), %rdi callq 0x5cfd0 movq -0x90(%rbp), %rdi callq 0x611b0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_D0], rdi mov rax, rdi mov [rbp+var_C8], rax mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx lea rdi, [rbp+var_81] mov [rbp+var_C0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_C0] lea rsi, aOtherError; "other_error" lea rdi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_723F7: mov edx, [rbp+var_C] lea rdi, [rbp+var_60] lea rsi, [rbp+var_80] call __ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) jmp short $+2 loc_72409: xor eax, eax mov esi, eax lea rdi, [rbp+var_B8] call __ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr)) jmp short $+2 loc_7241B: mov rcx, [rbp+var_18] lea rdi, [rbp+var_40] lea rsi, [rbp+var_60] lea rdx, [rbp+var_B8] call __ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&) jmp short $+2 loc_72435: lea rdi, [rbp+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, [rbp+var_C] mov [rbp+var_D4], eax lea rdi, [rbp+var_40] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rbp+var_D0]; this mov esi, [rbp+var_D4]; int mov rdx, rax; char * call __ZN8nlohmann16json_abi_v3_11_36detail11other_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::other_error::other_error(int,char const*) jmp short $+2 loc_72488: lea rdi, [rbp+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rbp+var_C8] add rsp, 0E0h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_90], rcx mov [rbp+var_94], eax jmp short loc_7250D mov rcx, rax mov eax, edx mov [rbp+var_90], rcx mov [rbp+var_94], eax jmp short loc_72504 mov rcx, rax mov eax, edx mov [rbp+var_90], rcx mov [rbp+var_94], eax jmp short loc_724FB mov rcx, rax mov eax, edx mov [rbp+var_90], rcx mov [rbp+var_94], eax lea rdi, [rbp+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_724FB: lea rdi, [rbp+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_72504: lea rdi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7250D: lea rdi, [rbp+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_72536 mov rcx, rax mov eax, edx mov [rbp+var_90], rcx mov [rbp+var_94], eax lea rdi, [rbp+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_72536: mov rdi, [rbp+var_90] call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::other_error * ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( nlohmann::json_abi_v3_11_3::detail::other_error *a1, unsigned int a2, long long a3, long long a4) { const char *v4; // rax int v6; // [rsp+Ch] [rbp-D4h] _BYTE v7[36]; // [rsp+28h] [rbp-B8h] BYREF char v8; // [rsp+5Fh] [rbp-81h] BYREF _BYTE v9[32]; // [rsp+60h] [rbp-80h] BYREF _BYTE v10[32]; // [rsp+80h] [rbp-60h] BYREF _BYTE v11[32]; // [rsp+A0h] [rbp-40h] BYREF long long v12; // [rsp+C0h] [rbp-20h] long long v13; // [rsp+C8h] [rbp-18h] unsigned int v14; // [rsp+D4h] [rbp-Ch] nlohmann::json_abi_v3_11_3::detail::other_error *v15; // [rsp+D8h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(v9, "other_error", &v8); nlohmann::json_abi_v3_11_3::detail::exception::name(v10, v9, v14); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11](v7, 0LL); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(v11, v10, v7, v13); std::string::~string(v7); std::string::~string(v10); std::string::~string(v9); std::allocator<char>::~allocator(&v8); v6 = v14; v4 = (const char *)std::string::c_str(v11); nlohmann::json_abi_v3_11_3::detail::other_error::other_error(a1, v6, v4); std::string::~string(v11); return a1; }
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0xd0],RDI MOV RAX,RDI MOV qword ptr [RBP + -0xc8],RAX MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX LEA RDI,[RBP + -0x81] MOV qword ptr [RBP + -0xc0],RDI CALL 0x001611c0 MOV RDX,qword ptr [RBP + -0xc0] LAB_001723e5: LEA RSI,[0x18e097] LEA RDI,[RBP + -0x80] CALL 0x00160e40 JMP 0x001723f7 LAB_001723f7: MOV EDX,dword ptr [RBP + -0xc] LAB_001723fa: LEA RDI,[RBP + -0x60] LEA RSI,[RBP + -0x80] CALL 0x0015c9f0 JMP 0x00172409 LAB_00172409: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RBP + -0xb8] CALL 0x0015cb10 JMP 0x0017241b LAB_0017241b: MOV RCX,qword ptr [RBP + -0x18] LAB_0017241f: LEA RDI,[RBP + -0x40] LEA RSI,[RBP + -0x60] LEA RDX,[RBP + -0xb8] CALL 0x00160150 JMP 0x00172435 LAB_00172435: LEA RDI,[RBP + -0xb8] CALL 0x0015cfd0 LEA RDI,[RBP + -0x60] CALL 0x0015cfd0 LEA RDI,[RBP + -0x80] CALL 0x0015cfd0 LEA RDI,[RBP + -0x81] CALL 0x0015eab0 MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0xd4],EAX LEA RDI,[RBP + -0x40] CALL 0x0015c260 MOV RDI,qword ptr [RBP + -0xd0] MOV ESI,dword ptr [RBP + -0xd4] MOV RDX,RAX LAB_00172481: CALL 0x0015f680 LAB_00172486: JMP 0x00172488 LAB_00172488: LEA RDI,[RBP + -0x40] CALL 0x0015cfd0 MOV RAX,qword ptr [RBP + -0xc8] ADD RSP,0xe0 POP RBP RET
other_error * _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (other_error *param_1,int param_2,string *param_3,int8 param_4) { int iVar1; char *pcVar2; exception local_c0 [55]; allocator local_89; string local_88 [32]; exception local_68 [32]; detail local_48 [32]; int8 local_28; string *local_20; int local_14; other_error *local_10; local_28 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; std::allocator<char>::allocator(); /* try { // try from 001723e5 to 001723f4 has its CatchHandler @ 001724a1 */ std::__cxx11::string::string<std::allocator<char>>(local_88,"other_error",&local_89); /* try { // try from 001723fa to 00172406 has its CatchHandler @ 001724b5 */ nlohmann::json_abi_v3_11_3::detail::exception::name(local_68,local_88,local_14); /* try { // try from 00172409 to 00172418 has its CatchHandler @ 001724c9 */ nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_ (local_c0,(_func_decltype_nullptr *)0x0); /* try { // try from 0017241f to 00172432 has its CatchHandler @ 001724dd */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&> (local_48,(string *)local_68,(string *)local_c0,local_20); std::__cxx11::string::~string((string *)local_c0); std::__cxx11::string::~string((string *)local_68); std::__cxx11::string::~string(local_88); std::allocator<char>::~allocator((allocator<char> *)&local_89); iVar1 = local_14; pcVar2 = (char *)std::__cxx11::string::c_str(); /* try { // try from 00172481 to 00172485 has its CatchHandler @ 0017251b */ nlohmann::json_abi_v3_11_3::detail::other_error::other_error(param_1,iVar1,pcVar2); std::__cxx11::string::~string((string *)local_48); return param_1; }
49,964
testing::Message::operator<<(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
Message& Message::operator<<(const ::std::wstring& wstr) { internal::StreamWideCharsToMessage(wstr.c_str(), wstr.length(), this); return *this; }
O3
cpp
testing::Message::operator<<(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq 0x8(%rsi), %r15 testq %r15, %r15 je 0x1cb8b movq (%rsi), %r13 leaq 0x18(%rsp), %r12 xorl %ebp, %ebp leaq 0x8(%rsp), %r14 cmpl $0x0, (%r13,%rbp,4) je 0x1cb6a leaq (,%rbp,4), %rsi addq %r13, %rsi movl %r15d, %edx subl %ebp, %edx movq %r14, %rdi callq 0x1f17c movq (%rbx), %rdi addq $0x10, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x85b0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1cb58 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 cmpq %rbp, %r15 je 0x1cb8b cmpl $0x0, (%r13,%rbp,4) je 0x1cb86 incq %rbp jmp 0x1cb58 movq (%rbx), %rdi addq $0x10, %rdi movb $0x0, 0x8(%rsp) movl $0x1, %edx movq %r14, %rsi callq 0x85b0 incq %rbp cmpq %r15, %rbp jne 0x1cb0b movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x1cbb7 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990
_ZN7testing7MessagelsERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE: push rbp; int push r15; int push r14; int push r13; int push r12; int push rbx; char sub rsp, 28h mov rbx, rdi mov r15, [rsi+8] test r15, r15 jz loc_1CB8B mov r13, [rsi] lea r12, [rsp+58h+var_40] xor ebp, ebp lea r14, [rsp+58h+var_50] loc_1CB0B: cmp dword ptr [r13+rbp*4+0], 0 jz short loc_1CB6A lea rsi, ds:0[rbp*4] add rsi, r13 mov edx, r15d sub edx, ebp mov rdi, r14; int call _ZN7testing8internal16WideStringToUtf8B5cxx11EPKwi; testing::internal::WideStringToUtf8(wchar_t const*,int) mov rdi, [rbx] add rdi, 10h mov rsi, [rsp+58h+var_50] mov rdx, [rsp+58h+var_48] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+58h+var_50]; void * cmp rdi, r12 jz short loc_1CB58 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CB58: cmp r15, rbp jz short loc_1CB8B cmp dword ptr [r13+rbp*4+0], 0 jz short loc_1CB86 inc rbp jmp short loc_1CB58 loc_1CB6A: mov rdi, [rbx] add rdi, 10h mov byte ptr [rsp+58h+var_50], 0 mov edx, 1 mov rsi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) inc rbp loc_1CB86: cmp rbp, r15 jnz short loc_1CB0B loc_1CB8B: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_1CBB7 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1CBB7: mov rdi, rbx call __Unwind_Resume
operator<<: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R15,qword ptr [RSI + 0x8] TEST R15,R15 JZ 0x0011cb8b MOV R13,qword ptr [RSI] LEA R12,[RSP + 0x18] XOR EBP,EBP LEA R14,[RSP + 0x8] LAB_0011cb0b: CMP dword ptr [R13 + RBP*0x4],0x0 JZ 0x0011cb6a LEA RSI,[RBP*0x4] ADD RSI,R13 MOV EDX,R15D SUB EDX,EBP MOV RDI,R14 CALL 0x0011f17c MOV RDI,qword ptr [RBX] ADD RDI,0x10 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0011cb3c: CALL 0x001085b0 LAB_0011cb41: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0011cb58 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_0011cb58: CMP R15,RBP JZ 0x0011cb8b CMP dword ptr [R13 + RBP*0x4],0x0 JZ 0x0011cb86 INC RBP JMP 0x0011cb58 LAB_0011cb6a: MOV RDI,qword ptr [RBX] ADD RDI,0x10 MOV byte ptr [RSP + 0x8],0x0 MOV EDX,0x1 MOV RSI,R14 CALL 0x001085b0 INC RBP LAB_0011cb86: CMP RBP,R15 JNZ 0x0011cb0b LAB_0011cb8b: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::Message::TEMPNAMEPLACEHOLDERVALUE(std::__cxx11::wstring const&) */ Message * __thiscall testing::Message::operator<<(Message *this,wstring *param_1) { long lVar1; long lVar2; long lVar3; internal local_50; int7 uStack_4f; long local_48; long local_40 [2]; lVar1 = *(long *)(param_1 + 8); if (lVar1 != 0) { lVar2 = *(long *)param_1; lVar3 = 0; do { if (*(int *)(lVar2 + lVar3 * 4) == 0) { local_50 = (internal)0x0; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(*(long *)this + 0x10),(char *)&local_50,1); lVar3 = lVar3 + 1; } else { internal::WideStringToUtf8_abi_cxx11_ (&local_50,(wchar_t *)(lVar3 * 4 + lVar2),(int)lVar1 - (int)lVar3); /* try { // try from 0011cb3c to 0011cb40 has its CatchHandler @ 0011cb9d */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(*(long *)this + 0x10),(char *)CONCAT71(uStack_4f,local_50),local_48); if ((long *)CONCAT71(uStack_4f,local_50) != local_40) { operator_delete((long *)CONCAT71(uStack_4f,local_50),local_40[0] + 1); } while( true ) { if (lVar1 == lVar3) { return this; } if (*(int *)(lVar2 + lVar3 * 4) == 0) break; lVar3 = lVar3 + 1; } } } while (lVar3 != lVar1); } return this; }
49,965
pow5mult
eloqsql/strings/dtoa.c
static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc) { Bigint *b1, *p5, *p51=NULL; int i; static int p05[3]= { 5, 25, 125 }; my_bool overflow= FALSE; if ((i= k & 3)) b= multadd(b, p05[i-1], 0, alloc); if (!(k>>= 2)) return b; p5= p5_a; for (;;) { if (k & 1) { b1= mult(b, p5, alloc); Bfree(b, alloc); b= b1; } if (!(k>>= 1)) break; /* Calculate next power of 5 */ if (overflow) { p51= mult(p5, p5, alloc); Bfree(p5, alloc); p5= p51; } else if (p5 < p5_a + P5A_MAX) ++p5; else if (p5 == p5_a + P5A_MAX) { p5= mult(p5, p5, alloc); overflow= TRUE; } } if (p51) Bfree(p51, alloc); return b; }
O0
c
pow5mult: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq $0x0, -0x38(%rbp) movb $0x0, -0x3d(%rbp) movl -0x14(%rbp), %eax andl $0x3, %eax movl %eax, -0x3c(%rbp) cmpl $0x0, %eax je 0x41433 movq -0x10(%rbp), %rdi movl -0x3c(%rbp), %eax subl $0x1, %eax movslq %eax, %rcx leaq 0x1b8d5f(%rip), %rax # 0x1fa180 movl (%rax,%rcx,4), %esi movq -0x20(%rbp), %rcx xorl %edx, %edx callq 0x41d80 movq %rax, -0x10(%rbp) movl -0x14(%rbp), %eax sarl $0x2, %eax movl %eax, -0x14(%rbp) cmpl $0x0, %eax jne 0x4144e movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x41544 leaq 0x1b8d3b(%rip), %rax # 0x1fa190 movq %rax, -0x30(%rbp) movl -0x14(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x4148e movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x41550 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x417a0 movq -0x28(%rbp), %rax movq %rax, -0x10(%rbp) movl -0x14(%rbp), %eax sarl %eax movl %eax, -0x14(%rbp) cmpl $0x0, %eax jne 0x414a0 jmp 0x41528 cmpb $0x0, -0x3d(%rbp) je 0x414d2 movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x41550 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x417a0 movq -0x38(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x41523 leaq 0x1b8cb7(%rip), %rax # 0x1fa190 addq $0x90, %rax cmpq %rax, -0x30(%rbp) jae 0x414f3 movq -0x30(%rbp), %rax addq $0x18, %rax movq %rax, -0x30(%rbp) jmp 0x41521 leaq 0x1b8c96(%rip), %rax # 0x1fa190 addq $0x90, %rax cmpq %rax, -0x30(%rbp) jne 0x4151f movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x41550 movq %rax, -0x30(%rbp) movb $0x1, -0x3d(%rbp) jmp 0x41521 jmp 0x41523 jmp 0x41459 cmpq $0x0, -0x38(%rbp) je 0x4153c movq -0x38(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x417a0 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nop
pow5mult: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_38], 0 mov [rbp+var_3D], 0 mov eax, [rbp+var_14] and eax, 3 mov [rbp+var_3C], eax cmp eax, 0 jz short loc_41433 mov rdi, [rbp+var_10] mov eax, [rbp+var_3C] sub eax, 1 movsxd rcx, eax lea rax, pow5mult_p05 mov esi, [rax+rcx*4] mov rcx, [rbp+var_20] xor edx, edx call multadd mov [rbp+var_10], rax loc_41433: mov eax, [rbp+var_14] sar eax, 2 mov [rbp+var_14], eax cmp eax, 0 jnz short loc_4144E mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp loc_41544 loc_4144E: lea rax, p5_a mov [rbp+var_30], rax loc_41459: mov eax, [rbp+var_14] and eax, 1 cmp eax, 0 jz short loc_4148E mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] call mult mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call Bfree mov rax, [rbp+var_28] mov [rbp+var_10], rax loc_4148E: mov eax, [rbp+var_14] sar eax, 1 mov [rbp+var_14], eax cmp eax, 0 jnz short loc_414A0 jmp loc_41528 loc_414A0: cmp [rbp+var_3D], 0 jz short loc_414D2 mov rdi, [rbp+var_30] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] call mult mov [rbp+var_38], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_20] call Bfree mov rax, [rbp+var_38] mov [rbp+var_30], rax jmp short loc_41523 loc_414D2: lea rax, p5_a add rax, 90h cmp [rbp+var_30], rax jnb short loc_414F3 mov rax, [rbp+var_30] add rax, 18h mov [rbp+var_30], rax jmp short loc_41521 loc_414F3: lea rax, p5_a add rax, 90h cmp [rbp+var_30], rax jnz short loc_4151F mov rdi, [rbp+var_30] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] call mult mov [rbp+var_30], rax mov [rbp+var_3D], 1 loc_4151F: jmp short $+2 loc_41521: jmp short $+2 loc_41523: jmp loc_41459 loc_41528: cmp [rbp+var_38], 0 jz short loc_4153C mov rdi, [rbp+var_38] mov rsi, [rbp+var_20] call Bfree loc_4153C: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_41544: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long pow5mult(long long a1, int a2, long long a3) { char v4; // [rsp+3h] [rbp-3Dh] _BYTE v5[12]; // [rsp+4h] [rbp-3Ch] _UNKNOWN **v6; // [rsp+10h] [rbp-30h] long long v7; // [rsp+18h] [rbp-28h] int v9; // [rsp+2Ch] [rbp-14h] long long v10; // [rsp+30h] [rbp-10h] v10 = a1; *(_DWORD *)&v5[8] = 0; v4 = 0; *(_QWORD *)v5 = a2 & 3; if ( (a2 & 3) != 0 ) v10 = multadd(a1, pow5mult_p05[*(_DWORD *)v5 - 1], 0LL, a3); v9 = a2 >> 2; if ( !(a2 >> 2) ) return v10; v6 = &p5_a; while ( 1 ) { if ( (v9 & 1) != 0 ) { v7 = mult(v10, v6, a3); Bfree(v10, a3); v10 = v7; } v9 >>= 1; if ( !v9 ) break; if ( v4 ) { *(_QWORD *)&v5[4] = mult(v6, v6, a3); Bfree(v6, a3); v6 = *(_UNKNOWN ***)&v5[4]; } else if ( v6 >= &p5_a + 18 ) { if ( v6 == &p5_a + 18 ) { v6 = (_UNKNOWN **)mult(v6, v6, a3); v4 = 1; } } else { v6 += 3; } } if ( *(_QWORD *)&v5[4] ) Bfree(*(_QWORD *)&v5[4], a3); return v10; }
pow5mult: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x38],0x0 MOV byte ptr [RBP + -0x3d],0x0 MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x3 MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JZ 0x00141433 MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x1 MOVSXD RCX,EAX LEA RAX,[0x2fa180] MOV ESI,dword ptr [RAX + RCX*0x4] MOV RCX,qword ptr [RBP + -0x20] XOR EDX,EDX CALL 0x00141d80 MOV qword ptr [RBP + -0x10],RAX LAB_00141433: MOV EAX,dword ptr [RBP + -0x14] SAR EAX,0x2 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JNZ 0x0014144e MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x00141544 LAB_0014144e: LEA RAX,[0x2fa190] MOV qword ptr [RBP + -0x30],RAX LAB_00141459: MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x1 CMP EAX,0x0 JZ 0x0014148e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00141550 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001417a0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x10],RAX LAB_0014148e: MOV EAX,dword ptr [RBP + -0x14] SAR EAX,0x1 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JNZ 0x001414a0 JMP 0x00141528 LAB_001414a0: CMP byte ptr [RBP + -0x3d],0x0 JZ 0x001414d2 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00141550 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001417a0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x30],RAX JMP 0x00141523 LAB_001414d2: LEA RAX,[0x2fa190] ADD RAX,0x90 CMP qword ptr [RBP + -0x30],RAX JNC 0x001414f3 MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x18 MOV qword ptr [RBP + -0x30],RAX JMP 0x00141521 LAB_001414f3: LEA RAX,[0x2fa190] ADD RAX,0x90 CMP qword ptr [RBP + -0x30],RAX JNZ 0x0014151f MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00141550 MOV qword ptr [RBP + -0x30],RAX MOV byte ptr [RBP + -0x3d],0x1 LAB_0014151f: JMP 0x00141521 LAB_00141521: JMP 0x00141523 LAB_00141523: JMP 0x00141459 LAB_00141528: CMP qword ptr [RBP + -0x38],0x0 JZ 0x0014153c MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001417a0 LAB_0014153c: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_00141544: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 pow5mult(int8 param_1,uint param_2,int8 param_3) { bool bVar1; int8 uVar2; int1 *local_40; int1 *local_38; uint local_1c; int8 local_18; int8 local_10; local_40 = (int1 *)0x0; bVar1 = false; local_18 = param_1; if ((param_2 & 3) != 0) { local_18 = multadd(param_1,*(int4 *)(pow5mult_p05 + (long)(int)((param_2 & 3) - 1) * 4),0, param_3); } local_1c = (int)param_2 >> 2; if (local_1c == 0) { local_10 = local_18; } else { local_38 = p5_a; while( true ) { if ((local_1c & 1) != 0) { uVar2 = mult(local_18,local_38,param_3); Bfree(local_18,param_3); local_18 = uVar2; } local_1c = (int)local_1c >> 1; if (local_1c == 0) break; if (bVar1) { local_40 = (int1 *)mult(local_38,local_38,param_3); Bfree(local_38,param_3); local_38 = local_40; } else if (local_38 < (int1 *)0x2fa220) { local_38 = local_38 + 0x18; } else if (local_38 == (int1 *)0x2fa220) { local_38 = (int1 *)mult(0x2fa220,0x2fa220,param_3); bVar1 = true; } } if (local_40 != (int1 *)0x0) { Bfree(local_40,param_3); } local_10 = local_18; } return local_10; }
49,966
gzstreambase::gzstreambase(char const*, int)
iqtree3/utils/gzstream.cpp
gzstreambase::gzstreambase( const char* name, int mode) { init( &buf); open( name, mode); }
O3
cpp
gzstreambase::gzstreambase(char const*, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %ebp movq %rdx, %r14 movq %rdi, %r15 movq (%rsi), %rax movq %rax, (%rdi) movq 0x8(%rsi), %rcx movq -0x18(%rax), %rax movq %rcx, (%rdi,%rax) leaq 0x8(%rdi), %rbx movq 0xb74e(%rip), %rax # 0x34fb8 addq $0x10, %rax movq %rax, 0x8(%rdi) addq $0x40, %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x10(%r15) movups %xmm0, 0x20(%r15) movups %xmm0, 0x30(%r15) callq 0x15600 leaq 0xb434(%rip), %rax # 0x34cc8 movq %rax, 0x8(%r15) movb $0x0, 0x17f(%r15) leaq 0x50(%r15), %rax leaq 0x17e(%r15), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x188(%r15) movq %rax, 0x30(%r15) movq %rax, 0x28(%r15) movq %rcx, 0x38(%r15) leaq 0x54(%r15), %rax movq %rax, 0x10(%r15) movq %rax, 0x18(%r15) movq %rax, 0x20(%r15) movq (%r15), %rax movq -0x18(%rax), %rdi addq %r15, %rdi movq %rbx, %rsi callq 0x15420 movq %r15, %rdi movq %r14, %rsi movl %ebp, %edx callq 0x29910 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq %rbx, %rdi callq 0x1bdce movq %r14, %rdi callq 0x15580 nop
_ZN12gzstreambaseC2EPKci: push rbp push r15 push r14 push rbx push rax mov ebp, ecx mov r14, rdx mov r15, rdi mov rax, [rsi] mov [rdi], rax mov rcx, [rsi+8] mov rax, [rax-18h] mov [rdi+rax], rcx lea rbx, [rdi+8] mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rax, 10h mov [rdi+8], rax add rdi, 40h ; '@'; this xorps xmm0, xmm0 movups xmmword ptr [r15+10h], xmm0 movups xmmword ptr [r15+20h], xmm0 movups xmmword ptr [r15+30h], xmm0 call __ZNSt6localeC1Ev; std::locale::locale(void) lea rax, off_34CC8 mov [r15+8], rax mov byte ptr [r15+17Fh], 0 lea rax, [r15+50h] lea rcx, [r15+17Eh] xorps xmm0, xmm0 movups xmmword ptr [r15+188h], xmm0 mov [r15+30h], rax mov [r15+28h], rax mov [r15+38h], rcx lea rax, [r15+54h] mov [r15+10h], rax mov [r15+18h], rax mov [r15+20h], rax mov rax, [r15] mov rdi, [rax-18h] add rdi, r15 mov rsi, rbx call __ZNSt9basic_iosIcSt11char_traitsIcEE4initEPSt15basic_streambufIcS1_E; std::ios::init(std::streambuf *) mov rdi, r15; this mov rsi, r14; char * mov edx, ebp; int call _ZN12gzstreambase4openEPKci; gzstreambase::open(char const*,int) add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, rbx; this call _ZN11gzstreambufD2Ev; gzstreambuf::~gzstreambuf() mov rdi, r14 call __Unwind_Resume
void gzstreambase::gzstreambase(gzstreambase *this, const char *a2, const char *a3, int a4) { long long v6; // rax v6 = *(_QWORD *)a2; *(_QWORD *)this = *(_QWORD *)a2; *(_QWORD *)((char *)this + *(_QWORD *)(v6 - 24)) = *((_QWORD *)a2 + 1); *((_QWORD *)this + 1) = (char *)&`vtable for'std::streambuf + 16; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; std::locale::locale((gzstreambase *)((char *)this + 64)); *((_QWORD *)this + 1) = off_34CC8; *((_BYTE *)this + 383) = 0; *(_OWORD *)((char *)this + 392) = 0LL; *((_QWORD *)this + 6) = (char *)this + 80; *((_QWORD *)this + 5) = (char *)this + 80; *((_QWORD *)this + 7) = (char *)this + 382; *((_QWORD *)this + 2) = (char *)this + 84; *((_QWORD *)this + 3) = (char *)this + 84; *((_QWORD *)this + 4) = (char *)this + 84; std::ios::init((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL), (char *)this + 8); gzstreambase::open(this, a3, a4); }
gzstreambase: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ECX MOV R14,RDX MOV R15,RDI MOV RAX,qword ptr [RSI] MOV qword ptr [RDI],RAX MOV RCX,qword ptr [RSI + 0x8] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RDI + RAX*0x1],RCX LEA RBX,[RDI + 0x8] MOV RAX,qword ptr [0x00134fb8] ADD RAX,0x10 MOV qword ptr [RDI + 0x8],RAX ADD RDI,0x40 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x10],XMM0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 MOVUPS xmmword ptr [R15 + 0x30],XMM0 CALL 0x00115600 LEA RAX,[0x134cc8] MOV qword ptr [R15 + 0x8],RAX MOV byte ptr [R15 + 0x17f],0x0 LEA RAX,[R15 + 0x50] LEA RCX,[R15 + 0x17e] XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x188],XMM0 MOV qword ptr [R15 + 0x30],RAX MOV qword ptr [R15 + 0x28],RAX MOV qword ptr [R15 + 0x38],RCX LEA RAX,[R15 + 0x54] MOV qword ptr [R15 + 0x10],RAX MOV qword ptr [R15 + 0x18],RAX MOV qword ptr [R15 + 0x20],RAX MOV RAX,qword ptr [R15] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,R15 LAB_001298dc: MOV RSI,RBX CALL 0x00115420 MOV RDI,R15 MOV RSI,R14 MOV EDX,EBP CALL 0x00129910 LAB_001298f1: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* gzstreambase::gzstreambase(char const*, int) */ void __thiscall gzstreambase::gzstreambase(gzstreambase *this,char *param_1,int param_2) { gzstreambase *pgVar1; long lVar2; int in_ECX; int4 in_register_00000014; lVar2 = *(long *)param_1; *(long *)this = lVar2; *(int8 *)(this + *(long *)(lVar2 + -0x18)) = *(int8 *)(param_1 + 8); *(int **)(this + 8) = PTR_vtable_00134fb8 + 0x10; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; std::locale::locale((locale *)(this + 0x40)); *(int ***)(this + 8) = &PTR__gzstreambuf_00134cc8; this[0x17f] = (gzstreambase)0x0; *(int8 *)(this + 0x188) = 0; *(int8 *)(this + 400) = 0; *(gzstreambase **)(this + 0x30) = this + 0x50; *(gzstreambase **)(this + 0x28) = this + 0x50; *(gzstreambase **)(this + 0x38) = this + 0x17e; pgVar1 = this + 0x54; *(gzstreambase **)(this + 0x10) = pgVar1; *(gzstreambase **)(this + 0x18) = pgVar1; *(gzstreambase **)(this + 0x20) = pgVar1; /* try { // try from 001298dc to 001298f0 has its CatchHandler @ 001298fc */ std::ios::init((streambuf *)(this + *(long *)(*(long *)this + -0x18))); open(this,(char *)CONCAT44(in_register_00000014,param_2),in_ECX); return; }
49,967
ma_bitmap_end
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_end(MARIA_SHARE *share) { my_bool res; #ifndef DBUG_OFF if (! share->internal_table) mysql_mutex_assert_owner(&share->close_lock); #endif DBUG_ASSERT(share->bitmap.non_flushable == 0); DBUG_ASSERT(share->bitmap.flush_all_requested == 0); DBUG_ASSERT(share->bitmap.waiting_for_non_flushable == 0 && share->bitmap.waiting_for_flush_all_requested == 0); DBUG_ASSERT(share->bitmap.pinned_pages.elements == 0); res= _ma_bitmap_flush(share); mysql_mutex_destroy(&share->bitmap.bitmap_lock); mysql_cond_destroy(&share->bitmap.bitmap_cond); delete_dynamic(&share->bitmap.pinned_pages); my_free(share->bitmap.map); share->bitmap.map= 0; /* This is to not get an assert in checkpoint. The bitmap will be flushed at once by _ma_once_end_block_record() as part of the normal flush of the kfile. */ share->bitmap.changed_not_flushed= 0; return res; }
O0
c
ma_bitmap_end: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x42dce jmp 0x42dd0 jmp 0x42dd2 jmp 0x42dd4 jmp 0x42dd6 jmp 0x42dd8 jmp 0x42dda movq -0x8(%rbp), %rdi callq 0x42e60 movb %al, -0x9(%rbp) movq -0x8(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x88, %rdi callq 0x42f10 movq -0x8(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0xd0, %rdi callq 0x42f60 movq -0x8(%rbp), %rdi addq $0xa10, %rdi # imm = 0xA10 addq $0x140, %rdi # imm = 0x140 callq 0xdc180 movq -0x8(%rbp), %rax movq 0xa18(%rax), %rdi callq 0xf4f60 movq -0x8(%rbp), %rax movq $0x0, 0xa18(%rax) movq -0x8(%rbp), %rax movb $0x0, 0xa31(%rax) movb -0x9(%rbp), %al addq $0x10, %rsp popq %rbp retq nop
_ma_bitmap_end: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_42DCE: jmp short $+2 loc_42DD0: jmp short $+2 loc_42DD2: jmp short $+2 loc_42DD4: jmp short $+2 loc_42DD6: jmp short $+2 loc_42DD8: jmp short $+2 loc_42DDA: mov rdi, [rbp+var_8] call _ma_bitmap_flush mov [rbp+var_9], al mov rdi, [rbp+var_8] add rdi, 0A10h add rdi, 88h call inline_mysql_mutex_destroy_0 mov rdi, [rbp+var_8] add rdi, 0A10h add rdi, 0D0h call inline_mysql_cond_destroy mov rdi, [rbp+var_8] add rdi, 0A10h add rdi, 140h call delete_dynamic mov rax, [rbp+var_8] mov rdi, [rax+0A18h] call my_free mov rax, [rbp+var_8] mov qword ptr [rax+0A18h], 0 mov rax, [rbp+var_8] mov byte ptr [rax+0A31h], 0 mov al, [rbp+var_9] add rsp, 10h pop rbp retn
char ma_bitmap_end(long long a1) { char v2; // [rsp+7h] [rbp-9h] v2 = ma_bitmap_flush(a1); inline_mysql_mutex_destroy_0(a1 + 2712); inline_mysql_cond_destroy(a1 + 2784); delete_dynamic(a1 + 2896); my_free(*(_QWORD *)(a1 + 2584)); *(_QWORD *)(a1 + 2584) = 0LL; *(_BYTE *)(a1 + 2609) = 0; return v2; }
_ma_bitmap_end: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x00142dce LAB_00142dce: JMP 0x00142dd0 LAB_00142dd0: JMP 0x00142dd2 LAB_00142dd2: JMP 0x00142dd4 LAB_00142dd4: JMP 0x00142dd6 LAB_00142dd6: JMP 0x00142dd8 LAB_00142dd8: JMP 0x00142dda LAB_00142dda: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00142e60 MOV byte ptr [RBP + -0x9],AL MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xa10 ADD RDI,0x88 CALL 0x00142f10 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xa10 ADD RDI,0xd0 CALL 0x00142f60 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xa10 ADD RDI,0x140 CALL 0x001dc180 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0xa18] CALL 0x001f4f60 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa18],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xa31],0x0 MOV AL,byte ptr [RBP + -0x9] ADD RSP,0x10 POP RBP RET
int1 _ma_bitmap_end(long param_1) { int1 uVar1; uVar1 = _ma_bitmap_flush(param_1); inline_mysql_mutex_destroy(param_1 + 0xa98); inline_mysql_cond_destroy(param_1 + 0xae0); delete_dynamic(param_1 + 0xb50); my_free(*(int8 *)(param_1 + 0xa18)); *(int8 *)(param_1 + 0xa18) = 0; *(int1 *)(param_1 + 0xa31) = 0; return uVar1; }
49,968
minja::Value::operator/(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
Value operator/(const Value& rhs) const { if (is_number_integer() && rhs.is_number_integer()) return get<int64_t>() / rhs.get<int64_t>(); else return get<double>() / rhs.get<double>(); }
O2
cpp
minja::Value::operator/(minja::Value const&) const: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %r14 movq %rdi, %rbx movb 0x40(%rsi), %al addb $-0x5, %al cmpb $0x1, %al ja 0x70ac4 movb 0x40(%r14), %al addb $-0x5, %al cmpb $0x1, %al ja 0x70ac4 movq %rsi, %rdi callq 0x63168 movq %rax, %r15 movq %r14, %rdi callq 0x63168 movq %rax, %rcx movq %r15, %rax cqto idivq %rcx leaq 0x8(%rsp), %rsi movq %rax, (%rsi) movq %rbx, %rdi callq 0x6321e jmp 0x70af3 movq %rsi, %rdi callq 0x6323c movsd %xmm0, (%rsp) movq %r14, %rdi callq 0x6323c movsd (%rsp), %xmm1 divsd %xmm0, %xmm1 leaq 0x8(%rsp), %rsi movsd %xmm1, (%rsi) movq %rbx, %rdi callq 0x632f2 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZNK5minja5ValuedvERKS0_: push r15 push r14 push rbx sub rsp, 10h mov r14, rdx mov rbx, rdi mov al, [rsi+40h] add al, 0FBh cmp al, 1 ja short loc_70AC4 mov al, [r14+40h] add al, 0FBh cmp al, 1 ja short loc_70AC4 mov rdi, rsi call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov r15, rax mov rdi, r14 call _ZNK5minja5Value3getIlEET_v; minja::Value::get<long>(void) mov rcx, rax mov rax, r15 cqo idiv rcx lea rsi, [rsp+28h+var_20]; __int64 * mov [rsi], rax mov rdi, rbx; this call _ZN5minja5ValueC2ERKl; minja::Value::Value(long const&) jmp short loc_70AF3 loc_70AC4: mov rdi, rsi call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd [rsp+28h+var_28], xmm0 mov rdi, r14 call _ZNK5minja5Value3getIdEET_v; minja::Value::get<double>(void) movsd xmm1, [rsp+28h+var_28] divsd xmm1, xmm0 lea rsi, [rsp+28h+var_20]; double * movsd qword ptr [rsi], xmm1 mov rdi, rbx; this call _ZN5minja5ValueC2ERKd; minja::Value::Value(double const&) loc_70AF3: mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn
minja::Value * minja::Value::operator/(minja::Value *this, minja::Value *a2, minja::Value *a3, double a4) { long long v5; // r15 long long v7[4]; // [rsp+8h] [rbp-20h] BYREF if ( (unsigned __int8)(*((_BYTE *)a2 + 64) - 5) > 1u || (unsigned __int8)(*((_BYTE *)a3 + 64) - 5) > 1u ) { minja::Value::get<double>(a2); minja::Value::get<double>(a3); *(double *)v7 = a4 / a4; minja::Value::Value(this, (const double *)v7); } else { v5 = minja::Value::get<long>(a2); v7[0] = v5 / minja::Value::get<long>(a3); minja::Value::Value(this, v7); } return this; }
operator/: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RDX MOV RBX,RDI MOV AL,byte ptr [RSI + 0x40] ADD AL,0xfb CMP AL,0x1 JA 0x00170ac4 MOV AL,byte ptr [R14 + 0x40] ADD AL,0xfb CMP AL,0x1 JA 0x00170ac4 MOV RDI,RSI CALL 0x00163168 MOV R15,RAX MOV RDI,R14 CALL 0x00163168 MOV RCX,RAX MOV RAX,R15 CQO IDIV RCX LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],RAX MOV RDI,RBX CALL 0x0016321e JMP 0x00170af3 LAB_00170ac4: MOV RDI,RSI CALL 0x0016323c MOVSD qword ptr [RSP],XMM0 MOV RDI,R14 CALL 0x0016323c MOVSD XMM1,qword ptr [RSP] DIVSD XMM1,XMM0 LEA RSI,[RSP + 0x8] MOVSD qword ptr [RSI],XMM1 MOV RDI,RBX CALL 0x001632f2 LAB_00170af3: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* minja::Value::TEMPNAMEPLACEHOLDERVALUE(minja::Value const&) const */ Value * __thiscall minja::Value::operator/(Value *this,Value *param_1) { long lVar1; long lVar2; Value *in_RDX; double dVar3; double local_20; if (((byte)((char)param_1[0x40] - 5U) < 2) && ((byte)((char)in_RDX[0x40] - 5U) < 2)) { lVar1 = get<long>(param_1); lVar2 = get<long>(in_RDX); local_20 = (double)(lVar1 / lVar2); Value(this,(long *)&local_20); } else { dVar3 = get<double>(param_1); local_20 = get<double>(in_RDX); local_20 = dVar3 / local_20; Value(this,&local_20); } return this; }
49,969
YAML::Node::IsScalar() const
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/node.h
bool IsScalar() const { return Type() == NodeType::Scalar; }
O3
c
YAML::Node::IsScalar() const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 cmpb $0x0, (%rdi) je 0x9db88 movq 0x38(%r14), %rax testq %rax, %rax je 0x9db7e movq (%rax), %rax movq (%rax), %rcx cmpl $0x2, 0x10(%rcx) sete %al andb (%rcx), %al jmp 0x9db80 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x40, %edi callq 0x80f20 movq %rax, %rbx addq $0x8, %r14 movq %rax, %rdi movq %r14, %rsi callq 0x9b2ee leaq 0x1fc6cd(%rip), %rsi # 0x29a278 leaq 0x77c62(%rip), %rdx # 0x115814 movq %rbx, %rdi callq 0x83970 movq %rax, %r14 movq %rbx, %rdi callq 0x816f0 movq %r14, %rdi callq 0x83b70 nop
_ZNK4YAML4Node8IsScalarEv: push r14 push rbx push rax mov r14, rdi cmp byte ptr [rdi], 0 jz short loc_9DB88 mov rax, [r14+38h] test rax, rax jz short loc_9DB7E mov rax, [rax] mov rcx, [rax] cmp dword ptr [rcx+10h], 2 setz al and al, [rcx] jmp short loc_9DB80 loc_9DB7E: xor eax, eax loc_9DB80: add rsp, 8 pop rbx pop r14 retn loc_9DB88: mov edi, 40h ; '@'; thrown_size call ___cxa_allocate_exception mov rbx, rax add r14, 8 mov rdi, rax mov rsi, r14 call _ZN4YAML11InvalidNodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; YAML::InvalidNode::InvalidNode(std::string const&) lea rsi, _ZTIN4YAML11InvalidNodeE; lptinfo lea rdx, _ZN4YAML9ExceptionD2Ev; 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 YAML::Node::IsScalar(YAML::Node *this) { long long v1; // rax void *exception; // rbx int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d if ( !*(_BYTE *)this ) { exception = __cxa_allocate_exception(0x40uLL); YAML::InvalidNode::InvalidNode((_DWORD)exception, (_DWORD)this + 8, v4, v5, v6, v7); __cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::InvalidNode, YAML::Exception::~Exception); } v1 = *((_QWORD *)this + 7); if ( v1 ) return ***(_BYTE ***)v1 & (*(_DWORD *)(**(_QWORD **)v1 + 16LL) == 2); else return 0; }
IsScalar: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI CMP byte ptr [RDI],0x0 JZ 0x0019db88 MOV RAX,qword ptr [R14 + 0x38] TEST RAX,RAX JZ 0x0019db7e MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX] CMP dword ptr [RCX + 0x10],0x2 SETZ AL AND AL,byte ptr [RCX] JMP 0x0019db80 LAB_0019db7e: XOR EAX,EAX LAB_0019db80: ADD RSP,0x8 POP RBX POP R14 RET LAB_0019db88: MOV EDI,0x40 CALL 0x00180f20 MOV RBX,RAX ADD R14,0x8 LAB_0019db99: MOV RDI,RAX MOV RSI,R14 CALL 0x0019b2ee LAB_0019dba4: LEA RSI,[0x39a278] LEA RDX,[0x215814] MOV RDI,RBX CALL 0x00183970
/* YAML::Node::IsScalar() const */ int8 __thiscall YAML::Node::IsScalar(Node *this) { int8 *puVar1; byte *pbVar2; int8 uVar3; InvalidNode *this_00; if (*this != (Node)0x0) { if (*(int8 **)(this + 0x38) == (int8 *)0x0) { uVar3 = 0; } else { puVar1 = (int8 *)**(int8 **)(this + 0x38); pbVar2 = (byte *)*puVar1; uVar3 = CONCAT71((int7)((ulong)puVar1 >> 8),*(int *)(pbVar2 + 0x10) == 2 & *pbVar2); } return uVar3; } this_00 = (InvalidNode *)__cxa_allocate_exception(0x40); /* try { // try from 0019db99 to 0019dba3 has its CatchHandler @ 0019dbba */ InvalidNode::InvalidNode(this_00,(string *)(this + 8)); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,&InvalidNode::typeinfo,BadInsert::~BadInsert); }
49,970
mi_check_index_tuple
eloqsql/storage/myisam/mi_key.c
check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record) { int need_unpack= TRUE; check_result_t res= CHECK_POS; if (info->index_cond_func) { if (mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else if ((res= info->index_cond_func(info->index_cond_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } /* If we got an error, out-of-range condition, or ICP condition computed to FALSE - we don't need to check the Rowid Filter. */ if (res != CHECK_POS) return res; need_unpack= FALSE; } /* Check the Rowid Filter, if present */ if (mi_check_rowid_filter_is_active(info)) { /* Unpack the index tuple if we haven't done it already */ if (need_unpack && mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else { if ((res= info->rowid_filter_func(info->rowid_filter_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } } } return res; }
O3
c
mi_check_index_tuple: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movl %esi, %r15d movq %rdi, %rbx movq 0x340(%rdi), %r13 testq %r13, %r13 je 0x7ee93 movq %rbx, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x7ef16 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testl %eax, %eax jne 0x7ef04 movq 0x348(%rbx), %rdi callq *0x340(%rbx) cmpl $0x2, %eax je 0x7eec9 movl %eax, %r12d cmpl $0x1, %eax jne 0x7ef04 movq 0x358(%rbx), %rax movl $0x1, %r12d testq %rax, %rax je 0x7ef04 movq 0x360(%rbx), %rdi callq *%rax testl %eax, %eax je 0x7ef04 testq %r13, %r13 je 0x7eeec movq 0x360(%rbx), %rdi callq *0x350(%rbx) cmpl $0x2, %eax jne 0x7eee7 movq $-0x1, 0x170(%rbx) callq 0xa4ab2 movl $0x89, (%rax) movl $0x2, %r12d jmp 0x7ef04 movl %eax, %r12d jmp 0x7ef04 movq %rbx, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x7ef16 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testl %eax, %eax je 0x7eeb7 movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mi_check_index_tuple: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov r15d, esi mov rbx, rdi mov r13, [rdi+340h] test r13, r13 jz short loc_7EE93 mov rdi, rbx mov esi, r15d mov rdx, r14 call mi_unpack_index_tuple mov r12d, 0FFFFFFFFh test eax, eax jnz loc_7EF04 mov rdi, [rbx+348h] call qword ptr [rbx+340h] cmp eax, 2 jz short loc_7EEC9 mov r12d, eax cmp eax, 1 jnz short loc_7EF04 loc_7EE93: mov rax, [rbx+358h] mov r12d, 1 test rax, rax jz short loc_7EF04 mov rdi, [rbx+360h] call rax test eax, eax jz short loc_7EF04 test r13, r13 jz short loc_7EEEC loc_7EEB7: mov rdi, [rbx+360h] call qword ptr [rbx+350h] cmp eax, 2 jnz short loc_7EEE7 loc_7EEC9: mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 89h mov r12d, 2 jmp short loc_7EF04 loc_7EEE7: mov r12d, eax jmp short loc_7EF04 loc_7EEEC: mov rdi, rbx mov esi, r15d mov rdx, r14 call mi_unpack_index_tuple mov r12d, 0FFFFFFFFh test eax, eax jz short loc_7EEB7 loc_7EF04: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_check_index_tuple(long long a1, unsigned int a2, long long a3) { long long v5; // r13 unsigned int v6; // r12d long long v7; // rdi unsigned int v8; // eax unsigned int ( *v9)(_QWORD); // rax unsigned int v10; // eax v5 = *(_QWORD *)(a1 + 832); if ( v5 ) { v6 = -1; if ( (unsigned int)mi_unpack_index_tuple(a1, a2, a3) ) return v6; v7 = *(_QWORD *)(a1 + 840); v8 = (*(long long ( **)(long long))(a1 + 832))(v7); if ( v8 == 2 ) { LABEL_9: *(_QWORD *)(a1 + 368) = -1LL; *(_DWORD *)my_thread_var(v7) = 137; return 2; } v6 = v8; if ( v8 != 1 ) return v6; } v9 = *(unsigned int ( **)(_QWORD))(a1 + 856); v6 = 1; if ( v9 ) { if ( v9(*(_QWORD *)(a1 + 864)) ) { if ( v5 || (v6 = -1, !(unsigned int)mi_unpack_index_tuple(a1, a2, a3)) ) { v7 = *(_QWORD *)(a1 + 864); v10 = (*(long long ( **)(long long))(a1 + 848))(v7); if ( v10 != 2 ) return v10; goto LABEL_9; } } } return v6; }
mi_check_index_tuple: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15D,ESI MOV RBX,RDI MOV R13,qword ptr [RDI + 0x340] TEST R13,R13 JZ 0x0017ee93 MOV RDI,RBX MOV ESI,R15D MOV RDX,R14 CALL 0x0017ef16 MOV R12D,0xffffffff TEST EAX,EAX JNZ 0x0017ef04 MOV RDI,qword ptr [RBX + 0x348] CALL qword ptr [RBX + 0x340] CMP EAX,0x2 JZ 0x0017eec9 MOV R12D,EAX CMP EAX,0x1 JNZ 0x0017ef04 LAB_0017ee93: MOV RAX,qword ptr [RBX + 0x358] MOV R12D,0x1 TEST RAX,RAX JZ 0x0017ef04 MOV RDI,qword ptr [RBX + 0x360] CALL RAX TEST EAX,EAX JZ 0x0017ef04 TEST R13,R13 JZ 0x0017eeec LAB_0017eeb7: MOV RDI,qword ptr [RBX + 0x360] CALL qword ptr [RBX + 0x350] CMP EAX,0x2 JNZ 0x0017eee7 LAB_0017eec9: MOV qword ptr [RBX + 0x170],-0x1 CALL 0x001a4ab2 MOV dword ptr [RAX],0x89 MOV R12D,0x2 JMP 0x0017ef04 LAB_0017eee7: MOV R12D,EAX JMP 0x0017ef04 LAB_0017eeec: MOV RDI,RBX MOV ESI,R15D MOV RDX,R14 CALL 0x0017ef16 MOV R12D,0xffffffff TEST EAX,EAX JZ 0x0017eeb7 LAB_0017ef04: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int mi_check_index_tuple(long param_1,int4 param_2,int8 param_3) { long lVar1; int iVar2; int4 *puVar3; lVar1 = *(long *)(param_1 + 0x340); if (lVar1 != 0) { iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3); if (iVar2 != 0) { return -1; } iVar2 = (**(code **)(param_1 + 0x340))(*(int8 *)(param_1 + 0x348)); if (iVar2 == 2) goto LAB_0017eec9; if (iVar2 != 1) { return iVar2; } } if (*(code **)(param_1 + 0x358) == (code *)0x0) { return 1; } iVar2 = (**(code **)(param_1 + 0x358))(*(int8 *)(param_1 + 0x360)); if (iVar2 == 0) { return 1; } if ((lVar1 == 0) && (iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3), iVar2 != 0)) { return -1; } iVar2 = (**(code **)(param_1 + 0x350))(*(int8 *)(param_1 + 0x360)); if (iVar2 != 2) { return iVar2; } LAB_0017eec9: *(int8 *)(param_1 + 0x170) = 0xffffffffffffffff; puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; return 2; }
49,971
LefDefParser::lefiLayer::parseLEF58Layer()
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
void lefiLayer::parseLEF58Layer() { int i; if (lefData->versionNum < 5.7) return; for (i = 0; i < numProps_; i++) { if (strlen(names_[i]) == 10) { if (strcmp(names_[i], "LEF58_TYPE") == 0) parseLayerType(i); } } }
O0
cpp
LefDefParser::lefiLayer::parseLEF58Layer(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, (%rsp) leaq 0x77397(%rip), %rax # 0xa2740 movq (%rax), %rax movsd 0x49c7c(%rip), %xmm0 # 0x75030 ucomisd 0xb8(%rax), %xmm0 jbe 0x2b3c0 jmp 0x2b43a movl $0x0, 0xc(%rsp) movq (%rsp), %rcx movl 0xc(%rsp), %eax cmpl 0x350(%rcx), %eax jge 0x2b43a movq (%rsp), %rax movq 0x358(%rax), %rax movslq 0xc(%rsp), %rcx movq (%rax,%rcx,8), %rdi callq 0x20d0 cmpq $0xa, %rax jne 0x2b42b movq (%rsp), %rax movq 0x358(%rax), %rax movslq 0xc(%rsp), %rcx movq (%rax,%rcx,8), %rdi leaq 0x4e45f(%rip), %rsi # 0x79871 callq 0x2340 cmpl $0x0, %eax jne 0x2b429 movq (%rsp), %rdi movl 0xc(%rsp), %esi callq 0x2b000 jmp 0x2b42b jmp 0x2b42d movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x2b3c8 addq $0x18, %rsp retq nop
_ZN12LefDefParser9lefiLayer15parseLEF58LayerEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_18], rax lea rax, _ZN12LefDefParser7lefDataE; LefDefParser::lefData mov rax, [rax] movsd xmm0, cs:qword_75030 ucomisd xmm0, qword ptr [rax+0B8h] jbe short loc_2B3C0 jmp short loc_2B43A loc_2B3C0: mov [rsp+18h+var_C], 0 loc_2B3C8: mov rcx, [rsp+18h+var_18] mov eax, [rsp+18h+var_C] cmp eax, [rcx+350h] jge short loc_2B43A mov rax, [rsp+18h+var_18] mov rax, [rax+358h] movsxd rcx, [rsp+18h+var_C] mov rdi, [rax+rcx*8] call _strlen cmp rax, 0Ah jnz short loc_2B42B mov rax, [rsp+18h+var_18] mov rax, [rax+358h] movsxd rcx, [rsp+18h+var_C] mov rdi, [rax+rcx*8] lea rsi, aLef58Type; "LEF58_TYPE" call _strcmp cmp eax, 0 jnz short loc_2B429 mov rdi, [rsp+18h+var_18]; this mov esi, [rsp+18h+var_C]; int call _ZN12LefDefParser9lefiLayer14parseLayerTypeEi; LefDefParser::lefiLayer::parseLayerType(int) loc_2B429: jmp short $+2 loc_2B42B: jmp short $+2 loc_2B42D: mov eax, [rsp+18h+var_C] add eax, 1 mov [rsp+18h+var_C], eax jmp short loc_2B3C8 loc_2B43A: add rsp, 18h retn
long long LefDefParser::lefiLayer::parseLEF58Layer(LefDefParser::lefiLayer *this) { long long result; // rax int i; // [rsp+Ch] [rbp-Ch] result = LefDefParser::lefData; if ( *(double *)(LefDefParser::lefData + 184LL) >= 5.7 ) { for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= *((_DWORD *)this + 212) ) break; if ( strlen(*(_QWORD *)(*((_QWORD *)this + 107) + 8LL * i)) == 10 && !(unsigned int)strcmp(*(_QWORD *)(*((_QWORD *)this + 107) + 8LL * i), "LEF58_TYPE") ) { LefDefParser::lefiLayer::parseLayerType(this, i); } } } return result; }
parseLEF58Layer: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RAX LEA RAX,[0x1a2740] MOV RAX,qword ptr [RAX] MOVSD XMM0,qword ptr [0x00175030] UCOMISD XMM0,qword ptr [RAX + 0xb8] JBE 0x0012b3c0 JMP 0x0012b43a LAB_0012b3c0: MOV dword ptr [RSP + 0xc],0x0 LAB_0012b3c8: MOV RCX,qword ptr [RSP] MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RCX + 0x350] JGE 0x0012b43a MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x358] MOVSXD RCX,dword ptr [RSP + 0xc] MOV RDI,qword ptr [RAX + RCX*0x8] CALL 0x001020d0 CMP RAX,0xa JNZ 0x0012b42b MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x358] MOVSXD RCX,dword ptr [RSP + 0xc] MOV RDI,qword ptr [RAX + RCX*0x8] LEA RSI,[0x179871] CALL 0x00102340 CMP EAX,0x0 JNZ 0x0012b429 MOV RDI,qword ptr [RSP] MOV ESI,dword ptr [RSP + 0xc] CALL 0x0012b000 LAB_0012b429: JMP 0x0012b42b LAB_0012b42b: JMP 0x0012b42d LAB_0012b42d: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x0012b3c8 LAB_0012b43a: ADD RSP,0x18 RET
/* LefDefParser::lefiLayer::parseLEF58Layer() */ void __thiscall LefDefParser::lefiLayer::parseLEF58Layer(lefiLayer *this) { int iVar1; size_t sVar2; int local_c; if (DAT_00175030 < *(double *)(lefData + 0xb8) || DAT_00175030 == *(double *)(lefData + 0xb8)) { for (local_c = 0; local_c < *(int *)(this + 0x350); local_c = local_c + 1) { sVar2 = strlen(*(char **)(*(long *)(this + 0x358) + (long)local_c * 8)); if ((sVar2 == 10) && (iVar1 = strcmp(*(char **)(*(long *)(this + 0x358) + (long)local_c * 8),"LEF58_TYPE"), iVar1 == 0)) { parseLayerType(this,local_c); } } } return; }
49,972
my_instr_bin
eloqsql/strings/ctype-bin.c
static uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) { register const uchar *str, *search, *end, *search_end; if (s_length <= b_length) { if (!s_length) { if (nmatch) { match->beg= 0; match->end= 0; match->mb_len= 0; } return 1; /* Empty string is always found */ } str= (const uchar*) b; search= (const uchar*) s; end= (const uchar*) b+b_length-s_length+1; search_end= (const uchar*) s + s_length; skip: while (str != end) { if ( (*str++) == (*search)) { register const uchar *i,*j; i= str; j= search+1; while (j != search_end) if ((*i++) != (*j++)) goto skip; if (nmatch > 0) { match[0].beg= 0; match[0].end= (uint) (str- (const uchar*)b-1); match[0].mb_len= match[0].end; if (nmatch > 1) { match[1].beg= match[0].end; match[1].end= (uint)(match[0].end+s_length); match[1].mb_len= match[1].end-match[1].beg; } } return 2; } } } return 0; }
O3
c
my_instr_bin: xorl %eax, %eax cmpq %rdx, %r8 ja 0x3371e pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx movl 0x10(%rbp), %r10d testq %r8, %r8 je 0x336e9 addq %rsi, %rdx subq %r8, %rdx incq %rdx movq %rsi, %rdi cmpq %rdx, %rdi je 0x33718 movq %rdi, %r11 incq %rdi movb (%r11), %bl cmpb (%rcx), %bl jne 0x33680 movl $0x1, %ebx cmpq %rbx, %r8 je 0x336b3 movb (%r11,%rbx), %r14b leaq 0x1(%rbx), %r15 cmpb (%rcx,%rbx), %r14b movq %r15, %rbx je 0x3369b jmp 0x33680 movl $0x2, %eax testl %r10d, %r10d je 0x33718 movl $0x0, (%r9) notl %esi addl %esi, %edi movl %edi, 0x4(%r9) movl %edi, 0x8(%r9) cmpl $0x1, %r10d je 0x33718 movl %edi, 0xc(%r9) addl %r8d, %edi movl $0x14, %ecx movl $0x10, %edx jmp 0x33709 testl %r10d, %r10d je 0x33713 movl $0x0, (%r9) movl $0x1, %eax movl $0x8, %ecx xorl %edi, %edi movl $0x4, %edx xorl %r8d, %r8d movl %edi, (%r9,%rdx) movl %r8d, (%r9,%rcx) jmp 0x33718 movl $0x1, %eax popq %rbx popq %r14 popq %r15 popq %rbp retq
my_instr_bin: xor eax, eax cmp r8, rdx ja locret_3371E push rbp mov rbp, rsp push r15 push r14 push rbx mov r10d, [rbp+10h] test r8, r8 jz short loc_336E9 add rdx, rsi sub rdx, r8 inc rdx mov rdi, rsi loc_33680: cmp rdi, rdx jz loc_33718 mov r11, rdi inc rdi mov bl, [r11] cmp bl, [rcx] jnz short loc_33680 mov ebx, 1 loc_3369B: cmp r8, rbx jz short loc_336B3 mov r14b, [r11+rbx] lea r15, [rbx+1] cmp r14b, [rcx+rbx] mov rbx, r15 jz short loc_3369B jmp short loc_33680 loc_336B3: mov eax, 2 test r10d, r10d jz short loc_33718 mov dword ptr [r9], 0 not esi add edi, esi mov [r9+4], edi mov [r9+8], edi cmp r10d, 1 jz short loc_33718 mov [r9+0Ch], edi add edi, r8d mov ecx, 14h mov edx, 10h jmp short loc_33709 loc_336E9: test r10d, r10d jz short loc_33713 mov dword ptr [r9], 0 mov eax, 1 mov ecx, 8 xor edi, edi mov edx, 4 xor r8d, r8d loc_33709: mov [r9+rdx], edi mov [r9+rcx], r8d jmp short loc_33718 loc_33713: mov eax, 1 loc_33718: pop rbx pop r14 pop r15 pop rbp locret_3371E: retn
long long my_instr_bin( long long a1, _BYTE *a2, unsigned long long a3, _BYTE *a4, unsigned long long a5, _DWORD *a6, int a7) { long long result; // rax long long v8; // rdx _BYTE *v9; // rdi _BYTE *v10; // r11 long long v11; // rbx bool v12; // zf int v13; // edi int v14; // edi long long v15; // rcx long long v16; // rdx result = 0LL; if ( a5 <= a3 ) { if ( a5 ) { v8 = (long long)&a2[a3 - a5 + 1]; v9 = a2; LABEL_4: while ( v9 != (_BYTE *)v8 ) { v10 = v9++; if ( *v10 == *a4 ) { v11 = 1LL; while ( a5 != v11 ) { v12 = v10[v11] == a4[v11]; ++v11; if ( !v12 ) goto LABEL_4; } result = 2LL; if ( a7 ) { *a6 = 0; v13 = ~(_DWORD)a2 + (_DWORD)v9; a6[1] = v13; a6[2] = v13; if ( a7 != 1 ) { a6[3] = v13; v14 = a5 + v13; v15 = 5LL; v16 = 4LL; goto LABEL_15; } } return result; } } } else if ( a7 ) { *a6 = 0; result = 1LL; v15 = 2LL; v14 = 0; v16 = 1LL; LODWORD(a5) = 0; LABEL_15: a6[v16] = v14; a6[v15] = a5; } else { return 1LL; } } return result; }
my_instr_bin: XOR EAX,EAX CMP R8,RDX JA 0x0013371e PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX MOV R10D,dword ptr [RBP + 0x10] TEST R8,R8 JZ 0x001336e9 ADD RDX,RSI SUB RDX,R8 INC RDX MOV RDI,RSI LAB_00133680: CMP RDI,RDX JZ 0x00133718 MOV R11,RDI INC RDI MOV BL,byte ptr [R11] CMP BL,byte ptr [RCX] JNZ 0x00133680 MOV EBX,0x1 LAB_0013369b: CMP R8,RBX JZ 0x001336b3 MOV R14B,byte ptr [R11 + RBX*0x1] LEA R15,[RBX + 0x1] CMP R14B,byte ptr [RCX + RBX*0x1] MOV RBX,R15 JZ 0x0013369b JMP 0x00133680 LAB_001336b3: MOV EAX,0x2 TEST R10D,R10D JZ 0x00133718 MOV dword ptr [R9],0x0 NOT ESI ADD EDI,ESI MOV dword ptr [R9 + 0x4],EDI MOV dword ptr [R9 + 0x8],EDI CMP R10D,0x1 JZ 0x00133718 MOV dword ptr [R9 + 0xc],EDI ADD EDI,R8D MOV ECX,0x14 MOV EDX,0x10 JMP 0x00133709 LAB_001336e9: TEST R10D,R10D JZ 0x00133713 MOV dword ptr [R9],0x0 MOV EAX,0x1 MOV ECX,0x8 XOR EDI,EDI MOV EDX,0x4 XOR R8D,R8D LAB_00133709: MOV dword ptr [R9 + RDX*0x1],EDI MOV dword ptr [R9 + RCX*0x1],R8D JMP 0x00133718 LAB_00133713: MOV EAX,0x1 LAB_00133718: POP RBX POP R14 POP R15 POP RBP LAB_0013371e: RET
int8 my_instr_bin(int8 param_1,char *param_2,ulong param_3,char *param_4,ulong param_5, int4 *param_6,int param_7) { char *pcVar1; char *pcVar2; int8 uVar3; long lVar4; long lVar5; ulong uVar6; int iVar7; char *pcVar8; char *pcVar9; uVar3 = 0; if (param_5 <= param_3) { if (param_5 == 0) { if (param_7 == 0) { uVar3 = 1; } else { *param_6 = 0; uVar3 = 1; lVar4 = 8; iVar7 = 0; lVar5 = 4; param_5 = 0; LAB_00133709: *(int *)((long)param_6 + lVar5) = iVar7; *(int *)((long)param_6 + lVar4) = (int)param_5; } } else { pcVar9 = param_2; while (pcVar8 = pcVar9, pcVar8 != param_2 + (param_3 - param_5) + 1) { pcVar9 = pcVar8 + 1; if (*pcVar8 == *param_4) { uVar6 = 1; do { if (param_5 == uVar6) { uVar3 = 2; if (param_7 == 0) { return 2; } *param_6 = 0; iVar7 = (int)pcVar9 + ~(uint)param_2; param_6[1] = iVar7; param_6[2] = iVar7; if (param_7 == 1) { return 2; } param_6[3] = iVar7; iVar7 = iVar7 + (int)param_5; lVar4 = 0x14; lVar5 = 0x10; goto LAB_00133709; } pcVar1 = pcVar8 + uVar6; pcVar2 = param_4 + uVar6; uVar6 = uVar6 + 1; } while (*pcVar1 == *pcVar2); } } } } return uVar3; }
49,973
mi_state_info_read_dsk
eloqsql/storage/myisam/mi_open.c
uint mi_state_info_read_dsk(File file, MI_STATE_INFO *state, my_bool pRead) { uchar buff[MI_STATE_INFO_SIZE + MI_STATE_EXTRA_SIZE]; if (!myisam_single_user) { if (pRead) { if (mysql_file_pread(file, buff, state->state_length, 0L, MYF(MY_NABP))) return 1; } else if (mysql_file_read(file, buff, state->state_length, MYF(MY_NABP))) return 1; mi_state_info_read(buff, state); } return 0; }
O3
c
mi_state_info_read_dsk: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2388, %rsp # imm = 0x2388 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq 0xb7f46e(%rip), %rcx # 0xbff49a xorl %eax, %eax cmpb $0x0, (%rcx) jne 0x800e4 movq %rsi, %rbx movl %edi, %r15d movl 0xf8(%rsi), %r14d leaq 0x305fc5(%rip), %r13 # 0x386010 testb %dl, %dl je 0x8008d movq (%r13), %rax leaq -0x23a8(%rbp), %rdi movl %r15d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x80109 leaq -0x2360(%rbp), %rsi movl $0x4, %r8d movl %r15d, %edi movq %r14, %rdx xorl %ecx, %ecx callq 0xa0664 jmp 0x800c6 movq (%r13), %rax leaq -0x23a8(%rbp), %rdi movl %r15d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x8014f leaq -0x2360(%rbp), %rsi movl $0x4, %ecx movl %r15d, %edi movq %r14, %rdx callq 0xa09a4 movq %rax, %r15 movl $0x1, %eax testq %r15, %r15 jne 0x800e4 leaq -0x2360(%rbp), %rdi movq %rbx, %rsi callq 0x7f233 xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x801a3 addq $0x2388, %rsp # imm = 0x2388 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r12 movq (%r13), %rax leaq 0x5b85a(%rip), %rdx # 0xdb971 movq %r12, %rdi movq %r14, %rsi movl $0x418, %ecx # imm = 0x418 callq *0x210(%rax) leaq -0x2360(%rbp), %rsi movl $0x4, %r8d movl %r15d, %edi movq %r14, %rdx xorl %ecx, %ecx callq 0xa0664 movq %rax, %r15 testq %rax, %rax movl $0x0, %esi jmp 0x8018d movq %rax, %r12 movq (%r13), %rax leaq 0x5b814(%rip), %rdx # 0xdb971 movq %r12, %rdi movq %r14, %rsi movl $0x41b, %ecx # imm = 0x41B callq *0x210(%rax) leaq -0x2360(%rbp), %rsi movl $0x4, %ecx movl %r15d, %edi movq %r14, %rdx callq 0xa09a4 movq %rax, %r15 xorl %esi, %esi testq %rax, %rax cmoveq %r14, %rsi movq (%r13), %rax movq %r12, %rdi callq *0x218(%rax) jmp 0x800c9 callq 0x29250
mi_state_info_read_dsk: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2388h mov rax, fs:28h mov [rbp+var_30], rax lea rcx, myisam_single_user xor eax, eax cmp byte ptr [rcx], 0 jnz loc_800E4 mov rbx, rsi mov r15d, edi mov r14d, [rsi+0F8h] lea r13, PSI_server test dl, dl jz short loc_8008D mov rax, [r13+0] lea rdi, [rbp+var_23A8] mov esi, r15d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_80109 lea rsi, [rbp+var_2360] mov r8d, 4 mov edi, r15d mov rdx, r14 xor ecx, ecx call my_pread jmp short loc_800C6 loc_8008D: mov rax, [r13+0] lea rdi, [rbp+var_23A8] mov esi, r15d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_8014F lea rsi, [rbp+var_2360] mov ecx, 4 mov edi, r15d mov rdx, r14 call my_read loc_800C6: mov r15, rax loc_800C9: mov eax, 1 test r15, r15 jnz short loc_800E4 lea rdi, [rbp+var_2360] mov rsi, rbx call mi_state_info_read xor eax, eax loc_800E4: mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz loc_801A3 add rsp, 2388h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_80109: mov r12, rax mov rax, [r13+0] lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov rsi, r14 mov ecx, 418h call qword ptr [rax+210h] lea rsi, [rbp+var_2360] mov r8d, 4 mov edi, r15d mov rdx, r14 xor ecx, ecx call my_pread mov r15, rax test rax, rax mov esi, 0 jmp short loc_8018D loc_8014F: mov r12, rax mov rax, [r13+0] lea rdx, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov rsi, r14 mov ecx, 41Bh call qword ptr [rax+210h] lea rsi, [rbp+var_2360] mov ecx, 4 mov edi, r15d mov rdx, r14 call my_read mov r15, rax xor esi, esi test rax, rax loc_8018D: cmovz rsi, r14 mov rax, [r13+0] mov rdi, r12 call qword ptr [rax+218h] jmp loc_800C9 loc_801A3: call ___stack_chk_fail
long long mi_state_info_read_dsk(unsigned int a1, long long a2, char a3) { long long result; // rax long long v5; // r14 long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // r15 long long v10; // r12 bool v11; // zf long long v12; // rsi _BYTE v13[72]; // [rsp+8h] [rbp-23A8h] BYREF _BYTE v14[9008]; // [rsp+50h] [rbp-2360h] BYREF unsigned long long v15; // [rsp+2380h] [rbp-30h] v15 = __readfsqword(0x28u); result = 0LL; if ( !myisam_single_user ) { v5 = *(unsigned int *)(a2 + 248); if ( a3 ) { v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, a1, 6LL); if ( !v6 ) { v7 = my_pread(a1, v14, v5, 0LL, 4LL); LABEL_7: v9 = v7; LABEL_8: result = 1LL; if ( !v9 ) { mi_state_info_read((long long)v14, a2); return 0LL; } return result; } v10 = v6; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v6, v5, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 1048LL); v9 = my_pread(a1, v14, v5, 0LL, 4LL); v11 = v9 == 0; v12 = 0LL; } else { v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v13, a1, 6LL); if ( !v8 ) { v7 = my_read(a1, v14, v5, 4LL); goto LABEL_7; } v10 = v8; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v8, v5, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 1051LL); v9 = my_read(a1, v14, v5, 4LL); v12 = 0LL; v11 = v9 == 0; } if ( v11 ) v12 = v5; ((void ( *)(long long, long long))PSI_server[67])(v10, v12); goto LABEL_8; } return result; }
mi_state_info_read_dsk: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2388 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RCX,[0xcff49a] XOR EAX,EAX CMP byte ptr [RCX],0x0 JNZ 0x001800e4 MOV RBX,RSI MOV R15D,EDI MOV R14D,dword ptr [RSI + 0xf8] LEA R13,[0x486010] TEST DL,DL JZ 0x0018008d MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x23a8] MOV ESI,R15D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00180109 LEA RSI,[RBP + -0x2360] MOV R8D,0x4 MOV EDI,R15D MOV RDX,R14 XOR ECX,ECX CALL 0x001a0664 JMP 0x001800c6 LAB_0018008d: MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x23a8] MOV ESI,R15D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0018014f LEA RSI,[RBP + -0x2360] MOV ECX,0x4 MOV EDI,R15D MOV RDX,R14 CALL 0x001a09a4 LAB_001800c6: MOV R15,RAX LAB_001800c9: MOV EAX,0x1 TEST R15,R15 JNZ 0x001800e4 LEA RDI,[RBP + -0x2360] MOV RSI,RBX CALL 0x0017f233 XOR EAX,EAX LAB_001800e4: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x001801a3 ADD RSP,0x2388 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00180109: MOV R12,RAX MOV RAX,qword ptr [R13] LEA RDX,[0x1db971] MOV RDI,R12 MOV RSI,R14 MOV ECX,0x418 CALL qword ptr [RAX + 0x210] LEA RSI,[RBP + -0x2360] MOV R8D,0x4 MOV EDI,R15D MOV RDX,R14 XOR ECX,ECX CALL 0x001a0664 MOV R15,RAX TEST RAX,RAX MOV ESI,0x0 JMP 0x0018018d LAB_0018014f: MOV R12,RAX MOV RAX,qword ptr [R13] LEA RDX,[0x1db971] MOV RDI,R12 MOV RSI,R14 MOV ECX,0x41b CALL qword ptr [RAX + 0x210] LEA RSI,[RBP + -0x2360] MOV ECX,0x4 MOV EDI,R15D MOV RDX,R14 CALL 0x001a09a4 MOV R15,RAX XOR ESI,ESI TEST RAX,RAX LAB_0018018d: CMOVZ RSI,R14 MOV RAX,qword ptr [R13] MOV RDI,R12 CALL qword ptr [RAX + 0x218] JMP 0x001800c9 LAB_001801a3: CALL 0x00129250
int8 mi_state_info_read_dsk(int4 param_1,long param_2,char param_3) { int4 uVar1; long lVar2; long lVar3; int8 uVar4; int4 uVar5; long in_FS_OFFSET; int1 local_23b0 [72]; int1 local_2368 [9008]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = 0; if (myisam_single_user != '\0') goto LAB_001800e4; uVar1 = *(int4 *)(param_2 + 0xf8); if (param_3 == '\0') { lVar2 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,6); if (lVar2 != 0) { (**(code **)(PSI_server + 0x210)) (lVar2,uVar1,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x41b); lVar3 = my_read(param_1,local_2368,uVar1,4); goto LAB_0018018d; } lVar3 = my_read(param_1,local_2368,uVar1,4); } else { lVar2 = (**(code **)(PSI_server + 0x158))(local_23b0,param_1,6); if (lVar2 == 0) { lVar3 = my_pread(param_1,local_2368,uVar1,0,4); } else { (**(code **)(PSI_server + 0x210)) (lVar2,uVar1,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 0x418); lVar3 = my_pread(param_1,local_2368,uVar1,0,4); LAB_0018018d: uVar5 = 0; if (lVar3 == 0) { uVar5 = uVar1; } (**(code **)(PSI_server + 0x218))(lVar2,uVar5); } } uVar4 = 1; if (lVar3 == 0) { mi_state_info_read(local_2368,param_2); uVar4 = 0; } LAB_001800e4: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
49,974
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&)
monkey531[P]llama/common/minja.hpp
Value(const std::shared_ptr<CallableType> & callable) : object_(std::make_shared<ObjectType>()), callable_(callable) {}
O2
cpp
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx addq $0x20, %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rbx) movups %xmm0, (%rbx) callq 0x734d0 leaq 0x30(%rbx), %rdi movq %r14, %rsi callq 0x74512 addq $0x40, %rbx movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x4901c movq %rax, %r14 leaq 0x18(%rbx), %rdi callq 0x5b5b4 addq $0x8, %rbx movq %rbx, %rdi callq 0x6fa7e movq %r14, %rdi callq 0x25010
_ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi add rdi, 20h ; ' ' xorps xmm0, xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx], xmm0 call _ZSt11make_sharedIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEEJEESt10shared_ptrIT_EDpOT0_; std::make_shared<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>() lea rdi, [rbx+30h] mov rsi, r14 call _ZNSt12__shared_ptrISt8functionIFN5minja5ValueERKSt10shared_ptrINS1_7ContextEERNS1_14ArgumentsValueEEELN9__gnu_cxx12_Lock_policyE2EEC2ERKSE_; std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2> const&) add rbx, 40h ; '@' mov rdi, rbx xor esi, esi add rsp, 8 pop rbx pop r14 jmp _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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(decltype(nullptr)) mov r14, rax lea rdi, [rbx+18h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() add rbx, 8 mov rdi, rbx call _ZNSt12__weak_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__weak_count<(__gnu_cxx::_Lock_policy)2>::~__weak_count() mov rdi, r14 call __Unwind_Resume
long long minja::Value::Value(long long a1, _QWORD *a2) { *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; std::make_shared<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>>>>(a1 + 32); std::__shared_ptr<std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>,(__gnu_cxx::_Lock_policy)2>::__shared_ptr( (_QWORD *)(a1 + 48), a2); return 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 + 64); }
Value: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI ADD RDI,0x20 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_0017b9fc: CALL 0x001734d0 LAB_0017ba01: LEA RDI,[RBX + 0x30] MOV RSI,R14 CALL 0x00174512 ADD RBX,0x40 MOV RDI,RBX XOR ESI,ESI ADD RSP,0x8 POP RBX POP R14 JMP 0x0014901c
/* minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> > const&) */ void __thiscall minja::Value::Value(Value *this,shared_ptr *param_1) { *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; /* try { // try from 0017b9fc to 0017ba00 has its CatchHandler @ 0017ba22 */ std:: make_shared<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>>>> (); std:: __shared_ptr<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>,(__gnu_cxx::_Lock_policy)2> ::__shared_ptr((__shared_ptr<std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>,(__gnu_cxx::_Lock_policy)2> *)(this + 0x30),(__shared_ptr *)param_1); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json((_func_decltype_nullptr *)(this + 0x40)); return; }
49,975
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&)
monkey531[P]llama/common/minja.hpp
Value(const std::shared_ptr<CallableType> & callable) : object_(std::make_shared<ObjectType>()), callable_(callable) {}
O3
cpp
minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)>> const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movl $0x30, %edi callq 0x1b8d0 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x953a1(%rip), %rcx # 0x139438 addq $0x10, %rcx movq %rcx, (%rax) movq %rax, %rcx addq $0x10, %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movq $0x0, 0x20(%rax) movq %rax, 0x28(%rbx) movq %rcx, 0x20(%rbx) movq (%r14), %rax movq %rax, 0x30(%rbx) movq 0x8(%r14), %rax movq %rax, 0x38(%rbx) testq %rax, %rax je 0xa40e5 movq 0x96ea9(%rip), %rcx # 0x13af80 cmpb $0x0, (%rcx) je 0xa40e1 incl 0x8(%rax) jmp 0xa40e5 lock incl 0x8(%rax) leaq 0x40(%rbx), %r14 movb $0x0, 0x40(%rbx) movq $0x0, 0x48(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x66666 movq %r14, %rdi movl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x66666 movq %rax, %r14 movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0xa4127 callq 0x7b578 movq %rbx, %rdi callq 0x95432 movq %r14, %rdi callq 0x1c020 nop
_ZN5minja5ValueC2ERKSt10shared_ptrISt8functionIFS0_RKS1_INS_7ContextEERNS_14ArgumentsValueEEEE: push r14 push rbx push rax mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, _ZTVSt23_Sp_counted_ptr_inplaceIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEESaISN_ELN9__gnu_cxx12_Lock_policyE2EE; `vtable for'std::_Sp_counted_ptr_inplace<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,std::allocator<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>>,(__gnu_cxx::_Lock_policy)2> add rcx, 10h mov [rax], rcx mov rcx, rax add rcx, 10h xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov qword ptr [rax+20h], 0 mov [rbx+28h], rax mov [rbx+20h], rcx mov rax, [r14] mov [rbx+30h], rax mov rax, [r14+8] mov [rbx+38h], rax test rax, rax jz short loc_A40E5 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_A40E1 inc dword ptr [rax+8] jmp short loc_A40E5 loc_A40E1: lock inc dword ptr [rax+8] loc_A40E5: lea r14, [rbx+40h] mov byte ptr [rbx+40h], 0 mov qword ptr [rbx+48h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 add rsp, 8 pop rbx pop r14 jmp _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov r14, rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_A4127 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_A4127: mov rdi, rbx call _ZNSt23enable_shared_from_thisIN5minja5ValueEED2Ev; std::enable_shared_from_this<minja::Value>::~enable_shared_from_this() mov rdi, r14 call __Unwind_Resume
long long minja::Value::Value(long long a1, _QWORD *a2) { long long v2; // rax long long result; // rax *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; v2 = operator new(0x30uLL); *(_QWORD *)(v2 + 8) = 0x100000001LL; *(_QWORD *)v2 = &`vtable for'std::_Sp_counted_ptr_inplace<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>>>,std::allocator<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>>>>,(__gnu_cxx::_Lock_policy)2> + 2; *(_OWORD *)(v2 + 16) = 0LL; *(_QWORD *)(v2 + 32) = 0LL; *(_QWORD *)(a1 + 40) = v2; *(_QWORD *)(a1 + 32) = v2 + 16; *(_QWORD *)(a1 + 48) = *a2; result = a2[1]; *(_QWORD *)(a1 + 56) = result; if ( result ) { if ( _libc_single_threaded ) ++*(_DWORD *)(result + 8); else _InterlockedIncrement((volatile signed __int32 *)(result + 8)); } *(_BYTE *)(a1 + 64) = 0; *(_QWORD *)(a1 + 72) = 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 + 64)); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); return result; }
Value: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_001a4078: MOV EDI,0x30 CALL 0x0011b8d0 LAB_001a4082: MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x239438] ADD RCX,0x10 MOV qword ptr [RAX],RCX MOV RCX,RAX ADD RCX,0x10 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV qword ptr [RAX + 0x20],0x0 MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x20],RCX MOV RAX,qword ptr [R14] MOV qword ptr [RBX + 0x30],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RBX + 0x38],RAX TEST RAX,RAX JZ 0x001a40e5 MOV RCX,qword ptr [0x0023af80] CMP byte ptr [RCX],0x0 JZ 0x001a40e1 INC dword ptr [RAX + 0x8] JMP 0x001a40e5 LAB_001a40e1: INC.LOCK dword ptr [RAX + 0x8] LAB_001a40e5: LEA R14,[RBX + 0x40] MOV byte ptr [RBX + 0x40],0x0 MOV qword ptr [RBX + 0x48],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00166666 MOV RDI,R14 MOV ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x00166666
/* minja::Value::Value(std::shared_ptr<std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&)> > const&) */ void __thiscall minja::Value::Value(Value *this,shared_ptr *param_1) { long lVar1; int8 *puVar2; bool bVar3; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; /* try { // try from 001a4078 to 001a4081 has its CatchHandler @ 001a4116 */ puVar2 = (int8 *)operator_new(0x30); puVar2[1] = 0x100000001; *puVar2 = &PTR___Sp_counted_ptr_inplace_00239448; puVar2[2] = 0; puVar2[3] = 0; puVar2[4] = 0; *(int8 **)(this + 0x28) = puVar2; *(int8 **)(this + 0x20) = puVar2 + 2; *(int8 *)(this + 0x30) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x38) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_0023af80 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } bVar3 = (bool)((char)this + '@'); this[0x40] = (Value)0x0; *(int8 *)(this + 0x48) = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar3); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar3); return; }
49,976
ma_unmap_file
eloqsql/storage/maria/ma_packrec.c
void _ma_unmap_file(MARIA_HA *info) { MARIA_SHARE *share= info->s; my_munmap((char*) share->file_map, (size_t) share->mmaped_length + MEMMAP_EXTRA_MARGIN); share->file_map= 0; share->file_read= _ma_nommap_pread; share->file_write= _ma_nommap_pwrite; info->opt_flag&= ~MEMMAP_USED; }
O3
c
ma_unmap_file: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx movq (%rdi), %r14 movq 0x5f0(%r14), %rdi movq 0xa00(%r14), %rsi addq $0x7, %rsi callq 0x2a4c0 movq $0x0, 0x5f0(%r14) leaq 0x1c6b(%rip), %rax # 0x4761b movq %rax, 0x6e0(%r14) leaq 0x1e73(%rip), %rax # 0x47831 movq %rax, 0x6e8(%r14) andb $-0x21, 0x61c(%rbx) popq %rbx popq %r14 popq %rbp retq
_ma_unmap_file: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi mov r14, [rdi] mov rdi, [r14+5F0h] mov rsi, [r14+0A00h] add rsi, 7 call _munmap mov qword ptr [r14+5F0h], 0 lea rax, _ma_nommap_pread mov [r14+6E0h], rax lea rax, _ma_nommap_pwrite mov [r14+6E8h], rax and byte ptr [rbx+61Ch], 0DFh pop rbx pop r14 pop rbp retn
long long ( * ma_unmap_file(_BYTE *a1))() { _QWORD *v1; // r14 long long ( *result)(); // rax v1 = *(_QWORD **)a1; munmap(*(_QWORD *)(*(_QWORD *)a1 + 1520LL), *(_QWORD *)(*(_QWORD *)a1 + 2560LL) + 7LL); v1[190] = 0LL; v1[220] = ma_nommap_pread; result = ma_nommap_pwrite; v1[221] = ma_nommap_pwrite; a1[1564] &= ~0x20u; return result; }
_ma_unmap_file: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RDI] MOV RDI,qword ptr [R14 + 0x5f0] MOV RSI,qword ptr [R14 + 0xa00] ADD RSI,0x7 CALL 0x0012a4c0 MOV qword ptr [R14 + 0x5f0],0x0 LEA RAX,[0x14761b] MOV qword ptr [R14 + 0x6e0],RAX LEA RAX,[0x147831] MOV qword ptr [R14 + 0x6e8],RAX AND byte ptr [RBX + 0x61c],0xdf POP RBX POP R14 POP RBP RET
void _ma_unmap_file(long *param_1) { long lVar1; lVar1 = *param_1; munmap(*(void **)(lVar1 + 0x5f0),*(long *)(lVar1 + 0xa00) + 7); *(int8 *)(lVar1 + 0x5f0) = 0; *(code **)(lVar1 + 0x6e0) = _ma_nommap_pread; *(code **)(lVar1 + 0x6e8) = _ma_nommap_pwrite; *(byte *)((long)param_1 + 0x61c) = *(byte *)((long)param_1 + 0x61c) & 0xdf; return; }
49,977
lshift
eloqsql/strings/dtoa.c
static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc) { int i, k1, n, n1; Bigint *b1; ULong *x, *x1, *xe, z; n= k >> 5; k1= b->k; n1= n + b->wds + 1; for (i= b->maxwds; n1 > i; i<<= 1) k1++; b1= Balloc(k1, alloc); x1= b1->p.x; for (i= 0; i < n; i++) *x1++= 0; x= b->p.x; xe= x + b->wds; if (k&= 0x1f) { k1= 32 - k; z= 0; do { *x1++= *x << k | z; z= *x++ >> k1; } while (x < xe); if ((*x1= z)) ++n1; } else do *x1++= *x++; while (x < xe); b1->wds= n1 - 1; Bfree(b, alloc); return b1; }
O0
c
lshift: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl -0xc(%rbp), %eax sarl $0x5, %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x20(%rbp) movl -0x24(%rbp), %eax movq -0x8(%rbp), %rcx addl 0x14(%rcx), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) movq -0x8(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0x1c(%rbp) movl -0x28(%rbp), %eax cmpl -0x1c(%rbp), %eax jle 0x7b4ab movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax shll %eax movl %eax, -0x1c(%rbp) jmp 0x7b490 movl -0x20(%rbp), %edi movq -0x18(%rbp), %rsi callq 0x7ad20 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movl $0x0, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0x24(%rbp), %eax jge 0x7b4f5 movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x40(%rbp) movl $0x0, (%rax) movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x7b4cd movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq -0x8(%rbp), %rcx movslq 0x14(%rcx), %rcx shlq $0x2, %rcx addq %rcx, %rax movq %rax, -0x48(%rbp) movl -0xc(%rbp), %eax andl $0x1f, %eax movl %eax, -0xc(%rbp) cmpl $0x0, %eax je 0x7b594 movl $0x20, %eax subl -0xc(%rbp), %eax movl %eax, -0x20(%rbp) movl $0x0, -0x4c(%rbp) movq -0x38(%rbp), %rax movl (%rax), %eax movl -0xc(%rbp), %ecx shll %cl, %eax movl %eax, %ecx orl -0x4c(%rbp), %ecx movq -0x40(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x40(%rbp) movl %ecx, (%rax) movq -0x38(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x38(%rbp) movl (%rax), %eax movl -0x20(%rbp), %ecx shrl %cl, %eax movl %eax, -0x4c(%rbp) movq -0x38(%rbp), %rax cmpq -0x48(%rbp), %rax jb 0x7b537 movl -0x4c(%rbp), %eax movq -0x40(%rbp), %rcx movl %eax, (%rcx) cmpl $0x0, %eax je 0x7b592 movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x7b5c4 jmp 0x7b596 movq -0x38(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x38(%rbp) movl (%rax), %ecx movq -0x40(%rbp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, -0x40(%rbp) movl %ecx, (%rax) movq -0x38(%rbp), %rax cmpq -0x48(%rbp), %rax jb 0x7b596 jmp 0x7b5c4 movl -0x28(%rbp), %ecx subl $0x1, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x7b3d0 movq -0x30(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
lshift: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov eax, [rbp+var_C] sar eax, 5 mov [rbp+var_24], eax mov rax, [rbp+var_8] mov eax, [rax+8] mov [rbp+var_20], eax mov eax, [rbp+var_24] mov rcx, [rbp+var_8] add eax, [rcx+14h] add eax, 1 mov [rbp+var_28], eax mov rax, [rbp+var_8] mov eax, [rax+0Ch] mov [rbp+var_1C], eax loc_7B490: mov eax, [rbp+var_28] cmp eax, [rbp+var_1C] jle short loc_7B4AB mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax mov eax, [rbp+var_1C] shl eax, 1 mov [rbp+var_1C], eax jmp short loc_7B490 loc_7B4AB: mov edi, [rbp+var_20] mov rsi, [rbp+var_18] call Balloc mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_40], rax mov [rbp+var_1C], 0 loc_7B4CD: mov eax, [rbp+var_1C] cmp eax, [rbp+var_24] jge short loc_7B4F5 mov rax, [rbp+var_40] mov rcx, rax add rcx, 4 mov [rbp+var_40], rcx mov dword ptr [rax], 0 mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_7B4CD loc_7B4F5: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_8] movsxd rcx, dword ptr [rcx+14h] shl rcx, 2 add rax, rcx mov [rbp+var_48], rax mov eax, [rbp+var_C] and eax, 1Fh mov [rbp+var_C], eax cmp eax, 0 jz short loc_7B594 mov eax, 20h ; ' ' sub eax, [rbp+var_C] mov [rbp+var_20], eax mov [rbp+var_4C], 0 loc_7B537: mov rax, [rbp+var_38] mov eax, [rax] mov ecx, [rbp+var_C] shl eax, cl mov ecx, eax or ecx, [rbp+var_4C] mov rax, [rbp+var_40] mov rdx, rax add rdx, 4 mov [rbp+var_40], rdx mov [rax], ecx mov rax, [rbp+var_38] mov rcx, rax add rcx, 4 mov [rbp+var_38], rcx mov eax, [rax] mov ecx, [rbp+var_20] shr eax, cl mov [rbp+var_4C], eax mov rax, [rbp+var_38] cmp rax, [rbp+var_48] jb short loc_7B537 mov eax, [rbp+var_4C] mov rcx, [rbp+var_40] mov [rcx], eax cmp eax, 0 jz short loc_7B592 mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax loc_7B592: jmp short loc_7B5C4 loc_7B594: jmp short $+2 loc_7B596: mov rax, [rbp+var_38] mov rcx, rax add rcx, 4 mov [rbp+var_38], rcx mov ecx, [rax] mov rax, [rbp+var_40] mov rdx, rax add rdx, 4 mov [rbp+var_40], rdx mov [rax], ecx mov rax, [rbp+var_38] cmp rax, [rbp+var_48] jb short loc_7B596 jmp short $+2 loc_7B5C4: mov ecx, [rbp+var_28] sub ecx, 1 mov rax, [rbp+var_30] mov [rax+14h], ecx mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call Bfree mov rax, [rbp+var_30] add rsp, 50h pop rbp retn
long long lshift(unsigned long long a1, int a2, unsigned long long *a3) { int *v3; // rax int *v4; // rax int *v5; // rax int *v6; // rax int v7; // ecx int *v8; // rax int v10; // [rsp+4h] [rbp-4Ch] unsigned long long v11; // [rsp+8h] [rbp-48h] int *v12; // [rsp+10h] [rbp-40h] int *v13; // [rsp+18h] [rbp-38h] long long v14; // [rsp+20h] [rbp-30h] int v15; // [rsp+28h] [rbp-28h] int v16; // [rsp+30h] [rbp-20h] int i; // [rsp+34h] [rbp-1Ch] int j; // [rsp+34h] [rbp-1Ch] char v20; // [rsp+44h] [rbp-Ch] v16 = *(_DWORD *)(a1 + 8); v15 = *(_DWORD *)(a1 + 20) + (a2 >> 5) + 1; for ( i = *(_DWORD *)(a1 + 12); v15 > i; i *= 2 ) ++v16; v14 = Balloc(v16, (long long)a3); v12 = *(int **)v14; for ( j = 0; j < a2 >> 5; ++j ) { v3 = v12++; *v3 = 0; } v13 = *(int **)a1; v11 = 4LL * *(int *)(a1 + 20) + *(_QWORD *)a1; v20 = a2 & 0x1F; if ( (a2 & 0x1F) != 0 ) { v10 = 0; do { v4 = v12++; *v4 = v10 | (*v13 << v20); v5 = v13++; v10 = (unsigned int)*v5 >> (32 - v20); } while ( (unsigned long long)v13 < v11 ); *v12 = v10; if ( v10 ) ++v15; } else { do { v6 = v13++; v7 = *v6; v8 = v12++; *v8 = v7; } while ( (unsigned long long)v13 < v11 ); } *(_DWORD *)(v14 + 20) = v15 - 1; Bfree(a1, a3); return v14; }
lshift: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV EAX,dword ptr [RBP + -0xc] SAR EAX,0x5 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x8] ADD EAX,dword ptr [RCX + 0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RBP + -0x1c],EAX LAB_0017b490: MOV EAX,dword ptr [RBP + -0x28] CMP EAX,dword ptr [RBP + -0x1c] JLE 0x0017b4ab MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x1c] SHL EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0017b490 LAB_0017b4ab: MOV EDI,dword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0017ad20 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x1c],0x0 LAB_0017b4cd: MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x24] JGE 0x0017b4f5 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x40],RCX MOV dword ptr [RAX],0x0 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0017b4cd LAB_0017b4f5: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RCX + 0x14] SHL RCX,0x2 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x1f MOV dword ptr [RBP + -0xc],EAX CMP EAX,0x0 JZ 0x0017b594 MOV EAX,0x20 SUB EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x20],EAX MOV dword ptr [RBP + -0x4c],0x0 LAB_0017b537: MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] SHL EAX,CL MOV ECX,EAX OR ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x40] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x40],RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x38],RCX MOV EAX,dword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] SHR EAX,CL MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x48] JC 0x0017b537 MOV EAX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RBP + -0x40] MOV dword ptr [RCX],EAX CMP EAX,0x0 JZ 0x0017b592 MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX LAB_0017b592: JMP 0x0017b5c4 LAB_0017b594: JMP 0x0017b596 LAB_0017b596: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x38],RCX MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x40] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RBP + -0x40],RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x48] JC 0x0017b596 JMP 0x0017b5c4 LAB_0017b5c4: MOV ECX,dword ptr [RBP + -0x28] SUB ECX,0x1 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x14],ECX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0017b3d0 MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x50 POP RBP RET
int8 * lshift(int8 *param_1,uint param_2,int8 param_3) { sbyte sVar1; int iVar2; int8 *puVar3; uint *puVar4; uint *puVar5; uint *puVar6; uint local_54; uint *local_48; uint *local_40; int local_30; int local_28; int local_24; local_28 = *(int *)(param_1 + 1); iVar2 = ((int)param_2 >> 5) + *(int *)((long)param_1 + 0x14); local_30 = iVar2 + 1; for (local_24 = *(int *)((long)param_1 + 0xc); local_24 < local_30; local_24 = local_24 << 1) { local_28 = local_28 + 1; } puVar3 = (int8 *)Balloc(local_28,param_3); local_48 = (uint *)*puVar3; for (local_24 = 0; local_24 < (int)param_2 >> 5; local_24 = local_24 + 1) { *local_48 = 0; local_48 = local_48 + 1; } local_40 = (uint *)*param_1; puVar4 = local_40 + *(int *)((long)param_1 + 0x14); if ((param_2 & 0x1f) == 0) { do { puVar5 = local_40 + 1; *local_48 = *local_40; local_48 = local_48 + 1; local_40 = puVar5; } while (puVar5 < puVar4); } else { sVar1 = (sbyte)(param_2 & 0x1f); local_54 = 0; do { puVar6 = local_48 + 1; *local_48 = *local_40 << sVar1 | local_54; puVar5 = local_40 + 1; local_54 = *local_40 >> (0x20U - sVar1 & 0x1f); local_48 = puVar6; local_40 = puVar5; } while (puVar5 < puVar4); *puVar6 = local_54; if (local_54 != 0) { local_30 = iVar2 + 2; } } *(int *)((long)puVar3 + 0x14) = local_30 + -1; Bfree(param_1,param_3); return puVar3; }
49,978
lshift
eloqsql/strings/dtoa.c
static Bigint *lshift(Bigint *b, int k, Stack_alloc *alloc) { int i, k1, n, n1; Bigint *b1; ULong *x, *x1, *xe, z; n= k >> 5; k1= b->k; n1= n + b->wds + 1; for (i= b->maxwds; n1 > i; i<<= 1) k1++; b1= Balloc(k1, alloc); x1= b1->p.x; for (i= 0; i < n; i++) *x1++= 0; x= b->p.x; xe= x + b->wds; if (k&= 0x1f) { k1= 32 - k; z= 0; do { *x1++= *x << k | z; z= *x++ >> k1; } while (x < xe); if ((*x1= z)) ++n1; } else do *x1++= *x++; while (x < xe); b1->wds= n1 - 1; Bfree(b, alloc); return b1; }
O3
c
lshift: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %esi, %r15d movq %rdi, %r14 movl %esi, %r12d shrl $0x5, %r12d movl 0x8(%rdi), %edi movl 0xc(%r14), %eax movl 0x14(%r14), %ebx addl %r12d, %ebx cmpl %eax, %ebx jl 0x5d4f1 incl %edi addl %eax, %eax jmp 0x5d4e7 movq %rdx, -0x38(%rbp) movq %rdx, %rsi callq 0x5d094 movq (%rax), %r13 cmpl $0x20, %r15d jb 0x5d528 decl %r12d leaq 0x4(,%r12,4), %rdx movq %r13, %rdi xorl %esi, %esi movq %rax, -0x30(%rbp) callq 0x24190 movq -0x30(%rbp), %rax leaq 0x4(%r13,%r12,4), %r13 movq (%r14), %rdx movslq 0x14(%r14), %rcx leaq (%rdx,%rcx,4), %rsi andl $0x1f, %r15d je 0x5d574 movl $0x20, %r9d subl %r15d, %r9d xorl %edi, %edi movl (%rdx), %r8d movl %r15d, %ecx shll %cl, %r8d orl %edi, %r8d movl %r8d, (%r13) addq $0x4, %r13 movl (%rdx), %edi addq $0x4, %rdx movl %r9d, %ecx shrl %cl, %edi cmpq %rsi, %rdx jb 0x5d544 movl %edi, (%r13) cmpl $0x1, %edi sbbl $-0x1, %ebx jmp 0x5d587 movl (%rdx), %ecx addq $0x4, %rdx movl %ecx, (%r13) addq $0x4, %r13 cmpq %rsi, %rdx jb 0x5d574 movl %ebx, 0x14(%rax) movq %r14, %rdi movq -0x38(%rbp), %rsi movq %rax, %rbx callq 0x5d48d movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
lshift: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15d, esi mov r14, rdi mov r12d, esi shr r12d, 5 mov edi, [rdi+8] mov eax, [r14+0Ch] mov ebx, [r14+14h] add ebx, r12d loc_5D4E7: cmp ebx, eax jl short loc_5D4F1 inc edi add eax, eax jmp short loc_5D4E7 loc_5D4F1: mov [rbp+var_38], rdx mov rsi, rdx call Balloc mov r13, [rax] cmp r15d, 20h ; ' ' jb short loc_5D528 dec r12d lea rdx, ds:4[r12*4] mov rdi, r13 xor esi, esi mov [rbp+var_30], rax call _memset mov rax, [rbp+var_30] lea r13, [r13+r12*4+4] loc_5D528: mov rdx, [r14] movsxd rcx, dword ptr [r14+14h] lea rsi, [rdx+rcx*4] and r15d, 1Fh jz short loc_5D574 mov r9d, 20h ; ' ' sub r9d, r15d xor edi, edi loc_5D544: mov r8d, [rdx] mov ecx, r15d shl r8d, cl or r8d, edi mov [r13+0], r8d add r13, 4 mov edi, [rdx] add rdx, 4 mov ecx, r9d shr edi, cl cmp rdx, rsi jb short loc_5D544 mov [r13+0], edi cmp edi, 1 sbb ebx, 0FFFFFFFFh jmp short loc_5D587 loc_5D574: mov ecx, [rdx] add rdx, 4 mov [r13+0], ecx add r13, 4 cmp rdx, rsi jb short loc_5D574 loc_5D587: mov [rax+14h], ebx mov rdi, r14 mov rsi, [rbp+var_38] mov rbx, rax call Bfree mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long lshift(unsigned long long a1, unsigned int a2, unsigned long long *a3) { char v3; // r15 int v5; // edi int v6; // eax int v7; // ebx long long v8; // rax int *v9; // r13 long long v10; // r12 int *v11; // rdx unsigned long long v12; // rsi int v13; // r15d int v14; // edi unsigned int v15; // edi int v16; // ecx long long v17; // rbx long long v20; // [rsp+10h] [rbp-30h] v3 = a2; v5 = *(_DWORD *)(a1 + 8); v6 = *(_DWORD *)(a1 + 12); v7 = (a2 >> 5) + *(_DWORD *)(a1 + 20); while ( v7 >= v6 ) { ++v5; v6 *= 2; } v8 = Balloc(v5, (long long)a3); v9 = *(int **)v8; if ( a2 >= 0x20 ) { v10 = (a2 >> 5) - 1; v20 = v8; memset(*(_QWORD *)v8, 0LL, 4 * v10 + 4); v8 = v20; v9 += v10 + 1; } v11 = *(int **)a1; v12 = *(_QWORD *)a1 + 4LL * *(int *)(a1 + 20); v13 = v3 & 0x1F; if ( v13 ) { v14 = 0; do { *v9++ = v14 | (*v11 << v13); v15 = *v11++; v14 = v15 >> (32 - v13); } while ( (unsigned long long)v11 < v12 ); *v9 = v14; v7 -= (v14 == 0) - 1; } else { do { v16 = *v11++; *v9++ = v16; } while ( (unsigned long long)v11 < v12 ); } *(_DWORD *)(v8 + 20) = v7; v17 = v8; Bfree(a1, a3); return v17; }
lshift: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15D,ESI MOV R14,RDI MOV R12D,ESI SHR R12D,0x5 MOV EDI,dword ptr [RDI + 0x8] MOV EAX,dword ptr [R14 + 0xc] MOV EBX,dword ptr [R14 + 0x14] ADD EBX,R12D LAB_0015d4e7: CMP EBX,EAX JL 0x0015d4f1 INC EDI ADD EAX,EAX JMP 0x0015d4e7 LAB_0015d4f1: MOV qword ptr [RBP + -0x38],RDX MOV RSI,RDX CALL 0x0015d094 MOV R13,qword ptr [RAX] CMP R15D,0x20 JC 0x0015d528 DEC R12D LEA RDX,[0x4 + R12*0x4] MOV RDI,R13 XOR ESI,ESI MOV qword ptr [RBP + -0x30],RAX CALL 0x00124190 MOV RAX,qword ptr [RBP + -0x30] LEA R13,[R13 + R12*0x4 + 0x4] LAB_0015d528: MOV RDX,qword ptr [R14] MOVSXD RCX,dword ptr [R14 + 0x14] LEA RSI,[RDX + RCX*0x4] AND R15D,0x1f JZ 0x0015d574 MOV R9D,0x20 SUB R9D,R15D XOR EDI,EDI LAB_0015d544: MOV R8D,dword ptr [RDX] MOV ECX,R15D SHL R8D,CL OR R8D,EDI MOV dword ptr [R13],R8D ADD R13,0x4 MOV EDI,dword ptr [RDX] ADD RDX,0x4 MOV ECX,R9D SHR EDI,CL CMP RDX,RSI JC 0x0015d544 MOV dword ptr [R13],EDI CMP EDI,0x1 SBB EBX,-0x1 JMP 0x0015d587 LAB_0015d574: MOV ECX,dword ptr [RDX] ADD RDX,0x4 MOV dword ptr [R13],ECX ADD R13,0x4 CMP RDX,RSI JC 0x0015d574 LAB_0015d587: MOV dword ptr [RAX + 0x14],EBX MOV RDI,R14 MOV RSI,qword ptr [RBP + -0x38] MOV RBX,RAX CALL 0x0015d48d MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * lshift(int8 *param_1,uint param_2,int8 param_3) { uint *puVar1; sbyte sVar2; int iVar3; int8 *puVar4; uint *puVar5; int iVar6; uint uVar7; ulong uVar8; uint *__s; iVar6 = *(int *)((long)param_1 + 0x14) + (param_2 >> 5); for (iVar3 = *(int *)((long)param_1 + 0xc); iVar3 <= iVar6; iVar3 = iVar3 * 2) { } puVar4 = (int8 *)Balloc(); __s = (uint *)*puVar4; if (0x1f < param_2) { uVar8 = (ulong)((param_2 >> 5) - 1); memset(__s,0,uVar8 * 4 + 4); __s = __s + uVar8 + 1; } puVar5 = (uint *)*param_1; puVar1 = puVar5 + *(int *)((long)param_1 + 0x14); if ((param_2 & 0x1f) == 0) { do { uVar7 = *puVar5; puVar5 = puVar5 + 1; *__s = uVar7; __s = __s + 1; } while (puVar5 < puVar1); } else { sVar2 = (sbyte)(param_2 & 0x1f); uVar7 = 0; do { *__s = *puVar5 << sVar2 | uVar7; __s = __s + 1; uVar7 = *puVar5; puVar5 = puVar5 + 1; uVar7 = uVar7 >> (0x20U - sVar2 & 0x1f); } while (puVar5 < puVar1); *__s = uVar7; iVar6 = (iVar6 + 1) - (uint)(uVar7 == 0); } *(int *)((long)puVar4 + 0x14) = iVar6; Bfree(param_1,param_3); return puVar4; }
49,979
maria_rtree_fill_reinsert_list
eloqsql/storage/maria/ma_rt_index.c
static my_bool maria_rtree_fill_reinsert_list(stPageList *ReinsertList, my_off_t page, int level) { DBUG_ENTER("maria_rtree_fill_reinsert_list"); DBUG_PRINT("rtree", ("page: %lu level: %d", (ulong) page, level)); if (ReinsertList->n_pages == ReinsertList->m_pages) { ReinsertList->m_pages += REINSERT_BUFFER_INC; if (!(ReinsertList->pages= (stPageLevel*)my_realloc(PSI_INSTRUMENT_ME, (uchar*)ReinsertList->pages, ReinsertList->m_pages * sizeof(stPageLevel), MYF(MY_ALLOW_ZERO_PTR)))) goto err; } /* save page to ReinsertList */ ReinsertList->pages[ReinsertList->n_pages].offs= page; ReinsertList->pages[ReinsertList->n_pages].level= level; ReinsertList->n_pages++; DBUG_RETURN(0); err: DBUG_RETURN(1); /* purecov: inspected */ }
O3
c
maria_rtree_fill_reinsert_list: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebx movq %rsi, %r15 movq %rdi, %r14 movl (%rdi), %edx cmpl 0x4(%rdi), %edx jne 0x5ecb6 addl $0xa, %edx movl %edx, 0x4(%r14) movq 0x8(%r14), %rsi shlq $0x4, %rdx movl $0x40, %ecx xorl %edi, %edi callq 0xa147c movq %rax, 0x8(%r14) testq %rax, %rax je 0x5ece3 movl (%r14), %edx jmp 0x5ecba movq 0x8(%r14), %rax movl %edx, %ecx shlq $0x4, %rcx movq %r15, 0x8(%rax,%rcx) movq 0x8(%r14), %rax movl (%r14), %ecx shlq $0x4, %rcx movl %ebx, (%rax,%rcx) incl (%r14) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movb $0x1, %al jmp 0x5ecd8 nop
maria_rtree_fill_reinsert_list: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ebx, edx mov r15, rsi mov r14, rdi mov edx, [rdi] cmp edx, [rdi+4] jnz short loc_5ECB6 add edx, 0Ah mov [r14+4], edx mov rsi, [r14+8] shl rdx, 4 mov ecx, 40h ; '@' xor edi, edi call my_realloc mov [r14+8], rax test rax, rax jz short loc_5ECE3 mov edx, [r14] jmp short loc_5ECBA loc_5ECB6: mov rax, [r14+8] loc_5ECBA: mov ecx, edx shl rcx, 4 mov [rax+rcx+8], r15 mov rax, [r14+8] mov ecx, [r14] shl rcx, 4 mov [rax+rcx], ebx inc dword ptr [r14] xor eax, eax loc_5ECD8: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_5ECE3: mov al, 1 jmp short loc_5ECD8
long long maria_rtree_fill_reinsert_list(int *a1, long long a2, int a3) { unsigned int v4; // edx long long v5; // rdx long long v6; // rax v4 = *a1; if ( *a1 == a1[1] ) { v5 = v4 + 10; a1[1] = v5; v6 = my_realloc(0LL, *((_QWORD *)a1 + 1), 16 * v5, 64LL); *((_QWORD *)a1 + 1) = v6; if ( !v6 ) return 1LL; v4 = *a1; } else { v6 = *((_QWORD *)a1 + 1); } *(_QWORD *)(v6 + 16LL * v4 + 8) = a2; *(_DWORD *)(*((_QWORD *)a1 + 1) + 16LL * (unsigned int)(*a1)++) = a3; return 0LL; }
maria_rtree_fill_reinsert_list: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDX MOV R15,RSI MOV R14,RDI MOV EDX,dword ptr [RDI] CMP EDX,dword ptr [RDI + 0x4] JNZ 0x0015ecb6 ADD EDX,0xa MOV dword ptr [R14 + 0x4],EDX MOV RSI,qword ptr [R14 + 0x8] SHL RDX,0x4 MOV ECX,0x40 XOR EDI,EDI CALL 0x001a147c MOV qword ptr [R14 + 0x8],RAX TEST RAX,RAX JZ 0x0015ece3 MOV EDX,dword ptr [R14] JMP 0x0015ecba LAB_0015ecb6: MOV RAX,qword ptr [R14 + 0x8] LAB_0015ecba: MOV ECX,EDX SHL RCX,0x4 MOV qword ptr [RAX + RCX*0x1 + 0x8],R15 MOV RAX,qword ptr [R14 + 0x8] MOV ECX,dword ptr [R14] SHL RCX,0x4 MOV dword ptr [RAX + RCX*0x1],EBX INC dword ptr [R14] XOR EAX,EAX LAB_0015ecd8: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0015ece3: MOV AL,0x1 JMP 0x0015ecd8
int8 maria_rtree_fill_reinsert_list(uint *param_1,int8 param_2,int4 param_3) { long lVar1; uint uVar2; uVar2 = *param_1; if (uVar2 == param_1[1]) { param_1[1] = uVar2 + 10; lVar1 = my_realloc(0,*(int8 *)(param_1 + 2),(ulong)(uVar2 + 10) << 4,0x40); *(long *)(param_1 + 2) = lVar1; if (lVar1 == 0) { return 1; } uVar2 = *param_1; } else { lVar1 = *(long *)(param_1 + 2); } *(int8 *)(lVar1 + 8 + (ulong)uVar2 * 0x10) = param_2; *(int4 *)(*(long *)(param_1 + 2) + (ulong)*param_1 * 0x10) = param_3; *param_1 = *param_1 + 1; return 0; }
49,980
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")); }
O0
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&): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x40(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xa1ae0 movq %rax, 0x30(%rsp) movq 0x10(%rsp), %rdi callq 0xa1b50 movq %rax, 0x28(%rsp) leaq 0x30(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0xa1b10 testb $0x1, %al jne 0xdd596 jmp 0xdd5e7 movq 0x10(%rsp), %rax addq $0x18, %rax movq %rax, 0x8(%rsp) leaq 0x30(%rsp), %rdi callq 0xa1b80 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x38(%rsp), %rdx callq 0xcf9a0 testb $0x1, %al jne 0xdd5c6 jmp 0xdd5d9 leaq 0x30(%rsp), %rdi callq 0xa1b80 addq $0x10, %rax addq $0x48, %rsp retq jmp 0xdd5db leaq 0x30(%rsp), %rdi callq 0xa1ef0 jmp 0xdd572 movl $0x10, %edi callq 0x50540 movq %rax, %rdi movq %rdi, %rax movq %rax, (%rsp) leaq 0xf41fc(%rip), %rsi # 0x1d17fe callq 0x50360 jmp 0xdd609 movq (%rsp), %rdi movq 0x17691c(%rip), %rsi # 0x253f30 movq 0x176965(%rip), %rdx # 0x253f80 callq 0x508f0 movq (%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) callq 0x50c40 movq 0x20(%rsp), %rdi callq 0x50940 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov rdi, [rsp+48h+var_8] mov [rsp+48h+var_38], rdi call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void) mov [rsp+48h+var_18], rax loc_DD572: mov rdi, [rsp+48h+var_38] call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void) mov [rsp+48h+var_20], rax lea rdi, [rsp+48h+var_18] lea rsi, [rsp+48h+var_20] call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&) test al, 1 jnz short loc_DD596 jmp short loc_DD5E7 loc_DD596: mov rax, [rsp+48h+var_38] add rax, 18h mov [rsp+48h+var_40], rax lea rdi, [rsp+48h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator->(void) mov rdi, [rsp+48h+var_40] mov rsi, rax mov rdx, [rsp+48h+var_10] call _ZNKSt8equal_toIvEclIRKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEESI_EEDTeqclsr3stdE7forwardIT_Efp_Eclsr3stdE7forwardIT0_Efp0_EEOSJ_OSK_ test al, 1 jnz short loc_DD5C6 jmp short loc_DD5D9 loc_DD5C6: lea rdi, [rsp+48h+var_18] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator->(void) add rax, 10h add rsp, 48h retn loc_DD5D9: jmp short $+2 loc_DD5DB: lea rdi, [rsp+48h+var_18] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void) jmp short loc_DD572 loc_DD5E7: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+48h+var_48], rax lea rsi, aKeyNotFound; "key not found" call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*) jmp short $+2 loc_DD609: mov rdi, [rsp+48h+var_48]; void * mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+48h+var_48]; void * mov rcx, rax mov eax, edx mov [rsp+48h+var_28], rcx mov [rsp+48h+var_2C], eax call ___cxa_free_exception mov rdi, [rsp+48h+var_28] call __Unwind_Resume
long long 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( long long a1, long long a2) { long long v2; // rax std::out_of_range *exception; // [rsp+0h] [rbp-48h] long long v5; // [rsp+28h] [rbp-20h] BYREF long long i; // [rsp+30h] [rbp-18h] BYREF long long v7; // [rsp+38h] [rbp-10h] long long v8; // [rsp+40h] [rbp-8h] v8 = a1; v7 = a2; for ( i = std::vector<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>>::begin(a1); ; __gnu_cxx::__normal_iterator<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> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&i) ) { v5 = std::vector<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>>::end(a1); if ( !__gnu_cxx::operator!=<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> *,std::vector<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>>>( (long long)&i, (long long)&v5) ) { 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); } v2 = __gnu_cxx::__normal_iterator<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> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator->((long long)&i); if ( (std::equal_to<void>::operator()<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&,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&>( a1 + 24, v2, v7) & 1) != 0 ) break; } return __gnu_cxx::__normal_iterator<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> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator->((long long)&i) + 16; }
at: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RDI CALL 0x001a1ae0 MOV qword ptr [RSP + 0x30],RAX LAB_001dd572: MOV RDI,qword ptr [RSP + 0x10] CALL 0x001a1b50 MOV qword ptr [RSP + 0x28],RAX LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x28] CALL 0x001a1b10 TEST AL,0x1 JNZ 0x001dd596 JMP 0x001dd5e7 LAB_001dd596: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x18 MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x30] CALL 0x001a1b80 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x38] CALL 0x001cf9a0 TEST AL,0x1 JNZ 0x001dd5c6 JMP 0x001dd5d9 LAB_001dd5c6: LEA RDI,[RSP + 0x30] CALL 0x001a1b80 ADD RAX,0x10 ADD RSP,0x48 RET LAB_001dd5d9: JMP 0x001dd5db LAB_001dd5db: LEA RDI,[RSP + 0x30] CALL 0x001a1ef0 JMP 0x001dd572 LAB_001dd5e7: MOV EDI,0x10 CALL 0x00150540 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP],RAX LAB_001dd5fb: LEA RSI,[0x2d17fe] CALL 0x00150360 LAB_001dd607: JMP 0x001dd609 LAB_001dd609: MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [0x00353f30] MOV RDX,qword ptr [0x00353f80] CALL 0x001508f0
/* 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&) */ long __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) { bool bVar1; basic_json *pbVar2; ulong uVar3; long lVar4; out_of_range *this_00; int8 local_20; int8 local_18; basic_json *local_10; 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>>> *local_8; local_10 = param_1; local_8 = this; local_18 = std:: vector<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>,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>>> ::begin((vector<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>,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); while( true ) { local_20 = std:: vector<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>,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>>> ::end((vector<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>,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); bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_18,(__normal_iterator *)&local_20); if (!bVar1) { this_00 = (out_of_range *)__cxa_allocate_exception(0x10); /* try { // try from 001dd5fb to 001dd606 has its CatchHandler @ 001dd620 */ std::out_of_range::out_of_range(this_00,"key not found"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00353f30,PTR__out_of_range_00353f80); } pbVar2 = (basic_json *) __gnu_cxx:: __normal_iterator<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>*,std::vector<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>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> ::operator->((__normal_iterator<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>*,std::vector<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>,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>>>> *)&local_18); uVar3 = std::equal_to<void>::operator()((equal_to<void> *)(this + 0x18),pbVar2,local_10); if ((uVar3 & 1) != 0) break; __gnu_cxx:: __normal_iterator<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>*,std::vector<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>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> ::operator++((__normal_iterator<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>*,std::vector<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>,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>>>> *)&local_18); } lVar4 = __gnu_cxx:: __normal_iterator<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>*,std::vector<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>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> ::operator->((__normal_iterator<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>*,std::vector<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>,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>>>> *)&local_18); return lVar4 + 0x10; }
49,981
js_object_getOwnPropertyDescriptor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_object_getOwnPropertyDescriptor(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue prop; JSAtom atom; JSValue ret, obj; JSPropertyDescriptor desc; int res, flags; if (magic) { /* Reflect.getOwnPropertyDescriptor case */ if (JS_VALUE_GET_TAG(argv[0]) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); obj = js_dup(argv[0]); } else { obj = JS_ToObject(ctx, argv[0]); if (JS_IsException(obj)) return obj; } prop = argv[1]; atom = JS_ValueToAtom(ctx, prop); if (unlikely(atom == JS_ATOM_NULL)) goto exception; ret = JS_UNDEFINED; if (JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT) { res = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(obj), atom); if (res < 0) goto exception; if (res) { ret = JS_NewObject(ctx); if (JS_IsException(ret)) goto exception1; flags = JS_PROP_C_W_E | JS_PROP_THROW; if (desc.flags & JS_PROP_GETSET) { if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_get, js_dup(desc.getter), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_set, js_dup(desc.setter), flags) < 0) goto exception1; } else { if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_value, js_dup(desc.value), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_writable, js_bool(desc.flags & JS_PROP_WRITABLE), flags) < 0) goto exception1; } if (JS_DefinePropertyValue(ctx, ret, JS_ATOM_enumerable, js_bool(desc.flags & JS_PROP_ENUMERABLE), flags) < 0 || JS_DefinePropertyValue(ctx, ret, JS_ATOM_configurable, js_bool(desc.flags & JS_PROP_CONFIGURABLE), flags) < 0) goto exception1; js_free_desc(ctx, &desc); } } JS_FreeAtom(ctx, atom); JS_FreeValue(ctx, obj); return ret; exception1: js_free_desc(ctx, &desc); JS_FreeValue(ctx, ret); exception: JS_FreeAtom(ctx, atom); JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O2
c
js_object_getOwnPropertyDescriptor: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, %rbp movq %rdi, %rbx testl %r9d, %r9d je 0x5e870 movq 0x8(%rbp), %r14 cmpl $-0x1, %r14d jne 0x5e91b movq (%rbp), %r15 incl (%r15) jmp 0x5e896 movq (%rbp), %rsi movq 0x8(%rbp), %rdx movq %rbx, %rdi callq 0x20b92 movq %rax, %r15 movq %rdx, %r14 movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r14d je 0x5e957 movq 0x10(%rbp), %rsi movq 0x18(%rbp), %rdx movq %rbx, %rdi callq 0x1e0bc movl %eax, %ebp testl %eax, %eax je 0x5e901 pushq $0x3 popq %r12 cmpl $-0x1, %r14d jne 0x5e92c leaq 0x10(%rsp), %rsi movq %rbx, %rdi movq %r15, %rdx movl %ebp, %ecx callq 0x1db80 testl %eax, %eax js 0x5e901 je 0x5e92c movq %rbx, %rdi callq 0x1b2c9 movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x5e96c leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x360ed movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1801e movq %rbx, %rdi movl %ebp, %esi callq 0x1a995 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1801e jmp 0x5e923 movq %rbx, %rdi callq 0x1d5e1 pushq $0x6 popq %r12 xorl %r13d, %r13d jmp 0x5e957 movq %r15, 0x8(%rsp) movl %ebp, %r15d xorl %r13d, %r13d xorl %ebp, %ebp orq %rbp, %r13 movq %rbx, %rdi movl %r15d, %esi callq 0x1a995 movq %rbx, %rdi movq 0x8(%rsp), %rsi movq %r14, %rdx callq 0x1801e movq %r13, %rax movq %r12, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb $0x10, 0x10(%rsp) jne 0x5e9c2 movq 0x18(%rsp), %r8 movq 0x20(%rsp), %r9 cmpl $-0x9, %r9d jb 0x5e986 incl (%r8) movl $0x4007, (%rsp) # imm = 0x4007 pushq $0x41 popq %rcx movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x20872 testl %eax, %eax js 0x5e8e6 movl 0x10(%rsp), %r8d shrl %r8d andl $0x1, %r8d movl $0x4007, (%rsp) # imm = 0x4007 pushq $0x3f popq %rcx pushq $0x1 popq %r9 jmp 0x5ea12 movq 0x28(%rsp), %r8 movq 0x30(%rsp), %r9 cmpl $-0x9, %r9d jb 0x5e9d5 incl (%r8) movl $0x4007, (%rsp) # imm = 0x4007 pushq $0x42 popq %rcx movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x20872 testl %eax, %eax js 0x5e8e6 movq 0x38(%rsp), %r8 movq 0x40(%rsp), %r9 cmpl $-0x9, %r9d jb 0x5ea08 incl (%r8) movl $0x4007, (%rsp) # imm = 0x4007 pushq $0x43 popq %rcx movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x20872 testl %eax, %eax js 0x5e8e6 movl 0x10(%rsp), %r8d shrl $0x2, %r8d andl $0x1, %r8d movl $0x4007, (%rsp) # imm = 0x4007 pushq $0x40 popq %rcx pushq $0x1 popq %r9 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x20872 testl %eax, %eax js 0x5e8e6 movl 0x10(%rsp), %r8d andl $0x1, %r8d movl $0x4007, (%rsp) # imm = 0x4007 pushq $0x3e popq %rcx pushq $0x1 popq %r9 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x20872 testl %eax, %eax js 0x5e8e6 movq %r15, 0x8(%rsp) movl %ebp, %r15d movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r13, %rbp andq %rax, %rbp leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x360ed movl %r13d, %r13d jmp 0x5e939
js_object_getOwnPropertyDescriptor: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbp, r8 mov rbx, rdi test r9d, r9d jz short loc_5E870 mov r14, [rbp+8] cmp r14d, 0FFFFFFFFh jnz loc_5E91B mov r15, [rbp+0] inc dword ptr [r15] jmp short loc_5E896 loc_5E870: mov rsi, [rbp+0] mov rdx, [rbp+8] mov rdi, rbx call JS_ToObject mov r15, rax mov r14, rdx mov r13, rax mov r12, rdx cmp r14d, 6 jz loc_5E957 loc_5E896: mov rsi, [rbp+10h] mov rdx, [rbp+18h] mov rdi, rbx call JS_ValueToAtom mov ebp, eax test eax, eax jz short loc_5E901 push 3 pop r12 cmp r14d, 0FFFFFFFFh jnz short loc_5E92C lea rsi, [rsp+78h+var_68] mov rdi, rbx mov rdx, r15 mov ecx, ebp call JS_GetOwnPropertyInternal test eax, eax js short loc_5E901 jz short loc_5E92C mov rdi, rbx call JS_NewObject mov r13, rax mov r12, rdx cmp r12d, 6 jnz loc_5E96C loc_5E8E6: lea rsi, [rsp+78h+var_68] mov rdi, rbx call js_free_desc mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_FreeValue loc_5E901: mov rdi, rbx mov esi, ebp call JS_FreeAtom mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue jmp short loc_5E923 loc_5E91B: mov rdi, rbx call JS_ThrowTypeErrorNotAnObject loc_5E923: push 6 pop r12 xor r13d, r13d jmp short loc_5E957 loc_5E92C: mov [rsp+78h+var_70], r15 mov r15d, ebp xor r13d, r13d xor ebp, ebp loc_5E939: or r13, rbp mov rdi, rbx mov esi, r15d call JS_FreeAtom mov rdi, rbx mov rsi, [rsp+78h+var_70] mov rdx, r14 call JS_FreeValue loc_5E957: mov rax, r13 mov rdx, r12 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5E96C: test byte ptr [rsp+78h+var_68], 10h jnz short loc_5E9C2 mov r8, [rsp+78h+var_60] mov r9, [rsp+78h+var_58] cmp r9d, 0FFFFFFF7h jb short loc_5E986 inc dword ptr [r8] loc_5E986: mov [rsp+78h+var_78], 4007h push 41h ; 'A' pop rcx mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_DefinePropertyValue test eax, eax js loc_5E8E6 mov r8d, [rsp+78h+var_68] shr r8d, 1 and r8d, 1 mov [rsp+78h+var_78], 4007h push 3Fh ; '?' pop rcx push 1 pop r9 jmp short loc_5EA12 loc_5E9C2: mov r8, [rsp+78h+var_50] mov r9, [rsp+78h+var_48] cmp r9d, 0FFFFFFF7h jb short loc_5E9D5 inc dword ptr [r8] loc_5E9D5: mov [rsp+78h+var_78], 4007h push 42h ; 'B' pop rcx mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_DefinePropertyValue test eax, eax js loc_5E8E6 mov r8, [rsp+78h+var_40] mov r9, [rsp+78h+var_38] cmp r9d, 0FFFFFFF7h jb short loc_5EA08 inc dword ptr [r8] loc_5EA08: mov [rsp+78h+var_78], 4007h push 43h ; 'C' pop rcx loc_5EA12: mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_DefinePropertyValue test eax, eax js loc_5E8E6 mov r8d, [rsp+78h+var_68] shr r8d, 2 and r8d, 1 mov [rsp+78h+var_78], 4007h push 40h ; '@' pop rcx push 1 pop r9 mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_DefinePropertyValue test eax, eax js loc_5E8E6 mov r8d, [rsp+78h+var_68] and r8d, 1 mov [rsp+78h+var_78], 4007h push 3Eh ; '>' pop rcx push 1 pop r9 mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_DefinePropertyValue test eax, eax js loc_5E8E6 mov [rsp+78h+var_70], r15 mov r15d, ebp mov rax, 0FFFFFFFF00000000h mov rbp, r13 and rbp, rax lea rsi, [rsp+78h+var_68] mov rdi, rbx call js_free_desc mov r13d, r13d jmp loc_5E939
_DWORD * js_object_getOwnPropertyDescriptor( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v15; // r14 _DWORD *v16; // r15 long long v17; // rdx _DWORD *v18; // r13 unsigned int v19; // eax unsigned int *v20; // r8 int v21; // ebp int v22; // eax long long v23; // rax long long v24; // rdx __m128 v25; // xmm4 __m128 v26; // xmm5 long long v27; // r13 long long v28; // r12 int v29; // r15d unsigned long long v30; // rbp _DWORD *v32; // r8 long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 int v36; // eax __m128 v37; // xmm4 __m128 v38; // xmm5 _DWORD *v39; // r8 long long v40; // r9 __m128 v41; // xmm4 __m128 v42; // xmm5 _DWORD *v43; // r8 long long v44; // r9 __m128 v45; // xmm4 __m128 v46; // xmm5 char v47; // [rsp+0h] [rbp-78h] long long v48; // [rsp+8h] [rbp-70h] long long v49; // [rsp+10h] [rbp-68h] BYREF _DWORD *v50; // [rsp+18h] [rbp-60h] long long v51; // [rsp+20h] [rbp-58h] _DWORD *v52; // [rsp+28h] [rbp-50h] long long v53; // [rsp+30h] [rbp-48h] _DWORD *v54; // [rsp+38h] [rbp-40h] long long v55; // [rsp+40h] [rbp-38h] if ( (_DWORD)a6 ) { v15 = a5[1]; if ( (_DWORD)v15 != -1 ) { JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, a4, (long long)a5, a6, v47); return 0LL; } v16 = (_DWORD *)*a5; ++*(_DWORD *)*a5; LABEL_5: v19 = JS_ValueToAtom(a1, a5[2], a5[3]); v21 = v19; if ( v19 ) { if ( (_DWORD)v15 != -1 ) goto LABEL_14; LOBYTE(v22) = JS_GetOwnPropertyInternal(a1, (long long)&v49, (long long)v16, v19, v20); if ( v22 >= 0 ) { if ( v22 ) { v23 = JS_NewObject(a1); v27 = v23; v28 = v24; if ( (_DWORD)v24 == 6 ) goto LABEL_10; if ( (v49 & 0x10) != 0 ) { v39 = v52; v40 = v53; if ( (unsigned int)v53 >= 0xFFFFFFF7 ) ++*v52; if ( (int)JS_DefinePropertyValue( a1, v23, v24, 66LL, v39, v40, *(double *)a7.m128_u64, a8, a9, a10, v25, v26, a13, a14, 16391) < 0 ) goto LABEL_10; v43 = v54; v44 = v55; if ( (unsigned int)v55 >= 0xFFFFFFF7 ) ++*v54; v36 = JS_DefinePropertyValue( a1, v27, v28, 67LL, v43, v44, *(double *)a7.m128_u64, a8, a9, a10, v41, v42, a13, a14, 16391); } else { v32 = v50; v33 = v51; if ( (unsigned int)v51 >= 0xFFFFFFF7 ) ++*v50; if ( (int)JS_DefinePropertyValue( a1, v23, v24, 65LL, v32, v33, *(double *)a7.m128_u64, a8, a9, a10, v25, v26, a13, a14, 16391) < 0 ) goto LABEL_10; v36 = JS_DefinePropertyValue( a1, v27, v28, 63LL, (_DWORD *)(((unsigned int)v49 >> 1) & 1), 1LL, *(double *)a7.m128_u64, a8, a9, a10, v34, v35, a13, a14, 16391); } if ( v36 < 0 || (int)JS_DefinePropertyValue( a1, v27, v28, 64LL, (_DWORD *)(((unsigned int)v49 >> 2) & 1), 1LL, *(double *)a7.m128_u64, a8, a9, a10, v37, v38, a13, a14, 16391) < 0 || (int)JS_DefinePropertyValue( a1, v27, v28, 62LL, (_DWORD *)(v49 & 1), 1LL, *(double *)a7.m128_u64, a8, a9, a10, v45, v46, a13, a14, 16391) < 0 ) { LABEL_10: js_free_desc(a1, &v49); JS_FreeValue(a1, v27, v28); goto LABEL_11; } v48 = (long long)v16; v29 = v21; v30 = v27 & 0xFFFFFFFF00000000LL; js_free_desc(a1, &v49); v27 = (unsigned int)v27; LABEL_15: v18 = (_DWORD *)(v30 | v27); JS_FreeAtom(a1, v29); JS_FreeValue(a1, v48, v15); return v18; } LABEL_14: v48 = (long long)v16; v29 = v21; v27 = 0LL; v30 = 0LL; goto LABEL_15; } } LABEL_11: JS_FreeAtom(a1, v21); JS_FreeValue(a1, (long long)v16, v15); return 0LL; } v16 = (_DWORD *)JS_ToObject(a1, *a5, a5[1], a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v15 = v17; v18 = v16; if ( (_DWORD)v17 != 6 ) goto LABEL_5; return v18; }
js_object_getOwnPropertyDescriptor: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBP,R8 MOV RBX,RDI TEST R9D,R9D JZ 0x0015e870 MOV R14,qword ptr [RBP + 0x8] CMP R14D,-0x1 JNZ 0x0015e91b MOV R15,qword ptr [RBP] INC dword ptr [R15] JMP 0x0015e896 LAB_0015e870: MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] MOV RDI,RBX CALL 0x00120b92 MOV R15,RAX MOV R14,RDX MOV R13,RAX MOV R12,RDX CMP R14D,0x6 JZ 0x0015e957 LAB_0015e896: MOV RSI,qword ptr [RBP + 0x10] MOV RDX,qword ptr [RBP + 0x18] MOV RDI,RBX CALL 0x0011e0bc MOV EBP,EAX TEST EAX,EAX JZ 0x0015e901 PUSH 0x3 POP R12 CMP R14D,-0x1 JNZ 0x0015e92c LEA RSI,[RSP + 0x10] MOV RDI,RBX MOV RDX,R15 MOV ECX,EBP CALL 0x0011db80 TEST EAX,EAX JS 0x0015e901 JZ 0x0015e92c MOV RDI,RBX CALL 0x0011b2c9 MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JNZ 0x0015e96c LAB_0015e8e6: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x001360ed MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x0011801e LAB_0015e901: MOV RDI,RBX MOV ESI,EBP CALL 0x0011a995 MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011801e JMP 0x0015e923 LAB_0015e91b: MOV RDI,RBX CALL 0x0011d5e1 LAB_0015e923: PUSH 0x6 POP R12 XOR R13D,R13D JMP 0x0015e957 LAB_0015e92c: MOV qword ptr [RSP + 0x8],R15 MOV R15D,EBP XOR R13D,R13D XOR EBP,EBP LAB_0015e939: OR R13,RBP MOV RDI,RBX MOV ESI,R15D CALL 0x0011a995 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R14 CALL 0x0011801e LAB_0015e957: MOV RAX,R13 MOV RDX,R12 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015e96c: TEST byte ptr [RSP + 0x10],0x10 JNZ 0x0015e9c2 MOV R8,qword ptr [RSP + 0x18] MOV R9,qword ptr [RSP + 0x20] CMP R9D,-0x9 JC 0x0015e986 INC dword ptr [R8] LAB_0015e986: MOV dword ptr [RSP],0x4007 PUSH 0x41 POP RCX MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x00120872 TEST EAX,EAX JS 0x0015e8e6 MOV R8D,dword ptr [RSP + 0x10] SHR R8D,0x1 AND R8D,0x1 MOV dword ptr [RSP],0x4007 PUSH 0x3f POP RCX PUSH 0x1 POP R9 JMP 0x0015ea12 LAB_0015e9c2: MOV R8,qword ptr [RSP + 0x28] MOV R9,qword ptr [RSP + 0x30] CMP R9D,-0x9 JC 0x0015e9d5 INC dword ptr [R8] LAB_0015e9d5: MOV dword ptr [RSP],0x4007 PUSH 0x42 POP RCX MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x00120872 TEST EAX,EAX JS 0x0015e8e6 MOV R8,qword ptr [RSP + 0x38] MOV R9,qword ptr [RSP + 0x40] CMP R9D,-0x9 JC 0x0015ea08 INC dword ptr [R8] LAB_0015ea08: MOV dword ptr [RSP],0x4007 PUSH 0x43 POP RCX LAB_0015ea12: MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x00120872 TEST EAX,EAX JS 0x0015e8e6 MOV R8D,dword ptr [RSP + 0x10] SHR R8D,0x2 AND R8D,0x1 MOV dword ptr [RSP],0x4007 PUSH 0x40 POP RCX PUSH 0x1 POP R9 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x00120872 TEST EAX,EAX JS 0x0015e8e6 MOV R8D,dword ptr [RSP + 0x10] AND R8D,0x1 MOV dword ptr [RSP],0x4007 PUSH 0x3e POP RCX PUSH 0x1 POP R9 MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x00120872 TEST EAX,EAX JS 0x0015e8e6 MOV qword ptr [RSP + 0x8],R15 MOV R15D,EBP MOV RAX,-0x100000000 MOV RBP,R13 AND RBP,RAX LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x001360ed MOV R13D,R13D JMP 0x0015e939
int1 [16] js_object_getOwnPropertyDescriptor(int8 param_1) { int *piVar1; int iVar2; int iVar3; int8 uVar4; ulong uVar5; int8 *in_R8; int in_R9D; int8 uVar6; ulong uVar7; int8 uVar8; int1 auVar9 [16]; int1 auVar10 [16]; uint local_68 [2]; int *local_60; int8 local_58; int *local_50; int8 local_48; int *local_40; int8 local_38; if (in_R9D == 0) { auVar9 = JS_ToObject(param_1,*in_R8,in_R8[1]); if (auVar9._8_4_ == 6) { return auVar9; } } else { if ((int)in_R8[1] != -1) { JS_ThrowTypeErrorNotAnObject(param_1); goto LAB_0015e923; } piVar1 = (int *)*in_R8; auVar9._8_8_ = in_R8[1]; auVar9._0_8_ = piVar1; *piVar1 = *piVar1 + 1; } uVar8 = auVar9._0_8_; iVar2 = JS_ValueToAtom(param_1,in_R8[2],in_R8[3]); if (iVar2 != 0) { uVar6 = 3; if (auVar9._8_4_ != -1) { LAB_0015e92c: uVar7 = 0; uVar5 = 0; LAB_0015e939: auVar10._8_8_ = uVar6; auVar10._0_8_ = uVar7 | uVar5; JS_FreeAtom(param_1,iVar2); JS_FreeValue(param_1,uVar8,auVar9._8_8_); return auVar10; } iVar3 = JS_GetOwnPropertyInternal(param_1,local_68,uVar8,iVar2); if (-1 < iVar3) { if (iVar3 == 0) goto LAB_0015e92c; auVar10 = JS_NewObject(param_1); uVar6 = auVar10._8_8_; uVar7 = auVar10._0_8_; if (auVar10._8_4_ != 6) { if ((local_68[0] & 0x10) == 0) { if (0xfffffff6 < (uint)local_58) { *local_60 = *local_60 + 1; } iVar3 = JS_DefinePropertyValue(param_1,uVar7,uVar6,0x41,local_60,local_58,0x4007); if (-1 < iVar3) { local_40 = (int *)(ulong)(local_68[0] >> 1 & 1); uVar4 = 0x3f; local_38 = 1; LAB_0015ea12: iVar3 = JS_DefinePropertyValue(param_1,uVar7,uVar6,uVar4,local_40,local_38,0x4007); if (((-1 < iVar3) && (iVar3 = JS_DefinePropertyValue (param_1,uVar7,uVar6,0x40,local_68[0] >> 2 & 1,1,0x4007), -1 < iVar3)) && (iVar3 = JS_DefinePropertyValue(param_1,uVar7,uVar6,0x3e,local_68[0] & 1,1,0x4007), -1 < iVar3)) { uVar5 = uVar7 & 0xffffffff00000000; js_free_desc(param_1,local_68); uVar7 = uVar7 & 0xffffffff; goto LAB_0015e939; } } } else { if (0xfffffff6 < (uint)local_48) { *local_50 = *local_50 + 1; } iVar3 = JS_DefinePropertyValue(param_1,uVar7,uVar6,0x42,local_50,local_48,0x4007); if (-1 < iVar3) { if (0xfffffff6 < (uint)local_38) { *local_40 = *local_40 + 1; } uVar4 = 0x43; goto LAB_0015ea12; } } } js_free_desc(param_1,local_68); JS_FreeValue(param_1,uVar7,uVar6); } } JS_FreeAtom(param_1,iVar2); JS_FreeValue(param_1,uVar8,auVar9._8_8_); LAB_0015e923: return ZEXT816(6) << 0x40; }
49,982
ColorNormalize
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
Vector4 ColorNormalize(Color color) { Vector4 result; result.x = (float)color.r/255.0f; result.y = (float)color.g/255.0f; result.z = (float)color.b/255.0f; result.w = (float)color.a/255.0f; return result; }
O0
c
ColorNormalize: pushq %rbp movq %rsp, %rbp movl %edi, -0x14(%rbp) movzbl -0x14(%rbp), %eax cvtsi2ss %eax, %xmm0 movss 0x9c649(%rip), %xmm1 # 0x1a7f90 divss %xmm1, %xmm0 movss %xmm0, -0x10(%rbp) movzbl -0x13(%rbp), %eax cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 movss %xmm0, -0xc(%rbp) movzbl -0x12(%rbp), %eax cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 movss %xmm0, -0x8(%rbp) movzbl -0x11(%rbp), %eax cvtsi2ss %eax, %xmm0 divss %xmm1, %xmm0 movss %xmm0, -0x4(%rbp) movsd -0x10(%rbp), %xmm0 movsd -0x8(%rbp), %xmm1 popq %rbp retq nop
ColorNormalize: push rbp mov rbp, rsp mov [rbp+var_14], edi movzx eax, byte ptr [rbp+var_14] cvtsi2ss xmm0, eax movss xmm1, cs:dword_1A7F90 divss xmm0, xmm1 movss dword ptr [rbp+var_10], xmm0 movzx eax, byte ptr [rbp+var_14+1] cvtsi2ss xmm0, eax divss xmm0, xmm1 movss dword ptr [rbp+var_10+4], xmm0 movzx eax, byte ptr [rbp+var_14+2] cvtsi2ss xmm0, eax divss xmm0, xmm1 movss dword ptr [rbp+var_8], xmm0 movzx eax, byte ptr [rbp+var_14+3] cvtsi2ss xmm0, eax divss xmm0, xmm1 movss dword ptr [rbp+var_8+4], xmm0 movsd xmm0, [rbp+var_10] movsd xmm1, [rbp+var_8] pop rbp retn
double ColorNormalize(__int16 a1) { double v2; // [rsp+4h] [rbp-10h] *(float *)&v2 = (float)(unsigned __int8)a1 / 255.0; *((float *)&v2 + 1) = (float)HIBYTE(a1) / 255.0; return v2; }
49,983
ColorNormalize
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtextures.c
Vector4 ColorNormalize(Color color) { Vector4 result; result.x = (float)color.r/255.0f; result.y = (float)color.g/255.0f; result.z = (float)color.b/255.0f; result.w = (float)color.a/255.0f; return result; }
O3
c
ColorNormalize: movd %edi, %xmm0 pxor %xmm1, %xmm1 punpcklbw %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3],xmm0[4],xmm1[4],xmm0[5],xmm1[5],xmm0[6],xmm1[6],xmm0[7],xmm1[7] punpcklwd %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1],xmm0[2],xmm1[2],xmm0[3],xmm1[3] cvtdq2ps %xmm0, %xmm0 divps 0x404d8(%rip), %xmm0 # 0xdd380 movaps %xmm0, %xmm1 unpckhpd %xmm0, %xmm1 # xmm1 = xmm1[1],xmm0[1] retq
ColorNormalize: movd xmm0, edi pxor xmm1, xmm1 punpcklbw xmm0, xmm1 punpcklwd xmm0, xmm1 cvtdq2ps xmm0, xmm0 divps xmm0, cs:xmmword_DD380 movaps xmm1, xmm0 unpckhpd xmm1, xmm0 retn
__m128 ColorNormalize(unsigned int a1) { return _mm_div_ps( _mm_cvtepi32_ps(_mm_unpacklo_epi16(_mm_unpacklo_epi8(_mm_cvtsi32_si128(a1), (__m128i)0LL), (__m128i)0LL)), (__m128)xmmword_DD380); }
ColorNormalize: MOVD XMM0,EDI PXOR XMM1,XMM1 PUNPCKLBW XMM0,XMM1 PUNPCKLWD XMM0,XMM1 CVTDQ2PS XMM0,XMM0 DIVPS XMM0,xmmword ptr [0x001dd380] MOVAPS XMM1,XMM0 UNPCKHPD XMM1,XMM0 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void ColorNormalize(uint param_1) { int1 auVar1 [13]; int1 auVar2 [16]; auVar1[0xc] = (char)(param_1 >> 0x18); auVar1._0_12_ = ZEXT712(0); auVar2._0_4_ = (float)(param_1 & 0xff); auVar2._4_4_ = (float)(param_1 >> 8 & 0xff); auVar2._8_4_ = (float)(int)CONCAT32(auVar1._10_3_,(ushort)(byte)(param_1 >> 0x10)); auVar2._12_4_ = (float)(uint3)(auVar1._10_3_ >> 0x10); divps(auVar2,_DAT_001dd380); return; }
49,984
my_casedn_str_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_casedn_str_utf8mb3(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->casedn_multiply == 1); while (*src && (srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0) { my_tolower_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } /* In rare cases lower string can be shorter than the original string, for example: "U+0130 LATIN CAPITAL LETTER I WITH DOT ABOVE" (which is 0xC4B0 in utf8mb3, i.e. two bytes) is converted into "U+0069 LATIN SMALL LETTER I" (which is 0x69 in utf8mb3, i.e. one byte) So, we need to put '\0' terminator after converting. */ *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_casedn_str_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %r14 je 0xd1a22 movq 0x78(%rdi), %r13 leaq -0x30(%rbp), %r15 movq %rbx, %r12 movq %rbx, %r14 movq %r15, %rdi movq %r12, %rsi callq 0xd2210 testl %eax, %eax je 0xd1a22 movq 0x8(%r13), %rdx movq -0x30(%rbp), %rcx movzbl %ch, %esi movq (%rdx,%rsi,8), %rdx testq %rdx, %rdx je 0xd19b1 movzbl %cl, %ecx leaq (%rcx,%rcx,2), %rcx movl 0x4(%rdx,%rcx,4), %ecx movq %rcx, -0x30(%rbp) movl $0x1, %edx cmpq $0x80, %rcx jb 0xd1a0b movl $0x2, %edx cmpq $0x800, %rcx # imm = 0x800 jb 0xd19f2 cmpq $0xffff, %rcx # imm = 0xFFFF ja 0xd1a22 movl %ecx, %edx andb $0x3f, %dl orb $-0x80, %dl movb %dl, 0x2(%r14) shrq $0x6, %rcx orq $0x800, %rcx # imm = 0x800 movl $0x3, %edx movl %ecx, %esi andb $0x3f, %sil orb $-0x80, %sil movb %sil, 0x1(%r14) shrq $0x6, %rcx orq $0xc0, %rcx movb %cl, (%r14) movl %eax, %eax addq %rdx, %r14 cmpb $0x0, (%r12,%rax) leaq (%r12,%rax), %r12 jne 0xd197b movb $0x0, (%r14) subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casedn_str_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp byte ptr [rsi], 0 mov r14, rsi jz loc_D1A22 mov r13, [rdi+78h] lea r15, [rbp+var_30] mov r12, rbx mov r14, rbx loc_D197B: mov rdi, r15 mov rsi, r12 call my_utf8mb3_uni_no_range test eax, eax jz loc_D1A22 mov rdx, [r13+8] mov rcx, [rbp+var_30] movzx esi, ch mov rdx, [rdx+rsi*8] test rdx, rdx jz short loc_D19B1 movzx ecx, cl lea rcx, [rcx+rcx*2] mov ecx, [rdx+rcx*4+4] mov [rbp+var_30], rcx loc_D19B1: mov edx, 1 cmp rcx, 80h jb short loc_D1A0B mov edx, 2 cmp rcx, 800h jb short loc_D19F2 cmp rcx, 0FFFFh ja short loc_D1A22 mov edx, ecx and dl, 3Fh or dl, 80h mov [r14+2], dl shr rcx, 6 or rcx, 800h mov edx, 3 loc_D19F2: mov esi, ecx and sil, 3Fh or sil, 80h mov [r14+1], sil shr rcx, 6 or rcx, 0C0h loc_D1A0B: mov [r14], cl mov eax, eax add r14, rdx cmp byte ptr [r12+rax], 0 lea r12, [r12+rax] jnz loc_D197B loc_D1A22: mov byte ptr [r14], 0 sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_casedn_str_utf8mb3(long long a1, _BYTE *a2) { unsigned long long v2; // rax _BYTE *v3; // r14 long long v4; // r13 _BYTE *v5; // r12 unsigned int v6; // eax unsigned long long v7; // rcx long long v8; // rdx long long v9; // rdx bool v10; // zf unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF v12 = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD *)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_utf8mb3_uni_no_range(&v12, v5); if ( !v6 ) break; v7 = v12; v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12)); if ( v8 ) { v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12 + 4); v12 = v7; } v9 = 1LL; if ( v7 >= 0x80 ) { v9 = 2LL; if ( v7 >= 0x800 ) { if ( v7 > 0xFFFF ) break; v3[2] = v7 & 0x3F | 0x80; v7 = (v7 >> 6) | 0x800; v9 = 3LL; } v3[1] = v7 & 0x3F | 0x80; v7 = (v7 >> 6) | 0xC0; } *v3 = v7; v3 += v9; v10 = v5[v6] == 0; v5 += v6; } while ( !v10 ); } *v3 = 0; return v3 - a2; }
my_casedn_str_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV R14,RSI JZ 0x001d1a22 MOV R13,qword ptr [RDI + 0x78] LEA R15,[RBP + -0x30] MOV R12,RBX MOV R14,RBX LAB_001d197b: MOV RDI,R15 MOV RSI,R12 CALL 0x001d2210 TEST EAX,EAX JZ 0x001d1a22 MOV RDX,qword ptr [R13 + 0x8] MOV RCX,qword ptr [RBP + -0x30] MOVZX ESI,CH MOV RDX,qword ptr [RDX + RSI*0x8] TEST RDX,RDX JZ 0x001d19b1 MOVZX ECX,CL LEA RCX,[RCX + RCX*0x2] MOV ECX,dword ptr [RDX + RCX*0x4 + 0x4] MOV qword ptr [RBP + -0x30],RCX LAB_001d19b1: MOV EDX,0x1 CMP RCX,0x80 JC 0x001d1a0b MOV EDX,0x2 CMP RCX,0x800 JC 0x001d19f2 CMP RCX,0xffff JA 0x001d1a22 MOV EDX,ECX AND DL,0x3f OR DL,0x80 MOV byte ptr [R14 + 0x2],DL SHR RCX,0x6 OR RCX,0x800 MOV EDX,0x3 LAB_001d19f2: MOV ESI,ECX AND SIL,0x3f OR SIL,0x80 MOV byte ptr [R14 + 0x1],SIL SHR RCX,0x6 OR RCX,0xc0 LAB_001d1a0b: MOV byte ptr [R14],CL MOV EAX,EAX ADD R14,RDX CMP byte ptr [R12 + RAX*0x1],0x0 LEA R12,[R12 + RAX*0x1] JNZ 0x001d197b LAB_001d1a22: MOV byte ptr [R14],0x0 SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casedn_str_utf8mb3(long param_1,char *param_2) { char *pcVar1; long lVar2; uint uVar3; ulong in_RAX; ulong uVar4; long lVar5; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { lVar2 = *(long *)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6); if (uVar3 == 0) break; lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8); if (lVar5 != 0) { local_38 = (ulong)*(uint *)(lVar5 + 4 + (local_38 & 0xff) * 0xc); } lVar5 = 1; uVar4 = local_38; if (0x7f < local_38) { lVar5 = 2; if (0x7ff < local_38) { if (0xffff < local_38) break; pcVar7[2] = (byte)local_38 & 0x3f | 0x80; uVar4 = local_38 >> 6 | 0x800; lVar5 = 3; } pcVar7[1] = (byte)uVar4 & 0x3f | 0x80; uVar4 = uVar4 >> 6 | 0xc0; } *pcVar7 = (char)uVar4; pcVar7 = pcVar7 + lVar5; pcVar1 = pcVar6 + uVar3; pcVar6 = pcVar6 + uVar3; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
49,985
PFS_buffer_scalable_container<PFS_setup_object, 128, 1024, PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object>>::allocate(pfs_dirty_state*)
eloqsql/storage/perfschema/pfs_buffer_container.h
value_type *allocate(pfs_dirty_state *dirty_state) { if (m_full) { m_lost++; return NULL; } uint index; uint monotonic; uint monotonic_max; uint current_page_count; value_type *pfs; array_type *array; void *addr; void * volatile * typed_addr; void *ptr; /* 1: Try to find an available record within the existing pages */ current_page_count= PFS_atomic::load_u32(& m_max_page_index.m_u32); if (current_page_count != 0) { monotonic= PFS_atomic::load_u32(& m_monotonic.m_u32); monotonic_max= monotonic + current_page_count; while (monotonic < monotonic_max) { /* Scan in the [0 .. current_page_count - 1] range, in parallel with m_monotonic (see below) */ index= monotonic % current_page_count; /* Atomic Load, array= m_pages[index] */ addr= & m_pages[index]; typed_addr= static_cast<void * volatile *>(addr); ptr= my_atomic_loadptr(typed_addr); array= static_cast<array_type *>(ptr); if (array != NULL) { pfs= array->allocate(dirty_state); if (pfs != NULL) { /* Keep a pointer to the parent page, for deallocate(). */ pfs->m_page= reinterpret_cast<PFS_opaque_container_page *> (array); return pfs; } } /* Parallel scans collaborate to increase the common monotonic scan counter. Note that when all the existing page are full, one thread will eventually add a new page, and cause m_max_page_index to increase, which fools all the modulo logic for scans already in progress, because the monotonic counter is not folded to the same place (sometime modulo N, sometime modulo N+1). This is actually ok: since all the pages are full anyway, there is nothing to miss, so better increase the monotonic counter faster and then move on to the detection of new pages, in part 2: below. */ monotonic= PFS_atomic::add_u32(& m_monotonic.m_u32, 1); }; } /* 2: Try to add a new page, beyond the m_max_page_index limit */ while (current_page_count < m_max_page_count) { /* Peek for pages added by collaborating threads */ /* (2-a) Atomic Load, array= m_pages[current_page_count] */ addr= & m_pages[current_page_count]; typed_addr= static_cast<void * volatile *>(addr); ptr= my_atomic_loadptr(typed_addr); array= static_cast<array_type *>(ptr); if (array == NULL) { // ================================================================== // BEGIN CRITICAL SECTION -- buffer expand // ================================================================== /* On a fresh started server, buffers are typically empty. When a sudden load spike is seen by the server, multiple threads may want to expand the buffer at the same time. Using a compare and swap to allow multiple pages to be added, possibly freeing duplicate pages on collisions, does not work well because the amount of code involved when creating a new page can be significant (PFS_thread), causing MANY collisions between (2-b) and (2-d). A huge number of collisions (which can happen when thousands of new connections hits the server after a restart) leads to a huge memory consumption, and to OOM. To mitigate this, we use here a mutex, to enforce that only ONE page is added at a time, so that scaling the buffer happens in a predictable and controlled manner. */ pthread_mutex_lock(& m_critical_section); /* Peek again for pages added by collaborating threads, this time as the only thread allowed to expand the buffer */ /* (2-b) Atomic Load, array= m_pages[current_page_count] */ ptr= my_atomic_loadptr(typed_addr); array= static_cast<array_type *>(ptr); if (array == NULL) { /* (2-c) Found no page, allocate a new one */ array= new array_type(); builtin_memory_scalable_buffer.count_alloc(sizeof (array_type)); array->m_max= get_page_logical_size(current_page_count); int rc= m_allocator->alloc_array(array); if (rc != 0) { m_allocator->free_array(array); delete array; builtin_memory_scalable_buffer.count_free(sizeof (array_type)); m_lost++; pthread_mutex_unlock(& m_critical_section); return NULL; } /* Keep a pointer to this container, for static_deallocate(). */ array->m_container= reinterpret_cast<PFS_opaque_container *> (this); /* (2-d) Atomic STORE, m_pages[current_page_count] = array */ ptr= array; my_atomic_storeptr(typed_addr, ptr); /* Advertise the new page */ PFS_atomic::add_u32(& m_max_page_index.m_u32, 1); } pthread_mutex_unlock(& m_critical_section); // ================================================================== // END CRITICAL SECTION -- buffer expand // ================================================================== } assert(array != NULL); pfs= array->allocate(dirty_state); if (pfs != NULL) { /* Keep a pointer to the parent page, for deallocate(). */ pfs->m_page= reinterpret_cast<PFS_opaque_container_page *> (array); return pfs; } current_page_count++; } m_lost++; m_full= true; return NULL; }
O0
c
PFS_buffer_scalable_container<PFS_setup_object, 128, 1024, PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object>>::allocate(pfs_dirty_state*): pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x88(%rbp) testb $0x1, 0x9(%rax) je 0x4a052 movq -0x88(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x4a3a8 movq -0x88(%rbp), %rdi addq $0x58, %rdi callq 0x2f080 movl %eax, -0x28(%rbp) cmpl $0x0, -0x28(%rbp) je 0x4a139 movq -0x88(%rbp), %rdi addq $0x18, %rdi callq 0x2f080 movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax addl -0x28(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x20(%rbp), %eax cmpl -0x24(%rbp), %eax jae 0x4a137 movl -0x20(%rbp), %eax movl -0x28(%rbp), %ecx xorl %edx, %edx divl %ecx movq -0x88(%rbp), %rax movl %edx, -0x1c(%rbp) movl -0x1c(%rbp), %ecx leaq 0xa8(%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) je 0x4a11a movq -0x38(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x4a630 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0x4a118 movq -0x38(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x1b0(%rax) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x4a3a8 jmp 0x4a11a movq -0x88(%rbp), %rdi addq $0x18, %rdi movl $0x1, %esi callq 0x33c80 movl %eax, -0x20(%rbp) jmp 0x4a08b jmp 0x4a139 jmp 0x4a13b movq -0x88(%rbp), %rcx movl -0x28(%rbp), %eax cmpq 0x98(%rcx), %rax jae 0x4a38b movq -0x88(%rbp), %rax movl -0x28(%rbp), %ecx leaq 0xa8(%rax,%rcx,8), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x4a34c movq -0x88(%rbp), %rdi addq $0x20b0, %rdi # imm = 0x20B0 callq 0x264b0 movq -0x48(%rbp), %rax movq (%rax), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) jne 0x4a339 movl $0x60, %edi callq 0x26310 movq %rax, %rdi movq %rdi, -0x98(%rbp) movq %rdi, %rax movq %rax, -0x90(%rbp) xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rdi) movaps %xmm0, 0x40(%rdi) movaps %xmm0, 0x30(%rdi) movaps %xmm0, 0x20(%rdi) movaps %xmm0, 0x10(%rdi) movaps %xmm0, (%rdi) callq 0x4a700 jmp 0x4a20e movq -0x90(%rbp), %rax movq %rax, -0x38(%rbp) leaq 0x3c3a20(%rip), %rdi # 0x40dc40 movl $0x60, %esi callq 0x37310 movq -0x88(%rbp), %rdi movl -0x28(%rbp), %esi callq 0x4a720 movl %eax, %ecx movq -0x88(%rbp), %rax movl %ecx, %ecx movl %ecx, %edx movq -0x38(%rbp), %rcx movq %rdx, 0x50(%rcx) movq 0x20a8(%rax), %rdi movq -0x38(%rbp), %rsi callq 0x4a760 movl %eax, -0x78(%rbp) cmpl $0x0, -0x78(%rbp) je 0x4a301 movq -0x88(%rbp), %rax movq 0x20a8(%rax), %rdi movq -0x38(%rbp), %rsi callq 0x4a5e0 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) cmpq $0x0, %rax je 0x4a2a4 movq -0xa0(%rbp), %rdi movl $0x60, %esi callq 0x26320 leaq 0x3c3995(%rip), %rdi # 0x40dc40 movl $0x60, %esi callq 0x37380 movq -0x88(%rbp), %rdi movq (%rdi), %rax addq $0x1, %rax movq %rax, (%rdi) addq $0x20b0, %rdi # imm = 0x20B0 callq 0x26260 movq $0x0, -0x8(%rbp) jmp 0x4a3a8 movq -0x90(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x70(%rbp) movl %eax, -0x74(%rbp) movl $0x60, %esi callq 0x26320 jmp 0x4a3b5 movq -0x88(%rbp), %rdi movq -0x38(%rbp), %rax movq %rdi, 0x58(%rax) movq -0x38(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rcx movq -0x50(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax xchgq %rax, (%rcx) addq $0x58, %rdi movl $0x1, %esi callq 0x33c80 movq -0x88(%rbp), %rdi addq $0x20b0, %rdi # imm = 0x20B0 callq 0x26260 movq -0x38(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x4a630 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0x4a37d movq -0x38(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x1b0(%rax) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x4a3a8 movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x4a13b movq -0x88(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movb $0x1, 0x9(%rax) movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq movq -0x70(%rbp), %rdi callq 0x265d0 nop
_ZN29PFS_buffer_scalable_containerI16PFS_setup_objectLi128ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE8allocateEP15pfs_dirty_state: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_88], rax test byte ptr [rax+9], 1 jz short loc_4A052 mov rax, [rbp+var_88] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov [rbp+var_8], 0 jmp loc_4A3A8 loc_4A052: mov rdi, [rbp+var_88] add rdi, 58h ; 'X'; this call _ZN10PFS_atomic8load_u32EPj; PFS_atomic::load_u32(uint *) mov [rbp+var_28], eax cmp [rbp+var_28], 0 jz loc_4A139 mov rdi, [rbp+var_88] add rdi, 18h; this call _ZN10PFS_atomic8load_u32EPj; PFS_atomic::load_u32(uint *) mov [rbp+var_20], eax mov eax, [rbp+var_20] add eax, [rbp+var_28] mov [rbp+var_24], eax loc_4A08B: mov eax, [rbp+var_20] cmp eax, [rbp+var_24] jnb loc_4A137 mov eax, [rbp+var_20] mov ecx, [rbp+var_28] xor edx, edx; unsigned int div ecx mov rax, [rbp+var_88] mov [rbp+var_1C], edx mov ecx, [rbp+var_1C] lea rax, [rax+rcx*8+0A8h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov rax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_58] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov [rbp+var_38], rax cmp [rbp+var_38], 0 jz short loc_4A11A mov rdi, [rbp+var_38] mov rsi, [rbp+var_18] call _ZN24PFS_buffer_default_arrayI16PFS_setup_objectE8allocateEP15pfs_dirty_state; PFS_buffer_default_array<PFS_setup_object>::allocate(pfs_dirty_state *) mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_4A118 mov rcx, [rbp+var_38] mov rax, [rbp+var_30] mov [rax+1B0h], rcx mov rax, [rbp+var_30] mov [rbp+var_8], rax jmp loc_4A3A8 loc_4A118: jmp short $+2 loc_4A11A: mov rdi, [rbp+var_88] add rdi, 18h; this mov esi, (offset dword_0+1); unsigned int * call _ZN10PFS_atomic7add_u32EPjj; PFS_atomic::add_u32(uint *,uint) mov [rbp+var_20], eax jmp loc_4A08B loc_4A137: jmp short $+2 loc_4A139: jmp short $+2 loc_4A13B: mov rcx, [rbp+var_88] mov eax, [rbp+var_28] cmp rax, [rcx+98h] jnb loc_4A38B mov rax, [rbp+var_88] mov ecx, [rbp+var_28] lea rax, [rax+rcx*8+0A8h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov rax, [rax] mov [rbp+var_60], rax mov rax, [rbp+var_60] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz loc_4A34C mov rdi, [rbp+var_88] add rdi, 20B0h call _pthread_mutex_lock mov rax, [rbp+var_48] mov rax, [rax] mov [rbp+var_68], rax mov rax, [rbp+var_68] mov [rbp+var_50], rax mov rax, [rbp+var_50] mov [rbp+var_38], rax cmp [rbp+var_38], 0 jnz loc_4A339 mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax mov [rbp+var_98], rdi mov rax, rdi mov [rbp+var_90], rax xorps xmm0, xmm0 movaps xmmword ptr [rdi+50h], xmm0 movaps xmmword ptr [rdi+40h], xmm0 movaps xmmword ptr [rdi+30h], xmm0 movaps xmmword ptr [rdi+20h], xmm0 movaps xmmword ptr [rdi+10h], xmm0 movaps xmmword ptr [rdi], xmm0 call _ZN24PFS_buffer_default_arrayI16PFS_setup_objectEC2Ev; PFS_buffer_default_array<PFS_setup_object>::PFS_buffer_default_array(void) jmp short $+2 loc_4A20E: mov rax, [rbp+var_90] mov [rbp+var_38], rax lea rdi, builtin_memory_scalable_buffer; this mov esi, 60h ; '`'; unsigned __int64 call _ZN24PFS_builtin_memory_class11count_allocEm; PFS_builtin_memory_class::count_alloc(ulong) mov rdi, [rbp+var_88] mov esi, [rbp+var_28] call _ZN29PFS_buffer_scalable_containerI16PFS_setup_objectLi128ELi1024E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE21get_page_logical_sizeEj; PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>>::get_page_logical_size(uint) mov ecx, eax mov rax, [rbp+var_88] mov ecx, ecx mov edx, ecx mov rcx, [rbp+var_38] mov [rcx+50h], rdx mov rdi, [rax+20A8h] mov rsi, [rbp+var_38] call _ZN28PFS_buffer_default_allocatorI16PFS_setup_objectE11alloc_arrayEP24PFS_buffer_default_arrayIS0_E; PFS_buffer_default_allocator<PFS_setup_object>::alloc_array(PFS_buffer_default_array<PFS_setup_object> *) mov [rbp+var_78], eax cmp [rbp+var_78], 0 jz loc_4A301 mov rax, [rbp+var_88] mov rdi, [rax+20A8h] mov rsi, [rbp+var_38] call _ZN28PFS_buffer_default_allocatorI16PFS_setup_objectE10free_arrayEP24PFS_buffer_default_arrayIS0_E; PFS_buffer_default_allocator<PFS_setup_object>::free_array(PFS_buffer_default_array<PFS_setup_object> *) mov rax, [rbp+var_38] mov [rbp+var_A0], rax cmp rax, 0 jz short loc_4A2A4 mov rdi, [rbp+var_A0]; void * mov esi, 60h ; '`'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4A2A4: lea rdi, builtin_memory_scalable_buffer; this mov esi, 60h ; '`'; unsigned __int64 call _ZN24PFS_builtin_memory_class10count_freeEm; PFS_builtin_memory_class::count_free(ulong) mov rdi, [rbp+var_88] mov rax, [rdi] add rax, 1 mov [rdi], rax add rdi, 20B0h call _pthread_mutex_unlock mov [rbp+var_8], 0 jmp loc_4A3A8 mov rdi, [rbp+var_90]; void * mov rcx, rax mov eax, edx mov [rbp+var_70], rcx mov [rbp+var_74], eax mov esi, 60h ; '`'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_4A3B5 loc_4A301: mov rdi, [rbp+var_88] mov rax, [rbp+var_38] mov [rax+58h], rdi mov rax, [rbp+var_38] mov [rbp+var_50], rax mov rcx, [rbp+var_48] mov rax, [rbp+var_50] mov [rbp+var_80], rax mov rax, [rbp+var_80] xchg rax, [rcx] add rdi, 58h ; 'X'; this mov esi, (offset dword_0+1); unsigned int * call _ZN10PFS_atomic7add_u32EPjj; PFS_atomic::add_u32(uint *,uint) loc_4A339: mov rdi, [rbp+var_88] add rdi, 20B0h call _pthread_mutex_unlock loc_4A34C: mov rdi, [rbp+var_38] mov rsi, [rbp+var_18] call _ZN24PFS_buffer_default_arrayI16PFS_setup_objectE8allocateEP15pfs_dirty_state; PFS_buffer_default_array<PFS_setup_object>::allocate(pfs_dirty_state *) mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz short loc_4A37D mov rcx, [rbp+var_38] mov rax, [rbp+var_30] mov [rax+1B0h], rcx mov rax, [rbp+var_30] mov [rbp+var_8], rax jmp short loc_4A3A8 loc_4A37D: mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp loc_4A13B loc_4A38B: mov rax, [rbp+var_88] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov byte ptr [rax+9], 1 mov [rbp+var_8], 0 loc_4A3A8: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn loc_4A3B5: mov rdi, [rbp+var_70] call __Unwind_Resume
long long PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>>::allocate( long long a1, unsigned int *a2) { _OWORD *v3; // [rsp+10h] [rbp-90h] volatile long long *v4; // [rsp+58h] [rbp-48h] long long v5; // [rsp+68h] [rbp-38h] volatile long long v6; // [rsp+68h] [rbp-38h] long long v7; // [rsp+70h] [rbp-30h] long long v8; // [rsp+70h] [rbp-30h] unsigned int u32; // [rsp+78h] [rbp-28h] unsigned int v10; // [rsp+7Ch] [rbp-24h] unsigned int v11; // [rsp+80h] [rbp-20h] if ( (*(_BYTE *)(a1 + 9) & 1) != 0 ) { ++*(_QWORD *)a1; return 0LL; } u32 = PFS_atomic::load_u32((PFS_atomic *)(a1 + 88), a2); if ( !u32 ) goto LABEL_10; v11 = PFS_atomic::load_u32((PFS_atomic *)(a1 + 24), a2); v10 = u32 + v11; while ( v11 < v10 ) { v5 = *(_QWORD *)(a1 + 8LL * (v11 % u32) + 168); if ( v5 ) { v7 = PFS_buffer_default_array<PFS_setup_object>::allocate(v5, a2); if ( v7 ) { *(_QWORD *)(v7 + 432) = v5; return v7; } } v11 = PFS_atomic::add_u32((PFS_atomic *)(a1 + 24), (unsigned int *)((char *)&dword_0 + 1)); } while ( 1 ) { LABEL_10: if ( (unsigned long long)u32 >= *(_QWORD *)(a1 + 152) ) { ++*(_QWORD *)a1; *(_BYTE *)(a1 + 9) = 1; return 0LL; } v4 = (volatile long long *)(a1 + 8LL * u32 + 168); v6 = *v4; if ( !*v4 ) break; LABEL_19: v8 = PFS_buffer_default_array<PFS_setup_object>::allocate(v6, a2); if ( v8 ) { *(_QWORD *)(v8 + 432) = v6; return v8; } ++u32; } pthread_mutex_lock(a1 + 8368); v6 = *v4; if ( *v4 ) { LABEL_18: pthread_mutex_unlock(a1 + 8368); goto LABEL_19; } v3 = (_OWORD *)operator new(0x60uLL); v3[5] = 0LL; v3[4] = 0LL; v3[3] = 0LL; v3[2] = 0LL; v3[1] = 0LL; *v3 = 0LL; PFS_buffer_default_array<PFS_setup_object>::PFS_buffer_default_array(); v6 = (volatile long long)v3; PFS_builtin_memory_class::count_alloc((PFS_builtin_memory_class *)&builtin_memory_scalable_buffer, 0x60uLL); *((_QWORD *)v3 + 10) = (unsigned int)PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>>::get_page_logical_size( a1, u32); if ( !(unsigned int)PFS_buffer_default_allocator<PFS_setup_object>::alloc_array(*(_QWORD *)(a1 + 8360), v3) ) { *((_QWORD *)v3 + 11) = a1; _InterlockedExchange64(v4, (long long)v3); PFS_atomic::add_u32((PFS_atomic *)(a1 + 88), (unsigned int *)((char *)&dword_0 + 1)); goto LABEL_18; } PFS_buffer_default_allocator<PFS_setup_object>::free_array(*(_QWORD *)(a1 + 8360), v3); if ( v3 ) operator delete(v3, 0x60uLL); PFS_builtin_memory_class::count_free((PFS_builtin_memory_class *)&builtin_memory_scalable_buffer, 0x60uLL); ++*(_QWORD *)a1; pthread_mutex_unlock(a1 + 8368); return 0LL; }
allocate: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x88],RAX TEST byte ptr [RAX + 0x9],0x1 JZ 0x0014a052 MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014a3a8 LAB_0014a052: MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0x58 CALL 0x0012f080 MOV dword ptr [RBP + -0x28],EAX CMP dword ptr [RBP + -0x28],0x0 JZ 0x0014a139 MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0x18 CALL 0x0012f080 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] ADD EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],EAX LAB_0014a08b: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x24] JNC 0x0014a137 MOV EAX,dword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x28] XOR EDX,EDX DIV ECX MOV RAX,qword ptr [RBP + -0x88] MOV dword ptr [RBP + -0x1c],EDX MOV ECX,dword ptr [RBP + -0x1c] LEA RAX,[RAX + RCX*0x8 + 0xa8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JZ 0x0014a11a MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0014a630 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0014a118 MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x1b0],RCX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014a3a8 LAB_0014a118: JMP 0x0014a11a LAB_0014a11a: MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0x18 MOV ESI,0x1 CALL 0x00133c80 MOV dword ptr [RBP + -0x20],EAX JMP 0x0014a08b LAB_0014a137: JMP 0x0014a139 LAB_0014a139: JMP 0x0014a13b LAB_0014a13b: MOV RCX,qword ptr [RBP + -0x88] MOV EAX,dword ptr [RBP + -0x28] CMP RAX,qword ptr [RCX + 0x98] JNC 0x0014a38b MOV RAX,qword ptr [RBP + -0x88] MOV ECX,dword ptr [RBP + -0x28] LEA RAX,[RAX + RCX*0x8 + 0xa8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0014a34c MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0x20b0 CALL 0x001264b0 MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0014a339 MOV EDI,0x60 CALL 0x00126310 MOV RDI,RAX MOV qword ptr [RBP + -0x98],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x90],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI + 0x50],XMM0 MOVAPS xmmword ptr [RDI + 0x40],XMM0 MOVAPS xmmword ptr [RDI + 0x30],XMM0 MOVAPS xmmword ptr [RDI + 0x20],XMM0 MOVAPS xmmword ptr [RDI + 0x10],XMM0 MOVAPS xmmword ptr [RDI],XMM0 LAB_0014a207: CALL 0x0014a700 LAB_0014a20c: JMP 0x0014a20e LAB_0014a20e: MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x38],RAX LEA RDI,[0x50dc40] MOV ESI,0x60 CALL 0x00137310 MOV RDI,qword ptr [RBP + -0x88] MOV ESI,dword ptr [RBP + -0x28] CALL 0x0014a720 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x88] MOV ECX,ECX MOV EDX,ECX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RCX + 0x50],RDX MOV RDI,qword ptr [RAX + 0x20a8] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0014a760 MOV dword ptr [RBP + -0x78],EAX CMP dword ptr [RBP + -0x78],0x0 JZ 0x0014a301 MOV RAX,qword ptr [RBP + -0x88] MOV RDI,qword ptr [RAX + 0x20a8] MOV RSI,qword ptr [RBP + -0x38] CALL 0x0014a5e0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX CMP RAX,0x0 JZ 0x0014a2a4 MOV RDI,qword ptr [RBP + -0xa0] MOV ESI,0x60 CALL 0x00126320 LAB_0014a2a4: LEA RDI,[0x50dc40] MOV ESI,0x60 CALL 0x00137380 MOV RDI,qword ptr [RBP + -0x88] MOV RAX,qword ptr [RDI] ADD RAX,0x1 MOV qword ptr [RDI],RAX ADD RDI,0x20b0 CALL 0x00126260 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014a3a8 LAB_0014a301: MOV RDI,qword ptr [RBP + -0x88] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x58],RDI MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] XCHG qword ptr [RCX],RAX ADD RDI,0x58 MOV ESI,0x1 CALL 0x00133c80 LAB_0014a339: MOV RDI,qword ptr [RBP + -0x88] ADD RDI,0x20b0 CALL 0x00126260 LAB_0014a34c: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0014a630 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0014a37d MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x1b0],RCX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX JMP 0x0014a3a8 LAB_0014a37d: MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX JMP 0x0014a13b LAB_0014a38b: MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV byte ptr [RAX + 0x9],0x1 MOV qword ptr [RBP + -0x8],0x0 LAB_0014a3a8: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
/* PFS_buffer_scalable_container<PFS_setup_object, 128, 1024, PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object> >::allocate(pfs_dirty_state*) */ long __thiscall PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>> ::allocate(PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>> *this,pfs_dirty_state *param_1) { PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>> *pPVar1; PFS_buffer_default_array<PFS_setup_object> *this_00; uint uVar2; int iVar3; long lVar4; PFS_buffer_default_array<PFS_setup_object> *local_40; uint local_30; uint local_28; if (((byte)this[9] & 1) == 0) { local_30 = PFS_atomic::load_u32((uint *)(this + 0x58)); if (local_30 != 0) { local_28 = PFS_atomic::load_u32((uint *)(this + 0x18)); uVar2 = local_28 + local_30; while (local_28 < uVar2) { this_00 = *(PFS_buffer_default_array<PFS_setup_object> **) (this + (ulong)(local_28 % local_30) * 8 + 0xa8); if ((this_00 != (PFS_buffer_default_array<PFS_setup_object> *)0x0) && (lVar4 = PFS_buffer_default_array<PFS_setup_object>::allocate(this_00,param_1), lVar4 != 0)) { *(PFS_buffer_default_array<PFS_setup_object> **)(lVar4 + 0x1b0) = this_00; return lVar4; } local_28 = PFS_atomic::add_u32((uint *)(this + 0x18),1); } } for (; (ulong)local_30 < *(ulong *)(this + 0x98); local_30 = local_30 + 1) { pPVar1 = this + (ulong)local_30 * 8 + 0xa8; local_40 = *(PFS_buffer_default_array<PFS_setup_object> **)pPVar1; if (local_40 == (PFS_buffer_default_array<PFS_setup_object> *)0x0) { pthread_mutex_lock((pthread_mutex_t *)(this + 0x20b0)); local_40 = *(PFS_buffer_default_array<PFS_setup_object> **)pPVar1; if (local_40 == (PFS_buffer_default_array<PFS_setup_object> *)0x0) { local_40 = (PFS_buffer_default_array<PFS_setup_object> *)operator_new(0x60); *(int8 *)(local_40 + 0x50) = 0; *(int8 *)(local_40 + 0x58) = 0; *(int8 *)(local_40 + 0x40) = 0; *(int8 *)(local_40 + 0x48) = 0; *(int8 *)(local_40 + 0x30) = 0; *(int8 *)(local_40 + 0x38) = 0; *(int8 *)(local_40 + 0x20) = 0; *(int8 *)(local_40 + 0x28) = 0; *(int8 *)(local_40 + 0x10) = 0; *(int8 *)(local_40 + 0x18) = 0; *(int8 *)local_40 = 0; *(int8 *)(local_40 + 8) = 0; /* try { // try from 0014a207 to 0014a20b has its CatchHandler @ 0014a2df */ PFS_buffer_default_array<PFS_setup_object>::PFS_buffer_default_array(local_40); PFS_builtin_memory_class::count_alloc ((PFS_builtin_memory_class *)builtin_memory_scalable_buffer,0x60); uVar2 = get_page_logical_size(this,local_30); *(ulong *)(local_40 + 0x50) = (ulong)uVar2; iVar3 = PFS_buffer_default_allocator<PFS_setup_object>::alloc_array (*(PFS_buffer_default_allocator<PFS_setup_object> **)(this + 0x20a8), (PFS_buffer_default_array *)local_40); if (iVar3 != 0) { PFS_buffer_default_allocator<PFS_setup_object>::free_array (*(PFS_buffer_default_allocator<PFS_setup_object> **)(this + 0x20a8), (PFS_buffer_default_array *)local_40); if (local_40 != (PFS_buffer_default_array<PFS_setup_object> *)0x0) { operator_delete(local_40,0x60); } PFS_builtin_memory_class::count_free ((PFS_builtin_memory_class *)builtin_memory_scalable_buffer,0x60); *(long *)this = *(long *)this + 1; pthread_mutex_unlock((pthread_mutex_t *)(this + 0x20b0)); return 0; } *(PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>> **)(local_40 + 0x58) = this; LOCK(); *(PFS_buffer_default_array<PFS_setup_object> **)pPVar1 = local_40; UNLOCK(); PFS_atomic::add_u32((uint *)(this + 0x58),1); } pthread_mutex_unlock((pthread_mutex_t *)(this + 0x20b0)); } lVar4 = PFS_buffer_default_array<PFS_setup_object>::allocate(local_40,param_1); if (lVar4 != 0) { *(PFS_buffer_default_array<PFS_setup_object> **)(lVar4 + 0x1b0) = local_40; return lVar4; } } *(long *)this = *(long *)this + 1; this[9] = (PFS_buffer_scalable_container<PFS_setup_object,128,1024,PFS_buffer_default_array<PFS_setup_object>,PFS_buffer_default_allocator<PFS_setup_object>> )0x1; } else { *(long *)this = *(long *)this + 1; } return 0; }
49,986
PFS_buffer_scalable_container<PFS_setup_object, 128, 1024, PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object>>::allocate(pfs_dirty_state*)
eloqsql/storage/perfschema/pfs_buffer_container.h
value_type *allocate(pfs_dirty_state *dirty_state) { if (m_full) { m_lost++; return NULL; } uint index; uint monotonic; uint monotonic_max; uint current_page_count; value_type *pfs; array_type *array; void *addr; void * volatile * typed_addr; void *ptr; /* 1: Try to find an available record within the existing pages */ current_page_count= PFS_atomic::load_u32(& m_max_page_index.m_u32); if (current_page_count != 0) { monotonic= PFS_atomic::load_u32(& m_monotonic.m_u32); monotonic_max= monotonic + current_page_count; while (monotonic < monotonic_max) { /* Scan in the [0 .. current_page_count - 1] range, in parallel with m_monotonic (see below) */ index= monotonic % current_page_count; /* Atomic Load, array= m_pages[index] */ addr= & m_pages[index]; typed_addr= static_cast<void * volatile *>(addr); ptr= my_atomic_loadptr(typed_addr); array= static_cast<array_type *>(ptr); if (array != NULL) { pfs= array->allocate(dirty_state); if (pfs != NULL) { /* Keep a pointer to the parent page, for deallocate(). */ pfs->m_page= reinterpret_cast<PFS_opaque_container_page *> (array); return pfs; } } /* Parallel scans collaborate to increase the common monotonic scan counter. Note that when all the existing page are full, one thread will eventually add a new page, and cause m_max_page_index to increase, which fools all the modulo logic for scans already in progress, because the monotonic counter is not folded to the same place (sometime modulo N, sometime modulo N+1). This is actually ok: since all the pages are full anyway, there is nothing to miss, so better increase the monotonic counter faster and then move on to the detection of new pages, in part 2: below. */ monotonic= PFS_atomic::add_u32(& m_monotonic.m_u32, 1); }; } /* 2: Try to add a new page, beyond the m_max_page_index limit */ while (current_page_count < m_max_page_count) { /* Peek for pages added by collaborating threads */ /* (2-a) Atomic Load, array= m_pages[current_page_count] */ addr= & m_pages[current_page_count]; typed_addr= static_cast<void * volatile *>(addr); ptr= my_atomic_loadptr(typed_addr); array= static_cast<array_type *>(ptr); if (array == NULL) { // ================================================================== // BEGIN CRITICAL SECTION -- buffer expand // ================================================================== /* On a fresh started server, buffers are typically empty. When a sudden load spike is seen by the server, multiple threads may want to expand the buffer at the same time. Using a compare and swap to allow multiple pages to be added, possibly freeing duplicate pages on collisions, does not work well because the amount of code involved when creating a new page can be significant (PFS_thread), causing MANY collisions between (2-b) and (2-d). A huge number of collisions (which can happen when thousands of new connections hits the server after a restart) leads to a huge memory consumption, and to OOM. To mitigate this, we use here a mutex, to enforce that only ONE page is added at a time, so that scaling the buffer happens in a predictable and controlled manner. */ pthread_mutex_lock(& m_critical_section); /* Peek again for pages added by collaborating threads, this time as the only thread allowed to expand the buffer */ /* (2-b) Atomic Load, array= m_pages[current_page_count] */ ptr= my_atomic_loadptr(typed_addr); array= static_cast<array_type *>(ptr); if (array == NULL) { /* (2-c) Found no page, allocate a new one */ array= new array_type(); builtin_memory_scalable_buffer.count_alloc(sizeof (array_type)); array->m_max= get_page_logical_size(current_page_count); int rc= m_allocator->alloc_array(array); if (rc != 0) { m_allocator->free_array(array); delete array; builtin_memory_scalable_buffer.count_free(sizeof (array_type)); m_lost++; pthread_mutex_unlock(& m_critical_section); return NULL; } /* Keep a pointer to this container, for static_deallocate(). */ array->m_container= reinterpret_cast<PFS_opaque_container *> (this); /* (2-d) Atomic STORE, m_pages[current_page_count] = array */ ptr= array; my_atomic_storeptr(typed_addr, ptr); /* Advertise the new page */ PFS_atomic::add_u32(& m_max_page_index.m_u32, 1); } pthread_mutex_unlock(& m_critical_section); // ================================================================== // END CRITICAL SECTION -- buffer expand // ================================================================== } assert(array != NULL); pfs= array->allocate(dirty_state); if (pfs != NULL) { /* Keep a pointer to the parent page, for deallocate(). */ pfs->m_page= reinterpret_cast<PFS_opaque_container_page *> (array); return pfs; } current_page_count++; } m_lost++; m_full= true; return NULL; }
O3
c
PFS_buffer_scalable_container<PFS_setup_object, 128, 1024, PFS_buffer_default_array<PFS_setup_object>, PFS_buffer_default_allocator<PFS_setup_object>>::allocate(pfs_dirty_state*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, -0x38(%rbp) movq %rdi, %rbx cmpb $0x1, 0x9(%rdi) jne 0x3da48 incq (%rbx) jmp 0x3dba2 movl 0x58(%rbx), %r12d testl %r12d, %r12d je 0x3da90 movl 0x18(%rbx), %eax leal (%rax,%r12), %r14d cmpl %r14d, %eax jae 0x3da90 xorl %edx, %edx divl %r12d movq 0xa8(%rbx,%rdx,8), %r15 testq %r15, %r15 je 0x3da84 movq %r15, %rdi movq -0x38(%rbp), %rsi callq 0x3e414 testq %rax, %rax jne 0x3dbbc movl $0x1, %eax lock xaddl %eax, 0x18(%rbx) jmp 0x3da58 cmpq %r12, 0x98(%rbx) jbe 0x3db9b leaq 0x80b0(%rbx), %r14 leal 0x1(%r12), %r15d movl $0xc0, %eax addq 0x2de50b(%rip), %rax # 0x31bfc0 movq %rax, -0x48(%rbp) movq %r14, -0x30(%rbp) movq 0xa8(%rbx,%r12,8), %r13 movl %r15d, %eax movq %rax, -0x40(%rbp) testq %r13, %r13 jne 0x3db6f movq %r14, %rdi callq 0x264d0 movq 0xa8(%rbx,%r12,8), %r13 testq %r13, %r13 jne 0x3db67 movl $0x60, %edi callq 0x26330 movq %rax, %r13 xorps %xmm0, %xmm0 movaps %xmm0, (%rax) movaps %xmm0, 0x10(%rax) movaps %xmm0, 0x20(%rax) movaps %xmm0, 0x30(%rax) movaps %xmm0, 0x40(%rax) movaps %xmm0, 0x50(%rax) movl $0x60, %esi movq -0x48(%rbp), %rdi callq 0x354b4 movq -0x40(%rbp), %rax cmpq %rax, 0x98(%rbx) movl 0xa0(%rbx), %eax movl $0x1000, %ecx # imm = 0x1000 cmovaq %rcx, %rax movq %rax, 0x50(%r13) movq 0x80a8(%rbx), %rdi movq %r13, %rsi callq 0x3e47a testl %eax, %eax jne 0x3dbc5 movq %rbx, 0x58(%r13) movq %r13, %rax xchgq %rax, 0xa8(%rbx,%r12,8) lock incl 0x58(%rbx) movq -0x30(%rbp), %r14 movq %r14, %rdi callq 0x26250 movq %r13, %rdi movq -0x38(%rbp), %rsi callq 0x3e414 testq %rax, %rax jne 0x3dbb3 incl %r15d movq -0x40(%rbp), %rax movq %rax, %r12 cmpq %rax, 0x98(%rbx) movq -0x30(%rbp), %r14 ja 0x3dabd incq (%rbx) movb $0x1, 0x9(%rbx) xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, 0x170(%rax) jmp 0x3dba4 movq %r15, 0x170(%rax) jmp 0x3dba4 movq 0x80a8(%rbx), %rax movq (%rax), %rdi movq 0x48(%r13), %rcx movq 0x50(%r13), %rsi movl $0x178, %edx # imm = 0x178 callq 0x2cd84 movl $0x60, %esi movq %r13, %rdi callq 0x26340 movl $0xc0, %edi addq 0x2de3c6(%rip), %rdi # 0x31bfc0 movl $0x60, %esi callq 0x354ea incq (%rbx) movq -0x30(%rbp), %rdi callq 0x26250 jmp 0x3dba2
_ZN29PFS_buffer_scalable_containerI20PFS_table_share_lockLi4096ELi4096E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE8allocateEP15pfs_dirty_state: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov [rbp+var_38], rsi mov rbx, rdi cmp byte ptr [rdi+9], 1 jnz short loc_3DA48 inc qword ptr [rbx] jmp loc_3DBA2 loc_3DA48: mov r12d, [rbx+58h] test r12d, r12d jz short loc_3DA90 mov eax, [rbx+18h] lea r14d, [rax+r12] loc_3DA58: cmp eax, r14d jnb short loc_3DA90 xor edx, edx div r12d mov r15, [rbx+rdx*8+0A8h] test r15, r15 jz short loc_3DA84 mov rdi, r15 mov rsi, [rbp+var_38] call _ZN24PFS_buffer_default_arrayI20PFS_table_share_lockE8allocateEP15pfs_dirty_state; PFS_buffer_default_array<PFS_table_share_lock>::allocate(pfs_dirty_state *) test rax, rax jnz loc_3DBBC loc_3DA84: mov eax, 1 lock xadd [rbx+18h], eax jmp short loc_3DA58 loc_3DA90: cmp [rbx+98h], r12 jbe loc_3DB9B lea r14, [rbx+80B0h] lea r15d, [r12+1] mov eax, 0C0h add rax, cs:builtin_memory_scalable_buffer_ptr mov [rbp+var_48], rax mov [rbp+var_30], r14 loc_3DABD: mov r13, [rbx+r12*8+0A8h] mov eax, r15d mov [rbp+var_40], rax test r13, r13 jnz loc_3DB6F mov rdi, r14 call _pthread_mutex_lock mov r13, [rbx+r12*8+0A8h] test r13, r13 jnz short loc_3DB67 mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) mov r13, rax xorps xmm0, xmm0 movaps xmmword ptr [rax], xmm0 movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax+20h], xmm0 movaps xmmword ptr [rax+30h], xmm0 movaps xmmword ptr [rax+40h], xmm0 movaps xmmword ptr [rax+50h], xmm0 mov esi, 60h ; '`'; unsigned __int64 mov rdi, [rbp+var_48]; this call _ZN15PFS_memory_stat19count_builtin_allocEm; PFS_memory_stat::count_builtin_alloc(ulong) mov rax, [rbp+var_40] cmp [rbx+98h], rax mov eax, [rbx+0A0h] mov ecx, 1000h cmova rax, rcx mov [r13+50h], rax mov rdi, [rbx+80A8h] mov rsi, r13 call _ZN28PFS_buffer_default_allocatorI20PFS_table_share_lockE11alloc_arrayEP24PFS_buffer_default_arrayIS0_E; PFS_buffer_default_allocator<PFS_table_share_lock>::alloc_array(PFS_buffer_default_array<PFS_table_share_lock> *) test eax, eax jnz short loc_3DBC5 mov [r13+58h], rbx mov rax, r13 xchg rax, [rbx+r12*8+0A8h] lock inc dword ptr [rbx+58h] mov r14, [rbp+var_30] loc_3DB67: mov rdi, r14 call _pthread_mutex_unlock loc_3DB6F: mov rdi, r13 mov rsi, [rbp+var_38] call _ZN24PFS_buffer_default_arrayI20PFS_table_share_lockE8allocateEP15pfs_dirty_state; PFS_buffer_default_array<PFS_table_share_lock>::allocate(pfs_dirty_state *) test rax, rax jnz short loc_3DBB3 inc r15d mov rax, [rbp+var_40] mov r12, rax cmp [rbx+98h], rax mov r14, [rbp+var_30] ja loc_3DABD loc_3DB9B: inc qword ptr [rbx] mov byte ptr [rbx+9], 1 loc_3DBA2: xor eax, eax loc_3DBA4: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3DBB3: mov [rax+170h], r13 jmp short loc_3DBA4 loc_3DBBC: mov [rax+170h], r15 jmp short loc_3DBA4 loc_3DBC5: mov rax, [rbx+80A8h] mov rdi, [rax] mov rcx, [r13+48h] mov rsi, [r13+50h] mov edx, 178h call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *) mov esi, 60h ; '`'; unsigned __int64 mov rdi, r13; void * call __ZdlPvm; operator delete(void *,ulong) mov edi, 0C0h add rdi, cs:builtin_memory_scalable_buffer_ptr; this mov esi, 60h ; '`'; unsigned __int64 call _ZN15PFS_memory_stat18count_builtin_freeEm; PFS_memory_stat::count_builtin_free(ulong) inc qword ptr [rbx] mov rdi, [rbp+var_30] call _pthread_mutex_unlock jmp short loc_3DBA2
long long PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>>::allocate( long long a1, long long a2) { unsigned long long v2; // r12 unsigned __int32 v3; // eax unsigned __int32 v4; // r14d long long v5; // rdx long long v6; // r15 long long result; // rax long long v8; // r14 unsigned int v9; // r15d long long v10; // r13 long long v11; // rax unsigned long long v12; // [rsp+10h] [rbp-40h] if ( *(_BYTE *)(a1 + 9) == 1 ) { ++*(_QWORD *)a1; return 0LL; } v2 = *(unsigned int *)(a1 + 88); if ( (_DWORD)v2 ) { v3 = *(_DWORD *)(a1 + 24); v4 = v3 + v2; while ( v3 < v4 ) { v5 = v3 % (unsigned int)v2; v6 = *(_QWORD *)(a1 + 8 * v5 + 168); if ( v6 ) { result = PFS_buffer_default_array<PFS_table_share_lock>::allocate(*(_QWORD *)(a1 + 8 * v5 + 168), a2); if ( result ) { *(_QWORD *)(result + 368) = v6; return result; } } v3 = _InterlockedExchangeAdd((volatile signed __int32 *)(a1 + 24), 1u); } } if ( *(_QWORD *)(a1 + 152) <= v2 ) { LABEL_20: ++*(_QWORD *)a1; *(_BYTE *)(a1 + 9) = 1; return 0LL; } v8 = a1 + 32944; v9 = v2 + 1; while ( 1 ) { v10 = *(_QWORD *)(a1 + 8 * v2 + 168); v12 = v9; if ( v10 ) goto LABEL_18; pthread_mutex_lock(v8); v10 = *(_QWORD *)(a1 + 8 * v2 + 168); if ( !v10 ) break; LABEL_17: pthread_mutex_unlock(v8); LABEL_18: result = PFS_buffer_default_array<PFS_table_share_lock>::allocate(v10, a2); if ( result ) { *(_QWORD *)(result + 368) = v10; return result; } ++v9; v2 = v12; v8 = a1 + 32944; if ( *(_QWORD *)(a1 + 152) <= v12 ) goto LABEL_20; } v10 = operator new(0x60uLL); *(_OWORD *)v10 = 0LL; *(_OWORD *)(v10 + 16) = 0LL; *(_OWORD *)(v10 + 32) = 0LL; *(_OWORD *)(v10 + 48) = 0LL; *(_OWORD *)(v10 + 64) = 0LL; *(_OWORD *)(v10 + 80) = 0LL; PFS_memory_stat::count_builtin_alloc((PFS_memory_stat *)&builtin_memory_scalable_buffer[12], 0x60uLL); v11 = *(unsigned int *)(a1 + 160); if ( *(_QWORD *)(a1 + 152) > (unsigned long long)v9 ) v11 = 4096LL; *(_QWORD *)(v10 + 80) = v11; if ( !(unsigned int)PFS_buffer_default_allocator<PFS_table_share_lock>::alloc_array(*(_QWORD *)(a1 + 32936), v10) ) { *(_QWORD *)(v10 + 88) = a1; _InterlockedExchange64((volatile long long *)(a1 + 8 * v2 + 168), v10); _InterlockedIncrement((volatile signed __int32 *)(a1 + 88)); v8 = a1 + 32944; goto LABEL_17; } pfs_free_array(**(_QWORD **)(a1 + 32936), *(_QWORD *)(v10 + 80), 376LL, *(_QWORD *)(v10 + 72)); operator delete((void *)v10, 0x60uLL); PFS_memory_stat::count_builtin_free(&builtin_memory_scalable_buffer[12], 0x60uLL); ++*(_QWORD *)a1; pthread_mutex_unlock(a1 + 32944); return 0LL; }
allocate: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV qword ptr [RBP + -0x38],RSI MOV RBX,RDI CMP byte ptr [RDI + 0x9],0x1 JNZ 0x0013da48 INC qword ptr [RBX] JMP 0x0013dba2 LAB_0013da48: MOV R12D,dword ptr [RBX + 0x58] TEST R12D,R12D JZ 0x0013da90 MOV EAX,dword ptr [RBX + 0x18] LEA R14D,[RAX + R12*0x1] LAB_0013da58: CMP EAX,R14D JNC 0x0013da90 XOR EDX,EDX DIV R12D MOV R15,qword ptr [RBX + RDX*0x8 + 0xa8] TEST R15,R15 JZ 0x0013da84 MOV RDI,R15 MOV RSI,qword ptr [RBP + -0x38] CALL 0x0013e414 TEST RAX,RAX JNZ 0x0013dbbc LAB_0013da84: MOV EAX,0x1 XADD.LOCK dword ptr [RBX + 0x18],EAX JMP 0x0013da58 LAB_0013da90: CMP qword ptr [RBX + 0x98],R12 JBE 0x0013db9b LEA R14,[RBX + 0x80b0] LEA R15D,[R12 + 0x1] MOV EAX,0xc0 ADD RAX,qword ptr [0x0041bfc0] MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x30],R14 LAB_0013dabd: MOV R13,qword ptr [RBX + R12*0x8 + 0xa8] MOV EAX,R15D MOV qword ptr [RBP + -0x40],RAX TEST R13,R13 JNZ 0x0013db6f MOV RDI,R14 CALL 0x001264d0 MOV R13,qword ptr [RBX + R12*0x8 + 0xa8] TEST R13,R13 JNZ 0x0013db67 MOV EDI,0x60 CALL 0x00126330 MOV R13,RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RAX],XMM0 MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX + 0x20],XMM0 MOVAPS xmmword ptr [RAX + 0x30],XMM0 MOVAPS xmmword ptr [RAX + 0x40],XMM0 MOVAPS xmmword ptr [RAX + 0x50],XMM0 MOV ESI,0x60 MOV RDI,qword ptr [RBP + -0x48] CALL 0x001354b4 MOV RAX,qword ptr [RBP + -0x40] CMP qword ptr [RBX + 0x98],RAX MOV EAX,dword ptr [RBX + 0xa0] MOV ECX,0x1000 CMOVA RAX,RCX MOV qword ptr [R13 + 0x50],RAX MOV RDI,qword ptr [RBX + 0x80a8] MOV RSI,R13 CALL 0x0013e47a TEST EAX,EAX JNZ 0x0013dbc5 MOV qword ptr [R13 + 0x58],RBX MOV RAX,R13 XCHG qword ptr [RBX + R12*0x8 + 0xa8],RAX INC.LOCK dword ptr [RBX + 0x58] MOV R14,qword ptr [RBP + -0x30] LAB_0013db67: MOV RDI,R14 CALL 0x00126250 LAB_0013db6f: MOV RDI,R13 MOV RSI,qword ptr [RBP + -0x38] CALL 0x0013e414 TEST RAX,RAX JNZ 0x0013dbb3 INC R15D MOV RAX,qword ptr [RBP + -0x40] MOV R12,RAX CMP qword ptr [RBX + 0x98],RAX MOV R14,qword ptr [RBP + -0x30] JA 0x0013dabd LAB_0013db9b: INC qword ptr [RBX] MOV byte ptr [RBX + 0x9],0x1 LAB_0013dba2: XOR EAX,EAX LAB_0013dba4: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013dbb3: MOV qword ptr [RAX + 0x170],R13 JMP 0x0013dba4 LAB_0013dbbc: MOV qword ptr [RAX + 0x170],R15 JMP 0x0013dba4 LAB_0013dbc5: MOV RAX,qword ptr [RBX + 0x80a8] MOV RDI,qword ptr [RAX] MOV RCX,qword ptr [R13 + 0x48] MOV RSI,qword ptr [R13 + 0x50] MOV EDX,0x178 CALL 0x0012cd84 MOV ESI,0x60 MOV RDI,R13 CALL 0x00126340 MOV EDI,0xc0 ADD RDI,qword ptr [0x0041bfc0] MOV ESI,0x60 CALL 0x001354ea INC qword ptr [RBX] MOV RDI,qword ptr [RBP + -0x30] CALL 0x00126250 JMP 0x0013dba2
/* PFS_buffer_scalable_container<PFS_table_share_lock, 4096, 4096, PFS_buffer_default_array<PFS_table_share_lock>, PFS_buffer_default_allocator<PFS_table_share_lock> >::allocate(pfs_dirty_state*) */ long __thiscall PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>> ::allocate(PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>> *this,pfs_dirty_state *param_1) { PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>> *pPVar1; pthread_mutex_t *__mutex; uint uVar2; int iVar3; long lVar4; PFS_memory_stat *this_00; ulong uVar5; PFS_buffer_default_array<PFS_table_share_lock> *pPVar6; ulong uVar7; ulong uVar8; uint uVar9; uint uVar10; if (this[9] == (PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>> )0x1) { *(long *)this = *(long *)this + 1; } else { uVar10 = *(uint *)(this + 0x58); uVar8 = (ulong)uVar10; if (uVar10 != 0) { uVar2 = *(uint *)(this + 0x18); uVar9 = uVar2 + uVar10; while (uVar2 < uVar9) { pPVar6 = *(PFS_buffer_default_array<PFS_table_share_lock> **) (this + ((ulong)uVar2 % uVar8) * 8 + 0xa8); if ((pPVar6 != (PFS_buffer_default_array<PFS_table_share_lock> *)0x0) && (lVar4 = PFS_buffer_default_array<PFS_table_share_lock>::allocate(pPVar6,param_1), lVar4 != 0)) { *(PFS_buffer_default_array<PFS_table_share_lock> **)(lVar4 + 0x170) = pPVar6; return lVar4; } LOCK(); pPVar1 = this + 0x18; uVar2 = *(uint *)pPVar1; *(uint *)pPVar1 = *(uint *)pPVar1 + 1; UNLOCK(); } } if (uVar8 < *(ulong *)(this + 0x98)) { __mutex = (pthread_mutex_t *)(this + 0x80b0); this_00 = (PFS_memory_stat *)(PTR_builtin_memory_scalable_buffer_0041bfc0 + 0xc0); do { uVar10 = uVar10 + 1; pPVar6 = *(PFS_buffer_default_array<PFS_table_share_lock> **)(this + uVar8 * 8 + 0xa8); uVar5 = (ulong)uVar10; if (pPVar6 == (PFS_buffer_default_array<PFS_table_share_lock> *)0x0) { pthread_mutex_lock(__mutex); pPVar6 = *(PFS_buffer_default_array<PFS_table_share_lock> **)(this + uVar8 * 8 + 0xa8); if (pPVar6 == (PFS_buffer_default_array<PFS_table_share_lock> *)0x0) { pPVar6 = (PFS_buffer_default_array<PFS_table_share_lock> *)operator_new(0x60); *(int8 *)pPVar6 = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 8) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x10) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x18) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x20) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x28) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x30) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x38) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x40) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x48) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x50) = 0; *(int8 *)((PFS_buffer_default_array *)pPVar6 + 0x58) = 0; PFS_memory_stat::count_builtin_alloc(this_00,0x60); uVar7 = (ulong)*(uint *)(this + 0xa0); if (uVar5 < *(ulong *)(this + 0x98)) { uVar7 = 0x1000; } *(ulong *)((PFS_buffer_default_array *)pPVar6 + 0x50) = uVar7; iVar3 = PFS_buffer_default_allocator<PFS_table_share_lock>::alloc_array (*(PFS_buffer_default_allocator<PFS_table_share_lock> **) (this + 0x80a8),(PFS_buffer_default_array *)pPVar6); if (iVar3 != 0) { pfs_free_array((PFS_builtin_memory_class *)**(int8 **)(this + 0x80a8), *(ulong *)((PFS_buffer_default_array *)pPVar6 + 0x50),0x178, *(void **)((PFS_buffer_default_array *)pPVar6 + 0x48)); operator_delete(pPVar6,0x60); PFS_memory_stat::count_builtin_free ((PFS_memory_stat *)(PTR_builtin_memory_scalable_buffer_0041bfc0 + 0xc0), 0x60); *(long *)this = *(long *)this + 1; pthread_mutex_unlock(__mutex); return 0; } *(PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>> **)((PFS_buffer_default_array *)pPVar6 + 0x58) = this; LOCK(); *(PFS_buffer_default_array<PFS_table_share_lock> **)(this + uVar8 * 8 + 0xa8) = pPVar6; UNLOCK(); LOCK(); *(int *)(this + 0x58) = *(int *)(this + 0x58) + 1; UNLOCK(); } pthread_mutex_unlock(__mutex); } lVar4 = PFS_buffer_default_array<PFS_table_share_lock>::allocate(pPVar6,param_1); if (lVar4 != 0) { *(PFS_buffer_default_array<PFS_table_share_lock> **)(lVar4 + 0x170) = pPVar6; return lVar4; } uVar8 = uVar5; } while (uVar5 < *(ulong *)(this + 0x98)); } *(long *)this = *(long *)this + 1; this[9] = (PFS_buffer_scalable_container<PFS_table_share_lock,4096,4096,PFS_buffer_default_array<PFS_table_share_lock>,PFS_buffer_default_allocator<PFS_table_share_lock>> )0x1; } return 0; }
49,987
uint64_to_le
corpus-core[P]colibri-stateless/src/util/bytes.c
void uint64_to_le(uint8_t* data, uint64_t value) { data[7] = (value >> 56) & 0xFF; data[6] = (value >> 48) & 0xFF; data[5] = (value >> 40) & 0xFF; data[4] = (value >> 32) & 0xFF; data[3] = (value >> 24) & 0xFF; data[2] = (value >> 16) & 0xFF; data[1] = (value >> 8) & 0xFF; data[0] = value & 0xFF; }
O2
c
uint64_to_le: movq %rsi, (%rdi) retq
uint64_to_le: mov [rdi], rsi retn
void uint64_to_le(_QWORD *a1, long long a2) { *a1 = a2; }
uint64_to_le: MOV qword ptr [RDI],RSI RET
void uint64_to_le(int8 *param_1,int8 param_2) { *param_1 = param_2; return; }
49,988
js_module_ns_has
bluesky950520[P]quickjs/quickjs.c
static force_inline JSShapeProperty *find_own_property1(JSObject *p, JSAtom atom) { JSShape *sh; JSShapeProperty *pr, *prop; intptr_t h; sh = p->shape; h = (uintptr_t)atom & sh->prop_hash_mask; h = prop_hash_end(sh)[-h - 1]; prop = get_shape_prop(sh); while (h) { pr = &prop[h - 1]; if (likely(pr->atom == atom)) { return pr; } h = pr->hash_next; } return NULL; }
O1
c
js_module_ns_has: movq 0x18(%rsi), %rax movl 0x20(%rax), %edx andl %ecx, %edx notq %rdx movl (%rax,%rdx,4), %edx testl %edx, %edx je 0x42985 addq $0x40, %rax movl $0x3ffffff, %esi # imm = 0x3FFFFFF movl %edx, %edx leaq (%rax,%rdx,8), %rdx addq $-0x8, %rdx cmpl %ecx, 0x4(%rdx) je 0x4297c movl (%rdx), %edx andl %esi, %edx jne 0x42965 xorl %edx, %edx xorl %eax, %eax testq %rdx, %rdx setne %al retq xorl %eax, %eax retq
js_module_ns_has: mov rax, [rsi+18h] mov edx, [rax+20h] and edx, ecx not rdx mov edx, [rax+rdx*4] test edx, edx jz short loc_42985 add rax, 40h ; '@' mov esi, 3FFFFFFh loc_42965: mov edx, edx lea rdx, [rax+rdx*8] add rdx, 0FFFFFFFFFFFFFFF8h cmp [rdx+4], ecx jz short loc_4297C mov edx, [rdx] and edx, esi jnz short loc_42965 xor edx, edx loc_4297C: xor eax, eax test rdx, rdx setnz al retn loc_42985: xor eax, eax retn
_BOOL8 js_module_ns_has(long long a1, long long a2, long long a3, unsigned int a4) { long long v4; // rax unsigned int v5; // edx long long v6; // rax _DWORD *v7; // rdx v4 = *(_QWORD *)(a2 + 24); v5 = *(_DWORD *)(v4 + 4 * ~(unsigned long long)(a4 & *(_DWORD *)(v4 + 32))); if ( !v5 ) return 0LL; v6 = v4 + 64; while ( 1 ) { v7 = (_DWORD *)(v6 + 8LL * v5 - 8); if ( v7[1] == a4 ) break; v5 = *v7 & 0x3FFFFFF; if ( !v5 ) { v7 = 0LL; return v7 != 0LL; } } return v7 != 0LL; }
js_module_ns_has: MOV RAX,qword ptr [RSI + 0x18] MOV EDX,dword ptr [RAX + 0x20] AND EDX,ECX NOT RDX MOV EDX,dword ptr [RAX + RDX*0x4] TEST EDX,EDX JZ 0x00142985 ADD RAX,0x40 MOV ESI,0x3ffffff LAB_00142965: MOV EDX,EDX LEA RDX,[RAX + RDX*0x8] ADD RDX,-0x8 CMP dword ptr [RDX + 0x4],ECX JZ 0x0014297c MOV EDX,dword ptr [RDX] AND EDX,ESI JNZ 0x00142965 XOR EDX,EDX LAB_0014297c: XOR EAX,EAX TEST RDX,RDX SETNZ AL RET LAB_00142985: XOR EAX,EAX RET
bool js_module_ns_has(int8 param_1,long param_2,int8 param_3,uint param_4) { long lVar1; long lVar2; uint uVar3; uint *puVar4; lVar2 = *(long *)(param_2 + 0x18); uVar3 = *(uint *)(lVar2 + ~(ulong)(*(uint *)(lVar2 + 0x20) & param_4) * 4); if (uVar3 == 0) { return false; } do { lVar1 = lVar2 + 0x40 + (ulong)uVar3 * 8; puVar4 = (uint *)(lVar1 + -8); if (*(uint *)(lVar1 + -4) == param_4) goto LAB_0014297c; uVar3 = *puVar4 & 0x3ffffff; } while (uVar3 != 0); puVar4 = (uint *)0x0; LAB_0014297c: return puVar4 != (uint *)0x0; }
49,989
my_wc_mb_cp932
eloqsql/strings/ctype-cp932.c
static int my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; return 1; } if (wc > 0xFFFF || !(code= unicode_to_cp932[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208(MS) */ return 2; }
O0
c
my_wc_mb_cp932: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x10e10d movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x10e0f5 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x10e1a4 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x10e1a4 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x10e12e movq -0x18(%rbp), %rcx leaq 0x8422e(%rip), %rax # 0x192350 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x10e137 movl $0x0, -0x4(%rbp) jmp 0x10e1a4 cmpl $0xff, -0x2c(%rbp) jg 0x10e167 movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x10e153 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x10e1a4 movl -0x2c(%rbp), %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x10e1a4 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x10e17e movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x10e1a4 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_wc_mb_cp932: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp eax, 80h jge short loc_10E10D mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_10E0F5 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_10E1A4 loc_10E0F5: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_10E1A4 loc_10E10D: cmp [rbp+var_18], 0FFFFh ja short loc_10E12E mov rcx, [rbp+var_18] lea rax, unicode_to_cp932 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_10E137 loc_10E12E: mov [rbp+var_4], 0 jmp short loc_10E1A4 loc_10E137: cmp [rbp+var_2C], 0FFh jg short loc_10E167 mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_10E153 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_10E1A4 loc_10E153: mov eax, [rbp+var_2C] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_10E1A4 loc_10E167: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_10E17E mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_10E1A4 loc_10E17E: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_10E1A4: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_cp932(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { unsigned __int16 v5; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 <= 0xFFFF && (v5 = unicode_to_cp932[a2]) != 0 ) { if ( unicode_to_cp932[a2] > 0xFFu ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1; } else { return (unsigned int)-101; } } else { return 0; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } }
49,990
my_wc_mb_cp932
eloqsql/strings/ctype-cp932.c
static int my_wc_mb_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; return 1; } if (wc > 0xFFFF || !(code= unicode_to_cp932[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208(MS) */ return 2; }
O3
c
my_wc_mb_cp932: pushq %rbp movq %rsp, %rbp cmpl $0x7f, %esi jg 0xacc90 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xaccde movb %sil, (%rdx) movl $0x1, %eax jmp 0xaccde xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0xaccde leaq 0x6db8e(%rip), %rdi # 0x11a830 movzwl (%rdi,%rsi,2), %esi testw %si, %si je 0xaccde movzwl %si, %eax cmpl $0xff, %eax ja 0xaccc4 movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xaccde movb %sil, (%rdx) jmp 0xacc89 leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xaccde rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax popq %rbp retq
my_wc_mb_cp932: push rbp mov rbp, rsp cmp esi, 7Fh jg short loc_ACC90 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_ACCDE mov [rdx], sil loc_ACC89: mov eax, 1 jmp short loc_ACCDE loc_ACC90: xor eax, eax cmp rsi, 0FFFFh ja short loc_ACCDE lea rdi, unicode_to_cp932 movzx esi, word ptr [rdi+rsi*2] test si, si jz short loc_ACCDE movzx eax, si cmp eax, 0FFh ja short loc_ACCC4 mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_ACCDE mov [rdx], sil jmp short loc_ACC89 loc_ACCC4: lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_ACCDE rol si, 8 mov [rdx], si mov eax, 2 loc_ACCDE: pop rbp retn
long long my_wc_mb_cp932(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax unsigned __int16 v5; // si if ( (int)a2 <= 127 ) { result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; *a3 = a2; return 1LL; } result = 0LL; if ( a2 <= 0xFFFF ) { v5 = unicode_to_cp932[a2]; if ( v5 ) { if ( v5 > 0xFFu ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { *(_WORD *)a3 = __ROL2__(v5, 8); return 2LL; } } else { result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1LL; } } } } return result; }
my_wc_mb_cp932: PUSH RBP MOV RBP,RSP CMP ESI,0x7f JG 0x001acc90 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001accde MOV byte ptr [RDX],SIL LAB_001acc89: MOV EAX,0x1 JMP 0x001accde LAB_001acc90: XOR EAX,EAX CMP RSI,0xffff JA 0x001accde LEA RDI,[0x21a830] MOVZX ESI,word ptr [RDI + RSI*0x2] TEST SI,SI JZ 0x001accde MOVZX EAX,SI CMP EAX,0xff JA 0x001accc4 MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001accde MOV byte ptr [RDX],SIL JMP 0x001acc89 LAB_001accc4: LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001accde ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 LAB_001accde: POP RBP RET
int8 my_wc_mb_cp932(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { ushort uVar1; if ((int)param_2 < 0x80) { if (param_4 <= param_3) { return 0xffffff9b; } *(char *)param_3 = (char)param_2; } else { if (0xffff < param_2) { return 0; } uVar1 = *(ushort *)(unicode_to_cp932 + param_2 * 2); if (uVar1 == 0) { return 0; } if (0xff < uVar1) { if (param_4 < param_3 + 1) { return 0xffffff9a; } *param_3 = uVar1 << 8 | uVar1 >> 8; return 2; } if (param_4 <= param_3) { return 0xffffff9b; } *(char *)param_3 = (char)uVar1; } return 1; }
49,991
get_collation_number_internal
eloqsql/mysys/charset.c
static uint get_collation_number_internal(const char *name) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if (cs[0] && cs[0]->coll_name.str && !my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name)) return cs[0]->number; } return 0; }
O0
c
get_collation_number_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) leaq 0x35bccd(%rip), %rax # 0x390f60 movq %rax, -0x18(%rbp) leaq 0x35bcc2(%rip), %rax # 0x390f60 addq $0x4000, %rax # imm = 0x4000 cmpq %rax, -0x18(%rbp) jae 0x3530f movq -0x18(%rbp), %rax cmpq $0x0, (%rax) je 0x352ff movq -0x18(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x20(%rax) je 0x352ff leaq 0x2498b7(%rip), %rax # 0x27eb80 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movq 0x20(%rcx), %rsi movq -0x10(%rbp), %rdx leaq 0x249896(%rip), %rdi # 0x27eb80 callq *%rax cmpl $0x0, %eax jne 0x352ff movq -0x18(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x35316 jmp 0x35301 movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0x35297 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
get_collation_number_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi lea rax, all_charsets mov [rbp+var_18], rax loc_35297: lea rax, all_charsets add rax, 4000h cmp [rbp+var_18], rax jnb short loc_3530F mov rax, [rbp+var_18] cmp qword ptr [rax], 0 jz short loc_352FF mov rax, [rbp+var_18] mov rax, [rax] cmp qword ptr [rax+20h], 0 jz short loc_352FF lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rcx, [rbp+var_18] mov rcx, [rcx] mov rsi, [rcx+20h] mov rdx, [rbp+var_10] lea rdi, my_charset_latin1 call rax cmp eax, 0 jnz short loc_352FF mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] mov [rbp+var_4], eax jmp short loc_35316 loc_352FF: jmp short $+2 loc_35301: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp short loc_35297 loc_3530F: mov [rbp+var_4], 0 loc_35316: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long get_collation_number_internal(long long a1) { unsigned int **i; // [rsp+8h] [rbp-18h] for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i ) { if ( *i && *((_QWORD *)*i + 4) && !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, *((_QWORD *)*i + 4), a1) ) { return **i; } } return 0; }
get_collation_number_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI LEA RAX,[0x490f60] MOV qword ptr [RBP + -0x18],RAX LAB_00135297: LEA RAX,[0x490f60] ADD RAX,0x4000 CMP qword ptr [RBP + -0x18],RAX JNC 0x0013530f MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX],0x0 JZ 0x001352ff MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x20],0x0 JZ 0x001352ff LEA RAX,[0x37eb80] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x20] MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[0x37eb80] CALL RAX CMP EAX,0x0 JNZ 0x001352ff MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00135316 LAB_001352ff: JMP 0x00135301 LAB_00135301: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x00135297 LAB_0013530f: MOV dword ptr [RBP + -0x4],0x0 LAB_00135316: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 get_collation_number_internal(int8 param_1) { int iVar1; long *local_20; local_20 = &all_charsets; while( true ) { if ((long *)0x494f5f < local_20) { return 0; } if (((*local_20 != 0) && (*(long *)(*local_20 + 0x20) != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_0037ec40 + 0x40)) (&my_charset_latin1,*(int8 *)(*local_20 + 0x20),param_1), iVar1 == 0 )) break; local_20 = local_20 + 1; } return *(int4 *)*local_20; }
49,992
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> GetStringWithDefaultValueFromFunction<char const* (*)()>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const* (*)())
SylCore-WoTLK/src/common/Configuration/BuiltInConfig.cpp
static std::string GetStringWithDefaultValueFromFunction( std::string const& key, Fn getter) { std::string const value = sConfigMgr->GetOption<std::string>(key, ""); return value.empty() ? getter() : value; }
O0
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> GetStringWithDefaultValueFromFunction<char const* (*)()>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char const* (*)()): subq $0xd8, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq %rdx, 0x80(%rsp) callq 0x1840d0 movq %rax, 0x18(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x3f(%rsp), %rdx movq %rdx, 0x98(%rsp) movq 0x98(%rsp), %rax movq %rax, 0xd0(%rsp) leaq 0x1a8134(%rip), %rsi # 0x32bc6b leaq 0x40(%rsp), %rdi callq 0x2dc40 jmp 0x183b43 movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rsi leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rcx movl $0x1, %r8d callq 0x18e580 jmp 0x183b64 leaq 0x40(%rsp), %rdi callq 0x2de90 leaq 0x3f(%rsp), %rax movq %rax, 0xa8(%rsp) leaq 0x60(%rsp), %rdi callq 0x2e120 movb $0x0, 0x2a(%rsp) testb $0x1, %al jne 0x183b90 jmp 0x183bd4 movq 0x80(%rsp), %rax callq *%rax movq %rax, (%rsp) jmp 0x183ba0 movq (%rsp), %rsi movq 0x8(%rsp), %rdi leaq 0x2b(%rsp), %rdx movq %rdx, 0xa0(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0xc8(%rsp) movb $0x1, 0x2a(%rsp) callq 0x2dc40 jmp 0x183bd2 jmp 0x183be7 movq 0x8(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x6ca40 jmp 0x183be5 jmp 0x183be7 testb $0x1, 0x2a(%rsp) jne 0x183bf0 jmp 0x183bfd leaq 0x2b(%rsp), %rax movq %rax, 0xb8(%rsp) leaq 0x60(%rsp), %rdi callq 0x2de90 movq 0x10(%rsp), %rax addq $0xd8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0x183c3c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x40(%rsp), %rdi callq 0x2de90 leaq 0x3f(%rsp), %rax movq %rax, 0xb0(%rsp) jmp 0x183c8b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0x183c81 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) testb $0x1, 0x2a(%rsp) jne 0x183c72 jmp 0x183c7f leaq 0x2b(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x183c81 leaq 0x60(%rsp), %rdi callq 0x2de90 movq 0x30(%rsp), %rdi callq 0x21d50 nopw %cs:(%rax,%rax)
_ZL37GetStringWithDefaultValueFromFunctionIPFPKcvEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS9_T_: sub rsp, 0D8h mov [rsp+0D8h+var_D0], rdi mov rax, rdi mov [rsp+0D8h+var_C8], rax mov [rsp+0D8h+var_48], rdi mov [rsp+0D8h+var_50], rsi mov [rsp+0D8h+var_58], rdx call _ZN9ConfigMgr8instanceEv; ConfigMgr::instance(void) mov [rsp+0D8h+var_C0], rax mov rax, [rsp+0D8h+var_50] mov [rsp+0D8h+var_B8], rax lea rdx, [rsp+0D8h+var_99] mov [rsp+0D8h+var_40], rdx mov rax, [rsp+0D8h+var_40] mov [rsp+0D8h+var_8], rax lea rsi, asc_32BC6A+1; "" lea rdi, [rsp+0D8h+var_98] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_183B43: mov rdx, [rsp+0D8h+var_B8] mov rsi, [rsp+0D8h+var_C0] lea rdi, [rsp+0D8h+var_78] lea rcx, [rsp+0D8h+var_98] mov r8d, 1 call _ZNK9ConfigMgr9GetOptionINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEET_RKS6_RKS7_b; ConfigMgr::GetOption<std::string>(std::string const&,std::string const&,bool) jmp short $+2 loc_183B64: lea rdi, [rsp+0D8h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rax, [rsp+0D8h+var_99] mov [rsp+0D8h+var_30], rax lea rdi, [rsp+0D8h+var_78] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) mov [rsp+0D8h+var_AE], 0 test al, 1 jnz short loc_183B90 jmp short loc_183BD4 loc_183B90: mov rax, [rsp+0D8h+var_58] call rax mov [rsp+0D8h+var_D8], rax jmp short $+2 loc_183BA0: mov rsi, [rsp+0D8h+var_D8] mov rdi, [rsp+0D8h+var_D0] lea rdx, [rsp+0D8h+var_AD] mov [rsp+0D8h+var_38], rdx mov rax, [rsp+0D8h+var_38] mov [rsp+0D8h+var_10], rax mov [rsp+0D8h+var_AE], 1 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_183BD2: jmp short loc_183BE7 loc_183BD4: mov rdi, [rsp+0D8h+var_D0] lea rsi, [rsp+0D8h+var_78] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_183BE5: jmp short $+2 loc_183BE7: test [rsp+0D8h+var_AE], 1 jnz short loc_183BF0 jmp short loc_183BFD loc_183BF0: lea rax, [rsp+0D8h+var_AD] mov [rsp+0D8h+var_20], rax loc_183BFD: lea rdi, [rsp+0D8h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rsp+0D8h+var_C8] add rsp, 0D8h retn mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_183C3C mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_183C3C: lea rax, [rsp+arg_37] mov [rsp+arg_A8], rax jmp short loc_183C8B mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_183C81 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax test [rsp+arg_22], 1 jnz short loc_183C72 jmp short loc_183C7F loc_183C72: lea rax, [rsp+arg_23] mov [rsp+arg_B8], rax loc_183C7F: jmp short $+2 loc_183C81: lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_183C8B: mov rdi, [rsp+arg_28] call __Unwind_Resume
ConfigMgr * GetStringWithDefaultValueFromFunction<char const* (*)(void)>( ConfigMgr *a1, long long a2, long long (*a3)(void)) { long long v4; // [rsp+0h] [rbp-D8h] long long v5; // [rsp+18h] [rbp-C0h] char v6; // [rsp+2Ah] [rbp-AEh] _BYTE v7[20]; // [rsp+2Bh] [rbp-ADh] BYREF char v8; // [rsp+3Fh] [rbp-99h] BYREF _BYTE v9[32]; // [rsp+40h] [rbp-98h] BYREF _BYTE v10[32]; // [rsp+60h] [rbp-78h] BYREF long long (*v11)(void); // [rsp+80h] [rbp-58h] long long v12; // [rsp+88h] [rbp-50h] ConfigMgr *v13; // [rsp+90h] [rbp-48h] char *v14; // [rsp+98h] [rbp-40h] _BYTE *v15; // [rsp+A0h] [rbp-38h] char *v16; // [rsp+A8h] [rbp-30h] _BYTE *v17; // [rsp+B8h] [rbp-20h] _BYTE *v18; // [rsp+C8h] [rbp-10h] char *v19; // [rsp+D0h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v5 = ConfigMgr::instance(a1); v14 = &v8; v19 = &v8; std::string::basic_string<std::allocator<char>>((long long)v9, (long long)"", (long long)&v8); ConfigMgr::GetOption<std::string>(v10, v5, a2, v9, 1LL); std::string::~string(v9); v16 = &v8; v6 = 0; if ( std::string::empty((long long)v10) ) { v4 = v11(); v15 = v7; v18 = v7; v6 = 1; std::string::basic_string<std::allocator<char>>((long long)a1, v4, (long long)v7); } else { std::string::basic_string(a1, (long long)v10); } if ( (v6 & 1) != 0 ) v17 = v7; std::string::~string(v10); return a1; }
~vector: SUB RSP,0x38 MOV qword ptr [RSP + 0x18],RDI MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RDI MOV RAX,qword ptr [RDI] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RDI + 0x8] MOV qword ptr [RSP + 0x10],RAX CALL 0x00152fb0 MOV RDX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] LAB_00183b1b: CALL 0x001535e0 JMP 0x00183b22 LAB_00183b22: JMP 0x00183b24 LAB_00183b24: MOV RDI,qword ptr [RSP] CALL 0x00186440 ADD RSP,0x38 RET
/* std::vector<unsigned char, std::allocator<unsigned char> >::~vector() */ void __thiscall std::vector<unsigned_char,std::allocator<unsigned_char>>::~vector (vector<unsigned_char,std::allocator<unsigned_char>> *this) { uchar *puVar1; uchar *puVar2; puVar1 = *(uchar **)this; puVar2 = *(uchar **)(this + 8); _Vector_base<unsigned_char,std::allocator<unsigned_char>>::_M_get_Tp_allocator ((_Vector_base<unsigned_char,std::allocator<unsigned_char>> *)this); /* try { // try from 00183b1b to 00183b1f has its CatchHandler @ 00183b32 */ _Destroy<unsigned_char*>(puVar1,puVar2); _Vector_base<unsigned_char,std::allocator<unsigned_char>>::~_Vector_base ((_Vector_base<unsigned_char,std::allocator<unsigned_char>> *)this); return; }
49,993
uf_intervall
eloqsql/storage/myisam/mi_packrec.c
static void uf_intervall(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { reg1 uint field_length=(uint) (end-to); memcpy(to,rec->huff_tree->intervalls+field_length*decode_pos(bit_buff, rec->huff_tree), (size_t) field_length); }
O3
c
uf_intervall: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %r12 movq 0x28(%rdi), %rax movq (%rax), %r13 movq 0x10(%rax), %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x83884 movl (%r12), %ecx decl %eax movl %eax, 0x4(%r12) btl %eax, %ecx jae 0x83873 addq $0x2, %r13 movswq (%r13), %rcx testq %rcx, %rcx js 0x838a3 leaq (%r13,%rcx,2), %r13 jmp 0x8385b movq %r12, %rdi callq 0x823cd movl $0x1f, 0x4(%r12) movl $0x1f, %eax cmpl $0x0, (%r12) jns 0x83873 jmp 0x8386f subq %rbx, %r14 andl $0x7fff, %ecx # imm = 0x7FFF imull %r14d, %ecx addq %rcx, %r15 movl %r14d, %edx movq %rbx, %rdi movq %r15, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x29080
uf_intervall_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov rbx, rdx mov r12, rsi mov rax, [rdi+28h] mov r13, [rax] mov r15, [rax+10h] mov eax, [rsi+4] loc_8385B: test eax, eax jz short loc_83884 mov ecx, [r12] dec eax mov [r12+4], eax bt ecx, eax jnb short loc_83873 loc_8386F: add r13, 2 loc_83873: movsx rcx, word ptr [r13+0] test rcx, rcx js short loc_838A3 lea r13, [r13+rcx*2+0] jmp short loc_8385B loc_83884: mov rdi, r12 call fill_buffer_0 mov dword ptr [r12+4], 1Fh mov eax, 1Fh cmp dword ptr [r12], 0 jns short loc_83873 jmp short loc_8386F loc_838A3: sub r14, rbx and ecx, 7FFFh imul ecx, r14d add r15, rcx mov edx, r14d mov rdi, rbx mov rsi, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memcpy
long long uf_intervall_0(long long a1, int *a2, long long a3, int a4) { __int16 **v6; // rax __int16 *v7; // r13 __int16 *v8; // r15 unsigned int v9; // eax int v10; // ecx long long v11; // rcx v6 = *(__int16 ***)(a1 + 40); v7 = *v6; v8 = v6[2]; v9 = a2[1]; while ( 1 ) { if ( v9 ) { v10 = *a2; a2[1] = --v9; if ( !_bittest(&v10, v9) ) goto LABEL_5; LABEL_4: ++v7; goto LABEL_5; } fill_buffer_0((long long)a2); a2[1] = 31; v9 = 31; if ( *a2 < 0 ) goto LABEL_4; LABEL_5: v11 = *v7; if ( v11 < 0 ) return memcpy(a3, (char *)v8 + (a4 - (_DWORD)a3) * (unsigned int)(v11 & 0x7FFF), (unsigned int)(a4 - a3)); v7 += v11; } }
uf_intervall: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDX MOV R12,RSI MOV RAX,qword ptr [RDI + 0x28] MOV R13,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RSI + 0x4] LAB_0018385b: TEST EAX,EAX JZ 0x00183884 MOV ECX,dword ptr [R12] DEC EAX MOV dword ptr [R12 + 0x4],EAX BT ECX,EAX JNC 0x00183873 LAB_0018386f: ADD R13,0x2 LAB_00183873: MOVSX RCX,word ptr [R13] TEST RCX,RCX JS 0x001838a3 LEA R13,[R13 + RCX*0x2] JMP 0x0018385b LAB_00183884: MOV RDI,R12 CALL 0x001823cd MOV dword ptr [R12 + 0x4],0x1f MOV EAX,0x1f CMP dword ptr [R12],0x0 JNS 0x00183873 JMP 0x0018386f LAB_001838a3: SUB R14,RBX AND ECX,0x7fff IMUL ECX,R14D ADD R15,RCX MOV EDX,R14D MOV RDI,RBX MOV RSI,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00129080
void uf_intervall(long param_1,uint *param_2,void *param_3,int param_4) { short sVar1; long lVar2; uint uVar3; short *psVar4; psVar4 = (short *)**(int8 **)(param_1 + 0x28); lVar2 = (*(int8 **)(param_1 + 0x28))[2]; uVar3 = param_2[1]; do { if (uVar3 == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar3 = 0x1f; if ((int)*param_2 < 0) goto LAB_0018386f; } else { uVar3 = uVar3 - 1; param_2[1] = uVar3; if ((*param_2 >> (uVar3 & 0x1f) & 1) != 0) { LAB_0018386f: psVar4 = psVar4 + 1; } } sVar1 = *psVar4; if ((long)sVar1 < 0) { uVar3 = param_4 - (int)param_3; memcpy(param_3,(void *)(lVar2 + (ulong)(((int)sVar1 & 0x7fffU) * uVar3)),(ulong)uVar3); return; } psVar4 = psVar4 + sVar1; } while( true ); }
49,994
ma_rec_check
eloqsql/storage/maria/ma_dynrec.c
my_bool _ma_rec_check(MARIA_HA *info,const uchar *record, uchar *rec_buff, ulong packed_length, my_bool with_checksum, ha_checksum checksum) { uint length,new_length,flag,bit,i; const uchar *pos,*end; uchar *packpos,*to; enum en_fieldtype type; reg3 MARIA_COLUMNDEF *column; DBUG_ENTER("_ma_rec_check"); packpos=rec_buff; to= rec_buff+info->s->base.pack_bytes; column= info->s->columndef; flag= *packpos; bit=1; record+= info->s->base.null_bytes; to+= info->s->base.null_bytes; for (i=info->s->base.fields ; i-- > 0; record+= length, column++) { length=(uint) column->length; if ((type = (enum en_fieldtype) column->type) != FIELD_NORMAL) { if (type == FIELD_BLOB) { uint blob_length= _ma_calc_blob_length(length-portable_sizeof_char_ptr,record); if (!blob_length && !(flag & bit)) goto err; if (blob_length) to+=length - portable_sizeof_char_ptr+ blob_length; } else if (type == FIELD_SKIP_ZERO) { if (memcmp(record, maria_zero_string, length) == 0) { if (!(flag & bit)) goto err; } else to+=length; } else if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE) { pos= record; end= record + length; if (type == FIELD_SKIP_ENDSPACE) { /* Pack trailing spaces */ while (end > record && *(end-1) == ' ') end--; } else { /* Pack pre-spaces */ while (pos < end && *pos == ' ') pos++; } new_length=(uint) (end-pos); if (new_length + 1 + MY_TEST(column->length > 255 && new_length > 127) < length) { if (!(flag & bit)) goto err; if (column->length > 255 && new_length > 127) { /* purecov: begin inspected */ if (to[0] != (uchar) ((new_length & 127) + 128) || to[1] != (uchar) (new_length >> 7)) goto err; to+=2; /* purecov: end */ } else if (*to++ != (uchar) new_length) goto err; to+=new_length; } else to+=length; } else if (type == FIELD_VARCHAR) { uint pack_length= HA_VARCHAR_PACKLENGTH(column->length -1); uint tmp_length; if (pack_length == 1) { tmp_length= (uint) *record; to+= 1+ tmp_length; continue; } else { tmp_length= uint2korr(record); to+= get_pack_length(tmp_length)+tmp_length; } continue; } else { to+=length; continue; /* Normal field */ } if ((bit= bit << 1) >= 256) { flag= *++packpos; bit=1; } } else to+= length; } if (packed_length != (uint) (to - rec_buff) + MY_TEST(info->s->calc_checksum) || (bit != 1 && (flag & ~(bit - 1)))) goto err; if (with_checksum && ((uchar) checksum != (uchar) *to)) { DBUG_PRINT("error",("wrong checksum for row")); goto err; } DBUG_RETURN(0); err: DBUG_RETURN(1); }
O3
c
ma_rec_check: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r9d, -0x34(%rbp) movl %r8d, -0x38(%rbp) movq %rcx, -0x58(%rbp) movq (%rdi), %rcx movl 0x3c8(%rcx), %ebx movl 0x3f4(%rcx), %r12d addq %rdx, %r12 movzbl (%rdx), %edi movl 0x3fc(%rcx), %eax addq %rax, %r12 testl %ebx, %ebx movq %rcx, -0x50(%rbp) je 0x4aee9 movq %rsi, %r13 addq %rax, %r13 movq 0x588(%rcx), %r15 movl $0x1, %r9d movq %rdx, -0x48(%rbp) movq %rdx, -0x40(%rbp) movzwl 0x8(%r15), %r14d movl (%r15), %ecx testl %ecx, %ecx je 0x4ad94 cmpl $0x3, %ecx je 0x4ad19 cmpl $0x4, %ecx jne 0x4ad49 leal -0x9(%r14), %eax cmpl $0x3, %eax ja 0x4adeb leaq 0xc2f16(%rip), %rcx # 0x10dc1c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movzbl (%r13), %eax jmp 0x4aded movl %r9d, -0x30(%rbp) movl %edi, -0x2c(%rbp) movq %r13, %rdi leaq 0x4054c6(%rip), %rsi # 0x4501f0 movq %r14, %rdx callq 0x2b620 testl %eax, %eax je 0x4ad9c addq %r14, %r12 movl -0x2c(%rbp), %edi movq -0x40(%rbp), %rdx movl -0x30(%rbp), %r9d jmp 0x4aeb5 cmpl $0x2, %ecx ja 0x4ad75 leaq (%r14,%r13), %rax cmpl $0x1, %ecx jne 0x4adb5 movq %rax, %r8 cmpq %r13, %rax jbe 0x4ad6a leaq -0x1(%r8), %rax cmpb $0x20, -0x1(%r8) je 0x4ad57 movq %r13, %rcx movq %r8, %rax jmp 0x4ae3a cmpl $0x8, %ecx jne 0x4ad94 cmpl $0x100, %r14d # imm = 0x100 ja 0x4ae18 movzbl (%r13), %eax incq %rax jmp 0x4ae2f addq %r14, %r12 jmp 0x4aed6 movl -0x2c(%rbp), %edi movl -0x30(%rbp), %r9d testl %r9d, %edi movq -0x40(%rbp), %rdx jne 0x4aeb5 jmp 0x4af2a movq %r13, %rcx testl %r14d, %r14d je 0x4ae37 cmpb $0x20, (%rcx) jne 0x4ae3a incq %rcx cmpq %rax, %rcx jb 0x4adbd jmp 0x4ae3a movzwl (%r13), %ecx movzbl 0x2(%r13), %eax shll $0x10, %eax orq %rcx, %rax jmp 0x4aded movl (%r13), %eax jmp 0x4aded movzwl (%r13), %eax jmp 0x4aded xorl %eax, %eax movl %r14d, %ecx addl $-0x8, %ecx addl %eax, %ecx testq %rax, %rax cmoveq %rax, %rcx addq %rcx, %r12 testq %rax, %rax jne 0x4aeb5 movl %edi, %eax andl %r9d, %eax jne 0x4aeb5 jmp 0x4af2a movzwl (%r13), %eax xorl %ecx, %ecx cmpq $0xff, %rax setae %cl leaq (%rax,%rcx,2), %rax incq %rax addq %rax, %r12 jmp 0x4aed6 movq %r13, %rcx subq %rcx, %rax cmpl $0x100, %r14d # imm = 0x100 setae %r8b cmpl $0x7f, %eax seta %cl andb %r8b, %cl movzbl %cl, %r8d addl %eax, %r8d incl %r8d cmpl %r14d, %r8d jae 0x4ae9e testl %r9d, %edi je 0x4af2a movzbl (%r12), %r8d testb %cl, %cl je 0x4aea3 movl %eax, %ecx orl $0x80, %ecx movzbl %cl, %ecx cmpl %r8d, %ecx jne 0x4af2a movl %eax, %r8d shrl $0x7, %r8d movl $0x2, %ecx cmpb %r8b, 0x1(%r12) je 0x4aead jmp 0x4af2a addq %r14, %r12 jmp 0x4aeb5 movl $0x1, %ecx cmpb %al, %r8b jne 0x4af2a addq %rcx, %r12 movl %eax, %eax addq %rax, %r12 addl %r9d, %r9d cmpl $0x100, %r9d # imm = 0x100 jb 0x4aed6 movq -0x48(%rbp), %rax movzbl 0x1(%rax), %edi incq %rax movq %rax, -0x48(%rbp) movl $0x1, %r9d decl %ebx addq %r14, %r13 addq $0x38, %r15 testl %ebx, %ebx jne 0x4acd8 jmp 0x4aeef movl $0x1, %r9d movl %r12d, %eax subl %edx, %eax movq -0x50(%rbp), %rcx cmpq $0x1, 0x6a8(%rcx) sbbl $-0x1, %eax cmpq -0x58(%rbp), %rax jne 0x4af2a cmpl $0x1, %r9d je 0x4af17 negl %r9d testl %r9d, %edi jne 0x4af2a cmpb $0x0, -0x38(%rbp) je 0x4af26 movl -0x34(%rbp), %eax cmpb %al, (%r12) jne 0x4af2a xorl %eax, %eax jmp 0x4af2c movb $0x1, %al addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_rec_check: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_34], r9d mov [rbp+var_38], r8d mov [rbp+var_58], rcx mov rcx, [rdi] mov ebx, [rcx+3C8h] mov r12d, [rcx+3F4h] add r12, rdx movzx edi, byte ptr [rdx] mov eax, [rcx+3FCh] add r12, rax test ebx, ebx mov [rbp+var_50], rcx jz loc_4AEE9 mov r13, rsi add r13, rax mov r15, [rcx+588h] mov r9d, 1 mov [rbp+var_48], rdx mov [rbp+var_40], rdx loc_4ACD8: movzx r14d, word ptr [r15+8] mov ecx, [r15] test ecx, ecx jz loc_4AD94 cmp ecx, 3 jz short loc_4AD19 cmp ecx, 4 jnz short loc_4AD49 lea eax, [r14-9]; switch 4 cases cmp eax, 3 ja def_4AD0D; jumptable 000000000004AD0D default case lea rcx, jpt_4AD0D movsxd rax, ds:(jpt_4AD0D - 10DC1Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4AD0F: movzx eax, byte ptr [r13+0]; jumptable 000000000004AD0D case 9 jmp loc_4ADED loc_4AD19: mov [rbp+var_30], r9d mov [rbp+var_2C], edi mov rdi, r13 lea rsi, maria_zero_string mov rdx, r14 call _bcmp test eax, eax jz short loc_4AD9C add r12, r14 mov edi, [rbp+var_2C] mov rdx, [rbp+var_40] mov r9d, [rbp+var_30] jmp loc_4AEB5 loc_4AD49: cmp ecx, 2 ja short loc_4AD75 lea rax, [r14+r13] cmp ecx, 1 jnz short loc_4ADB5 loc_4AD57: mov r8, rax cmp rax, r13 jbe short loc_4AD6A lea rax, [r8-1] cmp byte ptr [r8-1], 20h ; ' ' jz short loc_4AD57 loc_4AD6A: mov rcx, r13 mov rax, r8 jmp loc_4AE3A loc_4AD75: cmp ecx, 8 jnz short loc_4AD94 cmp r14d, 100h ja loc_4AE18 movzx eax, byte ptr [r13+0] inc rax jmp loc_4AE2F loc_4AD94: add r12, r14 jmp loc_4AED6 loc_4AD9C: mov edi, [rbp+var_2C] mov r9d, [rbp+var_30] test edi, r9d mov rdx, [rbp+var_40] jnz loc_4AEB5 jmp loc_4AF2A loc_4ADB5: mov rcx, r13 test r14d, r14d jz short loc_4AE37 loc_4ADBD: cmp byte ptr [rcx], 20h ; ' ' jnz short loc_4AE3A inc rcx cmp rcx, rax jb short loc_4ADBD jmp short loc_4AE3A loc_4ADCC: movzx ecx, word ptr [r13+0]; jumptable 000000000004AD0D case 11 movzx eax, byte ptr [r13+2] shl eax, 10h or rax, rcx jmp short loc_4ADED loc_4ADDE: mov eax, [r13+0]; jumptable 000000000004AD0D case 12 jmp short loc_4ADED loc_4ADE4: movzx eax, word ptr [r13+0]; jumptable 000000000004AD0D case 10 jmp short loc_4ADED def_4AD0D: xor eax, eax; jumptable 000000000004AD0D default case loc_4ADED: mov ecx, r14d add ecx, 0FFFFFFF8h add ecx, eax test rax, rax cmovz rcx, rax add r12, rcx test rax, rax jnz loc_4AEB5 mov eax, edi and eax, r9d jnz loc_4AEB5 jmp loc_4AF2A loc_4AE18: movzx eax, word ptr [r13+0] xor ecx, ecx cmp rax, 0FFh setnb cl lea rax, [rax+rcx*2] inc rax loc_4AE2F: add r12, rax jmp loc_4AED6 loc_4AE37: mov rcx, r13 loc_4AE3A: sub rax, rcx cmp r14d, 100h setnb r8b cmp eax, 7Fh setnbe cl and cl, r8b movzx r8d, cl add r8d, eax inc r8d cmp r8d, r14d jnb short loc_4AE9E test edi, r9d jz loc_4AF2A movzx r8d, byte ptr [r12] test cl, cl jz short loc_4AEA3 mov ecx, eax or ecx, 80h movzx ecx, cl cmp ecx, r8d jnz loc_4AF2A mov r8d, eax shr r8d, 7 mov ecx, 2 cmp [r12+1], r8b jz short loc_4AEAD jmp loc_4AF2A loc_4AE9E: add r12, r14 jmp short loc_4AEB5 loc_4AEA3: mov ecx, 1 cmp r8b, al jnz short loc_4AF2A loc_4AEAD: add r12, rcx mov eax, eax add r12, rax loc_4AEB5: add r9d, r9d cmp r9d, 100h jb short loc_4AED6 mov rax, [rbp+var_48] movzx edi, byte ptr [rax+1] inc rax mov [rbp+var_48], rax mov r9d, 1 loc_4AED6: dec ebx add r13, r14 add r15, 38h ; '8' test ebx, ebx jnz loc_4ACD8 jmp short loc_4AEEF loc_4AEE9: mov r9d, 1 loc_4AEEF: mov eax, r12d sub eax, edx mov rcx, [rbp+var_50] cmp qword ptr [rcx+6A8h], 1 sbb eax, 0FFFFFFFFh cmp rax, [rbp+var_58] jnz short loc_4AF2A cmp r9d, 1 jz short loc_4AF17 neg r9d test edi, r9d jnz short loc_4AF2A loc_4AF17: cmp byte ptr [rbp+var_38], 0 jz short loc_4AF26 mov eax, [rbp+var_34] cmp [r12], al jnz short loc_4AF2A loc_4AF26: xor eax, eax jmp short loc_4AF2C loc_4AF2A: mov al, 1 loc_4AF2C: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
bool ma_rec_check(long long *a1, long long a2, unsigned __int8 *a3, long long a4, char a5, char a6) { long long v6; // rcx int v7; // ebx unsigned __int8 *v8; // r12 int v9; // edi long long v10; // rax unsigned __int8 *v11; // r12 unsigned __int8 *v12; // r13 long long v13; // r15 unsigned int v14; // r9d long long v15; // r14 unsigned int v16; // ecx unsigned long long v17; // rax unsigned __int8 *v18; // rax unsigned __int8 *v19; // r8 unsigned __int8 *v20; // rcx long long v21; // rax long long v22; // rcx unsigned int v23; // eax bool v24; // cl int v25; // r8d long long v26; // rcx long long v29; // [rsp+10h] [rbp-50h] unsigned __int8 *v30; // [rsp+18h] [rbp-48h] int v31; // [rsp+20h] [rbp-40h] unsigned int v34; // [rsp+30h] [rbp-30h] v6 = *a1; v7 = *(_DWORD *)(*a1 + 968); v8 = &a3[*(unsigned int *)(*a1 + 1012)]; v9 = *a3; v10 = *(unsigned int *)(v6 + 1020); v11 = &v8[v10]; v29 = v6; if ( v7 ) { v12 = (unsigned __int8 *)(v10 + a2); v13 = *(_QWORD *)(v6 + 1416); v14 = 1; v30 = a3; v31 = (int)a3; while ( 1 ) { v15 = *(unsigned __int16 *)(v13 + 8); v16 = *(_DWORD *)v13; if ( !*(_DWORD *)v13 ) goto LABEL_18; if ( v16 == 3 ) { v34 = v14; if ( (unsigned int)bcmp(v12, &maria_zero_string, v15) ) { v11 += v15; LODWORD(a3) = v31; v14 = v34; } else { v14 = v34; LODWORD(a3) = v31; if ( (v34 & v9) == 0 ) return 1; } LABEL_46: v14 *= 2; if ( v14 >= 0x100 ) { v9 = *++v30; v14 = 1; } goto LABEL_48; } if ( v16 == 4 ) { switch ( *(_WORD *)(v13 + 8) ) { case 9: v17 = *v12; break; case 0xA: v17 = *(unsigned __int16 *)v12; break; case 0xB: v17 = *(unsigned __int16 *)v12 | (unsigned long long)(v12[2] << 16); break; case 0xC: v17 = *(unsigned int *)v12; break; default: v17 = 0LL; break; } v22 = (unsigned int)(v17 + v15 - 8); if ( !v17 ) v22 = 0LL; v11 += v22; if ( !v17 && (v14 & v9) == 0 ) return 1; goto LABEL_46; } if ( v16 <= 2 ) { v18 = &v12[v15]; if ( v16 == 1 ) { do { v19 = v18; if ( v18 <= v12 ) break; --v18; } while ( *(v19 - 1) == 32 ); LODWORD(v20) = (_DWORD)v12; LODWORD(v18) = (_DWORD)v19; } else { v20 = v12; if ( *(_WORD *)(v13 + 8) ) { do { if ( *v20 != 32 ) break; ++v20; } while ( v20 < v18 ); } else { LODWORD(v20) = (_DWORD)v12; } } v23 = (_DWORD)v18 - (_DWORD)v20; v24 = (unsigned int)v15 >= 0x100 && v23 > 0x7F; if ( v23 + v24 + 1 >= (unsigned int)v15 ) { v11 += v15; } else { if ( (v14 & v9) == 0 ) return 1; v25 = *v11; if ( v24 ) { if ( ((unsigned __int8)v23 | 0x80) != v25 ) return 1; v26 = 2LL; if ( v11[1] != (unsigned __int8)(v23 >> 7) ) return 1; } else { v26 = 1LL; if ( (_BYTE)v25 != (_BYTE)v23 ) return 1; } v11 += v23 + v26; } goto LABEL_46; } if ( v16 == 8 ) { if ( (unsigned int)v15 > 0x100 ) v21 = *(unsigned __int16 *)v12 + 2LL * (*(unsigned __int16 *)v12 >= 0xFFuLL); else v21 = *v12; v11 += v21 + 1; } else { LABEL_18: v11 += v15; } LABEL_48: --v7; v12 += v15; v13 += 56LL; if ( !v7 ) return (_DWORD)v11 - (_DWORD)a3 - ((*(_QWORD *)(v29 + 1704) == 0LL) - 1) != a4 || v14 != 1 && (-v14 & v9) != 0 || a5 && *v11 != a6; } } v14 = 1; return (_DWORD)v11 - (_DWORD)a3 - ((*(_QWORD *)(v29 + 1704) == 0LL) - 1) != a4 || v14 != 1 && (-v14 & v9) != 0 || a5 && *v11 != a6; }
_ma_rec_check: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV dword ptr [RBP + -0x34],R9D MOV dword ptr [RBP + -0x38],R8D MOV qword ptr [RBP + -0x58],RCX MOV RCX,qword ptr [RDI] MOV EBX,dword ptr [RCX + 0x3c8] MOV R12D,dword ptr [RCX + 0x3f4] ADD R12,RDX MOVZX EDI,byte ptr [RDX] MOV EAX,dword ptr [RCX + 0x3fc] ADD R12,RAX TEST EBX,EBX MOV qword ptr [RBP + -0x50],RCX JZ 0x0014aee9 MOV R13,RSI ADD R13,RAX MOV R15,qword ptr [RCX + 0x588] MOV R9D,0x1 MOV qword ptr [RBP + -0x48],RDX MOV qword ptr [RBP + -0x40],RDX LAB_0014acd8: MOVZX R14D,word ptr [R15 + 0x8] MOV ECX,dword ptr [R15] TEST ECX,ECX JZ 0x0014ad94 CMP ECX,0x3 JZ 0x0014ad19 CMP ECX,0x4 JNZ 0x0014ad49 LEA EAX,[R14 + -0x9] CMP EAX,0x3 JA 0x0014adeb LEA RCX,[0x20dc1c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_9: MOVZX EAX,byte ptr [R13] JMP 0x0014aded LAB_0014ad19: MOV dword ptr [RBP + -0x30],R9D MOV dword ptr [RBP + -0x2c],EDI MOV RDI,R13 LEA RSI,[0x5501f0] MOV RDX,R14 CALL 0x0012b620 TEST EAX,EAX JZ 0x0014ad9c ADD R12,R14 MOV EDI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x40] MOV R9D,dword ptr [RBP + -0x30] JMP 0x0014aeb5 LAB_0014ad49: CMP ECX,0x2 JA 0x0014ad75 LEA RAX,[R14 + R13*0x1] CMP ECX,0x1 JNZ 0x0014adb5 LAB_0014ad57: MOV R8,RAX CMP RAX,R13 JBE 0x0014ad6a LEA RAX,[R8 + -0x1] CMP byte ptr [R8 + -0x1],0x20 JZ 0x0014ad57 LAB_0014ad6a: MOV RCX,R13 MOV RAX,R8 JMP 0x0014ae3a LAB_0014ad75: CMP ECX,0x8 JNZ 0x0014ad94 CMP R14D,0x100 JA 0x0014ae18 MOVZX EAX,byte ptr [R13] INC RAX JMP 0x0014ae2f LAB_0014ad94: ADD R12,R14 JMP 0x0014aed6 LAB_0014ad9c: MOV EDI,dword ptr [RBP + -0x2c] MOV R9D,dword ptr [RBP + -0x30] TEST EDI,R9D MOV RDX,qword ptr [RBP + -0x40] JNZ 0x0014aeb5 JMP 0x0014af2a LAB_0014adb5: MOV RCX,R13 TEST R14D,R14D JZ 0x0014ae37 LAB_0014adbd: CMP byte ptr [RCX],0x20 JNZ 0x0014ae3a INC RCX CMP RCX,RAX JC 0x0014adbd JMP 0x0014ae3a caseD_b: MOVZX ECX,word ptr [R13] MOVZX EAX,byte ptr [R13 + 0x2] SHL EAX,0x10 OR RAX,RCX JMP 0x0014aded caseD_c: MOV EAX,dword ptr [R13] JMP 0x0014aded caseD_a: MOVZX EAX,word ptr [R13] JMP 0x0014aded default: XOR EAX,EAX LAB_0014aded: MOV ECX,R14D ADD ECX,-0x8 ADD ECX,EAX TEST RAX,RAX CMOVZ RCX,RAX ADD R12,RCX TEST RAX,RAX JNZ 0x0014aeb5 MOV EAX,EDI AND EAX,R9D JNZ 0x0014aeb5 JMP 0x0014af2a LAB_0014ae18: MOVZX EAX,word ptr [R13] XOR ECX,ECX CMP RAX,0xff SETNC CL LEA RAX,[RAX + RCX*0x2] INC RAX LAB_0014ae2f: ADD R12,RAX JMP 0x0014aed6 LAB_0014ae37: MOV RCX,R13 LAB_0014ae3a: SUB RAX,RCX CMP R14D,0x100 SETNC R8B CMP EAX,0x7f SETA CL AND CL,R8B MOVZX R8D,CL ADD R8D,EAX INC R8D CMP R8D,R14D JNC 0x0014ae9e TEST EDI,R9D JZ 0x0014af2a MOVZX R8D,byte ptr [R12] TEST CL,CL JZ 0x0014aea3 MOV ECX,EAX OR ECX,0x80 MOVZX ECX,CL CMP ECX,R8D JNZ 0x0014af2a MOV R8D,EAX SHR R8D,0x7 MOV ECX,0x2 CMP byte ptr [R12 + 0x1],R8B JZ 0x0014aead JMP 0x0014af2a LAB_0014ae9e: ADD R12,R14 JMP 0x0014aeb5 LAB_0014aea3: MOV ECX,0x1 CMP R8B,AL JNZ 0x0014af2a LAB_0014aead: ADD R12,RCX MOV EAX,EAX ADD R12,RAX LAB_0014aeb5: ADD R9D,R9D CMP R9D,0x100 JC 0x0014aed6 MOV RAX,qword ptr [RBP + -0x48] MOVZX EDI,byte ptr [RAX + 0x1] INC RAX MOV qword ptr [RBP + -0x48],RAX MOV R9D,0x1 LAB_0014aed6: DEC EBX ADD R13,R14 ADD R15,0x38 TEST EBX,EBX JNZ 0x0014acd8 JMP 0x0014aeef LAB_0014aee9: MOV R9D,0x1 LAB_0014aeef: MOV EAX,R12D SUB EAX,EDX MOV RCX,qword ptr [RBP + -0x50] CMP qword ptr [RCX + 0x6a8],0x1 SBB EAX,-0x1 CMP RAX,qword ptr [RBP + -0x58] JNZ 0x0014af2a CMP R9D,0x1 JZ 0x0014af17 NEG R9D TEST EDI,R9D JNZ 0x0014af2a LAB_0014af17: CMP byte ptr [RBP + -0x38],0x0 JZ 0x0014af26 MOV EAX,dword ptr [RBP + -0x34] CMP byte ptr [R12],AL JNZ 0x0014af2a LAB_0014af26: XOR EAX,EAX JMP 0x0014af2c LAB_0014af2a: MOV AL,0x1 LAB_0014af2c: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _ma_rec_check(long *param_1,long param_2,byte *param_3,ulong param_4,char param_5,uint param_6) { ushort uVar1; long lVar2; uint *puVar3; int iVar4; uint uVar5; int4 extraout_var; ulong uVar6; int8 uVar8; uint *puVar9; long lVar10; int iVar11; uint uVar12; uint uVar13; byte *pbVar14; uint *__s1; ulong __n; uint *puVar15; byte *local_50; uint *puVar7; lVar2 = *param_1; iVar11 = *(int *)(lVar2 + 0x3c8); uVar12 = (uint)*param_3; pbVar14 = param_3 + (ulong)*(uint *)(lVar2 + 0x3fc) + (ulong)*(uint *)(lVar2 + 0x3f4); if (iVar11 == 0) { uVar13 = 1; } else { __s1 = (uint *)(param_2 + (ulong)*(uint *)(lVar2 + 0x3fc)); puVar15 = *(uint **)(lVar2 + 0x588); uVar13 = 1; local_50 = param_3; do { uVar1 = (ushort)puVar15[2]; __n = (ulong)uVar1; uVar5 = *puVar15; if (uVar5 == 0) { LAB_0014ad94: pbVar14 = pbVar14 + __n; } else { if (uVar5 == 3) { iVar4 = bcmp(__s1,maria_zero_string,__n); uVar6 = CONCAT44(extraout_var,iVar4); if (iVar4 == 0) { joined_r0x0014adaa: if ((uVar12 & uVar13) == 0) goto LAB_0014af2a; } else { pbVar14 = pbVar14 + __n; } } else if (uVar5 == 4) { switch(uVar1) { case 9: uVar5 = (uint)(byte)*__s1; break; case 10: uVar5 = (uint)(ushort)*__s1; break; case 0xb: uVar5 = (uint)(uint3)*__s1; break; case 0xc: uVar5 = *__s1; break; default: uVar5 = 0; } uVar6 = (ulong)((uVar1 - 8) + uVar5); if (uVar5 == 0) { uVar6 = 0; } pbVar14 = pbVar14 + uVar6; if (uVar5 == 0) { uVar6 = 0; goto joined_r0x0014adaa; } } else { if (2 < uVar5) { if (uVar5 != 8) goto LAB_0014ad94; if (uVar1 < 0x101) { uVar6 = (ulong)(byte)*__s1; } else { uVar6 = (ulong)(ushort)*__s1 + (ulong)(0xfe < (ulong)(ushort)*__s1) * 2; } pbVar14 = pbVar14 + uVar6 + 1; goto LAB_0014aed6; } puVar7 = (uint *)(__n + (long)__s1); puVar3 = puVar7; puVar9 = __s1; if (uVar5 == 1) { do { puVar7 = puVar3; if (puVar7 <= __s1) break; puVar3 = (uint *)((long)puVar7 + -1); } while (*(byte *)((long)puVar7 + -1) == 0x20); } else if (uVar1 != 0) { do { if ((byte)*puVar9 != 0x20) break; puVar9 = (uint *)((long)puVar9 + 1); } while (puVar9 < puVar7); } uVar6 = (long)puVar7 - (long)puVar9; uVar5 = (uint)uVar6; if ((0x7f < uVar5 && 0xff < uVar1) + uVar5 + 1 < (uint)uVar1) { if ((uVar12 & uVar13) == 0) goto LAB_0014af2a; if (0x7f < uVar5 && 0xff < uVar1) { if (((uVar5 & 0xff | 0x80) != (uint)*pbVar14) || (lVar10 = 2, pbVar14[1] != (byte)(uVar6 >> 7))) goto LAB_0014af2a; } else { lVar10 = 1; if (*pbVar14 != (byte)uVar6) goto LAB_0014af2a; } pbVar14 = pbVar14 + (uVar6 & 0xffffffff) + lVar10; } else { pbVar14 = pbVar14 + __n; } } uVar13 = uVar13 * 2; if (0xff < uVar13) { uVar12 = (uint)local_50[1]; local_50 = local_50 + 1; uVar13 = 1; } } LAB_0014aed6: iVar11 = iVar11 + -1; __s1 = (uint *)((long)__s1 + __n); puVar15 = puVar15 + 0xe; } while (iVar11 != 0); } uVar6 = (ulong)((((int)pbVar14 - (int)param_3) + 1) - (uint)(*(long *)(lVar2 + 0x6a8) == 0)); if (((uVar6 == param_4) && ((uVar13 == 1 || ((uVar12 & -uVar13) == 0)))) && ((param_5 == '\0' || (uVar6 = (ulong)param_6, *pbVar14 == (byte)param_6)))) { uVar8 = 0; } else { LAB_0014af2a: uVar8 = CONCAT71((int7)(uVar6 >> 8),1); } return uVar8; }
49,995
ftxui::TerminalInputParser::ParseDCS()
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/terminal_input_parser.cpp
TerminalInputParser::Output TerminalInputParser::ParseDCS() { // Parse until the string terminator ST. while (true) { if (!Eat()) { return UNCOMPLETED; } if (Current() != '\x1B') { continue; } if (!Eat()) { return UNCOMPLETED; } if (Current() != '\\') { continue; } return SPECIAL; } }
O0
cpp
ftxui::TerminalInputParser::ParseDCS(): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x20(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x72ab0 testb $0x1, %al jne 0x72db6 movq -0x20(%rbp), %rdi xorl %esi, %esi callq 0x73b90 jmp 0x72e04 movq -0x10(%rbp), %rdi callq 0x72a80 movzbl %al, %eax cmpl $0x1b, %eax je 0x72dc9 jmp 0x72d9c movq -0x10(%rbp), %rdi callq 0x72ab0 testb $0x1, %al jne 0x72de3 movq -0x20(%rbp), %rdi xorl %esi, %esi callq 0x73b90 jmp 0x72e04 movq -0x10(%rbp), %rdi callq 0x72a80 movzbl %al, %eax cmpl $0x5c, %eax je 0x72df6 jmp 0x72d9c movq -0x20(%rbp), %rdi movl $0x3, %esi callq 0x73b90 movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
_ZN5ftxui19TerminalInputParser8ParseDCSEv: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_20], rdi mov [rbp+var_18], rdi mov [rbp+var_8], rsi mov rax, [rbp+var_8] mov [rbp+var_10], rax loc_72D9C: mov rdi, [rbp+var_10]; this call _ZN5ftxui19TerminalInputParser3EatEv; ftxui::TerminalInputParser::Eat(void) test al, 1 jnz short loc_72DB6 mov rdi, [rbp+var_20] xor esi, esi call _ZN5ftxui19TerminalInputParser6OutputC2ENS0_4TypeE; ftxui::TerminalInputParser::Output::Output(ftxui::TerminalInputParser::Type) jmp short loc_72E04 loc_72DB6: mov rdi, [rbp+var_10]; this call _ZN5ftxui19TerminalInputParser7CurrentEv; ftxui::TerminalInputParser::Current(void) movzx eax, al cmp eax, 1Bh jz short loc_72DC9 jmp short loc_72D9C loc_72DC9: mov rdi, [rbp+var_10]; this call _ZN5ftxui19TerminalInputParser3EatEv; ftxui::TerminalInputParser::Eat(void) test al, 1 jnz short loc_72DE3 mov rdi, [rbp+var_20] xor esi, esi call _ZN5ftxui19TerminalInputParser6OutputC2ENS0_4TypeE; ftxui::TerminalInputParser::Output::Output(ftxui::TerminalInputParser::Type) jmp short loc_72E04 loc_72DE3: mov rdi, [rbp+var_10]; this call _ZN5ftxui19TerminalInputParser7CurrentEv; ftxui::TerminalInputParser::Current(void) movzx eax, al cmp eax, 5Ch ; '\' jz short loc_72DF6 jmp short loc_72D9C loc_72DF6: mov rdi, [rbp+var_20] mov esi, 3 call _ZN5ftxui19TerminalInputParser6OutputC2ENS0_4TypeE; ftxui::TerminalInputParser::Output::Output(ftxui::TerminalInputParser::Type) loc_72E04: mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
ftxui::TerminalInputParser * ftxui::TerminalInputParser::ParseDCS( ftxui::TerminalInputParser *this, ftxui::TerminalInputParser *a2) { while ( 1 ) { if ( !ftxui::TerminalInputParser::Eat(a2) ) { LABEL_2: ftxui::TerminalInputParser::Output::Output(this, 0LL); return this; } if ( ftxui::TerminalInputParser::Current(a2) == 27 ) { if ( !ftxui::TerminalInputParser::Eat(a2) ) goto LABEL_2; if ( ftxui::TerminalInputParser::Current(a2) == 92 ) break; } } ftxui::TerminalInputParser::Output::Output(this, 3LL); return this; }
ParseDCS: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x8],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX LAB_00172d9c: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00172ab0 TEST AL,0x1 JNZ 0x00172db6 MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x00173b90 JMP 0x00172e04 LAB_00172db6: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00172a80 MOVZX EAX,AL CMP EAX,0x1b JZ 0x00172dc9 JMP 0x00172d9c LAB_00172dc9: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00172ab0 TEST AL,0x1 JNZ 0x00172de3 MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x00173b90 JMP 0x00172e04 LAB_00172de3: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00172a80 MOVZX EAX,AL CMP EAX,0x5c JZ 0x00172df6 JMP 0x00172d9c LAB_00172df6: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,0x3 CALL 0x00173b90 LAB_00172e04: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
/* ftxui::TerminalInputParser::ParseDCS() */ Output * ftxui::TerminalInputParser::ParseDCS(void) { char cVar1; ulong uVar2; TerminalInputParser *in_RSI; Output *in_RDI; while( true ) { do { uVar2 = Eat(in_RSI); if ((uVar2 & 1) == 0) { Output::Output(in_RDI,0); return in_RDI; } cVar1 = Current(in_RSI); } while (cVar1 != '\x1b'); uVar2 = Eat(in_RSI); if ((uVar2 & 1) == 0) break; cVar1 = Current(in_RSI); if (cVar1 == '\\') { Output::Output(in_RDI,3); return in_RDI; } } Output::Output(in_RDI,0); return in_RDI; }
49,996
Catch::TestCaseTracking::ITracker::~ITracker()
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
ITracker::~ITracker() = default;
O3
cpp
Catch::TestCaseTracking::ITracker::~ITracker(): pushq %rbx movq %rdi, %rbx leaq 0xbb8cd(%rip), %rax # 0x12d7a0 addq $0x10, %rax movq %rax, (%rdi) addq $0x40, %rdi callq 0x78d3e movq 0x8(%rbx), %rdi addq $0x18, %rbx cmpq %rbx, %rdi je 0x71efc movq (%rbx), %rsi incq %rsi popq %rbx jmp 0x17150 popq %rbx retq
_ZN5Catch16TestCaseTracking8ITrackerD2Ev: push rbx; Alternative name is 'Catch::TestCaseTracking::ITracker::~ITracker()' mov rbx, rdi lea rax, _ZTVN5Catch16TestCaseTracking8ITrackerE; `vtable for'Catch::TestCaseTracking::ITracker add rax, 10h mov [rdi], rax add rdi, 40h ; '@' call _ZNSt6vectorIN5Catch6Detail10unique_ptrINS0_16TestCaseTracking8ITrackerEEESaIS5_EED2Ev; std::vector<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>>::~vector() mov rdi, [rbx+8]; void * add rbx, 18h cmp rdi, rbx jz short loc_71EFC mov rsi, [rbx] inc rsi; unsigned __int64 pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_71EFC: pop rbx retn
void Catch::TestCaseTracking::ITracker::~ITracker(Catch::TestCaseTracking::ITracker *this) { _QWORD *v2; // rdi _QWORD *v3; // rbx *(_QWORD *)this = &`vtable for'Catch::TestCaseTracking::ITracker + 2; std::vector<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>>::~vector((char *)this + 64); v2 = (_QWORD *)*((_QWORD *)this + 1); v3 = (_QWORD *)((char *)this + 24); if ( v2 != v3 ) operator delete(v2, *v3 + 1LL); }
~ITracker: PUSH RBX MOV RBX,RDI LEA RAX,[0x22d7a0] ADD RAX,0x10 MOV qword ptr [RDI],RAX ADD RDI,0x40 CALL 0x00178d3e MOV RDI,qword ptr [RBX + 0x8] ADD RBX,0x18 CMP RDI,RBX JZ 0x00171efc MOV RSI,qword ptr [RBX] INC RSI POP RBX JMP 0x00117150 LAB_00171efc: POP RBX RET
/* Catch::TestCaseTracking::ITracker::~ITracker() */ void __thiscall Catch::TestCaseTracking::ITracker::~ITracker(ITracker *this) { *(int ***)this = &PTR__ITracker_0022d7b0; std:: vector<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>,std::allocator<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>>> ::~vector((vector<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>,std::allocator<Catch::Detail::unique_ptr<Catch::TestCaseTracking::ITracker>>> *)(this + 0x40)); if (*(ITracker **)(this + 8) != this + 0x18) { operator_delete(*(ITracker **)(this + 8),*(long *)(this + 0x18) + 1); return; } return; }
49,997
mysql_stmt_store_result_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_store_result_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_store_result, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_store_result(stmt); return 0; }) }
O0
c
mysql_stmt_store_result_start: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x6ee98 movq -0x18(%rbp), %rdi callq 0x5c8d0 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x6efa9 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x28(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0x6efc0 leaq -0x30(%rbp), %rdx callq 0x70f10 movl %eax, -0x1c(%rbp) movq -0x28(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x1c(%rbp) jle 0x6ef06 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x6efa9 cmpl $0x0, -0x1c(%rbp) jge 0x6ef95 jmp 0x6ef12 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1daa96(%rip), %rax # 0x2499d0 movq (%rax), %rsi movl $0x5, %edx callq 0x38140 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x1daa74(%rip), %rax # 0x2499e0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x38140 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x6efa2 movq -0x28(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_store_result_start: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_6EE98 mov rdi, [rbp+var_18] call mysql_stmt_store_result mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_6EFA9 loc_6EE98: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_28] add rdi, 38h ; '8' lea rsi, mysql_stmt_store_result_start_internal lea rdx, [rbp+var_30] call my_context_spawn mov [rbp+var_1C], eax mov rax, [rbp+var_28] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+14h], 0 cmp [rbp+var_1C], 0 jle short loc_6EF06 mov rax, [rbp+var_28] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_4], eax jmp loc_6EFA9 loc_6EF06: cmp [rbp+var_1C], 0 jge loc_6EF95 jmp short $+2 loc_6EF12: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_6EFA2 loc_6EF95: mov rax, [rbp+var_28] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_6EFA2: mov [rbp+var_4], 0 loc_6EFA9: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_store_result_start(_DWORD *a1, long long a2) { long long v3; // [rsp+0h] [rbp-30h] BYREF unsigned int *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] _DWORD *v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; if ( *(_QWORD *)(a2 + 56) ) { v4 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL); v3 = v6; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_store_result_start_internal, &v3); *((_BYTE *)v4 + 21) = 0; *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { if ( v5 >= 0 ) { *v7 = v4[2]; } else { *(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0; *v7 = 1; } return 0; } else { *((_BYTE *)v4 + 21) = 1; return *v4; } } else { *v7 = mysql_stmt_store_result(v6); return 0; } }
mysql_stmt_store_result_start: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x0016ee98 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0015c8d0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016efa9 LAB_0016ee98: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x38 LEA RSI,[0x16efc0] LEA RDX,[RBP + -0x30] CALL 0x00170f10 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x1c],0x0 JLE 0x0016ef06 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0016efa9 LAB_0016ef06: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x0016ef95 JMP 0x0016ef12 LAB_0016ef12: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x3499d0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00138140 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x3499e0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00138140 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x0016efa2 LAB_0016ef95: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_0016efa2: MOV dword ptr [RBP + -0x4],0x0 LAB_0016efa9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_store_result_start(int4 *param_1,long param_2) { int4 uVar1; long local_38; int4 *local_30; int local_24; long local_20; int4 *local_18; int4 local_c; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_store_result(param_2); *local_18 = uVar1; local_c = 0; } else { local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_30 + 5) = 1; local_38 = param_2; local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_store_result_start_internal,&local_38); *(int1 *)((long)local_30 + 0x15) = 0; *(int1 *)(local_30 + 5) = 0; if (local_24 < 1) { if (local_24 < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00349a20, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_30[2]; } local_c = 0; } else { *(int1 *)((long)local_30 + 0x15) = 1; local_c = *local_30; } } return local_c; }
49,998
my_casefold_mb
eloqsql/strings/ctype-mb.c
static size_t my_casefold_mb(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar *map, size_t is_upper) { const char *srcend= src + srclen; char *dst0= dst; DBUG_ASSERT(cs->mbmaxlen == 2); while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; if ((ch= get_case_info_for_ch(cs, (uchar) src[0], (uchar) src[1]))) { int code= is_upper ? ch->toupper : ch->tolower; src+= 2; if (code > 0xFF) *dst++= code >> 8; *dst++= code & 0xFF; } else { *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O0
c
my_casefold_mb: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp 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 -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x3f2ca jmp 0x3f2cc movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x3f400 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x3f130 movl %eax, %eax movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) je 0x3f3d1 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movzbl (%rax), %esi movq -0x10(%rbp), %rax movzbl 0x1(%rax), %edx callq 0x41e10 movq %rax, -0x50(%rbp) cmpq $0x0, %rax je 0x3f38b cmpq $0x0, 0x10(%rbp) je 0x3f330 movq -0x50(%rbp), %rax movl (%rax), %eax movl %eax, -0x58(%rbp) jmp 0x3f33a movq -0x50(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) cmpl $0xff, -0x54(%rbp) jle 0x3f36e movl -0x54(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl -0x54(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0x3f3cf movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb (%rax), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb (%rax), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0x3f3fb movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movzbl (%rcx), %ecx movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0x3f2cc movq -0x20(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_casefold_mb: push rbp mov rbp, rsp sub rsp, 60h 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_10] add rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov [rbp+var_40], rax jmp short $+2 loc_3F2CA: jmp short $+2 loc_3F2CC: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb loc_3F400 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] call my_ismbchar_0 mov eax, eax mov [rbp+var_48], rax cmp [rbp+var_48], 0 jz loc_3F3D1 mov rdi, [rbp+var_8] mov rax, [rbp+var_10] movzx esi, byte ptr [rax] mov rax, [rbp+var_10] movzx edx, byte ptr [rax+1] call get_case_info_for_ch mov [rbp+var_50], rax cmp rax, 0 jz short loc_3F38B cmp [rbp+arg_0], 0 jz short loc_3F330 mov rax, [rbp+var_50] mov eax, [rax] mov [rbp+var_58], eax jmp short loc_3F33A loc_3F330: mov rax, [rbp+var_50] mov eax, [rax+4] mov [rbp+var_58], eax loc_3F33A: mov eax, [rbp+var_58] mov [rbp+var_54], eax mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax cmp [rbp+var_54], 0FFh jle short loc_3F36E mov eax, [rbp+var_54] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_3F36E: mov eax, [rbp+var_54] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl jmp short loc_3F3CF loc_3F38B: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov cl, [rax] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov cl, [rax] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_3F3CF: jmp short loc_3F3FB loc_3F3D1: mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov rdx, rcx add rdx, 1 mov [rbp+var_10], rdx movzx ecx, byte ptr [rcx] mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_3F3FB: jmp loc_3F2CC loc_3F400: mov rax, [rbp+var_20] mov rcx, [rbp+var_40] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * my_casefold_mb( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6, long long a7) { unsigned __int8 *v7; // rax unsigned __int8 *v8; // rax char *v9; // rax char v10; // cl _BYTE *v11; // rax unsigned __int8 *v12; // rcx unsigned __int8 *v13; // rax int v15; // [rsp+8h] [rbp-58h] int *case_info_for_ch; // [rsp+10h] [rbp-50h] unsigned long long v18; // [rsp+28h] [rbp-38h] unsigned __int8 *v20; // [rsp+40h] [rbp-20h] unsigned __int8 *v21; // [rsp+50h] [rbp-10h] v21 = a2; v20 = a4; v18 = (unsigned long long)&a2[a3]; while ( (unsigned long long)v21 < v18 ) { if ( (unsigned int)my_ismbchar_0(a1, (long long)v21, v18) ) { case_info_for_ch = (int *)get_case_info_for_ch(a1, *v21, v21[1]); if ( case_info_for_ch ) { if ( a7 ) v15 = *case_info_for_ch; else v15 = case_info_for_ch[1]; v21 += 2; if ( v15 > 255 ) { v7 = v20++; *v7 = BYTE1(v15); } v8 = v20++; *v8 = v15; } else { *v20 = *v21; v9 = (char *)(v21 + 1); v21 += 2; v10 = *v9; v11 = v20 + 1; v20 += 2; *v11 = v10; } } else { v12 = v21++; v13 = v20++; *v13 = *(_BYTE *)(a6 + *v12); } } return (_BYTE *)(v20 - a4); }
my_casefold_mb: PUSH RBP MOV RBP,RSP SUB RSP,0x60 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 + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX JMP 0x0013f2ca LAB_0013f2ca: JMP 0x0013f2cc LAB_0013f2cc: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0013f400 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] CALL 0x0013f130 MOV EAX,EAX MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x0013f3d1 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOVZX ESI,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVZX EDX,byte ptr [RAX + 0x1] CALL 0x00141e10 MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JZ 0x0013f38b CMP qword ptr [RBP + 0x10],0x0 JZ 0x0013f330 MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x58],EAX JMP 0x0013f33a LAB_0013f330: MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x58],EAX LAB_0013f33a: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX CMP dword ptr [RBP + -0x54],0xff JLE 0x0013f36e MOV EAX,dword ptr [RBP + -0x54] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_0013f36e: MOV EAX,dword ptr [RBP + -0x54] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL JMP 0x0013f3cf LAB_0013f38b: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_0013f3cf: JMP 0x0013f3fb LAB_0013f3d1: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOVZX ECX,byte ptr [RCX] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_0013f3fb: JMP 0x0013f2cc LAB_0013f400: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_casefold_mb(int8 param_1,byte *param_2,long param_3,byte *param_4,int8 param_5, long param_6,long param_7) { int iVar1; int *piVar2; byte *pbVar3; int local_60; byte *local_28; byte *local_18; local_28 = param_4; local_18 = param_2; while (local_18 < param_2 + param_3) { iVar1 = my_ismbchar(param_1,local_18,param_2 + param_3); if (iVar1 == 0) { *local_28 = *(byte *)(param_6 + (ulong)*local_18); local_28 = local_28 + 1; local_18 = local_18 + 1; } else { piVar2 = (int *)get_case_info_for_ch(param_1,*local_18,local_18[1]); if (piVar2 == (int *)0x0) { pbVar3 = local_28 + 1; *local_28 = *local_18; local_28 = local_28 + 2; *pbVar3 = local_18[1]; } else { if (param_7 == 0) { local_60 = piVar2[1]; } else { local_60 = *piVar2; } if (0xff < local_60) { *local_28 = (byte)((uint)local_60 >> 8); local_28 = local_28 + 1; } *local_28 = (byte)local_60; local_28 = local_28 + 1; } local_18 = local_18 + 2; } } return (long)local_28 - (long)param_4; }
49,999
hashcmp
eloqsql/mysys/hash.c
static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key, size_t length) { size_t rec_keylength; uchar *rec_key= (uchar*) my_hash_key(hash, pos->data, &rec_keylength, 1); return ((length && length != rec_keylength) || my_strnncoll(hash->charset, (uchar*) rec_key, rec_keylength, (uchar*) key, rec_keylength)); }
O3
c
hashcmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r15 movq %rdx, %rbx movq %rdi, %r14 movq 0x50(%rdi), %rax testq %rax, %rax je 0x93c28 leaq -0x28(%rbp), %r12 movq %rsi, %rdi movq %r12, %rsi movl $0x1, %edx callq *%rax movq %rax, %rsi movq (%r12), %rdx jmp 0x93c33 movq 0x8(%r14), %rdx movq %rdx, -0x28(%rbp) addq (%r14), %rsi testq %r15, %r15 sete %al cmpq %r15, %rdx sete %cl orb %al, %cl movl $0x1, %eax cmpb $0x1, %cl jne 0x93c6b movq 0x68(%r14), %rdi movq 0xc0(%rdi), %rax movq %rbx, %rcx movq %rdx, %r8 xorl %r9d, %r9d callq *0x8(%rax) movl %eax, %ecx xorl %eax, %eax testl %ecx, %ecx setne %al addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
hashcmp: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15, rcx mov rbx, rdx mov r14, rdi mov rax, [rdi+50h] test rax, rax jz short loc_93C28 lea r12, [rbp+var_28] mov rdi, rsi mov rsi, r12 mov edx, 1 call rax mov rsi, rax mov rdx, [r12] jmp short loc_93C33 loc_93C28: mov rdx, [r14+8] mov [rbp+var_28], rdx add rsi, [r14] loc_93C33: test r15, r15 setz al cmp rdx, r15 setz cl or cl, al mov eax, 1 cmp cl, 1 jnz short loc_93C6B mov rdi, [r14+68h] mov rax, [rdi+0C0h] mov rcx, rbx mov r8, rdx xor r9d, r9d call qword ptr [rax+8] mov ecx, eax xor eax, eax test ecx, ecx setnz al loc_93C6B: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BOOL8 hashcmp(_QWORD *a1, long long a2, long long a3, long long a4) { long long ( *v6)(long long, _QWORD *, long long); // rax long long v7; // rsi long long v8; // rdx _BOOL8 result; // rax _QWORD v10[5]; // [rsp+8h] [rbp-28h] BYREF v6 = (long long ( *)(long long, _QWORD *, long long))a1[10]; if ( v6 ) { v7 = v6(a2, v10, 1LL); v8 = v10[0]; } else { v8 = a1[1]; v10[0] = v8; v7 = *a1 + a2; } result = 1LL; if ( a4 == 0 || v8 == a4 ) return (*(unsigned int ( **)(_QWORD, long long, long long, long long, long long, _QWORD))(*(_QWORD *)(a1[13] + 192LL) + 8LL))( a1[13], v7, v8, a3, v8, 0LL) != 0; return result; }
hashcmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15,RCX MOV RBX,RDX MOV R14,RDI MOV RAX,qword ptr [RDI + 0x50] TEST RAX,RAX JZ 0x00193c28 LEA R12,[RBP + -0x28] MOV RDI,RSI MOV RSI,R12 MOV EDX,0x1 CALL RAX MOV RSI,RAX MOV RDX,qword ptr [R12] JMP 0x00193c33 LAB_00193c28: MOV RDX,qword ptr [R14 + 0x8] MOV qword ptr [RBP + -0x28],RDX ADD RSI,qword ptr [R14] LAB_00193c33: TEST R15,R15 SETZ AL CMP RDX,R15 SETZ CL OR CL,AL MOV EAX,0x1 CMP CL,0x1 JNZ 0x00193c6b MOV RDI,qword ptr [R14 + 0x68] MOV RAX,qword ptr [RDI + 0xc0] MOV RCX,RBX MOV R8,RDX XOR R9D,R9D CALL qword ptr [RAX + 0x8] MOV ECX,EAX XOR EAX,EAX TEST ECX,ECX SETNZ AL LAB_00193c6b: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
bool hashcmp(long *param_1,long param_2,int8 param_3,long param_4) { int iVar1; bool bVar2; long local_30; if ((code *)param_1[10] == (code *)0x0) { local_30 = param_1[1]; param_2 = param_2 + *param_1; } else { param_2 = (*(code *)param_1[10])(param_2,&local_30,1); } bVar2 = true; if (local_30 == param_4 || param_4 == 0) { iVar1 = (**(code **)(*(long *)(param_1[0xd] + 0xc0) + 8)) (param_1[0xd],param_2,local_30,param_3,local_30,0); bVar2 = iVar1 != 0; } return bVar2; }