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
28,500
mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long)
eloqsql/mysys/crc32/crc32c.cc
static uint32_t crc32c_slow(uint32_t crc, const char* buf, size_t size) { const uint8_t *p = reinterpret_cast<const uint8_t *>(buf); const uint8_t *e = p + size; uint64_t l = crc ^ 0xffffffffu; // Point x at first 16-byte aligned byte in string. This might be // just past the end of the string. const uintptr_t pval = reinterpret_cast<uintptr_t>(p); const uint8_t* x = reinterpret_cast<const uint8_t*>(ALIGN(pval, 4)); if (x <= e) // Process bytes until finished or p is 16-byte aligned while (p != x) STEP1; // Process bytes 16 at a time while ((e-p) >= 16) { Slow_CRC32(&l, &p); Slow_CRC32(&l, &p); } // Process bytes 8 at a time while ((e-p) >= 8) Slow_CRC32(&l, &p); // Process the last few bytes while (p != e) STEP1; return static_cast<uint32_t>(l ^ 0xffffffffu); }
O3
cpp
mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx movl %edi, %eax addq %rsi, %rdx notl %eax leaq 0xf(%rsi), %rdi andq $-0x10, %rdi cmpq %rdi, %rdx setb %r8b movq %rdi, %rcx subq %rsi, %rcx sete %r9b orb %r8b, %r9b je 0xc91c3 movq %rsi, %rdi jmp 0xc91ee leaq 0x3d286(%rip), %r8 # 0x106450 movq %rsi, %r9 movzbl %al, %r10d movzbl (%r9), %r11d incq %r9 xorl %r10d, %r11d movl (%r8,%r11,4), %r10d shrq $0x8, %rax xorq %r10, %rax cmpq %rdi, %r9 jne 0xc91cd addq %rcx, %rsi movq %rdx, %rcx subq %rdi, %rcx cmpq $0x10, %rcx jl 0xc92fe movq %rdx, %rcx subq %rsi, %rcx movl $0xff, %edi leaq 0x3d640(%rip), %r8 # 0x106850 leaq 0x3da39(%rip), %r9 # 0x106c50 movl $0x3fc, %r10d # imm = 0x3FC leaq 0x3de2c(%rip), %r11 # 0x107050 leaq 0x3d225(%rip), %rbx # 0x106450 xorl (%rsi), %eax movl %eax, %r15d andl %edi, %r15d movl %eax, %r14d shrl $0x8, %r14d andl %edi, %r14d movl (%r9,%r14,4), %r14d xorl (%r8,%r15,4), %r14d movl %eax, %r15d shrl $0xe, %r15d andl %r10d, %r15d xorl (%r15,%r11), %r14d shrl $0x18, %eax xorl (%rbx,%rax,4), %r14d xorl 0x4(%rsi), %r14d movl %r14d, %r15d andl %edi, %r15d movl %r14d, %eax shrl $0x8, %eax andl %edi, %eax movl (%r9,%rax,4), %eax xorl (%r8,%r15,4), %eax movl %r14d, %r15d shrl $0xe, %r15d andl %r10d, %r15d xorl (%r15,%r11), %eax shrl $0x18, %r14d xorl (%rbx,%r14,4), %eax xorl 0x8(%rsi), %eax movl %eax, %r15d andl %edi, %r15d movl %eax, %r14d shrl $0x8, %r14d andl %edi, %r14d movl (%r9,%r14,4), %r14d xorl (%r8,%r15,4), %r14d movl %eax, %r15d shrl $0xe, %r15d andl %r10d, %r15d xorl (%r15,%r11), %r14d shrl $0x18, %eax xorl (%rbx,%rax,4), %r14d xorl 0xc(%rsi), %r14d addq $0x10, %rsi movl %r14d, %r15d andl %edi, %r15d movl %r14d, %eax shrl $0x8, %eax andl %edi, %eax movl (%r9,%rax,4), %eax xorl (%r8,%r15,4), %eax movl %r14d, %r15d shrl $0xe, %r15d andl %r10d, %r15d xorl (%r15,%r11), %eax shrl $0x18, %r14d xorl (%rbx,%r14,4), %eax addq $-0x10, %rcx cmpq $0xf, %rcx jg 0xc922b movl %eax, %eax cmpq $0x8, %rcx jl 0xc93a4 movq %rdx, %rcx subq %rsi, %rcx movl $0xff, %edi leaq 0x3d536(%rip), %r8 # 0x106850 leaq 0x3d92f(%rip), %r9 # 0x106c50 movl $0x3fc, %r10d # imm = 0x3FC leaq 0x3dd22(%rip), %r11 # 0x107050 leaq 0x3d11b(%rip), %rbx # 0x106450 xorl (%rsi), %eax movl %eax, %r15d andl %edi, %r15d movl %eax, %r14d shrl $0x8, %r14d andl %edi, %r14d movl (%r9,%r14,4), %r14d xorl (%r8,%r15,4), %r14d movl %eax, %r15d shrl $0xe, %r15d andl %r10d, %r15d xorl (%r15,%r11), %r14d shrl $0x18, %eax xorl (%rbx,%rax,4), %r14d xorl 0x4(%rsi), %r14d addq $0x8, %rsi movl %r14d, %r15d andl %edi, %r15d movl %r14d, %eax shrl $0x8, %eax andl %edi, %eax movl (%r9,%rax,4), %eax xorl (%r8,%r15,4), %eax movl %r14d, %r15d shrl $0xe, %r15d andl %r10d, %r15d xorl (%r15,%r11), %eax shrl $0x18, %r14d xorl (%rbx,%r14,4), %eax addq $-0x8, %rcx cmpq $0x7, %rcx jg 0xc9335 movl %eax, %eax cmpq %rdx, %rsi je 0xc93cd leaq 0x3d0a0(%rip), %rcx # 0x106450 movzbl %al, %edi movzbl (%rsi), %r8d incq %rsi xorl %edi, %r8d movl (%rcx,%r8,4), %edi shrq $0x8, %rax xorq %rdi, %rax cmpq %rdx, %rsi jne 0xc93b0 notl %eax popq %rbx popq %r14 popq %r15 popq %rbp retq nop
_ZN15mysys_namespace6crc32cL11crc32c_slowEjPKcm: push rbp mov rbp, rsp push r15 push r14 push rbx mov eax, edi add rdx, rsi not eax lea rdi, [rsi+0Fh] and rdi, 0FFFFFFFFFFFFFFF0h cmp rdx, rdi setb r8b mov rcx, rdi sub rcx, rsi setz r9b or r9b, r8b jz short loc_C91C3 mov rdi, rsi jmp short loc_C91EE loc_C91C3: lea r8, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_ mov r9, rsi loc_C91CD: movzx r10d, al movzx r11d, byte ptr [r9] inc r9 xor r11d, r10d mov r10d, [r8+r11*4] shr rax, 8 xor rax, r10 cmp r9, rdi jnz short loc_C91CD add rsi, rcx loc_C91EE: mov rcx, rdx sub rcx, rdi cmp rcx, 10h jl loc_C92FE mov rcx, rdx sub rcx, rsi mov edi, 0FFh lea r8, _ZN15mysys_namespace6crc32cL7table3_E; mysys_namespace::crc32c::table3_ lea r9, _ZN15mysys_namespace6crc32cL7table2_E; mysys_namespace::crc32c::table2_ mov r10d, 3FCh lea r11, _ZN15mysys_namespace6crc32cL7table1_E; mysys_namespace::crc32c::table1_ lea rbx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_ loc_C922B: xor eax, [rsi] mov r15d, eax and r15d, edi mov r14d, eax shr r14d, 8 and r14d, edi mov r14d, [r9+r14*4] xor r14d, [r8+r15*4] mov r15d, eax shr r15d, 0Eh and r15d, r10d xor r14d, [r15+r11] shr eax, 18h xor r14d, [rbx+rax*4] xor r14d, [rsi+4] mov r15d, r14d and r15d, edi mov eax, r14d shr eax, 8 and eax, edi mov eax, [r9+rax*4] xor eax, [r8+r15*4] mov r15d, r14d shr r15d, 0Eh and r15d, r10d xor eax, [r15+r11] shr r14d, 18h xor eax, [rbx+r14*4] xor eax, [rsi+8] mov r15d, eax and r15d, edi mov r14d, eax shr r14d, 8 and r14d, edi mov r14d, [r9+r14*4] xor r14d, [r8+r15*4] mov r15d, eax shr r15d, 0Eh and r15d, r10d xor r14d, [r15+r11] shr eax, 18h xor r14d, [rbx+rax*4] xor r14d, [rsi+0Ch] add rsi, 10h mov r15d, r14d and r15d, edi mov eax, r14d shr eax, 8 and eax, edi mov eax, [r9+rax*4] xor eax, [r8+r15*4] mov r15d, r14d shr r15d, 0Eh and r15d, r10d xor eax, [r15+r11] shr r14d, 18h xor eax, [rbx+r14*4] add rcx, 0FFFFFFFFFFFFFFF0h cmp rcx, 0Fh jg loc_C922B mov eax, eax loc_C92FE: cmp rcx, 8 jl loc_C93A4 mov rcx, rdx sub rcx, rsi mov edi, 0FFh lea r8, _ZN15mysys_namespace6crc32cL7table3_E; mysys_namespace::crc32c::table3_ lea r9, _ZN15mysys_namespace6crc32cL7table2_E; mysys_namespace::crc32c::table2_ mov r10d, 3FCh lea r11, _ZN15mysys_namespace6crc32cL7table1_E; mysys_namespace::crc32c::table1_ lea rbx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_ loc_C9335: xor eax, [rsi] mov r15d, eax and r15d, edi mov r14d, eax shr r14d, 8 and r14d, edi mov r14d, [r9+r14*4] xor r14d, [r8+r15*4] mov r15d, eax shr r15d, 0Eh and r15d, r10d xor r14d, [r15+r11] shr eax, 18h xor r14d, [rbx+rax*4] xor r14d, [rsi+4] add rsi, 8 mov r15d, r14d and r15d, edi mov eax, r14d shr eax, 8 and eax, edi mov eax, [r9+rax*4] xor eax, [r8+r15*4] mov r15d, r14d shr r15d, 0Eh and r15d, r10d xor eax, [r15+r11] shr r14d, 18h xor eax, [rbx+r14*4] add rcx, 0FFFFFFFFFFFFFFF8h cmp rcx, 7 jg short loc_C9335 mov eax, eax loc_C93A4: cmp rsi, rdx jz short loc_C93CD lea rcx, _ZN15mysys_namespace6crc32cL7table0_E; mysys_namespace::crc32c::table0_ loc_C93B0: movzx edi, al movzx r8d, byte ptr [rsi] inc rsi xor r8d, edi mov edi, [rcx+r8*4] shr rax, 8 xor rax, rdi cmp rsi, rdx jnz short loc_C93B0 loc_C93CD: not eax pop rbx pop r14 pop r15 pop rbp retn
long long mysys_namespace::crc32c::crc32c_slow( mysys_namespace::crc32c *this, unsigned long long a2, const char *a3) { const char *v3; // rdx unsigned long long v4; // rax unsigned long long v5; // rdi unsigned __int8 *v6; // r9 int v7; // r11d long long v8; // rcx unsigned int v9; // r14d unsigned int v10; // eax unsigned int v11; // r14d long long v12; // rcx unsigned int v13; // r14d int v14; // r8d v3 = &a3[a2]; v4 = (unsigned int)~(_DWORD)this; v5 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL; if ( (unsigned long long)v3 < v5 || v5 == a2 ) { v5 = a2; } else { v6 = (unsigned __int8 *)a2; do { v7 = *v6++; v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v7] ^ (v4 >> 8); } while ( v6 != (unsigned __int8 *)v5 ); a2 = (a2 + 15) & 0xFFFFFFFFFFFFFFF0LL; } v8 = (long long)&v3[-v5]; if ( (long long)&v3[-v5] >= 16 ) { v8 = (long long)&v3[-a2]; do { v9 = *(_DWORD *)(a2 + 4) ^ mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)]; v10 = *(_DWORD *)(a2 + 8) ^ mysys_namespace::crc32c::table0_[HIBYTE(v9)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v9 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)(a2 + 4) ^ LOBYTE(mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24]) ^ mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ LOBYTE(mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)]) ^ LOBYTE(mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)]))] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)(a2 + 4) ^ LOWORD(mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24]) ^ *(_WORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ LOWORD(mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)]) ^ LOWORD(mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)])) >> 8)]; v11 = *(_DWORD *)(a2 + 12) ^ mysys_namespace::crc32c::table0_[HIBYTE(v10)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v10 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v10] ^ mysys_namespace::crc32c::table2_[BYTE1(v10)]; a2 += 16LL; LODWORD(v4) = mysys_namespace::crc32c::table0_[HIBYTE(v11)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v11 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v11] ^ mysys_namespace::crc32c::table2_[BYTE1(v11)]; v8 -= 16LL; } while ( v8 > 15 ); v4 = (unsigned int)v4; } if ( v8 >= 8 ) { v12 = (long long)&v3[-a2]; do { v13 = *(_DWORD *)(a2 + 4) ^ mysys_namespace::crc32c::table0_[(*(_DWORD *)a2 ^ (unsigned int)v4) >> 24] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[((*(_DWORD *)a2 ^ (unsigned int)v4) >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)(*(_BYTE *)a2 ^ v4)] ^ mysys_namespace::crc32c::table2_[(unsigned __int8)((unsigned __int16)(*(_WORD *)a2 ^ v4) >> 8)]; a2 += 8LL; LODWORD(v4) = mysys_namespace::crc32c::table0_[HIBYTE(v13)] ^ *(_DWORD *)&mysys_namespace::crc32c::table1_[(v13 >> 14) & 0x3FC] ^ mysys_namespace::crc32c::table3_[(unsigned __int8)v13] ^ mysys_namespace::crc32c::table2_[BYTE1(v13)]; v12 -= 8LL; } while ( v12 > 7 ); v4 = (unsigned int)v4; } for ( ; (const char *)a2 != v3; v4 = mysys_namespace::crc32c::table0_[(unsigned __int8)v4 ^ v14] ^ (v4 >> 8) ) v14 = *(unsigned __int8 *)a2++; return (unsigned int)~(_DWORD)v4; }
crc32c_slow: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX MOV EAX,EDI ADD RDX,RSI NOT EAX LEA RDI,[RSI + 0xf] AND RDI,-0x10 CMP RDX,RDI SETC R8B MOV RCX,RDI SUB RCX,RSI SETZ R9B OR R9B,R8B JZ 0x001c91c3 MOV RDI,RSI JMP 0x001c91ee LAB_001c91c3: LEA R8,[0x206450] MOV R9,RSI LAB_001c91cd: MOVZX R10D,AL MOVZX R11D,byte ptr [R9] INC R9 XOR R11D,R10D MOV R10D,dword ptr [R8 + R11*0x4] SHR RAX,0x8 XOR RAX,R10 CMP R9,RDI JNZ 0x001c91cd ADD RSI,RCX LAB_001c91ee: MOV RCX,RDX SUB RCX,RDI CMP RCX,0x10 JL 0x001c92fe MOV RCX,RDX SUB RCX,RSI MOV EDI,0xff LEA R8,[0x206850] LEA R9,[0x206c50] MOV R10D,0x3fc LEA R11,[0x207050] LEA RBX,[0x206450] LAB_001c922b: XOR EAX,dword ptr [RSI] MOV R15D,EAX AND R15D,EDI MOV R14D,EAX SHR R14D,0x8 AND R14D,EDI MOV R14D,dword ptr [R9 + R14*0x4] XOR R14D,dword ptr [R8 + R15*0x4] MOV R15D,EAX SHR R15D,0xe AND R15D,R10D XOR R14D,dword ptr [R15 + R11*0x1] SHR EAX,0x18 XOR R14D,dword ptr [RBX + RAX*0x4] XOR R14D,dword ptr [RSI + 0x4] MOV R15D,R14D AND R15D,EDI MOV EAX,R14D SHR EAX,0x8 AND EAX,EDI MOV EAX,dword ptr [R9 + RAX*0x4] XOR EAX,dword ptr [R8 + R15*0x4] MOV R15D,R14D SHR R15D,0xe AND R15D,R10D XOR EAX,dword ptr [R15 + R11*0x1] SHR R14D,0x18 XOR EAX,dword ptr [RBX + R14*0x4] XOR EAX,dword ptr [RSI + 0x8] MOV R15D,EAX AND R15D,EDI MOV R14D,EAX SHR R14D,0x8 AND R14D,EDI MOV R14D,dword ptr [R9 + R14*0x4] XOR R14D,dword ptr [R8 + R15*0x4] MOV R15D,EAX SHR R15D,0xe AND R15D,R10D XOR R14D,dword ptr [R15 + R11*0x1] SHR EAX,0x18 XOR R14D,dword ptr [RBX + RAX*0x4] XOR R14D,dword ptr [RSI + 0xc] ADD RSI,0x10 MOV R15D,R14D AND R15D,EDI MOV EAX,R14D SHR EAX,0x8 AND EAX,EDI MOV EAX,dword ptr [R9 + RAX*0x4] XOR EAX,dword ptr [R8 + R15*0x4] MOV R15D,R14D SHR R15D,0xe AND R15D,R10D XOR EAX,dword ptr [R15 + R11*0x1] SHR R14D,0x18 XOR EAX,dword ptr [RBX + R14*0x4] ADD RCX,-0x10 CMP RCX,0xf JG 0x001c922b MOV EAX,EAX LAB_001c92fe: CMP RCX,0x8 JL 0x001c93a4 MOV RCX,RDX SUB RCX,RSI MOV EDI,0xff LEA R8,[0x206850] LEA R9,[0x206c50] MOV R10D,0x3fc LEA R11,[0x207050] LEA RBX,[0x206450] LAB_001c9335: XOR EAX,dword ptr [RSI] MOV R15D,EAX AND R15D,EDI MOV R14D,EAX SHR R14D,0x8 AND R14D,EDI MOV R14D,dword ptr [R9 + R14*0x4] XOR R14D,dword ptr [R8 + R15*0x4] MOV R15D,EAX SHR R15D,0xe AND R15D,R10D XOR R14D,dword ptr [R15 + R11*0x1] SHR EAX,0x18 XOR R14D,dword ptr [RBX + RAX*0x4] XOR R14D,dword ptr [RSI + 0x4] ADD RSI,0x8 MOV R15D,R14D AND R15D,EDI MOV EAX,R14D SHR EAX,0x8 AND EAX,EDI MOV EAX,dword ptr [R9 + RAX*0x4] XOR EAX,dword ptr [R8 + R15*0x4] MOV R15D,R14D SHR R15D,0xe AND R15D,R10D XOR EAX,dword ptr [R15 + R11*0x1] SHR R14D,0x18 XOR EAX,dword ptr [RBX + R14*0x4] ADD RCX,-0x8 CMP RCX,0x7 JG 0x001c9335 MOV EAX,EAX LAB_001c93a4: CMP RSI,RDX JZ 0x001c93cd LEA RCX,[0x206450] LAB_001c93b0: MOVZX EDI,AL MOVZX R8D,byte ptr [RSI] INC RSI XOR R8D,EDI MOV EDI,dword ptr [RCX + R8*0x4] SHR RAX,0x8 XOR RAX,RDI CMP RSI,RDX JNZ 0x001c93b0 LAB_001c93cd: NOT EAX POP RBX POP R14 POP R15 POP RBP RET
/* mysys_namespace::crc32c::crc32c_slow(unsigned int, char const*, unsigned long) */ uint __thiscall mysys_namespace::crc32c::crc32c_slow(crc32c *this,uint param_1,char *param_2,ulong param_3) { uint uVar1; ulong uVar2; long lVar3; uint *puVar4; int4 in_register_00000034; uint *puVar5; uint *puVar6; uint *puVar7; uint *puVar8; puVar5 = (uint *)CONCAT44(in_register_00000034,param_1); puVar4 = (uint *)(param_2 + (long)puVar5); uVar2 = (ulong)~(uint)this; puVar6 = (uint *)((ulong)((long)puVar5 + 0xfU) & 0xfffffffffffffff0); puVar7 = puVar5; if ((long)puVar6 - (long)puVar5 != 0 && puVar6 <= puVar4) { do { puVar8 = (uint *)((long)puVar7 + 1); uVar2 = uVar2 >> 8 ^ (ulong)*(uint *)(table0_ + (ulong)((uint)(byte)*puVar7 ^ (uint)uVar2 & 0xff) * 4); puVar7 = puVar8; } while (puVar8 != puVar6); puVar5 = (uint *)((long)puVar5 + ((long)puVar6 - (long)puVar5)); puVar7 = puVar6; } lVar3 = (long)puVar4 - (long)puVar7; if (0xf < lVar3) { lVar3 = (long)puVar4 - (long)puVar5; do { uVar1 = (uint)uVar2 ^ *puVar5; uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^ *(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^ *(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^ *(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[1]; uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^ *(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^ *(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^ *(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[2]; uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^ *(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^ *(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^ *(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[3]; puVar5 = puVar5 + 4; uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^ *(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^ *(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^ *(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4); uVar2 = (ulong)uVar1; lVar3 = lVar3 + -0x10; } while (0xf < lVar3); uVar2 = (ulong)uVar1; } if (7 < lVar3) { lVar3 = (long)puVar4 - (long)puVar5; do { uVar1 = (uint)uVar2 ^ *puVar5; uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^ *(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^ *(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^ *(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4) ^ puVar5[1]; puVar5 = puVar5 + 2; uVar1 = *(uint *)(table2_ + (ulong)(uVar1 >> 8 & 0xff) * 4) ^ *(uint *)(table3_ + (ulong)(uVar1 & 0xff) * 4) ^ *(uint *)(table1_ + (uVar1 >> 0xe & 0x3fc)) ^ *(uint *)(table0_ + (ulong)(uVar1 >> 0x18) * 4); uVar2 = (ulong)uVar1; lVar3 = lVar3 + -8; } while (7 < lVar3); uVar2 = (ulong)uVar1; } for (; puVar5 != puVar4; puVar5 = (uint *)((long)puVar5 + 1)) { uVar2 = uVar2 >> 8 ^ (ulong)*(uint *)(table0_ + (ulong)((uint)(byte)*puVar5 ^ (uint)uVar2 & 0xff) * 4); } return ~(uint)uVar2; }
28,501
get_1d_sincos_pos_embed_from_grid_new(int, std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>> const&)
monkey531[P]llama/examples/llava/clip.cpp
static std::vector<std::vector<std::vector<float>>> get_1d_sincos_pos_embed_from_grid_new(int embed_dim, const std::vector<std::vector<float>> & pos) { assert(embed_dim % 2 == 0); int H = pos.size(); int W = pos[0].size(); std::vector<float> omega(embed_dim / 2); for (int i = 0; i < embed_dim / 2; ++i) { omega[i] = 1.0 / pow(10000.0, static_cast<float>(i) / (embed_dim / 2)); } std::vector<std::vector<std::vector<float>>> emb(H, std::vector<std::vector<float>>(W, std::vector<float>(embed_dim))); for (int h = 0; h < H; ++h) { for (int w = 0; w < W; ++w) { for (int d = 0; d < embed_dim / 2; ++d) { float out_value = pos[h][w] * omega[d]; emb[h][w][d] = sin(out_value); emb[h][w][d + embed_dim / 2] = cos(out_value); } } } return emb; }
O0
cpp
get_1d_sincos_pos_embed_from_grid_new(int, std::vector<std::vector<float, std::allocator<float>>, std::allocator<std::vector<float, std::allocator<float>>>> const&): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x68(%rsp) movq %rdi, %rax movq %rax, 0x70(%rsp) movq %rdi, 0x120(%rsp) movl %esi, 0x11c(%rsp) movq %rdx, 0x110(%rsp) movq 0x110(%rsp), %rdi callq 0xad4a0 movl %eax, 0x10c(%rsp) movq 0x110(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xadfc0 movq %rax, %rdi callq 0x73140 movl %eax, 0x108(%rsp) movl 0x11c(%rsp), %eax movl %eax, %ecx shrl $0x1f, %ecx addl %ecx, %eax sarl %eax cltq movq %rax, 0x78(%rsp) leaq 0xef(%rsp), %rdi movq %rdi, 0x80(%rsp) callq 0xa69b0 movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx leaq 0xf0(%rsp), %rdi callq 0xa69c0 jmp 0xa54d7 leaq 0xef(%rsp), %rdi callq 0x72570 movl $0x0, 0xd8(%rsp) movl 0xd8(%rsp), %eax movl %eax, 0x64(%rsp) movl 0x11c(%rsp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, %ecx movl 0x64(%rsp), %eax cmpl %ecx, %eax jge 0xa55dd cvtsi2ssl 0xd8(%rsp), %xmm1 movl 0x11c(%rsp), %eax movl %eax, %ecx shrl $0x1f, %ecx addl %ecx, %eax sarl %eax cvtsi2ss %eax, %xmm0 divss %xmm0, %xmm1 movsd 0x1a95f0(%rip), %xmm0 # 0x24eb30 callq 0xadfe0 movsd %xmm0, 0x58(%rsp) jmp 0xa554d movsd 0x58(%rsp), %xmm1 movsd 0x1a959d(%rip), %xmm0 # 0x24eaf8 divsd %xmm1, %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, 0x54(%rsp) movslq 0xd8(%rsp), %rsi leaq 0xf0(%rsp), %rdi callq 0x73120 movss 0x54(%rsp), %xmm0 movss %xmm0, (%rax) movl 0xd8(%rsp), %eax addl $0x1, %eax movl %eax, 0xd8(%rsp) jmp 0xa54ef movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) leaq 0xef(%rsp), %rdi callq 0x72570 jmp 0xa5997 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) jmp 0xa598a movb $0x0, 0xd7(%rsp) movslq 0x10c(%rsp), %rax movq %rax, 0x30(%rsp) movslq 0x108(%rsp), %rax movq %rax, 0x38(%rsp) movslq 0x11c(%rsp), %rax movq %rax, 0x40(%rsp) leaq 0x9f(%rsp), %rdi movq %rdi, 0x48(%rsp) callq 0xa69b0 movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx leaq 0xa0(%rsp), %rdi callq 0xa69c0 jmp 0xa5637 leaq 0x9e(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0xac8b0 movq 0x38(%rsp), %rsi movq 0x28(%rsp), %rcx leaq 0xb8(%rsp), %rdi leaq 0xa0(%rsp), %rdx callq 0xac8c0 jmp 0xa566a leaq 0x9d(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0xaca50 movq 0x68(%rsp), %rdi movq 0x30(%rsp), %rsi movq 0x20(%rsp), %rcx leaq 0xb8(%rsp), %rdx callq 0xadf40 jmp 0xa569a leaq 0x9d(%rsp), %rdi callq 0xacaf0 leaq 0xb8(%rsp), %rdi callq 0xa6950 leaq 0x9e(%rsp), %rdi callq 0xac940 leaq 0xa0(%rsp), %rdi callq 0x723a0 leaq 0x9f(%rsp), %rdi callq 0x72570 movl $0x0, 0x98(%rsp) movl 0x98(%rsp), %eax cmpl 0x10c(%rsp), %eax jge 0xa5954 movl $0x0, 0x94(%rsp) movl 0x94(%rsp), %eax cmpl 0x108(%rsp), %eax jge 0xa593c movl $0x0, 0x90(%rsp) movl 0x90(%rsp), %eax movl %eax, 0x1c(%rsp) movl 0x11c(%rsp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, %ecx movl 0x1c(%rsp), %eax cmpl %ecx, %eax jge 0xa5924 movq 0x110(%rsp), %rdi movslq 0x98(%rsp), %rsi callq 0xadfc0 movq %rax, %rdi movslq 0x94(%rsp), %rsi callq 0xae010 movss (%rax), %xmm0 movss %xmm0, 0x14(%rsp) movslq 0x90(%rsp), %rsi leaq 0xf0(%rsp), %rdi callq 0x73120 movss 0x14(%rsp), %xmm0 movss (%rax), %xmm1 mulss %xmm1, %xmm0 movss %xmm0, 0x8c(%rsp) movss 0x8c(%rsp), %xmm0 callq 0xae030 movss %xmm0, 0x18(%rsp) jmp 0xa57bd movq 0x68(%rsp), %rdi movslq 0x98(%rsp), %rsi callq 0xacb00 movq %rax, %rdi movslq 0x94(%rsp), %rsi callq 0xa6930 movq %rax, %rdi movslq 0x90(%rsp), %rsi callq 0x73120 movss 0x18(%rsp), %xmm0 movss %xmm0, (%rax) movss 0x8c(%rsp), %xmm0 callq 0xae050 movss %xmm0, 0x10(%rsp) jmp 0xa580f movq 0x68(%rsp), %rdi movslq 0x98(%rsp), %rsi callq 0xacb00 movq %rax, %rdi movslq 0x94(%rsp), %rsi callq 0xa6930 movq %rax, %rdi movl 0x90(%rsp), %eax movl %eax, 0xc(%rsp) movl 0x11c(%rsp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, %ecx movl 0xc(%rsp), %eax addl %ecx, %eax movslq %eax, %rsi callq 0x73120 movss 0x10(%rsp), %xmm0 movss %xmm0, (%rax) movl 0x90(%rsp), %eax addl $0x1, %eax movl %eax, 0x90(%rsp) jmp 0xa5724 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) jmp 0xa58f2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) jmp 0xa58d8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) leaq 0x9d(%rsp), %rdi callq 0xacaf0 leaq 0xb8(%rsp), %rdi callq 0xa6950 leaq 0x9e(%rsp), %rdi callq 0xac940 leaq 0xa0(%rsp), %rdi callq 0x723a0 leaq 0x9f(%rsp), %rdi callq 0x72570 jmp 0xa598a movq 0x68(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) callq 0xacb20 jmp 0xa598a jmp 0xa5926 movl 0x94(%rsp), %eax addl $0x1, %eax movl %eax, 0x94(%rsp) jmp 0xa5705 jmp 0xa593e movl 0x98(%rsp), %eax addl $0x1, %eax movl %eax, 0x98(%rsp) jmp 0xa56e6 movb $0x1, 0xd7(%rsp) testb $0x1, 0xd7(%rsp) jne 0xa5970 movq 0x68(%rsp), %rdi callq 0xacb20 leaq 0xf0(%rsp), %rdi callq 0x723a0 movq 0x70(%rsp), %rax addq $0x128, %rsp # imm = 0x128 retq leaq 0xf0(%rsp), %rdi callq 0x723a0 movq 0xe0(%rsp), %rdi callq 0x61ff0 nopw %cs:(%rax,%rax) nop
_ZL37get_1d_sincos_pos_embed_from_grid_newiRKSt6vectorIS_IfSaIfEESaIS1_EE: sub rsp, 128h mov [rsp+128h+var_C0], rdi mov rax, rdi mov [rsp+128h+var_B8], rax mov [rsp+128h+var_8], rdi mov [rsp+128h+var_C], esi mov [rsp+128h+var_18], rdx mov rdi, [rsp+128h+var_18] call _ZNKSt6vectorIS_IfSaIfEESaIS1_EE4sizeEv; std::vector<std::vector<float>>::size(void) mov [rsp+128h+var_1C], eax mov rdi, [rsp+128h+var_18] xor eax, eax mov esi, eax call _ZNKSt6vectorIS_IfSaIfEESaIS1_EEixEm; std::vector<std::vector<float>>::operator[](ulong) mov rdi, rax call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void) mov [rsp+128h+var_20], eax mov eax, [rsp+128h+var_C] mov ecx, eax shr ecx, 1Fh add eax, ecx sar eax, 1 cdqe mov [rsp+128h+var_B0], rax lea rdi, [rsp+128h+var_39] mov [rsp+128h+var_A8], rdi call _ZNSaIfEC2Ev; std::allocator<float>::allocator(void) mov rsi, [rsp+128h+var_B0] mov rdx, [rsp+128h+var_A8] lea rdi, [rsp+128h+var_38] call _ZNSt6vectorIfSaIfEEC2EmRKS0_; std::vector<float>::vector(ulong,std::allocator<float> const&) jmp short $+2 loc_A54D7: lea rdi, [rsp+128h+var_39] call _ZNSaIfED2Ev; std::allocator<float>::~allocator() mov [rsp+128h+var_50], 0 loc_A54EF: mov eax, [rsp+128h+var_50] mov [rsp+128h+var_C4], eax mov eax, [rsp+128h+var_C] mov ecx, 2 cdq idiv ecx mov ecx, eax mov eax, [rsp+128h+var_C4] cmp eax, ecx jge loc_A55DD cvtsi2ss xmm1, [rsp+128h+var_50] mov eax, [rsp+128h+var_C] mov ecx, eax shr ecx, 1Fh add eax, ecx sar eax, 1 cvtsi2ss xmm0, eax divss xmm1, xmm0 movsd xmm0, cs:qword_24EB30 call _ZSt3powIdfEN9__gnu_cxx11__promote_2IT_T0_NS0_9__promoteIS2_Xsr3std12__is_integerIS2_EE7__valueEE6__typeENS4_IS3_Xsr3std12__is_integerIS3_EE7__valueEE6__typeEE6__typeES2_S3_ movsd [rsp+128h+var_D0], xmm0 jmp short $+2 loc_A554D: movsd xmm1, [rsp+128h+var_D0] movsd xmm0, cs:qword_24EAF8 divsd xmm0, xmm1 cvtsd2ss xmm0, xmm0 movss [rsp+128h+var_D4], xmm0 movsxd rsi, [rsp+128h+var_50] lea rdi, [rsp+128h+var_38] call _ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) movss xmm0, [rsp+128h+var_D4] movss dword ptr [rax], xmm0 mov eax, [rsp+128h+var_50] add eax, 1 mov [rsp+128h+var_50], eax jmp loc_A54EF mov rcx, rax mov eax, edx mov [rsp+arg_D8], rcx mov [rsp+arg_D4], eax lea rdi, [rsp+arg_E7] call _ZNSaIfED2Ev; std::allocator<float>::~allocator() jmp loc_A5997 mov rcx, rax mov eax, edx mov [rsp+arg_D8], rcx mov [rsp+arg_D4], eax jmp loc_A598A loc_A55DD: mov [rsp+128h+var_51], 0 movsxd rax, [rsp+128h+var_1C] mov [rsp+128h+var_F8], rax movsxd rax, [rsp+128h+var_20] mov [rsp+128h+var_F0], rax movsxd rax, [rsp+128h+var_C] mov [rsp+128h+var_E8], rax lea rdi, [rsp+128h+var_89] mov [rsp+128h+var_E0], rdi call _ZNSaIfEC2Ev; std::allocator<float>::allocator(void) mov rsi, [rsp+128h+var_E8] mov rdx, [rsp+128h+var_E0] lea rdi, [rsp+128h+var_88] call _ZNSt6vectorIfSaIfEEC2EmRKS0_; std::vector<float>::vector(ulong,std::allocator<float> const&) jmp short $+2 loc_A5637: lea rdi, [rsp+128h+var_8A] mov [rsp+128h+var_100], rdi call _ZNSaISt6vectorIfSaIfEEEC2Ev; std::allocator<std::vector<float>>::allocator(void) mov rsi, [rsp+128h+var_F0] mov rcx, [rsp+128h+var_100] lea rdi, [rsp+128h+var_70] lea rdx, [rsp+128h+var_88] call _ZNSt6vectorIS_IfSaIfEESaIS1_EEC2EmRKS1_RKS2_; std::vector<std::vector<float>>::vector(ulong,std::vector<float> const&,std::allocator<std::vector<float>> const&) jmp short $+2 loc_A566A: lea rdi, [rsp+128h+var_8B] mov [rsp+128h+var_108], rdi call _ZNSaISt6vectorIS_IfSaIfEESaIS1_EEEC2Ev; std::allocator<std::vector<std::vector<float>>>::allocator(void) mov rdi, [rsp+128h+var_C0] mov rsi, [rsp+128h+var_F8] mov rcx, [rsp+128h+var_108] lea rdx, [rsp+128h+var_70] call _ZNSt6vectorIS_IS_IfSaIfEESaIS1_EESaIS3_EEC2EmRKS3_RKS4_; std::vector<std::vector<std::vector<float>>>::vector(ulong,std::vector<std::vector<float>> const&,std::allocator<std::vector<std::vector<float>>> const&) jmp short $+2 loc_A569A: lea rdi, [rsp+128h+var_8B] call _ZNSaISt6vectorIS_IfSaIfEESaIS1_EEED2Ev; std::allocator<std::vector<std::vector<float>>>::~allocator() lea rdi, [rsp+128h+var_70] call _ZNSt6vectorIS_IfSaIfEESaIS1_EED2Ev; std::vector<std::vector<float>>::~vector() lea rdi, [rsp+128h+var_8A] call _ZNSaISt6vectorIfSaIfEEED2Ev; std::allocator<std::vector<float>>::~allocator() lea rdi, [rsp+128h+var_88] call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() lea rdi, [rsp+128h+var_89] call _ZNSaIfED2Ev; std::allocator<float>::~allocator() mov [rsp+128h+var_90], 0 loc_A56E6: mov eax, [rsp+128h+var_90] cmp eax, [rsp+128h+var_1C] jge loc_A5954 mov [rsp+128h+var_94], 0 loc_A5705: mov eax, [rsp+128h+var_94] cmp eax, [rsp+128h+var_20] jge loc_A593C mov [rsp+128h+var_98], 0 loc_A5724: mov eax, [rsp+128h+var_98] mov [rsp+128h+var_10C], eax mov eax, [rsp+128h+var_C] mov ecx, 2 cdq idiv ecx mov ecx, eax mov eax, [rsp+128h+var_10C] cmp eax, ecx jge loc_A5924 mov rdi, [rsp+128h+var_18] movsxd rsi, [rsp+128h+var_90] call _ZNKSt6vectorIS_IfSaIfEESaIS1_EEixEm; std::vector<std::vector<float>>::operator[](ulong) mov rdi, rax movsxd rsi, [rsp+128h+var_94] call _ZNKSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) movss xmm0, dword ptr [rax] movss [rsp+128h+var_114], xmm0 movsxd rsi, [rsp+128h+var_98] lea rdi, [rsp+128h+var_38] call _ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) movss xmm0, [rsp+128h+var_114] movss xmm1, dword ptr [rax] mulss xmm0, xmm1 movss [rsp+128h+var_9C], xmm0 movss xmm0, [rsp+128h+var_9C]; float call _ZSt3sinf; std::sin(float) movss [rsp+128h+var_110], xmm0 jmp short $+2 loc_A57BD: mov rdi, [rsp+128h+var_C0] movsxd rsi, [rsp+128h+var_90] call _ZNSt6vectorIS_IS_IfSaIfEESaIS1_EESaIS3_EEixEm; std::vector<std::vector<std::vector<float>>>::operator[](ulong) mov rdi, rax movsxd rsi, [rsp+128h+var_94] call _ZNSt6vectorIS_IfSaIfEESaIS1_EEixEm; std::vector<std::vector<float>>::operator[](ulong) mov rdi, rax movsxd rsi, [rsp+128h+var_98] call _ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) movss xmm0, [rsp+128h+var_110] movss dword ptr [rax], xmm0 movss xmm0, [rsp+128h+var_9C]; float call _ZSt3cosf; std::cos(float) movss [rsp+128h+var_118], xmm0 jmp short $+2 loc_A580F: mov rdi, [rsp+128h+var_C0] movsxd rsi, [rsp+128h+var_90] call _ZNSt6vectorIS_IS_IfSaIfEESaIS1_EESaIS3_EEixEm; std::vector<std::vector<std::vector<float>>>::operator[](ulong) mov rdi, rax movsxd rsi, [rsp+128h+var_94] call _ZNSt6vectorIS_IfSaIfEESaIS1_EEixEm; std::vector<std::vector<float>>::operator[](ulong) mov rdi, rax mov eax, [rsp+128h+var_98] mov [rsp+128h+var_11C], eax mov eax, [rsp+128h+var_C] mov ecx, 2 cdq idiv ecx mov ecx, eax mov eax, [rsp+128h+var_11C] add eax, ecx movsxd rsi, eax call _ZNSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) movss xmm0, [rsp+128h+var_118] movss dword ptr [rax], xmm0 mov eax, [rsp+128h+var_98] add eax, 1 mov [rsp+128h+var_98], eax jmp loc_A5724 mov rcx, rax mov eax, edx mov [rsp+arg_D8], rcx mov [rsp+arg_D4], eax jmp short loc_A58F2 mov rcx, rax mov eax, edx mov [rsp+arg_D8], rcx mov [rsp+arg_D4], eax jmp short loc_A58D8 mov rcx, rax mov eax, edx mov [rsp+arg_D8], rcx mov [rsp+arg_D4], eax lea rdi, [rsp+arg_95] call _ZNSaISt6vectorIS_IfSaIfEESaIS1_EEED2Ev; std::allocator<std::vector<std::vector<float>>>::~allocator() lea rdi, [rsp+arg_B0] call _ZNSt6vectorIS_IfSaIfEESaIS1_EED2Ev; std::vector<std::vector<float>>::~vector() loc_A58D8: lea rdi, [rsp+arg_96] call _ZNSaISt6vectorIfSaIfEEED2Ev; std::allocator<std::vector<float>>::~allocator() lea rdi, [rsp+arg_98] call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() loc_A58F2: lea rdi, [rsp+arg_97] call _ZNSaIfED2Ev; std::allocator<float>::~allocator() jmp loc_A598A mov rdi, [rsp+arg_60] mov rcx, rax mov eax, edx mov [rsp+arg_D8], rcx mov [rsp+arg_D4], eax call _ZNSt6vectorIS_IS_IfSaIfEESaIS1_EESaIS3_EED2Ev; std::vector<std::vector<std::vector<float>>>::~vector() jmp short loc_A598A loc_A5924: jmp short $+2 loc_A5926: mov eax, [rsp+128h+var_94] add eax, 1 mov [rsp+128h+var_94], eax jmp loc_A5705 loc_A593C: jmp short $+2 loc_A593E: mov eax, [rsp+128h+var_90] add eax, 1 mov [rsp+128h+var_90], eax jmp loc_A56E6 loc_A5954: mov [rsp+128h+var_51], 1 test [rsp+128h+var_51], 1 jnz short loc_A5970 mov rdi, [rsp+128h+var_C0] call _ZNSt6vectorIS_IS_IfSaIfEESaIS1_EESaIS3_EED2Ev; std::vector<std::vector<std::vector<float>>>::~vector() loc_A5970: lea rdi, [rsp+128h+var_38] call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() mov rax, [rsp+128h+var_B8] add rsp, 128h retn loc_A598A: lea rdi, [rsp+arg_E8] call _ZNSt6vectorIfSaIfEED2Ev; std::vector<float>::~vector() loc_A5997: mov rdi, [rsp+arg_D8] call __Unwind_Resume
long long get_1d_sincos_pos_embed_from_grid_new(long long a1, int a2, long long a3) { _QWORD *v3; // rax long long v4; // rsi int v5; // ecx int v6; // r8d int v7; // r9d long long *v8; // rdi long long v9; // rdx float v10; // xmm0_4 int v11; // ecx int v12; // r8d int v13; // r9d int v14; // r8d int v15; // r9d int v16; // r8d int v17; // r9d long long v18; // rax long long v19; // rax _QWORD *v20; // rax long long v21; // rax _QWORD *v22; // rax float v24; // [rsp+14h] [rbp-114h] int v25; // [rsp+30h] [rbp-F8h] int v26; // [rsp+38h] [rbp-F0h] int v27; // [rsp+40h] [rbp-E8h] float v30; // [rsp+8Ch] [rbp-9Ch] int m; // [rsp+90h] [rbp-98h] int k; // [rsp+94h] [rbp-94h] int j; // [rsp+98h] [rbp-90h] char v34; // [rsp+9Dh] [rbp-8Bh] BYREF char v35; // [rsp+9Eh] [rbp-8Ah] BYREF char v36; // [rsp+9Fh] [rbp-89h] BYREF long long v37[3]; // [rsp+A0h] [rbp-88h] BYREF _BYTE v38[31]; // [rsp+B8h] [rbp-70h] BYREF char v39; // [rsp+D7h] [rbp-51h] int i; // [rsp+D8h] [rbp-50h] char v41; // [rsp+EFh] [rbp-39h] BYREF long long v42[3]; // [rsp+F0h] [rbp-38h] BYREF int v43; // [rsp+108h] [rbp-20h] int v44; // [rsp+10Ch] [rbp-1Ch] long long v45; // [rsp+110h] [rbp-18h] int v46; // [rsp+11Ch] [rbp-Ch] long long v47; // [rsp+120h] [rbp-8h] v47 = a1; v46 = a2; v45 = a3; v44 = std::vector<std::vector<float>>::size(a3); v3 = (_QWORD *)std::vector<std::vector<float>>::operator[](v45, 0LL); v43 = std::vector<float>::size(v3); ((void (*)(void))std::allocator<float>::allocator)(); v4 = a2 / 2; std::vector<float>::vector((unsigned int)v42, v4, (unsigned int)&v41, v5, v6, v7); v8 = (long long *)&v41; std::allocator<float>::~allocator((long long)&v41); for ( i = 0; ; ++i ) { v9 = (unsigned int)(v46 >> 31); LODWORD(v9) = v46 % 2; if ( i >= v46 / 2 ) break; v10 = 1.0 / std::pow<double,float>(v8, v4, v9, 10000.0, (float)i / (float)(v46 / 2)); v4 = i; v8 = v42; *(float *)std::vector<float>::operator[](v42, i) = v10; } v39 = 0; v25 = v44; v26 = v43; v27 = v46; std::allocator<float>::allocator(&v36, v4, v9); std::vector<float>::vector((unsigned int)v37, v27, (unsigned int)&v36, v11, v12, v13); std::allocator<std::vector<float>>::allocator(); std::vector<std::vector<float>>::vector((unsigned int)v38, v26, (unsigned int)v37, (unsigned int)&v35, v14, v15); std::allocator<std::vector<std::vector<float>>>::allocator(); std::vector<std::vector<std::vector<float>>>::vector(a1, v25, (unsigned int)v38, (unsigned int)&v34, v16, v17); std::allocator<std::vector<std::vector<float>>>::~allocator(&v34); std::vector<std::vector<float>>::~vector(v38); std::allocator<std::vector<float>>::~allocator(&v35); std::vector<float>::~vector(v37); std::allocator<float>::~allocator((long long)&v36); for ( j = 0; j < v44; ++j ) { for ( k = 0; k < v43; ++k ) { for ( m = 0; m < v46 / 2; ++m ) { v18 = std::vector<std::vector<float>>::operator[](v45, j); v24 = *(float *)std::vector<float>::operator[](v18, k); v30 = v24 * *(float *)std::vector<float>::operator[](v42, m); std::sin(v30); v19 = std::vector<std::vector<std::vector<float>>>::operator[](a1, j); v20 = (_QWORD *)std::vector<std::vector<float>>::operator[](v19, k); *(float *)std::vector<float>::operator[](v20, m) = v30; std::cos(v30); v21 = std::vector<std::vector<std::vector<float>>>::operator[](a1, j); v22 = (_QWORD *)std::vector<std::vector<float>>::operator[](v21, k); *(float *)std::vector<float>::operator[](v22, v46 / 2 + m) = v30; } } } v39 = 1; std::vector<float>::~vector(v42); return a1; }
get_1d_sincos_pos_embed_from_grid_new: SUB RSP,0x128 MOV qword ptr [RSP + 0x68],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x70],RAX MOV qword ptr [RSP + 0x120],RDI MOV dword ptr [RSP + 0x11c],ESI MOV qword ptr [RSP + 0x110],RDX MOV RDI,qword ptr [RSP + 0x110] CALL 0x001ad4a0 MOV dword ptr [RSP + 0x10c],EAX MOV RDI,qword ptr [RSP + 0x110] XOR EAX,EAX MOV ESI,EAX CALL 0x001adfc0 MOV RDI,RAX CALL 0x00173140 MOV dword ptr [RSP + 0x108],EAX MOV EAX,dword ptr [RSP + 0x11c] MOV ECX,EAX SHR ECX,0x1f ADD EAX,ECX SAR EAX,0x1 CDQE MOV qword ptr [RSP + 0x78],RAX LEA RDI,[RSP + 0xef] MOV qword ptr [RSP + 0x80],RDI CALL 0x001a69b0 MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] LAB_001a54c8: LEA RDI,[RSP + 0xf0] CALL 0x001a69c0 JMP 0x001a54d7 LAB_001a54d7: LEA RDI,[RSP + 0xef] CALL 0x00172570 MOV dword ptr [RSP + 0xd8],0x0 LAB_001a54ef: MOV EAX,dword ptr [RSP + 0xd8] MOV dword ptr [RSP + 0x64],EAX MOV EAX,dword ptr [RSP + 0x11c] MOV ECX,0x2 CDQ IDIV ECX MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x64] CMP EAX,ECX JGE 0x001a55dd CVTSI2SS XMM1,dword ptr [RSP + 0xd8] MOV EAX,dword ptr [RSP + 0x11c] MOV ECX,EAX SHR ECX,0x1f ADD EAX,ECX SAR EAX,0x1 CVTSI2SS XMM0,EAX DIVSS XMM1,XMM0 LAB_001a5538: MOVSD XMM0,qword ptr [0x0034eb30] CALL 0x001adfe0 MOVSD qword ptr [RSP + 0x58],XMM0 JMP 0x001a554d LAB_001a554d: MOVSD XMM1,qword ptr [RSP + 0x58] MOVSD XMM0,qword ptr [0x0034eaf8] DIVSD XMM0,XMM1 CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RSP + 0x54],XMM0 MOVSXD RSI,dword ptr [RSP + 0xd8] LEA RDI,[RSP + 0xf0] CALL 0x00173120 MOVSS XMM0,dword ptr [RSP + 0x54] MOVSS dword ptr [RAX],XMM0 MOV EAX,dword ptr [RSP + 0xd8] ADD EAX,0x1 MOV dword ptr [RSP + 0xd8],EAX JMP 0x001a54ef LAB_001a55dd: MOV byte ptr [RSP + 0xd7],0x0 MOVSXD RAX,dword ptr [RSP + 0x10c] MOV qword ptr [RSP + 0x30],RAX MOVSXD RAX,dword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x38],RAX MOVSXD RAX,dword ptr [RSP + 0x11c] MOV qword ptr [RSP + 0x40],RAX LEA RDI,[RSP + 0x9f] MOV qword ptr [RSP + 0x48],RDI CALL 0x001a69b0 MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] LAB_001a5628: LEA RDI,[RSP + 0xa0] CALL 0x001a69c0 JMP 0x001a5637 LAB_001a5637: LEA RDI,[RSP + 0x9e] MOV qword ptr [RSP + 0x28],RDI CALL 0x001ac8b0 MOV RSI,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RSP + 0x28] LAB_001a5653: LEA RDI,[RSP + 0xb8] LEA RDX,[RSP + 0xa0] CALL 0x001ac8c0 JMP 0x001a566a LAB_001a566a: LEA RDI,[RSP + 0x9d] MOV qword ptr [RSP + 0x20],RDI CALL 0x001aca50 MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x20] LAB_001a568b: LEA RDX,[RSP + 0xb8] CALL 0x001adf40 JMP 0x001a569a LAB_001a569a: LEA RDI,[RSP + 0x9d] CALL 0x001acaf0 LEA RDI,[RSP + 0xb8] CALL 0x001a6950 LEA RDI,[RSP + 0x9e] CALL 0x001ac940 LEA RDI,[RSP + 0xa0] CALL 0x001723a0 LEA RDI,[RSP + 0x9f] CALL 0x00172570 MOV dword ptr [RSP + 0x98],0x0 LAB_001a56e6: MOV EAX,dword ptr [RSP + 0x98] CMP EAX,dword ptr [RSP + 0x10c] JGE 0x001a5954 MOV dword ptr [RSP + 0x94],0x0 LAB_001a5705: MOV EAX,dword ptr [RSP + 0x94] CMP EAX,dword ptr [RSP + 0x108] JGE 0x001a593c MOV dword ptr [RSP + 0x90],0x0 LAB_001a5724: MOV EAX,dword ptr [RSP + 0x90] MOV dword ptr [RSP + 0x1c],EAX MOV EAX,dword ptr [RSP + 0x11c] MOV ECX,0x2 CDQ IDIV ECX MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,ECX JGE 0x001a5924 MOV RDI,qword ptr [RSP + 0x110] MOVSXD RSI,dword ptr [RSP + 0x98] CALL 0x001adfc0 MOV RDI,RAX MOVSXD RSI,dword ptr [RSP + 0x94] CALL 0x001ae010 MOVSS XMM0,dword ptr [RAX] MOVSS dword ptr [RSP + 0x14],XMM0 MOVSXD RSI,dword ptr [RSP + 0x90] LEA RDI,[RSP + 0xf0] CALL 0x00173120 MOVSS XMM0,dword ptr [RSP + 0x14] MOVSS XMM1,dword ptr [RAX] MULSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x8c],XMM0 MOVSS XMM0,dword ptr [RSP + 0x8c] LAB_001a57b0: CALL 0x001ae030 MOVSS dword ptr [RSP + 0x18],XMM0 JMP 0x001a57bd LAB_001a57bd: MOV RDI,qword ptr [RSP + 0x68] MOVSXD RSI,dword ptr [RSP + 0x98] CALL 0x001acb00 MOV RDI,RAX MOVSXD RSI,dword ptr [RSP + 0x94] CALL 0x001a6930 MOV RDI,RAX MOVSXD RSI,dword ptr [RSP + 0x90] CALL 0x00173120 MOVSS XMM0,dword ptr [RSP + 0x18] MOVSS dword ptr [RAX],XMM0 MOVSS XMM0,dword ptr [RSP + 0x8c] CALL 0x001ae050 LAB_001a5807: MOVSS dword ptr [RSP + 0x10],XMM0 JMP 0x001a580f LAB_001a580f: MOV RDI,qword ptr [RSP + 0x68] MOVSXD RSI,dword ptr [RSP + 0x98] CALL 0x001acb00 MOV RDI,RAX MOVSXD RSI,dword ptr [RSP + 0x94] CALL 0x001a6930 MOV RDI,RAX MOV EAX,dword ptr [RSP + 0x90] MOV dword ptr [RSP + 0xc],EAX MOV EAX,dword ptr [RSP + 0x11c] MOV ECX,0x2 CDQ IDIV ECX MOV ECX,EAX MOV EAX,dword ptr [RSP + 0xc] ADD EAX,ECX MOVSXD RSI,EAX CALL 0x00173120 MOVSS XMM0,dword ptr [RSP + 0x10] MOVSS dword ptr [RAX],XMM0 MOV EAX,dword ptr [RSP + 0x90] ADD EAX,0x1 MOV dword ptr [RSP + 0x90],EAX JMP 0x001a5724 LAB_001a5924: JMP 0x001a5926 LAB_001a5926: MOV EAX,dword ptr [RSP + 0x94] ADD EAX,0x1 MOV dword ptr [RSP + 0x94],EAX JMP 0x001a5705 LAB_001a593c: JMP 0x001a593e LAB_001a593e: MOV EAX,dword ptr [RSP + 0x98] ADD EAX,0x1 MOV dword ptr [RSP + 0x98],EAX JMP 0x001a56e6 LAB_001a5954: MOV byte ptr [RSP + 0xd7],0x1 TEST byte ptr [RSP + 0xd7],0x1 JNZ 0x001a5970 MOV RDI,qword ptr [RSP + 0x68] CALL 0x001acb20 LAB_001a5970: LEA RDI,[RSP + 0xf0] CALL 0x001723a0 MOV RAX,qword ptr [RSP + 0x70] ADD RSP,0x128 RET
/* WARNING: Removing unreachable block (ram,0x001a5966) */ /* get_1d_sincos_pos_embed_from_grid_new(int, std::vector<std::vector<float, std::allocator<float> >, std::allocator<std::vector<float, std::allocator<float> > > > const&) */ vector<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>,std::allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>>> * get_1d_sincos_pos_embed_from_grid_new(int param_1,vector *param_2) { float fVar1; float fVar2; int iVar3; vector<float,std::allocator<float>> *pvVar4; float *pfVar5; ulong uVar6; ulong uVar7; ulong uVar8; vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> *pvVar9; int4 *puVar10; vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> *in_RDX; int4 in_register_0000003c; vector<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>,std::allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>>> *this; int4 uVar11; double dVar12; int local_98; int local_94; int local_90; allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>> local_8b; allocator<std::vector<float,std::allocator<float>>> local_8a; allocator<float> local_89; vector<float,std::allocator<float>> local_88 [24]; vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> local_70 [31]; int1 local_51; int local_50; allocator<float> local_39; vector<float,std::allocator<float>> local_38 [24]; int local_20; int local_1c; vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> *local_18; int local_c; vector<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>,std::allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>>> *local_8; this = (vector<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>,std::allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>>> *)CONCAT44(in_register_0000003c,param_1); local_c = (int)param_2; local_18 = in_RDX; local_8 = this; local_1c = std:: vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> ::size(in_RDX); pvVar4 = (vector<float,std::allocator<float>> *) std:: vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> ::operator[](local_18,0); local_20 = std::vector<float,std::allocator<float>>::size(pvVar4); iVar3 = local_c / 2; std::allocator<float>::allocator(&local_39); /* try { // try from 001a54c8 to 001a54d4 has its CatchHandler @ 001a559e */ std::vector<float,std::allocator<float>>::vector(local_38,(long)iVar3,(allocator *)&local_39); std::allocator<float>::~allocator(&local_39); for (local_50 = 0; local_50 < local_c / 2; local_50 = local_50 + 1) { /* try { // try from 001a5538 to 001a5544 has its CatchHandler @ 001a55c4 */ dVar12 = (double)std::pow<double,float>(DAT_0034eb30,(float)local_50 / (float)(local_c / 2)); dVar12 = DAT_0034eaf8 / dVar12; pfVar5 = (float *)std::vector<float,std::allocator<float>>::operator[](local_38,(long)local_50); *pfVar5 = (float)dVar12; } local_51 = 0; uVar6 = (ulong)local_1c; uVar7 = (ulong)local_20; uVar8 = (ulong)local_c; std::allocator<float>::allocator(&local_89); /* try { // try from 001a5628 to 001a5634 has its CatchHandler @ 001a587e */ std::vector<float,std::allocator<float>>::vector(local_88,uVar8,(allocator *)&local_89); std::allocator<std::vector<float,std::allocator<float>>>::allocator(&local_8a); /* try { // try from 001a5653 to 001a5667 has its CatchHandler @ 001a5894 */ std:: vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> ::vector(local_70,uVar7,local_88,(allocator *)&local_8a); std:: allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>> ::allocator(&local_8b); /* try { // try from 001a568b to 001a5697 has its CatchHandler @ 001a58aa */ std:: vector<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>,std::allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>>> ::vector(this,uVar6,local_70,(allocator *)&local_8b); std:: allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>> ::~allocator(&local_8b); std:: vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> ::~vector(local_70); std::allocator<std::vector<float,std::allocator<float>>>::~allocator(&local_8a); std::vector<float,std::allocator<float>>::~vector(local_88); std::allocator<float>::~allocator(&local_89); for (local_90 = 0; local_90 < local_1c; local_90 = local_90 + 1) { for (local_94 = 0; local_94 < local_20; local_94 = local_94 + 1) { for (local_98 = 0; local_98 < local_c / 2; local_98 = local_98 + 1) { pvVar4 = (vector<float,std::allocator<float>> *) std:: vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> ::operator[](local_18,(long)local_90); pfVar5 = (float *)std::vector<float,std::allocator<float>>::operator[] (pvVar4,(long)local_94); fVar1 = *pfVar5; pfVar5 = (float *)std::vector<float,std::allocator<float>>::operator[] (local_38,(long)local_98); fVar2 = *pfVar5; /* try { // try from 001a57b0 to 001a5806 has its CatchHandler @ 001a5904 */ uVar11 = std::sin(fVar1 * fVar2); pvVar9 = (vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> *)std:: vector<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>,std::allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>>> ::operator[](this,(long)local_90); pvVar4 = (vector<float,std::allocator<float>> *) std:: vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> ::operator[](pvVar9,(long)local_94); puVar10 = (int4 *) std::vector<float,std::allocator<float>>::operator[](pvVar4,(long)local_98); *puVar10 = uVar11; uVar11 = std::cos(fVar1 * fVar2); pvVar9 = (vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> *)std:: vector<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>,std::allocator<std::vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>>>> ::operator[](this,(long)local_90); pvVar4 = (vector<float,std::allocator<float>> *) std:: vector<std::vector<float,std::allocator<float>>,std::allocator<std::vector<float,std::allocator<float>>>> ::operator[](pvVar9,(long)local_94); puVar10 = (int4 *) std::vector<float,std::allocator<float>>::operator[] (pvVar4,(long)(local_98 + local_c / 2)); *puVar10 = uVar11; } } } local_51 = 1; std::vector<float,std::allocator<float>>::~vector(local_38); return this; }
28,502
mysql_reset_connection
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mysql_reset_connection(MYSQL *mysql) { int rc; /* check if connection handler is active */ if (IS_CONNHDLR_ACTIVE(mysql)) { if (mysql->extension->conn_hdlr->plugin && mysql->extension->conn_hdlr->plugin->reset) return(mysql->extension->conn_hdlr->plugin->reset(mysql)); } /* skip result sets */ if (mysql->status == MYSQL_STATUS_USE_RESULT || mysql->status == MYSQL_STATUS_GET_RESULT || mysql->status & SERVER_MORE_RESULTS_EXIST) { mthd_my_skip_result(mysql); mysql->status= MYSQL_STATUS_READY; } rc= ma_simple_command(mysql, COM_RESET_CONNECTION, 0, 0, 0, 0); if (rc && mysql->options.reconnect) { /* There is no big sense in resetting but we need reconnect */ rc= ma_simple_command(mysql, COM_RESET_CONNECTION,0,0,0,0); } if (rc) return 1; /* reset the connection in all active statements */ ma_invalidate_stmts(mysql, "mysql_reset_connection()"); free_old_query(mysql); mysql->status= MYSQL_STATUS_READY; mysql->affected_rows= ~(my_ulonglong)0; mysql->insert_id= 0; return 0; }
O0
c
mysql_reset_connection: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x4f0(%rax) je 0x2a9c2 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax cmpq $0x0, (%rax) je 0x2a9c2 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax cmpq $0x0, (%rax) je 0x2a9c0 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax movq (%rax), %rax cmpq $0x0, 0x80(%rax) je 0x2a9c0 movq -0x10(%rbp), %rax movq 0x4f0(%rax), %rax movq (%rax), %rax movq (%rax), %rax movq 0x80(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl %eax, -0x4(%rbp) jmp 0x2aab4 jmp 0x2a9c2 movq -0x10(%rbp), %rax cmpl $0x2, 0x488(%rax) je 0x2a9ee movq -0x10(%rbp), %rax cmpl $0x1, 0x488(%rax) je 0x2a9ee movq -0x10(%rbp), %rax movl 0x488(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x2aa05 movq -0x10(%rbp), %rdi callq 0x1ef90 movq -0x10(%rbp), %rax movl $0x0, 0x488(%rax) movq -0x10(%rbp), %rdi movl $0x1f, %esi xorl %eax, %eax movl %eax, %r9d xorl %r8d, %r8d movq %r9, %rdx movq %r9, %rcx callq 0x1ed10 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x2aa59 movq -0x10(%rbp), %rax movsbl 0x43b(%rax), %eax cmpl $0x0, %eax je 0x2aa59 movq -0x10(%rbp), %rdi movl $0x1f, %esi xorl %eax, %eax movl %eax, %r9d xorl %r8d, %r8d movq %r9, %rdx movq %r9, %rcx callq 0x1ed10 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0x2aa68 movl $0x1, -0x4(%rbp) jmp 0x2aab4 movq -0x10(%rbp), %rdi leaq 0x2b5c5(%rip), %rsi # 0x56038 callq 0x25ac0 movq -0x10(%rbp), %rdi callq 0x26060 movq -0x10(%rbp), %rax movl $0x0, 0x488(%rax) movq -0x10(%rbp), %rax movq $-0x1, 0x338(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x340(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
mysql_reset_connection: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp qword ptr [rax+4F0h], 0 jz short loc_2A9C2 mov rax, [rbp+var_10] mov rax, [rax+4F0h] cmp qword ptr [rax], 0 jz short loc_2A9C2 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov rax, [rax] cmp qword ptr [rax], 0 jz short loc_2A9C0 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov rax, [rax] mov rax, [rax] cmp qword ptr [rax+80h], 0 jz short loc_2A9C0 mov rax, [rbp+var_10] mov rax, [rax+4F0h] mov rax, [rax] mov rax, [rax] mov rax, [rax+80h] mov rdi, [rbp+var_10] call rax mov [rbp+var_4], eax jmp loc_2AAB4 loc_2A9C0: jmp short $+2 loc_2A9C2: mov rax, [rbp+var_10] cmp dword ptr [rax+488h], 2 jz short loc_2A9EE mov rax, [rbp+var_10] cmp dword ptr [rax+488h], 1 jz short loc_2A9EE mov rax, [rbp+var_10] mov eax, [rax+488h] and eax, 8 cmp eax, 0 jz short loc_2AA05 loc_2A9EE: mov rdi, [rbp+var_10] call mthd_my_skip_result mov rax, [rbp+var_10] mov dword ptr [rax+488h], 0 loc_2AA05: mov rdi, [rbp+var_10] mov esi, 1Fh xor eax, eax mov r9d, eax xor r8d, r8d mov rdx, r9 mov rcx, r9 call ma_simple_command mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_2AA59 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+43Bh] cmp eax, 0 jz short loc_2AA59 mov rdi, [rbp+var_10] mov esi, 1Fh xor eax, eax mov r9d, eax xor r8d, r8d mov rdx, r9 mov rcx, r9 call ma_simple_command mov [rbp+var_14], eax loc_2AA59: cmp [rbp+var_14], 0 jz short loc_2AA68 mov [rbp+var_4], 1 jmp short loc_2AAB4 loc_2AA68: mov rdi, [rbp+var_10] lea rsi, aMysqlResetConn; "mysql_reset_connection()" call ma_invalidate_stmts mov rdi, [rbp+var_10] call free_old_query mov rax, [rbp+var_10] mov dword ptr [rax+488h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_10] mov qword ptr [rax+340h], 0 mov [rbp+var_4], 0 loc_2AAB4: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long mysql_reset_connection(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { int v7; // [rsp+Ch] [rbp-14h] if ( *(_QWORD *)(a1 + 1264) && **(_QWORD **)(a1 + 1264) && ***(_QWORD ***)(a1 + 1264) && *(_QWORD *)(***(_QWORD ***)(a1 + 1264) + 128LL) ) { return (unsigned int)(*(long long ( **)(long long))(***(_QWORD ***)(a1 + 1264) + 128LL))(a1); } else { if ( *(_DWORD *)(a1 + 1160) == 2 || *(_DWORD *)(a1 + 1160) == 1 || (*(_DWORD *)(a1 + 1160) & 8) != 0 ) { mthd_my_skip_result(a1, a2, a3, a4, a5, a6); *(_DWORD *)(a1 + 1160) = 0; } v7 = ma_simple_command(a1, 0x1Fu, 0LL, 0LL, 0, 0LL); if ( v7 && *(_BYTE *)(a1 + 1083) ) v7 = ma_simple_command(a1, 0x1Fu, 0LL, 0LL, 0, 0LL); if ( v7 ) { return 1; } else { ma_invalidate_stmts(a1, (long long)"mysql_reset_connection()"); free_old_query(a1); *(_DWORD *)(a1 + 1160) = 0; *(_QWORD *)(a1 + 824) = -1LL; *(_QWORD *)(a1 + 832) = 0LL; return 0; } } }
mysql_reset_connection: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x4f0],0x0 JZ 0x0012a9c2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] CMP qword ptr [RAX],0x0 JZ 0x0012a9c2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX],0x0 JZ 0x0012a9c0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x80],0x0 JZ 0x0012a9c0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x4],EAX JMP 0x0012aab4 LAB_0012a9c0: JMP 0x0012a9c2 LAB_0012a9c2: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x488],0x2 JZ 0x0012a9ee MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x488],0x1 JZ 0x0012a9ee MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x488] AND EAX,0x8 CMP EAX,0x0 JZ 0x0012aa05 LAB_0012a9ee: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011ef90 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x488],0x0 LAB_0012aa05: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1f XOR EAX,EAX MOV R9D,EAX XOR R8D,R8D MOV RDX,R9 MOV RCX,R9 CALL 0x0011ed10 MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JZ 0x0012aa59 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x43b] CMP EAX,0x0 JZ 0x0012aa59 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1f XOR EAX,EAX MOV R9D,EAX XOR R8D,R8D MOV RDX,R9 MOV RCX,R9 CALL 0x0011ed10 MOV dword ptr [RBP + -0x14],EAX LAB_0012aa59: CMP dword ptr [RBP + -0x14],0x0 JZ 0x0012aa68 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0012aab4 LAB_0012aa68: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x156038] CALL 0x00125ac0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00126060 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x488],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x338],-0x1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x340],0x0 MOV dword ptr [RBP + -0x4],0x0 LAB_0012aab4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 mysql_reset_connection(long param_1) { int local_1c; int4 local_c; if ((((*(long *)(param_1 + 0x4f0) == 0) || (**(long **)(param_1 + 0x4f0) == 0)) || (*(long *)**(int8 **)(param_1 + 0x4f0) == 0)) || (*(long *)(*(long *)**(int8 **)(param_1 + 0x4f0) + 0x80) == 0)) { if (((*(int *)(param_1 + 0x488) == 2) || (*(int *)(param_1 + 0x488) == 1)) || ((*(uint *)(param_1 + 0x488) & 8) != 0)) { mthd_my_skip_result(param_1); *(int4 *)(param_1 + 0x488) = 0; } local_1c = ma_simple_command(param_1,0x1f,0,0,0); if ((local_1c != 0) && (*(char *)(param_1 + 0x43b) != '\0')) { local_1c = ma_simple_command(param_1,0x1f,0,0,0); } if (local_1c == 0) { ma_invalidate_stmts(param_1,"mysql_reset_connection()"); free_old_query(param_1); *(int4 *)(param_1 + 0x488) = 0; *(int8 *)(param_1 + 0x338) = 0xffffffffffffffff; *(int8 *)(param_1 + 0x340) = 0; local_c = 0; } else { local_c = 1; } } else { local_c = (**(code **)(*(long *)**(int8 **)(param_1 + 0x4f0) + 0x80))(param_1); } return local_c; }
28,503
add_compiled_extra_collation
eloqsql/mysys/charset.c
void add_compiled_extra_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); cs->cs_name= org->cs_name; } }
O3
c
add_compiled_extra_collation: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movl (%rdi), %eax leaq 0x3708e4(%rip), %rcx # 0x3e8650 movq %rdi, (%rcx,%rax,8) orb $0x2, 0xd(%rdi) leaq 0x3748d5(%rip), %rdi # 0x3ec650 movq %rbx, %rsi callq 0x7a366 testb %al, %al je 0x77da3 movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx leaq 0x3748ba(%rip), %rdi # 0x3ec650 callq 0x7a106 movups 0x10(%rax), %xmm0 movups %xmm0, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
add_compiled_extra_collation: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov eax, [rdi] lea rcx, all_charsets mov [rcx+rax*8], rdi or byte ptr [rdi+0Dh], 2 lea rdi, charset_name_hash mov rsi, rbx call my_hash_insert test al, al jz short loc_77DA3 mov rsi, [rbx+10h] mov rdx, [rbx+18h] lea rdi, charset_name_hash call my_hash_search movups xmm0, xmmword ptr [rax+10h] movups xmmword ptr [rbx+10h], xmm0 loc_77DA3: add rsp, 8 pop rbx pop rbp retn
long long add_compiled_extra_collation(unsigned int *a1) { long long result; // rax all_charsets[*a1] = a1; *((_BYTE *)a1 + 13) |= 2u; result = my_hash_insert(&charset_name_hash, a1); if ( (_BYTE)result ) { result = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); *((_OWORD *)a1 + 1) = *(_OWORD *)(result + 16); } return result; }
add_compiled_extra_collation: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI] LEA RCX,[0x4e8650] MOV qword ptr [RCX + RAX*0x8],RDI OR byte ptr [RDI + 0xd],0x2 LEA RDI,[0x4ec650] MOV RSI,RBX CALL 0x0017a366 TEST AL,AL JZ 0x00177da3 MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] LEA RDI,[0x4ec650] CALL 0x0017a106 MOVUPS XMM0,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM0 LAB_00177da3: ADD RSP,0x8 POP RBX POP RBP RET
void add_compiled_extra_collation(uint *param_1) { int8 uVar1; char cVar2; long lVar3; (&all_charsets)[*param_1] = param_1; *(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2; cVar2 = my_hash_insert(charset_name_hash,param_1); if (cVar2 != '\0') { lVar3 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4), *(int8 *)(param_1 + 6)); uVar1 = *(int8 *)(lVar3 + 0x18); *(int8 *)(param_1 + 4) = *(int8 *)(lVar3 + 0x10); *(int8 *)(param_1 + 6) = uVar1; } return; }
28,504
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 0x207f70(%rip), %rax # 0x246e98 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 0x3f037 leaq 0x207f26(%rip), %rax # 0x246e98 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 0x37db0 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x3efe2 cmpq $0x0, -0x38(%rbp) jne 0x3efc7 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x3efd2 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0x3efd2 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x3f00f cmpq $-0x1, -0x38(%rbp) je 0x3eff6 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0x3f001 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0x3f001 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x207e82(%rip), %rax # 0x246e98 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 0x3f057 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0x37db0 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: 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_3F037 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_3EFE2 cmp [rbp+var_38], 0 jnz short loc_3EFC7 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_3EFD2 loc_3EFC7: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_3EFD2: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_3F00F loc_3EFE2: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_3EFF6 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_3F001 loc_3EFF6: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_3F001: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_3F00F: 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_3F057 loc_3F037: 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_3F057: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_read( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6, double a7) { double v7; // xmm0_8 long long v9; // [rsp+0h] [rbp-A0h] long long v10; // [rsp+8h] [rbp-98h] _BYTE v11[72]; // [rsp+18h] [rbp-88h] BYREF long long v12; // [rsp+60h] [rbp-40h] long long v13; // [rsp+68h] [rbp-38h] long long v14; // [rsp+70h] [rbp-30h] long long v15; // [rsp+78h] [rbp-28h] long long v16; // [rsp+80h] [rbp-20h] unsigned int v17; // [rsp+88h] [rbp-18h] unsigned int v18; // [rsp+8Ch] [rbp-14h] long long v19; // [rsp+90h] [rbp-10h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v14 = a6; v12 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server[0] + 43))(v11, a3, 6LL); if ( v12 ) { v7 = (*((double ( **)(long long, long long, long long, _QWORD))PSI_server[0] + 66))(v12, v15, v19, v18); v13 = my_read(v17, v16, v15, v14, v7); if ( (v14 & 6) != 0 ) { if ( v13 ) v10 = 0LL; else v10 = v15; (*((void ( **)(long long, long long))PSI_server[0] + 67))(v12, v10); } else { if ( v13 == -1 ) v9 = 0LL; else v9 = v13; (*((void ( **)(long long, long long))PSI_server[0] + 67))(v12, v9); } return v13; } else { return my_read(v17, v16, v15, v14, a7); } }
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,[0x346e98] 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 0x0013f037 LEA RAX,[0x346e98] 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 0x00137db0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x0013efe2 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0013efc7 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x0013efd2 LAB_0013efc7: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x0013efd2 LAB_0013efd2: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x0013f00f LAB_0013efe2: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x0013eff6 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x0013f001 LAB_0013eff6: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x0013f001 LAB_0013f001: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_0013f00f: LEA RAX,[0x346e98] 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 0x0013f057 LAB_0013f037: 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 0x00137db0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_0013f057: 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; }
28,505
query_int_variable
eloqsql/libmariadb/unittest/libmariadb/my_test.h
my_bool query_int_variable(MYSQL *con, const char *var_name, int *var_value) { MYSQL_RES *rs; MYSQL_ROW row; char query_buffer[MAX_TEST_QUERY_LENGTH]; my_bool is_null; sprintf(query_buffer, "SELECT %s", (const char *) var_name); FAIL_IF(mysql_query(con, query_buffer), "Query failed"); FAIL_UNLESS(rs= mysql_store_result(con), "Invaliid result set"); FAIL_UNLESS(row= mysql_fetch_row(rs), "Nothing to fetch"); is_null= row[0] == NULL; if (!is_null) *var_value= atoi(row[0]); mysql_free_result(rs); return is_null; }
O0
c
query_int_variable: pushq %rbp movq %rsp, %rbp subq $0x180, %rsp # imm = 0x180 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x150(%rbp) movq %rsi, -0x158(%rbp) movq %rdx, -0x160(%rbp) leaq -0x140(%rbp), %rdi movq -0x158(%rbp), %rdx leaq 0x373d9(%rip), %rsi # 0x4b28b movb $0x0, %al callq 0x130f0 movq -0x150(%rbp), %rdi leaq -0x140(%rbp), %rsi callq 0x1e3f0 cmpl $0x0, %eax je 0x13efe leaq 0x3720c(%rip), %rdi # 0x4b0e4 leaq 0x373b6(%rip), %rsi # 0x4b295 leaq 0x37226(%rip), %rdx # 0x4b10c movl $0x1a2, %ecx # imm = 0x1A2 movb $0x0, %al callq 0x155c0 movb $0x1, -0x141(%rbp) jmp 0x13fe5 jmp 0x13f00 jmp 0x13f02 movq -0x150(%rbp), %rdi callq 0x1fa40 movq %rax, -0x168(%rbp) cmpq $0x0, %rax jne 0x13f48 leaq 0x371c2(%rip), %rdi # 0x4b0e4 leaq 0x37379(%rip), %rsi # 0x4b2a2 leaq 0x371dc(%rip), %rdx # 0x4b10c movl $0x1a3, %ecx # imm = 0x1A3 movb $0x0, %al callq 0x155c0 movb $0x1, -0x141(%rbp) jmp 0x13fe5 jmp 0x13f4a jmp 0x13f4c movq -0x168(%rbp), %rdi callq 0x1fd80 movq %rax, -0x170(%rbp) cmpq $0x0, %rax jne 0x13f8f leaq 0x37178(%rip), %rdi # 0x4b0e4 leaq 0x37343(%rip), %rsi # 0x4b2b6 leaq 0x37192(%rip), %rdx # 0x4b10c movl $0x1a4, %ecx # imm = 0x1A4 movb $0x0, %al callq 0x155c0 movb $0x1, -0x141(%rbp) jmp 0x13fe5 jmp 0x13f91 movq -0x170(%rbp), %rax cmpq $0x0, (%rax) sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x171(%rbp) cmpb $0x0, -0x171(%rbp) jne 0x13fcd movq -0x170(%rbp), %rax movq (%rax), %rdi callq 0x136b0 movl %eax, %ecx movq -0x160(%rbp), %rax movl %ecx, (%rax) movq -0x168(%rbp), %rdi callq 0x17280 movb -0x171(%rbp), %al movb %al, -0x141(%rbp) movb -0x141(%rbp), %al movb %al, -0x172(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x14012 movb -0x172(%rbp), %al addq $0x180, %rsp # imm = 0x180 popq %rbp retq callq 0x134b0 nopw (%rax,%rax)
query_int_variable: push rbp mov rbp, rsp sub rsp, 180h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_150], rdi mov [rbp+var_158], rsi mov [rbp+var_160], rdx lea rdi, [rbp+var_140] mov rdx, [rbp+var_158] lea rsi, aSelectS; "SELECT %s" mov al, 0 call _sprintf mov rdi, [rbp+var_150] lea rsi, [rbp+var_140] call mysql_query cmp eax, 0 jz short loc_13EFE lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aQueryFailed; "Query failed" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1A2h mov al, 0 call diag mov [rbp+var_141], 1 jmp loc_13FE5 loc_13EFE: jmp short $+2 loc_13F00: jmp short $+2 loc_13F02: mov rdi, [rbp+var_150] call mysql_store_result mov [rbp+var_168], rax cmp rax, 0 jnz short loc_13F48 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aInvaliidResult; "Invaliid result set" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1A3h mov al, 0 call diag mov [rbp+var_141], 1 jmp loc_13FE5 loc_13F48: jmp short $+2 loc_13F4A: jmp short $+2 loc_13F4C: mov rdi, [rbp+var_168] call mysql_fetch_row mov [rbp+var_170], rax cmp rax, 0 jnz short loc_13F8F lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aNothingToFetch; "Nothing to fetch" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1A4h mov al, 0 call diag mov [rbp+var_141], 1 jmp short loc_13FE5 loc_13F8F: jmp short $+2 loc_13F91: mov rax, [rbp+var_170] cmp qword ptr [rax], 0 setz al and al, 1 movzx eax, al mov [rbp+var_171], al cmp [rbp+var_171], 0 jnz short loc_13FCD mov rax, [rbp+var_170] mov rdi, [rax] call _atoi mov ecx, eax mov rax, [rbp+var_160] mov [rax], ecx loc_13FCD: mov rdi, [rbp+var_168] call mysql_free_result mov al, [rbp+var_171] mov [rbp+var_141], al loc_13FE5: mov al, [rbp+var_141] mov [rbp+var_172], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_14012 mov al, [rbp+var_172] add rsp, 180h pop rbp retn loc_14012: call ___stack_chk_fail
char query_int_variable(long long a1, const char *a2, _DWORD *a3) { int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d int v7; // r8d int v8; // r9d bool v10; // [rsp+Fh] [rbp-171h] _QWORD *row; // [rsp+10h] [rbp-170h] long long v12; // [rsp+18h] [rbp-168h] _BYTE v15[312]; // [rsp+40h] [rbp-140h] BYREF unsigned long long v16; // [rsp+178h] [rbp-8h] v16 = __readfsqword(0x28u); sprintf(v15, "SELECT %s", a2); if ( (unsigned int)mysql_query(a1, v15) ) { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Query failed", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h", 418, v3, v4); return 1; } else { v12 = mysql_store_result(a1); if ( v12 ) { row = (_QWORD *)mysql_fetch_row(v12); if ( row ) { v10 = *row == 0LL; if ( *row ) *a3 = atoi(*row); mysql_free_result(v12); return v10; } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Nothing to fetch", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h", 420, v7, v8); return 1; } } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"Invaliid result set", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h", 419, v5, v6); return 1; } } }
query_int_variable: PUSH RBP MOV RBP,RSP SUB RSP,0x180 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x150],RDI MOV qword ptr [RBP + -0x158],RSI MOV qword ptr [RBP + -0x160],RDX LEA RDI,[RBP + -0x140] MOV RDX,qword ptr [RBP + -0x158] LEA RSI,[0x14b28b] MOV AL,0x0 CALL 0x001130f0 MOV RDI,qword ptr [RBP + -0x150] LEA RSI,[RBP + -0x140] CALL 0x0011e3f0 CMP EAX,0x0 JZ 0x00113efe LEA RDI,[0x14b0e4] LEA RSI,[0x14b295] LEA RDX,[0x14b10c] MOV ECX,0x1a2 MOV AL,0x0 CALL 0x001155c0 MOV byte ptr [RBP + -0x141],0x1 JMP 0x00113fe5 LAB_00113efe: JMP 0x00113f00 LAB_00113f00: JMP 0x00113f02 LAB_00113f02: MOV RDI,qword ptr [RBP + -0x150] CALL 0x0011fa40 MOV qword ptr [RBP + -0x168],RAX CMP RAX,0x0 JNZ 0x00113f48 LEA RDI,[0x14b0e4] LEA RSI,[0x14b2a2] LEA RDX,[0x14b10c] MOV ECX,0x1a3 MOV AL,0x0 CALL 0x001155c0 MOV byte ptr [RBP + -0x141],0x1 JMP 0x00113fe5 LAB_00113f48: JMP 0x00113f4a LAB_00113f4a: JMP 0x00113f4c LAB_00113f4c: MOV RDI,qword ptr [RBP + -0x168] CALL 0x0011fd80 MOV qword ptr [RBP + -0x170],RAX CMP RAX,0x0 JNZ 0x00113f8f LEA RDI,[0x14b0e4] LEA RSI,[0x14b2b6] LEA RDX,[0x14b10c] MOV ECX,0x1a4 MOV AL,0x0 CALL 0x001155c0 MOV byte ptr [RBP + -0x141],0x1 JMP 0x00113fe5 LAB_00113f8f: JMP 0x00113f91 LAB_00113f91: MOV RAX,qword ptr [RBP + -0x170] CMP qword ptr [RAX],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x171],AL CMP byte ptr [RBP + -0x171],0x0 JNZ 0x00113fcd MOV RAX,qword ptr [RBP + -0x170] MOV RDI,qword ptr [RAX] CALL 0x001136b0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x160] MOV dword ptr [RAX],ECX LAB_00113fcd: MOV RDI,qword ptr [RBP + -0x168] CALL 0x00117280 MOV AL,byte ptr [RBP + -0x171] MOV byte ptr [RBP + -0x141],AL LAB_00113fe5: MOV AL,byte ptr [RBP + -0x141] MOV byte ptr [RBP + -0x172],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00114012 MOV AL,byte ptr [RBP + -0x172] ADD RSP,0x180 POP RBP RET LAB_00114012: CALL 0x001134b0
int8 query_int_variable(int8 param_1,int8 param_2,int *param_3) { int iVar1; long lVar2; long *plVar3; long in_FS_OFFSET; bool local_149; char local_148 [312]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); sprintf(local_148,"SELECT %s",param_2); iVar1 = mysql_query(param_1,local_148); if (iVar1 == 0) { lVar2 = mysql_store_result(param_1); if (lVar2 == 0) { diag("Error: %s (%s: %d)","Invaliid result set", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x1a3 ); local_149 = true; } else { plVar3 = (long *)mysql_fetch_row(lVar2); if (plVar3 == (long *)0x0) { diag("Error: %s (%s: %d)","Nothing to fetch", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h", 0x1a4); local_149 = true; } else { local_149 = *plVar3 == 0; if (!local_149) { iVar1 = atoi((char *)*plVar3); *param_3 = iVar1; } mysql_free_result(lVar2); } } } else { diag("Error: %s (%s: %d)","Query failed", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",0x1a2); local_149 = true; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_149); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,506
ggml_top_k
ngxson[P]ggml-easy/ggml/src/ggml.c
struct ggml_tensor * ggml_top_k( struct ggml_context * ctx, struct ggml_tensor * a, int k) { GGML_ASSERT(a->ne[0] >= k); struct ggml_tensor * result = ggml_argsort(ctx, a, GGML_SORT_ORDER_DESC); result = ggml_view_4d(ctx, result, k, result->ne[1], result->ne[2], result->ne[3], result->nb[1], result->nb[2], result->nb[3], 0); return result; }
O2
c
ggml_top_k: pushq %r14 pushq %rbx subq $0x28, %rsp movslq %edx, %rbx cmpq %rbx, 0x10(%rsi) jl 0x23de6 movq %rdi, %r14 pushq $0x1 popq %rdx callq 0x1c4e0 movq 0x18(%rax), %rcx movq 0x20(%rax), %r8 movq 0x28(%rax), %r9 movups 0x38(%rax), %xmm0 movq 0x48(%rax), %rdx movq %rdx, 0x10(%rsp) movups %xmm0, (%rsp) andq $0x0, 0x18(%rsp) movq %r14, %rdi movq %rax, %rsi movq %rbx, %rdx callq 0x1ed00 addq $0x28, %rsp popq %rbx popq %r14 retq leaq 0x27796(%rip), %rdi # 0x4b583 leaq 0x277da(%rip), %rdx # 0x4b5ce leaq 0x27f2d(%rip), %rcx # 0x4bd28 movl $0x111e, %esi # imm = 0x111E xorl %eax, %eax callq 0x1e770
ggml_top_k: push r14 push rbx sub rsp, 28h movsxd rbx, edx cmp [rsi+10h], rbx jl short loc_23DE6 mov r14, rdi push 1 pop rdx call _ggml_argsort mov rcx, [rax+18h] mov r8, [rax+20h] mov r9, [rax+28h] movups xmm0, xmmword ptr [rax+38h] mov rdx, [rax+48h] mov [rsp+38h+var_28], rdx movups [rsp+38h+var_38], xmm0 and [rsp+38h+var_20], 0 mov rdi, r14 mov rsi, rax mov rdx, rbx call _ggml_view_4d add rsp, 28h pop rbx pop r14 retn loc_23DE6: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANe0K; "a->ne[0] >= k" mov esi, 111Eh xor eax, eax call _ggml_abort
long long ggml_top_k( long long a1, long long a2, int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rbx long long v15; // rax __m128 v16; // xmm4 __m128 v17; // xmm5 char v19; // [rsp+0h] [rbp-38h] v14 = a3; if ( *(_QWORD *)(a2 + 16) < a3 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 4382, (long long)"GGML_ASSERT(%s) failed", (long long)"a->ne[0] >= k", a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v19); v15 = ggml_argsort(a1, a2, 1, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6); return ggml_view_4d( a1, (unsigned int *)v15, v14, *(_QWORD *)(v15 + 24), *(_QWORD *)(v15 + 32), *(_QWORD *)(v15 + 40), *(__m128 *)(v15 + 56), a8, a9, a10, v16, v17, a13, a14, *(_OWORD *)(v15 + 56), *(_QWORD *)(v15 + 72), 0LL); }
ggml_top_k: PUSH R14 PUSH RBX SUB RSP,0x28 MOVSXD RBX,EDX CMP qword ptr [RSI + 0x10],RBX JL 0x00123de6 MOV R14,RDI PUSH 0x1 POP RDX CALL 0x0011c4e0 MOV RCX,qword ptr [RAX + 0x18] MOV R8,qword ptr [RAX + 0x20] MOV R9,qword ptr [RAX + 0x28] MOVUPS XMM0,xmmword ptr [RAX + 0x38] MOV RDX,qword ptr [RAX + 0x48] MOV qword ptr [RSP + 0x10],RDX MOVUPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x18],0x0 MOV RDI,R14 MOV RSI,RAX MOV RDX,RBX CALL 0x0011ed00 ADD RSP,0x28 POP RBX POP R14 RET LAB_00123de6: LEA RDI,[0x14b583] LEA RDX,[0x14b5ce] LEA RCX,[0x14bd28] MOV ESI,0x111e XOR EAX,EAX CALL 0x0011e770
void ggml_top_k(int8 param_1,long param_2,int param_3) { long lVar1; if ((long)param_3 <= *(long *)(param_2 + 0x10)) { lVar1 = ggml_argsort(param_1,param_2,1); ggml_view_4d(param_1,lVar1,(long)param_3,*(int8 *)(lVar1 + 0x18), *(int8 *)(lVar1 + 0x20),*(int8 *)(lVar1 + 0x28), *(int4 *)(lVar1 + 0x38),*(int4 *)(lVar1 + 0x40), *(int8 *)(lVar1 + 0x48),0); return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x111e, "GGML_ASSERT(%s) failed","a->ne[0] >= k"); }
28,507
mi_store_bin_pack_key
eloqsql/storage/myisam/mi_search.c
void _mi_store_bin_pack_key(MI_KEYDEF *keyinfo __attribute__((unused)), register uchar *key_pos, register MI_KEY_PARAM *s_temp) { store_key_length_inc(key_pos,s_temp->ref_length); memcpy((char*) key_pos,(char*) s_temp->key+s_temp->ref_length, (size_t) s_temp->totlength-s_temp->ref_length); if (s_temp->next_key_pos) { key_pos+=(uint) (s_temp->totlength-s_temp->ref_length); store_key_length_inc(key_pos,s_temp->n_ref_length); if (s_temp->prev_length) /* If we must extend key */ { memcpy(key_pos,s_temp->prev_key,s_temp->prev_length); } } }
O0
c
mi_store_bin_pack_key: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0xff, (%rax) jae 0xc4e7b movq -0x18(%rbp), %rax movl (%rax), %eax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xc4eb2 movq -0x10(%rbp), %rax movb $-0x1, (%rax) movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movl -0x1c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x20(%rax), %rsi movq -0x18(%rbp), %rax movl (%rax), %eax addq %rax, %rsi movq -0x18(%rbp), %rax movl 0x10(%rax), %eax movl %eax, %edx movq -0x18(%rbp), %rax movl (%rax), %eax subq %rax, %rdx callq 0x2a090 movq -0x18(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0xc4f8e movq -0x18(%rbp), %rax movl 0x10(%rax), %ecx movq -0x18(%rbp), %rax subl (%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax cmpl $0xff, 0x8(%rax) jae 0xc4f30 movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movb %al, %cl movq -0x10(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %cl, (%rax) jmp 0xc4f68 movq -0x10(%rbp), %rax movb $-0x1, (%rax) movq -0x18(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movl -0x20(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x18(%rax) je 0xc4f8c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x28(%rax), %rsi movq -0x18(%rbp), %rax movl 0x18(%rax), %eax movl %eax, %edx callq 0x2a090 jmp 0xc4f8e addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
_mi_store_bin_pack_key: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] cmp dword ptr [rax], 0FFh jnb short loc_C4E7B mov rax, [rbp+var_18] mov eax, [rax] mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_C4EB2 loc_C4E7B: mov rax, [rbp+var_10] mov byte ptr [rax], 0FFh mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov eax, [rbp+var_1C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_C4EB2: mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+20h] mov rax, [rbp+var_18] mov eax, [rax] add rsi, rax mov rax, [rbp+var_18] mov eax, [rax+10h] mov edx, eax mov rax, [rbp+var_18] mov eax, [rax] sub rdx, rax call _memcpy mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 0 jz loc_C4F8E mov rax, [rbp+var_18] mov ecx, [rax+10h] mov rax, [rbp+var_18] sub ecx, [rax] mov rax, [rbp+var_10] mov ecx, ecx add rax, rcx mov [rbp+var_10], rax mov rax, [rbp+var_18] cmp dword ptr [rax+8], 0FFh jnb short loc_C4F30 mov rax, [rbp+var_18] mov eax, [rax+8] mov cl, al mov rax, [rbp+var_10] mov rdx, rax add rdx, 1 mov [rbp+var_10], rdx mov [rax], cl jmp short loc_C4F68 loc_C4F30: mov rax, [rbp+var_10] mov byte ptr [rax], 0FFh mov rax, [rbp+var_18] mov eax, [rax+8] mov [rbp+var_20], eax mov eax, [rbp+var_20] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov eax, [rbp+var_20] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_C4F68: mov rax, [rbp+var_18] cmp dword ptr [rax+18h], 0 jz short loc_C4F8C mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+28h] mov rax, [rbp+var_18] mov eax, [rax+18h] mov edx, eax call _memcpy loc_C4F8C: jmp short $+2 loc_C4F8E: add rsp, 20h pop rbp retn
long long mi_store_bin_pack_key(long long a1, _BYTE *a2, unsigned int *a3) { long long result; // rax _BYTE *v4; // rax unsigned int v5; // [rsp+0h] [rbp-20h] int v6; // [rsp+4h] [rbp-1Ch] _BYTE *v8; // [rsp+10h] [rbp-10h] _BYTE *v9; // [rsp+10h] [rbp-10h] _BYTE *v10; // [rsp+10h] [rbp-10h] if ( *a3 >= 0xFF ) { *a2 = -1; v6 = *a3; a2[2] = *a3; a2[1] = BYTE1(v6); v8 = a2 + 3; } else { v8 = a2 + 1; *a2 = *a3; } memcpy(v8, *a3 + *((_QWORD *)a3 + 4), a3[4] - (unsigned long long)*a3); result = (long long)a3; if ( *((_QWORD *)a3 + 6) ) { v9 = &v8[a3[4] - *a3]; if ( a3[2] >= 0xFF ) { *v9 = -1; v5 = a3[2]; v9[2] = v5; v9[1] = BYTE1(v5); v10 = v9 + 3; } else { v4 = v9; v10 = v9 + 1; *v4 = a3[2]; } result = (long long)a3; if ( a3[6] ) return memcpy(v10, *((_QWORD *)a3 + 5), a3[6]); } return result; }
_mi_store_bin_pack_key: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0xff JNC 0x001c4e7b MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x001c4eb2 LAB_001c4e7b: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV EAX,dword ptr [RBP + -0x1c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_001c4eb2: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] SUB RDX,RAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x0 JZ 0x001c4f8e MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] SUB ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x8],0xff JNC 0x001c4f30 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RAX],CL JMP 0x001c4f68 LAB_001c4f30: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0xff MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV EAX,dword ptr [RBP + -0x20] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_001c4f68: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x18],0x0 JZ 0x001c4f8c MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x18] MOV EDX,EAX CALL 0x0012a090 LAB_001c4f8c: JMP 0x001c4f8e LAB_001c4f8e: ADD RSP,0x20 POP RBP RET
void _mi_store_bin_pack_key(int8 param_1,int1 *param_2,uint *param_3) { uint uVar1; int1 *puVar2; int1 *local_18; if (*param_3 < 0xff) { local_18 = param_2 + 1; *param_2 = (char)*param_3; } else { *param_2 = 0xff; uVar1 = *param_3; param_2[2] = (char)uVar1; param_2[1] = (char)(uVar1 >> 8); local_18 = param_2 + 3; } memcpy(local_18,(void *)(*(long *)(param_3 + 8) + (ulong)*param_3), (ulong)param_3[4] - (ulong)*param_3); if (*(long *)(param_3 + 0xc) != 0) { puVar2 = local_18 + (param_3[4] - *param_3); if (param_3[2] < 0xff) { local_18 = puVar2 + 1; *puVar2 = (char)param_3[2]; } else { *puVar2 = 0xff; uVar1 = param_3[2]; puVar2[2] = (char)uVar1; puVar2[1] = (char)(uVar1 >> 8); local_18 = puVar2 + 3; } if (param_3[6] != 0) { memcpy(local_18,*(void **)(param_3 + 10),(ulong)param_3[6]); } } return; }
28,508
my_numcells_sjis
eloqsql/strings/ctype-sjis.c
static size_t my_numcells_sjis(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O3
c
my_numcells_sjis: cmpq %rdx, %rsi jae 0xb6913 pushq %rbp movq %rsp, %rbp xorl %eax, %eax movl $0x1, %ecx movb (%rsi), %dil leal 0x5f(%rdi), %r8d shrb $0x7, %dil movzbl %dil, %edi incq %rdi cmpb $0x3f, %r8b cmovbq %rcx, %rdi addq %rdi, %rax addq %rdi, %rsi cmpq %rdx, %rsi jb 0xb68ec popq %rbp retq xorl %eax, %eax retq
my_numcells_sjis: cmp rsi, rdx jnb short loc_B6913 push rbp mov rbp, rsp xor eax, eax mov ecx, 1 loc_B68EC: mov dil, [rsi] lea r8d, [rdi+5Fh] shr dil, 7 movzx edi, dil inc rdi cmp r8b, 3Fh ; '?' cmovb rdi, rcx add rax, rdi add rsi, rdi cmp rsi, rdx jb short loc_B68EC pop rbp retn loc_B6913: xor eax, eax retn
long long my_numcells_sjis(long long a1, _BYTE *a2, unsigned long long a3) { long long result; // rax long long v4; // rdi if ( (unsigned long long)a2 >= a3 ) return 0LL; result = 0LL; do { v4 = (*a2 >> 7) + 1LL; if ( (unsigned __int8)(*a2 + 95) < 0x3Fu ) v4 = 1LL; result += v4; a2 += v4; } while ( (unsigned long long)a2 < a3 ); return result; }
my_numcells_sjis: CMP RSI,RDX JNC 0x001b6913 PUSH RBP MOV RBP,RSP XOR EAX,EAX MOV ECX,0x1 LAB_001b68ec: MOV DIL,byte ptr [RSI] LEA R8D,[RDI + 0x5f] SHR DIL,0x7 MOVZX EDI,DIL INC RDI CMP R8B,0x3f CMOVC RDI,RCX ADD RAX,RDI ADD RSI,RDI CMP RSI,RDX JC 0x001b68ec POP RBP RET LAB_001b6913: XOR EAX,EAX RET
long my_numcells_sjis(int8 param_1,byte *param_2,byte *param_3) { long lVar1; long lVar2; if (param_2 < param_3) { lVar1 = 0; do { lVar2 = (ulong)(*param_2 >> 7) + 1; if ((byte)(*param_2 + 0x5f) < 0x3f) { lVar2 = 1; } lVar1 = lVar1 + lVar2; param_2 = param_2 + lVar2; } while (param_2 < param_3); return lVar1; } return 0; }
28,509
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) { std::vector<std::string> rules; for (size_t i = 0; i < alt_schemas.size(); i++) { rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i))); } return string_join(rules, " | "); }
O3
cpp
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rdx, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) movq %rdi, 0x98(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x80(%rsp) movq $0x0, 0x90(%rsp) movq (%rcx), %r12 movq %rcx, 0xa0(%rsp) cmpq %r12, 0x8(%rcx) je 0xc45c4 leaq 0x70(%rsp), %rbp xorl %r13d, %r13d leaq 0x40(%rsp), %r14 movq %rbp, %rbx movq 0xb0(%rsp), %rcx movq 0x8(%rcx), %rbp leaq 0x10(%rsp), %rax movq %rax, (%rsp) movq (%rcx), %rsi leaq (%rsi,%rbp), %rdx movq %rsp, %r15 movq %r15, %rdi callq 0x224fc testq %rbp, %rbp leaq 0x30859(%rip), %rsi # 0xf4c27 leaq 0x308fb(%rip), %rax # 0xf4cd0 cmoveq %rax, %rsi movq %r15, %rdi callq 0x1b070 movl $0x1, %esi cmpq $0xa, %r13 movq %rbx, %rbp jb 0xc443e movl $0x4, %esi movq %r13, %rcx movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B cmpq $0x63, %rcx jbe 0xc4437 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0xc443c cmpq $0x2710, %rcx # imm = 0x2710 jb 0xc443e movq %rcx, %rax mulq %rdi shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0xc4401 addl $-0x3, %esi jmp 0xc443e addl $-0x2, %esi jmp 0xc443e decl %esi movl %esi, %esi movq %rbp, 0x60(%rsp) leaq 0x60(%rsp), %rdi xorl %edx, %edx callq 0x1a9d0 movq 0x60(%rsp), %rdi movl 0x68(%rsp), %esi movq %r13, %rdx callq 0x5e54b movq (%rsp), %rcx movl $0xf, %edi leaq 0x10(%rsp), %rax cmpq %rax, %rcx je 0xc447a movq 0x10(%rsp), %rdi movq 0x8(%rsp), %r8 movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx leaq (%rdx,%r8), %rax cmpq %rdi, %rax jbe 0xc44a6 movl $0xf, %edi cmpq %rbp, %rsi je 0xc44a1 movq 0x70(%rsp), %rdi cmpq %rdi, %rax jbe 0xc44b0 movq %rsp, %rdi callq 0x1a250 jmp 0xc44be leaq 0x60(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1a980 leaq 0x30(%rsp), %rsi movq %rsi, 0x20(%rsp) movq (%rax), %rdx leaq 0x10(%rax), %rcx cmpq %rcx, %rdx je 0xc44e3 movq %rdx, 0x20(%rsp) movq (%rcx), %rdx movq %rdx, 0x30(%rsp) jmp 0xc44e9 movups (%rcx), %xmm0 movups %xmm0, (%rsi) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x28(%rsp) movq %rcx, (%rax) movq %r13, %rax shlq $0x4, %rax addq %rax, %r12 movq $0x0, (%rdx) movb $0x0, (%rcx) movq %r14, %rdi movq 0xa8(%rsp), %rsi movq %r12, %rdx leaq 0x20(%rsp), %rcx callq 0xc158a leaq 0x80(%rsp), %rdi movq %r14, %rsi leaq 0x30(%rsp), %r12 callq 0x56880 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xc4559 movq 0x50(%rsp), %rsi incq %rsi callq 0x1a890 movq 0x20(%rsp), %rdi cmpq %r12, %rdi je 0xc4570 movq 0x30(%rsp), %rsi incq %rsi callq 0x1a890 movq 0x60(%rsp), %rdi cmpq %rbp, %rdi je 0xc4587 movq 0x70(%rsp), %rsi incq %rsi callq 0x1a890 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xc45a2 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a890 incq %r13 movq 0xa0(%rsp), %rax movq (%rax), %r12 movq 0x8(%rax), %rax subq %r12, %rax sarq $0x4, %rax cmpq %rax, %r13 jb 0xc439a leaq 0x50(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x308b3(%rip), %rsi # 0xf4e87 leaq 0x308af(%rip), %rdx # 0xf4e8a leaq 0x40(%rsp), %rdi callq 0x229de leaq 0x80(%rsp), %rsi leaq 0x40(%rsp), %rdx movq 0x98(%rsp), %r14 movq %r14, %rdi callq 0x730f5 movq 0x40(%rsp), %rdi cmpq %rbx, %rdi je 0xc4619 movq 0x50(%rsp), %rsi incq %rsi callq 0x1a890 leaq 0x80(%rsp), %rdi callq 0x2161a movq %r14, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq 0x40(%rsp), %rdi cmpq %rbx, %rdi je 0xc46d8 movq 0x50(%rsp), %rsi jmp 0xc46d0 jmp 0xc4655 movq %rax, %r14 jmp 0xc46d8 jmp 0xc465c movq %rax, %r14 jmp 0xc46bd movq %rax, %r14 jmp 0xc46a6 movq %rax, %r14 jmp 0xc468a movq %rax, %r14 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xc468a movq 0x50(%rsp), %rsi incq %rsi callq 0x1a890 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0xc46a6 movq 0x30(%rsp), %rsi incq %rsi callq 0x1a890 movq 0x60(%rsp), %rdi cmpq %rbx, %rdi je 0xc46bd movq 0x70(%rsp), %rsi incq %rsi callq 0x1a890 movq (%rsp), %rdi leaq 0x10(%rsp), %rax cmpq %rax, %rdi je 0xc46d8 movq 0x10(%rsp), %rsi incq %rsi callq 0x1a890 leaq 0x80(%rsp), %rdi callq 0x2161a movq %r14, %rdi callq 0x1af20 nop
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov [rsp+0E8h+var_38], rdx mov [rsp+0E8h+var_40], rsi mov [rsp+0E8h+var_50], rdi xorps xmm0, xmm0 movaps [rsp+0E8h+var_68], xmm0 mov [rsp+0E8h+var_58], 0 mov r12, [rcx] mov [rsp+0E8h+var_48], rcx cmp [rcx+8], r12 jz loc_C45C4 lea rbp, [rsp+0E8h+var_78] xor r13d, r13d lea r14, [rsp+0E8h+var_A8] loc_C439A: mov rbx, rbp mov rcx, [rsp+0E8h+var_38] mov rbp, [rcx+8] lea rax, [rsp+0E8h+var_D8] mov [rsp+0E8h+var_E8], rax mov rsi, [rcx] lea rdx, [rsi+rbp] mov r15, rsp mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) test rbp, rbp lea rsi, aTuple+5; "-" lea rax, aAlternative; "alternative-" cmovz rsi, rax mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov esi, 1 cmp r13, 0Ah mov rbp, rbx jb short loc_C443E mov esi, 4 mov rcx, r13 mov rdi, 346DC5D63886594Bh loc_C4401: cmp rcx, 63h ; 'c' jbe short loc_C4437 cmp rcx, 3E7h jbe short loc_C443C cmp rcx, 2710h jb short loc_C443E mov rax, rcx mul rdi shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_C4401 add esi, 0FFFFFFFDh jmp short loc_C443E loc_C4437: add esi, 0FFFFFFFEh jmp short loc_C443E loc_C443C: dec esi loc_C443E: mov esi, esi mov [rsp+0E8h+var_88], rbp lea rdi, [rsp+0E8h+var_88] xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [rsp+0E8h+var_88] mov esi, dword ptr [rsp+0E8h+var_80] mov rdx, r13 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) mov rcx, [rsp+0E8h+var_E8] mov edi, 0Fh lea rax, [rsp+0E8h+var_D8] cmp rcx, rax jz short loc_C447A mov rdi, [rsp+0E8h+var_D8] loc_C447A: mov r8, [rsp+0E8h+var_E0] mov rsi, [rsp+0E8h+var_88] mov rdx, [rsp+0E8h+var_80] lea rax, [rdx+r8] cmp rax, rdi jbe short loc_C44A6 mov edi, 0Fh cmp rsi, rbp jz short loc_C44A1 mov rdi, [rsp+0E8h+var_78] loc_C44A1: cmp rax, rdi jbe short loc_C44B0 loc_C44A6: mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_C44BE loc_C44B0: lea rdi, [rsp+0E8h+var_88] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_C44BE: lea rsi, [rsp+0E8h+var_B8] mov [rsp+0E8h+var_C8], rsi mov rdx, [rax] lea rcx, [rax+10h] cmp rdx, rcx jz short loc_C44E3 mov [rsp+0E8h+var_C8], rdx mov rdx, [rcx] mov [rsp+0E8h+var_B8], rdx jmp short loc_C44E9 loc_C44E3: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rsi], xmm0 loc_C44E9: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+0E8h+var_C0], rsi mov [rax], rcx mov rax, r13 shl rax, 4 add r12, rax mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 mov rdi, r14 mov rsi, [rsp+0E8h+var_40] mov rdx, r12 lea rcx, [rsp+0E8h+var_C8] call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,std::string const&) lea rdi, [rsp+0E8h+var_68] mov rsi, r14 lea r12, [rsp+0E8h+var_B8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+0E8h+var_A8]; void * lea rax, [rsp+0E8h+var_98] cmp rdi, rax jz short loc_C4559 mov rsi, [rsp+0E8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C4559: mov rdi, [rsp+0E8h+var_C8]; void * cmp rdi, r12 jz short loc_C4570 mov rsi, [rsp+0E8h+var_B8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C4570: mov rdi, [rsp+0E8h+var_88]; void * cmp rdi, rbp jz short loc_C4587 mov rsi, [rsp+0E8h+var_78] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C4587: mov rdi, [rsp+0E8h+var_E8]; void * lea rax, [rsp+0E8h+var_D8] cmp rdi, rax jz short loc_C45A2 mov rsi, [rsp+0E8h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C45A2: inc r13 mov rax, [rsp+0E8h+var_48] mov r12, [rax] mov rax, [rax+8] sub rax, r12 sar rax, 4 cmp r13, rax jb loc_C439A loc_C45C4: lea rbx, [rsp+0E8h+var_98] mov [rbx-10h], rbx lea rsi, asc_F4E86+1; " | " lea rdx, asc_F4E86+4; "" lea rdi, [rsp+0E8h+var_A8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rsp+0E8h+var_68] lea rdx, [rsp+0E8h+var_A8] mov r14, [rsp+0E8h+var_50] mov rdi, r14 call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) mov rdi, [rsp+0E8h+var_A8]; void * cmp rdi, rbx jz short loc_C4619 mov rsi, [rsp+0E8h+var_98] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C4619: lea rdi, [rsp+0E8h+var_68] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, r14 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rsp+arg_38] cmp rdi, rbx jz loc_C46D8 mov rsi, [rsp+arg_48] jmp short loc_C46D0 jmp short $+2 loc_C4655: mov r14, rax jmp short loc_C46D8 jmp short $+2 loc_C465C: mov r14, rax jmp short loc_C46BD mov r14, rax jmp short loc_C46A6 mov r14, rax jmp short loc_C468A mov r14, rax mov rdi, [rsp+arg_38]; void * lea rax, [rsp+arg_48] cmp rdi, rax jz short loc_C468A mov rsi, [rsp+arg_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C468A: mov rdi, [rsp+arg_18]; void * lea rax, [rsp+arg_28] cmp rdi, rax jz short loc_C46A6 mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C46A6: mov rdi, [rsp+arg_58]; void * cmp rdi, rbx jz short loc_C46BD mov rsi, [rsp+arg_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C46BD: mov rdi, [rsp+0]; void * lea rax, [rsp+arg_8] cmp rdi, rax jz short loc_C46D8 mov rsi, [rsp+arg_8] loc_C46D0: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C46D8: lea rdi, [rsp+arg_78] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
long long SchemaConverter::_generate_union_rule(long long a1, long long a2, long long a3, long long *a4) { __m128d v4; // xmm0 long long v5; // r12 unsigned long long *v6; // rbp unsigned long long v7; // r13 unsigned long long *v8; // rbx long long v9; // rbp char *v10; // rsi unsigned int v11; // esi unsigned long long v12; // rcx bool v13; // cc unsigned long long v14; // rdi unsigned long long v15; // rdi void **v16; // rax __m128d *v17; // rcx long long v18; // r14 void *v20; // [rsp+0h] [rbp-E8h] BYREF long long v21; // [rsp+8h] [rbp-E0h] _QWORD v22[2]; // [rsp+10h] [rbp-D8h] BYREF void *v23[2]; // [rsp+20h] [rbp-C8h] BYREF __m128d v24; // [rsp+30h] [rbp-B8h] BYREF void *v25[2]; // [rsp+40h] [rbp-A8h] BYREF _QWORD v26[2]; // [rsp+50h] [rbp-98h] BYREF void *v27; // [rsp+60h] [rbp-88h] BYREF long long v28; // [rsp+68h] [rbp-80h] unsigned long long v29; // [rsp+70h] [rbp-78h] BYREF __int128 v30; // [rsp+80h] [rbp-68h] BYREF long long v31; // [rsp+90h] [rbp-58h] long long v32; // [rsp+98h] [rbp-50h] long long *v33; // [rsp+A0h] [rbp-48h] long long v34; // [rsp+A8h] [rbp-40h] long long v35; // [rsp+B0h] [rbp-38h] v35 = a3; v34 = a2; v32 = a1; v4 = 0LL; v30 = 0LL; v31 = 0LL; v5 = *a4; v33 = a4; if ( a4[1] != v5 ) { v6 = &v29; v7 = 0LL; do { v8 = v6; v9 = *(_QWORD *)(v35 + 8); v20 = v22; std::string::_M_construct<char *>((long long)&v20, *(_BYTE **)v35, *(_QWORD *)v35 + v9); v10 = "-"; if ( !v9 ) v10 = "alternative-"; std::string::append(&v20, v10); v11 = 1; v6 = v8; if ( v7 >= 0xA ) { v11 = 4; v12 = v7; while ( 1 ) { if ( v12 <= 0x63 ) { v11 -= 2; goto LABEL_14; } if ( v12 <= 0x3E7 ) break; if ( v12 < 0x2710 ) goto LABEL_14; v11 += 4; v13 = v12 <= 0x1869F; v12 /= 0x2710uLL; if ( v13 ) { v11 -= 3; goto LABEL_14; } } --v11; } LABEL_14: v27 = v8; std::string::_M_construct(&v27, v11, 0LL); std::__detail::__to_chars_10_impl<unsigned long>((char *)v27, v28, v7); v14 = 15LL; if ( v20 != v22 ) v14 = v22[0]; if ( v28 + v21 <= v14 ) goto LABEL_20; v15 = 15LL; if ( v27 != v8 ) v15 = v29; if ( v28 + v21 <= v15 ) v16 = (void **)std::string::replace(&v27, 0LL, 0LL, v20, v21); else LABEL_20: v16 = (void **)std::string::_M_append(&v20, v27, v28); v23[0] = &v24; v17 = (__m128d *)(v16 + 2); if ( *v16 == v16 + 2 ) { v4 = *v17; v24 = *v17; } else { v23[0] = *v16; v24.m128d_f64[0] = v17->m128d_f64[0]; } v23[1] = v16[1]; *v16 = v17; v16[1] = 0LL; LOBYTE(v17->m128d_f64[0]) = 0; SchemaConverter::visit(v25, v34, (unsigned __int8 *)(16 * v7 + v5), (long long)v23, v4); std::vector<std::string>::emplace_back<std::string>((long long)&v30, (long long)v25); if ( v25[0] != v26 ) operator delete(v25[0], v26[0] + 1LL); if ( v23[0] != &v24 ) operator delete(v23[0], *(_QWORD *)&v24.m128d_f64[0] + 1LL); if ( v27 != v8 ) operator delete(v27, v29 + 1); if ( v20 != v22 ) operator delete(v20, v22[0] + 1LL); ++v7; v5 = *v33; } while ( v7 < (v33[1] - *v33) >> 4 ); } v25[0] = v26; std::string::_M_construct<char const*>((long long)v25, " | ", (long long)""); v18 = v32; string_join(v32, (long long *)&v30, v25); if ( v25[0] != v26 ) operator delete(v25[0], v26[0] + 1LL); std::vector<std::string>::~vector((long long)&v30); return v18; }
_generate_union_rule: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV qword ptr [RSP + 0xb0],RDX MOV qword ptr [RSP + 0xa8],RSI MOV qword ptr [RSP + 0x98],RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM0 MOV qword ptr [RSP + 0x90],0x0 MOV R12,qword ptr [RCX] MOV qword ptr [RSP + 0xa0],RCX CMP qword ptr [RCX + 0x8],R12 JZ 0x001c45c4 LEA RBP,[RSP + 0x70] XOR R13D,R13D LEA R14,[RSP + 0x40] LAB_001c439a: MOV RBX,RBP MOV RCX,qword ptr [RSP + 0xb0] MOV RBP,qword ptr [RCX + 0x8] LEA RAX,[RSP + 0x10] MOV qword ptr [RSP],RAX MOV RSI,qword ptr [RCX] LEA RDX,[RSI + RBP*0x1] LAB_001c43b9: MOV R15,RSP MOV RDI,R15 CALL 0x001224fc TEST RBP,RBP LEA RSI,[0x1f4c27] LEA RAX,[0x1f4cd0] CMOVZ RSI,RAX LAB_001c43d9: MOV RDI,R15 CALL 0x0011b070 MOV ESI,0x1 CMP R13,0xa MOV RBP,RBX JC 0x001c443e MOV ESI,0x4 MOV RCX,R13 MOV RDI,0x346dc5d63886594b LAB_001c4401: CMP RCX,0x63 JBE 0x001c4437 CMP RCX,0x3e7 JBE 0x001c443c CMP RCX,0x2710 JC 0x001c443e MOV RAX,RCX MUL RDI SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x001c4401 ADD ESI,-0x3 JMP 0x001c443e LAB_001c4437: ADD ESI,-0x2 JMP 0x001c443e LAB_001c443c: DEC ESI LAB_001c443e: MOV ESI,ESI MOV qword ptr [RSP + 0x60],RBP LAB_001c4445: LEA RDI,[RSP + 0x60] XOR EDX,EDX CALL 0x0011a9d0 MOV RDI,qword ptr [RSP + 0x60] MOV ESI,dword ptr [RSP + 0x68] MOV RDX,R13 CALL 0x0015e54b MOV RCX,qword ptr [RSP] MOV EDI,0xf LEA RAX,[RSP + 0x10] CMP RCX,RAX JZ 0x001c447a MOV RDI,qword ptr [RSP + 0x10] LAB_001c447a: MOV R8,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] LEA RAX,[RDX + R8*0x1] CMP RAX,RDI JBE 0x001c44a6 MOV EDI,0xf CMP RSI,RBP JZ 0x001c44a1 MOV RDI,qword ptr [RSP + 0x70] LAB_001c44a1: CMP RAX,RDI JBE 0x001c44b0 LAB_001c44a6: MOV RDI,RSP CALL 0x0011a250 JMP 0x001c44be LAB_001c44b0: LEA RDI,[RSP + 0x60] XOR ESI,ESI XOR EDX,EDX CALL 0x0011a980 LAB_001c44be: LEA RSI,[RSP + 0x30] MOV qword ptr [RSP + 0x20],RSI MOV RDX,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RDX,RCX JZ 0x001c44e3 MOV qword ptr [RSP + 0x20],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x30],RDX JMP 0x001c44e9 LAB_001c44e3: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RSI],XMM0 LAB_001c44e9: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RAX],RCX MOV RAX,R13 SHL RAX,0x4 ADD R12,RAX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 LAB_001c4510: MOV RDI,R14 MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,R12 LEA RCX,[RSP + 0x20] CALL 0x001c158a LAB_001c4528: LEA RDI,[RSP + 0x80] MOV RSI,R14 LEA R12,[RSP + 0x30] CALL 0x00156880 MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x001c4559 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011a890 LAB_001c4559: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R12 JZ 0x001c4570 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011a890 LAB_001c4570: MOV RDI,qword ptr [RSP + 0x60] CMP RDI,RBP JZ 0x001c4587 MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x0011a890 LAB_001c4587: MOV RDI,qword ptr [RSP] LEA RAX,[RSP + 0x10] CMP RDI,RAX JZ 0x001c45a2 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011a890 LAB_001c45a2: INC R13 MOV RAX,qword ptr [RSP + 0xa0] MOV R12,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] SUB RAX,R12 SAR RAX,0x4 CMP R13,RAX JC 0x001c439a LAB_001c45c4: LEA RBX,[RSP + 0x50] MOV qword ptr [RBX + -0x10],RBX LAB_001c45cd: LEA RSI,[0x1f4e87] LEA RDX,[0x1f4e8a] LEA RDI,[RSP + 0x40] CALL 0x001229de LAB_001c45e5: LEA RSI,[RSP + 0x80] LEA RDX,[RSP + 0x40] MOV R14,qword ptr [RSP + 0x98] MOV RDI,R14 CALL 0x001730f5 LAB_001c4602: MOV RDI,qword ptr [RSP + 0x40] CMP RDI,RBX JZ 0x001c4619 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011a890 LAB_001c4619: LEA RDI,[RSP + 0x80] CALL 0x0012161a MOV RAX,R14 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::_generate_union_rule(std::__cxx11::string const&, 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> > > const&) */ vector * SchemaConverter::_generate_union_rule(string *param_1,vector *param_2) { long *plVar1; ulong uVar2; bool bVar3; string *psVar4; char cVar5; int8 *puVar6; long *in_RCX; ulong uVar7; long *in_RDX; char cVar8; ulong uVar9; ulong *local_e8; long local_e0; ulong local_d8 [2]; long *local_c8; int8 local_c0; long local_b8; int8 uStack_b0; long *local_a8 [2]; long local_98 [2]; ulong *local_88; uint local_80; int4 uStack_7c; ulong local_78 [2]; int8 local_68; int8 uStack_60; int8 local_58; string *local_50; long *local_48; vector *local_40; long *local_38; local_68 = 0; uStack_60 = 0; local_58 = 0; local_50 = param_1; local_40 = param_2; if (in_RCX[1] != *in_RCX) { uVar9 = 0; local_48 = in_RCX; local_38 = in_RDX; do { local_e8 = local_d8; /* try { // try from 001c43b9 to 001c43c3 has its CatchHandler @ 001c4655 */ std::__cxx11::string::_M_construct<char*>(&local_e8,*local_38,*local_38 + local_38[1]); /* try { // try from 001c43d9 to 001c43e0 has its CatchHandler @ 001c465a */ std::__cxx11::string::append((char *)&local_e8); cVar8 = '\x01'; if (9 < uVar9) { uVar7 = uVar9; cVar5 = '\x04'; do { cVar8 = cVar5; if (uVar7 < 100) { cVar8 = cVar8 + -2; goto LAB_001c443e; } if (uVar7 < 1000) { cVar8 = cVar8 + -1; goto LAB_001c443e; } if (uVar7 < 10000) goto LAB_001c443e; bVar3 = 99999 < uVar7; uVar7 = uVar7 / 10000; cVar5 = cVar8 + '\x04'; } while (bVar3); cVar8 = cVar8 + '\x01'; } LAB_001c443e: /* try { // try from 001c4445 to 001c4450 has its CatchHandler @ 001c465c */ local_88 = local_78; std::__cxx11::string::_M_construct((ulong)&local_88,cVar8); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_88,local_80,uVar9); uVar7 = 0xf; if (local_e8 != local_d8) { uVar7 = local_d8[0]; } uVar2 = CONCAT44(uStack_7c,local_80) + local_e0; if (uVar7 < uVar2) { uVar7 = 0xf; if (local_88 != local_78) { uVar7 = local_78[0]; } if (uVar7 < uVar2) goto LAB_001c44a6; puVar6 = (int8 *) std::__cxx11::string::replace((ulong)&local_88,0,(char *)0x0,(ulong)local_e8); } else { LAB_001c44a6: /* try { // try from 001c44a6 to 001c44bd has its CatchHandler @ 001c4661 */ puVar6 = (int8 *)std::__cxx11::string::_M_append((char *)&local_e8,(ulong)local_88); } local_c8 = &local_b8; plVar1 = puVar6 + 2; if ((long *)*puVar6 == plVar1) { local_b8 = *plVar1; uStack_b0 = puVar6[3]; } else { local_b8 = *plVar1; local_c8 = (long *)*puVar6; } local_c0 = puVar6[1]; *puVar6 = plVar1; puVar6[1] = 0; *(int1 *)plVar1 = 0; /* try { // try from 001c4510 to 001c4527 has its CatchHandler @ 001c4666 */ visit((basic_json *)local_a8,(string *)local_40); /* try { // try from 001c4528 to 001c453c has its CatchHandler @ 001c466b */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68, (string *)local_a8); if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } if (local_c8 != &local_b8) { operator_delete(local_c8,local_b8 + 1); } if (local_88 != local_78) { operator_delete(local_88,local_78[0] + 1); } if (local_e8 != local_d8) { operator_delete(local_e8,local_d8[0] + 1); } uVar9 = uVar9 + 1; } while (uVar9 < (ulong)(local_48[1] - *local_48 >> 4)); } /* try { // try from 001c45cd to 001c45e4 has its CatchHandler @ 001c4653 */ local_a8[0] = local_98; std::__cxx11::string::_M_construct<char_const*>(local_a8,&DAT_001f4e87,&DAT_001f4e8a); psVar4 = local_50; /* try { // try from 001c45e5 to 001c4601 has its CatchHandler @ 001c463b */ string_join((vector *)local_50,(string *)&local_68); if (local_a8[0] != local_98) { operator_delete(local_a8[0],local_98[0] + 1); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_68); return (vector *)psVar4; }
28,510
JS_ObjectDefineProperties
bluesky950520[P]quickjs/quickjs.c
static __exception int JS_ObjectDefineProperties(JSContext *ctx, JSValue obj, JSValue properties) { JSValue props, desc; JSObject *p; JSPropertyEnum *atoms; uint32_t len, i; int ret = -1; if (!JS_IsObject(obj)) { JS_ThrowTypeError(ctx, "Object.defineProperties called on non-object"); return -1; } desc = JS_UNDEFINED; props = JS_ToObject(ctx, properties); if (JS_IsException(props)) return -1; p = JS_VALUE_GET_OBJ(props); if (JS_GetOwnPropertyNamesInternal(ctx, &atoms, &len, p, JS_GPN_ENUM_ONLY | JS_GPN_STRING_MASK | JS_GPN_SYMBOL_MASK) < 0) goto exception; // XXX: ECMA specifies that all descriptions should be validated before // modifying the object. This would require allocating an array // JSPropertyDescriptor and use 2 separate loops. for(i = 0; i < len; i++) { JS_FreeValue(ctx, desc); desc = JS_GetProperty(ctx, props, atoms[i].atom); if (JS_IsException(desc)) goto exception; if (JS_DefinePropertyDesc(ctx, obj, atoms[i].atom, desc, JS_PROP_THROW | JS_PROP_DEFINE_PROPERTY) < 0) goto exception; } ret = 0; exception: js_free_prop_enum(ctx, atoms, len); JS_FreeValue(ctx, props); JS_FreeValue(ctx, desc); return ret; }
O0
c
JS_ObjectDefineProperties: subq $0xb8, %rsp movq %rsi, 0xa0(%rsp) movq %rdx, 0xa8(%rsp) movq %rcx, 0x90(%rsp) movq %r8, 0x98(%rsp) movq %rdi, 0x88(%rsp) movl $0xffffffff, 0x4c(%rsp) # imm = 0xFFFFFFFF movq 0xa0(%rsp), %rdi movq 0xa8(%rsp), %rsi callq 0x2af70 cmpl $0x0, %eax jne 0xc08d1 movq 0x88(%rsp), %rdi leaq 0x501a3(%rip), %rsi # 0x110a53 movb $0x0, %al callq 0x2d300 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF jmp 0xc0ac7 movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x88(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x37770 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x78(%rsp), %rdi movq 0x80(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xc095b movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF jmp 0xc0ac7 movq 0x78(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x88(%rsp), %rdi movq 0x60(%rsp), %rcx leaq 0x58(%rsp), %rsi leaq 0x54(%rsp), %rdx movl $0x13, %r8d callq 0x2f5e0 cmpl $0x0, %eax jge 0xc0991 jmp 0xc0a75 movl $0x0, 0x50(%rsp) movl 0x50(%rsp), %eax cmpl 0x54(%rsp), %eax jae 0xc0a6d movq 0x88(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x23c90 movq 0x88(%rsp), %rdi movq 0x58(%rsp), %rax movl 0x50(%rsp), %ecx movl 0x4(%rax,%rcx,8), %ecx movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx callq 0x29d80 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x68(%rsp), %rdi movq 0x70(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0xc0a19 jmp 0xc0a75 movq 0x88(%rsp), %rdi movq 0x58(%rsp), %rax movl 0x50(%rsp), %ecx movl 0x4(%rax,%rcx,8), %ecx movq 0xa0(%rsp), %rsi movq 0xa8(%rsp), %rdx movq 0x68(%rsp), %r8 movq 0x70(%rsp), %r9 movl $0x44000, (%rsp) # imm = 0x44000 callq 0xc0ae0 cmpl $0x0, %eax jge 0xc0a5b jmp 0xc0a75 jmp 0xc0a5d movl 0x50(%rsp), %eax addl $0x1, %eax movl %eax, 0x50(%rsp) jmp 0xc0999 movl $0x0, 0x4c(%rsp) movq 0x88(%rsp), %rdi movq 0x58(%rsp), %rsi movl 0x54(%rsp), %edx callq 0x30a40 movq 0x88(%rsp), %rdi movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdx callq 0x23c90 movq 0x88(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdx callq 0x23c90 movl 0x4c(%rsp), %eax movl %eax, 0xb4(%rsp) movl 0xb4(%rsp), %eax addq $0xb8, %rsp retq nopw %cs:(%rax,%rax)
JS_ObjectDefineProperties: sub rsp, 0B8h mov [rsp+0B8h+var_18], rsi mov [rsp+0B8h+var_10], rdx mov [rsp+0B8h+var_28], rcx mov [rsp+0B8h+var_20], r8 mov [rsp+0B8h+var_30], rdi mov [rsp+0B8h+var_6C], 0FFFFFFFFh mov rdi, [rsp+0B8h+var_18] mov rsi, [rsp+0B8h+var_10] call JS_IsObject cmp eax, 0 jnz short loc_C08D1 mov rdi, [rsp+0B8h+var_30] lea rsi, aObjectDefinepr; "Object.defineProperties called on non-o"... mov al, 0 call JS_ThrowTypeError mov [rsp+0B8h+var_80], rax mov [rsp+0B8h+var_78], rdx mov [rsp+0B8h+var_4], 0FFFFFFFFh jmp loc_C0AC7 loc_C08D1: mov dword ptr [rsp+0B8h+var_90], 0 mov [rsp+0B8h+var_88], 3 mov rax, [rsp+0B8h+var_90] mov [rsp+0B8h+var_50], rax mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_48], rax mov rdi, [rsp+0B8h+var_30] mov rsi, [rsp+0B8h+var_28] mov rdx, [rsp+0B8h+var_20] call JS_ToObject mov [rsp+0B8h+var_A0], rax mov [rsp+0B8h+var_98], rdx mov rax, [rsp+0B8h+var_A0] mov [rsp+0B8h+var_40], rax mov rax, [rsp+0B8h+var_98] mov [rsp+0B8h+var_38], rax mov rdi, [rsp+0B8h+var_40] mov rsi, [rsp+0B8h+var_38] call JS_IsException_1 cmp eax, 0 jz short loc_C095B mov [rsp+0B8h+var_4], 0FFFFFFFFh jmp loc_C0AC7 loc_C095B: mov rax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_58], rax mov rdi, [rsp+0B8h+var_30] mov rcx, [rsp+0B8h+var_58] lea rsi, [rsp+0B8h+var_60] lea rdx, [rsp+0B8h+var_64] mov r8d, 13h call JS_GetOwnPropertyNamesInternal cmp eax, 0 jge short loc_C0991 jmp loc_C0A75 loc_C0991: mov [rsp+0B8h+var_68], 0 loc_C0999: mov eax, [rsp+0B8h+var_68] cmp eax, [rsp+0B8h+var_64] jnb loc_C0A6D mov rdi, [rsp+0B8h+var_30] mov rsi, [rsp+0B8h+var_50] mov rdx, [rsp+0B8h+var_48] call JS_FreeValue mov rdi, [rsp+0B8h+var_30] mov rax, [rsp+0B8h+var_60] mov ecx, [rsp+0B8h+var_68] mov ecx, [rax+rcx*8+4] mov rsi, [rsp+0B8h+var_40] mov rdx, [rsp+0B8h+var_38] call JS_GetProperty mov [rsp+0B8h+var_B0], rax mov [rsp+0B8h+var_A8], rdx mov rax, [rsp+0B8h+var_B0] mov [rsp+0B8h+var_50], rax mov rax, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_48], rax mov rdi, [rsp+0B8h+var_50] mov rsi, [rsp+0B8h+var_48] call JS_IsException_1 cmp eax, 0 jz short loc_C0A19 jmp short loc_C0A75 loc_C0A19: mov rdi, [rsp+0B8h+var_30] mov rax, [rsp+0B8h+var_60] mov ecx, [rsp+0B8h+var_68] mov ecx, [rax+rcx*8+4] mov rsi, [rsp+0B8h+var_18] mov rdx, [rsp+0B8h+var_10] mov r8, [rsp+0B8h+var_50] mov r9, [rsp+0B8h+var_48] mov [rsp+0B8h+var_B8], 44000h call JS_DefinePropertyDesc cmp eax, 0 jge short loc_C0A5B jmp short loc_C0A75 loc_C0A5B: jmp short $+2 loc_C0A5D: mov eax, [rsp+0B8h+var_68] add eax, 1 mov [rsp+0B8h+var_68], eax jmp loc_C0999 loc_C0A6D: mov [rsp+0B8h+var_6C], 0 loc_C0A75: mov rdi, [rsp+0B8h+var_30] mov rsi, [rsp+0B8h+var_60] mov edx, [rsp+0B8h+var_64] call js_free_prop_enum mov rdi, [rsp+0B8h+var_30] mov rsi, [rsp+0B8h+var_40] mov rdx, [rsp+0B8h+var_38] call JS_FreeValue mov rdi, [rsp+0B8h+var_30] mov rsi, [rsp+0B8h+var_50] mov rdx, [rsp+0B8h+var_48] call JS_FreeValue mov eax, [rsp+0B8h+var_6C] mov [rsp+0B8h+var_4], eax loc_C0AC7: mov eax, [rsp+0B8h+var_4] add rsp, 0B8h retn
long long JS_ObjectDefineProperties( long long a1, long long a2, long long a3, _DWORD *a4, long long a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rdx long long v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rdx long long v20; // rdx char v22; // [rsp+0h] [rbp-B8h] long long v23; // [rsp+28h] [rbp-90h] unsigned int v24; // [rsp+4Ch] [rbp-6Ch] unsigned int i; // [rsp+50h] [rbp-68h] unsigned int v26; // [rsp+54h] [rbp-64h] BYREF long long v27[2]; // [rsp+58h] [rbp-60h] BYREF long long Property; // [rsp+68h] [rbp-50h] long long v29; // [rsp+70h] [rbp-48h] _DWORD *v30; // [rsp+78h] [rbp-40h] long long v31; // [rsp+80h] [rbp-38h] long long v32; // [rsp+88h] [rbp-30h] _DWORD *v33; // [rsp+90h] [rbp-28h] long long v34; // [rsp+98h] [rbp-20h] long long v35; // [rsp+A0h] [rbp-18h] long long v36; // [rsp+A8h] [rbp-10h] v35 = a2; v36 = a3; v33 = a4; v34 = a5; v32 = a1; v24 = -1; if ( JS_IsObject(a2, a3) ) { LODWORD(v23) = 0; Property = v23; v29 = 3LL; v30 = JS_ToObject(v32, v33, v34, a6, a7, a8, a9, v17, v18, a12, a13, v14, v15, v16); v31 = v19; if ( JS_IsException_1((long long)v30, v19) ) { return (unsigned int)-1; } else { v27[1] = (long long)v30; if ( (int)JS_GetOwnPropertyNamesInternal(v32, v27, &v26, (long long)v30, 19) >= 0 ) { for ( i = 0; i < v26; ++i ) { JS_FreeValue(v32, Property, v29); Property = JS_GetProperty(v32, (int)v30, v31, *(_DWORD *)(v27[0] + 8LL * i + 4)); v29 = v20; if ( JS_IsException_1(Property, v20) || (int)JS_DefinePropertyDesc(v32, v35, v36, *(_DWORD *)(v27[0] + 8LL * i + 4), Property, v29, 278528) < 0 ) { goto LABEL_12; } } v24 = 0; } LABEL_12: js_free_prop_enum(v32, v27[0], v26); JS_FreeValue(v32, (long long)v30, v31); JS_FreeValue(v32, Property, v29); return v24; } } else { JS_ThrowTypeError( v32, (long long)"Object.defineProperties called on non-object", v13, v14, v15, v16, a6, a7, a8, a9, v17, v18, a12, a13, v22); return (unsigned int)-1; } }
JS_ObjectDefineProperties: SUB RSP,0xb8 MOV qword ptr [RSP + 0xa0],RSI MOV qword ptr [RSP + 0xa8],RDX MOV qword ptr [RSP + 0x90],RCX MOV qword ptr [RSP + 0x98],R8 MOV qword ptr [RSP + 0x88],RDI MOV dword ptr [RSP + 0x4c],0xffffffff MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0xa8] CALL 0x0012af70 CMP EAX,0x0 JNZ 0x001c08d1 MOV RDI,qword ptr [RSP + 0x88] LEA RSI,[0x210a53] MOV AL,0x0 CALL 0x0012d300 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV dword ptr [RSP + 0xb4],0xffffffff JMP 0x001c0ac7 LAB_001c08d1: MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x70],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x00137770 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x80] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001c095b MOV dword ptr [RSP + 0xb4],0xffffffff JMP 0x001c0ac7 LAB_001c095b: MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x60],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x60] LEA RSI,[RSP + 0x58] LEA RDX,[RSP + 0x54] MOV R8D,0x13 CALL 0x0012f5e0 CMP EAX,0x0 JGE 0x001c0991 JMP 0x001c0a75 LAB_001c0991: MOV dword ptr [RSP + 0x50],0x0 LAB_001c0999: MOV EAX,dword ptr [RSP + 0x50] CMP EAX,dword ptr [RSP + 0x54] JNC 0x001c0a6d MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RSP + 0x58] MOV ECX,dword ptr [RSP + 0x50] MOV ECX,dword ptr [RAX + RCX*0x8 + 0x4] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] CALL 0x00129d80 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x70],RAX MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x70] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x001c0a19 JMP 0x001c0a75 LAB_001c0a19: MOV RDI,qword ptr [RSP + 0x88] MOV RAX,qword ptr [RSP + 0x58] MOV ECX,dword ptr [RSP + 0x50] MOV ECX,dword ptr [RAX + RCX*0x8 + 0x4] MOV RSI,qword ptr [RSP + 0xa0] MOV RDX,qword ptr [RSP + 0xa8] MOV R8,qword ptr [RSP + 0x68] MOV R9,qword ptr [RSP + 0x70] MOV dword ptr [RSP],0x44000 CALL 0x001c0ae0 CMP EAX,0x0 JGE 0x001c0a5b JMP 0x001c0a75 LAB_001c0a5b: JMP 0x001c0a5d LAB_001c0a5d: MOV EAX,dword ptr [RSP + 0x50] ADD EAX,0x1 MOV dword ptr [RSP + 0x50],EAX JMP 0x001c0999 LAB_001c0a6d: MOV dword ptr [RSP + 0x4c],0x0 LAB_001c0a75: MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x58] MOV EDX,dword ptr [RSP + 0x54] CALL 0x00130a40 MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] CALL 0x00123c90 MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] CALL 0x00123c90 MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0xb4],EAX LAB_001c0ac7: MOV EAX,dword ptr [RSP + 0xb4] ADD RSP,0xb8 RET
int4 JS_ObjectDefineProperties (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int iVar1; int1 auVar2 [16]; uint uStack_8c; int4 local_6c; uint local_68; uint local_64; long local_60; int8 local_58; int1 local_50 [16]; int1 local_40 [16]; int8 local_30; int8 local_28; int8 local_20; int8 local_18; int8 local_10; int4 local_4; local_6c = 0xffffffff; local_30 = param_1; local_28 = param_4; local_20 = param_5; local_18 = param_2; local_10 = param_3; iVar1 = JS_IsObject(param_2,param_3); if (iVar1 == 0) { JS_ThrowTypeError(local_30,"Object.defineProperties called on non-object"); local_4 = 0xffffffff; } else { local_50._0_8_ = (ulong)uStack_8c << 0x20; local_50._8_8_ = 3; local_40 = JS_ToObject(local_30,local_28,local_20); iVar1 = JS_IsException(local_40._0_8_,local_40._8_8_); if (iVar1 == 0) { local_58 = local_40._0_8_; iVar1 = JS_GetOwnPropertyNamesInternal(local_30,&local_60,&local_64,local_40._0_8_,0x13); if (-1 < iVar1) { local_68 = 0; while( true ) { if (local_64 <= local_68) break; JS_FreeValue(local_30,local_50._0_8_,local_50._8_8_); auVar2 = JS_GetProperty(local_30,local_40._0_8_,local_40._8_8_, *(int4 *)(local_60 + 4 + (ulong)local_68 * 8)); local_50 = auVar2; iVar1 = JS_IsException(auVar2._0_8_,auVar2._8_8_); if (iVar1 != 0) goto LAB_001c0a75; iVar1 = JS_DefinePropertyDesc (local_30,local_18,local_10, *(int4 *)(local_60 + 4 + (ulong)local_68 * 8),local_50._0_8_, local_50._8_8_,0x44000); if (iVar1 < 0) goto LAB_001c0a75; local_68 = local_68 + 1; } local_6c = 0; } LAB_001c0a75: js_free_prop_enum(local_30,local_60,local_64); JS_FreeValue(local_30,local_40._0_8_,local_40._8_8_); JS_FreeValue(local_30,local_50._0_8_,local_50._8_8_); local_4 = local_6c; } else { local_4 = 0xffffffff; } } return local_4; }
28,511
JS_ObjectDefineProperties
bluesky950520[P]quickjs/quickjs.c
static __exception int JS_ObjectDefineProperties(JSContext *ctx, JSValue obj, JSValue properties) { JSValue props, desc; JSObject *p; JSPropertyEnum *atoms; uint32_t len, i; int ret = -1; if (!JS_IsObject(obj)) { JS_ThrowTypeError(ctx, "Object.defineProperties called on non-object"); return -1; } desc = JS_UNDEFINED; props = JS_ToObject(ctx, properties); if (JS_IsException(props)) return -1; p = JS_VALUE_GET_OBJ(props); if (JS_GetOwnPropertyNamesInternal(ctx, &atoms, &len, p, JS_GPN_ENUM_ONLY | JS_GPN_STRING_MASK | JS_GPN_SYMBOL_MASK) < 0) goto exception; // XXX: ECMA specifies that all descriptions should be validated before // modifying the object. This would require allocating an array // JSPropertyDescriptor and use 2 separate loops. for(i = 0; i < len; i++) { JS_FreeValue(ctx, desc); desc = JS_GetProperty(ctx, props, atoms[i].atom); if (JS_IsException(desc)) goto exception; if (JS_DefinePropertyDesc(ctx, obj, atoms[i].atom, desc, JS_PROP_THROW | JS_PROP_DEFINE_PROPERTY) < 0) goto exception; } ret = 0; exception: js_free_prop_enum(ctx, atoms, len); JS_FreeValue(ctx, props); JS_FreeValue(ctx, desc); return ret; }
O1
c
JS_ObjectDefineProperties: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, 0x28(%rsp) movq %rdi, %rbx movq %rdx, 0x30(%rsp) cmpl $-0x1, %edx jne 0x7120b movq %rbx, %rdi movq %rcx, %rsi movq %r8, %rdx callq 0x26ddd movq %rax, 0x8(%rsp) movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq %rdx, 0x10(%rsp) cmpl $0x6, %edx je 0x7125d movq 0x8(%rsp), %rcx leaq 0x18(%rsp), %rsi leaq 0x4(%rsp), %rdx movq %rbx, %rdi movl $0x13, %r8d callq 0x235bd movl $0x3, %r13d movl $0xffffffff, %r14d # imm = 0xFFFFFFFF xorl %ebp, %ebp testl %eax, %eax js 0x7122a movl 0x4(%rsp), %eax movq %rax, 0x20(%rsp) testq %rax, %rax je 0x71206 movq 0x18(%rsp), %r14 movq 0x8(%rsp), %r12 xorl %r15d, %r15d xorl %ebp, %ebp movq 0x18(%rbx), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1d8c6 movl 0x4(%r14,%r15,8), %ecx movq %rbx, %rdi movq %r12, %rsi movq 0x10(%rsp), %rdx movq %r12, %r8 movq %rdx, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rax, %rbp movq %rdx, %r13 cmpl $0x6, %r13d je 0x71224 movl 0x4(%r14,%r15,8), %ecx subq $0x8, %rsp movq %rbx, %rdi movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq %rbp, %r8 movq %r13, %r9 pushq $0x44000 # imm = 0x44000 callq 0x7126f addq $0x10, %rsp testl %eax, %eax js 0x71224 incq %r15 cmpq %r15, 0x20(%rsp) jne 0x71190 xorl %r14d, %r14d jmp 0x7122a leaq 0x307dd(%rip), %rsi # 0xa19ef movq %rbx, %rdi xorl %eax, %eax callq 0x22567 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x7125d movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq 0x18(%rsp), %rsi movl 0x4(%rsp), %edx movq %rbx, %rdi callq 0x23e79 movq 0x8(%rsp), %rsi movq 0x18(%rbx), %rdi movq 0x10(%rsp), %rdx callq 0x1d8c6 movq 0x18(%rbx), %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x1d8c6 movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_ObjectDefineProperties: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rsp+68h+var_40], rsi mov rbx, rdi mov [rsp+68h+var_38], rdx cmp edx, 0FFFFFFFFh jnz loc_7120B mov rdi, rbx mov rsi, rcx mov rdx, r8 call JS_ToObject mov [rsp+68h+var_60], rax mov r14d, 0FFFFFFFFh mov [rsp+68h+var_58], rdx cmp edx, 6 jz loc_7125D mov rcx, [rsp+68h+var_60] lea rsi, [rsp+68h+var_50] lea rdx, [rsp+68h+var_64] mov rdi, rbx mov r8d, 13h call JS_GetOwnPropertyNamesInternal mov r13d, 3 mov r14d, 0FFFFFFFFh xor ebp, ebp test eax, eax js loc_7122A mov eax, [rsp+68h+var_64] mov [rsp+68h+var_48], rax test rax, rax jz loc_71206 mov r14, [rsp+68h+var_50] mov r12, [rsp+68h+var_60] xor r15d, r15d xor ebp, ebp loc_71190: mov rdi, [rbx+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT mov ecx, [r14+r15*8+4] mov rdi, rbx mov rsi, r12 mov rdx, [rsp+68h+var_58] mov r8, r12 mov r9, rdx push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rbp, rax mov r13, rdx cmp r13d, 6 jz short loc_71224 mov ecx, [r14+r15*8+4] sub rsp, 8 mov rdi, rbx mov rsi, [rsp+70h+var_40] mov rdx, [rsp+70h+var_38] mov r8, rbp mov r9, r13 push 44000h call JS_DefinePropertyDesc add rsp, 10h test eax, eax js short loc_71224 inc r15 cmp [rsp+68h+var_48], r15 jnz short loc_71190 loc_71206: xor r14d, r14d jmp short loc_7122A loc_7120B: lea rsi, aObjectDefinepr; "Object.defineProperties called on non-o"... mov rdi, rbx xor eax, eax call JS_ThrowTypeError mov r14d, 0FFFFFFFFh jmp short loc_7125D loc_71224: mov r14d, 0FFFFFFFFh loc_7122A: mov rsi, [rsp+68h+var_50] mov edx, [rsp+68h+var_64] mov rdi, rbx call js_free_prop_enum mov rsi, [rsp+68h+var_60] mov rdi, [rbx+18h] mov rdx, [rsp+68h+var_58] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, rbp mov rdx, r13 call JS_FreeValueRT loc_7125D: mov eax, r14d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_ObjectDefineProperties( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned int v14; // r14d long long v15; // rdx long long v16; // r13 _DWORD *v17; // rbp long long v18; // r14 _DWORD *v19; // r12 long long v20; // r15 unsigned long long PropertyInternal2; // rax long long v22; // rdx char v24; // [rsp+0h] [rbp-68h] unsigned int v25; // [rsp+4h] [rbp-64h] BYREF _DWORD *v26; // [rsp+8h] [rbp-60h] long long v27; // [rsp+10h] [rbp-58h] long long v28; // [rsp+18h] [rbp-50h] BYREF long long v29; // [rsp+20h] [rbp-48h] long long v30; // [rsp+28h] [rbp-40h] long long v31; // [rsp+30h] [rbp-38h] v30 = a2; v31 = a3; if ( (_DWORD)a3 == -1 ) { v26 = JS_ToObject(a1, a4, a5, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v14 = -1; v27 = v15; if ( (_DWORD)v15 != 6 ) { v16 = 3LL; v14 = -1; v17 = 0LL; if ( (int)JS_GetOwnPropertyNamesInternal(a1, &v28, &v25, (long long)v26, 19) >= 0 ) { v29 = v25; if ( v25 ) { v18 = v28; v19 = v26; v20 = 0LL; v17 = 0LL; while ( 1 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17, v16); PropertyInternal2 = JS_GetPropertyInternal2( a1, (long long)v19, v27, *(_DWORD *)(v18 + 8 * v20 + 4), (long long)v19, v27, 0LL, 0); v17 = (_DWORD *)PropertyInternal2; v16 = v22; if ( (_DWORD)v22 == 6 || (int)JS_DefinePropertyDesc( a1, v30, v31, *(_DWORD *)(v18 + 8 * v20 + 4), PropertyInternal2, v22, 278528) < 0 ) { break; } if ( v29 == ++v20 ) goto LABEL_9; } v14 = -1; } else { LABEL_9: v14 = 0; } } js_free_prop_enum(a1, v28, v25); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v26, v27); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17, v16); } } else { JS_ThrowTypeError( a1, (long long)"Object.defineProperties called on non-object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v24); return (unsigned int)-1; } return v14; }
28,512
my_strntoull_8bit
eloqsql/strings/ctype-simple.c
ulonglong my_strntoull_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register ulonglong cutoff; register uint cutlim; register ulonglong i; register const char *s, *e; const char *save; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for(; s<e && my_isspace(cs,*s); s++); if (s == e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); overflow = 0; i = 0; for ( ; s != e; s++) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (ulonglong) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) i) : (longlong) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntoull_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0xbc321 movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0xbc321 incq %r10 cmpq %r11, %r10 jb 0xbc30e cmpq %r11, %r10 je 0xbc409 movb (%r10), %dil leal -0x2b(%rdi), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movslq %ecx, %rbx movq $-0x1, %rax xorl %edx, %edx movq %rbx, -0x38(%rbp) divq %rbx xorl %r12d, %r12d cmpq %r11, %r10 je 0xbc3e6 movq %rdi, -0x30(%rbp) movq %r10, %r14 xorl %r15d, %r15d movq %r15, %rdi movl %r12d, %r13d movb (%r14), %r12b leal -0x30(%r12), %ebx cmpb $0xa, %bl jb 0xbc395 leal -0x41(%r12), %ebx cmpb $0x19, %bl ja 0xbc384 addb $-0x37, %r12b jmp 0xbc392 leal -0x61(%r12), %ebx cmpb $0x19, %bl ja 0xbc3d4 addb $-0x57, %r12b movl %r12d, %ebx movzbl %bl, %ebx cmpl %ecx, %ebx jge 0xbc3d4 movl $0x1, %r12d cmpq %rax, %rdi jbe 0xbc3ac movq %rdi, %r15 jmp 0xbc3c3 jne 0xbc3b5 movq %rax, %r15 cmpl %edx, %ebx ja 0xbc3c3 imulq -0x38(%rbp), %rdi movl %ebx, %r15d addq %rdi, %r15 movl %r13d, %r12d incq %r14 cmpq %r11, %r14 jne 0xbc361 movq %r15, %rdi movq %r11, %r14 movl %r12d, %r13d testl %r13d, %r13d sete %al movq %rdi, %r12 movq %r14, %r11 movq -0x30(%rbp), %rdi jmp 0xbc3e8 movb $0x1, %al cmpq %r10, %r11 je 0xbc409 testq %r8, %r8 je 0xbc3f5 movq %r11, (%r8) testb %al, %al je 0xbc41c movq %r12, %rax negq %rax cmpb $0x2d, %dil cmovneq %r12, %rax jmp 0xbc42a movl $0x21, (%r9) testq %r8, %r8 je 0xbc418 movq %rsi, (%r8) xorl %eax, %eax jmp 0xbc42a movl $0x22, (%r9) movq $-0x1, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strntoull_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_BC321 mov rax, [rdi+40h] mov r10, rsi loc_BC30E: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_BC321 inc r10 cmp r10, r11 jb short loc_BC30E loc_BC321: cmp r10, r11 jz loc_BC409 mov dil, [r10] lea eax, [rdi-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 movsxd rbx, ecx mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx mov [rbp+var_38], rbx div rbx xor r12d, r12d cmp r10, r11 jz loc_BC3E6 mov [rbp+var_30], rdi mov r14, r10 xor r15d, r15d loc_BC361: mov rdi, r15 mov r13d, r12d mov r12b, [r14] lea ebx, [r12-30h] cmp bl, 0Ah jb short loc_BC395 lea ebx, [r12-41h] cmp bl, 19h ja short loc_BC384 add r12b, 0C9h jmp short loc_BC392 loc_BC384: lea ebx, [r12-61h] cmp bl, 19h ja short loc_BC3D4 add r12b, 0A9h loc_BC392: mov ebx, r12d loc_BC395: movzx ebx, bl cmp ebx, ecx jge short loc_BC3D4 mov r12d, 1 cmp rdi, rax jbe short loc_BC3AC mov r15, rdi jmp short loc_BC3C3 loc_BC3AC: jnz short loc_BC3B5 mov r15, rax cmp ebx, edx ja short loc_BC3C3 loc_BC3B5: imul rdi, [rbp+var_38] mov r15d, ebx add r15, rdi mov r12d, r13d loc_BC3C3: inc r14 cmp r14, r11 jnz short loc_BC361 mov rdi, r15 mov r14, r11 mov r13d, r12d loc_BC3D4: test r13d, r13d setz al mov r12, rdi mov r11, r14 mov rdi, [rbp+var_30] jmp short loc_BC3E8 loc_BC3E6: mov al, 1 loc_BC3E8: cmp r11, r10 jz short loc_BC409 test r8, r8 jz short loc_BC3F5 mov [r8], r11 loc_BC3F5: test al, al jz short loc_BC41C mov rax, r12 neg rax cmp dil, 2Dh ; '-' cmovnz rax, r12 jmp short loc_BC42A loc_BC409: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_BC418 mov [r8], rsi loc_BC418: xor eax, eax jmp short loc_BC42A loc_BC41C: mov dword ptr [r9], 22h ; '"' mov rax, 0FFFFFFFFFFFFFFFFh loc_BC42A: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strntoull_8bit( long long a1, unsigned __int8 *a2, long long a3, int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // di unsigned __int8 *v9; // r10 unsigned long long v10; // rax unsigned long long v11; // r12 unsigned __int8 *v12; // r14 unsigned long long v13; // r15 unsigned long long v14; // rdi int v15; // r13d unsigned __int8 v16; // r12 unsigned __int8 v17; // bl unsigned __int8 v18; // r12 bool v19; // al long long result; // rax unsigned __int8 v21; // [rsp+8h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_30; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFFFFFFFFFFLL / a4; v11 = 0LL; if ( v9 == v6 ) { v19 = 1; } else { v21 = v8; v12 = v9; v13 = 0LL; while ( 1 ) { v14 = v13; v15 = v11; v16 = *v12; v17 = *v12 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } if ( v17 >= a4 ) break; LODWORD(v11) = 1; if ( v13 <= v10 ) { if ( v13 != v10 || (v13 = 0xFFFFFFFFFFFFFFFFLL / a4, v17 <= (unsigned int)(0xFFFFFFFFFFFFFFFFLL % a4)) ) { v13 = a4 * v14 + v17; LODWORD(v11) = v15; } } if ( ++v12 == v6 ) { v14 = v13; v12 = &a2[a3]; v15 = v11; break; } } v19 = v15 == 0; v11 = v14; v6 = v12; v8 = v21; } if ( v6 == v9 ) { LABEL_30: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v6; if ( v19 ) { result = -(long long)v11; if ( v8 != 45 ) return v11; } else { *a6 = 34; return -1LL; } } return result; }
my_strntoull_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x001bc321 MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_001bc30e: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x001bc321 INC R10 CMP R10,R11 JC 0x001bc30e LAB_001bc321: CMP R10,R11 JZ 0x001bc409 MOV DIL,byte ptr [R10] LEA EAX,[RDI + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOVSXD RBX,ECX MOV RAX,-0x1 XOR EDX,EDX MOV qword ptr [RBP + -0x38],RBX DIV RBX XOR R12D,R12D CMP R10,R11 JZ 0x001bc3e6 MOV qword ptr [RBP + -0x30],RDI MOV R14,R10 XOR R15D,R15D LAB_001bc361: MOV RDI,R15 MOV R13D,R12D MOV R12B,byte ptr [R14] LEA EBX,[R12 + -0x30] CMP BL,0xa JC 0x001bc395 LEA EBX,[R12 + -0x41] CMP BL,0x19 JA 0x001bc384 ADD R12B,0xc9 JMP 0x001bc392 LAB_001bc384: LEA EBX,[R12 + -0x61] CMP BL,0x19 JA 0x001bc3d4 ADD R12B,0xa9 LAB_001bc392: MOV EBX,R12D LAB_001bc395: MOVZX EBX,BL CMP EBX,ECX JGE 0x001bc3d4 MOV R12D,0x1 CMP RDI,RAX JBE 0x001bc3ac MOV R15,RDI JMP 0x001bc3c3 LAB_001bc3ac: JNZ 0x001bc3b5 MOV R15,RAX CMP EBX,EDX JA 0x001bc3c3 LAB_001bc3b5: IMUL RDI,qword ptr [RBP + -0x38] MOV R15D,EBX ADD R15,RDI MOV R12D,R13D LAB_001bc3c3: INC R14 CMP R14,R11 JNZ 0x001bc361 MOV RDI,R15 MOV R14,R11 MOV R13D,R12D LAB_001bc3d4: TEST R13D,R13D SETZ AL MOV R12,RDI MOV R11,R14 MOV RDI,qword ptr [RBP + -0x30] JMP 0x001bc3e8 LAB_001bc3e6: MOV AL,0x1 LAB_001bc3e8: CMP R11,R10 JZ 0x001bc409 TEST R8,R8 JZ 0x001bc3f5 MOV qword ptr [R8],R11 LAB_001bc3f5: TEST AL,AL JZ 0x001bc41c MOV RAX,R12 NEG RAX CMP DIL,0x2d CMOVNZ RAX,R12 JMP 0x001bc42a LAB_001bc409: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x001bc418 MOV qword ptr [R8],RSI LAB_001bc418: XOR EAX,EAX JMP 0x001bc42a LAB_001bc41c: MOV dword ptr [R9],0x22 MOV RAX,-0x1 LAB_001bc42a: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strntoull_8bit(long param_1,byte *param_2,long param_3,int param_4,ulong *param_5, int4 *param_6) { byte bVar1; byte bVar2; int1 auVar3 [16]; int1 auVar4 [16]; ulong uVar5; ulong uVar6; ulong uVar7; byte *pbVar8; byte *pbVar9; byte bVar10; ulong uVar11; ulong uVar12; int iVar13; byte *pbVar14; bool bVar15; *param_6 = 0; pbVar9 = param_2 + param_3; pbVar8 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar8) & 8) == 0) break; pbVar8 = pbVar8 + 1; } while (pbVar8 < pbVar9); } if (pbVar8 != pbVar9) { bVar1 = *pbVar8; pbVar8 = pbVar8 + ((bVar1 - 0x2b & 0xfd) == 0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)param_4; auVar4 = ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff); uVar6 = SUB168(auVar4 / auVar3,0); uVar7 = 0; if (pbVar8 == pbVar9) { bVar15 = true; } else { uVar11 = uVar7; pbVar14 = pbVar8; uVar7 = 0; do { iVar13 = (int)uVar11; bVar2 = *pbVar14; bVar10 = bVar2 - 0x30; if (9 < bVar10) { if ((byte)(bVar2 + 0xbf) < 0x1a) { bVar10 = bVar2 - 0x37; } else { if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_001bc3d4; bVar10 = bVar2 + 0xa9; } } if (param_4 <= (int)(uint)bVar10) goto LAB_001bc3d4; uVar12 = 1; uVar5 = uVar7; if ((uVar7 <= uVar6) && ((uVar7 != uVar6 || (uVar5 = uVar6, (uint)bVar10 <= SUB164(auVar4 % auVar3,0))))) { uVar12 = uVar11; uVar5 = (ulong)bVar10 + uVar7 * (long)param_4; } uVar7 = uVar5; pbVar14 = pbVar14 + 1; uVar11 = uVar12; } while (pbVar14 != pbVar9); iVar13 = (int)uVar12; pbVar14 = pbVar9; LAB_001bc3d4: pbVar9 = pbVar14; bVar15 = iVar13 == 0; } if (pbVar9 != pbVar8) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar9; } if (bVar15) { if (bVar1 == 0x2d) { return -uVar7; } return uVar7; } *param_6 = 0x22; return 0xffffffffffffffff; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
28,513
GetNumBlock
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
int GetNumBlock(size_t size) { // Safety against overflow if (size > INT_MAX - BLOCK_SIZE) { HEAP_LOG("Size too large for block conversion: %zu bytes\n", size); return INT_MAX / BLOCK_SIZE; } // Round up to nearest block int blocks = (size + BLOCK_SIZE - 1) / BLOCK_SIZE; HEAP_LOG("Size %zu bytes converted to %d blocks\n", size, blocks); return blocks; }
O1
c
GetNumBlock: leaq 0xfff(%rdi), %rcx shrq $0xc, %rcx cmpq $0x7ffff000, %rdi # imm = 0x7FFFF000 movl $0x7ffff, %eax # imm = 0x7FFFF cmovbl %ecx, %eax retq
GetNumBlock: lea rcx, [rdi+0FFFh] shr rcx, 0Ch cmp rdi, 7FFFF000h mov eax, offset unk_7FFFF cmovb eax, ecx retn
void * GetNumBlock(unsigned long long a1) { void *result; // rax result = &unk_7FFFF; if ( a1 < 0x7FFFF000 ) return (void *)(unsigned int)((a1 + 4095) >> 12); return result; }
GetNumBlock: LEA RCX,[RDI + 0xfff] SHR RCX,0xc CMP RDI,0x7ffff000 MOV EAX,0x7ffff CMOVC EAX,ECX RET
ulong GetNumBlock(ulong param_1) { ulong uVar1; uVar1 = 0x7ffff; if (param_1 < 0x7ffff000) { uVar1 = param_1 + 0xfff >> 0xc & 0xffffffff; } return uVar1; }
28,514
net_get_error
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void net_get_error(char *buf, size_t buf_len, char *error, size_t error_len, unsigned int *error_no, char *sqlstate) { char *p= buf; size_t error_msg_len= 0; if (buf_len > 2) { *error_no= uint2korr(p); p+= 2; /* since 4.1 sqlstate is following */ if (*p == '#') { memcpy(sqlstate, ++p, SQLSTATE_LENGTH); p+= SQLSTATE_LENGTH; } error_msg_len= buf_len - (p - buf); error_msg_len= MIN(error_msg_len, error_len - 1); memcpy(error, p, error_msg_len); } else { *error_no= CR_UNKNOWN_ERROR; memcpy(sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH); } }
O0
c
net_get_error: 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 %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) movq $0x0, -0x40(%rbp) cmpq $0x2, -0x10(%rbp) jbe 0x17038 movq -0x38(%rbp), %rax movzbl (%rax), %eax movzwl %ax, %eax movq -0x38(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movzwl %ax, %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x38(%rbp), %rax addq $0x2, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x23, %eax jne 0x16fe0 movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x38(%rbp) movl 0x1(%rcx), %edx movl %edx, (%rax) movb 0x5(%rcx), %cl movb %cl, 0x4(%rax) movq -0x38(%rbp), %rax addq $0x5, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx movq -0x8(%rbp), %rdx subq %rdx, %rcx subq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x20(%rbp), %rcx subq $0x1, %rcx cmpq %rcx, %rax jae 0x17011 movq -0x40(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x1701d movq -0x20(%rbp), %rax subq $0x1, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0x13360 jmp 0x1705a movq -0x28(%rbp), %rax movl $0x7d0, (%rax) # imm = 0x7D0 movq -0x30(%rbp), %rax leaq 0x4a013(%rip), %rcx # 0x61060 movq (%rcx), %rcx movl (%rcx), %edx movl %edx, (%rax) movb 0x4(%rcx), %cl movb %cl, 0x4(%rax) addq $0x50, %rsp popq %rbp retq
net_get_error: 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 [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_8] mov [rbp+var_38], rax mov [rbp+var_40], 0 cmp [rbp+var_10], 2 jbe loc_17038 mov rax, [rbp+var_38] movzx eax, byte ptr [rax] movzx eax, ax mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 add eax, ecx movzx ecx, ax mov rax, [rbp+var_28] mov [rax], ecx mov rax, [rbp+var_38] add rax, 2 mov [rbp+var_38], rax mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 23h ; '#' jnz short loc_16FE0 mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov rdx, rcx add rdx, 1 mov [rbp+var_38], rdx mov edx, [rcx+1] mov [rax], edx mov cl, [rcx+5] mov [rax+4], cl mov rax, [rbp+var_38] add rax, 5 mov [rbp+var_38], rax loc_16FE0: mov rax, [rbp+var_10] mov rcx, [rbp+var_38] mov rdx, [rbp+var_8] sub rcx, rdx sub rax, rcx mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rcx, [rbp+var_20] sub rcx, 1 cmp rax, rcx jnb short loc_17011 mov rax, [rbp+var_40] mov [rbp+var_48], rax jmp short loc_1701D loc_17011: mov rax, [rbp+var_20] sub rax, 1 mov [rbp+var_48], rax loc_1701D: mov rax, [rbp+var_48] mov [rbp+var_40], rax mov rdi, [rbp+var_18] mov rsi, [rbp+var_38] mov rdx, [rbp+var_40] call _memcpy jmp short loc_1705A loc_17038: mov rax, [rbp+var_28] mov dword ptr [rax], 7D0h mov rax, [rbp+var_30] lea rcx, SQLSTATE_UNKNOWN mov rcx, [rcx] mov edx, [rcx] mov [rax], edx mov cl, [rcx+4] mov [rax+4], cl loc_1705A: add rsp, 50h pop rbp retn
long long net_get_error( unsigned __int8 *a1, unsigned long long a2, long long a3, long long a4, _DWORD *a5, long long a6) { long long result; // rax char *v7; // rcx unsigned long long v8; // [rsp+8h] [rbp-48h] unsigned __int8 *v9; // [rsp+18h] [rbp-38h] if ( a2 <= 2 ) { *a5 = 2000; result = a6; v7 = SQLSTATE_UNKNOWN; *(_DWORD *)a6 = *(_DWORD *)SQLSTATE_UNKNOWN; *(_BYTE *)(a6 + 4) = v7[4]; } else { *a5 = (unsigned __int16)((a1[1] << 8) + *a1); v9 = a1 + 2; if ( a1[2] == 35 ) { *(_DWORD *)a6 = *(_DWORD *)(a1 + 3); *(_BYTE *)(a6 + 4) = a1[7]; v9 = a1 + 8; } if ( a2 - (v9 - a1) >= a4 - 1 ) v8 = a4 - 1; else v8 = a2 - (v9 - a1); return memcpy(a3, v9, v8); } return result; }
net_get_error: 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 qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],RAX MOV qword ptr [RBP + -0x40],0x0 CMP qword ptr [RBP + -0x10],0x2 JBE 0x00117038 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,byte ptr [RAX] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVZX ECX,AX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x2 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x23 JNZ 0x00116fe0 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x38],RDX MOV EDX,dword ptr [RCX + 0x1] MOV dword ptr [RAX],EDX MOV CL,byte ptr [RCX + 0x5] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x5 MOV qword ptr [RBP + -0x38],RAX LAB_00116fe0: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x8] SUB RCX,RDX SUB RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x20] SUB RCX,0x1 CMP RAX,RCX JNC 0x00117011 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x48],RAX JMP 0x0011701d LAB_00117011: MOV RAX,qword ptr [RBP + -0x20] SUB RAX,0x1 MOV qword ptr [RBP + -0x48],RAX LAB_0011701d: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x40] CALL 0x00113360 JMP 0x0011705a LAB_00117038: MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0x7d0 MOV RAX,qword ptr [RBP + -0x30] LEA RCX,[0x161060] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RCX] MOV dword ptr [RAX],EDX MOV CL,byte ptr [RCX + 0x4] MOV byte ptr [RAX + 0x4],CL LAB_0011705a: ADD RSP,0x50 POP RBP RET
void net_get_error(byte *param_1,ulong param_2,void *param_3,long param_4,uint *param_5, int4 *param_6) { int *puVar1; size_t local_50; byte *local_40; if (param_2 < 3) { *param_5 = 2000; puVar1 = SQLSTATE_UNKNOWN; *param_6 = *(int4 *)SQLSTATE_UNKNOWN; *(int *)(param_6 + 1) = puVar1[4]; } else { *param_5 = (uint)*param_1 + (uint)param_1[1] * 0x100 & 0xffff; local_40 = param_1 + 2; if (*local_40 == 0x23) { *param_6 = *(int4 *)(param_1 + 3); *(byte *)(param_6 + 1) = param_1[7]; local_40 = param_1 + 8; } local_50 = param_2 - ((long)local_40 - (long)param_1); if (param_4 - 1U <= local_50) { local_50 = param_4 - 1; } memcpy(param_3,local_40,local_50); } return; }
28,515
net_get_error
eloqsql/libmariadb/libmariadb/mariadb_lib.c
void net_get_error(char *buf, size_t buf_len, char *error, size_t error_len, unsigned int *error_no, char *sqlstate) { char *p= buf; size_t error_msg_len= 0; if (buf_len > 2) { *error_no= uint2korr(p); p+= 2; /* since 4.1 sqlstate is following */ if (*p == '#') { memcpy(sqlstate, ++p, SQLSTATE_LENGTH); p+= SQLSTATE_LENGTH; } error_msg_len= buf_len - (p - buf); error_msg_len= MIN(error_msg_len, error_len - 1); memcpy(error, p, error_msg_len); } else { *error_no= CR_UNKNOWN_ERROR; memcpy(sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH); } }
O3
c
net_get_error: pushq %rbp movq %rsp, %rbp cmpq $0x3, %rsi jb 0x161ad movzwl (%rdi), %eax movl %eax, (%r8) cmpb $0x23, 0x2(%rdi) jne 0x161cc movb 0x7(%rdi), %al movb %al, 0x4(%r9) movl 0x3(%rdi), %eax movl %eax, (%r9) leaq 0x8(%rdi), %rax jmp 0x161d0 movl $0x7d0, (%r8) # imm = 0x7D0 leaq 0x349f5(%rip), %rax # 0x4abb0 movq (%rax), %rax movb 0x4(%rax), %cl movb %cl, 0x4(%r9) movl (%rax), %eax movl %eax, (%r9) popq %rbp retq leaq 0x2(%rdi), %rax addq %rsi, %rdi subq %rax, %rdi decq %rcx cmpq %rcx, %rdi cmovbq %rdi, %rcx movq %rdx, %rdi movq %rax, %rsi movq %rcx, %rdx popq %rbp jmp 0x13390
net_get_error: push rbp mov rbp, rsp cmp rsi, 3 jb short loc_161AD movzx eax, word ptr [rdi] mov [r8], eax cmp byte ptr [rdi+2], 23h ; '#' jnz short loc_161CC mov al, [rdi+7] mov [r9+4], al mov eax, [rdi+3] mov [r9], eax lea rax, [rdi+8] jmp short loc_161D0 loc_161AD: mov dword ptr [r8], 7D0h lea rax, SQLSTATE_UNKNOWN mov rax, [rax] mov cl, [rax+4] mov [r9+4], cl mov eax, [rax] mov [r9], eax pop rbp retn loc_161CC: lea rax, [rdi+2] loc_161D0: add rdi, rsi sub rdi, rax dec rcx cmp rdi, rcx cmovb rcx, rdi mov rdi, rdx mov rsi, rax mov rdx, rcx pop rbp jmp _memcpy
long long net_get_error( unsigned __int16 *a1, unsigned long long a2, long long a3, long long a4, _DWORD *a5, long long a6) { unsigned __int16 *v6; // rax char *v7; // rax long long result; // rax char *v9; // rdi char *v10; // rcx if ( a2 < 3 ) { *a5 = 2000; v7 = SQLSTATE_UNKNOWN; *(_BYTE *)(a6 + 4) = SQLSTATE_UNKNOWN[4]; result = *(unsigned int *)v7; *(_DWORD *)a6 = result; } else { *a5 = *a1; if ( *((_BYTE *)a1 + 2) == 35 ) { *(_BYTE *)(a6 + 4) = *((_BYTE *)a1 + 7); *(_DWORD *)a6 = *(_DWORD *)((char *)a1 + 3); v6 = a1 + 4; } else { v6 = a1 + 1; } v9 = (char *)((char *)a1 + a2 - (char *)v6); v10 = (char *)(a4 - 1); if ( v9 < v10 ) v10 = v9; return memcpy(a3, v6, v10); } return result; }
net_get_error: PUSH RBP MOV RBP,RSP CMP RSI,0x3 JC 0x001161ad MOVZX EAX,word ptr [RDI] MOV dword ptr [R8],EAX CMP byte ptr [RDI + 0x2],0x23 JNZ 0x001161cc MOV AL,byte ptr [RDI + 0x7] MOV byte ptr [R9 + 0x4],AL MOV EAX,dword ptr [RDI + 0x3] MOV dword ptr [R9],EAX LEA RAX,[RDI + 0x8] JMP 0x001161d0 LAB_001161ad: MOV dword ptr [R8],0x7d0 LEA RAX,[0x14abb0] MOV RAX,qword ptr [RAX] MOV CL,byte ptr [RAX + 0x4] MOV byte ptr [R9 + 0x4],CL MOV EAX,dword ptr [RAX] MOV dword ptr [R9],EAX POP RBP RET LAB_001161cc: LEA RAX,[RDI + 0x2] LAB_001161d0: ADD RDI,RSI SUB RDI,RAX DEC RCX CMP RDI,RCX CMOVC RCX,RDI MOV RDI,RDX MOV RSI,RAX MOV RDX,RCX POP RBP JMP 0x00113390
void net_get_error(ushort *param_1,ulong param_2,void *param_3,long param_4,uint *param_5, int4 *param_6) { int *puVar1; ushort *__src; ulong __n; ulong uVar2; if (2 < param_2) { *param_5 = (uint)*param_1; if ((char)param_1[1] == '#') { *(int1 *)(param_6 + 1) = *(int1 *)((long)param_1 + 7); *param_6 = *(int4 *)((long)param_1 + 3); __src = param_1 + 4; } else { __src = param_1 + 1; } uVar2 = (long)param_1 + (param_2 - (long)__src); __n = param_4 - 1U; if (uVar2 < param_4 - 1U) { __n = uVar2; } memcpy(param_3,__src,__n); return; } *param_5 = 2000; puVar1 = SQLSTATE_UNKNOWN; *(int *)(param_6 + 1) = SQLSTATE_UNKNOWN[4]; *param_6 = *(int4 *)puVar1; return; }
28,516
downheap
eloqsql/mysys/queues.c
void _downheap(QUEUE *queue, uint idx) { uchar *element= queue->root[idx]; uint next_index, elements= queue->elements, half_queue= elements >> 1, offset_to_key= queue->offset_to_key, offset_to_queue_pos= queue->offset_to_queue_pos; while (idx <= half_queue) { next_index= idx+idx; if (next_index < elements && (queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, queue->root[next_index+1]+offset_to_key) * queue->max_at_top) > 0) next_index++; if ((queue->compare(queue->first_cmp_arg, queue->root[next_index]+offset_to_key, element+offset_to_key) * queue->max_at_top) >= 0) break; queue->root[idx]= queue->root[next_index]; if (offset_to_queue_pos) (*(uint*) (queue->root[idx] + offset_to_queue_pos-1))= idx; idx= next_index; } queue->root[idx]=element; if (offset_to_queue_pos) (*(uint*) (element + offset_to_queue_pos-1))= idx; }
O0
c
downheap: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax shrl %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rax movl 0x18(%rax), %eax movl %eax, -0x28(%rbp) movq -0x8(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, -0x2c(%rbp) movl -0xc(%rbp), %eax cmpl -0x24(%rbp), %eax ja 0xfd7dd movl -0xc(%rbp), %eax addl -0xc(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpl -0x20(%rbp), %eax jae 0xfd759 movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx movq (%rcx,%rdx,8), %rsi movl -0x28(%rbp), %ecx addq %rcx, %rsi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx addl $0x1, %edx movl %edx, %edx movq (%rcx,%rdx,8), %rdx movl -0x28(%rbp), %ecx addq %rcx, %rdx callq *%rax movq -0x8(%rbp), %rcx imull 0x24(%rcx), %eax cmpl $0x0, %eax jle 0xfd759 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movq -0x8(%rbp), %rcx movq (%rcx), %rcx movl -0x1c(%rbp), %edx movq (%rcx,%rdx,8), %rsi movl -0x28(%rbp), %ecx addq %rcx, %rsi movq -0x18(%rbp), %rdx movl -0x28(%rbp), %ecx addq %rcx, %rdx callq *%rax movq -0x8(%rbp), %rcx imull 0x24(%rcx), %eax cmpl $0x0, %eax jl 0xfd798 jmp 0xfd7dd movq -0x8(%rbp), %rax movq (%rax), %rax movl -0x1c(%rbp), %ecx movq (%rax,%rcx,8), %rdx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq %rdx, (%rax,%rcx,8) cmpl $0x0, -0x2c(%rbp) je 0xfd7d2 movl -0xc(%rbp), %edx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq (%rax,%rcx,8), %rax movl -0x2c(%rbp), %ecx movl %edx, -0x1(%rax,%rcx) movl -0x1c(%rbp), %eax movl %eax, -0xc(%rbp) jmp 0xfd6e7 movq -0x18(%rbp), %rdx movq -0x8(%rbp), %rax movq (%rax), %rax movl -0xc(%rbp), %ecx movq %rdx, (%rax,%rcx,8) cmpl $0x0, -0x2c(%rbp) je 0xfd803 movl -0xc(%rbp), %edx movq -0x18(%rbp), %rax movl -0x2c(%rbp), %ecx movl %edx, -0x1(%rax,%rcx) addq $0x30, %rsp popq %rbp retq nopl (%rax)
_downheap: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov rax, [rax+rcx*8] mov [rbp+var_18], rax mov rax, [rbp+var_8] mov eax, [rax+10h] mov [rbp+var_20], eax mov eax, [rbp+var_20] shr eax, 1 mov [rbp+var_24], eax mov rax, [rbp+var_8] mov eax, [rax+18h] mov [rbp+var_28], eax mov rax, [rbp+var_8] mov eax, [rax+1Ch] mov [rbp+var_2C], eax loc_FD6E7: mov eax, [rbp+var_C] cmp eax, [rbp+var_24] ja loc_FD7DD mov eax, [rbp+var_C] add eax, [rbp+var_C] mov [rbp+var_1C], eax mov eax, [rbp+var_1C] cmp eax, [rbp+var_20] jnb short loc_FD759 mov rax, [rbp+var_8] mov rax, [rax+28h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] mov rsi, [rcx+rdx*8] mov ecx, [rbp+var_28] add rsi, rcx mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] add edx, 1 mov edx, edx mov rdx, [rcx+rdx*8] mov ecx, [rbp+var_28] add rdx, rcx call rax mov rcx, [rbp+var_8] imul eax, [rcx+24h] cmp eax, 0 jle short loc_FD759 mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax loc_FD759: mov rax, [rbp+var_8] mov rax, [rax+28h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov rcx, [rbp+var_8] mov rcx, [rcx] mov edx, [rbp+var_1C] mov rsi, [rcx+rdx*8] mov ecx, [rbp+var_28] add rsi, rcx mov rdx, [rbp+var_18] mov ecx, [rbp+var_28] add rdx, rcx call rax mov rcx, [rbp+var_8] imul eax, [rcx+24h] cmp eax, 0 jl short loc_FD798 jmp short loc_FD7DD loc_FD798: mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_1C] mov rdx, [rax+rcx*8] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov [rax+rcx*8], rdx cmp [rbp+var_2C], 0 jz short loc_FD7D2 mov edx, [rbp+var_C] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov rax, [rax+rcx*8] mov ecx, [rbp+var_2C] mov [rax+rcx-1], edx loc_FD7D2: mov eax, [rbp+var_1C] mov [rbp+var_C], eax jmp loc_FD6E7 loc_FD7DD: mov rdx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax] mov ecx, [rbp+var_C] mov [rax+rcx*8], rdx cmp [rbp+var_2C], 0 jz short loc_FD803 mov edx, [rbp+var_C] mov rax, [rbp+var_18] mov ecx, [rbp+var_2C] mov [rax+rcx-1], edx loc_FD803: add rsp, 30h pop rbp retn
long long downheap(long long *a1, unsigned int a2) { long long result; // rax unsigned int v3; // [rsp+4h] [rbp-2Ch] unsigned int v4; // [rsp+8h] [rbp-28h] unsigned int v5; // [rsp+10h] [rbp-20h] unsigned int v6; // [rsp+14h] [rbp-1Ch] long long v7; // [rsp+18h] [rbp-18h] unsigned int v8; // [rsp+24h] [rbp-Ch] v8 = a2; v7 = *(_QWORD *)(*a1 + 8LL * a2); v5 = *((_DWORD *)a1 + 4); v4 = *((_DWORD *)a1 + 6); v3 = *((_DWORD *)a1 + 7); while ( v8 <= v5 >> 1 ) { v6 = 2 * v8; if ( 2 * v8 < v5 && (int)(*((_DWORD *)a1 + 9) * ((long long ( *)(long long, _QWORD, _QWORD))a1[5])( a1[1], v4 + *(_QWORD *)(*a1 + 8LL * v6), v4 + *(_QWORD *)(*a1 + 8LL * (v6 + 1)))) > 0 ) { ++v6; } if ( (int)(*((_DWORD *)a1 + 9) * ((long long ( *)(long long, _QWORD, long long))a1[5])( a1[1], v4 + *(_QWORD *)(*a1 + 8LL * v6), v4 + v7)) >= 0 ) break; *(_QWORD *)(*a1 + 8LL * v8) = *(_QWORD *)(*a1 + 8LL * v6); if ( v3 ) *(_DWORD *)(*(_QWORD *)(*a1 + 8LL * v8) + v3 - 1LL) = v8; v8 = v6; } result = *a1; *(_QWORD *)(*a1 + 8LL * v8) = v7; if ( v3 ) { result = v7; *(_DWORD *)(v7 + v3 - 1) = v8; } return result; }
_downheap: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] SHR EAX,0x1 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x18] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBP + -0x2c],EAX LAB_001fd6e7: MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x24] JA 0x001fd7dd MOV EAX,dword ptr [RBP + -0xc] ADD EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RBP + -0x20] JNC 0x001fd759 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RSI,RCX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] ADD EDX,0x1 MOV EDX,EDX MOV RDX,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RDX,RCX CALL RAX MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x24] CMP EAX,0x0 JLE 0x001fd759 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX LAB_001fd759: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX] MOV EDX,dword ptr [RBP + -0x1c] MOV RSI,qword ptr [RCX + RDX*0x8] MOV ECX,dword ptr [RBP + -0x28] ADD RSI,RCX MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x28] ADD RDX,RCX CALL RAX MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x24] CMP EAX,0x0 JL 0x001fd798 JMP 0x001fd7dd LAB_001fd798: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8],RDX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001fd7d2 MOV EDX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RAX + RCX*0x8] MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX LAB_001fd7d2: MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0xc],EAX JMP 0x001fd6e7 LAB_001fd7dd: MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0xc] MOV qword ptr [RAX + RCX*0x8],RDX CMP dword ptr [RBP + -0x2c],0x0 JZ 0x001fd803 MOV EDX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX + RCX*0x1 + -0x1],EDX LAB_001fd803: ADD RSP,0x30 POP RBP RET
void _downheap(long *param_1,uint param_2) { uint uVar1; uint uVar2; uint uVar3; long lVar4; int iVar5; uint local_24; uint local_14; lVar4 = *(long *)(*param_1 + (ulong)param_2 * 8); uVar1 = *(uint *)(param_1 + 2); uVar2 = *(uint *)(param_1 + 3); uVar3 = *(uint *)((long)param_1 + 0x1c); local_14 = param_2; while (local_14 <= uVar1 >> 1) { local_24 = local_14 * 2; if ((local_24 < uVar1) && (iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2, *(long *)(*param_1 + (ulong)(local_24 + 1) * 8) + (ulong)uVar2), 0 < iVar5 * *(int *)((long)param_1 + 0x24))) { local_24 = local_24 + 1; } iVar5 = (*(code *)param_1[5]) (param_1[1],*(long *)(*param_1 + (ulong)local_24 * 8) + (ulong)uVar2, lVar4 + (ulong)uVar2); if (-1 < iVar5 * *(int *)((long)param_1 + 0x24)) break; *(int8 *)(*param_1 + (ulong)local_14 * 8) = *(int8 *)(*param_1 + (ulong)local_24 * 8); if (uVar3 != 0) { *(uint *)(*(long *)(*param_1 + (ulong)local_14 * 8) + -1 + (ulong)uVar3) = local_14; } local_14 = local_24; } *(long *)(*param_1 + (ulong)local_14 * 8) = lVar4; if (uVar3 != 0) { *(uint *)(lVar4 + -1 + (ulong)uVar3) = local_14; } return; }
28,517
os_thread_get_prio
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/os_posix.c
uint32_t os_thread_get_prio (void) { p_thread_t* thread = os_thread_current () ; OS_THREAD_WA_T* wa = (OS_THREAD_WA_T*)*thread; if (!wa) { return 0; // Invalid thread wrapper } int policy; struct sched_param param; if (pthread_getschedparam(wa->tid, &policy, &param) == 0) { return map_posix_to_custom_priority(param.sched_priority); // Map and return custom priority } return 0; // If retrieval fails, return default priority }
O3
c
os_thread_get_prio: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp callq 0x147c8 movq (%rax), %rax testq %rax, %rax je 0x148fe movq (%rax), %rdi leaq -0x18(%rbp), %rsi leaq -0x14(%rbp), %rdx callq 0x6350 movl %eax, %ecx xorl %eax, %eax testl %ecx, %ecx jne 0x14900 movl -0x14(%rbp), %r14d movl $0x1, %edi callq 0x63d0 movl %eax, %ebx movl $0x1, %edi callq 0x6500 movl %eax, %ecx subl %ebx, %r14d imull $0x68, %r14d, %eax subl %ebx, %ecx cltd idivl %ecx addl $0x8, %eax jmp 0x14900 xorl %eax, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
os_thread_get_prio: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h call os_thread_current mov rax, [rax] test rax, rax jz short loc_148FE mov rdi, [rax] lea rsi, [rbp+var_18] lea rdx, [rbp+var_14] call _pthread_getschedparam mov ecx, eax xor eax, eax test ecx, ecx jnz short loc_14900 mov r14d, [rbp+var_14] mov edi, 1 call _sched_get_priority_min mov ebx, eax mov edi, 1 call _sched_get_priority_max mov ecx, eax sub r14d, ebx imul eax, r14d, 68h ; 'h' sub ecx, ebx cdq idiv ecx add eax, 8 jmp short loc_14900 loc_148FE: xor eax, eax loc_14900: add rsp, 10h pop rbx pop r14 pop rbp retn
long long os_thread_get_prio() { _QWORD *v0; // rax int v1; // ecx long long result; // rax int v3; // r14d int priority_min; // ebx _BYTE v5[4]; // [rsp+8h] [rbp-18h] BYREF _DWORD v6[5]; // [rsp+Ch] [rbp-14h] BYREF v0 = *(_QWORD **)os_thread_current(); if ( !v0 ) return 0LL; v1 = pthread_getschedparam(*v0, v5, v6); result = 0LL; if ( !v1 ) { v3 = v6[0]; priority_min = sched_get_priority_min(1LL); return (unsigned int)(104 * (v3 - priority_min) / (int)(sched_get_priority_max(1LL) - priority_min) + 8); } return result; }
os_thread_get_prio: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x10 CALL 0x001147c8 MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x001148fe MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x18] LEA RDX,[RBP + -0x14] CALL 0x00106350 MOV ECX,EAX XOR EAX,EAX TEST ECX,ECX JNZ 0x00114900 MOV R14D,dword ptr [RBP + -0x14] MOV EDI,0x1 CALL 0x001063d0 MOV EBX,EAX MOV EDI,0x1 CALL 0x00106500 MOV ECX,EAX SUB R14D,EBX IMUL EAX,R14D,0x68 SUB ECX,EBX CDQ IDIV ECX ADD EAX,0x8 JMP 0x00114900 LAB_001148fe: XOR EAX,EAX LAB_00114900: ADD RSP,0x10 POP RBX POP R14 POP RBP RET
int os_thread_get_prio(void) { int iVar1; int iVar2; long *plVar3; int local_20; sched_param local_1c; plVar3 = (long *)os_thread_current(); if ((pthread_t *)*plVar3 == (pthread_t *)0x0) { iVar2 = 0; } else { iVar1 = pthread_getschedparam(*(pthread_t *)*plVar3,&local_20,&local_1c); iVar2 = 0; if (iVar1 == 0) { iVar2 = sched_get_priority_min(1); iVar1 = sched_get_priority_max(1); iVar2 = ((local_1c.__sched_priority - iVar2) * 0x68) / (iVar1 - iVar2) + 8; } } return iVar2; }
28,518
translog_read_file_header
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_read_file_header(LOGHANDLER_FILE_INFO *desc, File file) { uchar page_buff[LOG_HEADER_DATA_SIZE]; DBUG_ENTER("translog_read_file_header"); if (mysql_file_pread(file, page_buff, sizeof(page_buff), 0, MYF(MY_FNABP | MY_WME))) { DBUG_PRINT("info", ("log read fail error: %d", my_errno)); DBUG_RETURN(1); } translog_interpret_file_header(desc, page_buff); DBUG_PRINT("info", ("timestamp: %llu aria ver: %lu mysql ver: %lu " "server id %lu page size %lu file number %lu " "max lsn: " LSN_FMT, (ulonglong) desc->timestamp, (ulong) desc->maria_version, (ulong) desc->mysql_version, (ulong) desc->server_id, desc->page_size, (ulong) desc->file_number, LSN_IN_PARTS(desc->max_lsn))); DBUG_RETURN(0); }
O0
c
translog_read_file_header: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x50(%rbp) movl %esi, -0x54(%rbp) movl -0x54(%rbp), %edx leaq -0x40(%rbp), %rcx leaq 0x12b659(%rip), %rdi # 0x15af73 movl $0x4e0, %esi # imm = 0x4E0 movl $0x2c, %r8d xorl %eax, %eax movl %eax, %r9d movq $0x12, (%rsp) callq 0x2f990 cmpq $0x0, %rax je 0x2f949 jmp 0x2f93f jmp 0x2f941 jmp 0x2f943 movb $0x1, -0x41(%rbp) jmp 0x2f95e movq -0x50(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x2f7d0 jmp 0x2f958 jmp 0x2f95a movb $0x0, -0x41(%rbp) movb -0x41(%rbp), %al movb %al, -0x55(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2f97f movb -0x55(%rbp), %al addq $0x60, %rsp popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
translog_read_file_header: push rbp mov rbp, rsp sub rsp, 60h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_50], rdi mov [rbp+var_54], esi mov edx, [rbp+var_54] lea rcx, [rbp+var_40] lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 4E0h mov r8d, 2Ch ; ',' xor eax, eax mov r9d, eax mov [rsp+60h+var_60], 12h call inline_mysql_file_pread_0 cmp rax, 0 jz short loc_2F949 jmp short $+2 loc_2F93F: jmp short $+2 loc_2F941: jmp short $+2 loc_2F943: mov [rbp+var_41], 1 jmp short loc_2F95E loc_2F949: mov rdi, [rbp+var_50] lea rsi, [rbp+var_40] call translog_interpret_file_header jmp short $+2 loc_2F958: jmp short $+2 loc_2F95A: mov [rbp+var_41], 0 loc_2F95E: mov al, [rbp+var_41] mov [rbp+var_55], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2F97F mov al, [rbp+var_55] add rsp, 60h pop rbp retn loc_2F97F: call ___stack_chk_fail
char translog_read_file_header(unsigned long long *a1, int a2) { _BYTE v4[56]; // [rsp+20h] [rbp-40h] BYREF unsigned long long v5; // [rsp+58h] [rbp-8h] v5 = __readfsqword(0x28u); if ( inline_mysql_file_pread_0( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 1248, a2, (unsigned int)v4, 44, 0, 18LL) ) { return 1; } translog_interpret_file_header(a1, (long long)v4); return 0; }
translog_read_file_header: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x50],RDI MOV dword ptr [RBP + -0x54],ESI MOV EDX,dword ptr [RBP + -0x54] LEA RCX,[RBP + -0x40] LEA RDI,[0x25af73] MOV ESI,0x4e0 MOV R8D,0x2c XOR EAX,EAX MOV R9D,EAX MOV qword ptr [RSP],0x12 CALL 0x0012f990 CMP RAX,0x0 JZ 0x0012f949 JMP 0x0012f93f LAB_0012f93f: JMP 0x0012f941 LAB_0012f941: JMP 0x0012f943 LAB_0012f943: MOV byte ptr [RBP + -0x41],0x1 JMP 0x0012f95e LAB_0012f949: MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x40] CALL 0x0012f7d0 JMP 0x0012f958 LAB_0012f958: JMP 0x0012f95a LAB_0012f95a: MOV byte ptr [RBP + -0x41],0x0 LAB_0012f95e: MOV AL,byte ptr [RBP + -0x41] MOV byte ptr [RBP + -0x55],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012f97f MOV AL,byte ptr [RBP + -0x55] ADD RSP,0x60 POP RBP RET LAB_0012f97f: CALL 0x0012a270
int8 translog_read_file_header(int8 param_1,int4 param_2) { long lVar1; long in_FS_OFFSET; bool local_49; int1 local_48 [56]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0x4e0, param_2,local_48,0x2c,0,0x12); if (lVar1 == 0) { translog_interpret_file_header(param_1,local_48); } local_49 = lVar1 != 0; 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_49); }
28,519
nglog::ErrnoLogMessage::~ErrnoLogMessage()
ng-log[P]ng-log/src/logging.cc
ErrnoLogMessage::~ErrnoLogMessage() { // Don't access errno directly because it may have been altered // while streaming the message. stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno() << "]"; }
O1
cpp
nglog::ErrnoLogMessage::~ErrnoLogMessage(): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movl $0x7538, %r14d # imm = 0x7538 addq 0x8(%rdi), %r14 leaq 0x17b95(%rip), %rsi # 0x23c8c movl $0x2, %edx movq %r14, %rdi callq 0x7610 movq 0x8(%rbx), %rax movl (%rax), %esi leaq 0x8(%rsp), %rdi callq 0xc1c7 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r14, %rdi callq 0x7610 movq %rax, %r14 leaq 0x17855(%rip), %rsi # 0x23985 movl $0x2, %edx movq %rax, %rdi callq 0x7610 movq 0x8(%rbx), %rax movl (%rax), %esi movq %r14, %rdi callq 0x7970 leaq 0x17b53(%rip), %rsi # 0x23ca5 movl $0x1, %edx movq %rax, %rdi callq 0x7610 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc17a movq 0x18(%rsp), %rsi incq %rsi callq 0x7540 movq %rbx, %rdi callq 0xb8b8 addq $0x28, %rsp popq %rbx popq %r14 retq jmp 0xc18c movq %rax, %r14 jmp 0xc1af movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc1af movq 0x18(%rsp), %rsi incq %rsi callq 0x7540 movq %rbx, %rdi callq 0xb8b8 movq %r14, %rdi callq 0x7990 movq %rax, %rdi callq 0x9fcd
_ZN5nglog15ErrnoLogMessageD2Ev: push r14; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()' push rbx sub rsp, 28h mov rbx, rdi mov r14d, 7538h add r14, [rdi+8] lea rsi, aRunningDuratio+1Ah; ": " mov edx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx+8] mov esi, [rax] lea rdi, [rsp+38h+var_30] call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int) mov rsi, [rsp+38h+var_30] mov rdx, [rsp+38h+var_28] mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax lea rsi, asc_23985; " [" mov edx, 2 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx+8] mov esi, [rax] mov rdi, r14 call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aLogLineFormatI+16h; "]" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C17A mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C17A: mov rdi, rbx; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() add rsp, 28h pop rbx pop r14 retn jmp short $+2 loc_C18C: mov r14, rax jmp short loc_C1AF mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C1AF mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C1AF: mov rdi, rbx; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this) { long long v1; // r14 long long v2; // r14 long long v3; // rax void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF v1 = *((_QWORD *)this + 1) + 30008LL; std::__ostream_insert<char,std::char_traits<char>>(v1, ": ", 2LL); nglog::StrError[abi:cxx11](v4, **((unsigned int **)this + 1)); v2 = std::__ostream_insert<char,std::char_traits<char>>(v1, v4[0], v4[1]); std::__ostream_insert<char,std::char_traits<char>>(v2, " [", 2LL); v3 = std::ostream::operator<<(v2, **((unsigned int **)this + 1)); std::__ostream_insert<char,std::char_traits<char>>(v3, "]", 1LL); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); nglog::LogMessage::~LogMessage(this); }
~ErrnoLogMessage: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R14D,0x7538 ADD R14,qword ptr [RDI + 0x8] LAB_0010c0f0: LEA RSI,[0x123c8c] MOV EDX,0x2 MOV RDI,R14 CALL 0x00107610 MOV RAX,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RAX] LAB_0010c10a: LEA RDI,[RSP + 0x8] CALL 0x0010c1c7 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0010c11e: MOV RDI,R14 CALL 0x00107610 MOV R14,RAX LEA RSI,[0x123985] MOV EDX,0x2 MOV RDI,RAX CALL 0x00107610 MOV RAX,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RAX] MOV RDI,R14 CALL 0x00107970 LEA RSI,[0x123ca5] MOV EDX,0x1 MOV RDI,RAX CALL 0x00107610 LAB_0010c15f: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010c17a MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107540 LAB_0010c17a: MOV RDI,RBX CALL 0x0010b8b8 ADD RSP,0x28 POP RBX POP R14 RET
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */ void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this) { long lVar1; ostream *poVar2; long *local_30; long local_28; long local_20 [2]; lVar1 = *(long *)(this + 8); /* try { // try from 0010c0f0 to 0010c103 has its CatchHandler @ 0010c18c */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)(lVar1 + 0x7538),": ",2); /* try { // try from 0010c10a to 0010c113 has its CatchHandler @ 0010c18a */ StrError_abi_cxx11_((nglog *)&local_30,**(int **)(this + 8)); /* try { // try from 0010c11e to 0010c15e has its CatchHandler @ 0010c191 */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(lVar1 + 0x7538),(char *)local_30,local_28); std::__ostream_insert<char,std::char_traits<char>>(poVar2," [",2); poVar2 = (ostream *)std::ostream::operator<<(poVar2,**(int **)(this + 8)); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"]",1); if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } LogMessage::~LogMessage((LogMessage *)this); return; }
28,520
nglog::ErrnoLogMessage::~ErrnoLogMessage()
ng-log[P]ng-log/src/logging.cc
ErrnoLogMessage::~ErrnoLogMessage() { // Don't access errno directly because it may have been altered // while streaming the message. stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno() << "]"; }
O2
cpp
nglog::ErrnoLogMessage::~ErrnoLogMessage(): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movl $0x7538, %edi # imm = 0x7538 addq 0x8(%rbx), %rdi leaq 0x13a6e(%rip), %rsi # 0x1ec74 callq 0x7590 movq %rax, %r14 movq 0x8(%rbx), %rax movl (%rax), %esi leaq 0x8(%rsp), %rdi callq 0xb29d leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x74e0 leaq 0x1373b(%rip), %rsi # 0x1e96d movq %rax, %rdi callq 0x7590 movq 0x8(%rbx), %rcx movl (%rcx), %esi movq %rax, %rdi callq 0x7a00 leaq 0x13a3e(%rip), %rsi # 0x1ec8d movq %rax, %rdi callq 0x7590 leaq 0x8(%rsp), %rdi callq 0x7b58 movq %rbx, %rdi callq 0xab82 addq $0x28, %rsp popq %rbx popq %r14 retq jmp 0xb273 movq %rax, %r14 jmp 0xb285 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x7b58 movq %rbx, %rdi callq 0xab82 movq %r14, %rdi callq 0x7a20 movq %rax, %rdi callq 0x976b
_ZN5nglog15ErrnoLogMessageD2Ev: push r14; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()' push rbx sub rsp, 28h mov rbx, rdi mov edi, 7538h add rdi, [rbx+8] lea rsi, aRunningDuratio+1Ah; ": " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax mov rax, [rbx+8] mov esi, [rax] lea rdi, [rsp+38h+var_30] call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int) lea rsi, [rsp+38h+var_30] mov rdi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rsi, asc_1E96D; " [" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [rbx+8] mov esi, [rcx] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aLogLineFormatI+16h; "]" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rdi, [rsp+38h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() add rsp, 28h pop rbx pop r14 retn jmp short $+2 loc_B273: mov r14, rax jmp short loc_B285 mov r14, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B285: mov rdi, rbx; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this) { long long v1; // r14 long long v2; // rax long long v3; // rax long long v4; // rax _BYTE v5[48]; // [rsp+8h] [rbp-30h] BYREF v1 = std::operator<<<std::char_traits<char>>(*((_QWORD *)this + 1) + 30008LL, ": "); nglog::StrError[abi:cxx11](v5, **((unsigned int **)this + 1)); v2 = std::operator<<<char>(v1, v5); v3 = std::operator<<<std::char_traits<char>>(v2, " ["); v4 = std::ostream::operator<<(v3, **((unsigned int **)this + 1)); std::operator<<<std::char_traits<char>>(v4, "]"); std::string::~string(v5); nglog::LogMessage::~LogMessage(this); }
~ErrnoLogMessage: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV EDI,0x7538 ADD RDI,qword ptr [RBX + 0x8] LAB_0010b1ff: LEA RSI,[0x11ec74] CALL 0x00107590 MOV R14,RAX MOV RAX,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RAX] LAB_0010b214: LEA RDI,[RSP + 0x8] CALL 0x0010b29d LAB_0010b21e: LEA RSI,[RSP + 0x8] MOV RDI,R14 CALL 0x001074e0 LEA RSI,[0x11e96d] MOV RDI,RAX CALL 0x00107590 MOV RCX,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RCX] MOV RDI,RAX CALL 0x00107a00 LEA RSI,[0x11ec8d] MOV RDI,RAX CALL 0x00107590 LAB_0010b257: LEA RDI,[RSP + 0x8] CALL 0x00107b58 MOV RDI,RBX CALL 0x0010ab82 ADD RSP,0x28 POP RBX POP R14 RET
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */ void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this) { ostream *poVar1; nglog local_30 [32]; /* try { // try from 0010b1ff to 0010b20a has its CatchHandler @ 0010b273 */ poVar1 = std::operator<<((ostream *)(*(long *)(this + 8) + 0x7538),": "); /* try { // try from 0010b214 to 0010b21d has its CatchHandler @ 0010b271 */ StrError_abi_cxx11_(local_30,**(int **)(this + 8)); /* try { // try from 0010b21e to 0010b256 has its CatchHandler @ 0010b278 */ poVar1 = std::operator<<(poVar1,(string *)local_30); poVar1 = std::operator<<(poVar1," ["); poVar1 = (ostream *)std::ostream::operator<<(poVar1,**(int **)(this + 8)); std::operator<<(poVar1,"]"); std::__cxx11::string::~string((string *)local_30); LogMessage::~LogMessage((LogMessage *)this); return; }
28,521
nglog::ErrnoLogMessage::~ErrnoLogMessage()
ng-log[P]ng-log/src/logging.cc
ErrnoLogMessage::~ErrnoLogMessage() { // Don't access errno directly because it may have been altered // while streaming the message. stream() << ": " << StrError(preserved_errno()) << " [" << preserved_errno() << "]"; }
O3
cpp
nglog::ErrnoLogMessage::~ErrnoLogMessage(): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movl $0x7538, %r14d # imm = 0x7538 addq 0x8(%rdi), %r14 leaq 0x17fdf(%rip), %rsi # 0x23c74 movl $0x2, %edx movq %r14, %rdi callq 0x7610 movq 0x8(%rbx), %rax movl (%rax), %esi leaq 0x8(%rsp), %rdi callq 0xbd65 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r14, %rdi callq 0x7610 movq %rax, %r14 leaq 0x17c9f(%rip), %rsi # 0x2396d movl $0x2, %edx movq %rax, %rdi callq 0x7610 movq 0x8(%rbx), %rax movl (%rax), %esi movq %r14, %rdi callq 0x7970 leaq 0x17f9d(%rip), %rsi # 0x23c8d movl $0x1, %edx movq %rax, %rdi callq 0x7610 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbd18 movq 0x18(%rsp), %rsi incq %rsi callq 0x7540 movq %rbx, %rdi callq 0xb3a6 addq $0x28, %rsp popq %rbx popq %r14 retq jmp 0xbd2a movq %rax, %r14 jmp 0xbd4d movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbd4d movq 0x18(%rsp), %rsi incq %rsi callq 0x7540 movq %rbx, %rdi callq 0xb3a6 movq %r14, %rdi callq 0x7990 movq %rax, %rdi callq 0x9b03
_ZN5nglog15ErrnoLogMessageD2Ev: push r14; Alternative name is 'nglog::ErrnoLogMessage::~ErrnoLogMessage()' push rbx sub rsp, 28h mov rbx, rdi mov r14d, 7538h add r14, [rdi+8] lea rsi, aRunningDuratio+1Ah; ": " mov edx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx+8] mov esi, [rax] lea rdi, [rsp+38h+var_30] call _ZN5nglog8StrErrorB5cxx11Ei; nglog::StrError(int) mov rsi, [rsp+38h+var_30] mov rdx, [rsp+38h+var_28] mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r14, rax lea rsi, asc_2396D; " [" mov edx, 2 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx+8] mov esi, [rax] mov rdi, r14 call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, aLogLineFormatI+16h; "]" mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BD18 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BD18: mov rdi, rbx; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() add rsp, 28h pop rbx pop r14 retn jmp short $+2 loc_BD2A: mov r14, rax jmp short loc_BD4D mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BD4D mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BD4D: mov rdi, rbx; this call _ZN5nglog10LogMessageD2Ev; nglog::LogMessage::~LogMessage() mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void nglog::ErrnoLogMessage::~ErrnoLogMessage(nglog::ErrnoLogMessage *this) { long long v1; // r14 long long v2; // r14 long long v3; // rax void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF v1 = *((_QWORD *)this + 1) + 30008LL; std::__ostream_insert<char,std::char_traits<char>>(v1, ": ", 2LL); nglog::StrError[abi:cxx11](v4, **((unsigned int **)this + 1)); v2 = std::__ostream_insert<char,std::char_traits<char>>(v1, v4[0], v4[1]); std::__ostream_insert<char,std::char_traits<char>>(v2, " [", 2LL); v3 = std::ostream::operator<<(v2, **((unsigned int **)this + 1)); std::__ostream_insert<char,std::char_traits<char>>(v3, "]", 1LL); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); nglog::LogMessage::~LogMessage(this); }
~ErrnoLogMessage: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R14D,0x7538 ADD R14,qword ptr [RDI + 0x8] LAB_0010bc8e: LEA RSI,[0x123c74] MOV EDX,0x2 MOV RDI,R14 CALL 0x00107610 MOV RAX,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RAX] LAB_0010bca8: LEA RDI,[RSP + 0x8] CALL 0x0010bd65 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0010bcbc: MOV RDI,R14 CALL 0x00107610 MOV R14,RAX LEA RSI,[0x12396d] MOV EDX,0x2 MOV RDI,RAX CALL 0x00107610 MOV RAX,qword ptr [RBX + 0x8] MOV ESI,dword ptr [RAX] MOV RDI,R14 CALL 0x00107970 LEA RSI,[0x123c8d] MOV EDX,0x1 MOV RDI,RAX CALL 0x00107610 LAB_0010bcfd: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010bd18 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107540 LAB_0010bd18: MOV RDI,RBX CALL 0x0010b3a6 ADD RSP,0x28 POP RBX POP R14 RET
/* nglog::ErrnoLogMessage::~ErrnoLogMessage() */ void __thiscall nglog::ErrnoLogMessage::~ErrnoLogMessage(ErrnoLogMessage *this) { long lVar1; ostream *poVar2; long *local_30; long local_28; long local_20 [2]; lVar1 = *(long *)(this + 8); /* try { // try from 0010bc8e to 0010bca1 has its CatchHandler @ 0010bd2a */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)(lVar1 + 0x7538),": ",2); /* try { // try from 0010bca8 to 0010bcb1 has its CatchHandler @ 0010bd28 */ StrError_abi_cxx11_((nglog *)&local_30,**(int **)(this + 8)); /* try { // try from 0010bcbc to 0010bcfc has its CatchHandler @ 0010bd2f */ poVar2 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(lVar1 + 0x7538),(char *)local_30,local_28); std::__ostream_insert<char,std::char_traits<char>>(poVar2," [",2); poVar2 = (ostream *)std::ostream::operator<<(poVar2,**(int **)(this + 8)); std::__ostream_insert<char,std::char_traits<char>>(poVar2,"]",1); if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } LogMessage::~LogMessage((LogMessage *)this); return; }
28,522
match_re(regex_t*, char*)
eloqsql/client/mysqltest.cc
int match_re(regex_t *re, char *str) { while (my_isspace(charset_info, *str)) str++; if (str[0] == '/' && str[1] == '*') { char *comm_end= strstr (str, "*/"); if (! comm_end) die("Statement is unterminated comment"); str= comm_end + 2; } int err= regexec(re, str, (size_t)0, NULL, 0); if (err == 0) return 1; else if (err == REG_NOMATCH) return 0; { char erbuf[100]; size_t len= regerror(err, re, erbuf, sizeof(erbuf)); die("error %s, %d/%d `%s'\n", re_eprint(err), (int)len, (int)sizeof(erbuf), erbuf); } return 0; }
O3
cpp
match_re(regex_t*, char*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x70, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movq 0x36d09f(%rip), %rax # 0x3da388 movq 0x40(%rax), %rax decq %rsi movzbl 0x1(%rsi), %ecx incq %rsi testb $0x8, 0x1(%rax,%rcx) jne 0x6d2f0 cmpb $0x2f, %cl jne 0x6d32b cmpb $0x2a, 0x1(%rsi) jne 0x6d32b leaq 0xa13c6(%rip), %rax # 0x10e6d6 movq %rsi, %rdi movq %rax, %rsi callq 0x5f540 testq %rax, %rax je 0x6d3b5 movq %rax, %rsi addq $0x2, %rsi movq %rbx, %rdi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0xa1962 movl %eax, %r14d movl $0x1, %eax testl %r14d, %r14d je 0x6d34f cmpl $0x11, %r14d jne 0x6d367 xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x6d3d2 addq $0x70, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x80(%rbp), %rdx movl $0x64, %ecx movl %r14d, %edi movq %rbx, %rsi callq 0xa1798 movq %rax, %rbx movl %r14d, %edi callq 0x6d3d7 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x6d3d2 leaq 0x85613(%rip), %rdi # 0xf29af leaq 0x3f0f1d(%rip), %rsi # 0x45e2c0 leaq -0x80(%rbp), %r8 movl %ebx, %edx movl $0x64, %ecx xorl %eax, %eax callq 0x62bd2 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x6d3d2 leaq 0xa130e(%rip), %rdi # 0x10e6d9 xorl %eax, %eax callq 0x62bd2 callq 0x5f320
_ZL8match_reP7regex_tPc: push rbp mov rbp, rsp push r14 push rbx sub rsp, 70h mov rbx, rdi mov rax, fs:28h mov [rbp+var_18], rax mov rax, cs:_ZL12charset_info; charset_info mov rax, [rax+40h] dec rsi loc_6D2F0: movzx ecx, byte ptr [rsi+1] inc rsi test byte ptr [rax+rcx+1], 8 jnz short loc_6D2F0 cmp cl, 2Fh ; '/' jnz short loc_6D32B cmp byte ptr [rsi+1], 2Ah ; '*' jnz short loc_6D32B lea rax, asc_10E6D6; "*/" mov rdi, rsi mov rsi, rax call _strstr test rax, rax jz loc_6D3B5 mov rsi, rax add rsi, 2 loc_6D32B: mov rdi, rbx xor edx, edx xor ecx, ecx xor r8d, r8d call pcre2_regexec mov r14d, eax mov eax, 1 test r14d, r14d jz short loc_6D34F cmp r14d, 11h jnz short loc_6D367 xor eax, eax loc_6D34F: mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_6D3D2 add rsp, 70h pop rbx pop r14 pop rbp retn loc_6D367: lea rdx, [rbp+var_80] mov ecx, 64h ; 'd' mov edi, r14d mov rsi, rbx call pcre2_regerror mov rbx, rax mov edi, r14d; int call _Z9re_eprinti; re_eprint(int) mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_6D3D2 lea rdi, aErrorSDDS; "error %s, %d/%d `%s'\n" lea rsi, _ZZ9re_eprintiE5epbuf; re_eprint(int)::epbuf lea r8, [rbp+var_80] mov edx, ebx mov ecx, 64h ; 'd' xor eax, eax call _ZL3diePKcz; die(char const*,...) loc_6D3B5: mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_6D3D2 lea rdi, aStatementIsUnt; "Statement is unterminated comment" xor eax, eax call _ZL3diePKcz; die(char const*,...) loc_6D3D2: call ___stack_chk_fail
long long match_re( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v10; // rsi long long v11; // rcx long long v12; // rax long long v13; // rdx __va_list_tag *v14; // rcx long long v15; // r8 long long v16; // r9 __m128 v17; // xmm4 __m128 v18; // xmm5 unsigned int v19; // r14d long long result; // rax unsigned int v21; // ebx long long v22; // r9 __m128 v23; // xmm4 __m128 v24; // xmm5 char v25[104]; // [rsp+0h] [rbp-80h] BYREF unsigned long long v26; // [rsp+68h] [rbp-18h] v26 = __readfsqword(0x28u); v10 = a2 - 1; do v11 = *(unsigned __int8 *)++v10; while ( (*(_BYTE *)(*((_QWORD *)charset_info + 8) + v11 + 1) & 8) != 0 ); if ( (_BYTE)v11 == 47 && *(_BYTE *)(v10 + 1) == 42 ) { v12 = strstr(v10, "*/"); if ( !v12 ) die( "Statement is unterminated comment", (long long)"*/", v13, v14, v15, v16, a3, a4, a5, a6, v17, v18, a9, a10, v25[0]); v10 = v12 + 2; } v19 = pcre2_regexec(a1, v10, 0LL, 0LL, 0LL); result = 1LL; if ( v19 ) { if ( v19 != 17 ) { v21 = pcre2_regerror(v19, a1, v25, 100LL); re_eprint(v19); die( "error %s, %d/%d `%s'\n", (long long)&re_eprint(int)::epbuf, v21, (__va_list_tag *)((char *)&qword_60 + 4), (long long)v25, v22, a3, a4, a5, a6, v23, v24, a9, a10, v25[0]); } return 0LL; } return result; }
match_re: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x70 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [0x004da388] MOV RAX,qword ptr [RAX + 0x40] DEC RSI LAB_0016d2f0: MOVZX ECX,byte ptr [RSI + 0x1] INC RSI TEST byte ptr [RAX + RCX*0x1 + 0x1],0x8 JNZ 0x0016d2f0 CMP CL,0x2f JNZ 0x0016d32b CMP byte ptr [RSI + 0x1],0x2a JNZ 0x0016d32b LEA RAX,[0x20e6d6] MOV RDI,RSI MOV RSI,RAX CALL 0x0015f540 TEST RAX,RAX JZ 0x0016d3b5 MOV RSI,RAX ADD RSI,0x2 LAB_0016d32b: MOV RDI,RBX XOR EDX,EDX XOR ECX,ECX XOR R8D,R8D CALL 0x001a1962 MOV R14D,EAX MOV EAX,0x1 TEST R14D,R14D JZ 0x0016d34f CMP R14D,0x11 JNZ 0x0016d367 XOR EAX,EAX LAB_0016d34f: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x0016d3d2 ADD RSP,0x70 POP RBX POP R14 POP RBP RET LAB_0016d367: LEA RDX,[RBP + -0x80] MOV ECX,0x64 MOV EDI,R14D MOV RSI,RBX CALL 0x001a1798 MOV RBX,RAX MOV EDI,R14D CALL 0x0016d3d7 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0016d3d2 LEA RDI,[0x1f29af] LEA RSI,[0x55e2c0] LEA R8,[RBP + -0x80] MOV EDX,EBX MOV ECX,0x64 XOR EAX,EAX CALL 0x00162bd2 LAB_0016d3b5: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0016d3d2 LEA RDI,[0x20e6d9] XOR EAX,EAX CALL 0x00162bd2 LAB_0016d3d2: CALL 0x0015f320
/* match_re(regex_t*, char*) */ int8 match_re(regex_t *param_1,char *param_2) { int iVar1; int8 uVar2; ulong uVar3; char *pcVar4; char *pcVar5; long in_FS_OFFSET; int1 local_88 [104]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); pcVar5 = param_2 + -1; do { pcVar4 = pcVar5; pcVar5 = pcVar4 + 1; } while ((*(byte *)(*(long *)(charset_info + 0x40) + 1 + (ulong)(byte)pcVar4[1]) & 8) != 0); if ((pcVar4[1] == 0x2f) && (pcVar4[2] == '*')) { pcVar5 = strstr(pcVar5,"*/"); if (pcVar5 == (char *)0x0) { if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { /* WARNING: Subroutine does not return */ die("Statement is unterminated comment"); } goto LAB_0016d3d2; } pcVar5 = pcVar5 + 2; } iVar1 = pcre2_regexec(param_1,pcVar5,0,0,0); uVar2 = 1; if (iVar1 != 0) { if (iVar1 != 0x11) { uVar3 = pcre2_regerror(iVar1,param_1,local_88,100); re_eprint(iVar1); if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { /* WARNING: Subroutine does not return */ die("error %s, %d/%d `%s\'\n",re_eprint(int)::epbuf,uVar3 & 0xffffffff,100,local_88); } goto LAB_0016d3d2; } uVar2 = 0; } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return uVar2; } LAB_0016d3d2: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,523
skip_trailing_space
eloqsql/strings/strings_def.h
static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len) { const uchar *end= ptr + len; if (len > 20) { const uchar *end_words= (const uchar *)(intptr) (((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT); const uchar *start_words= (const uchar *)(intptr) ((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT); DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT); if (end_words > ptr) { while (end > end_words && end[-1] == 0x20) end--; if (end[-1] == 0x20 && start_words < end_words) while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT) end -= SIZEOF_INT; } } while (end > ptr && end[-1] == 0x20) end--; return (end); }
O0
c
skip_trailing_space: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x14, -0x10(%rbp) jbe 0x4113a movq -0x18(%rbp), %rax shrq $0x2, %rax shlq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax addq $0x4, %rax subq $0x1, %rax shrq $0x2, %rax shlq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x4109d movq -0x20(%rbp), %rax cmpq -0x8(%rbp), %rax jbe 0x41138 jmp 0x410ad movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x29(%rbp) jbe 0x410cd movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al testb $0x1, %al jne 0x410d6 jmp 0x410e4 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x410ad movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax jne 0x41136 movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x41136 jmp 0x410fd movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x2a(%rbp) jbe 0x4111d movq -0x18(%rbp), %rax cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 sete %al movb %al, -0x2a(%rbp) movb -0x2a(%rbp), %al testb $0x1, %al jne 0x41126 jmp 0x41134 movq -0x18(%rbp), %rax addq $-0x4, %rax movq %rax, -0x18(%rbp) jmp 0x410fd jmp 0x41136 jmp 0x41138 jmp 0x4113a jmp 0x4113c movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x8(%rbp), %rcx movb %al, -0x2b(%rbp) jbe 0x4115c movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x2b(%rbp) movb -0x2b(%rbp), %al testb $0x1, %al jne 0x41165 jmp 0x41173 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x4113c movq -0x18(%rbp), %rax popq %rbp retq nopl (%rax)
skip_trailing_space_1: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_18], rax cmp [rbp+var_10], 14h jbe loc_4113A mov rax, [rbp+var_18] shr rax, 2 shl rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_8] add rax, 4 sub rax, 1 shr rax, 2 shl rax, 2 mov [rbp+var_28], rax jmp short $+2 loc_4109D: mov rax, [rbp+var_20] cmp rax, [rbp+var_8] jbe loc_41138 jmp short $+2 loc_410AD: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_29], al jbe short loc_410CD mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' setz al mov [rbp+var_29], al loc_410CD: mov al, [rbp+var_29] test al, 1 jnz short loc_410D6 jmp short loc_410E4 loc_410D6: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_410AD loc_410E4: mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' jnz short loc_41136 mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnb short loc_41136 jmp short $+2 loc_410FD: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_2A], al jbe short loc_4111D mov rax, [rbp+var_18] cmp dword ptr [rax-4], 20202020h setz al mov [rbp+var_2A], al loc_4111D: mov al, [rbp+var_2A] test al, 1 jnz short loc_41126 jmp short loc_41134 loc_41126: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_18], rax jmp short loc_410FD loc_41134: jmp short $+2 loc_41136: jmp short $+2 loc_41138: jmp short $+2 loc_4113A: jmp short $+2 loc_4113C: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_8] mov [rbp+var_2B], al jbe short loc_4115C mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' setz al mov [rbp+var_2B], al loc_4115C: mov al, [rbp+var_2B] test al, 1 jnz short loc_41165 jmp short loc_41173 loc_41165: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_4113C loc_41173: mov rax, [rbp+var_18] pop rbp retn
unsigned long long skip_trailing_space_1(unsigned long long a1, unsigned long long a2) { bool v3; // [rsp+1h] [rbp-2Bh] bool v4; // [rsp+2h] [rbp-2Ah] bool v5; // [rsp+3h] [rbp-29h] unsigned long long v6; // [rsp+4h] [rbp-28h] unsigned long long v7; // [rsp+Ch] [rbp-20h] unsigned long long v8; // [rsp+14h] [rbp-18h] v8 = a2 + a1; if ( a2 > 0x14 ) { v7 = 4 * (v8 >> 2); v6 = 4 * ((a1 + 3) >> 2); if ( v7 > a1 ) { while ( 1 ) { v5 = 0; if ( v8 > v7 ) v5 = *(_BYTE *)(v8 - 1) == 32; if ( !v5 ) break; --v8; } if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 ) { while ( 1 ) { v4 = 0; if ( v8 > v6 ) v4 = *(_DWORD *)(v8 - 4) == 538976288; if ( !v4 ) break; v8 -= 4LL; } } } } while ( 1 ) { v3 = 0; if ( v8 > a1 ) v3 = *(_BYTE *)(v8 - 1) == 32; if ( !v3 ) break; --v8; } return v8; }
skip_trailing_space: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x10],0x14 JBE 0x0014113a MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x2 SHL RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x4 SUB RAX,0x1 SHR RAX,0x2 SHL RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x0014109d LAB_0014109d: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x8] JBE 0x00141138 JMP 0x001410ad LAB_001410ad: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x29],AL JBE 0x001410cd MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_001410cd: MOV AL,byte ptr [RBP + -0x29] TEST AL,0x1 JNZ 0x001410d6 JMP 0x001410e4 LAB_001410d6: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x001410ad LAB_001410e4: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 JNZ 0x00141136 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00141136 JMP 0x001410fd LAB_001410fd: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x2a],AL JBE 0x0014111d MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + -0x4],0x20202020 SETZ AL MOV byte ptr [RBP + -0x2a],AL LAB_0014111d: MOV AL,byte ptr [RBP + -0x2a] TEST AL,0x1 JNZ 0x00141126 JMP 0x00141134 LAB_00141126: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x4 MOV qword ptr [RBP + -0x18],RAX JMP 0x001410fd LAB_00141134: JMP 0x00141136 LAB_00141136: JMP 0x00141138 LAB_00141138: JMP 0x0014113a LAB_0014113a: JMP 0x0014113c LAB_0014113c: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x8] MOV byte ptr [RBP + -0x2b],AL JBE 0x0014115c MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x2b],AL LAB_0014115c: MOV AL,byte ptr [RBP + -0x2b] TEST AL,0x1 JNZ 0x00141165 JMP 0x00141173 LAB_00141165: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0014113c LAB_00141173: MOV RAX,qword ptr [RBP + -0x18] POP RBP RET
ulong skip_trailing_space(ulong param_1,ulong param_2) { ulong uVar1; ulong uVar2; bool bVar3; ulong local_20; local_20 = param_1 + param_2; if (0x14 < param_2) { uVar1 = local_20 & 0xfffffffffffffffc; uVar2 = param_1 + 3 & 0xfffffffffffffffc; if (param_1 < uVar1) { while( true ) { bVar3 = false; if (uVar1 < local_20) { bVar3 = *(char *)(local_20 - 1) == ' '; } if (!bVar3) break; local_20 = local_20 - 1; } if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) { while( true ) { bVar3 = false; if (uVar2 < local_20) { bVar3 = *(int *)(local_20 - 4) == 0x20202020; } if (!bVar3) break; local_20 = local_20 - 4; } } } } while( true ) { bVar3 = false; if (param_1 < local_20) { bVar3 = *(char *)(local_20 - 1) == ' '; } if (!bVar3) break; local_20 = local_20 - 1; } return local_20; }
28,524
cs_enter
eloqsql/strings/ctype.c
static int cs_enter(MY_XML_PARSER *st,const char *attr, size_t len) { struct my_cs_file_info *i= (struct my_cs_file_info *)st->user_data; const struct my_cs_file_section_st *s= cs_file_sec(attr,len); int state= s ? s->state : 0; switch (state) { case 0: i->loader->reporter(WARNING_LEVEL, "Unknown LDML tag: '%.*s'", len, attr); break; case _CS_CHARSET: my_charset_file_reset_charset(i); break; case _CS_COLLATION: my_charset_file_reset_collation(i); break; case _CS_RESET: return tailoring_append(st, " &", 0, NULL); default: break; } return MY_XML_OK; }
O3
c
cs_enter: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r14 movq 0x140(%rdi), %rbx leaq 0x2b28e9(%rip), %r13 # 0x383220 leaq 0xb41c(%rip), %r12 # 0xdbd5a movq %r14, %rdi movq %r12, %rsi movq %r15, %rdx callq 0x291d0 testl %eax, %eax jne 0xd0957 cmpb $0x0, (%r12,%r15) je 0xd0997 movq 0x18(%r13), %r12 addq $0x10, %r13 testq %r12, %r12 jne 0xd093e movq 0x7a8(%rbx), %r8 leaq 0xe496(%rip), %rsi # 0xdee08 movl $0x1, %edi movq %r15, %rdx movq %r14, %rcx xorl %eax, %eax callq *0xa0(%r8) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl (%r13), %eax cmpl $0x8, %eax jg 0xd09c1 testl %eax, %eax je 0xd0964 cmpl $0x8, %eax jne 0xd0986 addq $0x6e0, %rbx # imm = 0x6E0 movl $0xc8, %edx movq %rbx, %rdi xorl %esi, %esi callq 0x292c0 jmp 0xd0986 cmpl $0x9, %eax je 0xd09ee cmpl $0x12d, %eax # imm = 0x12D jne 0xd0986 leaq 0xe44d(%rip), %rsi # 0xdee21 movq %rbx, %rdi xorl %edx, %edx xorl %ecx, %ecx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xd1b90 movq $0x0, 0x690(%rbx) movb $0x0, 0x6a0(%rbx) jmp 0xd0986
cs_enter: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r14, rsi mov rbx, [rdi+140h] lea r13, sec lea r12, aIndexXml+6; "xml" loc_D093E: mov rdi, r14 mov rsi, r12 mov rdx, r15 call _strncmp test eax, eax jnz short loc_D0957 cmp byte ptr [r12+r15], 0 jz short loc_D0997 loc_D0957: mov r12, [r13+18h] add r13, 10h test r12, r12 jnz short loc_D093E loc_D0964: mov r8, [rbx+7A8h] lea rsi, aUnknownLdmlTag; "Unknown LDML tag: '%.*s'" mov edi, 1 mov rdx, r15 mov rcx, r14 xor eax, eax call qword ptr [r8+0A0h] loc_D0986: xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_D0997: mov eax, [r13+0] cmp eax, 8 jg short loc_D09C1 test eax, eax jz short loc_D0964 cmp eax, 8 jnz short loc_D0986 add rbx, 6E0h mov edx, 0C8h mov rdi, rbx xor esi, esi call _memset jmp short loc_D0986 loc_D09C1: cmp eax, 9 jz short loc_D09EE cmp eax, 12Dh jnz short loc_D0986 lea rsi, asc_DEE21; " &" mov rdi, rbx xor edx, edx xor ecx, ecx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp tailoring_append loc_D09EE: mov qword ptr [rbx+690h], 0 mov byte ptr [rbx+6A0h], 0 jmp short loc_D0986
long long cs_enter(long long a1, const char *a2, long long a3) { long long v4; // rbx char *v5; // r13 char *v6; // r12 int v8; // eax v4 = *(_QWORD *)(a1 + 320); v5 = (char *)&sec; v6 = "xml"; while ( (unsigned int)strncmp(a2, v6, a3) || v6[a3] ) { v6 = (char *)*((_QWORD *)v5 + 3); v5 += 16; if ( !v6 ) goto LABEL_5; } v8 = *(_DWORD *)v5; if ( *(int *)v5 <= 8 ) { if ( v8 ) { if ( v8 == 8 ) memset(v4 + 1760, 0LL, 200LL); } else { LABEL_5: (*(void (**)(long long, const char *, ...))(*(_QWORD *)(v4 + 1960) + 160LL))( 1LL, "Unknown LDML tag: '%.*s'", a3, a2); } return 0LL; } if ( v8 == 9 ) { *(_QWORD *)(v4 + 1680) = 0LL; *(_BYTE *)(v4 + 1696) = 0; return 0LL; } if ( v8 != 301 ) return 0LL; return tailoring_append(v4, " &", 0LL, 0LL); }
cs_enter: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R14,RSI MOV RBX,qword ptr [RDI + 0x140] LEA R13,[0x483220] LEA R12,[0x1dbd5a] LAB_001d093e: MOV RDI,R14 MOV RSI,R12 MOV RDX,R15 CALL 0x001291d0 TEST EAX,EAX JNZ 0x001d0957 CMP byte ptr [R12 + R15*0x1],0x0 JZ 0x001d0997 LAB_001d0957: MOV R12,qword ptr [R13 + 0x18] ADD R13,0x10 TEST R12,R12 JNZ 0x001d093e LAB_001d0964: MOV R8,qword ptr [RBX + 0x7a8] LEA RSI,[0x1dee08] MOV EDI,0x1 MOV RDX,R15 MOV RCX,R14 XOR EAX,EAX CALL qword ptr [R8 + 0xa0] LAB_001d0986: XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001d0997: MOV EAX,dword ptr [R13] CMP EAX,0x8 JG 0x001d09c1 TEST EAX,EAX JZ 0x001d0964 CMP EAX,0x8 JNZ 0x001d0986 ADD RBX,0x6e0 MOV EDX,0xc8 MOV RDI,RBX XOR ESI,ESI CALL 0x001292c0 JMP 0x001d0986 LAB_001d09c1: CMP EAX,0x9 JZ 0x001d09ee CMP EAX,0x12d JNZ 0x001d0986 LEA RSI,[0x1dee21] MOV RDI,RBX XOR EDX,EDX XOR ECX,ECX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001d1b90 LAB_001d09ee: MOV qword ptr [RBX + 0x690],0x0 MOV byte ptr [RBX + 0x6a0],0x0 JMP 0x001d0986
int8 cs_enter(long param_1,char *param_2,size_t param_3) { long lVar1; int iVar2; int8 uVar3; char *__s2; int *piVar4; lVar1 = *(long *)(param_1 + 0x140); piVar4 = &sec; __s2 = "xml"; while ((iVar2 = strncmp(param_2,__s2,param_3), iVar2 != 0 || (__s2[param_3] != '\0'))) { __s2 = *(char **)(piVar4 + 6); piVar4 = piVar4 + 4; if (__s2 == (char *)0x0) { LAB_001d0964: (**(code **)(*(long *)(lVar1 + 0x7a8) + 0xa0))(1,"Unknown LDML tag: \'%.*s\'",param_3,param_2) ; return 0; } } iVar2 = *piVar4; if (8 < iVar2) { if (iVar2 == 9) { *(int8 *)(lVar1 + 0x690) = 0; *(int1 *)(lVar1 + 0x6a0) = 0; return 0; } if (iVar2 != 0x12d) { return 0; } uVar3 = tailoring_append(lVar1,&DAT_001dee21,0,0); return uVar3; } if (iVar2 != 0) { if (iVar2 != 8) { return 0; } memset((void *)(lVar1 + 0x6e0),0,200); return 0; } goto LAB_001d0964; }
28,525
my_once_alloc
eloqsql/mysys/my_once.c
void* my_once_alloc(size_t Size, myf MyFlags) { size_t get_size, max_left; uchar* point; reg1 USED_MEM *next; reg2 USED_MEM **prev; Size= ALIGN_SIZE(Size); prev= &my_once_root_block; max_left=0; for (next=my_once_root_block ; next && next->left < Size ; next= next->next) { if (next->left > max_left) max_left=next->left; prev= &next->next; } if (! next) { /* Time to alloc new block */ get_size= Size+ALIGN_SIZE(sizeof(USED_MEM)); if (max_left*4 < my_once_extra && get_size < my_once_extra) get_size=my_once_extra; /* Normal alloc */ if ((next = (USED_MEM*) malloc(get_size)) == 0) { my_errno=errno; if (MyFlags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size); return((uchar*) 0); } DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size)); next->next= 0; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; } point= (uchar*) ((char*) next+ (next->size-next->left)); next->left-= Size; if (MyFlags & MY_ZEROFILL) bzero(point, Size); return((void*) point); }
O0
c
my_once_alloc: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movq %rax, -0x10(%rbp) leaq 0x3b5935(%rip), %rax # 0x40ebe0 movq %rax, -0x40(%rbp) movq $0x0, -0x28(%rbp) leaq 0x3b5922(%rip), %rax # 0x40ebe0 movq (%rax), %rax movq %rax, -0x38(%rbp) xorl %eax, %eax cmpq $0x0, -0x38(%rbp) movb %al, -0x41(%rbp) je 0x592e3 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x10(%rbp), %rax setb %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x592ec jmp 0x5931b movq -0x38(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x28(%rbp), %rax jbe 0x59306 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x592c5 cmpq $0x0, -0x38(%rbp) jne 0x593f4 movq -0x10(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax shlq $0x2, %rax leaq 0x1bab1f(%rip), %rcx # 0x213e60 movl (%rcx), %ecx cmpq %rcx, %rax jae 0x59367 movq -0x20(%rbp), %rax leaq 0x1bab0d(%rip), %rcx # 0x213e60 movl (%rcx), %ecx cmpq %rcx, %rax jae 0x59367 leaq 0x1baaff(%rip), %rax # 0x213e60 movl (%rax), %eax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x26440 movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0x593be callq 0x26050 movl (%rax), %eax movl %eax, -0x48(%rbp) callq 0x5a150 movl -0x48(%rbp), %ecx movl %ecx, (%rax) movq -0x18(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0x593b1 movq -0x20(%rbp), %rdx movl $0x5, %edi movl $0x1004, %esi # imm = 0x1004 movb $0x0, %al callq 0x64630 movq $0x0, -0x8(%rbp) jmp 0x59447 jmp 0x593c0 jmp 0x593c2 movq -0x38(%rbp), %rax movq $0x0, (%rax) movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx subq $0x18, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movq -0x38(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x38(%rbp), %rdx subq 0x8(%rdx), %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdx movq -0x38(%rbp), %rax movq 0x8(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rax andq $0x20, %rax cmpq $0x0, %rax je 0x5943f movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0x261c0 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_once_alloc: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_10], rax lea rax, my_once_root_block mov [rbp+var_40], rax mov [rbp+var_28], 0 lea rax, my_once_root_block mov rax, [rax] mov [rbp+var_38], rax loc_592C5: xor eax, eax cmp [rbp+var_38], 0 mov [rbp+var_41], al jz short loc_592E3 mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_10] setb al mov [rbp+var_41], al loc_592E3: mov al, [rbp+var_41] test al, 1 jnz short loc_592EC jmp short loc_5931B loc_592EC: mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_28] jbe short loc_59306 mov rax, [rbp+var_38] mov rax, [rax+8] mov [rbp+var_28], rax loc_59306: mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_38], rax jmp short loc_592C5 loc_5931B: cmp [rbp+var_38], 0 jnz loc_593F4 mov rax, [rbp+var_10] add rax, 18h mov [rbp+var_20], rax mov rax, [rbp+var_28] shl rax, 2 lea rcx, my_once_extra mov ecx, [rcx] cmp rax, rcx jnb short loc_59367 mov rax, [rbp+var_20] lea rcx, my_once_extra mov ecx, [rcx] cmp rax, rcx jnb short loc_59367 lea rax, my_once_extra mov eax, [rax] mov [rbp+var_20], rax loc_59367: mov rdi, [rbp+var_20] call _malloc mov [rbp+var_38], rax cmp rax, 0 jnz short loc_593BE call ___errno_location mov eax, [rax] mov [rbp+var_48], eax call _my_thread_var mov ecx, [rbp+var_48] mov [rax], ecx mov rax, [rbp+var_18] and rax, 18h cmp rax, 0 jz short loc_593B1 mov rdx, [rbp+var_20] mov edi, 5 mov esi, 1004h mov al, 0 call my_error loc_593B1: mov [rbp+var_8], 0 jmp loc_59447 loc_593BE: jmp short $+2 loc_593C0: jmp short $+2 loc_593C2: mov rax, [rbp+var_38] mov qword ptr [rax], 0 mov rcx, [rbp+var_20] mov rax, [rbp+var_38] mov [rax+10h], rcx mov rcx, [rbp+var_20] sub rcx, 18h mov rax, [rbp+var_38] mov [rax+8], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_40] mov [rax], rcx loc_593F4: mov rax, [rbp+var_38] mov rcx, [rbp+var_38] mov rcx, [rcx+10h] mov rdx, [rbp+var_38] sub rcx, [rdx+8] add rax, rcx mov [rbp+var_30], rax mov rdx, [rbp+var_10] mov rax, [rbp+var_38] mov rcx, [rax+8] sub rcx, rdx mov [rax+8], rcx mov rax, [rbp+var_18] and rax, 20h cmp rax, 0 jz short loc_5943F mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] xor esi, esi call _memset loc_5943F: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_59447: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
char * my_once_alloc(long long a1, char a2) { int v2; // r8d int v3; // r9d int v5; // [rsp+8h] [rbp-48h] bool v6; // [rsp+Fh] [rbp-41h] _QWORD *v7; // [rsp+10h] [rbp-40h] _QWORD *i; // [rsp+18h] [rbp-38h] char *v9; // [rsp+20h] [rbp-30h] unsigned long long v10; // [rsp+28h] [rbp-28h] unsigned long long v11; // [rsp+30h] [rbp-20h] unsigned long long v12; // [rsp+40h] [rbp-10h] v12 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL; v7 = &my_once_root_block; v10 = 0LL; for ( i = (_QWORD *)my_once_root_block; ; i = (_QWORD *)*i ) { v6 = 0; if ( i ) v6 = i[1] < v12; if ( !v6 ) break; if ( i[1] > v10 ) v10 = i[1]; v7 = i; } if ( !i ) { v11 = v12 + 24; if ( 4 * v10 < my_once_extra && v11 < my_once_extra ) v11 = my_once_extra; i = (_QWORD *)malloc(v11); if ( !i ) { v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v5; if ( (a2 & 0x18) != 0 ) my_error(5, 4100, v11, v5, v2, v3); return 0LL; } *i = 0LL; i[2] = v11; i[1] = v11 - 24; *v7 = i; } v9 = (char *)i + i[2] - i[1]; i[1] -= v12; if ( (a2 & 0x20) != 0 ) memset(v9, 0LL, v12); return v9; }
my_once_alloc: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV qword ptr [RBP + -0x10],RAX LEA RAX,[0x50ebe0] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x28],0x0 LEA RAX,[0x50ebe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_001592c5: XOR EAX,EAX CMP qword ptr [RBP + -0x38],0x0 MOV byte ptr [RBP + -0x41],AL JZ 0x001592e3 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x10] SETC AL MOV byte ptr [RBP + -0x41],AL LAB_001592e3: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x001592ec JMP 0x0015931b LAB_001592ec: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x28] JBE 0x00159306 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX LAB_00159306: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX JMP 0x001592c5 LAB_0015931b: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x001593f4 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x2 LEA RCX,[0x313e60] MOV ECX,dword ptr [RCX] CMP RAX,RCX JNC 0x00159367 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x313e60] MOV ECX,dword ptr [RCX] CMP RAX,RCX JNC 0x00159367 LEA RAX,[0x313e60] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LAB_00159367: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00126440 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x001593be CALL 0x00126050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x48],EAX CALL 0x0015a150 MOV ECX,dword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x18 CMP RAX,0x0 JZ 0x001593b1 MOV RDX,qword ptr [RBP + -0x20] MOV EDI,0x5 MOV ESI,0x1004 MOV AL,0x0 CALL 0x00164630 LAB_001593b1: MOV qword ptr [RBP + -0x8],0x0 JMP 0x00159447 LAB_001593be: JMP 0x001593c0 LAB_001593c0: JMP 0x001593c2 LAB_001593c2: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x20] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX LAB_001593f4: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x38] SUB RCX,qword ptr [RDX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RDX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x8] SUB RCX,RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x20 CMP RAX,0x0 JZ 0x0015943f MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x001261c0 LAB_0015943f: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_00159447: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
void * my_once_alloc(long param_1,ulong param_2) { int iVar1; ulong __n; int *piVar2; void *__s; bool bVar3; int8 *local_48; int8 *local_40; ulong local_30; size_t local_28; __n = param_1 + 7U & 0xfffffffffffffff8; local_48 = &my_once_root_block; local_30 = 0; local_40 = my_once_root_block; while( true ) { bVar3 = false; if (local_40 != (int8 *)0x0) { bVar3 = (ulong)local_40[1] < __n; } if (!bVar3) break; if (local_30 < (ulong)local_40[1]) { local_30 = local_40[1]; } local_48 = local_40; local_40 = (int8 *)*local_40; } if (local_40 == (int8 *)0x0) { local_28 = __n + 0x18; if ((local_30 << 2 < (ulong)my_once_extra) && (local_28 < my_once_extra)) { local_28 = (size_t)my_once_extra; } local_40 = (int8 *)malloc(local_28); if (local_40 == (int8 *)0x0) { piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if ((param_2 & 0x18) != 0) { my_error(5,0x1004,local_28); } return (void *)0x0; } *local_40 = 0; local_40[2] = local_28; local_40[1] = local_28 - 0x18; *local_48 = local_40; } __s = (void *)((long)local_40 + (local_40[2] - local_40[1])); local_40[1] = local_40[1] - __n; if ((param_2 & 0x20) != 0) { memset(__s,0,__n); } return __s; }
28,526
emit_class_init_end
bluesky950520[P]quickjs/quickjs.c
static void emit_class_init_end(JSParseState *s, ClassFieldsDef *cf) { int cpool_idx; s->cur_func = cf->fields_init_fd; emit_op(s, OP_return_undef); s->cur_func = s->cur_func->parent; cpool_idx = cpool_add(s, JS_NULL); cf->fields_init_fd->parent_cpool_idx = cpool_idx; emit_op(s, OP_fclosure); emit_u32(s, cpool_idx); emit_op(s, OP_set_home_object); }
O1
c
emit_class_init_end: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %r14 movq (%rsi), %rax movq %rax, 0x90(%rdi) movl $0x138, %ebx # imm = 0x138 leaq (%rax,%rbx), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x29, %esi callq 0x1b4d0 movq 0x90(%r14), %rax movq 0x8(%rax), %rax movq %rax, 0x90(%r14) movl $0x2, %edx movq %r14, %rdi xorl %esi, %esi callq 0x6513b movl %eax, %ebp movq (%r15), %rax movl %ebp, 0x10(%rax) movq 0x90(%r14), %rax leaq (%rax,%rbx), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x3, %esi callq 0x1b4d0 movq 0x90(%r14), %rdi addq %rbx, %rdi leaq 0x4(%rsp), %rsi movl %ebp, (%rsi) movl $0x4, %edx callq 0x1b422 movq 0x90(%r14), %rax addq %rax, %rbx movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movq %rbx, %rdi movl $0x50, %esi callq 0x1b4d0 addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
emit_class_init_end: push rbp push r15 push r14 push rbx push rax mov r15, rsi mov r14, rdi mov rax, [rsi] mov [rdi+90h], rax mov ebx, 138h lea rdi, [rax+rbx] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 29h ; ')' call dbuf_putc mov rax, [r14+90h] mov rax, [rax+8] mov [r14+90h], rax mov edx, 2 mov rdi, r14 xor esi, esi call cpool_add mov ebp, eax mov rax, [r15] mov [rax+10h], ebp mov rax, [r14+90h] lea rdi, [rax+rbx] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 3 call dbuf_putc mov rdi, [r14+90h] add rdi, rbx lea rsi, [rsp+28h+var_24] mov [rsi], ebp mov edx, 4 call dbuf_put mov rax, [r14+90h] add rbx, rax mov ecx, [rax+140h] mov [rax+168h], ecx mov rdi, rbx mov esi, 50h ; 'P' call dbuf_putc add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long emit_class_init_end(long long *a1, long long *a2) { long long v2; // rax long long v4; // rax int v5; // ebp long long v6; // rax _QWORD *v7; // rdi long long v8; // rax int v10[9]; // [rsp+0h] [rbp-24h] BYREF v10[0] = HIDWORD(v2); v4 = *a2; a1[18] = *a2; *(_DWORD *)(v4 + 360) = *(_DWORD *)(v4 + 320); dbuf_putc((_QWORD *)(v4 + 312), 41); a1[18] = *(_QWORD *)(a1[18] + 8); v5 = cpool_add(a1, 0LL, 2LL); *(_DWORD *)(*a2 + 16) = v5; v6 = a1[18]; *(_DWORD *)(v6 + 360) = *(_DWORD *)(v6 + 320); dbuf_putc((_QWORD *)(v6 + 312), 3); v7 = (_QWORD *)(a1[18] + 312); v10[0] = v5; dbuf_put(v7, (long long)v10, 4LL); v8 = a1[18]; *(_DWORD *)(v8 + 360) = *(_DWORD *)(v8 + 320); return dbuf_putc((_QWORD *)(v8 + 312), 80); }
emit_class_init_end: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x90],RAX MOV EBX,0x138 LEA RDI,[RAX + RBX*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0x29 CALL 0x0011b4d0 MOV RAX,qword ptr [R14 + 0x90] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [R14 + 0x90],RAX MOV EDX,0x2 MOV RDI,R14 XOR ESI,ESI CALL 0x0016513b MOV EBP,EAX MOV RAX,qword ptr [R15] MOV dword ptr [RAX + 0x10],EBP MOV RAX,qword ptr [R14 + 0x90] LEA RDI,[RAX + RBX*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0x3 CALL 0x0011b4d0 MOV RDI,qword ptr [R14 + 0x90] ADD RDI,RBX LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],EBP MOV EDX,0x4 CALL 0x0011b422 MOV RAX,qword ptr [R14 + 0x90] ADD RBX,RAX MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV RDI,RBX MOV ESI,0x50 CALL 0x0011b4d0 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void emit_class_init_end(long param_1,long *param_2) { long lVar1; int4 uVar2; int1 local_24 [4]; lVar1 = *param_2; *(long *)(param_1 + 0x90) = lVar1; *(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140); dbuf_putc(lVar1 + 0x138,0x29); *(int8 *)(param_1 + 0x90) = *(int8 *)(*(long *)(param_1 + 0x90) + 8); uVar2 = cpool_add(param_1,0,2); *(int4 *)(*param_2 + 0x10) = uVar2; lVar1 = *(long *)(param_1 + 0x90); *(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140); dbuf_putc(lVar1 + 0x138,3); dbuf_put(*(long *)(param_1 + 0x90) + 0x138,local_24,4); lVar1 = *(long *)(param_1 + 0x90); *(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140); dbuf_putc(lVar1 + 0x138,0x50); return; }
28,527
emit_class_init_end
bluesky950520[P]quickjs/quickjs.c
static void emit_class_init_end(JSParseState *s, ClassFieldsDef *cf) { int cpool_idx; s->cur_func = cf->fields_init_fd; emit_op(s, OP_return_undef); s->cur_func = s->cur_func->parent; cpool_idx = cpool_add(s, JS_NULL); cf->fields_init_fd->parent_cpool_idx = cpool_idx; emit_op(s, OP_fclosure); emit_u32(s, cpool_idx); emit_op(s, OP_set_home_object); }
O2
c
emit_class_init_end: pushq %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movq (%rsi), %rax movq %rax, 0x90(%rdi) pushq $0x29 popq %rsi callq 0x4fa1b movq 0x90(%rbx), %rax movq 0x8(%rax), %rax movq %rax, 0x90(%rbx) pushq $0x2 popq %rdx movq %rbx, %rdi xorl %esi, %esi callq 0x56369 movl %eax, %ebp movq (%r14), %rax movl %ebp, 0x10(%rax) pushq $0x3 popq %rsi movq %rbx, %rdi callq 0x4fa1b movq %rbx, %rdi movl %ebp, %esi callq 0x563de pushq $0x50 popq %rsi movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x4fa1b
emit_class_init_end: push rbp push r14 push rbx mov r14, rsi mov rbx, rdi mov rax, [rsi] mov [rdi+90h], rax push 29h ; ')' pop rsi call emit_op mov rax, [rbx+90h] mov rax, [rax+8] mov [rbx+90h], rax push 2 pop rdx mov rdi, rbx xor esi, esi call cpool_add mov ebp, eax mov rax, [r14] mov [rax+10h], ebp push 3 pop rsi mov rdi, rbx call emit_op mov rdi, rbx mov esi, ebp call emit_u32 push 50h ; 'P' pop rsi mov rdi, rbx pop rbx pop r14 pop rbp jmp emit_op
long long emit_class_init_end(long long *a1, long long a2) { unsigned int v2; // ebp a1[18] = *(_QWORD *)a2; emit_op((long long)a1, 41); a1[18] = *(_QWORD *)(a1[18] + 8); v2 = cpool_add(a1, 0LL, 2LL); *(_DWORD *)(*(_QWORD *)a2 + 16LL) = v2; emit_op((long long)a1, 3); emit_u32((long long)a1, v2); return emit_op((long long)a1, 80); }
emit_class_init_end: PUSH RBP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x90],RAX PUSH 0x29 POP RSI CALL 0x0014fa1b MOV RAX,qword ptr [RBX + 0x90] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x90],RAX PUSH 0x2 POP RDX MOV RDI,RBX XOR ESI,ESI CALL 0x00156369 MOV EBP,EAX MOV RAX,qword ptr [R14] MOV dword ptr [RAX + 0x10],EBP PUSH 0x3 POP RSI MOV RDI,RBX CALL 0x0014fa1b MOV RDI,RBX MOV ESI,EBP CALL 0x001563de PUSH 0x50 POP RSI MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x0014fa1b
void emit_class_init_end(long param_1,long *param_2) { int4 uVar1; *(long *)(param_1 + 0x90) = *param_2; emit_op(param_1,0x29); *(int8 *)(param_1 + 0x90) = *(int8 *)(*(long *)(param_1 + 0x90) + 8); uVar1 = cpool_add(param_1,0,2); *(int4 *)(*param_2 + 0x10) = uVar1; emit_op(param_1,3); emit_u32(param_1,uVar1); emit_op(param_1,0x50); return; }
28,528
js_string_trim
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_trim(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSValue str, ret; int a, b, len; JSString *p; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) return str; p = JS_VALUE_GET_STRING(str); a = 0; b = len = p->len; if (magic & 1) { while (a < len && lre_is_space(string_get(p, a))) a++; } if (magic & 2) { while (b > a && lre_is_space(string_get(p, b - 1))) b--; } ret = js_sub_string(ctx, p, a, b); JS_FreeValue(ctx, str); return ret; }
O2
c
js_string_trim: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, %r13d movq %rdi, %rbx callq 0x3a290 movq %rax, %r15 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x68d27 movq %r15, %rax movq %r14, %rdx jmp 0x68df8 movq %rbx, 0x10(%rsp) movq 0x4(%r15), %rbx movl %ebx, %ebp andl $0x7fffffff, %ebp # imm = 0x7FFFFFFF xorl %r12d, %r12d testb $0x1, %r13b je 0x68d83 movq %r14, 0x8(%rsp) movl %ebx, %r14d andl $0x7fffffff, %r14d # imm = 0x7FFFFFFF xorl %r12d, %r12d cmpq %r12, %r14 je 0x68d7b testb $-0x80, 0x7(%r15) jne 0x68d67 movzbl 0x18(%r15,%r12), %edi jmp 0x68d6d movzwl 0x18(%r15,%r12,2), %edi callq 0x7b908 testl %eax, %eax je 0x68d7e incq %r12 jmp 0x68d53 movl %ebp, %r12d movq 0x8(%rsp), %r14 testb $0x2, %r13b je 0x68dc9 movq %r14, %r13 andl $0x7fffffff, %ebx # imm = 0x7FFFFFFF movslq %r12d, %r14 cmpl %ebp, %r14d cmovll %r12d, %ebp cmpq %r14, %rbx jle 0x68dc6 testb $-0x80, 0x7(%r15) jne 0x68db0 movzbl 0x17(%r15,%rbx), %edi jmp 0x68db6 movzwl 0x16(%r15,%rbx,2), %edi callq 0x7b908 decq %rbx testl %eax, %eax jne 0x68d9c incl %ebx movl %ebx, %ebp movq %r13, %r14 movq 0x10(%rsp), %rbx movq %rbx, %rdi movq %r15, %rsi movl %r12d, %edx movl %ebp, %ecx callq 0x2e21d movq %rax, %r12 movq %rdx, %r13 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1801e movq %r12, %rax movq %r13, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_string_trim: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13d, r9d mov rbx, rdi call JS_ToStringCheckObject mov r15, rax mov r14, rdx cmp r14d, 6 jnz short loc_68D27 mov rax, r15 mov rdx, r14 jmp loc_68DF8 loc_68D27: mov [rsp+48h+var_38], rbx mov rbx, [r15+4] mov ebp, ebx and ebp, 7FFFFFFFh xor r12d, r12d test r13b, 1 jz short loc_68D83 mov [rsp+48h+var_40], r14 mov r14d, ebx and r14d, 7FFFFFFFh xor r12d, r12d loc_68D53: cmp r14, r12 jz short loc_68D7B test byte ptr [r15+7], 80h jnz short loc_68D67 movzx edi, byte ptr [r15+r12+18h] jmp short loc_68D6D loc_68D67: movzx edi, word ptr [r15+r12*2+18h] loc_68D6D: call lre_is_space test eax, eax jz short loc_68D7E inc r12 jmp short loc_68D53 loc_68D7B: mov r12d, ebp loc_68D7E: mov r14, [rsp+48h+var_40] loc_68D83: test r13b, 2 jz short loc_68DC9 mov r13, r14 and ebx, 7FFFFFFFh movsxd r14, r12d cmp r14d, ebp cmovl ebp, r12d loc_68D9C: cmp rbx, r14 jle short loc_68DC6 test byte ptr [r15+7], 80h jnz short loc_68DB0 movzx edi, byte ptr [r15+rbx+17h] jmp short loc_68DB6 loc_68DB0: movzx edi, word ptr [r15+rbx*2+16h] loc_68DB6: call lre_is_space dec rbx test eax, eax jnz short loc_68D9C inc ebx mov ebp, ebx loc_68DC6: mov r14, r13 loc_68DC9: mov rbx, [rsp+48h+var_38] mov rdi, rbx mov rsi, r15 mov edx, r12d mov ecx, ebp call js_sub_string mov r12, rax mov r13, rdx mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue mov rax, r12 mov rdx, r13 loc_68DF8: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_string_trim( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { char v14; // r13 long long result; // rax long long v16; // rdx long long v17; // r15 long long v18; // r14 long long v19; // rbx int v20; // ebp long long i; // r12 long long v22; // rdi long long v23; // rbx long long v24; // rdi long long v25; // r12 long long v26; // [rsp+8h] [rbp-40h] v14 = a6; result = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v17 = result; v18 = v16; if ( (_DWORD)v16 != 6 ) { v19 = *(_QWORD *)(result + 4); v20 = v19 & 0x7FFFFFFF; LODWORD(i) = 0; if ( (v14 & 1) != 0 ) { v26 = v16; for ( i = 0LL; (v19 & 0x7FFFFFFF) != i; ++i ) { if ( *(char *)(v17 + 7) < 0 ) v22 = *(unsigned __int16 *)(v17 + 2 * i + 24); else v22 = *(unsigned __int8 *)(v17 + i + 24); if ( !(unsigned int)lre_is_space(v22) ) goto LABEL_11; } LODWORD(i) = v19 & 0x7FFFFFFF; LABEL_11: v18 = v26; } if ( (v14 & 2) != 0 ) { v23 = v19 & 0x7FFFFFFF; if ( (int)i < v20 ) v20 = i; while ( v23 > (int)i ) { if ( *(char *)(v17 + 7) < 0 ) v24 = *(unsigned __int16 *)(v17 + 2 * v23 + 22); else v24 = *(unsigned __int8 *)(v17 + v23 + 23); --v23; if ( !(unsigned int)lre_is_space(v24) ) { v20 = v23 + 1; break; } } } v25 = js_sub_string(a1, (_DWORD *)v17, (unsigned int)i, v20); JS_FreeValue(a1, v17, v18); return v25; } return result; }
js_string_trim: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13D,R9D MOV RBX,RDI CALL 0x0013a290 MOV R15,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x00168d27 MOV RAX,R15 MOV RDX,R14 JMP 0x00168df8 LAB_00168d27: MOV qword ptr [RSP + 0x10],RBX MOV RBX,qword ptr [R15 + 0x4] MOV EBP,EBX AND EBP,0x7fffffff XOR R12D,R12D TEST R13B,0x1 JZ 0x00168d83 MOV qword ptr [RSP + 0x8],R14 MOV R14D,EBX AND R14D,0x7fffffff XOR R12D,R12D LAB_00168d53: CMP R14,R12 JZ 0x00168d7b TEST byte ptr [R15 + 0x7],0x80 JNZ 0x00168d67 MOVZX EDI,byte ptr [R15 + R12*0x1 + 0x18] JMP 0x00168d6d LAB_00168d67: MOVZX EDI,word ptr [R15 + R12*0x2 + 0x18] LAB_00168d6d: CALL 0x0017b908 TEST EAX,EAX JZ 0x00168d7e INC R12 JMP 0x00168d53 LAB_00168d7b: MOV R12D,EBP LAB_00168d7e: MOV R14,qword ptr [RSP + 0x8] LAB_00168d83: TEST R13B,0x2 JZ 0x00168dc9 MOV R13,R14 AND EBX,0x7fffffff MOVSXD R14,R12D CMP R14D,EBP CMOVL EBP,R12D LAB_00168d9c: CMP RBX,R14 JLE 0x00168dc6 TEST byte ptr [R15 + 0x7],0x80 JNZ 0x00168db0 MOVZX EDI,byte ptr [R15 + RBX*0x1 + 0x17] JMP 0x00168db6 LAB_00168db0: MOVZX EDI,word ptr [R15 + RBX*0x2 + 0x16] LAB_00168db6: CALL 0x0017b908 DEC RBX TEST EAX,EAX JNZ 0x00168d9c INC EBX MOV EBP,EBX LAB_00168dc6: MOV R14,R13 LAB_00168dc9: MOV RBX,qword ptr [RSP + 0x10] MOV RDI,RBX MOV RSI,R15 MOV EDX,R12D MOV ECX,EBP CALL 0x0012e21d MOV R12,RAX MOV R13,RDX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011801e MOV RAX,R12 MOV RDX,R13 LAB_00168df8: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_string_trim(int8 param_1) { int iVar1; long lVar2; int8 uVar3; uint uVar4; uint uVar5; ushort uVar6; uint in_R9D; uint uVar7; ulong uVar8; int1 auVar9 [16]; auVar9 = JS_ToStringCheckObject(); uVar3 = auVar9._8_8_; lVar2 = auVar9._0_8_; if (auVar9._8_4_ != 6) { uVar4 = (uint)*(int8 *)(lVar2 + 4); uVar5 = uVar4 & 0x7fffffff; uVar7 = 0; if ((in_R9D & 1) != 0) { for (uVar8 = 0; (uVar4 & 0x7fffffff) != uVar8; uVar8 = uVar8 + 1) { if ((*(byte *)(lVar2 + 7) & 0x80) == 0) { uVar6 = (ushort)*(byte *)(lVar2 + 0x18 + uVar8); } else { uVar6 = *(ushort *)(lVar2 + 0x18 + uVar8 * 2); } iVar1 = lre_is_space(uVar6); if (iVar1 == 0) goto LAB_00168d7e; } uVar8 = (ulong)uVar5; LAB_00168d7e: uVar7 = (uint)uVar8; } if ((in_R9D & 2) != 0) { uVar8 = (ulong)(uVar4 & 0x7fffffff); if ((int)uVar7 < (int)uVar5) { uVar5 = uVar7; } do { if ((long)uVar8 <= (long)(int)uVar7) goto LAB_00168dc9; if ((*(byte *)(lVar2 + 7) & 0x80) == 0) { uVar6 = (ushort)*(byte *)(lVar2 + 0x17 + uVar8); } else { uVar6 = *(ushort *)(lVar2 + 0x16 + uVar8 * 2); } iVar1 = lre_is_space(uVar6); uVar8 = uVar8 - 1; } while (iVar1 != 0); uVar5 = (int)uVar8 + 1; } LAB_00168dc9: auVar9 = js_sub_string(param_1,lVar2,uVar7,uVar5); JS_FreeValue(param_1,lVar2,uVar3); } return auVar9; }
28,529
lunasvg::SVGPatternAttributes::setDefaultValues(lunasvg::SVGPatternElement const*)
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.h
void setDefaultValues(const SVGPatternElement* element) { if(!m_x) { m_x = element; } if(!m_y) { m_y = element; } if(!m_width) { m_width = element; } if(!m_height) { m_height = element; } if(!m_patternTransform) { m_patternTransform = element; } if(!m_patternUnits) { m_patternUnits = element; } if(!m_patternContentUnits) { m_patternContentUnits = element; } if(!m_viewBox) { m_viewBox = element; } if(!m_preserveAspectRatio) { m_preserveAspectRatio = element; } if(!m_patternContentElement) { m_patternContentElement = element; } }
O0
c
lunasvg::SVGPatternAttributes::setDefaultValues(lunasvg::SVGPatternElement const*): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x0, (%rax) jne 0x383f5 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, (%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0x3840c movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x38423 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x18(%rax) jne 0x3843a movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x20(%rax) jne 0x38451 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x20(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x28(%rax) jne 0x38468 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x30(%rax) jne 0x3847f movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x30(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x38496 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x38(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x40(%rax) jne 0x384ad movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x40(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x48(%rax) jne 0x384c4 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, 0x48(%rax) popq %rbp retq nopw %cs:(%rax,%rax)
_ZN7lunasvg20SVGPatternAttributes16setDefaultValuesEPKNS_17SVGPatternElementE: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax cmp qword ptr [rax], 0 jnz short loc_383F5 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax], rcx loc_383F5: mov rax, [rbp+var_18] cmp qword ptr [rax+8], 0 jnz short loc_3840C mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+8], rcx loc_3840C: mov rax, [rbp+var_18] cmp qword ptr [rax+10h], 0 jnz short loc_38423 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+10h], rcx loc_38423: mov rax, [rbp+var_18] cmp qword ptr [rax+18h], 0 jnz short loc_3843A mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+18h], rcx loc_3843A: mov rax, [rbp+var_18] cmp qword ptr [rax+20h], 0 jnz short loc_38451 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+20h], rcx loc_38451: mov rax, [rbp+var_18] cmp qword ptr [rax+28h], 0 jnz short loc_38468 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+28h], rcx loc_38468: mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 0 jnz short loc_3847F mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+30h], rcx loc_3847F: mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_38496 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+38h], rcx loc_38496: mov rax, [rbp+var_18] cmp qword ptr [rax+40h], 0 jnz short loc_384AD mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+40h], rcx loc_384AD: mov rax, [rbp+var_18] cmp qword ptr [rax+48h], 0 jnz short loc_384C4 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rax+48h], rcx loc_384C4: pop rbp retn
lunasvg::SVGPatternAttributes * lunasvg::SVGPatternAttributes::setDefaultValues( lunasvg::SVGPatternAttributes *this, const lunasvg::SVGPatternElement *a2) { lunasvg::SVGPatternAttributes *result; // rax if ( !*(_QWORD *)this ) *(_QWORD *)this = a2; if ( !*((_QWORD *)this + 1) ) *((_QWORD *)this + 1) = a2; if ( !*((_QWORD *)this + 2) ) *((_QWORD *)this + 2) = a2; if ( !*((_QWORD *)this + 3) ) *((_QWORD *)this + 3) = a2; if ( !*((_QWORD *)this + 4) ) *((_QWORD *)this + 4) = a2; if ( !*((_QWORD *)this + 5) ) *((_QWORD *)this + 5) = a2; if ( !*((_QWORD *)this + 6) ) *((_QWORD *)this + 6) = a2; if ( !*((_QWORD *)this + 7) ) *((_QWORD *)this + 7) = a2; if ( !*((_QWORD *)this + 8) ) *((_QWORD *)this + 8) = a2; result = this; if ( !*((_QWORD *)this + 9) ) { result = this; *((_QWORD *)this + 9) = a2; } return result; }
setDefaultValues: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RAX],0x0 JNZ 0x001383f5 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX LAB_001383f5: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0013840c MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX LAB_0013840c: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x00138423 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX LAB_00138423: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x0013843a MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX LAB_0013843a: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x20],0x0 JNZ 0x00138451 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX LAB_00138451: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x28],0x0 JNZ 0x00138468 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],RCX LAB_00138468: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x0 JNZ 0x0013847f MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX LAB_0013847f: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x00138496 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX LAB_00138496: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x001384ad MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX LAB_001384ad: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x48],0x0 JNZ 0x001384c4 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x48],RCX LAB_001384c4: POP RBP RET
/* lunasvg::SVGPatternAttributes::setDefaultValues(lunasvg::SVGPatternElement const*) */ void __thiscall lunasvg::SVGPatternAttributes::setDefaultValues (SVGPatternAttributes *this,SVGPatternElement *param_1) { if (*(long *)this == 0) { *(SVGPatternElement **)this = param_1; } if (*(long *)(this + 8) == 0) { *(SVGPatternElement **)(this + 8) = param_1; } if (*(long *)(this + 0x10) == 0) { *(SVGPatternElement **)(this + 0x10) = param_1; } if (*(long *)(this + 0x18) == 0) { *(SVGPatternElement **)(this + 0x18) = param_1; } if (*(long *)(this + 0x20) == 0) { *(SVGPatternElement **)(this + 0x20) = param_1; } if (*(long *)(this + 0x28) == 0) { *(SVGPatternElement **)(this + 0x28) = param_1; } if (*(long *)(this + 0x30) == 0) { *(SVGPatternElement **)(this + 0x30) = param_1; } if (*(long *)(this + 0x38) == 0) { *(SVGPatternElement **)(this + 0x38) = param_1; } if (*(long *)(this + 0x40) == 0) { *(SVGPatternElement **)(this + 0x40) = param_1; } if (*(long *)(this + 0x48) == 0) { *(SVGPatternElement **)(this + 0x48) = param_1; } return; }
28,530
lunasvg::SVGPatternAttributes::setDefaultValues(lunasvg::SVGPatternElement const*)
dmazzella[P]pylunasvg/lunasvg/source/svgpaintelement.h
void setDefaultValues(const SVGPatternElement* element) { if(!m_x) { m_x = element; } if(!m_y) { m_y = element; } if(!m_width) { m_width = element; } if(!m_height) { m_height = element; } if(!m_patternTransform) { m_patternTransform = element; } if(!m_patternUnits) { m_patternUnits = element; } if(!m_patternContentUnits) { m_patternContentUnits = element; } if(!m_viewBox) { m_viewBox = element; } if(!m_preserveAspectRatio) { m_preserveAspectRatio = element; } if(!m_patternContentElement) { m_patternContentElement = element; } }
O1
c
lunasvg::SVGPatternAttributes::setDefaultValues(lunasvg::SVGPatternElement const*): cmpq $0x0, (%rdi) jne 0x190cb movq %rsi, (%rdi) cmpq $0x0, 0x8(%rdi) jne 0x190d6 movq %rsi, 0x8(%rdi) cmpq $0x0, 0x10(%rdi) jne 0x190e1 movq %rsi, 0x10(%rdi) cmpq $0x0, 0x18(%rdi) jne 0x190ec movq %rsi, 0x18(%rdi) cmpq $0x0, 0x20(%rdi) jne 0x190f7 movq %rsi, 0x20(%rdi) cmpq $0x0, 0x28(%rdi) jne 0x19102 movq %rsi, 0x28(%rdi) cmpq $0x0, 0x30(%rdi) jne 0x1910d movq %rsi, 0x30(%rdi) cmpq $0x0, 0x38(%rdi) jne 0x19118 movq %rsi, 0x38(%rdi) cmpq $0x0, 0x40(%rdi) jne 0x19123 movq %rsi, 0x40(%rdi) cmpq $0x0, 0x48(%rdi) je 0x1912b retq movq %rsi, 0x48(%rdi) retq
_ZN7lunasvg20SVGPatternAttributes16setDefaultValuesEPKNS_17SVGPatternElementE: cmp qword ptr [rdi], 0 jnz short loc_190CB mov [rdi], rsi loc_190CB: cmp qword ptr [rdi+8], 0 jnz short loc_190D6 mov [rdi+8], rsi loc_190D6: cmp qword ptr [rdi+10h], 0 jnz short loc_190E1 mov [rdi+10h], rsi loc_190E1: cmp qword ptr [rdi+18h], 0 jnz short loc_190EC mov [rdi+18h], rsi loc_190EC: cmp qword ptr [rdi+20h], 0 jnz short loc_190F7 mov [rdi+20h], rsi loc_190F7: cmp qword ptr [rdi+28h], 0 jnz short loc_19102 mov [rdi+28h], rsi loc_19102: cmp qword ptr [rdi+30h], 0 jnz short loc_1910D mov [rdi+30h], rsi loc_1910D: cmp qword ptr [rdi+38h], 0 jnz short loc_19118 mov [rdi+38h], rsi loc_19118: cmp qword ptr [rdi+40h], 0 jnz short loc_19123 mov [rdi+40h], rsi loc_19123: cmp qword ptr [rdi+48h], 0 jz short loc_1912B retn loc_1912B: mov [rdi+48h], rsi retn
void lunasvg::SVGPatternAttributes::setDefaultValues( lunasvg::SVGPatternAttributes *this, const lunasvg::SVGPatternElement *a2) { if ( !*(_QWORD *)this ) *(_QWORD *)this = a2; if ( !*((_QWORD *)this + 1) ) *((_QWORD *)this + 1) = a2; if ( !*((_QWORD *)this + 2) ) *((_QWORD *)this + 2) = a2; if ( !*((_QWORD *)this + 3) ) *((_QWORD *)this + 3) = a2; if ( !*((_QWORD *)this + 4) ) *((_QWORD *)this + 4) = a2; if ( !*((_QWORD *)this + 5) ) *((_QWORD *)this + 5) = a2; if ( !*((_QWORD *)this + 6) ) *((_QWORD *)this + 6) = a2; if ( !*((_QWORD *)this + 7) ) *((_QWORD *)this + 7) = a2; if ( !*((_QWORD *)this + 8) ) *((_QWORD *)this + 8) = a2; if ( !*((_QWORD *)this + 9) ) *((_QWORD *)this + 9) = a2; }
setDefaultValues: CMP qword ptr [RDI],0x0 JNZ 0x001190cb MOV qword ptr [RDI],RSI LAB_001190cb: CMP qword ptr [RDI + 0x8],0x0 JNZ 0x001190d6 MOV qword ptr [RDI + 0x8],RSI LAB_001190d6: CMP qword ptr [RDI + 0x10],0x0 JNZ 0x001190e1 MOV qword ptr [RDI + 0x10],RSI LAB_001190e1: CMP qword ptr [RDI + 0x18],0x0 JNZ 0x001190ec MOV qword ptr [RDI + 0x18],RSI LAB_001190ec: CMP qword ptr [RDI + 0x20],0x0 JNZ 0x001190f7 MOV qword ptr [RDI + 0x20],RSI LAB_001190f7: CMP qword ptr [RDI + 0x28],0x0 JNZ 0x00119102 MOV qword ptr [RDI + 0x28],RSI LAB_00119102: CMP qword ptr [RDI + 0x30],0x0 JNZ 0x0011910d MOV qword ptr [RDI + 0x30],RSI LAB_0011910d: CMP qword ptr [RDI + 0x38],0x0 JNZ 0x00119118 MOV qword ptr [RDI + 0x38],RSI LAB_00119118: CMP qword ptr [RDI + 0x40],0x0 JNZ 0x00119123 MOV qword ptr [RDI + 0x40],RSI LAB_00119123: CMP qword ptr [RDI + 0x48],0x0 JZ 0x0011912b RET LAB_0011912b: MOV qword ptr [RDI + 0x48],RSI RET
/* lunasvg::SVGPatternAttributes::setDefaultValues(lunasvg::SVGPatternElement const*) */ void __thiscall lunasvg::SVGPatternAttributes::setDefaultValues (SVGPatternAttributes *this,SVGPatternElement *param_1) { if (*(long *)this == 0) { *(SVGPatternElement **)this = param_1; } if (*(long *)(this + 8) == 0) { *(SVGPatternElement **)(this + 8) = param_1; } if (*(long *)(this + 0x10) == 0) { *(SVGPatternElement **)(this + 0x10) = param_1; } if (*(long *)(this + 0x18) == 0) { *(SVGPatternElement **)(this + 0x18) = param_1; } if (*(long *)(this + 0x20) == 0) { *(SVGPatternElement **)(this + 0x20) = param_1; } if (*(long *)(this + 0x28) == 0) { *(SVGPatternElement **)(this + 0x28) = param_1; } if (*(long *)(this + 0x30) == 0) { *(SVGPatternElement **)(this + 0x30) = param_1; } if (*(long *)(this + 0x38) == 0) { *(SVGPatternElement **)(this + 0x38) = param_1; } if (*(long *)(this + 0x40) == 0) { *(SVGPatternElement **)(this + 0x40) = param_1; } if (*(long *)(this + 0x48) != 0) { return; } *(SVGPatternElement **)(this + 0x48) = param_1; return; }
28,531
mi_read_static_record
eloqsql/storage/myisam/mi_statrec.c
int _mi_read_static_record(register MI_INFO *info, register my_off_t pos, register uchar *record) { int error; if (pos != HA_OFFSET_ERROR) { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file <= pos && flush_io_cache(&info->rec_cache)) return(-1); info->rec_cache.seek_not_done=1; /* We have done a seek */ error=info->s->file_read(info, record, info->s->base.reclength, pos,MYF(MY_NABP)) != 0; fast_mi_writeinfo(info); if (! error) { if (!*record) { my_errno=HA_ERR_RECORD_DELETED; return(1); /* Record is deleted */ } info->update|= HA_STATE_AKTIV; /* Record is read */ return(0); } return(-1); /* Error on read */ } fast_mi_writeinfo(info); /* No such record */ return(-1); }
O3
c
mi_read_static_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpq $-0x1, %rsi je 0xa67d3 movq %rdx, %r14 movq %rsi, %r15 testb $0x10, 0x1c8(%rbx) je 0xa6774 cmpq %r15, 0x220(%rbx) ja 0xa6774 leaq 0x220(%rbx), %rdi movl $0x1, %esi callq 0xb55e9 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testl %eax, %eax jne 0xa6802 movl $0x1, 0x300(%rbx) movq (%rbx), %rax movq 0x140(%rax), %rdx movl $0x4, %r8d movq %rbx, %rdi movq %r14, %rsi movq %r15, %rcx callq *0x2e0(%rax) movq %rax, %r15 movq (%rbx), %rax cmpl $0x0, 0x368(%rax) jne 0xa67b6 movq %rbx, %rdi xorl %esi, %esi callq 0x9be26 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testq %r15, %r15 jne 0xa6802 cmpb $0x0, (%r14) je 0xa67f1 orb $0x2, 0x1d0(%rbx) xorl %r12d, %r12d jmp 0xa6802 movq (%rbx), %rax movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmpl $0x0, 0x368(%rax) jne 0xa6802 movq %rbx, %rdi xorl %esi, %esi callq 0x9be26 jmp 0xa6802 callq 0xc5c9a movl $0x86, (%rax) movl $0x1, %r12d movl %r12d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_mi_read_static_record: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi cmp rsi, 0FFFFFFFFFFFFFFFFh jz loc_A67D3 mov r14, rdx mov r15, rsi test byte ptr [rbx+1C8h], 10h jz short loc_A6774 cmp [rbx+220h], r15 ja short loc_A6774 lea rdi, [rbx+220h] mov esi, 1 call my_b_flush_io_cache mov r12d, 0FFFFFFFFh test eax, eax jnz loc_A6802 loc_A6774: mov dword ptr [rbx+300h], 1 mov rax, [rbx] mov rdx, [rax+140h] mov r8d, 4 mov rdi, rbx mov rsi, r14 mov rcx, r15 call qword ptr [rax+2E0h] mov r15, rax mov rax, [rbx] cmp dword ptr [rax+368h], 0 jnz short loc_A67B6 mov rdi, rbx xor esi, esi call _mi_writeinfo loc_A67B6: mov r12d, 0FFFFFFFFh test r15, r15 jnz short loc_A6802 cmp byte ptr [r14], 0 jz short loc_A67F1 or byte ptr [rbx+1D0h], 2 xor r12d, r12d jmp short loc_A6802 loc_A67D3: mov rax, [rbx] mov r12d, 0FFFFFFFFh cmp dword ptr [rax+368h], 0 jnz short loc_A6802 mov rdi, rbx xor esi, esi call _mi_writeinfo jmp short loc_A6802 loc_A67F1: call _my_thread_var mov dword ptr [rax], 86h mov r12d, 1 loc_A6802: mov eax, r12d pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long mi_read_static_record(long long a1, unsigned long long a2, _BYTE *a3) { unsigned int v4; // r12d long long v5; // r15 if ( a2 == -1LL ) { v4 = -1; if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) ) mi_writeinfo((_QWORD *)a1, 0); } else if ( (*(_BYTE *)(a1 + 456) & 0x10) == 0 || *(_QWORD *)(a1 + 544) > a2 || (v4 = -1, !(unsigned int)my_b_flush_io_cache(a1 + 544, 1LL)) ) { *(_DWORD *)(a1 + 768) = 1; v5 = (*(long long ( **)(long long, _BYTE *, _QWORD, unsigned long long, long long))(*(_QWORD *)a1 + 736LL))( a1, a3, *(_QWORD *)(*(_QWORD *)a1 + 320LL), a2, 4LL); if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) ) mi_writeinfo((_QWORD *)a1, 0); v4 = -1; if ( !v5 ) { if ( *a3 ) { *(_BYTE *)(a1 + 464) |= 2u; return 0; } else { *(_DWORD *)my_thread_var(a1) = 134; return 1; } } } return v4; }
_mi_read_static_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP RSI,-0x1 JZ 0x001a67d3 MOV R14,RDX MOV R15,RSI TEST byte ptr [RBX + 0x1c8],0x10 JZ 0x001a6774 CMP qword ptr [RBX + 0x220],R15 JA 0x001a6774 LEA RDI,[RBX + 0x220] MOV ESI,0x1 CALL 0x001b55e9 MOV R12D,0xffffffff TEST EAX,EAX JNZ 0x001a6802 LAB_001a6774: MOV dword ptr [RBX + 0x300],0x1 MOV RAX,qword ptr [RBX] MOV RDX,qword ptr [RAX + 0x140] MOV R8D,0x4 MOV RDI,RBX MOV RSI,R14 MOV RCX,R15 CALL qword ptr [RAX + 0x2e0] MOV R15,RAX MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x368],0x0 JNZ 0x001a67b6 MOV RDI,RBX XOR ESI,ESI CALL 0x0019be26 LAB_001a67b6: MOV R12D,0xffffffff TEST R15,R15 JNZ 0x001a6802 CMP byte ptr [R14],0x0 JZ 0x001a67f1 OR byte ptr [RBX + 0x1d0],0x2 XOR R12D,R12D JMP 0x001a6802 LAB_001a67d3: MOV RAX,qword ptr [RBX] MOV R12D,0xffffffff CMP dword ptr [RAX + 0x368],0x0 JNZ 0x001a6802 MOV RDI,RBX XOR ESI,ESI CALL 0x0019be26 JMP 0x001a6802 LAB_001a67f1: CALL 0x001c5c9a MOV dword ptr [RAX],0x86 MOV R12D,0x1 LAB_001a6802: MOV EAX,R12D POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 _mi_read_static_record(long *param_1,ulong param_2,char *param_3) { int iVar1; long lVar2; int4 *puVar3; int8 uVar4; if (param_2 == 0xffffffffffffffff) { uVar4 = 0xffffffff; if (*(int *)(*param_1 + 0x368) == 0) { _mi_writeinfo(param_1,0); } } else { if ((((*(byte *)(param_1 + 0x39) & 0x10) != 0) && ((ulong)param_1[0x44] <= param_2)) && (iVar1 = my_b_flush_io_cache(param_1 + 0x44,1), iVar1 != 0)) { return 0xffffffff; } *(int4 *)(param_1 + 0x60) = 1; lVar2 = (**(code **)(*param_1 + 0x2e0)) (param_1,param_3,*(int8 *)(*param_1 + 0x140),param_2,4); if (*(int *)(*param_1 + 0x368) == 0) { _mi_writeinfo(param_1,0); } uVar4 = 0xffffffff; if (lVar2 == 0) { if (*param_3 == '\0') { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x86; uVar4 = 1; } else { *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2; uVar4 = 0; } } } return uVar4; }
28,532
init_io_cache_ext
eloqsql/mysys/mf_iocache.c
int init_io_cache_ext(IO_CACHE *info, File file, size_t cachesize, enum cache_type type, my_off_t seek_offset, pbool use_async_io, myf cache_myflags, PSI_file_key file_key __attribute__((unused))) { size_t min_cache; my_off_t pos; my_off_t end_of_file= ~(my_off_t) 0; DBUG_ENTER("init_io_cache_ext"); DBUG_PRINT("enter",("cache:%p type: %d pos: %llu", info, (int) type, (ulonglong) seek_offset)); info->file= file; info->type= TYPE_NOT_SET; /* Don't set it until mutex are created */ info->pos_in_file= seek_offset; info->alloced_buffer = 0; info->buffer=0; info->seek_not_done= 0; info->next_file_user= NULL; if (file >= 0) { DBUG_ASSERT(!(cache_myflags & MY_ENCRYPT)); pos= mysql_file_tell(file, MYF(0)); if ((pos == (my_off_t) -1) && (my_errno == ESPIPE)) { /* This kind of object doesn't support seek() or tell(). Don't set a seek_not_done that will make us again try to seek() later and fail. Additionally, if we're supposed to start somewhere other than the the beginning of whatever this file is, then somebody made a bad assumption. */ DBUG_ASSERT(seek_offset == 0); } else info->seek_not_done= MY_TEST(seek_offset != pos); } else if (type == WRITE_CACHE && _my_b_encr_read) { cache_myflags|= MY_ENCRYPT; DBUG_ASSERT(seek_offset == 0); } info->disk_writes= 0; info->share=0; if (!cachesize && !(cachesize= my_default_record_cache_size)) DBUG_RETURN(1); /* No cache requested */ min_cache=use_async_io ? IO_SIZE*4 : IO_SIZE*2; if (type == READ_CACHE || type == SEQ_READ_APPEND) { /* Assume file isn't growing */ DBUG_ASSERT(!(cache_myflags & MY_ENCRYPT)); if (!(cache_myflags & MY_DONT_CHECK_FILESIZE)) { /* Calculate end of file to avoid allocating oversized buffers */ end_of_file= mysql_file_seek(file, 0L, MY_SEEK_END, MYF(0)); /* Need to reset seek_not_done now that we just did a seek. */ info->seek_not_done= end_of_file == seek_offset ? 0 : 1; if (end_of_file < seek_offset) end_of_file=seek_offset; /* Trim cache size if the file is very small */ if ((my_off_t) cachesize > end_of_file-seek_offset+IO_SIZE*2-1) { cachesize= (size_t) (end_of_file-seek_offset)+IO_SIZE*2-1; use_async_io=0; /* No need to use async */ } } } cache_myflags &= ~MY_DONT_CHECK_FILESIZE; if (type != READ_NET) { /* Retry allocating memory in smaller blocks until we get one */ cachesize= ((cachesize + min_cache-1) & ~(min_cache-1)); for (;;) { size_t buffer_block; /* Unset MY_WAIT_IF_FULL bit if it is set, to prevent conflict with MY_ZEROFILL. */ myf flags= (myf) (cache_myflags & ~(MY_WME | MY_WAIT_IF_FULL)); if (cachesize < min_cache) cachesize = min_cache; buffer_block= cachesize; if (type == SEQ_READ_APPEND) buffer_block *= 2; else if (cache_myflags & MY_ENCRYPT) buffer_block= 2*(buffer_block + MY_AES_BLOCK_SIZE) + sizeof(IO_CACHE_CRYPT); if (cachesize == min_cache) flags|= (myf) MY_WME; if ((info->buffer= (uchar*) my_malloc(key_memory_IO_CACHE, buffer_block, flags)) != 0) { if (type == SEQ_READ_APPEND) info->write_buffer= info->buffer + cachesize; else info->write_buffer= info->buffer; info->alloced_buffer= buffer_block; break; /* Enough memory found */ } if (cachesize == min_cache) DBUG_RETURN(2); /* Can't alloc cache */ /* Try with less memory */ cachesize= (cachesize*3/4 & ~(min_cache-1)); } } DBUG_PRINT("info",("init_io_cache_ext: cachesize = %lu", (ulong) cachesize)); info->read_length=info->buffer_length=cachesize; info->myflags=cache_myflags & ~(MY_NABP | MY_FNABP); info->request_pos= info->read_pos= info->write_pos = info->buffer; if (type == SEQ_READ_APPEND) { info->append_read_pos = info->write_pos = info->write_buffer; info->write_end = info->write_buffer + info->buffer_length; mysql_mutex_init(key_IO_CACHE_append_buffer_lock, &info->append_buffer_lock, MY_MUTEX_INIT_FAST); } #if defined(SAFE_MUTEX) else { /* Clear mutex so that safe_mutex will notice that it's not initialized */ bzero((char*) &info->append_buffer_lock, sizeof(info->append_buffer_lock)); } #endif if (type == WRITE_CACHE) info->write_end= info->buffer+info->buffer_length- (seek_offset & (IO_SIZE-1)); else info->read_end=info->buffer; /* Nothing in cache */ /* End_of_file may be changed by user later */ info->end_of_file= end_of_file; info->error=0; info->type= type; init_functions(info); DBUG_RETURN(0); }
O3
c
init_io_cache_ext: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %rbx movl %esi, %r15d movq %rdi, %r12 movq 0x10(%rbp), %r13 movl %esi, 0xd4(%rdi) xorl %eax, %eax movl %eax, 0xb0(%rdi) movq %r8, -0x48(%rbp) movq %r8, (%rdi) movq %rax, 0x100(%rdi) movq %rax, 0x20(%rdi) movl %eax, 0xe0(%rdi) movq %rax, 0xd8(%rdi) testl %esi, %esi movl %ecx, -0x2c(%rbp) js 0x9472a movl %r9d, %r14d leaq 0x2f0945(%rip), %rax # 0x385010 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r15d, %esi movl $0x9, %edx callq *0x158(%rax) testq %rax, %rax jne 0x94a0f movl %r15d, %edi xorl %esi, %esi callq 0xa04c8 movq %rax, %r13 cmpq $-0x1, %r13 movl %r14d, %r9d jne 0x9470f callq 0xa13e6 movl %r14d, %r9d cmpl $0x1d, (%rax) je 0x94720 xorl %eax, %eax cmpq -0x48(%rbp), %r13 setne %al movl %eax, 0xe0(%r12) movq 0x10(%rbp), %r13 movl -0x2c(%rbp), %r14d jmp 0x9474b movl %ecx, %r14d leaq 0xb71db4(%rip), %rax # 0xc064e8 movq %r13, %rcx orq $0x40, %rcx cmpq $0x0, (%rax) cmoveq %r13, %rcx cmpl $0x2, %r14d cmoveq %rcx, %r13 xorl %eax, %eax movq %rax, 0xb8(%r12) movq %rax, 0x98(%r12) testq %rbx, %rbx jne 0x94775 leaq 0x2f03b7(%rip), %rax # 0x384b20 movq (%rax), %rbx testq %rbx, %rbx je 0x949f8 movq %r12, -0x40(%rbp) xorl %r12d, %r12d testb %r9b, %r9b setne %cl sete %dl movq $-0x1, -0x60(%rbp) cmpl $0x1, %r14d je 0x947b8 cmpl $0x3, %r14d je 0x947b8 cmpl $0x5, %r14d jne 0x94837 movq -0x40(%rbp), %r12 movq 0x20(%r12), %rax movq $-0x1, %r15 jmp 0x94905 testb %r13b, %r13b movq %r13, -0x38(%rbp) js 0x9483b movb %dl, -0x50(%rbp) movb %cl, -0x58(%rbp) leaq 0x2f0842(%rip), %rax # 0x385010 movq (%rax), %rax leaq -0xb0(%rbp), %rdi movl %r15d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x94a2a movl %r15d, %edi xorl %esi, %esi movl $0x2, %edx xorl %ecx, %ecx callq 0xa0464 xorl %esi, %esi movq -0x48(%rbp), %rdx cmpq %rdx, %rax cmovbeq %rdx, %rax setne %sil movq -0x40(%rbp), %rcx movl %esi, 0xe0(%rcx) movq %rax, -0x60(%rbp) subq %rdx, %rax addq $0x1fff, %rax # imm = 0x1FFF cmpq %rax, %rbx cmovaeq %rax, %rbx movb -0x58(%rbp), %cl movb -0x50(%rbp), %dl jmp 0x9483b movq %r13, -0x38(%rbp) xorl %eax, %eax movb %dl, %al shll $0xd, %eax orq $-0x4000, %rax # imm = 0xC000 movq %rax, -0x58(%rbp) movb %cl, %r12b shll $0xd, %r12d addq $0x2000, %r12 # imm = 0x2000 leaq (%r12,%rbx), %r13 decq %r13 movq -0x38(%rbp), %r14 andl $0xffffff4f, %r14d # imm = 0xFFFFFF4F leaq 0x10(%r14), %rax movq %rax, -0x50(%rbp) andq -0x58(%rbp), %r13 cmpq %r12, %r13 movq %r12, %rbx cmovaq %r13, %rbx cmpl $0x3, -0x2c(%rbp) jne 0x9488e leaq (%rbx,%rbx), %r15 jmp 0x9489f movq %rbx, %r15 testb $0x40, -0x38(%rbp) je 0x9489f leaq 0x48(,%rbx,2), %r15 cmpq %r13, %r12 movq -0x50(%rbp), %rdx cmovbq %r14, %rdx leaq 0xb727b3(%rip), %rax # 0xc07064 movl (%rax), %edi movq %r15, %rsi callq 0x9f6e1 movq -0x40(%rbp), %rcx movq %rax, 0x20(%rcx) testq %rax, %rax jne 0x948db cmpq %r13, %r12 jae 0x949a8 leaq (%rbx,%rbx,2), %r13 shrq $0x2, %r13 jmp 0x94874 xorl %ecx, %ecx movl -0x2c(%rbp), %r14d cmpl $0x3, %r14d cmoveq %rbx, %rcx addq %rax, %rcx movq -0x40(%rbp), %r12 movq %rcx, 0x30(%r12) movq %r15, 0x100(%r12) movq -0x38(%rbp), %r13 movq -0x60(%rbp), %r15 andl $0xffffff79, %r13d # imm = 0xFFFFFF79 movq %rbx, 0xe8(%r12) movq %rbx, 0xf0(%r12) movq %r13, 0xf8(%r12) movq %rax, 0x40(%r12) movq %rax, 0x10(%r12) movq %rax, 0x28(%r12) cmpl $0x3, %r14d jne 0x949af movq 0x30(%r12), %rax movq %rax, 0x40(%r12) movq %rax, 0x38(%r12) addq %rax, %rbx movq %rbx, 0x48(%r12) leaq 0xb71d6d(%rip), %rax # 0xc066c4 movl (%rax), %edi movq %r15, %rbx leaq 0x50(%r12), %r15 leaq 0x2f06a8(%rip), %rax # 0x385010 movq (%rax), %rax movq %r15, %rsi callq *0x40(%rax) movq %rax, 0x90(%r12) movq %r15, 0x88(%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x78(%r12) leaq 0xb72a4f(%rip), %rsi # 0xc073e0 movq %r15, %rdi movq %rbx, %r15 callq 0x29330 movq 0x20(%r12), %rax movl $0x18, %ecx jmp 0x949cf movl $0x2, %eax jmp 0x949fd movl $0x18, %ecx cmpl $0x2, %r14d jne 0x949cf addq %rbx, %rax movq -0x48(%rbp), %rcx andl $0xfff, %ecx # imm = 0xFFF subq %rcx, %rax movl $0x48, %ecx movq %rax, (%r12,%rcx) movq %r15, 0x8(%r12) movl $0x0, 0xe4(%r12) movl %r14d, 0xb0(%r12) movq %r12, %rdi callq 0x94a47 xorl %eax, %eax jmp 0x949fd movl $0x1, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x68(%rbp), %r13 movq %rax, %rdi movl %r15d, %esi movq %r13, %rdx callq 0x2e8f8 movq (%r13), %r13 jmp 0x946f9 leaq -0x68(%rbp), %rcx movq %rax, %rdi movl %r15d, %esi movq %rcx, %r15 movq %rcx, %rdx callq 0x2e950 movq (%r15), %rax jmp 0x94800
init_io_cache_ext: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, rdx mov r15d, esi mov r12, rdi mov r13, [rbp+arg_0] mov [rdi+0D4h], esi xor eax, eax mov [rdi+0B0h], eax mov [rbp+var_48], r8 mov [rdi], r8 mov [rdi+100h], rax mov [rdi+20h], rax mov [rdi+0E0h], eax mov [rdi+0D8h], rax test esi, esi mov [rbp+var_2C], ecx js short loc_9472A mov r14d, r9d lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r15d mov edx, 9 call qword ptr [rax+158h] test rax, rax jnz loc_94A0F mov edi, r15d xor esi, esi call my_tell mov r13, rax loc_946F9: cmp r13, 0FFFFFFFFFFFFFFFFh mov r9d, r14d jnz short loc_9470F call _my_thread_var mov r9d, r14d cmp dword ptr [rax], 1Dh jz short loc_94720 loc_9470F: xor eax, eax cmp r13, [rbp+var_48] setnz al mov [r12+0E0h], eax loc_94720: mov r13, [rbp+arg_0] mov r14d, [rbp+var_2C] jmp short loc_9474B loc_9472A: mov r14d, ecx lea rax, _my_b_encr_read mov rcx, r13 or rcx, 40h cmp qword ptr [rax], 0 cmovz rcx, r13 cmp r14d, 2 cmovz r13, rcx loc_9474B: xor eax, eax mov [r12+0B8h], rax mov [r12+98h], rax test rbx, rbx jnz short loc_94775 lea rax, my_default_record_cache_size mov rbx, [rax] test rbx, rbx jz loc_949F8 loc_94775: mov [rbp+var_40], r12 xor r12d, r12d test r9b, r9b setnz cl setz dl mov [rbp+var_60], 0FFFFFFFFFFFFFFFFh cmp r14d, 1 jz short loc_947B8 cmp r14d, 3 jz short loc_947B8 cmp r14d, 5 jnz loc_94837 mov r12, [rbp+var_40] mov rax, [r12+20h] mov r15, 0FFFFFFFFFFFFFFFFh jmp loc_94905 loc_947B8: test r13b, r13b mov [rbp+var_38], r13 js short loc_9483B mov byte ptr [rbp+var_50], dl mov byte ptr [rbp+var_58], cl lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_B0] mov esi, r15d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_94A2A mov edi, r15d xor esi, esi mov edx, 2 xor ecx, ecx call my_seek loc_94800: xor esi, esi mov rdx, [rbp+var_48] cmp rax, rdx cmovbe rax, rdx setnz sil mov rcx, [rbp+var_40] mov [rcx+0E0h], esi mov [rbp+var_60], rax sub rax, rdx add rax, 1FFFh cmp rbx, rax cmovnb rbx, rax mov cl, byte ptr [rbp+var_58] mov dl, byte ptr [rbp+var_50] jmp short loc_9483B loc_94837: mov [rbp+var_38], r13 loc_9483B: xor eax, eax mov al, dl shl eax, 0Dh or rax, 0FFFFFFFFFFFFC000h mov [rbp+var_58], rax mov r12b, cl shl r12d, 0Dh add r12, 2000h lea r13, [r12+rbx] dec r13 mov r14, [rbp+var_38] and r14d, 0FFFFFF4Fh lea rax, [r14+10h] mov [rbp+var_50], rax loc_94874: and r13, [rbp+var_58] cmp r13, r12 mov rbx, r12 cmova rbx, r13 cmp [rbp+var_2C], 3 jnz short loc_9488E lea r15, [rbx+rbx] jmp short loc_9489F loc_9488E: mov r15, rbx test byte ptr [rbp+var_38], 40h jz short loc_9489F lea r15, ds:48h[rbx*2] loc_9489F: cmp r12, r13 mov rdx, [rbp+var_50] cmovb rdx, r14 lea rax, key_memory_IO_CACHE mov edi, [rax] mov rsi, r15 call my_malloc mov rcx, [rbp+var_40] mov [rcx+20h], rax test rax, rax jnz short loc_948DB cmp r12, r13 jnb loc_949A8 lea r13, [rbx+rbx*2] shr r13, 2 jmp short loc_94874 loc_948DB: xor ecx, ecx mov r14d, [rbp+var_2C] cmp r14d, 3 cmovz rcx, rbx add rcx, rax mov r12, [rbp+var_40] mov [r12+30h], rcx mov [r12+100h], r15 mov r13, [rbp+var_38] mov r15, [rbp+var_60] loc_94905: and r13d, 0FFFFFF79h mov [r12+0E8h], rbx mov [r12+0F0h], rbx mov [r12+0F8h], r13 mov [r12+40h], rax mov [r12+10h], rax mov [r12+28h], rax cmp r14d, 3 jnz short loc_949AF mov rax, [r12+30h] mov [r12+40h], rax mov [r12+38h], rax add rbx, rax mov [r12+48h], rbx lea rax, key_IO_CACHE_append_buffer_lock mov edi, [rax] mov rbx, r15 lea r15, [r12+50h] lea rax, PSI_server mov rax, [rax] mov rsi, r15 call qword ptr [rax+40h] mov [r12+90h], rax mov [r12+88h], r15 xorps xmm0, xmm0 movups xmmword ptr [r12+78h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r15 mov r15, rbx call _pthread_mutex_init mov rax, [r12+20h] mov ecx, 18h jmp short loc_949CF loc_949A8: mov eax, 2 jmp short loc_949FD loc_949AF: mov ecx, 18h cmp r14d, 2 jnz short loc_949CF add rax, rbx mov rcx, [rbp+var_48] and ecx, 0FFFh sub rax, rcx mov ecx, 48h ; 'H' loc_949CF: mov [r12+rcx], rax mov [r12+8], r15 mov dword ptr [r12+0E4h], 0 mov [r12+0B0h], r14d mov rdi, r12 call init_functions xor eax, eax jmp short loc_949FD loc_949F8: mov eax, 1 loc_949FD: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_94A0F: lea r13, [rbp+var_68] mov rdi, rax mov esi, r15d mov rdx, r13 call init_io_cache_ext_cold_1 mov r13, [r13+0] jmp loc_946F9 loc_94A2A: lea rcx, [rbp+var_68] mov rdi, rax mov esi, r15d mov r15, rcx mov rdx, rcx call init_io_cache_ext_cold_2 mov rax, [r15] jmp loc_94800
long long init_io_cache_ext( long long a1, unsigned int a2, unsigned long long a3, int a4, unsigned long long a5, char a6, long long a7) { unsigned long long v7; // rbx long long v9; // r13 char v10; // r14 long long v11; // rax long long v12; // rdi long long v13; // rcx long long v14; // r13 _DWORD *v15; // rax int v16; // r14d int v17; // r12d long long v18; // r12 long long v19; // rax long long v20; // r15 long long v21; // rax unsigned long long v22; // rax int v23; // esi unsigned long long v24; // rdx bool v25; // zf unsigned long long v26; // rax unsigned long long v27; // r12 unsigned long long v28; // r13 long long v29; // r14 unsigned long long v30; // r13 long long v31; // r15 long long v32; // rdx unsigned long long v33; // rcx long long v34; // rax long long v35; // rcx _BYTE v37[72]; // [rsp+0h] [rbp-B0h] BYREF unsigned long long v38; // [rsp+48h] [rbp-68h] BYREF long long v39; // [rsp+50h] [rbp-60h] unsigned long long v40; // [rsp+58h] [rbp-58h] long long v41; // [rsp+60h] [rbp-50h] unsigned long long v42; // [rsp+68h] [rbp-48h] long long v43; // [rsp+70h] [rbp-40h] long long v44; // [rsp+78h] [rbp-38h] int v45; // [rsp+84h] [rbp-2Ch] v7 = a3; v9 = a7; *(_DWORD *)(a1 + 212) = a2; *(_DWORD *)(a1 + 176) = 0; v42 = a5; *(_QWORD *)a1 = a5; *(_QWORD *)(a1 + 256) = 0LL; *(_QWORD *)(a1 + 32) = 0LL; *(_DWORD *)(a1 + 224) = 0; *(_QWORD *)(a1 + 216) = 0LL; v45 = a4; if ( (a2 & 0x80000000) != 0 ) { v16 = a4; v13 = a7 | 0x40; if ( !my_b_encr_read ) v13 = a7; if ( v16 == 2 ) v9 = v13; } else { v10 = a6; v11 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v37, a2, 9LL); if ( v11 ) { v12 = v11; init_io_cache_ext_cold_1(v11, a2, &v38); v14 = v38; } else { v12 = a2; v14 = my_tell(a2, 0LL); } a6 = v10; if ( v14 != -1 || (v15 = (_DWORD *)my_thread_var(v12), a6 = v10, *v15 != 29) ) *(_DWORD *)(a1 + 224) = v14 != v42; v9 = a7; v16 = v45; } *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 152) = 0LL; if ( !v7 ) { v7 = my_default_record_cache_size; if ( !my_default_record_cache_size ) return 1LL; } v43 = a1; v17 = 0; LOBYTE(v13) = a6 != 0; LOBYTE(a3) = a6 == 0; v39 = -1LL; if ( v16 == 1 || v16 == 3 ) { v44 = v9; if ( (v9 & 0x80u) == 0LL ) { LOBYTE(v41) = a6 == 0; LOBYTE(v40) = a6 != 0; v21 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v37, a2, 8LL); if ( v21 ) { init_io_cache_ext_cold_2(v21, a2, &v38); v22 = v38; } else { v22 = my_seek(a2, 0LL, 2LL, 0LL); } v23 = 0; v24 = v42; v25 = v22 == v42; if ( v22 <= v42 ) v22 = v42; LOBYTE(v23) = !v25; *(_DWORD *)(v43 + 224) = v23; v39 = v22; v26 = v22 - v24 + 0x1FFF; if ( v7 >= v26 ) v7 = v26; LOBYTE(v13) = v40; LOBYTE(a3) = v41; } LABEL_27: v40 = ((unsigned __int8)a3 << 13) | 0xFFFFFFFFFFFFC000LL; LOBYTE(v17) = v13; v27 = (unsigned int)(v17 << 13) + 0x2000LL; v28 = v27 + v7 - 1; v29 = (unsigned int)v44 & 0xFFFFFF4F; v41 = v29 + 16; while ( 1 ) { v30 = v40 & v28; v7 = v27; if ( v30 > v27 ) v7 = v30; if ( v45 == 3 ) { v31 = 2 * v7; } else { v31 = v7; if ( (v44 & 0x40) != 0 ) v31 = 2 * v7 + 72; } v32 = v41; if ( v27 < v30 ) v32 = v29; v19 = my_malloc(key_memory_IO_CACHE, v31, v32); *(_QWORD *)(v43 + 32) = v19; if ( v19 ) break; if ( v27 >= v30 ) return 2LL; v28 = (3 * v7) >> 2; } v33 = 0LL; v16 = v45; if ( v45 == 3 ) v33 = v7; v13 = v19 + v33; v18 = v43; *(_QWORD *)(v43 + 48) = v13; *(_QWORD *)(v18 + 256) = v31; LODWORD(v9) = v44; v20 = v39; goto LABEL_42; } if ( v16 != 5 ) { v44 = v9; goto LABEL_27; } v18 = v43; v19 = *(_QWORD *)(v43 + 32); v20 = -1LL; LABEL_42: *(_QWORD *)(v18 + 232) = v7; *(_QWORD *)(v18 + 240) = v7; *(_QWORD *)(v18 + 248) = (unsigned int)v9 & 0xFFFFFF79; *(_QWORD *)(v18 + 64) = v19; *(_QWORD *)(v18 + 16) = v19; *(_QWORD *)(v18 + 40) = v19; if ( v16 == 3 ) { v34 = *(_QWORD *)(v18 + 48); *(_QWORD *)(v18 + 64) = v34; *(_QWORD *)(v18 + 56) = v34; *(_QWORD *)(v18 + 72) = v34 + v7; *(_QWORD *)(v18 + 144) = ((long long ( *)(_QWORD, long long, unsigned long long, long long))PSI_server[8])( key_IO_CACHE_append_buffer_lock, v18 + 80, a3, v13); *(_QWORD *)(v18 + 136) = v18 + 80; *(_OWORD *)(v18 + 120) = 0LL; pthread_mutex_init(v18 + 80, &my_fast_mutexattr); v19 = *(_QWORD *)(v18 + 32); v35 = 24LL; } else { v35 = 24LL; if ( v16 == 2 ) { v19 = v7 + v19 - (v42 & 0xFFF); v35 = 72LL; } } *(_QWORD *)(v18 + v35) = v19; *(_QWORD *)(v18 + 8) = v20; *(_DWORD *)(v18 + 228) = 0; *(_DWORD *)(v18 + 176) = v16; init_functions(v18); return 0LL; }
init_io_cache_ext: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,RDX MOV R15D,ESI MOV R12,RDI MOV R13,qword ptr [RBP + 0x10] MOV dword ptr [RDI + 0xd4],ESI XOR EAX,EAX MOV dword ptr [RDI + 0xb0],EAX MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RDI],R8 MOV qword ptr [RDI + 0x100],RAX MOV qword ptr [RDI + 0x20],RAX MOV dword ptr [RDI + 0xe0],EAX MOV qword ptr [RDI + 0xd8],RAX TEST ESI,ESI MOV dword ptr [RBP + -0x2c],ECX JS 0x0019472a MOV R14D,R9D LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R15D MOV EDX,0x9 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00194a0f MOV EDI,R15D XOR ESI,ESI CALL 0x001a04c8 MOV R13,RAX LAB_001946f9: CMP R13,-0x1 MOV R9D,R14D JNZ 0x0019470f CALL 0x001a13e6 MOV R9D,R14D CMP dword ptr [RAX],0x1d JZ 0x00194720 LAB_0019470f: XOR EAX,EAX CMP R13,qword ptr [RBP + -0x48] SETNZ AL MOV dword ptr [R12 + 0xe0],EAX LAB_00194720: MOV R13,qword ptr [RBP + 0x10] MOV R14D,dword ptr [RBP + -0x2c] JMP 0x0019474b LAB_0019472a: MOV R14D,ECX LEA RAX,[0xd064e8] MOV RCX,R13 OR RCX,0x40 CMP qword ptr [RAX],0x0 CMOVZ RCX,R13 CMP R14D,0x2 CMOVZ R13,RCX LAB_0019474b: XOR EAX,EAX MOV qword ptr [R12 + 0xb8],RAX MOV qword ptr [R12 + 0x98],RAX TEST RBX,RBX JNZ 0x00194775 LEA RAX,[0x484b20] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x001949f8 LAB_00194775: MOV qword ptr [RBP + -0x40],R12 XOR R12D,R12D TEST R9B,R9B SETNZ CL SETZ DL MOV qword ptr [RBP + -0x60],-0x1 CMP R14D,0x1 JZ 0x001947b8 CMP R14D,0x3 JZ 0x001947b8 CMP R14D,0x5 JNZ 0x00194837 MOV R12,qword ptr [RBP + -0x40] MOV RAX,qword ptr [R12 + 0x20] MOV R15,-0x1 JMP 0x00194905 LAB_001947b8: TEST R13B,R13B MOV qword ptr [RBP + -0x38],R13 JS 0x0019483b MOV byte ptr [RBP + -0x50],DL MOV byte ptr [RBP + -0x58],CL LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0xb0] MOV ESI,R15D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00194a2a MOV EDI,R15D XOR ESI,ESI MOV EDX,0x2 XOR ECX,ECX CALL 0x001a0464 LAB_00194800: XOR ESI,ESI MOV RDX,qword ptr [RBP + -0x48] CMP RAX,RDX CMOVBE RAX,RDX SETNZ SIL MOV RCX,qword ptr [RBP + -0x40] MOV dword ptr [RCX + 0xe0],ESI MOV qword ptr [RBP + -0x60],RAX SUB RAX,RDX ADD RAX,0x1fff CMP RBX,RAX CMOVNC RBX,RAX MOV CL,byte ptr [RBP + -0x58] MOV DL,byte ptr [RBP + -0x50] JMP 0x0019483b LAB_00194837: MOV qword ptr [RBP + -0x38],R13 LAB_0019483b: XOR EAX,EAX MOV AL,DL SHL EAX,0xd OR RAX,-0x4000 MOV qword ptr [RBP + -0x58],RAX MOV R12B,CL SHL R12D,0xd ADD R12,0x2000 LEA R13,[R12 + RBX*0x1] DEC R13 MOV R14,qword ptr [RBP + -0x38] AND R14D,0xffffff4f LEA RAX,[R14 + 0x10] MOV qword ptr [RBP + -0x50],RAX LAB_00194874: AND R13,qword ptr [RBP + -0x58] CMP R13,R12 MOV RBX,R12 CMOVA RBX,R13 CMP dword ptr [RBP + -0x2c],0x3 JNZ 0x0019488e LEA R15,[RBX + RBX*0x1] JMP 0x0019489f LAB_0019488e: MOV R15,RBX TEST byte ptr [RBP + -0x38],0x40 JZ 0x0019489f LEA R15,[0x48 + RBX*0x2] LAB_0019489f: CMP R12,R13 MOV RDX,qword ptr [RBP + -0x50] CMOVC RDX,R14 LEA RAX,[0xd07064] MOV EDI,dword ptr [RAX] MOV RSI,R15 CALL 0x0019f6e1 MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RCX + 0x20],RAX TEST RAX,RAX JNZ 0x001948db CMP R12,R13 JNC 0x001949a8 LEA R13,[RBX + RBX*0x2] SHR R13,0x2 JMP 0x00194874 LAB_001948db: XOR ECX,ECX MOV R14D,dword ptr [RBP + -0x2c] CMP R14D,0x3 CMOVZ RCX,RBX ADD RCX,RAX MOV R12,qword ptr [RBP + -0x40] MOV qword ptr [R12 + 0x30],RCX MOV qword ptr [R12 + 0x100],R15 MOV R13,qword ptr [RBP + -0x38] MOV R15,qword ptr [RBP + -0x60] LAB_00194905: AND R13D,0xffffff79 MOV qword ptr [R12 + 0xe8],RBX MOV qword ptr [R12 + 0xf0],RBX MOV qword ptr [R12 + 0xf8],R13 MOV qword ptr [R12 + 0x40],RAX MOV qword ptr [R12 + 0x10],RAX MOV qword ptr [R12 + 0x28],RAX CMP R14D,0x3 JNZ 0x001949af MOV RAX,qword ptr [R12 + 0x30] MOV qword ptr [R12 + 0x40],RAX MOV qword ptr [R12 + 0x38],RAX ADD RBX,RAX MOV qword ptr [R12 + 0x48],RBX LEA RAX,[0xd066c4] MOV EDI,dword ptr [RAX] MOV RBX,R15 LEA R15,[R12 + 0x50] LEA RAX,[0x485010] MOV RAX,qword ptr [RAX] MOV RSI,R15 CALL qword ptr [RAX + 0x40] MOV qword ptr [R12 + 0x90],RAX MOV qword ptr [R12 + 0x88],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x78],XMM0 LEA RSI,[0xd073e0] MOV RDI,R15 MOV R15,RBX CALL 0x00129330 MOV RAX,qword ptr [R12 + 0x20] MOV ECX,0x18 JMP 0x001949cf LAB_001949a8: MOV EAX,0x2 JMP 0x001949fd LAB_001949af: MOV ECX,0x18 CMP R14D,0x2 JNZ 0x001949cf ADD RAX,RBX MOV RCX,qword ptr [RBP + -0x48] AND ECX,0xfff SUB RAX,RCX MOV ECX,0x48 LAB_001949cf: MOV qword ptr [R12 + RCX*0x1],RAX MOV qword ptr [R12 + 0x8],R15 MOV dword ptr [R12 + 0xe4],0x0 MOV dword ptr [R12 + 0xb0],R14D MOV RDI,R12 CALL 0x00194a47 XOR EAX,EAX JMP 0x001949fd LAB_001949f8: MOV EAX,0x1 LAB_001949fd: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00194a0f: LEA R13,[RBP + -0x68] MOV RDI,RAX MOV ESI,R15D MOV RDX,R13 CALL 0x0012e8f8 MOV R13,qword ptr [R13] JMP 0x001946f9 LAB_00194a2a: LEA RCX,[RBP + -0x68] MOV RDI,RAX MOV ESI,R15D MOV R15,RCX MOV RDX,RCX CALL 0x0012e950 MOV RAX,qword ptr [R15] JMP 0x00194800
int8 init_io_cache_ext(ulong *param_1,int param_2,ulong param_3,int param_4,ulong param_5,char param_6, ulong param_7) { pthread_mutex_t *__mutex; ulong *puVar1; int iVar2; long lVar3; ulong uVar4; int *piVar5; int8 uVar6; uint uVar7; uint uVar8; ulong uVar9; ulong uVar10; ulong uVar11; ulong uVar12; bool bVar13; int1 local_b8 [72]; ulong local_70; ulong local_68; ulong local_60; ulong local_58; ulong local_50; ulong *local_48; ulong local_40; int local_34; *(int *)((long)param_1 + 0xd4) = param_2; *(int4 *)(param_1 + 0x16) = 0; *param_1 = param_5; param_1[0x20] = 0; param_1[4] = 0; *(int4 *)(param_1 + 0x1c) = 0; param_1[0x1b] = 0; local_50 = param_5; local_34 = param_4; if (param_2 < 0) { uVar4 = param_7 | 0x40; if (_my_b_encr_read == 0) { uVar4 = param_7; } if (param_4 == 2) { param_7 = uVar4; } } else { lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,param_2,9); if (lVar3 == 0) { uVar4 = my_tell(param_2,0); } else { init_io_cache_ext_cold_1(lVar3,param_2,&local_70); uVar4 = local_70; } if ((uVar4 != 0xffffffffffffffff) || (piVar5 = (int *)_my_thread_var(), *piVar5 != 0x1d)) { *(uint *)(param_1 + 0x1c) = (uint)(uVar4 != local_50); } } param_1[0x17] = 0; param_1[0x13] = 0; if ((param_3 == 0) && (param_3 = my_default_record_cache_size, my_default_record_cache_size == 0)) { uVar6 = 1; } else { bVar13 = param_6 == '\0'; uVar7 = (uint)!bVar13; uVar8 = (uint)bVar13; local_68 = 0xffffffffffffffff; local_48 = param_1; if ((local_34 == 1) || (local_34 == 3)) { uVar4 = param_7; if (-1 < (char)param_7) { local_58 = CONCAT71(local_58._1_7_,bVar13); local_60 = CONCAT71(local_60._1_7_,!bVar13); local_40 = param_7; lVar3 = (**(code **)(PSI_server + 0x158))(local_b8,param_2,8); if (lVar3 == 0) { local_70 = my_seek(param_2,0,2,0); } else { init_io_cache_ext_cold_2(lVar3,param_2,&local_70); } local_68 = local_70; if (local_70 <= local_50) { local_68 = local_50; } *(uint *)(local_48 + 0x1c) = (uint)(local_70 != local_50); uVar4 = (local_68 - local_50) + 0x1fff; if (uVar4 <= param_3) { param_3 = uVar4; } uVar7 = (uint)local_60 & 0xff; uVar8 = (uint)local_58 & 0xff; uVar4 = local_40; } } else { uVar4 = param_7; if (local_34 == 5) { uVar4 = param_1[4]; LAB_00194905: iVar2 = local_34; puVar1 = local_48; uVar9 = local_68; local_48[0x1d] = param_3; local_48[0x1e] = param_3; local_48[0x1f] = (ulong)((uint)param_7 & 0xffffff79); local_48[8] = uVar4; local_48[2] = uVar4; local_48[5] = uVar4; if (local_34 == 3) { uVar4 = local_48[6]; local_48[8] = uVar4; local_48[7] = uVar4; local_48[9] = param_3 + uVar4; __mutex = (pthread_mutex_t *)(local_48 + 10); uVar4 = (**(code **)(PSI_server + 0x40))(key_IO_CACHE_append_buffer_lock,__mutex); puVar1[0x12] = uVar4; puVar1[0x11] = (ulong)__mutex; puVar1[0xf] = 0; puVar1[0x10] = 0; pthread_mutex_init(__mutex,(pthread_mutexattr_t *)&my_fast_mutexattr); uVar4 = puVar1[4]; lVar3 = 0x18; } else { lVar3 = 0x18; if (local_34 == 2) { uVar4 = (uVar4 + param_3) - (ulong)((uint)local_50 & 0xfff); lVar3 = 0x48; } } *(ulong *)((long)puVar1 + lVar3) = uVar4; puVar1[1] = uVar9; *(int4 *)((long)puVar1 + 0xe4) = 0; *(int *)(puVar1 + 0x16) = iVar2; init_functions(puVar1); return 0; } } local_40 = uVar4; local_60 = (ulong)(uVar8 << 0xd) | 0xffffffffffffc000; uVar9 = (ulong)(uVar7 << 0xd) + 0x2000; uVar10 = (uVar9 + param_3) - 1; uVar11 = (ulong)((uint)local_40 & 0xffffff4f); local_58 = uVar11 + 0x10; while( true ) { uVar10 = uVar10 & local_60; param_3 = uVar9; if (uVar9 < uVar10) { param_3 = uVar10; } if (local_34 == 3) { uVar12 = param_3 * 2; } else { uVar12 = param_3; if ((local_40 & 0x40) != 0) { uVar12 = param_3 * 2 + 0x48; } } uVar4 = local_58; if (uVar9 < uVar10) { uVar4 = uVar11; } uVar4 = my_malloc(key_memory_IO_CACHE,uVar12,uVar4); local_48[4] = uVar4; if (uVar4 != 0) { uVar9 = 0; if (local_34 == 3) { uVar9 = param_3; } local_48[6] = uVar9 + uVar4; local_48[0x20] = uVar12; param_7 = local_40; goto LAB_00194905; } if (uVar10 <= uVar9) break; uVar10 = param_3 * 3 >> 2; } uVar6 = 2; } return uVar6; }
28,533
mariadb_server_version_id
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static size_t mariadb_server_version_id(MYSQL *mysql) { size_t major, minor, patch; char *p; if (!(p = mysql->server_version)) { return 0; } major = strtol(p, &p, 10); p += 1; /* consume the dot */ minor = strtol(p, &p, 10); p += 1; /* consume the dot */ patch = strtol(p, &p, 10); return (major * 10000L + (unsigned long)(minor * 100L + patch)); }
O0
c
mariadb_server_version_id: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x2d0(%rax), %rax movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0x21b9b movq $0x0, -0x8(%rbp) jmp 0x21c0d movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x13600 movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x13600 movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x13600 movq %rax, -0x28(%rbp) imulq $0x2710, -0x18(%rbp), %rax # imm = 0x2710 imulq $0x64, -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
mariadb_server_version_id: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+2D0h] mov [rbp+var_30], rax cmp rax, 0 jnz short loc_21B9B mov [rbp+var_8], 0 jmp short loc_21C0D loc_21B9B: mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_18], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_20], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_28], rax imul rax, [rbp+var_18], 2710h imul rcx, [rbp+var_20], 64h ; 'd' add rcx, [rbp+var_28] add rax, rcx mov [rbp+var_8], rax loc_21C0D: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long mariadb_server_version_id(long long a1) { long long v2; // [rsp+0h] [rbp-30h] BYREF long long v3; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] long long v6; // [rsp+20h] [rbp-10h] v6 = a1; v2 = *(_QWORD *)(a1 + 720); if ( !v2 ) return 0LL; v5 = strtol(v2, &v2, 10LL); ++v2; v4 = strtol(v2, &v2, 10LL); ++v2; v3 = strtol(v2, &v2, 10LL); return v3 + 100 * v4 + 10000 * v5; }
mariadb_server_version_id: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2d0] MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x00121b9b MOV qword ptr [RBP + -0x8],0x0 JMP 0x00121c0d LAB_00121b9b: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x00113600 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x00113600 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x00113600 MOV qword ptr [RBP + -0x28],RAX IMUL RAX,qword ptr [RBP + -0x18],0x2710 IMUL RCX,qword ptr [RBP + -0x20],0x64 ADD RCX,qword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_00121c0d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long mariadb_server_version_id(long param_1) { long lVar1; char *local_38 [2]; long local_28; long local_20; long local_18; long local_10; local_38[0] = *(char **)(param_1 + 0x2d0); if (local_38[0] == (char *)0x0) { local_10 = 0; } else { local_18 = param_1; local_20 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; local_28 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; lVar1 = strtol(local_38[0],local_38,10); local_10 = local_20 * 10000 + local_28 * 100 + lVar1; } return local_10; }
28,534
my_coll_parser_scan_rule
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_rule(MY_COLL_RULE_PARSER *p) { if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_RESET) || !my_coll_parser_scan_reset_sequence(p)) return 0; /* Scan the first required shift command */ if (!my_coll_parser_scan_shift(p)) return my_coll_parser_expected_error(p, MY_COLL_LEXEM_SHIFT); /* Scan the first shift sequence */ if (!my_coll_parser_scan_shift_sequence(p)) return 0; /* Scan subsequent shift rules */ while (my_coll_parser_scan_shift(p)) { if (!my_coll_parser_scan_shift_sequence(p)) return 0; } return 1; }
O0
c
my_coll_parser_scan_rule: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movl $0x4, %esi callq 0xb12a0 cmpl $0x0, %eax je 0xb121d movq -0x10(%rbp), %rdi callq 0xb1500 cmpl $0x0, %eax jne 0xb1226 movl $0x0, -0x4(%rbp) jmp 0xb128e movq -0x10(%rbp), %rdi callq 0xb15b0 cmpl $0x0, %eax jne 0xb1247 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0xb1610 movl %eax, -0x4(%rbp) jmp 0xb128e movq -0x10(%rbp), %rdi callq 0xb1660 cmpl $0x0, %eax jne 0xb125e movl $0x0, -0x4(%rbp) jmp 0xb128e jmp 0xb1260 movq -0x10(%rbp), %rdi callq 0xb15b0 cmpl $0x0, %eax je 0xb1287 movq -0x10(%rbp), %rdi callq 0xb1660 cmpl $0x0, %eax jne 0xb1285 movl $0x0, -0x4(%rbp) jmp 0xb128e jmp 0xb1260 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
my_coll_parser_scan_rule: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] mov esi, 4 call my_coll_parser_scan_term cmp eax, 0 jz short loc_B121D mov rdi, [rbp+var_10] call my_coll_parser_scan_reset_sequence cmp eax, 0 jnz short loc_B1226 loc_B121D: mov [rbp+var_4], 0 jmp short loc_B128E loc_B1226: mov rdi, [rbp+var_10] call my_coll_parser_scan_shift cmp eax, 0 jnz short loc_B1247 mov rdi, [rbp+var_10] mov esi, 1 call my_coll_parser_expected_error mov [rbp+var_4], eax jmp short loc_B128E loc_B1247: mov rdi, [rbp+var_10] call my_coll_parser_scan_shift_sequence cmp eax, 0 jnz short loc_B125E mov [rbp+var_4], 0 jmp short loc_B128E loc_B125E: jmp short $+2 loc_B1260: mov rdi, [rbp+var_10] call my_coll_parser_scan_shift cmp eax, 0 jz short loc_B1287 mov rdi, [rbp+var_10] call my_coll_parser_scan_shift_sequence cmp eax, 0 jnz short loc_B1285 mov [rbp+var_4], 0 jmp short loc_B128E loc_B1285: jmp short loc_B1260 loc_B1287: mov [rbp+var_4], 1 loc_B128E: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
long long my_coll_parser_scan_rule(long long a1) { if ( (unsigned int)my_coll_parser_scan_term(a1, 4LL) && (unsigned int)my_coll_parser_scan_reset_sequence(a1) ) { if ( (unsigned int)my_coll_parser_scan_shift(a1) ) { if ( (unsigned int)my_coll_parser_scan_shift_sequence(a1) ) { while ( (unsigned int)my_coll_parser_scan_shift(a1) ) { if ( !(unsigned int)my_coll_parser_scan_shift_sequence(a1) ) return 0; } return 1; } else { return 0; } } else { return (unsigned int)my_coll_parser_expected_error(a1, 1LL); } } else { return 0; } }
my_coll_parser_scan_rule: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x4 CALL 0x001b12a0 CMP EAX,0x0 JZ 0x001b121d MOV RDI,qword ptr [RBP + -0x10] CALL 0x001b1500 CMP EAX,0x0 JNZ 0x001b1226 LAB_001b121d: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001b128e LAB_001b1226: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001b15b0 CMP EAX,0x0 JNZ 0x001b1247 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x001b1610 MOV dword ptr [RBP + -0x4],EAX JMP 0x001b128e LAB_001b1247: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001b1660 CMP EAX,0x0 JNZ 0x001b125e MOV dword ptr [RBP + -0x4],0x0 JMP 0x001b128e LAB_001b125e: JMP 0x001b1260 LAB_001b1260: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001b15b0 CMP EAX,0x0 JZ 0x001b1287 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001b1660 CMP EAX,0x0 JNZ 0x001b1285 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001b128e LAB_001b1285: JMP 0x001b1260 LAB_001b1287: MOV dword ptr [RBP + -0x4],0x1 LAB_001b128e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 my_coll_parser_scan_rule(int8 param_1) { int iVar1; int4 local_c; iVar1 = my_coll_parser_scan_term(param_1,4); if ((iVar1 == 0) || (iVar1 = my_coll_parser_scan_reset_sequence(param_1), iVar1 == 0)) { local_c = 0; } else { iVar1 = my_coll_parser_scan_shift(param_1); if (iVar1 == 0) { local_c = my_coll_parser_expected_error(param_1,1); } else { iVar1 = my_coll_parser_scan_shift_sequence(param_1); if (iVar1 == 0) { local_c = 0; } else { do { iVar1 = my_coll_parser_scan_shift(param_1); if (iVar1 == 0) { return 1; } iVar1 = my_coll_parser_scan_shift_sequence(param_1); } while (iVar1 != 0); local_c = 0; } } } return local_c; }
28,535
CLI::App::get_option_no_throw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MikePodsytnik[P]TCRtrie/build_O3/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE Option *App::get_option_no_throw(std::string option_name) noexcept { for(Option_p &opt : options_) { if(opt->check_name(option_name)) { return opt.get(); } } for(auto &subc : subcommands_) { // also check down into nameless subcommands if(subc->get_name().empty()) { auto *opt = subc->get_option_no_throw(option_name); if(opt != nullptr) { return opt; } } } return nullptr; }
O3
cpp
CLI::App::get_option_no_throw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq %rdi, %r14 movq 0xd8(%rdi), %r15 movq 0xe0(%rdi), %r12 cmpq %r12, %r15 je 0x2245a movq (%r15), %rdi movq %rbx, %rsi callq 0x21db2 testb %al, %al jne 0x224d1 addq $0x8, %r15 jmp 0x22440 movq 0x280(%r14), %r12 movq 0x288(%r14), %r13 cmpq %r13, %r12 je 0x224cc leaq 0x18(%rsp), %rbp leaq 0x8(%rsp), %r14 movq (%r12), %r15 cmpq $0x0, 0x10(%r15) jne 0x224c3 movq %rbp, 0x8(%rsp) movq (%rbx), %rsi movq 0x8(%rbx), %rdx addq %rsi, %rdx movq %r14, %rdi callq 0x177be movq %r15, %rdi movq %r14, %rsi callq 0x2241e movq %rax, %r15 movq 0x8(%rsp), %rdi cmpq %rbp, %rdi je 0x224be movq 0x18(%rsp), %rsi incq %rsi callq 0x7430 testq %r15, %r15 jne 0x224d4 addq $0x10, %r12 cmpq %r13, %r12 jne 0x22477 xorl %r15d, %r15d jmp 0x224d4 movq (%r15), %r15 movq %r15, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x224e8 movq %rax, %rdi callq 0xc95c
_ZN3CLI3App19get_option_no_throwENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp; __int64 push r15; int push r14; __int64 push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov rbx, rsi mov r14, rdi mov r15, [rdi+0D8h] mov r12, [rdi+0E0h] loc_22440: cmp r15, r12 jz short loc_2245A mov rdi, [r15]; int mov rsi, rbx; int call _ZNK3CLI6Option10check_nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Option::check_name(std::string const&) test al, al jnz short loc_224D1 add r15, 8 jmp short loc_22440 loc_2245A: mov r12, [r14+280h] mov r13, [r14+288h] cmp r12, r13 jz short loc_224CC lea rbp, [rsp+58h+var_40] lea r14, [rsp+58h+var_50] loc_22477: mov r15, [r12] cmp qword ptr [r15+10h], 0 jnz short loc_224C3 mov [rsp+58h+var_50], rbp; int mov rsi, [rbx] mov rdx, [rbx+8] add rdx, rsi mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rdi, r15 mov rsi, r14 call _ZN3CLI3App19get_option_no_throwENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::App::get_option_no_throw(std::string) mov r15, rax mov rdi, [rsp+58h+var_50]; void * cmp rdi, rbp jz short loc_224BE mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_224BE: test r15, r15 jnz short loc_224D4 loc_224C3: add r12, 10h cmp r12, r13 jnz short loc_22477 loc_224CC: xor r15d, r15d jmp short loc_224D4 loc_224D1: mov r15, [r15] loc_224D4: mov rax, r15 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_224E8: mov rdi, rax call __clang_call_terminate
long long CLI::App::get_option_no_throw(_QWORD *a1, _BYTE **a2) { long long *v2; // r15 long long *v3; // r12 long long *v4; // r12 long long *v5; // r13 long long v6; // r15 long long option_no_throw; // r15 void *v9[2]; // [rsp+8h] [rbp-50h] BYREF long long v10[8]; // [rsp+18h] [rbp-40h] BYREF v2 = (long long *)a1[27]; v3 = (long long *)a1[28]; while ( v2 != v3 ) { if ( (unsigned __int8)CLI::Option::check_name(*v2, a2) ) return *v2; ++v2; } v4 = (long long *)a1[80]; v5 = (long long *)a1[81]; if ( v4 == v5 ) return 0LL; while ( 1 ) { v6 = *v4; if ( !*(_QWORD *)(*v4 + 16) ) { v9[0] = v10; std::string::_M_construct<char *>((long long)v9, *a2, (long long)&a2[1][(_QWORD)*a2]); option_no_throw = CLI::App::get_option_no_throw(v6, v9); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1); if ( option_no_throw ) break; } v4 += 2; if ( v4 == v5 ) return 0LL; } return option_no_throw; }
get_option_no_throw: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV R14,RDI MOV R15,qword ptr [RDI + 0xd8] MOV R12,qword ptr [RDI + 0xe0] LAB_00122440: CMP R15,R12 JZ 0x0012245a MOV RDI,qword ptr [R15] LAB_00122448: MOV RSI,RBX CALL 0x00121db2 TEST AL,AL JNZ 0x001224d1 ADD R15,0x8 JMP 0x00122440 LAB_0012245a: MOV R12,qword ptr [R14 + 0x280] MOV R13,qword ptr [R14 + 0x288] CMP R12,R13 JZ 0x001224cc LEA RBP,[RSP + 0x18] LEA R14,[RSP + 0x8] LAB_00122477: MOV R15,qword ptr [R12] CMP qword ptr [R15 + 0x10],0x0 JNZ 0x001224c3 MOV qword ptr [RSP + 0x8],RBP MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] ADD RDX,RSI LAB_00122491: MOV RDI,R14 CALL 0x001177be MOV RDI,R15 MOV RSI,R14 CALL 0x0012241e MOV R15,RAX MOV RDI,qword ptr [RSP + 0x8] CMP RDI,RBP JZ 0x001224be MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00107430 LAB_001224be: TEST R15,R15 JNZ 0x001224d4 LAB_001224c3: ADD R12,0x10 CMP R12,R13 JNZ 0x00122477 LAB_001224cc: XOR R15D,R15D JMP 0x001224d4 LAB_001224d1: MOV R15,qword ptr [R15] LAB_001224d4: MOV RAX,R15 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* CLI::App::get_option_no_throw(std::__cxx11::string) */ long __thiscall CLI::App::get_option_no_throw(App *this,string *param_2) { long *plVar1; char cVar2; long lVar3; long *plVar4; long *local_50 [2]; long local_40 [2]; plVar1 = *(long **)(this + 0xe0); for (plVar4 = *(long **)(this + 0xd8); plVar4 != plVar1; plVar4 = plVar4 + 1) { /* try { // try from 00122448 to 0012244f has its CatchHandler @ 001224e8 */ cVar2 = Option::check_name((Option *)*plVar4,param_2); if (cVar2 != '\0') { return *plVar4; } } plVar4 = *(long **)(this + 0x280); plVar1 = *(long **)(this + 0x288); if (plVar4 != plVar1) { do { lVar3 = *plVar4; if (*(long *)(lVar3 + 0x10) == 0) { local_50[0] = local_40; /* try { // try from 00122491 to 00122498 has its CatchHandler @ 001224e6 */ std::__cxx11::string::_M_construct<char*> (local_50,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); lVar3 = get_option_no_throw((App *)lVar3,local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (lVar3 != 0) { return lVar3; } } plVar4 = plVar4 + 2; } while (plVar4 != plVar1); } return 0; }
28,536
ma_log_rt_split
eloqsql/storage/maria/ma_rt_split.c
static my_bool _ma_log_rt_split(MARIA_PAGE *page, const uchar *key_with_nod_flag, uint full_length, const uchar *log_internal_copy, uint log_internal_copy_length, const uchar *log_key_copy, uint length_diff) { MARIA_HA *info= page->info; MARIA_SHARE *share= info->s; LSN lsn; uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + 1 + 2 + 1 + 2 + 2 + 7], *log_pos; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 6]; uint translog_parts, extra_length= 0; my_off_t page_pos; DBUG_ENTER("_ma_log_rt_split"); DBUG_PRINT("enter", ("page: %p", page)); DBUG_ASSERT(share->now_transactional); page_pos= page->pos / share->block_size; page_store(log_data + FILEID_STORE_SIZE, page_pos); log_pos= log_data+ FILEID_STORE_SIZE + PAGE_STORE_SIZE; log_pos[0]= KEY_OP_DEL_SUFFIX; log_pos++; DBUG_ASSERT((int)length_diff > 0); int2store(log_pos, length_diff); log_pos+= 2; log_pos[0]= KEY_OP_MULTI_COPY; log_pos++; int2store(log_pos, full_length); log_pos+= 2; int2store(log_pos, log_internal_copy_length); log_pos+= 2; log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data) - 7; log_array[TRANSLOG_INTERNAL_PARTS + 1].str= log_internal_copy; log_array[TRANSLOG_INTERNAL_PARTS + 1].length= log_internal_copy_length; translog_parts= 2; if (log_key_copy != NULL) /* need to store key into record */ { log_array[TRANSLOG_INTERNAL_PARTS + 2].str= log_key_copy; log_array[TRANSLOG_INTERNAL_PARTS + 2].length= 1 + 2 + 1 + 2; log_array[TRANSLOG_INTERNAL_PARTS + 3].str= key_with_nod_flag; log_array[TRANSLOG_INTERNAL_PARTS + 3].length= full_length; extra_length= 1 + 2 + 1 + 2 + full_length; translog_parts+= 2; } _ma_log_key_changes(page, log_array + TRANSLOG_INTERNAL_PARTS + translog_parts, log_pos, &extra_length, &translog_parts); /* Remember new page length for future log entires for same page */ page->org_size= page->size; if (translog_write_record(&lsn, LOGREC_REDO_INDEX, info->trn, info, (translog_size_t) ((log_pos - log_data) + log_internal_copy_length + extra_length), TRANSLOG_INTERNAL_PARTS + translog_parts, log_array, log_data, NULL)) DBUG_RETURN(1); DBUG_RETURN(0); }
O0
c
ma_log_rt_split: pushq %rbp movq %rsp, %rbp subq $0x150, %rsp # imm = 0x150 movl 0x10(%rbp), %eax movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x30(%rbp) movq %rsi, -0x38(%rbp) movl %edx, -0x3c(%rbp) movq %rcx, -0x48(%rbp) movl %r8d, -0x4c(%rbp) movq %r9, -0x58(%rbp) movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq (%rax), %rax movq %rax, -0x68(%rbp) movl $0x0, -0x108(%rbp) jmp 0x88454 jmp 0x88456 jmp 0x88458 movq -0x30(%rbp), %rax movq 0x18(%rax), %rax movq -0x68(%rbp), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x110(%rbp) leaq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x118(%rbp) movq -0x110(%rbp), %rax movl %eax, %ecx movq -0x118(%rbp), %rax movl %ecx, (%rax) movq -0x110(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0x118(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x20(%rbp), %rax addq $0x2, %rax addq $0x5, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movb $0x7, (%rax) movq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0x78(%rbp) jmp 0x884d3 jmp 0x884d5 movq -0x78(%rbp), %rax movq %rax, -0x120(%rbp) movl 0x10(%rbp), %eax movw %ax, %cx movq -0x120(%rbp), %rax movw %cx, (%rax) movq -0x78(%rbp), %rax addq $0x2, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movb $0x9, (%rax) movq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x128(%rbp) movl -0x3c(%rbp), %eax movw %ax, %cx movq -0x128(%rbp), %rax movw %cx, (%rax) movq -0x78(%rbp), %rax addq $0x2, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x130(%rbp) movl -0x4c(%rbp), %eax movw %ax, %cx movq -0x130(%rbp), %rax movw %cx, (%rax) movq -0x78(%rbp), %rax addq $0x2, %rax movq %rax, -0x78(%rbp) leaq -0x20(%rbp), %rax movq %rax, -0xe0(%rbp) movq $0xf, -0xd8(%rbp) movq -0x48(%rbp), %rax movq %rax, -0xd0(%rbp) movl -0x4c(%rbp), %eax movq %rax, -0xc8(%rbp) movl $0x2, -0x104(%rbp) cmpq $0x0, -0x58(%rbp) je 0x885df movq -0x58(%rbp), %rax movq %rax, -0xc0(%rbp) movq $0x6, -0xb8(%rbp) movq -0x38(%rbp), %rax movq %rax, -0xb0(%rbp) movl -0x3c(%rbp), %eax movq %rax, -0xa8(%rbp) movl -0x3c(%rbp), %eax addl $0x6, %eax movl %eax, -0x108(%rbp) movl -0x104(%rbp), %eax addl $0x2, %eax movl %eax, -0x104(%rbp) movq -0x30(%rbp), %rax movl 0x20(%rax), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x24(%rax) movq -0x60(%rbp), %rax movq 0x8(%rax), %rdx movq -0x60(%rbp), %rcx movq -0x78(%rbp), %rax leaq -0x20(%rbp), %rsi subq %rsi, %rax movl -0x4c(%rbp), %esi addq %rsi, %rax movl -0x108(%rbp), %esi addq %rsi, %rax movl %eax, %r8d movl -0x104(%rbp), %r9d addl $0x2, %r9d leaq -0x100(%rbp), %r10 leaq -0x20(%rbp), %rax leaq -0x70(%rbp), %rdi movl $0xc, %esi xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x31e30 cmpb $0x0, %al je 0x8865b jmp 0x88655 movb $0x1, -0x21(%rbp) jmp 0x88661 jmp 0x8865d movb $0x0, -0x21(%rbp) movb -0x21(%rbp), %al movb %al, -0x131(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x8868b movb -0x131(%rbp), %al addq $0x150, %rsp # imm = 0x150 popq %rbp retq callq 0x2a250
_ma_log_rt_split: push rbp mov rbp, rsp sub rsp, 150h mov eax, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_30], rdi mov [rbp+var_38], rsi mov [rbp+var_3C], edx mov [rbp+var_48], rcx mov [rbp+var_4C], r8d mov [rbp+var_58], r9 mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_60], rax mov rax, [rbp+var_60] mov rax, [rax] mov [rbp+var_68], rax mov [rbp+var_108], 0 jmp short $+2 loc_88454: jmp short $+2 loc_88456: jmp short $+2 loc_88458: mov rax, [rbp+var_30] mov rax, [rax+18h] mov rcx, [rbp+var_68] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov [rbp+var_110], rax lea rax, [rbp+var_20] add rax, 2 mov [rbp+var_118], rax mov rax, [rbp+var_110] mov ecx, eax mov rax, [rbp+var_118] mov [rax], ecx mov rax, [rbp+var_110] shr rax, 20h mov cl, al mov rax, [rbp+var_118] mov [rax+4], cl lea rax, [rbp+var_20] add rax, 2 add rax, 5 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov byte ptr [rax], 7 mov rax, [rbp+var_78] add rax, 1 mov [rbp+var_78], rax jmp short $+2 loc_884D3: jmp short $+2 loc_884D5: mov rax, [rbp+var_78] mov [rbp+var_120], rax mov eax, [rbp+arg_0] mov cx, ax mov rax, [rbp+var_120] mov [rax], cx mov rax, [rbp+var_78] add rax, 2 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov byte ptr [rax], 9 mov rax, [rbp+var_78] add rax, 1 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov [rbp+var_128], rax mov eax, [rbp+var_3C] mov cx, ax mov rax, [rbp+var_128] mov [rax], cx mov rax, [rbp+var_78] add rax, 2 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov [rbp+var_130], rax mov eax, [rbp+var_4C] mov cx, ax mov rax, [rbp+var_130] mov [rax], cx mov rax, [rbp+var_78] add rax, 2 mov [rbp+var_78], rax lea rax, [rbp+var_20] mov [rbp+var_E0], rax mov [rbp+var_D8], 0Fh mov rax, [rbp+var_48] mov [rbp+var_D0], rax mov eax, [rbp+var_4C] mov [rbp+var_C8], rax mov [rbp+var_104], 2 cmp [rbp+var_58], 0 jz short loc_885DF mov rax, [rbp+var_58] mov [rbp+var_C0], rax mov [rbp+var_B8], 6 mov rax, [rbp+var_38] mov [rbp+var_B0], rax mov eax, [rbp+var_3C] mov [rbp+var_A8], rax mov eax, [rbp+var_3C] add eax, 6 mov [rbp+var_108], eax mov eax, [rbp+var_104] add eax, 2 mov [rbp+var_104], eax loc_885DF: mov rax, [rbp+var_30] mov ecx, [rax+20h] mov rax, [rbp+var_30] mov [rax+24h], ecx mov rax, [rbp+var_60] mov rdx, [rax+8] mov rcx, [rbp+var_60] mov rax, [rbp+var_78] lea rsi, [rbp+var_20] sub rax, rsi mov esi, [rbp+var_4C] add rax, rsi mov esi, [rbp+var_108] add rax, rsi mov r8d, eax mov r9d, [rbp+var_104] add r9d, 2 lea r10, [rbp+var_100] lea rax, [rbp+var_20] lea rdi, [rbp+var_70] mov esi, 0Ch xor r11d, r11d mov [rsp+150h+var_150], r10 mov [rsp+150h+var_148], rax mov [rsp+150h+var_140], 0 call translog_write_record cmp al, 0 jz short loc_8865B jmp short $+2 loc_88655: mov [rbp+var_21], 1 jmp short loc_88661 loc_8865B: jmp short $+2 loc_8865D: mov [rbp+var_21], 0 loc_88661: mov al, [rbp+var_21] mov [rbp+var_131], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_8868B mov al, [rbp+var_131] add rsp, 150h pop rbp retn loc_8868B: call ___stack_chk_fail
bool ma_log_rt_split( long long a1, long long a2, unsigned int a3, long long a4, unsigned int a5, long long a6, __int16 a7) { unsigned long long v8; // [rsp+40h] [rbp-110h] unsigned int v9; // [rsp+48h] [rbp-108h] int v10; // [rsp+4Ch] [rbp-104h] _QWORD v11[17]; // [rsp+50h] [rbp-100h] BYREF _BYTE *v12; // [rsp+D8h] [rbp-78h] _BYTE v13[8]; // [rsp+E0h] [rbp-70h] BYREF long long v14; // [rsp+E8h] [rbp-68h] long long *v15; // [rsp+F0h] [rbp-60h] long long v16; // [rsp+F8h] [rbp-58h] unsigned int v17; // [rsp+104h] [rbp-4Ch] long long v18; // [rsp+108h] [rbp-48h] unsigned int v19; // [rsp+114h] [rbp-3Ch] long long v20; // [rsp+118h] [rbp-38h] long long v21; // [rsp+120h] [rbp-30h] __int16 v22; // [rsp+130h] [rbp-20h] BYREF int v23; // [rsp+132h] [rbp-1Eh] char v24; // [rsp+136h] [rbp-1Ah] char v25; // [rsp+137h] [rbp-19h] __int16 v26; // [rsp+138h] [rbp-18h] char v27; // [rsp+13Ah] [rbp-16h] __int16 v28; // [rsp+13Bh] [rbp-15h] __int16 v29; // [rsp+13Dh] [rbp-13h] _BYTE v30[17]; // [rsp+13Fh] [rbp-11h] BYREF long long savedregs; // [rsp+150h] [rbp+0h] BYREF *(_QWORD *)&v30[9] = __readfsqword(0x28u); v21 = a1; v20 = a2; v19 = a3; v18 = a4; v17 = a5; v16 = a6; v15 = *(long long **)a1; v14 = *v15; v9 = 0; v8 = *(_QWORD *)(a1 + 24) / (unsigned long long)*(unsigned int *)(v14 + 1980); v23 = v8; v24 = BYTE4(v8); v25 = 7; v26 = a7; v27 = 9; v28 = a3; v29 = a5; v12 = v30; v11[4] = &v22; v11[5] = 15LL; v11[6] = a4; v11[7] = a5; v10 = 2; if ( a6 ) { v11[8] = v16; v11[9] = 6LL; v11[10] = v20; v11[11] = v19; v9 = v19 + 6; v10 = 4; } *(_DWORD *)(v21 + 36) = *(_DWORD *)(v21 + 32); return translog_write_record( (long long)v13, 0xCu, v15[1], v15, v9 + v17 + (_DWORD)v12 - ((unsigned int)&savedregs - 32), v10 + 2, v11, &v22, 0LL) != 0; }
_ma_log_rt_split: PUSH RBP MOV RBP,RSP SUB RSP,0x150 MOV EAX,dword ptr [RBP + 0x10] 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 dword ptr [RBP + -0x3c],EDX MOV qword ptr [RBP + -0x48],RCX MOV dword ptr [RBP + -0x4c],R8D MOV qword ptr [RBP + -0x58],R9 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x68],RAX MOV dword ptr [RBP + -0x108],0x0 JMP 0x00188454 LAB_00188454: JMP 0x00188456 LAB_00188456: JMP 0x00188458 LAB_00188458: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x68] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x110],RAX LEA RAX,[RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x118],RAX MOV RAX,qword ptr [RBP + -0x110] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x118] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x110] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x118] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x20] ADD RAX,0x2 ADD RAX,0x5 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x7 MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0x78],RAX JMP 0x001884d3 LAB_001884d3: JMP 0x001884d5 LAB_001884d5: MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x120],RAX MOV EAX,dword ptr [RBP + 0x10] MOV CX,AX MOV RAX,qword ptr [RBP + -0x120] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x2 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV byte ptr [RAX],0x9 MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x128],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x128] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x2 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x130],RAX MOV EAX,dword ptr [RBP + -0x4c] MOV CX,AX MOV RAX,qword ptr [RBP + -0x130] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x2 MOV qword ptr [RBP + -0x78],RAX LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0xe0],RAX MOV qword ptr [RBP + -0xd8],0xf MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0xd0],RAX MOV EAX,dword ptr [RBP + -0x4c] MOV qword ptr [RBP + -0xc8],RAX MOV dword ptr [RBP + -0x104],0x2 CMP qword ptr [RBP + -0x58],0x0 JZ 0x001885df MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0xc0],RAX MOV qword ptr [RBP + -0xb8],0x6 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xb0],RAX MOV EAX,dword ptr [RBP + -0x3c] MOV qword ptr [RBP + -0xa8],RAX MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,0x6 MOV dword ptr [RBP + -0x108],EAX MOV EAX,dword ptr [RBP + -0x104] ADD EAX,0x2 MOV dword ptr [RBP + -0x104],EAX LAB_001885df: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x78] LEA RSI,[RBP + -0x20] SUB RAX,RSI MOV ESI,dword ptr [RBP + -0x4c] ADD RAX,RSI MOV ESI,dword ptr [RBP + -0x108] ADD RAX,RSI MOV R8D,EAX MOV R9D,dword ptr [RBP + -0x104] ADD R9D,0x2 LEA R10,[RBP + -0x100] LEA RAX,[RBP + -0x20] LEA RDI,[RBP + -0x70] MOV ESI,0xc XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x00131e30 CMP AL,0x0 JZ 0x0018865b JMP 0x00188655 LAB_00188655: MOV byte ptr [RBP + -0x21],0x1 JMP 0x00188661 LAB_0018865b: JMP 0x0018865d LAB_0018865d: MOV byte ptr [RBP + -0x21],0x0 LAB_00188661: MOV AL,byte ptr [RBP + -0x21] MOV byte ptr [RBP + -0x131],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0018868b MOV AL,byte ptr [RBP + -0x131] ADD RSP,0x150 POP RBP RET LAB_0018868b: CALL 0x0012a250
int8 _ma_log_rt_split(long *param_1,int8 param_2,uint param_3,int8 param_4,uint param_5, long param_6,int2 param_7) { char cVar1; ulong uVar2; long in_FS_OFFSET; int local_110; int local_10c; int1 local_108 [32]; int1 *local_e8; int8 local_e0; int8 local_d8; ulong local_d0; long local_c8; int8 local_c0; int8 local_b8; ulong local_b0; int1 *local_80; int1 local_78 [8]; long local_70; long *local_68; long local_60; uint local_54; int8 local_50; uint local_44; int8 local_40; long *local_38; int1 local_29; int1 local_28 [2]; int4 local_26; int1 local_22; int1 local_21; int2 local_20; int1 local_1e; int2 local_1d; int2 local_1b; int1 auStack_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_68 = (long *)*param_1; local_70 = *local_68; local_110 = 0; uVar2 = (ulong)param_1[3] / (ulong)*(uint *)(local_70 + 0x7bc); local_26 = (int4)uVar2; local_22 = (int1)(uVar2 >> 0x20); local_21 = 7; local_20 = param_7; local_1e = 9; local_1d = (int2)param_3; local_1b = (int2)param_5; local_80 = auStack_19; local_e8 = local_28; local_e0 = 0xf; local_d0 = (ulong)param_5; local_10c = 2; if (param_6 != 0) { local_c0 = 6; local_b0 = (ulong)param_3; local_110 = param_3 + 6; local_10c = 4; local_c8 = param_6; local_b8 = param_2; } *(int *)((long)param_1 + 0x24) = (int)param_1[4]; local_d8 = param_4; local_60 = param_6; local_54 = param_5; local_50 = param_4; local_44 = param_3; local_40 = param_2; local_38 = param_1; cVar1 = translog_write_record (local_78,0xc,local_68[1],local_68, ((int)local_80 - (int)local_28) + param_5 + local_110,local_10c + 2,local_108, local_28,0); local_29 = cVar1 != '\0'; if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_29); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,537
translog_destroy
eloqsql/storage/maria/ma_loghandler.c
void translog_destroy() { TRANSLOG_FILE **file; uint i; uint8 current_buffer; DBUG_ENTER("translog_destroy"); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); translog_lock(); current_buffer= log_descriptor.bc.buffer_no; translog_status= (translog_status == TRANSLOG_READONLY ? TRANSLOG_UNINITED : TRANSLOG_SHUTDOWN); if (log_descriptor.bc.buffer->file != NULL) translog_finish_page(&log_descriptor.horizon, &log_descriptor.bc); translog_unlock(); for (i= 0; i < TRANSLOG_BUFFERS_NO; i++) { struct st_translog_buffer *buffer= (log_descriptor.buffers + ((i + current_buffer + 1) % TRANSLOG_BUFFERS_NO)); translog_buffer_destroy(buffer); } translog_status= TRANSLOG_UNINITED; /* close files */ while ((file= (TRANSLOG_FILE **)pop_dynamic(&log_descriptor.open_files))) translog_close_log_file(*file); mysql_mutex_destroy(&log_descriptor.sent_to_disk_lock); mysql_mutex_destroy(&log_descriptor.file_header_lock); mysql_mutex_destroy(&log_descriptor.unfinished_files_lock); mysql_mutex_destroy(&log_descriptor.purger_lock); mysql_mutex_destroy(&log_descriptor.log_flush_lock); mysql_mutex_destroy(&log_descriptor.dirty_buffer_mask_lock); mysql_cond_destroy(&log_descriptor.log_flush_cond); mysql_cond_destroy(&log_descriptor.new_goal_cond); mysql_rwlock_destroy(&log_descriptor.open_files_lock); delete_dynamic(&log_descriptor.open_files); delete_dynamic(&log_descriptor.unfinished_files); if (log_descriptor.directory_fd >= 0) mysql_file_close(log_descriptor.directory_fd, MYF(MY_WME)); if (id_to_share != NULL) my_free(id_to_share + 1); DBUG_VOID_RETURN; }
O0
c
translog_destroy: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp jmp 0xb1537a callq 0xb11a90 movb 0x12e4281(%rip), %al # 0x1df9606 movb %al, -0xd(%rbp) movl 0xae23e2(%rip), %edx # 0x15f7770 movl $0x3, %eax xorl %ecx, %ecx cmpl $0x2, %edx cmovel %ecx, %eax movl %eax, 0xae23cf(%rip) # 0x15f7770 movq 0x12e4250(%rip), %rax # 0x1df95f8 cmpq $0x0, 0x100038(%rax) je 0xb153cf leaq 0xae35c7(%rip), %rsi # 0x15f8980 movq %rsi, %rdi addq $0x800c48, %rdi # imm = 0x800C48 addq $0x800c50, %rsi # imm = 0x800C50 callq 0xb15580 callq 0xb11b80 movl $0x0, -0xc(%rbp) cmpl $0x8, -0xc(%rbp) jae 0xb15423 movl -0xc(%rbp), %eax movzbl -0xd(%rbp), %ecx addl %ecx, %eax addl $0x1, %eax andl $0x7, %eax movl %eax, %eax movl %eax, %ecx leaq 0xae3585(%rip), %rax # 0x15f8980 addq $0x2f8, %rax # imm = 0x2F8 imulq $0x100120, %rcx, %rcx # imm = 0x100120 addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0xb15730 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0xb153db movl $0x0, 0xae2343(%rip) # 0x15f7770 leaq 0xae354c(%rip), %rdi # 0x15f8980 addq $0x228, %rdi # imm = 0x228 callq 0xbf7d10 movq %rax, -0x8(%rbp) cmpq $0x0, %rax je 0xb15458 movq -0x8(%rbp), %rax movq (%rax), %rdi callq 0xb157a0 jmp 0xb1542d leaq 0xae3521(%rip), %rdi # 0x15f8980 addq $0x800cc0, %rdi # imm = 0x800CC0 callq 0xb15860 leaq 0xae350e(%rip), %rdi # 0x15f8980 addq $0x800dc0, %rdi # imm = 0x800DC0 callq 0xb15860 leaq 0xae34fb(%rip), %rdi # 0x15f8980 addq $0x800e08, %rdi # imm = 0x800E08 callq 0xb15860 leaq 0xae34e8(%rip), %rdi # 0x15f8980 addq $0x800e80, %rdi # imm = 0x800E80 callq 0xb15860 leaq 0xae34d5(%rip), %rdi # 0x15f8980 addq $0x800d08, %rdi # imm = 0x800D08 callq 0xb15860 leaq 0xae34c2(%rip), %rdi # 0x15f8980 addq $0x800c00, %rdi # imm = 0x800C00 callq 0xb15860 leaq 0xae34af(%rip), %rdi # 0x15f8980 addq $0x800d50, %rdi # imm = 0x800D50 callq 0xb158b0 leaq 0xae349c(%rip), %rdi # 0x15f8980 addq $0x800d88, %rdi # imm = 0x800D88 callq 0xb158b0 leaq 0xae3489(%rip), %rdi # 0x15f8980 addq $0x258, %rdi # imm = 0x258 callq 0xb15920 leaq 0xae3476(%rip), %rdi # 0x15f8980 addq $0x228, %rdi # imm = 0x228 callq 0xbf7fd0 leaq 0xae3463(%rip), %rdi # 0x15f8980 addq $0x800e50, %rdi # imm = 0x800E50 callq 0xbf7fd0 cmpl $0x0, 0xae3740(%rip) # 0x15f8c70 jl 0xb1554e movl 0xae3738(%rip), %edx # 0x15f8c70 leaq 0x2badfe(%rip), %rdi # 0xdd033d movl $0x10e9, %esi # imm = 0x10E9 movl $0x10, %ecx callq 0xb11860 cmpq $0x0, 0x12e4342(%rip) # 0x1df9898 je 0xb15568 movq 0x12e4339(%rip), %rdi # 0x1df9898 addq $0x8, %rdi callq 0xc1ae80 jmp 0xb1556a jmp 0xb1556c addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_destroy: push rbp mov rbp, rsp sub rsp, 20h jmp short $+2 loc_B1537A: call translog_lock mov al, cs:byte_1DF9606 mov [rbp+var_D], al mov edx, cs:translog_status mov eax, 3 xor ecx, ecx cmp edx, 2 cmovz eax, ecx mov cs:translog_status, eax mov rax, cs:qword_1DF95F8 cmp qword ptr [rax+100038h], 0 jz short loc_B153CF lea rsi, log_descriptor mov rdi, rsi add rdi, 800C48h add rsi, 800C50h call translog_finish_page loc_B153CF: call translog_unlock mov [rbp+var_C], 0 loc_B153DB: cmp [rbp+var_C], 8 jnb short loc_B15423 mov eax, [rbp+var_C] movzx ecx, [rbp+var_D] add eax, ecx add eax, 1 and eax, 7 mov eax, eax mov ecx, eax lea rax, log_descriptor add rax, 2F8h imul rcx, 100120h add rax, rcx mov [rbp+var_18], rax mov rdi, [rbp+var_18] call translog_buffer_destroy mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp short loc_B153DB loc_B15423: mov cs:translog_status, 0 loc_B1542D: lea rdi, log_descriptor add rdi, 228h call pop_dynamic mov [rbp+var_8], rax cmp rax, 0 jz short loc_B15458 mov rax, [rbp+var_8] mov rdi, [rax] call translog_close_log_file jmp short loc_B1542D loc_B15458: lea rdi, log_descriptor add rdi, 800CC0h call inline_mysql_mutex_destroy_2 lea rdi, log_descriptor add rdi, 800DC0h call inline_mysql_mutex_destroy_2 lea rdi, log_descriptor add rdi, 800E08h call inline_mysql_mutex_destroy_2 lea rdi, log_descriptor add rdi, 800E80h call inline_mysql_mutex_destroy_2 lea rdi, log_descriptor add rdi, 800D08h call inline_mysql_mutex_destroy_2 lea rdi, log_descriptor add rdi, 800C00h call inline_mysql_mutex_destroy_2 lea rdi, log_descriptor add rdi, 800D50h call inline_mysql_cond_destroy_0 lea rdi, log_descriptor add rdi, 800D88h call inline_mysql_cond_destroy_0 lea rdi, log_descriptor add rdi, 258h call inline_mysql_rwlock_destroy_0 lea rdi, log_descriptor add rdi, 228h call delete_dynamic lea rdi, log_descriptor add rdi, 800E50h call delete_dynamic cmp cs:dword_15F8C70, 0 jl short loc_B1554E mov edx, cs:dword_15F8C70 lea rdi, aWorkspaceLlm4b_120; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 10E9h mov ecx, 10h call inline_mysql_file_close_2 loc_B1554E: cmp cs:id_to_share, 0 jz short loc_B15568 mov rdi, cs:id_to_share add rdi, 8 call my_free loc_B15568: jmp short $+2 loc_B1556A: jmp short $+2 loc_B1556C: add rsp, 20h pop rbp retn
long long translog_destroy() { int v0; // eax long long result; // rax char v2; // [rsp+13h] [rbp-Dh] unsigned int i; // [rsp+14h] [rbp-Ch] _QWORD *v4; // [rsp+18h] [rbp-8h] translog_lock(); v2 = byte_1DF9606; v0 = 3; if ( translog_status == 2 ) v0 = 0; translog_status = v0; if ( *(_QWORD *)(qword_1DF95F8 + 1048632) ) translog_finish_page(&log_descriptor[1048969], &log_descriptor[1048970]); translog_unlock(); for ( i = 0; i < 8; ++i ) translog_buffer_destroy(&log_descriptor[131108 * ((v2 + (unsigned __int8)i + 1) & 7) + 95]); translog_status = 0; while ( 1 ) { v4 = (_QWORD *)pop_dynamic(&log_descriptor[69]); if ( !v4 ) break; translog_close_log_file(*v4); } inline_mysql_mutex_destroy_2(&log_descriptor[1048984]); inline_mysql_mutex_destroy_2(&log_descriptor[1049016]); inline_mysql_mutex_destroy_2(&log_descriptor[1049025]); inline_mysql_mutex_destroy_2(&log_descriptor[1049040]); inline_mysql_mutex_destroy_2(&log_descriptor[1048993]); inline_mysql_mutex_destroy_2(&log_descriptor[1048960]); inline_mysql_cond_destroy_0(&log_descriptor[1049002]); inline_mysql_cond_destroy_0(&log_descriptor[1049009]); inline_mysql_rwlock_destroy_0(&log_descriptor[75]); delete_dynamic(&log_descriptor[69]); result = delete_dynamic(&log_descriptor[1049034]); if ( dword_15F8C70 >= 0 ) result = inline_mysql_file_close_2( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x10E9u, dword_15F8C70, 16LL); if ( id_to_share ) return my_free(id_to_share + 8); return result; }
__relocate_a_1<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>*,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>>: 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 + -0x18] MOV qword ptr [RBP + -0x28],RAX LAB_00b15390: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JZ 0x00b153c5 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00b153e0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x18 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x28],RAX JMP 0x00b15390 LAB_00b153c5: MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >* std::__relocate_a_1<std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >*, std::allocator<std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > > >(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >*, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >*, std::allocator<std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > >&) */ vector * std:: __relocate_a_1<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>*,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>> (vector *param_1,vector *param_2,vector *param_3,allocator *param_4) { vector *local_30; vector *local_10; local_30 = param_3; for (local_10 = param_1; local_10 != param_2; local_10 = local_10 + 0x18) { __relocate_object_a<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>,std::allocator<std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>>> (local_30,local_10,param_4); local_30 = local_30 + 0x18; } return local_30; }
28,538
my_uni_utf16
eloqsql/strings/ctype-ucs2.c
int my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (wc <= 0xFFFF) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (MY_UTF16_SURROGATE(wc)) return MY_CS_ILUNI; *s++= (uchar) (wc >> 8); *s= (uchar) (wc & 0xFF); return 2; } if (wc <= 0x10FFFF) { if (s + 4 > e) return MY_CS_TOOSMALL4; *s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8; *s++= (uchar) (wc >> 10) & 0xFF; *s++= (uchar) ((wc >> 8) & 3) | 0xDC; *s= (uchar) wc & 0xFF; return 4; } return MY_CS_ILUNI; }
O0
c
my_uni_utf16: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x5923f movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x591e8 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x59302 movq -0x18(%rbp), %rax andq $0xf800, %rax # imm = 0xF800 cmpq $0xd800, %rax # imm = 0xD800 jne 0x59206 movl $0x0, -0x4(%rbp) jmp 0x59302 movq -0x18(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x2, -0x4(%rbp) jmp 0x59302 cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF ja 0x592fb movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x59267 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x59302 movq -0x18(%rbp), %rax subq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) shrq $0x12, %rax movzbl %al, %eax orl $0xd8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0xa, %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0x8, %rax andq $0x3, %rax movzbl %al, %eax orl $0xdc, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x4, -0x4(%rbp) jmp 0x59302 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_uni_utf16: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_18], 0FFFFh ja short loc_5923F mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_591E8 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_59302 loc_591E8: mov rax, [rbp+var_18] and rax, 0F800h cmp rax, 0D800h jnz short loc_59206 mov [rbp+var_4], 0 jmp loc_59302 loc_59206: mov rax, [rbp+var_18] shr rax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] and rax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 2 jmp loc_59302 loc_5923F: cmp [rbp+var_18], offset aBLL; "b~l}l/_" ja loc_592FB mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_59267 mov [rbp+var_4], 0FFFFFF98h jmp loc_59302 loc_59267: mov rax, [rbp+var_18] sub rax, 10000h mov [rbp+var_18], rax shr rax, 12h movzx eax, al or eax, 0D8h mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 0Ah movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 8 and rax, 3 movzx eax, al or eax, 0DCh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 4 jmp short loc_59302 loc_592FB: mov [rbp+var_4], 0 loc_59302: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { if ( a2 > 0xFFFF ) { if ( a2 > (unsigned long long)"b~l}l/_" ) { return 0; } else if ( (unsigned long long)(a3 + 4) <= a4 ) { *a3 = ((a2 - 0x10000) >> 18) | 0xD8; a3[1] = (a2 - 0x10000) >> 10; a3[2] = BYTE1(a2) & 3 | 0xDC; a3[3] = a2; return 4; } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (a2 & 0xF800) == 0xD800 ) { return 0; } else { *a3 = BYTE1(a2); a3[1] = a2; return 2; } } else { return (unsigned int)-102; } }
my_uni_utf16: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RBP + -0x18],0xffff JA 0x0015923f MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001591e8 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00159302 LAB_001591e8: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xf800 CMP RAX,0xd800 JNZ 0x00159206 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00159302 LAB_00159206: MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x00159302 LAB_0015923f: CMP qword ptr [RBP + -0x18],0x10ffff JA 0x001592fb MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00159267 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00159302 LAB_00159267: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX SHR RAX,0x12 MOVZX EAX,AL OR EAX,0xd8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 AND RAX,0x3 MOVZX EAX,AL OR EAX,0xdc MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x4 JMP 0x00159302 LAB_001592fb: MOV dword ptr [RBP + -0x4],0x0 LAB_00159302: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4) { int4 local_c; if (param_2 < 0x10000) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if ((param_2 & 0xf800) == 0xd800) { local_c = 0; } else { *param_3 = (byte)(param_2 >> 8); param_3[1] = (byte)param_2; local_c = 2; } } else if (param_2 < 0x110000) { if (param_4 < param_3 + 4) { local_c = 0xffffff98; } else { param_2 = param_2 - 0x10000; *param_3 = (byte)(param_2 >> 0x12) | 0xd8; param_3[1] = (byte)(param_2 >> 10); param_3[2] = (byte)(param_2 >> 8) & 3 | 0xdc; param_3[3] = (byte)param_2; local_c = 4; } } else { local_c = 0; } return local_c; }
28,539
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)); } } }
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>>::operator->() const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq (%rdi), %rax testq %rax, %rax je 0x81647 movq %rdi, %r14 movzbl (%rax), %ecx cmpl $0x2, %ecx je 0x815aa cmpl $0x1, %ecx jne 0x815d7 movq 0x8(%rax), %rcx movq 0x8(%r14), %rax cmpq 0x8(%rcx), %rax je 0x81663 addq $0x20, %rax jmp 0x815de movq 0x8(%rax), %rcx movq 0x10(%r14), %rax cmpq 0x8(%rcx), %rax jne 0x815de leaq 0xca7cf(%rip), %rdi # 0x14bd8e leaq 0xca814(%rip), %rdx # 0x14bdda leaq 0xccec0(%rip), %rcx # 0x14e48d movl $0x3397, %esi # imm = 0x3397 jmp 0x8167d cmpq $0x0, 0x18(%r14) jne 0x815e9 addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1f550 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xccec4(%rip), %rsi # 0x14e4ca leaq 0xccecd(%rip), %rdx # 0x14e4da leaq 0x8(%rsp), %rdi callq 0x4c588 movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xd6, %esi callq 0x7b4b8 xorl %ebp, %ebp leaq 0x1277a0(%rip), %rsi # 0x1a8dd8 leaq -0x25ab(%rip), %rdx # 0x7f094 movq %rbx, %rdi callq 0x202e0 leaq 0xca740(%rip), %rdi # 0x14bd8e leaq 0xca785(%rip), %rdx # 0x14bdda leaq 0xccdb4(%rip), %rcx # 0x14e410 movl $0x338b, %esi # imm = 0x338B jmp 0x8167d leaq 0xca724(%rip), %rdi # 0x14bd8e leaq 0xca769(%rip), %rdx # 0x14bdda leaq 0xccdd6(%rip), %rcx # 0x14e44e movl $0x3391, %esi # imm = 0x3391 xorl %eax, %eax callq 0x20250 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x816a6 movq 0x18(%rsp), %rsi incq %rsi callq 0x1fae0 jmp 0x816a6 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x816b3 movq %rbx, %rdi callq 0x1f7e0 movq %r14, %rdi callq 0x20380 nop
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEptEv: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov rax, [rdi] test rax, rax jz loc_81647 mov r14, rdi movzx ecx, byte ptr [rax] cmp ecx, 2 jz short loc_815AA cmp ecx, 1 jnz short loc_815D7 mov rcx, [rax+8] mov rax, [r14+8] cmp rax, [rcx+8] jz loc_81663 add rax, 20h ; ' ' jmp short loc_815DE loc_815AA: mov rcx, [rax+8] mov rax, [r14+10h] cmp rax, [rcx+8] jnz short loc_815DE lea rdi, aWorkspaceLlm4b_0; "/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_8167D loc_815D7: cmp qword ptr [r14+18h], 0 jnz short loc_815E9 loc_815DE: add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_815E9: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotGetValue; "cannot get value" lea rdx, aCannotGetValue+10h; "" lea rdi, [rsp+48h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 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_81647: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 338Bh jmp short loc_8167D loc_81663: lea rdi, aWorkspaceLlm4b_0; "/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_8167D: xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_816A6 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_816A6 mov r14, rax mov bpl, 1 loc_816A6: test bpl, bpl jz short loc_816B3 mov rdi, rbx; void * call ___cxa_free_exception loc_816B3: mov rdi, r14 call __Unwind_Resume
unsigned __int8 * 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::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator->( unsigned __int8 **a1) { void *v1; // rbx char v2; // bp void *v3; // r15 unsigned __int8 *result; // rax int v5; // ecx long long v6; // rcx unsigned __int8 *v7; // rax long long v8; // rcx long long v9; // rax nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx long long v11; // r14 void *v12[2]; // [rsp+8h] [rbp-40h] BYREF long long v13; // [rsp+18h] [rbp-30h] BYREF result = *a1; if ( !*a1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 13195LL, "GGML_ASSERT(%s) failed", "m_object != nullptr"); goto LABEL_13; } v5 = *result; if ( v5 == 2 ) { v8 = *((_QWORD *)result + 1); result = a1[2]; if ( result == *(unsigned __int8 **)(v8 + 8) ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 13207LL, "GGML_ASSERT(%s) failed", "m_it.array_iterator != m_object->m_data.m_value.array->end()"); goto LABEL_13; } } else { if ( v5 == 1 ) { v6 = *((_QWORD *)result + 1); v7 = a1[1]; if ( v7 != *(unsigned __int8 **)(v6 + 8) ) return v7 + 32; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 13201LL, "GGML_ASSERT(%s) failed", "m_it.object_iterator != m_object->m_data.m_value.object->end()"); LABEL_13: v11 = v9; if ( v12[0] != v3 ) operator delete(v12[0], v13 + 1); if ( v2 ) __cxa_free_exception(v1); _Unwind_Resume(v11); } if ( a1[3] ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v12[0] = &v13; std::string::_M_construct<char const*>(v12, "cannot get value", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 214, v12); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } return result; }
operator->: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00181647 MOV R14,RDI MOVZX ECX,byte ptr [RAX] CMP ECX,0x2 JZ 0x001815aa CMP ECX,0x1 JNZ 0x001815d7 MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x00181663 ADD RAX,0x20 JMP 0x001815de LAB_001815aa: MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [R14 + 0x10] CMP RAX,qword ptr [RCX + 0x8] JNZ 0x001815de LEA RDI,[0x24bd8e] LEA RDX,[0x24bdda] LEA RCX,[0x24e48d] MOV ESI,0x3397 JMP 0x0018167d LAB_001815d7: CMP qword ptr [R14 + 0x18],0x0 JNZ 0x001815e9 LAB_001815de: ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_001815e9: MOV EDI,0x20 CALL 0x0011f550 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_001815ff: LEA RSI,[0x24e4ca] LEA RDX,[0x24e4da] LEA RDI,[RSP + 0x8] CALL 0x0014c588 MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_0018161d: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xd6 CALL 0x0017b4b8 XOR EBP,EBP LEA RSI,[0x2a8dd8] LEA RDX,[0x17f094] MOV RDI,RBX CALL 0x001202e0 LAB_00181647: LEA RDI,[0x24bd8e] LEA RDX,[0x24bdda] LEA RCX,[0x24e410] MOV ESI,0x338b JMP 0x0018167d LAB_00181663: LEA RDI,[0x24bd8e] LEA RDX,[0x24bdda] LEA RCX,[0x24e44e] MOV ESI,0x3391 LAB_0018167d: XOR EAX,EAX CALL 0x00120250
/* 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; int1 *local_40 [2]; int1 local_30 [16]; pcVar2 = *(char **)this; if (pcVar2 == (char *)0x0) { pcVar2 = "m_object != nullptr"; uVar3 = 0x338b; LAB_0018167d: /* 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_0018167d; } } 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_0018167d; } pcVar2 = (char *)(*(long *)(this + 8) + 0x20); } else if (*(long *)(this + 0x18) != 0) { uVar3 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 001815ff to 00181616 has its CatchHandler @ 001816a0 */ std::__cxx11::string::_M_construct<char_const*>(local_40,"cannot get value",""); /* try { // try from 0018161d to 00181646 has its CatchHandler @ 00181684 */ _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_40,*(int8 *)this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&invalid_iterator::typeinfo,exception::~exception); } return pcVar2; }
28,540
LefDefParser::defwBlockageLayerExceptpgnet(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwBlockageLayerExceptpgnet(const char *layerName) { defwFunc = DEFW_BLOCKAGE_LAYER; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; // May be user already define component or layer or layer slots if (defwState != DEFW_BLOCKAGE_START && ((defwState == DEFW_BLOCKAGE_PLACE) || (defwState == DEFW_BLOCKAGE_LAYER))) return DEFW_BAD_DATA; if ((layerName == 0) || (*layerName == 0)) // require return DEFW_BAD_DATA; if (defwState == DEFW_BLOCKAGE_RECT) fprintf(defwFile, " ;\n"); // end the previous rectangle fprintf(defwFile, " - LAYER %s + EXCEPTPGNET\n", layerName); defwCounter--; defwLines++; defwState = DEFW_BLOCKAGE_LAYER; defwBlockageHasSD = 0; return DEFW_OK; }
O0
cpp
LefDefParser::defwBlockageLayerExceptpgnet(char const*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) leaq 0xc128(%rip), %rax # 0x2b168 movl $0x2c, (%rax) leaq 0xc10b(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x1f060 movl $0x1, 0x14(%rsp) jmp 0x1f13d leaq 0xc0fd(%rip), %rax # 0x2b164 cmpl $0x2b, (%rax) je 0x1f091 leaq 0xc0f1(%rip), %rax # 0x2b164 cmpl $0x2d, (%rax) je 0x1f084 leaq 0xc0e5(%rip), %rax # 0x2b164 cmpl $0x2c, (%rax) jne 0x1f091 movl $0x3, 0x14(%rsp) jmp 0x1f13d cmpq $0x0, 0x8(%rsp) je 0x1f0a6 movq 0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x1f0b3 movl $0x3, 0x14(%rsp) jmp 0x1f13d leaq 0xc0aa(%rip), %rax # 0x2b164 cmpl $0x2e, (%rax) jne 0x1f0d7 leaq 0xc092(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0x4d82(%rip), %rsi # 0x23e52 movb $0x0, %al callq 0x10f0 leaq 0xc07a(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x602a(%rip), %rsi # 0x25117 movb $0x0, %al callq 0x10f0 leaq 0xc07d(%rip), %rax # 0x2b178 movl (%rax), %ecx addl $-0x1, %ecx leaq 0xc071(%rip), %rax # 0x2b178 movl %ecx, (%rax) leaq 0xc050(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0xc044(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0xc03f(%rip), %rax # 0x2b164 movl $0x2c, (%rax) movl $0x0, 0xc063(%rip) # 0x2b198 movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser28defwBlockageLayerExceptpgnetEPKc: sub rsp, 18h mov [rsp+18h+var_10], rdi lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 2Ch ; ',' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_1F060 mov [rsp+18h+var_4], 1 jmp loc_1F13D loc_1F060: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Bh ; '+' jz short loc_1F091 lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Dh ; '-' jz short loc_1F084 lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Ch ; ',' jnz short loc_1F091 loc_1F084: mov [rsp+18h+var_4], 3 jmp loc_1F13D loc_1F091: cmp [rsp+18h+var_10], 0 jz short loc_1F0A6 mov rax, [rsp+18h+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_1F0B3 loc_1F0A6: mov [rsp+18h+var_4], 3 jmp loc_1F13D loc_1F0B3: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Eh ; '.' jnz short loc_1F0D7 lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, aDividercharS+10h; " ;\n" mov al, 0 call _fprintf loc_1F0D7: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aLayerSExceptpg; " - LAYER %s + EXCEPTPGNET\n" mov al, 0 call _fprintf lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov ecx, [rax] add ecx, 0FFFFFFFFh lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov [rax], ecx lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 2Ch ; ',' mov cs:_ZN12LefDefParserL17defwBlockageHasSDE, 0; LefDefParser::defwBlockageHasSD mov [rsp+18h+var_4], 0 loc_1F13D: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::defwBlockageLayerExceptpgnet(LefDefParser *this, const char *a2) { LefDefParser::defwFunc = 44; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState != 43 && (LefDefParser::defwState == 45 || LefDefParser::defwState == 44) ) { return 3; } else if ( this && *(_BYTE *)this ) { if ( LefDefParser::defwState == 46 ) fprintf(LefDefParser::defwFile, " ;\n"); fprintf(LefDefParser::defwFile, " - LAYER %s + EXCEPTPGNET\n", (const char *)this); --LefDefParser::defwCounter; ++LefDefParser::defwLines; LefDefParser::defwState = 44; LefDefParser::defwBlockageHasSD = 0; return 0; } else { return 3; } } else { return 1; } }
defwBlockageLayerExceptpgnet: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI LEA RAX,[0x12b168] MOV dword ptr [RAX],0x2c LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x0011f060 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0011f13d LAB_0011f060: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2b JZ 0x0011f091 LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2d JZ 0x0011f084 LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2c JNZ 0x0011f091 LAB_0011f084: MOV dword ptr [RSP + 0x14],0x3 JMP 0x0011f13d LAB_0011f091: CMP qword ptr [RSP + 0x8],0x0 JZ 0x0011f0a6 MOV RAX,qword ptr [RSP + 0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0011f0b3 LAB_0011f0a6: MOV dword ptr [RSP + 0x14],0x3 JMP 0x0011f13d LAB_0011f0b3: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2e JNZ 0x0011f0d7 LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x123e52] MOV AL,0x0 CALL 0x001010f0 LAB_0011f0d7: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x125117] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b178] MOV ECX,dword ptr [RAX] ADD ECX,-0x1 LEA RAX,[0x12b178] MOV dword ptr [RAX],ECX LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LEA RAX,[0x12b164] MOV dword ptr [RAX],0x2c MOV dword ptr [0x0012b198],0x0 MOV dword ptr [RSP + 0x14],0x0 LAB_0011f13d: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::defwBlockageLayerExceptpgnet(char const*) */ int4 LefDefParser::defwBlockageLayerExceptpgnet(char *param_1) { int4 local_4; defwFunc = 0x2c; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if ((defwState == 0x2b) || ((defwState != 0x2d && (defwState != 0x2c)))) { if ((param_1 == (char *)0x0) || (*param_1 == '\0')) { local_4 = 3; } else { if (defwState == 0x2e) { fprintf(defwFile," ;\n"); } fprintf(defwFile," - LAYER %s + EXCEPTPGNET\n",param_1); defwCounter = defwCounter + -1; defwLines = defwLines + 1; defwState = 0x2c; defwBlockageHasSD = 0; local_4 = 0; } } else { local_4 = 3; } return local_4; }
28,541
testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void PrettyUnitTestResultPrinter::OnTestIterationEnd(const UnitTest& unit_test, int /*iteration*/) { ColoredPrintf(GTestColor::kGreen, "[==========] "); printf("%s from %s ran.", FormatTestCount(unit_test.test_to_run_count()).c_str(), FormatTestSuiteCount(unit_test.test_suite_to_run_count()).c_str()); if (GTEST_FLAG_GET(print_time)) { printf(" (%s ms total)", internal::StreamableToString(unit_test.elapsed_time()).c_str()); } printf("\n"); ColoredPrintf(GTestColor::kGreen, "[ PASSED ] "); printf("%s.\n", FormatTestCount(unit_test.successful_test_count()).c_str()); const int skipped_test_count = unit_test.skipped_test_count(); if (skipped_test_count > 0) { ColoredPrintf(GTestColor::kGreen, "[ SKIPPED ] "); printf("%s, listed below:\n", FormatTestCount(skipped_test_count).c_str()); PrintSkippedTests(unit_test); } if (!unit_test.Passed()) { PrintFailedTests(unit_test); PrintFailedTestSuites(unit_test); } int num_disabled = unit_test.reportable_disabled_test_count(); if (num_disabled && !GTEST_FLAG_GET(also_run_disabled_tests)) { if (unit_test.Passed()) { printf("\n"); // Add a spacer if no FAILURE banner is displayed. } ColoredPrintf(GTestColor::kYellow, " YOU HAVE %d DISABLED %s\n\n", num_disabled, num_disabled == 1 ? "TEST" : "TESTS"); } // Ensure that Google Test output is printed before, e.g., heapchecker output. fflush(stdout); }
O1
cpp
testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx leaq 0x1fa41(%rip), %rsi # 0x43227 xorl %ebp, %ebp movl $0x2, %edi xorl %eax, %eax callq 0x22582 movq 0x40(%rbx), %rdi callq 0x1cc5a leaq 0x1ea0a(%rip), %rdx # 0x4220e leaq 0x1ee0f(%rip), %rcx # 0x4261a leaq 0x8(%rsp), %rdi movl %eax, %esi callq 0x22db0 movq 0x40(%rbx), %rcx movq 0xb8(%rcx), %rax movq 0xc0(%rcx), %rcx cmpq %rcx, %rax je 0x23842 xorl %ebp, %ebp movq (%rax), %rdx movzbl 0x70(%rdx), %edx addl %edx, %ebp addq $0x8, %rax cmpq %rcx, %rax jne 0x23830 movq 0x8(%rsp), %r14 leaq 0x209fe(%rip), %rdx # 0x4424c leaq 0x20a02(%rip), %rcx # 0x44257 leaq 0x28(%rsp), %rdi movl %ebp, %esi callq 0x22db0 leaq 0x38(%rsp), %r15 movq -0x10(%r15), %rdx leaq 0x1faed(%rip), %rdi # 0x4335e movq %r14, %rsi xorl %eax, %eax callq 0x8080 movq -0x10(%r15), %rdi cmpq %r15, %rdi je 0x23891 movq 0x38(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x18(%rsp), %r15 movq -0x10(%r15), %rdi cmpq %r15, %rdi je 0x238ac movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 cmpb $0x1, 0x35e3e(%rip) # 0x596f1 jne 0x238fb movq 0x40(%rbx), %rax movq 0x2a0(%rax), %rax leaq 0x28(%rsp), %rsi movq %rax, (%rsi) leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x34b04 movq (%r14), %rsi leaq 0x1fa8f(%rip), %rdi # 0x4336e xorl %eax, %eax callq 0x8080 movq (%r14), %rdi cmpq %r15, %rdi je 0x238fb movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movl $0xa, %edi callq 0x8790 leaq 0x1fa71(%rip), %rsi # 0x4337d movl $0x2, %edi xorl %eax, %eax callq 0x22582 movq 0x40(%rbx), %rdi callq 0x1c860 leaq 0x1e8e6(%rip), %rdx # 0x4220e leaq 0x1eceb(%rip), %rcx # 0x4261a leaq 0x8(%rsp), %r14 movq %r14, %rdi movl %eax, %esi callq 0x22db0 movq (%r14), %rsi leaq 0x1f8a5(%rip), %rdi # 0x431ed xorl %eax, %eax callq 0x8080 movq (%r14), %rdi cmpq %r15, %rdi je 0x23964 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x40(%rbx), %rdi callq 0x1c8e6 testl %eax, %eax jle 0x239d1 movl %eax, %ebp leaq 0x1f924(%rip), %rsi # 0x4329e movl $0x2, %edi xorl %eax, %eax callq 0x22582 leaq 0x1e881(%rip), %rdx # 0x4220e leaq 0x1ec86(%rip), %rcx # 0x4261a leaq 0x8(%rsp), %r14 movq %r14, %rdi movl %ebp, %esi callq 0x22db0 movq (%r14), %rsi leaq 0x1f932(%rip), %rdi # 0x432df xorl %eax, %eax callq 0x8080 movq (%r14), %rdi cmpq %r15, %rdi je 0x239c9 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x23648 movq 0x40(%rbx), %rdi callq 0x34b6e testb %al, %al jne 0x239ee movq %rbx, %rdi callq 0x232d6 movq %rbx, %rdi callq 0x23530 movq 0x40(%rbx), %r14 movq %r14, %rdi callq 0x1ca1a testl %eax, %eax je 0x23a49 cmpb $0x0, 0x35c7e(%rip) # 0x59683 jne 0x23a49 movl %eax, %ebx movq %r14, %rdi callq 0x34b6e testb %al, %al je 0x23a1f movl $0xa, %edi callq 0x8790 cmpl $0x1, %ebx leaq 0x1f8df(%rip), %rax # 0x43308 leaq 0x1f8dd(%rip), %rcx # 0x4330d cmoveq %rax, %rcx leaq 0x1f950(%rip), %rsi # 0x4338b movl $0x3, %edi movl %ebx, %edx xorl %eax, %eax callq 0x22582 movq 0x35530(%rip), %rax # 0x58f80 movq (%rax), %rdi callq 0x8600 addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x23a81 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990 nop
_ZN7testing8internal27PrettyUnitTestResultPrinter18OnTestIterationEndERKNS_8UnitTestEi: push rbp push r15 push r14 push rbx sub rsp, 48h mov rbx, rsi lea rsi, asc_43227; "[==========] " xor ebp, ebp mov edi, 2 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl17test_to_run_countEv; testing::internal::UnitTestImpl::test_to_run_count(void) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea rdi, [rsp+68h+var_60]; int mov esi, eax; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rcx, [rbx+40h] mov rax, [rcx+0B8h] mov rcx, [rcx+0C0h] cmp rax, rcx jz short loc_23842 xor ebp, ebp loc_23830: mov rdx, [rax] movzx edx, byte ptr [rdx+70h] add ebp, edx add rax, 8 cmp rax, rcx jnz short loc_23830 loc_23842: mov r14, qword ptr [rsp+68h+var_60] lea rdx, aTestSuite; "test suite" lea rcx, aTestSuites; "test suites" lea rdi, [rsp+68h+var_40]; int mov esi, ebp; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) lea r15, [rsp+68h+var_30] mov rdx, [r15-10h] lea rdi, aSFromSRan; "%s from %s ran." mov rsi, r14 xor eax, eax call _printf mov rdi, [r15-10h]; void * cmp rdi, r15 jz short loc_23891 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_23891: lea r15, [rsp+68h+var_50] mov rdi, [r15-10h]; void * cmp rdi, r15 jz short loc_238AC mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_238AC: cmp cs:_ZN7testing22FLAGS_gtest_print_timeE, 1; testing::FLAGS_gtest_print_time jnz short loc_238FB mov rax, [rbx+40h] mov rax, [rax+2A0h] lea rsi, [rsp+68h+var_40] mov [rsi], rax lea r14, [rsp+68h+var_60] mov rdi, r14 call _ZN7testing8internal18StreamableToStringIlEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<long>(long const&) mov rsi, [r14] lea rdi, aSMsTotal; " (%s ms total)" xor eax, eax call _printf mov rdi, [r14]; void * cmp rdi, r15 jz short loc_238FB mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_238FB: mov edi, 0Ah call _putchar lea rsi, aPassed; "[ PASSED ] " mov edi, 2 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl21successful_test_countEv; testing::internal::UnitTestImpl::successful_test_count(void) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea r14, [rsp+68h+var_60] mov rdi, r14; int mov esi, eax; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rsi, [r14] lea rdi, aNoteThisIsTest+1Fh; "%s.\n" xor eax, eax call _printf mov rdi, [r14]; void * cmp rdi, r15 jz short loc_23964 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_23964: mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl18skipped_test_countEv; testing::internal::UnitTestImpl::skipped_test_count(void) test eax, eax jle short loc_239D1 mov ebp, eax lea rsi, aSkipped_0; "[ SKIPPED ] " mov edi, 2 xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) lea rdx, aDeathtestPasse+36h; int lea rcx, aAlsoRunDisable+12h; int lea r14, [rsp+68h+var_60] mov rdi, r14; int mov esi, ebp; int call _ZN7testingL19FormatCountableNounB5cxx11EiPKcS1_; testing::FormatCountableNoun(int,char const*,char const*) mov rsi, [r14] lea rdi, aSListedBelow; "%s, listed below:\n" xor eax, eax call _printf mov rdi, [r14]; void * cmp rdi, r15 jz short loc_239C9 mov rsi, [rsp+68h+var_50] inc rsi; testing::UnitTest * call __ZdlPvm; operator delete(void *,ulong) loc_239C9: mov rdi, rbx; this call _ZN7testing8internal27PrettyUnitTestResultPrinter17PrintSkippedTestsERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&) loc_239D1: mov rdi, [rbx+40h]; this call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void) test al, al jnz short loc_239EE mov rdi, rbx; this call _ZN7testing8internal27PrettyUnitTestResultPrinter16PrintFailedTestsERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(testing::UnitTest const&) mov rdi, rbx; this call _ZN7testing8internal27PrettyUnitTestResultPrinter21PrintFailedTestSuitesERKNS_8UnitTestE; testing::internal::PrettyUnitTestResultPrinter::PrintFailedTestSuites(testing::UnitTest const&) loc_239EE: mov r14, [rbx+40h] mov rdi, r14; this call _ZNK7testing8internal12UnitTestImpl30reportable_disabled_test_countEv; testing::internal::UnitTestImpl::reportable_disabled_test_count(void) test eax, eax jz short loc_23A49 cmp cs:_ZN7testing35FLAGS_gtest_also_run_disabled_testsE, 0; testing::FLAGS_gtest_also_run_disabled_tests jnz short loc_23A49 mov ebx, eax mov rdi, r14; this call _ZNK7testing8internal12UnitTestImpl6PassedEv; testing::internal::UnitTestImpl::Passed(void) test al, al jz short loc_23A1F mov edi, 0Ah call _putchar loc_23A1F: cmp ebx, 1 lea rax, aTest_0; "TEST" lea rcx, aTests; "TESTS" cmovz rcx, rax lea rsi, aYouHaveDDisabl; " YOU HAVE %d DISABLED %s\n\n" mov edi, 3 mov edx, ebx xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) loc_23A49: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_23A81 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_23A81: mov rdi, rbx call __Unwind_Resume
long long testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd( testing::internal::PrettyUnitTestResultPrinter *this, testing::internal::UnitTestImpl **a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { int v15; // ebp int v16; // eax testing::internal::UnitTestImpl *v17; // rcx long long v18; // rax long long v19; // rcx const char *v20; // r14 long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 int v27; // eax const testing::UnitTest *v28; // rsi int v29; // eax long long v30; // rdx long long v31; // rcx long long v32; // r8 long long v33; // r9 __m128 v34; // xmm4 __m128 v35; // xmm5 int v36; // ebp double v37; // xmm4_8 double v38; // xmm5_8 double v39; // xmm4_8 double v40; // xmm5_8 double v41; // xmm4_8 double v42; // xmm5_8 testing::internal::UnitTestImpl *v43; // r14 unsigned int v44; // eax unsigned int v45; // ebx long long v46; // r8 long long v47; // r9 __m128 v48; // xmm4 __m128 v49; // xmm5 const char *v50; // rcx char v52; // [rsp+0h] [rbp-68h] char v53; // [rsp+0h] [rbp-68h] char v54; // [rsp+0h] [rbp-68h] int v55[2]; // [rsp+8h] [rbp-60h] BYREF _QWORD v56[2]; // [rsp+18h] [rbp-50h] BYREF char *v57; // [rsp+28h] [rbp-40h] BYREF long long v58; // [rsp+38h] [rbp-30h] BYREF v15 = 0; testing::internal::ColoredPrintf( 2, (long long)"[==========] ", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v52); v16 = testing::internal::UnitTestImpl::test_to_run_count(a2[8]); testing::FormatCountableNoun[abi:cxx11]((long long)v55, v16, "test", "tests"); v17 = a2[8]; v18 = *((_QWORD *)v17 + 23); v19 = *((_QWORD *)v17 + 24); if ( v18 != v19 ) { v15 = 0; do { v15 += *(unsigned __int8 *)(*(_QWORD *)v18 + 112LL); v18 += 8LL; } while ( v18 != v19 ); } v20 = *(const char **)v55; testing::FormatCountableNoun[abi:cxx11]((long long)&v57, v15, "test suite", "test suites"); printf("%s from %s ran.", v20, v57); if ( v57 != (char *)&v58 ) operator delete(v57, v58 + 1); if ( *(_QWORD **)v55 != v56 ) operator delete(*(void **)v55, v56[0] + 1LL); if ( testing::FLAGS_gtest_print_time == 1 ) { v57 = (char *)*((_QWORD *)a2[8] + 84); testing::internal::StreamableToString<long>(v55); printf(" (%s ms total)", *(const char **)v55); if ( *(_QWORD **)v55 != v56 ) operator delete(*(void **)v55, v56[0] + 1LL); } putchar(10LL); testing::internal::ColoredPrintf( 2, (long long)"[ PASSED ] ", v21, v22, v23, v24, a7, a8, a9, a10, v25, v26, a13, a14, v53); v27 = testing::internal::UnitTestImpl::successful_test_count(a2[8]); testing::FormatCountableNoun[abi:cxx11]((long long)v55, v27, "test", "tests"); v28 = *(const testing::UnitTest **)v55; printf("%s.\n", *(const char **)v55); if ( *(_QWORD **)v55 != v56 ) { v28 = (const testing::UnitTest *)(v56[0] + 1LL); operator delete(*(void **)v55, v56[0] + 1LL); } v29 = testing::internal::UnitTestImpl::skipped_test_count(a2[8]); if ( v29 > 0 ) { v36 = v29; testing::internal::ColoredPrintf( 2, (long long)"[ SKIPPED ] ", v30, v31, v32, v33, a7, a8, a9, a10, v34, v35, a13, a14, v54); testing::FormatCountableNoun[abi:cxx11]((long long)v55, v36, "test", "tests"); v28 = *(const testing::UnitTest **)v55; printf("%s, listed below:\n", *(const char **)v55); if ( *(_QWORD **)v55 != v56 ) { v28 = (const testing::UnitTest *)(v56[0] + 1LL); operator delete(*(void **)v55, v56[0] + 1LL); } testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(a2, v28, a7, a8, a9, a10, v37, v38, a13, a14); } if ( !(unsigned __int8)testing::internal::UnitTestImpl::Passed(a2[8]) ) { testing::internal::PrettyUnitTestResultPrinter::PrintFailedTests(a2, v28, a7, a8, a9, a10, v39, v40, a13, a14); testing::internal::PrettyUnitTestResultPrinter::PrintFailedTestSuites( (testing::internal::PrettyUnitTestResultPrinter *)a2, v28, a7, a8, a9, a10, v41, v42, a13, a14); } v43 = a2[8]; v44 = testing::internal::UnitTestImpl::reportable_disabled_test_count(v43); if ( v44 && !testing::FLAGS_gtest_also_run_disabled_tests ) { v45 = v44; if ( (unsigned __int8)testing::internal::UnitTestImpl::Passed(v43) ) putchar(10LL); v50 = "TESTS"; if ( v45 == 1 ) v50 = "TEST"; testing::internal::ColoredPrintf( 3, (long long)" YOU HAVE %d DISABLED %s\n\n", v45, (long long)v50, v46, v47, a7, a8, a9, a10, v48, v49, a13, a14, v54); } return fflush(stdout); }
OnTestIterationEnd: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV RBX,RSI LEA RSI,[0x143227] XOR EBP,EBP MOV EDI,0x2 XOR EAX,EAX CALL 0x00122582 MOV RDI,qword ptr [RBX + 0x40] CALL 0x0011cc5a LEA RDX,[0x14220e] LEA RCX,[0x14261a] LEA RDI,[RSP + 0x8] MOV ESI,EAX CALL 0x00122db0 MOV RCX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RCX + 0xb8] MOV RCX,qword ptr [RCX + 0xc0] CMP RAX,RCX JZ 0x00123842 XOR EBP,EBP LAB_00123830: MOV RDX,qword ptr [RAX] MOVZX EDX,byte ptr [RDX + 0x70] ADD EBP,EDX ADD RAX,0x8 CMP RAX,RCX JNZ 0x00123830 LAB_00123842: MOV R14,qword ptr [RSP + 0x8] LAB_00123847: LEA RDX,[0x14424c] LEA RCX,[0x144257] LEA RDI,[RSP + 0x28] MOV ESI,EBP CALL 0x00122db0 LAB_00123861: LEA R15,[RSP + 0x38] MOV RDX,qword ptr [R15 + -0x10] LEA RDI,[0x14335e] MOV RSI,R14 XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R15 + -0x10] CMP RDI,R15 JZ 0x00123891 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001084e0 LAB_00123891: LEA R15,[RSP + 0x18] MOV RDI,qword ptr [R15 + -0x10] CMP RDI,R15 JZ 0x001238ac MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001238ac: CMP byte ptr [0x001596f1],0x1 JNZ 0x001238fb MOV RAX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RAX + 0x2a0] LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RAX LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00134b04 MOV RSI,qword ptr [R14] LEA RDI,[0x14336e] XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x001238fb MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001238fb: MOV EDI,0xa CALL 0x00108790 LEA RSI,[0x14337d] MOV EDI,0x2 XOR EAX,EAX CALL 0x00122582 MOV RDI,qword ptr [RBX + 0x40] CALL 0x0011c860 LEA RDX,[0x14220e] LEA RCX,[0x14261a] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV ESI,EAX CALL 0x00122db0 MOV RSI,qword ptr [R14] LEA RDI,[0x1431ed] XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x00123964 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_00123964: MOV RDI,qword ptr [RBX + 0x40] CALL 0x0011c8e6 TEST EAX,EAX JLE 0x001239d1 MOV EBP,EAX LEA RSI,[0x14329e] MOV EDI,0x2 XOR EAX,EAX CALL 0x00122582 LEA RDX,[0x14220e] LEA RCX,[0x14261a] LEA R14,[RSP + 0x8] MOV RDI,R14 MOV ESI,EBP CALL 0x00122db0 MOV RSI,qword ptr [R14] LEA RDI,[0x1432df] XOR EAX,EAX CALL 0x00108080 MOV RDI,qword ptr [R14] CMP RDI,R15 JZ 0x001239c9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_001239c9: MOV RDI,RBX CALL 0x00123648 LAB_001239d1: MOV RDI,qword ptr [RBX + 0x40] CALL 0x00134b6e TEST AL,AL JNZ 0x001239ee MOV RDI,RBX CALL 0x001232d6 MOV RDI,RBX CALL 0x00123530 LAB_001239ee: MOV R14,qword ptr [RBX + 0x40] MOV RDI,R14 CALL 0x0011ca1a TEST EAX,EAX JZ 0x00123a49 CMP byte ptr [0x00159683],0x0 JNZ 0x00123a49 MOV EBX,EAX MOV RDI,R14 CALL 0x00134b6e TEST AL,AL JZ 0x00123a1f MOV EDI,0xa CALL 0x00108790 LAB_00123a1f: CMP EBX,0x1 LEA RAX,[0x143308] LEA RCX,[0x14330d] CMOVZ RCX,RAX LEA RSI,[0x14338b] MOV EDI,0x3 MOV EDX,EBX XOR EAX,EAX CALL 0x00122582 LAB_00123a49: MOV RAX,qword ptr [0x00158f80] MOV RDI,qword ptr [RAX] CALL 0x00108600 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET
/* testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd(testing::UnitTest const&, int) */ void testing::internal::PrettyUnitTestResultPrinter::OnTestIterationEnd (UnitTest *param_1,int param_2) { long *plVar1; UnitTestImpl *this; long *plVar2; char cVar3; uint uVar4; int iVar5; long *plVar6; char *pcVar7; uint uVar8; int4 in_register_00000034; UnitTest *pUVar9; long *local_60 [2]; long local_50 [2]; long *local_40 [2]; long local_30 [2]; pUVar9 = (UnitTest *)CONCAT44(in_register_00000034,param_2); uVar8 = 0; ColoredPrintf(2,"[==========] "); uVar4 = UnitTestImpl::test_to_run_count(*(UnitTestImpl **)(pUVar9 + 0x40)); FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test"); plVar2 = local_60[0]; plVar6 = *(long **)(*(long *)(pUVar9 + 0x40) + 0xb8); plVar1 = *(long **)(*(long *)(pUVar9 + 0x40) + 0xc0); if (plVar6 != plVar1) { uVar8 = 0; do { uVar8 = uVar8 + *(byte *)(*plVar6 + 0x70); plVar6 = plVar6 + 1; } while (plVar6 != plVar1); } /* try { // try from 00123847 to 00123860 has its CatchHandler @ 00123a63 */ FormatCountableNoun_abi_cxx11_((int)local_40,(char *)(ulong)uVar8,"test suite"); printf("%s from %s ran.",plVar2,local_40[0]); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } if (FLAGS_gtest_print_time == '\x01') { local_40[0] = *(long **)(*(long *)(pUVar9 + 0x40) + 0x2a0); StreamableToString<long>((long *)local_60); printf(" (%s ms total)",local_60[0]); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } } putchar(10); ColoredPrintf(2,"[ PASSED ] "); uVar4 = UnitTestImpl::successful_test_count(*(UnitTestImpl **)(pUVar9 + 0x40)); FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test"); printf("%s.\n",local_60[0]); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } uVar4 = UnitTestImpl::skipped_test_count(*(UnitTestImpl **)(pUVar9 + 0x40)); if (0 < (int)uVar4) { ColoredPrintf(2,"[ SKIPPED ] "); FormatCountableNoun_abi_cxx11_((int)local_60,(char *)(ulong)uVar4,"test"); printf("%s, listed below:\n",local_60[0]); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } PrintSkippedTests(pUVar9); } cVar3 = UnitTestImpl::Passed(*(UnitTestImpl **)(pUVar9 + 0x40)); if (cVar3 == '\0') { PrintFailedTests(pUVar9); PrintFailedTestSuites(pUVar9); } this = *(UnitTestImpl **)(pUVar9 + 0x40); iVar5 = UnitTestImpl::reportable_disabled_test_count(this); if ((iVar5 != 0) && (FLAGS_gtest_also_run_disabled_tests == '\0')) { cVar3 = UnitTestImpl::Passed(this); if (cVar3 != '\0') { putchar(10); } pcVar7 = "TESTS"; if (iVar5 == 1) { pcVar7 = "TEST"; } ColoredPrintf(3," YOU HAVE %d DISABLED %s\n\n",iVar5,pcVar7); } fflush(*(FILE **)PTR_stdout_00158f80); return; }
28,542
psi_rwlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_wrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line); int result= rw_wrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O0
c
psi_rwlock_wrlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1a68a6(%rip), %rax # 0x1cc810 movq (%rax), %rax movq 0x1b0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x1, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x264d0 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x25fc3 leaq 0x1a6860(%rip), %rax # 0x1cc810 movq (%rax), %rax movq 0x1b8(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
psi_rwlock_wrlock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B0h] mov rcx, [rbp+var_8] mov rsi, [rcx+90h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 1 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call my_rw_wrlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_25FC3 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_25FC3: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_rwlock_wrlock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[0] + 54))( v6, *(_QWORD *)(a1 + 144), 1LL, a2, a3); v4 = my_rw_wrlock(v9); if ( v5 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v5, v4); return v4; }
psi_rwlock_wrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x2cc810] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] MOV EDX,0x1 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001264d0 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x00125fc3 LEA RAX,[0x2cc810] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_00125fc3: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_rwlock_wrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; long local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),1,param_2,param_3); uVar1 = my_rw_wrlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
28,543
psi_rwlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_wrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line); int result= rw_wrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O3
c
psi_rwlock_wrlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x2c904d(%rip), %r15 # 0x2ed810 movq (%r15), %rax movq 0x90(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x1 popq %rdx callq *0x1b0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0x25ead movl %eax, %r14d testq %rbx, %rbx je 0x247fc movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1b8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_rwlock_wrlock: 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+90h] lea rdi, [rbp+var_48] push 1 pop rdx call qword ptr [rax+1B0h] mov rbx, rax mov rdi, r14 call my_rw_wrlock mov r14d, eax test rbx, rbx jz short loc_247FC mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1B8h] loc_247FC: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_rwlock_wrlock(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[0] + 54))( v6, *(_QWORD *)(a1 + 144), 1LL, a2, a3); v4 = my_rw_wrlock(a1); if ( v3 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v3, v4); return v4; }
psi_rwlock_wrlock: 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,[0x3ed810] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x90] LEA RDI,[RBP + -0x48] PUSH 0x1 POP RDX CALL qword ptr [RAX + 0x1b0] MOV RBX,RAX MOV RDI,R14 CALL 0x00125ead MOV R14D,EAX TEST RBX,RBX JZ 0x001247fc MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1b8] LAB_001247fc: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_rwlock_wrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),1,param_2,param_3); uVar1 = my_rw_wrlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
28,544
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
monkey531[P]llama/common/json.hpp
reference operator[](size_type idx) { // implicitly convert null value to an empty array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(); assert_invariant(); } // operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // fill up array with null values if given idx is outside range if (idx >= m_data.m_value.array->size()) { #if JSON_DIAGNOSTICS // remember array size & capacity before resizing const auto old_size = m_data.m_value.array->size(); const auto old_capacity = m_data.m_value.array->capacity(); #endif m_data.m_value.array->resize(idx + 1); #if JSON_DIAGNOSTICS if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity)) { // capacity has changed: update all parents set_parents(); } else { // set parent for values added above set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size)); } #endif assert_invariant(); } return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x11b310 testb $0x1, %al jne 0x170a83 jmp 0x170aa3 movq 0x18(%rsp), %rax movb $0x2, (%rax) callq 0xa94c0 movq 0x18(%rsp), %rdi movq %rax, 0x8(%rdi) movl $0x1, %esi callq 0xa90b0 movq 0x18(%rsp), %rdi callq 0xb7ac0 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x170ab7 jmp 0x170b1a movq 0x18(%rsp), %rax movq 0x58(%rsp), %rcx movq %rcx, 0x10(%rsp) movq 0x8(%rax), %rdi callq 0xb8190 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax jb 0x170b02 movq 0x18(%rsp), %rax movq 0x8(%rax), %rdi movq 0x58(%rsp), %rsi addq $0x1, %rsi callq 0x170f60 movq 0x18(%rsp), %rdi movl $0x1, %esi callq 0xa90b0 movq 0x18(%rsp), %rax movq 0x8(%rax), %rdi movq 0x58(%rsp), %rsi callq 0x1631f0 addq $0x68, %rsp retq movb $0x1, 0x23(%rsp) movl $0x20, %edi callq 0x5a710 movq 0x18(%rsp), %rdi movq %rax, 0x8(%rsp) callq 0xbe8b0 movq %rax, 0x30(%rsp) leaq 0xa8a5b(%rip), %rsi # 0x21959f leaq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rdx callq 0x1637f0 jmp 0x170b55 movq 0x18(%rsp), %rcx movq 0x8(%rsp), %rdi movl $0x131, %esi # imm = 0x131 leaq 0x38(%rsp), %rdx callq 0xbe650 jmp 0x170b70 movq 0x8(%rsp), %rdi movb $0x0, 0x23(%rsp) leaq 0x1371f7(%rip), %rsi # 0x2a7d78 leaq -0xb2228(%rip), %rdx # 0xbe960 callq 0x5abb0 jmp 0x170bd6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) jmp 0x170bb7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x38(%rsp), %rdi callq 0x5b6f8 testb $0x1, 0x23(%rsp) jne 0x170bc0 jmp 0x170bca movq 0x8(%rsp), %rdi callq 0x5b0e0 jmp 0x170bcc movq 0x28(%rsp), %rdi callq 0x5ac70 nopw %cs:(%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: sub rsp, 68h mov qword ptr [rsp+68h+var_8], rdi; int mov qword ptr [rsp+68h+var_10], rsi; int mov rdi, qword ptr [rsp+68h+var_8] mov qword ptr [rsp+68h+var_50], rdi; char call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE7is_nullEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_null(void) test al, 1 jnz short loc_170A83 jmp short loc_170AA3 loc_170A83: mov rax, qword ptr [rsp+68h+var_50] mov byte ptr [rax], 2 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJEEEPT_DpOT0_; 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>::create<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>>>() mov rdi, qword ptr [rsp+68h+var_50] mov [rdi+8], rax mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_170AA3: mov rdi, qword ptr [rsp+68h+var_50] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_array(void) xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_170AB7 jmp short loc_170B1A loc_170AB7: mov rax, qword ptr [rsp+68h+var_50] mov rcx, qword ptr [rsp+68h+var_10] mov [rsp+68h+var_58], rcx mov rdi, [rax+8] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::size(void) mov rcx, rax mov rax, [rsp+68h+var_58] cmp rax, rcx jb short loc_170B02 mov rax, qword ptr [rsp+68h+var_50] mov rdi, [rax+8] mov rsi, qword ptr [rsp+68h+var_10] add rsi, 1 call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; 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>>::resize(ulong) mov rdi, qword ptr [rsp+68h+var_50] mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_170B02: mov rax, qword ptr [rsp+68h+var_50] mov rdi, [rax+8] mov rsi, qword ptr [rsp+68h+var_10] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEixEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator[](ulong) add rsp, 68h retn loc_170B1A: mov [rsp+68h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, qword ptr [rsp+68h+var_50] mov [rsp+68h+var_60], rax; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+68h+var_38], rax; int lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+68h+var_30]; int lea rdx, [rsp+68h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) jmp short $+2 loc_170B55: mov rcx, qword ptr [rsp+68h+var_50] mov rdi, [rsp+68h+var_60]; int mov esi, 131h lea rdx, [rsp+68h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_170B70: mov rdi, [rsp+68h+var_60]; void * mov [rsp+68h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // [rsp+8h] [rbp-60h] int v4[2]; // [rsp+30h] [rbp-38h] BYREF int v5[8]; // [rsp+38h] [rbp-30h] BYREF int v6[2]; // [rsp+58h] [rbp-10h] char v7[8]; // [rsp+60h] [rbp-8h] *(_QWORD *)v7 = a1; *(_QWORD *)v6 = a2; if ( nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_null((_BYTE *)a1) ) { *(_BYTE *)a1 = 2; *(_QWORD *)(a1 + 8) = 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>::create<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>>>(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1); } if ( !nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_array((_BYTE *)a1) ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); *(_QWORD *)v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( (long long)v5, (long long)"cannot use operator[] with a numeric argument with ", (nlohmann::json_abi_v3_11_3::detail **)v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 305, (long long)v5, a1); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } if ( *(_QWORD *)v6 >= (unsigned 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>>::size(*(_QWORD **)(a1 + 8)) ) { 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>>::resize( *(_QWORD *)(a1 + 8), *(_QWORD *)v6 + 1LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(a1); } return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator[]( *(_QWORD **)(a1 + 8), *(long long *)v6); }
28,545
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long)
monkey531[P]llama/common/json.hpp
reference operator[](size_type idx) { // implicitly convert null value to an empty array if (is_null()) { m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(); assert_invariant(); } // operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // fill up array with null values if given idx is outside range if (idx >= m_data.m_value.array->size()) { #if JSON_DIAGNOSTICS // remember array size & capacity before resizing const auto old_size = m_data.m_value.array->size(); const auto old_capacity = m_data.m_value.array->capacity(); #endif m_data.m_value.array->resize(idx + 1); #if JSON_DIAGNOSTICS if (JSON_HEDLEY_UNLIKELY(m_data.m_value.array->capacity() != old_capacity)) { // capacity has changed: update all parents set_parents(); } else { // set parent for values added above set_parents(begin() + static_cast<typename iterator::difference_type>(old_size), static_cast<typename iterator::difference_type>(idx + 1 - old_size)); } #endif assert_invariant(); } return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 cmpb $0x0, (%rdi) jne 0xafb1e movb $0x2, (%r14) movl $0x18, %edi callq 0x1b900 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x5cc84 cmpb $0x2, (%r14) jne 0xafb65 movq 0x8(%r14), %rdi movq 0x8(%rdi), %rax subq (%rdi), %rax sarq $0x4, %rax cmpq %rbx, %rax ja 0xafb4e leaq 0x1(%rbx), %rsi callq 0xafdc8 movq %r14, %rdi movl $0x1, %esi callq 0x5cc84 movq 0x8(%r14), %rax shlq $0x4, %rbx addq (%rax), %rbx movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1b480 movq %rax, %rbx movq %r14, %rdi callq 0x634ba leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x4802b(%rip), %rsi # 0xf7bb4 leaq 0x10(%rsp), %rdi callq 0xa6706 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x63262 xorl %ebp, %ebp leaq 0x81354(%rip), %rsi # 0x130f08 leaq -0x505bf(%rip), %rdx # 0x5f5fc movq %rbx, %rdi callq 0x1c040 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xafbe9 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b930 jmp 0xafbe9 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xafbf6 movq %rbx, %rdi callq 0x1b6c0 movq %r14, %rdi callq 0x1c0d0
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov rbx, rsi mov r14, rdi cmp byte ptr [rdi], 0 jnz short loc_AFB1E mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_AFB1E: cmp byte ptr [r14], 2 jnz short loc_AFB65 mov rdi, [r14+8] mov rax, [rdi+8] sub rax, [rdi] sar rax, 4 cmp rax, rbx ja short loc_AFB4E lea rsi, [rbx+1] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE6resizeEm; 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>>::resize(ulong) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_AFB4E: mov rax, [r14+8] shl rbx, 4 add rbx, [rax] mov rax, rbx add rsp, 30h pop rbx pop r14 pop rbp retn loc_AFB65: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AFBE9 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AFBE9 mov r14, rax mov bpl, 1 loc_AFBE9: test bpl, bpl jz short loc_AFBF6 mov rdi, rbx; void * call ___cxa_free_exception loc_AFBF6: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, unsigned long long a2) { long long v3; // rax _QWORD *v4; // rdi nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v7; // [rsp+8h] [rbp-40h] BYREF _QWORD v8[2]; // [rsp+10h] [rbp-38h] BYREF if ( !*(_BYTE *)a1 ) { *(_BYTE *)a1 = 2; v3 = operator new(0x18uLL); *(_OWORD *)v3 = 0LL; *(_QWORD *)(v3 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v3; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( (long long)v8, (long long)"cannot use operator[] with a numeric argument with ", &v7); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 305, v8); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v4 = *(_QWORD **)(a1 + 8); if ( (long long)(v4[1] - *v4) >> 4 <= a2 ) { 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>>::resize( v4, a2 + 1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI CMP byte ptr [RDI],0x0 JNZ 0x001afb1e MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x0011b900 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x0015cc84 LAB_001afb1e: CMP byte ptr [R14],0x2 JNZ 0x001afb65 MOV RDI,qword ptr [R14 + 0x8] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,qword ptr [RDI] SAR RAX,0x4 CMP RAX,RBX JA 0x001afb4e LEA RSI,[RBX + 0x1] CALL 0x001afdc8 MOV RDI,R14 MOV ESI,0x1 CALL 0x0015cc84 LAB_001afb4e: MOV RAX,qword ptr [R14 + 0x8] SHL RBX,0x4 ADD RBX,qword ptr [RAX] MOV RAX,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001afb65: MOV EDI,0x20 CALL 0x0011b480 MOV RBX,RAX MOV RDI,R14 CALL 0x001634ba LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001afb82: LEA RSI,[0x1f7bb4] LEA RDI,[RSP + 0x10] CALL 0x001a6706 MOV BPL,0x1 LAB_001afb96: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x00163262 XOR EBP,EBP LEA RSI,[0x230f08] LEA RDX,[0x15f5fc] MOV RDI,RBX CALL 0x0011c040
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { 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_00; int8 *puVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2; puVar1 = (int8 *)operator_new(0x18); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { this_00 = *(vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> **)(this + 8); if ((ulong)(*(long *)(this_00 + 8) - *(long *)this_00 >> 4) <= param_1) { 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>>> ::resize(this_00,param_1 + 1); assert_invariant(SUB81(this,0)); } return param_1 * 0x10 + **(long **)(this + 8); } uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001afb82 to 001afb92 has its CatchHandler @ 001afbe3 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 001afb96 to 001afbc2 has its CatchHandler @ 001afbc3 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); }
28,546
js_unary_arith_bigint
bluesky950520[P]quickjs/quickjs.c
static int js_unary_arith_bigint(JSContext *ctx, JSValue *pres, OPCodeEnum op, JSValue op1) { bf_t a_s, *r, *a; int ret, v; JSValue res; if (op == OP_plus) { JS_ThrowTypeError(ctx, "BigInt argument with unary +"); JS_FreeValue(ctx, op1); return -1; } res = JS_NewBigInt(ctx); if (JS_IsException(res)) { JS_FreeValue(ctx, op1); return -1; } r = JS_GetBigInt(res); a = JS_ToBigIntFree(ctx, &a_s, op1); // infallible, always a bigint ret = 0; switch(op) { case OP_inc: case OP_dec: v = 2 * (op - OP_dec) - 1; ret = bf_add_si(r, a, v, BF_PREC_INF, BF_RNDZ); break; case OP_plus: ret = bf_set(r, a); break; case OP_neg: ret = bf_set(r, a); bf_neg(r); break; case OP_not: ret = bf_add_si(r, a, 1, BF_PREC_INF, BF_RNDZ); bf_neg(r); break; default: abort(); } JS_FreeBigInt(ctx, a, &a_s); if (unlikely(ret)) { JS_FreeValue(ctx, res); throw_bf_exception(ctx, ret); return -1; } res = JS_CompactBigInt(ctx, res); *pres = res; return 0; }
O0
c
js_unary_arith_bigint: subq $0xc8, %rsp movq %rcx, 0xb0(%rsp) movq %r8, 0xb8(%rsp) movq %rdi, 0xa8(%rsp) movq %rsi, 0xa0(%rsp) movl %edx, 0x9c(%rsp) cmpl $0x8d, 0x9c(%rsp) jne 0x77b68 movq 0xa8(%rsp), %rdi leaq 0x9cda5(%rip), %rsi # 0x1148cf movb $0x0, %al callq 0x335f0 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0xa8(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x29f80 movl $0xffffffff, 0xc4(%rsp) # imm = 0xFFFFFFFF jmp 0x77dba movq 0xa8(%rsp), %rdi callq 0x400c0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x77bd4 movq 0xa8(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x29f80 movl $0xffffffff, 0xc4(%rsp) # imm = 0xFFFFFFFF jmp 0x77dba movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x40140 movq %rax, 0x68(%rsp) movq 0xa8(%rsp), %rdi movq 0xb0(%rsp), %rdx movq 0xb8(%rsp), %rcx leaq 0x70(%rsp), %rsi callq 0x68e30 movq %rax, 0x60(%rsp) movl $0x0, 0x5c(%rsp) movl 0x9c(%rsp), %eax addl $0xffffff74, %eax # imm = 0xFFFFFF74 movl %eax, %ecx movq %rcx, (%rsp) subl $0x9, %eax ja 0x77ced movq (%rsp), %rax leaq 0x9952f(%rip), %rcx # 0x11116c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x9c(%rsp), %eax subl $0x8e, %eax shll %eax subl $0x1, %eax movl %eax, 0x58(%rsp) movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi movslq 0x58(%rsp), %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r8d callq 0xef570 movl %eax, 0x5c(%rsp) jmp 0x77cf2 movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0xec5b0 movl %eax, 0x5c(%rsp) jmp 0x77cf2 movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0xec5b0 movl %eax, 0x5c(%rsp) movq 0x68(%rsp), %rdi callq 0x77dd0 jmp 0x77cf2 movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi movl $0x1, %edx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r8d callq 0xef570 movl %eax, 0x5c(%rsp) movq 0x68(%rsp), %rdi callq 0x77dd0 jmp 0x77cf2 callq 0xe090 movq 0xa8(%rsp), %rdi movq 0x60(%rsp), %rsi leaq 0x70(%rsp), %rdx callq 0x68d90 cmpl $0x0, 0x5c(%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x77d61 movq 0xa8(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x29f80 movq 0xa8(%rsp), %rdi movl 0x5c(%rsp), %esi callq 0x776e0 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movl $0xffffffff, 0xc4(%rsp) # imm = 0xFFFFFFFF jmp 0x77dba movq 0xa8(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x77780 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x50(%rsp) movq 0xa0(%rsp), %rax movq 0x48(%rsp), %rcx movq %rcx, (%rax) movq 0x50(%rsp), %rcx movq %rcx, 0x8(%rax) movl $0x0, 0xc4(%rsp) movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nopl (%rax)
js_unary_arith_bigint: sub rsp, 0C8h mov [rsp+0C8h+var_18], rcx mov [rsp+0C8h+var_10], r8 mov [rsp+0C8h+var_20], rdi mov [rsp+0C8h+var_28], rsi mov [rsp+0C8h+var_2C], edx cmp [rsp+0C8h+var_2C], 8Dh jnz short loc_77B68 mov rdi, [rsp+0C8h+var_20] lea rsi, aBigintArgument; "BigInt argument with unary +" mov al, 0 call JS_ThrowTypeError mov [rsp+0C8h+var_90], rax mov [rsp+0C8h+var_88], rdx mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_18] mov rdx, [rsp+0C8h+var_10] call JS_FreeValue mov [rsp+0C8h+var_4], 0FFFFFFFFh jmp loc_77DBA loc_77B68: mov rdi, [rsp+0C8h+var_20] call JS_NewBigInt mov [rsp+0C8h+var_A0], rax mov [rsp+0C8h+var_98], rdx mov rax, [rsp+0C8h+var_A0] mov [rsp+0C8h+var_80], rax mov rax, [rsp+0C8h+var_98] mov [rsp+0C8h+var_78], rax mov rdi, [rsp+0C8h+var_80] mov rsi, [rsp+0C8h+var_78] call JS_IsException_1 cmp eax, 0 jz short loc_77BD4 mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_18] mov rdx, [rsp+0C8h+var_10] call JS_FreeValue mov [rsp+0C8h+var_4], 0FFFFFFFFh jmp loc_77DBA loc_77BD4: mov rdi, [rsp+0C8h+var_80] mov rsi, [rsp+0C8h+var_78] call JS_GetBigInt mov [rsp+0C8h+var_60], rax mov rdi, [rsp+0C8h+var_20] mov rdx, [rsp+0C8h+var_18] mov rcx, [rsp+0C8h+var_10] lea rsi, [rsp+0C8h+var_58] call JS_ToBigIntFree mov [rsp+0C8h+var_68], rax mov [rsp+0C8h+var_6C], 0 mov eax, [rsp+0C8h+var_2C] add eax, 0FFFFFF74h; switch 10 cases mov ecx, eax mov [rsp+0C8h+var_C8], rcx sub eax, 9 ja def_77C44; jumptable 0000000000077C44 default case, cases 144-148 mov rax, [rsp+0C8h+var_C8] lea rcx, jpt_77C44 movsxd rax, ds:(jpt_77C44 - 11116Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_77C46: mov eax, [rsp+0C8h+var_2C]; jumptable 0000000000077C44 cases 142,143 sub eax, 8Eh shl eax, 1 sub eax, 1 mov [rsp+0C8h+var_70], eax mov rdi, [rsp+0C8h+var_60] mov rsi, [rsp+0C8h+var_68] movsxd rdx, [rsp+0C8h+var_70] mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 1 call bf_add_si mov [rsp+0C8h+var_6C], eax jmp short loc_77CF2 loc_77C85: mov rdi, [rsp+0C8h+var_60]; jumptable 0000000000077C44 case 141 mov rsi, [rsp+0C8h+var_68] call bf_set mov [rsp+0C8h+var_6C], eax jmp short loc_77CF2 loc_77C9A: mov rdi, [rsp+0C8h+var_60]; jumptable 0000000000077C44 case 140 mov rsi, [rsp+0C8h+var_68] call bf_set mov [rsp+0C8h+var_6C], eax mov rdi, [rsp+0C8h+var_60] call bf_neg jmp short loc_77CF2 loc_77CB9: mov rdi, [rsp+0C8h+var_60]; jumptable 0000000000077C44 case 149 mov rsi, [rsp+0C8h+var_68] mov edx, 1 mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 1 call bf_add_si mov [rsp+0C8h+var_6C], eax mov rdi, [rsp+0C8h+var_60] call bf_neg jmp short loc_77CF2 def_77C44: call _abort; jumptable 0000000000077C44 default case, cases 144-148 loc_77CF2: mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_68] lea rdx, [rsp+0C8h+var_58] call JS_FreeBigInt cmp [rsp+0C8h+var_6C], 0 setnz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_77D61 mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] call JS_FreeValue mov rdi, [rsp+0C8h+var_20] mov esi, [rsp+0C8h+var_6C] call throw_bf_exception mov [rsp+0C8h+var_B0], rax mov [rsp+0C8h+var_A8], rdx mov [rsp+0C8h+var_4], 0FFFFFFFFh jmp short loc_77DBA loc_77D61: mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] call JS_CompactBigInt mov [rsp+0C8h+var_C0], rax mov [rsp+0C8h+var_B8], rdx mov rax, [rsp+0C8h+var_C0] mov [rsp+0C8h+var_80], rax mov rax, [rsp+0C8h+var_B8] mov [rsp+0C8h+var_78], rax mov rax, [rsp+0C8h+var_28] mov rcx, [rsp+0C8h+var_80] mov [rax], rcx mov rcx, [rsp+0C8h+var_78] mov [rax+8], rcx mov [rsp+0C8h+var_4], 0 loc_77DBA: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
long long js_unary_arith_bigint( long long a1, long long *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rdx const char *v15; // rdi long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 int v20; // edx long long v21; // rcx long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 long long *v26; // rax long long v27; // rdx char v29; // [rsp+0h] [rbp-C8h] long long v30; // [rsp+8h] [rbp-C0h] _DWORD *v31; // [rsp+28h] [rbp-A0h] long long v32; // [rsp+50h] [rbp-78h] unsigned int v33; // [rsp+5Ch] [rbp-6Ch] long long *v34; // [rsp+60h] [rbp-68h] long long BigInt; // [rsp+68h] [rbp-60h] long long v36[5]; // [rsp+70h] [rbp-58h] BYREF int v37; // [rsp+9Ch] [rbp-2Ch] long long *v38; // [rsp+A0h] [rbp-28h] const char *v39; // [rsp+A8h] [rbp-20h] long long v40; // [rsp+B0h] [rbp-18h] long long v41; // [rsp+B8h] [rbp-10h] v40 = a4; v41 = a5; v39 = (const char *)a1; v38 = a2; v37 = a3; if ( (_DWORD)a3 == 141 ) { JS_ThrowTypeError( (long long)v39, (long long)"BigInt argument with unary +", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v29); JS_FreeValue((long long)v39, v40, v41); return (unsigned int)-1; } else { v31 = JS_NewBigInt((long long)v39); v32 = v14; if ( JS_IsException_1((long long)v31, v14) ) { JS_FreeValue((long long)v39, v40, v41); return (unsigned int)-1; } else { BigInt = JS_GetBigInt((long long)v31); v15 = v39; v34 = (long long *)JS_ToBigIntFree( (long long)v39, (long long)v36, v40, v41, v16, v17, a7, a8, a9, a10, v18, v19, a13, a14); switch ( v37 ) { case 140: v33 = bf_set(BigInt, v34); bf_neg(BigInt); break; case 141: v33 = bf_set(BigInt, v34); break; case 142: case 143: v33 = bf_add_si(BigInt, v34, 2 * (v37 - 142) - 1, 0x3FFFFFFFFFFFFFFFLL, 1LL); break; case 149: v33 = bf_add_si(BigInt, v34, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL); bf_neg(BigInt); break; default: abort(v15); } JS_FreeBigInt((long long)v39, v34, v36); if ( v33 ) { JS_FreeValue((long long)v39, (long long)v31, v32); throw_bf_exception((long long)v39, v33, v20, v21, v22, v23, a7, a8, a9, a10, v24, v25, a13, a14); return (unsigned int)-1; } else { v30 = JS_CompactBigInt((long long)v39, (long long)v31, v32); v26 = v38; *v38 = v30; v26[1] = v27; return 0; } } } }
js_unary_arith_bigint: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb0],RCX MOV qword ptr [RSP + 0xb8],R8 MOV qword ptr [RSP + 0xa8],RDI MOV qword ptr [RSP + 0xa0],RSI MOV dword ptr [RSP + 0x9c],EDX CMP dword ptr [RSP + 0x9c],0x8d JNZ 0x00177b68 MOV RDI,qword ptr [RSP + 0xa8] LEA RSI,[0x2148cf] MOV AL,0x0 CALL 0x001335f0 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x00129f80 MOV dword ptr [RSP + 0xc4],0xffffffff JMP 0x00177dba LAB_00177b68: MOV RDI,qword ptr [RSP + 0xa8] CALL 0x001400c0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x00177bd4 MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x00129f80 MOV dword ptr [RSP + 0xc4],0xffffffff JMP 0x00177dba LAB_00177bd4: MOV RDI,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x50] CALL 0x00140140 MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] MOV RCX,qword ptr [RSP + 0xb8] LEA RSI,[RSP + 0x70] CALL 0x00168e30 MOV qword ptr [RSP + 0x60],RAX MOV dword ptr [RSP + 0x5c],0x0 MOV EAX,dword ptr [RSP + 0x9c] ADD EAX,0xffffff74 MOV ECX,EAX MOV qword ptr [RSP],RCX SUB EAX,0x9 JA 0x00177ced MOV RAX,qword ptr [RSP] LEA RCX,[0x21116c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_8e: MOV EAX,dword ptr [RSP + 0x9c] SUB EAX,0x8e SHL EAX,0x1 SUB EAX,0x1 MOV dword ptr [RSP + 0x58],EAX MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x60] MOVSXD RDX,dword ptr [RSP + 0x58] MOV RCX,0x3fffffffffffffff MOV R8D,0x1 CALL 0x001ef570 MOV dword ptr [RSP + 0x5c],EAX JMP 0x00177cf2 caseD_8d: MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x60] CALL 0x001ec5b0 MOV dword ptr [RSP + 0x5c],EAX JMP 0x00177cf2 caseD_8c: MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x60] CALL 0x001ec5b0 MOV dword ptr [RSP + 0x5c],EAX MOV RDI,qword ptr [RSP + 0x68] CALL 0x00177dd0 JMP 0x00177cf2 caseD_95: MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0x60] MOV EDX,0x1 MOV RCX,0x3fffffffffffffff MOV R8D,0x1 CALL 0x001ef570 MOV dword ptr [RSP + 0x5c],EAX MOV RDI,qword ptr [RSP + 0x68] CALL 0x00177dd0 JMP 0x00177cf2 caseD_90: CALL 0x0010e090 LAB_00177cf2: MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x60] LEA RDX,[RSP + 0x70] CALL 0x00168d90 CMP dword ptr [RSP + 0x5c],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00177d61 MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0xa8] MOV ESI,dword ptr [RSP + 0x5c] CALL 0x001776e0 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV dword ptr [RSP + 0xc4],0xffffffff JMP 0x00177dba LAB_00177d61: MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x00177780 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RSP + 0xc4],0x0 LAB_00177dba: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
int4 js_unary_arith_bigint (int8 param_1,int1 (*param_2) [16],int param_3,int8 param_4, int8 param_5) { int iVar1; int8 uVar2; int8 uVar3; int8 uVar4; int8 uVar5; int1 auVar6 [16]; int local_6c; int1 local_58 [44]; int local_2c; int1 (*local_28) [16]; int8 local_20; int8 local_18; int8 local_10; int4 local_4; local_2c = param_3; local_28 = param_2; local_20 = param_1; local_18 = param_4; local_10 = param_5; if (param_3 == 0x8d) { JS_ThrowTypeError(param_1,"BigInt argument with unary +"); JS_FreeValue(local_20,local_18,local_10); local_4 = 0xffffffff; } else { auVar6 = JS_NewBigInt(param_1); uVar5 = auVar6._8_8_; uVar2 = auVar6._0_8_; iVar1 = JS_IsException(uVar2,uVar5); if (iVar1 == 0) { uVar3 = JS_GetBigInt(uVar2,uVar5); uVar4 = JS_ToBigIntFree(local_20,local_58,local_18,local_10); switch(local_2c) { case 0x8c: local_6c = bf_set(uVar3,uVar4); bf_neg(uVar3); break; case 0x8d: local_6c = bf_set(uVar3,uVar4); break; case 0x8e: case 0x8f: local_6c = bf_add_si(uVar3,uVar4,(long)((local_2c + -0x8e) * 2 + -1),0x3fffffffffffffff,1); break; default: /* WARNING: Subroutine does not return */ abort(); case 0x95: local_6c = bf_add_si(uVar3,uVar4,1,0x3fffffffffffffff,1); bf_neg(uVar3); } JS_FreeBigInt(local_20,uVar4,local_58); if (local_6c == 0) { auVar6 = JS_CompactBigInt(local_20,uVar2,uVar5); *local_28 = auVar6; local_4 = 0; } else { JS_FreeValue(local_20,uVar2,uVar5); throw_bf_exception(local_20,local_6c); local_4 = 0xffffffff; } } else { JS_FreeValue(local_20,local_18,local_10); local_4 = 0xffffffff; } } return local_4; }
28,547
mi_open_keyfile
eloqsql/storage/myisam/mi_open.c
int mi_open_keyfile(MYISAM_SHARE *share) { if ((share->kfile= mysql_file_open(mi_key_file_kfile, share->unique_file_name, share->mode | O_SHARE | O_NOFOLLOW | O_CLOEXEC, MYF(MY_NOSYMLINKS | MY_WME))) < 0) return 1; return 0; }
O3
c
mi_open_keyfile: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdi, %rbx leaq 0xb7f1ec(%rip), %rax # 0xbff9dc movl (%rax), %esi movq 0x258(%rdi), %r15 movl $0xa0000, %r14d # imm = 0xA0000 orl 0x358(%rdi), %r14d leaq 0x305803(%rip), %r13 # 0x386010 movq (%r13), %rax leaq -0x78(%rbp), %rdi leaq -0x30(%rbp), %r12 movl $0x2, %edx movq %r15, %rcx movq %r12, %r8 callq *0x148(%rax) movq %rax, (%r12) testq %rax, %rax jne 0x80863 movl $0x210, %edx # imm = 0x210 movq %r15, %rdi movl %r14d, %esi callq 0xa03b8 movl %eax, %r14d movl %r14d, 0x350(%rbx) shrl $0x1f, %r14d movl %r14d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%r13), %rcx leaq 0x5b490(%rip), %rsi # 0xdbcfe movq %rax, %rdi movl $0x504, %edx # imm = 0x504 callq *0x1f0(%rcx) movl $0x210, %edx # imm = 0x210 movq %r15, %rdi movl %r14d, %esi callq 0xa03b8 movl %eax, %r14d movq (%r13), %rax movq -0x30(%rbp), %rdi movl %r14d, %esi callq *0x200(%rax) jmp 0x80846
mi_open_keyfile: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdi lea rax, mi_key_file_kfile mov esi, [rax] mov r15, [rdi+258h] mov r14d, 0A0000h or r14d, [rdi+358h] lea r13, PSI_server mov rax, [r13+0] lea rdi, [rbp+var_78] lea r12, [rbp+var_30] mov edx, 2 mov rcx, r15 mov r8, r12 call qword ptr [rax+148h] mov [r12], rax test rax, rax jnz short loc_80863 mov edx, 210h mov rdi, r15 mov esi, r14d call my_open mov r14d, eax loc_80846: mov [rbx+350h], r14d shr r14d, 1Fh mov eax, r14d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_80863: mov rcx, [r13+0] lea rsi, aWorkspaceLlm4b_17; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rax mov edx, 504h call qword ptr [rcx+1F0h] mov edx, 210h mov rdi, r15 mov esi, r14d call my_open mov r14d, eax mov rax, [r13+0] mov rdi, [rbp+var_30] mov esi, r14d call qword ptr [rax+200h] jmp short loc_80846
long long mi_open_keyfile(long long a1) { long long v1; // r15 unsigned int v2; // r14d long long v3; // rax long long v4; // r14 _BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF long long v7[6]; // [rsp+50h] [rbp-30h] BYREF v1 = *(_QWORD *)(a1 + 600); v2 = *(_DWORD *)(a1 + 856) | 0xA0000; v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])( v6, mi_key_file_kfile, 2LL, v1, v7); v7[0] = v3; if ( v3 ) { ((void ( *)(long long, const char *, long long))PSI_server[62])( v3, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c", 1284LL); v4 = (unsigned int)my_open(v1, v2, 528LL); ((void ( *)(long long, long long))PSI_server[64])(v7[0], v4); } else { LODWORD(v4) = my_open(v1, v2, 528LL); } *(_DWORD *)(a1 + 848) = v4; return (unsigned int)v4 >> 31; }
mi_open_keyfile: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDI LEA RAX,[0xcff9dc] MOV ESI,dword ptr [RAX] MOV R15,qword ptr [RDI + 0x258] MOV R14D,0xa0000 OR R14D,dword ptr [RDI + 0x358] LEA R13,[0x486010] MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x78] LEA R12,[RBP + -0x30] MOV EDX,0x2 MOV RCX,R15 MOV R8,R12 CALL qword ptr [RAX + 0x148] MOV qword ptr [R12],RAX TEST RAX,RAX JNZ 0x00180863 MOV EDX,0x210 MOV RDI,R15 MOV ESI,R14D CALL 0x001a03b8 MOV R14D,EAX LAB_00180846: MOV dword ptr [RBX + 0x350],R14D SHR R14D,0x1f MOV EAX,R14D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00180863: MOV RCX,qword ptr [R13] LEA RSI,[0x1dbcfe] MOV RDI,RAX MOV EDX,0x504 CALL qword ptr [RCX + 0x1f0] MOV EDX,0x210 MOV RDI,R15 MOV ESI,R14D CALL 0x001a03b8 MOV R14D,EAX MOV RAX,qword ptr [R13] MOV RDI,qword ptr [RBP + -0x30] MOV ESI,R14D CALL qword ptr [RAX + 0x200] JMP 0x00180846
uint mi_open_keyfile(long param_1) { int8 uVar1; uint uVar2; int1 local_80 [72]; long local_38; uVar1 = *(int8 *)(param_1 + 600); uVar2 = *(uint *)(param_1 + 0x358) | 0xa0000; local_38 = (**(code **)(PSI_server + 0x148))(local_80,mi_key_file_kfile,2,uVar1,&local_38); if (local_38 == 0) { uVar2 = my_open(uVar1,uVar2,0x210); } else { (**(code **)(PSI_server + 0x1f0)) (local_38,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_open.c",0x504); uVar2 = my_open(uVar1,uVar2,0x210); (**(code **)(PSI_server + 0x200))(local_38,uVar2); } *(uint *)(param_1 + 0x350) = uVar2; return uVar2 >> 0x1f; }
28,548
JS_ThrowReferenceErrorUninitialized2
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ThrowReferenceErrorUninitialized2(JSContext *ctx, JSFunctionBytecode *b, int idx, BOOL is_ref) { JSAtom atom = JS_ATOM_NULL; if (is_ref) { atom = b->closure_var[idx].var_name; } else { /* not present if the function is stripped and contains no eval() */ if (b->vardefs) atom = b->vardefs[b->arg_count + idx].var_name; } return JS_ThrowReferenceErrorUninitialized(ctx, atom); }
O0
c
JS_ThrowReferenceErrorUninitialized2: subq $0x38, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movl %edx, 0x14(%rsp) movl %ecx, 0x10(%rsp) movl $0x0, 0xc(%rsp) cmpl $0x0, 0x10(%rsp) je 0x6d3bd movq 0x18(%rsp), %rax movq 0x38(%rax), %rax movslq 0x14(%rsp), %rcx movl 0x4(%rax,%rcx,8), %eax movl %eax, 0xc(%rsp) jmp 0x6d3f1 movq 0x18(%rsp), %rax cmpq $0x0, 0x30(%rax) je 0x6d3ef movq 0x18(%rsp), %rax movq 0x30(%rax), %rax movq 0x18(%rsp), %rcx movzwl 0x40(%rcx), %ecx addl 0x14(%rsp), %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %eax movl %eax, 0xc(%rsp) jmp 0x6d3f1 movq 0x20(%rsp), %rdi movl 0xc(%rsp), %esi callq 0x667c0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq 0x30(%rsp), %rdx addq $0x38, %rsp retq nopl (%rax,%rax)
JS_ThrowReferenceErrorUninitialized2: sub rsp, 38h mov [rsp+38h+var_18], rdi mov [rsp+38h+var_20], rsi mov [rsp+38h+var_24], edx mov [rsp+38h+var_28], ecx mov [rsp+38h+var_2C], 0 cmp [rsp+38h+var_28], 0 jz short loc_6D3BD mov rax, [rsp+38h+var_20] mov rax, [rax+38h] movsxd rcx, [rsp+38h+var_24] mov eax, [rax+rcx*8+4] mov [rsp+38h+var_2C], eax jmp short loc_6D3F1 loc_6D3BD: mov rax, [rsp+38h+var_20] cmp qword ptr [rax+30h], 0 jz short loc_6D3EF mov rax, [rsp+38h+var_20] mov rax, [rax+30h] mov rcx, [rsp+38h+var_20] movzx ecx, word ptr [rcx+40h] add ecx, [rsp+38h+var_24] movsxd rcx, ecx shl rcx, 4 add rax, rcx mov eax, [rax] mov [rsp+38h+var_2C], eax loc_6D3EF: jmp short $+2 loc_6D3F1: mov rdi, [rsp+38h+var_18] mov esi, [rsp+38h+var_2C] call JS_ThrowReferenceErrorUninitialized mov [rsp+38h+var_10], rax mov [rsp+38h+var_8], rdx mov rax, [rsp+38h+var_10] mov rdx, [rsp+38h+var_8] add rsp, 38h retn
long long JS_ThrowReferenceErrorUninitialized2( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned int v15; // [rsp+Ch] [rbp-2Ch] v15 = 0; if ( (_DWORD)a4 ) return JS_ThrowReferenceErrorUninitialized( a1, *(_DWORD *)(*(_QWORD *)(a2 + 56) + 8LL * (int)a3 + 4), a7, a8, a9, a10, a11, a12, a13, a14, a3, (int)a3, a5, a6); if ( *(_QWORD *)(a2 + 48) ) { a4 = 16LL * (int)(a3 + *(unsigned __int16 *)(a2 + 64)); v15 = *(_DWORD *)(a4 + *(_QWORD *)(a2 + 48)); } return JS_ThrowReferenceErrorUninitialized(a1, v15, a7, a8, a9, a10, a11, a12, a13, a14, a3, a4, a5, a6); }
JS_ThrowReferenceErrorUninitialized2: SUB RSP,0x38 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV dword ptr [RSP + 0x14],EDX MOV dword ptr [RSP + 0x10],ECX MOV dword ptr [RSP + 0xc],0x0 CMP dword ptr [RSP + 0x10],0x0 JZ 0x0016d3bd MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x38] MOVSXD RCX,dword ptr [RSP + 0x14] MOV EAX,dword ptr [RAX + RCX*0x8 + 0x4] MOV dword ptr [RSP + 0xc],EAX JMP 0x0016d3f1 LAB_0016d3bd: MOV RAX,qword ptr [RSP + 0x18] CMP qword ptr [RAX + 0x30],0x0 JZ 0x0016d3ef MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RSP + 0x18] MOVZX ECX,word ptr [RCX + 0x40] ADD ECX,dword ptr [RSP + 0x14] MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0xc],EAX LAB_0016d3ef: JMP 0x0016d3f1 LAB_0016d3f1: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0xc] CALL 0x001667c0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
int1 [16] JS_ThrowReferenceErrorUninitialized2(int8 param_1,long param_2,int param_3,int param_4) { int1 auVar1 [16]; int4 local_2c; local_2c = 0; if (param_4 == 0) { if (*(long *)(param_2 + 0x30) != 0) { local_2c = *(int4 *) (*(long *)(param_2 + 0x30) + (long)(int)((uint)*(ushort *)(param_2 + 0x40) + param_3) * 0x10); } } else { local_2c = *(int4 *)(*(long *)(param_2 + 0x38) + 4 + (long)param_3 * 8); } auVar1 = JS_ThrowReferenceErrorUninitialized(param_1,local_2c); return auVar1; }
28,549
common_params_sampling::print[abi:cxx11]() const
monkey531[P]llama/common/sampling.cpp
std::string common_params_sampling::print() const { char result[1024]; snprintf(result, sizeof(result), "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", penalty_last_n, penalty_repeat, penalty_freq, penalty_present, dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n, top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, temp, mirostat, mirostat_eta, mirostat_tau); return std::string(result); }
O0
cpp
common_params_sampling::print[abi:cxx11]() const: subq $0x498, %rsp # imm = 0x498 movq %rdi, 0x50(%rsp) movq %rdi, %rax movq %rax, 0x40(%rsp) movq %rdi, 0x490(%rsp) movq %rsi, 0x488(%rsp) movq 0x488(%rsp), %rax movq %rax, 0x48(%rsp) movl 0x34(%rax), %ecx movss 0x38(%rax), %xmm0 cvtss2sd %xmm0, %xmm0 movss 0x3c(%rax), %xmm1 cvtss2sd %xmm1, %xmm1 movss 0x40(%rax), %xmm2 cvtss2sd %xmm2, %xmm2 movss 0x44(%rax), %xmm3 cvtss2sd %xmm3, %xmm3 movss 0x48(%rax), %xmm4 cvtss2sd %xmm4, %xmm4 movl 0x4c(%rax), %r8d movl 0x50(%rax), %r9d movl 0x10(%rax), %edx movss 0x14(%rax), %xmm5 cvtss2sd %xmm5, %xmm5 movss 0x18(%rax), %xmm6 cvtss2sd %xmm6, %xmm6 movss 0x1c(%rax), %xmm7 cvtss2sd %xmm7, %xmm7 movss 0x20(%rax), %xmm8 cvtss2sd %xmm8, %xmm8 movss 0x24(%rax), %xmm9 cvtss2sd %xmm9, %xmm9 movss 0x28(%rax), %xmm10 cvtss2sd %xmm10, %xmm10 movl 0x54(%rax), %esi movss 0x5c(%rax), %xmm11 cvtss2sd %xmm11, %xmm11 movss 0x58(%rax), %xmm12 cvtss2sd %xmm12, %xmm12 movq %rsp, %rax movsd %xmm12, 0x30(%rax) movsd %xmm11, 0x28(%rax) movl %esi, 0x20(%rax) movsd %xmm10, 0x18(%rax) movsd %xmm9, 0x10(%rax) movsd %xmm8, 0x8(%rax) movl %edx, (%rax) leaq 0x53e26(%rip), %rdx # 0x216ad4 leaq 0x80(%rsp), %rdi movq %rdi, 0x58(%rsp) movl $0x400, %esi # imm = 0x400 movb $0x8, %al callq 0x5a910 leaq 0x7f(%rsp), %rdi movq %rdi, 0x60(%rsp) callq 0x5b0f0 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx callq 0x63270 jmp 0x1c2cec leaq 0x7f(%rsp), %rdi callq 0x5b560 movq 0x40(%rsp), %rax addq $0x498, %rsp # imm = 0x498 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) leaq 0x7f(%rsp), %rdi callq 0x5b560 movq 0x70(%rsp), %rdi callq 0x5abf0 nopw %cs:(%rax,%rax)
_ZNK22common_params_sampling5printB5cxx11Ev: sub rsp, 498h mov [rsp+498h+var_448], rdi mov rax, rdi mov [rsp+498h+var_458], rax mov [rsp+498h+var_8], rdi mov [rsp+498h+var_10], rsi mov rax, [rsp+498h+var_10] mov [rsp+498h+var_450], rax mov ecx, [rax+34h] movss xmm0, dword ptr [rax+38h] cvtss2sd xmm0, xmm0 movss xmm1, dword ptr [rax+3Ch] cvtss2sd xmm1, xmm1 movss xmm2, dword ptr [rax+40h] cvtss2sd xmm2, xmm2 movss xmm3, dword ptr [rax+44h] cvtss2sd xmm3, xmm3 movss xmm4, dword ptr [rax+48h] cvtss2sd xmm4, xmm4 mov r8d, [rax+4Ch] mov r9d, [rax+50h] mov edx, [rax+10h] movss xmm5, dword ptr [rax+14h] cvtss2sd xmm5, xmm5 movss xmm6, dword ptr [rax+18h] cvtss2sd xmm6, xmm6 movss xmm7, dword ptr [rax+1Ch] cvtss2sd xmm7, xmm7 movss xmm8, dword ptr [rax+20h] cvtss2sd xmm8, xmm8 movss xmm9, dword ptr [rax+24h] cvtss2sd xmm9, xmm9 movss xmm10, dword ptr [rax+28h] cvtss2sd xmm10, xmm10 mov esi, [rax+54h] movss xmm11, dword ptr [rax+5Ch] cvtss2sd xmm11, xmm11 movss xmm12, dword ptr [rax+58h] cvtss2sd xmm12, xmm12 mov rax, rsp movsd qword ptr [rax+30h], xmm12 movsd qword ptr [rax+28h], xmm11 mov [rax+20h], esi movsd qword ptr [rax+18h], xmm10 movsd qword ptr [rax+10h], xmm9 movsd qword ptr [rax+8], xmm8 mov [rax], edx lea rdx, aRepeatLastNDRe; "\trepeat_last_n = %d, repeat_penalty = "... lea rdi, [rsp+498h+var_418] mov [rsp+498h+var_440], rdi mov esi, 400h mov al, 8 call _snprintf lea rdi, [rsp+498h+var_419] mov [rsp+498h+var_438], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+498h+var_448] mov rsi, [rsp+498h+var_440] mov rdx, [rsp+498h+var_438] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1C2CEC: lea rdi, [rsp+498h+var_419] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rsp+498h+var_458] add rsp, 498h retn mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax lea rdi, [rsp+arg_77] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+arg_68] call __Unwind_Resume
long long common_params_sampling::print[abi:cxx11](long long a1, long long a2) { int v2; // ecx double v3; // xmm0_8 double v4; // xmm1_8 double v5; // xmm2_8 double v6; // xmm3_8 double v7; // xmm4_8 int v8; // r8d int v9; // r9d int v10; // edx double v11; // xmm5_8 double v12; // xmm6_8 double v13; // xmm7_8 double v14; // xmm8_8 double v15; // xmm9_8 double v16; // xmm10_8 int v17; // esi double v18; // xmm11_8 double v20; // [rsp+30h] [rbp-468h] long long v21; // [rsp+40h] [rbp-458h] long long v22; // [rsp+48h] [rbp-450h] long long v23; // [rsp+50h] [rbp-448h] _BYTE *v24; // [rsp+58h] [rbp-440h] char *v25; // [rsp+60h] [rbp-438h] char v26; // [rsp+7Fh] [rbp-419h] BYREF _BYTE v27[1032]; // [rsp+80h] [rbp-418h] BYREF long long v28; // [rsp+488h] [rbp-10h] long long v29; // [rsp+490h] [rbp-8h] v23 = a1; v21 = a1; v29 = a1; v28 = a2; v22 = a2; v2 = *(_DWORD *)(a2 + 52); v3 = *(float *)(a2 + 56); v4 = *(float *)(a2 + 60); v5 = *(float *)(a2 + 64); v6 = *(float *)(a2 + 68); v7 = *(float *)(a2 + 72); v8 = *(_DWORD *)(a2 + 76); v9 = *(_DWORD *)(a2 + 80); v10 = *(_DWORD *)(a2 + 16); v11 = *(float *)(a2 + 20); v12 = *(float *)(a2 + 24); v13 = *(float *)(a2 + 28); v14 = *(float *)(a2 + 32); v15 = *(float *)(a2 + 36); v16 = *(float *)(a2 + 40); v17 = *(_DWORD *)(a2 + 84); v18 = *(float *)(v22 + 92); v20 = *(float *)(v22 + 88); v24 = v27; snprintf( v27, 1024LL, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3" "f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14, v15, v16, v17, v18, v20); v25 = &v26; std::allocator<char>::allocator(&v26, 1024LL); std::string::basic_string<std::allocator<char>>(v23, (long long)v24, (long long)v25); std::allocator<char>::~allocator(&v26); return v21; }
~regex_traits: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] CALL 0x0015b120 POP RAX RET
/* std::__cxx11::regex_traits<char>::~regex_traits() */ regex_traits<char> * __thiscall std::__cxx11::regex_traits<char>::~regex_traits(regex_traits<char> *this) { std::locale::~locale((locale *)this); return this; }
28,550
common_params_sampling::print[abi:cxx11]() const
monkey531[P]llama/common/sampling.cpp
std::string common_params_sampling::print() const { char result[1024]; snprintf(result, sizeof(result), "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", penalty_last_n, penalty_repeat, penalty_freq, penalty_present, dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n, top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, temp, mirostat, mirostat_eta, mirostat_tau); return std::string(result); }
O2
cpp
common_params_sampling::print[abi:cxx11]() const: pushq %r14 pushq %rbx subq $0x448, %rsp # imm = 0x448 movq %rdi, %rbx movl 0x10(%rsi), %eax cvtss2sd 0x38(%rsi), %xmm0 cvtss2sd 0x3c(%rsi), %xmm1 cvtss2sd 0x40(%rsi), %xmm2 cvtss2sd 0x44(%rsi), %xmm3 cvtss2sd 0x48(%rsi), %xmm4 movl 0x34(%rsi), %ecx movl 0x4c(%rsi), %r8d cvtss2sd 0x14(%rsi), %xmm5 cvtss2sd 0x18(%rsi), %xmm6 cvtss2sd 0x1c(%rsi), %xmm7 cvtss2sd 0x20(%rsi), %xmm8 cvtss2sd 0x24(%rsi), %xmm9 movl 0x50(%rsi), %r9d cvtss2sd 0x28(%rsi), %xmm10 movl 0x54(%rsi), %edx cvtss2sd 0x5c(%rsi), %xmm11 cvtss2sd 0x58(%rsi), %xmm12 movsd %xmm12, 0x30(%rsp) movsd %xmm11, 0x28(%rsp) movl %edx, 0x20(%rsp) movsd %xmm10, 0x18(%rsp) movsd %xmm9, 0x10(%rsp) movsd %xmm8, 0x8(%rsp) movl %eax, (%rsp) leaq 0x2195f(%rip), %rdx # 0xb90ec leaq 0x40(%rsp), %r14 movl $0x400, %esi # imm = 0x400 movq %r14, %rdi movb $0x8, %al callq 0x23e30 leaq 0x3f(%rsp), %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x27686 movq %rbx, %rax addq $0x448, %rsp # imm = 0x448 popq %rbx popq %r14 retq
_ZNK22common_params_sampling5printB5cxx11Ev: push r14 push rbx sub rsp, 448h mov rbx, rdi mov eax, [rsi+10h] cvtss2sd xmm0, dword ptr [rsi+38h] cvtss2sd xmm1, dword ptr [rsi+3Ch] cvtss2sd xmm2, dword ptr [rsi+40h] cvtss2sd xmm3, dword ptr [rsi+44h] cvtss2sd xmm4, dword ptr [rsi+48h] mov ecx, [rsi+34h] mov r8d, [rsi+4Ch] cvtss2sd xmm5, dword ptr [rsi+14h] cvtss2sd xmm6, dword ptr [rsi+18h] cvtss2sd xmm7, dword ptr [rsi+1Ch] cvtss2sd xmm8, dword ptr [rsi+20h] cvtss2sd xmm9, dword ptr [rsi+24h] mov r9d, [rsi+50h] cvtss2sd xmm10, dword ptr [rsi+28h] mov edx, [rsi+54h] cvtss2sd xmm11, dword ptr [rsi+5Ch] cvtss2sd xmm12, dword ptr [rsi+58h] movsd [rsp+458h+var_428], xmm12 movsd [rsp+458h+var_430], xmm11 mov [rsp+458h+var_438], edx movsd [rsp+458h+var_440], xmm10 movsd [rsp+458h+var_448], xmm9 movsd [rsp+458h+var_450], xmm8 mov [rsp+458h+var_458], eax lea rdx, aRepeatLastNDRe; "\trepeat_last_n = %d, repeat_penalty = "... lea r14, [rsp+458h+var_418] mov esi, 400h mov rdi, r14 mov al, 8 call _snprintf lea rdx, [rsp+458h+var_419] mov rdi, rbx mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rax, rbx add rsp, 448h pop rbx pop r14 retn
_QWORD * common_params_sampling::print[abi:cxx11](_QWORD *a1, long long a2) { _BYTE v3[1048]; // [rsp+40h] [rbp-418h] BYREF snprintf( v3, 1024LL, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3" "f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", *(_DWORD *)(a2 + 52), *(float *)(a2 + 56), *(float *)(a2 + 60), *(float *)(a2 + 64), *(float *)(a2 + 68), *(float *)(a2 + 72), *(_DWORD *)(a2 + 76), *(_DWORD *)(a2 + 80), *(_DWORD *)(a2 + 16), *(float *)(a2 + 20), *(float *)(a2 + 24), *(float *)(a2 + 28), *(float *)(a2 + 32), *(float *)(a2 + 36), *(float *)(a2 + 40), *(_DWORD *)(a2 + 84), *(float *)(a2 + 92), *(float *)(a2 + 88)); std::string::basic_string<std::allocator<char>>(a1, (long long)v3); return a1; }
print[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x448 MOV RBX,RDI MOV EAX,dword ptr [RSI + 0x10] CVTSS2SD XMM0,dword ptr [RSI + 0x38] CVTSS2SD XMM1,dword ptr [RSI + 0x3c] CVTSS2SD XMM2,dword ptr [RSI + 0x40] CVTSS2SD XMM3,dword ptr [RSI + 0x44] CVTSS2SD XMM4,dword ptr [RSI + 0x48] MOV ECX,dword ptr [RSI + 0x34] MOV R8D,dword ptr [RSI + 0x4c] CVTSS2SD XMM5,dword ptr [RSI + 0x14] CVTSS2SD XMM6,dword ptr [RSI + 0x18] CVTSS2SD XMM7,dword ptr [RSI + 0x1c] CVTSS2SD XMM8,dword ptr [RSI + 0x20] CVTSS2SD XMM9,dword ptr [RSI + 0x24] MOV R9D,dword ptr [RSI + 0x50] CVTSS2SD XMM10,dword ptr [RSI + 0x28] MOV EDX,dword ptr [RSI + 0x54] CVTSS2SD XMM11,dword ptr [RSI + 0x5c] CVTSS2SD XMM12,dword ptr [RSI + 0x58] MOVSD qword ptr [RSP + 0x30],XMM12 MOVSD qword ptr [RSP + 0x28],XMM11 MOV dword ptr [RSP + 0x20],EDX MOVSD qword ptr [RSP + 0x18],XMM10 MOVSD qword ptr [RSP + 0x10],XMM9 MOVSD qword ptr [RSP + 0x8],XMM8 MOV dword ptr [RSP],EAX LEA RDX,[0x1b90ec] LEA R14,[RSP + 0x40] MOV ESI,0x400 MOV RDI,R14 MOV AL,0x8 CALL 0x00123e30 LEA RDX,[RSP + 0x3f] MOV RDI,RBX MOV RSI,R14 CALL 0x00127686 MOV RAX,RBX ADD RSP,0x448 POP RBX POP R14 RET
/* common_params_sampling::print[abi:cxx11]() const */ void common_params_sampling::print_abi_cxx11_(void) { long in_RSI; string *in_RDI; allocator local_419; char local_418 [1032]; snprintf(local_418,0x400, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f" ,(double)*(float *)(in_RSI + 0x38),(double)*(float *)(in_RSI + 0x3c), (double)*(float *)(in_RSI + 0x40),(double)*(float *)(in_RSI + 0x44), (double)*(float *)(in_RSI + 0x48),(double)*(float *)(in_RSI + 0x14), (double)*(float *)(in_RSI + 0x18),(double)*(float *)(in_RSI + 0x1c), (ulong)*(uint *)(in_RSI + 0x34),(ulong)*(uint *)(in_RSI + 0x4c), (ulong)*(uint *)(in_RSI + 0x50),*(int4 *)(in_RSI + 0x10), (double)*(float *)(in_RSI + 0x20),(double)*(float *)(in_RSI + 0x24), (double)*(float *)(in_RSI + 0x28),*(int4 *)(in_RSI + 0x54), (double)*(float *)(in_RSI + 0x5c),(double)*(float *)(in_RSI + 0x58)); std::__cxx11::string::string<std::allocator<char>>(in_RDI,local_418,&local_419); return; }
28,551
common_params_sampling::print[abi:cxx11]() const
monkey531[P]llama/common/sampling.cpp
std::string common_params_sampling::print() const { char result[1024]; snprintf(result, sizeof(result), "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", penalty_last_n, penalty_repeat, penalty_freq, penalty_present, dry_multiplier, dry_base, dry_allowed_length, dry_penalty_last_n, top_k, top_p, min_p, xtc_probability, xtc_threshold, typ_p, temp, mirostat, mirostat_eta, mirostat_tau); return std::string(result); }
O3
cpp
common_params_sampling::print[abi:cxx11]() const: pushq %r14 pushq %rbx subq $0x448, %rsp # imm = 0x448 movq %rdi, %rbx movl 0x10(%rsi), %eax cvtss2sd 0x38(%rsi), %xmm0 cvtss2sd 0x3c(%rsi), %xmm1 cvtss2sd 0x40(%rsi), %xmm2 cvtss2sd 0x44(%rsi), %xmm3 cvtss2sd 0x48(%rsi), %xmm4 movl 0x34(%rsi), %ecx movl 0x4c(%rsi), %r8d cvtss2sd 0x14(%rsi), %xmm5 cvtss2sd 0x18(%rsi), %xmm6 cvtss2sd 0x1c(%rsi), %xmm7 cvtss2sd 0x20(%rsi), %xmm8 cvtss2sd 0x24(%rsi), %xmm9 movl 0x50(%rsi), %r9d cvtss2sd 0x28(%rsi), %xmm10 movl 0x54(%rsi), %edx cvtss2sd 0x5c(%rsi), %xmm11 cvtss2sd 0x58(%rsi), %xmm12 movsd %xmm12, 0x30(%rsp) movsd %xmm11, 0x28(%rsp) movl %edx, 0x20(%rsp) movsd %xmm10, 0x18(%rsp) movsd %xmm9, 0x10(%rsp) movsd %xmm8, 0x8(%rsp) movl %eax, (%rsp) leaq 0x2841f(%rip), %rdx # 0xf5110 leaq 0x40(%rsp), %r14 movl $0x400, %esi # imm = 0x400 movq %r14, %rdi movb $0x8, %al callq 0x1ae10 leaq 0x10(%rbx), %rax movq %rax, (%rbx) movq %r14, %rdi callq 0x1a3f0 leaq (%rsp,%rax), %rdx addq $0x40, %rdx movq %rbx, %rdi movq %r14, %rsi callq 0x21cae movq %rbx, %rax addq $0x448, %rsp # imm = 0x448 popq %rbx popq %r14 retq
_ZNK22common_params_sampling5printB5cxx11Ev: push r14 push rbx sub rsp, 448h mov rbx, rdi mov eax, [rsi+10h] cvtss2sd xmm0, dword ptr [rsi+38h] cvtss2sd xmm1, dword ptr [rsi+3Ch] cvtss2sd xmm2, dword ptr [rsi+40h] cvtss2sd xmm3, dword ptr [rsi+44h] cvtss2sd xmm4, dword ptr [rsi+48h] mov ecx, [rsi+34h] mov r8d, [rsi+4Ch] cvtss2sd xmm5, dword ptr [rsi+14h] cvtss2sd xmm6, dword ptr [rsi+18h] cvtss2sd xmm7, dword ptr [rsi+1Ch] cvtss2sd xmm8, dword ptr [rsi+20h] cvtss2sd xmm9, dword ptr [rsi+24h] mov r9d, [rsi+50h] cvtss2sd xmm10, dword ptr [rsi+28h] mov edx, [rsi+54h] cvtss2sd xmm11, dword ptr [rsi+5Ch] cvtss2sd xmm12, dword ptr [rsi+58h] movsd [rsp+458h+var_428], xmm12 movsd [rsp+458h+var_430], xmm11 mov [rsp+458h+var_438], edx movsd [rsp+458h+var_440], xmm10 movsd [rsp+458h+var_448], xmm9 movsd [rsp+458h+var_450], xmm8 mov [rsp+458h+var_458], eax lea rdx, aRepeatLastNDRe; "\trepeat_last_n = %d, repeat_penalty = "... lea r14, [rsp+458h+var_418] mov esi, 400h mov rdi, r14 mov al, 8 call _snprintf lea rax, [rbx+10h] mov [rbx], rax mov rdi, r14 call _strlen lea rdx, [rsp+rax+458h+var_458] add rdx, 40h ; '@' mov rdi, rbx mov rsi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx add rsp, 448h pop rbx pop r14 retn
_QWORD * common_params_sampling::print[abi:cxx11](_QWORD *a1, long long a2) { long long v2; // rax _BYTE v4[1048]; // [rsp+40h] [rbp-418h] BYREF snprintf( v4, 1024LL, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n" "\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n" "\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3" "f\n" "\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f", *(_DWORD *)(a2 + 52), *(float *)(a2 + 56), *(float *)(a2 + 60), *(float *)(a2 + 64), *(float *)(a2 + 68), *(float *)(a2 + 72), *(_DWORD *)(a2 + 76), *(_DWORD *)(a2 + 80), *(_DWORD *)(a2 + 16), *(float *)(a2 + 20), *(float *)(a2 + 24), *(float *)(a2 + 28), *(float *)(a2 + 32), *(float *)(a2 + 36), *(float *)(a2 + 40), *(_DWORD *)(a2 + 84), *(float *)(a2 + 92), *(float *)(a2 + 88)); *a1 = a1 + 2; v2 = strlen(v4); std::string::_M_construct<char const*>((long long)a1, v4, (long long)&v4[v2]); return a1; }
print[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x448 MOV RBX,RDI MOV EAX,dword ptr [RSI + 0x10] CVTSS2SD XMM0,dword ptr [RSI + 0x38] CVTSS2SD XMM1,dword ptr [RSI + 0x3c] CVTSS2SD XMM2,dword ptr [RSI + 0x40] CVTSS2SD XMM3,dword ptr [RSI + 0x44] CVTSS2SD XMM4,dword ptr [RSI + 0x48] MOV ECX,dword ptr [RSI + 0x34] MOV R8D,dword ptr [RSI + 0x4c] CVTSS2SD XMM5,dword ptr [RSI + 0x14] CVTSS2SD XMM6,dword ptr [RSI + 0x18] CVTSS2SD XMM7,dword ptr [RSI + 0x1c] CVTSS2SD XMM8,dword ptr [RSI + 0x20] CVTSS2SD XMM9,dword ptr [RSI + 0x24] MOV R9D,dword ptr [RSI + 0x50] CVTSS2SD XMM10,dword ptr [RSI + 0x28] MOV EDX,dword ptr [RSI + 0x54] CVTSS2SD XMM11,dword ptr [RSI + 0x5c] CVTSS2SD XMM12,dword ptr [RSI + 0x58] MOVSD qword ptr [RSP + 0x30],XMM12 MOVSD qword ptr [RSP + 0x28],XMM11 MOV dword ptr [RSP + 0x20],EDX MOVSD qword ptr [RSP + 0x18],XMM10 MOVSD qword ptr [RSP + 0x10],XMM9 MOVSD qword ptr [RSP + 0x8],XMM8 MOV dword ptr [RSP],EAX LEA RDX,[0x1f5110] LEA R14,[RSP + 0x40] MOV ESI,0x400 MOV RDI,R14 MOV AL,0x8 CALL 0x0011ae10 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX MOV RDI,R14 CALL 0x0011a3f0 LEA RDX,[RSP + RAX*0x1] ADD RDX,0x40 MOV RDI,RBX MOV RSI,R14 CALL 0x00121cae MOV RAX,RBX ADD RSP,0x448 POP RBX POP R14 RET
/* common_params_sampling::print[abi:cxx11]() const */ void common_params_sampling::print_abi_cxx11_(void) { long in_RSI; long *in_RDI; char local_418 [1032]; snprintf(local_418,0x400, "\trepeat_last_n = %d, repeat_penalty = %.3f, frequency_penalty = %.3f, presence_penalty = %.3f\n\tdry_multiplier = %.3f, dry_base = %.3f, dry_allowed_length = %d, dry_penalty_last_n = %d\n\ttop_k = %d, top_p = %.3f, min_p = %.3f, xtc_probability = %.3f, xtc_threshold = %.3f, typical_p = %.3f, temp = %.3f\n\tmirostat = %d, mirostat_lr = %.3f, mirostat_ent = %.3f" ,(double)*(float *)(in_RSI + 0x38),(double)*(float *)(in_RSI + 0x3c), (double)*(float *)(in_RSI + 0x40),(double)*(float *)(in_RSI + 0x44), (double)*(float *)(in_RSI + 0x48),(double)*(float *)(in_RSI + 0x14), (double)*(float *)(in_RSI + 0x18),(double)*(float *)(in_RSI + 0x1c), (ulong)*(uint *)(in_RSI + 0x34),(ulong)*(uint *)(in_RSI + 0x4c), (ulong)*(uint *)(in_RSI + 0x50),*(int4 *)(in_RSI + 0x10), (double)*(float *)(in_RSI + 0x20),(double)*(float *)(in_RSI + 0x24), (double)*(float *)(in_RSI + 0x28),*(int4 *)(in_RSI + 0x54), (double)*(float *)(in_RSI + 0x5c),(double)*(float *)(in_RSI + 0x58)); *in_RDI = (long)(in_RDI + 2); strlen(local_418); std::__cxx11::string::_M_construct<char_const*>(); return; }
28,552
minja::Parser::parseVarNames[abi:cxx11]()
monkey531[P]llama/common/minja.hpp
std::vector<std::string> parseVarNames() { static std::regex varnames_regex(R"(((?:\w+)(?:[\r\n\s]*,[\r\n\s]*(?:\w+))*)[\r\n\s]*)"); std::vector<std::string> group; if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names"); std::vector<std::string> varnames; std::istringstream iss(group[1]); std::string varname; while (std::getline(iss, varname, ',')) { varnames.push_back(strip(varname)); } return varnames; }
O3
cpp
minja::Parser::parseVarNames[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1e8, %rsp # imm = 0x1E8 movq %rsi, %r14 movq %rdi, %rbx leaq 0xab79c(%rip), %rax # 0x12f1c0 movb (%rax), %al testb %al, %al je 0x83b93 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) leaq 0xab75b(%rip), %rdx # 0x12f1a0 leaq 0x20(%rsp), %rdi movq %r14, %rsi movl $0x1, %ecx callq 0x833c4 leaq 0x20(%rsp), %r14 movaps (%r14), %xmm0 movaps %xmm0, (%rsp) movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) leaq 0x60(%rsp), %rdi xorps %xmm0, %xmm0 movaps %xmm0, (%rdi) xorl %eax, %eax movq %rax, 0x10(%rdi) movaps %xmm0, (%r14) movq %rax, 0x10(%r14) callq 0x2171e movq (%rsp), %r15 movq 0x8(%rsp), %r12 movq %r14, %rdi callq 0x2171e cmpq %r12, %r15 je 0x83bea xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq (%rsp), %rsi addq $0x20, %rsi leaq 0x60(%rsp), %rdi movl $0x8, %edx callq 0x1be90 leaq 0x30(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) leaq 0x50(%rsp), %rbp leaq 0x60(%rsp), %r14 leaq 0x20(%rsp), %r15 leaq 0x40(%rsp), %r12 movq %r14, %rdi movq %r15, %rsi movl $0x2c, %edx callq 0x1c030 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x83b41 movq %r12, %rdi movq %r15, %rsi callq 0x77ccf movq %rbx, %rdi movq %r12, %rsi callq 0x557d6 movq 0x40(%rsp), %rdi cmpq %rbp, %rdi je 0x83af4 movq 0x50(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x83af4 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0x83b58 movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0xaa3e9(%rip), %rsi # 0x12df48 leaq 0x60(%rsp), %rdi callq 0x1bc60 leaq 0xd8(%rsp), %rdi callq 0x1b2b0 movq %rsp, %rdi callq 0x2171e movq %rbx, %rax addq $0x1e8, %rsp # imm = 0x1E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0xab626(%rip), %rdi # 0x12f1c0 callq 0x1bfd0 testl %eax, %eax je 0x83a2e leaq 0xab5f2(%rip), %rdi # 0x12f1a0 leaq 0x6ebf7(%rip), %rsi # 0xf27ac movl $0x10, %edx callq 0x624e4 leaq -0x213de(%rip), %rdi # 0x627e8 leaq 0xab5d3(%rip), %rsi # 0x12f1a0 leaq 0xaacf4(%rip), %rdx # 0x12e8c8 callq 0x1b790 leaq 0xab5e0(%rip), %rdi # 0x12f1c0 callq 0x1b5a0 jmp 0x83a2e movl $0x10, %edi callq 0x1b440 movq %rax, %rbx leaq 0x6ebe0(%rip), %rsi # 0xf27de movq %rax, %rdi callq 0x1b320 movq 0xaa3db(%rip), %rsi # 0x12dfe8 movq 0xaa33c(%rip), %rdx # 0x12df50 movq %rbx, %rdi callq 0x1bef0 movq %rax, %r14 leaq 0xab59a(%rip), %rdi # 0x12f1c0 callq 0x1b590 jmp 0x83cac jmp 0x83c41 movq %rax, %r14 movq %rbx, %rdi callq 0x1b650 jmp 0x83ca4 movq %rax, %r14 jmp 0x83c9c movq %rax, %r14 jmp 0x83ca4 movq %rax, %r14 movq 0x40(%rsp), %rdi cmpq %rbp, %rdi je 0x83c67 movq 0x50(%rsp), %rsi incq %rsi callq 0x1b8b0 jmp 0x83c67 jmp 0x83c64 movq %rax, %r14 movq 0x20(%rsp), %rdi cmpq %r13, %rdi je 0x83c7e movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8b0 movq 0xaa2c3(%rip), %rsi # 0x12df48 leaq 0x60(%rsp), %rdi callq 0x1bc60 leaq 0xd8(%rsp), %rdi callq 0x1b2b0 movq %rbx, %rdi callq 0x2171e movq %rsp, %rdi callq 0x2171e movq %r14, %rdi callq 0x1bf70
_ZN5minja6Parser13parseVarNamesB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1E8h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex mov al, [rax] test al, al jz loc_83B93 loc_83A2E: xorps xmm0, xmm0 movaps xmmword ptr [rsp+218h+var_218], xmm0; int mov qword ptr [rsp+218h+var_208], 0; int lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; int lea rdi, [rsp+218h+var_1F8]; int mov rsi, r14; int mov ecx, 1; int call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) lea r14, [rsp+218h+var_1F8] movaps xmm0, xmmword ptr [r14] movaps xmmword ptr [rsp+218h+var_218], xmm0 mov rax, [r14+10h] mov qword ptr [rsp+218h+var_208], rax lea rdi, [rsp+218h+var_1B8] xorps xmm0, xmm0 movaps xmmword ptr [rdi], xmm0 xor eax, eax mov [rdi+10h], rax movaps xmmword ptr [r14], xmm0 mov [r14+10h], rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov r15, qword ptr [rsp+218h+var_218] mov r12, qword ptr [rsp+218h+var_218+8] mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() cmp r15, r12 jz loc_83BEA xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov rsi, qword ptr [rsp+218h+var_218] add rsi, 20h ; ' ' lea rdi, [rsp+218h+var_1B8] mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea r13, [rsp+218h+var_1E8] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 lea rbp, [rsp+218h+var_1C8] lea r14, [rsp+218h+var_1B8] lea r15, [rsp+218h+var_1F8] lea r12, [rsp+218h+var_1D8] loc_83AF4: mov rdi, r14 mov rsi, r15 mov edx, 2Ch ; ',' call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_83B41 mov rdi, r12 mov rsi, r15 call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::strip(std::string const&) mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+218h+var_1D8]; void * cmp rdi, rbp jz short loc_83AF4 mov rsi, [rsp+218h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_83AF4 loc_83B41: mov rdi, [rsp+218h+var_1F8]; void * cmp rdi, r13 jz short loc_83B58 mov rsi, [rsp+218h+var_1E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_83B58: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+218h+var_140]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 1E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_83B93: lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_83A2E lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rsi, aWRNSRNSWRNS; "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?"... mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_release jmp loc_83A2E loc_83BEA: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aExpectedVariab; "Expected variable names" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_83CAC jmp short loc_83C41 mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_83CA4 mov r14, rax jmp short loc_83C9C loc_83C41: mov r14, rax jmp short loc_83CA4 mov r14, rax mov rdi, [rsp+218h+var_1D8]; void * cmp rdi, rbp jz short loc_83C67 mov rsi, [rsp+218h+var_1C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_83C67 jmp short $+2 loc_83C64: mov r14, rax loc_83C67: mov rdi, [rsp+218h+var_1F8]; void * cmp rdi, r13 jz short loc_83C7E mov rsi, [rsp+218h+var_1E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_83C7E: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+218h+var_140]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_83C9C: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_83CA4: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_83CAC: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseVarNames[abi:cxx11](long long a1, long long a2) { _QWORD *v2; // rax std::runtime_error *exception; // rbx int v5[4]; // [rsp+0h] [rbp-218h] BYREF int v6[2]; // [rsp+10h] [rbp-208h] __int128 v7; // [rsp+20h] [rbp-1F8h] BYREF _QWORD v8[2]; // [rsp+30h] [rbp-1E8h] BYREF void *v9[2]; // [rsp+40h] [rbp-1D8h] BYREF long long v10; // [rsp+50h] [rbp-1C8h] BYREF __int128 v11; // [rsp+60h] [rbp-1B8h] BYREF long long v12; // [rsp+70h] [rbp-1A8h] _BYTE v13[320]; // [rsp+D8h] [rbp-140h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], (long long)"((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]); } minja::Parser::consumeTokenGroups( (long long)&v7, a2, (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], 1u); *(_OWORD *)v5 = v7; *(_QWORD *)v6 = v8[0]; v11 = 0LL; v12 = 0LL; v7 = 0LL; v8[0] = 0LL; std::vector<std::string>::~vector((long long)&v11); std::vector<std::string>::~vector((long long)&v7); if ( *(_QWORD *)v5 == *(_QWORD *)&v5[2] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected variable names"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; std::istringstream::basic_istringstream(&v11, *(_QWORD *)v5 + 32LL, 8LL); *(_QWORD *)&v7 = v8; *((_QWORD *)&v7 + 1) = 0LL; LOBYTE(v8[0]) = 0; while ( 1 ) { v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(&v11, &v7, 44LL); if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 ) break; minja::strip(v9, (long long)&v7); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v9); if ( v9[0] != &v10 ) operator delete(v9[0], v10 + 1); } if ( (_QWORD *)v7 != v8 ) operator delete((void *)v7, v8[0] + 1LL); std::istringstream::~istringstream(&v11, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v13); std::vector<std::string>::~vector((long long)v5); return a1; }
parseVarNames[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1e8 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x22f1c0] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x00183b93 LAB_00183a2e: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_00183a3e: LEA RDX,[0x22f1a0] LEA RDI,[RSP + 0x20] MOV RSI,R14 MOV ECX,0x1 CALL 0x001833c4 LEA R14,[RSP + 0x20] MOVAPS XMM0,xmmword ptr [R14] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LEA RDI,[RSP + 0x60] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI],XMM0 XOR EAX,EAX MOV qword ptr [RDI + 0x10],RAX MOVAPS xmmword ptr [R14],XMM0 MOV qword ptr [R14 + 0x10],RAX CALL 0x0012171e MOV R15,qword ptr [RSP] MOV R12,qword ptr [RSP + 0x8] MOV RDI,R14 CALL 0x0012171e CMP R15,R12 JZ 0x00183bea XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV RSI,qword ptr [RSP] ADD RSI,0x20 LAB_00183abb: LEA RDI,[RSP + 0x60] MOV EDX,0x8 CALL 0x0011be90 LEA R13,[RSP + 0x30] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 LEA RBP,[RSP + 0x50] LEA R14,[RSP + 0x60] LEA R15,[RSP + 0x20] LEA R12,[RSP + 0x40] LAB_00183af4: MOV RDI,R14 MOV RSI,R15 MOV EDX,0x2c CALL 0x0011c030 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x00183b41 LAB_00183b12: MOV RDI,R12 MOV RSI,R15 CALL 0x00177ccf LAB_00183b1d: MOV RDI,RBX MOV RSI,R12 CALL 0x001557d6 MOV RDI,qword ptr [RSP + 0x40] CMP RDI,RBP JZ 0x00183af4 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011b8b0 JMP 0x00183af4 LAB_00183b41: MOV RDI,qword ptr [RSP + 0x20] CMP RDI,R13 JZ 0x00183b58 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011b8b0 LAB_00183b58: MOV RSI,qword ptr [0x0022df48] LEA RDI,[RSP + 0x60] CALL 0x0011bc60 LEA RDI,[RSP + 0xd8] CALL 0x0011b2b0 MOV RDI,RSP CALL 0x0012171e MOV RAX,RBX ADD RSP,0x1e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00183b93: LEA RDI,[0x22f1c0] CALL 0x0011bfd0 TEST EAX,EAX JZ 0x00183a2e LAB_00183ba7: LEA RDI,[0x22f1a0] LEA RSI,[0x1f27ac] MOV EDX,0x10 CALL 0x001624e4 LAB_00183bbf: LEA RDI,[0x1627e8] LEA RSI,[0x22f1a0] LEA RDX,[0x22e8c8] CALL 0x0011b790 LEA RDI,[0x22f1c0] CALL 0x0011b5a0 JMP 0x00183a2e LAB_00183bea: MOV EDI,0x10 CALL 0x0011b440 MOV RBX,RAX LAB_00183bf7: LEA RSI,[0x1f27de] MOV RDI,RAX CALL 0x0011b320 LAB_00183c06: MOV RSI,qword ptr [0x0022dfe8] MOV RDX,qword ptr [0x0022df50] MOV RDI,RBX CALL 0x0011bef0
/* minja::Parser::parseVarNames[abi:cxx11]() */ void minja::Parser::parseVarNames_abi_cxx11_(void) { ulong *puVar1; ulong *puVar2; int iVar3; istream *piVar4; runtime_error *this; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI; ulong *local_218; ulong *puStack_210; ulong local_208; ulong *local_1f8; ulong *puStack_1f0; ulong local_1e8 [2]; long *local_1d8 [2]; long local_1c8 [2]; int8 local_1b8; int8 uStack_1b0; int8 local_1a8; ios_base local_140 [272]; if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 00183ba7 to 00183bbe has its CatchHandler @ 00183c1c */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_, "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); } } local_218 = (ulong *)0x0; puStack_210 = (ulong *)0x0; local_208 = 0; /* try { // try from 00183a3e to 00183a56 has its CatchHandler @ 00183c41 */ consumeTokenGroups(&local_1f8); local_218 = local_1f8; puStack_210 = puStack_1f0; local_208 = local_1e8[0]; local_1b8 = 0; uStack_1b0 = 0; local_1a8 = 0; local_1f8 = (ulong *)0x0; puStack_1f0 = (ulong *)0x0; local_1e8[0] = 0; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1b8); puVar2 = puStack_210; puVar1 = local_218; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_1f8); if (puVar1 != puVar2) { *(int8 *)in_RDI = 0; *(int8 *)(in_RDI + 8) = 0; *(int8 *)(in_RDI + 0x10) = 0; /* try { // try from 00183abb to 00183ac9 has its CatchHandler @ 00183c3c */ std::__cxx11::istringstream::istringstream((istringstream *)&local_1b8,local_218 + 4,8); puStack_1f0 = (ulong *)0x0; local_1e8[0] = local_1e8[0] & 0xffffffffffffff00; local_1f8 = local_1e8; while( true ) { /* try { // try from 00183af4 to 00183b03 has its CatchHandler @ 00183c64 */ piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)&local_1b8,(string *)&local_1f8,','); if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 00183b12 to 00183b1c has its CatchHandler @ 00183c62 */ strip((minja *)local_1d8,(string *)&local_1f8); /* try { // try from 00183b1d to 00183b27 has its CatchHandler @ 00183c46 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1d8); if (local_1d8[0] != local_1c8) { operator_delete(local_1d8[0],local_1c8[0] + 1); } } if (local_1f8 != local_1e8) { operator_delete(local_1f8,local_1e8[0] + 1); } std::__cxx11::istringstream::~istringstream((istringstream *)&local_1b8); std::ios_base::~ios_base(local_140); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_218); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00183bf7 to 00183c05 has its CatchHandler @ 00183c2f */ std::runtime_error::runtime_error(this,"Expected variable names"); /* try { // try from 00183c06 to 00183c1b has its CatchHandler @ 00183c2d */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022dfe8,PTR__runtime_error_0022df50); }
28,553
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
monkey531[P]llama/common/json.hpp
const_reference operator[](const typename object_t::key_type& key) const { // const operator[] only works for objects if (JSON_HEDLEY_LIKELY(is_object())) { auto it = m_data.m_value.object->find(key); JSON_ASSERT(it != m_data.m_value.object->end()); return it->second; } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0x7f09c movq 0x8(%r14), %rdi callq 0x7f140 movq 0x8(%r14), %rcx cmpq 0x8(%rcx), %rax je 0x7f0f8 addq $0x20, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x23450 movq %rax, %rbx movq %r14, %rdi callq 0x43bae leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x361d6(%rip), %rsi # 0xb5294 leaq 0x10(%rsp), %rdi callq 0x7ee2f movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x63b70 xorl %ebp, %ebp leaq 0x7ce5f(%rip), %rsi # 0xfbf48 leaq -0x3e9b2(%rip), %rdx # 0x4073e movq %rbx, %rdi callq 0x23ea0 leaq 0x31003(%rip), %rdi # 0xb0102 leaq 0x31046(%rip), %rdx # 0xb014c leaq 0x361ba(%rip), %rcx # 0xb52c7 movl $0x53ca, %esi # imm = 0x53CA xorl %eax, %eax callq 0x23e50 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x24158 testb %bpl, %bpl jne 0x7f130 jmp 0x7f138 movq %rax, %r14 movq %rbx, %rdi callq 0x23670 movq %r14, %rdi callq 0x23f20
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_7F09C mov rdi, [r14+8] call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE4findERSH_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::find(std::string const&) mov rcx, [r14+8] cmp rax, [rcx+8] jz short loc_7F0F8 add rax, 20h ; ' ' add rsp, 30h pop rbx pop r14 pop rbp retn loc_7F09C: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_7F0F8: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aItMDataMValueO; "it != m_data.m_value.object->end()" mov esi, 53CAh 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_7F130 jmp short loc_7F138 mov r14, rax loc_7F130: mov rdi, rbx; void * call ___cxa_free_exception loc_7F138: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1) { void *v1; // rbx char v2; // bp long long v3; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx long long v6; // r14 const char *v7; // [rsp+8h] [rbp-40h] BYREF _BYTE v8[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v7 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>( (long long)v8, (long long)"cannot use operator[] with a string argument with ", &v7); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, (long long)v8); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v3 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::find(*(_QWORD *)(a1 + 8)); if ( v3 == *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL) ) { v6 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 21450LL, "GGML_ASSERT(%s) failed", "it != m_data.m_value.object->end()"); std::string::~string(v8); if ( v2 ) __cxa_free_exception(v1); _Unwind_Resume(v6); } return v3 + 32; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0017f09c MOV RDI,qword ptr [R14 + 0x8] CALL 0x0017f140 MOV RCX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [RCX + 0x8] JZ 0x0017f0f8 ADD RAX,0x20 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0017f09c: PUSH 0x20 POP RDI CALL 0x00123450 MOV RBX,RAX MOV RDI,R14 CALL 0x00143bae LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017f0b7: LEA RSI,[0x1b5294] LEA RDI,[RSP + 0x10] CALL 0x0017ee2f MOV BPL,0x1 LAB_0017f0cb: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x00163b70 XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x14073e] MOV RDI,RBX CALL 0x00123ea0 LAB_0017f0f8: LEA RDI,[0x1b0102] LEA RDX,[0x1b014c] LEA RCX,[0x1b52c7] MOV ESI,0x53ca XOR EAX,EAX CALL 0x00123e50
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](std::__cxx11::string const&) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,string *param_1) { long lVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0017f0b7 to 0017f0c7 has its CatchHandler @ 0017f12d */ detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> (local_38,"cannot use operator[] with a string argument with ",&local_40); /* try { // try from 0017f0cb to 0017f0f7 has its CatchHandler @ 0017f119 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar2,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } lVar1 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::find(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); if (lVar1 != *(long *)(*(long *)(this + 8) + 8)) { return lVar1 + 0x20; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x53ca, "GGML_ASSERT(%s) failed","it != m_data.m_value.object->end()"); }
28,554
my_caseup_utf32
eloqsql/strings/ctype-ucs2.c
static size_t my_caseup_utf32(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= my_utf32_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0) { my_toupper_utf32(uni_plane, &wc); if (res != my_uni_utf32(cs, wc, (uchar*) dst, (uchar*) dstend)) break; src+= res; dst+= res; } return srclen; }
O3
c
my_caseup_utf32: movq %rdx, %rax cmpq $0x4, %rdx jl 0xc5e91 pushq %rbp movq %rsp, %rbp pushq %rbx leaq (%rsi,%rax), %rdx addq %rcx, %r8 movq 0x78(%rdi), %rdi addq $0x4, %rcx movzbl (%rsi), %r9d shll $0x18, %r9d movzbl 0x1(%rsi), %r10d shll $0x10, %r10d orl %r9d, %r10d cmpl $0x10ffff, %r10d # imm = 0x10FFFF ja 0xc5e8f movzbl 0x2(%rsi), %ebx shll $0x8, %ebx movzbl 0x3(%rsi), %r9d orq %r9, %rbx orq %r10, %rbx cmpq (%rdi), %rbx ja 0xc5e50 movq 0x8(%rdi), %r10 movl %ebx, %r11d shrl $0x8, %r11d movq (%r10,%r11,8), %r10 testq %r10, %r10 je 0xc5e50 leaq (%r9,%r9,2), %r9 movl (%r10,%r9,4), %ebx cmpq %r8, %rcx ja 0xc5e8f cmpl $0x10ffff, %ebx # imm = 0x10FFFF ja 0xc5e8f movb $0x0, -0x4(%rcx) movl %ebx, %r9d shrl $0x10, %r9d movb %r9b, -0x3(%rcx) movb %bh, -0x2(%rcx) movb %bl, -0x1(%rcx) leaq 0x4(%rsi), %r9 cmpq %rdx, %r9 jae 0xc5e8f addq $0x8, %rsi addq $0x4, %rcx cmpq %rdx, %rsi movq %r9, %rsi jbe 0xc5e00 popq %rbx popq %rbp retq
my_caseup_utf32: mov rax, rdx cmp rdx, 4 jl locret_C5E91 push rbp mov rbp, rsp push rbx lea rdx, [rsi+rax] add r8, rcx mov rdi, [rdi+78h] add rcx, 4 loc_C5E00: movzx r9d, byte ptr [rsi] shl r9d, 18h movzx r10d, byte ptr [rsi+1] shl r10d, 10h or r10d, r9d cmp r10d, offset unk_10FFFF ja short loc_C5E8F movzx ebx, byte ptr [rsi+2] shl ebx, 8 movzx r9d, byte ptr [rsi+3] or rbx, r9 or rbx, r10 cmp rbx, [rdi] ja short loc_C5E50 mov r10, [rdi+8] mov r11d, ebx shr r11d, 8 mov r10, [r10+r11*8] test r10, r10 jz short loc_C5E50 lea r9, [r9+r9*2] mov ebx, [r10+r9*4] loc_C5E50: cmp rcx, r8 ja short loc_C5E8F cmp ebx, offset unk_10FFFF ja short loc_C5E8F mov byte ptr [rcx-4], 0 mov r9d, ebx shr r9d, 10h mov [rcx-3], r9b mov [rcx-2], bh mov [rcx-1], bl lea r9, [rsi+4] cmp r9, rdx jnb short loc_C5E8F add rsi, 8 add rcx, 4 cmp rsi, rdx mov rsi, r9 jbe loc_C5E00 loc_C5E8F: pop rbx pop rbp locret_C5E91: retn
long long my_caseup_utf32(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5) { long long result; // rax unsigned long long v6; // rdx unsigned long long v7; // r8 unsigned long long *v8; // rdi unsigned long long v9; // rcx long long v10; // r10 long long v11; // r9 unsigned long long v12; // rbx long long v13; // r10 bool v14; // cc result = a3; if ( a3 >= 4 ) { v6 = (unsigned long long)&a2[a3]; v7 = a4 + a5; v8 = *(unsigned long long **)(a1 + 120); v9 = a4 + 4; do { v10 = (*a2 << 24) | (a2[1] << 16); if ( (unsigned int)v10 > (unsigned int)&unk_10FFFF ) break; v11 = a2[3]; v12 = v10 | v11 | (a2[2] << 8); if ( v12 <= *v8 ) { v13 = *(_QWORD *)(v8[1] + 8LL * ((unsigned int)v12 >> 8)); if ( v13 ) LODWORD(v12) = *(_DWORD *)(v13 + 12 * v11); } if ( v9 > v7 ) break; if ( (unsigned int)v12 > (unsigned int)&unk_10FFFF ) break; *(_BYTE *)(v9 - 4) = 0; *(_BYTE *)(v9 - 3) = BYTE2(v12); *(_BYTE *)(v9 - 2) = BYTE1(v12); *(_BYTE *)(v9 - 1) = v12; if ( (unsigned long long)(a2 + 4) >= v6 ) break; v9 += 4LL; v14 = (unsigned long long)(a2 + 8) <= v6; a2 += 4; } while ( v14 ); } return result; }
my_caseup_utf32: MOV RAX,RDX CMP RDX,0x4 JL 0x001c5e91 PUSH RBP MOV RBP,RSP PUSH RBX LEA RDX,[RSI + RAX*0x1] ADD R8,RCX MOV RDI,qword ptr [RDI + 0x78] ADD RCX,0x4 LAB_001c5e00: MOVZX R9D,byte ptr [RSI] SHL R9D,0x18 MOVZX R10D,byte ptr [RSI + 0x1] SHL R10D,0x10 OR R10D,R9D CMP R10D,0x10ffff JA 0x001c5e8f MOVZX EBX,byte ptr [RSI + 0x2] SHL EBX,0x8 MOVZX R9D,byte ptr [RSI + 0x3] OR RBX,R9 OR RBX,R10 CMP RBX,qword ptr [RDI] JA 0x001c5e50 MOV R10,qword ptr [RDI + 0x8] MOV R11D,EBX SHR R11D,0x8 MOV R10,qword ptr [R10 + R11*0x8] TEST R10,R10 JZ 0x001c5e50 LEA R9,[R9 + R9*0x2] MOV EBX,dword ptr [R10 + R9*0x4] LAB_001c5e50: CMP RCX,R8 JA 0x001c5e8f CMP EBX,0x10ffff JA 0x001c5e8f MOV byte ptr [RCX + -0x4],0x0 MOV R9D,EBX SHR R9D,0x10 MOV byte ptr [RCX + -0x3],R9B MOV byte ptr [RCX + -0x2],BH MOV byte ptr [RCX + -0x1],BL LEA R9,[RSI + 0x4] CMP R9,RDX JNC 0x001c5e8f ADD RSI,0x8 ADD RCX,0x4 CMP RSI,RDX MOV RSI,R9 JBE 0x001c5e00 LAB_001c5e8f: POP RBX POP RBP LAB_001c5e91: RET
void my_caseup_utf32(long param_1,byte *param_2,long param_3,long param_4,long param_5) { ulong *puVar1; long lVar2; ulong uVar3; ulong uVar4; byte *pbVar5; byte *pbVar6; uint uVar7; if (3 < param_3) { puVar1 = *(ulong **)(param_1 + 0x78); uVar3 = param_4 + 4; pbVar5 = param_2; while (uVar7 = (uint)pbVar5[1] << 0x10 | (uint)*pbVar5 << 0x18, uVar7 < 0x110000) { uVar4 = (ulong)CONCAT11(pbVar5[2],pbVar5[3]) | (ulong)uVar7; if ((uVar4 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (uVar4 >> 8) * 8), lVar2 != 0)) { uVar4 = (ulong)*(uint *)(lVar2 + (ulong)pbVar5[3] * 0xc); } if ((ulong)(param_5 + param_4) < uVar3) { return; } if (0x10ffff < (uint)uVar4) { return; } *(int1 *)(uVar3 - 4) = 0; *(char *)(uVar3 - 3) = (char)(uVar4 >> 0x10); *(char *)(uVar3 - 2) = (char)(uVar4 >> 8); *(char *)(uVar3 - 1) = (char)uVar4; if (param_2 + param_3 <= pbVar5 + 4) { return; } pbVar6 = pbVar5 + 8; uVar3 = uVar3 + 4; pbVar5 = pbVar5 + 4; if (param_2 + param_3 < pbVar6) { return; } } } return; }
28,555
ma_field_extension_deep_dup
eloqsql/libmariadb/libmariadb/mariadb_lib.c
MA_FIELD_EXTENSION *ma_field_extension_deep_dup(MA_MEM_ROOT *memroot, const MA_FIELD_EXTENSION *from) { MA_FIELD_EXTENSION *ext= new_ma_field_extension(memroot); uint i; if (!ext) return NULL; for (i= 0; i < MARIADB_FIELD_ATTR_LAST; i++) { if (from->metadata[i].str) ext->metadata[i]= ma_const_string_copy_root(memroot, from->metadata[i].str, from->metadata[i].length); } return ext; }
O0
c
ma_field_extension_deep_dup: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x1af10 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x1af81 movq $0x0, -0x8(%rbp) jmp 0x1b01a movl $0x0, -0x24(%rbp) cmpl $0x1, -0x24(%rbp) jae 0x1b012 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax cmpq $0x0, (%rax) je 0x1b002 movq -0x20(%rbp), %rax movl -0x24(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rsi movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rdx callq 0x1b030 movq %rax, %rcx movq -0x40(%rbp), %rax movq %rcx, -0x38(%rbp) movq %rdx, -0x30(%rbp) movq -0x38(%rbp), %rcx movq %rcx, (%rax) movq -0x30(%rbp), %rcx movq %rcx, 0x8(%rax) jmp 0x1b004 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x1af88 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_field_extension_deep_dup: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] call new_ma_field_extension mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_1AF81 mov [rbp+var_8], 0 jmp loc_1B01A loc_1AF81: mov [rbp+var_24], 0 loc_1AF88: cmp [rbp+var_24], 1 jnb loc_1B012 mov rax, [rbp+var_18] mov ecx, [rbp+var_24] shl rcx, 4 add rax, rcx cmp qword ptr [rax], 0 jz short loc_1B002 mov rax, [rbp+var_20] mov ecx, [rbp+var_24] shl rcx, 4 add rax, rcx mov [rbp+var_40], rax mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov ecx, [rbp+var_24] shl rcx, 4 add rax, rcx mov rsi, [rax] mov rax, [rbp+var_18] mov ecx, [rbp+var_24] shl rcx, 4 add rax, rcx mov rdx, [rax+8] call ma_const_string_copy_root mov rcx, rax mov rax, [rbp+var_40] mov [rbp+var_38], rcx mov [rbp+var_30], rdx mov rcx, [rbp+var_38] mov [rax], rcx mov rcx, [rbp+var_30] mov [rax+8], rcx loc_1B002: jmp short $+2 loc_1B004: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_1AF88 loc_1B012: mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_1B01A: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
_QWORD * ma_field_extension_deep_dup(long long a1, _QWORD *a2) { long long v2; // rdx int i; // [rsp+1Ch] [rbp-24h] _QWORD *v5; // [rsp+20h] [rbp-20h] v5 = (_QWORD *)new_ma_field_extension(a1); if ( !v5 ) return 0LL; for ( i = 0; !i; i = 1 ) { if ( *a2 ) { *v5 = ma_const_string_copy_root(a1, *a2, a2[1]); v5[1] = v2; } } return v5; }
ma_field_extension_deep_dup: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x0011af10 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0011af81 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011b01a LAB_0011af81: MOV dword ptr [RBP + -0x24],0x0 LAB_0011af88: CMP dword ptr [RBP + -0x24],0x1 JNC 0x0011b012 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] SHL RCX,0x4 ADD RAX,RCX CMP qword ptr [RAX],0x0 JZ 0x0011b002 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] SHL RCX,0x4 ADD RAX,RCX MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] SHL RCX,0x4 ADD RAX,RCX MOV RDX,qword ptr [RAX + 0x8] CALL 0x0011b030 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x38],RCX MOV qword ptr [RBP + -0x30],RDX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x8],RCX LAB_0011b002: JMP 0x0011b004 LAB_0011b004: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0011af88 LAB_0011b012: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_0011b01a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int1 (*) [16] ma_field_extension_deep_dup(int8 param_1,long *param_2) { bool bVar1; int1 auVar2 [16]; int1 (*local_10) [16]; local_10 = (int1 (*) [16])new_ma_field_extension(param_1); if (local_10 == (int1 (*) [16])0x0) { local_10 = (int1 (*) [16])0x0; } else { bVar1 = false; while (!bVar1) { if (*param_2 != 0) { auVar2 = ma_const_string_copy_root(param_1,*param_2,param_2[1]); *local_10 = auVar2; } bVar1 = true; } } return local_10; }
28,556
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::promoteCubicEdgePointsToQuartic(Matrix & matrix, Weight * rowWeights, int * columnMask) const { // // Re-assign all regular edge-point weights with quartic coefficients, // so only perform general combinations for the irregular case. // REAL const onBoundaryWeights[3] = { 16, 7, 1 }; REAL const regBoundaryWeights[5] = { 13, 3, 3, 4, 1 }; REAL const regInteriorWeights[7] = { 12, 4, 3, 1, 0, 1, 3 }; REAL const oneOver24 = (REAL) (1.0 / 24.0); for (int cIndex = 0; cIndex < 3; ++cIndex) { CornerTopology const & corner = _corners[cIndex]; // // Ordering of weight values for symmetric ep and em is the same, so // we can re-assign in a loop of 2 for {ep, em} // Point P(matrix, 5 * cIndex); for (int ePair = 0; ePair < 2; ++ePair) { Point E(matrix, 5 * cIndex + 1 + ePair); REAL const * weightsToReassign = 0; bool eOnBoundary = ePair ? corner.emOnBoundary : corner.epOnBoundary; if (eOnBoundary && !corner.isSharp) { assert(E.GetSize() == 3); weightsToReassign = onBoundaryWeights; } else if (corner.isRegular) { if (corner.isBoundary) { assert(E.GetSize() == 5); weightsToReassign = regBoundaryWeights; } else { assert(E.GetSize() == 7); weightsToReassign = regInteriorWeights; } } if (weightsToReassign) { for (int i = 0; i < E.GetSize(); ++i) { E.SetWeight(i, weightsToReassign[i] * oneOver24); } } else { _combineSparsePointsInFullRow(E, (REAL)0.25f, P, (REAL)0.75f, E, _numSourcePoints, rowWeights, columnMask); } } } }
O1
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %rcx, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq %rsi, %r15 movq %rdi, %r12 movapd 0x5a0d1(%rip), %xmm0 # 0xb68e0 leaq 0x50(%rsp), %rcx movapd %xmm0, (%rcx) movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 movq %rax, 0x10(%rcx) xorpd %xmm0, %xmm0 leaq 0x70(%rsp), %rsi movapd %xmm0, (%rsi) movapd %xmm0, 0x10(%rsi) movabsq $0x402a000000000000, %rcx # imm = 0x402A000000000000 movq %rcx, (%rsi) movabsq $0x4008000000000000, %rcx # imm = 0x4008000000000000 movq %rcx, 0x8(%rsi) movq %rcx, 0x10(%rsi) movabsq $0x4010000000000000, %rdx # imm = 0x4010000000000000 movq %rdx, 0x18(%rsi) movq %rax, 0x20(%rsi) leaq 0xa0(%rsp), %rdi movapd %xmm0, (%rdi) movapd %xmm0, 0x10(%rdi) movapd %xmm0, 0x20(%rdi) movabsq $0x4028000000000000, %rsi # imm = 0x4028000000000000 movq %rsi, (%rdi) movq %rdx, 0x8(%rdi) movq %rcx, 0x10(%rdi) movq %rax, 0x18(%rdi) movq %rax, 0x28(%rdi) movq %rcx, 0x30(%rdi) leaq 0x18(%r12), %rax movq %rax, (%rsp) xorl %eax, %eax leaq 0x20(%rsp), %rbp movsd 0x59678(%rip), %xmm1 # 0xb5f30 imulq $0xb0, %rax, %r13 movq %rax, 0x8(%rsp) leaq (%rax,%rax,4), %rbx movq 0x10(%r15), %rax movl 0x4(%rax,%rbx,4), %ecx movslq (%rax,%rbx,4), %rax subl %eax, %ecx movl %ecx, 0x38(%rsp) leaq (,%rax,4), %rcx addq 0x28(%r15), %rcx movq %rcx, 0x40(%rsp) shlq $0x3, %rax addq 0x40(%r15), %rax addq (%rsp), %r13 movq %rax, 0x48(%rsp) shlq $0x2, %rbx xorl %r14d, %r14d movq 0x10(%r15), %rax addq %rbx, %rax movl 0x8(%rax,%r14,4), %ecx movslq 0x4(%rax,%r14,4), %rax subl %eax, %ecx movl %ecx, 0x20(%rsp) leaq (,%rax,4), %rdx addq 0x28(%r15), %rdx movq %rdx, 0x28(%rsp) shlq $0x3, %rax addq 0x40(%r15), %rax movq %rax, 0x30(%rsp) xorl %edx, %edx testq %r14, %r14 setne %dl shll $0x6, %edx addl $0x40, %edx testw %dx, (%r13) je 0x5c963 testb $0x2, (%r13) jne 0x5c963 leaq 0x50(%rsp), %rdx cmpl $0x3, %ecx je 0x5c996 jmp 0x5ca25 movzwl (%r13), %edx testb $0x8, %dl jne 0x5c971 xorl %edx, %edx jmp 0x5c996 testb $0x1, %dl jne 0x5c988 leaq 0xa0(%rsp), %rdx cmpl $0x7, %ecx je 0x5c996 jmp 0x5ca63 leaq 0x70(%rsp), %rdx cmpl $0x5, %ecx jne 0x5ca44 testq %rdx, %rdx je 0x5c9bb testl %ecx, %ecx jle 0x5c9f1 movl %ecx, %ecx xorl %esi, %esi movsd (%rdx,%rsi,8), %xmm0 mulsd %xmm1, %xmm0 movsd %xmm0, (%rax,%rsi,8) incq %rsi cmpq %rsi, %rcx jne 0x5c9a3 jmp 0x5c9f1 movl (%r12), %ecx movq %rbp, %rdi movsd 0x59536(%rip), %xmm0 # 0xb5f00 leaq 0x38(%rsp), %rsi movsd 0x59561(%rip), %xmm1 # 0xb5f38 movq %rbp, %rdx movq 0x10(%rsp), %r8 movq 0x18(%rsp), %r9 callq 0x55629 movsd 0x5953f(%rip), %xmm1 # 0xb5f30 leaq 0x1(%r14), %rax testq %r14, %r14 movq %rax, %r14 je 0x5c903 movq 0x8(%rsp), %rax incq %rax cmpq $0x3, %rax jne 0x5c8b8 addq $0xd8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x5a607(%rip), %rdi # 0xb7033 leaq 0x59ee5(%rip), %rsi # 0xb6918 leaq 0x5aca8(%rip), %rcx # 0xb76e2 movl $0x60a, %edx # imm = 0x60A callq 0x39560 leaq 0x5a683(%rip), %rdi # 0xb70ce leaq 0x59ec6(%rip), %rsi # 0xb6918 leaq 0x5ac89(%rip), %rcx # 0xb76e2 movl $0x60e, %edx # imm = 0x60E callq 0x39560 leaq 0x5a675(%rip), %rdi # 0xb70df leaq 0x59ea7(%rip), %rsi # 0xb6918 leaq 0x5ac6a(%rip), %rcx # 0xb76e2 movl $0x611, %edx # imm = 0x611 callq 0x39560
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE31promoteCubicEdgePointsToQuarticERNS1_12SparseMatrixIdEEPdPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov [rsp+108h+var_F0], rcx mov [rsp+108h+var_F8], rdx mov r15, rsi mov r12, rdi movapd xmm0, cs:xmmword_B68E0 lea rcx, [rsp+108h+var_B8] movapd xmmword ptr [rcx], xmm0 mov rax, 3FF0000000000000h mov [rcx+10h], rax xorpd xmm0, xmm0 lea rsi, [rsp+108h+var_98] movapd xmmword ptr [rsi], xmm0 movapd xmmword ptr [rsi+10h], xmm0 mov rcx, 402A000000000000h mov [rsi], rcx mov rcx, 4008000000000000h mov [rsi+8], rcx mov [rsi+10h], rcx mov rdx, 4010000000000000h mov [rsi+18h], rdx mov [rsi+20h], rax lea rdi, [rsp+108h+var_68] movapd xmmword ptr [rdi], xmm0 movapd xmmword ptr [rdi+10h], xmm0 movapd xmmword ptr [rdi+20h], xmm0 mov rsi, 4028000000000000h mov [rdi], rsi mov [rdi+8], rdx mov [rdi+10h], rcx mov [rdi+18h], rax mov [rdi+28h], rax mov [rdi+30h], rcx lea rax, [r12+18h] mov [rsp+108h+var_108], rax xor eax, eax lea rbp, [rsp+108h+var_E8] movsd xmm1, cs:qword_B5F30 loc_5C8B8: imul r13, rax, 0B0h mov [rsp+108h+var_100], rax lea rbx, [rax+rax*4] mov rax, [r15+10h] mov ecx, [rax+rbx*4+4] movsxd rax, dword ptr [rax+rbx*4] sub ecx, eax mov [rsp+108h+var_D0], ecx lea rcx, ds:0[rax*4] add rcx, [r15+28h] mov [rsp+108h+var_C8], rcx shl rax, 3 add rax, [r15+40h] add r13, [rsp+108h+var_108] mov [rsp+108h+var_C0], rax shl rbx, 2 xor r14d, r14d loc_5C903: mov rax, [r15+10h] add rax, rbx mov ecx, [rax+r14*4+8] movsxd rax, dword ptr [rax+r14*4+4] sub ecx, eax mov [rsp+108h+var_E8], ecx lea rdx, ds:0[rax*4] add rdx, [r15+28h] mov [rsp+108h+var_E0], rdx shl rax, 3 add rax, [r15+40h] mov [rsp+108h+var_D8], rax xor edx, edx test r14, r14 setnz dl shl edx, 6 add edx, 40h ; '@' test [r13+0], dx jz short loc_5C963 test byte ptr [r13+0], 2 jnz short loc_5C963 lea rdx, [rsp+108h+var_B8] cmp ecx, 3 jz short loc_5C996 jmp loc_5CA25 loc_5C963: movzx edx, word ptr [r13+0] test dl, 8 jnz short loc_5C971 xor edx, edx jmp short loc_5C996 loc_5C971: test dl, 1 jnz short loc_5C988 lea rdx, [rsp+108h+var_68] cmp ecx, 7 jz short loc_5C996 jmp loc_5CA63 loc_5C988: lea rdx, [rsp+108h+var_98] cmp ecx, 5 jnz loc_5CA44 loc_5C996: test rdx, rdx jz short loc_5C9BB test ecx, ecx jle short loc_5C9F1 mov ecx, ecx xor esi, esi loc_5C9A3: movsd xmm0, qword ptr [rdx+rsi*8] mulsd xmm0, xmm1 movsd qword ptr [rax+rsi*8], xmm0 inc rsi cmp rcx, rsi jnz short loc_5C9A3 jmp short loc_5C9F1 loc_5C9BB: mov ecx, [r12] mov rdi, rbp movsd xmm0, cs:qword_B5F00 lea rsi, [rsp+108h+var_D0] movsd xmm1, cs:qword_B5F38 mov rdx, rbp mov r8, [rsp+108h+var_F8] mov r9, [rsp+108h+var_F0] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_129_combineSparsePointsInFullRowIdEEvRNS2_15SparseMatrixRowIT_EES5_RKS6_S5_S9_iPS5_Pi; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> &,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,int,double*,int *) movsd xmm1, cs:qword_B5F30 loc_5C9F1: lea rax, [r14+1] test r14, r14 mov r14, rax jz loc_5C903 mov rax, [rsp+108h+var_100] inc rax cmp rax, 3 jnz loc_5C8B8 add rsp, 0D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5CA25: lea rdi, aEGetsize3; "E.GetSize() == 3" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_57; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 60Ah call ___assert_fail loc_5CA44: lea rdi, aEGetsize5; "E.GetSize() == 5" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_57; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 60Eh call ___assert_fail loc_5CA63: lea rdi, aEGetsize7; "E.GetSize() == 7" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_57; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 611h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic( int *a1, _QWORD *a2, long long a3, long long a4) { long long result; // rax long long v6; // r13 long long v7; // rbx long long v8; // rax int v9; // ecx long long v10; // rax int *v11; // r13 long long v12; // rbx long long v13; // r14 long long v14; // rax int v15; // ecx long long v16; // rax int v17; // ecx long long v18; // rax __int128 *v19; // rdx long long i; // rsi long long v22; // [rsp+8h] [rbp-100h] int v25; // [rsp+20h] [rbp-E8h] BYREF long long v26; // [rsp+28h] [rbp-E0h] long long v27; // [rsp+30h] [rbp-D8h] int v28; // [rsp+38h] [rbp-D0h] BYREF long long v29; // [rsp+40h] [rbp-C8h] long long v30; // [rsp+48h] [rbp-C0h] __int128 v31; // [rsp+50h] [rbp-B8h] BYREF long long v32; // [rsp+60h] [rbp-A8h] _QWORD v33[6]; // [rsp+70h] [rbp-98h] BYREF _QWORD v34[13]; // [rsp+A0h] [rbp-68h] BYREF v31 = xmmword_B68E0; v32 = 0x3FF0000000000000LL; v33[0] = 0x402A000000000000LL; v33[1] = 0x4008000000000000LL; v33[2] = 0x4008000000000000LL; v33[3] = 0x4010000000000000LL; v33[4] = 0x3FF0000000000000LL; v34[4] = 0LL; v34[0] = 0x4028000000000000LL; v34[1] = 0x4010000000000000LL; v34[2] = 0x4008000000000000LL; v34[3] = 0x3FF0000000000000LL; v34[5] = 0x3FF0000000000000LL; v34[6] = 0x4008000000000000LL; result = 0LL; do { v6 = 44 * result; v22 = result; v7 = 5 * result; v8 = a2[2]; v9 = *(_DWORD *)(v8 + 4 * v7 + 4); v10 = *(int *)(v8 + 4 * v7); v28 = v9 - v10; v29 = a2[5] + 4 * v10; v11 = &a1[v6 + 6]; v30 = a2[8] + 8 * v10; v12 = 4 * v7; v13 = 0LL; do { v14 = v12 + a2[2]; v15 = *(_DWORD *)(v14 + 4 * v13 + 8); v16 = *(int *)(v14 + 4 * v13 + 4); v17 = v15 - v16; v25 = v17; v26 = a2[5] + 4 * v16; v18 = a2[8] + 8 * v16; v27 = v18; if ( ((unsigned __int16)(((v13 != 0) << 6) + 64) & *(_WORD *)v11) == 0 || (*(_BYTE *)v11 & 2) != 0 ) { if ( (*(_WORD *)v11 & 8) != 0 ) { if ( (*(_WORD *)v11 & 1) != 0 ) { v19 = (__int128 *)v33; if ( v17 != 5 ) __assert_fail( "E.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1550LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Wei" "ght *, int *) const [REAL = double]"); } else { v19 = (__int128 *)v34; if ( v17 != 7 ) __assert_fail( "E.GetSize() == 7", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1553LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Wei" "ght *, int *) const [REAL = double]"); } } else { v19 = 0LL; } } else { v19 = &v31; if ( v17 != 3 ) __assert_fail( "E.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1546LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight " "*, int *) const [REAL = double]"); } if ( v19 ) { if ( v17 > 0 ) { for ( i = 0LL; i != v17; ++i ) *(double *)(v18 + 8 * i) = *((double *)v19 + i) * 0.04166666666666666; } } else { OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>( &v25, &v28, &v25, *a1, a3, a4, 0.25, 0.75); } } while ( v13++ == 0 ); result = v22 + 1; } while ( v22 != 2 ); return result; }
promoteCubicEdgePointsToQuartic: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x10],RDX MOV R15,RSI MOV R12,RDI MOVAPD XMM0,xmmword ptr [0x001b68e0] LEA RCX,[RSP + 0x50] MOVAPD xmmword ptr [RCX],XMM0 MOV RAX,0x3ff0000000000000 MOV qword ptr [RCX + 0x10],RAX XORPD XMM0,XMM0 LEA RSI,[RSP + 0x70] MOVAPD xmmword ptr [RSI],XMM0 MOVAPD xmmword ptr [RSI + 0x10],XMM0 MOV RCX,0x402a000000000000 MOV qword ptr [RSI],RCX MOV RCX,0x4008000000000000 MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [RSI + 0x10],RCX MOV RDX,0x4010000000000000 MOV qword ptr [RSI + 0x18],RDX MOV qword ptr [RSI + 0x20],RAX LEA RDI,[RSP + 0xa0] MOVAPD xmmword ptr [RDI],XMM0 MOVAPD xmmword ptr [RDI + 0x10],XMM0 MOVAPD xmmword ptr [RDI + 0x20],XMM0 MOV RSI,0x4028000000000000 MOV qword ptr [RDI],RSI MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RDI + 0x10],RCX MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [RDI + 0x28],RAX MOV qword ptr [RDI + 0x30],RCX LEA RAX,[R12 + 0x18] MOV qword ptr [RSP],RAX XOR EAX,EAX LEA RBP,[RSP + 0x20] MOVSD XMM1,qword ptr [0x001b5f30] LAB_0015c8b8: IMUL R13,RAX,0xb0 MOV qword ptr [RSP + 0x8],RAX LEA RBX,[RAX + RAX*0x4] MOV RAX,qword ptr [R15 + 0x10] MOV ECX,dword ptr [RAX + RBX*0x4 + 0x4] MOVSXD RAX,dword ptr [RAX + RBX*0x4] SUB ECX,EAX MOV dword ptr [RSP + 0x38],ECX LEA RCX,[RAX*0x4] ADD RCX,qword ptr [R15 + 0x28] MOV qword ptr [RSP + 0x40],RCX SHL RAX,0x3 ADD RAX,qword ptr [R15 + 0x40] ADD R13,qword ptr [RSP] MOV qword ptr [RSP + 0x48],RAX SHL RBX,0x2 XOR R14D,R14D LAB_0015c903: MOV RAX,qword ptr [R15 + 0x10] ADD RAX,RBX MOV ECX,dword ptr [RAX + R14*0x4 + 0x8] MOVSXD RAX,dword ptr [RAX + R14*0x4 + 0x4] SUB ECX,EAX MOV dword ptr [RSP + 0x20],ECX LEA RDX,[RAX*0x4] ADD RDX,qword ptr [R15 + 0x28] MOV qword ptr [RSP + 0x28],RDX SHL RAX,0x3 ADD RAX,qword ptr [R15 + 0x40] MOV qword ptr [RSP + 0x30],RAX XOR EDX,EDX TEST R14,R14 SETNZ DL SHL EDX,0x6 ADD EDX,0x40 TEST word ptr [R13],DX JZ 0x0015c963 TEST byte ptr [R13],0x2 JNZ 0x0015c963 LEA RDX,[RSP + 0x50] CMP ECX,0x3 JZ 0x0015c996 JMP 0x0015ca25 LAB_0015c963: MOVZX EDX,word ptr [R13] TEST DL,0x8 JNZ 0x0015c971 XOR EDX,EDX JMP 0x0015c996 LAB_0015c971: TEST DL,0x1 JNZ 0x0015c988 LEA RDX,[RSP + 0xa0] CMP ECX,0x7 JZ 0x0015c996 JMP 0x0015ca63 LAB_0015c988: LEA RDX,[RSP + 0x70] CMP ECX,0x5 JNZ 0x0015ca44 LAB_0015c996: TEST RDX,RDX JZ 0x0015c9bb TEST ECX,ECX JLE 0x0015c9f1 MOV ECX,ECX XOR ESI,ESI LAB_0015c9a3: MOVSD XMM0,qword ptr [RDX + RSI*0x8] MULSD XMM0,XMM1 MOVSD qword ptr [RAX + RSI*0x8],XMM0 INC RSI CMP RCX,RSI JNZ 0x0015c9a3 JMP 0x0015c9f1 LAB_0015c9bb: MOV ECX,dword ptr [R12] MOV RDI,RBP MOVSD XMM0,qword ptr [0x001b5f00] LEA RSI,[RSP + 0x38] MOVSD XMM1,qword ptr [0x001b5f38] MOV RDX,RBP MOV R8,qword ptr [RSP + 0x10] MOV R9,qword ptr [RSP + 0x18] CALL 0x00155629 MOVSD XMM1,qword ptr [0x001b5f30] LAB_0015c9f1: LEA RAX,[R14 + 0x1] TEST R14,R14 MOV R14,RAX JZ 0x0015c903 MOV RAX,qword ptr [RSP + 0x8] INC RAX CMP RAX,0x3 JNZ 0x0015c8b8 ADD RSP,0xd8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015ca25: LEA RDI,[0x1b7033] LEA RSI,[0x1b6918] LEA RCX,[0x1b76e2] MOV EDX,0x60a CALL 0x00139560 LAB_0015ca44: LEA RDI,[0x1b70ce] LEA RSI,[0x1b6918] LEA RCX,[0x1b76e2] MOV EDX,0x60e CALL 0x00139560 LAB_0015ca63: LEA RDI,[0x1b70df] LEA RSI,[0x1b6918] LEA RCX,[0x1b76e2] MOV EDX,0x611 CALL 0x00139560
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic (GregoryTriConverter<double> *this,SparseMatrix *param_1,double *param_2,int *param_3) { int iVar1; long lVar2; long lVar3; int8 *puVar4; ulong uVar5; GregoryTriConverter<double> *pGVar6; long lVar7; bool bVar8; double dVar9; uint local_e8 [2]; long local_e0; long local_d8; int local_d0 [2]; long local_c8; long local_c0; int8 local_b8; int8 uStack_b0; int8 local_a8; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int8 local_78; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; local_b8 = _DAT_001b68e0; uStack_b0 = _UNK_001b68e8; local_a8 = 0x3ff0000000000000; local_98 = 0x402a000000000000; uStack_90 = 0x4008000000000000; local_88 = 0x4008000000000000; uStack_80 = 0x4010000000000000; local_78 = 0x3ff0000000000000; local_48 = 0; local_68 = 0x4028000000000000; uStack_60 = 0x4010000000000000; local_58 = 0x4008000000000000; uStack_50 = 0x3ff0000000000000; uStack_40 = 0x3ff0000000000000; local_38 = 0x4008000000000000; lVar3 = 0; dVar9 = DAT_001b5f30; do { iVar1 = *(int *)(*(long *)(param_1 + 0x10) + lVar3 * 0x14); local_d0[0] = *(int *)(*(long *)(param_1 + 0x10) + 4 + lVar3 * 0x14) - iVar1; local_c8 = (long)iVar1 * 4 + *(long *)(param_1 + 0x28); local_c0 = (long)iVar1 * 8 + *(long *)(param_1 + 0x40); pGVar6 = this + lVar3 * 0xb0 + 0x18; lVar7 = 0; do { lVar2 = *(long *)(param_1 + 0x10) + lVar3 * 0x14; iVar1 = *(int *)(lVar2 + 4 + lVar7 * 4); local_e8[0] = *(int *)(lVar2 + 8 + lVar7 * 4) - iVar1; local_e0 = (long)iVar1 * 4 + *(long *)(param_1 + 0x28); local_d8 = (long)iVar1 * 8 + *(long *)(param_1 + 0x40); if (((*(ushort *)pGVar6 & (ushort)(lVar7 != 0) * 0x40 + 0x40) == 0) || (((byte)*pGVar6 & 2) != 0)) { if ((*(ushort *)pGVar6 & 8) == 0) { puVar4 = (int8 *)0x0; } else if ((*(ushort *)pGVar6 & 1) == 0) { puVar4 = &local_68; if (local_e8[0] != 7) { /* WARNING: Subroutine does not return */ __assert_fail("E.GetSize() == 7", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x611, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight *, int *) const [REAL = double]" ); } } else { puVar4 = &local_98; if (local_e8[0] != 5) { /* WARNING: Subroutine does not return */ __assert_fail("E.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x60e, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight *, int *) const [REAL = double]" ); } } } else { puVar4 = &local_b8; if (local_e8[0] != 3) { /* WARNING: Subroutine does not return */ __assert_fail("E.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x60a, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight *, int *) const [REAL = double]" ); } } if (puVar4 == (int8 *)0x0) { (anonymous_namespace)::_combineSparsePointsInFullRow<double> ((SparseMatrixRow *)local_e8,DAT_001b5f00,(SparseMatrixRow *)local_d0,DAT_001b5f38 ,(SparseMatrixRow *)local_e8,*(int *)this,param_2,param_3); dVar9 = DAT_001b5f30; } else if (0 < (int)local_e8[0]) { uVar5 = 0; do { *(double *)(local_d8 + uVar5 * 8) = (double)puVar4[uVar5] * dVar9; uVar5 = uVar5 + 1; } while (local_e8[0] != uVar5); } bVar8 = lVar7 == 0; lVar7 = lVar7 + 1; } while (bVar8); lVar3 = lVar3 + 1; } while (lVar3 != 3); return; }
28,557
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::promoteCubicEdgePointsToQuartic(Matrix & matrix, Weight * rowWeights, int * columnMask) const { // // Re-assign all regular edge-point weights with quartic coefficients, // so only perform general combinations for the irregular case. // REAL const onBoundaryWeights[3] = { 16, 7, 1 }; REAL const regBoundaryWeights[5] = { 13, 3, 3, 4, 1 }; REAL const regInteriorWeights[7] = { 12, 4, 3, 1, 0, 1, 3 }; REAL const oneOver24 = (REAL) (1.0 / 24.0); for (int cIndex = 0; cIndex < 3; ++cIndex) { CornerTopology const & corner = _corners[cIndex]; // // Ordering of weight values for symmetric ep and em is the same, so // we can re-assign in a loop of 2 for {ep, em} // Point P(matrix, 5 * cIndex); for (int ePair = 0; ePair < 2; ++ePair) { Point E(matrix, 5 * cIndex + 1 + ePair); REAL const * weightsToReassign = 0; bool eOnBoundary = ePair ? corner.emOnBoundary : corner.epOnBoundary; if (eOnBoundary && !corner.isSharp) { assert(E.GetSize() == 3); weightsToReassign = onBoundaryWeights; } else if (corner.isRegular) { if (corner.isBoundary) { assert(E.GetSize() == 5); weightsToReassign = regBoundaryWeights; } else { assert(E.GetSize() == 7); weightsToReassign = regInteriorWeights; } } if (weightsToReassign) { for (int i = 0; i < E.GetSize(); ++i) { E.SetWeight(i, weightsToReassign[i] * oneOver24); } } else { _combineSparsePointsInFullRow(E, (REAL)0.25f, P, (REAL)0.75f, E, _numSourcePoints, rowWeights, columnMask); } } } }
O2
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rcx, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq %rsi, %r15 movaps 0x4ec0d(%rip), %xmm0 # 0xc0300 leaq 0x60(%rsp), %rcx movaps %xmm0, (%rcx) movaps 0x4ec0e(%rip), %xmm0 # 0xc0310 movaps %xmm0, 0x10(%rcx) movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 movq %rax, 0x20(%rcx) xorps %xmm0, %xmm0 leaq 0x90(%rsp), %rax movaps %xmm0, 0x20(%rax) movaps 0x4ebf6(%rip), %xmm0 # 0xc0320 movaps %xmm0, (%rax) movaps 0x4ebfc(%rip), %xmm0 # 0xc0330 movaps %xmm0, 0x10(%rax) movapd 0x4ec00(%rip), %xmm0 # 0xc0340 movupd %xmm0, 0x28(%rax) movq %rdi, 0x18(%rsp) leaq 0x18(%rdi), %rax movq %rax, 0x8(%rsp) xorl %eax, %eax leaq 0x4f534(%rip), %r13 # 0xc0c90 movsd 0x4e91c(%rip), %xmm1 # 0xc0080 leaq 0x30(%rsp), %rbp cmpq $0x3, %rax je 0x718bf imulq $0xb0, %rax, %rbx movq %rax, 0x10(%rsp) leaq (%rax,%rax,4), %r14 movq 0x10(%r15), %rax movl 0x4(%rax,%r14,4), %ecx movslq (%rax,%r14,4), %rax subl %eax, %ecx movl %ecx, 0x48(%rsp) leaq (,%rax,4), %rcx addq 0x28(%r15), %rcx movq %rcx, 0x50(%rsp) shlq $0x3, %rax addq 0x40(%r15), %rax addq 0x8(%rsp), %rbx movq %rax, 0x58(%rsp) shlq $0x2, %r14 xorl %r12d, %r12d cmpq $0x2, %r12 je 0x718b2 movq 0x10(%r15), %rax addq %r14, %rax movl 0x8(%rax,%r12,4), %ecx movslq 0x4(%rax,%r12,4), %rax subl %eax, %ecx movl %ecx, 0x30(%rsp) leaq (,%rax,4), %rdx addq 0x28(%r15), %rdx movq %rdx, 0x38(%rsp) shlq $0x3, %rax addq 0x40(%r15), %rax movq %rax, 0x40(%rsp) xorl %esi, %esi testq %r12, %r12 setne %sil movzwl (%rbx), %edx shll $0x6, %esi addl $0x40, %esi testw %si, %dx sete %sil movl %edx, %edi andl $0x2, %edi shrl %edi orb %sil, %dil jne 0x7184c movq %r13, %rdx cmpl $0x3, %ecx jne 0x718d1 movl %ecx, %ecx xorl %esi, %esi cmpq %rsi, %rcx je 0x7188a movsd (%rdx,%rsi,8), %xmm0 mulsd %xmm1, %xmm0 movsd %xmm0, (%rax,%rsi,8) incq %rsi jmp 0x71834 testb $0x8, %dl jne 0x71892 movq 0x18(%rsp), %rax movl (%rax), %ecx movq %rbp, %rdi movsd 0x4e7ed(%rip), %xmm0 # 0xc0050 leaq 0x48(%rsp), %rsi movsd 0x4e820(%rip), %xmm1 # 0xc0090 movq %rbp, %rdx movq 0x20(%rsp), %r8 movq 0x28(%rsp), %r9 callq 0x6bc63 movsd 0x4e7f6(%rip), %xmm1 # 0xc0080 incq %r12 jmp 0x717c0 testb $0x1, %dl jne 0x718a6 leaq 0x90(%rsp), %rdx cmpl $0x7, %ecx je 0x71830 jmp 0x7190f leaq 0x60(%rsp), %rdx cmpl $0x5, %ecx je 0x71830 jmp 0x718f0 movq 0x10(%rsp), %rax incq %rax jmp 0x71769 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x4fb0b(%rip), %rdi # 0xc13e3 leaq 0x4f3e9(%rip), %rsi # 0xc0cc8 leaq 0x501ac(%rip), %rcx # 0xc1a92 movl $0x60a, %edx # imm = 0x60A callq 0x512a0 leaq 0x4fb87(%rip), %rdi # 0xc147e leaq 0x4f3ca(%rip), %rsi # 0xc0cc8 leaq 0x5018d(%rip), %rcx # 0xc1a92 movl $0x60e, %edx # imm = 0x60E callq 0x512a0 leaq 0x4fb79(%rip), %rdi # 0xc148f leaq 0x4f3ab(%rip), %rsi # 0xc0cc8 leaq 0x5016e(%rip), %rcx # 0xc1a92 movl $0x611, %edx # imm = 0x611 callq 0x512a0
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE31promoteCubicEdgePointsToQuarticERNS1_12SparseMatrixIdEEPdPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov [rsp+0F8h+var_D0], rcx mov [rsp+0F8h+var_D8], rdx mov r15, rsi movaps xmm0, cs:xmmword_C0300 lea rcx, [rsp+0F8h+var_98] movaps xmmword ptr [rcx], xmm0 movaps xmm0, cs:xmmword_C0310 movaps xmmword ptr [rcx+10h], xmm0 mov rax, 3FF0000000000000h mov [rcx+20h], rax xorps xmm0, xmm0 lea rax, [rsp+0F8h+var_68] movaps xmmword ptr [rax+20h], xmm0 movaps xmm0, cs:xmmword_C0320 movaps xmmword ptr [rax], xmm0 movaps xmm0, cs:xmmword_C0330 movaps xmmword ptr [rax+10h], xmm0 movapd xmm0, cs:xmmword_C0340 movupd xmmword ptr [rax+28h], xmm0 mov [rsp+0F8h+var_E0], rdi lea rax, [rdi+18h] mov [rsp+0F8h+var_F0], rax xor eax, eax lea r13, unk_C0C90 movsd xmm1, cs:qword_C0080 lea rbp, [rsp+0F8h+var_C8] loc_71769: cmp rax, 3 jz loc_718BF imul rbx, rax, 0B0h mov [rsp+0F8h+var_E8], rax lea r14, [rax+rax*4] mov rax, [r15+10h] mov ecx, [rax+r14*4+4] movsxd rax, dword ptr [rax+r14*4] sub ecx, eax mov [rsp+0F8h+var_B0], ecx lea rcx, ds:0[rax*4] add rcx, [r15+28h] mov [rsp+0F8h+var_A8], rcx shl rax, 3 add rax, [r15+40h] add rbx, [rsp+0F8h+var_F0] mov [rsp+0F8h+var_A0], rax shl r14, 2 xor r12d, r12d loc_717C0: cmp r12, 2 jz loc_718B2 mov rax, [r15+10h] add rax, r14 mov ecx, [rax+r12*4+8] movsxd rax, dword ptr [rax+r12*4+4] sub ecx, eax mov [rsp+0F8h+var_C8], ecx lea rdx, ds:0[rax*4] add rdx, [r15+28h] mov [rsp+0F8h+var_C0], rdx shl rax, 3 add rax, [r15+40h] mov [rsp+0F8h+var_B8], rax xor esi, esi test r12, r12 setnz sil movzx edx, word ptr [rbx] shl esi, 6 add esi, 40h ; '@' test dx, si setz sil mov edi, edx and edi, 2 shr edi, 1 or dil, sil jnz short loc_7184C mov rdx, r13 cmp ecx, 3 jnz loc_718D1 loc_71830: mov ecx, ecx xor esi, esi loc_71834: cmp rcx, rsi jz short loc_7188A movsd xmm0, qword ptr [rdx+rsi*8] mulsd xmm0, xmm1 movsd qword ptr [rax+rsi*8], xmm0 inc rsi jmp short loc_71834 loc_7184C: test dl, 8 jnz short loc_71892 mov rax, [rsp+0F8h+var_E0] mov ecx, [rax] mov rdi, rbp movsd xmm0, cs:qword_C0050 lea rsi, [rsp+0F8h+var_B0] movsd xmm1, cs:qword_C0090 mov rdx, rbp mov r8, [rsp+0F8h+var_D8] mov r9, [rsp+0F8h+var_D0] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_129_combineSparsePointsInFullRowIdEEvRNS2_15SparseMatrixRowIT_EES5_RKS6_S5_S9_iPS5_Pi; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> &,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,int,double*,int *) movsd xmm1, cs:qword_C0080 loc_7188A: inc r12 jmp loc_717C0 loc_71892: test dl, 1 jnz short loc_718A6 lea rdx, [rsp+0F8h+var_68] cmp ecx, 7 jz short loc_71830 jmp short loc_7190F loc_718A6: lea rdx, [rsp+0F8h+var_98] cmp ecx, 5 jz short loc_71830 jmp short loc_718F0 loc_718B2: mov rax, [rsp+0F8h+var_E8] inc rax jmp loc_71769 loc_718BF: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_718D1: lea rdi, aEGetsize3; "E.GetSize() == 3" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_57; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 60Ah call ___assert_fail loc_718F0: lea rdi, aEGetsize5; "E.GetSize() == 5" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_57; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 60Eh call ___assert_fail loc_7190F: lea rdi, aEGetsize7; "E.GetSize() == 7" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_57; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 611h call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic( int *a1, _QWORD *a2, long long a3, long long a4) { long long result; // rax long long v6; // rbx long long v7; // r14 long long v8; // rax int v9; // ecx long long v10; // rax int *v11; // rbx long long v12; // r14 long long i; // r12 long long v14; // rax int v15; // ecx long long v16; // rax int v17; // ecx long long v18; // rax __int16 v19; // dx double *v20; // rdx long long j; // rsi long long v22; // [rsp+10h] [rbp-E8h] int v25; // [rsp+30h] [rbp-C8h] BYREF long long v26; // [rsp+38h] [rbp-C0h] long long v27; // [rsp+40h] [rbp-B8h] int v28; // [rsp+48h] [rbp-B0h] BYREF long long v29; // [rsp+50h] [rbp-A8h] long long v30; // [rsp+58h] [rbp-A0h] _OWORD v31[2]; // [rsp+60h] [rbp-98h] BYREF long long v32; // [rsp+80h] [rbp-78h] _OWORD v33[2]; // [rsp+90h] [rbp-68h] BYREF long long v34; // [rsp+B0h] [rbp-48h] __int128 v35; // [rsp+B8h] [rbp-40h] v31[0] = xmmword_C0300; v31[1] = xmmword_C0310; v32 = 0x3FF0000000000000LL; v34 = 0LL; v33[0] = xmmword_C0320; v33[1] = xmmword_C0330; v35 = xmmword_C0340; result = 0LL; LABEL_2: if ( result != 3 ) { v6 = 44 * result; v22 = result; v7 = 5 * result; v8 = a2[2]; v9 = *(_DWORD *)(v8 + 4 * v7 + 4); v10 = *(int *)(v8 + 4 * v7); v28 = v9 - v10; v29 = a2[5] + 4 * v10; v11 = &a1[v6 + 6]; v30 = a2[8] + 8 * v10; v12 = 4 * v7; for ( i = 0LL; ; ++i ) { if ( i == 2 ) { result = v22 + 1; goto LABEL_2; } v14 = v12 + a2[2]; v15 = *(_DWORD *)(v14 + 4 * i + 8); v16 = *(int *)(v14 + 4 * i + 4); v17 = v15 - v16; v25 = v17; v26 = a2[5] + 4 * v16; v18 = a2[8] + 8 * v16; v27 = v18; v19 = *(_WORD *)v11; if ( (((unsigned __int16)(((i != 0) << 6) + 64) & *(_WORD *)v11) == 0) | ((unsigned __int8)(*(_WORD *)v11 & 2) >> 1) ) { if ( (v19 & 8) == 0 ) { OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>( &v25, &v28, &v25, *a1, a3, a4, 0.25, 0.75); continue; } if ( (v19 & 1) != 0 ) { v20 = (double *)v31; if ( v17 != 5 ) __assert_fail( "E.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1550LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weigh" "t *, int *) const [REAL = double]"); } else { v20 = (double *)v33; if ( v17 != 7 ) __assert_fail( "E.GetSize() == 7", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1553LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weigh" "t *, int *) const [REAL = double]"); } } else { v20 = (double *)&unk_C0C90; if ( v17 != 3 ) __assert_fail( "E.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1546LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight " "*, int *) const [REAL = double]"); } for ( j = 0LL; v17 != j; ++j ) *(double *)(v18 + 8 * j) = v20[j] * 0.04166666666666666; } } return result; }
promoteCubicEdgePointsToQuartic: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV qword ptr [RSP + 0x28],RCX MOV qword ptr [RSP + 0x20],RDX MOV R15,RSI MOVAPS XMM0,xmmword ptr [0x001c0300] LEA RCX,[RSP + 0x60] MOVAPS xmmword ptr [RCX],XMM0 MOVAPS XMM0,xmmword ptr [0x001c0310] MOVAPS xmmword ptr [RCX + 0x10],XMM0 MOV RAX,0x3ff0000000000000 MOV qword ptr [RCX + 0x20],RAX XORPS XMM0,XMM0 LEA RAX,[RSP + 0x90] MOVAPS xmmword ptr [RAX + 0x20],XMM0 MOVAPS XMM0,xmmword ptr [0x001c0320] MOVAPS xmmword ptr [RAX],XMM0 MOVAPS XMM0,xmmword ptr [0x001c0330] MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPD XMM0,xmmword ptr [0x001c0340] MOVUPD xmmword ptr [RAX + 0x28],XMM0 MOV qword ptr [RSP + 0x18],RDI LEA RAX,[RDI + 0x18] MOV qword ptr [RSP + 0x8],RAX XOR EAX,EAX LEA R13,[0x1c0c90] MOVSD XMM1,qword ptr [0x001c0080] LEA RBP,[RSP + 0x30] LAB_00171769: CMP RAX,0x3 JZ 0x001718bf IMUL RBX,RAX,0xb0 MOV qword ptr [RSP + 0x10],RAX LEA R14,[RAX + RAX*0x4] MOV RAX,qword ptr [R15 + 0x10] MOV ECX,dword ptr [RAX + R14*0x4 + 0x4] MOVSXD RAX,dword ptr [RAX + R14*0x4] SUB ECX,EAX MOV dword ptr [RSP + 0x48],ECX LEA RCX,[RAX*0x4] ADD RCX,qword ptr [R15 + 0x28] MOV qword ptr [RSP + 0x50],RCX SHL RAX,0x3 ADD RAX,qword ptr [R15 + 0x40] ADD RBX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x58],RAX SHL R14,0x2 XOR R12D,R12D LAB_001717c0: CMP R12,0x2 JZ 0x001718b2 MOV RAX,qword ptr [R15 + 0x10] ADD RAX,R14 MOV ECX,dword ptr [RAX + R12*0x4 + 0x8] MOVSXD RAX,dword ptr [RAX + R12*0x4 + 0x4] SUB ECX,EAX MOV dword ptr [RSP + 0x30],ECX LEA RDX,[RAX*0x4] ADD RDX,qword ptr [R15 + 0x28] MOV qword ptr [RSP + 0x38],RDX SHL RAX,0x3 ADD RAX,qword ptr [R15 + 0x40] MOV qword ptr [RSP + 0x40],RAX XOR ESI,ESI TEST R12,R12 SETNZ SIL MOVZX EDX,word ptr [RBX] SHL ESI,0x6 ADD ESI,0x40 TEST DX,SI SETZ SIL MOV EDI,EDX AND EDI,0x2 SHR EDI,0x1 OR DIL,SIL JNZ 0x0017184c MOV RDX,R13 CMP ECX,0x3 JNZ 0x001718d1 LAB_00171830: MOV ECX,ECX XOR ESI,ESI LAB_00171834: CMP RCX,RSI JZ 0x0017188a MOVSD XMM0,qword ptr [RDX + RSI*0x8] MULSD XMM0,XMM1 MOVSD qword ptr [RAX + RSI*0x8],XMM0 INC RSI JMP 0x00171834 LAB_0017184c: TEST DL,0x8 JNZ 0x00171892 MOV RAX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RAX] MOV RDI,RBP MOVSD XMM0,qword ptr [0x001c0050] LEA RSI,[RSP + 0x48] MOVSD XMM1,qword ptr [0x001c0090] MOV RDX,RBP MOV R8,qword ptr [RSP + 0x20] MOV R9,qword ptr [RSP + 0x28] CALL 0x0016bc63 MOVSD XMM1,qword ptr [0x001c0080] LAB_0017188a: INC R12 JMP 0x001717c0 LAB_00171892: TEST DL,0x1 JNZ 0x001718a6 LEA RDX,[RSP + 0x90] CMP ECX,0x7 JZ 0x00171830 JMP 0x0017190f LAB_001718a6: LEA RDX,[RSP + 0x60] CMP ECX,0x5 JZ 0x00171830 JMP 0x001718f0 LAB_001718b2: MOV RAX,qword ptr [RSP + 0x10] INC RAX JMP 0x00171769 LAB_001718bf: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001718d1: LEA RDI,[0x1c13e3] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c1a92] MOV EDX,0x60a CALL 0x001512a0 LAB_001718f0: LEA RDI,[0x1c147e] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c1a92] MOV EDX,0x60e CALL 0x001512a0 LAB_0017190f: LEA RDI,[0x1c148f] LEA RSI,[0x1c0cc8] LEA RCX,[0x1c1a92] MOV EDX,0x611 CALL 0x001512a0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic (GregoryTriConverter<double> *this,SparseMatrix *param_1,double *param_2,int *param_3) { ushort uVar1; int iVar2; long lVar3; long lVar4; int8 *puVar5; ulong uVar6; long lVar7; double dVar8; uint local_c8 [2]; long local_c0; long local_b8; int local_b0 [2]; long local_a8; long local_a0; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int8 local_78; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 uStack_38; local_98 = _DAT_001c0300; uStack_90 = _UNK_001c0308; local_88 = _DAT_001c0310; uStack_80 = _UNK_001c0318; local_78 = 0x3ff0000000000000; local_48 = 0; local_68 = _DAT_001c0320; uStack_60 = _UNK_001c0328; local_58 = _DAT_001c0330; uStack_50 = _UNK_001c0338; uStack_40 = _DAT_001c0340; uStack_38 = _UNK_001c0348; lVar4 = 0; dVar8 = DAT_001c0080; do { if (lVar4 == 3) { return; } iVar2 = *(int *)(*(long *)(param_1 + 0x10) + lVar4 * 0x14); local_b0[0] = *(int *)(*(long *)(param_1 + 0x10) + 4 + lVar4 * 0x14) - iVar2; local_a8 = (long)iVar2 * 4 + *(long *)(param_1 + 0x28); local_a0 = (long)iVar2 * 8 + *(long *)(param_1 + 0x40); for (lVar7 = 0; lVar7 != 2; lVar7 = lVar7 + 1) { lVar3 = *(long *)(param_1 + 0x10) + lVar4 * 0x14; iVar2 = *(int *)(lVar3 + 4 + lVar7 * 4); local_c8[0] = *(int *)(lVar3 + 8 + lVar7 * 4) - iVar2; local_c0 = (long)iVar2 * 4 + *(long *)(param_1 + 0x28); local_b8 = (long)iVar2 * 8 + *(long *)(param_1 + 0x40); uVar1 = *(ushort *)(this + lVar4 * 0xb0 + 0x18); if ((char)((uVar1 & 2) >> 1) == '\0' && (uVar1 & (ushort)(lVar7 != 0) * 0x40 + 0x40) != 0) { puVar5 = &DAT_001c0c90; if (local_c8[0] != 3) { /* WARNING: Subroutine does not return */ __assert_fail("E.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x60a, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight *, int *) const [REAL = double]" ); } LAB_00171830: for (uVar6 = 0; local_c8[0] != uVar6; uVar6 = uVar6 + 1) { *(double *)(local_b8 + uVar6 * 8) = (double)puVar5[uVar6] * dVar8; } } else { if ((uVar1 & 8) != 0) { if ((uVar1 & 1) == 0) { puVar5 = &local_68; if (local_c8[0] != 7) { /* WARNING: Subroutine does not return */ __assert_fail("E.GetSize() == 7", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x611, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight *, int *) const [REAL = double]" ); } } else { puVar5 = &local_98; if (local_c8[0] != 5) { /* WARNING: Subroutine does not return */ __assert_fail("E.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x60e, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight *, int *) const [REAL = double]" ); } } goto LAB_00171830; } (anonymous_namespace)::_combineSparsePointsInFullRow<double> ((SparseMatrixRow *)local_c8,DAT_001c0050,(SparseMatrixRow *)local_b0,DAT_001c0090 ,(SparseMatrixRow *)local_c8,*(int *)this,param_2,param_3); dVar8 = DAT_001c0080; } } lVar4 = lVar4 + 1; } while( true ); }
28,558
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp
void GregoryTriConverter<REAL>::promoteCubicEdgePointsToQuartic(Matrix & matrix, Weight * rowWeights, int * columnMask) const { // // Re-assign all regular edge-point weights with quartic coefficients, // so only perform general combinations for the irregular case. // REAL const onBoundaryWeights[3] = { 16, 7, 1 }; REAL const regBoundaryWeights[5] = { 13, 3, 3, 4, 1 }; REAL const regInteriorWeights[7] = { 12, 4, 3, 1, 0, 1, 3 }; REAL const oneOver24 = (REAL) (1.0 / 24.0); for (int cIndex = 0; cIndex < 3; ++cIndex) { CornerTopology const & corner = _corners[cIndex]; // // Ordering of weight values for symmetric ep and em is the same, so // we can re-assign in a loop of 2 for {ep, em} // Point P(matrix, 5 * cIndex); for (int ePair = 0; ePair < 2; ++ePair) { Point E(matrix, 5 * cIndex + 1 + ePair); REAL const * weightsToReassign = 0; bool eOnBoundary = ePair ? corner.emOnBoundary : corner.epOnBoundary; if (eOnBoundary && !corner.isSharp) { assert(E.GetSize() == 3); weightsToReassign = onBoundaryWeights; } else if (corner.isRegular) { if (corner.isBoundary) { assert(E.GetSize() == 5); weightsToReassign = regBoundaryWeights; } else { assert(E.GetSize() == 7); weightsToReassign = regInteriorWeights; } } if (weightsToReassign) { for (int i = 0; i < E.GetSize(); ++i) { E.SetWeight(i, weightsToReassign[i] * oneOver24); } } else { _combineSparsePointsInFullRow(E, (REAL)0.25f, P, (REAL)0.75f, E, _numSourcePoints, rowWeights, columnMask); } } } }
O3
cpp
OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rcx, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq %rsi, %r15 movaps 0x5a23d(%rip), %xmm0 # 0xb9370 leaq 0x50(%rsp), %rcx movaps %xmm0, (%rcx) movaps 0x5a23e(%rip), %xmm0 # 0xb9380 movaps %xmm0, 0x10(%rcx) movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000 movq %rax, 0x20(%rcx) xorps %xmm0, %xmm0 leaq 0x80(%rsp), %rax movaps %xmm0, 0x20(%rax) movaps 0x5a226(%rip), %xmm0 # 0xb9390 movaps %xmm0, (%rax) movaps 0x5a22c(%rip), %xmm0 # 0xb93a0 movaps %xmm0, 0x10(%rax) movapd 0x5a230(%rip), %xmm0 # 0xb93b0 movupd %xmm0, 0x28(%rax) movq %rdi, 0x8(%rsp) leaq 0x18(%rdi), %rax movq %rax, (%rsp) xorl %r13d, %r13d leaq 0x5abd4(%rip), %rbp # 0xb9d70 movsd 0x5a24c(%rip), %xmm1 # 0xb93f0 imulq $0xb0, %r13, %r14 addq (%rsp), %r14 leaq (,%r13,4), %r12 addq %r13, %r12 movq 0x10(%r15), %rax movl 0x4(%rax,%r12,4), %ecx movslq (%rax,%r12,4), %rax subl %eax, %ecx movl %ecx, 0x38(%rsp) leaq (,%rax,4), %rcx addq 0x28(%r15), %rcx movq %rcx, 0x40(%rsp) shlq $0x3, %rax addq 0x40(%r15), %rax movq %rax, 0x48(%rsp) movb $0x1, %bl shlq $0x2, %r12 xorl %eax, %eax movq 0x10(%r15), %rdx addq %r12, %rdx movl 0x8(%rdx,%rax,4), %ecx movslq 0x4(%rdx,%rax,4), %rax subl %eax, %ecx movl %ecx, 0x20(%rsp) leaq (,%rax,4), %rdx addq 0x28(%r15), %rdx movq %rdx, 0x28(%rsp) shlq $0x3, %rax addq 0x40(%r15), %rax movq %rax, 0x30(%rsp) movzwl (%r14), %edx movl %ebx, %esi notb %sil movzbl %sil, %esi andl $0x1, %esi shll $0x6, %esi addl $0x40, %esi testw %si, %dx sete %sil movl %edx, %edi andl $0x2, %edi shrl %edi orb %sil, %dil jne 0x5f278 movq %rbp, %rdx cmpl $0x3, %ecx jne 0x5f314 movl %ecx, %ecx xorl %esi, %esi movsd (%rdx,%rsi,8), %xmm0 mulsd %xmm1, %xmm0 movsd %xmm0, (%rax,%rsi,8) incq %rsi cmpq %rsi, %rcx jne 0x5f260 jmp 0x5f2b8 testb $0x8, %dl jne 0x5f2cd movq 0x8(%rsp), %rax movl (%rax), %ecx leaq 0x20(%rsp), %rdi movsd 0x5a12f(%rip), %xmm0 # 0xb93c0 leaq 0x38(%rsp), %rsi movsd 0x5a162(%rip), %xmm1 # 0xb9400 movq %rdi, %rdx movq 0x10(%rsp), %r8 movq 0x18(%rsp), %r9 callq 0x57c00 movsd 0x5a138(%rip), %xmm1 # 0xb93f0 movl $0x1, %eax testb $0x1, %bl movl $0x0, %ebx jne 0x5f1f3 jmp 0x5f2f5 testb $0x1, %dl jne 0x5f2e5 leaq 0x80(%rsp), %rdx cmpl $0x7, %ecx je 0x5f25c jmp 0x5f333 leaq 0x50(%rsp), %rdx cmpl $0x5, %ecx je 0x5f25c jmp 0x5f352 incq %r13 cmpq $0x3, %r13 jne 0x5f1a4 addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x5b1a8(%rip), %rdi # 0xba4c3 leaq 0x5aa86(%rip), %rsi # 0xb9da8 leaq 0x5b849(%rip), %rcx # 0xbab72 movl $0x60a, %edx # imm = 0x60A callq 0x39540 leaq 0x5b235(%rip), %rdi # 0xba56f leaq 0x5aa67(%rip), %rsi # 0xb9da8 leaq 0x5b82a(%rip), %rcx # 0xbab72 movl $0x611, %edx # imm = 0x611 callq 0x39540 leaq 0x5b205(%rip), %rdi # 0xba55e leaq 0x5aa48(%rip), %rsi # 0xb9da8 leaq 0x5b80b(%rip), %rcx # 0xbab72 movl $0x60e, %edx # imm = 0x60E callq 0x39540 nop
_ZNK10OpenSubdiv6v3_6_03Far19GregoryTriConverterIdE31promoteCubicEdgePointsToQuarticERNS1_12SparseMatrixIdEEPdPi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov [rsp+0E8h+var_D0], rcx mov [rsp+0E8h+var_D8], rdx mov r15, rsi movaps xmm0, cs:xmmword_B9370 lea rcx, [rsp+0E8h+var_98] movaps xmmword ptr [rcx], xmm0 movaps xmm0, cs:xmmword_B9380 movaps xmmword ptr [rcx+10h], xmm0 mov rax, 3FF0000000000000h mov [rcx+20h], rax xorps xmm0, xmm0 lea rax, [rsp+0E8h+var_68] movaps xmmword ptr [rax+20h], xmm0 movaps xmm0, cs:xmmword_B9390 movaps xmmword ptr [rax], xmm0 movaps xmm0, cs:xmmword_B93A0 movaps xmmword ptr [rax+10h], xmm0 movapd xmm0, cs:xmmword_B93B0 movupd xmmword ptr [rax+28h], xmm0 mov [rsp+0E8h+var_E0], rdi lea rax, [rdi+18h] mov [rsp+0E8h+var_E8], rax xor r13d, r13d lea rbp, unk_B9D70 movsd xmm1, cs:qword_B93F0 loc_5F1A4: imul r14, r13, 0B0h add r14, [rsp+0E8h+var_E8] lea r12, ds:0[r13*4] add r12, r13 mov rax, [r15+10h] mov ecx, [rax+r12*4+4] movsxd rax, dword ptr [rax+r12*4] sub ecx, eax mov [rsp+0E8h+var_B0], ecx lea rcx, ds:0[rax*4] add rcx, [r15+28h] mov [rsp+0E8h+var_A8], rcx shl rax, 3 add rax, [r15+40h] mov [rsp+0E8h+var_A0], rax mov bl, 1 shl r12, 2 xor eax, eax loc_5F1F3: mov rdx, [r15+10h] add rdx, r12 mov ecx, [rdx+rax*4+8] movsxd rax, dword ptr [rdx+rax*4+4] sub ecx, eax mov [rsp+0E8h+var_C8], ecx lea rdx, ds:0[rax*4] add rdx, [r15+28h] mov [rsp+0E8h+var_C0], rdx shl rax, 3 add rax, [r15+40h] mov [rsp+0E8h+var_B8], rax movzx edx, word ptr [r14] mov esi, ebx not sil movzx esi, sil and esi, 1 shl esi, 6 add esi, 40h ; '@' test dx, si setz sil mov edi, edx and edi, 2 shr edi, 1 or dil, sil jnz short loc_5F278 mov rdx, rbp cmp ecx, 3 jnz loc_5F314 loc_5F25C: mov ecx, ecx xor esi, esi loc_5F260: movsd xmm0, qword ptr [rdx+rsi*8] mulsd xmm0, xmm1 movsd qword ptr [rax+rsi*8], xmm0 inc rsi cmp rcx, rsi jnz short loc_5F260 jmp short loc_5F2B8 loc_5F278: test dl, 8 jnz short loc_5F2CD mov rax, [rsp+0E8h+var_E0] mov ecx, [rax] lea rdi, [rsp+0E8h+var_C8] movsd xmm0, cs:qword_B93C0 lea rsi, [rsp+0E8h+var_B0] movsd xmm1, cs:qword_B9400 mov rdx, rdi mov r8, [rsp+0E8h+var_D8] mov r9, [rsp+0E8h+var_D0] call _ZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_129_combineSparsePointsInFullRowIdEEvRNS2_15SparseMatrixRowIT_EES5_RKS6_S5_S9_iPS5_Pi; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>(OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> &,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,double,OpenSubdiv::v3_6_0::Far::`anonymous namespace'::SparseMatrixRow<double> const&,int,double*,int *) movsd xmm1, cs:qword_B93F0 loc_5F2B8: mov eax, 1 test bl, 1 mov ebx, 0 jnz loc_5F1F3 jmp short loc_5F2F5 loc_5F2CD: test dl, 1 jnz short loc_5F2E5 lea rdx, [rsp+0E8h+var_68] cmp ecx, 7 jz loc_5F25C jmp short loc_5F333 loc_5F2E5: lea rdx, [rsp+0E8h+var_98] cmp ecx, 5 jz loc_5F25C jmp short loc_5F352 loc_5F2F5: inc r13 cmp r13, 3 jnz loc_5F1A4 add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5F314: lea rdi, aEGetsize3; "E.GetSize() == 3" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_57; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 60Ah call ___assert_fail loc_5F333: lea rdi, aEGetsize7; "E.GetSize() == 7" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_57; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 611h call ___assert_fail loc_5F352: lea rdi, aEGetsize5; "E.GetSize() == 5" lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidOpensubdiv_57; "void OpenSubdiv::v3_6_0::Far::GregoryTr"... mov edx, 60Eh call ___assert_fail
long long OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic( int *a1, _QWORD *a2, long long a3, long long a4) { long long i; // r13 int *v6; // r14 long long v7; // rax int v8; // ecx long long v9; // rax char v10; // bl long long result; // rax long long v12; // rdx int v13; // ecx long long v14; // rax int v15; // ecx long long v16; // rax __int16 v17; // dx double *v18; // rdx long long j; // rsi bool v20; // zf int v23; // [rsp+20h] [rbp-C8h] BYREF long long v24; // [rsp+28h] [rbp-C0h] long long v25; // [rsp+30h] [rbp-B8h] int v26; // [rsp+38h] [rbp-B0h] BYREF long long v27; // [rsp+40h] [rbp-A8h] long long v28; // [rsp+48h] [rbp-A0h] _OWORD v29[2]; // [rsp+50h] [rbp-98h] BYREF long long v30; // [rsp+70h] [rbp-78h] _OWORD v31[2]; // [rsp+80h] [rbp-68h] BYREF long long v32; // [rsp+A0h] [rbp-48h] __int128 v33; // [rsp+A8h] [rbp-40h] v29[0] = xmmword_B9370; v29[1] = xmmword_B9380; v30 = 0x3FF0000000000000LL; v32 = 0LL; v31[0] = xmmword_B9390; v31[1] = xmmword_B93A0; v33 = xmmword_B93B0; for ( i = 0LL; i != 3; ++i ) { v6 = &a1[44 * i + 6]; v7 = a2[2]; v8 = *(_DWORD *)(v7 + 20 * i + 4); v9 = *(int *)(v7 + 20 * i); v26 = v8 - v9; v27 = a2[5] + 4 * v9; v28 = a2[8] + 8 * v9; v10 = 1; result = 0LL; do { v12 = 20 * i + a2[2]; v13 = *(_DWORD *)(v12 + 4 * result + 8); v14 = *(int *)(v12 + 4 * result + 4); v15 = v13 - v14; v23 = v15; v24 = a2[5] + 4 * v14; v16 = a2[8] + 8 * v14; v25 = v16; v17 = *(_WORD *)v6; if ( (((unsigned __int16)((((v10 & 1) == 0) << 6) + 64) & *(_WORD *)v6) == 0) | ((unsigned __int8)(*(_WORD *)v6 & 2) >> 1) ) { if ( (v17 & 8) == 0 ) { OpenSubdiv::v3_6_0::Far::`anonymous namespace'::_combineSparsePointsInFullRow<double>( &v23, &v26, &v23, *a1, a3, a4, 0.25, 0.75); goto LABEL_10; } if ( (v17 & 1) != 0 ) { v18 = (double *)v29; if ( v15 != 5 ) __assert_fail( "E.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1550LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weigh" "t *, int *) const [REAL = double]"); } else { v18 = (double *)v31; if ( v15 != 7 ) __assert_fail( "E.GetSize() == 7", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1553LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weigh" "t *, int *) const [REAL = double]"); } } else { v18 = (double *)&unk_B9D70; if ( v15 != 3 ) __assert_fail( "E.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp", 1546LL, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight " "*, int *) const [REAL = double]"); } for ( j = 0LL; j != v15; ++j ) *(double *)(v16 + 8 * j) = v18[j] * 0.04166666666666666; LABEL_10: result = 1LL; v20 = (v10 & 1) == 0; v10 = 0; } while ( !v20 ); } return result; }
promoteCubicEdgePointsToQuartic: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x10],RDX MOV R15,RSI MOVAPS XMM0,xmmword ptr [0x001b9370] LEA RCX,[RSP + 0x50] MOVAPS xmmword ptr [RCX],XMM0 MOVAPS XMM0,xmmword ptr [0x001b9380] MOVAPS xmmword ptr [RCX + 0x10],XMM0 MOV RAX,0x3ff0000000000000 MOV qword ptr [RCX + 0x20],RAX XORPS XMM0,XMM0 LEA RAX,[RSP + 0x80] MOVAPS xmmword ptr [RAX + 0x20],XMM0 MOVAPS XMM0,xmmword ptr [0x001b9390] MOVAPS xmmword ptr [RAX],XMM0 MOVAPS XMM0,xmmword ptr [0x001b93a0] MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPD XMM0,xmmword ptr [0x001b93b0] MOVUPD xmmword ptr [RAX + 0x28],XMM0 MOV qword ptr [RSP + 0x8],RDI LEA RAX,[RDI + 0x18] MOV qword ptr [RSP],RAX XOR R13D,R13D LEA RBP,[0x1b9d70] MOVSD XMM1,qword ptr [0x001b93f0] LAB_0015f1a4: IMUL R14,R13,0xb0 ADD R14,qword ptr [RSP] LEA R12,[R13*0x4] ADD R12,R13 MOV RAX,qword ptr [R15 + 0x10] MOV ECX,dword ptr [RAX + R12*0x4 + 0x4] MOVSXD RAX,dword ptr [RAX + R12*0x4] SUB ECX,EAX MOV dword ptr [RSP + 0x38],ECX LEA RCX,[RAX*0x4] ADD RCX,qword ptr [R15 + 0x28] MOV qword ptr [RSP + 0x40],RCX SHL RAX,0x3 ADD RAX,qword ptr [R15 + 0x40] MOV qword ptr [RSP + 0x48],RAX MOV BL,0x1 SHL R12,0x2 XOR EAX,EAX LAB_0015f1f3: MOV RDX,qword ptr [R15 + 0x10] ADD RDX,R12 MOV ECX,dword ptr [RDX + RAX*0x4 + 0x8] MOVSXD RAX,dword ptr [RDX + RAX*0x4 + 0x4] SUB ECX,EAX MOV dword ptr [RSP + 0x20],ECX LEA RDX,[RAX*0x4] ADD RDX,qword ptr [R15 + 0x28] MOV qword ptr [RSP + 0x28],RDX SHL RAX,0x3 ADD RAX,qword ptr [R15 + 0x40] MOV qword ptr [RSP + 0x30],RAX MOVZX EDX,word ptr [R14] MOV ESI,EBX NOT SIL MOVZX ESI,SIL AND ESI,0x1 SHL ESI,0x6 ADD ESI,0x40 TEST DX,SI SETZ SIL MOV EDI,EDX AND EDI,0x2 SHR EDI,0x1 OR DIL,SIL JNZ 0x0015f278 MOV RDX,RBP CMP ECX,0x3 JNZ 0x0015f314 LAB_0015f25c: MOV ECX,ECX XOR ESI,ESI LAB_0015f260: MOVSD XMM0,qword ptr [RDX + RSI*0x8] MULSD XMM0,XMM1 MOVSD qword ptr [RAX + RSI*0x8],XMM0 INC RSI CMP RCX,RSI JNZ 0x0015f260 JMP 0x0015f2b8 LAB_0015f278: TEST DL,0x8 JNZ 0x0015f2cd MOV RAX,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RAX] LEA RDI,[RSP + 0x20] MOVSD XMM0,qword ptr [0x001b93c0] LEA RSI,[RSP + 0x38] MOVSD XMM1,qword ptr [0x001b9400] MOV RDX,RDI MOV R8,qword ptr [RSP + 0x10] MOV R9,qword ptr [RSP + 0x18] CALL 0x00157c00 MOVSD XMM1,qword ptr [0x001b93f0] LAB_0015f2b8: MOV EAX,0x1 TEST BL,0x1 MOV EBX,0x0 JNZ 0x0015f1f3 JMP 0x0015f2f5 LAB_0015f2cd: TEST DL,0x1 JNZ 0x0015f2e5 LEA RDX,[RSP + 0x80] CMP ECX,0x7 JZ 0x0015f25c JMP 0x0015f333 LAB_0015f2e5: LEA RDX,[RSP + 0x50] CMP ECX,0x5 JZ 0x0015f25c JMP 0x0015f352 LAB_0015f2f5: INC R13 CMP R13,0x3 JNZ 0x0015f1a4 ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015f314: LEA RDI,[0x1ba4c3] LEA RSI,[0x1b9da8] LEA RCX,[0x1bab72] MOV EDX,0x60a CALL 0x00139540 LAB_0015f333: LEA RDI,[0x1ba56f] LEA RSI,[0x1b9da8] LEA RCX,[0x1bab72] MOV EDX,0x611 CALL 0x00139540 LAB_0015f352: LEA RDI,[0x1ba55e] LEA RSI,[0x1b9da8] LEA RCX,[0x1bab72] MOV EDX,0x60e CALL 0x00139540
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(OpenSubdiv::v3_6_0::Far::SparseMatrix<double>&, double*, int*) const */ void __thiscall OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic (GregoryTriConverter<double> *this,SparseMatrix *param_1,double *param_2,int *param_3) { ushort uVar1; int iVar2; bool bVar3; bool bVar4; long lVar5; long lVar6; int8 *puVar7; ulong uVar8; long lVar9; double dVar10; uint local_c8 [2]; long local_c0; long local_b8; int local_b0 [2]; long local_a8; long local_a0; int8 local_98; int8 uStack_90; int8 local_88; int8 uStack_80; int8 local_78; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 uStack_38; local_98 = _DAT_001b9370; uStack_90 = _UNK_001b9378; local_88 = _DAT_001b9380; uStack_80 = _UNK_001b9388; local_78 = 0x3ff0000000000000; local_48 = 0; local_68 = _DAT_001b9390; uStack_60 = _UNK_001b9398; local_58 = _DAT_001b93a0; uStack_50 = _UNK_001b93a8; uStack_40 = _DAT_001b93b0; uStack_38 = _UNK_001b93b8; lVar9 = 0; dVar10 = DAT_001b93f0; do { iVar2 = *(int *)(*(long *)(param_1 + 0x10) + lVar9 * 0x14); local_b0[0] = *(int *)(*(long *)(param_1 + 0x10) + 4 + lVar9 * 0x14) - iVar2; local_a8 = (long)iVar2 * 4 + *(long *)(param_1 + 0x28); local_a0 = (long)iVar2 * 8 + *(long *)(param_1 + 0x40); lVar5 = 0; bVar4 = true; do { bVar3 = bVar4; lVar6 = *(long *)(param_1 + 0x10) + lVar9 * 0x14; iVar2 = *(int *)(lVar6 + 4 + lVar5 * 4); local_c8[0] = *(int *)(lVar6 + 8 + lVar5 * 4) - iVar2; local_c0 = (long)iVar2 * 4 + *(long *)(param_1 + 0x28); local_b8 = (long)iVar2 * 8 + *(long *)(param_1 + 0x40); uVar1 = *(ushort *)(this + lVar9 * 0xb0 + 0x18); if ((char)((uVar1 & 2) >> 1) == '\0' && (uVar1 & ((byte)~bVar3 & 1) * 0x40 + 0x40) != 0) { puVar7 = &DAT_001b9d70; if (local_c8[0] != 3) { /* WARNING: Subroutine does not return */ __assert_fail("E.GetSize() == 3", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x60a, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight *, int *) const [REAL = double]" ); } LAB_0015f25c: uVar8 = 0; do { *(double *)(local_b8 + uVar8 * 8) = (double)puVar7[uVar8] * dVar10; uVar8 = uVar8 + 1; } while (local_c8[0] != uVar8); } else { if ((uVar1 & 8) != 0) { if ((uVar1 & 1) == 0) { puVar7 = &local_68; if (local_c8[0] != 7) { /* WARNING: Subroutine does not return */ __assert_fail("E.GetSize() == 7", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x611, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight *, int *) const [REAL = double]" ); } } else { puVar7 = &local_98; if (local_c8[0] != 5) { /* WARNING: Subroutine does not return */ __assert_fail("E.GetSize() == 5", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/loopPatchBuilder.cpp" ,0x60e, "void OpenSubdiv::v3_6_0::Far::GregoryTriConverter<double>::promoteCubicEdgePointsToQuartic(Matrix &, Weight *, int *) const [REAL = double]" ); } } goto LAB_0015f25c; } (anonymous_namespace)::_combineSparsePointsInFullRow<double> ((SparseMatrixRow *)local_c8,DAT_001b93c0,(SparseMatrixRow *)local_b0,DAT_001b9400 ,(SparseMatrixRow *)local_c8,*(int *)this,param_2,param_3); dVar10 = DAT_001b93f0; } lVar5 = 1; bVar4 = false; } while (bVar3); lVar9 = lVar9 + 1; if (lVar9 == 3) { return; } } while( true ); }
28,559
JS_GetPropertyInt64
bluesky950520[P]quickjs/quickjs.c
JSValue JS_GetPropertyInt64(JSContext *ctx, JSValue obj, int64_t idx) { JSAtom prop; JSValue val; if (likely(JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT && (uint64_t)idx <= INT32_MAX)) { /* fast path for array and typed array access */ JSObject *p = JS_VALUE_GET_OBJ(obj); if (js_get_fast_array_element(ctx, p, idx, &val)) return val; } prop = JS_NewAtomInt64(ctx, idx); if (prop == JS_ATOM_NULL) return JS_EXCEPTION; val = JS_GetProperty(ctx, obj, prop); JS_FreeAtom(ctx, prop); return val; }
O1
c
JS_GetPropertyInt64: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rsi, 0x10(%rsp) cmpl $-0x1, %r14d jne 0x24214 cmpq $0x7fffffff, %r12 # imm = 0x7FFFFFFF ja 0x24214 movq 0x10(%rsp), %rsi movq %rsp, %r13 movq %rbx, %rdi movl %r12d, %edx movq %r13, %rcx callq 0xf861 movq (%r13), %rcx movq %rcx, %r13 shrq $0x20, %r13 xorl %ebp, %ebp testl %eax, %eax cmovneq %rcx, %rbp je 0x24214 movq 0x8(%rsp), %r14 jmp 0x2426f movq %rbx, %rdi movq %r12, %rsi callq 0x2428a testl %eax, %eax je 0x24267 movl %eax, %r12d movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl %eax, %ecx movq %r15, %r8 movq %r14, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rax, %rbp movq %rdx, %r14 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq %rbx, %rdi movl %r12d, %esi callq 0x207d8 movq %rbp, %r13 shrq $0x20, %r13 jmp 0x2426f movl $0x6, %r14d xorl %ebp, %ebp shlq $0x20, %r13 movl %ebp, %eax orq %r13, %rax movq %r14, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_GetPropertyInt64: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rcx mov r14, rdx mov r15, rsi mov rbx, rdi mov [rsp+48h+var_38], rsi cmp r14d, 0FFFFFFFFh jnz short loc_24214 cmp r12, 7FFFFFFFh ja short loc_24214 mov rsi, [rsp+48h+var_38] mov r13, rsp mov rdi, rbx mov edx, r12d mov rcx, r13 call js_get_fast_array_element mov rcx, [r13+0] mov r13, rcx shr r13, 20h xor ebp, ebp test eax, eax cmovnz rbp, rcx jz short loc_24214 mov r14, [rsp+48h+var_40] jmp short loc_2426F loc_24214: mov rdi, rbx mov rsi, r12 call JS_NewAtomInt64 test eax, eax jz short loc_24267 mov r12d, eax mov rdi, rbx mov rsi, r15 mov rdx, r14 mov ecx, eax mov r8, r15 mov r9, r14 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov rbp, rax mov r14, rdx mov [rsp+48h+var_48], rax mov [rsp+48h+var_40], rdx mov rdi, rbx mov esi, r12d call JS_FreeAtom mov r13, rbp shr r13, 20h jmp short loc_2426F loc_24267: mov r14d, 6 xor ebp, ebp loc_2426F: shl r13, 20h mov eax, ebp or rax, r13 mov rdx, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long JS_GetPropertyInt64(long long a1, long long a2, long long a3, unsigned long long a4) { unsigned long long v4; // r13 int fast_array_element; // eax unsigned long long PropertyInternal2; // rbp unsigned int v9; // eax int v10; // r12d double v11; // rdx double v13[2]; // [rsp+0h] [rbp-48h] BYREF long long v14; // [rsp+10h] [rbp-38h] v14 = a2; if ( (_DWORD)a3 == -1 && a4 <= 0x7FFFFFFF && (fast_array_element = js_get_fast_array_element(a1, v14, a4, v13), v4 = HIDWORD(*(_QWORD *)&v13[0]), fast_array_element) ) { LODWORD(PropertyInternal2) = LODWORD(v13[0]); } else { v9 = JS_NewAtomInt64(a1, a4); if ( v9 ) { v10 = v9; PropertyInternal2 = JS_GetPropertyInternal2(a1, a2, a3, v9, a2, a3, 0LL, 0); *(_QWORD *)&v13[0] = PropertyInternal2; v13[1] = v11; JS_FreeAtom(a1, v10); v4 = HIDWORD(PropertyInternal2); } else { LODWORD(PropertyInternal2) = 0; } } return (v4 << 32) | (unsigned int)PropertyInternal2; }
28,560
JS_GetPropertyInt64
bluesky950520[P]quickjs/quickjs.c
JSValue JS_GetPropertyInt64(JSContext *ctx, JSValue obj, int64_t idx) { JSAtom prop; JSValue val; if (likely(JS_VALUE_GET_TAG(obj) == JS_TAG_OBJECT && (uint64_t)idx <= INT32_MAX)) { /* fast path for array and typed array access */ JSObject *p = JS_VALUE_GET_OBJ(obj); if (js_get_fast_array_element(ctx, p, idx, &val)) return val; } prop = JS_NewAtomInt64(ctx, idx); if (prop == JS_ATOM_NULL) return JS_EXCEPTION; val = JS_GetProperty(ctx, obj, prop); JS_FreeAtom(ctx, prop); return val; }
O2
c
JS_GetPropertyInt64: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r12 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movabsq $-0x100000000, %r13 # imm = 0xFFFFFFFF00000000 cmpl $-0x1, %r14d jne 0x1e1ce cmpq $0x7fffffff, %r12 # imm = 0x7FFFFFFF ja 0x1e1ce leaq 0x8(%rsp), %rcx movq %rbx, %rdi movq %r15, %rsi movl %r12d, %edx callq 0x1e226 testl %eax, %eax je 0x1e1ce movq 0x8(%rsp), %r15 movq 0x10(%rsp), %r14 jmp 0x1e1ff movq %rbx, %rdi movq %r12, %rsi callq 0x1e3a6 testl %eax, %eax je 0x1e21a movl %eax, %ebp movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movl %eax, %ecx callq 0x1b043 movq %rax, %r15 movq %rdx, %r14 movq %rbx, %rdi movl %ebp, %esi callq 0x1a995 andq %r15, %r13 movl %r15d, %eax orq %r13, %rax movq %r14, %rdx addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x6 popq %r14 xorl %r15d, %r15d xorl %r13d, %r13d jmp 0x1e202
JS_GetPropertyInt64: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rcx mov r14, rdx mov r15, rsi mov rbx, rdi mov r13, 0FFFFFFFF00000000h cmp r14d, 0FFFFFFFFh jnz short loc_1E1CE cmp r12, 7FFFFFFFh ja short loc_1E1CE lea rcx, [rsp+48h+var_40] mov rdi, rbx mov rsi, r15 mov edx, r12d call js_get_fast_array_element test eax, eax jz short loc_1E1CE mov r15, [rsp+48h+var_40] mov r14, [rsp+48h+var_38] jmp short loc_1E1FF loc_1E1CE: mov rdi, rbx mov rsi, r12 call JS_NewAtomInt64 test eax, eax jz short loc_1E21A mov ebp, eax mov rdi, rbx mov rsi, r15 mov rdx, r14 mov ecx, eax call JS_GetProperty mov r15, rax mov r14, rdx mov rdi, rbx mov esi, ebp call JS_FreeAtom loc_1E1FF: and r13, r15 loc_1E202: mov eax, r15d or rax, r13 mov rdx, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1E21A: push 6 pop r14 xor r15d, r15d xor r13d, r13d jmp short loc_1E202
unsigned long long JS_GetPropertyInt64(long long a1, long long a2, int a3, unsigned long long a4) { long long Property; // r15 int v7; // eax int v8; // ebp unsigned long long v9; // r13 long long v11; // [rsp+8h] [rbp-40h] BYREF if ( a3 == -1 && a4 <= 0x7FFFFFFF && (unsigned int)js_get_fast_array_element(a1, a2, (unsigned int)a4, &v11) ) { Property = v11; } else { v7 = JS_NewAtomInt64(a1, a4); if ( !v7 ) { LODWORD(Property) = 0; v9 = 0LL; return v9 | (unsigned int)Property; } v8 = v7; Property = JS_GetProperty(a1, a2, a3, v7); JS_FreeAtom(a1, v8); } v9 = Property & 0xFFFFFFFF00000000LL; return v9 | (unsigned int)Property; }
JS_GetPropertyInt64: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RCX MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV R13,-0x100000000 CMP R14D,-0x1 JNZ 0x0011e1ce CMP R12,0x7fffffff JA 0x0011e1ce LEA RCX,[RSP + 0x8] MOV RDI,RBX MOV RSI,R15 MOV EDX,R12D CALL 0x0011e226 TEST EAX,EAX JZ 0x0011e1ce MOV R15,qword ptr [RSP + 0x8] MOV R14,qword ptr [RSP + 0x10] JMP 0x0011e1ff LAB_0011e1ce: MOV RDI,RBX MOV RSI,R12 CALL 0x0011e3a6 TEST EAX,EAX JZ 0x0011e21a MOV EBP,EAX MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV ECX,EAX CALL 0x0011b043 MOV R15,RAX MOV R14,RDX MOV RDI,RBX MOV ESI,EBP CALL 0x0011a995 LAB_0011e1ff: AND R13,R15 LAB_0011e202: MOV EAX,R15D OR RAX,R13 MOV RDX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011e21a: PUSH 0x6 POP R14 XOR R15D,R15D XOR R13D,R13D JMP 0x0011e202
int1 [16] JS_GetPropertyInt64(int8 param_1,int8 param_2,int8 param_3,ulong param_4) { int iVar1; ulong uVar2; int1 auVar3 [16]; int1 auVar4 [16]; ulong local_40; int8 local_38; if (((int)param_3 == -1) && (param_4 < 0x80000000)) { iVar1 = js_get_fast_array_element(param_1,param_2,param_4 & 0xffffffff,&local_40); auVar3._8_8_ = local_38; auVar3._0_8_ = local_40; if (iVar1 == 0) goto LAB_0011e1ce; } else { LAB_0011e1ce: iVar1 = JS_NewAtomInt64(param_1,param_4); if (iVar1 == 0) { auVar3 = ZEXT816(6) << 0x40; uVar2 = 0; goto LAB_0011e202; } auVar3 = JS_GetProperty(param_1,param_2,param_3,iVar1); JS_FreeAtom(param_1,iVar1); } uVar2 = auVar3._0_8_ & 0xffffffff00000000; LAB_0011e202: auVar4._0_8_ = auVar3._0_8_ & 0xffffffff | uVar2; auVar4._8_8_ = auVar3._8_8_; return auVar4; }
28,561
my_hash_reset
eloqsql/mysys/hash.c
void my_hash_reset(HASH *hash) { DBUG_ENTER("my_hash_reset"); DBUG_PRINT("enter",("hash:%p", hash)); my_hash_free_elements(hash); reset_dynamic(&hash->array); /* Set row pointers so that the hash can be reused at once */ hash->blength= 1; DBUG_VOID_RETURN; }
O3
c
my_hash_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x943dc movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x943dc movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x943cc movl $0x0, 0x30(%rbx) movq $0x1, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_reset: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_943DC mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_943DC mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_943CC: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_943CC loc_943DC: mov dword ptr [rbx+30h], 0 mov qword ptr [rbx+10h], 1 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_reset(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; result = (*(long long ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 16) = 1LL; return result; }
my_hash_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x001943dc MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x001943dc MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_001943cc: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x001943cc LAB_001943dc: MOV dword ptr [RBX + 0x30],0x0 MOV qword ptr [RBX + 0x10],0x1 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_reset(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int4 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x10) = 1; return; }
28,562
wt_thd_will_wait_for
eloqsql/mysys/waiting_threads.c
int wt_thd_will_wait_for(WT_THD *thd, WT_THD *blocker, const WT_RESOURCE_ID *resid) { uint i; WT_RESOURCE *rc; DBUG_ENTER("wt_thd_will_wait_for"); DBUG_PRINT("wt", ("enter: thd=%s, blocker=%s, resid=%lu", thd->name, blocker->name, (ulong)resid->value)); if (fix_thd_pins(thd)) DBUG_RETURN(WT_DEADLOCK); if (thd->waiting_for == 0) { uint keylen; const void *key; /* XXX if (restype->make_key) key= restype->make_key(resid, &keylen); else */ { key= resid; keylen= sizeof_WT_RESOURCE_ID; } DBUG_PRINT("wt", ("first blocker")); retry: while ((rc= lf_hash_search(&reshash, thd->pins, key, keylen)) == 0) { DBUG_PRINT("wt", ("failed to find rc in hash, inserting")); if (lf_hash_insert(&reshash, thd->pins, resid) == -1) /* if OOM */ DBUG_RETURN(WT_DEADLOCK); /* Two cases: either lf_hash_insert() failed - because another thread has just inserted a resource with the same id - and we need to retry. Or lf_hash_insert() succeeded, and then we need to repeat lf_hash_search() to find a real address of the newly inserted element. That is, we don't care what lf_hash_insert() has returned. And we need to repeat the loop anyway. */ } if (rc == MY_ERRPTR) DBUG_RETURN(WT_DEADLOCK); DBUG_PRINT("wt", ("found in hash rc=%p", rc)); rc_wrlock(rc); if (rc->state != ACTIVE) { DBUG_PRINT("wt", ("but it's not active, retrying")); /* Somebody has freed the element while we weren't looking */ rc_unlock(rc); lf_hash_search_unpin(thd->pins); goto retry; } lf_hash_search_unpin(thd->pins); /* the element cannot go away anymore */ thd->waiting_for= rc; rc->waiter_count++; thd->killed= 0; } else { DBUG_ASSERT(thd->waiting_for->id.type == resid->type); DBUG_ASSERT(resid->type->compare(&thd->waiting_for->id, resid) == 0); DBUG_PRINT("wt", ("adding another blocker")); /* we can safely access the resource here, it's in the hash as it has non-zero waiter_count */ rc= thd->waiting_for; rc_wrlock(rc); DBUG_ASSERT(rc->waiter_count); DBUG_ASSERT(rc->state == ACTIVE); if (thd->killed) { stop_waiting_locked(thd); DBUG_RETURN(WT_DEADLOCK); } } /* Another thread could be waiting on this resource for this very 'blocker'. In this case we should not add it to the list for the second time. */ for (i= 0; i < rc->owners.elements; i++) if (*dynamic_element(&rc->owners, i, WT_THD**) == blocker) break; if (i >= rc->owners.elements) { if (push_dynamic(&blocker->my_resources, (void*)&rc)) { stop_waiting_locked(thd); DBUG_RETURN(WT_DEADLOCK); /* deadlock and OOM use the same error code */ } if (push_dynamic(&rc->owners, (void*)&blocker)) { pop_dynamic(&blocker->my_resources); stop_waiting_locked(thd); DBUG_RETURN(WT_DEADLOCK); } } rc_unlock(rc); if (deadlock(thd, blocker, 1, *thd->deadlock_search_depth_short) != WT_OK) { stop_waiting(thd); DBUG_RETURN(WT_DEADLOCK); } DBUG_RETURN(WT_OK); }
O3
c
wt_thd_will_wait_for: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbx movq %rsi, -0x38(%rbp) cmpq $0x0, 0x30(%rdi) je 0xa7cf7 movq 0x28(%rbx), %r15 testq %r15, %r15 je 0xa7b9d movq %r15, -0x30(%rbp) leaq 0x18(%r15), %rdi callq 0xa5371 cmpb $0x0, 0x60(%rbx) jne 0xa7c65 jmp 0xa7c32 movq %r14, -0x40(%rbp) leaq 0xb631d8(%rip), %r13 # 0xc0ad80 movq 0x30(%rbx), %rsi movq %r13, %rdi movq %r12, %rdx movl $0x10, %ecx callq 0x2fc5f movl $0xffffffff, %r14d # imm = 0xFFFFFFFF testq %rax, %rax je 0xa7c02 movq %rax, %r15 cmpq $0x1, %rax je 0xa7c82 movq %r15, -0x30(%rbp) movq %r15, %r14 addq $0x18, %r14 movq %r14, %rdi callq 0xa5371 cmpl $0x0, 0x14(%r15) je 0xa7c18 movq %r14, %rdi callq 0xa5412 movq 0x30(%rbx), %rax xorl %ecx, %ecx xchgq %rcx, 0x10(%rax) jmp 0xa7ba8 movq 0x30(%rbx), %rsi movq %r13, %rdi movq %r12, %rdx callq 0x2f400 cmpl $-0x1, %eax jne 0xa7ba8 jmp 0xa7c82 movq 0x30(%rbx), %rax xorl %ecx, %ecx xchgq %rcx, 0x10(%rax) movq %r15, 0x28(%rbx) incl 0x10(%r15) movb $0x0, 0x60(%rbx) movq -0x40(%rbp), %r14 movl 0xe8(%r15), %eax testq %rax, %rax je 0xa7c55 movq 0xe0(%r15), %rcx xorl %edx, %edx cmpq %r14, (%rcx,%rdx,8) je 0xa7cc1 incq %rdx cmpq %rdx, %rax jne 0xa7c47 leaq -0x30(%rbp), %rsi movq %r14, %rdi callq 0x92af2 testb %al, %al je 0xa7c94 movq 0x28(%rbx), %rsi decl 0x10(%rsi) movq $0x0, 0x28(%rbx) movq %rbx, %rdi callq 0xa81f1 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xe0, %edi addq -0x30(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x92af2 testb %al, %al je 0xa7cbd movq -0x38(%rbp), %rdi callq 0x92be7 movq %rbx, %rdi callq 0xa7d15 jmp 0xa7c7c movq -0x30(%rbp), %r15 addq $0x18, %r15 movq %r15, %rdi callq 0xa5412 movq -0x38(%rbp), %rsi movq 0x40(%rbx), %rax movl (%rax), %ecx movq %rbx, %rdi movl $0x1, %edx callq 0xa7d2e testl %eax, %eax je 0xa7cf2 movq %rbx, %rdi callq 0xa7e66 jmp 0xa7c7c xorl %r14d, %r14d jmp 0xa7c82 leaq 0xb630aa(%rip), %rdi # 0xc0ada8 callq 0x2f225 movq %rax, 0x30(%rbx) testq %rax, %rax jne 0xa7b78 jmp 0xa7c7c
wt_thd_will_wait_for: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx mov r14, rsi mov rbx, rdi mov [rbp+var_38], rsi cmp qword ptr [rdi+30h], 0 jz loc_A7CF7 loc_A7B78: mov r15, [rbx+28h] test r15, r15 jz short loc_A7B9D mov [rbp+var_30], r15 lea rdi, [r15+18h] call my_rw_wrlock cmp byte ptr [rbx+60h], 0 jnz loc_A7C65 jmp loc_A7C32 loc_A7B9D: mov [rbp+var_40], r14 lea r13, reshash loc_A7BA8: mov rsi, [rbx+30h] mov rdi, r13 mov rdx, r12 mov ecx, 10h call lf_hash_search mov r14d, 0FFFFFFFFh test rax, rax jz short loc_A7C02 mov r15, rax cmp rax, 1 jz loc_A7C82 mov [rbp+var_30], r15 mov r14, r15 add r14, 18h mov rdi, r14 call my_rw_wrlock cmp dword ptr [r15+14h], 0 jz short loc_A7C18 mov rdi, r14 call my_rw_unlock mov rax, [rbx+30h] xor ecx, ecx xchg rcx, [rax+10h] jmp short loc_A7BA8 loc_A7C02: mov rsi, [rbx+30h] mov rdi, r13 mov rdx, r12 call lf_hash_insert cmp eax, 0FFFFFFFFh jnz short loc_A7BA8 jmp short loc_A7C82 loc_A7C18: mov rax, [rbx+30h] xor ecx, ecx xchg rcx, [rax+10h] mov [rbx+28h], r15 inc dword ptr [r15+10h] mov byte ptr [rbx+60h], 0 mov r14, [rbp+var_40] loc_A7C32: mov eax, [r15+0E8h] test rax, rax jz short loc_A7C55 mov rcx, [r15+0E0h] xor edx, edx loc_A7C47: cmp [rcx+rdx*8], r14 jz short loc_A7CC1 inc rdx cmp rax, rdx jnz short loc_A7C47 loc_A7C55: lea rsi, [rbp+var_30] mov rdi, r14 call insert_dynamic test al, al jz short loc_A7C94 loc_A7C65: mov rsi, [rbx+28h] dec dword ptr [rsi+10h] mov qword ptr [rbx+28h], 0 mov rdi, rbx call unlock_lock_and_free_resource loc_A7C7C: mov r14d, 0FFFFFFFFh loc_A7C82: mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A7C94: mov edi, 0E0h add rdi, [rbp+var_30] lea rsi, [rbp+var_38] call insert_dynamic test al, al jz short loc_A7CBD mov rdi, [rbp+var_38] call pop_dynamic mov rdi, rbx call stop_waiting_locked jmp short loc_A7C7C loc_A7CBD: mov r15, [rbp+var_30] loc_A7CC1: add r15, 18h mov rdi, r15 call my_rw_unlock mov rsi, [rbp+var_38] mov rax, [rbx+40h] mov ecx, [rax] mov rdi, rbx mov edx, 1 call deadlock test eax, eax jz short loc_A7CF2 mov rdi, rbx call stop_waiting jmp short loc_A7C7C loc_A7CF2: xor r14d, r14d jmp short loc_A7C82 loc_A7CF7: lea rdi, unk_C0ADA8 call lf_pinbox_get_pins mov [rbx+30h], rax test rax, rax jnz loc_A7B78 jmp loc_A7C7C
long long wt_thd_will_wait_for(long long a1, long long a2, long long a3) { long long v4; // r14 long long v5; // r15 long long v6; // rax unsigned int v7; // r14d long long v8; // rdx long long pins; // rax long long v11; // [rsp+8h] [rbp-38h] BYREF long long v12[6]; // [rsp+10h] [rbp-30h] BYREF v4 = a2; v11 = a2; if ( !*(_QWORD *)(a1 + 48) ) { pins = lf_pinbox_get_pins((long long)&unk_C0ADA8); *(_QWORD *)(a1 + 48) = pins; if ( !pins ) return (unsigned int)-1; } v5 = *(_QWORD *)(a1 + 40); if ( v5 ) { v12[0] = *(_QWORD *)(a1 + 40); my_rw_wrlock(v5 + 24); if ( *(_BYTE *)(a1 + 96) ) goto LABEL_17; } else { while ( 1 ) { while ( 1 ) { v6 = lf_hash_search((long long)&reshash, *(volatile long long **)(a1 + 48), a3, 0x10u); v7 = -1; if ( v6 ) break; if ( (unsigned int)lf_hash_insert((long long)&reshash, *(_QWORD *)(a1 + 48), a3) == -1 ) return v7; } v5 = v6; if ( v6 == 1 ) return v7; v12[0] = v6; my_rw_wrlock(v6 + 24); if ( !*(_DWORD *)(v5 + 20) ) break; my_rw_unlock(v5 + 24); _InterlockedExchange64((volatile long long *)(*(_QWORD *)(a1 + 48) + 16LL), 0LL); } _InterlockedExchange64((volatile long long *)(*(_QWORD *)(a1 + 48) + 16LL), 0LL); *(_QWORD *)(a1 + 40) = v5; ++*(_DWORD *)(v5 + 16); *(_BYTE *)(a1 + 96) = 0; v4 = a2; } if ( !*(_DWORD *)(v5 + 232) ) { LABEL_16: if ( !(unsigned __int8)insert_dynamic(v4, (long long)v12) ) { if ( (unsigned __int8)insert_dynamic(v12[0] + 224, (long long)&v11) ) { pop_dynamic(v11); stop_waiting_locked(a1); return (unsigned int)-1; } v5 = v12[0]; goto LABEL_23; } LABEL_17: --*(_DWORD *)(*(_QWORD *)(a1 + 40) + 16LL); *(_QWORD *)(a1 + 40) = 0LL; unlock_lock_and_free_resource(a1); return (unsigned int)-1; } v8 = 0LL; while ( *(_QWORD *)(*(_QWORD *)(v5 + 224) + 8 * v8) != v4 ) { if ( *(_DWORD *)(v5 + 232) == ++v8 ) goto LABEL_16; } LABEL_23: my_rw_unlock(v5 + 24); if ( !(unsigned int)deadlock(a1, v11, 1LL, **(unsigned int **)(a1 + 64)) ) return 0; stop_waiting(a1); return (unsigned int)-1; }
wt_thd_will_wait_for: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX MOV R14,RSI MOV RBX,RDI MOV qword ptr [RBP + -0x38],RSI CMP qword ptr [RDI + 0x30],0x0 JZ 0x001a7cf7 LAB_001a7b78: MOV R15,qword ptr [RBX + 0x28] TEST R15,R15 JZ 0x001a7b9d MOV qword ptr [RBP + -0x30],R15 LEA RDI,[R15 + 0x18] CALL 0x001a5371 CMP byte ptr [RBX + 0x60],0x0 JNZ 0x001a7c65 JMP 0x001a7c32 LAB_001a7b9d: MOV qword ptr [RBP + -0x40],R14 LEA R13,[0xd0ad80] LAB_001a7ba8: MOV RSI,qword ptr [RBX + 0x30] MOV RDI,R13 MOV RDX,R12 MOV ECX,0x10 CALL 0x0012fc5f MOV R14D,0xffffffff TEST RAX,RAX JZ 0x001a7c02 MOV R15,RAX CMP RAX,0x1 JZ 0x001a7c82 MOV qword ptr [RBP + -0x30],R15 MOV R14,R15 ADD R14,0x18 MOV RDI,R14 CALL 0x001a5371 CMP dword ptr [R15 + 0x14],0x0 JZ 0x001a7c18 MOV RDI,R14 CALL 0x001a5412 MOV RAX,qword ptr [RBX + 0x30] XOR ECX,ECX XCHG qword ptr [RAX + 0x10],RCX JMP 0x001a7ba8 LAB_001a7c02: MOV RSI,qword ptr [RBX + 0x30] MOV RDI,R13 MOV RDX,R12 CALL 0x0012f400 CMP EAX,-0x1 JNZ 0x001a7ba8 JMP 0x001a7c82 LAB_001a7c18: MOV RAX,qword ptr [RBX + 0x30] XOR ECX,ECX XCHG qword ptr [RAX + 0x10],RCX MOV qword ptr [RBX + 0x28],R15 INC dword ptr [R15 + 0x10] MOV byte ptr [RBX + 0x60],0x0 MOV R14,qword ptr [RBP + -0x40] LAB_001a7c32: MOV EAX,dword ptr [R15 + 0xe8] TEST RAX,RAX JZ 0x001a7c55 MOV RCX,qword ptr [R15 + 0xe0] XOR EDX,EDX LAB_001a7c47: CMP qword ptr [RCX + RDX*0x8],R14 JZ 0x001a7cc1 INC RDX CMP RAX,RDX JNZ 0x001a7c47 LAB_001a7c55: LEA RSI,[RBP + -0x30] MOV RDI,R14 CALL 0x00192af2 TEST AL,AL JZ 0x001a7c94 LAB_001a7c65: MOV RSI,qword ptr [RBX + 0x28] DEC dword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x28],0x0 MOV RDI,RBX CALL 0x001a81f1 LAB_001a7c7c: MOV R14D,0xffffffff LAB_001a7c82: MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a7c94: MOV EDI,0xe0 ADD RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x38] CALL 0x00192af2 TEST AL,AL JZ 0x001a7cbd MOV RDI,qword ptr [RBP + -0x38] CALL 0x00192be7 MOV RDI,RBX CALL 0x001a7d15 JMP 0x001a7c7c LAB_001a7cbd: MOV R15,qword ptr [RBP + -0x30] LAB_001a7cc1: ADD R15,0x18 MOV RDI,R15 CALL 0x001a5412 MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBX + 0x40] MOV ECX,dword ptr [RAX] MOV RDI,RBX MOV EDX,0x1 CALL 0x001a7d2e TEST EAX,EAX JZ 0x001a7cf2 MOV RDI,RBX CALL 0x001a7e66 JMP 0x001a7c7c LAB_001a7cf2: XOR R14D,R14D JMP 0x001a7c82 LAB_001a7cf7: LEA RDI,[0xd0ada8] CALL 0x0012f225 MOV qword ptr [RBX + 0x30],RAX TEST RAX,RAX JNZ 0x001a7b78 JMP 0x001a7c7c
int8 wt_thd_will_wait_for(long param_1,long param_2,int8 param_3) { int *piVar1; char cVar2; int iVar3; long lVar4; ulong uVar5; long local_40; long local_38; local_40 = param_2; if (*(long *)(param_1 + 0x30) == 0) { lVar4 = lf_pinbox_get_pins(0xd0ada8); *(long *)(param_1 + 0x30) = lVar4; if (lVar4 == 0) { return 0xffffffff; } } lVar4 = *(long *)(param_1 + 0x28); if (lVar4 == 0) { while( true ) { while (lVar4 = lf_hash_search(reshash,*(int8 *)(param_1 + 0x30),param_3), lVar4 == 0) { iVar3 = lf_hash_insert(reshash,*(int8 *)(param_1 + 0x30),param_3); if (iVar3 == -1) { return 0xffffffff; } } if (lVar4 == 1) { return 0xffffffff; } local_38 = lVar4; my_rw_wrlock(lVar4 + 0x18); if (*(int *)(lVar4 + 0x14) == 0) break; my_rw_unlock(lVar4 + 0x18); LOCK(); *(int8 *)(*(long *)(param_1 + 0x30) + 0x10) = 0; UNLOCK(); } LOCK(); *(int8 *)(*(long *)(param_1 + 0x30) + 0x10) = 0; UNLOCK(); *(long *)(param_1 + 0x28) = lVar4; *(int *)(lVar4 + 0x10) = *(int *)(lVar4 + 0x10) + 1; *(int1 *)(param_1 + 0x60) = 0; } else { local_38 = lVar4; my_rw_wrlock(lVar4 + 0x18); if (*(char *)(param_1 + 0x60) != '\0') goto LAB_001a7c65; } if ((ulong)*(uint *)(lVar4 + 0xe8) != 0) { uVar5 = 0; do { if (*(long *)(*(long *)(lVar4 + 0xe0) + uVar5 * 8) == param_2) goto LAB_001a7cc1; uVar5 = uVar5 + 1; } while (*(uint *)(lVar4 + 0xe8) != uVar5); } cVar2 = insert_dynamic(param_2,&local_38); if (cVar2 == '\0') { cVar2 = insert_dynamic(local_38 + 0xe0,&local_40); lVar4 = local_38; if (cVar2 != '\0') { pop_dynamic(local_40); stop_waiting_locked(param_1); return 0xffffffff; } LAB_001a7cc1: my_rw_unlock(lVar4 + 0x18); iVar3 = deadlock(param_1,local_40,1,**(int4 **)(param_1 + 0x40)); if (iVar3 != 0) { stop_waiting(param_1); return 0xffffffff; } return 0; } LAB_001a7c65: piVar1 = (int *)(*(long *)(param_1 + 0x28) + 0x10); *piVar1 = *piVar1 + -1; *(int8 *)(param_1 + 0x28) = 0; unlock_lock_and_free_resource(param_1); return 0xffffffff; }
28,563
inline_mysql_file_chsize
eloqsql/include/mysql/psi/mysql_file.h
static inline int inline_mysql_file_chsize( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, my_off_t newlength, int filler, myf flags) { int result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_CHSIZE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, (size_t) newlength, src_file, src_line); result= my_chsize(file, newlength, filler, flags); PSI_FILE_CALL(end_file_wait)(locker, (size_t) newlength); return result; } #endif result= my_chsize(file, newlength, filler, flags); return result; }
O0
c
inline_mysql_file_chsize: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x233d20(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0xd, %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 0x8c432 leaq 0x233cda(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xef4a0 movl %eax, -0x34(%rbp) leaq 0x233ca2(%rip), %rax # 0x2c00b8 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x20(%rbp), %rsi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x8c44e movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %edx movq -0x30(%rbp), %rcx callq 0xef4a0 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_chsize_2: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d 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, 0Dh 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 short loc_8C432 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_chsize mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_20] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_8C44E loc_8C432: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov edx, [rbp+var_24] mov rcx, [rbp+var_30] call my_chsize mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_8C44E: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_chsize_2( long long a1, unsigned int a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+78h] [rbp-18h] unsigned int v14; // [rsp+7Ch] [rbp-14h] long long v15; // [rsp+80h] [rbp-10h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v7, a3, 13LL); if ( v8 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v8, v12, v15, v14); v9 = my_chsize(v13, v12, v11, v10); ((void ( *)(long long, long long))PSI_server[67])(v8, v12); } else { return (unsigned int)my_chsize(v13, v12, v11, v10); } return v9; }
inline_mysql_file_chsize: PUSH RBP MOV RBP,RSP SUB RSP,0x90 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 dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0xd 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 0x0018c432 LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] 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 EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001ef4a0 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x3c00b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x0018c44e LAB_0018c432: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001ef4a0 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_0018c44e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_chsize (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_38 = param_6; local_2c = 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,0xd); if (local_48 == 0) { local_c = my_chsize(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_28,local_18,local_1c); local_3c = my_chsize(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,local_28); local_c = local_3c; } return local_c; }
28,564
my_mb_wc_utf8mb3_quick
eloqsql/strings/ctype-utf8.h
static inline int my_mb_wc_utf8mb3_quick(my_wc_t * pwc, const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0x80) { *pwc = c; return 1; } else if (c < 0xc2) return MY_CS_ILSEQ; else if (c < 0xe0) { if (s+2 > e) /* We need 2 characters */ return MY_CS_TOOSMALL2; if (!(IS_CONTINUATION_BYTE(s[1]))) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } else if (c < 0xf0) { if (s+3 > e) /* We need 3 characters */ return MY_CS_TOOSMALL3; if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_utf8mb3_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x64366 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x644e3 movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0x64393 movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x644e3 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0x643aa movl $0x0, -0x4(%rbp) jmp 0x644e3 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0x64420 movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x643cf movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x644e3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x643ed movl $0x0, -0x4(%rbp) jmp 0x644e3 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x644e3 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x644d6 movq -0x18(%rbp), %rax addq $0x3, %rax cmpq -0x20(%rbp), %rax jbe 0x64449 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x644e3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x64487 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x64487 movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0x64490 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x64490 movl $0x0, -0x4(%rbp) jmp 0x644e3 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x644e3 jmp 0x644d8 jmp 0x644da jmp 0x644dc movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
my_mb_wc_utf8mb3_quick_0: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_64366 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_644E3 loc_64366: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_64393 movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_644E3 loc_64393: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_643AA mov [rbp+var_4], 0 jmp loc_644E3 loc_643AA: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_64420 mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_643CF mov [rbp+var_4], 0FFFFFF9Ah jmp loc_644E3 loc_643CF: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_643ED mov [rbp+var_4], 0 jmp loc_644E3 loc_643ED: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_644E3 loc_64420: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_644D6 mov rax, [rbp+var_18] add rax, 3 cmp rax, [rbp+var_20] jbe short loc_64449 mov [rbp+var_4], 0FFFFFF99h jmp loc_644E3 loc_64449: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_64487 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_64487 movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_64490 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_64490 loc_64487: mov [rbp+var_4], 0 jmp short loc_644E3 loc_64490: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 3 jmp short loc_644E3 loc_644D6: jmp short $+2 loc_644D8: jmp short $+2 loc_644DA: jmp short $+2 loc_644DC: mov [rbp+var_4], 0 loc_644E3: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf8mb3_quick_0(unsigned long long *a1, unsigned __int8 *a2, unsigned long long a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( *a2 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { return 0; } else if ( (unsigned long long)(a2 + 3) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a2[1] >= 0xA0u) ) { *a1 = a2[2] ^ 0x80u | ((long long)(a2[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else { return (unsigned int)-103; } } else if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 ) { *a1 = a2[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return (unsigned int)-102; } } else { return 0; } } else { *a1 = v4; return 1; } } else { return (unsigned int)-101; } }
my_mb_wc_utf8mb3_quick: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x00164366 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001644e3 LAB_00164366: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x00164393 MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x001644e3 LAB_00164393: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x001643aa MOV dword ptr [RBP + -0x4],0x0 JMP 0x001644e3 LAB_001643aa: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x00164420 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x001643cf MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001644e3 LAB_001643cf: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x001643ed MOV dword ptr [RBP + -0x4],0x0 JMP 0x001644e3 LAB_001643ed: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x001644e3 LAB_00164420: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x001644d6 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00164449 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x001644e3 LAB_00164449: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00164487 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00164487 MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x00164490 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x00164490 LAB_00164487: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001644e3 LAB_00164490: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x001644e3 LAB_001644d6: JMP 0x001644d8 LAB_001644d8: JMP 0x001644da LAB_001644da: JMP 0x001644dc LAB_001644dc: MOV dword ptr [RBP + -0x4],0x0 LAB_001644e3: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf8mb3_quick(ulong *param_1,byte *param_2,byte *param_3) { byte bVar1; int4 local_c; if (param_2 < param_3) { bVar1 = *param_2; if (bVar1 < 0x80) { *param_1 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((param_2[1] ^ 0x80) < 0x40) { *param_1 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_2[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if (param_3 < param_2 + 3) { local_c = 0xffffff99; } else if ((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_2[1])))) { *param_1 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_2[1] ^ 0x80) << 6 | (long)(int)(param_2[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
28,565
gguf_get_kv_type
Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp
enum gguf_type gguf_get_kv_type(const struct gguf_context * ctx, int64_t key_id) { GGML_ASSERT(key_id >= 0 && key_id < gguf_get_n_kv(ctx)); return ctx->kv[key_id].is_array ? GGUF_TYPE_ARRAY : ctx->kv[key_id].get_type(); }
O1
cpp
gguf_get_kv_type: pushq %rax testq %rsi, %rsi js 0x3e8bc movq 0x8(%rdi), %rcx movq 0x10(%rdi), %rdx subq %rcx, %rdx sarq $0x3, %rdx movabsq $0x2e8ba2e8ba2e8ba3, %rax # imm = 0x2E8BA2E8BA2E8BA3 imulq %rax, %rdx cmpq %rsi, %rdx jle 0x3e8bc movq 0x10(%rdi), %rdx subq %rcx, %rdx sarq $0x3, %rdx imulq %rax, %rdx cmpq %rsi, %rdx jbe 0x3e8b7 imulq $0x58, %rsi, %rdx movl $0x9, %eax cmpb $0x0, 0x20(%rcx,%rdx) jne 0x3e8b5 addq %rdx, %rcx movl 0x24(%rcx), %eax popq %rcx retq callq 0x19a31 leaq 0x1e72a(%rip), %rdi # 0x5cfed leaq 0xdcf7(%rip), %rdx # 0x4c5c1 leaq 0x1eb92(%rip), %rcx # 0x5d463 movl $0x2fc, %esi # imm = 0x2FC xorl %eax, %eax callq 0x18ce0
gguf_get_kv_type: push rax test rsi, rsi js short loc_3E8BC mov rcx, [rdi+8] mov rdx, [rdi+10h] sub rdx, rcx sar rdx, 3 mov rax, 2E8BA2E8BA2E8BA3h imul rdx, rax cmp rdx, rsi jle short loc_3E8BC mov rdx, [rdi+10h] sub rdx, rcx sar rdx, 3 imul rdx, rax cmp rdx, rsi jbe short loc_3E8B7 imul rdx, rsi, 58h ; 'X' mov eax, 9 cmp byte ptr [rcx+rdx+20h], 0 jnz short loc_3E8B5 add rcx, rdx mov eax, [rcx+24h] loc_3E8B5: pop rcx retn loc_3E8B7: call gguf_get_kv_type_cold_1 loc_3E8BC: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeyId0KeyIdGgu; "key_id >= 0 && key_id < gguf_get_n_kv(c"... mov esi, 2FCh xor eax, eax call _ggml_abort
long long gguf_get_kv_type(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v6; // rcx long long result; // rax if ( a2 < 0 || (v6 = *(_QWORD *)(a1 + 8), 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v6) >> 3) <= a2) ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 764, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"key_id >= 0 && key_id < gguf_get_n_kv(ctx)", a5, a6); if ( 0x2E8BA2E8BA2E8BA3LL * ((*(_QWORD *)(a1 + 16) - v6) >> 3) <= (unsigned long long)a2 ) gguf_get_kv_type_cold_1(a1); result = 9LL; if ( !*(_BYTE *)(v6 + 88 * a2 + 32) ) return *(unsigned int *)(88 * a2 + v6 + 36); return result; }
gguf_get_kv_type: PUSH RAX TEST RSI,RSI JS 0x0013e8bc MOV RCX,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RDI + 0x10] SUB RDX,RCX SAR RDX,0x3 MOV RAX,0x2e8ba2e8ba2e8ba3 IMUL RDX,RAX CMP RDX,RSI JLE 0x0013e8bc MOV RDX,qword ptr [RDI + 0x10] SUB RDX,RCX SAR RDX,0x3 IMUL RDX,RAX CMP RDX,RSI JBE 0x0013e8b7 IMUL RDX,RSI,0x58 MOV EAX,0x9 CMP byte ptr [RCX + RDX*0x1 + 0x20],0x0 JNZ 0x0013e8b5 ADD RCX,RDX MOV EAX,dword ptr [RCX + 0x24] LAB_0013e8b5: POP RCX RET LAB_0013e8b7: CALL 0x00119a31 LAB_0013e8bc: LEA RDI,[0x15cfed] LEA RDX,[0x14c5c1] LEA RCX,[0x15d463] MOV ESI,0x2fc XOR EAX,EAX CALL 0x00118ce0
int4 gguf_get_kv_type(long param_1,ulong param_2) { long lVar1; int4 uVar2; long lVar3; ulong uVar4; if ((-1 < (long)param_2) && (lVar1 = *(long *)(param_1 + 8), lVar3 = (*(long *)(param_1 + 0x10) - lVar1 >> 3) * 0x2e8ba2e8ba2e8ba3, lVar3 - param_2 != 0 && (long)param_2 <= lVar3)) { uVar4 = (*(long *)(param_1 + 0x10) - lVar1 >> 3) * 0x2e8ba2e8ba2e8ba3; if (param_2 <= uVar4 && uVar4 - param_2 != 0) { uVar2 = 9; if (*(char *)(lVar1 + 0x20 + param_2 * 0x58) == '\0') { uVar2 = *(int4 *)(lVar1 + param_2 * 0x58 + 0x24); } return uVar2; } gguf_get_kv_type_cold_1(); } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/gguf.cpp", 0x2fc,"GGML_ASSERT(%s) failed","key_id >= 0 && key_id < gguf_get_n_kv(ctx)"); }
28,566
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__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>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x120(%rsp) movq %rsi, 0x118(%rsp) movl %edx, 0x114(%rsp) movq %rcx, 0x108(%rsp) movq 0x118(%rsp), %rax movq %rax, 0x10(%rsp) movb $0x0, 0x107(%rsp) leaq 0x106(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x56f00 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rdx leaq 0xf8b32(%rip), %rsi # 0x1e8e7d callq 0x66600 jmp 0xf0352 leaq 0x106(%rsp), %rdi callq 0x572b0 movq 0x108(%rsp), %rdi callq 0x56430 testb $0x1, %al jne 0xf042a movq 0x108(%rsp), %rdx movb $0x20, 0xcf(%rsp) leaq 0x10043d(%rip), %rsi # 0x1f07c8 leaq 0xd0(%rsp), %rdi leaq 0xcf(%rsp), %rcx callq 0xfb710 jmp 0xf03a2 movq 0x18(%rsp), %rdi leaq 0xd0(%rsp), %rsi callq 0x56130 jmp 0xf03b6 leaq 0xd0(%rsp), %rdi callq 0x572d0 jmp 0xf042a movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0x106(%rsp), %rdi callq 0x572b0 jmp 0xf0632 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) jmp 0xf0628 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0xd0(%rsp), %rdi callq 0x572d0 jmp 0xf0628 movq 0x18(%rsp), %rdi leaq 0xf8a55(%rip), %rsi # 0x1e8e8b callq 0x561e0 jmp 0xf043d movq 0x10(%rsp), %rax cmpl $0xe, 0x20(%rax) jne 0xf0525 movq 0x10(%rsp), %rdi addq $0x28, %rdi movq %rdi, (%rsp) callq 0xfb8a0 movq (%rsp), %rsi movq %rax, 0xa0(%rsp) leaq 0x80(%rsp), %rdi callq 0xeff30 jmp 0xf0479 movb $0x27, 0x7f(%rsp) leaq 0xf8a09(%rip), %rdx # 0x1e8e8e leaq 0xa8(%rsp), %rdi leaq 0xa0(%rsp), %rsi leaq 0x80(%rsp), %rcx leaq 0x7f(%rsp), %r8 callq 0xfb7d0 jmp 0xf04a9 movq 0x18(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0x56130 jmp 0xf04bd leaq 0xa8(%rsp), %rdi callq 0x572d0 leaq 0x80(%rsp), %rdi callq 0x572d0 jmp 0xf058f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) jmp 0xf0513 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0xa8(%rsp), %rdi callq 0x572d0 leaq 0x80(%rsp), %rdi callq 0x572d0 jmp 0xf0628 movq 0x10(%rsp), %rax movl 0x20(%rax), %edi callq 0xfb960 movq %rax, 0x50(%rsp) leaq 0xf895f(%rip), %rsi # 0x1e8e9d leaq 0x58(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0xfb8b0 jmp 0xf054f movq 0x18(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x56130 jmp 0xf0560 leaq 0x58(%rsp), %rdi callq 0x572d0 jmp 0xf058f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0x58(%rsp), %rdi callq 0x572d0 jmp 0xf0628 cmpl $0x0, 0x114(%rsp) je 0xf05ff movl 0x114(%rsp), %edi callq 0xfb960 movq %rax, 0x28(%rsp) leaq 0xf88f8(%rip), %rsi # 0x1e8ea9 leaq 0x30(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0xfb8b0 jmp 0xf05c2 movq 0x18(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x56130 jmp 0xf05d3 leaq 0x30(%rsp), %rdi callq 0x572d0 jmp 0xf05ff movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0x30(%rsp), %rdi callq 0x572d0 jmp 0xf0628 movb $0x1, 0x107(%rsp) testb $0x1, 0x107(%rsp) jne 0xf061b movq 0x18(%rsp), %rdi callq 0x572d0 movq 0x8(%rsp), %rax addq $0x128, %rsp # imm = 0x128 retq movq 0x18(%rsp), %rdi callq 0x572d0 movq 0xf8(%rsp), %rdi callq 0x56a10 nop
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: sub rsp, 128h mov [rsp+128h+var_110], rdi; __int64 mov rax, rdi mov [rsp+128h+var_120], rax; void * mov [rsp+128h+var_8], rdi mov qword ptr [rsp+128h+var_10], rsi mov [rsp+128h+var_14], edx mov [rsp+128h+var_22+2], rcx mov rax, qword ptr [rsp+128h+var_10] mov qword ptr [rsp+128h+var_118], rax; int mov byte ptr [rsp+128h+var_22+1], 0 lea rdi, [rsp+128h+var_22] mov [rsp+128h+var_108], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+128h+var_110] mov rdx, [rsp+128h+var_108] lea rsi, aSyntaxError; "syntax error " call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_F0352: lea rdi, [rsp+128h+var_22] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+128h+var_22+2] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz loc_F042A mov rdx, [rsp+128h+var_22+2]; int mov byte ptr [rsp+128h+var_59], 20h ; ' ' lea rsi, aSyntaxErrorWhi+0Dh; int lea rdi, [rsp+128h+var_59+1]; int lea rcx, [rsp+128h+var_59]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&) jmp short $+2 loc_F03A2: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_59+1] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_F03B6: lea rdi, [rsp+128h+var_59+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_F042A mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_FE] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_F0632 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax jmp loc_F0628 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_F0628 loc_F042A: mov rdi, [rsp+128h+var_110] lea rsi, asc_1E8E8B; "- " call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_F043D: mov rax, qword ptr [rsp+128h+var_118] cmp dword ptr [rax+20h], 0Eh jnz loc_F0525 mov rdi, qword ptr [rsp+128h+var_118] add rdi, 28h ; '(' mov qword ptr [rsp+128h+var_128], rdi; int call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_error_messageEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_error_message(void) mov rsi, qword ptr [rsp+128h+var_128]; int mov [rsp+128h+var_88], rax lea rdi, [rsp+128h+var_A8]; int call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) jmp short $+2 loc_F0479: mov [rsp+128h+var_A9], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+128h+var_80] lea rsi, [rsp+128h+var_88] lea rcx, [rsp+128h+var_A8] lea r8, [rsp+128h+var_A9] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) jmp short $+2 loc_F04A9: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_F04BD: lea rdi, [rsp+128h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+128h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_F058F mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax jmp short loc_F0513 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F0513: lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_F0628 loc_F0525: mov rax, qword ptr [rsp+128h+var_118] mov edi, [rax+20h] call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) mov qword ptr [rsp+128h+var_D8], rax lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+128h+var_D0]; int lea rdx, [rsp+128h+var_D8]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) jmp short $+2 loc_F054F: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_F0560: lea rdi, [rsp+128h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_F058F mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_F0628 loc_F058F: cmp [rsp+128h+var_14], 0 jz short loc_F05FF mov edi, [rsp+128h+var_14] call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type) mov qword ptr [rsp+128h+var_100], rax lea rsi, aExpected; "; expected " lea rdi, [rsp+128h+var_F8]; int lea rdx, [rsp+128h+var_100]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) jmp short $+2 loc_F05C2: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_F05D3: lea rdi, [rsp+128h+var_F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_F05FF mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_F0628 loc_F05FF: mov byte ptr [rsp+128h+var_22+1], 1 test byte ptr [rsp+128h+var_22+1], 1 jnz short loc_F061B mov rdi, [rsp+128h+var_110]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F061B: mov rax, [rsp+128h+var_120] add rsp, 128h retn loc_F0628: mov rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F0632: mov rdi, [rsp+arg_F0] call __Unwind_Resume
void * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( long long a1, long long a2, unsigned int a3, long long a4) { int v4; // r8d int v5; // r9d int v6; // r9d int v7; // ecx int v8; // r8d int v9; // r9d int v10; // ecx int v11; // r8d int v12; // r9d void *v14; // [rsp+0h] [rbp-128h] int v15; // [rsp+0h] [rbp-128h] void *v16; // [rsp+8h] [rbp-120h] void *v17; // [rsp+8h] [rbp-120h] int v18[2]; // [rsp+10h] [rbp-118h] int v19; // [rsp+10h] [rbp-118h] void *v20; // [rsp+18h] [rbp-110h] void *v21; // [rsp+18h] [rbp-110h] void *v22; // [rsp+18h] [rbp-110h] int v23[2]; // [rsp+28h] [rbp-100h] BYREF int v24[8]; // [rsp+30h] [rbp-F8h] BYREF int v25[2]; // [rsp+50h] [rbp-D8h] BYREF int v26[9]; // [rsp+58h] [rbp-D0h] BYREF char v27; // [rsp+7Fh] [rbp-A9h] BYREF int v28[8]; // [rsp+80h] [rbp-A8h] BYREF long long error_message; // [rsp+A0h] [rbp-88h] BYREF _BYTE v30[39]; // [rsp+A8h] [rbp-80h] BYREF char v31; // [rsp+CFh] [rbp-59h] BYREF _BYTE v32[54]; // [rsp+D0h] [rbp-58h] BYREF _BYTE v33[14]; // [rsp+106h] [rbp-22h] BYREF unsigned int v34; // [rsp+114h] [rbp-14h] int v35[2]; // [rsp+118h] [rbp-10h] long long v36; // [rsp+120h] [rbp-8h] v20 = (void *)a1; v16 = (void *)a1; v36 = a1; *(_QWORD *)v35 = a2; v34 = a3; *(_QWORD *)&v33[2] = a4; *(_QWORD *)v18 = a2; v33[1] = 0; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error ", (long long)v33); std::allocator<char>::~allocator(v33); if ( (std::string::empty(*(_QWORD *)&v33[2]) & 1) == 0 ) { v31 = 32; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>( (int)v32, (int)"while parsing ", *(int *)&v33[2], (int)&v31, v4, v5, v14, a1, a2, a1, (long long)v33); std::string::operator+=(v20, v32); std::string::~string(v32); } std::string::operator+=(v20, "- "); if ( *(_DWORD *)(*(_QWORD *)v18 + 32LL) == 14 ) { error_message = 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>>>::get_error_message(); 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>>>::get_token_string( (long long)v28, *(_QWORD *)v18 + 40LL); v27 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( (unsigned int)v30, (unsigned int)&error_message, (unsigned int)"; last read: '", (unsigned int)v28, (unsigned int)&v27, v6, v18[0] + 40, (_DWORD)v16, v18[0], (long long)v20); std::string::operator+=(v21, v30); std::string::~string(v30); std::string::~string(v28); } else { *(_QWORD *)v25 = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(*(unsigned int *)(*(_QWORD *)v18 + 32LL)); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>( (int)v26, (int)"unexpected ", (int)v25, v7, v8, v9, (int)v14, v16, v18[0], (long long)v20); std::string::operator+=(v21, v26); std::string::~string(v26); } if ( v34 ) { *(_QWORD *)v23 = nlohmann::json_abi_v3_11_3::detail::lexer_base<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>>::token_type_name(v34); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>( (int)v24, (int)"; expected ", (int)v23, v10, v11, v12, v15, v17, v19, (long long)v21); std::string::operator+=(v22, v24); std::string::~string(v24); } return v17; }
exception_message: SUB RSP,0x128 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x120],RDI MOV qword ptr [RSP + 0x118],RSI MOV dword ptr [RSP + 0x114],EDX MOV qword ptr [RSP + 0x108],RCX MOV RAX,qword ptr [RSP + 0x118] MOV qword ptr [RSP + 0x10],RAX MOV byte ptr [RSP + 0x107],0x0 LEA RDI,[RSP + 0x106] MOV qword ptr [RSP + 0x20],RDI CALL 0x00156f00 MOV RDI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_001f0344: LEA RSI,[0x2e8e7d] CALL 0x00166600 JMP 0x001f0352 LAB_001f0352: LEA RDI,[RSP + 0x106] CALL 0x001572b0 MOV RDI,qword ptr [RSP + 0x108] CALL 0x00156430 TEST AL,0x1 JNZ 0x001f042a MOV RDX,qword ptr [RSP + 0x108] MOV byte ptr [RSP + 0xcf],0x20 LAB_001f0384: LEA RSI,[0x2f07c8] LEA RDI,[RSP + 0xd0] LEA RCX,[RSP + 0xcf] CALL 0x001fb710 JMP 0x001f03a2 LAB_001f03a2: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0xd0] CALL 0x00156130 JMP 0x001f03b6 LAB_001f03b6: LEA RDI,[RSP + 0xd0] CALL 0x001572d0 JMP 0x001f042a LAB_001f042a: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x2e8e8b] CALL 0x001561e0 JMP 0x001f043d LAB_001f043d: MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x20],0xe JNZ 0x001f0525 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x28 MOV qword ptr [RSP],RDI CALL 0x001fb8a0 MOV RSI,qword ptr [RSP] MOV qword ptr [RSP + 0xa0],RAX LEA RDI,[RSP + 0x80] CALL 0x001eff30 JMP 0x001f0479 LAB_001f0479: MOV byte ptr [RSP + 0x7f],0x27 LAB_001f047e: LEA RDX,[0x2e8e8e] LEA RDI,[RSP + 0xa8] LEA RSI,[RSP + 0xa0] LEA RCX,[RSP + 0x80] LEA R8,[RSP + 0x7f] CALL 0x001fb7d0 JMP 0x001f04a9 LAB_001f04a9: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0xa8] CALL 0x00156130 JMP 0x001f04bd LAB_001f04bd: LEA RDI,[RSP + 0xa8] CALL 0x001572d0 LEA RDI,[RSP + 0x80] CALL 0x001572d0 JMP 0x001f058f LAB_001f0525: MOV RAX,qword ptr [RSP + 0x10] MOV EDI,dword ptr [RAX + 0x20] CALL 0x001fb960 MOV qword ptr [RSP + 0x50],RAX LAB_001f0537: LEA RSI,[0x2e8e9d] LEA RDI,[RSP + 0x58] LEA RDX,[RSP + 0x50] CALL 0x001fb8b0 JMP 0x001f054f LAB_001f054f: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x58] CALL 0x00156130 JMP 0x001f0560 LAB_001f0560: LEA RDI,[RSP + 0x58] CALL 0x001572d0 JMP 0x001f058f LAB_001f058f: CMP dword ptr [RSP + 0x114],0x0 JZ 0x001f05ff MOV EDI,dword ptr [RSP + 0x114] CALL 0x001fb960 MOV qword ptr [RSP + 0x28],RAX LAB_001f05aa: LEA RSI,[0x2e8ea9] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x28] CALL 0x001fb8b0 JMP 0x001f05c2 LAB_001f05c2: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x30] CALL 0x00156130 LAB_001f05d1: JMP 0x001f05d3 LAB_001f05d3: LEA RDI,[RSP + 0x30] CALL 0x001572d0 JMP 0x001f05ff LAB_001f05ff: MOV byte ptr [RSP + 0x107],0x1 TEST byte ptr [RSP + 0x107],0x1 JNZ 0x001f061b MOV RDI,qword ptr [RSP + 0x18] CALL 0x001572d0 LAB_001f061b: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x128 RET
/* WARNING: Removing unreachable block (ram,0x001f0611) */ /* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, 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 > > >::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::token_type, std::__cxx11::string const&) */ string * nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>>> ::exception_message(string *param_1,long param_2,int param_3,string *param_4) { ulong uVar1; char *local_100; detail local_f8 [32]; char *local_d8; detail local_d0 [39]; char local_a9; string local_a8 [32]; char *local_88; detail local_80 [39]; char local_59; detail local_58 [54]; allocator local_22; int1 local_21; string *local_20; int local_14; long local_10; string *local_8; local_21 = 0; local_20 = param_4; local_14 = param_3; local_10 = param_2; local_8 = param_1; std::allocator<char>::allocator(); /* try { // try from 001f0344 to 001f034f has its CatchHandler @ 001f03c5 */ std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",&local_22); std::allocator<char>::~allocator((allocator<char> *)&local_22); uVar1 = std::__cxx11::string::empty(); if ((uVar1 & 1) == 0) { local_59 = ' '; /* try { // try from 001f0384 to 001f039f has its CatchHandler @ 001f03eb */ concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char> (local_58,"while parsing ",local_20,&local_59); /* try { // try from 001f03a2 to 001f03b3 has its CatchHandler @ 001f0404 */ std::__cxx11::string::operator+=(param_1,(string *)local_58); std::__cxx11::string::~string((string *)local_58); } /* try { // try from 001f042a to 001f0476 has its CatchHandler @ 001f03eb */ std::__cxx11::string::operator+=(param_1,"- "); if (*(int *)(param_2 + 0x20) == 0xe) { local_88 = (char *)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>>> ::get_error_message((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 + 0x28)); 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>>> ::get_token_string(); local_a9 = '\''; /* try { // try from 001f047e to 001f04a6 has its CatchHandler @ 001f04dc */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> (local_80,&local_88,"; last read: \'",local_a8,&local_a9); /* try { // try from 001f04a9 to 001f04ba has its CatchHandler @ 001f04f2 */ std::__cxx11::string::operator+=(param_1,(string *)local_80); std::__cxx11::string::~string((string *)local_80); std::__cxx11::string::~string(local_a8); } else { local_d8 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(*(int4 *)(param_2 + 0x20)); /* try { // try from 001f0537 to 001f054c has its CatchHandler @ 001f03eb */ concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_d0,"unexpected ",&local_d8); /* try { // try from 001f054f to 001f055d has its CatchHandler @ 001f056c */ std::__cxx11::string::operator+=(param_1,(string *)local_d0); std::__cxx11::string::~string((string *)local_d0); } if (local_14 != 0) { local_100 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(local_14); /* try { // try from 001f05aa to 001f05bf has its CatchHandler @ 001f03eb */ concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_f8,"; expected ",&local_100); /* try { // try from 001f05c2 to 001f05d0 has its CatchHandler @ 001f05df */ std::__cxx11::string::operator+=(param_1,(string *)local_f8); std::__cxx11::string::~string((string *)local_f8); } return param_1; }
28,567
my_free
eloqsql/mysys/my_malloc.c
void my_free(void *ptr) { my_memory_header *mh; size_t old_size; my_bool old_flags; DBUG_ENTER("my_free"); DBUG_PRINT("my",("ptr: %p", ptr)); if (ptr == NULL) DBUG_VOID_RETURN; mh= USER_TO_HEADER(ptr); old_size= mh->m_size & ~1; old_flags= mh->m_size & 1; PSI_CALL_memory_free(mh->m_key, old_size, mh->m_owner); update_malloc_size(- (longlong) old_size - HEADER_SIZE, old_flags); #ifndef SAFEMALLOC /* Trash memory if not safemalloc. We don't have to do this if safemalloc is used as safemalloc will also do trashing */ TRASH_FREE(ptr, old_size); #endif sf_free(mh); DBUG_VOID_RETURN; }
O3
c
my_free: testq %rdi, %rdi je 0x48923 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax leaq -0x18(%rdi), %rbx movq -0x18(%rdi), %rdx movq -0x10(%rdi), %r14 movq %r14, %r15 andq $-0x2, %r15 leaq 0x2d45ed(%rip), %rax # 0x31ced8 movq (%rax), %rax movl -0x8(%rdi), %edi movq %r15, %rsi callq *0x3f8(%rax) movq $-0x18, %rdi subq %r15, %rdi andl $0x1, %r14d movl %r14d, %esi callq *0x2d40cf(%rip) # 0x31c9e0 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x26410 retq
my_free: test rdi, rdi jz short locret_48923 push rbp mov rbp, rsp push r15 push r14 push rbx push rax lea rbx, [rdi-18h] mov rdx, [rdi-18h] mov r14, [rdi-10h] mov r15, r14 and r15, 0FFFFFFFFFFFFFFFEh lea rax, PSI_server mov rax, [rax] mov edi, [rdi-8] mov rsi, r15 call qword ptr [rax+3F8h] mov rdi, 0FFFFFFFFFFFFFFE8h sub rdi, r15 and r14d, 1 mov esi, r14d call cs:update_malloc_size mov rdi, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _free locret_48923: retn
long long my_free(long long a1) { long long result; // rax if ( a1 ) { ((void ( *)(_QWORD, unsigned long long, _QWORD))PSI_server[127])( *(unsigned int *)(a1 - 8), *(_QWORD *)(a1 - 16) & 0xFFFFFFFFFFFFFFFELL, *(_QWORD *)(a1 - 24)); update_malloc_size(); return free(a1 - 24); } return result; }
my_free: TEST RDI,RDI JZ 0x00148923 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX LEA RBX,[RDI + -0x18] MOV RDX,qword ptr [RDI + -0x18] MOV R14,qword ptr [RDI + -0x10] MOV R15,R14 AND R15,-0x2 LEA RAX,[0x41ced8] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RDI + -0x8] MOV RSI,R15 CALL qword ptr [RAX + 0x3f8] MOV RDI,-0x18 SUB RDI,R15 AND R14D,0x1 MOV ESI,R14D CALL qword ptr [0x0041c9e0] MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00126410 LAB_00148923: RET
void my_free(long param_1) { ulong uVar1; ulong uVar2; if (param_1 != 0) { uVar1 = *(ulong *)(param_1 + -0x10); uVar2 = uVar1 & 0xfffffffffffffffe; (**(code **)(PSI_server + 0x3f8)) (*(int4 *)(param_1 + -8),uVar2,*(int8 *)(param_1 + -0x18)); (*(code *)update_malloc_size)(-0x18 - uVar2,(uint)uVar1 & 1); free((void *)(param_1 + -0x18)); return; } return; }
28,568
medium_example()
giladroyz[P]FindPeaks/examples/usage_cpp.cpp
int medium_example() { // Sample signal data std::vector<double> data = {5, 3, 8, 4, 9, 1, 5, 4, 6}; PeakConditions cond; cond.set_threshold(2, 10); // Minimum relative height of 2.0 and maximum of 10.0 std::vector<peak_result_t> peaks = find_peaks(data, cond); std::cout << "Original array: "; for (const auto& value : data) { std::cout << value << " "; } std::cout << std::endl; // Access detailed peak information for (const auto& peak : peaks) { std::cout << "Peak at position " << peak.peak << ":\n"; std::cout << " Height: " << peak.peak_height << "\n"; std::cout << " Left threshold: " << peak.threshold.left_threshold << "\n"; std::cout << " Right threshold: " << peak.threshold.right_threshold << "\n"; } return 0; }
O0
cpp
medium_example(): pushq %rbp movq %rsp, %rbp subq $0x2d0, %rsp # imm = 0x2D0 movups 0xd9e6(%rip), %xmm0 # 0xf0b8 movaps %xmm0, -0x40(%rbp) movups 0xd9cb(%rip), %xmm0 # 0xf0a8 movaps %xmm0, -0x50(%rbp) movups 0xd9b0(%rip), %xmm0 # 0xf098 movaps %xmm0, -0x60(%rbp) movups 0xd995(%rip), %xmm0 # 0xf088 movaps %xmm0, -0x70(%rbp) movabsq $0x4018000000000000, %rax # imm = 0x4018000000000000 movq %rax, -0x30(%rbp) leaq -0x70(%rbp), %rax movq %rax, -0x28(%rbp) movq $0x9, -0x20(%rbp) leaq -0x71(%rbp), %rdi movq %rdi, -0x270(%rbp) callq 0x2190 movq -0x270(%rbp), %rcx movq -0x28(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x18(%rbp), %rdi callq 0x21b0 jmp 0x173f leaq -0x71(%rbp), %rdi callq 0x2230 leaq -0x128(%rbp), %rdi callq 0x2250 jmp 0x1756 leaq -0x140(%rbp), %rdi callq 0x2250 jmp 0x1764 leaq -0x158(%rbp), %rdi callq 0x2250 jmp 0x1772 leaq -0x170(%rbp), %rdi callq 0x2250 jmp 0x1780 leaq -0x180(%rbp), %rdi callq 0x22a0 jmp 0x178e movq %rsp, %rax leaq -0x180(%rbp), %rcx movq %rcx, 0x8(%rax) movq $0x0, (%rax) leaq -0x110(%rbp), %rdi leaq -0x128(%rbp), %rsi leaq -0x140(%rbp), %rdx movl $0x1, %ecx leaq -0x158(%rbp), %r8 leaq -0x170(%rbp), %r9 movsd 0xd835(%rip), %xmm0 # 0xf008 callq 0x22e0 jmp 0x17da movl $0x2, -0x184(%rbp) movl $0xa, -0x188(%rbp) leaq -0x110(%rbp), %rdi leaq -0x184(%rbp), %rsi leaq -0x188(%rbp), %rdx callq 0x2640 jmp 0x180a leaq -0x228(%rbp), %rdi leaq -0x110(%rbp), %rsi callq 0x26a0 jmp 0x181f leaq -0x1a0(%rbp), %rdi leaq -0x18(%rbp), %rsi leaq -0x228(%rbp), %rdx callq 0x47e0 jmp 0x1838 movq 0x15799(%rip), %rdi # 0x16fd8 leaq 0xd8f2(%rip), %rsi # 0xf138 callq 0x10d0 jmp 0x184d leaq -0x18(%rbp), %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rdi callq 0x2390 movq %rax, -0x238(%rbp) movq -0x230(%rbp), %rdi callq 0x23c0 movq %rax, -0x240(%rbp) leaq -0x238(%rbp), %rdi leaq -0x240(%rbp), %rsi callq 0x23f0 testb $0x1, %al jne 0x189a jmp 0x1943 leaq -0x238(%rbp), %rdi callq 0x2430 movq %rax, -0x248(%rbp) movq -0x248(%rbp), %rax movsd (%rax), %xmm0 movq 0x15719(%rip), %rdi # 0x16fd8 callq 0x1150 movq %rax, -0x278(%rbp) jmp 0x18cd movq -0x278(%rbp), %rdi leaq 0xd8bf(%rip), %rsi # 0xf19a callq 0x10d0 jmp 0x18e2 jmp 0x18e4 leaq -0x238(%rbp), %rdi callq 0x2450 jmp 0x187e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x80(%rbp) movl %eax, -0x84(%rbp) leaq -0x71(%rbp), %rdi callq 0x2230 jmp 0x1b3d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x80(%rbp) movl %eax, -0x84(%rbp) jmp 0x1b34 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x80(%rbp) movl %eax, -0x84(%rbp) leaq -0x1a0(%rbp), %rdi callq 0x2580 jmp 0x1b34 movq 0x1568e(%rip), %rdi # 0x16fd8 movq 0x15677(%rip), %rsi # 0x16fc8 callq 0x10f0 jmp 0x1958 leaq -0x1a0(%rbp), %rax movq %rax, -0x250(%rbp) movq -0x250(%rbp), %rdi callq 0x24a0 movq %rax, -0x258(%rbp) movq -0x250(%rbp), %rdi callq 0x24d0 movq %rax, -0x260(%rbp) leaq -0x258(%rbp), %rdi leaq -0x260(%rbp), %rsi callq 0x2500 testb $0x1, %al jne 0x19a8 jmp 0x1b14 leaq -0x258(%rbp), %rdi callq 0x2540 movq %rax, -0x268(%rbp) movq 0x15616(%rip), %rdi # 0x16fd8 leaq 0xd792(%rip), %rsi # 0xf15b callq 0x10d0 movq %rax, -0x280(%rbp) jmp 0x19d7 movq -0x280(%rbp), %rdi movq -0x268(%rbp), %rax movq (%rax), %rsi callq 0x1030 movq %rax, -0x288(%rbp) jmp 0x19f6 movq -0x288(%rbp), %rdi leaq 0xd777(%rip), %rsi # 0xf17b callq 0x10d0 jmp 0x1a0b movq 0x155c6(%rip), %rdi # 0x16fd8 leaq 0xd765(%rip), %rsi # 0xf17e callq 0x10d0 movq %rax, -0x290(%rbp) jmp 0x1a27 movq -0x290(%rbp), %rdi movq -0x268(%rbp), %rax movsd 0x8(%rax), %xmm0 callq 0x1150 movq %rax, -0x298(%rbp) jmp 0x1a48 movq -0x298(%rbp), %rdi leaq 0xd7aa(%rip), %rsi # 0xf200 callq 0x10d0 jmp 0x1a5d movq 0x15574(%rip), %rdi # 0x16fd8 leaq 0xd71e(%rip), %rsi # 0xf189 callq 0x10d0 movq %rax, -0x2a0(%rbp) jmp 0x1a79 movq -0x2a0(%rbp), %rdi movq -0x268(%rbp), %rax movsd 0x28(%rax), %xmm0 callq 0x1150 movq %rax, -0x2a8(%rbp) jmp 0x1a9a movq -0x2a8(%rbp), %rdi leaq 0xd758(%rip), %rsi # 0xf200 callq 0x10d0 jmp 0x1aaf movq 0x15522(%rip), %rdi # 0x16fd8 leaq 0xd6df(%rip), %rsi # 0xf19c callq 0x10d0 movq %rax, -0x2b0(%rbp) jmp 0x1acb movq -0x2b0(%rbp), %rdi movq -0x268(%rbp), %rax movsd 0x30(%rax), %xmm0 callq 0x1150 movq %rax, -0x2b8(%rbp) jmp 0x1aec movq -0x2b8(%rbp), %rdi leaq 0xd706(%rip), %rsi # 0xf200 callq 0x10d0 jmp 0x1b01 jmp 0x1b03 leaq -0x258(%rbp), %rdi callq 0x2560 jmp 0x198c leaq -0x1a0(%rbp), %rdi callq 0x2580 leaq -0x18(%rbp), %rdi callq 0x25e0 xorl %eax, %eax addq $0x2d0, %rsp # imm = 0x2D0 popq %rbp retq leaq -0x18(%rbp), %rdi callq 0x25e0 movq -0x80(%rbp), %rdi callq 0x1140 nopw %cs:(%rax,%rax)
_Z14medium_examplev: push rbp mov rbp, rsp sub rsp, 2D0h movups xmm0, cs:xmmword_F0B8 movaps [rbp+var_40], xmm0 movups xmm0, cs:xmmword_F0A8 movaps [rbp+var_50], xmm0 movups xmm0, cs:xmmword_F098 movaps [rbp+var_60], xmm0 movups xmm0, cs:xmmword_F088 movaps [rbp+var_70], xmm0 mov rax, 4018000000000000h mov [rbp+var_30], rax lea rax, [rbp+var_70] mov [rbp+var_28], rax mov [rbp+var_20], 9 lea rdi, [rbp+var_71] mov [rbp+var_270], rdi call _ZNSaIdEC2Ev; std::allocator<double>::allocator(void) mov rcx, [rbp+var_270] mov rsi, [rbp+var_28] mov rdx, [rbp+var_20] lea rdi, [rbp+var_18] call _ZNSt6vectorIdSaIdEEC2ESt16initializer_listIdERKS0_; std::vector<double>::vector(std::initializer_list<double>,std::allocator<double> const&) jmp short $+2 loc_173F: lea rdi, [rbp+var_71] call _ZNSaIdED2Ev; std::allocator<double>::~allocator() lea rdi, [rbp+var_128]; this call _ZN9findPeaks10RangeFloatC2Ev; findPeaks::RangeFloat::RangeFloat(void) jmp short $+2 loc_1756: lea rdi, [rbp+var_140]; this call _ZN9findPeaks10RangeFloatC2Ev; findPeaks::RangeFloat::RangeFloat(void) jmp short $+2 loc_1764: lea rdi, [rbp+var_158]; this call _ZN9findPeaks10RangeFloatC2Ev; findPeaks::RangeFloat::RangeFloat(void) jmp short $+2 loc_1772: lea rdi, [rbp+var_170]; this call _ZN9findPeaks10RangeFloatC2Ev; findPeaks::RangeFloat::RangeFloat(void) jmp short $+2 loc_1780: lea rdi, [rbp+var_180]; this call _ZN9findPeaks8RangeIntC2Ev; findPeaks::RangeInt::RangeInt(void) jmp short $+2 loc_178E: mov rax, rsp lea rcx, [rbp+var_180] mov [rax+8], rcx mov qword ptr [rax], 0 lea rdi, [rbp+var_110]; this lea rsi, [rbp+var_128]; findPeaks::RangeFloat * lea rdx, [rbp+var_140]; findPeaks::RangeFloat * mov ecx, 1; unsigned __int64 lea r8, [rbp+var_158]; findPeaks::RangeFloat * lea r9, [rbp+var_170]; findPeaks::RangeFloat * movsd xmm0, cs:dbl_F008; double call _ZN9findPeaks14PeakConditionsC2ERKNS_10RangeFloatES3_mS3_S3_mdRKNS_8RangeIntE; findPeaks::PeakConditions::PeakConditions(findPeaks::RangeFloat const&,findPeaks::RangeFloat const&,ulong,findPeaks::RangeFloat const&,findPeaks::RangeFloat const&,ulong,double,findPeaks::RangeInt const&) jmp short $+2 loc_17DA: mov [rbp+var_184], 2 mov [rbp+var_188], 0Ah lea rdi, [rbp+var_110] lea rsi, [rbp+var_184] lea rdx, [rbp+var_188] call _ZN9findPeaks14PeakConditions13set_thresholdIJiiEEEvDpOT_; findPeaks::PeakConditions::set_threshold<int,int>(int,int &&) jmp short $+2 loc_180A: lea rdi, [rbp+var_228]; this lea rsi, [rbp+var_110]; findPeaks::PeakConditions * call _ZN9findPeaks14PeakConditionsC2ERKS0_; findPeaks::PeakConditions::PeakConditions(findPeaks::PeakConditions const&) jmp short $+2 loc_181F: lea rdi, [rbp+var_1A0] lea rsi, [rbp+var_18] lea rdx, [rbp+var_228] call _ZN9findPeaks10find_peaksERKSt6vectorIdSaIdEENS_14PeakConditionsE; findPeaks::find_peaks(std::vector<double> const&,findPeaks::PeakConditions) jmp short $+2 loc_1838: mov rdi, cs:_ZSt4cout_ptr lea rsi, aOriginalArray; "Original array: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_184D: lea rax, [rbp+var_18] mov [rbp+var_230], rax mov rdi, [rbp+var_230] call _ZNSt6vectorIdSaIdEE5beginEv; std::vector<double>::begin(void) mov [rbp+var_238], rax mov rdi, [rbp+var_230] call _ZNSt6vectorIdSaIdEE3endEv; std::vector<double>::end(void) mov [rbp+var_240], rax loc_187E: lea rdi, [rbp+var_238] lea rsi, [rbp+var_240] call _ZN9__gnu_cxxneIPdSt6vectorIdSaIdEEEEbRKNS_17__normal_iteratorIT_T0_EESA_; __gnu_cxx::operator!=<double *,std::vector<double>>(__gnu_cxx::__normal_iterator<double *,std::vector<double>> const&,__gnu_cxx::__normal_iterator<double *,std::vector<double>> const&) test al, 1 jnz short loc_189A jmp loc_1943 loc_189A: lea rdi, [rbp+var_238] call _ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEdeEv; __gnu_cxx::__normal_iterator<double *,std::vector<double>>::operator*(void) mov [rbp+var_248], rax mov rax, [rbp+var_248] movsd xmm0, qword ptr [rax] mov rdi, cs:_ZSt4cout_ptr call __ZNSolsEd; std::ostream::operator<<(double) mov [rbp+var_278], rax jmp short $+2 loc_18CD: mov rdi, [rbp+var_278] lea rsi, aLeftThreshold+11h; " " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_18E2: jmp short $+2 loc_18E4: lea rdi, [rbp+var_238] call _ZN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEppEv; __gnu_cxx::__normal_iterator<double *,std::vector<double>>::operator++(void) jmp short loc_187E mov rcx, rax mov eax, edx mov [rbp+var_80], rcx mov [rbp+var_84], eax lea rdi, [rbp+var_71] call _ZNSaIdED2Ev; std::allocator<double>::~allocator() jmp loc_1B3D mov rcx, rax mov eax, edx mov [rbp+var_80], rcx mov [rbp+var_84], eax jmp loc_1B34 mov rcx, rax mov eax, edx mov [rbp+var_80], rcx mov [rbp+var_84], eax lea rdi, [rbp+var_1A0] call _ZNSt6vectorIN9findPeaks13peak_result_tESaIS1_EED2Ev; std::vector<findPeaks::peak_result_t>::~vector() jmp loc_1B34 loc_1943: mov rdi, cs:_ZSt4cout_ptr mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_1958: lea rax, [rbp+var_1A0] mov [rbp+var_250], rax mov rdi, [rbp+var_250] call _ZNSt6vectorIN9findPeaks13peak_result_tESaIS1_EE5beginEv; std::vector<findPeaks::peak_result_t>::begin(void) mov [rbp+var_258], rax mov rdi, [rbp+var_250] call _ZNSt6vectorIN9findPeaks13peak_result_tESaIS1_EE3endEv; std::vector<findPeaks::peak_result_t>::end(void) mov [rbp+var_260], rax loc_198C: lea rdi, [rbp+var_258] lea rsi, [rbp+var_260] call _ZN9__gnu_cxxneIPN9findPeaks13peak_result_tESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESC_; __gnu_cxx::operator!=<findPeaks::peak_result_t *,std::vector<findPeaks::peak_result_t>>(__gnu_cxx::__normal_iterator<findPeaks::peak_result_t *,std::vector<findPeaks::peak_result_t>> const&,__gnu_cxx::__normal_iterator<findPeaks::peak_result_t *,std::vector<findPeaks::peak_result_t>> const&) test al, 1 jnz short loc_19A8 jmp loc_1B14 loc_19A8: lea rdi, [rbp+var_258] call _ZNK9__gnu_cxx17__normal_iteratorIPN9findPeaks13peak_result_tESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<findPeaks::peak_result_t *,std::vector<findPeaks::peak_result_t>>::operator*(void) mov [rbp+var_268], rax mov rdi, cs:_ZSt4cout_ptr lea rsi, aPeakAtPosition; "Peak at position " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_280], rax jmp short $+2 loc_19D7: mov rdi, [rbp+var_280] mov rax, [rbp+var_268] mov rsi, [rax] call __ZNSolsEm; std::ostream::operator<<(ulong) mov [rbp+var_288], rax jmp short $+2 loc_19F6: mov rdi, [rbp+var_288] lea rsi, asc_F17B; ":\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_1A0B: mov rdi, cs:_ZSt4cout_ptr lea rsi, aHeight; " Height: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_290], rax jmp short $+2 loc_1A27: mov rdi, [rbp+var_290] mov rax, [rbp+var_268] movsd xmm0, qword ptr [rax+8] call __ZNSolsEd; std::ostream::operator<<(double) mov [rbp+var_298], rax jmp short $+2 loc_1A48: mov rdi, [rbp+var_298] lea rsi, aBasicExample+1Ah; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_1A5D: mov rdi, cs:_ZSt4cout_ptr lea rsi, aLeftThreshold; " Left threshold: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_2A0], rax jmp short $+2 loc_1A79: mov rdi, [rbp+var_2A0] mov rax, [rbp+var_268] movsd xmm0, qword ptr [rax+28h] call __ZNSolsEd; std::ostream::operator<<(double) mov [rbp+var_2A8], rax jmp short $+2 loc_1A9A: mov rdi, [rbp+var_2A8] lea rsi, aBasicExample+1Ah; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_1AAF: mov rdi, cs:_ZSt4cout_ptr lea rsi, aRightThreshold; " Right threshold: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_2B0], rax jmp short $+2 loc_1ACB: mov rdi, [rbp+var_2B0] mov rax, [rbp+var_268] movsd xmm0, qword ptr [rax+30h] call __ZNSolsEd; std::ostream::operator<<(double) mov [rbp+var_2B8], rax jmp short $+2 loc_1AEC: mov rdi, [rbp+var_2B8] lea rsi, aBasicExample+1Ah; "\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_1B01: jmp short $+2 loc_1B03: lea rdi, [rbp+var_258] call _ZN9__gnu_cxx17__normal_iteratorIPN9findPeaks13peak_result_tESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<findPeaks::peak_result_t *,std::vector<findPeaks::peak_result_t>>::operator++(void) jmp loc_198C loc_1B14: lea rdi, [rbp+var_1A0] call _ZNSt6vectorIN9findPeaks13peak_result_tESaIS1_EED2Ev; std::vector<findPeaks::peak_result_t>::~vector() lea rdi, [rbp+var_18] call _ZNSt6vectorIdSaIdEED2Ev; std::vector<double>::~vector() xor eax, eax add rsp, 2D0h pop rbp retn loc_1B34: lea rdi, [rbp+var_18] call _ZNSt6vectorIdSaIdEED2Ev; std::vector<double>::~vector() loc_1B3D: mov rdi, [rbp+var_80] call __Unwind_Resume
long long medium_example(void) { long long v1; // [rsp+18h] [rbp-2B8h] long long v2; // [rsp+20h] [rbp-2B0h] long long v3; // [rsp+28h] [rbp-2A8h] long long v4; // [rsp+30h] [rbp-2A0h] long long v5; // [rsp+38h] [rbp-298h] long long v6; // [rsp+40h] [rbp-290h] long long v7; // [rsp+48h] [rbp-288h] long long v8; // [rsp+50h] [rbp-280h] long long v9; // [rsp+58h] [rbp-278h] long long v10; // [rsp+68h] [rbp-268h] long long v11; // [rsp+70h] [rbp-260h] BYREF _QWORD v12[2]; // [rsp+78h] [rbp-258h] BYREF double *v13; // [rsp+88h] [rbp-248h] long long v14; // [rsp+90h] [rbp-240h] BYREF _QWORD v15[2]; // [rsp+98h] [rbp-238h] BYREF _BYTE v16[136]; // [rsp+A8h] [rbp-228h] BYREF _BYTE v17[24]; // [rsp+130h] [rbp-1A0h] BYREF int v18; // [rsp+148h] [rbp-188h] BYREF int v19; // [rsp+14Ch] [rbp-184h] BYREF _BYTE v20[16]; // [rsp+150h] [rbp-180h] BYREF _BYTE v21[24]; // [rsp+160h] [rbp-170h] BYREF _BYTE v22[24]; // [rsp+178h] [rbp-158h] BYREF _BYTE v23[24]; // [rsp+190h] [rbp-140h] BYREF _BYTE v24[24]; // [rsp+1A8h] [rbp-128h] BYREF _BYTE v25[140]; // [rsp+1C0h] [rbp-110h] BYREF char v26; // [rsp+25Fh] [rbp-71h] BYREF _OWORD v27[4]; // [rsp+260h] [rbp-70h] BYREF long long v28; // [rsp+2A0h] [rbp-30h] _OWORD *v29; // [rsp+2A8h] [rbp-28h] long long v30; // [rsp+2B0h] [rbp-20h] _BYTE v31[24]; // [rsp+2B8h] [rbp-18h] BYREF v27[3] = xmmword_F0B8; v27[2] = xmmword_F0A8; v27[1] = xmmword_F098; v27[0] = xmmword_F088; v28 = 0x4018000000000000LL; v29 = v27; v30 = 9LL; std::allocator<double>::allocator(); std::vector<double>::vector(v31, v29, v30, &v26); std::allocator<double>::~allocator(&v26); findPeaks::RangeFloat::RangeFloat((findPeaks::RangeFloat *)v24); findPeaks::RangeFloat::RangeFloat((findPeaks::RangeFloat *)v23); findPeaks::RangeFloat::RangeFloat((findPeaks::RangeFloat *)v22); findPeaks::RangeFloat::RangeFloat((findPeaks::RangeFloat *)v21); findPeaks::RangeInt::RangeInt((findPeaks::RangeInt *)v20); findPeaks::PeakConditions::PeakConditions( (findPeaks::PeakConditions *)v25, (const findPeaks::RangeFloat *)v24, (const findPeaks::RangeFloat *)v23, 1uLL, (const findPeaks::RangeFloat *)v22, (const findPeaks::RangeFloat *)v21, 0LL, 0.5, (const findPeaks::RangeInt *)v20); v19 = 2; v18 = 10; findPeaks::PeakConditions::set_threshold<int,int>(v25, &v19, &v18); findPeaks::PeakConditions::PeakConditions((findPeaks::PeakConditions *)v16, (const findPeaks::PeakConditions *)v25); findPeaks::find_peaks(v17, v31, v16); std::operator<<<std::char_traits<char>>(&std::cout, "Original array: "); v15[1] = v31; v15[0] = std::vector<double>::begin(v31); v14 = std::vector<double>::end(v31); while ( (__gnu_cxx::operator!=<double *,std::vector<double>>(v15, &v14) & 1) != 0 ) { v13 = (double *)__gnu_cxx::__normal_iterator<double *,std::vector<double>>::operator*(v15); v9 = std::ostream::operator<<(&std::cout, *v13); std::operator<<<std::char_traits<char>>(v9, " "); __gnu_cxx::__normal_iterator<double *,std::vector<double>>::operator++(v15); } std::ostream::operator<<(&std::cout, &std::endl<char,std::char_traits<char>>); v12[1] = v17; v12[0] = std::vector<findPeaks::peak_result_t>::begin(v17); v11 = std::vector<findPeaks::peak_result_t>::end(v17); while ( (__gnu_cxx::operator!=<findPeaks::peak_result_t *,std::vector<findPeaks::peak_result_t>>(v12, &v11) & 1) != 0 ) { v10 = __gnu_cxx::__normal_iterator<findPeaks::peak_result_t *,std::vector<findPeaks::peak_result_t>>::operator*(v12); v8 = std::operator<<<std::char_traits<char>>(&std::cout, "Peak at position "); v7 = std::ostream::operator<<(v8, *(_QWORD *)v10); std::operator<<<std::char_traits<char>>(v7, ":\n"); v6 = std::operator<<<std::char_traits<char>>(&std::cout, " Height: "); v5 = std::ostream::operator<<(v6, *(double *)(v10 + 8)); std::operator<<<std::char_traits<char>>(v5, "\n"); v4 = std::operator<<<std::char_traits<char>>(&std::cout, " Left threshold: "); v3 = std::ostream::operator<<(v4, *(double *)(v10 + 40)); std::operator<<<std::char_traits<char>>(v3, "\n"); v2 = std::operator<<<std::char_traits<char>>(&std::cout, " Right threshold: "); v1 = std::ostream::operator<<(v2, *(double *)(v10 + 48)); std::operator<<<std::char_traits<char>>(v1, "\n"); __gnu_cxx::__normal_iterator<findPeaks::peak_result_t *,std::vector<findPeaks::peak_result_t>>::operator++(v12); } std::vector<findPeaks::peak_result_t>::~vector(v17); std::vector<double>::~vector(v31); return 0LL; }
medium_example: PUSH RBP MOV RBP,RSP SUB RSP,0x2d0 MOVUPS XMM0,xmmword ptr [0x0010f0b8] MOVAPS xmmword ptr [RBP + -0x40],XMM0 MOVUPS XMM0,xmmword ptr [0x0010f0a8] MOVAPS xmmword ptr [RBP + -0x50],XMM0 MOVUPS XMM0,xmmword ptr [0x0010f098] MOVAPS xmmword ptr [RBP + -0x60],XMM0 MOVUPS XMM0,xmmword ptr [0x0010f088] MOVAPS xmmword ptr [RBP + -0x70],XMM0 MOV RAX,0x4018000000000000 MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + -0x70] MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x20],0x9 LEA RDI,[RBP + -0x71] MOV qword ptr [RBP + -0x270],RDI CALL 0x00102190 MOV RCX,qword ptr [RBP + -0x270] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x20] LAB_00101734: LEA RDI,[RBP + -0x18] CALL 0x001021b0 JMP 0x0010173f LAB_0010173f: LEA RDI,[RBP + -0x71] CALL 0x00102230 LAB_00101748: LEA RDI,[RBP + -0x128] CALL 0x00102250 JMP 0x00101756 LAB_00101756: LEA RDI,[RBP + -0x140] CALL 0x00102250 JMP 0x00101764 LAB_00101764: LEA RDI,[RBP + -0x158] CALL 0x00102250 JMP 0x00101772 LAB_00101772: LEA RDI,[RBP + -0x170] CALL 0x00102250 JMP 0x00101780 LAB_00101780: LEA RDI,[RBP + -0x180] CALL 0x001022a0 JMP 0x0010178e LAB_0010178e: MOV RAX,RSP LEA RCX,[RBP + -0x180] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX],0x0 LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0x128] LEA RDX,[RBP + -0x140] MOV ECX,0x1 LEA R8,[RBP + -0x158] LEA R9,[RBP + -0x170] MOVSD XMM0,qword ptr [0x0010f008] CALL 0x001022e0 JMP 0x001017da LAB_001017da: MOV dword ptr [RBP + -0x184],0x2 MOV dword ptr [RBP + -0x188],0xa LEA RDI,[RBP + -0x110] LEA RSI,[RBP + -0x184] LEA RDX,[RBP + -0x188] CALL 0x00102640 JMP 0x0010180a LAB_0010180a: LEA RDI,[RBP + -0x228] LEA RSI,[RBP + -0x110] CALL 0x001026a0 JMP 0x0010181f LAB_0010181f: LEA RDI,[RBP + -0x1a0] LEA RSI,[RBP + -0x18] LEA RDX,[RBP + -0x228] CALL 0x001047e0 JMP 0x00101838 LAB_00101838: MOV RDI,qword ptr [0x00116fd8] LEA RSI,[0x10f138] CALL 0x001010d0 JMP 0x0010184d LAB_0010184d: LEA RAX,[RBP + -0x18] MOV qword ptr [RBP + -0x230],RAX MOV RDI,qword ptr [RBP + -0x230] CALL 0x00102390 MOV qword ptr [RBP + -0x238],RAX MOV RDI,qword ptr [RBP + -0x230] CALL 0x001023c0 MOV qword ptr [RBP + -0x240],RAX LAB_0010187e: LEA RDI,[RBP + -0x238] LEA RSI,[RBP + -0x240] CALL 0x001023f0 TEST AL,0x1 JNZ 0x0010189a JMP 0x00101943 LAB_0010189a: LEA RDI,[RBP + -0x238] CALL 0x00102430 MOV qword ptr [RBP + -0x248],RAX MOV RAX,qword ptr [RBP + -0x248] MOVSD XMM0,qword ptr [RAX] MOV RDI,qword ptr [0x00116fd8] CALL 0x00101150 MOV qword ptr [RBP + -0x278],RAX JMP 0x001018cd LAB_001018cd: MOV RDI,qword ptr [RBP + -0x278] LEA RSI,[0x10f19a] CALL 0x001010d0 JMP 0x001018e2 LAB_001018e2: JMP 0x001018e4 LAB_001018e4: LEA RDI,[RBP + -0x238] CALL 0x00102450 JMP 0x0010187e LAB_00101943: MOV RDI,qword ptr [0x00116fd8] MOV RSI,qword ptr [0x00116fc8] CALL 0x001010f0 JMP 0x00101958 LAB_00101958: LEA RAX,[RBP + -0x1a0] MOV qword ptr [RBP + -0x250],RAX MOV RDI,qword ptr [RBP + -0x250] CALL 0x001024a0 MOV qword ptr [RBP + -0x258],RAX MOV RDI,qword ptr [RBP + -0x250] CALL 0x001024d0 MOV qword ptr [RBP + -0x260],RAX LAB_0010198c: LEA RDI,[RBP + -0x258] LEA RSI,[RBP + -0x260] CALL 0x00102500 TEST AL,0x1 JNZ 0x001019a8 JMP 0x00101b14 LAB_001019a8: LEA RDI,[RBP + -0x258] CALL 0x00102540 MOV qword ptr [RBP + -0x268],RAX MOV RDI,qword ptr [0x00116fd8] LEA RSI,[0x10f15b] CALL 0x001010d0 MOV qword ptr [RBP + -0x280],RAX JMP 0x001019d7 LAB_001019d7: MOV RDI,qword ptr [RBP + -0x280] MOV RAX,qword ptr [RBP + -0x268] MOV RSI,qword ptr [RAX] CALL 0x00101030 MOV qword ptr [RBP + -0x288],RAX JMP 0x001019f6 LAB_001019f6: MOV RDI,qword ptr [RBP + -0x288] LEA RSI,[0x10f17b] CALL 0x001010d0 JMP 0x00101a0b LAB_00101a0b: MOV RDI,qword ptr [0x00116fd8] LEA RSI,[0x10f17e] CALL 0x001010d0 MOV qword ptr [RBP + -0x290],RAX JMP 0x00101a27 LAB_00101a27: MOV RDI,qword ptr [RBP + -0x290] MOV RAX,qword ptr [RBP + -0x268] MOVSD XMM0,qword ptr [RAX + 0x8] CALL 0x00101150 MOV qword ptr [RBP + -0x298],RAX JMP 0x00101a48 LAB_00101a48: MOV RDI,qword ptr [RBP + -0x298] LEA RSI,[0x10f200] CALL 0x001010d0 JMP 0x00101a5d LAB_00101a5d: MOV RDI,qword ptr [0x00116fd8] LEA RSI,[0x10f189] CALL 0x001010d0 MOV qword ptr [RBP + -0x2a0],RAX JMP 0x00101a79 LAB_00101a79: MOV RDI,qword ptr [RBP + -0x2a0] MOV RAX,qword ptr [RBP + -0x268] MOVSD XMM0,qword ptr [RAX + 0x28] CALL 0x00101150 MOV qword ptr [RBP + -0x2a8],RAX JMP 0x00101a9a LAB_00101a9a: MOV RDI,qword ptr [RBP + -0x2a8] LEA RSI,[0x10f200] CALL 0x001010d0 JMP 0x00101aaf LAB_00101aaf: MOV RDI,qword ptr [0x00116fd8] LEA RSI,[0x10f19c] CALL 0x001010d0 MOV qword ptr [RBP + -0x2b0],RAX JMP 0x00101acb LAB_00101acb: MOV RDI,qword ptr [RBP + -0x2b0] MOV RAX,qword ptr [RBP + -0x268] MOVSD XMM0,qword ptr [RAX + 0x30] CALL 0x00101150 MOV qword ptr [RBP + -0x2b8],RAX JMP 0x00101aec LAB_00101aec: MOV RDI,qword ptr [RBP + -0x2b8] LEA RSI,[0x10f200] CALL 0x001010d0 LAB_00101aff: JMP 0x00101b01 LAB_00101b01: JMP 0x00101b03 LAB_00101b03: LEA RDI,[RBP + -0x258] CALL 0x00102560 JMP 0x0010198c LAB_00101b14: LEA RDI,[RBP + -0x1a0] CALL 0x00102580 LEA RDI,[RBP + -0x18] CALL 0x001025e0 XOR EAX,EAX ADD RSP,0x2d0 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* medium_example() */ int8 medium_example(void) { bool bVar1; ulong *puVar2; ostream *poVar3; int8 local_268; int8 local_260; vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>> *local_258; double *local_250; int8 local_248; int8 local_240; vector<double,std::allocator<double>> *local_238; PeakConditions local_230 [136]; findPeaks local_1a8 [24]; int local_190 [2]; RangeInt local_188 [16]; RangeFloat local_178 [24]; RangeFloat local_160 [24]; RangeFloat local_148 [24]; RangeFloat local_130 [24]; PeakConditions local_118 [159]; allocator<double> local_79; int8 local_78; int8 uStack_70; int8 local_68; int8 uStack_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 local_38; int8 *local_30; int8 local_28; vector<double,std::allocator<double>> local_20 [24]; local_48 = _DAT_0010f0b8; uStack_40 = _UNK_0010f0c0; local_58 = _DAT_0010f0a8; uStack_50 = _UNK_0010f0b0; local_68 = _DAT_0010f098; uStack_60 = _UNK_0010f0a0; local_78 = _DAT_0010f088; uStack_70 = _UNK_0010f090; local_38 = 0x4018000000000000; local_30 = &local_78; local_28 = 9; std::allocator<double>::allocator(); /* try { // try from 00101734 to 0010173c has its CatchHandler @ 001018f2 */ std::vector<double,std::allocator<double>>::vector(local_20,local_30,local_28,&local_79); std::allocator<double>::~allocator(&local_79); /* try { // try from 00101748 to 00101835 has its CatchHandler @ 0010190f */ findPeaks::RangeFloat::RangeFloat(local_130); findPeaks::RangeFloat::RangeFloat(local_148); findPeaks::RangeFloat::RangeFloat(local_160); findPeaks::RangeFloat::RangeFloat(local_178); findPeaks::RangeInt::RangeInt(local_188); findPeaks::PeakConditions::PeakConditions (local_118,local_130,local_148,1,local_160,local_178,0,DAT_0010f008,local_188); local_190[1] = 2; local_190[0] = 10; findPeaks::PeakConditions::set_threshold<int,int>(local_118,local_190 + 1,local_190); findPeaks::PeakConditions::PeakConditions(local_230,local_118); findPeaks::find_peaks(local_1a8,local_20,local_230); /* try { // try from 00101838 to 00101afe has its CatchHandler @ 00101923 */ std::operator<<((ostream *)PTR_cout_00116fd8,"Original array: "); local_238 = local_20; local_240 = std::vector<double,std::allocator<double>>::begin(local_238); local_248 = std::vector<double,std::allocator<double>>::end(local_238); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_240,(__normal_iterator *)&local_248); if (!bVar1) break; local_250 = (double *) __gnu_cxx::__normal_iterator<double*,std::vector<double,std::allocator<double>>>:: operator*((__normal_iterator<double*,std::vector<double,std::allocator<double>>> *) &local_240); poVar3 = (ostream *)std::ostream::operator<<((ostream *)PTR_cout_00116fd8,*local_250); std::operator<<(poVar3," "); __gnu_cxx::__normal_iterator<double*,std::vector<double,std::allocator<double>>>::operator++ ((__normal_iterator<double*,std::vector<double,std::allocator<double>>> *)&local_240); } std::ostream::operator<< ((ostream *)PTR_cout_00116fd8, (_func_ostream_ptr_ostream_ptr *)PTR_endl<char,std_char_traits<char>>_00116fc8); local_258 = (vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>> *)local_1a8 ; local_260 = std::vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>>::begin (local_258); local_268 = std::vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>>::end (local_258); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_260,(__normal_iterator *)&local_268); if (!bVar1) break; puVar2 = (ulong *)__gnu_cxx:: __normal_iterator<findPeaks::peak_result_t*,std::vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>>> ::operator*((__normal_iterator<findPeaks::peak_result_t*,std::vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>>> *)&local_260); poVar3 = std::operator<<((ostream *)PTR_cout_00116fd8,"Peak at position "); poVar3 = (ostream *)std::ostream::operator<<(poVar3,*puVar2); std::operator<<(poVar3,":\n"); poVar3 = std::operator<<((ostream *)PTR_cout_00116fd8," Height: "); poVar3 = (ostream *)std::ostream::operator<<(poVar3,(double)puVar2[1]); std::operator<<(poVar3,"\n"); poVar3 = std::operator<<((ostream *)PTR_cout_00116fd8," Left threshold: "); poVar3 = (ostream *)std::ostream::operator<<(poVar3,(double)puVar2[5]); std::operator<<(poVar3,"\n"); poVar3 = std::operator<<((ostream *)PTR_cout_00116fd8," Right threshold: "); poVar3 = (ostream *)std::ostream::operator<<(poVar3,(double)puVar2[6]); std::operator<<(poVar3,"\n"); __gnu_cxx:: __normal_iterator<findPeaks::peak_result_t*,std::vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>>> ::operator++((__normal_iterator<findPeaks::peak_result_t*,std::vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>>> *)&local_260); } std::vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>>::~vector ((vector<findPeaks::peak_result_t,std::allocator<findPeaks::peak_result_t>> *)local_1a8) ; std::vector<double,std::allocator<double>>::~vector(local_20); return 0; }
28,569
translog_read_record_header_scan
eloqsql/storage/maria/ma_loghandler.c
int translog_read_record_header_scan(TRANSLOG_SCANNER_DATA *scanner, TRANSLOG_HEADER_BUFFER *buff, my_bool move_scanner) { translog_size_t res; DBUG_ENTER("translog_read_record_header_scan"); DBUG_PRINT("enter", ("Scanner: Cur: " LSN_FMT " Hrz: " LSN_FMT " " "Lst: " LSN_FMT " Offset: %u(%x) fixed %d", LSN_IN_PARTS(scanner->page_addr), LSN_IN_PARTS(scanner->horizon), LSN_IN_PARTS(scanner->last_file_page), (uint) scanner->page_offset, (uint) scanner->page_offset, scanner->fixed_horizon)); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); buff->groups_no= 0; buff->lsn= scanner->page_addr; buff->lsn+= scanner->page_offset; /* offset increasing */ res= translog_read_record_header_from_buffer(scanner->page, scanner->page_offset, buff, (move_scanner ? scanner : 0)); DBUG_RETURN(res); }
O3
c
translog_read_record_header_scan: pushq %rbp movq %rsp, %rbp movq %rsi, %rax movl $0x0, 0x418(%rsi) movq 0x2000(%rdi), %rcx movq %rcx, (%rsi) movl 0x2028(%rdi), %esi addq %rcx, %rsi movq %rsi, (%rax) movq 0x2018(%rdi), %r8 movzwl 0x2028(%rdi), %esi xorl %ecx, %ecx testb %dl, %dl cmovneq %rdi, %rcx movq %r8, %rdi movq %rax, %rdx popq %rbp jmp 0x4bc34
translog_read_record_header_scan: push rbp mov rbp, rsp mov rax, rsi mov dword ptr [rsi+418h], 0 mov rcx, [rdi+2000h] mov [rsi], rcx mov esi, [rdi+2028h] add rsi, rcx mov [rax], rsi mov r8, [rdi+2018h] movzx esi, word ptr [rdi+2028h] xor ecx, ecx test dl, dl cmovnz rcx, rdi mov rdi, r8 mov rdx, rax pop rbp jmp translog_read_record_header_from_buffer
long long translog_read_record_header_scan(long long a1, long long a2, char a3) { long long v3; // rcx _BYTE *v4; // rcx *(_DWORD *)(a2 + 1048) = 0; v3 = *(_QWORD *)(a1 + 0x2000); *(_QWORD *)a2 = v3; *(_QWORD *)a2 = v3 + *(unsigned int *)(a1 + 8232); v4 = 0LL; if ( a3 ) v4 = (_BYTE *)a1; return translog_read_record_header_from_buffer(*(_QWORD *)(a1 + 8216), *(unsigned __int16 *)(a1 + 8232), a2, v4); }
translog_read_record_header_scan: PUSH RBP MOV RBP,RSP MOV RAX,RSI MOV dword ptr [RSI + 0x418],0x0 MOV RCX,qword ptr [RDI + 0x2000] MOV qword ptr [RSI],RCX MOV ESI,dword ptr [RDI + 0x2028] ADD RSI,RCX MOV qword ptr [RAX],RSI MOV R8,qword ptr [RDI + 0x2018] MOVZX ESI,word ptr [RDI + 0x2028] XOR ECX,ECX TEST DL,DL CMOVNZ RCX,RDI MOV RDI,R8 MOV RDX,RAX POP RBP JMP 0x0014bc34
void translog_read_record_header_scan(long param_1,long *param_2,char param_3) { long lVar1; *(int4 *)(param_2 + 0x83) = 0; lVar1 = *(long *)(param_1 + 0x2000); *param_2 = lVar1; *param_2 = (ulong)*(uint *)(param_1 + 0x2028) + lVar1; lVar1 = 0; if (param_3 != '\0') { lVar1 = param_1; } translog_read_record_header_from_buffer (*(int8 *)(param_1 + 0x2018),*(int2 *)(param_1 + 0x2028),param_2,lVar1); return; }
28,570
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; }
O3
cpp
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [7], 0>(char const (&) [7]) const: cmpb $0x1, (%rdi) jne 0xa4acf pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x8(%rdi), %r12 movq (%r12), %rbx cmpq 0x8(%r12), %rbx je 0xa4ad2 movq %rsi, %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x181a0 testl %eax, %eax je 0xa4ac2 addq $0x30, %rbx cmpq 0x8(%r12), %rbx jne 0xa4aa8 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx jmp 0xa4ad5 xorl %eax, %eax retq movq %rbx, %rax cmpq %rbx, %rax setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: cmp byte ptr [rdi], 1 jnz short loc_A4ACF push r15 push r14 push r12 push rbx push rax mov r14, rdi mov r12, [rdi+8] mov rbx, [r12] cmp rbx, [r12+8] jz short loc_A4AD2 mov r15, rsi loc_A4AA8: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_A4AC2 add rbx, 30h ; '0' cmp rbx, [r12+8] jnz short loc_A4AA8 loc_A4AC2: mov rax, rbx mov rcx, [r14+8] mov rbx, [rcx+8] jmp short loc_A4AD5 loc_A4ACF: xor eax, eax retn loc_A4AD2: mov rax, rbx loc_A4AD5: cmp rax, rbx setnz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( long long a1, long long a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax if ( *(_BYTE *)a1 != 1 ) return 0; v2 = *(long long **)(a1 + 8); v3 = *v2; if ( *v2 == v2[1] ) { v4 = *v2; } else { do { if ( !(unsigned int)std::string::compare(v3, a2) ) break; v3 += 48LL; } while ( v3 != v2[1] ); v4 = v3; v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } return v4 != v3; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: CMP byte ptr [RDI],0x1 JNZ 0x001a4acf PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV R12,qword ptr [RDI + 0x8] MOV RBX,qword ptr [R12] CMP RBX,qword ptr [R12 + 0x8] JZ 0x001a4ad2 MOV R15,RSI LAB_001a4aa8: MOV RDI,RBX MOV RSI,R15 CALL 0x001181a0 TEST EAX,EAX JZ 0x001a4ac2 ADD RBX,0x30 CMP RBX,qword ptr [R12 + 0x8] JNZ 0x001a4aa8 LAB_001a4ac2: MOV RAX,RBX MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] JMP 0x001a4ad5 LAB_001a4acf: XOR EAX,EAX RET LAB_001a4ad2: MOV RAX,RBX LAB_001a4ad5: CMP RAX,RBX SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int8 _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA7_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (char *param_1) { long *plVar1; int iVar2; char *pcVar3; char *pcVar4; if (*param_1 != '\x01') { return 0; } plVar1 = *(long **)(param_1 + 8); pcVar3 = (char *)*plVar1; pcVar4 = pcVar3; if (pcVar3 != (char *)plVar1[1]) { do { iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar3 = pcVar3 + 0x30; } while (pcVar3 != (char *)plVar1[1]); pcVar4 = *(char **)(*(long *)(param_1 + 8) + 8); } return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != pcVar4); }
28,571
plan
eloqsql/unittest/mytap/tap.c
void plan(int count) { char *config= getenv("MYTAP_CONFIG"); size_t i; start_time= start_timer(); if (config) skip_big_tests= strcmp(config, "big"); setvbuf(tapout, 0, _IONBF, 0); /* provide output at once */ /* Install signal handler */ for (i= 0; i < sizeof(install_signal)/sizeof(*install_signal); ++i) signal(install_signal[i].signo, install_signal[i].handler); g_test.plan= count; switch (count) { case NO_PLAN: break; default: if (count > 0) { fprintf(tapout, "1..%d\n", count); fflush(tapout); } break; } }
O0
c
plan: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) leaq 0x81a17(%rip), %rdi # 0x15d479 callq 0x2a650 movq %rax, -0x10(%rbp) callq 0xdbb50 movq %rax, 0xba9bc9(%rip) # 0xc85640 cmpq $0x0, -0x10(%rbp) je 0xdba94 movq -0x10(%rbp), %rdi leaq 0x86fb8(%rip), %rsi # 0x162a41 callq 0x2a6d0 movl %eax, 0x1eef8c(%rip) # 0x2caa20 movq 0x1ec53d(%rip), %rax # 0x2c7fd8 movq (%rax), %rdi xorl %eax, %eax movl %eax, %ecx movl $0x2, %edx movq %rcx, %rsi callq 0x2a3c0 movq $0x0, -0x18(%rbp) cmpq $0xb, -0x18(%rbp) jae 0xdbafb movq -0x18(%rbp), %rcx leaq 0x1eef67(%rip), %rax # 0x2caa30 shlq $0x4, %rcx addq %rcx, %rax movl (%rax), %edi movq -0x18(%rbp), %rcx leaq 0x1eef53(%rip), %rax # 0x2caa30 shlq $0x4, %rcx addq %rcx, %rax movq 0x8(%rax), %rsi callq 0x2a300 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0xdbab7 movl -0x4(%rbp), %eax movl %eax, 0xba9aac(%rip) # 0xc855b0 movl -0x4(%rbp), %eax testl %eax, %eax jne 0xdbb0f jmp 0xdbb0d jmp 0xdbb41 cmpl $0x0, -0x4(%rbp) jle 0xdbb3f movq 0x1ec4bc(%rip), %rax # 0x2c7fd8 movq (%rax), %rdi movl -0x4(%rbp), %edx leaq 0x8195d(%rip), %rsi # 0x15d486 movb $0x0, %al callq 0x2a180 movq 0x1ec4a1(%rip), %rax # 0x2c7fd8 movq (%rax), %rdi callq 0x2a410 jmp 0xdbb41 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
plan: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi lea rdi, aMytapConfig; "MYTAP_CONFIG" call _getenv mov [rbp+var_10], rax call start_timer mov cs:start_time, rax cmp [rbp+var_10], 0 jz short loc_DBA94 mov rdi, [rbp+var_10] lea rsi, aUndoRecordTooB+10h; "big" call _strcmp mov cs:skip_big_tests, eax loc_DBA94: mov rax, cs:stdout_ptr mov rdi, [rax] xor eax, eax mov ecx, eax mov edx, 2 mov rsi, rcx call _setvbuf mov [rbp+var_18], 0 loc_DBAB7: cmp [rbp+var_18], 0Bh jnb short loc_DBAFB mov rcx, [rbp+var_18] lea rax, install_signal shl rcx, 4 add rax, rcx mov edi, [rax] mov rcx, [rbp+var_18] lea rax, install_signal shl rcx, 4 add rax, rcx mov rsi, [rax+8] call _signal mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_DBAB7 loc_DBAFB: mov eax, [rbp+var_4] mov cs:g_test, eax mov eax, [rbp+var_4] test eax, eax jnz short loc_DBB0F jmp short $+2 loc_DBB0D: jmp short loc_DBB41 loc_DBB0F: cmp [rbp+var_4], 0 jle short loc_DBB3F mov rax, cs:stdout_ptr mov rdi, [rax] mov edx, [rbp+var_4] lea rsi, a1D; "1..%d\n" mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush loc_DBB3F: jmp short $+2 loc_DBB41: add rsp, 20h pop rbp retn
long long plan(int a1) { long long result; // rax unsigned long long i; // [rsp+8h] [rbp-18h] long long v3; // [rsp+10h] [rbp-10h] v3 = getenv("MYTAP_CONFIG"); start_time = start_timer(); if ( v3 ) skip_big_tests = strcmp(v3, "big"); setvbuf(stdout, 0LL, 2LL); for ( i = 0LL; i < 0xB; ++i ) signal(*((unsigned int *)&install_signal + 4 * i), *((_QWORD *)&install_signal + 2 * i + 1)); g_test = a1; result = (unsigned int)a1; if ( a1 > 0 ) { fprintf(stdout, "1..%d\n", a1); return fflush(stdout); } return result; }
plan: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI LEA RDI,[0x25d479] CALL 0x0012a650 MOV qword ptr [RBP + -0x10],RAX CALL 0x001dbb50 MOV qword ptr [0x00d85640],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x001dba94 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x262a41] CALL 0x0012a6d0 MOV dword ptr [0x003caa20],EAX LAB_001dba94: MOV RAX,qword ptr [0x003c7fd8] MOV RDI,qword ptr [RAX] XOR EAX,EAX MOV ECX,EAX MOV EDX,0x2 MOV RSI,RCX CALL 0x0012a3c0 MOV qword ptr [RBP + -0x18],0x0 LAB_001dbab7: CMP qword ptr [RBP + -0x18],0xb JNC 0x001dbafb MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x3caa30] SHL RCX,0x4 ADD RAX,RCX MOV EDI,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x3caa30] SHL RCX,0x4 ADD RAX,RCX MOV RSI,qword ptr [RAX + 0x8] CALL 0x0012a300 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x001dbab7 LAB_001dbafb: MOV EAX,dword ptr [RBP + -0x4] MOV dword ptr [0x00d855b0],EAX MOV EAX,dword ptr [RBP + -0x4] TEST EAX,EAX JNZ 0x001dbb0f JMP 0x001dbb0d LAB_001dbb0d: JMP 0x001dbb41 LAB_001dbb0f: CMP dword ptr [RBP + -0x4],0x0 JLE 0x001dbb3f MOV RAX,qword ptr [0x003c7fd8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x4] LEA RSI,[0x25d486] MOV AL,0x0 CALL 0x0012a180 MOV RAX,qword ptr [0x003c7fd8] MOV RDI,qword ptr [RAX] CALL 0x0012a410 LAB_001dbb3f: JMP 0x001dbb41 LAB_001dbb41: ADD RSP,0x20 POP RBP RET
void plan(uint param_1) { char *__s1; ulong local_20; __s1 = getenv("MYTAP_CONFIG"); start_time = start_timer(); if (__s1 != (char *)0x0) { skip_big_tests = strcmp(__s1,"big"); } setvbuf(*(FILE **)PTR_stdout_003c7fd8,(char *)0x0,2,0); for (local_20 = 0; local_20 < 0xb; local_20 = local_20 + 1) { signal(*(int *)(install_signal + local_20 * 0x10), *(__sighandler_t *)(install_signal + local_20 * 0x10 + 8)); } g_test = param_1; if ((param_1 != 0) && (0 < (int)param_1)) { fprintf(*(FILE **)PTR_stdout_003c7fd8,"1..%d\n",(ulong)param_1); fflush(*(FILE **)PTR_stdout_003c7fd8); } return; }
28,572
plan
eloqsql/unittest/mytap/tap.c
void plan(int count) { char *config= getenv("MYTAP_CONFIG"); size_t i; start_time= start_timer(); if (config) skip_big_tests= strcmp(config, "big"); setvbuf(tapout, 0, _IONBF, 0); /* provide output at once */ /* Install signal handler */ for (i= 0; i < sizeof(install_signal)/sizeof(*install_signal); ++i) signal(install_signal[i].signo, install_signal[i].handler); g_test.plan= count; switch (count) { case NO_PLAN: break; default: if (count > 0) { fprintf(tapout, "1..%d\n", count); fflush(tapout); } break; } }
O3
c
plan: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edi, %ebx leaq 0x4f649(%rip), %rdi # 0xe3562 callq 0x2a690 movq %rax, %r14 leaq -0x48(%rbp), %rdi callq 0x2a170 movq %rax, 0xb7493f(%rip) # 0xc08870 testq %r14, %r14 je 0x93f4b leaq 0x54bb0(%rip), %rsi # 0xe8aed movq %r14, %rdi callq 0x2a710 movl %eax, 0x2fa96d(%rip) # 0x38e8b8 movq 0x2f9046(%rip), %r15 # 0x38cf98 movq (%r15), %rdi xorl %r12d, %r12d xorl %esi, %esi movl $0x2, %edx xorl %ecx, %ecx callq 0x2a3e0 leaq 0x2f0433(%rip), %r13 # 0x3843a0 leaq 0x8e2(%rip), %r14 # 0x94856 movl (%r12,%r13), %edi movq %r14, %rsi callq 0x2a300 addq $0x10, %r12 cmpq $0xb0, %r12 jne 0x93f74 movl %ebx, 0xb7484d(%rip) # 0xc087e0 testl %ebx, %ebx jle 0x93fc5 movq (%r15), %rdi leaq 0x4f5ce(%rip), %rdx # 0xe356f movl $0x1, %esi movl %ebx, %ecx xorl %eax, %eax callq 0x2a200 movq (%r15), %rdi addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x2a430 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
plan: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, edi lea rdi, aMytapConfig; "MYTAP_CONFIG" call _getenv mov r14, rax lea rdi, [rbp+var_48] call _times mov cs:start_time, rax test r14, r14 jz short loc_93F4B lea rsi, aUndoRecordTooB+10h; "big" mov rdi, r14 call _strcmp mov cs:skip_big_tests, eax loc_93F4B: mov r15, cs:stdout_ptr mov rdi, [r15] xor r12d, r12d xor esi, esi mov edx, 2 xor ecx, ecx call _setvbuf lea r13, install_signal lea r14, handle_core_signal loc_93F74: mov edi, [r12+r13] mov rsi, r14 call _signal add r12, 10h cmp r12, 0B0h jnz short loc_93F74 mov cs:g_test, ebx test ebx, ebx jle short loc_93FC5 mov rdi, [r15] lea rdx, a1D; "1..%d\n" mov esi, 1 mov ecx, ebx xor eax, eax call ___fprintf_chk mov rdi, [r15] add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _fflush loc_93FC5: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long plan(int a1) { long long v1; // r14 long long v2; // r12 long long result; // rax _BYTE v4[72]; // [rsp+8h] [rbp-48h] BYREF v1 = getenv("MYTAP_CONFIG"); start_time = times(v4); if ( v1 ) skip_big_tests = strcmp(v1, "big"); v2 = 0LL; setvbuf(stdout, 0LL, 2LL, 0LL); do { result = signal(*(unsigned int *)((char *)&install_signal + v2), handle_core_signal); v2 += 16LL; } while ( v2 != 176 ); g_test = a1; if ( a1 > 0 ) { __fprintf_chk(stdout, 1LL, "1..%d\n", a1); return fflush(stdout); } return result; }
plan: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,EDI LEA RDI,[0x1e3562] CALL 0x0012a690 MOV R14,RAX LEA RDI,[RBP + -0x48] CALL 0x0012a170 MOV qword ptr [0x00d08870],RAX TEST R14,R14 JZ 0x00193f4b LEA RSI,[0x1e8aed] MOV RDI,R14 CALL 0x0012a710 MOV dword ptr [0x0048e8b8],EAX LAB_00193f4b: MOV R15,qword ptr [0x0048cf98] MOV RDI,qword ptr [R15] XOR R12D,R12D XOR ESI,ESI MOV EDX,0x2 XOR ECX,ECX CALL 0x0012a3e0 LEA R13,[0x4843a0] LEA R14,[0x194856] LAB_00193f74: MOV EDI,dword ptr [R12 + R13*0x1] MOV RSI,R14 CALL 0x0012a300 ADD R12,0x10 CMP R12,0xb0 JNZ 0x00193f74 MOV dword ptr [0x00d087e0],EBX TEST EBX,EBX JLE 0x00193fc5 MOV RDI,qword ptr [R15] LEA RDX,[0x1e356f] MOV ESI,0x1 MOV ECX,EBX XOR EAX,EAX CALL 0x0012a200 MOV RDI,qword ptr [R15] ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0012a430 LAB_00193fc5: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void plan(int param_1) { int *puVar1; char *__s1; long lVar2; tms local_50; __s1 = getenv("MYTAP_CONFIG"); start_time = times(&local_50); if (__s1 != (char *)0x0) { skip_big_tests = strcmp(__s1,"big"); } puVar1 = PTR_stdout_0048cf98; lVar2 = 0; setvbuf(*(FILE **)PTR_stdout_0048cf98,(char *)0x0,2,0); do { signal(*(int *)((long)&install_signal + lVar2),handle_core_signal); lVar2 = lVar2 + 0x10; } while (lVar2 != 0xb0); g_test = param_1; if (0 < param_1) { __fprintf_chk(*(int8 *)puVar1,1,"1..%d\n",param_1); fflush(*(FILE **)puVar1); return; } return; }
28,573
mysql_stmt_next_result
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt) { int rc= 0; if (!stmt->mysql) { SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state < MYSQL_STMT_EXECUTED) { SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } if (!mysql_stmt_more_results(stmt)) return(-1); if (stmt->state > MYSQL_STMT_EXECUTED && stmt->state < MYSQL_STMT_FETCH_DONE) madb_reset_stmt(stmt, MADB_RESET_ERROR | MADB_RESET_BUFFER | MADB_RESET_LONGDATA); stmt->state= MYSQL_STMT_WAITING_USE_OR_STORE; if (mysql_next_result(stmt->mysql)) { stmt->state= MYSQL_STMT_FETCH_DONE; SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate, stmt->mysql->net.last_error); return(1); } if (stmt->mysql->status == MYSQL_STATUS_GET_RESULT) stmt->mysql->status= MYSQL_STATUS_STMT_RESULT; if (stmt->mysql->field_count) rc= madb_alloc_stmt_fields(stmt); else { stmt->upsert_status.affected_rows= stmt->mysql->affected_rows; stmt->upsert_status.last_insert_id= stmt->mysql->insert_id; stmt->upsert_status.server_status= stmt->mysql->server_status; stmt->upsert_status.warning_count= stmt->mysql->warning_count; } stmt->field_count= stmt->mysql->field_count; stmt->result.rows= 0; return(rc); }
O3
c
mysql_stmt_next_result: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x26bf7 movl 0x50(%rbx), %eax cmpl $0x1, %eax ja 0x26c3d movl $0x7de, %r15d # imm = 0x7DE movl %r15d, 0x90(%rdi) movl $0x297, %edi # imm = 0x297 addq 0x38(%rbx), %rdi leaq 0x29481(%rip), %r12 # 0x50000 movq (%r12), %rsi movl $0x5, %edx callq 0x13230 movq 0x38(%rbx), %rax xorl %r14d, %r14d movb %r14b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%rbx), %rdi leaq 0x29465(%rip), %r13 # 0x50010 movq 0x70(%r13), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13230 movq 0x38(%rbx), %rax movb %r14b, 0x296(%rax) movl %r15d, 0x108(%rbx) leaq 0x30d(%rbx), %rdi movq (%r12), %rsi movl $0x5, %edx callq 0x13230 movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi movq 0x70(%r13), %rsi jmp 0x26cca movl $0x7dd, 0x108(%rbx) # imm = 0x7DD leaq 0x30d(%rbx), %rdi leaq 0x293f1(%rip), %rax # 0x50000 movq (%rax), %rsi movl $0x5, %edx callq 0x13230 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x293dc(%rip), %rax # 0x50010 movq 0x68(%rax), %rsi jmp 0x26cca movzwl 0x380(%rdi), %ecx testl $0x1008, %ecx # imm = 0x1008 je 0x26cf3 cmpl $0x2, %eax sete %cl cmpl $0x6, %eax setae %al orb %cl, %al jne 0x26c71 movq %rbx, %rdi movl $0xb, %esi callq 0x25230 movq 0x38(%rbx), %rdi movl $0x3, 0x50(%rbx) callq 0x1e375 testl %eax, %eax je 0x26cfb movl $0x6, 0x50(%rbx) movq 0x38(%rbx), %rsi movl 0x90(%rsi), %eax movl %eax, 0x108(%rbx) leaq 0x30d(%rbx), %rdi addq $0x297, %rsi # imm = 0x297 movl $0x5, %edx callq 0x13230 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi movl $0x97, %esi addq 0x38(%rbx), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13230 movb %r14b, 0x30b(%rbx) movl $0x1, %r14d movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x26ce1 movq 0x38(%rbx), %r15 cmpl $0x1, 0x488(%r15) jne 0x26d18 movl $0x8, 0x488(%r15) movq 0x38(%rbx), %r15 movl 0x37c(%r15), %eax testl %eax, %eax je 0x26d87 movq 0x340(%rbx), %r14 movl %eax, 0x60(%rbx) cmpq $0x0, 0x2f8(%r15) je 0x26e1c movq %r14, %rdi xorl %esi, %esi callq 0x22757 movq 0x2f8(%r15), %rdi movl 0x37c(%r15), %esi movq %r14, %rdx callq 0x1f816 movq %rax, 0x58(%rbx) testq %rax, %rax je 0x26dc2 movl 0x60(%rbx), %eax imulq $0x70, %rax, %rsi movq %r14, %rdi callq 0x2263f movq %rax, 0x78(%rbx) testq %rax, %rax je 0x26dc2 movq %rax, %rdi movl 0x60(%rbx), %eax jmp 0x26e20 movq 0x338(%r15), %rax movq %rax, 0xf8(%rbx) movq 0x340(%r15), %rax movq %rax, 0x100(%rbx) movl 0x380(%r15), %eax movl %eax, 0xf4(%rbx) movl 0x388(%r15), %eax movl %eax, 0xf0(%rbx) xorl %r14d, %r14d jmp 0x26e37 movl $0x7d8, 0x108(%rbx) # imm = 0x7D8 leaq 0x30d(%rbx), %rdi leaq 0x29226(%rip), %rax # 0x50000 movq (%rax), %rsi movl $0x5, %edx callq 0x13230 xorl %r14d, %r14d movb %r14b, 0x312(%rbx) leaq 0x10c(%rbx), %rdi leaq 0x29211(%rip), %rax # 0x50010 movq 0x40(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x13230 movb %r14b, 0x30b(%rbx) movl $0x1, %r14d jmp 0x26e37 movq 0x78(%rbx), %rdi movl %eax, %eax imulq $0x70, %rax, %rdx xorl %r14d, %r14d xorl %esi, %esi callq 0x13270 movb $0x0, 0xe8(%rbx) movq 0x38(%rbx), %rax movl 0x37c(%rax), %eax movl %eax, 0x60(%rbx) movq $0x0, 0xc8(%rbx) jmp 0x26ce1
mysql_stmt_next_result: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rdi, [rdi+38h] test rdi, rdi jz loc_26BF7 mov eax, [rbx+50h] cmp eax, 1 ja loc_26C3D mov r15d, 7DEh mov [rdi+90h], r15d mov edi, 297h add rdi, [rbx+38h] lea r12, SQLSTATE_UNKNOWN mov rsi, [r12] mov edx, 5 call _strncpy mov rax, [rbx+38h] xor r14d, r14d mov [rax+29Ch], r14b mov edi, 97h add rdi, [rbx+38h] lea r13, client_errors mov rsi, [r13+70h] mov edx, 1FFh call _strncpy mov rax, [rbx+38h] mov [rax+296h], r14b mov [rbx+108h], r15d lea rdi, [rbx+30Dh] mov rsi, [r12] mov edx, 5 call _strncpy mov [rbx+312h], r14b lea rdi, [rbx+10Ch] mov rsi, [r13+70h] jmp loc_26CCA loc_26BF7: mov dword ptr [rbx+108h], 7DDh lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+68h] jmp loc_26CCA loc_26C3D: movzx ecx, word ptr [rdi+380h] test ecx, 1008h jz loc_26CF3 cmp eax, 2 setz cl cmp eax, 6 setnb al or al, cl jnz short loc_26C71 mov rdi, rbx mov esi, 0Bh call madb_reset_stmt mov rdi, [rbx+38h] loc_26C71: mov dword ptr [rbx+50h], 3 call mysql_next_result test eax, eax jz short loc_26CFB mov dword ptr [rbx+50h], 6 mov rsi, [rbx+38h] mov eax, [rsi+90h] mov [rbx+108h], eax lea rdi, [rbx+30Dh] add rsi, 297h mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] mov esi, 97h add rsi, [rbx+38h] loc_26CCA: mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r14d, 1 loc_26CE1: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_26CF3: mov r14d, 0FFFFFFFFh jmp short loc_26CE1 loc_26CFB: mov r15, [rbx+38h] cmp dword ptr [r15+488h], 1 jnz short loc_26D18 mov dword ptr [r15+488h], 8 mov r15, [rbx+38h] loc_26D18: mov eax, [r15+37Ch] test eax, eax jz short loc_26D87 mov r14, [rbx+340h] mov [rbx+60h], eax cmp qword ptr [r15+2F8h], 0 jz loc_26E1C mov rdi, r14 xor esi, esi call ma_free_root mov rdi, [r15+2F8h] mov esi, [r15+37Ch] mov rdx, r14 call ma_duplicate_resultset_metadata mov [rbx+58h], rax test rax, rax jz short loc_26DC2 mov eax, [rbx+60h] imul rsi, rax, 70h ; 'p' mov rdi, r14 call ma_alloc_root mov [rbx+78h], rax test rax, rax jz short loc_26DC2 mov rdi, rax mov eax, [rbx+60h] jmp loc_26E20 loc_26D87: mov rax, [r15+338h] mov [rbx+0F8h], rax mov rax, [r15+340h] mov [rbx+100h], rax mov eax, [r15+380h] mov [rbx+0F4h], eax mov eax, [r15+388h] mov [rbx+0F0h], eax xor r14d, r14d jmp short loc_26E37 loc_26DC2: mov dword ptr [rbx+108h], 7D8h lea rdi, [rbx+30Dh] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy xor r14d, r14d mov [rbx+312h], r14b lea rdi, [rbx+10Ch] lea rax, client_errors mov rsi, [rax+40h] mov edx, 200h call _strncpy mov [rbx+30Bh], r14b mov r14d, 1 jmp short loc_26E37 loc_26E1C: mov rdi, [rbx+78h] loc_26E20: mov eax, eax imul rdx, rax, 70h ; 'p' xor r14d, r14d xor esi, esi call _memset mov byte ptr [rbx+0E8h], 0 loc_26E37: mov rax, [rbx+38h] mov eax, [rax+37Ch] mov [rbx+60h], eax mov qword ptr [rbx+0C8h], 0 jmp loc_26CE1
long long mysql_stmt_next_result(long long a1) { long long v2; // rdi unsigned int v3; // eax long long v4; // rdi char *v5; // rsi long long v6; // rsi unsigned int v7; // r14d long long v9; // r15 unsigned int v10; // eax long long v11; // r14 long long v12; // rax char *v13; // rax char *v14; // rdi v2 = *(_QWORD *)(a1 + 56); if ( !v2 ) { *(_DWORD *)(a1 + 264) = 2013; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v4 = a1 + 268; v5 = client_errors[13]; goto LABEL_10; } v3 = *(_DWORD *)(a1 + 80); if ( v3 > 1 ) { if ( (*(_WORD *)(v2 + 896) & 0x1008) == 0 ) return (unsigned int)-1; if ( v3 != 2 && v3 < 6 ) { madb_reset_stmt(a1, 11); v2 = *(_QWORD *)(a1 + 56); } *(_DWORD *)(a1 + 80) = 3; if ( (unsigned int)mysql_next_result(v2) ) { *(_DWORD *)(a1 + 80) = 6; v6 = *(_QWORD *)(a1 + 56); *(_DWORD *)(a1 + 264) = *(_DWORD *)(v6 + 144); strncpy(a1 + 781, v6 + 663, 5LL); *(_BYTE *)(a1 + 786) = 0; v4 = a1 + 268; v5 = (char *)(*(_QWORD *)(a1 + 56) + 151LL); goto LABEL_10; } v9 = *(_QWORD *)(a1 + 56); if ( *(_DWORD *)(v9 + 1160) == 1 ) { *(_DWORD *)(v9 + 1160) = 8; v9 = *(_QWORD *)(a1 + 56); } v10 = *(_DWORD *)(v9 + 892); if ( v10 ) { v11 = *(_QWORD *)(a1 + 832); *(_DWORD *)(a1 + 96) = v10; if ( !*(_QWORD *)(v9 + 760) ) { v14 = *(char **)(a1 + 120); goto LABEL_23; } ma_free_root(v11, 0); v12 = ma_duplicate_resultset_metadata(*(_QWORD *)(v9 + 760), *(unsigned int *)(v9 + 892), v11); *(_QWORD *)(a1 + 88) = v12; if ( v12 ) { v13 = ma_alloc_root(v11, 112LL * *(unsigned int *)(a1 + 96)); *(_QWORD *)(a1 + 120) = v13; if ( v13 ) { v14 = v13; v10 = *(_DWORD *)(a1 + 96); LABEL_23: v7 = 0; memset(v14, 0LL, 112LL * v10); *(_BYTE *)(a1 + 232) = 0; goto LABEL_24; } } *(_DWORD *)(a1 + 264) = 2008; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[8], 512LL); *(_BYTE *)(a1 + 779) = 0; v7 = 1; } else { *(_QWORD *)(a1 + 248) = *(_QWORD *)(v9 + 824); *(_QWORD *)(a1 + 256) = *(_QWORD *)(v9 + 832); *(_DWORD *)(a1 + 244) = *(_DWORD *)(v9 + 896); *(_DWORD *)(a1 + 240) = *(_DWORD *)(v9 + 904); v7 = 0; } LABEL_24: *(_DWORD *)(a1 + 96) = *(_DWORD *)(*(_QWORD *)(a1 + 56) + 892LL); *(_QWORD *)(a1 + 200) = 0LL; return v7; } *(_DWORD *)(v2 + 144) = 2014; strncpy(*(_QWORD *)(a1 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a1 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a1 + 56) + 662LL) = 0; *(_DWORD *)(a1 + 264) = 2014; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; v4 = a1 + 268; v5 = client_errors[14]; LABEL_10: strncpy(v4, v5, 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; }
mysql_stmt_next_result: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x00126bf7 MOV EAX,dword ptr [RBX + 0x50] CMP EAX,0x1 JA 0x00126c3d MOV R15D,0x7de MOV dword ptr [RDI + 0x90],R15D MOV EDI,0x297 ADD RDI,qword ptr [RBX + 0x38] LEA R12,[0x150000] MOV RSI,qword ptr [R12] MOV EDX,0x5 CALL 0x00113230 MOV RAX,qword ptr [RBX + 0x38] XOR R14D,R14D MOV byte ptr [RAX + 0x29c],R14B MOV EDI,0x97 ADD RDI,qword ptr [RBX + 0x38] LEA R13,[0x150010] MOV RSI,qword ptr [R13 + 0x70] MOV EDX,0x1ff CALL 0x00113230 MOV RAX,qword ptr [RBX + 0x38] MOV byte ptr [RAX + 0x296],R14B MOV dword ptr [RBX + 0x108],R15D LEA RDI,[RBX + 0x30d] MOV RSI,qword ptr [R12] MOV EDX,0x5 CALL 0x00113230 MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] MOV RSI,qword ptr [R13 + 0x70] JMP 0x00126cca LAB_00126bf7: MOV dword ptr [RBX + 0x108],0x7dd LEA RDI,[RBX + 0x30d] LEA RAX,[0x150000] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113230 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x150010] MOV RSI,qword ptr [RAX + 0x68] JMP 0x00126cca LAB_00126c3d: MOVZX ECX,word ptr [RDI + 0x380] TEST ECX,0x1008 JZ 0x00126cf3 CMP EAX,0x2 SETZ CL CMP EAX,0x6 SETNC AL OR AL,CL JNZ 0x00126c71 MOV RDI,RBX MOV ESI,0xb CALL 0x00125230 MOV RDI,qword ptr [RBX + 0x38] LAB_00126c71: MOV dword ptr [RBX + 0x50],0x3 CALL 0x0011e375 TEST EAX,EAX JZ 0x00126cfb MOV dword ptr [RBX + 0x50],0x6 MOV RSI,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RSI + 0x90] MOV dword ptr [RBX + 0x108],EAX LEA RDI,[RBX + 0x30d] ADD RSI,0x297 MOV EDX,0x5 CALL 0x00113230 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] MOV ESI,0x97 ADD RSI,qword ptr [RBX + 0x38] LAB_00126cca: MOV EDX,0x200 CALL 0x00113230 MOV byte ptr [RBX + 0x30b],R14B MOV R14D,0x1 LAB_00126ce1: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00126cf3: MOV R14D,0xffffffff JMP 0x00126ce1 LAB_00126cfb: MOV R15,qword ptr [RBX + 0x38] CMP dword ptr [R15 + 0x488],0x1 JNZ 0x00126d18 MOV dword ptr [R15 + 0x488],0x8 MOV R15,qword ptr [RBX + 0x38] LAB_00126d18: MOV EAX,dword ptr [R15 + 0x37c] TEST EAX,EAX JZ 0x00126d87 MOV R14,qword ptr [RBX + 0x340] MOV dword ptr [RBX + 0x60],EAX CMP qword ptr [R15 + 0x2f8],0x0 JZ 0x00126e1c MOV RDI,R14 XOR ESI,ESI CALL 0x00122757 MOV RDI,qword ptr [R15 + 0x2f8] MOV ESI,dword ptr [R15 + 0x37c] MOV RDX,R14 CALL 0x0011f816 MOV qword ptr [RBX + 0x58],RAX TEST RAX,RAX JZ 0x00126dc2 MOV EAX,dword ptr [RBX + 0x60] IMUL RSI,RAX,0x70 MOV RDI,R14 CALL 0x0012263f MOV qword ptr [RBX + 0x78],RAX TEST RAX,RAX JZ 0x00126dc2 MOV RDI,RAX MOV EAX,dword ptr [RBX + 0x60] JMP 0x00126e20 LAB_00126d87: MOV RAX,qword ptr [R15 + 0x338] MOV qword ptr [RBX + 0xf8],RAX MOV RAX,qword ptr [R15 + 0x340] MOV qword ptr [RBX + 0x100],RAX MOV EAX,dword ptr [R15 + 0x380] MOV dword ptr [RBX + 0xf4],EAX MOV EAX,dword ptr [R15 + 0x388] MOV dword ptr [RBX + 0xf0],EAX XOR R14D,R14D JMP 0x00126e37 LAB_00126dc2: MOV dword ptr [RBX + 0x108],0x7d8 LEA RDI,[RBX + 0x30d] LEA RAX,[0x150000] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113230 XOR R14D,R14D MOV byte ptr [RBX + 0x312],R14B LEA RDI,[RBX + 0x10c] LEA RAX,[0x150010] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x200 CALL 0x00113230 MOV byte ptr [RBX + 0x30b],R14B MOV R14D,0x1 JMP 0x00126e37 LAB_00126e1c: MOV RDI,qword ptr [RBX + 0x78] LAB_00126e20: MOV EAX,EAX IMUL RDX,RAX,0x70 XOR R14D,R14D XOR ESI,ESI CALL 0x00113270 MOV byte ptr [RBX + 0xe8],0x0 LAB_00126e37: MOV RAX,qword ptr [RBX + 0x38] MOV EAX,dword ptr [RAX + 0x37c] MOV dword ptr [RBX + 0x60],EAX MOV qword ptr [RBX + 0xc8],0x0 JMP 0x00126ce1
int8 mysql_stmt_next_result(long param_1) { int iVar1; uint uVar2; long lVar3; void *__s; char *__src; int8 uVar4; lVar3 = *(long *)(param_1 + 0x38); if (lVar3 == 0) { *(int4 *)(param_1 + 0x108) = 0x7dd; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; __src = PTR_s_Lost_connection_to_server_during_00150078; LAB_00126cca: strncpy((char *)(param_1 + 0x10c),__src,0x200); *(int1 *)(param_1 + 0x30b) = 0; return 1; } uVar2 = *(uint *)(param_1 + 0x50); if (uVar2 < 2) { *(int4 *)(lVar3 + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_1 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_1 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_00150080,0x1ff); *(int1 *)(*(long *)(param_1 + 0x38) + 0x296) = 0; *(int4 *)(param_1 + 0x108) = 0x7de; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; __src = PTR_s_Commands_out_of_sync__you_can_t_r_00150080; goto LAB_00126cca; } if ((*(ushort *)(lVar3 + 0x380) & 0x1008) == 0) { return 0xffffffff; } if (uVar2 < 6 && uVar2 != 2) { madb_reset_stmt(param_1); lVar3 = *(long *)(param_1 + 0x38); } *(int4 *)(param_1 + 0x50) = 3; iVar1 = mysql_next_result(lVar3); if (iVar1 != 0) { *(int4 *)(param_1 + 0x50) = 6; *(int4 *)(param_1 + 0x108) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x90); strncpy((char *)(param_1 + 0x30d),(char *)(*(long *)(param_1 + 0x38) + 0x297),5); *(int1 *)(param_1 + 0x312) = 0; __src = (char *)(*(long *)(param_1 + 0x38) + 0x97); goto LAB_00126cca; } lVar3 = *(long *)(param_1 + 0x38); if (*(int *)(lVar3 + 0x488) == 1) { *(int4 *)(lVar3 + 0x488) = 8; lVar3 = *(long *)(param_1 + 0x38); } uVar2 = *(uint *)(lVar3 + 0x37c); if (uVar2 == 0) { *(int8 *)(param_1 + 0xf8) = *(int8 *)(lVar3 + 0x338); *(int8 *)(param_1 + 0x100) = *(int8 *)(lVar3 + 0x340); *(int4 *)(param_1 + 0xf4) = *(int4 *)(lVar3 + 0x380); *(int4 *)(param_1 + 0xf0) = *(int4 *)(lVar3 + 0x388); uVar4 = 0; goto LAB_00126e37; } uVar4 = *(int8 *)(param_1 + 0x340); *(uint *)(param_1 + 0x60) = uVar2; if (*(long *)(lVar3 + 0x2f8) == 0) { __s = *(void **)(param_1 + 0x78); LAB_00126e20: uVar4 = 0; memset(__s,0,(ulong)uVar2 * 0x70); *(int1 *)(param_1 + 0xe8) = 0; } else { ma_free_root(uVar4,0); lVar3 = ma_duplicate_resultset_metadata (*(int8 *)(lVar3 + 0x2f8),*(int4 *)(lVar3 + 0x37c),uVar4); *(long *)(param_1 + 0x58) = lVar3; if (lVar3 != 0) { __s = (void *)ma_alloc_root(uVar4); *(void **)(param_1 + 0x78) = __s; if (__s != (void *)0x0) { uVar2 = *(uint *)(param_1 + 0x60); goto LAB_00126e20; } } *(int4 *)(param_1 + 0x108) = 0x7d8; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_Client_run_out_of_memory_00150050,0x200); *(int1 *)(param_1 + 0x30b) = 0; uVar4 = 1; } LAB_00126e37: *(int4 *)(param_1 + 0x60) = *(int4 *)(*(long *)(param_1 + 0x38) + 0x37c); *(int8 *)(param_1 + 200) = 0; return uVar4; }
28,574
js_get_length32
bluesky950520[P]quickjs/quickjs.c
static __exception int js_get_length32(JSContext *ctx, uint32_t *pres, JSValue obj) { JSValue len_val; len_val = JS_GetProperty(ctx, obj, JS_ATOM_length); if (JS_IsException(len_val)) { *pres = 0; return -1; } return JS_ToUint32Free(ctx, pres, len_val); }
O2
c
js_get_length32: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 pushq $0x32 popq %rax movq %rdx, %rsi movq %rcx, %rdx movl %eax, %ecx callq 0x1b043 movq %rdx, %rcx cmpl $0x6, %ecx jne 0x39522 andl $0x0, (%rbx) pushq $-0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r14 retq movq %r14, %rdi movq %rbx, %rsi movq %rax, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x215e0
js_get_length32: push r14 push rbx push rax mov rbx, rsi mov r14, rdi push 32h ; '2' pop rax mov rsi, rdx mov rdx, rcx mov ecx, eax call JS_GetProperty mov rcx, rdx cmp ecx, 6 jnz short loc_39522 and dword ptr [rbx], 0 push 0FFFFFFFFFFFFFFFFh pop rax add rsp, 8 pop rbx pop r14 retn loc_39522: mov rdi, r14 mov rsi, rbx mov rdx, rax add rsp, 8 pop rbx pop r14 jmp JS_ToInt32Free
long long js_get_length32(long long a1, _DWORD *a2, int a3, int a4) { unsigned long long Property; // rax long long v5; // rdx Property = JS_GetProperty(a1, a3, a4, 50); if ( (_DWORD)v5 != 6 ) return JS_ToInt32Free(a1, a2, Property, v5); *a2 = 0; return -1LL; }
js_get_length32: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI PUSH 0x32 POP RAX MOV RSI,RDX MOV RDX,RCX MOV ECX,EAX CALL 0x0011b043 MOV RCX,RDX CMP ECX,0x6 JNZ 0x00139522 AND dword ptr [RBX],0x0 PUSH -0x1 POP RAX ADD RSP,0x8 POP RBX POP R14 RET LAB_00139522: MOV RDI,R14 MOV RSI,RBX MOV RDX,RAX ADD RSP,0x8 POP RBX POP R14 JMP 0x001215e0
int8 js_get_length32(int8 param_1,int4 *param_2,int8 param_3,int8 param_4) { int8 uVar1; int1 auVar2 [12]; auVar2 = JS_GetProperty(param_1,param_3,param_4,0x32); if (auVar2._8_4_ == 6) { *param_2 = 0; return 0xffffffffffffffff; } uVar1 = JS_ToInt32Free(param_1,param_2,auVar2._0_8_); return uVar1; }
28,575
my_wc_mb_sjis
eloqsql/strings/ctype-sjis.c
static int my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (wc == 0x5c) { /* Special case when converting from Unicode to SJIS: U+005C -> [81][5F] FULL WIDTH REVERSE SOLIDUS */ code= MB2(0x815F); goto mb; } if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; /* ASCII */ return 1; } if (wc > 0xFFFF || !(code= unicode_to_sjis[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } mb: if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208 */ return 2; }
O3
c
my_wc_mb_sjis: pushq %rbp movq %rsp, %rbp cmpl $0x7f, %esi jg 0x3dc46 movl $0x815f, %edi # imm = 0x815F cmpq $0x5c, %rsi je 0x3dc7c movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x3dc96 movb %sil, (%rdx) jmp 0x3dc75 xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0x3dc96 leaq 0x18a828(%rip), %rdi # 0x1c8480 movzwl (%rdi,%rsi,2), %edi testl %edi, %edi je 0x3dc96 cmpl $0xff, %edi ja 0x3dc7c movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x3dc96 movb %dil, (%rdx) movl $0x1, %eax jmp 0x3dc96 leaq 0x2(%rdx), %rsi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rsi ja 0x3dc96 rolw $0x8, %di movw %di, (%rdx) movl $0x2, %eax popq %rbp retq
my_wc_mb_sjis: push rbp mov rbp, rsp cmp esi, 7Fh jg short loc_3DC46 mov edi, 815Fh cmp rsi, 5Ch ; '\' jz short loc_3DC7C mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_3DC96 mov [rdx], sil jmp short loc_3DC75 loc_3DC46: xor eax, eax cmp rsi, 0FFFFh ja short loc_3DC96 lea rdi, unicode_to_sjis movzx edi, word ptr [rdi+rsi*2] test edi, edi jz short loc_3DC96 cmp edi, 0FFh ja short loc_3DC7C mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_3DC96 mov [rdx], dil loc_3DC75: mov eax, 1 jmp short loc_3DC96 loc_3DC7C: lea rsi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rsi, rcx ja short loc_3DC96 rol di, 8 mov [rdx], di mov eax, 2 loc_3DC96: pop rbp retn
long long my_wc_mb_sjis(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { unsigned int v4; // edi long long result; // rax if ( (int)a2 <= 127 ) { LOWORD(v4) = -32417; if ( a2 != 92 ) { result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; *a3 = a2; return 1LL; } LABEL_11: result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { *(_WORD *)a3 = __ROL2__(v4, 8); return 2LL; } return result; } result = 0LL; if ( a2 <= 0xFFFF ) { v4 = unicode_to_sjis[a2]; if ( unicode_to_sjis[a2] ) { if ( v4 <= 0xFF ) { result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; *a3 = v4; return 1LL; } goto LABEL_11; } } return result; }
my_wc_mb_sjis: PUSH RBP MOV RBP,RSP CMP ESI,0x7f JG 0x0013dc46 MOV EDI,0x815f CMP RSI,0x5c JZ 0x0013dc7c MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0013dc96 MOV byte ptr [RDX],SIL JMP 0x0013dc75 LAB_0013dc46: XOR EAX,EAX CMP RSI,0xffff JA 0x0013dc96 LEA RDI,[0x2c8480] MOVZX EDI,word ptr [RDI + RSI*0x2] TEST EDI,EDI JZ 0x0013dc96 CMP EDI,0xff JA 0x0013dc7c MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0013dc96 MOV byte ptr [RDX],DIL LAB_0013dc75: MOV EAX,0x1 JMP 0x0013dc96 LAB_0013dc7c: LEA RSI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RSI,RCX JA 0x0013dc96 ROL DI,0x8 MOV word ptr [RDX],DI MOV EAX,0x2 LAB_0013dc96: POP RBP RET
int8 my_wc_mb_sjis(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { ushort uVar1; if ((int)param_2 < 0x80) { uVar1 = 0x815f; if (param_2 == 0x5c) { LAB_0013dc7c: if (param_4 < param_3 + 1) { return 0xffffff9a; } *param_3 = uVar1 << 8 | uVar1 >> 8; return 2; } if (param_4 <= param_3) { return 0xffffff9b; } *(char *)param_3 = (char)param_2; } else { if (0xffff < param_2) { return 0; } uVar1 = *(ushort *)(unicode_to_sjis + param_2 * 2); if (uVar1 == 0) { return 0; } if (0xff < uVar1) goto LAB_0013dc7c; if (param_4 <= param_3) { return 0xffffff9b; } *(char *)param_3 = (char)uVar1; } return 1; }
28,576
has_path
eloqsql/mysys/my_getwd.c
my_bool has_path(const char *name) { return MY_TEST(strchr(name, FN_LIBCHAR)) #if FN_LIBCHAR != '/' || MY_TEST(strchr(name, '/')) #endif #ifdef FN_DEVCHAR || MY_TEST(strchr(name, FN_DEVCHAR)) #endif ; }
O3
c
has_path: pushq %rbp movq %rsp, %rbp movl $0x2f, %esi callq 0x29440 testq %rax, %rax setne %al popq %rbp retq nopl (%rax)
has_path: push rbp mov rbp, rsp mov esi, 2Fh ; '/' call _strchr test rax, rax setnz al pop rbp retn
bool has_path(long long a1) { return strchr(a1, 47LL) != 0; }
has_path: PUSH RBP MOV RBP,RSP MOV ESI,0x2f CALL 0x00129440 TEST RAX,RAX SETNZ AL POP RBP RET
bool has_path(char *param_1) { char *pcVar1; pcVar1 = strchr(param_1,0x2f); return pcVar1 != (char *)0x0; }
28,577
my_lengthsp_8bit
eloqsql/strings/ctype-simple.c
size_t my_lengthsp_8bit(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, size_t length) { const char *end; end= (const char *) skip_trailing_space((const uchar *)ptr, length); return (size_t) (end-ptr); }
O3
c
my_lengthsp_8bit: pushq %rbp movq %rsp, %rbp leaq (%rsi,%rdx), %rdi cmpq $0x15, %rdx jb 0x5ab3b movq %rdi, %rdx andq $-0x4, %rdx cmpq %rsi, %rdx jbe 0x5ab3b leaq 0x3(%rsi), %rax andq $-0x4, %rax movq %rdi, %rcx movb -0x1(%rdi), %r8b cmpq %rdx, %rdi jbe 0x5ab5c leaq -0x1(%rcx), %rdi cmpb $0x20, %r8b je 0x5ab23 jmp 0x5ab3e movq %rdi, %rcx movq %rcx, %rdx subq %rsi, %rdx movq %rdx, %rax cmpq %rsi, %rcx jbe 0x5ab5a cmpb $0x20, -0x1(%rcx) leaq -0x1(%rcx), %rcx leaq -0x1(%rax), %rdx je 0x5ab44 popq %rbp retq cmpb $0x20, %r8b setne %dil cmpq %rdx, %rax setae %dl orb %dil, %dl jne 0x5ab3e movq %rcx, %rdx movq %rdx, %rcx cmpq %rax, %rdx jbe 0x5ab3e leaq -0x4(%rcx), %rdx cmpl $0x20202020, -0x4(%rcx) # imm = 0x20202020 je 0x5ab72 jmp 0x5ab3e
my_lengthsp_8bit: push rbp mov rbp, rsp lea rdi, [rsi+rdx] cmp rdx, 15h jb short loc_5AB3B mov rdx, rdi and rdx, 0FFFFFFFFFFFFFFFCh cmp rdx, rsi jbe short loc_5AB3B lea rax, [rsi+3] and rax, 0FFFFFFFFFFFFFFFCh loc_5AB23: mov rcx, rdi mov r8b, [rdi-1] cmp rdi, rdx jbe short loc_5AB5C lea rdi, [rcx-1] cmp r8b, 20h ; ' ' jz short loc_5AB23 jmp short loc_5AB3E loc_5AB3B: mov rcx, rdi loc_5AB3E: mov rdx, rcx sub rdx, rsi loc_5AB44: mov rax, rdx cmp rcx, rsi jbe short loc_5AB5A cmp byte ptr [rcx-1], 20h ; ' ' lea rcx, [rcx-1] lea rdx, [rax-1] jz short loc_5AB44 loc_5AB5A: pop rbp retn loc_5AB5C: cmp r8b, 20h ; ' ' setnz dil cmp rax, rdx setnb dl or dl, dil jnz short loc_5AB3E mov rdx, rcx loc_5AB72: mov rcx, rdx cmp rdx, rax jbe short loc_5AB3E lea rdx, [rcx-4] cmp dword ptr [rcx-4], 20202020h jz short loc_5AB72 jmp short loc_5AB3E
unsigned long long my_lengthsp_8bit(long long a1, unsigned long long a2, unsigned long long a3) { unsigned long long v3; // rdi unsigned long long v4; // rdx unsigned long long v5; // rax unsigned long long v6; // rcx char v7; // r8 unsigned long long v8; // rdx unsigned long long result; // rax bool v10; // zf unsigned long long v11; // rdx v3 = a2 + a3; if ( a3 < 0x15 || (v4 = v3 & 0xFFFFFFFFFFFFFFFCLL, (v3 & 0xFFFFFFFFFFFFFFFCLL) <= a2) ) { v6 = v3; } else { v5 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL; while ( 1 ) { v6 = v3; v7 = *(_BYTE *)(v3 - 1); if ( v3 <= v4 ) break; --v3; if ( v7 != 32 ) goto LABEL_8; } if ( v7 == 32 && v5 < v4 ) { v11 = v3; do { v6 = v11; if ( v11 <= v5 ) break; v11 -= 4LL; } while ( *(_DWORD *)(v6 - 4) == 538976288 ); } } LABEL_8: v8 = v6 - a2; do { result = v8; if ( v6 <= a2 ) break; v10 = *(_BYTE *)--v6 == 32; --v8; } while ( v10 ); return result; }
my_lengthsp_8bit: PUSH RBP MOV RBP,RSP LEA RDI,[RSI + RDX*0x1] CMP RDX,0x15 JC 0x0015ab3b MOV RDX,RDI AND RDX,-0x4 CMP RDX,RSI JBE 0x0015ab3b LEA RAX,[RSI + 0x3] AND RAX,-0x4 LAB_0015ab23: MOV RCX,RDI MOV R8B,byte ptr [RDI + -0x1] CMP RDI,RDX JBE 0x0015ab5c LEA RDI,[RCX + -0x1] CMP R8B,0x20 JZ 0x0015ab23 JMP 0x0015ab3e LAB_0015ab3b: MOV RCX,RDI LAB_0015ab3e: MOV RDX,RCX SUB RDX,RSI LAB_0015ab44: MOV RAX,RDX CMP RCX,RSI JBE 0x0015ab5a CMP byte ptr [RCX + -0x1],0x20 LEA RCX,[RCX + -0x1] LEA RDX,[RAX + -0x1] JZ 0x0015ab44 LAB_0015ab5a: POP RBP RET LAB_0015ab5c: CMP R8B,0x20 SETNZ DIL CMP RAX,RDX SETNC DL OR DL,DIL JNZ 0x0015ab3e MOV RDX,RCX LAB_0015ab72: MOV RCX,RDX CMP RDX,RAX JBE 0x0015ab3e LEA RDX,[RCX + -0x4] CMP dword ptr [RCX + -0x4],0x20202020 JZ 0x0015ab72 JMP 0x0015ab3e
void my_lengthsp_8bit(int8 param_1,ulong param_2,ulong param_3) { char *pcVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; uVar4 = param_2 + param_3; if ((0x14 < param_3) && (uVar5 = uVar4 & 0xfffffffffffffffc, param_2 < uVar5)) { uVar3 = param_2 + 3 & 0xfffffffffffffffc; uVar2 = uVar4; do { uVar4 = uVar2; if (uVar4 <= uVar5) { uVar2 = uVar4; if (uVar3 < uVar5 && *(char *)(uVar4 - 1) == ' ') goto LAB_0015ab72; break; } uVar2 = uVar4 - 1; } while (*(char *)(uVar4 - 1) == ' '); } goto LAB_0015ab44; while (uVar2 = uVar4 - 4, *(int *)(uVar4 - 4) == 0x20202020) { LAB_0015ab72: uVar4 = uVar2; if (uVar4 <= uVar3) break; } LAB_0015ab44: do { if (uVar4 <= param_2) { return; } pcVar1 = (char *)(uVar4 - 1); uVar4 = uVar4 - 1; } while (*pcVar1 == ' '); return; }
28,578
update_frm_version(TABLE*)
eloqsql/sql/handler.cc
static bool update_frm_version(TABLE *table) { char path[FN_REFLEN]; File file; int result= 1; DBUG_ENTER("update_frm_version"); /* No need to update frm version in case table was created or checked by server with the same version. This also ensures that we do not update frm version for temporary tables as this code doesn't support temporary tables. */ if (table->s->mysql_version == MYSQL_VERSION_ID) DBUG_RETURN(0); strxmov(path, table->s->normalized_path.str, reg_ext, NullS); if ((file= mysql_file_open(key_file_frm, path, O_RDWR|O_BINARY, MYF(MY_WME))) >= 0) { uchar version[4]; int4store(version, MYSQL_VERSION_ID); if ((result= (int)mysql_file_pwrite(file, (uchar*) version, 4, 51L, MYF(MY_WME+MY_NABP)))) goto err; table->s->mysql_version= MYSQL_VERSION_ID; } err: if (file >= 0) (void) mysql_file_close(file, MYF(MY_WME)); DBUG_RETURN(result); }
O0
cpp
update_frm_version(TABLE*): pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x220(%rbp) movl $0x1, -0x228(%rbp) movq -0x220(%rbp), %rax movq (%rax), %rax cmpq $0x18902, 0x320(%rax) # imm = 0x18902 jne 0x8e602e jmp 0x8e6022 movb $0x0, -0x215(%rbp) jmp 0x8e613c leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rax movq (%rax), %rax movq 0x2d0(%rax), %rsi leaq 0xcd5bd3(%rip), %rdx # 0x15bbc20 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0xc8c090 leaq 0xcd7eb1(%rip), %rax # 0x15bdf10 movl (%rax), %edi leaq -0x210(%rbp), %rcx leaq 0x4df316(%rip), %rsi # 0xdc5385 movl $0x12c3, %edx # imm = 0x12C3 movl $0x2, %r8d movl $0x10, %r9d callq 0x8eefe0 movl %eax, -0x224(%rbp) cmpl $0x0, %eax jl 0x8e6101 jmp 0x8e6092 leaq -0x214(%rbp), %rax movq %rax, -0x230(%rbp) movq -0x230(%rbp), %rax movl $0x18902, (%rax) # imm = 0x18902 movl -0x224(%rbp), %edx leaq -0x214(%rbp), %rcx leaq 0x4df2c4(%rip), %rdi # 0xdc5385 movl $0x12ca, %esi # imm = 0x12CA movl $0x4, %r8d movl $0x33, %r9d movq $0x14, (%rsp) callq 0x8ef0c0 movl %eax, -0x228(%rbp) cmpl $0x0, %eax je 0x8e60ec jmp 0x8e6103 movq -0x220(%rbp), %rax movq (%rax), %rax movq $0x18902, 0x320(%rax) # imm = 0x18902 jmp 0x8e6103 cmpl $0x0, -0x224(%rbp) jl 0x8e6128 movl -0x224(%rbp), %edx leaq 0x4df26c(%rip), %rdi # 0xdc5385 movl $0x12d1, %esi # imm = 0x12D1 movl $0x10, %ecx callq 0x8ef230 jmp 0x8e612a cmpl $0x0, -0x228(%rbp) setne %al andb $0x1, %al movb %al, -0x215(%rbp) movb -0x215(%rbp), %al movb %al, -0x231(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x8e616b movb -0x231(%rbp), %al andb $0x1, %al addq $0x240, %rsp # imm = 0x240 popq %rbp retq callq 0x433650
_ZL18update_frm_versionP5TABLE: push rbp mov rbp, rsp sub rsp, 240h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_220], rdi mov [rbp+var_228], 1 mov rax, [rbp+var_220] mov rax, [rax] cmp qword ptr [rax+320h], 18902h jnz short loc_8E602E jmp short $+2 loc_8E6022: mov [rbp+var_215], 0 jmp loc_8E613C loc_8E602E: lea rdi, [rbp+var_210] mov rax, [rbp+var_220] mov rax, [rax] mov rsi, [rax+2D0h] lea rdx, reg_ext xor eax, eax mov ecx, eax mov al, 0 call strxmov lea rax, key_file_frm mov edi, [rax]; unsigned int lea rcx, [rbp+var_210]; char * lea rsi, aWorkspaceLlm4b_95; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 12C3h; unsigned int mov r8d, 2; int mov r9d, 10h; unsigned __int64 call _ZL22inline_mysql_file_openjPKcjS0_im_11; inline_mysql_file_open(uint,char const*,uint,char const*,int,ulong) mov [rbp+var_224], eax cmp eax, 0 jl short loc_8E6101 jmp short $+2 loc_8E6092: lea rax, [rbp+var_214] mov [rbp+var_230], rax mov rax, [rbp+var_230] mov dword ptr [rax], 18902h mov edx, [rbp+var_224]; int lea rcx, [rbp+var_214]; unsigned __int8 * lea rdi, aWorkspaceLlm4b_95; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 12CAh; unsigned int mov r8d, 4; unsigned __int64 mov r9d, 33h ; '3'; unsigned __int64 mov [rsp+240h+var_240], 14h; unsigned __int64 call _ZL24inline_mysql_file_pwritePKcjiPKhmym_0; inline_mysql_file_pwrite(char const*,uint,int,uchar const*,ulong,ulong long,ulong) mov [rbp+var_228], eax cmp eax, 0 jz short loc_8E60EC jmp short loc_8E6103 loc_8E60EC: mov rax, [rbp+var_220] mov rax, [rax] mov qword ptr [rax+320h], 18902h loc_8E6101: jmp short $+2 loc_8E6103: cmp [rbp+var_224], 0 jl short loc_8E6128 mov edx, [rbp+var_224]; int lea rdi, aWorkspaceLlm4b_95; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 12D1h; unsigned int mov ecx, 10h; unsigned __int64 call _ZL23inline_mysql_file_closePKcjim_16; inline_mysql_file_close(char const*,uint,int,ulong) loc_8E6128: jmp short $+2 loc_8E612A: cmp [rbp+var_228], 0 setnz al and al, 1 mov [rbp+var_215], al loc_8E613C: mov al, [rbp+var_215] mov [rbp+var_231], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_8E616B mov al, [rbp+var_231] and al, 1 add rsp, 240h pop rbp retn loc_8E616B: call ___stack_chk_fail
bool update_frm_version(TABLE *a1, long long a2, long long a3, long long a4, int a5, int a6) { int v7; // [rsp+18h] [rbp-228h] int v8; // [rsp+1Ch] [rbp-224h] int v10; // [rsp+2Ch] [rbp-214h] BYREF char v11[520]; // [rsp+30h] [rbp-210h] BYREF unsigned long long v12; // [rsp+238h] [rbp-8h] v12 = __readfsqword(0x28u); v7 = 1; if ( *(_QWORD *)(*(_QWORD *)a1 + 800LL) == 100610LL ) { return 0; } else { strxmov((unsigned int)v11, *(_QWORD *)(*(_QWORD *)a1 + 720LL), (unsigned int)reg_ext, 0, a5, a6); v8 = inline_mysql_file_open( key_file_frm, "/workspace/llm4binary/github2025/eloqsql/sql/handler.cc", 0x12C3u, v11, 2, 0x10uLL); if ( v8 >= 0 ) { v10 = 100610; v7 = inline_mysql_file_pwrite( "/workspace/llm4binary/github2025/eloqsql/sql/handler.cc", 0x12CAu, v8, (const unsigned __int8 *)&v10, 4uLL, 0x33uLL, 0x14uLL); if ( !v7 ) *(_QWORD *)(*(_QWORD *)a1 + 800LL) = 100610LL; } if ( v8 >= 0 ) inline_mysql_file_close("/workspace/llm4binary/github2025/eloqsql/sql/handler.cc", 0x12D1u, v8, 0x10uLL); return v7 != 0; } }
check_cte_dependencies_and_resolve_references: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RDI CALL 0x008e4e70 TEST AL,0x1 JNZ 0x008e5fff JMP 0x008e6005 LAB_008e5fff: MOV byte ptr [RBP + -0x1],0x1 JMP 0x008e6058 LAB_008e6005: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x17c6] SHR EAX,0x5 AND EAX,0x1 TEST EAX,0x1 JNZ 0x008e6022 MOV byte ptr [RBP + -0x1],0x0 JMP 0x008e6058 LAB_008e6022: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RDI + 0x10] MOV RDX,qword ptr [RDI + 0x18] CALL 0x008e55a0 TEST AL,0x1 JNZ 0x008e6039 JMP 0x008e603f LAB_008e6039: MOV byte ptr [RBP + -0x1],0x1 JMP 0x008e6058 LAB_008e603f: MOV RDI,qword ptr [RBP + -0x18] CALL 0x008e54d0 TEST AL,0x1 JNZ 0x008e604e JMP 0x008e6054 LAB_008e604e: MOV byte ptr [RBP + -0x1],0x1 JMP 0x008e6058 LAB_008e6054: MOV byte ptr [RBP + -0x1],0x0 LAB_008e6058: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x20 POP RBP RET
/* LEX::check_cte_dependencies_and_resolve_references() */ int1 __thiscall LEX::check_cte_dependencies_and_resolve_references(LEX *this) { ulong uVar1; int1 local_9; uVar1 = check_dependencies_in_with_clauses(this); if ((uVar1 & 1) == 0) { if ((*(uint *)(this + 0x17c6) >> 5 & 1) == 0) { local_9 = 0; } else { uVar1 = resolve_references_to_cte (this,*(TABLE_LIST **)(this + 0x10),*(TABLE_LIST ***)(this + 0x18)); if ((uVar1 & 1) == 0) { uVar1 = resolve_references_to_cte_in_hanging_cte(this); if ((uVar1 & 1) == 0) { local_9 = 0; } else { local_9 = 1; } } else { local_9 = 1; } } } else { local_9 = 1; } return local_9; }
28,579
void ImPlot::PlotStems<short>(char const*, short const*, int, double, double, double, int, int, int)
zkingston[P]unknot/build_O1/_deps/implot-src/implot_items.cpp
void PlotStems(const char* label_id, const T* values, int count, double ref, double scale, double start, ImPlotStemsFlags flags, int offset, int stride) { if (ImHasFlag(flags, ImPlotStemsFlags_Horizontal)) { GetterXY<IndexerIdx<T>,IndexerLin> get_mark(IndexerIdx<T>(values,count,offset,stride),IndexerLin(scale,start),count); GetterXY<IndexerConst,IndexerLin> get_base(IndexerConst(ref),IndexerLin(scale,start),count); PlotStemsEx(label_id, get_mark, get_base, flags); } else { GetterXY<IndexerLin,IndexerIdx<T>> get_mark(IndexerLin(scale,start),IndexerIdx<T>(values,count,offset,stride),count); GetterXY<IndexerLin,IndexerConst> get_base(IndexerLin(scale,start),IndexerConst(ref),count); PlotStemsEx(label_id, get_mark, get_base, flags); } }
O1
cpp
void ImPlot::PlotStems<short>(char const*, short const*, int, double, double, double, int, int, int): subq $0x58, %rsp movl %r8d, %eax movl %edx, %r8d btl $0xa, %ecx jb 0xe6227 testl %r8d, %r8d je 0xe623a cltd idivl %r8d leal (%rdx,%r8), %eax cltd idivl %r8d jmp 0xe623c testl %r8d, %r8d je 0xe627e cltd idivl %r8d leal (%rdx,%r8), %eax cltd idivl %r8d jmp 0xe6280 xorl %edx, %edx leaq 0x28(%rsp), %rax movsd %xmm1, (%rax) movsd %xmm2, 0x8(%rax) movq %rsi, 0x10(%rax) movl %r8d, 0x18(%rax) movl %edx, 0x1c(%rax) movl %r9d, 0x20(%rax) movl %r8d, 0x28(%rax) leaq 0x8(%rsp), %rdx movsd %xmm1, (%rdx) movsd %xmm2, 0x8(%rdx) movsd %xmm0, 0x10(%rdx) movl %r8d, 0x18(%rdx) movq %rax, %rsi callq 0xe63d2 jmp 0xe62c0 xorl %edx, %edx leaq 0x28(%rsp), %rax movq %rsi, (%rax) movl %r8d, 0x8(%rax) movl %edx, 0xc(%rax) movl %r9d, 0x10(%rax) movsd %xmm1, 0x18(%rax) movsd %xmm2, 0x20(%rax) movl %r8d, 0x28(%rax) leaq 0x8(%rsp), %rdx movsd %xmm0, (%rdx) movsd %xmm1, 0x8(%rdx) movsd %xmm2, 0x10(%rdx) movl %r8d, 0x18(%rdx) movq %rax, %rsi callq 0xe62c5 addq $0x58, %rsp retq
_ZN6ImPlot9PlotStemsIiEEvPKcPKT_idddiii: sub rsp, 58h mov eax, r8d mov r8d, edx bt ecx, 0Ah jb short loc_E6227 test r8d, r8d jz short loc_E623A cdq idiv r8d lea eax, [rdx+r8] cdq idiv r8d jmp short loc_E623C loc_E6227: test r8d, r8d jz short loc_E627E cdq idiv r8d lea eax, [rdx+r8] cdq idiv r8d jmp short loc_E6280 loc_E623A: xor edx, edx loc_E623C: lea rax, [rsp+58h+var_30] movsd qword ptr [rax], xmm1 movsd qword ptr [rax+8], xmm2 mov [rax+10h], rsi mov [rax+18h], r8d mov [rax+1Ch], edx mov [rax+20h], r9d mov [rax+28h], r8d lea rdx, [rsp+58h+var_50] movsd qword ptr [rdx], xmm1 movsd qword ptr [rdx+8], xmm2 movsd qword ptr [rdx+10h], xmm0 mov [rdx+18h], r8d mov rsi, rax call _ZN6ImPlot11PlotStemsExINS_8GetterXYINS_10IndexerLinENS_10IndexerIdxIiEEEENS1_IS2_NS_12IndexerConstEEEEEvPKcRKT_RKT0_i; ImPlot::PlotStemsEx<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<int>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerConst>>(char const*,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<int>> const&,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerConst> const&,int) jmp short loc_E62C0 loc_E627E: xor edx, edx loc_E6280: lea rax, [rsp+58h+var_30] mov [rax], rsi mov [rax+8], r8d mov [rax+0Ch], edx mov [rax+10h], r9d movsd qword ptr [rax+18h], xmm1 movsd qword ptr [rax+20h], xmm2 mov [rax+28h], r8d lea rdx, [rsp+58h+var_50] movsd qword ptr [rdx], xmm0 movsd qword ptr [rdx+8], xmm1 movsd qword ptr [rdx+10h], xmm2 mov [rdx+18h], r8d mov rsi, rax call _ZN6ImPlot11PlotStemsExINS_8GetterXYINS_10IndexerIdxIiEENS_10IndexerLinEEENS1_INS_12IndexerConstES4_EEEEvPKcRKT_RKT0_i; ImPlot::PlotStemsEx<ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerLin>,ImPlot::GetterXY<ImPlot::IndexerConst,ImPlot::IndexerLin>>(char const*,ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerLin> const&,ImPlot::GetterXY<ImPlot::IndexerConst,ImPlot::IndexerLin> const&,int) loc_E62C0: add rsp, 58h retn
long long ImPlot::PlotStems<int>( long long a1, long long a2, signed int a3, __int16 a4, int a5, int a6, double a7, double a8, double a9) { int v11; // edx int v12; // edx double v14; // [rsp+28h] [rbp-30h] BYREF unsigned long long v15; // [rsp+30h] [rbp-28h] long long v16; // [rsp+38h] [rbp-20h] unsigned long long v17; // [rsp+40h] [rbp-18h] double v18; // [rsp+48h] [rbp-10h] int v19; // [rsp+50h] [rbp-8h] if ( (a4 & 0x400) != 0 ) { if ( a3 ) v12 = (a5 % a3 + a3) % a3; else v12 = 0; v14 = *(double *)&a2; v15 = __PAIR64__(v12, a3); LODWORD(v16) = a6; v17 = *(_QWORD *)&a8; v18 = a9; v19 = a3; return ImPlot::PlotStemsEx<ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerLin>,ImPlot::GetterXY<ImPlot::IndexerConst,ImPlot::IndexerLin>>( a1, &v14); } else { if ( a3 ) v11 = (a5 % a3 + a3) % a3; else v11 = 0; v14 = a8; v15 = *(_QWORD *)&a9; v16 = a2; v17 = __PAIR64__(v11, a3); LODWORD(v18) = a6; v19 = a3; return ImPlot::PlotStemsEx<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<int>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerConst>>( a1, &v14); } }
PlotStems<int>: SUB RSP,0x58 MOV EAX,R8D MOV R8D,EDX BT ECX,0xa JC 0x001e6227 TEST R8D,R8D JZ 0x001e623a CDQ IDIV R8D LEA EAX,[RDX + R8*0x1] CDQ IDIV R8D JMP 0x001e623c LAB_001e6227: TEST R8D,R8D JZ 0x001e627e CDQ IDIV R8D LEA EAX,[RDX + R8*0x1] CDQ IDIV R8D JMP 0x001e6280 LAB_001e623a: XOR EDX,EDX LAB_001e623c: LEA RAX,[RSP + 0x28] MOVSD qword ptr [RAX],XMM1 MOVSD qword ptr [RAX + 0x8],XMM2 MOV qword ptr [RAX + 0x10],RSI MOV dword ptr [RAX + 0x18],R8D MOV dword ptr [RAX + 0x1c],EDX MOV dword ptr [RAX + 0x20],R9D MOV dword ptr [RAX + 0x28],R8D LEA RDX,[RSP + 0x8] MOVSD qword ptr [RDX],XMM1 MOVSD qword ptr [RDX + 0x8],XMM2 MOVSD qword ptr [RDX + 0x10],XMM0 MOV dword ptr [RDX + 0x18],R8D MOV RSI,RAX CALL 0x001e63d2 JMP 0x001e62c0 LAB_001e627e: XOR EDX,EDX LAB_001e6280: LEA RAX,[RSP + 0x28] MOV qword ptr [RAX],RSI MOV dword ptr [RAX + 0x8],R8D MOV dword ptr [RAX + 0xc],EDX MOV dword ptr [RAX + 0x10],R9D MOVSD qword ptr [RAX + 0x18],XMM1 MOVSD qword ptr [RAX + 0x20],XMM2 MOV dword ptr [RAX + 0x28],R8D LEA RDX,[RSP + 0x8] MOVSD qword ptr [RDX],XMM0 MOVSD qword ptr [RDX + 0x8],XMM1 MOVSD qword ptr [RDX + 0x10],XMM2 MOV dword ptr [RDX + 0x18],R8D MOV RSI,RAX CALL 0x001e62c5 LAB_001e62c0: ADD RSP,0x58 RET
/* void ImPlot::PlotStems<int>(char const*, int const*, int, double, double, double, int, int, int) */ void ImPlot::PlotStems<int> (char *param_1,int *param_2,int param_3,double param_4,double param_5,double param_6, int param_7,int param_8,int param_9) { int iVar1; double local_50; double local_48; double local_40; int local_38; int *local_30; int8 local_28; int *local_20; int8 local_18; double local_10; int local_8; local_38 = param_3; local_8 = param_3; if (((uint)param_7 >> 10 & 1) == 0) { if (param_3 == 0) { iVar1 = 0; } else { iVar1 = (param_8 % param_3 + param_3) % param_3; } local_18 = (double)CONCAT44(iVar1,param_3); local_10 = (double)CONCAT44(local_10._4_4_,param_9); local_50 = param_5; local_48 = param_6; local_40 = param_4; local_30 = (int *)param_5; local_28 = param_6; local_20 = param_2; PlotStemsEx<ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerIdx<int>>,ImPlot::GetterXY<ImPlot::IndexerLin,ImPlot::IndexerConst>> (param_1,(GetterXY *)&local_30,(GetterXY *)&local_50,param_7); } else { if (param_3 == 0) { iVar1 = 0; } else { iVar1 = (param_8 % param_3 + param_3) % param_3; } local_28 = (double)CONCAT44(iVar1,param_3); local_20 = (int *)CONCAT44(local_20._4_4_,param_9); local_50 = param_4; local_48 = param_5; local_40 = param_6; local_30 = param_2; local_18 = param_5; local_10 = param_6; PlotStemsEx<ImPlot::GetterXY<ImPlot::IndexerIdx<int>,ImPlot::IndexerLin>,ImPlot::GetterXY<ImPlot::IndexerConst,ImPlot::IndexerLin>> (param_1,(GetterXY *)&local_30,(GetterXY *)&local_50,param_7); } return; }
28,580
js_unary_arith_bigint
bluesky950520[P]quickjs/quickjs.c
static int js_unary_arith_bigint(JSContext *ctx, JSValue *pres, OPCodeEnum op, JSValue op1) { bf_t a_s, *r, *a; int ret, v; JSValue res; if (op == OP_plus) { JS_ThrowTypeError(ctx, "BigInt argument with unary +"); JS_FreeValue(ctx, op1); return -1; } res = JS_NewBigInt(ctx); if (JS_IsException(res)) { JS_FreeValue(ctx, op1); return -1; } r = JS_GetBigInt(res); a = JS_ToBigIntFree(ctx, &a_s, op1); // infallible, always a bigint ret = 0; switch(op) { case OP_inc: case OP_dec: v = 2 * (op - OP_dec) - 1; ret = bf_add_si(r, a, v, BF_PREC_INF, BF_RNDZ); break; case OP_plus: ret = bf_set(r, a); break; case OP_neg: ret = bf_set(r, a); bf_neg(r); break; case OP_not: ret = bf_add_si(r, a, 1, BF_PREC_INF, BF_RNDZ); bf_neg(r); break; default: abort(); } JS_FreeBigInt(ctx, a, &a_s); if (unlikely(ret)) { JS_FreeValue(ctx, res); throw_bf_exception(ctx, ret); return -1; } res = JS_CompactBigInt(ctx, res); *pres = res; return 0; }
O0
c
js_unary_arith_bigint: subq $0xc8, %rsp movq %rcx, 0xb0(%rsp) movq %r8, 0xb8(%rsp) movq %rdi, 0xa8(%rsp) movq %rsi, 0xa0(%rsp) movl %edx, 0x9c(%rsp) cmpl $0x8d, 0x9c(%rsp) jne 0x71878 movq 0xa8(%rsp), %rdi leaq 0x9ce95(%rip), %rsi # 0x10e6cf movb $0x0, %al callq 0x2d300 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0xa8(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x23c90 movl $0xffffffff, 0xc4(%rsp) # imm = 0xFFFFFFFF jmp 0x71aca movq 0xa8(%rsp), %rdi callq 0x39dd0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x718e4 movq 0xa8(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x23c90 movl $0xffffffff, 0xc4(%rsp) # imm = 0xFFFFFFFF jmp 0x71aca movq 0x48(%rsp), %rdi movq 0x50(%rsp), %rsi callq 0x39e50 movq %rax, 0x68(%rsp) movq 0xa8(%rsp), %rdi movq 0xb0(%rsp), %rdx movq 0xb8(%rsp), %rcx leaq 0x70(%rsp), %rsi callq 0x62b40 movq %rax, 0x60(%rsp) movl $0x0, 0x5c(%rsp) movl 0x9c(%rsp), %eax addl $0xffffff74, %eax # imm = 0xFFFFFF74 movl %eax, %ecx movq %rcx, (%rsp) subl $0x9, %eax ja 0x719fd movq (%rsp), %rax leaq 0x9962f(%rip), %rcx # 0x10af7c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x9c(%rsp), %eax subl $0x8e, %eax shll %eax subl $0x1, %eax movl %eax, 0x58(%rsp) movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi movslq 0x58(%rsp), %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r8d callq 0xe9280 movl %eax, 0x5c(%rsp) jmp 0x71a02 movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0xe62c0 movl %eax, 0x5c(%rsp) jmp 0x71a02 movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0xe62c0 movl %eax, 0x5c(%rsp) movq 0x68(%rsp), %rdi callq 0x71ae0 jmp 0x71a02 movq 0x68(%rsp), %rdi movq 0x60(%rsp), %rsi movl $0x1, %edx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r8d callq 0xe9280 movl %eax, 0x5c(%rsp) movq 0x68(%rsp), %rdi callq 0x71ae0 jmp 0x71a02 callq 0xe090 movq 0xa8(%rsp), %rdi movq 0x60(%rsp), %rsi leaq 0x70(%rsp), %rdx callq 0x62aa0 cmpl $0x0, 0x5c(%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x71a71 movq 0xa8(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x23c90 movq 0xa8(%rsp), %rdi movl 0x5c(%rsp), %esi callq 0x713f0 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movl $0xffffffff, 0xc4(%rsp) # imm = 0xFFFFFFFF jmp 0x71aca movq 0xa8(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx callq 0x71490 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x50(%rsp) movq 0xa0(%rsp), %rax movq 0x48(%rsp), %rcx movq %rcx, (%rax) movq 0x50(%rsp), %rcx movq %rcx, 0x8(%rax) movl $0x0, 0xc4(%rsp) movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nopl (%rax)
js_unary_arith_bigint: sub rsp, 0C8h mov [rsp+0C8h+var_18], rcx mov [rsp+0C8h+var_10], r8 mov [rsp+0C8h+var_20], rdi mov [rsp+0C8h+var_28], rsi mov [rsp+0C8h+var_2C], edx cmp [rsp+0C8h+var_2C], 8Dh jnz short loc_71878 mov rdi, [rsp+0C8h+var_20] lea rsi, aBigintArgument; "BigInt argument with unary +" mov al, 0 call JS_ThrowTypeError mov [rsp+0C8h+var_90], rax mov [rsp+0C8h+var_88], rdx mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_18] mov rdx, [rsp+0C8h+var_10] call JS_FreeValue mov [rsp+0C8h+var_4], 0FFFFFFFFh jmp loc_71ACA loc_71878: mov rdi, [rsp+0C8h+var_20] call JS_NewBigInt mov [rsp+0C8h+var_A0], rax mov [rsp+0C8h+var_98], rdx mov rax, [rsp+0C8h+var_A0] mov [rsp+0C8h+var_80], rax mov rax, [rsp+0C8h+var_98] mov [rsp+0C8h+var_78], rax mov rdi, [rsp+0C8h+var_80] mov rsi, [rsp+0C8h+var_78] call JS_IsException_1 cmp eax, 0 jz short loc_718E4 mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_18] mov rdx, [rsp+0C8h+var_10] call JS_FreeValue mov [rsp+0C8h+var_4], 0FFFFFFFFh jmp loc_71ACA loc_718E4: mov rdi, [rsp+0C8h+var_80] mov rsi, [rsp+0C8h+var_78] call JS_GetBigInt mov [rsp+0C8h+var_60], rax mov rdi, [rsp+0C8h+var_20] mov rdx, [rsp+0C8h+var_18] mov rcx, [rsp+0C8h+var_10] lea rsi, [rsp+0C8h+var_58] call JS_ToBigIntFree mov [rsp+0C8h+var_68], rax mov [rsp+0C8h+var_6C], 0 mov eax, [rsp+0C8h+var_2C] add eax, 0FFFFFF74h; switch 10 cases mov ecx, eax mov [rsp+0C8h+var_C8], rcx sub eax, 9 ja def_71954; jumptable 0000000000071954 default case, cases 144-148 mov rax, [rsp+0C8h+var_C8] lea rcx, jpt_71954 movsxd rax, ds:(jpt_71954 - 10AF7Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_71956: mov eax, [rsp+0C8h+var_2C]; jumptable 0000000000071954 cases 142,143 sub eax, 8Eh shl eax, 1 sub eax, 1 mov [rsp+0C8h+var_70], eax mov rdi, [rsp+0C8h+var_60] mov rsi, [rsp+0C8h+var_68] movsxd rdx, [rsp+0C8h+var_70] mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 1 call bf_add_si mov [rsp+0C8h+var_6C], eax jmp short loc_71A02 loc_71995: mov rdi, [rsp+0C8h+var_60]; jumptable 0000000000071954 case 141 mov rsi, [rsp+0C8h+var_68] call bf_set mov [rsp+0C8h+var_6C], eax jmp short loc_71A02 loc_719AA: mov rdi, [rsp+0C8h+var_60]; jumptable 0000000000071954 case 140 mov rsi, [rsp+0C8h+var_68] call bf_set mov [rsp+0C8h+var_6C], eax mov rdi, [rsp+0C8h+var_60] call bf_neg jmp short loc_71A02 loc_719C9: mov rdi, [rsp+0C8h+var_60]; jumptable 0000000000071954 case 149 mov rsi, [rsp+0C8h+var_68] mov edx, 1 mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 1 call bf_add_si mov [rsp+0C8h+var_6C], eax mov rdi, [rsp+0C8h+var_60] call bf_neg jmp short loc_71A02 def_71954: call _abort; jumptable 0000000000071954 default case, cases 144-148 loc_71A02: mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_68] lea rdx, [rsp+0C8h+var_58] call JS_FreeBigInt cmp [rsp+0C8h+var_6C], 0 setnz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_71A71 mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] call JS_FreeValue mov rdi, [rsp+0C8h+var_20] mov esi, [rsp+0C8h+var_6C] call throw_bf_exception mov [rsp+0C8h+var_B0], rax mov [rsp+0C8h+var_A8], rdx mov [rsp+0C8h+var_4], 0FFFFFFFFh jmp short loc_71ACA loc_71A71: mov rdi, [rsp+0C8h+var_20] mov rsi, [rsp+0C8h+var_80] mov rdx, [rsp+0C8h+var_78] call JS_CompactBigInt mov [rsp+0C8h+var_C0], rax mov [rsp+0C8h+var_B8], rdx mov rax, [rsp+0C8h+var_C0] mov [rsp+0C8h+var_80], rax mov rax, [rsp+0C8h+var_B8] mov [rsp+0C8h+var_78], rax mov rax, [rsp+0C8h+var_28] mov rcx, [rsp+0C8h+var_80] mov [rax], rcx mov rcx, [rsp+0C8h+var_78] mov [rax+8], rcx mov [rsp+0C8h+var_4], 0 loc_71ACA: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
long long js_unary_arith_bigint( long long a1, long long *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rdx const char *v15; // rdi long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 int v20; // edx long long v21; // rcx long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 long long *v26; // rax long long v27; // rdx char v29; // [rsp+0h] [rbp-C8h] long long v30; // [rsp+8h] [rbp-C0h] _DWORD *v31; // [rsp+28h] [rbp-A0h] long long v32; // [rsp+50h] [rbp-78h] unsigned int v33; // [rsp+5Ch] [rbp-6Ch] long long *v34; // [rsp+60h] [rbp-68h] long long BigInt; // [rsp+68h] [rbp-60h] long long v36[5]; // [rsp+70h] [rbp-58h] BYREF int v37; // [rsp+9Ch] [rbp-2Ch] long long *v38; // [rsp+A0h] [rbp-28h] const char *v39; // [rsp+A8h] [rbp-20h] long long v40; // [rsp+B0h] [rbp-18h] long long v41; // [rsp+B8h] [rbp-10h] v40 = a4; v41 = a5; v39 = (const char *)a1; v38 = a2; v37 = a3; if ( (_DWORD)a3 == 141 ) { JS_ThrowTypeError( (long long)v39, (long long)"BigInt argument with unary +", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v29); JS_FreeValue((long long)v39, v40, v41); return (unsigned int)-1; } else { v31 = JS_NewBigInt((long long)v39); v32 = v14; if ( JS_IsException_1((long long)v31, v14) ) { JS_FreeValue((long long)v39, v40, v41); return (unsigned int)-1; } else { BigInt = JS_GetBigInt((long long)v31); v15 = v39; v34 = (long long *)JS_ToBigIntFree( (long long)v39, (long long)v36, v40, v41, v16, v17, a7, a8, a9, a10, v18, v19, a13, a14); switch ( v37 ) { case 140: v33 = bf_set(BigInt, v34); bf_neg(BigInt); break; case 141: v33 = bf_set(BigInt, v34); break; case 142: case 143: v33 = bf_add_si(BigInt, v34, 2 * (v37 - 142) - 1, 0x3FFFFFFFFFFFFFFFLL, 1LL); break; case 149: v33 = bf_add_si(BigInt, v34, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL); bf_neg(BigInt); break; default: abort(v15); } JS_FreeBigInt((long long)v39, v34, v36); if ( v33 ) { JS_FreeValue((long long)v39, (long long)v31, v32); throw_bf_exception((long long)v39, v33, v20, v21, v22, v23, a7, a8, a9, a10, v24, v25, a13, a14); return (unsigned int)-1; } else { v30 = JS_CompactBigInt((long long)v39, (long long)v31, v32); v26 = v38; *v38 = v30; v26[1] = v27; return 0; } } } }
js_closure2: SUB RSP,0x68 MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x30],R8 MOV qword ptr [RSP + 0x28],R9 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x20],RAX MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RSP + 0x38] CMP dword ptr [RAX + 0x5c],0x0 JZ 0x00171945 MOV RDI,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x38] MOVSXD RSI,dword ptr [RAX + 0x5c] SHL RSI,0x3 CALL 0x00125eb0 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x0017187c JMP 0x0017195b LAB_0017187c: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x38],RCX MOV dword ptr [RSP + 0x14],0x0 LAB_00171892: MOV EAX,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RSP + 0x38] CMP EAX,dword ptr [RCX + 0x5c] JGE 0x00171943 MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x38] MOVSXD RCX,dword ptr [RSP + 0x14] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV AL,byte ptr [RAX] AND AL,0x1 CMP AL,0x0 JZ 0x00171900 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x8] MOVZX EDX,word ptr [RAX + 0x2] MOV RAX,qword ptr [RSP + 0x8] MOV AL,byte ptr [RAX] SHR AL,0x1 AND AL,0x1 MOVZX ECX,AL CALL 0x0016b3f0 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JNZ 0x001718fe JMP 0x0017195b LAB_001718fe: JMP 0x00171921 LAB_00171900: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x8] MOVZX ECX,word ptr [RCX + 0x2] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_00171921: MOV RDX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x14] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RSP + 0x14] ADD EAX,0x1 MOV dword ptr [RSP + 0x14],EAX JMP 0x00171892 LAB_00171943: JMP 0x00171945 LAB_00171945: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x60],RAX JMP 0x00171980 LAB_0017195b: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] CALL 0x00127e10 MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x6 LAB_00171980: MOV RAX,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] ADD RSP,0x68 RET
int1 [16] js_closure2(int8 param_1,long param_2,int8 param_3,long param_4,long param_5, int8 param_6) { int1 auVar1 [16]; long lVar2; byte *pbVar3; int *local_68; int local_54; int4 local_10; int4 uStack_c; int8 local_8; *(long *)(param_2 + 0x30) = param_4; *(int8 *)(param_2 + 0x40) = 0; *(int8 *)(param_2 + 0x38) = 0; if (*(int *)(param_4 + 0x5c) != 0) { lVar2 = js_mallocz(param_1,(long)*(int *)(param_4 + 0x5c) << 3); if (lVar2 == 0) { LAB_0017195b: JS_FreeValue(param_1,param_2,param_3); local_10 = 0; local_8 = 6; goto LAB_00171980; } *(long *)(param_2 + 0x38) = lVar2; for (local_54 = 0; local_54 < *(int *)(param_4 + 0x5c); local_54 = local_54 + 1) { pbVar3 = (byte *)(*(long *)(param_4 + 0x38) + (long)local_54 * 8); if ((*pbVar3 & 1) == 0) { local_68 = *(int **)(param_5 + (ulong)*(ushort *)(pbVar3 + 2) * 8); *local_68 = *local_68 + 1; } else { local_68 = (int *)get_var_ref(param_1,param_6,*(int2 *)(pbVar3 + 2),*pbVar3 >> 1 & 1); if (local_68 == (int *)0x0) goto LAB_0017195b; } *(int **)(lVar2 + (long)local_54 * 8) = local_68; } } local_10 = (int4)param_2; uStack_c = (int4)((ulong)param_2 >> 0x20); local_8 = param_3; LAB_00171980: auVar1._4_4_ = uStack_c; auVar1._0_4_ = local_10; auVar1._8_8_ = local_8; return auVar1; }
28,581
js_unary_arith_bigint
bluesky950520[P]quickjs/quickjs.c
static int js_unary_arith_bigint(JSContext *ctx, JSValue *pres, OPCodeEnum op, JSValue op1) { bf_t a_s, *r, *a; int ret, v; JSValue res; if (op == OP_plus) { JS_ThrowTypeError(ctx, "BigInt argument with unary +"); JS_FreeValue(ctx, op1); return -1; } res = JS_NewBigInt(ctx); if (JS_IsException(res)) { JS_FreeValue(ctx, op1); return -1; } r = JS_GetBigInt(res); a = JS_ToBigIntFree(ctx, &a_s, op1); // infallible, always a bigint ret = 0; switch(op) { case OP_inc: case OP_dec: v = 2 * (op - OP_dec) - 1; ret = bf_add_si(r, a, v, BF_PREC_INF, BF_RNDZ); break; case OP_plus: ret = bf_set(r, a); break; case OP_neg: ret = bf_set(r, a); bf_neg(r); break; case OP_not: ret = bf_add_si(r, a, 1, BF_PREC_INF, BF_RNDZ); bf_neg(r); break; default: abort(); } JS_FreeBigInt(ctx, a, &a_s); if (unlikely(ret)) { JS_FreeValue(ctx, res); throw_bf_exception(ctx, ret); return -1; } res = JS_CompactBigInt(ctx, res); *pres = res; return 0; }
O3
c
js_unary_arith_bigint: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r13 movq %rcx, %rbp movq %rdi, %rbx cmpl $0x8d, %edx jne 0x44952 leaq 0x5dd1e(%rip), %rsi # 0xa262b movq %rbx, %rdi xorl %eax, %eax callq 0x22d8b movl $0xffffffff, %r14d # imm = 0xFFFFFFFF cmpl $-0x9, %r13d jb 0x44940 movq 0x18(%rbx), %rdi movl (%rbp), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbp) cmpl $0x1, %eax jg 0x44940 movq %rbp, %rsi movq %r13, %rdx callq 0x219cc movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %edx, %r15d movq %rsi, %r12 movq %rbx, %rdi callq 0x10031 cmpl $0x6, %edx je 0x44917 movq %rdx, 0x8(%rsp) movq %rax, (%rsp) movq %rax, %r14 addq $0x8, %r14 leaq 0x10(%rsp), %rsi movq %rbx, %rdi movq %rbp, %rdx movq %r13, %rcx callq 0x3fbe4 movq %rax, %r13 leal -0x8e(%r15), %eax cmpl $0x2, %eax jb 0x449cf cmpl $0x8c, %r15d je 0x449fd cmpl $0x95, %r15d jne 0x44ad5 movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %edx movq %r14, %rdi movq %r13, %rsi movl $0x1, %r8d callq 0x899d7 jmp 0x44a08 leal -0x11d(,%r15,2), %eax movslq %eax, %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movq %r14, %rdi movq %r13, %rsi movl $0x1, %r8d callq 0x899d7 movl %eax, %ebp movq (%rsp), %r14 jmp 0x44a13 movq %r14, %rdi movq %r13, %rsi callq 0x876d6 movl %eax, %ebp movq (%rsp), %r14 xorb $0x1, 0x10(%r14) leaq 0x10(%rsp), %rax cmpq %rax, %r13 je 0x44a46 movq 0x18(%rbx), %rdi movl -0x8(%r13), %eax leal -0x1(%rax), %ecx movl %ecx, -0x8(%r13) cmpl $0x1, %eax jg 0x44a60 addq $-0x8, %r13 movq %r13, %rsi movq $-0x9, %rdx callq 0x219cc jmp 0x44a60 movq (%r13), %rax testq %rax, %rax je 0x44a60 movq 0x20(%r13), %rsi testq %rsi, %rsi je 0x44a60 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) testl %ebp, %ebp jne 0x44a97 movq 0x8(%rsp), %rcx cmpq $-0x9, %rcx jne 0x44a86 xorl %eax, %eax cmpq 0x18(%r14), %rax jno 0x44a86 cmpl $0x0, 0x10(%r14) je 0x44a86 movl $0x0, 0x10(%r14) movq %r14, (%r12) movq %rcx, 0x8(%r12) xorl %r14d, %r14d jmp 0x44940 cmpl $-0x9, 0x8(%rsp) jb 0x44ac0 movq 0x18(%rbx), %rdi movq (%rsp), %rdx movl (%rdx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rdx) cmpl $0x1, %eax jg 0x44ac0 movq (%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x219cc movq %rbx, %rdi movl %ebp, %esi callq 0x44866 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF jmp 0x44940 callq 0xe090
js_unary_arith_bigint: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r13, r8 mov rbp, rcx mov rbx, rdi cmp edx, 8Dh jnz short loc_44952 lea rsi, aBigintArgument; "BigInt argument with unary +" mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_44917: mov r14d, 0FFFFFFFFh cmp r13d, 0FFFFFFF7h jb short loc_44940 mov rdi, [rbx+18h] mov eax, [rbp+0] lea ecx, [rax-1] mov [rbp+0], ecx cmp eax, 1 jg short loc_44940 mov rsi, rbp mov rdx, r13 call js_free_value_rt loc_44940: mov eax, r14d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_44952: mov r15d, edx mov r12, rsi mov rdi, rbx call JS_NewBigInt cmp edx, 6 jz short loc_44917 mov [rsp+68h+var_60], rdx mov [rsp+68h+var_68], rax mov r14, rax add r14, 8 lea rsi, [rsp+68h+var_58] mov rdi, rbx mov rdx, rbp mov rcx, r13 call JS_ToBigIntFree mov r13, rax lea eax, [r15-8Eh] cmp eax, 2 jb short loc_449CF cmp r15d, 8Ch jz short loc_449FD cmp r15d, 95h jnz loc_44AD5 mov rcx, 3FFFFFFFFFFFFFFFh mov edx, 1 mov rdi, r14 mov rsi, r13 mov r8d, 1 call bf_add_si jmp short loc_44A08 loc_449CF: lea eax, ds:0FFFFFFFFFFFFFEE3h[r15*2] movsxd rdx, eax mov rcx, 3FFFFFFFFFFFFFFFh mov rdi, r14 mov rsi, r13 mov r8d, 1 call bf_add_si mov ebp, eax mov r14, [rsp+68h+var_68] jmp short loc_44A13 loc_449FD: mov rdi, r14 mov rsi, r13 call bf_set loc_44A08: mov ebp, eax mov r14, [rsp+68h+var_68] xor byte ptr [r14+10h], 1 loc_44A13: lea rax, [rsp+68h+var_58] cmp r13, rax jz short loc_44A46 mov rdi, [rbx+18h] mov eax, [r13-8] lea ecx, [rax-1] mov [r13-8], ecx cmp eax, 1 jg short loc_44A60 add r13, 0FFFFFFFFFFFFFFF8h mov rsi, r13 mov rdx, 0FFFFFFFFFFFFFFF7h call js_free_value_rt jmp short loc_44A60 loc_44A46: mov rax, [r13+0] test rax, rax jz short loc_44A60 mov rsi, [r13+20h] test rsi, rsi jz short loc_44A60 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_44A60: test ebp, ebp jnz short loc_44A97 mov rcx, [rsp+68h+var_60] cmp rcx, 0FFFFFFFFFFFFFFF7h jnz short loc_44A86 xor eax, eax cmp rax, [r14+18h] jno short loc_44A86 cmp dword ptr [r14+10h], 0 jz short loc_44A86 mov dword ptr [r14+10h], 0 loc_44A86: mov [r12], r14 mov [r12+8], rcx xor r14d, r14d jmp loc_44940 loc_44A97: cmp dword ptr [rsp+68h+var_60], 0FFFFFFF7h jb short loc_44AC0 mov rdi, [rbx+18h] mov rdx, [rsp+68h+var_68] mov eax, [rdx] lea ecx, [rax-1] mov [rdx], ecx cmp eax, 1 jg short loc_44AC0 mov rsi, [rsp+68h+var_68] mov rdx, [rsp+68h+var_60] call js_free_value_rt loc_44AC0: mov rdi, rbx mov esi, ebp call throw_bf_exception mov r14d, 0FFFFFFFFh jmp loc_44940 loc_44AD5: call _abort
long long js_unary_arith_bigint( long long a1, int **a2, long long a3, _QWORD *a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned int v17; // r14d long long v18; // rdi int v19; // eax int v21; // r15d int *v23; // rax int *v24; // rdx long long v25; // r8 long long v26; // r9 __m128 v27; // xmm4 __m128 v28; // xmm5 _DWORD *v29; // r14 _QWORD *v30; // r13 unsigned int v31; // eax int v32; // edx int v33; // ecx long long v34; // r8 long long v35; // r9 __m128 v36; // xmm4 __m128 v37; // xmm5 unsigned int v38; // ebp int *v39; // r14 long long v40; // rdi int v41; // eax long long v42; // rsi long long v43; // rdi int v44; // eax char v45; // [rsp+0h] [rbp-68h] int *v46; // [rsp+0h] [rbp-68h] int *v47; // [rsp+8h] [rbp-60h] _BYTE v48[88]; // [rsp+10h] [rbp-58h] BYREF if ( (_DWORD)a3 == 141 ) { JS_ThrowTypeError( a1, (long long)"BigInt argument with unary +", a3, (long long)a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v45); LABEL_3: v17 = -1; if ( (unsigned int)a5 >= 0xFFFFFFF7 ) { v18 = *(_QWORD *)(a1 + 24); v19 = (*(_DWORD *)a4)--; if ( v19 <= 1 ) js_free_value_rt(v18, a4, a5); } return v17; } v21 = a3; v23 = JS_NewBigInt(a1); if ( (_DWORD)v24 == 6 ) goto LABEL_3; v47 = v24; v46 = v23; v29 = v23 + 2; v30 = JS_ToBigIntFree(a1, (long long)v48, (long long)a4, a5, v25, v26, a7, a8, a9, a10, v27, v28, a13, a14); if ( (unsigned int)(v21 - 142) < 2 ) { v38 = bf_add_si(v29, v30, 2 * v21 - 285, 0x3FFFFFFFFFFFFFFFLL, 1LL); v39 = v46; } else { if ( v21 == 140 ) { v31 = bf_set(v29, v30); } else { if ( v21 != 149 ) abort((const char *)a1); v31 = bf_add_si(v29, v30, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1LL); } v38 = v31; v39 = v46; *((_BYTE *)v46 + 16) ^= 1u; } if ( v30 == (_QWORD *)v48 ) { if ( *v30 ) { v42 = v30[4]; if ( v42 ) (*(void ( **)(_QWORD, long long, _QWORD))(*v30 + 8LL))(*(_QWORD *)*v30, v42, 0LL); } } else { v40 = *(_QWORD *)(a1 + 24); v41 = *((_DWORD *)v30 - 2); v33 = v41 - 1; *((_DWORD *)v30 - 2) = v41 - 1; if ( v41 <= 1 ) js_free_value_rt(v40, v30 - 1, -9); } if ( v38 ) { if ( (unsigned int)v47 >= 0xFFFFFFF7 ) { v43 = *(_QWORD *)(a1 + 24); v32 = (int)v46; v44 = *v46; v33 = *v46 - 1; *v46 = v33; if ( v44 <= 1 ) js_free_value_rt(v43, v46, (int)v47); } throw_bf_exception(a1, v38, v32, v33, v34, v35, a7, a8, a9, a10, v36, v37, a13, a14, (char)v46); return (unsigned int)-1; } else { if ( v47 == (int *)-9LL && __OFSUB__(0LL, *((_QWORD *)v39 + 3)) && v39[4] ) v39[4] = 0; *a2 = v39; a2[1] = v47; return 0; } }
js_unary_arith_bigint: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R13,R8 MOV RBP,RCX MOV RBX,RDI CMP EDX,0x8d JNZ 0x00144952 LEA RSI,[0x1a262b] MOV RDI,RBX XOR EAX,EAX CALL 0x00122d8b LAB_00144917: MOV R14D,0xffffffff CMP R13D,-0x9 JC 0x00144940 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [RBP] LEA ECX,[RAX + -0x1] MOV dword ptr [RBP],ECX CMP EAX,0x1 JG 0x00144940 MOV RSI,RBP MOV RDX,R13 CALL 0x001219cc LAB_00144940: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00144952: MOV R15D,EDX MOV R12,RSI MOV RDI,RBX CALL 0x00110031 CMP EDX,0x6 JZ 0x00144917 MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP],RAX MOV R14,RAX ADD R14,0x8 LEA RSI,[RSP + 0x10] MOV RDI,RBX MOV RDX,RBP MOV RCX,R13 CALL 0x0013fbe4 MOV R13,RAX LEA EAX,[R15 + -0x8e] CMP EAX,0x2 JC 0x001449cf CMP R15D,0x8c JZ 0x001449fd CMP R15D,0x95 JNZ 0x00144ad5 MOV RCX,0x3fffffffffffffff MOV EDX,0x1 MOV RDI,R14 MOV RSI,R13 MOV R8D,0x1 CALL 0x001899d7 JMP 0x00144a08 LAB_001449cf: LEA EAX,[-0x11d + R15*0x2] MOVSXD RDX,EAX MOV RCX,0x3fffffffffffffff MOV RDI,R14 MOV RSI,R13 MOV R8D,0x1 CALL 0x001899d7 MOV EBP,EAX MOV R14,qword ptr [RSP] JMP 0x00144a13 LAB_001449fd: MOV RDI,R14 MOV RSI,R13 CALL 0x001876d6 LAB_00144a08: MOV EBP,EAX MOV R14,qword ptr [RSP] XOR byte ptr [R14 + 0x10],0x1 LAB_00144a13: LEA RAX,[RSP + 0x10] CMP R13,RAX JZ 0x00144a46 MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [R13 + -0x8] LEA ECX,[RAX + -0x1] MOV dword ptr [R13 + -0x8],ECX CMP EAX,0x1 JG 0x00144a60 ADD R13,-0x8 MOV RSI,R13 MOV RDX,-0x9 CALL 0x001219cc JMP 0x00144a60 LAB_00144a46: MOV RAX,qword ptr [R13] TEST RAX,RAX JZ 0x00144a60 MOV RSI,qword ptr [R13 + 0x20] TEST RSI,RSI JZ 0x00144a60 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00144a60: TEST EBP,EBP JNZ 0x00144a97 MOV RCX,qword ptr [RSP + 0x8] CMP RCX,-0x9 JNZ 0x00144a86 XOR EAX,EAX CMP RAX,qword ptr [R14 + 0x18] JNO 0x00144a86 CMP dword ptr [R14 + 0x10],0x0 JZ 0x00144a86 MOV dword ptr [R14 + 0x10],0x0 LAB_00144a86: MOV qword ptr [R12],R14 MOV qword ptr [R12 + 0x8],RCX XOR R14D,R14D JMP 0x00144940 LAB_00144a97: CMP dword ptr [RSP + 0x8],-0x9 JC 0x00144ac0 MOV RDI,qword ptr [RBX + 0x18] MOV RDX,qword ptr [RSP] MOV EAX,dword ptr [RDX] LEA ECX,[RAX + -0x1] MOV dword ptr [RDX],ECX CMP EAX,0x1 JG 0x00144ac0 MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] CALL 0x001219cc LAB_00144ac0: MOV RDI,RBX MOV ESI,EBP CALL 0x00144866 MOV R14D,0xffffffff JMP 0x00144940 LAB_00144ad5: CALL 0x0010e090
/* WARNING: Removing unreachable block (ram,0x00144a77) */ /* WARNING: Removing unreachable block (ram,0x00144a7e) */ int8 js_unary_arith_bigint (long param_1,int1 (*param_2) [16],int param_3,int *param_4,int8 param_5) { int iVar1; int8 uVar2; int8 *puVar3; long lVar4; int iVar5; int *piVar6; long *plVar7; int *piVar8; int1 auVar9 [16]; long local_58 [5]; if (param_3 == 0x8d) { JS_ThrowTypeError(param_1,"BigInt argument with unary +"); } else { auVar9 = JS_NewBigInt(param_1); piVar6 = auVar9._0_8_; if (auVar9._8_4_ != 6) { piVar8 = piVar6 + 2; plVar7 = (long *)JS_ToBigIntFree(param_1,local_58,param_4,param_5); if (param_3 - 0x8eU < 2) { iVar5 = bf_add_si(piVar8,plVar7,(long)(param_3 * 2 + -0x11d),0x3fffffffffffffff,1); } else { if (param_3 == 0x8c) { iVar5 = bf_set(piVar8,plVar7); } else { if (param_3 != 0x95) { /* WARNING: Subroutine does not return */ abort(); } iVar5 = bf_add_si(piVar8,plVar7,1,0x3fffffffffffffff,1); } *(byte *)(piVar6 + 4) = *(byte *)(piVar6 + 4) ^ 1; } if (plVar7 == local_58) { puVar3 = (int8 *)*plVar7; if ((puVar3 != (int8 *)0x0) && (plVar7[4] != 0)) { (*(code *)puVar3[1])(*puVar3,plVar7[4],0); } } else { uVar2 = *(int8 *)(param_1 + 0x18); lVar4 = plVar7[-1]; *(int *)(plVar7 + -1) = (int)lVar4 + -1; if ((int)lVar4 < 2) { js_free_value_rt(uVar2,plVar7 + -1,0xfffffffffffffff7); } } if (iVar5 == 0) { *param_2 = auVar9; return 0; } if (0xfffffff6 < auVar9._8_4_) { uVar2 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar6; *piVar6 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar2,piVar6,auVar9._8_8_); } } throw_bf_exception(param_1,iVar5); return 0xffffffff; } } if (0xfffffff6 < (uint)param_5) { uVar2 = *(int8 *)(param_1 + 0x18); iVar5 = *param_4; *param_4 = iVar5 + -1; if (iVar5 < 2) { js_free_value_rt(uVar2,param_4,param_5); } } return 0xffffffff; }
28,582
ma_cmp_dynamic_record
eloqsql/storage/maria/ma_dynrec.c
my_bool _ma_cmp_dynamic_record(register MARIA_HA *info, register const uchar *record) { uint flag, reclength, b_type,cmp_length; my_off_t filepos; uchar *buffer; MARIA_BLOCK_INFO block_info; my_bool error= 1, buff_alloced= 0; size_t UNINIT_VAR(buffer_length); DBUG_ENTER("_ma_cmp_dynamic_record"); if (info->opt_flag & WRITE_CACHE_USED) { info->update&= ~(HA_STATE_WRITE_AT_END | HA_STATE_EXTEND_BLOCK); if (flush_io_cache(&info->rec_cache)) DBUG_RETURN(1); } info->rec_cache.seek_not_done=1; /* If nobody have touched the database we don't have to test rec */ buffer=info->rec_buff; if ((info->opt_flag & READ_CHECK_USED)) { /* If check isn't disabled */ if (info->s->base.blobs) { buffer_length= (info->s->base.pack_reclength + _ma_calc_total_blob_length(info,record)); alloc_on_stack(*info->stack_end_ptr, buffer, buff_alloced, buffer_length); if (!buffer) DBUG_RETURN(1); } if (!(reclength= _ma_rec_pack(info,buffer,record))) goto err; record= buffer; filepos= info->cur_row.lastpos; flag=block_info.second_read=0; block_info.next_filepos=filepos; while (reclength > 0) { if ((b_type= _ma_get_block_info(info, &block_info, info->dfile.file, block_info.next_filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR)) { if (b_type & (BLOCK_SYNC_ERROR | BLOCK_DELETED)) my_errno=HA_ERR_RECORD_CHANGED; goto err; } if (flag == 0) /* First block */ { flag=1; if (reclength != block_info.rec_len) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } } else if (reclength < block_info.data_len) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } reclength-= block_info.data_len; cmp_length= block_info.data_len; if (!reclength && info->s->calc_checksum) cmp_length--; /* 'record' may not contain checksum */ if (_ma_cmp_buffer(info->dfile.file, record, block_info.filepos, cmp_length)) { my_errno=HA_ERR_RECORD_CHANGED; goto err; } flag=1; record+=block_info.data_len; } } my_errno=0; error= 0; err: stack_alloc_free(buffer, buff_alloced); DBUG_PRINT("exit", ("result: %d", error)); DBUG_RETURN(error); }
O3
c
ma_cmp_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20d8, %rsp # imm = 0x20D8 movq %rsi, %rbx movq %rdi, %r12 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl 0x61c(%rdi), %eax testb $0x10, %al je 0x3e815 andb $-0xa, 0x625(%r12) leaq 0x4b8(%r12), %rdi movl $0x1, %esi callq 0x9512d movb $0x1, %r15b testl %eax, %eax jne 0x3ec50 movl 0x61c(%r12), %eax movl $0x1, 0x598(%r12) movq 0x3a0(%r12), %r14 testb $0x4, %al jne 0x3e842 xorl %ebx, %ebx callq 0xa16ee movl $0x0, (%rax) xorl %r15d, %r15d jmp 0x3ec44 movq (%r12), %rax cmpl $0x0, 0x3f0(%rax) je 0x3e8a9 movq 0x3a0(%rax), %r14 movq %r12, %rdi movq %rbx, %rsi callq 0x3cb3e addq %r14, %rax leaq -0x2030(%rbp), %rdx movq %rax, (%rdx) movq 0x78(%r12), %rcx movq (%rcx), %rcx subq %rdx, %rcx subq %rax, %rcx jbe 0x3e8b5 cmpq $0x10000, %rcx # imm = 0x10000 ja 0x3e898 cmpq $0x1000, %rax # imm = 0x1000 jb 0x3e8b5 cmpq $0x8001, %rcx # imm = 0x8001 jb 0x3e8b5 movq %rsp, %r14 addq $0xf, %rax andq $-0x10, %rax subq %rax, %r14 movq %r14, %rsp movl $0x0, -0x208c(%rbp) jmp 0x3e8db movl $0x10010, %edx # imm = 0x10010 xorl %edi, %edi movq %rax, %rsi callq 0x9f97d movq %rax, %r14 movb $0x1, %al movl %eax, -0x208c(%rbp) movb $0x1, %r15b testq %r14, %r14 je 0x3ec50 movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x3c1b1 testl %eax, %eax je 0x3ec3b movl %eax, %r15d movq 0x98(%r12), %rax leaq -0x2088(%rbp), %rsi movl $0x0, 0x50(%rsi) movq %rax, 0x40(%rsi) movb $0x1, %bl movq %r14, -0x2098(%rbp) movq %r14, -0x20a0(%rbp) movq %r12, -0x20b0(%rbp) movl 0x480(%r12), %edx movq -0x2048(%rbp), %rcx movq %r12, %rdi callq 0x3d5dc cmpl $0x4, %eax jae 0x3ebfc movl %r15d, %eax testb $0x1, %bl movl %r15d, -0x2090(%rbp) je 0x3e96a cmpq %rax, -0x2070(%rbp) jne 0x3ec30 movq -0x2068(%rbp), %r13 jmp 0x3e97a movq -0x2068(%rbp), %r13 cmpq %rax, %r13 ja 0x3ec21 subl %r13d, -0x2090(%rbp) jne 0x3e993 movq (%r12), %rax cmpq $0x1, 0x6a8(%rax) adcl $-0x1, %r13d movl 0x480(%r12), %r14d movq -0x2050(%rbp), %rbx cmpl $0x2001, %r13d # imm = 0x2001 jb 0x3eaca movl %ebx, %ecx andl $0xfff, %ecx # imm = 0xFFF movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movq -0x2098(%rbp), %r15 movq %r15, -0x20b8(%rbp) movl %eax, %r12d leaq 0x34763a(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x2100(%rbp), %rdi movl %r14d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x3ea58 movl $0x4, %r8d movl %r14d, %edi leaq -0x2030(%rbp), %rsi movq %r12, %rdx movq %rbx, %rcx callq 0xa022c movq %rax, %r15 testq %r15, %r15 movq -0x20b8(%rbp), %r15 jne 0x3ebe5 movq %r15, %rdi leaq -0x2030(%rbp), %rsi movq %r12, %rdx callq 0x29560 testl %eax, %eax jne 0x3ebe5 addq %r12, %rbx addq %r12, %r15 subl %r12d, %r13d movl $0x2000, %eax # imm = 0x2000 cmpl $0x2000, %r13d # imm = 0x2000 ja 0x3e9c5 jmp 0x3ead1 movq %rax, %rcx leaq 0x3475ae(%rip), %rax # 0x386010 movq (%rax), %rax movq %rcx, -0x20a8(%rbp) movq %rcx, %rdi movq %r12, %rsi leaq 0x9a9f4(%rip), %rdx # 0xd946d movl $0x6c1, %ecx # imm = 0x6C1 callq *0x210(%rax) movl $0x4, %r8d movl %r14d, %edi leaq -0x2030(%rbp), %rsi movq %r12, %rdx movq %rbx, %rcx callq 0xa022c movq %rax, %r15 testq %rax, %rax movl $0x0, %esi cmoveq %r12, %rsi leaq 0x34755b(%rip), %rax # 0x386010 movq (%rax), %rax movq -0x20a8(%rbp), %rdi callq *0x218(%rax) jmp 0x3ea11 movq -0x2098(%rbp), %r15 movl %r13d, %r13d leaq 0x347535(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x2100(%rbp), %rdi movl %r14d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x3eb7e movl $0x4, %r8d movl %r14d, %edi leaq -0x2030(%rbp), %rsi movq %r13, %rdx movq %rbx, %rcx callq 0xa022c movq %rax, %rbx testq %rbx, %rbx jne 0x3ebe5 movq %r15, %rdi leaq -0x2030(%rbp), %rsi movq %r13, %rdx callq 0x29560 testl %eax, %eax movq -0x20b0(%rbp), %r12 jne 0x3ebe5 movq -0x2098(%rbp), %rax addq -0x2068(%rbp), %rax movq %rax, -0x2098(%rbp) xorl %ebx, %ebx movl -0x2090(%rbp), %r15d testl %r15d, %r15d movq -0x20a0(%rbp), %r14 leaq -0x2088(%rbp), %rsi jne 0x3e925 jmp 0x3ec16 movq %rax, %r12 leaq 0x347488(%rip), %rax # 0x386010 movq (%rax), %rax movq %r12, %rdi movq %r13, %rsi leaq 0x9a8d5(%rip), %rdx # 0xd946d movl $0x6c9, %ecx # imm = 0x6C9 callq *0x210(%rax) movl $0x4, %r8d movl %r14d, %edi leaq -0x2030(%rbp), %rsi movq %r13, %rdx movq %rbx, %rcx callq 0xa022c movq %rax, %rbx testq %rax, %rax movl $0x0, %esi cmoveq %r13, %rsi leaq 0x34743c(%rip), %rax # 0x386010 movq (%rax), %rax movq %r12, %rdi callq *0x218(%rax) jmp 0x3eb1a callq 0xa16ee movl $0x7b, (%rax) movb $0x1, %r15b movq -0x20a0(%rbp), %r14 jmp 0x3ec3e movb $0x1, %r15b testb $0x14, %al movl -0x208c(%rbp), %ebx je 0x3ec44 callq 0xa16ee movl $0x7b, (%rax) jmp 0x3ec44 movl -0x208c(%rbp), %ebx jmp 0x3e82f movq %r12, %rdi movl $0x7f, %esi callq 0x36618 jmp 0x3ec3b callq 0xa16ee movl $0x7b, (%rax) movb $0x1, %r15b movl -0x208c(%rbp), %ebx testb %bl, %bl je 0x3ec50 movq %r14, %rdi callq 0x9fbaa movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x3ec71 movl %r15d, %eax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x29270
_ma_cmp_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 20D8h mov rbx, rsi mov r12, rdi mov rax, fs:28h mov [rbp+var_30], rax mov eax, [rdi+61Ch] test al, 10h jz short loc_3E815 and byte ptr [r12+625h], 0F6h lea rdi, [r12+4B8h] mov esi, 1 call my_b_flush_io_cache mov r15b, 1 test eax, eax jnz loc_3EC50 mov eax, [r12+61Ch] loc_3E815: mov dword ptr [r12+598h], 1 mov r14, [r12+3A0h] test al, 4 jnz short loc_3E842 xor ebx, ebx loc_3E82F: call _my_thread_var mov dword ptr [rax], 0 xor r15d, r15d jmp loc_3EC44 loc_3E842: mov rax, [r12] cmp dword ptr [rax+3F0h], 0 jz short loc_3E8A9 mov r14, [rax+3A0h] mov rdi, r12 mov rsi, rbx call _ma_calc_total_blob_length add rax, r14 lea rdx, [rbp+var_2030] mov [rdx], rax mov rcx, [r12+78h] mov rcx, [rcx] sub rcx, rdx sub rcx, rax jbe short loc_3E8B5 cmp rcx, offset stru_10000 ja short loc_3E898 cmp rax, 1000h jb short loc_3E8B5 cmp rcx, 8001h jb short loc_3E8B5 loc_3E898: mov r14, rsp add rax, 0Fh and rax, 0FFFFFFFFFFFFFFF0h sub r14, rax mov rsp, r14 loc_3E8A9: mov [rbp+var_208C], 0 jmp short loc_3E8DB loc_3E8B5: mov edx, 10010h xor edi, edi mov rsi, rax call my_malloc mov r14, rax mov al, 1 mov [rbp+var_208C], eax mov r15b, 1 test r14, r14 jz loc_3EC50 loc_3E8DB: mov rdi, r12 mov rsi, r14 mov rdx, rbx call _ma_rec_pack test eax, eax jz loc_3EC3B mov r15d, eax mov rax, [r12+98h] lea rsi, [rbp+var_2088] mov dword ptr [rsi+50h], 0 mov [rsi+40h], rax mov bl, 1 mov [rbp+var_2098], r14 mov [rbp+var_20A0], r14 mov [rbp+var_20B0], r12 loc_3E925: mov edx, [r12+480h] mov rcx, [rbp+var_2048] mov rdi, r12 call _ma_get_block_info cmp eax, 4 jnb loc_3EBFC mov eax, r15d test bl, 1 mov [rbp+var_2090], r15d jz short loc_3E96A cmp [rbp+var_2070], rax jnz loc_3EC30 mov r13, [rbp+var_2068] jmp short loc_3E97A loc_3E96A: mov r13, [rbp+var_2068] cmp r13, rax ja loc_3EC21 loc_3E97A: sub [rbp+var_2090], r13d jnz short loc_3E993 mov rax, [r12] cmp qword ptr [rax+6A8h], 1 adc r13d, 0FFFFFFFFh loc_3E993: mov r14d, [r12+480h] mov rbx, [rbp+var_2050] cmp r13d, 2001h jb loc_3EACA mov ecx, ebx and ecx, 0FFFh mov eax, 2000h sub eax, ecx mov r15, [rbp+var_2098] loc_3E9C5: mov [rbp+var_20B8], r15 mov r12d, eax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_2100] mov esi, r14d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz short loc_3EA58 mov r8d, 4 mov edi, r14d lea rsi, [rbp+var_2030] mov rdx, r12 mov rcx, rbx call my_pread mov r15, rax loc_3EA11: test r15, r15 mov r15, [rbp+var_20B8] jnz loc_3EBE5 mov rdi, r15 lea rsi, [rbp+var_2030] mov rdx, r12 call _bcmp test eax, eax jnz loc_3EBE5 add rbx, r12 add r15, r12 sub r13d, r12d mov eax, 2000h cmp r13d, 2000h ja loc_3E9C5 jmp short loc_3EAD1 loc_3EA58: mov rcx, rax lea rax, PSI_server mov rax, [rax] mov [rbp+var_20A8], rcx mov rdi, rcx mov rsi, r12 lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 6C1h call qword ptr [rax+210h] mov r8d, 4 mov edi, r14d lea rsi, [rbp+var_2030] mov rdx, r12 mov rcx, rbx call my_pread mov r15, rax test rax, rax mov esi, 0 cmovz rsi, r12 lea rax, PSI_server mov rax, [rax] mov rdi, [rbp+var_20A8] call qword ptr [rax+218h] jmp loc_3EA11 loc_3EACA: mov r15, [rbp+var_2098] loc_3EAD1: mov r13d, r13d lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_2100] mov esi, r14d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_3EB7E mov r8d, 4 mov edi, r14d lea rsi, [rbp+var_2030] mov rdx, r13 mov rcx, rbx call my_pread mov rbx, rax loc_3EB1A: test rbx, rbx jnz loc_3EBE5 mov rdi, r15 lea rsi, [rbp+var_2030] mov rdx, r13 call _bcmp test eax, eax mov r12, [rbp+var_20B0] jnz loc_3EBE5 mov rax, [rbp+var_2098] add rax, [rbp+var_2068] mov [rbp+var_2098], rax xor ebx, ebx mov r15d, [rbp+var_2090] test r15d, r15d mov r14, [rbp+var_20A0] lea rsi, [rbp+var_2088] jnz loc_3E925 jmp loc_3EC16 loc_3EB7E: mov r12, rax lea rax, PSI_server mov rax, [rax] mov rdi, r12 mov rsi, r13 lea rdx, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 6C9h call qword ptr [rax+210h] mov r8d, 4 mov edi, r14d lea rsi, [rbp+var_2030] mov rdx, r13 mov rcx, rbx call my_pread mov rbx, rax test rax, rax mov esi, 0 cmovz rsi, r13 lea rax, PSI_server mov rax, [rax] mov rdi, r12 call qword ptr [rax+218h] jmp loc_3EB1A loc_3EBE5: call _my_thread_var mov dword ptr [rax], 7Bh ; '{' mov r15b, 1 mov r14, [rbp+var_20A0] jmp short loc_3EC3E loc_3EBFC: mov r15b, 1 test al, 14h mov ebx, [rbp+var_208C] jz short loc_3EC44 call _my_thread_var mov dword ptr [rax], 7Bh ; '{' jmp short loc_3EC44 loc_3EC16: mov ebx, [rbp+var_208C] jmp loc_3E82F loc_3EC21: mov rdi, r12 mov esi, 7Fh call _ma_set_fatal_error jmp short loc_3EC3B loc_3EC30: call _my_thread_var mov dword ptr [rax], 7Bh ; '{' loc_3EC3B: mov r15b, 1 loc_3EC3E: mov ebx, [rbp+var_208C] loc_3EC44: test bl, bl jz short loc_3EC50 mov rdi, r14 call my_free loc_3EC50: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_3EC71 mov eax, r15d lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3EC71: call ___stack_chk_fail
long long ma_cmp_dynamic_record(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5) { unsigned __int8 *v5; // r15 unsigned __int8 *v6; // rbx long long v7; // r12 int v8; // eax unsigned __int8 *v9; // r14 char v10; // bl long long v11; // r14 unsigned long long v12; // rax unsigned long long v13; // rcx bool v14; // cc unsigned long long v15; // rcx long long v16; // rax int v17; // eax int v18; // r9d long long v19; // rax char v20; // bl unsigned int block_info; // eax long long v22; // rdx long long v23; // rcx long long v24; // r8 int v25; // r9d unsigned int v26; // r13d unsigned int v27; // r14d long long v28; // rbx unsigned int v29; // eax unsigned long long v30; // r12 long long v31; // rax _QWORD *v32; // rsi long long v33; // r15 bool v34; // zf long long v35; // rax long long v36; // rbx int v37; // eax long long v38; // r12 _BYTE v40[72]; // [rsp+0h] [rbp-2100h] BYREF long long v41; // [rsp+48h] [rbp-20B8h] long long v42; // [rsp+50h] [rbp-20B0h] long long v43; // [rsp+58h] [rbp-20A8h] unsigned __int8 *v44; // [rsp+60h] [rbp-20A0h] unsigned __int8 *v45; // [rsp+68h] [rbp-2098h] int v46; // [rsp+70h] [rbp-2090h] int v47; // [rsp+74h] [rbp-208Ch] unsigned __int8 v48[24]; // [rsp+78h] [rbp-2088h] BYREF long long v49; // [rsp+90h] [rbp-2070h] unsigned long long v50; // [rsp+98h] [rbp-2068h] long long v51; // [rsp+B0h] [rbp-2050h] long long v52; // [rsp+B8h] [rbp-2048h] int v53; // [rsp+C8h] [rbp-2038h] _QWORD v54[1030]; // [rsp+D0h] [rbp-2030h] BYREF v6 = a2; v7 = a1; v54[1024] = __readfsqword(0x28u); v8 = *(_DWORD *)(a1 + 1564); if ( (v8 & 0x10) != 0 ) { *(_BYTE *)(a1 + 1573) &= 0xF6u; a1 += 1208LL; a2 = (_BYTE *)(&dword_0 + 1); LOBYTE(v5) = 1; if ( (unsigned int)my_b_flush_io_cache(a1, 1LL) ) return (unsigned int)v5; v8 = *(_DWORD *)(v7 + 1564); } *(_DWORD *)(v7 + 1432) = 1; v9 = *(unsigned __int8 **)(v7 + 928); if ( (v8 & 4) != 0 ) { if ( *(_DWORD *)(*(_QWORD *)v7 + 1008LL) ) { v11 = *(_QWORD *)(*(_QWORD *)v7 + 928LL); v12 = v11 + ma_calc_total_blob_length((_QWORD *)v7, (long long)v6); v54[0] = v12; v13 = **(_QWORD **)(v7 + 120) - (_QWORD)v54; v14 = v13 <= v12; v15 = v13 - v12; if ( v14 || v15 <= (unsigned long long)&stru_10000 && (v12 < 0x1000 || v15 < 0x8001) ) { v16 = my_malloc(0LL, v12, 65552LL); v9 = (unsigned __int8 *)v16; LOBYTE(v16) = 1; v47 = v16; LOBYTE(v5) = 1; if ( !v9 ) return (unsigned int)v5; goto LABEL_15; } v9 = &v40[-((v12 + 15) & 0xFFFFFFFFFFFFFFF0LL)]; } v47 = 0; LABEL_15: v17 = ma_rec_pack((unsigned __int8 *)v7, v9, v6); if ( v17 ) { LODWORD(v5) = v17; v19 = *(_QWORD *)(v7 + 152); v53 = 0; v52 = v19; v20 = 1; v45 = v9; v44 = v9; v42 = v7; while ( 1 ) { block_info = ma_get_block_info(v7, v48, *(unsigned int *)(v7 + 1152), v52, a5, v18); if ( block_info >= 4 ) break; v46 = (int)v5; if ( (v20 & 1) != 0 ) { if ( v49 != (unsigned int)v5 ) { *(_DWORD *)my_thread_var(v7, v48, v22, v23, v24) = 123; goto LABEL_50; } v26 = v50; } else { v26 = v50; if ( v50 > (unsigned int)v5 ) { ma_set_fatal_error((_DWORD *)v7, 127LL, v22, v23, v24, v25); goto LABEL_50; } } v46 -= v26; if ( !v46 ) v26 = (*(_QWORD *)(*(_QWORD *)v7 + 1704LL) == 0LL) + v26 - 1; v27 = *(_DWORD *)(v7 + 1152); v28 = v51; if ( v26 >= 0x2001 ) { v29 = 0x2000 - (v51 & 0xFFF); v5 = v45; while ( 1 ) { v41 = (long long)v5; v30 = v29; v31 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v40, v27, 6LL); if ( v31 ) { v43 = v31; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v31, v30, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 1729LL); v33 = my_pread(v27, v54, v30, v28, 4LL); v32 = 0LL; if ( !v33 ) v32 = (_QWORD *)v30; a1 = v43; ((void ( *)(long long, _QWORD *))PSI_server[67])(v43, v32); } else { a1 = v27; v32 = v54; v33 = my_pread(v27, v54, v30, v28, 4LL); } v34 = v33 == 0; v5 = (unsigned __int8 *)v41; if ( !v34 ) break; a1 = v41; v32 = v54; if ( (unsigned int)bcmp(v41, v54, v30) ) break; v28 += v30; v5 += v30; v26 -= v30; v29 = 0x2000; if ( v26 <= 0x2000 ) goto LABEL_36; } LABEL_45: *(_DWORD *)my_thread_var(a1, v32, a3, a4, a5) = 123; LOBYTE(v5) = 1; v9 = v44; goto LABEL_51; } v5 = v45; LABEL_36: v35 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v40, v27, 6LL); if ( v35 ) { v38 = v35; ((void ( *)(long long, _QWORD, const char *, long long))PSI_server[66])( v35, v26, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c", 1737LL); v36 = my_pread(v27, v54, v26, v28, 4LL); v32 = 0LL; if ( !v36 ) v32 = (_QWORD *)v26; a1 = v38; ((void ( *)(long long, _QWORD *))PSI_server[67])(v38, v32); } else { a1 = v27; v32 = v54; v36 = my_pread(v27, v54, v26, v28, 4LL); } if ( v36 ) goto LABEL_45; a1 = (long long)v5; v32 = v54; v37 = bcmp(v5, v54, v26); v7 = v42; if ( v37 ) goto LABEL_45; v45 += v50; v20 = 0; LODWORD(v5) = v46; v9 = v44; a2 = v48; if ( !v46 ) { v10 = v47; goto LABEL_6; } } LOBYTE(v5) = 1; v10 = v47; if ( (block_info & 0x14) != 0 ) *(_DWORD *)my_thread_var(v7, v48, v22, v23, v24) = 123; } else { LABEL_50: LOBYTE(v5) = 1; LABEL_51: v10 = v47; } goto LABEL_52; } v10 = 0; LABEL_6: *(_DWORD *)my_thread_var(a1, a2, a3, a4, a5) = 0; LODWORD(v5) = 0; LABEL_52: if ( v10 ) my_free(v9); return (unsigned int)v5; }
_ma_cmp_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20d8 MOV RBX,RSI MOV R12,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RDI + 0x61c] TEST AL,0x10 JZ 0x0013e815 AND byte ptr [R12 + 0x625],0xf6 LEA RDI,[R12 + 0x4b8] MOV ESI,0x1 CALL 0x0019512d MOV R15B,0x1 TEST EAX,EAX JNZ 0x0013ec50 MOV EAX,dword ptr [R12 + 0x61c] LAB_0013e815: MOV dword ptr [R12 + 0x598],0x1 MOV R14,qword ptr [R12 + 0x3a0] TEST AL,0x4 JNZ 0x0013e842 XOR EBX,EBX LAB_0013e82f: CALL 0x001a16ee MOV dword ptr [RAX],0x0 XOR R15D,R15D JMP 0x0013ec44 LAB_0013e842: MOV RAX,qword ptr [R12] CMP dword ptr [RAX + 0x3f0],0x0 JZ 0x0013e8a9 MOV R14,qword ptr [RAX + 0x3a0] MOV RDI,R12 MOV RSI,RBX CALL 0x0013cb3e ADD RAX,R14 LEA RDX,[RBP + -0x2030] MOV qword ptr [RDX],RAX MOV RCX,qword ptr [R12 + 0x78] MOV RCX,qword ptr [RCX] SUB RCX,RDX SUB RCX,RAX JBE 0x0013e8b5 CMP RCX,0x10000 JA 0x0013e898 CMP RAX,0x1000 JC 0x0013e8b5 CMP RCX,0x8001 JC 0x0013e8b5 LAB_0013e898: MOV R14,RSP ADD RAX,0xf AND RAX,-0x10 SUB R14,RAX MOV RSP,R14 LAB_0013e8a9: MOV dword ptr [RBP + -0x208c],0x0 JMP 0x0013e8db LAB_0013e8b5: MOV EDX,0x10010 XOR EDI,EDI MOV RSI,RAX CALL 0x0019f97d MOV R14,RAX MOV AL,0x1 MOV dword ptr [RBP + -0x208c],EAX MOV R15B,0x1 TEST R14,R14 JZ 0x0013ec50 LAB_0013e8db: MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX CALL 0x0013c1b1 TEST EAX,EAX JZ 0x0013ec3b MOV R15D,EAX MOV RAX,qword ptr [R12 + 0x98] LEA RSI,[RBP + -0x2088] MOV dword ptr [RSI + 0x50],0x0 MOV qword ptr [RSI + 0x40],RAX MOV BL,0x1 MOV qword ptr [RBP + -0x2098],R14 MOV qword ptr [RBP + -0x20a0],R14 MOV qword ptr [RBP + -0x20b0],R12 LAB_0013e925: MOV EDX,dword ptr [R12 + 0x480] MOV RCX,qword ptr [RBP + -0x2048] MOV RDI,R12 CALL 0x0013d5dc CMP EAX,0x4 JNC 0x0013ebfc MOV EAX,R15D TEST BL,0x1 MOV dword ptr [RBP + -0x2090],R15D JZ 0x0013e96a CMP qword ptr [RBP + -0x2070],RAX JNZ 0x0013ec30 MOV R13,qword ptr [RBP + -0x2068] JMP 0x0013e97a LAB_0013e96a: MOV R13,qword ptr [RBP + -0x2068] CMP R13,RAX JA 0x0013ec21 LAB_0013e97a: SUB dword ptr [RBP + -0x2090],R13D JNZ 0x0013e993 MOV RAX,qword ptr [R12] CMP qword ptr [RAX + 0x6a8],0x1 ADC R13D,-0x1 LAB_0013e993: MOV R14D,dword ptr [R12 + 0x480] MOV RBX,qword ptr [RBP + -0x2050] CMP R13D,0x2001 JC 0x0013eaca MOV ECX,EBX AND ECX,0xfff MOV EAX,0x2000 SUB EAX,ECX MOV R15,qword ptr [RBP + -0x2098] LAB_0013e9c5: MOV qword ptr [RBP + -0x20b8],R15 MOV R12D,EAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x2100] MOV ESI,R14D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0013ea58 MOV R8D,0x4 MOV EDI,R14D LEA RSI,[RBP + -0x2030] MOV RDX,R12 MOV RCX,RBX CALL 0x001a022c MOV R15,RAX LAB_0013ea11: TEST R15,R15 MOV R15,qword ptr [RBP + -0x20b8] JNZ 0x0013ebe5 MOV RDI,R15 LEA RSI,[RBP + -0x2030] MOV RDX,R12 CALL 0x00129560 TEST EAX,EAX JNZ 0x0013ebe5 ADD RBX,R12 ADD R15,R12 SUB R13D,R12D MOV EAX,0x2000 CMP R13D,0x2000 JA 0x0013e9c5 JMP 0x0013ead1 LAB_0013ea58: MOV RCX,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20a8],RCX MOV RDI,RCX MOV RSI,R12 LEA RDX,[0x1d946d] MOV ECX,0x6c1 CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,R14D LEA RSI,[RBP + -0x2030] MOV RDX,R12 MOV RCX,RBX CALL 0x001a022c MOV R15,RAX TEST RAX,RAX MOV ESI,0x0 CMOVZ RSI,R12 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RBP + -0x20a8] CALL qword ptr [RAX + 0x218] JMP 0x0013ea11 LAB_0013eaca: MOV R15,qword ptr [RBP + -0x2098] LAB_0013ead1: MOV R13D,R13D LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x2100] MOV ESI,R14D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0013eb7e MOV R8D,0x4 MOV EDI,R14D LEA RSI,[RBP + -0x2030] MOV RDX,R13 MOV RCX,RBX CALL 0x001a022c MOV RBX,RAX LAB_0013eb1a: TEST RBX,RBX JNZ 0x0013ebe5 MOV RDI,R15 LEA RSI,[RBP + -0x2030] MOV RDX,R13 CALL 0x00129560 TEST EAX,EAX MOV R12,qword ptr [RBP + -0x20b0] JNZ 0x0013ebe5 MOV RAX,qword ptr [RBP + -0x2098] ADD RAX,qword ptr [RBP + -0x2068] MOV qword ptr [RBP + -0x2098],RAX XOR EBX,EBX MOV R15D,dword ptr [RBP + -0x2090] TEST R15D,R15D MOV R14,qword ptr [RBP + -0x20a0] LEA RSI,[RBP + -0x2088] JNZ 0x0013e925 JMP 0x0013ec16 LAB_0013eb7e: MOV R12,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R12 MOV RSI,R13 LEA RDX,[0x1d946d] MOV ECX,0x6c9 CALL qword ptr [RAX + 0x210] MOV R8D,0x4 MOV EDI,R14D LEA RSI,[RBP + -0x2030] MOV RDX,R13 MOV RCX,RBX CALL 0x001a022c MOV RBX,RAX TEST RAX,RAX MOV ESI,0x0 CMOVZ RSI,R13 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R12 CALL qword ptr [RAX + 0x218] JMP 0x0013eb1a LAB_0013ebe5: CALL 0x001a16ee MOV dword ptr [RAX],0x7b MOV R15B,0x1 MOV R14,qword ptr [RBP + -0x20a0] JMP 0x0013ec3e LAB_0013ebfc: MOV R15B,0x1 TEST AL,0x14 MOV EBX,dword ptr [RBP + -0x208c] JZ 0x0013ec44 CALL 0x001a16ee MOV dword ptr [RAX],0x7b JMP 0x0013ec44 LAB_0013ec16: MOV EBX,dword ptr [RBP + -0x208c] JMP 0x0013e82f LAB_0013ec21: MOV RDI,R12 MOV ESI,0x7f CALL 0x00136618 JMP 0x0013ec3b LAB_0013ec30: CALL 0x001a16ee MOV dword ptr [RAX],0x7b LAB_0013ec3b: MOV R15B,0x1 LAB_0013ec3e: MOV EBX,dword ptr [RBP + -0x208c] LAB_0013ec44: TEST BL,BL JZ 0x0013ec50 MOV RDI,R14 CALL 0x0019fbaa LAB_0013ec50: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0013ec71 MOV EAX,R15D LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013ec71: CALL 0x00129270
ulong _ma_cmp_dynamic_record(long *param_1,int8 param_2) { code *pcVar1; long *plVar2; int iVar3; uint uVar4; uint uVar5; int4 *puVar6; long lVar7; int1 *puVar8; long lVar9; ulong uVar10; char cVar11; bool bVar12; long lVar14; int1 *puVar15; int1 *puVar16; ulong uVar17; ulong uVar18; ulong unaff_R15; int1 *puVar19; int7 uVar20; long in_FS_OFFSET; int1 local_2108 [72]; int1 *local_20c0; long *local_20b8; long local_20b0; int1 *local_20a8; int1 *local_20a0; uint local_2098; int4 local_2094; int1 local_2090 [24]; ulong local_2078; ulong local_2070; long local_2058; long local_2050; int4 local_2040; ulong local_2038 [1024]; long local_38; int4 uVar13; puVar19 = local_2108; puVar15 = local_2108; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = *(uint *)((long)param_1 + 0x61c); if ((uVar4 & 0x10) != 0) { *(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) & 0xf6; iVar3 = my_b_flush_io_cache(param_1 + 0x97,1); unaff_R15 = CONCAT71((int7)(unaff_R15 >> 8),1); puVar16 = local_2108; if (iVar3 != 0) goto LAB_0013ec50; uVar4 = *(uint *)((long)param_1 + 0x61c); } *(int4 *)(param_1 + 0xb3) = 1; puVar8 = (int1 *)param_1[0x74]; if ((uVar4 & 4) == 0) { uVar13 = 0; LAB_0013e82f: cVar11 = (char)uVar13; *(int8 *)(puVar15 + -8) = 0x13e834; puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0; unaff_R15 = 0; } else { if (*(int *)(*param_1 + 0x3f0) == 0) { LAB_0013e8a9: local_2094 = 0; puVar15 = puVar19; } else { lVar14 = *(long *)(*param_1 + 0x3a0); lVar7 = _ma_calc_total_blob_length(param_1,param_2); local_2038[0] = lVar7 + lVar14; uVar10 = (*(long *)param_1[0xf] - (long)local_2038) - local_2038[0]; if ((local_2038[0] < (ulong)(*(long *)param_1[0xf] - (long)local_2038)) && ((0x10000 < uVar10 || ((0xfff < local_2038[0] && (0x8000 < uVar10)))))) { puVar19 = local_2108 + -(local_2038[0] + 0xf & 0xfffffffffffffff0); puVar8 = puVar19; goto LAB_0013e8a9; } puVar8 = (int1 *)my_malloc(0,local_2038[0],0x10010); local_2094 = (int4)CONCAT71((int7)((ulong)puVar8 >> 8),1); unaff_R15 = CONCAT71((int7)(unaff_R15 >> 8),1); puVar16 = local_2108; puVar15 = local_2108; if (puVar8 == (int1 *)0x0) goto LAB_0013ec50; } *(int8 *)(puVar15 + -8) = 0x13e8e9; uVar4 = _ma_rec_pack(param_1,puVar8,param_2); if (uVar4 != 0) { local_2050 = param_1[0x13]; local_2040 = 0; bVar12 = true; local_20b8 = param_1; local_20a8 = puVar8; local_20a0 = puVar8; do { lVar7 = local_2050; puVar8 = local_20a8; plVar2 = local_20b8; unaff_R15 = (ulong)uVar4; lVar14 = local_20b8[0x90]; *(int8 *)(puVar15 + -8) = 0x13e93c; uVar5 = _ma_get_block_info(plVar2,local_2090,(int)lVar14,lVar7); if (3 < uVar5) { unaff_R15 = CONCAT71((uint7)(uint3)(uVar4 >> 8),1); cVar11 = (char)local_2094; if ((uVar5 & 0x14) != 0) { *(int8 *)(puVar15 + -8) = 0x13ec0e; puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7b; } goto LAB_0013ec44; } local_2098 = uVar4; if (bVar12) { if (local_2078 != unaff_R15) { *(int8 *)(puVar15 + -8) = 0x13ec35; puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7b; goto LAB_0013ec3b; } } else if (unaff_R15 < local_2070) { *(int8 *)(puVar15 + -8) = 0x13ec2e; _ma_set_fatal_error(plVar2,0x7f); goto LAB_0013ec3b; } local_2098 = uVar4 - (int)local_2070; uVar10 = local_2070; if (local_2098 == 0) { uVar10 = (ulong)((int)local_2070 + -1 + (uint)(*(long *)(*plVar2 + 0x6a8) == 0)); } uVar13 = (int4)plVar2[0x90]; uVar4 = (uint)uVar10; lVar14 = local_2058; puVar19 = local_20a0; if (0x2000 < uVar4) { uVar5 = 0x2000 - ((uint)local_2058 & 0xfff); do { uVar18 = (ulong)uVar5; pcVar1 = *(code **)(PSI_server + 0x158); local_20c0 = puVar19; *(int8 *)(puVar15 + -8) = 0x13e9ee; lVar7 = (*pcVar1)(local_2108,uVar13,6); if (lVar7 == 0) { *(int8 *)(puVar15 + -8) = 0x13ea0e; lVar9 = my_pread(uVar13,local_2038,uVar18,lVar14,4); } else { pcVar1 = *(code **)(PSI_server + 0x210); local_20b0 = lVar7; *(int8 *)(puVar15 + -8) = 0x13ea84; (*pcVar1)(lVar7,uVar18, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0x6c1); *(int8 *)(puVar15 + -8) = 0x13ea9f; lVar9 = my_pread(uVar13,local_2038,uVar18,lVar14,4); lVar7 = local_20b0; uVar17 = 0; if (lVar9 == 0) { uVar17 = uVar18; } pcVar1 = *(code **)(PSI_server + 0x218); *(int8 *)(puVar15 + -8) = 0x13eac5; (*pcVar1)(lVar7,uVar17); } puVar19 = local_20c0; if (lVar9 != 0) goto LAB_0013ebe5; *(int8 *)(puVar15 + -8) = 0x13ea33; iVar3 = bcmp(puVar19,local_2038,uVar18); if (iVar3 != 0) goto LAB_0013ebe5; lVar14 = lVar14 + uVar18; puVar19 = puVar19 + uVar18; uVar4 = (int)uVar10 - uVar5; uVar10 = (ulong)uVar4; uVar5 = 0x2000; } while (0x2000 < uVar4); } uVar10 = (ulong)uVar4; pcVar1 = *(code **)(PSI_server + 0x158); *(int8 *)(puVar15 + -8) = 0x13eaf3; lVar7 = (*pcVar1)(local_2108,uVar13,6); if (lVar7 == 0) { *(int8 *)(puVar15 + -8) = 0x13eb17; lVar14 = my_pread(uVar13,local_2038,uVar10,lVar14,4); } else { pcVar1 = *(code **)(PSI_server + 0x210); *(int8 *)(puVar15 + -8) = 0x13eba3; (*pcVar1)(lVar7,uVar10, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_dynrec.c",0x6c9); *(int8 *)(puVar15 + -8) = 0x13ebbe; lVar14 = my_pread(uVar13,local_2038,uVar10,lVar14,4); uVar18 = 0; if (lVar14 == 0) { uVar18 = uVar10; } pcVar1 = *(code **)(PSI_server + 0x218); *(int8 *)(puVar15 + -8) = 0x13ebe0; (*pcVar1)(lVar7,uVar18); } if (lVar14 != 0) { LAB_0013ebe5: *(int8 *)(puVar15 + -8) = 0x13ebea; puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7b; uVar20 = (int7)((ulong)puVar19 >> 8); puVar8 = local_20a8; goto LAB_0013ec3e; } *(int8 *)(puVar15 + -8) = 0x13eb35; iVar3 = bcmp(puVar19,local_2038,uVar10); if (iVar3 != 0) goto LAB_0013ebe5; local_20a0 = local_20a0 + local_2070; bVar12 = false; puVar8 = local_20a8; uVar13 = local_2094; uVar4 = local_2098; } while (local_2098 != 0); goto LAB_0013e82f; } LAB_0013ec3b: uVar20 = (int7)(unaff_R15 >> 8); LAB_0013ec3e: unaff_R15 = CONCAT71(uVar20,1); cVar11 = (char)local_2094; } LAB_0013ec44: puVar16 = puVar15; if (cVar11 != '\0') { *(int8 *)(puVar15 + -8) = 0x13ec50; my_free(puVar8); } LAB_0013ec50: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ *(code **)(puVar16 + -8) = _ma_read_rnd_dynamic_record; __stack_chk_fail(); } return unaff_R15 & 0xffffffff; }
28,583
get_charset_number_internal
eloqsql/mysys/charset.c
static uint get_charset_number_internal(const char *charset_name, uint cs_flags) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) && !my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name)) return cs[0]->number; } return 0; }
O0
c
get_charset_number_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) leaq 0x35c76a(%rip), %rax # 0x3865d0 movq %rax, -0x20(%rbp) leaq 0x35c75f(%rip), %rax # 0x3865d0 addq $0x4000, %rax # imm = 0x4000 cmpq %rax, -0x20(%rbp) jae 0x29ef7 movq -0x20(%rbp), %rax cmpq $0x0, (%rax) je 0x29ee4 movq -0x20(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x10(%rax) je 0x29ee4 movq -0x20(%rbp), %rax movq (%rax), %rax movl 0xc(%rax), %eax andl -0x14(%rbp), %eax cmpl $0x0, %eax je 0x29ee4 leaq 0x24a8d2(%rip), %rax # 0x274780 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx movq 0x10(%rcx), %rsi movq -0x10(%rbp), %rdx leaq 0x24a8b1(%rip), %rdi # 0x274780 callq *%rax cmpl $0x0, %eax jne 0x29ee4 movq -0x20(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x29efe jmp 0x29ee6 movq -0x20(%rbp), %rax addq $0x8, %rax movq %rax, -0x20(%rbp) jmp 0x29e6a movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
get_charset_number_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi lea rax, all_charsets mov [rbp+var_20], rax loc_29E6A: lea rax, all_charsets add rax, 4000h cmp [rbp+var_20], rax jnb short loc_29EF7 mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jz short loc_29EE4 mov rax, [rbp+var_20] mov rax, [rax] cmp qword ptr [rax+10h], 0 jz short loc_29EE4 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax+0Ch] and eax, [rbp+var_14] cmp eax, 0 jz short loc_29EE4 lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rcx, [rbp+var_20] mov rcx, [rcx] mov rsi, [rcx+10h] mov rdx, [rbp+var_10] lea rdi, my_charset_latin1 call rax cmp eax, 0 jnz short loc_29EE4 mov rax, [rbp+var_20] mov rax, [rax] mov eax, [rax] mov [rbp+var_4], eax jmp short loc_29EFE loc_29EE4: jmp short $+2 loc_29EE6: mov rax, [rbp+var_20] add rax, 8 mov [rbp+var_20], rax jmp loc_29E6A loc_29EF7: mov [rbp+var_4], 0 loc_29EFE: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long get_charset_number_internal(long long a1, int a2) { unsigned int **i; // [rsp+0h] [rbp-20h] for ( i = (unsigned int **)all_charsets; i < &all_charsets[2048]; ++i ) { if ( *i && *((_QWORD *)*i + 2) && (a2 & (*i)[3]) != 0 && !(*(unsigned int ( **)(void *, _QWORD, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, *((_QWORD *)*i + 2), a1) ) { return **i; } } return 0; }
get_charset_number_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI LEA RAX,[0x4865d0] MOV qword ptr [RBP + -0x20],RAX LAB_00129e6a: LEA RAX,[0x4865d0] ADD RAX,0x4000 CMP qword ptr [RBP + -0x20],RAX JNC 0x00129ef7 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JZ 0x00129ee4 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00129ee4 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0xc] AND EAX,dword ptr [RBP + -0x14] CMP EAX,0x0 JZ 0x00129ee4 LEA RAX,[0x374780] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] MOV RSI,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x10] LEA RDI,[0x374780] CALL RAX CMP EAX,0x0 JNZ 0x00129ee4 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00129efe LAB_00129ee4: JMP 0x00129ee6 LAB_00129ee6: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x8 MOV qword ptr [RBP + -0x20],RAX JMP 0x00129e6a LAB_00129ef7: MOV dword ptr [RBP + -0x4],0x0 LAB_00129efe: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 get_charset_number_internal(int8 param_1,uint param_2) { int iVar1; long *local_28; local_28 = &all_charsets; while( true ) { if ((long *)0x48a5cf < local_28) { return 0; } if ((((*local_28 != 0) && (*(long *)(*local_28 + 0x10) != 0)) && ((*(uint *)(*local_28 + 0xc) & param_2) != 0)) && (iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00374840 + 0x40)) (&my_charset_latin1,*(int8 *)(*local_28 + 0x10),param_1), iVar1 == 0 )) break; local_28 = local_28 + 1; } return *(int4 *)*local_28; }
28,584
plutovg_path_quad_to
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-path.c
void plutovg_path_quad_to(plutovg_path_t* path, float x1, float y1, float x2, float y2) { float current_x, current_y; plutovg_path_get_current_point(path, &current_x, &current_y); float cp1x = 2.f / 3.f * x1 + 1.f / 3.f * current_x; float cp1y = 2.f / 3.f * y1 + 1.f / 3.f * current_y; float cp2x = 2.f / 3.f * x1 + 1.f / 3.f * x2; float cp2y = 2.f / 3.f * y1 + 1.f / 3.f * y2; plutovg_path_cubic_to(path, cp1x, cp1y, cp2x, cp2y, x2, y2); }
O1
c
plutovg_path_quad_to: movaps %xmm3, %xmm5 movaps %xmm2, %xmm4 cmpl $0x0, 0x4(%rdi) jle 0xa4ad movq 0x18(%rdi), %rax movslq 0x20(%rdi), %rcx movss 0x18e05(%rip), %xmm6 # 0x232a0 movss -0x8(%rax,%rcx,8), %xmm7 mulss %xmm6, %xmm7 mulss -0x4(%rax,%rcx,8), %xmm6 jmp 0xa4b3 xorps %xmm7, %xmm7 xorps %xmm6, %xmm6 movss 0x18de9(%rip), %xmm2 # 0x232a4 mulss %xmm2, %xmm0 addss %xmm0, %xmm7 mulss %xmm2, %xmm1 addss %xmm1, %xmm6 movss 0x18dcd(%rip), %xmm3 # 0x232a0 movaps %xmm4, %xmm2 mulss %xmm3, %xmm2 addss %xmm0, %xmm2 mulss %xmm5, %xmm3 addss %xmm1, %xmm3 movaps %xmm7, %xmm0 movaps %xmm6, %xmm1 jmp 0xa526
plutovg_path_quad_to: movaps xmm5, xmm3 movaps xmm4, xmm2 cmp dword ptr [rdi+4], 0 jle short loc_A4AD mov rax, [rdi+18h] movsxd rcx, dword ptr [rdi+20h] movss xmm6, cs:dword_232A0 movss xmm7, dword ptr [rax+rcx*8-8] mulss xmm7, xmm6 mulss xmm6, dword ptr [rax+rcx*8-4] jmp short loc_A4B3 loc_A4AD: xorps xmm7, xmm7 xorps xmm6, xmm6 loc_A4B3: movss xmm2, cs:dword_232A4 mulss xmm0, xmm2 addss xmm7, xmm0 mulss xmm1, xmm2 addss xmm6, xmm1 movss xmm3, cs:dword_232A0 movaps xmm2, xmm4 mulss xmm2, xmm3 addss xmm2, xmm0 mulss xmm3, xmm5 addss xmm3, xmm1 movaps xmm0, xmm7 movaps xmm1, xmm6 jmp plutovg_path_cubic_to
long long plutovg_path_quad_to(long long a1) { return plutovg_path_cubic_to(a1); }
plutovg_path_quad_to: MOVAPS XMM5,XMM3 MOVAPS XMM4,XMM2 CMP dword ptr [RDI + 0x4],0x0 JLE 0x0010a4ad MOV RAX,qword ptr [RDI + 0x18] MOVSXD RCX,dword ptr [RDI + 0x20] MOVSS XMM6,dword ptr [0x001232a0] MOVSS XMM7,dword ptr [RAX + RCX*0x8 + -0x8] MULSS XMM7,XMM6 MULSS XMM6,dword ptr [RAX + RCX*0x8 + -0x4] JMP 0x0010a4b3 LAB_0010a4ad: XORPS XMM7,XMM7 XORPS XMM6,XMM6 LAB_0010a4b3: MOVSS XMM2,dword ptr [0x001232a4] MULSS XMM0,XMM2 ADDSS XMM7,XMM0 MULSS XMM1,XMM2 ADDSS XMM6,XMM1 MOVSS XMM3,dword ptr [0x001232a0] MOVAPS XMM2,XMM4 MULSS XMM2,XMM3 ADDSS XMM2,XMM0 MULSS XMM3,XMM5 ADDSS XMM3,XMM1 MOVAPS XMM0,XMM7 MOVAPS XMM1,XMM6 JMP 0x0010a526
void plutovg_path_quad_to(float param_1,float param_2,float param_3,float param_4,long param_5) { float fVar1; float fVar2; if (*(int *)(param_5 + 4) < 1) { fVar2 = 0.0; fVar1 = 0.0; } else { fVar2 = *(float *)(*(long *)(param_5 + 0x18) + -8 + (long)*(int *)(param_5 + 0x20) * 8) * DAT_001232a0; fVar1 = DAT_001232a0 * *(float *)(*(long *)(param_5 + 0x18) + -4 + (long)*(int *)(param_5 + 0x20) * 8); } plutovg_path_cubic_to (fVar2 + param_1 * DAT_001232a4,fVar1 + param_2 * DAT_001232a4, param_3 * DAT_001232a0 + param_1 * DAT_001232a4, DAT_001232a0 * param_4 + param_2 * DAT_001232a4); return; }
28,585
pfs_start_metadata_wait_v1
eloqsql/storage/perfschema/pfs.cc
PSI_metadata_locker * pfs_start_metadata_wait_v1(PSI_metadata_locker_state *state, PSI_metadata_lock *lock, const char *src_file, uint src_line) { PFS_metadata_lock *pfs_lock= reinterpret_cast<PFS_metadata_lock*> (lock); assert(state != NULL); assert(pfs_lock != NULL); if (! pfs_lock->m_enabled) return NULL; uint flags; ulonglong timer_start= 0; if (flag_thread_instrumentation) { PFS_thread *pfs_thread= my_thread_get_THR_PFS(); if (unlikely(pfs_thread == NULL)) return NULL; if (! pfs_thread->m_enabled) return NULL; state->m_thread= reinterpret_cast<PSI_thread *> (pfs_thread); flags= STATE_FLAG_THREAD; if (pfs_lock->m_timed) { timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer); state->m_timer_start= timer_start; flags|= STATE_FLAG_TIMED; } if (flag_events_waits_current) { if (unlikely(pfs_thread->m_events_waits_current >= & pfs_thread->m_events_waits_stack[WAIT_STACK_SIZE])) { locker_lost++; return NULL; } PFS_events_waits *wait= pfs_thread->m_events_waits_current; state->m_wait= wait; flags|= STATE_FLAG_EVENT; PFS_events_waits *parent_event= wait - 1; wait->m_event_type= EVENT_TYPE_WAIT; wait->m_nesting_event_id= parent_event->m_event_id; wait->m_nesting_event_type= parent_event->m_event_type; wait->m_thread_internal_id= pfs_thread->m_thread_internal_id; wait->m_class= &global_metadata_class; wait->m_timer_start= timer_start; wait->m_timer_end= 0; wait->m_object_instance_addr= pfs_lock->m_identity; wait->m_event_id= pfs_thread->m_event_id++; wait->m_end_event_id= 0; wait->m_weak_metadata_lock= pfs_lock; wait->m_weak_version= pfs_lock->get_version(); wait->m_operation= OPERATION_TYPE_METADATA; wait->m_source_file= src_file; wait->m_source_line= src_line; wait->m_wait_class= WAIT_CLASS_METADATA; pfs_thread->m_events_waits_current++; } } else { if (pfs_lock->m_timed) { timer_start= get_timer_raw_value_and_function(wait_timer, & state->m_timer); state->m_timer_start= timer_start; flags= STATE_FLAG_TIMED; state->m_thread= NULL; } else { /* Complete shortcut. */ /* Aggregate to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME (counted) */ global_metadata_stat.aggregate_counted(); return NULL; } } state->m_flags= flags; state->m_metadata_lock= lock; return reinterpret_cast<PSI_metadata_locker*> (state); }
O0
cpp
pfs_start_metadata_wait_v1: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax testb $0x1, 0x4(%rax) jne 0x514b6 movq $0x0, -0x8(%rbp) jmp 0x51777 movq $0x0, -0x40(%rbp) leaq 0x3bfafb(%rip), %rax # 0x410fc0 testb $0x1, (%rax) je 0x516fd callq 0x48dd0 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x514f6 movq $0x0, -0x8(%rbp) jmp 0x51777 movq -0x48(%rbp), %rax testb $0x1, 0x7e0(%rax) jne 0x51510 movq $0x0, -0x8(%rbp) jmp 0x51777 movq -0x48(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movl $0x2, -0x34(%rbp) movq -0x30(%rbp), %rax testb $0x1, 0x5(%rax) je 0x5155c leaq 0x1c4c30(%rip), %rax # 0x216164 movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0x20, %rsi callq 0x34850 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movl -0x34(%rbp), %eax orl $0x1, %eax movl %eax, -0x34(%rbp) leaq 0x3bf95d(%rip), %rax # 0x410ec0 testb $0x1, (%rax) je 0x516fb movq -0x48(%rbp), %rax movq 0x7f0(%rax), %rax movq -0x48(%rbp), %rcx addq $0x878, %rcx # imm = 0x878 addq $0x420, %rcx # imm = 0x420 cmpq %rcx, %rax setae %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x515be leaq 0x3bc528(%rip), %rax # 0x40dac8 movq (%rax), %rcx addq $0x1, %rcx leaq 0x3bc51a(%rip), %rax # 0x40dac8 movq %rcx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x51777 movq -0x48(%rbp), %rax movq 0x7f0(%rax), %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x28(%rax) movl -0x34(%rbp), %eax orl $0x4, %eax movl %eax, -0x34(%rbp) movq -0x50(%rbp), %rax addq $-0xb0, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movl $0x4, 0x18(%rax) movq -0x58(%rbp), %rax movq 0x8(%rax), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x58(%rbp), %rax movl 0x18(%rax), %ecx movq -0x50(%rbp), %rax movl %ecx, 0x28(%rax) movq -0x48(%rbp), %rax movq 0x850(%rax), %rcx movq -0x50(%rbp), %rax movq %rcx, (%rax) movq -0x50(%rbp), %rax leaq 0x37d34a(%rip), %rcx # 0x3ce980 movq %rcx, 0x30(%rax) movq -0x40(%rbp), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x50(%rbp), %rax movq $0x0, 0x40(%rax) movq -0x30(%rbp), %rax movq 0x10(%rax), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x48(%rbp), %rax movq 0x7f8(%rax), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, 0x7f8(%rax) movq -0x50(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x50(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x30(%rbp), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x30(%rbp), %rdi callq 0x52370 movl %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, 0x80(%rax) movq -0x50(%rbp), %rax movl $0x3f, 0x90(%rax) movq -0x20(%rbp), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x48(%rax) movl -0x24(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x50(%rbp), %rax movl $0x8, 0x58(%rax) movq -0x48(%rbp), %rax movq 0x7f0(%rax), %rcx addq $0xb0, %rcx movq %rcx, 0x7f0(%rax) jmp 0x5175a movq -0x30(%rbp), %rax testb $0x1, 0x5(%rax) je 0x51742 leaq 0x1c4a56(%rip), %rax # 0x216164 movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0x20, %rsi callq 0x34850 movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movl $0x1, -0x34(%rbp) movq -0x10(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0x51758 leaq 0x37cf37(%rip), %rdi # 0x3ce680 callq 0x51a90 movq $0x0, -0x8(%rbp) jmp 0x51777 jmp 0x5175a movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pfs_start_metadata_wait_v1: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_30] test byte ptr [rax+4], 1 jnz short loc_514B6 mov [rbp+var_8], 0 jmp loc_51777 loc_514B6: mov [rbp+var_40], 0 lea rax, flag_thread_instrumentation test byte ptr [rax], 1 jz loc_516FD call _ZL21my_thread_get_THR_PFSv; my_thread_get_THR_PFS(void) mov [rbp+var_48], rax cmp [rbp+var_48], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_514F6 mov [rbp+var_8], 0 jmp loc_51777 loc_514F6: mov rax, [rbp+var_48] test byte ptr [rax+7E0h], 1 jnz short loc_51510 mov [rbp+var_8], 0 jmp loc_51777 loc_51510: mov rcx, [rbp+var_48] mov rax, [rbp+var_10] mov [rax+10h], rcx mov [rbp+var_34], 2 mov rax, [rbp+var_30] test byte ptr [rax+5], 1 jz short loc_5155C lea rax, wait_timer mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 20h ; ' ' call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void)) mov [rbp+var_40], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+18h], rcx mov eax, [rbp+var_34] or eax, 1 mov [rbp+var_34], eax loc_5155C: lea rax, flag_events_waits_current test byte ptr [rax], 1 jz loc_516FB mov rax, [rbp+var_48] mov rax, [rax+7F0h] mov rcx, [rbp+var_48] add rcx, 878h add rcx, 420h cmp rax, rcx setnb al and al, 1 movzx eax, al cmp eax, 0 jz short loc_515BE lea rax, locker_lost mov rcx, [rax] add rcx, 1 lea rax, locker_lost mov [rax], rcx mov [rbp+var_8], 0 jmp loc_51777 loc_515BE: mov rax, [rbp+var_48] mov rax, [rax+7F0h] mov [rbp+var_50], rax mov rcx, [rbp+var_50] mov rax, [rbp+var_10] mov [rax+28h], rcx mov eax, [rbp+var_34] or eax, 4 mov [rbp+var_34], eax mov rax, [rbp+var_50] add rax, 0FFFFFFFFFFFFFF50h mov [rbp+var_58], rax mov rax, [rbp+var_50] mov dword ptr [rax+18h], 4 mov rax, [rbp+var_58] mov rcx, [rax+8] mov rax, [rbp+var_50] mov [rax+20h], rcx mov rax, [rbp+var_58] mov ecx, [rax+18h] mov rax, [rbp+var_50] mov [rax+28h], ecx mov rax, [rbp+var_48] mov rcx, [rax+850h] mov rax, [rbp+var_50] mov [rax], rcx mov rax, [rbp+var_50] lea rcx, global_metadata_class mov [rax+30h], rcx mov rcx, [rbp+var_40] mov rax, [rbp+var_50] mov [rax+38h], rcx mov rax, [rbp+var_50] mov qword ptr [rax+40h], 0 mov rax, [rbp+var_30] mov rcx, [rax+10h] mov rax, [rbp+var_50] mov [rax+88h], rcx mov rax, [rbp+var_48] mov rcx, [rax+7F8h] mov rdx, rcx add rdx, 1 mov [rax+7F8h], rdx mov rax, [rbp+var_50] mov [rax+8], rcx mov rax, [rbp+var_50] mov qword ptr [rax+10h], 0 mov rcx, [rbp+var_30] mov rax, [rbp+var_50] mov [rax+78h], rcx mov rdi, [rbp+var_30]; this call _ZN17PFS_metadata_lock11get_versionEv; PFS_metadata_lock::get_version(void) mov ecx, eax mov rax, [rbp+var_50] mov [rax+80h], ecx mov rax, [rbp+var_50] mov dword ptr [rax+90h], 3Fh ; '?' mov rcx, [rbp+var_20] mov rax, [rbp+var_50] mov [rax+48h], rcx mov ecx, [rbp+var_24] mov rax, [rbp+var_50] mov [rax+50h], ecx mov rax, [rbp+var_50] mov dword ptr [rax+58h], 8 mov rax, [rbp+var_48] mov rcx, [rax+7F0h] add rcx, 0B0h mov [rax+7F0h], rcx loc_516FB: jmp short loc_5175A loc_516FD: mov rax, [rbp+var_30] test byte ptr [rax+5], 1 jz short loc_51742 lea rax, wait_timer mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 20h ; ' ' call _Z32get_timer_raw_value_and_function15enum_timer_namePPFyvE; get_timer_raw_value_and_function(enum_timer_name,ulong long (**)(void)) mov [rbp+var_40], rax mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+18h], rcx mov [rbp+var_34], 1 mov rax, [rbp+var_10] mov qword ptr [rax+10h], 0 jmp short loc_51758 loc_51742: lea rdi, global_metadata_stat; this call _ZN15PFS_single_stat17aggregate_countedEv; PFS_single_stat::aggregate_counted(void) mov [rbp+var_8], 0 jmp short loc_51777 loc_51758: jmp short $+2 loc_5175A: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] mov [rax], ecx mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_51777: mov rax, [rbp+var_8] add rsp, 60h pop rbp retn
long long pfs_start_metadata_wait_v1(long long a1, long long a2, long long a3, int a4) { long long v4; // rcx long long v6; // [rsp+10h] [rbp-50h] long long THR_PFS; // [rsp+18h] [rbp-48h] unsigned long long timer_raw_value_and_function; // [rsp+20h] [rbp-40h] int v9; // [rsp+2Ch] [rbp-34h] if ( (*(_BYTE *)(a2 + 4) & 1) != 0 ) { timer_raw_value_and_function = 0LL; if ( (flag_thread_instrumentation & 1) != 0 ) { THR_PFS = my_thread_get_THR_PFS(); if ( !THR_PFS ) return 0LL; if ( (*(_BYTE *)(THR_PFS + 2016) & 1) == 0 ) return 0LL; *(_QWORD *)(a1 + 16) = THR_PFS; v9 = 2; if ( (*(_BYTE *)(a2 + 5) & 1) != 0 ) { timer_raw_value_and_function = get_timer_raw_value_and_function( (unsigned int)wait_timer, (unsigned long long (**)(void))(a1 + 32)); *(_QWORD *)(a1 + 24) = timer_raw_value_and_function; v9 = 3; } if ( (flag_events_waits_current & 1) != 0 ) { if ( *(_QWORD *)(THR_PFS + 2032) >= (unsigned long long)(THR_PFS + 3224) ) { ++locker_lost; return 0LL; } v6 = *(_QWORD *)(THR_PFS + 2032); *(_QWORD *)(a1 + 40) = v6; v9 |= 4u; *(_DWORD *)(v6 + 24) = 4; *(_QWORD *)(v6 + 32) = *(_QWORD *)(v6 - 176 + 8); *(_DWORD *)(v6 + 40) = *(_DWORD *)(v6 - 176 + 24); *(_QWORD *)v6 = *(_QWORD *)(THR_PFS + 2128); *(_QWORD *)(v6 + 48) = &global_metadata_class; *(_QWORD *)(v6 + 56) = timer_raw_value_and_function; *(_QWORD *)(v6 + 64) = 0LL; *(_QWORD *)(v6 + 136) = *(_QWORD *)(a2 + 16); v4 = *(_QWORD *)(THR_PFS + 2040); *(_QWORD *)(THR_PFS + 2040) = v4 + 1; *(_QWORD *)(v6 + 8) = v4; *(_QWORD *)(v6 + 16) = 0LL; *(_QWORD *)(v6 + 120) = a2; *(_DWORD *)(v6 + 128) = PFS_metadata_lock::get_version((PFS_metadata_lock *)a2); *(_DWORD *)(v6 + 144) = 63; *(_QWORD *)(v6 + 72) = a3; *(_DWORD *)(v6 + 80) = a4; *(_DWORD *)(v6 + 88) = 8; *(_QWORD *)(THR_PFS + 2032) += 176LL; } } else { if ( (*(_BYTE *)(a2 + 5) & 1) == 0 ) { PFS_single_stat::aggregate_counted((PFS_single_stat *)&global_metadata_stat); return 0LL; } *(_QWORD *)(a1 + 24) = get_timer_raw_value_and_function( (unsigned int)wait_timer, (unsigned long long (**)(void))(a1 + 32)); v9 = 1; *(_QWORD *)(a1 + 16) = 0LL; } *(_DWORD *)a1 = v9; *(_QWORD *)(a1 + 8) = a2; return a1; } return 0LL; }
pfs_start_metadata_wait_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] TEST byte ptr [RAX + 0x4],0x1 JNZ 0x001514b6 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00151777 LAB_001514b6: MOV qword ptr [RBP + -0x40],0x0 LEA RAX,[0x510fc0] TEST byte ptr [RAX],0x1 JZ 0x001516fd CALL 0x00148dd0 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x001514f6 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00151777 LAB_001514f6: MOV RAX,qword ptr [RBP + -0x48] TEST byte ptr [RAX + 0x7e0],0x1 JNZ 0x00151510 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00151777 LAB_00151510: MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV dword ptr [RBP + -0x34],0x2 MOV RAX,qword ptr [RBP + -0x30] TEST byte ptr [RAX + 0x5],0x1 JZ 0x0015155c LEA RAX,[0x316164] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x20 CALL 0x00134850 MOV qword ptr [RBP + -0x40],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV EAX,dword ptr [RBP + -0x34] OR EAX,0x1 MOV dword ptr [RBP + -0x34],EAX LAB_0015155c: LEA RAX,[0x510ec0] TEST byte ptr [RAX],0x1 JZ 0x001516fb MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x7f0] MOV RCX,qword ptr [RBP + -0x48] ADD RCX,0x878 ADD RCX,0x420 CMP RAX,RCX SETNC AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x001515be LEA RAX,[0x50dac8] MOV RCX,qword ptr [RAX] ADD RCX,0x1 LEA RAX,[0x50dac8] MOV qword ptr [RAX],RCX MOV qword ptr [RBP + -0x8],0x0 JMP 0x00151777 LAB_001515be: MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x7f0] MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],RCX MOV EAX,dword ptr [RBP + -0x34] OR EAX,0x4 MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,-0xb0 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x18],0x4 MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX + 0x850] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x4ce980] MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x88],RCX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX + 0x7f8] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RAX + 0x7f8],RDX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x10],0x0 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x78],RCX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00152370 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x80],ECX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x90],0x3f MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x48],RCX MOV ECX,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x50],ECX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX + 0x58],0x8 MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RAX + 0x7f0] ADD RCX,0xb0 MOV qword ptr [RAX + 0x7f0],RCX LAB_001516fb: JMP 0x0015175a LAB_001516fd: MOV RAX,qword ptr [RBP + -0x30] TEST byte ptr [RAX + 0x5],0x1 JZ 0x00151742 LEA RAX,[0x316164] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x20 CALL 0x00134850 MOV qword ptr [RBP + -0x40],RAX MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RBP + -0x34],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],0x0 JMP 0x00151758 LAB_00151742: LEA RDI,[0x4ce680] CALL 0x00151a90 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00151777 LAB_00151758: JMP 0x0015175a LAB_0015175a: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_00151777: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
uint * pfs_start_metadata_wait_v1 (uint *param_1,PFS_metadata_lock *param_2,int8 param_3,int4 param_4) { int8 *puVar1; long lVar2; int4 uVar3; long lVar4; int8 uVar5; int8 local_48; uint local_3c; if (((byte)param_2[4] & 1) == 0) { return (uint *)0x0; } local_48 = 0; if ((flag_thread_instrumentation & 1) == 0) { if (((byte)param_2[5] & 1) == 0) { PFS_single_stat::aggregate_counted((PFS_single_stat *)global_metadata_stat); return (uint *)0x0; } uVar5 = get_timer_raw_value_and_function(wait_timer,param_1 + 8); *(int8 *)(param_1 + 6) = uVar5; local_3c = 1; param_1[4] = 0; param_1[5] = 0; } else { lVar4 = my_thread_get_THR_PFS(); if (lVar4 == 0) { return (uint *)0x0; } if ((*(byte *)(lVar4 + 0x7e0) & 1) == 0) { return (uint *)0x0; } *(long *)(param_1 + 4) = lVar4; local_3c = 2; if (((byte)param_2[5] & 1) != 0) { local_48 = get_timer_raw_value_and_function(wait_timer,param_1 + 8); *(int8 *)(param_1 + 6) = local_48; local_3c = 3; } if ((flag_events_waits_current & 1) != 0) { if (lVar4 + 0xc98U <= *(ulong *)(lVar4 + 0x7f0)) { locker_lost = locker_lost + 1; return (uint *)0x0; } puVar1 = *(int8 **)(lVar4 + 0x7f0); *(int8 **)(param_1 + 10) = puVar1; local_3c = local_3c | 4; *(int4 *)(puVar1 + 3) = 4; puVar1[4] = puVar1[-0x15]; *(int4 *)(puVar1 + 5) = *(int4 *)(puVar1 + -0x13); *puVar1 = *(int8 *)(lVar4 + 0x850); puVar1[6] = global_metadata_class; puVar1[7] = local_48; puVar1[8] = 0; puVar1[0x11] = *(int8 *)(param_2 + 0x10); lVar2 = *(long *)(lVar4 + 0x7f8); *(long *)(lVar4 + 0x7f8) = lVar2 + 1; puVar1[1] = lVar2; puVar1[2] = 0; puVar1[0xf] = param_2; uVar3 = PFS_metadata_lock::get_version(param_2); *(int4 *)(puVar1 + 0x10) = uVar3; *(int4 *)(puVar1 + 0x12) = 0x3f; puVar1[9] = param_3; *(int4 *)(puVar1 + 10) = param_4; *(int4 *)(puVar1 + 0xb) = 8; *(long *)(lVar4 + 0x7f0) = *(long *)(lVar4 + 0x7f0) + 0xb0; } } *param_1 = local_3c; *(PFS_metadata_lock **)(param_1 + 2) = param_2; return param_1; }
28,586
ma_set_uuid
eloqsql/storage/maria/ma_locking.c
my_bool _ma_set_uuid(MARIA_SHARE *share, my_bool reset_uuid) { uchar buff[MY_UUID_SIZE], *uuid; uuid= maria_uuid; if (reset_uuid) { bzero(buff, sizeof(buff)); uuid= buff; } CRASH_IF_S3_TABLE(share); return (my_bool) my_pwrite(share->kfile.file, uuid, MY_UUID_SIZE, mi_uint2korr(share->state.header.base_pos), MYF(MY_NABP)); }
O3
c
ma_set_uuid: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) testb %sil, %sil je 0x459c8 xorps %xmm0, %xmm0 leaq -0x20(%rbp), %rsi movaps %xmm0, (%rsi) jmp 0x459cf leaq 0x3c02e1(%rip), %rsi # 0x405cb0 movl 0x760(%rdi), %eax movzwl 0xc(%rdi), %ecx rolw $0x8, %cx movzwl %cx, %ecx movl $0x10, %edx movl $0x4, %r8d movl %eax, %edi callq 0xa6e22 movq %fs:0x28, %rcx cmpq -0x8(%rbp), %rcx jne 0x45a07 addq $0x20, %rsp popq %rbp retq callq 0x2a270
_ma_set_uuid: push rbp mov rbp, rsp sub rsp, 20h mov rax, fs:28h mov [rbp+var_8], rax test sil, sil jz short loc_459C8 xorps xmm0, xmm0 lea rsi, [rbp+var_20] movaps xmmword ptr [rsi], xmm0 jmp short loc_459CF loc_459C8: lea rsi, maria_uuid loc_459CF: mov eax, [rdi+760h] movzx ecx, word ptr [rdi+0Ch] rol cx, 8 movzx ecx, cx mov edx, 10h mov r8d, 4 mov edi, eax call my_pwrite mov rcx, fs:28h cmp rcx, [rbp+var_8] jnz short loc_45A07 add rsp, 20h pop rbp retn loc_45A07: call ___stack_chk_fail
long long ma_set_uuid(long long a1, char a2) { __int128 *v2; // rsi __int128 v4; // [rsp+0h] [rbp-20h] BYREF unsigned long long v5; // [rsp+18h] [rbp-8h] v5 = __readfsqword(0x28u); if ( a2 ) { v2 = &v4; v4 = 0LL; } else { v2 = &maria_uuid; } return my_pwrite(*(unsigned int *)(a1 + 1888), v2, 16LL, (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 12), 8), 4LL); }
_ma_set_uuid: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX TEST SIL,SIL JZ 0x001459c8 XORPS XMM0,XMM0 LEA RSI,[RBP + -0x20] MOVAPS xmmword ptr [RSI],XMM0 JMP 0x001459cf LAB_001459c8: LEA RSI,[0x505cb0] LAB_001459cf: MOV EAX,dword ptr [RDI + 0x760] MOVZX ECX,word ptr [RDI + 0xc] ROL CX,0x8 MOVZX ECX,CX MOV EDX,0x10 MOV R8D,0x4 MOV EDI,EAX CALL 0x001a6e22 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x8] JNZ 0x00145a07 ADD RSP,0x20 POP RBP RET LAB_00145a07: CALL 0x0012a270
void _ma_set_uuid(long param_1,char param_2) { int1 *puVar1; long in_FS_OFFSET; int8 local_28; int8 uStack_20; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 == '\0') { puVar1 = maria_uuid; } else { puVar1 = (int1 *)&local_28; local_28 = 0; uStack_20 = 0; } my_pwrite(*(int4 *)(param_1 + 0x760),puVar1,0x10, *(ushort *)(param_1 + 0xc) << 8 | *(ushort *)(param_1 + 0xc) >> 8,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,587
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 0xff88f movq -0x18(%rbp), %rdi addq $0x8, %rdi callq 0xff7a0 movq -0x18(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0xff865 movq -0x8(%rbp), %rax movq $0x0, (%rax) jmp 0xff87b 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 0xff933 jmp 0xff891 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 0xff8fc cmpq $0x0, -0x28(%rbp) je 0xff8e7 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 0xff8fa movq -0x20(%rbp), %rax movq -0x20(%rbp), %rcx movq %rax, 0x88(%rcx) movq %rax, -0x28(%rbp) jmp 0xff918 movq -0x20(%rbp), %rdi addq $0x8, %rdi callq 0xff7a0 movq -0x20(%rbp), %rax movq $0x0, 0x88(%rax) jmp 0xff91a movq -0x20(%rbp), %rax cmpq -0x10(%rbp), %rax jne 0xff891 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_FF88F mov rdi, [rbp+var_18] add rdi, 8 call inline_mysql_cond_signal_5 mov rax, [rbp+var_18] cmp rax, [rbp+var_10] jnz short loc_FF865 mov rax, [rbp+var_8] mov qword ptr [rax], 0 jmp short loc_FF87B loc_FF865: mov rax, [rbp+var_18] mov rcx, [rax+88h] mov rax, [rbp+var_10] mov [rax+88h], rcx loc_FF87B: mov rax, [rbp+var_18] mov qword ptr [rax+88h], 0 jmp loc_FF933 loc_FF88F: jmp short $+2 loc_FF891: 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_FF8FC cmp [rbp+var_28], 0 jz short loc_FF8E7 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_FF8FA loc_FF8E7: mov rax, [rbp+var_20] mov rcx, [rbp+var_20] mov [rcx+88h], rax mov [rbp+var_28], rax loc_FF8FA: jmp short loc_FF918 loc_FF8FC: mov rdi, [rbp+var_20] add rdi, 8 call inline_mysql_cond_signal_5 mov rax, [rbp+var_20] mov qword ptr [rax+88h], 0 loc_FF918: jmp short $+2 loc_FF91A: mov rax, [rbp+var_20] cmp rax, [rbp+var_10] jnz loc_FF891 mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax], rcx loc_FF933: 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_5((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_5((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 0x001ff88f MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x8 CALL 0x001ff7a0 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001ff865 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 JMP 0x001ff87b LAB_001ff865: 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_001ff87b: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x88],0x0 JMP 0x001ff933 LAB_001ff88f: JMP 0x001ff891 LAB_001ff891: 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 0x001ff8fc CMP qword ptr [RBP + -0x28],0x0 JZ 0x001ff8e7 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 0x001ff8fa LAB_001ff8e7: 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_001ff8fa: JMP 0x001ff918 LAB_001ff8fc: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x8 CALL 0x001ff7a0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x88],0x0 LAB_001ff918: JMP 0x001ff91a LAB_001ff91a: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x001ff891 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX LAB_001ff933: 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; }
28,588
hp_hashnr
eloqsql/storage/heap/hp_hash.c
static ulong hp_hashnr(HP_KEYDEF *keydef, const uchar *key) { /*register*/ ulong nr=1, nr2=4; HA_KEYSEG *seg,*endseg; for (seg=keydef->seg,endseg=seg+keydef->keysegs ; seg < endseg ; seg++) { uchar *pos=(uchar*) key; key+=seg->length; if (seg->null_bit) { key++; /* Skip null byte */ if (*pos) /* Found null */ { nr^= (nr << 1) | 1; /* Add key pack length (2) to key for VARCHAR segments */ if (seg->type == HA_KEYTYPE_VARTEXT1) key+= 2; continue; } pos++; } if (seg->type == HA_KEYTYPE_TEXT) { CHARSET_INFO *cs= seg->charset; size_t length= seg->length; if (cs->mbmaxlen > 1) { size_t char_length; char_length= hp_charpos(cs, pos, pos + length, length/cs->mbmaxlen); set_if_smaller(length, char_length); } my_ci_hash_sort(cs, pos, length, &nr, &nr2); } else if (seg->type == HA_KEYTYPE_VARTEXT1) /* Any VARCHAR segments */ { CHARSET_INFO *cs= seg->charset; size_t pack_length= 2; /* Key packing is constant */ size_t length= uint2korr(pos); if (cs->mbmaxlen > 1) { size_t char_length; char_length= hp_charpos(cs, pos +pack_length, pos +pack_length + length, seg->length/cs->mbmaxlen); set_if_smaller(length, char_length); } my_ci_hash_sort(cs, pos+pack_length, length, &nr, &nr2); key+= pack_length; } else { for (; pos < (uchar*) key ; pos++) { nr^=(ulong) ((((uint) nr & 63)+nr2)*((uint) *pos)) + (nr << 8); nr2+=3; } } } #ifdef ONLY_FOR_HASH_DEBUGGING DBUG_PRINT("exit", ("hash: 0x%lx", nr)); #endif return((ulong) nr); }
O0
c
hp_hashnr: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq $0x1, -0x18(%rbp) movq $0x4, -0x20(%rbp) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq -0x8(%rbp), %rcx movl 0x4(%rcx), %ecx shlq $0x5, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x29915 movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movzwl 0x14(%rax), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x28(%rbp), %rax cmpb $0x0, 0x19(%rax) je 0x2974d movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rax cmpb $0x0, (%rax) je 0x29741 movq -0x18(%rbp), %rax shlq %rax orq $0x1, %rax xorq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rax movzbl 0x18(%rax), %eax cmpl $0xf, %eax jne 0x2973c movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) jmp 0x29904 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movzbl 0x18(%rax), %eax cmpl $0x1, %eax jne 0x297ed movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rax cmpl $0x1, 0x9c(%rax) jbe 0x297cf movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x38(%rbp), %rax addq -0x48(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x48(%rbp), %rax movq -0x40(%rbp), %rcx movl 0x9c(%rcx), %ecx xorl %edx, %edx divq %rcx movq -0x78(%rbp), %rdx movq %rax, %rcx callq 0x2a220 movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax cmpq -0x50(%rbp), %rax jbe 0x297cb movq -0x50(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x297cd jmp 0x297cf movq -0x40(%rbp), %rdi movq -0x38(%rbp), %rsi movq -0x48(%rbp), %rdx leaq -0x18(%rbp), %rcx leaq -0x20(%rbp), %r8 callq 0x2a260 jmp 0x29902 movq -0x28(%rbp), %rax movzbl 0x18(%rax), %eax cmpl $0xf, %eax jne 0x298ab movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq $0x2, -0x60(%rbp) movq -0x38(%rbp), %rax movzwl (%rax), %eax movq %rax, -0x68(%rbp) movq -0x58(%rbp), %rax cmpl $0x1, 0x9c(%rax) jbe 0x29880 movq -0x58(%rbp), %rdi movq -0x38(%rbp), %rsi addq -0x60(%rbp), %rsi movq -0x38(%rbp), %rax addq -0x60(%rbp), %rax addq -0x68(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x28(%rbp), %rax movzwl 0x14(%rax), %eax movq -0x58(%rbp), %rcx xorl %edx, %edx divl 0x9c(%rcx) movq -0x80(%rbp), %rdx movl %eax, %eax movl %eax, %ecx callq 0x2a220 movq %rax, -0x70(%rbp) movq -0x68(%rbp), %rax cmpq -0x70(%rbp), %rax jbe 0x2987c movq -0x70(%rbp), %rax movq %rax, -0x68(%rbp) jmp 0x2987e jmp 0x29880 movq -0x58(%rbp), %rdi movq -0x38(%rbp), %rsi addq -0x60(%rbp), %rsi movq -0x68(%rbp), %rdx leaq -0x18(%rbp), %rcx leaq -0x20(%rbp), %r8 callq 0x2a260 movq -0x60(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x29900 jmp 0x298ad movq -0x38(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x298fe movq -0x18(%rbp), %rax andl $0x3f, %eax movl %eax, %eax addq -0x20(%rbp), %rax movq -0x38(%rbp), %rcx movzbl (%rcx), %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x18(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax addq $0x3, %rax movq %rax, -0x20(%rbp) movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x298ad jmp 0x29900 jmp 0x29902 jmp 0x29904 movq -0x28(%rbp), %rax addq $0x20, %rax movq %rax, -0x28(%rbp) jmp 0x296c5 movq -0x18(%rbp), %rax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
hp_hashnr: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], 1 mov [rbp+var_20], 4 mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_8] mov ecx, [rcx+4] shl rcx, 5 add rax, rcx mov [rbp+var_30], rax loc_296C5: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb loc_29915 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_28] movzx ecx, word ptr [rax+14h] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov rax, [rbp+var_28] cmp byte ptr [rax+19h], 0 jz short loc_2974D mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_38] cmp byte ptr [rax], 0 jz short loc_29741 mov rax, [rbp+var_18] shl rax, 1 or rax, 1 xor rax, [rbp+var_18] mov [rbp+var_18], rax mov rax, [rbp+var_28] movzx eax, byte ptr [rax+18h] cmp eax, 0Fh jnz short loc_2973C mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax loc_2973C: jmp loc_29904 loc_29741: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax loc_2974D: mov rax, [rbp+var_28] movzx eax, byte ptr [rax+18h] cmp eax, 1 jnz loc_297ED mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] mov [rbp+var_48], rax mov rax, [rbp+var_40] cmp dword ptr [rax+9Ch], 1 jbe short loc_297CF mov rdi, [rbp+var_40] mov rsi, [rbp+var_38] mov rax, [rbp+var_38] add rax, [rbp+var_48] mov [rbp+var_78], rax mov rax, [rbp+var_48] mov rcx, [rbp+var_40] mov ecx, [rcx+9Ch] xor edx, edx div rcx mov rdx, [rbp+var_78] mov rcx, rax call hp_charpos mov [rbp+var_50], rax mov rax, [rbp+var_48] cmp rax, [rbp+var_50] jbe short loc_297CB mov rax, [rbp+var_50] mov [rbp+var_48], rax loc_297CB: jmp short $+2 loc_297CD: jmp short $+2 loc_297CF: mov rdi, [rbp+var_40] mov rsi, [rbp+var_38] mov rdx, [rbp+var_48] lea rcx, [rbp+var_18] lea r8, [rbp+var_20] call my_ci_hash_sort jmp loc_29902 loc_297ED: mov rax, [rbp+var_28] movzx eax, byte ptr [rax+18h] cmp eax, 0Fh jnz loc_298AB mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax mov [rbp+var_60], 2 mov rax, [rbp+var_38] movzx eax, word ptr [rax] mov [rbp+var_68], rax mov rax, [rbp+var_58] cmp dword ptr [rax+9Ch], 1 jbe short loc_29880 mov rdi, [rbp+var_58] mov rsi, [rbp+var_38] add rsi, [rbp+var_60] mov rax, [rbp+var_38] add rax, [rbp+var_60] add rax, [rbp+var_68] mov [rbp+var_80], rax mov rax, [rbp+var_28] movzx eax, word ptr [rax+14h] mov rcx, [rbp+var_58] xor edx, edx div dword ptr [rcx+9Ch] mov rdx, [rbp+var_80] mov eax, eax mov ecx, eax call hp_charpos mov [rbp+var_70], rax mov rax, [rbp+var_68] cmp rax, [rbp+var_70] jbe short loc_2987C mov rax, [rbp+var_70] mov [rbp+var_68], rax loc_2987C: jmp short $+2 loc_2987E: jmp short $+2 loc_29880: mov rdi, [rbp+var_58] mov rsi, [rbp+var_38] add rsi, [rbp+var_60] mov rdx, [rbp+var_68] lea rcx, [rbp+var_18] lea r8, [rbp+var_20] call my_ci_hash_sort mov rax, [rbp+var_60] add rax, [rbp+var_10] mov [rbp+var_10], rax jmp short loc_29900 loc_298AB: jmp short $+2 loc_298AD: mov rax, [rbp+var_38] cmp rax, [rbp+var_10] jnb short loc_298FE mov rax, [rbp+var_18] and eax, 3Fh mov eax, eax add rax, [rbp+var_20] mov rcx, [rbp+var_38] movzx ecx, byte ptr [rcx] mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_18] shl rcx, 8 add rax, rcx xor rax, [rbp+var_18] mov [rbp+var_18], rax mov rax, [rbp+var_20] add rax, 3 mov [rbp+var_20], rax mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_298AD loc_298FE: jmp short $+2 loc_29900: jmp short $+2 loc_29902: jmp short $+2 loc_29904: mov rax, [rbp+var_28] add rax, 20h ; ' ' mov [rbp+var_28], rax jmp loc_296C5 loc_29915: mov rax, [rbp+var_18] add rsp, 80h pop rbp retn
long long hp_hashnr(long long a1, _BYTE *a2) { unsigned long long v3; // [rsp+10h] [rbp-70h] unsigned long long v4; // [rsp+18h] [rbp-68h] long long v5; // [rsp+28h] [rbp-58h] unsigned long long v6; // [rsp+30h] [rbp-50h] unsigned long long v7; // [rsp+38h] [rbp-48h] long long v8; // [rsp+40h] [rbp-40h] _BYTE *v9; // [rsp+48h] [rbp-38h] unsigned long long v10; // [rsp+50h] [rbp-30h] long long *v11; // [rsp+58h] [rbp-28h] long long v12; // [rsp+60h] [rbp-20h] BYREF long long v13; // [rsp+68h] [rbp-18h] BYREF _BYTE *v14; // [rsp+70h] [rbp-10h] long long v15; // [rsp+78h] [rbp-8h] v15 = a1; v14 = a2; v13 = 1LL; v12 = 4LL; v11 = *(long long **)(a1 + 16); v10 = (unsigned long long)&v11[4 * *(unsigned int *)(a1 + 4)]; while ( (unsigned long long)v11 < v10 ) { v9 = v14; v14 += *((unsigned __int16 *)v11 + 10); if ( *((_BYTE *)v11 + 25) ) { ++v14; if ( *v9 ) { v13 ^= (2 * v13) | 1; if ( *((_BYTE *)v11 + 24) == 15 ) v14 += 2; goto LABEL_21; } ++v9; } if ( *((_BYTE *)v11 + 24) == 1 ) { v8 = *v11; v7 = *((unsigned __int16 *)v11 + 10); if ( *(_DWORD *)(*v11 + 156) > 1u ) { v6 = hp_charpos(v8, v9, &v9[v7], v7 / *(unsigned int *)(v8 + 156)); if ( v7 > v6 ) v7 = v6; } my_ci_hash_sort(v8, v9, v7, &v13, &v12); } else if ( *((_BYTE *)v11 + 24) == 15 ) { v5 = *v11; v4 = *(unsigned __int16 *)v9; if ( *(_DWORD *)(*v11 + 156) > 1u ) { v3 = hp_charpos(v5, v9 + 2, &v9[v4 + 2], (unsigned int)*((unsigned __int16 *)v11 + 10) / *(_DWORD *)(v5 + 156)); if ( v4 > v3 ) v4 = v3; } my_ci_hash_sort(v5, v9 + 2, v4, &v13, &v12); v14 += 2; } else { while ( v9 < v14 ) { v13 ^= (v13 << 8) + (unsigned __int8)*v9 * (v12 + (v13 & 0x3F)); v12 += 3LL; ++v9; } } LABEL_21: v11 += 4; } return v13; }
hp_hashnr: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],0x1 MOV qword ptr [RBP + -0x20],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x4] SHL RCX,0x5 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_001296c5: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x00129915 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] MOVZX ECX,word ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x28] CMP byte ptr [RAX + 0x19],0x0 JZ 0x0012974d MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX],0x0 JZ 0x00129741 MOV RAX,qword ptr [RBP + -0x18] SHL RAX,0x1 OR RAX,0x1 XOR RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x18] CMP EAX,0xf JNZ 0x0012973c MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX LAB_0012973c: JMP 0x00129904 LAB_00129741: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX LAB_0012974d: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x18] CMP EAX,0x1 JNZ 0x001297ed MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x40] CMP dword ptr [RAX + 0x9c],0x1 JBE 0x001297cf MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0x9c] XOR EDX,EDX DIV RCX MOV RDX,qword ptr [RBP + -0x78] MOV RCX,RAX CALL 0x0012a220 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RBP + -0x50] JBE 0x001297cb MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x48],RAX LAB_001297cb: JMP 0x001297cd LAB_001297cd: JMP 0x001297cf LAB_001297cf: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x48] LEA RCX,[RBP + -0x18] LEA R8,[RBP + -0x20] CALL 0x0012a260 JMP 0x00129902 LAB_001297ed: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + 0x18] CMP EAX,0xf JNZ 0x001298ab MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV qword ptr [RBP + -0x60],0x2 MOV RAX,qword ptr [RBP + -0x38] MOVZX EAX,word ptr [RAX] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x58] CMP dword ptr [RAX + 0x9c],0x1 JBE 0x00129880 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x38] ADD RSI,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x60] ADD RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,word ptr [RAX + 0x14] MOV RCX,qword ptr [RBP + -0x58] XOR EDX,EDX DIV dword ptr [RCX + 0x9c] MOV RDX,qword ptr [RBP + -0x80] MOV EAX,EAX MOV ECX,EAX CALL 0x0012a220 MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x70] JBE 0x0012987c MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x68],RAX LAB_0012987c: JMP 0x0012987e LAB_0012987e: JMP 0x00129880 LAB_00129880: MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x38] ADD RSI,qword ptr [RBP + -0x60] MOV RDX,qword ptr [RBP + -0x68] LEA RCX,[RBP + -0x18] LEA R8,[RBP + -0x20] CALL 0x0012a260 MOV RAX,qword ptr [RBP + -0x60] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x00129900 LAB_001298ab: JMP 0x001298ad LAB_001298ad: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x10] JNC 0x001298fe MOV RAX,qword ptr [RBP + -0x18] AND EAX,0x3f MOV EAX,EAX ADD RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RCX] MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x18] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x001298ad LAB_001298fe: JMP 0x00129900 LAB_00129900: JMP 0x00129902 LAB_00129902: JMP 0x00129904 LAB_00129904: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x20 MOV qword ptr [RBP + -0x28],RAX JMP 0x001296c5 LAB_00129915: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x80 POP RBP RET
ulong hp_hashnr(long param_1,ushort *param_2) { long lVar1; long *plVar2; ushort *puVar3; ulong uVar4; ulong local_70; ulong local_50; ushort *local_40; long *local_30; long local_28; ulong local_20; ushort *local_18; long local_10; local_20 = 1; local_28 = 4; local_30 = *(long **)(param_1 + 0x10); plVar2 = local_30 + (ulong)*(uint *)(param_1 + 4) * 4; local_18 = param_2; local_10 = param_1; do { if (plVar2 <= local_30) { return local_20; } local_40 = local_18; puVar3 = (ushort *)((long)local_18 + (long)(int)(uint)*(ushort *)((long)local_30 + 0x14)); if (*(char *)((long)local_30 + 0x19) == '\0') { LAB_0012974d: local_18 = puVar3; if ((char)local_30[3] == '\x01') { lVar1 = *local_30; local_50 = (ulong)*(ushort *)((long)local_30 + 0x14); if ((1 < *(uint *)(lVar1 + 0x9c)) && (uVar4 = hp_charpos(lVar1,local_40,(byte *)((long)local_40 + local_50), local_50 / *(uint *)(lVar1 + 0x9c)), uVar4 < local_50)) { local_50 = uVar4; } my_ci_hash_sort(lVar1,local_40,local_50,&local_20,&local_28); } else if ((char)local_30[3] == '\x0f') { lVar1 = *local_30; local_70 = (ulong)*local_40; if ((1 < *(uint *)(lVar1 + 0x9c)) && (uVar4 = hp_charpos(lVar1,local_40 + 1,(byte *)((long)local_40 + local_70 + 2), (ulong)*(ushort *)((long)local_30 + 0x14) / (ulong)*(uint *)(lVar1 + 0x9c)), uVar4 < local_70)) { local_70 = uVar4; } my_ci_hash_sort(lVar1,local_40 + 1,local_70,&local_20,&local_28); local_18 = local_18 + 1; } else { for (; local_40 < local_18; local_40 = (ushort *)((long)local_40 + 1)) { local_20 = ((ulong)((uint)local_20 & 0x3f) + local_28) * (ulong)(byte)*local_40 + local_20 * 0x100 ^ local_20; local_28 = local_28 + 3; } } } else { if ((byte)*local_18 == 0) { local_40 = (ushort *)((long)local_18 + 1); puVar3 = (ushort *)((long)puVar3 + 1); goto LAB_0012974d; } local_20 = (local_20 << 1 | 1) ^ local_20; local_18 = (ushort *)((long)puVar3 + 1); if ((char)local_30[3] == '\x0f') { local_18 = (ushort *)((long)puVar3 + 3); } } local_30 = local_30 + 4; } while( true ); }
28,589
JS_ToArrayLengthFree
bluesky950520[P]quickjs/quickjs.c
static __exception int JS_ToArrayLengthFree(JSContext *ctx, uint32_t *plen, JSValue val, BOOL is_array_ctor) { uint32_t tag, len; tag = JS_VALUE_GET_TAG(val); switch(tag) { case JS_TAG_INT: case JS_TAG_BOOL: case JS_TAG_NULL: { int v; v = JS_VALUE_GET_INT(val); if (v < 0) goto fail; len = v; } break; case JS_TAG_BIG_INT: { JSBigInt *p = JS_VALUE_GET_PTR(val); bf_t a; BOOL res; bf_get_int32((int32_t *)&len, &p->num, BF_GET_INT_MOD); bf_init(ctx->bf_ctx, &a); bf_set_ui(&a, len); res = bf_cmp_eq(&a, &p->num); bf_delete(&a); JS_FreeValue(ctx, val); if (!res) goto fail; } break; default: if (JS_TAG_IS_FLOAT64(tag)) { double d; d = JS_VALUE_GET_FLOAT64(val); if (!(d >= 0 && d <= UINT32_MAX)) goto fail; len = (uint32_t)d; if (len != d) goto fail; } else { uint32_t len1; if (is_array_ctor) { val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) return -1; /* cannot recurse because val is a number */ if (JS_ToArrayLengthFree(ctx, &len, val, TRUE)) return -1; } else { /* legacy behavior: must do the conversion twice and compare */ if (JS_ToUint32(ctx, &len, val)) { JS_FreeValue(ctx, val); return -1; } val = JS_ToNumberFree(ctx, val); if (JS_IsException(val)) return -1; /* cannot recurse because val is a number */ if (JS_ToArrayLengthFree(ctx, &len1, val, FALSE)) return -1; if (len1 != len) { fail: JS_ThrowRangeError(ctx, "invalid array length"); return -1; } } } break; } *plen = len; return 0; }
O1
c
JS_ToArrayLengthFree: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq %rdx, 0x8(%rsp) cmpl $0x3, %r15d jae 0x29fcf movl 0x8(%rsp), %eax testl %eax, %eax js 0x2a029 movl %eax, 0x4(%rsp) xorl %eax, %eax jmp 0x2a02e cmpl $-0x9, %r15d je 0x2a044 movq %rdx, %r12 cmpl $0x7, %r15d jne 0x2a0e0 movq %r12, %xmm0 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 movl $0x3, %eax jb 0x2a02e movsd 0x78b12(%rip), %xmm1 # 0xa2b10 ucomisd %xmm0, %xmm1 jb 0x2a02e cvttsd2si %xmm0, %rax movl %eax, 0x4(%rsp) movl %eax, %eax xorps %xmm1, %xmm1 cvtsi2sd %rax, %xmm1 cmpneqsd %xmm0, %xmm1 movq %xmm1, %rax andl $0x1, %eax leal (%rax,%rax,2), %eax jmp 0x2a02e movl $0x3, %eax testl %eax, %eax je 0x2a121 cmpl $0x3, %eax je 0x2a0c8 jmp 0x2a12a movq %r14, 0x18(%rsp) movq 0x8(%rsp), %r12 addq $0x8, %r12 leaq 0x4(%rsp), %r13 movq %r13, %rdi movq %r12, %rsi movl $0x1, %edx callq 0x8c819 movq 0x1d0(%rbx), %rdi leaq 0x20(%rsp), %r14 movq %r14, %rsi callq 0x88aac movl (%r13), %esi movq %r14, %rdi callq 0x88b17 movq %r14, %rdi movq %r12, %rsi callq 0x89551 movl %eax, %ebp movq (%r14), %rax testq %rax, %rax je 0x2a0ae movq 0x40(%rsp), %rsi testq %rsi, %rsi je 0x2a0ae movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x8(%rsp), %rsi movq 0x18(%rbx), %rdi movq %r15, %rdx callq 0x21922 testl %ebp, %ebp movq 0x18(%rsp), %r14 je 0x2a121 leaq 0x79347(%rip), %rsi # 0xa3416 movq %rbx, %rdi xorl %eax, %eax callq 0x24b39 movl $0xffffffff, %ebp # imm = 0xFFFFFFFF jmp 0x2a12a testl %r8d, %r8d je 0x2a13b movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx xorl %ecx, %ecx callq 0x46b7c movq %rdx, %rcx movq %rax, 0x8(%rsp) movl $0xffffffff, %ebp # imm = 0xFFFFFFFF cmpl $0x6, %ecx je 0x2a12a leaq 0x4(%rsp), %rsi movq %rbx, %rdi movq %rax, %rdx movl $0x1, %r8d callq 0x29f9d testl %eax, %eax jne 0x2a12a movl 0x4(%rsp), %eax movl %eax, (%r14) xorl %ebp, %ebp movl %ebp, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, 0x20(%rsp) cmpl $-0x9, %r15d jb 0x2a14d movq 0x20(%rsp), %rax incl (%rax) leaq 0x4(%rsp), %rsi movq %rbx, %rdi movq %r12, %rdx movq %r15, %rcx callq 0x2ba1f testl %eax, %eax je 0x2a178 movq 0x18(%rbx), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x21922 jmp 0x2a0d9 movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx xorl %ecx, %ecx callq 0x46b7c movq %rdx, %rcx movq %rax, 0x8(%rsp) movl $0xffffffff, %ebp # imm = 0xFFFFFFFF cmpl $0x6, %ecx je 0x2a12a leaq 0x14(%rsp), %rsi movq %rbx, %rdi movq %rax, %rdx xorl %r8d, %r8d callq 0x29f9d testl %eax, %eax jne 0x2a12a movl 0x14(%rsp), %eax cmpl 0x4(%rsp), %eax jne 0x2a0c8 jmp 0x2a121
JS_ToArrayLengthFree: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rcx mov r14, rsi mov rbx, rdi mov [rsp+78h+var_70], rdx cmp r15d, 3 jnb short loc_29FCF mov eax, dword ptr [rsp+78h+var_70] test eax, eax js short loc_2A029 mov [rsp+78h+var_74], eax xor eax, eax jmp short loc_2A02E loc_29FCF: cmp r15d, 0FFFFFFF7h jz short loc_2A044 mov r12, rdx cmp r15d, 7 jnz loc_2A0E0 movq xmm0, r12 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 mov eax, 3 jb short loc_2A02E movsd xmm1, cs:qword_A2B10 ucomisd xmm1, xmm0 jb short loc_2A02E cvttsd2si rax, xmm0 mov [rsp+78h+var_74], eax mov eax, eax xorps xmm1, xmm1 cvtsi2sd xmm1, rax cmpneqsd xmm1, xmm0 movq rax, xmm1 and eax, 1 lea eax, [rax+rax*2] jmp short loc_2A02E loc_2A029: mov eax, 3 loc_2A02E: test eax, eax jz loc_2A121 cmp eax, 3 jz loc_2A0C8 jmp loc_2A12A loc_2A044: mov [rsp+78h+var_60], r14 mov r12, [rsp+78h+var_70] add r12, 8 lea r13, [rsp+78h+var_74] mov rdi, r13 mov rsi, r12 mov edx, 1 call bf_get_int32 mov rdi, [rbx+1D0h] lea r14, [rsp+78h+var_58] mov rsi, r14 call bf_init mov esi, [r13+0] mov rdi, r14 call bf_set_ui mov rdi, r14 mov rsi, r12 call bf_cmp mov ebp, eax mov rax, [r14] test rax, rax jz short loc_2A0AE mov rsi, [rsp+78h+var_38] test rsi, rsi jz short loc_2A0AE mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_2A0AE: mov rsi, [rsp+78h+var_70] mov rdi, [rbx+18h] mov rdx, r15 call JS_FreeValueRT test ebp, ebp mov r14, [rsp+78h+var_60] jz short loc_2A121 loc_2A0C8: lea rsi, aInvalidArrayLe; "invalid array length" mov rdi, rbx xor eax, eax call JS_ThrowRangeError loc_2A0D9: mov ebp, 0FFFFFFFFh jmp short loc_2A12A loc_2A0E0: test r8d, r8d jz short loc_2A13B mov rdi, rbx mov rsi, r12 mov rdx, r15 xor ecx, ecx call JS_ToNumberHintFree mov rcx, rdx mov [rsp+78h+var_70], rax mov ebp, 0FFFFFFFFh cmp ecx, 6 jz short loc_2A12A lea rsi, [rsp+78h+var_74] mov rdi, rbx mov rdx, rax mov r8d, 1 call JS_ToArrayLengthFree test eax, eax jnz short loc_2A12A loc_2A121: mov eax, [rsp+78h+var_74] mov [r14], eax xor ebp, ebp loc_2A12A: mov eax, ebp add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2A13B: mov [rsp+78h+var_58], r12 cmp r15d, 0FFFFFFF7h jb short loc_2A14D mov rax, [rsp+78h+var_58] inc dword ptr [rax] loc_2A14D: lea rsi, [rsp+78h+var_74] mov rdi, rbx mov rdx, r12 mov rcx, r15 call JS_ToInt32Free test eax, eax jz short loc_2A178 mov rdi, [rbx+18h] mov rsi, r12 mov rdx, r15 call JS_FreeValueRT jmp loc_2A0D9 loc_2A178: mov rdi, rbx mov rsi, r12 mov rdx, r15 xor ecx, ecx call JS_ToNumberHintFree mov rcx, rdx mov [rsp+78h+var_70], rax mov ebp, 0FFFFFFFFh cmp ecx, 6 jz short loc_2A12A lea rsi, [rsp+78h+var_64] mov rdi, rbx mov rdx, rax xor r8d, r8d call JS_ToArrayLengthFree test eax, eax jnz loc_2A12A mov eax, [rsp+78h+var_64] cmp eax, [rsp+78h+var_74] jnz loc_2A0C8 jmp loc_2A121
long long JS_ToArrayLengthFree( long long a1, unsigned int *a2, _DWORD *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned int v14; // ebp unsigned int *v16; // r14 int v17; // eax __m128d v19; // xmm1 _DWORD *v20; // r12 int v21; // ebp _DWORD *v22; // rax long long v23; // rdx _DWORD *v25; // rax long long v26; // rdx char v27; // [rsp+0h] [rbp-78h] unsigned int v28; // [rsp+4h] [rbp-74h] BYREF _DWORD *v29; // [rsp+8h] [rbp-70h] int v30; // [rsp+14h] [rbp-64h] BYREF unsigned int *v31; // [rsp+18h] [rbp-60h] _QWORD v32[4]; // [rsp+20h] [rbp-58h] BYREF long long v33; // [rsp+40h] [rbp-38h] v16 = a2; v29 = a3; if ( (unsigned int)a4 < 3 ) { if ( (int)v29 < 0 ) { v17 = 3; } else { v28 = (unsigned int)v29; v17 = 0; } goto LABEL_10; } if ( (_DWORD)a4 == -9 ) { v31 = a2; v20 = v29 + 2; bf_get_int32(&v28, v29 + 2, 1LL); bf_init(*(_QWORD *)(a1 + 464), v32); bf_set_ui(v32, v28); v21 = bf_cmp(v32, v20); if ( v32[0] && v33 ) (*(void ( **)(_QWORD, long long, _QWORD))(v32[0] + 8LL))(*(_QWORD *)v32[0], v33, 0LL); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v29, a4); v16 = v31; if ( !v21 ) goto LABEL_22; goto LABEL_17; } if ( (_DWORD)a4 == 7 ) { a7 = (__m128)(unsigned long long)a3; a8 = 0LL; v17 = 3; if ( *(double *)&a3 >= 0.0 ) { a8 = (__m128)0x41EFFFFFFFE00000uLL; if ( *(double *)&a3 <= 4294967295.0 ) { v28 = (int)*(double *)&a3; v19 = 0LL; v19.m128d_f64[0] = (double)(int)*(double *)&a3; a8 = (__m128)_mm_cmpneq_sd(v19, (__m128d)(unsigned long long)a3); v17 = 3 * (a8.m128_i8[0] & 1); } } LABEL_10: if ( v17 ) { if ( v17 != 3 ) return v14; goto LABEL_17; } LABEL_22: *v16 = v28; return 0; } if ( !(_DWORD)a5 ) { v32[0] = a3; if ( (unsigned int)a4 >= 0xFFFFFFF7 ) ++*(_DWORD *)v32[0]; if ( (unsigned int)JS_ToInt32Free(a1, &v28) ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), a3, a4); return (unsigned int)-1; } v25 = (_DWORD *)JS_ToNumberHintFree(a1, a3, a4, 0LL); v29 = v25; v14 = -1; if ( (_DWORD)v26 == 6 || (unsigned int)JS_ToArrayLengthFree(a1, &v30, v25, v26, 0LL) ) return v14; if ( v30 == v28 ) goto LABEL_22; LABEL_17: JS_ThrowRangeError( a1, (long long)"invalid array length", (long long)a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v27); return (unsigned int)-1; } v22 = (_DWORD *)JS_ToNumberHintFree(a1, a3, a4, 0LL); v29 = v22; v14 = -1; if ( (_DWORD)v23 != 6 && !(unsigned int)JS_ToArrayLengthFree(a1, &v28, v22, v23, 1LL) ) goto LABEL_22; return v14; }
JS_ToArrayLengthFree: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RCX MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x8],RDX CMP R15D,0x3 JNC 0x00129fcf MOV EAX,dword ptr [RSP + 0x8] TEST EAX,EAX JS 0x0012a029 MOV dword ptr [RSP + 0x4],EAX XOR EAX,EAX JMP 0x0012a02e LAB_00129fcf: CMP R15D,-0x9 JZ 0x0012a044 MOV R12,RDX CMP R15D,0x7 JNZ 0x0012a0e0 MOVQ XMM0,R12 XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 MOV EAX,0x3 JC 0x0012a02e MOVSD XMM1,qword ptr [0x001a2b10] UCOMISD XMM1,XMM0 JC 0x0012a02e CVTTSD2SI RAX,XMM0 MOV dword ptr [RSP + 0x4],EAX MOV EAX,EAX XORPS XMM1,XMM1 CVTSI2SD XMM1,RAX CMPNEQSD XMM1,XMM0 MOVQ RAX,XMM1 AND EAX,0x1 LEA EAX,[RAX + RAX*0x2] JMP 0x0012a02e LAB_0012a029: MOV EAX,0x3 LAB_0012a02e: TEST EAX,EAX JZ 0x0012a121 CMP EAX,0x3 JZ 0x0012a0c8 JMP 0x0012a12a LAB_0012a044: MOV qword ptr [RSP + 0x18],R14 MOV R12,qword ptr [RSP + 0x8] ADD R12,0x8 LEA R13,[RSP + 0x4] MOV RDI,R13 MOV RSI,R12 MOV EDX,0x1 CALL 0x0018c819 MOV RDI,qword ptr [RBX + 0x1d0] LEA R14,[RSP + 0x20] MOV RSI,R14 CALL 0x00188aac MOV ESI,dword ptr [R13] MOV RDI,R14 CALL 0x00188b17 MOV RDI,R14 MOV RSI,R12 CALL 0x00189551 MOV EBP,EAX MOV RAX,qword ptr [R14] TEST RAX,RAX JZ 0x0012a0ae MOV RSI,qword ptr [RSP + 0x40] TEST RSI,RSI JZ 0x0012a0ae MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0012a0ae: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RBX + 0x18] MOV RDX,R15 CALL 0x00121922 TEST EBP,EBP MOV R14,qword ptr [RSP + 0x18] JZ 0x0012a121 LAB_0012a0c8: LEA RSI,[0x1a3416] MOV RDI,RBX XOR EAX,EAX CALL 0x00124b39 LAB_0012a0d9: MOV EBP,0xffffffff JMP 0x0012a12a LAB_0012a0e0: TEST R8D,R8D JZ 0x0012a13b MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 XOR ECX,ECX CALL 0x00146b7c MOV RCX,RDX MOV qword ptr [RSP + 0x8],RAX MOV EBP,0xffffffff CMP ECX,0x6 JZ 0x0012a12a LEA RSI,[RSP + 0x4] MOV RDI,RBX MOV RDX,RAX MOV R8D,0x1 CALL 0x00129f9d TEST EAX,EAX JNZ 0x0012a12a LAB_0012a121: MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [R14],EAX XOR EBP,EBP LAB_0012a12a: MOV EAX,EBP ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012a13b: MOV qword ptr [RSP + 0x20],R12 CMP R15D,-0x9 JC 0x0012a14d MOV RAX,qword ptr [RSP + 0x20] INC dword ptr [RAX] LAB_0012a14d: LEA RSI,[RSP + 0x4] MOV RDI,RBX MOV RDX,R12 MOV RCX,R15 CALL 0x0012ba1f TEST EAX,EAX JZ 0x0012a178 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R12 MOV RDX,R15 CALL 0x00121922 JMP 0x0012a0d9 LAB_0012a178: MOV RDI,RBX MOV RSI,R12 MOV RDX,R15 XOR ECX,ECX CALL 0x00146b7c MOV RCX,RDX MOV qword ptr [RSP + 0x8],RAX MOV EBP,0xffffffff CMP ECX,0x6 JZ 0x0012a12a LEA RSI,[RSP + 0x14] MOV RDI,RBX MOV RDX,RAX XOR R8D,R8D CALL 0x00129f9d TEST EAX,EAX JNZ 0x0012a12a MOV EAX,dword ptr [RSP + 0x14] CMP EAX,dword ptr [RSP + 0x4] JNZ 0x0012a0c8 JMP 0x0012a121
int4 JS_ToArrayLengthFree(long param_1,int *param_2,int *param_3,int8 param_4,int param_5) { char cVar1; int iVar2; int4 unaff_EBP; uint uVar3; int1 auVar4 [16]; int local_74; int *local_70; int local_64; int *local_60; int *local_58 [4]; long local_38; uVar3 = (uint)param_4; local_70 = param_3; if (uVar3 < 3) { local_70._0_4_ = (int)param_3; if ((int)local_70 < 0) { cVar1 = '\x03'; } else { local_74 = (int)local_70; cVar1 = '\0'; } } else { if (uVar3 == 0xfffffff7) { local_60 = param_2; bf_get_int32(&local_74,param_3 + 2,1); bf_init(*(int8 *)(param_1 + 0x1d0),local_58); bf_set_ui(local_58,local_74); iVar2 = bf_cmp(local_58,param_3 + 2); if ((local_58[0] != (int *)0x0) && (local_38 != 0)) { (**(code **)(local_58[0] + 2))(*(int8 *)local_58[0],local_38,0); } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_70,param_4); param_2 = local_60; if (iVar2 == 0) goto LAB_0012a121; goto LAB_0012a0c8; } if (uVar3 != 7) { if (param_5 == 0) { if (0xfffffff6 < uVar3) { *param_3 = *param_3 + 1; } local_58[0] = param_3; iVar2 = JS_ToInt32Free(param_1,&local_74,param_3,param_4); if (iVar2 != 0) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_3,param_4); return 0xffffffff; } auVar4 = JS_ToNumberHintFree(param_1,param_3,param_4,0); local_70 = auVar4._0_8_; if (auVar4._8_4_ == 6) { return 0xffffffff; } iVar2 = JS_ToArrayLengthFree(param_1,&local_64,local_70,auVar4._8_8_,0); if (iVar2 != 0) { return 0xffffffff; } if (local_64 != local_74) goto LAB_0012a0c8; } else { auVar4 = JS_ToNumberHintFree(param_1,param_3,param_4,0); local_70 = auVar4._0_8_; if (auVar4._8_4_ == 6) { return 0xffffffff; } iVar2 = JS_ToArrayLengthFree(param_1,&local_74,local_70,auVar4._8_8_,1); if (iVar2 != 0) { return 0xffffffff; } } goto LAB_0012a121; } cVar1 = '\x03'; if ((0.0 <= (double)param_3) && ((double)param_3 <= DAT_001a2b10)) { local_74 = (int)(long)(double)param_3; cVar1 = (-((double)((long)(double)param_3 & 0xffffffff) != (double)param_3) & 1U) * '\x03'; } } if (cVar1 == '\0') { LAB_0012a121: *param_2 = local_74; return 0; } if (cVar1 != '\x03') { return unaff_EBP; } LAB_0012a0c8: JS_ThrowRangeError(param_1,"invalid array length"); return 0xffffffff; }
28,590
pagecache_delete_by_link
eloqsql/storage/maria/ma_pagecache.c
my_bool pagecache_delete_by_link(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, enum pagecache_page_lock lock, my_bool flush) { my_bool error= 0; enum pagecache_page_pin pin= PAGECACHE_PIN_LEFT_PINNED; DBUG_ENTER("pagecache_delete_by_link"); DBUG_PRINT("enter", ("fd: %d block %p %s %s", block->hash_link->file.file, block, page_cache_page_lock_str[lock], page_cache_page_pin_str[pin])); DBUG_ASSERT(lock == PAGECACHE_LOCK_WRITE || lock == PAGECACHE_LOCK_LEFT_WRITELOCKED); DBUG_ASSERT(block->pins != 0); /* should be pinned */ if (pagecache->can_be_used) { pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (!pagecache->can_be_used) goto end; /* This block should be pinned (i.e. has not zero request counter) => Such block can't be chosen for eviction. */ DBUG_ASSERT((block->status & (PCBLOCK_IN_SWITCH | PCBLOCK_REASSIGNED)) == 0); /* This lock is deleted in pagecache_delete_internal() called below */ inc_counter_for_resize_op(pagecache); /* make_lock_and_pin() can't fail here, because we are keeping pin on the block and it can't be evicted (which is cause of lock fail and retry) */ if (make_lock_and_pin(pagecache, block, lock, pin, FALSE)) DBUG_ASSERT(0); /* get_present_hash_link() side effect emulation before call pagecache_delete_internal() */ block->hash_link->requests++; error= pagecache_delete_internal(pagecache, block, block->hash_link, flush); end: pagecache_pthread_mutex_unlock(&pagecache->cache_lock); } DBUG_RETURN(error); }
O0
c
pagecache_delete_by_link: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %cl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movb %al, -0x15(%rbp) movb $0x0, -0x16(%rbp) movl $0x0, -0x1c(%rbp) jmp 0x5b6a5 jmp 0x5b6a7 jmp 0x5b6a9 jmp 0x5b6ab jmp 0x5b6ad movq -0x8(%rbp), %rax cmpb $0x0, 0x1aa(%rax) je 0x5b753 movq -0x8(%rbp), %rdi addq $0xc8, %rdi leaq 0xff950(%rip), %rsi # 0x15b020 movl $0x1002, %edx # imm = 0x1002 callq 0x59200 movq -0x8(%rbp), %rax cmpb $0x0, 0x1aa(%rax) jne 0x5b6e9 jmp 0x5b743 jmp 0x5b6eb jmp 0x5b6ed movq -0x8(%rbp), %rdi callq 0x595b0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movl -0x1c(%rbp), %ecx xorl %r8d, %r8d callq 0x59fc0 cmpb $0x0, %al je 0x5b716 jmp 0x5b712 jmp 0x5b714 jmp 0x5b716 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movl 0x68(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x68(%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx movsbl -0x15(%rbp), %ecx callq 0x5b770 movb %al, -0x16(%rbp) movq -0x8(%rbp), %rdi addq $0xc8, %rdi callq 0x59270 jmp 0x5b755 movb -0x16(%rbp), %al movb %al, -0x1d(%rbp) movb -0x1d(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
pagecache_delete_by_link: push rbp mov rbp, rsp sub rsp, 20h mov al, cl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_15], al mov [rbp+var_16], 0 mov [rbp+var_1C], 0 jmp short $+2 loc_5B6A5: jmp short $+2 loc_5B6A7: jmp short $+2 loc_5B6A9: jmp short $+2 loc_5B6AB: jmp short $+2 loc_5B6AD: mov rax, [rbp+var_8] cmp byte ptr [rax+1AAh], 0 jz loc_5B753 mov rdi, [rbp+var_8] add rdi, 0C8h lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1002h call inline_mysql_mutex_lock_8 mov rax, [rbp+var_8] cmp byte ptr [rax+1AAh], 0 jnz short loc_5B6E9 jmp short loc_5B743 loc_5B6E9: jmp short $+2 loc_5B6EB: jmp short $+2 loc_5B6ED: mov rdi, [rbp+var_8] call inc_counter_for_resize_op mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov ecx, [rbp+var_1C] xor r8d, r8d call make_lock_and_pin cmp al, 0 jz short loc_5B716 jmp short $+2 loc_5B712: jmp short $+2 loc_5B714: jmp short $+2 loc_5B716: mov rax, [rbp+var_10] mov rax, [rax+20h] mov ecx, [rax+68h] add ecx, 1 mov [rax+68h], ecx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] mov rdx, [rax+20h] movsx ecx, [rbp+var_15] call pagecache_delete_internal mov [rbp+var_16], al loc_5B743: mov rdi, [rbp+var_8] add rdi, 0C8h call inline_mysql_mutex_unlock_8 loc_5B753: jmp short $+2 loc_5B755: mov al, [rbp+var_16] mov [rbp+var_1D], al mov al, [rbp+var_1D] add rsp, 20h pop rbp retn
char pagecache_delete_by_link(long long a1, long long a2, int a3, char a4) { char v5; // [rsp+Ah] [rbp-16h] v5 = 0; if ( *(_BYTE *)(a1 + 426) ) { inline_mysql_mutex_lock_8( a1 + 200, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x1002u); if ( *(_BYTE *)(a1 + 426) ) { inc_counter_for_resize_op(a1); make_lock_and_pin(a1, a2, a3, 0, 0); ++*(_DWORD *)(*(_QWORD *)(a2 + 32) + 104LL); v5 = pagecache_delete_internal(a1, a2, *(_QWORD *)(a2 + 32), (unsigned int)a4); } inline_mysql_mutex_unlock_8(a1 + 200); } return v5; }
pagecache_delete_by_link: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,CL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV byte ptr [RBP + -0x15],AL MOV byte ptr [RBP + -0x16],0x0 MOV dword ptr [RBP + -0x1c],0x0 JMP 0x0015b6a5 LAB_0015b6a5: JMP 0x0015b6a7 LAB_0015b6a7: JMP 0x0015b6a9 LAB_0015b6a9: JMP 0x0015b6ab LAB_0015b6ab: JMP 0x0015b6ad LAB_0015b6ad: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x1aa],0x0 JZ 0x0015b753 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 LEA RSI,[0x25b020] MOV EDX,0x1002 CALL 0x00159200 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x1aa],0x0 JNZ 0x0015b6e9 JMP 0x0015b743 LAB_0015b6e9: JMP 0x0015b6eb LAB_0015b6eb: JMP 0x0015b6ed LAB_0015b6ed: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001595b0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV ECX,dword ptr [RBP + -0x1c] XOR R8D,R8D CALL 0x00159fc0 CMP AL,0x0 JZ 0x0015b716 JMP 0x0015b712 LAB_0015b712: JMP 0x0015b714 LAB_0015b714: JMP 0x0015b716 LAB_0015b716: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV ECX,dword ptr [RAX + 0x68] ADD ECX,0x1 MOV dword ptr [RAX + 0x68],ECX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x20] MOVSX ECX,byte ptr [RBP + -0x15] CALL 0x0015b770 MOV byte ptr [RBP + -0x16],AL LAB_0015b743: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 CALL 0x00159270 LAB_0015b753: JMP 0x0015b755 LAB_0015b755: MOV AL,byte ptr [RBP + -0x16] MOV byte ptr [RBP + -0x1d],AL MOV AL,byte ptr [RBP + -0x1d] ADD RSP,0x20 POP RBP RET
int1 pagecache_delete_by_link(long param_1,long param_2,int4 param_3,char param_4) { int1 local_1e; local_1e = 0; if (*(char *)(param_1 + 0x1aa) != '\0') { inline_mysql_mutex_lock (param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c" ,0x1002); if (*(char *)(param_1 + 0x1aa) != '\0') { inc_counter_for_resize_op(param_1); make_lock_and_pin(param_1,param_2,param_3,0,0); *(int *)(*(long *)(param_2 + 0x20) + 0x68) = *(int *)(*(long *)(param_2 + 0x20) + 0x68) + 1; local_1e = pagecache_delete_internal (param_1,param_2,*(int8 *)(param_2 + 0x20),(int)param_4); } inline_mysql_mutex_unlock(param_1 + 200); } return local_1e; }
28,591
my_wildcmp_8bit_impl
eloqsql/strings/ctype-simple.c
static int my_wildcmp_8bit_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, int recurse_level) { int result= -1; /* Not found, using wildcards */ if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (*wildstr != w_many && *wildstr != w_one) { if (*wildstr == escape && wildstr+1 != wildend) wildstr++; if (str == str_end || likeconv(cs,*wildstr++) != likeconv(cs,*str++)) return(1); /* No match */ if (wildstr == wildend) return(str != str_end); /* Match if both are at end */ result=1; /* Found an anchor char */ } if (*wildstr == w_one) { do { if (str == str_end) /* Skip one char if possible */ return(result); INC_PTR(cs,str,str_end); } while (++wildstr < wildend && *wildstr == w_one); if (wildstr == wildend) break; } if (*wildstr == w_many) { /* Found w_many */ uchar cmp; wildstr++; /* Remove any '%' and '_' from the wild search string */ for (; wildstr != wildend ; wildstr++) { if (*wildstr == w_many) continue; if (*wildstr == w_one) { if (str == str_end) return(-1); INC_PTR(cs,str,str_end); continue; } break; /* Not a wild character */ } if (wildstr == wildend) return(0); /* Ok if w_many is last */ if (str == str_end) return(-1); if ((cmp= *wildstr) == escape && wildstr+1 != wildend) cmp= *++wildstr; INC_PTR(cs,wildstr,wildend); /* This is compared trough cmp */ cmp=likeconv(cs,cmp); do { /* Find the next character in the subject string equal to 'cmp', then check recursively my_wildcmp_8bit_impl() for the pattern remainder. */ while (str != str_end && (uchar) likeconv(cs,*str) != cmp) str++; if (str++ == str_end) return(-1); /* 'cmp' was not found in the subject string */ { int tmp=my_wildcmp_8bit_impl(cs,str,str_end, wildstr,wildend,escape,w_one, w_many, recurse_level+1); if (tmp <= 0) return(tmp); } /* The recursion call did not match. But it returned 1, which means the pattern remainder has some non-special characters. Continue, there is a chance that we'll find another 'cmp' at a different position in the subject string. */ } while (str != str_end); return(-1); } } return(str != str_end ? 1 : 0); }
O0
c
my_wildcmp_8bit_impl: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movl 0x20(%rbp), %eax movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF leaq 0x34a1d9(%rip), %rax # 0x391500 cmpq $0x0, (%rax) je 0x4734d leaq 0x34a1cc(%rip), %rax # 0x391500 movq (%rax), %rax movl 0x20(%rbp), %edi callq *%rax cmpl $0x0, %eax je 0x4734d movl $0x1, -0x4(%rbp) jmp 0x4767a jmp 0x4734f movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x47662 jmp 0x4735f movq -0x28(%rbp), %rax movsbl (%rax), %ecx xorl %eax, %eax cmpl 0x18(%rbp), %ecx movb %al, -0x41(%rbp) je 0x47380 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax setne %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x4738c jmp 0x47436 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl -0x34(%rbp), %eax jne 0x473b2 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x473b2 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax je 0x473fc movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x28(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movq -0x10(%rbp), %rcx movq 0x58(%rcx), %rcx movq -0x18(%rbp), %rdx movq %rdx, %rsi addq $0x1, %rsi movq %rsi, -0x18(%rbp) movzbl (%rdx), %edx movzbl (%rcx,%rdx), %ecx cmpl %ecx, %eax je 0x47408 movl $0x1, -0x4(%rbp) jmp 0x4767a movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x4742a movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) jmp 0x4767a movl $0x1, -0x38(%rbp) jmp 0x4735f movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x474a4 jmp 0x47444 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x47459 movl -0x38(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x4767a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x28(%rbp), %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) xorl %eax, %eax cmpq -0x30(%rbp), %rcx movb %al, -0x42(%rbp) jae 0x4748c movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax sete %al movb %al, -0x42(%rbp) movb -0x42(%rbp), %al testb $0x1, %al jne 0x47444 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x474a2 jmp 0x47662 jmp 0x474a4 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x4765d movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax je 0x47518 movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x18(%rbp), %eax jne 0x474d8 jmp 0x4750a movq -0x28(%rbp), %rax movsbl (%rax), %eax cmpl 0x10(%rbp), %eax jne 0x47508 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x474fa movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x4767a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x4750a jmp 0x47518 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x474c0 movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jne 0x4752e movl $0x0, -0x4(%rbp) jmp 0x4767a movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x47544 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x4767a movq -0x28(%rbp), %rax movb (%rax), %al movb %al, -0x39(%rbp) movzbl %al, %eax cmpl -0x34(%rbp), %eax jne 0x47578 movq -0x28(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x47578 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb 0x1(%rax), %al movb %al, -0x39(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movzbl -0x39(%rbp), %ecx movb (%rax,%rcx), %al movb %al, -0x39(%rbp) jmp 0x47598 movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x43(%rbp) je 0x475c6 movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzbl (%rax,%rcx), %eax movzbl -0x39(%rbp), %ecx cmpl %ecx, %eax setne %al movb %al, -0x43(%rbp) movb -0x43(%rbp), %al testb $0x1, %al jne 0x475cf jmp 0x475dd movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x47598 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) cmpq -0x20(%rbp), %rax jne 0x475fb movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x4767a movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rcx movq -0x30(%rbp), %r8 movl -0x34(%rbp), %r9d movl 0x10(%rbp), %r11d movl 0x18(%rbp), %r10d movl 0x20(%rbp), %eax addl $0x1, %eax movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) movl %eax, 0x10(%rsp) callq 0x472f0 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jg 0x47644 movl -0x40(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x4767a jmp 0x47646 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x47596 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x4767a jmp 0x4734f movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rsi xorl %eax, %eax movl $0x1, %ecx cmpq %rsi, %rdx cmovnel %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_wildcmp_8bit_impl: push rbp mov rbp, rsp sub rsp, 60h mov eax, [rbp+arg_10] mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov [rbp+var_38], 0FFFFFFFFh lea rax, my_string_stack_guard cmp qword ptr [rax], 0 jz short loc_4734D lea rax, my_string_stack_guard mov rax, [rax] mov edi, [rbp+arg_10] call rax cmp eax, 0 jz short loc_4734D mov [rbp+var_4], 1 jmp loc_4767A loc_4734D: jmp short $+2 loc_4734F: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz loc_47662 jmp short $+2 loc_4735F: mov rax, [rbp+var_28] movsx ecx, byte ptr [rax] xor eax, eax cmp ecx, [rbp+arg_8] mov [rbp+var_41], al jz short loc_47380 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setnz al mov [rbp+var_41], al loc_47380: mov al, [rbp+var_41] test al, 1 jnz short loc_4738C jmp loc_47436 loc_4738C: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+var_34] jnz short loc_473B2 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_473B2 mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_473B2: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jz short loc_473FC mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_28] mov rdx, rcx add rdx, 1 mov [rbp+var_28], rdx movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_10] mov rcx, [rcx+58h] mov rdx, [rbp+var_18] mov rsi, rdx add rsi, 1 mov [rbp+var_18], rsi movzx edx, byte ptr [rdx] movzx ecx, byte ptr [rcx+rdx] cmp eax, ecx jz short loc_47408 loc_473FC: mov [rbp+var_4], 1 jmp loc_4767A loc_47408: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_4742A mov rax, [rbp+var_18] cmp rax, [rbp+var_20] setnz al and al, 1 movzx eax, al mov [rbp+var_4], eax jmp loc_4767A loc_4742A: mov [rbp+var_38], 1 jmp loc_4735F loc_47436: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_474A4 jmp short $+2 loc_47444: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_47459 mov eax, [rbp+var_38] mov [rbp+var_4], eax jmp loc_4767A loc_47459: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rcx, [rbp+var_28] add rcx, 1 mov [rbp+var_28], rcx xor eax, eax cmp rcx, [rbp+var_30] mov [rbp+var_42], al jnb short loc_4748C mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] setz al mov [rbp+var_42], al loc_4748C: mov al, [rbp+var_42] test al, 1 jnz short loc_47444 mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_474A2 jmp loc_47662 loc_474A2: jmp short $+2 loc_474A4: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz loc_4765D mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_474C0: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jz short loc_47518 mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_8] jnz short loc_474D8 jmp short loc_4750A loc_474D8: mov rax, [rbp+var_28] movsx eax, byte ptr [rax] cmp eax, [rbp+arg_0] jnz short loc_47508 mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_474FA mov [rbp+var_4], 0FFFFFFFFh jmp loc_4767A loc_474FA: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_4750A loc_47508: jmp short loc_47518 loc_4750A: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_474C0 loc_47518: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnz short loc_4752E mov [rbp+var_4], 0 jmp loc_4767A loc_4752E: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz short loc_47544 mov [rbp+var_4], 0FFFFFFFFh jmp loc_4767A loc_47544: mov rax, [rbp+var_28] mov al, [rax] mov [rbp+var_39], al movzx eax, al cmp eax, [rbp+var_34] jnz short loc_47578 mov rax, [rbp+var_28] add rax, 1 cmp rax, [rbp+var_30] jz short loc_47578 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov al, [rax+1] mov [rbp+var_39], al loc_47578: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+58h] movzx ecx, [rbp+var_39] mov al, [rax+rcx] mov [rbp+var_39], al loc_47596: jmp short $+2 loc_47598: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_43], al jz short loc_475C6 mov rax, [rbp+var_10] mov rax, [rax+58h] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_39] cmp eax, ecx setnz al mov [rbp+var_43], al loc_475C6: mov al, [rbp+var_43] test al, 1 jnz short loc_475CF jmp short loc_475DD loc_475CF: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_47598 loc_475DD: mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx cmp rax, [rbp+var_20] jnz short loc_475FB mov [rbp+var_4], 0FFFFFFFFh jmp short loc_4767A loc_475FB: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rcx, [rbp+var_28] mov r8, [rbp+var_30] mov r9d, [rbp+var_34] mov r11d, [rbp+arg_0] mov r10d, [rbp+arg_8] mov eax, [rbp+arg_10] add eax, 1 mov [rsp+60h+var_60], r11d mov [rsp+60h+var_58], r10d mov [rsp+60h+var_50], eax call my_wildcmp_8bit_impl mov [rbp+var_40], eax cmp [rbp+var_40], 0 jg short loc_47644 mov eax, [rbp+var_40] mov [rbp+var_4], eax jmp short loc_4767A loc_47644: jmp short $+2 loc_47646: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnz loc_47596 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_4767A loc_4765D: jmp loc_4734F loc_47662: mov rdx, [rbp+var_18] mov rsi, [rbp+var_20] xor eax, eax mov ecx, 1 cmp rdx, rsi cmovnz eax, ecx mov [rbp+var_4], eax loc_4767A: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long my_wildcmp_8bit_impl( long long a1, unsigned __int8 *a2, unsigned __int8 *a3, char *a4, char *a5, int a6, int a7, int a8, unsigned int a9) { char *v9; // rcx unsigned __int8 *v10; // rdx char *v11; // rax unsigned __int8 *v12; // rax bool v14; // [rsp+1Dh] [rbp-43h] bool v15; // [rsp+1Eh] [rbp-42h] bool v16; // [rsp+1Fh] [rbp-41h] int v17; // [rsp+20h] [rbp-40h] unsigned __int8 v18; // [rsp+27h] [rbp-39h] unsigned __int8 v19; // [rsp+27h] [rbp-39h] unsigned int v20; // [rsp+28h] [rbp-38h] char *i; // [rsp+38h] [rbp-28h] int v25; // [rsp+38h] [rbp-28h] v20 = -1; if ( my_string_stack_guard && (unsigned int)my_string_stack_guard(a9) ) { return 1; } else { do { if ( a4 != a5 ) { while ( 1 ) { v16 = 0; if ( *a4 != a8 ) v16 = *a4 != a7; if ( !v16 ) break; if ( *a4 == a6 && a4 + 1 != a5 ) ++a4; if ( a2 == a3 ) return 1; v9 = a4++; v10 = a2++; if ( *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + (unsigned __int8)*v9) != *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *v10) ) return 1; if ( a4 == a5 ) return a2 != a3; v20 = 1; } if ( *a4 != a7 ) continue; do { if ( a2 == a3 ) return v20; ++a2; ++a4; v15 = 0; if ( a4 < a5 ) v15 = *a4 == a7; } while ( v15 ); if ( a4 != a5 ) continue; } return a2 != a3; } while ( *a4 != a8 ); for ( i = a4 + 1; i != a5; ++i ) { if ( *i != a8 ) { if ( *i != a7 ) break; if ( a2 == a3 ) return (unsigned int)-1; ++a2; } } if ( i == a5 ) { return 0; } else if ( a2 == a3 ) { return (unsigned int)-1; } else { v18 = *i; if ( (unsigned __int8)*i == a6 && i + 1 != a5 ) { v11 = i; LODWORD(i) = (_DWORD)i + 1; v18 = v11[1]; } v25 = (_DWORD)i + 1; v19 = *(_BYTE *)(*(_QWORD *)(a1 + 88) + v18); do { while ( 1 ) { v14 = 0; if ( a2 != a3 ) v14 = *(unsigned __int8 *)(*(_QWORD *)(a1 + 88) + *a2) != v19; if ( !v14 ) break; ++a2; } v12 = a2++; if ( v12 == a3 ) return (unsigned int)-1; v17 = my_wildcmp_8bit_impl(a1, (_DWORD)a2, (_DWORD)a3, v25, (_DWORD)a5, a6, a7, a8, a9 + 1); if ( v17 <= 0 ) return (unsigned int)v17; } while ( a2 != a3 ); return (unsigned int)-1; } } }
my_wildcmp_8bit_impl: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV EAX,dword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV dword ptr [RBP + -0x38],0xffffffff LEA RAX,[0x491500] CMP qword ptr [RAX],0x0 JZ 0x0014734d LEA RAX,[0x491500] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + 0x20] CALL RAX CMP EAX,0x0 JZ 0x0014734d MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014767a LAB_0014734d: JMP 0x0014734f LAB_0014734f: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x00147662 JMP 0x0014735f LAB_0014735f: MOV RAX,qword ptr [RBP + -0x28] MOVSX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,dword ptr [RBP + 0x18] MOV byte ptr [RBP + -0x41],AL JZ 0x00147380 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETNZ AL MOV byte ptr [RBP + -0x41],AL LAB_00147380: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0014738c JMP 0x00147436 LAB_0014738c: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + -0x34] JNZ 0x001473b2 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x001473b2 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_001473b2: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JZ 0x001473fc MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x28] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x58] MOV RDX,qword ptr [RBP + -0x18] MOV RSI,RDX ADD RSI,0x1 MOV qword ptr [RBP + -0x18],RSI MOVZX EDX,byte ptr [RDX] MOVZX ECX,byte ptr [RCX + RDX*0x1] CMP EAX,ECX JZ 0x00147408 LAB_001473fc: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014767a LAB_00147408: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014742a MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x4],EAX JMP 0x0014767a LAB_0014742a: MOV dword ptr [RBP + -0x38],0x1 JMP 0x0014735f LAB_00147436: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x001474a4 JMP 0x00147444 LAB_00147444: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00147459 MOV EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014767a LAB_00147459: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x28] ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x30] MOV byte ptr [RBP + -0x42],AL JNC 0x0014748c MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] SETZ AL MOV byte ptr [RBP + -0x42],AL LAB_0014748c: MOV AL,byte ptr [RBP + -0x42] TEST AL,0x1 JNZ 0x00147444 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001474a2 JMP 0x00147662 LAB_001474a2: JMP 0x001474a4 LAB_001474a4: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x0014765d MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_001474c0: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JZ 0x00147518 MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x18] JNZ 0x001474d8 JMP 0x0014750a LAB_001474d8: MOV RAX,qword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX] CMP EAX,dword ptr [RBP + 0x10] JNZ 0x00147508 MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001474fa MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0014767a LAB_001474fa: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0014750a LAB_00147508: JMP 0x00147518 LAB_0014750a: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x001474c0 LAB_00147518: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014752e MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014767a LAB_0014752e: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00147544 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0014767a LAB_00147544: MOV RAX,qword ptr [RBP + -0x28] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x39],AL MOVZX EAX,AL CMP EAX,dword ptr [RBP + -0x34] JNZ 0x00147578 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x00147578 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV AL,byte ptr [RAX + 0x1] MOV byte ptr [RBP + -0x39],AL LAB_00147578: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOVZX ECX,byte ptr [RBP + -0x39] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x39],AL LAB_00147596: JMP 0x00147598 LAB_00147598: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x43],AL JZ 0x001475c6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,byte ptr [RBP + -0x39] CMP EAX,ECX SETNZ AL MOV byte ptr [RBP + -0x43],AL LAB_001475c6: MOV AL,byte ptr [RBP + -0x43] TEST AL,0x1 JNZ 0x001475cf JMP 0x001475dd LAB_001475cf: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00147598 LAB_001475dd: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX CMP RAX,qword ptr [RBP + -0x20] JNZ 0x001475fb MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0014767a LAB_001475fb: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x28] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x34] MOV R11D,dword ptr [RBP + 0x10] MOV R10D,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x20] ADD EAX,0x1 MOV dword ptr [RSP],R11D MOV dword ptr [RSP + 0x8],R10D MOV dword ptr [RSP + 0x10],EAX CALL 0x001472f0 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JG 0x00147644 MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x4],EAX JMP 0x0014767a LAB_00147644: JMP 0x00147646 LAB_00147646: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00147596 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0014767a LAB_0014765d: JMP 0x0014734f LAB_00147662: MOV RDX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] XOR EAX,EAX MOV ECX,0x1 CMP RDX,RSI CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_0014767a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
uint my_wildcmp_8bit_impl (long param_1,byte *param_2,byte *param_3,byte *param_4,byte *param_5,uint param_6, int param_7,int param_8,int param_9) { char cVar1; int iVar2; uint uVar3; byte *pbVar4; bool bVar5; byte local_41; uint local_40; byte *local_30; byte *local_20; uint local_c; local_40 = 0xffffffff; local_30 = param_4; local_20 = param_2; if ((my_string_stack_guard == (code *)0x0) || (iVar2 = (*my_string_stack_guard)(param_9), iVar2 == 0)) { do { if (local_30 == param_5) { LAB_00147662: return (uint)(local_20 != param_3); } while( true ) { bVar5 = false; if ((char)*local_30 != param_8) { bVar5 = (char)*local_30 != param_7; } if (!bVar5) break; if (((int)(char)*local_30 == param_6) && (local_30 + 1 != param_5)) { local_30 = local_30 + 1; } if (local_20 == param_3) { return 1; } if (*(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_30) != *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20)) { return 1; } if (local_30 + 1 == param_5) { return (uint)(local_20 + 1 != param_3); } local_40 = 1; local_30 = local_30 + 1; local_20 = local_20 + 1; } if ((char)*local_30 == param_7) { do { if (local_20 == param_3) { return local_40; } local_20 = local_20 + 1; local_30 = local_30 + 1; bVar5 = false; if (local_30 < param_5) { bVar5 = (char)*local_30 == param_7; } } while (bVar5); if (local_30 == param_5) goto LAB_00147662; } } while ((char)*local_30 != param_8); while (pbVar4 = local_30, local_30 = pbVar4 + 1, local_30 != param_5) { if ((char)*local_30 != param_8) { if ((char)*local_30 != param_7) break; if (local_20 == param_3) { return 0xffffffff; } local_20 = local_20 + 1; } } if (local_30 == param_5) { local_c = 0; } else if (local_20 == param_3) { local_c = 0xffffffff; } else { local_41 = *local_30; if ((local_41 == param_6) && (pbVar4 + 2 != param_5)) { local_30 = pbVar4 + 2; local_41 = pbVar4[2]; } cVar1 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)local_41); do { while( true ) { bVar5 = false; if (local_20 != param_3) { bVar5 = *(char *)(*(long *)(param_1 + 0x58) + (ulong)*local_20) != cVar1; } if (!bVar5) break; local_20 = local_20 + 1; } pbVar4 = local_20 + 1; if (local_20 == param_3) { return 0xffffffff; } uVar3 = my_wildcmp_8bit_impl (param_1,pbVar4,param_3,local_30 + 1,param_5,param_6,param_7,param_8, param_9 + 1); if ((int)uVar3 < 1) { return uVar3; } local_20 = pbVar4; } while (pbVar4 != param_3); local_c = 0xffffffff; } } else { local_c = 1; } return local_c; }
28,592
cr_op
bluesky950520[P]quickjs/libunicode.c
int cr_op(CharRange *cr, const uint32_t *a_pt, int a_len, const uint32_t *b_pt, int b_len, int op) { int a_idx, b_idx, is_in; uint32_t v; a_idx = 0; b_idx = 0; for(;;) { /* get one more point from a or b in increasing order */ if (a_idx < a_len && b_idx < b_len) { if (a_pt[a_idx] < b_pt[b_idx]) { goto a_add; } else if (a_pt[a_idx] == b_pt[b_idx]) { v = a_pt[a_idx]; a_idx++; b_idx++; } else { goto b_add; } } else if (a_idx < a_len) { a_add: v = a_pt[a_idx++]; } else if (b_idx < b_len) { b_add: v = b_pt[b_idx++]; } else { break; } /* add the point if the in/out status changes */ switch(op) { case CR_OP_UNION: is_in = (a_idx & 1) | (b_idx & 1); break; case CR_OP_INTER: is_in = (a_idx & 1) & (b_idx & 1); break; case CR_OP_XOR: is_in = (a_idx & 1) ^ (b_idx & 1); break; default: abort(); } if (is_in != (cr->len & 1)) { if (cr_add_point(cr, v)) return -1; } } cr_compress(cr); return 0; }
O3
c
cr_op: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, %r12d movl %edx, %r15d movq %rsi, %r11 movq %rdi, %r13 xorl %r14d, %r14d xorl %ebx, %ebx movq %rsi, 0x10(%rsp) cmpl %r15d, %r14d setl %al cmpl %r12d, %ebx setl %sil andb %al, %sil cmpb $0x1, %sil jne 0x9a415 movslq %r14d, %rax movl (%r11,%rax,4), %ebp movslq %ebx, %rax movl (%rcx,%rax,4), %eax cmpl %eax, %ebp jb 0x9a421 jne 0x9a435 incl %r14d incl %ebx jmp 0x9a439 cmpl %r15d, %r14d jge 0x9a426 movslq %r14d, %rax movl (%r11,%rax,4), %ebp incl %r14d jmp 0x9a439 cmpl %r12d, %ebx jge 0x9a4c8 movslq %ebx, %rax movl (%rcx,%rax,4), %eax incl %ebx movl %eax, %ebp cmpl $0x2, %r9d je 0x9a45c cmpl $0x1, %r9d je 0x9a455 testl %r9d, %r9d jne 0x9a4e8 movl %ebx, %eax orl %r14d, %eax jmp 0x9a461 movl %r14d, %eax andl %ebx, %eax jmp 0x9a461 movl %ebx, %eax xorl %r14d, %eax andl $0x1, %eax movl (%r13), %esi movl %esi, %r10d andl $0x1, %r10d cmpl %r10d, %eax je 0x9a3e5 cmpl 0x4(%r13), %esi jl 0x9a4b1 movl %ebp, 0x8(%rsp) movl %ebx, 0xc(%rsp) movl %r9d, %ebp movq %rcx, %rbx incl %esi movq %r13, %rdi callq 0x9a333 testl %eax, %eax jne 0x9a4d4 movl (%r13), %esi movq %rbx, %rcx movl %ebp, %r9d movq 0x10(%rsp), %r11 movl 0xc(%rsp), %ebx movl 0x8(%rsp), %ebp movq 0x8(%r13), %rax leal 0x1(%rsi), %r10d movl %r10d, (%r13) movslq %esi, %rsi movl %ebp, (%rax,%rsi,4) jmp 0x9a3e5 movq %r13, %rdi callq 0x9a4ed xorl %eax, %eax jmp 0x9a4d9 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xe090
cr_op: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12d, r8d mov r15d, edx mov r11, rsi mov r13, rdi xor r14d, r14d xor ebx, ebx mov [rsp+48h+var_38], rsi loc_9A3E5: cmp r14d, r15d setl al cmp ebx, r12d setl sil and sil, al cmp sil, 1 jnz short loc_9A415 movsxd rax, r14d mov ebp, [r11+rax*4] movsxd rax, ebx mov eax, [rcx+rax*4] cmp ebp, eax jb short loc_9A421 jnz short loc_9A435 inc r14d inc ebx jmp short loc_9A439 loc_9A415: cmp r14d, r15d jge short loc_9A426 movsxd rax, r14d mov ebp, [r11+rax*4] loc_9A421: inc r14d jmp short loc_9A439 loc_9A426: cmp ebx, r12d jge loc_9A4C8 movsxd rax, ebx mov eax, [rcx+rax*4] loc_9A435: inc ebx mov ebp, eax loc_9A439: cmp r9d, 2 jz short loc_9A45C cmp r9d, 1 jz short loc_9A455 test r9d, r9d jnz loc_9A4E8 mov eax, ebx or eax, r14d jmp short loc_9A461 loc_9A455: mov eax, r14d and eax, ebx jmp short loc_9A461 loc_9A45C: mov eax, ebx xor eax, r14d loc_9A461: and eax, 1 mov esi, [r13+0] mov r10d, esi and r10d, 1 cmp eax, r10d jz loc_9A3E5 cmp esi, [r13+4] jl short loc_9A4B1 mov [rsp+48h+var_40], ebp mov [rsp+48h+var_3C], ebx mov ebp, r9d mov rbx, rcx inc esi mov rdi, r13 call cr_realloc test eax, eax jnz short loc_9A4D4 mov esi, [r13+0] mov rcx, rbx mov r9d, ebp mov r11, [rsp+48h+var_38] mov ebx, [rsp+48h+var_3C] mov ebp, [rsp+48h+var_40] loc_9A4B1: mov rax, [r13+8] lea r10d, [rsi+1] mov [r13+0], r10d movsxd rsi, esi mov [rax+rsi*4], ebp jmp loc_9A3E5 loc_9A4C8: mov rdi, r13 call cr_compress xor eax, eax jmp short loc_9A4D9 loc_9A4D4: mov eax, 0FFFFFFFFh loc_9A4D9: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9A4E8: call _abort
long long cr_op(const char *a1, long long a2, int a3, long long a4, int a5, int a6) { long long v8; // r11 long long v9; // r13 int v10; // r14d int v11; // ebx unsigned int v12; // ebp unsigned int v13; // eax char v14; // al int v15; // esi int v16; // ebp long long v17; // rbx long long v18; // rax unsigned int v20; // [rsp+8h] [rbp-40h] int v21; // [rsp+Ch] [rbp-3Ch] v8 = a2; v9 = (long long)a1; v10 = 0; v11 = 0; while ( 1 ) { do { if ( v10 < a3 && v11 < a5 ) { v12 = *(_DWORD *)(v8 + 4LL * v10); v13 = *(_DWORD *)(a4 + 4LL * v11); if ( v12 < v13 ) goto LABEL_8; if ( v12 == v13 ) { ++v10; ++v11; goto LABEL_12; } } else { if ( v10 < a3 ) { v12 = *(_DWORD *)(v8 + 4LL * v10); LABEL_8: ++v10; goto LABEL_12; } if ( v11 >= a5 ) { cr_compress(v9); return 0LL; } v13 = *(_DWORD *)(a4 + 4LL * v11); } ++v11; v12 = v13; LABEL_12: if ( a6 == 2 ) { v14 = v10 ^ v11; } else if ( a6 == 1 ) { v14 = v11 & v10; } else { if ( a6 ) abort(a1); v14 = v10 | v11; } v15 = *(_DWORD *)v9; } while ( (v14 & 1) == (*(_DWORD *)v9 & 1) ); if ( v15 < *(_DWORD *)(v9 + 4) ) goto LABEL_22; v20 = v12; v21 = v11; v16 = a6; v17 = a4; a1 = (const char *)v9; if ( (unsigned int)cr_realloc(v9, v15 + 1) ) return 0xFFFFFFFFLL; v15 = *(_DWORD *)v9; a4 = v17; a6 = v16; v8 = a2; v11 = v21; v12 = v20; LABEL_22: v18 = *(_QWORD *)(v9 + 8); *(_DWORD *)v9 = v15 + 1; *(_DWORD *)(v18 + 4LL * v15) = v12; } }
cr_op: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12D,R8D MOV R15D,EDX MOV R11,RSI MOV R13,RDI XOR R14D,R14D XOR EBX,EBX MOV qword ptr [RSP + 0x10],RSI LAB_0019a3e5: CMP R14D,R15D SETL AL CMP EBX,R12D SETL SIL AND SIL,AL CMP SIL,0x1 JNZ 0x0019a415 MOVSXD RAX,R14D MOV EBP,dword ptr [R11 + RAX*0x4] MOVSXD RAX,EBX MOV EAX,dword ptr [RCX + RAX*0x4] CMP EBP,EAX JC 0x0019a421 JNZ 0x0019a435 INC R14D INC EBX JMP 0x0019a439 LAB_0019a415: CMP R14D,R15D JGE 0x0019a426 MOVSXD RAX,R14D MOV EBP,dword ptr [R11 + RAX*0x4] LAB_0019a421: INC R14D JMP 0x0019a439 LAB_0019a426: CMP EBX,R12D JGE 0x0019a4c8 MOVSXD RAX,EBX MOV EAX,dword ptr [RCX + RAX*0x4] LAB_0019a435: INC EBX MOV EBP,EAX LAB_0019a439: CMP R9D,0x2 JZ 0x0019a45c CMP R9D,0x1 JZ 0x0019a455 TEST R9D,R9D JNZ 0x0019a4e8 MOV EAX,EBX OR EAX,R14D JMP 0x0019a461 LAB_0019a455: MOV EAX,R14D AND EAX,EBX JMP 0x0019a461 LAB_0019a45c: MOV EAX,EBX XOR EAX,R14D LAB_0019a461: AND EAX,0x1 MOV ESI,dword ptr [R13] MOV R10D,ESI AND R10D,0x1 CMP EAX,R10D JZ 0x0019a3e5 CMP ESI,dword ptr [R13 + 0x4] JL 0x0019a4b1 MOV dword ptr [RSP + 0x8],EBP MOV dword ptr [RSP + 0xc],EBX MOV EBP,R9D MOV RBX,RCX INC ESI MOV RDI,R13 CALL 0x0019a333 TEST EAX,EAX JNZ 0x0019a4d4 MOV ESI,dword ptr [R13] MOV RCX,RBX MOV R9D,EBP MOV R11,qword ptr [RSP + 0x10] MOV EBX,dword ptr [RSP + 0xc] MOV EBP,dword ptr [RSP + 0x8] LAB_0019a4b1: MOV RAX,qword ptr [R13 + 0x8] LEA R10D,[RSI + 0x1] MOV dword ptr [R13],R10D MOVSXD RSI,ESI MOV dword ptr [RAX + RSI*0x4],EBP JMP 0x0019a3e5 LAB_0019a4c8: MOV RDI,R13 CALL 0x0019a4ed XOR EAX,EAX JMP 0x0019a4d9 LAB_0019a4d4: MOV EAX,0xffffffff LAB_0019a4d9: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019a4e8: CALL 0x0010e090
int8 cr_op(uint *param_1,long param_2,int param_3,long param_4,int param_5,int param_6) { uint uVar1; int iVar2; uint uVar3; uint uVar4; uint uVar5; uint uVar6; uVar6 = 0; uVar3 = 0; do { if ((int)uVar3 < param_5 && (int)uVar6 < param_3) { uVar4 = *(uint *)(param_2 + (long)(int)uVar6 * 4); uVar1 = *(uint *)(param_4 + (long)(int)uVar3 * 4); if (uVar4 < uVar1) { LAB_0019a421: uVar6 = uVar6 + 1; } else { if (uVar4 != uVar1) goto LAB_0019a435; uVar6 = uVar6 + 1; uVar3 = uVar3 + 1; } } else { if ((int)uVar6 < param_3) { uVar4 = *(uint *)(param_2 + (long)(int)uVar6 * 4); goto LAB_0019a421; } if (param_5 <= (int)uVar3) { cr_compress(param_1); return 0; } uVar1 = *(uint *)(param_4 + (long)(int)uVar3 * 4); LAB_0019a435: uVar4 = uVar1; uVar3 = uVar3 + 1; } if (param_6 == 2) { uVar1 = uVar3 ^ uVar6; } else if (param_6 == 1) { uVar1 = uVar6 & uVar3; } else { if (param_6 != 0) { /* WARNING: Subroutine does not return */ abort(); } uVar1 = uVar3 | uVar6; } uVar5 = *param_1; if ((uVar1 & 1) != (uVar5 & 1)) { if ((int)param_1[1] <= (int)uVar5) { iVar2 = cr_realloc(param_1,uVar5 + 1); if (iVar2 != 0) { return 0xffffffff; } uVar5 = *param_1; } *param_1 = uVar5 + 1; *(uint *)(*(long *)(param_1 + 2) + (long)(int)uVar5 * 4) = uVar4; } } while( true ); }
28,593
my_casedn_str_mb
eloqsql/strings/ctype-mb.c
size_t my_casedn_str_mb(CHARSET_INFO * cs, char *str) { register uint32 l; register const uchar *map= cs->to_lower; char *str_orig= str; while (*str) { /* Pointing after the '\0' is safe here. */ if ((l= my_ismbchar(cs, str, str + cs->mbmaxlen))) str+= l; else { *str= (char) map[(uchar)*str]; str++; } } return (size_t) (str - str_orig); }
O3
c
my_casedn_str_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %rax je 0x3656c movq %rdi, %r14 movq 0x48(%rdi), %r12 movq %rbx, %r15 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0x3655c movzbl (%r15), %eax movb (%r12,%rax), %al movb %al, (%r15) movl $0x1, %ecx jmp 0x3655e movl %eax, %ecx leaq (%r15,%rcx), %rax cmpb $0x0, (%r15,%rcx) movq %rax, %r15 jne 0x36528 subq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_casedn_str_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi cmp byte ptr [rsi], 0 mov rax, rsi jz short loc_3656C mov r14, rdi mov r12, [rdi+48h] mov r15, rbx loc_36528: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_3655C movzx eax, byte ptr [r15] mov al, [r12+rax] mov [r15], al mov ecx, 1 jmp short loc_3655E loc_3655C: mov ecx, eax loc_3655E: lea rax, [r15+rcx] cmp byte ptr [r15+rcx], 0 mov r15, rax jnz short loc_36528 loc_3656C: sub rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_casedn_str_mb(long long a1, _BYTE *a2) { _BYTE *v2; // rax long long v3; // r12 _BYTE *v4; // r15 int v5; // eax long long v6; // rcx bool v7; // zf v2 = a2; if ( *a2 ) { v3 = *(_QWORD *)(a1 + 72); v4 = a2; do { v5 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, &v4[*(unsigned int *)(a1 + 156)]); if ( v5 >= 2 ) { v6 = (unsigned int)v5; } else { *v4 = *(_BYTE *)(v3 + (unsigned __int8)*v4); v6 = 1LL; } v2 = &v4[v6]; v7 = v4[v6] == 0; v4 += v6; } while ( !v7 ); } return v2 - a2; }
my_casedn_str_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV RAX,RSI JZ 0x0013656c MOV R14,RDI MOV R12,qword ptr [RDI + 0x48] MOV R15,RBX LAB_00136528: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x0013655c MOVZX EAX,byte ptr [R15] MOV AL,byte ptr [R12 + RAX*0x1] MOV byte ptr [R15],AL MOV ECX,0x1 JMP 0x0013655e LAB_0013655c: MOV ECX,EAX LAB_0013655e: LEA RAX,[R15 + RCX*0x1] CMP byte ptr [R15 + RCX*0x1],0x0 MOV R15,RAX JNZ 0x00136528 LAB_0013656c: SUB RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
long my_casedn_str_mb(long param_1,byte *param_2) { byte *pbVar1; long lVar2; uint uVar3; byte *pbVar4; ulong uVar5; byte *pbVar6; pbVar4 = param_2; if (*param_2 != 0) { lVar2 = *(long *)(param_1 + 0x48); pbVar6 = param_2; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar6,pbVar6 + *(uint *)(param_1 + 0x9c)); if ((int)uVar3 < 2) { *pbVar6 = *(byte *)(lVar2 + (ulong)*pbVar6); uVar5 = 1; } else { uVar5 = (ulong)uVar3; } pbVar4 = pbVar6 + uVar5; pbVar1 = pbVar6 + uVar5; pbVar6 = pbVar4; } while (*pbVar1 != 0); } return (long)pbVar4 - (long)param_2; }
28,594
ma_delete_static_record
eloqsql/storage/maria/ma_statrec.c
my_bool _ma_delete_static_record(MARIA_HA *info, const uchar *record __attribute__ ((unused))) { uchar temp[9]; /* 1+sizeof(uint32) */ info->state->del++; info->state->empty+=info->s->base.pack_reclength; temp[0]= '\0'; /* Mark that record is deleted */ _ma_dpointer(info->s, temp+1, info->s->state.dellink); info->s->state.dellink= info->cur_row.lastpos; info->rec_cache.seek_not_done=1; return (info->s->file_write(info, temp, 1+info->s->rec_reflength, info->cur_row.lastpos, MYF(MY_NABP)) != 0); }
O3
c
ma_delete_static_record: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x10(%rbp) movq 0x20(%rdi), %rax incq 0x8(%rax) movq (%rdi), %rax movq 0x20(%rdi), %rcx movq 0x3a0(%rax), %rax addq %rax, 0x10(%rcx) leaq -0x18(%rbp), %rsi movb $0x0, -0x1(%rsi) movq (%rdi), %rdi movq 0xc8(%rdi), %rdx callq 0x57258 movq (%rbx), %rax movq 0x98(%rbx), %rcx movq %rcx, 0xc8(%rax) movl $0x1, 0x598(%rbx) movq (%rbx), %rax movl 0x740(%rax), %edx incl %edx leaq -0x19(%rbp), %rsi movl $0x4, %r8d movq %rbx, %rdi callq *0x6e8(%rax) testq %rax, %rax setne %al movq %fs:0x28, %rcx cmpq -0x10(%rbp), %rcx jne 0x5b6ec addq $0x18, %rsp popq %rbx popq %rbp retq callq 0x29270
_ma_delete_static_record: push rbp mov rbp, rsp push rbx sub rsp, 18h mov rbx, rdi mov rax, fs:28h mov [rbp+var_10], rax mov rax, [rdi+20h] inc qword ptr [rax+8] mov rax, [rdi] mov rcx, [rdi+20h] mov rax, [rax+3A0h] add [rcx+10h], rax lea rsi, [rbp+var_18] mov byte ptr [rsi-1], 0 mov rdi, [rdi] mov rdx, [rdi+0C8h] call _ma_dpointer mov rax, [rbx] mov rcx, [rbx+98h] mov [rax+0C8h], rcx mov dword ptr [rbx+598h], 1 mov rax, [rbx] mov edx, [rax+740h] inc edx lea rsi, [rbp+var_19] mov r8d, 4 mov rdi, rbx call qword ptr [rax+6E8h] test rax, rax setnz al mov rcx, fs:28h cmp rcx, [rbp+var_10] jnz short loc_5B6EC add rsp, 18h pop rbx pop rbp retn loc_5B6EC: call ___stack_chk_fail
bool ma_delete_static_record(long long *a1) { long long v1; // rcx char v3; // [rsp+7h] [rbp-19h] BYREF char v4[8]; // [rsp+8h] [rbp-18h] BYREF unsigned long long v5; // [rsp+10h] [rbp-10h] v5 = __readfsqword(0x28u); ++*(_QWORD *)(a1[4] + 8); *(_QWORD *)(a1[4] + 16) += *(_QWORD *)(*a1 + 928); v3 = 0; ma_dpointer(*a1, (long long)v4, *(_QWORD *)(*a1 + 200)); v1 = a1[19]; *(_QWORD *)(*a1 + 200) = v1; *((_DWORD *)a1 + 358) = 1; return (*(long long ( **)(long long *, char *, _QWORD, long long, long long))(*a1 + 1768))( a1, &v3, (unsigned int)(*(_DWORD *)(*a1 + 1856) + 1), v1, 4LL) != 0; }
_ma_delete_static_record: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RDI + 0x20] INC qword ptr [RAX + 0x8] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x20] MOV RAX,qword ptr [RAX + 0x3a0] ADD qword ptr [RCX + 0x10],RAX LEA RSI,[RBP + -0x18] MOV byte ptr [RSI + -0x1],0x0 MOV RDI,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0xc8] CALL 0x00157258 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [RAX + 0xc8],RCX MOV dword ptr [RBX + 0x598],0x1 MOV RAX,qword ptr [RBX] MOV EDX,dword ptr [RAX + 0x740] INC EDX LEA RSI,[RBP + -0x19] MOV R8D,0x4 MOV RDI,RBX CALL qword ptr [RAX + 0x6e8] TEST RAX,RAX SETNZ AL MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x10] JNZ 0x0015b6ec ADD RSP,0x18 POP RBX POP RBP RET LAB_0015b6ec: CALL 0x00129270
bool _ma_delete_static_record(long *param_1) { long lVar1; long in_FS_OFFSET; int1 local_21; int1 local_20 [8]; long local_18; local_18 = *(long *)(in_FS_OFFSET + 0x28); *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + 1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) + *(long *)(*param_1 + 0x3a0); local_21 = 0; _ma_dpointer(*param_1,local_20,*(int8 *)(*param_1 + 200)); lVar1 = param_1[0x13]; *(long *)(*param_1 + 200) = lVar1; *(int4 *)(param_1 + 0xb3) = 1; lVar1 = (**(code **)(*param_1 + 0x6e8))(param_1,&local_21,*(int *)(*param_1 + 0x740) + 1,lVar1,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return lVar1 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
28,595
string_buffer_concat
bluesky950520[P]quickjs/quickjs.c
static int string_buffer_concat(StringBuffer *s, const JSString *p, uint32_t from, uint32_t to) { if (to <= from) return 0; if (p->is_wide_char) return string_buffer_write16(s, p->u.str16 + from, to - from); else return string_buffer_write8(s, p->u.str8 + from, to - from); }
O3
c
string_buffer_concat: pushq %r15 pushq %r14 pushq %rbx movl %ecx, %ebx xorl %eax, %eax subl %edx, %ebx jbe 0x43055 movq %rsi, %rcx movq %rdi, %r14 addq $0x18, %rsi testb $-0x80, 0x7(%rcx) movl %edx, %eax jne 0x42fa6 addq %rax, %rsi movq %r14, %rdi movl %ebx, %edx popq %rbx popq %r14 popq %r15 jmp 0x42ef0 leaq (%rsi,%rax,2), %r15 testl %ebx, %ebx jle 0x42fc5 movl %ebx, %eax xorl %ecx, %ecx xorl %edx, %edx movzwl (%r15,%rcx,2), %esi orl %esi, %edx incq %rcx cmpq %rcx, %rax jne 0x42fb4 jmp 0x42fc7 xorl %edx, %edx movl 0x10(%r14), %eax addl %ebx, %eax movl 0x14(%r14), %esi cmpl %esi, %eax jle 0x42fe1 movq %r14, %rdi movl %eax, %esi callq 0x4305b jmp 0x42ff8 cmpl $0x0, 0x18(%r14) jne 0x43003 cmpl $0x100, %edx # imm = 0x100 jl 0x43003 movq %r14, %rdi callq 0x4315e movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x43055 cmpl $0x0, 0x18(%r14) je 0x4302a movq 0x8(%r14), %rax movslq 0x10(%r14), %rcx leaq (%rax,%rcx,2), %rdi addq $0x18, %rdi leal (%rbx,%rbx), %eax movslq %eax, %rdx movq %r15, %rsi callq 0xe5a0 jmp 0x4304f testl %ebx, %ebx jle 0x4304f movl %ebx, %eax xorl %ecx, %ecx movb (%r15,%rcx,2), %dl movq 0x8(%r14), %rsi movl 0x10(%r14), %edi addl %ecx, %edi movslq %edi, %rdi movb %dl, 0x18(%rsi,%rdi) incq %rcx cmpq %rcx, %rax jne 0x43032 addl %ebx, 0x10(%r14) xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq
string_buffer_concat: push r15 push r14 push rbx mov ebx, ecx xor eax, eax sub ebx, edx jbe loc_43055 mov rcx, rsi mov r14, rdi add rsi, 18h test byte ptr [rcx+7], 80h mov eax, edx jnz short loc_42FA6 add rsi, rax mov rdi, r14 mov edx, ebx pop rbx pop r14 pop r15 jmp string_buffer_write8 loc_42FA6: lea r15, [rsi+rax*2] test ebx, ebx jle short loc_42FC5 mov eax, ebx xor ecx, ecx xor edx, edx loc_42FB4: movzx esi, word ptr [r15+rcx*2] or edx, esi inc rcx cmp rax, rcx jnz short loc_42FB4 jmp short loc_42FC7 loc_42FC5: xor edx, edx loc_42FC7: mov eax, [r14+10h] add eax, ebx mov esi, [r14+14h] cmp eax, esi jle short loc_42FE1 mov rdi, r14 mov esi, eax call string_buffer_realloc jmp short loc_42FF8 loc_42FE1: cmp dword ptr [r14+18h], 0 jnz short loc_43003 cmp edx, 100h jl short loc_43003 mov rdi, r14 call string_buffer_widen loc_42FF8: mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_43055 loc_43003: cmp dword ptr [r14+18h], 0 jz short loc_4302A mov rax, [r14+8] movsxd rcx, dword ptr [r14+10h] lea rdi, [rax+rcx*2] add rdi, 18h lea eax, [rbx+rbx] movsxd rdx, eax mov rsi, r15 call _memcpy jmp short loc_4304F loc_4302A: test ebx, ebx jle short loc_4304F mov eax, ebx xor ecx, ecx loc_43032: mov dl, [r15+rcx*2] mov rsi, [r14+8] mov edi, [r14+10h] add edi, ecx movsxd rdi, edi mov [rsi+rdi+18h], dl inc rcx cmp rax, rcx jnz short loc_43032 loc_4304F: add [r14+10h], ebx xor eax, eax loc_43055: pop rbx pop r14 pop r15 retn
long long string_buffer_concat(long long a1, long long a2, unsigned int a3, unsigned int a4) { long long result; // rax int v5; // ebx long long v7; // rsi long long v8; // r15 long long v9; // rcx long long v10; // rdx int v11; // eax int v12; // eax int v13; // ecx long long i; // rcx result = 0LL; v5 = a4 - a3; if ( a4 <= a3 ) return result; v7 = a2 + 24; if ( *(char *)(a2 + 7) >= 0 ) return string_buffer_write8(a1, a3 + v7, v5); v8 = v7 + 2LL * a3; if ( v5 <= 0 ) { v10 = 0LL; } else { v9 = 0LL; LODWORD(v10) = 0; do v10 = *(unsigned __int16 *)(v8 + 2 * v9++) | (unsigned int)v10; while ( v5 != v9 ); } v11 = v5 + *(_DWORD *)(a1 + 16); if ( v11 > *(_DWORD *)(a1 + 20) ) { v12 = string_buffer_realloc(a1, (unsigned int)v11, v10); goto LABEL_14; } if ( !*(_DWORD *)(a1 + 24) && (int)v10 >= 256 ) { v12 = string_buffer_widen(a1); LABEL_14: v13 = v12; result = 0xFFFFFFFFLL; if ( v13 ) return result; } if ( *(_DWORD *)(a1 + 24) ) { memcpy(*(_QWORD *)(a1 + 8) + 2LL * *(int *)(a1 + 16) + 24, v8, 2 * v5); } else if ( v5 > 0 ) { for ( i = 0LL; i != v5; ++i ) *(_BYTE *)(*(_QWORD *)(a1 + 8) + (int)i + *(_DWORD *)(a1 + 16) + 24LL) = *(_BYTE *)(v8 + 2 * i); } *(_DWORD *)(a1 + 16) += v5; return 0LL; }
string_buffer_concat: PUSH R15 PUSH R14 PUSH RBX MOV EBX,ECX XOR EAX,EAX SUB EBX,EDX JBE 0x00143055 MOV RCX,RSI MOV R14,RDI ADD RSI,0x18 TEST byte ptr [RCX + 0x7],0x80 MOV EAX,EDX JNZ 0x00142fa6 ADD RSI,RAX MOV RDI,R14 MOV EDX,EBX POP RBX POP R14 POP R15 JMP 0x00142ef0 LAB_00142fa6: LEA R15,[RSI + RAX*0x2] TEST EBX,EBX JLE 0x00142fc5 MOV EAX,EBX XOR ECX,ECX XOR EDX,EDX LAB_00142fb4: MOVZX ESI,word ptr [R15 + RCX*0x2] OR EDX,ESI INC RCX CMP RAX,RCX JNZ 0x00142fb4 JMP 0x00142fc7 LAB_00142fc5: XOR EDX,EDX LAB_00142fc7: MOV EAX,dword ptr [R14 + 0x10] ADD EAX,EBX MOV ESI,dword ptr [R14 + 0x14] CMP EAX,ESI JLE 0x00142fe1 MOV RDI,R14 MOV ESI,EAX CALL 0x0014305b JMP 0x00142ff8 LAB_00142fe1: CMP dword ptr [R14 + 0x18],0x0 JNZ 0x00143003 CMP EDX,0x100 JL 0x00143003 MOV RDI,R14 CALL 0x0014315e LAB_00142ff8: MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x00143055 LAB_00143003: CMP dword ptr [R14 + 0x18],0x0 JZ 0x0014302a MOV RAX,qword ptr [R14 + 0x8] MOVSXD RCX,dword ptr [R14 + 0x10] LEA RDI,[RAX + RCX*0x2] ADD RDI,0x18 LEA EAX,[RBX + RBX*0x1] MOVSXD RDX,EAX MOV RSI,R15 CALL 0x0010e5a0 JMP 0x0014304f LAB_0014302a: TEST EBX,EBX JLE 0x0014304f MOV EAX,EBX XOR ECX,ECX LAB_00143032: MOV DL,byte ptr [R15 + RCX*0x2] MOV RSI,qword ptr [R14 + 0x8] MOV EDI,dword ptr [R14 + 0x10] ADD EDI,ECX MOVSXD RDI,EDI MOV byte ptr [RSI + RDI*0x1 + 0x18],DL INC RCX CMP RAX,RCX JNZ 0x00143032 LAB_0014304f: ADD dword ptr [R14 + 0x10],EBX XOR EAX,EAX LAB_00143055: POP RBX POP R14 POP R15 RET
int8 string_buffer_concat(long param_1,long param_2,uint param_3,uint param_4) { void *__src; int iVar1; int8 uVar2; ulong uVar3; ushort uVar4; uint uVar5; uVar5 = param_4 - param_3; if (param_4 < param_3 || uVar5 == 0) { return 0; } if ((*(byte *)(param_2 + 7) & 0x80) == 0) { uVar2 = string_buffer_write8(param_1,param_2 + 0x18 + (ulong)param_3,uVar5); return uVar2; } __src = (void *)(param_2 + 0x18 + (ulong)param_3 * 2); if ((int)uVar5 < 1) { uVar4 = 0; } else { uVar3 = 0; uVar4 = 0; do { uVar4 = uVar4 | *(ushort *)((long)__src + uVar3 * 2); uVar3 = uVar3 + 1; } while (uVar5 != uVar3); } iVar1 = *(int *)(param_1 + 0x10) + uVar5; if (*(int *)(param_1 + 0x14) < iVar1) { iVar1 = string_buffer_realloc(param_1,iVar1); } else { if ((*(int *)(param_1 + 0x18) != 0) || (uVar4 < 0x100)) goto LAB_00143003; iVar1 = string_buffer_widen(param_1); } if (iVar1 != 0) { return 0xffffffff; } LAB_00143003: if (*(int *)(param_1 + 0x18) == 0) { if (0 < (int)uVar5) { uVar3 = 0; do { *(int1 *) (*(long *)(param_1 + 8) + 0x18 + (long)(*(int *)(param_1 + 0x10) + (int)uVar3)) = *(int1 *)((long)__src + uVar3 * 2); uVar3 = uVar3 + 1; } while (uVar5 != uVar3); } } else { memcpy((void *)(*(long *)(param_1 + 8) + (long)*(int *)(param_1 + 0x10) * 2 + 0x18),__src, (long)(int)(uVar5 * 2)); } *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + uVar5; return 0; }
28,596
js_free_message_pipe
bluesky950520[P]quickjs/quickjs-libc.c
static void js_free_message_pipe(JSWorkerMessagePipe *ps) { struct list_head *el, *el1; JSWorkerMessage *msg; int ref_count; if (!ps) return; ref_count = atomic_add_int(&ps->ref_count, -1); assert(ref_count >= 0); if (ref_count == 0) { list_for_each_safe(el, el1, &ps->msg_queue) { msg = list_entry(el, JSWorkerMessage, link); js_free_message(msg); } pthread_mutex_destroy(&ps->mutex); close(ps->read_fd); close(ps->write_fd); free(ps); } }
O0
c
js_free_message_pipe: subq $0x28, %rsp movq %rdi, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0x10456 jmp 0x10503 movq 0x20(%rsp), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x16500 movl %eax, 0x4(%rsp) cmpl $0x0, 0x4(%rsp) jne 0x10503 movq 0x20(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x20(%rsp), %rcx addq $0x30, %rcx cmpq %rcx, %rax je 0x104d1 movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rdi callq 0x1c440 movq 0x10(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0x10490 movq 0x20(%rsp), %rdi addq $0x8, %rdi callq 0xe2a0 movq 0x20(%rsp), %rax movl 0x40(%rax), %edi callq 0xe390 movq 0x20(%rsp), %rax movl 0x44(%rax), %edi callq 0xe390 movq 0x20(%rsp), %rdi callq 0xe060 addq $0x28, %rsp retq nopl (%rax,%rax)
js_free_message_pipe: sub rsp, 28h mov [rsp+28h+var_8], rdi cmp [rsp+28h+var_8], 0 jnz short loc_10456 jmp loc_10503 loc_10456: mov rdi, [rsp+28h+var_8] mov esi, 0FFFFFFFFh call atomic_add_int mov [rsp+28h+var_24], eax cmp [rsp+28h+var_24], 0 jnz loc_10503 mov rax, [rsp+28h+var_8] mov rax, [rax+38h] mov [rsp+28h+var_10], rax mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov [rsp+28h+var_18], rax loc_10490: mov rax, [rsp+28h+var_10] mov rcx, [rsp+28h+var_8] add rcx, 30h ; '0' cmp rax, rcx jz short loc_104D1 mov rax, [rsp+28h+var_10] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_20] call js_free_message mov rax, [rsp+28h+var_18] mov [rsp+28h+var_10], rax mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov [rsp+28h+var_18], rax jmp short loc_10490 loc_104D1: mov rdi, [rsp+28h+var_8] add rdi, 8 call _pthread_mutex_destroy mov rax, [rsp+28h+var_8] mov edi, [rax+40h] call _close mov rax, [rsp+28h+var_8] mov edi, [rax+44h] call _close mov rdi, [rsp+28h+var_8] call _free loc_10503: add rsp, 28h retn
void js_free_message_pipe(long long a1) { long long v1; // [rsp+10h] [rbp-18h] long long v2; // [rsp+18h] [rbp-10h] if ( a1 && !(unsigned int)atomic_add_int(a1, 0xFFFFFFFFLL) ) { v2 = *(_QWORD *)(a1 + 56); v1 = *(_QWORD *)(v2 + 8); while ( v2 != a1 + 48 ) { js_free_message(v2); v2 = v1; v1 = *(_QWORD *)(v1 + 8); } pthread_mutex_destroy(a1 + 8); close(*(unsigned int *)(a1 + 64)); close(*(unsigned int *)(a1 + 68)); free(a1); } }
js_free_message_pipe: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI CMP qword ptr [RSP + 0x20],0x0 JNZ 0x00110456 JMP 0x00110503 LAB_00110456: MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0xffffffff CALL 0x00116500 MOV dword ptr [RSP + 0x4],EAX CMP dword ptr [RSP + 0x4],0x0 JNZ 0x00110503 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX LAB_00110490: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] ADD RCX,0x30 CMP RAX,RCX JZ 0x001104d1 MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x0011c440 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x00110490 LAB_001104d1: MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x8 CALL 0x0010e2a0 MOV RAX,qword ptr [RSP + 0x20] MOV EDI,dword ptr [RAX + 0x40] CALL 0x0010e390 MOV RAX,qword ptr [RSP + 0x20] MOV EDI,dword ptr [RAX + 0x44] CALL 0x0010e390 MOV RDI,qword ptr [RSP + 0x20] CALL 0x0010e060 LAB_00110503: ADD RSP,0x28 RET
void js_free_message_pipe(void *param_1) { int iVar1; long local_18; long local_10; if ((param_1 != (void *)0x0) && (iVar1 = atomic_add_int(param_1,0xffffffff), iVar1 == 0)) { local_10 = *(long *)((long)param_1 + 0x38); local_18 = *(long *)(local_10 + 8); while (local_10 != (long)param_1 + 0x30) { js_free_message(local_10); local_10 = local_18; local_18 = *(long *)(local_18 + 8); } pthread_mutex_destroy((pthread_mutex_t *)((long)param_1 + 8)); close(*(int *)((long)param_1 + 0x40)); close(*(int *)((long)param_1 + 0x44)); free(param_1); } return; }
28,597
js_free_message_pipe
bluesky950520[P]quickjs/quickjs-libc.c
static void js_free_message_pipe(JSWorkerMessagePipe *ps) { struct list_head *el, *el1; JSWorkerMessage *msg; int ref_count; if (!ps) return; ref_count = atomic_add_int(&ps->ref_count, -1); assert(ref_count >= 0); if (ref_count == 0) { list_for_each_safe(el, el1, &ps->msg_queue) { msg = list_entry(el, JSWorkerMessage, link); js_free_message(msg); } pthread_mutex_destroy(&ps->mutex); close(ps->read_fd); close(ps->write_fd); free(ps); } }
O2
c
js_free_message_pipe: pushq %r15 pushq %r14 pushq %rbx testq %rdi, %rdi je 0xf811 movq %rdi, %rbx lock decl (%rdi) jne 0xf811 leaq 0x30(%rbx), %r14 movq 0x38(%rbx), %rdi cmpq %r14, %rdi je 0xf817 movq 0x8(%rdi), %r15 callq 0x14d20 movq %r15, %rdi jmp 0xf7fe popq %rbx popq %r14 popq %r15 retq leaq 0x8(%rbx), %rdi callq 0xe2b0 movl 0x40(%rbx), %edi callq 0xe3a0 movl 0x44(%rbx), %edi callq 0xe3a0 movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0xe060
js_free_message_pipe: push r15 push r14 push rbx test rdi, rdi jz short loc_F811 mov rbx, rdi lock dec dword ptr [rdi] jnz short loc_F811 lea r14, [rbx+30h] mov rdi, [rbx+38h] loc_F7FE: cmp rdi, r14 jz short loc_F817 mov r15, [rdi+8] call js_free_message mov rdi, r15 jmp short loc_F7FE loc_F811: pop rbx pop r14 pop r15 retn loc_F817: lea rdi, [rbx+8] call _pthread_mutex_destroy mov edi, [rbx+40h] call _close mov edi, [rbx+44h] call _close mov rdi, rbx pop rbx pop r14 pop r15 jmp _free
long long js_free_message_pipe(long long a1) { long long v2; // r14 long long i; // rdi long long v4; // r15 long long result; // rax if ( a1 && !_InterlockedDecrement((volatile signed __int32 *)a1) ) { v2 = a1 + 48; for ( i = *(_QWORD *)(a1 + 56); i != v2; i = v4 ) { v4 = *(_QWORD *)(i + 8); js_free_message(); } pthread_mutex_destroy(a1 + 8); close(*(unsigned int *)(a1 + 64)); close(*(unsigned int *)(a1 + 68)); return free(a1); } return result; }
js_free_message_pipe: PUSH R15 PUSH R14 PUSH RBX TEST RDI,RDI JZ 0x0010f811 MOV RBX,RDI DEC.LOCK dword ptr [RDI] JNZ 0x0010f811 LEA R14,[RBX + 0x30] MOV RDI,qword ptr [RBX + 0x38] LAB_0010f7fe: CMP RDI,R14 JZ 0x0010f817 MOV R15,qword ptr [RDI + 0x8] CALL 0x00114d20 MOV RDI,R15 JMP 0x0010f7fe LAB_0010f811: POP RBX POP R14 POP R15 RET LAB_0010f817: LEA RDI,[RBX + 0x8] CALL 0x0010e2b0 MOV EDI,dword ptr [RBX + 0x40] CALL 0x0010e3a0 MOV EDI,dword ptr [RBX + 0x44] CALL 0x0010e3a0 MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x0010e060
void js_free_message_pipe(int *param_1) { int *piVar1; if (param_1 != (int *)0x0) { LOCK(); *param_1 = *param_1 + -1; UNLOCK(); if (*param_1 == 0) { piVar1 = *(int **)(param_1 + 0xe); while (piVar1 != param_1 + 0xc) { piVar1 = *(int **)(piVar1 + 2); js_free_message(); } pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 2)); close(param_1[0x10]); close(param_1[0x11]); free(param_1); return; } } return; }
28,598
js_free_message_pipe
bluesky950520[P]quickjs/quickjs-libc.c
static void js_free_message_pipe(JSWorkerMessagePipe *ps) { struct list_head *el, *el1; JSWorkerMessage *msg; int ref_count; if (!ps) return; ref_count = atomic_add_int(&ps->ref_count, -1); assert(ref_count >= 0); if (ref_count == 0) { list_for_each_safe(el, el1, &ps->msg_queue) { msg = list_entry(el, JSWorkerMessage, link); js_free_message(msg); } pthread_mutex_destroy(&ps->mutex); close(ps->read_fd); close(ps->write_fd); free(ps); } }
O3
c
js_free_message_pipe: pushq %r15 pushq %r14 pushq %rbx testq %rdi, %rdi je 0x15263 movq %rdi, %rbx lock decl (%rdi) jne 0x15263 leaq 0x30(%rbx), %r14 movq 0x38(%rbx), %rdi cmpq %r14, %rdi je 0x1523d movq 0x8(%rdi), %r15 callq 0x1acbd movq %r15, %rdi cmpq %r14, %r15 jne 0x1522c leaq 0x8(%rbx), %rdi callq 0xe2a0 movl 0x40(%rbx), %edi callq 0xe390 movl 0x44(%rbx), %edi callq 0xe390 movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0xe060 popq %rbx popq %r14 popq %r15 retq
js_free_message_pipe: push r15 push r14 push rbx test rdi, rdi jz short loc_15263 mov rbx, rdi lock dec dword ptr [rdi] jnz short loc_15263 lea r14, [rbx+30h] mov rdi, [rbx+38h] cmp rdi, r14 jz short loc_1523D loc_1522C: mov r15, [rdi+8] call js_free_message mov rdi, r15 cmp r15, r14 jnz short loc_1522C loc_1523D: lea rdi, [rbx+8] call _pthread_mutex_destroy mov edi, [rbx+40h] call _close mov edi, [rbx+44h] call _close mov rdi, rbx pop rbx pop r14 pop r15 jmp _free loc_15263: pop rbx pop r14 pop r15 retn
long long js_free_message_pipe(long long a1) { long long v2; // r14 long long v3; // rdi long long v4; // r15 long long result; // rax if ( a1 && !_InterlockedDecrement((volatile signed __int32 *)a1) ) { v2 = a1 + 48; v3 = *(_QWORD *)(a1 + 56); if ( v3 != a1 + 48 ) { do { v4 = *(_QWORD *)(v3 + 8); js_free_message(); v3 = v4; } while ( v4 != v2 ); } pthread_mutex_destroy(a1 + 8); close(*(unsigned int *)(a1 + 64)); close(*(unsigned int *)(a1 + 68)); return free(a1); } return result; }
js_free_message_pipe: PUSH R15 PUSH R14 PUSH RBX TEST RDI,RDI JZ 0x00115263 MOV RBX,RDI DEC.LOCK dword ptr [RDI] JNZ 0x00115263 LEA R14,[RBX + 0x30] MOV RDI,qword ptr [RBX + 0x38] CMP RDI,R14 JZ 0x0011523d LAB_0011522c: MOV R15,qword ptr [RDI + 0x8] CALL 0x0011acbd MOV RDI,R15 CMP R15,R14 JNZ 0x0011522c LAB_0011523d: LEA RDI,[RBX + 0x8] CALL 0x0010e2a0 MOV EDI,dword ptr [RBX + 0x40] CALL 0x0010e390 MOV EDI,dword ptr [RBX + 0x44] CALL 0x0010e390 MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x0010e060 LAB_00115263: POP RBX POP R14 POP R15 RET
void js_free_message_pipe(int *param_1) { int *piVar1; if (param_1 != (int *)0x0) { LOCK(); *param_1 = *param_1 + -1; UNLOCK(); if (*param_1 == 0) { piVar1 = *(int **)(param_1 + 0xe); while (piVar1 != param_1 + 0xc) { piVar1 = *(int **)(piVar1 + 2); js_free_message(); } pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 2)); close(param_1[0x10]); close(param_1[0x11]); free(param_1); return; } } return; }
28,599
ImPlot::PadAndDatumAxesY(ImPlotPlot&, float&, float&, ImPlotAlignmentData*)
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
void PadAndDatumAxesY(ImPlotPlot& plot, float& pad_L, float& pad_R, ImPlotAlignmentData* align) { // [ pad_L ] [ pad_R ] // .................CanvasRect................ // :TPWPK.PTPWP _____PlotRect____ PWPTP.KPWPT: // :A # |- A # |- -| # A -| # A: // :X | X | | X | x: // :I # |- I # |- -| # I -| # I: // :S | S | | S | S: // :3 # |- 0 # |-_______________-| # 1 -| # 2: // :.........................................: // // T = text height // P = label padding // K = minor tick length // W = label width ImPlotContext& gp = *GImPlot; const float T = ImGui::GetTextLineHeight(); const float P = gp.Style.LabelPadding.x; const float K = gp.Style.MinorTickLen.y; int count_L = 0; int count_R = 0; float last_L = plot.AxesRect.Min.x; float last_R = plot.AxesRect.Max.x; for (int i = IMPLOT_NUM_Y_AXES; i-- > 0;) { // FYI: can iterate forward ImPlotAxis& axis = plot.YAxis(i); if (!axis.Enabled) continue; const bool label = axis.HasLabel(); const bool ticks = axis.HasTickLabels(); const bool opp = axis.IsOpposite(); if (opp) { if (count_R++ > 0) pad_R += K + P; if (label) pad_R += T + P; if (ticks) pad_R += axis.Ticker.MaxSize.x + P; axis.Datum1 = plot.CanvasRect.Max.x - pad_R; axis.Datum2 = last_R; last_R = axis.Datum1; } else { if (count_L++ > 0) pad_L += K + P; if (label) pad_L += T + P; if (ticks) pad_L += axis.Ticker.MaxSize.x + P; axis.Datum1 = plot.CanvasRect.Min.x + pad_L; axis.Datum2 = last_L; last_L = axis.Datum1; } } plot.PlotRect.Min.x = plot.CanvasRect.Min.x + pad_L; plot.PlotRect.Max.x = plot.CanvasRect.Max.x - pad_R; if (align) { count_L = count_R = 0; float delta_L, delta_R; align->Update(pad_L,pad_R,delta_L,delta_R); for (int i = IMPLOT_NUM_Y_AXES; i-- > 0;) { ImPlotAxis& axis = plot.YAxis(i); if (!axis.Enabled) continue; if (axis.IsOpposite()) { axis.Datum1 -= delta_R; axis.Datum2 -= count_R++ > 1 ? delta_R : 0; } else { axis.Datum1 += delta_L; axis.Datum2 += count_L++ > 1 ? delta_L : 0; } } } }
O1
cpp
ImPlot::PadAndDatumAxesY(ImPlotPlot&, float&, float&, ImPlotAlignmentData*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movq 0x2819fe(%rip), %r13 # 0x336ca0 callq 0x22c54f movss 0x168(%r13), %xmm1 movss 0x9b0(%rbx), %xmm3 movss 0x9b8(%rbx), %xmm4 movss 0x13c(%r13), %xmm2 addss %xmm1, %xmm2 addss %xmm1, %xmm0 xorl %eax, %eax movl $0x8dc, %ecx # imm = 0x8DC xorl %edx, %edx cmpb $0x1, (%rbx,%rcx) jne 0xb53c8 movl -0x168(%rbx,%rcx), %esi cmpl $-0x1, -0x24(%rbx,%rcx) setne %r8b testb $0x1, %sil sete %dil andb %r8b, %dil btl $0x8, %esi jb 0xb5365 testl %eax, %eax jle 0xb5319 movss (%r12), %xmm5 addss %xmm2, %xmm5 movss %xmm5, (%r12) testb %dil, %dil je 0xb532e movss (%r12), %xmm5 addss %xmm0, %xmm5 movss %xmm5, (%r12) testb $0x8, %sil jne 0xb534d movss -0xec(%rbx,%rcx), %xmm5 addss %xmm1, %xmm5 addss (%r12), %xmm5 movss %xmm5, (%r12) incl %eax movss 0x990(%rbx), %xmm5 addss (%r12), %xmm5 movaps %xmm3, %xmm6 movaps %xmm5, %xmm3 jmp 0xb53bc testl %edx, %edx jle 0xb5377 movss (%r14), %xmm5 addss %xmm2, %xmm5 movss %xmm5, (%r14) testb %dil, %dil je 0xb538a movss (%r14), %xmm5 addss %xmm0, %xmm5 movss %xmm5, (%r14) testb $0x8, %sil jne 0xb53a7 movss -0xec(%rbx,%rcx), %xmm5 addss %xmm1, %xmm5 addss (%r14), %xmm5 movss %xmm5, (%r14) incl %edx movss 0x998(%rbx), %xmm5 subss (%r14), %xmm5 movaps %xmm4, %xmm6 movaps %xmm5, %xmm4 movss %xmm5, -0x3c(%rbx,%rcx) movss %xmm6, -0x38(%rbx,%rcx) addq $-0x178, %rcx # imm = 0xFE88 cmpq $0x474, %rcx # imm = 0x474 jne 0xb52da movss 0x990(%rbx), %xmm0 movss 0x998(%rbx), %xmm1 addss (%r12), %xmm0 movss %xmm0, 0x9a0(%rbx) subss (%r14), %xmm1 movss %xmm1, 0x9a8(%rbx) testq %r15, %r15 je 0xb54ac leaq 0x4(%rsp), %r13 movq %rsp, %rbp movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx movq %r13, %rcx movq %rbp, %r8 callq 0xc861e movss (%rbp), %xmm0 xorl %eax, %eax movl $0x8dc, %ecx # imm = 0x8DC movss (%r13), %xmm1 xorl %edx, %edx cmpb $0x1, (%rbx,%rcx) jne 0xb549c testb $0x1, -0x167(%rbx,%rcx) movss -0x3c(%rbx,%rcx), %xmm2 jne 0xb5475 addss %xmm1, %xmm2 movss %xmm2, -0x3c(%rbx,%rcx) movaps %xmm1, %xmm2 cmpl $0x2, %eax jge 0xb546b xorps %xmm2, %xmm2 incl %eax addss -0x38(%rbx,%rcx), %xmm2 jmp 0xb5496 subss %xmm0, %xmm2 movss %xmm2, -0x3c(%rbx,%rcx) movaps %xmm0, %xmm3 cmpl $0x2, %edx jge 0xb548a xorps %xmm3, %xmm3 incl %edx movss -0x38(%rbx,%rcx), %xmm2 subss %xmm3, %xmm2 movss %xmm2, -0x38(%rbx,%rcx) addq $-0x178, %rcx # imm = 0xFE88 cmpq $0x474, %rcx # imm = 0x474 jne 0xb5440 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN6ImPlot16PadAndDatumAxesYER10ImPlotPlotRfS2_P19ImPlotAlignmentData: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rcx mov r14, rdx mov r12, rsi mov rbx, rdi mov r13, cs:GImPlot call _ZN5ImGui17GetTextLineHeightEv; ImGui::GetTextLineHeight(void) movss xmm1, dword ptr [r13+168h] movss xmm3, dword ptr [rbx+9B0h] movss xmm4, dword ptr [rbx+9B8h] movss xmm2, dword ptr [r13+13Ch] addss xmm2, xmm1 addss xmm0, xmm1 xor eax, eax mov ecx, 8DCh xor edx, edx loc_B52DA: cmp byte ptr [rbx+rcx], 1 jnz loc_B53C8 mov esi, [rbx+rcx-168h] cmp dword ptr [rbx+rcx-24h], 0FFFFFFFFh setnz r8b test sil, 1 setz dil and dil, r8b bt esi, 8 jb short loc_B5365 test eax, eax jle short loc_B5319 movss xmm5, dword ptr [r12] addss xmm5, xmm2 movss dword ptr [r12], xmm5 loc_B5319: test dil, dil jz short loc_B532E movss xmm5, dword ptr [r12] addss xmm5, xmm0 movss dword ptr [r12], xmm5 loc_B532E: test sil, 8 jnz short loc_B534D movss xmm5, dword ptr [rbx+rcx-0ECh] addss xmm5, xmm1 addss xmm5, dword ptr [r12] movss dword ptr [r12], xmm5 loc_B534D: inc eax movss xmm5, dword ptr [rbx+990h] addss xmm5, dword ptr [r12] movaps xmm6, xmm3 movaps xmm3, xmm5 jmp short loc_B53BC loc_B5365: test edx, edx jle short loc_B5377 movss xmm5, dword ptr [r14] addss xmm5, xmm2 movss dword ptr [r14], xmm5 loc_B5377: test dil, dil jz short loc_B538A movss xmm5, dword ptr [r14] addss xmm5, xmm0 movss dword ptr [r14], xmm5 loc_B538A: test sil, 8 jnz short loc_B53A7 movss xmm5, dword ptr [rbx+rcx-0ECh] addss xmm5, xmm1 addss xmm5, dword ptr [r14] movss dword ptr [r14], xmm5 loc_B53A7: inc edx movss xmm5, dword ptr [rbx+998h] subss xmm5, dword ptr [r14] movaps xmm6, xmm4 movaps xmm4, xmm5 loc_B53BC: movss dword ptr [rbx+rcx-3Ch], xmm5 movss dword ptr [rbx+rcx-38h], xmm6 loc_B53C8: add rcx, 0FFFFFFFFFFFFFE88h cmp rcx, 474h jnz loc_B52DA movss xmm0, dword ptr [rbx+990h] movss xmm1, dword ptr [rbx+998h] addss xmm0, dword ptr [r12] movss dword ptr [rbx+9A0h], xmm0 subss xmm1, dword ptr [r14] movss dword ptr [rbx+9A8h], xmm1 test r15, r15 jz loc_B54AC lea r13, [rsp+38h+var_34] mov rbp, rsp mov rdi, r15; this mov rsi, r12; float * mov rdx, r14; float * mov rcx, r13; float * mov r8, rbp; float * call _ZN19ImPlotAlignmentData6UpdateERfS0_S0_S0_; ImPlotAlignmentData::Update(float &,float &,float &,float &) movss xmm0, dword ptr [rbp+0] xor eax, eax mov ecx, 8DCh movss xmm1, dword ptr [r13+0] xor edx, edx loc_B5440: cmp byte ptr [rbx+rcx], 1 jnz short loc_B549C test byte ptr [rbx+rcx-167h], 1 movss xmm2, dword ptr [rbx+rcx-3Ch] jnz short loc_B5475 addss xmm2, xmm1 movss dword ptr [rbx+rcx-3Ch], xmm2 movaps xmm2, xmm1 cmp eax, 2 jge short loc_B546B xorps xmm2, xmm2 loc_B546B: inc eax addss xmm2, dword ptr [rbx+rcx-38h] jmp short loc_B5496 loc_B5475: subss xmm2, xmm0 movss dword ptr [rbx+rcx-3Ch], xmm2 movaps xmm3, xmm0 cmp edx, 2 jge short loc_B548A xorps xmm3, xmm3 loc_B548A: inc edx movss xmm2, dword ptr [rbx+rcx-38h] subss xmm2, xmm3 loc_B5496: movss dword ptr [rbx+rcx-38h], xmm2 loc_B549C: add rcx, 0FFFFFFFFFFFFFE88h cmp rcx, 474h jnz short loc_B5440 loc_B54AC: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ImPlot::PadAndDatumAxesY( ImPlot *this, ImPlotPlot *a2, float *a3, ImPlotAlignmentData *a4, ImPlotAlignmentData *a5, float a6) { long long v6; // rax ImGui *v11; // r13 float v12; // xmm1_4 float v13; // xmm3_4 float v14; // xmm4_4 float v15; // xmm2_4 float v16; // xmm0_4 long long result; // rax long long v18; // rcx int v19; // edx int v20; // esi bool v21; // di float v22; // xmm5_4 float v23; // xmm6_4 float v24; // xmm1_4 float v25; // xmm0_4 long long v26; // rcx float v27; // xmm1_4 int v28; // edx float v29; // xmm2_4 float v30; // xmm2_4 float v31; // xmm2_4 float v32; // xmm3_4 _QWORD v33[7]; // [rsp-4h] [rbp-38h] BYREF v33[0] = v6; v11 = GImPlot; ImGui::GetTextLineHeight(this); v12 = *((float *)v11 + 90); v13 = *((float *)this + 620); v14 = *((float *)this + 622); v15 = *((float *)v11 + 79) + v12; v16 = a6 + v12; result = 0LL; v18 = 2268LL; v19 = 0; do { if ( *((_BYTE *)this + v18) == 1 ) { v20 = *(_DWORD *)((char *)this + v18 - 360); v21 = *(_DWORD *)((char *)this + v18 - 36) != -1 && (v20 & 1) == 0; if ( (v20 & 0x100) != 0 ) { if ( v19 > 0 ) *a3 = *a3 + v15; if ( v21 ) *a3 = *a3 + v16; if ( (v20 & 8) == 0 ) *a3 = (float)(*(float *)((char *)this + v18 - 236) + v12) + *a3; ++v19; v22 = *((float *)this + 614) - *a3; v23 = v14; v14 = v22; } else { if ( (int)result > 0 ) *(float *)a2 = *(float *)a2 + v15; if ( v21 ) *(float *)a2 = *(float *)a2 + v16; if ( (v20 & 8) == 0 ) *(float *)a2 = (float)(*(float *)((char *)this + v18 - 236) + v12) + *(float *)a2; result = (unsigned int)(result + 1); v22 = *((float *)this + 612) + *(float *)a2; v23 = v13; v13 = v22; } *(float *)((char *)this + v18 - 60) = v22; *(float *)((char *)this + v18 - 56) = v23; } v18 -= 376LL; } while ( v18 != 1140 ); v24 = *((float *)this + 614); *((float *)this + 616) = *((float *)this + 612) + *(float *)a2; *((float *)this + 618) = v24 - *a3; if ( a4 ) { ImPlotAlignmentData::Update(a4, (float *)a2, a3, (float *)v33 + 1, (float *)v33); v25 = *(float *)v33; result = 0LL; v26 = 2268LL; v27 = *((float *)v33 + 1); v28 = 0; do { if ( *((_BYTE *)this + v26) == 1 ) { v29 = *(float *)((char *)this + v26 - 60); if ( (*((_BYTE *)this + v26 - 359) & 1) != 0 ) { *(float *)((char *)this + v26 - 60) = v29 - v25; v32 = v25; if ( v28 < 2 ) v32 = 0.0; ++v28; v31 = *(float *)((char *)this + v26 - 56) - v32; } else { *(float *)((char *)this + v26 - 60) = v29 + v27; v30 = v27; if ( (int)result < 2 ) v30 = 0.0; result = (unsigned int)(result + 1); v31 = v30 + *(float *)((char *)this + v26 - 56); } *(float *)((char *)this + v26 - 56) = v31; } v26 -= 376LL; } while ( v26 != 1140 ); } return result; }
PadAndDatumAxesY: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RCX MOV R14,RDX MOV R12,RSI MOV RBX,RDI MOV R13,qword ptr [0x00436ca0] CALL 0x0032c54f MOVSS XMM1,dword ptr [R13 + 0x168] MOVSS XMM3,dword ptr [RBX + 0x9b0] MOVSS XMM4,dword ptr [RBX + 0x9b8] MOVSS XMM2,dword ptr [R13 + 0x13c] ADDSS XMM2,XMM1 ADDSS XMM0,XMM1 XOR EAX,EAX MOV ECX,0x8dc XOR EDX,EDX LAB_001b52da: CMP byte ptr [RBX + RCX*0x1],0x1 JNZ 0x001b53c8 MOV ESI,dword ptr [RBX + RCX*0x1 + -0x168] CMP dword ptr [RBX + RCX*0x1 + -0x24],-0x1 SETNZ R8B TEST SIL,0x1 SETZ DIL AND DIL,R8B BT ESI,0x8 JC 0x001b5365 TEST EAX,EAX JLE 0x001b5319 MOVSS XMM5,dword ptr [R12] ADDSS XMM5,XMM2 MOVSS dword ptr [R12],XMM5 LAB_001b5319: TEST DIL,DIL JZ 0x001b532e MOVSS XMM5,dword ptr [R12] ADDSS XMM5,XMM0 MOVSS dword ptr [R12],XMM5 LAB_001b532e: TEST SIL,0x8 JNZ 0x001b534d MOVSS XMM5,dword ptr [RBX + RCX*0x1 + -0xec] ADDSS XMM5,XMM1 ADDSS XMM5,dword ptr [R12] MOVSS dword ptr [R12],XMM5 LAB_001b534d: INC EAX MOVSS XMM5,dword ptr [RBX + 0x990] ADDSS XMM5,dword ptr [R12] MOVAPS XMM6,XMM3 MOVAPS XMM3,XMM5 JMP 0x001b53bc LAB_001b5365: TEST EDX,EDX JLE 0x001b5377 MOVSS XMM5,dword ptr [R14] ADDSS XMM5,XMM2 MOVSS dword ptr [R14],XMM5 LAB_001b5377: TEST DIL,DIL JZ 0x001b538a MOVSS XMM5,dword ptr [R14] ADDSS XMM5,XMM0 MOVSS dword ptr [R14],XMM5 LAB_001b538a: TEST SIL,0x8 JNZ 0x001b53a7 MOVSS XMM5,dword ptr [RBX + RCX*0x1 + -0xec] ADDSS XMM5,XMM1 ADDSS XMM5,dword ptr [R14] MOVSS dword ptr [R14],XMM5 LAB_001b53a7: INC EDX MOVSS XMM5,dword ptr [RBX + 0x998] SUBSS XMM5,dword ptr [R14] MOVAPS XMM6,XMM4 MOVAPS XMM4,XMM5 LAB_001b53bc: MOVSS dword ptr [RBX + RCX*0x1 + -0x3c],XMM5 MOVSS dword ptr [RBX + RCX*0x1 + -0x38],XMM6 LAB_001b53c8: ADD RCX,-0x178 CMP RCX,0x474 JNZ 0x001b52da MOVSS XMM0,dword ptr [RBX + 0x990] MOVSS XMM1,dword ptr [RBX + 0x998] ADDSS XMM0,dword ptr [R12] MOVSS dword ptr [RBX + 0x9a0],XMM0 SUBSS XMM1,dword ptr [R14] MOVSS dword ptr [RBX + 0x9a8],XMM1 TEST R15,R15 JZ 0x001b54ac LEA R13,[RSP + 0x4] MOV RBP,RSP MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 MOV RCX,R13 MOV R8,RBP CALL 0x001c861e MOVSS XMM0,dword ptr [RBP] XOR EAX,EAX MOV ECX,0x8dc MOVSS XMM1,dword ptr [R13] XOR EDX,EDX LAB_001b5440: CMP byte ptr [RBX + RCX*0x1],0x1 JNZ 0x001b549c TEST byte ptr [RBX + RCX*0x1 + -0x167],0x1 MOVSS XMM2,dword ptr [RBX + RCX*0x1 + -0x3c] JNZ 0x001b5475 ADDSS XMM2,XMM1 MOVSS dword ptr [RBX + RCX*0x1 + -0x3c],XMM2 MOVAPS XMM2,XMM1 CMP EAX,0x2 JGE 0x001b546b XORPS XMM2,XMM2 LAB_001b546b: INC EAX ADDSS XMM2,dword ptr [RBX + RCX*0x1 + -0x38] JMP 0x001b5496 LAB_001b5475: SUBSS XMM2,XMM0 MOVSS dword ptr [RBX + RCX*0x1 + -0x3c],XMM2 MOVAPS XMM3,XMM0 CMP EDX,0x2 JGE 0x001b548a XORPS XMM3,XMM3 LAB_001b548a: INC EDX MOVSS XMM2,dword ptr [RBX + RCX*0x1 + -0x38] SUBSS XMM2,XMM3 LAB_001b5496: MOVSS dword ptr [RBX + RCX*0x1 + -0x38],XMM2 LAB_001b549c: ADD RCX,-0x178 CMP RCX,0x474 JNZ 0x001b5440 LAB_001b54ac: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ImPlot::PadAndDatumAxesY(ImPlotPlot&, float&, float&, ImPlotAlignmentData*) */ void ImPlot::PadAndDatumAxesY (ImPlotPlot *param_1,float *param_2,float *param_3,ImPlotAlignmentData *param_4) { uint uVar1; int iVar2; int iVar3; int8 in_RAX; long lVar4; int iVar5; bool bVar6; float fVar7; float fVar8; float fVar9; float fVar10; float fVar11; float fVar12; float fVar13; float fVar14; int8 local_38; lVar4 = GImPlot; local_38 = in_RAX; fVar7 = (float)ImGui::GetTextLineHeight(); fVar9 = *(float *)(lVar4 + 0x168); fVar8 = *(float *)(lVar4 + 0x13c) + fVar9; iVar3 = 0; lVar4 = 0x8dc; iVar5 = 0; fVar10 = *(float *)(param_1 + 0x9b0); fVar12 = *(float *)(param_1 + 0x9b8); do { fVar11 = fVar10; fVar13 = fVar12; if (param_1[lVar4] == (ImPlotPlot)0x1) { uVar1 = *(uint *)(param_1 + lVar4 + -0x168); iVar2 = *(int *)(param_1 + lVar4 + -0x24); bVar6 = (uVar1 & 1) == 0; if ((uVar1 >> 8 & 1) == 0) { if (0 < iVar3) { *param_2 = *param_2 + fVar8; } if (bVar6 && iVar2 != -1) { *param_2 = *param_2 + fVar7 + fVar9; } if ((uVar1 & 8) == 0) { *param_2 = *(float *)(param_1 + lVar4 + -0xec) + fVar9 + *param_2; } iVar3 = iVar3 + 1; fVar11 = *(float *)(param_1 + 0x990) + *param_2; fVar14 = *(float *)(param_1 + 0x990) + *param_2; fVar12 = fVar10; } else { if (0 < iVar5) { *param_3 = *param_3 + fVar8; } if (bVar6 && iVar2 != -1) { *param_3 = *param_3 + fVar7 + fVar9; } if ((uVar1 & 8) == 0) { *param_3 = *(float *)(param_1 + lVar4 + -0xec) + fVar9 + *param_3; } iVar5 = iVar5 + 1; fVar13 = *(float *)(param_1 + 0x998) - *param_3; fVar14 = fVar13; } *(float *)(param_1 + lVar4 + -0x3c) = fVar14; *(float *)(param_1 + lVar4 + -0x38) = fVar12; } lVar4 = lVar4 + -0x178; fVar10 = fVar11; fVar12 = fVar13; } while (lVar4 != 0x474); *(float *)(param_1 + 0x9a0) = *(float *)(param_1 + 0x990) + *param_2; *(float *)(param_1 + 0x9a8) = *(float *)(param_1 + 0x998) - *param_3; if (param_4 != (ImPlotAlignmentData *)0x0) { ImPlotAlignmentData::Update (param_4,param_2,param_3,(float *)((long)&local_38 + 4),(float *)&local_38); iVar3 = 0; lVar4 = 0x8dc; iVar5 = 0; do { if (param_1[lVar4] == (ImPlotPlot)0x1) { if (((byte)param_1[lVar4 + -0x167] & 1) == 0) { *(float *)(param_1 + lVar4 + -0x3c) = *(float *)(param_1 + lVar4 + -0x3c) + local_38._4_4_ ; fVar9 = local_38._4_4_; if (iVar3 < 2) { fVar9 = 0.0; } iVar3 = iVar3 + 1; fVar9 = fVar9 + *(float *)(param_1 + lVar4 + -0x38); } else { *(float *)(param_1 + lVar4 + -0x3c) = *(float *)(param_1 + lVar4 + -0x3c) - (float)local_38; fVar9 = (float)local_38; if (iVar5 < 2) { fVar9 = 0.0; } iVar5 = iVar5 + 1; fVar9 = *(float *)(param_1 + lVar4 + -0x38) - fVar9; } *(float *)(param_1 + lVar4 + -0x38) = fVar9; } lVar4 = lVar4 + -0x178; } while (lVar4 != 0x474); } return; }