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
40,100
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const std::vector<int> & values) { std::stringstream buf; buf << "[ "; bool first = true; for (auto e : values) { if (first) { first = false; } else { buf << ", "; } buf << std::to_string(e); } buf << " ]"; return buf.str(); }
O1
cpp
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rsi, %rbx movq %rdi, 0x20(%rsp) leaq 0x30(%rsp), %rdi callq 0x19530 leaq 0x40(%rsp), %rdi leaq 0x68343(%rip), %rsi # 0xb6cb3 movl $0x2, %edx callq 0x198a0 movq (%rbx), %r12 movq 0x8(%rbx), %rax movq %rax, 0x28(%rsp) cmpq %rax, %r12 je 0x4ea77 movb $0x1, %r14b movl $0xd1b71759, %r15d # imm = 0xD1B71759 movl (%r12), %r13d testb $0x1, %r14b je 0x4e9a7 xorl %r14d, %r14d jmp 0x4e9bd movl $0x2, %edx leaq 0x40(%rsp), %rdi leaq 0x68c23(%rip), %rsi # 0xb75db callq 0x198a0 movl %r13d, %ebp negl %ebp cmovsl %r13d, %ebp movl $0x1, %ebx cmpl $0xa, %ebp jb 0x4ea0c movl $0x4, %ebx movl %ebp, %eax cmpl $0x63, %eax jbe 0x4ea05 cmpl $0x3e7, %eax # imm = 0x3E7 jbe 0x4ea0a cmpl $0x2710, %eax # imm = 0x2710 jb 0x4ea0c movl %eax, %ecx imulq %r15, %rcx shrq $0x2d, %rcx addl $0x4, %ebx cmpl $0x1869f, %eax # imm = 0x1869F movl %ecx, %eax ja 0x4e9d7 addl $-0x3, %ebx jmp 0x4ea0c addl $-0x2, %ebx jmp 0x4ea0c decl %ebx shrl $0x1f, %r13d leal (%rbx,%r13), %esi leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq %rsp, %rdi movl $0x2d, %edx callq 0x198d0 addq (%rsp), %r13 movq %r13, %rdi movl %ebx, %esi movl %ebp, %edx callq 0x23b67 movq (%rsp), %rsi movq 0x8(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x198a0 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x4ea68 movq 0x10(%rsp), %rsi incq %rsi callq 0x197a0 addq $0x4, %r12 cmpq 0x28(%rsp), %r12 jne 0x4e998 leaq 0x68238(%rip), %rsi # 0xb6cb6 movl $0x2, %edx leaq 0x40(%rsp), %rdi callq 0x198a0 movq 0x20(%rsp), %rbx leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x19c80 movq 0x9c482(%rip), %rsi # 0xeaf28 leaq 0x30(%rsp), %rdi callq 0x19570 leaq 0xb0(%rsp), %rdi callq 0x19240 movq %rbx, %rax addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4ead8 jmp 0x4ead8 jmp 0x4ead8 movq %rax, %rbx jmp 0x4eafb movq %rax, %rbx movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0x4eafb movq 0x10(%rsp), %rsi incq %rsi callq 0x197a0 movq 0x9c426(%rip), %rsi # 0xeaf28 leaq 0x30(%rsp), %rdi callq 0x19570 leaq 0xb0(%rsp), %rdi callq 0x19240 movq %rbx, %rdi callq 0x19e00
_Z11string_fromB5cxx11RKSt6vectorIiSaIiEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov rbx, rsi mov [rsp+1E8h+var_1C8], rdi lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+1E8h+var_1A8] lea rsi, asc_B6CB3; "[ " mov edx, 2 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r12, [rbx] mov rax, [rbx+8] mov [rsp+1E8h+var_1C0], rax cmp r12, rax jz loc_4EA77 mov r14b, 1 mov r15d, 0D1B71759h loc_4E998: mov r13d, [r12] test r14b, 1 jz short loc_4E9A7 xor r14d, r14d jmp short loc_4E9BD loc_4E9A7: mov edx, 2 lea rdi, [rsp+1E8h+var_1A8] lea rsi, aZuD+6; ", " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_4E9BD: mov ebp, r13d neg ebp cmovs ebp, r13d mov ebx, 1 cmp ebp, 0Ah jb short loc_4EA0C mov ebx, 4 mov eax, ebp loc_4E9D7: cmp eax, 63h ; 'c' jbe short loc_4EA05 cmp eax, 3E7h jbe short loc_4EA0A cmp eax, 2710h jb short loc_4EA0C mov ecx, eax imul rcx, r15 shr rcx, 2Dh add ebx, 4 cmp eax, 1869Fh mov eax, ecx ja short loc_4E9D7 add ebx, 0FFFFFFFDh jmp short loc_4EA0C loc_4EA05: add ebx, 0FFFFFFFEh jmp short loc_4EA0C loc_4EA0A: dec ebx loc_4EA0C: shr r13d, 1Fh lea esi, [rbx+r13] lea rax, [rsp+1E8h+var_1D8] mov [rsp+1E8h+var_1E8], rax mov rdi, rsp mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r13, [rsp+1E8h+var_1E8] mov rdi, r13 mov esi, ebx mov edx, ebp call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint) mov rsi, [rsp+1E8h+var_1E8] mov rdx, [rsp+1E8h+var_1E0] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E8]; void * lea rax, [rsp+1E8h+var_1D8] cmp rdi, rax jz short loc_4EA68 mov rsi, [rsp+1E8h+var_1D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4EA68: add r12, 4 cmp r12, [rsp+1E8h+var_1C0] jnz loc_4E998 loc_4EA77: lea rsi, asc_B6CB6; " ]" mov edx, 2 lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, [rsp+1E8h+var_1C8] lea rsi, [rsp+1E8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1E8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4EAD8 jmp short loc_4EAD8 jmp short $+2 loc_4EAD8: mov rbx, rax jmp short loc_4EAFB mov rbx, rax mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_4EAFB mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4EAFB: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_28] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_A8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, int **a2) { int *v2; // r12 char v3; // r14 int v4; // r13d unsigned int v5; // ebp int v6; // ebx unsigned int v7; // eax bool v8; // cc unsigned int v9; // r13d long long v10; // rbx void *v12[2]; // [rsp+0h] [rbp-1E8h] BYREF _QWORD v13[2]; // [rsp+10h] [rbp-1D8h] BYREF long long v14; // [rsp+20h] [rbp-1C8h] int *v15; // [rsp+28h] [rbp-1C0h] _BYTE v16[16]; // [rsp+30h] [rbp-1B8h] BYREF char v17[8]; // [rsp+40h] [rbp-1A8h] BYREF char v18[104]; // [rsp+48h] [rbp-1A0h] BYREF char v19[312]; // [rsp+B0h] [rbp-138h] BYREF v14 = a1; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v16); std::__ostream_insert<char,std::char_traits<char>>(v17, "[ ", 2LL); v2 = *a2; v15 = a2[1]; if ( v2 != v15 ) { v3 = 1; do { v4 = *v2; if ( (v3 & 1) != 0 ) v3 = 0; else std::__ostream_insert<char,std::char_traits<char>>(v17, ", ", 2LL); v5 = -v4; if ( v4 > 0 ) v5 = v4; v6 = 1; if ( v5 >= 0xA ) { v6 = 4; v7 = v5; while ( 1 ) { if ( v7 <= 0x63 ) { v6 -= 2; goto LABEL_17; } if ( v7 <= 0x3E7 ) break; if ( v7 < 0x2710 ) goto LABEL_17; v6 += 4; v8 = v7 <= 0x1869F; v7 /= 0x2710u; if ( v8 ) { v6 -= 3; goto LABEL_17; } } --v6; } LABEL_17: v9 = (unsigned int)v4 >> 31; v12[0] = v13; std::string::_M_construct(v12, v6 + v9, 45LL); std::__detail::__to_chars_10_impl<unsigned int>((char *)v12[0] + v9, v6, v5); std::__ostream_insert<char,std::char_traits<char>>(v17, v12[0], v12[1]); if ( v12[0] != v13 ) operator delete(v12[0], v13[0] + 1LL); ++v2; } while ( v2 != v15 ); } std::__ostream_insert<char,std::char_traits<char>>(v17, " ]", 2LL); v10 = v14; std::stringbuf::str(v14, v18); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v16, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v19); return v10; }
string_from[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV RBX,RSI MOV qword ptr [RSP + 0x20],RDI LEA RDI,[RSP + 0x30] CALL 0x00119530 LEA RDI,[RSP + 0x40] LAB_0014e969: LEA RSI,[0x1b6cb3] MOV EDX,0x2 CALL 0x001198a0 MOV R12,qword ptr [RBX] MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x28],RAX CMP R12,RAX JZ 0x0014ea77 MOV R14B,0x1 MOV R15D,0xd1b71759 LAB_0014e998: MOV R13D,dword ptr [R12] TEST R14B,0x1 JZ 0x0014e9a7 XOR R14D,R14D JMP 0x0014e9bd LAB_0014e9a7: MOV EDX,0x2 LEA RDI,[RSP + 0x40] LEA RSI,[0x1b75db] CALL 0x001198a0 LAB_0014e9bd: MOV EBP,R13D NEG EBP CMOVS EBP,R13D MOV EBX,0x1 CMP EBP,0xa JC 0x0014ea0c MOV EBX,0x4 MOV EAX,EBP LAB_0014e9d7: CMP EAX,0x63 JBE 0x0014ea05 CMP EAX,0x3e7 JBE 0x0014ea0a CMP EAX,0x2710 JC 0x0014ea0c MOV ECX,EAX IMUL RCX,R15 SHR RCX,0x2d ADD EBX,0x4 CMP EAX,0x1869f MOV EAX,ECX JA 0x0014e9d7 ADD EBX,-0x3 JMP 0x0014ea0c LAB_0014ea05: ADD EBX,-0x2 JMP 0x0014ea0c LAB_0014ea0a: DEC EBX LAB_0014ea0c: SHR R13D,0x1f LEA ESI,[RBX + R13*0x1] LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX LAB_0014ea1d: MOV RDI,RSP MOV EDX,0x2d CALL 0x001198d0 ADD R13,qword ptr [RSP] MOV RDI,R13 MOV ESI,EBX MOV EDX,EBP CALL 0x00123b67 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] LAB_0014ea43: LEA RDI,[RSP + 0x40] CALL 0x001198a0 MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x0014ea68 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001197a0 LAB_0014ea68: ADD R12,0x4 CMP R12,qword ptr [RSP + 0x28] JNZ 0x0014e998 LAB_0014ea77: LEA RSI,[0x1b6cb6] MOV EDX,0x2 LEA RDI,[RSP + 0x40] CALL 0x001198a0 MOV RBX,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00119c80 LAB_0014ea9f: MOV RSI,qword ptr [0x001eaf28] LEA RDI,[RSP + 0x30] CALL 0x00119570 LEA RDI,[RSP + 0xb0] CALL 0x00119240 MOV RAX,RBX ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */ vector * string_from_abi_cxx11_(vector *param_1) { uint uVar1; uint uVar2; vector *pvVar3; uint uVar4; uint uVar5; ulong uVar6; uint uVar7; int8 *in_RSI; uint *puVar8; bool bVar9; long *local_1e8; long local_1e0; long local_1d8 [2]; vector *local_1c8; uint *local_1c0; stringstream local_1b8 [16]; ostream local_1a8 [112]; ios_base local_138 [264]; local_1c8 = param_1; std::__cxx11::stringstream::stringstream(local_1b8); /* try { // try from 0014e969 to 0014e979 has its CatchHandler @ 0014ead2 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2); puVar8 = (uint *)*in_RSI; local_1c0 = (uint *)in_RSI[1]; if (puVar8 != local_1c0) { bVar9 = true; do { uVar1 = *puVar8; if (bVar9) { bVar9 = false; } else { /* try { // try from 0014e9a7 to 0014e9bc has its CatchHandler @ 0014ead6 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2); } uVar2 = -uVar1; if (0 < (int)uVar1) { uVar2 = uVar1; } uVar7 = 1; if (9 < uVar2) { uVar6 = (ulong)uVar2; uVar4 = 4; do { uVar7 = uVar4; uVar5 = (uint)uVar6; if (uVar5 < 100) { uVar7 = uVar7 - 2; goto LAB_0014ea0c; } if (uVar5 < 1000) { uVar7 = uVar7 - 1; goto LAB_0014ea0c; } if (uVar5 < 10000) goto LAB_0014ea0c; uVar6 = uVar6 / 10000; uVar4 = uVar7 + 4; } while (99999 < uVar5); uVar7 = uVar7 + 1; } LAB_0014ea0c: local_1e8 = local_1d8; /* try { // try from 0014ea1d to 0014ea29 has its CatchHandler @ 0014ead8 */ std::__cxx11::string::_M_construct((ulong)&local_1e8,(char)uVar7 - (char)((int)uVar1 >> 0x1f)) ; std::__detail::__to_chars_10_impl<unsigned_int> ((char *)((long)local_1e8 + (ulong)(uVar1 >> 0x1f)),uVar7,uVar2); /* try { // try from 0014ea43 to 0014ea4c has its CatchHandler @ 0014eadd */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,(char *)local_1e8,local_1e0); if (local_1e8 != local_1d8) { operator_delete(local_1e8,local_1d8[0] + 1); } puVar8 = puVar8 + 1; } while (puVar8 != local_1c0); } /* try { // try from 0014ea77 to 0014ea9e has its CatchHandler @ 0014ead4 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2); pvVar3 = local_1c8; std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b8); std::ios_base::~ios_base(local_138); return pvVar3; }
40,101
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const std::vector<int> & values) { std::stringstream buf; buf << "[ "; bool first = true; for (auto e : values) { if (first) { first = false; } else { buf << ", "; } buf << std::to_string(e); } buf << " ]"; return buf.str(); }
O3
cpp
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rsi, %rbx movq %rdi, 0x28(%rsp) leaq 0x30(%rsp), %rdi callq 0x19540 leaq 0x40(%rsp), %rdi leaq 0x658f7(%rip), %rsi # 0xb3c93 movl $0x2, %edx callq 0x198b0 movq (%rbx), %r12 movq 0x8(%rbx), %r15 cmpq %r15, %r12 je 0x4e49c movb $0x1, %al movl $0xd1b71759, %r14d # imm = 0xD1B71759 movl (%r12), %r13d testb $0x1, %al jne 0x4e3dc movl $0x2, %edx leaq 0x40(%rsp), %rdi leaq 0x661e4(%rip), %rsi # 0xb45bb callq 0x198b0 movl %r13d, %ebp negl %ebp cmovsl %r13d, %ebp movl $0x1, %ebx cmpl $0xa, %ebp jb 0x4e42b movl $0x4, %ebx movl %ebp, %eax cmpl $0x63, %eax jbe 0x4e424 cmpl $0x3e7, %eax # imm = 0x3E7 jbe 0x4e429 cmpl $0x2710, %eax # imm = 0x2710 jb 0x4e42b movl %eax, %ecx imulq %r14, %rcx shrq $0x2d, %rcx addl $0x4, %ebx cmpl $0x1869f, %eax # imm = 0x1869F movl %ecx, %eax ja 0x4e3f6 addl $-0x3, %ebx jmp 0x4e42b addl $-0x2, %ebx jmp 0x4e42b decl %ebx shrl $0x1f, %r13d leal (%rbx,%r13), %esi leaq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x8(%rsp), %rdi movl $0x2d, %edx callq 0x198e0 addq 0x8(%rsp), %r13 movq %r13, %rdi movl %ebx, %esi movl %ebp, %edx callq 0x239a3 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x198b0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x4e48d movq 0x18(%rsp), %rsi incq %rsi callq 0x197b0 addq $0x4, %r12 xorl %eax, %eax cmpq %r15, %r12 jne 0x4e3be leaq 0x657f3(%rip), %rsi # 0xb3c96 movl $0x2, %edx leaq 0x40(%rsp), %rdi callq 0x198b0 movq 0x28(%rsp), %rbx leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x19c90 movq 0x99a5d(%rip), %rsi # 0xe7f28 leaq 0x30(%rsp), %rdi callq 0x19580 leaq 0xb0(%rsp), %rdi callq 0x19240 movq %rbx, %rax addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4e4fd jmp 0x4e4fd jmp 0x4e4fd movq %rax, %rbx jmp 0x4e521 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x4e521 movq 0x18(%rsp), %rsi incq %rsi callq 0x197b0 movq 0x99a00(%rip), %rsi # 0xe7f28 leaq 0x30(%rsp), %rdi callq 0x19580 leaq 0xb0(%rsp), %rdi callq 0x19240 movq %rbx, %rdi callq 0x19e10
_Z11string_fromB5cxx11RKSt6vectorIiSaIiEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov rbx, rsi mov [rsp+1E8h+var_1C0], rdi lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+1E8h+var_1A8] lea rsi, asc_B3C93; "[ " mov edx, 2 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r12, [rbx] mov r15, [rbx+8] cmp r12, r15 jz loc_4E49C mov al, 1 mov r14d, 0D1B71759h loc_4E3BE: mov r13d, [r12] test al, 1 jnz short loc_4E3DC mov edx, 2 lea rdi, [rsp+1E8h+var_1A8] lea rsi, aZuD+6; ", " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_4E3DC: mov ebp, r13d neg ebp cmovs ebp, r13d mov ebx, 1 cmp ebp, 0Ah jb short loc_4E42B mov ebx, 4 mov eax, ebp loc_4E3F6: cmp eax, 63h ; 'c' jbe short loc_4E424 cmp eax, 3E7h jbe short loc_4E429 cmp eax, 2710h jb short loc_4E42B mov ecx, eax imul rcx, r14 shr rcx, 2Dh add ebx, 4 cmp eax, 1869Fh mov eax, ecx ja short loc_4E3F6 add ebx, 0FFFFFFFDh jmp short loc_4E42B loc_4E424: add ebx, 0FFFFFFFEh jmp short loc_4E42B loc_4E429: dec ebx loc_4E42B: shr r13d, 1Fh lea esi, [rbx+r13] lea rax, [rsp+1E8h+var_1D0] mov [rsp+1E8h+var_1E0], rax lea rdi, [rsp+1E8h+var_1E0] mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r13, [rsp+1E8h+var_1E0] mov rdi, r13 mov esi, ebx mov edx, ebp call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * lea rax, [rsp+1E8h+var_1D0] cmp rdi, rax jz short loc_4E48D mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4E48D: add r12, 4 xor eax, eax cmp r12, r15 jnz loc_4E3BE loc_4E49C: lea rsi, asc_B3C96; " ]" mov edx, 2 lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, [rsp+1E8h+var_1C0] lea rsi, [rsp+1E8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1E8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4E4FD jmp short loc_4E4FD jmp short $+2 loc_4E4FD: mov rbx, rax jmp short loc_4E521 mov rbx, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_4E521 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4E521: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_28] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_A8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, int **a2) { int *v2; // r12 int *v3; // r15 char v4; // al int v5; // r13d unsigned int v6; // ebp int v7; // ebx unsigned int v8; // eax bool v9; // cc unsigned int v10; // r13d long long v11; // rbx void *v13[2]; // [rsp+8h] [rbp-1E0h] BYREF _QWORD v14[2]; // [rsp+18h] [rbp-1D0h] BYREF long long v15; // [rsp+28h] [rbp-1C0h] _BYTE v16[16]; // [rsp+30h] [rbp-1B8h] BYREF char v17[8]; // [rsp+40h] [rbp-1A8h] BYREF char v18[104]; // [rsp+48h] [rbp-1A0h] BYREF char v19[312]; // [rsp+B0h] [rbp-138h] BYREF v15 = a1; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v16); std::__ostream_insert<char,std::char_traits<char>>(v17, "[ ", 2LL); v2 = *a2; v3 = a2[1]; if ( *a2 != v3 ) { v4 = 1; do { v5 = *v2; if ( (v4 & 1) == 0 ) std::__ostream_insert<char,std::char_traits<char>>(v17, ", ", 2LL); v6 = -v5; if ( v5 > 0 ) v6 = v5; v7 = 1; if ( v6 >= 0xA ) { v7 = 4; v8 = v6; while ( 1 ) { if ( v8 <= 0x63 ) { v7 -= 2; goto LABEL_16; } if ( v8 <= 0x3E7 ) break; if ( v8 < 0x2710 ) goto LABEL_16; v7 += 4; v9 = v8 <= 0x1869F; v8 /= 0x2710u; if ( v9 ) { v7 -= 3; goto LABEL_16; } } --v7; } LABEL_16: v10 = (unsigned int)v5 >> 31; v13[0] = v14; std::string::_M_construct(v13, v7 + v10, 45LL); std::__detail::__to_chars_10_impl<unsigned int>((char *)v13[0] + v10, v7, v6); std::__ostream_insert<char,std::char_traits<char>>(v17, v13[0], v13[1]); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); ++v2; v4 = 0; } while ( v2 != v3 ); } std::__ostream_insert<char,std::char_traits<char>>(v17, " ]", 2LL); v11 = v15; std::stringbuf::str(v15, v18); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v16, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v19); return v11; }
string_from[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV RBX,RSI MOV qword ptr [RSP + 0x28],RDI LEA RDI,[RSP + 0x30] CALL 0x00119540 LEA RDI,[RSP + 0x40] LAB_0014e395: LEA RSI,[0x1b3c93] MOV EDX,0x2 CALL 0x001198b0 MOV R12,qword ptr [RBX] MOV R15,qword ptr [RBX + 0x8] CMP R12,R15 JZ 0x0014e49c MOV AL,0x1 MOV R14D,0xd1b71759 LAB_0014e3be: MOV R13D,dword ptr [R12] TEST AL,0x1 JNZ 0x0014e3dc LAB_0014e3c6: MOV EDX,0x2 LEA RDI,[RSP + 0x40] LEA RSI,[0x1b45bb] CALL 0x001198b0 LAB_0014e3dc: MOV EBP,R13D NEG EBP CMOVS EBP,R13D MOV EBX,0x1 CMP EBP,0xa JC 0x0014e42b MOV EBX,0x4 MOV EAX,EBP LAB_0014e3f6: CMP EAX,0x63 JBE 0x0014e424 CMP EAX,0x3e7 JBE 0x0014e429 CMP EAX,0x2710 JC 0x0014e42b MOV ECX,EAX IMUL RCX,R14 SHR RCX,0x2d ADD EBX,0x4 CMP EAX,0x1869f MOV EAX,ECX JA 0x0014e3f6 ADD EBX,-0x3 JMP 0x0014e42b LAB_0014e424: ADD EBX,-0x2 JMP 0x0014e42b LAB_0014e429: DEC EBX LAB_0014e42b: SHR R13D,0x1f LEA ESI,[RBX + R13*0x1] LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX LAB_0014e43d: LEA RDI,[RSP + 0x8] MOV EDX,0x2d CALL 0x001198e0 ADD R13,qword ptr [RSP + 0x8] MOV RDI,R13 MOV ESI,EBX MOV EDX,EBP CALL 0x001239a3 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0014e467: LEA RDI,[RSP + 0x40] CALL 0x001198b0 MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0014e48d MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001197b0 LAB_0014e48d: ADD R12,0x4 XOR EAX,EAX CMP R12,R15 JNZ 0x0014e3be LAB_0014e49c: LEA RSI,[0x1b3c96] MOV EDX,0x2 LEA RDI,[RSP + 0x40] CALL 0x001198b0 MOV RBX,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00119c90 LAB_0014e4c4: MOV RSI,qword ptr [0x001e7f28] LEA RDI,[RSP + 0x30] CALL 0x00119580 LEA RDI,[RSP + 0xb0] CALL 0x00119240 MOV RAX,RBX ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */ vector * string_from_abi_cxx11_(vector *param_1) { uint uVar1; uint *puVar2; uint uVar3; vector *pvVar4; uint uVar5; bool bVar6; uint uVar7; ulong uVar8; uint uVar9; int8 *in_RSI; uint *puVar10; long *local_1e0; long local_1d8; long local_1d0 [2]; vector *local_1c0; stringstream local_1b8 [16]; ostream local_1a8 [112]; ios_base local_138 [264]; local_1c0 = param_1; std::__cxx11::stringstream::stringstream(local_1b8); /* try { // try from 0014e395 to 0014e3a5 has its CatchHandler @ 0014e4f7 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2); puVar10 = (uint *)*in_RSI; puVar2 = (uint *)in_RSI[1]; if (puVar10 != puVar2) { bVar6 = true; do { uVar1 = *puVar10; if (!bVar6) { /* try { // try from 0014e3c6 to 0014e3db has its CatchHandler @ 0014e4fb */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2); } uVar3 = -uVar1; if (0 < (int)uVar1) { uVar3 = uVar1; } uVar9 = 1; if (9 < uVar3) { uVar8 = (ulong)uVar3; uVar5 = 4; do { uVar9 = uVar5; uVar7 = (uint)uVar8; if (uVar7 < 100) { uVar9 = uVar9 - 2; goto LAB_0014e42b; } if (uVar7 < 1000) { uVar9 = uVar9 - 1; goto LAB_0014e42b; } if (uVar7 < 10000) goto LAB_0014e42b; uVar8 = uVar8 / 10000; uVar5 = uVar9 + 4; } while (99999 < uVar7); uVar9 = uVar9 + 1; } LAB_0014e42b: local_1e0 = local_1d0; /* try { // try from 0014e43d to 0014e44b has its CatchHandler @ 0014e4fd */ std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar9 - (char)((int)uVar1 >> 0x1f)) ; std::__detail::__to_chars_10_impl<unsigned_int> ((char *)((long)local_1e0 + (ulong)(uVar1 >> 0x1f)),uVar9,uVar3); /* try { // try from 0014e467 to 0014e470 has its CatchHandler @ 0014e502 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,(char *)local_1e0,local_1d8); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } puVar10 = puVar10 + 1; bVar6 = false; } while (puVar10 != puVar2); } /* try { // try from 0014e49c to 0014e4c3 has its CatchHandler @ 0014e4f9 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2); pvVar4 = local_1c0; std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b8); std::ios_base::~ios_base(local_138); return pvVar4; }
40,102
mysql_autocommit_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_autocommit_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_autocommit, (parms->mysql, parms->auto_mode), parms->mysql, my_bool, r_my_bool) }
O0
c
mysql_autocommit_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movsbl 0x8(%rax), %esi callq 0x21970 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_autocommit_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] movsx esi, byte ptr [rax+8] call mysql_autocommit mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_autocommit_start_internal(long long a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); *(_BYTE *)(v2 + 8) = mysql_autocommit(*(_QWORD *)a1, *(_BYTE *)(a1 + 8)); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_autocommit_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVSX ESI,byte ptr [RAX + 0x8] CALL 0x00121970 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_autocommit_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_autocommit(*param_1,(int)(char)param_1[1]); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
40,103
google::protobuf::compiler::cpp::Namespace[abi:cxx11](google::protobuf::FileDescriptor const*, google::protobuf::compiler::cpp::Options const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/helpers.cc
std::string Namespace(const FileDescriptor* d, const Options& options) { std::string ret = Namespace(d->package()); if (IsWellKnownMessage(d) && options.opensource_runtime) { // Written with string concatenation to prevent rewriting of // ::google::protobuf. ret = StringReplace(ret, "::google::" "protobuf", "::PROTOBUF_NAMESPACE_ID", false); } return ret; }
O0
cpp
google::protobuf::compiler::cpp::Namespace[abi:cxx11](google::protobuf::FileDescriptor const*, google::protobuf::compiler::cpp::Options const&): subq $0xc8, %rsp movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movb $0x0, 0xaf(%rsp) movq 0xb8(%rsp), %rdi callq 0x58260 movq 0x20(%rsp), %rdi movq %rax, %rsi callq 0x514c0 movq 0xb8(%rsp), %rdi callq 0x518e0 movb %al, 0x2e(%rsp) jmp 0x51741 movb 0x2e(%rsp), %al testb $0x1, %al jne 0x5174e jmp 0x51898 movq 0xb0(%rsp), %rax testb $0x1, 0xd2(%rax) je 0x51898 leaq 0x57(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x21a00 movq 0x10(%rsp), %rdx leaq 0x359e62(%rip), %rsi # 0x3ab5e0 leaq 0x58(%rsp), %rdi callq 0x21890 jmp 0x5178a leaq 0x2f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x21a00 movq 0x8(%rsp), %rdx leaq 0x359e4e(%rip), %rsi # 0x3ab5f3 leaq 0x30(%rsp), %rdi callq 0x21890 jmp 0x517b1 movq 0x20(%rsp), %rsi leaq 0x78(%rsp), %rdi leaq 0x58(%rsp), %rdx leaq 0x30(%rsp), %rcx xorl %r8d, %r8d callq 0x21f4f0 jmp 0x517cf movq 0x20(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0x215e0 leaq 0x78(%rsp), %rdi callq 0x21cc8 leaq 0x30(%rsp), %rdi callq 0x21cc8 leaq 0x2f(%rsp), %rdi callq 0x21cb0 leaq 0x58(%rsp), %rdi callq 0x21cc8 leaq 0x57(%rsp), %rdi callq 0x21cb0 jmp 0x51898 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0x518c1 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0x5188c movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0x51878 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0x30(%rsp), %rdi callq 0x21cc8 leaq 0x2f(%rsp), %rdi callq 0x21cb0 leaq 0x58(%rsp), %rdi callq 0x21cc8 leaq 0x57(%rsp), %rdi callq 0x21cb0 jmp 0x518c1 movb $0x1, 0xaf(%rsp) testb $0x1, 0xaf(%rsp) jne 0x518b4 movq 0x20(%rsp), %rdi callq 0x21cc8 movq 0x18(%rsp), %rax addq $0xc8, %rsp retq movq 0x20(%rsp), %rdi callq 0x21cc8 movq 0xa0(%rsp), %rdi callq 0x21700 nopl (%rax,%rax)
_ZN6google8protobuf8compiler3cpp9NamespaceB5cxx11EPKNS0_14FileDescriptorERKNS2_7OptionsE: sub rsp, 0C8h mov [rsp+0C8h+var_A8], rdi; int mov rax, rdi mov qword ptr [rsp+0C8h+var_B0], rax; char mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov [rsp+0C8h+var_18], rdx mov [rsp+0C8h+var_19], 0 mov rdi, [rsp+0C8h+var_10] call _ZNK6google8protobuf14FileDescriptor7packageB5cxx11Ev; google::protobuf::FileDescriptor::package(void) mov rdi, [rsp+0C8h+var_A8]; int mov rsi, rax; google::protobuf::FileDescriptor * call _ZN6google8protobuf8compiler3cpp9NamespaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; google::protobuf::compiler::cpp::Namespace(std::string const&) mov rdi, [rsp+0C8h+var_10]; this call _ZN6google8protobuf8compiler3cpp18IsWellKnownMessageEPKNS0_14FileDescriptorE; google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*) mov [rsp+0C8h+var_9A], al jmp short $+2 loc_51741: mov al, [rsp+0C8h+var_9A] test al, 1 jnz short loc_5174E jmp loc_51898 loc_5174E: mov rax, [rsp+0C8h+var_18] test byte ptr [rax+0D2h], 1 jz loc_51898 lea rdi, [rsp+0C8h+var_71] mov [rsp+0C8h+var_B8], rdi; __int64 call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0C8h+var_B8] lea rsi, aGoogleProtobuf_4; "::google::protobuf" lea rdi, [rsp+0C8h+var_71+1] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_5178A: lea rdi, [rsp+0C8h+var_99] mov qword ptr [rsp+0C8h+var_C0], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+0C8h+var_C0] lea rsi, aProtobufNamesp; "::PROTOBUF_NAMESPACE_ID" lea rdi, [rsp+0C8h+var_99+1] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_517B1: mov rsi, [rsp+0C8h+var_A8]; int lea rdi, [rsp+0C8h+var_50]; int lea rdx, [rsp+0C8h+var_71+1]; int lea rcx, [rsp+0C8h+var_99+1]; int xor r8d, r8d; int call _ZN6google8protobuf13StringReplaceERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_b; google::protobuf::StringReplace(std::string const&,std::string const&,std::string const&,bool) jmp short $+2 loc_517CF: mov rdi, [rsp+0C8h+var_A8] lea rsi, [rsp+0C8h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+0C8h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0C8h+var_99+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0C8h+var_99] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+0C8h+var_71+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0C8h+var_71] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_51898 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp loc_518C1 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp short loc_5188C mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp short loc_51878 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_51878: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_5188C: lea rdi, [rsp+arg_4F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_518C1 loc_51898: mov [rsp+0C8h+var_19], 1 test [rsp+0C8h+var_19], 1 jnz short loc_518B4 mov rdi, [rsp+0C8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_518B4: mov rax, qword ptr [rsp+0C8h+var_B0] add rsp, 0C8h retn loc_518C1: mov rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_98] call __Unwind_Resume
long long google::protobuf::compiler::cpp::Namespace[abi:cxx11]( long long a1, google::protobuf::compiler::cpp *a2, long long a3) { const google::protobuf::FileDescriptor *v3; // rsi int v4; // r9d void *v6; // [rsp+0h] [rbp-C8h] char v7; // [rsp+2Fh] [rbp-99h] BYREF _BYTE v8[39]; // [rsp+30h] [rbp-98h] BYREF char v9; // [rsp+57h] [rbp-71h] BYREF _BYTE v10[32]; // [rsp+58h] [rbp-70h] BYREF int v11[13]; // [rsp+78h] [rbp-50h] BYREF char v12; // [rsp+AFh] [rbp-19h] long long v13; // [rsp+B0h] [rbp-18h] google::protobuf::compiler::cpp *v14; // [rsp+B8h] [rbp-10h] long long v15; // [rsp+C0h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = 0; v3 = (const google::protobuf::FileDescriptor *)google::protobuf::FileDescriptor::package[abi:cxx11](a2); google::protobuf::compiler::cpp::Namespace(a1, (long long)v3); if ( (google::protobuf::compiler::cpp::IsWellKnownMessage(v14, v3) & 1) != 0 && (*(_BYTE *)(v13 + 210) & 1) != 0 ) { std::allocator<char>::allocator(); std::string::basic_string(v10, "::google::protobuf", &v9); std::allocator<char>::allocator(); std::string::basic_string(v8, "::PROTOBUF_NAMESPACE_ID", &v7); google::protobuf::StringReplace((int)v11, a1, (int)v10, (int)v8, 0, v4, v6, (int)&v7, (long long)&v9); std::string::operator=(a1, v11); std::string::~string(v11); std::string::~string(v8); std::allocator<char>::~allocator(&v7); std::string::~string(v10); std::allocator<char>::~allocator(&v9); } return a1; }
Namespace[abi:cxx11]: SUB RSP,0xc8 MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV qword ptr [RSP + 0xb0],RDX MOV byte ptr [RSP + 0xaf],0x0 MOV RDI,qword ptr [RSP + 0xb8] CALL 0x00158260 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,RAX CALL 0x001514c0 MOV RDI,qword ptr [RSP + 0xb8] LAB_00151736: CALL 0x001518e0 MOV byte ptr [RSP + 0x2e],AL JMP 0x00151741 LAB_00151741: MOV AL,byte ptr [RSP + 0x2e] TEST AL,0x1 JNZ 0x0015174e JMP 0x00151898 LAB_0015174e: MOV RAX,qword ptr [RSP + 0xb0] TEST byte ptr [RAX + 0xd2],0x1 JZ 0x00151898 LEA RDI,[RSP + 0x57] MOV qword ptr [RSP + 0x10],RDI CALL 0x00121a00 MOV RDX,qword ptr [RSP + 0x10] LAB_00151777: LEA RSI,[0x4ab5e0] LEA RDI,[RSP + 0x58] CALL 0x00121890 JMP 0x0015178a LAB_0015178a: LEA RDI,[RSP + 0x2f] MOV qword ptr [RSP + 0x8],RDI CALL 0x00121a00 MOV RDX,qword ptr [RSP + 0x8] LAB_0015179e: LEA RSI,[0x4ab5f3] LEA RDI,[RSP + 0x30] CALL 0x00121890 JMP 0x001517b1 LAB_001517b1: MOV RSI,qword ptr [RSP + 0x20] LEA RDI,[RSP + 0x78] LEA RDX,[RSP + 0x58] LEA RCX,[RSP + 0x30] XOR R8D,R8D CALL 0x0031f4f0 LAB_001517cd: JMP 0x001517cf LAB_001517cf: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[RSP + 0x78] CALL 0x001215e0 LEA RDI,[RSP + 0x78] CALL 0x00121cc8 LEA RDI,[RSP + 0x30] CALL 0x00121cc8 LEA RDI,[RSP + 0x2f] CALL 0x00121cb0 LEA RDI,[RSP + 0x58] CALL 0x00121cc8 LEA RDI,[RSP + 0x57] CALL 0x00121cb0 JMP 0x00151898 LAB_00151898: MOV byte ptr [RSP + 0xaf],0x1 TEST byte ptr [RSP + 0xaf],0x1 JNZ 0x001518b4 MOV RDI,qword ptr [RSP + 0x20] CALL 0x00121cc8 LAB_001518b4: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0xc8 RET
/* WARNING: Removing unreachable block (ram,0x001518aa) */ /* google::protobuf::compiler::cpp::Namespace[abi:cxx11](google::protobuf::FileDescriptor const*, google::protobuf::compiler::cpp::Options const&) */ cpp * __thiscall google::protobuf::compiler::cpp::Namespace_abi_cxx11_ (cpp *this,FileDescriptor *param_1,Options *param_2) { byte bVar1; string *psVar2; allocator local_99; string local_98 [39]; allocator local_71; string local_70 [32]; protobuf local_50 [55]; int1 local_19; Options *local_18; FileDescriptor *local_10; cpp *local_8; local_19 = 0; local_18 = param_2; local_10 = param_1; local_8 = this; psVar2 = (string *)FileDescriptor::package_abi_cxx11_(param_1); Namespace(this,psVar2); /* try { // try from 00151736 to 0015173a has its CatchHandler @ 00151815 */ bVar1 = IsWellKnownMessage(local_10); if (((bVar1 & 1) != 0) && (((byte)local_18[0xd2] & 1) != 0)) { std::allocator<char>::allocator(); /* try { // try from 00151777 to 00151787 has its CatchHandler @ 0015182e */ std::__cxx11::string::string(local_70,"::google::protobuf",&local_71); std::allocator<char>::allocator(); /* try { // try from 0015179e to 001517ae has its CatchHandler @ 00151844 */ std::__cxx11::string::string(local_98,"::PROTOBUF_NAMESPACE_ID",&local_99); /* try { // try from 001517b1 to 001517cc has its CatchHandler @ 0015185a */ StringReplace(local_50,(string *)this,local_70,local_98,false); std::__cxx11::string::operator=((string *)this,(string *)local_50); std::__cxx11::string::~string((string *)local_50); std::__cxx11::string::~string(local_98); std::allocator<char>::~allocator((allocator<char> *)&local_99); std::__cxx11::string::~string(local_70); std::allocator<char>::~allocator((allocator<char> *)&local_71); } return this; }
40,104
minja::FilterTemplateToken::~FilterTemplateToken()
monkey531[P]llama/common/minja.hpp
FilterTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && filter) : TemplateToken(Type::Filter, location, pre, post), filter(std::move(filter)) {}
O3
cpp
minja::FilterTemplateToken::~FilterTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x832f5(%rip), %rax # 0xefe68 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x6cb88 callq 0x31b9a leaq 0x82639(%rip), %rax # 0xef1c8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x6cba4 callq 0x31b9a movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x197f0
_ZN5minja19FilterTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja19FilterTemplateTokenE; `vtable for'minja::FilterTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_6CB88 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6CB88: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_6CBA4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6CBA4: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::FilterTemplateToken::~FilterTemplateToken(minja::FilterTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::FilterTemplateToken + 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); }
~FilterTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x1efe68] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0016cb88 CALL 0x00131b9a LAB_0016cb88: LEA RAX,[0x1ef1c8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0016cba4 CALL 0x00131b9a LAB_0016cba4: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x001197f0
/* minja::FilterTemplateToken::~FilterTemplateToken() */ void __thiscall minja::FilterTemplateToken::~FilterTemplateToken(FilterTemplateToken *this) { *(int ***)this = &PTR__FilterTemplateToken_001efe78; 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_001ef1d8; 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; }
40,105
ma_crypt_index_pre_write_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_index_pre_write_hook(PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint block_size= share->block_size; const uint page_used= _ma_get_page_used(share, args->page); uint key_version; uchar *crypt_buf= my_malloc(PSI_INSTRUMENT_ME, block_size, MYF(0)); if (crypt_buf == NULL) { args->crypt_buf= NULL; /* for post-hook */ return 1; } if (!share->base.born_transactional) { /* store a random number instead of LSN (for counter block) */ store_rand_lsn(args->page); } maria_page_crc_set_index(args); { const uchar *src= args->page; uchar* dst= crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uint head= share->keypage_header; const uint tail= CRC_SIZE; /* page_used includes header (but not trailer) */ const uint size= page_used - head; /* 1 - copy head */ memcpy(dst, src, head); /* 2 - encrypt page */ if (ma_encrypt(share, share->crypt_data, src + head, dst + head, size, pageno, lsn, &key_version)) { my_free(crypt_buf); return 1; } /* 3 - copy tail */ memcpy(dst + block_size - tail, src + block_size - tail, tail); /* 4 - store key version */ _ma_store_key_version(share, dst, key_version); #ifdef HAVE_valgrind /* 5 - keep valgrind happy by zeroing not used bytes */ bzero(dst+head+size, block_size - size - tail - head); #endif } /* swap pointers to instead write out the encrypted block */ args->crypt_buf= args->page; args->page= crypt_buf; return 0; }
O0
c
ma_crypt_index_pre_write_hook: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x18(%rbp), %rcx movl 0x744(%rcx), %ecx movzbl -0x1(%rax,%rcx), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx movq -0x18(%rbp), %rdx movl 0x744(%rdx), %edx movzbl -0x2(%rcx,%rdx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0x20(%rbp) movl -0x1c(%rbp), %eax movl %eax, %esi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0xf4be0 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x604e5 movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movb $0x1, -0x1(%rbp) jmp 0x60634 movq -0x18(%rbp), %rax cmpb $0x0, 0x44c(%rax) jne 0x604fe movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x60800 movq -0x10(%rbp), %rdi callq 0x5e990 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl %eax, -0x44(%rbp) movq -0x38(%rbp), %rax movzbl (%rax), %eax movq -0x38(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x38(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x38(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax movl 0x744(%rax), %eax movl %eax, -0x54(%rbp) movl $0x4, -0x58(%rbp) movl -0x20(%rbp), %eax subl -0x54(%rbp), %eax movl %eax, -0x5c(%rbp) movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rsi movl -0x54(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x18(%rbp), %rdi movq -0x18(%rbp), %rax movq 0xc20(%rax), %rsi movq -0x38(%rbp), %rdx movl -0x54(%rbp), %eax addq %rax, %rdx movq -0x40(%rbp), %rcx movl -0x54(%rbp), %eax addq %rax, %rcx movl -0x5c(%rbp), %r8d movl -0x44(%rbp), %r9d movq -0x50(%rbp), %r10 leaq -0x24(%rbp), %rax movq %r10, (%rsp) movq %rax, 0x8(%rsp) callq 0x608b0 cmpl $0x0, %eax je 0x605de movq -0x30(%rbp), %rdi callq 0xf4f60 movb $0x1, -0x1(%rbp) jmp 0x60634 movq -0x40(%rbp), %rax movl -0x1c(%rbp), %ecx movq -0x38(%rbp), %rdx movl -0x1c(%rbp), %esi movl -0x4(%rdx,%rsi), %edx movl %edx, -0x4(%rax,%rcx) movq -0x40(%rbp), %rax movq -0x18(%rbp), %rcx movl 0x744(%rcx), %ecx addq %rcx, %rax addq $-0x8, %rax movq %rax, -0x68(%rbp) movl -0x24(%rbp), %ecx movq -0x68(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x80, %rsp popq %rbp retq
ma_crypt_index_pre_write_hook: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_18] mov ecx, [rcx+744h] movzx eax, byte ptr [rax+rcx-1] movzx eax, ax mov rcx, [rbp+var_10] mov rcx, [rcx] mov rdx, [rbp+var_18] mov edx, [rdx+744h] movzx ecx, byte ptr [rcx+rdx-2] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_20], eax mov eax, [rbp+var_1C] mov esi, eax xor edi, edi xor eax, eax mov edx, eax call my_malloc mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_604E5 mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov [rbp+var_1], 1 jmp loc_60634 loc_604E5: mov rax, [rbp+var_18] cmp byte ptr [rax+44Ch], 0 jnz short loc_604FE mov rax, [rbp+var_10] mov rdi, [rax] call store_rand_lsn loc_604FE: mov rdi, [rbp+var_10] call maria_page_crc_set_index mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_30] mov [rbp+var_40], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_44], eax mov rax, [rbp+var_38] movzx eax, byte ptr [rax] mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_38] mov ecx, [rcx+3] or rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_18] mov eax, [rax+744h] mov [rbp+var_54], eax mov [rbp+var_58], 4 mov eax, [rbp+var_20] sub eax, [rbp+var_54] mov [rbp+var_5C], eax mov rdi, [rbp+var_40] mov rsi, [rbp+var_38] mov eax, [rbp+var_54] mov edx, eax call _memcpy mov rdi, [rbp+var_18] mov rax, [rbp+var_18] mov rsi, [rax+0C20h] mov rdx, [rbp+var_38] mov eax, [rbp+var_54] add rdx, rax mov rcx, [rbp+var_40] mov eax, [rbp+var_54] add rcx, rax mov r8d, [rbp+var_5C] mov r9d, [rbp+var_44] mov r10, [rbp+var_50] lea rax, [rbp+var_24] mov [rsp+80h+var_80], r10 mov [rsp+80h+var_78], rax call ma_encrypt cmp eax, 0 jz short loc_605DE mov rdi, [rbp+var_30] call my_free mov [rbp+var_1], 1 jmp short loc_60634 loc_605DE: mov rax, [rbp+var_40] mov ecx, [rbp+var_1C] mov rdx, [rbp+var_38] mov esi, [rbp+var_1C] mov edx, [rdx+rsi-4] mov [rax+rcx-4], edx mov rax, [rbp+var_40] mov rcx, [rbp+var_18] mov ecx, [rcx+744h] add rax, rcx add rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_68], rax mov ecx, [rbp+var_24] mov rax, [rbp+var_68] mov [rax], ecx mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_1], 0 loc_60634: mov al, [rbp+var_1] add rsp, 80h pop rbp retn
char ma_crypt_index_pre_write_hook(long long *a1) { unsigned int v2; // [rsp+2Ch] [rbp-54h] unsigned long long v3; // [rsp+30h] [rbp-50h] int v4; // [rsp+3Ch] [rbp-44h] unsigned __int16 *v5; // [rsp+48h] [rbp-38h] long long v6; // [rsp+50h] [rbp-30h] int v7; // [rsp+5Ch] [rbp-24h] BYREF int v8; // [rsp+60h] [rbp-20h] unsigned int v9; // [rsp+64h] [rbp-1Ch] long long v10; // [rsp+68h] [rbp-18h] long long *v11; // [rsp+70h] [rbp-10h] v11 = a1; v10 = a1[2]; v9 = *(_DWORD *)(v10 + 1980); v8 = _byteswap_ushort(*(_WORD *)(*a1 + *(unsigned int *)(v10 + 1860) - 2)); v6 = my_malloc(0LL, v9, 0LL); if ( v6 ) { if ( !*(_BYTE *)(v10 + 1100) ) store_rand_lsn(*v11); maria_page_crc_set_index(v11); v5 = (unsigned __int16 *)*v11; v4 = v11[1]; v3 = *(unsigned int *)(*v11 + 3) | ((unsigned long long)((*((unsigned __int8 *)v5 + 2) << 16) | (unsigned int)*v5) << 32); v2 = *(_DWORD *)(v10 + 1860); memcpy(v6, *v11, v2); if ( (unsigned int)ma_encrypt( v10, *(_QWORD *)(v10 + 3104), v2 + (unsigned int)v5, v2 + (unsigned int)v6, v8 - v2, v4, v3, (long long)&v7) ) { my_free(v6); return 1; } else { *(_DWORD *)(v6 + v9 - 4) = *(_DWORD *)((char *)v5 + v9 - 4); *(_DWORD *)(*(unsigned int *)(v10 + 1860) + v6 - 8) = v7; v11[3] = *v11; *v11 = v6; return 0; } } else { v11[3] = 0LL; return 1; } }
ma_crypt_index_pre_write_hook: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x744] MOVZX EAX,byte ptr [RAX + RCX*0x1 + -0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RDX + 0x744] MOVZX ECX,byte ptr [RCX + RDX*0x1 + -0x2] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV ESI,EAX XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x001f4be0 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x001604e5 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00160634 LAB_001604e5: MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x44c],0x0 JNZ 0x001604fe MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x00160800 LAB_001604fe: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0015e990 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x744] MOV dword ptr [RBP + -0x54],EAX MOV dword ptr [RBP + -0x58],0x4 MOV EAX,dword ptr [RBP + -0x20] SUB EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x5c],EAX MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x54] MOV EDX,EAX CALL 0x0012a090 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0xc20] MOV RDX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x54] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x54] ADD RCX,RAX MOV R8D,dword ptr [RBP + -0x5c] MOV R9D,dword ptr [RBP + -0x44] MOV R10,qword ptr [RBP + -0x50] LEA RAX,[RBP + -0x24] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX CALL 0x001608b0 CMP EAX,0x0 JZ 0x001605de MOV RDI,qword ptr [RBP + -0x30] CALL 0x001f4f60 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00160634 LAB_001605de: MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4] MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RCX + 0x744] ADD RAX,RCX ADD RAX,-0x8 MOV qword ptr [RBP + -0x68],RAX MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x68] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_00160634: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x80 POP RBP RET
int1 ma_crypt_index_pre_write_hook(long *param_1) { int4 uVar1; uint uVar2; int3 *__src; ulong uVar3; int3 uVar4; int iVar5; void *__dest; int4 local_2c; uint local_28; uint local_24; long local_20; long *local_18; int1 local_9; local_20 = param_1[2]; local_24 = *(uint *)(local_20 + 0x7bc); local_28 = (uint)CONCAT11(*(int1 *)(*param_1 + -2 + (ulong)*(uint *)(local_20 + 0x744)), *(int1 *)(*param_1 + -1 + (ulong)*(uint *)(local_20 + 0x744))); local_18 = param_1; __dest = (void *)my_malloc(0,local_24,0); if (__dest == (void *)0x0) { local_18[3] = 0; local_9 = 1; } else { if (*(char *)(local_20 + 0x44c) == '\0') { store_rand_lsn(*local_18); } maria_page_crc_set_index(local_18); __src = (int3 *)*local_18; uVar3 = local_18[1]; uVar4 = *__src; uVar1 = *(int4 *)((long)__src + 3); uVar2 = *(uint *)(local_20 + 0x744); iVar5 = local_28 - uVar2; memcpy(__dest,__src,(ulong)uVar2); iVar5 = ma_encrypt(local_20,*(int8 *)(local_20 + 0xc20),(long)__src + (ulong)uVar2, (long)__dest + (ulong)uVar2,iVar5,uVar3 & 0xffffffff, (ulong)CONCAT34(uVar4,uVar1),&local_2c); if (iVar5 == 0) { *(int4 *)((long)__dest + ((ulong)local_24 - 4)) = *(int4 *)((long)__src + ((ulong)local_24 - 4)); *(int4 *)((long)__dest + ((ulong)*(uint *)(local_20 + 0x744) - 8)) = local_2c; local_18[3] = *local_18; *local_18 = (long)__dest; local_9 = 0; } else { my_free(__dest); local_9 = 1; } } return local_9; }
40,106
mujoco::plugin::elasticity::String2Vector(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>&)
aimrt_mujoco_sim/_deps/mujoco-src/plugin/elasticity/elasticity.cc
void String2Vector(const std::string& txt, std::vector<int>& vec) { std::stringstream strm(txt); vec.clear(); while (!strm.eof()) { int num; strm >> num; if (strm.fail()) { break; } else { vec.push_back(num); } } }
O0
cpp
mujoco::plugin::elasticity::String2Vector(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<int, std::allocator<int>>&): subq $0x1b8, %rsp # imm = 0x1B8 movq %rdi, 0x1b0(%rsp) movq %rsi, 0x1a8(%rsp) movq 0x1b0(%rsp), %rax movq %rax, 0x8(%rsp) movl $0x10, %edi movl $0x8, %esi callq 0x5750 movq 0x8(%rsp), %rsi movl %eax, %edx leaq 0x20(%rsp), %rdi callq 0x5760 movq 0x1a8(%rsp), %rdi callq 0xb480 movq 0x20(%rsp), %rax movq -0x18(%rax), %rax leaq 0x20(%rsp,%rax), %rdi callq 0x5770 movb %al, 0x7(%rsp) jmp 0xb3ca movb 0x7(%rsp), %al xorb $-0x1, %al testb $0x1, %al jne 0xb3d6 jmp 0xb441 leaq 0x20(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0x5780 jmp 0xb3e7 movq 0x20(%rsp), %rax movq -0x18(%rax), %rax leaq 0x20(%rsp,%rax), %rdi callq 0x5790 movb %al, 0x6(%rsp) jmp 0xb400 movb 0x6(%rsp), %al testb $0x1, %al jne 0xb40a jmp 0xb426 jmp 0xb441 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x20(%rsp), %rdi callq 0x57a0 jmp 0xb453 movq 0x1a8(%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xb4a0 jmp 0xb43a jmp 0xb43c jmp 0xb3b1 leaq 0x20(%rsp), %rdi callq 0x57a0 addq $0x1b8, %rsp # imm = 0x1B8 retq movq 0x18(%rsp), %rdi callq 0x5180 nopl (%rax)
_ZN6mujoco6plugin10elasticity13String2VectorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorIiSaIiEE: sub rsp, 1B8h mov [rsp+1B8h+var_8], rdi mov [rsp+1B8h+var_10], rsi mov rax, [rsp+1B8h+var_8] mov [rsp+1B8h+var_1B0], rax mov edi, 10h mov esi, 8 call __ZStorSt13_Ios_OpenmodeS_; std::operator|(std::_Ios_Openmode,std::_Ios_Openmode) mov rsi, [rsp+1B8h+var_1B0] mov edx, eax lea rdi, [rsp+1B8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(std::string const&,std::_Ios_Openmode) mov rdi, [rsp+1B8h+var_10] call _ZNSt6vectorIiSaIiEE5clearEv; std::vector<int>::clear(void) loc_B3B1: mov rax, [rsp+1B8h+var_198] mov rax, [rax-18h] lea rdi, [rsp+rax+1B8h+var_198] call __ZNKSt9basic_iosIcSt11char_traitsIcEE3eofEv; std::ios::eof(void) mov [rsp+1B8h+var_1B1], al jmp short $+2 loc_B3CA: mov al, [rsp+1B8h+var_1B1] xor al, 0FFh test al, 1 jnz short loc_B3D6 jmp short loc_B441 loc_B3D6: lea rdi, [rsp+1B8h+var_198] lea rsi, [rsp+1B8h+var_1A8] call __ZNSirsERi; std::istream::operator>>(int &) jmp short $+2 loc_B3E7: mov rax, [rsp+1B8h+var_198] mov rax, [rax-18h] lea rdi, [rsp+rax+1B8h+var_198] call __ZNKSt9basic_iosIcSt11char_traitsIcEE4failEv; std::ios::fail(void) mov [rsp+1B8h+var_1B2], al jmp short $+2 loc_B400: mov al, [rsp+1B8h+var_1B2] test al, 1 jnz short loc_B40A jmp short loc_B426 loc_B40A: jmp short loc_B441 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_18] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() jmp short loc_B453 loc_B426: mov rdi, [rsp+1B8h+var_10] lea rsi, [rsp+1B8h+var_1A8] call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) jmp short $+2 loc_B43A: jmp short $+2 loc_B43C: jmp loc_B3B1 loc_B441: lea rdi, [rsp+1B8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() add rsp, 1B8h retn loc_B453: mov rdi, [rsp+arg_10] call __Unwind_Resume
long long mujoco::plugin::elasticity::String2Vector(long long a1, long long a2) { unsigned int v2; // eax _BYTE v4[16]; // [rsp+10h] [rbp-1A8h] BYREF _QWORD v5[49]; // [rsp+20h] [rbp-198h] BYREF long long v6; // [rsp+1A8h] [rbp-10h] long long v7; // [rsp+1B0h] [rbp-8h] v7 = a1; v6 = a2; v2 = std::operator|(16LL, 8LL); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v5, a1, v2); std::vector<int>::clear(v6); while ( (std::ios::eof((char *)v5 + *(_QWORD *)(v5[0] - 24LL)) & 1) == 0 ) { std::istream::operator>>(v5, v4); if ( (std::ios::fail((char *)v5 + *(_QWORD *)(v5[0] - 24LL)) & 1) != 0 ) break; std::vector<int>::push_back(v6, v4); } return std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v5); }
String2Vector: SUB RSP,0x1b8 MOV qword ptr [RSP + 0x1b0],RDI MOV qword ptr [RSP + 0x1a8],RSI MOV RAX,qword ptr [RSP + 0x1b0] MOV qword ptr [RSP + 0x8],RAX MOV EDI,0x10 MOV ESI,0x8 CALL 0x00105750 MOV RSI,qword ptr [RSP + 0x8] MOV EDX,EAX LEA RDI,[RSP + 0x20] CALL 0x00105760 MOV RDI,qword ptr [RSP + 0x1a8] CALL 0x0010b480 LAB_0010b3b1: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[RSP + RAX*0x1 + 0x20] LAB_0010b3bf: CALL 0x00105770 MOV byte ptr [RSP + 0x7],AL JMP 0x0010b3ca LAB_0010b3ca: MOV AL,byte ptr [RSP + 0x7] XOR AL,0xff TEST AL,0x1 JNZ 0x0010b3d6 JMP 0x0010b441 LAB_0010b3d6: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x10] CALL 0x00105780 JMP 0x0010b3e7 LAB_0010b3e7: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[RSP + RAX*0x1 + 0x20] CALL 0x00105790 MOV byte ptr [RSP + 0x6],AL JMP 0x0010b400 LAB_0010b400: MOV AL,byte ptr [RSP + 0x6] TEST AL,0x1 JNZ 0x0010b40a JMP 0x0010b426 LAB_0010b40a: JMP 0x0010b441 LAB_0010b426: MOV RDI,qword ptr [RSP + 0x1a8] LEA RSI,[RSP + 0x10] CALL 0x0010b4a0 LAB_0010b438: JMP 0x0010b43a LAB_0010b43a: JMP 0x0010b43c LAB_0010b43c: JMP 0x0010b3b1 LAB_0010b441: LEA RDI,[RSP + 0x20] CALL 0x001057a0 ADD RSP,0x1b8 RET
/* mujoco::plugin::elasticity::String2Vector(std::__cxx11::string const&, std::vector<int, std::allocator<int> >&) */ void mujoco::plugin::elasticity::String2Vector(string *param_1,vector *param_2) { byte bVar1; int4 uVar2; int local_1a8 [4]; stringstream local_198 [392]; vector *local_10; string *local_8; local_10 = param_2; local_8 = param_1; uVar2 = std::operator|(0x10,8); std::__cxx11::stringstream::stringstream(local_198,param_1,uVar2); std::vector<int,std::allocator<int>>::clear((vector<int,std::allocator<int>> *)local_10); /* try { // try from 0010b3bf to 0010b437 has its CatchHandler @ 0010b40c */ while (bVar1 = std::ios::eof(), ((bVar1 ^ 0xff) & 1) != 0) { std::istream::operator>>((istream *)local_198,local_1a8); bVar1 = std::ios::fail(); if ((bVar1 & 1) != 0) break; std::vector<int,std::allocator<int>>::push_back ((vector<int,std::allocator<int>> *)local_10,local_1a8); } std::__cxx11::stringstream::~stringstream(local_198); return; }
40,107
ulight::equals_ascii_ignore_case(std::basic_string_view<char8_t, std::char_traits<char8_t>>, std::basic_string_view<char8_t, std::char_traits<char8_t>>)
ulight/include/ulight/impl/strings.hpp
[[nodiscard]] constexpr bool equals_ascii_ignore_case(std::u8string_view x, std::u8string_view y) { if (x.length() != y.length()) { return false; } for (std::size_t i = 0; i < x.length(); ++i) { if (to_ascii_upper(x[i]) != to_ascii_upper(y[i])) { return false; } } return true; }
O0
cpp
ulight::equals_ascii_ignore_case(std::basic_string_view<char8_t, std::char_traits<char8_t>>, std::basic_string_view<char8_t, std::char_traits<char8_t>>): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x28(%rbp) movq %rcx, -0x20(%rbp) leaq -0x18(%rbp), %rdi callq 0x6d60 movq %rax, -0x38(%rbp) leaq -0x28(%rbp), %rdi callq 0x6d60 movq %rax, %rcx movq -0x38(%rbp), %rax cmpq %rcx, %rax je 0xf710 movb $0x0, -0x1(%rbp) jmp 0xf78b movq $0x0, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) leaq -0x18(%rbp), %rdi callq 0x6d60 movq %rax, %rcx movq -0x40(%rbp), %rax cmpq %rcx, %rax jae 0xf787 movq -0x30(%rbp), %rsi leaq -0x18(%rbp), %rdi callq 0xb3a0 movzbl (%rax), %edi callq 0xf910 movzbl %al, %eax movl %eax, -0x44(%rbp) movq -0x30(%rbp), %rsi leaq -0x28(%rbp), %rdi callq 0xb3a0 movzbl (%rax), %edi callq 0xf910 movb %al, %cl movl -0x44(%rbp), %eax movzbl %cl, %ecx cmpl %ecx, %eax je 0xf777 movb $0x0, -0x1(%rbp) jmp 0xf78b jmp 0xf779 movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0xf718 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN6ulight24equals_ascii_ignore_caseESt17basic_string_viewIDuSt11char_traitsIDuEES3_: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_18], rdi mov [rbp+var_10], rsi mov [rbp+var_28], rdx mov [rbp+var_20], rcx lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6lengthEv; std::u8string_view::length(void) mov [rbp+var_38], rax lea rdi, [rbp+var_28] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6lengthEv; std::u8string_view::length(void) mov rcx, rax mov rax, [rbp+var_38] cmp rax, rcx jz short loc_F710 mov [rbp+var_1], 0 jmp short loc_F78B loc_F710: mov [rbp+var_30], 0 loc_F718: mov rax, [rbp+var_30] mov [rbp+var_40], rax lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEE6lengthEv; std::u8string_view::length(void) mov rcx, rax mov rax, [rbp+var_40] cmp rax, rcx jnb short loc_F787 mov rsi, [rbp+var_30] lea rdi, [rbp+var_18] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEEixEm; std::u8string_view::operator[](ulong) movzx edi, byte ptr [rax] call _ZN6ulight14to_ascii_upperEDu; ulight::to_ascii_upper(char8_t) movzx eax, al mov [rbp+var_44], eax mov rsi, [rbp+var_30] lea rdi, [rbp+var_28] call _ZNKSt17basic_string_viewIDuSt11char_traitsIDuEEixEm; std::u8string_view::operator[](ulong) movzx edi, byte ptr [rax] call _ZN6ulight14to_ascii_upperEDu; ulight::to_ascii_upper(char8_t) mov cl, al mov eax, [rbp+var_44] movzx ecx, cl cmp eax, ecx jz short loc_F777 mov [rbp+var_1], 0 jmp short loc_F78B loc_F777: jmp short $+2 loc_F779: mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_F718 loc_F787: mov [rbp+var_1], 1 loc_F78B: mov al, [rbp+var_1] and al, 1 add rsp, 50h pop rbp retn
char ulight::equals_ascii_ignore_case(long long a1, long long a2, long long a3, long long a4) { unsigned __int8 *v4; // rax unsigned __int8 *v5; // rax int v7; // [rsp+Ch] [rbp-44h] long long v8; // [rsp+18h] [rbp-38h] unsigned long long i; // [rsp+20h] [rbp-30h] _QWORD v10[2]; // [rsp+28h] [rbp-28h] BYREF _QWORD v11[2]; // [rsp+38h] [rbp-18h] BYREF v11[0] = a1; v11[1] = a2; v10[0] = a3; v10[1] = a4; v8 = std::u8string_view::length((long long)v11); if ( v8 != std::u8string_view::length((long long)v10) ) return 0; for ( i = 0LL; i < std::u8string_view::length((long long)v11); ++i ) { v4 = (unsigned __int8 *)std::u8string_view::operator[]((long long)v11, i); v7 = (unsigned __int8)ulight::to_ascii_upper(*v4); v5 = (unsigned __int8 *)std::u8string_view::operator[]((long long)v10, i); if ( v7 != (unsigned __int8)ulight::to_ascii_upper(*v5) ) return 0; } return 1; }
equals_ascii_ignore_case: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x28],RDX MOV qword ptr [RBP + -0x20],RCX LEA RDI,[RBP + -0x18] CALL 0x00106d60 MOV qword ptr [RBP + -0x38],RAX LEA RDI,[RBP + -0x28] CALL 0x00106d60 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,RCX JZ 0x0010f710 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0010f78b LAB_0010f710: MOV qword ptr [RBP + -0x30],0x0 LAB_0010f718: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX LEA RDI,[RBP + -0x18] CALL 0x00106d60 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] CMP RAX,RCX JNC 0x0010f787 MOV RSI,qword ptr [RBP + -0x30] LEA RDI,[RBP + -0x18] CALL 0x0010b3a0 MOVZX EDI,byte ptr [RAX] CALL 0x0010f910 MOVZX EAX,AL MOV dword ptr [RBP + -0x44],EAX MOV RSI,qword ptr [RBP + -0x30] LEA RDI,[RBP + -0x28] CALL 0x0010b3a0 MOVZX EDI,byte ptr [RAX] CALL 0x0010f910 MOV CL,AL MOV EAX,dword ptr [RBP + -0x44] MOVZX ECX,CL CMP EAX,ECX JZ 0x0010f777 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0010f78b LAB_0010f777: JMP 0x0010f779 LAB_0010f779: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x0010f718 LAB_0010f787: MOV byte ptr [RBP + -0x1],0x1 LAB_0010f78b: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x50 POP RBP RET
/* ulight::equals_ascii_ignore_case(std::basic_string_view<char8_t, std::char_traits<char8_t> >, std::basic_string_view<char8_t, std::char_traits<char8_t> >) */ int1 ulight::equals_ascii_ignore_case (int8 param_1,int8 param_2,int8 param_3,int8 param_4) { char cVar1; char cVar2; long lVar3; long lVar4; ulong uVar5; uchar *puVar6; ulong local_38; int8 local_30; int8 local_28; int8 local_20; int8 local_18; int1 local_9; local_30 = param_3; local_28 = param_4; local_20 = param_1; local_18 = param_2; lVar3 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::length ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20); lVar4 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::length ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_30); if (lVar3 == lVar4) { for (local_38 = 0; uVar5 = std::basic_string_view<char8_t,std::char_traits<char8_t>>::length ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20), local_38 < uVar5; local_38 = local_38 + 1) { puVar6 = (uchar *)std::basic_string_view<char8_t,std::char_traits<char8_t>>::operator[] ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_20 ,local_38); cVar1 = to_ascii_upper(*puVar6); puVar6 = (uchar *)std::basic_string_view<char8_t,std::char_traits<char8_t>>::operator[] ((basic_string_view<char8_t,std::char_traits<char8_t>> *)&local_30 ,local_38); cVar2 = to_ascii_upper(*puVar6); if (cVar1 != cVar2) { return 0; } } local_9 = 1; } else { local_9 = 0; } return local_9; }
40,108
sp_condition_value::equals(sp_condition_value const*) const
eloqsql/sql/sp_pcontext.cc
bool sp_condition_value::equals(const sp_condition_value *cv) const { DBUG_ASSERT(cv); /* The following test disallows duplicate handlers, including user defined exceptions with the same WHEN clause: DECLARE a EXCEPTION; b EXCEPTION; BEGIN RAUSE a; EXCEPTION WHEN a THEN RETURN 'a0'; WHEN a THEN RETURN 'a1'; END */ if (this == cv) return true; /* The test below considers two conditions of the same type as equal (except for the user defined exceptions) to avoid declaring duplicate handlers. All user defined conditions have type==SQLSTATE with the same SQL state and error code. It's OK to have multiple user defined conditions: DECLARE a EXCEPTION; b EXCEPTION; BEGIN RAISE a; EXCEPTION WHEN a THEN RETURN 'a'; WHEN b THEN RETURN 'b'; END; */ if (type != cv->type || m_is_user_defined || cv->m_is_user_defined) return false; switch (type) { case sp_condition_value::ERROR_CODE: return (get_sql_errno() == cv->get_sql_errno()); case sp_condition_value::SQLSTATE: return Sql_state::eq(cv); default: return true; } }
O0
cpp
sp_condition_value::equals(sp_condition_value const*) const: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x91329a movq -0x20(%rbp), %rax cmpq -0x18(%rbp), %rax jne 0x9132ad movb $0x1, -0x1(%rbp) jmp 0x91332f movq -0x20(%rbp), %rax movl 0x10(%rax), %eax movq -0x18(%rbp), %rcx cmpl 0x10(%rcx), %eax jne 0x9132d1 movq -0x20(%rbp), %rax testb $0x1, 0xc(%rax) jne 0x9132d1 movq -0x18(%rbp), %rax testb $0x1, 0xc(%rax) je 0x9132d7 movb $0x0, -0x1(%rbp) jmp 0x91332f movq -0x20(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x24(%rbp) testl %eax, %eax je 0x9132f1 jmp 0x9132e7 movl -0x24(%rbp), %eax subl $0x1, %eax je 0x913317 jmp 0x91332b movq -0x20(%rbp), %rdi callq 0x856c10 movl %eax, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0x856c10 movl %eax, %ecx movl -0x28(%rbp), %eax cmpl %ecx, %eax sete %al andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x91332f movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x914fa0 andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x91332f movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
_ZNK18sp_condition_value6equalsEPKS_: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_20], rax jmp short $+2 loc_91329A: mov rax, [rbp+var_20] cmp rax, [rbp+var_18] jnz short loc_9132AD mov [rbp+var_1], 1 jmp loc_91332F loc_9132AD: mov rax, [rbp+var_20] mov eax, [rax+10h] mov rcx, [rbp+var_18] cmp eax, [rcx+10h] jnz short loc_9132D1 mov rax, [rbp+var_20] test byte ptr [rax+0Ch], 1 jnz short loc_9132D1 mov rax, [rbp+var_18] test byte ptr [rax+0Ch], 1 jz short loc_9132D7 loc_9132D1: mov [rbp+var_1], 0 jmp short loc_91332F loc_9132D7: mov rax, [rbp+var_20] mov eax, [rax+10h] mov [rbp+var_24], eax test eax, eax jz short loc_9132F1 jmp short $+2 loc_9132E7: mov eax, [rbp+var_24] sub eax, 1 jz short loc_913317 jmp short loc_91332B loc_9132F1: mov rdi, [rbp+var_20]; this call _ZNK15Sql_state_errno13get_sql_errnoEv; Sql_state_errno::get_sql_errno(void) mov [rbp+var_28], eax mov rdi, [rbp+var_18]; this call _ZNK15Sql_state_errno13get_sql_errnoEv; Sql_state_errno::get_sql_errno(void) mov ecx, eax mov eax, [rbp+var_28] cmp eax, ecx setz al and al, 1 mov [rbp+var_1], al jmp short loc_91332F loc_913317: mov rdi, [rbp+var_20]; this mov rsi, [rbp+var_18]; Sql_state * call _ZNK9Sql_state2eqEPKS_; Sql_state::eq(Sql_state const*) and al, 1 mov [rbp+var_1], al jmp short loc_91332F loc_91332B: mov [rbp+var_1], 1 loc_91332F: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char sp_condition_value::equals(sp_condition_value *this, const sp_condition_value *a2) { int sql_errno; // [rsp+8h] [rbp-28h] int v4; // [rsp+Ch] [rbp-24h] char v5; // [rsp+2Fh] [rbp-1h] if ( this == a2 ) { v5 = 1; } else if ( *((_DWORD *)this + 4) != *((_DWORD *)a2 + 4) || (*((_BYTE *)this + 12) & 1) != 0 || (*((_BYTE *)a2 + 12) & 1) != 0 ) { v5 = 0; } else { v4 = *((_DWORD *)this + 4); if ( v4 ) { if ( v4 == 1 ) v5 = Sql_state::eq(this, a2) & 1; else v5 = 1; } else { sql_errno = Sql_state_errno::get_sql_errno(this); v5 = sql_errno == (unsigned int)Sql_state_errno::get_sql_errno(a2); } } return v5 & 1; }
xb_fil_cur_close: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x4b8],0x0 JZ 0x009132b6 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x4b8] MOV RAX,qword ptr [RAX + 0x10] MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x4c0 CALL RAX LAB_009132b6: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x4f8] CALL 0x008fdf50 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x4f8],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x009132fb MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x00913e30 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0xffffffff CALL 0x00900b60 LAB_009132fb: ADD RSP,0x10 POP RBP RET
/* xb_fil_cur_close(xb_fil_cur_t*) */ void xb_fil_cur_close(xb_fil_cur_t *param_1) { if (*(long *)(param_1 + 0x4b8) != 0) { (**(code **)(*(long *)(param_1 + 0x4b8) + 0x10))(param_1 + 0x4c0); } aligned_free(*(void **)(param_1 + 0x4f8)); *(int8 *)(param_1 + 0x4f8) = 0; if (*(long *)(param_1 + 0x10) != 0) { xb_fil_node_close_file(*(fil_node_t **)(param_1 + 0x10)); pfs_os_file_t::operator=((pfs_os_file_t *)param_1,-1); } return; }
40,109
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ssize_t ReadFromOffset(const int fd, void* buf, const size_t count, const size_t offset) { NGLOG_SAFE_ASSERT(fd >= 0); NGLOG_SAFE_ASSERT(count <= static_cast<size_t>(std::numeric_limits<ssize_t>::max())); char* buf0 = reinterpret_cast<char*>(buf); size_t num_bytes = 0; while (num_bytes < count) { ssize_t len = FailureRetry([fd, p = buf0 + num_bytes, n = count - num_bytes, m = static_cast<off_t>(offset + num_bytes)] { return pread(fd, p, n, m); }); if (len < 0) { // There was an error other than EINTR. return -1; } if (len == 0) { // Reached EOF. break; } num_bytes += static_cast<size_t>(len); } NGLOG_SAFE_ASSERT(num_bytes <= count); return static_cast<ssize_t>(num_bytes); }
O3
cpp
nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testl %edi, %edi js 0x22042 testq %rdx, %rdx js 0x22042 movl %edi, %ebp xorl %r14d, %r14d movq %rdx, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq %rdx, %r13 subq %r14, %r13 jbe 0x2203d leaq (%rsi,%r14), %r15 movq %rcx, %rbx leaq (%r14,%rcx), %r12 movl %ebp, %edi movq %r15, %rsi movq %r13, %rdx movq %r12, %rcx callq 0x7670 cmpq $-0x1, %rax jne 0x22008 callq 0x7040 cmpl $0x4, (%rax) je 0x21fe6 jmp 0x22047 xorl %ecx, %ecx testq %rax, %rax sete %cl leal (%rcx,%rcx,2), %edi movl $0x0, %ecx cmovleq %rcx, %rax movl $0x1, %ecx cmovsl %ecx, %edi addq %rax, %r14 testl %edi, %edi movq %rbx, %rcx movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rsi je 0x21fd3 cmpl $0x3, %edi jne 0x22047 cmpq %rdx, %r14 jbe 0x2204e callq 0x72a0 movq $-0x1, %r14 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN5nglog5toolsL14ReadFromOffsetEiPvmm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test edi, edi js loc_22042 test rdx, rdx js short loc_22042 mov ebp, edi xor r14d, r14d mov [rsp+48h+var_38], rdx mov [rsp+48h+var_40], rsi loc_21FD3: mov r13, rdx sub r13, r14 jbe short loc_2203D lea r15, [rsi+r14] mov rbx, rcx lea r12, [r14+rcx] loc_21FE6: mov edi, ebp mov rsi, r15 mov rdx, r13 mov rcx, r12 call _pread cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_22008 call ___errno_location cmp dword ptr [rax], 4 jz short loc_21FE6 jmp short loc_22047 loc_22008: xor ecx, ecx test rax, rax setz cl lea edi, [rcx+rcx*2] mov ecx, 0 cmovle rax, rcx mov ecx, 1 cmovs edi, ecx add r14, rax test edi, edi mov rcx, rbx mov rdx, [rsp+48h+var_38] mov rsi, [rsp+48h+var_40] jz short loc_21FD3 cmp edi, 3 jnz short loc_22047 loc_2203D: cmp r14, rdx jbe short loc_2204E loc_22042: call _abort loc_22047: mov r14, 0FFFFFFFFFFFFFFFFh loc_2204E: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long nglog::tools::ReadFromOffset(unsigned long long this, long long a2, char *a3, long long a4) { unsigned int v4; // ebp unsigned long long v5; // r14 char *v6; // r13 long long v7; // rbx long long v8; // r12 long long v9; // rax bool v10; // sf long long v12; // [rsp+8h] [rbp-40h] char *v13; // [rsp+10h] [rbp-38h] if ( (this & 0x80000000) != 0LL || (long long)a3 < 0 ) LABEL_16: abort(this); v4 = this; v5 = 0LL; v13 = a3; v12 = a2; do { v6 = &a3[-v5]; if ( (unsigned long long)a3 <= v5 ) goto LABEL_15; v7 = a4; v8 = v5 + a4; while ( 1 ) { v9 = pread(v4, a2 + v5, v6, v8); if ( v9 != -1 ) break; if ( *(_DWORD *)__errno_location(v4) != 4 ) return -1LL; } v10 = v9 < 0; this = 3 * (unsigned int)(v9 == 0); if ( v9 <= 0 ) v9 = 0LL; if ( v10 ) this = 1LL; v5 += v9; a4 = v7; a3 = v13; a2 = v12; } while ( !(_DWORD)this ); if ( (_DWORD)this != 3 ) return -1LL; LABEL_15: if ( v5 > (unsigned long long)a3 ) goto LABEL_16; return v5; }
ReadFromOffset: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST EDI,EDI JS 0x00122042 TEST RDX,RDX JS 0x00122042 MOV EBP,EDI XOR R14D,R14D MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x8],RSI LAB_00121fd3: MOV R13,RDX SUB R13,R14 JBE 0x0012203d LEA R15,[RSI + R14*0x1] MOV RBX,RCX LEA R12,[R14 + RCX*0x1] LAB_00121fe6: MOV EDI,EBP MOV RSI,R15 MOV RDX,R13 MOV RCX,R12 CALL 0x00107670 CMP RAX,-0x1 JNZ 0x00122008 CALL 0x00107040 CMP dword ptr [RAX],0x4 JZ 0x00121fe6 JMP 0x00122047 LAB_00122008: XOR ECX,ECX TEST RAX,RAX SETZ CL LEA EDI,[RCX + RCX*0x2] MOV ECX,0x0 CMOVLE RAX,RCX MOV ECX,0x1 CMOVS EDI,ECX ADD R14,RAX TEST EDI,EDI MOV RCX,RBX MOV RDX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] JZ 0x00121fd3 CMP EDI,0x3 JNZ 0x00122047 LAB_0012203d: CMP R14,RDX JBE 0x0012204e LAB_00122042: CALL 0x001072a0 LAB_00122047: MOV R14,-0x1 LAB_0012204e: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::tools::ReadFromOffset(int, void*, unsigned long, unsigned long) */ ulong nglog::tools::ReadFromOffset(int param_1,void *param_2,ulong param_3,ulong param_4) { char cVar1; long lVar2; int *piVar3; ulong uVar4; bool bVar5; bool bVar6; if ((-1 < param_1) && (-1 < (long)param_3)) { uVar4 = 0; do { if (param_3 < uVar4 || param_3 - uVar4 == 0) goto LAB_0012203d; while (lVar2 = pread(param_1,(void *)((long)param_2 + uVar4),param_3 - uVar4,uVar4 + param_4), lVar2 == -1) { piVar3 = __errno_location(); if (*piVar3 != 4) goto LAB_00122047; } bVar6 = lVar2 < 0; bVar5 = lVar2 == 0; if (lVar2 < 1) { lVar2 = 0; } cVar1 = bVar5 * '\x03'; if (bVar6) { cVar1 = '\x01'; } uVar4 = uVar4 + lVar2; } while (cVar1 == '\0'); if (cVar1 == '\x03') { LAB_0012203d: if (param_3 < uVar4) goto LAB_00122042; } else { LAB_00122047: uVar4 = 0xffffffffffffffff; } return uVar4; } LAB_00122042: /* WARNING: Subroutine does not return */ abort(); }
40,110
pvio_socket_shutdown
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_shutdown(MARIADB_PVIO *pvio) { if (pvio && pvio->data) { my_socket s = ((struct st_pvio_socket *)pvio->data)->socket; #ifdef _WIN32 shutdown(s, SD_BOTH); CancelIoEx((HANDLE)s, NULL); #else shutdown(s, SHUT_RDWR); #endif } return -1; }
O0
c
pvio_socket_shutdown: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x740a6 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x740a6 movq -0x8(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %edi movl $0x2, %esi callq 0x385e0 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pvio_socket_shutdown: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz short loc_740A6 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_740A6 mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax] mov [rbp+var_C], eax mov edi, [rbp+var_C] mov esi, 2 call _shutdown loc_740A6: mov eax, 0FFFFFFFFh add rsp, 10h pop rbp retn
long long pvio_socket_shutdown(_QWORD *a1) { if ( a1 && *a1 ) shutdown(*(unsigned int *)*a1, 2LL); return 0xFFFFFFFFLL; }
pvio_socket_shutdown: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x001740a6 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x001740a6 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xc],EAX MOV EDI,dword ptr [RBP + -0xc] MOV ESI,0x2 CALL 0x001385e0 LAB_001740a6: MOV EAX,0xffffffff ADD RSP,0x10 POP RBP RET
int8 pvio_socket_shutdown(long *param_1) { if ((param_1 != (long *)0x0) && (*param_1 != 0)) { shutdown(*(int *)*param_1,2); } return 0xffffffff; }
40,111
wqueue_release_one_locktype_from_queue
eloqsql/mysys/wqueue.c
void wqueue_release_one_locktype_from_queue(WQUEUE *wqueue) { struct st_my_thread_var *last= wqueue->last_thread; struct st_my_thread_var *next= last->next; struct st_my_thread_var *thread; struct st_my_thread_var *new_list= NULL; uint first_type= next->lock_type; if (first_type == MY_PTHREAD_LOCK_WRITE) { /* release first waiting for write lock */ mysql_cond_signal(&next->suspend); if (next == last) wqueue->last_thread= NULL; else last->next= next->next; next->next= NULL; return; } do { thread= next; next= thread->next; if (thread->lock_type == MY_PTHREAD_LOCK_WRITE) { /* skip waiting for write lock */ if (new_list) { thread->next= new_list->next; new_list= new_list->next= thread; } else new_list= thread->next= thread; } else { /* release waiting for read lock */ mysql_cond_signal(&thread->suspend); thread->next= NULL; } } while (thread != last); wqueue->last_thread= new_list; }
O0
c
wqueue_release_one_locktype_from_queue: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x88(%rax), %rax movq %rax, -0x18(%rbp) movq $0x0, -0x28(%rbp) movq -0x18(%rbp), %rax movl 0xe4(%rax), %eax movl %eax, -0x2c(%rbp) cmpl $0x1, -0x2c(%rbp) jne 0xca65f movq -0x18(%rbp), %rdi addq $0x8, %rdi callq 0xca570 movq -0x18(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0xca635 movq -0x8(%rbp), %rax movq $0x0, (%rax) jmp 0xca64b movq -0x18(%rbp), %rax movq 0x88(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x18(%rbp), %rax movq $0x0, 0x88(%rax) jmp 0xca703 jmp 0xca661 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x88(%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax cmpl $0x1, 0xe4(%rax) jne 0xca6cc cmpq $0x0, -0x28(%rbp) je 0xca6b7 movq -0x28(%rbp), %rax movq 0x88(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x20(%rbp), %rax movq -0x28(%rbp), %rcx movq %rax, 0x88(%rcx) movq %rax, -0x28(%rbp) jmp 0xca6ca movq -0x20(%rbp), %rax movq -0x20(%rbp), %rcx movq %rax, 0x88(%rcx) movq %rax, -0x28(%rbp) jmp 0xca6e8 movq -0x20(%rbp), %rdi addq $0x8, %rdi callq 0xca570 movq -0x20(%rbp), %rax movq $0x0, 0x88(%rax) jmp 0xca6ea movq -0x20(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0xca661 movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
wqueue_release_one_locktype_from_queue: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax+88h] mov [rbp+var_18], rax mov [rbp+var_28], 0 mov rax, [rbp+var_18] mov eax, [rax+0E4h] mov [rbp+var_2C], eax cmp [rbp+var_2C], 1 jnz short loc_CA65F mov rdi, [rbp+var_18] add rdi, 8 call inline_mysql_cond_signal_4 mov rax, [rbp+var_18] cmp rax, [rbp+var_10] jnz short loc_CA635 mov rax, [rbp+var_8] mov qword ptr [rax], 0 jmp short loc_CA64B loc_CA635: mov rax, [rbp+var_18] mov rcx, [rax+88h] mov rax, [rbp+var_10] mov [rax+88h], rcx loc_CA64B: mov rax, [rbp+var_18] mov qword ptr [rax+88h], 0 jmp loc_CA703 loc_CA65F: jmp short $+2 loc_CA661: mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax+88h] mov [rbp+var_18], rax mov rax, [rbp+var_20] cmp dword ptr [rax+0E4h], 1 jnz short loc_CA6CC cmp [rbp+var_28], 0 jz short loc_CA6B7 mov rax, [rbp+var_28] mov rcx, [rax+88h] mov rax, [rbp+var_20] mov [rax+88h], rcx mov rax, [rbp+var_20] mov rcx, [rbp+var_28] mov [rcx+88h], rax mov [rbp+var_28], rax jmp short loc_CA6CA loc_CA6B7: mov rax, [rbp+var_20] mov rcx, [rbp+var_20] mov [rcx+88h], rax mov [rbp+var_28], rax loc_CA6CA: jmp short loc_CA6E8 loc_CA6CC: mov rdi, [rbp+var_20] add rdi, 8 call inline_mysql_cond_signal_4 mov rax, [rbp+var_20] mov qword ptr [rax+88h], 0 loc_CA6E8: jmp short $+2 loc_CA6EA: mov rax, [rbp+var_20] cmp rax, [rbp+var_10] jnz loc_CA661 mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax], rcx loc_CA703: add rsp, 30h pop rbp retn
long long * wqueue_release_one_locktype_from_queue(long long **a1) { long long *result; // rax long long *v2; // rax _BYTE v3[12]; // [rsp+4h] [rbp-2Ch] long long *v4; // [rsp+10h] [rbp-20h] long long *v5; // [rsp+18h] [rbp-18h] long long *v6; // [rsp+20h] [rbp-10h] v6 = *a1; v5 = (long long *)(*a1)[17]; *(_DWORD *)&v3[8] = 0; *(_QWORD *)v3 = *((unsigned int *)v5 + 57); if ( *(_DWORD *)v3 == 1 ) { inline_mysql_cond_signal_4((long long)(v5 + 1)); if ( v5 == v6 ) *a1 = 0LL; else v6[17] = v5[17]; result = v5; v5[17] = 0LL; } else { do { v4 = v5; v5 = (long long *)v5[17]; if ( *((_DWORD *)v4 + 57) == 1 ) { if ( *(_QWORD *)&v3[4] ) { v4[17] = *(_QWORD *)(*(_QWORD *)&v3[4] + 136LL); v2 = v4; *(_QWORD *)(*(_QWORD *)&v3[4] + 136LL) = v4; } else { v2 = v4; v4[17] = (long long)v4; } *(_QWORD *)&v3[4] = v2; } else { inline_mysql_cond_signal_4((long long)(v4 + 1)); v4[17] = 0LL; } } while ( v4 != v6 ); result = (long long *)a1; *a1 = *(long long **)&v3[4]; } return result; }
wqueue_release_one_locktype_from_queue: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RBP + -0x18],RAX MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xe4] MOV dword ptr [RBP + -0x2c],EAX CMP dword ptr [RBP + -0x2c],0x1 JNZ 0x001ca65f MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x8 CALL 0x001ca570 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001ca635 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 JMP 0x001ca64b LAB_001ca635: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x88] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x88],RCX LAB_001ca64b: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x88],0x0 JMP 0x001ca703 LAB_001ca65f: JMP 0x001ca661 LAB_001ca661: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0xe4],0x1 JNZ 0x001ca6cc CMP qword ptr [RBP + -0x28],0x0 JZ 0x001ca6b7 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x88] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x88],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RCX + 0x88],RAX MOV qword ptr [RBP + -0x28],RAX JMP 0x001ca6ca LAB_001ca6b7: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV qword ptr [RCX + 0x88],RAX MOV qword ptr [RBP + -0x28],RAX LAB_001ca6ca: JMP 0x001ca6e8 LAB_001ca6cc: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x8 CALL 0x001ca570 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x88],0x0 LAB_001ca6e8: JMP 0x001ca6ea LAB_001ca6ea: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001ca661 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX LAB_001ca703: ADD RSP,0x30 POP RBP RET
void wqueue_release_one_locktype_from_queue(long *param_1) { long lVar1; long lVar2; bool bVar3; int8 local_30; int8 local_20; lVar1 = *param_1; local_20 = *(long *)(lVar1 + 0x88); local_30 = 0; if (*(int *)(local_20 + 0xe4) == 1) { inline_mysql_cond_signal(local_20 + 8); if (local_20 == lVar1) { *param_1 = 0; } else { *(int8 *)(lVar1 + 0x88) = *(int8 *)(local_20 + 0x88); } *(int8 *)(local_20 + 0x88) = 0; } else { do { lVar2 = *(long *)(local_20 + 0x88); if (*(int *)(local_20 + 0xe4) == 1) { if (local_30 == 0) { *(long *)(local_20 + 0x88) = local_20; } else { *(int8 *)(local_20 + 0x88) = *(int8 *)(local_30 + 0x88); *(long *)(local_30 + 0x88) = local_20; } local_30 = local_20; } else { inline_mysql_cond_signal(local_20 + 8); *(int8 *)(local_20 + 0x88) = 0; } bVar3 = local_20 != lVar1; local_20 = lVar2; } while (bVar3); *param_1 = local_30; } return; }
40,112
my_strnncollsp_tis620
eloqsql/strings/ctype-tis620.c
static int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), const uchar *a0, size_t a_length, const uchar *b0, size_t b_length) { uchar buf[80], *end, *a, *b, *alloced= NULL; size_t length; int res= 0; a= buf; if ((a_length + b_length +2) > (int) sizeof(buf)) alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE)); b= a + a_length+1; if (a_length) memcpy((char*) a, (char*) a0, a_length); a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */ if (b_length) memcpy((char *)b, (char *)b0, b_length); b[b_length]= 0; /* put end of string */ a_length= thai2sortable(a, a_length); b_length= thai2sortable(b, b_length); end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) { res= ((int) a[-1] - (int) b[-1]); goto ret; } } res= a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); ret: if (alloced) my_free(alloced); return res; }
O3
c
my_strnncollsp_tis620: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r8, %r14 movq %rcx, -0x90(%rbp) movq %rdx, %r15 movq %rsi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq (%rdx,%r8), %rsi addq $0x2, %rsi cmpq $0x51, %rsi jb 0xba974 movl $0x8, %edx xorl %edi, %edi callq 0xa2a95 movq %rax, %r12 movq %rax, -0x88(%rbp) jmp 0xba983 movq $0x0, -0x88(%rbp) leaq -0x80(%rbp), %r12 leaq (%r12,%r15), %r13 testq %r15, %r15 je 0xba99a movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x29090 leaq (%r12,%r15), %rbx incq %rbx movb $0x0, (%r13) testq %r14, %r14 je 0xba9bd movq %rbx, %rdi movq -0x90(%rbp), %rsi movq %r14, %rdx callq 0x29090 movb $0x0, (%rbx,%r14) movq %r12, %rdi movq %r15, %rsi callq 0xbab1b movq %rbx, %rdi movq %r14, %rsi callq 0xbab1b cmpq %r14, %r15 movq %r14, %rax cmovbq %r15, %rax leaq (%r12,%rax), %rcx cmpq %rcx, %r12 jae 0xbaa03 movzbl (%r12), %r13d movzbl 0x1(%r12,%r15), %edx incq %r12 cmpb %dl, %r13b je 0xba9e6 subl %edx, %r13d jmp 0xbaa38 xorl %r13d, %r13d cmpq %r14, %r15 je 0xbaa38 jae 0xbaa27 leaq (%r15,%r12), %rdi incq %rdi subq %rax, %r14 movq %r14, %rsi callq 0xaf031 movl %eax, %r13d negl %r13d jmp 0xbaa38 subq %rax, %r15 movq %r12, %rdi movq %r15, %rsi callq 0xaf031 movl %eax, %r13d movq -0x88(%rbp), %rdi testq %rdi, %rdi je 0xbaa49 callq 0xa2cc2 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0xbaa6a movl %r13d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29240
my_strnncollsp_tis620: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, r8 mov [rbp+var_90], rcx mov r15, rdx mov rbx, rsi mov rax, fs:28h mov [rbp+var_30], rax lea rsi, [rdx+r8] add rsi, 2 cmp rsi, 51h ; 'Q' jb short loc_BA974 mov edx, 8 xor edi, edi call my_malloc mov r12, rax mov [rbp+var_88], rax jmp short loc_BA983 loc_BA974: mov [rbp+var_88], 0 lea r12, [rbp+var_80] loc_BA983: lea r13, [r12+r15] test r15, r15 jz short loc_BA99A mov rdi, r12 mov rsi, rbx mov rdx, r15 call _memcpy loc_BA99A: lea rbx, [r12+r15] inc rbx mov byte ptr [r13+0], 0 test r14, r14 jz short loc_BA9BD mov rdi, rbx mov rsi, [rbp+var_90] mov rdx, r14 call _memcpy loc_BA9BD: mov byte ptr [rbx+r14], 0 mov rdi, r12 mov rsi, r15 call thai2sortable mov rdi, rbx mov rsi, r14 call thai2sortable cmp r15, r14 mov rax, r14 cmovb rax, r15 lea rcx, [r12+rax] loc_BA9E6: cmp r12, rcx jnb short loc_BAA03 movzx r13d, byte ptr [r12] movzx edx, byte ptr [r12+r15+1] inc r12 cmp r13b, dl jz short loc_BA9E6 sub r13d, edx jmp short loc_BAA38 loc_BAA03: xor r13d, r13d cmp r15, r14 jz short loc_BAA38 jnb short loc_BAA27 lea rdi, [r15+r12] inc rdi sub r14, rax mov rsi, r14 call my_strnncollsp_padspace_bin mov r13d, eax neg r13d jmp short loc_BAA38 loc_BAA27: sub r15, rax mov rdi, r12 mov rsi, r15 call my_strnncollsp_padspace_bin mov r13d, eax loc_BAA38: mov rdi, [rbp+var_88] test rdi, rdi jz short loc_BAA49 call my_free loc_BAA49: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_BAA6A mov eax, r13d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_BAA6A: call ___stack_chk_fail
long long my_strnncollsp_tis620(long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5) { unsigned long long v8; // rsi unsigned __int8 *v9; // r12 unsigned long long v10; // rax unsigned __int8 *v11; // rcx int v12; // r13d int v13; // edx unsigned int v14; // r13d long long v17; // [rsp+8h] [rbp-88h] char v18; // [rsp+10h] [rbp-80h] BYREF unsigned long long v19; // [rsp+60h] [rbp-30h] v19 = __readfsqword(0x28u); v8 = a3 + a5 + 2; if ( v8 < 0x51 ) { v17 = 0LL; v9 = (unsigned __int8 *)&v18; } else { v9 = (unsigned __int8 *)my_malloc(0, v8, 8); v17 = (long long)v9; } if ( a3 ) memcpy(v9, a2, a3); v9[a3] = 0; if ( a5 ) memcpy(&v9[a3 + 1], a4, a5); v9[a3 + 1 + a5] = 0; thai2sortable(v9, a3); thai2sortable(&v9[a3 + 1], a5); v10 = a5; if ( a3 < a5 ) v10 = a3; v11 = &v9[v10]; while ( v9 < v11 ) { v12 = *v9; v13 = v9[a3 + 1]; ++v9; if ( (_BYTE)v12 != (_BYTE)v13 ) { v14 = v12 - v13; goto LABEL_18; } } v14 = 0; if ( a3 != a5 ) { if ( a3 >= a5 ) v14 = my_strnncollsp_padspace_bin((long long)v9, a3 - v10); else v14 = -(int)my_strnncollsp_padspace_bin((long long)&v9[a3 + 1], a5 - v10); } LABEL_18: if ( v17 ) my_free(v17); return v14; }
my_strnncollsp_tis620: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,R8 MOV qword ptr [RBP + -0x90],RCX MOV R15,RDX MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RSI,[RDX + R8*0x1] ADD RSI,0x2 CMP RSI,0x51 JC 0x001ba974 MOV EDX,0x8 XOR EDI,EDI CALL 0x001a2a95 MOV R12,RAX MOV qword ptr [RBP + -0x88],RAX JMP 0x001ba983 LAB_001ba974: MOV qword ptr [RBP + -0x88],0x0 LEA R12,[RBP + -0x80] LAB_001ba983: LEA R13,[R12 + R15*0x1] TEST R15,R15 JZ 0x001ba99a MOV RDI,R12 MOV RSI,RBX MOV RDX,R15 CALL 0x00129090 LAB_001ba99a: LEA RBX,[R12 + R15*0x1] INC RBX MOV byte ptr [R13],0x0 TEST R14,R14 JZ 0x001ba9bd MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x90] MOV RDX,R14 CALL 0x00129090 LAB_001ba9bd: MOV byte ptr [RBX + R14*0x1],0x0 MOV RDI,R12 MOV RSI,R15 CALL 0x001bab1b MOV RDI,RBX MOV RSI,R14 CALL 0x001bab1b CMP R15,R14 MOV RAX,R14 CMOVC RAX,R15 LEA RCX,[R12 + RAX*0x1] LAB_001ba9e6: CMP R12,RCX JNC 0x001baa03 MOVZX R13D,byte ptr [R12] MOVZX EDX,byte ptr [R12 + R15*0x1 + 0x1] INC R12 CMP R13B,DL JZ 0x001ba9e6 SUB R13D,EDX JMP 0x001baa38 LAB_001baa03: XOR R13D,R13D CMP R15,R14 JZ 0x001baa38 JNC 0x001baa27 LEA RDI,[R15 + R12*0x1] INC RDI SUB R14,RAX MOV RSI,R14 CALL 0x001af031 MOV R13D,EAX NEG R13D JMP 0x001baa38 LAB_001baa27: SUB R15,RAX MOV RDI,R12 MOV RSI,R15 CALL 0x001af031 MOV R13D,EAX LAB_001baa38: MOV RDI,qword ptr [RBP + -0x88] TEST RDI,RDI JZ 0x001baa49 CALL 0x001a2cc2 LAB_001baa49: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001baa6a MOV EAX,R13D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001baa6a: CALL 0x00129240
int my_strnncollsp_tis620 (int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5) { byte *pbVar1; byte bVar2; byte *__dest; byte *pbVar3; ulong uVar4; int iVar5; long in_FS_OFFSET; byte *local_90; byte local_88 [80]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = param_3 + param_5 + 2; if (uVar4 < 0x51) { local_90 = (byte *)0x0; __dest = local_88; } else { __dest = (byte *)my_malloc(0,uVar4,8); local_90 = __dest; } if (param_3 != 0) { memcpy(__dest,param_2,param_3); } pbVar3 = __dest + param_3 + 1; __dest[param_3] = 0; if (param_5 != 0) { memcpy(pbVar3,param_4,param_5); } pbVar3[param_5] = 0; thai2sortable(__dest,param_3); thai2sortable(pbVar3,param_5); uVar4 = param_5; if (param_3 < param_5) { uVar4 = param_3; } pbVar3 = __dest + uVar4; do { if (pbVar3 <= __dest) { iVar5 = 0; if (param_3 != param_5) { if (param_3 < param_5) { iVar5 = my_strnncollsp_padspace_bin(__dest + param_3 + 1,param_5 - uVar4); iVar5 = -iVar5; } else { iVar5 = my_strnncollsp_padspace_bin(__dest,param_3 - uVar4); } } goto LAB_001baa38; } bVar2 = *__dest; pbVar1 = __dest + param_3 + 1; __dest = __dest + 1; } while (bVar2 == *pbVar1); iVar5 = (uint)bVar2 - (uint)*pbVar1; LAB_001baa38: if (local_90 != (byte *)0x0) { my_free(); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar5; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
40,113
mi_split_page
eloqsql/storage/myisam/mi_write.c
int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key, uchar *buff, uchar *key_buff, my_bool insert_last_key) { uint length,a_length,key_ref_length,t_length,nod_flag,key_length; uchar *key_pos,*pos, *UNINIT_VAR(after_key); my_off_t new_pos; MI_KEY_PARAM s_temp; DBUG_ENTER("mi_split_page"); DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); if (info->s->keyinfo+info->lastinx == keyinfo) info->page_changed=1; /* Info->buff is used */ info->buff_used=1; nod_flag=mi_test_if_nod(buff); key_ref_length=2+nod_flag; if (insert_last_key) key_pos=_mi_find_last_pos(keyinfo,buff,key_buff, &key_length, &after_key); else key_pos=_mi_find_half_pos(nod_flag,keyinfo,buff,key_buff, &key_length, &after_key); if (!key_pos) DBUG_RETURN(-1); length=(uint) (key_pos-buff); a_length=mi_getint(buff); mi_putint(buff,length,nod_flag); key_pos=after_key; if (nod_flag) { DBUG_PRINT("test",("Splitting nod")); pos=key_pos-nod_flag; memcpy((uchar*) info->buff+2,(uchar*) pos,(size_t) nod_flag); } /* Move middle item to key and pointer to new page */ if ((new_pos=_mi_new(info,keyinfo,DFLT_INIT_HITS)) == HA_OFFSET_ERROR) DBUG_RETURN(-1); _mi_kpointer(info,_mi_move_key(keyinfo,key,key_buff),new_pos); /* Store new page */ if (!(*keyinfo->get_key)(keyinfo,nod_flag,&key_pos,key_buff)) DBUG_RETURN(-1); t_length=(*keyinfo->pack_key)(keyinfo,nod_flag,(uchar *) 0, (uchar*) 0, (uchar*) 0, key_buff, &s_temp); length=(uint) ((buff+a_length)-key_pos); memcpy((uchar*) info->buff+key_ref_length+t_length,(uchar*) key_pos, (size_t) length); (*keyinfo->store_key)(keyinfo,info->buff+key_ref_length,&s_temp); mi_putint(info->buff,length+t_length+key_ref_length,nod_flag); if (_mi_write_keypage(info,keyinfo,new_pos,DFLT_INIT_HITS,info->buff)) DBUG_RETURN(-1); DBUG_DUMP("key",(uchar*) key,_mi_keylength(keyinfo,key)); DBUG_RETURN(2); /* Middle key up */ }
O0
c
mi_split_page: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movb %r9b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movb %al, -0x31(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x68(%rbp) jmp 0xc793f movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movq -0x10(%rbp), %rcx movslq 0x1d4(%rcx), %rcx imulq $0x70, %rcx, %rcx addq %rcx, %rax cmpq -0x18(%rbp), %rax jne 0xc7970 movq -0x10(%rbp), %rax movb $0x1, 0x33c(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x33d(%rax) movq -0x28(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc79a1 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0xc4(%rbp) jmp 0xc79ab xorl %eax, %eax movl %eax, -0xc4(%rbp) jmp 0xc79ab movl -0xc4(%rbp), %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %eax addl $0x2, %eax movl %eax, -0x40(%rbp) cmpb $0x0, -0x31(%rbp) je 0xc79e2 movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rdx leaq -0x4c(%rbp), %rcx leaq -0x68(%rbp), %r8 callq 0xc7ca0 movq %rax, -0x58(%rbp) jmp 0xc7a02 movl -0x48(%rbp), %edi movq -0x18(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx leaq -0x4c(%rbp), %r8 leaq -0x68(%rbp), %r9 callq 0xc7f70 movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) jne 0xc7a17 jmp 0xc7a0b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc7c8a movq -0x58(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movl %eax, -0x38(%rbp) movq -0x28(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x28(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, -0x3c(%rbp) movl -0x48(%rbp), %edx xorl %eax, %eax movl $0x8000, %ecx # imm = 0x8000 cmpl $0x0, %edx cmovnel %ecx, %eax movl -0x38(%rbp), %ecx movzwl %cx, %ecx addl %ecx, %eax movw %ax, -0xb2(%rbp) movzwl -0xb2(%rbp), %eax movl %eax, -0xb8(%rbp) movl -0xb8(%rbp), %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x1(%rax) movl -0xb8(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, (%rax) movq -0x68(%rbp), %rax movq %rax, -0x58(%rbp) cmpl $0x0, -0x48(%rbp) je 0xc7ada jmp 0xc7aa6 jmp 0xc7aa8 movq -0x58(%rbp), %rax movl -0x48(%rbp), %ecx movl %ecx, %edx xorl %ecx, %ecx subq %rdx, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movq 0x100(%rax), %rdi addq $0x2, %rdi movq -0x60(%rbp), %rsi movl -0x48(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl $0x3, %edx callq 0xbe4d0 movq %rax, -0x70(%rbp) cmpq $-0x1, %rax jne 0xc7b04 jmp 0xc7af8 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc7c8a movq -0x10(%rbp), %rax movq %rax, -0xd0(%rbp) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0xc1d70 movq -0xd0(%rbp), %rdi movq %rax, %rsi movq -0x70(%rbp), %rdx callq 0xc0600 movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x18(%rbp), %rdi movl -0x48(%rbp), %esi movq -0x30(%rbp), %rcx leaq -0x58(%rbp), %rdx callq *%rax cmpl $0x0, %eax jne 0xc7b5f jmp 0xc7b53 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc7c8a movq -0x18(%rbp), %rax movq 0x50(%rax), %rax movq -0x18(%rbp), %rdi movl -0x48(%rbp), %esi movq -0x30(%rbp), %r9 xorl %ecx, %ecx movl %ecx, %r8d leaq -0xb0(%rbp), %r10 movq %r8, %rdx movq %r8, %rcx movq %r10, (%rsp) callq *%rax movl %eax, -0x44(%rbp) movq -0x28(%rbp), %rax movl -0x3c(%rbp), %ecx addq %rcx, %rax movq -0x58(%rbp), %rcx subq %rcx, %rax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x100(%rax), %rdi movl -0x40(%rbp), %eax addq %rax, %rdi movl -0x44(%rbp), %eax addq %rax, %rdi movq -0x58(%rbp), %rsi movl -0x38(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x18(%rbp), %rax movq 0x58(%rax), %rax movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x100(%rcx), %rsi movl -0x40(%rbp), %ecx addq %rcx, %rsi leaq -0xb0(%rbp), %rdx callq *%rax movl -0x48(%rbp), %edx xorl %eax, %eax movl $0x8000, %ecx # imm = 0x8000 cmpl $0x0, %edx cmovnel %ecx, %eax movl -0x38(%rbp), %ecx addl -0x44(%rbp), %ecx addl -0x40(%rbp), %ecx movzwl %cx, %ecx addl %ecx, %eax movw %ax, -0xba(%rbp) movzwl -0xba(%rbp), %eax movl %eax, -0xc0(%rbp) movl -0xc0(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movb %cl, 0x1(%rax) movl -0xc0(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movq 0x100(%rax), %rax movb %cl, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x70(%rbp), %rdx movq -0x10(%rbp), %rax movq 0x100(%rax), %r8 movl $0x3, %ecx callq 0xbe1a0 cmpl $0x0, %eax je 0xc7c7d jmp 0xc7c74 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc7c8a jmp 0xc7c7f jmp 0xc7c81 jmp 0xc7c83 movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0xe0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_split_page: push rbp mov rbp, rsp sub rsp, 0E0h mov al, r9b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_31], al mov rax, [rbp+var_68] mov [rbp+var_68], rax jmp short $+2 loc_C793F: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+218h] mov rcx, [rbp+var_10] movsxd rcx, dword ptr [rcx+1D4h] imul rcx, 70h ; 'p' add rax, rcx cmp rax, [rbp+var_18] jnz short loc_C7970 mov rax, [rbp+var_10] mov byte ptr [rax+33Ch], 1 loc_C7970: mov rax, [rbp+var_10] mov byte ptr [rax+33Dh], 1 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C79A1 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_C4], eax jmp short loc_C79AB loc_C79A1: xor eax, eax mov [rbp+var_C4], eax jmp short $+2 loc_C79AB: mov eax, [rbp+var_C4] mov [rbp+var_48], eax mov eax, [rbp+var_48] add eax, 2 mov [rbp+var_40], eax cmp [rbp+var_31], 0 jz short loc_C79E2 mov rdi, [rbp+var_18] mov rsi, [rbp+var_28] mov rdx, [rbp+var_30] lea rcx, [rbp+var_4C] lea r8, [rbp+var_68] call _mi_find_last_pos mov [rbp+var_58], rax jmp short loc_C7A02 loc_C79E2: mov edi, [rbp+var_48] mov rsi, [rbp+var_18] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] lea r8, [rbp+var_4C] lea r9, [rbp+var_68] call _mi_find_half_pos mov [rbp+var_58], rax loc_C7A02: cmp [rbp+var_58], 0 jnz short loc_C7A17 jmp short $+2 loc_C7A0B: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C7C8A loc_C7A17: mov rax, [rbp+var_58] mov rcx, [rbp+var_28] sub rax, rcx mov [rbp+var_38], eax mov rax, [rbp+var_28] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_28] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov [rbp+var_3C], eax mov edx, [rbp+var_48] xor eax, eax mov ecx, 8000h cmp edx, 0 cmovnz eax, ecx mov ecx, [rbp+var_38] movzx ecx, cx add eax, ecx mov [rbp+var_B2], ax movzx eax, [rbp+var_B2] mov [rbp+var_B8], eax mov eax, [rbp+var_B8] mov cl, al mov rax, [rbp+var_28] mov [rax+1], cl mov eax, [rbp+var_B8] shr eax, 8 mov cl, al mov rax, [rbp+var_28] mov [rax], cl mov rax, [rbp+var_68] mov [rbp+var_58], rax cmp [rbp+var_48], 0 jz short loc_C7ADA jmp short $+2 loc_C7AA6: jmp short $+2 loc_C7AA8: mov rax, [rbp+var_58] mov ecx, [rbp+var_48] mov edx, ecx xor ecx, ecx sub rcx, rdx add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_10] mov rdi, [rax+100h] add rdi, 2 mov rsi, [rbp+var_60] mov eax, [rbp+var_48] mov edx, eax call _memcpy loc_C7ADA: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, 3 call _mi_new mov [rbp+var_70], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_C7B04 jmp short $+2 loc_C7AF8: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C7C8A loc_C7B04: mov rax, [rbp+var_10] mov [rbp+var_D0], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_30] call _mi_move_key mov rdi, [rbp+var_D0] mov rsi, rax mov rdx, [rbp+var_70] call _mi_kpointer mov rax, [rbp+var_18] mov rax, [rax+48h] mov rdi, [rbp+var_18] mov esi, [rbp+var_48] mov rcx, [rbp+var_30] lea rdx, [rbp+var_58] call rax cmp eax, 0 jnz short loc_C7B5F jmp short $+2 loc_C7B53: mov [rbp+var_4], 0FFFFFFFFh jmp loc_C7C8A loc_C7B5F: mov rax, [rbp+var_18] mov rax, [rax+50h] mov rdi, [rbp+var_18] mov esi, [rbp+var_48] mov r9, [rbp+var_30] xor ecx, ecx mov r8d, ecx lea r10, [rbp+var_B0] mov rdx, r8 mov rcx, r8 mov [rsp+0E0h+var_E0], r10 call rax mov [rbp+var_44], eax mov rax, [rbp+var_28] mov ecx, [rbp+var_3C] add rax, rcx mov rcx, [rbp+var_58] sub rax, rcx mov [rbp+var_38], eax mov rax, [rbp+var_10] mov rdi, [rax+100h] mov eax, [rbp+var_40] add rdi, rax mov eax, [rbp+var_44] add rdi, rax mov rsi, [rbp+var_58] mov eax, [rbp+var_38] mov edx, eax call _memcpy mov rax, [rbp+var_18] mov rax, [rax+58h] mov rdi, [rbp+var_18] mov rcx, [rbp+var_10] mov rsi, [rcx+100h] mov ecx, [rbp+var_40] add rsi, rcx lea rdx, [rbp+var_B0] call rax mov edx, [rbp+var_48] xor eax, eax mov ecx, 8000h cmp edx, 0 cmovnz eax, ecx mov ecx, [rbp+var_38] add ecx, [rbp+var_44] add ecx, [rbp+var_40] movzx ecx, cx add eax, ecx mov [rbp+var_BA], ax movzx eax, [rbp+var_BA] mov [rbp+var_C0], eax mov eax, [rbp+var_C0] mov cl, al mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rax+1], cl mov eax, [rbp+var_C0] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov rax, [rax+100h] mov [rax], cl mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_70] mov rax, [rbp+var_10] mov r8, [rax+100h] mov ecx, 3 call _mi_write_keypage cmp eax, 0 jz short loc_C7C7D jmp short $+2 loc_C7C74: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_C7C8A loc_C7C7D: jmp short $+2 loc_C7C7F: jmp short $+2 loc_C7C81: jmp short $+2 loc_C7C83: mov [rbp+var_4], 2 loc_C7C8A: mov eax, [rbp+var_4] add rsp, 0E0h pop rbp retn
long long mi_split_page(_QWORD *a1, long long a2, long long a3, long long a4, unsigned __int8 *a5, char a6) { __int16 v6; // ax _BYTE *v7; // rax __int16 v8; // ax _QWORD *v10; // [rsp+10h] [rbp-D0h] unsigned int v11; // [rsp+1Ch] [rbp-C4h] __int16 v12; // [rsp+26h] [rbp-BAh] __int16 v13; // [rsp+28h] [rbp-B8h] _BYTE v14[64]; // [rsp+30h] [rbp-B0h] BYREF unsigned long long v15; // [rsp+70h] [rbp-70h] long long v16; // [rsp+78h] [rbp-68h] BYREF long long v17; // [rsp+80h] [rbp-60h] long long last_pos; // [rsp+88h] [rbp-58h] BYREF _BYTE v19[4]; // [rsp+94h] [rbp-4Ch] BYREF unsigned int v20; // [rsp+98h] [rbp-48h] unsigned int v21; // [rsp+9Ch] [rbp-44h] unsigned int v22; // [rsp+A0h] [rbp-40h] int v23; // [rsp+A4h] [rbp-3Ch] unsigned int v24; // [rsp+A8h] [rbp-38h] char v25; // [rsp+AFh] [rbp-31h] unsigned __int8 *v26; // [rsp+B0h] [rbp-30h] long long v27; // [rsp+B8h] [rbp-28h] long long v28; // [rsp+C0h] [rbp-20h] long long v29; // [rsp+C8h] [rbp-18h] _QWORD *v30; // [rsp+D0h] [rbp-10h] v30 = a1; v29 = a2; v28 = a3; v27 = a4; v26 = a5; v25 = a6; if ( 112LL * *((int *)v30 + 117) + *(_QWORD *)(*v30 + 536LL) == a2 ) *((_BYTE *)v30 + 828) = 1; *((_BYTE *)v30 + 829) = 1; if ( (*(_BYTE *)v27 & 0x80) != 0 ) v11 = *(_DWORD *)(*v30 + 380LL); else v11 = 0; v20 = v11; v22 = v11 + 2; if ( v25 ) last_pos = mi_find_last_pos(v29, v27, v26, v19, &v16); else last_pos = mi_find_half_pos(v20, v29, v27, v26, v19, &v16); if ( last_pos ) { v24 = last_pos - v27; v23 = _byteswap_ushort(*(_WORD *)v27) & 0x7FFF; v6 = 0; if ( v20 ) v6 = 0x8000; v13 = v24 + v6; *(_BYTE *)(v27 + 1) = v24 + v6; *(_BYTE *)v27 = HIBYTE(v13); last_pos = v16; if ( v20 ) { v17 = last_pos - v20; memcpy(v30[32] + 2LL, v17, v20); } v15 = mi_new(v30, v29, 3); if ( v15 == -1LL ) { return (unsigned int)-1; } else { v10 = v30; v7 = (_BYTE *)mi_move_key(v29, v28, v26); mi_kpointer((long long)v10, v7, v15); if ( (*(unsigned int ( **)(long long, _QWORD, long long *, unsigned __int8 *))(v29 + 72))( v29, v20, &last_pos, v26) ) { v21 = (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, unsigned __int8 *, _BYTE *))(v29 + 80))( v29, v20, 0LL, 0LL, 0LL, v26, v14); v24 = v23 + v27 - last_pos; memcpy(v21 + v22 + v30[32], last_pos, v24); (*(void ( **)(long long, _QWORD, _BYTE *))(v29 + 88))(v29, v22 + v30[32], v14); v8 = 0; if ( v20 ) v8 = 0x8000; v12 = v22 + v21 + v24 + v8; *(_BYTE *)(v30[32] + 1LL) = v22 + v21 + v24 + v8; *(_BYTE *)v30[32] = HIBYTE(v12); if ( (unsigned int)mi_write_keypage(v30, v29, v15, 3, (unsigned __int16 *)v30[32]) ) return (unsigned int)-1; else return 2; } else { return (unsigned int)-1; } } } else { return (unsigned int)-1; } }
_mi_split_page: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV AL,R9B MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x68],RAX JMP 0x001c793f LAB_001c793f: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RCX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RCX + 0x1d4] IMUL RCX,RCX,0x70 ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x18] JNZ 0x001c7970 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33c],0x1 LAB_001c7970: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33d],0x1 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c79a1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0xc4],EAX JMP 0x001c79ab LAB_001c79a1: XOR EAX,EAX MOV dword ptr [RBP + -0xc4],EAX JMP 0x001c79ab LAB_001c79ab: MOV EAX,dword ptr [RBP + -0xc4] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x48] ADD EAX,0x2 MOV dword ptr [RBP + -0x40],EAX CMP byte ptr [RBP + -0x31],0x0 JZ 0x001c79e2 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x4c] LEA R8,[RBP + -0x68] CALL 0x001c7ca0 MOV qword ptr [RBP + -0x58],RAX JMP 0x001c7a02 LAB_001c79e2: MOV EDI,dword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] LEA R8,[RBP + -0x4c] LEA R9,[RBP + -0x68] CALL 0x001c7f70 MOV qword ptr [RBP + -0x58],RAX LAB_001c7a02: CMP qword ptr [RBP + -0x58],0x0 JNZ 0x001c7a17 JMP 0x001c7a0b LAB_001c7a0b: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c7c8a LAB_001c7a17: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV dword ptr [RBP + -0x3c],EAX MOV EDX,dword ptr [RBP + -0x48] XOR EAX,EAX MOV ECX,0x8000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV ECX,dword ptr [RBP + -0x38] MOVZX ECX,CX ADD EAX,ECX MOV word ptr [RBP + -0xb2],AX MOVZX EAX,word ptr [RBP + -0xb2] MOV dword ptr [RBP + -0xb8],EAX MOV EAX,dword ptr [RBP + -0xb8] MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0xb8] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x58],RAX CMP dword ptr [RBP + -0x48],0x0 JZ 0x001c7ada JMP 0x001c7aa6 LAB_001c7aa6: JMP 0x001c7aa8 LAB_001c7aa8: MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x48] MOV EDX,ECX XOR ECX,ECX SUB RCX,RDX ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x100] ADD RDI,0x2 MOV RSI,qword ptr [RBP + -0x60] MOV EAX,dword ptr [RBP + -0x48] MOV EDX,EAX CALL 0x0012a090 LAB_001c7ada: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x3 CALL 0x001be4d0 MOV qword ptr [RBP + -0x70],RAX CMP RAX,-0x1 JNZ 0x001c7b04 JMP 0x001c7af8 LAB_001c7af8: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c7c8a LAB_001c7b04: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001c1d70 MOV RDI,qword ptr [RBP + -0xd0] MOV RSI,RAX MOV RDX,qword ptr [RBP + -0x70] CALL 0x001c0600 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x30] LEA RDX,[RBP + -0x58] CALL RAX CMP EAX,0x0 JNZ 0x001c7b5f JMP 0x001c7b53 LAB_001c7b53: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c7c8a LAB_001c7b5f: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x30] XOR ECX,ECX MOV R8D,ECX LEA R10,[RBP + -0xb0] MOV RDX,R8 MOV RCX,R8 MOV qword ptr [RSP],R10 CALL RAX MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RBP + -0x3c] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x58] SUB RAX,RCX MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x100] MOV EAX,dword ptr [RBP + -0x40] ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x44] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x38] MOV EDX,EAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x58] MOV RDI,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x100] MOV ECX,dword ptr [RBP + -0x40] ADD RSI,RCX LEA RDX,[RBP + -0xb0] CALL RAX MOV EDX,dword ptr [RBP + -0x48] XOR EAX,EAX MOV ECX,0x8000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV ECX,dword ptr [RBP + -0x38] ADD ECX,dword ptr [RBP + -0x44] ADD ECX,dword ptr [RBP + -0x40] MOVZX ECX,CX ADD EAX,ECX MOV word ptr [RBP + -0xba],AX MOVZX EAX,word ptr [RBP + -0xba] MOV dword ptr [RBP + -0xc0],EAX MOV EAX,dword ptr [RBP + -0xc0] 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 + -0xc0] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x100] MOV byte ptr [RAX],CL MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x10] MOV R8,qword ptr [RAX + 0x100] MOV ECX,0x3 CALL 0x001be1a0 CMP EAX,0x0 JZ 0x001c7c7d JMP 0x001c7c74 LAB_001c7c74: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c7c8a LAB_001c7c7d: JMP 0x001c7c7f LAB_001c7c7f: JMP 0x001c7c81 LAB_001c7c81: JMP 0x001c7c83 LAB_001c7c83: MOV dword ptr [RBP + -0x4],0x2 LAB_001c7c8a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0xe0 POP RBP RET
int4 _mi_split_page(long *param_1,long param_2,int8 param_3,byte *param_4,int8 param_5, char param_6) { long *plVar1; short sVar2; int iVar3; int8 uVar4; uint local_cc; int1 local_b8 [64]; long local_78; void *local_70; void *local_68; void *local_60; int1 local_54 [4]; uint local_50; uint local_4c; uint local_48; uint local_44; uint local_40; char local_39; int8 local_38; byte *local_30; int8 local_28; long local_20; long *local_18; int4 local_c; if (*(long *)(*param_1 + 0x218) + (long)*(int *)((long)param_1 + 0x1d4) * 0x70 == param_2) { *(int1 *)((long)param_1 + 0x33c) = 1; } *(int1 *)((long)param_1 + 0x33d) = 1; if ((*param_4 & 0x80) == 0) { local_cc = 0; } else { local_cc = *(uint *)(*param_1 + 0x17c); } local_50 = local_cc; local_48 = local_cc + 2; local_39 = param_6; local_38 = param_5; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_6 == '\0') { local_60 = (void *)_mi_find_half_pos(local_cc,param_2,param_4,param_5,local_54,&local_70); } else { local_60 = (void *)_mi_find_last_pos(param_2,param_4,param_5,local_54,&local_70); } if (local_60 == (void *)0x0) { local_c = 0xffffffff; } else { local_40 = (int)local_60 - (int)local_30; local_44 = (uint)local_30[1] | (*local_30 & 0x7f) << 8; sVar2 = 0; if (local_50 != 0) { sVar2 = -0x8000; } sVar2 = sVar2 + (short)local_40; local_30[1] = (byte)sVar2; *local_30 = (byte)((ushort)sVar2 >> 8); local_60 = local_70; if (local_50 != 0) { local_68 = (void *)((long)local_70 - (ulong)local_50); memcpy((void *)(local_18[0x20] + 2),local_68,(ulong)local_50); } local_78 = _mi_new(local_18,local_20,3); plVar1 = local_18; if (local_78 == -1) { local_c = 0xffffffff; } else { uVar4 = _mi_move_key(local_20,local_28,local_38); _mi_kpointer(plVar1,uVar4,local_78); iVar3 = (**(code **)(local_20 + 0x48))(local_20,local_50,&local_60,local_38); if (iVar3 == 0) { local_c = 0xffffffff; } else { local_4c = (**(code **)(local_20 + 0x50))(local_20,local_50,0,0,0,local_38,local_b8); local_40 = ((int)local_30 + local_44) - (int)local_60; memcpy((void *)(local_18[0x20] + (ulong)local_48 + (ulong)local_4c),local_60,(ulong)local_40 ); (**(code **)(local_20 + 0x58))(local_20,local_18[0x20] + (ulong)local_48,local_b8); sVar2 = 0; if (local_50 != 0) { sVar2 = -0x8000; } sVar2 = sVar2 + (short)local_40 + (short)local_4c + (short)local_48; *(char *)(local_18[0x20] + 1) = (char)sVar2; *(char *)local_18[0x20] = (char)((ushort)sVar2 >> 8); iVar3 = _mi_write_keypage(local_18,local_20,local_78,3,local_18[0x20]); if (iVar3 == 0) { local_c = 2; } else { local_c = 0xffffffff; } } } } return local_c; }
40,114
JS_DefinePropertyGetSet
bluesky950520[P]quickjs/quickjs.c
int JS_DefinePropertyGetSet(JSContext *ctx, JSValue this_obj, JSAtom prop, JSValue getter, JSValue setter, int flags) { int ret; ret = JS_DefineProperty(ctx, this_obj, prop, JS_UNDEFINED, getter, setter, flags | JS_PROP_HAS_GET | JS_PROP_HAS_SET | JS_PROP_HAS_CONFIGURABLE | JS_PROP_HAS_ENUMERABLE); JS_FreeValue(ctx, getter); JS_FreeValue(ctx, setter); return ret; }
O0
c
JS_DefinePropertyGetSet: pushq %rbx subq $0x70, %rsp movl 0x90(%rsp), %eax leaq 0x80(%rsp), %r10 movq %r10, 0x28(%rsp) movq %rsi, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq %r8, 0x50(%rsp) movq %r9, 0x58(%rsp) movq %rdi, 0x48(%rsp) movl %ecx, 0x44(%rsp) movq 0x48(%rsp), %rdi movl 0x44(%rsp), %ecx movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) movl 0x90(%rsp), %eax orl $0x800, %eax # imm = 0x800 orl $0x1000, %eax # imm = 0x1000 orl $0x100, %eax # imm = 0x100 orl $0x400, %eax # imm = 0x400 movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movq 0x30(%rsp), %r8 movq 0x38(%rsp), %r9 leaq 0x50(%rsp), %r11 movq (%r11), %rbx movq %rbx, (%rsp) movq 0x8(%r11), %r11 movq %r11, 0x8(%rsp) movq (%r10), %r11 movq %r11, 0x10(%rsp) movq 0x8(%r10), %r10 movq %r10, 0x18(%rsp) movl %eax, 0x20(%rsp) callq 0x32b20 movl %eax, 0x40(%rsp) movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x229d0 movq 0x28(%rsp), %rax movq 0x48(%rsp), %rdi movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x229d0 movl 0x40(%rsp), %eax addq $0x70, %rsp popq %rbx retq nopw %cs:(%rax,%rax)
JS_DefinePropertyGetSet: push rbx sub rsp, 70h mov eax, [rsp+78h+arg_10] lea r10, [rsp+78h+arg_0] mov [rsp+78h+var_50], r10 mov [rsp+78h+var_18], rsi mov [rsp+78h+var_10], rdx mov [rsp+78h+var_28], r8 mov [rsp+78h+var_20], r9 mov [rsp+78h+var_30], rdi mov [rsp+78h+var_34], ecx mov rdi, [rsp+78h+var_30] mov ecx, [rsp+78h+var_34] mov dword ptr [rsp+78h+var_48], 0 mov [rsp+78h+var_40], 3 mov eax, [rsp+78h+arg_10] or eax, 800h or eax, 1000h or eax, 100h or eax, 400h mov rsi, [rsp+78h+var_18] mov rdx, [rsp+78h+var_10] mov r8, [rsp+78h+var_48] mov r9, [rsp+78h+var_40] lea r11, [rsp+78h+var_28] mov rbx, [r11] mov [rsp+78h+var_78], rbx mov r11, [r11+8] mov [rsp+78h+var_70], r11 mov r11, [r10] mov [rsp+78h+var_68], r11 mov r10, [r10+8] mov [rsp+78h+var_60], r10 mov [rsp+78h+var_58], eax call JS_DefineProperty mov [rsp+78h+var_38], eax mov rdi, [rsp+78h+var_30] mov rsi, [rsp+78h+var_28] mov rdx, [rsp+78h+var_20] call JS_FreeValue mov rax, [rsp+78h+var_50] mov rdi, [rsp+78h+var_30] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue mov eax, [rsp+78h+var_38] add rsp, 70h pop rbx retn
long long JS_DefinePropertyGetSet( long long a1, long long a2, long long a3, unsigned int a4, _DWORD *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, _DWORD *a15, long long a16, int a17) { _DWORD *v18; // [rsp+30h] [rbp-48h] unsigned int v19; // [rsp+40h] [rbp-38h] LODWORD(v18) = 0; v19 = JS_DefineProperty( a1, a2, a3, a4, v18, 3LL, a7, a8, a9, a10, a11, a12, a13, a14, a5, a6, a15, a16, a17 | 0x1D00u); JS_FreeValue(a1, (long long)a5, a6); JS_FreeValue(a1, (long long)a15, a16); return v19; }
JS_DefinePropertyGetSet: PUSH RBX SUB RSP,0x70 MOV EAX,dword ptr [RSP + 0x90] LEA R10,[RSP + 0x80] MOV qword ptr [RSP + 0x28],R10 MOV qword ptr [RSP + 0x60],RSI MOV qword ptr [RSP + 0x68],RDX MOV qword ptr [RSP + 0x50],R8 MOV qword ptr [RSP + 0x58],R9 MOV qword ptr [RSP + 0x48],RDI MOV dword ptr [RSP + 0x44],ECX MOV RDI,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RSP + 0x44] MOV dword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x3 MOV EAX,dword ptr [RSP + 0x90] OR EAX,0x800 OR EAX,0x1000 OR EAX,0x100 OR EAX,0x400 MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] MOV R8,qword ptr [RSP + 0x30] MOV R9,qword ptr [RSP + 0x38] LEA R11,[RSP + 0x50] MOV RBX,qword ptr [R11] MOV qword ptr [RSP],RBX MOV R11,qword ptr [R11 + 0x8] MOV qword ptr [RSP + 0x8],R11 MOV R11,qword ptr [R10] MOV qword ptr [RSP + 0x10],R11 MOV R10,qword ptr [R10 + 0x8] MOV qword ptr [RSP + 0x18],R10 MOV dword ptr [RSP + 0x20],EAX CALL 0x00132b20 MOV dword ptr [RSP + 0x40],EAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001229d0 MOV EAX,dword ptr [RSP + 0x40] ADD RSP,0x70 POP RBX RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ int4 JS_DefinePropertyGetSet (int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,uint param_9) { int4 uVar1; int4 uStack_44; uVar1 = JS_DefineProperty(param_1,param_2,param_3,param_4,(ulong)uStack_44 << 0x20,3,param_5, param_6,param_7,param_8,param_9 | 0x1d00); JS_FreeValue(param_1,param_5,param_6); JS_FreeValue(param_1,param_7,param_8); return uVar1; }
40,115
JS_DefinePropertyGetSet
bluesky950520[P]quickjs/quickjs.c
int JS_DefinePropertyGetSet(JSContext *ctx, JSValue this_obj, JSAtom prop, JSValue getter, JSValue setter, int flags) { int ret; ret = JS_DefineProperty(ctx, this_obj, prop, JS_UNDEFINED, getter, setter, flags | JS_PROP_HAS_GET | JS_PROP_HAS_SET | JS_PROP_HAS_CONFIGURABLE | JS_PROP_HAS_ENUMERABLE); JS_FreeValue(ctx, getter); JS_FreeValue(ctx, setter); return ret; }
O3
c
JS_DefinePropertyGetSet: pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 leaq 0x60(%rsp), %r15 movq %r8, 0x30(%rsp) movq %r9, 0x38(%rsp) movl $0x1d00, %eax # imm = 0x1D00 orl 0x70(%rsp), %eax movaps (%r15), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) movl %eax, 0x20(%rsp) movl $0x3, %r9d xorl %r8d, %r8d callq 0x24e8c movl %eax, %ebx movq 0x38(%rsp), %rdx movq 0x18(%r14), %rdi cmpl $-0x9, %edx jb 0x267fe movq 0x30(%rsp), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x267fe callq 0x20d90 movq 0x18(%r14), %rdi movq 0x8(%r15), %rdx cmpl $-0x9, %edx jb 0x2681b movq (%r15), %rsi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x2681b callq 0x20d90 movl %ebx, %eax addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq
JS_DefinePropertyGetSet: push r15 push r14 push rbx sub rsp, 40h mov r14, rdi lea r15, [rsp+58h+arg_0] mov qword ptr [rsp+58h+var_28], r8 mov qword ptr [rsp+58h+var_28+8], r9 mov eax, 1D00h or eax, [rsp+58h+arg_10] movaps xmm0, xmmword ptr [r15] movups [rsp+58h+var_48], xmm0 movups xmm0, [rsp+58h+var_28] movups [rsp+58h+var_58], xmm0 mov [rsp+58h+var_38], eax mov r9d, 3 xor r8d, r8d call JS_DefineProperty mov ebx, eax mov rdx, qword ptr [rsp+58h+var_28+8] mov rdi, [r14+18h] cmp edx, 0FFFFFFF7h jb short loc_267FE mov rsi, qword ptr [rsp+58h+var_28] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_267FE call js_free_value_rt mov rdi, [r14+18h] loc_267FE: mov rdx, [r15+8] cmp edx, 0FFFFFFF7h jb short loc_2681B mov rsi, [r15] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_2681B call js_free_value_rt loc_2681B: mov eax, ebx add rsp, 40h pop rbx pop r14 pop r15 retn
long long JS_DefinePropertyGetSet( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, _QWORD *a15, long long a16, int a17) { unsigned int v18; // ebx long long v19; // r8 long long v20; // r9 long long v21; // rdi int v22; // eax long long v23; // rcx int v24; // eax long long v25; // rcx __m128 v27; // [rsp+30h] [rbp-28h] v27.m128_u64[0] = a5; v27.m128_u64[1] = a6; v18 = JS_DefineProperty( a1, a2, a3, a4, 0LL, 3LL, v27, a8, a9, a10, a11, a12, a13, a14, *(double *)&a5, a6, (long long)a15, a16, a17 | 0x1D00u); v21 = *(_QWORD *)(a1 + 24); if ( v27.m128_i32[2] >= 0xFFFFFFF7 ) { v22 = *(_DWORD *)v27.m128_u64[0]; v23 = (unsigned int)(*(_DWORD *)v27.m128_u64[0] - 1); *(_DWORD *)v27.m128_u64[0] = v23; if ( v22 <= 1 ) { js_free_value_rt(v21, v27.m128_u64[0], v27.m128_i64[1], v23, v19, v20); v21 = *(_QWORD *)(a1 + 24); } } if ( (unsigned int)a16 >= 0xFFFFFFF7 ) { v24 = *(_DWORD *)a15; v25 = (unsigned int)(*(_DWORD *)a15 - 1); *(_DWORD *)a15 = v25; if ( v24 <= 1 ) js_free_value_rt(v21, a15, a16, v25, v19, v20); } return v18; }
JS_DefinePropertyGetSet: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI LEA R15,[RSP + 0x60] MOV qword ptr [RSP + 0x30],R8 MOV qword ptr [RSP + 0x38],R9 MOV EAX,0x1d00 OR EAX,dword ptr [RSP + 0x70] MOVAPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 MOV dword ptr [RSP + 0x20],EAX MOV R9D,0x3 XOR R8D,R8D CALL 0x00124e8c MOV EBX,EAX MOV RDX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [R14 + 0x18] CMP EDX,-0x9 JC 0x001267fe MOV RSI,qword ptr [RSP + 0x30] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x001267fe CALL 0x00120d90 MOV RDI,qword ptr [R14 + 0x18] LAB_001267fe: MOV RDX,qword ptr [R15 + 0x8] CMP EDX,-0x9 JC 0x0012681b MOV RSI,qword ptr [R15] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x0012681b CALL 0x00120d90 LAB_0012681b: MOV EAX,EBX ADD RSP,0x40 POP RBX POP R14 POP R15 RET
int4 JS_DefinePropertyGetSet(long param_1) { int iVar1; int4 uVar2; int8 uVar3; int *in_R8; uint in_R9D; int *in_stack_00000008; uint in_stack_00000010; uVar2 = JS_DefineProperty(); uVar3 = *(int8 *)(param_1 + 0x18); if (0xfffffff6 < in_R9D) { iVar1 = *in_R8; *in_R8 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar3); uVar3 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < in_stack_00000010) { iVar1 = *in_stack_00000008; *in_stack_00000008 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar3); } } return uVar2; }
40,116
my_error_unregister_all
eloqsql/mysys/my_error.c
void my_error_unregister_all(void) { struct my_err_head *cursor, *saved_next; for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next) { /* We need this ptr, but we're about to free its container, so save it. */ saved_next= cursor->meh_next; my_free(cursor); } my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */ my_errmsgs_list= &my_errmsgs_globerrs; }
O0
c
my_error_unregister_all: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq 0x1d6ee9(%rip), %rax # 0x2b2d38 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0xdbe78 movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rdi callq 0xe14e0 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xdbe53 movq $0x0, 0x1d6eb5(%rip) # 0x2b2d38 leaq 0x1d6eae(%rip), %rax # 0x2b2d38 movq %rax, 0x1d6e9f(%rip) # 0x2b2d30 addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
my_error_unregister_all: push rbp mov rbp, rsp sub rsp, 10h mov rax, cs:my_errmsgs_globerrs mov [rbp+var_8], rax loc_DBE53: cmp [rbp+var_8], 0 jz short loc_DBE78 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax mov rdi, [rbp+var_8] call my_free mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp short loc_DBE53 loc_DBE78: mov cs:my_errmsgs_globerrs, 0 lea rax, my_errmsgs_globerrs mov cs:my_errmsgs_list, rax add rsp, 10h pop rbp retn
long long *my_error_unregister_all() { long long *result; // rax _QWORD *v1; // [rsp+0h] [rbp-10h] _QWORD *i; // [rsp+8h] [rbp-8h] for ( i = (_QWORD *)my_errmsgs_globerrs; i; i = v1 ) { v1 = (_QWORD *)*i; my_free(i); } my_errmsgs_globerrs = 0LL; result = &my_errmsgs_globerrs; my_errmsgs_list = &my_errmsgs_globerrs; return result; }
my_error_unregister_all: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV RAX,qword ptr [0x003b2d38] MOV qword ptr [RBP + -0x8],RAX LAB_001dbe53: CMP qword ptr [RBP + -0x8],0x0 JZ 0x001dbe78 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e14e0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x001dbe53 LAB_001dbe78: MOV qword ptr [0x003b2d38],0x0 LEA RAX,[0x3b2d38] MOV qword ptr [0x003b2d30],RAX ADD RSP,0x10 POP RBP RET
void my_error_unregister_all(void) { int8 *puVar1; int8 *local_10; local_10 = my_errmsgs_globerrs; while (local_10 != (int8 *)0x0) { puVar1 = (int8 *)*local_10; my_free(local_10); local_10 = puVar1; } my_errmsgs_globerrs = (int8 *)0x0; my_errmsgs_list = (int *)&my_errmsgs_globerrs; return; }
40,117
lunasvg::SVGPaintServer::applyPaint(lunasvg::SVGRenderState&) const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
bool SVGPaintServer::applyPaint(SVGRenderState& state) const { if(!isRenderable()) return false; if(m_element) return m_element->applyPaint(state, m_opacity); state->setColor(m_color.colorWithAlpha(m_opacity)); return true; }
O0
cpp
lunasvg::SVGPaintServer::applyPaint(lunasvg::SVGRenderState&) const: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x28(%rbp) callq 0x206f0 testb $0x1, %al jne 0x1a427 movb $0x0, -0x1(%rbp) jmp 0x1a48a movq -0x28(%rbp), %rax cmpq $0x0, (%rax) je 0x1a451 movq -0x28(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movss 0xc(%rax), %xmm0 movq (%rdi), %rax callq *0x90(%rax) andb $0x1, %al movb %al, -0x1(%rbp) jmp 0x1a48a movq -0x18(%rbp), %rdi callq 0x20750 movq %rax, %rcx movq -0x28(%rbp), %rax movq %rcx, -0x30(%rbp) movq %rax, %rdi addq $0x8, %rdi movss 0xc(%rax), %xmm0 callq 0x20770 movq -0x30(%rbp), %rdi movl %eax, -0x1c(%rbp) leaq -0x1c(%rbp), %rsi callq 0x136a0 movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZNK7lunasvg14SVGPaintServer10applyPaintERNS_14SVGRenderStateE: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10]; this mov [rbp+var_28], rdi call _ZNK7lunasvg14SVGPaintServer12isRenderableEv; lunasvg::SVGPaintServer::isRenderable(void) test al, 1 jnz short loc_1A427 mov [rbp+var_1], 0 jmp short loc_1A48A loc_1A427: mov rax, [rbp+var_28] cmp qword ptr [rax], 0 jz short loc_1A451 mov rax, [rbp+var_28] mov rdi, [rax] mov rsi, [rbp+var_18] movss xmm0, dword ptr [rax+0Ch] mov rax, [rdi] call qword ptr [rax+90h] and al, 1 mov [rbp+var_1], al jmp short loc_1A48A loc_1A451: mov rdi, [rbp+var_18] call _ZNK7lunasvg14SVGRenderStateptEv; lunasvg::SVGRenderState::operator->(void) mov rcx, rax mov rax, [rbp+var_28] mov [rbp+var_30], rcx mov rdi, rax add rdi, 8; this movss xmm0, dword ptr [rax+0Ch]; float call _ZNK7lunasvg5Color14colorWithAlphaEf; lunasvg::Color::colorWithAlpha(float) mov rdi, [rbp+var_30]; this mov [rbp+var_1C], eax lea rsi, [rbp+var_1C]; lunasvg::Color * call _ZN7lunasvg6Canvas8setColorERKNS_5ColorE; lunasvg::Canvas::setColor(lunasvg::Color const&) mov [rbp+var_1], 1 loc_1A48A: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char lunasvg::SVGPaintServer::applyPaint(lunasvg::SVGPaintServer *this, lunasvg::SVGRenderState *a2) { float v2; // xmm0_4 lunasvg::Canvas *v4; // [rsp+0h] [rbp-30h] int v5; // [rsp+14h] [rbp-1Ch] BYREF lunasvg::SVGRenderState *v6; // [rsp+18h] [rbp-18h] lunasvg::SVGPaintServer *v7; // [rsp+20h] [rbp-10h] v7 = this; v6 = a2; if ( (lunasvg::SVGPaintServer::isRenderable(this) & 1) == 0 ) return 0; if ( *(_QWORD *)this ) return (*(long long ( **)(_QWORD, lunasvg::SVGRenderState *, float))(**(_QWORD **)this + 144LL))( *(_QWORD *)this, v6, *((float *)this + 3)) & 1; v4 = (lunasvg::Canvas *)lunasvg::SVGRenderState::operator->(v6); v2 = *((float *)this + 3); v5 = lunasvg::Color::colorWithAlpha((lunasvg::SVGPaintServer *)((char *)this + 8), v2); lunasvg::Canvas::setColor(v4, (const lunasvg::Color *)&v5, v2); return 1; }
applyPaint: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RDI CALL 0x001206f0 TEST AL,0x1 JNZ 0x0011a427 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0011a48a LAB_0011a427: MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX],0x0 JZ 0x0011a451 MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOVSS XMM0,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x90] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL JMP 0x0011a48a LAB_0011a451: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00120750 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RCX MOV RDI,RAX ADD RDI,0x8 MOVSS XMM0,dword ptr [RAX + 0xc] CALL 0x00120770 MOV RDI,qword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x1c],EAX LEA RSI,[RBP + -0x1c] CALL 0x001136a0 MOV byte ptr [RBP + -0x1],0x1 LAB_0011a48a: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x30 POP RBP RET
/* lunasvg::SVGPaintServer::applyPaint(lunasvg::SVGRenderState&) const */ byte __thiscall lunasvg::SVGPaintServer::applyPaint(SVGPaintServer *this,SVGRenderState *param_1) { ulong uVar1; Canvas *this_00; int4 local_24; SVGRenderState *local_20; SVGPaintServer *local_18; byte local_9; local_20 = param_1; local_18 = this; uVar1 = isRenderable(this); if ((uVar1 & 1) == 0) { local_9 = 0; } else if (*(long *)this == 0) { this_00 = (Canvas *)SVGRenderState::operator->(local_20); local_24 = Color::colorWithAlpha((Color *)(this + 8),*(float *)(this + 0xc)); Canvas::setColor(this_00,(Color *)&local_24); local_9 = 1; } else { local_9 = (**(code **)(**(long **)this + 0x90)) (*(int4 *)(this + 0xc),*(long **)this,local_20); local_9 = local_9 & 1; } return local_9; }
40,118
alaya::SQ4SpaceTest_SaveAndLoad_Test::~SQ4SpaceTest_SaveAndLoad_Test()
AlayaLite/tests/space/sq4_space_test.cpp
TEST_F(SQ4SpaceTest, SaveAndLoad) { float data[8] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0}; space_->fit(reinterpret_cast<float *>(data), 2); std::string_view file_name_view = file_name_; space_->save(file_name_view); SQ4Space<> new_space; new_space.load(file_name_view); EXPECT_EQ(new_space.get_data_num(), 2); }
O0
cpp
alaya::SQ4SpaceTest_SaveAndLoad_Test::~SQ4SpaceTest_SaveAndLoad_Test(): pushq %rax movq %rdi, (%rsp) movq (%rsp), %rdi callq 0x2e600 popq %rax retq
_ZN5alaya29SQ4SpaceTest_SaveAndLoad_TestD2Ev: push rax mov [rsp+8+var_8], rdi mov rdi, [rsp+8+var_8]; this call _ZN5alaya12SQ4SpaceTestD2Ev; alaya::SQ4SpaceTest::~SQ4SpaceTest() pop rax retn
void alaya::SQ4SpaceTest_SaveAndLoad_Test::~SQ4SpaceTest_SaveAndLoad_Test( alaya::SQ4SpaceTest_SaveAndLoad_Test *this) { alaya::SQ4SpaceTest::~SQ4SpaceTest(this); }
~SQ4SpaceTest_SaveAndLoad_Test: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] CALL 0x0012e600 POP RAX RET
/* alaya::SQ4SpaceTest_SaveAndLoad_Test::~SQ4SpaceTest_SaveAndLoad_Test() */ SQ4SpaceTest_SaveAndLoad_Test * __thiscall alaya::SQ4SpaceTest_SaveAndLoad_Test::~SQ4SpaceTest_SaveAndLoad_Test (SQ4SpaceTest_SaveAndLoad_Test *this) { SQ4SpaceTest::~SQ4SpaceTest((SQ4SpaceTest *)this); return this; }
40,119
translog_get_first_needed_file
eloqsql/storage/maria/ma_loghandler.c
uint32 translog_get_first_needed_file() { uint32 file_no; mysql_mutex_lock(&log_descriptor.purger_lock); file_no= log_descriptor.min_need_file; mysql_mutex_unlock(&log_descriptor.purger_lock); return file_no; }
O3
c
translog_get_first_needed_file: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax cmpq $0x0, 0xb9084f(%rip) # 0xbe0450 jne 0x4fc36 leaq 0xb90806(%rip), %rdi # 0xbe0410 callq 0x27270 movl 0xb907f3(%rip), %ebx # 0xbe0408 movq 0xb90834(%rip), %rdi # 0xbe0450 testq %rdi, %rdi jne 0x4fc3d leaq 0xb907e8(%rip), %rdi # 0xbe0410 callq 0x27240 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %rbp retq callq 0x2b222 jmp 0x4fc0f leaq 0x3177f4(%rip), %rax # 0x367438 movq (%rax), %rax callq *0x160(%rax) jmp 0x4fc21
translog_get_first_needed_file: push rbp mov rbp, rsp push rbx push rax cmp cs:qword_BE0450, 0 jnz short loc_4FC36 lea rdi, unk_BE0410 call _pthread_mutex_lock loc_4FC0F: mov ebx, dword ptr cs:qword_BE0408 mov rdi, cs:qword_BE0450 test rdi, rdi jnz short loc_4FC3D loc_4FC21: lea rdi, unk_BE0410 call _pthread_mutex_unlock mov eax, ebx add rsp, 8 pop rbx pop rbp retn loc_4FC36: call translog_get_first_needed_file_cold_1 jmp short loc_4FC0F loc_4FC3D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_4FC21
long long translog_get_first_needed_file(long long a1) { unsigned int v1; // ebx if ( qword_BE0450 ) translog_get_first_needed_file_cold_1(a1); else pthread_mutex_lock(&unk_BE0410); v1 = qword_BE0408; if ( qword_BE0450 ) ((void ( *)(long long))PSI_server[44])(qword_BE0450); pthread_mutex_unlock(&unk_BE0410); return v1; }
translog_get_first_needed_file: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX CMP qword ptr [0x00ce0450],0x0 JNZ 0x0014fc36 LEA RDI,[0xce0410] CALL 0x00127270 LAB_0014fc0f: MOV EBX,dword ptr [0x00ce0408] MOV RDI,qword ptr [0x00ce0450] TEST RDI,RDI JNZ 0x0014fc3d LAB_0014fc21: LEA RDI,[0xce0410] CALL 0x00127240 MOV EAX,EBX ADD RSP,0x8 POP RBX POP RBP RET LAB_0014fc36: CALL 0x0012b222 JMP 0x0014fc0f LAB_0014fc3d: LEA RAX,[0x467438] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014fc21
int4 translog_get_first_needed_file(void) { int4 uVar1; if (DAT_00ce0450 == 0) { pthread_mutex_lock((pthread_mutex_t *)&DAT_00ce0410); } else { translog_get_first_needed_file_cold_1(); } uVar1 = DAT_00ce0408; if (DAT_00ce0450 != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)&DAT_00ce0410); return uVar1; }
40,120
inline_mysql_file_read
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_read( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_read; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_read(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_read= (result == 0) ? count : 0; else bytes_read= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_read); return result; } #endif result= my_read(file, buffer, count, flags); return result; }
O0
c
inline_mysql_file_read: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x1e3360(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x6, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xdefe7 leaq 0x1e3316(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xf6430 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0xdef92 cmpq $0x0, -0x38(%rbp) jne 0xdef77 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xdef82 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0xdef82 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0xdefbf cmpq $-0x1, -0x38(%rbp) je 0xdefa6 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0xdefb1 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0xdefb1 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x1e3272(%rip), %rax # 0x2c2238 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xdf007 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xf6430 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_read_4: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 6 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_DEFE7 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_read mov [rbp+var_38], rax mov rax, [rbp+var_30] and rax, 6 cmp rax, 0 jz short loc_DEF92 cmp [rbp+var_38], 0 jnz short loc_DEF77 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_DEF82 loc_DEF77: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_DEF82: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_DEFBF loc_DEF92: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_DEFA6 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_DEFB1 loc_DEFA6: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_DEFB1: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_DEFBF: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_DF007 loc_DEFE7: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_read mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_DF007: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_read_4( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+8h] [rbp-98h] _BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+70h] [rbp-30h] long long v13; // [rsp+78h] [rbp-28h] long long v14; // [rsp+80h] [rbp-20h] unsigned int v15; // [rsp+88h] [rbp-18h] unsigned int v16; // [rsp+8Ch] [rbp-14h] long long v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 6LL); if ( v10 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16); v11 = my_read(v15, v14, v13, v12); if ( (v12 & 6) != 0 ) { if ( v11 ) v8 = 0LL; else v8 = v13; ((void ( *)(long long, long long))PSI_server[67])(v10, v8); } else { if ( v11 == -1 ) v7 = 0LL; else v7 = v11; ((void ( *)(long long, long long))PSI_server[67])(v10, v7); } return v11; } else { return my_read(v15, v14, v13, v12); } }
inline_mysql_file_read: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x6 CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001defe7 LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6430 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x001def92 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001def77 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x001def82 LAB_001def77: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x001def82 LAB_001def82: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x001defbf LAB_001def92: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x001defa6 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x001defb1 LAB_001defa6: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x001defb1 LAB_001defb1: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_001defbf: LEA RAX,[0x3c2238] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x001df007 LAB_001defe7: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001f6430 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_001df007: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_read (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,ulong param_6) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; ulong local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6); if (local_48 == 0) { local_10 = my_read(local_20,local_28,local_30,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_read(local_20,local_28,local_30,local_38); if ((local_38 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
40,121
heap_drop_table
eloqsql/storage/heap/hp_create.c
void heap_drop_table(HP_INFO *info) { DBUG_ENTER("heap_drop_table"); mysql_mutex_lock(&THR_LOCK_heap); heap_try_free(info->s); mysql_mutex_unlock(&THR_LOCK_heap); DBUG_VOID_RETURN; }
O3
c
heap_drop_table: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x347636(%rip), %r14 # 0x36d888 cmpq $0x0, 0x40(%r14) jne 0x26298 leaq 0x347628(%rip), %rdi # 0x36d888 callq 0x24420 movq (%rbx), %rdi cmpl $0x0, 0x10c(%rdi) je 0x2627a movb $0x1, 0x220(%rdi) jmp 0x2627f callq 0x26058 movq 0x40(%r14), %rdi testq %rdi, %rdi jne 0x2629f leaq 0x3475f9(%rip), %rdi # 0x36d888 popq %rbx popq %r14 popq %rbp jmp 0x241e0 callq 0x24627 jmp 0x26265 leaq 0x2d0602(%rip), %rax # 0x2f68a8 movq (%rax), %rax callq *0x160(%rax) jmp 0x26288 nopl (%rax)
heap_drop_table: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi lea r14, THR_LOCK_heap cmp qword ptr [r14+40h], 0 jnz short loc_26298 lea rdi, THR_LOCK_heap call _pthread_mutex_lock loc_26265: mov rdi, [rbx] cmp dword ptr [rdi+10Ch], 0 jz short loc_2627A mov byte ptr [rdi+220h], 1 jmp short loc_2627F loc_2627A: call hp_free loc_2627F: mov rdi, [r14+40h] test rdi, rdi jnz short loc_2629F loc_26288: lea rdi, THR_LOCK_heap pop rbx pop r14 pop rbp jmp _pthread_mutex_unlock loc_26298: call heap_drop_table_cold_1 jmp short loc_26265 loc_2629F: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_26288
long long heap_drop_table(long long *a1) { long long v2; // rdi if ( THR_LOCK_heap[8] ) heap_drop_table_cold_1(); else pthread_mutex_lock(THR_LOCK_heap); v2 = *a1; if ( *(_DWORD *)(*a1 + 268) ) *(_BYTE *)(v2 + 544) = 1; else hp_free(v2); if ( THR_LOCK_heap[8] ) (*((void (**)(void))PSI_server[0] + 44))(); return pthread_mutex_unlock(THR_LOCK_heap); }
heap_drop_table: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI LEA R14,[0x46d888] CMP qword ptr [R14 + 0x40],0x0 JNZ 0x00126298 LEA RDI,[0x46d888] CALL 0x00124420 LAB_00126265: MOV RDI,qword ptr [RBX] CMP dword ptr [RDI + 0x10c],0x0 JZ 0x0012627a MOV byte ptr [RDI + 0x220],0x1 JMP 0x0012627f LAB_0012627a: CALL 0x00126058 LAB_0012627f: MOV RDI,qword ptr [R14 + 0x40] TEST RDI,RDI JNZ 0x0012629f LAB_00126288: LEA RDI,[0x46d888] POP RBX POP R14 POP RBP JMP 0x001241e0 LAB_00126298: CALL 0x00124627 JMP 0x00126265 LAB_0012629f: LEA RAX,[0x3f68a8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00126288
void heap_drop_table(long *param_1) { if (THR_LOCK_heap._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_heap); } else { heap_drop_table_cold_1(); } if (*(int *)(*param_1 + 0x10c) == 0) { hp_free(); } else { *(int1 *)(*param_1 + 0x220) = 1; } if (THR_LOCK_heap._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_heap); return; }
40,122
my_strntoull_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr + l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) res) : (longlong) res); }
O0
c
my_strntoull_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movl $0x0, -0x3c(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0x59531 movq -0x50(%rbp), %rax addq $-0x9, %rax movq %rax, -0x90(%rbp) subq $0x24, %rax ja 0x5952d movq -0x90(%rbp), %rax leaq 0x1560d1(%rip), %rcx # 0x1af5dc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0x5952f jmp 0x5952f cmpl $0x0, -0x3c(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x3c(%rbp) jmp 0x5952f jmp 0x5952f jmp 0x59588 jmp 0x59569 cmpq $0x0, -0x30(%rbp) je 0x59543 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %edx movl $0x21, %ecx movl $0x54, %eax cmpl $0x0, %edx cmovel %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x5976c movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) movb $0x1, %al testb $0x1, %al jne 0x594ca jmp 0x59586 jmp 0x59588 movl $0x0, -0x40(%rbp) movq $0x0, -0x70(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x88(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x60(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x64(%rbp) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0x596b5 movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) cmpq $0x30, -0x50(%rbp) jb 0x5961a cmpq $0x39, -0x50(%rbp) ja 0x5961a movq -0x50(%rbp), %rax subq $0x30, %rax movq %rax, -0x50(%rbp) jmp 0x59663 cmpq $0x41, -0x50(%rbp) jb 0x5963a cmpq $0x5a, -0x50(%rbp) ja 0x5963a movq -0x50(%rbp), %rax subq $0x41, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0x59661 cmpq $0x61, -0x50(%rbp) jb 0x5965a cmpq $0x7a, -0x50(%rbp) ja 0x5965a movq -0x50(%rbp), %rax subq $0x61, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0x5965f jmp 0x596f4 jmp 0x59661 jmp 0x59663 movq -0x50(%rbp), %rax cmpl -0x24(%rbp), %eax jl 0x59671 jmp 0x596f4 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax ja 0x59691 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x5969a movq -0x50(%rbp), %rax movl -0x64(%rbp), %ecx cmpq %rcx, %rax jbe 0x5969a movl $0x1, -0x40(%rbp) jmp 0x596b3 movslq -0x24(%rbp), %rax imulq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x50(%rbp), %rax addq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0x596e6 cmpl $0x0, -0x44(%rbp) jne 0x596e4 cmpq $0x0, -0x30(%rbp) je 0x596cd movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movl $0x54, (%rax) movq $0x0, -0x8(%rbp) jmp 0x5976c jmp 0x596f4 jmp 0x596e8 movb $0x1, %al testb $0x1, %al jne 0x595cb jmp 0x596f4 cmpq $0x0, -0x30(%rbp) je 0x59706 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x59727 movq -0x38(%rbp), %rax movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0x5976c cmpl $0x0, -0x40(%rbp) je 0x59741 movq -0x38(%rbp), %rax movl $0x22, (%rax) movq $-0x1, -0x8(%rbp) jmp 0x5976c cmpl $0x0, -0x3c(%rbp) je 0x59756 xorl %eax, %eax subq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x59761 movq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopl (%rax)
my_strntoull_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov [rbp+var_3C], 0 mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov [rbp+var_78], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_80], rax mov rax, [rbp+var_38] mov dword ptr [rax], 0 loc_594CA: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle short loc_59531 mov rax, [rbp+var_50] add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases mov [rbp+var_90], rax sub rax, 24h ja short def_59512; jumptable 0000000000059512 default case, cases 10-31,33-42,44 mov rax, [rbp+var_90] lea rcx, jpt_59512 movsxd rax, ds:(jpt_59512 - 1AF5DCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_59514: jmp short loc_5952F; jumptable 0000000000059512 case 32 loc_59516: jmp short loc_5952F; jumptable 0000000000059512 case 9 loc_59518: cmp [rbp+var_3C], 0; jumptable 0000000000059512 case 45 setnz al xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_3C], eax jmp short loc_5952F loc_5952B: jmp short loc_5952F; jumptable 0000000000059512 case 43 def_59512: jmp short loc_59588; jumptable 0000000000059512 default case, cases 10-31,33-42,44 loc_5952F: jmp short loc_59569 loc_59531: cmp [rbp+var_30], 0 jz short loc_59543 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_59543: mov edx, [rbp+var_44] mov ecx, 21h ; '!' mov eax, 54h ; 'T' cmp edx, 0 cmovz ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov [rbp+var_8], 0 jmp loc_5976C loc_59569: mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax mov al, 1 test al, 1 jnz loc_594CA jmp short $+2 loc_59586: jmp short $+2 loc_59588: mov [rbp+var_40], 0 mov [rbp+var_70], 0 mov rax, [rbp+var_78] mov [rbp+var_88], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_60], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_64], eax loc_595CB: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle loc_596B5 mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax cmp [rbp+var_50], 30h ; '0' jb short loc_5961A cmp [rbp+var_50], 39h ; '9' ja short loc_5961A mov rax, [rbp+var_50] sub rax, 30h ; '0' mov [rbp+var_50], rax jmp short loc_59663 loc_5961A: cmp [rbp+var_50], 41h ; 'A' jb short loc_5963A cmp [rbp+var_50], 5Ah ; 'Z' ja short loc_5963A mov rax, [rbp+var_50] sub rax, 41h ; 'A' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_59661 loc_5963A: cmp [rbp+var_50], 61h ; 'a' jb short loc_5965A cmp [rbp+var_50], 7Ah ; 'z' ja short loc_5965A mov rax, [rbp+var_50] sub rax, 61h ; 'a' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_5965F loc_5965A: jmp loc_596F4 loc_5965F: jmp short $+2 loc_59661: jmp short $+2 loc_59663: mov rax, [rbp+var_50] cmp eax, [rbp+var_24] jl short loc_59671 jmp loc_596F4 loc_59671: mov rax, [rbp+var_70] cmp rax, [rbp+var_60] ja short loc_59691 mov rax, [rbp+var_70] cmp rax, [rbp+var_60] jnz short loc_5969A mov rax, [rbp+var_50] mov ecx, [rbp+var_64] cmp rax, rcx jbe short loc_5969A loc_59691: mov [rbp+var_40], 1 jmp short loc_596B3 loc_5969A: movsxd rax, [rbp+var_24] imul rax, [rbp+var_70] mov [rbp+var_70], rax mov rax, [rbp+var_50] add rax, [rbp+var_70] mov [rbp+var_70], rax loc_596B3: jmp short loc_596E6 loc_596B5: cmp [rbp+var_44], 0 jnz short loc_596E4 cmp [rbp+var_30], 0 jz short loc_596CD mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_596CD: mov rax, [rbp+var_38] mov dword ptr [rax], 54h ; 'T' mov [rbp+var_8], 0 jmp loc_5976C loc_596E4: jmp short loc_596F4 loc_596E6: jmp short $+2 loc_596E8: mov al, 1 test al, 1 jnz loc_595CB jmp short $+2 loc_596F4: cmp [rbp+var_30], 0 jz short loc_59706 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_59706: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_59727 mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp short loc_5976C loc_59727: cmp [rbp+var_40], 0 jz short loc_59741 mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_5976C loc_59741: cmp [rbp+var_3C], 0 jz short loc_59756 xor eax, eax sub rax, [rbp+var_70] mov [rbp+var_98], rax jmp short loc_59761 loc_59756: mov rax, [rbp+var_70] mov [rbp+var_98], rax loc_59761: mov rax, [rbp+var_98] mov [rbp+var_8], rax loc_5976C: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long my_strntoull_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { int v6; // ecx long long v9; // [rsp+18h] [rbp-88h] long long v10; // [rsp+20h] [rbp-80h] long long v11; // [rsp+28h] [rbp-78h] unsigned long long v12; // [rsp+30h] [rbp-70h] unsigned int v13; // [rsp+3Ch] [rbp-64h] unsigned long long v14; // [rsp+40h] [rbp-60h] long long ( *v15)(long long, unsigned long long *, long long, long long); // [rsp+48h] [rbp-58h] unsigned long long v16; // [rsp+50h] [rbp-50h] BYREF int v17; // [rsp+5Ch] [rbp-44h] int v18; // [rsp+60h] [rbp-40h] BOOL v19; // [rsp+64h] [rbp-3Ch] int *v20; // [rsp+68h] [rbp-38h] _QWORD *v21; // [rsp+70h] [rbp-30h] int v22; // [rsp+7Ch] [rbp-24h] long long v23; // [rsp+80h] [rbp-20h] long long v24; // [rsp+88h] [rbp-18h] long long v25; // [rsp+90h] [rbp-10h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = a5; v20 = a6; v19 = 0; v15 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v11 = a2; v10 = a3 + a2; *a6 = 0; while ( 2 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) { if ( v21 ) *v21 = v11; v6 = 33; if ( !v17 ) v6 = 84; *v20 = v6; return 0LL; } else { switch ( v16 ) { case 9uLL: case 0x20uLL: case 0x2BuLL: goto LABEL_10; case 0x2DuLL: v19 = !v19; LABEL_10: v11 += v17; continue; default: v18 = 0; v12 = 0LL; v9 = v11; v14 = 0xFFFFFFFFFFFFFFFFLL / v22; v13 = 0xFFFFFFFFFFFFFFFFLL % v22; break; } while ( 1 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) break; v11 += v17; if ( v16 < 0x30 || v16 > 0x39 ) { if ( v16 < 0x41 || v16 > 0x5A ) { if ( v16 < 0x61 || v16 > 0x7A ) goto LABEL_33; v16 = v16 - 97 + 10; } else { v16 = v16 - 65 + 10; } } else { v16 -= 48LL; } if ( (int)v16 >= v22 ) goto LABEL_33; if ( v12 > v14 || v12 == v14 && v16 > v13 ) v18 = 1; else v12 = v12 * v22 + v16; } if ( v17 ) { LABEL_33: if ( v21 ) *v21 = v11; if ( v11 == v9 ) { *v20 = 33; return 0LL; } else if ( v18 ) { *v20 = 34; return -1LL; } else if ( v19 ) { return -(long long)v12; } else { return v12; } } if ( v21 ) *v21 = v11; *v20 = 84; return 0LL; } } }
my_strntoull_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 LAB_001594ca: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x00159531 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,-0x9 MOV qword ptr [RBP + -0x90],RAX SUB RAX,0x24 JA 0x0015952d MOV RAX,qword ptr [RBP + -0x90] LEA RCX,[0x2af5dc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_20: JMP 0x0015952f caseD_9: JMP 0x0015952f caseD_2d: CMP dword ptr [RBP + -0x3c],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x3c],EAX JMP 0x0015952f caseD_2b: JMP 0x0015952f caseD_a: JMP 0x00159588 LAB_0015952f: JMP 0x00159569 LAB_00159531: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00159543 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00159543: MOV EDX,dword ptr [RBP + -0x44] MOV ECX,0x21 MOV EAX,0x54 CMP EDX,0x0 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015976c LAB_00159569: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX MOV AL,0x1 TEST AL,0x1 JNZ 0x001594ca JMP 0x00159586 LAB_00159586: JMP 0x00159588 LAB_00159588: MOV dword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x70],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x88],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x60],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x64],EAX LAB_001595cb: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x001596b5 MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x50],0x30 JC 0x0015961a CMP qword ptr [RBP + -0x50],0x39 JA 0x0015961a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x30 MOV qword ptr [RBP + -0x50],RAX JMP 0x00159663 LAB_0015961a: CMP qword ptr [RBP + -0x50],0x41 JC 0x0015963a CMP qword ptr [RBP + -0x50],0x5a JA 0x0015963a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x41 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x00159661 LAB_0015963a: CMP qword ptr [RBP + -0x50],0x61 JC 0x0015965a CMP qword ptr [RBP + -0x50],0x7a JA 0x0015965a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x61 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x0015965f LAB_0015965a: JMP 0x001596f4 LAB_0015965f: JMP 0x00159661 LAB_00159661: JMP 0x00159663 LAB_00159663: MOV RAX,qword ptr [RBP + -0x50] CMP EAX,dword ptr [RBP + -0x24] JL 0x00159671 JMP 0x001596f4 LAB_00159671: MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JA 0x00159691 MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x0015969a MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x64] CMP RAX,RCX JBE 0x0015969a LAB_00159691: MOV dword ptr [RBP + -0x40],0x1 JMP 0x001596b3 LAB_0015969a: MOVSXD RAX,dword ptr [RBP + -0x24] IMUL RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX LAB_001596b3: JMP 0x001596e6 LAB_001596b5: CMP dword ptr [RBP + -0x44],0x0 JNZ 0x001596e4 CMP qword ptr [RBP + -0x30],0x0 JZ 0x001596cd MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001596cd: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x54 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015976c LAB_001596e4: JMP 0x001596f4 LAB_001596e6: JMP 0x001596e8 LAB_001596e8: MOV AL,0x1 TEST AL,0x1 JNZ 0x001595cb JMP 0x001596f4 LAB_001596f4: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00159706 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00159706: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x00159727 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0015976c LAB_00159727: CMP dword ptr [RBP + -0x40],0x0 JZ 0x00159741 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x0015976c LAB_00159741: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x00159756 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX JMP 0x00159761 LAB_00159756: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX LAB_00159761: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x8],RAX LAB_0015976c: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00159584) */ /* WARNING: Removing unreachable block (ram,0x001596f2) */ ulong my_strntoull_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; long lVar4; ulong uVar5; int4 uVar6; ulong local_a0; long local_80; ulong local_78; ulong local_58; int local_4c; int local_48; uint local_44; int4 *local_40; long *local_38; int local_2c; long local_28; long local_20; long local_18; ulong local_10; local_44 = 0; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); *param_6 = 0; local_80 = param_2; local_40 = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; do { lVar4 = local_80; local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_38 != (long *)0x0) { *local_38 = local_80; } uVar6 = 0x21; if (local_4c == 0) { uVar6 = 0x54; } *local_40 = uVar6; return 0; } switch(local_58) { case 9: break; default: local_48 = 0; local_78 = 0; auVar2._8_8_ = 0; auVar2._0_8_ = (long)local_2c; uVar5 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar2,0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)local_2c; goto LAB_001595cb; case 0x20: break; case 0x2b: break; case 0x2d: local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1); } local_80 = local_80 + local_4c; } while( true ); LAB_001595cb: local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_4c == 0) { if (local_38 != (long *)0x0) { *local_38 = local_80; } *local_40 = 0x54; local_10 = 0; } else { LAB_001596f4: if (local_38 != (long *)0x0) { *local_38 = local_80; } if (local_80 == lVar4) { *local_40 = 0x21; local_10 = 0; } else if (local_48 == 0) { if (local_44 == 0) { local_a0 = local_78; } else { local_a0 = -local_78; } local_10 = local_a0; } else { *local_40 = 0x22; local_10 = 0xffffffffffffffff; } } return local_10; } local_80 = local_80 + local_4c; if ((local_58 < 0x30) || (0x39 < local_58)) { if ((local_58 < 0x41) || (0x5a < local_58)) { if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_001596f4; local_58 = local_58 - 0x57; } else { local_58 = local_58 - 0x37; } } else { local_58 = local_58 - 0x30; } if (local_2c <= (int)local_58) goto LAB_001596f4; if ((uVar5 < local_78) || ((local_78 == uVar5 && (SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar3,0) < local_58)))) { local_48 = 1; } else { local_78 = local_58 + (long)local_2c * local_78; } goto LAB_001595cb; }
40,123
my_wc_mb_gbk
eloqsql/strings/ctype-gbk.c
static int my_wc_mb_gbk(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((uint) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_gbk_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL2; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O0
c
my_wc_mb_gbk: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x43dab movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x43e24 movq -0x18(%rbp), %rax cmpl $0x80, %eax jae 0x43dcb movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x43e24 movq -0x18(%rbp), %rax movl %eax, %edi callq 0x440f0 movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x43de7 movl $0x0, -0x4(%rbp) jmp 0x43e24 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x43dfe movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x43e24 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_wc_mb_gbk: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_43DAB mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_43E24 loc_43DAB: mov rax, [rbp+var_18] cmp eax, 80h jnb short loc_43DCB mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_43E24 loc_43DCB: mov rax, [rbp+var_18] mov edi, eax call func_uni_gbk_onechar mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_43DE7 mov [rbp+var_4], 0 jmp short loc_43E24 loc_43DE7: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_43DFE mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_43E24 loc_43DFE: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_43E24: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_wc_mb_gbk(long long a1, unsigned int a2, _BYTE *a3, unsigned long long a4) { int v5; // [rsp+4h] [rbp-2Ch] if ( (unsigned long long)a3 < a4 ) { if ( a2 >= 0x80 ) { v5 = func_uni_gbk_onechar(a2); if ( v5 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = BYTE1(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } else { return 0; } } else { *a3 = a2; return 1; } } else { return (unsigned int)-101; } }
my_wc_mb_gbk: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00143dab MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00143e24 LAB_00143dab: MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JNC 0x00143dcb MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00143e24 LAB_00143dcb: MOV RAX,qword ptr [RBP + -0x18] MOV EDI,EAX CALL 0x001440f0 MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x00143de7 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00143e24 LAB_00143de7: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00143dfe MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00143e24 LAB_00143dfe: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_00143e24: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_wc_mb_gbk(int8 param_1,uint param_2,int1 *param_3,int1 *param_4) { int iVar1; int4 local_c; if (param_3 < param_4) { if (param_2 < 0x80) { *param_3 = (char)param_2; local_c = 1; } else { iVar1 = func_uni_gbk_onechar(param_2); if (iVar1 == 0) { local_c = 0; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)((uint)iVar1 >> 8); param_3[1] = (char)iVar1; local_c = 2; } } } else { local_c = 0xffffff9b; } return local_c; }
40,124
ps_fetch_from_1_to_8_bytes
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
void ps_fetch_from_1_to_8_bytes(MYSQL_BIND *r_param, const MYSQL_FIELD * const field, unsigned char **row, unsigned int byte_count) { my_bool is_unsigned= test(field->flags & UNSIGNED_FLAG); r_param->buffer_length= byte_count; switch (byte_count) { case 1: *(uchar *)r_param->buffer= **row; *r_param->error= is_unsigned != r_param->is_unsigned && *(uchar *)r_param->buffer > INT_MAX8; break; case 2: shortstore(r_param->buffer, ((ushort) sint2korr(*row))); *r_param->error= is_unsigned != r_param->is_unsigned && *(ushort *)r_param->buffer > INT_MAX16; break; case 4: { longstore(r_param->buffer, ((uint32)sint4korr(*row))); *r_param->error= is_unsigned != r_param->is_unsigned && *(uint32 *)r_param->buffer > INT_MAX32; } break; case 8: { ulonglong val= (ulonglong)sint8korr(*row); longlongstore(r_param->buffer, val); *r_param->error= is_unsigned != r_param->is_unsigned && val > LONGLONG_MAX ; } break; default: r_param->buffer_length= 0; break; } (*row)+= byte_count; }
O0
c
ps_fetch_from_1_to_8_bytes: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x10(%rbp), %rax movl 0x64(%rax), %eax andl $0x20, %eax shrl $0x5, %eax movb %al, -0x1d(%rbp) movl -0x1c(%rbp), %eax movl %eax, %ecx movq -0x8(%rbp), %rax movq %rcx, 0x40(%rax) movl -0x1c(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x38(%rbp) subl $0x7, %eax ja 0x32b41 movq -0x38(%rbp), %rax leaq 0x20031(%rip), %rcx # 0x52840 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movq (%rax), %rax movb (%rax), %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, (%rax) movsbl -0x1d(%rbp), %ecx movq -0x8(%rbp), %rax movsbl 0x65(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x39(%rbp) je 0x32854 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movzbl (%rax), %eax cmpl $0x7f, %eax setg %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) jmp 0x32b4d jmp 0x3286f movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax cwtl movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx movswl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, (%rax) movl -0x24(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, 0x1(%rax) movsbl -0x1d(%rbp), %ecx movq -0x8(%rbp), %rax movsbl 0x65(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x3a(%rbp) je 0x328e0 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movzwl (%rax), %eax cmpl $0x7fff, %eax # imm = 0x7FFF setg %al movb %al, -0x3a(%rbp) movb -0x3a(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) jmp 0x32b4d jmp 0x328fb movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax shrl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, 0x1(%rax) movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax shrl $0x10, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, 0x2(%rax) movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax shrl $0x18, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movb %cl, 0x3(%rax) movsbl -0x1d(%rbp), %ecx movq -0x8(%rbp), %rax movsbl 0x65(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x3b(%rbp) je 0x32a56 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movl (%rax), %eax cmpq $0x7fffffff, %rax # imm = 0x7FFFFFFF setg %al movb %al, -0x3b(%rbp) movb -0x3b(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) jmp 0x32b4d movq -0x18(%rbp), %rax movq (%rax), %rax movzbl (%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x3(%rcx), %ecx shll $0x18, %ecx addl %ecx, %eax movl %eax, %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movzbl 0x4(%rcx), %ecx movq -0x18(%rbp), %rdx movq (%rdx), %rdx movzbl 0x5(%rdx), %edx shll $0x8, %edx addl %edx, %ecx movq -0x18(%rbp), %rdx movq (%rdx), %rdx movzbl 0x6(%rdx), %edx shll $0x10, %edx addl %edx, %ecx movq -0x18(%rbp), %rdx movq (%rdx), %rdx movzbl 0x7(%rdx), %edx shll $0x18, %edx addl %edx, %ecx movl %ecx, %ecx shlq $0x20, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq -0x30(%rbp), %rcx movq %rcx, (%rax) movsbl -0x1d(%rbp), %ecx movq -0x8(%rbp), %rax movsbl 0x65(%rax), %edx xorl %eax, %eax cmpl %edx, %ecx movb %al, -0x3c(%rbp) je 0x32b2b movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0x30(%rbp) seta %al movb %al, -0x3c(%rbp) movb -0x3c(%rbp), %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb %cl, (%rax) jmp 0x32b4d movq -0x8(%rbp), %rax movq $0x0, 0x40(%rax) movl -0x1c(%rbp), %edx movq -0x18(%rbp), %rax movq (%rax), %rcx movl %edx, %edx addq %rdx, %rcx movq %rcx, (%rax) popq %rbp retq nopw %cs:(%rax,%rax)
ps_fetch_from_1_to_8_bytes: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov rax, [rbp+var_10] mov eax, [rax+64h] and eax, 20h shr eax, 5 mov [rbp+var_1D], al mov eax, [rbp+var_1C] mov ecx, eax mov rax, [rbp+var_8] mov [rax+40h], rcx mov eax, [rbp+var_1C] dec eax; switch 8 cases mov ecx, eax mov [rbp+var_38], rcx sub eax, 7 ja def_32816; jumptable 0000000000032816 default case, cases 3,5-7 mov rax, [rbp+var_38] lea rcx, jpt_32816 movsxd rax, ds:(jpt_32816 - 52840h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_32818: mov rax, [rbp+var_18]; jumptable 0000000000032816 case 1 mov rax, [rax] mov cl, [rax] mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax], cl movsx ecx, [rbp+var_1D] mov rax, [rbp+var_8] movsx edx, byte ptr [rax+65h] xor eax, eax cmp ecx, edx mov [rbp+var_39], al jz short loc_32854 mov rax, [rbp+var_8] mov rax, [rax+10h] movzx eax, byte ptr [rax] cmp eax, 7Fh setnle al mov [rbp+var_39], al loc_32854: mov al, [rbp+var_39] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl jmp loc_32B4D loc_3286D: jmp short $+2; jumptable 0000000000032816 case 2 loc_3286F: mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] cwde mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] movsx ecx, cx shl ecx, 8 add eax, ecx movzx eax, ax mov [rbp+var_24], eax mov eax, [rbp+var_24] mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax], cl mov eax, [rbp+var_24] shr eax, 8 mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax+1], cl movsx ecx, [rbp+var_1D] mov rax, [rbp+var_8] movsx edx, byte ptr [rax+65h] xor eax, eax cmp ecx, edx mov [rbp+var_3A], al jz short loc_328E0 mov rax, [rbp+var_8] mov rax, [rax+10h] movzx eax, word ptr [rax] cmp eax, 7FFFh setnle al mov [rbp+var_3A], al loc_328E0: mov al, [rbp+var_3A] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl jmp loc_32B4D loc_328F9: jmp short $+2; jumptable 0000000000032816 case 4 loc_328FB: mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] movsx ecx, cx shl ecx, 18h add eax, ecx mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax], cl mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] movsx ecx, cx shl ecx, 18h add eax, ecx shr eax, 8 mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax+1], cl mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] movsx ecx, cx shl ecx, 18h add eax, ecx shr eax, 10h mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax+2], cl mov rax, [rbp+var_18] mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] movsx ecx, cx shl ecx, 18h add eax, ecx shr eax, 18h mov cl, al mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rax+3], cl movsx ecx, [rbp+var_1D] mov rax, [rbp+var_8] movsx edx, byte ptr [rax+65h] xor eax, eax cmp ecx, edx mov [rbp+var_3B], al jz short loc_32A56 mov rax, [rbp+var_8] mov rax, [rax+10h] mov eax, [rax] cmp rax, 7FFFFFFFh setnle al mov [rbp+var_3B], al loc_32A56: mov al, [rbp+var_3B] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl jmp loc_32B4D loc_32A6F: mov rax, [rbp+var_18]; jumptable 0000000000032816 case 8 mov rax, [rax] movzx eax, byte ptr [rax] mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+3] shl ecx, 18h add eax, ecx mov eax, eax mov rcx, [rbp+var_18] mov rcx, [rcx] movzx ecx, byte ptr [rcx+4] mov rdx, [rbp+var_18] mov rdx, [rdx] movzx edx, byte ptr [rdx+5] shl edx, 8 add ecx, edx mov rdx, [rbp+var_18] mov rdx, [rdx] movzx edx, byte ptr [rdx+6] shl edx, 10h add ecx, edx mov rdx, [rbp+var_18] mov rdx, [rdx] movzx edx, byte ptr [rdx+7] shl edx, 18h add ecx, edx mov ecx, ecx shl rcx, 20h add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rbp+var_30] mov [rax], rcx movsx ecx, [rbp+var_1D] mov rax, [rbp+var_8] movsx edx, byte ptr [rax+65h] xor eax, eax cmp ecx, edx mov [rbp+var_3C], al jz short loc_32B2B mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_30], rax setnbe al mov [rbp+var_3C], al loc_32B2B: mov al, [rbp+var_3C] and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rax], cl jmp short loc_32B4D def_32816: mov rax, [rbp+var_8]; jumptable 0000000000032816 default case, cases 3,5-7 mov qword ptr [rax+40h], 0 loc_32B4D: mov edx, [rbp+var_1C] mov rax, [rbp+var_18] mov rcx, [rax] mov edx, edx add rcx, rdx mov [rax], rcx pop rbp retn
_BYTE ** ps_fetch_from_1_to_8_bytes(long long a1, long long a2, _BYTE **a3, unsigned int a4) { _BYTE **result; // rax bool v5; // [rsp+0h] [rbp-3Ch] bool v6; // [rsp+1h] [rbp-3Bh] bool v7; // [rsp+2h] [rbp-3Ah] bool v8; // [rsp+3h] [rbp-39h] unsigned long long v9; // [rsp+Ch] [rbp-30h] char v10; // [rsp+1Fh] [rbp-1Dh] v10 = (*(_DWORD *)(a2 + 100) & 0x20u) >> 5; *(_QWORD *)(a1 + 64) = a4; switch ( a4 ) { case 1u: **(_BYTE **)(a1 + 16) = **a3; v8 = 0; if ( v10 != *(char *)(a1 + 101) ) v8 = **(unsigned __int8 **)(a1 + 16) > 0x7Fu; **(_BYTE **)(a1 + 24) = v8; break; case 2u: **(_WORD **)(a1 + 16) = ((unsigned __int8)(*a3)[1] << 8) + (unsigned __int8)**a3; v7 = 0; if ( v10 != *(char *)(a1 + 101) ) v7 = **(unsigned __int16 **)(a1 + 16) > 0x7FFFu; **(_BYTE **)(a1 + 24) = v7; break; case 4u: **(_BYTE **)(a1 + 16) = **a3; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 1LL) = (unsigned __int16)(((unsigned __int8)(*a3)[1] << 8) + (unsigned __int8)**a3) >> 8; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 2LL) = (((unsigned __int8)(*a3)[3] << 24) + ((unsigned __int8)(*a3)[2] << 16) + ((unsigned __int8)(*a3)[1] << 8) + (unsigned int)(unsigned __int8)**a3) >> 16; *(_BYTE *)(*(_QWORD *)(a1 + 16) + 3LL) = (((unsigned __int8)(*a3)[3] << 24) + ((unsigned __int8)(*a3)[2] << 16) + ((unsigned __int8)(*a3)[1] << 8) + (unsigned int)(unsigned __int8)**a3) >> 24; v6 = 0; if ( v10 != *(char *)(a1 + 101) ) v6 = **(unsigned int **)(a1 + 16) > 0x7FFFFFFFuLL; **(_BYTE **)(a1 + 24) = v6; break; case 8u: v9 = ((unsigned long long)(((unsigned __int8)(*a3)[7] << 24) + ((unsigned __int8)(*a3)[6] << 16) + ((unsigned __int8)(*a3)[5] << 8) + (unsigned int)(unsigned __int8)(*a3)[4]) << 32) + ((unsigned __int8)(*a3)[3] << 24) + ((unsigned __int8)(*a3)[2] << 16) + ((unsigned __int8)(*a3)[1] << 8) + (unsigned int)(unsigned __int8)**a3; **(_QWORD **)(a1 + 16) = v9; v5 = 0; if ( v10 != *(char *)(a1 + 101) ) v5 = v9 > 0x7FFFFFFFFFFFFFFFLL; **(_BYTE **)(a1 + 24) = v5; break; default: *(_QWORD *)(a1 + 64) = 0LL; break; } result = a3; *a3 += a4; return result; }
ps_fetch_from_1_to_8_bytes: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x64] AND EAX,0x20 SHR EAX,0x5 MOV byte ptr [RBP + -0x1d],AL MOV EAX,dword ptr [RBP + -0x1c] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],RCX MOV EAX,dword ptr [RBP + -0x1c] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x38],RCX SUB EAX,0x7 JA 0x00132b41 MOV RAX,qword ptr [RBP + -0x38] LEA RCX,[0x152840] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX],CL MOVSX ECX,byte ptr [RBP + -0x1d] MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x65] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x39],AL JZ 0x00132854 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f SETG AL MOV byte ptr [RBP + -0x39],AL LAB_00132854: MOV AL,byte ptr [RBP + -0x39] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL JMP 0x00132b4d caseD_2: JMP 0x0013286f LAB_0013286f: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] CWDE MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] MOVSX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x24] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX + 0x1],CL MOVSX ECX,byte ptr [RBP + -0x1d] MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x65] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x3a],AL JZ 0x001328e0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOVZX EAX,word ptr [RAX] CMP EAX,0x7fff SETG AL MOV byte ptr [RBP + -0x3a],AL LAB_001328e0: MOV AL,byte ptr [RBP + -0x3a] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL JMP 0x00132b4d caseD_4: JMP 0x001328fb LAB_001328fb: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX SHR EAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV byte ptr [RAX + 0x3],CL MOVSX ECX,byte ptr [RBP + -0x1d] MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x65] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x3b],AL JZ 0x00132a56 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RAX] CMP RAX,0x7fffffff SETG AL MOV byte ptr [RBP + -0x3b],AL LAB_00132a56: MOV AL,byte ptr [RBP + -0x3b] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL JMP 0x00132b4d caseD_8: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x18 ADD EAX,ECX MOV EAX,EAX MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOVZX ECX,byte ptr [RCX + 0x4] MOV RDX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RDX] MOVZX EDX,byte ptr [RDX + 0x5] SHL EDX,0x8 ADD ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RDX] MOVZX EDX,byte ptr [RDX + 0x6] SHL EDX,0x10 ADD ECX,EDX MOV RDX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RDX] MOVZX EDX,byte ptr [RDX + 0x7] SHL EDX,0x18 ADD ECX,EDX MOV ECX,ECX SHL RCX,0x20 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOVSX ECX,byte ptr [RBP + -0x1d] MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x65] XOR EAX,EAX CMP ECX,EDX MOV byte ptr [RBP + -0x3c],AL JZ 0x00132b2b MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0x30],RAX SETA AL MOV byte ptr [RBP + -0x3c],AL LAB_00132b2b: MOV AL,byte ptr [RBP + -0x3c] AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],CL JMP 0x00132b4d caseD_3: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],0x0 LAB_00132b4d: MOV EDX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV EDX,EDX ADD RCX,RDX MOV qword ptr [RAX],RCX POP RBP RET
void ps_fetch_from_1_to_8_bytes(long param_1,long param_2,long *param_3,uint param_4) { char cVar1; uint uVar2; ulong uVar3; bool local_44; bool local_43; bool local_42; bool local_41; cVar1 = (char)((*(uint *)(param_2 + 100) & 0x20) >> 5); *(ulong *)(param_1 + 0x40) = (ulong)param_4; switch(param_4) { case 1: **(int1 **)(param_1 + 0x10) = *(int1 *)*param_3; local_41 = false; if (cVar1 != *(char *)(param_1 + 0x65)) { local_41 = 0x7f < **(byte **)(param_1 + 0x10); } *(bool *)*(int8 *)(param_1 + 0x18) = local_41; break; case 2: uVar2 = (int)(short)(ushort)*(byte *)*param_3 + (short)(ushort)*(byte *)(*param_3 + 1) * 0x100 & 0xffff; **(int1 **)(param_1 + 0x10) = (char)uVar2; *(char *)(*(long *)(param_1 + 0x10) + 1) = (char)(uVar2 >> 8); local_42 = false; if (cVar1 != *(char *)(param_1 + 0x65)) { local_42 = 0x7fff < **(ushort **)(param_1 + 0x10); } *(bool *)*(int8 *)(param_1 + 0x18) = local_42; break; default: *(int8 *)(param_1 + 0x40) = 0; break; case 4: **(int1 **)(param_1 + 0x10) = *(int1 *)*param_3; *(char *)(*(long *)(param_1 + 0x10) + 1) = (char)((uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 >> 8); *(char *)(*(long *)(param_1 + 0x10) + 2) = (char)((uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 + (uint)*(byte *)(*param_3 + 2) * 0x10000 >> 0x10); *(char *)(*(long *)(param_1 + 0x10) + 3) = (char)((uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 + (uint)*(byte *)(*param_3 + 2) * 0x10000 + (short)(ushort)*(byte *)(*param_3 + 3) * 0x1000000 >> 0x18); local_43 = false; if (cVar1 != *(char *)(param_1 + 0x65)) { local_43 = 0x7fffffff < **(uint **)(param_1 + 0x10); } *(bool *)*(int8 *)(param_1 + 0x18) = local_43; break; case 8: uVar3 = CONCAT44((uint)*(byte *)(*param_3 + 4) + (uint)*(byte *)(*param_3 + 5) * 0x100 + (uint)*(byte *)(*param_3 + 6) * 0x10000 + (uint)*(byte *)(*param_3 + 7) * 0x1000000, (uint)*(byte *)*param_3 + (uint)*(byte *)(*param_3 + 1) * 0x100 + (uint)*(byte *)(*param_3 + 2) * 0x10000 + (uint)*(byte *)(*param_3 + 3) * 0x1000000); **(ulong **)(param_1 + 0x10) = uVar3; local_44 = cVar1 != *(char *)(param_1 + 0x65) && 0x7fffffffffffffff < uVar3; *(bool *)*(int8 *)(param_1 + 0x18) = local_44; } *param_3 = *param_3 + (ulong)param_4; return; }
40,125
my_strnncollsp_tis620
eloqsql/strings/ctype-tis620.c
static int my_strnncollsp_tis620(CHARSET_INFO * cs __attribute__((unused)), const uchar *a0, size_t a_length, const uchar *b0, size_t b_length) { uchar buf[80], *end, *a, *b, *alloced= NULL; size_t length; int res= 0; a= buf; if ((a_length + b_length +2) > (int) sizeof(buf)) alloced= a= (uchar*) my_malloc(PSI_INSTRUMENT_ME, a_length+b_length+2, MYF(MY_FAE)); b= a + a_length+1; if (a_length) memcpy((char*) a, (char*) a0, a_length); a[a_length]= 0; /* if length(a0)> len1, need to put 'end of string' */ if (b_length) memcpy((char *)b, (char *)b0, b_length); b[b_length]= 0; /* put end of string */ a_length= thai2sortable(a, a_length); b_length= thai2sortable(b, b_length); end= a + (length= MY_MIN(a_length, b_length)); while (a < end) { if (*a++ != *b++) { res= ((int) a[-1] - (int) b[-1]); goto ret; } } res= a_length == b_length ? 0 : a_length < b_length ? -my_strnncollsp_padspace_bin(b, b_length - length) : my_strnncollsp_padspace_bin(a, a_length - length); ret: if (alloced) my_free(alloced); return res; }
O3
c
my_strnncollsp_tis620: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r8, %r14 movq %rcx, -0x90(%rbp) movq %rdx, %r15 movq %rsi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq (%rdx,%r8), %rsi addq $0x2, %rsi cmpq $0x51, %rsi jb 0x3b0f8 movl $0x8, %edx xorl %edi, %edi callq 0x2b4d5 movq %rax, %r12 movq %rax, -0x88(%rbp) jmp 0x3b107 movq $0x0, -0x88(%rbp) leaq -0x80(%rbp), %r12 leaq (%r12,%r15), %r13 testq %r15, %r15 je 0x3b11e movq %r12, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x24220 leaq (%r12,%r15), %rbx incq %rbx movb $0x0, (%r13) testq %r14, %r14 je 0x3b141 movq %rbx, %rdi movq -0x90(%rbp), %rsi movq %r14, %rdx callq 0x24220 movb $0x0, (%rbx,%r14) movq %r12, %rdi movq %r15, %rsi callq 0x3b29f movq %rbx, %rdi movq %r14, %rsi callq 0x3b29f cmpq %r14, %r15 movq %r14, %rax cmovbq %r15, %rax leaq (%r12,%rax), %rcx cmpq %rcx, %r12 jae 0x3b187 movzbl (%r12), %r13d movzbl 0x1(%r12,%r15), %edx incq %r12 cmpb %dl, %r13b je 0x3b16a subl %edx, %r13d jmp 0x3b1bc xorl %r13d, %r13d cmpq %r14, %r15 je 0x3b1bc jae 0x3b1ab leaq (%r15,%r12), %rdi incq %rdi subq %rax, %r14 movq %r14, %rsi callq 0x2f7b5 movl %eax, %r13d negl %r13d jmp 0x3b1bc subq %rax, %r15 movq %r12, %rdi movq %r15, %rsi callq 0x2f7b5 movl %eax, %r13d movq -0x88(%rbp), %rdi testq %rdi, %rdi je 0x3b1cd callq 0x2b702 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x3b1ee movl %r13d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24320
my_strnncollsp_tis620: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, r8 mov [rbp+var_90], rcx mov r15, rdx mov rbx, rsi mov rax, fs:28h mov [rbp+var_30], rax lea rsi, [rdx+r8] add rsi, 2 cmp rsi, 51h ; 'Q' jb short loc_3B0F8 mov edx, 8 xor edi, edi call my_malloc mov r12, rax mov [rbp+var_88], rax jmp short loc_3B107 loc_3B0F8: mov [rbp+var_88], 0 lea r12, [rbp+var_80] loc_3B107: lea r13, [r12+r15] test r15, r15 jz short loc_3B11E mov rdi, r12 mov rsi, rbx mov rdx, r15 call _memcpy loc_3B11E: lea rbx, [r12+r15] inc rbx mov byte ptr [r13+0], 0 test r14, r14 jz short loc_3B141 mov rdi, rbx mov rsi, [rbp+var_90] mov rdx, r14 call _memcpy loc_3B141: mov byte ptr [rbx+r14], 0 mov rdi, r12 mov rsi, r15 call thai2sortable mov rdi, rbx mov rsi, r14 call thai2sortable cmp r15, r14 mov rax, r14 cmovb rax, r15 lea rcx, [r12+rax] loc_3B16A: cmp r12, rcx jnb short loc_3B187 movzx r13d, byte ptr [r12] movzx edx, byte ptr [r12+r15+1] inc r12 cmp r13b, dl jz short loc_3B16A sub r13d, edx jmp short loc_3B1BC loc_3B187: xor r13d, r13d cmp r15, r14 jz short loc_3B1BC jnb short loc_3B1AB lea rdi, [r15+r12] inc rdi sub r14, rax mov rsi, r14 call my_strnncollsp_padspace_bin mov r13d, eax neg r13d jmp short loc_3B1BC loc_3B1AB: sub r15, rax mov rdi, r12 mov rsi, r15 call my_strnncollsp_padspace_bin mov r13d, eax loc_3B1BC: mov rdi, [rbp+var_88] test rdi, rdi jz short loc_3B1CD call my_free loc_3B1CD: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_3B1EE mov eax, r13d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3B1EE: call ___stack_chk_fail
long long my_strnncollsp_tis620(long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5) { unsigned long long v8; // rsi unsigned __int8 *v9; // r12 unsigned long long v10; // rax unsigned __int8 *v11; // rcx int v12; // r13d int v13; // edx unsigned int v14; // r13d long long v17; // [rsp+8h] [rbp-88h] char v18; // [rsp+10h] [rbp-80h] BYREF unsigned long long v19; // [rsp+60h] [rbp-30h] v19 = __readfsqword(0x28u); v8 = a3 + a5 + 2; if ( v8 < 0x51 ) { v17 = 0LL; v9 = (unsigned __int8 *)&v18; } else { v9 = (unsigned __int8 *)my_malloc(0, v8, 8); v17 = (long long)v9; } if ( a3 ) memcpy(v9, a2, a3); v9[a3] = 0; if ( a5 ) memcpy(&v9[a3 + 1], a4, a5); v9[a3 + 1 + a5] = 0; thai2sortable(v9, a3); thai2sortable(&v9[a3 + 1], a5); v10 = a5; if ( a3 < a5 ) v10 = a3; v11 = &v9[v10]; while ( v9 < v11 ) { v12 = *v9; v13 = v9[a3 + 1]; ++v9; if ( (_BYTE)v12 != (_BYTE)v13 ) { v14 = v12 - v13; goto LABEL_18; } } v14 = 0; if ( a3 != a5 ) { if ( a3 >= a5 ) v14 = my_strnncollsp_padspace_bin((long long)v9, a3 - v10); else v14 = -(int)my_strnncollsp_padspace_bin((long long)&v9[a3 + 1], a5 - v10); } LABEL_18: if ( v17 ) my_free(v17); return v14; }
my_strnncollsp_tis620: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,R8 MOV qword ptr [RBP + -0x90],RCX MOV R15,RDX MOV RBX,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RSI,[RDX + R8*0x1] ADD RSI,0x2 CMP RSI,0x51 JC 0x0013b0f8 MOV EDX,0x8 XOR EDI,EDI CALL 0x0012b4d5 MOV R12,RAX MOV qword ptr [RBP + -0x88],RAX JMP 0x0013b107 LAB_0013b0f8: MOV qword ptr [RBP + -0x88],0x0 LEA R12,[RBP + -0x80] LAB_0013b107: LEA R13,[R12 + R15*0x1] TEST R15,R15 JZ 0x0013b11e MOV RDI,R12 MOV RSI,RBX MOV RDX,R15 CALL 0x00124220 LAB_0013b11e: LEA RBX,[R12 + R15*0x1] INC RBX MOV byte ptr [R13],0x0 TEST R14,R14 JZ 0x0013b141 MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x90] MOV RDX,R14 CALL 0x00124220 LAB_0013b141: MOV byte ptr [RBX + R14*0x1],0x0 MOV RDI,R12 MOV RSI,R15 CALL 0x0013b29f MOV RDI,RBX MOV RSI,R14 CALL 0x0013b29f CMP R15,R14 MOV RAX,R14 CMOVC RAX,R15 LEA RCX,[R12 + RAX*0x1] LAB_0013b16a: CMP R12,RCX JNC 0x0013b187 MOVZX R13D,byte ptr [R12] MOVZX EDX,byte ptr [R12 + R15*0x1 + 0x1] INC R12 CMP R13B,DL JZ 0x0013b16a SUB R13D,EDX JMP 0x0013b1bc LAB_0013b187: XOR R13D,R13D CMP R15,R14 JZ 0x0013b1bc JNC 0x0013b1ab LEA RDI,[R15 + R12*0x1] INC RDI SUB R14,RAX MOV RSI,R14 CALL 0x0012f7b5 MOV R13D,EAX NEG R13D JMP 0x0013b1bc LAB_0013b1ab: SUB R15,RAX MOV RDI,R12 MOV RSI,R15 CALL 0x0012f7b5 MOV R13D,EAX LAB_0013b1bc: MOV RDI,qword ptr [RBP + -0x88] TEST RDI,RDI JZ 0x0013b1cd CALL 0x0012b702 LAB_0013b1cd: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0013b1ee MOV EAX,R13D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013b1ee: CALL 0x00124320
int my_strnncollsp_tis620 (int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5) { byte *pbVar1; byte bVar2; byte *__dest; byte *pbVar3; ulong uVar4; int iVar5; long in_FS_OFFSET; byte *local_90; byte local_88 [80]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = param_3 + param_5 + 2; if (uVar4 < 0x51) { local_90 = (byte *)0x0; __dest = local_88; } else { __dest = (byte *)my_malloc(0,uVar4,8); local_90 = __dest; } if (param_3 != 0) { memcpy(__dest,param_2,param_3); } pbVar3 = __dest + param_3 + 1; __dest[param_3] = 0; if (param_5 != 0) { memcpy(pbVar3,param_4,param_5); } pbVar3[param_5] = 0; thai2sortable(__dest,param_3); thai2sortable(pbVar3,param_5); uVar4 = param_5; if (param_3 < param_5) { uVar4 = param_3; } pbVar3 = __dest + uVar4; do { if (pbVar3 <= __dest) { iVar5 = 0; if (param_3 != param_5) { if (param_3 < param_5) { iVar5 = my_strnncollsp_padspace_bin(__dest + param_3 + 1,param_5 - uVar4); iVar5 = -iVar5; } else { iVar5 = my_strnncollsp_padspace_bin(__dest,param_3 - uVar4); } } goto LAB_0013b1bc; } bVar2 = *__dest; pbVar1 = __dest + param_3 + 1; __dest = __dest + 1; } while (bVar2 == *pbVar1); iVar5 = (uint)bVar2 - (uint)*pbVar1; LAB_0013b1bc: if (local_90 != (byte *)0x0) { my_free(); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar5; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
40,126
create_tailoring
eloqsql/strings/ctype-uca.c
static my_bool create_tailoring(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { MY_COLL_RULES rules; MY_UCA_INFO new_uca, *src_uca= NULL; int rc= 0; uint i; *loader->error= '\0'; if (!cs->tailoring) return 0; /* Ok to add a collation without tailoring */ memset(&rules, 0, sizeof(rules)); rules.loader= loader; rules.uca= cs->uca ? cs->uca : &my_uca_v400; /* For logical positions, etc */ memset(&new_uca, 0, sizeof(new_uca)); /* Parse ICU Collation Customization expression */ if ((rc= my_coll_rule_parse(&rules, cs->tailoring, cs->tailoring + strlen(cs->tailoring)))) goto ex; if (rules.version == 520) /* Unicode-5.2.0 requested */ { src_uca= &my_uca_v520; cs->caseinfo= &my_unicase_unicode520; } else if (rules.version == 400) /* Unicode-4.0.0 requested */ { src_uca= &my_uca_v400; cs->caseinfo= &my_unicase_default; } else /* No Unicode version specified */ { src_uca= cs->uca ? cs->uca : &my_uca_v400; if (!cs->caseinfo) cs->caseinfo= &my_unicase_default; } cs->levels_for_order= rules.strength ? rules.strength : 1; for (i= 0; i != cs->levels_for_order; i++) { if ((rc= (src_uca->level[i].maxchar == 0))) { my_snprintf(loader->error, sizeof(loader->error) - 1, "%s: no level #%d data for this Unicode version.", cs->coll_name.str, i + 1); goto ex; } if ((rc= init_weight_level(loader, &rules, &new_uca.level[i], &src_uca->level[i]))) goto ex; } if (!(cs->uca= (MY_UCA_INFO *) (loader->once_alloc)(sizeof(MY_UCA_INFO)))) { rc= 1; goto ex; } cs->uca[0]= new_uca; if (cs->levels_for_order > 1) cs->coll= (cs->state & MY_CS_NOPAD) ? &my_uca_collation_handler_nopad_multilevel_generic : &my_uca_collation_handler_multilevel_generic; ex: (loader->free)(rules.rule); if (rc != 0 && loader->error[0]) loader->reporter(ERROR_LEVEL, "%s", loader->error); return rc; }
O0
c
create_tailoring: pushq %rbp movq %rsp, %rbp subq $0x160, %rsp # imm = 0x160 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq $0x0, -0x128(%rbp) movl $0x0, -0x12c(%rbp) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x62a53 movb $0x0, -0x1(%rbp) jmp 0x62d90 leaq -0x50(%rbp), %rdi xorl %esi, %esi movl $0x38, %edx callq 0x251e0 movq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x62a87 movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq %rax, -0x138(%rbp) jmp 0x62a97 leaq 0x271ba2(%rip), %rax # 0x2d4630 movq %rax, -0x138(%rbp) jmp 0x62a97 movq -0x138(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x120(%rbp), %rdi xorl %esi, %esi movl $0xd0, %edx callq 0x251e0 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x140(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x148(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x25170 movq -0x148(%rbp), %rdx movq -0x140(%rbp), %rsi addq %rax, %rdx leaq -0x50(%rbp), %rdi callq 0x62da0 movl %eax, -0x12c(%rbp) cmpl $0x0, %eax je 0x62b0a jmp 0x62d45 cmpl $0x208, -0x50(%rbp) # imm = 0x208 jne 0x62b35 leaq 0x276c7e(%rip), %rax # 0x2d9798 movq %rax, -0x128(%rbp) movq -0x10(%rbp), %rax leaq 0x185114(%rip), %rcx # 0x1e7c40 movq %rcx, 0x78(%rax) jmp 0x62bb5 cmpl $0x190, -0x50(%rbp) # imm = 0x190 jne 0x62b5d leaq 0x271aeb(%rip), %rax # 0x2d4630 movq %rax, -0x128(%rbp) movq -0x10(%rbp), %rax leaq 0x1850b9(%rip), %rcx # 0x1e7c10 movq %rcx, 0x78(%rax) jmp 0x62bb3 movq -0x10(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x62b79 movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq %rax, -0x150(%rbp) jmp 0x62b89 leaq 0x271ab0(%rip), %rax # 0x2d4630 movq %rax, -0x150(%rbp) jmp 0x62b89 movq -0x150(%rbp), %rax movq %rax, -0x128(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x78(%rax) jne 0x62bb1 movq -0x10(%rbp), %rax leaq 0x185063(%rip), %rcx # 0x1e7c10 movq %rcx, 0x78(%rax) jmp 0x62bb3 jmp 0x62bb5 cmpl $0x0, -0x4c(%rbp) je 0x62bc6 movl -0x4c(%rbp), %eax movl %eax, -0x154(%rbp) jmp 0x62bd3 movl $0x1, %eax movl %eax, -0x154(%rbp) jmp 0x62bd3 movl -0x154(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0xb2(%rax) movl $0x0, -0x130(%rbp) movl -0x130(%rbp), %eax movq -0x10(%rbp), %rcx movzbl 0xb2(%rcx), %ecx cmpl %ecx, %eax je 0x62cc4 movq -0x128(%rbp), %rax movl -0x130(%rbp), %ecx imulq $0x38, %rcx, %rcx addq %rcx, %rax cmpq $0x0, (%rax) sete %al movb %al, %cl andb $0x1, %cl movzbl %cl, %ecx movl %ecx, -0x12c(%rbp) testb $0x1, %al jne 0x62c37 jmp 0x62c66 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx movl -0x130(%rbp), %r8d addl $0x1, %r8d movl $0x7f, %esi leaq 0x2fc5d(%rip), %rdx # 0x928b7 movb $0x0, %al callq 0x8b070 jmp 0x62d45 movq -0x18(%rbp), %rdi leaq -0x120(%rbp), %rdx movl -0x130(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rdx movq -0x128(%rbp), %rcx movl -0x130(%rbp), %eax imulq $0x38, %rax, %rax addq %rax, %rcx leaq -0x50(%rbp), %rsi callq 0x62e80 movsbl %al, %eax movl %eax, -0x12c(%rbp) cmpl $0x0, %eax je 0x62cae jmp 0x62d45 jmp 0x62cb0 movl -0x130(%rbp), %eax addl $0x1, %eax movl %eax, -0x130(%rbp) jmp 0x62bef movq -0x18(%rbp), %rax movl $0xd0, %edi callq *0x80(%rax) movq -0x10(%rbp), %rcx movq %rax, 0x60(%rcx) cmpq $0x0, %rax jne 0x62ced movl $0x1, -0x12c(%rbp) jmp 0x62d45 movq -0x10(%rbp), %rax movq 0x60(%rax), %rdi leaq -0x120(%rbp), %rsi movl $0xd0, %edx callq 0x252a0 movq -0x10(%rbp), %rax movzbl 0xb2(%rax), %eax cmpl $0x1, %eax jle 0x62d43 movq -0x10(%rbp), %rax movl 0xc(%rax), %edx andl $0x20000, %edx # imm = 0x20000 leaq 0x182466(%rip), %rcx # 0x1e5190 leaq 0x1824cf(%rip), %rax # 0x1e5200 cmpl $0x0, %edx cmovneq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0xc0(%rax) jmp 0x62d45 movq -0x18(%rbp), %rax movq 0x98(%rax), %rax movq -0x30(%rbp), %rdi callq *%rax cmpl $0x0, -0x12c(%rbp) je 0x62d87 movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x62d87 movq -0x18(%rbp), %rax movq 0xa0(%rax), %rcx movq -0x18(%rbp), %rdx xorl %edi, %edi leaq 0x2b6a2(%rip), %rsi # 0x8e425 movb $0x0, %al callq *%rcx movl -0x12c(%rbp), %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x160, %rsp # imm = 0x160 popq %rbp retq nopl (%rax)
create_tailoring: push rbp mov rbp, rsp sub rsp, 160h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_128], 0 mov [rbp+var_12C], 0 mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jnz short loc_62A53 mov [rbp+var_1], 0 jmp loc_62D90 loc_62A53: lea rdi, [rbp+var_50] xor esi, esi mov edx, 38h ; '8' call _memset mov rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+var_10] cmp qword ptr [rax+60h], 0 jz short loc_62A87 mov rax, [rbp+var_10] mov rax, [rax+60h] mov [rbp+var_138], rax jmp short loc_62A97 loc_62A87: lea rax, my_uca_v400 mov [rbp+var_138], rax jmp short $+2 loc_62A97: mov rax, [rbp+var_138] mov [rbp+var_48], rax lea rdi, [rbp+var_120] xor esi, esi mov edx, 0D0h call _memset mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_140], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_148], rax mov rax, [rbp+var_10] mov rdi, [rax+38h] call _strlen mov rdx, [rbp+var_148] mov rsi, [rbp+var_140] add rdx, rax lea rdi, [rbp+var_50] call my_coll_rule_parse mov [rbp+var_12C], eax cmp eax, 0 jz short loc_62B0A jmp loc_62D45 loc_62B0A: cmp [rbp+var_50], 208h jnz short loc_62B35 lea rax, my_uca_v520 mov [rbp+var_128], rax mov rax, [rbp+var_10] lea rcx, my_unicase_unicode520 mov [rax+78h], rcx jmp loc_62BB5 loc_62B35: cmp [rbp+var_50], 190h jnz short loc_62B5D lea rax, my_uca_v400 mov [rbp+var_128], rax mov rax, [rbp+var_10] lea rcx, my_unicase_default mov [rax+78h], rcx jmp short loc_62BB3 loc_62B5D: mov rax, [rbp+var_10] cmp qword ptr [rax+60h], 0 jz short loc_62B79 mov rax, [rbp+var_10] mov rax, [rax+60h] mov [rbp+var_150], rax jmp short loc_62B89 loc_62B79: lea rax, my_uca_v400 mov [rbp+var_150], rax jmp short $+2 loc_62B89: mov rax, [rbp+var_150] mov [rbp+var_128], rax mov rax, [rbp+var_10] cmp qword ptr [rax+78h], 0 jnz short loc_62BB1 mov rax, [rbp+var_10] lea rcx, my_unicase_default mov [rax+78h], rcx loc_62BB1: jmp short $+2 loc_62BB3: jmp short $+2 loc_62BB5: cmp [rbp+var_4C], 0 jz short loc_62BC6 mov eax, [rbp+var_4C] mov [rbp+var_154], eax jmp short loc_62BD3 loc_62BC6: mov eax, 1 mov [rbp+var_154], eax jmp short $+2 loc_62BD3: mov eax, [rbp+var_154] mov cl, al mov rax, [rbp+var_10] mov [rax+0B2h], cl mov [rbp+var_130], 0 loc_62BEF: mov eax, [rbp+var_130] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+0B2h] cmp eax, ecx jz loc_62CC4 mov rax, [rbp+var_128] mov ecx, [rbp+var_130] imul rcx, 38h ; '8' add rax, rcx cmp qword ptr [rax], 0 setz al mov cl, al and cl, 1 movzx ecx, cl mov [rbp+var_12C], ecx test al, 1 jnz short loc_62C37 jmp short loc_62C66 loc_62C37: mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rcx, [rax+20h] mov r8d, [rbp+var_130] add r8d, 1 mov esi, 7Fh lea rdx, aSNoLevelDDataF; "%s: no level #%d data for this Unicode "... mov al, 0 call my_snprintf jmp loc_62D45 loc_62C66: mov rdi, [rbp+var_18] lea rdx, [rbp+var_120] mov eax, [rbp+var_130] imul rax, 38h ; '8' add rdx, rax mov rcx, [rbp+var_128] mov eax, [rbp+var_130] imul rax, 38h ; '8' add rcx, rax lea rsi, [rbp+var_50] call init_weight_level movsx eax, al mov [rbp+var_12C], eax cmp eax, 0 jz short loc_62CAE jmp loc_62D45 loc_62CAE: jmp short $+2 loc_62CB0: mov eax, [rbp+var_130] add eax, 1 mov [rbp+var_130], eax jmp loc_62BEF loc_62CC4: mov rax, [rbp+var_18] mov edi, 0D0h call qword ptr [rax+80h] mov rcx, [rbp+var_10] mov [rcx+60h], rax cmp rax, 0 jnz short loc_62CED mov [rbp+var_12C], 1 jmp short loc_62D45 loc_62CED: mov rax, [rbp+var_10] mov rdi, [rax+60h] lea rsi, [rbp+var_120] mov edx, 0D0h call _memcpy mov rax, [rbp+var_10] movzx eax, byte ptr [rax+0B2h] cmp eax, 1 jle short loc_62D43 mov rax, [rbp+var_10] mov edx, [rax+0Ch] and edx, 20000h lea rcx, my_uca_collation_handler_multilevel_generic lea rax, my_uca_collation_handler_nopad_multilevel_generic cmp edx, 0 cmovnz rcx, rax mov rax, [rbp+var_10] mov [rax+0C0h], rcx loc_62D43: jmp short $+2 loc_62D45: mov rax, [rbp+var_18] mov rax, [rax+98h] mov rdi, [rbp+var_30] call rax cmp [rbp+var_12C], 0 jz short loc_62D87 mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_62D87 mov rax, [rbp+var_18] mov rcx, [rax+0A0h] mov rdx, [rbp+var_18] xor edi, edi lea rsi, aS+2; "%s" mov al, 0 call rcx loc_62D87: mov eax, [rbp+var_12C] mov [rbp+var_1], al loc_62D90: mov al, [rbp+var_1] add rsp, 160h pop rbp retn
char create_tailoring(long long a1, const char *a2) { long long v2; // rax int v3; // r9d char inited; // al long long v5; // rax long long ( **v6)(); // rcx char v8; // [rsp+Ch] [rbp-154h] _UNKNOWN **v9; // [rsp+10h] [rbp-150h] long long v10; // [rsp+20h] [rbp-140h] void *v11; // [rsp+28h] [rbp-138h] unsigned int i; // [rsp+30h] [rbp-130h] int v13; // [rsp+34h] [rbp-12Ch] _UNKNOWN **v14; // [rsp+38h] [rbp-128h] _QWORD v15[26]; // [rsp+40h] [rbp-120h] BYREF int v16; // [rsp+110h] [rbp-50h] BYREF int v17; // [rsp+114h] [rbp-4Ch] void *v18; // [rsp+118h] [rbp-48h] long long v19; // [rsp+130h] [rbp-30h] const char *v20; // [rsp+138h] [rbp-28h] const char *v21; // [rsp+148h] [rbp-18h] long long v22; // [rsp+150h] [rbp-10h] v22 = a1; v21 = a2; *a2 = 0; if ( !*(_QWORD *)(v22 + 56) ) return 0; memset(&v16, 0LL, 56LL); v20 = v21; if ( *(_QWORD *)(v22 + 96) ) v11 = *(void **)(v22 + 96); else v11 = &my_uca_v400; v18 = v11; memset(v15, 0LL, sizeof(v15)); v10 = *(_QWORD *)(v22 + 56); v2 = strlen(v10); v13 = my_coll_rule_parse(&v16, v10, v2 + v10); if ( !v13 ) { if ( v16 == 520 ) { v14 = &my_uca_v520; *(_QWORD *)(v22 + 120) = &my_unicase_unicode520; } else if ( v16 == 400 ) { v14 = (_UNKNOWN **)&my_uca_v400; *(_QWORD *)(v22 + 120) = &my_unicase_default; } else { if ( *(_QWORD *)(v22 + 96) ) v9 = *(_UNKNOWN ***)(v22 + 96); else v9 = (_UNKNOWN **)&my_uca_v400; v14 = v9; if ( !*(_QWORD *)(v22 + 120) ) *(_QWORD *)(v22 + 120) = &my_unicase_default; } if ( v17 ) v8 = v17; else v8 = 1; *(_BYTE *)(v22 + 178) = v8; for ( i = 0; i != *(unsigned __int8 *)(v22 + 178); ++i ) { v13 = v14[7 * i] == 0LL; if ( !v14[7 * i] ) { my_snprintf( (_DWORD)v21, 127, (unsigned int)"%s: no level #%d data for this Unicode version.", *(_QWORD *)(v22 + 32), i + 1, v3); goto LABEL_31; } inited = init_weight_level(v21, &v16, &v15[7 * i], &v14[7 * i]); v13 = inited; if ( inited ) goto LABEL_31; } v5 = (*((long long ( **)(long long))v21 + 16))(208LL); *(_QWORD *)(v22 + 96) = v5; if ( v5 ) { memcpy(*(_QWORD *)(v22 + 96), v15, 208LL); if ( *(unsigned __int8 *)(v22 + 178) > 1u ) { v6 = my_uca_collation_handler_multilevel_generic; if ( (*(_DWORD *)(v22 + 12) & 0x20000) != 0 ) v6 = my_uca_collation_handler_nopad_multilevel_generic; *(_QWORD *)(v22 + 192) = v6; } } else { v13 = 1; } } LABEL_31: (*((void ( **)(long long))v21 + 19))(v19); if ( v13 && *v21 ) (*((void (**)(_QWORD, const char *, ...))v21 + 20))(0LL, "%s", v21); return v13; }
create_tailoring: PUSH RBP MOV RBP,RSP SUB RSP,0x160 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x128],0x0 MOV dword ptr [RBP + -0x12c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x00162a53 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00162d90 LAB_00162a53: LEA RDI,[RBP + -0x50] XOR ESI,ESI MOV EDX,0x38 CALL 0x001251e0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x60],0x0 JZ 0x00162a87 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x138],RAX JMP 0x00162a97 LAB_00162a87: LEA RAX,[0x3d4630] MOV qword ptr [RBP + -0x138],RAX JMP 0x00162a97 LAB_00162a97: MOV RAX,qword ptr [RBP + -0x138] MOV qword ptr [RBP + -0x48],RAX LEA RDI,[RBP + -0x120] XOR ESI,ESI MOV EDX,0xd0 CALL 0x001251e0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x140],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x148],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x00125170 MOV RDX,qword ptr [RBP + -0x148] MOV RSI,qword ptr [RBP + -0x140] ADD RDX,RAX LEA RDI,[RBP + -0x50] CALL 0x00162da0 MOV dword ptr [RBP + -0x12c],EAX CMP EAX,0x0 JZ 0x00162b0a JMP 0x00162d45 LAB_00162b0a: CMP dword ptr [RBP + -0x50],0x208 JNZ 0x00162b35 LEA RAX,[0x3d9798] MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2e7c40] MOV qword ptr [RAX + 0x78],RCX JMP 0x00162bb5 LAB_00162b35: CMP dword ptr [RBP + -0x50],0x190 JNZ 0x00162b5d LEA RAX,[0x3d4630] MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2e7c10] MOV qword ptr [RAX + 0x78],RCX JMP 0x00162bb3 LAB_00162b5d: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x60],0x0 JZ 0x00162b79 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x150],RAX JMP 0x00162b89 LAB_00162b79: LEA RAX,[0x3d4630] MOV qword ptr [RBP + -0x150],RAX JMP 0x00162b89 LAB_00162b89: MOV RAX,qword ptr [RBP + -0x150] MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x78],0x0 JNZ 0x00162bb1 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x2e7c10] MOV qword ptr [RAX + 0x78],RCX LAB_00162bb1: JMP 0x00162bb3 LAB_00162bb3: JMP 0x00162bb5 LAB_00162bb5: CMP dword ptr [RBP + -0x4c],0x0 JZ 0x00162bc6 MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x154],EAX JMP 0x00162bd3 LAB_00162bc6: MOV EAX,0x1 MOV dword ptr [RBP + -0x154],EAX JMP 0x00162bd3 LAB_00162bd3: MOV EAX,dword ptr [RBP + -0x154] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0xb2],CL MOV dword ptr [RBP + -0x130],0x0 LAB_00162bef: MOV EAX,dword ptr [RBP + -0x130] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0xb2] CMP EAX,ECX JZ 0x00162cc4 MOV RAX,qword ptr [RBP + -0x128] MOV ECX,dword ptr [RBP + -0x130] IMUL RCX,RCX,0x38 ADD RAX,RCX CMP qword ptr [RAX],0x0 SETZ AL MOV CL,AL AND CL,0x1 MOVZX ECX,CL MOV dword ptr [RBP + -0x12c],ECX TEST AL,0x1 JNZ 0x00162c37 JMP 0x00162c66 LAB_00162c37: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] MOV R8D,dword ptr [RBP + -0x130] ADD R8D,0x1 MOV ESI,0x7f LEA RDX,[0x1928b7] MOV AL,0x0 CALL 0x0018b070 JMP 0x00162d45 LAB_00162c66: MOV RDI,qword ptr [RBP + -0x18] LEA RDX,[RBP + -0x120] MOV EAX,dword ptr [RBP + -0x130] IMUL RAX,RAX,0x38 ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x128] MOV EAX,dword ptr [RBP + -0x130] IMUL RAX,RAX,0x38 ADD RCX,RAX LEA RSI,[RBP + -0x50] CALL 0x00162e80 MOVSX EAX,AL MOV dword ptr [RBP + -0x12c],EAX CMP EAX,0x0 JZ 0x00162cae JMP 0x00162d45 LAB_00162cae: JMP 0x00162cb0 LAB_00162cb0: MOV EAX,dword ptr [RBP + -0x130] ADD EAX,0x1 MOV dword ptr [RBP + -0x130],EAX JMP 0x00162bef LAB_00162cc4: MOV RAX,qword ptr [RBP + -0x18] MOV EDI,0xd0 CALL qword ptr [RAX + 0x80] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x60],RAX CMP RAX,0x0 JNZ 0x00162ced MOV dword ptr [RBP + -0x12c],0x1 JMP 0x00162d45 LAB_00162ced: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[RBP + -0x120] MOV EDX,0xd0 CALL 0x001252a0 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0xb2] CMP EAX,0x1 JLE 0x00162d43 MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xc] AND EDX,0x20000 LEA RCX,[0x2e5190] LEA RAX,[0x2e5200] CMP EDX,0x0 CMOVNZ RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc0],RCX LAB_00162d43: JMP 0x00162d45 LAB_00162d45: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x98] MOV RDI,qword ptr [RBP + -0x30] CALL RAX CMP dword ptr [RBP + -0x12c],0x0 JZ 0x00162d87 MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00162d87 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0xa0] MOV RDX,qword ptr [RBP + -0x18] XOR EDI,EDI LEA RSI,[0x18e425] MOV AL,0x0 CALL RCX LAB_00162d87: MOV EAX,dword ptr [RBP + -0x12c] MOV byte ptr [RBP + -0x1],AL LAB_00162d90: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x160 POP RBP RET
int1 create_tailoring(long param_1,char *param_2) { int8 uVar1; char cVar2; size_t sVar3; long lVar4; int1 *puVar5; int1 local_15c; int1 *local_158; int1 *local_140; uint local_138; uint local_134; int1 *local_130; int1 local_128 [208]; int local_58; int local_54; int1 *local_50; int8 local_38; char *local_30; char *local_20; long local_18; int1 local_9; *param_2 = '\0'; if (*(long *)(param_1 + 0x38) == 0) { local_9 = 0; } else { local_20 = param_2; local_18 = param_1; memset(&local_58,0,0x38); local_30 = local_20; if (*(long *)(local_18 + 0x60) == 0) { local_140 = my_uca_v400; } else { local_140 = *(int1 **)(local_18 + 0x60); } local_50 = local_140; memset(local_128,0,0xd0); uVar1 = *(int8 *)(local_18 + 0x38); lVar4 = *(long *)(local_18 + 0x38); sVar3 = strlen(*(char **)(local_18 + 0x38)); local_134 = my_coll_rule_parse(&local_58,uVar1,lVar4 + sVar3); if (local_134 == 0) { if (local_58 == 0x208) { local_130 = my_uca_v520; *(int1 **)(local_18 + 0x78) = my_unicase_unicode520; } else if (local_58 == 400) { local_130 = my_uca_v400; *(int1 **)(local_18 + 0x78) = my_unicase_default; } else { if (*(long *)(local_18 + 0x60) == 0) { local_158 = my_uca_v400; } else { local_158 = *(int1 **)(local_18 + 0x60); } local_130 = local_158; if (*(long *)(local_18 + 0x78) == 0) { *(int1 **)(local_18 + 0x78) = my_unicase_default; } } if (local_54 == 0) { local_15c = 1; } else { local_15c = (int1)local_54; } *(int1 *)(local_18 + 0xb2) = local_15c; for (local_138 = 0; local_138 != *(byte *)(local_18 + 0xb2); local_138 = local_138 + 1) { local_134 = (uint)(*(long *)(local_130 + (ulong)local_138 * 0x38) == 0); if (*(long *)(local_130 + (ulong)local_138 * 0x38) == 0) { my_snprintf(local_20,0x7f,"%s: no level #%d data for this Unicode version.", *(int8 *)(local_18 + 0x20),local_138 + 1); goto LAB_00162d45; } cVar2 = init_weight_level(local_20,&local_58,local_128 + (ulong)local_138 * 0x38, local_130 + (ulong)local_138 * 0x38); local_134 = (uint)cVar2; if (local_134 != 0) goto LAB_00162d45; } lVar4 = (**(code **)(local_20 + 0x80))(0xd0); *(long *)(local_18 + 0x60) = lVar4; if (lVar4 == 0) { local_134 = 1; } else { memcpy(*(void **)(local_18 + 0x60),local_128,0xd0); if (1 < *(byte *)(local_18 + 0xb2)) { puVar5 = my_uca_collation_handler_multilevel_generic; if ((*(uint *)(local_18 + 0xc) & 0x20000) != 0) { puVar5 = my_uca_collation_handler_nopad_multilevel_generic; } *(int1 **)(local_18 + 0xc0) = puVar5; } } } LAB_00162d45: (**(code **)(local_20 + 0x98))(local_38); if ((local_134 != 0) && (*local_20 != '\0')) { (**(code **)(local_20 + 0xa0))(0,&DAT_0018e425,local_20); } local_9 = (int1)local_134; } return local_9; }
40,127
glfwFreeMonitor
untodesu[P]riteg/build_O3/_deps/glfw-src/src/monitor.c
void _glfwFreeMonitor(_GLFWmonitor* monitor) { if (monitor == NULL) return; _glfwPlatformFreeMonitor(monitor); _glfwFreeGammaArrays(&monitor->originalRamp); _glfwFreeGammaArrays(&monitor->currentRamp); free(monitor->modes); free(monitor->name); free(monitor); }
O3
c
glfwFreeMonitor: testq %rdi, %rdi je 0x1bb6d pushq %rbx movq %rdi, %rbx callq 0x20f85 leaq 0x48(%rbx), %rdi callq 0x1bbb9 leaq 0x68(%rbx), %rdi callq 0x1bbb9 movq 0x20(%rbx), %rdi callq 0xca50 movq (%rbx), %rdi callq 0xca50 movq %rbx, %rdi popq %rbx jmp 0xca50 retq
_glfwFreeMonitor: test rdi, rdi jz short locret_1BB6D push rbx mov rbx, rdi call _glfwPlatformFreeMonitor lea rdi, [rbx+48h] call _glfwFreeGammaArrays lea rdi, [rbx+68h] call _glfwFreeGammaArrays mov rdi, [rbx+20h] call _free mov rdi, [rbx] call _free mov rdi, rbx pop rbx jmp _free locret_1BB6D: retn
long long glfwFreeMonitor(_QWORD *a1) { long long result; // rax if ( a1 ) { glfwPlatformFreeMonitor(); glfwFreeGammaArrays(a1 + 9); glfwFreeGammaArrays(a1 + 13); free(a1[4]); free(*a1); return free(a1); } return result; }
_glfwFreeMonitor: TEST RDI,RDI JZ 0x0011bb6d PUSH RBX MOV RBX,RDI CALL 0x00120f85 LEA RDI,[RBX + 0x48] CALL 0x0011bbb9 LEA RDI,[RBX + 0x68] CALL 0x0011bbb9 MOV RDI,qword ptr [RBX + 0x20] CALL 0x0010ca50 MOV RDI,qword ptr [RBX] CALL 0x0010ca50 MOV RDI,RBX POP RBX JMP 0x0010ca50 LAB_0011bb6d: RET
void _glfwFreeMonitor(int8 *param_1) { if (param_1 != (int8 *)0x0) { _glfwPlatformFreeMonitor(); _glfwFreeGammaArrays(param_1 + 9); _glfwFreeGammaArrays(param_1 + 0xd); free((void *)param_1[4]); free((void *)*param_1); free(param_1); return; } return; }
40,128
alloc_dynamic
eloqsql/mysys/array.c
void *alloc_dynamic(DYNAMIC_ARRAY *array) { DBUG_ENTER("alloc_dynamic"); DBUG_ASSERT(array->size_of_element); /* Ensure init() is called */ if (array->elements == array->max_element) { char *new_ptr; if (array->malloc_flags & MY_INIT_BUFFER_USED) { /* In this scenario, the buffer is statically preallocated, so we have to create an all-new malloc since we overflowed */ if (!(new_ptr= (char *) my_malloc(array->m_psi_key, (array->max_element+ array->alloc_increment) * array->size_of_element, MYF(array->malloc_flags | MY_WME)))) DBUG_RETURN(0); if (array->elements) memcpy(new_ptr, array->buffer, array->elements * array->size_of_element); array->malloc_flags&= ~MY_INIT_BUFFER_USED; } else if (!(new_ptr=(char*) my_realloc(array->m_psi_key, array->buffer, (array->max_element+ array->alloc_increment) * array->size_of_element, MYF(MY_WME | MY_ALLOW_ZERO_PTR | array->malloc_flags)))) DBUG_RETURN(0); array->buffer= (uchar*) new_ptr; array->max_element+=array->alloc_increment; } DBUG_RETURN(array->buffer+(array->elements++ * array->size_of_element)); }
O0
c
alloc_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) jmp 0x80e9e movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jne 0x80fc7 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax je 0x80f5a movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movq -0x10(%rbp), %rcx addl 0x10(%rcx), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %esi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx orq $0x10, %rdx callq 0x7c9f0 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x80f15 jmp 0x80f08 movq $0x0, -0x8(%rbp) jmp 0x80ff0 movq -0x10(%rbp), %rax cmpl $0x0, 0x8(%rax) je 0x80f42 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x360b0 movq -0x10(%rbp), %rax movabsq $0xfffffeff, %rcx # imm = 0xFFFFFEFF andq 0x20(%rax), %rcx movq %rcx, 0x20(%rax) jmp 0x80fab movq -0x10(%rbp), %rax movl 0x18(%rax), %edi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movq -0x10(%rbp), %rcx addl 0x10(%rcx), %eax movq -0x10(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax movl %eax, %edx movq -0x10(%rbp), %rax movq 0x20(%rax), %rcx orq $0x50, %rcx callq 0x7cbc0 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x80fa9 jmp 0x80f9f movq $0x0, -0x8(%rbp) jmp 0x80ff0 jmp 0x80fab movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movl 0x10(%rax), %ecx movq -0x10(%rbp), %rax addl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) jmp 0x80fc9 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rdx movl 0x8(%rdx), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, 0x8(%rdx) movq -0x10(%rbp), %rdx imull 0x14(%rdx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
alloc_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi jmp short $+2 loc_80E9E: mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jnz loc_80FC7 mov rax, [rbp+var_10] mov rax, [rax+20h] and rax, 100h cmp rax, 0 jz loc_80F5A mov rax, [rbp+var_10] mov edi, [rax+18h] mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov rcx, [rbp+var_10] add eax, [rcx+10h] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov esi, eax mov rax, [rbp+var_10] mov rdx, [rax+20h] or rdx, 10h call my_malloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_80F15 jmp short $+2 loc_80F08: mov [rbp+var_8], 0 jmp loc_80FF0 loc_80F15: mov rax, [rbp+var_10] cmp dword ptr [rax+8], 0 jz short loc_80F42 mov rdi, [rbp+var_18] mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax call _memcpy loc_80F42: mov rax, [rbp+var_10] mov rcx, 0FFFFFEFFh and rcx, [rax+20h] mov [rax+20h], rcx jmp short loc_80FAB loc_80F5A: mov rax, [rbp+var_10] mov edi, [rax+18h] mov rax, [rbp+var_10] mov rsi, [rax] mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov rcx, [rbp+var_10] add eax, [rcx+10h] mov rcx, [rbp+var_10] imul eax, [rcx+14h] mov eax, eax mov edx, eax mov rax, [rbp+var_10] mov rcx, [rax+20h] or rcx, 50h call my_realloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_80FA9 jmp short $+2 loc_80F9F: mov [rbp+var_8], 0 jmp short loc_80FF0 loc_80FA9: jmp short $+2 loc_80FAB: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov ecx, [rax+10h] mov rax, [rbp+var_10] add ecx, [rax+0Ch] mov [rax+0Ch], ecx loc_80FC7: jmp short $+2 loc_80FC9: mov rax, [rbp+var_10] mov rax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+8] mov esi, ecx add esi, 1 mov [rdx+8], esi mov rdx, [rbp+var_10] imul ecx, [rdx+14h] mov ecx, ecx add rax, rcx mov [rbp+var_8], rax loc_80FF0: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long alloc_dynamic(long long *a1) { long long v1; // rax int v2; // ecx long long v4; // [rsp+8h] [rbp-18h] if ( *((_DWORD *)a1 + 2) != *((_DWORD *)a1 + 3) ) goto LABEL_11; if ( (a1[4] & 0x100) == 0 ) { v4 = my_realloc( *((_DWORD *)a1 + 6), *a1, (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + *((_DWORD *)a1 + 3))), *((_BYTE *)a1 + 32) | 0x50u); if ( !v4 ) return 0LL; goto LABEL_10; } v4 = my_malloc( *((_DWORD *)a1 + 6), (unsigned int)(*((_DWORD *)a1 + 5) * (*((_DWORD *)a1 + 4) + *((_DWORD *)a1 + 3))), *((_DWORD *)a1 + 8) | 0x10u); if ( v4 ) { if ( *((_DWORD *)a1 + 2) ) memcpy(v4, *a1, (unsigned int)(*((_DWORD *)a1 + 5) * *((_DWORD *)a1 + 2))); a1[4] &= 0xFFFFFEFFuLL; LABEL_10: *a1 = v4; *((_DWORD *)a1 + 3) += *((_DWORD *)a1 + 4); LABEL_11: v1 = *a1; v2 = *((_DWORD *)a1 + 2); *((_DWORD *)a1 + 2) = v2 + 1; return (unsigned int)(*((_DWORD *)a1 + 5) * v2) + v1; } return 0LL; }
alloc_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI JMP 0x00180e9e LAB_00180e9e: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x00180fc7 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x100 CMP RAX,0x0 JZ 0x00180f5a MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV RCX,qword ptr [RBP + -0x10] ADD EAX,dword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x20] OR RDX,0x10 CALL 0x0017c9f0 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x00180f15 JMP 0x00180f08 LAB_00180f08: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00180ff0 LAB_00180f15: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x0 JZ 0x00180f42 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX CALL 0x001360b0 LAB_00180f42: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,0xfffffeff AND RCX,qword ptr [RAX + 0x20] MOV qword ptr [RAX + 0x20],RCX JMP 0x00180fab LAB_00180f5a: MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV RCX,qword ptr [RBP + -0x10] ADD EAX,dword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x10] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x20] OR RCX,0x50 CALL 0x0017cbc0 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x00180fa9 JMP 0x00180f9f LAB_00180f9f: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00180ff0 LAB_00180fa9: JMP 0x00180fab LAB_00180fab: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] ADD ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX LAB_00180fc7: JMP 0x00180fc9 LAB_00180fc9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x8] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RDX + 0x8],ESI MOV RDX,qword ptr [RBP + -0x10] IMUL ECX,dword ptr [RDX + 0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_00180ff0: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long alloc_dynamic(long *param_1) { long lVar1; void *local_20; if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) { if ((param_1[4] & 0x100U) == 0) { local_20 = (void *)my_realloc((int)param_1[3],*param_1, (*(int *)((long)param_1 + 0xc) + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),param_1[4] | 0x50); if (local_20 == (void *)0x0) { return 0; } } else { local_20 = (void *)my_malloc((int)param_1[3], (*(int *)((long)param_1 + 0xc) + (int)param_1[2]) * *(int *)((long)param_1 + 0x14),param_1[4] | 0x10); if (local_20 == (void *)0x0) { return 0; } if ((int)param_1[1] != 0) { memcpy(local_20,(void *)*param_1, (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))); } param_1[4] = param_1[4] & 0xfffffeff; } *param_1 = (long)local_20; *(int *)((long)param_1 + 0xc) = (int)param_1[2] + *(int *)((long)param_1 + 0xc); } lVar1 = param_1[1]; *(int *)(param_1 + 1) = (int)lVar1 + 1; return *param_1 + (ulong)(uint)((int)lVar1 * *(int *)((long)param_1 + 0x14)); }
40,129
ggml_ssm_conv
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_ssm_conv( struct ggml_context * ctx, struct ggml_tensor * sx, struct ggml_tensor * c) { GGML_ASSERT(ggml_is_3d(sx)); GGML_ASSERT(ggml_is_matrix(c)); const int64_t d_conv = c->ne[0]; const int64_t d_inner = c->ne[1]; const int64_t n_t = sx->ne[0] - d_conv + 1; // tokens per sequence const int64_t n_s = sx->ne[2]; // TODO: maybe support other strides than 1? // FIXME: this is always true? GGML_ASSERT(sx->ne[0] == d_conv - 1 + n_t); GGML_ASSERT(sx->ne[1] == d_inner); GGML_ASSERT(n_t >= 0); struct ggml_tensor * result = ggml_new_tensor_3d(ctx, GGML_TYPE_F32, d_inner, n_t, n_s); result->op = GGML_OP_SSM_CONV; result->src[0] = sx; result->src[1] = c; return result; }
O1
c
ggml_ssm_conv: pushq %r14 pushq %rbx subq $0x18, %rsp cmpq $0x1, 0x28(%rsi) jne 0x20036 movq %rdx, %rbx cmpq $0x1, 0x20(%rdx) jne 0x2001a cmpq $0x1, 0x28(%rbx) jne 0x2001a movq %rsi, %r14 movq 0x18(%rbx), %rax cmpq %rax, 0x18(%rsi) jne 0x20052 movq 0x10(%r14), %rdx subq 0x10(%rbx), %rdx cmpq $-0x2, %rdx jle 0x2006e movq 0x20(%r14), %rsi incq %rdx movq %rsp, %rcx movq %rax, (%rcx) movq %rdx, 0x8(%rcx) movq %rsi, 0x10(%rcx) xorl %esi, %esi movl $0x3, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1b871 movl $0x3f, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x18, %rsp popq %rbx popq %r14 retq leaq 0x2c54e(%rip), %rdi # 0x4c56f leaq 0x2c599(%rip), %rdx # 0x4c5c1 leaq 0x2cec1(%rip), %rcx # 0x4cef0 movl $0x114c, %esi # imm = 0x114C jmp 0x20088 leaq 0x2c532(%rip), %rdi # 0x4c56f leaq 0x2c57d(%rip), %rdx # 0x4c5c1 leaq 0x2ce96(%rip), %rcx # 0x4cee1 movl $0x114b, %esi # imm = 0x114B jmp 0x20088 leaq 0x2c516(%rip), %rdi # 0x4c56f leaq 0x2c561(%rip), %rdx # 0x4c5c1 leaq 0x2ce9b(%rip), %rcx # 0x4cf02 movl $0x1156, %esi # imm = 0x1156 jmp 0x20088 leaq 0x2c4fa(%rip), %rdi # 0x4c56f leaq 0x2c545(%rip), %rdx # 0x4c5c1 leaq 0x2ce94(%rip), %rcx # 0x4cf17 movl $0x1157, %esi # imm = 0x1157 xorl %eax, %eax callq 0x18ce0
ggml_ssm_conv: push r14 push rbx sub rsp, 18h cmp qword ptr [rsi+28h], 1 jnz loc_20036 mov rbx, rdx cmp qword ptr [rdx+20h], 1 jnz short loc_2001A cmp qword ptr [rbx+28h], 1 jnz short loc_2001A mov r14, rsi mov rax, [rbx+18h] cmp [rsi+18h], rax jnz loc_20052 mov rdx, [r14+10h] sub rdx, [rbx+10h] cmp rdx, 0FFFFFFFFFFFFFFFEh jle loc_2006E mov rsi, [r14+20h] inc rdx mov rcx, rsp mov [rcx], rax mov [rcx+8], rdx mov [rcx+10h], rsi xor esi, esi mov edx, 3 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov dword ptr [rax+50h], 3Fh ; '?' mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 18h pop rbx pop r14 retn loc_2001A: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixC; "ggml_is_matrix(c)" mov esi, 114Ch jmp short loc_20088 loc_20036: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIs3dSx; "ggml_is_3d(sx)" mov esi, 114Bh jmp short loc_20088 loc_20052: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSxNe1DInner; "sx->ne[1] == d_inner" mov esi, 1156h jmp short loc_20088 loc_2006E: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNT0; "n_t >= 0" mov esi, 1157h loc_20088: xor eax, eax call _ggml_abort
long long ggml_ssm_conv(long long a1, _QWORD *a2, _QWORD *a3, double a4, long long a5, int a6, int a7) { long long v9; // rdx long long v10; // rsi long long result; // rax const char *v12; // rcx int v13; // esi long long v14[5]; // [rsp+0h] [rbp-28h] BYREF if ( a2[5] != 1LL ) { v12 = "ggml_is_3d(sx)"; v13 = 4427; goto LABEL_11; } if ( a3[4] != 1LL || a3[5] != 1LL ) { v12 = "ggml_is_matrix(c)"; v13 = 4428; goto LABEL_11; } if ( a2[3] != a3[3] ) { v12 = "sx->ne[1] == d_inner"; v13 = 4438; goto LABEL_11; } v9 = a2[2] - a3[2]; if ( v9 <= -2 ) { v12 = "n_t >= 0"; v13 = 4439; LABEL_11: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v13, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v12, a6, a7); } v10 = a2[4]; v14[0] = a3[3]; v14[1] = v9 + 1; v14[2] = v10; result = ggml_new_tensor_impl(a1, 0, 3, v14, 0LL, 0LL, a4); *(_DWORD *)(result + 80) = 63; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_ssm_conv: PUSH R14 PUSH RBX SUB RSP,0x18 CMP qword ptr [RSI + 0x28],0x1 JNZ 0x00120036 MOV RBX,RDX CMP qword ptr [RDX + 0x20],0x1 JNZ 0x0012001a CMP qword ptr [RBX + 0x28],0x1 JNZ 0x0012001a MOV R14,RSI MOV RAX,qword ptr [RBX + 0x18] CMP qword ptr [RSI + 0x18],RAX JNZ 0x00120052 MOV RDX,qword ptr [R14 + 0x10] SUB RDX,qword ptr [RBX + 0x10] CMP RDX,-0x2 JLE 0x0012006e MOV RSI,qword ptr [R14 + 0x20] INC RDX MOV RCX,RSP MOV qword ptr [RCX],RAX MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RCX + 0x10],RSI XOR ESI,ESI MOV EDX,0x3 XOR R8D,R8D XOR R9D,R9D CALL 0x0011b871 MOV dword ptr [RAX + 0x50],0x3f MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x18 POP RBX POP R14 RET LAB_0012001a: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cef0] MOV ESI,0x114c JMP 0x00120088 LAB_00120036: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cee1] MOV ESI,0x114b JMP 0x00120088 LAB_00120052: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cf02] MOV ESI,0x1156 JMP 0x00120088 LAB_0012006e: LEA RDI,[0x14c56f] LEA RDX,[0x14c5c1] LEA RCX,[0x14cf17] MOV ESI,0x1157 LAB_00120088: XOR EAX,EAX CALL 0x00118ce0
void ggml_ssm_conv(int8 param_1,long param_2,long param_3) { long lVar1; char *pcVar2; int8 uVar3; long local_28; long local_20; int8 local_18; if (*(long *)(param_2 + 0x28) == 1) { if ((*(long *)(param_3 + 0x20) == 1) && (*(long *)(param_3 + 0x28) == 1)) { local_28 = *(long *)(param_3 + 0x18); if (*(long *)(param_2 + 0x18) == local_28) { local_20 = *(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10); if (-2 < local_20) { local_18 = *(int8 *)(param_2 + 0x20); local_20 = local_20 + 1; lVar1 = ggml_new_tensor_impl(param_1,0,3,&local_28,0,0); *(int4 *)(lVar1 + 0x50) = 0x3f; *(long *)(lVar1 + 0x98) = param_2; *(long *)(lVar1 + 0xa0) = param_3; return; } pcVar2 = "n_t >= 0"; uVar3 = 0x1157; } else { pcVar2 = "sx->ne[1] == d_inner"; uVar3 = 0x1156; } } else { pcVar2 = "ggml_is_matrix(c)"; uVar3 = 0x114c; } } else { pcVar2 = "ggml_is_3d(sx)"; uVar3 = 0x114b; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
40,130
ggml_ssm_conv
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_ssm_conv( struct ggml_context * ctx, struct ggml_tensor * sx, struct ggml_tensor * c) { GGML_ASSERT(ggml_is_3d(sx)); GGML_ASSERT(ggml_is_matrix(c)); const int64_t d_conv = c->ne[0]; const int64_t d_inner = c->ne[1]; const int64_t n_t = sx->ne[0] - d_conv + 1; // tokens per sequence const int64_t n_s = sx->ne[2]; // TODO: maybe support other strides than 1? // FIXME: this is always true? GGML_ASSERT(sx->ne[0] == d_conv - 1 + n_t); GGML_ASSERT(sx->ne[1] == d_inner); GGML_ASSERT(n_t >= 0); struct ggml_tensor * result = ggml_new_tensor_3d(ctx, GGML_TYPE_F32, d_inner, n_t, n_s); result->op = GGML_OP_SSM_CONV; result->src[0] = sx; result->src[1] = c; return result; }
O2
c
ggml_ssm_conv: pushq %r14 pushq %rbx pushq %rax cmpq $0x1, 0x28(%rsi) jne 0x25230 movq %rdx, %rbx cmpq $0x1, 0x20(%rdx) jne 0x25214 cmpq $0x1, 0x28(%rbx) jne 0x25214 movq %rsi, %r14 movq 0x18(%rbx), %rdx cmpq %rdx, 0x18(%rsi) jne 0x2524c movq 0x10(%r14), %rcx subq 0x10(%rbx), %rcx cmpq $-0x2, %rcx jle 0x25268 movq 0x20(%r14), %r8 incq %rcx xorl %esi, %esi callq 0x1eb60 movl $0x3f, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x29368(%rip), %rdi # 0x4e583 leaq 0x293b3(%rip), %rdx # 0x4e5d5 leaq 0x29cdb(%rip), %rcx # 0x4ef04 movl $0x114c, %esi # imm = 0x114C jmp 0x25282 leaq 0x2934c(%rip), %rdi # 0x4e583 leaq 0x29397(%rip), %rdx # 0x4e5d5 leaq 0x29cb0(%rip), %rcx # 0x4eef5 movl $0x114b, %esi # imm = 0x114B jmp 0x25282 leaq 0x29330(%rip), %rdi # 0x4e583 leaq 0x2937b(%rip), %rdx # 0x4e5d5 leaq 0x29cb5(%rip), %rcx # 0x4ef16 movl $0x1156, %esi # imm = 0x1156 jmp 0x25282 leaq 0x29314(%rip), %rdi # 0x4e583 leaq 0x2935f(%rip), %rdx # 0x4e5d5 leaq 0x29cae(%rip), %rcx # 0x4ef2b movl $0x1157, %esi # imm = 0x1157 xorl %eax, %eax callq 0x1f9b0
ggml_ssm_conv: push r14 push rbx push rax cmp qword ptr [rsi+28h], 1 jnz short loc_25230 mov rbx, rdx cmp qword ptr [rdx+20h], 1 jnz short loc_25214 cmp qword ptr [rbx+28h], 1 jnz short loc_25214 mov r14, rsi mov rdx, [rbx+18h] cmp [rsi+18h], rdx jnz short loc_2524C mov rcx, [r14+10h] sub rcx, [rbx+10h] cmp rcx, 0FFFFFFFFFFFFFFFEh jle short loc_25268 mov r8, [r14+20h] inc rcx xor esi, esi call _ggml_new_tensor_3d mov dword ptr [rax+50h], 3Fh ; '?' mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 8 pop rbx pop r14 retn loc_25214: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixC; "ggml_is_matrix(c)" mov esi, 114Ch jmp short loc_25282 loc_25230: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIs3dSx; "ggml_is_3d(sx)" mov esi, 114Bh jmp short loc_25282 loc_2524C: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSxNe1DInner; "sx->ne[1] == d_inner" mov esi, 1156h jmp short loc_25282 loc_25268: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNT0; "n_t >= 0" mov esi, 1157h loc_25282: xor eax, eax call _ggml_abort
long long ggml_ssm_conv( long long a1, _QWORD *a2, _QWORD *a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { char v14; // al long long v16; // rdx long long v17; // rcx long long result; // rax const char *v19; // rcx int v20; // esi if ( a2[5] != 1LL ) { v19 = "ggml_is_3d(sx)"; v20 = 4427; goto LABEL_11; } if ( a3[4] != 1LL || a3[5] != 1LL ) { v19 = "ggml_is_matrix(c)"; v20 = 4428; goto LABEL_11; } v16 = a3[3]; if ( a2[3] != v16 ) { v19 = "sx->ne[1] == d_inner"; v20 = 4438; goto LABEL_11; } v17 = a2[2] - a3[2]; if ( v17 <= -2 ) { v19 = "n_t >= 0"; v20 = 4439; LABEL_11: ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", v20, (long long)"GGML_ASSERT(%s) failed", (long long)v19, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v14); } result = ggml_new_tensor_3d(a1, 0LL, v16, v17 + 1, a2[4]); *(_DWORD *)(result + 80) = 63; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_ssm_conv: PUSH R14 PUSH RBX PUSH RAX CMP qword ptr [RSI + 0x28],0x1 JNZ 0x00125230 MOV RBX,RDX CMP qword ptr [RDX + 0x20],0x1 JNZ 0x00125214 CMP qword ptr [RBX + 0x28],0x1 JNZ 0x00125214 MOV R14,RSI MOV RDX,qword ptr [RBX + 0x18] CMP qword ptr [RSI + 0x18],RDX JNZ 0x0012524c MOV RCX,qword ptr [R14 + 0x10] SUB RCX,qword ptr [RBX + 0x10] CMP RCX,-0x2 JLE 0x00125268 MOV R8,qword ptr [R14 + 0x20] INC RCX XOR ESI,ESI CALL 0x0011eb60 MOV dword ptr [RAX + 0x50],0x3f MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x8 POP RBX POP R14 RET LAB_00125214: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14ef04] MOV ESI,0x114c JMP 0x00125282 LAB_00125230: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14eef5] MOV ESI,0x114b JMP 0x00125282 LAB_0012524c: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14ef16] MOV ESI,0x1156 JMP 0x00125282 LAB_00125268: LEA RDI,[0x14e583] LEA RDX,[0x14e5d5] LEA RCX,[0x14ef2b] MOV ESI,0x1157 LAB_00125282: XOR EAX,EAX CALL 0x0011f9b0
void ggml_ssm_conv(int8 param_1,long param_2,long param_3) { long lVar1; char *pcVar2; int8 uVar3; if (*(long *)(param_2 + 0x28) == 1) { if ((*(long *)(param_3 + 0x20) == 1) && (*(long *)(param_3 + 0x28) == 1)) { if (*(long *)(param_2 + 0x18) == *(long *)(param_3 + 0x18)) { lVar1 = *(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10); if (-2 < lVar1) { lVar1 = ggml_new_tensor_3d(param_1,0,*(long *)(param_3 + 0x18),lVar1 + 1, *(int8 *)(param_2 + 0x20)); *(int4 *)(lVar1 + 0x50) = 0x3f; *(long *)(lVar1 + 0x98) = param_2; *(long *)(lVar1 + 0xa0) = param_3; return; } pcVar2 = "n_t >= 0"; uVar3 = 0x1157; } else { pcVar2 = "sx->ne[1] == d_inner"; uVar3 = 0x1156; } } else { pcVar2 = "ggml_is_matrix(c)"; uVar3 = 0x114c; } } else { pcVar2 = "ggml_is_3d(sx)"; uVar3 = 0x114b; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c", uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
40,131
ma_search_no_save
eloqsql/storage/maria/ma_search.c
static int _ma_search_no_save(register MARIA_HA *info, MARIA_KEY *key, uint32 nextflag, register my_off_t pos, MARIA_PINNED_PAGE **res_page_link, uchar **res_page_buff) { my_bool last_key_not_used, buff_alloced; int error,flag; uint page_flag, nod_flag, used_length; uchar *keypos,*maxpos; uchar *lastkey; MARIA_KEYDEF *keyinfo= key->keyinfo; MARIA_PAGE page; MARIA_PINNED_PAGE *page_link; DBUG_ENTER("_ma_search"); DBUG_PRINT("enter",("page: %lu nextflag: %u lastpos: %lu", (ulong) (pos / info->s->block_size), nextflag, (ulong) info->cur_row.lastpos)); DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, key);); DBUG_ASSERT(info->last_key.keyinfo == key->keyinfo); if (pos == HA_OFFSET_ERROR) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ info->cur_row.lastpos= HA_OFFSET_ERROR; if (!(nextflag & (SEARCH_SMALLER | SEARCH_BIGGER | SEARCH_LAST))) DBUG_RETURN(-1); /* Not found ; return error */ DBUG_RETURN(1); /* Search at upper levels */ } alloc_on_stack(*info->stack_end_ptr, lastkey, buff_alloced, keyinfo->max_store_length); if (!lastkey) DBUG_RETURN(1); if (_ma_fetch_keypage(&page, info, keyinfo, pos, PAGECACHE_LOCK_READ, DFLT_INIT_HITS, 0, 0)) goto err; page_link= dynamic_element(&info->pinned_pages, info->pinned_pages.elements-1, MARIA_PINNED_PAGE*); DBUG_DUMP("page", page.buff, page.size); flag= (*keyinfo->bin_search)(key, &page, nextflag, &keypos, lastkey, &last_key_not_used); if (flag == MARIA_FOUND_WRONG_KEY) { _ma_print_error(info, HA_ERR_CRASHED, 0); my_errno= HA_ERR_CRASHED; goto err; } page_flag= page.flag; used_length= page.size; nod_flag= page.node; maxpos= page.buff + used_length -1; if (flag) { if ((error= _ma_search_no_save(info, key, nextflag, _ma_kpos(nod_flag,keypos), res_page_link, res_page_buff)) <= 0) goto ret_error; error= 1; /* Default return value */ if (flag >0) { if (nextflag & (SEARCH_SMALLER | SEARCH_LAST) && keypos == page.buff + info->s->keypage_header + nod_flag) goto ret_error; /* Bigger than key */ } else if (nextflag & SEARCH_BIGGER && keypos >= maxpos) goto ret_error; /* Smaller than key */ } else { /* Found matching key */ if ((nextflag & SEARCH_FIND) && nod_flag && ((keyinfo->flag & (HA_NOSAME | HA_NULL_PART)) != HA_NOSAME || (key->flag & SEARCH_PART_KEY) || info->s->base.born_transactional)) { if ((error= _ma_search_no_save(info, key, (nextflag | SEARCH_FIND) & ~(SEARCH_BIGGER | SEARCH_SMALLER | SEARCH_LAST), _ma_kpos(nod_flag,keypos), res_page_link, res_page_buff)) >= 0 || my_errno != HA_ERR_KEY_NOT_FOUND) goto ret_error; } } if ((nextflag & (SEARCH_SMALLER | SEARCH_LAST)) && flag != 0) { uint not_used[2]; if (_ma_get_prev_key(&info->last_key, &page, keypos)) goto err; /* We have to use key->flag >> 1 here to transform SEARCH_PAGE_KEY_HAS_TRANSID to SEARCH_USER_KEY_HAS_TRANSID */ if (!(nextflag & SEARCH_SMALLER) && ha_key_cmp(keyinfo->seg, info->last_key.data, key->data, key->data_length + key->ref_length, SEARCH_FIND | (key->flag >> 1) | info->last_key.flag, not_used)) { my_errno=HA_ERR_KEY_NOT_FOUND; /* Didn't find key */ goto err; } } else { /* Set info->last_key to temporarily point to last key value */ info->last_key.data= lastkey; /* Get key value (if not packed key) and position after key */ if (!(*keyinfo->get_key)(&info->last_key, page_flag, nod_flag, &keypos)) goto err; memcpy(info->lastkey_buff, lastkey, info->last_key.data_length + info->last_key.ref_length); info->last_key.data= info->lastkey_buff; } info->cur_row.lastpos= _ma_row_pos_from_key(&info->last_key); info->cur_row.trid= _ma_trid_from_key(&info->last_key); /* Store offset to key */ info->keypos_offset= (uint) (keypos - page.buff); info->maxpos_offset= (uint) (maxpos - page.buff); info->int_nod_flag= nod_flag; info->last_keypage= pos; *res_page_link= page_link; *res_page_buff= page.buff; stack_alloc_free(lastkey, buff_alloced); DBUG_PRINT("exit",("found key at %lu",(ulong) info->cur_row.lastpos)); DBUG_RETURN(0); err: DBUG_PRINT("exit",("Error: %d",my_errno)); info->cur_row.lastpos= HA_OFFSET_ERROR; info->page_changed=1; error= -1; ret_error: stack_alloc_free(lastkey, buff_alloced); DBUG_RETURN(error); }
O3
c
ma_search_no_save: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movl %edx, %r15d movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) cmpq $-0x1, %rcx je 0x3e05e movq %r9, %r14 movq %r8, %r12 movq %rsi, -0x50(%rbp) movq 0x8(%rsi), %rax movq %rax, -0x68(%rbp) movzwl 0xb0(%rax), %esi leaq -0xc0(%rbp), %rdx movq %rsi, (%rdx) movq 0x78(%rbx), %rax movq (%rax), %rax subq %rdx, %rax subq %rsi, %rax jbe 0x3df70 cmpq $0x10000, %rax # imm = 0x10000 ja 0x3df52 cmpl $0x1000, %esi # imm = 0x1000 jb 0x3df70 cmpq $0x8001, %rax # imm = 0x8001 jb 0x3df70 movq %r12, -0x58(%rbp) movq %r14, -0x60(%rbp) movq %rsp, %r13 addl $0xf, %esi andl $-0x10, %esi subq %rsi, %r13 movq %r13, %rsp movb $0x1, %al movl %eax, -0x44(%rbp) jmp 0x3df9d movq %rcx, %r13 movl $0x0, -0x44(%rbp) movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi callq 0xc3acd testq %rax, %rax je 0x3e08b movq %r12, -0x58(%rbp) movq %r14, -0x60(%rbp) movq %r13, %rcx movq %rax, %r13 leaq -0xc0(%rbp), %rdi movq %rbx, %rsi movq -0x68(%rbp), %r12 movq %r12, %rdx movq %rcx, %r14 movl $0x3, %r8d movl $0x3, %r9d pushq $0x0 pushq $0x0 callq 0x40df6 addq $0x10, %rsp testb %al, %al jne 0x3e036 movq %r14, -0x88(%rbp) movl 0x2f0(%rbx), %eax decl %eax leaq (%rax,%rax,2), %rax shlq $0x3, %rax addq 0x2e8(%rbx), %rax movq %rax, -0x80(%rbp) leaq -0xc0(%rbp), %rsi leaq -0x40(%rbp), %rcx leaq -0x45(%rbp), %r9 movq -0x50(%rbp), %rdi movl %r15d, %edx movq %r13, %r8 callq *0xd8(%r12) cmpl $0x7fffffff, %eax # imm = 0x7FFFFFFF jne 0x3e0b6 movq %rbx, %rdi movl $0x7e, %esi xorl %edx, %edx callq 0x3dc4a callq 0xc5c9a movl $0x7e, (%rax) movq $-0x1, 0x98(%rbx) movb $0x1, 0x684(%rbx) movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmpb $0x0, -0x44(%rbp) jne 0x3e091 movq %r13, %rdi callq 0xc3cfa jmp 0x3e091 callq 0xc5c9a movl $0x78, (%rax) movq $-0x1, 0x98(%rbx) andl $0x118, %r15d # imm = 0x118 xorl %r12d, %r12d cmpl $0x1, %r15d sbbl %r12d, %r12d orl $0x1, %r12d jmp 0x3e091 movl $0x1, %r12d movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x3e35e movl %r12d, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %r14d movl -0x94(%rbp), %esi movl -0xa0(%rbp), %eax movl -0x98(%rbp), %edx movq -0xb0(%rbp), %rcx addq %rcx, %rax decq %rax movq %rax, -0x78(%rbp) testl %r14d, %r14d movq %rdx, -0x70(%rbp) je 0x3e15a movl %esi, -0x34(%rbp) movq -0x40(%rbp), %rsi movl %edx, %edi callq 0x3ee07 movq %rbx, %rdi movq -0x50(%rbp), %rsi movl %r15d, %edx movq %rax, %rcx movq -0x58(%rbp), %r8 movq -0x60(%rbp), %r9 callq 0x3ded7 testl %eax, %eax jle 0x3e1d2 testl %r14d, %r14d jle 0x3e1da testl $0x110, %r15d # imm = 0x110 movq -0x70(%rbp), %rdx movl -0x34(%rbp), %esi je 0x3e29c movq (%rbx), %rax movl 0x744(%rax), %eax addq -0xb0(%rbp), %rax addq %rdx, %rax cmpq %rax, -0x40(%rbp) jne 0x3e208 movl $0x1, %r12d jmp 0x3e04e testl %edx, %edx setne %al andb %r15b, %al cmpb $0x1, %al jne 0x3e29c movq -0x68(%rbp), %rax movzwl 0xa2(%rax), %eax andl $0x11, %eax cmpw $0x1, %ax jne 0x3e198 movq -0x50(%rbp), %rax testb $0x4, 0x1a(%rax) jne 0x3e198 movq (%rbx), %rax cmpb $0x0, 0x44c(%rax) je 0x3e29c movl %esi, -0x34(%rbp) andl $0xfffffee7, %r15d # imm = 0xFFFFFEE7 movq -0x40(%rbp), %rsi movl %edx, %edi movq %rdx, %r14 callq 0x3ee07 movq %rbx, %rdi movq -0x50(%rbp), %rsi movl %r15d, %edx movq %rax, %rcx movq -0x58(%rbp), %r8 movq -0x60(%rbp), %r9 callq 0x3ded7 testl %eax, %eax js 0x3e282 movl %eax, %r12d jmp 0x3e04e testb $0x8, %r15b movq -0x70(%rbp), %rdx movl -0x34(%rbp), %esi je 0x3e1fb movl $0x1, %r12d movq -0x78(%rbp), %rax cmpq %rax, -0x40(%rbp) jae 0x3e04e testl $0x110, %r15d # imm = 0x110 je 0x3e29c leaq 0x200(%rbx), %rdi movq -0x40(%rbp), %rdx leaq -0xc0(%rbp), %rsi callq 0x40cb3 testb %al, %al jne 0x3e036 testb $0x10, %r15b jne 0x3e2e9 movq -0x68(%rbp), %rax movq 0xc0(%rax), %rdi movq 0x200(%rbx), %rsi movq -0x50(%rbp), %rax movq (%rax), %rdx movl 0x14(%rax), %ecx addl 0x10(%rax), %ecx movl 0x18(%rax), %r8d shrl %r8d orl 0x218(%rbx), %r8d orl $0x1, %r8d leaq -0xc8(%rbp), %r9 callq 0xc253e testl %eax, %eax je 0x3e2e9 callq 0xc5c9a movl $0x78, (%rax) jmp 0x3e036 callq 0xc5c9a movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmpl $0x78, (%rax) movq %r14, %rdx movl -0x34(%rbp), %esi jne 0x3e04e leaq 0x200(%rbx), %rdi movq %r13, 0x200(%rbx) leaq -0x40(%rbp), %rcx movq -0x68(%rbp), %rax callq *0xe0(%rax) testl %eax, %eax je 0x3e036 movq 0x388(%rbx), %rdi movl 0x214(%rbx), %edx addl 0x210(%rbx), %edx movq %r13, %rsi callq 0x2b0b0 movq 0x388(%rbx), %rax movq %rax, 0x200(%rbx) leaq 0x200(%rbx), %r14 movq %r14, %rdi callq 0x3ef6c movq %rax, 0x98(%rbx) movq %r14, %rdi callq 0x3f024 movq %rax, 0xc0(%rbx) movl -0x40(%rbp), %eax movq -0xb0(%rbp), %rcx subl %ecx, %eax movl %eax, 0x3c0(%rbx) movq -0x78(%rbp), %rax subl %ecx, %eax movl %eax, 0x3c4(%rbx) movq -0x70(%rbp), %rax movl %eax, 0x3d0(%rbx) movq -0x88(%rbp), %rax movq %rax, 0x440(%rbx) movq -0x58(%rbp), %rax movq -0x80(%rbp), %rdx movq %rdx, (%rax) movq -0x60(%rbp), %rax movq %rcx, (%rax) xorl %r12d, %r12d jmp 0x3e04e callq 0x2b280
_ma_search_no_save: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r15d, edx mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax cmp rcx, 0FFFFFFFFFFFFFFFFh jz loc_3E05E mov r14, r9 mov r12, r8 mov [rbp+var_50], rsi mov rax, [rsi+8] mov [rbp+var_68], rax movzx esi, word ptr [rax+0B0h] lea rdx, [rbp+var_C0] mov [rdx], rsi mov rax, [rbx+78h] mov rax, [rax] sub rax, rdx sub rax, rsi jbe short loc_3DF70 cmp rax, 10000h ja short loc_3DF52 cmp esi, 1000h jb short loc_3DF70 cmp rax, 8001h jb short loc_3DF70 loc_3DF52: mov [rbp+var_58], r12 mov [rbp+var_60], r14 mov r13, rsp add esi, 0Fh and esi, 0FFFFFFF0h sub r13, rsi mov rsp, r13 mov al, 1 mov [rbp+var_44], eax jmp short loc_3DF9D loc_3DF70: mov r13, rcx mov [rbp+var_44], 0 mov edx, offset stru_10010 xor edi, edi call my_malloc test rax, rax jz loc_3E08B mov [rbp+var_58], r12 mov [rbp+var_60], r14 mov rcx, r13 mov r13, rax loc_3DF9D: lea rdi, [rbp+var_C0] mov rsi, rbx mov r12, [rbp+var_68] mov rdx, r12 mov r14, rcx mov r8d, 3 mov r9d, 3 push 0 push 0 call _ma_fetch_keypage add rsp, 10h test al, al jnz short loc_3E036 mov [rbp+var_88], r14 mov eax, [rbx+2F0h] dec eax lea rax, [rax+rax*2] shl rax, 3 add rax, [rbx+2E8h] mov [rbp+var_80], rax lea rsi, [rbp+var_C0] lea rcx, [rbp+var_40] lea r9, [rbp+var_45] mov rdi, [rbp+var_50] mov edx, r15d mov r8, r13 call qword ptr [r12+0D8h] cmp eax, 7FFFFFFFh jnz loc_3E0B6 mov rdi, rbx mov esi, 7Eh ; '~' xor edx, edx call _ma_print_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' loc_3E036: mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh mov byte ptr [rbx+684h], 1 mov r12d, 0FFFFFFFFh loc_3E04E: cmp byte ptr [rbp+var_44], 0 jnz short loc_3E091 mov rdi, r13 call my_free jmp short loc_3E091 loc_3E05E: call _my_thread_var mov dword ptr [rax], 78h ; 'x' mov qword ptr [rbx+98h], 0FFFFFFFFFFFFFFFFh and r15d, 118h xor r12d, r12d cmp r15d, 1 sbb r12d, r12d or r12d, 1 jmp short loc_3E091 loc_3E08B: mov r12d, 1 loc_3E091: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_3E35E mov eax, r12d lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3E0B6: mov r14d, eax mov esi, [rbp+var_94] mov eax, [rbp+var_A0] mov edx, [rbp+var_98] mov rcx, [rbp+var_B0] add rax, rcx dec rax mov [rbp+var_78], rax test r14d, r14d mov [rbp+var_70], rdx jz short loc_3E15A mov [rbp+var_34], esi mov rsi, [rbp+var_40] mov edi, edx call _ma_kpos mov rdi, rbx mov rsi, [rbp+var_50] mov edx, r15d mov rcx, rax mov r8, [rbp+var_58] mov r9, [rbp+var_60] call _ma_search_no_save test eax, eax jle loc_3E1D2 test r14d, r14d jle loc_3E1DA test r15d, 110h mov rdx, [rbp+var_70] mov esi, [rbp+var_34] jz loc_3E29C mov rax, [rbx] mov eax, [rax+744h] add rax, [rbp+var_B0] add rax, rdx cmp [rbp+var_40], rax jnz loc_3E208 mov r12d, 1 jmp loc_3E04E loc_3E15A: test edx, edx setnz al and al, r15b cmp al, 1 jnz loc_3E29C mov rax, [rbp+var_68] movzx eax, word ptr [rax+0A2h] and eax, 11h cmp ax, 1 jnz short loc_3E198 mov rax, [rbp+var_50] test byte ptr [rax+1Ah], 4 jnz short loc_3E198 mov rax, [rbx] cmp byte ptr [rax+44Ch], 0 jz loc_3E29C loc_3E198: mov [rbp+var_34], esi and r15d, 0FFFFFEE7h mov rsi, [rbp+var_40] mov edi, edx mov r14, rdx call _ma_kpos mov rdi, rbx mov rsi, [rbp+var_50] mov edx, r15d mov rcx, rax mov r8, [rbp+var_58] mov r9, [rbp+var_60] call _ma_search_no_save test eax, eax js loc_3E282 loc_3E1D2: mov r12d, eax jmp loc_3E04E loc_3E1DA: test r15b, 8 mov rdx, [rbp+var_70] mov esi, [rbp+var_34] jz short loc_3E1FB mov r12d, 1 mov rax, [rbp+var_78] cmp [rbp+var_40], rax jnb loc_3E04E loc_3E1FB: test r15d, 110h jz loc_3E29C loc_3E208: lea rdi, [rbx+200h] mov rdx, [rbp+var_40] lea rsi, [rbp+var_C0] call _ma_get_prev_key test al, al jnz loc_3E036 test r15b, 10h jnz loc_3E2E9 mov rax, [rbp+var_68] mov rdi, [rax+0C0h] mov rsi, [rbx+200h] mov rax, [rbp+var_50] mov rdx, [rax] mov ecx, [rax+14h] add ecx, [rax+10h] mov r8d, [rax+18h] shr r8d, 1 or r8d, [rbx+218h] or r8d, 1 lea r9, [rbp+var_C8] call ha_key_cmp test eax, eax jz short loc_3E2E9 call _my_thread_var mov dword ptr [rax], 78h ; 'x' jmp loc_3E036 loc_3E282: call _my_thread_var mov r12d, 0FFFFFFFFh cmp dword ptr [rax], 78h ; 'x' mov rdx, r14 mov esi, [rbp+var_34] jnz loc_3E04E loc_3E29C: lea rdi, [rbx+200h] mov [rbx+200h], r13 lea rcx, [rbp+var_40] mov rax, [rbp+var_68] call qword ptr [rax+0E0h] test eax, eax jz loc_3E036 mov rdi, [rbx+388h] mov edx, [rbx+214h] add edx, [rbx+210h] mov rsi, r13 call _memcpy mov rax, [rbx+388h] mov [rbx+200h], rax loc_3E2E9: lea r14, [rbx+200h] mov rdi, r14 call _ma_row_pos_from_key mov [rbx+98h], rax mov rdi, r14 call _ma_trid_from_key mov [rbx+0C0h], rax mov eax, dword ptr [rbp+var_40] mov rcx, [rbp+var_B0] sub eax, ecx mov [rbx+3C0h], eax mov rax, [rbp+var_78] sub eax, ecx mov [rbx+3C4h], eax mov rax, [rbp+var_70] mov [rbx+3D0h], eax mov rax, [rbp+var_88] mov [rbx+440h], rax mov rax, [rbp+var_58] mov rdx, [rbp+var_80] mov [rax], rdx mov rax, [rbp+var_60] mov [rax], rcx xor r12d, r12d jmp loc_3E04E loc_3E35E: call ___stack_chk_fail
long long ma_search_no_save(long long a1, long long a2, unsigned int a3, long long a4, long long *a5, _QWORD *a6) { unsigned long long v10; // rsi unsigned long long v11; // rax bool v12; // cc unsigned long long v13; // rax char *v14; // r13 long long v15; // r13 long long v16; // rax long long v17; // r12 long long v18; // r14 int v19; // eax long long v20; // rcx long long v21; // r8 int v22; // r9d unsigned int v23; // r12d int v25; // r14d long long v26; // rsi long long v27; // rdx long long v28; // rax int v29; // eax long long v30; // r14 long long v31; // rax long long v32; // rdi _DWORD *v33; // rax long long v34; // rcx char v36[8]; // [rsp+8h] [rbp-C8h] BYREF _QWORD v37[2]; // [rsp+10h] [rbp-C0h] BYREF long long v38; // [rsp+20h] [rbp-B0h] unsigned int v39; // [rsp+30h] [rbp-A0h] unsigned int v40; // [rsp+38h] [rbp-98h] unsigned int v41; // [rsp+3Ch] [rbp-94h] long long v42; // [rsp+48h] [rbp-88h] long long v43; // [rsp+50h] [rbp-80h] unsigned long long v44; // [rsp+58h] [rbp-78h] long long v45; // [rsp+60h] [rbp-70h] long long v46; // [rsp+68h] [rbp-68h] _QWORD *v47; // [rsp+70h] [rbp-60h] long long *v48; // [rsp+78h] [rbp-58h] long long v49; // [rsp+80h] [rbp-50h] char v50; // [rsp+8Bh] [rbp-45h] BYREF int v51; // [rsp+8Ch] [rbp-44h] unsigned long long v52; // [rsp+90h] [rbp-40h] BYREF unsigned int v53; // [rsp+9Ch] [rbp-34h] unsigned long long v54; // [rsp+A0h] [rbp-30h] v54 = __readfsqword(0x28u); if ( a4 == -1 ) { *(_DWORD *)my_thread_var(a1) = 120; *(_QWORD *)(a1 + 152) = -1LL; return (a3 & 0x118) == 0 ? -1 : 1; } v49 = a2; v46 = *(_QWORD *)(a2 + 8); v10 = *(unsigned __int16 *)(v46 + 176); v37[0] = v10; v11 = **(_QWORD **)(a1 + 120) - (_QWORD)v37; v12 = v11 <= v10; v13 = v11 - v10; if ( v12 || v13 <= 0x10000 && ((unsigned int)v10 < 0x1000 || v13 < 0x8001) ) { v15 = a4; v51 = 0; v16 = my_malloc(0LL, v10, &stru_10010); if ( !v16 ) return 1; v48 = a5; v47 = a6; a4 = v15; v14 = (char *)v16; } else { v48 = a5; v47 = a6; v14 = &v36[-(((_DWORD)v10 + 15) & 0xFFFFFFF0) - 8]; LOBYTE(v13) = 1; v51 = v13; } v17 = v46; v18 = a4; if ( (unsigned __int8)ma_fetch_keypage((unsigned int)v37, a1, v46, a4, 3, 3, 0LL) ) goto LABEL_12; v42 = v18; v43 = *(_QWORD *)(a1 + 744) + 24LL * (unsigned int)(*(_DWORD *)(a1 + 752) - 1); v19 = (*(long long ( **)(long long, _QWORD *, _QWORD, unsigned long long *, char *, char *))(v17 + 216))( v49, v37, a3, &v52, v14, &v50); if ( v19 == 0x7FFFFFFF ) { ma_print_error((_DWORD *)a1, 126, 0, v20, v21, v22); *(_DWORD *)my_thread_var(a1) = 126; LABEL_12: *(_QWORD *)(a1 + 152) = -1LL; *(_BYTE *)(a1 + 1668) = 1; v23 = -1; goto LABEL_13; } v25 = v19; v26 = v41; v27 = v40; v44 = v38 + v39 - 1; v45 = v40; if ( !v19 ) { if ( ((unsigned __int8)a3 & (v40 != 0)) != 1 || (*(_WORD *)(v46 + 162) & 0x11) == 1 && (*(_BYTE *)(v49 + 26) & 4) == 0 && !*(_BYTE *)(*(_QWORD *)a1 + 1100LL) ) { goto LABEL_38; } v53 = v41; v30 = v40; v31 = ma_kpos(v40, v52); v29 = ma_search_no_save(a1, v49, a3 & 0xFFFFFEE7, v31, v48, v47); if ( v29 < 0 ) { v33 = (_DWORD *)my_thread_var(a1); v23 = -1; v27 = v30; v26 = v53; if ( *v33 != 120 ) goto LABEL_13; goto LABEL_38; } LABEL_29: v23 = v29; goto LABEL_13; } v53 = v41; v28 = ma_kpos(v40, v52); v29 = ma_search_no_save(a1, v49, a3, v28, v48, v47); if ( v29 <= 0 ) goto LABEL_29; if ( v25 > 0 ) { v27 = v45; v26 = v53; if ( (a3 & 0x110) != 0 ) { if ( v52 == v45 + v38 + *(unsigned int *)(*(_QWORD *)a1 + 1860LL) ) { v23 = 1; goto LABEL_13; } goto LABEL_33; } goto LABEL_38; } v27 = v45; v26 = v53; if ( (a3 & 8) == 0 || (v23 = 1, v52 < v44) ) { if ( (a3 & 0x110) != 0 ) { LABEL_33: if ( (unsigned __int8)ma_get_prev_key(a1 + 512, v37, v52) ) goto LABEL_12; if ( (a3 & 0x10) == 0 ) { v32 = *(_QWORD *)(v46 + 192); if ( (unsigned int)ha_key_cmp( v32, *(_QWORD *)(a1 + 512), *(_QWORD *)v49, (unsigned int)(*(_DWORD *)(v49 + 16) + *(_DWORD *)(v49 + 20)), *(_DWORD *)(a1 + 536) | (*(_DWORD *)(v49 + 24) >> 1) | 1u, v36) ) { *(_DWORD *)my_thread_var(v32) = 120; goto LABEL_12; } } goto LABEL_40; } LABEL_38: *(_QWORD *)(a1 + 512) = v14; if ( !(*(unsigned int ( **)(long long, long long, long long, unsigned long long *))(v46 + 224))( a1 + 512, v26, v27, &v52) ) goto LABEL_12; memcpy(*(_QWORD *)(a1 + 904), v14, (unsigned int)(*(_DWORD *)(a1 + 528) + *(_DWORD *)(a1 + 532))); *(_QWORD *)(a1 + 512) = *(_QWORD *)(a1 + 904); LABEL_40: *(_QWORD *)(a1 + 152) = ma_row_pos_from_key(a1 + 512); *(_QWORD *)(a1 + 192) = ma_trid_from_key(a1 + 512); v34 = v38; *(_DWORD *)(a1 + 960) = v52 - v38; *(_DWORD *)(a1 + 964) = v44 - v34; *(_DWORD *)(a1 + 976) = v45; *(_QWORD *)(a1 + 1088) = v42; *v48 = v43; *v47 = v34; v23 = 0; } LABEL_13: if ( !(_BYTE)v51 ) my_free(v14); return v23; }
_ma_search_no_save: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R15D,EDX MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX CMP RCX,-0x1 JZ 0x0013e05e MOV R14,R9 MOV R12,R8 MOV qword ptr [RBP + -0x50],RSI MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RBP + -0x68],RAX MOVZX ESI,word ptr [RAX + 0xb0] LEA RDX,[RBP + -0xc0] MOV qword ptr [RDX],RSI MOV RAX,qword ptr [RBX + 0x78] MOV RAX,qword ptr [RAX] SUB RAX,RDX SUB RAX,RSI JBE 0x0013df70 CMP RAX,0x10000 JA 0x0013df52 CMP ESI,0x1000 JC 0x0013df70 CMP RAX,0x8001 JC 0x0013df70 LAB_0013df52: MOV qword ptr [RBP + -0x58],R12 MOV qword ptr [RBP + -0x60],R14 MOV R13,RSP ADD ESI,0xf AND ESI,0xfffffff0 SUB R13,RSI MOV RSP,R13 MOV AL,0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x0013df9d LAB_0013df70: MOV R13,RCX MOV dword ptr [RBP + -0x44],0x0 MOV EDX,0x10010 XOR EDI,EDI CALL 0x001c3acd TEST RAX,RAX JZ 0x0013e08b MOV qword ptr [RBP + -0x58],R12 MOV qword ptr [RBP + -0x60],R14 MOV RCX,R13 MOV R13,RAX LAB_0013df9d: LEA RDI,[RBP + -0xc0] MOV RSI,RBX MOV R12,qword ptr [RBP + -0x68] MOV RDX,R12 MOV R14,RCX MOV R8D,0x3 MOV R9D,0x3 PUSH 0x0 PUSH 0x0 CALL 0x00140df6 ADD RSP,0x10 TEST AL,AL JNZ 0x0013e036 MOV qword ptr [RBP + -0x88],R14 MOV EAX,dword ptr [RBX + 0x2f0] DEC EAX LEA RAX,[RAX + RAX*0x2] SHL RAX,0x3 ADD RAX,qword ptr [RBX + 0x2e8] MOV qword ptr [RBP + -0x80],RAX LEA RSI,[RBP + -0xc0] LEA RCX,[RBP + -0x40] LEA R9,[RBP + -0x45] MOV RDI,qword ptr [RBP + -0x50] MOV EDX,R15D MOV R8,R13 CALL qword ptr [R12 + 0xd8] CMP EAX,0x7fffffff JNZ 0x0013e0b6 MOV RDI,RBX MOV ESI,0x7e XOR EDX,EDX CALL 0x0013dc4a CALL 0x001c5c9a MOV dword ptr [RAX],0x7e LAB_0013e036: MOV qword ptr [RBX + 0x98],-0x1 MOV byte ptr [RBX + 0x684],0x1 MOV R12D,0xffffffff LAB_0013e04e: CMP byte ptr [RBP + -0x44],0x0 JNZ 0x0013e091 MOV RDI,R13 CALL 0x001c3cfa JMP 0x0013e091 LAB_0013e05e: CALL 0x001c5c9a MOV dword ptr [RAX],0x78 MOV qword ptr [RBX + 0x98],-0x1 AND R15D,0x118 XOR R12D,R12D CMP R15D,0x1 SBB R12D,R12D OR R12D,0x1 JMP 0x0013e091 LAB_0013e08b: MOV R12D,0x1 LAB_0013e091: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0013e35e MOV EAX,R12D LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013e0b6: MOV R14D,EAX MOV ESI,dword ptr [RBP + -0x94] MOV EAX,dword ptr [RBP + -0xa0] MOV EDX,dword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0xb0] ADD RAX,RCX DEC RAX MOV qword ptr [RBP + -0x78],RAX TEST R14D,R14D MOV qword ptr [RBP + -0x70],RDX JZ 0x0013e15a MOV dword ptr [RBP + -0x34],ESI MOV RSI,qword ptr [RBP + -0x40] MOV EDI,EDX CALL 0x0013ee07 MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x50] MOV EDX,R15D MOV RCX,RAX MOV R8,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x60] CALL 0x0013ded7 TEST EAX,EAX JLE 0x0013e1d2 TEST R14D,R14D JLE 0x0013e1da TEST R15D,0x110 MOV RDX,qword ptr [RBP + -0x70] MOV ESI,dword ptr [RBP + -0x34] JZ 0x0013e29c MOV RAX,qword ptr [RBX] MOV EAX,dword ptr [RAX + 0x744] ADD RAX,qword ptr [RBP + -0xb0] ADD RAX,RDX CMP qword ptr [RBP + -0x40],RAX JNZ 0x0013e208 MOV R12D,0x1 JMP 0x0013e04e LAB_0013e15a: TEST EDX,EDX SETNZ AL AND AL,R15B CMP AL,0x1 JNZ 0x0013e29c MOV RAX,qword ptr [RBP + -0x68] MOVZX EAX,word ptr [RAX + 0xa2] AND EAX,0x11 CMP AX,0x1 JNZ 0x0013e198 MOV RAX,qword ptr [RBP + -0x50] TEST byte ptr [RAX + 0x1a],0x4 JNZ 0x0013e198 MOV RAX,qword ptr [RBX] CMP byte ptr [RAX + 0x44c],0x0 JZ 0x0013e29c LAB_0013e198: MOV dword ptr [RBP + -0x34],ESI AND R15D,0xfffffee7 MOV RSI,qword ptr [RBP + -0x40] MOV EDI,EDX MOV R14,RDX CALL 0x0013ee07 MOV RDI,RBX MOV RSI,qword ptr [RBP + -0x50] MOV EDX,R15D MOV RCX,RAX MOV R8,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x60] CALL 0x0013ded7 TEST EAX,EAX JS 0x0013e282 LAB_0013e1d2: MOV R12D,EAX JMP 0x0013e04e LAB_0013e1da: TEST R15B,0x8 MOV RDX,qword ptr [RBP + -0x70] MOV ESI,dword ptr [RBP + -0x34] JZ 0x0013e1fb MOV R12D,0x1 MOV RAX,qword ptr [RBP + -0x78] CMP qword ptr [RBP + -0x40],RAX JNC 0x0013e04e LAB_0013e1fb: TEST R15D,0x110 JZ 0x0013e29c LAB_0013e208: LEA RDI,[RBX + 0x200] MOV RDX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0xc0] CALL 0x00140cb3 TEST AL,AL JNZ 0x0013e036 TEST R15B,0x10 JNZ 0x0013e2e9 MOV RAX,qword ptr [RBP + -0x68] MOV RDI,qword ptr [RAX + 0xc0] MOV RSI,qword ptr [RBX + 0x200] MOV RAX,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x14] ADD ECX,dword ptr [RAX + 0x10] MOV R8D,dword ptr [RAX + 0x18] SHR R8D,0x1 OR R8D,dword ptr [RBX + 0x218] OR R8D,0x1 LEA R9,[RBP + -0xc8] CALL 0x001c253e TEST EAX,EAX JZ 0x0013e2e9 CALL 0x001c5c9a MOV dword ptr [RAX],0x78 JMP 0x0013e036 LAB_0013e282: CALL 0x001c5c9a MOV R12D,0xffffffff CMP dword ptr [RAX],0x78 MOV RDX,R14 MOV ESI,dword ptr [RBP + -0x34] JNZ 0x0013e04e LAB_0013e29c: LEA RDI,[RBX + 0x200] MOV qword ptr [RBX + 0x200],R13 LEA RCX,[RBP + -0x40] MOV RAX,qword ptr [RBP + -0x68] CALL qword ptr [RAX + 0xe0] TEST EAX,EAX JZ 0x0013e036 MOV RDI,qword ptr [RBX + 0x388] MOV EDX,dword ptr [RBX + 0x214] ADD EDX,dword ptr [RBX + 0x210] MOV RSI,R13 CALL 0x0012b0b0 MOV RAX,qword ptr [RBX + 0x388] MOV qword ptr [RBX + 0x200],RAX LAB_0013e2e9: LEA R14,[RBX + 0x200] MOV RDI,R14 CALL 0x0013ef6c MOV qword ptr [RBX + 0x98],RAX MOV RDI,R14 CALL 0x0013f024 MOV qword ptr [RBX + 0xc0],RAX MOV EAX,dword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0xb0] SUB EAX,ECX MOV dword ptr [RBX + 0x3c0],EAX MOV RAX,qword ptr [RBP + -0x78] SUB EAX,ECX MOV dword ptr [RBX + 0x3c4],EAX MOV RAX,qword ptr [RBP + -0x70] MOV dword ptr [RBX + 0x3d0],EAX MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBX + 0x440],RAX MOV RAX,qword ptr [RBP + -0x58] MOV RDX,qword ptr [RBP + -0x80] MOV qword ptr [RAX],RDX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RAX],RCX XOR R12D,R12D JMP 0x0013e04e LAB_0013e35e: CALL 0x0012b280
uint _ma_search_no_save(long *param_1,int8 *param_2,uint param_3,long param_4,long *param_5, long *param_6) { ushort uVar1; int iVar2; uint uVar3; code *pcVar4; int8 uVar5; void *__dest; long *plVar6; long *plVar7; int8 *puVar8; char cVar9; int iVar10; uint uVar11; ulong uVar12; int1 *__src; int4 *puVar13; int8 uVar14; int *piVar15; long lVar16; int1 *puVar17; int1 *puVar18; int4 uVar19; long in_FS_OFFSET; int1 auStack_d8 [8]; int1 local_d0 [8]; ulong local_c8 [2]; long local_b8; uint local_a8; uint local_a0; int4 local_9c; long local_90; long local_88; ulong local_80; ulong local_78; long local_70; long *local_68; long *local_60; int8 *local_58; int1 local_4d; int4 local_4c; int local_48; int4 uStack_44; int4 local_3c; long local_38; puVar17 = auStack_d8; puVar18 = auStack_d8; local_38 = *(long *)(in_FS_OFFSET + 0x28); if (param_4 == -1) { puVar13 = (int4 *)_my_thread_var(); *puVar13 = 0x78; param_1[0x13] = -1; uVar11 = -(uint)((param_3 & 0x118) == 0) | 1; goto LAB_0013e091; } local_70 = param_2[1]; uVar1 = *(ushort *)(local_70 + 0xb0); local_c8[0] = (ulong)uVar1; uVar12 = (*(long *)param_1[0xf] - (long)local_c8) - local_c8[0]; local_58 = param_2; if (((ulong)(*(long *)param_1[0xf] - (long)local_c8) < local_c8[0] || uVar12 == 0) || ((uVar12 < 0x10001 && ((uVar1 < 0x1000 || (uVar12 < 0x8001)))))) { local_4c = 0; __src = (int1 *)my_malloc(0,local_c8[0],0x10010); if (__src == (int1 *)0x0) { uVar11 = 1; puVar18 = auStack_d8; goto LAB_0013e091; } } else { puVar17 = auStack_d8 + -(ulong)(uVar1 + 0xf & 0xfffffff0); local_4c = (int4)CONCAT71((int7)(uVar12 >> 8),1); __src = puVar17; } lVar16 = local_70; local_68 = param_6; local_60 = param_5; *(int8 *)(puVar17 + -8) = 0; *(int8 *)(puVar17 + -0x10) = 0; *(int8 *)(puVar17 + -0x18) = 0x13dfc6; cVar9 = _ma_fetch_keypage(local_c8,param_1,lVar16,param_4,3,3); puVar8 = local_58; if (cVar9 == '\0') { local_88 = (ulong)((int)param_1[0x5e] - 1) * 0x18 + param_1[0x5d]; pcVar4 = *(code **)(lVar16 + 0xd8); local_90 = param_4; *(int8 *)(puVar17 + -8) = 0x13e011; iVar10 = (*pcVar4)(puVar8,local_c8,param_3,&local_48,__src,&local_4d); if (iVar10 == 0x7fffffff) { *(int8 *)(puVar17 + -8) = 0x13e02b; _ma_print_error(param_1,0x7e,0); *(int8 *)(puVar17 + -8) = 0x13e030; puVar13 = (int4 *)_my_thread_var(); *puVar13 = 0x7e; goto LAB_0013e036; } uVar12 = (ulong)local_a0; local_80 = ((ulong)local_a8 + local_b8) - 1; local_78 = uVar12; if (iVar10 == 0) { uVar19 = local_9c; if (((local_a0 != 0 & (byte)param_3) != 1) || ((((*(ushort *)(local_70 + 0xa2) & 0x11) == 1 && ((*(byte *)((long)local_58 + 0x1a) & 4) == 0)) && (uVar19 = local_9c, *(char *)(*param_1 + 0x44c) == '\0')))) goto LAB_0013e29c; local_3c = local_9c; uVar14 = CONCAT44(uStack_44,local_48); *(int8 *)(puVar17 + -8) = 0x13e1b0; uVar14 = _ma_kpos(uVar12,uVar14); puVar8 = local_58; plVar7 = local_60; plVar6 = local_68; *(int8 *)(puVar17 + -8) = 0x13e1ca; uVar11 = _ma_search_no_save(param_1,puVar8,param_3 & 0xfffffee7,uVar14,plVar7,plVar6); if ((int)uVar11 < 0) { *(int8 *)(puVar17 + -8) = 0x13e287; piVar15 = (int *)_my_thread_var(); uVar11 = 0xffffffff; uVar19 = local_3c; if (*piVar15 == 0x78) goto LAB_0013e29c; } } else { local_3c = local_9c; uVar14 = CONCAT44(uStack_44,local_48); *(int8 *)(puVar17 + -8) = 0x13e0f3; uVar14 = _ma_kpos(uVar12,uVar14); puVar8 = local_58; plVar7 = local_60; plVar6 = local_68; *(int8 *)(puVar17 + -8) = 0x13e10d; uVar11 = _ma_search_no_save(param_1,puVar8,param_3,uVar14,plVar7,plVar6); if (0 < (int)uVar11) { uVar12 = local_78; uVar19 = local_3c; if (iVar10 < 1) { if (((param_3 & 8) == 0) || (uVar11 = 1, CONCAT44(uStack_44,local_48) < local_80)) { if ((param_3 & 0x110) != 0) goto LAB_0013e208; goto LAB_0013e29c; } } else { if ((param_3 & 0x110) == 0) { LAB_0013e29c: param_1[0x40] = (long)__src; pcVar4 = *(code **)(local_70 + 0xe0); *(int8 *)(puVar17 + -8) = 0x13e2b8; iVar10 = (*pcVar4)(param_1 + 0x40,uVar19,uVar12,&local_48); if (iVar10 == 0) goto LAB_0013e036; __dest = (void *)param_1[0x71]; iVar10 = *(int *)((long)param_1 + 0x214); lVar16 = param_1[0x42]; *(int8 *)(puVar17 + -8) = 0x13e2db; memcpy(__dest,__src,(ulong)(uint)(iVar10 + (int)lVar16)); param_1[0x40] = param_1[0x71]; } else { if (CONCAT44(uStack_44,local_48) == (ulong)*(uint *)(*param_1 + 0x744) + local_b8 + local_78) { uVar11 = 1; goto LAB_0013e04e; } LAB_0013e208: uVar14 = CONCAT44(uStack_44,local_48); *(int8 *)(puVar17 + -8) = 0x13e21f; cVar9 = _ma_get_prev_key(param_1 + 0x40,local_c8,uVar14); if (cVar9 != '\0') goto LAB_0013e036; if ((param_3 & 0x10) == 0) { uVar14 = *(int8 *)(local_70 + 0xc0); lVar16 = param_1[0x40]; uVar5 = *local_58; iVar10 = *(int *)((long)local_58 + 0x14); iVar2 = *(int *)(local_58 + 2); uVar11 = *(uint *)(local_58 + 3); uVar3 = *(uint *)(param_1 + 0x43); *(int8 *)(puVar17 + -8) = 0x13e26e; iVar10 = ha_key_cmp(uVar14,lVar16,uVar5,iVar10 + iVar2,uVar11 >> 1 | uVar3 | 1, local_d0); if (iVar10 != 0) { *(int8 *)(puVar17 + -8) = 0x13e277; puVar13 = (int4 *)_my_thread_var(); *puVar13 = 0x78; goto LAB_0013e036; } } } *(int8 *)(puVar17 + -8) = 0x13e2f8; lVar16 = _ma_row_pos_from_key(param_1 + 0x40); param_1[0x13] = lVar16; *(int8 *)(puVar17 + -8) = 0x13e307; lVar16 = _ma_trid_from_key(param_1 + 0x40); param_1[0x18] = lVar16; *(int *)(param_1 + 0x78) = local_48 - (int)local_b8; *(int *)((long)param_1 + 0x3c4) = (int)local_80 - (int)local_b8; *(int *)(param_1 + 0x7a) = (int)local_78; param_1[0x88] = local_90; *local_60 = local_88; *local_68 = local_b8; uVar11 = 0; } } } } else { LAB_0013e036: param_1[0x13] = -1; *(int1 *)((long)param_1 + 0x684) = 1; uVar11 = 0xffffffff; } LAB_0013e04e: puVar18 = puVar17; if ((char)local_4c == '\0') { *(int8 *)(puVar17 + -8) = 0x13e05c; my_free(__src); } LAB_0013e091: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ *(code **)(puVar18 + -8) = _ma_bin_search; __stack_chk_fail(); } return uVar11; }
40,132
uf_prespace
eloqsql/storage/myisam/mi_packrec.c
static void uf_prespace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } bfill((uchar*) to,spaces,' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); }
O0
c
uf_prespace: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbf08b movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x20273d(%rip), %rcx # 0x2c17c0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0xbf09e movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbc280 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0xbf0c0 movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0xbf0fe movq -0x18(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2a0 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0xbf0fe movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x24(%rbp), %eax addq %rax, %rdx movq -0x20(%rbp), %rcx callq 0xbe1e0 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
uf_prespace_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BF08B mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_BF09E loc_BF08B: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_28], eax loc_BF09E: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_BF0C0 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_BF0FE loc_BF0C0: mov rdi, [rbp+var_18] mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_BF0FE mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov eax, [rbp+var_24] add rdx, rax mov rcx, [rbp+var_20] call decode_bytes_0 loc_BF0FE: add rsp, 30h pop rbp retn
long long uf_prespace_0(long long a1, unsigned int *a2, long long a3, _BYTE *a4) { unsigned int v4; // eax int v5; // ecx long long result; // rax unsigned int bits_0; // [rsp+8h] [rbp-28h] if ( a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v4 = *a2; v5 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v5; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v4 >> v5); } if ( (unsigned long long)bits_0 + a3 <= (unsigned long long)a4 ) { memset(a3, 32LL, bits_0); result = bits_0 + a3; if ( (_BYTE *)result != a4 ) return decode_bytes_0(a1, (long long)a2, (_BYTE *)(bits_0 + a3), a4); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_prespace: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001bf08b MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3c17c0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001bf09e LAB_001bf08b: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001bc280 MOV dword ptr [RBP + -0x28],EAX LAB_001bf09e: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x001bf0c0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001bf0fe LAB_001bf0c0: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2a0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001bf0fe MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x20] CALL 0x001be1e0 LAB_001bf0fe: ADD RSP,0x30 POP RBP RET
void uf_prespace(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)local_30); if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4); } } return; }
40,133
translog_write_variable_record
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_variable_record(LSN *lsn, enum translog_record_type type, MARIA_HA *tbl_info, SHORT_TRANSACTION_ID short_trid, struct st_translog_parts *parts, TRN *trn, void *hook_arg) { struct st_translog_buffer *buffer_to_flush= NULL; uint header_length1= 1 + 2 + 2 + translog_variable_record_length_bytes(parts->record_length); ulong buffer_rest; uint page_rest; /* Max number of such LSNs per record is 2 */ uchar compressed_LSNs[MAX_NUMBER_OF_LSNS_PER_RECORD * COMPRESSED_LSN_MAX_STORE_SIZE]; my_bool res; DBUG_ENTER("translog_write_variable_record"); translog_lock(); DBUG_PRINT("info", ("horizon: " LSN_FMT, LSN_IN_PARTS(log_descriptor.horizon))); page_rest= TRANSLOG_PAGE_SIZE - log_descriptor.bc.current_page_fill; DBUG_PRINT("info", ("header length: %u page_rest: %u", header_length1, page_rest)); /* header and part which we should read have to fit in one chunk TODO: allow to divide readable header */ if (page_rest < (header_length1 + log_record_type_descriptor[type].read_header_len)) { DBUG_PRINT("info", ("Next page, size: %u header: %u + %u", log_descriptor.bc.current_page_fill, header_length1, log_record_type_descriptor[type].read_header_len)); translog_page_next(&log_descriptor.horizon, &log_descriptor.bc, &buffer_to_flush); /* Chunk 2 header is 1 byte, so full page capacity will be one uchar more */ page_rest= log_descriptor.page_capacity_chunk_2 + 1; DBUG_PRINT("info", ("page_rest: %u", page_rest)); } /* To minimize compressed size we will compress always relative to very first chunk address (log_descriptor.horizon for now) */ if (log_record_type_descriptor[type].compressed_LSN > 0) { translog_relative_LSN_encode(parts, log_descriptor.horizon, log_record_type_descriptor[type]. compressed_LSN, compressed_LSNs); /* recalculate header length after compression */ header_length1= 1 + 2 + 2 + translog_variable_record_length_bytes(parts->record_length); DBUG_PRINT("info", ("after compressing LSN(s) header length: %u " "record length: %lu", header_length1, (ulong)parts->record_length)); } /* TODO: check space on current page for header + few bytes */ if (page_rest >= parts->record_length + header_length1) { /* following function makes translog_unlock(); */ res= translog_write_variable_record_1chunk(lsn, type, tbl_info, short_trid, parts, buffer_to_flush, header_length1, trn, hook_arg); DBUG_RETURN(res); } buffer_rest= translog_get_current_group_size(); if (buffer_rest >= parts->record_length + header_length1 - page_rest) { /* following function makes translog_unlock(); */ res= translog_write_variable_record_1group(lsn, type, tbl_info, short_trid, parts, buffer_to_flush, header_length1, trn, hook_arg); DBUG_RETURN(res); } /* following function makes translog_unlock(); */ res= translog_write_variable_record_mgroup(lsn, type, tbl_info, short_trid, parts, buffer_to_flush, header_length1, buffer_rest, trn, hook_arg); DBUG_RETURN(res); }
O0
c
translog_write_variable_record: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0xa8, %rsp movw %cx, %ax movq 0x10(%rbp), %rcx movq %fs:0x28, %rcx movq %rcx, -0x10(%rbp) movq %rdi, -0x40(%rbp) movl %esi, -0x44(%rbp) movq %rdx, -0x50(%rbp) movw %ax, -0x52(%rbp) movq %r8, -0x60(%rbp) movq %r9, -0x68(%rbp) movq $0x0, -0x70(%rbp) movq -0x60(%rbp), %rax movl (%rax), %edi callq 0x39260 addl $0x5, %eax movl %eax, -0x74(%rbp) callq 0x2f940 jmp 0x33f27 movzwl 0xc479c2(%rip), %ecx # 0xc7b8f0 movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movl %eax, -0x84(%rbp) jmp 0x33f3d movl -0x84(%rbp), %eax movl -0x74(%rbp), %ecx movl -0x44(%rbp), %edx movl %edx, %esi leaq 0x445b1e(%rip), %rdx # 0x479a70 imulq $0x48, %rsi, %rsi addq %rsi, %rdx movzwl 0x6(%rdx), %edx addl %edx, %ecx cmpl %ecx, %eax jae 0x33f9c jmp 0x33f65 jmp 0x33f67 leaq 0x446d02(%rip), %rsi # 0x47ac70 movq %rsi, %rdi addq $0x800c48, %rdi # imm = 0x800C48 addq $0x800c50, %rsi # imm = 0x800C50 leaq -0x70(%rbp), %rdx callq 0x392b0 movzwl 0x446d07(%rip), %eax # 0x47ac96 addl $0x1, %eax movl %eax, -0x84(%rbp) jmp 0x33f9a jmp 0x33f9c movl -0x44(%rbp), %eax movl %eax, %ecx leaq 0x445ac8(%rip), %rax # 0x479a70 imulq $0x48, %rcx, %rcx addq %rcx, %rax movswl 0x20(%rax), %eax cmpl $0x0, %eax jle 0x33ff8 movq -0x60(%rbp), %rdi movq 0xc478f5(%rip), %rsi # 0xc7b8b8 movl -0x44(%rbp), %eax movl %eax, %ecx leaq 0x445aa1(%rip), %rax # 0x479a70 imulq $0x48, %rcx, %rcx addq %rcx, %rax movswl 0x20(%rax), %edx leaq -0x30(%rbp), %rcx callq 0x393b0 movq -0x60(%rbp), %rax movl (%rax), %edi callq 0x39260 addl $0x5, %eax movl %eax, -0x74(%rbp) jmp 0x33ff6 jmp 0x33ff8 movl -0x84(%rbp), %eax movq -0x60(%rbp), %rcx movl (%rcx), %ecx addl -0x74(%rbp), %ecx cmpl %ecx, %eax jb 0x3405f movq -0x40(%rbp), %rdi movl -0x44(%rbp), %esi movq -0x50(%rbp), %rdx movw -0x52(%rbp), %cx movq -0x60(%rbp), %r8 movq -0x70(%rbp), %r9 movl -0x74(%rbp), %eax movw %ax, %r11w movq -0x68(%rbp), %r10 movq 0x10(%rbp), %rax movzwl %cx, %ecx movzwl %r11w, %r11d movl %r11d, (%rsp) movq %r10, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x396d0 movb %al, -0x85(%rbp) movb -0x85(%rbp), %al movb %al, -0x31(%rbp) jmp 0x3412d callq 0x3b070 movl %eax, %eax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movq -0x60(%rbp), %rcx movl (%rcx), %ecx addl -0x74(%rbp), %ecx subl -0x84(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jb 0x340d5 movq -0x40(%rbp), %rdi movl -0x44(%rbp), %esi movq -0x50(%rbp), %rdx movw -0x52(%rbp), %cx movq -0x60(%rbp), %r8 movq -0x70(%rbp), %r9 movl -0x74(%rbp), %eax movw %ax, %r11w movq -0x68(%rbp), %r10 movq 0x10(%rbp), %rax movzwl %cx, %ecx movzwl %r11w, %r11d movl %r11d, (%rsp) movq %r10, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x39870 movb %al, -0x85(%rbp) movb -0x85(%rbp), %al movb %al, -0x31(%rbp) jmp 0x3412d movq -0x40(%rbp), %rdi movl -0x44(%rbp), %esi movq -0x50(%rbp), %rdx movw -0x52(%rbp), %cx movq -0x60(%rbp), %r8 movq -0x70(%rbp), %r9 movl -0x74(%rbp), %eax movw %ax, %bx movq -0x80(%rbp), %rax movl %eax, %r11d movq -0x68(%rbp), %r10 movq 0x10(%rbp), %rax movzwl %cx, %ecx movzwl %bx, %ebx movl %ebx, (%rsp) movl %r11d, 0x8(%rsp) movq %r10, 0x10(%rsp) movq %rax, 0x18(%rsp) callq 0x39c50 movb %al, -0x85(%rbp) movb -0x85(%rbp), %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al movb %al, -0x86(%rbp) movq %fs:0x28, %rax movq -0x10(%rbp), %rcx cmpq %rcx, %rax jne 0x34158 movb -0x86(%rbp), %al addq $0xa8, %rsp popq %rbx popq %rbp retq callq 0x2a250 nopl (%rax)
translog_write_variable_record: push rbp mov rbp, rsp push rbx sub rsp, 0A8h mov ax, cx mov rcx, [rbp+arg_0] mov rcx, fs:28h mov [rbp+var_10], rcx mov [rbp+var_40], rdi mov [rbp+var_44], esi mov [rbp+var_50], rdx mov [rbp+var_52], ax mov [rbp+var_60], r8 mov [rbp+var_68], r9 mov [rbp+var_70], 0 mov rax, [rbp+var_60] mov edi, [rax] call translog_variable_record_length_bytes add eax, 5 mov [rbp+var_74], eax call translog_lock jmp short $+2 loc_33F27: movzx ecx, cs:word_C7B8F0 mov eax, 2000h sub eax, ecx mov [rbp+var_84], eax jmp short $+2 loc_33F3D: mov eax, [rbp+var_84] mov ecx, [rbp+var_74] mov edx, [rbp+var_44] mov esi, edx lea rdx, log_record_type_descriptor imul rsi, 48h ; 'H' add rdx, rsi movzx edx, word ptr [rdx+6] add ecx, edx cmp eax, ecx jnb short loc_33F9C jmp short $+2 loc_33F65: jmp short $+2 loc_33F67: lea rsi, log_descriptor mov rdi, rsi add rdi, 800C48h add rsi, 800C50h lea rdx, [rbp+var_70] call translog_page_next movzx eax, cs:word_47AC96 add eax, 1 mov [rbp+var_84], eax jmp short $+2 loc_33F9A: jmp short $+2 loc_33F9C: mov eax, [rbp+var_44] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movsx eax, word ptr [rax+20h] cmp eax, 0 jle short loc_33FF8 mov rdi, [rbp+var_60] mov rsi, cs:qword_C7B8B8 mov eax, [rbp+var_44] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movsx edx, word ptr [rax+20h] lea rcx, [rbp+var_30] call translog_relative_LSN_encode mov rax, [rbp+var_60] mov edi, [rax] call translog_variable_record_length_bytes add eax, 5 mov [rbp+var_74], eax jmp short $+2 loc_33FF6: jmp short $+2 loc_33FF8: mov eax, [rbp+var_84] mov rcx, [rbp+var_60] mov ecx, [rcx] add ecx, [rbp+var_74] cmp eax, ecx jb short loc_3405F mov rdi, [rbp+var_40] mov esi, [rbp+var_44] mov rdx, [rbp+var_50] mov cx, [rbp+var_52] mov r8, [rbp+var_60] mov r9, [rbp+var_70] mov eax, [rbp+var_74] mov r11w, ax mov r10, [rbp+var_68] mov rax, [rbp+arg_0] movzx ecx, cx movzx r11d, r11w mov [rsp+0B0h+var_B0], r11d mov [rsp+0B0h+var_A8], r10 mov [rsp+0B0h+var_A0], rax call translog_write_variable_record_1chunk mov [rbp+var_85], al mov al, [rbp+var_85] mov [rbp+var_31], al jmp loc_3412D loc_3405F: call translog_get_current_group_size mov eax, eax mov [rbp+var_80], rax mov rax, [rbp+var_80] mov rcx, [rbp+var_60] mov ecx, [rcx] add ecx, [rbp+var_74] sub ecx, [rbp+var_84] mov ecx, ecx cmp rax, rcx jb short loc_340D5 mov rdi, [rbp+var_40] mov esi, [rbp+var_44] mov rdx, [rbp+var_50] mov cx, [rbp+var_52] mov r8, [rbp+var_60] mov r9, [rbp+var_70] mov eax, [rbp+var_74] mov r11w, ax mov r10, [rbp+var_68] mov rax, [rbp+arg_0] movzx ecx, cx movzx r11d, r11w mov [rsp+0B0h+var_B0], r11d mov [rsp+0B0h+var_A8], r10 mov [rsp+0B0h+var_A0], rax call translog_write_variable_record_1group mov [rbp+var_85], al mov al, [rbp+var_85] mov [rbp+var_31], al jmp short loc_3412D loc_340D5: mov rdi, [rbp+var_40] mov esi, [rbp+var_44] mov rdx, [rbp+var_50] mov cx, [rbp+var_52] mov r8, [rbp+var_60] mov r9, [rbp+var_70] mov eax, [rbp+var_74] mov bx, ax mov rax, [rbp+var_80] mov r11d, eax mov r10, [rbp+var_68] mov rax, [rbp+arg_0] movzx ecx, cx movzx ebx, bx mov [rsp+0B0h+var_B0], ebx mov dword ptr [rsp+0B0h+var_A8], r11d mov [rsp+0B0h+var_A0], r10 mov [rsp+0B0h+var_98], rax call translog_write_variable_record_mgroup mov [rbp+var_85], al mov al, [rbp+var_85] mov [rbp+var_31], al loc_3412D: mov al, [rbp+var_31] mov [rbp+var_86], al mov rax, fs:28h mov rcx, [rbp+var_10] cmp rax, rcx jnz short loc_34158 mov al, [rbp+var_86] add rsp, 0A8h pop rbx pop rbp retn loc_34158: call ___stack_chk_fail
char translog_write_variable_record( long long a1, int a2, long long a3, unsigned __int16 a4, unsigned int *a5, long long a6, long long a7) { unsigned int v8; // [rsp+2Ch] [rbp-84h] unsigned long long current_group_size; // [rsp+30h] [rbp-80h] _BYTE v10[12]; // [rsp+3Ch] [rbp-74h] BYREF long long v11; // [rsp+48h] [rbp-68h] _DWORD *v12; // [rsp+50h] [rbp-60h] unsigned __int16 v13; // [rsp+5Eh] [rbp-52h] long long v14; // [rsp+60h] [rbp-50h] int v15; // [rsp+6Ch] [rbp-44h] long long v16; // [rsp+70h] [rbp-40h] _BYTE v18[32]; // [rsp+80h] [rbp-30h] BYREF unsigned long long v19; // [rsp+A0h] [rbp-10h] v19 = __readfsqword(0x28u); v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; v11 = a6; *(_QWORD *)&v10[4] = 0LL; *(_QWORD *)v10 = (unsigned int)translog_variable_record_length_bytes(*a5) + 5; translog_lock(); v8 = 0x2000 - (unsigned __int16)word_C7B8F0; if ( v8 < (unsigned int)HIWORD(log_record_type_descriptor[18 * a2 + 1]) + *(_DWORD *)v10 ) { translog_page_next(&log_descriptor[1048969], &log_descriptor[1048970], &v10[4]); v8 = (unsigned __int16)word_47AC96 + 1; } if ( SLOWORD(log_record_type_descriptor[18 * v15 + 8]) > 0 ) { translog_relative_LSN_encode( v12, qword_C7B8B8, (unsigned int)SLOWORD(log_record_type_descriptor[18 * v15 + 8]), v18); *(_DWORD *)v10 = translog_variable_record_length_bytes((unsigned int)*v12) + 5; } if ( v8 >= *(_DWORD *)v10 + *v12 ) return translog_write_variable_record_1chunk( v16, v15, v14, v13, (_DWORD)v12, *(_DWORD *)&v10[4], *(__int16 *)v10, v11, a7); current_group_size = (unsigned int)translog_get_current_group_size(); if ( current_group_size < *(_DWORD *)v10 + *v12 - v8 ) return translog_write_variable_record_mgroup( v16, v15, v14, v13, (_DWORD)v12, *(_DWORD *)&v10[4], *(__int16 *)v10, current_group_size, v11, a7); else return translog_write_variable_record_1group( v16, v15, v14, v13, (_DWORD)v12, *(_DWORD *)&v10[4], *(__int16 *)v10, v11, a7); }
translog_write_variable_record: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xa8 MOV AX,CX MOV RCX,qword ptr [RBP + 0x10] MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RCX MOV qword ptr [RBP + -0x40],RDI MOV dword ptr [RBP + -0x44],ESI MOV qword ptr [RBP + -0x50],RDX MOV word ptr [RBP + -0x52],AX MOV qword ptr [RBP + -0x60],R8 MOV qword ptr [RBP + -0x68],R9 MOV qword ptr [RBP + -0x70],0x0 MOV RAX,qword ptr [RBP + -0x60] MOV EDI,dword ptr [RAX] CALL 0x00139260 ADD EAX,0x5 MOV dword ptr [RBP + -0x74],EAX CALL 0x0012f940 JMP 0x00133f27 LAB_00133f27: MOVZX ECX,word ptr [0x00d7b8f0] MOV EAX,0x2000 SUB EAX,ECX MOV dword ptr [RBP + -0x84],EAX JMP 0x00133f3d LAB_00133f3d: MOV EAX,dword ptr [RBP + -0x84] MOV ECX,dword ptr [RBP + -0x74] MOV EDX,dword ptr [RBP + -0x44] MOV ESI,EDX LEA RDX,[0x579a70] IMUL RSI,RSI,0x48 ADD RDX,RSI MOVZX EDX,word ptr [RDX + 0x6] ADD ECX,EDX CMP EAX,ECX JNC 0x00133f9c JMP 0x00133f65 LAB_00133f65: JMP 0x00133f67 LAB_00133f67: LEA RSI,[0x57ac70] MOV RDI,RSI ADD RDI,0x800c48 ADD RSI,0x800c50 LEA RDX,[RBP + -0x70] CALL 0x001392b0 MOVZX EAX,word ptr [0x0057ac96] ADD EAX,0x1 MOV dword ptr [RBP + -0x84],EAX JMP 0x00133f9a LAB_00133f9a: JMP 0x00133f9c LAB_00133f9c: MOV EAX,dword ptr [RBP + -0x44] MOV ECX,EAX LEA RAX,[0x579a70] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVSX EAX,word ptr [RAX + 0x20] CMP EAX,0x0 JLE 0x00133ff8 MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [0x00d7b8b8] MOV EAX,dword ptr [RBP + -0x44] MOV ECX,EAX LEA RAX,[0x579a70] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVSX EDX,word ptr [RAX + 0x20] LEA RCX,[RBP + -0x30] CALL 0x001393b0 MOV RAX,qword ptr [RBP + -0x60] MOV EDI,dword ptr [RAX] CALL 0x00139260 ADD EAX,0x5 MOV dword ptr [RBP + -0x74],EAX JMP 0x00133ff6 LAB_00133ff6: JMP 0x00133ff8 LAB_00133ff8: MOV EAX,dword ptr [RBP + -0x84] MOV RCX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RCX] ADD ECX,dword ptr [RBP + -0x74] CMP EAX,ECX JC 0x0013405f MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x50] MOV CX,word ptr [RBP + -0x52] MOV R8,qword ptr [RBP + -0x60] MOV R9,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x74] MOV R11W,AX MOV R10,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + 0x10] MOVZX ECX,CX MOVZX R11D,R11W MOV dword ptr [RSP],R11D MOV qword ptr [RSP + 0x8],R10 MOV qword ptr [RSP + 0x10],RAX CALL 0x001396d0 MOV byte ptr [RBP + -0x85],AL MOV AL,byte ptr [RBP + -0x85] MOV byte ptr [RBP + -0x31],AL JMP 0x0013412d LAB_0013405f: CALL 0x0013b070 MOV EAX,EAX MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RCX] ADD ECX,dword ptr [RBP + -0x74] SUB ECX,dword ptr [RBP + -0x84] MOV ECX,ECX CMP RAX,RCX JC 0x001340d5 MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x50] MOV CX,word ptr [RBP + -0x52] MOV R8,qword ptr [RBP + -0x60] MOV R9,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x74] MOV R11W,AX MOV R10,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + 0x10] MOVZX ECX,CX MOVZX R11D,R11W MOV dword ptr [RSP],R11D MOV qword ptr [RSP + 0x8],R10 MOV qword ptr [RSP + 0x10],RAX CALL 0x00139870 MOV byte ptr [RBP + -0x85],AL MOV AL,byte ptr [RBP + -0x85] MOV byte ptr [RBP + -0x31],AL JMP 0x0013412d LAB_001340d5: MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x50] MOV CX,word ptr [RBP + -0x52] MOV R8,qword ptr [RBP + -0x60] MOV R9,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x74] MOV BX,AX MOV RAX,qword ptr [RBP + -0x80] MOV R11D,EAX MOV R10,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + 0x10] MOVZX ECX,CX MOVZX EBX,BX MOV dword ptr [RSP],EBX MOV dword ptr [RSP + 0x8],R11D MOV qword ptr [RSP + 0x10],R10 MOV qword ptr [RSP + 0x18],RAX CALL 0x00139c50 MOV byte ptr [RBP + -0x85],AL MOV AL,byte ptr [RBP + -0x85] MOV byte ptr [RBP + -0x31],AL LAB_0013412d: MOV AL,byte ptr [RBP + -0x31] MOV byte ptr [RBP + -0x86],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,RCX JNZ 0x00134158 MOV AL,byte ptr [RBP + -0x86] ADD RSP,0xa8 POP RBX POP RBP RET LAB_00134158: CALL 0x0012a250
int8 translog_write_variable_record (int8 param_1,uint param_2,int8 param_3,int2 param_4,int *param_5, int8 param_6,int8 param_7) { int iVar1; uint uVar2; long in_FS_OFFSET; int8 in_stack_ffffffffffffff50; int4 uVar3; uint local_8c; uint local_7c; int8 local_78; int8 local_70; int *local_68; int2 local_5a; int8 local_58; uint local_4c; int8 local_48; int1 local_39; int1 local_38 [32]; long local_18; uVar3 = (int4)((ulong)in_stack_ffffffffffffff50 >> 0x20); local_18 = *(long *)(in_FS_OFFSET + 0x28); local_78 = 0; local_70 = param_6; local_68 = param_5; local_5a = param_4; local_58 = param_3; local_4c = param_2; local_48 = param_1; iVar1 = translog_variable_record_length_bytes(*param_5); local_7c = iVar1 + 5; translog_lock(); local_8c = 0x2000 - DAT_00d7b8f0; if (local_8c < local_7c + *(ushort *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 6)) { translog_page_next(&DAT_00d7b8b8,&DAT_00d7b8c0,&local_78); local_8c = DAT_0057ac96 + 1; } if (0 < *(short *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 0x20)) { translog_relative_LSN_encode (local_68,DAT_00d7b8b8, (int)*(short *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 0x20),local_38) ; iVar1 = translog_variable_record_length_bytes(*local_68); local_7c = iVar1 + 5; } if (local_8c < *local_68 + local_7c) { uVar2 = translog_get_current_group_size(); if (uVar2 < (*local_68 + local_7c) - local_8c) { local_39 = translog_write_variable_record_mgroup (local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff, CONCAT44(uVar3,uVar2),local_70,param_7); } else { local_39 = translog_write_variable_record_1group (local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff, local_70,param_7); } } else { local_39 = translog_write_variable_record_1chunk (local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff, local_70,param_7); } if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_39); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
40,134
rak_record_init_copy
fabiosvm[P]rak/src/record.c
void rak_record_init_copy(RakRecord *rec1, RakRecord *rec2, RakError *err) { int len = rak_record_len(rec2); rak_record_init_with_capacity(rec1, len, err); if (!rak_is_ok(err)) return; for (int i = 0; i < len; ++i) { RakRecordField field = rak_record_get(rec2, i); rak_slice_set(&rec1->slice, i, field); rak_object_retain(&field.name->obj); rak_value_retain(field.val); } rec1->slice.len = len; }
O1
c
rak_record_init_copy: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbx movl 0xc(%rsi), %r15d movl %r15d, %esi callq 0x7894 cmpb $0x1, (%r12) jne 0x7962 testl %r15d, %r15d jle 0x795e leaq (,%r15,8), %rax leaq (%rax,%rax,2), %rax xorl %ecx, %ecx movq 0x10(%r14), %rdx movq (%rdx,%rcx), %rsi movl 0x8(%rdx,%rcx), %edi movl 0xc(%rdx,%rcx), %r8d movq 0x10(%rdx,%rcx), %rdx movq 0x10(%rbx), %r9 movq %rsi, (%r9,%rcx) movl %edi, 0x8(%r9,%rcx) movl %r8d, 0xc(%r9,%rcx) movq %rdx, 0x10(%r9,%rcx) incl (%rsi) testb $0x2, %r8b je 0x7955 incl (%rdx) addq $0x18, %rcx cmpq %rcx, %rax jne 0x791e movl %r15d, 0xc(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
rak_record_init_copy: push r15 push r14 push r12 push rbx push rax mov r12, rdx mov r14, rsi mov rbx, rdi mov r15d, [rsi+0Ch] mov esi, r15d call rak_record_init_with_capacity cmp byte ptr [r12], 1 jnz short loc_7962 test r15d, r15d jle short loc_795E lea rax, ds:0[r15*8] lea rax, [rax+rax*2] xor ecx, ecx loc_791E: mov rdx, [r14+10h] mov rsi, [rdx+rcx] mov edi, [rdx+rcx+8] mov r8d, [rdx+rcx+0Ch] mov rdx, [rdx+rcx+10h] mov r9, [rbx+10h] mov [r9+rcx], rsi mov [r9+rcx+8], edi mov [r9+rcx+0Ch], r8d mov [r9+rcx+10h], rdx inc dword ptr [rsi] test r8b, 2 jz short loc_7955 inc dword ptr [rdx] loc_7955: add rcx, 18h cmp rax, rcx jnz short loc_791E loc_795E: mov [rbx+0Ch], r15d loc_7962: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long rak_record_init_copy(long long a1, long long a2, _BYTE *a3) { long long v6; // r15 long long result; // rax long long v8; // rcx long long v9; // rdx _DWORD *v10; // rsi int v11; // edi int v12; // r8d _DWORD *v13; // rdx long long v14; // r9 v6 = *(unsigned int *)(a2 + 12); result = rak_record_init_with_capacity(a1, *(_DWORD *)(a2 + 12), a3); if ( *a3 == 1 ) { if ( (int)v6 > 0 ) { result = 24 * v6; v8 = 0LL; do { v9 = *(_QWORD *)(a2 + 16); v10 = *(_DWORD **)(v9 + v8); v11 = *(_DWORD *)(v9 + v8 + 8); v12 = *(_DWORD *)(v9 + v8 + 12); v13 = *(_DWORD **)(v9 + v8 + 16); v14 = *(_QWORD *)(a1 + 16); *(_QWORD *)(v14 + v8) = v10; *(_DWORD *)(v14 + v8 + 8) = v11; *(_DWORD *)(v14 + v8 + 12) = v12; *(_QWORD *)(v14 + v8 + 16) = v13; ++*v10; if ( (v12 & 2) != 0 ) ++*v13; v8 += 24LL; } while ( result != v8 ); } *(_DWORD *)(a1 + 12) = v6; } return result; }
rak_record_init_copy: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDX MOV R14,RSI MOV RBX,RDI MOV R15D,dword ptr [RSI + 0xc] MOV ESI,R15D CALL 0x00107894 CMP byte ptr [R12],0x1 JNZ 0x00107962 TEST R15D,R15D JLE 0x0010795e LEA RAX,[R15*0x8] LEA RAX,[RAX + RAX*0x2] XOR ECX,ECX LAB_0010791e: MOV RDX,qword ptr [R14 + 0x10] MOV RSI,qword ptr [RDX + RCX*0x1] MOV EDI,dword ptr [RDX + RCX*0x1 + 0x8] MOV R8D,dword ptr [RDX + RCX*0x1 + 0xc] MOV RDX,qword ptr [RDX + RCX*0x1 + 0x10] MOV R9,qword ptr [RBX + 0x10] MOV qword ptr [R9 + RCX*0x1],RSI MOV dword ptr [R9 + RCX*0x1 + 0x8],EDI MOV dword ptr [R9 + RCX*0x1 + 0xc],R8D MOV qword ptr [R9 + RCX*0x1 + 0x10],RDX INC dword ptr [RSI] TEST R8B,0x2 JZ 0x00107955 INC dword ptr [RDX] LAB_00107955: ADD RCX,0x18 CMP RAX,RCX JNZ 0x0010791e LAB_0010795e: MOV dword ptr [RBX + 0xc],R15D LAB_00107962: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void rak_record_init_copy(long param_1,long param_2,char *param_3) { uint uVar1; int4 uVar2; uint uVar3; long lVar4; int *piVar5; int *piVar6; long lVar7; uVar1 = *(uint *)(param_2 + 0xc); rak_record_init_with_capacity(param_1,(ulong)uVar1); if (*param_3 == '\x01') { if (0 < (int)uVar1) { lVar7 = 0; do { lVar4 = *(long *)(param_2 + 0x10); piVar5 = *(int **)(lVar4 + lVar7); uVar2 = *(int4 *)(lVar4 + 8 + lVar7); uVar3 = *(uint *)(lVar4 + 0xc + lVar7); piVar6 = *(int **)(lVar4 + 0x10 + lVar7); lVar4 = *(long *)(param_1 + 0x10); *(int **)(lVar4 + lVar7) = piVar5; *(int4 *)(lVar4 + 8 + lVar7) = uVar2; *(uint *)(lVar4 + 0xc + lVar7) = uVar3; *(int **)(lVar4 + 0x10 + lVar7) = piVar6; *piVar5 = *piVar5 + 1; if ((uVar3 & 2) != 0) { *piVar6 = *piVar6 + 1; } lVar7 = lVar7 + 0x18; } while ((ulong)uVar1 * 0x18 != lVar7); } *(uint *)(param_1 + 0xc) = uVar1; } return; }
40,135
rak_record_init_copy
fabiosvm[P]rak/src/record.c
void rak_record_init_copy(RakRecord *rec1, RakRecord *rec2, RakError *err) { int len = rak_record_len(rec2); rak_record_init_with_capacity(rec1, len, err); if (!rak_is_ok(err)) return; for (int i = 0; i < len; ++i) { RakRecordField field = rak_record_get(rec2, i); rak_slice_set(&rec1->slice, i, field); rak_object_retain(&field.name->obj); rak_value_retain(field.val); } rec1->slice.len = len; }
O3
c
rak_record_init_copy: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbx movl 0xc(%rsi), %r15d movl %r15d, %esi callq 0x7638 cmpb $0x1, (%r12) jne 0x7706 testl %r15d, %r15d jle 0x7702 leaq (,%r15,8), %rax leaq (%rax,%rax,2), %rax xorl %ecx, %ecx movq 0x10(%r14), %rdx movq (%rdx,%rcx), %rsi movl 0x8(%rdx,%rcx), %edi movl 0xc(%rdx,%rcx), %r8d movq 0x10(%rdx,%rcx), %rdx movq 0x10(%rbx), %r9 movq %rsi, (%r9,%rcx) movl %edi, 0x8(%r9,%rcx) movl %r8d, 0xc(%r9,%rcx) movq %rdx, 0x10(%r9,%rcx) incl (%rsi) testb $0x2, %r8b je 0x76f9 incl (%rdx) addq $0x18, %rcx cmpq %rcx, %rax jne 0x76c2 movl %r15d, 0xc(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
rak_record_init_copy: push r15 push r14 push r12 push rbx push rax mov r12, rdx mov r14, rsi mov rbx, rdi mov r15d, [rsi+0Ch] mov esi, r15d call rak_record_init_with_capacity cmp byte ptr [r12], 1 jnz short loc_7706 test r15d, r15d jle short loc_7702 lea rax, ds:0[r15*8] lea rax, [rax+rax*2] xor ecx, ecx loc_76C2: mov rdx, [r14+10h] mov rsi, [rdx+rcx] mov edi, [rdx+rcx+8] mov r8d, [rdx+rcx+0Ch] mov rdx, [rdx+rcx+10h] mov r9, [rbx+10h] mov [r9+rcx], rsi mov [r9+rcx+8], edi mov [r9+rcx+0Ch], r8d mov [r9+rcx+10h], rdx inc dword ptr [rsi] test r8b, 2 jz short loc_76F9 inc dword ptr [rdx] loc_76F9: add rcx, 18h cmp rax, rcx jnz short loc_76C2 loc_7702: mov [rbx+0Ch], r15d loc_7706: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long rak_record_init_copy(long long a1, long long a2, _BYTE *a3) { long long v6; // r15 long long result; // rax long long v8; // rcx long long v9; // rdx _DWORD *v10; // rsi int v11; // edi int v12; // r8d _DWORD *v13; // rdx long long v14; // r9 v6 = *(unsigned int *)(a2 + 12); result = rak_record_init_with_capacity(a1, *(_DWORD *)(a2 + 12), a3); if ( *a3 == 1 ) { if ( (int)v6 > 0 ) { result = 24 * v6; v8 = 0LL; do { v9 = *(_QWORD *)(a2 + 16); v10 = *(_DWORD **)(v9 + v8); v11 = *(_DWORD *)(v9 + v8 + 8); v12 = *(_DWORD *)(v9 + v8 + 12); v13 = *(_DWORD **)(v9 + v8 + 16); v14 = *(_QWORD *)(a1 + 16); *(_QWORD *)(v14 + v8) = v10; *(_DWORD *)(v14 + v8 + 8) = v11; *(_DWORD *)(v14 + v8 + 12) = v12; *(_QWORD *)(v14 + v8 + 16) = v13; ++*v10; if ( (v12 & 2) != 0 ) ++*v13; v8 += 24LL; } while ( result != v8 ); } *(_DWORD *)(a1 + 12) = v6; } return result; }
rak_record_init_copy: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDX MOV R14,RSI MOV RBX,RDI MOV R15D,dword ptr [RSI + 0xc] MOV ESI,R15D CALL 0x00107638 CMP byte ptr [R12],0x1 JNZ 0x00107706 TEST R15D,R15D JLE 0x00107702 LEA RAX,[R15*0x8] LEA RAX,[RAX + RAX*0x2] XOR ECX,ECX LAB_001076c2: MOV RDX,qword ptr [R14 + 0x10] MOV RSI,qword ptr [RDX + RCX*0x1] MOV EDI,dword ptr [RDX + RCX*0x1 + 0x8] MOV R8D,dword ptr [RDX + RCX*0x1 + 0xc] MOV RDX,qword ptr [RDX + RCX*0x1 + 0x10] MOV R9,qword ptr [RBX + 0x10] MOV qword ptr [R9 + RCX*0x1],RSI MOV dword ptr [R9 + RCX*0x1 + 0x8],EDI MOV dword ptr [R9 + RCX*0x1 + 0xc],R8D MOV qword ptr [R9 + RCX*0x1 + 0x10],RDX INC dword ptr [RSI] TEST R8B,0x2 JZ 0x001076f9 INC dword ptr [RDX] LAB_001076f9: ADD RCX,0x18 CMP RAX,RCX JNZ 0x001076c2 LAB_00107702: MOV dword ptr [RBX + 0xc],R15D LAB_00107706: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void rak_record_init_copy(long param_1,long param_2,char *param_3) { uint uVar1; int4 uVar2; uint uVar3; long lVar4; int *piVar5; int *piVar6; long lVar7; uVar1 = *(uint *)(param_2 + 0xc); rak_record_init_with_capacity(param_1,(ulong)uVar1); if (*param_3 == '\x01') { if (0 < (int)uVar1) { lVar7 = 0; do { lVar4 = *(long *)(param_2 + 0x10); piVar5 = *(int **)(lVar4 + lVar7); uVar2 = *(int4 *)(lVar4 + 8 + lVar7); uVar3 = *(uint *)(lVar4 + 0xc + lVar7); piVar6 = *(int **)(lVar4 + 0x10 + lVar7); lVar4 = *(long *)(param_1 + 0x10); *(int **)(lVar4 + lVar7) = piVar5; *(int4 *)(lVar4 + 8 + lVar7) = uVar2; *(uint *)(lVar4 + 0xc + lVar7) = uVar3; *(int **)(lVar4 + 0x10 + lVar7) = piVar6; *piVar5 = *piVar5 + 1; if ((uVar3 & 2) != 0) { *piVar6 = *piVar6 + 1; } lVar7 = lVar7 + 0x18; } while ((ulong)uVar1 * 0x18 != lVar7); } *(uint *)(param_1 + 0xc) = uVar1; } return; }
40,136
mysql_real_query_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_real_query_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_real_query, (parms->mysql, parms->stmt_str, parms->length), parms->mysql, int, r_int) }
O0
c
mysql_real_query_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi movq -0x10(%rbp), %rax movq 0x10(%rax), %rdx callq 0xa5630 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_real_query_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] mov rax, [rbp+var_10] mov rdx, [rax+10h] call mysql_real_query mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_real_query_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); v2[2] = mysql_real_query(*a1, a1[1], a1[2]); result = v2; *v2 = 0; return result; }
mysql_real_query_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x10] CALL 0x001a5630 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_real_query_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_real_query(*param_1,param_1[1],param_1[2]); puVar1[2] = uVar2; *puVar1 = 0; return; }
40,137
end_partitioned_key_cache
eloqsql/mysys/mf_keycache.c
static void end_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache, my_bool cleanup) { uint i; uint partitions= keycache->partitions; DBUG_ENTER("partitioned_end_key_cache"); DBUG_PRINT("enter", ("key_cache: %p", keycache)); for (i= 0; i < partitions; i++) { end_simple_key_cache(keycache->partition_array[i], cleanup); } if (cleanup) { for (i= 0; i < partitions; i++) my_free(keycache->partition_array[i]); my_free(keycache->partition_array); keycache->key_cache_inited= 0; } DBUG_VOID_RETURN; }
O3
c
end_partitioned_key_cache: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %r14d movq %rdi, %rbx movl 0x1c(%rdi), %r12d testq %r12, %r12 je 0x9bc1f xorl %r13d, %r13d movsbl %r14b, %r15d movq 0x8(%rbx), %rax movq (%rax,%r13,8), %rdi movl %r15d, %esi callq 0x9aa46 incq %r13 cmpq %r13, %r12 jne 0x9bbe3 testb %r14b, %r14b je 0x9bc30 testq %r12, %r12 je 0x9bc24 xorl %r14d, %r14d movq 0x8(%rbx), %rax movq (%rax,%r14,8), %rdi callq 0xa0eba incq %r14 cmpq %r14, %r12 jne 0x9bc08 jmp 0x9bc24 testb %r14b, %r14b je 0x9bc30 movq 0x8(%rbx), %rdi callq 0xa0eba movb $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
end_partitioned_key_cache: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, esi mov rbx, rdi mov r12d, [rdi+1Ch] test r12, r12 jz short loc_9BC1F xor r13d, r13d movsx r15d, r14b loc_9BBE3: mov rax, [rbx+8] mov rdi, [rax+r13*8] mov esi, r15d call end_simple_key_cache inc r13 cmp r12, r13 jnz short loc_9BBE3 test r14b, r14b jz short loc_9BC30 test r12, r12 jz short loc_9BC24 xor r14d, r14d loc_9BC08: mov rax, [rbx+8] mov rdi, [rax+r14*8] call my_free inc r14 cmp r12, r14 jnz short loc_9BC08 jmp short loc_9BC24 loc_9BC1F: test r14b, r14b jz short loc_9BC30 loc_9BC24: mov rdi, [rbx+8] call my_free mov byte ptr [rbx], 0 loc_9BC30: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long end_partitioned_key_cache(long long a1, char a2) { long long v2; // r12 long long v3; // r13 long long result; // rax long long i; // r14 v2 = *(unsigned int *)(a1 + 28); if ( !*(_DWORD *)(a1 + 28) ) { if ( !a2 ) return result; goto LABEL_10; } v3 = 0LL; do result = end_simple_key_cache(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v3++), a2); while ( v2 != v3 ); if ( a2 ) { if ( v2 ) { for ( i = 0LL; i != v2; ++i ) my_free(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * i)); } LABEL_10: result = my_free(*(_QWORD *)(a1 + 8)); *(_BYTE *)a1 = 0; } return result; }
end_partitioned_key_cache: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14D,ESI MOV RBX,RDI MOV R12D,dword ptr [RDI + 0x1c] TEST R12,R12 JZ 0x0019bc1f XOR R13D,R13D MOVSX R15D,R14B LAB_0019bbe3: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + R13*0x8] MOV ESI,R15D CALL 0x0019aa46 INC R13 CMP R12,R13 JNZ 0x0019bbe3 TEST R14B,R14B JZ 0x0019bc30 TEST R12,R12 JZ 0x0019bc24 XOR R14D,R14D LAB_0019bc08: MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + R14*0x8] CALL 0x001a0eba INC R14 CMP R12,R14 JNZ 0x0019bc08 JMP 0x0019bc24 LAB_0019bc1f: TEST R14B,R14B JZ 0x0019bc30 LAB_0019bc24: MOV RDI,qword ptr [RBX + 0x8] CALL 0x001a0eba MOV byte ptr [RBX],0x0 LAB_0019bc30: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void end_partitioned_key_cache(int1 *param_1,char param_2) { ulong uVar1; ulong uVar2; uVar1 = (ulong)*(uint *)(param_1 + 0x1c); if (uVar1 == 0) { if (param_2 == '\0') { return; } } else { uVar2 = 0; do { end_simple_key_cache(*(int8 *)(*(long *)(param_1 + 8) + uVar2 * 8),(int)param_2); uVar2 = uVar2 + 1; } while (uVar1 != uVar2); if (param_2 == '\0') { return; } if (uVar1 != 0) { uVar2 = 0; do { my_free(*(int8 *)(*(long *)(param_1 + 8) + uVar2 * 8)); uVar2 = uVar2 + 1; } while (uVar1 != uVar2); } } my_free(*(int8 *)(param_1 + 8)); *param_1 = 0; return; }
40,138
nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&)
ng-log[P]ng-log/src/logging.cc
LogMessage::LogMessage(const char* file, int line, const internal::CheckOpString& result) : allocated_(nullptr) { Init(file, line, NGLOG_FATAL, &LogMessage::SendToLog); stream() << "Check failed: " << (*result.str_) << " "; }
O2
cpp
nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %ebp movq %rsi, %r14 movq %rdi, %r15 andq $0x0, (%rdi) addq $0x10, %rdi callq 0xd484 leaq 0x4c(%rip), %r8 # 0xa834 pushq $0x3 popq %rcx movq %r15, %rdi movq %r14, %rsi movl %ebp, %edx xorl %r9d, %r9d callq 0xa2e6 movl $0x7538, %edi # imm = 0x7538 addq 0x8(%r15), %rdi leaq 0x15207(%rip), %rsi # 0x1fa12 callq 0x7570 movq (%rbx), %rsi movq %rax, %rdi callq 0x74c0 leaq 0x1691d(%rip), %rsi # 0x2113f movq %rax, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x7570
_ZN5nglog10LogMessageC2EPKciRKNS_8internal13CheckOpStringE: push rbp; Alternative name is 'nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&)' push r15 push r14 push rbx push rax mov rbx, rcx mov ebp, edx mov r14, rsi mov r15, rdi and qword ptr [rdi], 0 add rdi, 10h; this call _ZN5nglog14LogMessageTimeC2Ev; nglog::LogMessageTime::LogMessageTime(void) lea r8, _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void) push 3 pop rcx mov rdi, r15 mov rsi, r14 mov edx, ebp xor r9d, r9d call _ZN5nglog10LogMessage4InitEPKciNS_11LogSeverityEMS0_FvvE; nglog::LogMessage::Init(char const*,int,nglog::LogSeverity,void (nglog::LogMessage::*)(void)) mov edi, 7538h add rdi, [r15+8] lea rsi, aCheckFailed; "Check failed: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [rbx] mov rdi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rsi, asc_2113C+3; " " mov rdi, rax add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*)
long long nglog::LogMessage::LogMessage(_QWORD *a1, nglog::tools *a2, int a3, _QWORD *a4) { long long v6; // rax long long v7; // rax *a1 = 0LL; nglog::LogMessageTime::LogMessageTime((nglog::LogMessageTime *)(a1 + 2)); nglog::LogMessage::Init((long long)a1, a2, a3, 3u, (long long)nglog::LogMessage::SendToLog, 0LL); v6 = std::operator<<<std::char_traits<char>>(a1[1] + 30008LL, "Check failed: "); v7 = std::operator<<<char>(v6, *a4); return std::operator<<<std::char_traits<char>>(v7, " "); }
LogMessage: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV EBP,EDX MOV R14,RSI MOV R15,RDI AND qword ptr [RDI],0x0 ADD RDI,0x10 CALL 0x0010d484 LEA R8,[0x10a834] PUSH 0x3 POP RCX MOV RDI,R15 MOV RSI,R14 MOV EDX,EBP XOR R9D,R9D CALL 0x0010a2e6 MOV EDI,0x7538 ADD RDI,qword ptr [R15 + 0x8] LEA RSI,[0x11fa12] CALL 0x00107570 MOV RSI,qword ptr [RBX] MOV RDI,RAX CALL 0x001074c0 LEA RSI,[0x12113f] MOV RDI,RAX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00107570
/* nglog::LogMessage::LogMessage(char const*, int, nglog::internal::CheckOpString const&) */ void __thiscall nglog::LogMessage::LogMessage(LogMessage *this,char *param_1,int param_2,CheckOpString *param_3) { ostream *poVar1; *(int8 *)this = 0; LogMessageTime::LogMessageTime((LogMessageTime *)(this + 0x10)); Init(this,param_1,param_2,3,SendToLog,0); poVar1 = std::operator<<((ostream *)(*(long *)(this + 8) + 0x7538),"Check failed: "); poVar1 = std::operator<<(poVar1,*(string **)param_3); std::operator<<(poVar1," "); return; }
40,139
nglog::InstallFailureSignalHandler()
ng-log[P]ng-log/src/signalhandler.cc
void InstallFailureSignalHandler() { #ifdef HAVE_SIGACTION // Build the sigaction struct. struct sigaction sig_action; memset(&sig_action, 0, sizeof(sig_action)); sigemptyset(&sig_action.sa_mask); sig_action.sa_flags |= SA_SIGINFO; sig_action.sa_sigaction = &FailureSignalHandler; for (auto kFailureSignal : kFailureSignals) { CHECK_ERR(sigaction(kFailureSignal.number, &sig_action, nullptr)); } kFailureSignalHandlerInstalled = true; #elif defined(NGLOG_OS_WINDOWS) for (size_t i = 0; i < ARRAYSIZE(kFailureSignals); ++i) { CHECK_NE(signal(kFailureSignals[i].number, &FailureSignalHandler), SIG_ERR); } kFailureSignalHandlerInstalled = true; #endif // HAVE_SIGACTION }
O1
cpp
nglog::InstallFailureSignalHandler(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 leaq 0x80(%rsp), %rbx xorl %r13d, %r13d movl $0x98, %edx movq %rbx, %rdi xorl %esi, %esi callq 0x72a0 leaq 0x88(%rsp), %r14 movq %r14, %rdi callq 0x76d0 orb $0x4, 0x80(%r14) leaq -0x88(%rip), %rax # 0x2099d movq %rax, -0x8(%r14) leaq 0x10250(%rip), %rbp # 0x30c80 leaq 0x44fb(%rip), %r14 # 0x24f32 leaq 0x20(%rsp), %r15 leaq 0x453c(%rip), %r12 # 0x24f7f movl (%r13,%rbp), %edi movq %rbx, %rsi xorl %edx, %edx callq 0x76e0 cmpl $-0x1, %eax je 0x20a63 addq $0x10, %r13 cmpq $0x60, %r13 jne 0x20a43 jmp 0x20abb leaq -0x157c0(%rip), %rax # 0xb2aa movq %rax, 0x10(%rsp) movq $0x0, 0x18(%rsp) movups 0x10(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movl $0x18b, %edx # imm = 0x18B movl $0x3, %ecx xorl %r8d, %r8d callq 0xc34e movq %r15, %rdi callq 0xb76e movl $0x36, %edx movq %rax, %rdi movq %r12, %rsi callq 0x7600 movq %r15, %rdi callq 0xc3b8 jmp 0x20a57 addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xc3b8 movq %rbx, %rdi callq 0x79b0 movq %rax, %rdi callq 0x98c3
_ZN5nglog27InstallFailureSignalHandlerEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h lea rbx, [rsp+148h+var_C8] xor r13d, r13d mov edx, 98h mov rdi, rbx xor esi, esi call _memset lea r14, [rsp+148h+var_C0] mov rdi, r14 call _sigemptyset or byte ptr [r14+80h], 4 lea rax, _ZN5nglog12_GLOBAL__N_120FailureSignalHandlerEiP9siginfo_tPv; nglog::`anonymous namespace'::FailureSignalHandler(int,siginfo_t *,void *) mov [r14-8], rax lea rbp, _ZN5nglog12_GLOBAL__N_115kFailureSignalsE; nglog::`anonymous namespace'::kFailureSignals lea r14, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea r15, [rsp+148h+var_128] lea r12, aSigactionKfail; "sigaction(kFailureSignal.number, &sig_a"... loc_20A43: mov edi, [r13+rbp+0] mov rsi, rbx xor edx, edx call _sigaction cmp eax, 0FFFFFFFFh jz short loc_20A63 loc_20A57: add r13, 10h cmp r13, 60h ; '`' jnz short loc_20A43 jmp short loc_20ABB loc_20A63: lea rax, _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void) mov qword ptr [rsp+148h+var_138], rax mov qword ptr [rsp+148h+var_138+8], 0 movups xmm0, [rsp+148h+var_138] movups [rsp+148h+var_148], xmm0 mov rdi, r15 mov rsi, r14 mov edx, 18Bh mov ecx, 3 xor r8d, r8d call _ZN5nglog15ErrnoLogMessageC2EPKciNS_11LogSeverityElMNS_10LogMessageEFvvE; nglog::ErrnoLogMessage::ErrnoLogMessage(char const*,int,nglog::LogSeverity,long,void (nglog::LogMessage::*)(void)) mov rdi, r15; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov edx, 36h ; '6' mov rdi, rax 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) mov rdi, r15; this call _ZN5nglog15ErrnoLogMessageD2Ev; nglog::ErrnoLogMessage::~ErrnoLogMessage() jmp short loc_20A57 loc_20ABB: add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_18]; this call _ZN5nglog15ErrnoLogMessageD2Ev; nglog::ErrnoLogMessage::~ErrnoLogMessage() mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void nglog::InstallFailureSignalHandler(nglog *this) { long long v1; // r13 long long v2; // r9 long long v3; // rax _QWORD v4[12]; // [rsp+20h] [rbp-128h] BYREF long long ( *v5)(int, long long, long long); // [rsp+80h] [rbp-C8h] BYREF _BYTE v6[128]; // [rsp+88h] [rbp-C0h] BYREF char v7; // [rsp+108h] [rbp-40h] v1 = 0LL; memset(&v5, 0LL, 152LL); sigemptyset(v6); v7 |= 4u; v5 = nglog::`anonymous namespace'::FailureSignalHandler; do { if ( (unsigned int)sigaction( *(unsigned int *)((char *)&nglog::`anonymous namespace'::kFailureSignals + v1), &v5, 0LL) == -1 ) { nglog::ErrnoLogMessage::ErrnoLogMessage( v4, (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/signalhandler.cc", 395, 3, 0LL, v2, (long long)nglog::LogMessage::SendToLog, 0LL); v3 = nglog::LogMessage::stream((nglog::LogMessage *)v4); std::__ostream_insert<char,std::char_traits<char>>( v3, "sigaction(kFailureSignal.number, &sig_action, nullptr)", 54LL); nglog::ErrnoLogMessage::~ErrnoLogMessage((nglog::ErrnoLogMessage *)v4); } v1 += 16LL; } while ( v1 != 96 ); }
InstallFailureSignalHandler: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 LEA RBX,[RSP + 0x80] XOR R13D,R13D MOV EDX,0x98 MOV RDI,RBX XOR ESI,ESI CALL 0x001072a0 LEA R14,[RSP + 0x88] MOV RDI,R14 CALL 0x001076d0 OR byte ptr [R14 + 0x80],0x4 LEA RAX,[0x12099d] MOV qword ptr [R14 + -0x8],RAX LEA RBP,[0x130c80] LEA R14,[0x124f32] LEA R15,[RSP + 0x20] LEA R12,[0x124f7f] LAB_00120a43: MOV EDI,dword ptr [R13 + RBP*0x1] MOV RSI,RBX XOR EDX,EDX CALL 0x001076e0 CMP EAX,-0x1 JZ 0x00120a63 LAB_00120a57: ADD R13,0x10 CMP R13,0x60 JNZ 0x00120a43 JMP 0x00120abb LAB_00120a63: LEA RAX,[0x10b2aa] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],0x0 MOVUPS XMM0,xmmword ptr [RSP + 0x10] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,R14 MOV EDX,0x18b MOV ECX,0x3 XOR R8D,R8D CALL 0x0010c34e LAB_00120a99: MOV RDI,R15 CALL 0x0010b76e MOV EDX,0x36 MOV RDI,RAX MOV RSI,R12 CALL 0x00107600 LAB_00120ab1: MOV RDI,R15 CALL 0x0010c3b8 JMP 0x00120a57 LAB_00120abb: ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::InstallFailureSignalHandler() */ void nglog::InstallFailureSignalHandler(void) { int iVar1; ostream *poVar2; int8 in_R9; long lVar3; LogMessage local_128 [96]; sigaction local_c8; lVar3 = 0; memset(&local_c8,0,0x98); sigemptyset(&local_c8.sa_mask); local_c8.sa_flags._0_1_ = (byte)local_c8.sa_flags | 4; local_c8.__sigaction_handler.sa_handler = (anonymous_namespace)::FailureSignalHandler; do { iVar1 = sigaction(*(int *)((long)&(anonymous_namespace)::kFailureSignals + lVar3),&local_c8, (sigaction *)0x0); if (iVar1 == -1) { ErrnoLogMessage::ErrnoLogMessage ((ErrnoLogMessage *)local_128, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/signalhandler.cc", 0x18b,3,0,in_R9,0x10b2aa,0); /* try { // try from 00120a99 to 00120ab0 has its CatchHandler @ 00120acd */ poVar2 = (ostream *)LogMessage::stream(local_128); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"sigaction(kFailureSignal.number, &sig_action, nullptr)",0x36); ErrnoLogMessage::~ErrnoLogMessage((ErrnoLogMessage *)local_128); } lVar3 = lVar3 + 0x10; } while (lVar3 != 0x60); return; }
40,140
nglog::InstallFailureSignalHandler()
ng-log[P]ng-log/src/signalhandler.cc
void InstallFailureSignalHandler() { #ifdef HAVE_SIGACTION // Build the sigaction struct. struct sigaction sig_action; memset(&sig_action, 0, sizeof(sig_action)); sigemptyset(&sig_action.sa_mask); sig_action.sa_flags |= SA_SIGINFO; sig_action.sa_sigaction = &FailureSignalHandler; for (auto kFailureSignal : kFailureSignals) { CHECK_ERR(sigaction(kFailureSignal.number, &sig_action, nullptr)); } kFailureSignalHandlerInstalled = true; #elif defined(NGLOG_OS_WINDOWS) for (size_t i = 0; i < ARRAYSIZE(kFailureSignals); ++i) { CHECK_NE(signal(kFailureSignals[i].number, &FailureSignalHandler), SIG_ERR); } kFailureSignalHandlerInstalled = true; #endif // HAVE_SIGACTION }
O3
cpp
nglog::InstallFailureSignalHandler(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 leaq 0x80(%rsp), %rbx xorl %r13d, %r13d movl $0x98, %edx movq %rbx, %rdi xorl %esi, %esi callq 0x72a0 leaq 0x88(%rsp), %r14 movq %r14, %rdi callq 0x76d0 orb $0x4, 0x80(%r14) leaq -0x88(%rip), %rax # 0x206c5 movq %rax, -0x8(%r14) leaq 0x10528(%rip), %rbp # 0x30c80 leaq 0x47b3(%rip), %r14 # 0x24f12 leaq 0x20(%rsp), %r15 leaq 0x47f4(%rip), %r12 # 0x24f5f movl (%r13,%rbp), %edi movq %rbx, %rsi xorl %edx, %edx callq 0x76e0 cmpl $-0x1, %eax je 0x2078b addq $0x10, %r13 cmpq $0x60, %r13 jne 0x2076b jmp 0x207e3 leaq -0x15708(%rip), %rax # 0xb08a movq %rax, 0x10(%rsp) movq $0x0, 0x18(%rsp) movups 0x10(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movl $0x18b, %edx # imm = 0x18B movl $0x3, %ecx xorl %r8d, %r8d callq 0xc1f8 movq %r15, %rdi callq 0xb552 movl $0x36, %edx movq %rax, %rdi movq %r12, %rsi callq 0x7600 movq %r15, %rdi callq 0xc262 jmp 0x2077f addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xc262 movq %rbx, %rdi callq 0x79b0 movq %rax, %rdi callq 0x9717
_ZN5nglog27InstallFailureSignalHandlerEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h lea rbx, [rsp+148h+var_C8] xor r13d, r13d mov edx, 98h mov rdi, rbx xor esi, esi call _memset lea r14, [rsp+148h+var_C0] mov rdi, r14 call _sigemptyset or byte ptr [r14+80h], 4 lea rax, _ZN5nglog12_GLOBAL__N_120FailureSignalHandlerEiP9siginfo_tPv; nglog::`anonymous namespace'::FailureSignalHandler(int,siginfo_t *,void *) mov [r14-8], rax lea rbp, _ZN5nglog12_GLOBAL__N_115kFailureSignalsE; nglog::`anonymous namespace'::kFailureSignals lea r14, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea r15, [rsp+148h+var_128] lea r12, aSigactionKfail; "sigaction(kFailureSignal.number, &sig_a"... loc_2076B: mov edi, [r13+rbp+0] mov rsi, rbx xor edx, edx call _sigaction cmp eax, 0FFFFFFFFh jz short loc_2078B loc_2077F: add r13, 10h cmp r13, 60h ; '`' jnz short loc_2076B jmp short loc_207E3 loc_2078B: lea rax, _ZN5nglog10LogMessage9SendToLogEv; nglog::LogMessage::SendToLog(void) mov qword ptr [rsp+148h+var_138], rax mov qword ptr [rsp+148h+var_138+8], 0 movups xmm0, [rsp+148h+var_138] movups [rsp+148h+var_148], xmm0 mov rdi, r15 mov rsi, r14 mov edx, 18Bh mov ecx, 3 xor r8d, r8d call _ZN5nglog15ErrnoLogMessageC2EPKciNS_11LogSeverityElMNS_10LogMessageEFvvE; nglog::ErrnoLogMessage::ErrnoLogMessage(char const*,int,nglog::LogSeverity,long,void (nglog::LogMessage::*)(void)) mov rdi, r15; this call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov edx, 36h ; '6' mov rdi, rax 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) mov rdi, r15; this call _ZN5nglog15ErrnoLogMessageD2Ev; nglog::ErrnoLogMessage::~ErrnoLogMessage() jmp short loc_2077F loc_207E3: add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_18]; this call _ZN5nglog15ErrnoLogMessageD2Ev; nglog::ErrnoLogMessage::~ErrnoLogMessage() mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void nglog::InstallFailureSignalHandler(nglog *this) { long long v1; // r13 long long v2; // r9 long long v3; // rax _QWORD v4[12]; // [rsp+20h] [rbp-128h] BYREF long long ( *v5)(int, long long, long long); // [rsp+80h] [rbp-C8h] BYREF _BYTE v6[128]; // [rsp+88h] [rbp-C0h] BYREF char v7; // [rsp+108h] [rbp-40h] v1 = 0LL; memset(&v5, 0LL, 152LL); sigemptyset(v6); v7 |= 4u; v5 = nglog::`anonymous namespace'::FailureSignalHandler; do { if ( (unsigned int)sigaction( *(unsigned int *)((char *)&nglog::`anonymous namespace'::kFailureSignals + v1), &v5, 0LL) == -1 ) { nglog::ErrnoLogMessage::ErrnoLogMessage( v4, (nglog::tools *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/signalhandler.cc", 395, 3, 0LL, v2, (long long)nglog::LogMessage::SendToLog, 0LL); v3 = nglog::LogMessage::stream((nglog::LogMessage *)v4); std::__ostream_insert<char,std::char_traits<char>>( v3, "sigaction(kFailureSignal.number, &sig_action, nullptr)", 54LL); nglog::ErrnoLogMessage::~ErrnoLogMessage((nglog::ErrnoLogMessage *)v4); } v1 += 16LL; } while ( v1 != 96 ); }
InstallFailureSignalHandler: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 LEA RBX,[RSP + 0x80] XOR R13D,R13D MOV EDX,0x98 MOV RDI,RBX XOR ESI,ESI CALL 0x001072a0 LEA R14,[RSP + 0x88] MOV RDI,R14 CALL 0x001076d0 OR byte ptr [R14 + 0x80],0x4 LEA RAX,[0x1206c5] MOV qword ptr [R14 + -0x8],RAX LEA RBP,[0x130c80] LEA R14,[0x124f12] LEA R15,[RSP + 0x20] LEA R12,[0x124f5f] LAB_0012076b: MOV EDI,dword ptr [R13 + RBP*0x1] MOV RSI,RBX XOR EDX,EDX CALL 0x001076e0 CMP EAX,-0x1 JZ 0x0012078b LAB_0012077f: ADD R13,0x10 CMP R13,0x60 JNZ 0x0012076b JMP 0x001207e3 LAB_0012078b: LEA RAX,[0x10b08a] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],0x0 MOVUPS XMM0,xmmword ptr [RSP + 0x10] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R15 MOV RSI,R14 MOV EDX,0x18b MOV ECX,0x3 XOR R8D,R8D CALL 0x0010c1f8 LAB_001207c1: MOV RDI,R15 CALL 0x0010b552 MOV EDX,0x36 MOV RDI,RAX MOV RSI,R12 CALL 0x00107600 LAB_001207d9: MOV RDI,R15 CALL 0x0010c262 JMP 0x0012077f LAB_001207e3: ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::InstallFailureSignalHandler() */ void nglog::InstallFailureSignalHandler(void) { int iVar1; ostream *poVar2; int8 in_R9; long lVar3; LogMessage local_128 [96]; sigaction local_c8; lVar3 = 0; memset(&local_c8,0,0x98); sigemptyset(&local_c8.sa_mask); local_c8.sa_flags._0_1_ = (byte)local_c8.sa_flags | 4; local_c8.__sigaction_handler.sa_handler = (anonymous_namespace)::FailureSignalHandler; do { iVar1 = sigaction(*(int *)((long)&(anonymous_namespace)::kFailureSignals + lVar3),&local_c8, (sigaction *)0x0); if (iVar1 == -1) { ErrnoLogMessage::ErrnoLogMessage ((ErrnoLogMessage *)local_128, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/signalhandler.cc", 0x18b,3,0,in_R9,0x10b08a,0); /* try { // try from 001207c1 to 001207d8 has its CatchHandler @ 001207f5 */ poVar2 = (ostream *)LogMessage::stream(local_128); std::__ostream_insert<char,std::char_traits<char>> (poVar2,"sigaction(kFailureSignal.number, &sig_action, nullptr)",0x36); ErrnoLogMessage::~ErrnoLogMessage((ErrnoLogMessage *)local_128); } lVar3 = lVar3 + 0x10; } while (lVar3 != 0x60); return; }
40,141
func_uni_gbk_onechar
eloqsql/strings/ctype-gbk.c
static int func_uni_gbk_onechar(int code){ if ((code>=0x00A4)&&(code<=0x0451)) return(tab_uni_gbk0[code-0x00A4]); if ((code>=0x2010)&&(code<=0x2312)) return(tab_uni_gbk1[code-0x2010]); if ((code>=0x2460)&&(code<=0x2642)) return(tab_uni_gbk2[code-0x2460]); if ((code>=0x3000)&&(code<=0x3129)) return(tab_uni_gbk3[code-0x3000]); if ((code>=0x3220)&&(code<=0x32A3)) return(tab_uni_gbk4[code-0x3220]); if ((code>=0x338E)&&(code<=0x33D5)) return(tab_uni_gbk5[code-0x338E]); if ((code>=0x4E00)&&(code<=0x9FA5)) return(tab_uni_gbk6[code-0x4E00]); if ((code>=0xF92C)&&(code<=0xFA29)) return(tab_uni_gbk7[code-0xF92C]); if ((code>=0xFE30)&&(code<=0xFFE5)) return(tab_uni_gbk8[code-0xFE30]); return(0); }
O0
c
func_uni_gbk_onechar: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0xa4, -0x8(%rbp) jl 0xd3757 cmpl $0x451, -0x8(%rbp) # imm = 0x451 jg 0xd3757 movl -0x8(%rbp), %eax subl $0xa4, %eax movslq %eax, %rcx leaq 0xf3485(%rip), %rax # 0x1c6bd0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd38d5 cmpl $0x2010, -0x8(%rbp) # imm = 0x2010 jl 0xd3787 cmpl $0x2312, -0x8(%rbp) # imm = 0x2312 jg 0xd3787 movl -0x8(%rbp), %eax subl $0x2010, %eax # imm = 0x2010 movslq %eax, %rcx leaq 0xf3bb5(%rip), %rax # 0x1c7330 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd38d5 cmpl $0x2460, -0x8(%rbp) # imm = 0x2460 jl 0xd37b7 cmpl $0x2642, -0x8(%rbp) # imm = 0x2642 jg 0xd37b7 movl -0x8(%rbp), %eax subl $0x2460, %eax # imm = 0x2460 movslq %eax, %rcx leaq 0xf4195(%rip), %rax # 0x1c7940 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd38d5 cmpl $0x3000, -0x8(%rbp) # imm = 0x3000 jl 0xd37e7 cmpl $0x3129, -0x8(%rbp) # imm = 0x3129 jg 0xd37e7 movl -0x8(%rbp), %eax subl $0x3000, %eax # imm = 0x3000 movslq %eax, %rcx leaq 0xf4535(%rip), %rax # 0x1c7d10 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd38d5 cmpl $0x3220, -0x8(%rbp) # imm = 0x3220 jl 0xd3817 cmpl $0x32a3, -0x8(%rbp) # imm = 0x32A3 jg 0xd3817 movl -0x8(%rbp), %eax subl $0x3220, %eax # imm = 0x3220 movslq %eax, %rcx leaq 0xf4765(%rip), %rax # 0x1c7f70 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd38d5 cmpl $0x338e, -0x8(%rbp) # imm = 0x338E jl 0xd3847 cmpl $0x33d5, -0x8(%rbp) # imm = 0x33D5 jg 0xd3847 movl -0x8(%rbp), %eax subl $0x338e, %eax # imm = 0x338E movslq %eax, %rcx leaq 0xf4845(%rip), %rax # 0x1c8080 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd38d5 cmpl $0x4e00, -0x8(%rbp) # imm = 0x4E00 jl 0xd3874 cmpl $0x9fa5, -0x8(%rbp) # imm = 0x9FA5 jg 0xd3874 movl -0x8(%rbp), %eax subl $0x4e00, %eax # imm = 0x4E00 movslq %eax, %rcx leaq 0xf48a5(%rip), %rax # 0x1c8110 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd38d5 cmpl $0xf92c, -0x8(%rbp) # imm = 0xF92C jl 0xd38a1 cmpl $0xfa29, -0x8(%rbp) # imm = 0xFA29 jg 0xd38a1 movl -0x8(%rbp), %eax subl $0xf92c, %eax # imm = 0xF92C movslq %eax, %rcx leaq 0xfebc8(%rip), %rax # 0x1d2460 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd38d5 cmpl $0xfe30, -0x8(%rbp) # imm = 0xFE30 jl 0xd38ce cmpl $0xffe5, -0x8(%rbp) # imm = 0xFFE5 jg 0xd38ce movl -0x8(%rbp), %eax subl $0xfe30, %eax # imm = 0xFE30 movslq %eax, %rcx leaq 0xfed9b(%rip), %rax # 0x1d2660 movzwl (%rax,%rcx,2), %eax movl %eax, -0x4(%rbp) jmp 0xd38d5 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
func_uni_gbk_onechar: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 0A4h jl short loc_D3757 cmp [rbp+var_8], 451h jg short loc_D3757 mov eax, [rbp+var_8] sub eax, 0A4h movsxd rcx, eax lea rax, tab_uni_gbk0 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D38D5 loc_D3757: cmp [rbp+var_8], 2010h jl short loc_D3787 cmp [rbp+var_8], 2312h jg short loc_D3787 mov eax, [rbp+var_8] sub eax, 2010h movsxd rcx, eax lea rax, tab_uni_gbk1 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D38D5 loc_D3787: cmp [rbp+var_8], 2460h jl short loc_D37B7 cmp [rbp+var_8], 2642h jg short loc_D37B7 mov eax, [rbp+var_8] sub eax, 2460h movsxd rcx, eax lea rax, tab_uni_gbk2 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D38D5 loc_D37B7: cmp [rbp+var_8], 3000h jl short loc_D37E7 cmp [rbp+var_8], 3129h jg short loc_D37E7 mov eax, [rbp+var_8] sub eax, 3000h movsxd rcx, eax lea rax, tab_uni_gbk3 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D38D5 loc_D37E7: cmp [rbp+var_8], 3220h jl short loc_D3817 cmp [rbp+var_8], 32A3h jg short loc_D3817 mov eax, [rbp+var_8] sub eax, 3220h movsxd rcx, eax lea rax, tab_uni_gbk4 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D38D5 loc_D3817: cmp [rbp+var_8], 338Eh jl short loc_D3847 cmp [rbp+var_8], 33D5h jg short loc_D3847 mov eax, [rbp+var_8] sub eax, 338Eh movsxd rcx, eax lea rax, tab_uni_gbk5 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp loc_D38D5 loc_D3847: cmp [rbp+var_8], 4E00h jl short loc_D3874 cmp [rbp+var_8], 9FA5h jg short loc_D3874 mov eax, [rbp+var_8] sub eax, 4E00h movsxd rcx, eax lea rax, tab_uni_gbk6 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_D38D5 loc_D3874: cmp [rbp+var_8], 0F92Ch jl short loc_D38A1 cmp [rbp+var_8], 0FA29h jg short loc_D38A1 mov eax, [rbp+var_8] sub eax, 0F92Ch movsxd rcx, eax lea rax, tab_uni_gbk7 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_D38D5 loc_D38A1: cmp [rbp+var_8], 0FE30h jl short loc_D38CE cmp [rbp+var_8], 0FFE5h jg short loc_D38CE mov eax, [rbp+var_8] sub eax, 0FE30h movsxd rcx, eax lea rax, tab_uni_gbk8 movzx eax, word ptr [rax+rcx*2] mov [rbp+var_4], eax jmp short loc_D38D5 loc_D38CE: mov [rbp+var_4], 0 loc_D38D5: mov eax, [rbp+var_4] pop rbp retn
long long func_uni_gbk_onechar(int a1) { if ( a1 < 164 || a1 > 1105 ) { if ( a1 < 8208 || a1 > 8978 ) { if ( a1 < 9312 || a1 > 9794 ) { if ( a1 < 12288 || a1 > 12585 ) { if ( a1 < 12832 || a1 > 12963 ) { if ( a1 < 13198 || a1 > 13269 ) { if ( a1 < 19968 || a1 > 40869 ) { if ( a1 < 63788 || a1 > 64041 ) { if ( a1 < 65072 || a1 > 65509 ) return 0; else return tab_uni_gbk8[a1 - 65072]; } else { return tab_uni_gbk7[a1 - 63788]; } } else { return tab_uni_gbk6[a1 - 19968]; } } else { return tab_uni_gbk5[a1 - 13198]; } } else { return tab_uni_gbk4[a1 - 12832]; } } else { return tab_uni_gbk3[a1 - 12288]; } } else { return tab_uni_gbk2[a1 - 9312]; } } else { return tab_uni_gbk1[a1 - 8208]; } } else { return tab_uni_gbk0[a1 - 164]; } }
func_uni_gbk_onechar: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0xa4 JL 0x001d3757 CMP dword ptr [RBP + -0x8],0x451 JG 0x001d3757 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xa4 MOVSXD RCX,EAX LEA RAX,[0x2c6bd0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d38d5 LAB_001d3757: CMP dword ptr [RBP + -0x8],0x2010 JL 0x001d3787 CMP dword ptr [RBP + -0x8],0x2312 JG 0x001d3787 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2010 MOVSXD RCX,EAX LEA RAX,[0x2c7330] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d38d5 LAB_001d3787: CMP dword ptr [RBP + -0x8],0x2460 JL 0x001d37b7 CMP dword ptr [RBP + -0x8],0x2642 JG 0x001d37b7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x2460 MOVSXD RCX,EAX LEA RAX,[0x2c7940] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d38d5 LAB_001d37b7: CMP dword ptr [RBP + -0x8],0x3000 JL 0x001d37e7 CMP dword ptr [RBP + -0x8],0x3129 JG 0x001d37e7 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3000 MOVSXD RCX,EAX LEA RAX,[0x2c7d10] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d38d5 LAB_001d37e7: CMP dword ptr [RBP + -0x8],0x3220 JL 0x001d3817 CMP dword ptr [RBP + -0x8],0x32a3 JG 0x001d3817 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x3220 MOVSXD RCX,EAX LEA RAX,[0x2c7f70] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d38d5 LAB_001d3817: CMP dword ptr [RBP + -0x8],0x338e JL 0x001d3847 CMP dword ptr [RBP + -0x8],0x33d5 JG 0x001d3847 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x338e MOVSXD RCX,EAX LEA RAX,[0x2c8080] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d38d5 LAB_001d3847: CMP dword ptr [RBP + -0x8],0x4e00 JL 0x001d3874 CMP dword ptr [RBP + -0x8],0x9fa5 JG 0x001d3874 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x4e00 MOVSXD RCX,EAX LEA RAX,[0x2c8110] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d38d5 LAB_001d3874: CMP dword ptr [RBP + -0x8],0xf92c JL 0x001d38a1 CMP dword ptr [RBP + -0x8],0xfa29 JG 0x001d38a1 MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xf92c MOVSXD RCX,EAX LEA RAX,[0x2d2460] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d38d5 LAB_001d38a1: CMP dword ptr [RBP + -0x8],0xfe30 JL 0x001d38ce CMP dword ptr [RBP + -0x8],0xffe5 JG 0x001d38ce MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0xfe30 MOVSXD RCX,EAX LEA RAX,[0x2d2660] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x4],EAX JMP 0x001d38d5 LAB_001d38ce: MOV dword ptr [RBP + -0x4],0x0 LAB_001d38d5: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int2 func_uni_gbk_onechar(int param_1) { int2 uVar1; if ((param_1 < 0xa4) || (0x451 < param_1)) { if ((param_1 < 0x2010) || (0x2312 < param_1)) { if ((param_1 < 0x2460) || (0x2642 < param_1)) { if ((param_1 < 0x3000) || (0x3129 < param_1)) { if ((param_1 < 0x3220) || (0x32a3 < param_1)) { if ((param_1 < 0x338e) || (0x33d5 < param_1)) { if ((param_1 < 0x4e00) || (0x9fa5 < param_1)) { if ((param_1 < 0xf92c) || (0xfa29 < param_1)) { if ((param_1 < 0xfe30) || (0xffe5 < param_1)) { uVar1 = 0; } else { uVar1 = *(int2 *)(tab_uni_gbk8 + (long)(param_1 + -0xfe30) * 2); } } else { uVar1 = *(int2 *)(tab_uni_gbk7 + (long)(param_1 + -0xf92c) * 2); } } else { uVar1 = *(int2 *)(tab_uni_gbk6 + (long)(param_1 + -0x4e00) * 2); } } else { uVar1 = *(int2 *)(tab_uni_gbk5 + (long)(param_1 + -0x338e) * 2); } } else { uVar1 = *(int2 *)(tab_uni_gbk4 + (long)(param_1 + -0x3220) * 2); } } else { uVar1 = *(int2 *)(tab_uni_gbk3 + (long)(param_1 + -0x3000) * 2); } } else { uVar1 = *(int2 *)(tab_uni_gbk2 + (long)(param_1 + -0x2460) * 2); } } else { uVar1 = *(int2 *)(tab_uni_gbk1 + (long)(param_1 + -0x2010) * 2); } } else { uVar1 = *(int2 *)(tab_uni_gbk0 + (long)(param_1 + -0xa4) * 2); } return uVar1; }
40,142
LefDefParser::lefiNonDefault::hasLayerResistance(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiNonDefault.cpp
int lefiNonDefault::hasLayerResistance(int index) const { char msg[160]; if (index < 0 || index >= numLayers_) { sprintf(msg, "ERROR (LEFPARS-1402): The index number %d given for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d", index, numLayers_); lefiError(0, 1402, msg); return 0; } return hasResistance_[index]; }
O3
cpp
LefDefParser::lefiNonDefault::hasLayerResistance(int) const: pushq %r14 pushq %rbx subq $0xa8, %rsp movl %esi, %edx testl %esi, %esi setns %al movl 0x10(%rdi), %ecx cmpl %esi, %ecx setg %sil testb %sil, %al je 0x2c34d movq 0x68(%rdi), %rax movl %edx, %ecx movsbl (%rax,%rcx), %ebx jmp 0x2c372 leaq 0x3230c(%rip), %rsi # 0x5e660 xorl %ebx, %ebx movq %rsp, %r14 movq %r14, %rdi xorl %eax, %eax callq 0x2050 xorl %edi, %edi movl $0x57a, %esi # imm = 0x57A movq %r14, %rdx callq 0x33d78 movl %ebx, %eax addq $0xa8, %rsp popq %rbx popq %r14 retq nop
_ZNK12LefDefParser14lefiNonDefault18hasLayerResistanceEi: push r14 push rbx sub rsp, 0A8h mov edx, esi test esi, esi setns al mov ecx, [rdi+10h] cmp ecx, esi setnle sil test al, sil jz short loc_2C34D mov rax, [rdi+68h] mov ecx, edx movsx ebx, byte ptr [rax+rcx] jmp short loc_2C372 loc_2C34D: lea rsi, aErrorLefpars14_3; "ERROR (LEFPARS-1402): The index number "... xor ebx, ebx mov r14, rsp mov rdi, r14 xor eax, eax call _sprintf xor edi, edi; this mov esi, 57Ah; int mov rdx, r14; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) loc_2C372: mov eax, ebx add rsp, 0A8h pop rbx pop r14 retn
long long LefDefParser::lefiNonDefault::hasLayerResistance(LefDefParser::lefiNonDefault *this, signed int a2) { int v2; // ecx unsigned int v3; // ebx const char *v4; // rcx _BYTE v6[184]; // [rsp+0h] [rbp-B8h] BYREF v2 = *((_DWORD *)this + 4); if ( v2 > a2 && a2 >= 0 ) { return (unsigned int)*(char *)(*((_QWORD *)this + 13) + (unsigned int)a2); } else { v3 = 0; sprintf( v6, "ERROR (LEFPARS-1402): The index number %d given for the NONDEFAULT LAYER is invalid.\n" "Valid index is from 0 to %d", a2, v2); LefDefParser::lefiError(0LL, 1402, (int)v6, v4); } return v3; }
hasLayerResistance: PUSH R14 PUSH RBX SUB RSP,0xa8 MOV EDX,ESI TEST ESI,ESI SETNS AL MOV ECX,dword ptr [RDI + 0x10] CMP ECX,ESI SETG SIL TEST AL,SIL JZ 0x0012c34d MOV RAX,qword ptr [RDI + 0x68] MOV ECX,EDX MOVSX EBX,byte ptr [RAX + RCX*0x1] JMP 0x0012c372 LAB_0012c34d: LEA RSI,[0x15e660] XOR EBX,EBX MOV R14,RSP MOV RDI,R14 XOR EAX,EAX CALL 0x00102050 XOR EDI,EDI MOV ESI,0x57a MOV RDX,R14 CALL 0x00133d78 LAB_0012c372: MOV EAX,EBX ADD RSP,0xa8 POP RBX POP R14 RET
/* LefDefParser::lefiNonDefault::hasLayerResistance(int) const */ int __thiscall LefDefParser::lefiNonDefault::hasLayerResistance(lefiNonDefault *this,int param_1) { int iVar1; char acStack_b8 [168]; if (param_1 < 0 || *(int *)(this + 0x10) <= param_1) { iVar1 = 0; sprintf(acStack_b8, "ERROR (LEFPARS-1402): The index number %d given for the NONDEFAULT LAYER is invalid.\nValid index is from 0 to %d" ); lefiError(0,0x57a,acStack_b8); } else { iVar1 = (int)*(char *)(*(long *)(this + 0x68) + (ulong)(uint)param_1); } return iVar1; }
40,143
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const
monkey531[P]llama/common/json.hpp
pointer operator->() const { JSON_ASSERT(m_object != nullptr); switch (m_object->m_data.m_type) { case value_t::object: { JSON_ASSERT(m_it.object_iterator != m_object->m_data.m_value.object->end()); return &(m_it.object_iterator->second); } case value_t::array: { JSON_ASSERT(m_it.array_iterator != m_object->m_data.m_value.array->end()); return &*m_it.array_iterator; } case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: { if (JSON_HEDLEY_LIKELY(m_it.primitive_iterator.is_begin())) { return m_object; } JSON_THROW(invalid_iterator::create(214, "cannot get value", m_object)); } } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::operator->() const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq (%rdi), %rax testq %rax, %rax je 0x41bb0 movq %rdi, %r14 movzbl (%rax), %ecx cmpl $0x2, %ecx je 0x41b22 cmpl $0x1, %ecx jne 0x41b4f movq 0x8(%rax), %rcx movq 0x8(%r14), %rax cmpq 0x8(%rcx), %rax je 0x41bcc addq $0x20, %rax jmp 0x41b56 movq 0x8(%rax), %rcx movq 0x10(%r14), %rax cmpq 0x8(%rcx), %rax jne 0x41b56 leaq 0x6d2bf(%rip), %rdi # 0xaedf6 leaq 0x6d302(%rip), %rdx # 0xaee40 leaq 0x6e366(%rip), %rcx # 0xafeab movl $0x3397, %esi # imm = 0x3397 jmp 0x41be6 cmpq $0x0, 0x18(%r14) jne 0x41b5f addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x23460 movq %rax, %rbx leaq 0x6e377(%rip), %rsi # 0xafee8 leaq 0x10(%rsp), %rdi leaq 0xf(%rsp), %rdx callq 0x26f76 movq (%r14), %rcx movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0xd6, %esi callq 0x42920 xorl %ebp, %ebp leaq 0xb8367(%rip), %rsi # 0xf9f08 leaq -0x2328(%rip), %rdx # 0x3f880 movq %rbx, %rdi callq 0x23f20 leaq 0x6d23f(%rip), %rdi # 0xaedf6 leaq 0x6d282(%rip), %rdx # 0xaee40 leaq 0x72428(%rip), %rcx # 0xb3fed movl $0x338b, %esi # imm = 0x338B jmp 0x41be6 leaq 0x6d223(%rip), %rdi # 0xaedf6 leaq 0x6d266(%rip), %rdx # 0xaee40 leaq 0x6e28b(%rip), %rcx # 0xafe6c movl $0x3391, %esi # imm = 0x3391 xorl %eax, %eax callq 0x23ed0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x241d8 testb %bpl, %bpl jne 0x41c04 jmp 0x41c0c movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 movq %r14, %rdi callq 0x23fa0
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rax, [rdi] test rax, rax jz loc_41BB0 mov r14, rdi movzx ecx, byte ptr [rax] cmp ecx, 2 jz short loc_41B22 cmp ecx, 1 jnz short loc_41B4F mov rcx, [rax+8] mov rax, [r14+8] cmp rax, [rcx+8] jz loc_41BCC add rax, 20h ; ' ' jmp short loc_41B56 loc_41B22: mov rcx, [rax+8] mov rax, [r14+10h] cmp rax, [rcx+8] jnz short loc_41B56 lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMItArrayIterat; "m_it.array_iterator != m_object->m_data"... mov esi, 3397h jmp loc_41BE6 loc_41B4F: cmp qword ptr [r14+18h], 0 jnz short loc_41B5F loc_41B56: add rsp, 30h pop rbx pop r14 pop rbp retn loc_41B5F: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aCannotGetValue; "cannot get value" lea rdi, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 0D6h; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_41BB0: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 338Bh jmp short loc_41BE6 loc_41BCC: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMItObjectItera; "m_it.object_iterator != m_object->m_dat"... mov esi, 3391h loc_41BE6: xor eax, eax call _ggml_abort mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_41C04 jmp short loc_41C0C mov r14, rax loc_41C04: mov rdi, rbx; void * call ___cxa_free_exception loc_41C0C: mov rdi, r14 call __Unwind_Resume
operator->: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00141bb0 MOV R14,RDI MOVZX ECX,byte ptr [RAX] CMP ECX,0x2 JZ 0x00141b22 CMP ECX,0x1 JNZ 0x00141b4f MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x00141bcc ADD RAX,0x20 JMP 0x00141b56 LAB_00141b22: MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RCX + 0x8] JNZ 0x00141b56 LEA RDI,[0x1aedf6] LEA RDX,[0x1aee40] LEA RCX,[0x1afeab] MOV ESI,0x3397 JMP 0x00141be6 LAB_00141b4f: CMP qword ptr [R14 + 0x18],0x0 JNZ 0x00141b5f LAB_00141b56: ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00141b5f: PUSH 0x20 POP RDI CALL 0x00123460 MOV RBX,RAX LAB_00141b6a: LEA RSI,[0x1afee8] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0xf] CALL 0x00126f76 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_00141b86: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0xd6 CALL 0x00142920 XOR EBP,EBP LEA RSI,[0x1f9f08] LEA RDX,[0x13f880] MOV RDI,RBX CALL 0x00123f20 LAB_00141bb0: LEA RDI,[0x1aedf6] LEA RDX,[0x1aee40] LEA RCX,[0x1b3fed] MOV ESI,0x338b JMP 0x00141be6 LAB_00141bcc: LEA RDI,[0x1aedf6] LEA RDX,[0x1aee40] LEA RCX,[0x1afe6c] MOV ESI,0x3391 LAB_00141be6: XOR EAX,EAX CALL 0x00123ed0
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::TEMPNAMEPLACEHOLDERVALUE() const */ char * __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::operator->(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { long *plVar1; char *pcVar2; int8 uVar3; allocator local_39; string local_38 [32]; pcVar2 = *(char **)this; if (pcVar2 == (char *)0x0) { pcVar2 = "m_object != nullptr"; uVar3 = 0x338b; LAB_00141be6: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); } if (*pcVar2 == '\x02') { plVar1 = (long *)(pcVar2 + 8); pcVar2 = *(char **)(this + 0x10); if (pcVar2 == *(char **)(*plVar1 + 8)) { pcVar2 = "m_it.array_iterator != m_object->m_data.m_value.array->end()"; uVar3 = 0x3397; goto LAB_00141be6; } } else if (*pcVar2 == '\x01') { if (*(long *)(this + 8) == *(long *)(*(long *)(pcVar2 + 8) + 8)) { pcVar2 = "m_it.object_iterator != m_object->m_data.m_value.object->end()"; uVar3 = 0x3391; goto LAB_00141be6; } pcVar2 = (char *)(*(long *)(this + 8) + 0x20); } else if (*(long *)(this + 0x18) != 0) { uVar3 = __cxa_allocate_exception(0x20); /* try { // try from 00141b6a to 00141b7f has its CatchHandler @ 00141c01 */ std::__cxx11::string::string<std::allocator<char>>(local_38,"cannot get value",&local_39); /* try { // try from 00141b86 to 00141baf has its CatchHandler @ 00141bed */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0xd6,local_38,*(int8 *)this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&invalid_iterator::typeinfo,exception::~exception); } return pcVar2; }
40,144
init_memory_class(unsigned int)
eloqsql/storage/perfschema/pfs_instr_class.cc
int init_memory_class(uint memory_class_sizing) { int result= 0; memory_class_dirty_count= memory_class_allocated_count= 0; memory_class_max= memory_class_sizing; memory_class_lost= 0; if (memory_class_max > 0) { memory_class_array= PFS_MALLOC_ARRAY(& builtin_memory_memory_class, memory_class_max, sizeof(PFS_memory_class), PFS_memory_class, MYF(MY_ZEROFILL)); if (unlikely(memory_class_array == NULL)) return 1; } else memory_class_array= NULL; return result; }
O3
cpp
init_memory_class(unsigned int): andl $0x0, 0x3a7b19(%rip) # 0x3cfbd0 andl $0x0, 0x3a7b16(%rip) # 0x3cfbd4 movl %edi, %esi movq %rsi, 0x3a7279(%rip) # 0x3cf340 andq $0x0, 0x3a7279(%rip) # 0x3cf348 testl %edi, %edi je 0x280fc pushq %rbp movq %rsp, %rbp leaq 0x3a4ea2(%rip), %rdi # 0x3ccf80 pushq $0x20 popq %rcx movl $0xc0, %edx callq 0x2ce1c movq %rax, 0x3a7ae6(%rip) # 0x3cfbd8 testq %rax, %rax popq %rbp jne 0x28104 pushq $0x1 popq %rax retq andq $0x0, 0x3a7ad4(%rip) # 0x3cfbd8 xorl %eax, %eax retq
_Z17init_memory_classj: and cs:_ZL28memory_class_allocated_count, 0; memory_class_allocated_count and cs:_ZL24memory_class_dirty_count, 0; memory_class_dirty_count mov esi, edi mov cs:memory_class_max, rsi and cs:memory_class_lost, 0 test edi, edi jz short loc_280FC push rbp mov rbp, rsp lea rdi, builtin_memory_memory_class push 20h ; ' ' pop rcx mov edx, 0C0h call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong) mov cs:_ZL18memory_class_array, rax; memory_class_array test rax, rax pop rbp jnz short loc_28104 push 1 pop rax retn loc_280FC: and cs:_ZL18memory_class_array, 0; memory_class_array loc_28104: xor eax, eax retn
long long init_memory_class(unsigned int a1) { memory_class_allocated_count = 0; memory_class_dirty_count = 0; memory_class_max = a1; memory_class_lost = 0LL; if ( a1 ) { memory_class_array = pfs_malloc_array(&builtin_memory_memory_class, a1, 192LL, 32LL); if ( !memory_class_array ) return 1LL; } else { memory_class_array = 0LL; } return 0LL; }
init_memory_class: AND dword ptr [0x004cfbd0],0x0 AND dword ptr [0x004cfbd4],0x0 MOV ESI,EDI MOV qword ptr [0x004cf340],RSI AND qword ptr [0x004cf348],0x0 TEST EDI,EDI JZ 0x001280fc PUSH RBP MOV RBP,RSP LEA RDI,[0x4ccf80] PUSH 0x20 POP RCX MOV EDX,0xc0 CALL 0x0012ce1c MOV qword ptr [0x004cfbd8],RAX TEST RAX,RAX POP RBP JNZ 0x00128104 PUSH 0x1 POP RAX RET LAB_001280fc: AND qword ptr [0x004cfbd8],0x0 LAB_00128104: XOR EAX,EAX RET
/* init_memory_class(unsigned int) */ int8 init_memory_class(uint param_1) { memory_class_allocated_count = 0; memory_class_dirty_count = 0; memory_class_max = (ulong)param_1; memory_class_lost = 0; if (param_1 == 0) { memory_class_array = 0; } else { memory_class_array = pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_memory_class,memory_class_max, 0xc0,0x20); if (memory_class_array == 0) { return 1; } } return 0; }
40,145
google::protobuf::stringpiece_internal::StringPiece::CheckSize(unsigned long)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/stringpiece.h
static size_type CheckSize(size_type size) { #if !defined(NDEBUG) || defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 if (PROTOBUF_PREDICT_FALSE(size > kMaxSize)) { // Some people grep for this message in logs // so take care if you ever change it. LogFatalSizeTooBig(size, "string length exceeds max size"); } #endif return size; }
O0
c
google::protobuf::stringpiece_internal::StringPiece::CheckSize(unsigned long): movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopl (%rax,%rax)
_ZN6google8protobuf20stringpiece_internal11StringPiece9CheckSizeEm: mov [rsp+var_8], rdi mov rax, [rsp+var_8] retn
google::protobuf::stringpiece_internal::StringPiece * google::protobuf::stringpiece_internal::StringPiece::CheckSize( google::protobuf::stringpiece_internal::StringPiece *this) { return this; }
CheckSize: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] RET
/* google::protobuf::stringpiece_internal::StringPiece::CheckSize(unsigned long) */ ulong google::protobuf::stringpiece_internal::StringPiece::CheckSize(ulong param_1) { return param_1; }
40,146
TinyEncoder::calculate_mem_size()
7CodeWizard[P]stablediffusion/tae.hpp
size_t calculate_mem_size() { size_t mem_size = channels * in_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w mem_size += channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b mem_size += initial_block.calculate_mem_size(); mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_1_w mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_2_w mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_3_w for (int i = 0; i < num_blocks; i++) { mem_size += input_blocks[i].calculate_mem_size(); mem_size += middle_blocks[i].calculate_mem_size(); mem_size += output_blocks[i].calculate_mem_size(); } mem_size += z_channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w mem_size += z_channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b return mem_size; }
O0
cpp
TinyEncoder::calculate_mem_size(): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq 0x50(%rsp), %rcx movq %rcx, 0x28(%rsp) movl 0x8(%rcx), %eax imull (%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x10(%rsp) movl $0x1, %edi callq 0x11afb0 movq 0x10(%rsp), %rcx movq %rax, %rdx movq 0x28(%rsp), %rax imulq %rdx, %rcx movq %rcx, 0x48(%rsp) movslq 0x8(%rax), %rax movq %rax, 0x18(%rsp) xorl %edi, %edi callq 0x11afb0 movq 0x28(%rsp), %rdi movq %rax, %rcx movq 0x18(%rsp), %rax imulq %rcx, %rax addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) addq $0x20, %rdi callq 0x4cd00 movq 0x28(%rsp), %rcx addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) movl 0x8(%rcx), %eax imull 0x8(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x20(%rsp) movl $0x1, %edi callq 0x11afb0 movq 0x28(%rsp), %rcx movq %rax, %rdx movq 0x20(%rsp), %rax imulq %rdx, %rax addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) movl 0x8(%rcx), %eax imull 0x8(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x30(%rsp) movl $0x1, %edi callq 0x11afb0 movq 0x28(%rsp), %rcx movq %rax, %rdx movq 0x30(%rsp), %rax imulq %rdx, %rax addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) movl 0x8(%rcx), %eax imull 0x8(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, 0x38(%rsp) movl $0x1, %edi callq 0x11afb0 movq %rax, %rcx movq 0x38(%rsp), %rax imulq %rcx, %rax addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) movl $0x0, 0x44(%rsp) movq 0x28(%rsp), %rcx movl 0x44(%rsp), %eax cmpl 0xc(%rcx), %eax jge 0x4cc8b movq 0x28(%rsp), %rdi addq $0x68, %rdi movslq 0x44(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi callq 0x4cd00 movq 0x28(%rsp), %rdi addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) addq $0x130, %rdi # imm = 0x130 movslq 0x44(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi callq 0x4cd00 movq 0x28(%rsp), %rdi addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) addq $0x1f8, %rdi # imm = 0x1F8 movslq 0x44(%rsp), %rax shlq $0x6, %rax addq %rax, %rdi callq 0x4cd00 addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) movl 0x44(%rsp), %eax addl $0x1, %eax movl %eax, 0x44(%rsp) jmp 0x4cbf7 movq 0x28(%rsp), %rcx movl 0x4(%rcx), %eax imull 0x8(%rcx), %eax imull $0x3, %eax, %eax imull $0x3, %eax, %eax cltq movq %rax, (%rsp) movl $0x1, %edi callq 0x11afb0 movq (%rsp), %rcx movq %rax, %rdx movq 0x28(%rsp), %rax imulq %rdx, %rcx addq 0x48(%rsp), %rcx movq %rcx, 0x48(%rsp) movslq 0x4(%rax), %rax movq %rax, 0x8(%rsp) xorl %edi, %edi callq 0x11afb0 movq %rax, %rcx movq 0x8(%rsp), %rax imulq %rcx, %rax addq 0x48(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax addq $0x58, %rsp retq nopw (%rax,%rax)
_ZN11TinyEncoder18calculate_mem_sizeEv: sub rsp, 58h mov [rsp+58h+var_8], rdi mov rcx, [rsp+58h+var_8] mov [rsp+58h+var_30], rcx mov eax, [rcx+8] imul eax, [rcx] imul eax, 3 imul eax, 3 cdqe mov [rsp+58h+var_48], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+58h+var_48] mov rdx, rax mov rax, [rsp+58h+var_30] imul rcx, rdx mov [rsp+58h+var_10], rcx movsxd rax, dword ptr [rax+8] mov [rsp+58h+var_40], rax xor edi, edi call ggml_type_size mov rdi, [rsp+58h+var_30] mov rcx, rax mov rax, [rsp+58h+var_40] imul rax, rcx add rax, [rsp+58h+var_10] mov [rsp+58h+var_10], rax add rdi, 20h ; ' '; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov rcx, [rsp+58h+var_30] add rax, [rsp+58h+var_10] mov [rsp+58h+var_10], rax mov eax, [rcx+8] imul eax, [rcx+8] imul eax, 3 imul eax, 3 cdqe mov [rsp+58h+var_38], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+58h+var_30] mov rdx, rax mov rax, [rsp+58h+var_38] imul rax, rdx add rax, [rsp+58h+var_10] mov [rsp+58h+var_10], rax mov eax, [rcx+8] imul eax, [rcx+8] imul eax, 3 imul eax, 3 cdqe mov [rsp+58h+var_28], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+58h+var_30] mov rdx, rax mov rax, [rsp+58h+var_28] imul rax, rdx add rax, [rsp+58h+var_10] mov [rsp+58h+var_10], rax mov eax, [rcx+8] imul eax, [rcx+8] imul eax, 3 imul eax, 3 cdqe mov [rsp+58h+var_20], rax mov edi, 1 call ggml_type_size mov rcx, rax mov rax, [rsp+58h+var_20] imul rax, rcx add rax, [rsp+58h+var_10] mov [rsp+58h+var_10], rax mov [rsp+58h+var_14], 0 loc_4CBF7: mov rcx, [rsp+58h+var_30] mov eax, [rsp+58h+var_14] cmp eax, [rcx+0Ch] jge loc_4CC8B mov rdi, [rsp+58h+var_30] add rdi, 68h ; 'h' movsxd rax, [rsp+58h+var_14] shl rax, 6 add rdi, rax; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov rdi, [rsp+58h+var_30] add rax, [rsp+58h+var_10] mov [rsp+58h+var_10], rax add rdi, 130h movsxd rax, [rsp+58h+var_14] shl rax, 6 add rdi, rax; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov rdi, [rsp+58h+var_30] add rax, [rsp+58h+var_10] mov [rsp+58h+var_10], rax add rdi, 1F8h movsxd rax, [rsp+58h+var_14] shl rax, 6 add rdi, rax; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) add rax, [rsp+58h+var_10] mov [rsp+58h+var_10], rax mov eax, [rsp+58h+var_14] add eax, 1 mov [rsp+58h+var_14], eax jmp loc_4CBF7 loc_4CC8B: mov rcx, [rsp+58h+var_30] mov eax, [rcx+4] imul eax, [rcx+8] imul eax, 3 imul eax, 3 cdqe mov [rsp+58h+var_58], rax mov edi, 1 call ggml_type_size mov rcx, [rsp+58h+var_58] mov rdx, rax mov rax, [rsp+58h+var_30] imul rcx, rdx add rcx, [rsp+58h+var_10] mov [rsp+58h+var_10], rcx movsxd rax, dword ptr [rax+4] mov [rsp+58h+var_50], rax xor edi, edi call ggml_type_size mov rcx, rax mov rax, [rsp+58h+var_50] imul rax, rcx add rax, [rsp+58h+var_10] mov [rsp+58h+var_10], rax mov rax, [rsp+58h+var_10] add rsp, 58h retn
long long TinyEncoder::calculate_mem_size(TinyEncoder *this) { long long v2; // [rsp+0h] [rbp-58h] long long v3; // [rsp+8h] [rbp-50h] long long v4; // [rsp+10h] [rbp-48h] long long v5; // [rsp+18h] [rbp-40h] long long v6; // [rsp+20h] [rbp-38h] long long v8; // [rsp+30h] [rbp-28h] long long v9; // [rsp+38h] [rbp-20h] int i; // [rsp+44h] [rbp-14h] long long v11; // [rsp+48h] [rbp-10h] long long v12; // [rsp+48h] [rbp-10h] long long v13; // [rsp+48h] [rbp-10h] long long v14; // [rsp+48h] [rbp-10h] long long v15; // [rsp+48h] [rbp-10h] long long v16; // [rsp+48h] [rbp-10h] long long v17; // [rsp+48h] [rbp-10h] long long v18; // [rsp+48h] [rbp-10h] long long v19; // [rsp+48h] [rbp-10h] v4 = 9 * *(_DWORD *)this * *((_DWORD *)this + 2); v11 = ggml_type_size(1LL) * v4; v5 = *((int *)this + 2); v12 = v11 + ggml_type_size(0LL) * v5; v13 = v12 + TAEBlock::calculate_mem_size((TinyEncoder *)((char *)this + 32)); v6 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v14 = v13 + ggml_type_size(1LL) * v6; v8 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v15 = v14 + ggml_type_size(1LL) * v8; v9 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v16 = v15 + ggml_type_size(1LL) * v9; for ( i = 0; i < *((_DWORD *)this + 3); ++i ) { v17 = v16 + TAEBlock::calculate_mem_size((TinyEncoder *)((char *)this + 64 * (long long)i + 104)); v18 = v17 + TAEBlock::calculate_mem_size((TinyEncoder *)((char *)this + 64 * (long long)i + 304)); v16 = v18 + TAEBlock::calculate_mem_size((TinyEncoder *)((char *)this + 64 * (long long)i + 504)); } v2 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 1); v19 = v16 + ggml_type_size(1LL) * v2; v3 = *((int *)this + 1); return v19 + ggml_type_size(0LL) * v3; }
calculate_mem_size: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x28],RCX MOV EAX,dword ptr [RCX + 0x8] IMUL EAX,dword ptr [RCX] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x10],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x10] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x28] IMUL RCX,RDX MOV qword ptr [RSP + 0x48],RCX MOVSXD RAX,dword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x18],RAX XOR EDI,EDI CALL 0x0021afb0 MOV RDI,qword ptr [RSP + 0x28] MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] IMUL RAX,RCX ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX ADD RDI,0x20 CALL 0x0014cd00 MOV RCX,qword ptr [RSP + 0x28] ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX MOV EAX,dword ptr [RCX + 0x8] IMUL EAX,dword ptr [RCX + 0x8] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x20],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x28] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x20] IMUL RAX,RDX ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX MOV EAX,dword ptr [RCX + 0x8] IMUL EAX,dword ptr [RCX + 0x8] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x30],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP + 0x28] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x30] IMUL RAX,RDX ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX MOV EAX,dword ptr [RCX + 0x8] IMUL EAX,dword ptr [RCX + 0x8] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP + 0x38],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x38] IMUL RAX,RCX ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX MOV dword ptr [RSP + 0x44],0x0 LAB_0014cbf7: MOV RCX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RSP + 0x44] CMP EAX,dword ptr [RCX + 0xc] JGE 0x0014cc8b MOV RDI,qword ptr [RSP + 0x28] ADD RDI,0x68 MOVSXD RAX,dword ptr [RSP + 0x44] SHL RAX,0x6 ADD RDI,RAX CALL 0x0014cd00 MOV RDI,qword ptr [RSP + 0x28] ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX ADD RDI,0x130 MOVSXD RAX,dword ptr [RSP + 0x44] SHL RAX,0x6 ADD RDI,RAX CALL 0x0014cd00 MOV RDI,qword ptr [RSP + 0x28] ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX ADD RDI,0x1f8 MOVSXD RAX,dword ptr [RSP + 0x44] SHL RAX,0x6 ADD RDI,RAX CALL 0x0014cd00 ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX MOV EAX,dword ptr [RSP + 0x44] ADD EAX,0x1 MOV dword ptr [RSP + 0x44],EAX JMP 0x0014cbf7 LAB_0014cc8b: MOV RCX,qword ptr [RSP + 0x28] MOV EAX,dword ptr [RCX + 0x4] IMUL EAX,dword ptr [RCX + 0x8] IMUL EAX,EAX,0x3 IMUL EAX,EAX,0x3 CDQE MOV qword ptr [RSP],RAX MOV EDI,0x1 CALL 0x0021afb0 MOV RCX,qword ptr [RSP] MOV RDX,RAX MOV RAX,qword ptr [RSP + 0x28] IMUL RCX,RDX ADD RCX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RCX MOVSXD RAX,dword ptr [RAX + 0x4] MOV qword ptr [RSP + 0x8],RAX XOR EDI,EDI CALL 0x0021afb0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] IMUL RAX,RCX ADD RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] ADD RSP,0x58 RET
/* TinyEncoder::calculate_mem_size() */ long __thiscall TinyEncoder::calculate_mem_size(TinyEncoder *this) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; int iVar7; int iVar8; int iVar9; long lVar10; long lVar11; long lVar12; long lVar13; long lVar14; long lVar15; int local_14; long local_10; iVar1 = *(int *)(this + 8); iVar2 = *(int *)this; lVar10 = ggml_type_size(1); iVar3 = *(int *)(this + 8); lVar11 = ggml_type_size(0); lVar12 = TAEBlock::calculate_mem_size((TAEBlock *)(this + 0x20)); iVar4 = *(int *)(this + 8); iVar5 = *(int *)(this + 8); lVar13 = ggml_type_size(1); iVar6 = *(int *)(this + 8); iVar7 = *(int *)(this + 8); lVar14 = ggml_type_size(1); iVar8 = *(int *)(this + 8); iVar9 = *(int *)(this + 8); lVar15 = ggml_type_size(1); local_10 = (iVar8 * iVar9 * 9) * lVar15 + (iVar6 * iVar7 * 9) * lVar14 + (iVar4 * iVar5 * 9) * lVar13 + lVar12 + iVar3 * lVar11 + (iVar1 * iVar2 * 9) * lVar10; for (local_14 = 0; local_14 < *(int *)(this + 0xc); local_14 = local_14 + 1) { lVar10 = TAEBlock::calculate_mem_size((TAEBlock *)(this + (long)local_14 * 0x40 + 0x68)); lVar11 = TAEBlock::calculate_mem_size((TAEBlock *)(this + (long)local_14 * 0x40 + 0x130)); lVar12 = TAEBlock::calculate_mem_size((TAEBlock *)(this + (long)local_14 * 0x40 + 0x1f8)); local_10 = lVar12 + lVar11 + lVar10 + local_10; } iVar1 = *(int *)(this + 4); iVar2 = *(int *)(this + 8); lVar10 = ggml_type_size(1); iVar3 = *(int *)(this + 4); lVar11 = ggml_type_size(0); return iVar3 * lVar11 + (iVar1 * iVar2 * 9) * lVar10 + local_10; }
40,147
TinyEncoder::calculate_mem_size()
7CodeWizard[P]stablediffusion/tae.hpp
size_t calculate_mem_size() { size_t mem_size = channels * in_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w mem_size += channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b mem_size += initial_block.calculate_mem_size(); mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_1_w mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_2_w mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_3_w for (int i = 0; i < num_blocks; i++) { mem_size += input_blocks[i].calculate_mem_size(); mem_size += middle_blocks[i].calculate_mem_size(); mem_size += output_blocks[i].calculate_mem_size(); } mem_size += z_channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w mem_size += z_channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b return mem_size; }
O1
cpp
TinyEncoder::calculate_mem_size(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x8(%rdi), %eax imull (%rdi), %eax leal (%rax,%rax,8), %eax movslq %eax, %r14 movl $0x1, %edi callq 0x8e159 movq %rax, %r15 imulq %r14, %r15 movslq 0x8(%rbx), %r14 xorl %edi, %edi callq 0x8e159 movq %rax, %r12 imulq %r14, %r12 leaq 0x20(%rbx), %rdi callq 0x3b634 movq %rax, %r14 addq %r12, %r14 addq %r15, %r14 movl 0x8(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r12 movl $0x1, %edi callq 0x8e159 movq %rax, %r15 imulq %r12, %r15 movl 0x8(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r13 movl $0x1, %edi callq 0x8e159 movq %rax, %r12 imulq %r13, %r12 addq %r15, %r12 addq %r14, %r12 movl 0x8(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r15 movl $0x1, %edi callq 0x8e159 movq %rax, %r14 imulq %r15, %r14 addq %r12, %r14 cmpl $0x0, 0xc(%rbx) jle 0x3b5f2 leaq 0x1f8(%rbx), %r15 xorl %ebp, %ebp leaq -0x190(%r15), %rdi callq 0x3b634 movq %rax, %r12 addq %r14, %r12 leaq -0xc8(%r15), %rdi callq 0x3b634 movq %rax, %r13 movq %r15, %rdi callq 0x3b634 movq %rax, %r14 addq %r13, %r14 addq %r12, %r14 incq %rbp movslq 0xc(%rbx), %rax addq $0x40, %r15 cmpq %rax, %rbp jl 0x3b5b0 movl 0x4(%rbx), %eax imull 0x8(%rbx), %eax leal (%rax,%rax,8), %eax movslq %eax, %r12 movl $0x1, %edi callq 0x8e159 movq %rax, %r15 imulq %r12, %r15 movslq 0x4(%rbx), %rbx xorl %edi, %edi callq 0x8e159 imulq %rbx, %rax addq %r15, %rax addq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN11TinyEncoder18calculate_mem_sizeEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov eax, [rdi+8] imul eax, [rdi] lea eax, [rax+rax*8] movsxd r14, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r14 movsxd r14, dword ptr [rbx+8] xor edi, edi call ggml_type_size mov r12, rax imul r12, r14 lea rdi, [rbx+20h]; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r14, rax add r14, r12 add r14, r15 mov eax, [rbx+8] imul eax, eax lea eax, [rax+rax*8] movsxd r12, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r12 mov eax, [rbx+8] imul eax, eax lea eax, [rax+rax*8] movsxd r13, eax mov edi, 1 call ggml_type_size mov r12, rax imul r12, r13 add r12, r15 add r12, r14 mov eax, [rbx+8] imul eax, eax lea eax, [rax+rax*8] movsxd r15, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, r15 add r14, r12 cmp dword ptr [rbx+0Ch], 0 jle short loc_3B5F2 lea r15, [rbx+1F8h] xor ebp, ebp loc_3B5B0: lea rdi, [r15-190h]; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r12, rax add r12, r14 lea rdi, [r15-0C8h]; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r13, rax mov rdi, r15; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r14, rax add r14, r13 add r14, r12 inc rbp movsxd rax, dword ptr [rbx+0Ch] add r15, 40h ; '@' cmp rbp, rax jl short loc_3B5B0 loc_3B5F2: mov eax, [rbx+4] imul eax, [rbx+8] lea eax, [rax+rax*8] movsxd r12, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r12 movsxd rbx, dword ptr [rbx+4] xor edi, edi call ggml_type_size imul rax, rbx add rax, r15 add rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long TinyEncoder::calculate_mem_size(TinyEncoder *this) { long long v2; // r14 long long v3; // r15 long long v4; // r14 long long v5; // r12 long long v6; // r14 long long v7; // r12 long long v8; // r15 long long v9; // r13 long long v10; // r12 long long v11; // r15 long long v12; // r14 TAEBlock *v13; // r15 long long v14; // rbp long long v15; // r12 long long v16; // r13 long long v17; // r12 long long v18; // r15 long long v19; // rbx v2 = 9 * *(_DWORD *)this * *((_DWORD *)this + 2); v3 = v2 * ggml_type_size(1LL); v4 = *((int *)this + 2); v5 = v4 * ggml_type_size(0LL); v6 = v3 + v5 + TAEBlock::calculate_mem_size((TinyEncoder *)((char *)this + 32)); v7 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v8 = v7 * ggml_type_size(1LL); v9 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v10 = v6 + v8 + v9 * ggml_type_size(1LL); v11 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v12 = v10 + v11 * ggml_type_size(1LL); if ( *((int *)this + 3) > 0 ) { v13 = (TinyEncoder *)((char *)this + 504); v14 = 0LL; do { v15 = v12 + TAEBlock::calculate_mem_size((TAEBlock *)((char *)v13 - 400)); v16 = TAEBlock::calculate_mem_size((TAEBlock *)((char *)v13 - 200)); v12 = v15 + v16 + TAEBlock::calculate_mem_size(v13); ++v14; v13 = (TAEBlock *)((char *)v13 + 64); } while ( v14 < *((int *)this + 3) ); } v17 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 1); v18 = v17 * ggml_type_size(1LL); v19 = *((int *)this + 1); return v12 + v18 + v19 * ggml_type_size(0LL); }
40,148
TinyEncoder::calculate_mem_size()
7CodeWizard[P]stablediffusion/tae.hpp
size_t calculate_mem_size() { size_t mem_size = channels * in_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w mem_size += channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b mem_size += initial_block.calculate_mem_size(); mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_1_w mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_2_w mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_3_w for (int i = 0; i < num_blocks; i++) { mem_size += input_blocks[i].calculate_mem_size(); mem_size += middle_blocks[i].calculate_mem_size(); mem_size += output_blocks[i].calculate_mem_size(); } mem_size += z_channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w mem_size += z_channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b return mem_size; }
O2
cpp
TinyEncoder::calculate_mem_size(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x8(%rdi), %eax imull (%rdi), %eax leal (%rax,%rax,8), %eax movslq %eax, %r14 pushq $0x1 popq %r13 movl %r13d, %edi callq 0x67b83 movq %rax, %r15 imulq %r14, %r15 movslq 0x8(%rbx), %r14 xorl %ebp, %ebp xorl %edi, %edi callq 0x67b83 movq %rax, %r12 imulq %r14, %r12 leaq 0x20(%rbx), %rdi callq 0x24c84 movq %rax, %r14 addq %r12, %r14 addq %r15, %r14 movl 0x8(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r12 movl %r13d, %edi callq 0x67b83 movq %rax, %r15 imulq %r12, %r15 movl 0x8(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r13 pushq $0x1 popq %rdi callq 0x67b83 movq %rax, %r12 imulq %r13, %r12 addq %r15, %r12 addq %r14, %r12 movl 0x8(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r15 pushq $0x1 popq %rdi callq 0x67b83 movq %rax, %r14 imulq %r15, %r14 addq %r12, %r14 leaq 0x1f8(%rbx), %r15 movslq 0xc(%rbx), %rax cmpq %rax, %rbp jge 0x24c44 leaq -0x190(%r15), %rdi callq 0x24c84 movq %rax, %r12 addq %r14, %r12 leaq -0xc8(%r15), %rdi callq 0x24c84 movq %rax, %r13 movq %r15, %rdi callq 0x24c84 movq %rax, %r14 addq %r13, %r14 addq %r12, %r14 incq %rbp addq $0x40, %r15 jmp 0x24c00 movl 0x4(%rbx), %eax imull 0x8(%rbx), %eax leal (%rax,%rax,8), %eax movslq %eax, %r12 pushq $0x1 popq %rdi callq 0x67b83 movq %rax, %r15 imulq %r12, %r15 movslq 0x4(%rbx), %rbx xorl %edi, %edi callq 0x67b83 imulq %rbx, %rax addq %r14, %rax addq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN11TinyEncoder18calculate_mem_sizeEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov eax, [rdi+8] imul eax, [rdi] lea eax, [rax+rax*8] movsxd r14, eax push 1 pop r13 mov edi, r13d call ggml_type_size mov r15, rax imul r15, r14 movsxd r14, dword ptr [rbx+8] xor ebp, ebp xor edi, edi call ggml_type_size mov r12, rax imul r12, r14 lea rdi, [rbx+20h]; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r14, rax add r14, r12 add r14, r15 mov eax, [rbx+8] imul eax, eax lea eax, [rax+rax*8] movsxd r12, eax mov edi, r13d call ggml_type_size mov r15, rax imul r15, r12 mov eax, [rbx+8] imul eax, eax lea eax, [rax+rax*8] movsxd r13, eax push 1 pop rdi call ggml_type_size mov r12, rax imul r12, r13 add r12, r15 add r12, r14 mov eax, [rbx+8] imul eax, eax lea eax, [rax+rax*8] movsxd r15, eax push 1 pop rdi call ggml_type_size mov r14, rax imul r14, r15 add r14, r12 lea r15, [rbx+1F8h] loc_24C00: movsxd rax, dword ptr [rbx+0Ch] cmp rbp, rax jge short loc_24C44 lea rdi, [r15-190h]; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r12, rax add r12, r14 lea rdi, [r15-0C8h]; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r13, rax mov rdi, r15; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r14, rax add r14, r13 add r14, r12 inc rbp add r15, 40h ; '@' jmp short loc_24C00 loc_24C44: mov eax, [rbx+4] imul eax, [rbx+8] lea eax, [rax+rax*8] movsxd r12, eax push 1 pop rdi call ggml_type_size mov r15, rax imul r15, r12 movsxd rbx, dword ptr [rbx+4] xor edi, edi call ggml_type_size imul rax, rbx add rax, r14 add rax, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long TinyEncoder::calculate_mem_size(TinyEncoder *this) { long long v2; // r14 long long v3; // r15 long long v4; // r14 long long v5; // rbp long long v6; // r12 long long v7; // r14 long long v8; // r12 long long v9; // r15 long long v10; // r13 long long v11; // r12 long long v12; // r15 long long v13; // r14 TAEBlock *v14; // r15 long long v15; // r12 long long v16; // r13 long long v17; // r12 long long v18; // r15 long long v19; // rbx v2 = 9 * *(_DWORD *)this * *((_DWORD *)this + 2); v3 = v2 * ggml_type_size(1LL); v4 = *((int *)this + 2); v5 = 0LL; v6 = v4 * ggml_type_size(0LL); v7 = v3 + v6 + TAEBlock::calculate_mem_size((TinyEncoder *)((char *)this + 32)); v8 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v9 = v8 * ggml_type_size(1LL); v10 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v11 = v7 + v9 + v10 * ggml_type_size(1LL); v12 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v13 = v11 + v12 * ggml_type_size(1LL); v14 = (TinyEncoder *)((char *)this + 504); while ( v5 < *((int *)this + 3) ) { v15 = v13 + TAEBlock::calculate_mem_size((TAEBlock *)((char *)v14 - 400)); v16 = TAEBlock::calculate_mem_size((TAEBlock *)((char *)v14 - 200)); v13 = v15 + v16 + TAEBlock::calculate_mem_size(v14); ++v5; v14 = (TAEBlock *)((char *)v14 + 64); } v17 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 1); v18 = v17 * ggml_type_size(1LL); v19 = *((int *)this + 1); return v18 + v13 + v19 * ggml_type_size(0LL); }
calculate_mem_size: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x8] IMUL EAX,dword ptr [RDI] LEA EAX,[RAX + RAX*0x8] MOVSXD R14,EAX PUSH 0x1 POP R13 MOV EDI,R13D CALL 0x00167b83 MOV R15,RAX IMUL R15,R14 MOVSXD R14,dword ptr [RBX + 0x8] XOR EBP,EBP XOR EDI,EDI CALL 0x00167b83 MOV R12,RAX IMUL R12,R14 LEA RDI,[RBX + 0x20] CALL 0x00124c84 MOV R14,RAX ADD R14,R12 ADD R14,R15 MOV EAX,dword ptr [RBX + 0x8] IMUL EAX,EAX LEA EAX,[RAX + RAX*0x8] MOVSXD R12,EAX MOV EDI,R13D CALL 0x00167b83 MOV R15,RAX IMUL R15,R12 MOV EAX,dword ptr [RBX + 0x8] IMUL EAX,EAX LEA EAX,[RAX + RAX*0x8] MOVSXD R13,EAX PUSH 0x1 POP RDI CALL 0x00167b83 MOV R12,RAX IMUL R12,R13 ADD R12,R15 ADD R12,R14 MOV EAX,dword ptr [RBX + 0x8] IMUL EAX,EAX LEA EAX,[RAX + RAX*0x8] MOVSXD R15,EAX PUSH 0x1 POP RDI CALL 0x00167b83 MOV R14,RAX IMUL R14,R15 ADD R14,R12 LEA R15,[RBX + 0x1f8] LAB_00124c00: MOVSXD RAX,dword ptr [RBX + 0xc] CMP RBP,RAX JGE 0x00124c44 LEA RDI,[R15 + -0x190] CALL 0x00124c84 MOV R12,RAX ADD R12,R14 LEA RDI,[R15 + -0xc8] CALL 0x00124c84 MOV R13,RAX MOV RDI,R15 CALL 0x00124c84 MOV R14,RAX ADD R14,R13 ADD R14,R12 INC RBP ADD R15,0x40 JMP 0x00124c00 LAB_00124c44: MOV EAX,dword ptr [RBX + 0x4] IMUL EAX,dword ptr [RBX + 0x8] LEA EAX,[RAX + RAX*0x8] MOVSXD R12,EAX PUSH 0x1 POP RDI CALL 0x00167b83 MOV R15,RAX IMUL R15,R12 MOVSXD RBX,dword ptr [RBX + 0x4] XOR EDI,EDI CALL 0x00167b83 IMUL RAX,RBX ADD RAX,R14 ADD RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* TinyEncoder::calculate_mem_size() */ long __thiscall TinyEncoder::calculate_mem_size(TinyEncoder *this) { int iVar1; int iVar2; int iVar3; int iVar4; int iVar5; int iVar6; long lVar7; long lVar8; long lVar9; long lVar10; long lVar11; long lVar12; TinyEncoder *this_00; iVar1 = *(int *)(this + 8); iVar2 = *(int *)this; lVar7 = ggml_type_size(1); iVar3 = *(int *)(this + 8); lVar8 = ggml_type_size(0); lVar9 = TAEBlock::calculate_mem_size((TAEBlock *)(this + 0x20)); iVar4 = *(int *)(this + 8); lVar10 = ggml_type_size(1); iVar5 = *(int *)(this + 8); lVar11 = ggml_type_size(1); iVar6 = *(int *)(this + 8); lVar12 = ggml_type_size(1); lVar8 = lVar12 * (iVar6 * iVar6 * 9) + lVar11 * (iVar5 * iVar5 * 9) + lVar10 * (iVar4 * iVar4 * 9) + lVar9 + lVar8 * iVar3 + lVar7 * (iVar1 * iVar2 * 9); this_00 = this + 0x1f8; for (lVar7 = 0; lVar7 < *(int *)(this + 0xc); lVar7 = lVar7 + 1) { lVar9 = TAEBlock::calculate_mem_size((TAEBlock *)this_00 + -400); lVar10 = TAEBlock::calculate_mem_size((TAEBlock *)this_00 + -200); lVar11 = TAEBlock::calculate_mem_size((TAEBlock *)this_00); lVar8 = lVar11 + lVar10 + lVar9 + lVar8; this_00 = (TinyEncoder *)((TAEBlock *)this_00 + 0x40); } iVar1 = *(int *)(this + 4); iVar2 = *(int *)(this + 8); lVar7 = ggml_type_size(1); iVar3 = *(int *)(this + 4); lVar9 = ggml_type_size(0); return lVar9 * iVar3 + lVar8 + lVar7 * (iVar1 * iVar2 * 9); }
40,149
TinyEncoder::calculate_mem_size()
7CodeWizard[P]stablediffusion/tae.hpp
size_t calculate_mem_size() { size_t mem_size = channels * in_channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w mem_size += channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b mem_size += initial_block.calculate_mem_size(); mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_1_w mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_2_w mem_size += channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_3_w for (int i = 0; i < num_blocks; i++) { mem_size += input_blocks[i].calculate_mem_size(); mem_size += middle_blocks[i].calculate_mem_size(); mem_size += output_blocks[i].calculate_mem_size(); } mem_size += z_channels * channels * 3 * 3 * ggml_type_size(GGML_TYPE_F16); // conv_input_w mem_size += z_channels * ggml_type_size(GGML_TYPE_F32); // conv_input_b return mem_size; }
O3
cpp
TinyEncoder::calculate_mem_size(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x8(%rdi), %eax imull (%rdi), %eax leal (%rax,%rax,8), %eax movslq %eax, %r14 movl $0x1, %edi callq 0x8ceea movq %rax, %r15 imulq %r14, %r15 movslq 0x8(%rbx), %r14 xorl %edi, %edi callq 0x8ceea movq %rax, %r12 imulq %r14, %r12 leaq 0x20(%rbx), %rdi callq 0x3aa1a movq %rax, %r14 addq %r12, %r14 addq %r15, %r14 movl 0x8(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r12 movl $0x1, %edi callq 0x8ceea movq %rax, %r15 imulq %r12, %r15 movl 0x8(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r13 movl $0x1, %edi callq 0x8ceea movq %rax, %r12 imulq %r13, %r12 addq %r15, %r12 addq %r14, %r12 movl 0x8(%rbx), %eax imull %eax, %eax leal (%rax,%rax,8), %eax movslq %eax, %r15 movl $0x1, %edi callq 0x8ceea movq %rax, %r14 imulq %r15, %r14 addq %r12, %r14 cmpl $0x0, 0xc(%rbx) jle 0x3a9d8 leaq 0x1f8(%rbx), %r15 xorl %ebp, %ebp leaq -0x190(%r15), %rdi callq 0x3aa1a movq %rax, %r12 addq %r14, %r12 leaq -0xc8(%r15), %rdi callq 0x3aa1a movq %rax, %r13 movq %r15, %rdi callq 0x3aa1a movq %rax, %r14 addq %r13, %r14 addq %r12, %r14 incq %rbp movslq 0xc(%rbx), %rax addq $0x40, %r15 cmpq %rax, %rbp jl 0x3a996 movl 0x4(%rbx), %eax imull 0x8(%rbx), %eax leal (%rax,%rax,8), %eax movslq %eax, %r12 movl $0x1, %edi callq 0x8ceea movq %rax, %r15 imulq %r12, %r15 movslq 0x4(%rbx), %rbx xorl %edi, %edi callq 0x8ceea imulq %rbx, %rax addq %r15, %rax addq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN11TinyEncoder18calculate_mem_sizeEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov eax, [rdi+8] imul eax, [rdi] lea eax, [rax+rax*8] movsxd r14, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r14 movsxd r14, dword ptr [rbx+8] xor edi, edi call ggml_type_size mov r12, rax imul r12, r14 lea rdi, [rbx+20h]; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r14, rax add r14, r12 add r14, r15 mov eax, [rbx+8] imul eax, eax lea eax, [rax+rax*8] movsxd r12, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r12 mov eax, [rbx+8] imul eax, eax lea eax, [rax+rax*8] movsxd r13, eax mov edi, 1 call ggml_type_size mov r12, rax imul r12, r13 add r12, r15 add r12, r14 mov eax, [rbx+8] imul eax, eax lea eax, [rax+rax*8] movsxd r15, eax mov edi, 1 call ggml_type_size mov r14, rax imul r14, r15 add r14, r12 cmp dword ptr [rbx+0Ch], 0 jle short loc_3A9D8 lea r15, [rbx+1F8h] xor ebp, ebp loc_3A996: lea rdi, [r15-190h]; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r12, rax add r12, r14 lea rdi, [r15-0C8h]; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r13, rax mov rdi, r15; this call _ZN8TAEBlock18calculate_mem_sizeEv; TAEBlock::calculate_mem_size(void) mov r14, rax add r14, r13 add r14, r12 inc rbp movsxd rax, dword ptr [rbx+0Ch] add r15, 40h ; '@' cmp rbp, rax jl short loc_3A996 loc_3A9D8: mov eax, [rbx+4] imul eax, [rbx+8] lea eax, [rax+rax*8] movsxd r12, eax mov edi, 1 call ggml_type_size mov r15, rax imul r15, r12 movsxd rbx, dword ptr [rbx+4] xor edi, edi call ggml_type_size imul rax, rbx add rax, r15 add rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long TinyEncoder::calculate_mem_size(TinyEncoder *this) { long long v2; // r14 long long v3; // r15 long long v4; // r14 long long v5; // r12 long long v6; // r14 long long v7; // r12 long long v8; // r15 long long v9; // r13 long long v10; // r12 long long v11; // r15 long long v12; // r14 TAEBlock *v13; // r15 long long v14; // rbp long long v15; // r12 long long v16; // r13 long long v17; // r12 long long v18; // r15 long long v19; // rbx v2 = 9 * *(_DWORD *)this * *((_DWORD *)this + 2); v3 = v2 * ggml_type_size(1LL); v4 = *((int *)this + 2); v5 = v4 * ggml_type_size(0LL); v6 = v3 + v5 + TAEBlock::calculate_mem_size((TinyEncoder *)((char *)this + 32)); v7 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v8 = v7 * ggml_type_size(1LL); v9 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v10 = v6 + v8 + v9 * ggml_type_size(1LL); v11 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 2); v12 = v10 + v11 * ggml_type_size(1LL); if ( *((int *)this + 3) > 0 ) { v13 = (TinyEncoder *)((char *)this + 504); v14 = 0LL; do { v15 = v12 + TAEBlock::calculate_mem_size((TAEBlock *)((char *)v13 - 400)); v16 = TAEBlock::calculate_mem_size((TAEBlock *)((char *)v13 - 200)); v12 = v15 + v16 + TAEBlock::calculate_mem_size(v13); ++v14; v13 = (TAEBlock *)((char *)v13 + 64); } while ( v14 < *((int *)this + 3) ); } v17 = 9 * *((_DWORD *)this + 2) * *((_DWORD *)this + 1); v18 = v17 * ggml_type_size(1LL); v19 = *((int *)this + 1); return v12 + v18 + v19 * ggml_type_size(0LL); }
40,150
psi_mutex_trylock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_mutex_trylock(mysql_mutex_t *that, const char *file, uint line) { PSI_mutex_locker_state state; PSI_mutex_locker *locker= PSI_MUTEX_CALL(start_mutex_wait) (&state, that->m_psi, PSI_MUTEX_TRYLOCK, file, line); # ifdef SAFE_MUTEX int result= safe_mutex_lock(&that->m_mutex, TRUE, file, line); # else int result= pthread_mutex_trylock(&that->m_mutex); # endif if (locker) PSI_MUTEX_CALL(end_mutex_wait)(locker, result); return result; }
O3
c
psi_mutex_trylock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x357404(%rip), %r15 # 0x386010 movq (%r15), %rax movq 0x40(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x1 popq %rdx callq *0x190(%rax) movq %rax, %rbx movq %r14, %rdi callq 0x293d0 movl %eax, %r14d testq %rbx, %rbx je 0x2ec42 movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x198(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_mutex_trylock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+40h] lea rdi, [rbp+var_48] push 1 pop rdx call qword ptr [rax+190h] mov rbx, rax mov rdi, r14 call _pthread_mutex_trylock mov r14d, eax test rbx, rbx jz short loc_2EC42 mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+198h] loc_2EC42: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_mutex_trylock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[50])( v6, *(_QWORD *)(a1 + 64), 1LL, a2, a3); v4 = pthread_mutex_trylock(a1); if ( v3 ) ((void ( *)(long long, _QWORD))PSI_server[51])(v3, v4); return v4; }
psi_mutex_trylock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x486010] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x40] LEA RDI,[RBP + -0x48] PUSH 0x1 POP RDX CALL qword ptr [RAX + 0x190] MOV RBX,RAX MOV RDI,R14 CALL 0x001293d0 MOV R14D,EAX TEST RBX,RBX JZ 0x0012ec42 MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x198] LAB_0012ec42: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int psi_mutex_trylock(pthread_mutex_t *param_1,int8 param_2,int4 param_3) { int iVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 400)) (local_50,*(int8 *)((long)param_1 + 0x40),1,param_2,param_3); iVar1 = pthread_mutex_trylock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x198))(lVar2,iVar1); } return iVar1; }
40,151
mj_referenceConstraint
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_core_constraint.c
void mj_referenceConstraint(const mjModel* m, mjData* d) { int nefc = d->nefc; mjtNum* KBIP = d->efc_KBIP; // compute efc_vel mj_mulJacVec(m, d, d->efc_vel, d->qvel); // compute aref = -B*vel - K*I*(pos-margin) for (int i=0; i < nefc; i++) { d->efc_aref[i] = -KBIP[4*i+1]*d->efc_vel[i] -KBIP[4*i]*KBIP[4*i+2]*(d->efc_pos[i]-d->efc_margin[i]); } }
O0
c
mj_referenceConstraint: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq 0x18(%rsp), %rax movl 0x2773c(%rax), %eax movl %eax, 0x14(%rsp) movq 0x18(%rsp), %rax movq 0x27ae0(%rax), %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi movq 0x18(%rsp), %rax movq 0x27b68(%rax), %rdx movq 0x18(%rsp), %rax movq 0x27780(%rax), %rcx callq 0x49790 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0x14(%rsp), %eax jge 0x78daf movq 0x8(%rsp), %rax movl 0x4(%rsp), %ecx shll $0x2, %ecx addl $0x1, %ecx movslq %ecx, %rcx vmovsd (%rax,%rcx,8), %xmm0 vmovq %xmm0, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax vmovq %rax, %xmm0 movq 0x18(%rsp), %rax movq 0x27b68(%rax), %rax movslq 0x4(%rsp), %rcx vmovsd (%rax,%rcx,8), %xmm2 movq 0x8(%rsp), %rax movl 0x4(%rsp), %ecx shll $0x2, %ecx movslq %ecx, %rcx vmovsd (%rax,%rcx,8), %xmm1 movq 0x8(%rsp), %rax movl 0x4(%rsp), %ecx shll $0x2, %ecx addl $0x2, %ecx movslq %ecx, %rcx vmulsd (%rax,%rcx,8), %xmm1, %xmm1 movq 0x18(%rsp), %rax movq 0x27ac0(%rax), %rax movslq 0x4(%rsp), %rcx vmovsd (%rax,%rcx,8), %xmm3 movq 0x18(%rsp), %rax movq 0x27ac8(%rax), %rax movslq 0x4(%rsp), %rcx vsubsd (%rax,%rcx,8), %xmm3, %xmm3 vmulsd %xmm3, %xmm1, %xmm1 vmovq %xmm1, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax vmovq %rax, %xmm1 vmulsd %xmm2, %xmm0, %xmm0 vaddsd %xmm1, %xmm0, %xmm0 movq 0x18(%rsp), %rax movq 0x27b70(%rax), %rax movslq 0x4(%rsp), %rcx vmovsd %xmm0, (%rax,%rcx,8) movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x78cbd addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
mj_referenceConstraint: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov rax, [rsp+28h+var_10] mov eax, [rax+2773Ch] mov [rsp+28h+var_14], eax mov rax, [rsp+28h+var_10] mov rax, [rax+27AE0h] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] mov rax, [rsp+28h+var_10] mov rdx, [rax+27B68h] mov rax, [rsp+28h+var_10] mov rcx, [rax+27780h] call _mj_mulJacVec mov [rsp+28h+var_24], 0 loc_78CBD: mov eax, [rsp+28h+var_24] cmp eax, [rsp+28h+var_14] jge loc_78DAF mov rax, [rsp+28h+var_20] mov ecx, [rsp+28h+var_24] shl ecx, 2 add ecx, 1 movsxd rcx, ecx vmovsd xmm0, qword ptr [rax+rcx*8] vmovq rax, xmm0 mov rcx, 8000000000000000h xor rax, rcx vmovq xmm0, rax mov rax, [rsp+28h+var_10] mov rax, [rax+27B68h] movsxd rcx, [rsp+28h+var_24] vmovsd xmm2, qword ptr [rax+rcx*8] mov rax, [rsp+28h+var_20] mov ecx, [rsp+28h+var_24] shl ecx, 2 movsxd rcx, ecx vmovsd xmm1, qword ptr [rax+rcx*8] mov rax, [rsp+28h+var_20] mov ecx, [rsp+28h+var_24] shl ecx, 2 add ecx, 2 movsxd rcx, ecx vmulsd xmm1, xmm1, qword ptr [rax+rcx*8] mov rax, [rsp+28h+var_10] mov rax, [rax+27AC0h] movsxd rcx, [rsp+28h+var_24] vmovsd xmm3, qword ptr [rax+rcx*8] mov rax, [rsp+28h+var_10] mov rax, [rax+27AC8h] movsxd rcx, [rsp+28h+var_24] vsubsd xmm3, xmm3, qword ptr [rax+rcx*8] vmulsd xmm1, xmm1, xmm3 vmovq rax, xmm1 mov rcx, 8000000000000000h xor rax, rcx vmovq xmm1, rax vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 mov rax, [rsp+28h+var_10] mov rax, [rax+27B70h] movsxd rcx, [rsp+28h+var_24] vmovsd qword ptr [rax+rcx*8], xmm0 mov eax, [rsp+28h+var_24] add eax, 1 mov [rsp+28h+var_24], eax jmp loc_78CBD loc_78DAF: add rsp, 28h retn
long long mj_referenceConstraint(long long a1, long long a2) { long long result; // rax unsigned int i; // [rsp+4h] [rbp-24h] long long v27; // [rsp+8h] [rbp-20h] int v28; // [rsp+14h] [rbp-14h] v28 = *(_DWORD *)(a2 + 161596); v27 = *(_QWORD *)(a2 + 162528); mj_mulJacVec(a1, a2, *(_QWORD *)(a2 + 162664), *(_QWORD *)(a2 + 161664)); for ( i = 0; ; ++i ) { result = i; if ( (int)i >= v28 ) break; _RAX = v27; _RCX = (int)(4 * i + 1); __asm { vmovsd xmm0, qword ptr [rax+rcx*8] vmovq rax, xmm0 } _RAX ^= 0x8000000000000000LL; __asm { vmovq xmm0, rax } _RAX = *(_QWORD *)(a2 + 162664); _RCX = (int)i; __asm { vmovsd xmm2, qword ptr [rax+rcx*8] } _RAX = v27; _RCX = (int)(4 * i); __asm { vmovsd xmm1, qword ptr [rax+rcx*8] vmulsd xmm1, xmm1, qword ptr [rax+rcx*8] } _RAX = *(_QWORD *)(a2 + 162496); _RCX = (int)i; __asm { vmovsd xmm3, qword ptr [rax+rcx*8] vsubsd xmm3, xmm3, qword ptr [rax+rcx*8] vmulsd xmm1, xmm1, xmm3 vmovq rax, xmm1 } _RAX ^= 0x8000000000000000LL; __asm { vmovq xmm1, rax vmulsd xmm0, xmm0, xmm2 vaddsd xmm0, xmm0, xmm1 } _RAX = *(_QWORD *)(a2 + 162672); _RCX = (int)i; __asm { vmovsd qword ptr [rax+rcx*8], xmm0 } } return result; }
mj_referenceConstraint: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x2773c] MOV dword ptr [RSP + 0x14],EAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x27ae0] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RAX + 0x27b68] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX + 0x27780] CALL 0x00149790 MOV dword ptr [RSP + 0x4],0x0 LAB_00178cbd: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0x14] JGE 0x00178daf MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x4] SHL ECX,0x2 ADD ECX,0x1 MOVSXD RCX,ECX VMOVSD XMM0,qword ptr [RAX + RCX*0x8] VMOVQ RAX,XMM0 MOV RCX,-0x8000000000000000 XOR RAX,RCX VMOVQ XMM0,RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x27b68] MOVSXD RCX,dword ptr [RSP + 0x4] VMOVSD XMM2,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x4] SHL ECX,0x2 MOVSXD RCX,ECX VMOVSD XMM1,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x4] SHL ECX,0x2 ADD ECX,0x2 MOVSXD RCX,ECX VMULSD XMM1,XMM1,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x27ac0] MOVSXD RCX,dword ptr [RSP + 0x4] VMOVSD XMM3,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x27ac8] MOVSXD RCX,dword ptr [RSP + 0x4] VSUBSD XMM3,XMM3,qword ptr [RAX + RCX*0x8] VMULSD XMM1,XMM1,XMM3 VMOVQ RAX,XMM1 MOV RCX,-0x8000000000000000 XOR RAX,RCX VMOVQ XMM1,RAX VMULSD XMM0,XMM0,XMM2 VADDSD XMM0,XMM0,XMM1 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x27b70] MOVSXD RCX,dword ptr [RSP + 0x4] VMOVSD qword ptr [RAX + RCX*0x8],XMM0 MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x00178cbd LAB_00178daf: ADD RSP,0x28 RET
void mj_referenceConstraint(int8 param_1,long param_2) { int iVar1; long lVar2; int4 local_24; iVar1 = *(int *)(param_2 + 0x2773c); lVar2 = *(long *)(param_2 + 0x27ae0); mj_mulJacVec(param_1,param_2,*(int8 *)(param_2 + 0x27b68),*(int8 *)(param_2 + 0x27780) ); for (local_24 = 0; local_24 < iVar1; local_24 = local_24 + 1) { *(double *)(*(long *)(param_2 + 0x27b70) + (long)local_24 * 8) = -*(double *)(lVar2 + (long)(local_24 * 4 + 1) * 8) * *(double *)(*(long *)(param_2 + 0x27b68) + (long)local_24 * 8) + -(*(double *)(lVar2 + (long)(local_24 << 2) * 8) * *(double *)(lVar2 + (long)(local_24 * 4 + 2) * 8) * (*(double *)(*(long *)(param_2 + 0x27ac0) + (long)local_24 * 8) - *(double *)(*(long *)(param_2 + 0x27ac8) + (long)local_24 * 8))); } return; }
40,152
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>>>>>::lexer(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>>>>&&, bool)
monkey531[P]llama/common/./json.hpp
explicit lexer(InputAdapterType&& adapter, bool ignore_comments_ = false) noexcept : ia(std::move(adapter)) , ignore_comments(ignore_comments_) , decimal_point_char(static_cast<char_int_type>(get_decimal_point())) {}
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>>>>>::lexer(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>>>>&&, bool): pushq %rbx movq %rdi, %rbx movups (%rsi), %xmm0 movups %xmm0, (%rdi) movb %dl, 0x10(%rdi) movl $0xffffffff, 0x14(%rdi) # imm = 0xFFFFFFFF xorl %eax, %eax movb %al, 0x18(%rdi) leaq 0x60(%rdi), %rcx xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rdi) movups %xmm0, 0x30(%rdi) movups %xmm0, 0x40(%rdi) movq %rcx, 0x50(%rdi) movq %rax, 0x58(%rdi) movb %al, 0x60(%rdi) leaq 0x7ea8(%rip), %rcx # 0xf013c movq %rcx, 0x70(%rdi) movups %xmm0, 0x78(%rdi) movq %rax, 0x88(%rdi) callq 0x1c1b0 movq (%rax), %rax testq %rax, %rax je 0xe82b5 movsbl (%rax), %eax jmp 0xe82ba movl $0x2e, %eax movl %eax, 0x90(%rbx) popq %rbx retq
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEEC2EOSM_b: push rbx mov rbx, rdi movups xmm0, xmmword ptr [rsi] movups xmmword ptr [rdi], xmm0 mov [rdi+10h], dl mov dword ptr [rdi+14h], 0FFFFFFFFh xor eax, eax mov [rdi+18h], al lea rcx, [rdi+60h] xorps xmm0, xmm0 movups xmmword ptr [rdi+20h], xmm0 movups xmmword ptr [rdi+30h], xmm0 movups xmmword ptr [rdi+40h], xmm0 mov [rdi+50h], rcx mov [rdi+58h], rax mov [rdi+60h], al lea rcx, aErrorWhileHand_0+34h; "" mov [rdi+70h], rcx movups xmmword ptr [rdi+78h], xmm0 mov [rdi+88h], rax call _localeconv mov rax, [rax] test rax, rax jz short loc_E82B5 movsx eax, byte ptr [rax] jmp short loc_E82BA loc_E82B5: mov eax, 2Eh ; '.' loc_E82BA: mov [rbx+90h], eax pop rbx retn
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::lexer( long long a1, _OWORD *a2, char a3) { char *v3; // rax long long result; // rax *(_OWORD *)a1 = *a2; *(_BYTE *)(a1 + 16) = a3; *(_DWORD *)(a1 + 20) = -1; *(_BYTE *)(a1 + 24) = 0; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_OWORD *)(a1 + 64) = 0LL; *(_QWORD *)(a1 + 80) = a1 + 96; *(_QWORD *)(a1 + 88) = 0LL; *(_BYTE *)(a1 + 96) = 0; *(_QWORD *)(a1 + 112) = ""; *(_OWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 136) = 0LL; v3 = *(char **)localeconv(a1); if ( v3 ) result = (unsigned int)*v3; else result = 46LL; *(_DWORD *)(a1 + 144) = result; return result; }
lexer: PUSH RBX MOV RBX,RDI MOVUPS XMM0,xmmword ptr [RSI] MOVUPS xmmword ptr [RDI],XMM0 MOV byte ptr [RDI + 0x10],DL MOV dword ptr [RDI + 0x14],0xffffffff XOR EAX,EAX MOV byte ptr [RDI + 0x18],AL LEA RCX,[RDI + 0x60] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x20],XMM0 MOVUPS xmmword ptr [RDI + 0x30],XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOV qword ptr [RDI + 0x50],RCX MOV qword ptr [RDI + 0x58],RAX MOV byte ptr [RDI + 0x60],AL LEA RCX,[0x1f013c] MOV qword ptr [RDI + 0x70],RCX MOVUPS xmmword ptr [RDI + 0x78],XMM0 MOV qword ptr [RDI + 0x88],RAX CALL 0x0011c1b0 MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001e82b5 MOVSX EAX,byte ptr [RAX] JMP 0x001e82ba LAB_001e82b5: MOV EAX,0x2e LAB_001e82ba: MOV dword ptr [RBX + 0x90],EAX POP RBX 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 > > >::lexer(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > >&&, bool) */ void __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>>> ::lexer(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,iterator_input_adapter *param_1,bool param_2) { int8 uVar1; int iVar2; lconv *plVar3; uVar1 = *(int8 *)(param_1 + 8); *(int8 *)this = *(int8 *)param_1; *(int8 *)(this + 8) = uVar1; this[0x10] = (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>>> )param_2; *(int4 *)(this + 0x14) = 0xffffffff; this[0x18] = (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>>> )0x0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(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 + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (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>>> )0x0; *(char **)(this + 0x70) = ""; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; plVar3 = localeconv(); if (plVar3->decimal_point == (char *)0x0) { iVar2 = 0x2e; } else { iVar2 = (int)*plVar3->decimal_point; } *(int *)(this + 0x90) = iVar2; return; }
40,153
google::protobuf::TextFormat::ParseInfoTree::CreateNested(google::protobuf::FieldDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/text_format.cc
TextFormat::ParseInfoTree* TextFormat::ParseInfoTree::CreateNested( const FieldDescriptor* field) { // Owned by us in the map. auto& vec = nested_[field]; vec.emplace_back(new TextFormat::ParseInfoTree()); return vec.back().get(); }
O3
cpp
google::protobuf::TextFormat::ParseInfoTree::CreateNested(google::protobuf::FieldDescriptor const*): pushq %rbx subq $0x10, %rsp leaq 0x8(%rsp), %rax movq %rsi, (%rax) addq $0x30, %rdi movq %rax, %rsi callq 0x8091e movq %rax, %rbx movl $0x60, %edi callq 0xf350 leaq 0x8(%rax), %rcx xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rax) movaps %xmm0, 0x20(%rax) movaps %xmm0, 0x30(%rax) movaps %xmm0, (%rax) movq %rcx, 0x18(%rax) movq %rcx, 0x20(%rax) leaq 0x38(%rax), %rcx movl $0x0, 0x38(%rax) xorl %edx, %edx movq %rdx, 0x40(%rax) movq %rcx, 0x48(%rax) movq %rcx, 0x50(%rax) movq %rdx, 0x58(%rax) movq %rax, (%rsp) movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x7c13c movq %rax, (%rsi) movq 0x8(%rbx), %rax addq $0x8, %rax movq %rax, 0x8(%rbx) jmp 0x7c14b movq %rsp, %rdx movq %rbx, %rdi callq 0x86332 movq 0x8(%rbx), %rax movq -0x8(%rax), %rax addq $0x10, %rsp popq %rbx retq
_ZN6google8protobuf10TextFormat13ParseInfoTree12CreateNestedEPKNS0_15FieldDescriptorE: push rbx sub rsp, 10h lea rax, [rsp+18h+var_10] mov [rax], rsi add rdi, 30h ; '0' mov rsi, rax call _ZNSt3mapIPKN6google8protobuf15FieldDescriptorESt6vectorISt10unique_ptrINS1_10TextFormat13ParseInfoTreeESt14default_deleteIS8_EESaISB_EESt4lessIS4_ESaISt4pairIKS4_SD_EEEixERSH_; std::map<google::protobuf::FieldDescriptor const*,std::vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree>>>::operator[](google::protobuf::FieldDescriptor const* const&) mov rbx, rax mov edi, 60h ; '`'; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, [rax+8] xorps xmm0, xmm0 movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax+20h], xmm0 movaps xmmword ptr [rax+30h], xmm0 movaps xmmword ptr [rax], xmm0 mov [rax+18h], rcx mov [rax+20h], rcx lea rcx, [rax+38h] mov dword ptr [rax+38h], 0 xor edx, edx mov [rax+40h], rdx mov [rax+48h], rcx mov [rax+50h], rcx mov [rax+58h], rdx mov [rsp+18h+var_18], rax mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_7C13C mov [rsi], rax mov rax, [rbx+8] add rax, 8 mov [rbx+8], rax jmp short loc_7C14B loc_7C13C: mov rdx, rsp mov rdi, rbx call _ZNSt6vectorISt10unique_ptrIN6google8protobuf10TextFormat13ParseInfoTreeESt14default_deleteIS4_EESaIS7_EE17_M_realloc_insertIJPS4_EEEvN9__gnu_cxx17__normal_iteratorIPS7_S9_EEDpOT_; std::vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree>>::_M_realloc_insert<google::protobuf::TextFormat::ParseInfoTree*>(__gnu_cxx::__normal_iterator<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree>*,std::vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree>>>,google::protobuf::TextFormat::ParseInfoTree* &&) mov rax, [rbx+8] loc_7C14B: mov rax, [rax-8] add rsp, 10h pop rbx retn
long long google::protobuf::TextFormat::ParseInfoTree::CreateNested( google::protobuf::TextFormat::ParseInfoTree *this, const google::protobuf::FieldDescriptor *a2) { long long v2; // rbx long long v3; // rax _QWORD *v4; // rsi long long v5; // rax long long v7; // [rsp+0h] [rbp-18h] BYREF const google::protobuf::FieldDescriptor *v8; // [rsp+8h] [rbp-10h] BYREF v8 = a2; v2 = std::map<google::protobuf::FieldDescriptor const*,std::vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree>>>::operator[]( (char *)this + 48, &v8); v3 = operator new(0x60uLL); *(_OWORD *)(v3 + 16) = 0LL; *(_OWORD *)(v3 + 32) = 0LL; *(_OWORD *)(v3 + 48) = 0LL; *(_OWORD *)v3 = 0LL; *(_QWORD *)(v3 + 24) = v3 + 8; *(_QWORD *)(v3 + 32) = v3 + 8; *(_DWORD *)(v3 + 56) = 0; *(_QWORD *)(v3 + 64) = 0LL; *(_QWORD *)(v3 + 72) = v3 + 56; *(_QWORD *)(v3 + 80) = v3 + 56; *(_QWORD *)(v3 + 88) = 0LL; v7 = v3; v4 = *(_QWORD **)(v2 + 8); if ( v4 == *(_QWORD **)(v2 + 16) ) { std::vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree>>::_M_realloc_insert<google::protobuf::TextFormat::ParseInfoTree*>( v2, v4, &v7); v5 = *(_QWORD *)(v2 + 8); } else { *v4 = v3; v5 = *(_QWORD *)(v2 + 8) + 8LL; *(_QWORD *)(v2 + 8) = v5; } return *(_QWORD *)(v5 - 8); }
CreateNested: PUSH RBX SUB RSP,0x10 LEA RAX,[RSP + 0x8] MOV qword ptr [RAX],RSI ADD RDI,0x30 MOV RSI,RAX CALL 0x0018091e MOV RBX,RAX MOV EDI,0x60 CALL 0x0010f350 LEA RCX,[RAX + 0x8] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX + 0x20],XMM0 MOVAPS xmmword ptr [RAX + 0x30],XMM0 MOVAPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x18],RCX MOV qword ptr [RAX + 0x20],RCX LEA RCX,[RAX + 0x38] MOV dword ptr [RAX + 0x38],0x0 XOR EDX,EDX MOV qword ptr [RAX + 0x40],RDX MOV qword ptr [RAX + 0x48],RCX MOV qword ptr [RAX + 0x50],RCX MOV qword ptr [RAX + 0x58],RDX MOV qword ptr [RSP],RAX MOV RSI,qword ptr [RBX + 0x8] CMP RSI,qword ptr [RBX + 0x10] JZ 0x0017c13c MOV qword ptr [RSI],RAX MOV RAX,qword ptr [RBX + 0x8] ADD RAX,0x8 MOV qword ptr [RBX + 0x8],RAX JMP 0x0017c14b LAB_0017c13c: MOV RDX,RSP MOV RDI,RBX CALL 0x00186332 MOV RAX,qword ptr [RBX + 0x8] LAB_0017c14b: MOV RAX,qword ptr [RAX + -0x8] ADD RSP,0x10 POP RBX RET
/* google::protobuf::TextFormat::ParseInfoTree::CreateNested(google::protobuf::FieldDescriptor const*) */ int8 __thiscall google::protobuf::TextFormat::ParseInfoTree::CreateNested (ParseInfoTree *this,FieldDescriptor *param_1) { int8 *puVar1; vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>,std::allocator<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>>> *pvVar2; long lVar3; int8 *local_18; FieldDescriptor *local_10; local_10 = param_1; pvVar2 = (vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>,std::allocator<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>>> *)std:: map<google::protobuf::FieldDescriptor_const*,std::vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>,std::allocator<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>>>,std::less<google::protobuf::FieldDescriptor_const*>,std::allocator<std::pair<google::protobuf::FieldDescriptor_const*const,std::vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>,std::allocator<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>>>>>> ::operator[]((map<google::protobuf::FieldDescriptor_const*,std::vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>,std::allocator<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>>>,std::less<google::protobuf::FieldDescriptor_const*>,std::allocator<std::pair<google::protobuf::FieldDescriptor_const*const,std::vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>,std::allocator<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>>>>>> *)(this + 0x30),&local_10); local_18 = (int8 *)operator_new(0x60); local_18[2] = 0; local_18[3] = 0; local_18[4] = 0; local_18[5] = 0; local_18[6] = 0; local_18[7] = 0; *local_18 = 0; local_18[1] = 0; local_18[3] = local_18 + 1; local_18[4] = local_18 + 1; *(int4 *)(local_18 + 7) = 0; local_18[8] = 0; local_18[9] = local_18 + 7; local_18[10] = local_18 + 7; local_18[0xb] = 0; puVar1 = *(int8 **)(pvVar2 + 8); if (puVar1 == *(int8 **)(pvVar2 + 0x10)) { std:: vector<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>,std::allocator<std::unique_ptr<google::protobuf::TextFormat::ParseInfoTree,std::default_delete<google::protobuf::TextFormat::ParseInfoTree>>>> ::_M_realloc_insert<google::protobuf::TextFormat::ParseInfoTree*>(pvVar2,puVar1,&local_18); lVar3 = *(long *)(pvVar2 + 8); } else { *puVar1 = local_18; lVar3 = *(long *)(pvVar2 + 8) + 8; *(long *)(pvVar2 + 8) = lVar3; } return *(int8 *)(lVar3 + -8); }
40,154
mariadb_set_conf_option
eloqsql/libmariadb/libmariadb/mariadb_lib.c
my_bool _mariadb_set_conf_option(MYSQL *mysql, const char *config_option, const char *config_value) { if (config_option) { int i; char *c; /* CONC-395: replace underscore "_" by dash "-" */ while ((c= strchr(config_option, '_'))) *c= '-'; for (i=0; mariadb_defaults[i].conf_key; i++) { if (!strcmp(mariadb_defaults[i].conf_key, config_option)) { my_bool val_bool; int val_int; size_t val_sizet; int rc; void *option_val= NULL; switch (mariadb_defaults[i].type) { case MARIADB_OPTION_FUNC: return mariadb_defaults[i].u.option_func(mysql, config_option, config_value, -1); break; case MARIADB_OPTION_BOOL: val_bool= 0; if (config_value) val_bool= atoi(config_value); option_val= &val_bool; break; case MARIADB_OPTION_INT: val_int= 0; if (config_value) val_int= atoi(config_value); option_val= &val_int; break; case MARIADB_OPTION_SIZET: val_sizet= 0; if (config_value) val_sizet= strtol(config_value, NULL, 10); option_val= &val_sizet; break; case MARIADB_OPTION_STR: option_val= (void*)config_value; break; case MARIADB_OPTION_NONE: break; } rc= mysql_optionsv(mysql, mariadb_defaults[i].u.option, option_val); return(test(rc)); } } } /* unknown key */ return 1; }
O0
c
mariadb_set_conf_option: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x18(%rbp) je 0x31eca jmp 0x31d21 movq -0x18(%rbp), %rdi movl $0x5f, %esi callq 0x14170 movq %rax, -0x30(%rbp) cmpq $0x0, %rax je 0x31d42 movq -0x30(%rbp), %rax movb $0x2d, (%rax) jmp 0x31d21 movl $0x0, -0x24(%rbp) movslq -0x24(%rbp), %rcx leaq 0x4d38c(%rip), %rax # 0x7f0e0 imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpq $0x0, 0x10(%rax) je 0x31ec8 movslq -0x24(%rbp), %rcx leaq 0x4d36f(%rip), %rax # 0x7f0e0 imulq $0x18, %rcx, %rcx addq %rcx, %rax movq 0x10(%rax), %rdi movq -0x18(%rbp), %rsi callq 0x14600 cmpl $0x0, %eax jne 0x31eb8 movq $0x0, -0x50(%rbp) movslq -0x24(%rbp), %rax leaq (%rax,%rax,2), %rcx leaq 0x4d33b(%rip), %rax # 0x7f0e0 movl 0x8(%rax,%rcx,8), %eax movq %rax, -0x58(%rbp) subq $0x5, %rax ja 0x31e7d movq -0x58(%rbp), %rax leaq 0x3c1e6(%rip), %rcx # 0x6dfa8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movslq -0x24(%rbp), %rcx leaq 0x4d30a(%rip), %rax # 0x7f0e0 imulq $0x18, %rcx, %rcx addq %rcx, %rax movq (%rax), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq $-0x1, %rcx callq *%rax movb %al, -0x1(%rbp) jmp 0x31ece movb $0x0, -0x31(%rbp) cmpq $0x0, -0x20(%rbp) je 0x31e14 movq -0x20(%rbp), %rdi callq 0x146c0 movb %al, -0x31(%rbp) leaq -0x31(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x31e7d movl $0x0, -0x38(%rbp) cmpq $0x0, -0x20(%rbp) je 0x31e38 movq -0x20(%rbp), %rdi callq 0x146c0 movl %eax, -0x38(%rbp) leaq -0x38(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x31e7d movq $0x0, -0x40(%rbp) cmpq $0x0, -0x20(%rbp) je 0x31e67 movq -0x20(%rbp), %rdi xorl %eax, %eax movl %eax, %esi movl $0xa, %edx callq 0x14610 movq %rax, -0x40(%rbp) leaq -0x40(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x31e7d movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x31e7d jmp 0x31e7d movq -0x10(%rbp), %rdi movslq -0x24(%rbp), %rcx leaq 0x4d254(%rip), %rax # 0x7f0e0 imulq $0x18, %rcx, %rcx addq %rcx, %rax movl (%rax), %esi movq -0x50(%rbp), %rdx movb $0x0, %al callq 0x31ee0 movl %eax, -0x44(%rbp) movl -0x44(%rbp), %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movb %al, -0x1(%rbp) jmp 0x31ece jmp 0x31eba movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x31d49 jmp 0x31eca movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
_mariadb_set_conf_option: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_18], 0 jz loc_31ECA jmp short $+2 loc_31D21: mov rdi, [rbp+var_18] mov esi, 5Fh ; '_' call _strchr mov [rbp+var_30], rax cmp rax, 0 jz short loc_31D42 mov rax, [rbp+var_30] mov byte ptr [rax], 2Dh ; '-' jmp short loc_31D21 loc_31D42: mov [rbp+var_24], 0 loc_31D49: movsxd rcx, [rbp+var_24] lea rax, mariadb_defaults imul rcx, 18h add rax, rcx cmp qword ptr [rax+10h], 0 jz loc_31EC8 movsxd rcx, [rbp+var_24] lea rax, mariadb_defaults imul rcx, 18h add rax, rcx mov rdi, [rax+10h] mov rsi, [rbp+var_18] call _strcmp cmp eax, 0 jnz loc_31EB8 mov [rbp+var_50], 0 movsxd rax, [rbp+var_24] lea rcx, [rax+rax*2] lea rax, mariadb_defaults mov eax, [rax+rcx*8+8] mov [rbp+var_58], rax sub rax, 5; switch 6 cases ja def_31DC9; jumptable 0000000000031DC9 default case mov rax, [rbp+var_58] lea rcx, jpt_31DC9 movsxd rax, ds:(jpt_31DC9 - 6DFA8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_31DCB: movsxd rcx, [rbp+var_24]; jumptable 0000000000031DC9 case 5 lea rax, mariadb_defaults imul rcx, 18h add rax, rcx mov rax, [rax] mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, 0FFFFFFFFFFFFFFFFh call rax mov [rbp+var_1], al jmp loc_31ECE loc_31DFD: mov [rbp+var_31], 0; jumptable 0000000000031DC9 case 1 cmp [rbp+var_20], 0 jz short loc_31E14 mov rdi, [rbp+var_20] call _atoi mov [rbp+var_31], al loc_31E14: lea rax, [rbp+var_31] mov [rbp+var_50], rax jmp short def_31DC9; jumptable 0000000000031DC9 default case loc_31E1E: mov [rbp+var_38], 0; jumptable 0000000000031DC9 case 2 cmp [rbp+var_20], 0 jz short loc_31E38 mov rdi, [rbp+var_20] call _atoi mov [rbp+var_38], eax loc_31E38: lea rax, [rbp+var_38] mov [rbp+var_50], rax jmp short def_31DC9; jumptable 0000000000031DC9 default case loc_31E42: mov [rbp+var_40], 0; jumptable 0000000000031DC9 case 3 cmp [rbp+var_20], 0 jz short loc_31E67 mov rdi, [rbp+var_20] xor eax, eax mov esi, eax mov edx, 0Ah call _strtol mov [rbp+var_40], rax loc_31E67: lea rax, [rbp+var_40] mov [rbp+var_50], rax jmp short def_31DC9; jumptable 0000000000031DC9 default case loc_31E71: mov rax, [rbp+var_20]; jumptable 0000000000031DC9 case 4 mov [rbp+var_50], rax jmp short def_31DC9; jumptable 0000000000031DC9 default case loc_31E7B: jmp short $+2; jumptable 0000000000031DC9 case 0 def_31DC9: mov rdi, [rbp+var_10]; jumptable 0000000000031DC9 default case movsxd rcx, [rbp+var_24] lea rax, mariadb_defaults imul rcx, 18h add rax, rcx mov esi, [rax] mov rdx, [rbp+var_50] mov al, 0 call mysql_optionsv mov [rbp+var_44], eax mov edx, [rbp+var_44] xor eax, eax mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_1], al jmp short loc_31ECE loc_31EB8: jmp short $+2 loc_31EBA: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_31D49 loc_31EC8: jmp short $+2 loc_31ECA: mov [rbp+var_1], 1 loc_31ECE: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char mariadb_set_conf_option(long long a1, long long a2, long long a3) { int v3; // r8d int v4; // r9d int v5; // eax int v7; // [rsp+10h] [rbp-50h] long long v8; // [rsp+20h] [rbp-40h] BYREF int v9; // [rsp+28h] [rbp-38h] BYREF char v10; // [rsp+2Fh] [rbp-31h] BYREF _BYTE *v11; // [rsp+30h] [rbp-30h] int i; // [rsp+3Ch] [rbp-24h] long long v13; // [rsp+40h] [rbp-20h] long long v14; // [rsp+48h] [rbp-18h] long long v15; // [rsp+50h] [rbp-10h] bool v16; // [rsp+5Fh] [rbp-1h] v15 = a1; v14 = a2; v13 = a3; if ( a2 ) { while ( 1 ) { v11 = (_BYTE *)strchr(v14, 95LL); if ( !v11 ) break; *v11 = 45; } for ( i = 0; *((_QWORD *)&mariadb_defaults + 3 * i + 2); ++i ) { if ( !(unsigned int)strcmp(*((_QWORD *)&mariadb_defaults + 3 * i + 2), v14) ) { v7 = 0; switch ( *((_DWORD *)&mariadb_defaults + 6 * i + 2) ) { case 1: v10 = 0; if ( v13 ) v10 = atoi(v13); v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), (unsigned int)&v10, 24 * i, v3, v4); goto LABEL_20; case 2: v9 = 0; if ( v13 ) v9 = atoi(v13); v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), (unsigned int)&v9, 24 * i, v3, v4); goto LABEL_20; case 3: v8 = 0LL; if ( v13 ) v8 = strtol(v13, 0LL, 10LL); v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), (unsigned int)&v8, 24 * i, v3, v4); goto LABEL_20; case 4: v7 = v13; goto LABEL_19; case 5: return (*((long long ( **)(long long, long long, long long, long long))&mariadb_defaults + 3 * i))( v15, v14, v13, -1LL); default: LABEL_19: v5 = mysql_optionsv(v15, *((_DWORD *)&mariadb_defaults + 6 * i), v7, 24 * i, v3, v4); LABEL_20: v16 = v5 != 0; break; } return v16; } } } return 1; }
_mariadb_set_conf_option: 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 CMP qword ptr [RBP + -0x18],0x0 JZ 0x00131eca JMP 0x00131d21 LAB_00131d21: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x5f CALL 0x00114170 MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JZ 0x00131d42 MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],0x2d JMP 0x00131d21 LAB_00131d42: MOV dword ptr [RBP + -0x24],0x0 LAB_00131d49: MOVSXD RCX,dword ptr [RBP + -0x24] LEA RAX,[0x17f0e0] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP qword ptr [RAX + 0x10],0x0 JZ 0x00131ec8 MOVSXD RCX,dword ptr [RBP + -0x24] LEA RAX,[0x17f0e0] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV RDI,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00114600 CMP EAX,0x0 JNZ 0x00131eb8 MOV qword ptr [RBP + -0x50],0x0 MOVSXD RAX,dword ptr [RBP + -0x24] LEA RCX,[RAX + RAX*0x2] LEA RAX,[0x17f0e0] MOV EAX,dword ptr [RAX + RCX*0x8 + 0x8] MOV qword ptr [RBP + -0x58],RAX SUB RAX,0x5 JA 0x00131e7d MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[0x16dfa8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_5: MOVSXD RCX,dword ptr [RBP + -0x24] LEA RAX,[0x17f0e0] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,-0x1 CALL RAX MOV byte ptr [RBP + -0x1],AL JMP 0x00131ece caseD_1: MOV byte ptr [RBP + -0x31],0x0 CMP qword ptr [RBP + -0x20],0x0 JZ 0x00131e14 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001146c0 MOV byte ptr [RBP + -0x31],AL LAB_00131e14: LEA RAX,[RBP + -0x31] MOV qword ptr [RBP + -0x50],RAX JMP 0x00131e7d caseD_2: MOV dword ptr [RBP + -0x38],0x0 CMP qword ptr [RBP + -0x20],0x0 JZ 0x00131e38 MOV RDI,qword ptr [RBP + -0x20] CALL 0x001146c0 MOV dword ptr [RBP + -0x38],EAX LAB_00131e38: LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0x50],RAX JMP 0x00131e7d caseD_3: MOV qword ptr [RBP + -0x40],0x0 CMP qword ptr [RBP + -0x20],0x0 JZ 0x00131e67 MOV RDI,qword ptr [RBP + -0x20] XOR EAX,EAX MOV ESI,EAX MOV EDX,0xa CALL 0x00114610 MOV qword ptr [RBP + -0x40],RAX LAB_00131e67: LEA RAX,[RBP + -0x40] MOV qword ptr [RBP + -0x50],RAX JMP 0x00131e7d caseD_4: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX JMP 0x00131e7d caseD_0: JMP 0x00131e7d default: MOV RDI,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x24] LEA RAX,[0x17f0e0] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV ESI,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x50] MOV AL,0x0 CALL 0x00131ee0 MOV dword ptr [RBP + -0x44],EAX MOV EDX,dword ptr [RBP + -0x44] XOR EAX,EAX MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV byte ptr [RBP + -0x1],AL JMP 0x00131ece LAB_00131eb8: JMP 0x00131eba LAB_00131eba: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x00131d49 LAB_00131ec8: JMP 0x00131eca LAB_00131eca: MOV byte ptr [RBP + -0x1],0x1 LAB_00131ece: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
bool _mariadb_set_conf_option(int8 param_1,char *param_2,long *param_3) { int1 uVar1; int iVar2; long *local_58; long local_48; int local_40; int1 local_39; char *local_38; int local_2c; long *local_28; char *local_20; int8 local_18; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_2 != (char *)0x0) { while (local_38 = strchr(local_20,0x5f), local_38 != (char *)0x0) { *local_38 = '-'; } local_2c = 0; local_38 = (char *)0x0; while (*(long *)(mariadb_defaults + (long)local_2c * 0x18 + 0x10) != 0) { iVar2 = strcmp(*(char **)(mariadb_defaults + (long)local_2c * 0x18 + 0x10),local_20); if (iVar2 == 0) { local_58 = (long *)0x0; switch(*(int4 *)(mariadb_defaults + (long)local_2c * 0x18 + 8)) { case 0: break; case 1: local_39 = 0; if (local_28 != (long *)0x0) { iVar2 = atoi((char *)local_28); local_39 = (int1)iVar2; } local_58 = (long *)&local_39; break; case 2: local_40 = 0; if (local_28 != (long *)0x0) { local_40 = atoi((char *)local_28); } local_58 = (long *)&local_40; break; case 3: local_48 = 0; if (local_28 != (long *)0x0) { local_48 = strtol((char *)local_28,(char **)0x0,10); } local_58 = &local_48; break; case 4: local_58 = local_28; break; case 5: uVar1 = (**(code **)(mariadb_defaults + (long)local_2c * 0x18)) (local_18,local_20,local_28,0xffffffffffffffff); return (bool)uVar1; } iVar2 = mysql_optionsv(local_18,*(int4 *)(mariadb_defaults + (long)local_2c * 0x18), local_58); return iVar2 != 0; } local_2c = local_2c + 1; } } return true; }
40,155
my_open_parent_dir_nosymlinks
eloqsql/mysys/my_symlink.c
const char *my_open_parent_dir_nosymlinks(const char *pathname, int *pdfd) { char buf[FN_REFLEN + 1]; char *s= buf, *e= buf+1, *end= strnmov(buf, pathname, sizeof(buf)); int fd, dfd= -1; if (*end) { errno= ENAMETOOLONG; return NULL; } if (*s != '/') /* not an absolute path */ { errno= ENOENT; return NULL; } for (;;) { if (*e == '/') /* '//' in the path */ { errno= ENOENT; goto err; } while (*e && *e != '/') e++; *e= 0; if (!memcmp(s, ".", 2) || !memcmp(s, "..", 3)) { errno= ENOENT; goto err; } if (++e >= end) { *pdfd= dfd; return pathname + (s - buf); } fd = openat(dfd, s, O_NOFOLLOW | O_PATH | O_CLOEXEC); if (fd < 0) goto err; if (dfd >= 0) close(dfd); dfd= fd; s= e; } err: if (dfd >= 0) close(dfd); return NULL; }
O3
c
my_open_parent_dir_nosymlinks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x228, %rsp # imm = 0x228 movq %rsi, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x240(%rbp), %r15 movl $0x201, %edx # imm = 0x201 movq %r15, %rdi movq %rbx, %rsi callq 0x5dfa4 cmpb $0x0, (%rax) je 0x2b5db callq 0x24050 movl $0x24, (%rax) jmp 0x2b6b2 cmpb $0x2f, -0x240(%rbp) jne 0x2b687 movq %rax, %r12 movq %r14, -0x248(%rbp) movb -0x23f(%rbp), %al movl $0xffffffff, %r13d # imm = 0xFFFFFFFF cmpb $0x2f, %al je 0x2b697 leaq -0x23f(%rbp), %rcx movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq %r15, %rsi incq %rcx movq %rcx, %r15 testb %al, %al je 0x2b630 movzbl %al, %eax cmpl $0x2f, %eax je 0x2b630 movb (%r15), %al incq %r15 jmp 0x2b61c movb $0x0, -0x1(%r15) cmpw $0x2e, (%rsi) je 0x2b694 movzwl (%rsi), %eax xorl $0x2e2e, %eax # imm = 0x2E2E movzbl 0x2(%rsi), %ecx orw %ax, %cx je 0x2b694 cmpq %r12, %r15 jae 0x2b6d8 movl %r14d, %edi movl $0x2a0000, %edx # imm = 0x2A0000 xorl %eax, %eax callq 0x242b0 testl %eax, %eax js 0x2b6a5 movl %eax, %r13d testl %r14d, %r14d js 0x2b678 movl %r14d, %edi callq 0x24650 movb (%r15), %al movl %r13d, %r14d movq %r15, %rcx cmpb $0x2f, %al jne 0x2b613 jmp 0x2b697 callq 0x24050 movl $0x2, (%rax) jmp 0x2b6b2 movl %r14d, %r13d callq 0x24050 movl $0x2, (%rax) movl %r13d, %r14d testl %r14d, %r14d js 0x2b6b2 movl %r14d, %edi callq 0x24650 xorl %ebx, %ebx movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x2b6f1 movq %rbx, %rax addq $0x228, %rsp # imm = 0x228 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq -0x248(%rbp), %rax movl %r14d, (%rax) leaq -0x240(%rbp), %rax subq %rax, %rsi addq %rsi, %rbx jmp 0x2b6b4 callq 0x24350 nop
my_open_parent_dir_nosymlinks: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 228h mov r14, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea r15, [rbp+var_240] mov edx, 201h mov rdi, r15 mov rsi, rbx call strnmov cmp byte ptr [rax], 0 jz short loc_2B5DB call ___errno_location mov dword ptr [rax], 24h ; '$' jmp loc_2B6B2 loc_2B5DB: cmp [rbp+var_240], 2Fh ; '/' jnz loc_2B687 mov r12, rax mov [rbp+var_248], r14 mov al, [rbp+var_23F] mov r13d, 0FFFFFFFFh cmp al, 2Fh ; '/' jz loc_2B697 lea rcx, [rbp+var_23F] mov r14d, 0FFFFFFFFh loc_2B613: mov rsi, r15 inc rcx mov r15, rcx loc_2B61C: test al, al jz short loc_2B630 movzx eax, al cmp eax, 2Fh ; '/' jz short loc_2B630 mov al, [r15] inc r15 jmp short loc_2B61C loc_2B630: mov byte ptr [r15-1], 0 cmp word ptr [rsi], 2Eh ; '.' jz short loc_2B694 movzx eax, word ptr [rsi] xor eax, 2E2Eh movzx ecx, byte ptr [rsi+2] or cx, ax jz short loc_2B694 cmp r15, r12 jnb loc_2B6D8 mov edi, r14d mov edx, offset unk_2A0000 xor eax, eax call _openat64 test eax, eax js short loc_2B6A5 mov r13d, eax test r14d, r14d js short loc_2B678 mov edi, r14d call _close loc_2B678: mov al, [r15] mov r14d, r13d mov rcx, r15 cmp al, 2Fh ; '/' jnz short loc_2B613 jmp short loc_2B697 loc_2B687: call ___errno_location mov dword ptr [rax], 2 jmp short loc_2B6B2 loc_2B694: mov r13d, r14d loc_2B697: call ___errno_location mov dword ptr [rax], 2 mov r14d, r13d loc_2B6A5: test r14d, r14d js short loc_2B6B2 mov edi, r14d call _close loc_2B6B2: xor ebx, ebx loc_2B6B4: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_2B6F1 mov rax, rbx add rsp, 228h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2B6D8: mov rax, [rbp+var_248] mov [rax], r14d lea rax, [rbp+var_240] sub rsi, rax add rbx, rsi jmp short loc_2B6B4 loc_2B6F1: call ___stack_chk_fail
long long my_open_parent_dir_nosymlinks(long long a1, unsigned int *a2) { char *v3; // r15 char *v4; // rdi char *v5; // rax char *v6; // r12 char v7; // al int v8; // r13d char *v9; // rcx unsigned int v10; // r14d char *v11; // rsi int v12; // eax unsigned int *v15; // [rsp+8h] [rbp-248h] char v16; // [rsp+10h] [rbp-240h] BYREF char v17; // [rsp+11h] [rbp-23Fh] BYREF unsigned long long v18; // [rsp+220h] [rbp-30h] v18 = __readfsqword(0x28u); v3 = &v16; v4 = &v16; v5 = (char *)strnmov(&v16, a1, 513LL); if ( *v5 ) { *(_DWORD *)__errno_location(&v16) = 36; return 0LL; } if ( v16 != 47 ) { *(_DWORD *)__errno_location(&v16) = 2; return 0LL; } v6 = v5; v15 = a2; v7 = v17; v8 = -1; if ( v17 == 47 ) { LABEL_20: *(_DWORD *)__errno_location(v4) = 2; v10 = v8; LABEL_21: if ( (v10 & 0x80000000) == 0 ) close(v10); return 0LL; } v9 = &v17; v10 = -1; while ( 1 ) { v11 = v3; v3 = v9 + 1; while ( v7 && v7 != 47 ) v7 = *v3++; *(v3 - 1) = 0; if ( *(_WORD *)v11 == 46 || !(*(_WORD *)v11 ^ 0x2E2E | (unsigned __int8)v11[2]) ) { v8 = v10; goto LABEL_20; } if ( v3 >= v6 ) break; v4 = (char *)v10; v12 = openat64(v10, v11, &unk_2A0000); if ( v12 < 0 ) goto LABEL_21; v8 = v12; if ( (v10 & 0x80000000) == 0 ) { v4 = (char *)v10; close(v10); } v7 = *v3; v10 = v8; v9 = v3; if ( *v3 == 47 ) goto LABEL_20; } *v15 = v10; return v11 - &v16 + a1; }
my_open_parent_dir_nosymlinks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x228 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RBP + -0x240] MOV EDX,0x201 MOV RDI,R15 MOV RSI,RBX CALL 0x0015dfa4 CMP byte ptr [RAX],0x0 JZ 0x0012b5db CALL 0x00124050 MOV dword ptr [RAX],0x24 JMP 0x0012b6b2 LAB_0012b5db: CMP byte ptr [RBP + -0x240],0x2f JNZ 0x0012b687 MOV R12,RAX MOV qword ptr [RBP + -0x248],R14 MOV AL,byte ptr [RBP + -0x23f] MOV R13D,0xffffffff CMP AL,0x2f JZ 0x0012b697 LEA RCX,[RBP + -0x23f] MOV R14D,0xffffffff LAB_0012b613: MOV RSI,R15 INC RCX MOV R15,RCX LAB_0012b61c: TEST AL,AL JZ 0x0012b630 MOVZX EAX,AL CMP EAX,0x2f JZ 0x0012b630 MOV AL,byte ptr [R15] INC R15 JMP 0x0012b61c LAB_0012b630: MOV byte ptr [R15 + -0x1],0x0 CMP word ptr [RSI],0x2e JZ 0x0012b694 MOVZX EAX,word ptr [RSI] XOR EAX,0x2e2e MOVZX ECX,byte ptr [RSI + 0x2] OR CX,AX JZ 0x0012b694 CMP R15,R12 JNC 0x0012b6d8 MOV EDI,R14D MOV EDX,0x2a0000 XOR EAX,EAX CALL 0x001242b0 TEST EAX,EAX JS 0x0012b6a5 MOV R13D,EAX TEST R14D,R14D JS 0x0012b678 MOV EDI,R14D CALL 0x00124650 LAB_0012b678: MOV AL,byte ptr [R15] MOV R14D,R13D MOV RCX,R15 CMP AL,0x2f JNZ 0x0012b613 JMP 0x0012b697 LAB_0012b687: CALL 0x00124050 MOV dword ptr [RAX],0x2 JMP 0x0012b6b2 LAB_0012b694: MOV R13D,R14D LAB_0012b697: CALL 0x00124050 MOV dword ptr [RAX],0x2 MOV R14D,R13D LAB_0012b6a5: TEST R14D,R14D JS 0x0012b6b2 MOV EDI,R14D CALL 0x00124650 LAB_0012b6b2: XOR EBX,EBX LAB_0012b6b4: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0012b6f1 MOV RAX,RBX ADD RSP,0x228 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012b6d8: MOV RAX,qword ptr [RBP + -0x248] MOV dword ptr [RAX],R14D LEA RAX,[RBP + -0x240] SUB RSI,RAX ADD RBX,RSI JMP 0x0012b6b4 LAB_0012b6f1: CALL 0x00124350
long my_open_parent_dir_nosymlinks(long param_1,int *param_2) { short *psVar1; int iVar2; short *psVar3; int *piVar4; long lVar5; int __fd; short *psVar6; short *__file; long in_FS_OFFSET; int1 local_248 [2]; int1 local_246 [526]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); psVar3 = (short *)strnmov(local_248,param_1,0x201); if ((char)*psVar3 == '\0') { if (local_248[0] == '/') { __fd = -1; if (local_248[1] != '/') { psVar1 = (short *)(local_248 + 1); __file = (short *)local_248; __fd = -1; do { while ((psVar6 = (short *)((long)psVar1 + 1), local_248[1] != '\0' && (local_248[1] != '/'))) { psVar1 = psVar6; local_248[1] = *(char *)psVar6; } *(char *)psVar1 = '\0'; if ((*__file == 0x2e) || ((char)__file[1] == '\0' && *__file == 0x2e2e)) break; if (psVar3 <= psVar6) { *param_2 = __fd; lVar5 = (long)__file + (param_1 - (long)local_248); goto LAB_0012b6b4; } iVar2 = openat64(__fd,(char *)__file,0x2a0000); if (iVar2 < 0) goto LAB_0012b6a5; if (-1 < __fd) { close(__fd); } local_248[1] = *(char *)psVar6; __fd = iVar2; psVar1 = psVar6; __file = psVar6; } while (local_248[1] != '/'); } piVar4 = __errno_location(); *piVar4 = 2; LAB_0012b6a5: if (-1 < __fd) { close(__fd); } } else { piVar4 = __errno_location(); *piVar4 = 2; } } else { piVar4 = __errno_location(); *piVar4 = 0x24; } lVar5 = 0; LAB_0012b6b4: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return lVar5; }
40,156
wstr_to_str
eloqsql/strings/ctype-uca.c
static void wstr_to_str(char *str, size_t length, my_wc_t *wc, size_t wlength) { const char *end= str + length; char *s; size_t i, rem; for (s= str, i= 0; (rem= (end - s)) > 0 && i < wlength; i++) { if ((wc[i] >= '0' && wc[i] <= '9') || (wc[i] >= 'a' && wc[i] <= 'z') || (wc[i] >= 'A' && wc[i] <= 'Z')) s+= my_snprintf(s, rem, "%c", (int) wc[i]); else s+= my_snprintf(s, rem, "\\u%04X", (int) wc[i]); } }
O0
c
wstr_to_str: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x38(%rbp) movq -0x28(%rbp), %rcx movq -0x30(%rbp), %rax subq %rax, %rcx movq %rcx, -0x40(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movb %al, -0x41(%rbp) jbe 0x6557c movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax setb %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x65588 jmp 0x6564f movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx cmpq $0x30, (%rax,%rcx,8) jb 0x655a6 movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx cmpq $0x39, (%rax,%rcx,8) jbe 0x655e2 movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx cmpq $0x61, (%rax,%rcx,8) jb 0x655c4 movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx cmpq $0x7a, (%rax,%rcx,8) jbe 0x655e2 movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx cmpq $0x41, (%rax,%rcx,8) jb 0x65610 movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx cmpq $0x5a, (%rax,%rcx,8) ja 0x65610 movq -0x30(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx movq (%rax,%rcx,8), %rax movl %eax, %ecx leaq 0x2d5a6(%rip), %rdx # 0x92ba5 movb $0x0, %al callq 0x8b070 addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x6563c movq -0x30(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x18(%rbp), %rax movq -0x38(%rbp), %rcx movq (%rax,%rcx,8), %rax movl %eax, %ecx leaq 0x2d57b(%rip), %rdx # 0x92ba8 movb $0x0, %al callq 0x8b070 addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x6563e movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x65554 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
wstr_to_str: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_8] mov [rbp+var_30], rax mov [rbp+var_38], 0 loc_65554: mov rcx, [rbp+var_28] mov rax, [rbp+var_30] sub rcx, rax mov [rbp+var_40], rcx xor eax, eax cmp rcx, 0 mov [rbp+var_41], al jbe short loc_6557C mov rax, [rbp+var_38] cmp rax, [rbp+var_20] setb al mov [rbp+var_41], al loc_6557C: mov al, [rbp+var_41] test al, 1 jnz short loc_65588 jmp loc_6564F loc_65588: mov rax, [rbp+var_18] mov rcx, [rbp+var_38] cmp qword ptr [rax+rcx*8], 30h ; '0' jb short loc_655A6 mov rax, [rbp+var_18] mov rcx, [rbp+var_38] cmp qword ptr [rax+rcx*8], 39h ; '9' jbe short loc_655E2 loc_655A6: mov rax, [rbp+var_18] mov rcx, [rbp+var_38] cmp qword ptr [rax+rcx*8], 61h ; 'a' jb short loc_655C4 mov rax, [rbp+var_18] mov rcx, [rbp+var_38] cmp qword ptr [rax+rcx*8], 7Ah ; 'z' jbe short loc_655E2 loc_655C4: mov rax, [rbp+var_18] mov rcx, [rbp+var_38] cmp qword ptr [rax+rcx*8], 41h ; 'A' jb short loc_65610 mov rax, [rbp+var_18] mov rcx, [rbp+var_38] cmp qword ptr [rax+rcx*8], 5Ah ; 'Z' ja short loc_65610 loc_655E2: mov rdi, [rbp+var_30] mov rsi, [rbp+var_40] mov rax, [rbp+var_18] mov rcx, [rbp+var_38] mov rax, [rax+rcx*8] mov ecx, eax lea rdx, aC; "%c" mov al, 0 call my_snprintf add rax, [rbp+var_30] mov [rbp+var_30], rax jmp short loc_6563C loc_65610: mov rdi, [rbp+var_30] mov rsi, [rbp+var_40] mov rax, [rbp+var_18] mov rcx, [rbp+var_38] mov rax, [rax+rcx*8] mov ecx, eax lea rdx, aU04x; "\\u%04X" mov al, 0 call my_snprintf add rax, [rbp+var_30] mov [rbp+var_30], rax loc_6563C: jmp short $+2 loc_6563E: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp loc_65554 loc_6564F: add rsp, 50h pop rbp retn
bool wstr_to_str(long long a1, long long a2, long long a3, unsigned long long a4, int a5, int a6) { bool result; // al bool v7; // [rsp+Fh] [rbp-41h] int v8; // [rsp+10h] [rbp-40h] unsigned long long i; // [rsp+18h] [rbp-38h] long long v10; // [rsp+20h] [rbp-30h] long long v11; // [rsp+28h] [rbp-28h] v11 = a2 + a1; v10 = a1; for ( i = 0LL; ; ++i ) { v8 = v11 - v10; v7 = 0; if ( v11 != v10 ) v7 = i < a4; result = v7; if ( !v7 ) break; if ( (*(_QWORD *)(a3 + 8 * i) < 0x30uLL || *(_QWORD *)(a3 + 8 * i) > 0x39uLL) && (*(_QWORD *)(a3 + 8 * i) < 0x61uLL || *(_QWORD *)(a3 + 8 * i) > 0x7AuLL) && (*(_QWORD *)(a3 + 8 * i) < 0x41uLL || *(_QWORD *)(a3 + 8 * i) > 0x5AuLL) ) { v10 += my_snprintf(v10, v8, (unsigned int)"\\u%04X", *(_QWORD *)(a3 + 8 * i), a5, a6); } else { v10 += my_snprintf(v10, v8, (unsigned int)"%c", *(_QWORD *)(a3 + 8 * i), a5, a6); } } return result; }
wstr_to_str: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x38],0x0 LAB_00165554: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] SUB RCX,RAX MOV qword ptr [RBP + -0x40],RCX XOR EAX,EAX CMP RCX,0x0 MOV byte ptr [RBP + -0x41],AL JBE 0x0016557c MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] SETC AL MOV byte ptr [RBP + -0x41],AL LAB_0016557c: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x00165588 JMP 0x0016564f LAB_00165588: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + RCX*0x8],0x30 JC 0x001655a6 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + RCX*0x8],0x39 JBE 0x001655e2 LAB_001655a6: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + RCX*0x8],0x61 JC 0x001655c4 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + RCX*0x8],0x7a JBE 0x001655e2 LAB_001655c4: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + RCX*0x8],0x41 JC 0x00165610 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] CMP qword ptr [RAX + RCX*0x8],0x5a JA 0x00165610 LAB_001655e2: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,EAX LEA RDX,[0x192ba5] MOV AL,0x0 CALL 0x0018b070 ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX JMP 0x0016563c LAB_00165610: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,EAX LEA RDX,[0x192ba8] MOV AL,0x0 CALL 0x0018b070 ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX LAB_0016563c: JMP 0x0016563e LAB_0016563e: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x00165554 LAB_0016564f: ADD RSP,0x50 POP RBP RET
void wstr_to_str(long param_1,long param_2,long param_3,ulong param_4) { long lVar1; ulong local_40; long local_38; local_40 = 0; for (local_38 = param_1; lVar1 = (param_1 + param_2) - local_38, lVar1 != 0 && local_40 < param_4; local_38 = lVar1 + local_38) { if ((((*(ulong *)(param_3 + local_40 * 8) < 0x30) || (0x39 < *(ulong *)(param_3 + local_40 * 8)) ) && ((*(ulong *)(param_3 + local_40 * 8) < 0x61 || (0x7a < *(ulong *)(param_3 + local_40 * 8))))) && ((*(ulong *)(param_3 + local_40 * 8) < 0x41 || (0x5a < *(ulong *)(param_3 + local_40 * 8))))) { lVar1 = my_snprintf(local_38,lVar1,"\\u%04X",*(ulong *)(param_3 + local_40 * 8) & 0xffffffff); } else { lVar1 = my_snprintf(local_38,lVar1,&DAT_00192ba5, *(ulong *)(param_3 + local_40 * 8) & 0xffffffff); } local_40 = local_40 + 1; } return; }
40,157
js_os_close
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_close(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { int fd, ret; if (JS_ToInt32(ctx, &fd, argv[0])) return JS_EXCEPTION; ret = js_get_errno(close(fd)); return JS_NewInt32(ctx, ret); }
O0
c
js_os_close: subq $0x68, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0xc(%rsp), %rsi callq 0x38f20 cmpl $0x0, %eax je 0x17c9f movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x17ceb movl 0xc(%rsp), %edi callq 0xe3a0 movslq %eax, %rdi callq 0x13a50 movl %eax, 0x8(%rsp) movq 0x20(%rsp), %rcx movl 0x8(%rsp), %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax movl %eax, 0x58(%rsp) movq $0x0, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x38(%rsp) movq %rax, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x68, %rsp retq nopw (%rax,%rax)
js_os_close: sub rsp, 68h mov [rsp+68h+var_40], rsi mov [rsp+68h+var_38], rdx mov [rsp+68h+var_48], rdi mov [rsp+68h+var_4C], ecx mov [rsp+68h+var_58], r8 mov rdi, [rsp+68h+var_48] mov rax, [rsp+68h+var_58] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+68h+var_5C] call JS_ToInt32 cmp eax, 0 jz short loc_17C9F mov dword ptr [rsp+68h+var_30], 0 mov [rsp+68h+var_28], 6 jmp short loc_17CEB loc_17C9F: mov edi, [rsp+68h+var_5C] call _close movsxd rdi, eax call js_get_errno mov [rsp+68h+var_60], eax mov rcx, [rsp+68h+var_48] mov eax, [rsp+68h+var_60] mov [rsp+68h+var_18], rcx mov [rsp+68h+var_1C], eax mov eax, [rsp+68h+var_1C] mov dword ptr [rsp+68h+var_10], eax mov [rsp+68h+var_8], 0 mov rcx, [rsp+68h+var_10] mov rax, [rsp+68h+var_8] mov [rsp+68h+var_30], rcx mov [rsp+68h+var_28], rax loc_17CEB: mov rax, [rsp+68h+var_30] mov rdx, [rsp+68h+var_28] add rsp, 68h retn
long long js_os_close(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { int v5; // eax int errno; // [rsp+8h] [rbp-60h] unsigned int v8; // [rsp+Ch] [rbp-5Ch] BYREF _QWORD *v9; // [rsp+10h] [rbp-58h] int v10; // [rsp+1Ch] [rbp-4Ch] long long v11; // [rsp+20h] [rbp-48h] long long v12; // [rsp+28h] [rbp-40h] long long v13; // [rsp+30h] [rbp-38h] long long v14; // [rsp+38h] [rbp-30h] long long v15; // [rsp+40h] [rbp-28h] int v16; // [rsp+4Ch] [rbp-1Ch] long long v17; // [rsp+50h] [rbp-18h] long long v18; // [rsp+58h] [rbp-10h] long long v19; // [rsp+60h] [rbp-8h] v12 = a2; v13 = a3; v11 = a1; v10 = a4; v9 = a5; if ( (unsigned int)JS_ToInt32(a1, &v8, *a5, a5[1]) ) { LODWORD(v14) = 0; v15 = 6LL; } else { v5 = close(v8); errno = js_get_errno(v5); v17 = v11; v16 = errno; LODWORD(v18) = errno; v19 = 0LL; v14 = v18; v15 = 0LL; } return v14; }
js_os_close: SUB RSP,0x68 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0xc] CALL 0x00138f20 CMP EAX,0x0 JZ 0x00117c9f MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x00117ceb LAB_00117c9f: MOV EDI,dword ptr [RSP + 0xc] CALL 0x0010e3a0 MOVSXD RDI,EAX CALL 0x00113a50 MOV dword ptr [RSP + 0x8],EAX MOV RCX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],0x0 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RAX LAB_00117ceb: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x68 RET
int1 [16] js_os_close(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int iVar2; int local_5c; int8 *local_58; int4 local_4c; int8 local_48; int8 local_40; int8 local_38; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; local_58 = param_5; local_4c = param_4; local_48 = param_1; local_40 = param_2; local_38 = param_3; iVar2 = JS_ToInt32(param_1,&local_5c,*param_5,param_5[1]); if (iVar2 == 0) { iVar2 = close(local_5c); local_30 = js_get_errno((long)iVar2); uStack_2c = uStack_c; local_28 = 0; } else { local_30 = 0; local_28 = 6; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
40,158
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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_array(unsigned long)
hkr04[P]cpp-mcp/common/json.hpp
bool start_array(std::size_t len) { ref_stack.push_back(handle_value(BasicJsonType::value_t::array)); if (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 array size: ", std::to_string(len)), ref_stack.back())); } return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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_array(unsigned long): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq 0x90(%rsp), %rdi movq %rdi, 0x18(%rsp) movq %rdi, %rax addq $0x8, %rax movq %rax, 0x20(%rsp) movb $0x2, 0x7f(%rsp) leaq 0x7f(%rsp), %rsi callq 0xcd3d0 movq 0x20(%rsp), %rdi movq %rax, 0x80(%rsp) leaq 0x80(%rsp), %rsi callq 0xcd3a0 xorl %eax, %eax cmpq $-0x1, 0x88(%rsp) movb %al, 0x2a(%rsp) je 0xcd0bf movq 0x18(%rsp), %rdi movq 0x88(%rsp), %rax movq %rax, 0x10(%rsp) addq $0x8, %rdi callq 0xc7170 movq (%rax), %rdi callq 0xc71b0 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax seta %al movb %al, 0x2a(%rsp) movb 0x2a(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xcd0d0 jmp 0xcd1ad movb $0x1, 0x2b(%rsp) movl $0x20, %edi callq 0xc440 movq %rax, 0x8(%rsp) movq 0x88(%rsp), %rsi leaq 0x38(%rsp), %rdi callq 0x25950 jmp 0xcd0f8 leaq 0x1df49(%rip), %rsi # 0xeb048 leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rdx callq 0xc9fc0 jmp 0xcd110 movq 0x18(%rsp), %rdi addq $0x8, %rdi callq 0xc7170 movq 0x8(%rsp), %rdi movq (%rax), %rcx movl $0x198, %esi # imm = 0x198 leaq 0x58(%rsp), %rdx callq 0xc7230 jmp 0xcd137 movq 0x8(%rsp), %rdi movb $0x0, 0x2b(%rsp) leaq 0x70870(%rip), %rsi # 0x13d9b8 leaq -0x67df(%rip), %rdx # 0xc6970 callq 0xcdc0 jmp 0xcd1c3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xcd198 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xcd18e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x58(%rsp), %rdi callq 0xcfd0 leaq 0x38(%rsp), %rdi callq 0xcfd0 testb $0x1, 0x2b(%rsp) jne 0xcd1a1 jmp 0xcd1ab movq 0x8(%rsp), %rdi callq 0xc670 jmp 0xcd1b9 movb $0x1, %al andb $0x1, %al addq $0x98, %rsp retq movq 0x30(%rsp), %rdi callq 0xce40 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE11start_arrayEm: sub rsp, 98h mov qword ptr [rsp+98h+var_8], rdi; char mov [rsp+98h+var_10], rsi; int mov rdi, qword ptr [rsp+98h+var_8] mov qword ptr [rsp+98h+var_80], rdi; char mov rax, rdi add rax, 8 mov qword ptr [rsp+98h+var_78], rax; int mov [rsp+98h+var_19], 2 lea rsi, [rsp+98h+var_19] call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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 &&) mov rdi, qword ptr [rsp+98h+var_78] mov qword ptr [rsp+98h+var_18], rax; int lea rsi, [rsp+98h+var_18] call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backEOSE_; 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> *&&) xor eax, eax cmp [rsp+98h+var_10], 0FFFFFFFFFFFFFFFFh mov [rsp+98h+var_6E], al jz short loc_CD0BF mov rdi, qword ptr [rsp+98h+var_80] mov rax, [rsp+98h+var_10] mov qword ptr [rsp+98h+var_88], 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+98h+var_88] cmp rax, rcx setnbe al mov [rsp+98h+var_6E], al loc_CD0BF: mov al, [rsp+98h+var_6E] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_CD0D0 jmp loc_CD1AD loc_CD0D0: mov [rsp+98h+var_6D], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+98h+var_90], rax; int mov rsi, [rsp+98h+var_10]; unsigned __int64 lea rdi, [rsp+98h+var_60]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) jmp short $+2 loc_CD0F8: lea rsi, aExcessiveArray; "excessive array size: " lea rdi, [rsp+98h+var_40] lea rdx, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA23_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>(char const(&)[23],std::string &&) jmp short $+2 loc_CD110: mov rdi, qword ptr [rsp+98h+var_80] 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+98h+var_90]; int mov rcx, [rax] mov esi, 198h lea rdx, [rsp+98h+var_40] 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_CD137: mov rdi, [rsp+98h+var_90]; void * mov [rsp+98h+var_6D], 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_CD1C3 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_CD198 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_CD18E 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_CD18E: lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_CD198: test [rsp+arg_23], 1 jnz short loc_CD1A1 jmp short loc_CD1AB loc_CD1A1: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_CD1AB: jmp short loc_CD1B9 loc_CD1AD: mov al, 1 and al, 1 add rsp, 98h retn loc_CD1B9: mov rdi, [rsp+arg_28] call __Unwind_Resume loc_CD1C3: nop word ptr [rax+rax+00000000h] nop dword ptr [rax]
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::start_array( long long a1, unsigned long long a2) { long long *v2; // rax long long *v3; // rax nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // [rsp+8h] [rbp-90h] unsigned long long v6; // [rsp+10h] [rbp-88h] bool v7; // [rsp+2Ah] [rbp-6Eh] _BYTE v8[32]; // [rsp+38h] [rbp-60h] BYREF _BYTE v9[39]; // [rsp+58h] [rbp-40h] BYREF char v10; // [rsp+7Fh] [rbp-19h] BYREF int v11[2]; // [rsp+80h] [rbp-18h] BYREF unsigned long long v12; // [rsp+88h] [rbp-10h] char v13[8]; // [rsp+90h] [rbp-8h] *(_QWORD *)v13 = a1; v12 = a2; v10 = 2; *(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>( a1, &v10); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::push_back( a1 + 8, v11); v7 = 0; if ( v12 != -1LL ) { v6 = v12; v2 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8); v7 = v6 > 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>::max_size(*v2); } if ( v7 ) { exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::to_string((std::__cxx11 *)v8, v12); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[23],std::string>( (long long)v9, (long long)"excessive array size: ", (nlohmann::json_abi_v3_11_3::detail *)v8); v3 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 408LL, (long long)v9, *v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } return 1; }
start_array: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV RDI,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI ADD RAX,0x8 MOV qword ptr [RSP + 0x20],RAX MOV byte ptr [RSP + 0x7f],0x2 LEA RSI,[RSP + 0x7f] CALL 0x001cd3d0 MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x80],RAX LEA RSI,[RSP + 0x80] CALL 0x001cd3a0 XOR EAX,EAX CMP qword ptr [RSP + 0x88],-0x1 MOV byte ptr [RSP + 0x2a],AL JZ 0x001cd0bf MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x10],RAX ADD RDI,0x8 CALL 0x001c7170 MOV RDI,qword ptr [RAX] CALL 0x001c71b0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,RCX SETA AL MOV byte ptr [RSP + 0x2a],AL LAB_001cd0bf: MOV AL,byte ptr [RSP + 0x2a] XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001cd0d0 JMP 0x001cd1ad LAB_001cd0d0: MOV byte ptr [RSP + 0x2b],0x1 MOV EDI,0x20 CALL 0x0010c440 MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP + 0x88] LAB_001cd0ec: LEA RDI,[RSP + 0x38] CALL 0x00125950 JMP 0x001cd0f8 LAB_001cd0f8: LEA RSI,[0x1eb048] LEA RDI,[RSP + 0x58] LEA RDX,[RSP + 0x38] CALL 0x001c9fc0 JMP 0x001cd110 LAB_001cd110: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001c7170 MOV RDI,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] LAB_001cd126: MOV ESI,0x198 LEA RDX,[RSP + 0x58] CALL 0x001c7230 JMP 0x001cd137 LAB_001cd137: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x2b],0x0 LEA RSI,[0x23d9b8] LEA RDX,[0x1c6970] CALL 0x0010cdc0 LAB_001cd1ad: MOV AL,0x1 AND AL,0x1 ADD RSP,0x98 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_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_array(unsigned long) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_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_array(json_sax_dom_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; int8 *puVar3; ulong uVar4; int7 uVar6; int8 uVar5; __cxx11 local_60 [32]; detail local_40 [39]; value_t local_19; basic_json *local_18; ulong local_10; json_sax_dom_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_19 = 2; local_10 = param_1; local_8 = this; local_18 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_19); 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_18); uVar2 = local_10; uVar6 = 0; bVar1 = false; if (local_10 != 0xffffffffffffffff) { puVar3 = (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)); uVar4 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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> *)*puVar3); bVar1 = uVar4 < uVar2; uVar6 = (int7)(uVar2 >> 8); } if (!bVar1) { return CONCAT71(uVar6,1); } uVar5 = __cxa_allocate_exception(0x20); /* try { // try from 001cd0ec to 001cd0f5 has its CatchHandler @ 001cd156 */ std::__cxx11::to_string(local_60,local_10); /* try { // try from 001cd0f8 to 001cd10d has its CatchHandler @ 001cd166 */ concat<std::__cxx11::string,char_const(&)[23],std::__cxx11::string> (local_40,"excessive array size: ",(string *)local_60); puVar3 = (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 001cd126 to 001cd153 has its CatchHandler @ 001cd176 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar5,0x198,local_40,*puVar3); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&out_of_range::typeinfo,out_of_range::~out_of_range); }
40,159
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [7], 0>(char const (&) [7]) const
monkey531[P]llama/common/json.hpp
constexpr bool is_object() const noexcept { return m_data.m_type == value_t::object; }
O1
cpp
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [7], 0>(char const (&) [7]) const: cmpb $0x1, (%rdi) jne 0xc596e pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x8(%rdi), %r12 movq (%r12), %r15 movq 0x8(%r12), %rax cmpq %rax, %r15 je 0xc5974 movq %rsi, %r14 movq %r15, %rdi movq %r14, %rsi callq 0x1b220 testl %eax, %eax je 0xc5971 addq $0x30, %r15 movq 0x8(%r12), %rax cmpq %rax, %r15 jne 0xc594f jmp 0xc5974 xorl %eax, %eax retq movq %r15, %rax movq 0x8(%rbx), %rcx cmpq 0x8(%rcx), %rax setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: cmp byte ptr [rdi], 1 jnz short loc_C596E push r15 push r14 push r12 push rbx push rax mov rbx, rdi mov r12, [rdi+8] mov r15, [r12] mov rax, [r12+8] cmp r15, rax jz short loc_C5974 mov r14, rsi loc_C594F: mov rdi, r15 mov rsi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_C5971 add r15, 30h ; '0' mov rax, [r12+8] cmp r15, rax jnz short loc_C594F jmp short loc_C5974 loc_C596E: xor eax, eax retn loc_C5971: mov rax, r15 loc_C5974: mov rcx, [rbx+8] cmp rax, [rcx+8] setnz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( long long a1, long long a2) { long long *v2; // r12 long long v3; // r15 long long v4; // rax if ( *(_BYTE *)a1 != 1 ) return 0; v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } v4 = v3; } return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: CMP byte ptr [RDI],0x1 JNZ 0x001c596e PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R12,qword ptr [RDI + 0x8] MOV R15,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP R15,RAX JZ 0x001c5974 MOV R14,RSI LAB_001c594f: MOV RDI,R15 MOV RSI,R14 CALL 0x0011b220 TEST EAX,EAX JZ 0x001c5971 ADD R15,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP R15,RAX JNZ 0x001c594f JMP 0x001c5974 LAB_001c596e: XOR EAX,EAX RET LAB_001c5971: MOV RAX,R15 LAB_001c5974: MOV RCX,qword ptr [RBX + 0x8] CMP RAX,qword ptr [RCX + 0x8] SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int8 _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA9_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (char *param_1) { long *plVar1; int iVar2; char *pcVar3; char *pcVar4; if (*param_1 != '\x01') { return 0; } plVar1 = *(long **)(param_1 + 8); pcVar3 = (char *)plVar1[1]; pcVar4 = (char *)*plVar1; if ((char *)*plVar1 != pcVar3) { do { pcVar3 = pcVar4; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar4 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar4 != pcVar3); } return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != *(char **)(*(long *)(param_1 + 8) + 8)); }
40,160
ma_delete_block_record
eloqsql/storage/maria/ma_blockrec.c
my_bool _ma_delete_block_record(MARIA_HA *info, const uchar *record) { pgcache_page_no_t page; uint record_number; MARIA_SHARE *share= info->s; LSN lsn= LSN_IMPOSSIBLE; DBUG_ENTER("_ma_delete_block_record"); page= ma_recordpos_to_page(info->cur_row.lastpos); record_number= ma_recordpos_to_dir_entry(info->cur_row.lastpos); DBUG_PRINT("enter", ("rowid: %lu (%lu:%u)", (ulong) info->cur_row.lastpos, (ulong) page, record_number)); _ma_bitmap_flushable(info, 1); if (delete_head_or_tail(info, page, record_number, 1, 0) || delete_tails(info, info->cur_row.tail_positions)) goto err; if (info->cur_row.extents_count && free_full_pages(info, &info->cur_row)) goto err; if (share->now_transactional) { uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + PAGE_STORE_SIZE + DIRPOS_STORE_SIZE + 2 + PAGERANGE_STORE_SIZE + HA_CHECKSUM_STORE_SIZE]; uchar *log_pos; size_t row_length; uint row_parts_count, extents_length; ha_checksum checksum_delta; /* Write UNDO record */ lsn_store(log_data, info->trn->undo_lsn); page_store(log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE, page); log_pos= log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE + PAGE_STORE_SIZE; dirpos_store(log_pos, record_number); log_pos+= DIRPOS_STORE_SIZE; int2store(log_pos, info->cur_row.head_length - info->cur_row.header_length); log_pos+= 2; pagerange_store(log_pos, info->cur_row.extents_count); log_pos+= PAGERANGE_STORE_SIZE; info->log_row_parts[TRANSLOG_INTERNAL_PARTS].str= log_data; info->log_row_parts[TRANSLOG_INTERNAL_PARTS].length= sizeof(log_data) - HA_CHECKSUM_STORE_SIZE; store_checksum_in_rec(share, checksum_delta, (ha_checksum) 0 - info->cur_row.checksum, log_pos, info->log_row_parts[TRANSLOG_INTERNAL_PARTS + 0].length); info->log_row_parts[TRANSLOG_INTERNAL_PARTS+1].str= info->cur_row.extents; info->log_row_parts[TRANSLOG_INTERNAL_PARTS+1].length= extents_length= info->cur_row.extents_count * ROW_EXTENT_SIZE; row_length= fill_insert_undo_parts(info, record, (info->log_row_parts + TRANSLOG_INTERNAL_PARTS + 2), &row_parts_count); if (translog_write_record(&lsn, LOGREC_UNDO_ROW_DELETE, info->trn, info, (translog_size_t) (info->log_row_parts[TRANSLOG_INTERNAL_PARTS + 0].length + row_length + extents_length), TRANSLOG_INTERNAL_PARTS + 2 + row_parts_count, info->log_row_parts, log_data + LSN_STORE_SIZE, &checksum_delta)) goto err; } _ma_bitmap_flushable(info, -1); _ma_unpin_all_pages_and_finalize_row(info, lsn); DBUG_RETURN(0); err: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_bitmap_flushable(info, -1); _ma_unpin_all_pages_and_finalize_row(info, LSN_IMPOSSIBLE); DBUG_RETURN(1); }
O0
c
ma_delete_block_record: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x30(%rbp) movq %rsi, -0x38(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq $0x0, -0x58(%rbp) movq -0x30(%rbp), %rax movq 0x98(%rax), %rdi callq 0x58540 movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax movq 0x98(%rax), %rdi callq 0x58560 movl %eax, -0x44(%rbp) jmp 0x58e0c movq -0x30(%rbp), %rdi movl $0x1, %esi callq 0x66170 movq -0x30(%rbp), %rdi movq -0x40(%rbp), %rsi movl -0x44(%rbp), %edx movl $0x1, %ecx xorl %r8d, %r8d callq 0x581a0 movsbl %al, %eax cmpl $0x0, %eax jne 0x58e56 movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rax movq 0xa8(%rax), %rsi callq 0x591a0 movsbl %al, %eax cmpl $0x0, %eax je 0x58e5b jmp 0x59149 movq -0x30(%rbp), %rax cmpl $0x0, 0x12c(%rax) je 0x58e89 movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rsi addq $0x80, %rsi callq 0x59230 movsbl %al, %eax cmpl $0x0, %eax je 0x58e89 jmp 0x59149 movq -0x50(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x59128 jmp 0x58e9c jmp 0x58e9e movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq 0x98(%rax), %rax sarq $0x20, %rax movb %al, -0x20(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq 0x98(%rax), %rax sarq $0x20, %rax shrl $0x8, %eax movb %al, -0x1f(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq 0x98(%rax), %rax sarq $0x20, %rax shrl $0x10, %eax movb %al, -0x1e(%rbp) jmp 0x58ee8 leaq -0x20(%rbp), %rax addq $0x3, %rax movq %rax, -0x80(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rcx movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq 0x98(%rcx), %rax movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, (%rax) jmp 0x58f17 jmp 0x58f19 leaq -0x20(%rbp), %rax addq $0x7, %rax addq $0x2, %rax movq %rax, -0x88(%rbp) movq -0x40(%rbp), %rax movl %eax, %ecx movq -0x88(%rbp), %rax movl %ecx, (%rax) movq -0x40(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x88(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x20(%rbp), %rax addq $0x7, %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0x60(%rbp) movl -0x44(%rbp), %eax movb %al, %cl movq -0x60(%rbp), %rax movb %cl, (%rax) movq -0x60(%rbp), %rax addq $0x1, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x30(%rbp), %rax movl 0x120(%rax), %eax movq -0x30(%rbp), %rcx subl 0x124(%rcx), %eax movw %ax, %cx movq -0x90(%rbp), %rax movw %cx, (%rax) movq -0x60(%rbp), %rax addq $0x2, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x30(%rbp), %rax movl 0x12c(%rax), %eax movw %ax, %cx movq -0x98(%rbp), %rax movw %cx, (%rax) movq -0x60(%rbp), %rax addq $0x2, %rax movq %rax, -0x60(%rbp) leaq -0x20(%rbp), %rcx movq -0x30(%rbp), %rax movq 0x318(%rax), %rax movq %rcx, 0x20(%rax) movq -0x30(%rbp), %rax movq 0x318(%rax), %rax movq $0x13, 0x28(%rax) movl $0x0, -0x74(%rbp) movq -0x50(%rbp), %rax cmpq $0x0, 0x6a8(%rax) je 0x59058 movq -0x30(%rbp), %rcx xorl %eax, %eax subl 0xb0(%rcx), %eax movl %eax, -0x74(%rbp) movq -0x60(%rbp), %rax movq %rax, -0xa0(%rbp) movl -0x74(%rbp), %ecx movq -0xa0(%rbp), %rax movl %ecx, (%rax) movq -0x30(%rbp), %rax movq 0x318(%rax), %rax movq 0x28(%rax), %rcx addq $0x4, %rcx movq %rcx, 0x28(%rax) jmp 0x5905a movq -0x30(%rbp), %rax movq 0x90(%rax), %rcx movq -0x30(%rbp), %rax movq 0x318(%rax), %rax movq %rcx, 0x30(%rax) movq -0x30(%rbp), %rax imull $0x7, 0x12c(%rax), %eax movl %eax, -0x70(%rbp) movl %eax, %eax movl %eax, %ecx movq -0x30(%rbp), %rax movq 0x318(%rax), %rax movq %rcx, 0x38(%rax) movq -0x30(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x30(%rbp), %rax movq 0x318(%rax), %rdx addq $0x20, %rdx addq $0x20, %rdx leaq -0x6c(%rbp), %rcx callq 0x59600 movq %rax, -0x68(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rdx movq -0x30(%rbp), %rcx movq -0x30(%rbp), %rax movq 0x318(%rax), %rax movq 0x28(%rax), %rax addq -0x68(%rbp), %rax movl -0x70(%rbp), %esi addq %rsi, %rax movl %eax, %r8d movl -0x6c(%rbp), %r9d addl $0x4, %r9d movq -0x30(%rbp), %rax movq 0x318(%rax), %r11 leaq -0x20(%rbp), %r10 addq $0x7, %r10 leaq -0x58(%rbp), %rdi movl $0x13, %esi leaq -0x74(%rbp), %rax movq %r11, (%rsp) movq %r10, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x33e80 cmpb $0x0, %al je 0x59126 jmp 0x59149 jmp 0x59128 movq -0x30(%rbp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x66170 movq -0x30(%rbp), %rdi movq -0x58(%rbp), %rsi callq 0x587b0 movb $0x0, -0x21(%rbp) jmp 0x5916c jmp 0x5914b jmp 0x5914d movq -0x30(%rbp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x66170 movq -0x30(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x587b0 movb $0x1, -0x21(%rbp) movb -0x21(%rbp), %al movb %al, -0xa1(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x59196 movb -0xa1(%rbp), %al addq $0xc0, %rsp popq %rbp retq callq 0x2a270 nopl (%rax,%rax)
_ma_delete_block_record: push rbp mov rbp, rsp sub rsp, 0C0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_30], rdi mov [rbp+var_38], rsi mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_50], rax mov [rbp+var_58], 0 mov rax, [rbp+var_30] mov rdi, [rax+98h] call ma_recordpos_to_page mov [rbp+var_40], rax mov rax, [rbp+var_30] mov rdi, [rax+98h] call ma_recordpos_to_dir_entry mov [rbp+var_44], eax jmp short $+2 loc_58E0C: mov rdi, [rbp+var_30] mov esi, 1 call _ma_bitmap_flushable mov rdi, [rbp+var_30] mov rsi, [rbp+var_40] mov edx, [rbp+var_44] mov ecx, 1 xor r8d, r8d call delete_head_or_tail movsx eax, al cmp eax, 0 jnz short loc_58E56 mov rdi, [rbp+var_30] mov rax, [rbp+var_30] mov rsi, [rax+0A8h] call delete_tails movsx eax, al cmp eax, 0 jz short loc_58E5B loc_58E56: jmp loc_59149 loc_58E5B: mov rax, [rbp+var_30] cmp dword ptr [rax+12Ch], 0 jz short loc_58E89 mov rdi, [rbp+var_30] mov rsi, [rbp+var_30] add rsi, 80h call free_full_pages movsx eax, al cmp eax, 0 jz short loc_58E89 jmp loc_59149 loc_58E89: mov rax, [rbp+var_50] cmp byte ptr [rax+7E7h], 0 jz loc_59128 jmp short $+2 loc_58E9C: jmp short $+2 loc_58E9E: mov rax, [rbp+var_30] mov rax, [rax+8] mov rax, [rax+98h] sar rax, 20h mov [rbp+var_20], al mov rax, [rbp+var_30] mov rax, [rax+8] mov rax, [rax+98h] sar rax, 20h shr eax, 8 mov [rbp+var_1F], al mov rax, [rbp+var_30] mov rax, [rax+8] mov rax, [rax+98h] sar rax, 20h shr eax, 10h mov [rbp+var_1E], al jmp short $+2 loc_58EE8: lea rax, [rbp+var_20] add rax, 3 mov [rbp+var_80], rax mov rax, [rbp+var_30] mov rcx, [rax+8] mov rax, 0FFFFFFFFh and rax, [rcx+98h] mov ecx, eax mov rax, [rbp+var_80] mov [rax], ecx jmp short $+2 loc_58F17: jmp short $+2 loc_58F19: lea rax, [rbp+var_20] add rax, 7 add rax, 2 mov [rbp+var_88], rax mov rax, [rbp+var_40] mov ecx, eax mov rax, [rbp+var_88] mov [rax], ecx mov rax, [rbp+var_40] shr rax, 20h mov cl, al mov rax, [rbp+var_88] mov [rax+4], cl lea rax, [rbp+var_20] add rax, 7 add rax, 2 add rax, 5 mov [rbp+var_60], rax mov eax, [rbp+var_44] mov cl, al mov rax, [rbp+var_60] mov [rax], cl mov rax, [rbp+var_60] add rax, 1 mov [rbp+var_60], rax mov rax, [rbp+var_60] mov [rbp+var_90], rax mov rax, [rbp+var_30] mov eax, [rax+120h] mov rcx, [rbp+var_30] sub eax, [rcx+124h] mov cx, ax mov rax, [rbp+var_90] mov [rax], cx mov rax, [rbp+var_60] add rax, 2 mov [rbp+var_60], rax mov rax, [rbp+var_60] mov [rbp+var_98], rax mov rax, [rbp+var_30] mov eax, [rax+12Ch] mov cx, ax mov rax, [rbp+var_98] mov [rax], cx mov rax, [rbp+var_60] add rax, 2 mov [rbp+var_60], rax lea rcx, [rbp+var_20] mov rax, [rbp+var_30] mov rax, [rax+318h] mov [rax+20h], rcx mov rax, [rbp+var_30] mov rax, [rax+318h] mov qword ptr [rax+28h], 13h mov [rbp+var_74], 0 mov rax, [rbp+var_50] cmp qword ptr [rax+6A8h], 0 jz short loc_59058 mov rcx, [rbp+var_30] xor eax, eax sub eax, [rcx+0B0h] mov [rbp+var_74], eax mov rax, [rbp+var_60] mov [rbp+var_A0], rax mov ecx, [rbp+var_74] mov rax, [rbp+var_A0] mov [rax], ecx mov rax, [rbp+var_30] mov rax, [rax+318h] mov rcx, [rax+28h] add rcx, 4 mov [rax+28h], rcx loc_59058: jmp short $+2 loc_5905A: mov rax, [rbp+var_30] mov rcx, [rax+90h] mov rax, [rbp+var_30] mov rax, [rax+318h] mov [rax+30h], rcx mov rax, [rbp+var_30] imul eax, [rax+12Ch], 7 mov [rbp+var_70], eax mov eax, eax mov ecx, eax mov rax, [rbp+var_30] mov rax, [rax+318h] mov [rax+38h], rcx mov rdi, [rbp+var_30] mov rsi, [rbp+var_38] mov rax, [rbp+var_30] mov rdx, [rax+318h] add rdx, 20h ; ' ' add rdx, 20h ; ' ' lea rcx, [rbp+var_6C] call fill_insert_undo_parts mov [rbp+var_68], rax mov rax, [rbp+var_30] mov rdx, [rax+8] mov rcx, [rbp+var_30] mov rax, [rbp+var_30] mov rax, [rax+318h] mov rax, [rax+28h] add rax, [rbp+var_68] mov esi, [rbp+var_70] add rax, rsi mov r8d, eax mov r9d, [rbp+var_6C] add r9d, 4 mov rax, [rbp+var_30] mov r11, [rax+318h] lea r10, [rbp+var_20] add r10, 7 lea rdi, [rbp+var_58] mov esi, 13h lea rax, [rbp+var_74] mov [rsp+0C0h+var_C0], r11 mov [rsp+0C0h+var_B8], r10 mov [rsp+0C0h+var_B0], rax call translog_write_record cmp al, 0 jz short loc_59126 jmp short loc_59149 loc_59126: jmp short $+2 loc_59128: mov rdi, [rbp+var_30] mov esi, 0FFFFFFFFh call _ma_bitmap_flushable mov rdi, [rbp+var_30] mov rsi, [rbp+var_58] call _ma_unpin_all_pages_and_finalize_row_0 mov [rbp+var_21], 0 jmp short loc_5916C loc_59149: jmp short $+2 loc_5914B: jmp short $+2 loc_5914D: mov rdi, [rbp+var_30] mov esi, 0FFFFFFFFh call _ma_bitmap_flushable mov rdi, [rbp+var_30] xor eax, eax mov esi, eax call _ma_unpin_all_pages_and_finalize_row_0 mov [rbp+var_21], 1 loc_5916C: mov al, [rbp+var_21] mov [rbp+var_A1], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_59196 mov al, [rbp+var_A1] add rsp, 0C0h pop rbp retn loc_59196: call ___stack_chk_fail
char ma_delete_block_record(long long a1, long long a2) { int v3; // [rsp+4Ch] [rbp-74h] BYREF unsigned int v4; // [rsp+50h] [rbp-70h] int v5; // [rsp+54h] [rbp-6Ch] BYREF long long inserted; // [rsp+58h] [rbp-68h] __int16 *v7; // [rsp+60h] [rbp-60h] long long v8; // [rsp+68h] [rbp-58h] BYREF long long v9; // [rsp+70h] [rbp-50h] unsigned int v10; // [rsp+7Ch] [rbp-44h] unsigned long long v11; // [rsp+80h] [rbp-40h] long long v12; // [rsp+88h] [rbp-38h] long long *v13; // [rsp+90h] [rbp-30h] _BYTE v15[3]; // [rsp+A0h] [rbp-20h] BYREF int v16; // [rsp+A3h] [rbp-1Dh] __int16 v17; // [rsp+A7h] [rbp-19h] BYREF int v18; // [rsp+A9h] [rbp-17h] char v19; // [rsp+ADh] [rbp-13h] char v20; // [rsp+AEh] [rbp-12h] __int16 v21; // [rsp+AFh] [rbp-11h] BYREF __int16 v22; // [rsp+B1h] [rbp-Fh] BYREF _BYTE v23[13]; // [rsp+B3h] [rbp-Dh] BYREF *(_QWORD *)&v23[5] = __readfsqword(0x28u); v13 = (long long *)a1; v12 = a2; v9 = *(_QWORD *)a1; v8 = 0LL; v11 = ma_recordpos_to_page(*(_QWORD *)(a1 + 152)); v10 = ma_recordpos_to_dir_entry(*(_QWORD *)(a1 + 152)); ma_bitmap_flushable(a1, 1LL); if ( delete_head_or_tail((long long *)a1, v11, v10, 1, 0) || (unsigned __int8)delete_tails(v13, v13[21]) || *((_DWORD *)v13 + 75) && (unsigned __int8)free_full_pages(v13, v13 + 16) ) { goto LABEL_11; } if ( !*(_BYTE *)(v9 + 2023) ) goto LABEL_10; v15[0] = BYTE4(*(_QWORD *)(v13[1] + 152)); v15[1] = (unsigned __int16)WORD2(*(_QWORD *)(v13[1] + 152)) >> 8; v15[2] = BYTE6(*(_QWORD *)(v13[1] + 152)); v16 = *(_QWORD *)(v13[1] + 152); v18 = v11; v19 = BYTE4(v11); v20 = v10; v7 = &v21; v21 = *((_WORD *)v13 + 144) - *((_WORD *)v13 + 146); v7 = &v22; v22 = *((_DWORD *)v13 + 75); v7 = (__int16 *)v23; *(_QWORD *)(v13[99] + 32) = v15; *(_QWORD *)(v13[99] + 40) = 19LL; v3 = 0; if ( *(_QWORD *)(v9 + 1704) ) { v3 = -*((_DWORD *)v13 + 44); *(_DWORD *)v7 = v3; *(_QWORD *)(v13[99] + 40) += 4LL; } *(_QWORD *)(v13[99] + 48) = v13[18]; v4 = 7 * *((_DWORD *)v13 + 75); *(_QWORD *)(v13[99] + 56) = v4; inserted = fill_insert_undo_parts(v13, v12, v13[99] + 64, &v5); if ( translog_write_record( (long long)&v8, 0x13u, v13[1], v13, v4 + inserted + *(_QWORD *)(v13[99] + 40), v5 + 4, (_QWORD *)v13[99], &v17, (long long)&v3) ) { LABEL_11: ma_bitmap_flushable(v13, 0xFFFFFFFFLL); ma_unpin_all_pages_and_finalize_row_0((long long)v13, 0LL); return 1; } else { LABEL_10: ma_bitmap_flushable(v13, 0xFFFFFFFFLL); ma_unpin_all_pages_and_finalize_row_0((long long)v13, v8); return 0; } }
_ma_delete_block_record: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x30],RDI MOV qword ptr [RBP + -0x38],RSI MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x58],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x98] CALL 0x00158540 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x98] CALL 0x00158560 MOV dword ptr [RBP + -0x44],EAX JMP 0x00158e0c LAB_00158e0c: MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0x1 CALL 0x00166170 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x40] MOV EDX,dword ptr [RBP + -0x44] MOV ECX,0x1 XOR R8D,R8D CALL 0x001581a0 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x00158e56 MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RAX + 0xa8] CALL 0x001591a0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00158e5b LAB_00158e56: JMP 0x00159149 LAB_00158e5b: MOV RAX,qword ptr [RBP + -0x30] CMP dword ptr [RAX + 0x12c],0x0 JZ 0x00158e89 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x30] ADD RSI,0x80 CALL 0x00159230 MOVSX EAX,AL CMP EAX,0x0 JZ 0x00158e89 JMP 0x00159149 LAB_00158e89: MOV RAX,qword ptr [RBP + -0x50] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x00159128 JMP 0x00158e9c LAB_00158e9c: JMP 0x00158e9e LAB_00158e9e: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x98] SAR RAX,0x20 MOV byte ptr [RBP + -0x20],AL MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x98] SAR RAX,0x20 SHR EAX,0x8 MOV byte ptr [RBP + -0x1f],AL MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x98] SAR RAX,0x20 SHR EAX,0x10 MOV byte ptr [RBP + -0x1e],AL JMP 0x00158ee8 LAB_00158ee8: LEA RAX,[RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,0xffffffff AND RAX,qword ptr [RCX + 0x98] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x80] MOV dword ptr [RAX],ECX JMP 0x00158f17 LAB_00158f17: JMP 0x00158f19 LAB_00158f19: LEA RAX,[RBP + -0x20] ADD RAX,0x7 ADD RAX,0x2 MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x40] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x88] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x88] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x20] ADD RAX,0x7 ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0x60],RAX MOV EAX,dword ptr [RBP + -0x44] MOV CL,AL MOV RAX,qword ptr [RBP + -0x60] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x1 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x120] MOV RCX,qword ptr [RBP + -0x30] SUB EAX,dword ptr [RCX + 0x124] MOV CX,AX MOV RAX,qword ptr [RBP + -0x90] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x2 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x12c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x98] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,0x2 MOV qword ptr [RBP + -0x60],RAX LEA RCX,[RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x318] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x318] MOV qword ptr [RAX + 0x28],0x13 MOV dword ptr [RBP + -0x74],0x0 MOV RAX,qword ptr [RBP + -0x50] CMP qword ptr [RAX + 0x6a8],0x0 JZ 0x00159058 MOV RCX,qword ptr [RBP + -0x30] XOR EAX,EAX SUB EAX,dword ptr [RCX + 0xb0] MOV dword ptr [RBP + -0x74],EAX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0xa0],RAX MOV ECX,dword ptr [RBP + -0x74] MOV RAX,qword ptr [RBP + -0xa0] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x318] MOV RCX,qword ptr [RAX + 0x28] ADD RCX,0x4 MOV qword ptr [RAX + 0x28],RCX LAB_00159058: JMP 0x0015905a LAB_0015905a: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x318] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RBP + -0x30] IMUL EAX,dword ptr [RAX + 0x12c],0x7 MOV dword ptr [RBP + -0x70],EAX MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x318] MOV qword ptr [RAX + 0x38],RCX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RAX + 0x318] ADD RDX,0x20 ADD RDX,0x20 LEA RCX,[RBP + -0x6c] CALL 0x00159600 MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x318] MOV RAX,qword ptr [RAX + 0x28] ADD RAX,qword ptr [RBP + -0x68] MOV ESI,dword ptr [RBP + -0x70] ADD RAX,RSI MOV R8D,EAX MOV R9D,dword ptr [RBP + -0x6c] ADD R9D,0x4 MOV RAX,qword ptr [RBP + -0x30] MOV R11,qword ptr [RAX + 0x318] LEA R10,[RBP + -0x20] ADD R10,0x7 LEA RDI,[RBP + -0x58] MOV ESI,0x13 LEA RAX,[RBP + -0x74] MOV qword ptr [RSP],R11 MOV qword ptr [RSP + 0x8],R10 MOV qword ptr [RSP + 0x10],RAX CALL 0x00133e80 CMP AL,0x0 JZ 0x00159126 JMP 0x00159149 LAB_00159126: JMP 0x00159128 LAB_00159128: MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0xffffffff CALL 0x00166170 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x58] CALL 0x001587b0 MOV byte ptr [RBP + -0x21],0x0 JMP 0x0015916c LAB_00159149: JMP 0x0015914b LAB_0015914b: JMP 0x0015914d LAB_0015914d: MOV RDI,qword ptr [RBP + -0x30] MOV ESI,0xffffffff CALL 0x00166170 MOV RDI,qword ptr [RBP + -0x30] XOR EAX,EAX MOV ESI,EAX CALL 0x001587b0 MOV byte ptr [RBP + -0x21],0x1 LAB_0015916c: MOV AL,byte ptr [RBP + -0x21] MOV byte ptr [RBP + -0xa1],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00159196 MOV AL,byte ptr [RBP + -0xa1] ADD RSP,0xc0 POP RBP RET LAB_00159196: CALL 0x0012a270
int8 _ma_delete_block_record(long *param_1,int8 param_2) { char cVar1; long in_FS_OFFSET; int local_7c; uint local_78; int local_74; int8 local_70; int *local_68; int8 local_60; long local_58; int4 local_4c; int8 local_48; int8 local_40; long *local_38; int1 local_29; int1 local_28; int1 local_27; int1 local_26; int4 local_25; int1 auStack_21 [2]; int4 local_1f; int1 local_1b; int1 local_1a; short local_19; int2 local_17; int local_15; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_58 = *param_1; local_60 = 0; local_40 = param_2; local_38 = param_1; local_48 = ma_recordpos_to_page(param_1[0x13]); local_4c = ma_recordpos_to_dir_entry(local_38[0x13]); _ma_bitmap_flushable(local_38,1); cVar1 = delete_head_or_tail(local_38,local_48,local_4c,1,0); if (((cVar1 == '\0') && (cVar1 = delete_tails(local_38,local_38[0x15]), cVar1 == '\0')) && ((*(int *)((long)local_38 + 300) == 0 || (cVar1 = free_full_pages(local_38,local_38 + 0x10), cVar1 == '\0')))) { if (*(char *)(local_58 + 0x7e7) != '\0') { local_28 = (int1)((ulong)*(int8 *)(local_38[1] + 0x98) >> 0x20); local_27 = (int1)((ulong)*(int8 *)(local_38[1] + 0x98) >> 0x28); local_26 = (int1)((ulong)*(int8 *)(local_38[1] + 0x98) >> 0x30); local_25 = (int4)*(int8 *)(local_38[1] + 0x98); local_1f = (int4)local_48; local_1b = (int1)((ulong)local_48 >> 0x20); local_1a = (int1)local_4c; local_19 = (short)(int)local_38[0x24] - (short)*(int4 *)((long)local_38 + 0x124); local_17 = (int2)*(int4 *)((long)local_38 + 300); local_68 = &local_15; *(int1 **)(local_38[99] + 0x20) = &local_28; *(int8 *)(local_38[99] + 0x28) = 0x13; local_7c = 0; if (*(long *)(local_58 + 0x6a8) != 0) { local_7c = -(int)local_38[0x16]; *(long *)(local_38[99] + 0x28) = *(long *)(local_38[99] + 0x28) + 4; local_15 = local_7c; } *(long *)(local_38[99] + 0x30) = local_38[0x12]; local_78 = *(int *)((long)local_38 + 300) * 7; *(ulong *)(local_38[99] + 0x38) = (ulong)local_78; local_70 = fill_insert_undo_parts(local_38,local_40,local_38[99] + 0x40,&local_74); cVar1 = translog_write_record (&local_60,0x13,local_38[1],local_38, (int)*(int8 *)(local_38[99] + 0x28) + (int)local_70 + local_78, local_74 + 4,local_38[99],auStack_21,&local_7c); if (cVar1 != '\0') goto LAB_00159149; } _ma_bitmap_flushable(local_38,0xffffffff); _ma_unpin_all_pages_and_finalize_row(local_38,local_60); local_29 = 0; } else { LAB_00159149: _ma_bitmap_flushable(local_38,0xffffffff); _ma_unpin_all_pages_and_finalize_row(local_38,0); local_29 = 1; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29); }
40,161
init_available_charsets
eloqsql/mysys/charset.c
static void init_available_charsets(void) { char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; struct charset_info_st **cs; MY_CHARSET_LOADER loader; DBUG_ENTER("init_available_charsets"); bzero((char*) &all_charsets,sizeof(all_charsets)); bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics)); my_hash_init2(key_memory_charsets, &charset_name_hash, 16, &my_charset_latin1, 64, 0, 0, get_charset_key, 0, 0, HASH_UNIQUE); init_compiled_charsets(MYF(0)); /* Copy compiled charsets */ for (cs= (struct charset_info_st**) all_charsets; cs < (struct charset_info_st**) all_charsets + array_elements(all_charsets)-1 ; cs++) { if (*cs) { DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN); if (cs[0]->m_ctype) if (init_state_maps(*cs)) *cs= NULL; } } my_charset_loader_init_mysys(&loader); strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); my_read_charset_file(&loader, fname, MYF(0)); DBUG_VOID_RETURN; }
O0
c
init_available_charsets: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq 0x35df01(%rip), %rdi # 0x3935e0 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x24180 leaq 0x361f5e(%rip), %rdi # 0x397650 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x24180 leaq 0x35dba7(%rip), %rax # 0x3932ac movl (%rax), %edi leaq 0x361ed2(%rip), %rsi # 0x3975e0 movl $0x10, %edx leaq 0x24c0c6(%rip), %rcx # 0x2817e0 movl $0x40, %r8d xorl %eax, %eax movl %eax, %r9d leaq 0x1ab4(%rip), %rax # 0x371e0 movq $0x0, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movl $0x1, 0x20(%rsp) callq 0x37c00 xorl %eax, %eax movl %eax, %edi callq 0x3d480 leaq 0x35de78(%rip), %rax # 0x3935e0 movq %rax, -0x2d8(%rbp) leaq 0x35de6a(%rip), %rax # 0x3935e0 addq $0x4000, %rax # imm = 0x4000 addq $-0x8, %rax cmpq %rax, -0x2d8(%rbp) jae 0x357e6 movq -0x2d8(%rbp), %rax cmpq $0x0, (%rax) je 0x357d0 jmp 0x35798 jmp 0x3579a movq -0x2d8(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x40(%rax) je 0x357ce movq -0x2d8(%rbp), %rax movq (%rax), %rdi callq 0x36d40 cmpb $0x0, %al je 0x357cc movq -0x2d8(%rbp), %rax movq $0x0, (%rax) jmp 0x357ce jmp 0x357d0 jmp 0x357d2 movq -0x2d8(%rbp), %rax addq $0x8, %rax movq %rax, -0x2d8(%rbp) jmp 0x3576f leaq -0x2d0(%rbp), %rdi callq 0x34ce0 leaq -0x220(%rbp), %rdi callq 0x35380 movq %rax, %rdi leaq 0x5012b(%rip), %rsi # 0x85933 callq 0x24290 leaq -0x220(%rbp), %rsi leaq -0x2d0(%rbp), %rdi xorl %eax, %eax movl %eax, %edx callq 0x37220 jmp 0x35826 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x35841 addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x242c0 nopw %cs:(%rax,%rax)
init_available_charsets: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, all_charsets xor esi, esi mov edx, 4000h call _memset lea rdi, my_collation_statistics xor esi, esi mov edx, 4000h call _memset lea rax, key_memory_charsets mov edi, [rax] lea rsi, charset_name_hash mov edx, 10h lea rcx, my_charset_latin1 mov r8d, 40h ; '@' xor eax, eax mov r9d, eax lea rax, get_charset_key mov [rsp+300h+var_300], 0 mov [rsp+300h+var_2F8], rax mov [rsp+300h+var_2F0], 0 mov [rsp+300h+var_2E8], 0 mov [rsp+300h+var_2E0], 1 call my_hash_init2 xor eax, eax mov edi, eax call init_compiled_charsets lea rax, all_charsets mov [rbp+var_2D8], rax loc_3576F: lea rax, all_charsets add rax, 4000h add rax, 0FFFFFFFFFFFFFFF8h cmp [rbp+var_2D8], rax jnb short loc_357E6 mov rax, [rbp+var_2D8] cmp qword ptr [rax], 0 jz short loc_357D0 jmp short $+2 loc_35798: jmp short $+2 loc_3579A: mov rax, [rbp+var_2D8] mov rax, [rax] cmp qword ptr [rax+40h], 0 jz short loc_357CE mov rax, [rbp+var_2D8] mov rdi, [rax] call init_state_maps cmp al, 0 jz short loc_357CC mov rax, [rbp+var_2D8] mov qword ptr [rax], 0 loc_357CC: jmp short $+2 loc_357CE: jmp short $+2 loc_357D0: jmp short $+2 loc_357D2: mov rax, [rbp+var_2D8] add rax, 8 mov [rbp+var_2D8], rax jmp short loc_3576F loc_357E6: lea rdi, [rbp+var_2D0] call my_charset_loader_init_mysys lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy lea rsi, [rbp+var_220] lea rdi, [rbp+var_2D0] xor eax, eax mov edx, eax call my_read_charset_file jmp short $+2 loc_35826: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_35841 add rsp, 300h pop rbp retn loc_35841: call ___stack_chk_fail
unsigned long long init_available_charsets() { long long charsets_dir; // rax _QWORD *i; // [rsp+28h] [rbp-2D8h] _BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF _BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF unsigned long long v5; // [rsp+2F8h] [rbp-8h] v5 = __readfsqword(0x28u); memset(all_charsets, 0LL, sizeof(all_charsets)); memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics)); my_hash_init2( key_memory_charsets, (unsigned int)&charset_name_hash, 16, (unsigned int)&my_charset_latin1, 64, 0, 0LL, (long long)get_charset_key, 0LL, 0LL, 1); init_compiled_charsets(0LL); for ( i = all_charsets; i < &all_charsets[2047]; ++i ) { if ( *i && *(_QWORD *)(*i + 64LL) ) { if ( (unsigned __int8)init_state_maps(*i) ) *i = 0LL; } } my_charset_loader_init_mysys((long long)v3); charsets_dir = get_charsets_dir((long long)v4); stpcpy(charsets_dir, "Index.xml"); my_read_charset_file(v3, v4, 0LL); return __readfsqword(0x28u); }
init_available_charsets: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[0x4935e0] XOR ESI,ESI MOV EDX,0x4000 CALL 0x00124180 LEA RDI,[0x497650] XOR ESI,ESI MOV EDX,0x4000 CALL 0x00124180 LEA RAX,[0x4932ac] MOV EDI,dword ptr [RAX] LEA RSI,[0x4975e0] MOV EDX,0x10 LEA RCX,[0x3817e0] MOV R8D,0x40 XOR EAX,EAX MOV R9D,EAX LEA RAX,[0x1371e0] MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x20],0x1 CALL 0x00137c00 XOR EAX,EAX MOV EDI,EAX CALL 0x0013d480 LEA RAX,[0x4935e0] MOV qword ptr [RBP + -0x2d8],RAX LAB_0013576f: LEA RAX,[0x4935e0] ADD RAX,0x4000 ADD RAX,-0x8 CMP qword ptr [RBP + -0x2d8],RAX JNC 0x001357e6 MOV RAX,qword ptr [RBP + -0x2d8] CMP qword ptr [RAX],0x0 JZ 0x001357d0 JMP 0x00135798 LAB_00135798: JMP 0x0013579a LAB_0013579a: MOV RAX,qword ptr [RBP + -0x2d8] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x40],0x0 JZ 0x001357ce MOV RAX,qword ptr [RBP + -0x2d8] MOV RDI,qword ptr [RAX] CALL 0x00136d40 CMP AL,0x0 JZ 0x001357cc MOV RAX,qword ptr [RBP + -0x2d8] MOV qword ptr [RAX],0x0 LAB_001357cc: JMP 0x001357ce LAB_001357ce: JMP 0x001357d0 LAB_001357d0: JMP 0x001357d2 LAB_001357d2: MOV RAX,qword ptr [RBP + -0x2d8] ADD RAX,0x8 MOV qword ptr [RBP + -0x2d8],RAX JMP 0x0013576f LAB_001357e6: LEA RDI,[RBP + -0x2d0] CALL 0x00134ce0 LEA RDI,[RBP + -0x220] CALL 0x00135380 MOV RDI,RAX LEA RSI,[0x185933] CALL 0x00124290 LEA RSI,[RBP + -0x220] LEA RDI,[RBP + -0x2d0] XOR EAX,EAX MOV EDX,EAX CALL 0x00137220 JMP 0x00135826 LAB_00135826: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00135841 ADD RSP,0x300 POP RBP RET LAB_00135841: CALL 0x001242c0
void init_available_charsets(void) { char cVar1; char *__dest; long in_FS_OFFSET; long *local_2e0; int1 local_2d8 [176]; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(&all_charsets,0,0x4000); memset(my_collation_statistics,0,0x4000); my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0, get_charset_key,0,0,1); init_compiled_charsets(0); for (local_2e0 = &all_charsets; local_2e0 < (long *)0x4975d8; local_2e0 = local_2e0 + 1) { if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) && (cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) { *local_2e0 = 0; } } my_charset_loader_init_mysys(local_2d8); __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_read_charset_file(local_2d8,local_228,0); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
40,162
mi_fetch_keypage
eloqsql/storage/myisam/mi_page.c
uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo, my_off_t page, int level, uchar *buff, int return_buffer) { uchar *tmp; uint page_size; DBUG_ENTER("_mi_fetch_keypage"); DBUG_PRINT("enter",("page: %ld", (long) page)); tmp=(uchar*) key_cache_read(info->s->key_cache, info->s->kfile, page, level, (uchar*) buff, (uint) keyinfo->block_length, (uint) keyinfo->block_length, return_buffer); if (tmp == info->buff) info->buff_used=1; else if (!tmp) { DBUG_PRINT("error",("Got errno: %d from key_cache_read",my_errno)); info->last_keypage=HA_OFFSET_ERROR; mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } info->last_keypage=page; page_size=mi_getint(tmp); if (page_size < 4 || page_size > keyinfo->block_length) { DBUG_PRINT("error",("page %lu had wrong page length: %u", (ulong) page, page_size)); DBUG_DUMP("page", tmp, keyinfo->block_length); info->last_keypage = HA_OFFSET_ERROR; mi_print_error(info->s, HA_ERR_CRASHED); my_errno = HA_ERR_CRASHED; tmp = 0; } DBUG_RETURN(tmp); }
O3
c
mi_fetch_keypage: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %r9d, %eax movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq (%rdi), %rdx movq 0x278(%rdx), %rdi movl 0x350(%rdx), %esi movzwl 0xe(%r14), %r9d movq %r15, %rdx pushq %rax pushq %r9 callq 0x9fd68 addq $0x10, %rsp cmpq 0x100(%rbx), %rax je 0x8ab1a testq %rax, %rax jne 0x8ab21 jmp 0x8ab45 movb $0x1, 0x33d(%rbx) movq %r15, 0x190(%rbx) movzbl 0x1(%rax), %edx movzbl (%rax), %ecx andl $0x7f, %ecx shll $0x8, %ecx orl %edx, %ecx cmpl $0x4, %ecx jb 0x8ab45 movzwl 0xe(%r14), %edx cmpl %edx, %ecx jbe 0x8ab71 movq $-0x1, 0x190(%rbx) movq (%rbx), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x81d46 callq 0xac2be movl $0x7e, (%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_mi_fetch_keypage: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov eax, r9d mov r15, rdx mov r14, rsi mov rbx, rdi mov rdx, [rdi] mov rdi, [rdx+278h] mov esi, [rdx+350h] movzx r9d, word ptr [r14+0Eh] mov rdx, r15 push rax push r9 call key_cache_read add rsp, 10h cmp rax, [rbx+100h] jz short loc_8AB1A test rax, rax jnz short loc_8AB21 jmp short loc_8AB45 loc_8AB1A: mov byte ptr [rbx+33Dh], 1 loc_8AB21: mov [rbx+190h], r15 movzx edx, byte ptr [rax+1] movzx ecx, byte ptr [rax] and ecx, 7Fh shl ecx, 8 or ecx, edx cmp ecx, 4 jb short loc_8AB45 movzx edx, word ptr [r14+0Eh] cmp ecx, edx jbe short loc_8AB71 loc_8AB45: mov qword ptr [rbx+190h], 0FFFFFFFFFFFFFFFFh mov rax, [rbx] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' xor eax, eax loc_8AB71: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
_BYTE * mi_fetch_keypage(_QWORD *a1, long long a2, long long a3) { _BYTE *result; // rax unsigned int v5; // ecx result = (_BYTE *)key_cache_read(*(_QWORD *)(*a1 + 632LL), *(unsigned int *)(*a1 + 848LL), a3); if ( result == (_BYTE *)a1[32] ) { *((_BYTE *)a1 + 829) = 1; } else if ( !result ) { LABEL_7: a1[50] = -1LL; mi_report_error(126, *(_QWORD *)(*a1 + 616LL)); *(_DWORD *)my_thread_var(126LL) = 126; return 0LL; } a1[50] = a3; v5 = (unsigned __int8)result[1] | ((*result & 0x7F) << 8); if ( v5 < 4 || v5 > *(unsigned __int16 *)(a2 + 14) ) goto LABEL_7; return result; }
_mi_fetch_keypage: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EAX,R9D MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV RDX,qword ptr [RDI] MOV RDI,qword ptr [RDX + 0x278] MOV ESI,dword ptr [RDX + 0x350] MOVZX R9D,word ptr [R14 + 0xe] MOV RDX,R15 PUSH RAX PUSH R9 CALL 0x0019fd68 ADD RSP,0x10 CMP RAX,qword ptr [RBX + 0x100] JZ 0x0018ab1a TEST RAX,RAX JNZ 0x0018ab21 JMP 0x0018ab45 LAB_0018ab1a: MOV byte ptr [RBX + 0x33d],0x1 LAB_0018ab21: MOV qword ptr [RBX + 0x190],R15 MOVZX EDX,byte ptr [RAX + 0x1] MOVZX ECX,byte ptr [RAX] AND ECX,0x7f SHL ECX,0x8 OR ECX,EDX CMP ECX,0x4 JC 0x0018ab45 MOVZX EDX,word ptr [R14 + 0xe] CMP ECX,EDX JBE 0x0018ab71 LAB_0018ab45: MOV qword ptr [RBX + 0x190],-0x1 MOV RAX,qword ptr [RBX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00181d46 CALL 0x001ac2be MOV dword ptr [RAX],0x7e XOR EAX,EAX LAB_0018ab71: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
byte * _mi_fetch_keypage(long *param_1,long param_2,long param_3) { byte *pbVar1; int4 *puVar2; uint uVar3; pbVar1 = (byte *)key_cache_read(*(int8 *)(*param_1 + 0x278), *(int4 *)(*param_1 + 0x350),param_3); if (pbVar1 == (byte *)param_1[0x20]) { *(int1 *)((long)param_1 + 0x33d) = 1; } else if (pbVar1 == (byte *)0x0) goto LAB_0018ab45; param_1[0x32] = param_3; uVar3 = (*pbVar1 & 0x7f) << 8 | (uint)pbVar1[1]; if ((3 < uVar3) && (uVar3 <= *(ushort *)(param_2 + 0xe))) { return pbVar1; } LAB_0018ab45: param_1[0x32] = -1; mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; return (byte *)0x0; }
40,163
llama_sampler_penalties_apply(llama_sampler*, llama_token_data_array*)
monkey531[P]llama/src/llama-sampling.cpp
static void llama_sampler_penalties_apply(struct llama_sampler * smpl, llama_token_data_array * cur_p) { auto * ctx = (llama_sampler_penalties *) smpl->ctx; if ((ctx->penalty_last_n == 0) || (ctx->penalty_repeat == 1.0f && ctx->penalty_freq == 0.0f && ctx->penalty_present == 0.0f)) { return; } // Apply frequency and presence penalties to the cur_p for (size_t i = 0; i < cur_p->size; ++i) { const auto token_iter = ctx->token_count.find(cur_p->data[i].id); if (token_iter == ctx->token_count.end()) { continue; } const int count = token_iter->second; assert(count > 0 && count <= ctx->penalty_last_n); // The academic publication that described this technique actually just only divided, but that would cause tokens with negative logits to become more likely, which is obviously wrong. // This is common fix for this problem, which is to multiply by the penalty instead of dividing. if (cur_p->data[i].logit <= 0) { cur_p->data[i].logit *= ctx->penalty_repeat; } else { cur_p->data[i].logit /= ctx->penalty_repeat; } cur_p->data[i].logit -= float(count) * ctx->penalty_freq + float(count > 0) * ctx->penalty_present; } cur_p->sorted = false; }
O3
cpp
llama_sampler_penalties_apply(llama_sampler*, llama_token_data_array*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0x8(%rdi), %r15 cmpl $0x0, (%r15) je 0xdfb3d movq %rsi, %rbx movss 0x4(%r15), %xmm0 ucomiss 0x30581(%rip), %xmm0 # 0x110000 jne 0xdfaa4 jp 0xdfaa4 movss 0x8(%r15), %xmm1 xorps %xmm0, %xmm0 ucomiss %xmm0, %xmm1 jne 0xdfaa4 jp 0xdfaa4 movss 0xc(%r15), %xmm1 ucomiss %xmm0, %xmm1 jne 0xdfaa4 jnp 0xdfb3d cmpq $0x0, 0x8(%rbx) je 0xdfb39 leaq 0x48(%r15), %r14 xorl %r12d, %r12d xorl %r13d, %r13d movq (%rbx), %rsi addq %r12, %rsi movq %r14, %rdi callq 0x69cf0 testq %rax, %rax je 0xdfb2c movl 0xc(%rax), %eax xorps %xmm1, %xmm1 movss 0x30526(%rip), %xmm0 # 0x110000 testl %eax, %eax jg 0xdfae1 xorps %xmm0, %xmm0 movq (%rbx), %rcx movss 0x4(%rcx,%r12), %xmm2 movss 0x4(%r15), %xmm3 movaps %xmm2, %xmm4 divss %xmm3, %xmm4 mulss %xmm2, %xmm3 cmpnless %xmm1, %xmm2 andps %xmm2, %xmm4 andnps %xmm3, %xmm2 xorps %xmm1, %xmm1 cvtsi2ss %eax, %xmm1 mulss 0xc(%r15), %xmm0 mulss 0x8(%r15), %xmm1 orps %xmm4, %xmm2 addss %xmm0, %xmm1 subss %xmm1, %xmm2 movss %xmm2, 0x4(%rcx,%r12) incq %r13 addq $0xc, %r12 cmpq 0x8(%rbx), %r13 jb 0xdfab9 movb $0x0, 0x18(%rbx) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZL29llama_sampler_penalties_applyP13llama_samplerP22llama_token_data_array: push r15 push r14 push r13 push r12 push rbx mov r15, [rdi+8] cmp dword ptr [r15], 0 jz loc_DFB3D mov rbx, rsi movss xmm0, dword ptr [r15+4] ucomiss xmm0, cs:dword_110000 jnz short loc_DFAA4 jp short loc_DFAA4 movss xmm1, dword ptr [r15+8] xorps xmm0, xmm0 ucomiss xmm1, xmm0 jnz short loc_DFAA4 jp short loc_DFAA4 movss xmm1, dword ptr [r15+0Ch] ucomiss xmm1, xmm0 jnz short loc_DFAA4 jnp loc_DFB3D loc_DFAA4: cmp qword ptr [rbx+8], 0 jz loc_DFB39 lea r14, [r15+48h] xor r12d, r12d xor r13d, r13d loc_DFAB9: mov rsi, [rbx] add rsi, r12 mov rdi, r14 call __ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(int const&) test rax, rax jz short loc_DFB2C mov eax, [rax+0Ch] xorps xmm1, xmm1 movss xmm0, cs:dword_110000 test eax, eax jg short loc_DFAE1 xorps xmm0, xmm0 loc_DFAE1: mov rcx, [rbx] movss xmm2, dword ptr [rcx+r12+4] movss xmm3, dword ptr [r15+4] movaps xmm4, xmm2 divss xmm4, xmm3 mulss xmm3, xmm2 cmpnless xmm2, xmm1 andps xmm4, xmm2 andnps xmm2, xmm3 xorps xmm1, xmm1 cvtsi2ss xmm1, eax mulss xmm0, dword ptr [r15+0Ch] mulss xmm1, dword ptr [r15+8] orps xmm2, xmm4 addss xmm1, xmm0 subss xmm2, xmm1 movss dword ptr [rcx+r12+4], xmm2 loc_DFB2C: inc r13 add r12, 0Ch cmp r13, [rbx+8] jb short loc_DFAB9 loc_DFB39: mov byte ptr [rbx+18h], 0 loc_DFB3D: pop rbx pop r12 pop r13 pop r14 pop r15 retn
void llama_sampler_penalties_apply(long long a1, long long a2) { long long v2; // r15 long long v3; // r12 unsigned long long v4; // r13 long long v5; // rax int v6; // eax __m128 v7; // xmm1 float v8; // xmm0_4 __m128 v9; // xmm2 __m128 v10; // xmm3 float v11; // xmm4_4 __m128 v12; // xmm2 v2 = *(_QWORD *)(a1 + 8); if ( *(_DWORD *)v2 && (*(float *)(v2 + 4) != 1.0 || *(float *)(v2 + 8) != 0.0 || *(float *)(v2 + 12) != 0.0) ) { if ( *(_QWORD *)(a2 + 8) ) { v3 = 0LL; v4 = 0LL; do { v5 = std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( v2 + 72, v3 + *(_QWORD *)a2); if ( v5 ) { v6 = *(_DWORD *)(v5 + 12); v7.m128_i32[0] = 0; v8 = 1.0; if ( v6 <= 0 ) v8 = 0.0; v9 = (__m128)*(unsigned int *)(*(_QWORD *)a2 + v3 + 4); v10 = (__m128)*(unsigned int *)(v2 + 4); v11 = *(float *)(*(_QWORD *)a2 + v3 + 4) / v10.m128_f32[0]; v10.m128_f32[0] = v10.m128_f32[0] * v9.m128_f32[0]; v12 = _mm_cmpgt_ss(v9, v7); *(float *)(*(_QWORD *)a2 + v3 + 4) = COERCE_FLOAT(_mm_andnot_ps(v12, v10).m128_u32[0] | LODWORD(v11) & v12.m128_i32[0]) - (float)((float)((float)v6 * *(float *)(v2 + 8)) + (float)(v8 * *(float *)(v2 + 12))); } ++v4; v3 += 12LL; } while ( v4 < *(_QWORD *)(a2 + 8) ); } *(_BYTE *)(a2 + 24) = 0; } }
llama_sampler_penalties_apply: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R15,qword ptr [RDI + 0x8] CMP dword ptr [R15],0x0 JZ 0x001dfb3d MOV RBX,RSI MOVSS XMM0,dword ptr [R15 + 0x4] UCOMISS XMM0,dword ptr [0x00210000] JNZ 0x001dfaa4 JP 0x001dfaa4 MOVSS XMM1,dword ptr [R15 + 0x8] XORPS XMM0,XMM0 UCOMISS XMM1,XMM0 JNZ 0x001dfaa4 JP 0x001dfaa4 MOVSS XMM1,dword ptr [R15 + 0xc] UCOMISS XMM1,XMM0 JNZ 0x001dfaa4 JNP 0x001dfb3d LAB_001dfaa4: CMP qword ptr [RBX + 0x8],0x0 JZ 0x001dfb39 LEA R14,[R15 + 0x48] XOR R12D,R12D XOR R13D,R13D LAB_001dfab9: MOV RSI,qword ptr [RBX] ADD RSI,R12 MOV RDI,R14 CALL 0x00169cf0 TEST RAX,RAX JZ 0x001dfb2c MOV EAX,dword ptr [RAX + 0xc] XORPS XMM1,XMM1 MOVSS XMM0,dword ptr [0x00210000] TEST EAX,EAX JG 0x001dfae1 XORPS XMM0,XMM0 LAB_001dfae1: MOV RCX,qword ptr [RBX] MOVSS XMM2,dword ptr [RCX + R12*0x1 + 0x4] MOVSS XMM3,dword ptr [R15 + 0x4] MOVAPS XMM4,XMM2 DIVSS XMM4,XMM3 MULSS XMM3,XMM2 CMPNLESS XMM2,XMM1 ANDPS XMM4,XMM2 ANDNPS XMM2,XMM3 XORPS XMM1,XMM1 CVTSI2SS XMM1,EAX MULSS XMM0,dword ptr [R15 + 0xc] MULSS XMM1,dword ptr [R15 + 0x8] ORPS XMM2,XMM4 ADDSS XMM1,XMM0 SUBSS XMM2,XMM1 MOVSS dword ptr [RCX + R12*0x1 + 0x4],XMM2 LAB_001dfb2c: INC R13 ADD R12,0xc CMP R13,qword ptr [RBX + 0x8] JC 0x001dfab9 LAB_001dfb39: MOV byte ptr [RBX + 0x18],0x0 LAB_001dfb3d: POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* llama_sampler_penalties_apply(llama_sampler*, llama_token_data_array*) */ void llama_sampler_penalties_apply(llama_sampler *param_1,llama_token_data_array *param_2) { float fVar1; int *piVar2; long lVar3; long lVar4; ulong uVar5; float fVar6; piVar2 = *(int **)(param_1 + 8); if (*piVar2 != 0) { if (((((float)piVar2[1] == DAT_00210000) && (!NAN((float)piVar2[1]) && !NAN(DAT_00210000))) && ((float)piVar2[2] == 0.0)) && (((!NAN((float)piVar2[2]) && ((float)piVar2[3] == 0.0)) && (!NAN((float)piVar2[3]))))) { return; } if (*(long *)(param_2 + 8) != 0) { lVar4 = 0; uVar5 = 0; do { lVar3 = std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)(piVar2 + 0x12),(int *)(*(long *)param_2 + lVar4)); if (lVar3 != 0) { fVar6 = DAT_00210000; if (*(int *)(lVar3 + 0xc) < 1) { fVar6 = 0.0; } fVar1 = *(float *)(*(long *)param_2 + 4 + lVar4); *(float *)(*(long *)param_2 + 4 + lVar4) = (float)(~-(uint)(0.0 < fVar1) & (uint)((float)piVar2[1] * fVar1) | (uint)(fVar1 / (float)piVar2[1]) & -(uint)(0.0 < fVar1)) - ((float)*(int *)(lVar3 + 0xc) * (float)piVar2[2] + fVar6 * (float)piVar2[3]); } uVar5 = uVar5 + 1; lVar4 = lVar4 + 0xc; } while (uVar5 < *(ulong *)(param_2 + 8)); } param_2[0x18] = (llama_token_data_array)0x0; } return; }
40,164
bitmap_set_above
eloqsql/mysys/my_bitmap.c
void bitmap_set_above(MY_BITMAP *map, uint from_byte, uint use_bit) { uchar use_byte= use_bit ? 0xff : 0; uchar *to= (uchar *)map->bitmap + from_byte; uchar *end= (uchar *)map->bitmap + (map->n_bits+7)/8; while (to < end) *to++= use_byte; }
O0
c
bitmap_set_above: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movl -0x10(%rbp), %edx xorl %eax, %eax movl $0xff, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movb %al, -0x11(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx addl $0x7, %ecx shrl $0x3, %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jae 0xf3d7f movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0xf3d5f popq %rbp retq nopw %cs:(%rax,%rax)
bitmap_set_above: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov edx, [rbp+var_10] xor eax, eax mov ecx, 0FFh cmp edx, 0 cmovnz eax, ecx mov [rbp+var_11], al mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_8] mov rax, [rax] mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] add ecx, 7 shr ecx, 3 mov ecx, ecx add rax, rcx mov [rbp+var_28], rax loc_F3D5F: mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jnb short loc_F3D7F mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl jmp short loc_F3D5F loc_F3D7F: pop rbp retn
char * bitmap_set_above(long long a1, unsigned int a2, int a3) { char v3; // al char *result; // rax char *v5; // rax unsigned long long v6; // [rsp+0h] [rbp-28h] char *v7; // [rsp+8h] [rbp-20h] char v8; // [rsp+17h] [rbp-11h] v3 = 0; if ( a3 ) v3 = -1; v8 = v3; v7 = (char *)(a2 + *(_QWORD *)a1); v6 = ((unsigned int)(*(_DWORD *)(a1 + 28) + 7) >> 3) + *(_QWORD *)a1; while ( 1 ) { result = v7; if ( (unsigned long long)v7 >= v6 ) break; v5 = v7++; *v5 = v8; } return result; }
bitmap_set_above: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV EDX,dword ptr [RBP + -0x10] XOR EAX,EAX MOV ECX,0xff CMP EDX,0x0 CMOVNZ EAX,ECX MOV byte ptr [RBP + -0x11],AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] ADD ECX,0x7 SHR ECX,0x3 MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX LAB_001f3d5f: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JNC 0x001f3d7f MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL JMP 0x001f3d5f LAB_001f3d7f: POP RBP RET
void bitmap_set_above(long *param_1,uint param_2,int param_3) { int iVar1; long lVar2; int1 uVar3; int1 *local_28; uVar3 = 0; if (param_3 != 0) { uVar3 = 0xff; } lVar2 = *param_1; iVar1 = *(int *)((long)param_1 + 0x1c); local_28 = (int1 *)(*param_1 + (ulong)param_2); while (local_28 < (int1 *)(lVar2 + (ulong)(iVar1 + 7U >> 3))) { *local_28 = uVar3; local_28 = local_28 + 1; } return; }
40,165
mult
eloqsql/strings/dtoa.c
static Bigint *mult(Bigint *a, Bigint *b, Stack_alloc *alloc) { Bigint *c; int k, wa, wb, wc; ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; ULong y; ULLong carry, z; if (a->wds < b->wds) { c= a; a= b; b= c; } k= a->k; wa= a->wds; wb= b->wds; wc= wa + wb; if (wc > a->maxwds) k++; c= Balloc(k, alloc); for (x= c->p.x, xa= x + wc; x < xa; x++) *x= 0; xa= a->p.x; xae= xa + wa; xb= b->p.x; xbe= xb + wb; xc0= c->p.x; for (; xb < xbe; xc0++) { if ((y= *xb++)) { x= xa; xc= xc0; carry= 0; do { z= *x++ * (ULLong)y + *xc + carry; carry= z >> 32; *xc++= (ULong) (z & FFFFFFFF); } while (x < xae); *xc= (ULong) carry; } } for (xc0= c->p.x, xc= xc0 + wc; wc > 0 && !*--xc; --wc) ; c->wds= wc; return c; }
O3
c
mult: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movl 0x14(%rdi), %eax cmpl 0x14(%rsi), %eax movq %rsi, %r12 cmovlq %rdi, %r12 cmovlq %rsi, %r14 movslq 0x14(%r14), %rax movslq 0x14(%r12), %r13 movq %rax, -0x30(%rbp) leaq (%rax,%r13), %r15 xorl %edi, %edi cmpl 0xc(%r14), %r15d setg %dil addl 0x8(%r14), %edi movq %rdx, %rsi callq 0xd4a54 movq %rax, %rbx movq (%rax), %rdi testl %r15d, %r15d jle 0xd4da9 leaq (%rdi,%r15,4), %rax leaq 0x4(%rdi), %rcx cmpq %rcx, %rax cmovaq %rax, %rcx movq %rdi, %rdx notq %rdx addq %rcx, %rdx andq $-0x4, %rdx addq $0x4, %rdx xorl %esi, %esi callq 0x292c0 movq (%rbx), %rdi testl %r13d, %r13d jle 0xd4e11 movq (%r14), %rax movq -0x30(%rbp), %rcx leaq (%rax,%rcx,4), %rcx movq (%r12), %rdx leaq (%rdx,%r13,4), %rsi movl (%rdx), %r8d testq %r8, %r8 je 0xd4e01 xorl %r9d, %r9d xorl %r10d, %r10d leaq (%rax,%r9), %r11 addq $0x4, %r11 movl -0x4(%r11), %r14d imulq %r8, %r14 movl (%rdi,%r9), %r12d addq %r10, %r12 addq %r14, %r12 movq %r12, %r10 shrq $0x20, %r10 movl %r12d, (%rdi,%r9) addq $0x4, %r9 cmpq %rcx, %r11 jb 0xd4dcf movl %r10d, (%rdi,%r9) addq $0x4, %rdx addq $0x4, %rdi cmpq %rsi, %rdx jb 0xd4dc1 movq (%rbx), %rdi testl %r15d, %r15d jle 0xd4e37 leaq (%rdi,%r15,4), %rax addq $-0x4, %rax cmpl $0x0, (%rax) jne 0xd4e37 leal -0x1(%r15), %ecx addq $-0x4, %rax cmpl $0x1, %r15d movl %ecx, %r15d jg 0xd4e1e xorl %r15d, %r15d movl %r15d, 0x14(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mult: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi mov eax, [rdi+14h] cmp eax, [rsi+14h] mov r12, rsi cmovl r12, rdi cmovl r14, rsi movsxd rax, dword ptr [r14+14h] movsxd r13, dword ptr [r12+14h] mov [rbp+var_30], rax lea r15, [rax+r13] xor edi, edi cmp r15d, [r14+0Ch] setnle dil add edi, [r14+8] mov rsi, rdx call Balloc mov rbx, rax mov rdi, [rax] test r15d, r15d jle short loc_D4DA9 lea rax, [rdi+r15*4] lea rcx, [rdi+4] cmp rax, rcx cmova rcx, rax mov rdx, rdi not rdx add rdx, rcx and rdx, 0FFFFFFFFFFFFFFFCh add rdx, 4 xor esi, esi call _memset mov rdi, [rbx] loc_D4DA9: test r13d, r13d jle short loc_D4E11 mov rax, [r14] mov rcx, [rbp+var_30] lea rcx, [rax+rcx*4] mov rdx, [r12] lea rsi, [rdx+r13*4] loc_D4DC1: mov r8d, [rdx] test r8, r8 jz short loc_D4E01 xor r9d, r9d xor r10d, r10d loc_D4DCF: lea r11, [rax+r9] add r11, 4 mov r14d, [r11-4] imul r14, r8 mov r12d, [rdi+r9] add r12, r10 add r12, r14 mov r10, r12 shr r10, 20h mov [rdi+r9], r12d add r9, 4 cmp r11, rcx jb short loc_D4DCF mov [rdi+r9], r10d loc_D4E01: add rdx, 4 add rdi, 4 cmp rdx, rsi jb short loc_D4DC1 mov rdi, [rbx] loc_D4E11: test r15d, r15d jle short loc_D4E37 lea rax, [rdi+r15*4] add rax, 0FFFFFFFFFFFFFFFCh loc_D4E1E: cmp dword ptr [rax], 0 jnz short loc_D4E37 lea ecx, [r15-1] add rax, 0FFFFFFFFFFFFFFFCh cmp r15d, 1 mov r15d, ecx jg short loc_D4E1E xor r15d, r15d loc_D4E37: mov [rbx+14h], r15d mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mult(long long *a1, long long *a2, long long a3) { long long *v3; // r14 long long *v4; // r12 long long v5; // r13 long long v6; // r15 long long v7; // rbx long long v8; // rdi long long v9; // rcx long long v10; // rax unsigned long long v11; // rcx _DWORD *v12; // rdx unsigned long long v13; // rsi long long v14; // r8 long long v15; // r9 unsigned long long v16; // r10 unsigned long long v17; // r11 unsigned long long v18; // r12 _DWORD *v19; // rax bool v20; // cc long long v22; // [rsp+0h] [rbp-30h] v3 = a1; v4 = a2; if ( *((_DWORD *)a1 + 5) < *((_DWORD *)a2 + 5) ) { v4 = a1; v3 = a2; } v5 = *((int *)v4 + 5); v22 = *((int *)v3 + 5); v6 = v22 + v5; v7 = Balloc(*((_DWORD *)v3 + 2) + (unsigned int)((int)v22 + (int)v5 > *((_DWORD *)v3 + 3)), a3); v8 = *(_QWORD *)v7; if ( (int)v22 + (int)v5 > 0 ) { v9 = v8 + 4; if ( v8 + 4 * v6 > (unsigned long long)(v8 + 4) ) v9 = v8 + 4 * v6; memset(v8, 0LL, ((v9 + ~v8) & 0xFFFFFFFFFFFFFFFCLL) + 4); v8 = *(_QWORD *)v7; } if ( (int)v5 > 0 ) { v10 = *v3; v11 = *v3 + 4 * v22; v12 = (_DWORD *)*v4; v13 = *v4 + 4 * v5; do { v14 = (unsigned int)*v12; if ( *v12 ) { v15 = 0LL; v16 = 0LL; do { v17 = v10 + v15 + 4; v18 = v14 * *(unsigned int *)(v10 + v15) + v16 + *(unsigned int *)(v8 + v15); v16 = HIDWORD(v18); *(_DWORD *)(v8 + v15) = v18; v15 += 4LL; } while ( v17 < v11 ); *(_DWORD *)(v8 + v15) = HIDWORD(v18); } ++v12; v8 += 4LL; } while ( (unsigned long long)v12 < v13 ); v8 = *(_QWORD *)v7; } if ( (int)v6 > 0 ) { v19 = (_DWORD *)(v8 + 4 * v6 - 4); while ( !*v19 ) { --v19; v20 = (int)v6 <= 1; LODWORD(v6) = v6 - 1; if ( v20 ) { LODWORD(v6) = 0; break; } } } *(_DWORD *)(v7 + 20) = v6; return v7; }
mult: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV EAX,dword ptr [RDI + 0x14] CMP EAX,dword ptr [RSI + 0x14] MOV R12,RSI CMOVL R12,RDI CMOVL R14,RSI MOVSXD RAX,dword ptr [R14 + 0x14] MOVSXD R13,dword ptr [R12 + 0x14] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RAX + R13*0x1] XOR EDI,EDI CMP R15D,dword ptr [R14 + 0xc] SETG DIL ADD EDI,dword ptr [R14 + 0x8] MOV RSI,RDX CALL 0x001d4a54 MOV RBX,RAX MOV RDI,qword ptr [RAX] TEST R15D,R15D JLE 0x001d4da9 LEA RAX,[RDI + R15*0x4] LEA RCX,[RDI + 0x4] CMP RAX,RCX CMOVA RCX,RAX MOV RDX,RDI NOT RDX ADD RDX,RCX AND RDX,-0x4 ADD RDX,0x4 XOR ESI,ESI CALL 0x001292c0 MOV RDI,qword ptr [RBX] LAB_001d4da9: TEST R13D,R13D JLE 0x001d4e11 MOV RAX,qword ptr [R14] MOV RCX,qword ptr [RBP + -0x30] LEA RCX,[RAX + RCX*0x4] MOV RDX,qword ptr [R12] LEA RSI,[RDX + R13*0x4] LAB_001d4dc1: MOV R8D,dword ptr [RDX] TEST R8,R8 JZ 0x001d4e01 XOR R9D,R9D XOR R10D,R10D LAB_001d4dcf: LEA R11,[RAX + R9*0x1] ADD R11,0x4 MOV R14D,dword ptr [R11 + -0x4] IMUL R14,R8 MOV R12D,dword ptr [RDI + R9*0x1] ADD R12,R10 ADD R12,R14 MOV R10,R12 SHR R10,0x20 MOV dword ptr [RDI + R9*0x1],R12D ADD R9,0x4 CMP R11,RCX JC 0x001d4dcf MOV dword ptr [RDI + R9*0x1],R10D LAB_001d4e01: ADD RDX,0x4 ADD RDI,0x4 CMP RDX,RSI JC 0x001d4dc1 MOV RDI,qword ptr [RBX] LAB_001d4e11: TEST R15D,R15D JLE 0x001d4e37 LEA RAX,[RDI + R15*0x4] ADD RAX,-0x4 LAB_001d4e1e: CMP dword ptr [RAX],0x0 JNZ 0x001d4e37 LEA ECX,[R15 + -0x1] ADD RAX,-0x4 CMP R15D,0x1 MOV R15D,ECX JG 0x001d4e1e XOR R15D,R15D LAB_001d4e37: MOV dword ptr [RBX + 0x14],R15D MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 * mult(long *param_1,long *param_2) { void *pvVar1; uint *puVar2; uint *puVar3; int iVar4; int iVar5; uint uVar6; long lVar7; int8 *puVar8; int *piVar9; void *pvVar10; uint *puVar11; void *__s; long lVar12; ulong uVar13; ulong uVar14; long *plVar15; int iVar16; ulong uVar17; plVar15 = param_1; if (*(int *)((long)param_1 + 0x14) < *(int *)((long)param_2 + 0x14)) { plVar15 = param_2; param_2 = param_1; } iVar4 = *(int *)((long)plVar15 + 0x14); iVar5 = *(int *)((long)param_2 + 0x14); uVar17 = (long)iVar4 + (long)iVar5; iVar16 = (int)uVar17; puVar8 = (int8 *)Balloc((uint)(*(int *)((long)plVar15 + 0xc) < iVar16) + (int)plVar15[1]); __s = (void *)*puVar8; if (0 < iVar16) { pvVar1 = (void *)((long)__s + uVar17 * 4); pvVar10 = (void *)((long)__s + 4U); if ((void *)((long)__s + 4U) < pvVar1) { pvVar10 = pvVar1; } memset(__s,0,(~(ulong)__s + (long)pvVar10 & 0xfffffffffffffffc) + 4); __s = (void *)*puVar8; } if (0 < iVar5) { lVar7 = *plVar15; puVar11 = (uint *)*param_2; puVar2 = puVar11 + iVar5; do { uVar6 = *puVar11; if ((ulong)uVar6 != 0) { lVar12 = 0; uVar13 = 0; do { puVar3 = (uint *)(lVar7 + lVar12); uVar14 = *(uint *)((long)__s + lVar12) + uVar13 + (ulong)*puVar3 * (ulong)uVar6; uVar13 = uVar14 >> 0x20; *(int *)((long)__s + lVar12) = (int)uVar14; lVar12 = lVar12 + 4; } while (puVar3 + 1 < (uint *)(lVar7 + (long)iVar4 * 4)); *(int *)((long)__s + lVar12) = (int)(uVar14 >> 0x20); } puVar11 = puVar11 + 1; __s = (void *)((long)__s + 4); } while (puVar11 < puVar2); __s = (void *)*puVar8; } if (0 < iVar16) { piVar9 = (int *)((long)__s + uVar17 * 4); do { piVar9 = piVar9 + -1; if (*piVar9 != 0) goto LAB_001d4e37; iVar4 = (int)uVar17; uVar17 = (ulong)(iVar4 - 1); } while (1 < iVar4); uVar17 = 0; } LAB_001d4e37: *(int *)((long)puVar8 + 0x14) = (int)uVar17; return puVar8; }
40,166
js_parse_skip_parens_token
bluesky950520[P]quickjs/quickjs.c
static int js_parse_skip_parens_token(JSParseState *s, int *pbits, BOOL no_line_terminator) { char state[256]; size_t level = 0; JSParsePos pos; int last_tok, tok = TOK_EOF; int c, tok_len, bits = 0; /* protect from underflow */ state[level++] = 0; js_parse_get_pos(s, &pos); last_tok = 0; for (;;) { switch(s->token.val) { case '(': case '[': case '{': if (level >= sizeof(state)) goto done; state[level++] = s->token.val; break; case ')': if (state[--level] != '(') goto done; break; case ']': if (state[--level] != '[') goto done; break; case '}': c = state[--level]; if (c == '`') { /* continue the parsing of the template */ free_token(s, &s->token); /* Resume TOK_TEMPLATE parsing (s->token.line_num and * s->token.ptr are OK) */ s->got_lf = FALSE; s->last_line_num = s->token.line_num; s->last_col_num = s->token.col_num; if (js_parse_template_part(s, s->buf_ptr)) goto done; goto handle_template; } else if (c != '{') { goto done; } break; case TOK_TEMPLATE: handle_template: if (s->token.u.str.sep != '`') { /* '${' inside the template : closing '}' and continue parsing the template */ if (level >= sizeof(state)) goto done; state[level++] = '`'; } break; case TOK_EOF: goto done; case ';': if (level == 2) { bits |= SKIP_HAS_SEMI; } break; case TOK_ELLIPSIS: if (level == 2) { bits |= SKIP_HAS_ELLIPSIS; } break; case '=': bits |= SKIP_HAS_ASSIGNMENT; break; case TOK_DIV_ASSIGN: tok_len = 2; goto parse_regexp; case '/': tok_len = 1; parse_regexp: if (is_regexp_allowed(last_tok)) { s->buf_ptr -= tok_len; if (js_parse_regexp(s)) { /* XXX: should clear the exception */ goto done; } } break; } /* last_tok is only used to recognize regexps */ if (s->token.val == TOK_IDENT && (token_is_pseudo_keyword(s, JS_ATOM_of) || token_is_pseudo_keyword(s, JS_ATOM_yield))) { last_tok = TOK_OF; } else { last_tok = s->token.val; } if (next_token(s)) { /* XXX: should clear the exception generated by next_token() */ break; } if (level <= 1) { tok = s->token.val; if (token_is_pseudo_keyword(s, JS_ATOM_of)) tok = TOK_OF; if (no_line_terminator && s->last_line_num != s->token.line_num) tok = '\n'; break; } } done: if (pbits) { *pbits = bits; } if (js_parse_seek_token(s, &pos)) return -1; return tok; }
O1
c
js_parse_skip_parens_token: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x158, %rsp # imm = 0x158 movl %edx, 0x8(%rsp) movq %rsi, 0x18(%rsp) movq %rdi, %rbx movb $0x0, 0x50(%rsp) movsd 0x8(%rdi), %xmm0 movaps %xmm0, 0x40(%rsp) movsd 0x24(%rdi), %xmm0 movaps %xmm0, 0x30(%rsp) movq 0x30(%rdi), %rax movq %rax, 0x10(%rsp) movups 0x80(%rdi), %xmm0 movaps %xmm0, 0x20(%rsp) movl 0x58(%rdi), %eax movl %eax, 0xc(%rsp) leaq 0x20(%rdi), %r15 xorl %r14d, %r14d movl $0x1, %r12d xorl %ebp, %ebp movl (%r15), %r13d cmpl $0x3a, %r13d jg 0x63566 cmpl $-0x57, %r13d jle 0x6358f cmpl $0x28, %r13d jle 0x63609 cmpl $0x29, %r13d je 0x636b4 cmpl $0x2f, %r13d jne 0x636bf movq $-0x1, %rax jmp 0x635d8 cmpl $0x5c, %r13d jg 0x635c1 cmpl $0x3b, %r13d je 0x63629 cmpl $0x3d, %r13d je 0x63646 cmpl $0x5b, %r13d je 0x6360f jmp 0x636bf cmpl $-0x7e, %r13d je 0x63696 movq $-0x2, %rax cmpl $-0x7a, %r13d je 0x635d8 cmpl $-0x5b, %r13d jne 0x636bf movl %ebp, %eax orl $0x2, %eax cmpq $0x2, %r12 cmovel %eax, %ebp jmp 0x636bf cmpl $0x5d, %r13d je 0x63639 cmpl $0x7d, %r13d je 0x6364b cmpl $0x7b, %r13d je 0x6360f jmp 0x636bf cmpl $0x28, %r14d jg 0x636fe subl $-0x80, %r14d cmpl $0x32, %r14d ja 0x63710 movabsq $0x438000030001b, %rcx # imm = 0x438000030001B btq %r14, %rcx jb 0x636bf jmp 0x63710 jne 0x63722 cmpq $0xff, %r12 ja 0x6372a movb %r13b, 0x50(%rsp,%r12) incq %r12 jmp 0x636bf xorl %eax, %eax cmpq $0x2, %r12 sete %al orl %eax, %ebp jmp 0x636bf cmpb $0x5b, 0x4f(%rsp,%r12) je 0x636bc jmp 0x6372a orl $0x4, %ebp jmp 0x636bf movzbl 0x4f(%rsp,%r12), %eax decq %r12 cmpl $0x7b, %eax je 0x636bf movl $0xffffffaa, %r13d # imm = 0xFFFFFFAA cmpl $0x60, %eax jne 0x63765 movq %rbx, %rdi movq %r15, %rsi callq 0x344fa movl $0x0, 0x58(%rbx) movq 0x24(%rbx), %rax movq 0x70(%rbx), %rsi movq %rax, 0x8(%rbx) movq %rbx, %rdi callq 0x5f0a7 testl %eax, %eax jne 0x63765 cmpl $0x60, 0x48(%rbx) je 0x636bf cmpq $0xff, %r12 ja 0x6372a movb $0x60, 0x50(%rsp,%r12) jmp 0x63621 cmpb $0x28, 0x4f(%rsp,%r12) jne 0x6372a decq %r12 movl (%r15), %r14d cmpl $-0x7d, %r14d jne 0x636e6 cmpl $0x44, 0x38(%rbx) jne 0x636d4 cmpl $0x0, 0x3c(%rbx) je 0x636e0 cmpl $0x2d, 0x38(%rbx) jne 0x636e6 cmpl $0x0, 0x3c(%rbx) jne 0x636e6 movl $0xffffffd9, %r14d # imm = 0xFFFFFFD9 movq %rbx, %rdi callq 0x5d1cf testl %eax, %eax jne 0x6372a cmpq $0x1, %r12 ja 0x63530 jmp 0x63732 cmpl $0x29, %r14d je 0x636bf cmpl $0x5d, %r14d je 0x636bf cmpl $0x7d, %r14d je 0x636bf addq %rax, 0x70(%rbx) movq %rbx, %rdi callq 0x652b2 testl %eax, %eax je 0x636bf jmp 0x6372a cmpl $-0x56, %r13d jne 0x636bf jmp 0x63765 movl $0xffffffaa, %r13d # imm = 0xFFFFFFAA jmp 0x63765 movl (%r15), %r13d cmpl $-0x7d, %r13d jne 0x6374e cmpl $0x44, 0x38(%rbx) jne 0x6374e cmpl $0x0, 0x3c(%rbx) movl $0xffffffd9, %eax # imm = 0xFFFFFFD9 cmovel %eax, %r13d movl 0x8(%rsp), %eax testl %eax, %eax je 0x63765 movl 0x8(%rbx), %eax cmpl 0x24(%rbx), %eax movl $0xa, %eax cmovnel %eax, %r13d movq 0x18(%rsp), %rax testq %rax, %rax je 0x63771 movl %ebp, (%rax) movaps 0x40(%rsp), %xmm0 movlps %xmm0, 0x24(%rbx) movaps 0x30(%rsp), %xmm0 movlps %xmm0, 0x10(%rbx) movq 0x10(%rsp), %rax movq %rax, 0x70(%rbx) movaps 0x20(%rsp), %xmm0 movups %xmm0, 0x80(%rbx) movl 0xc(%rsp), %eax movl %eax, 0x58(%rbx) movq %rbx, %rdi callq 0x5d1cf xorl %ecx, %ecx negl %eax sbbl %ecx, %ecx orl %r13d, %ecx movl %ecx, %eax addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_parse_skip_parens_token: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 158h mov [rsp+188h+var_180], edx mov [rsp+188h+var_170], rsi mov rbx, rdi mov [rsp+188h+var_138], 0 movsd xmm0, qword ptr [rdi+8] movaps [rsp+188h+var_148], xmm0 movsd xmm0, qword ptr [rdi+24h] movaps [rsp+188h+var_158], xmm0 mov rax, [rdi+30h] mov [rsp+188h+var_178], rax movups xmm0, xmmword ptr [rdi+80h] movaps [rsp+188h+var_168], xmm0 mov eax, [rdi+58h] mov [rsp+188h+var_17C], eax lea r15, [rdi+20h] xor r14d, r14d mov r12d, 1 xor ebp, ebp loc_63530: mov r13d, [r15] cmp r13d, 3Ah ; ':' jg short loc_63566 cmp r13d, 0FFFFFFA9h jle short loc_6358F cmp r13d, 28h ; '(' jle loc_63609 cmp r13d, 29h ; ')' jz loc_636B4 cmp r13d, 2Fh ; '/' jnz loc_636BF mov rax, 0FFFFFFFFFFFFFFFFh jmp short loc_635D8 loc_63566: cmp r13d, 5Ch ; '\' jg short loc_635C1 cmp r13d, 3Bh ; ';' jz loc_63629 cmp r13d, 3Dh ; '=' jz loc_63646 cmp r13d, 5Bh ; '[' jz loc_6360F jmp loc_636BF loc_6358F: cmp r13d, 0FFFFFF82h jz loc_63696 mov rax, 0FFFFFFFFFFFFFFFEh cmp r13d, 0FFFFFF86h jz short loc_635D8 cmp r13d, 0FFFFFFA5h jnz loc_636BF mov eax, ebp or eax, 2 cmp r12, 2 cmovz ebp, eax jmp loc_636BF loc_635C1: cmp r13d, 5Dh ; ']' jz short loc_63639 cmp r13d, 7Dh ; '}' jz short loc_6364B cmp r13d, 7Bh ; '{' jz short loc_6360F jmp loc_636BF loc_635D8: cmp r14d, 28h ; '(' jg loc_636FE sub r14d, 0FFFFFF80h cmp r14d, 32h ; '2' ja loc_63710 mov rcx, 438000030001Bh bt rcx, r14 jb loc_636BF jmp loc_63710 loc_63609: jnz loc_63722 loc_6360F: cmp r12, 0FFh ja loc_6372A mov [rsp+r12+188h+var_138], r13b loc_63621: inc r12 jmp loc_636BF loc_63629: xor eax, eax cmp r12, 2 setz al or ebp, eax jmp loc_636BF loc_63639: cmp byte ptr [rsp+r12+188h+var_148+0Fh], 5Bh ; '[' jz short loc_636BC jmp loc_6372A loc_63646: or ebp, 4 jmp short loc_636BF loc_6364B: movzx eax, byte ptr [rsp+r12+188h+var_148+0Fh] dec r12 cmp eax, 7Bh ; '{' jz short loc_636BF mov r13d, 0FFFFFFAAh cmp eax, 60h ; '`' jnz loc_63765 mov rdi, rbx mov rsi, r15 call free_token mov dword ptr [rbx+58h], 0 mov rax, [rbx+24h] mov rsi, [rbx+70h] mov [rbx+8], rax mov rdi, rbx call js_parse_template_part test eax, eax jnz loc_63765 loc_63696: cmp dword ptr [rbx+48h], 60h ; '`' jz short loc_636BF cmp r12, 0FFh ja loc_6372A mov [rsp+r12+188h+var_138], 60h ; '`' jmp loc_63621 loc_636B4: cmp byte ptr [rsp+r12+188h+var_148+0Fh], 28h ; '(' jnz short loc_6372A loc_636BC: dec r12 loc_636BF: mov r14d, [r15] cmp r14d, 0FFFFFF83h jnz short loc_636E6 cmp dword ptr [rbx+38h], 44h ; 'D' jnz short loc_636D4 cmp dword ptr [rbx+3Ch], 0 jz short loc_636E0 loc_636D4: cmp dword ptr [rbx+38h], 2Dh ; '-' jnz short loc_636E6 cmp dword ptr [rbx+3Ch], 0 jnz short loc_636E6 loc_636E0: mov r14d, 0FFFFFFD9h loc_636E6: mov rdi, rbx call next_token test eax, eax jnz short loc_6372A cmp r12, 1 ja loc_63530 jmp short loc_63732 loc_636FE: cmp r14d, 29h ; ')' jz short loc_636BF cmp r14d, 5Dh ; ']' jz short loc_636BF cmp r14d, 7Dh ; '}' jz short loc_636BF loc_63710: add [rbx+70h], rax mov rdi, rbx call js_parse_regexp test eax, eax jz short loc_636BF jmp short loc_6372A loc_63722: cmp r13d, 0FFFFFFAAh jnz short loc_636BF jmp short loc_63765 loc_6372A: mov r13d, 0FFFFFFAAh jmp short loc_63765 loc_63732: mov r13d, [r15] cmp r13d, 0FFFFFF83h jnz short loc_6374E cmp dword ptr [rbx+38h], 44h ; 'D' jnz short loc_6374E cmp dword ptr [rbx+3Ch], 0 mov eax, 0FFFFFFD9h cmovz r13d, eax loc_6374E: mov eax, [rsp+188h+var_180] test eax, eax jz short loc_63765 mov eax, [rbx+8] cmp eax, [rbx+24h] mov eax, 0Ah cmovnz r13d, eax loc_63765: mov rax, [rsp+188h+var_170] test rax, rax jz short loc_63771 mov [rax], ebp loc_63771: movaps xmm0, [rsp+188h+var_148] movlps qword ptr [rbx+24h], xmm0 movaps xmm0, [rsp+188h+var_158] movlps qword ptr [rbx+10h], xmm0 mov rax, [rsp+188h+var_178] mov [rbx+70h], rax movaps xmm0, [rsp+188h+var_168] movups xmmword ptr [rbx+80h], xmm0 mov eax, [rsp+188h+var_17C] mov [rbx+58h], eax mov rdi, rbx call next_token xor ecx, ecx neg eax sbb ecx, ecx or ecx, r13d mov eax, ecx add rsp, 158h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_parse_skip_parens_token( long long a1, char *a2, long long a3, long long a4, long long a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { __m128 v14; // xmm0 int *v15; // r15 int v16; // r14d unsigned long long v17; // r12 int v18; // ebp int v19; // r13d long long v20; // rax unsigned long long v21; // r14 int v22; // eax double v23; // xmm4_8 double v24; // xmm5_8 int v26; // [rsp+8h] [rbp-180h] int v27; // [rsp+Ch] [rbp-17Ch] long long v28; // [rsp+10h] [rbp-178h] char *v29; // [rsp+18h] [rbp-170h] __m128 v30; // [rsp+30h] [rbp-158h] __m128 v31; // [rsp+40h] [rbp-148h] _BYTE v32[312]; // [rsp+50h] [rbp-138h] v26 = a3; v29 = a2; v32[0] = 0; v31 = (__m128)*(unsigned long long *)(a1 + 8); v30 = (__m128)*(unsigned long long *)(a1 + 36); v28 = *(_QWORD *)(a1 + 48); v14 = *(__m128 *)(a1 + 128); v27 = *(_DWORD *)(a1 + 88); v15 = (int *)(a1 + 32); v16 = 0; v17 = 1LL; v18 = 0; do { v19 = *v15; if ( *v15 > 58 ) { if ( v19 > 92 ) { if ( v19 == 93 ) { if ( v31.m128_i8[v17 + 15] != 91 ) goto LABEL_59; goto LABEL_42; } if ( v19 == 125 ) { v22 = v31.m128_u8[v17-- + 15]; if ( v22 == 123 ) goto LABEL_43; v19 = -86; if ( v22 != 96 ) goto LABEL_67; free_token((long long *)a1, v15); *(_DWORD *)(a1 + 88) = 0; a2 = *(char **)(a1 + 112); *(_QWORD *)(a1 + 8) = *(_QWORD *)(a1 + 36); if ( (unsigned int)js_parse_template_part(a1, a2, *(double *)v14.m128_u64, a8, a9, a10, v23, v24, a13, a14) ) goto LABEL_67; LABEL_38: if ( *(_DWORD *)(a1 + 72) == 96 ) goto LABEL_43; if ( v17 > 0xFF ) goto LABEL_59; v32[v17] = 96; LABEL_30: ++v17; goto LABEL_43; } if ( v19 != 123 ) goto LABEL_43; } else { if ( v19 == 59 ) { v18 |= v17 == 2; goto LABEL_43; } if ( v19 == 61 ) { v18 |= 4u; goto LABEL_43; } if ( v19 != 91 ) goto LABEL_43; } LABEL_28: if ( v17 > 0xFF ) goto LABEL_59; v32[v17] = v19; goto LABEL_30; } if ( v19 <= -87 ) { if ( v19 == -126 ) goto LABEL_38; v20 = -2LL; if ( v19 != -122 ) { if ( v19 == -91 && v17 == 2 ) v18 |= 2u; goto LABEL_43; } goto LABEL_23; } if ( v19 > 40 ) { if ( v19 != 41 ) { if ( v19 != 47 ) goto LABEL_43; v20 = -1LL; LABEL_23: if ( v16 > 40 ) { if ( v16 == 41 || v16 == 93 || v16 == 125 ) goto LABEL_43; } else { v21 = (unsigned int)(v16 + 128); if ( (unsigned int)v21 <= 0x32 ) { a4 = 0x438000030001BLL; if ( _bittest64(&a4, v21) ) goto LABEL_43; } } *(_QWORD *)(a1 + 112) += v20; if ( (unsigned int)js_parse_regexp(a1) ) goto LABEL_59; goto LABEL_43; } if ( v31.m128_i8[v17 + 15] != 40 ) goto LABEL_59; LABEL_42: --v17; goto LABEL_43; } if ( v19 == 40 ) goto LABEL_28; if ( v19 == -86 ) goto LABEL_67; LABEL_43: v16 = *v15; if ( *v15 == -125 && (*(_DWORD *)(a1 + 56) == 68 && !*(_DWORD *)(a1 + 60) || *(_DWORD *)(a1 + 56) == 45 && !*(_DWORD *)(a1 + 60)) ) { v16 = -39; } if ( (unsigned int)next_token(a1, v14, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, a5, a6) ) { LABEL_59: v19 = -86; goto LABEL_67; } } while ( v17 > 1 ); v19 = *v15; if ( *v15 == -125 && *(_DWORD *)(a1 + 56) == 68 && !*(_DWORD *)(a1 + 60) ) v19 = -39; if ( v26 && *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 36) ) v19 = 10; LABEL_67: if ( v29 ) *(_DWORD *)v29 = v18; _mm_storel_ps((double *)(a1 + 36), v31); _mm_storel_ps((double *)(a1 + 16), v30); *(_QWORD *)(a1 + 112) = v28; *(__m128 *)(a1 + 128) = v14; *(_DWORD *)(a1 + 88) = v27; return v19 | (unsigned int)-((unsigned int)next_token( a1, v14, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, a5, a6) != 0); }
40,167
js_parse_skip_parens_token
bluesky950520[P]quickjs/quickjs.c
static int js_parse_skip_parens_token(JSParseState *s, int *pbits, BOOL no_line_terminator) { char state[256]; size_t level = 0; JSParsePos pos; int last_tok, tok = TOK_EOF; int c, tok_len, bits = 0; /* protect from underflow */ state[level++] = 0; js_parse_get_pos(s, &pos); last_tok = 0; for (;;) { switch(s->token.val) { case '(': case '[': case '{': if (level >= sizeof(state)) goto done; state[level++] = s->token.val; break; case ')': if (state[--level] != '(') goto done; break; case ']': if (state[--level] != '[') goto done; break; case '}': c = state[--level]; if (c == '`') { /* continue the parsing of the template */ free_token(s, &s->token); /* Resume TOK_TEMPLATE parsing (s->token.line_num and * s->token.ptr are OK) */ s->got_lf = FALSE; s->last_line_num = s->token.line_num; s->last_col_num = s->token.col_num; if (js_parse_template_part(s, s->buf_ptr)) goto done; goto handle_template; } else if (c != '{') { goto done; } break; case TOK_TEMPLATE: handle_template: if (s->token.u.str.sep != '`') { /* '${' inside the template : closing '}' and continue parsing the template */ if (level >= sizeof(state)) goto done; state[level++] = '`'; } break; case TOK_EOF: goto done; case ';': if (level == 2) { bits |= SKIP_HAS_SEMI; } break; case TOK_ELLIPSIS: if (level == 2) { bits |= SKIP_HAS_ELLIPSIS; } break; case '=': bits |= SKIP_HAS_ASSIGNMENT; break; case TOK_DIV_ASSIGN: tok_len = 2; goto parse_regexp; case '/': tok_len = 1; parse_regexp: if (is_regexp_allowed(last_tok)) { s->buf_ptr -= tok_len; if (js_parse_regexp(s)) { /* XXX: should clear the exception */ goto done; } } break; } /* last_tok is only used to recognize regexps */ if (s->token.val == TOK_IDENT && (token_is_pseudo_keyword(s, JS_ATOM_of) || token_is_pseudo_keyword(s, JS_ATOM_yield))) { last_tok = TOK_OF; } else { last_tok = s->token.val; } if (next_token(s)) { /* XXX: should clear the exception generated by next_token() */ break; } if (level <= 1) { tok = s->token.val; if (token_is_pseudo_keyword(s, JS_ATOM_of)) tok = TOK_OF; if (no_line_terminator && s->last_line_num != s->token.line_num) tok = '\n'; break; } } done: if (pbits) { *pbits = bits; } if (js_parse_seek_token(s, &pos)) return -1; return tok; }
O2
c
js_parse_skip_parens_token: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x148, %rsp # imm = 0x148 movl %edx, 0xc(%rsp) movq %rsi, (%rsp) movq %rdi, %rbx movb $0x0, 0x40(%rsp) movsd 0x24(%rdi), %xmm0 movsd 0x8(%rdi), %xmm1 movlhps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0] movaps %xmm1, 0x10(%rsp) movq 0x30(%rdi), %rax movq %rax, 0x28(%rsp) movups 0x80(%rdi), %xmm0 movaps %xmm0, 0x30(%rsp) movl 0x58(%rdi), %eax movl %eax, 0x20(%rsp) leaq 0x20(%rdi), %r15 xorl %ebp, %ebp pushq $0x1 popq %r14 pushq $-0x2 popq %r12 xorl %r13d, %r13d movl (%r15), %eax cmpl $-0x7e, %eax je 0x5512c movq %r12, %rcx cmpl $-0x7a, %eax je 0x55093 cmpl $-0x5b, %eax je 0x5507b cmpl $0x28, %eax je 0x55134 cmpl $0x29, %eax je 0x55163 cmpl $0x2f, %eax je 0x55090 cmpl $0x3b, %eax je 0x55153 cmpl $0x3d, %eax je 0x5514b cmpl $0x5b, %eax je 0x55134 cmpl $0x5d, %eax je 0x5516d cmpl $0x7b, %eax je 0x55134 cmpl $0x7d, %eax je 0x550e6 cmpl $-0x56, %eax jne 0x5517b jmp 0x55236 movl %r13d, %eax orl $0x2, %eax cmpq $0x2, %r14 cmovel %eax, %r13d pushq $-0x5b jmp 0x55191 pushq $-0x1 popq %rcx leal 0x80(%rbp), %eax cmpl $0x32, %eax ja 0x550b2 movabsq $0x438000030001b, %rdx # imm = 0x438000030001B btq %rax, %rdx jb 0x55178 cmpl $0x29, %ebp je 0x55178 cmpl $0x5d, %ebp je 0x55178 cmpl $0x7d, %ebp je 0x55178 addq %rcx, 0x70(%rbx) movq %rbx, %rdi callq 0x56540 testl %eax, %eax je 0x55178 jmp 0x551ca movzbl 0x3f(%rsp,%r14), %eax decq %r14 cmpl $0x7b, %eax je 0x551c6 cmpl $0x60, %eax jne 0x551ca movq %rbx, %rdi movq %r15, %rsi callq 0x2da5b andl $0x0, 0x58(%rbx) movq 0x24(%rbx), %rax movq 0x70(%rbx), %rsi movq %rax, 0x8(%rbx) movq %rbx, %rdi callq 0x5138c testl %eax, %eax jne 0x551ca cmpl $0x60, 0x48(%rbx) je 0x55178 movb $0x60, %al cmpq $0xff, %r14 ja 0x551ca movb %al, 0x40(%rsp,%r14) incq %r14 jmp 0x55178 orl $0x4, %r13d pushq $0x3d jmp 0x55191 xorl %eax, %eax cmpq $0x2, %r14 sete %al orl %eax, %r13d pushq $0x3b jmp 0x55191 cmpb $0x28, 0x3f(%rsp,%r14) je 0x55175 jmp 0x551ca cmpb $0x5b, 0x3f(%rsp,%r14) jne 0x551ca decq %r14 movl (%r15), %eax cmpl $-0x7d, %eax jne 0x55192 movq %rbx, %rdi pushq $0x44 popq %rsi callq 0x51b2a testl %eax, %eax je 0x551ac pushq $-0x27 popq %rax movl %eax, %ebp movq %rbx, %rdi callq 0x4fa4e testl %eax, %eax jne 0x551ca cmpq $0x1, %r14 ja 0x5500b jmp 0x551d4 movq %rbx, %rdi pushq $0x2d popq %rsi callq 0x51b2a testl %eax, %eax pushq $-0x27 popq %rax movl %eax, %ebp pushq $-0x7d popq %rax cmovel %eax, %ebp jmp 0x55194 pushq $0x7d jmp 0x55191 movq (%rsp), %rax pushq $-0x56 popq %r14 jmp 0x55204 movl 0x20(%rbx), %ebp pushq $0x44 popq %rsi movq %rbx, %rdi callq 0x51b2a testl %eax, %eax pushq $-0x27 popq %r14 cmovel %ebp, %r14d cmpl $0x0, 0xc(%rsp) je 0x55200 movl 0x8(%rbx), %eax cmpl 0x24(%rbx), %eax pushq $0xa popq %rax cmovnel %eax, %r14d movq (%rsp), %rax testq %rax, %rax je 0x5520c movl %r13d, (%rax) leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x51ad8 xorl %ecx, %ecx negl %eax sbbl %ecx, %ecx orl %r14d, %ecx movl %ecx, %eax addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %r14d jmp 0x55200
js_parse_skip_parens_token: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov [rsp+178h+var_16C], edx mov [rsp+178h+var_178], rsi mov rbx, rdi mov [rsp+178h+var_138], 0 movsd xmm0, qword ptr [rdi+24h] movsd xmm1, qword ptr [rdi+8] movlhps xmm1, xmm0 movaps [rsp+178h+var_168], xmm1 mov rax, [rdi+30h] mov [rsp+178h+var_150], rax movups xmm0, xmmword ptr [rdi+80h] movaps [rsp+178h+var_148], xmm0 mov eax, [rdi+58h] mov [rsp+178h+var_158], eax lea r15, [rdi+20h] xor ebp, ebp push 1 pop r14 push 0FFFFFFFFFFFFFFFEh pop r12 xor r13d, r13d loc_5500B: mov eax, [r15] cmp eax, 0FFFFFF82h jz loc_5512C mov rcx, r12 cmp eax, 0FFFFFF86h jz short loc_55093 cmp eax, 0FFFFFFA5h jz short loc_5507B cmp eax, 28h ; '(' jz loc_55134 cmp eax, 29h ; ')' jz loc_55163 cmp eax, 2Fh ; '/' jz short loc_55090 cmp eax, 3Bh ; ';' jz loc_55153 cmp eax, 3Dh ; '=' jz loc_5514B cmp eax, 5Bh ; '[' jz loc_55134 cmp eax, 5Dh ; ']' jz loc_5516D cmp eax, 7Bh ; '{' jz loc_55134 cmp eax, 7Dh ; '}' jz short loc_550E6 cmp eax, 0FFFFFFAAh jnz loc_5517B jmp loc_55236 loc_5507B: mov eax, r13d or eax, 2 cmp r14, 2 cmovz r13d, eax push 0FFFFFFFFFFFFFFA5h jmp loc_55191 loc_55090: push 0FFFFFFFFFFFFFFFFh pop rcx loc_55093: lea eax, [rbp+80h] cmp eax, 32h ; '2' ja short loc_550B2 mov rdx, 438000030001Bh bt rdx, rax jb loc_55178 loc_550B2: cmp ebp, 29h ; ')' jz loc_55178 cmp ebp, 5Dh ; ']' jz loc_55178 cmp ebp, 7Dh ; '}' jz loc_55178 add [rbx+70h], rcx mov rdi, rbx call js_parse_regexp test eax, eax jz loc_55178 jmp loc_551CA loc_550E6: movzx eax, byte ptr [rsp+r14+178h+var_148+0Fh] dec r14 cmp eax, 7Bh ; '{' jz loc_551C6 cmp eax, 60h ; '`' jnz loc_551CA mov rdi, rbx mov rsi, r15 call free_token and dword ptr [rbx+58h], 0 mov rax, [rbx+24h] mov rsi, [rbx+70h] mov [rbx+8], rax mov rdi, rbx call js_parse_template_part test eax, eax jnz loc_551CA loc_5512C: cmp dword ptr [rbx+48h], 60h ; '`' jz short loc_55178 mov al, 60h ; '`' loc_55134: cmp r14, 0FFh ja loc_551CA mov [rsp+r14+178h+var_138], al inc r14 jmp short loc_55178 loc_5514B: or r13d, 4 push 3Dh ; '=' jmp short loc_55191 loc_55153: xor eax, eax cmp r14, 2 setz al or r13d, eax push 3Bh ; ';' jmp short loc_55191 loc_55163: cmp byte ptr [rsp+r14+178h+var_148+0Fh], 28h ; '(' jz short loc_55175 jmp short loc_551CA loc_5516D: cmp byte ptr [rsp+r14+178h+var_148+0Fh], 5Bh ; '[' jnz short loc_551CA loc_55175: dec r14 loc_55178: mov eax, [r15] loc_5517B: cmp eax, 0FFFFFF83h jnz short loc_55192 mov rdi, rbx push 44h ; 'D' pop rsi call token_is_pseudo_keyword test eax, eax jz short loc_551AC push 0FFFFFFFFFFFFFFD9h loc_55191: pop rax loc_55192: mov ebp, eax loc_55194: mov rdi, rbx call next_token test eax, eax jnz short loc_551CA cmp r14, 1 ja loc_5500B jmp short loc_551D4 loc_551AC: mov rdi, rbx push 2Dh ; '-' pop rsi call token_is_pseudo_keyword test eax, eax push 0FFFFFFFFFFFFFFD9h pop rax mov ebp, eax push 0FFFFFFFFFFFFFF83h pop rax cmovz ebp, eax jmp short loc_55194 loc_551C6: push 7Dh ; '}' jmp short loc_55191 loc_551CA: mov rax, [rsp+178h+var_178] push 0FFFFFFFFFFFFFFAAh pop r14 jmp short loc_55204 loc_551D4: mov ebp, [rbx+20h] push 44h ; 'D' pop rsi mov rdi, rbx call token_is_pseudo_keyword test eax, eax push 0FFFFFFFFFFFFFFD9h pop r14 cmovz r14d, ebp cmp [rsp+178h+var_16C], 0 jz short loc_55200 mov eax, [rbx+8] cmp eax, [rbx+24h] push 0Ah pop rax cmovnz r14d, eax loc_55200: mov rax, [rsp+178h+var_178] loc_55204: test rax, rax jz short loc_5520C mov [rax], r13d loc_5520C: lea rsi, [rsp+178h+var_168] mov rdi, rbx call js_parse_seek_token xor ecx, ecx neg eax sbb ecx, ecx or ecx, r14d mov eax, ecx add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_55236: mov r14d, eax jmp short loc_55200
long long js_parse_skip_parens_token( long long a1, char *a2, long long a3, long long a4, long long a5, long long a6, double a7, double a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { __m128 v14; // xmm1 __m128 v15; // xmm0 int *v16; // r15 int v17; // ebp unsigned long long v18; // r14 int v19; // r13d int v20; // eax unsigned long long v21; // rax int v22; // eax double v23; // xmm4_8 double v24; // xmm5_8 char *v25; // rax int v26; // ebp BOOL is_pseudo_keyword; // eax int v29; // r14d int v30; // [rsp-8h] [rbp-180h] char *v31; // [rsp+0h] [rbp-178h] int v32; // [rsp+Ch] [rbp-16Ch] __m128 v33; // [rsp+10h] [rbp-168h] BYREF int v34; // [rsp+20h] [rbp-158h] long long v35; // [rsp+28h] [rbp-150h] __m128 v36; // [rsp+30h] [rbp-148h] _BYTE v37[312]; // [rsp+40h] [rbp-138h] v32 = a3; v31 = a2; v37[0] = 0; v14 = _mm_movelh_ps((__m128)*(unsigned long long *)(a1 + 8), (__m128)*(unsigned long long *)(a1 + 36)); v33 = v14; v35 = *(_QWORD *)(a1 + 48); v15 = *(__m128 *)(a1 + 128); v36 = v15; v34 = *(_DWORD *)(a1 + 88); v16 = (int *)(a1 + 32); v17 = 0; v18 = 1LL; v19 = 0; do { v20 = *v16; if ( *v16 == -126 ) goto LABEL_30; a4 = -2LL; switch ( v20 ) { case -122: goto LABEL_20; case -91: if ( v18 == 2 ) v19 |= 2u; v30 = -91; goto LABEL_44; case 40: goto LABEL_32; case 41: if ( v36.m128_i8[v18 + 15] != 40 ) goto LABEL_53; LABEL_39: --v18; goto LABEL_40; case 47: a4 = -1LL; LABEL_20: v21 = (unsigned int)(v17 + 128); if ( (unsigned int)v21 > 0x32 || (a3 = 0x438000030001BLL, !_bittest64(&a3, v21)) ) { if ( v17 != 41 && v17 != 93 && v17 != 125 ) { *(_QWORD *)(a1 + 112) += a4; if ( (unsigned int)js_parse_regexp(a1) ) { LABEL_53: v25 = v31; v29 = -86; goto LABEL_60; } } } goto LABEL_40; case 59: v19 |= v18 == 2; v30 = 59; goto LABEL_44; case 61: v19 |= 4u; v30 = 61; LABEL_44: v20 = v30; LABEL_45: v17 = v20; goto LABEL_46; case 91: goto LABEL_32; case 93: if ( v36.m128_i8[v18 + 15] != 91 ) goto LABEL_53; goto LABEL_39; case 123: goto LABEL_32; case 125: v22 = v36.m128_u8[v18-- + 15]; if ( v22 == 123 ) { v30 = 125; goto LABEL_44; } if ( v22 != 96 ) goto LABEL_53; free_token((long long *)a1, v16); *(_DWORD *)(a1 + 88) = 0; a2 = *(char **)(a1 + 112); *(_QWORD *)(a1 + 8) = *(_QWORD *)(a1 + 36); if ( (unsigned int)js_parse_template_part(a1, a2, v15, v14, a9, a10, v23, v24, a13, a14) ) goto LABEL_53; LABEL_30: if ( *(_DWORD *)(a1 + 72) != 96 ) { LOBYTE(v20) = 96; LABEL_32: if ( v18 > 0xFF ) goto LABEL_53; v37[v18++] = v20; } LABEL_40: v20 = *v16; break; case -86: v29 = -86; goto LABEL_59; } if ( v20 != -125 ) goto LABEL_45; a2 = (char *)&dword_44; if ( token_is_pseudo_keyword((_DWORD *)a1, 68) ) { v30 = -39; goto LABEL_44; } a2 = (_BYTE *)(&qword_28 + 5); v17 = -39; if ( !token_is_pseudo_keyword((_DWORD *)a1, 45) ) v17 = -125; LABEL_46: if ( (unsigned int)next_token(a1, (long long)a2, a3, v15, v14, a9, a10, a11, a12, a13, a14, a4, a5, a6) ) goto LABEL_53; } while ( v18 > 1 ); v26 = *(_DWORD *)(a1 + 32); is_pseudo_keyword = token_is_pseudo_keyword((_DWORD *)a1, 68); v29 = -39; if ( !is_pseudo_keyword ) v29 = v26; if ( v32 && *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 36) ) v29 = 10; LABEL_59: v25 = v31; LABEL_60: if ( v25 ) *(_DWORD *)v25 = v19; return v29 | (unsigned int)-((unsigned int)js_parse_seek_token( a1, (long long)&v33, a3, a4, a5, a6, *(double *)v15.m128_u64, v14, a9, a10, a11, a12, a13, a14) != 0); }
js_parse_skip_parens_token: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV dword ptr [RSP + 0xc],EDX MOV qword ptr [RSP],RSI MOV RBX,RDI MOV byte ptr [RSP + 0x40],0x0 MOVSD XMM0,qword ptr [RDI + 0x24] MOVSD XMM1,qword ptr [RDI + 0x8] MOVLHPS XMM1,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM1 MOV RAX,qword ptr [RDI + 0x30] MOV qword ptr [RSP + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDI + 0x80] MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV EAX,dword ptr [RDI + 0x58] MOV dword ptr [RSP + 0x20],EAX LEA R15,[RDI + 0x20] XOR EBP,EBP PUSH 0x1 POP R14 PUSH -0x2 POP R12 XOR R13D,R13D LAB_0015500b: MOV EAX,dword ptr [R15] CMP EAX,-0x7e JZ 0x0015512c MOV RCX,R12 CMP EAX,-0x7a JZ 0x00155093 CMP EAX,-0x5b JZ 0x0015507b CMP EAX,0x28 JZ 0x00155134 CMP EAX,0x29 JZ 0x00155163 CMP EAX,0x2f JZ 0x00155090 CMP EAX,0x3b JZ 0x00155153 CMP EAX,0x3d JZ 0x0015514b CMP EAX,0x5b JZ 0x00155134 CMP EAX,0x5d JZ 0x0015516d CMP EAX,0x7b JZ 0x00155134 CMP EAX,0x7d JZ 0x001550e6 CMP EAX,-0x56 JNZ 0x0015517b JMP 0x00155236 LAB_0015507b: MOV EAX,R13D OR EAX,0x2 CMP R14,0x2 CMOVZ R13D,EAX PUSH -0x5b JMP 0x00155191 LAB_00155090: PUSH -0x1 POP RCX LAB_00155093: LEA EAX,[RBP + 0x80] CMP EAX,0x32 JA 0x001550b2 MOV RDX,0x438000030001b BT RDX,RAX JC 0x00155178 LAB_001550b2: CMP EBP,0x29 JZ 0x00155178 CMP EBP,0x5d JZ 0x00155178 CMP EBP,0x7d JZ 0x00155178 ADD qword ptr [RBX + 0x70],RCX MOV RDI,RBX CALL 0x00156540 TEST EAX,EAX JZ 0x00155178 JMP 0x001551ca LAB_001550e6: MOVZX EAX,byte ptr [RSP + R14*0x1 + 0x3f] DEC R14 CMP EAX,0x7b JZ 0x001551c6 CMP EAX,0x60 JNZ 0x001551ca MOV RDI,RBX MOV RSI,R15 CALL 0x0012da5b AND dword ptr [RBX + 0x58],0x0 MOV RAX,qword ptr [RBX + 0x24] MOV RSI,qword ptr [RBX + 0x70] MOV qword ptr [RBX + 0x8],RAX MOV RDI,RBX CALL 0x0015138c TEST EAX,EAX JNZ 0x001551ca LAB_0015512c: CMP dword ptr [RBX + 0x48],0x60 JZ 0x00155178 MOV AL,0x60 LAB_00155134: CMP R14,0xff JA 0x001551ca MOV byte ptr [RSP + R14*0x1 + 0x40],AL INC R14 JMP 0x00155178 LAB_0015514b: OR R13D,0x4 PUSH 0x3d JMP 0x00155191 LAB_00155153: XOR EAX,EAX CMP R14,0x2 SETZ AL OR R13D,EAX PUSH 0x3b JMP 0x00155191 LAB_00155163: CMP byte ptr [RSP + R14*0x1 + 0x3f],0x28 JZ 0x00155175 JMP 0x001551ca LAB_0015516d: CMP byte ptr [RSP + R14*0x1 + 0x3f],0x5b JNZ 0x001551ca LAB_00155175: DEC R14 LAB_00155178: MOV EAX,dword ptr [R15] LAB_0015517b: CMP EAX,-0x7d JNZ 0x00155192 MOV RDI,RBX PUSH 0x44 POP RSI CALL 0x00151b2a TEST EAX,EAX JZ 0x001551ac PUSH -0x27 LAB_00155191: POP RAX LAB_00155192: MOV EBP,EAX LAB_00155194: MOV RDI,RBX CALL 0x0014fa4e TEST EAX,EAX JNZ 0x001551ca CMP R14,0x1 JA 0x0015500b JMP 0x001551d4 LAB_001551ac: MOV RDI,RBX PUSH 0x2d POP RSI CALL 0x00151b2a TEST EAX,EAX PUSH -0x27 POP RAX MOV EBP,EAX PUSH -0x7d POP RAX CMOVZ EBP,EAX JMP 0x00155194 LAB_001551c6: PUSH 0x7d JMP 0x00155191 LAB_001551ca: MOV RAX,qword ptr [RSP] PUSH -0x56 POP R14 JMP 0x00155204 LAB_001551d4: MOV EBP,dword ptr [RBX + 0x20] PUSH 0x44 POP RSI MOV RDI,RBX CALL 0x00151b2a TEST EAX,EAX PUSH -0x27 POP R14 CMOVZ R14D,EBP CMP dword ptr [RSP + 0xc],0x0 JZ 0x00155200 MOV EAX,dword ptr [RBX + 0x8] CMP EAX,dword ptr [RBX + 0x24] PUSH 0xa POP RAX CMOVNZ R14D,EAX LAB_00155200: MOV RAX,qword ptr [RSP] LAB_00155204: TEST RAX,RAX JZ 0x0015520c MOV dword ptr [RAX],R13D LAB_0015520c: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00151ad8 XOR ECX,ECX NEG EAX SBB ECX,ECX OR ECX,R14D MOV EAX,ECX ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00155236: MOV R14D,EAX JMP 0x00155200
uint js_parse_skip_parens_token(long param_1,uint *param_2,int param_3) { int *piVar1; uint uVar2; int iVar3; int iVar4; long lVar5; uint uVar6; uint uVar7; ulong uVar8; int8 local_168; int8 uStack_160; int4 local_158; int8 local_150; int4 local_148; int4 uStack_144; int4 uStack_140; int4 uStack_13c; char local_138 [264]; local_138[0] = '\0'; uStack_160 = *(int8 *)(param_1 + 0x24); local_168 = *(int8 *)(param_1 + 8); local_150 = *(int8 *)(param_1 + 0x30); local_148 = *(int4 *)(param_1 + 0x80); uStack_144 = *(int4 *)(param_1 + 0x84); uStack_140 = *(int4 *)(param_1 + 0x88); uStack_13c = *(int4 *)(param_1 + 0x8c); local_158 = *(int4 *)(param_1 + 0x58); piVar1 = (int *)(param_1 + 0x20); iVar4 = 0; uVar8 = 1; uVar6 = 0; do { iVar3 = *piVar1; if (iVar3 != -0x7e) { lVar5 = -2; if (iVar3 == -0x7a) { LAB_00155093: if ((((0x32 < iVar4 + 0x80U) || ((0x438000030001bU >> ((ulong)(iVar4 + 0x80U) & 0x3f) & 1) == 0)) && (iVar4 != 0x29)) && ((iVar4 != 0x5d && (iVar4 != 0x7d)))) { *(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + lVar5; iVar4 = js_parse_regexp(param_1); if (iVar4 != 0) goto LAB_001551ca; } goto LAB_00155178; } if (iVar3 == -0x5b) { if (uVar8 == 2) { uVar6 = uVar6 | 2; } iVar4 = -0x5b; goto LAB_00155194; } if (iVar3 == 0x28) goto LAB_00155134; if (iVar3 == 0x29) { if (local_138[uVar8 - 1] == '(') { LAB_00155175: uVar8 = uVar8 - 1; goto LAB_00155178; } goto LAB_001551ca; } if (iVar3 == 0x2f) { lVar5 = -1; goto LAB_00155093; } if (iVar3 == 0x3b) { uVar6 = uVar6 | uVar8 == 2; iVar4 = 0x3b; goto LAB_00155194; } if (iVar3 == 0x3d) { uVar6 = uVar6 | 4; iVar4 = 0x3d; goto LAB_00155194; } if (iVar3 == 0x5b) { LAB_00155134: if (uVar8 < 0x100) { local_138[uVar8] = (char)iVar3; uVar8 = uVar8 + 1; goto LAB_00155178; } LAB_001551ca: uVar7 = 0xffffffaa; } else { if (iVar3 == 0x5d) { if (local_138[uVar8 - 1] == '[') goto LAB_00155175; goto LAB_001551ca; } if (iVar3 == 0x7b) goto LAB_00155134; if (iVar3 == 0x7d) { lVar5 = uVar8 - 1; uVar8 = uVar8 - 1; if (local_138[lVar5] == '{') { iVar4 = 0x7d; goto LAB_00155194; } if (local_138[lVar5] == '`') { free_token(param_1,piVar1); *(int4 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x24); iVar4 = js_parse_template_part(param_1,*(int8 *)(param_1 + 0x70)); if (iVar4 == 0) goto LAB_0015512c; } goto LAB_001551ca; } if (iVar3 != -0x56) goto LAB_0015517b; uVar7 = 0xffffffaa; } goto LAB_00155204; } LAB_0015512c: if (*(int *)(param_1 + 0x48) != 0x60) { iVar3 = 0x60; goto LAB_00155134; } LAB_00155178: iVar3 = *piVar1; LAB_0015517b: iVar4 = iVar3; if (iVar3 == -0x7d) { iVar4 = token_is_pseudo_keyword(param_1,0x44); if (iVar4 == 0) { iVar3 = token_is_pseudo_keyword(param_1,0x2d); iVar4 = -0x27; if (iVar3 == 0) { iVar4 = -0x7d; } } else { iVar4 = -0x27; } } LAB_00155194: iVar3 = next_token(param_1); if (iVar3 != 0) goto LAB_001551ca; } while (1 < uVar8); uVar2 = *(uint *)(param_1 + 0x20); iVar4 = token_is_pseudo_keyword(param_1,0x44); uVar7 = 0xffffffd9; if (iVar4 == 0) { uVar7 = uVar2; } if ((param_3 != 0) && (*(int *)(param_1 + 8) != *(int *)(param_1 + 0x24))) { uVar7 = 10; } LAB_00155204: if (param_2 != (uint *)0x0) { *param_2 = uVar6; } iVar4 = js_parse_seek_token(param_1,&local_168); return -(uint)(iVar4 != 0) | uVar7; }
40,168
change_victim
eloqsql/mysys/waiting_threads.c
static void change_victim(WT_THD* found, struct deadlock_arg *arg) { if (found->weight < arg->victim->weight) { if (arg->victim != arg->thd) { rc_unlock(arg->victim->waiting_for); /* release the previous victim */ DBUG_ASSERT(arg->last_locked_rc == found->waiting_for); } arg->victim= found; arg->last_locked_rc= 0; } }
O3
c
change_victim: movq 0x58(%rdi), %rcx movq 0x10(%rsi), %rax cmpq 0x58(%rax), %rcx jae 0xa75be pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 cmpq (%rsi), %rax je 0xa75ae movq 0x28(%rax), %rdi addq $0x18, %rdi callq 0xa45d2 movq %r14, 0x10(%rbx) movq $0x0, 0x18(%rbx) popq %rbx popq %r14 popq %rbp retq nop
change_victim: mov rcx, [rdi+58h] mov rax, [rsi+10h] cmp rcx, [rax+58h] jnb short locret_A75BE push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi cmp rax, [rsi] jz short loc_A75AE mov rdi, [rax+28h] add rdi, 18h call my_rw_unlock loc_A75AE: mov [rbx+10h], r14 mov qword ptr [rbx+18h], 0 pop rbx pop r14 pop rbp locret_A75BE: retn
long long change_victim(long long a1, _QWORD *a2) { long long result; // rax result = a2[2]; if ( *(_QWORD *)(a1 + 88) < *(_QWORD *)(result + 88) ) { if ( result != *a2 ) result = my_rw_unlock(*(_QWORD *)(result + 40) + 24LL); a2[2] = a1; a2[3] = 0LL; } return result; }
change_victim: MOV RCX,qword ptr [RDI + 0x58] MOV RAX,qword ptr [RSI + 0x10] CMP RCX,qword ptr [RAX + 0x58] JNC 0x001a75be PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI CMP RAX,qword ptr [RSI] JZ 0x001a75ae MOV RDI,qword ptr [RAX + 0x28] ADD RDI,0x18 CALL 0x001a45d2 LAB_001a75ae: MOV qword ptr [RBX + 0x10],R14 MOV qword ptr [RBX + 0x18],0x0 POP RBX POP R14 POP RBP LAB_001a75be: RET
void change_victim(long param_1,long *param_2) { long lVar1; lVar1 = param_2[2]; if (*(ulong *)(param_1 + 0x58) < *(ulong *)(lVar1 + 0x58)) { if (lVar1 != *param_2) { my_rw_unlock(*(long *)(lVar1 + 0x28) + 0x18); } param_2[2] = param_1; param_2[3] = 0; } return; }
40,169
testing::KilledBySignal::operator()(int) const
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
bool KilledBySignal::operator()(int exit_status) const { #if defined(GTEST_KILLED_BY_SIGNAL_OVERRIDE_) { bool result; if (GTEST_KILLED_BY_SIGNAL_OVERRIDE_(signum_, exit_status, &result)) { return result; } } #endif // defined(GTEST_KILLED_BY_SIGNAL_OVERRIDE_) return WIFSIGNALED(exit_status) && WTERMSIG(exit_status) == signum_; }
O0
cpp
testing::KilledBySignal::operator()(int) const: movq %rdi, -0x8(%rsp) movl %esi, -0xc(%rsp) movq -0x8(%rsp), %rax movq %rax, -0x18(%rsp) movl -0xc(%rsp), %eax andl $0x7f, %eax addl $0x1, %eax movsbl %al, %ecx sarl %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0xd(%rsp) jle 0xb94a2 movq -0x18(%rsp), %rcx movl -0xc(%rsp), %eax andl $0x7f, %eax cmpl (%rcx), %eax sete %al movb %al, -0xd(%rsp) movb -0xd(%rsp), %al andb $0x1, %al retq nopl (%rax)
_ZNK7testing14KilledBySignalclEi: mov [rsp+var_8], rdi mov [rsp+var_C], esi mov rax, [rsp+var_8] mov [rsp+var_18], rax mov eax, [rsp+var_C] and eax, 7Fh add eax, 1 movsx ecx, al sar ecx, 1 xor eax, eax cmp ecx, 0 mov [rsp+var_D], al jle short loc_B94A2 mov rcx, [rsp+var_18] mov eax, [rsp+var_C] and eax, 7Fh cmp eax, [rcx] setz al mov [rsp+var_D], al loc_B94A2: mov al, [rsp+var_D] and al, 1 retn
bool testing::KilledBySignal::operator()(_DWORD *a1, char a2) { bool v3; // [rsp+Bh] [rbp-Dh] v3 = 0; if ( (char)((a2 & 0x7F) + 1) >> 1 > 0 ) return (a2 & 0x7F) == *a1; return v3; }
operator(): MOV qword ptr [RSP + -0x8],RDI MOV dword ptr [RSP + -0xc],ESI MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RSP + -0x18],RAX MOV EAX,dword ptr [RSP + -0xc] AND EAX,0x7f ADD EAX,0x1 MOVSX ECX,AL SAR ECX,0x1 XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RSP + -0xd],AL JLE 0x001b94a2 MOV RCX,qword ptr [RSP + -0x18] MOV EAX,dword ptr [RSP + -0xc] AND EAX,0x7f CMP EAX,dword ptr [RCX] SETZ AL MOV byte ptr [RSP + -0xd],AL LAB_001b94a2: MOV AL,byte ptr [RSP + -0xd] AND AL,0x1 RET
/* testing::KilledBySignal::TEMPNAMEPLACEHOLDERVALUE(int) const */ bool __thiscall testing::KilledBySignal::operator()(KilledBySignal *this,int param_1) { int1 local_d; local_d = false; if ('\0' < (char)(((byte)param_1 & 0x7f) + 1) >> 1) { local_d = (param_1 & 0x7fU) == *(uint *)this; } return local_d; }
40,170
test_soft_max::vars[abi:cxx11]()
monkey531[P]llama/tests/test-backend-ops.cpp
std::string vars() override { return VARS_TO_STR6(type, ne, mask, m_prec, scale, max_bias); }
O2
cpp
test_soft_max::vars[abi:cxx11](): pushq %r15 pushq %r14 pushq %rbx subq $0x2a0, %rsp # imm = 0x2A0 movq %rsi, %r14 movq %rdi, %rbx movl 0x38(%rsi), %esi leaq 0x280(%rsp), %r15 movq %r15, %rdi callq 0x18e2b leaq 0x844e(%rip), %rsi # 0x30db6 leaq 0x140(%rsp), %rdi movq %r15, %rdx callq 0x1ca87 leaq 0x83f8(%rip), %rdx # 0x30d77 leaq 0x160(%rsp), %rdi leaq 0x140(%rsp), %rsi callq 0x1cff2 leaq 0x40(%r14), %rsi leaq 0x100(%rsp), %rdi callq 0x18e53 leaq 0x8480(%rip), %rsi # 0x30e2c leaq 0x120(%rsp), %rdi leaq 0x100(%rsp), %rdx callq 0x1ca87 leaq 0x180(%rsp), %rdi leaq 0x160(%rsp), %rsi leaq 0x120(%rsp), %rdx callq 0x1cf8b leaq 0x8392(%rip), %rdx # 0x30d77 leaq 0x1a0(%rsp), %rdi leaq 0x180(%rsp), %rsi callq 0x1cff2 leaq 0x60(%r14), %rsi leaq 0xc0(%rsp), %rdi callq 0x18f24 leaq 0x8662(%rip), %rsi # 0x31074 leaq 0xe0(%rsp), %rdi leaq 0xc0(%rsp), %rdx callq 0x1ca87 leaq 0x1c0(%rsp), %rdi leaq 0x1a0(%rsp), %rsi leaq 0xe0(%rsp), %rdx callq 0x1cf8b leaq 0x832c(%rip), %rdx # 0x30d77 leaq 0x1e0(%rsp), %rdi leaq 0x1c0(%rsp), %rsi callq 0x1cff2 movl 0x64(%r14), %esi leaq 0x80(%rsp), %rdi callq 0x18e2b leaq 0x8602(%rip), %rsi # 0x3107a leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rdx callq 0x1ca87 leaq 0x200(%rsp), %rdi leaq 0x1e0(%rsp), %rsi leaq 0xa0(%rsp), %rdx callq 0x1cf8b leaq 0x82c6(%rip), %rdx # 0x30d77 leaq 0x220(%rsp), %rdi leaq 0x200(%rsp), %rsi callq 0x1cff2 leaq 0x68(%r14), %rsi leaq 0x40(%rsp), %rdi callq 0x18fe5 leaq 0x8468(%rip), %rsi # 0x30f43 leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rdx callq 0x1ca87 leaq 0x240(%rsp), %rdi leaq 0x220(%rsp), %rsi leaq 0x60(%rsp), %rdx callq 0x1cf8b leaq 0x826c(%rip), %rdx # 0x30d77 leaq 0x260(%rsp), %rdi leaq 0x240(%rsp), %rsi callq 0x1cff2 addq $0x6c, %r14 movq %rsp, %rdi movq %r14, %rsi callq 0x18fe5 leaq 0x854c(%rip), %rsi # 0x31082 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x1ca87 leaq 0x260(%rsp), %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi callq 0x1cf8b leaq 0x20(%rsp), %rdi callq 0xf280 movq %rsp, %rdi callq 0xf280 leaq 0x260(%rsp), %rdi callq 0xf280 leaq 0x240(%rsp), %rdi callq 0xf280 leaq 0x60(%rsp), %rdi callq 0xf280 leaq 0x40(%rsp), %rdi callq 0xf280 leaq 0x220(%rsp), %rdi callq 0xf280 leaq 0x200(%rsp), %rdi callq 0xf280 leaq 0xa0(%rsp), %rdi callq 0xf280 leaq 0x80(%rsp), %rdi callq 0xf280 leaq 0x1e0(%rsp), %rdi callq 0xf280 leaq 0x1c0(%rsp), %rdi callq 0xf280 leaq 0xe0(%rsp), %rdi callq 0xf280 leaq 0xc0(%rsp), %rdi callq 0xf280 leaq 0x1a0(%rsp), %rdi callq 0xf280 leaq 0x180(%rsp), %rdi callq 0xf280 leaq 0x120(%rsp), %rdi callq 0xf280 leaq 0x100(%rsp), %rdi callq 0xf280 leaq 0x160(%rsp), %rdi callq 0xf280 leaq 0x140(%rsp), %rdi callq 0xf280 leaq 0x280(%rsp), %rdi callq 0xf280 movq %rbx, %rax addq $0x2a0, %rsp # imm = 0x2A0 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xf280 jmp 0x28c7d movq %rax, %rbx movq %rsp, %rdi callq 0xf280 jmp 0x28c8a movq %rax, %rbx leaq 0x260(%rsp), %rdi callq 0xf280 jmp 0x28c9c movq %rax, %rbx leaq 0x240(%rsp), %rdi callq 0xf280 jmp 0x28cae movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0xf280 leaq 0x40(%rsp), %rdi callq 0xf280 leaq 0x220(%rsp), %rdi callq 0xf280 leaq 0x200(%rsp), %rdi callq 0xf280 leaq 0xa0(%rsp), %rdi callq 0xf280 leaq 0x80(%rsp), %rdi callq 0xf280 leaq 0x1e0(%rsp), %rdi callq 0xf280 leaq 0x1c0(%rsp), %rdi callq 0xf280 leaq 0xe0(%rsp), %rdi callq 0xf280 leaq 0xc0(%rsp), %rdi callq 0xf280 leaq 0x1a0(%rsp), %rdi callq 0xf280 leaq 0x180(%rsp), %rdi callq 0xf280 leaq 0x120(%rsp), %rdi callq 0xf280 leaq 0x100(%rsp), %rdi callq 0xf280 leaq 0x160(%rsp), %rdi callq 0xf280 leaq 0x140(%rsp), %rdi callq 0xf280 leaq 0x280(%rsp), %rdi callq 0xf280 movq %rbx, %rdi callq 0xfb30 movq %rax, %rbx jmp 0x28cb8 movq %rax, %rbx jmp 0x28cc2 movq %rax, %rbx jmp 0x28ccf movq %rax, %rbx jmp 0x28cdc movq %rax, %rbx jmp 0x28ce9 movq %rax, %rbx jmp 0x28cf6 movq %rax, %rbx jmp 0x28d03 movq %rax, %rbx jmp 0x28d10 movq %rax, %rbx jmp 0x28d1d movq %rax, %rbx jmp 0x28d2a movq %rax, %rbx jmp 0x28d37 movq %rax, %rbx jmp 0x28d44 movq %rax, %rbx jmp 0x28d51 movq %rax, %rbx jmp 0x28d5e movq %rax, %rbx jmp 0x28d6b movq %rax, %rbx jmp 0x28d78 nop
_ZN13test_soft_max4varsB5cxx11Ev: push r15 push r14 push rbx sub rsp, 2A0h mov r14, rsi mov rbx, rdi mov esi, [rsi+38h] lea r15, [rsp+2B8h+var_38] mov rdi, r15 call _ZL10var_to_strB5cxx119ggml_type; var_to_str(ggml_type) lea rsi, aPoolType+5; "type=" lea rdi, [rsp+2B8h+var_178] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, asc_30D77; "," lea rdi, [rsp+2B8h+var_158] lea rsi, [rsp+2B8h+var_178] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, [r14+40h] lea rdi, [rsp+2B8h+var_1B8] call _ZL10var_to_strIlLm4EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt5arrayIT_XT0_EE; var_to_str<long,4ul>(std::array<long,4ul> const&) lea rsi, aNe; "ne=" lea rdi, [rsp+2B8h+var_198] lea rdx, [rsp+2B8h+var_1B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+2B8h+var_138] lea rsi, [rsp+2B8h+var_158] lea rdx, [rsp+2B8h+var_198] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, asc_30D77; "," lea rdi, [rsp+2B8h+var_118] lea rsi, [rsp+2B8h+var_138] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, [r14+60h] lea rdi, [rsp+2B8h+var_1F8] call _ZL10var_to_strIbENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<bool>(bool const&) lea rsi, aMask; "mask=" lea rdi, [rsp+2B8h+var_1D8] lea rdx, [rsp+2B8h+var_1F8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+2B8h+var_F8] lea rsi, [rsp+2B8h+var_118] lea rdx, [rsp+2B8h+var_1D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, asc_30D77; "," lea rdi, [rsp+2B8h+var_D8] lea rsi, [rsp+2B8h+var_F8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) mov esi, [r14+64h] lea rdi, [rsp+2B8h+var_238] call _ZL10var_to_strB5cxx119ggml_type; var_to_str(ggml_type) lea rsi, aMPrec; "m_prec=" lea rdi, [rsp+2B8h+var_218] lea rdx, [rsp+2B8h+var_238] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+2B8h+var_B8] lea rsi, [rsp+2B8h+var_D8] lea rdx, [rsp+2B8h+var_218] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, asc_30D77; "," lea rdi, [rsp+2B8h+var_98] lea rsi, [rsp+2B8h+var_B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) lea rsi, [r14+68h] lea rdi, [rsp+2B8h+var_278] call _ZL10var_to_strIfENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<float>(float const&) lea rsi, aScale; "scale=" lea rdi, [rsp+2B8h+var_258] lea rdx, [rsp+2B8h+var_278] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdi, [rsp+2B8h+var_78] lea rsi, [rsp+2B8h+var_98] lea rdx, [rsp+2B8h+var_258] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdx, asc_30D77; "," lea rdi, [rsp+2B8h+var_58] lea rsi, [rsp+2B8h+var_78] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) add r14, 6Ch ; 'l' mov rdi, rsp mov rsi, r14 call _ZL10var_to_strIfENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; var_to_str<float>(float const&) lea rsi, aMaxBias; "max_bias=" lea rdi, [rsp+2B8h+var_298] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rsi, [rsp+2B8h+var_58] lea rdx, [rsp+2B8h+var_298] mov rdi, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdi, [rsp+2B8h+var_298] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_258] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_278] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_218] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_238] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_1D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_1F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_118] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_138] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_198] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_1B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_158] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_178] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+2B8h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 2A0h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_28C7D mov rbx, rax loc_28C7D: mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_28C8A mov rbx, rax loc_28C8A: lea rdi, [rsp+arg_258] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_28C9C mov rbx, rax loc_28C9C: lea rdi, [rsp+arg_238] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_28CAE mov rbx, rax loc_28CAE: lea rdi, [rsp+arg_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28CB8: lea rdi, [rsp+arg_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28CC2: lea rdi, [rsp+arg_218] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28CCF: lea rdi, [rsp+arg_1F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28CDC: lea rdi, [rsp+arg_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28CE9: lea rdi, [rsp+arg_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28CF6: lea rdi, [rsp+arg_1D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D03: lea rdi, [rsp+arg_1B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D10: lea rdi, [rsp+arg_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D1D: lea rdi, [rsp+arg_B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D2A: lea rdi, [rsp+arg_198] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D37: lea rdi, [rsp+arg_178] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D44: lea rdi, [rsp+arg_118] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D51: lea rdi, [rsp+arg_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D5E: lea rdi, [rsp+arg_158] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D6B: lea rdi, [rsp+arg_138] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_28D78: lea rdi, [rsp+arg_278] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume mov rbx, rax jmp loc_28CB8 mov rbx, rax jmp loc_28CC2 mov rbx, rax jmp loc_28CCF mov rbx, rax jmp loc_28CDC mov rbx, rax jmp loc_28CE9 mov rbx, rax jmp loc_28CF6 mov rbx, rax jmp loc_28D03 mov rbx, rax jmp loc_28D10 mov rbx, rax jmp loc_28D1D mov rbx, rax jmp loc_28D2A mov rbx, rax jmp loc_28D37 mov rbx, rax jmp loc_28D44 mov rbx, rax jmp loc_28D51 mov rbx, rax jmp loc_28D5E mov rbx, rax jmp loc_28D6B mov rbx, rax jmp loc_28D78
long long test_soft_max::vars[abi:cxx11](long long a1, long long a2) { _BYTE v3[32]; // [rsp+0h] [rbp-2B8h] BYREF _QWORD v4[4]; // [rsp+20h] [rbp-298h] BYREF _BYTE v5[32]; // [rsp+40h] [rbp-278h] BYREF _QWORD v6[4]; // [rsp+60h] [rbp-258h] BYREF _BYTE v7[32]; // [rsp+80h] [rbp-238h] BYREF _QWORD v8[4]; // [rsp+A0h] [rbp-218h] BYREF _BYTE v9[32]; // [rsp+C0h] [rbp-1F8h] BYREF _QWORD v10[4]; // [rsp+E0h] [rbp-1D8h] BYREF _BYTE v11[32]; // [rsp+100h] [rbp-1B8h] BYREF _QWORD v12[4]; // [rsp+120h] [rbp-198h] BYREF _BYTE v13[32]; // [rsp+140h] [rbp-178h] BYREF _QWORD v14[4]; // [rsp+160h] [rbp-158h] BYREF _BYTE v15[32]; // [rsp+180h] [rbp-138h] BYREF _QWORD v16[4]; // [rsp+1A0h] [rbp-118h] BYREF _BYTE v17[32]; // [rsp+1C0h] [rbp-F8h] BYREF _QWORD v18[4]; // [rsp+1E0h] [rbp-D8h] BYREF _BYTE v19[32]; // [rsp+200h] [rbp-B8h] BYREF _QWORD v20[4]; // [rsp+220h] [rbp-98h] BYREF _BYTE v21[32]; // [rsp+240h] [rbp-78h] BYREF _QWORD v22[4]; // [rsp+260h] [rbp-58h] BYREF _BYTE v23[56]; // [rsp+280h] [rbp-38h] BYREF var_to_str[abi:cxx11]((long long)v23, *(_DWORD *)(a2 + 56)); std::operator+<char>((long long)v13, (long long)"type=", (long long)v23); std::operator+<char>((long long)v14, (long long)v13, (long long)","); var_to_str<long,4ul>((long long)v11, a2 + 64); std::operator+<char>((long long)v12, (long long)"ne=", (long long)v11); std::operator+<char>((long long)v15, v14, v12); std::operator+<char>((long long)v16, (long long)v15, (long long)","); var_to_str<bool>((std::__cxx11 *)v9, (unsigned __int8 *)(a2 + 96)); std::operator+<char>((long long)v10, (long long)"mask=", (long long)v9); std::operator+<char>((long long)v17, v16, v10); std::operator+<char>((long long)v18, (long long)v17, (long long)","); var_to_str[abi:cxx11]((long long)v7, *(_DWORD *)(a2 + 100)); std::operator+<char>((long long)v8, (long long)"m_prec=", (long long)v7); std::operator+<char>((long long)v19, v18, v8); std::operator+<char>((long long)v20, (long long)v19, (long long)","); var_to_str<float>((std::__cxx11 *)v5, (float *)(a2 + 104)); std::operator+<char>((long long)v6, (long long)"scale=", (long long)v5); std::operator+<char>((long long)v21, v20, v6); std::operator+<char>((long long)v22, (long long)v21, (long long)","); var_to_str<float>((std::__cxx11 *)v3, (float *)(a2 + 108)); std::operator+<char>((long long)v4, (long long)"max_bias=", (long long)v3); std::operator+<char>(a1, v22, v4); std::string::~string(v4); std::string::~string(v3); std::string::~string(v22); std::string::~string(v21); std::string::~string(v6); std::string::~string(v5); std::string::~string(v20); std::string::~string(v19); std::string::~string(v8); std::string::~string(v7); std::string::~string(v18); std::string::~string(v17); std::string::~string(v10); std::string::~string(v9); std::string::~string(v16); std::string::~string(v15); std::string::~string(v12); std::string::~string(v11); std::string::~string(v14); std::string::~string(v13); std::string::~string(v23); return a1; }
vars[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x2a0 MOV R14,RSI MOV RBX,RDI MOV ESI,dword ptr [RSI + 0x38] LEA R15,[RSP + 0x280] MOV RDI,R15 CALL 0x00118e2b LAB_00128961: LEA RSI,[0x130db6] LEA RDI,[RSP + 0x140] MOV RDX,R15 CALL 0x0011ca87 LAB_00128978: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x160] LEA RSI,[RSP + 0x140] CALL 0x0011cff2 LEA RSI,[R14 + 0x40] LAB_00128998: LEA RDI,[RSP + 0x100] CALL 0x00118e53 LAB_001289a5: LEA RSI,[0x130e2c] LEA RDI,[RSP + 0x120] LEA RDX,[RSP + 0x100] CALL 0x0011ca87 LAB_001289c1: LEA RDI,[RSP + 0x180] LEA RSI,[RSP + 0x160] LEA RDX,[RSP + 0x120] CALL 0x0011cf8b LAB_001289de: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x1a0] LEA RSI,[RSP + 0x180] CALL 0x0011cff2 LEA RSI,[R14 + 0x60] LAB_001289fe: LEA RDI,[RSP + 0xc0] CALL 0x00118f24 LAB_00128a0b: LEA RSI,[0x131074] LEA RDI,[RSP + 0xe0] LEA RDX,[RSP + 0xc0] CALL 0x0011ca87 LAB_00128a27: LEA RDI,[RSP + 0x1c0] LEA RSI,[RSP + 0x1a0] LEA RDX,[RSP + 0xe0] CALL 0x0011cf8b LAB_00128a44: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x1e0] LEA RSI,[RSP + 0x1c0] CALL 0x0011cff2 MOV ESI,dword ptr [R14 + 0x64] LAB_00128a64: LEA RDI,[RSP + 0x80] CALL 0x00118e2b LAB_00128a71: LEA RSI,[0x13107a] LEA RDI,[RSP + 0xa0] LEA RDX,[RSP + 0x80] CALL 0x0011ca87 LAB_00128a8d: LEA RDI,[RSP + 0x200] LEA RSI,[RSP + 0x1e0] LEA RDX,[RSP + 0xa0] CALL 0x0011cf8b LAB_00128aaa: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x220] LEA RSI,[RSP + 0x200] CALL 0x0011cff2 LEA RSI,[R14 + 0x68] LAB_00128aca: LEA RDI,[RSP + 0x40] CALL 0x00118fe5 LAB_00128ad4: LEA RSI,[0x130f43] LEA RDI,[RSP + 0x60] LEA RDX,[RSP + 0x40] CALL 0x0011ca87 LAB_00128aea: LEA RDI,[RSP + 0x240] LEA RSI,[RSP + 0x220] LEA RDX,[RSP + 0x60] CALL 0x0011cf8b LAB_00128b04: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x260] LEA RSI,[RSP + 0x240] CALL 0x0011cff2 ADD R14,0x6c LAB_00128b24: MOV RDI,RSP MOV RSI,R14 CALL 0x00118fe5 LAB_00128b2f: LEA RSI,[0x131082] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0011ca87 LAB_00128b43: LEA RSI,[RSP + 0x260] LEA RDX,[RSP + 0x20] MOV RDI,RBX CALL 0x0011cf8b LAB_00128b58: LEA RDI,[RSP + 0x20] CALL 0x0010f280 MOV RDI,RSP CALL 0x0010f280 LEA RDI,[RSP + 0x260] CALL 0x0010f280 LEA RDI,[RSP + 0x240] CALL 0x0010f280 LEA RDI,[RSP + 0x60] CALL 0x0010f280 LEA RDI,[RSP + 0x40] CALL 0x0010f280 LEA RDI,[RSP + 0x220] CALL 0x0010f280 LEA RDI,[RSP + 0x200] CALL 0x0010f280 LEA RDI,[RSP + 0xa0] CALL 0x0010f280 LEA RDI,[RSP + 0x80] CALL 0x0010f280 LEA RDI,[RSP + 0x1e0] CALL 0x0010f280 LEA RDI,[RSP + 0x1c0] CALL 0x0010f280 LEA RDI,[RSP + 0xe0] CALL 0x0010f280 LEA RDI,[RSP + 0xc0] CALL 0x0010f280 LEA RDI,[RSP + 0x1a0] CALL 0x0010f280 LEA RDI,[RSP + 0x180] CALL 0x0010f280 LEA RDI,[RSP + 0x120] CALL 0x0010f280 LEA RDI,[RSP + 0x100] CALL 0x0010f280 LEA RDI,[RSP + 0x160] CALL 0x0010f280 LEA RDI,[RSP + 0x140] CALL 0x0010f280 LEA RDI,[RSP + 0x280] CALL 0x0010f280 MOV RAX,RBX ADD RSP,0x2a0 POP RBX POP R14 POP R15 RET
/* test_soft_max::vars[abi:cxx11]() */ void test_soft_max::vars_abi_cxx11_(void) { long in_RSI; string *in_RDI; string asStack_2b8 [32]; string local_298 [32]; string local_278 [32]; string local_258 [32]; string local_238 [32]; string local_218 [32]; string local_1f8 [32]; string local_1d8 [32]; string local_1b8 [32]; string local_198 [32]; string local_178 [32]; string local_158 [32]; string local_138 [32]; string local_118 [32]; string local_f8 [32]; string local_d8 [32]; string local_b8 [32]; string local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [32]; var_to_str_abi_cxx11_(local_38,*(int4 *)(in_RSI + 0x38)); /* try { // try from 00128961 to 00128977 has its CatchHandler @ 00128e05 */ std::operator+((char *)local_178,(string *)0x130db6); /* try { // try from 00128978 to 00128993 has its CatchHandler @ 00128dfd */ std::operator+(local_158,(char *)local_178); /* try { // try from 00128998 to 001289a4 has its CatchHandler @ 00128df5 */ var_to_str<long,4ul>(local_1b8); /* try { // try from 001289a5 to 001289c0 has its CatchHandler @ 00128ded */ std::operator+((char *)local_198,(string *)&DAT_00130e2c); /* try { // try from 001289c1 to 001289dd has its CatchHandler @ 00128de5 */ std::operator+(local_138,local_158); /* try { // try from 001289de to 001289f9 has its CatchHandler @ 00128ddd */ std::operator+(local_118,(char *)local_138); /* try { // try from 001289fe to 00128a0a has its CatchHandler @ 00128dd5 */ var_to_str<bool>((bool *)local_1f8); /* try { // try from 00128a0b to 00128a26 has its CatchHandler @ 00128dcd */ std::operator+((char *)local_1d8,(string *)&DAT_00131074); /* try { // try from 00128a27 to 00128a43 has its CatchHandler @ 00128dc5 */ std::operator+(local_f8,local_118); /* try { // try from 00128a44 to 00128a5f has its CatchHandler @ 00128dbd */ std::operator+(local_d8,(char *)local_f8); /* try { // try from 00128a64 to 00128a70 has its CatchHandler @ 00128db5 */ var_to_str_abi_cxx11_(local_238,*(int4 *)(in_RSI + 100)); /* try { // try from 00128a71 to 00128a8c has its CatchHandler @ 00128dad */ std::operator+((char *)local_218,(string *)"m_prec="); /* try { // try from 00128a8d to 00128aa9 has its CatchHandler @ 00128da5 */ std::operator+(local_b8,local_d8); /* try { // try from 00128aaa to 00128ac5 has its CatchHandler @ 00128d9d */ std::operator+(local_98,(char *)local_b8); /* try { // try from 00128aca to 00128ad3 has its CatchHandler @ 00128d95 */ var_to_str<float>((float *)local_278); /* try { // try from 00128ad4 to 00128ae9 has its CatchHandler @ 00128d8d */ std::operator+((char *)local_258,(string *)"scale="); /* try { // try from 00128aea to 00128b03 has its CatchHandler @ 00128cab */ std::operator+(local_78,local_98); /* try { // try from 00128b04 to 00128b1f has its CatchHandler @ 00128c99 */ std::operator+(local_58,(char *)local_78); /* try { // try from 00128b24 to 00128b2e has its CatchHandler @ 00128c87 */ var_to_str<float>((float *)asStack_2b8); /* try { // try from 00128b2f to 00128b42 has its CatchHandler @ 00128c7a */ std::operator+((char *)local_298,(string *)"max_bias="); /* try { // try from 00128b43 to 00128b57 has its CatchHandler @ 00128c6b */ std::operator+(in_RDI,local_58); std::__cxx11::string::~string(local_298); std::__cxx11::string::~string(asStack_2b8); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string(local_258); std::__cxx11::string::~string(local_278); std::__cxx11::string::~string(local_98); std::__cxx11::string::~string(local_b8); std::__cxx11::string::~string(local_218); std::__cxx11::string::~string(local_238); std::__cxx11::string::~string(local_d8); std::__cxx11::string::~string(local_f8); std::__cxx11::string::~string(local_1d8); std::__cxx11::string::~string(local_1f8); std::__cxx11::string::~string(local_118); std::__cxx11::string::~string(local_138); std::__cxx11::string::~string(local_198); std::__cxx11::string::~string(local_1b8); std::__cxx11::string::~string(local_158); std::__cxx11::string::~string(local_178); std::__cxx11::string::~string(local_38); return; }
40,171
dirname_length
eloqsql/mysys/mf_dirname.c
size_t dirname_length(const char *name) { register char *pos, *gpos; #ifdef BASKSLASH_MBTAIL CHARSET_INFO *fs= fs_character_set(); #endif #ifdef FN_DEVCHAR if ((pos=(char*)strrchr(name,FN_DEVCHAR)) == 0) #endif pos=(char*) name-1; gpos= pos++; for ( ; *pos ; pos++) /* Find last FN_LIBCHAR */ { #ifdef BASKSLASH_MBTAIL uint l; if (my_ci_use_mb(fs) && (l= my_ismbchar(fs, pos, pos + 3))) { pos+= l - 1; continue; } #endif if (*pos == FN_LIBCHAR || *pos == '/') gpos=pos; } return (size_t) (gpos+1-(char*) name); }
O0
c
dirname_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $-0x1, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, (%rax) je 0x39280 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax je 0x39268 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax jne 0x39270 movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x39272 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x39247 movq -0x18(%rbp), %rax addq $0x1, %rax movq -0x8(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopw %cs:(%rax,%rax)
dirname_length: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov [rbp+var_18], rax loc_39247: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jz short loc_39280 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jz short loc_39268 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jnz short loc_39270 loc_39268: mov rax, [rbp+var_10] mov [rbp+var_18], rax loc_39270: jmp short $+2 loc_39272: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_39247 loc_39280: mov rax, [rbp+var_18] add rax, 1 mov rcx, [rbp+var_8] sub rax, rcx pop rbp retn
long long dirname_length(_BYTE *a1) { _BYTE *v2; // [rsp+0h] [rbp-18h] _BYTE *v3; // [rsp+8h] [rbp-10h] v3 = a1; v2 = a1 - 1; while ( *v3 ) { if ( *v3 == 47 ) v2 = v3; ++v3; } return v2 + 1 - a1; }
dirname_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,-0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV qword ptr [RBP + -0x18],RAX LAB_00139247: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JZ 0x00139280 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JZ 0x00139268 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JNZ 0x00139270 LAB_00139268: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX LAB_00139270: JMP 0x00139272 LAB_00139272: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00139247 LAB_00139280: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV RCX,qword ptr [RBP + -0x8] SUB RAX,RCX POP RBP RET
char * dirname_length(char *param_1) { char *local_20; char *local_18; local_20 = param_1 + -1; for (local_18 = param_1; *local_18 != '\0'; local_18 = local_18 + 1) { if ((*local_18 == '/') || (*local_18 == '/')) { local_20 = local_18; } } return local_20 + (1 - (long)param_1); }
40,172
ftxui::(anonymous namespace)::SeparatorAuto::Render(ftxui::Screen&)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/separator.cpp
void Render(Screen& screen) override { const bool is_column = (box_.x_max == box_.x_min); const bool is_line = (box_.y_min == box_.y_max); const std::string c = charsets[style_][int(is_line && !is_column)]; for (int y = box_.y_min; y <= box_.y_max; ++y) { for (int x = box_.x_min; x <= box_.x_max; ++x) { Pixel& pixel = screen.PixelAt(x, y); pixel.character = c; pixel.automerge = true; } } }
O1
cpp
ftxui::(anonymous namespace)::SeparatorAuto::Render(ftxui::Screen&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq %rdi, %r14 movl 0x4c(%rdi), %eax cmpl %eax, 0x50(%rdi) setne %al movl 0x54(%rdi), %ecx cmpl 0x58(%rdi), %ecx sete %cl movl 0x5c(%rdi), %edx shlq $0x6, %rdx leaq 0x35dde(%rip), %rdi # 0x5a8f8 addq %rdx, %rdi andb %al, %cl movzbl %cl, %eax shll $0x5, %eax leaq 0x18(%rsp), %rcx movq %rcx, -0x10(%rcx) movq (%rax,%rdi), %rsi movq 0x8(%rax,%rdi), %rdx addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x11e4e movl 0x54(%r14), %r15d cmpl 0x58(%r14), %r15d jg 0x24b98 leaq 0x8(%rsp), %r12 movl 0x4c(%r14), %r13d cmpl 0x50(%r14), %r13d jg 0x24b8b movq %rbx, %rdi movl %r13d, %esi movl %r15d, %edx callq 0x3a522 movq %rax, %rbp leaq 0x8(%rax), %rdi movq %r12, %rsi callq 0xb1f0 orb $-0x80, (%rbp) leal 0x1(%r13), %eax cmpl 0x50(%r14), %r13d movl %eax, %r13d jl 0x24b5d leal 0x1(%r15), %eax cmpl 0x58(%r14), %r15d movl %eax, %r15d jl 0x24b53 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x24bb4 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x24be2 movq 0x18(%rsp), %rsi incq %rsi callq 0xb400 movq %rbx, %rdi callq 0xb780
_ZN5ftxui12_GLOBAL__N_113SeparatorAuto6RenderERNS_6ScreenE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rsi mov r14, rdi mov eax, [rdi+4Ch] cmp [rdi+50h], eax setnz al mov ecx, [rdi+54h] cmp ecx, [rdi+58h] setz cl mov edx, [rdi+5Ch] shl rdx, 6 lea rdi, _ZN5ftxui12_GLOBAL__N_18charsetsB5cxx11E; ftxui::`anonymous namespace'::charsets add rdi, rdx and cl, al movzx eax, cl shl eax, 5 lea rcx, [rsp+58h+var_40] mov [rcx-10h], rcx mov rsi, [rax+rdi] mov rdx, [rax+rdi+8] add rdx, rsi lea rdi, [rsp+58h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov r15d, [r14+54h] cmp r15d, [r14+58h] jg short loc_24B98 lea r12, [rsp+58h+var_50] loc_24B53: mov r13d, [r14+4Ch] cmp r13d, [r14+50h] jg short loc_24B8B loc_24B5D: mov rdi, rbx; this mov esi, r13d; int mov edx, r15d; int call _ZN5ftxui6Screen7PixelAtEii; ftxui::Screen::PixelAt(int,int) mov rbp, rax lea rdi, [rax+8] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) or byte ptr [rbp+0], 80h lea eax, [r13+1] cmp r13d, [r14+50h] mov r13d, eax jl short loc_24B5D loc_24B8B: lea eax, [r15+1] cmp r15d, [r14+58h] mov r15d, eax jl short loc_24B53 loc_24B98: mov rdi, [rsp+58h+var_50]; void * lea rax, [rsp+58h+var_40] cmp rdi, rax jz short loc_24BB4 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_24BB4: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_24BE2 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_24BE2: mov rdi, rbx call __Unwind_Resume
void ftxui::`anonymous namespace'::SeparatorAuto::Render( ftxui::_anonymous_namespace_::SeparatorAuto *this, ftxui::Screen *a2) { bool v3; // al bool v4; // cl long long *v5; // rdi int v6; // r15d int v7; // r13d _BYTE *v8; // rbp bool v9; // cc void *v10[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v11[8]; // [rsp+18h] [rbp-40h] BYREF v3 = *((_DWORD *)this + 20) != *((_DWORD *)this + 19); v4 = *((_DWORD *)this + 21) == *((_DWORD *)this + 22); v5 = &ftxui::`anonymous namespace'::charsets[abi:cxx11][8 * (unsigned long long)*((unsigned int *)this + 23)]; v10[0] = v11; std::string::_M_construct<char *>( v10, (_BYTE *)v5[4 * (unsigned int)(v3 && v4)], v5[4 * (unsigned int)(v3 && v4)] + v5[4 * (unsigned int)(v3 && v4) + 1]); v6 = *((_DWORD *)this + 21); if ( v6 <= *((_DWORD *)this + 22) ) { do { v7 = *((_DWORD *)this + 19); if ( v7 <= *((_DWORD *)this + 20) ) { do { v8 = (_BYTE *)ftxui::Screen::PixelAt(a2, v7, v6); std::string::_M_assign(v8 + 8, v10); *v8 |= 0x80u; v9 = v7++ < *((_DWORD *)this + 20); } while ( v9 ); } v9 = v6++ < *((_DWORD *)this + 22); } while ( v9 ); } if ( v10[0] != v11 ) operator delete(v10[0], v11[0] + 1LL); }
Render: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV R14,RDI MOV EAX,dword ptr [RDI + 0x4c] CMP dword ptr [RDI + 0x50],EAX SETNZ AL MOV ECX,dword ptr [RDI + 0x54] CMP ECX,dword ptr [RDI + 0x58] SETZ CL MOV EDX,dword ptr [RDI + 0x5c] SHL RDX,0x6 LEA RDI,[0x15a8f8] ADD RDI,RDX AND CL,AL MOVZX EAX,CL SHL EAX,0x5 LEA RCX,[RSP + 0x18] MOV qword ptr [RCX + -0x10],RCX MOV RSI,qword ptr [RAX + RDI*0x1] MOV RDX,qword ptr [RAX + RDI*0x1 + 0x8] ADD RDX,RSI LEA RDI,[RSP + 0x8] CALL 0x00111e4e MOV R15D,dword ptr [R14 + 0x54] CMP R15D,dword ptr [R14 + 0x58] JG 0x00124b98 LEA R12,[RSP + 0x8] LAB_00124b53: MOV R13D,dword ptr [R14 + 0x4c] CMP R13D,dword ptr [R14 + 0x50] JG 0x00124b8b LAB_00124b5d: MOV RDI,RBX MOV ESI,R13D MOV EDX,R15D CALL 0x0013a522 MOV RBP,RAX LEA RDI,[RAX + 0x8] MOV RSI,R12 CALL 0x0010b1f0 LAB_00124b7a: OR byte ptr [RBP],0x80 LEA EAX,[R13 + 0x1] CMP R13D,dword ptr [R14 + 0x50] MOV R13D,EAX JL 0x00124b5d LAB_00124b8b: LEA EAX,[R15 + 0x1] CMP R15D,dword ptr [R14 + 0x58] MOV R15D,EAX JL 0x00124b53 LAB_00124b98: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00124bb4 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010b400 LAB_00124bb4: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ftxui::(anonymous namespace)::SeparatorAuto::Render(ftxui::Screen&) */ void __thiscall ftxui::(anonymous_namespace)::SeparatorAuto::Render(SeparatorAuto *this,Screen *param_1) { long lVar1; bool bVar2; long lVar3; byte *pbVar4; int iVar5; int iVar6; long *local_50 [2]; long local_40 [2]; lVar3 = (ulong)(*(int *)(this + 0x54) == *(int *)(this + 0x58) && *(int *)(this + 0x50) != *(int *)(this + 0x4c)) * 0x20; local_50[0] = local_40; lVar1 = *(long *)(charsets_abi_cxx11_ + lVar3 + (ulong)*(uint *)(this + 0x5c) * 0x40); std::__cxx11::string::_M_construct<char*> (local_50,lVar1, *(long *)(charsets_abi_cxx11_ + lVar3 + 8 + (ulong)*(uint *)(this + 0x5c) * 0x40) + lVar1); iVar6 = *(int *)(this + 0x54); if (iVar6 <= *(int *)(this + 0x58)) { do { iVar5 = *(int *)(this + 0x4c); if (*(int *)(this + 0x4c) <= *(int *)(this + 0x50)) { do { /* try { // try from 00124b5d to 00124b79 has its CatchHandler @ 00124bc3 */ pbVar4 = (byte *)Screen::PixelAt(param_1,iVar5,iVar6); std::__cxx11::string::_M_assign((string *)(pbVar4 + 8)); *pbVar4 = *pbVar4 | 0x80; bVar2 = iVar5 < *(int *)(this + 0x50); iVar5 = iVar5 + 1; } while (bVar2); } bVar2 = iVar6 < *(int *)(this + 0x58); iVar6 = iVar6 + 1; } while (bVar2); } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return; }
40,173
my_strnxfrm_uca_padn
eloqsql/strings/ctype-uca.c
static uchar * my_strnxfrm_uca_padn(uchar *dst, uchar *de, uint nweights, int weight) { uint count= MY_MIN((uint) (de - dst) / 2, nweights); for (; count ; count--) { *dst++= weight >> 8; *dst++= weight & 0xFF; } return dst; }
O0
c
my_strnxfrm_uca_padn: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx subq %rcx, %rax shrl %eax cmpl -0x14(%rbp), %eax jae 0xa1cc6 movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx subq %rcx, %rax shrl %eax movl %eax, -0x20(%rbp) jmp 0xa1ccc movl -0x14(%rbp), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) je 0xa1d17 movl -0x18(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movl -0x18(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movl -0x1c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x1c(%rbp) jmp 0xa1cd2 movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax)
my_strnxfrm_uca_padn: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov rax, [rbp+var_10] mov rcx, [rbp+var_8] sub rax, rcx shr eax, 1 cmp eax, [rbp+var_14] jnb short loc_A1CC6 mov rax, [rbp+var_10] mov rcx, [rbp+var_8] sub rax, rcx shr eax, 1 mov [rbp+var_20], eax jmp short loc_A1CCC loc_A1CC6: mov eax, [rbp+var_14] mov [rbp+var_20], eax loc_A1CCC: mov eax, [rbp+var_20] mov [rbp+var_1C], eax loc_A1CD2: cmp [rbp+var_1C], 0 jz short loc_A1D17 mov eax, [rbp+var_18] sar eax, 8 mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov eax, [rbp+var_18] and eax, 0FFh mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov eax, [rbp+var_1C] add eax, 0FFFFFFFFh mov [rbp+var_1C], eax jmp short loc_A1CD2 loc_A1D17: mov rax, [rbp+var_8] pop rbp retn
_BYTE * my_strnxfrm_uca_padn(_BYTE *a1, int a2, unsigned int a3, __int16 a4) { _BYTE *v4; // rax unsigned int v6; // [rsp+0h] [rbp-20h] unsigned int i; // [rsp+4h] [rbp-1Ch] _BYTE *v8; // [rsp+18h] [rbp-8h] v8 = a1; if ( (unsigned int)(a2 - (_DWORD)a1) >> 1 >= a3 ) v6 = a3; else v6 = (unsigned int)(a2 - (_DWORD)a1) >> 1; for ( i = v6; i; --i ) { *v8 = HIBYTE(a4); v4 = v8 + 1; v8 += 2; *v4 = a4; } return v8; }
my_strnxfrm_uca_padn: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] SUB RAX,RCX SHR EAX,0x1 CMP EAX,dword ptr [RBP + -0x14] JNC 0x001a1cc6 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] SUB RAX,RCX SHR EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x001a1ccc LAB_001a1cc6: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x20],EAX LAB_001a1ccc: MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x1c],EAX LAB_001a1cd2: CMP dword ptr [RBP + -0x1c],0x0 JZ 0x001a1d17 MOV EAX,dword ptr [RBP + -0x18] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x001a1cd2 LAB_001a1d17: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int1 * my_strnxfrm_uca_padn(int1 *param_1,int param_2,uint param_3,int4 param_4) { int1 *puVar1; uint local_28; uint local_24; int1 *local_10; local_28 = param_3; if ((uint)(param_2 - (int)param_1) >> 1 < param_3) { local_28 = (uint)(param_2 - (int)param_1) >> 1; } local_10 = param_1; for (local_24 = local_28; local_24 != 0; local_24 = local_24 - 1) { puVar1 = local_10 + 1; *local_10 = (char)((uint)param_4 >> 8); local_10 = local_10 + 2; *puVar1 = (char)param_4; } return local_10; }
40,174
testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>, char const*, int, testing::internal::DeathTest**)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-death-test.cc
bool DeathTest::Create(const char* statement, Matcher<const std::string&> matcher, const char* file, int line, DeathTest** test) { return GetUnitTestImpl()->death_test_factory()->Create( statement, std::move(matcher), file, line, test); }
O3
cpp
testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>, char const*, int, testing::internal::DeathTest**): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %r8, %rbx movl %ecx, %ebp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 callq 0x18c24 movq 0x4a6f4(%rip), %rax # 0x597b0 movq 0x2b0(%rax), %rdi movq 0x8(%r15), %rax leaq 0x8(%rsp), %rdx movq %rax, 0x8(%rdx) movq 0x10(%r15), %rax movq %rax, 0x10(%rdx) movq $0x0, 0x8(%r15) leaq 0x497d1(%rip), %rax # 0x588b8 movq %rax, (%rdx) movq (%rdi), %rax movq %r12, %rsi movq %r14, %rcx movl %ebp, %r8d movq %rbx, %r9 callq *0x10(%rax) movl %eax, %ebx leaq 0x8(%rsp), %rdi callq 0x31d96 movl %ebx, %eax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x31d96 movq %rbx, %rdi callq 0x8990
_ZN7testing8internal9DeathTest6CreateEPKcNS_7MatcherIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEES3_iPPS1_: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov rbx, r8 mov ebp, ecx mov r14, rdx mov r15, rsi mov r12, rdi call _ZN7testing8UnitTest11GetInstanceEv; testing::UnitTest::GetInstance(void) mov rax, cs:qword_597B0 mov rdi, [rax+2B0h] mov rax, [r15+8] lea rdx, [rsp+48h+var_40] mov [rdx+8], rax mov rax, [r15+10h] mov [rdx+10h], rax mov qword ptr [r15+8], 0 lea rax, off_588B8 mov [rdx], rax mov rax, [rdi] mov rsi, r12 mov rcx, r14 mov r8d, ebp mov r9, rbx call qword ptr [rax+10h] mov ebx, eax lea rdi, [rsp+48h+var_40] call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase() mov eax, ebx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_0] call _ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; testing::internal::MatcherBase<std::string const&>::~MatcherBase() mov rdi, rbx call __Unwind_Resume
long long testing::internal::DeathTest::Create( testing::UnitTest *a1, long long a2, long long a3, unsigned int a4, long long a5) { long long v9; // rdi _QWORD v11[8]; // [rsp+8h] [rbp-40h] BYREF testing::UnitTest::GetInstance(a1); v9 = *((_QWORD *)qword_597B0 + 86); v11[1] = *(_QWORD *)(a2 + 8); v11[2] = *(_QWORD *)(a2 + 16); *(_QWORD *)(a2 + 8) = 0LL; v11[0] = &off_588B8; LODWORD(a5) = (*(long long ( **)(long long, testing::UnitTest *, _QWORD *, long long, _QWORD, long long))(*(_QWORD *)v9 + 16LL))( v9, a1, v11, a3, a4, a5); testing::internal::MatcherBase<std::string const&>::~MatcherBase(v11); return (unsigned int)a5; }
Create: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV RBX,R8 MOV EBP,ECX MOV R14,RDX MOV R15,RSI MOV R12,RDI CALL 0x00118c24 MOV RAX,qword ptr [0x001597b0] MOV RDI,qword ptr [RAX + 0x2b0] MOV RAX,qword ptr [R15 + 0x8] LEA RDX,[RSP + 0x8] MOV qword ptr [RDX + 0x8],RAX MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [RDX + 0x10],RAX MOV qword ptr [R15 + 0x8],0x0 LEA RAX,[0x1588b8] MOV qword ptr [RDX],RAX MOV RAX,qword ptr [RDI] LAB_0010f0ed: MOV RSI,R12 MOV RCX,R14 MOV R8D,EBP MOV R9,RBX CALL qword ptr [RAX + 0x10] LAB_0010f0fc: MOV EBX,EAX LEA RDI,[RSP + 0x8] CALL 0x00131d96 MOV EAX,EBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* testing::internal::DeathTest::Create(char const*, testing::Matcher<std::__cxx11::string const&>, char const*, int, testing::internal::DeathTest**) */ int4 testing::internal::DeathTest::Create (int8 param_1,long param_2,int8 param_3,int4 param_4,int8 param_5) { long *plVar1; int4 uVar2; int **local_40; int8 local_38; int8 local_30; UnitTest::GetInstance(); plVar1 = *(long **)(UnitTest::GetInstance()::instance._64_8_ + 0x2b0); local_38 = *(int8 *)(param_2 + 8); local_30 = *(int8 *)(param_2 + 0x10); *(int8 *)(param_2 + 8) = 0; local_40 = &PTR__MatcherBase_001588b8; /* try { // try from 0010f0ed to 0010f0fb has its CatchHandler @ 0010f117 */ uVar2 = (**(code **)(*plVar1 + 0x10))(plVar1,param_1,&local_40,param_3,param_4,param_5); MatcherBase<std::__cxx11::string_const&>::~MatcherBase ((MatcherBase<std::__cxx11::string_const&> *)&local_40); return uVar2; }
40,175
mp_sqrtrem2
bluesky950520[P]quickjs/libbf.c
static limb_t mp_sqrtrem2(limb_t *tabs, limb_t *taba) { limb_t s1, r1, s, q, u, a0, a1; dlimb_t r, num; int l; a0 = taba[0]; a1 = taba[1]; s1 = mp_sqrtrem1(&r1, a1); l = LIMB_BITS / 2; num = ((dlimb_t)r1 << l) | (a0 >> l); q = num / (2 * s1); u = num % (2 * s1); s = (s1 << l) + q; r = ((dlimb_t)u << l) | (a0 & (((limb_t)1 << l) - 1)); if (unlikely((q >> l) != 0)) r -= (dlimb_t)1 << LIMB_BITS; /* special case when q=2^l */ else r -= q * q; if ((slimb_t)(r >> LIMB_BITS) < 0) { s--; r += 2 * (dlimb_t)s + 1; } tabs[0] = s; taba[0] = r; return r >> LIMB_BITS; }
O3
c
mp_sqrtrem2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, 0x8(%rsp) movq (%rsi), %r14 movq 0x8(%rsi), %rsi leaq 0x10(%rsp), %r15 movq %r15, %rdi callq 0x88f68 movq %rax, %r12 movq (%r15), %r13 movq %r13, %r15 shrq $0x20, %r15 shldq $0x20, %r14, %r13 leaq (%rax,%rax), %rbp movq %r13, %rdi movq %r15, %rsi movq %rbp, %rdx xorl %ecx, %ecx callq 0x9c620 movq %rax, %rcx movq %rdx, %rsi imulq %rbp, %rsi mulq %rbp addq %rsi, %rdx subq %rax, %r13 sbbq %rdx, %r15 shlq $0x20, %r12 shldq $0x20, %r13, %r15 shlq $0x20, %r13 movl %r14d, %eax orq %r13, %rax movq %rcx, %rdx shrq $0x20, %rdx jne 0x92349 movq %rcx, %rdx imulq %rcx, %rdx subq %rdx, %rax sbbq $0x0, %r15 addq %rcx, %r12 testq %r15, %r15 jns 0x9232c leaq -0x1(%r12), %rcx leaq -0x1(,%r12,2), %rdx movq %rcx, %r12 shrq $0x3f, %rcx addq %rdx, %rax adcq %rcx, %r15 movq 0x8(%rsp), %rcx movq %r12, (%rcx) movq %rax, (%rbx) movq %r15, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq decq %r15 jmp 0x9230a
mp_sqrtrem2: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rsi mov [rsp+48h+var_40], rdi mov r14, [rsi] mov rsi, [rsi+8] lea r15, [rsp+48h+var_38] mov rdi, r15 call mp_sqrtrem1 mov r12, rax mov r13, [r15] mov r15, r13 shr r15, 20h shld r13, r14, 20h lea rbp, [rax+rax] mov rdi, r13 mov rsi, r15 mov rdx, rbp xor ecx, ecx call __udivti3 mov rcx, rax mov rsi, rdx imul rsi, rbp mul rbp add rdx, rsi sub r13, rax sbb r15, rdx shl r12, 20h shld r15, r13, 20h shl r13, 20h mov eax, r14d or rax, r13 mov rdx, rcx shr rdx, 20h jnz short loc_92349 mov rdx, rcx imul rdx, rcx sub rax, rdx sbb r15, 0 loc_9230A: add r12, rcx test r15, r15 jns short loc_9232C lea rcx, [r12-1] lea rdx, ds:0FFFFFFFFFFFFFFFFh[r12*2] mov r12, rcx shr rcx, 3Fh add rax, rdx adc r15, rcx loc_9232C: mov rcx, [rsp+48h+var_40] mov [rcx], r12 mov [rbx], rax mov rax, r15 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_92349: dec r15 jmp short loc_9230A
long long mp_sqrtrem2(unsigned long long *a1, unsigned long long *a2) { unsigned long long v3; // r14 unsigned long long v4; // r12 unsigned long long v5; // r15 __int128 v6; // rt0 unsigned long long v7; // rcx long long v8; // rdx long long v9; // rsi unsigned __int128 v10; // rax unsigned long long v11; // r12 unsigned long long v12; // r15 unsigned long long v13; // rax long long v14; // r15 unsigned long long v15; // r12 long long v16; // rdx unsigned long long v18[7]; // [rsp+10h] [rbp-38h] BYREF v3 = *a2; v4 = mp_sqrtrem1(v18, a2[1]); v5 = HIDWORD(v18[0]); *((_QWORD *)&v6 + 1) = v18[0]; *(_QWORD *)&v6 = v3; v7 = _udivti3(v6 >> 32, HIDWORD(v18[0]), 2 * v4, 0LL); v9 = 2 * v4 * v8; v10 = 2 * v4 * (unsigned __int128)v7; *((_QWORD *)&v10 + 1) += v9; v11 = v4 << 32; v12 = (__int128)(__PAIR128__(v5, v6 >> 32) - v10) >> 32; v13 = (((unsigned long long)(v6 >> 32) - (_QWORD)v10) << 32) | (unsigned int)v3; if ( HIDWORD(v7) ) { v14 = v12 - 1; } else { v14 = (__PAIR128__(v12, v13) - v7 * v7) >> 64; v13 -= v7 * v7; } v15 = v7 + v11; if ( v14 < 0 ) { v16 = 2 * v15-- - 1; v14 = (__PAIR128__(v14, v16) + __PAIR128__(v15 >> 63, v13)) >> 64; v13 += v16; } *a1 = v15; *a2 = v13; return v14; }
mp_sqrtrem2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV qword ptr [RSP + 0x8],RDI MOV R14,qword ptr [RSI] MOV RSI,qword ptr [RSI + 0x8] LEA R15,[RSP + 0x10] MOV RDI,R15 CALL 0x00188f68 MOV R12,RAX MOV R13,qword ptr [R15] MOV R15,R13 SHR R15,0x20 SHLD R13,R14,0x20 LEA RBP,[RAX + RAX*0x1] MOV RDI,R13 MOV RSI,R15 MOV RDX,RBP XOR ECX,ECX CALL 0x0019c620 MOV RCX,RAX MOV RSI,RDX IMUL RSI,RBP MUL RBP ADD RDX,RSI SUB R13,RAX SBB R15,RDX SHL R12,0x20 SHLD R15,R13,0x20 SHL R13,0x20 MOV EAX,R14D OR RAX,R13 MOV RDX,RCX SHR RDX,0x20 JNZ 0x00192349 MOV RDX,RCX IMUL RDX,RCX SUB RAX,RDX SBB R15,0x0 LAB_0019230a: ADD R12,RCX TEST R15,R15 JNS 0x0019232c LEA RCX,[R12 + -0x1] LEA RDX,[-0x1 + R12*0x2] MOV R12,RCX SHR RCX,0x3f ADD RAX,RDX ADC R15,RCX LAB_0019232c: MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RCX],R12 MOV qword ptr [RBX],RAX MOV RAX,R15 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00192349: DEC R15 JMP 0x0019230a
long mp_sqrtrem2(long *param_1,ulong *param_2) { int1 auVar1 [16]; int1 auVar2 [16]; long lVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; ulong uVar8; ulong uVar9; ulong uVar10; long lVar11; bool bVar12; int1 auVar13 [16]; ulong local_38; uVar6 = *param_2; lVar3 = mp_sqrtrem1(&local_38,param_2[1]); uVar8 = local_38 << 0x20 | uVar6 >> 0x20; uVar10 = lVar3 * 2; auVar13 = __udivti3(uVar8,local_38 >> 0x20,uVar10,0); uVar4 = auVar13._0_8_; auVar1._8_8_ = 0; auVar1._0_8_ = uVar4; auVar2._8_8_ = 0; auVar2._0_8_ = uVar10; uVar5 = SUB168(auVar1 * auVar2,0); uVar9 = uVar8 - uVar5; uVar10 = ((local_38 >> 0x20) - (SUB168(auVar1 * auVar2,8) + auVar13._8_8_ * uVar10)) - (ulong)(uVar8 < uVar5) << 0x20 | uVar9 >> 0x20; uVar6 = uVar6 & 0xffffffff | uVar9 << 0x20; if (uVar4 >> 0x20 == 0) { bVar12 = uVar6 < uVar4 * uVar4; uVar6 = uVar6 - uVar4 * uVar4; lVar11 = uVar10 - bVar12; } else { lVar11 = uVar10 - 1; } lVar7 = (lVar3 << 0x20) + uVar4; lVar3 = lVar7; if (lVar11 < 0) { lVar3 = lVar7 + -1; uVar10 = lVar7 * 2 - 1; bVar12 = CARRY8(uVar6,uVar10); uVar6 = uVar6 + uVar10; lVar11 = (lVar11 - (lVar3 >> 0x3f)) + (ulong)bVar12; } *param_1 = lVar3; *param_2 = uVar6; return lVar11; }
40,176
flush_simple_key_cache_blocks
eloqsql/mysys/mf_keycache.c
static int flush_simple_key_cache_blocks(SIMPLE_KEY_CACHE_CB *keycache, File file, void *file_extra __attribute__((unused)), enum flush_type type) { int res= 0; DBUG_ENTER("flush_key_blocks"); DBUG_PRINT("enter", ("keycache: %p", keycache)); if (!keycache->key_cache_inited) DBUG_RETURN(0); keycache_pthread_mutex_lock(&keycache->cache_lock); /* While waiting for lock, keycache could have been ended. */ if (keycache->disk_blocks > 0) { inc_counter_for_resize_op(keycache); res= flush_key_blocks_int(keycache, file, type); dec_counter_for_resize_op(keycache); } keycache_pthread_mutex_unlock(&keycache->cache_lock); DBUG_RETURN(res); }
O0
c
flush_simple_key_cache_blocks: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl $0x0, -0x28(%rbp) jmp 0xe898f movq -0x10(%rbp), %rax cmpb $0x0, (%rax) jne 0xe89a3 jmp 0xe899a movl $0x0, -0x4(%rbp) jmp 0xe8a03 movq -0x10(%rbp), %rdi addq $0xc0, %rdi leaq 0x71c35(%rip), %rsi # 0x15a5ea movl $0x111a, %edx # imm = 0x111A callq 0xe5590 movq -0x10(%rbp), %rax cmpl $0x0, 0x48(%rax) jle 0xe89ed movq -0x10(%rbp), %rdi callq 0xe56b0 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movl -0x24(%rbp), %edx callq 0xe8ff0 movl %eax, -0x28(%rbp) movq -0x10(%rbp), %rdi callq 0xe64b0 movq -0x10(%rbp), %rdi addq $0xc0, %rdi callq 0xe5fb0 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
flush_simple_key_cache_blocks: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_28], 0 jmp short $+2 loc_E898F: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jnz short loc_E89A3 jmp short $+2 loc_E899A: mov [rbp+var_4], 0 jmp short loc_E8A03 loc_E89A3: mov rdi, [rbp+var_10] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 111Ah call inline_mysql_mutex_lock_24 mov rax, [rbp+var_10] cmp dword ptr [rax+48h], 0 jle short loc_E89ED mov rdi, [rbp+var_10] call inc_counter_for_resize_op_0 mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov edx, [rbp+var_24] call flush_key_blocks_int mov [rbp+var_28], eax mov rdi, [rbp+var_10] call dec_counter_for_resize_op_0 loc_E89ED: mov rdi, [rbp+var_10] add rdi, 0C0h call inline_mysql_mutex_unlock_25 mov eax, [rbp+var_28] mov [rbp+var_4], eax loc_E8A03: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long flush_simple_key_cache_blocks(long long a1, unsigned int a2, long long a3, unsigned int a4) { unsigned int v5; // [rsp+8h] [rbp-28h] v5 = 0; if ( *(_BYTE *)a1 ) { inline_mysql_mutex_lock_24( a1 + 192, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0x111Au); if ( *(int *)(a1 + 72) > 0 ) { inc_counter_for_resize_op_0(a1); v5 = flush_key_blocks_int(a1, a2, a4); dec_counter_for_resize_op_0(a1); } inline_mysql_mutex_unlock_25(a1 + 192); return v5; } else { return 0; } }
flush_simple_key_cache_blocks: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV dword ptr [RBP + -0x28],0x0 JMP 0x001e898f LAB_001e898f: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JNZ 0x001e89a3 JMP 0x001e899a LAB_001e899a: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001e8a03 LAB_001e89a3: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc0 LEA RSI,[0x25a5ea] MOV EDX,0x111a CALL 0x001e5590 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x48],0x0 JLE 0x001e89ed MOV RDI,qword ptr [RBP + -0x10] CALL 0x001e56b0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV EDX,dword ptr [RBP + -0x24] CALL 0x001e8ff0 MOV dword ptr [RBP + -0x28],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001e64b0 LAB_001e89ed: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xc0 CALL 0x001e5fb0 MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX LAB_001e8a03: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 flush_simple_key_cache_blocks (char *param_1,int4 param_2,int8 param_3,int4 param_4) { int4 local_30; int4 local_c; local_30 = 0; if (*param_1 == '\0') { local_c = 0; } else { inline_mysql_mutex_lock (param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0x111a) ; if (0 < *(int *)(param_1 + 0x48)) { inc_counter_for_resize_op(param_1); local_30 = flush_key_blocks_int(param_1,param_2,param_4); dec_counter_for_resize_op(param_1); } inline_mysql_mutex_unlock(param_1 + 0xc0); local_c = local_30; } return local_c; }
40,177
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert_iterator<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&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
iterator insert_iterator(const_iterator pos, Args&& ... args) { iterator result(this); JSON_ASSERT(m_data.m_value.array != nullptr); auto insert_pos = std::distance(m_data.m_value.array->begin(), pos.m_it.array_iterator); m_data.m_value.array->insert(pos.m_it.array_iterator, std::forward<Args>(args)...); result.m_it.array_iterator = m_data.m_value.array->begin() + insert_pos; // This could have been written as: // result.m_it.array_iterator = m_data.m_value.array->insert(pos.m_it.array_iterator, cnt, val); // but the return value of insert is missing in GCC 4.8, so it is written this way instead. set_parents(); return result; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert_iterator<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&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rsi, (%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rdi) movq %rax, 0x18(%rdi) movzbl (%rsi), %esi cmpl $0x2, %esi je 0xabd89 cmpl $0x1, %esi jne 0xabd93 leaq 0x8(%rbx), %rax movq $0x0, (%rax) jmp 0xabd97 movq $0x0, 0x10(%rbx) jmp 0xabd97 movq %rax, 0x18(%rbx) movq 0x8(%r14), %rdi testq %rdi, %rdi je 0xabdc6 movq 0x10(%rdx), %rsi movq %rsi, %r15 subq (%rdi), %r15 movq %rcx, %rdx callq 0xabe70 movq 0x8(%r14), %rax addq (%rax), %r15 movq %r15, 0x10(%rbx) movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq leaq 0x42026(%rip), %rdi # 0xeddf3 leaq 0x42069(%rip), %rdx # 0xede3d leaq 0x420f2(%rip), %rcx # 0xedecd movl $0x582c, %esi # imm = 0x582C xorl %eax, %eax callq 0x1beb0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov rax, 8000000000000000h mov [rdi], rsi xorps xmm0, xmm0 movups xmmword ptr [rdi+8], xmm0 mov [rdi+18h], rax movzx esi, byte ptr [rsi] cmp esi, 2 jz short loc_ABD89 cmp esi, 1 jnz short loc_ABD93 lea rax, [rbx+8] mov qword ptr [rax], 0 jmp short loc_ABD97 loc_ABD89: mov qword ptr [rbx+10h], 0 jmp short loc_ABD97 loc_ABD93: mov [rbx+18h], rax loc_ABD97: mov rdi, [r14+8] test rdi, rdi jz short loc_ABDC6 mov rsi, [rdx+10h] mov r15, rsi sub r15, [rdi] mov rdx, rcx call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6insertEN9__gnu_cxx17__normal_iteratorIPKSD_SF_EERSI_; 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>>::insert(__gnu_cxx::__normal_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*,std::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>>>,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 rax, [r14+8] add r15, [rax] mov [rbx+10h], r15 mov rax, rbx pop rbx pop r14 pop r15 retn loc_ABDC6: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMDataMTypeValu_0+23h; "m_data.m_value.array != nullptr" mov esi, 582Ch xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>( long long a1, unsigned __int8 *a2, long long a3, long long a4) { int v6; // esi _QWORD *v7; // rdi long long v8; // r15 *(_QWORD *)a1 = a2; *(_OWORD *)(a1 + 8) = 0LL; *(_QWORD *)(a1 + 24) = 0x8000000000000000LL; v6 = *a2; if ( v6 == 2 ) { *(_QWORD *)(a1 + 16) = 0LL; } else if ( v6 == 1 ) { *(_QWORD *)(a1 + 8) = 0LL; } else { *(_QWORD *)(a1 + 24) = 0x8000000000000000LL; } v7 = (_QWORD *)*((_QWORD *)a2 + 1); if ( v7 ) { v8 = *(_QWORD *)(a3 + 16) - *v7; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::insert( v7, *(_QWORD *)(a3 + 16), a4); *(_QWORD *)(a1 + 16) = **((_QWORD **)a2 + 1) + v8; return a1; } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 22572LL, "GGML_ASSERT(%s) failed", "m_data.m_value.array != nullptr"); return nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 22572LL); } }
insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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&>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV RAX,-0x8000000000000000 MOV qword ptr [RDI],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x8],XMM0 MOV qword ptr [RDI + 0x18],RAX MOVZX ESI,byte ptr [RSI] CMP ESI,0x2 JZ 0x001abd89 CMP ESI,0x1 JNZ 0x001abd93 LEA RAX,[RBX + 0x8] MOV qword ptr [RAX],0x0 JMP 0x001abd97 LAB_001abd89: MOV qword ptr [RBX + 0x10],0x0 JMP 0x001abd97 LAB_001abd93: MOV qword ptr [RBX + 0x18],RAX LAB_001abd97: MOV RDI,qword ptr [R14 + 0x8] TEST RDI,RDI JZ 0x001abdc6 MOV RSI,qword ptr [RDX + 0x10] MOV R15,RSI SUB R15,qword ptr [RDI] MOV RDX,RCX CALL 0x001abe70 MOV RAX,qword ptr [R14 + 0x8] ADD R15,qword ptr [RAX] MOV qword ptr [RBX + 0x10],R15 MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_001abdc6: LEA RDI,[0x1eddf3] LEA RDX,[0x1ede3d] LEA RCX,[0x1edecd] MOV ESI,0x582c XOR EAX,EAX CALL 0x0011beb0
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, 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&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, 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&) */ int8 * nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> :: insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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&> (int8 *param_1,char *param_2,long param_3,int8 param_4) { 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>>> *pvVar1; long lVar2; long lVar3; *param_1 = param_2; param_1[1] = 0; param_1[2] = 0; param_1[3] = 0x8000000000000000; if (*param_2 == '\x02') { param_1[2] = 0; } else if (*param_2 == '\x01') { param_1[1] = 0; } else { param_1[3] = 0x8000000000000000; } pvVar1 = *(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>>> **)(param_2 + 8); if (pvVar1 != (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>>> *)0x0) { lVar2 = *(long *)(param_3 + 0x10); lVar3 = *(long *)pvVar1; 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>>> ::insert(pvVar1,lVar2,param_4); param_1[2] = (lVar2 - lVar3) + **(long **)(param_2 + 8); return param_1; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x582c, "GGML_ASSERT(%s) failed","m_data.m_value.array != nullptr"); }
40,178
encrypt(std::vector<unsigned char, std::allocator<unsigned char>>, unsigned int, unsigned int, block*, message_digest, signature, message_digest, bool, bool)
msxemulator/build_O3/_deps/picotool-src/bintool/bintool.cpp
std::vector<uint8_t> encrypt(std::vector<uint8_t> bin, uint32_t storage_addr, uint32_t runtime_addr, block *new_block, const private_t aes_key, const public_t public_key, const private_t private_key, bool hash_value, bool sign) { std::random_device rand{}; assert(rand.max() - rand.min() >= 256); while (bin.size() % 16 != 0){ bin.push_back(rand()); // todo maybe better padding? random should be fine though } DEBUG_LOG("size %08x\n", (int)bin.size()); iv_t iv; for(auto &e : iv.bytes) { e = rand(); } std::vector<uint8_t> iv_data(iv.bytes, iv.bytes + sizeof(iv.bytes)); std::vector<uint8_t> enc_data; enc_data.resize(bin.size()); aes256_buffer(bin.data(), bin.size(), enc_data.data(), &aes_key, &iv); std::copy(enc_data.begin(), enc_data.end(), bin.begin()); block link_block(0x20000000, enc_data.size()); // ignored_item ign(1, {0}); std::shared_ptr<image_type_item> image_def = new_block->get_item<image_type_item>(); link_block.items.push_back(image_def); link_block.next_block_rel += (link_block.to_words().size())*4 + iv_data.size(); auto tmp = link_block.to_words(); DEBUG_LOG("Link block\n"); for (auto x : tmp) DEBUG_LOG("%08x", x); DEBUG_LOG("\n"); std::vector<uint8_t> link_data = words_to_lsb_bytes(tmp.begin(), tmp.end()); bin.insert(bin.begin(), link_data.begin(), link_data.end()); bin.insert(bin.begin() + link_data.size(), iv_data.begin(), iv_data.end()); new_block->physical_addr = link_block.physical_addr + link_block.next_block_rel; new_block->next_block_rel = -link_block.next_block_rel; std::shared_ptr<load_map_item> load_map = new_block->get_item<load_map_item>(); if (load_map != nullptr) { new_block->items.erase(std::remove(new_block->items.begin(), new_block->items.end(), load_map), new_block->items.end()); } return hash_andor_sign(bin, storage_addr, runtime_addr, new_block, public_key, private_key, hash_value, sign);; }
O3
cpp
encrypt(std::vector<unsigned char, std::allocator<unsigned char>>, unsigned int, unsigned int, block*, message_digest, signature, message_digest, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1598, %rsp # imm = 0x1598 movl %r9d, 0x128(%rsp) movq %r8, %r15 movl %ecx, %r13d movl %edx, 0x12c(%rsp) movq %rsi, %rbp movq %rdi, %rbx leaq 0x210(%rsp), %rdi callq 0x76a60 movl 0x8(%rbp), %eax subl (%rbp), %eax testb $0xf, %al je 0x75dde leaq 0x210(%rsp), %r14 leaq 0x1c8(%rsp), %r12 movq %r14, %rdi callq 0xf610 movb %al, 0x1c8(%rsp) movq 0x8(%rbp), %rsi cmpq 0x10(%rbp), %rsi je 0x75dc8 movb %al, (%rsi) movq 0x8(%rbp), %rax incq %rax movq %rax, 0x8(%rbp) jmp 0x75dd7 movq %rbp, %rdi movq %r12, %rdx callq 0x6f766 movq 0x8(%rbp), %rax subl (%rbp), %eax testb $0xf, %al jne 0x75da0 movl %r13d, %r12d movq %rbx, %r14 xorl %ebx, %ebx leaq 0x210(%rsp), %r13 movq %r13, %rdi callq 0xf610 movb %al, 0x1b8(%rsp,%rbx) incq %rbx cmpq $0x10, %rbx jne 0x75dee leaq 0x168(%rsp), %rdi leaq 0x1b8(%rsp), %rsi leaq 0x1c8(%rsp), %rcx leaq 0x1c8(%rsp), %rdx callq 0x76b1c xorps %xmm0, %xmm0 leaq 0x130(%rsp), %rdi movaps %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq 0x8(%rbp), %rsi subq (%rbp), %rsi callq 0x76b5e movq %r14, %rbx movq (%rbp), %rdi movq 0x8(%rbp), %rsi subq %rdi, %rsi movq 0x130(%rsp), %rdx leaq 0x1b8(%rsp), %r8 leaq 0x15d0(%rsp), %rcx callq 0x7906b movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rdx subq %rsi, %rdx je 0x75ea9 movq (%rbp), %rdi callq 0xf730 movq 0x130(%rsp), %rsi movq 0x138(%rsp), %rax jmp 0x75eac movq %rsi, %rax subl %esi, %eax leaq 0x1d8(%rsp), %r14 movl $0x20000000, -0x10(%r14) # imm = 0x20000000 movl %eax, -0xc(%r14) movl $0x0, -0x8(%r14) xorps %xmm0, %xmm0 movups %xmm0, (%r14) xorl %eax, %eax movq %rax, 0x10(%r14) leaq 0x1f0(%rsp), %rdi movaps %xmm0, (%rdi) movq %rax, 0x10(%rdi) callq 0x55f4a leaq 0x190(%rsp), %rdi movq %r15, %rsi callq 0x39a24 movq 0x190(%rsp), %rcx movq 0x198(%rsp), %rax movq %rcx, 0x110(%rsp) movq %rax, 0x118(%rsp) testq %rax, %rax je 0x75f35 movq 0x6f091(%rip), %rcx # 0xe4fb8 cmpb $0x0, (%rcx) je 0x75f31 incl 0x8(%rax) jmp 0x75f35 lock incl 0x8(%rax) leaq 0x110(%rsp), %rsi movq %r14, %rdi callq 0x645b0 movq 0x118(%rsp), %rdi testq %rdi, %rdi je 0x75f57 callq 0x4bd0a leaq 0x110(%rsp), %rdi leaq 0x1c8(%rsp), %rsi callq 0x3ab0a movl 0x118(%rsp), %eax addl 0x170(%rsp), %eax movq 0x110(%rsp), %rdi movl 0x168(%rsp), %ecx addl %edi, %ecx subl %ecx, %eax addl %eax, 0x1cc(%rsp) testq %rdi, %rdi je 0x75fa9 movq 0x120(%rsp), %rsi subq %rdi, %rsi callq 0xf470 leaq 0x110(%rsp), %rdi leaq 0x1c8(%rsp), %rsi callq 0x3ab0a movq 0x110(%rsp), %rsi movq 0x118(%rsp), %rdx leaq 0x150(%rsp), %rdi callq 0x3acd7 movq (%rbp), %rsi movq 0x150(%rsp), %rdx movq 0x158(%rsp), %rcx movq %rbp, %rdi callq 0x6e878 movq 0x158(%rsp), %rsi subq 0x150(%rsp), %rsi addq (%rbp), %rsi movq 0x168(%rsp), %rdx movq 0x170(%rsp), %rcx movq %rbp, %rdi callq 0x6e878 movl 0x1cc(%rsp), %eax movl 0x1c8(%rsp), %ecx addl %eax, %ecx movl %ecx, (%r15) negl %eax movl %eax, 0x4(%r15) leaq 0x180(%rsp), %rdi movq %r15, %rsi callq 0x39b1e cmpq $0x0, 0x180(%rsp) je 0x7607c movq 0x10(%r15), %rdi movq 0x18(%r15), %rsi leaq 0x180(%rsp), %rdx callq 0x78f43 leaq 0x10(%r15), %rdi movq 0x18(%r15), %rdx movq %rax, %rsi callq 0x6fbfa leaq 0x1a0(%rsp), %rdi movq %rbp, %rsi callq 0x3997a movl $0x1b, %ecx movq %rsp, %rdi leaq 0x15f0(%rsp), %rsi rep movsq (%rsi), %es:(%rdi) leaq 0x16c8(%rsp), %rax movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups %xmm1, 0xe8(%rsp) movups %xmm0, 0xd8(%rsp) movzbl 0x16e8(%rsp), %eax movl %eax, 0xf8(%rsp) movl $0x0, 0x100(%rsp) movzbl 0x128(%rsp), %r9d leaq 0x1a0(%rsp), %rsi movq %rbx, %rdi movl 0x12c(%rsp), %edx movl %r12d, %ecx movq %r15, %r8 callq 0x74aba movq 0x1a0(%rsp), %rdi testq %rdi, %rdi je 0x7611b movq 0x1b0(%rsp), %rsi subq %rdi, %rsi callq 0xf470 movq 0x188(%rsp), %rdi testq %rdi, %rdi je 0x7612d callq 0x4bd0a movq 0x150(%rsp), %rdi testq %rdi, %rdi je 0x7614a movq 0x160(%rsp), %rsi subq %rdi, %rsi callq 0xf470 movq 0x110(%rsp), %rdi testq %rdi, %rdi je 0x76167 movq 0x120(%rsp), %rsi subq %rdi, %rsi callq 0xf470 movq 0x198(%rsp), %rdi testq %rdi, %rdi je 0x76179 callq 0x4bd0a movq %r14, %rdi callq 0x55f4a movq 0x130(%rsp), %rdi testq %rdi, %rdi je 0x7619e movq 0x140(%rsp), %rsi subq %rdi, %rsi callq 0xf470 movq 0x168(%rsp), %rdi testq %rdi, %rdi je 0x761bb movq 0x178(%rsp), %rsi subq %rdi, %rsi callq 0xf470 leaq 0x210(%rsp), %rdi callq 0xf3f0 movq %rbx, %rax addq $0x1598, %rsp # imm = 0x1598 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x76208 jmp 0x76208 jmp 0x762ff movq %rax, %rbx movq 0x1a0(%rsp), %rdi testq %rdi, %rdi je 0x7620b movq 0x1b0(%rsp), %rsi subq %rdi, %rsi callq 0xf470 jmp 0x7620b movq %rax, %rbx movq 0x188(%rsp), %rdi testq %rdi, %rdi je 0x76226 callq 0x4bd0a jmp 0x76226 jmp 0x76223 jmp 0x76223 movq %rax, %rbx movq 0x150(%rsp), %rdi testq %rdi, %rdi je 0x76248 movq 0x160(%rsp), %rsi subq %rdi, %rsi callq 0xf470 jmp 0x76248 movq %rax, %rbx movq 0x110(%rsp), %rdi testq %rdi, %rdi je 0x76283 movq 0x120(%rsp), %rsi subq %rdi, %rsi callq 0xf470 jmp 0x76283 jmp 0x76269 movq %rax, %rbx jmp 0x76283 movq %rax, %rbx movq 0x118(%rsp), %rdi testq %rdi, %rdi je 0x76283 callq 0x4bd0a movq 0x198(%rsp), %rdi testq %rdi, %rdi je 0x76295 callq 0x4bd0a movq %r14, %rdi callq 0x55f4a movq 0x130(%rsp), %rdi testq %rdi, %rdi je 0x762ba movq 0x140(%rsp), %rsi subq %rdi, %rsi callq 0xf470 movq 0x168(%rsp), %rdi testq %rdi, %rdi je 0x762ea movq 0x178(%rsp), %rsi subq %rdi, %rsi callq 0xf470 jmp 0x762ea movq %rax, %rbx jmp 0x76295 jmp 0x762e7 movq %rax, %rbx jmp 0x7629d jmp 0x762e7 movq %rax, %rbx leaq 0x210(%rsp), %rdi callq 0xf3f0 movq %rbx, %rdi callq 0xf7d0 movq %rax, %rdi callq 0x1d2b2
_Z7encryptSt6vectorIhSaIhEEjjP5block14message_digest9signatureS4_bb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1598h mov [rsp+15C8h+var_14A0], r9d mov r15, r8 mov r13d, ecx mov [rsp+15C8h+var_149C], edx mov rbp, rsi mov rbx, rdi lea rdi, [rsp+15C8h+var_13B8]; this call _ZNSt13random_deviceC2Ev; std::random_device::random_device(void) mov eax, [rbp+8] sub eax, [rbp+0] test al, 0Fh jz short loc_75DDE lea r14, [rsp+15C8h+var_13B8] lea r12, [rsp+15C8h+var_1400] loc_75DA0: mov rdi, r14; this call __ZNSt13random_device9_M_getvalEv; std::random_device::_M_getval(void) mov byte ptr [rsp+15C8h+var_1400], al mov rsi, [rbp+8] cmp rsi, [rbp+10h] jz short loc_75DC8 mov [rsi], al mov rax, [rbp+8] inc rax mov [rbp+8], rax jmp short loc_75DD7 loc_75DC8: mov rdi, rbp mov rdx, r12 call _ZNSt6vectorIhSaIhEE17_M_realloc_insertIJhEEEvN9__gnu_cxx17__normal_iteratorIPhS1_EEDpOT_; std::vector<uchar>::_M_realloc_insert<uchar>(__gnu_cxx::__normal_iterator<uchar *,std::vector<uchar>>,uchar &&) mov rax, [rbp+8] loc_75DD7: sub eax, [rbp+0] test al, 0Fh jnz short loc_75DA0 loc_75DDE: mov r12d, r13d mov r14, rbx xor ebx, ebx lea r13, [rsp+15C8h+var_13B8] loc_75DEE: mov rdi, r13; this call __ZNSt13random_device9_M_getvalEv; std::random_device::_M_getval(void) mov [rsp+rbx+15C8h+var_1410], al inc rbx cmp rbx, 10h jnz short loc_75DEE lea rdi, [rsp+15C8h+var_1460] lea rsi, [rsp+15C8h+var_1410] lea rcx, [rsp+15C8h+var_1400] lea rdx, [rsp+15C8h+var_1400] call _ZNSt6vectorIhSaIhEEC2IPhvEET_S4_RKS0_; std::vector<uchar>::vector<uchar *,void>(uchar *,uchar *,std::allocator<uchar> const&) xorps xmm0, xmm0 lea rdi, [rsp+15C8h+var_1498] movaps xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rsi, [rbp+8] sub rsi, [rbp+0] call _ZNSt6vectorIhSaIhEE6resizeEm; std::vector<uchar>::resize(ulong) mov rbx, r14 mov rdi, [rbp+0] mov rsi, [rbp+8] sub rsi, rdi mov rdx, [rsp+15C8h+var_1498] lea r8, [rsp+15C8h+var_1410] lea rcx, [rsp+15C8h+arg_0] call mb_aes256_buffer mov rsi, [rsp+15C8h+var_1498] mov rdx, [rsp+15C8h+var_1490] sub rdx, rsi jz short loc_75EA9 mov rdi, [rbp+0] call _memmove mov rsi, [rsp+15C8h+var_1498] mov rax, [rsp+15C8h+var_1490] jmp short loc_75EAC loc_75EA9: mov rax, rsi loc_75EAC: sub eax, esi lea r14, [rsp+15C8h+var_13F0] mov dword ptr [r14-10h], 20000000h mov [r14-0Ch], eax mov dword ptr [r14-8], 0 xorps xmm0, xmm0 movups xmmword ptr [r14], xmm0 xor eax, eax mov [r14+10h], rax lea rdi, [rsp+15C8h+var_13D8] movaps xmmword ptr [rdi], xmm0 mov [rdi+10h], rax call _ZNSt6vectorISt10shared_ptrI4itemESaIS2_EED2Ev; std::vector<std::shared_ptr<item>>::~vector() lea rdi, [rsp+15C8h+var_1438] mov rsi, r15 call _ZN5block8get_itemI15image_type_itemEESt10shared_ptrIT_Ev; block::get_item<image_type_item>(void) mov rcx, [rsp+15C8h+var_1438] mov rax, [rsp+15C8h+var_1430] mov [rsp+15C8h+var_14B8], rcx mov [rsp+15C8h+var_14B0], rax test rax, rax jz short loc_75F35 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_75F31 inc dword ptr [rax+8] jmp short loc_75F35 loc_75F31: lock inc dword ptr [rax+8] loc_75F35: lea rsi, [rsp+15C8h+var_14B8] mov rdi, r14 call _ZNSt6vectorISt10shared_ptrI4itemESaIS2_EE12emplace_backIJS2_EEEvDpOT_; std::vector<std::shared_ptr<item>>::emplace_back<std::shared_ptr<item>>(std::shared_ptr<item> &&) mov rdi, [rsp+15C8h+var_14B0] test rdi, rdi jz short loc_75F57 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_75F57: lea rdi, [rsp+15C8h+var_14B8]; this lea rsi, [rsp+15C8h+var_1400] call _ZN5block8to_wordsEv; block::to_words(void) mov eax, dword ptr [rsp+15C8h+var_14B0] add eax, dword ptr [rsp+15C8h+var_1458] mov rdi, [rsp+15C8h+var_14B8]; void * mov ecx, dword ptr [rsp+15C8h+var_1460] add ecx, edi sub eax, ecx add [rsp+15C8h+var_13FC], eax test rdi, rdi jz short loc_75FA9 mov rsi, [rsp+15C8h+var_14A8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_75FA9: lea rdi, [rsp+15C8h+var_14B8]; this lea rsi, [rsp+15C8h+var_1400] call _ZN5block8to_wordsEv; block::to_words(void) mov rsi, [rsp+15C8h+var_14B8] mov rdx, [rsp+15C8h+var_14B0] lea rdi, [rsp+15C8h+var_1478] call _Z18words_to_lsb_bytesIN9__gnu_cxx17__normal_iteratorIPjSt6vectorIjSaIjEEEEhES3_IT0_SaIS7_EET_SA_; words_to_lsb_bytes<__gnu_cxx::__normal_iterator<uint *,std::vector<uint>>,uchar>(__gnu_cxx::__normal_iterator<uint *,std::vector<uint>>,__gnu_cxx::__normal_iterator<uint *,std::vector<uint>>) mov rsi, [rbp+0] mov rdx, [rsp+15C8h+var_1478] mov rcx, [rsp+15C8h+var_1470] mov rdi, rbp call _ZNSt6vectorIhSaIhEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPhS1_EEEEvS6_T_S7_St20forward_iterator_tag; std::vector<uchar>::_M_range_insert<__gnu_cxx::__normal_iterator<uchar *,std::vector<uchar>>>(__gnu_cxx::__normal_iterator<uchar *,std::vector<uchar>>,__gnu_cxx::__normal_iterator<uchar *,std::vector<uchar>>,__gnu_cxx::__normal_iterator<uchar *,std::vector<uchar>>,std::forward_iterator_tag) mov rsi, [rsp+15C8h+var_1470] sub rsi, [rsp+15C8h+var_1478] add rsi, [rbp+0] mov rdx, [rsp+15C8h+var_1460] mov rcx, [rsp+15C8h+var_1458] mov rdi, rbp call _ZNSt6vectorIhSaIhEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPhS1_EEEEvS6_T_S7_St20forward_iterator_tag; std::vector<uchar>::_M_range_insert<__gnu_cxx::__normal_iterator<uchar *,std::vector<uchar>>>(__gnu_cxx::__normal_iterator<uchar *,std::vector<uchar>>,__gnu_cxx::__normal_iterator<uchar *,std::vector<uchar>>,__gnu_cxx::__normal_iterator<uchar *,std::vector<uchar>>,std::forward_iterator_tag) mov eax, [rsp+15C8h+var_13FC] mov ecx, [rsp+15C8h+var_1400] add ecx, eax mov [r15], ecx neg eax mov [r15+4], eax lea rdi, [rsp+15C8h+var_1448] mov rsi, r15 call _ZN5block8get_itemI13load_map_itemEESt10shared_ptrIT_Ev; block::get_item<load_map_item>(void) cmp [rsp+15C8h+var_1448], 0 jz short loc_7607C mov rdi, [r15+10h] mov rsi, [r15+18h] lea rdx, [rsp+15C8h+var_1448] call _ZSt11__remove_ifIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrI4itemESt6vectorIS4_SaIS4_EEEENS0_5__ops16_Iter_equals_valIKS2_I13load_map_itemEEEET_SG_SG_T0_; std::__remove_if<__gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>,__gnu_cxx::__ops::_Iter_equals_val<std::shared_ptr const<load_map_item>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>,__gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>,__gnu_cxx::__ops::_Iter_equals_val<std::shared_ptr const<load_map_item>>) lea rdi, [r15+10h] mov rdx, [r15+18h] mov rsi, rax call _ZNSt6vectorISt10shared_ptrI4itemESaIS2_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS2_S4_EES8_; std::vector<std::shared_ptr<item>>::_M_erase(__gnu_cxx::__normal_iterator<std::shared_ptr<item>*,std::vector<std::shared_ptr<item>>>,__gnu_cxx::__normal_iterator<std::shared_ptr<item>*,std::vector<std::shared_ptr<item>>>) loc_7607C: lea rdi, [rsp+15C8h+var_1428] mov rsi, rbp call _ZNSt6vectorIhSaIhEEC2ERKS1_; std::vector<uchar>::vector(std::vector<uchar> const&) mov ecx, 1Bh mov rdi, rsp lea rsi, [rsp+15C8h+arg_20] rep movsq lea rax, [rsp+15C8h+arg_F8] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups [rsp+15C8h+var_14E0], xmm1 movups [rsp+15C8h+var_14F0], xmm0 movzx eax, byte ptr [rsp+15C8h+arg_118] mov [rsp+15C8h+var_14D0], eax mov [rsp+15C8h+var_14C8], 0 movzx r9d, byte ptr [rsp+15C8h+var_14A0] lea rsi, [rsp+15C8h+var_1428] mov rdi, rbx mov edx, [rsp+15C8h+var_149C] mov ecx, r12d mov r8, r15 call _Z15hash_andor_signSt6vectorIhSaIhEEjjP5block9signature14message_digestbbb; hash_andor_sign(std::vector<uchar>,uint,uint,block *,signature,message_digest,bool,bool,bool) mov rdi, [rsp+15C8h+var_1428]; void * test rdi, rdi jz short loc_7611B mov rsi, [rsp+15C8h+var_1418] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7611B: mov rdi, [rsp+15C8h+var_1440] test rdi, rdi jz short loc_7612D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7612D: mov rdi, [rsp+15C8h+var_1478]; void * test rdi, rdi jz short loc_7614A mov rsi, [rsp+15C8h+var_1468] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7614A: mov rdi, [rsp+15C8h+var_14B8]; void * test rdi, rdi jz short loc_76167 mov rsi, [rsp+15C8h+var_14A8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76167: mov rdi, [rsp+15C8h+var_1430] test rdi, rdi jz short loc_76179 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_76179: mov rdi, r14 call _ZNSt6vectorISt10shared_ptrI4itemESaIS2_EED2Ev; std::vector<std::shared_ptr<item>>::~vector() mov rdi, [rsp+15C8h+var_1498]; void * test rdi, rdi jz short loc_7619E mov rsi, [rsp+15C8h+var_1488] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7619E: mov rdi, [rsp+15C8h+var_1460]; void * test rdi, rdi jz short loc_761BB mov rsi, [rsp+15C8h+var_1450] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_761BB: lea rdi, [rsp+15C8h+var_13B8]; this call __ZNSt13random_device7_M_finiEv; std::random_device::_M_fini(void) mov rax, rbx add rsp, 1598h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_76208 jmp short loc_76208 jmp loc_762FF mov rbx, rax mov rdi, [rsp+arg_198]; void * test rdi, rdi jz short loc_7620B mov rsi, [rsp+arg_1A8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7620B loc_76208: mov rbx, rax loc_7620B: mov rdi, [rsp+arg_180] test rdi, rdi jz short loc_76226 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_76226 jmp short loc_76223 jmp short $+2 loc_76223: mov rbx, rax loc_76226: mov rdi, [rsp+arg_148]; void * test rdi, rdi jz short loc_76248 mov rsi, [rsp+arg_158] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76248 mov rbx, rax loc_76248: mov rdi, [rsp+arg_108]; void * test rdi, rdi jz short loc_76283 mov rsi, [rsp+arg_118] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_76283 jmp short $+2 loc_76269: mov rbx, rax jmp short loc_76283 mov rbx, rax mov rdi, [rsp+arg_110] test rdi, rdi jz short loc_76283 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_76283: mov rdi, [rsp+arg_190] test rdi, rdi jz short loc_76295 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_76295: mov rdi, r14 call _ZNSt6vectorISt10shared_ptrI4itemESaIS2_EED2Ev; std::vector<std::shared_ptr<item>>::~vector() loc_7629D: mov rdi, [rsp+arg_128]; void * test rdi, rdi jz short loc_762BA mov rsi, [rsp+arg_138] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_762BA: mov rdi, [rsp+arg_160]; void * test rdi, rdi jz short loc_762EA mov rsi, [rsp+arg_170] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_762EA mov rbx, rax jmp short loc_76295 jmp short loc_762E7 mov rbx, rax jmp short loc_7629D jmp short $+2 loc_762E7: mov rbx, rax loc_762EA: lea rdi, [rsp+arg_208]; this call __ZNSt13random_device7_M_finiEv; std::random_device::_M_fini(void) mov rdi, rbx call __Unwind_Resume loc_762FF: mov rdi, rax call __clang_call_terminate
long long encrypt( long long a1, long long *a2, unsigned int a3, unsigned int a4, long long a5, int a6, char a7, long long a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14, long long a15, long long a16, long long a17, long long a18, long long a19, long long a20, long long a21, long long a22, long long a23, long long a24, long long a25, long long a26, long long a27, long long a28, long long a29, long long a30, long long a31, long long a32, long long a33, long long a34, long long a35, long long a36, long long a37, __int128 a38, __int128 a39, long long a40) { char v43; // al _BYTE *v44; // rsi long long v45; // rax long long i; // rbx int v47; // esi int v48; // eax int v49; // eax long long v50; // rax int v52[54]; // [rsp+0h] [rbp-15C8h] BYREF __int128 v53; // [rsp+110h] [rbp-14B8h] BYREF long long v54; // [rsp+120h] [rbp-14A8h] int v55; // [rsp+128h] [rbp-14A0h] unsigned int v56; // [rsp+12Ch] [rbp-149Ch] __int128 v57; // [rsp+130h] [rbp-1498h] BYREF long long v58; // [rsp+140h] [rbp-1488h] void *v59; // [rsp+150h] [rbp-1478h] BYREF long long v60; // [rsp+158h] [rbp-1470h] long long v61; // [rsp+160h] [rbp-1468h] void *v62; // [rsp+168h] [rbp-1460h] BYREF long long v63; // [rsp+170h] [rbp-1458h] long long v64; // [rsp+178h] [rbp-1450h] long long v65; // [rsp+180h] [rbp-1448h] BYREF volatile signed __int32 *v66; // [rsp+188h] [rbp-1440h] __int128 v67; // [rsp+190h] [rbp-1438h] BYREF void *v68[3]; // [rsp+1A0h] [rbp-1428h] BYREF _BYTE v69[16]; // [rsp+1B8h] [rbp-1410h] BYREF int v70; // [rsp+1C8h] [rbp-1400h] BYREF int v71; // [rsp+1CCh] [rbp-13FCh] int v72; // [rsp+1D0h] [rbp-13F8h] __int128 v73; // [rsp+1D8h] [rbp-13F0h] BYREF long long v74; // [rsp+1E8h] [rbp-13E0h] __int128 v75; // [rsp+1F0h] [rbp-13D8h] BYREF long long v76; // [rsp+200h] [rbp-13C8h] _BYTE v77[5048]; // [rsp+210h] [rbp-13B8h] BYREF v55 = a6; v56 = a3; std::random_device::random_device((std::random_device *)v77); if ( ((*((_BYTE *)a2 + 8) - *(_BYTE *)a2) & 0xF) != 0 ) { do { v43 = std::random_device::_M_getval((std::random_device *)v77); LOBYTE(v70) = v43; v44 = (_BYTE *)a2[1]; if ( v44 == (_BYTE *)a2[2] ) { std::vector<unsigned char>::_M_realloc_insert<unsigned char>((long long)a2, (long long)v44, &v70); v45 = a2[1]; } else { *v44 = v43; v45 = a2[1] + 1; a2[1] = v45; } } while ( (((_BYTE)v45 - *(_BYTE *)a2) & 0xF) != 0 ); } for ( i = 0LL; i != 16; ++i ) v69[i] = std::random_device::_M_getval((std::random_device *)v77); std::vector<unsigned char>::vector<unsigned char *,void>(&v62, v69, &v70, &v70); v57 = 0LL; v58 = 0LL; std::vector<unsigned char>::resize(&v57, a2[1] - *a2); mb_aes256_buffer(*a2, a2[1] - *a2, v57, &a7, v69); v47 = v57; if ( *((_QWORD *)&v57 + 1) == (_QWORD)v57 ) { v48 = v57; } else { memmove(*a2, v57, *((_QWORD *)&v57 + 1) - v57); v47 = v57; v48 = DWORD2(v57); } v70 = 0x20000000; v71 = v48 - v47; v72 = 0; v73 = 0LL; v74 = 0LL; v75 = 0LL; v76 = 0LL; std::vector<std::shared_ptr<item>>::~vector((long long)&v75); block::get_item<image_type_item>(&v67, a5); v53 = v67; if ( *((_QWORD *)&v67 + 1) ) { if ( _libc_single_threaded ) ++*(_DWORD *)(*((_QWORD *)&v67 + 1) + 8LL); else _InterlockedIncrement((volatile signed __int32 *)(*((_QWORD *)&v67 + 1) + 8LL)); } std::vector<std::shared_ptr<item>>::emplace_back<std::shared_ptr<item>>((long long)&v73, &v53); if ( *((_QWORD *)&v53 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v53 + 1)); block::to_words((block *)&v53, &v70); v71 += v63 + DWORD2(v53) - (v53 + (_DWORD)v62); if ( (_QWORD)v53 ) operator delete((void *)v53, v54 - v53); block::to_words((block *)&v53, &v70); words_to_lsb_bytes<__gnu_cxx::__normal_iterator<unsigned int *,std::vector<unsigned int>>,unsigned char>( (long long)&v59, (unsigned int *)v53, *((unsigned long long *)&v53 + 1)); std::vector<unsigned char>::_M_range_insert<__gnu_cxx::__normal_iterator<unsigned char *,std::vector<unsigned char>>>( (long long)a2, (_BYTE *)*a2, (long long)v59, v60); std::vector<unsigned char>::_M_range_insert<__gnu_cxx::__normal_iterator<unsigned char *,std::vector<unsigned char>>>( (long long)a2, (_BYTE *)(*a2 + v60 - (_QWORD)v59), (long long)v62, v63); v49 = v71; *(_DWORD *)a5 = v71 + v70; *(_DWORD *)(a5 + 4) = -v49; block::get_item<load_map_item>(&v65, a5); if ( v65 ) { v50 = std::__remove_if<__gnu_cxx::__normal_iterator<std::shared_ptr<item> *,std::vector<std::shared_ptr<item>>>,__gnu_cxx::__ops::_Iter_equals_val<std::shared_ptr const<load_map_item>>>( *(_QWORD *)(a5 + 16), *(_QWORD *)(a5 + 24), &v65); std::vector<std::shared_ptr<item>>::_M_erase(a5 + 16, v50, *(__int128 **)(a5 + 24)); } std::vector<unsigned char>::vector(v68, a2); qmemcpy(v52, &a11, sizeof(v52)); hash_andor_sign( a1, (long long)v68, v56, a4, (int *)a5, (unsigned __int8)v55, v52[0], v52[2], v52[4], v52[6], v52[8], v52[10], v52[12], v52[14], v52[16], v52[18], v52[20], v52[22], v52[24], v52[26], v52[28], v52[30], v52[32], v52[34], v52[36], v52[38], v52[40], v52[42], v52[44], v52[46], v52[48], v52[50], v52[52], a38, a39, a40, 0); if ( v68[0] ) operator delete(v68[0], (char *)v68[2] - (char *)v68[0]); if ( v66 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v66); if ( v59 ) operator delete(v59, v61 - (_QWORD)v59); if ( (_QWORD)v53 ) operator delete((void *)v53, v54 - v53); if ( *((_QWORD *)&v67 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v67 + 1)); std::vector<std::shared_ptr<item>>::~vector((long long)&v73); if ( (_QWORD)v57 ) operator delete((void *)v57, v58 - v57); if ( v62 ) operator delete(v62, v64 - (_QWORD)v62); std::random_device::_M_fini((std::random_device *)v77); return a1; }
encrypt: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1598 MOV dword ptr [RSP + 0x128],R9D MOV R15,R8 MOV R13D,ECX MOV dword ptr [RSP + 0x12c],EDX MOV RBP,RSI MOV RBX,RDI LEA RDI,[RSP + 0x210] CALL 0x00176a60 MOV EAX,dword ptr [RBP + 0x8] SUB EAX,dword ptr [RBP] TEST AL,0xf JZ 0x00175dde LEA R14,[RSP + 0x210] LEA R12,[RSP + 0x1c8] LAB_00175da0: MOV RDI,R14 CALL 0x0010f610 MOV byte ptr [RSP + 0x1c8],AL MOV RSI,qword ptr [RBP + 0x8] CMP RSI,qword ptr [RBP + 0x10] JZ 0x00175dc8 MOV byte ptr [RSI],AL MOV RAX,qword ptr [RBP + 0x8] INC RAX MOV qword ptr [RBP + 0x8],RAX JMP 0x00175dd7 LAB_00175dc8: MOV RDI,RBP MOV RDX,R12 CALL 0x0016f766 MOV RAX,qword ptr [RBP + 0x8] LAB_00175dd7: SUB EAX,dword ptr [RBP] TEST AL,0xf JNZ 0x00175da0 LAB_00175dde: MOV R12D,R13D MOV R14,RBX XOR EBX,EBX LEA R13,[RSP + 0x210] LAB_00175dee: MOV RDI,R13 CALL 0x0010f610 MOV byte ptr [RSP + RBX*0x1 + 0x1b8],AL INC RBX CMP RBX,0x10 JNZ 0x00175dee LAB_00175e06: LEA RDI,[RSP + 0x168] LEA RSI,[RSP + 0x1b8] LEA RCX,[RSP + 0x1c8] LEA RDX,[RSP + 0x1c8] CALL 0x00176b1c XORPS XMM0,XMM0 LEA RDI,[RSP + 0x130] MOVAPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RSI,qword ptr [RBP + 0x8] SUB RSI,qword ptr [RBP] LAB_00175e49: CALL 0x00176b5e MOV RBX,R14 MOV RDI,qword ptr [RBP] MOV RSI,qword ptr [RBP + 0x8] SUB RSI,RDI MOV RDX,qword ptr [RSP + 0x130] LEA R8,[RSP + 0x1b8] LEA RCX,[RSP + 0x15d0] CALL 0x0017906b LAB_00175e79: MOV RSI,qword ptr [RSP + 0x130] MOV RDX,qword ptr [RSP + 0x138] SUB RDX,RSI JZ 0x00175ea9 MOV RDI,qword ptr [RBP] CALL 0x0010f730 MOV RSI,qword ptr [RSP + 0x130] MOV RAX,qword ptr [RSP + 0x138] JMP 0x00175eac LAB_00175ea9: MOV RAX,RSI LAB_00175eac: SUB EAX,ESI LEA R14,[RSP + 0x1d8] MOV dword ptr [R14 + -0x10],0x20000000 MOV dword ptr [R14 + -0xc],EAX MOV dword ptr [R14 + -0x8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14],XMM0 XOR EAX,EAX MOV qword ptr [R14 + 0x10],RAX LEA RDI,[RSP + 0x1f0] MOVAPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],RAX CALL 0x00155f4a LAB_00175eeb: LEA RDI,[RSP + 0x190] MOV RSI,R15 CALL 0x00139a24 MOV RCX,qword ptr [RSP + 0x190] MOV RAX,qword ptr [RSP + 0x198] MOV qword ptr [RSP + 0x110],RCX MOV qword ptr [RSP + 0x118],RAX TEST RAX,RAX JZ 0x00175f35 MOV RCX,qword ptr [0x001e4fb8] CMP byte ptr [RCX],0x0 JZ 0x00175f31 INC dword ptr [RAX + 0x8] JMP 0x00175f35 LAB_00175f31: INC.LOCK dword ptr [RAX + 0x8] LAB_00175f35: LEA RSI,[RSP + 0x110] MOV RDI,R14 CALL 0x001645b0 MOV RDI,qword ptr [RSP + 0x118] TEST RDI,RDI JZ 0x00175f57 CALL 0x0014bd0a LAB_00175f57: LEA RDI,[RSP + 0x110] LEA RSI,[RSP + 0x1c8] CALL 0x0013ab0a MOV EAX,dword ptr [RSP + 0x118] ADD EAX,dword ptr [RSP + 0x170] MOV RDI,qword ptr [RSP + 0x110] MOV ECX,dword ptr [RSP + 0x168] ADD ECX,EDI SUB EAX,ECX ADD dword ptr [RSP + 0x1cc],EAX TEST RDI,RDI JZ 0x00175fa9 MOV RSI,qword ptr [RSP + 0x120] SUB RSI,RDI CALL 0x0010f470 LAB_00175fa9: LEA RDI,[RSP + 0x110] LEA RSI,[RSP + 0x1c8] CALL 0x0013ab0a MOV RSI,qword ptr [RSP + 0x110] MOV RDX,qword ptr [RSP + 0x118] LAB_00175fce: LEA RDI,[RSP + 0x150] CALL 0x0013acd7 MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RSP + 0x150] MOV RCX,qword ptr [RSP + 0x158] LAB_00175fef: MOV RDI,RBP CALL 0x0016e878 MOV RSI,qword ptr [RSP + 0x158] SUB RSI,qword ptr [RSP + 0x150] ADD RSI,qword ptr [RBP] MOV RDX,qword ptr [RSP + 0x168] MOV RCX,qword ptr [RSP + 0x170] LAB_0017601b: MOV RDI,RBP CALL 0x0016e878 MOV EAX,dword ptr [RSP + 0x1cc] MOV ECX,dword ptr [RSP + 0x1c8] ADD ECX,EAX MOV dword ptr [R15],ECX NEG EAX MOV dword ptr [R15 + 0x4],EAX LAB_0017603c: LEA RDI,[RSP + 0x180] MOV RSI,R15 CALL 0x00139b1e CMP qword ptr [RSP + 0x180],0x0 JZ 0x0017607c MOV RDI,qword ptr [R15 + 0x10] MOV RSI,qword ptr [R15 + 0x18] LAB_0017605f: LEA RDX,[RSP + 0x180] CALL 0x00178f43 LEA RDI,[R15 + 0x10] MOV RDX,qword ptr [R15 + 0x18] LAB_00176074: MOV RSI,RAX CALL 0x0016fbfa LAB_0017607c: LEA RDI,[RSP + 0x1a0] MOV RSI,RBP CALL 0x0013997a LAB_0017608c: MOV ECX,0x1b MOV RDI,RSP LEA RSI,[RSP + 0x15f0] MOVSQ.REP RDI,RSI LEA RAX,[RSP + 0x16c8] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RSP + 0xe8],XMM1 MOVUPS xmmword ptr [RSP + 0xd8],XMM0 MOVZX EAX,byte ptr [RSP + 0x16e8] MOV dword ptr [RSP + 0xf8],EAX MOV dword ptr [RSP + 0x100],0x0 MOVZX R9D,byte ptr [RSP + 0x128] LEA RSI,[RSP + 0x1a0] MOV RDI,RBX MOV EDX,dword ptr [RSP + 0x12c] MOV ECX,R12D MOV R8,R15 CALL 0x00174aba MOV RDI,qword ptr [RSP + 0x1a0] TEST RDI,RDI JZ 0x0017611b MOV RSI,qword ptr [RSP + 0x1b0] SUB RSI,RDI CALL 0x0010f470 LAB_0017611b: MOV RDI,qword ptr [RSP + 0x188] TEST RDI,RDI JZ 0x0017612d CALL 0x0014bd0a LAB_0017612d: MOV RDI,qword ptr [RSP + 0x150] TEST RDI,RDI JZ 0x0017614a MOV RSI,qword ptr [RSP + 0x160] SUB RSI,RDI CALL 0x0010f470 LAB_0017614a: MOV RDI,qword ptr [RSP + 0x110] TEST RDI,RDI JZ 0x00176167 MOV RSI,qword ptr [RSP + 0x120] SUB RSI,RDI CALL 0x0010f470 LAB_00176167: MOV RDI,qword ptr [RSP + 0x198] TEST RDI,RDI JZ 0x00176179 CALL 0x0014bd0a LAB_00176179: MOV RDI,R14 CALL 0x00155f4a MOV RDI,qword ptr [RSP + 0x130] TEST RDI,RDI JZ 0x0017619e MOV RSI,qword ptr [RSP + 0x140] SUB RSI,RDI CALL 0x0010f470 LAB_0017619e: MOV RDI,qword ptr [RSP + 0x168] TEST RDI,RDI JZ 0x001761bb MOV RSI,qword ptr [RSP + 0x178] SUB RSI,RDI CALL 0x0010f470 LAB_001761bb: LEA RDI,[RSP + 0x210] CALL 0x0010f3f0 MOV RAX,RBX ADD RSP,0x1598 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* encrypt(std::vector<unsigned char, std::allocator<unsigned char> >, unsigned int, unsigned int, block*, message_digest, signature, message_digest, bool, bool) */ int8 encrypt(int8 param_1,vector<unsigned_char,std::allocator<unsigned_char>> *param_2, int4 param_3,int4 param_4,int *param_5,int4 param_6) { int1 *puVar1; void *pvVar2; int1 uVar3; uchar uVar4; long lVar5; int8 uVar6; int8 *puVar7; int8 *puVar8; byte bVar9; int4 uStack0000000000000100; int4 uStack0000000000000104; int4 uStack0000000000000108; int4 uStack000000000000010c; int4 uStack0000000000000110; int4 uStack0000000000000114; int4 uStack0000000000000118; int4 uStack000000000000011c; byte in_stack_00000120; int8 auStack_15c8 [27]; int4 local_14f0; int4 uStack_14ec; int4 uStack_14e8; int4 uStack_14e4; int4 local_14e0; int4 uStack_14dc; int4 uStack_14d8; int4 uStack_14d4; uint local_14d0; int4 local_14c8; void *local_14b8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_14b0; long local_14a8; int4 local_14a0; int4 local_149c; void *local_1498; long lStack_1490; long local_1488; void *local_1478; long local_1470; long local_1468; int local_1460; int4 uStack_145c; int local_1458; int4 uStack_1454; long local_1450; long local_1448; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_1440; void *local_1438; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_1430; void *local_1428 [2]; long local_1418; uchar local_1410 [16]; int local_1400; int local_13fc; int4 local_13f8; int8 local_13f0; int8 uStack_13e8; int8 local_13e0; int8 local_13d8; int8 uStack_13d0; int8 local_13c8; random_device local_13b8 [5000]; bVar9 = 0; local_14a0 = param_6; local_149c = param_3; std::random_device::random_device(local_13b8); if ((*(int *)(param_2 + 8) - *(int *)param_2 & 0xfU) != 0) { do { /* try { // try from 00175da0 to 00175dd2 has its CatchHandler @ 001762e5 */ uVar3 = std::random_device::_M_getval(); local_1400 = CONCAT31(local_1400._1_3_,uVar3); puVar1 = *(int1 **)(param_2 + 8); if (puVar1 == *(int1 **)(param_2 + 0x10)) { std::vector<unsigned_char,std::allocator<unsigned_char>>::_M_realloc_insert<unsigned_char> (param_2,puVar1,&local_1400); lVar5 = *(long *)(param_2 + 8); } else { *puVar1 = uVar3; lVar5 = *(long *)(param_2 + 8) + 1; *(long *)(param_2 + 8) = lVar5; } } while (((int)lVar5 - *(int *)param_2 & 0xfU) != 0); } lVar5 = 0; do { /* try { // try from 00175dee to 00175df5 has its CatchHandler @ 001762e7 */ uVar4 = std::random_device::_M_getval(); local_1410[lVar5] = uVar4; lVar5 = lVar5 + 1; } while (lVar5 != 0x10); /* try { // try from 00175e06 to 00175e2a has its CatchHandler @ 001762de */ std::vector<unsigned_char,std::allocator<unsigned_char>>::vector<unsigned_char*,void> ((uchar *)&local_1460,local_1410,(allocator *)&local_1400); local_1498 = (void *)0x0; lStack_1490 = 0; local_1488 = 0; /* try { // try from 00175e49 to 00175e78 has its CatchHandler @ 001762e0 */ std::vector<unsigned_char,std::allocator<unsigned_char>>::resize ((vector<unsigned_char,std::allocator<unsigned_char>> *)&local_1498, *(long *)(param_2 + 8) - *(long *)param_2); mb_aes256_buffer(*(long *)param_2,*(long *)(param_2 + 8) - *(long *)param_2,local_1498, &stack0x00000008,local_1410); if (lStack_1490 - (long)local_1498 == 0) { local_13fc = (int)local_1498; } else { memmove(*(void **)param_2,local_1498,lStack_1490 - (long)local_1498); local_13fc = (int)lStack_1490; } local_13fc = local_13fc - (int)local_1498; local_1400 = 0x20000000; local_13f8 = 0; local_13f0 = 0; uStack_13e8 = 0; local_13e0 = 0; local_13d8 = 0; uStack_13d0 = 0; local_13c8 = 0; std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>::~vector ((vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>> *)&local_13d8); /* try { // try from 00175eeb to 00175efa has its CatchHandler @ 001762d9 */ block::get_item<image_type_item>(); local_14b8 = local_1438; local_14b0 = local_1430; if (local_1430 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001e4fb8 == '\0') { LOCK(); *(int *)(local_1430 + 8) = *(int *)(local_1430 + 8) + 1; UNLOCK(); } else { *(int *)(local_1430 + 8) = *(int *)(local_1430 + 8) + 1; } } /* try { // try from 00175f35 to 00175f44 has its CatchHandler @ 0017626e */ std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>:: emplace_back<std::shared_ptr<item>> ((vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>> *)&local_13f0, (shared_ptr *)&local_14b8); if (local_14b0 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_14b0); } /* try { // try from 00175f57 to 00175f6b has its CatchHandler @ 00176269 */ block::to_words(); local_13fc = local_13fc + (((int)local_14b0 + local_1458) - (local_1460 + (int)local_14b8)); if (local_14b8 != (void *)0x0) { operator_delete(local_14b8,local_14a8 - (long)local_14b8); } /* try { // try from 00175fa9 to 00175fbd has its CatchHandler @ 00176267 */ block::to_words(); /* try { // try from 00175fce to 00175fda has its CatchHandler @ 00176245 */ words_to_lsb_bytes<__gnu_cxx::__normal_iterator<unsigned_int*,std::vector<unsigned_int,std::allocator<unsigned_int>>>,unsigned_char> (&local_1478,local_14b8,local_14b0); /* try { // try from 00175fef to 00175ff6 has its CatchHandler @ 00176223 */ std::vector<unsigned_char,std::allocator<unsigned_char>>:: _M_range_insert<__gnu_cxx::__normal_iterator<unsigned_char*,std::vector<unsigned_char,std::allocator<unsigned_char>>>> (param_2,*(int8 *)param_2,local_1478,local_1470); /* try { // try from 0017601b to 00176022 has its CatchHandler @ 00176221 */ std::vector<unsigned_char,std::allocator<unsigned_char>>:: _M_range_insert<__gnu_cxx::__normal_iterator<unsigned_char*,std::vector<unsigned_char,std::allocator<unsigned_char>>>> (param_2,(local_1470 - (long)local_1478) + *(long *)param_2, CONCAT44(uStack_145c,local_1460),CONCAT44(uStack_1454,local_1458)); *param_5 = local_1400 + local_13fc; param_5[1] = -local_13fc; /* try { // try from 0017603c to 0017604b has its CatchHandler @ 0017621f */ block::get_item<load_map_item>(); if (local_1448 != 0) { /* try { // try from 0017605f to 0017606b has its CatchHandler @ 001761df */ uVar6 = std:: __remove_if<__gnu_cxx::__normal_iterator<std::shared_ptr<item>*,std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>>,__gnu_cxx::__ops::_Iter_equals_val<std::shared_ptr<load_map_item>const>> (*(int8 *)(param_5 + 4),*(int8 *)(param_5 + 6),&local_1448); /* try { // try from 00176074 to 0017607b has its CatchHandler @ 001761dd */ std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>::_M_erase ((vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>> *)(param_5 + 4), uVar6,*(int8 *)(param_5 + 6)); } /* try { // try from 0017607c to 0017608b has its CatchHandler @ 00176208 */ std::vector<unsigned_char,std::allocator<unsigned_char>>::vector ((vector<unsigned_char,std::allocator<unsigned_char>> *)local_1428,param_2); puVar7 = (int8 *)&stack0x00000028; puVar8 = auStack_15c8; /* try { // try from 0017608c to 001760fd has its CatchHandler @ 001761e6 */ for (lVar5 = 0x1b; lVar5 != 0; lVar5 = lVar5 + -1) { *puVar8 = *puVar7; puVar7 = puVar7 + (ulong)bVar9 * -2 + 1; puVar8 = puVar8 + (ulong)bVar9 * -2 + 1; } local_14e0 = uStack0000000000000110; uStack_14dc = uStack0000000000000114; uStack_14d8 = uStack0000000000000118; uStack_14d4 = uStack000000000000011c; local_14f0 = uStack0000000000000100; uStack_14ec = uStack0000000000000104; uStack_14e8 = uStack0000000000000108; uStack_14e4 = uStack000000000000010c; local_14d0 = (uint)in_stack_00000120; local_14c8 = 0; hash_andor_sign(param_1,local_1428,local_149c,param_4,param_5,(int1)local_14a0); if (local_1428[0] != (void *)0x0) { operator_delete(local_1428[0],local_1418 - (long)local_1428[0]); } if (local_1440 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_1440); } if (local_1478 != (void *)0x0) { operator_delete(local_1478,local_1468 - (long)local_1478); } if (local_14b8 != (void *)0x0) { operator_delete(local_14b8,local_14a8 - (long)local_14b8); } if (local_1430 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_1430); } std::vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>>::~vector ((vector<std::shared_ptr<item>,std::allocator<std::shared_ptr<item>>> *)&local_13f0); if (local_1498 != (void *)0x0) { operator_delete(local_1498,local_1488 - (long)local_1498); } pvVar2 = (void *)CONCAT44(uStack_145c,local_1460); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,local_1450 - (long)pvVar2); } /* try { // try from 001761bb to 001761c7 has its CatchHandler @ 001761e1 */ std::random_device::_M_fini(); return param_1; }
40,179
my_copy_fix_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_copy_fix_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t dst_length, const char *src, size_t src_length, size_t nchars, MY_STRCOPY_STATUS *status) { size_t length2, src_offset= src_length % cs->mbminlen; my_char_copy_status_t padstatus; if (!src_offset) return my_copy_fix_mb(cs, dst, dst_length, src, src_length, nchars, status); if ((padstatus= my_copy_incomplete_char(cs, dst, dst_length, src, src_length, nchars, TRUE)) == MY_CHAR_COPY_ERROR) { status->m_source_end_pos= status->m_well_formed_error_pos= src; return 0; } length2= my_copy_fix_mb(cs, dst + cs->mbminlen, dst_length - cs->mbminlen, src + src_offset, src_length - src_offset, nchars - 1, status); if (padstatus == MY_CHAR_COPY_FIXED) status->m_well_formed_error_pos= src; return cs->mbminlen /* The left-padded character */ + length2; }
O3
c
my_copy_fix_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r12 movq %rdx, %r10 movq %rsi, %rbx movq %rdi, %r14 movl 0x98(%rdi), %r13d movq %r8, %rax xorl %edx, %edx divq %r13 testq %rdx, %rdx je 0xa3edd cmpq %r10, %r13 seta %al movq 0x10(%rbp), %rsi testq %r9, %r9 sete %cl orb %al, %cl jne 0xa3f6c movq %rdx, %r15 movq %rsi, -0x38(%rbp) movq %r10, -0x40(%rbp) movq %r8, -0x48(%rbp) movq %r9, -0x50(%rbp) subq %rdx, %r13 movq %rbx, %rdi xorl %esi, %esi movq %r13, %rdx callq 0x3a3a0 addq %rbx, %r13 movq %r13, %rdi movq %r12, -0x58(%rbp) movq %r12, %rsi movq %r15, %rdx callq 0x3a1d0 movl 0x98(%r14), %edx addq %rbx, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0xc0(%rax) movl 0x98(%r14), %r13d cmpl %r13d, %eax movl %eax, -0x2c(%rbp) jne 0xa3efc movq -0x58(%rbp), %r12 movq -0x50(%rbp), %r9 movq -0x48(%rbp), %r8 movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi jmp 0xa3f32 movq %r14, %rdi movq %rbx, %rsi movq %r10, %rdx movq %r12, %rcx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x92eb6 movq 0xb8(%r14), %rax leaq (%rbx,%r13), %rcx movl $0x3f, %esi movq %r14, %rdi movq %rbx, %rdx callq *0x30(%rax) cmpl 0x98(%r14), %eax movq -0x58(%rbp), %r12 movq -0x50(%rbp), %r9 movq -0x48(%rbp), %r8 movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi jne 0xa3f6c movl %eax, %eax addq %rax, %rbx subq %rax, %rdx leaq (%r12,%r15), %rcx subq %r15, %r8 decq %r9 movq %rsi, (%rsp) movq %r14, %rdi movq %rsi, %r15 movq %rbx, %rsi callq 0x92eb6 cmpl %r13d, -0x2c(%rbp) je 0xa3f60 movq %r12, 0x8(%r15) movl 0x98(%r14), %ecx addq %rcx, %rax jmp 0xa3f75 movq %r12, 0x8(%rsi) movq %r12, (%rsi) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_copy_fix_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rcx mov r10, rdx mov rbx, rsi mov r14, rdi mov r13d, [rdi+98h] mov rax, r8 xor edx, edx div r13 test rdx, rdx jz loc_A3EDD cmp r13, r10 setnbe al mov rsi, [rbp+arg_0] test r9, r9 setz cl or cl, al jnz loc_A3F6C mov r15, rdx mov [rbp+var_38], rsi mov [rbp+var_40], r10 mov [rbp+var_48], r8 mov [rbp+var_50], r9 sub r13, rdx mov rdi, rbx xor esi, esi mov rdx, r13 call _memset add r13, rbx mov rdi, r13 mov [rbp+var_58], r12 mov rsi, r12 mov rdx, r15 call _memmove mov edx, [r14+98h] add rdx, rbx mov rax, [r14+0B8h] mov rdi, r14 mov rsi, rbx call qword ptr [rax+0C0h] mov r13d, [r14+98h] cmp eax, r13d mov [rbp+var_2C], eax jnz short loc_A3EFC mov r12, [rbp+var_58] mov r9, [rbp+var_50] mov r8, [rbp+var_48] mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] jmp short loc_A3F32 loc_A3EDD: mov rdi, r14 mov rsi, rbx mov rdx, r10 mov rcx, r12 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp my_copy_fix_mb loc_A3EFC: mov rax, [r14+0B8h] lea rcx, [rbx+r13] mov esi, 3Fh ; '?' mov rdi, r14 mov rdx, rbx call qword ptr [rax+30h] cmp eax, [r14+98h] mov r12, [rbp+var_58] mov r9, [rbp+var_50] mov r8, [rbp+var_48] mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] jnz short loc_A3F6C loc_A3F32: mov eax, eax add rbx, rax sub rdx, rax lea rcx, [r12+r15] sub r8, r15 dec r9 mov [rsp+60h+var_60], rsi mov rdi, r14 mov r15, rsi mov rsi, rbx call my_copy_fix_mb cmp [rbp+var_2C], r13d jz short loc_A3F60 mov [r15+8], r12 loc_A3F60: mov ecx, [r14+98h] add rax, rcx jmp short loc_A3F75 loc_A3F6C: mov [rsi+8], r12 mov [rsi], r12 xor eax, eax loc_A3F75: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long my_copy_fix_mb2_or_mb4( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, long long a6, unsigned long long *a7) { unsigned long long v9; // r13 unsigned long long *v10; // rsi unsigned long long v11; // r15 unsigned long long v12; // r13 unsigned int v13; // eax long long v14; // r13 long long v15; // r9 unsigned long long v16; // r8 unsigned long long v17; // rdx unsigned long long fixed; // rax unsigned int v23; // [rsp+34h] [rbp-2Ch] v9 = *(unsigned int *)(a1 + 152); if ( !(a5 % v9) ) return my_copy_fix_mb(a1, a2, a3, a4, a5, a6, a7); v10 = a7; if ( v9 > a3 || a6 == 0 ) goto LABEL_10; v11 = a5 % *(unsigned int *)(a1 + 152); v12 = v9 - a5 % v9; memset(a2, 0LL, v12); memmove(a2 + v12, a4, v11); v13 = (*(long long ( **)(long long, long long, long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, a2, a2 + *(unsigned int *)(a1 + 152)); v14 = *(unsigned int *)(a1 + 152); v23 = v13; if ( v13 != (_DWORD)v14 ) { v13 = (*(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, 63LL, a2, a2 + v14); v15 = a6; v16 = a5; v17 = a3; v10 = a7; if ( v13 == *(_DWORD *)(a1 + 152) ) goto LABEL_7; LABEL_10: v10[1] = a4; *v10 = a4; return 0LL; } v15 = a6; v16 = a5; v17 = a3; v10 = a7; LABEL_7: fixed = my_copy_fix_mb(a1, v13 + a2, v17 - v13, a4 + v11, v16 - v11, v15 - 1, v10); if ( v23 != (_DWORD)v14 ) v10[1] = a4; return *(unsigned int *)(a1 + 152) + fixed; }
my_copy_fix_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RCX MOV R10,RDX MOV RBX,RSI MOV R14,RDI MOV R13D,dword ptr [RDI + 0x98] MOV RAX,R8 XOR EDX,EDX DIV R13 TEST RDX,RDX JZ 0x001a3edd CMP R13,R10 SETA AL MOV RSI,qword ptr [RBP + 0x10] TEST R9,R9 SETZ CL OR CL,AL JNZ 0x001a3f6c MOV R15,RDX MOV qword ptr [RBP + -0x38],RSI MOV qword ptr [RBP + -0x40],R10 MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RBP + -0x50],R9 SUB R13,RDX MOV RDI,RBX XOR ESI,ESI MOV RDX,R13 CALL 0x0013a3a0 ADD R13,RBX MOV RDI,R13 MOV qword ptr [RBP + -0x58],R12 MOV RSI,R12 MOV RDX,R15 CALL 0x0013a1d0 MOV EDX,dword ptr [R14 + 0x98] ADD RDX,RBX MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0xc0] MOV R13D,dword ptr [R14 + 0x98] CMP EAX,R13D MOV dword ptr [RBP + -0x2c],EAX JNZ 0x001a3efc MOV R12,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] JMP 0x001a3f32 LAB_001a3edd: MOV RDI,R14 MOV RSI,RBX MOV RDX,R10 MOV RCX,R12 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00192eb6 LAB_001a3efc: MOV RAX,qword ptr [R14 + 0xb8] LEA RCX,[RBX + R13*0x1] MOV ESI,0x3f MOV RDI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x30] CMP EAX,dword ptr [R14 + 0x98] MOV R12,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] JNZ 0x001a3f6c LAB_001a3f32: MOV EAX,EAX ADD RBX,RAX SUB RDX,RAX LEA RCX,[R12 + R15*0x1] SUB R8,R15 DEC R9 MOV qword ptr [RSP],RSI MOV RDI,R14 MOV R15,RSI MOV RSI,RBX CALL 0x00192eb6 CMP dword ptr [RBP + -0x2c],R13D JZ 0x001a3f60 MOV qword ptr [R15 + 0x8],R12 LAB_001a3f60: MOV ECX,dword ptr [R14 + 0x98] ADD RAX,RCX JMP 0x001a3f75 LAB_001a3f6c: MOV qword ptr [RSI + 0x8],R12 MOV qword ptr [RSI],R12 XOR EAX,EAX LAB_001a3f75: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_copy_fix_mb2_or_mb4 (long param_1,void *param_2,ulong param_3,void *param_4,ulong param_5,long param_6, int8 *param_7) { uint uVar1; uint uVar2; uint uVar3; long lVar4; ulong __n; ulong uVar5; uVar5 = (ulong)*(uint *)(param_1 + 0x98); __n = param_5 % uVar5; if (__n == 0) { lVar4 = my_copy_fix_mb(param_1,param_2,param_3,param_4); return lVar4; } if (param_6 != 0 && uVar5 <= param_3) { memset(param_2,0,uVar5 - __n); memmove((void *)((uVar5 - __n) + (long)param_2),param_4,__n); uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,param_2,(ulong)*(uint *)(param_1 + 0x98) + (long)param_2); uVar1 = *(uint *)(param_1 + 0x98); uVar3 = uVar2; if ((uVar2 == uVar1) || (uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,0x3f,param_2,(long)param_2 + (ulong)uVar1), uVar3 == *(uint *)(param_1 + 0x98))) { lVar4 = my_copy_fix_mb(param_1,(long)param_2 + (ulong)uVar3,param_3 - uVar3, (long)param_4 + __n,param_5 - __n,param_6 + -1,param_7); if (uVar2 != uVar1) { param_7[1] = param_4; } return lVar4 + (ulong)*(uint *)(param_1 + 0x98); } } param_7[1] = param_4; *param_7 = param_4; return 0; }
40,180
my_thread_init_thr_mutex
eloqsql/mysys/my_thr_init.c
static void my_thread_init_thr_mutex(struct st_my_thread_var *var) { mysql_mutex_init(key_my_thread_var_mutex, &var->mutex, MY_MUTEX_INIT_FAST); mysql_cond_init(key_my_thread_var_suspend, &var->suspend, NULL); }
O3
c
my_thread_init_thr_mutex: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x340f8d(%rip), %rax # 0x36fd90 movl (%rax), %edi leaq 0x40(%rbx), %r14 leaq 0x2caa78(%rip), %r15 # 0x2f9888 movq (%r15), %rax movq %r14, %rsi callq *0x40(%rax) movq %rax, 0x80(%rbx) movq %r14, 0x78(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rbx) leaq 0x341c2e(%rip), %rsi # 0x370a60 movq %r14, %rdi callq 0x256a0 leaq 0x340f93(%rip), %rax # 0x36fdd4 movl (%rax), %edi leaq 0x8(%rbx), %r14 movq (%r15), %rax movq %r14, %rsi callq *0x60(%rax) movq %rax, 0x38(%rbx) movq %r14, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x25560
my_thread_init_thr_mutex: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi lea rax, key_my_thread_var_mutex mov edi, [rax] lea r14, [rbx+40h] lea r15, PSI_server mov rax, [r15] mov rsi, r14 call qword ptr [rax+40h] mov [rbx+80h], rax mov [rbx+78h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+68h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r14 call _pthread_mutex_init lea rax, key_my_thread_var_suspend mov edi, [rax] lea r14, [rbx+8] mov rax, [r15] mov rsi, r14 call qword ptr [rax+60h] mov [rbx+38h], rax mov rdi, r14 xor esi, esi add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _pthread_cond_init
long long my_thread_init_thr_mutex(long long a1) { *(_QWORD *)(a1 + 128) = (*((long long ( **)(_QWORD, long long))PSI_server[0] + 8))( key_my_thread_var_mutex, a1 + 64); *(_QWORD *)(a1 + 120) = a1 + 64; *(_OWORD *)(a1 + 104) = 0LL; pthread_mutex_init(a1 + 64, &my_fast_mutexattr); *(_QWORD *)(a1 + 56) = (*((long long ( **)(_QWORD, long long))PSI_server[0] + 12))( key_my_thread_var_suspend, a1 + 8); return pthread_cond_init(a1 + 8, 0LL); }
my_thread_init_thr_mutex: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0x46fd90] MOV EDI,dword ptr [RAX] LEA R14,[RBX + 0x40] LEA R15,[0x3f9888] MOV RAX,qword ptr [R15] MOV RSI,R14 CALL qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x80],RAX MOV qword ptr [RBX + 0x78],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 LEA RSI,[0x470a60] MOV RDI,R14 CALL 0x001256a0 LEA RAX,[0x46fdd4] MOV EDI,dword ptr [RAX] LEA R14,[RBX + 0x8] MOV RAX,qword ptr [R15] MOV RSI,R14 CALL qword ptr [RAX + 0x60] MOV qword ptr [RBX + 0x38],RAX MOV RDI,R14 XOR ESI,ESI ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00125560
void my_thread_init_thr_mutex(long param_1) { pthread_mutex_t *__mutex; int8 uVar1; __mutex = (pthread_mutex_t *)(param_1 + 0x40); uVar1 = (**(code **)(PSI_server + 0x40))(key_my_thread_var_mutex,__mutex); *(int8 *)(param_1 + 0x80) = uVar1; *(pthread_mutex_t **)(param_1 + 0x78) = __mutex; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); uVar1 = (**(code **)(PSI_server + 0x60))(key_my_thread_var_suspend); *(int8 *)(param_1 + 0x38) = uVar1; pthread_cond_init((pthread_cond_t *)(param_1 + 8),(pthread_condattr_t *)0x0); return; }
40,181
mysql_close_memory
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void mysql_close_memory(MYSQL *mysql) { ma_clear_session_state(mysql); free(mysql->host_info); free(mysql->host); free(mysql->user); free(mysql->passwd); free(mysql->db); free(mysql->unix_socket); free(mysql->server_version); mysql->host_info= mysql->host= mysql->unix_socket= mysql->server_version=mysql->user=mysql->passwd=mysql->db=0; }
O0
c
mysql_close_memory: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x82c60 movq -0x8(%rbp), %rax movq 0x2d8(%rax), %rdi callq 0x601e0 movq -0x8(%rbp), %rax movq 0x2b0(%rax), %rdi callq 0x601e0 movq -0x8(%rbp), %rax movq 0x2b8(%rax), %rdi callq 0x601e0 movq -0x8(%rbp), %rax movq 0x2c0(%rax), %rdi callq 0x601e0 movq -0x8(%rbp), %rax movq 0x2e8(%rax), %rdi callq 0x601e0 movq -0x8(%rbp), %rax movq 0x2c8(%rax), %rdi callq 0x601e0 movq -0x8(%rbp), %rax movq 0x2d0(%rax), %rdi callq 0x601e0 movq -0x8(%rbp), %rax movq $0x0, 0x2e8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2c0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2b8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2d0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2c8(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2b0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x2d8(%rax) addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_close_memory: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call ma_clear_session_state mov rax, [rbp+var_8] mov rdi, [rax+2D8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2B0h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2B8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2C0h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2E8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2C8h] call _free mov rax, [rbp+var_8] mov rdi, [rax+2D0h] call _free mov rax, [rbp+var_8] mov qword ptr [rax+2E8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2C0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2B8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2D0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2C8h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2B0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+2D8h], 0 add rsp, 10h pop rbp retn
_QWORD * mysql_close_memory(_QWORD *a1) { _QWORD *result; // rax ma_clear_session_state(a1); free(a1[91]); free(a1[86]); free(a1[87]); free(a1[88]); free(a1[93]); free(a1[89]); free(a1[90]); a1[93] = 0LL; a1[88] = 0LL; a1[87] = 0LL; a1[90] = 0LL; a1[89] = 0LL; a1[86] = 0LL; result = a1; a1[91] = 0LL; return result; }
mysql_close_memory: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00182c60 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2d8] CALL 0x001601e0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2b0] CALL 0x001601e0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2b8] CALL 0x001601e0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2c0] CALL 0x001601e0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2e8] CALL 0x001601e0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2c8] CALL 0x001601e0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x2d0] CALL 0x001601e0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2e8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2c0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2b8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2d0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2c8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2b0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x2d8],0x0 ADD RSP,0x10 POP RBP RET
void mysql_close_memory(long param_1) { ma_clear_session_state(param_1); free(*(void **)(param_1 + 0x2d8)); free(*(void **)(param_1 + 0x2b0)); free(*(void **)(param_1 + 0x2b8)); free(*(void **)(param_1 + 0x2c0)); free(*(void **)(param_1 + 0x2e8)); free(*(void **)(param_1 + 0x2c8)); free(*(void **)(param_1 + 0x2d0)); *(int8 *)(param_1 + 0x2e8) = 0; *(int8 *)(param_1 + 0x2c0) = 0; *(int8 *)(param_1 + 0x2b8) = 0; *(int8 *)(param_1 + 0x2d0) = 0; *(int8 *)(param_1 + 0x2c8) = 0; *(int8 *)(param_1 + 0x2b0) = 0; *(int8 *)(param_1 + 0x2d8) = 0; return; }
40,182
mysql_close_memory
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void mysql_close_memory(MYSQL *mysql) { ma_clear_session_state(mysql); free(mysql->host_info); free(mysql->host); free(mysql->user); free(mysql->passwd); free(mysql->db); free(mysql->unix_socket); free(mysql->server_version); mysql->host_info= mysql->host= mysql->unix_socket= mysql->server_version=mysql->user=mysql->passwd=mysql->db=0; }
O3
c
mysql_close_memory: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x77ae3 movq 0x2d8(%rbx), %rdi callq 0x5f1d0 movq 0x2b0(%rbx), %rdi callq 0x5f1d0 movq 0x2b8(%rbx), %rdi callq 0x5f1d0 movq 0x2c0(%rbx), %rdi callq 0x5f1d0 movq 0x2e8(%rbx), %rdi callq 0x5f1d0 movq 0x2c8(%rbx), %rdi callq 0x5f1d0 movq 0x2d0(%rbx), %rdi callq 0x5f1d0 movq $0x0, 0x2e8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x2b0(%rbx) movups %xmm0, 0x2c0(%rbx) movups %xmm0, 0x2d0(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_close_memory: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi call ma_clear_session_state mov rdi, [rbx+2D8h] call _free mov rdi, [rbx+2B0h] call _free mov rdi, [rbx+2B8h] call _free mov rdi, [rbx+2C0h] call _free mov rdi, [rbx+2E8h] call _free mov rdi, [rbx+2C8h] call _free mov rdi, [rbx+2D0h] call _free mov qword ptr [rbx+2E8h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+2B0h], xmm0 movups xmmword ptr [rbx+2C0h], xmm0 movups xmmword ptr [rbx+2D0h], xmm0 add rsp, 8 pop rbx pop rbp retn
long long mysql_close_memory(_QWORD *a1) { long long result; // rax ma_clear_session_state(a1); free(a1[91]); free(a1[86]); free(a1[87]); free(a1[88]); free(a1[93]); free(a1[89]); result = free(a1[90]); a1[93] = 0LL; *((_OWORD *)a1 + 43) = 0LL; *((_OWORD *)a1 + 44) = 0LL; *((_OWORD *)a1 + 45) = 0LL; return result; }
mysql_close_memory: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x00177ae3 MOV RDI,qword ptr [RBX + 0x2d8] CALL 0x0015f1d0 MOV RDI,qword ptr [RBX + 0x2b0] CALL 0x0015f1d0 MOV RDI,qword ptr [RBX + 0x2b8] CALL 0x0015f1d0 MOV RDI,qword ptr [RBX + 0x2c0] CALL 0x0015f1d0 MOV RDI,qword ptr [RBX + 0x2e8] CALL 0x0015f1d0 MOV RDI,qword ptr [RBX + 0x2c8] CALL 0x0015f1d0 MOV RDI,qword ptr [RBX + 0x2d0] CALL 0x0015f1d0 MOV qword ptr [RBX + 0x2e8],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x2b0],XMM0 MOVUPS xmmword ptr [RBX + 0x2c0],XMM0 MOVUPS xmmword ptr [RBX + 0x2d0],XMM0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_close_memory(long param_1) { ma_clear_session_state(); free(*(void **)(param_1 + 0x2d8)); free(*(void **)(param_1 + 0x2b0)); free(*(void **)(param_1 + 0x2b8)); free(*(void **)(param_1 + 0x2c0)); free(*(void **)(param_1 + 0x2e8)); free(*(void **)(param_1 + 0x2c8)); free(*(void **)(param_1 + 0x2d0)); *(int8 *)(param_1 + 0x2e8) = 0; *(int8 *)(param_1 + 0x2b0) = 0; *(int8 *)(param_1 + 0x2b8) = 0; *(int8 *)(param_1 + 0x2c0) = 0; *(int8 *)(param_1 + 0x2c8) = 0; *(int8 *)(param_1 + 0x2d0) = 0; *(int8 *)(param_1 + 0x2d8) = 0; return; }
40,183
bitmap_exists_intersection
eloqsql/mysys/my_bitmap.c
my_bool bitmap_exists_intersection(const MY_BITMAP **bitmap_array, uint bitmap_count, uint start_bit, uint end_bit) { uint i, j, start_idx, end_idx; my_bitmap_map cur_res; DBUG_ASSERT(bitmap_count); DBUG_ASSERT(end_bit >= start_bit); for (j= 0; j < bitmap_count; j++) DBUG_ASSERT(end_bit < bitmap_array[j]->n_bits); start_idx= start_bit/8/sizeof(my_bitmap_map); end_idx= end_bit/8/sizeof(my_bitmap_map); for (i= start_idx; i < end_idx; i++) { cur_res= ~0; for (j= 0; cur_res && j < bitmap_count; j++) cur_res &= bitmap_array[j]->bitmap[i]; if (cur_res) return TRUE; } cur_res= ~last_word_mask(end_bit); for (j= 0; cur_res && j < bitmap_count; j++) cur_res &= bitmap_array[j]->bitmap[end_idx]; return cur_res != 0; }
O0
c
bitmap_exists_intersection: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) jmp 0xb51e7 jmp 0xb51e9 jmp 0xb51eb movl $0x0, -0x24(%rbp) movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0xb520b jmp 0xb51fc jmp 0xb51fe jmp 0xb5200 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xb51f2 movl -0x18(%rbp), %eax shrl $0x3, %eax movl %eax, %eax shrq $0x2, %rax movl %eax, -0x28(%rbp) movl -0x1c(%rbp), %eax shrl $0x3, %eax movl %eax, %eax shrq $0x2, %rax movl %eax, -0x2c(%rbp) movl -0x28(%rbp), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax cmpl -0x2c(%rbp), %eax jae 0xb52a3 movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF movl $0x0, -0x24(%rbp) xorl %eax, %eax cmpl $0x0, -0x30(%rbp) movb %al, -0x31(%rbp) je 0xb525c movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax setb %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al testb $0x1, %al jne 0xb5265 jmp 0xb528a movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rax movq (%rax), %rax movl -0x20(%rbp), %ecx movl (%rax,%rcx,4), %eax andl -0x30(%rbp), %eax movl %eax, -0x30(%rbp) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xb5245 cmpl $0x0, -0x30(%rbp) je 0xb5296 movb $0x1, -0x1(%rbp) jmp 0xb530c jmp 0xb5298 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0xb522f movl -0x1c(%rbp), %edi callq 0xb5320 xorl $-0x1, %eax movl %eax, -0x30(%rbp) movl $0x0, -0x24(%rbp) xorl %eax, %eax cmpl $0x0, -0x30(%rbp) movb %al, -0x32(%rbp) je 0xb52cf movl -0x24(%rbp), %eax cmpl -0x14(%rbp), %eax setb %al movb %al, -0x32(%rbp) movb -0x32(%rbp), %al testb $0x1, %al jne 0xb52d8 jmp 0xb52fd movq -0x10(%rbp), %rax movl -0x24(%rbp), %ecx movq (%rax,%rcx,8), %rax movq (%rax), %rax movl -0x2c(%rbp), %ecx movl (%rax,%rcx,4), %eax andl -0x30(%rbp), %eax movl %eax, -0x30(%rbp) movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xb52b8 cmpl $0x0, -0x30(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
bitmap_exists_intersection: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_1C], ecx jmp short $+2 loc_B51E7: jmp short $+2 loc_B51E9: jmp short $+2 loc_B51EB: mov [rbp+var_24], 0 loc_B51F2: mov eax, [rbp+var_24] cmp eax, [rbp+var_14] jnb short loc_B520B jmp short $+2 loc_B51FC: jmp short $+2 loc_B51FE: jmp short $+2 loc_B5200: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_B51F2 loc_B520B: mov eax, [rbp+var_18] shr eax, 3 mov eax, eax shr rax, 2 mov [rbp+var_28], eax mov eax, [rbp+var_1C] shr eax, 3 mov eax, eax shr rax, 2 mov [rbp+var_2C], eax mov eax, [rbp+var_28] mov [rbp+var_20], eax loc_B522F: mov eax, [rbp+var_20] cmp eax, [rbp+var_2C] jnb short loc_B52A3 mov [rbp+var_30], 0FFFFFFFFh mov [rbp+var_24], 0 loc_B5245: xor eax, eax cmp [rbp+var_30], 0 mov [rbp+var_31], al jz short loc_B525C mov eax, [rbp+var_24] cmp eax, [rbp+var_14] setb al mov [rbp+var_31], al loc_B525C: mov al, [rbp+var_31] test al, 1 jnz short loc_B5265 jmp short loc_B528A loc_B5265: mov rax, [rbp+var_10] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8] mov rax, [rax] mov ecx, [rbp+var_20] mov eax, [rax+rcx*4] and eax, [rbp+var_30] mov [rbp+var_30], eax mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_B5245 loc_B528A: cmp [rbp+var_30], 0 jz short loc_B5296 mov [rbp+var_1], 1 jmp short loc_B530C loc_B5296: jmp short $+2 loc_B5298: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp short loc_B522F loc_B52A3: mov edi, [rbp+var_1C] call last_word_mask xor eax, 0FFFFFFFFh mov [rbp+var_30], eax mov [rbp+var_24], 0 loc_B52B8: xor eax, eax cmp [rbp+var_30], 0 mov [rbp+var_32], al jz short loc_B52CF mov eax, [rbp+var_24] cmp eax, [rbp+var_14] setb al mov [rbp+var_32], al loc_B52CF: mov al, [rbp+var_32] test al, 1 jnz short loc_B52D8 jmp short loc_B52FD loc_B52D8: mov rax, [rbp+var_10] mov ecx, [rbp+var_24] mov rax, [rax+rcx*8] mov rax, [rax] mov ecx, [rbp+var_2C] mov eax, [rax+rcx*4] and eax, [rbp+var_30] mov [rbp+var_30], eax mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_B52B8 loc_B52FD: cmp [rbp+var_30], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_1], al loc_B530C: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
bool bitmap_exists_intersection(long long a1, unsigned int a2, unsigned int a3, unsigned int a4) { bool v5; // [rsp+Eh] [rbp-32h] bool v6; // [rsp+Fh] [rbp-31h] int v7; // [rsp+10h] [rbp-30h] unsigned int v8; // [rsp+10h] [rbp-30h] unsigned int v9; // [rsp+14h] [rbp-2Ch] unsigned int i; // [rsp+1Ch] [rbp-24h] unsigned int k; // [rsp+1Ch] [rbp-24h] unsigned int m; // [rsp+1Ch] [rbp-24h] unsigned int j; // [rsp+20h] [rbp-20h] for ( i = 0; i < a2; ++i ) ; v9 = a4 >> 5; for ( j = a3 >> 5; j < v9; ++j ) { v7 = -1; for ( k = 0; ; ++k ) { v6 = 0; if ( v7 ) v6 = k < a2; if ( !v6 ) break; v7 &= *(_DWORD *)(**(_QWORD **)(a1 + 8LL * k) + 4LL * j); } if ( v7 ) return 1; } v8 = ~(unsigned int)last_word_mask(a4); for ( m = 0; ; ++m ) { v5 = 0; if ( v8 ) v5 = m < a2; if ( !v5 ) break; v8 &= *(_DWORD *)(**(_QWORD **)(a1 + 8LL * m) + 4LL * v9); } return v8 != 0; }
bitmap_exists_intersection: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV dword ptr [RBP + -0x1c],ECX JMP 0x001b51e7 LAB_001b51e7: JMP 0x001b51e9 LAB_001b51e9: JMP 0x001b51eb LAB_001b51eb: MOV dword ptr [RBP + -0x24],0x0 LAB_001b51f2: MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] JNC 0x001b520b JMP 0x001b51fc LAB_001b51fc: JMP 0x001b51fe LAB_001b51fe: JMP 0x001b5200 LAB_001b5200: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001b51f2 LAB_001b520b: MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x3 MOV EAX,EAX SHR RAX,0x2 MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x1c] SHR EAX,0x3 MOV EAX,EAX SHR RAX,0x2 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x20],EAX LAB_001b522f: MOV EAX,dword ptr [RBP + -0x20] CMP EAX,dword ptr [RBP + -0x2c] JNC 0x001b52a3 MOV dword ptr [RBP + -0x30],0xffffffff MOV dword ptr [RBP + -0x24],0x0 LAB_001b5245: XOR EAX,EAX CMP dword ptr [RBP + -0x30],0x0 MOV byte ptr [RBP + -0x31],AL JZ 0x001b525c MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] SETC AL MOV byte ptr [RBP + -0x31],AL LAB_001b525c: MOV AL,byte ptr [RBP + -0x31] TEST AL,0x1 JNZ 0x001b5265 JMP 0x001b528a LAB_001b5265: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + RCX*0x4] AND EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001b5245 LAB_001b528a: CMP dword ptr [RBP + -0x30],0x0 JZ 0x001b5296 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001b530c LAB_001b5296: JMP 0x001b5298 LAB_001b5298: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x001b522f LAB_001b52a3: MOV EDI,dword ptr [RBP + -0x1c] CALL 0x001b5320 XOR EAX,0xffffffff MOV dword ptr [RBP + -0x30],EAX MOV dword ptr [RBP + -0x24],0x0 LAB_001b52b8: XOR EAX,EAX CMP dword ptr [RBP + -0x30],0x0 MOV byte ptr [RBP + -0x32],AL JZ 0x001b52cf MOV EAX,dword ptr [RBP + -0x24] CMP EAX,dword ptr [RBP + -0x14] SETC AL MOV byte ptr [RBP + -0x32],AL LAB_001b52cf: MOV AL,byte ptr [RBP + -0x32] TEST AL,0x1 JNZ 0x001b52d8 JMP 0x001b52fd LAB_001b52d8: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x2c] MOV EAX,dword ptr [RAX + RCX*0x4] AND EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001b52b8 LAB_001b52fd: CMP dword ptr [RBP + -0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL LAB_001b530c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int8 bitmap_exists_intersection(long param_1,uint param_2,uint param_3,uint param_4) { uint3 uVar1; uint7 uVar2; ulong uVar3; uint local_38; uint local_2c; uint local_28; bool local_9; for (local_2c = 0; local_2c < param_2; local_2c = local_2c + 1) { } local_28 = param_3 >> 5; do { if (param_4 >> 5 <= local_28) { local_38 = last_word_mask(param_4); local_2c = 0; for (local_38 = local_38 ^ 0xffffffff; local_38 != 0 && local_2c < param_2; local_38 = *(uint *)(**(long **)(param_1 + uVar3 * 8) + (ulong)(param_4 >> 5) * 4) & local_38) { uVar3 = (ulong)local_2c; local_2c = local_2c + 1; } local_9 = local_38 != 0; uVar2 = 0; LAB_001b530c: return CONCAT71(uVar2,local_9); } local_38 = 0xffffffff; local_2c = 0; while( true ) { uVar1 = 0; if (local_38 != 0) { uVar1 = (uint3)(local_2c >> 8); } uVar2 = (uint7)uVar1; if (local_38 == 0 || param_2 <= local_2c) break; local_38 = *(uint *)(**(long **)(param_1 + (ulong)local_2c * 8) + (ulong)local_28 * 4) & local_38; local_2c = local_2c + 1; } if (local_38 != 0) { local_9 = true; goto LAB_001b530c; } local_28 = local_28 + 1; } while( true ); }
40,184
memcpy
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
void *_memcpy(void *dest, const void *src, size_t bytes) { if (!dest || !src || bytes == 0) { HEAP_LOG("Invalid memcpy parameters: dest=%p, src=%p, bytes=%zu\n", dest, src, bytes); return dest; } // Use 64-bit copies for aligned data when possible size_t i = 0; if (!(((uintptr_t) dest | (uintptr_t) src | bytes) & 7)) { size_t qwords = bytes >> 3; uint64_t *qdest = (uint64_t *) dest; const uint64_t *qsrc = (const uint64_t *) src; for (i = 0; i < qwords; ++i) { *qdest++ = *qsrc++; } i = qwords << 3; HEAP_LOG("Used optimized 64-bit copy for %zu qwords\n", qwords); } // Copy remaining bytes char *cdest = (char *) dest + i; const char *csrc = (char *) src + i; for (; i < bytes; ++i) { *cdest++ = *csrc++; } HEAP_LOG("Memory copied: %zu bytes from %p to %p\n", bytes, src, dest); return dest; }
O0
c
memcpy: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x42e5 cmpq $0x0, -0x18(%rbp) je 0x42e5 cmpq $0x0, -0x20(%rbp) jne 0x42f2 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x43d9 movq $0x0, -0x28(%rbp) movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx orq %rcx, %rax orq -0x20(%rbp), %rax andq $0x7, %rax cmpq $0x0, %rax jne 0x437f movq -0x20(%rbp), %rax shrq $0x3, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x4373 movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, -0x40(%rbp) movq (%rax), %rcx movq -0x38(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x38(%rbp) movq %rcx, (%rax) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x4337 movq -0x30(%rbp), %rax shlq $0x3, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x43d1 movq -0x50(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x50(%rbp) movb (%rax), %cl movq -0x48(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x48(%rbp) movb %cl, (%rax) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x4397 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nop
_memcpy: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx cmp [rbp+var_10], 0 jz short loc_42E5 cmp [rbp+var_18], 0 jz short loc_42E5 cmp [rbp+var_20], 0 jnz short loc_42F2 loc_42E5: mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp loc_43D9 loc_42F2: mov [rbp+var_28], 0 mov rax, [rbp+var_10] mov rcx, [rbp+var_18] or rax, rcx or rax, [rbp+var_20] and rax, 7 cmp rax, 0 jnz short loc_437F mov rax, [rbp+var_20] shr rax, 3 mov [rbp+var_30], rax mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov [rbp+var_40], rax mov [rbp+var_28], 0 loc_4337: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_4373 mov rax, [rbp+var_40] mov rcx, rax add rcx, 8 mov [rbp+var_40], rcx mov rcx, [rax] mov rax, [rbp+var_38] mov rdx, rax add rdx, 8 mov [rbp+var_38], rdx mov [rax], rcx mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_4337 loc_4373: mov rax, [rbp+var_30] shl rax, 3 mov [rbp+var_28], rax loc_437F: mov rax, [rbp+var_10] add rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_18] add rax, [rbp+var_28] mov [rbp+var_50], rax loc_4397: mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnb short loc_43D1 mov rax, [rbp+var_50] mov rcx, rax add rcx, 1 mov [rbp+var_50], rcx mov cl, [rax] mov rax, [rbp+var_48] mov rdx, rax add rdx, 1 mov [rbp+var_48], rdx mov [rax], cl mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_4397 loc_43D1: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_43D9: mov rax, [rbp+var_8] pop rbp retn
_QWORD * memcpy(_QWORD *a1, long long *a2, unsigned long long a3) { long long *v3; // rax long long v4; // rcx _QWORD *v5; // rax char *v6; // rax char v7; // cl _BYTE *v8; // rax char *v10; // [rsp+0h] [rbp-50h] _BYTE *v11; // [rsp+8h] [rbp-48h] long long *v12; // [rsp+10h] [rbp-40h] _QWORD *v13; // [rsp+18h] [rbp-38h] unsigned long long v14; // [rsp+20h] [rbp-30h] unsigned long long v15; // [rsp+28h] [rbp-28h] unsigned long long i; // [rsp+28h] [rbp-28h] if ( !a1 || !a2 || !a3 ) return a1; v15 = 0LL; if ( (((unsigned __int8)a3 | (unsigned __int8)((unsigned __int8)a2 | (unsigned __int8)a1)) & 7) == 0 ) { v14 = a3 >> 3; v13 = a1; v12 = a2; for ( i = 0LL; i < v14; ++i ) { v3 = v12++; v4 = *v3; v5 = v13++; *v5 = v4; } v15 = 8 * v14; } v11 = (char *)a1 + v15; v10 = (char *)a2 + v15; while ( v15 < a3 ) { v6 = v10++; v7 = *v6; v8 = v11++; *v8 = v7; ++v15; } return a1; }
_memcpy: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX CMP qword ptr [RBP + -0x10],0x0 JZ 0x001042e5 CMP qword ptr [RBP + -0x18],0x0 JZ 0x001042e5 CMP qword ptr [RBP + -0x20],0x0 JNZ 0x001042f2 LAB_001042e5: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x001043d9 LAB_001042f2: MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] OR RAX,RCX OR RAX,qword ptr [RBP + -0x20] AND RAX,0x7 CMP RAX,0x0 JNZ 0x0010437f MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x3 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x28],0x0 LAB_00104337: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00104373 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBP + -0x40],RCX MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x38] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00104337 LAB_00104373: MOV RAX,qword ptr [RBP + -0x30] SHL RAX,0x3 MOV qword ptr [RBP + -0x28],RAX LAB_0010437f: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x50],RAX LAB_00104397: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001043d1 MOV RAX,qword ptr [RBP + -0x50] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x50],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x48] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x48],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x00104397 LAB_001043d1: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_001043d9: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
void * _memcpy(void *__dest,void *__src,size_t __n) { int1 *local_58; int1 *local_50; int8 *local_48; int8 *local_40; ulong local_30; if (((__dest != (void *)0x0) && (__src != (void *)0x0)) && (__n != 0)) { local_30 = 0; if ((((ulong)__dest | (ulong)__src | __n) & 7) == 0) { local_48 = (int8 *)__src; local_40 = (int8 *)__dest; for (local_30 = 0; local_30 < __n >> 3; local_30 = local_30 + 1) { *local_40 = *local_48; local_48 = local_48 + 1; local_40 = local_40 + 1; } local_30 = (__n >> 3) << 3; } local_58 = (int1 *)((long)__src + local_30); local_50 = (int1 *)((long)__dest + local_30); for (; local_30 < __n; local_30 = local_30 + 1) { *local_50 = *local_58; local_58 = local_58 + 1; local_50 = local_50 + 1; } } return __dest; }
40,185
Cache::getBlockId(unsigned int)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
uint32_t Cache::getBlockId(uint32_t addr) { uint32_t tag = this->getTag(addr); uint32_t id = this->getId(addr); // printf("0x%x 0x%x 0x%x\n", addr, tag, id); // iterate over the given set for (uint32_t i = id * policy.associativity; i < (id + 1) * policy.associativity; ++i) { if (this->blocks[i].id != id) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(-1); } if (this->blocks[i].valid && this->blocks[i].tag == tag) { return i; } } return -1; }
O0
cpp
Cache::getBlockId(unsigned int): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movq 0x18(%rsp), %rdi movq %rdi, (%rsp) movl 0x14(%rsp), %esi callq 0x47a0 movq (%rsp), %rdi movl %eax, 0x10(%rsp) movl 0x14(%rsp), %esi callq 0x4810 movq (%rsp), %rcx movl %eax, 0xc(%rsp) movl 0xc(%rsp), %eax imull 0x44(%rcx), %eax movl %eax, 0x8(%rsp) movq (%rsp), %rdx movl 0x8(%rsp), %eax movl 0xc(%rsp), %ecx addl $0x1, %ecx imull 0x44(%rdx), %ecx cmpl %ecx, %eax jae 0x4781 movq (%rsp), %rdi addq $0x50, %rdi movl 0x8(%rsp), %eax movl %eax, %esi callq 0x5710 movl 0x8(%rax), %eax cmpl 0xc(%rsp), %eax je 0x4731 movq 0x78b6(%rip), %rax # 0xbfc8 movq (%rax), %rdi movl 0x8(%rsp), %edx leaq 0x3b59(%rip), %rsi # 0x8279 movb $0x0, %al callq 0x2260 movl $0xffffffff, %edi # imm = 0xFFFFFFFF callq 0x21e0 movq (%rsp), %rdi addq $0x50, %rdi movl 0x8(%rsp), %eax movl %eax, %esi callq 0x5710 testb $0x1, (%rax) je 0x476f movq (%rsp), %rdi addq $0x50, %rdi movl 0x8(%rsp), %eax movl %eax, %esi callq 0x5710 movl 0x4(%rax), %eax cmpl 0x10(%rsp), %eax jne 0x476f movl 0x8(%rsp), %eax movl %eax, 0x24(%rsp) jmp 0x4789 jmp 0x4771 movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) jmp 0x46d4 movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN5Cache10getBlockIdEj: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov rdi, [rsp+28h+var_10]; this mov [rsp+28h+var_28], rdi mov esi, [rsp+28h+var_14]; unsigned int call _ZN5Cache6getTagEj; Cache::getTag(uint) mov rdi, [rsp+28h+var_28]; this mov [rsp+28h+var_18], eax mov esi, [rsp+28h+var_14]; unsigned int call _ZN5Cache5getIdEj; Cache::getId(uint) mov rcx, [rsp+28h+var_28] mov [rsp+28h+var_1C], eax mov eax, [rsp+28h+var_1C] imul eax, [rcx+44h] mov [rsp+28h+var_20], eax loc_46D4: mov rdx, [rsp+28h+var_28] mov eax, [rsp+28h+var_20] mov ecx, [rsp+28h+var_1C] add ecx, 1 imul ecx, [rdx+44h] cmp eax, ecx jnb loc_4781 mov rdi, [rsp+28h+var_28] add rdi, 50h ; 'P' mov eax, [rsp+28h+var_20] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov eax, [rax+8] cmp eax, [rsp+28h+var_1C] jz short loc_4731 mov rax, cs:stderr_ptr mov rdi, [rax] mov edx, [rsp+28h+var_20] lea rsi, aInconsistentId; "Inconsistent ID in block %d\n" mov al, 0 call _fprintf mov edi, 0FFFFFFFFh call _exit loc_4731: mov rdi, [rsp+28h+var_28] add rdi, 50h ; 'P' mov eax, [rsp+28h+var_20] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) test byte ptr [rax], 1 jz short loc_476F mov rdi, [rsp+28h+var_28] add rdi, 50h ; 'P' mov eax, [rsp+28h+var_20] mov esi, eax call _ZNSt6vectorIN5Cache5BlockESaIS1_EEixEm; std::vector<Cache::Block>::operator[](ulong) mov eax, [rax+4] cmp eax, [rsp+28h+var_18] jnz short loc_476F mov eax, [rsp+28h+var_20] mov [rsp+28h+var_4], eax jmp short loc_4789 loc_476F: jmp short $+2 loc_4771: mov eax, [rsp+28h+var_20] add eax, 1 mov [rsp+28h+var_20], eax jmp loc_46D4 loc_4781: mov [rsp+28h+var_4], 0FFFFFFFFh loc_4789: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long Cache::getBlockId(Cache *this, unsigned int a2) { unsigned int i; // [rsp+8h] [rbp-20h] int Id; // [rsp+Ch] [rbp-1Ch] int Tag; // [rsp+10h] [rbp-18h] Tag = Cache::getTag(this, a2); Id = Cache::getId(this, a2); for ( i = *((_DWORD *)this + 17) * Id; i < *((_DWORD *)this + 17) * (Id + 1); ++i ) { if ( *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 80, i) + 8) != Id ) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(0xFFFFFFFFLL); } if ( (*(_BYTE *)std::vector<Cache::Block>::operator[]((char *)this + 80, i) & 1) != 0 && *(_DWORD *)(std::vector<Cache::Block>::operator[]((char *)this + 80, i) + 4) == Tag ) { return i; } } return (unsigned int)-1; }
getBlockId: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RDI MOV ESI,dword ptr [RSP + 0x14] CALL 0x001047a0 MOV RDI,qword ptr [RSP] MOV dword ptr [RSP + 0x10],EAX MOV ESI,dword ptr [RSP + 0x14] CALL 0x00104810 MOV RCX,qword ptr [RSP] MOV dword ptr [RSP + 0xc],EAX MOV EAX,dword ptr [RSP + 0xc] IMUL EAX,dword ptr [RCX + 0x44] MOV dword ptr [RSP + 0x8],EAX LAB_001046d4: MOV RDX,qword ptr [RSP] MOV EAX,dword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0xc] ADD ECX,0x1 IMUL ECX,dword ptr [RDX + 0x44] CMP EAX,ECX JNC 0x00104781 MOV RDI,qword ptr [RSP] ADD RDI,0x50 MOV EAX,dword ptr [RSP + 0x8] MOV ESI,EAX CALL 0x00105710 MOV EAX,dword ptr [RAX + 0x8] CMP EAX,dword ptr [RSP + 0xc] JZ 0x00104731 MOV RAX,qword ptr [0x0010bfc8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RSP + 0x8] LEA RSI,[0x108279] MOV AL,0x0 CALL 0x00102260 MOV EDI,0xffffffff CALL 0x001021e0 LAB_00104731: MOV RDI,qword ptr [RSP] ADD RDI,0x50 MOV EAX,dword ptr [RSP + 0x8] MOV ESI,EAX CALL 0x00105710 TEST byte ptr [RAX],0x1 JZ 0x0010476f MOV RDI,qword ptr [RSP] ADD RDI,0x50 MOV EAX,dword ptr [RSP + 0x8] MOV ESI,EAX CALL 0x00105710 MOV EAX,dword ptr [RAX + 0x4] CMP EAX,dword ptr [RSP + 0x10] JNZ 0x0010476f MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x24],EAX JMP 0x00104789 LAB_0010476f: JMP 0x00104771 LAB_00104771: MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX JMP 0x001046d4 LAB_00104781: MOV dword ptr [RSP + 0x24],0xffffffff LAB_00104789: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* Cache::getBlockId(unsigned int) */ uint __thiscall Cache::getBlockId(Cache *this,uint param_1) { int iVar1; int iVar2; long lVar3; byte *pbVar4; uint local_20; iVar1 = getTag(this,param_1); iVar2 = getId(this,param_1); local_20 = iVar2 * *(int *)(this + 0x44); while( true ) { if ((uint)((iVar2 + 1) * *(int *)(this + 0x44)) <= local_20) { return 0xffffffff; } lVar3 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (ulong)local_20); if (*(int *)(lVar3 + 8) != iVar2) break; pbVar4 = (byte *)std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (ulong)local_20); if (((*pbVar4 & 1) != 0) && (lVar3 = std::vector<Cache::Block,std::allocator<Cache::Block>>::operator[] ((vector<Cache::Block,std::allocator<Cache::Block>> *)(this + 0x50), (ulong)local_20), *(int *)(lVar3 + 4) == iVar1)) { return local_20; } local_20 = local_20 + 1; } fprintf(*(FILE **)PTR_stderr_0010bfc8,"Inconsistent ID in block %d\n",(ulong)local_20); /* WARNING: Subroutine does not return */ exit(-1); }
40,186
Cache::getBlockId(unsigned int)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
uint32_t Cache::getBlockId(uint32_t addr) { uint32_t tag = this->getTag(addr); uint32_t id = this->getId(addr); // printf("0x%x 0x%x 0x%x\n", addr, tag, id); // iterate over the given set for (uint32_t i = id * policy.associativity; i < (id + 1) * policy.associativity; ++i) { if (this->blocks[i].id != id) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(-1); } if (this->blocks[i].valid && this->blocks[i].tag == tag) { return i; } } return -1; }
O1
cpp
Cache::getBlockId(unsigned int): pushq %rbp pushq %r14 pushq %rbx movl %esi, %ebp movq %rdi, %r14 callq 0x397c movl %eax, %ebx movq %r14, %rdi movl %ebp, %esi callq 0x39ee movl %eax, %ecx movl 0x44(%r14), %edx movl %edx, %edi imull %eax, %edi leal 0x1(%rcx), %esi imull %edx, %esi movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl %esi, %edi jae 0x3971 movq 0x50(%r14), %rsi movl %edi, %r8d leaq (%r8,%r8,2), %r8 shlq $0x4, %r8 addq %r8, %rsi addq $0x8, %rsi cmpl %ecx, (%rsi) jne 0x3976 cmpb $0x1, -0x8(%rsi) jne 0x3963 cmpl %ebx, -0x4(%rsi) je 0x396f incl %edi addq $0x30, %rsi decl %edx jne 0x3954 jmp 0x3971 movl %edi, %eax popq %rbx popq %r14 popq %rbp retq callq 0x244e nop
_ZN5Cache10getBlockIdEj: push rbp push r14 push rbx mov ebp, esi mov r14, rdi call _ZN5Cache6getTagEj; Cache::getTag(uint) mov ebx, eax mov rdi, r14; this mov esi, ebp; unsigned int call _ZN5Cache5getIdEj; Cache::getId(uint) mov ecx, eax mov edx, [r14+44h] mov edi, edx imul edi, eax lea esi, [rcx+1] imul esi, edx mov eax, 0FFFFFFFFh cmp edi, esi jnb short loc_3971 mov rsi, [r14+50h] mov r8d, edi lea r8, [r8+r8*2] shl r8, 4 add rsi, r8 add rsi, 8 loc_3954: cmp [rsi], ecx jnz short loc_3976 cmp byte ptr [rsi-8], 1 jnz short loc_3963 cmp [rsi-4], ebx jz short loc_396F loc_3963: inc edi add rsi, 30h ; '0' dec edx jnz short loc_3954 jmp short loc_3971 loc_396F: mov eax, edi loc_3971: pop rbx pop r14 pop rbp retn loc_3976: call _ZN5Cache10getBlockIdEj_cold_1; Cache::getBlockId(uint) [clone]
long long Cache::getBlockId(Cache *this, unsigned int a2) { int Tag; // ebx int Id; // ecx int v5; // edx unsigned int v6; // edi long long result; // rax _DWORD *i; // rsi Tag = Cache::getTag(this, a2); Id = Cache::getId(this, a2); v5 = *((_DWORD *)this + 17); v6 = Id * v5; result = 0xFFFFFFFFLL; if ( Id * v5 < (unsigned int)(v5 * (Id + 1)) ) { for ( i = (_DWORD *)(48LL * v6 + *((_QWORD *)this + 10) + 8); ; i += 12 ) { if ( *i != Id ) Cache::getBlockId(v6); if ( *((_BYTE *)i - 8) == 1 && *(i - 1) == Tag ) break; ++v6; if ( !--v5 ) return result; } return v6; } return result; }
getBlockId: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ESI MOV R14,RDI CALL 0x0010397c MOV EBX,EAX MOV RDI,R14 MOV ESI,EBP CALL 0x001039ee MOV ECX,EAX MOV EDX,dword ptr [R14 + 0x44] MOV EDI,EDX IMUL EDI,EAX LEA ESI,[RCX + 0x1] IMUL ESI,EDX MOV EAX,0xffffffff CMP EDI,ESI JNC 0x00103971 MOV RSI,qword ptr [R14 + 0x50] MOV R8D,EDI LEA R8,[R8 + R8*0x2] SHL R8,0x4 ADD RSI,R8 ADD RSI,0x8 LAB_00103954: CMP dword ptr [RSI],ECX JNZ 0x00103976 CMP byte ptr [RSI + -0x8],0x1 JNZ 0x00103963 CMP dword ptr [RSI + -0x4],EBX JZ 0x0010396f LAB_00103963: INC EDI ADD RSI,0x30 DEC EDX JNZ 0x00103954 JMP 0x00103971 LAB_0010396f: MOV EAX,EDI LAB_00103971: POP RBX POP R14 POP RBP RET LAB_00103976: CALL 0x0010244e NOP
/* Cache::getBlockId(unsigned int) */ int1 [16] __thiscall Cache::getBlockId(Cache *this,uint param_1) { bool bVar1; int iVar2; int iVar3; ulong uVar4; char cVar5; uint uVar6; ulong uVar7; int *piVar8; uint uVar9; char cVar10; int1 auVar11 [16]; int1 auVar12 [16]; iVar2 = getTag(this,param_1); iVar3 = getId(this,param_1); uVar6 = *(uint *)(this + 0x44); uVar7 = (ulong)uVar6; uVar9 = uVar6 * iVar3; uVar4 = 0xffffffff; if (uVar9 < (iVar3 + 1) * uVar6) { piVar8 = (int *)(*(long *)(this + 0x50) + (ulong)uVar9 * 0x30 + 8); do { uVar4 = (ulong)uVar9; if (*piVar8 != iVar3) { getBlockId(uVar9); uVar6 = *(uint *)(uVar4 + 0x3c); cVar5 = -1; if (uVar6 != 0) { cVar5 = '\0'; if ((uVar6 != 1) && (cVar5 = '\0', 1 < uVar6)) { cVar5 = '\0'; uVar7 = (ulong)uVar6; do { uVar7 = uVar7 >> 1; cVar5 = cVar5 + '\x01'; bVar1 = 3 < uVar6; uVar6 = (uint)uVar7; } while (bVar1); } } uVar7 = (ulong)*(uint *)(uVar4 + 0x40) / (ulong)*(uint *)(uVar4 + 0x44); uVar4 = (ulong)*(uint *)(uVar4 + 0x40) % (ulong)*(uint *)(uVar4 + 0x44); uVar6 = (uint)uVar7; cVar10 = -1; if (uVar6 != 0) { cVar10 = '\0'; if ((uVar6 != 1) && (cVar10 = '\0', 1 < uVar6)) { cVar10 = '\0'; do { uVar4 = uVar7 >> 1; cVar10 = cVar10 + '\x01'; uVar6 = (uint)uVar7; uVar7 = uVar4; } while (3 < uVar6); } } auVar12._4_4_ = 0; auVar12._0_4_ = (uint)piVar8 >> (cVar10 + cVar5 & 0x1fU) & ~(-1 << (-(cVar10 + cVar5) & 0x1fU)); auVar12._8_8_ = uVar4; return auVar12; } if (((char)piVar8[-2] == '\x01') && (piVar8[-1] == iVar2)) break; uVar9 = uVar9 + 1; piVar8 = piVar8 + 0xc; uVar6 = (int)uVar7 - 1; uVar7 = (ulong)uVar6; uVar4 = 0xffffffff; } while (uVar6 != 0); } auVar11._8_8_ = uVar7; auVar11._0_8_ = uVar4; return auVar11; }
40,187
Cache::getBlockId(unsigned int)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
uint32_t Cache::getBlockId(uint32_t addr) { uint32_t tag = this->getTag(addr); uint32_t id = this->getId(addr); // printf("0x%x 0x%x 0x%x\n", addr, tag, id); // iterate over the given set for (uint32_t i = id * policy.associativity; i < (id + 1) * policy.associativity; ++i) { if (this->blocks[i].id != id) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(-1); } if (this->blocks[i].valid && this->blocks[i].tag == tag) { return i; } } return -1; }
O2
cpp
Cache::getBlockId(unsigned int): pushq %rbp pushq %r14 pushq %rbx movl %esi, %ebp movq %rdi, %r14 callq 0x36ee movl %eax, %ebx movq %r14, %rdi movl %ebp, %esi callq 0x372c movl 0x44(%r14), %edx leal 0x1(%rax), %esi imull %edx, %esi imull %eax, %edx movq 0x50(%r14), %rcx imulq $0x30, %rdx, %rdi addq %rcx, %rdi addq $0x8, %rdi pushq $-0x1 popq %rcx cmpq %rsi, %rdx jae 0x36c6 cmpl %eax, (%rdi) jne 0x36cd cmpb $0x1, -0x8(%rdi) jne 0x36bb cmpl %ebx, -0x4(%rdi) je 0x36c4 incq %rdx addq $0x30, %rdi jmp 0x36a7 movl %edx, %ecx movl %ecx, %eax popq %rbx popq %r14 popq %rbp retq movq 0x48f4(%rip), %rax # 0x7fc8 movq (%rax), %rdi leaq 0x1be0(%rip), %rsi # 0x52be xorl %eax, %eax callq 0x2210 pushq $-0x1 popq %rdi callq 0x21c0 nop
_ZN5Cache10getBlockIdEj: push rbp push r14 push rbx mov ebp, esi mov r14, rdi call _ZN5Cache6getTagEj; Cache::getTag(uint) mov ebx, eax mov rdi, r14; this mov esi, ebp; unsigned int call _ZN5Cache5getIdEj; Cache::getId(uint) mov edx, [r14+44h] lea esi, [rax+1] imul esi, edx imul edx, eax mov rcx, [r14+50h] imul rdi, rdx, 30h ; '0' add rdi, rcx add rdi, 8 push 0FFFFFFFFFFFFFFFFh pop rcx loc_36A7: cmp rdx, rsi jnb short loc_36C6 cmp [rdi], eax jnz short loc_36CD cmp byte ptr [rdi-8], 1 jnz short loc_36BB cmp [rdi-4], ebx jz short loc_36C4 loc_36BB: inc rdx add rdi, 30h ; '0' jmp short loc_36A7 loc_36C4: mov ecx, edx loc_36C6: mov eax, ecx pop rbx pop r14 pop rbp retn loc_36CD: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aInconsistentId; "Inconsistent ID in block %d\n" xor eax, eax call _fprintf push 0FFFFFFFFFFFFFFFFh pop rdi call _exit
long long Cache::getBlockId(Cache *this, unsigned int a2) { int Tag; // ebx int Id; // eax int v4; // edx unsigned long long v5; // rsi unsigned long long v6; // rdx _DWORD *v7; // rdi unsigned int v8; // ecx Tag = Cache::getTag(this, a2); Id = Cache::getId(this, a2); v4 = *((_DWORD *)this + 17); v5 = (unsigned int)(v4 * (Id + 1)); v6 = (unsigned int)(Id * v4); v7 = (_DWORD *)(*((_QWORD *)this + 10) + 48 * v6 + 8); v8 = -1; while ( v6 < v5 ) { if ( *v7 != Id ) { fprintf(stderr, "Inconsistent ID in block %d\n", v6); exit(-1LL); } if ( *((_BYTE *)v7 - 8) == 1 && *(v7 - 1) == Tag ) return (unsigned int)v6; ++v6; v7 += 12; } return v8; }
getBlockId: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ESI MOV R14,RDI CALL 0x001036ee MOV EBX,EAX MOV RDI,R14 MOV ESI,EBP CALL 0x0010372c MOV EDX,dword ptr [R14 + 0x44] LEA ESI,[RAX + 0x1] IMUL ESI,EDX IMUL EDX,EAX MOV RCX,qword ptr [R14 + 0x50] IMUL RDI,RDX,0x30 ADD RDI,RCX ADD RDI,0x8 PUSH -0x1 POP RCX LAB_001036a7: CMP RDX,RSI JNC 0x001036c6 CMP dword ptr [RDI],EAX JNZ 0x001036cd CMP byte ptr [RDI + -0x8],0x1 JNZ 0x001036bb CMP dword ptr [RDI + -0x4],EBX JZ 0x001036c4 LAB_001036bb: INC RDX ADD RDI,0x30 JMP 0x001036a7 LAB_001036c4: MOV ECX,EDX LAB_001036c6: MOV EAX,ECX POP RBX POP R14 POP RBP RET LAB_001036cd: MOV RAX,qword ptr [0x00107fc8] MOV RDI,qword ptr [RAX] LEA RSI,[0x1052be] XOR EAX,EAX CALL 0x00102210 PUSH -0x1 POP RDI CALL 0x001021c0
/* Cache::getBlockId(unsigned int) */ ulong __thiscall Cache::getBlockId(Cache *this,uint param_1) { int iVar1; int iVar2; ulong uVar3; ulong uVar4; int *piVar5; iVar1 = getTag(this,param_1); iVar2 = getId(this,param_1); uVar4 = (ulong)(uint)(*(int *)(this + 0x44) * iVar2); piVar5 = (int *)(uVar4 * 0x30 + *(long *)(this + 0x50) + 8); uVar3 = 0xffffffffffffffff; do { if ((uint)((iVar2 + 1) * *(int *)(this + 0x44)) <= uVar4) { LAB_001036c6: return uVar3 & 0xffffffff; } if (*piVar5 != iVar2) { fprintf(*(FILE **)PTR_stderr_00107fc8,"Inconsistent ID in block %d\n"); /* WARNING: Subroutine does not return */ exit(-1); } if (((char)piVar5[-2] == '\x01') && (piVar5[-1] == iVar1)) { uVar3 = uVar4 & 0xffffffff; goto LAB_001036c6; } uVar4 = uVar4 + 1; piVar5 = piVar5 + 0xc; } while( true ); }
40,188
Cache::getBlockId(unsigned int)
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/Cache.cpp
uint32_t Cache::getBlockId(uint32_t addr) { uint32_t tag = this->getTag(addr); uint32_t id = this->getId(addr); // printf("0x%x 0x%x 0x%x\n", addr, tag, id); // iterate over the given set for (uint32_t i = id * policy.associativity; i < (id + 1) * policy.associativity; ++i) { if (this->blocks[i].id != id) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(-1); } if (this->blocks[i].valid && this->blocks[i].tag == tag) { return i; } } return -1; }
O3
cpp
Cache::getBlockId(unsigned int): pushq %rbp pushq %r14 pushq %rbx movl %esi, %ebp movq %rdi, %r14 callq 0x3916 movl %eax, %ebx movq %r14, %rdi movl %ebp, %esi callq 0x397a movl %eax, %ecx movl 0x44(%r14), %edx movl %edx, %esi imull %eax, %esi leal 0x1(%rcx), %edi imull %edx, %edi movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl %edi, %esi jae 0x390b movq 0x50(%r14), %r8 movl %esi, %edi leaq (%rdi,%rdi,2), %rsi shlq $0x4, %rsi addq %r8, %rsi addq $0x8, %rsi cmpl %ecx, (%rsi) jne 0x3910 cmpb $0x1, -0x8(%rsi) jne 0x38fc cmpl %ebx, -0x4(%rsi) je 0x3909 incq %rdi addq $0x30, %rsi decl %edx jne 0x38ed jmp 0x390b movl %edi, %eax popq %rbx popq %r14 popq %rbp retq callq 0x244e nop
_ZN5Cache10getBlockIdEj: push rbp push r14 push rbx mov ebp, esi mov r14, rdi call _ZN5Cache6getTagEj; Cache::getTag(uint) mov ebx, eax mov rdi, r14; this mov esi, ebp; unsigned int call _ZN5Cache5getIdEj; Cache::getId(uint) mov ecx, eax mov edx, [r14+44h] mov esi, edx imul esi, eax lea edi, [rcx+1] imul edi, edx mov eax, 0FFFFFFFFh cmp esi, edi jnb short loc_390B mov r8, [r14+50h] mov edi, esi lea rsi, [rdi+rdi*2] shl rsi, 4 add rsi, r8 add rsi, 8 loc_38ED: cmp [rsi], ecx jnz short loc_3910 cmp byte ptr [rsi-8], 1 jnz short loc_38FC cmp [rsi-4], ebx jz short loc_3909 loc_38FC: inc rdi add rsi, 30h ; '0' dec edx jnz short loc_38ED jmp short loc_390B loc_3909: mov eax, edi loc_390B: pop rbx pop r14 pop rbp retn loc_3910: call _ZN5Cache10getBlockIdEj_cold_1; Cache::getBlockId(uint) [clone]
long long Cache::getBlockId(Cache *this, unsigned int a2) { int Tag; // ebx int Id; // ecx int v5; // edx long long result; // rax unsigned int v7; // edi _DWORD *i; // rsi Tag = Cache::getTag(this, a2); Id = Cache::getId(this, a2); v5 = *((_DWORD *)this + 17); result = 0xFFFFFFFFLL; if ( Id * v5 < (unsigned int)(v5 * (Id + 1)) ) { v7 = Id * v5; for ( i = (_DWORD *)(*((_QWORD *)this + 10) + 48LL * (unsigned int)(Id * v5) + 8); ; i += 12 ) { if ( *i != Id ) Cache::getBlockId(v7); if ( *((_BYTE *)i - 8) == 1 && *(i - 1) == Tag ) break; ++v7; if ( !--v5 ) return result; } return v7; } return result; }
getBlockId: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ESI MOV R14,RDI CALL 0x00103916 MOV EBX,EAX MOV RDI,R14 MOV ESI,EBP CALL 0x0010397a MOV ECX,EAX MOV EDX,dword ptr [R14 + 0x44] MOV ESI,EDX IMUL ESI,EAX LEA EDI,[RCX + 0x1] IMUL EDI,EDX MOV EAX,0xffffffff CMP ESI,EDI JNC 0x0010390b MOV R8,qword ptr [R14 + 0x50] MOV EDI,ESI LEA RSI,[RDI + RDI*0x2] SHL RSI,0x4 ADD RSI,R8 ADD RSI,0x8 LAB_001038ed: CMP dword ptr [RSI],ECX JNZ 0x00103910 CMP byte ptr [RSI + -0x8],0x1 JNZ 0x001038fc CMP dword ptr [RSI + -0x4],EBX JZ 0x00103909 LAB_001038fc: INC RDI ADD RSI,0x30 DEC EDX JNZ 0x001038ed JMP 0x0010390b LAB_00103909: MOV EAX,EDI LAB_0010390b: POP RBX POP R14 POP RBP RET LAB_00103910: CALL 0x0010244e NOP
/* Cache::getBlockId(unsigned int) */ int1 [16] __thiscall Cache::getBlockId(Cache *this,uint param_1) { bool bVar1; int iVar2; int iVar3; ulong uVar4; char cVar5; uint uVar6; ulong uVar7; int *piVar8; ulong uVar9; char cVar10; char cVar11; int1 auVar12 [16]; int1 auVar13 [16]; iVar2 = getTag(this,param_1); iVar3 = getId(this,param_1); uVar6 = *(uint *)(this + 0x44); uVar7 = (ulong)uVar6; uVar4 = 0xffffffff; if (uVar6 * iVar3 < (iVar3 + 1) * uVar6) { uVar9 = (ulong)(uVar6 * iVar3); piVar8 = (int *)(uVar9 * 0x30 + *(long *)(this + 0x50) + 8); do { if (*piVar8 != iVar3) { getBlockId((uint)uVar9); uVar6 = *(uint *)(uVar9 + 0x3c); cVar10 = -1; cVar5 = -1; if (uVar6 != 0) { cVar5 = '\0'; if (uVar6 != 1) { uVar4 = (ulong)uVar6; cVar5 = '\0'; do { uVar4 = uVar4 >> 1; cVar5 = cVar5 + '\x01'; bVar1 = 3 < uVar6; uVar6 = (uint)uVar4; } while (bVar1); } } uVar4 = (ulong)*(uint *)(uVar9 + 0x40) / (ulong)*(uint *)(uVar9 + 0x44); uVar7 = (ulong)*(uint *)(uVar9 + 0x40) % (ulong)*(uint *)(uVar9 + 0x44); if ((int)uVar4 != 0) { cVar11 = '\0'; cVar10 = '\0'; if ((int)uVar4 != 1) { do { uVar7 = uVar4 >> 1; cVar10 = cVar11 + '\x01'; uVar6 = (uint)uVar4; uVar4 = uVar7; cVar11 = cVar10; } while (3 < uVar6); } } auVar13._4_4_ = 0; auVar13._0_4_ = (uint)piVar8 >> (cVar10 + cVar5 & 0x1fU) & ~(-1 << (-(cVar10 + cVar5) & 0x1fU)); auVar13._8_8_ = uVar7; return auVar13; } if (((char)piVar8[-2] == '\x01') && (piVar8[-1] == iVar2)) { uVar4 = uVar9 & 0xffffffff; break; } uVar9 = uVar9 + 1; piVar8 = piVar8 + 0xc; uVar6 = (int)uVar7 - 1; uVar7 = (ulong)uVar6; } while (uVar6 != 0); } auVar12._8_8_ = uVar7; auVar12._0_8_ = uVar4; return auVar12; }
40,189
verify_database_directory_exists(st_mysql_const_lex_string const&)
eloqsql/sql/sql_show.cc
static bool verify_database_directory_exists(const LEX_CSTRING &dbname) { DBUG_ENTER("verify_database_directory_exists"); char path[FN_REFLEN + 16]; uint path_len; MY_STAT stat_info; if (!dbname.str[0]) DBUG_RETURN(true); // Empty database name: does not exist. path_len= build_table_filename(path, sizeof(path) - 1, dbname.str, "", "", 0); path[path_len - 1]= 0; if (!mysql_file_stat(key_file_misc, path, &stat_info, MYF(0))) DBUG_RETURN(true); // The database directory was not found: does not exist. DBUG_RETURN(false); // The database directory was found. }
O0
cpp
verify_database_directory_exists(st_mysql_const_lex_string const&): pushq %rbp movq %rsp, %rbp subq $0x2d0, %rsp # imm = 0x2D0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x230(%rbp) movq -0x230(%rbp), %rax movq (%rax), %rax cmpb $0x0, (%rax) jne 0x99512c jmp 0x995120 movb $0x1, -0x221(%rbp) jmp 0x9951b4 leaq -0x220(%rbp), %rdi movq -0x230(%rbp), %rax movq (%rax), %rdx movl $0x20f, %esi # imm = 0x20F leaq 0xa47691(%rip), %r8 # 0x13dc7da xorl %r9d, %r9d movq %r8, %rcx callq 0x9b5e10 movl %eax, -0x234(%rbp) movl -0x234(%rbp), %eax subl $0x1, %eax movl %eax, %eax movb $0x0, -0x220(%rbp,%rax) leaq 0x13360ac(%rip), %rax # 0x1ccb220 movl (%rax), %edi leaq -0x220(%rbp), %rcx leaq 0xa05952(%rip), %rsi # 0x139aad6 movl $0x1564, %edx # imm = 0x1564 leaq -0x2c8(%rbp), %r8 xorl %eax, %eax movl %eax, %r9d callq 0x9a4bb0 cmpq $0x0, %rax jne 0x9951ab jmp 0x9951a2 movb $0x1, -0x221(%rbp) jmp 0x9951b4 jmp 0x9951ad movb $0x0, -0x221(%rbp) movb -0x221(%rbp), %al movb %al, -0x2c9(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x9951e3 movb -0x2c9(%rbp), %al andb $0x1, %al addq $0x2d0, %rsp # imm = 0x2D0 popq %rbp retq callq 0x758480 nopl (%rax,%rax)
_ZL32verify_database_directory_existsRK25st_mysql_const_lex_string: push rbp mov rbp, rsp sub rsp, 2D0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_230], rdi mov rax, [rbp+var_230] mov rax, [rax] cmp byte ptr [rax], 0 jnz short loc_99512C jmp short $+2 loc_995120: mov [rbp+var_221], 1 jmp loc_9951B4 loc_99512C: lea rdi, [rbp+var_220]; char * mov rax, [rbp+var_230] mov rdx, [rax]; char * mov esi, 20Fh; unsigned __int64 lea r8, byte_13DC7DA; char * xor r9d, r9d; unsigned int mov rcx, r8; char * call _Z20build_table_filenamePcmPKcS1_S1_j; build_table_filename(char *,ulong,char const*,char const*,char const*,uint) mov [rbp+var_234], eax mov eax, [rbp+var_234] sub eax, 1 mov eax, eax mov [rbp+rax+var_220], 0 lea rax, key_file_misc mov edi, [rax] lea rcx, [rbp+var_220] lea rsi, aWorkspaceLlm4b_39; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1564h lea r8, [rbp+var_2C8] xor eax, eax mov r9d, eax call _ZL22inline_mysql_file_statjPKcjS0_P4statm_2; inline_mysql_file_stat(uint,char const*,uint,char const*,stat *,ulong) cmp rax, 0 jnz short loc_9951AB jmp short $+2 loc_9951A2: mov [rbp+var_221], 1 jmp short loc_9951B4 loc_9951AB: jmp short $+2 loc_9951AD: mov [rbp+var_221], 0 loc_9951B4: mov al, [rbp+var_221] mov [rbp+var_2C9], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_9951E3 mov al, [rbp+var_2C9] and al, 1 add rsp, 2D0h pop rbp retn loc_9951E3: call ___stack_chk_fail
bool verify_database_directory_exists(const char **a1) { _BYTE v2[148]; // [rsp+8h] [rbp-2C8h] BYREF int v3; // [rsp+9Ch] [rbp-234h] const char **v4; // [rsp+A0h] [rbp-230h] char v6[536]; // [rsp+B0h] [rbp-220h] BYREF unsigned long long v7; // [rsp+2C8h] [rbp-8h] v7 = __readfsqword(0x28u); v4 = a1; if ( **a1 ) { v3 = build_table_filename(v6, 0x20FuLL, *v4, &byte_13DC7DA, &byte_13DC7DA, 0); v6[v3 - 1] = 0; return inline_mysql_file_stat( key_file_misc, "/workspace/llm4binary/github2025/eloqsql/sql/sql_show.cc", 5476LL, v6, v2, 0LL) == 0; } else { return 1; } }
deallocate: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] SHL RSI,0x2 CALL 0x008581c0 ADD RSP,0x20 POP RBP RET
/* std::__new_allocator<wsrep::client_state::state>::deallocate(wsrep::client_state::state*, unsigned long) */ void __thiscall std::__new_allocator<wsrep::client_state::state>::deallocate (__new_allocator<wsrep::client_state::state> *this,state *param_1,ulong param_2) { ::operator_delete(param_1,param_2 << 2); return; }
40,190
mi_setup_functions
eloqsql/storage/myisam/mi_open.c
void mi_setup_functions(register MYISAM_SHARE *share) { if (share->options & HA_OPTION_COMPRESS_RECORD) { share->read_record=_mi_read_pack_record; share->read_rnd=_mi_read_rnd_pack_record; if ((share->options & (HA_OPTION_PACK_RECORD | HA_OPTION_NULL_FIELDS)) || share->has_varchar_fields) share->calc_checksum= mi_checksum; else share->calc_checksum= mi_static_checksum; share->calc_check_checksum= share->calc_checksum; if (!(share->options & HA_OPTION_TEMP_COMPRESS_RECORD)) share->calc_checksum=0; /* No checksum */ } else if (share->options & HA_OPTION_PACK_RECORD) { share->read_record=_mi_read_dynamic_record; share->read_rnd=_mi_read_rnd_dynamic_record; share->delete_record=_mi_delete_dynamic_record; share->compare_record=_mi_cmp_dynamic_record; share->compare_unique=_mi_cmp_dynamic_unique; share->calc_checksum= mi_checksum; share->calc_check_checksum= share->calc_checksum; /* add bits used to pack data to pack_reclength for faster allocation */ share->base.pack_reclength+= share->base.pack_bits; if (share->base.blobs) { share->update_record=_mi_update_blob_record; share->write_record=_mi_write_blob_record; } else { share->write_record=_mi_write_dynamic_record; share->update_record=_mi_update_dynamic_record; } } else { share->read_record=_mi_read_static_record; share->read_rnd=_mi_read_rnd_static_record; share->delete_record=_mi_delete_static_record; share->compare_record=_mi_cmp_static_record; share->update_record=_mi_update_static_record; share->write_record=_mi_write_static_record; share->compare_unique=_mi_cmp_static_unique; if (share->options & HA_OPTION_NULL_FIELDS) share->calc_checksum= mi_checksum; else share->calc_checksum= mi_static_checksum; share->calc_check_checksum= share->calc_checksum; } share->file_read= mi_nommap_pread; share->file_write= mi_nommap_pwrite; if (!(share->options & HA_OPTION_CHECKSUM)) share->calc_checksum=0; return; }
O3
c
mi_setup_functions: pushq %rbp movq %rsp, %rbp movq 0x318(%rdi), %rax testb $0x4, %al jne 0x37990 testb $0x1, %al jne 0x379f0 leaq 0x8526(%rip), %rcx # 0x3fe45 movq %rcx, 0x298(%rdi) leaq 0x8601(%rip), %rcx # 0x3ff2e movq %rcx, 0x2b8(%rdi) leaq 0x832d(%rip), %rcx # 0x3fc68 movq %rcx, 0x2b0(%rdi) leaq 0x83c4(%rip), %rcx # 0x3fd0d movq %rcx, 0x2c0(%rdi) leaq 0x82d7(%rip), %rcx # 0x3fc2e movq %rcx, 0x2a8(%rdi) leaq 0x8017(%rip), %rcx # 0x3f97c movq %rcx, 0x2a0(%rdi) leaq 0x8462(%rip), %rcx # 0x3fdd5 movq %rcx, 0x2d8(%rdi) btl $0xa, %eax jb 0x37a9c leaq 0x12a63(%rip), %rdx # 0x4a3ee jmp 0x37aa3 leaq 0x1c49(%rip), %rcx # 0x395e0 movq %rcx, 0x298(%rdi) leaq 0x2126(%rip), %rcx # 0x39acb movq %rcx, 0x2b8(%rdi) testl $0x401, %eax # imm = 0x401 jne 0x379c5 cmpb $0x0, 0x37e(%rdi) jne 0x379c5 leaq 0x12a2b(%rip), %rcx # 0x4a3ee jmp 0x379cc leaq 0x1291c(%rip), %rcx # 0x4a2e8 movq %rcx, 0x2c8(%rdi) movq %rcx, 0x2d0(%rdi) testw %ax, %ax js 0x37ab8 movl $0x2c8, %ecx # imm = 0x2C8 xorl %r8d, %r8d jmp 0x37ab4 leaq -0x5e4f(%rip), %rcx # 0x31ba8 movq %rcx, 0x298(%rdi) leaq -0x5646(%rip), %rcx # 0x323bf movq %rcx, 0x2b8(%rdi) leaq -0x7404(%rip), %rcx # 0x3060f movq %rcx, 0x2b0(%rdi) leaq -0x5a8c(%rip), %rcx # 0x31f95 movq %rcx, 0x2c0(%rdi) leaq -0x5b7f(%rip), %rcx # 0x31eb0 movq %rcx, 0x2d8(%rdi) leaq 0x128ab(%rip), %rcx # 0x4a2e8 movq %rcx, 0x2c8(%rdi) movq %rcx, 0x2d0(%rdi) movl 0x18c(%rdi), %ecx addq %rcx, 0x148(%rdi) xorl %ecx, %ecx xorl %esi, %esi cmpl $0x0, 0x188(%rdi) sete %cl setne %sil leaq -0x74f6(%rip), %rdx # 0x3057b cmoveq 0x2f6517(%rip), %rdx # 0x32df90 leaq -0x760e(%rip), %r8 # 0x30472 cmoveq 0x2f6548(%rip), %r8 # 0x32dfd0 shll $0x3, %esi movl $0x2a0, %r9d # imm = 0x2A0 orq %r9, %rsi shll $0x3, %ecx orq %r9, %rcx jmp 0x37ab0 leaq 0x12845(%rip), %rdx # 0x4a2e8 movl $0x2d0, %ecx # imm = 0x2D0 movl $0x2c8, %esi # imm = 0x2C8 movq %rdx, %r8 movq %rdx, (%rdi,%rsi) movq %r8, (%rdi,%rcx) leaq -0x8117(%rip), %rcx # 0x2f9a8 movq %rcx, 0x2e0(%rdi) leaq -0x804b(%rip), %rcx # 0x2fa82 movq %rcx, 0x2e8(%rdi) testb $0x20, %al jne 0x37ae3 movq $0x0, 0x2c8(%rdi) popq %rbp retq
mi_setup_functions: push rbp mov rbp, rsp mov rax, [rdi+318h] test al, 4 jnz loc_37990 test al, 1 jnz loc_379F0 lea rcx, _mi_read_static_record mov [rdi+298h], rcx lea rcx, _mi_read_rnd_static_record mov [rdi+2B8h], rcx lea rcx, _mi_delete_static_record mov [rdi+2B0h], rcx lea rcx, _mi_cmp_static_record mov [rdi+2C0h], rcx lea rcx, _mi_update_static_record mov [rdi+2A8h], rcx lea rcx, _mi_write_static_record mov [rdi+2A0h], rcx lea rcx, _mi_cmp_static_unique mov [rdi+2D8h], rcx bt eax, 0Ah jb loc_37A9C lea rdx, mi_static_checksum jmp loc_37AA3 loc_37990: lea rcx, _mi_read_pack_record mov [rdi+298h], rcx lea rcx, _mi_read_rnd_pack_record mov [rdi+2B8h], rcx test eax, 401h jnz short loc_379C5 cmp byte ptr [rdi+37Eh], 0 jnz short loc_379C5 lea rcx, mi_static_checksum jmp short loc_379CC loc_379C5: lea rcx, mi_checksum loc_379CC: mov [rdi+2C8h], rcx mov [rdi+2D0h], rcx test ax, ax js loc_37AB8 mov ecx, 2C8h xor r8d, r8d jmp loc_37AB4 loc_379F0: lea rcx, _mi_read_dynamic_record mov [rdi+298h], rcx lea rcx, _mi_read_rnd_dynamic_record mov [rdi+2B8h], rcx lea rcx, _mi_delete_dynamic_record mov [rdi+2B0h], rcx lea rcx, _mi_cmp_dynamic_record mov [rdi+2C0h], rcx lea rcx, _mi_cmp_dynamic_unique mov [rdi+2D8h], rcx lea rcx, mi_checksum mov [rdi+2C8h], rcx mov [rdi+2D0h], rcx mov ecx, [rdi+18Ch] add [rdi+148h], rcx xor ecx, ecx xor esi, esi cmp dword ptr [rdi+188h], 0 setz cl setnz sil lea rdx, _mi_update_blob_record cmovz rdx, cs:_mi_write_dynamic_record_ptr lea r8, _mi_write_blob_record cmovz r8, cs:_mi_update_dynamic_record_ptr shl esi, 3 mov r9d, 2A0h or rsi, r9 shl ecx, 3 or rcx, r9 jmp short loc_37AB0 loc_37A9C: lea rdx, mi_checksum loc_37AA3: mov ecx, 2D0h mov esi, 2C8h mov r8, rdx loc_37AB0: mov [rdi+rsi], rdx loc_37AB4: mov [rdi+rcx], r8 loc_37AB8: lea rcx, mi_nommap_pread mov [rdi+2E0h], rcx lea rcx, mi_nommap_pwrite mov [rdi+2E8h], rcx test al, 20h jnz short loc_37AE3 mov qword ptr [rdi+2C8h], 0 loc_37AE3: pop rbp retn
long long mi_setup_functions(long long a1) { long long result; // rax long long ( *v2)(); // rdx long long ( *v3)(); // rcx long long v4; // rcx void *v5; // r8 long long v6; // rsi result = *(_QWORD *)(a1 + 792); if ( (result & 4) == 0 ) { if ( (result & 1) != 0 ) { *(_QWORD *)(a1 + 664) = mi_read_dynamic_record; *(_QWORD *)(a1 + 696) = mi_read_rnd_dynamic_record; *(_QWORD *)(a1 + 688) = mi_delete_dynamic_record; *(_QWORD *)(a1 + 704) = mi_cmp_dynamic_record; *(_QWORD *)(a1 + 728) = mi_cmp_dynamic_unique; *(_QWORD *)(a1 + 712) = mi_checksum; *(_QWORD *)(a1 + 720) = mi_checksum; *(_QWORD *)(a1 + 328) += *(unsigned int *)(a1 + 396); v2 = (long long ( *)())mi_update_blob_record; if ( !*(_DWORD *)(a1 + 392) ) v2 = (long long ( *)())mi_write_dynamic_record; v5 = mi_write_blob_record; if ( !*(_DWORD *)(a1 + 392) ) v5 = mi_update_dynamic_record; v6 = (8 * (unsigned int)(*(_DWORD *)(a1 + 392) != 0)) | 0x2A0LL; v4 = (8 * (unsigned int)(*(_DWORD *)(a1 + 392) == 0)) | 0x2A0LL; } else { *(_QWORD *)(a1 + 664) = mi_read_static_record; *(_QWORD *)(a1 + 696) = mi_read_rnd_static_record; *(_QWORD *)(a1 + 688) = mi_delete_static_record; *(_QWORD *)(a1 + 704) = mi_cmp_static_record; *(_QWORD *)(a1 + 680) = mi_update_static_record; *(_QWORD *)(a1 + 672) = mi_write_static_record; *(_QWORD *)(a1 + 728) = mi_cmp_static_unique; if ( (result & 0x400) != 0 ) v2 = mi_checksum; else v2 = mi_static_checksum; v4 = 720LL; v6 = 712LL; v5 = v2; } *(_QWORD *)(a1 + v6) = v2; goto LABEL_19; } *(_QWORD *)(a1 + 664) = mi_read_pack_record; *(_QWORD *)(a1 + 696) = mi_read_rnd_pack_record; if ( (result & 0x401) != 0 || *(_BYTE *)(a1 + 894) ) v3 = mi_checksum; else v3 = mi_static_checksum; *(_QWORD *)(a1 + 712) = v3; *(_QWORD *)(a1 + 720) = v3; if ( (result & 0x8000u) == 0LL ) { v4 = 712LL; v5 = 0LL; LABEL_19: *(_QWORD *)(a1 + v4) = v5; } *(_QWORD *)(a1 + 736) = mi_nommap_pread; *(_QWORD *)(a1 + 744) = mi_nommap_pwrite; if ( (result & 0x20) == 0 ) *(_QWORD *)(a1 + 712) = 0LL; return result; }
mi_setup_functions: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x318] TEST AL,0x4 JNZ 0x00137990 TEST AL,0x1 JNZ 0x001379f0 LEA RCX,[0x13fe45] MOV qword ptr [RDI + 0x298],RCX LEA RCX,[0x13ff2e] MOV qword ptr [RDI + 0x2b8],RCX LEA RCX,[0x13fc68] MOV qword ptr [RDI + 0x2b0],RCX LEA RCX,[0x13fd0d] MOV qword ptr [RDI + 0x2c0],RCX LEA RCX,[0x13fc2e] MOV qword ptr [RDI + 0x2a8],RCX LEA RCX,[0x13f97c] MOV qword ptr [RDI + 0x2a0],RCX LEA RCX,[0x13fdd5] MOV qword ptr [RDI + 0x2d8],RCX BT EAX,0xa JC 0x00137a9c LEA RDX,[0x14a3ee] JMP 0x00137aa3 LAB_00137990: LEA RCX,[0x1395e0] MOV qword ptr [RDI + 0x298],RCX LEA RCX,[0x139acb] MOV qword ptr [RDI + 0x2b8],RCX TEST EAX,0x401 JNZ 0x001379c5 CMP byte ptr [RDI + 0x37e],0x0 JNZ 0x001379c5 LEA RCX,[0x14a3ee] JMP 0x001379cc LAB_001379c5: LEA RCX,[0x14a2e8] LAB_001379cc: MOV qword ptr [RDI + 0x2c8],RCX MOV qword ptr [RDI + 0x2d0],RCX TEST AX,AX JS 0x00137ab8 MOV ECX,0x2c8 XOR R8D,R8D JMP 0x00137ab4 LAB_001379f0: LEA RCX,[0x131ba8] MOV qword ptr [RDI + 0x298],RCX LEA RCX,[0x1323bf] MOV qword ptr [RDI + 0x2b8],RCX LEA RCX,[0x13060f] MOV qword ptr [RDI + 0x2b0],RCX LEA RCX,[0x131f95] MOV qword ptr [RDI + 0x2c0],RCX LEA RCX,[0x131eb0] MOV qword ptr [RDI + 0x2d8],RCX LEA RCX,[0x14a2e8] MOV qword ptr [RDI + 0x2c8],RCX MOV qword ptr [RDI + 0x2d0],RCX MOV ECX,dword ptr [RDI + 0x18c] ADD qword ptr [RDI + 0x148],RCX XOR ECX,ECX XOR ESI,ESI CMP dword ptr [RDI + 0x188],0x0 SETZ CL SETNZ SIL LEA RDX,[0x13057b] CMOVZ RDX,qword ptr [0x0042df90] LEA R8,[0x130472] CMOVZ R8,qword ptr [0x0042dfd0] SHL ESI,0x3 MOV R9D,0x2a0 OR RSI,R9 SHL ECX,0x3 OR RCX,R9 JMP 0x00137ab0 LAB_00137a9c: LEA RDX,[0x14a2e8] LAB_00137aa3: MOV ECX,0x2d0 MOV ESI,0x2c8 MOV R8,RDX LAB_00137ab0: MOV qword ptr [RDI + RSI*0x1],RDX LAB_00137ab4: MOV qword ptr [RDI + RCX*0x1],R8 LAB_00137ab8: LEA RCX,[0x12f9a8] MOV qword ptr [RDI + 0x2e0],RCX LEA RCX,[0x12fa82] MOV qword ptr [RDI + 0x2e8],RCX TEST AL,0x20 JNZ 0x00137ae3 MOV qword ptr [RDI + 0x2c8],0x0 LAB_00137ae3: POP RBP RET
void mi_setup_functions(long param_1) { ulong uVar1; ulong uVar2; code *pcVar3; ulong uVar4; code *pcVar5; bool bVar6; uVar1 = *(ulong *)(param_1 + 0x318); if ((uVar1 & 4) == 0) { if ((uVar1 & 1) == 0) { *(code **)(param_1 + 0x298) = _mi_read_static_record; *(code **)(param_1 + 0x2b8) = _mi_read_rnd_static_record; *(code **)(param_1 + 0x2b0) = _mi_delete_static_record; *(code **)(param_1 + 0x2c0) = _mi_cmp_static_record; *(code **)(param_1 + 0x2a8) = _mi_update_static_record; *(code **)(param_1 + 0x2a0) = _mi_write_static_record; *(code **)(param_1 + 0x2d8) = _mi_cmp_static_unique; if (((uint)uVar1 >> 10 & 1) == 0) { pcVar3 = mi_static_checksum; } else { pcVar3 = mi_checksum; } uVar2 = 0x2d0; uVar4 = 0x2c8; pcVar5 = pcVar3; } else { *(code **)(param_1 + 0x298) = _mi_read_dynamic_record; *(code **)(param_1 + 0x2b8) = _mi_read_rnd_dynamic_record; *(code **)(param_1 + 0x2b0) = _mi_delete_dynamic_record; *(code **)(param_1 + 0x2c0) = _mi_cmp_dynamic_record; *(code **)(param_1 + 0x2d8) = _mi_cmp_dynamic_unique; *(code **)(param_1 + 0x2c8) = mi_checksum; *(code **)(param_1 + 0x2d0) = mi_checksum; *(long *)(param_1 + 0x148) = *(long *)(param_1 + 0x148) + (ulong)*(uint *)(param_1 + 0x18c); bVar6 = *(int *)(param_1 + 0x188) == 0; pcVar3 = _mi_update_blob_record; if (bVar6) { pcVar3 = (code *)PTR__mi_write_dynamic_record_0042df90; } pcVar5 = _mi_write_blob_record; if (bVar6) { pcVar5 = (code *)PTR__mi_update_dynamic_record_0042dfd0; } uVar4 = (ulong)!bVar6 << 3 | 0x2a0; uVar2 = (ulong)bVar6 << 3 | 0x2a0; } *(code **)(param_1 + uVar4) = pcVar3; } else { *(code **)(param_1 + 0x298) = _mi_read_pack_record; *(code **)(param_1 + 0x2b8) = _mi_read_rnd_pack_record; if (((uVar1 & 0x401) == 0) && (*(char *)(param_1 + 0x37e) == '\0')) { pcVar5 = mi_static_checksum; } else { pcVar5 = mi_checksum; } *(code **)(param_1 + 0x2c8) = pcVar5; *(code **)(param_1 + 0x2d0) = pcVar5; if ((short)uVar1 < 0) goto LAB_00137ab8; uVar2 = 0x2c8; pcVar5 = (code *)0x0; } *(code **)(param_1 + uVar2) = pcVar5; LAB_00137ab8: *(code **)(param_1 + 0x2e0) = mi_nommap_pread; *(code **)(param_1 + 0x2e8) = mi_nommap_pwrite; if ((uVar1 & 0x20) == 0) { *(int8 *)(param_1 + 0x2c8) = 0; } return; }
40,191
ModbusTcpPort::isOpen() const
serhmarch[P]ModbusBridge/modbus/src/unix/ModbusTcpPort_unix.cpp
bool ModbusTcpPort::isOpen() const { ModbusTcpPortPrivateUnix *d = d_unix(d_ptr); if (d->socket->isInvalid()) return false; int error = 0; socklen_t error_len = sizeof(error); int r = d->socket->getsockopt(SOL_SOCKET, SO_ERROR, reinterpret_cast<char*>(&error), &error_len); if (r != 0) return false; return (error == 0); }
O0
cpp
ModbusTcpPort::isOpen() const: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi callq 0x228a0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x180(%rax), %rdi callq 0x228b0 testb $0x1, %al jne 0x21bc3 jmp 0x21bc9 movb $0x0, -0x1(%rbp) jmp 0x21c14 movl $0x0, -0x1c(%rbp) movl $0x4, -0x20(%rbp) movq -0x18(%rbp), %rax movq 0x180(%rax), %rdi movl $0x1, %esi movl $0x4, %edx leaq -0x1c(%rbp), %rcx leaq -0x20(%rbp), %r8 callq 0x22c30 movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) je 0x21c08 movb $0x0, -0x1(%rbp) jmp 0x21c14 cmpl $0x0, -0x1c(%rbp) sete %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nop
_ZNK13ModbusTcpPort6isOpenEv: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rdi, [rax+8]; ModbusPortPrivate * call _Z6d_unixP17ModbusPortPrivate; d_unix(ModbusPortPrivate *) mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rdi, [rax+180h]; this call _ZNK15ModbusTcpSocket9isInvalidEv; ModbusTcpSocket::isInvalid(void) test al, 1 jnz short loc_21BC3 jmp short loc_21BC9 loc_21BC3: mov [rbp+var_1], 0 jmp short loc_21C14 loc_21BC9: mov [rbp+var_1C], 0 mov [rbp+var_20], 4 mov rax, [rbp+var_18] mov rdi, [rax+180h]; this mov esi, 1; int mov edx, 4; int lea rcx, [rbp+var_1C]; void * lea r8, [rbp+var_20]; unsigned int * call _ZN15ModbusTcpSocket10getsockoptEiiPvPj; ModbusTcpSocket::getsockopt(int,int,void *,uint *) mov [rbp+var_24], eax cmp [rbp+var_24], 0 jz short loc_21C08 mov [rbp+var_1], 0 jmp short loc_21C14 loc_21C08: cmp [rbp+var_1C], 0 setz al and al, 1 mov [rbp+var_1], al loc_21C14: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
bool ModbusTcpPort::isOpen(ModbusPortPrivate **this) { unsigned int v2; // [rsp+10h] [rbp-20h] BYREF int v3; // [rsp+14h] [rbp-1Ch] BYREF long long v4; // [rsp+18h] [rbp-18h] ModbusPortPrivate **v5; // [rsp+20h] [rbp-10h] v5 = this; v4 = d_unix(this[1]); if ( (ModbusTcpSocket::isInvalid(*(ModbusTcpSocket **)(v4 + 384)) & 1) != 0 ) { return 0; } else { v3 = 0; v2 = 4; return !(unsigned int)ModbusTcpSocket::getsockopt(*(ModbusTcpSocket **)(v4 + 384), 1, 4, &v3, &v2) && v3 == 0; } }
isOpen: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001228a0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x180] CALL 0x001228b0 TEST AL,0x1 JNZ 0x00121bc3 JMP 0x00121bc9 LAB_00121bc3: MOV byte ptr [RBP + -0x1],0x0 JMP 0x00121c14 LAB_00121bc9: MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x20],0x4 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x180] MOV ESI,0x1 MOV EDX,0x4 LEA RCX,[RBP + -0x1c] LEA R8,[RBP + -0x20] CALL 0x00122c30 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JZ 0x00121c08 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00121c14 LAB_00121c08: CMP dword ptr [RBP + -0x1c],0x0 SETZ AL AND AL,0x1 MOV byte ptr [RBP + -0x1],AL LAB_00121c14: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x30 POP RBP RET
/* ModbusTcpPort::isOpen() const */ bool __thiscall ModbusTcpPort::isOpen(ModbusTcpPort *this) { int iVar1; ulong uVar2; uint local_28; int local_24; long local_20; ModbusTcpPort *local_18; bool local_9; local_18 = this; local_20 = d_unix(*(ModbusPortPrivate **)(this + 8)); uVar2 = ModbusTcpSocket::isInvalid(*(ModbusTcpSocket **)(local_20 + 0x180)); if ((uVar2 & 1) == 0) { local_24 = 0; local_28 = 4; iVar1 = ModbusTcpSocket::getsockopt (*(ModbusTcpSocket **)(local_20 + 0x180),1,4,&local_24,&local_28); if (iVar1 == 0) { local_9 = local_24 == 0; } else { local_9 = false; } } else { local_9 = false; } return local_9; }
40,192
uf_endspace_selected
eloqsql/storage/maria/ma_packrec.c
static void uf_endspace_selected(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill(end - spaces, spaces, ' '); } else decode_bytes(rec,bit_buff,to,end); }
O3
c
uf_endspace_selected: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rsi, %r15 movq %rdi, %r12 movl 0x4(%rsi), %eax testl %eax, %eax je 0x46134 movl (%r15), %r14d decl %eax movl %eax, 0x4(%r15) btl %eax, %r14d jb 0x46173 jmp 0x46152 movq %r15, %rdi movq %rdx, %r14 callq 0x45a88 movq %r14, %rdx movl $0x1f, 0x4(%r15) movl (%r15), %r14d testl %r14d, %r14d js 0x4616e movq %r12, %rdi movq %r15, %rsi movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x45c45 movl $0x1f, %eax movl 0x24(%r12), %r13d movl %eax, %ecx subl %r13d, %ecx jae 0x461c7 subl %eax, %r13d movl %eax, %eax leaq 0x9b1e5(%rip), %rcx # 0xe1370 andl (%rcx,%rax,4), %r14d movl %r13d, %ecx shll %cl, %r14d movq %r15, %rdi movq %r12, -0x30(%rbp) movq %rdx, %r12 callq 0x45a88 movq %r12, %rdx movq -0x30(%rbp), %r12 movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r15) movl (%r15), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %r14d jmp 0x461de movl %ecx, 0x4(%r15) shrl %cl, %r14d movl 0x24(%r12), %eax leaq 0x9b196(%rip), %rcx # 0xe1370 andl (%rcx,%rax,4), %r14d movl %r14d, %r13d leaq (%rdx,%r13), %rax cmpq %rbx, %rax jbe 0x46201 movl $0x1, 0x28(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, %r14 negq %r14 cmpq %rbx, %rax je 0x4621b leaq (%rbx,%r14), %rcx movq %r12, %rdi movq %r15, %rsi callq 0x45c45 addq %r14, %rbx movq %rbx, %rdi movl $0x20, %esi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x292b0
uf_endspace_selected: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r15, rsi mov r12, rdi mov eax, [rsi+4] test eax, eax jz short loc_46134 mov r14d, [r15] dec eax mov [r15+4], eax bt r14d, eax jb short loc_46173 jmp short loc_46152 loc_46134: mov rdi, r15 mov r14, rdx call fill_buffer mov rdx, r14 mov dword ptr [r15+4], 1Fh mov r14d, [r15] test r14d, r14d js short loc_4616E loc_46152: mov rdi, r12 mov rsi, r15 mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes loc_4616E: mov eax, 1Fh loc_46173: mov r13d, [r12+24h] mov ecx, eax sub ecx, r13d jnb short loc_461C7 sub r13d, eax mov eax, eax lea rcx, mask and r14d, [rcx+rax*4] mov ecx, r13d shl r14d, cl mov rdi, r15 mov [rbp+var_30], r12 mov r12, rdx call fill_buffer mov rdx, r12 mov r12, [rbp+var_30] mov eax, 20h ; ' ' sub eax, r13d mov [r15+4], eax mov eax, [r15] neg r13d mov ecx, r13d shr eax, cl add r14d, eax jmp short loc_461DE loc_461C7: mov [r15+4], ecx shr r14d, cl mov eax, [r12+24h] lea rcx, mask and r14d, [rcx+rax*4] loc_461DE: mov r13d, r14d lea rax, [rdx+r13] cmp rax, rbx jbe short loc_46201 mov dword ptr [r15+28h], 1 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_46201: mov r14, r13 neg r14 cmp rax, rbx jz short loc_4621B lea rcx, [rbx+r14] mov rdi, r12 mov rsi, r15 call decode_bytes loc_4621B: add rbx, r14 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r13 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset
_BYTE * uf_endspace_selected(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4) { long long v5; // r12 unsigned int v6; // eax unsigned int v7; // r14d unsigned int v8; // eax _BYTE *v9; // r14 _BYTE *result; // rax unsigned int v11; // r13d unsigned int v12; // ecx int v13; // r13d int v14; // r14d _BYTE *v15; // r12 unsigned int v16; // r14d v5 = a1; v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( !_bittest((const int *)&v7, v8) ) return decode_bytes(a1, (long long)a2, a3, a4); } else { v9 = a3; fill_buffer((long long)a2); a3 = v9; a2[1] = 31; v7 = *a2; if ( (*a2 & 0x80000000) == 0 ) return decode_bytes(a1, (long long)a2, a3, a4); v8 = 31; } v11 = *(_DWORD *)(a1 + 36); v12 = v8 - v11; if ( v8 >= v11 ) { a2[1] = v12; v16 = mask[*(unsigned int *)(a1 + 36)] & (v7 >> v12); } else { v13 = v11 - v8; v14 = (mask[v8] & v7) << v13; v15 = a3; fill_buffer((long long)a2); a3 = v15; v5 = a1; a2[1] = 32 - v13; v16 = (*a2 >> -(char)v13) + v14; } result = &a3[v16]; if ( result <= a4 ) { if ( result != a4 ) decode_bytes(v5, (long long)a2, a3, &a4[-v16]); return (_BYTE *)memset(&a4[-v16], 32LL, v16); } else { a2[10] = 1; } return result; }
uf_endspace_selected: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R15,RSI MOV R12,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x00146134 MOV R14D,dword ptr [R15] DEC EAX MOV dword ptr [R15 + 0x4],EAX BT R14D,EAX JC 0x00146173 JMP 0x00146152 LAB_00146134: MOV RDI,R15 MOV R14,RDX CALL 0x00145a88 MOV RDX,R14 MOV dword ptr [R15 + 0x4],0x1f MOV R14D,dword ptr [R15] TEST R14D,R14D JS 0x0014616e LAB_00146152: MOV RDI,R12 MOV RSI,R15 MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00145c45 LAB_0014616e: MOV EAX,0x1f LAB_00146173: MOV R13D,dword ptr [R12 + 0x24] MOV ECX,EAX SUB ECX,R13D JNC 0x001461c7 SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x1e1370] AND R14D,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL R14D,CL MOV RDI,R15 MOV qword ptr [RBP + -0x30],R12 MOV R12,RDX CALL 0x00145a88 MOV RDX,R12 MOV R12,qword ptr [RBP + -0x30] MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R15 + 0x4],EAX MOV EAX,dword ptr [R15] NEG R13D MOV ECX,R13D SHR EAX,CL ADD R14D,EAX JMP 0x001461de LAB_001461c7: MOV dword ptr [R15 + 0x4],ECX SHR R14D,CL MOV EAX,dword ptr [R12 + 0x24] LEA RCX,[0x1e1370] AND R14D,dword ptr [RCX + RAX*0x4] LAB_001461de: MOV R13D,R14D LEA RAX,[RDX + R13*0x1] CMP RAX,RBX JBE 0x00146201 MOV dword ptr [R15 + 0x28],0x1 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00146201: MOV R14,R13 NEG R14 CMP RAX,RBX JZ 0x0014621b LEA RCX,[RBX + R14*0x1] MOV RDI,R12 MOV RSI,R15 CALL 0x00145c45 LAB_0014621b: ADD RBX,R14 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R13 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001292b0
void uf_endspace_selected(long param_1,uint *param_2,long param_3,ulong param_4) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; ulong __n; uint uVar5; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar5 = *param_2; if ((int)uVar5 < 0) { uVar3 = 0x1f; goto LAB_00146173; } } else { uVar5 = *param_2; uVar3 = param_2[1] - 1; param_2[1] = uVar3; if ((uVar5 >> (uVar3 & 0x1f) & 1) != 0) { LAB_00146173: uVar1 = *(uint *)(param_1 + 0x24); if (uVar3 < uVar1) { uVar2 = (&mask)[uVar3]; bVar4 = (byte)(uVar1 - uVar3); fill_buffer(param_2); param_2[1] = 0x20 - (uVar1 - uVar3); uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f)); } else { param_2[1] = uVar3 - uVar1; uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x24)]; } __n = (ulong)uVar5; if (param_3 + __n <= param_4) { if (param_3 + __n != param_4) { decode_bytes(param_1,param_2,param_3,param_4 + -__n); } memset((void *)(param_4 + -__n),0x20,__n); return; } param_2[10] = 1; return; } } decode_bytes(param_1,param_2,param_3,param_4); return; }
40,193
ftxui::borderDouble(std::shared_ptr<ftxui::Node>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/dom/border.cpp
Element borderDouble(Element child) { return std::make_shared<Border>(unpack(std::move(child)), DOUBLE); }
O1
cpp
ftxui::borderDouble(std::shared_ptr<ftxui::Node>): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %rbx movq (%rsi), %rcx leaq 0x18(%rsp), %rax movq %rcx, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq 0x8(%rsi), %rdx movq %rcx, 0x8(%rsi) movq %rdx, 0x8(%rax) movq %rcx, (%rsi) movq %rsp, %rdi movq %rax, %rsi callq 0x22c33 movl $0x80, %edi callq 0xb3e0 movq %rax, %r14 movabsq $0x100000001, %rax # imm = 0x100000001 movq %rax, 0x8(%r14) leaq 0x36753(%rip), %rax # 0x580a0 movq %rax, (%r14) movq %r14, %r15 addq $0x10, %r15 movq (%rsp), %rax leaq 0x28(%rsp), %rsi movq %rax, (%rsi) movups 0x8(%rsp), %xmm0 movups %xmm0, 0x8(%rsi) xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq %r15, %rdi movl $0x3, %edx xorl %ecx, %ecx callq 0x21dd2 leaq 0x28(%rsp), %rdi callq 0x151c0 movq %r15, (%rbx) movq %r14, 0x8(%rbx) movq %rsp, %rdi callq 0x151c0 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x219b3 callq 0x14c7c movq %rbx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x151c0 movl $0x80, %esi movq %r14, %rdi callq 0xb400 jmp 0x219df movq %rax, %rbx movq %rsp, %rdi callq 0x151c0 jmp 0x219ec movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x219fb callq 0x14c7c movq %rbx, %rdi callq 0xb780
_ZN5ftxui12borderDoubleESt10shared_ptrINS_4NodeEE: push r15 push r14 push rbx sub rsp, 40h mov rbx, rdi mov rcx, [rsi] lea rax, [rsp+58h+var_40] mov [rax], rcx xor ecx, ecx mov [rax+8], rcx mov rdx, [rsi+8] mov [rsi+8], rcx mov [rax+8], rdx mov [rsi], rcx mov rdi, rsp mov rsi, rax call _ZN5ftxui6unpackIJSt10shared_ptrINS_4NodeEEEEESt6vectorIS3_SaIS3_EEDpT_; ftxui::unpack<std::shared_ptr<ftxui::Node>>(std::shared_ptr<ftxui::Node>) mov edi, 80h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rax, 100000001h mov [r14+8], rax lea rax, off_580A0 mov [r14], rax mov r15, r14 add r15, 10h mov rax, qword ptr [rsp+58h+var_58] lea rsi, [rsp+58h+var_30] mov [rsi], rax movups xmm0, [rsp+58h+var_58+8] movups xmmword ptr [rsi+8], xmm0 xorps xmm0, xmm0 movaps [rsp+58h+var_58], xmm0 mov [rsp+58h+var_48], 0 mov rdi, r15 mov edx, 3 xor ecx, ecx call _ZN5ftxui12_GLOBAL__N_16BorderC2ESt6vectorISt10shared_ptrINS_4NodeEESaIS5_EENS_11BorderStyleESt8optionalINS_5ColorEE; ftxui::`anonymous namespace'::Border::Border(std::vector<std::shared_ptr<ftxui::Node>>,ftxui::BorderStyle,std::optional<ftxui::Color>) lea rdi, [rsp+58h+var_30] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov [rbx], r15 mov [rbx+8], r14 mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, [rsp+58h+var_38] test rdi, rdi jz short loc_219B3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_219B3: mov rax, rbx add rsp, 40h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_20] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov esi, 80h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_219DF mov rbx, rax loc_219DF: mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() jmp short loc_219EC mov rbx, rax loc_219EC: mov rdi, [rsp+arg_18] test rdi, rdi jz short loc_219FB call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_219FB: mov rdi, rbx call __Unwind_Resume
_QWORD * ftxui::borderDouble(_QWORD *a1, long long *a2, long long a3, long long a4, int a5, int a6) { volatile signed __int32 *v6; // rdx _QWORD *v7; // r14 int v8; // r8d int v9; // r9d void *v11; // [rsp+0h] [rbp-58h] BYREF __int128 v12; // [rsp+8h] [rbp-50h] long long v13; // [rsp+18h] [rbp-40h] BYREF volatile signed __int32 *v14; // [rsp+20h] [rbp-38h] void *v15; // [rsp+28h] [rbp-30h] BYREF __int128 v16; // [rsp+30h] [rbp-28h] v13 = *a2; v14 = 0LL; v6 = (volatile signed __int32 *)a2[1]; a2[1] = 0LL; v14 = v6; *a2 = 0LL; ftxui::unpack<std::shared_ptr<ftxui::Node>>( (unsigned int)&v11, (unsigned int)&v13, (_DWORD)v6, 0, a5, a6, (_DWORD)v11, v12); v7 = (_QWORD *)operator new(0x80uLL); v7[1] = 0x100000001LL; *v7 = off_580A0; v15 = v11; v16 = v12; ftxui::`anonymous namespace'::Border::Border((_DWORD)v7 + 16, (unsigned int)&v15, 3, 0, v8, v9, 0LL, 0LL, 0LL); std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v15); *a1 = v7 + 2; a1[1] = v7; std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v11); if ( v14 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v14); return a1; }
borderDouble: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV RBX,RDI MOV RCX,qword ptr [RSI] LEA RAX,[RSP + 0x18] MOV qword ptr [RAX],RCX XOR ECX,ECX MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSI + 0x8] MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RSI],RCX LAB_00121920: MOV RDI,RSP MOV RSI,RAX CALL 0x00122c33 LAB_0012192b: MOV EDI,0x80 CALL 0x0010b3e0 MOV R14,RAX MOV RAX,0x100000001 MOV qword ptr [R14 + 0x8],RAX LEA RAX,[0x1580a0] MOV qword ptr [R14],RAX MOV R15,R14 ADD R15,0x10 MOV RAX,qword ptr [RSP] LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x8] MOVUPS xmmword ptr [RSI + 0x8],XMM0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_0012197c: MOV RDI,R15 MOV EDX,0x3 XOR ECX,ECX CALL 0x00121dd2 LAB_0012198b: LEA RDI,[RSP + 0x28] CALL 0x001151c0 MOV qword ptr [RBX],R15 MOV qword ptr [RBX + 0x8],R14 MOV RDI,RSP CALL 0x001151c0 MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x001219b3 CALL 0x00114c7c LAB_001219b3: MOV RAX,RBX ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* ftxui::borderDouble(std::shared_ptr<ftxui::Node>) */ ftxui * __thiscall ftxui::borderDouble(ftxui *this,int8 *param_2) { int8 *puVar1; int8 local_58; int8 uStack_50; int8 uStack_48; int8 local_40; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; int8 local_30; int8 local_28; int8 uStack_20; local_40 = *param_2; local_38 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1]; param_2[1] = 0; *param_2 = 0; /* try { // try from 00121920 to 0012192a has its CatchHandler @ 001219e9 */ unpack<std::shared_ptr<ftxui::Node>>((ftxui *)&local_58,&local_40); /* try { // try from 0012192b to 00121934 has its CatchHandler @ 001219dc */ puVar1 = (int8 *)operator_new(0x80); puVar1[1] = 0x100000001; *puVar1 = &PTR___Sp_counted_ptr_inplace_001580a0; local_30 = local_58; local_28 = uStack_50; uStack_20 = uStack_48; local_58 = 0; uStack_50 = 0; uStack_48 = 0; /* try { // try from 0012197c to 0012198a has its CatchHandler @ 001219c0 */ (anonymous_namespace)::Border::Border((Border *)(puVar1 + 2),&local_30,3,0); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_30); *(Border **)this = (Border *)(puVar1 + 2); *(int8 **)(this + 8) = puVar1; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_58); if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38); } return this; }
40,194
coro::thread_pool::schedule()
AlayaLite/build_O3/_deps/libcoro-src/src/thread_pool.cpp
auto thread_pool::schedule() -> operation { m_size.fetch_add(1, std::memory_order::release); if (!m_shutdown_requested.load(std::memory_order::acquire)) { return operation{*this}; } else { m_size.fetch_sub(1, std::memory_order::release); throw std::runtime_error("coro::thread_pool is shutting down, unable to schedule new tasks."); } }
O3
cpp
coro::thread_pool::schedule(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rsi lock incq 0x120(%rdi) movb 0x128(%rdi), %al testb $0x1, %al jne 0x3d1e leaq 0x8(%rsp), %rbx movq %rbx, %rdi callq 0x3850 movq (%rbx), %rax movq 0x8(%rbx), %rdx addq $0x18, %rsp popq %rbx popq %r14 retq lock decq 0x120(%rsi) movl $0x10, %edi callq 0x20b0 movq %rax, %rbx leaq 0x13fe(%rip), %rsi # 0x5138 movq %rax, %rdi callq 0x2080 movq 0x52a7(%rip), %rsi # 0x8ff0 movq 0x5258(%rip), %rdx # 0x8fa8 movq %rbx, %rdi callq 0x2240 movq %rax, %r14 movq %rbx, %rdi callq 0x2100 movq %r14, %rdi callq 0x2250 nop
_ZN4coro11thread_pool8scheduleEv: push r14 push rbx sub rsp, 18h mov rsi, rdi lock inc qword ptr [rdi+120h] mov al, [rdi+128h] test al, 1 jnz short loc_3D1E lea rbx, [rsp+28h+var_20] mov rdi, rbx call _ZN4coro11thread_pool9operationC2ERS0_; coro::thread_pool::operation::operation(coro::thread_pool&) mov rax, [rbx] mov rdx, [rbx+8] add rsp, 18h pop rbx pop r14 retn loc_3D1E: lock dec qword ptr [rsi+120h] mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aCoroThreadPool; "coro::thread_pool is shutting down, una"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
long long coro::thread_pool::schedule(coro::thread_pool *this) { std::runtime_error *exception; // rbx _QWORD v3[4]; // [rsp+8h] [rbp-20h] BYREF _InterlockedIncrement64((volatile signed long long *)this + 36); if ( (*((_BYTE *)this + 296) & 1) != 0 ) { _InterlockedDecrement64((volatile signed long long *)this + 36); exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "coro::thread_pool is shutting down, unable to schedule new tasks."); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } coro::thread_pool::operation::operation((coro::thread_pool::operation *)v3, this); return v3[0]; }
schedule: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RSI,RDI INC.LOCK qword ptr [RDI + 0x120] MOV AL,byte ptr [RDI + 0x128] TEST AL,0x1 JNZ 0x00103d1e LEA RBX,[RSP + 0x8] MOV RDI,RBX CALL 0x00103850 MOV RAX,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] ADD RSP,0x18 POP RBX POP R14 RET LAB_00103d1e: DEC.LOCK qword ptr [RSI + 0x120] MOV EDI,0x10 CALL 0x001020b0 MOV RBX,RAX LAB_00103d33: LEA RSI,[0x105138] MOV RDI,RAX CALL 0x00102080 LAB_00103d42: MOV RSI,qword ptr [0x00108ff0] MOV RDX,qword ptr [0x00108fa8] MOV RDI,RBX CALL 0x00102240
/* coro::thread_pool::schedule() */ int1 [16] __thiscall coro::thread_pool::schedule(thread_pool *this) { runtime_error *this_00; int1 auVar1 [16]; operation local_20 [16]; int1 auVar2 [15]; LOCK(); *(long *)(this + 0x120) = *(long *)(this + 0x120) + 1; UNLOCK(); if (((byte)this[0x128] & 1) == 0) { operation::operation(local_20,this); auVar1[0] = local_20[0]; auVar2[1] = local_20[1]; auVar2[2] = local_20[2]; auVar2[3] = local_20[3]; auVar2[4] = local_20[4]; auVar2[5] = local_20[5]; auVar2[6] = local_20[6]; auVar2[7] = local_20[7]; auVar1[8] = local_20[8]; auVar1[9] = local_20[9]; auVar1[10] = local_20[10]; auVar1[0xb] = local_20[0xb]; auVar1[0xc] = local_20[0xc]; auVar1[0xd] = local_20[0xd]; auVar1[0xe] = local_20[0xe]; auVar1[0xf] = local_20[0xf]; return auVar1; } LOCK(); *(long *)(this + 0x120) = *(long *)(this + 0x120) + -1; UNLOCK(); this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00103d33 to 00103d41 has its CatchHandler @ 00103d58 */ std::runtime_error::runtime_error (this_00,"coro::thread_pool is shutting down, unable to schedule new tasks."); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00108ff0,PTR__runtime_error_00108fa8); }
40,195
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
monkey531[P]llama/common/minja.hpp
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) { if (var_names.size() == 1) { Value name(var_names[0]); context->set(name, item); } else { if (!item.is_array() || item.size() != var_names.size()) { throw std::runtime_error("Mismatched number of variables and items in destructuring assignment"); } for (size_t i = 0; i < var_names.size(); ++i) { context->set(var_names[i], item.at(i)); } } }
O0
cpp
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x100(%rsp) movq %rsi, 0xf8(%rsp) movq %rdx, 0xf0(%rsp) movq 0x100(%rsp), %rdi callq 0x8c2f0 cmpq $0x1, %rax jne 0xf561c movq 0x100(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xf74f0 movq %rax, %rsi leaq 0xa0(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x1197e0 movq 0xf8(%rsp), %rdi callq 0x12b170 movq 0x30(%rsp), %rsi movq %rax, %rdi movq 0xf0(%rsp), %rdx movq (%rdi), %rax movq 0x28(%rax), %rax callq *%rax jmp 0xf55e4 leaq 0xa0(%rsp), %rdi callq 0x112070 jmp 0xf579f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) leaq 0xa0(%rsp), %rdi callq 0x112070 jmp 0xf57a7 movq 0xf0(%rsp), %rdi callq 0x1140e0 testb $0x1, %al jne 0xf562f jmp 0xf565b movq 0xf0(%rsp), %rdi callq 0x12adf0 movq %rax, 0x28(%rsp) movq 0x100(%rsp), %rdi callq 0x8c2f0 movq %rax, %rcx movq 0x28(%rsp), %rax cmpq %rcx, %rax je 0xf56b9 movl $0x10, %edi callq 0x5a6a0 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x20(%rsp) leaq 0x11bec8(%rip), %rsi # 0x21153f callq 0x5a480 jmp 0xf567e movq 0x20(%rsp), %rdi movq 0x1ac926(%rip), %rsi # 0x2a1fb0 movq 0x1ac8e7(%rip), %rdx # 0x2a1f78 callq 0x5ab00 movq 0x20(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) callq 0x5af70 jmp 0xf57a7 movq $0x0, 0x88(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x100(%rsp), %rdi callq 0x8c2f0 movq %rax, %rcx movq 0x18(%rsp), %rax cmpq %rcx, %rax jae 0xf579d movq 0xf8(%rsp), %rdi callq 0x12b170 movq %rax, 0x8(%rsp) movq 0x100(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0xf74f0 movq %rax, %rsi leaq 0x38(%rsp), %rdi callq 0x1197e0 movq 0xf0(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x12afa0 movq %rax, 0x10(%rsp) jmp 0xf5740 movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rdi movq (%rdi), %rax movq 0x28(%rax), %rax leaq 0x38(%rsp), %rsi callq *%rax jmp 0xf575a leaq 0x38(%rsp), %rdi callq 0x112070 movq 0x88(%rsp), %rax addq $0x1, %rax movq %rax, 0x88(%rsp) jmp 0xf56c5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) leaq 0x38(%rsp), %rdi callq 0x112070 jmp 0xf57a7 jmp 0xf579f addq $0x108, %rsp # imm = 0x108 retq movq 0x98(%rsp), %rdi callq 0x5abc0 nopw %cs:(%rax,%rax)
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE: sub rsp, 108h mov [rsp+108h+var_8], rdi mov [rsp+108h+var_10], rsi mov [rsp+108h+var_18], rdx mov rdi, [rsp+108h+var_8] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) cmp rax, 1 jnz loc_F561C mov rdi, [rsp+108h+var_8] xor eax, eax mov esi, eax call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+108h+var_68] mov [rsp+108h+var_D8], rdi call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+108h+var_10] call _ZNKSt19__shared_ptr_accessIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, [rsp+108h+var_D8] mov rdi, rax mov rdx, [rsp+108h+var_18] mov rax, [rdi] mov rax, [rax+28h] call rax jmp short $+2 loc_F55E4: lea rdi, [rsp+108h+var_68]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp loc_F579F mov rcx, rax mov eax, edx mov [rsp+108h+var_70], rcx mov [rsp+108h+var_74], eax lea rdi, [rsp+108h+var_68]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp loc_F57A7 loc_F561C: mov rdi, [rsp+108h+var_18]; this call _ZNK5minja5Value8is_arrayEv; minja::Value::is_array(void) test al, 1 jnz short loc_F562F jmp short loc_F565B loc_F562F: mov rdi, [rsp+108h+var_18]; this call _ZNK5minja5Value4sizeEv; minja::Value::size(void) mov [rsp+108h+var_E0], rax mov rdi, [rsp+108h+var_8] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov rcx, rax mov rax, [rsp+108h+var_E0] cmp rax, rcx jz short loc_F56B9 loc_F565B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+108h+var_E8], rax lea rsi, aMismatchedNumb; "Mismatched number of variables and item"... call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_F567E: mov rdi, [rsp+108h+var_E8]; void * mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+108h+var_E8]; void * mov rcx, rax mov eax, edx mov [rsp+108h+var_70], rcx mov [rsp+108h+var_74], eax call ___cxa_free_exception jmp loc_F57A7 loc_F56B9: mov [rsp+108h+var_80], 0 loc_F56C5: mov rax, [rsp+108h+var_80] mov [rsp+108h+var_F0], rax mov rdi, [rsp+108h+var_8] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov rcx, rax mov rax, [rsp+108h+var_F0] cmp rax, rcx jnb loc_F579D mov rdi, [rsp+108h+var_10] call _ZNKSt19__shared_ptr_accessIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov [rsp+108h+var_100], rax mov rdi, [rsp+108h+var_8] mov rsi, [rsp+108h+var_80] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+108h+var_D0] call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+108h+var_18]; this mov rsi, [rsp+108h+var_80]; unsigned __int64 call _ZN5minja5Value2atEm; minja::Value::at(ulong) mov [rsp+108h+var_F8], rax jmp short $+2 loc_F5740: mov rdx, [rsp+108h+var_F8] mov rdi, [rsp+108h+var_100] mov rax, [rdi] mov rax, [rax+28h] lea rsi, [rsp+108h+var_D0] call rax jmp short $+2 loc_F575A: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rax, [rsp+108h+var_80] add rax, 1 mov [rsp+108h+var_80], rax jmp loc_F56C5 mov rcx, rax mov eax, edx mov [rsp+108h+var_70], rcx mov [rsp+108h+var_74], eax lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_F57A7 loc_F579D: jmp short $+2 loc_F579F: add rsp, 108h retn loc_F57A7: mov rdi, [rsp+108h+var_70] call __Unwind_Resume
void minja::destructuring_assign(_QWORD *a1, long long a2, minja::Value *a3) { int v3; // eax int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rax int v9; // eax int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d long long v14; // [rsp+8h] [rbp-100h] long long v15; // [rsp+10h] [rbp-F8h] unsigned long long v16; // [rsp+18h] [rbp-F0h] std::runtime_error *exception; // [rsp+20h] [rbp-E8h] long long v18; // [rsp+28h] [rbp-E0h] _BYTE v19[80]; // [rsp+38h] [rbp-D0h] BYREF unsigned long long i; // [rsp+88h] [rbp-80h] _BYTE v21[80]; // [rsp+A0h] [rbp-68h] BYREF minja::Value *v22; // [rsp+F0h] [rbp-18h] long long v23; // [rsp+F8h] [rbp-10h] _QWORD *v24; // [rsp+100h] [rbp-8h] v24 = a1; v23 = a2; v22 = a3; if ( std::vector<std::string>::size(a1) == 1 ) { v3 = std::vector<std::string>::operator[](v24, 0LL); minja::Value::Value((unsigned int)v21, v3, v4, v5, v6, v7); v8 = std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v23); (*(void ( **)(long long, _BYTE *, minja::Value *))(*(_QWORD *)v8 + 40LL))(v8, v21, v22); minja::Value::~Value((minja::Value *)v21); } else { if ( (minja::Value::is_array(v22) & 1) == 0 || (v18 = minja::Value::size(v22), v18 != std::vector<std::string>::size(v24)) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error( exception, "Mismatched number of variables and items in destructuring assignment"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } for ( i = 0LL; ; ++i ) { v16 = i; if ( v16 >= std::vector<std::string>::size(v24) ) break; v14 = std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v23); v9 = std::vector<std::string>::operator[](v24, i); minja::Value::Value((unsigned int)v19, v9, v10, v11, v12, v13); v15 = minja::Value::at(v22, i); (*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v14 + 40LL))(v14, v19, v15); minja::Value::~Value((minja::Value *)v19); } } }
destructuring_assign: SUB RSP,0x108 MOV qword ptr [RSP + 0x100],RDI MOV qword ptr [RSP + 0xf8],RSI MOV qword ptr [RSP + 0xf0],RDX MOV RDI,qword ptr [RSP + 0x100] CALL 0x0018c2f0 CMP RAX,0x1 JNZ 0x001f561c MOV RDI,qword ptr [RSP + 0x100] XOR EAX,EAX MOV ESI,EAX CALL 0x001f74f0 MOV RSI,RAX LEA RDI,[RSP + 0xa0] MOV qword ptr [RSP + 0x30],RDI CALL 0x002197e0 MOV RDI,qword ptr [RSP + 0xf8] CALL 0x0022b170 MOV RSI,qword ptr [RSP + 0x30] MOV RDI,RAX MOV RDX,qword ptr [RSP + 0xf0] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x28] LAB_001f55e0: CALL RAX LAB_001f55e2: JMP 0x001f55e4 LAB_001f55e4: LEA RDI,[RSP + 0xa0] CALL 0x00212070 JMP 0x001f579f LAB_001f561c: MOV RDI,qword ptr [RSP + 0xf0] CALL 0x002140e0 TEST AL,0x1 JNZ 0x001f562f JMP 0x001f565b LAB_001f562f: MOV RDI,qword ptr [RSP + 0xf0] CALL 0x0022adf0 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x100] CALL 0x0018c2f0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x28] CMP RAX,RCX JZ 0x001f56b9 LAB_001f565b: MOV EDI,0x10 CALL 0x0015a6a0 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x20],RAX LAB_001f5670: LEA RSI,[0x31153f] CALL 0x0015a480 LAB_001f567c: JMP 0x001f567e LAB_001f567e: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [0x003a1fb0] MOV RDX,qword ptr [0x003a1f78] CALL 0x0015ab00 LAB_001f56b9: MOV qword ptr [RSP + 0x88],0x0 LAB_001f56c5: MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x100] CALL 0x0018c2f0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] CMP RAX,RCX JNC 0x001f579d MOV RDI,qword ptr [RSP + 0xf8] CALL 0x0022b170 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x88] CALL 0x001f74f0 MOV RSI,RAX LEA RDI,[RSP + 0x38] CALL 0x002197e0 MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0x88] LAB_001f5734: CALL 0x0022afa0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001f5740 LAB_001f5740: MOV RDX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x28] LEA RSI,[RSP + 0x38] CALL RAX LAB_001f5758: JMP 0x001f575a LAB_001f575a: LEA RDI,[RSP + 0x38] CALL 0x00212070 MOV RAX,qword ptr [RSP + 0x88] ADD RAX,0x1 MOV qword ptr [RSP + 0x88],RAX JMP 0x001f56c5 LAB_001f579d: JMP 0x001f579f LAB_001f579f: ADD RSP,0x108 RET
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */ void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3) { long lVar1; string *psVar2; long *plVar3; ulong uVar4; long lVar5; runtime_error *this; ulong uVar6; int8 uVar7; Value local_d0 [80]; ulong local_80; Value local_68 [80]; Value *local_18; shared_ptr *local_10; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_8; local_18 = param_3; local_10 = param_2; local_8 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1; lVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1); if (lVar1 == 1) { psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] (local_8,0); Value::Value(local_68,psVar2); plVar3 = (long *)std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false> *)local_10); /* try { // try from 001f55e0 to 001f55e1 has its CatchHandler @ 001f55f6 */ (**(code **)(*plVar3 + 0x28))(plVar3,local_68,local_18); Value::~Value(local_68); return; } uVar4 = Value::is_array(local_18); if ((uVar4 & 1) != 0) { lVar1 = Value::size(local_18); lVar5 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_8); if (lVar1 == lVar5) { for (local_80 = 0; uVar4 = local_80, uVar6 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size (local_8), uVar4 < uVar6; local_80 = local_80 + 1) { plVar3 = (long *)std:: __shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false> *)local_10); psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] (local_8,local_80); Value::Value(local_d0,psVar2); /* try { // try from 001f5734 to 001f5757 has its CatchHandler @ 001f577d */ uVar7 = Value::at(local_18,local_80); (**(code **)(*plVar3 + 0x28))(plVar3,local_d0,uVar7); Value::~Value(local_d0); } return; } } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001f5670 to 001f567b has its CatchHandler @ 001f5696 */ std::runtime_error::runtime_error (this,"Mismatched number of variables and items in destructuring assignment"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_003a1fb0,PTR__runtime_error_003a1f78); }
40,196
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
monkey531[P]llama/common/minja.hpp
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) { if (var_names.size() == 1) { Value name(var_names[0]); context->set(name, item); } else { if (!item.is_array() || item.size() != var_names.size()) { throw std::runtime_error("Mismatched number of variables and items in destructuring assignment"); } for (size_t i = 0; i < var_names.size(); ++i) { context->set(var_names[i], item.at(i)); } } }
O2
cpp
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %rbx movq %rsi, %rbp movq (%rdi), %rsi movq 0x8(%rdi), %rax subq %rsi, %rax cmpq $0x20, %rax jne 0x57a0e leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x65820 movq (%rbp), %rdi movq (%rdi), %rax movq %r15, %rsi movq %rbx, %rdx callq *0x28(%rax) leaq 0x8(%rsp), %rdi callq 0x62842 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq $0x0, 0x10(%rbx) je 0x57a9e movq %rdi, %r15 movq %rbx, %rdi callq 0x6a7ce movq (%r15), %rsi movq 0x8(%r15), %rcx movq %rcx, %rdx subq %rsi, %rdx sarq $0x5, %rdx cmpq %rdx, %rax jne 0x57a9e movq %rbx, (%rsp) xorl %r14d, %r14d leaq 0x8(%rsp), %r12 xorl %r13d, %r13d subq %rsi, %rcx sarq $0x5, %rcx cmpq %rcx, %r13 jae 0x579ff movq %rbp, %rbx movq (%rbp), %rbp addq %r14, %rsi movq %r12, %rdi callq 0x65820 movq (%rsp), %rdi movq %r13, %rsi callq 0x6a8d6 movq (%rbp), %rcx movq %rbp, %rdi movq %r12, %rsi movq %rax, %rdx callq *0x28(%rcx) movq %r12, %rdi callq 0x62842 incq %r13 movq (%r15), %rsi movq 0x8(%r15), %rcx addq $0x20, %r14 movq %rbx, %rbp jmp 0x57a49 pushq $0x10 popq %rdi callq 0x23460 movq %rax, %r14 leaq 0x5c098(%rip), %rsi # 0xb3b48 movq %rax, %rdi callq 0x23320 movq 0xa4531(%rip), %rsi # 0xfbff0 movq 0xa4492(%rip), %rdx # 0xfbf58 movq %r14, %rdi callq 0x23f20 movq %rax, %rbx movq %r14, %rdi callq 0x236b0 jmp 0x57aea jmp 0x57add movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x62842 movq %rbx, %rdi callq 0x23fa0
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdx mov rbp, rsi mov rsi, [rdi] mov rax, [rdi+8] sub rax, rsi cmp rax, 20h ; ' ' jnz short loc_57A0E lea r15, [rsp+88h+var_80] mov rdi, r15 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rbp+0] mov rax, [rdi] mov rsi, r15 mov rdx, rbx call qword ptr [rax+28h] lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_579FF: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_57A0E: cmp qword ptr [rbx+10h], 0 jz loc_57A9E mov r15, rdi mov rdi, rbx; this call _ZNK5minja5Value4sizeEv; minja::Value::size(void) mov rsi, [r15] mov rcx, [r15+8] mov rdx, rcx sub rdx, rsi sar rdx, 5 cmp rax, rdx jnz short loc_57A9E mov [rsp+88h+var_88], rbx xor r14d, r14d lea r12, [rsp+88h+var_80] xor r13d, r13d loc_57A49: sub rcx, rsi sar rcx, 5 cmp r13, rcx jnb short loc_579FF mov rbx, rbp mov rbp, [rbp+0] add rsi, r14 mov rdi, r12 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+88h+var_88]; this mov rsi, r13; unsigned __int64 call _ZN5minja5Value2atEm; minja::Value::at(ulong) mov rcx, [rbp+0] mov rdi, rbp mov rsi, r12 mov rdx, rax call qword ptr [rcx+28h] mov rdi, r12; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() inc r13 mov rsi, [r15] mov rcx, [r15+8] add r14, 20h ; ' ' mov rbp, rbx jmp short loc_57A49 loc_57A9E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aMismatchedNumb; "Mismatched number of variables and item"... 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, r14; void * call ___cxa_throw mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_57AEA jmp short $+2 loc_57ADD: mov rbx, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_57AEA: mov rdi, rbx call __Unwind_Resume
void minja::destructuring_assign(_QWORD *a1, _QWORD *a2, minja::Value *a3) { _QWORD *v4; // rbp long long v5; // rax long long v6; // rsi long long v7; // rcx long long v8; // r14 unsigned long long v9; // r13 _QWORD *v10; // rbx long long v11; // rbp long long v12; // rax std::runtime_error *exception; // r14 minja::Value *v14; // [rsp+0h] [rbp-88h] _BYTE v15[128]; // [rsp+8h] [rbp-80h] BYREF v4 = a2; if ( a1[1] - *a1 == 32LL ) { minja::Value::Value(v15, *a1); (*(void ( **)(_QWORD, _BYTE *, minja::Value *))(*(_QWORD *)*a2 + 40LL))(*a2, v15, a3); minja::Value::~Value((minja::Value *)v15); } else { if ( !*((_QWORD *)a3 + 2) || (v5 = minja::Value::size(a3), v6 = *a1, v7 = a1[1], v5 != (v7 - *a1) >> 5) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error( exception, "Mismatched number of variables and items in destructuring assignment"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v14 = a3; v8 = 0LL; v9 = 0LL; while ( v9 < (v7 - v6) >> 5 ) { v10 = v4; v11 = *v4; minja::Value::Value(v15, v8 + v6); v12 = minja::Value::at(v14, v9); (*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v11 + 40LL))(v11, v15, v12); minja::Value::~Value((minja::Value *)v15); ++v9; v6 = *a1; v7 = a1[1]; v8 += 32LL; v4 = v10; } } }
destructuring_assign: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDX MOV RBP,RSI MOV RSI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,RSI CMP RAX,0x20 JNZ 0x00157a0e LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00165820 MOV RDI,qword ptr [RBP] MOV RAX,qword ptr [RDI] LAB_001579ec: MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX + 0x28] LAB_001579f5: LEA RDI,[RSP + 0x8] CALL 0x00162842 LAB_001579ff: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00157a0e: CMP qword ptr [RBX + 0x10],0x0 JZ 0x00157a9e MOV R15,RDI MOV RDI,RBX CALL 0x0016a7ce MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,RCX SUB RDX,RSI SAR RDX,0x5 CMP RAX,RDX JNZ 0x00157a9e MOV qword ptr [RSP],RBX XOR R14D,R14D LEA R12,[RSP + 0x8] XOR R13D,R13D LAB_00157a49: SUB RCX,RSI SAR RCX,0x5 CMP R13,RCX JNC 0x001579ff MOV RBX,RBP MOV RBP,qword ptr [RBP] ADD RSI,R14 MOV RDI,R12 CALL 0x00165820 LAB_00157a67: MOV RDI,qword ptr [RSP] MOV RSI,R13 CALL 0x0016a8d6 MOV RCX,qword ptr [RBP] MOV RDI,RBP MOV RSI,R12 MOV RDX,RAX CALL qword ptr [RCX + 0x28] LAB_00157a83: MOV RDI,R12 CALL 0x00162842 INC R13 MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] ADD R14,0x20 MOV RBP,RBX JMP 0x00157a49 LAB_00157a9e: PUSH 0x10 POP RDI CALL 0x00123460 MOV R14,RAX LAB_00157aa9: LEA RSI,[0x1b3b48] MOV RDI,RAX CALL 0x00123320 LAB_00157ab8: MOV RSI,qword ptr [0x001fbff0] MOV RDX,qword ptr [0x001fbf58] MOV RDI,R14 CALL 0x00123f20
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */ void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3) { long *plVar1; long lVar2; int8 uVar3; runtime_error *this; long lVar4; long lVar5; ulong uVar6; Value local_80 [80]; if (*(long *)(param_1 + 8) - (long)*(string **)param_1 == 0x20) { Value::Value(local_80,*(string **)param_1); /* try { // try from 001579ec to 001579f4 has its CatchHandler @ 00157adb */ (**(code **)(**(long **)param_2 + 0x28))(*(long **)param_2,local_80,param_3); Value::~Value(local_80); return; } if (*(long *)(param_3 + 0x10) != 0) { lVar2 = Value::size(param_3); lVar5 = *(long *)param_1; lVar4 = *(long *)(param_1 + 8); if (lVar2 == lVar4 - lVar5 >> 5) { lVar2 = 0; for (uVar6 = 0; uVar6 < (ulong)(lVar4 - lVar5 >> 5); uVar6 = uVar6 + 1) { plVar1 = *(long **)param_2; Value::Value(local_80,(string *)(lVar5 + lVar2)); /* try { // try from 00157a67 to 00157a82 has its CatchHandler @ 00157add */ uVar3 = Value::at(param_3,uVar6); (**(code **)(*plVar1 + 0x28))(plVar1,local_80,uVar3); Value::~Value(local_80); lVar5 = *(long *)param_1; lVar4 = *(long *)(param_1 + 8); lVar2 = lVar2 + 0x20; } return; } } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00157aa9 to 00157ab7 has its CatchHandler @ 00157ace */ std::runtime_error::runtime_error (this,"Mismatched number of variables and items in destructuring assignment"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fbff0,PTR__runtime_error_001fbf58); }
40,197
my_mutex_init
eloqsql/mysys/thr_mutex.c
void my_mutex_init() { /* Initialize mutex attributes */ #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP /* Set mutex type to "fast" a.k.a "adaptive" In this case the thread may steal the mutex from some other thread that is waiting for the same mutex. This will save us some context switches but may cause a thread to 'starve forever' while waiting for the mutex (not likely if the code within the mutex is short). */ pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, PTHREAD_MUTEX_ADAPTIVE_NP); #endif #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP /* Set mutex type to "errorcheck" */ pthread_mutexattr_init(&my_errorcheck_mutexattr); pthread_mutexattr_settype(&my_errorcheck_mutexattr, PTHREAD_MUTEX_ERRORCHECK); #endif #if defined(SAFE_MUTEX_DEFINED) safe_mutex_global_init(); #endif }
O3
c
my_mutex_init: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0x35370b(%rip), %rbx # 0x3b3a10 movq %rbx, %rdi callq 0x28060 movq %rbx, %rdi movl $0x3, %esi callq 0x285e0 leaq 0x3536f3(%rip), %rbx # 0x3b3a14 movq %rbx, %rdi callq 0x28060 movq %rbx, %rdi movl $0x2, %esi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x285e0
my_mutex_init: push rbp mov rbp, rsp push rbx push rax lea rbx, my_fast_mutexattr mov rdi, rbx call _pthread_mutexattr_init mov rdi, rbx mov esi, 3 call _pthread_mutexattr_settype lea rbx, my_errorcheck_mutexattr mov rdi, rbx call _pthread_mutexattr_init mov rdi, rbx mov esi, 2 add rsp, 8 pop rbx pop rbp jmp _pthread_mutexattr_settype
long long my_mutex_init() { pthread_mutexattr_init(&my_fast_mutexattr); pthread_mutexattr_settype(&my_fast_mutexattr, 3LL); pthread_mutexattr_init(&my_errorcheck_mutexattr); return pthread_mutexattr_settype(&my_errorcheck_mutexattr, 2LL); }
my_mutex_init: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0x4b3a10] MOV RDI,RBX CALL 0x00128060 MOV RDI,RBX MOV ESI,0x3 CALL 0x001285e0 LEA RBX,[0x4b3a14] MOV RDI,RBX CALL 0x00128060 MOV RDI,RBX MOV ESI,0x2 ADD RSP,0x8 POP RBX POP RBP JMP 0x001285e0
void my_mutex_init(void) { pthread_mutexattr_init((pthread_mutexattr_t *)&my_fast_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_fast_mutexattr,3); pthread_mutexattr_init((pthread_mutexattr_t *)&my_errorcheck_mutexattr); pthread_mutexattr_settype((pthread_mutexattr_t *)&my_errorcheck_mutexattr,2); return; }
40,198
my_get_err_msg
eloqsql/mysys/my_error.c
const char *my_get_err_msg(uint nr) { const char *format; struct my_err_head *meh_p; /* Search for the range this error is in. */ for (meh_p= my_errmsgs_list; meh_p; meh_p= meh_p->meh_next) if (nr <= meh_p->meh_last) break; /* If we found the range this error number is in, get the format string. If the string is empty, or a NULL pointer, or if we're out of return, we return NULL. */ if (!(format= (meh_p && (nr >= meh_p->meh_first)) ? meh_p->get_errmsgs(nr)[nr - meh_p->meh_first] : NULL) || !*format) return NULL; return format; }
O0
c
my_get_err_msg: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0xc(%rbp) movq 0x1d07c6(%rip), %rax # 0x2c19c8 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0xf122a movl -0xc(%rbp), %eax movq -0x20(%rbp), %rcx cmpl 0x14(%rcx), %eax ja 0xf121b jmp 0xf122a jmp 0xf121d movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0xf1206 cmpq $0x0, -0x20(%rbp) je 0xf1260 movl -0xc(%rbp), %eax movq -0x20(%rbp), %rcx cmpl 0x10(%rcx), %eax jb 0xf1260 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movl -0xc(%rbp), %edi callq *%rax movl -0xc(%rbp), %ecx movq -0x20(%rbp), %rdx subl 0x10(%rdx), %ecx movl %ecx, %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) jmp 0xf1268 xorl %eax, %eax movq %rax, -0x28(%rbp) jmp 0xf1268 movq -0x28(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax je 0xf127f movq -0x18(%rbp), %rax cmpb $0x0, (%rax) jne 0xf1289 movq $0x0, -0x8(%rbp) jmp 0xf1291 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_get_err_msg: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_C], edi mov rax, cs:my_errmsgs_list mov [rbp+var_20], rax loc_F1206: cmp [rbp+var_20], 0 jz short loc_F122A mov eax, [rbp+var_C] mov rcx, [rbp+var_20] cmp eax, [rcx+14h] ja short loc_F121B jmp short loc_F122A loc_F121B: jmp short $+2 loc_F121D: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_20], rax jmp short loc_F1206 loc_F122A: cmp [rbp+var_20], 0 jz short loc_F1260 mov eax, [rbp+var_C] mov rcx, [rbp+var_20] cmp eax, [rcx+10h] jb short loc_F1260 mov rax, [rbp+var_20] mov rax, [rax+8] mov edi, [rbp+var_C] call rax mov ecx, [rbp+var_C] mov rdx, [rbp+var_20] sub ecx, [rdx+10h] mov ecx, ecx mov rax, [rax+rcx*8] mov [rbp+var_28], rax jmp short loc_F1268 loc_F1260: xor eax, eax mov [rbp+var_28], rax jmp short $+2 loc_F1268: mov rax, [rbp+var_28] mov [rbp+var_18], rax cmp rax, 0 jz short loc_F127F mov rax, [rbp+var_18] cmp byte ptr [rax], 0 jnz short loc_F1289 loc_F127F: mov [rbp+var_8], 0 jmp short loc_F1291 loc_F1289: mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_F1291: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
_BYTE * my_get_err_msg(unsigned int a1) { _BYTE *v2; // [rsp+8h] [rbp-28h] long long *i; // [rsp+10h] [rbp-20h] for ( i = my_errmsgs_list; i && a1 > *((_DWORD *)i + 5); i = (long long *)*i ) ; if ( i && a1 >= *((_DWORD *)i + 4) ) v2 = *(_BYTE **)(((long long ( *)(_QWORD))i[1])(a1) + 8LL * (a1 - *((_DWORD *)i + 4))); else v2 = 0LL; if ( v2 && *v2 ) return v2; else return 0LL; }
my_get_err_msg: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0xc],EDI MOV RAX,qword ptr [0x003c19c8] MOV qword ptr [RBP + -0x20],RAX LAB_001f1206: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001f122a MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x20] CMP EAX,dword ptr [RCX + 0x14] JA 0x001f121b JMP 0x001f122a LAB_001f121b: JMP 0x001f121d LAB_001f121d: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x001f1206 LAB_001f122a: CMP qword ptr [RBP + -0x20],0x0 JZ 0x001f1260 MOV EAX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x20] CMP EAX,dword ptr [RCX + 0x10] JC 0x001f1260 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV EDI,dword ptr [RBP + -0xc] CALL RAX MOV ECX,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x20] SUB ECX,dword ptr [RDX + 0x10] MOV ECX,ECX MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x28],RAX JMP 0x001f1268 LAB_001f1260: XOR EAX,EAX MOV qword ptr [RBP + -0x28],RAX JMP 0x001f1268 LAB_001f1268: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JZ 0x001f127f MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX],0x0 JNZ 0x001f1289 LAB_001f127f: MOV qword ptr [RBP + -0x8],0x0 JMP 0x001f1291 LAB_001f1289: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_001f1291: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
char * my_get_err_msg(uint param_1) { long lVar1; char *local_30; int8 *local_28; char *local_10; for (local_28 = (int8 *)my_errmsgs_list; (local_28 != (int8 *)0x0 && (*(uint *)((long)local_28 + 0x14) < param_1)); local_28 = (int8 *)*local_28) { } if ((local_28 == (int8 *)0x0) || (param_1 < *(uint *)(local_28 + 2))) { local_30 = (char *)0x0; } else { lVar1 = (*(code *)local_28[1])(param_1); local_30 = *(char **)(lVar1 + (ulong)(param_1 - *(int *)(local_28 + 2)) * 8); } if ((local_30 == (char *)0x0) || (*local_30 == '\0')) { local_10 = (char *)0x0; } else { local_10 = local_30; } return local_10; }
40,199
uf_endspace
eloqsql/storage/myisam/mi_packrec.c
static void uf_endspace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); }
O0
c
uf_endspace: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xe093b movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x21466d(%rip), %rcx # 0x2f4fa0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0xe094e movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xde080 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0xe0970 movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0xe09c3 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0xe09a3 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d xorl %eax, %eax subq %r8, %rax addq %rax, %rcx callq 0xdffe0 movq -0x20(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2f0 addq $0x30, %rsp popq %rbp retq nopl (%rax)
uf_endspace_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_E093B mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_E094E loc_E093B: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_28], eax loc_E094E: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_E0970 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_E09C3 loc_E0970: mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_E09A3 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov r8d, eax xor eax, eax sub rax, r8 add rcx, rax call decode_bytes_0 loc_E09A3: mov rdi, [rbp+var_20] mov eax, [rbp+var_24] mov ecx, eax xor eax, eax sub rax, rcx add rdi, rax mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset loc_E09C3: add rsp, 30h pop rbp retn
long long uf_endspace_0(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4) { unsigned int v4; // eax int v5; // ecx long long result; // rax unsigned int bits_0; // [rsp+8h] [rbp-28h] if ( a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v4 = *a2; v5 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v5; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v4 >> v5); } if ( &a3[bits_0] <= a4 ) { if ( &a3[bits_0] != a4 ) decode_bytes_0(a1, (long long)a2, a3, &a4[-bits_0]); return memset(&a4[-bits_0], 32LL, bits_0); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_endspace: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001e093b MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3f4fa0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001e094e LAB_001e093b: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001de080 MOV dword ptr [RBP + -0x28],EAX LAB_001e094e: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x001e0970 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001e09c3 LAB_001e0970: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001e09a3 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX XOR EAX,EAX SUB RAX,R8 ADD RCX,RAX CALL 0x001dffe0 LAB_001e09a3: MOV RDI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RDI,RAX MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2f0 LAB_001e09c3: ADD RSP,0x30 POP RBP RET
void uf_endspace(long param_1,uint *param_2,long param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } if (param_4 < param_3 + (ulong)local_30) { param_2[10] = 1; } else { if (param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,param_3,param_4 - local_30); } memset((void *)(param_4 - local_30),0x20,(ulong)local_30); } return; }