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
30,900
codegen_type_to_c_type
tsotchke[P]eshkol/src/backend/codegen/type_conversion.c
const char* codegen_type_to_c_type(Type* type) { assert(type != NULL); switch (type->kind) { case TYPE_VOID: return "void"; case TYPE_BOOLEAN: return "bool"; case TYPE_INTEGER: switch (type->int_size) { case INT_SIZE_8: return "int8_t"; case INT_SIZE_16: return "int16_t"; case INT_SIZE_32: return "int32_t"; case INT_SIZE_64: return "int64_t"; default: return "int"; } case TYPE_FLOAT: switch (type->float_size) { case FLOAT_SIZE_32: return "float"; case FLOAT_SIZE_64: return "double"; default: return "double"; } case TYPE_CHAR: return "char"; case TYPE_STRING: return "char*"; case TYPE_SYMBOL: return "char*"; case TYPE_PAIR: return "Pair*"; case TYPE_VECTOR: if (type->vector.element_type) { switch (type->vector.element_type->kind) { case TYPE_BOOLEAN: return "VectorB*"; case TYPE_INTEGER: return "VectorI*"; case TYPE_FLOAT: return "VectorF*"; case TYPE_CHAR: return "VectorC*"; case TYPE_STRING: return "VectorS*"; default: return "Vector*"; } } else { return "Vector*"; } case TYPE_FUNCTION: return "void*"; // Function pointers are complex in C case TYPE_STRUCT: return "void*"; // Structs are complex in C case TYPE_UNION: return "void*"; // Unions are complex in C case TYPE_ANY: return "void*"; case TYPE_UNKNOWN: return "void*"; default: return "void*"; } }
O2
c
codegen_type_to_c_type: testq %rdi, %rdi je 0x133d0 movl (%rdi), %eax cmpq $0xd, %rax ja 0x13345 leaq 0xbce4(%rip), %rcx # 0x1f020 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0xbe22(%rip), %rax # 0x1f16e retq leaq 0xbdd9(%rip), %rax # 0x1f12d retq leaq 0x6c37(%rip), %rax # 0x19f93 retq leaq 0xbdcf(%rip), %rax # 0x1f133 retq movl 0x8(%rdi), %eax cmpq $0x4, %rax jae 0x133c8 leaq 0xbce3(%rip), %rcx # 0x1f058 jmp 0x133c0 leaq 0x83e8(%rip), %rax # 0x1b766 retq leaq 0x6bd6(%rip), %rax # 0x19f5c retq cmpl $0x0, 0x8(%rdi) leaq 0x83eb(%rip), %rcx # 0x1b77d leaq 0xbd8d(%rip), %rax # 0x1f126 cmoveq %rcx, %rax retq movq 0x8(%rdi), %rcx leaq 0xbdbd(%rip), %rax # 0x1f166 testq %rcx, %rcx je 0x133c7 movl (%rcx), %ecx decl %ecx cmpl $0x5, %ecx jae 0x133c7 movl %ecx, %eax leaq 0xbca8(%rip), %rcx # 0x1f068 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x6b3c(%rip), %rax # 0x19f0b retq pushq %rax leaq 0xc76b(%rip), %rdi # 0x1fb43 leaq 0xbc9d(%rip), %rsi # 0x1f07c leaq 0xbcf6(%rip), %rcx # 0x1f0dc pushq $0x10 popq %rdx callq 0x2180
codegen_type_to_c_type: test rdi, rdi jz loc_133D0 mov eax, [rdi] cmp rax, 0Dh; switch 14 cases ja short def_13343; jumptable 0000000000013343 default case, cases 9-13 lea rcx, jpt_13343 movsxd rax, ds:(jpt_13343 - 1F020h)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_13343: lea rax, aVoid_1; jumptable 0000000000013343 default case, cases 9-13 retn loc_1334D: lea rax, aChar_0; jumptable 0000000000013343 cases 5,6 retn loc_13355: lea rax, aChar; jumptable 0000000000013343 case 4 retn loc_1335D: lea rax, aPair_0; jumptable 0000000000013343 case 7 retn loc_13365: mov eax, [rdi+8]; jumptable 0000000000013343 case 2 cmp rax, 4 jnb short loc_133C8 lea rcx, unk_1F058 jmp short loc_133C0 loc_13377: lea rax, aVoid; jumptable 0000000000013343 case 0 retn loc_1337F: lea rax, aBool; jumptable 0000000000013343 case 1 retn loc_13387: cmp dword ptr [rdi+8], 0; jumptable 0000000000013343 case 3 lea rcx, aFloat; "float" lea rax, aDouble; "double" cmovz rax, rcx retn loc_1339E: mov rcx, [rdi+8]; jumptable 0000000000013343 case 8 lea rax, aVector_0; "Vector*" test rcx, rcx jz short locret_133C7 mov ecx, [rcx] dec ecx cmp ecx, 5 jnb short locret_133C7 mov eax, ecx lea rcx, unk_1F068 loc_133C0: movsxd rax, dword ptr [rcx+rax*4] add rax, rcx locret_133C7: retn loc_133C8: lea rax, aInt; "int" retn loc_133D0: push rax lea rdi, aReturnTypeNull+7; "type != NULL" lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstCharCodeg; "const char *codegen_type_to_c_type(Type"... push 10h pop rdx call ___assert_fail
const char * codegen_type_to_c_type(_DWORD *a1) { const char *result; // rax unsigned long long v2; // rax char *v3; // rcx _DWORD *v4; // rcx unsigned int v5; // ecx if ( !a1 ) __assert_fail( "type != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c", 16LL, "const char *codegen_type_to_c_type(Type *)"); switch ( *a1 ) { case 0: result = "void"; break; case 1: result = "bool"; break; case 2: v2 = (unsigned int)a1[2]; if ( v2 < 4 ) { v3 = (char *)&unk_1F058; goto LABEL_17; } result = "int"; break; case 3: result = "double"; if ( !a1[2] ) result = "float"; break; case 4: result = "char"; break; case 5: case 6: result = "char*"; break; case 7: result = "Pair*"; break; case 8: v4 = (_DWORD *)*((_QWORD *)a1 + 1); result = "Vector*"; if ( v4 ) { v5 = *v4 - 1; if ( v5 < 5 ) { v2 = v5; v3 = (char *)&unk_1F068; LABEL_17: result = &v3[*(int *)&v3[4 * v2]]; } } break; default: result = "void*"; break; } return result; }
codegen_type_to_c_type: TEST RDI,RDI JZ 0x001133d0 MOV EAX,dword ptr [RDI] CMP RAX,0xd JA 0x00113345 LEA RCX,[0x11f020] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_9: LEA RAX,[0x11f16e] RET caseD_5: LEA RAX,[0x11f12d] RET caseD_4: LEA RAX,[0x119f93] RET caseD_7: LEA RAX,[0x11f133] RET caseD_2: MOV EAX,dword ptr [RDI + 0x8] CMP RAX,0x4 JNC 0x001133c8 LEA RCX,[0x11f058] JMP 0x001133c0 caseD_0: LEA RAX,[0x11b766] RET caseD_1: LEA RAX,[0x119f5c] RET caseD_3: CMP dword ptr [RDI + 0x8],0x0 LEA RCX,[0x11b77d] LEA RAX,[0x11f126] CMOVZ RAX,RCX RET caseD_8: MOV RCX,qword ptr [RDI + 0x8] LEA RAX,[0x11f166] TEST RCX,RCX JZ 0x001133c7 MOV ECX,dword ptr [RCX] DEC ECX CMP ECX,0x5 JNC 0x001133c7 MOV EAX,ECX LEA RCX,[0x11f068] LAB_001133c0: MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX LAB_001133c7: RET LAB_001133c8: LEA RAX,[0x119f0b] RET LAB_001133d0: PUSH RAX LEA RDI,[0x11fb43] LEA RSI,[0x11f07c] LEA RCX,[0x11f0dc] PUSH 0x10 POP RDX CALL 0x00102180
char * codegen_type_to_c_type(int4 *param_1) { ulong uVar1; char *pcVar2; uint uVar3; int *puVar4; if (param_1 == (int4 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("type != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c" ,0x10,"const char *codegen_type_to_c_type(Type *)"); } switch(*param_1) { case 0: return "void"; case 1: return "bool"; case 2: uVar1 = (ulong)(uint)param_1[2]; if (3 < uVar1) { return "int"; } puVar4 = &DAT_0011f058; break; case 3: pcVar2 = "double"; if (param_1[2] == 0) { pcVar2 = "float"; } return pcVar2; case 4: return "char"; case 5: case 6: return "char*"; case 7: return "Pair*"; case 8: if (*(int **)(param_1 + 2) == (int *)0x0) { return "Vector*"; } uVar3 = **(int **)(param_1 + 2) - 1; if (4 < uVar3) { return "Vector*"; } uVar1 = (ulong)uVar3; puVar4 = &DAT_0011f068; break; default: return "void*"; } return puVar4 + *(int *)(puVar4 + uVar1 * 4); }
30,901
codegen_type_to_c_type
tsotchke[P]eshkol/src/backend/codegen/type_conversion.c
const char* codegen_type_to_c_type(Type* type) { assert(type != NULL); switch (type->kind) { case TYPE_VOID: return "void"; case TYPE_BOOLEAN: return "bool"; case TYPE_INTEGER: switch (type->int_size) { case INT_SIZE_8: return "int8_t"; case INT_SIZE_16: return "int16_t"; case INT_SIZE_32: return "int32_t"; case INT_SIZE_64: return "int64_t"; default: return "int"; } case TYPE_FLOAT: switch (type->float_size) { case FLOAT_SIZE_32: return "float"; case FLOAT_SIZE_64: return "double"; default: return "double"; } case TYPE_CHAR: return "char"; case TYPE_STRING: return "char*"; case TYPE_SYMBOL: return "char*"; case TYPE_PAIR: return "Pair*"; case TYPE_VECTOR: if (type->vector.element_type) { switch (type->vector.element_type->kind) { case TYPE_BOOLEAN: return "VectorB*"; case TYPE_INTEGER: return "VectorI*"; case TYPE_FLOAT: return "VectorF*"; case TYPE_CHAR: return "VectorC*"; case TYPE_STRING: return "VectorS*"; default: return "Vector*"; } } else { return "Vector*"; } case TYPE_FUNCTION: return "void*"; // Function pointers are complex in C case TYPE_STRUCT: return "void*"; // Structs are complex in C case TYPE_UNION: return "void*"; // Unions are complex in C case TYPE_ANY: return "void*"; case TYPE_UNKNOWN: return "void*"; default: return "void*"; } }
O3
c
codegen_type_to_c_type: testq %rdi, %rdi je 0x14d98 movl (%rdi), %eax cmpq $0xd, %rax ja 0x14d0d leaq 0xc2b4(%rip), %rcx # 0x20fb8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0xc3f2(%rip), %rax # 0x21106 retq leaq 0xc3a9(%rip), %rax # 0x210c5 retq leaq 0x726f(%rip), %rax # 0x1bf93 retq leaq 0xc39f(%rip), %rax # 0x210cb retq movl 0x8(%rdi), %eax cmpq $0x4, %rax jae 0x14d90 leaq 0xc2b3(%rip), %rcx # 0x20ff0 jmp 0x14d88 leaq 0x8a20(%rip), %rax # 0x1d766 retq leaq 0x720e(%rip), %rax # 0x1bf5c retq cmpl $0x0, 0x8(%rdi) leaq 0x8a23(%rip), %rcx # 0x1d77d leaq 0xc35d(%rip), %rax # 0x210be cmoveq %rcx, %rax retq movq 0x8(%rdi), %rcx leaq 0xc38d(%rip), %rax # 0x210fe testq %rcx, %rcx je 0x14d8f movl (%rcx), %ecx decl %ecx cmpl $0x5, %ecx jae 0x14d8f movl %ecx, %eax leaq 0xc278(%rip), %rcx # 0x21000 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x7174(%rip), %rax # 0x1bf0b retq pushq %rax leaq 0xcd7f(%rip), %rdi # 0x21b1f leaq 0xc26d(%rip), %rsi # 0x21014 leaq 0xc2c6(%rip), %rcx # 0x21074 movl $0x10, %edx callq 0x2180
codegen_type_to_c_type: test rdi, rdi jz loc_14D98 mov eax, [rdi] cmp rax, 0Dh; switch 14 cases ja short def_14D0B; jumptable 0000000000014D0B default case, cases 9-13 lea rcx, jpt_14D0B movsxd rax, ds:(jpt_14D0B - 20FB8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump def_14D0B: lea rax, aVoid_1; jumptable 0000000000014D0B default case, cases 9-13 retn loc_14D15: lea rax, aChar_0; jumptable 0000000000014D0B cases 5,6 retn loc_14D1D: lea rax, aChar; jumptable 0000000000014D0B case 4 retn loc_14D25: lea rax, aPair_0; jumptable 0000000000014D0B case 7 retn loc_14D2D: mov eax, [rdi+8]; jumptable 0000000000014D0B case 2 cmp rax, 4 jnb short loc_14D90 lea rcx, unk_20FF0 jmp short loc_14D88 loc_14D3F: lea rax, aVoid; jumptable 0000000000014D0B case 0 retn loc_14D47: lea rax, aBool; jumptable 0000000000014D0B case 1 retn loc_14D4F: cmp dword ptr [rdi+8], 0; jumptable 0000000000014D0B case 3 lea rcx, aFloat; "float" lea rax, aDouble; "double" cmovz rax, rcx retn loc_14D66: mov rcx, [rdi+8]; jumptable 0000000000014D0B case 8 lea rax, aVector_0; "Vector*" test rcx, rcx jz short locret_14D8F mov ecx, [rcx] dec ecx cmp ecx, 5 jnb short locret_14D8F mov eax, ecx lea rcx, unk_21000 loc_14D88: movsxd rax, dword ptr [rcx+rax*4] add rax, rcx locret_14D8F: retn loc_14D90: lea rax, aInt; "int" retn loc_14D98: push rax lea rdi, aReturnTypeNull+7; "type != NULL" lea rsi, aWorkspaceLlm4b_22; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstCharCodeg; "const char *codegen_type_to_c_type(Type"... mov edx, 10h call ___assert_fail
const char * codegen_type_to_c_type(_DWORD *a1) { const char *result; // rax unsigned long long v2; // rax char *v3; // rcx _DWORD *v4; // rcx unsigned int v5; // ecx if ( !a1 ) __assert_fail( "type != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c", 16LL, "const char *codegen_type_to_c_type(Type *)"); switch ( *a1 ) { case 0: result = "void"; break; case 1: result = "bool"; break; case 2: v2 = (unsigned int)a1[2]; if ( v2 < 4 ) { v3 = (char *)&unk_20FF0; goto LABEL_17; } result = "int"; break; case 3: result = "double"; if ( !a1[2] ) result = "float"; break; case 4: result = "char"; break; case 5: case 6: result = "char*"; break; case 7: result = "Pair*"; break; case 8: v4 = (_DWORD *)*((_QWORD *)a1 + 1); result = "Vector*"; if ( v4 ) { v5 = *v4 - 1; if ( v5 < 5 ) { v2 = v5; v3 = (char *)&unk_21000; LABEL_17: result = &v3[*(int *)&v3[4 * v2]]; } } break; default: result = "void*"; break; } return result; }
codegen_type_to_c_type: TEST RDI,RDI JZ 0x00114d98 MOV EAX,dword ptr [RDI] CMP RAX,0xd JA 0x00114d0d LEA RCX,[0x120fb8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_9: LEA RAX,[0x121106] RET caseD_5: LEA RAX,[0x1210c5] RET caseD_4: LEA RAX,[0x11bf93] RET caseD_7: LEA RAX,[0x1210cb] RET caseD_2: MOV EAX,dword ptr [RDI + 0x8] CMP RAX,0x4 JNC 0x00114d90 LEA RCX,[0x120ff0] JMP 0x00114d88 caseD_0: LEA RAX,[0x11d766] RET caseD_1: LEA RAX,[0x11bf5c] RET caseD_3: CMP dword ptr [RDI + 0x8],0x0 LEA RCX,[0x11d77d] LEA RAX,[0x1210be] CMOVZ RAX,RCX RET caseD_8: MOV RCX,qword ptr [RDI + 0x8] LEA RAX,[0x1210fe] TEST RCX,RCX JZ 0x00114d8f MOV ECX,dword ptr [RCX] DEC ECX CMP ECX,0x5 JNC 0x00114d8f MOV EAX,ECX LEA RCX,[0x121000] LAB_00114d88: MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX LAB_00114d8f: RET LAB_00114d90: LEA RAX,[0x11bf0b] RET LAB_00114d98: PUSH RAX LEA RDI,[0x121b1f] LEA RSI,[0x121014] LEA RCX,[0x121074] MOV EDX,0x10 CALL 0x00102180
char * codegen_type_to_c_type(int4 *param_1) { ulong uVar1; char *pcVar2; uint uVar3; int *puVar4; if (param_1 == (int4 *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("type != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/type_conversion.c" ,0x10,"const char *codegen_type_to_c_type(Type *)"); } switch(*param_1) { case 0: return "void"; case 1: return "bool"; case 2: uVar1 = (ulong)(uint)param_1[2]; if (3 < uVar1) { return "int"; } puVar4 = &DAT_00120ff0; break; case 3: pcVar2 = "double"; if (param_1[2] == 0) { pcVar2 = "float"; } return pcVar2; case 4: return "char"; case 5: case 6: return "char*"; case 7: return "Pair*"; case 8: if (*(int **)(param_1 + 2) == (int *)0x0) { return "Vector*"; } uVar3 = **(int **)(param_1 + 2) - 1; if (4 < uVar3) { return "Vector*"; } uVar1 = (ulong)uVar3; puVar4 = &DAT_00121000; break; default: return "void*"; } return puVar4 + *(int *)(puVar4 + uVar1 * 4); }
30,902
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(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&, long&)
monkey531[P]llama/common/json.hpp
void get_arithmetic_value(const BasicJsonType& j, ArithmeticType& val) { switch (static_cast<value_t>(j)) { case value_t::number_unsigned: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_unsigned_t*>()); break; } case value_t::number_integer: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_integer_t*>()); break; } case value_t::number_float: { val = static_cast<ArithmeticType>(*j.template get_ptr<const typename BasicJsonType::number_float_t*>()); break; } case value_t::null: case value_t::object: case value_t::array: case value_t::string: case value_t::boolean: case value_t::binary: case value_t::discarded: default: JSON_THROW(type_error::create(302, concat("type must be number, but is ", j.type_name()), &j)); } }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::get_arithmetic_value<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>, long, 0>(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&, long&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movzbl (%rdi), %eax cmpl $0x5, %eax je 0x85c0c cmpl $0x7, %eax je 0x85c12 cmpl $0x6, %eax jne 0x85c24 movq 0x8(%r14), %rax jmp 0x85c18 cvttsd2si 0x8(%r14), %rax movq %rax, (%rsi) addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1a440 movq %rax, %rbx movq %r14, %rdi callq 0x5e3ac leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x68f68(%rip), %rsi # 0xeebb0 leaq 0x10(%rsp), %rdi callq 0x85e89 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x85cba xorl %ebp, %ebp leaq 0xa32e5(%rip), %rsi # 0x128f58 leaq -0x2b618(%rip), %rdx # 0x5a662 movq %rbx, %rdi callq 0x1af20 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x85ca0 movq 0x20(%rsp), %rsi incq %rsi callq 0x1a8e0 testb %bpl, %bpl jne 0x85caa jmp 0x85cb2 movq %rax, %r14 movq %rbx, %rdi callq 0x1a690 movq %r14, %rdi callq 0x1afa0
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi movzx eax, byte ptr [rdi] cmp eax, 5 jz short loc_85C0C cmp eax, 7 jz short loc_85C12 cmp eax, 6 jnz short loc_85C24 loc_85C0C: mov rax, [r14+8] jmp short loc_85C18 loc_85C12: cvttsd2si rax, qword ptr [r14+8] loc_85C18: mov [rsi], rax add rsp, 30h pop rbx pop r14 pop rbp retn loc_85C24: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeNumb; "type must be number, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_85CA0 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_85CA0: test bpl, bpl jnz short loc_85CAA jmp short loc_85CB2 mov r14, rax loc_85CAA: mov rdi, rbx; void * call ___cxa_free_exception loc_85CB2: mov rdi, r14 call __Unwind_Resume
_ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI MOVZX EAX,byte ptr [RDI] CMP EAX,0x5 JZ 0x00185c0c CMP EAX,0x7 JZ 0x00185c12 CMP EAX,0x6 JNZ 0x00185c24 LAB_00185c0c: MOV RAX,qword ptr [R14 + 0x8] JMP 0x00185c18 LAB_00185c12: CVTTSD2SI RAX,qword ptr [R14 + 0x8] LAB_00185c18: MOV qword ptr [RSI],RAX ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00185c24: MOV EDI,0x20 CALL 0x0011a440 MOV RBX,RAX MOV RDI,R14 CALL 0x0015e3ac LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00185c41: LEA RSI,[0x1eebb0] LEA RDI,[RSP + 0x10] CALL 0x00185e89 MOV BPL,0x1 LAB_00185c55: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00185cba XOR EBP,EBP LEA RSI,[0x228f58] LEA RDX,[0x15a662] MOV RDI,RBX CALL 0x0011af20
void _ZN8nlohmann16json_abi_v3_11_36detail20get_arithmetic_valueINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEElTnNSt9enable_ifIXaasr3std13is_arithmeticIT0_EE5valuentsr3std7is_sameISH_NT_9boolean_tEEE5valueEiE4typeELi0EEEvRKSI_RSH_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,long *param_2) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 lVar2; int8 uVar3; char *local_40; detail local_38 [32]; bVar1 = *param_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> )0x5) { 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> )0x7) { lVar2 = (long)*(double *)(param_1 + 8); goto LAB_00185c18; } 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> )0x6) { uVar3 = __cxa_allocate_exception(0x20); local_40 = (char *)nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(param_1); /* try { // try from 00185c41 to 00185c51 has its CatchHandler @ 00185ca7 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be number, but is ",&local_40); /* try { // try from 00185c55 to 00185c81 has its CatchHandler @ 00185c82 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar3,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } lVar2 = *(long *)(param_1 + 8); LAB_00185c18: *param_2 = lVar2; return; }
30,903
google::protobuf::compiler::cpp::ExtensionGenerator::GenerateDeclaration(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/extension.cc
void ExtensionGenerator::GenerateDeclaration(io::Printer* printer) const { Formatter format(printer, variables_); // If this is a class member, it needs to be declared "static". Otherwise, // it needs to be "extern". In the latter case, it also needs the DLL // export/import specifier. std::string qualifier; if (!IsScoped()) { qualifier = "extern"; if (!options_.dllexport_decl.empty()) { qualifier = options_.dllexport_decl + " " + qualifier; } } else { qualifier = "static"; } format( "static const int $constant_name$ = $number$;\n" "$1$ ::$proto_ns$::internal::ExtensionIdentifier< $extendee$,\n" " ::$proto_ns$::internal::$type_traits$, $field_type$, $packed$ >\n" " ${2$$name$$}$;\n", qualifier, descriptor_); }
O3
cpp
google::protobuf::compiler::cpp::ExtensionGenerator::GenerateDeclaration(google::protobuf::io::Printer*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdi, %r14 leaq 0x110(%rdi), %rax leaq 0x68(%rsp), %rbx movq %rsi, -0x8(%rbx) movq %rbx, %rdi movq %rax, %rsi callq 0x7e61e leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq $0x0, -0x8(%r12) movb $0x0, (%r12) movq %r14, %rdi callq 0xc2928 movq 0x8(%rsp), %rdx testb %al, %al je 0xc2a9a leaq 0xdb383(%rip), %rcx # 0x19de08 movq %rsp, %rdi movl $0x6, %r8d xorl %esi, %esi callq 0x1f760 jmp 0xc2b6d leaq 0xdb2ec(%rip), %rcx # 0x19dd8d movq %rsp, %rdi movl $0x6, %r8d xorl %esi, %esi callq 0x1f760 movq 0x38(%r14), %rdx testq %rdx, %rdx je 0xc2b6d leaq 0x30(%rsp), %r13 movq %r13, -0x10(%r13) movq 0x30(%r14), %rsi addq %rsi, %rdx leaq 0x20(%rsp), %rdi callq 0x2586a leaq 0xf312f(%rip), %rsi # 0x1b5c0e leaq 0x20(%rsp), %rdi callq 0x1f8e0 movq (%rsp), %rsi movq 0x8(%rsp), %rdx leaq 0x20(%rsp), %rdi callq 0x1f150 leaq 0x50(%rsp), %rbp movq %rbp, -0x10(%rbp) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0xc2b23 movq %rdx, 0x40(%rsp) movq (%rcx), %rdx movq %rdx, 0x50(%rsp) jmp 0xc2b2a movups (%rcx), %xmm0 movups %xmm0, (%rbp) movq 0x8(%rax), %rdx leaq 0x40(%rsp), %r15 movq %rdx, 0x8(%r15) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq %rsp, %rdi movq %r15, %rsi callq 0x1f5d0 movq (%r15), %rdi cmpq %rbp, %rdi je 0xc2b5e callq 0x1f4a0 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0xc2b6d callq 0x1f4a0 leaq 0x104cfc(%rip), %rsi # 0x1c7870 leaq 0x60(%rsp), %rdi movq %rsp, %rdx movq %r14, %rcx callq 0xc3034 movq (%rsp), %rdi cmpq %r12, %rdi je 0xc2b92 callq 0x1f4a0 movq %rbx, %rdi callq 0x2e5e0 addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xc2bae movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0xc2bc7 callq 0x1f4a0 jmp 0xc2bc7 jmp 0xc2bc4 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xc2bd5 callq 0x1f4a0 movq %rbx, %rdi callq 0x2e5e0 movq %r14, %rdi callq 0x1f860 nop
_ZNK6google8protobuf8compiler3cpp18ExtensionGenerator19GenerateDeclarationEPNS0_2io7PrinterE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r14, rdi lea rax, [rdi+110h] lea rbx, [rsp+0C8h+var_60] mov [rbx-8], rsi mov rdi, rbx mov rsi, rax call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&) lea r12, [rsp+0C8h+var_B8] mov [r12-10h], r12 mov qword ptr [r12-8], 0 mov byte ptr [r12], 0 mov rdi, r14; this call _ZNK6google8protobuf8compiler3cpp18ExtensionGenerator8IsScopedEv; google::protobuf::compiler::cpp::ExtensionGenerator::IsScoped(void) mov rdx, [rsp+0C8h+var_C0] test al, al jz short loc_C2A9A lea rcx, aStatic_1; "static" mov rdi, rsp mov r8d, 6 xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) jmp loc_C2B6D loc_C2A9A: lea rcx, aExtern; "extern" mov rdi, rsp mov r8d, 6 xor esi, esi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rdx, [r14+38h] test rdx, rdx jz loc_C2B6D lea r13, [rsp+0C8h+var_98] mov [r13-10h], r13 mov rsi, [r14+30h] add rdx, rsi lea rdi, [rsp+0C8h+var_A8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rsi, aProtobufFieldO_9+36h; " " lea rdi, [rsp+0C8h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+0C8h+var_C8] mov rdx, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rbp, [rsp+0C8h+var_78] mov [rbp-10h], rbp mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_C2B23 mov [rsp+0C8h+var_88], rdx mov rdx, [rcx] mov [rsp+0C8h+var_78], rdx jmp short loc_C2B2A loc_C2B23: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbp+0], xmm0 loc_C2B2A: mov rdx, [rax+8] lea r15, [rsp+0C8h+var_88] mov [r15+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rdi, rsp mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, rbp jz short loc_C2B5E call __ZdlPv; operator delete(void *) loc_C2B5E: mov rdi, [rsp+0C8h+var_A8]; void * cmp rdi, r13 jz short loc_C2B6D call __ZdlPv; operator delete(void *) loc_C2B6D: lea rsi, aStaticConstInt_0; "static const int $constant_name$ = $num"... lea rdi, [rsp+0C8h+var_68]; int mov rdx, rsp; int mov rcx, r14; int call _ZNK6google8protobuf8compiler3cpp9FormatterclIJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS0_15FieldDescriptorEEEEvPKcDpRKT_; google::protobuf::compiler::cpp::Formatter::operator()<std::string,google::protobuf::FieldDescriptor const*>(char const*,std::string,google::protobuf::FieldDescriptor const* const&) mov rdi, [rsp+0C8h+var_C8]; void * cmp rdi, r12 jz short loc_C2B92 call __ZdlPv; operator delete(void *) loc_C2B92: mov rdi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_C2BAE: mov r14, rax mov rdi, [rsp+arg_18]; void * cmp rdi, r13 jz short loc_C2BC7 call __ZdlPv; operator delete(void *) jmp short loc_C2BC7 jmp short $+2 loc_C2BC4: mov r14, rax loc_C2BC7: mov rdi, [rsp+0]; void * cmp rdi, r12 jz short loc_C2BD5 call __ZdlPv; operator delete(void *) loc_C2BD5: mov rdi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
void google::protobuf::compiler::cpp::ExtensionGenerator::GenerateDeclaration( google::protobuf::compiler::cpp::ExtensionGenerator *this, google::protobuf::io::Printer *a2) { int v2; // r8d int v3; // r9d long long v4; // rdx long long v5; // rax __int128 *v6; // rcx void *v7; // [rsp+0h] [rbp-C8h] BYREF long long v8; // [rsp+8h] [rbp-C0h] int v9; // [rsp+10h] [rbp-B8h] BYREF void *v10; // [rsp+18h] [rbp-B0h] void *v11; // [rsp+20h] [rbp-A8h] BYREF int v12; // [rsp+28h] [rbp-A0h] int v13[4]; // [rsp+30h] [rbp-98h] BYREF __int128 *v14; // [rsp+40h] [rbp-88h] BYREF long long v15; // [rsp+48h] [rbp-80h] __int128 v16; // [rsp+50h] [rbp-78h] BYREF google::protobuf::io::Printer *v17; // [rsp+60h] [rbp-68h] BYREF _BYTE v18[96]; // [rsp+68h] [rbp-60h] BYREF v17 = a2; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree( (long long)v18, (long long)this + 272); v7 = &v9; v8 = 0LL; LOBYTE(v9) = 0; if ( google::protobuf::compiler::cpp::ExtensionGenerator::IsScoped(this) ) { std::string::_M_replace(&v7, 0LL, 0LL, "static", 6LL); } else { std::string::_M_replace(&v7, 0LL, 0LL, "extern", 6LL); v4 = *((_QWORD *)this + 7); if ( v4 ) { v11 = v13; std::string::_M_construct<char *>((long long)&v11, *((_BYTE **)this + 6), *((_QWORD *)this + 6) + v4); std::string::append(&v11, " "); v5 = std::string::_M_append(&v11, v7, v8); v14 = &v16; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v16 = *v6; } else { v14 = *(__int128 **)v5; *(_QWORD *)&v16 = *(_QWORD *)v6; } v15 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; std::string::operator=(&v7, &v14); if ( v14 != &v16 ) operator delete(v14); if ( v11 != v13 ) operator delete(v11); } } google::protobuf::compiler::cpp::Formatter::operator()<std::string,google::protobuf::FieldDescriptor const*>( (int)&v17, (int)"static const int $constant_name$ = $number$;\n" "$1$ ::$proto_ns$::internal::ExtensionIdentifier< $extendee$,\n" " ::$proto_ns$::internal::$type_traits$, $field_type$, $packed$ >\n" " ${2$$name$$}$;\n", (int)&v7, (int)this, v2, v3, (char)v7, v8, v9, v10, (int)v11, v12, v13[0], v13[2], (int)v14, v15); if ( v7 != &v9 ) operator delete(v7); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v18); }
GenerateDeclaration: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R14,RDI LEA RAX,[RDI + 0x110] LEA RBX,[RSP + 0x68] MOV qword ptr [RBX + -0x8],RSI MOV RDI,RBX MOV RSI,RAX CALL 0x0017e61e LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],0x0 MOV byte ptr [R12],0x0 LAB_001c2a6d: MOV RDI,R14 CALL 0x001c2928 MOV RDX,qword ptr [RSP + 0x8] TEST AL,AL JZ 0x001c2a9a LEA RCX,[0x29de08] MOV RDI,RSP MOV R8D,0x6 XOR ESI,ESI CALL 0x0011f760 JMP 0x001c2b6d LAB_001c2a9a: LEA RCX,[0x29dd8d] MOV RDI,RSP MOV R8D,0x6 XOR ESI,ESI CALL 0x0011f760 MOV RDX,qword ptr [R14 + 0x38] TEST RDX,RDX JZ 0x001c2b6d LEA R13,[RSP + 0x30] MOV qword ptr [R13 + -0x10],R13 MOV RSI,qword ptr [R14 + 0x30] ADD RDX,RSI LAB_001c2ace: LEA RDI,[RSP + 0x20] CALL 0x0012586a LAB_001c2ad8: LEA RSI,[0x2b5c0e] LEA RDI,[RSP + 0x20] CALL 0x0011f8e0 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LAB_001c2af2: LEA RDI,[RSP + 0x20] CALL 0x0011f150 LEA RBP,[RSP + 0x50] MOV qword ptr [RBP + -0x10],RBP MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001c2b23 MOV qword ptr [RSP + 0x40],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x50],RDX JMP 0x001c2b2a LAB_001c2b23: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBP],XMM0 LAB_001c2b2a: MOV RDX,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x40] MOV qword ptr [R15 + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RDI,RSP MOV RSI,R15 CALL 0x0011f5d0 MOV RDI,qword ptr [R15] CMP RDI,RBP JZ 0x001c2b5e CALL 0x0011f4a0 LAB_001c2b5e: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R13 JZ 0x001c2b6d CALL 0x0011f4a0 LAB_001c2b6d: LEA RSI,[0x2c7870] LEA RDI,[RSP + 0x60] MOV RDX,RSP MOV RCX,R14 CALL 0x001c3034 LAB_001c2b84: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x001c2b92 CALL 0x0011f4a0 LAB_001c2b92: MOV RDI,RBX CALL 0x0012e5e0 ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::compiler::cpp::ExtensionGenerator::GenerateDeclaration(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::cpp::ExtensionGenerator::GenerateDeclaration (ExtensionGenerator *this,Printer *param_1) { char cVar1; long *plVar2; long *plVar3; int1 *local_c8; char *local_c0; int1 local_b8 [16]; int1 *local_a8 [2]; int1 local_98 [16]; long *local_88; long local_80; long local_78; long lStack_70; Printer *local_68; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_60 [48]; local_68 = param_1; std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::_Rb_tree(local_60,(_Rb_tree *)(this + 0x110)); local_c0 = (char *)0x0; local_b8[0] = 0; local_c8 = local_b8; /* try { // try from 001c2a6d to 001c2ab0 has its CatchHandler @ 001c2bc4 */ cVar1 = IsScoped(this); if (cVar1 == '\0') { std::__cxx11::string::_M_replace((ulong)&local_c8,0,local_c0,0x29dd8d); if (*(long *)(this + 0x38) != 0) { /* try { // try from 001c2ace to 001c2ad7 has its CatchHandler @ 001c2bc2 */ local_a8[0] = local_98; std::__cxx11::string::_M_construct<char*> (local_a8,*(long *)(this + 0x30),*(long *)(this + 0x38) + *(long *)(this + 0x30)); /* try { // try from 001c2ad8 to 001c2ae8 has its CatchHandler @ 001c2bae */ std::__cxx11::string::append((char *)local_a8); /* try { // try from 001c2af2 to 001c2afb has its CatchHandler @ 001c2bac */ plVar2 = (long *)std::__cxx11::string::_M_append((char *)local_a8,(ulong)local_c8); plVar3 = plVar2 + 2; if ((long *)*plVar2 == plVar3) { local_78 = *plVar3; lStack_70 = plVar2[3]; local_88 = &local_78; } else { local_78 = *plVar3; local_88 = (long *)*plVar2; } local_80 = plVar2[1]; *plVar2 = (long)plVar3; plVar2[1] = 0; *(int1 *)(plVar2 + 2) = 0; std::__cxx11::string::operator=((string *)&local_c8,(string *)&local_88); if (local_88 != &local_78) { operator_delete(local_88); } if (local_a8[0] != local_98) { operator_delete(local_a8[0]); } } } else { std::__cxx11::string::_M_replace((ulong)&local_c8,0,local_c0,0x29de08); } /* try { // try from 001c2b6d to 001c2b83 has its CatchHandler @ 001c2bc4 */ Formatter::operator() ((Formatter *)&local_68, "static const int $constant_name$ = $number$;\n$1$ ::$proto_ns$::internal::ExtensionIdentifier< $extendee$,\n ::$proto_ns$::internal::$type_traits$, $field_type$, $packed$ >\n ${2$$name$$}$;\n" ,(string *)&local_c8,(FieldDescriptor **)this); if (local_c8 != local_b8) { operator_delete(local_c8); } std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_60); return; }
30,904
ggml_soft_max_impl
monkey531[P]llama/ggml/src/ggml.c
static struct ggml_tensor * ggml_soft_max_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * mask, float scale, float max_bias, bool inplace) { GGML_ASSERT(ggml_is_contiguous(a)); if (mask) { GGML_ASSERT(mask->type == GGML_TYPE_F16 || mask->type == GGML_TYPE_F32); GGML_ASSERT(ggml_is_contiguous(mask)); GGML_ASSERT(ggml_is_matrix(mask)); GGML_ASSERT(mask->ne[0] == a->ne[0]); GGML_ASSERT(mask->ne[1] >= a->ne[1]); } if (max_bias > 0.0f) { GGML_ASSERT(mask); } struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); float params[] = { scale, max_bias }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_SOFT_MAX; result->src[0] = a; result->src[1] = mask; return result; }
O0
c
ggml_soft_max_impl: subq $0x48, %rsp movb %cl, %al movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movss %xmm0, 0x2c(%rsp) movss %xmm1, 0x28(%rsp) andb $0x1, %al movb %al, 0x27(%rsp) movq 0x38(%rsp), %rdi callq 0x40fa0 testb $0x1, %al jne 0x4eb66 leaq 0x65a6b(%rip), %rdi # 0xb45b7 movl $0xd52, %esi # imm = 0xD52 leaq 0x65aa9(%rip), %rdx # 0xb4601 leaq 0x65dc1(%rip), %rcx # 0xb4920 movb $0x0, %al callq 0x46770 cmpq $0x0, 0x30(%rsp) je 0x4ec71 movq 0x30(%rsp), %rax cmpl $0x1, (%rax) je 0x4eba7 movq 0x30(%rsp), %rax cmpl $0x0, (%rax) je 0x4eba7 leaq 0x65a2a(%rip), %rdi # 0xb45b7 movl $0xd55, %esi # imm = 0xD55 leaq 0x65a68(%rip), %rdx # 0xb4601 leaq 0x67cab(%rip), %rcx # 0xb684b movb $0x0, %al callq 0x46770 movq 0x30(%rsp), %rdi callq 0x40fa0 testb $0x1, %al jne 0x4ebd6 leaq 0x659fb(%rip), %rdi # 0xb45b7 movl $0xd56, %esi # imm = 0xD56 leaq 0x65a39(%rip), %rdx # 0xb4601 leaq 0x661ad(%rip), %rcx # 0xb4d7c movb $0x0, %al callq 0x46770 movq 0x30(%rsp), %rdi callq 0x43a40 testb $0x1, %al jne 0x4ec05 leaq 0x659cc(%rip), %rdi # 0xb45b7 movl $0xd57, %esi # imm = 0xD57 leaq 0x65a0a(%rip), %rdx # 0xb4601 leaq 0x67c88(%rip), %rcx # 0xb6886 movb $0x0, %al callq 0x46770 movq 0x30(%rsp), %rax movq 0x10(%rax), %rax movq 0x38(%rsp), %rcx cmpq 0x10(%rcx), %rax je 0x4ec3a leaq 0x65997(%rip), %rdi # 0xb45b7 movl $0xd58, %esi # imm = 0xD58 leaq 0x659d5(%rip), %rdx # 0xb4601 leaq 0x67c68(%rip), %rcx # 0xb689b movb $0x0, %al callq 0x46770 movq 0x30(%rsp), %rax movq 0x18(%rax), %rax movq 0x38(%rsp), %rcx cmpq 0x18(%rcx), %rax jge 0x4ec6f leaq 0x65962(%rip), %rdi # 0xb45b7 movl $0xd59, %esi # imm = 0xD59 leaq 0x659a0(%rip), %rdx # 0xb4601 leaq 0x67c4b(%rip), %rcx # 0xb68b3 movb $0x0, %al callq 0x46770 jmp 0x4ec71 movss 0x28(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomiss %xmm1, %xmm0 jbe 0x4ecaa cmpq $0x0, 0x30(%rsp) jne 0x4eca8 leaq 0x65929(%rip), %rdi # 0xb45b7 movl $0xd5d, %esi # imm = 0xD5D leaq 0x65967(%rip), %rdx # 0xb4601 leaq 0x66221(%rip), %rcx # 0xb4ec2 movb $0x0, %al callq 0x46770 jmp 0x4ecaa testb $0x1, 0x27(%rsp) je 0x4ecc7 movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x408e0 movq %rax, 0x8(%rsp) jmp 0x4ecdb movq 0x40(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x43c10 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x18(%rsp) movss 0x2c(%rsp), %xmm0 movss %xmm0, 0x10(%rsp) movss 0x28(%rsp), %xmm0 movss %xmm0, 0x14(%rsp) movq 0x18(%rsp), %rdi leaq 0x10(%rsp), %rsi movl $0x8, %edx callq 0x4c3d0 movq 0x18(%rsp), %rax movl $0x2a, 0x50(%rax) movq 0x38(%rsp), %rcx movq 0x18(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x30(%rsp), %rcx movq 0x18(%rsp), %rax movq %rcx, 0xa0(%rax) movq 0x18(%rsp), %rax addq $0x48, %rsp retq nopl (%rax)
ggml_soft_max_impl: sub rsp, 48h mov al, cl mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx movss [rsp+48h+var_1C], xmm0 movss [rsp+48h+var_20], xmm1 and al, 1 mov [rsp+48h+var_21], al mov rdi, [rsp+48h+var_10] call _ggml_is_contiguous test al, 1 jnz short loc_4EB66 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0D52h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_3; "ggml_is_contiguous(a)" mov al, 0 call _ggml_abort loc_4EB66: cmp [rsp+48h+var_18], 0 jz loc_4EC71 mov rax, [rsp+48h+var_18] cmp dword ptr [rax], 1 jz short loc_4EBA7 mov rax, [rsp+48h+var_18] cmp dword ptr [rax], 0 jz short loc_4EBA7 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0D55h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMaskTypeGgmlTy; "mask->type == GGML_TYPE_F16 || mask->ty"... mov al, 0 call _ggml_abort loc_4EBA7: mov rdi, [rsp+48h+var_18] call _ggml_is_contiguous test al, 1 jnz short loc_4EBD6 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0D56h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_4; "ggml_is_contiguous(mask)" mov al, 0 call _ggml_abort loc_4EBD6: mov rdi, [rsp+48h+var_18] call _ggml_is_matrix test al, 1 jnz short loc_4EC05 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0D57h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixMa; "ggml_is_matrix(mask)" mov al, 0 call _ggml_abort loc_4EC05: mov rax, [rsp+48h+var_18] mov rax, [rax+10h] mov rcx, [rsp+48h+var_10] cmp rax, [rcx+10h] jz short loc_4EC3A lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0D58h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMaskNe0ANe0; "mask->ne[0] == a->ne[0]" mov al, 0 call _ggml_abort loc_4EC3A: mov rax, [rsp+48h+var_18] mov rax, [rax+18h] mov rcx, [rsp+48h+var_10] cmp rax, [rcx+18h] jge short loc_4EC6F lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0D59h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMaskNe1ANe1; "mask->ne[1] >= a->ne[1]" mov al, 0 call _ggml_abort loc_4EC6F: jmp short $+2 loc_4EC71: movss xmm0, [rsp+48h+var_20] xorps xmm1, xmm1 ucomiss xmm0, xmm1 jbe short loc_4ECAA cmp [rsp+48h+var_18], 0 jnz short loc_4ECA8 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 0D5Dh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMask; "mask" mov al, 0 call _ggml_abort loc_4ECA8: jmp short $+2 loc_4ECAA: test [rsp+48h+var_21], 1 jz short loc_4ECC7 mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_10] call _ggml_view_tensor mov [rsp+48h+var_40], rax jmp short loc_4ECDB loc_4ECC7: mov rdi, [rsp+48h+var_8] mov rsi, [rsp+48h+var_10] call _ggml_dup_tensor mov [rsp+48h+var_40], rax loc_4ECDB: mov rax, [rsp+48h+var_40] mov [rsp+48h+var_30], rax movss xmm0, [rsp+48h+var_1C] movss [rsp+48h+var_38], xmm0 movss xmm0, [rsp+48h+var_20] movss [rsp+48h+var_34], xmm0 mov rdi, [rsp+48h+var_30] lea rsi, [rsp+48h+var_38] mov edx, 8 call ggml_set_op_params mov rax, [rsp+48h+var_30] mov dword ptr [rax+50h], 2Ah ; '*' mov rcx, [rsp+48h+var_10] mov rax, [rsp+48h+var_30] mov [rax+98h], rcx mov rcx, [rsp+48h+var_18] mov rax, [rsp+48h+var_30] mov [rax+0A0h], rcx mov rax, [rsp+48h+var_30] add rsp, 48h retn
long long ggml_soft_max_impl( long long a1, unsigned int *a2, long long a3, char a4, float a5, float a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { double v12; // xmm4_8 double v13; // xmm5_8 long long v15; // [rsp+8h] [rbp-40h] _DWORD v16[2]; // [rsp+10h] [rbp-38h] BYREF long long v17; // [rsp+18h] [rbp-30h] char v18; // [rsp+27h] [rbp-21h] float v19; // [rsp+28h] [rbp-20h] float v20; // [rsp+2Ch] [rbp-1Ch] long long v21; // [rsp+30h] [rbp-18h] unsigned int *v22; // [rsp+38h] [rbp-10h] long long v23; // [rsp+40h] [rbp-8h] v23 = a1; v22 = a2; v21 = a3; v20 = a5; v19 = a6; v18 = a4 & 1; if ( (ggml_is_contiguous((long long)a2) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3410, (long long)"GGML_ASSERT(%s) failed", "ggml_is_contiguous(a)"); if ( v21 ) { if ( *(_DWORD *)v21 >= 2u ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3413, (long long)"GGML_ASSERT(%s) failed", "mask->type == GGML_TYPE_F16 || mask->type == GGML_TYPE_F32"); if ( (ggml_is_contiguous(v21) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3414, (long long)"GGML_ASSERT(%s) failed", "ggml_is_contiguous(mask)"); if ( !ggml_is_matrix(v21) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3415, (long long)"GGML_ASSERT(%s) failed", "ggml_is_matrix(mask)"); if ( *(_QWORD *)(v21 + 16) != *((_QWORD *)v22 + 2) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3416, (long long)"GGML_ASSERT(%s) failed", "mask->ne[0] == a->ne[0]"); if ( *(_QWORD *)(v21 + 24) < *((_QWORD *)v22 + 3) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3417, (long long)"GGML_ASSERT(%s) failed", "mask->ne[1] >= a->ne[1]"); } if ( v19 > 0.0 && !v21 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c", 3421, (long long)"GGML_ASSERT(%s) failed", "mask"); if ( (v18 & 1) != 0 ) v15 = (long long)ggml_view_tensor(v23, (long long)v22, (__m128)LODWORD(v19), (__m128)0LL, a7, a8, v12, v13, a11, a12); else v15 = ggml_dup_tensor(v23, v22); v17 = v15; *(float *)v16 = v20; *(float *)&v16[1] = v19; ggml_set_op_params(v15, (long long)v16, 8LL); *(_DWORD *)(v17 + 80) = 42; *(_QWORD *)(v17 + 152) = v22; *(_QWORD *)(v17 + 160) = v21; return v17; }
ggml_soft_max_impl: SUB RSP,0x48 MOV AL,CL MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX MOVSS dword ptr [RSP + 0x2c],XMM0 MOVSS dword ptr [RSP + 0x28],XMM1 AND AL,0x1 MOV byte ptr [RSP + 0x27],AL MOV RDI,qword ptr [RSP + 0x38] CALL 0x00140fa0 TEST AL,0x1 JNZ 0x0014eb66 LEA RDI,[0x1b45b7] MOV ESI,0xd52 LEA RDX,[0x1b4601] LEA RCX,[0x1b4920] MOV AL,0x0 CALL 0x00146770 LAB_0014eb66: CMP qword ptr [RSP + 0x30],0x0 JZ 0x0014ec71 MOV RAX,qword ptr [RSP + 0x30] CMP dword ptr [RAX],0x1 JZ 0x0014eba7 MOV RAX,qword ptr [RSP + 0x30] CMP dword ptr [RAX],0x0 JZ 0x0014eba7 LEA RDI,[0x1b45b7] MOV ESI,0xd55 LEA RDX,[0x1b4601] LEA RCX,[0x1b684b] MOV AL,0x0 CALL 0x00146770 LAB_0014eba7: MOV RDI,qword ptr [RSP + 0x30] CALL 0x00140fa0 TEST AL,0x1 JNZ 0x0014ebd6 LEA RDI,[0x1b45b7] MOV ESI,0xd56 LEA RDX,[0x1b4601] LEA RCX,[0x1b4d7c] MOV AL,0x0 CALL 0x00146770 LAB_0014ebd6: MOV RDI,qword ptr [RSP + 0x30] CALL 0x00143a40 TEST AL,0x1 JNZ 0x0014ec05 LEA RDI,[0x1b45b7] MOV ESI,0xd57 LEA RDX,[0x1b4601] LEA RCX,[0x1b6886] MOV AL,0x0 CALL 0x00146770 LAB_0014ec05: MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RCX + 0x10] JZ 0x0014ec3a LEA RDI,[0x1b45b7] MOV ESI,0xd58 LEA RDX,[0x1b4601] LEA RCX,[0x1b689b] MOV AL,0x0 CALL 0x00146770 LAB_0014ec3a: MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RCX + 0x18] JGE 0x0014ec6f LEA RDI,[0x1b45b7] MOV ESI,0xd59 LEA RDX,[0x1b4601] LEA RCX,[0x1b68b3] MOV AL,0x0 CALL 0x00146770 LAB_0014ec6f: JMP 0x0014ec71 LAB_0014ec71: MOVSS XMM0,dword ptr [RSP + 0x28] XORPS XMM1,XMM1 UCOMISS XMM0,XMM1 JBE 0x0014ecaa CMP qword ptr [RSP + 0x30],0x0 JNZ 0x0014eca8 LEA RDI,[0x1b45b7] MOV ESI,0xd5d LEA RDX,[0x1b4601] LEA RCX,[0x1b4ec2] MOV AL,0x0 CALL 0x00146770 LAB_0014eca8: JMP 0x0014ecaa LAB_0014ecaa: TEST byte ptr [RSP + 0x27],0x1 JZ 0x0014ecc7 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x38] CALL 0x001408e0 MOV qword ptr [RSP + 0x8],RAX JMP 0x0014ecdb LAB_0014ecc7: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x38] CALL 0x00143c10 MOV qword ptr [RSP + 0x8],RAX LAB_0014ecdb: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX MOVSS XMM0,dword ptr [RSP + 0x2c] MOVSS dword ptr [RSP + 0x10],XMM0 MOVSS XMM0,dword ptr [RSP + 0x28] MOVSS dword ptr [RSP + 0x14],XMM0 MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x10] MOV EDX,0x8 CALL 0x0014c3d0 MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX + 0x50],0x2a MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x48 RET
long ggml_soft_max_impl(int4 param_1,float param_2,int8 param_3,long param_4, int *param_5,byte param_6) { ulong uVar1; long local_40; int4 local_38; float local_34; long local_30; byte local_21; float local_20; int4 local_1c; int *local_18; long local_10; int8 local_8; local_21 = param_6 & 1; local_20 = param_2; local_1c = param_1; local_18 = param_5; local_10 = param_4; local_8 = param_3; uVar1 = ggml_is_contiguous(param_4); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xd52, "GGML_ASSERT(%s) failed","ggml_is_contiguous(a)"); } if (local_18 != (int *)0x0) { if ((*local_18 != 1) && (*local_18 != 0)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xd55, "GGML_ASSERT(%s) failed", "mask->type == GGML_TYPE_F16 || mask->type == GGML_TYPE_F32"); } uVar1 = ggml_is_contiguous(local_18); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xd56, "GGML_ASSERT(%s) failed","ggml_is_contiguous(mask)"); } uVar1 = ggml_is_matrix(local_18); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xd57, "GGML_ASSERT(%s) failed","ggml_is_matrix(mask)"); } if (*(long *)(local_18 + 4) != *(long *)(local_10 + 0x10)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xd58, "GGML_ASSERT(%s) failed","mask->ne[0] == a->ne[0]"); } if (*(long *)(local_18 + 6) < *(long *)(local_10 + 0x18)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xd59, "GGML_ASSERT(%s) failed","mask->ne[1] >= a->ne[1]"); } } if ((0.0 < local_20) && (local_18 == (int *)0x0)) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c",0xd5d, "GGML_ASSERT(%s) failed",&DAT_001b4ec2); } if ((local_21 & 1) == 0) { local_40 = ggml_dup_tensor(local_8,local_10); } else { local_40 = ggml_view_tensor(local_8,local_10); } local_30 = local_40; local_38 = local_1c; local_34 = local_20; ggml_set_op_params(local_40,&local_38,8); *(int4 *)(local_30 + 0x50) = 0x2a; *(long *)(local_30 + 0x98) = local_10; *(int **)(local_30 + 0xa0) = local_18; return local_30; }
30,905
ggml_soft_max_impl
monkey531[P]llama/ggml/src/ggml.c
static struct ggml_tensor * ggml_soft_max_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * mask, float scale, float max_bias, bool inplace) { GGML_ASSERT(ggml_is_contiguous(a)); if (mask) { GGML_ASSERT(mask->type == GGML_TYPE_F16 || mask->type == GGML_TYPE_F32); GGML_ASSERT(ggml_is_contiguous(mask)); GGML_ASSERT(ggml_is_matrix(mask)); GGML_ASSERT(mask->ne[0] == a->ne[0]); GGML_ASSERT(mask->ne[1] >= a->ne[1]); } if (max_bias > 0.0f) { GGML_ASSERT(mask); } struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); float params[] = { scale, max_bias }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_SOFT_MAX; result->src[0] = a; result->src[1] = mask; return result; }
O1
c
ggml_soft_max_impl: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %ebp movss %xmm1, (%rsp) movss %xmm0, 0x4(%rsp) movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %rsi, %rdi xorl %esi, %esi callq 0x197c2 testb %al, %al je 0x1c716 testq %rbx, %rbx je 0x1c677 cmpl $0x2, (%rbx) jae 0x1c770 movq %rbx, %rdi xorl %esi, %esi callq 0x197c2 testb %al, %al je 0x1c78c cmpq $0x1, 0x20(%rbx) jne 0x1c6f7 cmpq $0x1, 0x28(%rbx) jne 0x1c6f7 movq 0x10(%rbx), %rax cmpq 0x10(%r14), %rax jne 0x1c7a8 movq 0x18(%rbx), %rax cmpq 0x18(%r14), %rax jl 0x1c7c4 testq %rbx, %rbx jne 0x1c68d xorps %xmm0, %xmm0 movss (%rsp), %xmm1 ucomiss %xmm0, %xmm1 ja 0x1c735 testb %bpl, %bpl je 0x1c69f movq %r15, %rdi movq %r14, %rsi callq 0x16260 jmp 0x1c6b9 movl (%r14), %esi leaq 0x10(%r14), %rcx movq %r15, %rdi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x19c80 testq %rax, %rax je 0x1c754 movss 0x4(%rsp), %xmm0 movss %xmm0, 0x54(%rax) movss (%rsp), %xmm0 movss %xmm0, 0x58(%rax) movl $0x2a, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x2df11(%rip), %rdi # 0x4a60f leaq 0x2df54(%rip), %rdx # 0x4a659 leaq 0x30086(%rip), %rcx # 0x4c792 movl $0xd57, %esi # imm = 0xD57 jmp 0x1c7de leaq 0x2def2(%rip), %rdi # 0x4a60f leaq 0x2df35(%rip), %rdx # 0x4a659 leaq 0x2e24d(%rip), %rcx # 0x4a978 movl $0xd52, %esi # imm = 0xD52 jmp 0x1c7de leaq 0x2ded3(%rip), %rdi # 0x4a60f leaq 0x2df16(%rip), %rdx # 0x4a659 leaq 0x2e728(%rip), %rcx # 0x4ae72 movl $0xd5d, %esi # imm = 0xD5D jmp 0x1c7de leaq 0x2ff4c(%rip), %rdi # 0x4c6a7 leaq 0x2def7(%rip), %rdx # 0x4a659 leaq 0x2ff8d(%rip), %rcx # 0x4c6f6 movl $0x70, %esi jmp 0x1c7de leaq 0x2de98(%rip), %rdi # 0x4a60f leaq 0x2dedb(%rip), %rdx # 0x4a659 leaq 0x2ffd2(%rip), %rcx # 0x4c757 movl $0xd55, %esi # imm = 0xD55 jmp 0x1c7de leaq 0x2de7c(%rip), %rdi # 0x4a60f leaq 0x2debf(%rip), %rdx # 0x4a659 leaq 0x2e5f4(%rip), %rcx # 0x4ad95 movl $0xd56, %esi # imm = 0xD56 jmp 0x1c7de leaq 0x2de60(%rip), %rdi # 0x4a60f leaq 0x2dea3(%rip), %rdx # 0x4a659 leaq 0x2ffea(%rip), %rcx # 0x4c7a7 movl $0xd58, %esi # imm = 0xD58 jmp 0x1c7de leaq 0x2de44(%rip), %rdi # 0x4a60f leaq 0x2de87(%rip), %rdx # 0x4a659 leaq 0x2ffe6(%rip), %rcx # 0x4c7bf movl $0xd59, %esi # imm = 0xD59 xorl %eax, %eax callq 0x17c70
ggml_soft_max_impl: push rbp push r15 push r14 push rbx push rax mov ebp, ecx movss [rsp+28h+var_28], xmm1 movss [rsp+28h+var_24], xmm0 mov rbx, rdx mov r14, rsi mov r15, rdi mov rdi, rsi xor esi, esi call ggml_is_contiguous_n test al, al jz loc_1C716 test rbx, rbx jz short loc_1C677 cmp dword ptr [rbx], 2 jnb loc_1C770 mov rdi, rbx xor esi, esi call ggml_is_contiguous_n test al, al jz loc_1C78C cmp qword ptr [rbx+20h], 1 jnz loc_1C6F7 cmp qword ptr [rbx+28h], 1 jnz loc_1C6F7 mov rax, [rbx+10h] cmp rax, [r14+10h] jnz loc_1C7A8 mov rax, [rbx+18h] cmp rax, [r14+18h] jl loc_1C7C4 loc_1C677: test rbx, rbx jnz short loc_1C68D xorps xmm0, xmm0 movss xmm1, [rsp+28h+var_28] ucomiss xmm1, xmm0 ja loc_1C735 loc_1C68D: test bpl, bpl jz short loc_1C69F mov rdi, r15 mov rsi, r14 call _ggml_view_tensor jmp short loc_1C6B9 loc_1C69F: mov esi, [r14] lea rcx, [r14+10h] mov rdi, r15 mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl loc_1C6B9: test rax, rax jz loc_1C754 movss xmm0, [rsp+28h+var_24] movss dword ptr [rax+54h], xmm0 movss xmm0, [rsp+28h+var_28] movss dword ptr [rax+58h], xmm0 mov dword ptr [rax+50h], 2Ah ; '*' mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_1C6F7: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixMa; "ggml_is_matrix(mask)" mov esi, 0D57h jmp loc_1C7DE loc_1C716: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_3; "ggml_is_contiguous(a)" mov esi, 0D52h jmp loc_1C7DE loc_1C735: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMask; "mask" mov esi, 0D5Dh jmp loc_1C7DE loc_1C754: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' jmp short loc_1C7DE loc_1C770: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMaskTypeGgmlTy; "mask->type == GGML_TYPE_F16 || mask->ty"... mov esi, 0D55h jmp short loc_1C7DE loc_1C78C: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_4; "ggml_is_contiguous(mask)" mov esi, 0D56h jmp short loc_1C7DE loc_1C7A8: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMaskNe0ANe0; "mask->ne[0] == a->ne[0]" mov esi, 0D58h jmp short loc_1C7DE loc_1C7C4: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMaskNe1ANe1; "mask->ne[1] >= a->ne[1]" mov esi, 0D59h loc_1C7DE: xor eax, eax call _ggml_abort
long long ggml_soft_max_impl(long long a1, long long a2, long long a3, char a4, float a5, float a6) { int v8; // r8d int v9; // r9d long long result; // rax const char *v11; // rdi const char *v12; // rcx int v13; // esi if ( !(unsigned __int8)ggml_is_contiguous_n((unsigned int *)a2, 0) ) { v11 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; v12 = "ggml_is_contiguous(a)"; v13 = 3410; goto LABEL_24; } if ( a3 ) { if ( *(_DWORD *)a3 >= 2u ) { v11 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; v12 = "mask->type == GGML_TYPE_F16 || mask->type == GGML_TYPE_F32"; v13 = 3413; } else if ( (unsigned __int8)ggml_is_contiguous_n((unsigned int *)a3, 0) ) { if ( *(_QWORD *)(a3 + 32) != 1LL || *(_QWORD *)(a3 + 40) != 1LL ) { v11 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; v12 = "ggml_is_matrix(mask)"; v13 = 3415; goto LABEL_24; } if ( *(_QWORD *)(a3 + 16) == *(_QWORD *)(a2 + 16) ) { if ( *(_QWORD *)(a3 + 24) >= *(_QWORD *)(a2 + 24) ) goto LABEL_9; v11 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; v12 = "mask->ne[1] >= a->ne[1]"; v13 = 3417; } else { v11 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; v12 = "mask->ne[0] == a->ne[0]"; v13 = 3416; } } else { v11 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; v12 = "ggml_is_contiguous(mask)"; v13 = 3414; } LABEL_24: ggml_abort((_DWORD)v11, v13, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v12, v8, v9); } LABEL_9: if ( !a3 && a6 > 0.0 ) { v11 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; v12 = "mask"; v13 = 3421; goto LABEL_24; } if ( a4 ) result = ggml_view_tensor(a1, a2); else result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (_QWORD *)(a2 + 16), 0LL, 0LL); if ( !result ) { v11 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-impl.h"; v12 = "tensor != NULL"; v13 = 112; goto LABEL_24; } *(float *)(result + 84) = a5; *(float *)(result + 88) = a6; *(_DWORD *)(result + 80) = 42; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_soft_max_impl: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,ECX MOVSS dword ptr [RSP],XMM1 MOVSS dword ptr [RSP + 0x4],XMM0 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RDI,RSI XOR ESI,ESI CALL 0x001197c2 TEST AL,AL JZ 0x0011c716 TEST RBX,RBX JZ 0x0011c677 CMP dword ptr [RBX],0x2 JNC 0x0011c770 MOV RDI,RBX XOR ESI,ESI CALL 0x001197c2 TEST AL,AL JZ 0x0011c78c CMP qword ptr [RBX + 0x20],0x1 JNZ 0x0011c6f7 CMP qword ptr [RBX + 0x28],0x1 JNZ 0x0011c6f7 MOV RAX,qword ptr [RBX + 0x10] CMP RAX,qword ptr [R14 + 0x10] JNZ 0x0011c7a8 MOV RAX,qword ptr [RBX + 0x18] CMP RAX,qword ptr [R14 + 0x18] JL 0x0011c7c4 LAB_0011c677: TEST RBX,RBX JNZ 0x0011c68d XORPS XMM0,XMM0 MOVSS XMM1,dword ptr [RSP] UCOMISS XMM1,XMM0 JA 0x0011c735 LAB_0011c68d: TEST BPL,BPL JZ 0x0011c69f MOV RDI,R15 MOV RSI,R14 CALL 0x00116260 JMP 0x0011c6b9 LAB_0011c69f: MOV ESI,dword ptr [R14] LEA RCX,[R14 + 0x10] MOV RDI,R15 MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x00119c80 LAB_0011c6b9: TEST RAX,RAX JZ 0x0011c754 MOVSS XMM0,dword ptr [RSP + 0x4] MOVSS dword ptr [RAX + 0x54],XMM0 MOVSS XMM0,dword ptr [RSP] MOVSS dword ptr [RAX + 0x58],XMM0 MOV dword ptr [RAX + 0x50],0x2a MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0011c6f7: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14c792] MOV ESI,0xd57 JMP 0x0011c7de LAB_0011c716: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14a978] MOV ESI,0xd52 JMP 0x0011c7de LAB_0011c735: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14ae72] MOV ESI,0xd5d JMP 0x0011c7de LAB_0011c754: LEA RDI,[0x14c6a7] LEA RDX,[0x14a659] LEA RCX,[0x14c6f6] MOV ESI,0x70 JMP 0x0011c7de LAB_0011c770: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14c757] MOV ESI,0xd55 JMP 0x0011c7de LAB_0011c78c: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14ad95] MOV ESI,0xd56 JMP 0x0011c7de LAB_0011c7a8: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14c7a7] MOV ESI,0xd58 JMP 0x0011c7de LAB_0011c7c4: LEA RDI,[0x14a60f] LEA RDX,[0x14a659] LEA RCX,[0x14c7bf] MOV ESI,0xd59 LAB_0011c7de: XOR EAX,EAX CALL 0x00117c70
void ggml_soft_max_impl(int4 param_1,float param_2,int8 param_3,int4 *param_4, uint *param_5,char param_6) { char cVar1; long lVar2; char *pcVar3; int8 uVar4; char *pcVar5; cVar1 = ggml_is_contiguous_n(param_4,0); if (cVar1 == '\0') { pcVar5 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; pcVar3 = "ggml_is_contiguous(a)"; uVar4 = 0xd52; goto LAB_0011c7de; } if (param_5 != (uint *)0x0) { if (1 < *param_5) { pcVar5 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; pcVar3 = "mask->type == GGML_TYPE_F16 || mask->type == GGML_TYPE_F32"; uVar4 = 0xd55; goto LAB_0011c7de; } cVar1 = ggml_is_contiguous_n(param_5,0); if (cVar1 == '\0') { pcVar5 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; pcVar3 = "ggml_is_contiguous(mask)"; uVar4 = 0xd56; goto LAB_0011c7de; } if ((*(long *)(param_5 + 8) != 1) || (*(long *)(param_5 + 10) != 1)) { pcVar5 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; pcVar3 = "ggml_is_matrix(mask)"; uVar4 = 0xd57; goto LAB_0011c7de; } if (*(long *)(param_5 + 4) != *(long *)(param_4 + 4)) { pcVar5 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; pcVar3 = "mask->ne[0] == a->ne[0]"; uVar4 = 0xd58; goto LAB_0011c7de; } if (*(long *)(param_5 + 6) < *(long *)(param_4 + 6)) { pcVar5 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; pcVar3 = "mask->ne[1] >= a->ne[1]"; uVar4 = 0xd59; goto LAB_0011c7de; } } if ((param_5 != (uint *)0x0) || (param_2 <= 0.0)) { if (param_6 == '\0') { lVar2 = ggml_new_tensor_impl(param_3,*param_4,4,param_4 + 4,0,0); } else { lVar2 = ggml_view_tensor(param_3,param_4); } if (lVar2 != 0) { *(int4 *)(lVar2 + 0x54) = param_1; *(float *)(lVar2 + 0x58) = param_2; *(int4 *)(lVar2 + 0x50) = 0x2a; *(int4 **)(lVar2 + 0x98) = param_4; *(uint **)(lVar2 + 0xa0) = param_5; return; } pcVar5 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-impl.h"; pcVar3 = "tensor != NULL"; uVar4 = 0x70; } else { pcVar5 = "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml.c"; pcVar3 = "mask"; uVar4 = 0xd5d; } LAB_0011c7de: /* WARNING: Subroutine does not return */ ggml_abort(pcVar5,uVar4,"GGML_ASSERT(%s) failed",pcVar3); }
30,906
real_open_cached_file
eloqsql/mysys/mf_cache.c
my_bool real_open_cached_file(IO_CACHE *cache) { char name_buff[FN_REFLEN]; int error=1; DBUG_ENTER("real_open_cached_file"); if ((cache->file= create_temp_file(name_buff, cache->dir, cache->prefix[0] ? cache->prefix : 0, O_BINARY, MYF(MY_WME | MY_TEMPORARY))) >= 0) { error=0; } DBUG_RETURN(error); }
O3
c
real_open_cached_file: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x208, %rsp # imm = 0x208 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x10(%rbp) movq 0xc8(%rdi), %rsi leaq 0xd0(%rdi), %rax xorl %edx, %edx cmpb $0x0, 0xd0(%rdi) cmovneq %rax, %rdx leaq -0x210(%rbp), %rdi movl $0x50, %r8d xorl %ecx, %ecx callq 0xabb0c movl %eax, 0xd4(%rbx) movq %fs:0x28, %rcx cmpq -0x10(%rbp), %rcx jne 0xab90f shrl $0x1f, %eax addq $0x208, %rsp # imm = 0x208 popq %rbx popq %rbp retq callq 0x29240
real_open_cached_file: push rbp mov rbp, rsp push rbx sub rsp, 208h mov rbx, rdi mov rax, fs:28h mov [rbp+var_10], rax mov rsi, [rdi+0C8h] lea rax, [rdi+0D0h] xor edx, edx cmp byte ptr [rdi+0D0h], 0 cmovnz rdx, rax lea rdi, [rbp+var_210] mov r8d, 50h ; 'P' xor ecx, ecx call create_temp_file mov [rbx+0D4h], eax mov rcx, fs:28h cmp rcx, [rbp+var_10] jnz short loc_AB90F shr eax, 1Fh add rsp, 208h pop rbx pop rbp retn loc_AB90F: call ___stack_chk_fail
long long real_open_cached_file(long long a1) { long long v1; // rdx unsigned int temp_file; // eax _BYTE v4[512]; // [rsp+0h] [rbp-210h] BYREF unsigned long long v5; // [rsp+200h] [rbp-10h] v5 = __readfsqword(0x28u); v1 = 0LL; if ( *(_BYTE *)(a1 + 208) ) v1 = a1 + 208; temp_file = create_temp_file(v4, *(_QWORD *)(a1 + 200), v1, 0LL, 80LL); *(_DWORD *)(a1 + 212) = temp_file; return temp_file >> 31; }
real_open_cached_file: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x208 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RAX MOV RSI,qword ptr [RDI + 0xc8] LEA RAX,[RDI + 0xd0] XOR EDX,EDX CMP byte ptr [RDI + 0xd0],0x0 CMOVNZ RDX,RAX LEA RDI,[RBP + -0x210] MOV R8D,0x50 XOR ECX,ECX CALL 0x001abb0c MOV dword ptr [RBX + 0xd4],EAX MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x10] JNZ 0x001ab90f SHR EAX,0x1f ADD RSP,0x208 POP RBX POP RBP RET LAB_001ab90f: CALL 0x00129240
uint real_open_cached_file(long param_1) { uint uVar1; long lVar2; long in_FS_OFFSET; int1 local_218 [512]; long local_18; local_18 = *(long *)(in_FS_OFFSET + 0x28); lVar2 = 0; if (*(char *)(param_1 + 0xd0) != '\0') { lVar2 = param_1 + 0xd0; } uVar1 = create_temp_file(local_218,*(int8 *)(param_1 + 200),lVar2,0,0x50); *(uint *)(param_1 + 0xd4) = uVar1; if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return uVar1 >> 0x1f; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
30,907
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarLevel.cpp
void FVarLevel::resizeComponents() { // Per-face members: _faceVertValues.resize(_level.getNumFaceVerticesTotal()); // Per-edge members: ETag edgeTagMatch; edgeTagMatch.clear(); _edgeTags.resize(_level.getNumEdges(), edgeTagMatch); // Per-vertex members: _vertSiblingCounts.resize(_level.getNumVertices()); _vertSiblingOffsets.resize(_level.getNumVertices()); _vertFaceSiblings.resize(_level.getNumVertexFacesTotal(), 0); }
O0
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(): pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq %rax, %rcx addq $0x18, %rcx movq %rcx, -0x40(%rbp) movq (%rax), %rdi callq 0xc3700 movq -0x40(%rbp), %rdi movslq %eax, %rsi callq 0xc9aa0 leaq -0x9(%rbp), %rdi callq 0xd63f0 leaq -0x9(%rbp), %rdi callq 0xcab00 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x30, %rcx movq %rcx, -0x38(%rbp) movq (%rax), %rdi callq 0xca130 movq -0x38(%rbp), %rdi movslq %eax, %rsi leaq -0x9(%rbp), %rdx callq 0xc8280 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x48, %rcx movq %rcx, -0x30(%rbp) movq (%rax), %rdi callq 0xc8fe0 movq -0x30(%rbp), %rdi movslq %eax, %rsi callq 0xc7e90 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x60, %rcx movq %rcx, -0x28(%rbp) movq (%rax), %rdi callq 0xc8fe0 movq -0x28(%rbp), %rdi movslq %eax, %rsi callq 0xc9aa0 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x78, %rcx movq %rcx, -0x18(%rbp) movq (%rax), %rdi callq 0xd2680 movq -0x18(%rbp), %rdi movslq %eax, %rsi movw $0x0, -0xc(%rbp) leaq -0xc(%rbp), %rdx callq 0xc33a0 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel16resizeComponentsEv: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rcx, rax add rcx, 18h mov [rbp+var_40], rcx mov rdi, [rax]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level23getNumFaceVerticesTotalEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaceVerticesTotal(void) mov rdi, [rbp+var_40] movsxd rsi, eax call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) lea rdi, [rbp+var_9]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel4ETagC2Ev; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag::ETag(void) lea rdi, [rbp+var_9]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel4ETag5clearEv; OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag::clear(void) mov rax, [rbp+var_20] mov rcx, rax add rcx, 30h ; '0' mov [rbp+var_38], rcx mov rdi, [rax]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumEdgesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(void) mov rdi, [rbp+var_38] movsxd rsi, eax lea rdx, [rbp+var_9] call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel4ETagESaIS5_EE6resizeEmRKS5_; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>::resize(ulong,OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag const&) mov rax, [rbp+var_20] mov rcx, rax add rcx, 48h ; 'H' mov [rbp+var_30], rcx mov rdi, [rax]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getNumVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(void) mov rdi, [rbp+var_30] movsxd rsi, eax call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong) mov rax, [rbp+var_20] mov rcx, rax add rcx, 60h ; '`' mov [rbp+var_28], rcx mov rdi, [rax]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getNumVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(void) mov rdi, [rbp+var_28] movsxd rsi, eax call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rax, [rbp+var_20] mov rcx, rax add rcx, 78h ; 'x' mov [rbp+var_18], rcx mov rdi, [rax]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level22getNumVertexFacesTotalEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertexFacesTotal(void) mov rdi, [rbp+var_18] movsxd rsi, eax mov [rbp+var_C], 0 lea rdx, [rbp+var_C] call __ZNSt6vectorItSaItEE6resizeEmRKt; std::vector<ushort>::resize(ulong,ushort const&) add rsp, 40h pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents( OpenSubdiv::v3_6_0::Vtr::internal::Level **this) { int NumFaceVerticesTotal; // eax int NumEdges; // eax int NumVertices; // eax int v4; // eax int NumVertexFacesTotal; // eax __int16 v7; // [rsp+34h] [rbp-Ch] BYREF char v8; // [rsp+37h] [rbp-9h] BYREF OpenSubdiv::v3_6_0::Vtr::internal::Level **v9; // [rsp+38h] [rbp-8h] v9 = this; NumFaceVerticesTotal = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaceVerticesTotal(*this); std::vector<int>::resize(this + 3, NumFaceVerticesTotal); OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag::ETag((OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag *)&v8); OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag::clear((OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag *)&v8); NumEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumEdges(*this); std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>::resize(this + 6, NumEdges, &v8); NumVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(*this); std::vector<unsigned short>::resize(this + 9, NumVertices); v4 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(*this); std::vector<int>::resize(this + 12, v4); NumVertexFacesTotal = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertexFacesTotal(*this); v7 = 0; return std::vector<unsigned short>::resize(this + 15, NumVertexFacesTotal, &v7); }
resizeComponents: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV RCX,RAX ADD RCX,0x18 MOV qword ptr [RBP + -0x40],RCX MOV RDI,qword ptr [RAX] CALL 0x001c3700 MOV RDI,qword ptr [RBP + -0x40] MOVSXD RSI,EAX CALL 0x001c9aa0 LEA RDI,[RBP + -0x9] CALL 0x001d63f0 LEA RDI,[RBP + -0x9] CALL 0x001cab00 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x30 MOV qword ptr [RBP + -0x38],RCX MOV RDI,qword ptr [RAX] CALL 0x001ca130 MOV RDI,qword ptr [RBP + -0x38] MOVSXD RSI,EAX LEA RDX,[RBP + -0x9] CALL 0x001c8280 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x48 MOV qword ptr [RBP + -0x30],RCX MOV RDI,qword ptr [RAX] CALL 0x001c8fe0 MOV RDI,qword ptr [RBP + -0x30] MOVSXD RSI,EAX CALL 0x001c7e90 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x60 MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RAX] CALL 0x001c8fe0 MOV RDI,qword ptr [RBP + -0x28] MOVSXD RSI,EAX CALL 0x001c9aa0 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x78 MOV qword ptr [RBP + -0x18],RCX MOV RDI,qword ptr [RAX] CALL 0x001d2680 MOV RDI,qword ptr [RBP + -0x18] MOVSXD RSI,EAX MOV word ptr [RBP + -0xc],0x0 LEA RDX,[RBP + -0xc] CALL 0x001c33a0 ADD RSP,0x40 POP RBP RET
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(FVarLevel *this) { int iVar1; ushort local_14; ETag local_11; FVarLevel *local_10; local_10 = this; iVar1 = Level::getNumFaceVerticesTotal(*(Level **)this); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(this + 0x18),(long)iVar1); ETag::ETag(&local_11); ETag::clear(&local_11); iVar1 = Level::getNumEdges(*(Level **)this); std:: vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>> ::resize((vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>> *)(this + 0x30),(long)iVar1,&local_11); iVar1 = Level::getNumVertices(*(Level **)this); std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *)(this + 0x48),(long)iVar1); iVar1 = Level::getNumVertices(*(Level **)this); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(this + 0x60),(long)iVar1); iVar1 = Level::getNumVertexFacesTotal(*(Level **)this); local_14 = 0; std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *)(this + 0x78),(long)iVar1, &local_14); return; }
30,908
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarLevel.cpp
void FVarLevel::resizeComponents() { // Per-face members: _faceVertValues.resize(_level.getNumFaceVerticesTotal()); // Per-edge members: ETag edgeTagMatch; edgeTagMatch.clear(); _edgeTags.resize(_level.getNumEdges(), edgeTagMatch); // Per-vertex members: _vertSiblingCounts.resize(_level.getNumVertices()); _vertSiblingOffsets.resize(_level.getNumVertices()); _vertFaceSiblings.resize(_level.getNumVertexFacesTotal(), 0); }
O1
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx addq $0x18, %rdi movq (%rbx), %rax movq 0x38(%rax), %rcx subq 0x30(%rax), %rcx shrq $0x2, %rcx movslq %ecx, %rsi callq 0x39690 leaq 0xd(%rsp), %rdx movb $0x0, (%rdx) leaq 0x30(%rbx), %rdi movq (%rbx), %rax movslq 0x4(%rax), %rsi callq 0x391f0 leaq 0x48(%rbx), %rdi movq (%rbx), %rax movslq 0x8(%rax), %rsi callq 0x39160 leaq 0x60(%rbx), %rdi movq (%rbx), %rax movslq 0x8(%rax), %rsi callq 0x39690 movq (%rbx), %rax addq $0x78, %rbx movq 0x128(%rax), %rcx subq 0x120(%rax), %rcx shrq $0x2, %rcx movslq %ecx, %rsi leaq 0xe(%rsp), %rdx movw $0x0, (%rdx) movq %rbx, %rdi callq 0x380c0 addq $0x10, %rsp popq %rbx retq nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel16resizeComponentsEv: push rbx sub rsp, 10h mov rbx, rdi add rdi, 18h mov rax, [rbx] mov rcx, [rax+38h] sub rcx, [rax+30h] shr rcx, 2 movsxd rsi, ecx call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) lea rdx, [rsp+18h+var_B] mov byte ptr [rdx], 0 lea rdi, [rbx+30h] mov rax, [rbx] movsxd rsi, dword ptr [rax+4] call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel4ETagESaIS5_EE6resizeEmRKS5_; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>::resize(ulong,OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag const&) lea rdi, [rbx+48h] mov rax, [rbx] movsxd rsi, dword ptr [rax+8] call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong) lea rdi, [rbx+60h] mov rax, [rbx] movsxd rsi, dword ptr [rax+8] call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rax, [rbx] add rbx, 78h ; 'x' mov rcx, [rax+128h] sub rcx, [rax+120h] shr rcx, 2 movsxd rsi, ecx lea rdx, [rsp+18h+var_A] mov word ptr [rdx], 0 mov rdi, rbx call __ZNSt6vectorItSaItEE6resizeEmRKt; std::vector<ushort>::resize(ulong,ushort const&) add rsp, 10h pop rbx retn
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents( OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *this) { long long v2; // rsi char v4; // [rsp+Dh] [rbp-Bh] BYREF _WORD v5[5]; // [rsp+Eh] [rbp-Ah] BYREF std::vector<int>::resize( (char *)this + 24, (int)((*(_QWORD *)(*(_QWORD *)this + 56LL) - *(_QWORD *)(*(_QWORD *)this + 48LL)) >> 2)); v4 = 0; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>::resize( (char *)this + 48, *(int *)(*(_QWORD *)this + 4LL), &v4); std::vector<unsigned short>::resize((char *)this + 72, *(int *)(*(_QWORD *)this + 8LL)); std::vector<int>::resize((char *)this + 96, *(int *)(*(_QWORD *)this + 8LL)); v2 = (int)((*(_QWORD *)(*(_QWORD *)this + 296LL) - *(_QWORD *)(*(_QWORD *)this + 288LL)) >> 2); v5[0] = 0; return std::vector<unsigned short>::resize((char *)this + 120, v2, v5); }
resizeComponents: PUSH RBX SUB RSP,0x10 MOV RBX,RDI ADD RDI,0x18 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0x38] SUB RCX,qword ptr [RAX + 0x30] SHR RCX,0x2 MOVSXD RSI,ECX CALL 0x00139690 LEA RDX,[RSP + 0xd] MOV byte ptr [RDX],0x0 LEA RDI,[RBX + 0x30] MOV RAX,qword ptr [RBX] MOVSXD RSI,dword ptr [RAX + 0x4] CALL 0x001391f0 LEA RDI,[RBX + 0x48] MOV RAX,qword ptr [RBX] MOVSXD RSI,dword ptr [RAX + 0x8] CALL 0x00139160 LEA RDI,[RBX + 0x60] MOV RAX,qword ptr [RBX] MOVSXD RSI,dword ptr [RAX + 0x8] CALL 0x00139690 MOV RAX,qword ptr [RBX] ADD RBX,0x78 MOV RCX,qword ptr [RAX + 0x128] SUB RCX,qword ptr [RAX + 0x120] SHR RCX,0x2 MOVSXD RSI,ECX LEA RDX,[RSP + 0xe] MOV word ptr [RDX],0x0 MOV RDI,RBX CALL 0x001380c0 ADD RSP,0x10 POP RBX RET
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(FVarLevel *this) { ETag local_b; ushort local_a; std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(this + 0x18), (long)(int)((ulong)(*(long *)(*(long *)this + 0x38) - *(long *)(*(long *)this + 0x30)) >> 2)); local_b = (ETag)0x0; std:: vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>> ::resize((vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>> *)(this + 0x30),(long)*(int *)(*(long *)this + 4),&local_b); std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *)(this + 0x48), (long)*(int *)(*(long *)this + 8)); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(this + 0x60),(long)*(int *)(*(long *)this + 8)); local_a = 0; std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *)(this + 0x78), (long)(int)((ulong)(*(long *)(*(long *)this + 0x128) - *(long *)(*(long *)this + 0x120) ) >> 2),&local_a); return; }
30,909
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/fvarLevel.cpp
void FVarLevel::resizeComponents() { // Per-face members: _faceVertValues.resize(_level.getNumFaceVerticesTotal()); // Per-edge members: ETag edgeTagMatch; edgeTagMatch.clear(); _edgeTags.resize(_level.getNumEdges(), edgeTagMatch); // Per-vertex members: _vertSiblingCounts.resize(_level.getNumVertices()); _vertSiblingOffsets.resize(_level.getNumVertices()); _vertFaceSiblings.resize(_level.getNumVertexFacesTotal(), 0); }
O3
cpp
OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx addq $0x18, %rdi movq (%rbx), %rax movq 0x38(%rax), %rcx subq 0x30(%rax), %rcx shrq $0x2, %rcx movslq %ecx, %rsi callq 0x39670 leaq 0xd(%rsp), %rdx movb $0x0, (%rdx) leaq 0x30(%rbx), %rdi movq (%rbx), %rax movslq 0x4(%rax), %rsi callq 0x391e0 leaq 0x48(%rbx), %rdi movq (%rbx), %rax movslq 0x8(%rax), %rsi callq 0x39150 leaq 0x60(%rbx), %rdi movq (%rbx), %rax movslq 0x8(%rax), %rsi callq 0x39670 movq (%rbx), %rax addq $0x78, %rbx movq 0x128(%rax), %rcx subq 0x120(%rax), %rcx shrq $0x2, %rcx movslq %ecx, %rsi leaq 0xe(%rsp), %rdx movw $0x0, (%rdx) movq %rbx, %rdi callq 0x380c0 addq $0x10, %rsp popq %rbx retq nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel16resizeComponentsEv: push rbx sub rsp, 10h mov rbx, rdi add rdi, 18h mov rax, [rbx] mov rcx, [rax+38h] sub rcx, [rax+30h] shr rcx, 2 movsxd rsi, ecx call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) lea rdx, [rsp+18h+var_B] mov byte ptr [rdx], 0 lea rdi, [rbx+30h] mov rax, [rbx] movsxd rsi, dword ptr [rax+4] call __ZNSt6vectorIN10OpenSubdiv6v3_6_03Vtr8internal9FVarLevel4ETagESaIS5_EE6resizeEmRKS5_; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>::resize(ulong,OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag const&) lea rdi, [rbx+48h] mov rax, [rbx] movsxd rsi, dword ptr [rax+8] call __ZNSt6vectorItSaItEE6resizeEm; std::vector<ushort>::resize(ulong) lea rdi, [rbx+60h] mov rax, [rbx] movsxd rsi, dword ptr [rax+8] call __ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rax, [rbx] add rbx, 78h ; 'x' mov rcx, [rax+128h] sub rcx, [rax+120h] shr rcx, 2 movsxd rsi, ecx lea rdx, [rsp+18h+var_A] mov word ptr [rdx], 0 mov rdi, rbx call __ZNSt6vectorItSaItEE6resizeEmRKt; std::vector<ushort>::resize(ulong,ushort const&) add rsp, 10h pop rbx retn
long long OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents( OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel *this) { long long v2; // rsi char v4; // [rsp+Dh] [rbp-Bh] BYREF _WORD v5[5]; // [rsp+Eh] [rbp-Ah] BYREF std::vector<int>::resize( (char *)this + 24, (int)((*(_QWORD *)(*(_QWORD *)this + 56LL) - *(_QWORD *)(*(_QWORD *)this + 48LL)) >> 2)); v4 = 0; std::vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>::resize( (char *)this + 48, *(int *)(*(_QWORD *)this + 4LL), &v4); std::vector<unsigned short>::resize((char *)this + 72, *(int *)(*(_QWORD *)this + 8LL)); std::vector<int>::resize((char *)this + 96, *(int *)(*(_QWORD *)this + 8LL)); v2 = (int)((*(_QWORD *)(*(_QWORD *)this + 296LL) - *(_QWORD *)(*(_QWORD *)this + 288LL)) >> 2); v5[0] = 0; return std::vector<unsigned short>::resize((char *)this + 120, v2, v5); }
resizeComponents: PUSH RBX SUB RSP,0x10 MOV RBX,RDI ADD RDI,0x18 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0x38] SUB RCX,qword ptr [RAX + 0x30] SHR RCX,0x2 MOVSXD RSI,ECX CALL 0x00139670 LEA RDX,[RSP + 0xd] MOV byte ptr [RDX],0x0 LEA RDI,[RBX + 0x30] MOV RAX,qword ptr [RBX] MOVSXD RSI,dword ptr [RAX + 0x4] CALL 0x001391e0 LEA RDI,[RBX + 0x48] MOV RAX,qword ptr [RBX] MOVSXD RSI,dword ptr [RAX + 0x8] CALL 0x00139150 LEA RDI,[RBX + 0x60] MOV RAX,qword ptr [RBX] MOVSXD RSI,dword ptr [RAX + 0x8] CALL 0x00139670 MOV RAX,qword ptr [RBX] ADD RBX,0x78 MOV RCX,qword ptr [RAX + 0x128] SUB RCX,qword ptr [RAX + 0x120] SHR RCX,0x2 MOVSXD RSI,ECX LEA RDX,[RSP + 0xe] MOV word ptr [RDX],0x0 MOV RDI,RBX CALL 0x001380c0 ADD RSP,0x10 POP RBX RET
/* OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::resizeComponents(FVarLevel *this) { ETag local_b; ushort local_a; std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(this + 0x18), (long)(int)((ulong)(*(long *)(*(long *)this + 0x38) - *(long *)(*(long *)this + 0x30)) >> 2)); local_b = (ETag)0x0; std:: vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>> ::resize((vector<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag,std::allocator<OpenSubdiv::v3_6_0::Vtr::internal::FVarLevel::ETag>> *)(this + 0x30),(long)*(int *)(*(long *)this + 4),&local_b); std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *)(this + 0x48), (long)*(int *)(*(long *)this + 8)); std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)(this + 0x60),(long)*(int *)(*(long *)this + 8)); local_a = 0; std::vector<unsigned_short,std::allocator<unsigned_short>>::resize ((vector<unsigned_short,std::allocator<unsigned_short>> *)(this + 0x78), (long)(int)((ulong)(*(long *)(*(long *)this + 0x128) - *(long *)(*(long *)this + 0x120) ) >> 2),&local_a); return; }
30,910
log2_ceil
corpus-core[P]colibri-stateless/src/util/ssz_merkle.c
static inline uint32_t log2_ceil(uint32_t val) { if (val < 2) return 0; // Use MSVC intrinsic for counting leading zeros unsigned long index; #if defined(_MSC_VER) _BitScanReverse(&index, val); uint32_t floor_log2 = index; #else uint32_t floor_log2 = 31 - __builtin_clz(val); #endif return (val & (val - 1)) == 0 ? floor_log2 : floor_log2 + 1; }
O2
c
log2_ceil: xorl %eax, %eax cmpl $0x2, %edi jb 0x13980 bsrl %edi, %ecx movl %ecx, %eax xorl $-0x20, %eax leal -0x1(%rdi), %edx addl $0x21, %eax testl %edx, %edi cmovel %ecx, %eax retq
log2_ceil: xor eax, eax cmp edi, 2 jb short locret_13980 bsr ecx, edi mov eax, ecx xor eax, 0FFFFFFE0h lea edx, [rdi-1] add eax, 21h ; '!' test edi, edx cmovz eax, ecx locret_13980: retn
long long log2_ceil(unsigned int a1) { long long result; // rax unsigned int v2; // ecx result = 0LL; if ( a1 >= 2 ) { _BitScanReverse(&v2, a1); result = (v2 ^ 0xFFFFFFE0) + 33; if ( ((a1 - 1) & a1) == 0 ) return v2; } return result; }
log2_ceil: XOR EAX,EAX CMP EDI,0x2 JC 0x00113980 BSR ECX,EDI MOV EAX,ECX XOR EAX,0xffffffe0 LEA EDX,[RDI + -0x1] ADD EAX,0x21 TEST EDI,EDX CMOVZ EAX,ECX LAB_00113980: RET
uint log2_ceil(uint param_1) { uint uVar1; uint uVar2; uVar2 = 0; if (1 < param_1) { uVar1 = 0x1f; if (param_1 != 0) { for (; param_1 >> uVar1 == 0; uVar1 = uVar1 - 1) { } } uVar2 = (uVar1 ^ 0xffffffe0) + 0x21; if ((param_1 & param_1 - 1) == 0) { uVar2 = uVar1; } } return uVar2; }
30,911
Delete_rows_log_event_old::do_after_row_operations(TABLE*, int)
eloqsql/sql/log_event_old.cc
int Delete_rows_log_event_old::do_after_row_operations(TABLE *table, int error) { /*error= ToDo:find out what this should really be, this triggers close_scan in nbd, returning error?*/ table->file->ha_index_or_rnd_end(); my_free(m_memory); // Free for multi_malloc m_memory= NULL; m_after_image= NULL; m_key= NULL; return error; }
O0
cpp
Delete_rows_log_event_old::do_after_row_operations(TABLE*, int): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi callq 0x5760e0 movq -0x20(%rbp), %rax movq 0x110(%rax), %rdi callq 0xc1afa0 movq -0x20(%rbp), %rax movq $0x0, 0x110(%rax) movq $0x0, 0x108(%rax) movq $0x0, 0x100(%rax) movl -0x14(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN25Delete_rows_log_event_old23do_after_row_operationsEP5TABLEi: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax+8]; this call _ZN7handler19ha_index_or_rnd_endEv; handler::ha_index_or_rnd_end(void) mov rax, [rbp+var_20] mov rdi, [rax+110h] call my_free mov rax, [rbp+var_20] mov qword ptr [rax+110h], 0 mov qword ptr [rax+108h], 0 mov qword ptr [rax+100h], 0 mov eax, [rbp+var_14] add rsp, 20h pop rbp retn
long long Delete_rows_log_event_old::do_after_row_operations( Delete_rows_log_event_old *this, handler **a2, unsigned int a3) { handler::ha_index_or_rnd_end(a2[1]); my_free(*((_QWORD *)this + 34)); *((_QWORD *)this + 34) = 0LL; *((_QWORD *)this + 33) = 0LL; *((_QWORD *)this + 32) = 0LL; return a3; }
not_null_tables: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI XOR EAX,EAX POP RBP RET
/* Item_func_ifnull::not_null_tables() const */ int8 Item_func_ifnull::not_null_tables(void) { return 0; }
30,912
ma_writeinfo
eloqsql/storage/maria/ma_locking.c
int _ma_writeinfo(register MARIA_HA *info, uint operation) { int error,olderror; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_writeinfo"); DBUG_PRINT("info",("operation: %u tot_locks: %u", operation, share->tot_locks)); error=0; if (share->tot_locks == 0 && !share->base.born_transactional) { /* transactional tables flush their state at Checkpoint */ if (operation) { /* Two threads can't be here */ CRASH_IF_S3_TABLE(info->s); /* S3 readonly doesn't come here */ olderror= my_errno; /* Remember last error */ #ifdef MARIA_EXTERNAL_LOCKING /* The following only makes sense if we want to be allow two different processes access the same table at the same time */ share->state.process= share->last_process= share->this_process; share->state.unique= info->last_unique= info->this_unique; share->state.update_count= info->last_loop= ++info->this_loop; #endif if ((error= _ma_state_info_write_sub(share->kfile.file, &share->state, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET))) olderror=my_errno; #ifdef _WIN32 if (maria_flush) { _commit(share->kfile.file); _commit(info->dfile.file); } #endif my_errno=olderror; } } else if (operation) share->changed= 1; /* Mark keyfile changed */ DBUG_RETURN(error); }
O3
c
ma_writeinfo: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq (%rdi), %r14 cmpl $0x0, 0x7b8(%r14) jne 0x37e07 cmpb $0x0, 0x44c(%r14) je 0x37e22 xorl %ebx, %ebx testl %esi, %esi je 0x37e15 movb $0x1, 0x7de(%r14) movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq testl %esi, %esi je 0x37e5a callq 0xa1b22 movl (%rax), %r15d movl 0x760(%r14), %edi movq %r14, %rsi movl $0x1, %edx callq 0x54ff6 movl %eax, %ebx testl %eax, %eax je 0x37e50 callq 0xa1b22 movl (%rax), %r15d callq 0xa1b22 movl %r15d, (%rax) jmp 0x37e15 xorl %ebx, %ebx jmp 0x37e15
_ma_writeinfo: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, [rdi] cmp dword ptr [r14+7B8h], 0 jnz short loc_37E07 cmp byte ptr [r14+44Ch], 0 jz short loc_37E22 loc_37E07: xor ebx, ebx test esi, esi jz short loc_37E15 mov byte ptr [r14+7DEh], 1 loc_37E15: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_37E22: test esi, esi jz short loc_37E5A call _my_thread_var mov r15d, [rax] mov edi, [r14+760h] mov rsi, r14 mov edx, 1 call _ma_state_info_write_sub mov ebx, eax test eax, eax jz short loc_37E50 call _my_thread_var mov r15d, [rax] loc_37E50: call _my_thread_var mov [rax], r15d jmp short loc_37E15 loc_37E5A: xor ebx, ebx jmp short loc_37E15
long long ma_writeinfo(long long *a1, long long a2, long long a3, long long a4, long long a5) { long long v5; // r14 unsigned int v6; // ebx int v8; // r15d long long v9; // rdi long long v10; // rdx long long v11; // rcx long long v12; // r8 v5 = *a1; if ( *(_DWORD *)(*a1 + 1976) || *(_BYTE *)(v5 + 1100) ) { v6 = 0; if ( (_DWORD)a2 ) *(_BYTE *)(v5 + 2014) = 1; } else if ( (_DWORD)a2 ) { v8 = *(_DWORD *)my_thread_var(a1, a2, a3, a4, a5); v9 = *(unsigned int *)(v5 + 1888); v6 = ma_state_info_write_sub(v9, v5, 1LL); if ( v6 ) v8 = *(_DWORD *)my_thread_var(v9, v5, v10, v11, v12); *(_DWORD *)my_thread_var(v9, v5, v10, v11, v12) = v8; } else { return 0; } return v6; }
_ma_writeinfo: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,qword ptr [RDI] CMP dword ptr [R14 + 0x7b8],0x0 JNZ 0x00137e07 CMP byte ptr [R14 + 0x44c],0x0 JZ 0x00137e22 LAB_00137e07: XOR EBX,EBX TEST ESI,ESI JZ 0x00137e15 MOV byte ptr [R14 + 0x7de],0x1 LAB_00137e15: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00137e22: TEST ESI,ESI JZ 0x00137e5a CALL 0x001a1b22 MOV R15D,dword ptr [RAX] MOV EDI,dword ptr [R14 + 0x760] MOV RSI,R14 MOV EDX,0x1 CALL 0x00154ff6 MOV EBX,EAX TEST EAX,EAX JZ 0x00137e50 CALL 0x001a1b22 MOV R15D,dword ptr [RAX] LAB_00137e50: CALL 0x001a1b22 MOV dword ptr [RAX],R15D JMP 0x00137e15 LAB_00137e5a: XOR EBX,EBX JMP 0x00137e15
int _ma_writeinfo(long *param_1,int param_2) { long lVar1; int iVar2; int4 *puVar3; int4 uVar4; lVar1 = *param_1; if ((*(int *)(lVar1 + 0x7b8) == 0) && (*(char *)(lVar1 + 0x44c) == '\0')) { if (param_2 == 0) { iVar2 = 0; } else { puVar3 = (int4 *)_my_thread_var(); uVar4 = *puVar3; iVar2 = _ma_state_info_write_sub(*(int4 *)(lVar1 + 0x760),lVar1,1); if (iVar2 != 0) { puVar3 = (int4 *)_my_thread_var(); uVar4 = *puVar3; } puVar3 = (int4 *)_my_thread_var(); *puVar3 = uVar4; } } else { iVar2 = 0; if (param_2 != 0) { *(int1 *)(lVar1 + 0x7de) = 1; } } return iVar2; }
30,913
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> testing::internal::StreamableToString<char*>(char* const&)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/include/gtest/gtest-message.h
std::string StreamableToString(const T& streamable) { return (Message() << streamable).GetString(); }
O1
c
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> testing::internal::StreamableToString<char*>(char* const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x20c50 movq (%r14), %rsi movq %r15, %rdi callq 0x20d50 movq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x20eb3 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x3f7fe movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x3f81e movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x99a0
_ZN7testing8internal18StreamableToStringIPwEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_: push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi lea r15, [rsp+28h+var_20] mov rdi, r15; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rsi, [r14] mov rdi, r15 call _ZN7testing7MessagelsEPw; testing::Message::operator<<(wchar_t *) mov rsi, [rsp+28h+var_20] mov rdi, rbx call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) mov rdi, [rsp+28h+var_20] test rdi, rdi jz short loc_3F7FE mov rax, [rdi] call qword ptr [rax+8] loc_3F7FE: mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_3F81E mov rax, [rdi] call qword ptr [rax+8] loc_3F81E: mov rdi, rbx call __Unwind_Resume
long long testing::internal::StreamableToString<wchar_t *>(long long a1) { long long v2[4]; // [rsp+8h] [rbp-20h] BYREF testing::Message::Message((testing::Message *)v2); testing::Message::operator<<(v2); testing::internal::StringStreamToString(a1, v2[0]); if ( v2[0] ) (*(void ( **)(long long))(*(_QWORD *)v2[0] + 8LL))(v2[0]); return a1; }
StreamableToString<wchar_t*>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00120c50 MOV RSI,qword ptr [R14] LAB_0013f7d9: MOV RDI,R15 CALL 0x00120d50 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,RBX CALL 0x00120eb3 LAB_0013f7ee: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0013f7fe MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0013f7fe: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* std::__cxx11::string testing::internal::StreamableToString<wchar_t*>(wchar_t* const&) */ internal * __thiscall testing::internal::StreamableToString<wchar_t*>(internal *this,wchar_t **param_1) { long *local_20; Message::Message((Message *)&local_20); /* try { // try from 0013f7d9 to 0013f7ed has its CatchHandler @ 0013f80b */ Message::operator<<((Message *)&local_20,*param_1); StringStreamToString((stringstream *)this); if (local_20 != (long *)0x0) { (**(code **)(*local_20 + 8))(); } return this; }
30,914
get_var_ref
bluesky950520[P]quickjs/quickjs.c
static JSVarRef *get_var_ref(JSContext *ctx, JSStackFrame *sf, int var_idx, BOOL is_arg) { JSVarRef *var_ref; struct list_head *el; list_for_each(el, &sf->var_ref_list) { var_ref = list_entry(el, JSVarRef, header.link); if (var_ref->var_idx == var_idx && var_ref->is_arg == is_arg) { var_ref->header.ref_count++; return var_ref; } } /* create a new one */ var_ref = js_malloc(ctx, sizeof(JSVarRef)); if (!var_ref) return NULL; var_ref->header.ref_count = 1; var_ref->is_detached = FALSE; var_ref->is_arg = is_arg; var_ref->var_idx = var_idx; list_add_tail(&var_ref->header.link, &sf->var_ref_list); if (is_arg) var_ref->pvalue = &sf->arg_buf[var_idx]; else var_ref->pvalue = &sf->var_buf[var_idx]; var_ref->value = JS_UNDEFINED; return var_ref; }
O2
c
get_var_ref: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %ecx, %r14d movl %edx, %ebp movq %rsi, %rbx leaq 0x28(%rsi), %r15 leaq 0x30(%rsi), %rax movq (%rax), %rax cmpq %r15, %rax je 0x37c41 movzwl -0x2(%rax), %ecx cmpl %ebp, %ecx jne 0x37c3b movzbl -0x3(%rax), %ecx shrl %ecx andl $0x1, %ecx cmpl %r14d, %ecx je 0x37cab addq $0x8, %rax jmp 0x37c1d pushq $0x30 popq %rsi callq 0x17214 testq %rax, %rax je 0x37cb4 movl $0x1, (%rax) movb 0x5(%rax), %cl leal (%r14,%r14), %edx andb $0x2, %dl andb $-0x4, %cl orb %dl, %cl movb %cl, 0x5(%rax) movw %bp, 0x6(%rax) movq %rax, %rcx addq $0x8, %rcx movq 0x28(%rbx), %rdx movq %rcx, 0x8(%rdx) movq %rdx, 0x8(%rax) movq %r15, 0x10(%rax) movq %rcx, 0x28(%rbx) xorl %ecx, %ecx testl %r14d, %r14d sete %cl movslq %ebp, %rdx shlq $0x4, %rdx addq 0x18(%rbx,%rcx,8), %rdx movq %rdx, 0x18(%rax) andl $0x0, 0x20(%rax) movq $0x3, 0x28(%rax) jmp 0x37cb6 incl -0x8(%rax) addq $-0x8, %rax jmp 0x37cb6 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
get_var_ref: push rbp push r15 push r14 push rbx push rax mov r14d, ecx mov ebp, edx mov rbx, rsi lea r15, [rsi+28h] lea rax, [rsi+30h] loc_37C1D: mov rax, [rax] cmp rax, r15 jz short loc_37C41 movzx ecx, word ptr [rax-2] cmp ecx, ebp jnz short loc_37C3B movzx ecx, byte ptr [rax-3] shr ecx, 1 and ecx, 1 cmp ecx, r14d jz short loc_37CAB loc_37C3B: add rax, 8 jmp short loc_37C1D loc_37C41: push 30h ; '0' pop rsi call js_malloc test rax, rax jz short loc_37CB4 mov dword ptr [rax], 1 mov cl, [rax+5] lea edx, [r14+r14] and dl, 2 and cl, 0FCh or cl, dl mov [rax+5], cl mov [rax+6], bp mov rcx, rax add rcx, 8 mov rdx, [rbx+28h] mov [rdx+8], rcx mov [rax+8], rdx mov [rax+10h], r15 mov [rbx+28h], rcx xor ecx, ecx test r14d, r14d setz cl movsxd rdx, ebp shl rdx, 4 add rdx, [rbx+rcx*8+18h] mov [rax+18h], rdx and dword ptr [rax+20h], 0 mov qword ptr [rax+28h], 3 jmp short loc_37CB6 loc_37CAB: inc dword ptr [rax-8] add rax, 0FFFFFFFFFFFFFFF8h jmp short loc_37CB6 loc_37CB4: xor eax, eax loc_37CB6: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long get_var_ref(long long a1, long long a2, int a3, int a4) { long long v6; // r15 long long *i; // rax long long v8; // rax long long result; // rax long long v10; // rdx v6 = a2 + 40; for ( i = (long long *)(a2 + 48); ; i = (long long *)(v8 + 8) ) { v8 = *i; if ( v8 == v6 ) break; if ( *(unsigned __int16 *)(v8 - 2) == a3 && ((*(unsigned __int8 *)(v8 - 3) >> 1) & 1) == a4 ) { ++*(_DWORD *)(v8 - 8); return v8 - 8; } } result = js_malloc(a1, 48LL); if ( !result ) return 0LL; *(_DWORD *)result = 1; *(_BYTE *)(result + 5) = (2 * a4) & 2 | *(_BYTE *)(result + 5) & 0xFC; *(_WORD *)(result + 6) = a3; v10 = *(_QWORD *)(a2 + 40); *(_QWORD *)(v10 + 8) = result + 8; *(_QWORD *)(result + 8) = v10; *(_QWORD *)(result + 16) = v6; *(_QWORD *)(a2 + 40) = result + 8; *(_QWORD *)(result + 24) = *(_QWORD *)(a2 + 8LL * (a4 == 0) + 24) + 16LL * a3; *(_DWORD *)(result + 32) = 0; *(_QWORD *)(result + 40) = 3LL; return result; }
get_var_ref: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14D,ECX MOV EBP,EDX MOV RBX,RSI LEA R15,[RSI + 0x28] LEA RAX,[RSI + 0x30] LAB_00137c1d: MOV RAX,qword ptr [RAX] CMP RAX,R15 JZ 0x00137c41 MOVZX ECX,word ptr [RAX + -0x2] CMP ECX,EBP JNZ 0x00137c3b MOVZX ECX,byte ptr [RAX + -0x3] SHR ECX,0x1 AND ECX,0x1 CMP ECX,R14D JZ 0x00137cab LAB_00137c3b: ADD RAX,0x8 JMP 0x00137c1d LAB_00137c41: PUSH 0x30 POP RSI CALL 0x00117214 TEST RAX,RAX JZ 0x00137cb4 MOV dword ptr [RAX],0x1 MOV CL,byte ptr [RAX + 0x5] LEA EDX,[R14 + R14*0x1] AND DL,0x2 AND CL,0xfc OR CL,DL MOV byte ptr [RAX + 0x5],CL MOV word ptr [RAX + 0x6],BP MOV RCX,RAX ADD RCX,0x8 MOV RDX,qword ptr [RBX + 0x28] MOV qword ptr [RDX + 0x8],RCX MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RBX + 0x28],RCX XOR ECX,ECX TEST R14D,R14D SETZ CL MOVSXD RDX,EBP SHL RDX,0x4 ADD RDX,qword ptr [RBX + RCX*0x8 + 0x18] MOV qword ptr [RAX + 0x18],RDX AND dword ptr [RAX + 0x20],0x0 MOV qword ptr [RAX + 0x28],0x3 JMP 0x00137cb6 LAB_00137cab: INC dword ptr [RAX + -0x8] ADD RAX,-0x8 JMP 0x00137cb6 LAB_00137cb4: XOR EAX,EAX LAB_00137cb6: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 * get_var_ref(int8 param_1,long param_2,uint param_3,uint param_4) { long lVar1; long *plVar2; int4 *puVar3; plVar2 = (long *)(param_2 + 0x30); while( true ) { lVar1 = *plVar2; if (lVar1 == param_2 + 0x28) { puVar3 = (int4 *)js_malloc(param_1,0x30); if (puVar3 == (int4 *)0x0) { puVar3 = (int4 *)0x0; } else { *puVar3 = 1; *(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) & 0xfc | (char)param_4 * '\x02' & 2U; *(short *)((long)puVar3 + 6) = (short)param_3; lVar1 = *(long *)(param_2 + 0x28); *(int4 **)(lVar1 + 8) = puVar3 + 2; *(long *)(puVar3 + 2) = lVar1; *(long *)(puVar3 + 4) = param_2 + 0x28; *(int4 **)(param_2 + 0x28) = puVar3 + 2; *(long *)(puVar3 + 6) = (long)(int)param_3 * 0x10 + *(long *)(param_2 + 0x18 + (ulong)(param_4 == 0) * 8); puVar3[8] = 0; *(int8 *)(puVar3 + 10) = 3; } return puVar3; } if ((*(ushort *)(lVar1 + -2) == param_3) && ((*(byte *)(lVar1 + -3) >> 1 & 1) == param_4)) break; plVar2 = (long *)(lVar1 + 8); } *(int *)(lVar1 + -8) = *(int *)(lVar1 + -8) + 1; return (int4 *)(lVar1 + -8); }
30,915
js_dataview_get_byteLength
bluesky950520[P]quickjs/quickjs.c
static JSValue js_dataview_get_byteLength(JSContext *ctx, JSValue this_val) { JSArrayBuffer *abuf; JSTypedArray *ta; JSObject *p; p = get_dataview(ctx, this_val); if (!p) return JS_EXCEPTION; if (dataview_is_oob(p)) return JS_ThrowTypeErrorArrayBufferOOB(ctx); ta = p->u.typed_array; if (ta->track_rab) { abuf = ta->buffer->u.array_buffer; return js_uint32(abuf->byte_length - ta->offset); } return js_uint32(ta->length); }
O0
c
js_dataview_get_byteLength: subq $0x48, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0xe4fe0 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0xe44ea movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0xe4571 movq 0x8(%rsp), %rdi callq 0xe5060 cmpl $0x0, %eax je 0xe450f movq 0x20(%rsp), %rdi callq 0x58ae0 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) jmp 0xe4571 movq 0x8(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax cmpl $0x0, 0x28(%rax) je 0xe455a movq 0x10(%rsp), %rax movq 0x18(%rax), %rax movq 0x30(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movl (%rax), %edi movq 0x10(%rsp), %rax subl 0x20(%rax), %edi callq 0x33b60 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) jmp 0xe4571 movq 0x10(%rsp), %rax movl 0x24(%rax), %edi callq 0x33b60 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x48, %rsp retq
js_dataview_get_byteLength: sub rsp, 48h mov [rsp+48h+var_20], rsi mov [rsp+48h+var_18], rdx mov [rsp+48h+var_28], rdi mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_18] call get_dataview mov [rsp+48h+var_40], rax cmp [rsp+48h+var_40], 0 jnz short loc_E44EA mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp loc_E4571 loc_E44EA: mov rdi, [rsp+48h+var_40] call dataview_is_oob cmp eax, 0 jz short loc_E450F mov rdi, [rsp+48h+var_28] call JS_ThrowTypeErrorArrayBufferOOB mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx jmp short loc_E4571 loc_E450F: mov rax, [rsp+48h+var_40] mov rax, [rax+30h] mov [rsp+48h+var_38], rax mov rax, [rsp+48h+var_38] cmp dword ptr [rax+28h], 0 jz short loc_E455A mov rax, [rsp+48h+var_38] mov rax, [rax+18h] mov rax, [rax+30h] mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_30] mov edi, [rax] mov rax, [rsp+48h+var_38] sub edi, [rax+20h] call js_uint32 mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx jmp short loc_E4571 loc_E455A: mov rax, [rsp+48h+var_38] mov edi, [rax+24h] call js_uint32 mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx loc_E4571: mov rax, [rsp+48h+var_10] mov rdx, [rsp+48h+var_8] add rsp, 48h retn
long long js_dataview_get_byteLength( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rdx long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 long long dataview; // [rsp+8h] [rbp-40h] long long v19; // [rsp+10h] [rbp-38h] long long v20; // [rsp+38h] [rbp-10h] dataview = get_dataview(a1, a2, a3); if ( dataview ) { if ( (unsigned int)dataview_is_oob(dataview) ) { return JS_ThrowTypeErrorArrayBufferOOB(a1, a4, a5, a6, a7, v15, v16, a10, a11, a2, v11, v12, v13, v14); } else { v19 = *(_QWORD *)(dataview + 48); if ( *(_DWORD *)(v19 + 40) ) return js_uint32(**(_DWORD **)(*(_QWORD *)(v19 + 24) + 48LL) - *(_DWORD *)(v19 + 32)); else return js_uint32(*(_DWORD *)(v19 + 36)); } } else { LODWORD(v20) = 0; } return v20; }
js_dataview_get_byteLength: SUB RSP,0x48 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] CALL 0x001e4fe0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x001e44ea MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x001e4571 LAB_001e44ea: MOV RDI,qword ptr [RSP + 0x8] CALL 0x001e5060 CMP EAX,0x0 JZ 0x001e450f MOV RDI,qword ptr [RSP + 0x20] CALL 0x00158ae0 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX JMP 0x001e4571 LAB_001e450f: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x28],0x0 JZ 0x001e455a MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x10] SUB EDI,dword ptr [RAX + 0x20] CALL 0x00133b60 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX JMP 0x001e4571 LAB_001e455a: MOV RAX,qword ptr [RSP + 0x10] MOV EDI,dword ptr [RAX + 0x24] CALL 0x00133b60 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX LAB_001e4571: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
int1 [16] js_dataview_get_byteLength(int8 param_1,int8 param_2,int8 param_3) { int iVar1; long lVar2; int1 auVar3 [16]; int4 local_10; int4 uStack_c; int8 local_8; lVar2 = get_dataview(param_1,param_2,param_3); if (lVar2 == 0) { local_10 = 0; local_8 = 6; } else { iVar1 = dataview_is_oob(lVar2); if (iVar1 == 0) { lVar2 = *(long *)(lVar2 + 0x30); if (*(int *)(lVar2 + 0x28) == 0) { auVar3 = js_uint32(*(int4 *)(lVar2 + 0x24)); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; } else { auVar3 = js_uint32(**(int **)(*(long *)(lVar2 + 0x18) + 0x30) - *(int *)(lVar2 + 0x20)); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; } } else { auVar3 = JS_ThrowTypeErrorArrayBufferOOB(param_1); local_8 = auVar3._8_8_; local_10 = auVar3._0_4_; uStack_c = auVar3._4_4_; } } auVar3._4_4_ = uStack_c; auVar3._0_4_ = local_10; auVar3._8_8_ = local_8; return auVar3; }
30,916
js_dataview_get_byteLength
bluesky950520[P]quickjs/quickjs.c
static JSValue js_dataview_get_byteLength(JSContext *ctx, JSValue this_val) { JSArrayBuffer *abuf; JSTypedArray *ta; JSObject *p; p = get_dataview(ctx, this_val); if (!p) return JS_EXCEPTION; if (dataview_is_oob(p)) return JS_ThrowTypeErrorArrayBufferOOB(ctx); ta = p->u.typed_array; if (ta->track_rab) { abuf = ta->buffer->u.array_buffer; return js_uint32(abuf->byte_length - ta->offset); } return js_uint32(ta->length); }
O1
c
js_dataview_get_byteLength: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %r14 movq %rsi, 0x8(%rsp) cmpl $-0x1, %edx jne 0x83964 movq 0x8(%rsp), %r15 cmpw $0x21, 0x6(%r15) je 0x83978 leaq 0x1edde(%rip), %rsi # 0xa2749 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x22567 movl $0x6, %ebx testq %r15, %r15 je 0x839a4 movq %r15, %rdi callq 0x83fb1 testl %eax, %eax je 0x839ab leaq 0x1ea8d(%rip), %rsi # 0xa2422 xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x22567 jmp 0x839a7 xorl %r15d, %r15d xorl %ecx, %ecx jmp 0x83a0c movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000 movq 0x30(%r15), %rax cmpl $0x0, 0x28(%rax) je 0x839e7 movq 0x18(%rax), %rdx movq 0x30(%rdx), %rdx movl (%rdx), %edx xorl %esi, %esi subl 0x20(%rax), %edx cvtsi2sd %rdx, %xmm0 movq %xmm0, %r15 cmovnsq %rdx, %r15 movl $0x7, %ebx cmovnsq %rsi, %rbx jmp 0x83a09 movslq 0x24(%rax), %rax xorl %edx, %edx movl %eax, %esi cvtsi2sd %rsi, %xmm0 testq %rax, %rax movq %xmm0, %r15 cmovnsq %rax, %r15 movl $0x7, %ebx cmovnsq %rdx, %rbx andq %r15, %rcx movl %r15d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
js_dataview_get_byteLength: push r15 push r14 push rbx sub rsp, 10h mov r14, rdi mov [rsp+28h+var_20], rsi cmp edx, 0FFFFFFFFh jnz short loc_83964 mov r15, [rsp+28h+var_20] cmp word ptr [r15+6], 21h ; '!' jz short loc_83978 loc_83964: lea rsi, aNotADataview; "not a DataView" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError loc_83978: mov ebx, 6 test r15, r15 jz short loc_839A4 mov rdi, r15 call dataview_is_oob test eax, eax jz short loc_839AB lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowTypeError jmp short loc_839A7 loc_839A4: xor r15d, r15d loc_839A7: xor ecx, ecx jmp short loc_83A0C loc_839AB: mov rcx, 7FFFFFFF00000000h mov rax, [r15+30h] cmp dword ptr [rax+28h], 0 jz short loc_839E7 mov rdx, [rax+18h] mov rdx, [rdx+30h] mov edx, [rdx] xor esi, esi sub edx, [rax+20h] cvtsi2sd xmm0, rdx movq r15, xmm0 cmovns r15, rdx mov ebx, 7 cmovns rbx, rsi jmp short loc_83A09 loc_839E7: movsxd rax, dword ptr [rax+24h] xor edx, edx mov esi, eax cvtsi2sd xmm0, rsi test rax, rax movq r15, xmm0 cmovns r15, rax mov ebx, 7 cmovns rbx, rdx loc_83A09: and rcx, r15 loc_83A0C: mov eax, r15d or rax, rcx mov rdx, rbx add rsp, 10h pop rbx pop r14 pop r15 retn
long long js_dataview_get_byteLength( 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; // r15 long long v15; // rdx long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 double v21; // r15 long long v22; // rcx long long v23; // rax int v24; // edx long long v25; // rax char v27; // [rsp+0h] [rbp-28h] if ( (_DWORD)a3 != -1 || (v14 = a2, *(_WORD *)(a2 + 6) != 33) ) { v14 = 0LL; JS_ThrowTypeError(a1, (long long)"not a DataView", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v27); } if ( !v14 ) { LODWORD(v21) = 0; goto LABEL_8; } if ( (unsigned int)dataview_is_oob(v14) ) { LODWORD(v21) = 0; JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached or resized", v15, v16, v17, v18, a7, a8, a9, a10, v19, v20, a13, a14, v27); LABEL_8: v22 = 0LL; return v22 | LODWORD(v21); } v23 = *(_QWORD *)(v14 + 48); if ( *(_DWORD *)(v23 + 40) ) { v24 = **(_DWORD **)(*(_QWORD *)(v23 + 24) + 48LL) - *(_DWORD *)(v23 + 32); v21 = (double)v24; if ( v24 >= 0 ) *(_QWORD *)&v21 = (unsigned int)v24; } else { v25 = *(int *)(v23 + 36); v21 = (double)(int)v25; if ( v25 >= 0 ) v21 = *(double *)&v25; } v22 = *(_QWORD *)&v21 & 0x7FFFFFFF00000000LL; return v22 | LODWORD(v21); }
js_dataview_get_byteLength: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RDI MOV qword ptr [RSP + 0x8],RSI CMP EDX,-0x1 JNZ 0x00183964 MOV R15,qword ptr [RSP + 0x8] CMP word ptr [R15 + 0x6],0x21 JZ 0x00183978 LAB_00183964: LEA RSI,[0x1a2749] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x00122567 LAB_00183978: MOV EBX,0x6 TEST R15,R15 JZ 0x001839a4 MOV RDI,R15 CALL 0x00183fb1 TEST EAX,EAX JZ 0x001839ab LEA RSI,[0x1a2422] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x00122567 JMP 0x001839a7 LAB_001839a4: XOR R15D,R15D LAB_001839a7: XOR ECX,ECX JMP 0x00183a0c LAB_001839ab: MOV RCX,0x7fffffff00000000 MOV RAX,qword ptr [R15 + 0x30] CMP dword ptr [RAX + 0x28],0x0 JZ 0x001839e7 MOV RDX,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RDX + 0x30] MOV EDX,dword ptr [RDX] XOR ESI,ESI SUB EDX,dword ptr [RAX + 0x20] CVTSI2SD XMM0,RDX MOVQ R15,XMM0 CMOVNS R15,RDX MOV EBX,0x7 CMOVNS RBX,RSI JMP 0x00183a09 LAB_001839e7: MOVSXD RAX,dword ptr [RAX + 0x24] XOR EDX,EDX MOV ESI,EAX CVTSI2SD XMM0,RSI TEST RAX,RAX MOVQ R15,XMM0 CMOVNS R15,RAX MOV EBX,0x7 CMOVNS RBX,RDX LAB_00183a09: AND RCX,R15 LAB_00183a0c: MOV EAX,R15D OR RAX,RCX MOV RDX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
int1 [16] js_dataview_get_byteLength(int8 param_1,long param_2,int param_3) { long lVar1; int iVar2; double dVar3; ulong uVar4; uint uVar5; int8 uVar6; double dVar7; int1 auVar8 [16]; if ((param_3 != -1) || (*(short *)(param_2 + 6) != 0x21)) { param_2 = 0; JS_ThrowTypeError(param_1,"not a DataView"); } uVar6 = 6; if (param_2 != 0) { iVar2 = dataview_is_oob(param_2); if (iVar2 == 0) { lVar1 = *(long *)(param_2 + 0x30); if (*(int *)(lVar1 + 0x28) == 0) { uVar5 = *(uint *)(lVar1 + 0x24); dVar3 = (double)(long)(int)uVar5; dVar7 = (double)uVar5; if (-1 < (long)dVar3) { dVar7 = dVar3; } uVar6 = 7; if (-1 < (long)dVar3) { uVar6 = 0; } } else { uVar5 = **(int **)(*(long *)(lVar1 + 0x18) + 0x30) - *(int *)(lVar1 + 0x20); dVar7 = (double)uVar5; if (-1 < (int)uVar5) { dVar7 = (double)(ulong)uVar5; } uVar6 = 7; if (-1 < (int)uVar5) { uVar6 = 0; } } uVar4 = (ulong)dVar7 & 0x7fffffff00000000; goto LAB_00183a0c; } JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized"); } dVar7 = 0.0; uVar4 = 0; LAB_00183a0c: auVar8._0_8_ = (ulong)dVar7 & 0xffffffff | uVar4; auVar8._8_8_ = uVar6; return auVar8; }
30,917
ma_insert
eloqsql/storage/maria/ma_write.c
int _ma_insert(register MARIA_HA *info, MARIA_KEY *key, MARIA_PAGE *anc_page, uchar *key_pos, uchar *key_buff, MARIA_PAGE *father_page, uchar *father_key_pos, my_bool insert_last) { uint a_length, nod_flag, org_anc_length; int t_length; uchar *endpos, *prev_key, *anc_buff; MARIA_KEY_PARAM s_temp; MARIA_SHARE *share= info->s; MARIA_KEYDEF *keyinfo= key->keyinfo; DBUG_ENTER("_ma_insert"); DBUG_PRINT("enter",("key_pos:%p", key_pos)); DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, key);); /* Note that anc_page->size can be bigger then block_size in case of delete key that caused increase of page length */ org_anc_length= a_length= anc_page->size; nod_flag= anc_page->node; anc_buff= anc_page->buff; endpos= anc_buff+ a_length; prev_key= (key_pos == anc_buff + share->keypage_header + nod_flag ? (uchar*) 0 : key_buff); t_length= (*keyinfo->pack_key)(key, nod_flag, (key_pos == endpos ? (uchar*) 0 : key_pos), prev_key, prev_key, &s_temp); #ifndef DBUG_OFF if (prev_key && (keyinfo->flag & (HA_BINARY_PACK_KEY | HA_PACK_KEY))) { DBUG_DUMP("prev_key", prev_key, _ma_keylength(keyinfo,prev_key)); } if (keyinfo->flag & HA_PACK_KEY) { DBUG_PRINT("test",("t_length: %d ref_len: %d", t_length,s_temp.ref_length)); DBUG_PRINT("test",("n_ref_len: %d n_length: %d key_pos: %p", s_temp.n_ref_length, s_temp.n_length, s_temp.key)); } #endif if (t_length > 0) { if (t_length >= keyinfo->maxlength*2+MARIA_INDEX_OVERHEAD_SIZE) { _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(-1); } bmove_upp(endpos+t_length, endpos, (uint) (endpos-key_pos)); } else { if (-t_length >= keyinfo->maxlength*2+MARIA_INDEX_OVERHEAD_SIZE) { _ma_set_fatal_error(info, HA_ERR_CRASHED); DBUG_RETURN(-1); } bmove(key_pos,key_pos-t_length,(uint) (endpos-key_pos)+t_length); } (*keyinfo->store_key)(keyinfo,key_pos,&s_temp); a_length+=t_length; if (key->flag & (SEARCH_USER_KEY_HAS_TRANSID | SEARCH_PAGE_KEY_HAS_TRANSID)) _ma_mark_page_with_transid(share, anc_page); anc_page->size= a_length; page_store_size(share, anc_page); /* Check if the new key fits totally into the the page (anc_buff is big enough to contain a full page + one key) */ if (a_length <= share->max_index_block_size) { if (share->max_index_block_size - a_length < 32 && (keyinfo->flag & HA_FULLTEXT) && key_pos == endpos && share->base.key_reflength <= share->rec_reflength && share->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) { /* Normal word. One-level tree. Page is almost full. Let's consider converting. We'll compare 'key' and the first key at anc_buff */ const uchar *a= key->data; const uchar *b= anc_buff + share->keypage_header + nod_flag; uint alen, blen, ft2len= share->ft2_keyinfo.keylength; /* the very first key on the page is always unpacked */ DBUG_ASSERT((*b & 128) == 0); #if HA_FT_MAXLEN >= 127 blen= mi_uint2korr(b); b+=2; When you enable this code, as part of the MyISAM->Maria merge of ChangeSet@1.2562, 2008-04-09 07:41:40+02:00, serg@janus.mylan +9 -0 restore ft2 functionality, fix bugs. Then this will enable two-level fulltext index, which is not totally recoverable yet. So remove this text and inform Guilhem so that he fixes the issue. #else blen= *b++; #endif get_key_length(alen,a); DBUG_ASSERT(info->ft1_to_ft2==0); if (alen == blen && ha_compare_text(keyinfo->seg->charset, a, alen, b, blen, 0) == 0) { /* Yup. converting */ info->ft1_to_ft2=(DYNAMIC_ARRAY *) my_malloc(PSI_INSTRUMENT_ME, sizeof(DYNAMIC_ARRAY), MYF(MY_WME)); my_init_dynamic_array(PSI_INSTRUMENT_ME, info->ft1_to_ft2, ft2len, 300, 50, MYF(0)); /* Now, adding all keys from the page to dynarray if the page is a leaf (if not keys will be deleted later) */ if (!nod_flag) { /* Let's leave the first key on the page, though, because we cannot easily dispatch an empty page here */ b+=blen+ft2len+2; for (a=anc_buff+a_length ; b < a ; b+=ft2len+2) insert_dynamic(info->ft1_to_ft2, b); /* fixing the page's length - it contains only one key now */ anc_page->size= share->keypage_header + blen + ft2len + 2; page_store_size(share, anc_page); } /* the rest will be done when we're back from recursion */ } } else { if (share->now_transactional && _ma_log_add(anc_page, org_anc_length, key_pos, s_temp.changed_length, t_length, 1, KEY_OP_DEBUG_LOG_ADD_1)) DBUG_RETURN(-1); } DBUG_RETURN(0); /* There is room on page */ } /* Page is full */ if (nod_flag) insert_last=0; /* TODO: Remove 'born_transactional' here. The only reason for having it here is that the current _ma_balance_page_ can't handle variable length keys. */ if (!(keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && father_page && !insert_last && !info->quick_mode && !info->s->base.born_transactional) { s_temp.key_pos= key_pos; page_mark_changed(info, father_page); DBUG_RETURN(_ma_balance_page(info, keyinfo, key, anc_page, father_page, father_key_pos, &s_temp)); } DBUG_RETURN(_ma_split_page(info, key, anc_page, MY_MIN(org_anc_length, info->s->max_index_block_size), key_pos, s_temp.changed_length, t_length, key_buff, insert_last)); }
O3
c
ma_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %r9, -0x58(%rbp) movq %rcx, %r12 movq %rdx, %rbx movq %rsi, %r10 movq %rdi, -0x30(%rbp) movq (%rdi), %rax movl 0x20(%rdx), %edx movl 0x28(%rbx), %esi movq 0x10(%rbx), %rcx movq %rdx, -0x48(%rbp) leaq (%rcx,%rdx), %r13 movq %rax, -0x60(%rbp) movl 0x744(%rax), %eax movq %rcx, -0x50(%rbp) addq %rsi, %rcx addq %rcx, %rax xorl %edx, %edx cmpq %r12, %rax movq %r8, -0x68(%rbp) movq %r8, %rcx cmoveq %rdx, %rcx cmpq %r12, %r13 cmovneq %r12, %rdx movq 0x8(%r10), %r14 leaq -0xb8(%rbp), %r9 movq %r10, -0x40(%rbp) movq %r10, %rdi movq %rsi, -0x38(%rbp) movq %rcx, %r8 callq *0xf0(%r14) movl %eax, %r15d testl %eax, %eax jle 0x56779 movzwl 0xae(%r14), %eax leal 0x15(,%rax,2), %eax cmpl %eax, %r15d jae 0x568ba movl %r15d, %edi addq %r13, %rdi movl %r13d, %edx subl %r12d, %edx movq %r13, %rsi callq 0xaac70 jmp 0x567af movl %r15d, %eax negl %eax movzwl 0xae(%r14), %ecx leal 0x15(,%rcx,2), %ecx cmpl %eax, %ecx jbe 0x568ba movslq %r15d, %rax movq %r12, %rsi subq %rax, %rsi movl %r13d, %edx subl %r12d, %edx addl %r15d, %edx movq %r12, %rdi callq 0x29110 leaq -0xb8(%rbp), %rdx movq %r14, %rdi movq %r12, %rsi callq *0xf8(%r14) movq -0x48(%rbp), %rsi leal (%r15,%rsi), %edx movq -0x40(%rbp), %r10 testb $0x18, 0x1a(%r10) movq -0x60(%rbp), %rdi je 0x567f9 movl 0x2c(%rbx), %eax orl $0x2, %eax movl %eax, 0x2c(%rbx) movq 0x10(%rbx), %rcx movl %edx, %r8d movl 0x744(%rdi), %edx addl $-0x3, %edx movb %al, (%rcx,%rdx) movl %r8d, %edx movl %edx, 0x20(%rbx) movq 0x10(%rbx), %rax movl 0x744(%rdi), %ecx movb %dl, -0x1(%rax,%rcx) movq 0x10(%rbx), %rax movl 0x744(%rdi), %ecx movb %dh, -0x2(%rax,%rcx) movl 0x7c0(%rdi), %eax subl %edx, %eax jae 0x568d2 xorl %ecx, %ecx cmpq $0x0, -0x38(%rbp) movzbl 0x18(%rbp), %eax cmovnel %ecx, %eax testb %al, %al jne 0x5696d cmpq $0x0, -0x58(%rbp) je 0x5696d movzwl 0xa2(%r14), %ecx andl $0x28, %ecx jne 0x5696d movq -0x30(%rbp), %rdi cmpb $0x0, 0x682(%rdi) movq (%rdi), %rcx jne 0x56974 cmpb $0x0, 0x44c(%rcx) jne 0x56974 movq 0x10(%rbp), %r9 movq %r12, -0xa0(%rbp) movq 0x2e8(%rdi), %rax movq -0x58(%rbp), %r8 movl 0x30(%r8), %ecx leaq (%rcx,%rcx,2), %rcx movb $0x1, 0x10(%rax,%rcx,8) leaq -0xb8(%rbp), %rax movq %rax, (%rsp) movq %r14, %rsi movq %r10, %rdx movq %rbx, %rcx callq 0x56ac4 jmp 0x569a5 movq -0x30(%rbp), %rdi movl $0x7e, %esi callq 0x3fcb8 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x569a5 cmpl $0x1f, %eax ja 0x56937 cmpq %r12, %r13 jne 0x56937 movzwl 0xa2(%r14), %eax andl $0x80, %eax je 0x56937 movl 0x3e4(%rdi), %eax cmpl 0x740(%rdi), %eax ja 0x56937 testb $0x5, 0x720(%rdi) je 0x56937 movl %edx, -0x48(%rbp) movq (%r10), %rsi movl 0x744(%rdi), %eax addq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx movzbl (%rcx,%rax), %ecx movq %rcx, -0x40(%rbp) movzbl (%rsi), %edx cmpl $0xff, %edx je 0x569b7 movl $0x1, %ecx jmp 0x569c7 cmpb $0x0, 0x7e7(%rdi) je 0x56969 movl -0x78(%rbp), %ecx movl $0x6, (%rsp) movq %rbx, %rdi movq %r12, %rdx movl %r15d, %r8d movl $0x1, %r9d callq 0x40396 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl jne 0x569a5 xorl %eax, %eax jmp 0x569a5 movq -0x30(%rbp), %rdi movq (%rdi), %rcx movl 0x7c0(%rcx), %ecx cmpl %ecx, %esi cmovbl %esi, %ecx movl -0x78(%rbp), %r9d movsbl %al, %eax movl %eax, 0x10(%rsp) movq -0x68(%rbp), %rax movq %rax, 0x8(%rsp) movl %r15d, (%rsp) movq %r10, %rsi movq %rbx, %rdx movq %r12, %r8 callq 0x57785 addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movzwl 0x1(%rsi), %ecx rolw $0x8, %cx movzwl %cx, %edx movl $0x3, %ecx movq -0x30(%rbp), %r13 movq -0x40(%rbp), %r15 cmpl %r15d, %edx jne 0x56969 movzwl 0x502(%rdi), %edx movq %rdx, -0x30(%rbp) movq -0x38(%rbp), %rdx leaq (%rdx,%rax), %r12 incq %r12 addq %rcx, %rsi movq 0xc0(%r14), %rax movq (%rax), %rdi movl %r15d, %edx movq %r12, %rcx movq %r15, %r8 xorl %r9d, %r9d callq 0x9e804 testl %eax, %eax jne 0x56969 movl $0x28, %esi movl $0x10, %edx xorl %edi, %edi callq 0x9fdb5 movq %rax, 0x320(%r13) movq $0x0, (%rsp) xorl %edi, %edi movq %rax, %rsi movq -0x30(%rbp), %rdx xorl %ecx, %ecx movl $0x12c, %r8d # imm = 0x12C movl $0x32, %r9d callq 0x91988 cmpq $0x0, -0x38(%rbp) jne 0x56969 movq -0x30(%rbp), %rcx movl %ecx, %eax addl %r15d, %eax leaq (%r12,%rax), %r14 addq $0x2, %r14 movl -0x48(%rbp), %eax movq -0x50(%rbp), %r12 addq %rax, %r12 leaq 0x2(%rcx), %r15 cmpq %r12, %r14 jae 0x56a8f movq 0x320(%r13), %rdi movq %r14, %rsi callq 0x91a26 addq %r15, %r14 jmp 0x56a76 movq -0x40(%rbp), %rax addl %r15d, %eax movq -0x60(%rbp), %rdx addl 0x744(%rdx), %eax movl %eax, 0x20(%rbx) movq 0x10(%rbx), %rsi movl 0x744(%rdx), %ecx movb %al, -0x1(%rsi,%rcx) movq 0x10(%rbx), %rsi movl 0x744(%rdx), %ecx movb %ah, -0x2(%rsi,%rcx) jmp 0x56969
_ma_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov [rbp+var_58], r9 mov r12, rcx mov rbx, rdx mov r10, rsi mov [rbp+var_30], rdi mov rax, [rdi] mov edx, [rdx+20h] mov esi, [rbx+28h] mov rcx, [rbx+10h] mov [rbp+var_48], rdx lea r13, [rcx+rdx] mov [rbp+var_60], rax mov eax, [rax+744h] mov [rbp+var_50], rcx add rcx, rsi add rax, rcx xor edx, edx cmp rax, r12 mov [rbp+var_68], r8 mov rcx, r8 cmovz rcx, rdx cmp r13, r12 cmovnz rdx, r12 mov r14, [r10+8] lea r9, [rbp+var_B8] mov [rbp+var_40], r10 mov rdi, r10 mov [rbp+var_38], rsi mov r8, rcx call qword ptr [r14+0F0h] mov r15d, eax test eax, eax jle short loc_56779 movzx eax, word ptr [r14+0AEh] lea eax, ds:15h[rax*2] cmp r15d, eax jnb loc_568BA mov edi, r15d add rdi, r13 mov edx, r13d sub edx, r12d mov rsi, r13 call bmove_upp jmp short loc_567AF loc_56779: mov eax, r15d neg eax movzx ecx, word ptr [r14+0AEh] lea ecx, ds:15h[rcx*2] cmp ecx, eax jbe loc_568BA movsxd rax, r15d mov rsi, r12 sub rsi, rax mov edx, r13d sub edx, r12d add edx, r15d mov rdi, r12 call _memmove loc_567AF: lea rdx, [rbp+var_B8] mov rdi, r14 mov rsi, r12 call qword ptr [r14+0F8h] mov rsi, [rbp+var_48] lea edx, [r15+rsi] mov r10, [rbp+var_40] test byte ptr [r10+1Ah], 18h mov rdi, [rbp+var_60] jz short loc_567F9 mov eax, [rbx+2Ch] or eax, 2 mov [rbx+2Ch], eax mov rcx, [rbx+10h] mov r8d, edx mov edx, [rdi+744h] add edx, 0FFFFFFFDh mov [rcx+rdx], al mov edx, r8d loc_567F9: mov [rbx+20h], edx mov rax, [rbx+10h] mov ecx, [rdi+744h] mov [rax+rcx-1], dl mov rax, [rbx+10h] mov ecx, [rdi+744h] mov [rax+rcx-2], dh mov eax, [rdi+7C0h] sub eax, edx jnb loc_568D2 xor ecx, ecx cmp [rbp+var_38], 0 movzx eax, [rbp+arg_8] cmovnz eax, ecx test al, al jnz loc_5696D cmp [rbp+var_58], 0 jz loc_5696D movzx ecx, word ptr [r14+0A2h] and ecx, 28h jnz loc_5696D mov rdi, [rbp+var_30] cmp byte ptr [rdi+682h], 0 mov rcx, [rdi] jnz loc_56974 cmp byte ptr [rcx+44Ch], 0 jnz loc_56974 mov r9, [rbp+arg_0] mov [rbp+var_A0], r12 mov rax, [rdi+2E8h] mov r8, [rbp+var_58] mov ecx, [r8+30h] lea rcx, [rcx+rcx*2] mov byte ptr [rax+rcx*8+10h], 1 lea rax, [rbp+var_B8] mov [rsp+0D0h+var_D0], rax mov rsi, r14 mov rdx, r10 mov rcx, rbx call _ma_balance_page jmp loc_569A5 loc_568BA: mov rdi, [rbp+var_30] mov esi, 7Eh ; '~' call _ma_set_fatal_error mov eax, 0FFFFFFFFh jmp loc_569A5 loc_568D2: cmp eax, 1Fh ja short loc_56937 cmp r13, r12 jnz short loc_56937 movzx eax, word ptr [r14+0A2h] and eax, 80h jz short loc_56937 mov eax, [rdi+3E4h] cmp eax, [rdi+740h] ja short loc_56937 test byte ptr [rdi+720h], 5 jz short loc_56937 mov dword ptr [rbp+var_48], edx mov rsi, [r10] mov eax, [rdi+744h] add rax, [rbp+var_50] mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+rax] mov [rbp+var_40], rcx movzx edx, byte ptr [rsi] cmp edx, 0FFh jz loc_569B7 mov ecx, 1 jmp loc_569C7 loc_56937: cmp byte ptr [rdi+7E7h], 0 jz short loc_56969 mov ecx, [rbp+var_78] mov dword ptr [rsp+0D0h+var_D0], 6 mov rdi, rbx mov rdx, r12 mov r8d, r15d mov r9d, 1 call _ma_log_add mov ecx, eax mov eax, 0FFFFFFFFh test cl, cl jnz short loc_569A5 loc_56969: xor eax, eax jmp short loc_569A5 loc_5696D: mov rdi, [rbp+var_30] mov rcx, [rdi] loc_56974: mov ecx, [rcx+7C0h] cmp esi, ecx cmovb ecx, esi mov r9d, [rbp+var_78] movsx eax, al mov [rsp+0D0h+var_C0], eax mov rax, [rbp+var_68] mov [rsp+0D0h+var_C8], rax mov dword ptr [rsp+0D0h+var_D0], r15d mov rsi, r10 mov rdx, rbx mov r8, r12 call _ma_split_page loc_569A5: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_569B7: movzx ecx, word ptr [rsi+1] rol cx, 8 movzx edx, cx mov ecx, 3 loc_569C7: mov r13, [rbp+var_30] mov r15, [rbp+var_40] cmp edx, r15d jnz short loc_56969 movzx edx, word ptr [rdi+502h] mov [rbp+var_30], rdx mov rdx, [rbp+var_38] lea r12, [rdx+rax] inc r12 add rsi, rcx mov rax, [r14+0C0h] mov rdi, [rax] mov edx, r15d mov rcx, r12 mov r8, r15 xor r9d, r9d call ha_compare_text test eax, eax jnz loc_56969 mov esi, 28h ; '(' mov edx, 10h xor edi, edi call my_malloc mov [r13+320h], rax mov [rsp+0D0h+var_D0], 0 xor edi, edi mov rsi, rax mov rdx, [rbp+var_30] xor ecx, ecx mov r8d, 12Ch mov r9d, 32h ; '2' call init_dynamic_array2 cmp [rbp+var_38], 0 jnz loc_56969 mov rcx, [rbp+var_30] mov eax, ecx add eax, r15d lea r14, [r12+rax] add r14, 2 mov eax, dword ptr [rbp+var_48] mov r12, [rbp+var_50] add r12, rax lea r15, [rcx+2] loc_56A76: cmp r14, r12 jnb short loc_56A8F mov rdi, [r13+320h] mov rsi, r14 call insert_dynamic add r14, r15 jmp short loc_56A76 loc_56A8F: mov rax, [rbp+var_40] add eax, r15d mov rdx, [rbp+var_60] add eax, [rdx+744h] mov [rbx+20h], eax mov rsi, [rbx+10h] mov ecx, [rdx+744h] mov [rsi+rcx-1], al mov rsi, [rbx+10h] mov ecx, [rdx+744h] mov [rsi+rcx-2], ah jmp loc_56969
long long ma_insert( _DWORD *a1, unsigned __int8 **a2, long long a3, long long a4, long long a5, long long a6, long long a7, char a8) { long long v11; // rax long long v12; // rsi long long v13; // rcx long long v14; // r13 long long v15; // rax long long v16; // rax long long v17; // rdx long long v18; // rcx unsigned __int8 *v19; // r14 long long v20; // rdx long long v21; // rcx long long v22; // r8 int v23; // r9d int v24; // r15d long long v25; // rsi unsigned int v26; // edx unsigned __int8 **v27; // r10 long long v28; // rdi int v29; // eax unsigned int v30; // eax bool v31; // cf unsigned int v32; // eax int v34; // edi long long v35; // rcx int v36; // r8d long long result; // rax unsigned __int8 *v38; // rsi long long v39; // rax int v40; // edx long long v41; // rcx char v42; // cl unsigned int v43; // ecx _DWORD *v44; // r13 int v45; // r15d long long v46; // r12 long long v47; // rax unsigned long long v48; // r14 unsigned long long v49; // r12 char *v50; // r15 long long v51; // rdx int v52; // eax _BYTE v53[24]; // [rsp+18h] [rbp-B8h] BYREF long long v54; // [rsp+30h] [rbp-A0h] unsigned int v55; // [rsp+58h] [rbp-78h] long long v56; // [rsp+68h] [rbp-68h] long long v57; // [rsp+70h] [rbp-60h] long long v58; // [rsp+78h] [rbp-58h] long long v59; // [rsp+80h] [rbp-50h] long long v60; // [rsp+88h] [rbp-48h] unsigned __int8 **v61; // [rsp+90h] [rbp-40h] long long v62; // [rsp+98h] [rbp-38h] _DWORD *v63; // [rsp+A0h] [rbp-30h] v58 = a6; v63 = a1; v11 = *(_QWORD *)a1; v12 = *(unsigned int *)(a3 + 40); v13 = *(_QWORD *)(a3 + 16); v60 = *(unsigned int *)(a3 + 32); v14 = v13 + v60; v57 = v11; v15 = *(unsigned int *)(v11 + 1860); v59 = v13; v16 = v12 + v13 + v15; v17 = 0LL; v56 = a5; v18 = a5; if ( v16 == a4 ) v18 = 0LL; if ( v14 != a4 ) v17 = a4; v19 = a2[1]; v61 = a2; v62 = v12; v24 = (*((long long ( **)(unsigned __int8 **, long long, long long, long long, long long, _BYTE *))v19 + 30))( a2, v12, v17, v18, v18, v53); if ( v24 > 0 ) { if ( v24 < 2 * (unsigned int)*((unsigned __int16 *)v19 + 87) + 21 ) { bmove_upp(v14 + (unsigned int)v24, v14, (unsigned int)(v14 - a4)); goto LABEL_10; } LABEL_21: ma_set_fatal_error(v63, 126, v20, v21, v22, v23); return 0xFFFFFFFFLL; } v21 = 2 * (unsigned int)*((unsigned __int16 *)v19 + 87) + 21; if ( (unsigned int)v21 <= -v24 ) goto LABEL_21; memmove(a4, a4 - v24, (unsigned int)(v24 + v14 - a4)); LABEL_10: (*((void ( **)(unsigned __int8 *, long long, _BYTE *))v19 + 31))(v19, a4, v53); v25 = v60; v26 = v24 + v60; v27 = v61; v28 = v57; if ( (*((_BYTE *)v61 + 26) & 0x18) != 0 ) { v29 = *(_DWORD *)(a3 + 44) | 2; *(_DWORD *)(a3 + 44) = v29; *(_BYTE *)(*(_QWORD *)(a3 + 16) + (unsigned int)(*(_DWORD *)(v28 + 1860) - 3)) = v29; } *(_DWORD *)(a3 + 32) = v26; *(_BYTE *)(*(_QWORD *)(a3 + 16) + *(unsigned int *)(v28 + 1860) - 1LL) = v26; *(_BYTE *)(*(_QWORD *)(a3 + 16) + *(unsigned int *)(v28 + 1860) - 2LL) = BYTE1(v26); v30 = *(_DWORD *)(v28 + 1984); v31 = v30 < v26; v32 = v30 - v26; if ( !v31 ) { if ( v32 <= 0x1F && v14 == a4 && (*((_WORD *)v19 + 81) & 0x80) != 0 && *(_DWORD *)(v28 + 996) <= *(_DWORD *)(v28 + 1856) && (*(_BYTE *)(v28 + 1824) & 5) != 0 ) { LODWORD(v60) = v26; v38 = *v27; v39 = v59 + *(unsigned int *)(v28 + 1860); v61 = (unsigned __int8 **)*(unsigned __int8 *)(v62 + v39); v40 = *v38; if ( v40 == 255 ) { v40 = (unsigned __int16)__ROL2__(*(_WORD *)(v38 + 1), 8); v41 = 3LL; } else { v41 = 1LL; } v44 = v63; v45 = (int)v61; if ( v40 == (_DWORD)v61 ) { v63 = (_DWORD *)*(unsigned __int16 *)(v28 + 1282); v46 = v62 + v39 + 1; if ( !(unsigned int)ha_compare_text(**((_QWORD **)v19 + 24), &v38[v41], (unsigned int)v61, v46, v61, 0LL) ) { v47 = my_malloc(0LL, 40LL, 16LL); *((_QWORD *)v44 + 100) = v47; init_dynamic_array2(0, v47, (_DWORD)v63, 0, 300, 50, 0LL); if ( !v62 ) { v48 = v46 + (unsigned int)(v45 + (_DWORD)v63) + 2; v49 = (unsigned int)v60 + v59; v50 = (char *)v63 + 2; while ( v48 < v49 ) { insert_dynamic(*((_QWORD *)v44 + 100), v48); v48 += (unsigned long long)v50; } v51 = v57; v52 = *(_DWORD *)(v57 + 1860) + (_DWORD)v50 + (_DWORD)v61; *(_DWORD *)(a3 + 32) = v52; *(_BYTE *)(*(_QWORD *)(a3 + 16) + *(unsigned int *)(v51 + 1860) - 1LL) = v52; *(_BYTE *)(*(_QWORD *)(a3 + 16) + *(unsigned int *)(v51 + 1860) - 2LL) = BYTE1(v52); } } } } else if ( *(_BYTE *)(v28 + 2023) ) { v42 = ma_log_add(a3, v25, a4, v55, v24); result = 0xFFFFFFFFLL; if ( v42 ) return result; } return 0LL; } if ( v62 ) a8 = 0; if ( a8 || !v58 || (*((_WORD *)v19 + 81) & 0x28) != 0 ) { v34 = (int)v63; v35 = *(_QWORD *)v63; } else { v34 = (int)v63; v35 = *(_QWORD *)v63; if ( !*((_BYTE *)v63 + 1666) && !*(_BYTE *)(v35 + 1100) ) { v54 = a4; v36 = v58; *(_BYTE *)(*((_QWORD *)v63 + 93) + 24LL * *(unsigned int *)(v58 + 48) + 16) = 1; return ma_balance_page(v34, (_DWORD)v19, (_DWORD)v27, a3, v36, a7, (long long)v53); } } v43 = *(_DWORD *)(v35 + 1984); if ( (unsigned int)v25 < v43 ) v43 = v25; return ma_split_page(v34, (_DWORD)v27, a3, v43, a4, v55, v24, v56, a8); }
_ma_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV qword ptr [RBP + -0x58],R9 MOV R12,RCX MOV RBX,RDX MOV R10,RSI MOV qword ptr [RBP + -0x30],RDI MOV RAX,qword ptr [RDI] MOV EDX,dword ptr [RDX + 0x20] MOV ESI,dword ptr [RBX + 0x28] MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RBP + -0x48],RDX LEA R13,[RCX + RDX*0x1] MOV qword ptr [RBP + -0x60],RAX MOV EAX,dword ptr [RAX + 0x744] MOV qword ptr [RBP + -0x50],RCX ADD RCX,RSI ADD RAX,RCX XOR EDX,EDX CMP RAX,R12 MOV qword ptr [RBP + -0x68],R8 MOV RCX,R8 CMOVZ RCX,RDX CMP R13,R12 CMOVNZ RDX,R12 MOV R14,qword ptr [R10 + 0x8] LEA R9,[RBP + -0xb8] MOV qword ptr [RBP + -0x40],R10 MOV RDI,R10 MOV qword ptr [RBP + -0x38],RSI MOV R8,RCX CALL qword ptr [R14 + 0xf0] MOV R15D,EAX TEST EAX,EAX JLE 0x00156779 MOVZX EAX,word ptr [R14 + 0xae] LEA EAX,[0x15 + RAX*0x2] CMP R15D,EAX JNC 0x001568ba MOV EDI,R15D ADD RDI,R13 MOV EDX,R13D SUB EDX,R12D MOV RSI,R13 CALL 0x001aac70 JMP 0x001567af LAB_00156779: MOV EAX,R15D NEG EAX MOVZX ECX,word ptr [R14 + 0xae] LEA ECX,[0x15 + RCX*0x2] CMP ECX,EAX JBE 0x001568ba MOVSXD RAX,R15D MOV RSI,R12 SUB RSI,RAX MOV EDX,R13D SUB EDX,R12D ADD EDX,R15D MOV RDI,R12 CALL 0x00129110 LAB_001567af: LEA RDX,[RBP + -0xb8] MOV RDI,R14 MOV RSI,R12 CALL qword ptr [R14 + 0xf8] MOV RSI,qword ptr [RBP + -0x48] LEA EDX,[R15 + RSI*0x1] MOV R10,qword ptr [RBP + -0x40] TEST byte ptr [R10 + 0x1a],0x18 MOV RDI,qword ptr [RBP + -0x60] JZ 0x001567f9 MOV EAX,dword ptr [RBX + 0x2c] OR EAX,0x2 MOV dword ptr [RBX + 0x2c],EAX MOV RCX,qword ptr [RBX + 0x10] MOV R8D,EDX MOV EDX,dword ptr [RDI + 0x744] ADD EDX,-0x3 MOV byte ptr [RCX + RDX*0x1],AL MOV EDX,R8D LAB_001567f9: MOV dword ptr [RBX + 0x20],EDX MOV RAX,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RDI + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x1],DL MOV RAX,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RDI + 0x744] MOV byte ptr [RAX + RCX*0x1 + -0x2],DH MOV EAX,dword ptr [RDI + 0x7c0] SUB EAX,EDX JNC 0x001568d2 XOR ECX,ECX CMP qword ptr [RBP + -0x38],0x0 MOVZX EAX,byte ptr [RBP + 0x18] CMOVNZ EAX,ECX TEST AL,AL JNZ 0x0015696d CMP qword ptr [RBP + -0x58],0x0 JZ 0x0015696d MOVZX ECX,word ptr [R14 + 0xa2] AND ECX,0x28 JNZ 0x0015696d MOV RDI,qword ptr [RBP + -0x30] CMP byte ptr [RDI + 0x682],0x0 MOV RCX,qword ptr [RDI] JNZ 0x00156974 CMP byte ptr [RCX + 0x44c],0x0 JNZ 0x00156974 MOV R9,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0xa0],R12 MOV RAX,qword ptr [RDI + 0x2e8] MOV R8,qword ptr [RBP + -0x58] MOV ECX,dword ptr [R8 + 0x30] LEA RCX,[RCX + RCX*0x2] MOV byte ptr [RAX + RCX*0x8 + 0x10],0x1 LEA RAX,[RBP + -0xb8] MOV qword ptr [RSP],RAX MOV RSI,R14 MOV RDX,R10 MOV RCX,RBX CALL 0x00156ac4 JMP 0x001569a5 LAB_001568ba: MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x7e CALL 0x0013fcb8 MOV EAX,0xffffffff JMP 0x001569a5 LAB_001568d2: CMP EAX,0x1f JA 0x00156937 CMP R13,R12 JNZ 0x00156937 MOVZX EAX,word ptr [R14 + 0xa2] AND EAX,0x80 JZ 0x00156937 MOV EAX,dword ptr [RDI + 0x3e4] CMP EAX,dword ptr [RDI + 0x740] JA 0x00156937 TEST byte ptr [RDI + 0x720],0x5 JZ 0x00156937 MOV dword ptr [RBP + -0x48],EDX MOV RSI,qword ptr [R10] MOV EAX,dword ptr [RDI + 0x744] ADD RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + RAX*0x1] MOV qword ptr [RBP + -0x40],RCX MOVZX EDX,byte ptr [RSI] CMP EDX,0xff JZ 0x001569b7 MOV ECX,0x1 JMP 0x001569c7 LAB_00156937: CMP byte ptr [RDI + 0x7e7],0x0 JZ 0x00156969 MOV ECX,dword ptr [RBP + -0x78] MOV dword ptr [RSP],0x6 MOV RDI,RBX MOV RDX,R12 MOV R8D,R15D MOV R9D,0x1 CALL 0x00140396 MOV ECX,EAX MOV EAX,0xffffffff TEST CL,CL JNZ 0x001569a5 LAB_00156969: XOR EAX,EAX JMP 0x001569a5 LAB_0015696d: MOV RDI,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RDI] LAB_00156974: MOV ECX,dword ptr [RCX + 0x7c0] CMP ESI,ECX CMOVC ECX,ESI MOV R9D,dword ptr [RBP + -0x78] MOVSX EAX,AL MOV dword ptr [RSP + 0x10],EAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RSP + 0x8],RAX MOV dword ptr [RSP],R15D MOV RSI,R10 MOV RDX,RBX MOV R8,R12 CALL 0x00157785 LAB_001569a5: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001569b7: MOVZX ECX,word ptr [RSI + 0x1] ROL CX,0x8 MOVZX EDX,CX MOV ECX,0x3 LAB_001569c7: MOV R13,qword ptr [RBP + -0x30] MOV R15,qword ptr [RBP + -0x40] CMP EDX,R15D JNZ 0x00156969 MOVZX EDX,word ptr [RDI + 0x502] MOV qword ptr [RBP + -0x30],RDX MOV RDX,qword ptr [RBP + -0x38] LEA R12,[RDX + RAX*0x1] INC R12 ADD RSI,RCX MOV RAX,qword ptr [R14 + 0xc0] MOV RDI,qword ptr [RAX] MOV EDX,R15D MOV RCX,R12 MOV R8,R15 XOR R9D,R9D CALL 0x0019e804 TEST EAX,EAX JNZ 0x00156969 MOV ESI,0x28 MOV EDX,0x10 XOR EDI,EDI CALL 0x0019fdb5 MOV qword ptr [R13 + 0x320],RAX MOV qword ptr [RSP],0x0 XOR EDI,EDI MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x30] XOR ECX,ECX MOV R8D,0x12c MOV R9D,0x32 CALL 0x00191988 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00156969 MOV RCX,qword ptr [RBP + -0x30] MOV EAX,ECX ADD EAX,R15D LEA R14,[R12 + RAX*0x1] ADD R14,0x2 MOV EAX,dword ptr [RBP + -0x48] MOV R12,qword ptr [RBP + -0x50] ADD R12,RAX LEA R15,[RCX + 0x2] LAB_00156a76: CMP R14,R12 JNC 0x00156a8f MOV RDI,qword ptr [R13 + 0x320] MOV RSI,R14 CALL 0x00191a26 ADD R14,R15 JMP 0x00156a76 LAB_00156a8f: MOV RAX,qword ptr [RBP + -0x40] ADD EAX,R15D MOV RDX,qword ptr [RBP + -0x60] ADD EAX,dword ptr [RDX + 0x744] MOV dword ptr [RBX + 0x20],EAX MOV RSI,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RDX + 0x744] MOV byte ptr [RSI + RCX*0x1 + -0x1],AL MOV RSI,qword ptr [RBX + 0x10] MOV ECX,dword ptr [RDX + 0x744] MOV byte ptr [RSI + RCX*0x1 + -0x2],AH JMP 0x00156969
int8 _ma_insert(long *param_1,int8 *param_2,long param_3,void *param_4,void *param_5,long param_6, int8 param_7,char param_8) { void *pvVar1; byte bVar2; byte *pbVar3; long *plVar4; char cVar5; uint uVar6; uint uVar7; int iVar8; int8 uVar9; long lVar10; long lVar11; void *pvVar12; long lVar13; ulong uVar14; uint uVar15; void *pvVar16; ulong uVar17; int8 in_stack_ffffffffffffff28; int4 uVar18; int1 local_c0 [24]; void *local_a8; int4 local_80; void *local_70; long local_68; long local_60; long local_58; ulong local_50; int8 *local_48; ulong local_40; long *local_38; uVar18 = (int4)((ulong)in_stack_ffffffffffffff28 >> 0x20); local_68 = *param_1; local_50 = (ulong)*(uint *)(param_3 + 0x20); local_40 = (ulong)*(uint *)(param_3 + 0x28); local_58 = *(long *)(param_3 + 0x10); pvVar1 = (void *)(local_58 + local_50); pvVar12 = param_5; if ((void *)((ulong)*(uint *)(local_68 + 0x744) + local_58 + local_40) == param_4) { pvVar12 = (void *)0x0; } pvVar16 = (void *)0x0; if (pvVar1 != param_4) { pvVar16 = param_4; } lVar11 = param_2[1]; local_70 = param_5; local_60 = param_6; local_48 = param_2; local_38 = param_1; uVar6 = (**(code **)(lVar11 + 0xf0))(param_2,local_40,pvVar16,pvVar12,pvVar12,local_c0); if ((int)uVar6 < 1) { if ((uint)*(ushort *)(lVar11 + 0xae) * 2 + 0x15 <= -uVar6) goto LAB_001568ba; memmove(param_4,(void *)((long)param_4 - (long)(int)uVar6), (ulong)(((int)pvVar1 - (int)param_4) + uVar6)); } else { if ((uint)*(ushort *)(lVar11 + 0xae) * 2 + 0x15 <= uVar6) { LAB_001568ba: _ma_set_fatal_error(local_38,0x7e); return 0xffffffff; } bmove_upp((ulong)uVar6 + (long)pvVar1,pvVar1,(int)pvVar1 - (int)param_4); } (**(code **)(lVar11 + 0xf8))(lVar11,param_4,local_c0); plVar4 = local_38; uVar15 = uVar6 + (uint)local_50; if ((*(byte *)((long)local_48 + 0x1a) & 0x18) != 0) { uVar7 = *(uint *)(param_3 + 0x2c) | 2; *(uint *)(param_3 + 0x2c) = uVar7; *(char *)(*(long *)(param_3 + 0x10) + (ulong)(*(int *)(local_68 + 0x744) - 3)) = (char)uVar7; } *(uint *)(param_3 + 0x20) = uVar15; *(char *)(*(long *)(param_3 + 0x10) + -1 + (ulong)*(uint *)(local_68 + 0x744)) = (char)uVar15; *(char *)(*(long *)(param_3 + 0x10) + -2 + (ulong)*(uint *)(local_68 + 0x744)) = (char)(uVar15 >> 8); if (*(uint *)(local_68 + 0x7c0) < uVar15) { if (local_40 != 0) { param_8 = '\0'; } if (((param_8 == '\0') && (local_60 != 0)) && ((*(ushort *)(lVar11 + 0xa2) & 0x28) == 0)) { lVar10 = *local_38; if ((*(char *)((long)local_38 + 0x682) == '\0') && (*(char *)(lVar10 + 0x44c) == '\0')) { *(int1 *)(local_38[0x5d] + 0x10 + (ulong)*(uint *)(local_60 + 0x30) * 0x18) = 1; local_a8 = param_4; uVar9 = _ma_balance_page(local_38,lVar11,local_48,param_3,local_60,param_7,local_c0); return uVar9; } } else { lVar10 = *local_38; } uVar14 = (ulong)*(uint *)(lVar10 + 0x7c0); if ((uint)local_50 < *(uint *)(lVar10 + 0x7c0)) { uVar14 = local_50 & 0xffffffff; } uVar9 = _ma_split_page(local_38,local_48,param_3,uVar14,param_4,local_80,CONCAT44(uVar18,uVar6), local_70,(int)param_8); } else { if ((((*(uint *)(local_68 + 0x7c0) - uVar15 < 0x20) && (pvVar1 == param_4)) && ((*(ushort *)(lVar11 + 0xa2) & 0x80) != 0)) && ((*(uint *)(local_68 + 0x3e4) <= *(uint *)(local_68 + 0x740) && ((*(byte *)(local_68 + 0x720) & 5) != 0)))) { local_50 = CONCAT44(local_50._4_4_,uVar15); pbVar3 = (byte *)*local_48; lVar10 = (ulong)*(uint *)(local_68 + 0x744) + local_58; bVar2 = *(byte *)(local_40 + lVar10); local_48 = (int8 *)(ulong)bVar2; uVar6 = (uint)*pbVar3; if (*pbVar3 == 0xff) { uVar6 = (uint)(ushort)(*(ushort *)(pbVar3 + 1) << 8 | *(ushort *)(pbVar3 + 1) >> 8); lVar13 = 3; } else { lVar13 = 1; } if (uVar6 == bVar2) { local_38 = (long *)(ulong)*(ushort *)(local_68 + 0x502); lVar10 = local_40 + lVar10 + 1; iVar8 = ha_compare_text(**(int8 **)(lVar11 + 0xc0),pbVar3 + lVar13,local_48,lVar10, local_48,0); if (iVar8 == 0) { lVar11 = my_malloc(0,0x28,0x10); plVar4[100] = lVar11; init_dynamic_array2(0,lVar11,local_38,0,300,0x32,0); if (local_40 == 0) { uVar14 = local_58 + (local_50 & 0xffffffff); lVar11 = (long)local_38 + 2; for (uVar17 = lVar10 + (ulong)((int)local_38 + (uint)bVar2) + 2; uVar17 < uVar14; uVar17 = uVar17 + lVar11) { insert_dynamic(plVar4[100],uVar17); } iVar8 = (int)local_48 + (int)lVar11 + *(int *)(local_68 + 0x744); *(int *)(param_3 + 0x20) = iVar8; *(char *)(*(long *)(param_3 + 0x10) + -1 + (ulong)*(uint *)(local_68 + 0x744)) = (char)iVar8; *(char *)(*(long *)(param_3 + 0x10) + -2 + (ulong)*(uint *)(local_68 + 0x744)) = (char)((uint)iVar8 >> 8); } } } } else if ((*(char *)(local_68 + 0x7e7) != '\0') && (cVar5 = _ma_log_add(param_3,local_50,param_4,local_80,(ulong)uVar6,1,CONCAT44(uVar18,6) ), cVar5 != '\0')) { return 0xffffffff; } uVar9 = 0; } return uVar9; }
30,918
voxel_registry::construct(char const*, voxel_type, bool, bool)
untodesu[P]voxelius/game/shared/voxel_registry.cc
VoxelInfoBuilder &voxel_registry::construct(const char *name, voxel_type type, bool animated, bool blending) { const auto it = voxel_registry::builders.find(name); if(it != voxel_registry::builders.cend()) return it->second; return voxel_registry::builders.emplace(name, VoxelInfoBuilder(name, type, animated, blending)).first->second; }
O0
cpp
voxel_registry::construct(char const*, voxel_type, bool, bool): pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movb %cl, %al movb %dl, %cl movw %si, %dx movq %rdi, -0x10(%rbp) movw %dx, -0x12(%rbp) andb $0x1, %cl movb %cl, -0x13(%rbp) andb $0x1, %al movb %al, -0x14(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x118(%rbp) leaq -0x41(%rbp), %rdi movq %rdi, -0x110(%rbp) callq 0x2d1c0 movq -0x118(%rbp), %rsi movq -0x110(%rbp), %rdx leaq -0x40(%rbp), %rdi callq 0x329f0 jmp 0x17c3b9 leaq 0x395268(%rip), %rdi # 0x511628 leaq -0x40(%rbp), %rsi callq 0x17cd60 movq %rax, -0x120(%rbp) jmp 0x17c3d2 movq -0x120(%rbp), %rax movq %rax, -0x20(%rbp) leaq -0x40(%rbp), %rdi callq 0x2d648 leaq -0x41(%rbp), %rdi callq 0x2d620 leaq 0x395232(%rip), %rdi # 0x511628 callq 0x17cdc0 movq %rax, -0x60(%rbp) leaq -0x20(%rbp), %rdi leaq -0x60(%rbp), %rsi callq 0x17cd90 testb $0x1, %al jne 0x17c412 jmp 0x17c459 leaq -0x20(%rbp), %rdi callq 0x17cdf0 addq $0x20, %rax movq %rax, -0x8(%rbp) jmp 0x17c511 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x17c44b movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x40(%rbp), %rdi callq 0x2d648 leaq -0x41(%rbp), %rdi callq 0x2d620 jmp 0x17c51e movq -0x10(%rbp), %rsi movzwl -0x12(%rbp), %edx movzbl -0x14(%rbp), %r8d movzbl -0x13(%rbp), %ecx andl $0x1, %ecx andl $0x1, %r8d leaq -0xf8(%rbp), %rdi movq %rdi, -0x138(%rbp) callq 0x17ba00 movq -0x138(%rbp), %rdx leaq 0x395196(%rip), %rdi # 0x511628 leaq -0x10(%rbp), %rsi callq 0x17ce20 movb %dl, -0x129(%rbp) movq %rax, -0x128(%rbp) jmp 0x17c4aa movb -0x129(%rbp), %al movq -0x128(%rbp), %rcx movq %rcx, -0x108(%rbp) movb %al, -0x100(%rbp) movq -0x108(%rbp), %rax movq %rax, -0x70(%rbp) movb -0x100(%rbp), %al movb %al, -0x68(%rbp) leaq -0x70(%rbp), %rdi callq 0x17cdf0 addq $0x20, %rax movq %rax, -0x8(%rbp) leaq -0xf8(%rbp), %rdi callq 0x17ce70 jmp 0x17c511 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0xf8(%rbp), %rdi callq 0x17ce70 jmp 0x17c51e movq -0x8(%rbp), %rax addq $0x140, %rsp # imm = 0x140 popq %rbp retq movq -0x50(%rbp), %rdi callq 0x2cbe0 nopw (%rax,%rax)
_ZN14voxel_registry9constructEPKc10voxel_typebb: push rbp mov rbp, rsp sub rsp, 140h mov al, cl mov cl, dl mov dx, si mov [rbp+var_10], rdi mov [rbp+var_12], dx and cl, 1 mov [rbp+var_13], cl and al, 1 mov [rbp+var_14], al mov rax, [rbp+var_10] mov [rbp+var_118], rax lea rdi, [rbp+var_41] mov [rbp+var_110], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_118] mov rdx, [rbp+var_110] lea rdi, [rbp+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_17C3B9: lea rdi, _ZN14voxel_registry8buildersB5cxx11E; voxel_registry::builders lea rsi, [rbp+var_40] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE16VoxelInfoBuilderSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE4findERSC_; std::unordered_map<std::string,VoxelInfoBuilder>::find(std::string const&) mov [rbp+var_120], rax jmp short $+2 loc_17C3D2: mov rax, [rbp+var_120] mov [rbp+var_20], rax lea rdi, [rbp+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_41] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, _ZN14voxel_registry8buildersB5cxx11E; voxel_registry::builders call _ZNKSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE16VoxelInfoBuilderSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE4cendEv; std::unordered_map<std::string,VoxelInfoBuilder>::cend(void) mov [rbp+var_60], rax lea rdi, [rbp+var_20] lea rsi, [rbp+var_60] call _ZNSt8__detailneERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE16VoxelInfoBuilderELb1EEESD_; std::__detail::operator!=(std::__detail::_Node_iterator_base<std::pair<std::string const,VoxelInfoBuilder>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,VoxelInfoBuilder>,true> const&) test al, 1 jnz short loc_17C412 jmp short loc_17C459 loc_17C412: lea rdi, [rbp+var_20] call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE16VoxelInfoBuilderELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,VoxelInfoBuilder>,false,true>::operator->(void) add rax, 20h ; ' ' mov [rbp+var_8], rax jmp loc_17C511 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax jmp short loc_17C44B mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_17C44B: lea rdi, [rbp+var_41] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_17C51E loc_17C459: mov rsi, [rbp+var_10] movzx edx, [rbp+var_12] movzx r8d, [rbp+var_14] movzx ecx, [rbp+var_13] and ecx, 1 and r8d, 1 lea rdi, [rbp+var_F8] mov [rbp+var_138], rdi call _ZN16VoxelInfoBuilderC2EPKc10voxel_typebb; VoxelInfoBuilder::VoxelInfoBuilder(char const*,voxel_type,bool,bool) mov rdx, [rbp+var_138] lea rdi, _ZN14voxel_registry8buildersB5cxx11E; voxel_registry::builders lea rsi, [rbp+var_10] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE16VoxelInfoBuilderSt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S6_EEE7emplaceIJRPKcS6_EEESB_INSt8__detail14_Node_iteratorISD_Lb0ELb1EEEbEDpOT_; std::unordered_map<std::string,VoxelInfoBuilder>::emplace<char const*&,VoxelInfoBuilder>(char const*&,VoxelInfoBuilder &&) mov [rbp+var_129], dl mov [rbp+var_128], rax jmp short $+2 loc_17C4AA: mov al, [rbp+var_129] mov rcx, [rbp+var_128] mov [rbp+var_108], rcx mov [rbp+var_100], al mov rax, [rbp+var_108] mov [rbp+var_70], rax mov al, [rbp+var_100] mov [rbp+var_68], al lea rdi, [rbp+var_70] call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE16VoxelInfoBuilderELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,VoxelInfoBuilder>,false,true>::operator->(void) add rax, 20h ; ' ' mov [rbp+var_8], rax lea rdi, [rbp+var_F8]; this call _ZN16VoxelInfoBuilderD2Ev; VoxelInfoBuilder::~VoxelInfoBuilder() jmp short loc_17C511 mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_F8]; this call _ZN16VoxelInfoBuilderD2Ev; VoxelInfoBuilder::~VoxelInfoBuilder() jmp short loc_17C51E loc_17C511: mov rax, [rbp+var_8] add rsp, 140h pop rbp retn loc_17C51E: mov rdi, [rbp+var_50] call __Unwind_Resume
long long voxel_registry::construct(long long a1, long long a2, char a3, char a4) { char v4; // dl _BYTE v6[136]; // [rsp+48h] [rbp-F8h] BYREF long long v7; // [rsp+D0h] [rbp-70h] BYREF char v8; // [rsp+D8h] [rbp-68h] long long v9; // [rsp+E0h] [rbp-60h] BYREF char v10; // [rsp+FFh] [rbp-41h] BYREF _BYTE v11[32]; // [rsp+100h] [rbp-40h] BYREF long long v12; // [rsp+120h] [rbp-20h] BYREF char v13; // [rsp+12Ch] [rbp-14h] char v14; // [rsp+12Dh] [rbp-13h] unsigned __int16 v15; // [rsp+12Eh] [rbp-12h] long long v16; // [rsp+130h] [rbp-10h] BYREF long long v17; // [rsp+138h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3 & 1; v13 = a4 & 1; std::allocator<char>::allocator(&v10, a2); std::string::basic_string<std::allocator<char>>((long long)v11, a1, (long long)&v10); v12 = std::unordered_map<std::string,VoxelInfoBuilder>::find(&voxel_registry::builders[abi:cxx11], v11); std::string::~string(v11); std::allocator<char>::~allocator(&v10); v9 = std::unordered_map<std::string,VoxelInfoBuilder>::cend(&voxel_registry::builders[abi:cxx11]); if ( (std::__detail::operator!=(&v12, &v9) & 1) != 0 ) return std::__detail::_Node_iterator<std::pair<std::string const,VoxelInfoBuilder>,false,true>::operator->(&v12) + 32; VoxelInfoBuilder::VoxelInfoBuilder((long long)v6, v16, v15, v14 & 1, v13 & 1); v7 = std::unordered_map<std::string,VoxelInfoBuilder>::emplace<char const*&,VoxelInfoBuilder>( &voxel_registry::builders[abi:cxx11], &v16, v6); v8 = v4; v17 = std::__detail::_Node_iterator<std::pair<std::string const,VoxelInfoBuilder>,false,true>::operator->(&v7) + 32; VoxelInfoBuilder::~VoxelInfoBuilder((VoxelInfoBuilder *)v6); return v17; }
30,919
voxel_registry::construct(char const*, voxel_type, bool, bool)
untodesu[P]voxelius/game/shared/voxel_registry.cc
VoxelInfoBuilder &voxel_registry::construct(const char *name, voxel_type type, bool animated, bool blending) { const auto it = voxel_registry::builders.find(name); if(it != voxel_registry::builders.cend()) return it->second; return voxel_registry::builders.emplace(name, VoxelInfoBuilder(name, type, animated, blending)).first->second; }
O1
cpp
voxel_registry::construct(char const*, voxel_type, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x98, %rsp movl %ecx, %ebx movl %edx, %ebp movl %esi, %r14d movq %rdi, %rsi movq %rdi, 0x8(%rsp) leaq 0x10(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x30012 leaq 0x1de693(%rip), %rdi # 0x2613e8 leaq 0x10(%rsp), %rsi callq 0x8420c movq %rax, %r15 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x82d7d movq 0x20(%rsp), %rsi incq %rsi callq 0x268d0 testq %r15, %r15 jne 0x82dc2 leaq 0x8(%rsp), %r15 movq (%r15), %rsi movzwl %r14w, %edx movzbl %bpl, %ecx movzbl %bl, %r8d leaq 0x10(%rsp), %rbx movq %rbx, %rdi callq 0x82838 leaq 0x1de63e(%rip), %rdi # 0x2613e8 movq %r15, %rsi movq %rbx, %rdx callq 0x8430e movq %rax, %r15 leaq 0x10(%rsp), %rdi callq 0x83164 addq $0x28, %r15 movq %r15, %rax addq $0x98, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x83164 jmp 0x82e09 movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x82e09 movq 0x20(%rsp), %rsi incq %rsi callq 0x268d0 jmp 0x82e09 movq %rax, %rbx movq %rbx, %rdi callq 0x26fe0
_ZN14voxel_registry9constructEPKc10voxel_typebb: push rbp push r15 push r14 push rbx sub rsp, 98h mov ebx, ecx mov ebp, edx mov r14d, esi mov rsi, rdi mov [rsp+0B8h+var_B0], rdi lea rdi, [rsp+0B8h+var_A8] lea rdx, [rsp+0B8h+var_B1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, _ZN14voxel_registry8buildersB5cxx11E; voxel_registry::builders lea rsi, [rsp+0B8h+var_A8] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_16VoxelInfoBuilderESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,VoxelInfoBuilder>,std::allocator<std::pair<std::string const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov r15, rax lea rax, [rsp+0B8h+var_98] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_82D7D mov rsi, [rsp+0B8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_82D7D: test r15, r15 jnz short loc_82DC2 lea r15, [rsp+0B8h+var_B0] mov rsi, [r15] movzx edx, r14w movzx ecx, bpl movzx r8d, bl lea rbx, [rsp+0B8h+var_A8] mov rdi, rbx call _ZN16VoxelInfoBuilderC2EPKc10voxel_typebb; VoxelInfoBuilder::VoxelInfoBuilder(char const*,voxel_type,bool,bool) lea rdi, _ZN14voxel_registry8buildersB5cxx11E; voxel_registry::builders mov rsi, r15 mov rdx, rbx call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_16VoxelInfoBuilderESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE10_M_emplaceIJRPKcS8_EEES6_INSB_14_Node_iteratorIS9_Lb0ELb1EEEbESt17integral_constantIbLb1EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,VoxelInfoBuilder>,std::allocator<std::pair<std::string const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<char const*&,VoxelInfoBuilder>(std::integral_constant<bool,true>,char const*&,VoxelInfoBuilder &&) mov r15, rax lea rdi, [rsp+0B8h+var_A8]; this call _ZN16VoxelInfoBuilderD2Ev; VoxelInfoBuilder::~VoxelInfoBuilder() loc_82DC2: add r15, 28h ; '(' mov rax, r15 add rsp, 98h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_8]; this call _ZN16VoxelInfoBuilderD2Ev; VoxelInfoBuilder::~VoxelInfoBuilder() jmp short loc_82E09 mov rbx, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_82E09 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_82E09 mov rbx, rax loc_82E09: mov rdi, rbx call __Unwind_Resume
long long voxel_registry::construct(long long a1, unsigned __int16 a2, char a3, char a4) { long long v6; // r15 int v7; // ecx int v8; // r8d int v9; // r9d long long v11; // [rsp+8h] [rbp-B0h] BYREF void *v12[2]; // [rsp+10h] [rbp-A8h] BYREF long long v13; // [rsp+20h] [rbp-98h] BYREF v11 = a1; std::string::basic_string<std::allocator<char>>(v12, a1); v6 = std::_Hashtable<std::string,std::pair<std::string const,VoxelInfoBuilder>,std::allocator<std::pair<std::string const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( &voxel_registry::builders[abi:cxx11], v12); if ( v12[0] != &v13 ) operator delete(v12[0], v13 + 1); if ( !v6 ) { VoxelInfoBuilder::VoxelInfoBuilder((long long)v12, v11, a2, a3, a4); v6 = std::_Hashtable<std::string,std::pair<std::string const,VoxelInfoBuilder>,std::allocator<std::pair<std::string const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<char const*&,VoxelInfoBuilder>( (unsigned int)&voxel_registry::builders[abi:cxx11], (unsigned int)&v11, (unsigned int)v12, v7, v8, v9); VoxelInfoBuilder::~VoxelInfoBuilder((VoxelInfoBuilder *)v12); } return v6 + 40; }
construct: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x98 MOV EBX,ECX MOV EBP,EDX MOV R14D,ESI MOV RSI,RDI MOV qword ptr [RSP + 0x8],RDI LAB_00182d3f: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x7] CALL 0x00130012 LAB_00182d4e: LEA RDI,[0x3613e8] LEA RSI,[RSP + 0x10] CALL 0x0018420c LAB_00182d5f: MOV R15,RAX LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00182d7d MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001268d0 LAB_00182d7d: TEST R15,R15 JNZ 0x00182dc2 LEA R15,[RSP + 0x8] MOV RSI,qword ptr [R15] MOVZX EDX,R14W MOVZX ECX,BPL MOVZX R8D,BL LEA RBX,[RSP + 0x10] MOV RDI,RBX CALL 0x00182838 LAB_00182da3: LEA RDI,[0x3613e8] MOV RSI,R15 MOV RDX,RBX CALL 0x0018430e LAB_00182db5: MOV R15,RAX LEA RDI,[RSP + 0x10] CALL 0x00183164 LAB_00182dc2: ADD R15,0x28 MOV RAX,R15 ADD RSP,0x98 POP RBX POP R14 POP R15 POP RBP RET
/* voxel_registry::construct(char const*, voxel_type, bool, bool) */ long voxel_registry::construct (char *param_1,int2 param_2,int1 param_3,int1 param_4) { long lVar1; allocator local_b1; char *local_b0; long *local_a8 [2]; long local_98 [15]; /* try { // try from 00182d3f to 00182d4d has its CatchHandler @ 00182e06 */ local_b0 = param_1; std::__cxx11::string::string<std::allocator<char>>((string *)local_a8,param_1,&local_b1); /* try { // try from 00182d4e to 00182d5e has its CatchHandler @ 00182de6 */ lVar1 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,VoxelInfoBuilder>,std::allocator<std::pair<std::__cxx11::string_const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,VoxelInfoBuilder>,std::allocator<std::pair<std::__cxx11::string_const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)builders_abi_cxx11_,(string *)local_a8); if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (lVar1 == 0) { VoxelInfoBuilder::VoxelInfoBuilder ((VoxelInfoBuilder *)local_a8,local_b0,param_2,param_3,param_4); /* try { // try from 00182da3 to 00182db4 has its CatchHandler @ 00182dd7 */ lVar1 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,VoxelInfoBuilder>,std::allocator<std::pair<std::__cxx11::string_const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::_M_emplace<char_const*&,VoxelInfoBuilder> (builders_abi_cxx11_,&local_b0,(VoxelInfoBuilder *)local_a8); VoxelInfoBuilder::~VoxelInfoBuilder((VoxelInfoBuilder *)local_a8); } return lVar1 + 0x28; }
30,920
voxel_registry::construct(char const*, voxel_type, bool, bool)
untodesu[P]voxelius/game/shared/voxel_registry.cc
VoxelInfoBuilder &voxel_registry::construct(const char *name, voxel_type type, bool animated, bool blending) { const auto it = voxel_registry::builders.find(name); if(it != voxel_registry::builders.cend()) return it->second; return voxel_registry::builders.emplace(name, VoxelInfoBuilder(name, type, animated, blending)).first->second; }
O2
cpp
voxel_registry::construct(char const*, voxel_type, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa0, %rsp movl %ecx, %ebp movl %edx, %r14d movl %esi, %r15d movq %rdi, %rbx movq %rdi, 0x10(%rsp) leaq 0x18(%rsp), %rdi leaq 0xf(%rsp), %rdx movq %rbx, %rsi callq 0x2a464 leaq 0x1dba48(%rip), %rdi # 0x258448 leaq 0x18(%rsp), %rsi callq 0x7deba movq %rax, %r12 leaq 0x18(%rsp), %rdi callq 0x272a8 testq %r12, %r12 jne 0x7ca59 movzwl %r15w, %edx movzbl %r14b, %ecx movzbl %bpl, %r8d leaq 0x18(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x7c61c leaq 0x1dba09(%rip), %rdi # 0x258448 leaq 0x10(%rsp), %rsi movq %r14, %rdx callq 0x7df90 movq %rax, %r12 leaq 0x18(%rsp), %rdi callq 0x7ccf8 addq $0x28, %r12 movq %r12, %rax addq $0xa0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x7ccf8 jmp 0x7ca91 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x272a8 jmp 0x7ca91 movq %rax, %rbx movq %rbx, %rdi callq 0x27040
_ZN14voxel_registry9constructEPKc10voxel_typebb: push rbp push r15 push r14 push r12 push rbx sub rsp, 0A0h mov ebp, ecx mov r14d, edx mov r15d, esi mov rbx, rdi mov [rsp+0C8h+var_B8], rdi lea rdi, [rsp+0C8h+var_B0] lea rdx, [rsp+0C8h+var_B9] mov rsi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, _ZN14voxel_registry8buildersB5cxx11E; voxel_registry::builders lea rsi, [rsp+0C8h+var_B0] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_16VoxelInfoBuilderESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE4findERS7_; std::_Hashtable<std::string,std::pair<std::string const,VoxelInfoBuilder>,std::allocator<std::pair<std::string const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find(std::string const&) mov r12, rax lea rdi, [rsp+0C8h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r12, r12 jnz short loc_7CA59 movzx edx, r15w movzx ecx, r14b movzx r8d, bpl lea r14, [rsp+0C8h+var_B0] mov rdi, r14 mov rsi, rbx call _ZN16VoxelInfoBuilderC2EPKc10voxel_typebb; VoxelInfoBuilder::VoxelInfoBuilder(char const*,voxel_type,bool,bool) lea rdi, _ZN14voxel_registry8buildersB5cxx11E; voxel_registry::builders lea rsi, [rsp+0C8h+var_B8] mov rdx, r14 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_16VoxelInfoBuilderESaIS9_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSB_18_Mod_range_hashingENSB_20_Default_ranged_hashENSB_20_Prime_rehash_policyENSB_17_Hashtable_traitsILb1ELb0ELb1EEEE10_M_emplaceIJRPKcS8_EEES6_INSB_14_Node_iteratorIS9_Lb0ELb1EEEbESt17integral_constantIbLb1EEDpOT_; std::_Hashtable<std::string,std::pair<std::string const,VoxelInfoBuilder>,std::allocator<std::pair<std::string const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<char const*&,VoxelInfoBuilder>(std::integral_constant<bool,true>,char const*&,VoxelInfoBuilder &&) mov r12, rax lea rdi, [rsp+0C8h+var_B0]; this call _ZN16VoxelInfoBuilderD2Ev; VoxelInfoBuilder::~VoxelInfoBuilder() loc_7CA59: add r12, 28h ; '(' mov rax, r12 add rsp, 0A0h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_10]; this call _ZN16VoxelInfoBuilderD2Ev; VoxelInfoBuilder::~VoxelInfoBuilder() jmp short loc_7CA91 mov rbx, rax lea rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7CA91 mov rbx, rax loc_7CA91: mov rdi, rbx call __Unwind_Resume
long long voxel_registry::construct(long long a1, unsigned __int16 a2, unsigned __int8 a3, unsigned __int8 a4) { long long v6; // r12 long long v7; // r9 long long v9; // [rsp+10h] [rbp-B8h] BYREF _QWORD v10[22]; // [rsp+18h] [rbp-B0h] BYREF v9 = a1; std::string::basic_string<std::allocator<char>>(v10, a1); v6 = std::_Hashtable<std::string,std::pair<std::string const,VoxelInfoBuilder>,std::allocator<std::pair<std::string const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::find( &voxel_registry::builders[abi:cxx11], v10); std::string::~string(v10); if ( !v6 ) { VoxelInfoBuilder::VoxelInfoBuilder((long long)v10, a1, a2, a3, a4, v7); v6 = std::_Hashtable<std::string,std::pair<std::string const,VoxelInfoBuilder>,std::allocator<std::pair<std::string const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::_M_emplace<char const*&,VoxelInfoBuilder>( &voxel_registry::builders[abi:cxx11], &v9, v10); VoxelInfoBuilder::~VoxelInfoBuilder((VoxelInfoBuilder *)v10); } return v6 + 40; }
construct: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xa0 MOV EBP,ECX MOV R14D,EDX MOV R15D,ESI MOV RBX,RDI MOV qword ptr [RSP + 0x10],RDI LAB_0017c9e7: LEA RDI,[RSP + 0x18] LEA RDX,[RSP + 0xf] MOV RSI,RBX CALL 0x0012a464 LAB_0017c9f9: LEA RDI,[0x358448] LEA RSI,[RSP + 0x18] CALL 0x0017deba LAB_0017ca0a: MOV R12,RAX LEA RDI,[RSP + 0x18] CALL 0x001272a8 TEST R12,R12 JNZ 0x0017ca59 MOVZX EDX,R15W MOVZX ECX,R14B MOVZX R8D,BPL LEA R14,[RSP + 0x18] MOV RDI,R14 MOV RSI,RBX CALL 0x0017c61c LAB_0017ca38: LEA RDI,[0x358448] LEA RSI,[RSP + 0x10] MOV RDX,R14 CALL 0x0017df90 LAB_0017ca4c: MOV R12,RAX LEA RDI,[RSP + 0x18] CALL 0x0017ccf8 LAB_0017ca59: ADD R12,0x28 MOV RAX,R12 ADD RSP,0xa0 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* voxel_registry::construct(char const*, voxel_type, bool, bool) */ long voxel_registry::construct (char *param_1,int2 param_2,int1 param_3,int1 param_4) { long lVar1; allocator local_b9; char *local_b8; string local_b0 [136]; /* try { // try from 0017c9e7 to 0017c9f8 has its CatchHandler @ 0017ca8e */ local_b8 = param_1; std::__cxx11::string::string<std::allocator<char>>(local_b0,param_1,&local_b9); /* try { // try from 0017c9f9 to 0017ca09 has its CatchHandler @ 0017ca7f */ lVar1 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,VoxelInfoBuilder>,std::allocator<std::pair<std::__cxx11::string_const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::find((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,VoxelInfoBuilder>,std::allocator<std::pair<std::__cxx11::string_const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)builders_abi_cxx11_,local_b0); std::__cxx11::string::~string(local_b0); if (lVar1 == 0) { VoxelInfoBuilder::VoxelInfoBuilder((VoxelInfoBuilder *)local_b0,param_1,param_2,param_3,param_4) ; /* try { // try from 0017ca38 to 0017ca4b has its CatchHandler @ 0017ca70 */ lVar1 = std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,VoxelInfoBuilder>,std::allocator<std::pair<std::__cxx11::string_const,VoxelInfoBuilder>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::_M_emplace<char_const*&,VoxelInfoBuilder> (builders_abi_cxx11_,&local_b8,(VoxelInfoBuilder *)local_b0); VoxelInfoBuilder::~VoxelInfoBuilder((VoxelInfoBuilder *)local_b0); } return lVar1 + 0x28; }
30,921
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::type_name() const
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_RETURNS_NON_NULL const char* type_name() const noexcept { switch (m_data.m_type) { case value_t::null: return "null"; case value_t::object: return "object"; case value_t::array: return "array"; case value_t::string: return "string"; case value_t::boolean: return "boolean"; case value_t::binary: return "binary"; case value_t::discarded: return "discarded"; case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: default: return "number"; } }
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>::type_name() const: movzbl (%rdi), %eax cmpq $0x9, %rax ja 0x6ad82 leaq 0x65d3a(%rip), %rcx # 0xd0ab4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax retq leaq 0x65659(%rip), %rax # 0xd03e2 retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv: movzx eax, byte ptr [rdi] cmp rax, 9 ja short loc_6AD82 lea rcx, unk_D0AB4 movsxd rax, dword ptr [rcx+rax*4] add rax, rcx retn loc_6AD82: lea rax, aNumber; "number" retn
const char * nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name( unsigned __int8 *a1) { unsigned long long v1; // rax v1 = *a1; if ( v1 > 9 ) return "number"; else return (char *)dword_D0AB4 + dword_D0AB4[v1]; }
type_name: MOVZX EAX,byte ptr [RDI] CMP RAX,0x9 JA 0x0016ad82 LEA RCX,[0x1d0ab4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX RET LAB_0016ad82: LEA RAX,[0x1d03e2] RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::type_name() const */ char * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { if ((ulong)(byte)*this < 10) { return &DAT_001d0ab4 + *(int *)(&DAT_001d0ab4 + (ulong)(byte)*this * 4); } return "number"; }
30,922
ma_update_state_lsns_sub
eloqsql/storage/maria/ma_create.c
int _ma_update_state_lsns_sub(MARIA_SHARE *share, LSN lsn, TrID create_trid, my_bool do_sync, my_bool update_create_rename_lsn) { uchar buf[LSN_STORE_SIZE * 3], *ptr; uchar trid_buff[8]; File file= share->kfile.file; DBUG_ENTER("_ma_update_state_lsns_sub"); DBUG_ASSERT(file >= 0); CRASH_IF_S3_TABLE(share); if (lsn == LSN_IMPOSSIBLE) { int res; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; /* table name is logged only for information */ log_array[TRANSLOG_INTERNAL_PARTS + 0].str= (uchar *)(share->open_file_name.str); log_array[TRANSLOG_INTERNAL_PARTS + 0].length= share->open_file_name.length + 1; if ((res= translog_write_record(&lsn, LOGREC_IMPORTED_TABLE, &dummy_transaction_object, NULL, (translog_size_t) log_array[TRANSLOG_INTERNAL_PARTS + 0].length, sizeof(log_array)/sizeof(log_array[0]), log_array, NULL, NULL))) DBUG_RETURN(res); } for (ptr= buf; ptr < (buf + sizeof(buf)); ptr+= LSN_STORE_SIZE) lsn_store(ptr, lsn); share->state.skip_redo_lsn= share->state.is_of_horizon= lsn; share->state.create_trid= create_trid; mi_int8store(trid_buff, create_trid); /* Update create_rename_lsn if update was requested or if the old one had an impossible value. */ if (update_create_rename_lsn || (share->state.create_rename_lsn > lsn && lsn != LSN_IMPOSSIBLE)) { share->state.create_rename_lsn= lsn; if (share->id != 0) { /* If OP is the operation which is calling us, if table is later written, we could see in the log: FILE_ID ... REDO_OP ... REDO_INSERT. (that can happen in real life at least with OP=REPAIR). As FILE_ID will be ignored by Recovery because it is < create_rename_lsn, REDO_INSERT would be ignored too, wrongly. To avoid that, we force a LOGREC_FILE_ID to be logged at next write: */ translog_deassign_id_from_share(share); } } else lsn_store(buf, share->state.create_rename_lsn); DBUG_RETURN(my_pwrite(file, buf, sizeof(buf), sizeof(share->state.header) + MARIA_FILE_CREATE_RENAME_LSN_OFFSET, MYF(MY_NABP)) || my_pwrite(file, trid_buff, sizeof(trid_buff), sizeof(share->state.header) + MARIA_FILE_CREATE_TRID_OFFSET, MYF(MY_NABP)) || (do_sync && mysql_file_sync(file, MYF(0)))); }
O3
c
ma_update_state_lsns_sub: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %r8d, %r12d movl %ecx, %r14d movq %rdx, %rbx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rsi, -0x60(%rbp) movl 0x760(%rdi), %r13d testq %rsi, %rsi je 0x458bd movq %rsi, %rax shrq $0x20, %rax movq %rsi, %rcx shrq $0x28, %rcx movq %rsi, %rdx shrq $0x30, %rdx movq $-0x7, %rdi movb %al, -0x49(%rbp,%rdi) movb %cl, -0x48(%rbp,%rdi) movb %dl, -0x47(%rbp,%rdi) movl %esi, -0x46(%rbp,%rdi) addq $0x7, %rdi cmpq $0xe, %rdi jb 0x45816 movq %rsi, 0x180(%r15) movq %rsi, 0x188(%r15) movq %rbx, 0xe0(%r15) movq %rbx, %rax shrq $0x20, %rax movb %al, -0x55(%rbp) movq %rbx, %rax shrq $0x28, %rax movb %al, -0x56(%rbp) movq %rbx, %rax shrq $0x30, %rax movb %al, -0x57(%rbp) movq %rbx, %rax shrq $0x38, %rax movb %al, -0x58(%rbp) movb %bl, -0x51(%rbp) movb %bh, -0x52(%rbp) movl %ebx, %eax shrl $0x10, %eax movb %al, -0x53(%rbp) shrl $0x18, %ebx movb %bl, -0x54(%rbp) testb %r12b, %r12b jne 0x4589d movq 0x178(%r15), %rax cmpq %rsi, %rax setle %cl testq %rsi, %rsi sete %dl orb %cl, %dl jne 0x45916 movq %rsi, 0x178(%r15) cmpw $0x0, 0x620(%r15) je 0x45937 movq %r15, %rdi callq 0x4d387 jmp 0x45937 movq 0x5e0(%r15), %rax leaq -0xb0(%rbp), %rcx movq %rax, 0x20(%rcx) movq 0x5e8(%r15), %r8 incq %r8 movq %r8, 0x28(%rcx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsp) movq %rcx, (%rsp) leaq 0x3b76e0(%rip), %rdx # 0x3fcfd0 leaq -0x60(%rbp), %rdi movl $0x29, %esi xorl %ecx, %ecx movl $0x3, %r9d callq 0x2a8ac testb %al, %al je 0x459ba movsbl %al, %ebx jmp 0x459c5 movq %rax, %rcx shrq $0x20, %rcx movb %cl, -0x50(%rbp) movq %rax, %rcx shrq $0x28, %rcx movb %cl, -0x4f(%rbp) movq %rax, %rcx shrq $0x30, %rcx movb %cl, -0x4e(%rbp) movl %eax, -0x4d(%rbp) leaq -0x50(%rbp), %rsi movl $0x15, %edx movl $0x1c, %ecx movl $0x4, %r8d movl %r13d, %edi callq 0xa03ba movl $0x1, %ebx testq %rax, %rax jne 0x459c5 leaq -0x58(%rbp), %rsi movl $0x8, %edx movl $0x89, %ecx movl $0x4, %r8d movl %r13d, %edi callq 0xa03ba testq %rax, %rax jne 0x459c5 testb %r14b, %r14b je 0x459c3 leaq 0x340686(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r13d, %esi movl $0x10, %edx callq *0x158(%rax) testq %rax, %rax jne 0x459e8 movl %r13d, %edi xorl %esi, %esi callq 0xa1070 xorl %ebx, %ebx testl %eax, %eax setne %bl jmp 0x459c5 movq -0x60(%rbp), %rsi jmp 0x457fa xorl %ebx, %ebx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x459fe movl %ebx, %eax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x64(%rbp), %rbx movq %rax, %rdi movl %r13d, %esi movq %rbx, %rdx callq 0x2a1e8 movl (%rbx), %eax jmp 0x459b1 callq 0x29270
_ma_update_state_lsns_sub: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r12d, r8d mov r14d, ecx mov rbx, rdx mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_60], rsi mov r13d, [rdi+760h] test rsi, rsi jz loc_458BD loc_457FA: mov rax, rsi shr rax, 20h mov rcx, rsi shr rcx, 28h mov rdx, rsi shr rdx, 30h mov rdi, 0FFFFFFFFFFFFFFF9h loc_45816: mov [rbp+rdi+var_49], al mov [rbp+rdi+var_48], cl mov [rbp+rdi+var_47], dl mov [rbp+rdi+var_46], esi add rdi, 7 cmp rdi, 0Eh jb short loc_45816 mov [r15+180h], rsi mov [r15+188h], rsi mov [r15+0E0h], rbx mov rax, rbx shr rax, 20h mov [rbp+var_55], al mov rax, rbx shr rax, 28h mov [rbp+var_56], al mov rax, rbx shr rax, 30h mov [rbp+var_57], al mov rax, rbx shr rax, 38h mov [rbp+var_58], al mov [rbp+var_51], bl mov [rbp+var_52], bh mov eax, ebx shr eax, 10h mov [rbp+var_53], al shr ebx, 18h mov [rbp+var_54], bl test r12b, r12b jnz short loc_4589D mov rax, [r15+178h] cmp rax, rsi setle cl test rsi, rsi setz dl or dl, cl jnz short loc_45916 loc_4589D: mov [r15+178h], rsi cmp word ptr [r15+620h], 0 jz loc_45937 mov rdi, r15 call translog_deassign_id_from_share jmp short loc_45937 loc_458BD: mov rax, [r15+5E0h] lea rcx, [rbp+var_B0] mov [rcx+20h], rax mov r8, [r15+5E8h] inc r8 mov [rcx+28h], r8 xorps xmm0, xmm0 movups [rsp+0D0h+var_C8], xmm0 mov [rsp+0D0h+var_D0], rcx lea rdx, dummy_transaction_object lea rdi, [rbp+var_60] mov esi, 29h ; ')' xor ecx, ecx mov r9d, 3 call translog_write_record test al, al jz loc_459BA movsx ebx, al jmp loc_459C5 loc_45916: mov rcx, rax shr rcx, 20h mov [rbp+var_50], cl mov rcx, rax shr rcx, 28h mov [rbp+var_4F], cl mov rcx, rax shr rcx, 30h mov [rbp+var_4E], cl mov [rbp+var_4D], eax loc_45937: lea rsi, [rbp+var_50] mov edx, 15h mov ecx, 1Ch mov r8d, 4 mov edi, r13d call my_pwrite mov ebx, 1 test rax, rax jnz short loc_459C5 lea rsi, [rbp+var_58] mov edx, 8 mov ecx, 89h mov r8d, 4 mov edi, r13d call my_pwrite test rax, rax jnz short loc_459C5 test r14b, r14b jz short loc_459C3 lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r13d mov edx, 10h call qword ptr [rax+158h] test rax, rax jnz short loc_459E8 mov edi, r13d xor esi, esi call my_sync loc_459B1: xor ebx, ebx test eax, eax setnz bl jmp short loc_459C5 loc_459BA: mov rsi, [rbp+var_60] jmp loc_457FA loc_459C3: xor ebx, ebx loc_459C5: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_459FE mov eax, ebx add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_459E8: lea rbx, [rbp+var_64] mov rdi, rax mov esi, r13d mov rdx, rbx call _ma_update_state_lsns_sub_cold_1 mov eax, [rbx] jmp short loc_459B1 loc_459FE: call ___stack_chk_fail
long long ma_update_state_lsns_sub(long long a1, long long a2, long long a3, char a4, char a5) { unsigned int v9; // r13d unsigned long long v10; // rdi long long v11; // rax char v12; // al unsigned int v13; // ebx long long v14; // rax int v15; // eax _OWORD v17[2]; // [rsp+20h] [rbp-B0h] BYREF long long v18; // [rsp+40h] [rbp-90h] long long v19; // [rsp+48h] [rbp-88h] int v20; // [rsp+6Ch] [rbp-64h] BYREF long long v21; // [rsp+70h] [rbp-60h] BYREF _BYTE v22[8]; // [rsp+78h] [rbp-58h] BYREF _BYTE v23[3]; // [rsp+80h] [rbp-50h] BYREF int v24; // [rsp+83h] [rbp-4Dh] _BYTE v25[25]; // [rsp+87h] [rbp-49h] unsigned long long v26; // [rsp+A0h] [rbp-30h] v26 = __readfsqword(0x28u); v21 = a2; v9 = *(_DWORD *)(a1 + 1888); if ( !a2 ) { v18 = *(_QWORD *)(a1 + 1504); v19 = *(_QWORD *)(a1 + 1512) + 1LL; v12 = translog_write_record( (unsigned long long)&v21, (long long *)((char *)&qword_28 + 1), (long long)dummy_transaction_object, 0LL, v19, 3, v17, 0LL, 0LL); if ( v12 ) return (unsigned int)v12; a2 = v21; } v10 = -7LL; do { v25[v10] = BYTE4(a2); v25[v10 + 1] = BYTE5(a2); v25[v10 + 2] = BYTE6(a2); *(_DWORD *)&v25[v10 + 3] = a2; v10 += 7LL; } while ( v10 < 0xE ); *(_QWORD *)(a1 + 384) = a2; *(_QWORD *)(a1 + 392) = a2; *(_QWORD *)(a1 + 224) = a3; v22[3] = BYTE4(a3); v22[2] = BYTE5(a3); v22[1] = BYTE6(a3); v22[0] = HIBYTE(a3); v22[6] = BYTE1(a3); v22[7] = a3; v22[5] = BYTE2(a3); v22[4] = BYTE3(a3); if ( !a5 && (v11 = *(_QWORD *)(a1 + 376), v11 <= a2 || a2 == 0) ) { v23[0] = BYTE4(*(_QWORD *)(a1 + 376)); v23[1] = BYTE5(v11); v23[2] = BYTE6(v11); v24 = v11; } else { *(_QWORD *)(a1 + 376) = a2; if ( *(_WORD *)(a1 + 1568) ) translog_deassign_id_from_share(a1); } v13 = 1; if ( !my_pwrite(v9, v23, 21LL, 28LL, 4LL) && !my_pwrite(v9, v22, 8LL, 137LL, 4LL) ) { if ( a4 ) { v14 = ((long long ( *)(_OWORD *, _QWORD, long long))PSI_server[43])(v17, v9, 16LL); if ( v14 ) { ma_update_state_lsns_sub_cold_1(v14, v9, &v20); v15 = v20; } else { v15 = my_sync(v9, 0LL); } return v15 != 0; } else { return 0; } } return v13; }
_ma_update_state_lsns_sub: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R12D,R8D MOV R14D,ECX MOV RBX,RDX MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x60],RSI MOV R13D,dword ptr [RDI + 0x760] TEST RSI,RSI JZ 0x001458bd LAB_001457fa: MOV RAX,RSI SHR RAX,0x20 MOV RCX,RSI SHR RCX,0x28 MOV RDX,RSI SHR RDX,0x30 MOV RDI,-0x7 LAB_00145816: MOV byte ptr [RBP + RDI*0x1 + -0x49],AL MOV byte ptr [RBP + RDI*0x1 + -0x48],CL MOV byte ptr [RBP + RDI*0x1 + -0x47],DL MOV dword ptr [RBP + RDI*0x1 + -0x46],ESI ADD RDI,0x7 CMP RDI,0xe JC 0x00145816 MOV qword ptr [R15 + 0x180],RSI MOV qword ptr [R15 + 0x188],RSI MOV qword ptr [R15 + 0xe0],RBX MOV RAX,RBX SHR RAX,0x20 MOV byte ptr [RBP + -0x55],AL MOV RAX,RBX SHR RAX,0x28 MOV byte ptr [RBP + -0x56],AL MOV RAX,RBX SHR RAX,0x30 MOV byte ptr [RBP + -0x57],AL MOV RAX,RBX SHR RAX,0x38 MOV byte ptr [RBP + -0x58],AL MOV byte ptr [RBP + -0x51],BL MOV byte ptr [RBP + -0x52],BH MOV EAX,EBX SHR EAX,0x10 MOV byte ptr [RBP + -0x53],AL SHR EBX,0x18 MOV byte ptr [RBP + -0x54],BL TEST R12B,R12B JNZ 0x0014589d MOV RAX,qword ptr [R15 + 0x178] CMP RAX,RSI SETLE CL TEST RSI,RSI SETZ DL OR DL,CL JNZ 0x00145916 LAB_0014589d: MOV qword ptr [R15 + 0x178],RSI CMP word ptr [R15 + 0x620],0x0 JZ 0x00145937 MOV RDI,R15 CALL 0x0014d387 JMP 0x00145937 LAB_001458bd: MOV RAX,qword ptr [R15 + 0x5e0] LEA RCX,[RBP + -0xb0] MOV qword ptr [RCX + 0x20],RAX MOV R8,qword ptr [R15 + 0x5e8] INC R8 MOV qword ptr [RCX + 0x28],R8 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP],RCX LEA RDX,[0x4fcfd0] LEA RDI,[RBP + -0x60] MOV ESI,0x29 XOR ECX,ECX MOV R9D,0x3 CALL 0x0012a8ac TEST AL,AL JZ 0x001459ba MOVSX EBX,AL JMP 0x001459c5 LAB_00145916: MOV RCX,RAX SHR RCX,0x20 MOV byte ptr [RBP + -0x50],CL MOV RCX,RAX SHR RCX,0x28 MOV byte ptr [RBP + -0x4f],CL MOV RCX,RAX SHR RCX,0x30 MOV byte ptr [RBP + -0x4e],CL MOV dword ptr [RBP + -0x4d],EAX LAB_00145937: LEA RSI,[RBP + -0x50] MOV EDX,0x15 MOV ECX,0x1c MOV R8D,0x4 MOV EDI,R13D CALL 0x001a03ba MOV EBX,0x1 TEST RAX,RAX JNZ 0x001459c5 LEA RSI,[RBP + -0x58] MOV EDX,0x8 MOV ECX,0x89 MOV R8D,0x4 MOV EDI,R13D CALL 0x001a03ba TEST RAX,RAX JNZ 0x001459c5 TEST R14B,R14B JZ 0x001459c3 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R13D MOV EDX,0x10 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001459e8 MOV EDI,R13D XOR ESI,ESI CALL 0x001a1070 LAB_001459b1: XOR EBX,EBX TEST EAX,EAX SETNZ BL JMP 0x001459c5 LAB_001459ba: MOV RSI,qword ptr [RBP + -0x60] JMP 0x001457fa LAB_001459c3: XOR EBX,EBX LAB_001459c5: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001459fe MOV EAX,EBX ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001459e8: LEA RBX,[RBP + -0x64] MOV RDI,RAX MOV ESI,R13D MOV RDX,RBX CALL 0x0012a1e8 MOV EAX,dword ptr [RBX] JMP 0x001459b1 LAB_001459fe: CALL 0x00129270
uint _ma_update_state_lsns_sub (long param_1,long param_2,int8 param_3,char param_4,char param_5) { int4 uVar1; char cVar2; long lVar3; uint uVar4; ulong uVar5; long in_FS_OFFSET; int1 local_b8 [32]; int8 local_98; long local_90; int local_6c; long local_68; int1 local_60; int1 local_5f; int1 local_5e; int1 local_5d; int1 local_5c; int1 local_5b; int1 local_5a; int1 local_59; int1 local_58; int1 local_57; int1 local_56; int4 local_55; int1 auStack_51 [3]; int4 auStack_4e [5]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar1 = *(int4 *)(param_1 + 0x760); local_68 = param_2; if (param_2 == 0) { local_98 = *(int8 *)(param_1 + 0x5e0); local_90 = *(long *)(param_1 + 0x5e8) + 1; cVar2 = translog_write_record(&local_68,0x29,dummy_transaction_object,0,local_90,3,local_b8,0,0) ; if (cVar2 != '\0') { uVar4 = (uint)cVar2; goto LAB_001459c5; } } uVar5 = 0xfffffffffffffff9; do { auStack_51[uVar5] = (char)((ulong)local_68 >> 0x20); auStack_51[uVar5 + 1] = (char)((ulong)local_68 >> 0x28); auStack_51[uVar5 + 2] = (char)((ulong)local_68 >> 0x30); *(int *)(auStack_51 + uVar5 + 3) = (int)local_68; uVar5 = uVar5 + 7; } while (uVar5 < 0xe); *(long *)(param_1 + 0x180) = local_68; *(long *)(param_1 + 0x188) = local_68; *(int8 *)(param_1 + 0xe0) = param_3; local_5d = (int1)((ulong)param_3 >> 0x20); local_5e = (int1)((ulong)param_3 >> 0x28); local_5f = (int1)((ulong)param_3 >> 0x30); local_60 = (int1)((ulong)param_3 >> 0x38); local_59 = (int1)param_3; local_5a = (int1)((ulong)param_3 >> 8); local_5b = (int1)((ulong)param_3 >> 0x10); local_5c = (int1)((ulong)param_3 >> 0x18); if ((param_5 == '\0') && (lVar3 = *(long *)(param_1 + 0x178), local_68 == 0 || lVar3 <= local_68)) { local_58 = (int1)((ulong)lVar3 >> 0x20); local_57 = (int1)((ulong)lVar3 >> 0x28); local_56 = (int1)((ulong)lVar3 >> 0x30); local_55 = (int4)lVar3; } else { *(long *)(param_1 + 0x178) = local_68; if (*(short *)(param_1 + 0x620) != 0) { translog_deassign_id_from_share(param_1); } } lVar3 = my_pwrite(uVar1,&local_58,0x15,0x1c,4); uVar4 = 1; if ((lVar3 == 0) && (lVar3 = my_pwrite(uVar1,&local_60,8,0x89,4), lVar3 == 0)) { if (param_4 == '\0') { uVar4 = 0; } else { lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,uVar1,0x10); if (lVar3 == 0) { local_6c = my_sync(uVar1,0); } else { _ma_update_state_lsns_sub_cold_1(lVar3,uVar1,&local_6c); } uVar4 = (uint)(local_6c != 0); } } LAB_001459c5: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar4; }
30,923
my_casefold_ujis
eloqsql/strings/ctype-ujis.c
static size_t my_casefold_ujis(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar * const map, size_t is_upper) { const char *srcend= src + srclen, *dst0= dst; while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; ch= (mblen == 2) ? get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) : get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]); if (ch) { int code= is_upper ? ch->toupper : ch->tolower; src+= mblen; if (code > 0xFFFF) *dst++= (char) (uchar) ((code >> 16) & 0xFF); if (code > 0xFF) *dst++= (char) (uchar) ((code >> 8) & 0xFF); *dst++= (char) (uchar) (code & 0xFF); } else { if (mblen == 3) *dst++= *src++; *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O0
c
my_casefold_ujis: pushq %rbp movq %rsp, %rbp subq $0x70, %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) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x62bdb movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x62c50 movl %eax, %eax movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) je 0x62bac cmpq $0x2, -0x48(%rbp) jne 0x62a6f movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movzbl (%rax), %edx movq -0x10(%rbp), %rax movzbl 0x1(%rax), %ecx xorl %esi, %esi callq 0x62cb0 movq %rax, -0x60(%rbp) jmp 0x62a91 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movzbl 0x1(%rax), %edx movq -0x10(%rbp), %rax movzbl 0x2(%rax), %ecx movl $0x1, %esi callq 0x62cb0 movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%rbp) je 0x62b3d cmpq $0x0, 0x10(%rbp) je 0x62ab6 movq -0x50(%rbp), %rax movl (%rax), %eax movl %eax, -0x64(%rbp) jmp 0x62ac0 movq -0x50(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x48(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) cmpl $0xffff, -0x54(%rbp) # imm = 0xFFFF jle 0x62af9 movl -0x54(%rbp), %eax sarl $0x10, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) cmpl $0xff, -0x54(%rbp) jle 0x62b20 movl -0x54(%rbp), %eax sarl $0x8, %eax andl $0xff, %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 0x62baa cmpq $0x3, -0x48(%rbp) jne 0x62b66 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) 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 0x62bd6 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 0x62a18 movq -0x20(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax addq $0x70, %rsp popq %rbp retq nopl (%rax)
my_casefold_ujis: push rbp mov rbp, rsp sub rsp, 70h 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 loc_62A18: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb loc_62BDB mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] call my_ismbchar_2 mov eax, eax mov [rbp+var_48], rax cmp [rbp+var_48], 0 jz loc_62BAC cmp [rbp+var_48], 2 jnz short loc_62A6F mov rdi, [rbp+var_8] mov rax, [rbp+var_10] movzx edx, byte ptr [rax] mov rax, [rbp+var_10] movzx ecx, byte ptr [rax+1] xor esi, esi call get_case_info_for_ch_0 mov [rbp+var_60], rax jmp short loc_62A91 loc_62A6F: mov rdi, [rbp+var_8] mov rax, [rbp+var_10] movzx edx, byte ptr [rax+1] mov rax, [rbp+var_10] movzx ecx, byte ptr [rax+2] mov esi, 1 call get_case_info_for_ch_0 mov [rbp+var_60], rax loc_62A91: mov rax, [rbp+var_60] mov [rbp+var_50], rax cmp [rbp+var_50], 0 jz loc_62B3D cmp [rbp+arg_0], 0 jz short loc_62AB6 mov rax, [rbp+var_50] mov eax, [rax] mov [rbp+var_64], eax jmp short loc_62AC0 loc_62AB6: mov rax, [rbp+var_50] mov eax, [rax+4] mov [rbp+var_64], eax loc_62AC0: mov eax, [rbp+var_64] mov [rbp+var_54], eax mov rax, [rbp+var_48] add rax, [rbp+var_10] mov [rbp+var_10], rax cmp [rbp+var_54], 0FFFFh jle short loc_62AF9 mov eax, [rbp+var_54] sar eax, 10h 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 loc_62AF9: cmp [rbp+var_54], 0FFh jle short loc_62B20 mov eax, [rbp+var_54] sar eax, 8 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 loc_62B20: 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_62BAA loc_62B3D: cmp [rbp+var_48], 3 jnz short loc_62B66 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_62B66: 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_62BAA: jmp short loc_62BD6 loc_62BAC: 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_62BD6: jmp loc_62A18 loc_62BDB: mov rax, [rbp+var_20] mov rcx, [rbp+var_40] sub rax, rcx add rsp, 70h pop rbp retn
_BYTE * my_casefold_ujis( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6, long long a7) { unsigned int v7; // eax unsigned __int8 *v8; // rax unsigned __int8 *v9; // rax unsigned __int8 *v10; // rax unsigned __int8 *v11; // rax unsigned __int8 v12; // cl unsigned __int8 *v13; // rax char *v14; // rax char v15; // cl _BYTE *v16; // rax unsigned __int8 *v17; // rcx unsigned __int8 *v18; // rax int v20; // [rsp+Ch] [rbp-64h] int *case_info_for_ch_0; // [rsp+10h] [rbp-60h] long long v22; // [rsp+28h] [rbp-48h] unsigned long long v24; // [rsp+38h] [rbp-38h] unsigned __int8 *v26; // [rsp+50h] [rbp-20h] unsigned __int8 *v27; // [rsp+60h] [rbp-10h] v27 = a2; v26 = a4; v24 = (unsigned long long)&a2[a3]; while ( (unsigned long long)v27 < v24 ) { v7 = my_ismbchar_2(a1, v27, v24); v22 = v7; if ( v7 ) { if ( v7 == 2LL ) case_info_for_ch_0 = (int *)get_case_info_for_ch_0(a1, 0LL, *v27, v27[1]); else case_info_for_ch_0 = (int *)get_case_info_for_ch_0(a1, 1LL, v27[1], v27[2]); if ( case_info_for_ch_0 ) { if ( a7 ) v20 = *case_info_for_ch_0; else v20 = case_info_for_ch_0[1]; v27 += v22; if ( v20 > 0xFFFF ) { v8 = v26++; *v8 = BYTE2(v20); } if ( v20 > 255 ) { v9 = v26++; *v9 = BYTE1(v20); } v10 = v26++; *v10 = v20; } else { if ( v22 == 3 ) { v11 = v27++; v12 = *v11; v13 = v26++; *v13 = v12; } *v26 = *v27; v14 = (char *)(v27 + 1); v27 += 2; v15 = *v14; v16 = v26 + 1; v26 += 2; *v16 = v15; } } else { v17 = v27++; v18 = v26++; *v18 = *(_BYTE *)(a6 + *v17); } } return (_BYTE *)(v26 - a4); }
my_casefold_ujis: PUSH RBP MOV RBP,RSP SUB RSP,0x70 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 LAB_00162a18: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00162bdb MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00162c50 MOV EAX,EAX MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x00162bac CMP qword ptr [RBP + -0x48],0x2 JNZ 0x00162a6f MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOVZX EDX,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RAX + 0x1] XOR ESI,ESI CALL 0x00162cb0 MOV qword ptr [RBP + -0x60],RAX JMP 0x00162a91 LAB_00162a6f: MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOVZX EDX,byte ptr [RAX + 0x1] MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RAX + 0x2] MOV ESI,0x1 CALL 0x00162cb0 MOV qword ptr [RBP + -0x60],RAX LAB_00162a91: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x00162b3d CMP qword ptr [RBP + 0x10],0x0 JZ 0x00162ab6 MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX JMP 0x00162ac0 LAB_00162ab6: MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x64],EAX LAB_00162ac0: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX CMP dword ptr [RBP + -0x54],0xffff JLE 0x00162af9 MOV EAX,dword ptr [RBP + -0x54] SAR EAX,0x10 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 LAB_00162af9: CMP dword ptr [RBP + -0x54],0xff JLE 0x00162b20 MOV EAX,dword ptr [RBP + -0x54] SAR EAX,0x8 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 LAB_00162b20: 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 0x00162baa LAB_00162b3d: CMP qword ptr [RBP + -0x48],0x3 JNZ 0x00162b66 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_00162b66: 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_00162baa: JMP 0x00162bd6 LAB_00162bac: 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_00162bd6: JMP 0x00162a18 LAB_00162bdb: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX ADD RSP,0x70 POP RBP RET
long my_casefold_ujis(int8 param_1,byte *param_2,long param_3,byte *param_4,int8 param_5 ,long param_6,long param_7) { uint uVar1; ulong uVar2; byte *pbVar3; byte *pbVar4; int local_6c; int *local_68; byte *local_28; byte *local_18; local_28 = param_4; local_18 = param_2; while (local_18 < param_2 + param_3) { uVar1 = my_ismbchar(param_1,local_18,param_2 + param_3); uVar2 = (ulong)uVar1; if (uVar2 == 0) { *local_28 = *(byte *)(param_6 + (ulong)*local_18); local_28 = local_28 + 1; local_18 = local_18 + 1; } else { if (uVar2 == 2) { local_68 = (int *)get_case_info_for_ch(param_1,0,*local_18,local_18[1]); } else { local_68 = (int *)get_case_info_for_ch(param_1,1,local_18[1],local_18[2]); } if (local_68 == (int *)0x0) { if (uVar2 == 3) { *local_28 = *local_18; local_28 = local_28 + 1; local_18 = local_18 + 1; } pbVar3 = local_18 + 1; pbVar4 = local_28 + 1; *local_28 = *local_18; local_18 = local_18 + 2; local_28 = local_28 + 2; *pbVar4 = *pbVar3; } else { if (param_7 == 0) { local_6c = local_68[1]; } else { local_6c = *local_68; } local_18 = local_18 + uVar2; if (0xffff < local_6c) { *local_28 = (byte)((uint)local_6c >> 0x10); local_28 = local_28 + 1; } if (0xff < local_6c) { *local_28 = (byte)((uint)local_6c >> 8); local_28 = local_28 + 1; } *local_28 = (byte)local_6c; local_28 = local_28 + 1; } } } return (long)local_28 - (long)param_4; }
30,924
my_casefold_ujis
eloqsql/strings/ctype-ujis.c
static size_t my_casefold_ujis(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar * const map, size_t is_upper) { const char *srcend= src + srclen, *dst0= dst; while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; ch= (mblen == 2) ? get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) : get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]); if (ch) { int code= is_upper ? ch->toupper : ch->tolower; src+= mblen; if (code > 0xFFFF) *dst++= (char) (uchar) ((code >> 16) & 0xFF); if (code > 0xFF) *dst++= (char) (uchar) ((code >> 8) & 0xFF); *dst++= (char) (uchar) (code & 0xFF); } else { if (mblen == 3) *dst++= *src++; *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O3
c
my_casefold_ujis: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, -0x40(%rbp) movq %rcx, %rbx movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0x4cdf7 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 addq %rsi, %r15 xorl %eax, %eax testq %r9, %r9 sete %al shll $0x2, %eax movq %rax, -0x38(%rbp) xorl %r14d, %r14d movq -0x30(%rbp), %rbx movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovll %r14d, %eax testl %eax, %eax je 0x4cd51 cmpl $0x2, %eax jne 0x4cd67 movzbl (%r12), %ecx movq 0x78(%r13), %rdx movq 0x8(%rdx), %rdx movq (%rdx,%rcx,8), %rcx testq %rcx, %rcx je 0x4cdc1 movzbl 0x1(%r12), %edx jmp 0x4cd88 movzbl (%r12), %eax incq %r12 movq -0x40(%rbp), %rcx movb (%rcx,%rax), %al movb %al, (%rbx) jmp 0x4cdeb movzbl 0x1(%r12), %ecx movq 0x78(%r13), %rdx movq 0x8(%rdx), %rdx movq 0x800(%rdx,%rcx,8), %rcx testq %rcx, %rcx je 0x4cdb0 movzbl 0x2(%r12), %edx leaq (%rdx,%rdx,2), %rdx leaq (%rcx,%rdx,4), %rcx testq %rcx, %rcx je 0x4cdb0 movq -0x38(%rbp), %rdx movl (%rcx,%rdx), %ecx cmpl $0x10000, %ecx # imm = 0x10000 jl 0x4cdd9 movl %ecx, %edx shrl $0x10, %edx movb %dl, (%rbx) incq %rbx jmp 0x4cde1 cmpl $0x3, %eax jne 0x4cdc1 movb (%r12), %al incq %r12 movb %al, (%rbx) incq %rbx movb (%r12), %al movb %al, (%rbx) movb 0x1(%r12), %al addq $0x2, %r12 movb %al, 0x1(%rbx) addq $0x2, %rbx jmp 0x4cdee cmpl $0x100, %ecx # imm = 0x100 jl 0x4cde6 movb %ch, (%rbx) incq %rbx addq %rax, %r12 movb %cl, (%rbx) incq %rbx cmpq %r15, %r12 jb 0x4cd0d subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casefold_ujis: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], r8 mov rbx, rcx mov [rbp+var_30], rcx test rdx, rdx jle loc_4CDF7 mov r15, rdx mov r12, rsi mov r13, rdi add r15, rsi xor eax, eax test r9, r9 setz al shl eax, 2 mov [rbp+var_38], rax xor r14d, r14d mov rbx, [rbp+var_30] loc_4CD0D: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r15 call qword ptr [rax+0C0h] cmp eax, 2 cmovl eax, r14d test eax, eax jz short loc_4CD51 cmp eax, 2 jnz short loc_4CD67 movzx ecx, byte ptr [r12] mov rdx, [r13+78h] mov rdx, [rdx+8] mov rcx, [rdx+rcx*8] test rcx, rcx jz short loc_4CDC1 movzx edx, byte ptr [r12+1] jmp short loc_4CD88 loc_4CD51: movzx eax, byte ptr [r12] inc r12 mov rcx, [rbp+var_40] mov al, [rcx+rax] mov [rbx], al jmp loc_4CDEB loc_4CD67: movzx ecx, byte ptr [r12+1] mov rdx, [r13+78h] mov rdx, [rdx+8] mov rcx, [rdx+rcx*8+800h] test rcx, rcx jz short loc_4CDB0 movzx edx, byte ptr [r12+2] loc_4CD88: lea rdx, [rdx+rdx*2] lea rcx, [rcx+rdx*4] test rcx, rcx jz short loc_4CDB0 mov rdx, [rbp+var_38] mov ecx, [rcx+rdx] cmp ecx, 10000h jl short loc_4CDD9 mov edx, ecx shr edx, 10h mov [rbx], dl inc rbx jmp short loc_4CDE1 loc_4CDB0: cmp eax, 3 jnz short loc_4CDC1 mov al, [r12] inc r12 mov [rbx], al inc rbx loc_4CDC1: mov al, [r12] mov [rbx], al mov al, [r12+1] add r12, 2 mov [rbx+1], al add rbx, 2 jmp short loc_4CDEE loc_4CDD9: cmp ecx, 100h jl short loc_4CDE6 loc_4CDE1: mov [rbx], ch inc rbx loc_4CDE6: add r12, rax mov [rbx], cl loc_4CDEB: inc rbx loc_4CDEE: cmp r12, r15 jb loc_4CD0D loc_4CDF7: sub rbx, [rbp+var_30] mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_casefold_ujis( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6) { unsigned __int8 *v6; // rbx unsigned __int8 *v7; // r12 unsigned long long v8; // r15 long long v9; // rax long long v10; // rcx long long v11; // rdx long long v12; // rax long long v13; // rcx int v14; // ecx unsigned __int8 v15; // al unsigned __int8 v16; // al long long v19; // [rsp+8h] [rbp-38h] v6 = a4; if ( a3 > 0 ) { v7 = a2; v8 = (unsigned long long)&a2[a3]; v19 = 4 * (unsigned int)(a6 == 0); v6 = a4; while ( 1 ) { v9 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v7, v8); if ( (int)v9 < 2 ) v9 = 0LL; if ( !(_DWORD)v9 ) { v12 = *v7++; *v6 = *(_BYTE *)(a5 + v12); goto LABEL_21; } if ( (_DWORD)v9 != 2 ) break; v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * *v7); if ( v10 ) { v11 = v7[1]; LABEL_12: v13 = v10 + 12 * v11; if ( v13 ) { v14 = *(_DWORD *)(v13 + v19); if ( v14 >= 0x10000 ) { *v6++ = BYTE2(v14); goto LABEL_19; } if ( v14 >= 256 ) LABEL_19: *v6++ = BYTE1(v14); v7 += v9; *v6 = v14; LABEL_21: ++v6; goto LABEL_22; } goto LABEL_15; } LABEL_17: *v6 = *v7; v16 = v7[1]; v7 += 2; v6[1] = v16; v6 += 2; LABEL_22: if ( (unsigned long long)v7 >= v8 ) return (_BYTE *)(v6 - a4); } v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * v7[1] + 2048); if ( v10 ) { v11 = v7[2]; goto LABEL_12; } LABEL_15: if ( (_DWORD)v9 == 3 ) { v15 = *v7++; *v6++ = v15; } goto LABEL_17; } return (_BYTE *)(v6 - a4); }
my_casefold_ujis: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],R8 MOV RBX,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x0014cdf7 MOV R15,RDX MOV R12,RSI MOV R13,RDI ADD R15,RSI XOR EAX,EAX TEST R9,R9 SETZ AL SHL EAX,0x2 MOV qword ptr [RBP + -0x38],RAX XOR R14D,R14D MOV RBX,qword ptr [RBP + -0x30] LAB_0014cd0d: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVL EAX,R14D TEST EAX,EAX JZ 0x0014cd51 CMP EAX,0x2 JNZ 0x0014cd67 MOVZX ECX,byte ptr [R12] MOV RDX,qword ptr [R13 + 0x78] MOV RDX,qword ptr [RDX + 0x8] MOV RCX,qword ptr [RDX + RCX*0x8] TEST RCX,RCX JZ 0x0014cdc1 MOVZX EDX,byte ptr [R12 + 0x1] JMP 0x0014cd88 LAB_0014cd51: MOVZX EAX,byte ptr [R12] INC R12 MOV RCX,qword ptr [RBP + -0x40] MOV AL,byte ptr [RCX + RAX*0x1] MOV byte ptr [RBX],AL JMP 0x0014cdeb LAB_0014cd67: MOVZX ECX,byte ptr [R12 + 0x1] MOV RDX,qword ptr [R13 + 0x78] MOV RDX,qword ptr [RDX + 0x8] MOV RCX,qword ptr [RDX + RCX*0x8 + 0x800] TEST RCX,RCX JZ 0x0014cdb0 MOVZX EDX,byte ptr [R12 + 0x2] LAB_0014cd88: LEA RDX,[RDX + RDX*0x2] LEA RCX,[RCX + RDX*0x4] TEST RCX,RCX JZ 0x0014cdb0 MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RCX + RDX*0x1] CMP ECX,0x10000 JL 0x0014cdd9 MOV EDX,ECX SHR EDX,0x10 MOV byte ptr [RBX],DL INC RBX JMP 0x0014cde1 LAB_0014cdb0: CMP EAX,0x3 JNZ 0x0014cdc1 MOV AL,byte ptr [R12] INC R12 MOV byte ptr [RBX],AL INC RBX LAB_0014cdc1: MOV AL,byte ptr [R12] MOV byte ptr [RBX],AL MOV AL,byte ptr [R12 + 0x1] ADD R12,0x2 MOV byte ptr [RBX + 0x1],AL ADD RBX,0x2 JMP 0x0014cdee LAB_0014cdd9: CMP ECX,0x100 JL 0x0014cde6 LAB_0014cde1: MOV byte ptr [RBX],CH INC RBX LAB_0014cde6: ADD R12,RAX MOV byte ptr [RBX],CL LAB_0014cdeb: INC RBX LAB_0014cdee: CMP R12,R15 JC 0x0014cd0d LAB_0014cdf7: SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casefold_ujis(long param_1,byte *param_2,long param_3,byte *param_4,long param_5, long param_6) { byte *pbVar1; byte bVar2; uint uVar3; int iVar4; long lVar6; byte *pbVar7; byte *pbVar8; ulong uVar5; pbVar7 = param_4; if (0 < param_3) { pbVar8 = param_2 + param_3; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar8); uVar5 = (ulong)uVar3; if ((int)uVar3 < 2) { uVar5 = 0; } iVar4 = (int)uVar5; if (iVar4 == 0) { bVar2 = *param_2; param_2 = param_2 + 1; *pbVar7 = *(byte *)(param_5 + (ulong)bVar2); LAB_0014cdeb: pbVar7 = pbVar7 + 1; } else { if (iVar4 == 2) { lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8); if (lVar6 != 0) { bVar2 = param_2[1]; LAB_0014cd88: lVar6 = lVar6 + (ulong)bVar2 * 0xc; if (lVar6 == 0) goto LAB_0014cdb0; iVar4 = *(int *)(lVar6 + (ulong)(param_6 == 0) * 4); if (iVar4 < 0x10000) { if (0xff < iVar4) goto LAB_0014cde1; } else { *pbVar7 = (byte)((uint)iVar4 >> 0x10); pbVar7 = pbVar7 + 1; LAB_0014cde1: *pbVar7 = (byte)((uint)iVar4 >> 8); pbVar7 = pbVar7 + 1; } param_2 = param_2 + uVar5; *pbVar7 = (byte)iVar4; goto LAB_0014cdeb; } } else { lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + 0x800 + (ulong)param_2[1] * 8 ); if (lVar6 != 0) { bVar2 = param_2[2]; goto LAB_0014cd88; } LAB_0014cdb0: if (iVar4 == 3) { bVar2 = *param_2; param_2 = param_2 + 1; *pbVar7 = bVar2; pbVar7 = pbVar7 + 1; } } *pbVar7 = *param_2; pbVar1 = param_2 + 1; param_2 = param_2 + 2; pbVar7[1] = *pbVar1; pbVar7 = pbVar7 + 2; } } while (param_2 < pbVar8); } return (long)pbVar7 - (long)param_4; }
30,925
ggml_graph_compute_thread_sync
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static inline void ggml_graph_compute_thread_sync(struct ggml_compute_state * state) { // TSAN doesn't support standalone fence yet, we use a dummy read-modify-write instead #ifdef GGML_TSAN_ENABLED atomic_fetch_add_explicit(&state->threadpool->n_graph, 0, memory_order_seq_cst); #else atomic_thread_fence(memory_order_seq_cst); #endif UNUSED(state); }
O0
c
ggml_graph_compute_thread_sync: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) mfence popq %rbp retq nopl (%rax)
ggml_graph_compute_thread_sync: push rbp mov rbp, rsp mov [rbp+var_8], rdi mfence pop rbp retn
void ggml_graph_compute_thread_sync() { _mm_mfence(); }
ggml_graph_compute_thread_sync: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MFENCE POP RBP RET
void ggml_graph_compute_thread_sync(void) { return; }
30,926
JS_DupAtom
bluesky950520[P]quickjs/quickjs.c
JSAtom JS_DupAtom(JSContext *ctx, JSAtom v) { JSRuntime *rt; JSAtomStruct *p; if (!__JS_AtomIsConst(v)) { rt = ctx->rt; p = rt->atom_array[v]; p->header.ref_count++; } return v; }
O0
c
JS_DupAtom: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movl %esi, 0x1c(%rsp) movl 0x1c(%rsp), %edi callq 0x2e2f0 cmpl $0x0, %eax jne 0x2e2db movq 0x20(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0x68(%rax), %rax movl 0x1c(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movl 0x1c(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
JS_DupAtom: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_C], esi mov edi, [rsp+28h+var_C] call __JS_AtomIsConst cmp eax, 0 jnz short loc_2E2DB mov rax, [rsp+28h+var_8] mov rax, [rax+18h] mov [rsp+28h+var_18], rax mov rax, [rsp+28h+var_18] mov rax, [rax+68h] mov ecx, [rsp+28h+var_C] mov rax, [rax+rcx*8] mov [rsp+28h+var_20], rax mov rax, [rsp+28h+var_20] mov ecx, [rax] add ecx, 1 mov [rax], ecx loc_2E2DB: mov eax, [rsp+28h+var_C] add rsp, 28h retn
long long JS_DupAtom(long long a1, unsigned int a2) { _DWORD *v2; // rax if ( !(unsigned int)_JS_AtomIsConst(a2) ) { v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * a2); ++*v2; } return a2; }
JS_DupAtom: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ESI MOV EDI,dword ptr [RSP + 0x1c] CALL 0x0012e2f0 CMP EAX,0x0 JNZ 0x0012e2db MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_0012e2db: MOV EAX,dword ptr [RSP + 0x1c] ADD RSP,0x28 RET
uint JS_DupAtom(long param_1,uint param_2) { int *piVar1; int iVar2; iVar2 = __JS_AtomIsConst(param_2); if (iVar2 == 0) { piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_2 * 8); *piVar1 = *piVar1 + 1; } return param_2; }
30,927
JS_DupAtom
bluesky950520[P]quickjs/quickjs.c
JSAtom JS_DupAtom(JSContext *ctx, JSAtom v) { JSRuntime *rt; JSAtomStruct *p; if (!__JS_AtomIsConst(v)) { rt = ctx->rt; p = rt->atom_array[v]; p->header.ref_count++; } return v; }
O1
c
JS_DupAtom: movl %esi, %eax cmpl $0xe0, %esi jl 0x23e1b movq 0x18(%rdi), %rcx movq 0x68(%rcx), %rcx movl %eax, %edx movq (%rcx,%rdx,8), %rcx incl (%rcx) retq
JS_DupAtom: mov eax, esi cmp esi, 0E0h jl short locret_23E1B mov rcx, [rdi+18h] mov rcx, [rcx+68h] mov edx, eax mov rcx, [rcx+rdx*8] inc dword ptr [rcx] locret_23E1B: retn
long long JS_DupAtom(long long a1, int a2) { long long result; // rax _DWORD *v3; // rcx result = (unsigned int)a2; if ( a2 >= 224 ) { v3 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 8LL * (unsigned int)a2); ++*v3; } return result; }
JS_DupAtom: MOV EAX,ESI CMP ESI,0xe0 JL 0x00123e1b MOV RCX,qword ptr [RDI + 0x18] MOV RCX,qword ptr [RCX + 0x68] MOV EDX,EAX MOV RCX,qword ptr [RCX + RDX*0x8] INC dword ptr [RCX] LAB_00123e1b: RET
void JS_DupAtom(long param_1,uint param_2) { int *piVar1; if (0xdf < (int)param_2) { piVar1 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + (ulong)param_2 * 8); *piVar1 = *piVar1 + 1; } return; }
30,928
ArenaAllocator::~ArenaAllocator()
BhuvanGudi[P]LexiParse/src/arena.hpp
~ArenaAllocator() { // No destructors are called for the stored objects. Thus, memory // leaks are possible (e.g. when storing std::vector objects or // other non-trivially destructable objects in the allocator). // Although this could be changed, it would come with additional // runtime overhead and therefore is not implemented. delete[] m_buffer; }
O0
cpp
ArenaAllocator::~ArenaAllocator(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x16737 movq -0x10(%rbp), %rdi callq 0x3240 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZN14ArenaAllocatorD2Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_10], rax cmp rax, 0 jz short loc_16737 mov rdi, [rbp+var_10]; void * call __ZdaPv; operator delete[](void *) loc_16737: add rsp, 10h pop rbp retn
void ArenaAllocator::~ArenaAllocator(ArenaAllocator *this) { void *v1; // [rsp+0h] [rbp-10h] v1 = (void *)*((_QWORD *)this + 1); if ( v1 ) operator delete[](v1); }
~ArenaAllocator: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x00116737 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00103240 LAB_00116737: ADD RSP,0x10 POP RBP RET
/* ArenaAllocator::~ArenaAllocator() */ void __thiscall ArenaAllocator::~ArenaAllocator(ArenaAllocator *this) { if (*(void **)(this + 8) != (void *)0x0) { operator_delete__(*(void **)(this + 8)); } return; }
30,929
ArenaAllocator::~ArenaAllocator()
BhuvanGudi[P]LexiParse/src/arena.hpp
~ArenaAllocator() { // No destructors are called for the stored objects. Thus, memory // leaks are possible (e.g. when storing std::vector objects or // other non-trivially destructable objects in the allocator). // Although this could be changed, it would come with additional // runtime overhead and therefore is not implemented. delete[] m_buffer; }
O2
cpp
ArenaAllocator::~ArenaAllocator(): movq 0x8(%rdi), %rdi testq %rdi, %rdi jne 0x21f0 retq
_ZN14ArenaAllocatorD2Ev: mov rdi, [rdi+8]; void * test rdi, rdi jnz __ZdaPv; operator delete[](void *) retn
void ArenaAllocator::~ArenaAllocator(ArenaAllocator *this) { void *v1; // rdi v1 = (void *)*((_QWORD *)this + 1); if ( v1 ) operator delete[](v1); }
LAB_001021f0: JMP qword ptr [0x0010d0f8] ~ArenaAllocator: MOV RDI,qword ptr [RDI + 0x8] TEST RDI,RDI JNZ 0x001021f0 RET
/* ArenaAllocator::~ArenaAllocator() */ void __thiscall ArenaAllocator::~ArenaAllocator(ArenaAllocator *this) { if (*(long *)(this + 8) == 0) { return; } (*(code *)PTR_operator_delete___0010d0f8)(); return; }
30,930
my_caseup_str_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb4(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->caseup_multiply == 1); while (*src && (srcres= my_mb_wc_utf8mb4_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_caseup_str_utf8mb4: 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 0x6ee6b movq 0x78(%rdi), %r15 movq %rbx, %r12 movq %rbx, %r14 leaq -0x30(%rbp), %rdi movq %r12, %rsi callq 0x721af testl %eax, %eax je 0x6ee6b movl %eax, %r13d movq -0x30(%rbp), %rdi cmpq (%r15), %rdi ja 0x6ee4c movq 0x8(%r15), %rax movq %rdi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0x6ee4c movzbl %dil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %edi movq %rdi, -0x30(%rbp) movq %r14, %rsi callq 0x722cb testl %eax, %eax je 0x6ee6b movl %r13d, %ecx movl %eax, %eax addq %rax, %r14 cmpb $0x0, (%r12,%rcx) leaq (%r12,%rcx), %r12 jne 0x6ee0d 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_caseup_str_utf8mb4: 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 short loc_6EE6B mov r15, [rdi+78h] mov r12, rbx mov r14, rbx loc_6EE0D: lea rdi, [rbp+var_30] mov rsi, r12 call my_mb_wc_utf8mb4_no_range test eax, eax jz short loc_6EE6B mov r13d, eax mov rdi, [rbp+var_30] cmp rdi, [r15] ja short loc_6EE4C mov rax, [r15+8] mov rcx, rdi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_6EE4C movzx ecx, dil lea rcx, [rcx+rcx*2] mov edi, [rax+rcx*4] mov [rbp+var_30], rdi loc_6EE4C: mov rsi, r14 call my_wc_mb_utf8mb4_no_range test eax, eax jz short loc_6EE6B mov ecx, r13d mov eax, eax add r14, rax cmp byte ptr [r12+rcx], 0 lea r12, [r12+rcx] jnz short loc_6EE0D loc_6EE6B: 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_caseup_str_utf8mb4(long long a1, _BYTE *a2) { long long v2; // rax _BYTE *v3; // r14 _QWORD *v4; // r15 _BYTE *v5; // r12 unsigned int v6; // eax unsigned int v7; // r13d long long v8; // rdi long long v9; // rax unsigned int v10; // eax bool v11; // zf _QWORD v13[6]; // [rsp+0h] [rbp-30h] BYREF v13[0] = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD **)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_mb_wc_utf8mb4_no_range(v13, v5); if ( !v6 ) break; v7 = v6; v8 = v13[0]; if ( v13[0] <= *v4 ) { v9 = *(_QWORD *)(v4[1] + 8LL * (v13[0] >> 8)); if ( v9 ) { v8 = *(unsigned int *)(v9 + 12LL * LOBYTE(v13[0])); v13[0] = v8; } } v10 = my_wc_mb_utf8mb4_no_range(v8, v3); if ( !v10 ) break; v3 += v10; v11 = v5[v7] == 0; v5 += v7; } while ( !v11 ); } *v3 = 0; return v3 - a2; }
my_caseup_str_utf8mb4: 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 0x0016ee6b MOV R15,qword ptr [RDI + 0x78] MOV R12,RBX MOV R14,RBX LAB_0016ee0d: LEA RDI,[RBP + -0x30] MOV RSI,R12 CALL 0x001721af TEST EAX,EAX JZ 0x0016ee6b MOV R13D,EAX MOV RDI,qword ptr [RBP + -0x30] CMP RDI,qword ptr [R15] JA 0x0016ee4c MOV RAX,qword ptr [R15 + 0x8] MOV RCX,RDI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x0016ee4c MOVZX ECX,DIL LEA RCX,[RCX + RCX*0x2] MOV EDI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x30],RDI LAB_0016ee4c: MOV RSI,R14 CALL 0x001722cb TEST EAX,EAX JZ 0x0016ee6b MOV ECX,R13D MOV EAX,EAX ADD R14,RAX CMP byte ptr [R12 + RCX*0x1],0x0 LEA R12,[R12 + RCX*0x1] JNZ 0x0016ee0d LAB_0016ee6b: 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_caseup_str_utf8mb4(long param_1,char *param_2) { char *pcVar1; ulong *puVar2; long lVar3; uint uVar4; uint uVar5; ulong in_RAX; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { puVar2 = *(ulong **)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar4 = my_mb_wc_utf8mb4_no_range(&local_38,pcVar6); if (uVar4 == 0) break; if ((local_38 <= *puVar2) && (lVar3 = *(long *)(puVar2[1] + (local_38 >> 8) * 8), lVar3 != 0)) { local_38 = (ulong)*(uint *)(lVar3 + (local_38 & 0xff) * 0xc); } uVar5 = my_wc_mb_utf8mb4_no_range(local_38,pcVar7); if (uVar5 == 0) break; pcVar7 = pcVar7 + uVar5; pcVar1 = pcVar6 + uVar4; pcVar6 = pcVar6 + uVar4; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
30,931
my_register_filename
eloqsql/mysys/my_open.c
File my_register_filename(File fd, const char *FileName, enum file_type type_of_file, uint error_message_number, myf MyFlags) { DBUG_ENTER("my_register_filename"); if ((int) fd >= MY_FILE_MIN) { my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED); if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER)) DBUG_RETURN(fd); my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags); statistic_increment(my_file_total_opened,&THR_LOCK_open); my_file_info[fd].type = type_of_file; DBUG_PRINT("exit",("fd: %d",fd)); DBUG_RETURN(fd); } my_errno= errno; DBUG_PRINT("error",("Got error %d on open", my_errno)); if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) { if (my_errno == EMFILE) error_message_number= EE_OUT_OF_FILERESOURCES; my_error(error_message_number, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), FileName, my_errno); } DBUG_RETURN(-1); }
O0
c
my_register_filename: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq %r8, -0x20(%rbp) cmpl $0x0, -0x8(%rbp) jl 0x668f6 movl $0x1, -0x24(%rbp) movl -0x24(%rbp), %eax leaq 0x3a8f40(%rip), %rcx # 0x40f794 lock xaddl %eax, (%rcx) movl %eax, -0x28(%rbp) movl -0x8(%rbp), %eax leaq 0x1ae5eb(%rip), %rcx # 0x214e50 cmpl (%rcx), %eax jae 0x66879 movq -0x20(%rbp), %rax andq $0x2004, %rax # imm = 0x2004 cmpq $0x0, %rax je 0x66886 jmp 0x6687b movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x6696d leaq 0x3a9437(%rip), %rax # 0x40fcc4 movl (%rax), %edi movq -0x10(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x5a350 movq %rax, %rcx leaq 0x1ae5b2(%rip), %rax # 0x214e58 movq (%rax), %rax movslq -0x8(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movq %rcx, (%rax) leaq 0x3a8ec2(%rip), %rax # 0x40f780 movq (%rax), %rcx addq $0x1, %rcx leaq 0x3a8eb4(%rip), %rax # 0x40f780 movq %rcx, (%rax) movl -0x14(%rbp), %ecx leaq 0x1ae57f(%rip), %rax # 0x214e58 movq (%rax), %rax movslq -0x8(%rbp), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x8(%rax) jmp 0x668ec jmp 0x668ee movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x6696d callq 0x26050 movl (%rax), %eax movl %eax, -0x2c(%rbp) callq 0x5b3e0 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) jmp 0x6690c movq -0x20(%rbp), %rax andq $0x19, %rax cmpq $0x0, %rax je 0x66964 callq 0x5b3e0 cmpl $0x18, (%rax) jne 0x6692b movl $0x17, -0x18(%rbp) movl -0x18(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x20(%rbp), %rax andq $0x440, %rax # imm = 0x440 orq $0x4, %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) callq 0x5b3e0 movl -0x44(%rbp), %edi movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdx movl (%rax), %ecx movb $0x0, %al callq 0x658c0 jmp 0x66966 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_register_filename: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov [rbp+var_20], r8 cmp [rbp+var_8], 0 jl loc_668F6 mov [rbp+var_24], 1 mov eax, [rbp+var_24] lea rcx, my_file_opened lock xadd [rcx], eax mov [rbp+var_28], eax mov eax, [rbp+var_8] lea rcx, my_file_limit cmp eax, [rcx] jnb short loc_66879 mov rax, [rbp+var_20] and rax, 2004h cmp rax, 0 jz short loc_66886 loc_66879: jmp short $+2 loc_6687B: mov eax, [rbp+var_8] mov [rbp+var_4], eax jmp loc_6696D loc_66886: lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, [rbp+var_10] mov rdx, [rbp+var_20] call my_strdup mov rcx, rax lea rax, my_file_info mov rax, [rax] movsxd rdx, [rbp+var_8] shl rdx, 4 add rax, rdx mov [rax], rcx lea rax, my_file_total_opened mov rcx, [rax] add rcx, 1 lea rax, my_file_total_opened mov [rax], rcx mov ecx, [rbp+var_14] lea rax, my_file_info mov rax, [rax] movsxd rdx, [rbp+var_8] shl rdx, 4 add rax, rdx mov [rax+8], ecx jmp short $+2 loc_668EC: jmp short $+2 loc_668EE: mov eax, [rbp+var_8] mov [rbp+var_4], eax jmp short loc_6696D loc_668F6: call ___errno_location mov eax, [rax] mov [rbp+var_2C], eax call _my_thread_var mov ecx, [rbp+var_2C] mov [rax], ecx jmp short $+2 loc_6690C: mov rax, [rbp+var_20] and rax, 19h cmp rax, 0 jz short loc_66964 call _my_thread_var cmp dword ptr [rax], 18h jnz short loc_6692B mov [rbp+var_18], 17h loc_6692B: mov eax, [rbp+var_18] mov [rbp+var_44], eax mov rax, [rbp+var_20] and rax, 440h or rax, 4 mov [rbp+var_40], rax mov rax, [rbp+var_10] mov [rbp+var_38], rax call _my_thread_var mov edi, [rbp+var_44] mov rsi, [rbp+var_40] mov rdx, [rbp+var_38] mov ecx, [rax] mov al, 0 call my_error loc_66964: jmp short $+2 loc_66966: mov [rbp+var_4], 0FFFFFFFFh loc_6696D: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long my_register_filename(unsigned int a1, long long a2, int a3, unsigned int a4, __int16 a5) { unsigned int *v5; // rax int v7; // [rsp+24h] [rbp-2Ch] if ( (a1 & 0x80000000) != 0 ) { v7 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v7; if ( (a5 & 0x19) != 0 ) { if ( *(_DWORD *)my_thread_var() == 24 ) a4 = 23; v5 = (unsigned int *)my_thread_var(); my_error(a4, a5 & 0x440 | 4LL, a2, *v5); } return (unsigned int)-1; } else { _InterlockedExchangeAdd(my_file_opened, 1u); if ( a1 >= my_file_limit || (a5 & 0x2004) != 0 ) { return a1; } else { *((_QWORD *)my_file_info + 2 * (int)a1) = my_strdup(key_memory_my_file_info, a2, a5); ++my_file_total_opened; *((_DWORD *)my_file_info + 4 * (int)a1 + 2) = a3; return a1; } } }
my_register_filename: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV qword ptr [RBP + -0x20],R8 CMP dword ptr [RBP + -0x8],0x0 JL 0x001668f6 MOV dword ptr [RBP + -0x24],0x1 MOV EAX,dword ptr [RBP + -0x24] LEA RCX,[0x50f794] XADD.LOCK dword ptr [RCX],EAX MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x8] LEA RCX,[0x314e50] CMP EAX,dword ptr [RCX] JNC 0x00166879 MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x2004 CMP RAX,0x0 JZ 0x00166886 LAB_00166879: JMP 0x0016687b LAB_0016687b: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x0016696d LAB_00166886: LEA RAX,[0x50fcc4] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0015a350 MOV RCX,RAX LEA RAX,[0x314e58] MOV RAX,qword ptr [RAX] MOVSXD RDX,dword ptr [RBP + -0x8] SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RAX],RCX LEA RAX,[0x50f780] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x50f780] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x14] LEA RAX,[0x314e58] MOV RAX,qword ptr [RAX] MOVSXD RDX,dword ptr [RBP + -0x8] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x8],ECX JMP 0x001668ec LAB_001668ec: JMP 0x001668ee LAB_001668ee: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX JMP 0x0016696d LAB_001668f6: CALL 0x00126050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CALL 0x0015b3e0 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX JMP 0x0016690c LAB_0016690c: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x19 CMP RAX,0x0 JZ 0x00166964 CALL 0x0015b3e0 CMP dword ptr [RAX],0x18 JNZ 0x0016692b MOV dword ptr [RBP + -0x18],0x17 LAB_0016692b: MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x440 OR RAX,0x4 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX CALL 0x0015b3e0 MOV EDI,dword ptr [RBP + -0x44] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX] MOV AL,0x0 CALL 0x001658c0 LAB_00166964: JMP 0x00166966 LAB_00166966: MOV dword ptr [RBP + -0x4],0xffffffff LAB_0016696d: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
uint my_register_filename (uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5) { int iVar1; int8 uVar2; int *piVar3; int4 *puVar4; int4 local_20; uint local_c; if ((int)param_1 < 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; if ((param_5 & 0x19) != 0) { piVar3 = (int *)_my_thread_var(); local_20 = param_4; if (*piVar3 == 0x18) { local_20 = 0x17; } puVar4 = (int4 *)_my_thread_var(); my_error(local_20,param_5 & 0x440 | 4,param_2,*puVar4); } local_c = 0xffffffff; } else { LOCK(); my_file_opened = my_file_opened + 1; UNLOCK(); local_c = param_1; if ((param_1 < my_file_limit) && ((param_5 & 0x2004) == 0)) { uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5); *(int8 *)(my_file_info + (long)(int)param_1 * 0x10) = uVar2; my_file_total_opened = my_file_total_opened + 1; *(int4 *)(my_file_info + (long)(int)param_1 * 0x10 + 8) = param_3; } } return local_c; }
30,932
report_cut_value_error(THD*, unsigned int, char const*)
eloqsql/sql/item_sum.cc
static void report_cut_value_error(THD *thd, uint row_count, const char *fname) { size_t fn_len= strlen(fname); char *fname_upper= (char *) my_alloca(fn_len + 1); if (!fname_upper) fname_upper= (char*) fname; // Out of memory else memcpy(fname_upper, fname, fn_len+1); my_caseup_str(&my_charset_latin1, fname_upper); push_warning_printf(thd, Sql_condition::WARN_LEVEL_WARN, ER_CUT_VALUE_GROUP_CONCAT, ER_THD(thd, ER_CUT_VALUE_GROUP_CONCAT), row_count, fname_upper); my_afree(fname_upper); }
O0
cpp
report_cut_value_error(THD*, unsigned int, char const*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x7585f0 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rcx addq $0x10, %rcx andq $-0x10, %rcx movq %rsp, %rax subq %rcx, %rax movq %rax, %rsp movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0xd08ba7 movq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0xd08bbc movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx addq $0x1, %rdx callq 0x759350 leaq 0xeab6fd(%rip), %rdi # 0x1bb42c0 movq 0xb8(%rdi), %rax movq 0x40(%rax), %rax movq -0x30(%rbp), %rsi callq *%rax movq -0x10(%rbp), %rdi movq 0xb90(%rdi), %rax movq (%rax), %rax movq 0x820(%rax), %rcx movl -0x14(%rbp), %r8d movq -0x30(%rbp), %r9 xorl %eax, %eax movl $0x1, %esi movl $0x4ec, %edx # imm = 0x4EC callq 0x8ab3d0 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xd08c19 movq %rbp, %rsp popq %rbp retq callq 0x758480 nop
_ZL22report_cut_value_errorP3THDjPKc: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rdi, [rbp+var_20] call _strlen mov [rbp+var_28], rax mov rcx, [rbp+var_28] add rcx, 10h and rcx, 0FFFFFFFFFFFFFFF0h mov rax, rsp sub rax, rcx mov rsp, rax mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_D08BA7 mov rax, [rbp+var_20] mov [rbp+var_30], rax jmp short loc_D08BBC loc_D08BA7: mov rdi, [rbp+var_30] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] add rdx, 1 call _memcpy loc_D08BBC: lea rdi, my_charset_latin1 mov rax, [rdi+0B8h] mov rax, [rax+40h] mov rsi, [rbp+var_30] call rax mov rdi, [rbp+var_10] mov rax, [rdi+0B90h] mov rax, [rax] mov rcx, [rax+820h] mov r8d, [rbp+var_14] mov r9, [rbp+var_30] xor eax, eax mov esi, 1 mov edx, 4ECh call _Z19push_warning_printfP3THDN21Sql_state_errno_level18enum_warning_levelEjPKcz; push_warning_printf(THD *,Sql_state_errno_level::enum_warning_level,uint,char const*,...) mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_D08C19 mov rsp, rbp pop rbp retn loc_D08C19: call ___stack_chk_fail
unsigned long long report_cut_value_error(THD *a1, unsigned int a2, const char *a3) { char *v4; // [rsp+0h] [rbp-30h] BYREF long long v5; // [rsp+8h] [rbp-28h] const char *v6; // [rsp+10h] [rbp-20h] unsigned int v7; // [rsp+1Ch] [rbp-14h] THD *v8; // [rsp+20h] [rbp-10h] unsigned long long v9; // [rsp+28h] [rbp-8h] v9 = __readfsqword(0x28u); v8 = a1; v7 = a2; v6 = a3; v5 = strlen(a3); v4 = (char *)&v4 - ((v5 + 16) & 0xFFFFFFFFFFFFFFF0LL); if ( v4 ) memcpy(v4, v6, v5 + 1); else v4 = (char *)v6; (*(void ( **)(void *, char *))(*((_QWORD *)&my_charset_latin1 + 23) + 64LL))(&my_charset_latin1, v4); push_warning_printf(v8, 1u, 0x4ECu, *(_QWORD *)(**((_QWORD **)v8 + 370) + 2080LL), v7, v4); return __readfsqword(0x28u); }
size_of: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV EAX,0x100 POP RBP RET
/* Field_vers_trx_id::size_of() const */ int8 Field_vers_trx_id::size_of(void) { return 0x100; }
30,933
apply_one_rule
eloqsql/strings/ctype-uca.c
static my_bool apply_one_rule(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules, MY_COLL_RULE *r, MY_UCA_WEIGHT_LEVEL *dst) { size_t nweights; size_t nreset= my_coll_rule_reset_length(r); /* Length of reset sequence */ size_t nshift= my_coll_rule_shift_length(r); /* Length of shift sequence */ uint16 *to; my_bool rc; if ((rules->shift_after_method == my_shift_method_expand && r->diff[0]) || r->before_level == 1) { /* Suppose we have this rule: &B[before primary] < C i.e. we need to put C before B, but after A, so the result order is: A < C < B. Let primary weight of B be [BBBB]. We cannot just use [BBBB-1] as weight for C: DUCET does not have enough unused weights between any two characters, so using [BBBB-1] will likely make C equal to the previous character, which is A, so we'll get this order instead of the desired: A = C < B. To guarantee that that C is sorted after A, we'll use expansion with a kind of "biggest possible character". As "biggest possible character" we'll use "last_non_ignorable": We'll compose weight for C as: [BBBB-1][MMMM+1] where [MMMM] is weight for "last_non_ignorable". We also do the same trick for "reset after" if the collation option says so. E.g. for the rules "&B < C", weight for C will be calculated as: [BBBB][MMMM+1] At this point we only need to store codepoints 'B' and 'last_non_ignorable'. Actual weights for 'C' will be calculated according to the above formula later, in create_tailoring(). */ if (!my_coll_rule_expand(r->base, MY_UCA_MAX_EXPANSION, rules->uca->last_non_ignorable)) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return TRUE; } nreset= my_coll_rule_reset_length(r); } if (nshift >= 2) /* Contraction */ { MY_CONTRACTIONS *contractions= &dst->contractions; to= my_uca_init_one_contraction(contractions, r->curr, (uint)nshift, r->with_context); /* Store weights of the "reset to" character */ dst->contractions.nitems--; /* Temporarily hide - it's incomplete */ rc= my_char_weight_put(dst, to, MY_UCA_CONTRACTION_MAX_WEIGHT_SIZE, &nweights, r->base, nreset); dst->contractions.nitems++; /* Activate, now it's complete */ } else { my_wc_t pagec= (r->curr[0] >> 8); DBUG_ASSERT(dst->weights[pagec]); to= my_char_weight_addr(dst, r->curr[0]); /* Store weights of the "reset to" character */ rc= my_char_weight_put(dst, to, dst->lengths[pagec], &nweights, r->base, nreset); } if (rc) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return rc; } /* Apply level difference. */ return apply_shift(loader, rules, r, dst->levelno, to, nweights); }
O0
c
apply_one_rule: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x56690 movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0x566b0 movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0x56069 movq -0x20(%rbp), %rax cmpl $0x0, 0x80(%rax) jne 0x56077 movq -0x20(%rbp), %rax cmpq $0x1, 0x90(%rax) jne 0x560c8 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rdx movl $0xa, %esi callq 0x55a70 cmpl $0x0, %eax jne 0x560bb movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2c656(%rip), %rdx # 0x82703 callq 0x566e0 movb $0x1, -0x1(%rbp) jmp 0x561e8 movq -0x20(%rbp), %rdi callq 0x56690 movq %rax, -0x38(%rbp) cmpq $0x2, -0x40(%rbp) jb 0x56144 movq -0x28(%rbp), %rax addq $0x18, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x50, %rsi movq -0x40(%rbp), %rax movl %eax, %edx movq -0x20(%rbp), %rax movsbl 0x98(%rax), %ecx callq 0x56200 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x18(%rax) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 movl $0x11, %edx leaq -0x30(%rbp), %rcx callq 0x567a0 movb %al, -0x49(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) jmp 0x5619b movq -0x20(%rbp), %rax movq 0x50(%rax), %rax shrq $0x8, %rax movq %rax, -0x60(%rbp) jmp 0x56156 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x50(%rax), %rax movl %eax, %esi callq 0x53f60 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq -0x60(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 leaq -0x30(%rbp), %rcx callq 0x567a0 movb %al, -0x49(%rbp) cmpb $0x0, -0x49(%rbp) je 0x561c5 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2c54b(%rip), %rdx # 0x82703 callq 0x566e0 movb -0x49(%rbp), %al movb %al, -0x1(%rbp) jmp 0x561e8 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rax movl 0x30(%rax), %ecx movq -0x48(%rbp), %r8 movq -0x30(%rbp), %r9 callq 0x569a0 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
apply_one_rule: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax mov rdi, [rbp+var_20] call my_coll_rule_shift_length mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp dword ptr [rax+30h], 1 jnz short loc_56069 mov rax, [rbp+var_20] cmp dword ptr [rax+80h], 0 jnz short loc_56077 loc_56069: mov rax, [rbp+var_20] cmp qword ptr [rax+90h], 1 jnz short loc_560C8 loc_56077: mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov rax, [rax+8] mov rdx, [rax+78h] mov esi, 0Ah call my_coll_rule_expand cmp eax, 0 jnz short loc_560BB mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov [rbp+var_1], 1 jmp loc_561E8 loc_560BB: mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax loc_560C8: cmp [rbp+var_40], 2 jb short loc_56144 mov rax, [rbp+var_28] add rax, 18h mov [rbp+var_58], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_20] add rsi, 50h ; 'P' mov rax, [rbp+var_40] mov edx, eax mov rax, [rbp+var_20] movsx ecx, byte ptr [rax+98h] call my_uca_init_one_contraction mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+18h], rcx mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov r8, [rbp+var_20] mov r9, [rbp+var_38] mov edx, 11h lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx jmp short loc_5619B loc_56144: mov rax, [rbp+var_20] mov rax, [rax+50h] shr rax, 8 mov [rbp+var_60], rax jmp short $+2 loc_56156: mov rdi, [rbp+var_28] mov rax, [rbp+var_20] mov rax, [rax+50h] mov esi, eax call my_char_weight_addr mov [rbp+var_48], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov rax, [rbp+var_28] mov rax, [rax+8] mov rcx, [rbp+var_60] movzx eax, byte ptr [rax+rcx] mov edx, eax mov r8, [rbp+var_20] mov r9, [rbp+var_38] lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al loc_5619B: cmp [rbp+var_49], 0 jz short loc_561C5 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov al, [rbp+var_49] mov [rbp+var_1], al jmp short loc_561E8 loc_561C5: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_28] mov ecx, [rax+30h] mov r8, [rbp+var_48] mov r9, [rbp+var_30] call apply_shift mov [rbp+var_1], al loc_561E8: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char apply_one_rule(long long a1, long long a2, long long a3, _QWORD *a4) { long long v5; // [rsp+0h] [rbp-60h] char v6; // [rsp+17h] [rbp-49h] long long inited; // [rsp+18h] [rbp-48h] unsigned long long v8; // [rsp+20h] [rbp-40h] long long v9; // [rsp+28h] [rbp-38h] long long v10; // [rsp+30h] [rbp-30h] BYREF _QWORD *v11; // [rsp+38h] [rbp-28h] long long v12; // [rsp+40h] [rbp-20h] long long v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v9 = my_coll_rule_reset_length(a3); v8 = my_coll_rule_shift_length(v12); if ( *(_DWORD *)(a2 + 48) == 1 && *(_DWORD *)(v12 + 128) || *(_QWORD *)(v12 + 144) == 1LL ) { if ( !(unsigned int)my_coll_rule_expand(v12, 0xAuLL, *(_QWORD *)(*(_QWORD *)(v13 + 8) + 120LL)) ) { my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return 1; } v9 = my_coll_rule_reset_length(v12); } if ( v8 < 2 ) { v5 = *(_QWORD *)(v12 + 80) >> 8; inited = my_char_weight_addr(v11, *(_QWORD *)(v12 + 80)); v6 = my_char_weight_put(v11, inited, *(unsigned __int8 *)(v11[1] + v5), &v10, v12, v9); } else { inited = my_uca_init_one_contraction(v11 + 3, v12 + 80, (unsigned int)v8, (unsigned int)*(char *)(v12 + 152)); --v11[3]; v6 = my_char_weight_put(v11, inited, 17LL, &v10, v12, v9); ++v11[3]; } if ( !v6 ) return apply_shift(v14, v13, v12, *((unsigned int *)v11 + 12), inited, v10); my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return v6; }
apply_one_rule: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00156690 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001566b0 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x00156069 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x80],0x0 JNZ 0x00156077 LAB_00156069: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x90],0x1 JNZ 0x001560c8 LAB_00156077: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x78] MOV ESI,0xa CALL 0x00155a70 CMP EAX,0x0 JNZ 0x001560bb MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x182703] CALL 0x001566e0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001561e8 LAB_001560bb: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00156690 MOV qword ptr [RBP + -0x38],RAX LAB_001560c8: CMP qword ptr [RBP + -0x40],0x2 JC 0x00156144 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x50 MOV RAX,qword ptr [RBP + -0x40] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + 0x98] CALL 0x00156200 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,-0x1 MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] MOV EDX,0x11 LEA RCX,[RBP + -0x30] CALL 0x001567a0 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX JMP 0x0015619b LAB_00156144: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] SHR RAX,0x8 MOV qword ptr [RBP + -0x60],RAX JMP 0x00156156 LAB_00156156: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] MOV ESI,EAX CALL 0x00153f60 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x60] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] LEA RCX,[RBP + -0x30] CALL 0x001567a0 MOV byte ptr [RBP + -0x49],AL LAB_0015619b: CMP byte ptr [RBP + -0x49],0x0 JZ 0x001561c5 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x182703] CALL 0x001566e0 MOV AL,byte ptr [RBP + -0x49] MOV byte ptr [RBP + -0x1],AL JMP 0x001561e8 LAB_001561c5: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x30] MOV R8,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x30] CALL 0x001569a0 MOV byte ptr [RBP + -0x1],AL LAB_001561e8: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int8 apply_one_rule(int8 param_1,long param_2,long param_3,long param_4) { char extraout_AL; int iVar1; ulong uVar2; int7 extraout_var; int8 uVar3; int7 uVar4; int7 extraout_var_00; char local_51; int8 local_50; int8 local_40; int8 local_38; long local_30; long local_28; long local_20; int8 local_18; char local_9; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_40 = my_coll_rule_reset_length(param_3); uVar2 = my_coll_rule_shift_length(local_28); if (((*(int *)(local_20 + 0x30) == 1) && (*(int *)(local_28 + 0x80) != 0)) || (*(long *)(local_28 + 0x90) == 1)) { iVar1 = my_coll_rule_expand(local_28,10,*(int8 *)(*(long *)(local_20 + 8) + 0x78)); if (iVar1 == 0) { my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); local_9 = '\x01'; uVar4 = extraout_var; goto LAB_001561e8; } local_40 = my_coll_rule_reset_length(local_28); } if (uVar2 < 2) { uVar2 = *(ulong *)(local_28 + 0x50); local_50 = my_char_weight_addr(local_30,*(ulong *)(local_28 + 0x50) & 0xffffffff); local_51 = my_char_weight_put(local_30,local_50, *(int1 *)(*(long *)(local_30 + 8) + (uVar2 >> 8)),&local_38, local_28,local_40); } else { local_50 = my_uca_init_one_contraction (local_30 + 0x18,local_28 + 0x50,uVar2 & 0xffffffff, (int)*(char *)(local_28 + 0x98)); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + -1; local_51 = my_char_weight_put(local_30,local_50,0x11,&local_38,local_28,local_40); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + 1; } if (local_51 == '\0') { apply_shift(local_18,local_20,local_28,*(int4 *)(local_30 + 0x30),local_50,local_38); uVar4 = extraout_var_00; local_9 = extraout_AL; } else { uVar3 = my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); uVar4 = (int7)((ulong)uVar3 >> 8); local_9 = local_51; } LAB_001561e8: return CONCAT71(uVar4,local_9); }
30,934
my_lengthsp_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_lengthsp_utf32(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, size_t length) { const char *end= ptr + length; DBUG_ASSERT((length % 4) == 0); while (end > ptr + 3 && end[-1] == ' ' && !end[-2] && !end[-3] && !end[-4]) end-= 4; return (size_t) (end - ptr); }
O0
c
my_lengthsp_utf32: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x5bcce jmp 0x5bcd0 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rdx addq $0x3, %rdx xorl %eax, %eax cmpq %rdx, %rcx movb %al, -0x21(%rbp) jbe 0x5bd26 movq -0x20(%rbp), %rax movsbl -0x1(%rax), %ecx xorl %eax, %eax cmpl $0x20, %ecx movb %al, -0x21(%rbp) jne 0x5bd26 movq -0x20(%rbp), %rcx xorl %eax, %eax cmpb $0x0, -0x2(%rcx) movb %al, -0x21(%rbp) jne 0x5bd26 movq -0x20(%rbp), %rcx xorl %eax, %eax cmpb $0x0, -0x3(%rcx) movb %al, -0x21(%rbp) jne 0x5bd26 movq -0x20(%rbp), %rax cmpb $0x0, -0x4(%rax) setne %al xorb $-0x1, %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0x5bd2f jmp 0x5bd3d movq -0x20(%rbp), %rax addq $-0x4, %rax movq %rax, -0x20(%rbp) jmp 0x5bcd0 movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopw (%rax,%rax)
my_lengthsp_utf32: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_20], rax jmp short $+2 loc_5BCCE: jmp short $+2 loc_5BCD0: mov rcx, [rbp+var_20] mov rdx, [rbp+var_10] add rdx, 3 xor eax, eax cmp rcx, rdx mov [rbp+var_21], al jbe short loc_5BD26 mov rax, [rbp+var_20] movsx ecx, byte ptr [rax-1] xor eax, eax cmp ecx, 20h ; ' ' mov [rbp+var_21], al jnz short loc_5BD26 mov rcx, [rbp+var_20] xor eax, eax cmp byte ptr [rcx-2], 0 mov [rbp+var_21], al jnz short loc_5BD26 mov rcx, [rbp+var_20] xor eax, eax cmp byte ptr [rcx-3], 0 mov [rbp+var_21], al jnz short loc_5BD26 mov rax, [rbp+var_20] cmp byte ptr [rax-4], 0 setnz al xor al, 0FFh mov [rbp+var_21], al loc_5BD26: mov al, [rbp+var_21] test al, 1 jnz short loc_5BD2F jmp short loc_5BD3D loc_5BD2F: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_20], rax jmp short loc_5BCD0 loc_5BD3D: mov rax, [rbp+var_20] mov rcx, [rbp+var_10] sub rax, rcx pop rbp retn
long long my_lengthsp_utf32(long long a1, long long a2, long long a3) { char v4; // [rsp+1h] [rbp-21h] unsigned long long i; // [rsp+2h] [rbp-20h] for ( i = a3 + a2; ; i -= 4LL ) { v4 = 0; if ( i > a2 + 3 ) { v4 = 0; if ( *(_BYTE *)(i - 1) == 32 ) { v4 = 0; if ( !*(_BYTE *)(i - 2) ) { v4 = 0; if ( !*(_BYTE *)(i - 3) ) v4 = ~(*(_BYTE *)(i - 4) != 0); } } } if ( (v4 & 1) == 0 ) break; } return i - a2; }
my_lengthsp_utf32: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX JMP 0x0015bcce LAB_0015bcce: JMP 0x0015bcd0 LAB_0015bcd0: MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x3 XOR EAX,EAX CMP RCX,RDX MOV byte ptr [RBP + -0x21],AL JBE 0x0015bd26 MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + -0x1] XOR EAX,EAX CMP ECX,0x20 MOV byte ptr [RBP + -0x21],AL JNZ 0x0015bd26 MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX + -0x2],0x0 MOV byte ptr [RBP + -0x21],AL JNZ 0x0015bd26 MOV RCX,qword ptr [RBP + -0x20] XOR EAX,EAX CMP byte ptr [RCX + -0x3],0x0 MOV byte ptr [RBP + -0x21],AL JNZ 0x0015bd26 MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + -0x4],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x21],AL LAB_0015bd26: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x0015bd2f JMP 0x0015bd3d LAB_0015bd2f: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x4 MOV qword ptr [RBP + -0x20],RAX JMP 0x0015bcd0 LAB_0015bd3d: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX POP RBP RET
long my_lengthsp_utf32(int8 param_1,long param_2,long param_3) { bool bVar1; int8 local_28; local_28 = param_2 + param_3; while( true ) { bVar1 = false; if ((((param_2 + 3U < local_28) && (bVar1 = false, *(char *)(local_28 - 1) == ' ')) && (bVar1 = false, *(char *)(local_28 - 2) == '\0')) && (bVar1 = false, *(char *)(local_28 - 3) == '\0')) { bVar1 = *(char *)(local_28 - 4) == '\0'; } if (!bVar1) break; local_28 = local_28 - 4; } return local_28 - param_2; }
30,935
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::start_object(unsigned long)
monkey531[P]llama/common/json.hpp
bool start_object(std::size_t len) { // check callback for object start const bool keep = callback(static_cast<int>(ref_stack.size()), parse_event_t::object_start, discarded); keep_stack.push_back(keep); auto val = handle_value(BasicJsonType::value_t::object, true); ref_stack.push_back(val.second); // check object limit if (ref_stack.back() && JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) { JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); } return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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>>::start_object(unsigned long): subq $0xa8, %rsp movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movq 0xa0(%rsp), %rdi movq %rdi, 0x20(%rsp) movq %rdi, %rax addq $0x80, %rax movq %rax, 0x18(%rsp) addq $0x8, %rdi callq 0xadbd0 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rcx movl %eax, %esi addq $0xa8, %rcx xorl %edx, %edx callq 0xadb70 movq 0x20(%rsp), %rdi andb $0x1, %al movb %al, 0x97(%rsp) addq $0x20, %rdi movb 0x97(%rsp), %al andb $0x1, %al movzbl %al, %esi callq 0xaa820 movq 0x20(%rsp), %rdi movb $0x1, 0x7f(%rsp) leaq 0x7f(%rsp), %rsi movl $0x1, %edx callq 0xadbf0 movq 0x20(%rsp), %rdi movb %al, 0x80(%rsp) movq %rdx, 0x88(%rsp) addq $0x8, %rdi leaq 0x80(%rsp), %rsi addq $0x8, %rsi callq 0xae150 movq 0x20(%rsp), %rdi addq $0x8, %rdi callq 0xae1c0 cmpq $0x0, (%rax) je 0xacd82 xorl %eax, %eax cmpq $-0x1, 0x98(%rsp) movb %al, 0x17(%rsp) je 0xacc98 movq 0x20(%rsp), %rdi movq 0x98(%rsp), %rax movq %rax, 0x8(%rsp) addq $0x8, %rdi callq 0xae1c0 movq (%rax), %rdi callq 0xae200 movq %rax, %rcx movq 0x8(%rsp), %rax cmpq %rcx, %rax seta %al movb %al, 0x17(%rsp) movb 0x17(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xacca9 jmp 0xacd82 movb $0x1, 0x2b(%rsp) movl $0x20, %edi callq 0x5a6a0 movq %rax, (%rsp) movq 0x98(%rsp), %rsi leaq 0x38(%rsp), %rdi callq 0xae4e0 jmp 0xaccd0 leaq 0x16063f(%rip), %rsi # 0x20d316 leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rdx callq 0xae430 jmp 0xacce8 movq 0x20(%rsp), %rdi addq $0x8, %rdi callq 0xae1c0 movq (%rsp), %rdi movq (%rax), %rcx movl $0x198, %esi # imm = 0x198 leaq 0x58(%rsp), %rdx callq 0xae280 jmp 0xacd0e movq (%rsp), %rdi movb $0x0, 0x2b(%rsp) leaq 0x1f2fea(%rip), %rsi # 0x29fd08 leaq 0xb6b(%rip), %rdx # 0xad890 callq 0x5ab00 jmp 0xacd98 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xacd6e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xacd64 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x58(%rsp), %rdi callq 0x5b558 leaq 0x38(%rsp), %rdi callq 0x5b558 testb $0x1, 0x2b(%rsp) jne 0xacd77 jmp 0xacd80 movq (%rsp), %rdi callq 0x5af70 jmp 0xacd8e movb $0x1, %al andb $0x1, %al addq $0xa8, %rsp retq movq 0x30(%rsp), %rdi callq 0x5abc0 nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm: sub rsp, 0A8h mov qword ptr [rsp+0A8h+var_8], rdi mov [rsp+0A8h+var_10], rsi mov rdi, qword ptr [rsp+0A8h+var_8] mov qword ptr [rsp+0A8h+var_88], rdi; int mov rax, rdi add rax, 80h mov qword ptr [rsp+0A8h+var_90], rax; char add rdi, 8 call _ZNKSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::size(void) mov rdi, qword ptr [rsp+0A8h+var_90] mov rcx, qword ptr [rsp+0A8h+var_88] mov esi, eax add rcx, 0A8h xor edx, edx call _ZNKSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEclEiS3_SH_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::operator()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) mov rdi, qword ptr [rsp+0A8h+var_88] and al, 1 mov [rsp+0A8h+var_11], al add rdi, 20h ; ' ' mov al, [rsp+0A8h+var_11] and al, 1 movzx esi, al call _ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) mov rdi, qword ptr [rsp+0A8h+var_88] mov [rsp+0A8h+var_29], 1 lea rsi, [rsp+0A8h+var_29] mov edx, 1 call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&,bool) mov rdi, qword ptr [rsp+0A8h+var_88] mov byte ptr [rsp+0A8h+var_28], al; int mov qword ptr [rsp+0A8h+var_20], rdx; int add rdi, 8 lea rsi, [rsp+0A8h+var_28] add rsi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backERKSE_; 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> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> * const&) mov rdi, qword ptr [rsp+0A8h+var_88] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void) cmp qword ptr [rax], 0 jz loc_ACD82 xor eax, eax cmp [rsp+0A8h+var_10], 0FFFFFFFFFFFFFFFFh mov [rsp+0A8h+var_91], al jz short loc_ACC98 mov rdi, qword ptr [rsp+0A8h+var_88] mov rax, [rsp+0A8h+var_10] mov qword ptr [rsp+0A8h+var_A0], rax; int add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void) mov rdi, [rax] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void) mov rcx, rax mov rax, qword ptr [rsp+0A8h+var_A0] cmp rax, rcx setnbe al mov [rsp+0A8h+var_91], al loc_ACC98: mov al, [rsp+0A8h+var_91] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_ACCA9 jmp loc_ACD82 loc_ACCA9: mov [rsp+0A8h+var_7D], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+0A8h+var_A8], rax; int mov rsi, [rsp+0A8h+var_10]; unsigned __int64 lea rdi, [rsp+0A8h+var_70]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) jmp short $+2 loc_ACCD0: lea rsi, aExcessiveObjec; "excessive object size: " lea rdi, [rsp+0A8h+var_50] lea rdx, [rsp+0A8h+var_70] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&) jmp short $+2 loc_ACCE8: mov rdi, qword ptr [rsp+0A8h+var_88] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void) mov rdi, [rsp+0A8h+var_A8]; int mov rcx, [rax] mov esi, 198h lea rdx, [rsp+0A8h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_ACD0E: mov rdi, [rsp+0A8h+var_A8]; void * mov [rsp+0A8h+var_7D], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_ACD98 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_ACD6E mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_ACD64 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_ACD64: lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_ACD6E: test [rsp+arg_23], 1 jnz short loc_ACD77 jmp short loc_ACD80 loc_ACD77: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_ACD80: jmp short loc_ACD8E loc_ACD82: mov al, 1 and al, 1 add rsp, 0A8h retn loc_ACD8E: mov rdi, [rsp+arg_28] call __Unwind_Resume loc_ACD98: nop dword ptr [rax+rax+00000000h]
start_object: SUB RSP,0xa8 MOV qword ptr [RSP + 0xa0],RDI MOV qword ptr [RSP + 0x98],RSI MOV RDI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI ADD RAX,0x80 MOV qword ptr [RSP + 0x18],RAX ADD RDI,0x8 CALL 0x001adbd0 MOV RDI,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] MOV ESI,EAX ADD RCX,0xa8 XOR EDX,EDX CALL 0x001adb70 MOV RDI,qword ptr [RSP + 0x20] AND AL,0x1 MOV byte ptr [RSP + 0x97],AL ADD RDI,0x20 MOV AL,byte ptr [RSP + 0x97] AND AL,0x1 MOVZX ESI,AL CALL 0x001aa820 MOV RDI,qword ptr [RSP + 0x20] MOV byte ptr [RSP + 0x7f],0x1 LEA RSI,[RSP + 0x7f] MOV EDX,0x1 CALL 0x001adbf0 MOV RDI,qword ptr [RSP + 0x20] MOV byte ptr [RSP + 0x80],AL MOV qword ptr [RSP + 0x88],RDX ADD RDI,0x8 LEA RSI,[RSP + 0x80] ADD RSI,0x8 CALL 0x001ae150 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x8 CALL 0x001ae1c0 CMP qword ptr [RAX],0x0 JZ 0x001acd82 XOR EAX,EAX CMP qword ptr [RSP + 0x98],-0x1 MOV byte ptr [RSP + 0x17],AL JZ 0x001acc98 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x8],RAX ADD RDI,0x8 CALL 0x001ae1c0 MOV RDI,qword ptr [RAX] CALL 0x001ae200 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] CMP RAX,RCX SETA AL MOV byte ptr [RSP + 0x17],AL LAB_001acc98: MOV AL,byte ptr [RSP + 0x17] XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001acca9 JMP 0x001acd82 LAB_001acca9: MOV byte ptr [RSP + 0x2b],0x1 MOV EDI,0x20 CALL 0x0015a6a0 MOV qword ptr [RSP],RAX MOV RSI,qword ptr [RSP + 0x98] LAB_001accc4: LEA RDI,[RSP + 0x38] CALL 0x001ae4e0 JMP 0x001accd0 LAB_001accd0: LEA RSI,[0x30d316] LEA RDI,[RSP + 0x58] LEA RDX,[RSP + 0x38] CALL 0x001ae430 JMP 0x001acce8 LAB_001acce8: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x8 CALL 0x001ae1c0 MOV RDI,qword ptr [RSP] MOV RCX,qword ptr [RAX] LAB_001accfd: MOV ESI,0x198 LEA RDX,[RSP + 0x58] CALL 0x001ae280 JMP 0x001acd0e LAB_001acd0e: MOV RDI,qword ptr [RSP] MOV byte ptr [RSP + 0x2b],0x0 LEA RSI,[0x39fd08] LEA RDX,[0x1ad890] CALL 0x0015ab00 LAB_001acd82: MOV AL,0x1 AND AL,0x1 ADD RSP,0xa8 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::start_object(unsigned long) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::start_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,ulong param_1) { bool bVar1; ulong uVar2; byte bVar3; int4 uVar4; long *plVar5; int8 *puVar6; ulong uVar7; int8 uVar8; basic_json *extraout_RDX; __cxx11 local_70 [32]; detail local_50 [39]; value_t local_29; int1 local_28; basic_json *local_20; int1 local_11; ulong local_10; json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *local_8; local_10 = param_1; local_8 = this; uVar4 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::size((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); bVar3 = std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::operator()((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> *)(this + 0x80),uVar4,0,this + 0xa8); local_11 = bVar3 & 1; std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),(bool)local_11); local_29 = 1; local_28 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_29,true); local_20 = extraout_RDX; 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>*>> ::push_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8),&local_20); plVar5 = (long *)std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); uVar2 = local_10; if (*plVar5 != 0) { bVar1 = false; if (local_10 != 0xffffffffffffffff) { puVar6 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); uVar7 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::max_size((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*puVar6); bVar1 = uVar7 < uVar2; } if (bVar1) { uVar8 = __cxa_allocate_exception(0x20); /* try { // try from 001accc4 to 001acccd has its CatchHandler @ 001acd2c */ std::__cxx11::to_string(local_70,local_10); /* try { // try from 001accd0 to 001acce5 has its CatchHandler @ 001acd3c */ concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string> (local_50,"excessive object size: ",(string *)local_70); puVar6 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); /* try { // try from 001accfd to 001acd29 has its CatchHandler @ 001acd4c */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar8,0x198,local_50,*puVar6); /* WARNING: Subroutine does not return */ __cxa_throw(uVar8,&out_of_range::typeinfo,out_of_range::~out_of_range); } } return 1; }
30,936
js_typed_array_reverse
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_reverse(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSObject *p; int len; len = js_typed_array_get_length_unsafe(ctx, this_val); if (len < 0) return JS_EXCEPTION; if (len > 0) { p = JS_VALUE_GET_OBJ(this_val); switch (typed_array_size_log2(p->class_id)) { case 0: { uint8_t *p1 = p->u.array.u.uint8_ptr; uint8_t *p2 = p1 + len - 1; while (p1 < p2) { uint8_t v = *p1; *p1++ = *p2; *p2-- = v; } } break; case 1: { uint16_t *p1 = p->u.array.u.uint16_ptr; uint16_t *p2 = p1 + len - 1; while (p1 < p2) { uint16_t v = *p1; *p1++ = *p2; *p2-- = v; } } break; case 2: { uint32_t *p1 = p->u.array.u.uint32_ptr; uint32_t *p2 = p1 + len - 1; while (p1 < p2) { uint32_t v = *p1; *p1++ = *p2; *p2-- = v; } } break; case 3: { uint64_t *p1 = p->u.array.u.uint64_ptr; uint64_t *p2 = p1 + len - 1; while (p1 < p2) { uint64_t v = *p1; *p1++ = *p2; *p2-- = v; } } break; default: abort(); } } return js_dup(this_val); }
O0
c
js_typed_array_reverse: subq $0xb8, %rsp movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq %rdi, 0x90(%rsp) movl %ecx, 0x8c(%rsp) movq %r8, 0x80(%rsp) movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0xce340 movl %eax, 0x74(%rsp) cmpl $0x0, 0x74(%rsp) jge 0xe0012 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0xe026c cmpl $0x0, 0x74(%rsp) jle 0xe0247 movq 0x98(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rax movzwl 0x6(%rax), %eax leaq 0x2c9c5(%rip), %rcx # 0x10c9ff movzbl -0x15(%rax,%rcx), %eax movq %rax, 0x8(%rsp) subq $0x3, %rax ja 0xe0240 movq 0x8(%rsp), %rax leaq 0x2c82e(%rip), %rcx # 0x10c888 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x78(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rax movslq 0x74(%rsp), %rcx addq %rcx, %rax addq $-0x1, %rax movq %rax, 0x60(%rsp) movq 0x68(%rsp), %rax cmpq 0x60(%rsp), %rax jae 0xe00d1 movq 0x68(%rsp), %rax movb (%rax), %al movb %al, 0x5f(%rsp) movq 0x60(%rsp), %rax movb (%rax), %cl movq 0x68(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x68(%rsp) movb %cl, (%rax) movb 0x5f(%rsp), %cl movq 0x60(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, 0x60(%rsp) movb %cl, (%rax) jmp 0xe0087 jmp 0xe0245 movq 0x78(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax movslq 0x74(%rsp), %rcx shlq %rcx addq %rcx, %rax addq $-0x2, %rax movq %rax, 0x48(%rsp) movq 0x50(%rsp), %rax cmpq 0x48(%rsp), %rax jae 0xe014d movq 0x50(%rsp), %rax movw (%rax), %ax movw %ax, 0x46(%rsp) movq 0x48(%rsp), %rax movw (%rax), %cx movq 0x50(%rsp), %rax movq %rax, %rdx addq $0x2, %rdx movq %rdx, 0x50(%rsp) movw %cx, (%rax) movw 0x46(%rsp), %cx movq 0x48(%rsp), %rax movq %rax, %rdx addq $-0x2, %rdx movq %rdx, 0x48(%rsp) movw %cx, (%rax) jmp 0xe00fd jmp 0xe0245 movq 0x78(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rax movslq 0x74(%rsp), %rcx shlq $0x2, %rcx addq %rcx, %rax addq $-0x4, %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax cmpq 0x30(%rsp), %rax jae 0xe01c4 movq 0x38(%rsp), %rax movl (%rax), %eax movl %eax, 0x2c(%rsp) movq 0x30(%rsp), %rax movl (%rax), %ecx movq 0x38(%rsp), %rax movq %rax, %rdx addq $0x4, %rdx movq %rdx, 0x38(%rsp) movl %ecx, (%rax) movl 0x2c(%rsp), %ecx movq 0x30(%rsp), %rax movq %rax, %rdx addq $-0x4, %rdx movq %rdx, 0x30(%rsp) movl %ecx, (%rax) jmp 0xe017a jmp 0xe0245 movq 0x78(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movslq 0x74(%rsp), %rcx shlq $0x3, %rcx addq %rcx, %rax addq $-0x8, %rax movq %rax, 0x18(%rsp) movq 0x20(%rsp), %rax cmpq 0x18(%rsp), %rax jae 0xe023e movq 0x20(%rsp), %rax movq (%rax), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movq (%rax), %rcx movq 0x20(%rsp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x20(%rsp) movq %rcx, (%rax) movq 0x10(%rsp), %rcx movq 0x18(%rsp), %rax movq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x18(%rsp) movq %rcx, (%rax) jmp 0xe01ee jmp 0xe0245 callq 0xe090 jmp 0xe0247 movq 0x98(%rsp), %rdi movq 0xa0(%rsp), %rsi callq 0x216d0 movq %rax, 0xa8(%rsp) movq %rdx, 0xb0(%rsp) movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rdx addq $0xb8, %rsp retq nopw %cs:(%rax,%rax)
js_typed_array_reverse: sub rsp, 0B8h mov [rsp+0B8h+var_20], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_28], rdi mov [rsp+0B8h+var_2C], ecx mov [rsp+0B8h+var_38], r8 mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_20] mov rdx, [rsp+0B8h+var_18] call js_typed_array_get_length_unsafe mov [rsp+0B8h+var_44], eax cmp [rsp+0B8h+var_44], 0 jge short loc_E0012 mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp loc_E026C loc_E0012: cmp [rsp+0B8h+var_44], 0 jle loc_E0247 mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_40], rax mov rax, [rsp+0B8h+var_40] movzx eax, word ptr [rax+6] lea rcx, typed_array_size_log2 movzx eax, byte ptr [rax+rcx-15h] mov [rsp+0B8h+var_B0], rax sub rax, 3; switch 4 cases ja def_E0061; jumptable 00000000000E0061 default case mov rax, [rsp+0B8h+var_B0] lea rcx, jpt_E0061 movsxd rax, ds:(jpt_E0061 - 10C888h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_E0063: mov rax, [rsp+0B8h+var_40]; jumptable 00000000000E0061 case 0 mov rax, [rax+38h] mov [rsp+0B8h+var_50], rax mov rax, [rsp+0B8h+var_50] movsxd rcx, [rsp+0B8h+var_44] add rax, rcx add rax, 0FFFFFFFFFFFFFFFFh mov [rsp+0B8h+var_58], rax loc_E0087: mov rax, [rsp+0B8h+var_50] cmp rax, [rsp+0B8h+var_58] jnb short loc_E00D1 mov rax, [rsp+0B8h+var_50] mov al, [rax] mov [rsp+0B8h+var_59], al mov rax, [rsp+0B8h+var_58] mov cl, [rax] mov rax, [rsp+0B8h+var_50] mov rdx, rax add rdx, 1 mov [rsp+0B8h+var_50], rdx mov [rax], cl mov cl, [rsp+0B8h+var_59] mov rax, [rsp+0B8h+var_58] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+0B8h+var_58], rdx mov [rax], cl jmp short loc_E0087 loc_E00D1: jmp loc_E0245 loc_E00D6: mov rax, [rsp+0B8h+var_40]; jumptable 00000000000E0061 case 1 mov rax, [rax+38h] mov [rsp+0B8h+var_68], rax mov rax, [rsp+0B8h+var_68] movsxd rcx, [rsp+0B8h+var_44] shl rcx, 1 add rax, rcx add rax, 0FFFFFFFFFFFFFFFEh mov [rsp+0B8h+var_70], rax loc_E00FD: mov rax, [rsp+0B8h+var_68] cmp rax, [rsp+0B8h+var_70] jnb short loc_E014D mov rax, [rsp+0B8h+var_68] mov ax, [rax] mov [rsp+0B8h+var_72], ax mov rax, [rsp+0B8h+var_70] mov cx, [rax] mov rax, [rsp+0B8h+var_68] mov rdx, rax add rdx, 2 mov [rsp+0B8h+var_68], rdx mov [rax], cx mov cx, [rsp+0B8h+var_72] mov rax, [rsp+0B8h+var_70] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFEh mov [rsp+0B8h+var_70], rdx mov [rax], cx jmp short loc_E00FD loc_E014D: jmp loc_E0245 loc_E0152: mov rax, [rsp+0B8h+var_40]; jumptable 00000000000E0061 case 2 mov rax, [rax+38h] mov [rsp+0B8h+var_80], rax mov rax, [rsp+0B8h+var_80] movsxd rcx, [rsp+0B8h+var_44] shl rcx, 2 add rax, rcx add rax, 0FFFFFFFFFFFFFFFCh mov [rsp+0B8h+var_88], rax loc_E017A: mov rax, [rsp+0B8h+var_80] cmp rax, [rsp+0B8h+var_88] jnb short loc_E01C4 mov rax, [rsp+0B8h+var_80] mov eax, [rax] mov [rsp+0B8h+var_8C], eax mov rax, [rsp+0B8h+var_88] mov ecx, [rax] mov rax, [rsp+0B8h+var_80] mov rdx, rax add rdx, 4 mov [rsp+0B8h+var_80], rdx mov [rax], ecx mov ecx, [rsp+0B8h+var_8C] mov rax, [rsp+0B8h+var_88] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFCh mov [rsp+0B8h+var_88], rdx mov [rax], ecx jmp short loc_E017A loc_E01C4: jmp short loc_E0245 loc_E01C6: mov rax, [rsp+0B8h+var_40]; jumptable 00000000000E0061 case 3 mov rax, [rax+38h] mov [rsp+0B8h+var_98], rax mov rax, [rsp+0B8h+var_98] movsxd rcx, [rsp+0B8h+var_44] shl rcx, 3 add rax, rcx add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+0B8h+var_A0], rax loc_E01EE: mov rax, [rsp+0B8h+var_98] cmp rax, [rsp+0B8h+var_A0] jnb short loc_E023E mov rax, [rsp+0B8h+var_98] mov rax, [rax] mov [rsp+0B8h+var_A8], rax mov rax, [rsp+0B8h+var_A0] mov rcx, [rax] mov rax, [rsp+0B8h+var_98] mov rdx, rax add rdx, 8 mov [rsp+0B8h+var_98], rdx mov [rax], rcx mov rcx, [rsp+0B8h+var_A8] mov rax, [rsp+0B8h+var_A0] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [rsp+0B8h+var_A0], rdx mov [rax], rcx jmp short loc_E01EE loc_E023E: jmp short loc_E0245 def_E0061: call _abort; jumptable 00000000000E0061 default case loc_E0245: jmp short $+2 loc_E0247: mov rdi, [rsp+0B8h+var_20] mov rsi, [rsp+0B8h+var_18] call js_dup mov [rsp+0B8h+var_10], rax mov [rsp+0B8h+var_8], rdx loc_E026C: mov rax, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_8] add rsp, 0B8h retn
_DWORD * js_typed_array_reverse( const char *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 *v14; // rax char *v15; // rax __int16 *v16; // rax __int16 *v17; // rax int *v18; // rax int *v19; // rax long long *v20; // rax long long *v21; // rax long long v23; // [rsp+10h] [rbp-A8h] long long *m; // [rsp+18h] [rbp-A0h] long long *v25; // [rsp+20h] [rbp-98h] int v26; // [rsp+2Ch] [rbp-8Ch] int *k; // [rsp+30h] [rbp-88h] int *v28; // [rsp+38h] [rbp-80h] __int16 v29; // [rsp+46h] [rbp-72h] __int16 *j; // [rsp+48h] [rbp-70h] __int16 *v31; // [rsp+50h] [rbp-68h] char v32; // [rsp+5Fh] [rbp-59h] char *i; // [rsp+60h] [rbp-58h] char *v34; // [rsp+68h] [rbp-50h] int length_unsafe; // [rsp+74h] [rbp-44h] unsigned int v36; // [rsp+A0h] [rbp-18h] long long v37; // [rsp+A8h] [rbp-10h] v36 = a3; length_unsafe = js_typed_array_get_length_unsafe((long long)a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( length_unsafe >= 0 ) { if ( length_unsafe > 0 ) { switch ( typed_array_size_log2[*(unsigned __int16 *)(a2 + 6) - 21] ) { case 0: v34 = *(char **)(a2 + 56); for ( i = &v34[length_unsafe - 1]; v34 < i; --i ) { v32 = *v34; v14 = v34++; *v14 = *i; v15 = i; *v15 = v32; } break; case 1: v31 = *(__int16 **)(a2 + 56); for ( j = &v31[length_unsafe - 1]; v31 < j; --j ) { v29 = *v31; v16 = v31++; *v16 = *j; v17 = j; *v17 = v29; } break; case 2: v28 = *(int **)(a2 + 56); for ( k = &v28[length_unsafe - 1]; v28 < k; --k ) { v26 = *v28; v18 = v28++; *v18 = *k; v19 = k; *v19 = v26; } break; case 3: v25 = *(long long **)(a2 + 56); for ( m = &v25[length_unsafe - 1]; v25 < m; --m ) { v23 = *v25; v20 = v25++; *v20 = *m; v21 = m; *v21 = v23; } break; default: abort(a1); } } return js_dup((_DWORD *)a2, v36); } else { LODWORD(v37) = 0; } return (_DWORD *)v37; }
js_typed_array_reverse: SUB RSP,0xb8 MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0x90],RDI MOV dword ptr [RSP + 0x8c],ECX MOV qword ptr [RSP + 0x80],R8 MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x001ce340 MOV dword ptr [RSP + 0x74],EAX CMP dword ptr [RSP + 0x74],0x0 JGE 0x001e0012 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 JMP 0x001e026c LAB_001e0012: CMP dword ptr [RSP + 0x74],0x0 JLE 0x001e0247 MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x78] MOVZX EAX,word ptr [RAX + 0x6] LEA RCX,[0x20c9ff] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x15] MOV qword ptr [RSP + 0x8],RAX SUB RAX,0x3 JA 0x001e0240 MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x20c888] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x68] MOVSXD RCX,dword ptr [RSP + 0x74] ADD RAX,RCX ADD RAX,-0x1 MOV qword ptr [RSP + 0x60],RAX LAB_001e0087: MOV RAX,qword ptr [RSP + 0x68] CMP RAX,qword ptr [RSP + 0x60] JNC 0x001e00d1 MOV RAX,qword ptr [RSP + 0x68] MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0x5f],AL MOV RAX,qword ptr [RSP + 0x60] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RSP + 0x68] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + 0x68],RDX MOV byte ptr [RAX],CL MOV CL,byte ptr [RSP + 0x5f] MOV RAX,qword ptr [RSP + 0x60] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + 0x60],RDX MOV byte ptr [RAX],CL JMP 0x001e0087 LAB_001e00d1: JMP 0x001e0245 caseD_1: MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x50] MOVSXD RCX,dword ptr [RSP + 0x74] SHL RCX,0x1 ADD RAX,RCX ADD RAX,-0x2 MOV qword ptr [RSP + 0x48],RAX LAB_001e00fd: MOV RAX,qword ptr [RSP + 0x50] CMP RAX,qword ptr [RSP + 0x48] JNC 0x001e014d MOV RAX,qword ptr [RSP + 0x50] MOV AX,word ptr [RAX] MOV word ptr [RSP + 0x46],AX MOV RAX,qword ptr [RSP + 0x48] MOV CX,word ptr [RAX] MOV RAX,qword ptr [RSP + 0x50] MOV RDX,RAX ADD RDX,0x2 MOV qword ptr [RSP + 0x50],RDX MOV word ptr [RAX],CX MOV CX,word ptr [RSP + 0x46] MOV RAX,qword ptr [RSP + 0x48] MOV RDX,RAX ADD RDX,-0x2 MOV qword ptr [RSP + 0x48],RDX MOV word ptr [RAX],CX JMP 0x001e00fd LAB_001e014d: JMP 0x001e0245 caseD_2: MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x38] MOVSXD RCX,dword ptr [RSP + 0x74] SHL RCX,0x2 ADD RAX,RCX ADD RAX,-0x4 MOV qword ptr [RSP + 0x30],RAX LAB_001e017a: MOV RAX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RSP + 0x30] JNC 0x001e01c4 MOV RAX,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x2c],EAX MOV RAX,qword ptr [RSP + 0x30] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x38] MOV RDX,RAX ADD RDX,0x4 MOV qword ptr [RSP + 0x38],RDX MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RSP + 0x30] MOV RDX,RAX ADD RDX,-0x4 MOV qword ptr [RSP + 0x30],RDX MOV dword ptr [RAX],ECX JMP 0x001e017a LAB_001e01c4: JMP 0x001e0245 caseD_3: MOV RAX,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,dword ptr [RSP + 0x74] SHL RCX,0x3 ADD RAX,RCX ADD RAX,-0x8 MOV qword ptr [RSP + 0x18],RAX LAB_001e01ee: MOV RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0x18] JNC 0x001e023e MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x20] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x18] MOV RDX,RAX ADD RDX,-0x8 MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RAX],RCX JMP 0x001e01ee LAB_001e023e: JMP 0x001e0245 default: CALL 0x0010e090 LAB_001e0245: JMP 0x001e0247 LAB_001e0247: MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0xa0] CALL 0x001216d0 MOV qword ptr [RSP + 0xa8],RAX MOV qword ptr [RSP + 0xb0],RDX LAB_001e026c: MOV RAX,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] ADD RSP,0xb8 RET
int1 [16] js_typed_array_reverse(int8 param_1,long param_2,int8 param_3) { int1 uVar1; int2 uVar2; int4 uVar3; int8 uVar4; int iVar5; int1 auVar6 [16]; int8 *local_a0; int8 *local_98; int4 *local_88; int4 *local_80; int2 *local_70; int2 *local_68; int1 *local_58; int1 *local_50; int4 local_10; int4 uStack_c; int8 local_8; iVar5 = js_typed_array_get_length_unsafe(param_1,param_2,param_3); if (iVar5 < 0) { local_10 = 0; local_8 = 6; } else { if (0 < iVar5) { switch("toSorted"[(ulong)*(ushort *)(param_2 + 6) + 6]) { case '\0': local_58 = *(int1 **)(param_2 + 0x38) + iVar5; local_50 = *(int1 **)(param_2 + 0x38); while (local_58 = local_58 + -1, local_50 < local_58) { uVar1 = *local_50; *local_50 = *local_58; *local_58 = uVar1; local_50 = local_50 + 1; } break; case '\x01': local_70 = *(int2 **)(param_2 + 0x38) + iVar5; local_68 = *(int2 **)(param_2 + 0x38); while (local_70 = local_70 + -1, local_68 < local_70) { uVar2 = *local_68; *local_68 = *local_70; *local_70 = uVar2; local_68 = local_68 + 1; } break; case '\x02': local_88 = *(int4 **)(param_2 + 0x38) + iVar5; local_80 = *(int4 **)(param_2 + 0x38); while (local_88 = local_88 + -1, local_80 < local_88) { uVar3 = *local_80; *local_80 = *local_88; *local_88 = uVar3; local_80 = local_80 + 1; } break; case '\x03': local_a0 = *(int8 **)(param_2 + 0x38) + iVar5; local_98 = *(int8 **)(param_2 + 0x38); while (local_a0 = local_a0 + -1, local_98 < local_a0) { uVar4 = *local_98; *local_98 = *local_a0; *local_a0 = uVar4; local_98 = local_98 + 1; } break; default: /* WARNING: Subroutine does not return */ abort(); } } auVar6 = js_dup(param_2,param_3); local_8 = auVar6._8_8_; local_10 = auVar6._0_4_; uStack_c = auVar6._4_4_; } auVar6._4_4_ = uStack_c; auVar6._0_4_ = local_10; auVar6._8_8_ = local_8; return auVar6; }
30,937
get_sys_var_lower_case_table_names
eloqsql/client/mysqldump.c
static int get_sys_var_lower_case_table_names() { int lower_case_table_names = 0; MYSQL_RES *table_res; MYSQL_ROW row; const char *show_var_query = "SHOW VARIABLES LIKE 'lower_case_table_names'"; if (mysql_query_with_error_report(mysql, &table_res, show_var_query)) return 0; /* In case of error, assume default value of 0 */ if ((row= mysql_fetch_row(table_res))) { lower_case_table_names= atoi(row[1]); mysql_free_result(table_res); } return lower_case_table_names; }
O0
c
get_sys_var_lower_case_table_names: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0x0, -0x8(%rbp) leaq 0x97c55(%rip), %rax # 0xde32b movq %rax, -0x20(%rbp) movq 0x3bade7(%rip), %rdi # 0x4014c8 movq -0x20(%rbp), %rdx leaq -0x10(%rbp), %rsi callq 0x39350 cmpl $0x0, %eax je 0x466fc movl $0x0, -0x4(%rbp) jmp 0x4672e movq -0x10(%rbp), %rdi callq 0x51800 movq %rax, -0x18(%rbp) cmpq $0x0, %rax je 0x46728 movq -0x18(%rbp), %rax movq 0x8(%rax), %rdi callq 0x38330 movl %eax, -0x8(%rbp) movq -0x10(%rbp), %rdi callq 0x48d00 movl -0x8(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
get_sys_var_lower_case_table_names: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], 0 lea rax, aShowVariablesL; "SHOW VARIABLES LIKE 'lower_case_table_n"... mov [rbp+var_20], rax mov rdi, cs:mysql mov rdx, [rbp+var_20] lea rsi, [rbp+var_10] call mysql_query_with_error_report cmp eax, 0 jz short loc_466FC mov [rbp+var_4], 0 jmp short loc_4672E loc_466FC: mov rdi, [rbp+var_10] call mysql_fetch_row mov [rbp+var_18], rax cmp rax, 0 jz short loc_46728 mov rax, [rbp+var_18] mov rdi, [rax+8] call _atoi mov [rbp+var_8], eax mov rdi, [rbp+var_10] call mysql_free_result loc_46728: mov eax, [rbp+var_8] mov [rbp+var_4], eax loc_4672E: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long get_sys_var_lower_case_table_names() { long long row; // [rsp+8h] [rbp-18h] long long v2; // [rsp+10h] [rbp-10h] BYREF unsigned int v3; // [rsp+18h] [rbp-8h] v3 = 0; if ( (unsigned int)mysql_query_with_error_report(mysql, &v2, (long long)"SHOW VARIABLES LIKE 'lower_case_table_names'") ) { return 0; } else { row = mysql_fetch_row(v2); if ( row ) { v3 = atoi(*(_QWORD *)(row + 8)); mysql_free_result(v2); } return v3; } }
get_sys_var_lower_case_table_names: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x8],0x0 LEA RAX,[0x1de32b] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [0x005014c8] MOV RDX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x10] CALL 0x00139350 CMP EAX,0x0 JZ 0x001466fc MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014672e LAB_001466fc: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00151800 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JZ 0x00146728 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00138330 MOV dword ptr [RBP + -0x8],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00148d00 LAB_00146728: MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0x4],EAX LAB_0014672e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int get_sys_var_lower_case_table_names(void) { int iVar1; long lVar2; int8 local_18; int local_10; int local_c; local_10 = 0; iVar1 = mysql_query_with_error_report (mysql,&local_18,"SHOW VARIABLES LIKE \'lower_case_table_names\'"); if (iVar1 == 0) { lVar2 = mysql_fetch_row(local_18); if (lVar2 != 0) { local_10 = atoi(*(char **)(lVar2 + 8)); mysql_free_result(local_18); } local_c = local_10; } else { local_c = 0; } return local_c; }
30,938
fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>>, long, std::ratio<1l, 1000000000l>>::on_24_hour_time()
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/chrono.h
void on_24_hour_time() { if (handle_nan_inf()) { *out++ = ':'; handle_nan_inf(); return; } write(hour(), 2); *out++ = ':'; write(minute(), 2); }
O3
c
fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char>>>, long, std::ratio<1l, 1000000000l>>::on_24_hour_time(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x20(%rdi), %rax shrq $0x4, %rax movabsq $0x91a2b3c4d5e6f81, %rcx # imm = 0x91A2B3C4D5E6F81 mulq %rcx movq %rdx, %rsi shrq $0x3, %rsi movabsq $0xaaaaaaaaaaaaaab, %rcx # imm = 0xAAAAAAAAAAAAAAB movq %rsi, %rax mulq %rcx shlq $0x3, %rdx leaq (%rdx,%rdx,2), %rax subq %rax, %rsi movl $0x2, %edx xorl %ecx, %ecx callq 0xf392e movq 0x8(%rbx), %r14 movq 0x10(%r14), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%r14) jae 0xf388e movq (%r14), %rax movq %r14, %rdi callq *(%rax) movq 0x10(%r14), %rax leaq 0x1(%rax), %rsi movq 0x8(%r14), %rcx movq %rsi, 0x10(%r14) movb $0x3a, (%rcx,%rax) movabsq $-0x7777777777777777, %rax # imm = 0x8888888888888889 mulq 0x20(%rbx) movq %rdx, %rsi shrq $0x5, %rsi movabsq $0x888888888888889, %rcx # imm = 0x888888888888889 movq %rsi, %rax mulq %rcx shrq %rdx imulq $0x3c, %rdx, %rax subq %rax, %rsi movq %rbx, %rdi movl $0x2, %edx xorl %ecx, %ecx addq $0x8, %rsp popq %rbx popq %r14 jmp 0xf392e nop
_ZN3fmt3v106detail16chrono_formatterINS0_20basic_format_contextINS0_8appenderEcEESt20back_insert_iteratorINS0_19basic_memory_bufferIcLm500ESaIcEEEElSt5ratioILl1ELl1000000000EEE15on_24_hour_timeEv: push r14 push rbx push rax mov rbx, rdi mov rax, [rdi+20h] shr rax, 4 mov rcx, 91A2B3C4D5E6F81h mul rcx mov rsi, rdx shr rsi, 3 mov rcx, 0AAAAAAAAAAAAAABh mov rax, rsi mul rcx shl rdx, 3 lea rax, [rdx+rdx*2] sub rsi, rax mov edx, 2 xor ecx, ecx call _ZN3fmt3v106detail16chrono_formatterINS0_20basic_format_contextINS0_8appenderEcEESt20back_insert_iteratorINS0_19basic_memory_bufferIcLm500ESaIcEEEElSt5ratioILl1ELl1000000000EEE5writeEliNS1_8pad_typeE; fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000000l>>::write(long,int,fmt::v10::detail::pad_type) mov r14, [rbx+8] mov rax, [r14+10h] lea rsi, [rax+1] cmp [r14+18h], rsi jnb short loc_F388E mov rax, [r14] mov rdi, r14 call qword ptr [rax] mov rax, [r14+10h] lea rsi, [rax+1] loc_F388E: mov rcx, [r14+8] mov [r14+10h], rsi mov byte ptr [rcx+rax], 3Ah ; ':' mov rax, 8888888888888889h mul qword ptr [rbx+20h] mov rsi, rdx shr rsi, 5 mov rcx, 888888888888889h mov rax, rsi mul rcx shr rdx, 1 imul rax, rdx, 3Ch ; '<' sub rsi, rax mov rdi, rbx mov edx, 2 xor ecx, ecx add rsp, 8 pop rbx pop r14 jmp _ZN3fmt3v106detail16chrono_formatterINS0_20basic_format_contextINS0_8appenderEcEESt20back_insert_iteratorINS0_19basic_memory_bufferIcLm500ESaIcEEEElSt5ratioILl1ELl1000000000EEE5writeEliNS1_8pad_typeE; fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000000l>>::write(long,int,fmt::v10::detail::pad_type)
long long fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000000l>>::on_24_hour_time( long long a1) { long long v1; // r14 long long v2; // rax long long v3; // rsi long long v4; // rcx fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000000l>>::write( a1, *(_QWORD *)(a1 + 32) / 0xE10uLL - 24 * ((0xAAAAAAAAAAAAAABLL * (unsigned __int128)(*(_QWORD *)(a1 + 32) / 0xE10uLL)) >> 64), 2LL, 0LL); v1 = *(_QWORD *)(a1 + 8); v2 = *(_QWORD *)(v1 + 16); v3 = v2 + 1; if ( *(_QWORD *)(v1 + 24) < (unsigned long long)(v2 + 1) ) { (**(void ( ***)(_QWORD))v1)(*(_QWORD *)(a1 + 8)); v2 = *(_QWORD *)(v1 + 16); v3 = v2 + 1; } v4 = *(_QWORD *)(v1 + 8); *(_QWORD *)(v1 + 16) = v3; *(_BYTE *)(v4 + v2) = 58; return fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000000l>>::write( a1, *(_QWORD *)(a1 + 32) / 0x3CuLL - 60 * ((unsigned long long)((0x888888888888889LL * (unsigned __int128)(*(_QWORD *)(a1 + 32) / 0x3CuLL)) >> 64) >> 1), 2LL, 0LL); }
on_24_hour_time: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x20] SHR RAX,0x4 MOV RCX,0x91a2b3c4d5e6f81 MUL RCX MOV RSI,RDX SHR RSI,0x3 MOV RCX,0xaaaaaaaaaaaaaab MOV RAX,RSI MUL RCX SHL RDX,0x3 LEA RAX,[RDX + RDX*0x2] SUB RSI,RAX MOV EDX,0x2 XOR ECX,ECX CALL 0x001f392e MOV R14,qword ptr [RBX + 0x8] MOV RAX,qword ptr [R14 + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [R14 + 0x18],RSI JNC 0x001f388e MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX] MOV RAX,qword ptr [R14 + 0x10] LEA RSI,[RAX + 0x1] LAB_001f388e: MOV RCX,qword ptr [R14 + 0x8] MOV qword ptr [R14 + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x3a MOV RAX,-0x7777777777777777 MUL qword ptr [RBX + 0x20] MOV RSI,RDX SHR RSI,0x5 MOV RCX,0x888888888888889 MOV RAX,RSI MUL RCX SHR RDX,0x1 IMUL RAX,RDX,0x3c SUB RSI,RAX MOV RDI,RBX MOV EDX,0x2 XOR ECX,ECX ADD RSP,0x8 POP RBX POP R14 JMP 0x001f392e
/* fmt::v10::detail::chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender, char>, std::back_insert_iterator<fmt::v10::basic_memory_buffer<char, 500ul, std::allocator<char> > >, long, std::ratio<1l, 1000000000l> >::on_24_hour_time() */ void __thiscall fmt::v10::detail:: chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000000l>> ::on_24_hour_time(chrono_formatter<fmt::v10::basic_format_context<fmt::v10::appender,char>,std::back_insert_iterator<fmt::v10::basic_memory_buffer<char,500ul,std::allocator<char>>>,long,std::ratio<1l,1000000000l>> *this) { int8 *puVar1; long lVar2; ulong uVar3; write(this,(*(ulong *)(this + 0x20) / 0xe10) % 0x18,2,0); puVar1 = *(int8 **)(this + 8); lVar2 = puVar1[2]; uVar3 = lVar2 + 1; if ((ulong)puVar1[3] < uVar3) { (**(code **)*puVar1)(puVar1); lVar2 = puVar1[2]; uVar3 = lVar2 + 1; } puVar1[2] = uVar3; *(int1 *)(puVar1[1] + lVar2) = 0x3a; write(this,(*(ulong *)(this + 0x20) / 0x3c) % 0x3c,2,0); return; }
30,939
TextInsert
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
char *TextInsert(const char *text, const char *insert, int position) { int textLen = TextLength(text); int insertLen = TextLength(insert); char *result = (char *)RL_MALLOC(textLen + insertLen + 1); for (int i = 0; i < position; i++) result[i] = text[i]; for (int i = position; i < insertLen + position; i++) result[i] = insert[i]; for (int i = (insertLen + position); i < (textLen + insertLen); i++) result[i] = text[i]; result[textLen + insertLen] = '\0'; // Make sure text string is valid! return result; }
O0
c
TextInsert: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rdi callq 0xe5fe0 movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0xe5fe0 movl %eax, -0x1c(%rbp) movl -0x18(%rbp), %eax addl -0x1c(%rbp), %eax addl $0x1, %eax movslq %eax, %rdi callq 0xa6e0 movq %rax, -0x28(%rbp) movl $0x0, -0x2c(%rbp) movl -0x2c(%rbp), %eax cmpl -0x14(%rbp), %eax jge 0xe7150 movq -0x8(%rbp), %rax movslq -0x2c(%rbp), %rcx movb (%rax,%rcx), %dl movq -0x28(%rbp), %rax movslq -0x2c(%rbp), %rcx movb %dl, (%rax,%rcx) movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xe7127 movl -0x14(%rbp), %eax movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movl -0x1c(%rbp), %ecx addl -0x14(%rbp), %ecx cmpl %ecx, %eax jge 0xe7184 movq -0x10(%rbp), %rax movslq -0x30(%rbp), %rcx movb (%rax,%rcx), %dl movq -0x28(%rbp), %rax movslq -0x30(%rbp), %rcx movb %dl, (%rax,%rcx) movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0xe7156 movl -0x1c(%rbp), %eax addl -0x14(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl -0x18(%rbp), %ecx addl -0x1c(%rbp), %ecx cmpl %ecx, %eax jge 0xe71bb movq -0x8(%rbp), %rax movslq -0x34(%rbp), %rcx movb (%rax,%rcx), %dl movq -0x28(%rbp), %rax movslq -0x34(%rbp), %rcx movb %dl, (%rax,%rcx) movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0xe718d movq -0x28(%rbp), %rax movl -0x18(%rbp), %ecx addl -0x1c(%rbp), %ecx movslq %ecx, %rcx movb $0x0, (%rax,%rcx) movq -0x28(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
TextInsert: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rdi, [rbp+var_8] call TextLength mov [rbp+var_18], eax mov rdi, [rbp+var_10] call TextLength mov [rbp+var_1C], eax mov eax, [rbp+var_18] add eax, [rbp+var_1C] add eax, 1 movsxd rdi, eax call _malloc mov [rbp+var_28], rax mov [rbp+var_2C], 0 loc_E7127: mov eax, [rbp+var_2C] cmp eax, [rbp+var_14] jge short loc_E7150 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_2C] mov dl, [rax+rcx] mov rax, [rbp+var_28] movsxd rcx, [rbp+var_2C] mov [rax+rcx], dl mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp short loc_E7127 loc_E7150: mov eax, [rbp+var_14] mov [rbp+var_30], eax loc_E7156: mov eax, [rbp+var_30] mov ecx, [rbp+var_1C] add ecx, [rbp+var_14] cmp eax, ecx jge short loc_E7184 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_30] mov dl, [rax+rcx] mov rax, [rbp+var_28] movsxd rcx, [rbp+var_30] mov [rax+rcx], dl mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp short loc_E7156 loc_E7184: mov eax, [rbp+var_1C] add eax, [rbp+var_14] mov [rbp+var_34], eax loc_E718D: mov eax, [rbp+var_34] mov ecx, [rbp+var_18] add ecx, [rbp+var_1C] cmp eax, ecx jge short loc_E71BB mov rax, [rbp+var_8] movsxd rcx, [rbp+var_34] mov dl, [rax+rcx] mov rax, [rbp+var_28] movsxd rcx, [rbp+var_34] mov [rax+rcx], dl mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax jmp short loc_E718D loc_E71BB: mov rax, [rbp+var_28] mov ecx, [rbp+var_18] add ecx, [rbp+var_1C] movsxd rcx, ecx mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_28] add rsp, 40h pop rbp retn
long long TextInsert(_BYTE *a1, _BYTE *a2, int a3) { int k; // [rsp+Ch] [rbp-34h] int j; // [rsp+10h] [rbp-30h] int i; // [rsp+14h] [rbp-2Ch] long long v7; // [rsp+18h] [rbp-28h] int v8; // [rsp+24h] [rbp-1Ch] int v9; // [rsp+28h] [rbp-18h] v9 = TextLength(a1); v8 = TextLength(a2); v7 = malloc(v8 + v9 + 1); for ( i = 0; i < a3; ++i ) *(_BYTE *)(v7 + i) = a1[i]; for ( j = a3; j < a3 + v8; ++j ) *(_BYTE *)(v7 + j) = a2[j]; for ( k = a3 + v8; k < v8 + v9; ++k ) *(_BYTE *)(v7 + k) = a1[k]; *(_BYTE *)(v7 + v8 + v9) = 0; return v7; }
TextInsert: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e5fe0 MOV dword ptr [RBP + -0x18],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001e5fe0 MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x18] ADD EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOVSXD RDI,EAX CALL 0x0010a6e0 MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x2c],0x0 LAB_001e7127: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x14] JGE 0x001e7150 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x2c] MOV DL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0x2c] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x001e7127 LAB_001e7150: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x30],EAX LAB_001e7156: MOV EAX,dword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,dword ptr [RBP + -0x14] CMP EAX,ECX JGE 0x001e7184 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x30] MOV DL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0x30] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x001e7156 LAB_001e7184: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x34],EAX LAB_001e718d: MOV EAX,dword ptr [RBP + -0x34] MOV ECX,dword ptr [RBP + -0x18] ADD ECX,dword ptr [RBP + -0x1c] CMP EAX,ECX JGE 0x001e71bb MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x34] MOV DL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,dword ptr [RBP + -0x34] MOV byte ptr [RAX + RCX*0x1],DL MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x001e718d LAB_001e71bb: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x18] ADD ECX,dword ptr [RBP + -0x1c] MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x40 POP RBP RET
void * TextInsert(long param_1,long param_2,int param_3) { int iVar1; int iVar2; void *pvVar3; int4 local_3c; int4 local_38; int4 local_34; iVar1 = TextLength(param_1); iVar2 = TextLength(param_2); pvVar3 = malloc((long)(iVar1 + iVar2 + 1)); for (local_34 = 0; local_38 = param_3, local_34 < param_3; local_34 = local_34 + 1) { *(int1 *)((long)pvVar3 + (long)local_34) = *(int1 *)(param_1 + local_34); } for (; local_38 < iVar2 + param_3; local_38 = local_38 + 1) { *(int1 *)((long)pvVar3 + (long)local_38) = *(int1 *)(param_2 + local_38); } for (local_3c = iVar2 + param_3; local_3c < iVar1 + iVar2; local_3c = local_3c + 1) { *(int1 *)((long)pvVar3 + (long)local_3c) = *(int1 *)(param_1 + local_3c); } *(int1 *)((long)pvVar3 + (long)(iVar1 + iVar2)) = 0; return pvVar3; }
30,940
mysql_stmt_internal_reset
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static my_bool mysql_stmt_internal_reset(MYSQL_STMT *stmt, my_bool is_close) { MYSQL *mysql= stmt->mysql; my_bool ret= 1; unsigned int flags= MADB_RESET_LONGDATA | MADB_RESET_BUFFER | MADB_RESET_ERROR; if (!mysql) { /* connection could be invalid, e.g. after mysql_stmt_close or failed reconnect attempt (see bug CONC-97) */ SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state >= MYSQL_STMT_USER_FETCHING && stmt->fetch_row_func == stmt_unbuffered_fetch) flags|= MADB_RESET_BUFFER; ret= madb_reset_stmt(stmt, flags); if (stmt->stmt_id) { if ((stmt->state > MYSQL_STMT_EXECUTED && stmt->mysql->status != MYSQL_STATUS_READY) || stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST) { /* flush any pending (multiple) result sets */ if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE) { stmt->default_rset_handler(stmt); stmt->state = MYSQL_STMT_USER_FETCHING; } if (stmt->field_count) { while (mysql_stmt_next_result(stmt) == 0); stmt->mysql->status= MYSQL_STATUS_READY; } } if (!is_close) ret= madb_reset_stmt(stmt, MADB_RESET_SERVER); stmt->state= MYSQL_STMT_PREPARED; } else stmt->state= MYSQL_STMT_INITTED; stmt->upsert_status.affected_rows= mysql->affected_rows; stmt->upsert_status.last_insert_id= mysql->insert_id; stmt->upsert_status.server_status= mysql->server_status; stmt->upsert_status.warning_count= mysql->warning_count; mysql->status= MYSQL_STATUS_READY; return(ret); }
O3
c
mysql_stmt_internal_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x38(%rdi), %r12 testq %r12, %r12 je 0x24698 movl %esi, %r15d movq %rbx, %rdi movl $0xb, %esi callq 0x25230 movl %eax, %r14d cmpq $0x0, 0x40(%rbx) je 0x246ef movl 0x50(%rbx), %eax movq 0x38(%rbx), %rcx cmpl $0x3, %eax jb 0x2463d cmpl $0x0, 0x488(%rcx) jne 0x24646 testb $0x8, 0x380(%rcx) je 0x2467b cmpl $0x3, %eax jne 0x2465b movq %rbx, %rdi callq *0x358(%rbx) movl $0x5, 0x50(%rbx) cmpl $0x0, 0x60(%rbx) je 0x2467b movq %rbx, %rdi callq 0x26b38 testl %eax, %eax je 0x24661 movq 0x38(%rbx), %rax movl $0x0, 0x488(%rax) movl $0x1, %r13d testb %r15b, %r15b jne 0x246f2 movq %rbx, %rdi movl $0x4, %esi callq 0x25230 movl %eax, %r14d jmp 0x246f2 movl $0x7dd, 0x108(%rbx) # imm = 0x7DD leaq 0x30d(%rbx), %rdi leaq 0x2b950(%rip), %rax # 0x50000 movq (%rax), %rsi movl $0x5, %edx callq 0x13230 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x2b93b(%rip), %rax # 0x50010 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13230 movb %r14b, 0x30b(%rbx) movb $0x1, %r14b jmp 0x2473c xorl %r13d, %r13d movl %r13d, 0x50(%rbx) movq 0x338(%r12), %rax movq %rax, 0xf8(%rbx) movq 0x340(%r12), %rax movq %rax, 0x100(%rbx) movl 0x380(%r12), %eax movl %eax, 0xf4(%rbx) movl 0x388(%r12), %eax movl %eax, 0xf0(%rbx) movl $0x0, 0x488(%r12) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mysql_stmt_internal_reset: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov r12, [rdi+38h] test r12, r12 jz loc_24698 mov r15d, esi mov rdi, rbx mov esi, 0Bh call madb_reset_stmt mov r14d, eax cmp qword ptr [rbx+40h], 0 jz loc_246EF mov eax, [rbx+50h] mov rcx, [rbx+38h] cmp eax, 3 jb short loc_2463D cmp dword ptr [rcx+488h], 0 jnz short loc_24646 loc_2463D: test byte ptr [rcx+380h], 8 jz short loc_2467B loc_24646: cmp eax, 3 jnz short loc_2465B mov rdi, rbx call qword ptr [rbx+358h] mov dword ptr [rbx+50h], 5 loc_2465B: cmp dword ptr [rbx+60h], 0 jz short loc_2467B loc_24661: mov rdi, rbx call mysql_stmt_next_result test eax, eax jz short loc_24661 mov rax, [rbx+38h] mov dword ptr [rax+488h], 0 loc_2467B: mov r13d, 1 test r15b, r15b jnz short loc_246F2 mov rdi, rbx mov esi, 4 call madb_reset_stmt mov r14d, eax jmp short loc_246F2 loc_24698: mov dword ptr [rbx+108h], 7DDh lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r14b, 1 jmp short loc_2473C loc_246EF: xor r13d, r13d loc_246F2: mov [rbx+50h], r13d mov rax, [r12+338h] mov [rbx+0F8h], rax mov rax, [r12+340h] mov [rbx+100h], rax mov eax, [r12+380h] mov [rbx+0F4h], eax mov eax, [r12+388h] mov [rbx+0F0h], eax mov dword ptr [r12+488h], 0 loc_2473C: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mysql_stmt_internal_reset(long long a1, char a2) { long long v2; // r12 unsigned int v3; // r14d unsigned int v4; // eax long long v5; // rcx int v6; // r13d v2 = *(_QWORD *)(a1 + 56); if ( v2 ) { v3 = madb_reset_stmt(a1, 11LL); if ( *(_QWORD *)(a1 + 64) ) { v4 = *(_DWORD *)(a1 + 80); v5 = *(_QWORD *)(a1 + 56); if ( v4 >= 3 && *(_DWORD *)(v5 + 1160) || (*(_BYTE *)(v5 + 896) & 8) != 0 ) { if ( v4 == 3 ) { (*(void ( **)(long long))(a1 + 856))(a1); *(_DWORD *)(a1 + 80) = 5; } if ( *(_DWORD *)(a1 + 96) ) { while ( !(unsigned int)mysql_stmt_next_result(a1) ) ; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 0; } } v6 = 1; if ( !a2 ) v3 = madb_reset_stmt(a1, 4LL); } else { v6 = 0; } *(_DWORD *)(a1 + 80) = v6; *(_QWORD *)(a1 + 248) = *(_QWORD *)(v2 + 824); *(_QWORD *)(a1 + 256) = *(_QWORD *)(v2 + 832); *(_DWORD *)(a1 + 244) = *(_DWORD *)(v2 + 896); *(_DWORD *)(a1 + 240) = *(_DWORD *)(v2 + 904); *(_DWORD *)(v2 + 1160) = 0; } else { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); v3 = 1; *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[13], 512LL); *(_BYTE *)(a1 + 779) = 0; } return v3; }
mysql_stmt_internal_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R12,qword ptr [RDI + 0x38] TEST R12,R12 JZ 0x00124698 MOV R15D,ESI MOV RDI,RBX MOV ESI,0xb CALL 0x00125230 MOV R14D,EAX CMP qword ptr [RBX + 0x40],0x0 JZ 0x001246ef MOV EAX,dword ptr [RBX + 0x50] MOV RCX,qword ptr [RBX + 0x38] CMP EAX,0x3 JC 0x0012463d CMP dword ptr [RCX + 0x488],0x0 JNZ 0x00124646 LAB_0012463d: TEST byte ptr [RCX + 0x380],0x8 JZ 0x0012467b LAB_00124646: CMP EAX,0x3 JNZ 0x0012465b MOV RDI,RBX CALL qword ptr [RBX + 0x358] MOV dword ptr [RBX + 0x50],0x5 LAB_0012465b: CMP dword ptr [RBX + 0x60],0x0 JZ 0x0012467b LAB_00124661: MOV RDI,RBX CALL 0x00126b38 TEST EAX,EAX JZ 0x00124661 MOV RAX,qword ptr [RBX + 0x38] MOV dword ptr [RAX + 0x488],0x0 LAB_0012467b: MOV R13D,0x1 TEST R15B,R15B JNZ 0x001246f2 MOV RDI,RBX MOV ESI,0x4 CALL 0x00125230 MOV R14D,EAX JMP 0x001246f2 LAB_00124698: MOV dword ptr [RBX + 0x108],0x7dd LEA RDI,[RBX + 0x30d] LEA RAX,[0x150000] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113230 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x150010] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00113230 MOV byte ptr [RBX + 0x30b],R14B MOV R14B,0x1 JMP 0x0012473c LAB_001246ef: XOR R13D,R13D LAB_001246f2: MOV dword ptr [RBX + 0x50],R13D MOV RAX,qword ptr [R12 + 0x338] MOV qword ptr [RBX + 0xf8],RAX MOV RAX,qword ptr [R12 + 0x340] MOV qword ptr [RBX + 0x100],RAX MOV EAX,dword ptr [R12 + 0x380] MOV dword ptr [RBX + 0xf4],EAX MOV EAX,dword ptr [R12 + 0x388] MOV dword ptr [RBX + 0xf0],EAX MOV dword ptr [R12 + 0x488],0x0 LAB_0012473c: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 mysql_stmt_internal_reset(long param_1,char param_2) { long lVar1; int4 uVar2; int iVar3; int4 uVar4; lVar1 = *(long *)(param_1 + 0x38); if (lVar1 == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_00150078,0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar2 = 1; } else { uVar2 = madb_reset_stmt(param_1,0xb); if (*(long *)(param_1 + 0x40) == 0) { uVar4 = 0; } else { if (((2 < *(uint *)(param_1 + 0x50)) && (*(int *)(*(long *)(param_1 + 0x38) + 0x488) != 0)) || ((*(byte *)(*(long *)(param_1 + 0x38) + 0x380) & 8) != 0)) { if (*(uint *)(param_1 + 0x50) == 3) { (**(code **)(param_1 + 0x358))(param_1); *(int4 *)(param_1 + 0x50) = 5; } if (*(int *)(param_1 + 0x60) != 0) { do { iVar3 = mysql_stmt_next_result(param_1); } while (iVar3 == 0); *(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 0; } } uVar4 = 1; if (param_2 == '\0') { uVar2 = madb_reset_stmt(param_1,4); } } *(int4 *)(param_1 + 0x50) = uVar4; *(int8 *)(param_1 + 0xf8) = *(int8 *)(lVar1 + 0x338); *(int8 *)(param_1 + 0x100) = *(int8 *)(lVar1 + 0x340); *(int4 *)(param_1 + 0xf4) = *(int4 *)(lVar1 + 0x380); *(int4 *)(param_1 + 0xf0) = *(int4 *)(lVar1 + 0x388); *(int4 *)(lVar1 + 0x488) = 0; } return uVar2; }
30,941
mi_find_half_pos
eloqsql/storage/myisam/mi_write.c
uchar *_mi_find_half_pos(uint nod_flag, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint *return_key_length, uchar **after_key) { uint keys,length,key_ref_length; uchar *end,*lastpos; DBUG_ENTER("_mi_find_half_pos"); key_ref_length=2+nod_flag; length=mi_getint(page)-key_ref_length; page+=key_ref_length; if (!(keyinfo->flag & (HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { key_ref_length=keyinfo->keylength+nod_flag; keys=length/(key_ref_length*2); *return_key_length=keyinfo->keylength; end=page+keys*key_ref_length; *after_key=end+key_ref_length; memcpy(key,end,key_ref_length); DBUG_RETURN(end); } end=page+length/2-key_ref_length; /* This is aprox. half */ *key='\0'; do { lastpos=page; if (!(length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key))) DBUG_RETURN(0); } while (page < end); *return_key_length=length; *after_key=page; DBUG_PRINT("exit",("returns: %p page: %p half: %p", lastpos, page, end)); DBUG_RETURN(lastpos); }
O0
c
mi_find_half_pos: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movl -0xc(%rbp), %eax addl $0x2, %eax movl %eax, -0x44(%rbp) movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x20(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF subl -0x44(%rbp), %eax movl %eax, -0x40(%rbp) movl -0x44(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x2e, %eax cmpl $0x0, %eax jne 0xc97af movq -0x18(%rbp), %rax movzwl 0x12(%rax), %eax addl -0xc(%rbp), %eax movl %eax, -0x44(%rbp) movl -0x40(%rbp), %eax movl -0x44(%rbp), %ecx shll %ecx xorl %edx, %edx divl %ecx movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax movzwl 0x12(%rax), %ecx movq -0x30(%rbp), %rax movl %ecx, (%rax) movq -0x20(%rbp), %rax movl -0x3c(%rbp), %ecx imull -0x44(%rbp), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rcx movl -0x44(%rbp), %eax addq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rdi movq -0x50(%rbp), %rsi movl -0x44(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x50(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xc9836 movq -0x20(%rbp), %rax movl -0x40(%rbp), %ecx shrl %ecx movl %ecx, %ecx addq %rcx, %rax movl -0x44(%rbp), %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x18(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x28(%rbp), %rcx leaq -0x20(%rbp), %rdx callq *%rax movl %eax, -0x40(%rbp) cmpl $0x0, %eax jne 0xc980a jmp 0xc9800 movq $0x0, -0x8(%rbp) jmp 0xc9836 jmp 0xc980c movq -0x20(%rbp), %rax cmpq -0x50(%rbp), %rax jb 0xc97d5 movl -0x40(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, (%rax) movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) jmp 0xc982c jmp 0xc982e movq -0x58(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq
_mi_find_half_pos: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov eax, [rbp+var_C] add eax, 2 mov [rbp+var_44], eax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh sub eax, [rbp+var_44] mov [rbp+var_40], eax mov ecx, [rbp+var_44] mov rax, [rbp+var_20] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_18] movzx eax, word ptr [rax+0Ah] and eax, 2Eh cmp eax, 0 jnz short loc_C97AF mov rax, [rbp+var_18] movzx eax, word ptr [rax+12h] add eax, [rbp+var_C] mov [rbp+var_44], eax mov eax, [rbp+var_40] mov ecx, [rbp+var_44] shl ecx, 1 xor edx, edx div ecx mov [rbp+var_3C], eax mov rax, [rbp+var_18] movzx ecx, word ptr [rax+12h] mov rax, [rbp+var_30] mov [rax], ecx mov rax, [rbp+var_20] mov ecx, [rbp+var_3C] imul ecx, [rbp+var_44] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov rcx, [rbp+var_50] mov eax, [rbp+var_44] add rcx, rax mov rax, [rbp+var_38] mov [rax], rcx mov rdi, [rbp+var_28] mov rsi, [rbp+var_50] mov eax, [rbp+var_44] mov edx, eax call _memcpy mov rax, [rbp+var_50] mov [rbp+var_8], rax jmp loc_C9836 loc_C97AF: mov rax, [rbp+var_20] mov ecx, [rbp+var_40] shr ecx, 1 mov ecx, ecx add rax, rcx mov ecx, [rbp+var_44] mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_28] mov byte ptr [rax], 0 loc_C97D5: mov rax, [rbp+var_20] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov rax, [rax+48h] mov rdi, [rbp+var_18] mov esi, [rbp+var_C] mov rcx, [rbp+var_28] lea rdx, [rbp+var_20] call rax mov [rbp+var_40], eax cmp eax, 0 jnz short loc_C980A jmp short $+2 loc_C9800: mov [rbp+var_8], 0 jmp short loc_C9836 loc_C980A: jmp short $+2 loc_C980C: mov rax, [rbp+var_20] cmp rax, [rbp+var_50] jb short loc_C97D5 mov ecx, [rbp+var_40] mov rax, [rbp+var_30] mov [rax], ecx mov rcx, [rbp+var_20] mov rax, [rbp+var_38] mov [rax], rcx jmp short $+2 loc_C982C: jmp short $+2 loc_C982E: mov rax, [rbp+var_58] mov [rbp+var_8], rax loc_C9836: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
unsigned __int16 * mi_find_half_pos( unsigned int a1, long long a2, unsigned __int16 *a3, _BYTE *a4, _DWORD *a5, unsigned __int16 **a6) { unsigned __int16 *v7; // [rsp+8h] [rbp-58h] char *v8; // [rsp+10h] [rbp-50h] unsigned __int16 *v9; // [rsp+10h] [rbp-50h] unsigned int v10; // [rsp+1Ch] [rbp-44h] unsigned int v11; // [rsp+20h] [rbp-40h] int v12; // [rsp+20h] [rbp-40h] unsigned __int16 *v16; // [rsp+40h] [rbp-20h] BYREF long long v17; // [rsp+48h] [rbp-18h] unsigned int v18; // [rsp+54h] [rbp-Ch] v18 = a1; v17 = a2; v16 = a3; v11 = (_byteswap_ushort(*a3) & 0x7FFF) - (a1 + 2); v16 = (unsigned __int16 *)((char *)a3 + a1 + 2); if ( (*(_WORD *)(a2 + 10) & 0x2E) != 0 ) { v9 = (unsigned __int16 *)((char *)v16 + (v11 >> 1) - a1 - 2); *a4 = 0; do { v7 = v16; v12 = (*(long long ( **)(long long, _QWORD, unsigned __int16 **, _BYTE *))(v17 + 72))(v17, v18, &v16, a4); if ( !v12 ) return 0LL; } while ( v16 < v9 ); *a5 = v12; *a6 = v16; return v7; } else { v10 = v18 + *(unsigned __int16 *)(v17 + 18); *a5 = *(unsigned __int16 *)(v17 + 18); v8 = (char *)v16 + v10 * (v11 / (2 * v10)); *a6 = (unsigned __int16 *)&v8[v10]; memcpy(a4, v8, v10); return (unsigned __int16 *)v8; } }
_mi_find_half_pos: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x2 MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff SUB EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x40],EAX MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x2e CMP EAX,0x0 JNZ 0x001c97af MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x12] ADD EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x44] SHL ECX,0x1 XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX + 0x12] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x3c] IMUL ECX,dword ptr [RBP + -0x44] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RBP + -0x44] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RBP + -0x44] MOV EDX,EAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x8],RAX JMP 0x001c9836 LAB_001c97af: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x40] SHR ECX,0x1 MOV ECX,ECX ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x44] MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 LAB_001c97d5: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x28] LEA RDX,[RBP + -0x20] CALL RAX MOV dword ptr [RBP + -0x40],EAX CMP EAX,0x0 JNZ 0x001c980a JMP 0x001c9800 LAB_001c9800: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001c9836 LAB_001c980a: JMP 0x001c980c LAB_001c980c: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x50] JC 0x001c97d5 MOV ECX,dword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX JMP 0x001c982c LAB_001c982c: JMP 0x001c982e LAB_001c982e: MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x8],RAX LAB_001c9836: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
byte * _mi_find_half_pos(int param_1,long param_2,byte *param_3,int1 *param_4,uint *param_5, int8 *param_6) { byte *pbVar1; uint uVar2; uint uVar3; byte *pbVar4; byte *local_28; long local_20; int local_14; byte *local_10; uVar2 = param_1 + 2; uVar3 = ((uint)param_3[1] | (*param_3 & 0x7f) << 8) - uVar2; local_28 = param_3 + uVar2; local_20 = param_2; local_14 = param_1; if ((*(ushort *)(param_2 + 10) & 0x2e) == 0) { uVar2 = (uint)*(ushort *)(param_2 + 0x12) + param_1; *param_5 = (uint)*(ushort *)(param_2 + 0x12); pbVar4 = local_28 + (uVar3 / (uVar2 * 2)) * uVar2; *param_6 = pbVar4 + uVar2; memcpy(param_4,pbVar4,(ulong)uVar2); local_10 = pbVar4; } else { pbVar4 = local_28 + ((ulong)(uVar3 >> 1) - (ulong)uVar2); *param_4 = 0; do { pbVar1 = local_28; uVar2 = (**(code **)(local_20 + 0x48))(local_20,local_14,&local_28,param_4); if (uVar2 == 0) { return (byte *)0x0; } } while (local_28 < pbVar4); *param_5 = uVar2; *param_6 = local_28; local_10 = pbVar1; } return local_10; }
30,942
mi_new
eloqsql/storage/myisam/mi_page.c
my_off_t _mi_new(register MI_INFO *info, MI_KEYDEF *keyinfo, int level) { my_off_t pos; uchar buff[8]; DBUG_ENTER("_mi_new"); if ((pos= info->s->state.key_del[keyinfo->block_size_index]) == HA_OFFSET_ERROR) { if (info->state->key_file_length >= info->s->base.max_key_file_length - keyinfo->block_length) { my_errno=HA_ERR_INDEX_FILE_FULL; DBUG_RETURN(HA_OFFSET_ERROR); } pos=info->state->key_file_length; info->state->key_file_length+= keyinfo->block_length; } else { if (!key_cache_read(info->s->key_cache, info->s->kfile, pos, level, buff, (uint) sizeof(buff), (uint) keyinfo->block_length,0)) pos= HA_OFFSET_ERROR; else info->s->state.key_del[keyinfo->block_size_index]= mi_sizekorr(buff); } info->s->state.changed|= STATE_NOT_SORTED_PAGES; DBUG_PRINT("exit",("Pos: %ld",(long) pos)); DBUG_RETURN(pos); }
O3
c
mi_new: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movl %edx, %ecx movq %rsi, %r15 movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) movq (%rdi), %rax movq 0xa0(%rax), %rdx movzwl 0x18(%rsi), %esi movq (%rdx,%rsi,8), %rbx cmpq $-0x1, %rbx je 0x89198 movq 0x278(%rax), %rdi movl 0x350(%rax), %esi movzwl 0xe(%r15), %eax leaq -0x28(%rbp), %r8 movq %rbx, %rdx movl $0x8, %r9d pushq $0x0 pushq %rax callq 0x9d448 addq $0x10, %rsp testq %rax, %rax je 0x891bd movq -0x28(%rbp), %rax bswapq %rax movq (%r14), %rcx movq 0xa0(%rcx), %rcx movzwl 0x18(%r15), %edx movq %rax, (%rcx,%rdx,8) jmp 0x891c4 movq 0x8(%r14), %rcx movq 0x20(%rcx), %rbx movq 0x118(%rax), %rdx movzwl 0xe(%r15), %eax subq %rax, %rdx cmpq %rdx, %rbx jae 0x891eb addq %rbx, %rax movq %rax, 0x20(%rcx) jmp 0x891c4 movq $-0x1, %rbx movq (%r14), %rax orb $0x20, 0xf0(%rax) movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x891ff movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0xa8dda movl $0x88, (%rax) movq $-0x1, %rbx jmp 0x891ce callq 0x2a240
_mi_new: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov ecx, edx mov r15, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_20], rax mov rax, [rdi] mov rdx, [rax+0A0h] movzx esi, word ptr [rsi+18h] mov rbx, [rdx+rsi*8] cmp rbx, 0FFFFFFFFFFFFFFFFh jz short loc_89198 mov rdi, [rax+278h] mov esi, [rax+350h] movzx eax, word ptr [r15+0Eh] lea r8, [rbp+var_28] mov rdx, rbx mov r9d, 8 push 0 push rax call key_cache_read add rsp, 10h test rax, rax jz short loc_891BD mov rax, [rbp+var_28] bswap rax mov rcx, [r14] mov rcx, [rcx+0A0h] movzx edx, word ptr [r15+18h] mov [rcx+rdx*8], rax jmp short loc_891C4 loc_89198: mov rcx, [r14+8] mov rbx, [rcx+20h] mov rdx, [rax+118h] movzx eax, word ptr [r15+0Eh] sub rdx, rax cmp rbx, rdx jnb short loc_891EB add rax, rbx mov [rcx+20h], rax jmp short loc_891C4 loc_891BD: mov rbx, 0FFFFFFFFFFFFFFFFh loc_891C4: mov rax, [r14] or byte ptr [rax+0F0h], 20h loc_891CE: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_891FF mov rax, rbx add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn loc_891EB: call _my_thread_var mov dword ptr [rax], 88h mov rbx, 0FFFFFFFFFFFFFFFFh jmp short loc_891CE loc_891FF: call ___stack_chk_fail
long long mi_new(_QWORD *a1, long long a2) { long long v3; // rax const char *v4; // rsi unsigned long long v5; // rbx long long v6; // rcx long long v7; // rdx long long v8; // rax unsigned long long v10; // [rsp+8h] [rbp-28h] v3 = *a1; v4 = (const char *)*(unsigned __int16 *)(a2 + 24); v5 = *(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * (_QWORD)v4); if ( v5 == -1LL ) { v6 = a1[1]; v5 = *(_QWORD *)(v6 + 32); v7 = *(_QWORD *)(v3 + 280); v8 = *(unsigned __int16 *)(a2 + 14); if ( v5 >= v7 - v8 ) { *(_DWORD *)my_thread_var(a1, v4) = 136; return -1LL; } *(_QWORD *)(v6 + 32) = v5 + v8; } else if ( key_cache_read(*(_QWORD *)(v3 + 632), *(unsigned int *)(v3 + 848), v5) ) { *(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * *(unsigned __int16 *)(a2 + 24)) = _byteswap_uint64(v10); } else { v5 = -1LL; } *(_BYTE *)(*a1 + 240LL) |= 0x20u; return v5; }
_mi_new: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV ECX,EDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RAX + 0xa0] MOVZX ESI,word ptr [RSI + 0x18] MOV RBX,qword ptr [RDX + RSI*0x8] CMP RBX,-0x1 JZ 0x00189198 MOV RDI,qword ptr [RAX + 0x278] MOV ESI,dword ptr [RAX + 0x350] MOVZX EAX,word ptr [R15 + 0xe] LEA R8,[RBP + -0x28] MOV RDX,RBX MOV R9D,0x8 PUSH 0x0 PUSH RAX CALL 0x0019d448 ADD RSP,0x10 TEST RAX,RAX JZ 0x001891bd MOV RAX,qword ptr [RBP + -0x28] BSWAP RAX MOV RCX,qword ptr [R14] MOV RCX,qword ptr [RCX + 0xa0] MOVZX EDX,word ptr [R15 + 0x18] MOV qword ptr [RCX + RDX*0x8],RAX JMP 0x001891c4 LAB_00189198: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x20] MOV RDX,qword ptr [RAX + 0x118] MOVZX EAX,word ptr [R15 + 0xe] SUB RDX,RAX CMP RBX,RDX JNC 0x001891eb ADD RAX,RBX MOV qword ptr [RCX + 0x20],RAX JMP 0x001891c4 LAB_001891bd: MOV RBX,-0x1 LAB_001891c4: MOV RAX,qword ptr [R14] OR byte ptr [RAX + 0xf0],0x20 LAB_001891ce: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001891ff MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET LAB_001891eb: CALL 0x001a8dda MOV dword ptr [RAX],0x88 MOV RBX,-0x1 JMP 0x001891ce LAB_001891ff: CALL 0x0012a240
ulong _mi_new(long *param_1,long param_2,int4 param_3) { long lVar1; int4 *puVar2; ulong uVar3; long in_FS_OFFSET; ulong local_30; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *param_1; uVar3 = *(ulong *)(*(long *)(lVar1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8); if (uVar3 == 0xffffffffffffffff) { uVar3 = *(ulong *)(param_1[1] + 0x20); if (*(long *)(lVar1 + 0x118) - (ulong)*(ushort *)(param_2 + 0xe) <= uVar3) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x88; uVar3 = 0xffffffffffffffff; goto LAB_001891ce; } *(ulong *)(param_1[1] + 0x20) = *(ushort *)(param_2 + 0xe) + uVar3; } else { lVar1 = key_cache_read(*(int8 *)(lVar1 + 0x278),*(int4 *)(lVar1 + 0x350),uVar3, param_3,&local_30,8,*(int2 *)(param_2 + 0xe),0); if (lVar1 == 0) { uVar3 = 0xffffffffffffffff; } else { *(ulong *)(*(long *)(*param_1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8) = local_30 >> 0x38 | (local_30 & 0xff000000000000) >> 0x28 | (local_30 & 0xff0000000000) >> 0x18 | (local_30 & 0xff00000000) >> 8 | (local_30 & 0xff000000) << 8 | (local_30 & 0xff0000) << 0x18 | (local_30 & 0xff00) << 0x28 | local_30 << 0x38; } } *(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 0x20; LAB_001891ce: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
30,943
nglog::ReprintFatalMessage()
ng-log[P]ng-log/src/logging.cc
void ReprintFatalMessage() { if (fatal_message[0]) { const size_t n = strlen(fatal_message); if (!FLAGS_logtostderr) { // Also write to stderr (don't color to avoid terminal checks) WriteToStderr(fatal_message, n); } LogDestination::LogToAllLogfiles(NGLOG_ERROR, fatal_time, fatal_message, n); } }
O3
cpp
nglog::ReprintFatalMessage(): cmpb $0x0, 0x34f9e(%rip) # 0x40be0 je 0xbc7c pushq %rbx leaq 0x34f94(%rip), %rdi # 0x40be0 callq 0x71f0 movq %rax, %rbx leaq 0x25e1f(%rip), %rax # 0x31a7a cmpb $0x0, (%rax) je 0xbc7d leaq 0x35079(%rip), %rsi # 0x40ce0 leaq 0x34f72(%rip), %rdx # 0x40be0 movl $0x2, %edi movq %rbx, %rcx popq %rbx jmp 0x115e8 retq movq %rbx, %rdi callq 0x7b5b jmp 0xbc60 nop
_ZN5nglog19ReprintFatalMessageEv: cmp cs:_ZN5nglogL13fatal_messageE, 0; nglog::fatal_message jz short locret_BC7C push rbx lea rdi, _ZN5nglogL13fatal_messageE; nglog::fatal_message call _strlen mov rbx, rax lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr cmp byte ptr [rax], 0 jz short loc_BC7D loc_BC60: lea rsi, _ZN5nglogL10fatal_timeE; nglog::fatal_time lea rdx, _ZN5nglogL13fatal_messageE; nglog::fatal_message mov edi, 2 mov rcx, rbx pop rbx jmp _ZN5nglog14LogDestination16LogToAllLogfilesENS_11LogSeverityERKNSt6chrono10time_pointINS2_3_V212system_clockENS2_8durationIlSt5ratioILl1ELl1000000000EEEEEEPKcm; nglog::LogDestination::LogToAllLogfiles(nglog::LogSeverity,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,char const*,ulong) locret_BC7C: retn loc_BC7D: mov rdi, rbx call _ZN5nglog19ReprintFatalMessageEv_cold_1; nglog::ReprintFatalMessage(void) [clone] jmp short loc_BC60
void nglog::ReprintFatalMessage(nglog *this) { long long v1; // rbx if ( nglog::fatal_message ) { v1 = strlen(&nglog::fatal_message); if ( !fLB::FLAGS_logtostderr ) nglog::ReprintFatalMessage(v1); nglog::LogDestination::LogToAllLogfiles(2LL, &nglog::fatal_time, &nglog::fatal_message, v1); } }
ReprintFatalMessage: CMP byte ptr [0x00140be0],0x0 JZ 0x0010bc7c PUSH RBX LEA RDI,[0x140be0] CALL 0x001071f0 MOV RBX,RAX LEA RAX,[0x131a7a] CMP byte ptr [RAX],0x0 JZ 0x0010bc7d LAB_0010bc60: LEA RSI,[0x140ce0] LEA RDX,[0x140be0] MOV EDI,0x2 MOV RCX,RBX POP RBX JMP 0x001115e8 LAB_0010bc7c: RET LAB_0010bc7d: MOV RDI,RBX CALL 0x00107b5b JMP 0x0010bc60
/* nglog::ReprintFatalMessage() */ void nglog::ReprintFatalMessage(void) { nglog *this; if (fatal_message != '\0') { this = (nglog *)strlen(&fatal_message); if (fLB::FLAGS_logtostderr == '\0') { ReprintFatalMessage(this); } LogDestination::LogToAllLogfiles(2,&fatal_time,&fatal_message,this); return; } return; }
30,944
fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h
FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { for_each_codepoint(s, [this](uint32_t cp, string_view) { if (cp == invalid_code_point) FMT_THROW(std::runtime_error("invalid utf8")); if (cp <= 0xFFFF) { buffer_.push_back(static_cast<wchar_t>(cp)); } else { cp -= 0x10000; buffer_.push_back(static_cast<wchar_t>(0xD800 + (cp >> 10))); buffer_.push_back(static_cast<wchar_t>(0xDC00 + (cp & 0x3FF))); } return true; }); buffer_.push_back(0); }
O0
c
fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>): subq $0x78, %rsp movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rdi, 0x60(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x10(%rsp) movq %rax, 0x8(%rsp) leaq 0x5f(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x142d0 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x88a10 jmp 0x871d2 leaq 0x5f(%rsp), %rdi callq 0x14cb0 movq 0x8(%rsp), %rax movups 0x68(%rsp), %xmm0 movaps %xmm0, 0x30(%rsp) movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x87260 jmp 0x87206 movq 0x8(%rsp), %rdi movl $0x0, 0x24(%rsp) leaq 0x24(%rsp), %rsi callq 0x88a70 jmp 0x8721f addq $0x78, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x5f(%rsp), %rdi callq 0x14cb0 jmp 0x87256 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) callq 0x88ac0 movq 0x50(%rsp), %rdi callq 0x14c80
_ZN3fmt3v106detail13utf8_to_utf16C2ENS0_17basic_string_viewIcEE: sub rsp, 78h mov qword ptr [rsp+78h+var_10], rsi mov qword ptr [rsp+78h+var_10+8], rdx mov [rsp+78h+var_18], rdi mov rax, [rsp+78h+var_18] mov [rsp+78h+var_68], rax mov [rsp+78h+var_70], rax lea rdi, [rsp+78h+var_19] mov [rsp+78h+var_60], rdi call __ZNSaIwEC1Ev; std::allocator<wchar_t>::allocator(void) mov rdi, [rsp+78h+var_68] mov rsi, [rsp+78h+var_60] call _ZN3fmt3v1019basic_memory_bufferIwLm500ESaIwEEC2ERKS2_; fmt::v10::basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>>::basic_memory_buffer(std::allocator<wchar_t> const&) jmp short $+2 loc_871D2: lea rdi, [rsp+78h+var_19] call __ZNSaIwED1Ev; std::allocator<wchar_t>::~allocator() mov rax, [rsp+78h+var_70] movups xmm0, [rsp+78h+var_10] movaps [rsp+78h+var_48], xmm0 mov [rsp+78h+var_50], rax mov rdi, qword ptr [rsp+78h+var_48] mov rsi, qword ptr [rsp+78h+var_48+8] mov rdx, [rsp+78h+var_50] call _ZN3fmt3v106detail18for_each_codepointIZNS1_13utf8_to_utf16C1ENS0_17basic_string_viewIcEEE3$_0EEvS5_T_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>,fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0) jmp short $+2 loc_87206: mov rdi, [rsp+78h+var_70] mov [rsp+78h+var_54], 0 lea rsi, [rsp+78h+var_54] call _ZN3fmt3v106detail6bufferIwE9push_backERKw; fmt::v10::detail::buffer<wchar_t>::push_back(wchar_t const&) jmp short $+2 loc_8721F: add rsp, 78h retn mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax lea rdi, [rsp+arg_57] call __ZNSaIwED1Ev; std::allocator<wchar_t>::~allocator() jmp short loc_87256 mov rdi, [rsp+arg_8] mov rcx, rax mov eax, edx mov [rsp+arg_48], rcx mov [rsp+arg_44], eax call _ZN3fmt3v1019basic_memory_bufferIwLm500ESaIwEED2Ev; fmt::v10::basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>>::~basic_memory_buffer() loc_87256: mov rdi, [rsp+arg_48] call __Unwind_Resume
long long fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(long long a1, long long a2, long long a3) { int v4; // [rsp+24h] [rbp-54h] BYREF long long v5; // [rsp+28h] [rbp-50h] __int128 v6; // [rsp+30h] [rbp-48h] char v7; // [rsp+5Fh] [rbp-19h] BYREF long long v8; // [rsp+60h] [rbp-18h] __int128 v9; // [rsp+68h] [rbp-10h] *(_QWORD *)&v9 = a2; *((_QWORD *)&v9 + 1) = a3; v8 = a1; std::allocator<wchar_t>::allocator(); fmt::v10::basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>>::basic_memory_buffer(a1, &v7); std::allocator<wchar_t>::~allocator(&v7); v6 = v9; v5 = a1; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>( v9, *((_QWORD *)&v9 + 1), a1); v4 = 0; return fmt::v10::detail::buffer<wchar_t>::push_back(a1, &v4); }
utf8_to_utf16: SUB RSP,0x78 MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x60],RDI MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x5f] MOV qword ptr [RSP + 0x18],RDI CALL 0x001142d0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] LAB_001871cb: CALL 0x00188a10 JMP 0x001871d2 LAB_001871d2: LEA RDI,[RSP + 0x5f] CALL 0x00114cb0 MOV RAX,qword ptr [RSP + 0x8] MOVUPS XMM0,xmmword ptr [RSP + 0x68] MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x28] LAB_001871ff: CALL 0x00187260 JMP 0x00187206 LAB_00187206: MOV RDI,qword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x24],0x0 LEA RSI,[RSP + 0x24] CALL 0x00188a70 LAB_0018721d: JMP 0x0018721f LAB_0018721f: ADD RSP,0x78 RET
/* fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>) */ void __thiscall fmt::v10::detail::utf8_to_utf16::utf8_to_utf16 (utf8_to_utf16 *this,detail *param_2,int8 param_3) { wchar_t local_54; utf8_to_utf16 *local_50; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; allocator<wchar_t> local_19; utf8_to_utf16 *local_18; int8 local_10; int8 uStack_8; local_18 = this; local_10 = param_2; uStack_8 = param_3; std::allocator<wchar_t>::allocator(); /* try { // try from 001871cb to 001871cf has its CatchHandler @ 00187224 */ basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>>::basic_memory_buffer((allocator *)this) ; std::allocator<wchar_t>::~allocator(&local_19); local_48 = (int4)local_10; uStack_44 = local_10._4_4_; uStack_40 = (int4)uStack_8; uStack_3c = uStack_8._4_4_; local_50 = this; /* try { // try from 001871ff to 0018721c has its CatchHandler @ 0018723e */ for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::__0> (local_10,uStack_8,this); local_54 = L'\0'; buffer<wchar_t>::push_back((buffer<wchar_t> *)this,&local_54); return; }
30,945
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset()
hkr04[P]cpp-mcp/common/json.hpp
void reset() noexcept { token_buffer.clear(); token_string.clear(); token_string.push_back(char_traits<char_type>::to_char_type(current)); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::reset(): pushq %rax movq %rdi, %rax movq $0x0, 0x58(%rdi) movq 0x50(%rdi), %rcx movb $0x0, (%rcx) addq $0x38, %rdi movq 0x38(%rax), %rcx cmpq %rcx, 0x40(%rax) je 0x48023 movq %rcx, 0x40(%rax) movb 0x14(%rax), %al leaq 0x7(%rsp), %rsi movb %al, (%rsi) callq 0x28f68 popq %rax retq movq %rax, %rdi callq 0xe76c
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5resetEv: push rax mov rax, rdi mov qword ptr [rdi+58h], 0 mov rcx, [rdi+50h] mov byte ptr [rcx], 0 add rdi, 38h ; '8' mov rcx, [rax+38h] cmp [rax+40h], rcx jz short loc_48023 mov [rax+40h], rcx loc_48023: mov al, [rax+14h] lea rsi, [rsp+8+var_1] mov [rsi], al call _ZNSt6vectorIcSaIcEE12emplace_backIJcEEERcDpOT_; std::vector<char>::emplace_back<char>(char &&) pop rax retn mov rdi, rax call __clang_call_terminate
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::reset( long long a1) { long long v2; // rdi long long v3; // rcx char v4; // [rsp+1h] [rbp-1h] BYREF *(_QWORD *)(a1 + 88) = 0LL; **(_BYTE **)(a1 + 80) = 0; v2 = a1 + 56; v3 = *(_QWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 64) != v3 ) *(_QWORD *)(a1 + 64) = v3; v4 = *(_BYTE *)(a1 + 20); std::vector<char>::emplace_back<char>(v2, &v4); }
reset: PUSH RAX MOV RAX,RDI MOV qword ptr [RDI + 0x58],0x0 MOV RCX,qword ptr [RDI + 0x50] MOV byte ptr [RCX],0x0 ADD RDI,0x38 MOV RCX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x40],RCX JZ 0x00148023 MOV qword ptr [RAX + 0x40],RCX LAB_00148023: MOV AL,byte ptr [RAX + 0x14] LEA RSI,[RSP + 0x7] MOV byte ptr [RSI],AL LAB_0014802d: CALL 0x00128f68 POP RAX RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::reset() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::reset(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int8 in_RAX; int8 uStack_8; *(int8 *)(this + 0x58) = 0; **(int1 **)(this + 0x50) = 0; if (*(long *)(this + 0x40) != *(long *)(this + 0x38)) { *(long *)(this + 0x40) = *(long *)(this + 0x38); } uStack_8 = CONCAT17(this[0x14],(int7)in_RAX); /* try { // try from 0014802d to 00148031 has its CatchHandler @ 00148034 */ std::vector<char,std::allocator<char>>::emplace_back<char> ((vector<char,std::allocator<char>> *)(this + 0x38),(char *)((long)&uStack_8 + 7)); return uStack_8; }
30,946
my_default_csname
eloqsql/mysys/charset.c
const char* my_default_csname() { const char* csname = NULL; #ifdef _WIN32 char cpbuf[64]; int cp = GetConsoleCP(); if (cp == 0) cp = GetACP(); snprintf(cpbuf, sizeof(cpbuf), "cp%d", (int)cp); csname = my_os_charset_to_mysql_charset(cpbuf); #elif defined(HAVE_SETLOCALE) && defined(HAVE_NL_LANGINFO) if (setlocale(LC_CTYPE, "") && (csname = nl_langinfo(CODESET))) csname = my_os_charset_to_mysql_charset(csname); #endif return csname ? csname : MYSQL_DEFAULT_CHARSET_NAME; }
O0
c
my_default_csname: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq $0x0, -0x8(%rbp) xorl %edi, %edi leaq 0x72e29(%rip), %rsi # 0xe1072 callq 0x28300 cmpq $0x0, %rax je 0x6e275 movl $0xe, %edi callq 0x28360 movq %rax, -0x8(%rbp) cmpq $0x0, %rax je 0x6e275 movq -0x8(%rbp), %rdi callq 0x6e2a0 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x6e286 movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x6e293 leaq 0x6f0b8(%rip), %rax # 0xdd345 movq %rax, -0x10(%rbp) jmp 0x6e293 movq -0x10(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax)
my_default_csname: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], 0 xor edi, edi lea rsi, asc_E106E+4; "" call _setlocale cmp rax, 0 jz short loc_6E275 mov edi, 0Eh call _nl_langinfo mov [rbp+var_8], rax cmp rax, 0 jz short loc_6E275 mov rdi, [rbp+var_8] call my_os_charset_to_mysql_charset mov [rbp+var_8], rax loc_6E275: cmp [rbp+var_8], 0 jz short loc_6E286 mov rax, [rbp+var_8] mov [rbp+var_10], rax jmp short loc_6E293 loc_6E286: lea rax, aLatin1; "latin1" mov [rbp+var_10], rax jmp short $+2 loc_6E293: mov rax, [rbp+var_10] add rsp, 10h pop rbp retn
const char *my_default_csname() { long long v2; // [rsp+8h] [rbp-8h] v2 = 0LL; if ( setlocale(0LL, "") ) { v2 = nl_langinfo(14LL); if ( v2 ) v2 = my_os_charset_to_mysql_charset(v2); } if ( v2 ) return (const char *)v2; else return "latin1"; }
my_default_csname: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],0x0 XOR EDI,EDI LEA RSI,[0x1e1072] CALL 0x00128300 CMP RAX,0x0 JZ 0x0016e275 MOV EDI,0xe CALL 0x00128360 MOV qword ptr [RBP + -0x8],RAX CMP RAX,0x0 JZ 0x0016e275 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0016e2a0 MOV qword ptr [RBP + -0x8],RAX LAB_0016e275: CMP qword ptr [RBP + -0x8],0x0 JZ 0x0016e286 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x0016e293 LAB_0016e286: LEA RAX,[0x1dd345] MOV qword ptr [RBP + -0x10],RAX JMP 0x0016e293 LAB_0016e293: MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x10 POP RBP RET
char * my_default_csname(void) { char *pcVar1; char *local_18; char *local_10; local_10 = (char *)0x0; pcVar1 = setlocale(0,""); if (pcVar1 != (char *)0x0) { local_10 = nl_langinfo(0xe); if (local_10 != (char *)0x0) { local_10 = (char *)my_os_charset_to_mysql_charset(local_10); } } if (local_10 == (char *)0x0) { local_18 = "latin1"; } else { local_18 = local_10; } return local_18; }
30,947
mbedtls_ecp_gen_privkey
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ecp.c
mbedtls_ecp_curve_type mbedtls_ecp_get_type(const mbedtls_ecp_group *grp) { if (grp->G.X.p == NULL) { return MBEDTLS_ECP_TYPE_NONE; } if (grp->G.Y.p == NULL) { return MBEDTLS_ECP_TYPE_MONTGOMERY; } else { return MBEDTLS_ECP_TYPE_SHORT_WEIERSTRASS; } }
O3
c
mbedtls_ecp_gen_privkey: pushq %r15 pushq %r14 pushq %rbx cmpq $0x0, 0x60(%rdi) je 0x85e82 movq %rcx, %r8 movq %rdx, %rcx movq %rsi, %rbx movq %rdi, %rdx cmpq $0x0, 0x78(%rdi) je 0x85e8c addq $0x98, %rdx movl $0x1, %esi movq %rbx, %rdi callq 0x80f83 movl %eax, %ecx cmpl $-0xe, %eax movl $0xffffb300, %eax # imm = 0xFFFFB300 cmovnel %ecx, %eax jmp 0x85f22 movl $0xffffb080, %eax # imm = 0xFFFFB080 jmp 0x85f22 movq 0xb8(%rdx), %r14 movq %r14, %r15 shrq $0x3, %r15 incq %r15 movq %rbx, %rdi movq %r15, %rsi movq %rcx, %rdx movq %r8, %rcx callq 0x80e47 testl %eax, %eax jne 0x85f22 movq %r14, %rax notq %rax leaq (%rax,%r15,8), %rsi movq %rbx, %rdi callq 0x7ef26 testl %eax, %eax jne 0x85f22 movq %rbx, %rdi movq %r14, %rsi movl $0x1, %edx callq 0x7e203 testl %eax, %eax jne 0x85f22 movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx callq 0x7e203 testl %eax, %eax jne 0x85f22 movl $0x1, %esi movq %rbx, %rdi xorl %edx, %edx callq 0x7e203 testl %eax, %eax setne %cl cmpq $0xfe, %r14 setne %dl orb %cl, %dl jne 0x85f22 movl $0x2, %esi movq %rbx, %rdi xorl %edx, %edx popq %rbx popq %r14 popq %r15 jmp 0x7e203 popq %rbx popq %r14 popq %r15 retq
mbedtls_ecp_gen_privkey: push r15 push r14 push rbx cmp qword ptr [rdi+60h], 0 jz short loc_85E82 mov r8, rcx mov rcx, rdx mov rbx, rsi mov rdx, rdi cmp qword ptr [rdi+78h], 0 jz short loc_85E8C add rdx, 98h mov esi, 1 mov rdi, rbx call mbedtls_mpi_random mov ecx, eax cmp eax, 0FFFFFFF2h mov eax, 0FFFFB300h cmovnz eax, ecx jmp loc_85F22 loc_85E82: mov eax, 0FFFFB080h jmp loc_85F22 loc_85E8C: mov r14, [rdx+0B8h] mov r15, r14 shr r15, 3 inc r15 mov rdi, rbx mov rsi, r15 mov rdx, rcx mov rcx, r8 call mbedtls_mpi_fill_random test eax, eax jnz short loc_85F22 mov rax, r14 not rax lea rsi, [rax+r15*8] mov rdi, rbx call mbedtls_mpi_shift_r test eax, eax jnz short loc_85F22 mov rdi, rbx mov rsi, r14 mov edx, 1 call mbedtls_mpi_set_bit test eax, eax jnz short loc_85F22 mov rdi, rbx xor esi, esi xor edx, edx call mbedtls_mpi_set_bit test eax, eax jnz short loc_85F22 mov esi, 1 mov rdi, rbx xor edx, edx call mbedtls_mpi_set_bit test eax, eax setnz cl cmp r14, 0FEh setnz dl or dl, cl jnz short loc_85F22 mov esi, 2 mov rdi, rbx xor edx, edx pop rbx pop r14 pop r15 jmp mbedtls_mpi_set_bit loc_85F22: pop rbx pop r14 pop r15 retn
long long mbedtls_ecp_gen_privkey( _QWORD *a1, long long a2, long long ( *a3)(long long, unsigned long long, unsigned long long), long long a4) { unsigned int v4; // ecx long long result; // rax unsigned long long v6; // r14 unsigned long long v7; // r15 if ( !a1[12] ) return 4294946944LL; if ( a1[15] ) { v4 = mbedtls_mpi_random(a2, 1LL, a1 + 19, a3, a4); result = 4294947584LL; if ( v4 != -14 ) return v4; } else { v6 = a1[23]; v7 = (v6 >> 3) + 1; result = mbedtls_mpi_fill_random(a2, v7, (long long)a3, a4); if ( !(_DWORD)result ) { result = mbedtls_mpi_shift_r(a2, ~v6 + 8 * v7); if ( !(_DWORD)result ) { result = mbedtls_mpi_set_bit(a2, v6, 1u); if ( !(_DWORD)result ) { result = mbedtls_mpi_set_bit(a2, 0LL, 0); if ( !(_DWORD)result ) { result = mbedtls_mpi_set_bit(a2, 1uLL, 0); if ( (_DWORD)result == 0 && v6 == 254 ) return mbedtls_mpi_set_bit(a2, 2uLL, 0); } } } } } return result; }
mbedtls_ecp_gen_privkey: PUSH R15 PUSH R14 PUSH RBX CMP qword ptr [RDI + 0x60],0x0 JZ 0x00185e82 MOV R8,RCX MOV RCX,RDX MOV RBX,RSI MOV RDX,RDI CMP qword ptr [RDI + 0x78],0x0 JZ 0x00185e8c ADD RDX,0x98 MOV ESI,0x1 MOV RDI,RBX CALL 0x00180f83 MOV ECX,EAX CMP EAX,-0xe MOV EAX,0xffffb300 CMOVNZ EAX,ECX JMP 0x00185f22 LAB_00185e82: MOV EAX,0xffffb080 JMP 0x00185f22 LAB_00185e8c: MOV R14,qword ptr [RDX + 0xb8] MOV R15,R14 SHR R15,0x3 INC R15 MOV RDI,RBX MOV RSI,R15 MOV RDX,RCX MOV RCX,R8 CALL 0x00180e47 TEST EAX,EAX JNZ 0x00185f22 MOV RAX,R14 NOT RAX LEA RSI,[RAX + R15*0x8] MOV RDI,RBX CALL 0x0017ef26 TEST EAX,EAX JNZ 0x00185f22 MOV RDI,RBX MOV RSI,R14 MOV EDX,0x1 CALL 0x0017e203 TEST EAX,EAX JNZ 0x00185f22 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX CALL 0x0017e203 TEST EAX,EAX JNZ 0x00185f22 MOV ESI,0x1 MOV RDI,RBX XOR EDX,EDX CALL 0x0017e203 TEST EAX,EAX SETNZ CL CMP R14,0xfe SETNZ DL OR DL,CL JNZ 0x00185f22 MOV ESI,0x2 MOV RDI,RBX XOR EDX,EDX POP RBX POP R14 POP R15 JMP 0x0017e203 LAB_00185f22: POP RBX POP R14 POP R15 RET
ulong mbedtls_ecp_gen_privkey(long param_1,int8 param_2,int8 param_3,int8 param_4) { ulong uVar1; uint uVar2; ulong uVar3; long lVar4; if (*(long *)(param_1 + 0x60) == 0) { uVar3 = 0xffffb080; } else if (*(long *)(param_1 + 0x78) == 0) { uVar1 = *(ulong *)(param_1 + 0xb8); lVar4 = (uVar1 >> 3) + 1; uVar3 = mbedtls_mpi_fill_random(param_2,lVar4,param_3,param_4); if (((((int)uVar3 == 0) && (uVar3 = mbedtls_mpi_shift_r(param_2,~uVar1 + lVar4 * 8), (int)uVar3 == 0)) && (uVar3 = mbedtls_mpi_set_bit(param_2,uVar1,1), (int)uVar3 == 0)) && ((uVar3 = mbedtls_mpi_set_bit(param_2,0,0), (int)uVar3 == 0 && (uVar3 = mbedtls_mpi_set_bit(param_2,1,0), uVar1 == 0xfe && (int)uVar3 == 0)))) { uVar3 = mbedtls_mpi_set_bit(param_2,2,0); return uVar3; } } else { uVar2 = mbedtls_mpi_random(param_2,1,param_1 + 0x98); uVar3 = 0xffffb300; if (uVar2 != 0xfffffff2) { uVar3 = (ulong)uVar2; } } return uVar3; }
30,948
ggml_set_i32_1d
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c
void ggml_set_i32_1d(const struct ggml_tensor * tensor, int i, int32_t value) { if (!ggml_is_contiguous(tensor)) { int64_t id[4] = { 0, 0, 0, 0 }; ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]); ggml_set_i32_nd(tensor, id[0], id[1], id[2], id[3], value); return; } switch (tensor->type) { case GGML_TYPE_I8: { GGML_ASSERT(tensor->nb[0] == sizeof(int8_t)); ((int8_t *)(tensor->data))[i] = value; } break; case GGML_TYPE_I16: { GGML_ASSERT(tensor->nb[0] == sizeof(int16_t)); ((int16_t *)(tensor->data))[i] = value; } break; case GGML_TYPE_I32: { GGML_ASSERT(tensor->nb[0] == sizeof(int32_t)); ((int32_t *)(tensor->data))[i] = value; } break; case GGML_TYPE_F16: { GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t)); ((ggml_fp16_t *)(tensor->data))[i] = GGML_FP32_TO_FP16(value); } break; case GGML_TYPE_BF16: { GGML_ASSERT(tensor->nb[0] == sizeof(ggml_bf16_t)); ((ggml_bf16_t *)(tensor->data))[i] = GGML_FP32_TO_BF16(value); } break; case GGML_TYPE_F32: { GGML_ASSERT(tensor->nb[0] == sizeof(float)); ((float *)(tensor->data))[i] = value; } break; default: { GGML_ABORT("fatal error"); } } }
O3
c
ggml_set_i32_1d: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movl %edx, %ebx movl %esi, %ebp movq %rdi, %r14 callq 0xa230 testb %al, %al je 0xcb4d movl (%r14), %eax leal -0x18(%rax), %ecx cmpl $0x6, %ecx ja 0xcb9e leaq 0x3b5ee(%rip), %rax # 0x48118 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx cmpq $0x1, 0x30(%r14) jne 0xcc97 movq 0xf8(%r14), %rax movslq %ebp, %rcx movb %bl, (%rax,%rcx) jmp 0xcb93 vxorps %xmm0, %xmm0, %xmm0 leaq 0x8(%rsp), %rcx vmovups %ymm0, -0x8(%rcx) movslq %ebp, %rsi leaq 0x10(%rsp), %r8 leaq 0x18(%rsp), %r9 movq %rsp, %r15 movq %r14, %rdi movq %r15, %rdx vzeroupper callq 0xa6e0 movl (%r15), %esi movl 0x8(%r15), %edx movl 0x10(%r15), %ecx movl 0x18(%r15), %r8d movq %r14, %rdi movl %ebx, %r9d callq 0xa580 addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq testl %eax, %eax je 0xcc43 cmpl $0x1, %eax jne 0xcc7d cmpq $0x2, 0x30(%r14) jne 0xcd26 vcvtsi2ss %ebx, %xmm0, %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 movq 0xf8(%r14), %rax movslq %ebp, %rcx vpextrw $0x0, %xmm0, (%rax,%rcx,2) jmp 0xcb93 cmpq $0x2, 0x30(%r14) jne 0xccb6 movq 0xf8(%r14), %rax movslq %ebp, %rcx movw %bx, (%rax,%rcx,2) jmp 0xcb93 cmpq $0x4, 0x30(%r14) jne 0xccd2 movq 0xf8(%r14), %rax movslq %ebp, %rcx movl %ebx, (%rax,%rcx,4) jmp 0xcb93 cmpq $0x2, 0x30(%r14) jne 0xccee movq 0xf8(%r14), %rax movslq %ebp, %rcx vcvtsi2ss %ebx, %xmm0, %xmm0 vmovd %xmm0, %esi movl %esi, %edi andl $0x7fffffff, %edi # imm = 0x7FFFFFFF movl %esi, %edx shrl $0x10, %edx cmpl $0x7f800001, %edi # imm = 0x7F800001 jb 0xcc66 orl $0x40, %edx jmp 0xcc74 cmpq $0x4, 0x30(%r14) jne 0xcd0a vcvtsi2ss %ebx, %xmm0, %xmm0 movq 0xf8(%r14), %rax movslq %ebp, %rcx vmovss %xmm0, (%rax,%rcx,4) jmp 0xcb93 andl $0x1, %edx addl %esi, %edx addl $0x7fff, %edx # imm = 0x7FFF shrl $0x10, %edx movw %dx, (%rax,%rcx,2) jmp 0xcb93 leaq 0x3b88e(%rip), %rdi # 0x48512 leaq 0x3b9f5(%rip), %rdx # 0x48680 movl $0x3d6, %esi # imm = 0x3D6 xorl %eax, %eax callq 0xaf40 leaq 0x3b874(%rip), %rdi # 0x48512 leaq 0x3b8c5(%rip), %rdx # 0x4856a leaq 0x3b9e0(%rip), %rcx # 0x4868c movl $0x3b8, %esi # imm = 0x3B8 jmp 0xcd40 leaq 0x3b855(%rip), %rdi # 0x48512 leaq 0x3b8a6(%rip), %rdx # 0x4856a leaq 0x3b9e1(%rip), %rcx # 0x486ac movl $0x3bd, %esi # imm = 0x3BD jmp 0xcd40 leaq 0x3b839(%rip), %rdi # 0x48512 leaq 0x3b88a(%rip), %rdx # 0x4856a leaq 0x3b9e6(%rip), %rcx # 0x486cd movl $0x3c2, %esi # imm = 0x3C2 jmp 0xcd40 leaq 0x3b81d(%rip), %rdi # 0x48512 leaq 0x3b86e(%rip), %rdx # 0x4856a leaq 0x3ba10(%rip), %rcx # 0x48713 movl $0x3cc, %esi # imm = 0x3CC jmp 0xcd40 leaq 0x3b801(%rip), %rdi # 0x48512 leaq 0x3b852(%rip), %rdx # 0x4856a leaq 0x3ba19(%rip), %rcx # 0x48738 movl $0x3d1, %esi # imm = 0x3D1 jmp 0xcd40 leaq 0x3b7e5(%rip), %rdi # 0x48512 leaq 0x3b836(%rip), %rdx # 0x4856a leaq 0x3b9b3(%rip), %rcx # 0x486ee movl $0x3c7, %esi # imm = 0x3C7 xorl %eax, %eax callq 0xaf40
ggml_set_i32_1d: push rbp push r15 push r14 push rbx sub rsp, 28h mov ebx, edx mov ebp, esi mov r14, rdi call _ggml_is_contiguous test al, al jz short loc_CB4D mov eax, [r14] lea ecx, [rax-18h]; switch 7 cases cmp ecx, 6 ja short def_CB31; jumptable 000000000000CB31 default case lea rax, jpt_CB31 movsxd rcx, ds:(jpt_CB31 - 48118h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_CB33: cmp qword ptr [r14+30h], 1; jumptable 000000000000CB31 case 24 jnz loc_CC97 mov rax, [r14+0F8h] movsxd rcx, ebp mov [rax+rcx], bl jmp short loc_CB93 loc_CB4D: vxorps xmm0, xmm0, xmm0 lea rcx, [rsp+48h+var_40] vmovups ymmword ptr [rcx-8], ymm0 movsxd rsi, ebp lea r8, [rsp+48h+var_38] lea r9, [rsp+48h+var_30] mov r15, rsp mov rdi, r14 mov rdx, r15 vzeroupper call _ggml_unravel_index mov esi, [r15] mov edx, [r15+8] mov ecx, [r15+10h] mov r8d, [r15+18h] mov rdi, r14 mov r9d, ebx call _ggml_set_i32_nd loc_CB93: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn def_CB31: test eax, eax; jumptable 000000000000CB31 default case jz loc_CC43 cmp eax, 1 jnz loc_CC7D; jumptable 000000000000CB31 cases 27-29 cmp qword ptr [r14+30h], 2 jnz loc_CD26 vcvtsi2ss xmm0, xmm0, ebx vcvtps2ph xmm0, xmm0, 0 mov rax, [r14+0F8h] movsxd rcx, ebp vpextrw word ptr [rax+rcx*2], xmm0, 0 jmp short loc_CB93 loc_CBD7: cmp qword ptr [r14+30h], 2; jumptable 000000000000CB31 case 25 jnz loc_CCB6 mov rax, [r14+0F8h] movsxd rcx, ebp mov [rax+rcx*2], bx jmp short loc_CB93 loc_CBF2: cmp qword ptr [r14+30h], 4; jumptable 000000000000CB31 case 26 jnz loc_CCD2 mov rax, [r14+0F8h] movsxd rcx, ebp mov [rax+rcx*4], ebx jmp short loc_CB93 loc_CC0C: cmp qword ptr [r14+30h], 2; jumptable 000000000000CB31 case 30 jnz loc_CCEE mov rax, [r14+0F8h] movsxd rcx, ebp vcvtsi2ss xmm0, xmm0, ebx vmovd esi, xmm0 mov edi, esi and edi, 7FFFFFFFh mov edx, esi shr edx, 10h cmp edi, 7F800001h jb short loc_CC66 or edx, 40h jmp short loc_CC74 loc_CC43: cmp qword ptr [r14+30h], 4 jnz loc_CD0A vcvtsi2ss xmm0, xmm0, ebx mov rax, [r14+0F8h] movsxd rcx, ebp vmovss dword ptr [rax+rcx*4], xmm0 jmp loc_CB93 loc_CC66: and edx, 1 add edx, esi add edx, 7FFFh shr edx, 10h loc_CC74: mov [rax+rcx*2], dx jmp loc_CB93 loc_CC7D: lea rdi, aWorkspaceLlm4b_0; jumptable 000000000000CB31 cases 27-29 lea rdx, aFatalError; "fatal error" mov esi, 3D6h xor eax, eax call _ggml_abort loc_CC97: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(int8_t)" mov esi, 3B8h jmp loc_CD40 loc_CCB6: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNb0Sizeo_0; "tensor->nb[0] == sizeof(int16_t)" mov esi, 3BDh jmp short loc_CD40 loc_CCD2: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNb0Sizeo_1; "tensor->nb[0] == sizeof(int32_t)" mov esi, 3C2h jmp short loc_CD40 loc_CCEE: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNb0Sizeo_2; "tensor->nb[0] == sizeof(ggml_bf16_t)" mov esi, 3CCh jmp short loc_CD40 loc_CD0A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNb0Sizeo_3; "tensor->nb[0] == sizeof(float)" mov esi, 3D1h jmp short loc_CD40 loc_CD26: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNb0Sizeo_4; "tensor->nb[0] == sizeof(ggml_fp16_t)" mov esi, 3C7h loc_CD40: xor eax, eax call _ggml_abort
long long ggml_set_i32_1d(int *a1, int a2, unsigned int a3, __m128 _XMM0) { int v7; // eax long long result; // rax unsigned int v16; // edx unsigned int v19; // [rsp+0h] [rbp-48h] BYREF unsigned int v20; // [rsp+8h] [rbp-40h] BYREF unsigned int v21; // [rsp+10h] [rbp-38h] BYREF _DWORD v22[12]; // [rsp+18h] [rbp-30h] BYREF if ( (unsigned __int8)ggml_is_contiguous() ) { v7 = *a1; switch ( *a1 ) { case 24: if ( *((_QWORD *)a1 + 6) != 1LL ) goto LABEL_22; result = *((_QWORD *)a1 + 31); *(_BYTE *)(result + a2) = a3; return result; case 25: if ( *((_QWORD *)a1 + 6) != 2LL ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 957LL, "GGML_ASSERT(%s) failed", "tensor->nb[0] == sizeof(int16_t)"); goto LABEL_28; } result = *((_QWORD *)a1 + 31); *(_WORD *)(result + 2LL * a2) = a3; return result; case 26: if ( *((_QWORD *)a1 + 6) != 4LL ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 962LL, "GGML_ASSERT(%s) failed", "tensor->nb[0] == sizeof(int32_t)"); goto LABEL_28; } result = *((_QWORD *)a1 + 31); *(_DWORD *)(result + 4LL * a2) = a3; return result; case 27: case 28: case 29: goto LABEL_21; case 30: if ( *((_QWORD *)a1 + 6) != 2LL ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 972LL, "GGML_ASSERT(%s) failed", "tensor->nb[0] == sizeof(ggml_bf16_t)"); goto LABEL_28; } result = *((_QWORD *)a1 + 31); __asm { vcvtsi2ss xmm0, xmm0, ebx vmovd esi, xmm0 } if ( (_ESI & 0x7FFFFFFF) < 0x7F800001 ) v16 = (_ESI + (HIWORD(_ESI) & 1) + 0x7FFF) >> 16; else LOWORD(v16) = HIWORD(_ESI) | 0x40; *(_WORD *)(result + 2LL * a2) = v16; return result; default: if ( v7 ) { if ( v7 == 1 ) { if ( *((_QWORD *)a1 + 6) == 2LL ) { __asm { vcvtsi2ss xmm0, xmm0, ebx vcvtps2ph xmm0, xmm0, 0 } result = *((_QWORD *)a1 + 31); _RCX = a2; __asm { vpextrw word ptr [rax+rcx*2], xmm0, 0 } return result; } ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 967LL, "GGML_ASSERT(%s) failed", "tensor->nb[0] == sizeof(ggml_fp16_t)"); } else { LABEL_21: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 982LL, "fatal error"); LABEL_22: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 952LL, "GGML_ASSERT(%s) failed", "tensor->nb[0] == sizeof(int8_t)"); } } else { if ( *((_QWORD *)a1 + 6) == 4LL ) { __asm { vcvtsi2ss xmm0, xmm0, ebx } result = *((_QWORD *)a1 + 31); _RCX = a2; __asm { vmovss dword ptr [rax+rcx*4], xmm0 } return result; } ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c", 977LL, "GGML_ASSERT(%s) failed", "tensor->nb[0] == sizeof(float)"); } LABEL_28: result = ggml_set_i32_nd(); break; } } else { __asm { vxorps xmm0, xmm0, xmm0 } _RCX = &v20; __asm { vmovups ymmword ptr [rcx-8], ymm0 vzeroupper } ggml_unravel_index(a1, a2, &v19, &v20, &v21, v22, *(double *)&_XMM0); return ggml_set_i32_nd(a1, v19, v20, v21, v22[0], a3); } return result; }
ggml_set_i32_1d: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV EBX,EDX MOV EBP,ESI MOV R14,RDI CALL 0x0010a230 TEST AL,AL JZ 0x0010cb4d MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x18] CMP ECX,0x6 JA 0x0010cb9e LEA RAX,[0x148118] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_18: CMP qword ptr [R14 + 0x30],0x1 JNZ 0x0010cc97 MOV RAX,qword ptr [R14 + 0xf8] MOVSXD RCX,EBP MOV byte ptr [RAX + RCX*0x1],BL JMP 0x0010cb93 LAB_0010cb4d: VXORPS XMM0,XMM0,XMM0 LEA RCX,[RSP + 0x8] VMOVUPS ymmword ptr [RCX + -0x8],YMM0 MOVSXD RSI,EBP LEA R8,[RSP + 0x10] LEA R9,[RSP + 0x18] MOV R15,RSP MOV RDI,R14 MOV RDX,R15 VZEROUPPER CALL 0x0010a6e0 MOV ESI,dword ptr [R15] MOV EDX,dword ptr [R15 + 0x8] MOV ECX,dword ptr [R15 + 0x10] MOV R8D,dword ptr [R15 + 0x18] MOV RDI,R14 MOV R9D,EBX CALL 0x0010a580 LAB_0010cb93: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET default: TEST EAX,EAX JZ 0x0010cc43 CMP EAX,0x1 JNZ 0x0010cc7d CMP qword ptr [R14 + 0x30],0x2 JNZ 0x0010cd26 VCVTSI2SS XMM0,XMM0,EBX VCVTPS2PH XMM0,XMM0,0x0 MOV RAX,qword ptr [R14 + 0xf8] MOVSXD RCX,EBP VPEXTRW word ptr [RAX + RCX*0x2],XMM0,0x0 JMP 0x0010cb93 caseD_19: CMP qword ptr [R14 + 0x30],0x2 JNZ 0x0010ccb6 MOV RAX,qword ptr [R14 + 0xf8] MOVSXD RCX,EBP MOV word ptr [RAX + RCX*0x2],BX JMP 0x0010cb93 caseD_1a: CMP qword ptr [R14 + 0x30],0x4 JNZ 0x0010ccd2 MOV RAX,qword ptr [R14 + 0xf8] MOVSXD RCX,EBP MOV dword ptr [RAX + RCX*0x4],EBX JMP 0x0010cb93 caseD_1e: CMP qword ptr [R14 + 0x30],0x2 JNZ 0x0010ccee MOV RAX,qword ptr [R14 + 0xf8] MOVSXD RCX,EBP VCVTSI2SS XMM0,XMM0,EBX VMOVD ESI,XMM0 MOV EDI,ESI AND EDI,0x7fffffff MOV EDX,ESI SHR EDX,0x10 CMP EDI,0x7f800001 JC 0x0010cc66 OR EDX,0x40 JMP 0x0010cc74 LAB_0010cc43: CMP qword ptr [R14 + 0x30],0x4 JNZ 0x0010cd0a VCVTSI2SS XMM0,XMM0,EBX MOV RAX,qword ptr [R14 + 0xf8] MOVSXD RCX,EBP VMOVSS dword ptr [RAX + RCX*0x4],XMM0 JMP 0x0010cb93 LAB_0010cc66: AND EDX,0x1 ADD EDX,ESI ADD EDX,0x7fff SHR EDX,0x10 LAB_0010cc74: MOV word ptr [RAX + RCX*0x2],DX JMP 0x0010cb93 caseD_1b: LEA RDI,[0x148512] LEA RDX,[0x148680] MOV ESI,0x3d6 XOR EAX,EAX CALL 0x0010af40 LAB_0010cc97: LEA RDI,[0x148512] LEA RDX,[0x14856a] LEA RCX,[0x14868c] MOV ESI,0x3b8 JMP 0x0010cd40 LAB_0010ccb6: LEA RDI,[0x148512] LEA RDX,[0x14856a] LEA RCX,[0x1486ac] MOV ESI,0x3bd JMP 0x0010cd40 LAB_0010ccd2: LEA RDI,[0x148512] LEA RDX,[0x14856a] LEA RCX,[0x1486cd] MOV ESI,0x3c2 JMP 0x0010cd40 LAB_0010ccee: LEA RDI,[0x148512] LEA RDX,[0x14856a] LEA RCX,[0x148713] MOV ESI,0x3cc JMP 0x0010cd40 LAB_0010cd0a: LEA RDI,[0x148512] LEA RDX,[0x14856a] LEA RCX,[0x148738] MOV ESI,0x3d1 JMP 0x0010cd40 LAB_0010cd26: LEA RDI,[0x148512] LEA RDX,[0x14856a] LEA RCX,[0x1486ee] MOV ESI,0x3c7 LAB_0010cd40: XOR EAX,EAX CALL 0x0010af40
void ggml_set_i32_1d(int *param_1,int param_2,int param_3) { int iVar1; char cVar2; char *pcVar3; ushort uVar4; int8 uVar5; float fVar6; int8 extraout_XMM0_Qa; int1 auVar7 [16]; int1 extraout_var [56]; ulong local_48; ulong uStack_40; ulong uStack_38; ulong auStack_30 [2]; int1 auVar8 [64]; cVar2 = ggml_is_contiguous(); auVar8._8_56_ = extraout_var; auVar8._0_8_ = extraout_XMM0_Qa; if (cVar2 == '\0') { local_48 = 0; uStack_40 = 0; uStack_38 = 0; auStack_30[0] = 0; ggml_unravel_index(param_1,(long)param_2,&local_48,&uStack_40,&uStack_38,auStack_30); ggml_set_i32_nd(param_1,local_48 & 0xffffffff,uStack_40 & 0xffffffff,uStack_38 & 0xffffffff, auStack_30[0] & 0xffffffff,param_3); } else { iVar1 = *param_1; auVar7._4_12_ = auVar8._4_12_; switch(iVar1) { case 0x18: if (*(long *)(param_1 + 0xc) != 1) { pcVar3 = "tensor->nb[0] == sizeof(int8_t)"; uVar5 = 0x3b8; LAB_0010cd40: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c" ,uVar5,"GGML_ASSERT(%s) failed",pcVar3); } *(char *)(*(long *)(param_1 + 0x3e) + (long)param_2) = (char)param_3; break; case 0x19: if (*(long *)(param_1 + 0xc) != 2) { pcVar3 = "tensor->nb[0] == sizeof(int16_t)"; uVar5 = 0x3bd; goto LAB_0010cd40; } *(short *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2) = (short)param_3; break; case 0x1a: if (*(long *)(param_1 + 0xc) != 4) { pcVar3 = "tensor->nb[0] == sizeof(int32_t)"; uVar5 = 0x3c2; goto LAB_0010cd40; } *(int *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4) = param_3; break; case 0x1b: case 0x1c: case 0x1d: switchD_0010cb31_caseD_1b: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c" ,0x3d6,"fatal error"); case 0x1e: if (*(long *)(param_1 + 0xc) != 2) { pcVar3 = "tensor->nb[0] == sizeof(ggml_bf16_t)"; uVar5 = 0x3cc; goto LAB_0010cd40; } fVar6 = (float)param_3; if ((uint)ABS(fVar6) < 0x7f800001) { uVar4 = (ushort)(((uint)fVar6 >> 0x10 & 1) + (int)fVar6 + 0x7fff >> 0x10); } else { uVar4 = (ushort)((uint)fVar6 >> 0x10) | 0x40; } *(ushort *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 2) = uVar4; break; default: if (iVar1 == 0) { if (*(long *)(param_1 + 0xc) != 4) { pcVar3 = "tensor->nb[0] == sizeof(float)"; uVar5 = 0x3d1; goto LAB_0010cd40; } *(float *)(*(long *)(param_1 + 0x3e) + (long)param_2 * 4) = (float)param_3; } else { if (iVar1 != 1) goto switchD_0010cb31_caseD_1b; if (*(long *)(param_1 + 0xc) != 2) { pcVar3 = "tensor->nb[0] == sizeof(ggml_fp16_t)"; uVar5 = 0x3c7; goto LAB_0010cd40; } auVar7._0_4_ = (float)param_3; auVar7 = vcvtps2ph_f16c(auVar7,0); vpextrw_avx(auVar7,0); } } } return; }
30,949
my_dirend
eloqsql/mysys/my_lib.c
void my_dirend(MY_DIR *dir) { MY_DIR_HANDLE *dirh= (MY_DIR_HANDLE*) dir; DBUG_ENTER("my_dirend"); if (dirh) { delete_dynamic(&dirh->array); free_root(&dirh->root, MYF(0)); my_free(dirh); } DBUG_VOID_RETURN; }
O0
c
my_dirend: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x2da72 movq -0x10(%rbp), %rdi addq $0x10, %rdi callq 0x32710 movq -0x10(%rbp), %rdi addq $0x38, %rdi xorl %eax, %eax movl %eax, %esi callq 0x3b9c0 movq -0x10(%rbp), %rdi callq 0x2e3e0 jmp 0x2da74 jmp 0x2da76 addq $0x10, %rsp popq %rbp retq nopl (%rax)
my_dirend: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax cmp [rbp+var_10], 0 jz short loc_2DA72 mov rdi, [rbp+var_10] add rdi, 10h call delete_dynamic mov rdi, [rbp+var_10] add rdi, 38h ; '8' xor eax, eax mov esi, eax call free_root mov rdi, [rbp+var_10] call my_free loc_2DA72: jmp short $+2 loc_2DA74: jmp short $+2 loc_2DA76: add rsp, 10h pop rbp retn
long long my_dirend(long long a1) { long long result; // rax result = a1; if ( a1 ) { delete_dynamic(a1 + 16); free_root(a1 + 56, 0LL); return my_free(a1); } return result; }
my_dirend: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0012da72 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10 CALL 0x00132710 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x38 XOR EAX,EAX MOV ESI,EAX CALL 0x0013b9c0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0012e3e0 LAB_0012da72: JMP 0x0012da74 LAB_0012da74: JMP 0x0012da76 LAB_0012da76: ADD RSP,0x10 POP RBP RET
void my_dirend(long param_1) { if (param_1 != 0) { delete_dynamic(param_1 + 0x10); free_root(param_1 + 0x38,0); my_free(param_1); } return; }
30,950
LoadDirectoryFiles
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
FilePathList LoadDirectoryFiles(const char *dirPath) { FilePathList files = { 0 }; unsigned int fileCounter = 0; struct dirent *entity; DIR *dir = opendir(dirPath); if (dir != NULL) // It's a directory { // SCAN 1: Count files while ((entity = readdir(dir)) != NULL) { // NOTE: We skip '.' (current dir) and '..' (parent dir) filepaths if ((strcmp(entity->d_name, ".") != 0) && (strcmp(entity->d_name, "..") != 0)) fileCounter++; } // Memory allocation for dirFileCount files.capacity = fileCounter; files.paths = (char **)RL_MALLOC(files.capacity*sizeof(char *)); for (unsigned int i = 0; i < files.capacity; i++) files.paths[i] = (char *)RL_MALLOC(MAX_FILEPATH_LENGTH*sizeof(char)); closedir(dir); // SCAN 2: Read filepaths // NOTE: Directory paths are also registered ScanDirectoryFiles(dirPath, &files, NULL); // Security check: read files.count should match fileCounter if (files.count != files.capacity) TRACELOG(LOG_WARNING, "FILEIO: Read files count do not match capacity allocated"); } else TRACELOG(LOG_WARNING, "FILEIO: Failed to open requested directory"); // Maybe it's a file... return files; }
O0
c
LoadDirectoryFiles: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x18(%rbp) leaq -0x10(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0xa2d0 movl $0x0, -0x1c(%rbp) movq -0x18(%rbp), %rdi callq 0xa810 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) je 0xd180e jmp 0xd173d movq -0x30(%rbp), %rdi callq 0xa860 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0xd178d movq -0x28(%rbp), %rdi addq $0x13, %rdi leaq 0xecd97(%rip), %rsi # 0x1be4f6 callq 0xa750 cmpl $0x0, %eax je 0xd178b movq -0x28(%rbp), %rdi addq $0x13, %rdi leaq 0xecd7d(%rip), %rsi # 0x1be4f5 callq 0xa750 cmpl $0x0, %eax je 0xd178b movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0xd173d movl -0x1c(%rbp), %eax movl %eax, -0x10(%rbp) movl -0x10(%rbp), %eax movl %eax, %edi shlq $0x3, %rdi callq 0xa6e0 movq %rax, -0x8(%rbp) movl $0x0, -0x34(%rbp) movl -0x34(%rbp), %eax cmpl -0x10(%rbp), %eax jae 0xd17d7 movl $0x1000, %edi # imm = 0x1000 callq 0xa6e0 movq %rax, %rdx movq -0x8(%rbp), %rax movl -0x34(%rbp), %ecx movq %rdx, (%rax,%rcx,8) movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0xd17ac movq -0x30(%rbp), %rdi callq 0xa910 movq -0x18(%rbp), %rdi leaq -0x10(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xd1830 movl -0xc(%rbp), %eax cmpl -0x10(%rbp), %eax je 0xd180c movl $0x4, %edi leaq 0xe44c4(%rip), %rsi # 0x1b5cc9 movb $0x0, %al callq 0x182c40 jmp 0xd1821 movl $0x4, %edi leaq 0xe44e8(%rip), %rsi # 0x1b5d02 movb $0x0, %al callq 0x182c40 movq -0x10(%rbp), %rax movq -0x8(%rbp), %rdx addq $0x40, %rsp popq %rbp retq nop
LoadDirectoryFiles: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_18], rdi lea rdi, [rbp+var_10] xor esi, esi mov edx, 10h call _memset mov [rbp+var_1C], 0 mov rdi, [rbp+var_18] call _opendir mov [rbp+var_30], rax cmp [rbp+var_30], 0 jz loc_D180E jmp short $+2 loc_D173D: mov rdi, [rbp+var_30] call _readdir mov [rbp+var_28], rax cmp rax, 0 jz short loc_D178D mov rdi, [rbp+var_28] add rdi, 13h lea rsi, asc_1BE4F4+2; "." call _strcmp cmp eax, 0 jz short loc_D178B mov rdi, [rbp+var_28] add rdi, 13h lea rsi, asc_1BE4F4+1; ".." call _strcmp cmp eax, 0 jz short loc_D178B mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax loc_D178B: jmp short loc_D173D loc_D178D: mov eax, [rbp+var_1C] mov dword ptr [rbp+var_10], eax mov eax, dword ptr [rbp+var_10] mov edi, eax shl rdi, 3 call _malloc mov [rbp+var_8], rax mov [rbp+var_34], 0 loc_D17AC: mov eax, [rbp+var_34] cmp eax, dword ptr [rbp+var_10] jnb short loc_D17D7 mov edi, 1000h call _malloc mov rdx, rax mov rax, [rbp+var_8] mov ecx, [rbp+var_34] mov [rax+rcx*8], rdx mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax jmp short loc_D17AC loc_D17D7: mov rdi, [rbp+var_30] call _closedir mov rdi, [rbp+var_18] lea rsi, [rbp+var_10] xor eax, eax mov edx, eax call ScanDirectoryFiles mov eax, dword ptr [rbp+var_10+4] cmp eax, dword ptr [rbp+var_10] jz short loc_D180C mov edi, 4 lea rsi, aFileioReadFile; "FILEIO: Read files count do not match c"... mov al, 0 call TraceLog loc_D180C: jmp short loc_D1821 loc_D180E: mov edi, 4 lea rsi, aFileioFailedTo; "FILEIO: Failed to open requested direct"... mov al, 0 call TraceLog loc_D1821: mov rax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 40h pop rbp retn
long long LoadDirectoryFiles(long long a1) { int v1; // edx int v2; // ecx int v3; // r8d int v4; // r9d long long v5; // rax int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d unsigned int i; // [rsp+Ch] [rbp-34h] long long v12; // [rsp+10h] [rbp-30h] long long v13; // [rsp+18h] [rbp-28h] unsigned int v14; // [rsp+24h] [rbp-1Ch] long long v15; // [rsp+30h] [rbp-10h] BYREF long long v16; // [rsp+38h] [rbp-8h] memset(&v15, 0LL, 16LL); v14 = 0; v12 = opendir(a1); if ( v12 ) { while ( 1 ) { v13 = readdir(v12); if ( !v13 ) break; if ( (unsigned int)strcmp(v13 + 19, ".") ) { if ( (unsigned int)strcmp(v13 + 19, "..") ) ++v14; } } LODWORD(v15) = v14; v16 = malloc(8LL * v14); for ( i = 0; i < (unsigned int)v15; ++i ) { v5 = malloc(4096LL); *(_QWORD *)(v16 + 8LL * i) = v5; } closedir(v12); ScanDirectoryFiles(a1, &v15, 0LL); if ( HIDWORD(v15) != (_DWORD)v15 ) TraceLog(4, (unsigned int)"FILEIO: Read files count do not match capacity allocated", v6, v7, v8, v9); } else { TraceLog(4, (unsigned int)"FILEIO: Failed to open requested directory", v1, v2, v3, v4); } return v15; }
LoadDirectoryFiles: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x18],RDI LEA RDI,[RBP + -0x10] XOR ESI,ESI MOV EDX,0x10 CALL 0x0010a2d0 MOV dword ptr [RBP + -0x1c],0x0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0010a810 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x001d180e JMP 0x001d173d LAB_001d173d: MOV RDI,qword ptr [RBP + -0x30] CALL 0x0010a860 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x001d178d MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x13 LEA RSI,[0x2be4f6] CALL 0x0010a750 CMP EAX,0x0 JZ 0x001d178b MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x13 LEA RSI,[0x2be4f5] CALL 0x0010a750 CMP EAX,0x0 JZ 0x001d178b MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX LAB_001d178b: JMP 0x001d173d LAB_001d178d: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x10],EAX MOV EAX,dword ptr [RBP + -0x10] MOV EDI,EAX SHL RDI,0x3 CALL 0x0010a6e0 MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x34],0x0 LAB_001d17ac: MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x10] JNC 0x001d17d7 MOV EDI,0x1000 CALL 0x0010a6e0 MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x34] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x001d17ac LAB_001d17d7: MOV RDI,qword ptr [RBP + -0x30] CALL 0x0010a910 MOV RDI,qword ptr [RBP + -0x18] LEA RSI,[RBP + -0x10] XOR EAX,EAX MOV EDX,EAX CALL 0x001d1830 MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x10] JZ 0x001d180c MOV EDI,0x4 LEA RSI,[0x2b5cc9] MOV AL,0x0 CALL 0x00282c40 LAB_001d180c: JMP 0x001d1821 LAB_001d180e: MOV EDI,0x4 LEA RSI,[0x2b5d02] MOV AL,0x0 CALL 0x00282c40 LAB_001d1821: MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int1 [16] LoadDirectoryFiles(char *param_1) { int1 auVar1 [16]; int iVar2; DIR *__dirp; dirent *pdVar3; void *pvVar4; uint local_3c; uint local_24; uint local_18; uint uStack_14; void *local_10; memset(&local_18,0,0x10); local_24 = 0; __dirp = opendir(param_1); if (__dirp == (DIR *)0x0) { TraceLog(4,"FILEIO: Failed to open requested directory"); } else { while (pdVar3 = readdir(__dirp), pdVar3 != (dirent *)0x0) { iVar2 = strcmp(pdVar3->d_name,"."); if ((iVar2 != 0) && (iVar2 = strcmp(pdVar3->d_name,".."), iVar2 != 0)) { local_24 = local_24 + 1; } } local_18 = local_24; local_10 = malloc((ulong)local_24 << 3); for (local_3c = 0; local_3c < local_18; local_3c = local_3c + 1) { pvVar4 = malloc(0x1000); *(void **)((long)local_10 + (ulong)local_3c * 8) = pvVar4; } closedir(__dirp); ScanDirectoryFiles(param_1,&local_18,0); if (uStack_14 != local_18) { TraceLog(4,"FILEIO: Read files count do not match capacity allocated"); } } auVar1._4_4_ = uStack_14; auVar1._0_4_ = local_18; auVar1._8_8_ = local_10; return auVar1; }
30,951
LoadDirectoryFiles
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
FilePathList LoadDirectoryFiles(const char *dirPath) { FilePathList files = { 0 }; unsigned int fileCounter = 0; struct dirent *entity; DIR *dir = opendir(dirPath); if (dir != NULL) // It's a directory { // SCAN 1: Count files while ((entity = readdir(dir)) != NULL) { // NOTE: We skip '.' (current dir) and '..' (parent dir) filepaths if ((strcmp(entity->d_name, ".") != 0) && (strcmp(entity->d_name, "..") != 0)) fileCounter++; } // Memory allocation for dirFileCount files.capacity = fileCounter; files.paths = (char **)RL_MALLOC(files.capacity*sizeof(char *)); for (unsigned int i = 0; i < files.capacity; i++) files.paths[i] = (char *)RL_MALLOC(MAX_FILEPATH_LENGTH*sizeof(char)); closedir(dir); // SCAN 2: Read filepaths // NOTE: Directory paths are also registered ScanDirectoryFiles(dirPath, &files, NULL); // Security check: read files.count should match fileCounter if (files.count != files.capacity) TRACELOG(LOG_WARNING, "FILEIO: Read files count do not match capacity allocated"); } else TRACELOG(LOG_WARNING, "FILEIO: Failed to open requested directory"); // Maybe it's a file... return files; }
O1
c
LoadDirectoryFiles: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) callq 0x9810 testq %rax, %rax je 0x7a3a1 movq %rax, %r14 movq %rax, %rdi callq 0x9860 testq %rax, %rax je 0x7a3aa movq %rax, %r13 xorl %ebp, %ebp leaq 0x6be5a(%rip), %r15 # 0xe61be leaq 0x6be52(%rip), %r12 # 0xe61bd addq $0x13, %r13 movq %r13, %rdi movq %r15, %rsi callq 0x9760 testl %eax, %eax je 0x7a38f movq %r13, %rdi movq %r12, %rsi callq 0x9760 cmpl $0x1, %eax sbbl $-0x1, %ebp movq %r14, %rdi callq 0x9860 movq %rax, %r13 testq %rax, %rax jne 0x7a36b jmp 0x7a3ac leaq 0x6be51(%rip), %rsi # 0xe61f9 jmp 0x7a40c xorl %ebp, %ebp movl %ebp, (%rsp) movl %ebp, %r12d leaq (,%r12,8), %rdi callq 0x96f0 movq %rax, 0x8(%rsp) testl %ebp, %ebp je 0x7a3e4 movq %rax, %r15 xorl %r13d, %r13d movl $0x1000, %edi # imm = 0x1000 callq 0x96f0 movq %rax, (%r15,%r13,8) incq %r13 cmpq %r13, %r12 jne 0x7a3ce movq %r14, %rdi callq 0x9900 movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x7a430 movl 0x4(%r14), %eax cmpl (%r14), %eax je 0x7a418 leaq 0x6bdb4(%rip), %rsi # 0xe61c0 movl $0x4, %edi xorl %eax, %eax callq 0xbfa73 movq (%rsp), %rax movq 0x8(%rsp), %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
LoadDirectoryFiles: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+48h+var_48], xmm0 call _opendir test rax, rax jz short loc_7A3A1 mov r14, rax mov rdi, rax call _readdir test rax, rax jz short loc_7A3AA mov r13, rax xor ebp, ebp lea r15, asc_E61BD+1; "." lea r12, asc_E61BD; ".." loc_7A36B: add r13, 13h mov rdi, r13 mov rsi, r15 call _strcmp test eax, eax jz short loc_7A38F mov rdi, r13 mov rsi, r12 call _strcmp cmp eax, 1 sbb ebp, 0FFFFFFFFh loc_7A38F: mov rdi, r14 call _readdir mov r13, rax test rax, rax jnz short loc_7A36B jmp short loc_7A3AC loc_7A3A1: lea rsi, aFileioFailedTo; "FILEIO: Failed to open requested direct"... jmp short loc_7A40C loc_7A3AA: xor ebp, ebp loc_7A3AC: mov dword ptr [rsp+48h+var_48], ebp mov r12d, ebp lea rdi, ds:0[r12*8] call _malloc mov qword ptr [rsp+48h+var_48+8], rax test ebp, ebp jz short loc_7A3E4 mov r15, rax xor r13d, r13d loc_7A3CE: mov edi, 1000h call _malloc mov [r15+r13*8], rax inc r13 cmp r12, r13 jnz short loc_7A3CE loc_7A3E4: mov rdi, r14 call _closedir mov r14, rsp mov rdi, rbx mov rsi, r14 xor edx, edx call ScanDirectoryFiles mov eax, [r14+4] cmp eax, [r14] jz short loc_7A418 lea rsi, aFileioReadFile; "FILEIO: Read files count do not match c"... loc_7A40C: mov edi, 4 xor eax, eax call TraceLog loc_7A418: mov rax, qword ptr [rsp+48h+var_48] mov rdx, qword ptr [rsp+48h+var_48+8] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LoadDirectoryFiles(long long a1) { long long v1; // rax int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d long long v6; // r14 long long v7; // rax long long v8; // r13 unsigned int v9; // ebp long long v10; // r13 const char *v11; // rsi long long v12; // rax long long v13; // r15 long long i; // r13 __int128 v16; // [rsp+0h] [rbp-48h] BYREF v16 = 0LL; v1 = opendir(); if ( !v1 ) { v11 = "FILEIO: Failed to open requested directory"; LABEL_15: TraceLog(4, (_DWORD)v11, v2, v3, v4, v5); return v16; } v6 = v1; v7 = readdir(v1); if ( v7 ) { v8 = v7; v9 = 0; do { v10 = v8 + 19; if ( (unsigned int)strcmp(v10, ".") ) v9 -= ((unsigned int)strcmp(v10, "..") == 0) - 1; v8 = readdir(v6); } while ( v8 ); } else { v9 = 0; } LODWORD(v16) = v9; v12 = malloc(8LL * v9); *((_QWORD *)&v16 + 1) = v12; if ( v9 ) { v13 = v12; for ( i = 0LL; i != v9; *(_QWORD *)(v13 + 8 * i++) = malloc(4096LL) ) ; } closedir(v6); ScanDirectoryFiles(a1, &v16, 0LL); if ( DWORD1(v16) != (_DWORD)v16 ) { v11 = "FILEIO: Read files count do not match capacity allocated"; goto LABEL_15; } return v16; }
LoadDirectoryFiles: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 CALL 0x00109810 TEST RAX,RAX JZ 0x0017a3a1 MOV R14,RAX MOV RDI,RAX CALL 0x00109860 TEST RAX,RAX JZ 0x0017a3aa MOV R13,RAX XOR EBP,EBP LEA R15,[0x1e61be] LEA R12,[0x1e61bd] LAB_0017a36b: ADD R13,0x13 MOV RDI,R13 MOV RSI,R15 CALL 0x00109760 TEST EAX,EAX JZ 0x0017a38f MOV RDI,R13 MOV RSI,R12 CALL 0x00109760 CMP EAX,0x1 SBB EBP,-0x1 LAB_0017a38f: MOV RDI,R14 CALL 0x00109860 MOV R13,RAX TEST RAX,RAX JNZ 0x0017a36b JMP 0x0017a3ac LAB_0017a3a1: LEA RSI,[0x1e61f9] JMP 0x0017a40c LAB_0017a3aa: XOR EBP,EBP LAB_0017a3ac: MOV dword ptr [RSP],EBP MOV R12D,EBP LEA RDI,[R12*0x8] CALL 0x001096f0 MOV qword ptr [RSP + 0x8],RAX TEST EBP,EBP JZ 0x0017a3e4 MOV R15,RAX XOR R13D,R13D LAB_0017a3ce: MOV EDI,0x1000 CALL 0x001096f0 MOV qword ptr [R15 + R13*0x8],RAX INC R13 CMP R12,R13 JNZ 0x0017a3ce LAB_0017a3e4: MOV RDI,R14 CALL 0x00109900 MOV R14,RSP MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x0017a430 MOV EAX,dword ptr [R14 + 0x4] CMP EAX,dword ptr [R14] JZ 0x0017a418 LEA RSI,[0x1e61c0] LAB_0017a40c: MOV EDI,0x4 XOR EAX,EAX CALL 0x001bfa73 LAB_0017a418: MOV RAX,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] LoadDirectoryFiles(char *param_1) { int1 auVar1 [16]; int iVar2; DIR *__dirp; dirent *pdVar3; void *pvVar4; void *pvVar5; uint uVar6; char *pcVar7; ulong uVar8; uint local_48; uint uStack_44; void *pvStack_40; local_48 = 0; uStack_44 = 0; pvStack_40 = (void *)0x0; __dirp = opendir(param_1); if (__dirp == (DIR *)0x0) { pcVar7 = "FILEIO: Failed to open requested directory"; } else { pdVar3 = readdir(__dirp); if (pdVar3 == (dirent *)0x0) { uVar6 = 0; } else { uVar6 = 0; do { iVar2 = strcmp(pdVar3->d_name,"."); if (iVar2 != 0) { iVar2 = strcmp(pdVar3->d_name,".."); uVar6 = (uVar6 + 1) - (uint)(iVar2 == 0); } pdVar3 = readdir(__dirp); } while (pdVar3 != (dirent *)0x0); } local_48 = uVar6; pvVar4 = malloc((ulong)uVar6 * 8); pvStack_40 = pvVar4; if (uVar6 != 0) { uVar8 = 0; do { pvVar5 = malloc(0x1000); *(void **)((long)pvVar4 + uVar8 * 8) = pvVar5; uVar8 = uVar8 + 1; } while (uVar6 != uVar8); } closedir(__dirp); ScanDirectoryFiles(param_1,&local_48,0); if (uStack_44 == local_48) goto LAB_0017a418; pcVar7 = "FILEIO: Read files count do not match capacity allocated"; } TraceLog(4,pcVar7); LAB_0017a418: auVar1._4_4_ = uStack_44; auVar1._0_4_ = local_48; auVar1._8_8_ = pvStack_40; return auVar1; }
30,952
LoadDirectoryFiles
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
FilePathList LoadDirectoryFiles(const char *dirPath) { FilePathList files = { 0 }; unsigned int fileCounter = 0; struct dirent *entity; DIR *dir = opendir(dirPath); if (dir != NULL) // It's a directory { // SCAN 1: Count files while ((entity = readdir(dir)) != NULL) { // NOTE: We skip '.' (current dir) and '..' (parent dir) filepaths if ((strcmp(entity->d_name, ".") != 0) && (strcmp(entity->d_name, "..") != 0)) fileCounter++; } // Memory allocation for dirFileCount files.capacity = fileCounter; files.paths = (char **)RL_MALLOC(files.capacity*sizeof(char *)); for (unsigned int i = 0; i < files.capacity; i++) files.paths[i] = (char *)RL_MALLOC(MAX_FILEPATH_LENGTH*sizeof(char)); closedir(dir); // SCAN 2: Read filepaths // NOTE: Directory paths are also registered ScanDirectoryFiles(dirPath, &files, NULL); // Security check: read files.count should match fileCounter if (files.count != files.capacity) TRACELOG(LOG_WARNING, "FILEIO: Read files count do not match capacity allocated"); } else TRACELOG(LOG_WARNING, "FILEIO: Failed to open requested directory"); // Maybe it's a file... return files; }
O2
c
LoadDirectoryFiles: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) callq 0x9800 testq %rax, %rax je 0x63a91 movq %rax, %r14 xorl %ebp, %ebp pushq $0x1 popq %r15 movq %r14, %rdi callq 0x9850 testq %rax, %rax je 0x63a31 cmpb $0x2e, 0x13(%rax) jne 0x63a2a cmpb $0x0, 0x14(%rax) je 0x639fd cmpb $0x2e, 0x14(%rax) movl %r15d, %ecx jne 0x63a2d xorl %ecx, %ecx cmpb $0x0, 0x15(%rax) setne %cl jmp 0x63a2d movl %r15d, %ecx addl %ecx, %ebp jmp 0x639fd movl %ebp, (%rsp) movl %ebp, %r12d leaq (,%r12,8), %rdi callq 0x96e0 movq %rax, %r15 movq %rax, 0x8(%rsp) xorl %r13d, %r13d cmpq %r13, %r12 je 0x63a67 movl $0x1000, %edi # imm = 0x1000 callq 0x96e0 movq %rax, (%r15,%r13,8) incq %r13 jmp 0x63a4f movq %r14, %rdi callq 0x98f0 movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x63aba movl 0x4(%r14), %eax cmpl (%r14), %eax je 0x63aa2 leaq 0x6292e(%rip), %rsi # 0xc63bd jmp 0x63a98 leaq 0x6295e(%rip), %rsi # 0xc63f6 pushq $0x4 popq %rdi xorl %eax, %eax callq 0xa128b movq (%rsp), %rax movq 0x8(%rsp), %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
LoadDirectoryFiles: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+48h+var_48], xmm0 call _opendir test rax, rax jz loc_63A91 mov r14, rax xor ebp, ebp push 1 pop r15 loc_639FD: mov rdi, r14 call _readdir test rax, rax jz short loc_63A31 cmp byte ptr [rax+13h], 2Eh ; '.' jnz short loc_63A2A cmp byte ptr [rax+14h], 0 jz short loc_639FD cmp byte ptr [rax+14h], 2Eh ; '.' mov ecx, r15d jnz short loc_63A2D xor ecx, ecx cmp byte ptr [rax+15h], 0 setnz cl jmp short loc_63A2D loc_63A2A: mov ecx, r15d loc_63A2D: add ebp, ecx jmp short loc_639FD loc_63A31: mov dword ptr [rsp+48h+var_48], ebp mov r12d, ebp lea rdi, ds:0[r12*8] call _malloc mov r15, rax mov qword ptr [rsp+48h+var_48+8], rax xor r13d, r13d loc_63A4F: cmp r12, r13 jz short loc_63A67 mov edi, 1000h call _malloc mov [r15+r13*8], rax inc r13 jmp short loc_63A4F loc_63A67: mov rdi, r14 call _closedir mov r14, rsp mov rdi, rbx mov rsi, r14 xor edx, edx call ScanDirectoryFiles mov eax, [r14+4] cmp eax, [r14] jz short loc_63AA2 lea rsi, aFileioReadFile; "FILEIO: Read files count do not match c"... jmp short loc_63A98 loc_63A91: lea rsi, aFileioFailedTo; "FILEIO: Failed to open requested direct"... loc_63A98: push 4 pop rdi xor eax, eax call TraceLog loc_63AA2: mov rax, qword ptr [rsp+48h+var_48] mov rdx, qword ptr [rsp+48h+var_48+8] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LoadDirectoryFiles(long long a1) { long long v1; // rax int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d long long v6; // r14 unsigned int v7; // ebp _BYTE *v8; // rax int v9; // ecx long long v10; // r15 long long i; // r13 const char *v12; // rsi __int128 v14; // [rsp+0h] [rbp-48h] BYREF v14 = 0LL; v1 = opendir(); if ( v1 ) { v6 = v1; v7 = 0; while ( 1 ) { v8 = (_BYTE *)readdir(v6); if ( !v8 ) { LODWORD(v14) = v7; v10 = malloc(8LL * v7); *((_QWORD *)&v14 + 1) = v10; for ( i = 0LL; v7 != i; ++i ) *(_QWORD *)(v10 + 8 * i) = malloc(4096LL); closedir(v6); ScanDirectoryFiles(a1, &v14, 0LL); if ( DWORD1(v14) != (_DWORD)v14 ) { v12 = "FILEIO: Read files count do not match capacity allocated"; goto LABEL_16; } return v14; } if ( v8[19] != 46 ) break; if ( v8[20] ) { v9 = 1; if ( v8[20] == 46 ) v9 = v8[21] != 0; LABEL_9: v7 += v9; } } v9 = 1; goto LABEL_9; } v12 = "FILEIO: Failed to open requested directory"; LABEL_16: TraceLog(4, (_DWORD)v12, v2, v3, v4, v5); return v14; }
LoadDirectoryFiles: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 CALL 0x00109800 TEST RAX,RAX JZ 0x00163a91 MOV R14,RAX XOR EBP,EBP PUSH 0x1 POP R15 LAB_001639fd: MOV RDI,R14 CALL 0x00109850 TEST RAX,RAX JZ 0x00163a31 CMP byte ptr [RAX + 0x13],0x2e JNZ 0x00163a2a CMP byte ptr [RAX + 0x14],0x0 JZ 0x001639fd CMP byte ptr [RAX + 0x14],0x2e MOV ECX,R15D JNZ 0x00163a2d XOR ECX,ECX CMP byte ptr [RAX + 0x15],0x0 SETNZ CL JMP 0x00163a2d LAB_00163a2a: MOV ECX,R15D LAB_00163a2d: ADD EBP,ECX JMP 0x001639fd LAB_00163a31: MOV dword ptr [RSP],EBP MOV R12D,EBP LEA RDI,[R12*0x8] CALL 0x001096e0 MOV R15,RAX MOV qword ptr [RSP + 0x8],RAX XOR R13D,R13D LAB_00163a4f: CMP R12,R13 JZ 0x00163a67 MOV EDI,0x1000 CALL 0x001096e0 MOV qword ptr [R15 + R13*0x8],RAX INC R13 JMP 0x00163a4f LAB_00163a67: MOV RDI,R14 CALL 0x001098f0 MOV R14,RSP MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00163aba MOV EAX,dword ptr [R14 + 0x4] CMP EAX,dword ptr [R14] JZ 0x00163aa2 LEA RSI,[0x1c63bd] JMP 0x00163a98 LAB_00163a91: LEA RSI,[0x1c63f6] LAB_00163a98: PUSH 0x4 POP RDI XOR EAX,EAX CALL 0x001a128b LAB_00163aa2: MOV RAX,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] LoadDirectoryFiles(char *param_1) { int1 auVar1 [16]; DIR *__dirp; dirent *pdVar2; void *pvVar3; void *pvVar4; uint uVar5; uint uVar6; char *pcVar7; ulong uVar8; uint local_48; uint uStack_44; void *pvStack_40; local_48 = 0; uStack_44 = 0; pvStack_40 = (void *)0x0; __dirp = opendir(param_1); if (__dirp == (DIR *)0x0) { pcVar7 = "FILEIO: Failed to open requested directory"; } else { uVar6 = 0; LAB_001639fd: pdVar2 = readdir(__dirp); if (pdVar2 != (dirent *)0x0) { uVar5 = 1; if (pdVar2->d_name[0] == '.') goto code_r0x00163a10; goto LAB_00163a2d; } local_48 = uVar6; pvVar3 = malloc((ulong)uVar6 * 8); pvStack_40 = pvVar3; for (uVar8 = 0; uVar6 != uVar8; uVar8 = uVar8 + 1) { pvVar4 = malloc(0x1000); *(void **)((long)pvVar3 + uVar8 * 8) = pvVar4; } closedir(__dirp); ScanDirectoryFiles(param_1,&local_48,0); if (uStack_44 == local_48) goto LAB_00163aa2; pcVar7 = "FILEIO: Read files count do not match capacity allocated"; } TraceLog(4,pcVar7); LAB_00163aa2: auVar1._4_4_ = uStack_44; auVar1._0_4_ = local_48; auVar1._8_8_ = pvStack_40; return auVar1; code_r0x00163a10: if (pdVar2->d_name[1] != '\0') { if (pdVar2->d_name[1] == '.') { uVar5 = (uint)(pdVar2->d_name[2] != '\0'); } LAB_00163a2d: uVar6 = uVar6 + uVar5; } goto LAB_001639fd; }
30,953
LoadDirectoryFiles
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
FilePathList LoadDirectoryFiles(const char *dirPath) { FilePathList files = { 0 }; unsigned int fileCounter = 0; struct dirent *entity; DIR *dir = opendir(dirPath); if (dir != NULL) // It's a directory { // SCAN 1: Count files while ((entity = readdir(dir)) != NULL) { // NOTE: We skip '.' (current dir) and '..' (parent dir) filepaths if ((strcmp(entity->d_name, ".") != 0) && (strcmp(entity->d_name, "..") != 0)) fileCounter++; } // Memory allocation for dirFileCount files.capacity = fileCounter; files.paths = (char **)RL_MALLOC(files.capacity*sizeof(char *)); for (unsigned int i = 0; i < files.capacity; i++) files.paths[i] = (char *)RL_MALLOC(MAX_FILEPATH_LENGTH*sizeof(char)); closedir(dir); // SCAN 2: Read filepaths // NOTE: Directory paths are also registered ScanDirectoryFiles(dirPath, &files, NULL); // Security check: read files.count should match fileCounter if (files.count != files.capacity) TRACELOG(LOG_WARNING, "FILEIO: Read files count do not match capacity allocated"); } else TRACELOG(LOG_WARNING, "FILEIO: Failed to open requested directory"); // Maybe it's a file... return files; }
O3
c
LoadDirectoryFiles: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) callq 0xa810 testq %rax, %rax je 0x7600e movq %rax, %r14 movq %rax, %rdi callq 0xa860 xorl %ebp, %ebp testq %rax, %rax je 0x75fac movl $0x1, %ecx cmpb $0x2e, 0x13(%rax) jne 0x75fa0 cmpb $0x0, 0x14(%rax) je 0x75fa2 cmpb $0x2e, 0x14(%rax) jne 0x75fa0 xorl %ecx, %ecx cmpb $0x0, 0x15(%rax) setne %cl addl %ecx, %ebp movq %r14, %rdi callq 0xa860 jmp 0x75f7b movl %ebp, (%rsp) movl %ebp, %r12d leaq (,%r12,8), %rdi callq 0xa6f0 movq %rax, 0x8(%rsp) testl %ebp, %ebp je 0x75fe4 movq %rax, %r15 xorl %r13d, %r13d movl $0x1000, %edi # imm = 0x1000 callq 0xa6f0 movq %rax, (%r15,%r13,8) incq %r13 cmpq %r13, %r12 jne 0x75fce movq %r14, %rdi callq 0xa900 movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x76039 movl 0x4(%r14), %eax cmpl (%r14), %eax je 0x76021 leaq 0x6a229(%rip), %rsi # 0xe0235 jmp 0x76015 leaq 0x6a259(%rip), %rsi # 0xe026e movl $0x4, %edi xorl %eax, %eax callq 0xb9db7 movq (%rsp), %rax movq 0x8(%rsp), %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
LoadDirectoryFiles: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+48h+var_48], xmm0 call _opendir test rax, rax jz loc_7600E mov r14, rax mov rdi, rax call _readdir xor ebp, ebp loc_75F7B: test rax, rax jz short loc_75FAC mov ecx, 1 cmp byte ptr [rax+13h], 2Eh ; '.' jnz short loc_75FA0 cmp byte ptr [rax+14h], 0 jz short loc_75FA2 cmp byte ptr [rax+14h], 2Eh ; '.' jnz short loc_75FA0 xor ecx, ecx cmp byte ptr [rax+15h], 0 setnz cl loc_75FA0: add ebp, ecx loc_75FA2: mov rdi, r14 call _readdir jmp short loc_75F7B loc_75FAC: mov dword ptr [rsp+48h+var_48], ebp mov r12d, ebp lea rdi, ds:0[r12*8] call _malloc mov qword ptr [rsp+48h+var_48+8], rax test ebp, ebp jz short loc_75FE4 mov r15, rax xor r13d, r13d loc_75FCE: mov edi, 1000h call _malloc mov [r15+r13*8], rax inc r13 cmp r12, r13 jnz short loc_75FCE loc_75FE4: mov rdi, r14 call _closedir mov r14, rsp mov rdi, rbx mov rsi, r14 xor edx, edx call ScanDirectoryFiles mov eax, [r14+4] cmp eax, [r14] jz short loc_76021 lea rsi, aFileioReadFile; "FILEIO: Read files count do not match c"... jmp short loc_76015 loc_7600E: lea rsi, aFileioFailedTo; "FILEIO: Failed to open requested direct"... loc_76015: mov edi, 4 xor eax, eax call TraceLog loc_76021: mov rax, qword ptr [rsp+48h+var_48] mov rdx, qword ptr [rsp+48h+var_48+8] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LoadDirectoryFiles(long long a1) { long long v1; // rax int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d long long v6; // r14 _BYTE *v7; // rax unsigned int v8; // ebp int v9; // ecx long long v10; // rax long long v11; // r15 long long i; // r13 const char *v13; // rsi __int128 v15; // [rsp+0h] [rbp-48h] BYREF v15 = 0LL; v1 = opendir(); if ( v1 ) { v6 = v1; v7 = (_BYTE *)readdir(v1); v8 = 0; while ( 1 ) { if ( !v7 ) { LODWORD(v15) = v8; v10 = malloc(8LL * v8); *((_QWORD *)&v15 + 1) = v10; if ( v8 ) { v11 = v10; for ( i = 0LL; i != v8; *(_QWORD *)(v11 + 8 * i++) = malloc(4096LL) ) ; } closedir(v6); ScanDirectoryFiles(a1, &v15, 0LL); if ( DWORD1(v15) != (_DWORD)v15 ) { v13 = "FILEIO: Read files count do not match capacity allocated"; goto LABEL_16; } return v15; } v9 = 1; if ( v7[19] == 46 ) { if ( !v7[20] ) goto LABEL_9; if ( v7[20] == 46 ) v9 = v7[21] != 0; } v8 += v9; LABEL_9: v7 = (_BYTE *)readdir(v6); } } v13 = "FILEIO: Failed to open requested directory"; LABEL_16: TraceLog(4, (_DWORD)v13, v2, v3, v4, v5); return v15; }
LoadDirectoryFiles: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 CALL 0x0010a810 TEST RAX,RAX JZ 0x0017600e MOV R14,RAX MOV RDI,RAX CALL 0x0010a860 XOR EBP,EBP LAB_00175f7b: TEST RAX,RAX JZ 0x00175fac MOV ECX,0x1 CMP byte ptr [RAX + 0x13],0x2e JNZ 0x00175fa0 CMP byte ptr [RAX + 0x14],0x0 JZ 0x00175fa2 CMP byte ptr [RAX + 0x14],0x2e JNZ 0x00175fa0 XOR ECX,ECX CMP byte ptr [RAX + 0x15],0x0 SETNZ CL LAB_00175fa0: ADD EBP,ECX LAB_00175fa2: MOV RDI,R14 CALL 0x0010a860 JMP 0x00175f7b LAB_00175fac: MOV dword ptr [RSP],EBP MOV R12D,EBP LEA RDI,[R12*0x8] CALL 0x0010a6f0 MOV qword ptr [RSP + 0x8],RAX TEST EBP,EBP JZ 0x00175fe4 MOV R15,RAX XOR R13D,R13D LAB_00175fce: MOV EDI,0x1000 CALL 0x0010a6f0 MOV qword ptr [R15 + R13*0x8],RAX INC R13 CMP R12,R13 JNZ 0x00175fce LAB_00175fe4: MOV RDI,R14 CALL 0x0010a900 MOV R14,RSP MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00176039 MOV EAX,dword ptr [R14 + 0x4] CMP EAX,dword ptr [R14] JZ 0x00176021 LEA RSI,[0x1e0235] JMP 0x00176015 LAB_0017600e: LEA RSI,[0x1e026e] LAB_00176015: MOV EDI,0x4 XOR EAX,EAX CALL 0x001b9db7 LAB_00176021: MOV RAX,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] LoadDirectoryFiles(char *param_1) { int1 auVar1 [16]; DIR *__dirp; dirent *pdVar2; void *pvVar3; void *pvVar4; uint uVar5; uint uVar6; char *pcVar7; ulong uVar8; uint local_48; uint uStack_44; void *pvStack_40; local_48 = 0; uStack_44 = 0; pvStack_40 = (void *)0x0; __dirp = opendir(param_1); if (__dirp == (DIR *)0x0) { pcVar7 = "FILEIO: Failed to open requested directory"; } else { pdVar2 = readdir(__dirp); uVar6 = 0; while (pdVar2 != (dirent *)0x0) { uVar5 = 1; if (pdVar2->d_name[0] == '.') { if (pdVar2->d_name[1] != '\0') { if (pdVar2->d_name[1] == '.') { uVar5 = (uint)(pdVar2->d_name[2] != '\0'); } goto LAB_00175fa0; } } else { LAB_00175fa0: uVar6 = uVar6 + uVar5; } pdVar2 = readdir(__dirp); } local_48 = uVar6; pvVar3 = malloc((ulong)uVar6 * 8); pvStack_40 = pvVar3; if (uVar6 != 0) { uVar8 = 0; do { pvVar4 = malloc(0x1000); *(void **)((long)pvVar3 + uVar8 * 8) = pvVar4; uVar8 = uVar8 + 1; } while (uVar6 != uVar8); } closedir(__dirp); ScanDirectoryFiles(param_1,&local_48,0); if (uStack_44 == local_48) goto LAB_00176021; pcVar7 = "FILEIO: Read files count do not match capacity allocated"; } TraceLog(4,pcVar7); LAB_00176021: auVar1._4_4_ = uStack_44; auVar1._0_4_ = local_48; auVar1._8_8_ = pvStack_40; return auVar1; }
30,954
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes(unsigned char)
monkey531[P]llama/common/./json.hpp
static std::string hex_bytes(std::uint8_t byte) { std::string result = "FF"; constexpr const char* nibble_to_hex = "0123456789ABCDEF"; result[0] = nibble_to_hex[byte / 16]; result[1] = nibble_to_hex[byte % 16]; return result; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes(unsigned char): pushq %r14 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 leaq 0x8cc95(%rip), %rsi # 0xf4767 leaq 0x7(%rsp), %rdx callq 0x3bddc movl %ebx, %eax shrl $0x4, %eax leaq 0x8beab(%rip), %rcx # 0xf3993 movb (%rax,%rcx), %al movq (%r14), %rdx movb %al, (%rdx) andl $0xf, %ebx movb (%rbx,%rcx), %al movq (%r14), %rcx movb %al, 0x1(%rcx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN8nlohmann16json_abi_v3_11_36detail10serializerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9hex_bytesEh: push r14 push rbx push rax mov ebx, esi mov r14, rdi lea rsi, aInvalidStringS_0+41h; "FF" lea rdx, [rsp+18h+var_11] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov eax, ebx shr eax, 4 lea rcx, a0123456789abcd_1; "0123456789ABCDEF" mov al, [rax+rcx] mov rdx, [r14] mov [rdx], al and ebx, 0Fh mov al, [rbx+rcx] mov rcx, [r14] mov [rcx+1], al mov rax, r14 add rsp, 8 pop rbx pop r14 retn
_QWORD * nlohmann::json_abi_v3_11_3::detail::serializer<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>>::hex_bytes( _QWORD *a1, unsigned int a2) { std::string::basic_string<std::allocator<char>>(a1, (long long)"FF"); *(_BYTE *)*a1 = a0123456789abcd_1[a2 >> 4]; *(_BYTE *)(*a1 + 1LL) = a0123456789abcd_1[a2 & 0xF]; return a1; }
hex_bytes: PUSH R14 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI LEA RSI,[0x1f4767] LEA RDX,[RSP + 0x7] CALL 0x0013bddc MOV EAX,EBX SHR EAX,0x4 LEA RCX,[0x1f3993] MOV AL,byte ptr [RAX + RCX*0x1] MOV RDX,qword ptr [R14] MOV byte ptr [RDX],AL AND EBX,0xf MOV AL,byte ptr [RBX + RCX*0x1] MOV RCX,qword ptr [R14] MOV byte ptr [RCX + 0x1],AL MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::serializer<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> >::hex_bytes(unsigned char) */ serializer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: serializer<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>> ::hex_bytes(serializer<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,uchar param_1) { int7 in_register_00000031; allocator local_11; std::__cxx11::string::string<std::allocator<char>>((string *)this,"FF",&local_11); **(char **)this = "0123456789ABCDEF"[(CONCAT71(in_register_00000031,param_1) & 0xffffffff) >> 4]; *(char *)(*(long *)this + 1) = "0123456789ABCDEF"[(uint)CONCAT71(in_register_00000031,param_1) & 0xf]; return this; }
30,955
translog_set_lsn_for_files
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_set_lsn_for_files(uint32 from_file, uint32 to_file, LSN lsn, my_bool is_locked) { uint32 file; DBUG_ENTER("translog_set_lsn_for_files"); DBUG_PRINT("enter", ("From: %lu to: %lu lsn: " LSN_FMT " locked: %d", (ulong) from_file, (ulong) to_file, LSN_IN_PARTS(lsn), is_locked)); DBUG_ASSERT(from_file <= to_file); DBUG_ASSERT(from_file > 0); /* we have not file 0 */ /* Checks the current file (not finished yet file) */ if (!is_locked) translog_lock(); if (to_file == (uint32) LSN_FILE_NO(log_descriptor.horizon)) { if (likely(cmp_translog_addr(lsn, log_descriptor.max_lsn) > 0)) log_descriptor.max_lsn= lsn; to_file--; } if (!is_locked) translog_unlock(); /* Checks finished files if they are */ mysql_mutex_lock(&log_descriptor.file_header_lock); for (file= from_file; file <= to_file; file++) { LOGHANDLER_FILE_INFO info; File fd; fd= open_logfile_by_number_no_cache(file); if ((fd < 0) || ((translog_read_file_header(&info, fd) || (cmp_translog_addr(lsn, info.max_lsn) > 0 && translog_max_lsn_to_header(fd, lsn))) | mysql_file_close(fd, MYF(MY_WME)))) { translog_stop_writing(); mysql_mutex_unlock(&log_descriptor.file_header_lock); DBUG_RETURN(1); } } mysql_mutex_unlock(&log_descriptor.file_header_lock); DBUG_RETURN(0); }
O3
c
translog_set_lsn_for_files: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movl %ecx, %r12d movq %rdx, %rbx movl %esi, %r14d movl %edi, %r15d testb %r12b, %r12b jne 0x6f83a callq 0x68f5f cmpl %r14d, 0xb99e4b(%rip) # 0xc0968c jne 0x6f856 cmpq %rbx, 0xb99e86(%rip) # 0xc096d0 jge 0x6f853 movq %rbx, 0xb99e7d(%rip) # 0xc096d0 decl %r14d testb %r12b, %r12b jne 0x6f882 movq 0xb99e56(%rip), %r12 # 0xc096b8 movq 0x1000d0(%r12), %rdi testq %rdi, %rdi jne 0x6f9cb addq $0x100090, %r12 # imm = 0x100090 movq %r12, %rdi callq 0x291a0 cmpq $0x0, 0xb99fb6(%rip) # 0xc09840 jne 0x6f9ac leaq 0xb99f69(%rip), %rdi # 0xc09800 callq 0x291d0 cmpl %r15d, %r14d jae 0x6f8c4 movq 0xb99f98(%rip), %rdi # 0xc09840 testq %rdi, %rdi jne 0x6f9b6 leaq 0xb99f48(%rip), %rdi # 0xc09800 callq 0x291a0 xorl %eax, %eax jmp 0x6f99a movl %r15d, %edi callq 0x68d42 testl %eax, %eax js 0x6f95b movl %eax, %r12d leaq -0x68(%rbp), %rdi movl %eax, %esi callq 0x68afc movl $0x1, %r13d testb %al, %al jne 0x6f904 xorl %r13d, %r13d cmpq %rbx, -0x68(%rbp) jge 0x6f904 movl %r12d, %edi movq %rbx, %rsi callq 0x6f362 movzbl %al, %r13d leaq 0x31d765(%rip), %rax # 0x38d070 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r12d, %esi movl $0x4, %edx callq *0x158(%rax) testq %rax, %rax jne 0x6f947 movl $0x10, %esi movl %r12d, %edi callq 0xa6549 orl %r13d, %eax jne 0x6f95b incl %r15d cmpl %r14d, %r15d jbe 0x6f8c4 jmp 0x6f8a1 movq %rax, %rdi movl %r12d, %esi leaq -0x2c(%rbp), %rdx callq 0x2d32f movl -0x2c(%rbp), %eax jmp 0x6f935 xorl %eax, %eax cmpl $0x3, 0x397ecc(%rip) # 0x407830 setne %al addl %eax, %eax movl %eax, 0x397ec1(%rip) # 0x407830 movb $0x1, 0xb99f9a(%rip) # 0xc09910 movl $0x0, 0x3990cc(%rip) # 0x408a4c movq 0xb99eb9(%rip), %rdi # 0xc09840 testq %rdi, %rdi jne 0x6f9e0 leaq 0xb99e6d(%rip), %rdi # 0xc09800 callq 0x291a0 movb $0x1, %al addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2d312 jmp 0x6f89c leaq 0x31d6b3(%rip), %rax # 0x38d070 movq (%rax), %rax callq *0x160(%rax) jmp 0x6f8b1 leaq 0x31d69e(%rip), %rax # 0x38d070 movq (%rax), %rax callq *0x160(%rax) jmp 0x6f873 leaq 0x31d689(%rip), %rax # 0x38d070 movq (%rax), %rax callq *0x160(%rax) jmp 0x6f98c
translog_set_lsn_for_files: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r12d, ecx mov rbx, rdx mov r14d, esi mov r15d, edi test r12b, r12b jnz short loc_6F83A call translog_lock loc_6F83A: cmp dword ptr cs:qword_C09688+4, r14d jnz short loc_6F856 cmp cs:qword_C096D0, rbx jge short loc_6F853 mov cs:qword_C096D0, rbx loc_6F853: dec r14d loc_6F856: test r12b, r12b jnz short loc_6F882 mov r12, qword ptr cs:xmmword_C096B0+8 mov rdi, ds:qword_1000D0[r12] test rdi, rdi jnz loc_6F9CB loc_6F873: add r12, 100090h mov rdi, r12 call _pthread_mutex_unlock loc_6F882: cmp cs:qword_C09840, 0 jnz loc_6F9AC lea rdi, unk_C09800 call _pthread_mutex_lock loc_6F89C: cmp r14d, r15d jnb short loc_6F8C4 loc_6F8A1: mov rdi, cs:qword_C09840 test rdi, rdi jnz loc_6F9B6 loc_6F8B1: lea rdi, unk_C09800 call _pthread_mutex_unlock xor eax, eax jmp loc_6F99A loc_6F8C4: mov edi, r15d call open_logfile_by_number_no_cache test eax, eax js loc_6F95B mov r12d, eax lea rdi, [rbp+var_68] mov esi, eax call translog_read_file_header mov r13d, 1 test al, al jnz short loc_6F904 xor r13d, r13d cmp [rbp+var_68], rbx jge short loc_6F904 mov edi, r12d mov rsi, rbx call translog_max_lsn_to_header movzx r13d, al loc_6F904: lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r12d mov edx, 4 call qword ptr [rax+158h] test rax, rax jnz short loc_6F947 mov esi, 10h mov edi, r12d call my_close loc_6F935: or eax, r13d jnz short loc_6F95B inc r15d cmp r15d, r14d jbe short loc_6F8C4 jmp loc_6F8A1 loc_6F947: mov rdi, rax mov esi, r12d lea rdx, [rbp+var_2C] call translog_set_lsn_for_files_cold_2 mov eax, [rbp+var_2C] jmp short loc_6F935 loc_6F95B: xor eax, eax cmp cs:translog_status, 3 setnz al add eax, eax mov cs:translog_status, eax mov byte ptr cs:word_C09910, 1 mov cs:dword_408A4C, 0 mov rdi, cs:qword_C09840 test rdi, rdi jnz short loc_6F9E0 loc_6F98C: lea rdi, unk_C09800 call _pthread_mutex_unlock mov al, 1 loc_6F99A: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6F9AC: call translog_set_lsn_for_files_cold_1 jmp loc_6F89C loc_6F9B6: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_6F8B1 loc_6F9CB: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_6F873 loc_6F9E0: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_6F98C
char translog_set_lsn_for_files(unsigned int a1, long long a2, long long a3, char a4) { unsigned int v6; // r14d unsigned int v7; // r15d long long v8; // r12 long long v9; // rdx long long v10; // rcx int v11; // r8d int v12; // r9d int v14; // eax unsigned int v15; // r12d BOOL v16; // r13d long long v17; // rax unsigned int v18; // eax _BYTE v19[72]; // [rsp+0h] [rbp-B0h] BYREF __m128 v20[3]; // [rsp+48h] [rbp-68h] BYREF unsigned int v21[11]; // [rsp+84h] [rbp-2Ch] BYREF v6 = a2; v7 = a1; if ( !a4 ) translog_lock(); if ( HIDWORD(qword_C09688) == (_DWORD)a2 ) { if ( qword_C096D0 < a3 ) qword_C096D0 = a3; v6 = a2 - 1; } if ( !a4 ) { v8 = *((_QWORD *)&xmmword_C096B0 + 1); if ( *(long long *)((char *)&qword_1000D0 + *((_QWORD *)&xmmword_C096B0 + 1)) ) PSI_server[44](); pthread_mutex_unlock(v8 + 1048720); } if ( qword_C09840 ) translog_set_lsn_for_files_cold_1(); else pthread_mutex_lock(&unk_C09800); if ( v6 >= a1 ) { while ( 1 ) { v14 = open_logfile_by_number_no_cache(v7, a2, v9, v10, v11, v12); if ( v14 < 0 ) break; v15 = v14; v16 = 1; if ( !translog_read_file_header(v20, (unsigned int)v14) ) { v16 = 0; if ( v20[0].m128_i64[0] < a3 ) v16 = translog_max_lsn_to_header(v15, a3); } v17 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v19, v15, 4LL); if ( v17 ) { a2 = v15; translog_set_lsn_for_files_cold_2(v17, v15, v21); v18 = v21[0]; } else { a2 = 16LL; v18 = my_close(v15, 16LL); } if ( v16 | v18 ) break; if ( ++v7 > v6 ) goto LABEL_14; } translog_status = 2 * (translog_status != 3); LOBYTE(word_C09910) = 1; dword_408A4C = 0; if ( qword_C09840 ) PSI_server[44](); pthread_mutex_unlock(&unk_C09800); return 1; } else { LABEL_14: if ( qword_C09840 ) PSI_server[44](); pthread_mutex_unlock(&unk_C09800); return 0; } }
translog_set_lsn_for_files: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R12D,ECX MOV RBX,RDX MOV R14D,ESI MOV R15D,EDI TEST R12B,R12B JNZ 0x0016f83a CALL 0x00168f5f LAB_0016f83a: CMP dword ptr [0x00d0968c],R14D JNZ 0x0016f856 CMP qword ptr [0x00d096d0],RBX JGE 0x0016f853 MOV qword ptr [0x00d096d0],RBX LAB_0016f853: DEC R14D LAB_0016f856: TEST R12B,R12B JNZ 0x0016f882 MOV R12,qword ptr [0x00d096b8] MOV RDI,qword ptr [R12 + 0x1000d0] TEST RDI,RDI JNZ 0x0016f9cb LAB_0016f873: ADD R12,0x100090 MOV RDI,R12 CALL 0x001291a0 LAB_0016f882: CMP qword ptr [0x00d09840],0x0 JNZ 0x0016f9ac LEA RDI,[0xd09800] CALL 0x001291d0 LAB_0016f89c: CMP R14D,R15D JNC 0x0016f8c4 LAB_0016f8a1: MOV RDI,qword ptr [0x00d09840] TEST RDI,RDI JNZ 0x0016f9b6 LAB_0016f8b1: LEA RDI,[0xd09800] CALL 0x001291a0 XOR EAX,EAX JMP 0x0016f99a LAB_0016f8c4: MOV EDI,R15D CALL 0x00168d42 TEST EAX,EAX JS 0x0016f95b MOV R12D,EAX LEA RDI,[RBP + -0x68] MOV ESI,EAX CALL 0x00168afc MOV R13D,0x1 TEST AL,AL JNZ 0x0016f904 XOR R13D,R13D CMP qword ptr [RBP + -0x68],RBX JGE 0x0016f904 MOV EDI,R12D MOV RSI,RBX CALL 0x0016f362 MOVZX R13D,AL LAB_0016f904: LEA RAX,[0x48d070] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R12D MOV EDX,0x4 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0016f947 MOV ESI,0x10 MOV EDI,R12D CALL 0x001a6549 LAB_0016f935: OR EAX,R13D JNZ 0x0016f95b INC R15D CMP R15D,R14D JBE 0x0016f8c4 JMP 0x0016f8a1 LAB_0016f947: MOV RDI,RAX MOV ESI,R12D LEA RDX,[RBP + -0x2c] CALL 0x0012d32f MOV EAX,dword ptr [RBP + -0x2c] JMP 0x0016f935 LAB_0016f95b: XOR EAX,EAX CMP dword ptr [0x00507830],0x3 SETNZ AL ADD EAX,EAX MOV dword ptr [0x00507830],EAX MOV byte ptr [0x00d09910],0x1 MOV dword ptr [0x00508a4c],0x0 MOV RDI,qword ptr [0x00d09840] TEST RDI,RDI JNZ 0x0016f9e0 LAB_0016f98c: LEA RDI,[0xd09800] CALL 0x001291a0 MOV AL,0x1 LAB_0016f99a: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016f9ac: CALL 0x0012d312 JMP 0x0016f89c LAB_0016f9b6: LEA RAX,[0x48d070] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0016f8b1 LAB_0016f9cb: LEA RAX,[0x48d070] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0016f873 LAB_0016f9e0: LEA RAX,[0x48d070] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0016f98c
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 translog_set_lsn_for_files(uint param_1,uint param_2,long param_3,char param_4) { char cVar1; char cVar2; int iVar3; long lVar4; int4 extraout_var; int1 local_b8 [72]; long local_70 [7]; int local_34; if (param_4 == '\0') { translog_lock(); } lVar4 = DAT_00d096b8; if (DAT_00d09688._4_4_ == param_2) { if (DAT_00d096d0 < param_3) { DAT_00d096d0 = param_3; } param_2 = param_2 - 1; } if (param_4 == '\0') { if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00d096b8) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar4)); } if (DAT_00d09840 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00d09800); } else { translog_set_lsn_for_files_cold_1(); } if (param_1 <= param_2) { do { iVar3 = open_logfile_by_number_no_cache(param_1); if (iVar3 < 0) { LAB_0016f95b: translog_status = (uint)(translog_status != 3) * 2; DAT_00d09910 = 1; _DAT_00508a4c = 0; if (DAT_00d09840 != 0) { (**(code **)(PSI_server + 0x160))(); } iVar3 = pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d09800); return CONCAT71((int7)(CONCAT44(extraout_var,iVar3) >> 8),1); } cVar1 = translog_read_file_header(local_70,iVar3); cVar2 = '\x01'; if ((cVar1 == '\0') && (cVar2 = '\0', local_70[0] < param_3)) { cVar2 = translog_max_lsn_to_header(iVar3,param_3); } lVar4 = (**(code **)(PSI_server + 0x158))(local_b8,iVar3,4); if (lVar4 == 0) { iVar3 = my_close(iVar3,0x10); } else { translog_set_lsn_for_files_cold_2(lVar4,iVar3,&local_34); iVar3 = local_34; } if (iVar3 != 0 || cVar2 != '\0') goto LAB_0016f95b; param_1 = param_1 + 1; } while (param_1 <= param_2); } if (DAT_00d09840 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00d09800); return 0; }
30,956
ImPlot::SetupAxisScale(int, double (*)(double, void*), double (*)(double, void*), void*)
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
void SetupAxisScale(ImAxis idx, ImPlotTransform fwd, ImPlotTransform inv, void* data) { ImPlotContext& gp = *GImPlot; IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr && !gp.CurrentPlot->SetupLocked, "Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!"); ImPlotPlot& plot = *gp.CurrentPlot; ImPlotAxis& axis = plot.Axes[idx]; IM_ASSERT_USER_ERROR(axis.Enabled, "Axis is not enabled! Did you forget to call SetupAxis()?"); axis.Scale = IMPLOT_AUTO; axis.TransformForward = fwd; axis.TransformInverse = inv; axis.TransformData = data; }
O1
cpp
ImPlot::SetupAxisScale(int, double (*)(double, void*), double (*)(double, void*), void*): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movl %edi, %ebp movq 0x27e22a(%rip), %r12 # 0x336ca0 movq 0x50(%r12), %rax testq %rax, %rax je 0xb8a89 cmpb $0x1, 0x9de(%rax) jne 0xb8a95 leaq 0x1dc4b4(%rip), %rdi # 0x294f44 callq 0x2161f4 movq 0x50(%r12), %rax movslq %ebp, %rcx imulq $0x178, %rcx, %rcx # imm = 0x178 leaq (%rax,%rcx), %r12 addq $0x18, %r12 cmpb $0x0, 0x16c(%r12) jne 0xb8ac3 leaq 0x1e1b35(%rip), %rdi # 0x29a5f3 callq 0x2161f4 movl $0xffffffff, 0x24(%r12) # imm = 0xFFFFFFFF movq %r15, 0xf8(%r12) movq %r14, 0x100(%r12) movq %rbx, 0x108(%r12) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN6ImPlot14SetupAxisScaleEiPFddPvES2_S0_: push rbp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rdx mov r15, rsi mov ebp, edi mov r12, cs:GImPlot mov rax, [r12+50h] test rax, rax jz short loc_B8A89 cmp byte ptr [rax+9DEh], 1 jnz short loc_B8A95 loc_B8A89: lea rdi, aSetupNeedsToBe; "Setup needs to be called after BeginPlo"... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_B8A95: mov rax, [r12+50h] movsxd rcx, ebp imul rcx, 178h lea r12, [rax+rcx] add r12, 18h cmp byte ptr [r12+16Ch], 0 jnz short loc_B8AC3 lea rdi, aAxisIsNotEnabl; "Axis is not enabled! Did you forget to "... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_B8AC3: mov dword ptr [r12+24h], 0FFFFFFFFh mov [r12+0F8h], r15 mov [r12+100h], r14 mov [r12+108h], rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ImPlot::SetupAxisScale( ImPlot *this, const char *a2, double (*a3)(double, void *), double (*a4)(double, void *), void *a5) { ImGui *v7; // r12 long long v8; // rax long long result; // rax long long v10; // rcx long long v11; // r12 v7 = GImPlot; v8 = *((_QWORD *)GImPlot + 10); if ( !v8 || *(_BYTE *)(v8 + 2526) == 1 ) ImGui::ErrorLog( (ImGui *)"Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!", a2); result = *((_QWORD *)v7 + 10); v10 = 376LL * (int)this; v11 = result + v10 + 24; if ( !*(_BYTE *)(result + v10 + 388) ) result = ImGui::ErrorLog((ImGui *)"Axis is not enabled! Did you forget to call SetupAxis()?", a2); *(_DWORD *)(v11 + 36) = -1; *(_QWORD *)(v11 + 248) = a2; *(_QWORD *)(v11 + 256) = a3; *(_QWORD *)(v11 + 264) = a4; return result; }
SetupAxisScale: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV EBP,EDI MOV R12,qword ptr [0x00436ca0] MOV RAX,qword ptr [R12 + 0x50] TEST RAX,RAX JZ 0x001b8a89 CMP byte ptr [RAX + 0x9de],0x1 JNZ 0x001b8a95 LAB_001b8a89: LEA RDI,[0x394f44] CALL 0x003161f4 LAB_001b8a95: MOV RAX,qword ptr [R12 + 0x50] MOVSXD RCX,EBP IMUL RCX,RCX,0x178 LEA R12,[RAX + RCX*0x1] ADD R12,0x18 CMP byte ptr [R12 + 0x16c],0x0 JNZ 0x001b8ac3 LEA RDI,[0x39a5f3] CALL 0x003161f4 LAB_001b8ac3: MOV dword ptr [R12 + 0x24],0xffffffff MOV qword ptr [R12 + 0xf8],R15 MOV qword ptr [R12 + 0x100],R14 MOV qword ptr [R12 + 0x108],RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* ImPlot::SetupAxisScale(int, double (*)(double, void*), double (*)(double, void*), void*) */ void ImPlot::SetupAxisScale (int param_1,_func_double_double_void_ptr *param_2, _func_double_double_void_ptr *param_3,void *param_4) { long lVar1; lVar1 = GImPlot; if ((*(long *)(GImPlot + 0x50) == 0) || (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\x01')) { ImGui::ErrorLog( "Setup needs to be called after BeginPlot and before any setup locking functions (e.g. PlotX)!" ); } lVar1 = *(long *)(lVar1 + 0x50) + (long)param_1 * 0x178; if (*(char *)(lVar1 + 0x184) == '\0') { ImGui::ErrorLog("Axis is not enabled! Did you forget to call SetupAxis()?"); } *(int4 *)(lVar1 + 0x3c) = 0xffffffff; *(_func_double_double_void_ptr **)(lVar1 + 0x110) = param_2; *(_func_double_double_void_ptr **)(lVar1 + 0x118) = param_3; *(void **)(lVar1 + 0x120) = param_4; return; }
30,957
mpvio_info
eloqsql/libmariadb/plugins/auth/my_auth.c
void mpvio_info(MARIADB_PVIO *pvio, MYSQL_PLUGIN_VIO_INFO *info) { memset(info, 0, sizeof(*info)); switch (pvio->type) { case PVIO_TYPE_SOCKET: info->protocol= MYSQL_VIO_TCP; ma_pvio_get_handle(pvio, &info->socket); return; case PVIO_TYPE_UNIXSOCKET: info->protocol= MYSQL_VIO_SOCKET; ma_pvio_get_handle(pvio, &info->socket); return; /* case VIO_TYPE_SSL: { struct sockaddr addr; SOCKET_SIZE_TYPE addrlen= sizeof(addr); if (getsockname(vio->sd, &addr, &addrlen)) return; info->protocol= addr.sa_family == AF_UNIX ? MYSQL_VIO_SOCKET : MYSQL_VIO_TCP; info->socket= vio->sd; return; } */ #ifdef _WIN32 /* case VIO_TYPE_NAMEDPIPE: info->protocol= MYSQL_VIO_PIPE; info->handle= vio->hPipe; return; */ /* not supported yet case VIO_TYPE_SHARED_MEMORY: info->protocol= MYSQL_VIO_MEMORY; info->handle= vio->handle_file_map; return; */ #endif default: DBUG_ASSERT(0); } }
O0
c
mpvio_info: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movl 0x20(%rax), %eax movl %eax, -0x14(%rbp) testl %eax, %eax je 0x3f852 jmp 0x3f82b movl -0x14(%rbp), %eax subl $0x1, %eax jne 0x3f86f jmp 0x3f835 movq -0x10(%rbp), %rax movl $0x1, (%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x4, %rsi callq 0x23c00 jmp 0x3f871 movq -0x10(%rbp), %rax movl $0x2, (%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x4, %rsi callq 0x23c00 jmp 0x3f871 jmp 0x3f871 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
mpvio_info: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov eax, [rax+20h] mov [rbp+var_14], eax test eax, eax jz short loc_3F852 jmp short $+2 loc_3F82B: mov eax, [rbp+var_14] sub eax, 1 jnz short loc_3F86F jmp short $+2 loc_3F835: mov rax, [rbp+var_10] mov dword ptr [rax], 1 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, 4 call ma_pvio_get_handle jmp short loc_3F871 loc_3F852: mov rax, [rbp+var_10] mov dword ptr [rax], 2 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] add rsi, 4 call ma_pvio_get_handle jmp short loc_3F871 loc_3F86F: jmp short $+2 loc_3F871: add rsp, 20h pop rbp retn
char mpvio_info(long long a1, _QWORD *a2) { char result; // al int v3; // [rsp+Ch] [rbp-14h] *a2 = 0LL; v3 = *(_DWORD *)(a1 + 32); if ( v3 ) { result = v3 - 1; if ( v3 == 1 ) { *(_DWORD *)a2 = 1; return ma_pvio_get_handle(a1, (long long)a2 + 4); } } else { *(_DWORD *)a2 = 2; return ma_pvio_get_handle(a1, (long long)a2 + 4); } return result; }
mpvio_info: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x20] MOV dword ptr [RBP + -0x14],EAX TEST EAX,EAX JZ 0x0013f852 JMP 0x0013f82b LAB_0013f82b: MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 JNZ 0x0013f86f JMP 0x0013f835 LAB_0013f835: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x4 CALL 0x00123c00 JMP 0x0013f871 LAB_0013f852: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x2 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x4 CALL 0x00123c00 JMP 0x0013f871 LAB_0013f86f: JMP 0x0013f871 LAB_0013f871: ADD RSP,0x20 POP RBP RET
void mpvio_info(long param_1,int8 *param_2) { *param_2 = 0; if (*(int *)(param_1 + 0x20) == 0) { *(int4 *)param_2 = 2; ma_pvio_get_handle(param_1,(long)param_2 + 4); } else if (*(int *)(param_1 + 0x20) == 1) { *(int4 *)param_2 = 1; ma_pvio_get_handle(param_1,(long)param_2 + 4); } return; }
30,958
gguf_find_key
ngxson[P]ggml-easy/ggml/src/gguf.cpp
int64_t gguf_find_key(const struct gguf_context * ctx, const char * key) { // return -1 if key not found int64_t keyfound = -1; const int64_t n_kv = gguf_get_n_kv(ctx); for (int64_t i = 0; i < n_kv; ++i) { if (strcmp(key, gguf_get_key(ctx, i)) == 0) { keyfound = i; break; } } return keyfound; }
O0
cpp
gguf_find_key: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq $-0x1, 0x20(%rsp) movq 0x30(%rsp), %rdi callq 0x47ba0 movq %rax, 0x18(%rsp) movq $0x0, 0x10(%rsp) movq 0x10(%rsp), %rax cmpq 0x18(%rsp), %rax jge 0x8ed24 movq 0x28(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x42eb0 movq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x45570 cmpl $0x0, %eax jne 0x8ed12 movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) jmp 0x8ed24 jmp 0x8ed14 movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0x8eccf movq 0x20(%rsp), %rax addq $0x38, %rsp retq nop
gguf_find_key: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], 0FFFFFFFFFFFFFFFFh mov rdi, [rsp+38h+var_8] call _gguf_get_n_kv mov [rsp+38h+var_20], rax mov [rsp+38h+var_28], 0 loc_8ECCF: mov rax, [rsp+38h+var_28] cmp rax, [rsp+38h+var_20] jge short loc_8ED24 mov rax, [rsp+38h+var_10] mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_8] mov rsi, [rsp+38h+var_28] call _gguf_get_key mov rdi, [rsp+38h+var_30] mov rsi, rax call _strcmp cmp eax, 0 jnz short loc_8ED12 mov rax, [rsp+38h+var_28] mov [rsp+38h+var_18], rax jmp short loc_8ED24 loc_8ED12: jmp short $+2 loc_8ED14: mov rax, [rsp+38h+var_28] add rax, 1 mov [rsp+38h+var_28], rax jmp short loc_8ECCF loc_8ED24: mov rax, [rsp+38h+var_18] add rsp, 38h retn
long long gguf_find_key(long long a1, long long a2) { long long key; // rax long long i; // [rsp+10h] [rbp-28h] long long n_kv; // [rsp+18h] [rbp-20h] long long v6; // [rsp+20h] [rbp-18h] v6 = -1LL; n_kv = gguf_get_n_kv(a1); for ( i = 0LL; i < n_kv; ++i ) { key = gguf_get_key(a1, i); if ( !(unsigned int)strcmp(a2, key) ) return i; } return v6; }
gguf_find_key: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],-0x1 MOV RDI,qword ptr [RSP + 0x30] CALL 0x00147ba0 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],0x0 LAB_0018eccf: MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RSP + 0x18] JGE 0x0018ed24 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x10] CALL 0x00142eb0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX CALL 0x00145570 CMP EAX,0x0 JNZ 0x0018ed12 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX JMP 0x0018ed24 LAB_0018ed12: JMP 0x0018ed14 LAB_0018ed14: MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX JMP 0x0018eccf LAB_0018ed24: MOV RAX,qword ptr [RSP + 0x20] ADD RSP,0x38 RET
long gguf_find_key(int8 param_1,char *param_2) { int iVar1; long lVar2; char *__s2; long local_28; lVar2 = gguf_get_n_kv(param_1); local_28 = 0; while( true ) { if (lVar2 <= local_28) { return -1; } __s2 = (char *)gguf_get_key(param_1,local_28); iVar1 = strcmp(param_2,__s2); if (iVar1 == 0) break; local_28 = local_28 + 1; } return local_28; }
30,959
mi_ft_convert_to_ft2
eloqsql/storage/myisam/ft_update.c
uint _mi_ft_convert_to_ft2(MI_INFO *info, uint keynr, uchar *key) { my_off_t root; DYNAMIC_ARRAY *da=info->ft1_to_ft2; MI_KEYDEF *keyinfo=&info->s->ft2_keyinfo; uchar *key_ptr= (uchar*) dynamic_array_ptr(da, 0), *end; uint length, key_length; DBUG_ENTER("_mi_ft_convert_to_ft2"); /* we'll generate one pageful at once, and insert the rest one-by-one */ /* calculating the length of this page ...*/ length=(keyinfo->block_length-2) / keyinfo->keylength; set_if_smaller(length, da->elements); length=length * keyinfo->keylength; get_key_full_length_rdonly(key_length, key); while (_mi_ck_delete(info, keynr, key, key_length) == 0) { /* nothing to do here. _mi_ck_delete() will populate info->ft1_to_ft2 with deleted keys */ } /* creating pageful of keys */ mi_putint(info->buff,length+2,0); memcpy(info->buff+2, key_ptr, length); info->buff_used=info->page_changed=1; /* info->buff is used */ if ((root= _mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR || _mi_write_keypage(info,keyinfo,root,DFLT_INIT_HITS,info->buff)) DBUG_RETURN(-1); /* inserting the rest of key values */ end= (uchar*) dynamic_array_ptr(da, da->elements); for (key_ptr+=length; key_ptr < end; key_ptr+=keyinfo->keylength) if(_mi_ck_real_write_btree(info, keyinfo, key_ptr, 0, &root, SEARCH_SAME)) DBUG_RETURN(-1); /* now, writing the word key entry */ ft_intXstore(key+key_length, - (int) da->elements); _mi_dpointer(info, key+key_length+HA_FT_WLEN, root); DBUG_RETURN(_mi_ck_real_write_btree(info, info->s->keyinfo+keynr, key, 0, &info->s->state.key_root[keynr], SEARCH_SAME)); }
O0
c
mi_ft_convert_to_ft2: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x88(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0x1a8, %rax # imm = 0x1A8 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq -0x30(%rbp), %rcx imull $0x0, 0x14(%rcx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movzwl 0xe(%rax), %eax subl $0x2, %eax movq -0x38(%rbp), %rcx movzwl 0x12(%rcx), %ecx cltd idivl %ecx movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax movq -0x30(%rbp), %rcx cmpl 0x8(%rcx), %eax jbe 0x67d6a movq -0x30(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x4c(%rbp) jmp 0x67d6c movl -0x4c(%rbp), %eax movq -0x38(%rbp), %rcx movzwl 0x12(%rcx), %ecx imull %ecx, %eax movl %eax, -0x4c(%rbp) movq -0x20(%rbp), %rax movzbl (%rax), %eax cmpl $0xff, %eax je 0x67d9a movq -0x20(%rbp), %rax movzbl (%rax), %eax addl $0x1, %eax movl %eax, -0x50(%rbp) jmp 0x67dbe movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax movzwl %ax, %eax movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax addl $0x3, %eax movl %eax, -0x50(%rbp) jmp 0x67dc0 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movl -0x50(%rbp), %ecx callq 0x2f550 cmpl $0x0, %eax jne 0x67dda jmp 0x67dc0 movl -0x4c(%rbp), %eax addl $0x2, %eax movzwl %ax, %eax addl $0x0, %eax movw %ax, -0x52(%rbp) movzwl -0x52(%rbp), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movb %cl, 0x1(%rax) movl -0x58(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax movq 0x100(%rax), %rdi addq $0x2, %rdi movq -0x40(%rbp), %rsi movl -0x4c(%rbp), %eax movl %eax, %edx callq 0x282b0 movq -0x10(%rbp), %rax movb $0x1, 0x33c(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x33d(%rax) movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movl $0x3, %edx callq 0x49b60 movq %rax, -0x28(%rbp) cmpq $-0x1, %rax je 0x67e8e movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x100(%rax), %r8 movl $0x3, %ecx callq 0x49830 cmpl $0x0, %eax je 0x67e9c jmp 0x67e90 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x67fe0 movq -0x30(%rbp), %rax movq (%rax), %rax movq -0x30(%rbp), %rcx movl 0x8(%rcx), %ecx movq -0x30(%rbp), %rdx imull 0x14(%rdx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x48(%rbp) movl -0x4c(%rbp), %ecx movq -0x40(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x67f1f movq -0x10(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x40(%rbp), %rdx xorl %ecx, %ecx leaq -0x28(%rbp), %r8 movl $0x4, %r9d callq 0x54a50 cmpl $0x0, %eax je 0x67f05 jmp 0x67ef9 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x67fe0 jmp 0x67f07 movq -0x38(%rbp), %rax movzwl 0x12(%rax), %ecx movq -0x40(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) jmp 0x67ecb movq -0x30(%rbp), %rcx xorl %eax, %eax subl 0x8(%rcx), %eax cltq movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movb %al, %dl movq -0x20(%rbp), %rax movl -0x50(%rbp), %ecx movb %dl, 0x3(%rax,%rcx) movq -0x60(%rbp), %rax shrq $0x8, %rax movb %al, %dl movq -0x20(%rbp), %rax movl -0x50(%rbp), %ecx movb %dl, 0x2(%rax,%rcx) movq -0x60(%rbp), %rax shrq $0x10, %rax movb %al, %dl movq -0x20(%rbp), %rax movl -0x50(%rbp), %ecx movb %dl, 0x1(%rax,%rcx) movq -0x60(%rbp), %rax shrq $0x18, %rax movb %al, %dl movq -0x20(%rbp), %rax movl -0x50(%rbp), %ecx movb %dl, (%rax,%rcx) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movl -0x50(%rbp), %eax addq %rax, %rsi addq $0x4, %rsi movq -0x28(%rbp), %rdx callq 0x4e810 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rsi movl -0x14(%rbp), %eax imulq $0x70, %rax, %rax addq %rax, %rsi movq -0x20(%rbp), %rdx movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x98(%rax), %r8 movl -0x14(%rbp), %eax shlq $0x3, %rax addq %rax, %r8 xorl %ecx, %ecx movl $0x4, %r9d callq 0x54a50 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
_mi_ft_convert_to_ft2: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+88h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax] add rax, 1A8h mov [rbp+var_38], rax mov rax, [rbp+var_30] mov rax, [rax] mov rcx, [rbp+var_30] imul ecx, [rcx+14h], 0 mov ecx, ecx add rax, rcx mov [rbp+var_40], rax mov rax, [rbp+var_38] movzx eax, word ptr [rax+0Eh] sub eax, 2 mov rcx, [rbp+var_38] movzx ecx, word ptr [rcx+12h] cdq idiv ecx mov [rbp+var_4C], eax mov eax, [rbp+var_4C] mov rcx, [rbp+var_30] cmp eax, [rcx+8] jbe short loc_67D6A mov rax, [rbp+var_30] mov eax, [rax+8] mov [rbp+var_4C], eax loc_67D6A: jmp short $+2 loc_67D6C: mov eax, [rbp+var_4C] mov rcx, [rbp+var_38] movzx ecx, word ptr [rcx+12h] imul eax, ecx mov [rbp+var_4C], eax mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cmp eax, 0FFh jz short loc_67D9A mov rax, [rbp+var_20] movzx eax, byte ptr [rax] add eax, 1 mov [rbp+var_50], eax jmp short loc_67DBE loc_67D9A: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] movzx eax, ax mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax add eax, 3 mov [rbp+var_50], eax loc_67DBE: jmp short $+2 loc_67DC0: mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] mov ecx, [rbp+var_50] call _mi_ck_delete cmp eax, 0 jnz short loc_67DDA jmp short loc_67DC0 loc_67DDA: mov eax, [rbp+var_4C] add eax, 2 movzx eax, ax add eax, 0 mov [rbp+var_52], ax movzx eax, [rbp+var_52] mov [rbp+var_58], eax mov eax, [rbp+var_58] mov cl, al mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rax+1], cl mov eax, [rbp+var_58] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rax], cl mov rax, [rbp+var_10] mov rdi, [rax+100h] add rdi, 2 mov rsi, [rbp+var_40] mov eax, [rbp+var_4C] mov edx, eax call _memcpy mov rax, [rbp+var_10] mov byte ptr [rax+33Ch], 1 mov rax, [rbp+var_10] mov byte ptr [rax+33Dh], 1 mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov edx, 3 call _mi_new mov [rbp+var_28], rax cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_67E8E mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov rdx, [rbp+var_28] mov rax, [rbp+var_10] mov r8, [rax+100h] mov ecx, 3 call _mi_write_keypage cmp eax, 0 jz short loc_67E9C loc_67E8E: jmp short $+2 loc_67E90: mov [rbp+var_4], 0FFFFFFFFh jmp loc_67FE0 loc_67E9C: mov rax, [rbp+var_30] mov rax, [rax] mov rcx, [rbp+var_30] mov ecx, [rcx+8] mov rdx, [rbp+var_30] imul ecx, [rdx+14h] mov ecx, ecx add rax, rcx mov [rbp+var_48], rax mov ecx, [rbp+var_4C] mov rax, [rbp+var_40] mov ecx, ecx add rax, rcx mov [rbp+var_40], rax loc_67ECB: mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jnb short loc_67F1F mov rdi, [rbp+var_10] mov rsi, [rbp+var_38] mov rdx, [rbp+var_40] xor ecx, ecx lea r8, [rbp+var_28] mov r9d, 4 call _mi_ck_real_write_btree cmp eax, 0 jz short loc_67F05 jmp short $+2 loc_67EF9: mov [rbp+var_4], 0FFFFFFFFh jmp loc_67FE0 loc_67F05: jmp short $+2 loc_67F07: mov rax, [rbp+var_38] movzx ecx, word ptr [rax+12h] mov rax, [rbp+var_40] movsxd rcx, ecx add rax, rcx mov [rbp+var_40], rax jmp short loc_67ECB loc_67F1F: mov rcx, [rbp+var_30] xor eax, eax sub eax, [rcx+8] cdqe mov [rbp+var_60], rax mov rax, [rbp+var_60] mov dl, al mov rax, [rbp+var_20] mov ecx, [rbp+var_50] mov [rax+rcx+3], dl mov rax, [rbp+var_60] shr rax, 8 mov dl, al mov rax, [rbp+var_20] mov ecx, [rbp+var_50] mov [rax+rcx+2], dl mov rax, [rbp+var_60] shr rax, 10h mov dl, al mov rax, [rbp+var_20] mov ecx, [rbp+var_50] mov [rax+rcx+1], dl mov rax, [rbp+var_60] shr rax, 18h mov dl, al mov rax, [rbp+var_20] mov ecx, [rbp+var_50] mov [rax+rcx], dl mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov eax, [rbp+var_50] add rsi, rax add rsi, 4 mov rdx, [rbp+var_28] call _mi_dpointer mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+218h] mov eax, [rbp+var_14] imul rax, 70h ; 'p' add rsi, rax mov rdx, [rbp+var_20] mov rax, [rbp+var_10] mov rax, [rax] mov r8, [rax+98h] mov eax, [rbp+var_14] shl rax, 3 add r8, rax xor ecx, ecx mov r9d, 4 call _mi_ck_real_write_btree mov [rbp+var_4], eax loc_67FE0: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long mi_ft_convert_to_ft2(_QWORD *a1, unsigned int a2, unsigned __int8 *a3) { int v3; // eax int v5; // [rsp+0h] [rbp-60h] unsigned int v6; // [rsp+10h] [rbp-50h] unsigned int v7; // [rsp+14h] [rbp-4Ch] unsigned int v8; // [rsp+14h] [rbp-4Ch] unsigned long long v9; // [rsp+18h] [rbp-48h] long long v10; // [rsp+20h] [rbp-40h] unsigned long long i; // [rsp+20h] [rbp-40h] long long v12; // [rsp+28h] [rbp-38h] long long *v13; // [rsp+30h] [rbp-30h] unsigned long long v14; // [rsp+38h] [rbp-28h] BYREF unsigned __int8 *v15; // [rsp+40h] [rbp-20h] unsigned int v16; // [rsp+4Ch] [rbp-14h] _QWORD *v17; // [rsp+50h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v13 = (long long *)a1[17]; v12 = *a1 + 424LL; v10 = *v13; v7 = (*(unsigned __int16 *)(*a1 + 438LL) - 2) / *(unsigned __int16 *)(*a1 + 442LL); if ( v7 > *((_DWORD *)v13 + 2) ) v7 = *((_DWORD *)v13 + 2); v8 = *(unsigned __int16 *)(*a1 + 442LL) * v7; if ( *v15 == 255 ) v3 = _byteswap_ushort(*(_WORD *)(v15 + 1)) + 3; else v3 = *v15 + 1; v6 = v3; while ( !(unsigned int)mi_ck_delete((long long)v17, v16, (long long)v15, v6) ) ; *(_BYTE *)(v17[32] + 1LL) = v8 + 2; *(_BYTE *)v17[32] = (unsigned __int16)(v8 + 2) >> 8; memcpy(v17[32] + 2LL, v10, v8); *((_BYTE *)v17 + 828) = 1; *((_BYTE *)v17 + 829) = 1; v14 = mi_new(v17, v12, 3); if ( v14 == -1LL || (unsigned int)mi_write_keypage(v17, v12, v14, 3, (unsigned __int16 *)v17[32]) ) { return (unsigned int)-1; } else { v9 = (unsigned int)(*((_DWORD *)v13 + 5) * *((_DWORD *)v13 + 2)) + *v13; for ( i = v8 + v10; i < v9; i += *(unsigned __int16 *)(v12 + 18) ) { if ( (unsigned int)mi_ck_real_write_btree((long long)v17, v12, i, 0, &v14, 4) ) return (unsigned int)-1; } v5 = -*((_DWORD *)v13 + 2); v15[v6 + 3] = -*((_BYTE *)v13 + 8); v15[v6 + 2] = BYTE1(v5); v15[v6 + 1] = BYTE2(v5); v15[v6] = HIBYTE(v5); mi_dpointer((long long)v17, &v15[v6 + 4], v14); return (unsigned int)mi_ck_real_write_btree( (long long)v17, 112LL * v16 + *(_QWORD *)(*v17 + 536LL), (long long)v15, 0, (_QWORD *)(8LL * v16 + *(_QWORD *)(*v17 + 152LL)), 4); } }
_mi_ft_convert_to_ft2: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0x1a8 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] IMUL ECX,dword ptr [RCX + 0x14],0x0 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX + 0xe] SUB EAX,0x2 MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,word ptr [RCX + 0x12] CDQ IDIV ECX MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RBP + -0x30] CMP EAX,dword ptr [RCX + 0x8] JBE 0x00167d6a MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x4c],EAX LAB_00167d6a: JMP 0x00167d6c LAB_00167d6c: MOV EAX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,word ptr [RCX + 0x12] IMUL EAX,ECX MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x00167d9a MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] ADD EAX,0x1 MOV dword ptr [RBP + -0x50],EAX JMP 0x00167dbe LAB_00167d9a: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX ADD EAX,0x3 MOV dword ptr [RBP + -0x50],EAX LAB_00167dbe: JMP 0x00167dc0 LAB_00167dc0: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x50] CALL 0x0012f550 CMP EAX,0x0 JNZ 0x00167dda JMP 0x00167dc0 LAB_00167dda: MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,0x2 MOVZX EAX,AX ADD EAX,0x0 MOV word ptr [RBP + -0x52],AX MOVZX EAX,word ptr [RBP + -0x52] MOV dword ptr [RBP + -0x58],EAX MOV EAX,dword ptr [RBP + -0x58] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x58] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x100] ADD RDI,0x2 MOV RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x4c] MOV EDX,EAX CALL 0x001282b0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33c],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33d],0x1 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV EDX,0x3 CALL 0x00149b60 MOV qword ptr [RBP + -0x28],RAX CMP RAX,-0x1 JZ 0x00167e8e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RAX + 0x100] MOV ECX,0x3 CALL 0x00149830 CMP EAX,0x0 JZ 0x00167e9c LAB_00167e8e: JMP 0x00167e90 LAB_00167e90: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00167fe0 LAB_00167e9c: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x30] IMUL ECX,dword ptr [RDX + 0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x40] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX LAB_00167ecb: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JNC 0x00167f1f MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x40] XOR ECX,ECX LEA R8,[RBP + -0x28] MOV R9D,0x4 CALL 0x00154a50 CMP EAX,0x0 JZ 0x00167f05 JMP 0x00167ef9 LAB_00167ef9: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00167fe0 LAB_00167f05: JMP 0x00167f07 LAB_00167f07: MOV RAX,qword ptr [RBP + -0x38] MOVZX ECX,word ptr [RAX + 0x12] MOV RAX,qword ptr [RBP + -0x40] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX JMP 0x00167ecb LAB_00167f1f: MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX SUB EAX,dword ptr [RCX + 0x8] CDQE MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x50] MOV byte ptr [RAX + RCX*0x1 + 0x3],DL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x8 MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x50] MOV byte ptr [RAX + RCX*0x1 + 0x2],DL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x10 MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x50] MOV byte ptr [RAX + RCX*0x1 + 0x1],DL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x18 MOV DL,AL MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x50] MOV byte ptr [RAX + RCX*0x1],DL MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x50] ADD RSI,RAX ADD RSI,0x4 MOV RDX,qword ptr [RBP + -0x28] CALL 0x0014e810 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x218] MOV EAX,dword ptr [RBP + -0x14] IMUL RAX,RAX,0x70 ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV R8,qword ptr [RAX + 0x98] MOV EAX,dword ptr [RBP + -0x14] SHL RAX,0x3 ADD R8,RAX XOR ECX,ECX MOV R9D,0x4 CALL 0x00154a50 MOV dword ptr [RBP + -0x4],EAX LAB_00167fe0: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 _mi_ft_convert_to_ft2(long *param_1,uint param_2,byte *param_3) { long *plVar1; long lVar2; void *__src; long lVar3; long lVar4; short sVar5; int iVar6; int iVar7; long lVar8; uint local_58; uint local_54; ulong local_48; long local_30; byte *local_28; uint local_1c; long *local_18; int4 local_c; plVar1 = (long *)param_1[0x11]; lVar2 = *param_1; lVar8 = lVar2 + 0x1a8; __src = (void *)*plVar1; local_54 = (int)(*(ushort *)(lVar2 + 0x1b6) - 2) / (int)(uint)*(ushort *)(lVar2 + 0x1ba); if (*(uint *)(plVar1 + 1) < local_54) { local_54 = *(uint *)(plVar1 + 1); } local_54 = local_54 * *(ushort *)(lVar2 + 0x1ba); local_28 = param_3; local_1c = param_2; local_18 = param_1; if (*param_3 == 0xff) { local_58 = CONCAT11(param_3[1],param_3[2]) + 3; } else { local_58 = *param_3 + 1; } do { iVar6 = _mi_ck_delete(local_18,local_1c,local_28,local_58); } while (iVar6 == 0); sVar5 = (short)local_54 + 2; *(char *)(local_18[0x20] + 1) = (char)sVar5; *(char *)local_18[0x20] = (char)((ushort)sVar5 >> 8); memcpy((void *)(local_18[0x20] + 2),__src,(ulong)local_54); *(int1 *)((long)local_18 + 0x33c) = 1; *(int1 *)((long)local_18 + 0x33d) = 1; local_30 = _mi_new(local_18,lVar8,3); if ((local_30 == -1) || (iVar6 = _mi_write_keypage(local_18,lVar8,local_30,3,local_18[0x20]), iVar6 != 0)) { local_c = 0xffffffff; } else { lVar3 = *plVar1; lVar4 = plVar1[1]; iVar6 = *(int *)((long)plVar1 + 0x14); for (local_48 = (long)__src + (ulong)local_54; local_48 < lVar3 + (ulong)(uint)((int)lVar4 * iVar6); local_48 = local_48 + (long)(int)(uint)*(ushort *)(lVar2 + 0x1ba)) { iVar7 = _mi_ck_real_write_btree(local_18,lVar8,local_48,0,&local_30,4); if (iVar7 != 0) { return 0xffffffff; } } iVar6 = -(int)plVar1[1]; local_28[(ulong)local_58 + 3] = (byte)iVar6; local_28[(ulong)local_58 + 2] = (byte)((uint)iVar6 >> 8); local_28[(ulong)local_58 + 1] = (byte)((uint)iVar6 >> 0x10); local_28[local_58] = (byte)((uint)iVar6 >> 0x18); _mi_dpointer(local_18,local_28 + (ulong)local_58 + 4,local_30); local_c = _mi_ck_real_write_btree (local_18,*(long *)(*local_18 + 0x218) + (ulong)local_1c * 0x70,local_28,0, *(long *)(*local_18 + 0x98) + (ulong)local_1c * 8,4); } return local_c; }
30,960
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::json_sax_dom_callback_parser(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>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
json_sax_dom_callback_parser(BasicJsonType& r, parser_callback_t cb, const bool allow_exceptions_ = true, lexer_t* lexer_ = nullptr) : root(r), callback(std::move(cb)), allow_exceptions(allow_exceptions_), m_lexer_ref(lexer_) { keep_stack.push_back(true); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::json_sax_dom_callback_parser(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>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r12 movl %ecx, %ebp movq %rdi, %r14 movq %rsi, (%rdi) leaq 0x20(%rdi), %rbx leaq 0x80(%rdi), %r15 xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movups %xmm0, 0x18(%rdi) movups %xmm0, 0x28(%rdi) movups %xmm0, 0x38(%rdi) movups %xmm0, 0x48(%rdi) movups %xmm0, 0x58(%rdi) movups %xmm0, 0x68(%rdi) movb $0x0, 0x78(%rdi) movq %r15, %rdi movq %rdx, %rsi callq 0x1de20 movb %bpl, 0xa0(%r14) leaq 0xa8(%r14), %r13 pushq $0x9 popq %rsi movq %r13, %rdi callq 0x1cad0 movq %r12, 0xb8(%r14) pushq $0x1 popq %rsi movq %rbx, %rdi callq 0x1d4d0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r12 movq %r13, %rdi callq 0x1d7b0 jmp 0x24085 movq %rax, %r12 leaq 0x8(%r14), %r13 addq $0x48, %r14 movq %r15, %rdi callq 0x1cbf0 movq %r14, %rdi callq 0x1de30 movq %rbx, %rdi callq 0x1de30 movq %r13, %rdi callq 0x1dd30 movq %r12, %rdi callq 0x1dcb0 nop
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESO_EEbPNS1_5lexerISF_SM_EE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, r8 mov ebp, ecx mov r14, rdi mov [rdi], rsi lea rbx, [rdi+20h] lea r15, [rdi+80h] xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 movups xmmword ptr [rdi+18h], xmm0 movups xmmword ptr [rdi+28h], xmm0 movups xmmword ptr [rdi+38h], xmm0 movups xmmword ptr [rdi+48h], xmm0 movups xmmword ptr [rdi+58h], xmm0 movups xmmword ptr [rdi+68h], xmm0 mov byte ptr [rdi+78h], 0 mov rdi, r15 mov rsi, rdx call __ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2EOSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>&&) mov [r14+0A0h], bpl lea r13, [r14+0A8h] push 9 pop rsi mov rdi, r13 call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ENS0_6detail7value_tE; 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>::basic_json(nlohmann::json_abi_v3_11_3::detail::value_t) mov [r14+0B8h], r12 push 1 pop rsi mov rdi, rbx call __ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r12, rax mov rdi, r13 call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json() jmp short loc_24085 mov r12, rax loc_24085: lea r13, [r14+8] add r14, 48h ; 'H' mov rdi, r15; this call __ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, r14 call __ZNSt13_Bvector_baseISaIbEED2Ev; std::_Bvector_base<std::allocator<bool>>::~_Bvector_base() mov rdi, rbx call __ZNSt13_Bvector_baseISaIbEED2Ev; std::_Bvector_base<std::allocator<bool>>::~_Bvector_base() mov rdi, r13 call __ZNSt12_Vector_baseIPN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEESaISF_EED2Ev; std::_Vector_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> *,std::allocator<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> *>>::~_Vector_base() mov rdi, r12 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::json_sax_dom_callback_parser( long long a1, long long a2, long long a3, char a4, long long a5) { *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_OWORD *)(a1 + 24) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 56) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 104) = 0LL; *(_BYTE *)(a1 + 120) = 0; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function( a1 + 128, a3); *(_BYTE *)(a1 + 160) = a4; 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>::basic_json( a1 + 168, 9LL); *(_QWORD *)(a1 + 184) = a5; return std::vector<bool>::push_back(a1 + 32, 1LL); }
json_sax_dom_callback_parser: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,R8 MOV EBP,ECX MOV R14,RDI MOV qword ptr [RDI],RSI LEA RBX,[RDI + 0x20] LEA R15,[RDI + 0x80] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOVUPS xmmword ptr [RDI + 0x38],XMM0 MOVUPS xmmword ptr [RDI + 0x48],XMM0 MOVUPS xmmword ptr [RDI + 0x58],XMM0 MOVUPS xmmword ptr [RDI + 0x68],XMM0 MOV byte ptr [RDI + 0x78],0x0 MOV RDI,R15 MOV RSI,RDX CALL 0x0011de20 MOV byte ptr [R14 + 0xa0],BPL LEA R13,[R14 + 0xa8] LAB_00124049: PUSH 0x9 POP RSI MOV RDI,R13 CALL 0x0011cad0 MOV qword ptr [R14 + 0xb8],R12 LAB_0012405b: PUSH 0x1 POP RSI MOV RDI,RBX CALL 0x0011d4d0 LAB_00124066: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::json_sax_dom_callback_parser(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>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >*) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::json_sax_dom_callback_parser (json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this,int8 param_1,function *param_3, json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> param_4,int8 param_5) { *(int8 *)this = param_1; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; this[0x78] = (json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)> ::function((function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)> *)(this + 0x80),param_3); this[0xa0] = param_4; /* try { // try from 00124049 to 00124053 has its CatchHandler @ 00124082 */ 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> ::basic_json(this + 0xa8,9); *(int8 *)(this + 0xb8) = param_5; /* try { // try from 0012405b to 00124065 has its CatchHandler @ 00124075 */ std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),true); return; }
30,961
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::json_sax_dom_callback_parser(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>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*)
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp
json_sax_dom_callback_parser(BasicJsonType& r, parser_callback_t cb, const bool allow_exceptions_ = true, lexer_t* lexer_ = nullptr) : root(r), callback(std::move(cb)), allow_exceptions(allow_exceptions_), m_lexer_ref(lexer_) { keep_stack.push_back(true); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::json_sax_dom_callback_parser(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>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbp movq %rdi, %rbx movq %rsi, (%rdi) leaq 0x20(%rdi), %r14 leaq 0x80(%rdi), %rsi xorps %xmm0, %xmm0 movups %xmm0, 0x80(%rdi) movq $0x0, 0x90(%rdi) movups %xmm0, 0x8(%rdi) movups %xmm0, 0x18(%rdi) movups %xmm0, 0x28(%rdi) movups %xmm0, 0x38(%rdi) movups %xmm0, 0x48(%rdi) movups %xmm0, 0x58(%rdi) movups %xmm0, 0x68(%rdi) movb $0x0, 0x78(%rdi) movq 0x18(%rdx), %rax movq %rax, 0x98(%rdi) cmpq $0x0, 0x10(%rdx) je 0x18e6c leaq 0x10(%rdx), %rax movups (%rdx), %xmm1 movups %xmm1, (%rsi) movq 0x10(%rdx), %rdx movq %rdx, 0x90(%rbx) movups %xmm0, (%rax) movq %rsi, (%rsp) leaq 0x8(%rbx), %r13 leaq 0x48(%rbx), %r12 movb %cl, 0xa0(%rbx) leaq 0xa8(%rbx), %r15 movb $0x9, 0xa8(%rbx) movq $0x0, 0xb0(%rbx) movq %r15, %rdi movl $0x1, %esi callq 0x11430 movq %rbp, 0xb8(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x11bc0 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, %rbp movq %rax, %r12 movq %r15, %rdi xorl %esi, %esi callq 0x11430 movq %r15, %rdi callq 0x11e20 movq 0x90(%rbx), %rax testq %rax, %rax je 0x18ef9 movq (%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbp, %rdi callq 0x11ef0 movq %r14, %rdi callq 0x11ef0 movq %r13, %rdi movq %rbx, %rsi callq 0x123f2 movq %r12, %rdi callq 0x11fe0 jmp 0x18f20 jmp 0x18f20 movq %rax, %rdi callq 0x1532e
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESO_EEbPNS1_5lexerISF_SM_EE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbp, r8 mov rbx, rdi mov [rdi], rsi lea r14, [rdi+20h] lea rsi, [rdi+80h] xorps xmm0, xmm0 movups xmmword ptr [rdi+80h], xmm0 mov qword ptr [rdi+90h], 0 movups xmmword ptr [rdi+8], xmm0 movups xmmword ptr [rdi+18h], xmm0 movups xmmword ptr [rdi+28h], xmm0 movups xmmword ptr [rdi+38h], xmm0 movups xmmword ptr [rdi+48h], xmm0 movups xmmword ptr [rdi+58h], xmm0 movups xmmword ptr [rdi+68h], xmm0 mov byte ptr [rdi+78h], 0 mov rax, [rdx+18h] mov [rdi+98h], rax cmp qword ptr [rdx+10h], 0 jz short loc_18E6C lea rax, [rdx+10h] movups xmm1, xmmword ptr [rdx] movups xmmword ptr [rsi], xmm1 mov rdx, [rdx+10h] mov [rbx+90h], rdx movups xmmword ptr [rax], xmm0 loc_18E6C: mov [rsp+38h+var_38], rsi lea r13, [rbx+8] lea r12, [rbx+48h] mov [rbx+0A0h], cl lea r15, [rbx+0A8h] mov byte ptr [rbx+0A8h], 9 mov qword ptr [rbx+0B0h], 0 mov rdi, r15 mov esi, 1 call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; 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>::assert_invariant(bool) mov [rbx+0B8h], rbp mov rdi, r14 mov esi, 1 call __ZNSt6vectorIbSaIbEE9push_backEb; std::vector<bool>::push_back(bool) add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbp, r12 mov r12, rax mov rdi, r15 xor esi, esi call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; 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>::assert_invariant(bool) mov rdi, r15 call __ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; 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>::data::~data() mov rax, [rbx+90h] test rax, rax jz short loc_18EF9 mov rdi, [rsp+0] mov rsi, rdi mov edx, 3 call rax loc_18EF9: mov rdi, rbp call __ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) mov rdi, r14 call __ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) mov rdi, r13 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2ERSF_St8functionIFbiNS1_13parse_event_tESO_EEbPNS1_5lexerISF_SM_EE_cold_1; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::json_sax_dom_callback_parser(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>&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>,bool,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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>> *) [clone] mov rdi, r12 call __Unwind_Resume jmp short loc_18F20 jmp short $+2 loc_18F20: mov rdi, rax call __clang_call_terminate
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::json_sax_dom_callback_parser( long long a1, long long a2, long long a3, char a4, long long a5) { *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = 0LL; *(_OWORD *)(a1 + 8) = 0LL; *(_OWORD *)(a1 + 24) = 0LL; *(_OWORD *)(a1 + 40) = 0LL; *(_OWORD *)(a1 + 56) = 0LL; *(_OWORD *)(a1 + 72) = 0LL; *(_OWORD *)(a1 + 88) = 0LL; *(_OWORD *)(a1 + 104) = 0LL; *(_BYTE *)(a1 + 120) = 0; *(_QWORD *)(a1 + 152) = *(_QWORD *)(a3 + 24); if ( *(_QWORD *)(a3 + 16) ) { *(_OWORD *)(a1 + 128) = *(_OWORD *)a3; *(_QWORD *)(a1 + 144) = *(_QWORD *)(a3 + 16); *(_OWORD *)(a3 + 16) = 0LL; } *(_BYTE *)(a1 + 160) = a4; *(_BYTE *)(a1 + 168) = 9; *(_QWORD *)(a1 + 176) = 0LL; 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>::assert_invariant( a1 + 168, 1LL); *(_QWORD *)(a1 + 184) = a5; return std::vector<bool>::push_back(a1 + 32, 1LL); }
json_sax_dom_callback_parser: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBP,R8 MOV RBX,RDI MOV qword ptr [RDI],RSI LEA R14,[RDI + 0x20] LEA RSI,[RDI + 0x80] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x80],XMM0 MOV qword ptr [RDI + 0x90],0x0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOVUPS xmmword ptr [RDI + 0x38],XMM0 MOVUPS xmmword ptr [RDI + 0x48],XMM0 MOVUPS xmmword ptr [RDI + 0x58],XMM0 MOVUPS xmmword ptr [RDI + 0x68],XMM0 MOV byte ptr [RDI + 0x78],0x0 MOV RAX,qword ptr [RDX + 0x18] MOV qword ptr [RDI + 0x98],RAX CMP qword ptr [RDX + 0x10],0x0 JZ 0x00118e6c LEA RAX,[RDX + 0x10] MOVUPS XMM1,xmmword ptr [RDX] MOVUPS xmmword ptr [RSI],XMM1 MOV RDX,qword ptr [RDX + 0x10] MOV qword ptr [RBX + 0x90],RDX MOVUPS xmmword ptr [RAX],XMM0 LAB_00118e6c: MOV qword ptr [RSP],RSI LEA R13,[RBX + 0x8] LEA R12,[RBX + 0x48] MOV byte ptr [RBX + 0xa0],CL LEA R15,[RBX + 0xa8] MOV byte ptr [RBX + 0xa8],0x9 MOV qword ptr [RBX + 0xb0],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00111430 MOV qword ptr [RBX + 0xb8],RBP LAB_00118eab: MOV RDI,R14 MOV ESI,0x1 CALL 0x00111bc0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::json_sax_dom_callback_parser(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>&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >*) */ void __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::json_sax_dom_callback_parser (json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this,int8 param_1,int8 *param_3, json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> param_4,int8 param_5) { int8 uVar1; *(int8 *)this = param_1; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(int8 *)(this + 0x90) = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; this[0x78] = (json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x0; *(int8 *)(this + 0x98) = param_3[3]; if (param_3[2] != 0) { uVar1 = param_3[1]; *(int8 *)(this + 0x80) = *param_3; *(int8 *)(this + 0x88) = uVar1; *(int8 *)(this + 0x90) = param_3[2]; param_3[2] = 0; param_3[3] = 0; } this[0xa0] = param_4; this[0xa8] = (json_sax_dom_callback_parser<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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x9; *(int8 *)(this + 0xb0) = 0; 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> ::assert_invariant((bool)((char)this + -0x58)); *(int8 *)(this + 0xb8) = param_5; /* try { // try from 00118eab to 00118eb7 has its CatchHandler @ 00118ec7 */ std::vector<bool,std::allocator<bool>>::push_back ((vector<bool,std::allocator<bool>> *)(this + 0x20),true); return; }
30,962
ma_ft_cmp
eloqsql/storage/maria/ma_ft_update.c
int _ma_ft_cmp(MARIA_HA *info, uint keynr, const uchar *rec1, const uchar *rec2) { FT_SEG_ITERATOR ftsi1, ftsi2; CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; DBUG_ENTER("_ma_ft_cmp"); _ma_ft_segiterator_init(info, keynr, rec1, &ftsi1); _ma_ft_segiterator_init(info, keynr, rec2, &ftsi2); while (_ma_ft_segiterator(&ftsi1) && _ma_ft_segiterator(&ftsi2)) { if ((ftsi1.pos != ftsi2.pos) && (!ftsi1.pos || !ftsi2.pos || ha_compare_text(cs, ftsi1.pos,ftsi1.len, ftsi2.pos,ftsi2.len,0))) DBUG_RETURN(THOSE_TWO_DAMN_KEYS_ARE_REALLY_DIFFERENT); } DBUG_RETURN(GEE_THEY_ARE_ABSOLUTELY_IDENTICAL); }
O0
c
ma_ft_cmp: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movq 0xc0(%rax), %rax movq (%rax), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx leaq -0x48(%rbp), %rcx callq 0x8ba60 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x28(%rbp), %rdx leaq -0x68(%rbp), %rcx callq 0x8ba60 leaq -0x48(%rbp), %rdi callq 0x8bb30 movl %eax, %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x71(%rbp) je 0x8bf22 leaq -0x68(%rbp), %rdi callq 0x8bb30 cmpl $0x0, %eax setne %al movb %al, -0x71(%rbp) movb -0x71(%rbp), %al testb $0x1, %al jne 0x8bf2b jmp 0x8bf74 movq -0x30(%rbp), %rax cmpq -0x50(%rbp), %rax je 0x8bf72 cmpq $0x0, -0x30(%rbp) je 0x8bf67 cmpq $0x0, -0x50(%rbp) je 0x8bf67 movq -0x70(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x44(%rbp), %eax movl %eax, %edx movq -0x50(%rbp), %rcx movl -0x64(%rbp), %eax movl %eax, %r8d xorl %r9d, %r9d callq 0xefa80 cmpl $0x0, %eax je 0x8bf72 jmp 0x8bf69 movl $0x1, -0x4(%rbp) jmp 0x8bf7d jmp 0x8befb jmp 0x8bf76 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopl (%rax)
_ma_ft_cmp: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_14] imul rcx, 118h add rax, rcx mov rax, [rax+0C0h] mov rax, [rax] mov [rbp+var_70], rax mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] lea rcx, [rbp+var_48] call _ma_ft_segiterator_init mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_28] lea rcx, [rbp+var_68] call _ma_ft_segiterator_init loc_8BEFB: lea rdi, [rbp+var_48] call _ma_ft_segiterator mov ecx, eax xor eax, eax cmp ecx, 0 mov [rbp+var_71], al jz short loc_8BF22 lea rdi, [rbp+var_68] call _ma_ft_segiterator cmp eax, 0 setnz al mov [rbp+var_71], al loc_8BF22: mov al, [rbp+var_71] test al, 1 jnz short loc_8BF2B jmp short loc_8BF74 loc_8BF2B: mov rax, [rbp+var_30] cmp rax, [rbp+var_50] jz short loc_8BF72 cmp [rbp+var_30], 0 jz short loc_8BF67 cmp [rbp+var_50], 0 jz short loc_8BF67 mov rdi, [rbp+var_70] mov rsi, [rbp+var_30] mov eax, [rbp+var_44] mov edx, eax mov rcx, [rbp+var_50] mov eax, [rbp+var_64] mov r8d, eax xor r9d, r9d call ha_compare_text cmp eax, 0 jz short loc_8BF72 loc_8BF67: jmp short $+2 loc_8BF69: mov [rbp+var_4], 1 jmp short loc_8BF7D loc_8BF72: jmp short loc_8BEFB loc_8BF74: jmp short $+2 loc_8BF76: mov [rbp+var_4], 0 loc_8BF7D: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long ma_ft_cmp(long long a1, unsigned int a2, long long a3, long long a4) { bool v5; // [rsp+Fh] [rbp-71h] long long v6; // [rsp+10h] [rbp-70h] _BYTE v7[4]; // [rsp+18h] [rbp-68h] BYREF unsigned int v8; // [rsp+1Ch] [rbp-64h] long long v9; // [rsp+30h] [rbp-50h] _BYTE v10[4]; // [rsp+38h] [rbp-48h] BYREF unsigned int v11; // [rsp+3Ch] [rbp-44h] long long v12; // [rsp+50h] [rbp-30h] long long v13; // [rsp+58h] [rbp-28h] long long v14; // [rsp+60h] [rbp-20h] unsigned int v15; // [rsp+6Ch] [rbp-14h] long long v16; // [rsp+70h] [rbp-10h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v6 = **(_QWORD **)(280LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL) + 192); ma_ft_segiterator_init(a1, a2, a3, (long long)v10); ma_ft_segiterator_init(v16, v15, v13, (long long)v7); while ( 1 ) { v5 = 0; if ( (unsigned int)ma_ft_segiterator((long long)v10) ) v5 = (unsigned int)ma_ft_segiterator((long long)v7) != 0; if ( !v5 ) break; if ( v12 != v9 && (!v12 || !v9 || (unsigned int)ha_compare_text(v6, v12, v11, v9, v8, 0LL)) ) return 1; } return 0; }
_ma_ft_cmp: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x48] CALL 0x0018ba60 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x28] LEA RCX,[RBP + -0x68] CALL 0x0018ba60 LAB_0018befb: LEA RDI,[RBP + -0x48] CALL 0x0018bb30 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x71],AL JZ 0x0018bf22 LEA RDI,[RBP + -0x68] CALL 0x0018bb30 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x71],AL LAB_0018bf22: MOV AL,byte ptr [RBP + -0x71] TEST AL,0x1 JNZ 0x0018bf2b JMP 0x0018bf74 LAB_0018bf2b: MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x50] JZ 0x0018bf72 CMP qword ptr [RBP + -0x30],0x0 JZ 0x0018bf67 CMP qword ptr [RBP + -0x50],0x0 JZ 0x0018bf67 MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x44] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RBP + -0x64] MOV R8D,EAX XOR R9D,R9D CALL 0x001efa80 CMP EAX,0x0 JZ 0x0018bf72 LAB_0018bf67: JMP 0x0018bf69 LAB_0018bf69: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0018bf7d LAB_0018bf72: JMP 0x0018befb LAB_0018bf74: JMP 0x0018bf76 LAB_0018bf76: MOV dword ptr [RBP + -0x4],0x0 LAB_0018bf7d: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 _ma_ft_cmp(long *param_1,uint param_2,int8 param_3,int8 param_4) { int8 uVar1; int iVar2; bool bVar3; int1 local_70 [4]; int4 local_6c; long local_58; int1 local_50 [4]; int4 local_4c; long local_38; int8 local_30; int8 local_28; uint local_1c; long *local_18; uVar1 = **(int8 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xc0); local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; _ma_ft_segiterator_init(param_1,param_2,param_3,local_50); _ma_ft_segiterator_init(local_18,local_1c,local_30,local_70); while( true ) { iVar2 = _ma_ft_segiterator(local_50); bVar3 = false; if (iVar2 != 0) { iVar2 = _ma_ft_segiterator(local_70); bVar3 = iVar2 != 0; } if (!bVar3) break; if ((local_38 != local_58) && (((local_38 == 0 || (local_58 == 0)) || (iVar2 = ha_compare_text(uVar1,local_38,local_4c,local_58,local_6c,0), iVar2 != 0)))) { return 1; } } return 0; }
30,963
ftxui::ComponentBase::Add(std::shared_ptr<ftxui::ComponentBase>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/component/component.cpp
void ComponentBase::Add(Component child) { child->Detach(); child->parent_ = this; children_.push_back(std::move(child)); }
O2
cpp
ftxui::ComponentBase::Add(std::shared_ptr<ftxui::ComponentBase>): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 movq (%rsi), %rdi callq 0x21b16 movq (%rbx), %rax movq %r14, 0x20(%rax) addq $0x8, %r14 movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x21e38 nop
_ZN5ftxui13ComponentBase3AddESt10shared_ptrIS0_E: push r14 push rbx push rax mov rbx, rsi mov r14, rdi mov rdi, [rsi]; this call _ZN5ftxui13ComponentBase6DetachEv; ftxui::ComponentBase::Detach(void) mov rax, [rbx] mov [rax+20h], r14 add r14, 8 mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp _ZNSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<ftxui::ComponentBase>>::emplace_back<std::shared_ptr<ftxui::ComponentBase>>(std::shared_ptr<ftxui::ComponentBase> &&)
long long ftxui::ComponentBase::Add(long long a1, ftxui::ComponentBase **a2) { ftxui::ComponentBase::Detach(*a2); *((_QWORD *)*a2 + 4) = a1; return std::vector<std::shared_ptr<ftxui::ComponentBase>>::emplace_back<std::shared_ptr<ftxui::ComponentBase>>( a1 + 8, a2); }
Add: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI MOV RDI,qword ptr [RSI] CALL 0x00121b16 MOV RAX,qword ptr [RBX] MOV qword ptr [RAX + 0x20],R14 ADD R14,0x8 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00121e38
/* ftxui::ComponentBase::Add(std::shared_ptr<ftxui::ComponentBase>) */ void __thiscall ftxui::ComponentBase::Add(ComponentBase *this,shared_ptr *param_2) { Detach(*(ComponentBase **)param_2); *(ComponentBase **)(*(long *)param_2 + 0x20) = this; std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::emplace_back<std::shared_ptr<ftxui::ComponentBase>> ((vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)(this + 8),param_2); return; }
30,964
fmt::v10::appender fmt::v10::detail::write_escaped_string<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
auto write_escaped_string(OutputIt out, basic_string_view<Char> str) -> OutputIt { *out++ = static_cast<Char>('"'); auto begin = str.begin(), end = str.end(); do { auto escape = find_escape(begin, end); out = copy_str<Char>(begin, escape.begin, out); begin = escape.end; if (!begin) break; out = write_escaped_cp<OutputIt, Char>(out, escape); } while (begin != end); *out++ = static_cast<Char>('"'); return out; }
O3
c
fmt::v10::appender fmt::v10::detail::write_escaped_string<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq 0x10(%rdi), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rdi) jae 0x4e008 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb $0x22, (%rcx,%rax) addq %r15, %r14 movq %rsp, %r12 movq %r14, (%rsp) movq $0x0, 0x8(%rsp) movl $0x0, 0x10(%rsp) movq %r14, %rsi subq %r15, %rsi movq %r15, %rdi movq %r12, %rdx callq 0x4da01 movq (%rsp), %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x2fac6 movq 0x8(%rsp), %r15 testq %r15, %r15 je 0x4e06c movq %rbx, %rdi movq %r12, %rsi callq 0x43c11 movq %rax, %rbx cmpq %r14, %r15 jne 0x4e01a movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x4e08a movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb $0x22, (%rcx,%rax) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN3fmt3v106detail20write_escaped_stringIcNS0_8appenderEEET0_S4_NS0_17basic_string_viewIT_EE: push r15 push r14 push r12 push rbx sub rsp, 18h mov r14, rdx mov r15, rsi mov rbx, rdi mov rax, [rdi+10h] lea rsi, [rax+1] cmp [rdi+18h], rsi jnb short loc_4E008 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_4E008: mov rcx, [rbx+8] mov [rbx+10h], rsi mov byte ptr [rcx+rax], 22h ; '"' add r14, r15 mov r12, rsp loc_4E01A: mov [rsp+38h+var_38], r14 mov [rsp+38h+var_30], 0 mov [rsp+38h+var_28], 0 mov rsi, r14 sub rsi, r15 mov rdi, r15 mov rdx, r12 call _ZN3fmt3v106detail18for_each_codepointIZNS1_11find_escapeEPKcS4_EUljNS0_17basic_string_viewIcEEE_EEvS6_T_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*,char const*)::{lambda(uint,fmt::v10::basic_string_view<char>)#1}>(fmt::v10::basic_string_view<char>,fmt::v10::detail::find_escape(char const*,char const*)::{lambda(uint,fmt::v10::basic_string_view<char>)#1}) mov rdx, [rsp+38h+var_38] mov rdi, rbx mov rsi, r15 call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*) mov r15, [rsp+38h+var_30] test r15, r15 jz short loc_4E06C mov rdi, rbx mov rsi, r12 call _ZN3fmt3v106detail16write_escaped_cpINS0_8appenderEcEET_S4_RKNS1_18find_escape_resultIT0_EE; fmt::v10::detail::write_escaped_cp<fmt::v10::appender,char>(fmt::v10::appender,fmt::v10::detail::find_escape_result<char> const&) mov rbx, rax cmp r15, r14 jnz short loc_4E01A loc_4E06C: mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_4E08A mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_4E08A: mov rcx, [rbx+8] mov [rbx+10h], rsi mov byte ptr [rcx+rax], 22h ; '"' mov rax, rbx add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long fmt::v10::detail::write_escaped_string<char,fmt::v10::appender>( long long a1, unsigned long long a2, long long a3) { long long v5; // rbx long long v6; // rax long long v7; // rsi long long v8; // rcx unsigned __int8 *v9; // r14 long long v10; // rax long long v11; // rsi long long v12; // rcx unsigned __int8 *v14; // [rsp+0h] [rbp-38h] BYREF unsigned long long v15; // [rsp+8h] [rbp-30h] int v16; // [rsp+10h] [rbp-28h] v5 = a1; v6 = *(_QWORD *)(a1 + 16); v7 = v6 + 1; if ( *(_QWORD *)(a1 + 24) < (unsigned long long)(v6 + 1) ) { (**(void ( ***)(long long))a1)(a1); v6 = *(_QWORD *)(a1 + 16); v7 = v6 + 1; } v8 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 16) = v7; *(_BYTE *)(v8 + v6) = 34; v9 = (unsigned __int8 *)(a2 + a3); do { v14 = v9; v15 = 0LL; v16 = 0; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::find_escape(char const*,char const*)::{lambda(unsigned int,fmt::v10::basic_string_view<char>)#1}>( a2, (unsigned long long)&v9[-a2], (long long)&v14); fmt::v10::detail::buffer<char>::append<char>(v5, a2, (long long)v14); a2 = v15; if ( !v15 ) break; v5 = fmt::v10::detail::write_escaped_cp<fmt::v10::appender,char>(v5, &v14); } while ( (unsigned __int8 *)a2 != v9 ); v10 = *(_QWORD *)(v5 + 16); v11 = v10 + 1; if ( *(_QWORD *)(v5 + 24) < (unsigned long long)(v10 + 1) ) { (**(void ( ***)(long long))v5)(v5); v10 = *(_QWORD *)(v5 + 16); v11 = v10 + 1; } v12 = *(_QWORD *)(v5 + 8); *(_QWORD *)(v5 + 16) = v11; *(_BYTE *)(v12 + v10) = 34; return v5; }
write_escaped_string<char,fmt::v10::appender>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RDI + 0x18],RSI JNC 0x0014e008 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_0014e008: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x22 ADD R14,R15 MOV R12,RSP LAB_0014e01a: MOV qword ptr [RSP],R14 MOV qword ptr [RSP + 0x8],0x0 MOV dword ptr [RSP + 0x10],0x0 MOV RSI,R14 SUB RSI,R15 MOV RDI,R15 MOV RDX,R12 CALL 0x0014da01 MOV RDX,qword ptr [RSP] MOV RDI,RBX MOV RSI,R15 CALL 0x0012fac6 MOV R15,qword ptr [RSP + 0x8] TEST R15,R15 JZ 0x0014e06c MOV RDI,RBX MOV RSI,R12 CALL 0x00143c11 MOV RBX,RAX CMP R15,R14 JNZ 0x0014e01a LAB_0014e06c: MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x0014e08a MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_0014e08a: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x22 MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
/* fmt::v10::appender fmt::v10::detail::write_escaped_string<char, fmt::v10::appender>(fmt::v10::appender, fmt::v10::basic_string_view<char>) */ buffer<char> * __thiscall fmt::v10::detail::write_escaped_string<char,fmt::v10::appender> (detail *this,detail *param_2,long param_3) { long lVar1; ulong uVar2; detail *pdVar3; detail *local_38; detail *local_30; int4 local_28; lVar1 = *(long *)(this + 0x10); uVar2 = lVar1 + 1; if (*(ulong *)(this + 0x18) < uVar2) { (*(code *)**(int8 **)this)(this); lVar1 = *(long *)(this + 0x10); uVar2 = lVar1 + 1; } *(ulong *)(this + 0x10) = uVar2; *(int1 *)(*(long *)(this + 8) + lVar1) = 0x22; pdVar3 = param_2 + param_3; do { local_30 = (detail *)0x0; local_28 = 0; local_38 = pdVar3; for_each_codepoint<fmt::v10::detail::find_escape(char_const*,char_const*)::_lambda(unsigned_int,fmt::v10::basic_string_view<char>)_1_> (param_2,(long)pdVar3 - (long)param_2,&local_38); buffer<char>::append<char>((buffer<char> *)this,(char *)param_2,(char *)local_38); param_2 = local_30; if (local_30 == (detail *)0x0) break; this = (detail *)write_escaped_cp<fmt::v10::appender,char>(this,&local_38); } while (param_2 != pdVar3); lVar1 = *(long *)((buffer<char> *)this + 0x10); uVar2 = lVar1 + 1; if (*(ulong *)((buffer<char> *)this + 0x18) < uVar2) { (*(code *)**(int8 **)this)(this); lVar1 = *(long *)((buffer<char> *)this + 0x10); uVar2 = lVar1 + 1; } *(ulong *)((buffer<char> *)this + 0x10) = uVar2; *(int1 *)(*(long *)((buffer<char> *)this + 8) + lVar1) = 0x22; return (buffer<char> *)this; }
30,965
string_from[abi:cxx11](bool)
monkey531[P]llama/common/common.cpp
std::string string_from(bool value) { return value ? "true" : "false"; }
O1
cpp
string_from[abi:cxx11](bool): pushq %rbx movq %rdi, %rbx leaq 0x78d7f(%rip), %rcx # 0xea9da leaq 0x7ba61(%rip), %rax # 0xed6c3 testl %esi, %esi cmovneq %rcx, %rax leaq 0x10(%rdi), %rcx movq %rcx, (%rdi) movl %esi, %edx xorq $0x5, %rdx addq %rax, %rdx movq %rax, %rsi callq 0x21d38 movq %rbx, %rax popq %rbx retq
_Z11string_fromB5cxx11b: push rbx mov rbx, rdi lea rcx, aTrue; "true" lea rax, aAdvancedOption+0ABh; "false" test esi, esi cmovnz rax, rcx lea rcx, [rdi+10h] mov [rdi], rcx mov edx, esi xor rdx, 5 add rdx, rax mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx pop rbx retn
_QWORD * string_from[abi:cxx11](_QWORD *a1, unsigned int a2) { char *v2; // rax v2 = "false"; if ( a2 ) v2 = "true"; *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, v2, (long long)&v2[a2 ^ 5LL]); return a1; }
30,966
string_from[abi:cxx11](bool)
monkey531[P]llama/common/common.cpp
std::string string_from(bool value) { return value ? "true" : "false"; }
O2
cpp
string_from[abi:cxx11](bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2a8, %rsp # imm = 0x2A8 leaq 0x58(%rsp), %rax movq %rax, -0x30(%rax) movq $0x1, -0x28(%rax) xorps %xmm0, %xmm0 movups %xmm0, -0x20(%rax) movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000 movups %xmm0, -0x8(%rax) xorl %esi, %esi leaq 0x60(%rsp), %r14 leaq 0x80(%rsp), %r12 leaq 0x8(%rsp), %rbp leaq 0xa0(%rsp), %rbx pushq $0x8 popq %r15 xorl %r13d, %r13d incl %r13d je 0x534c3 movq %r14, %rdi callq 0x58a6a movq %r12, %rdi leaq 0x6147e(%rip), %rsi # 0xb4890 movq %r14, %rdx callq 0x58a46 movq %rbp, %rdi movq %r12, %rsi leaq 0x61485(%rip), %rdx # 0xb48ac callq 0x38598 movq %rbx, %rdi movq %rbp, %rsi movl %r15d, %edx callq 0x24e00 movq %rbp, %rdi callq 0x251b8 movq %r12, %rdi callq 0x251b8 movq %r14, %rdi callq 0x251b8 leaq 0x118(%rsp), %rdi callq 0x241e0 testb %al, %al je 0x534b6 leaq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) andq $0x0, 0x10(%rsp) movb $0x0, 0x18(%rsp) movq %rbx, %rdi movq %rbp, %rsi callq 0x24140 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x5349e leaq 0x28(%rsp), %rdi movq %rbp, %rsi callq 0x89112 movq %rbp, %rdi callq 0x251b8 movq %rbx, %rdi callq 0x24220 movl %r13d, %esi jmp 0x533f7 leaq 0xa0(%rsp), %rdi callq 0x24220 movq 0x40(%rsp), %rbx testq %rbx, %rbx jne 0x534e4 callq 0x24bc0 cmpl $0x5, %eax setae %cl movl %eax, %edx shrl %cl, %edx testl %eax, %eax pushq $0x4 popq %rbx cmovnel %edx, %ebx leaq 0x28(%rsp), %rdi callq 0x5c934 movl %ebx, %eax addq $0x2a8, %rsp # imm = 0x2A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x53551 movq %rax, %rbx jmp 0x5351e movq %rax, %rbx jmp 0x5352b movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x251b8 leaq 0x80(%rsp), %rdi callq 0x251b8 leaq 0x60(%rsp), %rdi callq 0x251b8 jmp 0x53551 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x251b8 leaq 0xa0(%rsp), %rdi callq 0x24220 leaq 0x28(%rsp), %rdi callq 0x5c934 movq %rbx, %rdi callq 0x24f60
_Z26cpu_get_num_physical_coresv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2A8h lea rax, [rsp+2D8h+var_280] mov [rax-30h], rax mov qword ptr [rax-28h], 1 xorps xmm0, xmm0 movups xmmword ptr [rax-20h], xmm0 mov dword ptr [rax-10h], 3F800000h movups xmmword ptr [rax-8], xmm0 xor esi, esi; unsigned int lea r14, [rsp+2D8h+var_278] lea r12, [rsp+2D8h+var_258] lea rbp, [rsp+2D8h+var_2D0] lea rbx, [rsp+2D8h+var_238] push 8 pop r15 xor r13d, r13d loc_533F7: inc r13d jz loc_534C3 mov rdi, r14; this call _ZNSt7__cxx119to_stringEj; std::to_string(uint) mov rdi, r12 lea rsi, aSysDevicesSyst; "/sys/devices/system/cpu/cpu" mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov rdi, rbp mov rsi, r12 lea rdx, aTopologyThread; "/topology/thread_siblings" call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov rdi, rbx mov rsi, rbp mov edx, r15d call __ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ifstream::basic_ifstream(std::string const&,std::_Ios_Openmode) mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2D8h+var_1C0] call __ZNKSt12__basic_fileIcE7is_openEv; std::__basic_file<char>::is_open(void) test al, al jz short loc_534B6 lea rax, [rsp+2D8h+var_2C0] mov [rsp+2D8h+var_2D0], rax and [rsp+2D8h+var_2C8], 0 mov [rsp+2D8h+var_2C0], 0 mov rdi, rbx mov rsi, rbp call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_5349E lea rdi, [rsp+2D8h+var_2B0] mov rsi, rbp call _ZNSt8__detail12_Insert_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_SaIS6_ENS_9_IdentityESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb1ELb1EEEE6insertERKS6_; std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert(std::string const&) loc_5349E: mov rdi, rbp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() mov esi, r13d jmp loc_533F7 loc_534B6: lea rdi, [rsp+2D8h+var_238]; this call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() loc_534C3: mov rbx, [rsp+2D8h+var_298] test rbx, rbx jnz short loc_534E4 call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) cmp eax, 5 setnb cl mov edx, eax shr edx, cl test eax, eax push 4 pop rbx cmovnz ebx, edx loc_534E4: lea rdi, [rsp+2D8h+var_2B0] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov eax, ebx add rsp, 2A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_53551 mov rbx, rax jmp short loc_5351E mov rbx, rax jmp short loc_5352B mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_5351E: lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_5352B: lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_53551 mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+arg_98] call __ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev; std::ifstream::~ifstream() loc_53551: lea rdi, [rsp+arg_20] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov rdi, rbx call __Unwind_Resume
long long cpu_get_num_physical_cores(std::thread *a1) { unsigned long long v1; // rsi unsigned int i; // r13d _QWORD *v3; // rax unsigned int v4; // ebx unsigned int v5; // eax _QWORD v7[2]; // [rsp+8h] [rbp-2D0h] BYREF char v8; // [rsp+18h] [rbp-2C0h] BYREF _QWORD v9[2]; // [rsp+28h] [rbp-2B0h] BYREF __int128 v10; // [rsp+38h] [rbp-2A0h] int v11; // [rsp+48h] [rbp-290h] __int128 v12; // [rsp+50h] [rbp-288h] BYREF _BYTE v13[32]; // [rsp+60h] [rbp-278h] BYREF _BYTE v14[32]; // [rsp+80h] [rbp-258h] BYREF _BYTE v15[120]; // [rsp+A0h] [rbp-238h] BYREF _BYTE v16[448]; // [rsp+118h] [rbp-1C0h] BYREF v9[0] = (char *)&v12 + 8; v9[1] = 1LL; v10 = 0LL; v11 = 1065353216; v12 = 0LL; v1 = 0LL; for ( i = 0; ++i; v1 = i ) { std::to_string((std::__cxx11 *)v13, v1); std::operator+<char>(v14, "/sys/devices/system/cpu/cpu", v13); std::operator+<char>((long long)v7, (long long)v14, (long long)"/topology/thread_siblings"); v1 = (unsigned long long)v7; std::ifstream::basic_ifstream(v15, v7, 8LL); std::string::~string(v7); std::string::~string(v14); std::string::~string(v13); if ( !(unsigned __int8)std::__basic_file<char>::is_open(v16) ) { a1 = (std::thread *)v15; std::ifstream::~ifstream(v15); break; } v7[0] = &v8; v7[1] = 0LL; v8 = 0; v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v15, v7); if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) == 0 ) std::__detail::_Insert_base<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::insert( v9, v7); std::string::~string(v7); a1 = (std::thread *)v15; std::ifstream::~ifstream(v15); } v4 = DWORD2(v10); if ( !*((_QWORD *)&v10 + 1) ) { v5 = std::thread::hardware_concurrency(a1); v4 = 4; if ( v5 ) v4 = v5 >> (v5 >= 5); } std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable( v9, v1); return v4; }
cpu_get_num_physical_cores: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2a8 LEA RAX,[RSP + 0x58] MOV qword ptr [RAX + -0x30],RAX MOV qword ptr [RAX + -0x28],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + -0x20],XMM0 MOV dword ptr [RAX + -0x10],0x3f800000 MOVUPS xmmword ptr [RAX + -0x8],XMM0 XOR ESI,ESI LEA R14,[RSP + 0x60] LEA R12,[RSP + 0x80] LEA RBP,[RSP + 0x8] LEA RBX,[RSP + 0xa0] PUSH 0x8 POP R15 XOR R13D,R13D LAB_001533f7: INC R13D JZ 0x001534c3 LAB_00153400: MOV RDI,R14 CALL 0x00158a6a LAB_00153408: MOV RDI,R12 LEA RSI,[0x1b4890] MOV RDX,R14 CALL 0x00158a46 LAB_0015341a: MOV RDI,RBP MOV RSI,R12 LEA RDX,[0x1b48ac] CALL 0x00138598 LAB_0015342c: MOV RDI,RBX MOV RSI,RBP MOV EDX,R15D CALL 0x00124e00 MOV RDI,RBP CALL 0x001251b8 MOV RDI,R12 CALL 0x001251b8 MOV RDI,R14 CALL 0x001251b8 LEA RDI,[RSP + 0x118] CALL 0x001241e0 TEST AL,AL JZ 0x001534b6 LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX AND qword ptr [RSP + 0x10],0x0 MOV byte ptr [RSP + 0x18],0x0 LAB_00153478: MOV RDI,RBX MOV RSI,RBP CALL 0x00124140 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x0015349e LEA RDI,[RSP + 0x28] MOV RSI,RBP CALL 0x00189112 LAB_0015349e: MOV RDI,RBP CALL 0x001251b8 MOV RDI,RBX CALL 0x00124220 MOV ESI,R13D JMP 0x001533f7 LAB_001534b6: LEA RDI,[RSP + 0xa0] CALL 0x00124220 LAB_001534c3: MOV RBX,qword ptr [RSP + 0x40] TEST RBX,RBX JNZ 0x001534e4 CALL 0x00124bc0 CMP EAX,0x5 SETNC CL MOV EDX,EAX SHR EDX,CL TEST EAX,EAX PUSH 0x4 POP RBX CMOVNZ EBX,EDX LAB_001534e4: LEA RDI,[RSP + 0x28] CALL 0x0015c934 MOV EAX,EBX ADD RSP,0x2a8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cpu_get_num_physical_cores() */ ulong cpu_get_num_physical_cores(void) { char cVar1; uint uVar2; istream *piVar3; ulong uVar4; int1 *local_2d0; int8 local_2c8; int1 local_2c0 [16]; int8 *local_2b0; int8 local_2a8; int8 local_2a0; ulong uStack_298; int4 local_290; int8 local_288; int8 uStack_280; __cxx11 local_278 [32]; string local_258 [32]; istream local_238 [520]; local_2b0 = &uStack_280; local_2a8 = 1; local_2a0 = 0; uStack_298 = 0; local_290 = 0x3f800000; local_288 = 0; uStack_280 = 0; uVar2 = 0; do { if (uVar2 + 1 == 0) { LAB_001534c3: uVar4 = uStack_298; if (uStack_298 == 0) { uVar2 = std::thread::hardware_concurrency(); uVar4 = 4; if (uVar2 != 0) { uVar4 = (ulong)(uVar2 >> (4 < uVar2)); } } std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)&local_2b0); return uVar4 & 0xffffffff; } /* try { // try from 00153400 to 00153407 has its CatchHandler @ 00153502 */ std::__cxx11::to_string(local_278,uVar2); /* try { // try from 00153408 to 00153419 has its CatchHandler @ 0015350c */ std::operator+((char *)local_258,(string *)"/sys/devices/system/cpu/cpu"); /* try { // try from 0015341a to 0015342b has its CatchHandler @ 00153507 */ std::operator+((string *)&local_2d0,(char *)local_258); /* try { // try from 0015342c to 00153439 has its CatchHandler @ 00153511 */ std::ifstream::ifstream((ifstream *)local_238,(string *)&local_2d0,8); std::__cxx11::string::~string((string *)&local_2d0); std::__cxx11::string::~string(local_258); std::__cxx11::string::~string((string *)local_278); cVar1 = std::__basic_file<char>::is_open(); if (cVar1 == '\0') { std::ifstream::~ifstream((ifstream *)local_238); goto LAB_001534c3; } local_2d0 = local_2c0; local_2c8 = 0; local_2c0[0] = 0; /* try { // try from 00153478 to 0015349d has its CatchHandler @ 00153537 */ piVar3 = std::getline<char,std::char_traits<char>,std::allocator<char>> (local_238,(string *)&local_2d0); if (((byte)piVar3[*(long *)(*(long *)piVar3 + -0x18) + 0x20] & 5) == 0) { std::__detail:: _Insert_base<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::insert((string *)&local_2b0); } std::__cxx11::string::~string((string *)&local_2d0); std::ifstream::~ifstream((ifstream *)local_238); uVar2 = uVar2 + 1; } while( true ); }
30,967
write_hook_for_redo
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_redo(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info __attribute__ ((unused)), LSN *lsn, void *hook_arg __attribute__ ((unused))) { /* Users of dummy_transaction_object must keep this TRN clean as it is used by many threads (like those manipulating non-transactional tables). It might be dangerous if one user sets rec_lsn or some other member and it is picked up by another user (like putting this rec_lsn into a page of a non-transactional table); it's safer if all members stay 0. So non-transactional log records (REPAIR, CREATE, RENAME, DROP) should not call this hook; we trust them but verify ;) */ DBUG_ASSERT(trn->trid != 0); /* If the hook stays so simple, it would be faster to pass !trn->rec_lsn ? trn->rec_lsn : some_dummy_lsn to translog_write_record(), like Monty did in his original code, and not have a hook. For now we keep it like this. */ if (trn->rec_lsn == 0) trn->rec_lsn= *lsn; return 0; }
O3
c
write_hook_for_redo: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x90(%rsi) jne 0x4d2ec movq (%rcx), %rax movq %rax, 0x90(%rsi) xorl %eax, %eax popq %rbp retq
write_hook_for_redo: push rbp mov rbp, rsp cmp qword ptr [rsi+90h], 0 jnz short loc_4D2EC mov rax, [rcx] mov [rsi+90h], rax loc_4D2EC: xor eax, eax pop rbp retn
long long write_hook_for_redo(long long a1, long long a2, long long a3, _QWORD *a4) { if ( !*(_QWORD *)(a2 + 144) ) *(_QWORD *)(a2 + 144) = *a4; return 0LL; }
write_hook_for_redo: PUSH RBP MOV RBP,RSP CMP qword ptr [RSI + 0x90],0x0 JNZ 0x0014d2ec MOV RAX,qword ptr [RCX] MOV qword ptr [RSI + 0x90],RAX LAB_0014d2ec: XOR EAX,EAX POP RBP RET
int8 write_hook_for_redo(int8 param_1,long param_2,int8 param_3,int8 *param_4) { if (*(long *)(param_2 + 0x90) == 0) { *(int8 *)(param_2 + 0x90) = *param_4; } return 0; }
30,968
ma_zlib_ctx_init
eloqsql/libmariadb/plugins/compress/c_zlib.c
static ma_compress_ctx *ma_zlib_ctx_init(int compression_level) { ma_compress_ctx *ctx; if (!(ctx = (ma_compress_ctx *)calloc(1, sizeof(ma_compress_ctx)))) return NULL; ctx->compression_level= (compression_level == COMPRESSION_LEVEL_DEFAULT) ? Z_DEFAULT_COMPRESSION : compression_level; return ctx; }
O3
c
ma_zlib_ctx_init: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edi, %ebx movl $0x1, %edi movl $0x20, %esi callq 0x132e0 testq %rax, %rax je 0x322a6 cmpl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmovnel %ebx, %ecx movl %ecx, 0x10(%rax) addq $0x8, %rsp popq %rbx popq %rbp retq
ma_zlib_ctx_init: push rbp mov rbp, rsp push rbx push rax mov ebx, edi mov edi, 1 mov esi, 20h ; ' ' call _calloc test rax, rax jz short loc_322A6 cmp ebx, 7FFFFFFFh mov ecx, 0FFFFFFFFh cmovnz ecx, ebx mov [rax+10h], ecx loc_322A6: add rsp, 8 pop rbx pop rbp retn
long long ma_zlib_ctx_init(int a1) { long long result; // rax int v2; // ecx result = calloc(1LL, 32LL); if ( result ) { v2 = -1; if ( a1 != 0x7FFFFFFF ) v2 = a1; *(_DWORD *)(result + 16) = v2; } return result; }
ma_zlib_ctx_init: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,EDI MOV EDI,0x1 MOV ESI,0x20 CALL 0x001132e0 TEST RAX,RAX JZ 0x001322a6 CMP EBX,0x7fffffff MOV ECX,0xffffffff CMOVNZ ECX,EBX MOV dword ptr [RAX + 0x10],ECX LAB_001322a6: ADD RSP,0x8 POP RBX POP RBP RET
void ma_zlib_ctx_init(int param_1) { void *pvVar1; int iVar2; pvVar1 = calloc(1,0x20); if (pvVar1 != (void *)0x0) { iVar2 = -1; if (param_1 != 0x7fffffff) { iVar2 = param_1; } *(int *)((long)pvVar1 + 0x10) = iVar2; } return; }
30,969
google::protobuf::FileDescriptorTables::FindFieldByLowercaseName(void const*, google::protobuf::stringpiece_internal::StringPiece) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
inline const FieldDescriptor* FileDescriptorTables::FindFieldByLowercaseName( const void* parent, StringPiece lowercase_name) const { internal::call_once( fields_by_lowercase_name_once_, &FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic, this); return FindPtrOrNull( *fields_by_lowercase_name_.load(std::memory_order_acquire), PointerStringPair(parent, lowercase_name)); }
O0
cpp
google::protobuf::FileDescriptorTables::FindFieldByLowercaseName(void const*, google::protobuf::stringpiece_internal::StringPiece) const: subq $0x58, %rsp movq %rdx, 0x48(%rsp) movq %rcx, 0x50(%rsp) movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x40(%rsp), %rax movq %rax, (%rsp) movq %rax, %rdi addq $0x38, %rdi leaq -0x4176f(%rip), %rcx # 0x33630 movq %rcx, 0x30(%rsp) movq %rax, 0x28(%rsp) leaq 0x30(%rsp), %rsi leaq 0x28(%rsp), %rdx callq 0x7fa20 movq (%rsp), %rdi addq $0x40, %rdi movl $0x2, %esi callq 0x329b0 movq %rax, 0x8(%rsp) leaq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0x7fa50 movq 0x8(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x62d70 addq $0x58, %rsp retq nopw (%rax,%rax)
_ZNK6google8protobuf20FileDescriptorTables24FindFieldByLowercaseNameEPKvNS0_20stringpiece_internal11StringPieceE: sub rsp, 58h mov [rsp+58h+var_10], rdx mov [rsp+58h+var_8], rcx mov [rsp+58h+var_18], rdi mov [rsp+58h+var_20], rsi mov rax, [rsp+58h+var_18] mov [rsp+58h+var_58], rax mov rdi, rax add rdi, 38h ; '8' lea rcx, _ZN6google8protobuf20FileDescriptorTables36FieldsByLowercaseNamesLazyInitStaticEPKS1_; google::protobuf::FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic(google::protobuf::FileDescriptorTables const*) mov [rsp+58h+var_28], rcx mov [rsp+58h+var_30], rax lea rsi, [rsp+58h+var_28] lea rdx, [rsp+58h+var_30] call _ZN6google8protobuf8internal9call_onceIJRSt9once_flagPFvPKNS0_20FileDescriptorTablesEES7_EEEvDpOT_; google::protobuf::internal::call_once<std::once_flag &,void (*)(google::protobuf::FileDescriptorTables const*),google::protobuf::FileDescriptorTables const*>(std::once_flag &,void (*)(google::protobuf::FileDescriptorTables const*),google::protobuf::FileDescriptorTables const* &&) mov rdi, [rsp+58h+var_58] add rdi, 40h ; '@' mov esi, 2 call _ZNKSt6atomicIPKSt13unordered_mapISt4pairIPKvN6google8protobuf20stringpiece_internal11StringPieceEEPKNS5_15FieldDescriptorENS5_12_GLOBAL__N_121PointerStringPairHashESt8equal_toIS8_ESaIS1_IKS8_SB_EEEE4loadESt12memory_order; std::atomic<std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>> const*>::load(std::memory_order) mov [rsp+58h+var_50], rax lea rdi, [rsp+58h+var_48] lea rsi, [rsp+58h+var_20] lea rdx, [rsp+58h+var_10] call _ZNSt4pairIPKvN6google8protobuf20stringpiece_internal11StringPieceEEC2IRS1_RS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISB_SC_EEEbE4typeELb1EEEOSB_OSC_ mov rdi, [rsp+58h+var_50] lea rsi, [rsp+58h+var_48] call _ZN6google8protobuf13FindPtrOrNullISt13unordered_mapISt4pairIPKvNS0_20stringpiece_internal11StringPieceEEPKNS0_15FieldDescriptorENS0_12_GLOBAL__N_121PointerStringPairHashESt8equal_toIS8_ESaIS3_IKS8_SB_EEEEENT_10value_type11second_typeERKSK_RKNSL_10first_typeE; google::protobuf::FindPtrOrNull<std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>>>(std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>>::value_type const&,std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>>::value_type::second_type::first_type const&) add rsp, 58h retn
long long google::protobuf::FileDescriptorTables::FindFieldByLowercaseName( long long a1, long long a2, long long a3, long long a4) { long long v5; // [rsp+8h] [rbp-50h] _BYTE v6[24]; // [rsp+10h] [rbp-48h] BYREF long long v7; // [rsp+28h] [rbp-30h] BYREF google::protobuf::FileDescriptorTables *( *v8)(google::protobuf::FileDescriptorTables *, const google::protobuf::FileDescriptorTables *); // [rsp+30h] [rbp-28h] BYREF _QWORD v9[2]; // [rsp+38h] [rbp-20h] BYREF _QWORD v10[2]; // [rsp+48h] [rbp-10h] BYREF v10[0] = a3; v10[1] = a4; v9[1] = a1; v9[0] = a2; v8 = google::protobuf::FileDescriptorTables::FieldsByLowercaseNamesLazyInitStatic; v7 = a1; google::protobuf::internal::call_once<std::once_flag &,void (*)(google::protobuf::FileDescriptorTables const*),google::protobuf::FileDescriptorTables const*>( a1 + 56, &v8, &v7); v5 = std::atomic<std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>> const*>::load( a1 + 64, 2u); ZNSt4pairIPKvN6google8protobuf20stringpiece_internal11StringPieceEEC2IRS1_RS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISB_SC_EEEbE4typeELb1EEEOSB_OSC_( v6, v9, v10); return google::protobuf::FindPtrOrNull<std::unordered_map<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor const*,google::protobuf::`anonymous namespace'::PointerStringPairHash,std::equal_to<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void const*,google::protobuf::stringpiece_internal::StringPiece> const,google::protobuf::FieldDescriptor const*>>>>( v5, (long long)v6); }
FindFieldByLowercaseName: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDX MOV qword ptr [RSP + 0x50],RCX MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP],RAX MOV RDI,RAX ADD RDI,0x38 LEA RCX,[0x133630] MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x28],RAX LEA RSI,[RSP + 0x30] LEA RDX,[RSP + 0x28] CALL 0x0017fa20 MOV RDI,qword ptr [RSP] ADD RDI,0x40 MOV ESI,0x2 CALL 0x001329b0 MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x38] LEA RDX,[RSP + 0x48] CALL 0x0017fa50 MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x10] CALL 0x00162d70 ADD RSP,0x58 RET
/* google::protobuf::FileDescriptorTables::FindFieldByLowercaseName(void const*, google::protobuf::stringpiece_internal::StringPiece) const */ void google::protobuf::FileDescriptorTables::FindFieldByLowercaseName (FileDescriptorTables *param_1,int8 param_2,int8 param_3, int8 param_4) { unordered_map *puVar1; first_type local_48 [24]; FileDescriptorTables *local_30; code *local_28; int8 local_20; FileDescriptorTables *local_18; int8 local_10; int8 local_8; local_28 = FieldsByLowercaseNamesLazyInitStatic; local_30 = param_1; local_20 = param_2; local_18 = param_1; local_10 = param_3; local_8 = param_4; internal:: call_once<std::once_flag&,void(*)(google::protobuf::FileDescriptorTables_const*),google::protobuf::FileDescriptorTables_const*> ((once_flag *)(param_1 + 0x38),(_func_void_FileDescriptorTables_ptr *)&local_28, &local_30); puVar1 = (unordered_map *) std:: atomic<std::unordered_map<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor_const*,google::protobuf::(anonymous_namespace)::PointerStringPairHash,std::equal_to<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>>>const*> ::load((atomic<std::unordered_map<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor_const*,google::protobuf::(anonymous_namespace)::PointerStringPairHash,std::equal_to<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>>>const*> *)(param_1 + 0x40),2); _ZNSt4pairIPKvN6google8protobuf20stringpiece_internal11StringPieceEEC2IRS1_RS5_TnNSt9enable_ifIXaaclsr5_PCCPE22_MoveConstructiblePairIT_T0_EEclsr5_PCCPE30_ImplicitlyMoveConvertiblePairISB_SC_EEEbE4typeELb1EEEOSB_OSC_ (local_48,&local_20,&local_10); FindPtrOrNull<std::unordered_map<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>,google::protobuf::FieldDescriptor_const*,google::protobuf::(anonymous_namespace)::PointerStringPairHash,std::equal_to<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>>,std::allocator<std::pair<std::pair<void_const*,google::protobuf::stringpiece_internal::StringPiece>const,google::protobuf::FieldDescriptor_const*>>>> (puVar1,local_48); return; }
30,970
cxxopts::values::abstract_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::get_implicit_value() const
shubhamoy[P]dir2txt/include/cxxopts.hpp
std::string get_implicit_value() const override { return m_implicit_value; }
O1
cpp
cxxopts::values::abstract_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::get_implicit_value() const: pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) movq 0x58(%rsi), %rax movq 0x60(%rsi), %rdx addq %rax, %rdx movq %rax, %rsi callq 0x9eca movq %rbx, %rax popq %rbx retq nop
_ZNK7cxxopts6values14abstract_valueINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE18get_implicit_valueEv: push rbx mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax mov rax, [rsi+58h] mov rdx, [rsi+60h] add rdx, rax mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rax, rbx pop rbx retn
long long * cxxopts::values::abstract_value<std::string>::get_implicit_value(long long *a1, long long a2) { *a1 = (long long)(a1 + 2); std::string::_M_construct<char *>(a1, *(_BYTE **)(a2 + 88), *(_QWORD *)(a2 + 88) + *(_QWORD *)(a2 + 96)); return a1; }
get_implicit_value: PUSH RBX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI + 0x58] MOV RDX,qword ptr [RSI + 0x60] ADD RDX,RAX MOV RSI,RAX CALL 0x00109eca MOV RAX,RBX POP RBX RET
/* cxxopts::values::abstract_value<std::__cxx11::string >::get_implicit_value() const */ void cxxopts::values::abstract_value<std::__cxx11::string>::get_implicit_value(void) { long in_RSI; long *in_RDI; *in_RDI = (long)(in_RDI + 2); std::__cxx11::string::_M_construct<char*> (in_RDI,*(long *)(in_RSI + 0x58),*(long *)(in_RSI + 0x60) + *(long *)(in_RSI + 0x58)); return; }
30,971
cxxopts::values::abstract_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::get_implicit_value() const
shubhamoy[P]dir2txt/include/cxxopts.hpp
std::string get_implicit_value() const override { return m_implicit_value; }
O3
cpp
cxxopts::values::abstract_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::get_implicit_value() const: pushq %rbx movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) movq 0x58(%rsi), %rax movq 0x60(%rsi), %rdx addq %rax, %rdx movq %rax, %rsi callq 0x9ed8 movq %rbx, %rax popq %rbx retq nop
_ZNK7cxxopts6values14abstract_valueIbE18get_implicit_valueB5cxx11Ev: push rbx mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax mov rax, [rsi+58h] mov rdx, [rsi+60h] add rdx, rax mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rax, rbx pop rbx retn
_QWORD * cxxopts::values::abstract_value<bool>::get_implicit_value[abi:cxx11](_QWORD *a1, long long a2) { *a1 = a1 + 2; std::string::_M_construct<char *>(a1, *(_BYTE **)(a2 + 88), *(_QWORD *)(a2 + 88) + *(_QWORD *)(a2 + 96)); return a1; }
get_implicit_value[abi:cxx11]: PUSH RBX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI + 0x58] MOV RDX,qword ptr [RSI + 0x60] ADD RDX,RAX MOV RSI,RAX CALL 0x00109ed8 MOV RAX,RBX POP RBX RET
/* cxxopts::values::abstract_value<bool>::get_implicit_value[abi:cxx11]() const */ void cxxopts::values::abstract_value<bool>::get_implicit_value_abi_cxx11_(void) { long in_RSI; long *in_RDI; *in_RDI = (long)(in_RDI + 2); std::__cxx11::string::_M_construct<char*> (in_RDI,*(long *)(in_RSI + 0x58),*(long *)(in_RSI + 0x60) + *(long *)(in_RSI + 0x58)); return; }
30,972
write_hook_for_undo_key_insert
eloqsql/storage/maria/ma_key_recover.c
my_bool write_hook_for_undo_key_insert(enum translog_record_type type, TRN *trn, MARIA_HA *tbl_info, LSN *lsn, void *hook_arg) { struct st_msg_to_write_hook_for_undo_key *msg= (struct st_msg_to_write_hook_for_undo_key *) hook_arg; MARIA_SHARE *share= tbl_info->s; if (msg->auto_increment > 0) { /* Only reason to set it here is to have a mutex protect from checkpoint reading at the same time (would see a corrupted value). The purpose of the following code is to set auto_increment if the row has a with auto_increment value higher than the current one. We also want to be able to restore the old value, in case of rollback, if no one else has tried to set the value. The logic used is that we only restore the auto_increment value if tbl_info->last_auto_increment == share->last_auto_increment when it's time to do the rollback. */ DBUG_PRINT("info",("auto_inc: %lu new auto_inc: %lu", (ulong)share->state.auto_increment, (ulong)msg->auto_increment)); if (share->state.auto_increment < msg->auto_increment) { /* Remember the original value, in case of rollback */ tbl_info->last_auto_increment= share->last_auto_increment= share->state.auto_increment; share->state.auto_increment= msg->auto_increment; } else { /* If the current value would have affected the original auto_increment value, set it to an impossible value so that it's not restored on rollback */ if (msg->auto_increment > share->last_auto_increment) share->last_auto_increment= ~(ulonglong) 0; } } return write_hook_for_undo_key(type, trn, tbl_info, lsn, hook_arg); }
O0
c
write_hook_for_undo_key_insert: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq $0x0, 0x18(%rax) jbe 0x41060 jmp 0x40feb jmp 0x40fed movq -0x38(%rbp), %rax movq 0xd8(%rax), %rax movq -0x30(%rbp), %rcx cmpq 0x18(%rcx), %rax jae 0x41038 movq -0x38(%rbp), %rax movq 0xd8(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x610(%rax) movq -0x18(%rbp), %rax movq %rcx, 0x3e8(%rax) movq -0x30(%rbp), %rax movq 0x18(%rax), %rcx movq -0x38(%rbp), %rax movq %rcx, 0xd8(%rax) jmp 0x4105e movq -0x30(%rbp), %rax movq 0x18(%rax), %rax movq -0x38(%rbp), %rcx cmpq 0x610(%rcx), %rax jbe 0x4105c movq -0x38(%rbp), %rax movq $-0x1, 0x610(%rax) jmp 0x4105e jmp 0x41060 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x40f20 addq $0x40, %rsp popq %rbp retq nop
write_hook_for_undo_key_insert: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_30] cmp qword ptr [rax+18h], 0 jbe short loc_41060 jmp short $+2 loc_40FEB: jmp short $+2 loc_40FED: mov rax, [rbp+var_38] mov rax, [rax+0D8h] mov rcx, [rbp+var_30] cmp rax, [rcx+18h] jnb short loc_41038 mov rax, [rbp+var_38] mov rcx, [rax+0D8h] mov rax, [rbp+var_38] mov [rax+610h], rcx mov rax, [rbp+var_18] mov [rax+3E8h], rcx mov rax, [rbp+var_30] mov rcx, [rax+18h] mov rax, [rbp+var_38] mov [rax+0D8h], rcx jmp short loc_4105E loc_41038: mov rax, [rbp+var_30] mov rax, [rax+18h] mov rcx, [rbp+var_38] cmp rax, [rcx+610h] jbe short loc_4105C mov rax, [rbp+var_38] mov qword ptr [rax+610h], 0FFFFFFFFFFFFFFFFh loc_4105C: jmp short $+2 loc_4105E: jmp short $+2 loc_41060: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call write_hook_for_undo_key add rsp, 40h pop rbp retn
long long write_hook_for_undo_key_insert(unsigned int a1, long long a2, long long *a3, long long a4, long long a5) { long long v5; // rcx long long v7; // [rsp+8h] [rbp-38h] v7 = *a3; if ( *(_QWORD *)(a5 + 24) ) { if ( *(_QWORD *)(v7 + 216) >= *(_QWORD *)(a5 + 24) ) { if ( *(_QWORD *)(a5 + 24) > *(_QWORD *)(v7 + 1552) ) *(_QWORD *)(v7 + 1552) = -1LL; } else { v5 = *(_QWORD *)(v7 + 216); *(_QWORD *)(v7 + 1552) = v5; a3[125] = v5; *(_QWORD *)(v7 + 216) = *(_QWORD *)(a5 + 24); } } return write_hook_for_undo_key(a1, a2, (long long)a3, a4, a5); }
write_hook_for_undo_key_insert: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX + 0x18],0x0 JBE 0x00141060 JMP 0x00140feb LAB_00140feb: JMP 0x00140fed LAB_00140fed: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0xd8] MOV RCX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RCX + 0x18] JNC 0x00141038 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0xd8] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x610],RCX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x3e8],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0xd8],RCX JMP 0x0014105e LAB_00141038: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RCX + 0x610] JBE 0x0014105c MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x610],-0x1 LAB_0014105c: JMP 0x0014105e LAB_0014105e: JMP 0x00141060 LAB_00141060: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x00140f20 ADD RSP,0x40 POP RBP RET
void write_hook_for_undo_key_insert (int4 param_1,int8 param_2,long *param_3,int8 param_4,long param_5) { long lVar1; lVar1 = *param_3; if (*(long *)(param_5 + 0x18) != 0) { if (*(ulong *)(lVar1 + 0xd8) < *(ulong *)(param_5 + 0x18)) { *(long *)(lVar1 + 0x610) = *(long *)(lVar1 + 0xd8); param_3[0x7d] = *(long *)(lVar1 + 0xd8); *(int8 *)(lVar1 + 0xd8) = *(int8 *)(param_5 + 0x18); } else if (*(ulong *)(lVar1 + 0x610) < *(ulong *)(param_5 + 0x18)) { *(int8 *)(lVar1 + 0x610) = 0xffffffffffffffff; } } write_hook_for_undo_key(param_1,param_2,param_3,param_4,param_5); return; }
30,973
ggml_thread_apply_affinity
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ggml-cpu.c
static bool ggml_thread_apply_affinity(const bool * mask) { cpu_set_t cpuset; int err; CPU_ZERO(&cpuset); for (uint32_t i = 0; i < GGML_MAX_N_THREADS; i++) { if (mask[i]) { GGML_PRINT_DEBUG("Thread %lx: adding %d to cpuset\n", pthread_self(), i); CPU_SET(i, &cpuset); } } #ifdef __ANDROID__ err = sched_setaffinity(0, sizeof(cpuset), &cpuset); if (err < 0) { err = errno; } #else err = pthread_setaffinity_np(pthread_self(), sizeof(cpuset), &cpuset); #endif if (err != 0) { fprintf(stderr, "warn: failed to set affinity mask 0x%llx : %s (%d)\n", (unsigned long long)mask, strerror(err), err); return false; } return true; }
O1
c
ggml_thread_apply_affinity: pushq %rbp pushq %r14 pushq %rbx subq $0x80, %rsp movq %rdi, %rbx vxorps %xmm0, %xmm0, %xmm0 vmovups %ymm0, 0x60(%rsp) vmovups %ymm0, 0x40(%rsp) vmovups %ymm0, 0x20(%rsp) vmovups %ymm0, (%rsp) xorl %eax, %eax movl $0x1, %ecx cmpb $0x1, (%rbx,%rax) jne 0x1053b shlxq %rax, %rcx, %rdx movq %rax, %rsi shrq $0x6, %rsi orq %rdx, (%rsp,%rsi,8) incq %rax cmpq $0x200, %rax # imm = 0x200 jne 0x10525 vzeroupper callq 0xa7d0 movq %rsp, %rdx movl $0x80, %esi movq %rax, %rdi callq 0xafd0 testl %eax, %eax jne 0x1056e addq $0x80, %rsp popq %rbx popq %r14 popq %rbp retq movl %eax, %ebp movq 0x4ba41(%rip), %rax # 0x5bfb8 movq (%rax), %r14 movl %ebp, %edi callq 0xa260 leaq 0x39335(%rip), %rsi # 0x498bd movq %r14, %rdi movq %rbx, %rdx movq %rax, %rcx movl %ebp, %r8d xorl %eax, %eax callq 0xac80 jmp 0x10562 nopl (%rax)
ggml_thread_apply_affinity: push rbp push r14 push rbx sub rsp, 80h mov rbx, rdi vxorps xmm0, xmm0, xmm0 vmovups [rsp+98h+var_38], ymm0 vmovups [rsp+98h+var_58], ymm0 vmovups [rsp+98h+var_78], ymm0 vmovups [rsp+98h+var_98], ymm0 xor eax, eax mov ecx, 1 loc_10525: cmp byte ptr [rbx+rax], 1 jnz short loc_1053B shlx rdx, rcx, rax mov rsi, rax shr rsi, 6 or qword ptr [rsp+rsi*8+98h+var_98], rdx loc_1053B: inc rax cmp rax, 200h jnz short loc_10525 vzeroupper call _pthread_self mov rdx, rsp mov esi, 80h mov rdi, rax call _pthread_setaffinity_np test eax, eax jnz short loc_1056E loc_10562: add rsp, 80h pop rbx pop r14 pop rbp retn loc_1056E: mov ebp, eax mov rax, cs:stderr_ptr mov r14, [rax] mov edi, ebp call _strerror lea rsi, aWarnFailedToSe_0; "warn: failed to set affinity mask 0x%ll"... mov rdi, r14 mov rdx, rbx mov rcx, rax mov r8d, ebp xor eax, eax call _fprintf jmp short loc_10562
long long ggml_thread_apply_affinity( long long a1, unsigned long long a2, long long a3, __m128 _XMM0, long long a5, long long a6, long long a7) { unsigned long long i; // rax long long v10; // rax long long result; // rax int v12; // ebp long long v13; // r14 const char *v14; // rax __m256 v15; // [rsp+0h] [rbp-98h] BYREF __m256 v16; // [rsp+20h] [rbp-78h] __m256 v17; // [rsp+40h] [rbp-58h] __m256 v18; // [rsp+60h] [rbp-38h] __asm { vxorps xmm0, xmm0, xmm0 vmovups [rsp+98h+var_38], ymm0 vmovups [rsp+98h+var_58], ymm0 vmovups [rsp+98h+var_78], ymm0 vmovups [rsp+98h+var_98], ymm0 } for ( i = 0LL; i != 512; ++i ) { if ( *(_BYTE *)(a1 + i) == 1 ) { a3 = 1LL << i; a2 = i >> 6; *(_QWORD *)&v15.m256_f32[2 * (i >> 6)] |= 1LL << i; } } __asm { vzeroupper } v10 = pthread_self( a1, a2, a3, 1LL, a6, a7, *(double *)&_XMM0, *(_QWORD *)v15.m256_f32, *(_QWORD *)&v15.m256_f32[2], *(_QWORD *)&v15.m256_f32[4], *(_QWORD *)&v15.m256_f32[6], *(_QWORD *)v16.m256_f32, *(_QWORD *)&v16.m256_f32[2], *(_QWORD *)&v16.m256_f32[4], *(_QWORD *)&v16.m256_f32[6], *(_QWORD *)v17.m256_f32, *(_QWORD *)&v17.m256_f32[2], *(_QWORD *)&v17.m256_f32[4], *(_QWORD *)&v17.m256_f32[6], *(_QWORD *)v18.m256_f32, *(_QWORD *)&v18.m256_f32[2], *(_QWORD *)&v18.m256_f32[4], *(_QWORD *)&v18.m256_f32[6]); result = pthread_setaffinity_np(v10, 128LL, &v15); if ( (_DWORD)result ) { v12 = result; v13 = stderr; v14 = (const char *)strerror((unsigned int)result); return fprintf(v13, "warn: failed to set affinity mask 0x%llx : %s (%d)\n", a1, v14, v12); } return result; }
ggml_thread_apply_affinity: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x80 MOV RBX,RDI VXORPS XMM0,XMM0,XMM0 VMOVUPS ymmword ptr [RSP + 0x60],YMM0 VMOVUPS ymmword ptr [RSP + 0x40],YMM0 VMOVUPS ymmword ptr [RSP + 0x20],YMM0 VMOVUPS ymmword ptr [RSP],YMM0 XOR EAX,EAX MOV ECX,0x1 LAB_00110525: CMP byte ptr [RBX + RAX*0x1],0x1 JNZ 0x0011053b SHLX RDX,RCX,RAX MOV RSI,RAX SHR RSI,0x6 OR qword ptr [RSP + RSI*0x8],RDX LAB_0011053b: INC RAX CMP RAX,0x200 JNZ 0x00110525 VZEROUPPER CALL 0x0010a7d0 MOV RDX,RSP MOV ESI,0x80 MOV RDI,RAX CALL 0x0010afd0 TEST EAX,EAX JNZ 0x0011056e LAB_00110562: ADD RSP,0x80 POP RBX POP R14 POP RBP RET LAB_0011056e: MOV EBP,EAX MOV RAX,qword ptr [0x0015bfb8] MOV R14,qword ptr [RAX] MOV EDI,EBP CALL 0x0010a260 LEA RSI,[0x1498bd] MOV RDI,R14 MOV RDX,RBX MOV RCX,RAX MOV R8D,EBP XOR EAX,EAX CALL 0x0010ac80 JMP 0x00110562
void ggml_thread_apply_affinity(long param_1) { FILE *__stream; uint __errnum; ulong uVar1; pthread_t __th; char *pcVar2; int1 auVar3 [16]; int1 local_98 [64]; int1 local_58 [32]; int1 local_38 [32]; auVar3 = ZEXT816(0) << 0x40; local_58 = ZEXT1632(auVar3); local_98._32_32_ = ZEXT1632(auVar3); local_98._0_32_ = ZEXT1632(auVar3); uVar1 = 0; do { if (*(char *)(param_1 + uVar1) == '\x01') { *(ulong *)(local_98 + (uVar1 >> 6) * 8) = *(ulong *)(local_98 + (uVar1 >> 6) * 8) | 1L << (uVar1 & 0x3f); } uVar1 = uVar1 + 1; } while (uVar1 != 0x200); local_38 = local_58; __th = pthread_self(); __errnum = pthread_setaffinity_np(__th,0x80,(cpu_set_t *)local_98); if (__errnum != 0) { __stream = *(FILE **)PTR_stderr_0015bfb8; pcVar2 = strerror(__errnum); fprintf(__stream,"warn: failed to set affinity mask 0x%llx : %s (%d)\n",param_1,pcVar2, (ulong)__errnum); } return; }
30,974
virtual thunk to nglog::NullStream::~NullStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT NullStream : public LogMessage::LogStream { public: // Initialize the LogStream so the messages can be written somewhere // (they'll never be actually displayed). This will be needed if a // NullStream& is implicitly converted to LogStream&, in which case // the overloaded NullStream::operator<< will not be invoked. NullStream(); NullStream(const char* /*file*/, int /*line*/, const internal::CheckOpString& /*result*/); NullStream& stream(); private: // A very short buffer for messages (which we discard anyway). This // will be needed if NullStream& converted to LogStream& (e.g. as a // result of a conditional expression). char message_buffer_[3]; }
O0
c
virtual thunk to nglog::NullStream::~NullStream(): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq (%rdi), %rax movq -0x18(%rax), %rax addq %rax, %rdi popq %rbp jmp 0x1b1e0 nopl (%rax)
_ZTv0_n24_N5nglog10NullStreamD0Ev: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov rax, [rdi] mov rax, [rax-18h] add rdi, rax; this pop rbp jmp _ZN5nglog10NullStreamD0Ev; nglog::NullStream::~NullStream()
void `virtual thunk to'nglog::NullStream::~NullStream(nglog::NullStream *this) { nglog::NullStream::~NullStream((nglog::NullStream *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL))); }
~NullStream: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] ADD RDI,RAX POP RBP JMP 0x0011b1e0
/* virtual thunk to nglog::NullStream::~NullStream() */ void __thiscall nglog::NullStream::~NullStream(NullStream *this) { ~NullStream(this + *(long *)(*(long *)this + -0x18)); return; }
30,975
virtual thunk to nglog::NullStream::~NullStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT NullStream : public LogMessage::LogStream { public: // Initialize the LogStream so the messages can be written somewhere // (they'll never be actually displayed). This will be needed if a // NullStream& is implicitly converted to LogStream&, in which case // the overloaded NullStream::operator<< will not be invoked. NullStream(); NullStream(const char* /*file*/, int /*line*/, const internal::CheckOpString& /*result*/); NullStream& stream(); private: // A very short buffer for messages (which we discard anyway). This // will be needed if NullStream& converted to LogStream& (e.g. as a // result of a conditional expression). char message_buffer_[3]; }
O1
c
virtual thunk to nglog::NullStream::~NullStream(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x1d212(%rip), %rax # 0x2e898 leaq 0x18(%rax), %rcx movq %rcx, (%rdi) leaq 0x60(%rdi), %r14 addq $0x40, %rax movq %rax, 0x60(%rdi) movq 0x1d898(%rip), %rax # 0x2ef38 addq $0x10, %rax movq %rax, 0x8(%rdi) addq $0x40, %rdi callq 0x7760 movq %r14, %rdi callq 0x7160 movl $0x168, %esi # imm = 0x168 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x8fcc nop
_ZN5nglog10NullStreamD0Ev: push r14 push rbx push rax mov rbx, rdi lea rax, _ZTCN5nglog10NullStreamE0_NS_10LogMessage9LogStreamE; `construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream lea rcx, [rax+18h] mov [rdi], rcx lea r14, [rdi+60h] add rax, 40h ; '@' mov [rdi+60h], rax mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rax, 10h mov [rdi+8], rax add rdi, 40h ; '@'; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rdi, r14; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov esi, 168h; unsigned __int64 mov rdi, rbx; void * add rsp, 8 pop rbx pop r14 jmp _ZdlPvm; operator delete(void *,ulong)
void nglog::NullStream::~NullStream(nglog::NullStream *this) { *(_QWORD *)this = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 24; *((_QWORD *)this + 12) = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 64; *((_QWORD *)this + 1) = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((nglog::NullStream *)((char *)this + 64)); std::ios_base::~ios_base((nglog::NullStream *)((char *)this + 96)); operator delete(this); }
~NullStream: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0x12e898] LEA RCX,[RAX + 0x18] MOV qword ptr [RDI],RCX LEA R14,[RDI + 0x60] ADD RAX,0x40 MOV qword ptr [RDI + 0x60],RAX MOV RAX,qword ptr [0x0012ef38] ADD RAX,0x10 MOV qword ptr [RDI + 0x8],RAX ADD RDI,0x40 CALL 0x00107760 MOV RDI,R14 CALL 0x00107160 MOV ESI,0x168 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00108fcc
/* nglog::NullStream::~NullStream() */ void __thiscall nglog::NullStream::~NullStream(NullStream *this) { *(int8 *)this = 0x12e8b0; *(int8 *)(this + 0x60) = 0x12e8d8; *(int **)(this + 8) = PTR_vtable_0012ef38 + 0x10; std::locale::~locale((locale *)(this + 0x40)); std::ios_base::~ios_base((ios_base *)(this + 0x60)); operator_delete(this,0x168); return; }
30,976
virtual thunk to nglog::NullStream::~NullStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT NullStream : public LogMessage::LogStream { public: // Initialize the LogStream so the messages can be written somewhere // (they'll never be actually displayed). This will be needed if a // NullStream& is implicitly converted to LogStream&, in which case // the overloaded NullStream::operator<< will not be invoked. NullStream(); NullStream(const char* /*file*/, int /*line*/, const internal::CheckOpString& /*result*/); NullStream& stream(); private: // A very short buffer for messages (which we discard anyway). This // will be needed if NullStream& converted to LogStream& (e.g. as a // result of a conditional expression). char message_buffer_[3]; }
O2
c
virtual thunk to nglog::NullStream::~NullStream(): movq (%rdi), %rax addq -0x18(%rax), %rdi jmp 0xec84
_ZTv0_n24_N5nglog10NullStreamD1Ev: mov rax, [rdi] add rdi, [rax-18h]; this jmp _ZN5nglog10NullStreamD1Ev; nglog::NullStream::~NullStream()
void `virtual thunk to'nglog::NullStream::~NullStream(nglog::NullStream *this) { nglog::NullStream::~NullStream((nglog::NullStream *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL))); }
~NullStream: MOV RAX,qword ptr [RDI] ADD RDI,qword ptr [RAX + -0x18] JMP 0x0010ec84
/* virtual thunk to nglog::NullStream::~NullStream() */ void __thiscall nglog::NullStream::~NullStream(NullStream *this) { ~NullStream(this + *(long *)(*(long *)this + -0x18)); return; }
30,977
virtual thunk to nglog::NullStream::~NullStream()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT NullStream : public LogMessage::LogStream { public: // Initialize the LogStream so the messages can be written somewhere // (they'll never be actually displayed). This will be needed if a // NullStream& is implicitly converted to LogStream&, in which case // the overloaded NullStream::operator<< will not be invoked. NullStream(); NullStream(const char* /*file*/, int /*line*/, const internal::CheckOpString& /*result*/); NullStream& stream(); private: // A very short buffer for messages (which we discard anyway). This // will be needed if NullStream& converted to LogStream& (e.g. as a // result of a conditional expression). char message_buffer_[3]; }
O3
c
virtual thunk to nglog::NullStream::~NullStream(): pushq %r14 pushq %rbx pushq %rax movq (%rdi), %rax movq -0x18(%rax), %rax leaq (%rdi,%rax), %rbx leaq 0x1d410(%rip), %rcx # 0x2e8d8 leaq 0x18(%rcx), %rdx leaq (%rdi,%rax), %r14 addq $0x60, %r14 movq %rdx, -0x60(%r14) addq $0x40, %rcx movq %rcx, (%r14) movq 0x1da52(%rip), %rcx # 0x2ef38 addq $0x10, %rcx movq %rcx, -0x58(%r14) addq %rax, %rdi addq $0x40, %rdi callq 0x7760 movq %r14, %rdi callq 0x7160 movl $0x168, %esi # imm = 0x168 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x8eac
_ZTv0_n24_N5nglog10NullStreamD0Ev: push r14 push rbx push rax mov rax, [rdi] mov rax, [rax-18h] lea rbx, [rdi+rax] lea rcx, _ZTCN5nglog10NullStreamE0_NS_10LogMessage9LogStreamE; `construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream lea rdx, [rcx+18h] lea r14, [rdi+rax] add r14, 60h ; '`' mov [r14-60h], rdx add rcx, 40h ; '@' mov [r14], rcx mov rcx, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rcx, 10h mov [r14-58h], rcx add rdi, rax add rdi, 40h ; '@'; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rdi, r14; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov esi, 168h; unsigned __int64 mov rdi, rbx; void * add rsp, 8 pop rbx pop r14 jmp _ZdlPvm; operator delete(void *,ulong)
void `virtual thunk to'nglog::NullStream::~NullStream(nglog::NullStream *this) { _QWORD *v1; // rbx v1 = (_QWORD *)((char *)this + *(_QWORD *)(*(_QWORD *)this - 24LL)); *v1 = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 24; v1[12] = (char *)&`construction vtable for'nglog::LogMessage::LogStream-in-nglog::NullStream + 64; v1[1] = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((std::locale *)(v1 + 8)); std::ios_base::~ios_base((std::ios_base *)(v1 + 12)); operator delete(v1); }
~NullStream: PUSH R14 PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + -0x18] LEA RBX,[RDI + RAX*0x1] LEA RCX,[0x12e8d8] LEA RDX,[RCX + 0x18] LEA R14,[RDI + RAX*0x1] ADD R14,0x60 MOV qword ptr [R14 + -0x60],RDX ADD RCX,0x40 MOV qword ptr [R14],RCX MOV RCX,qword ptr [0x0012ef38] ADD RCX,0x10 MOV qword ptr [R14 + -0x58],RCX ADD RDI,RAX ADD RDI,0x40 CALL 0x00107760 MOV RDI,R14 CALL 0x00107160 MOV ESI,0x168 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00108eac
/* virtual thunk to nglog::NullStream::~NullStream() */ void __thiscall nglog::NullStream::~NullStream(NullStream *this) { NullStream *pNVar1; long lVar2; lVar2 = *(long *)(*(long *)this + -0x18); pNVar1 = this + lVar2; *(int8 *)pNVar1 = 0x12e8f0; *(int8 *)(pNVar1 + 0x60) = 0x12e918; *(int **)(pNVar1 + 8) = PTR_vtable_0012ef38 + 0x10; std::locale::~locale((locale *)(this + lVar2 + 0x40)); std::ios_base::~ios_base((ios_base *)(pNVar1 + 0x60)); operator_delete(this + lVar2,0x168); return; }
30,978
my_casefold_ujis
eloqsql/strings/ctype-ujis.c
static size_t my_casefold_ujis(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar * const map, size_t is_upper) { const char *srcend= src + srclen, *dst0= dst; while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; ch= (mblen == 2) ? get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) : get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]); if (ch) { int code= is_upper ? ch->toupper : ch->tolower; src+= mblen; if (code > 0xFFFF) *dst++= (char) (uchar) ((code >> 16) & 0xFF); if (code > 0xFF) *dst++= (char) (uchar) ((code >> 8) & 0xFF); *dst++= (char) (uchar) (code & 0xFF); } else { if (mblen == 3) *dst++= *src++; *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O3
c
my_casefold_ujis: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, -0x40(%rbp) movq %rcx, %rbx movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0x83663 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 addq %rsi, %r15 xorl %eax, %eax testq %r9, %r9 sete %al shll $0x2, %eax movq %rax, -0x38(%rbp) xorl %r14d, %r14d movq -0x30(%rbp), %rbx movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovll %r14d, %eax testl %eax, %eax je 0x835bd cmpl $0x2, %eax jne 0x835d3 movzbl (%r12), %ecx movq 0x78(%r13), %rdx movq 0x8(%rdx), %rdx movq (%rdx,%rcx,8), %rcx testq %rcx, %rcx je 0x8362d movzbl 0x1(%r12), %edx jmp 0x835f4 movzbl (%r12), %eax incq %r12 movq -0x40(%rbp), %rcx movb (%rcx,%rax), %al movb %al, (%rbx) jmp 0x83657 movzbl 0x1(%r12), %ecx movq 0x78(%r13), %rdx movq 0x8(%rdx), %rdx movq 0x800(%rdx,%rcx,8), %rcx testq %rcx, %rcx je 0x8361c movzbl 0x2(%r12), %edx leaq (%rdx,%rdx,2), %rdx leaq (%rcx,%rdx,4), %rcx testq %rcx, %rcx je 0x8361c movq -0x38(%rbp), %rdx movl (%rcx,%rdx), %ecx cmpl $0x10000, %ecx # imm = 0x10000 jl 0x83645 movl %ecx, %edx shrl $0x10, %edx movb %dl, (%rbx) incq %rbx jmp 0x8364d cmpl $0x3, %eax jne 0x8362d movb (%r12), %al incq %r12 movb %al, (%rbx) incq %rbx movb (%r12), %al movb %al, (%rbx) movb 0x1(%r12), %al addq $0x2, %r12 movb %al, 0x1(%rbx) addq $0x2, %rbx jmp 0x8365a cmpl $0x100, %ecx # imm = 0x100 jl 0x83652 movb %ch, (%rbx) incq %rbx addq %rax, %r12 movb %cl, (%rbx) incq %rbx cmpq %r15, %r12 jb 0x83579 subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casefold_ujis: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], r8 mov rbx, rcx mov [rbp+var_30], rcx test rdx, rdx jle loc_83663 mov r15, rdx mov r12, rsi mov r13, rdi add r15, rsi xor eax, eax test r9, r9 setz al shl eax, 2 mov [rbp+var_38], rax xor r14d, r14d mov rbx, [rbp+var_30] loc_83579: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r15 call qword ptr [rax+0C0h] cmp eax, 2 cmovl eax, r14d test eax, eax jz short loc_835BD cmp eax, 2 jnz short loc_835D3 movzx ecx, byte ptr [r12] mov rdx, [r13+78h] mov rdx, [rdx+8] mov rcx, [rdx+rcx*8] test rcx, rcx jz short loc_8362D movzx edx, byte ptr [r12+1] jmp short loc_835F4 loc_835BD: movzx eax, byte ptr [r12] inc r12 mov rcx, [rbp+var_40] mov al, [rcx+rax] mov [rbx], al jmp loc_83657 loc_835D3: movzx ecx, byte ptr [r12+1] mov rdx, [r13+78h] mov rdx, [rdx+8] mov rcx, [rdx+rcx*8+800h] test rcx, rcx jz short loc_8361C movzx edx, byte ptr [r12+2] loc_835F4: lea rdx, [rdx+rdx*2] lea rcx, [rcx+rdx*4] test rcx, rcx jz short loc_8361C mov rdx, [rbp+var_38] mov ecx, [rcx+rdx] cmp ecx, offset stru_10000 jl short loc_83645 mov edx, ecx shr edx, 10h mov [rbx], dl inc rbx jmp short loc_8364D loc_8361C: cmp eax, 3 jnz short loc_8362D mov al, [r12] inc r12 mov [rbx], al inc rbx loc_8362D: mov al, [r12] mov [rbx], al mov al, [r12+1] add r12, 2 mov [rbx+1], al add rbx, 2 jmp short loc_8365A loc_83645: cmp ecx, 100h jl short loc_83652 loc_8364D: mov [rbx], ch inc rbx loc_83652: add r12, rax mov [rbx], cl loc_83657: inc rbx loc_8365A: cmp r12, r15 jb loc_83579 loc_83663: sub rbx, [rbp+var_30] mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_casefold_ujis( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6) { unsigned __int8 *v6; // rbx unsigned __int8 *v7; // r12 unsigned long long v8; // r15 long long v9; // rax long long v10; // rcx long long v11; // rdx long long v12; // rax long long v13; // rcx int v14; // ecx unsigned __int8 v15; // al unsigned __int8 v16; // al long long v19; // [rsp+8h] [rbp-38h] v6 = a4; if ( a3 > 0 ) { v7 = a2; v8 = (unsigned long long)&a2[a3]; v19 = 4 * (unsigned int)(a6 == 0); v6 = a4; while ( 1 ) { v9 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v7, v8); if ( (int)v9 < 2 ) v9 = 0LL; if ( !(_DWORD)v9 ) { v12 = *v7++; *v6 = *(_BYTE *)(a5 + v12); goto LABEL_21; } if ( (_DWORD)v9 != 2 ) break; v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * *v7); if ( v10 ) { v11 = v7[1]; LABEL_12: v13 = v10 + 12 * v11; if ( v13 ) { v14 = *(_DWORD *)(v13 + v19); if ( v14 >= (int)&stru_10000 ) { *v6++ = BYTE2(v14); goto LABEL_19; } if ( v14 >= 256 ) LABEL_19: *v6++ = BYTE1(v14); v7 += v9; *v6 = v14; LABEL_21: ++v6; goto LABEL_22; } goto LABEL_15; } LABEL_17: *v6 = *v7; v16 = v7[1]; v7 += 2; v6[1] = v16; v6 += 2; LABEL_22: if ( (unsigned long long)v7 >= v8 ) return (_BYTE *)(v6 - a4); } v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * v7[1] + 2048); if ( v10 ) { v11 = v7[2]; goto LABEL_12; } LABEL_15: if ( (_DWORD)v9 == 3 ) { v15 = *v7++; *v6++ = v15; } goto LABEL_17; } return (_BYTE *)(v6 - a4); }
my_casefold_ujis: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],R8 MOV RBX,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x00183663 MOV R15,RDX MOV R12,RSI MOV R13,RDI ADD R15,RSI XOR EAX,EAX TEST R9,R9 SETZ AL SHL EAX,0x2 MOV qword ptr [RBP + -0x38],RAX XOR R14D,R14D MOV RBX,qword ptr [RBP + -0x30] LAB_00183579: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVL EAX,R14D TEST EAX,EAX JZ 0x001835bd CMP EAX,0x2 JNZ 0x001835d3 MOVZX ECX,byte ptr [R12] MOV RDX,qword ptr [R13 + 0x78] MOV RDX,qword ptr [RDX + 0x8] MOV RCX,qword ptr [RDX + RCX*0x8] TEST RCX,RCX JZ 0x0018362d MOVZX EDX,byte ptr [R12 + 0x1] JMP 0x001835f4 LAB_001835bd: MOVZX EAX,byte ptr [R12] INC R12 MOV RCX,qword ptr [RBP + -0x40] MOV AL,byte ptr [RCX + RAX*0x1] MOV byte ptr [RBX],AL JMP 0x00183657 LAB_001835d3: MOVZX ECX,byte ptr [R12 + 0x1] MOV RDX,qword ptr [R13 + 0x78] MOV RDX,qword ptr [RDX + 0x8] MOV RCX,qword ptr [RDX + RCX*0x8 + 0x800] TEST RCX,RCX JZ 0x0018361c MOVZX EDX,byte ptr [R12 + 0x2] LAB_001835f4: LEA RDX,[RDX + RDX*0x2] LEA RCX,[RCX + RDX*0x4] TEST RCX,RCX JZ 0x0018361c MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RCX + RDX*0x1] CMP ECX,0x10000 JL 0x00183645 MOV EDX,ECX SHR EDX,0x10 MOV byte ptr [RBX],DL INC RBX JMP 0x0018364d LAB_0018361c: CMP EAX,0x3 JNZ 0x0018362d MOV AL,byte ptr [R12] INC R12 MOV byte ptr [RBX],AL INC RBX LAB_0018362d: MOV AL,byte ptr [R12] MOV byte ptr [RBX],AL MOV AL,byte ptr [R12 + 0x1] ADD R12,0x2 MOV byte ptr [RBX + 0x1],AL ADD RBX,0x2 JMP 0x0018365a LAB_00183645: CMP ECX,0x100 JL 0x00183652 LAB_0018364d: MOV byte ptr [RBX],CH INC RBX LAB_00183652: ADD R12,RAX MOV byte ptr [RBX],CL LAB_00183657: INC RBX LAB_0018365a: CMP R12,R15 JC 0x00183579 LAB_00183663: SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casefold_ujis(long param_1,byte *param_2,long param_3,byte *param_4,long param_5, long param_6) { byte *pbVar1; byte bVar2; uint uVar3; int iVar4; long lVar6; byte *pbVar7; byte *pbVar8; ulong uVar5; pbVar7 = param_4; if (0 < param_3) { pbVar8 = param_2 + param_3; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar8); uVar5 = (ulong)uVar3; if ((int)uVar3 < 2) { uVar5 = 0; } iVar4 = (int)uVar5; if (iVar4 == 0) { bVar2 = *param_2; param_2 = param_2 + 1; *pbVar7 = *(byte *)(param_5 + (ulong)bVar2); LAB_00183657: pbVar7 = pbVar7 + 1; } else { if (iVar4 == 2) { lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8); if (lVar6 != 0) { bVar2 = param_2[1]; LAB_001835f4: lVar6 = lVar6 + (ulong)bVar2 * 0xc; if (lVar6 == 0) goto LAB_0018361c; iVar4 = *(int *)(lVar6 + (ulong)(param_6 == 0) * 4); if (iVar4 < 0x10000) { if (0xff < iVar4) goto LAB_0018364d; } else { *pbVar7 = (byte)((uint)iVar4 >> 0x10); pbVar7 = pbVar7 + 1; LAB_0018364d: *pbVar7 = (byte)((uint)iVar4 >> 8); pbVar7 = pbVar7 + 1; } param_2 = param_2 + uVar5; *pbVar7 = (byte)iVar4; goto LAB_00183657; } } else { lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + 0x800 + (ulong)param_2[1] * 8 ); if (lVar6 != 0) { bVar2 = param_2[2]; goto LAB_001835f4; } LAB_0018361c: if (iVar4 == 3) { bVar2 = *param_2; param_2 = param_2 + 1; *pbVar7 = bVar2; pbVar7 = pbVar7 + 1; } } *pbVar7 = *param_2; pbVar1 = param_2 + 1; param_2 = param_2 + 2; pbVar7[1] = *pbVar1; pbVar7 = pbVar7 + 2; } } while (param_2 < pbVar8); } return (long)pbVar7 - (long)param_4; }
30,979
minja::ElifTemplateToken::~ElifTemplateToken()
monkey531[P]llama/common/minja.hpp
ElifTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, location, pre, post), condition(std::move(c)) {}
O1
cpp
minja::ElifTemplateToken::~ElifTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x9482d(%rip), %rax # 0x131b68 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x9d350 callq 0x71c94 leaq 0x93f91(%rip), %rax # 0x1312e8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x9d36c callq 0x71c94 movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x1b910
_ZN5minja17ElifTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja17ElifTemplateTokenE; `vtable for'minja::ElifTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_9D350 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9D350: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_9D36C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9D36C: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::ElifTemplateToken::~ElifTemplateToken(minja::ElifTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::ElifTemplateToken + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x40uLL); }
~ElifTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x231b68] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0019d350 CALL 0x00171c94 LAB_0019d350: LEA RAX,[0x2312e8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0019d36c CALL 0x00171c94 LAB_0019d36c: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x0011b910
/* minja::ElifTemplateToken::~ElifTemplateToken() */ void __thiscall minja::ElifTemplateToken::~ElifTemplateToken(ElifTemplateToken *this) { *(int ***)this = &PTR__ElifTemplateToken_00231b78; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } *(int ***)this = &PTR__TemplateToken_002312f8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); } operator_delete(this,0x40); return; }
30,980
printSettings(Settings const&)
666mxvbee[P]BattleShip/lib/Utils/PrintUtils.cpp
void printSettings(const Settings& settings) { std::cout << "===== Current Settings =====\n" << "Mode: " << settings.getMode() << "\n" << "Width: " << settings.getWidth() << "\n" << "Height: " << settings.getHeight() << "\n" << "Ship Counts:\n"; for (auto& [type, count] : settings.getShipCounts()) { std::cout << " - Type " << type << " => " << count << "\n"; } std::cout << "Start: " << (settings.getStart() ? "Yes" : "No") << "\n" << "Stop: " << (settings.getStop() ? "Yes" : "No") << "\n" << "Exit: " << (settings.getExit() ? "Yes" : "No") << "\n" << "============================\n"; }
O0
cpp
printSettings(Settings const&): pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0x8(%rbp) movq 0x1ee0a(%rip), %rdi # 0x5df90 leaq 0x2ab1(%rip), %rsi # 0x41c3e callq 0x7380 movq %rax, %rdi leaq 0x2ac0(%rip), %rsi # 0x41c5c callq 0x7380 movq %rax, -0x80(%rbp) movq -0x8(%rbp), %rsi leaq -0x28(%rbp), %rdi movq %rdi, -0x78(%rbp) callq 0x9780 movq -0x80(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x7350 movq %rax, -0x70(%rbp) jmp 0x3f1c9 movq -0x70(%rbp), %rdi leaq 0x27a9(%rip), %rsi # 0x4197d callq 0x7380 movq %rax, -0x88(%rbp) jmp 0x3f1e2 movq -0x88(%rbp), %rdi leaq 0x2a73(%rip), %rsi # 0x41c63 callq 0x7380 movq %rax, -0x90(%rbp) jmp 0x3f1fe movq -0x8(%rbp), %rdi callq 0x99a0 movq %rax, -0x98(%rbp) jmp 0x3f210 movq -0x98(%rbp), %rsi movq -0x90(%rbp), %rdi callq 0x70a0 movq %rax, -0xa0(%rbp) jmp 0x3f22c movq -0xa0(%rbp), %rdi leaq 0x2743(%rip), %rsi # 0x4197d callq 0x7380 movq %rax, -0xa8(%rbp) jmp 0x3f248 movq -0xa8(%rbp), %rdi leaq 0x2a15(%rip), %rsi # 0x41c6b callq 0x7380 movq %rax, -0xb0(%rbp) jmp 0x3f264 movq -0x8(%rbp), %rdi callq 0x9b90 movq %rax, -0xb8(%rbp) jmp 0x3f276 movq -0xb8(%rbp), %rsi movq -0xb0(%rbp), %rdi callq 0x70a0 movq %rax, -0xc0(%rbp) jmp 0x3f292 movq -0xc0(%rbp), %rdi leaq 0x26dd(%rip), %rsi # 0x4197d callq 0x7380 movq %rax, -0xc8(%rbp) jmp 0x3f2ae movq -0xc8(%rbp), %rdi leaq 0x29b8(%rip), %rsi # 0x41c74 callq 0x7380 jmp 0x3f2c3 leaq -0x28(%rbp), %rdi callq 0x7e50 movq -0x8(%rbp), %rdi callq 0x9f90 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rdi callq 0xb850 movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rdi callq 0xb660 movq %rax, -0x50(%rbp) leaq -0x48(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0xb630 xorb $-0x1, %al testb $0x1, %al jne 0x3f30b jmp 0x3f3a8 leaq -0x48(%rbp), %rdi callq 0xb880 movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi callq 0xb8a0 movq %rax, -0x60(%rbp) movq -0x58(%rbp), %rdi callq 0xb8c0 movq %rax, -0x68(%rbp) movq 0x1ec57(%rip), %rdi # 0x5df90 leaq 0x2942(%rip), %rsi # 0x41c82 callq 0x7380 movq %rax, %rdi movq -0x60(%rbp), %rax movl (%rax), %esi callq 0x7620 movq %rax, %rdi leaq 0x292f(%rip), %rsi # 0x41c8c callq 0x7380 movq %rax, %rdi movq -0x68(%rbp), %rax movq (%rax), %rsi callq 0x70a0 movq %rax, %rdi leaq 0x2602(%rip), %rsi # 0x4197d callq 0x7380 leaq -0x48(%rbp), %rdi callq 0xb8e0 jmp 0x3f2f3 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x30(%rbp) movl %eax, -0x34(%rbp) leaq -0x28(%rbp), %rdi callq 0x7e50 jmp 0x3f4b7 movq 0x1ebe1(%rip), %rdi # 0x5df90 leaq 0x28db(%rip), %rsi # 0x41c91 callq 0x7380 movq %rax, -0xe0(%rbp) movq -0x8(%rbp), %rdi callq 0xa4c0 movq -0xe0(%rbp), %rdi movb %al, %cl leaq 0x28c2(%rip), %rsi # 0x41c9d leaq 0x28b7(%rip), %rax # 0x41c99 testb $0x1, %cl cmovneq %rax, %rsi callq 0x7380 movq %rax, %rdi leaq 0x2585(%rip), %rsi # 0x4197d callq 0x7380 movq %rax, %rdi leaq 0x2899(%rip), %rsi # 0x41ca0 callq 0x7380 movq %rax, -0xd8(%rbp) movq -0x8(%rbp), %rdi callq 0xa600 movq -0xd8(%rbp), %rdi movb %al, %cl leaq 0x2871(%rip), %rsi # 0x41c9d leaq 0x2866(%rip), %rax # 0x41c99 testb $0x1, %cl cmovneq %rax, %rsi callq 0x7380 movq %rax, %rdi leaq 0x2534(%rip), %rsi # 0x4197d callq 0x7380 movq %rax, %rdi leaq 0x284f(%rip), %rsi # 0x41ca7 callq 0x7380 movq %rax, -0xd0(%rbp) movq -0x8(%rbp), %rdi callq 0xa740 movq -0xd0(%rbp), %rdi movb %al, %cl leaq 0x2820(%rip), %rsi # 0x41c9d leaq 0x2815(%rip), %rax # 0x41c99 testb $0x1, %cl cmovneq %rax, %rsi callq 0x7380 movq %rax, %rdi leaq 0x24e3(%rip), %rsi # 0x4197d callq 0x7380 movq %rax, %rdi leaq 0x2805(%rip), %rsi # 0x41cae callq 0x7380 addq $0xe0, %rsp popq %rbp retq movq -0x30(%rbp), %rdi callq 0x7640
_Z13printSettingsRK8Settings: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_8], rdi mov rdi, cs:_ZSt4cout_ptr lea rsi, aCurrentSetting; "===== Current Settings =====\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax lea rsi, aMode_1; "Mode: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_80], rax mov rsi, [rbp+var_8] lea rdi, [rbp+var_28] mov [rbp+var_78], rdi call _ZNK8Settings7getModeB5cxx11Ev; Settings::getMode(void) mov rdi, [rbp+var_80] mov rsi, [rbp+var_78] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_70], rax jmp short $+2 loc_3F1C9: mov rdi, [rbp+var_70] lea rsi, aMasterSlaveShi+28h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_88], rax jmp short $+2 loc_3F1E2: mov rdi, [rbp+var_88] lea rsi, aWidth_1; "Width: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_90], rax jmp short $+2 loc_3F1FE: mov rdi, [rbp+var_8]; this call _ZNK8Settings8getWidthEv; Settings::getWidth(void) mov [rbp+var_98], rax jmp short $+2 loc_3F210: mov rsi, [rbp+var_98] mov rdi, [rbp+var_90] call __ZNSolsEm; std::ostream::operator<<(ulong) mov [rbp+var_A0], rax jmp short $+2 loc_3F22C: mov rdi, [rbp+var_A0] lea rsi, aMasterSlaveShi+28h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_A8], rax jmp short $+2 loc_3F248: mov rdi, [rbp+var_A8] lea rsi, aHeight_1; "Height: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_B0], rax jmp short $+2 loc_3F264: mov rdi, [rbp+var_8]; this call _ZNK8Settings9getHeightEv; Settings::getHeight(void) mov [rbp+var_B8], rax jmp short $+2 loc_3F276: mov rsi, [rbp+var_B8] mov rdi, [rbp+var_B0] call __ZNSolsEm; std::ostream::operator<<(ulong) mov [rbp+var_C0], rax jmp short $+2 loc_3F292: mov rdi, [rbp+var_C0] lea rsi, aMasterSlaveShi+28h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_C8], rax jmp short $+2 loc_3F2AE: mov rdi, [rbp+var_C8] lea rsi, aShipCounts; "Ship Counts:\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_3F2C3: lea rdi, [rbp+var_28] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rbp+var_8]; this call _ZNK8Settings13getShipCountsEv; Settings::getShipCounts(void) mov [rbp+var_40], rax mov rdi, [rbp+var_40] call _ZNKSt3mapIimSt4lessIiESaISt4pairIKimEEE5beginEv; std::map<int,ulong>::begin(void) mov [rbp+var_48], rax mov rdi, [rbp+var_40] call _ZNKSt3mapIimSt4lessIiESaISt4pairIKimEEE3endEv; std::map<int,ulong>::end(void) mov [rbp+var_50], rax loc_3F2F3: lea rdi, [rbp+var_48] lea rsi, [rbp+var_50] call _ZSteqRKSt23_Rb_tree_const_iteratorISt4pairIKimEES5_; std::operator==(std::_Rb_tree_const_iterator<std::pair<int const,ulong>> const&,std::_Rb_tree_const_iterator<std::pair<int const,ulong>> const&) xor al, 0FFh test al, 1 jnz short loc_3F30B jmp loc_3F3A8 loc_3F30B: lea rdi, [rbp+var_48] call _ZNKSt23_Rb_tree_const_iteratorISt4pairIKimEEdeEv; std::_Rb_tree_const_iterator<std::pair<int const,ulong>>::operator*(void) mov [rbp+var_58], rax mov rdi, [rbp+var_58] call _ZSt3getILm0EKimERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS5_; std::get<0ul,int const,ulong>(std::pair<int const,ulong> const&) mov [rbp+var_60], rax mov rdi, [rbp+var_58] call _ZSt3getILm1EKimERKNSt13tuple_elementIXT_ESt4pairIT0_T1_EE4typeERKS5_; std::get<1ul,int const,ulong>(std::pair<int const,ulong> const&) mov [rbp+var_68], rax mov rdi, cs:_ZSt4cout_ptr lea rsi, aType; " - Type " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rax, [rbp+var_60] mov esi, [rax] call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax lea rsi, asc_41C8C; " => " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rax, [rbp+var_68] mov rsi, [rax] call __ZNSolsEm; std::ostream::operator<<(ulong) mov rdi, rax lea rsi, aMasterSlaveShi+28h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rdi, [rbp+var_48] call _ZNSt23_Rb_tree_const_iteratorISt4pairIKimEEppEv; std::_Rb_tree_const_iterator<std::pair<int const,ulong>>::operator++(void) jmp loc_3F2F3 mov rcx, rax mov eax, edx mov [rbp+var_30], rcx mov [rbp+var_34], eax lea rdi, [rbp+var_28] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_3F4B7 loc_3F3A8: mov rdi, cs:_ZSt4cout_ptr lea rsi, aStart_1; "Start: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_E0], rax mov rdi, [rbp+var_8]; this call _ZNK8Settings8getStartEv; Settings::getStart(void) mov rdi, [rbp+var_E0] mov cl, al lea rsi, aNo; "No" lea rax, aYes; "Yes" test cl, 1 cmovnz rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax lea rsi, aMasterSlaveShi+28h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax lea rsi, aStop_1; "Stop: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_D8], rax mov rdi, [rbp+var_8]; this call _ZNK8Settings7getStopEv; Settings::getStop(void) mov rdi, [rbp+var_D8] mov cl, al lea rsi, aNo; "No" lea rax, aYes; "Yes" test cl, 1 cmovnz rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax lea rsi, aMasterSlaveShi+28h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax lea rsi, aExit_1; "Exit: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_D0], rax mov rdi, [rbp+var_8]; this call _ZNK8Settings7getExitEv; Settings::getExit(void) mov rdi, [rbp+var_D0] mov cl, al lea rsi, aNo; "No" lea rax, aYes; "Yes" test cl, 1 cmovnz rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax lea rsi, aMasterSlaveShi+28h; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax lea rsi, asc_41CAE; "============================\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) add rsp, 0E0h pop rbp retn loc_3F4B7: mov rdi, [rbp+var_30] call __Unwind_Resume
long long printSettings(const Settings *a1) { long long v1; // rax long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax long long v6; // rdi const char *v7; // rsi long long v8; // rax long long v9; // rax long long v10; // rdi const char *v11; // rsi long long v12; // rax long long v13; // rax long long v14; // rdi const char *v15; // rsi long long v16; // rax long long v17; // rax long long v19; // [rsp+18h] [rbp-C8h] long long v20; // [rsp+20h] [rbp-C0h] long long Height; // [rsp+28h] [rbp-B8h] long long v22; // [rsp+30h] [rbp-B0h] long long v23; // [rsp+38h] [rbp-A8h] long long v24; // [rsp+40h] [rbp-A0h] long long Width; // [rsp+48h] [rbp-98h] long long v26; // [rsp+50h] [rbp-90h] long long v27; // [rsp+58h] [rbp-88h] long long v28; // [rsp+60h] [rbp-80h] long long v29; // [rsp+70h] [rbp-70h] _QWORD *v30; // [rsp+78h] [rbp-68h] unsigned int *v31; // [rsp+80h] [rbp-60h] long long v32; // [rsp+88h] [rbp-58h] long long v33; // [rsp+90h] [rbp-50h] BYREF long long v34; // [rsp+98h] [rbp-48h] BYREF long long ShipCounts; // [rsp+A0h] [rbp-40h] _BYTE v36[32]; // [rsp+B8h] [rbp-28h] BYREF Settings *v37; // [rsp+D8h] [rbp-8h] v37 = a1; v1 = std::operator<<<std::char_traits<char>>(&std::cout, "===== Current Settings =====\n"); v28 = std::operator<<<std::char_traits<char>>(v1, "Mode: "); Settings::getMode[abi:cxx11]((long long)v36, (long long)a1); v29 = std::operator<<<char>(v28, v36); v27 = std::operator<<<std::char_traits<char>>(v29, "\n"); v26 = std::operator<<<std::char_traits<char>>(v27, "Width: "); Width = Settings::getWidth(v37); v24 = std::ostream::operator<<(v26, Width); v23 = std::operator<<<std::char_traits<char>>(v24, "\n"); v22 = std::operator<<<std::char_traits<char>>(v23, "Height: "); Height = Settings::getHeight(v37); v20 = std::ostream::operator<<(v22, Height); v19 = std::operator<<<std::char_traits<char>>(v20, "\n"); std::operator<<<std::char_traits<char>>(v19, "Ship Counts:\n"); std::string::~string((long long)v36); ShipCounts = Settings::getShipCounts(v37); v34 = std::map<int,unsigned long>::begin(ShipCounts); v33 = std::map<int,unsigned long>::end(ShipCounts); while ( !std::operator==(&v34, &v33) ) { v32 = std::_Rb_tree_const_iterator<std::pair<int const,unsigned long>>::operator*(&v34); v31 = (unsigned int *)std::get<0ul,int const,unsigned long>(v32); v30 = (_QWORD *)std::get<1ul,int const,unsigned long>(v32); v2 = std::operator<<<std::char_traits<char>>(&std::cout, " - Type "); v3 = std::ostream::operator<<(v2, *v31); v4 = std::operator<<<std::char_traits<char>>(v3, " => "); v5 = std::ostream::operator<<(v4, *v30); std::operator<<<std::char_traits<char>>(v5, "\n"); std::_Rb_tree_const_iterator<std::pair<int const,unsigned long>>::operator++(&v34); } v6 = std::operator<<<std::char_traits<char>>(&std::cout, "Start: "); v7 = "No"; if ( (Settings::getStart(v37) & 1) != 0 ) v7 = "Yes"; v8 = std::operator<<<std::char_traits<char>>(v6, v7); v9 = std::operator<<<std::char_traits<char>>(v8, "\n"); v10 = std::operator<<<std::char_traits<char>>(v9, "Stop: "); v11 = "No"; if ( (Settings::getStop(v37) & 1) != 0 ) v11 = "Yes"; v12 = std::operator<<<std::char_traits<char>>(v10, v11); v13 = std::operator<<<std::char_traits<char>>(v12, "\n"); v14 = std::operator<<<std::char_traits<char>>(v13, "Exit: "); v15 = "No"; if ( (Settings::getExit(v37) & 1) != 0 ) v15 = "Yes"; v16 = std::operator<<<std::char_traits<char>>(v14, v15); v17 = std::operator<<<std::char_traits<char>>(v16, "\n"); return std::operator<<<std::char_traits<char>>(v17, "============================\n"); }
printSettings: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [0x0015df90] LEA RSI,[0x141c3e] CALL 0x00107380 MOV RDI,RAX LEA RSI,[0x141c5c] CALL 0x00107380 MOV qword ptr [RBP + -0x80],RAX MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0x78],RDI CALL 0x00109780 MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x78] LAB_0013f1be: CALL 0x00107350 MOV qword ptr [RBP + -0x70],RAX JMP 0x0013f1c9 LAB_0013f1c9: MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[0x14197d] CALL 0x00107380 MOV qword ptr [RBP + -0x88],RAX JMP 0x0013f1e2 LAB_0013f1e2: MOV RDI,qword ptr [RBP + -0x88] LEA RSI,[0x141c63] CALL 0x00107380 MOV qword ptr [RBP + -0x90],RAX JMP 0x0013f1fe LAB_0013f1fe: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001099a0 MOV qword ptr [RBP + -0x98],RAX JMP 0x0013f210 LAB_0013f210: MOV RSI,qword ptr [RBP + -0x98] MOV RDI,qword ptr [RBP + -0x90] CALL 0x001070a0 MOV qword ptr [RBP + -0xa0],RAX JMP 0x0013f22c LAB_0013f22c: MOV RDI,qword ptr [RBP + -0xa0] LEA RSI,[0x14197d] CALL 0x00107380 MOV qword ptr [RBP + -0xa8],RAX JMP 0x0013f248 LAB_0013f248: MOV RDI,qword ptr [RBP + -0xa8] LEA RSI,[0x141c6b] CALL 0x00107380 MOV qword ptr [RBP + -0xb0],RAX JMP 0x0013f264 LAB_0013f264: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00109b90 MOV qword ptr [RBP + -0xb8],RAX JMP 0x0013f276 LAB_0013f276: MOV RSI,qword ptr [RBP + -0xb8] MOV RDI,qword ptr [RBP + -0xb0] CALL 0x001070a0 MOV qword ptr [RBP + -0xc0],RAX JMP 0x0013f292 LAB_0013f292: MOV RDI,qword ptr [RBP + -0xc0] LEA RSI,[0x14197d] CALL 0x00107380 MOV qword ptr [RBP + -0xc8],RAX JMP 0x0013f2ae LAB_0013f2ae: MOV RDI,qword ptr [RBP + -0xc8] LEA RSI,[0x141c74] CALL 0x00107380 LAB_0013f2c1: JMP 0x0013f2c3 LAB_0013f2c3: LEA RDI,[RBP + -0x28] CALL 0x00107e50 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00109f90 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x0010b850 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x0010b660 MOV qword ptr [RBP + -0x50],RAX LAB_0013f2f3: LEA RDI,[RBP + -0x48] LEA RSI,[RBP + -0x50] CALL 0x0010b630 XOR AL,0xff TEST AL,0x1 JNZ 0x0013f30b JMP 0x0013f3a8 LAB_0013f30b: LEA RDI,[RBP + -0x48] CALL 0x0010b880 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] CALL 0x0010b8a0 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x58] CALL 0x0010b8c0 MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [0x0015df90] LEA RSI,[0x141c82] CALL 0x00107380 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x60] MOV ESI,dword ptr [RAX] CALL 0x00107620 MOV RDI,RAX LEA RSI,[0x141c8c] CALL 0x00107380 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x68] MOV RSI,qword ptr [RAX] CALL 0x001070a0 MOV RDI,RAX LEA RSI,[0x14197d] CALL 0x00107380 LEA RDI,[RBP + -0x48] CALL 0x0010b8e0 JMP 0x0013f2f3 LAB_0013f3a8: MOV RDI,qword ptr [0x0015df90] LEA RSI,[0x141c91] CALL 0x00107380 MOV qword ptr [RBP + -0xe0],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010a4c0 MOV RDI,qword ptr [RBP + -0xe0] MOV CL,AL LEA RSI,[0x141c9d] LEA RAX,[0x141c99] TEST CL,0x1 CMOVNZ RSI,RAX CALL 0x00107380 MOV RDI,RAX LEA RSI,[0x14197d] CALL 0x00107380 MOV RDI,RAX LEA RSI,[0x141ca0] CALL 0x00107380 MOV qword ptr [RBP + -0xd8],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010a600 MOV RDI,qword ptr [RBP + -0xd8] MOV CL,AL LEA RSI,[0x141c9d] LEA RAX,[0x141c99] TEST CL,0x1 CMOVNZ RSI,RAX CALL 0x00107380 MOV RDI,RAX LEA RSI,[0x14197d] CALL 0x00107380 MOV RDI,RAX LEA RSI,[0x141ca7] CALL 0x00107380 MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010a740 MOV RDI,qword ptr [RBP + -0xd0] MOV CL,AL LEA RSI,[0x141c9d] LEA RAX,[0x141c99] TEST CL,0x1 CMOVNZ RSI,RAX CALL 0x00107380 MOV RDI,RAX LEA RSI,[0x14197d] CALL 0x00107380 MOV RDI,RAX LEA RSI,[0x141cae] CALL 0x00107380 ADD RSP,0xe0 POP RBP RET
/* printSettings(Settings const&) */ void printSettings(Settings *param_1) { byte bVar1; ostream *poVar2; ulong uVar3; pair *ppVar4; type *ptVar5; type *ptVar6; char *pcVar7; int8 local_58; int8 local_50; map<int,unsigned_long,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> *local_48 ; string local_30 [32]; Settings *local_10; local_10 = param_1; poVar2 = std::operator<<((ostream *)PTR_cout_0015df90,"===== Current Settings =====\n"); poVar2 = std::operator<<(poVar2,"Mode: "); Settings::getMode_abi_cxx11_(); /* try { // try from 0013f1be to 0013f2c0 has its CatchHandler @ 0013f38e */ poVar2 = std::operator<<(poVar2,local_30); poVar2 = std::operator<<(poVar2,"\n"); poVar2 = std::operator<<(poVar2,"Width: "); uVar3 = Settings::getWidth(local_10); poVar2 = (ostream *)std::ostream::operator<<(poVar2,uVar3); poVar2 = std::operator<<(poVar2,"\n"); poVar2 = std::operator<<(poVar2,"Height: "); uVar3 = Settings::getHeight(local_10); poVar2 = (ostream *)std::ostream::operator<<(poVar2,uVar3); poVar2 = std::operator<<(poVar2,"\n"); std::operator<<(poVar2,"Ship Counts:\n"); std::__cxx11::string::~string(local_30); local_48 = (map<int,unsigned_long,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> *)Settings::getShipCounts(local_10); local_50 = std:: map<int,unsigned_long,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> ::begin(local_48); local_58 = std:: map<int,unsigned_long,std::less<int>,std::allocator<std::pair<int_const,unsigned_long>>> ::end(local_48); while( true ) { bVar1 = std::operator==((_Rb_tree_const_iterator *)&local_50, (_Rb_tree_const_iterator *)&local_58); if (((bVar1 ^ 0xff) & 1) == 0) break; ppVar4 = (pair *)std::_Rb_tree_const_iterator<std::pair<int_const,unsigned_long>>::operator* ((_Rb_tree_const_iterator<std::pair<int_const,unsigned_long>> *) &local_50); ptVar5 = std::get<0ul,int_const,unsigned_long>(ppVar4); ptVar6 = std::get<1ul,int_const,unsigned_long>(ppVar4); poVar2 = std::operator<<((ostream *)PTR_cout_0015df90," - Type "); poVar2 = (ostream *)std::ostream::operator<<(poVar2,*(int *)ptVar5); poVar2 = std::operator<<(poVar2," => "); poVar2 = (ostream *)std::ostream::operator<<(poVar2,*(ulong *)ptVar6); std::operator<<(poVar2,"\n"); std::_Rb_tree_const_iterator<std::pair<int_const,unsigned_long>>::operator++ ((_Rb_tree_const_iterator<std::pair<int_const,unsigned_long>> *)&local_50); } poVar2 = std::operator<<((ostream *)PTR_cout_0015df90,"Start: "); bVar1 = Settings::getStart(local_10); pcVar7 = "No"; if ((bVar1 & 1) != 0) { pcVar7 = "Yes"; } poVar2 = std::operator<<(poVar2,pcVar7); poVar2 = std::operator<<(poVar2,"\n"); poVar2 = std::operator<<(poVar2,"Stop: "); bVar1 = Settings::getStop(local_10); pcVar7 = "No"; if ((bVar1 & 1) != 0) { pcVar7 = "Yes"; } poVar2 = std::operator<<(poVar2,pcVar7); poVar2 = std::operator<<(poVar2,"\n"); poVar2 = std::operator<<(poVar2,"Exit: "); bVar1 = Settings::getExit(local_10); pcVar7 = "No"; if ((bVar1 & 1) != 0) { pcVar7 = "Yes"; } poVar2 = std::operator<<(poVar2,pcVar7); poVar2 = std::operator<<(poVar2,"\n"); std::operator<<(poVar2,"============================\n"); return; }
30,981
printSettings(Settings const&)
666mxvbee[P]BattleShip/lib/Utils/PrintUtils.cpp
void printSettings(const Settings& settings) { std::cout << "===== Current Settings =====\n" << "Mode: " << settings.getMode() << "\n" << "Width: " << settings.getWidth() << "\n" << "Height: " << settings.getHeight() << "\n" << "Ship Counts:\n"; for (auto& [type, count] : settings.getShipCounts()) { std::cout << " - Type " << type << " => " << count << "\n"; } std::cout << "Start: " << (settings.getStart() ? "Yes" : "No") << "\n" << "Stop: " << (settings.getStop() ? "Yes" : "No") << "\n" << "Exit: " << (settings.getExit() ? "Yes" : "No") << "\n" << "============================\n"; }
O1
cpp
printSettings(Settings const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %r15 movq 0xbef0(%rip), %rbx # 0x24fa0 leaq 0x2aec(%rip), %rsi # 0x1bba3 movl $0x1d, %edx movq %rbx, %rdi callq 0x5420 leaq 0x2af6(%rip), %rsi # 0x1bbc1 movl $0x6, %edx movq %rbx, %rdi callq 0x5420 leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x62be movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x5420 movq %rax, %rbx leaq 0x27e1(%rip), %rsi # 0x1b8e2 movl $0x1, %edx movq %rax, %rdi callq 0x5420 leaq 0x2ab3(%rip), %rsi # 0x1bbc8 movl $0x7, %edx movq %rbx, %rdi callq 0x5420 movq %r15, %rdi callq 0x64aa movq %rbx, %rdi movq %rax, %rsi callq 0x5270 movq %rax, %rbx leaq 0x27a3(%rip), %rsi # 0x1b8e2 movl $0x1, %edx movq %rax, %rdi callq 0x5420 leaq 0x2a7d(%rip), %rsi # 0x1bbd0 movl $0x8, %edx movq %rbx, %rdi callq 0x5420 movq %r15, %rdi callq 0x6666 movq %rbx, %rdi movq %rax, %rsi callq 0x5270 movq %rax, %rbx leaq 0x2765(%rip), %rsi # 0x1b8e2 movl $0x1, %edx movq %rax, %rdi callq 0x5420 leaq 0x2a48(%rip), %rsi # 0x1bbd9 movl $0xd, %edx movq %rbx, %rdi callq 0x5420 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x191b9 movq 0x18(%rsp), %rsi incq %rsi callq 0x53a0 movq %r15, (%rsp) movq %r15, %rdi callq 0x6860 movq %rax, %r14 movq 0x18(%rax), %r15 addq $0x8, %r14 cmpq %r14, %r15 je 0x19249 movq 0xbdc4(%rip), %r12 # 0x24fa0 leaq 0x2a0e(%rip), %rbp # 0x1bbf1 leaq 0x26f8(%rip), %rbx # 0x1b8e2 movl $0x9, %edx movq %r12, %rdi leaq 0x29ee(%rip), %rsi # 0x1bbe7 callq 0x5420 movl 0x20(%r15), %esi movq %r12, %rdi callq 0x55e0 movq %rax, %r13 movl $0x4, %edx movq %rax, %rdi movq %rbp, %rsi callq 0x5420 movq 0x28(%r15), %rsi movq %r13, %rdi callq 0x5270 movl $0x1, %edx movq %rax, %rdi movq %rbx, %rsi callq 0x5420 movq %r15, %rdi callq 0x5440 movq %rax, %r15 cmpq %r14, %rax jne 0x191ea movq 0xbd50(%rip), %r14 # 0x24fa0 leaq 0x299f(%rip), %rsi # 0x1bbf6 movl $0x7, %edx movq %r14, %rdi callq 0x5420 movq (%rsp), %r13 movq %r13, %rdi callq 0x6c5c leaq 0x2987(%rip), %rbx # 0x1bbfe leaq 0x2984(%rip), %r15 # 0x1bc02 testb %al, %al movq %r15, %rsi cmovneq %rbx, %rsi movzbl %al, %edx orq $0x2, %rdx movq %r14, %rdi callq 0x5420 leaq 0x2645(%rip), %r12 # 0x1b8e2 movl $0x1, %edx movq %r14, %rdi movq %r12, %rsi callq 0x5420 leaq 0x2951(%rip), %rsi # 0x1bc05 movl $0x6, %edx movq %r14, %rdi callq 0x5420 movq %r13, %rdi callq 0x6d14 testb %al, %al movq %r15, %rsi cmovneq %rbx, %rsi movzbl %al, %edx orq $0x2, %rdx movq %r14, %rdi callq 0x5420 movl $0x1, %edx movq %r14, %rdi movq %r12, %rsi callq 0x5420 leaq 0x2914(%rip), %rsi # 0x1bc0c movl $0x6, %edx movq %r14, %rdi callq 0x5420 movq %r13, %rdi callq 0x6dcc testb %al, %al cmovneq %rbx, %r15 movzbl %al, %edx orq $0x2, %rdx movq %r14, %rdi movq %r15, %rsi callq 0x5420 movl $0x1, %edx movq %r14, %rdi movq %r12, %rsi callq 0x5420 leaq 0x28d7(%rip), %rsi # 0x1bc13 movl $0x1d, %edx movq %r14, %rdi callq 0x5420 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x19376 movq 0x18(%rsp), %rsi incq %rsi callq 0x53a0 movq %rbx, %rdi callq 0x5600
_Z13printSettingsRK8Settings: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdi mov rbx, cs:_ZSt4cout_ptr lea rsi, aCurrentSetting; "===== Current Settings =====\n" mov edx, 1Dh 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) lea rsi, aMode_1; "Mode: " mov edx, 6 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) lea r14, [rsp+58h+var_50] mov rdi, r14 mov rsi, r15 call _ZNK8Settings7getModeB5cxx11Ev; Settings::getMode(void) mov rsi, [r14] mov rdx, [r14+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, rax lea rsi, aMasterSlaveShi+28h; "\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) lea rsi, aWidth_1; "Width: " mov edx, 7 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 rdi, r15; this call _ZNK8Settings8getWidthEv; Settings::getWidth(void) mov rdi, rbx mov rsi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rbx, rax lea rsi, aMasterSlaveShi+28h; "\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) lea rsi, aHeight_1; "Height: " 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 rdi, r15; this call _ZNK8Settings9getHeightEv; Settings::getHeight(void) mov rdi, rbx mov rsi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rbx, rax lea rsi, aMasterSlaveShi+28h; "\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) lea rsi, aShipCounts; "Ship Counts:\n" mov edx, 0Dh 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) lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_191B9 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_191B9: mov [rsp+58h+var_58], r15 mov rdi, r15; this call _ZNK8Settings13getShipCountsEv; Settings::getShipCounts(void) mov r14, rax mov r15, [rax+18h] add r14, 8 cmp r15, r14 jz short loc_19249 mov r12, cs:_ZSt4cout_ptr lea rbp, asc_1BBF1; " => " lea rbx, aMasterSlaveShi+28h; "\n" loc_191EA: mov edx, 9 mov rdi, r12 lea rsi, aType; " - Type " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r15+20h] mov rdi, r12 call __ZNSolsEi; std::ostream::operator<<(int) mov r13, rax mov edx, 4 mov rdi, rax mov rsi, rbp call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r15+28h] mov rdi, r13 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov edx, 1 mov rdi, rax mov rsi, 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 rdi, r15 call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*) mov r15, rax cmp rax, r14 jnz short loc_191EA loc_19249: mov r14, cs:_ZSt4cout_ptr lea rsi, aStart_1; "Start: " mov edx, 7 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r13, [rsp+58h+var_58] mov rdi, r13; this call _ZNK8Settings8getStartEv; Settings::getStart(void) lea rbx, aYes; "Yes" lea r15, aNo; "No" test al, al mov rsi, r15 cmovnz rsi, rbx movzx edx, al or rdx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea r12, aMasterSlaveShi+28h; "\n" mov edx, 1 mov rdi, r14 mov rsi, r12 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, aStop_1; "Stop: " mov edx, 6 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r13; this call _ZNK8Settings7getStopEv; Settings::getStop(void) test al, al mov rsi, r15 cmovnz rsi, rbx movzx edx, al or rdx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, r14 mov rsi, r12 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, aExit_1; "Exit: " mov edx, 6 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r13; this call _ZNK8Settings7getExitEv; Settings::getExit(void) test al, al cmovnz r15, rbx movzx edx, al or rdx, 2 mov rdi, r14 mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, r14 mov rsi, r12 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_1BC13; "============================\n" mov edx, 1Dh mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_19376 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_19376: mov rdi, rbx call __Unwind_Resume
long long printSettings(const Settings *this) { long long v1; // rbx long long Width; // rax long long v3; // rbx long long Height; // rax long long v5; // rbx long long ShipCounts; // rax long long v7; // r15 long long i; // r14 long long v9; // r13 long long v10; // rax unsigned __int8 Start; // al const char *v12; // r15 const char *v13; // rsi unsigned __int8 Stop; // al const char *v15; // rsi unsigned __int8 Exit; // al void *v18[2]; // [rsp+8h] [rbp-50h] BYREF long long v19; // [rsp+18h] [rbp-40h] BYREF std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "===== Current Settings =====\n", 29LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Mode: ", 6LL); Settings::getMode[abi:cxx11](v18, (long long)this); v1 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v18[0], v18[1]); std::__ostream_insert<char,std::char_traits<char>>(v1, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(v1, "Width: ", 7LL); Width = Settings::getWidth(this); v3 = std::ostream::_M_insert<unsigned long>(v1, Width); std::__ostream_insert<char,std::char_traits<char>>(v3, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(v3, "Height: ", 8LL); Height = Settings::getHeight(this); v5 = std::ostream::_M_insert<unsigned long>(v3, Height); std::__ostream_insert<char,std::char_traits<char>>(v5, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(v5, "Ship Counts:\n", 13LL); if ( v18[0] != &v19 ) operator delete(v18[0], v19 + 1); ShipCounts = Settings::getShipCounts(this); v7 = *(_QWORD *)(ShipCounts + 24); for ( i = ShipCounts + 8; v7 != i; v7 = std::_Rb_tree_increment(v7) ) { std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " - Type ", 9LL); v9 = std::ostream::operator<<(&std::cout, *(unsigned int *)(v7 + 32)); std::__ostream_insert<char,std::char_traits<char>>(v9, " => ", 4LL); v10 = std::ostream::_M_insert<unsigned long>(v9, *(_QWORD *)(v7 + 40)); std::__ostream_insert<char,std::char_traits<char>>(v10, "\n", 1LL); } std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Start: ", 7LL); Start = Settings::getStart(this); v12 = "No"; v13 = "No"; if ( Start ) v13 = "Yes"; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v13, Start | 2LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Stop: ", 6LL); Stop = Settings::getStop(this); v15 = "No"; if ( Stop ) v15 = "Yes"; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v15, Stop | 2LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Exit: ", 6LL); Exit = Settings::getExit(this); if ( Exit ) v12 = "Yes"; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v12, Exit | 2LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "\n", 1LL); return std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "============================\n", 29LL); }
printSettings: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDI MOV RBX,qword ptr [0x00124fa0] LEA RSI,[0x11bba3] MOV EDX,0x1d MOV RDI,RBX CALL 0x00105420 LEA RSI,[0x11bbc1] MOV EDX,0x6 MOV RDI,RBX CALL 0x00105420 LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,R15 CALL 0x001062be MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_001190ef: MOV RDI,RBX CALL 0x00105420 MOV RBX,RAX LEA RSI,[0x11b8e2] MOV EDX,0x1 MOV RDI,RAX CALL 0x00105420 LEA RSI,[0x11bbc8] MOV EDX,0x7 MOV RDI,RBX CALL 0x00105420 MOV RDI,R15 CALL 0x001064aa MOV RDI,RBX MOV RSI,RAX CALL 0x00105270 MOV RBX,RAX LEA RSI,[0x11b8e2] MOV EDX,0x1 MOV RDI,RAX CALL 0x00105420 LEA RSI,[0x11bbd0] MOV EDX,0x8 MOV RDI,RBX CALL 0x00105420 MOV RDI,R15 CALL 0x00106666 MOV RDI,RBX MOV RSI,RAX CALL 0x00105270 MOV RBX,RAX LEA RSI,[0x11b8e2] MOV EDX,0x1 MOV RDI,RAX CALL 0x00105420 LEA RSI,[0x11bbd9] MOV EDX,0xd MOV RDI,RBX CALL 0x00105420 LAB_0011919e: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001191b9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001053a0 LAB_001191b9: MOV qword ptr [RSP],R15 MOV RDI,R15 CALL 0x00106860 MOV R14,RAX MOV R15,qword ptr [RAX + 0x18] ADD R14,0x8 CMP R15,R14 JZ 0x00119249 MOV R12,qword ptr [0x00124fa0] LEA RBP,[0x11bbf1] LEA RBX,[0x11b8e2] LAB_001191ea: MOV EDX,0x9 MOV RDI,R12 LEA RSI,[0x11bbe7] CALL 0x00105420 MOV ESI,dword ptr [R15 + 0x20] MOV RDI,R12 CALL 0x001055e0 MOV R13,RAX MOV EDX,0x4 MOV RDI,RAX MOV RSI,RBP CALL 0x00105420 MOV RSI,qword ptr [R15 + 0x28] MOV RDI,R13 CALL 0x00105270 MOV EDX,0x1 MOV RDI,RAX MOV RSI,RBX CALL 0x00105420 MOV RDI,R15 CALL 0x00105440 MOV R15,RAX CMP RAX,R14 JNZ 0x001191ea LAB_00119249: MOV R14,qword ptr [0x00124fa0] LEA RSI,[0x11bbf6] MOV EDX,0x7 MOV RDI,R14 CALL 0x00105420 MOV R13,qword ptr [RSP] MOV RDI,R13 CALL 0x00106c5c LEA RBX,[0x11bbfe] LEA R15,[0x11bc02] TEST AL,AL MOV RSI,R15 CMOVNZ RSI,RBX MOVZX EDX,AL OR RDX,0x2 MOV RDI,R14 CALL 0x00105420 LEA R12,[0x11b8e2] MOV EDX,0x1 MOV RDI,R14 MOV RSI,R12 CALL 0x00105420 LEA RSI,[0x11bc05] MOV EDX,0x6 MOV RDI,R14 CALL 0x00105420 MOV RDI,R13 CALL 0x00106d14 TEST AL,AL MOV RSI,R15 CMOVNZ RSI,RBX MOVZX EDX,AL OR RDX,0x2 MOV RDI,R14 CALL 0x00105420 MOV EDX,0x1 MOV RDI,R14 MOV RSI,R12 CALL 0x00105420 LEA RSI,[0x11bc0c] MOV EDX,0x6 MOV RDI,R14 CALL 0x00105420 MOV RDI,R13 CALL 0x00106dcc TEST AL,AL CMOVNZ R15,RBX MOVZX EDX,AL OR RDX,0x2 MOV RDI,R14 MOV RSI,R15 CALL 0x00105420 MOV EDX,0x1 MOV RDI,R14 MOV RSI,R12 CALL 0x00105420 LEA RSI,[0x11bc13] MOV EDX,0x1d MOV RDI,R14 CALL 0x00105420 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* printSettings(Settings const&) */ void printSettings(Settings *param_1) { int *puVar1; byte bVar2; ostream *poVar3; long lVar4; _Rb_tree_node_base *p_Var5; char *pcVar6; char *pcVar7; long *local_50; long local_48; long local_40 [2]; puVar1 = PTR_cout_00124fa0; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"===== Current Settings =====\n",0x1d); std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar1,"Mode: ",6); Settings::getMode_abi_cxx11_(); /* try { // try from 001190ef to 0011919d has its CatchHandler @ 00119358 */ poVar3 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)puVar1,(char *)local_50,local_48); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Width: ",7); Settings::getWidth(param_1); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Height: ",8); Settings::getHeight(param_1); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Ship Counts:\n",0xd); if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } lVar4 = Settings::getShipCounts(param_1); puVar1 = PTR_cout_00124fa0; p_Var5 = *(_Rb_tree_node_base **)(lVar4 + 0x18); poVar3 = (ostream *)PTR_cout_00124fa0; while (PTR_cout_00124fa0 = poVar3, p_Var5 != (_Rb_tree_node_base *)(lVar4 + 8)) { std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar1," - Type ",9); poVar3 = (ostream *)std::ostream::operator<<((ostream *)puVar1,*(int *)(p_Var5 + 0x20)); std::__ostream_insert<char,std::char_traits<char>>(poVar3," => ",4); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); p_Var5 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var5); poVar3 = (ostream *)PTR_cout_00124fa0; } std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Start: ",7); bVar2 = Settings::getStart(param_1); pcVar7 = "No"; pcVar6 = "No"; if (bVar2 != 0) { pcVar6 = "Yes"; } std::__ostream_insert<char,std::char_traits<char>>(poVar3,pcVar6,(ulong)bVar2 | 2); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Stop: ",6); bVar2 = Settings::getStop(param_1); pcVar6 = "No"; if (bVar2 != 0) { pcVar6 = "Yes"; } std::__ostream_insert<char,std::char_traits<char>>(poVar3,pcVar6,(ulong)bVar2 | 2); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Exit: ",6); bVar2 = Settings::getExit(param_1); if (bVar2 != 0) { pcVar7 = "Yes"; } std::__ostream_insert<char,std::char_traits<char>>(poVar3,pcVar7,(ulong)bVar2 | 2); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"============================\n",0x1d); return; }
30,982
printSettings(Settings const&)
666mxvbee[P]BattleShip/lib/Utils/PrintUtils.cpp
void printSettings(const Settings& settings) { std::cout << "===== Current Settings =====\n" << "Mode: " << settings.getMode() << "\n" << "Width: " << settings.getWidth() << "\n" << "Height: " << settings.getHeight() << "\n" << "Ship Counts:\n"; for (auto& [type, count] : settings.getShipCounts()) { std::cout << " - Type " << type << " => " << count << "\n"; } std::cout << "Start: " << (settings.getStart() ? "Yes" : "No") << "\n" << "Stop: " << (settings.getStop() ? "Yes" : "No") << "\n" << "Exit: " << (settings.getExit() ? "Yes" : "No") << "\n" << "============================\n"; }
O2
cpp
printSettings(Settings const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %r15 movq 0xeb64(%rip), %rdi # 0x24f98 leaq 0x2781(%rip), %rsi # 0x18bbc callq 0x5360 leaq 0x2793(%rip), %rsi # 0x18bda movq %rax, %rdi callq 0x5360 movq %rax, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x5ef8 movq %rbx, %rdi movq %r14, %rsi callq 0x5330 leaq 0x2487(%rip), %rsi # 0x188fb movq %rax, %rdi callq 0x5360 leaq 0x275e(%rip), %rsi # 0x18be1 movq %rax, %rdi callq 0x5360 movq %rax, %rbx movq %r15, %rdi callq 0x6000 movq %rbx, %rdi movq %rax, %rsi callq 0x5270 leaq 0x2453(%rip), %rsi # 0x188fb movq %rax, %rdi callq 0x5360 leaq 0x2732(%rip), %rsi # 0x18be9 movq %rax, %rdi callq 0x5360 movq %rax, %rbx movq %r15, %rdi callq 0x60e8 movq %rbx, %rdi movq %rax, %rsi callq 0x5270 leaq 0x241f(%rip), %rsi # 0x188fb movq %rax, %rdi callq 0x5360 leaq 0x2707(%rip), %rsi # 0x18bf2 movq %rax, %rdi callq 0x5360 leaq 0x8(%rsp), %rdi callq 0x5ac8 movq %r15, (%rsp) movq %r15, %rdi callq 0x6268 movq %rax, %r14 movq 0x18(%rax), %r12 addq $0x8, %r14 movq 0xea7d(%rip), %r15 # 0x24f98 leaq 0x26de(%rip), %r13 # 0x18c00 leaq 0x26e1(%rip), %rbp # 0x18c0a leaq 0x23cb(%rip), %rbx # 0x188fb cmpq %r14, %r12 je 0x1657d movq %r15, %rdi movq %r13, %rsi callq 0x5360 movl 0x20(%r12), %esi movq %rax, %rdi callq 0x5590 movq %rax, %rdi movq %rbp, %rsi callq 0x5360 movq 0x28(%r12), %rsi movq %rax, %rdi callq 0x5270 movq %rax, %rdi movq %rbx, %rsi callq 0x5360 movq %r12, %rdi callq 0x5410 movq %rax, %r12 jmp 0x16530 movq 0xea14(%rip), %rdi # 0x24f98 leaq 0x2684(%rip), %rsi # 0x18c0f callq 0x5360 movq %rax, %rbx movq (%rsp), %r13 movq %r13, %rdi callq 0x64d8 leaq 0x2671(%rip), %r12 # 0x18c17 leaq 0x266e(%rip), %r14 # 0x18c1b testb %al, %al movq %r14, %rsi cmovneq %r12, %rsi movq %rbx, %rdi callq 0x5360 leaq 0x2336(%rip), %r15 # 0x188fb movq %rax, %rdi movq %r15, %rsi callq 0x5360 leaq 0x2647(%rip), %rsi # 0x18c1e movq %rax, %rdi callq 0x5360 movq %rax, %rbx movq %r13, %rdi callq 0x6566 testb %al, %al movq %r14, %rsi cmovneq %r12, %rsi movq %rbx, %rdi callq 0x5360 movq %rax, %rdi movq %r15, %rsi callq 0x5360 leaq 0x2618(%rip), %rsi # 0x18c25 movq %rax, %rdi callq 0x5360 movq %rax, %rbx movq %r13, %rdi callq 0x65f4 testb %al, %al cmovneq %r12, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x5360 movq %rax, %rdi movq %r15, %rsi callq 0x5360 leaq 0x25e9(%rip), %rsi # 0x18c2c movq %rax, %rdi callq 0x5360 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x5ac8 movq %rbx, %rdi callq 0x55b0
_Z13printSettingsRK8Settings: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdi mov rdi, cs:_ZSt4cout_ptr lea rsi, aCurrentSetting; "===== Current Settings =====\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aMode_1; "Mode: " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax lea r14, [rsp+58h+var_50] mov rdi, r14 mov rsi, r15 call _ZNK8Settings7getModeB5cxx11Ev; Settings::getMode(void) mov rdi, rbx mov rsi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rsi, aMasterSlaveShi+28h; "\n" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aWidth_1; "Width: " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rdi, r15; this call _ZNK8Settings8getWidthEv; Settings::getWidth(void) mov rdi, rbx mov rsi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, aMasterSlaveShi+28h; "\n" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aHeight_1; "Height: " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rdi, r15; this call _ZNK8Settings9getHeightEv; Settings::getHeight(void) mov rdi, rbx mov rsi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, aMasterSlaveShi+28h; "\n" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aShipCounts; "Ship Counts:\n" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rdi, [rsp+58h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov [rsp+58h+var_58], r15 mov rdi, r15; this call _ZNK8Settings13getShipCountsEv; Settings::getShipCounts(void) mov r14, rax mov r12, [rax+18h] add r14, 8 mov r15, cs:_ZSt4cout_ptr lea r13, aType; " - Type " lea rbp, asc_18C0A; " => " lea rbx, aMasterSlaveShi+28h; "\n" loc_16530: cmp r12, r14 jz short loc_1657D mov rdi, r15 mov rsi, r13 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov esi, [r12+20h] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, rax mov rsi, rbp call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r12+28h] mov rdi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rdi, rax mov rsi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, r12 call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*) mov r12, rax jmp short loc_16530 loc_1657D: mov rdi, cs:_ZSt4cout_ptr lea rsi, aStart_1; "Start: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov r13, [rsp+58h+var_58] mov rdi, r13; this call _ZNK8Settings8getStartEv; Settings::getStart(void) lea r12, aYes; "Yes" lea r14, aNo; "No" test al, al mov rsi, r14 cmovnz rsi, r12 mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea r15, aMasterSlaveShi+28h; "\n" mov rdi, rax mov rsi, r15 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aStop_1; "Stop: " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rdi, r13; this call _ZNK8Settings7getStopEv; Settings::getStop(void) test al, al mov rsi, r14 cmovnz rsi, r12 mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rsi, r15 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aExit_1; "Exit: " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rdi, r13; this call _ZNK8Settings7getExitEv; Settings::getExit(void) test al, al cmovnz r14, r12 mov rdi, rbx mov rsi, r14 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax mov rsi, r15 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, asc_18C2C; "============================\n" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long printSettings(const Settings *this) { long long v1; // rax long long v2; // rbx long long v3; // rax long long v4; // rax long long v5; // rbx long long Width; // rax long long v7; // rax long long v8; // rax long long v9; // rbx long long Height; // rax long long v11; // rax long long v12; // rax long long ShipCounts; // rax long long v14; // r12 long long v15; // r14 long long v16; // rax long long v17; // rax long long v18; // rax long long v19; // rax long long v20; // rbx const char *v21; // r14 const char *v22; // rsi long long v23; // rax long long v24; // rax long long v25; // rbx const char *v26; // rsi long long v27; // rax long long v28; // rax long long v29; // rbx long long v30; // rax long long v31; // rax _BYTE v33[80]; // [rsp+8h] [rbp-50h] BYREF v1 = std::operator<<<std::char_traits<char>>(&std::cout, "===== Current Settings =====\n"); v2 = std::operator<<<std::char_traits<char>>(v1, "Mode: "); Settings::getMode[abi:cxx11]((long long)v33, this); v3 = std::operator<<<char>(v2, v33); v4 = std::operator<<<std::char_traits<char>>(v3, "\n"); v5 = std::operator<<<std::char_traits<char>>(v4, "Width: "); Width = Settings::getWidth(this); v7 = std::ostream::_M_insert<unsigned long>(v5, Width); v8 = std::operator<<<std::char_traits<char>>(v7, "\n"); v9 = std::operator<<<std::char_traits<char>>(v8, "Height: "); Height = Settings::getHeight(this); v11 = std::ostream::_M_insert<unsigned long>(v9, Height); v12 = std::operator<<<std::char_traits<char>>(v11, "\n"); std::operator<<<std::char_traits<char>>(v12, "Ship Counts:\n"); std::string::~string(); ShipCounts = Settings::getShipCounts(this); v14 = *(_QWORD *)(ShipCounts + 24); v15 = ShipCounts + 8; while ( v14 != v15 ) { v16 = std::operator<<<std::char_traits<char>>(&std::cout, " - Type "); v17 = std::ostream::operator<<(v16, *(unsigned int *)(v14 + 32)); v18 = std::operator<<<std::char_traits<char>>(v17, " => "); v19 = std::ostream::_M_insert<unsigned long>(v18, *(_QWORD *)(v14 + 40)); std::operator<<<std::char_traits<char>>(v19, "\n"); v14 = std::_Rb_tree_increment(v14); } v20 = std::operator<<<std::char_traits<char>>(&std::cout, "Start: "); v21 = "No"; v22 = "No"; if ( (unsigned __int8)Settings::getStart(this) ) v22 = "Yes"; v23 = std::operator<<<std::char_traits<char>>(v20, v22); v24 = std::operator<<<std::char_traits<char>>(v23, "\n"); v25 = std::operator<<<std::char_traits<char>>(v24, "Stop: "); v26 = "No"; if ( (unsigned __int8)Settings::getStop(this) ) v26 = "Yes"; v27 = std::operator<<<std::char_traits<char>>(v25, v26); v28 = std::operator<<<std::char_traits<char>>(v27, "\n"); v29 = std::operator<<<std::char_traits<char>>(v28, "Exit: "); if ( (unsigned __int8)Settings::getExit(this) ) v21 = "Yes"; v30 = std::operator<<<std::char_traits<char>>(v29, v21); v31 = std::operator<<<std::char_traits<char>>(v30, "\n"); return std::operator<<<std::char_traits<char>>(v31, "============================\n"); }
printSettings: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDI MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x118bbc] CALL 0x00105360 LEA RSI,[0x118bda] MOV RDI,RAX CALL 0x00105360 MOV RBX,RAX LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,R15 CALL 0x00105ef8 LAB_00116462: MOV RDI,RBX MOV RSI,R14 CALL 0x00105330 LEA RSI,[0x1188fb] MOV RDI,RAX CALL 0x00105360 LEA RSI,[0x118be1] MOV RDI,RAX CALL 0x00105360 MOV RBX,RAX MOV RDI,R15 CALL 0x00106000 MOV RDI,RBX MOV RSI,RAX CALL 0x00105270 LEA RSI,[0x1188fb] MOV RDI,RAX CALL 0x00105360 LEA RSI,[0x118be9] MOV RDI,RAX CALL 0x00105360 MOV RBX,RAX MOV RDI,R15 CALL 0x001060e8 MOV RDI,RBX MOV RSI,RAX CALL 0x00105270 LEA RSI,[0x1188fb] MOV RDI,RAX CALL 0x00105360 LEA RSI,[0x118bf2] MOV RDI,RAX CALL 0x00105360 LAB_001164f3: LEA RDI,[RSP + 0x8] CALL 0x00105ac8 MOV qword ptr [RSP],R15 MOV RDI,R15 CALL 0x00106268 MOV R14,RAX MOV R12,qword ptr [RAX + 0x18] ADD R14,0x8 MOV R15,qword ptr [0x00124f98] LEA R13,[0x118c00] LEA RBP,[0x118c0a] LEA RBX,[0x1188fb] LAB_00116530: CMP R12,R14 JZ 0x0011657d MOV RDI,R15 MOV RSI,R13 CALL 0x00105360 MOV ESI,dword ptr [R12 + 0x20] MOV RDI,RAX CALL 0x00105590 MOV RDI,RAX MOV RSI,RBP CALL 0x00105360 MOV RSI,qword ptr [R12 + 0x28] MOV RDI,RAX CALL 0x00105270 MOV RDI,RAX MOV RSI,RBX CALL 0x00105360 MOV RDI,R12 CALL 0x00105410 MOV R12,RAX JMP 0x00116530 LAB_0011657d: MOV RDI,qword ptr [0x00124f98] LEA RSI,[0x118c0f] CALL 0x00105360 MOV RBX,RAX MOV R13,qword ptr [RSP] MOV RDI,R13 CALL 0x001064d8 LEA R12,[0x118c17] LEA R14,[0x118c1b] TEST AL,AL MOV RSI,R14 CMOVNZ RSI,R12 MOV RDI,RBX CALL 0x00105360 LEA R15,[0x1188fb] MOV RDI,RAX MOV RSI,R15 CALL 0x00105360 LEA RSI,[0x118c1e] MOV RDI,RAX CALL 0x00105360 MOV RBX,RAX MOV RDI,R13 CALL 0x00106566 TEST AL,AL MOV RSI,R14 CMOVNZ RSI,R12 MOV RDI,RBX CALL 0x00105360 MOV RDI,RAX MOV RSI,R15 CALL 0x00105360 LEA RSI,[0x118c25] MOV RDI,RAX CALL 0x00105360 MOV RBX,RAX MOV RDI,R13 CALL 0x001065f4 TEST AL,AL CMOVNZ R14,R12 MOV RDI,RBX MOV RSI,R14 CALL 0x00105360 MOV RDI,RAX MOV RSI,R15 CALL 0x00105360 LEA RSI,[0x118c2c] MOV RDI,RAX CALL 0x00105360 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* printSettings(Settings const&) */ void printSettings(Settings *param_1) { int *puVar1; char cVar2; ostream *poVar3; long lVar4; _Rb_tree_node_base *p_Var5; char *pcVar6; char *pcVar7; string local_50 [32]; poVar3 = std::operator<<((ostream *)PTR_cout_00124f98,"===== Current Settings =====\n"); poVar3 = std::operator<<(poVar3,"Mode: "); Settings::getMode_abi_cxx11_(); /* try { // try from 00116462 to 001164f2 has its CatchHandler @ 0011665a */ poVar3 = std::operator<<(poVar3,local_50); poVar3 = std::operator<<(poVar3,"\n"); poVar3 = std::operator<<(poVar3,"Width: "); Settings::getWidth(param_1); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); poVar3 = std::operator<<(poVar3,"\n"); poVar3 = std::operator<<(poVar3,"Height: "); Settings::getHeight(param_1); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); poVar3 = std::operator<<(poVar3,"\n"); std::operator<<(poVar3,"Ship Counts:\n"); std::__cxx11::string::~string(local_50); lVar4 = Settings::getShipCounts(param_1); puVar1 = PTR_cout_00124f98; for (p_Var5 = *(_Rb_tree_node_base **)(lVar4 + 0x18); p_Var5 != (_Rb_tree_node_base *)(lVar4 + 8); p_Var5 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var5)) { poVar3 = std::operator<<((ostream *)puVar1," - Type "); poVar3 = (ostream *)std::ostream::operator<<(poVar3,*(int *)(p_Var5 + 0x20)); poVar3 = std::operator<<(poVar3," => "); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); std::operator<<(poVar3,"\n"); } poVar3 = std::operator<<((ostream *)PTR_cout_00124f98,"Start: "); cVar2 = Settings::getStart(param_1); pcVar7 = "No"; pcVar6 = "No"; if (cVar2 != '\0') { pcVar6 = "Yes"; } poVar3 = std::operator<<(poVar3,pcVar6); poVar3 = std::operator<<(poVar3,"\n"); poVar3 = std::operator<<(poVar3,"Stop: "); cVar2 = Settings::getStop(param_1); pcVar6 = "No"; if (cVar2 != '\0') { pcVar6 = "Yes"; } poVar3 = std::operator<<(poVar3,pcVar6); poVar3 = std::operator<<(poVar3,"\n"); poVar3 = std::operator<<(poVar3,"Exit: "); cVar2 = Settings::getExit(param_1); if (cVar2 != '\0') { pcVar7 = "Yes"; } poVar3 = std::operator<<(poVar3,pcVar7); poVar3 = std::operator<<(poVar3,"\n"); std::operator<<(poVar3,"============================\n"); return; }
30,983
printSettings(Settings const&)
666mxvbee[P]BattleShip/lib/Utils/PrintUtils.cpp
void printSettings(const Settings& settings) { std::cout << "===== Current Settings =====\n" << "Mode: " << settings.getMode() << "\n" << "Width: " << settings.getWidth() << "\n" << "Height: " << settings.getHeight() << "\n" << "Ship Counts:\n"; for (auto& [type, count] : settings.getShipCounts()) { std::cout << " - Type " << type << " => " << count << "\n"; } std::cout << "Start: " << (settings.getStart() ? "Yes" : "No") << "\n" << "Stop: " << (settings.getStop() ? "Yes" : "No") << "\n" << "Exit: " << (settings.getExit() ? "Yes" : "No") << "\n" << "============================\n"; }
O3
cpp
printSettings(Settings const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %r15 movq 0xbf88(%rip), %rbx # 0x24fa0 leaq 0x2bba(%rip), %rsi # 0x1bbd9 movl $0x1d, %edx movq %rbx, %rdi callq 0x5420 leaq 0x2bc4(%rip), %rsi # 0x1bbf7 movl $0x6, %edx movq %rbx, %rdi callq 0x5420 leaq 0x8(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x6272 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x5420 movq %rax, %rbx leaq 0x28af(%rip), %rsi # 0x1b918 movl $0x1, %edx movq %rax, %rdi callq 0x5420 leaq 0x2b81(%rip), %rsi # 0x1bbfe movl $0x7, %edx movq %rbx, %rdi callq 0x5420 movq %r15, %rdi callq 0x645e movq %rbx, %rdi movq %rax, %rsi callq 0x5270 movq %rax, %rbx leaq 0x2871(%rip), %rsi # 0x1b918 movl $0x1, %edx movq %rax, %rdi callq 0x5420 leaq 0x2b4b(%rip), %rsi # 0x1bc06 movl $0x8, %edx movq %rbx, %rdi callq 0x5420 movq %r15, %rdi callq 0x661a movq %rbx, %rdi movq %rax, %rsi callq 0x5270 movq %rax, %rbx leaq 0x2833(%rip), %rsi # 0x1b918 movl $0x1, %edx movq %rax, %rdi callq 0x5420 leaq 0x2b16(%rip), %rsi # 0x1bc0f movl $0xd, %edx movq %rbx, %rdi callq 0x5420 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x19121 movq 0x18(%rsp), %rsi incq %rsi callq 0x53a0 movq %r15, (%rsp) movq %r15, %rdi callq 0x6804 movq %rax, %r14 movq 0x18(%rax), %r15 addq $0x8, %r14 cmpq %r14, %r15 je 0x191b1 movq 0xbe5c(%rip), %r12 # 0x24fa0 leaq 0x2adc(%rip), %rbp # 0x1bc27 leaq 0x27c6(%rip), %rbx # 0x1b918 movl $0x9, %edx movq %r12, %rdi leaq 0x2abc(%rip), %rsi # 0x1bc1d callq 0x5420 movl 0x20(%r15), %esi movq %r12, %rdi callq 0x55e0 movq %rax, %r13 movl $0x4, %edx movq %rax, %rdi movq %rbp, %rsi callq 0x5420 movq 0x28(%r15), %rsi movq %r13, %rdi callq 0x5270 movl $0x1, %edx movq %rax, %rdi movq %rbx, %rsi callq 0x5420 movq %r15, %rdi callq 0x5440 movq %rax, %r15 cmpq %r14, %rax jne 0x19152 movq 0xbde8(%rip), %r14 # 0x24fa0 leaq 0x2a6d(%rip), %rsi # 0x1bc2c movl $0x7, %edx movq %r14, %rdi callq 0x5420 movq (%rsp), %r13 movq %r13, %rdi callq 0x6c00 leaq 0x2a55(%rip), %rbx # 0x1bc34 leaq 0x2a52(%rip), %r15 # 0x1bc38 testb %al, %al movq %r15, %rsi cmovneq %rbx, %rsi movzbl %al, %edx orq $0x2, %rdx movq %r14, %rdi callq 0x5420 leaq 0x2713(%rip), %r12 # 0x1b918 movl $0x1, %edx movq %r14, %rdi movq %r12, %rsi callq 0x5420 leaq 0x2a1f(%rip), %rsi # 0x1bc3b movl $0x6, %edx movq %r14, %rdi callq 0x5420 movq %r13, %rdi callq 0x6cb8 testb %al, %al movq %r15, %rsi cmovneq %rbx, %rsi movzbl %al, %edx orq $0x2, %rdx movq %r14, %rdi callq 0x5420 movl $0x1, %edx movq %r14, %rdi movq %r12, %rsi callq 0x5420 leaq 0x29e2(%rip), %rsi # 0x1bc42 movl $0x6, %edx movq %r14, %rdi callq 0x5420 movq %r13, %rdi callq 0x6d70 testb %al, %al cmovneq %rbx, %r15 movzbl %al, %edx orq $0x2, %rdx movq %r14, %rdi movq %r15, %rsi callq 0x5420 movl $0x1, %edx movq %r14, %rdi movq %r12, %rsi callq 0x5420 leaq 0x29a5(%rip), %rsi # 0x1bc49 movl $0x1d, %edx movq %r14, %rdi callq 0x5420 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x192de movq 0x18(%rsp), %rsi incq %rsi callq 0x53a0 movq %rbx, %rdi callq 0x5600
_Z13printSettingsRK8Settings: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, rdi mov rbx, cs:_ZSt4cout_ptr lea rsi, aCurrentSetting; "===== Current Settings =====\n" mov edx, 1Dh 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) lea rsi, aMode_1; "Mode: " mov edx, 6 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) lea r14, [rsp+58h+var_50] mov rdi, r14 mov rsi, r15 call _ZNK8Settings7getModeB5cxx11Ev; Settings::getMode(void) mov rsi, [r14] mov rdx, [r14+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, rax lea rsi, aMasterSlaveShi+28h; "\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) lea rsi, aWidth_1; "Width: " mov edx, 7 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 rdi, r15; this call _ZNK8Settings8getWidthEv; Settings::getWidth(void) mov rdi, rbx mov rsi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rbx, rax lea rsi, aMasterSlaveShi+28h; "\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) lea rsi, aHeight_1; "Height: " 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 rdi, r15; this call _ZNK8Settings9getHeightEv; Settings::getHeight(void) mov rdi, rbx mov rsi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rbx, rax lea rsi, aMasterSlaveShi+28h; "\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) lea rsi, aShipCounts; "Ship Counts:\n" mov edx, 0Dh 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) lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_19121 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_19121: mov [rsp+58h+var_58], r15 mov rdi, r15; this call _ZNK8Settings13getShipCountsEv; Settings::getShipCounts(void) mov r14, rax mov r15, [rax+18h] add r14, 8 cmp r15, r14 jz short loc_191B1 mov r12, cs:_ZSt4cout_ptr lea rbp, asc_1BC27; " => " lea rbx, aMasterSlaveShi+28h; "\n" loc_19152: mov edx, 9 mov rdi, r12 lea rsi, aType; " - Type " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r15+20h] mov rdi, r12 call __ZNSolsEi; std::ostream::operator<<(int) mov r13, rax mov edx, 4 mov rdi, rax mov rsi, rbp call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r15+28h] mov rdi, r13 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov edx, 1 mov rdi, rax mov rsi, 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 rdi, r15 call __ZSt18_Rb_tree_incrementPKSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base const*) mov r15, rax cmp rax, r14 jnz short loc_19152 loc_191B1: mov r14, cs:_ZSt4cout_ptr lea rsi, aStart_1; "Start: " mov edx, 7 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r13, [rsp+58h+var_58] mov rdi, r13; this call _ZNK8Settings8getStartEv; Settings::getStart(void) lea rbx, aYes; "Yes" lea r15, aNo; "No" test al, al mov rsi, r15 cmovnz rsi, rbx movzx edx, al or rdx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea r12, aMasterSlaveShi+28h; "\n" mov edx, 1 mov rdi, r14 mov rsi, r12 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, aStop_1; "Stop: " mov edx, 6 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r13; this call _ZNK8Settings7getStopEv; Settings::getStop(void) test al, al mov rsi, r15 cmovnz rsi, rbx movzx edx, al or rdx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, r14 mov rsi, r12 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, aExit_1; "Exit: " mov edx, 6 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r13; this call _ZNK8Settings7getExitEv; Settings::getExit(void) test al, al cmovnz r15, rbx movzx edx, al or rdx, 2 mov rdi, r14 mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, r14 mov rsi, r12 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_1BC49; "============================\n" mov edx, 1Dh mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_192DE mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_192DE: mov rdi, rbx call __Unwind_Resume
long long printSettings(const Settings *this) { long long v1; // rbx long long Width; // rax long long v3; // rbx long long Height; // rax long long v5; // rbx long long ShipCounts; // rax long long v7; // r15 long long i; // r14 long long v9; // r13 long long v10; // rax unsigned __int8 Start; // al const char *v12; // r15 const char *v13; // rsi unsigned __int8 Stop; // al const char *v15; // rsi unsigned __int8 Exit; // al void *v18[2]; // [rsp+8h] [rbp-50h] BYREF long long v19; // [rsp+18h] [rbp-40h] BYREF std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "===== Current Settings =====\n", 29LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Mode: ", 6LL); Settings::getMode[abi:cxx11](v18, (long long)this); v1 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v18[0], v18[1]); std::__ostream_insert<char,std::char_traits<char>>(v1, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(v1, "Width: ", 7LL); Width = Settings::getWidth(this); v3 = std::ostream::_M_insert<unsigned long>(v1, Width); std::__ostream_insert<char,std::char_traits<char>>(v3, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(v3, "Height: ", 8LL); Height = Settings::getHeight(this); v5 = std::ostream::_M_insert<unsigned long>(v3, Height); std::__ostream_insert<char,std::char_traits<char>>(v5, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(v5, "Ship Counts:\n", 13LL); if ( v18[0] != &v19 ) operator delete(v18[0], v19 + 1); ShipCounts = Settings::getShipCounts(this); v7 = *(_QWORD *)(ShipCounts + 24); for ( i = ShipCounts + 8; v7 != i; v7 = std::_Rb_tree_increment(v7) ) { std::__ostream_insert<char,std::char_traits<char>>(&std::cout, " - Type ", 9LL); v9 = std::ostream::operator<<(&std::cout, *(unsigned int *)(v7 + 32)); std::__ostream_insert<char,std::char_traits<char>>(v9, " => ", 4LL); v10 = std::ostream::_M_insert<unsigned long>(v9, *(_QWORD *)(v7 + 40)); std::__ostream_insert<char,std::char_traits<char>>(v10, "\n", 1LL); } std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Start: ", 7LL); Start = Settings::getStart(this); v12 = "No"; v13 = "No"; if ( Start ) v13 = "Yes"; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v13, Start | 2LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Stop: ", 6LL); Stop = Settings::getStop(this); v15 = "No"; if ( Stop ) v15 = "Yes"; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v15, Stop | 2LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "\n", 1LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "Exit: ", 6LL); Exit = Settings::getExit(this); if ( Exit ) v12 = "Yes"; std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v12, Exit | 2LL); std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "\n", 1LL); return std::__ostream_insert<char,std::char_traits<char>>(&std::cout, "============================\n", 29LL); }
printSettings: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,RDI MOV RBX,qword ptr [0x00124fa0] LEA RSI,[0x11bbd9] MOV EDX,0x1d MOV RDI,RBX CALL 0x00105420 LEA RSI,[0x11bbf7] MOV EDX,0x6 MOV RDI,RBX CALL 0x00105420 LEA R14,[RSP + 0x8] MOV RDI,R14 MOV RSI,R15 CALL 0x00106272 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_00119057: MOV RDI,RBX CALL 0x00105420 MOV RBX,RAX LEA RSI,[0x11b918] MOV EDX,0x1 MOV RDI,RAX CALL 0x00105420 LEA RSI,[0x11bbfe] MOV EDX,0x7 MOV RDI,RBX CALL 0x00105420 MOV RDI,R15 CALL 0x0010645e MOV RDI,RBX MOV RSI,RAX CALL 0x00105270 MOV RBX,RAX LEA RSI,[0x11b918] MOV EDX,0x1 MOV RDI,RAX CALL 0x00105420 LEA RSI,[0x11bc06] MOV EDX,0x8 MOV RDI,RBX CALL 0x00105420 MOV RDI,R15 CALL 0x0010661a MOV RDI,RBX MOV RSI,RAX CALL 0x00105270 MOV RBX,RAX LEA RSI,[0x11b918] MOV EDX,0x1 MOV RDI,RAX CALL 0x00105420 LEA RSI,[0x11bc0f] MOV EDX,0xd MOV RDI,RBX CALL 0x00105420 LAB_00119106: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00119121 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001053a0 LAB_00119121: MOV qword ptr [RSP],R15 MOV RDI,R15 CALL 0x00106804 MOV R14,RAX MOV R15,qword ptr [RAX + 0x18] ADD R14,0x8 CMP R15,R14 JZ 0x001191b1 MOV R12,qword ptr [0x00124fa0] LEA RBP,[0x11bc27] LEA RBX,[0x11b918] LAB_00119152: MOV EDX,0x9 MOV RDI,R12 LEA RSI,[0x11bc1d] CALL 0x00105420 MOV ESI,dword ptr [R15 + 0x20] MOV RDI,R12 CALL 0x001055e0 MOV R13,RAX MOV EDX,0x4 MOV RDI,RAX MOV RSI,RBP CALL 0x00105420 MOV RSI,qword ptr [R15 + 0x28] MOV RDI,R13 CALL 0x00105270 MOV EDX,0x1 MOV RDI,RAX MOV RSI,RBX CALL 0x00105420 MOV RDI,R15 CALL 0x00105440 MOV R15,RAX CMP RAX,R14 JNZ 0x00119152 LAB_001191b1: MOV R14,qword ptr [0x00124fa0] LEA RSI,[0x11bc2c] MOV EDX,0x7 MOV RDI,R14 CALL 0x00105420 MOV R13,qword ptr [RSP] MOV RDI,R13 CALL 0x00106c00 LEA RBX,[0x11bc34] LEA R15,[0x11bc38] TEST AL,AL MOV RSI,R15 CMOVNZ RSI,RBX MOVZX EDX,AL OR RDX,0x2 MOV RDI,R14 CALL 0x00105420 LEA R12,[0x11b918] MOV EDX,0x1 MOV RDI,R14 MOV RSI,R12 CALL 0x00105420 LEA RSI,[0x11bc3b] MOV EDX,0x6 MOV RDI,R14 CALL 0x00105420 MOV RDI,R13 CALL 0x00106cb8 TEST AL,AL MOV RSI,R15 CMOVNZ RSI,RBX MOVZX EDX,AL OR RDX,0x2 MOV RDI,R14 CALL 0x00105420 MOV EDX,0x1 MOV RDI,R14 MOV RSI,R12 CALL 0x00105420 LEA RSI,[0x11bc42] MOV EDX,0x6 MOV RDI,R14 CALL 0x00105420 MOV RDI,R13 CALL 0x00106d70 TEST AL,AL CMOVNZ R15,RBX MOVZX EDX,AL OR RDX,0x2 MOV RDI,R14 MOV RSI,R15 CALL 0x00105420 MOV EDX,0x1 MOV RDI,R14 MOV RSI,R12 CALL 0x00105420 LEA RSI,[0x11bc49] MOV EDX,0x1d MOV RDI,R14 CALL 0x00105420 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* printSettings(Settings const&) */ void printSettings(Settings *param_1) { int *puVar1; byte bVar2; ostream *poVar3; long lVar4; _Rb_tree_node_base *p_Var5; char *pcVar6; char *pcVar7; long *local_50; long local_48; long local_40 [2]; puVar1 = PTR_cout_00124fa0; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00124fa0,"===== Current Settings =====\n",0x1d); std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar1,"Mode: ",6); Settings::getMode_abi_cxx11_(); /* try { // try from 00119057 to 00119105 has its CatchHandler @ 001192c0 */ poVar3 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)puVar1,(char *)local_50,local_48); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Width: ",7); Settings::getWidth(param_1); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Height: ",8); Settings::getHeight(param_1); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Ship Counts:\n",0xd); if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } lVar4 = Settings::getShipCounts(param_1); puVar1 = PTR_cout_00124fa0; p_Var5 = *(_Rb_tree_node_base **)(lVar4 + 0x18); poVar3 = (ostream *)PTR_cout_00124fa0; while (PTR_cout_00124fa0 = poVar3, p_Var5 != (_Rb_tree_node_base *)(lVar4 + 8)) { std::__ostream_insert<char,std::char_traits<char>>((ostream *)puVar1," - Type ",9); poVar3 = (ostream *)std::ostream::operator<<((ostream *)puVar1,*(int *)(p_Var5 + 0x20)); std::__ostream_insert<char,std::char_traits<char>>(poVar3," => ",4); poVar3 = std::ostream::_M_insert<unsigned_long>((ulong)poVar3); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); p_Var5 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var5); poVar3 = (ostream *)PTR_cout_00124fa0; } std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Start: ",7); bVar2 = Settings::getStart(param_1); pcVar7 = "No"; pcVar6 = "No"; if (bVar2 != 0) { pcVar6 = "Yes"; } std::__ostream_insert<char,std::char_traits<char>>(poVar3,pcVar6,(ulong)bVar2 | 2); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Stop: ",6); bVar2 = Settings::getStop(param_1); pcVar6 = "No"; if (bVar2 != 0) { pcVar6 = "Yes"; } std::__ostream_insert<char,std::char_traits<char>>(poVar3,pcVar6,(ulong)bVar2 | 2); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"Exit: ",6); bVar2 = Settings::getExit(param_1); if (bVar2 != 0) { pcVar7 = "Yes"; } std::__ostream_insert<char,std::char_traits<char>>(poVar3,pcVar7,(ulong)bVar2 | 2); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"\n",1); std::__ostream_insert<char,std::char_traits<char>>(poVar3,"============================\n",0x1d); return; }
30,984
my_strtod
eloqsql/strings/dtoa.c
double my_strtod(const char *str, char **end, int *error) { char buf[DTOA_BUFF_SIZE]; double res; DBUG_ASSERT(end != NULL && ((str != NULL && *end != NULL) || (str == NULL && *end == NULL)) && error != NULL); res= my_strtod_int(str, end, error, buf, sizeof(buf)); return (*error == 0) ? res : (res < 0 ? -DBL_MAX : DBL_MAX); }
O0
c
my_strtod: pushq %rbp movq %rsp, %rbp subq $0xea0, %rsp # imm = 0xEA0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0xe78(%rbp) movq %rsi, -0xe80(%rbp) movq %rdx, -0xe88(%rbp) jmp 0x79c1f movq -0xe78(%rbp), %rdi movq -0xe80(%rbp), %rsi movq -0xe88(%rbp), %rdx leaq -0xe70(%rbp), %rcx movl $0xe60, %r8d # imm = 0xE60 callq 0x79ce0 movsd %xmm0, -0xe90(%rbp) movq -0xe88(%rbp), %rax cmpl $0x0, (%rax) jne 0x79c6c movsd -0xe90(%rbp), %xmm0 movsd %xmm0, -0xe98(%rbp) jmp 0x79ca3 movsd -0xe90(%rbp), %xmm0 movsd 0xe924(%rip), %xmm3 # 0x885a0 movsd 0xe924(%rip), %xmm2 # 0x885a8 xorps %xmm1, %xmm1 cmpltsd %xmm1, %xmm0 movaps %xmm0, %xmm1 andpd %xmm3, %xmm1 andnpd %xmm2, %xmm0 orpd %xmm1, %xmm0 movsd %xmm0, -0xe98(%rbp) movsd -0xe98(%rbp), %xmm0 movsd %xmm0, -0xea0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x79cd6 movsd -0xea0(%rbp), %xmm0 addq $0xea0, %rsp # imm = 0xEA0 popq %rbp retq callq 0x25390 nopl (%rax,%rax)
my_strtod: push rbp mov rbp, rsp sub rsp, 0EA0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_E78], rdi mov [rbp+var_E80], rsi mov [rbp+var_E88], rdx jmp short $+2 loc_79C1F: mov rdi, [rbp+var_E78] mov rsi, [rbp+var_E80] mov rdx, [rbp+var_E88] lea rcx, [rbp+var_E70] mov r8d, 0E60h call my_strtod_int movsd [rbp+var_E90], xmm0 mov rax, [rbp+var_E88] cmp dword ptr [rax], 0 jnz short loc_79C6C movsd xmm0, [rbp+var_E90] movsd [rbp+var_E98], xmm0 jmp short loc_79CA3 loc_79C6C: movsd xmm0, [rbp+var_E90] movsd xmm3, cs:qword_885A0 movsd xmm2, cs:qword_885A8 xorps xmm1, xmm1 cmpltsd xmm0, xmm1 movaps xmm1, xmm0 andpd xmm1, xmm3 andnpd xmm0, xmm2 orpd xmm0, xmm1 movsd [rbp+var_E98], xmm0 loc_79CA3: movsd xmm0, [rbp+var_E98] movsd [rbp+var_EA0], xmm0 mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_79CD6 movsd xmm0, [rbp+var_EA0] add rsp, 0EA0h pop rbp retn loc_79CD6: call ___stack_chk_fail
double my_strtod(long long a1, long long a2, _DWORD *a3) { __m128d v3; // xmm1 double v4; // xmm0_8 double v6; // [rsp+8h] [rbp-E98h] double v7; // [rsp+10h] [rbp-E90h] _BYTE v9[3688]; // [rsp+30h] [rbp-E70h] BYREF unsigned long long v10; // [rsp+E98h] [rbp-8h] v10 = __readfsqword(0x28u); v7 = my_strtod_int(a1, a2, a3, v9, 3680LL); if ( !*a3 ) return v7; v3.m128d_f64[0] = 0.0; v4 = _mm_cmplt_sd((__m128d)*(unsigned long long *)&v7, v3).m128d_f64[0]; *(_QWORD *)&v6 = ~*(_QWORD *)&v4 & 0x7FEFFFFFFFFFFFFFLL | *(_QWORD *)&v4 & 0xFFEFFFFFFFFFFFFFLL; return v6; }
my_strtod: PUSH RBP MOV RBP,RSP SUB RSP,0xea0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0xe78],RDI MOV qword ptr [RBP + -0xe80],RSI MOV qword ptr [RBP + -0xe88],RDX JMP 0x00179c1f LAB_00179c1f: MOV RDI,qword ptr [RBP + -0xe78] MOV RSI,qword ptr [RBP + -0xe80] MOV RDX,qword ptr [RBP + -0xe88] LEA RCX,[RBP + -0xe70] MOV R8D,0xe60 CALL 0x00179ce0 MOVSD qword ptr [RBP + -0xe90],XMM0 MOV RAX,qword ptr [RBP + -0xe88] CMP dword ptr [RAX],0x0 JNZ 0x00179c6c MOVSD XMM0,qword ptr [RBP + -0xe90] MOVSD qword ptr [RBP + -0xe98],XMM0 JMP 0x00179ca3 LAB_00179c6c: MOVSD XMM0,qword ptr [RBP + -0xe90] MOVSD XMM3,qword ptr [0x001885a0] MOVSD XMM2,qword ptr [0x001885a8] XORPS XMM1,XMM1 CMPLTSD XMM0,XMM1 MOVAPS XMM1,XMM0 ANDPD XMM1,XMM3 ANDNPD XMM0,XMM2 ORPD XMM0,XMM1 MOVSD qword ptr [RBP + -0xe98],XMM0 LAB_00179ca3: MOVSD XMM0,qword ptr [RBP + -0xe98] MOVSD qword ptr [RBP + -0xea0],XMM0 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00179cd6 MOVSD XMM0,qword ptr [RBP + -0xea0] ADD RSP,0xea0 POP RBP RET LAB_00179cd6: CALL 0x00125390
double my_strtod(int8 param_1,int8 param_2,int *param_3) { long in_FS_OFFSET; double local_ea0; int1 local_e78 [3688]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_ea0 = (double)my_strtod_int(param_1,param_2,param_3,local_e78,0xe60); if (*param_3 != 0) { local_ea0 = (double)(~-(ulong)(local_ea0 < 0.0) & DAT_001885a8 | -(ulong)(local_ea0 < 0.0) & DAT_001885a0); } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_ea0; }
30,985
mysql_stmt_internal_reset
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static my_bool mysql_stmt_internal_reset(MYSQL_STMT *stmt, my_bool is_close) { MYSQL *mysql= stmt->mysql; my_bool ret= 1; unsigned int flags= MADB_RESET_LONGDATA | MADB_RESET_BUFFER | MADB_RESET_ERROR; if (!mysql) { /* connection could be invalid, e.g. after mysql_stmt_close or failed reconnect attempt (see bug CONC-97) */ SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state >= MYSQL_STMT_USER_FETCHING && stmt->fetch_row_func == stmt_unbuffered_fetch) flags|= MADB_RESET_BUFFER; ret= madb_reset_stmt(stmt, flags); if (stmt->stmt_id) { if ((stmt->state > MYSQL_STMT_EXECUTED && stmt->mysql->status != MYSQL_STATUS_READY) || stmt->mysql->server_status & SERVER_MORE_RESULTS_EXIST) { /* flush any pending (multiple) result sets */ if (stmt->state == MYSQL_STMT_WAITING_USE_OR_STORE) { stmt->default_rset_handler(stmt); stmt->state = MYSQL_STMT_USER_FETCHING; } if (stmt->field_count) { while (mysql_stmt_next_result(stmt) == 0); stmt->mysql->status= MYSQL_STATUS_READY; } } if (!is_close) ret= madb_reset_stmt(stmt, MADB_RESET_SERVER); stmt->state= MYSQL_STMT_PREPARED; } else stmt->state= MYSQL_STMT_INITTED; stmt->upsert_status.affected_rows= mysql->affected_rows; stmt->upsert_status.last_insert_id= mysql->insert_id; stmt->upsert_status.server_status= mysql->server_status; stmt->upsert_status.warning_count= mysql->warning_count; mysql->status= MYSQL_STATUS_READY; return(ret); }
O0
c
mysql_stmt_internal_reset: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %sil, %al movq %rdi, -0x10(%rbp) movb %al, -0x11(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x20(%rbp) movb $0x1, -0x21(%rbp) movl $0xb, -0x28(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x42e7e jmp 0x42e12 movq -0x10(%rbp), %rax movl $0x7dd, 0x108(%rax) # imm = 0x7DD movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x3e06e(%rip), %rax # 0x80ea0 movq (%rax), %rsi movl $0x5, %edx callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x3e054(%rip), %rax # 0x80eb0 movq 0x68(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0x1(%rbp) jmp 0x42fe1 movq -0x10(%rbp), %rax cmpl $0x5, 0x50(%rax) jb 0x42ea5 movq -0x10(%rbp), %rax leaq -0x2383(%rip), %rcx # 0x40b10 cmpq %rcx, 0x348(%rax) jne 0x42ea5 movl -0x28(%rbp), %eax orl $0x8, %eax movl %eax, -0x28(%rbp) movq -0x10(%rbp), %rdi movl -0x28(%rbp), %esi callq 0x444e0 movb %al, -0x21(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x42f6e movq -0x10(%rbp), %rax cmpl $0x2, 0x50(%rax) jbe 0x42ede movq -0x10(%rbp), %rax movq 0x38(%rax), %rax cmpl $0x0, 0x488(%rax) jne 0x42ef4 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl 0x380(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x42f4a movq -0x10(%rbp), %rax cmpl $0x3, 0x50(%rax) jne 0x42f1a movq -0x10(%rbp), %rax movq 0x358(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movq -0x10(%rbp), %rax movl $0x5, 0x50(%rax) movq -0x10(%rbp), %rax cmpl $0x0, 0x60(%rax) je 0x42f48 jmp 0x42f26 movq -0x10(%rbp), %rdi callq 0x47060 cmpl $0x0, %eax jne 0x42f36 jmp 0x42f26 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movl $0x0, 0x488(%rax) jmp 0x42f4a cmpb $0x0, -0x11(%rbp) jne 0x42f61 movq -0x10(%rbp), %rdi movl $0x4, %esi callq 0x444e0 movb %al, -0x21(%rbp) movq -0x10(%rbp), %rax movl $0x1, 0x50(%rax) jmp 0x42f79 movq -0x10(%rbp), %rax movl $0x0, 0x50(%rax) movq -0x20(%rbp), %rax movq 0x338(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xf8(%rax) movq -0x20(%rbp), %rax movq 0x340(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x100(%rax) movq -0x20(%rbp), %rax movl 0x380(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xf4(%rax) movq -0x20(%rbp), %rax movl 0x388(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xf0(%rax) movq -0x20(%rbp), %rax movl $0x0, 0x488(%rax) movb -0x21(%rbp), %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_stmt_internal_reset: push rbp mov rbp, rsp sub rsp, 30h mov al, sil mov [rbp+var_10], rdi mov [rbp+var_11], al mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_20], rax mov [rbp+var_21], 1 mov [rbp+var_28], 0Bh cmp [rbp+var_20], 0 jnz short loc_42E7E jmp short $+2 loc_42E12: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 7DDh mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+68h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_1], 1 jmp loc_42FE1 loc_42E7E: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 5 jb short loc_42EA5 mov rax, [rbp+var_10] lea rcx, stmt_unbuffered_fetch cmp [rax+348h], rcx jnz short loc_42EA5 mov eax, [rbp+var_28] or eax, 8 mov [rbp+var_28], eax loc_42EA5: mov rdi, [rbp+var_10] mov esi, [rbp+var_28] call madb_reset_stmt mov [rbp+var_21], al mov rax, [rbp+var_10] cmp qword ptr [rax+40h], 0 jz loc_42F6E mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 2 jbe short loc_42EDE mov rax, [rbp+var_10] mov rax, [rax+38h] cmp dword ptr [rax+488h], 0 jnz short loc_42EF4 loc_42EDE: mov rax, [rbp+var_10] mov rax, [rax+38h] mov eax, [rax+380h] and eax, 8 cmp eax, 0 jz short loc_42F4A loc_42EF4: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 3 jnz short loc_42F1A mov rax, [rbp+var_10] mov rax, [rax+358h] mov rdi, [rbp+var_10] call rax mov rax, [rbp+var_10] mov dword ptr [rax+50h], 5 loc_42F1A: mov rax, [rbp+var_10] cmp dword ptr [rax+60h], 0 jz short loc_42F48 jmp short $+2 loc_42F26: mov rdi, [rbp+var_10] call mysql_stmt_next_result cmp eax, 0 jnz short loc_42F36 jmp short loc_42F26 loc_42F36: mov rax, [rbp+var_10] mov rax, [rax+38h] mov dword ptr [rax+488h], 0 loc_42F48: jmp short $+2 loc_42F4A: cmp [rbp+var_11], 0 jnz short loc_42F61 mov rdi, [rbp+var_10] mov esi, 4 call madb_reset_stmt mov [rbp+var_21], al loc_42F61: mov rax, [rbp+var_10] mov dword ptr [rax+50h], 1 jmp short loc_42F79 loc_42F6E: mov rax, [rbp+var_10] mov dword ptr [rax+50h], 0 loc_42F79: mov rax, [rbp+var_20] mov rcx, [rax+338h] mov rax, [rbp+var_10] mov [rax+0F8h], rcx mov rax, [rbp+var_20] mov rcx, [rax+340h] mov rax, [rbp+var_10] mov [rax+100h], rcx mov rax, [rbp+var_20] mov ecx, [rax+380h] mov rax, [rbp+var_10] mov [rax+0F4h], ecx mov rax, [rbp+var_20] mov ecx, [rax+388h] mov rax, [rbp+var_10] mov [rax+0F0h], ecx mov rax, [rbp+var_20] mov dword ptr [rax+488h], 0 mov al, [rbp+var_21] mov [rbp+var_1], al loc_42FE1: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char mysql_stmt_internal_reset(long long a1, char a2) { char v3; // [rsp+Fh] [rbp-21h] long long v4; // [rsp+10h] [rbp-20h] v4 = *(_QWORD *)(a1 + 56); if ( v4 ) { v3 = madb_reset_stmt(a1, 11LL); if ( *(_QWORD *)(a1 + 64) ) { if ( *(_DWORD *)(a1 + 80) > 2u && *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) || (*(_DWORD *)(*(_QWORD *)(a1 + 56) + 896LL) & 8) != 0 ) { if ( *(_DWORD *)(a1 + 80) == 3 ) { (*(void ( **)(long long))(a1 + 856))(a1); *(_DWORD *)(a1 + 80) = 5; } if ( *(_DWORD *)(a1 + 96) ) { while ( !(unsigned int)mysql_stmt_next_result(a1) ) ; *(_DWORD *)(*(_QWORD *)(a1 + 56) + 1160LL) = 0; } } if ( !a2 ) v3 = madb_reset_stmt(a1, 4LL); *(_DWORD *)(a1 + 80) = 1; } else { *(_DWORD *)(a1 + 80) = 0; } *(_QWORD *)(a1 + 248) = *(_QWORD *)(v4 + 824); *(_QWORD *)(a1 + 256) = *(_QWORD *)(v4 + 832); *(_DWORD *)(a1 + 244) = *(_DWORD *)(v4 + 896); *(_DWORD *)(a1 + 240) = *(_DWORD *)(v4 + 904); *(_DWORD *)(v4 + 1160) = 0; return v3; } else { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[13], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; } }
mysql_stmt_internal_reset: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,SIL MOV qword ptr [RBP + -0x10],RDI MOV byte ptr [RBP + -0x11],AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x20],RAX MOV byte ptr [RBP + -0x21],0x1 MOV dword ptr [RBP + -0x28],0xb CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00142e7e JMP 0x00142e12 LAB_00142e12: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x7dd MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x180ea0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x180eb0] MOV RSI,qword ptr [RAX + 0x68] MOV EDX,0x200 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00142fe1 LAB_00142e7e: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x5 JC 0x00142ea5 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x140b10] CMP qword ptr [RAX + 0x348],RCX JNZ 0x00142ea5 MOV EAX,dword ptr [RBP + -0x28] OR EAX,0x8 MOV dword ptr [RBP + -0x28],EAX LAB_00142ea5: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x28] CALL 0x001444e0 MOV byte ptr [RBP + -0x21],AL MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00142f6e MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x2 JBE 0x00142ede MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] CMP dword ptr [RAX + 0x488],0x0 JNZ 0x00142ef4 LAB_00142ede: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV EAX,dword ptr [RAX + 0x380] AND EAX,0x8 CMP EAX,0x0 JZ 0x00142f4a LAB_00142ef4: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x3 JNZ 0x00142f1a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x358] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x5 LAB_00142f1a: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x60],0x0 JZ 0x00142f48 JMP 0x00142f26 LAB_00142f26: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00147060 CMP EAX,0x0 JNZ 0x00142f36 JMP 0x00142f26 LAB_00142f36: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x488],0x0 LAB_00142f48: JMP 0x00142f4a LAB_00142f4a: CMP byte ptr [RBP + -0x11],0x0 JNZ 0x00142f61 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x4 CALL 0x001444e0 MOV byte ptr [RBP + -0x21],AL LAB_00142f61: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x1 JMP 0x00142f79 LAB_00142f6e: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x0 LAB_00142f79: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x338] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xf8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x340] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x100],RCX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x380] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xf4],ECX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x388] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xf0],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x488],0x0 MOV AL,byte ptr [RBP + -0x21] MOV byte ptr [RBP + -0x1],AL LAB_00142fe1: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 mysql_stmt_internal_reset(long param_1,char param_2) { long lVar1; int iVar2; int1 local_29; int1 local_9; lVar1 = *(long *)(param_1 + 0x38); if (lVar1 == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Lost_connection_to_server_during_00180f18,0x200); *(int1 *)(param_1 + 0x30b) = 0; local_9 = 1; } else { local_29 = madb_reset_stmt(param_1,0xb); if (*(long *)(param_1 + 0x40) == 0) { *(int4 *)(param_1 + 0x50) = 0; } else { if (((2 < *(uint *)(param_1 + 0x50)) && (*(int *)(*(long *)(param_1 + 0x38) + 0x488) != 0)) || ((*(uint *)(*(long *)(param_1 + 0x38) + 0x380) & 8) != 0)) { if (*(int *)(param_1 + 0x50) == 3) { (**(code **)(param_1 + 0x358))(param_1); *(int4 *)(param_1 + 0x50) = 5; } if (*(int *)(param_1 + 0x60) != 0) { do { iVar2 = mysql_stmt_next_result(param_1); } while (iVar2 == 0); *(int4 *)(*(long *)(param_1 + 0x38) + 0x488) = 0; } } if (param_2 == '\0') { local_29 = madb_reset_stmt(param_1,4); } *(int4 *)(param_1 + 0x50) = 1; } *(int8 *)(param_1 + 0xf8) = *(int8 *)(lVar1 + 0x338); *(int8 *)(param_1 + 0x100) = *(int8 *)(lVar1 + 0x340); *(int4 *)(param_1 + 0xf4) = *(int4 *)(lVar1 + 0x380); *(int4 *)(param_1 + 0xf0) = *(int4 *)(lVar1 + 0x388); *(int4 *)(lVar1 + 0x488) = 0; local_9 = local_29; } return local_9; }
30,986
minja::Parser::parseConstant()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Value> parseConstant() { auto start = it; consumeSpaces(); if (it == end) return nullptr; if (*it == '"' || *it == '\'') { auto str = parseString(); if (str) return std::make_shared<Value>(*str); } static std::regex prim_tok(R"(true\b|True\b|false\b|False\b|None\b)"); auto token = consumeToken(prim_tok); if (!token.empty()) { if (token == "true" || token == "True") return std::make_shared<Value>(true); if (token == "false" || token == "False") return std::make_shared<Value>(false); if (token == "None") return std::make_shared<Value>(nullptr); throw std::runtime_error("Unknown constant token: " + token); } auto number = parseNumber(it, end); if (!number.is_null()) return std::make_shared<Value>(number); it = start; return nullptr; }
O3
cpp
minja::Parser::parseConstant(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r15 movq %rdi, %rbx leaq 0x20(%rsi), %r14 movq 0x18(%rsi), %r12 movq 0x20(%rsi), %r13 movq %r13, %rbp cmpq %r12, %r13 je 0x8aa57 movq %r13, %rbp movsbl (%rbp), %edi callq 0x1b0c0 testl %eax, %eax je 0x8aa57 incq %rbp movq %rbp, (%r14) cmpq %r12, %rbp jne 0x8aa3f cmpq %r12, %rbp je 0x8aaad movzbl (%rbp), %eax cmpl $0x27, %eax je 0x8aa6a cmpl $0x22, %eax jne 0x8aab8 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi callq 0x8bdfc movq (%r12), %rdx testq %rdx, %rdx je 0x8aab8 leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x8c450 movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0x8ac15 leaq 0x8(%rsp), %rdi callq 0x8c670 jmp 0x8ac15 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) jmp 0x8ac15 leaq 0xa46c1(%rip), %rax # 0x12f180 movb (%rax), %al testb %al, %al je 0x8ac27 leaq 0xa4690(%rip), %rdx # 0x12f160 leaq 0x8(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movl $0x1, %ecx callq 0x84122 cmpq $0x0, 0x8(%r12) je 0x8ab94 leaq 0x5df52(%rip), %rsi # 0xe8a4a leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax je 0x8ab7d leaq 0x6700f(%rip), %rsi # 0xf1b1c leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax je 0x8ab7d leaq 0x60c11(%rip), %rsi # 0xeb733 leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax je 0x8abc3 leaq 0x66fe6(%rip), %rsi # 0xf1b21 leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax je 0x8abc3 leaq 0x673ec(%rip), %rsi # 0xf1f3c leaq 0x8(%rsp), %rdi callq 0x1b220 testl %eax, %eax jne 0x8ac7e leaq 0x28(%rsp), %rdx movq $0x0, (%rdx) leaq 0x7(%rsp), %rsi movq %rbx, %rdi callq 0x8c790 jmp 0x8abfa leaq 0x7(%rsp), %rdx movb $0x1, (%rdx) leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x8c69e jmp 0x8abfa leaq 0x18(%r15), %rcx leaq 0x28(%rsp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x8be7c cmpb $0x0, 0x28(%rsp) je 0x8abda leaq 0x7(%rsp), %rsi leaq 0x28(%rsp), %rdx movq %rbx, %rdi callq 0x8c9a4 jmp 0x8abe3 leaq 0x7(%rsp), %rdx movb $0x0, (%rdx) leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x8c69e jmp 0x8abfa movq %r13, (%r14) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x590b4 movq %r14, %rdi callq 0x5e5a2 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8ac15 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8c0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xa4552(%rip), %rdi # 0x12f180 callq 0x1bff0 testl %eax, %eax je 0x8aac9 leaq 0xa451e(%rip), %rdi # 0x12f160 leaq 0x672ce(%rip), %rsi # 0xf1f17 movl $0x10, %edx callq 0x62f54 leaq -0x27a02(%rip), %rdi # 0x63258 leaq 0xa44ff(%rip), %rsi # 0x12f160 leaq 0xa3c70(%rip), %rdx # 0x12e8d8 callq 0x1b7a0 leaq 0xa450c(%rip), %rdi # 0x12f180 callq 0x1b5a0 jmp 0x8aac9 movl $0x10, %edi callq 0x1b440 movq %rax, %r14 leaq 0x672af(%rip), %rsi # 0xf1f41 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x54b5d movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x1be10 xorl %ebp, %ebp movq 0xa332e(%rip), %rsi # 0x12dfe8 movq 0xa328f(%rip), %rdx # 0x12df50 movq %r14, %rdi callq 0x1bf00 movq %rax, %rbx leaq 0xa44ad(%rip), %rdi # 0x12f180 callq 0x1b590 jmp 0x8ad68 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8acfb movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8c0 testb %bpl, %bpl jne 0x8ad05 jmp 0x8ad34 movq %rax, %rbx movq %r14, %rdi callq 0x1b660 jmp 0x8ad34 jmp 0x8ad31 jmp 0x8ad31 movq %rax, %rbx leaq 0x28(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x590b4 movq %r14, %rdi callq 0x5e5a2 jmp 0x8ad34 jmp 0x8ad31 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8ad68 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0x8ad68 movq %rax, %rbx movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0x8ad68 leaq 0x8(%rsp), %rdi callq 0x8c670 movq %rbx, %rdi callq 0x1bf90
_ZN5minja6Parser13parseConstantEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rsi mov rbx, rdi lea r14, [rsi+20h] mov r12, [rsi+18h] mov r13, [rsi+20h] mov rbp, r13 cmp r13, r12 jz short loc_8AA57 mov rbp, r13 loc_8AA3F: movsx edi, byte ptr [rbp+0] call _isspace test eax, eax jz short loc_8AA57 inc rbp mov [r14], rbp cmp rbp, r12 jnz short loc_8AA3F loc_8AA57: cmp rbp, r12 jz short loc_8AAAD movzx eax, byte ptr [rbp+0] cmp eax, 27h ; ''' jz short loc_8AA6A cmp eax, 22h ; '"' jnz short loc_8AAB8 loc_8AA6A: lea r12, [rsp+78h+var_70] mov rdi, r12; int mov rsi, r15; void * call _ZN5minja6Parser11parseStringB5cxx11Ev; minja::Parser::parseString(void) mov rdx, [r12] test rdx, rdx jz short loc_8AAB8 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,std::string &>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,std::string &) mov rsi, qword ptr [rsp+78h+var_70] test rsi, rsi jz loc_8AC15 lea rdi, [rsp+78h+var_70] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) jmp loc_8AC15 loc_8AAAD: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 jmp loc_8AC15 loc_8AAB8: lea rax, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; `guard variable for'minja::Parser::parseConstant(void)::prim_tok mov al, [rax] test al, al jz loc_8AC27 loc_8AAC9: lea rdx, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok lea r12, [rsp+78h+var_70] mov rdi, r12 mov rsi, r15 mov ecx, 1 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) cmp qword ptr [r12+8], 0 jz loc_8AB94 lea rsi, aTrue; "true" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8AB7D lea rsi, aTrue_0; "True" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8AB7D lea rsi, aAdvancedOption+0ABh; "false" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_8ABC3 lea rsi, aFalse; "False" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8ABC3 lea rsi, aNone_0; "None" lea rdi, [rsp+78h+var_70] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz loc_8AC7E lea rdx, [rsp+78h+var_50] mov qword ptr [rdx], 0 lea rsi, [rsp+78h+var_71] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJDnEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,decltype(nullptr)>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,decltype(nullptr) &&) jmp short loc_8ABFA loc_8AB7D: lea rdx, [rsp+78h+var_71] mov byte ptr [rdx], 1 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,bool &&) jmp short loc_8ABFA loc_8AB94: lea rcx, [r15+18h] lea rdi, [rsp+78h+var_50] mov rsi, r15 mov rdx, r14 call _ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_; minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*,std::string> &,__gnu_cxx::__normal_iterator<char const*,std::string> const&) cmp [rsp+78h+var_50], 0 jz short loc_8ABDA lea rsi, [rsp+78h+var_71] lea rdx, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJRN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS8_14adl_serializerESB_IhSaIhEEvEEEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &) jmp short loc_8ABE3 loc_8ABC3: lea rdx, [rsp+78h+var_71] mov byte ptr [rdx], 0 lea rsi, [rsp+78h+var_50] mov rdi, rbx call _ZNSt12__shared_ptrIN5minja5ValueELN9__gnu_cxx12_Lock_policyE2EEC2ISaIS1_EJbEEESt20_Sp_alloc_shared_tagIT_EDpOT0_; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>(std::_Sp_alloc_shared_tag<std::allocator<minja::Value>>,bool &&) jmp short loc_8ABFA loc_8ABDA: mov [r14], r13 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 loc_8ABE3: lea r14, [rsp+78h+var_50] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() loc_8ABFA: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8AC15 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8AC15: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8AC27: lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_8AAC9 lea rdi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; minja::Parser::parseConstant(void)::prim_tok lea rsi, aTrueBTrueBFals; "true\\b|True\\b|false\\b|False\\b|None"... mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_release jmp loc_8AAC9 loc_8AC7E: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aUnknownConstan; "Unknown constant token: " lea rdi, [rsp+78h+var_50] lea rdx, [rsp+78h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 lea rsi, [rsp+78h+var_50] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rdi, _ZGVZN5minja6Parser13parseConstantEvE8prim_tokB5cxx11; __guard * call ___cxa_guard_abort jmp loc_8AD68 mov rbx, rax lea rax, [rsp+78h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8ACFB mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8ACFB: test bpl, bpl jnz short loc_8AD05 jmp short loc_8AD34 mov rbx, rax loc_8AD05: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_8AD34 jmp short loc_8AD31 jmp short loc_8AD31 mov rbx, rax lea r14, [rsp+78h+var_50] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_8AD34 jmp short $+2 loc_8AD31: mov rbx, rax loc_8AD34: lea rax, [rsp+78h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8AD68 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8AD68 mov rbx, rax mov rsi, qword ptr [rsp+78h+var_70] test rsi, rsi jz short loc_8AD68 lea rdi, [rsp+78h+var_70] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_8AD68: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseConstant(minja::Parser *this, unsigned __int8 **a2) { unsigned __int8 **v2; // r14 char *v3; // r12 unsigned __int8 *v4; // r13 unsigned __int8 *v5; // rbp int v6; // eax void *exception; // r14 char v9; // [rsp+7h] [rbp-71h] BYREF int v10[2]; // [rsp+8h] [rbp-70h] BYREF long long v11; // [rsp+10h] [rbp-68h] long long v12; // [rsp+18h] [rbp-60h] BYREF _QWORD v13[2]; // [rsp+28h] [rbp-50h] BYREF v2 = a2 + 4; v3 = (char *)a2[3]; v4 = a2[4]; v5 = v4; if ( v4 != (unsigned __int8 *)v3 ) { v5 = a2[4]; do { if ( !(unsigned int)isspace((unsigned int)(char)*v5) ) break; *v2 = ++v5; } while ( v5 != (unsigned __int8 *)v3 ); } if ( v5 == (unsigned __int8 *)v3 ) { *(_OWORD *)this = 0LL; } else { v6 = *v5; if ( (v6 == 39 || v6 == 34) && (minja::Parser::parseString[abi:cxx11]((int)v10, a2), *(_QWORD *)v10) ) { std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,std::string &>( this, v13); if ( *(_QWORD *)v10 ) std::default_delete<std::string>::operator()(v10); } else { if ( !(_BYTE)`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], (long long)"true\\b|True\\b|false\\b|False\\b|None\\b", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseConstant(void)::prim_tok[abi:cxx11]); } minja::Parser::consumeToken( (long long)v10, (long long)a2, (long long)&minja::Parser::parseConstant(void)::prim_tok[abi:cxx11], 1u); if ( v11 ) { if ( !(unsigned int)std::string::compare(v10, "true") || !(unsigned int)std::string::compare(v10, "True") ) { v9 = 1; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>( this, v13, &v9); } else if ( !(unsigned int)std::string::compare(v10, "false") || !(unsigned int)std::string::compare(v10, "False") ) { v9 = 0; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,bool>( this, v13, &v9); } else { if ( (unsigned int)std::string::compare(v10, "None") ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v13, (long long)"Unknown constant token: ", v10); std::runtime_error::runtime_error(exception, v13); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v13[0] = 0LL; std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,decltype(nullptr)>( this, &v9, v13); } } else { minja::Parser::parseNumber(v13, a2, v2, a2 + 3); if ( LOBYTE(v13[0]) ) { std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<minja::Value>,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> &>( this, &v9, v13); } else { *v2 = v4; *(_OWORD *)this = 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 *)v13); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v13); } if ( *(long long **)v10 != &v12 ) operator delete(*(void **)v10, v12 + 1); } } return this; }
parseConstant: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RSI MOV RBX,RDI LEA R14,[RSI + 0x20] MOV R12,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] MOV RBP,R13 CMP R13,R12 JZ 0x0018aa57 MOV RBP,R13 LAB_0018aa3f: MOVSX EDI,byte ptr [RBP] CALL 0x0011b0c0 TEST EAX,EAX JZ 0x0018aa57 INC RBP MOV qword ptr [R14],RBP CMP RBP,R12 JNZ 0x0018aa3f LAB_0018aa57: CMP RBP,R12 JZ 0x0018aaad MOVZX EAX,byte ptr [RBP] CMP EAX,0x27 JZ 0x0018aa6a CMP EAX,0x22 JNZ 0x0018aab8 LAB_0018aa6a: LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 CALL 0x0018bdfc MOV RDX,qword ptr [R12] TEST RDX,RDX JZ 0x0018aab8 LAB_0018aa83: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0018c450 LAB_0018aa90: MOV RSI,qword ptr [RSP + 0x8] TEST RSI,RSI JZ 0x0018ac15 LEA RDI,[RSP + 0x8] CALL 0x0018c670 JMP 0x0018ac15 LAB_0018aaad: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 JMP 0x0018ac15 LAB_0018aab8: LEA RAX,[0x22f180] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0018ac27 LAB_0018aac9: LEA RDX,[0x22f160] LEA R12,[RSP + 0x8] MOV RDI,R12 MOV RSI,R15 MOV ECX,0x1 CALL 0x00184122 CMP qword ptr [R12 + 0x8],0x0 JZ 0x0018ab94 LEA RSI,[0x1e8a4a] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JZ 0x0018ab7d LEA RSI,[0x1f1b1c] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JZ 0x0018ab7d LEA RSI,[0x1eb733] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JZ 0x0018abc3 LEA RSI,[0x1f1b21] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JZ 0x0018abc3 LEA RSI,[0x1f1f3c] LEA RDI,[RSP + 0x8] CALL 0x0011b220 TEST EAX,EAX JNZ 0x0018ac7e LEA RDX,[RSP + 0x28] MOV qword ptr [RDX],0x0 LAB_0018ab6e: LEA RSI,[RSP + 0x7] MOV RDI,RBX CALL 0x0018c790 JMP 0x0018abfa LAB_0018ab7d: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0x1 LAB_0018ab85: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0018c69e JMP 0x0018abfa LAB_0018ab94: LEA RCX,[R15 + 0x18] LEA RDI,[RSP + 0x28] MOV RSI,R15 MOV RDX,R14 CALL 0x0018be7c CMP byte ptr [RSP + 0x28],0x0 JZ 0x0018abda LAB_0018abaf: LEA RSI,[RSP + 0x7] LEA RDX,[RSP + 0x28] MOV RDI,RBX CALL 0x0018c9a4 JMP 0x0018abe3 LAB_0018abc3: LEA RDX,[RSP + 0x7] MOV byte ptr [RDX],0x0 LAB_0018abcb: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0018c69e JMP 0x0018abfa LAB_0018abda: MOV qword ptr [R14],R13 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 LAB_0018abe3: LEA R14,[RSP + 0x28] MOV RDI,R14 XOR ESI,ESI CALL 0x001590b4 MOV RDI,R14 CALL 0x0015e5a2 LAB_0018abfa: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0018ac15 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8c0 LAB_0018ac15: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018ac27: LEA RDI,[0x22f180] CALL 0x0011bff0 TEST EAX,EAX JZ 0x0018aac9 LAB_0018ac3b: LEA RDI,[0x22f160] LEA RSI,[0x1f1f17] MOV EDX,0x10 CALL 0x00162f54 LAB_0018ac53: LEA RDI,[0x163258] LEA RSI,[0x22f160] LEA RDX,[0x22e8d8] CALL 0x0011b7a0 LEA RDI,[0x22f180] CALL 0x0011b5a0 JMP 0x0018aac9 LAB_0018ac7e: MOV EDI,0x10 CALL 0x0011b440 MOV R14,RAX LAB_0018ac8b: LEA RSI,[0x1f1f41] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00154b5d MOV BPL,0x1 LAB_0018aca4: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x0011be10 XOR EBP,EBP MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df50] MOV RDI,R14 CALL 0x0011bf00
/* minja::Parser::parseConstant() */ void minja::Parser::parseConstant(void) { char *pcVar1; char *pcVar2; int iVar3; runtime_error *this; char *pcVar4; __normal_iterator *in_RSI; int8 *in_RDI; string *local_70; long local_68; long local_60 [2]; int8 local_50 [4]; pcVar1 = *(char **)(in_RSI + 0x18); pcVar2 = *(char **)(in_RSI + 0x20); pcVar4 = pcVar2; while ((pcVar4 != pcVar1 && (iVar3 = isspace((int)*pcVar4), iVar3 != 0))) { pcVar4 = pcVar4 + 1; *(char **)(in_RSI + 0x20) = pcVar4; } if (pcVar4 == pcVar1) { *in_RDI = 0; in_RDI[1] = 0; } else if (((*pcVar4 == '\'') || (*pcVar4 == '\"')) && (parseString_abi_cxx11_(), local_70 != (string *)0x0)) { /* try { // try from 0018aa83 to 0018aa8f has its CatchHandler @ 0018ad51 */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,std::__cxx11::string&>(); if (local_70 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_70,local_70); } } else { if ((parseConstant()::prim_tok_abi_cxx11_ == '\0') && (iVar3 = __cxa_guard_acquire(&parseConstant()::prim_tok_abi_cxx11_), iVar3 != 0)) { /* try { // try from 0018ac3b to 0018ac52 has its CatchHandler @ 0018acc9 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseConstant()::prim_tok_abi_cxx11_,"true\\b|True\\b|false\\b|False\\b|None\\b", 0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseConstant()::prim_tok_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseConstant()::prim_tok_abi_cxx11_); } consumeToken(&local_70); if (local_68 == 0) { /* try { // try from 0018ab94 to 0018aba7 has its CatchHandler @ 0018ad2f */ parseNumber((__normal_iterator *)local_50,in_RSI); if (local_50[0]._0_1_ == (data)0x0) { *(char **)(in_RSI + 0x20) = pcVar2; *in_RDI = 0; in_RDI[1] = 0; } else { /* try { // try from 0018abaf to 0018abc0 has its CatchHandler @ 0018ad13 */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&> (); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_50,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_50); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) { /* try { // try from 0018ab85 to 0018ab91 has its CatchHandler @ 0018ad31 */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,bool>(); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if ((iVar3 == 0) || (iVar3 = std::__cxx11::string::compare((char *)&local_70), iVar3 == 0)) { /* try { // try from 0018abcb to 0018abd7 has its CatchHandler @ 0018ad11 */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,bool>(); } else { iVar3 = std::__cxx11::string::compare((char *)&local_70); if (iVar3 != 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018ac8b to 0018aca0 has its CatchHandler @ 0018ad02 */ std::operator+((char *)local_50,(string *)"Unknown constant token: "); /* try { // try from 0018aca4 to 0018acc8 has its CatchHandler @ 0018acdd */ std::runtime_error::runtime_error(this,(string *)local_50); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50); } local_50[0] = 0; /* try { // try from 0018ab6e to 0018ab7a has its CatchHandler @ 0018ad0f */ std::__shared_ptr<minja::Value,(__gnu_cxx::_Lock_policy)2>:: __shared_ptr<std::allocator<minja::Value>,decltype(nullptr)>(); } } } if (local_70 != (string *)local_60) { operator_delete(local_70,local_60[0] + 1); } } return; }
30,987
translog_stop_writing
eloqsql/storage/maria/ma_loghandler.c
void translog_stop_writing() { DBUG_ENTER("translog_stop_writing"); DBUG_PRINT("error", ("errno: %d my_errno: %d", errno, my_errno)); translog_status= (translog_status == TRANSLOG_SHUTDOWN ? TRANSLOG_UNINITED : TRANSLOG_READONLY); log_descriptor.is_everything_flushed= 1; log_descriptor.open_flags= O_BINARY | O_RDONLY; DBUG_ASSERT(0); DBUG_VOID_RETURN; }
O0
c
translog_stop_writing: pushq %rbp movq %rsp, %rbp jmp 0xb11186 jmp 0xb11188 movl 0xae65e2(%rip), %edx # 0x15f7770 movl $0x2, %eax xorl %ecx, %ecx cmpl $0x3, %edx cmovel %ecx, %eax movl %eax, 0xae65cf(%rip) # 0x15f7770 movb $0x1, 0x12e86a8(%rip) # 0x1df9850 movl $0x0, 0xae77da(%rip) # 0x15f898c jmp 0xb111b4 jmp 0xb111b6 jmp 0xb111b8 popq %rbp retq nopw (%rax,%rax)
translog_stop_writing: push rbp mov rbp, rsp jmp short $+2 loc_B11186: jmp short $+2 loc_B11188: mov edx, cs:translog_status mov eax, 2 xor ecx, ecx cmp edx, 3 cmovz eax, ecx mov cs:translog_status, eax mov cs:byte_1DF9850, 1 mov cs:dword_15F898C, 0 jmp short $+2 loc_B111B4: jmp short $+2 loc_B111B6: jmp short $+2 loc_B111B8: pop rbp retn
long long translog_stop_writing() { long long result; // rax result = 2LL; if ( translog_status == 3 ) result = 0LL; translog_status = result; byte_1DF9850 = 1; dword_15F898C = 0; return result; }
operator++: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x28],RDI MOV dword ptr [RBP + -0x2c],ESI MOV RDI,qword ptr [RBP + -0x28] MOVUPS XMM0,xmmword ptr [RDI] MOVAPS xmmword ptr [RBP + -0x20],XMM0 CALL 0x00b11690 MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00b111d9 MOV EDX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x38] ADD RSP,0x40 POP RBP RET LAB_00b111d9: CALL 0x00533650
/* std::_Bit_iterator::TEMPNAMEPLACEHOLDERVALUE(int) */ int1 [16] __thiscall std::_Bit_iterator::operator++(_Bit_iterator *this,int param_1) { long lVar1; int1 auVar2 [12]; long in_FS_OFFSET; int1 auVar3 [16]; lVar1 = *(long *)(in_FS_OFFSET + 0x28); auVar2 = *(int1 (*) [12])this; _Bit_iterator_base::_M_bump_up((_Bit_iterator_base *)this); if (*(long *)(in_FS_OFFSET + 0x28) == lVar1) { auVar3._12_4_ = 0; auVar3._0_12_ = auVar2; return auVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
30,988
stbi__decode_jpeg_header
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image.h
static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan) { int m; z->jfif = 0; z->app14_color_transform = -1; // valid values are 0,1,2 z->marker = STBI__MARKER_none; // initialize cached marker to empty m = stbi__get_marker(z); if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG"); if (scan == STBI__SCAN_type) return 1; m = stbi__get_marker(z); while (!stbi__SOF(m)) { if (!stbi__process_marker(z,m)) return 0; m = stbi__get_marker(z); while (m == STBI__MARKER_none) { // some files have extra padding after their blocks, so ok, we'll scan if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG"); m = stbi__get_marker(z); } } z->progressive = stbi__SOF_progressive(m); if (!stbi__process_frame_header(z, scan)) return 0; return 1; }
O0
c
stbi__decode_jpeg_header: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq -0x10(%rbp), %rax movl $0x0, 0x4848(%rax) movq -0x10(%rbp), %rax movl $0xffffffff, 0x484c(%rax) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movb $-0x1, 0x4828(%rax) movq -0x10(%rbp), %rdi callq 0x26470 movzbl %al, %eax movl %eax, -0x18(%rbp) cmpl $0xd8, -0x18(%rbp) je 0x20292 leaq 0x1e085(%rip), %rdi # 0x3e30a callq 0x15290 movl %eax, -0x4(%rbp) jmp 0x2038e cmpl $0x1, -0x14(%rbp) jne 0x202a4 movl $0x1, -0x4(%rbp) jmp 0x2038e movq -0x10(%rbp), %rdi callq 0x26470 movzbl %al, %eax movl %eax, -0x18(%rbp) movb $0x1, %al cmpl $0xc0, -0x18(%rbp) movb %al, -0x19(%rbp) je 0x202dc movb $0x1, %al cmpl $0xc1, -0x18(%rbp) movb %al, -0x19(%rbp) je 0x202dc cmpl $0xc2, -0x18(%rbp) sete %al movb %al, -0x19(%rbp) movb -0x19(%rbp), %al xorb $-0x1, %al testb $0x1, %al jne 0x202e7 jmp 0x20354 movq -0x10(%rbp), %rdi movl -0x18(%rbp), %esi callq 0x26500 cmpl $0x0, %eax jne 0x20304 movl $0x0, -0x4(%rbp) jmp 0x2038e movq -0x10(%rbp), %rdi callq 0x26470 movzbl %al, %eax movl %eax, -0x18(%rbp) cmpl $0xff, -0x18(%rbp) jne 0x2034f movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x1faa0 cmpl $0x0, %eax je 0x2033e leaq 0x1dfdd(%rip), %rdi # 0x3e311 callq 0x15290 movl %eax, -0x4(%rbp) jmp 0x2038e movq -0x10(%rbp), %rdi callq 0x26470 movzbl %al, %eax movl %eax, -0x18(%rbp) jmp 0x20313 jmp 0x202b3 cmpl $0xc2, -0x18(%rbp) sete %al andb $0x1, %al movzbl %al, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x4830(%rax) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0x26b70 cmpl $0x0, %eax jne 0x20387 movl $0x0, -0x4(%rbp) jmp 0x2038e movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
stbi__decode_jpeg_header: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov rax, [rbp+var_10] mov dword ptr [rax+4848h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+484Ch], 0FFFFFFFFh mov rax, [rbp+var_10] mov byte ptr [rax+4828h], 0FFh mov rdi, [rbp+var_10] call stbi__get_marker movzx eax, al mov [rbp+var_18], eax cmp [rbp+var_18], 0D8h jz short loc_20292 lea rdi, aNoSoi; "no SOI" call stbi__err mov [rbp+var_4], eax jmp loc_2038E loc_20292: cmp [rbp+var_14], 1 jnz short loc_202A4 mov [rbp+var_4], 1 jmp loc_2038E loc_202A4: mov rdi, [rbp+var_10] call stbi__get_marker movzx eax, al mov [rbp+var_18], eax loc_202B3: mov al, 1 cmp [rbp+var_18], 0C0h mov [rbp+var_19], al jz short loc_202DC mov al, 1 cmp [rbp+var_18], 0C1h mov [rbp+var_19], al jz short loc_202DC cmp [rbp+var_18], 0C2h setz al mov [rbp+var_19], al loc_202DC: mov al, [rbp+var_19] xor al, 0FFh test al, 1 jnz short loc_202E7 jmp short loc_20354 loc_202E7: mov rdi, [rbp+var_10] mov esi, [rbp+var_18] call stbi__process_marker cmp eax, 0 jnz short loc_20304 mov [rbp+var_4], 0 jmp loc_2038E loc_20304: mov rdi, [rbp+var_10] call stbi__get_marker movzx eax, al mov [rbp+var_18], eax loc_20313: cmp [rbp+var_18], 0FFh jnz short loc_2034F mov rax, [rbp+var_10] mov rdi, [rax] call stbi__at_eof cmp eax, 0 jz short loc_2033E lea rdi, aNoSof; "no SOF" call stbi__err mov [rbp+var_4], eax jmp short loc_2038E loc_2033E: mov rdi, [rbp+var_10] call stbi__get_marker movzx eax, al mov [rbp+var_18], eax jmp short loc_20313 loc_2034F: jmp loc_202B3 loc_20354: cmp [rbp+var_18], 0C2h setz al and al, 1 movzx ecx, al mov rax, [rbp+var_10] mov [rax+4830h], ecx mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call stbi__process_frame_header cmp eax, 0 jnz short loc_20387 mov [rbp+var_4], 0 jmp short loc_2038E loc_20387: mov [rbp+var_4], 1 loc_2038E: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long stbi__decode_jpeg_header(long long a1, unsigned int a2) { bool v3; // [rsp+7h] [rbp-19h] unsigned int marker; // [rsp+8h] [rbp-18h] *(_DWORD *)(a1 + 18504) = 0; *(_DWORD *)(a1 + 18508) = -1; *(_BYTE *)(a1 + 18472) = -1; if ( (unsigned __int8)stbi__get_marker(a1) == 216 ) { if ( a2 == 1 ) { return 1; } else { marker = (unsigned __int8)stbi__get_marker(a1); while ( 1 ) { v3 = 1; if ( marker != 192 ) { v3 = 1; if ( marker != 193 ) v3 = marker == 194; } if ( v3 ) break; if ( !(unsigned int)stbi__process_marker(a1, marker) ) return 0; while ( 1 ) { marker = (unsigned __int8)stbi__get_marker(a1); if ( marker != 255 ) break; if ( stbi__at_eof(*(_QWORD *)a1) ) return (unsigned int)stbi__err((long long)"no SOF"); } } *(_DWORD *)(a1 + 18480) = marker == 194; return stbi__process_frame_header(a1, a2) != 0; } } else { return (unsigned int)stbi__err((long long)"no SOI"); } }
stbi__decode_jpeg_header: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4848],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x484c],0xffffffff MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4828],0xff MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126470 MOVZX EAX,AL MOV dword ptr [RBP + -0x18],EAX CMP dword ptr [RBP + -0x18],0xd8 JZ 0x00120292 LEA RDI,[0x13e30a] CALL 0x00115290 MOV dword ptr [RBP + -0x4],EAX JMP 0x0012038e LAB_00120292: CMP dword ptr [RBP + -0x14],0x1 JNZ 0x001202a4 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012038e LAB_001202a4: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126470 MOVZX EAX,AL MOV dword ptr [RBP + -0x18],EAX LAB_001202b3: MOV AL,0x1 CMP dword ptr [RBP + -0x18],0xc0 MOV byte ptr [RBP + -0x19],AL JZ 0x001202dc MOV AL,0x1 CMP dword ptr [RBP + -0x18],0xc1 MOV byte ptr [RBP + -0x19],AL JZ 0x001202dc CMP dword ptr [RBP + -0x18],0xc2 SETZ AL MOV byte ptr [RBP + -0x19],AL LAB_001202dc: MOV AL,byte ptr [RBP + -0x19] XOR AL,0xff TEST AL,0x1 JNZ 0x001202e7 JMP 0x00120354 LAB_001202e7: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x18] CALL 0x00126500 CMP EAX,0x0 JNZ 0x00120304 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0012038e LAB_00120304: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126470 MOVZX EAX,AL MOV dword ptr [RBP + -0x18],EAX LAB_00120313: CMP dword ptr [RBP + -0x18],0xff JNZ 0x0012034f MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0011faa0 CMP EAX,0x0 JZ 0x0012033e LEA RDI,[0x13e311] CALL 0x00115290 MOV dword ptr [RBP + -0x4],EAX JMP 0x0012038e LAB_0012033e: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126470 MOVZX EAX,AL MOV dword ptr [RBP + -0x18],EAX JMP 0x00120313 LAB_0012034f: JMP 0x001202b3 LAB_00120354: CMP dword ptr [RBP + -0x18],0xc2 SETZ AL AND AL,0x1 MOVZX ECX,AL MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4830],ECX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x00126b70 CMP EAX,0x0 JNZ 0x00120387 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0012038e LAB_00120387: MOV dword ptr [RBP + -0x4],0x1 LAB_0012038e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 stbi__decode_jpeg_header(int8 *param_1,int param_2) { char cVar1; int4 uVar2; int iVar3; bool bVar4; int4 local_c; *(int4 *)(param_1 + 0x909) = 0; *(int4 *)((long)param_1 + 0x484c) = 0xffffffff; *(int1 *)(param_1 + 0x905) = 0xff; cVar1 = stbi__get_marker(param_1); if (cVar1 == -0x28) { if (param_2 == 1) { local_c = 1; } else { cVar1 = stbi__get_marker(param_1); while( true ) { bVar4 = true; if ((cVar1 != -0x40) && (bVar4 = true, cVar1 != -0x3f)) { bVar4 = cVar1 == -0x3e; } if (bVar4) { *(uint *)(param_1 + 0x906) = (uint)(cVar1 == -0x3e); iVar3 = stbi__process_frame_header(param_1,param_2); if (iVar3 == 0) { return 0; } return 1; } iVar3 = stbi__process_marker(param_1,cVar1); if (iVar3 == 0) break; cVar1 = stbi__get_marker(param_1); while (cVar1 == -1) { iVar3 = stbi__at_eof(*param_1); if (iVar3 != 0) { uVar2 = stbi__err("no SOF"); return uVar2; } cVar1 = stbi__get_marker(param_1); } } local_c = 0; } } else { local_c = stbi__err("no SOI"); } return local_c; }
30,989
minja::MethodCallExpr::MethodCallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::VariableExpr>&&, minja::ArgumentsExpression&&)
monkey531[P]llama/common/minja.hpp
MethodCallExpr(const Location & location, std::shared_ptr<Expression> && obj, std::shared_ptr<VariableExpr> && m, ArgumentsExpression && a) : Expression(location), object(std::move(obj)), method(std::move(m)), args(std::move(a)) {}
O2
cpp
minja::MethodCallExpr::MethodCallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::VariableExpr>&&, minja::ArgumentsExpression&&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r14 movq %rdx, %r15 movq %rdi, %r12 callq 0x626b6 leaq 0x902e8(%rip), %rax # 0xfb820 addq $0x10, %rax movq %rax, (%r12) andq $0x0, 0x28(%r12) movups (%r15), %xmm0 andq $0x0, 0x8(%r15) movups %xmm0, 0x20(%r12) andq $0x0, (%r15) andq $0x0, 0x38(%r12) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x30(%r12) andq $0x0, (%r14) addq $0x40, %r12 movq %r12, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x6b58c
_ZN5minja14MethodCallExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEEOS4_INS_12VariableExprEEONS_19ArgumentsExpressionE: push r15 push r14 push r12 push rbx push rax mov rbx, r8 mov r14, rcx mov r15, rdx mov r12, rdi call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&) lea rax, _ZTVN5minja14MethodCallExprE; `vtable for'minja::MethodCallExpr add rax, 10h mov [r12], rax and qword ptr [r12+28h], 0 movups xmm0, xmmword ptr [r15] and qword ptr [r15+8], 0 movups xmmword ptr [r12+20h], xmm0 and qword ptr [r15], 0 and qword ptr [r12+38h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r12+30h], xmm0 and qword ptr [r14], 0 add r12, 40h ; '@' mov rdi, r12 mov rsi, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp $+5; minja::ArgumentsExpression::ArgumentsExpression(minja::ArgumentsExpression&&)
long long minja::MethodCallExpr::MethodCallExpr( long long a1, _QWORD *a2, __int128 *a3, __int128 *a4, long long a5) { __int128 v8; // xmm0 __int128 v9; // xmm0 minja::Expression::Expression((_QWORD *)a1, a2); *(_QWORD *)a1 = &`vtable for'minja::MethodCallExpr + 2; *(_QWORD *)(a1 + 40) = 0LL; v8 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v8; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v9 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v9; *(_QWORD *)a4 = 0LL; return minja::ArgumentsExpression::ArgumentsExpression(a1 + 64, a5); }
MethodCallExpr: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RCX MOV R15,RDX MOV R12,RDI CALL 0x001626b6 LEA RAX,[0x1fb820] ADD RAX,0x10 MOV qword ptr [R12],RAX AND qword ptr [R12 + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R15] AND qword ptr [R15 + 0x8],0x0 MOVUPS xmmword ptr [R12 + 0x20],XMM0 AND qword ptr [R15],0x0 AND qword ptr [R12 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R12 + 0x30],XMM0 AND qword ptr [R14],0x0 ADD R12,0x40 MOV RDI,R12 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0016b58c
/* minja::MethodCallExpr::MethodCallExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::VariableExpr>&&, minja::ArgumentsExpression&&) */ void __thiscall minja::MethodCallExpr::MethodCallExpr (MethodCallExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3, ArgumentsExpression *param_4) { int8 uVar1; Expression::Expression((Expression *)this,param_1); *(int ***)this = &PTR_do_evaluate_001fb830; *(int8 *)(this + 0x28) = 0; uVar1 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar1; *(int8 *)param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar1; *(int8 *)param_3 = 0; ArgumentsExpression::ArgumentsExpression((ArgumentsExpression *)(this + 0x40),param_4); return; }
30,990
ma_mmap_pread
eloqsql/storage/maria/ma_dynrec.c
size_t _ma_mmap_pread(MARIA_HA *info, uchar *Buffer, size_t Count, my_off_t offset, myf MyFlags) { DBUG_PRINT("info", ("maria_read with mmap %d\n", info->dfile.file)); if (info->s->lock_key_trees) mysql_rwlock_rdlock(&info->s->mmap_lock); /* The following test may fail in the following cases: - We failed to remap a memory area (fragmented memory?) - This thread has done some writes, but not yet extended the memory mapped area. */ if (info->s->mmaped_length >= offset + Count) { memcpy(Buffer, info->s->file_map + offset, Count); if (info->s->lock_key_trees) mysql_rwlock_unlock(&info->s->mmap_lock); return 0; } else { if (info->s->lock_key_trees) mysql_rwlock_unlock(&info->s->mmap_lock); return mysql_file_pread(info->dfile.file, Buffer, Count, offset, MyFlags); } }
O0
c
ma_mmap_pread: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) jmp 0x4a90e movq -0x10(%rbp), %rax movq (%rax), %rax cmpb $0x0, 0x7e3(%rax) je 0x4a93d movq -0x10(%rbp), %rax movq (%rax), %rdi addq $0xb78, %rdi # imm = 0xB78 leaq 0x109e7e(%rip), %rsi # 0x1547b1 movl $0x84, %edx callq 0x4aa10 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0xa00(%rax), %rax movq -0x28(%rbp), %rcx addq -0x20(%rbp), %rcx cmpq %rcx, %rax jb 0x4a9a4 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x5f0(%rax), %rsi addq -0x28(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x29090 movq -0x10(%rbp), %rax movq (%rax), %rax cmpb $0x0, 0x7e3(%rax) je 0x4a99a movq -0x10(%rbp), %rax movq (%rax), %rdi addq $0xb78, %rdi # imm = 0xB78 callq 0x4aa80 movq $0x0, -0x8(%rbp) jmp 0x4a9fa movq -0x10(%rbp), %rax movq (%rax), %rax cmpb $0x0, 0x7e3(%rax) je 0x4a9c7 movq -0x10(%rbp), %rax movq (%rax), %rdi addq $0xb78, %rdi # imm = 0xB78 callq 0x4aa80 movq -0x10(%rbp), %rax movl 0x480(%rax), %edx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 movq -0x28(%rbp), %r9 movq -0x30(%rbp), %rax leaq 0x109dc9(%rip), %rdi # 0x1547b1 movl $0x98, %esi movq %rax, (%rsp) callq 0x4aaf0 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_mmap_pread: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 jmp short $+2 loc_4A90E: mov rax, [rbp+var_10] mov rax, [rax] cmp byte ptr [rax+7E3h], 0 jz short loc_4A93D mov rax, [rbp+var_10] mov rdi, [rax] add rdi, 0B78h lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 84h call inline_mysql_rwlock_rdlock_2 loc_4A93D: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+0A00h] mov rcx, [rbp+var_28] add rcx, [rbp+var_20] cmp rax, rcx jb short loc_4A9A4 mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+5F0h] add rsi, [rbp+var_28] mov rdx, [rbp+var_20] call _memcpy mov rax, [rbp+var_10] mov rax, [rax] cmp byte ptr [rax+7E3h], 0 jz short loc_4A99A mov rax, [rbp+var_10] mov rdi, [rax] add rdi, 0B78h call inline_mysql_rwlock_unlock_3 loc_4A99A: mov [rbp+var_8], 0 jmp short loc_4A9FA loc_4A9A4: mov rax, [rbp+var_10] mov rax, [rax] cmp byte ptr [rax+7E3h], 0 jz short loc_4A9C7 mov rax, [rbp+var_10] mov rdi, [rax] add rdi, 0B78h call inline_mysql_rwlock_unlock_3 loc_4A9C7: mov rax, [rbp+var_10] mov edx, [rax+480h] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] mov r9, [rbp+var_28] mov rax, [rbp+var_30] lea rdi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 98h mov [rsp+40h+var_40], rax call inline_mysql_file_pread_0 mov [rbp+var_8], rax loc_4A9FA: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_mmap_pread(_DWORD *a1, long long a2, long long a3, long long a4, long long a5) { if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) inline_mysql_rwlock_rdlock_2( *(_QWORD *)a1 + 2936LL, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 132LL); if ( *(_QWORD *)(*(_QWORD *)a1 + 2560LL) < (unsigned long long)(a3 + a4) ) { if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) inline_mysql_rwlock_unlock_3(*(_QWORD *)a1 + 2936LL); return inline_mysql_file_pread_0( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 152, a1[288], a2, a3, a4, a5); } else { memcpy(a2, a4 + *(_QWORD *)(*(_QWORD *)a1 + 1520LL), a3); if ( *(_BYTE *)(*(_QWORD *)a1 + 2019LL) ) inline_mysql_rwlock_unlock_3(*(_QWORD *)a1 + 2936LL); return 0LL; } }
_ma_mmap_pread: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 JMP 0x0014a90e LAB_0014a90e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x7e3],0x0 JZ 0x0014a93d MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] ADD RDI,0xb78 LEA RSI,[0x2547b1] MOV EDX,0x84 CALL 0x0014aa10 LAB_0014a93d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0xa00] MOV RCX,qword ptr [RBP + -0x28] ADD RCX,qword ptr [RBP + -0x20] CMP RAX,RCX JC 0x0014a9a4 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x5f0] ADD RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00129090 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x7e3],0x0 JZ 0x0014a99a MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] ADD RDI,0xb78 CALL 0x0014aa80 LAB_0014a99a: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014a9fa LAB_0014a9a4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX + 0x7e3],0x0 JZ 0x0014a9c7 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] ADD RDI,0xb78 CALL 0x0014aa80 LAB_0014a9c7: MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x480] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] LEA RDI,[0x2547b1] MOV ESI,0x98 MOV qword ptr [RSP],RAX CALL 0x0014aaf0 MOV qword ptr [RBP + -0x8],RAX LAB_0014a9fa: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 _ma_mmap_pread(long *param_1,void *param_2,size_t param_3,long param_4,int8 param_5) { int8 local_10; if (*(char *)(*param_1 + 0x7e3) != '\0') { inline_mysql_rwlock_rdlock (*param_1 + 0xb78,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c" ,0x84); } if (*(ulong *)(*param_1 + 0xa00) < param_4 + param_3) { if (*(char *)(*param_1 + 0x7e3) != '\0') { inline_mysql_rwlock_unlock(*param_1 + 0xb78); } local_10 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0x98, (int)param_1[0x90],param_2,param_3,param_4,param_5); } else { memcpy(param_2,(void *)(*(long *)(*param_1 + 0x5f0) + param_4),param_3); if (*(char *)(*param_1 + 0x7e3) != '\0') { inline_mysql_rwlock_unlock(*param_1 + 0xb78); } local_10 = 0; } return local_10; }
30,991
google::protobuf::compiler::objectivec::ImportWriter::ImportWriter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
ImportWriter::ImportWriter( const std::string& generate_for_named_framework, const std::string& named_framework_to_proto_path_mappings_path, const std::string& runtime_import_prefix, bool include_wkt_imports) : generate_for_named_framework_(generate_for_named_framework), named_framework_to_proto_path_mappings_path_( named_framework_to_proto_path_mappings_path), runtime_import_prefix_(runtime_import_prefix), include_wkt_imports_(include_wkt_imports), need_to_parse_mapping_file_(true) {}
O3
cpp
google::protobuf::compiler::objectivec::ImportWriter::ImportWriter(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r8d, %ebp movq %rcx, %r15 movq %rdx, %r12 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rsp) movq %rax, (%rdi) movq (%rsi), %rax movq 0x8(%rsi), %rdx addq %rax, %rdx movq %rax, %rsi callq 0x2586a leaq 0x20(%rbx), %r14 leaq 0x30(%rbx), %r13 movq %r13, 0x20(%rbx) movq (%r12), %rsi movq 0x8(%r12), %rdx addq %rsi, %rdx movq %r14, %rdi callq 0x2586a leaq 0x40(%rbx), %rdi leaq 0x50(%rbx), %rax movq %rax, 0x40(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x2586a movb %bpl, 0x60(%rbx) leaq 0x70(%rbx), %rax movl $0x0, 0x70(%rbx) xorl %ecx, %ecx movq %rcx, 0x78(%rbx) movq %rax, 0x80(%rbx) movq %rax, 0x88(%rbx) movq %rcx, 0x90(%rbx) movb $0x1, 0x98(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xa0(%rbx) movups %xmm0, 0xb0(%rbx) movups %xmm0, 0xc0(%rbx) movups %xmm0, 0xd0(%rbx) movq %rcx, 0xe0(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq (%r14), %rdi cmpq %r13, %rdi je 0x51836 callq 0x1f4a0 jmp 0x51836 movq %rax, %r15 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0x51844 callq 0x1f4a0 movq %r15, %rdi callq 0x1f860
_ZN6google8protobuf8compiler10objectivec12ImportWriterC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESB_SB_b: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, r8d mov r15, rcx mov r12, rdx mov rbx, rdi lea rax, [rdi+10h] mov [rsp+38h+var_38], rax mov [rdi], rax mov rax, [rsi] mov rdx, [rsi+8] add rdx, rax mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea r14, [rbx+20h] lea r13, [rbx+30h] mov [rbx+20h], r13 mov rsi, [r12] mov rdx, [r12+8] add rdx, rsi mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rdi, [rbx+40h] lea rax, [rbx+50h] mov [rbx+40h], rax mov rsi, [r15] mov rdx, [r15+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov [rbx+60h], bpl lea rax, [rbx+70h] mov dword ptr [rbx+70h], 0 xor ecx, ecx mov [rbx+78h], rcx mov [rbx+80h], rax mov [rbx+88h], rax mov [rbx+90h], rcx mov byte ptr [rbx+98h], 1 xorps xmm0, xmm0 movups xmmword ptr [rbx+0A0h], xmm0 movups xmmword ptr [rbx+0B0h], xmm0 movups xmmword ptr [rbx+0C0h], xmm0 movups xmmword ptr [rbx+0D0h], xmm0 mov [rbx+0E0h], rcx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax mov rdi, [r14]; void * cmp rdi, r13 jz short loc_51836 call __ZdlPv; operator delete(void *) jmp short loc_51836 mov r15, rax loc_51836: mov rdi, [rbx]; void * cmp rdi, [rsp+0] jz short loc_51844 call __ZdlPv; operator delete(void *) loc_51844: mov rdi, r15 call __Unwind_Resume
long long google::protobuf::compiler::objectivec::ImportWriter::ImportWriter( long long a1, long long a2, long long a3, long long a4, char a5) { long long result; // rax *(_QWORD *)a1 = a1 + 16; std::string::_M_construct<char *>(a1, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); *(_QWORD *)(a1 + 32) = a1 + 48; std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); *(_QWORD *)(a1 + 64) = a1 + 80; std::string::_M_construct<char *>(a1 + 64, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8)); *(_BYTE *)(a1 + 96) = a5; result = a1 + 112; *(_DWORD *)(a1 + 112) = 0; *(_QWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 128) = a1 + 112; *(_QWORD *)(a1 + 136) = a1 + 112; *(_QWORD *)(a1 + 144) = 0LL; *(_BYTE *)(a1 + 152) = 1; *(_OWORD *)(a1 + 160) = 0LL; *(_OWORD *)(a1 + 176) = 0LL; *(_OWORD *)(a1 + 192) = 0LL; *(_OWORD *)(a1 + 208) = 0LL; *(_QWORD *)(a1 + 224) = 0LL; return result; }
ImportWriter: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,R8D MOV R15,RCX MOV R12,RDX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP],RAX MOV qword ptr [RDI],RAX MOV RAX,qword ptr [RSI] MOV RDX,qword ptr [RSI + 0x8] ADD RDX,RAX MOV RSI,RAX CALL 0x0012586a LEA R14,[RBX + 0x20] LEA R13,[RBX + 0x30] MOV qword ptr [RBX + 0x20],R13 MOV RSI,qword ptr [R12] MOV RDX,qword ptr [R12 + 0x8] ADD RDX,RSI LAB_00151798: MOV RDI,R14 CALL 0x0012586a LEA RDI,[RBX + 0x40] LEA RAX,[RBX + 0x50] MOV qword ptr [RBX + 0x40],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_001517b6: CALL 0x0012586a LAB_001517bb: MOV byte ptr [RBX + 0x60],BPL LEA RAX,[RBX + 0x70] MOV dword ptr [RBX + 0x70],0x0 XOR ECX,ECX MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x80],RAX MOV qword ptr [RBX + 0x88],RAX MOV qword ptr [RBX + 0x90],RCX MOV byte ptr [RBX + 0x98],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xa0],XMM0 MOVUPS xmmword ptr [RBX + 0xb0],XMM0 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOVUPS xmmword ptr [RBX + 0xd0],XMM0 MOV qword ptr [RBX + 0xe0],RCX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::compiler::objectivec::ImportWriter::ImportWriter(std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&, bool) */ void __thiscall google::protobuf::compiler::objectivec::ImportWriter::ImportWriter (ImportWriter *this,string *param_1,string *param_2,string *param_3,bool param_4) { *(ImportWriter **)this = this + 0x10; std::__cxx11::string::_M_construct<char*> (this,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); *(ImportWriter **)(this + 0x20) = this + 0x30; /* try { // try from 00151798 to 0015179f has its CatchHandler @ 00151833 */ std::__cxx11::string::_M_construct<char*> (this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); *(ImportWriter **)(this + 0x40) = this + 0x50; /* try { // try from 001517b6 to 001517ba has its CatchHandler @ 00151821 */ std::__cxx11::string::_M_construct<char*> (this + 0x40,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); this[0x60] = (ImportWriter)param_4; *(int4 *)(this + 0x70) = 0; *(int8 *)(this + 0x78) = 0; *(ImportWriter **)(this + 0x80) = this + 0x70; *(ImportWriter **)(this + 0x88) = this + 0x70; *(int8 *)(this + 0x90) = 0; this[0x98] = (ImportWriter)0x1; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; return; }
30,992
ma_open
eloqsql/libmariadb/libmariadb/ma_io.c
MA_FILE *ma_open(const char *location, const char *mode, MYSQL *mysql) { int CodePage= -1; FILE *fp= NULL; MA_FILE *ma_file= NULL; if (!location || !location[0]) return NULL; #ifdef HAVE_REMOTEIO if (strstr(location, "://")) goto remote; #endif #ifdef _WIN32 if (mysql && mysql->charset) CodePage= madb_get_windows_cp(mysql->charset->csname); #endif if (CodePage == -1) { if (!(fp= fopen(location, mode))) { return NULL; } } #ifdef _WIN32 /* See CONC-44: we need to support non ascii filenames too, so we convert current character set to wchar_t and try to open the file via _wsopen */ else { wchar_t *w_filename= NULL; wchar_t *w_mode= NULL; int len; DWORD Length; len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), NULL, 0); if (!len) return NULL; if (!(w_filename= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t)))) { my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return NULL; } Length= len; len= MultiByteToWideChar(CodePage, 0, location, (int)strlen(location), w_filename, (int)Length); if (!len) { /* todo: error handling */ free(w_filename); return NULL; } len= (int)strlen(mode); if (!(w_mode= (wchar_t *)calloc(1, (len + 1) * sizeof(wchar_t)))) { my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); free(w_filename); return NULL; } Length= len; len= MultiByteToWideChar(CodePage, 0, mode, (int)strlen(mode), w_mode, (int)Length); if (!len) { /* todo: error handling */ free(w_filename); free(w_mode); return NULL; } fp= _wfopen(w_filename, w_mode); free(w_filename); free(w_mode); } #endif if (fp) { ma_file= (MA_FILE *)malloc(sizeof(MA_FILE)); if (!ma_file) { fclose(fp); my_set_error(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return NULL; } ma_file->type= MA_FILE_LOCAL; ma_file->ptr= (void *)fp; } return ma_file; #ifdef HAVE_REMOTEIO remote: /* check if plugin for remote io is available and try * to open location */ { MYSQL mysql; if (rio_plugin ||(rio_plugin= (struct st_mysql_client_plugin_REMOTEIO *) mysql_client_find_plugin(&mysql, NULL, MARIADB_CLIENT_REMOTEIO_PLUGIN))) return rio_plugin->methods->mopen(location, mode); return NULL; } #endif }
O3
c
ma_open: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x500, %rsp # imm = 0x500 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) testq %rdi, %rdi je 0x27bf4 movq %rdi, %r12 cmpb $0x0, (%rdi) je 0x27bf4 movq %rdx, %r15 movq %rsi, %r14 leaq 0xcf7c(%rip), %rsi # 0x34af5 movq %r12, %rdi callq 0x13100 testq %rax, %rax je 0x27bc3 leaq 0x22cf3(%rip), %r15 # 0x4a880 movq (%r15), %rax testq %rax, %rax jne 0x27bb2 xorl %ebx, %ebx leaq -0x520(%rbp), %rdi xorl %esi, %esi movl $0x64, %edx callq 0x27a58 movq %rax, (%r15) testq %rax, %rax je 0x27bf6 movq 0x58(%rax), %rax movq %r12, %rdi movq %r14, %rsi callq *(%rax) movq %rax, %rbx jmp 0x27bf6 movq %r12, %rdi movq %r14, %rsi callq 0x13520 testq %rax, %rax je 0x27bf4 movq %rax, %r14 movl $0x10, %edi callq 0x13600 testq %rax, %rax je 0x27c18 movq %rax, %rbx movl $0x1, (%rax) movq %r14, 0x8(%rax) jmp 0x27bf6 xorl %ebx, %ebx movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x27c3f movq %rbx, %rax addq $0x500, %rsp # imm = 0x500 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi callq 0x13460 leaq 0x20e39(%rip), %rax # 0x48a60 movq (%rax), %rdx xorl %ebx, %ebx movq %r15, %rdi movl $0x7d8, %esi # imm = 0x7D8 xorl %ecx, %ecx xorl %eax, %eax callq 0x15789 jmp 0x27bf6 callq 0x13500
ma_open: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 500h mov rax, fs:28h mov [rbp+var_28], rax test rdi, rdi jz loc_27BF4 mov r12, rdi cmp byte ptr [rdi], 0 jz loc_27BF4 mov r15, rdx mov r14, rsi lea rsi, asc_34AF5; "://" mov rdi, r12 call _strstr test rax, rax jz short loc_27BC3 lea r15, rio_plugin mov rax, [r15] test rax, rax jnz short loc_27BB2 xor ebx, ebx lea rdi, [rbp+var_520] xor esi, esi mov edx, 64h ; 'd' call mysql_client_find_plugin mov [r15], rax test rax, rax jz short loc_27BF6 loc_27BB2: mov rax, [rax+58h] mov rdi, r12 mov rsi, r14 call qword ptr [rax] mov rbx, rax jmp short loc_27BF6 loc_27BC3: mov rdi, r12 mov rsi, r14 call _fopen64 test rax, rax jz short loc_27BF4 mov r14, rax mov edi, 10h call _malloc test rax, rax jz short loc_27C18 mov rbx, rax mov dword ptr [rax], 1 mov [rax+8], r14 jmp short loc_27BF6 loc_27BF4: xor ebx, ebx loc_27BF6: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_27C3F mov rax, rbx add rsp, 500h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_27C18: mov rdi, r14 call _fclose lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] xor ebx, ebx mov rdi, r15 mov esi, 7D8h xor ecx, ecx xor eax, eax call my_set_error jmp short loc_27BF6 loc_27C3F: call ___stack_chk_fail
long long ma_open( _BYTE *a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v12; // rcx long long v13; // r8 long long v14; // r9 double v15; // xmm4_8 double v16; // xmm5_8 long long plugin; // rax long long v18; // rbx long long v19; // rax long long v20; // r14 long long v21; // rax char v23[1272]; // [rsp+0h] [rbp-520h] BYREF unsigned long long v24; // [rsp+4F8h] [rbp-28h] v24 = __readfsqword(0x28u); if ( !a1 || !*a1 ) return 0LL; if ( !strstr(a1, "://") ) { v19 = fopen64(a1, a2); if ( v19 ) { v20 = v19; v21 = malloc(16LL); if ( v21 ) { v18 = v21; *(_DWORD *)v21 = 1; *(_QWORD *)(v21 + 8) = v20; } else { fclose(v20); v18 = 0LL; my_set_error(a3, 2008, (long long)SQLSTATE_UNKNOWN, 0LL); } return v18; } return 0LL; } plugin = rio_plugin; if ( rio_plugin ) return (**(long long ( ***)(_BYTE *, long long))(plugin + 88))(a1, a2); v18 = 0LL; plugin = mysql_client_find_plugin((long long)v23, 0LL, 100, a4, a5, a6, a7, v15, v16, a10, a11, v12, v13, v14, v23[0]); rio_plugin = plugin; if ( plugin ) return (**(long long ( ***)(_BYTE *, long long))(plugin + 88))(a1, a2); return v18; }
ma_open: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x500 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX TEST RDI,RDI JZ 0x00127bf4 MOV R12,RDI CMP byte ptr [RDI],0x0 JZ 0x00127bf4 MOV R15,RDX MOV R14,RSI LEA RSI,[0x134af5] MOV RDI,R12 CALL 0x00113100 TEST RAX,RAX JZ 0x00127bc3 LEA R15,[0x14a880] MOV RAX,qword ptr [R15] TEST RAX,RAX JNZ 0x00127bb2 XOR EBX,EBX LEA RDI,[RBP + -0x520] XOR ESI,ESI MOV EDX,0x64 CALL 0x00127a58 MOV qword ptr [R15],RAX TEST RAX,RAX JZ 0x00127bf6 LAB_00127bb2: MOV RAX,qword ptr [RAX + 0x58] MOV RDI,R12 MOV RSI,R14 CALL qword ptr [RAX] MOV RBX,RAX JMP 0x00127bf6 LAB_00127bc3: MOV RDI,R12 MOV RSI,R14 CALL 0x00113520 TEST RAX,RAX JZ 0x00127bf4 MOV R14,RAX MOV EDI,0x10 CALL 0x00113600 TEST RAX,RAX JZ 0x00127c18 MOV RBX,RAX MOV dword ptr [RAX],0x1 MOV qword ptr [RAX + 0x8],R14 JMP 0x00127bf6 LAB_00127bf4: XOR EBX,EBX LAB_00127bf6: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x00127c3f MOV RAX,RBX ADD RSP,0x500 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00127c18: MOV RDI,R14 CALL 0x00113460 LEA RAX,[0x148a60] MOV RDX,qword ptr [RAX] XOR EBX,EBX MOV RDI,R15 MOV ESI,0x7d8 XOR ECX,ECX XOR EAX,EAX CALL 0x00115789 JMP 0x00127bf6 LAB_00127c3f: CALL 0x00113500
int4 * ma_open(char *param_1,char *param_2,int8 param_3) { char *pcVar1; int4 *puVar2; FILE *__stream; long in_FS_OFFSET; int1 local_528 [1272]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); if ((param_1 != (char *)0x0) && (*param_1 != '\0')) { pcVar1 = strstr(param_1,"://"); if (pcVar1 != (char *)0x0) { if (rio_plugin == 0) { puVar2 = (int4 *)0x0; rio_plugin = mysql_client_find_plugin(local_528,0,100); if (rio_plugin == 0) goto LAB_00127bf6; } puVar2 = (int4 *)(*(code *)**(int8 **)(rio_plugin + 0x58))(param_1,param_2); goto LAB_00127bf6; } __stream = fopen64(param_1,param_2); if (__stream != (FILE *)0x0) { puVar2 = (int4 *)malloc(0x10); if (puVar2 == (int4 *)0x0) { fclose(__stream); puVar2 = (int4 *)0x0; my_set_error(param_3,0x7d8,SQLSTATE_UNKNOWN,0); } else { *puVar2 = 1; *(FILE **)(puVar2 + 2) = __stream; } goto LAB_00127bf6; } } puVar2 = (int4 *)0x0; LAB_00127bf6: if (*(long *)(in_FS_OFFSET + 0x28) == local_30) { return puVar2; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
30,993
minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
ArgumentsValue evaluate(const std::shared_ptr<Context> & context) const { ArgumentsValue vargs; for (const auto& arg : this->args) { if (auto un_expr = std::dynamic_pointer_cast<UnaryOpExpr>(arg)) { if (un_expr->op == UnaryOpExpr::Op::Expansion) { auto array = un_expr->expr->evaluate(context); if (!array.is_array()) { throw std::runtime_error("Expansion operator only supported on arrays"); } array.for_each([&](Value & value) { vargs.args.push_back(value); }); continue; } else if (un_expr->op == UnaryOpExpr::Op::ExpansionDict) { auto dict = un_expr->expr->evaluate(context); if (!dict.is_object()) { throw std::runtime_error("ExpansionDict operator only supported on objects"); } dict.for_each([&](const Value & key) { vargs.kwargs.push_back({key.get<std::string>(), dict.at(key)}); }); continue; } } vargs.args.push_back(arg->evaluate(context)); } for (const auto& [name, value] : this->kwargs) { vargs.kwargs.push_back({name, value->evaluate(context)}); } return vargs; }
O2
cpp
minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rdx, %r15 movq %rdi, %rbp xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movq (%rsi), %r13 movq %rsi, 0x20(%rsp) movq 0x8(%rsi), %r14 leaq 0x78(%rsp), %r12 leaq 0x28(%rsp), %rbx movq %rdi, 0x8(%rsp) cmpq %r14, %r13 je 0x6ccae leaq 0x10(%rsp), %rdi movq %r13, %rsi callq 0x6d9be movq 0x10(%rsp), %rax testq %rax, %rax je 0x6cc0a movl 0x30(%rax), %ecx cmpl $0x4, %ecx je 0x6cc38 cmpl $0x3, %ecx jne 0x6cc0a movq 0x20(%rax), %rsi movq %r12, %rdi movq %r15, %rdx callq 0x62ea2 cmpq $0x0, 0x88(%rsp) je 0x6cd23 andq $0x0, 0x30(%rsp) movq %rbp, 0x28(%rsp) leaq 0x10a7(%rip), %rax # 0x6dc90 movq %rax, 0x40(%rsp) leaq 0x10a1(%rip), %rax # 0x6dc96 movq %rax, 0x38(%rsp) movq %r12, %rdi movq %rbx, %rbp movq %rbx, %rsi callq 0x6da14 jmp 0x6cc86 leaq 0x18(%rsp), %rdi callq 0x4fae0 movq (%r13), %rsi movq %r12, %rdi movq %r15, %rdx callq 0x62ea2 movq %rbp, %rdi movq %r12, %rsi callq 0x68e0a movq %r12, %rdi callq 0x63132 jmp 0x6cca5 movq 0x20(%rax), %rsi movq %r12, %rdi movq %r15, %rdx callq 0x62ea2 cmpq $0x0, 0x98(%rsp) je 0x6cd55 movq %rbp, 0x28(%rsp) movq %r12, 0x30(%rsp) leaq 0x1085(%rip), %rax # 0x6dcec movq %rax, 0x40(%rsp) leaq 0x107f(%rip), %rax # 0x6dcf2 movq %rax, 0x38(%rsp) movq %r12, %rdi movq %rbx, %rbp movq %rbx, %rsi callq 0x6da14 movq %rbp, %rdi callq 0x47f7a movq %r12, %rdi callq 0x63132 leaq 0x18(%rsp), %rdi callq 0x4fae0 movq 0x8(%rsp), %rbp addq $0x10, %r13 jmp 0x6cb88 movq 0x20(%rsp), %rcx movq 0x18(%rcx), %r14 movq 0x20(%rcx), %rbx leaq 0x18(%rbp), %r12 leaq 0x28(%rsp), %r13 leaq 0x78(%rsp), %rbp cmpq %rbx, %r14 je 0x6cd0c movq 0x20(%r14), %rsi movq %r13, %rdi movq %r15, %rdx callq 0x62ea2 movq %rbp, %rdi movq %r14, %rsi movq %r13, %rdx callq 0x6dc40 movq %r12, %rdi movq %rbp, %rsi callq 0x6de04 movq %rbp, %rdi callq 0x6dc66 movq %r13, %rdi callq 0x63132 addq $0x30, %r14 jmp 0x6ccc9 movq 0x8(%rsp), %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r15 leaq 0x49758(%rip), %rsi # 0xb648d movq %rax, %rdi callq 0x24320 movq 0x932ac(%rip), %rsi # 0xffff0 movq 0x93205(%rip), %rdx # 0xfff50 movq %r15, %rdi callq 0x24ee0 jmp 0x6cd85 pushq $0x10 popq %rdi callq 0x24460 movq %rax, %r15 leaq 0x49752(%rip), %rsi # 0xb64b9 movq %rax, %rdi callq 0x24320 movq 0x9327a(%rip), %rsi # 0xffff0 movq 0x931d3(%rip), %rdx # 0xfff50 movq %r15, %rdi callq 0x24ee0 jmp 0x6cd89 jmp 0x6cd8e movq %rax, %r14 jmp 0x6cdb1 movq %rax, %r14 movq %r15, %rdi callq 0x24670 jmp 0x6cdb1 jmp 0x6cd9f jmp 0x6cdbd movq 0x8(%rsp), %rbp movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x47f7a leaq 0x78(%rsp), %rdi callq 0x63132 jmp 0x6cdc0 movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x4fae0 jmp 0x6ce06 movq %rax, %r14 leaq 0x78(%rsp), %rdi callq 0x63132 jmp 0x6ce06 movq %rax, %r14 jmp 0x6ce06 movq %rax, %r14 jmp 0x6ce01 movq %rax, %r14 jmp 0x6cdf7 movq %rax, %r14 leaq 0x78(%rsp), %rdi callq 0x6dc66 leaq 0x28(%rsp), %rdi callq 0x63132 movq 0x8(%rsp), %rbp movq %rbp, %rdi callq 0x6d9a8 movq %r14, %rdi callq 0x24f60
_ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r15, rdx mov rbp, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov r13, [rsi] mov [rsp+118h+var_F8], rsi mov r14, [rsi+8] lea r12, [rsp+118h+var_A0] lea rbx, [rsp+118h+var_F0] mov [rsp+118h+var_110], rdi loc_6CB88: cmp r13, r14 jz loc_6CCAE lea rdi, [rsp+118h+var_108] mov rsi, r13 call _ZSt20dynamic_pointer_castIN5minja11UnaryOpExprENS0_10ExpressionEESt10shared_ptrIT_ERKS3_IT0_E; std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>(std::shared_ptr const&<minja::Expression>) mov rax, [rsp+118h+var_108] test rax, rax jz short loc_6CC0A mov ecx, [rax+30h] cmp ecx, 4 jz loc_6CC38 cmp ecx, 3 jnz short loc_6CC0A mov rsi, [rax+20h] mov rdi, r12 mov rdx, r15 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp [rsp+118h+var_90], 0 jz loc_6CD23 and [rsp+118h+var_E8], 0 mov [rsp+118h+var_F0], rbp lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &) mov [rsp+118h+var_D8], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E10_M_managerERSt9_Any_dataRKSC_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+118h+var_E0], rax mov rdi, r12 mov rbp, rbx mov rsi, rbx call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&) jmp short loc_6CC86 loc_6CC0A: lea rdi, [rsp+118h+var_100] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rsi, [r13+0] mov rdi, r12 mov rdx, r15 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbp mov rsi, r12 call _ZNSt6vectorIN5minja5ValueESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<minja::Value>::emplace_back<minja::Value>(minja::Value &&) mov rdi, r12; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_6CCA5 loc_6CC38: mov rsi, [rax+20h] mov rdi, r12 mov rdx, r15 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp [rsp+118h+var_80], 0 jz loc_6CD55 mov [rsp+118h+var_F0], rbp mov [rsp+118h+var_E8], r12 lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlRKS1_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_invoke(std::_Any_data const&,minja::Value &) mov [rsp+118h+var_D8], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_19ArgumentsExpression8evaluateERKSt10shared_ptrINS0_7ContextEEEUlRKS1_E_E10_M_managerERSt9_Any_dataRKSE_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsp+118h+var_E0], rax mov rdi, r12 mov rbp, rbx mov rsi, rbx call _ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE; minja::Value::for_each(std::function<void ()(minja::Value&)> const&) loc_6CC86: mov rdi, rbp; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, r12; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+118h+var_100] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rbp, [rsp+118h+var_110] loc_6CCA5: add r13, 10h jmp loc_6CB88 loc_6CCAE: mov rcx, [rsp+118h+var_F8] mov r14, [rcx+18h] mov rbx, [rcx+20h] lea r12, [rbp+18h] lea r13, [rsp+118h+var_F0] lea rbp, [rsp+118h+var_A0] loc_6CCC9: cmp r14, rbx jz short loc_6CD0C mov rsi, [r14+20h] mov rdi, r13 mov rdx, r15 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbp mov rsi, r14 mov rdx, r13 call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_ mov rdi, r12 mov rsi, rbp call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EE12emplace_backIJS9_EEERS9_DpOT_; std::vector<std::pair<std::string,minja::Value>>::emplace_back<std::pair<std::string,minja::Value>>(std::pair<std::string,minja::Value> &&) mov rdi, rbp; void * call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair() mov rdi, r13; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add r14, 30h ; '0' jmp short loc_6CCC9 loc_6CD0C: mov rax, [rsp+118h+var_110] add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6CD23: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpansionOpera_0; "Expansion operator only supported on ar"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw jmp short loc_6CD85 loc_6CD55: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aExpansiondictO; "ExpansionDict operator only supported o"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r15; void * call ___cxa_throw loc_6CD85: jmp short loc_6CD89 jmp short loc_6CD8E loc_6CD89: mov r14, rax jmp short loc_6CDB1 loc_6CD8E: mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_6CDB1 jmp short loc_6CD9F jmp short loc_6CDBD loc_6CD9F: mov rbp, [rsp+118h+var_110] mov r14, rax lea rdi, [rsp+118h+var_F0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() loc_6CDB1: lea rdi, [rsp+118h+var_A0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_6CDC0 loc_6CDBD: mov r14, rax loc_6CDC0: lea rdi, [rsp+118h+var_100] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_6CE06 mov r14, rax lea rdi, [rsp+118h+var_A0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_6CE06 mov r14, rax jmp short loc_6CE06 mov r14, rax jmp short loc_6CE01 mov r14, rax jmp short loc_6CDF7 mov r14, rax lea rdi, [rsp+118h+var_A0]; void * call _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEED2Ev; std::pair<std::string,minja::Value>::~pair() loc_6CDF7: lea rdi, [rsp+118h+var_F0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6CE01: mov rbp, [rsp+118h+var_110] loc_6CE06: mov rdi, rbp; this call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue() mov rdi, r14 call __Unwind_Resume
_OWORD * minja::ArgumentsExpression::evaluate(_OWORD *a1, void (*****a2)(void)) { long long v2; // rbp void (****v3)(void); // r13 void (****v4)(void); // r14 int v5; // ecx void (****v6)(void); // r14 void (****v7)(void); // rbx std::runtime_error *v9; // r15 std::runtime_error *exception; // r15 long long v11; // [rsp+10h] [rbp-108h] BYREF long long v12; // [rsp+18h] [rbp-100h] BYREF void (*****v13)(void); // [rsp+20h] [rbp-F8h] long long v14; // [rsp+28h] [rbp-F0h] BYREF _BYTE *v15; // [rsp+30h] [rbp-E8h] long long ( *v16)(); // [rsp+38h] [rbp-E0h] long long ( *v17)(); // [rsp+40h] [rbp-D8h] _BYTE v18[16]; // [rsp+78h] [rbp-A0h] BYREF long long v19; // [rsp+88h] [rbp-90h] long long v20; // [rsp+98h] [rbp-80h] v2 = (long long)a1; a1[2] = 0LL; a1[1] = 0LL; *a1 = 0LL; v3 = *a2; v13 = a2; v4 = a2[1]; while ( v3 != v4 ) { std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>(&v11, v3); if ( !v11 ) goto LABEL_8; v5 = *(_DWORD *)(v11 + 48); if ( v5 == 4 ) { minja::Expression::evaluate((long long)v18, *(void (****)(void))(v11 + 32)); if ( !v20 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ExpansionDict operator only supported on objects"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v14 = v2; v15 = v18; v17 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_invoke; v16 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}>::_M_manager; minja::Value::for_each(v18, &v14); } else { if ( v5 != 3 ) { LABEL_8: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12); minja::Expression::evaluate((long long)v18, *v3); std::vector<minja::Value>::emplace_back<minja::Value>(v2, (long long)v18); minja::Value::~Value((minja::Value *)v18); goto LABEL_12; } minja::Expression::evaluate((long long)v18, *(void (****)(void))(v11 + 32)); if ( !v19 ) { v9 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v9, "Expansion operator only supported on arrays"); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v15 = 0LL; v14 = v2; v17 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke; v16 = std::_Function_handler<void ()(minja::Value &),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager; minja::Value::for_each(v18, &v14); } std::_Function_base::~_Function_base((std::_Function_base *)&v14); minja::Value::~Value((minja::Value *)v18); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v12); v2 = (long long)a1; LABEL_12: v3 += 2; } v6 = v13[3]; v7 = v13[4]; while ( v6 != v7 ) { minja::Expression::evaluate((long long)&v14, v6[4]); ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_( v18, v6, &v14); std::vector<std::pair<std::string,minja::Value>>::emplace_back<std::pair<std::string,minja::Value>>(v2 + 24, v18); std::pair<std::string,minja::Value>::~pair(v18); minja::Value::~Value((minja::Value *)&v14); v6 += 6; } return a1; }
evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R15,RDX MOV RBP,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV R13,qword ptr [RSI] MOV qword ptr [RSP + 0x20],RSI MOV R14,qword ptr [RSI + 0x8] LEA R12,[RSP + 0x78] LEA RBX,[RSP + 0x28] MOV qword ptr [RSP + 0x8],RDI LAB_0016cb88: CMP R13,R14 JZ 0x0016ccae LEA RDI,[RSP + 0x10] MOV RSI,R13 CALL 0x0016d9be MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0016cc0a MOV ECX,dword ptr [RAX + 0x30] CMP ECX,0x4 JZ 0x0016cc38 CMP ECX,0x3 JNZ 0x0016cc0a MOV RSI,qword ptr [RAX + 0x20] LAB_0016cbbd: MOV RDI,R12 MOV RDX,R15 CALL 0x00162ea2 CMP qword ptr [RSP + 0x88],0x0 JZ 0x0016cd23 AND qword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x28],RBP LEA RAX,[0x16dc90] MOV qword ptr [RSP + 0x40],RAX LEA RAX,[0x16dc96] MOV qword ptr [RSP + 0x38],RAX LAB_0016cbfa: MOV RDI,R12 MOV RBP,RBX MOV RSI,RBX CALL 0x0016da14 JMP 0x0016cc86 LAB_0016cc0a: LEA RDI,[RSP + 0x18] CALL 0x0014fae0 MOV RSI,qword ptr [R13] LAB_0016cc18: MOV RDI,R12 MOV RDX,R15 CALL 0x00162ea2 LAB_0016cc23: MOV RDI,RBP MOV RSI,R12 CALL 0x00168e0a MOV RDI,R12 CALL 0x00163132 JMP 0x0016cca5 LAB_0016cc38: MOV RSI,qword ptr [RAX + 0x20] LAB_0016cc3c: MOV RDI,R12 MOV RDX,R15 CALL 0x00162ea2 CMP qword ptr [RSP + 0x98],0x0 JZ 0x0016cd55 MOV qword ptr [RSP + 0x28],RBP MOV qword ptr [RSP + 0x30],R12 LEA RAX,[0x16dcec] MOV qword ptr [RSP + 0x40],RAX LEA RAX,[0x16dcf2] MOV qword ptr [RSP + 0x38],RAX LAB_0016cc78: MOV RDI,R12 MOV RBP,RBX MOV RSI,RBX CALL 0x0016da14 LAB_0016cc86: MOV RDI,RBP CALL 0x00147f7a MOV RDI,R12 CALL 0x00163132 LEA RDI,[RSP + 0x18] CALL 0x0014fae0 MOV RBP,qword ptr [RSP + 0x8] LAB_0016cca5: ADD R13,0x10 JMP 0x0016cb88 LAB_0016ccae: MOV RCX,qword ptr [RSP + 0x20] MOV R14,qword ptr [RCX + 0x18] MOV RBX,qword ptr [RCX + 0x20] LEA R12,[RBP + 0x18] LEA R13,[RSP + 0x28] LEA RBP,[RSP + 0x78] LAB_0016ccc9: CMP R14,RBX JZ 0x0016cd0c MOV RSI,qword ptr [R14 + 0x20] LAB_0016ccd2: MOV RDI,R13 MOV RDX,R15 CALL 0x00162ea2 LAB_0016ccdd: MOV RDI,RBP MOV RSI,R14 MOV RDX,R13 CALL 0x0016dc40 LAB_0016cceb: MOV RDI,R12 MOV RSI,RBP CALL 0x0016de04 LAB_0016ccf6: MOV RDI,RBP CALL 0x0016dc66 MOV RDI,R13 CALL 0x00163132 ADD R14,0x30 JMP 0x0016ccc9 LAB_0016cd0c: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016cd23: PUSH 0x10 POP RDI CALL 0x00124460 MOV R15,RAX LAB_0016cd2e: LEA RSI,[0x1b648d] MOV RDI,RAX CALL 0x00124320 LAB_0016cd3d: MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,R15 CALL 0x00124ee0 LAB_0016cd55: PUSH 0x10 POP RDI CALL 0x00124460 MOV R15,RAX LAB_0016cd60: LEA RSI,[0x1b64b9] MOV RDI,RAX CALL 0x00124320 LAB_0016cd6f: MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,R15 CALL 0x00124ee0
/* minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) const */ ArgumentsExpression * __thiscall minja::ArgumentsExpression::evaluate(ArgumentsExpression *this,shared_ptr *param_1) { int8 *puVar1; long lVar2; runtime_error *prVar3; int8 *puVar4; long lVar5; long local_108; __shared_count<(__gnu_cxx::_Lock_policy)2> local_100 [8]; shared_ptr *local_f8; ArgumentsExpression *local_f0; Expression *local_e8; code *local_e0; code *local_d8; Expression local_a0 [16]; long local_90; long local_80; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; puVar4 = *(int8 **)param_1; puVar1 = *(int8 **)(param_1 + 8); local_f8 = param_1; do { if (puVar4 == puVar1) { lVar2 = *(long *)(local_f8 + 0x20); for (lVar5 = *(long *)(local_f8 + 0x18); lVar5 != lVar2; lVar5 = lVar5 + 0x30) { /* try { // try from 0016ccd2 to 0016ccdc has its CatchHandler @ 0016cde0 */ Expression::evaluate((Expression *)&local_f0,*(shared_ptr **)(lVar5 + 0x20)); /* try { // try from 0016ccdd to 0016ccea has its CatchHandler @ 0016cde5 */ _ZNSt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEEC2IS7_TnNSt9enable_ifIXclsr5_PCCPE13_CopyMovePairILb1ES5_T_EEEbE4typeELb1EEERKS5_OSB_ ((pair<std::__cxx11::string,minja::Value> *)local_a0,lVar5,(Expression *)&local_f0 ); /* try { // try from 0016cceb to 0016ccf5 has its CatchHandler @ 0016cdea */ std:: vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> ::emplace_back<std::pair<std::__cxx11::string,minja::Value>> ((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> *)(this + 0x18),(pair<std::__cxx11::string,minja::Value> *)local_a0); std::pair<std::__cxx11::string,minja::Value>::~pair ((pair<std::__cxx11::string,minja::Value> *)local_a0); Value::~Value((Value *)&local_f0); } return this; } std::dynamic_pointer_cast<minja::UnaryOpExpr,minja::Expression>((shared_ptr *)&local_108); if (local_108 == 0) { LAB_0016cc0a: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_100); /* try { // try from 0016cc18 to 0016cc22 has its CatchHandler @ 0016cddb */ Expression::evaluate(local_a0,(shared_ptr *)*puVar4); /* try { // try from 0016cc23 to 0016cc2d has its CatchHandler @ 0016cdcc */ std::vector<minja::Value,std::allocator<minja::Value>>::emplace_back<minja::Value> ((vector<minja::Value,std::allocator<minja::Value>> *)this,(Value *)local_a0); Value::~Value((Value *)local_a0); } else { if (*(int *)(local_108 + 0x30) == 4) { /* try { // try from 0016cc3c to 0016cc46 has its CatchHandler @ 0016cd9d */ Expression::evaluate(local_a0,*(shared_ptr **)(local_108 + 0x20)); if (local_80 == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016cd60 to 0016cd6e has its CatchHandler @ 0016cd87 */ std::runtime_error::runtime_error (prVar3,"ExpansionDict operator only supported on objects"); /* try { // try from 0016cd6f to 0016cd84 has its CatchHandler @ 0016cd85 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); } local_d8 = std:: _Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value_const&)#1}> ::_M_invoke; local_e0 = std:: _Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value_const&)#1}> ::_M_manager; local_f0 = this; local_e8 = local_a0; /* try { // try from 0016cc78 to 0016cc85 has its CatchHandler @ 0016cd9b */ Value::for_each((Value *)local_a0,(_Function_base *)&local_f0); } else { if (*(int *)(local_108 + 0x30) != 3) goto LAB_0016cc0a; /* try { // try from 0016cbbd to 0016cbc7 has its CatchHandler @ 0016cdbd */ Expression::evaluate(local_a0,*(shared_ptr **)(local_108 + 0x20)); if (local_90 == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016cd2e to 0016cd3c has its CatchHandler @ 0016cd8e */ std::runtime_error::runtime_error(prVar3,"Expansion operator only supported on arrays"); /* try { // try from 0016cd3d to 0016cd52 has its CatchHandler @ 0016cd89 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); } local_e8 = (Expression *)0x0; local_d8 = std:: _Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_invoke; local_e0 = std:: _Function_handler<void(minja::Value&),minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_manager; local_f0 = this; /* try { // try from 0016cbfa to 0016cc07 has its CatchHandler @ 0016cd9f */ Value::for_each((Value *)local_a0,(_Function_base *)&local_f0); } std::_Function_base::~_Function_base((_Function_base *)&local_f0); Value::~Value((Value *)local_a0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_100); } puVar4 = puVar4 + 2; } while( true ); }
30,994
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const
monkey531[P]llama/common/minja.hpp
Value call(const std::shared_ptr<Context> & context, ArgumentsValue & args) const { if (!callable_) throw std::runtime_error("Value is not callable: " + dump()); return (*callable_)(context, args); }
O2
cpp
minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq 0x30(%rsi), %rsi testq %rsi, %rsi je 0x6d8ec movq %rdi, %rbx callq 0x6e84e movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x10 popq %rdi callq 0x24460 movq %rax, %rbx movq %rsp, %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x63320 leaq 0x48cd4(%rip), %rsi # 0xb65e2 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x58a46 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x24e10 xorl %ebp, %ebp movq 0x926bc(%rip), %rsi # 0xffff0 movq 0x92615(%rip), %rdx # 0xfff50 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x251b8 jmp 0x6d958 movq %rax, %r14 movb $0x1, %bpl movq %rsp, %rdi callq 0x251b8 testb %bpl, %bpl jne 0x6d96a jmp 0x6d972 movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60
_ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE: push rbp push r14 push rbx sub rsp, 40h mov r14, rsi mov rsi, [rsi+30h] test rsi, rsi jz short loc_6D8EC mov rbx, rdi call _ZNKSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEclES6_S8_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov rax, rbx add rsp, 40h pop rbx pop r14 pop rbp retn loc_6D8EC: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotCall; "Value is not callable: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+58h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D958 mov r14, rax mov bpl, 1 loc_6D958: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6D96A jmp short loc_6D972 mov r14, rax loc_6D96A: mov rdi, rbx; void * call ___cxa_free_exception loc_6D972: mov rdi, r14 call __Unwind_Resume
long long minja::Value::call(long long a1, long long a2) { void *exception; // rbx _BYTE v4[32]; // [rsp+0h] [rbp-58h] BYREF _BYTE v5[56]; // [rsp+20h] [rbp-38h] BYREF if ( !*(_QWORD *)(a2 + 48) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v4, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v5, (long long)"Value is not callable: ", (long long)v4); std::runtime_error::runtime_error(exception, v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator()(); return a1; }
call: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RSI,qword ptr [RSI + 0x30] TEST RSI,RSI JZ 0x0016d8ec MOV RBX,RDI CALL 0x0016e84e MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_0016d8ec: PUSH 0x10 POP RDI CALL 0x00124460 MOV RBX,RAX LAB_0016d8f7: MOV RDI,RSP PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00163320 LAB_0016d907: LEA RSI,[0x1b65e2] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x00158a46 MOV BPL,0x1 LAB_0016d91e: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00124e10 XOR EBP,EBP MOV RSI,qword ptr [0x001ffff0] MOV RDX,qword ptr [0x001fff50] MOV RDI,RBX CALL 0x00124ee0
/* minja::Value::call(std::shared_ptr<minja::Context> const&, minja::ArgumentsValue&) const */ shared_ptr * minja::Value::call(shared_ptr *param_1,ArgumentsValue *param_2) { runtime_error *this; int1 auStack_58 [32]; string local_38 [32]; if (*(ArgumentsValue **)(param_2 + 0x30) != (ArgumentsValue *)0x0) { std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: operator()(param_1,*(ArgumentsValue **)(param_2 + 0x30)); return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d8f7 to 0016d906 has its CatchHandler @ 0016d967 */ dump_abi_cxx11_((int)auStack_58,SUB81(param_2,0)); /* try { // try from 0016d907 to 0016d91a has its CatchHandler @ 0016d952 */ std::operator+((char *)local_38,(string *)"Value is not callable: "); /* try { // try from 0016d91e to 0016d942 has its CatchHandler @ 0016d943 */ std::runtime_error::runtime_error(this,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001ffff0,PTR__runtime_error_001fff50); }
30,995
common_embd_similarity_cos(float const*, float const*, int)
monkey531[P]llama/common/common.cpp
float common_embd_similarity_cos(const float * embd1, const float * embd2, int n){ double sum = 0.0; double sum1 = 0.0; double sum2 = 0.0; for (int i = 0; i < n; i++) { sum += embd1[i] * embd2[i]; sum1 += embd1[i] * embd1[i]; sum2 += embd2[i] * embd2[i]; } // Handle the case where one or both vectors are zero vectors if (sum1 == 0.0 || sum2 == 0.0) { if (sum1 == 0.0 && sum2 == 0.0) { return 1.0f; // two zero vectors are similar } return 0.0f; } return sum / (sqrt(sum1) * sqrt(sum2)); }
O0
cpp
common_embd_similarity_cos(float const*, float const*, int): subq $0x58, %rsp movq %rdi, 0x48(%rsp) movq %rsi, 0x40(%rsp) movl %edx, 0x3c(%rsp) xorps %xmm0, %xmm0 movsd %xmm0, 0x30(%rsp) xorps %xmm0, %xmm0 movsd %xmm0, 0x28(%rsp) xorps %xmm0, %xmm0 movsd %xmm0, 0x20(%rsp) movl $0x0, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x3c(%rsp), %eax jge 0xf785d movq 0x48(%rsp), %rax movslq 0x1c(%rsp), %rcx movss (%rax,%rcx,4), %xmm0 movq 0x40(%rsp), %rax movslq 0x1c(%rsp), %rcx mulss (%rax,%rcx,4), %xmm0 cvtss2sd %xmm0, %xmm0 addsd 0x30(%rsp), %xmm0 movsd %xmm0, 0x30(%rsp) movq 0x48(%rsp), %rax movslq 0x1c(%rsp), %rcx movss (%rax,%rcx,4), %xmm0 movq 0x48(%rsp), %rax movslq 0x1c(%rsp), %rcx mulss (%rax,%rcx,4), %xmm0 cvtss2sd %xmm0, %xmm0 addsd 0x28(%rsp), %xmm0 movsd %xmm0, 0x28(%rsp) movq 0x40(%rsp), %rax movslq 0x1c(%rsp), %rcx movss (%rax,%rcx,4), %xmm0 movq 0x40(%rsp), %rax movslq 0x1c(%rsp), %rcx mulss (%rax,%rcx,4), %xmm0 cvtss2sd %xmm0, %xmm0 addsd 0x20(%rsp), %xmm0 movsd %xmm0, 0x20(%rsp) movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0xf77b5 movsd 0x28(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0xf7870 jp 0xf7870 jmp 0xf7881 movsd 0x20(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0xf78be jp 0xf78be movsd 0x28(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0xf78b3 jp 0xf78b3 movsd 0x20(%rsp), %xmm0 xorps %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jne 0xf78b3 jp 0xf78b3 movss 0x11275d(%rip), %xmm0 # 0x20a008 movss %xmm0, 0x54(%rsp) jmp 0xf7907 xorps %xmm0, %xmm0 movss %xmm0, 0x54(%rsp) jmp 0xf7907 movsd 0x30(%rsp), %xmm0 movsd %xmm0, 0x10(%rsp) movsd 0x28(%rsp), %xmm0 callq 0x5a8c0 movsd %xmm0, 0x8(%rsp) movsd 0x20(%rsp), %xmm0 callq 0x5a8c0 movsd 0x8(%rsp), %xmm1 movaps %xmm0, %xmm2 movsd 0x10(%rsp), %xmm0 mulsd %xmm2, %xmm1 divsd %xmm1, %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, 0x54(%rsp) movss 0x54(%rsp), %xmm0 addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_Z26common_embd_similarity_cosPKfS0_i: sub rsp, 58h mov [rsp+58h+var_10], rdi mov [rsp+58h+var_18], rsi mov [rsp+58h+var_1C], edx xorps xmm0, xmm0 movsd [rsp+58h+var_28], xmm0 xorps xmm0, xmm0 movsd [rsp+58h+var_30], xmm0 xorps xmm0, xmm0 movsd [rsp+58h+var_38], xmm0 mov [rsp+58h+var_3C], 0 loc_F77B5: mov eax, [rsp+58h+var_3C] cmp eax, [rsp+58h+var_1C] jge loc_F785D mov rax, [rsp+58h+var_10] movsxd rcx, [rsp+58h+var_3C] movss xmm0, dword ptr [rax+rcx*4] mov rax, [rsp+58h+var_18] movsxd rcx, [rsp+58h+var_3C] mulss xmm0, dword ptr [rax+rcx*4] cvtss2sd xmm0, xmm0 addsd xmm0, [rsp+58h+var_28] movsd [rsp+58h+var_28], xmm0 mov rax, [rsp+58h+var_10] movsxd rcx, [rsp+58h+var_3C] movss xmm0, dword ptr [rax+rcx*4] mov rax, [rsp+58h+var_10] movsxd rcx, [rsp+58h+var_3C] mulss xmm0, dword ptr [rax+rcx*4] cvtss2sd xmm0, xmm0 addsd xmm0, [rsp+58h+var_30] movsd [rsp+58h+var_30], xmm0 mov rax, [rsp+58h+var_18] movsxd rcx, [rsp+58h+var_3C] movss xmm0, dword ptr [rax+rcx*4] mov rax, [rsp+58h+var_18] movsxd rcx, [rsp+58h+var_3C] mulss xmm0, dword ptr [rax+rcx*4] cvtss2sd xmm0, xmm0 addsd xmm0, [rsp+58h+var_38] movsd [rsp+58h+var_38], xmm0 mov eax, [rsp+58h+var_3C] add eax, 1 mov [rsp+58h+var_3C], eax jmp loc_F77B5 loc_F785D: movsd xmm0, [rsp+58h+var_30] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_F7870 jp short loc_F7870 jmp short loc_F7881 loc_F7870: movsd xmm0, [rsp+58h+var_38] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_F78BE jp short loc_F78BE loc_F7881: movsd xmm0, [rsp+58h+var_30] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_F78B3 jp short loc_F78B3 movsd xmm0, [rsp+58h+var_38] xorps xmm1, xmm1 ucomisd xmm0, xmm1 jnz short loc_F78B3 jp short loc_F78B3 movss xmm0, cs:flt_20A008 movss [rsp+58h+var_4], xmm0 jmp short loc_F7907 loc_F78B3: xorps xmm0, xmm0 movss [rsp+58h+var_4], xmm0 jmp short loc_F7907 loc_F78BE: movsd xmm0, [rsp+58h+var_28] movsd [rsp+58h+var_48], xmm0 movsd xmm0, [rsp+58h+var_30] call _sqrt movsd [rsp+58h+var_50], xmm0 movsd xmm0, [rsp+58h+var_38] call _sqrt movsd xmm1, [rsp+58h+var_50] movaps xmm2, xmm0 movsd xmm0, [rsp+58h+var_48] mulsd xmm1, xmm2 divsd xmm0, xmm1 cvtsd2ss xmm0, xmm0 movss [rsp+58h+var_4], xmm0 loc_F7907: movss xmm0, [rsp+58h+var_4] add rsp, 58h retn
float common_embd_similarity_cos(const float *a1, const float *a2, int a3) { double v5; // [rsp+8h] [rbp-50h] int i; // [rsp+1Ch] [rbp-3Ch] double v7; // [rsp+20h] [rbp-38h] double v8; // [rsp+28h] [rbp-30h] double v9; // [rsp+30h] [rbp-28h] v9 = 0.0; v8 = 0.0; v7 = 0.0; for ( i = 0; i < a3; ++i ) { v9 = (float)(a1[i] * a2[i]) + v9; v8 = (float)(a1[i] * a1[i]) + v8; v7 = (float)(a2[i] * a2[i]) + v7; } if ( v8 == 0.0 || v7 == 0.0 ) { if ( v8 == 0.0 && v7 == 0.0 ) return 1.0; else return 0.0; } else { v5 = sqrt(v8); return v9 / (v5 * sqrt(v7)); } }
common_embd_similarity_cos: SUB RSP,0x58 MOV qword ptr [RSP + 0x48],RDI MOV qword ptr [RSP + 0x40],RSI MOV dword ptr [RSP + 0x3c],EDX XORPS XMM0,XMM0 MOVSD qword ptr [RSP + 0x30],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RSP + 0x28],XMM0 XORPS XMM0,XMM0 MOVSD qword ptr [RSP + 0x20],XMM0 MOV dword ptr [RSP + 0x1c],0x0 LAB_001f77b5: MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,dword ptr [RSP + 0x3c] JGE 0x001f785d MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x1c] MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x40] MOVSXD RCX,dword ptr [RSP + 0x1c] MULSS XMM0,dword ptr [RAX + RCX*0x4] CVTSS2SD XMM0,XMM0 ADDSD XMM0,qword ptr [RSP + 0x30] MOVSD qword ptr [RSP + 0x30],XMM0 MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x1c] MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x1c] MULSS XMM0,dword ptr [RAX + RCX*0x4] CVTSS2SD XMM0,XMM0 ADDSD XMM0,qword ptr [RSP + 0x28] MOVSD qword ptr [RSP + 0x28],XMM0 MOV RAX,qword ptr [RSP + 0x40] MOVSXD RCX,dword ptr [RSP + 0x1c] MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x40] MOVSXD RCX,dword ptr [RSP + 0x1c] MULSS XMM0,dword ptr [RAX + RCX*0x4] CVTSS2SD XMM0,XMM0 ADDSD XMM0,qword ptr [RSP + 0x20] MOVSD qword ptr [RSP + 0x20],XMM0 MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x001f77b5 LAB_001f785d: MOVSD XMM0,qword ptr [RSP + 0x28] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x001f7870 JP 0x001f7870 JMP 0x001f7881 LAB_001f7870: MOVSD XMM0,qword ptr [RSP + 0x20] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x001f78be JP 0x001f78be LAB_001f7881: MOVSD XMM0,qword ptr [RSP + 0x28] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x001f78b3 JP 0x001f78b3 MOVSD XMM0,qword ptr [RSP + 0x20] XORPS XMM1,XMM1 UCOMISD XMM0,XMM1 JNZ 0x001f78b3 JP 0x001f78b3 MOVSS XMM0,dword ptr [0x0030a008] MOVSS dword ptr [RSP + 0x54],XMM0 JMP 0x001f7907 LAB_001f78b3: XORPS XMM0,XMM0 MOVSS dword ptr [RSP + 0x54],XMM0 JMP 0x001f7907 LAB_001f78be: MOVSD XMM0,qword ptr [RSP + 0x30] MOVSD qword ptr [RSP + 0x10],XMM0 MOVSD XMM0,qword ptr [RSP + 0x28] CALL 0x0015a8c0 MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD XMM0,qword ptr [RSP + 0x20] CALL 0x0015a8c0 MOVSD XMM1,qword ptr [RSP + 0x8] MOVAPS XMM2,XMM0 MOVSD XMM0,qword ptr [RSP + 0x10] MULSD XMM1,XMM2 DIVSD XMM0,XMM1 CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RSP + 0x54],XMM0 LAB_001f7907: MOVSS XMM0,dword ptr [RSP + 0x54] ADD RSP,0x58 RET
/* common_embd_similarity_cos(float const*, float const*, int) */ float common_embd_similarity_cos(float *param_1,float *param_2,int param_3) { double dVar1; double dVar2; int local_3c; double local_38; double local_30; double local_28; float local_4; local_28 = 0.0; local_30 = 0.0; local_38 = 0.0; for (local_3c = 0; local_3c < param_3; local_3c = local_3c + 1) { local_28 = (double)(param_1[local_3c] * param_2[local_3c]) + local_28; local_30 = (double)(param_1[local_3c] * param_1[local_3c]) + local_30; local_38 = (double)(param_2[local_3c] * param_2[local_3c]) + local_38; } if (((local_30 == 0.0) && (!NAN(local_30))) || ((local_38 == 0.0 && (!NAN(local_38))))) { if ((((local_30 != 0.0) || (NAN(local_30))) || (local_38 != 0.0)) || (NAN(local_38))) { local_4 = 0.0; } else { local_4 = DAT_0030a008; } } else { dVar1 = sqrt(local_30); dVar2 = sqrt(local_38); local_4 = (float)(local_28 / (dVar1 * dVar2)); } return local_4; }
30,996
sp_get_linestring_mbr
eloqsql/storage/myisam/sp_key.c
static int sp_get_linestring_mbr(uchar *(*wkb), uchar *end, uint n_dims, uchar byte_order, double *mbr) { uint n_points; n_points = uint4korr(*wkb); (*wkb) += 4; for (; n_points > 0; --n_points) { /* Add next point to mbr */ if (sp_add_point_to_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } return 0; }
O3
c
sp_get_linestring_mbr: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movl (%rax), %ecx addq $0x4, %rax movq %rax, (%rdi) testl %ecx, %ecx je 0x499f6 addq $-0x8, %rsi movb $0x1, %r8b xorl %r9d, %r9d movq (%rdi), %rax cmpq %rsi, %rax ja 0x499ef movsd (%rax), %xmm0 addq $0x8, %rax movq %rax, (%rdi) movsd (%rdx,%r9), %xmm1 ucomisd %xmm0, %xmm1 jbe 0x499c2 movsd %xmm0, (%rdx,%r9) ucomisd 0x8(%rdx,%r9), %xmm0 jbe 0x499d5 orq $0x8, %r9 movsd %xmm0, (%rdx,%r9) movl $0x10, %r9d xorl %eax, %eax testb $0x1, %r8b movl $0x0, %r8d jne 0x4999d decl %ecx jne 0x49997 jmp 0x499f8 movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x499f8 xorl %eax, %eax popq %rbp retq
sp_get_linestring_mbr: push rbp mov rbp, rsp mov rax, [rdi] mov ecx, [rax] add rax, 4 mov [rdi], rax test ecx, ecx jz short loc_499F6 add rsi, 0FFFFFFFFFFFFFFF8h loc_49997: mov r8b, 1 xor r9d, r9d loc_4999D: mov rax, [rdi] cmp rax, rsi ja short loc_499EF movsd xmm0, qword ptr [rax] add rax, 8 mov [rdi], rax movsd xmm1, qword ptr [rdx+r9] ucomisd xmm1, xmm0 jbe short loc_499C2 movsd qword ptr [rdx+r9], xmm0 loc_499C2: ucomisd xmm0, qword ptr [rdx+r9+8] jbe short loc_499D5 or r9, 8 movsd qword ptr [rdx+r9], xmm0 loc_499D5: mov r9d, 10h xor eax, eax test r8b, 1 mov r8d, 0 jnz short loc_4999D dec ecx jnz short loc_49997 jmp short loc_499F8 loc_499EF: mov eax, 0FFFFFFFFh jmp short loc_499F8 loc_499F6: xor eax, eax loc_499F8: pop rbp retn
long long sp_get_linestring_mbr(double **a1, long long a2, long long a3) { int v3; // ecx unsigned long long v4; // rsi char v5; // r8 long long v6; // r9 double *v7; // rax double v8; // xmm0_8 long long result; // rax bool v10; // zf v3 = *(_DWORD *)*a1; *a1 = (double *)((char *)*a1 + 4); if ( !v3 ) return 0LL; v4 = a2 - 8; while ( 2 ) { v5 = 1; v6 = 0LL; do { v7 = *a1; if ( (unsigned long long)*a1 > v4 ) return 0xFFFFFFFFLL; v8 = *v7; *a1 = v7 + 1; if ( *(double *)(a3 + v6) > v8 ) *(double *)(a3 + v6) = v8; if ( v8 > *(double *)(a3 + v6 + 8) ) *(double *)(a3 + (v6 | 8)) = v8; v6 = 16LL; result = 0LL; v10 = (v5 & 1) == 0; v5 = 0; } while ( !v10 ); if ( --v3 ) continue; break; } return result; }
sp_get_linestring_mbr: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV ECX,dword ptr [RAX] ADD RAX,0x4 MOV qword ptr [RDI],RAX TEST ECX,ECX JZ 0x001499f6 ADD RSI,-0x8 LAB_00149997: MOV R8B,0x1 XOR R9D,R9D LAB_0014999d: MOV RAX,qword ptr [RDI] CMP RAX,RSI JA 0x001499ef MOVSD XMM0,qword ptr [RAX] ADD RAX,0x8 MOV qword ptr [RDI],RAX MOVSD XMM1,qword ptr [RDX + R9*0x1] UCOMISD XMM1,XMM0 JBE 0x001499c2 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_001499c2: UCOMISD XMM0,qword ptr [RDX + R9*0x1 + 0x8] JBE 0x001499d5 OR R9,0x8 MOVSD qword ptr [RDX + R9*0x1],XMM0 LAB_001499d5: MOV R9D,0x10 XOR EAX,EAX TEST R8B,0x1 MOV R8D,0x0 JNZ 0x0014999d DEC ECX JNZ 0x00149997 JMP 0x001499f8 LAB_001499ef: MOV EAX,0xffffffff JMP 0x001499f8 LAB_001499f6: XOR EAX,EAX LAB_001499f8: POP RBP RET
int8 sp_get_linestring_mbr(int8 *param_1,long param_2,long param_3) { double dVar1; double *pdVar2; bool bVar3; int iVar4; bool bVar5; ulong uVar6; iVar4 = *(int *)*param_1; *param_1 = (int *)*param_1 + 1; if (iVar4 != 0) { do { uVar6 = 0; bVar3 = true; do { bVar5 = bVar3; pdVar2 = (double *)*param_1; if ((double *)(param_2 + -8) < pdVar2) { return 0xffffffff; } dVar1 = *pdVar2; *param_1 = pdVar2 + 1; if (dVar1 < *(double *)(param_3 + uVar6)) { *(double *)(param_3 + uVar6) = dVar1; } pdVar2 = (double *)(param_3 + 8 + uVar6); if (*pdVar2 <= dVar1 && dVar1 != *pdVar2) { *(double *)(param_3 + (uVar6 | 8)) = dVar1; } uVar6 = 0x10; bVar3 = false; } while (bVar5); iVar4 = iVar4 + -1; } while (iVar4 != 0); } return 0; }
30,997
inline_mysql_file_tell
eloqsql/include/mysql/psi/mysql_file.h
static inline my_off_t inline_mysql_file_tell( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, myf flags) { my_off_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_TELL); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) 0, src_file, src_line); result= my_tell(file, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) 0); return result; } #endif result= my_tell(file, flags); return result; }
O0
c
inline_mysql_file_tell: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq 0x1e7020(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x78(%rbp), %rdi movl $0x9, %edx callq *%rax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%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 0xe4551 leaq 0x1e6fdd(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx xorl %esi, %esi callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xfd520 movq %rax, -0x28(%rbp) leaq 0x1e6fad(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x30(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xe4569 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi callq 0xfd520 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_tell_0: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_78] mov edx, 9 call rax mov [rbp+var_30], rax cmp [rbp+var_30], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_E4551 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] xor esi, esi call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_tell mov [rbp+var_28], rax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_30] xor ecx, ecx mov esi, ecx call rax mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_E4569 loc_E4551: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] call my_tell mov [rbp+var_28], rax mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_E4569: mov rax, [rbp+var_8] add rsp, 80h pop rbp retn
long long inline_mysql_file_tell_0(long long a1, unsigned int a2, unsigned int a3, long long a4) { _BYTE v5[72]; // [rsp+8h] [rbp-78h] BYREF long long v6; // [rsp+50h] [rbp-30h] long long v7; // [rsp+58h] [rbp-28h] long long v8; // [rsp+60h] [rbp-20h] unsigned int v9; // [rsp+68h] [rbp-18h] unsigned int v10; // [rsp+6Ch] [rbp-14h] long long v11; // [rsp+70h] [rbp-10h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; v6 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v5, a3, 9LL); if ( !v6 ) return my_tell(v9, v8); ((void ( *)(long long, _QWORD, long long, _QWORD))PSI_server[66])(v6, 0LL, v11, v10); v7 = my_tell(v9, v8); ((void ( *)(long long, _QWORD))PSI_server[67])(v6, 0LL); return v7; }
inline_mysql_file_tell: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x78] MOV EDX,0x9 CALL RAX MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001e4551 LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] XOR ESI,ESI CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001fd520 MOV qword ptr [RBP + -0x28],RAX LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x30] XOR ECX,ECX MOV ESI,ECX CALL RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x001e4569 LAB_001e4551: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x001fd520 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_001e4569: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x80 POP RBP RET
int8 inline_mysql_file_tell(int8 param_1,int4 param_2,int4 param_3,int8 param_4) { int1 local_80 [72]; long local_38; int8 local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int8 local_10; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_38 = (**(code **)(PSI_server + 0x158))(local_80,param_3,9); if (local_38 == 0) { local_10 = my_tell(local_20,local_28); } else { (**(code **)(PSI_server + 0x210))(local_38,0,local_18,local_1c); local_30 = my_tell(local_20,local_28); (**(code **)(PSI_server + 0x218))(local_38,0); local_10 = local_30; } return local_10; }
30,998
lf_hash_destroy
eloqsql/mysys/lf_hash.cc
void lf_hash_destroy(LF_HASH *hash) { LF_SLIST *el, **head= (LF_SLIST **)lf_dynarray_value(&hash->array, 0); if (head) { el= *head; while (el) { intptr next= el->link; if (el->hashnr & 1) lf_alloc_direct_free(&hash->alloc, el); /* normal node */ else my_free(el); /* dummy node */ el= (LF_SLIST *)next; } } lf_alloc_destroy(&hash->alloc); lf_dynarray_destroy(&hash->array); }
O3
cpp
lf_hash_destroy: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx xorl %esi, %esi callq 0xa5628 testq %rax, %rax je 0xa58c2 movq (%rax), %r14 testq %r14, %r14 je 0xa58c2 movq (%r14), %r15 testb $0x1, 0x18(%r14) je 0xa58b2 movq 0x88(%rbx), %rax testq %rax, %rax je 0xa58b2 movq %r14, %rdi callq *%rax movq %r14, %rdi callq 0x9fb2e movq %r15, %r14 testq %r15, %r15 jne 0xa5897 leaq 0x28(%rbx), %rdi callq 0xa53d9 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0xa55a7
lf_hash_destroy: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi xor esi, esi call lf_dynarray_value test rax, rax jz short loc_A58C2 mov r14, [rax] test r14, r14 jz short loc_A58C2 loc_A5897: mov r15, [r14] test byte ptr [r14+18h], 1 jz short loc_A58B2 mov rax, [rbx+88h] test rax, rax jz short loc_A58B2 mov rdi, r14 call rax loc_A58B2: mov rdi, r14 call my_free mov r14, r15 test r15, r15 jnz short loc_A5897 loc_A58C2: lea rdi, [rbx+28h] call lf_alloc_destroy mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp lf_dynarray_destroy
long long lf_hash_destroy(long long a1) { long long *v1; // rax long long v2; // r14 long long v3; // r15 void ( *v4)(long long); // rax v1 = (long long *)lf_dynarray_value(a1, 0); if ( v1 ) { v2 = *v1; if ( *v1 ) { do { v3 = *(_QWORD *)v2; if ( (*(_BYTE *)(v2 + 24) & 1) != 0 ) { v4 = *(void ( **)(long long))(a1 + 136); if ( v4 ) v4(v2); } my_free(v2); v2 = v3; } while ( v3 ); } } lf_alloc_destroy(a1 + 40); return lf_dynarray_destroy(a1); }
lf_hash_destroy: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI XOR ESI,ESI CALL 0x001a5628 TEST RAX,RAX JZ 0x001a58c2 MOV R14,qword ptr [RAX] TEST R14,R14 JZ 0x001a58c2 LAB_001a5897: MOV R15,qword ptr [R14] TEST byte ptr [R14 + 0x18],0x1 JZ 0x001a58b2 MOV RAX,qword ptr [RBX + 0x88] TEST RAX,RAX JZ 0x001a58b2 MOV RDI,R14 CALL RAX LAB_001a58b2: MOV RDI,R14 CALL 0x0019fb2e MOV R14,R15 TEST R15,R15 JNZ 0x001a5897 LAB_001a58c2: LEA RDI,[RBX + 0x28] CALL 0x001a53d9 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x001a55a7
void lf_hash_destroy(long param_1) { int8 *puVar1; int8 *puVar2; puVar2 = (int8 *)lf_dynarray_value(param_1,0); if (puVar2 != (int8 *)0x0) { puVar2 = (int8 *)*puVar2; while (puVar2 != (int8 *)0x0) { puVar1 = (int8 *)*puVar2; if (((*(byte *)(puVar2 + 3) & 1) != 0) && (*(code **)(param_1 + 0x88) != (code *)0x0)) { (**(code **)(param_1 + 0x88))(puVar2); } my_free(puVar2); puVar2 = puVar1; } } lf_alloc_destroy(param_1 + 0x28); lf_dynarray_destroy(param_1); return; }
30,999
ma_memmap_file
eloqsql/storage/maria/ma_packrec.c
my_bool _ma_memmap_file(MARIA_HA *info) { MARIA_SHARE *share= info->s; DBUG_ENTER("maria_memmap_file"); if (!info->s->file_map) { if (mysql_file_seek(info->dfile.file, 0L, MY_SEEK_END, MYF(0)) < share->state.state.data_file_length+MEMMAP_EXTRA_MARGIN) { DBUG_PRINT("warning",("File isn't extended for memmap")); DBUG_RETURN(0); } if (_ma_dynmap_file(info, share->state.state.data_file_length)) DBUG_RETURN(0); } info->opt_flag|= MEMMAP_USED; info->read_record= share->read_record= _ma_read_mempack_record; share->scan= _ma_read_rnd_mempack_record; DBUG_RETURN(1); }
O0
c
ma_memmap_file: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x5f0(%rax) jne 0x39d0d movq -0x10(%rbp), %rax movl 0x480(%rax), %edx leaq 0x118bd1(%rip), %rdi # 0x15288a movl $0x610, %esi # imm = 0x610 xorl %eax, %eax movl %eax, %r9d movl $0x2, %r8d movq %r9, %rcx callq 0x39ad0 movq -0x18(%rbp), %rcx movq 0x40(%rcx), %rcx addq $0x7, %rcx cmpq %rcx, %rax jae 0x39cee jmp 0x39ce4 jmp 0x39ce6 jmp 0x39ce8 movb $0x0, -0x1(%rbp) jmp 0x39d5a movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x40(%rax), %rsi callq 0x3c720 cmpb $0x0, %al je 0x39d0b jmp 0x39d05 movb $0x0, -0x1(%rbp) jmp 0x39d5a jmp 0x39d0d movq -0x10(%rbp), %rax movl 0x61c(%rax), %ecx orl $0x20, %ecx movl %ecx, 0x61c(%rax) movq -0x18(%rbp), %rax leaq 0x45(%rip), %rcx # 0x39d70 movq %rcx, 0x648(%rax) movq -0x10(%rbp), %rax leaq 0x33(%rip), %rcx # 0x39d70 movq %rcx, 0x3d8(%rax) movq -0x18(%rbp), %rax leaq 0x121(%rip), %rcx # 0x39e70 movq %rcx, 0x658(%rax) movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_memmap_file: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax] cmp qword ptr [rax+5F0h], 0 jnz short loc_39D0D mov rax, [rbp+var_10] mov edx, [rax+480h] lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 610h xor eax, eax mov r9d, eax mov r8d, 2 mov rcx, r9 call inline_mysql_file_seek mov rcx, [rbp+var_18] mov rcx, [rcx+40h] add rcx, 7 cmp rax, rcx jnb short loc_39CEE jmp short $+2 loc_39CE4: jmp short $+2 loc_39CE6: jmp short $+2 loc_39CE8: mov [rbp+var_1], 0 jmp short loc_39D5A loc_39CEE: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+40h] call _ma_dynmap_file cmp al, 0 jz short loc_39D0B jmp short $+2 loc_39D05: mov [rbp+var_1], 0 jmp short loc_39D5A loc_39D0B: jmp short $+2 loc_39D0D: mov rax, [rbp+var_10] mov ecx, [rax+61Ch] or ecx, 20h mov [rax+61Ch], ecx mov rax, [rbp+var_18] lea rcx, _ma_read_mempack_record mov [rax+648h], rcx mov rax, [rbp+var_10] lea rcx, _ma_read_mempack_record mov [rax+3D8h], rcx mov rax, [rbp+var_18] lea rcx, _ma_read_rnd_mempack_record mov [rax+658h], rcx mov [rbp+var_1], 1 loc_39D5A: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char ma_memmap_file(long long a1) { _QWORD *v2; // [rsp+8h] [rbp-18h] v2 = *(_QWORD **)a1; if ( *(_QWORD *)(*(_QWORD *)a1 + 1520LL) ) goto LABEL_6; if ( inline_mysql_file_seek( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c", 0x610u, *(_DWORD *)(a1 + 1152), 0LL, 2u, 0LL) >= (unsigned long long)(v2[8] + 7LL) ) { if ( (unsigned __int8)ma_dynmap_file(a1, v2[8]) ) return 0; LABEL_6: *(_DWORD *)(a1 + 1564) |= 0x20u; v2[201] = ma_read_mempack_record; *(_QWORD *)(a1 + 984) = ma_read_mempack_record; v2[203] = ma_read_rnd_mempack_record; return 1; } return 0; }
_ma_memmap_file: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI 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] CMP qword ptr [RAX + 0x5f0],0x0 JNZ 0x00139d0d MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x480] LEA RDI,[0x25288a] MOV ESI,0x610 XOR EAX,EAX MOV R9D,EAX MOV R8D,0x2 MOV RCX,R9 CALL 0x00139ad0 MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x40] ADD RCX,0x7 CMP RAX,RCX JNC 0x00139cee JMP 0x00139ce4 LAB_00139ce4: JMP 0x00139ce6 LAB_00139ce6: JMP 0x00139ce8 LAB_00139ce8: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00139d5a LAB_00139cee: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x40] CALL 0x0013c720 CMP AL,0x0 JZ 0x00139d0b JMP 0x00139d05 LAB_00139d05: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00139d5a LAB_00139d0b: JMP 0x00139d0d LAB_00139d0d: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x61c] OR ECX,0x20 MOV dword ptr [RAX + 0x61c],ECX MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x139d70] MOV qword ptr [RAX + 0x648],RCX MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x139d70] MOV qword ptr [RAX + 0x3d8],RCX MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x139e70] MOV qword ptr [RAX + 0x658],RCX MOV byte ptr [RBP + -0x1],0x1 LAB_00139d5a: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 _ma_memmap_file(long *param_1) { long lVar1; char cVar2; ulong uVar3; lVar1 = *param_1; if (*(long *)(*param_1 + 0x5f0) == 0) { uVar3 = inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_packrec.c",0x610, (int)param_1[0x90],0,2); if (uVar3 < *(long *)(lVar1 + 0x40) + 7U) { return 0; } cVar2 = _ma_dynmap_file(param_1,*(int8 *)(lVar1 + 0x40)); if (cVar2 != '\0') { return 0; } } *(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) | 0x20; *(code **)(lVar1 + 0x648) = _ma_read_mempack_record; param_1[0x7b] = (long)_ma_read_mempack_record; *(code **)(lVar1 + 0x658) = _ma_read_rnd_mempack_record; return 1; }