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
44,900
Balloc
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static Bigint *Balloc(int k, Stack_alloc *alloc) { Bigint *rv; DBUG_ASSERT(k <= Kmax); if (k <= Kmax && alloc->freelist[k]) { rv= alloc->freelist[k]; alloc->freelist[k]= rv->p.next; } else { int x, len; x= 1 << k; len= MY_ALIGN(sizeof(Bigint) + x * sizeof(ULong), SIZEOF_CHARP); if (alloc->free + len <= alloc->end) { rv= (Bigint*) alloc->free; alloc->free+= len; } else rv= (Bigint*) malloc(len); rv->k= k; rv->maxwds= x; } rv->sign= rv->wds= 0; rv->p.x= (ULong*) (rv + 1); return rv; }
O0
c
Balloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) cmpl $0xf, -0x4(%rbp) jg 0x57b1f movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx cmpq $0x0, 0x18(%rax,%rcx,8) je 0x57b1f movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx movq 0x18(%rax,%rcx,8), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rdx movq -0x10(%rbp), %rax movslq -0x4(%rbp), %rcx movq %rdx, 0x18(%rax,%rcx,8) jmp 0x57ba4 movl -0x4(%rbp), %ecx movl $0x1, %eax shll %cl, %eax movl %eax, -0x1c(%rbp) movslq -0x1c(%rbp), %rax shlq $0x2, %rax addq $0x18, %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x20(%rbp), %rcx addq %rcx, %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax ja 0x57b83 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movl -0x20(%rbp), %edx movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0x8(%rax) jmp 0x57b90 movslq -0x20(%rbp), %rdi callq 0x36920 movq %rax, -0x18(%rbp) movl -0x4(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x8(%rax) movl -0x1c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x14(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x10(%rax) movq -0x18(%rbp), %rcx addq $0x18, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
Balloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi cmp [rbp+var_4], 0Fh jg short loc_57B1F mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] cmp qword ptr [rax+rcx*8+18h], 0 jz short loc_57B1F mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] mov rax, [rax+rcx*8+18h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov rdx, [rax] mov rax, [rbp+var_10] movsxd rcx, [rbp+var_4] mov [rax+rcx*8+18h], rdx jmp loc_57BA4 loc_57B1F: mov ecx, [rbp+var_4] mov eax, 1 shl eax, cl mov [rbp+var_1C], eax movsxd rax, [rbp+var_1C] shl rax, 2 add rax, 18h add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_20], eax mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rcx, [rbp+var_20] add rax, rcx mov rcx, [rbp+var_10] cmp rax, [rcx+10h] ja short loc_57B83 mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov edx, [rbp+var_20] mov rax, [rbp+var_10] mov rcx, [rax+8] movsxd rdx, edx add rcx, rdx mov [rax+8], rcx jmp short loc_57B90 loc_57B83: movsxd rdi, [rbp+var_20] call _malloc mov [rbp+var_18], rax loc_57B90: mov ecx, [rbp+var_4] mov rax, [rbp+var_18] mov [rax+8], ecx mov ecx, [rbp+var_1C] mov rax, [rbp+var_18] mov [rax+0Ch], ecx loc_57BA4: mov rax, [rbp+var_18] mov dword ptr [rax+14h], 0 mov rax, [rbp+var_18] mov dword ptr [rax+10h], 0 mov rcx, [rbp+var_18] add rcx, 18h mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
long long Balloc(int a1, long long a2) { signed int v3; // [rsp+0h] [rbp-20h] long long v4; // [rsp+8h] [rbp-18h] if ( a1 <= 15 && *(_QWORD *)(a2 + 8LL * a1 + 24) ) { v4 = *(_QWORD *)(a2 + 8LL * a1 + 24); *(_QWORD *)(a2 + 8LL * a1 + 24) = *(_QWORD *)v4; } else { v3 = (4 * (1 << a1) + 31) & 0xFFFFFFF8; if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) ) { v4 = malloc(v3); } else { v4 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 8) = v3 + v4; } *(_DWORD *)(v4 + 8) = a1; *(_DWORD *)(v4 + 12) = 1 << a1; } *(_DWORD *)(v4 + 20) = 0; *(_DWORD *)(v4 + 16) = 0; *(_QWORD *)v4 = v4 + 24; return v4; }
Balloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI CMP dword ptr [RBP + -0x4],0xf JG 0x00157b1f MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] CMP qword ptr [RAX + RCX*0x8 + 0x18],0x0 JZ 0x00157b1f MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RAX + RCX*0x8 + 0x18] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x4] MOV qword ptr [RAX + RCX*0x8 + 0x18],RDX JMP 0x00157ba4 LAB_00157b1f: MOV ECX,dword ptr [RBP + -0x4] MOV EAX,0x1 SHL EAX,CL MOV dword ptr [RBP + -0x1c],EAX MOVSXD RAX,dword ptr [RBP + -0x1c] SHL RAX,0x2 ADD RAX,0x18 ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RBP + -0x20] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JA 0x00157b83 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV EDX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX JMP 0x00157b90 LAB_00157b83: MOVSXD RDI,dword ptr [RBP + -0x20] CALL 0x00136920 MOV qword ptr [RBP + -0x18],RAX LAB_00157b90: MOV ECX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x8],ECX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0xc],ECX LAB_00157ba4: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x14],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x10],0x0 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
int8 * Balloc(int param_1,long param_2) { int iVar1; uint uVar2; int8 *local_20; if ((param_1 < 0x10) && (*(long *)(param_2 + 0x18 + (long)param_1 * 8) != 0)) { local_20 = *(int8 **)(param_2 + 0x18 + (long)param_1 * 8); *(int8 *)(param_2 + 0x18 + (long)param_1 * 8) = *local_20; } else { iVar1 = 1 << ((byte)param_1 & 0x1f); uVar2 = iVar1 * 4 + 0x1fU & 0xfffffff8; if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar2)) { local_20 = (int8 *)malloc((long)(int)uVar2); } else { local_20 = *(int8 **)(param_2 + 8); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar2; } *(int *)(local_20 + 1) = param_1; *(int *)((long)local_20 + 0xc) = iVar1; } *(int4 *)((long)local_20 + 0x14) = 0; *(int4 *)(local_20 + 2) = 0; *local_20 = local_20 + 3; return local_20; }
44,901
my_mb_wc_utf16_quick
eloqsql/strings/ctype-utf16.h
static inline int my_mb_wc_utf16_quick(my_wc_t *pwc, const uchar *s, const uchar *e) { if (s + 2 > e) return MY_CS_TOOSMALL2; /* High bytes: 0xD[89AB] = B'110110??' Low bytes: 0xD[CDEF] = B'110111??' Surrogate mask: 0xFC = B'11111100' */ if (MY_UTF16_HIGH_HEAD(*s)) /* Surrogate head */ { if (s + 4 > e) return MY_CS_TOOSMALL4; if (!MY_UTF16_LOW_HEAD(s[2])) /* Broken surrigate pair */ return MY_CS_ILSEQ; *pwc= MY_UTF16_WC4(s[0], s[1], s[2], s[3]); return 4; } if (MY_UTF16_LOW_HEAD(*s)) /* Low surrogate part without high part */ return MY_CS_ILSEQ; *pwc= MY_UTF16_WC2(s[0], s[1]); return 2; }
O0
c
my_mb_wc_utf16_quick: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x5e16a movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x5e248 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xd8, %eax jne 0x5e207 movq -0x18(%rbp), %rax addq $0x4, %rax cmpq -0x20(%rbp), %rax jbe 0x5e19b movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x5e248 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax je 0x5e1bb movl $0x0, -0x4(%rbp) jmp 0x5e248 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0x3, %eax shll $0x12, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0xa, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx andl $0x3, %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x3(%rcx), %ecx addl %ecx, %eax addl $0x10000, %eax # imm = 0x10000 movslq %eax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0x5e248 movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0xfc, %eax cmpl $0xdc, %eax jne 0x5e223 movl $0x0, -0x4(%rbp) jmp 0x5e248 movq -0x18(%rbp), %rax movzbl (%rax), %eax shll $0x8, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx addl %ecx, %eax movslq %eax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax)
my_mb_wc_utf16_quick: 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] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_5E16A mov [rbp+var_4], 0FFFFFF9Ah jmp loc_5E248 loc_5E16A: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0D8h jnz loc_5E207 mov rax, [rbp+var_18] add rax, 4 cmp rax, [rbp+var_20] jbe short loc_5E19B mov [rbp+var_4], 0FFFFFF98h jmp loc_5E248 loc_5E19B: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] and eax, 0FCh cmp eax, 0DCh jz short loc_5E1BB mov [rbp+var_4], 0 jmp loc_5E248 loc_5E1BB: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 3 shl eax, 12h mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 0Ah add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] and ecx, 3 shl ecx, 8 add eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+3] add eax, ecx add eax, 10000h movsxd rcx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_5E248 loc_5E207: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 0FCh cmp eax, 0DCh jnz short loc_5E223 mov [rbp+var_4], 0 jmp short loc_5E248 loc_5E223: mov rax, [rbp+var_18] movzx eax, byte ptr [rax] shl eax, 8 mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] add eax, ecx movsxd rcx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 2 loc_5E248: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf16_quick(_QWORD *a1, unsigned __int8 *a2, unsigned long long a3) { if ( (unsigned long long)(a2 + 2) <= a3 ) { if ( (*a2 & 0xFC) == 0xD8 ) { if ( (unsigned long long)(a2 + 4) <= a3 ) { if ( (a2[2] & 0xFC) == 0xDC ) { *a1 = a2[3] + ((a2[2] & 3) << 8) + (a2[1] << 10) + ((*a2 & 3) << 18) + 0x10000; return 4; } else { return 0; } } else { return (unsigned int)-104; } } else if ( (*a2 & 0xFC) == 0xDC ) { return 0; } else { *a1 = a2[1] + (*a2 << 8); return 2; } } else { return (unsigned int)-102; } }
my_mb_wc_utf16_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] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0015e16a MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0015e248 LAB_0015e16a: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xd8 JNZ 0x0015e207 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0015e19b MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x0015e248 LAB_0015e19b: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] AND EAX,0xfc CMP EAX,0xdc JZ 0x0015e1bb MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015e248 LAB_0015e1bb: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0x3 SHL EAX,0x12 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0xa ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] AND ECX,0x3 SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x3] ADD EAX,ECX ADD EAX,0x10000 MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x0015e248 LAB_0015e207: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0xfc CMP EAX,0xdc JNZ 0x0015e223 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015e248 LAB_0015e223: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] ADD EAX,ECX MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 LAB_0015e248: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf16_quick(long *param_1,byte *param_2,byte *param_3) { int4 local_c; if (param_3 < param_2 + 2) { local_c = 0xffffff9a; } else if ((*param_2 & 0xfc) == 0xd8) { if (param_3 < param_2 + 4) { local_c = 0xffffff98; } else if ((param_2[2] & 0xfc) == 0xdc) { *param_1 = (long)(int)((*param_2 & 3) * 0x40000 + (uint)param_2[1] * 0x400 + (param_2[2] & 3) * 0x100 + (uint)param_2[3] + 0x10000); local_c = 4; } else { local_c = 0; } } else if ((*param_2 & 0xfc) == 0xdc) { local_c = 0; } else { *param_1 = (long)(int)((uint)*param_2 * 0x100 + (uint)param_2[1]); local_c = 2; } return local_c; }
44,902
ma_net_write_command
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_write_command(NET *net, uchar command, const char *packet, size_t len, my_bool disable_flush) { uchar buff[NET_HEADER_SIZE+1]; size_t buff_size= NET_HEADER_SIZE + 1; size_t length= 1 + len; /* 1 extra byte for command */ int rc; buff[NET_HEADER_SIZE]= 0; buff[4]=command; if (length >= MAX_PACKET_LENGTH) { len= MAX_PACKET_LENGTH - 1; do { int3store(buff, MAX_PACKET_LENGTH); buff[3]= (net->compress) ? 0 : (uchar) (net->pkt_nr++); if (ma_net_write_buff(net, (char *)buff, buff_size) || ma_net_write_buff(net, packet, len)) return(1); packet+= len; length-= MAX_PACKET_LENGTH; len= MAX_PACKET_LENGTH; buff_size= NET_HEADER_SIZE; /* don't send command for further packets */ } while (length >= MAX_PACKET_LENGTH); len= length; } int3store(buff,length); buff[3]= (net->compress) ? 0 :(uchar) (net->pkt_nr++); rc= test (ma_net_write_buff(net,(char *)buff, buff_size) || ma_net_write_buff(net,packet,len)); if (!rc && !disable_flush) return test(ma_net_flush(net)); return rc; }
O0
c
ma_net_write_command: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movb %r8b, %al movq %fs:0x28, %r8 movq %r8, -0x8(%rbp) movq %rdi, -0x20(%rbp) movb %sil, -0x21(%rbp) movq %rdx, -0x30(%rbp) movq %rcx, -0x38(%rbp) movb %al, -0x39(%rbp) movq $0x5, -0x48(%rbp) movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) movb $0x0, -0x9(%rbp) movb -0x21(%rbp), %al movb %al, -0x9(%rbp) cmpq $0xffffff, -0x50(%rbp) # imm = 0xFFFFFF jb 0xce9d7 movq $0xfffffe, -0x38(%rbp) # imm = 0xFFFFFE jmp 0xce921 movb $-0x1, -0xd(%rbp) movb $-0x1, -0xc(%rbp) movb $-0x1, -0xb(%rbp) movq -0x20(%rbp), %rax movsbl 0x84(%rax), %eax cmpl $0x0, %eax je 0xce944 xorl %eax, %eax movl %eax, -0x58(%rbp) jmp 0xce959 movq -0x20(%rbp), %rcx movl 0x60(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x60(%rcx) movzbl %al, %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movb %al, -0xa(%rbp) movq -0x20(%rbp), %rdi leaq -0xd(%rbp), %rsi movq -0x48(%rbp), %rdx callq 0xce6e0 cmpl $0x0, %eax jne 0xce98b movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0xce6e0 cmpl $0x0, %eax je 0xce997 movl $0x1, -0x14(%rbp) jmp 0xceaa1 movq -0x38(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x50(%rbp), %rax subq $0xffffff, %rax # imm = 0xFFFFFF movq %rax, -0x50(%rbp) movq $0xffffff, -0x38(%rbp) # imm = 0xFFFFFF movq $0x4, -0x48(%rbp) cmpq $0xffffff, -0x50(%rbp) # imm = 0xFFFFFF jae 0xce91f movq -0x50(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0xce9d9 movq -0x50(%rbp), %rax movb %al, -0xd(%rbp) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, -0xc(%rbp) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, -0xb(%rbp) movq -0x20(%rbp), %rax movsbl 0x84(%rax), %eax cmpl $0x0, %eax je 0xcea0d xorl %eax, %eax movl %eax, -0x5c(%rbp) jmp 0xcea22 movq -0x20(%rbp), %rcx movl 0x60(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x60(%rcx) movzbl %al, %eax movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movb %al, -0xa(%rbp) movq -0x20(%rbp), %rdi leaq -0xd(%rbp), %rsi movq -0x48(%rbp), %rdx callq 0xce6e0 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x5d(%rbp) jne 0xcea5f movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0xce6e0 cmpl $0x0, %eax setne %al movb %al, -0x5d(%rbp) movb -0x5d(%rbp), %dl xorl %eax, %eax movl $0x1, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x54(%rbp) cmpl $0x0, -0x54(%rbp) jne 0xcea9b cmpb $0x0, -0x39(%rbp) jne 0xcea9b movq -0x20(%rbp), %rdi callq 0xce170 movl %eax, %edx xorl %eax, %eax movl $0x1, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x14(%rbp) jmp 0xceaa1 movl -0x54(%rbp), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x64(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xceac2 movl -0x64(%rbp), %eax addq $0x70, %rsp popq %rbp retq callq 0x3a2a0 nopw (%rax,%rax)
ma_net_write_command: push rbp mov rbp, rsp sub rsp, 70h mov al, r8b mov r8, fs:28h mov [rbp+var_8], r8 mov [rbp+var_20], rdi mov [rbp+var_21], sil mov [rbp+var_30], rdx mov [rbp+var_38], rcx mov [rbp+var_39], al mov [rbp+var_48], 5 mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_50], rax mov [rbp+var_9], 0 mov al, [rbp+var_21] mov [rbp+var_9], al cmp [rbp+var_50], 0FFFFFFh jb loc_CE9D7 mov [rbp+var_38], 0FFFFFEh loc_CE91F: jmp short $+2 loc_CE921: mov [rbp+var_D], 0FFh mov [rbp+var_C], 0FFh mov [rbp+var_B], 0FFh mov rax, [rbp+var_20] movsx eax, byte ptr [rax+84h] cmp eax, 0 jz short loc_CE944 xor eax, eax mov [rbp+var_58], eax jmp short loc_CE959 loc_CE944: mov rcx, [rbp+var_20] mov eax, [rcx+60h] mov edx, eax add edx, 1 mov [rcx+60h], edx movzx eax, al mov [rbp+var_58], eax loc_CE959: mov eax, [rbp+var_58] mov [rbp+var_A], al mov rdi, [rbp+var_20] lea rsi, [rbp+var_D] mov rdx, [rbp+var_48] call ma_net_write_buff cmp eax, 0 jnz short loc_CE98B mov rdi, [rbp+var_20] mov rsi, [rbp+var_30] mov rdx, [rbp+var_38] call ma_net_write_buff cmp eax, 0 jz short loc_CE997 loc_CE98B: mov [rbp+var_14], 1 jmp loc_CEAA1 loc_CE997: mov rax, [rbp+var_38] add rax, [rbp+var_30] mov [rbp+var_30], rax mov rax, [rbp+var_50] sub rax, 0FFFFFFh mov [rbp+var_50], rax mov [rbp+var_38], 0FFFFFFh mov [rbp+var_48], 4 cmp [rbp+var_50], 0FFFFFFh jnb loc_CE91F mov rax, [rbp+var_50] mov [rbp+var_38], rax loc_CE9D7: jmp short $+2 loc_CE9D9: mov rax, [rbp+var_50] mov [rbp+var_D], al mov rax, [rbp+var_50] shr rax, 8 mov [rbp+var_C], al mov rax, [rbp+var_50] shr rax, 10h mov [rbp+var_B], al mov rax, [rbp+var_20] movsx eax, byte ptr [rax+84h] cmp eax, 0 jz short loc_CEA0D xor eax, eax mov [rbp+var_5C], eax jmp short loc_CEA22 loc_CEA0D: mov rcx, [rbp+var_20] mov eax, [rcx+60h] mov edx, eax add edx, 1 mov [rcx+60h], edx movzx eax, al mov [rbp+var_5C], eax loc_CEA22: mov eax, [rbp+var_5C] mov [rbp+var_A], al mov rdi, [rbp+var_20] lea rsi, [rbp+var_D] mov rdx, [rbp+var_48] call ma_net_write_buff mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_5D], al jnz short loc_CEA5F mov rdi, [rbp+var_20] mov rsi, [rbp+var_30] mov rdx, [rbp+var_38] call ma_net_write_buff cmp eax, 0 setnz al mov [rbp+var_5D], al loc_CEA5F: mov dl, [rbp+var_5D] xor eax, eax mov ecx, 1 test dl, 1 cmovnz eax, ecx mov [rbp+var_54], eax cmp [rbp+var_54], 0 jnz short loc_CEA9B cmp [rbp+var_39], 0 jnz short loc_CEA9B mov rdi, [rbp+var_20] call ma_net_flush mov edx, eax xor eax, eax mov ecx, 1 cmp edx, 0 cmovnz eax, ecx mov [rbp+var_14], eax jmp short loc_CEAA1 loc_CEA9B: mov eax, [rbp+var_54] mov [rbp+var_14], eax loc_CEAA1: mov eax, [rbp+var_14] mov [rbp+var_64], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_CEAC2 mov eax, [rbp+var_64] add rsp, 70h pop rbp retn loc_CEAC2: call ___stack_chk_fail
_BOOL8 ma_net_write_command(long long a1, char a2, long long a3, unsigned long long a4, char a5) { int v5; // eax int v6; // eax bool v8; // [rsp+13h] [rbp-5Dh] char v9; // [rsp+14h] [rbp-5Ch] char v10; // [rsp+18h] [rbp-58h] unsigned long long v11; // [rsp+20h] [rbp-50h] unsigned long long v12; // [rsp+28h] [rbp-48h] unsigned long long v14; // [rsp+38h] [rbp-38h] unsigned long long v15; // [rsp+38h] [rbp-38h] __int16 v18; // [rsp+63h] [rbp-Dh] BYREF char v19; // [rsp+65h] [rbp-Bh] char v20; // [rsp+66h] [rbp-Ah] char v21; // [rsp+67h] [rbp-9h] unsigned long long v22; // [rsp+68h] [rbp-8h] v22 = __readfsqword(0x28u); v14 = a4; v12 = 5LL; v11 = a4 + 1; v21 = a2; if ( a4 + 1 >= 0xFFFFFF ) { v15 = 16777214LL; do { v18 = -1; v19 = -1; if ( *(_BYTE *)(a1 + 132) ) { v10 = 0; } else { v5 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v5 + 1; v10 = v5; } v20 = v10; if ( ma_net_write_buff(a1, (long long)&v18, v12) || ma_net_write_buff(a1, a3, v15) ) return 1; a3 += v15; v11 -= 0xFFFFFFLL; v15 = 0xFFFFFFLL; v12 = 4LL; } while ( v11 >= 0xFFFFFF ); v14 = v11; } v18 = v11; v19 = BYTE2(v11); if ( *(_BYTE *)(a1 + 132) ) { v9 = 0; } else { v6 = *(_DWORD *)(a1 + 96); *(_DWORD *)(a1 + 96) = v6 + 1; v9 = v6; } v20 = v9; v8 = 1; if ( !ma_net_write_buff(a1, (long long)&v18, v12) ) v8 = ma_net_write_buff(a1, a3, v14); if ( v8 || a5 ) return v8; else return ma_net_flush(a1) != 0; }
ma_net_write_command: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV AL,R8B MOV R8,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],R8 MOV qword ptr [RBP + -0x20],RDI MOV byte ptr [RBP + -0x21],SIL MOV qword ptr [RBP + -0x30],RDX MOV qword ptr [RBP + -0x38],RCX MOV byte ptr [RBP + -0x39],AL MOV qword ptr [RBP + -0x48],0x5 MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX MOV byte ptr [RBP + -0x9],0x0 MOV AL,byte ptr [RBP + -0x21] MOV byte ptr [RBP + -0x9],AL CMP qword ptr [RBP + -0x50],0xffffff JC 0x001ce9d7 MOV qword ptr [RBP + -0x38],0xfffffe LAB_001ce91f: JMP 0x001ce921 LAB_001ce921: MOV byte ptr [RBP + -0xd],0xff MOV byte ptr [RBP + -0xc],0xff MOV byte ptr [RBP + -0xb],0xff MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX + 0x84] CMP EAX,0x0 JZ 0x001ce944 XOR EAX,EAX MOV dword ptr [RBP + -0x58],EAX JMP 0x001ce959 LAB_001ce944: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RCX + 0x60] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x60],EDX MOVZX EAX,AL MOV dword ptr [RBP + -0x58],EAX LAB_001ce959: MOV EAX,dword ptr [RBP + -0x58] MOV byte ptr [RBP + -0xa],AL MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x48] CALL 0x001ce6e0 CMP EAX,0x0 JNZ 0x001ce98b MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x38] CALL 0x001ce6e0 CMP EAX,0x0 JZ 0x001ce997 LAB_001ce98b: MOV dword ptr [RBP + -0x14],0x1 JMP 0x001ceaa1 LAB_001ce997: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0xffffff MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x38],0xffffff MOV qword ptr [RBP + -0x48],0x4 CMP qword ptr [RBP + -0x50],0xffffff JNC 0x001ce91f MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX LAB_001ce9d7: JMP 0x001ce9d9 LAB_001ce9d9: MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RBP + -0xd],AL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV byte ptr [RBP + -0xc],AL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x20] MOVSX EAX,byte ptr [RAX + 0x84] CMP EAX,0x0 JZ 0x001cea0d XOR EAX,EAX MOV dword ptr [RBP + -0x5c],EAX JMP 0x001cea22 LAB_001cea0d: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RCX + 0x60] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x60],EDX MOVZX EAX,AL MOV dword ptr [RBP + -0x5c],EAX LAB_001cea22: MOV EAX,dword ptr [RBP + -0x5c] MOV byte ptr [RBP + -0xa],AL MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0xd] MOV RDX,qword ptr [RBP + -0x48] CALL 0x001ce6e0 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x5d],AL JNZ 0x001cea5f MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x38] CALL 0x001ce6e0 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x5d],AL LAB_001cea5f: MOV DL,byte ptr [RBP + -0x5d] XOR EAX,EAX MOV ECX,0x1 TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x54],EAX CMP dword ptr [RBP + -0x54],0x0 JNZ 0x001cea9b CMP byte ptr [RBP + -0x39],0x0 JNZ 0x001cea9b MOV RDI,qword ptr [RBP + -0x20] CALL 0x001ce170 MOV EDX,EAX XOR EAX,EAX MOV ECX,0x1 CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x14],EAX JMP 0x001ceaa1 LAB_001cea9b: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x14],EAX LAB_001ceaa1: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x64],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001ceac2 MOV EAX,dword ptr [RBP + -0x64] ADD RSP,0x70 POP RBP RET LAB_001ceac2: CALL 0x0013a2a0
bool ma_net_write_command(long param_1,int1 param_2,long param_3,ulong param_4,char param_5) { ulong uVar1; int iVar2; long in_FS_OFFSET; bool bVar3; int1 local_64; int1 local_60; ulong local_58; int8 local_50; ulong local_40; long local_38; int1 local_15; int1 local_14; int1 local_13; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_50 = 5; local_58 = param_4 + 1; uVar1 = param_4; local_38 = param_3; local_11 = param_2; if (0xfffffe < local_58) { local_40 = 0xfffffe; do { local_15 = 0xff; local_14 = 0xff; local_13 = 0xff; if (*(char *)(param_1 + 0x84) == '\0') { iVar2 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar2 + 1; local_60 = (int1)iVar2; } else { local_60 = 0; } local_12 = local_60; iVar2 = ma_net_write_buff(param_1,&local_15,local_50); if ((iVar2 != 0) || (iVar2 = ma_net_write_buff(param_1,local_38,local_40), iVar2 != 0)) { bVar3 = true; goto LAB_001ceaa1; } local_38 = local_40 + local_38; local_58 = local_58 - 0xffffff; local_40 = 0xffffff; local_50 = 4; uVar1 = local_58; } while (0xfffffe < local_58); } local_40 = uVar1; local_15 = (int1)local_58; local_14 = (int1)(local_58 >> 8); local_13 = (int1)(local_58 >> 0x10); if (*(char *)(param_1 + 0x84) == '\0') { iVar2 = *(int *)(param_1 + 0x60); *(int *)(param_1 + 0x60) = iVar2 + 1; local_64 = (int1)iVar2; } else { local_64 = 0; } local_12 = local_64; iVar2 = ma_net_write_buff(param_1,&local_15,local_50); bVar3 = true; if (iVar2 == 0) { iVar2 = ma_net_write_buff(param_1,local_38,local_40); bVar3 = iVar2 != 0; } if ((bVar3 == false) && (param_5 == '\0')) { iVar2 = ma_net_flush(param_1); bVar3 = iVar2 != 0; } LAB_001ceaa1: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return bVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
44,903
my_create_with_symlink
eloqsql/mysys/my_symlink2.c
File my_create_with_symlink(const char *linkname, const char *filename, int createflags, int access_flags, myf MyFlags) { File file; int tmp_errno; /* Test if we should create a link */ int create_link; char abs_linkname[FN_REFLEN]; DBUG_ENTER("my_create_with_symlink"); DBUG_PRINT("enter", ("linkname: %s filename: %s", linkname ? linkname : "(NULL)", filename ? filename : "(NULL)")); if (my_disable_symlinks) { DBUG_PRINT("info", ("Symlinks disabled")); /* Create only the file, not the link and file */ create_link= 0; if (linkname) filename= linkname; } else { if (linkname) my_realpath(abs_linkname, linkname, MYF(0)); create_link= (linkname && strcmp(abs_linkname,filename)); } if (!(MyFlags & MY_DELETE_OLD)) { if (!access(filename,F_OK)) { my_errno= errno= EEXIST; my_error(EE_CANTCREATEFILE, MYF(0), filename, EEXIST); DBUG_RETURN(-1); } if (create_link && !access(linkname,F_OK)) { my_errno= errno= EEXIST; my_error(EE_CANTCREATEFILE, MYF(0), linkname, EEXIST); DBUG_RETURN(-1); } } if ((file=my_create(filename, createflags, access_flags, MyFlags)) >= 0) { if (create_link) { /* Delete old link/file */ if (MyFlags & MY_DELETE_OLD) my_delete(linkname, MYF(0)); /* Create link */ if (my_symlink(filename, linkname, MyFlags)) { /* Fail, remove everything we have done */ tmp_errno=my_errno; my_close(file,MYF(0)); my_delete(filename, MYF(0)); file= -1; my_errno=tmp_errno; } } } DBUG_RETURN(file); }
O0
c
my_create_with_symlink: pushq %rbp movq %rsp, %rbp subq $0x250, %rsp # imm = 0x250 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x220(%rbp) movq %rsi, -0x228(%rbp) movl %edx, -0x22c(%rbp) movl %ecx, -0x230(%rbp) movq %r8, -0x238(%rbp) jmp 0xfb58b leaq 0xb8eeba(%rip), %rax # 0xc8a44c cmpb $0x0, (%rax) je 0xfb5bf jmp 0xfb599 jmp 0xfb59b movl $0x0, -0x244(%rbp) cmpq $0x0, -0x220(%rbp) je 0xfb5bd movq -0x220(%rbp), %rax movq %rax, -0x228(%rbp) jmp 0xfb622 cmpq $0x0, -0x220(%rbp) je 0xfb5e0 leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0xfb170 xorl %eax, %eax cmpq $0x0, -0x220(%rbp) movb %al, -0x245(%rbp) je 0xfb611 leaq -0x210(%rbp), %rdi movq -0x228(%rbp), %rsi callq 0x2a650 cmpl $0x0, %eax setne %al movb %al, -0x245(%rbp) movb -0x245(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x244(%rbp) movq -0x238(%rbp), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax jne 0xfb6ec movq -0x228(%rbp), %rdi xorl %esi, %esi callq 0x2a100 cmpl $0x0, %eax jne 0xfb68d callq 0x2a750 movl $0x11, (%rax) callq 0xfc1b0 movl $0x11, (%rax) movq -0x228(%rbp), %rdx movl $0x1, %edi xorl %eax, %eax movl %eax, %esi movl $0x11, %ecx movb $0x0, %al callq 0xf1ba0 movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF jmp 0xfb7ca cmpl $0x0, -0x244(%rbp) je 0xfb6ea movq -0x220(%rbp), %rdi xorl %esi, %esi callq 0x2a100 cmpl $0x0, %eax jne 0xfb6ea callq 0x2a750 movl $0x11, (%rax) callq 0xfc1b0 movl $0x11, (%rax) movq -0x220(%rbp), %rdx movl $0x1, %edi xorl %eax, %eax movl %eax, %esi movl $0x11, %ecx movb $0x0, %al callq 0xf1ba0 movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF jmp 0xfb7ca jmp 0xfb6ec movq -0x228(%rbp), %rdi movl -0x22c(%rbp), %esi movl -0x230(%rbp), %edx movq -0x238(%rbp), %rcx callq 0xf16e0 movl %eax, -0x23c(%rbp) cmpl $0x0, %eax jl 0xfb7bc cmpl $0x0, -0x244(%rbp) je 0xfb7ba movq -0x238(%rbp), %rax andq $0x100, %rax # imm = 0x100 cmpq $0x0, %rax je 0xfb74a movq -0x220(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xf17b0 movq -0x228(%rbp), %rdi movq -0x220(%rbp), %rsi movq -0x238(%rbp), %rdx callq 0xfb040 cmpl $0x0, %eax je 0xfb7b8 callq 0xfc1b0 movl (%rax), %eax movl %eax, -0x240(%rbp) movl -0x23c(%rbp), %edi xorl %eax, %eax movl %eax, %esi callq 0xfa5f0 movq -0x228(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xf17b0 movl $0xffffffff, -0x23c(%rbp) # imm = 0xFFFFFFFF movl -0x240(%rbp), %eax movl %eax, -0x24c(%rbp) callq 0xfc1b0 movl -0x24c(%rbp), %ecx movl %ecx, (%rax) jmp 0xfb7ba jmp 0xfb7bc jmp 0xfb7be movl -0x23c(%rbp), %eax movl %eax, -0x214(%rbp) movl -0x214(%rbp), %eax movl %eax, -0x250(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xfb7f7 movl -0x250(%rbp), %eax addq $0x250, %rsp # imm = 0x250 popq %rbp retq callq 0x2a250 nopl (%rax)
my_create_with_symlink: push rbp mov rbp, rsp sub rsp, 250h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_220], rdi mov [rbp+var_228], rsi mov [rbp+var_22C], edx mov [rbp+var_230], ecx mov [rbp+var_238], r8 jmp short $+2 loc_FB58B: lea rax, my_disable_symlinks cmp byte ptr [rax], 0 jz short loc_FB5BF jmp short $+2 loc_FB599: jmp short $+2 loc_FB59B: mov [rbp+var_244], 0 cmp [rbp+var_220], 0 jz short loc_FB5BD mov rax, [rbp+var_220] mov [rbp+var_228], rax loc_FB5BD: jmp short loc_FB622 loc_FB5BF: cmp [rbp+var_220], 0 jz short loc_FB5E0 lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] xor eax, eax mov edx, eax call my_realpath loc_FB5E0: xor eax, eax cmp [rbp+var_220], 0 mov [rbp+var_245], al jz short loc_FB611 lea rdi, [rbp+var_210] mov rsi, [rbp+var_228] call _strcmp cmp eax, 0 setnz al mov [rbp+var_245], al loc_FB611: mov al, [rbp+var_245] and al, 1 movzx eax, al mov [rbp+var_244], eax loc_FB622: mov rax, [rbp+var_238] and rax, 100h cmp rax, 0 jnz loc_FB6EC mov rdi, [rbp+var_228] xor esi, esi call _access cmp eax, 0 jnz short loc_FB68D call ___errno_location mov dword ptr [rax], 11h call _my_thread_var mov dword ptr [rax], 11h mov rdx, [rbp+var_228] mov edi, 1 xor eax, eax mov esi, eax mov ecx, 11h mov al, 0 call my_error mov [rbp+var_214], 0FFFFFFFFh jmp loc_FB7CA loc_FB68D: cmp [rbp+var_244], 0 jz short loc_FB6EA mov rdi, [rbp+var_220] xor esi, esi call _access cmp eax, 0 jnz short loc_FB6EA call ___errno_location mov dword ptr [rax], 11h call _my_thread_var mov dword ptr [rax], 11h mov rdx, [rbp+var_220] mov edi, 1 xor eax, eax mov esi, eax mov ecx, 11h mov al, 0 call my_error mov [rbp+var_214], 0FFFFFFFFh jmp loc_FB7CA loc_FB6EA: jmp short $+2 loc_FB6EC: mov rdi, [rbp+var_228] mov esi, [rbp+var_22C] mov edx, [rbp+var_230] mov rcx, [rbp+var_238] call my_create mov [rbp+var_23C], eax cmp eax, 0 jl loc_FB7BC cmp [rbp+var_244], 0 jz loc_FB7BA mov rax, [rbp+var_238] and rax, 100h cmp rax, 0 jz short loc_FB74A mov rdi, [rbp+var_220] xor eax, eax mov esi, eax call my_delete loc_FB74A: mov rdi, [rbp+var_228] mov rsi, [rbp+var_220] mov rdx, [rbp+var_238] call my_symlink cmp eax, 0 jz short loc_FB7B8 call _my_thread_var mov eax, [rax] mov [rbp+var_240], eax mov edi, [rbp+var_23C] xor eax, eax mov esi, eax call my_close mov rdi, [rbp+var_228] xor eax, eax mov esi, eax call my_delete mov [rbp+var_23C], 0FFFFFFFFh mov eax, [rbp+var_240] mov [rbp+var_24C], eax call _my_thread_var mov ecx, [rbp+var_24C] mov [rax], ecx loc_FB7B8: jmp short $+2 loc_FB7BA: jmp short $+2 loc_FB7BC: jmp short $+2 loc_FB7BE: mov eax, [rbp+var_23C] mov [rbp+var_214], eax loc_FB7CA: mov eax, [rbp+var_214] mov [rbp+var_250], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_FB7F7 mov eax, [rbp+var_250] add rsp, 250h pop rbp retn loc_FB7F7: call ___stack_chk_fail
long long my_create_with_symlink(const char *a1, long long a2, unsigned int a3, int a4, long long a5) { bool v6; // [rsp+Bh] [rbp-245h] int v7; // [rsp+Ch] [rbp-244h] int v8; // [rsp+10h] [rbp-240h] signed int v9; // [rsp+14h] [rbp-23Ch] long long v13; // [rsp+28h] [rbp-228h] _BYTE v15[520]; // [rsp+40h] [rbp-210h] BYREF unsigned long long v16; // [rsp+248h] [rbp-8h] v16 = __readfsqword(0x28u); v13 = a2; if ( my_disable_symlinks ) { v7 = 0; if ( a1 ) v13 = (long long)a1; } else { if ( a1 ) my_realpath((long long)v15, a1, 0); v6 = 0; if ( a1 ) v6 = (unsigned int)strcmp(v15, a2) != 0; v7 = v6; } if ( (a5 & 0x100) == 0 ) { if ( !(unsigned int)access(v13, 0LL) ) { *(_DWORD *)__errno_location() = 17; *(_DWORD *)my_thread_var(v13, 0LL) = 17; my_error(1u, 0LL, v13, 17LL); return (unsigned int)-1; } if ( v7 && !(unsigned int)access(a1, 0LL) ) { *(_DWORD *)__errno_location() = 17; *(_DWORD *)my_thread_var(a1, 0LL) = 17; my_error(1u, 0LL, a1, 17LL); return (unsigned int)-1; } } v9 = my_create(v13, a3, a4, a5); if ( v9 >= 0 && v7 ) { if ( (a5 & 0x100) != 0 ) my_delete((long long)a1, 0LL); if ( (unsigned int)my_symlink(v13, a1, a5) ) { v8 = *(_DWORD *)my_thread_var(v13, a1); my_close(v9, 0LL); my_delete(v13, 0LL); v9 = -1; *(_DWORD *)my_thread_var(v13, 0LL) = v8; } } return (unsigned int)v9; }
my_create_with_symlink: PUSH RBP MOV RBP,RSP SUB RSP,0x250 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x220],RDI MOV qword ptr [RBP + -0x228],RSI MOV dword ptr [RBP + -0x22c],EDX MOV dword ptr [RBP + -0x230],ECX MOV qword ptr [RBP + -0x238],R8 JMP 0x001fb58b LAB_001fb58b: LEA RAX,[0xd8a44c] CMP byte ptr [RAX],0x0 JZ 0x001fb5bf JMP 0x001fb599 LAB_001fb599: JMP 0x001fb59b LAB_001fb59b: MOV dword ptr [RBP + -0x244],0x0 CMP qword ptr [RBP + -0x220],0x0 JZ 0x001fb5bd MOV RAX,qword ptr [RBP + -0x220] MOV qword ptr [RBP + -0x228],RAX LAB_001fb5bd: JMP 0x001fb622 LAB_001fb5bf: CMP qword ptr [RBP + -0x220],0x0 JZ 0x001fb5e0 LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] XOR EAX,EAX MOV EDX,EAX CALL 0x001fb170 LAB_001fb5e0: XOR EAX,EAX CMP qword ptr [RBP + -0x220],0x0 MOV byte ptr [RBP + -0x245],AL JZ 0x001fb611 LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x228] CALL 0x0012a650 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x245],AL LAB_001fb611: MOV AL,byte ptr [RBP + -0x245] AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x244],EAX LAB_001fb622: MOV RAX,qword ptr [RBP + -0x238] AND RAX,0x100 CMP RAX,0x0 JNZ 0x001fb6ec MOV RDI,qword ptr [RBP + -0x228] XOR ESI,ESI CALL 0x0012a100 CMP EAX,0x0 JNZ 0x001fb68d CALL 0x0012a750 MOV dword ptr [RAX],0x11 CALL 0x001fc1b0 MOV dword ptr [RAX],0x11 MOV RDX,qword ptr [RBP + -0x228] MOV EDI,0x1 XOR EAX,EAX MOV ESI,EAX MOV ECX,0x11 MOV AL,0x0 CALL 0x001f1ba0 MOV dword ptr [RBP + -0x214],0xffffffff JMP 0x001fb7ca LAB_001fb68d: CMP dword ptr [RBP + -0x244],0x0 JZ 0x001fb6ea MOV RDI,qword ptr [RBP + -0x220] XOR ESI,ESI CALL 0x0012a100 CMP EAX,0x0 JNZ 0x001fb6ea CALL 0x0012a750 MOV dword ptr [RAX],0x11 CALL 0x001fc1b0 MOV dword ptr [RAX],0x11 MOV RDX,qword ptr [RBP + -0x220] MOV EDI,0x1 XOR EAX,EAX MOV ESI,EAX MOV ECX,0x11 MOV AL,0x0 CALL 0x001f1ba0 MOV dword ptr [RBP + -0x214],0xffffffff JMP 0x001fb7ca LAB_001fb6ea: JMP 0x001fb6ec LAB_001fb6ec: MOV RDI,qword ptr [RBP + -0x228] MOV ESI,dword ptr [RBP + -0x22c] MOV EDX,dword ptr [RBP + -0x230] MOV RCX,qword ptr [RBP + -0x238] CALL 0x001f16e0 MOV dword ptr [RBP + -0x23c],EAX CMP EAX,0x0 JL 0x001fb7bc CMP dword ptr [RBP + -0x244],0x0 JZ 0x001fb7ba MOV RAX,qword ptr [RBP + -0x238] AND RAX,0x100 CMP RAX,0x0 JZ 0x001fb74a MOV RDI,qword ptr [RBP + -0x220] XOR EAX,EAX MOV ESI,EAX CALL 0x001f17b0 LAB_001fb74a: MOV RDI,qword ptr [RBP + -0x228] MOV RSI,qword ptr [RBP + -0x220] MOV RDX,qword ptr [RBP + -0x238] CALL 0x001fb040 CMP EAX,0x0 JZ 0x001fb7b8 CALL 0x001fc1b0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x240],EAX MOV EDI,dword ptr [RBP + -0x23c] XOR EAX,EAX MOV ESI,EAX CALL 0x001fa5f0 MOV RDI,qword ptr [RBP + -0x228] XOR EAX,EAX MOV ESI,EAX CALL 0x001f17b0 MOV dword ptr [RBP + -0x23c],0xffffffff MOV EAX,dword ptr [RBP + -0x240] MOV dword ptr [RBP + -0x24c],EAX CALL 0x001fc1b0 MOV ECX,dword ptr [RBP + -0x24c] MOV dword ptr [RAX],ECX LAB_001fb7b8: JMP 0x001fb7ba LAB_001fb7ba: JMP 0x001fb7bc LAB_001fb7bc: JMP 0x001fb7be LAB_001fb7be: MOV EAX,dword ptr [RBP + -0x23c] MOV dword ptr [RBP + -0x214],EAX LAB_001fb7ca: MOV EAX,dword ptr [RBP + -0x214] MOV dword ptr [RBP + -0x250],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001fb7f7 MOV EAX,dword ptr [RBP + -0x250] ADD RSP,0x250 POP RBP RET LAB_001fb7f7: CALL 0x0012a250
int my_create_with_symlink (char *param_1,char *param_2,int4 param_3,int4 param_4,ulong param_5) { int4 uVar1; int iVar2; int *piVar3; int4 *puVar4; long in_FS_OFFSET; bool bVar5; int local_244; char *local_230; int local_21c; char local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_230 = param_2; if (my_disable_symlinks == '\0') { if (param_1 != (char *)0x0) { my_realpath(local_218,param_1,0); } bVar5 = false; if (param_1 != (char *)0x0) { iVar2 = strcmp(local_218,param_2); bVar5 = iVar2 != 0; } } else { bVar5 = false; if (param_1 != (char *)0x0) { local_230 = param_1; } } if ((param_5 & 0x100) == 0) { iVar2 = access(local_230,0); if (iVar2 == 0) { piVar3 = __errno_location(); *piVar3 = 0x11; puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x11; my_error(1,0,local_230,0x11); local_21c = -1; goto LAB_001fb7ca; } if ((bVar5) && (iVar2 = access(param_1,0), iVar2 == 0)) { piVar3 = __errno_location(); *piVar3 = 0x11; puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x11; my_error(1,0,param_1,0x11); local_21c = -1; goto LAB_001fb7ca; } } local_244 = my_create(local_230,param_3,param_4,param_5); if ((-1 < local_244) && (bVar5)) { if ((param_5 & 0x100) != 0) { my_delete(param_1,0); } iVar2 = my_symlink(local_230,param_1,param_5); if (iVar2 != 0) { puVar4 = (int4 *)_my_thread_var(); uVar1 = *puVar4; my_close(local_244,0); my_delete(local_230,0); local_244 = -1; puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar1; } } local_21c = local_244; LAB_001fb7ca: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_21c; }
44,904
Application::getSettingsPath()
midoBB[P]pwrctl/main.cpp
QString Application::getSettingsPath() { QString path = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation) + "/" + QCoreApplication::applicationName(); QDir dir(path); if (!dir.exists()) { dir.mkpath(path); } QString fileName = path + "/settings.ini"; return fileName; }
O3
cpp
Application::getSettingsPath(): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rdi, %rbx leaq 0x50(%rsp), %r14 movq %r14, %rdi movl $0xd, %esi callq 0x9600 movq (%r14), %rax movq %rax, 0x20(%rsp) movups 0x8(%r14), %xmm0 movups %xmm0, 0x28(%rsp) testq %rax, %rax je 0x14df2 lock incl (%rax) leaq 0xcc6c(%rip), %rdx # 0x21a65 leaq 0x8(%rsp), %rdi movl $0x1, %esi callq 0x95e0 leaq 0x20(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x9170 movq 0x8(%rsp), %rax testq %rax, %rax je 0x14e3a lock decl (%rax) jne 0x14e3a movq 0x8(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 leaq 0x8(%rsp), %rdi callq 0x9ab0 movq 0x20(%rsp), %rax movq %rax, 0x38(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, 0x40(%rsp) testq %rax, %rax je 0x14e60 lock incl (%rax) leaq 0x38(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x9170 movq 0x8(%rsp), %rax testq %rax, %rax je 0x14e92 lock decl (%rax) jne 0x14e92 movq 0x8(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 movq 0x20(%rsp), %rax testq %rax, %rax je 0x14eb5 lock decl (%rax) jne 0x14eb5 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 movq 0x50(%rsp), %rax testq %rax, %rax je 0x14ed8 lock decl (%rax) jne 0x14ed8 movq 0x50(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 leaq 0x20(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x9a90 leaq 0x20(%rsp), %rdi callq 0x9b20 testb %al, %al jne 0x14f04 leaq 0x20(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x9b10 movq 0x38(%rsp), %rax movq %rax, (%rbx) movq 0x40(%rsp), %rcx movq %rcx, 0x8(%rbx) movq 0x48(%rsp), %rcx movq %rcx, 0x10(%rbx) testq %rax, %rax je 0x14f26 lock incl (%rax) leaq 0xcb3a(%rip), %rdx # 0x21a67 leaq 0x8(%rsp), %rdi movl $0xd, %esi callq 0x95e0 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x9170 movq 0x8(%rsp), %rax testq %rax, %rax je 0x14f6c lock decl (%rax) jne 0x14f6c movq 0x8(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 leaq 0x20(%rsp), %rdi callq 0x9c90 movq 0x38(%rsp), %rax testq %rax, %rax je 0x14f99 lock decl (%rax) jne 0x14f99 movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq 0x8(%rsp), %rax testq %rax, %rax je 0x14fcf lock decl (%rax) jne 0x14fcf movq 0x8(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 jmp 0x14fcf movq %rax, %r14 movq %rbx, %rdi callq 0x15760 jmp 0x15066 movq %rax, %r14 jmp 0x15070 movq %rax, %r14 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x15002 leaq 0x38(%rsp), %rsi callq 0xa19a jmp 0x15002 jmp 0x15027 movq %rax, %r14 movq 0x8(%rsp), %rax testq %rax, %rax je 0x1502a lock decl (%rax) jne 0x1502a movq 0x8(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 jmp 0x1502a movq %rax, %r14 movq 0x20(%rsp), %rax testq %rax, %rax je 0x1504d lock decl (%rax) jne 0x1504d movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 movq 0x50(%rsp), %rax testq %rax, %rax je 0x15093 lock decl (%rax) jne 0x15093 movq 0x50(%rsp), %rdi jmp 0x15084 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x9c90 movq 0x38(%rsp), %rax testq %rax, %rax je 0x15093 lock decl (%rax) jne 0x15093 movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x9550 movq %r14, %rdi callq 0x93d0
_ZN11Application15getSettingsPathEv: push r14 push rbx sub rsp, 68h mov rbx, rdi lea r14, [rsp+78h+var_28] mov rdi, r14 mov esi, 0Dh call __ZN14QStandardPaths16writableLocationENS_16StandardLocationE; QStandardPaths::writableLocation(QStandardPaths::StandardLocation) mov rax, [r14] mov [rsp+78h+var_58], rax movups xmm0, xmmword ptr [r14+8] movups [rsp+78h+var_50], xmm0 test rax, rax jz short loc_14DF2 lock inc dword ptr [rax] loc_14DF2: lea rdx, asc_21A65; "/" lea rdi, [rsp+78h+var_70] mov esi, 1 call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) lea rdi, [rsp+78h+var_58]; this lea rsi, [rsp+78h+var_70]; QString * call __ZN7QString6appendERKS_; QString::append(QString const&) mov rax, [rsp+78h+var_70] test rax, rax jz short loc_14E3A lock dec dword ptr [rax] jnz short loc_14E3A mov rdi, [rsp+78h+var_70] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_14E3A: lea rdi, [rsp+78h+var_70]; this call __ZN16QCoreApplication15applicationNameEv; QCoreApplication::applicationName(void) mov rax, [rsp+78h+var_58] mov [rsp+78h+var_40], rax movups xmm0, [rsp+78h+var_50] movups [rsp+78h+var_38], xmm0 test rax, rax jz short loc_14E60 lock inc dword ptr [rax] loc_14E60: lea rdi, [rsp+78h+var_40]; this lea rsi, [rsp+78h+var_70]; QString * call __ZN7QString6appendERKS_; QString::append(QString const&) mov rax, [rsp+78h+var_70] test rax, rax jz short loc_14E92 lock dec dword ptr [rax] jnz short loc_14E92 mov rdi, [rsp+78h+var_70] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_14E92: mov rax, [rsp+78h+var_58] test rax, rax jz short loc_14EB5 lock dec dword ptr [rax] jnz short loc_14EB5 mov rdi, [rsp+78h+var_58] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_14EB5: mov rax, [rsp+78h+var_28] test rax, rax jz short loc_14ED8 lock dec dword ptr [rax] jnz short loc_14ED8 mov rdi, [rsp+78h+var_28] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_14ED8: lea rdi, [rsp+78h+var_58]; this lea rsi, [rsp+78h+var_40]; QString * call __ZN4QDirC1ERK7QString; QDir::QDir(QString const&) lea rdi, [rsp+78h+var_58]; this call __ZNK4QDir6existsEv; QDir::exists(void) test al, al jnz short loc_14F04 lea rdi, [rsp+78h+var_58]; this lea rsi, [rsp+78h+var_40]; QString * call __ZNK4QDir6mkpathERK7QString; QDir::mkpath(QString const&) loc_14F04: mov rax, [rsp+78h+var_40] mov [rbx], rax mov rcx, qword ptr [rsp+78h+var_38] mov [rbx+8], rcx mov rcx, qword ptr [rsp+78h+var_38+8] mov [rbx+10h], rcx test rax, rax jz short loc_14F26 lock inc dword ptr [rax] loc_14F26: lea rdx, aSettingsIni; "/settings.ini" lea rdi, [rsp+78h+var_70] mov esi, 0Dh call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) lea rsi, [rsp+78h+var_70]; QString * mov rdi, rbx; this call __ZN7QString6appendERKS_; QString::append(QString const&) mov rax, [rsp+78h+var_70] test rax, rax jz short loc_14F6C lock dec dword ptr [rax] jnz short loc_14F6C mov rdi, [rsp+78h+var_70] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_14F6C: lea rdi, [rsp+78h+var_58]; this call __ZN4QDirD1Ev; QDir::~QDir() mov rax, [rsp+78h+var_40] test rax, rax jz short loc_14F99 lock dec dword ptr [rax] jnz short loc_14F99 mov rdi, [rsp+78h+var_40] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_14F99: mov rax, rbx add rsp, 68h pop rbx pop r14 retn mov r14, rax mov rax, [rsp+arg_0] test rax, rax jz short loc_14FCF lock dec dword ptr [rax] jnz short loc_14FCF mov rdi, [rsp+arg_0] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_14FCF mov r14, rax loc_14FCF: mov rdi, rbx; void * call _ZN7QStringD2Ev; QString::~QString() jmp loc_15066 mov r14, rax jmp loc_15070 mov r14, rax mov rdi, [rsp+arg_30] test rdi, rdi jz short loc_15002 lea rsi, [rsp+arg_30] call _ZN11Application15getSettingsPathEv_cold_1; Application::getSettingsPath(void) [clone] jmp short loc_15002 jmp short loc_15027 mov r14, rax loc_15002: mov rax, [rsp+arg_0] test rax, rax jz short loc_1502A lock dec dword ptr [rax] jnz short loc_1502A mov rdi, [rsp+arg_0] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_1502A loc_15027: mov r14, rax loc_1502A: mov rax, [rsp+arg_18] test rax, rax jz short loc_1504D lock dec dword ptr [rax] jnz short loc_1504D mov rdi, [rsp+arg_18] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_1504D: mov rax, [rsp+arg_48] test rax, rax jz short loc_15093 lock dec dword ptr [rax] jnz short loc_15093 mov rdi, [rsp+arg_48] jmp short loc_15084 mov r14, rax loc_15066: lea rdi, [rsp+arg_18]; this call __ZN4QDirD1Ev; QDir::~QDir() loc_15070: mov rax, [rsp+arg_30] test rax, rax jz short loc_15093 lock dec dword ptr [rax] jnz short loc_15093 mov rdi, [rsp+arg_30] loc_15084: mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_15093: mov rdi, r14 call __Unwind_Resume
Application * Application::getSettingsPath(Application *this) { volatile signed __int32 *v1; // rax volatile signed __int32 *v3[3]; // [rsp+8h] [rbp-70h] BYREF volatile signed __int32 *v4; // [rsp+20h] [rbp-58h] BYREF __int128 v5; // [rsp+28h] [rbp-50h] volatile signed __int32 *v6; // [rsp+38h] [rbp-40h] BYREF __int128 v7; // [rsp+40h] [rbp-38h] volatile signed __int32 *v8; // [rsp+50h] [rbp-28h] BYREF __int128 v9; // [rsp+58h] [rbp-20h] QStandardPaths::writableLocation(&v8, 13LL); v4 = v8; v5 = v9; if ( v8 ) _InterlockedIncrement(v8); QString::fromUtf8(v3, 1LL, "/"); QString::append((QString *)&v4, (const QString *)v3); if ( v3[0] && !_InterlockedDecrement(v3[0]) ) QArrayData::deallocate(v3[0], 2LL, 8LL); QCoreApplication::applicationName((QCoreApplication *)v3); v6 = v4; v7 = v5; if ( v4 ) _InterlockedIncrement(v4); QString::append((QString *)&v6, (const QString *)v3); if ( v3[0] && !_InterlockedDecrement(v3[0]) ) QArrayData::deallocate(v3[0], 2LL, 8LL); if ( v4 && !_InterlockedDecrement(v4) ) QArrayData::deallocate(v4, 2LL, 8LL); if ( v8 && !_InterlockedDecrement(v8) ) QArrayData::deallocate(v8, 2LL, 8LL); QDir::QDir((QDir *)&v4, (const QString *)&v6); if ( !(unsigned __int8)QDir::exists((QDir *)&v4) ) QDir::mkpath((QDir *)&v4, (const QString *)&v6); v1 = v6; *(_QWORD *)this = v6; *(_OWORD *)((char *)this + 8) = v7; if ( v1 ) _InterlockedIncrement(v1); QString::fromUtf8(v3, 13LL, "/settings.ini"); QString::append(this, (const QString *)v3); if ( v3[0] && !_InterlockedDecrement(v3[0]) ) QArrayData::deallocate(v3[0], 2LL, 8LL); QDir::~QDir((QDir *)&v4); if ( v6 && !_InterlockedDecrement(v6) ) QArrayData::deallocate(v6, 2LL, 8LL); return this; }
getSettingsPath: PUSH R14 PUSH RBX SUB RSP,0x68 MOV RBX,RDI LEA R14,[RSP + 0x50] MOV RDI,R14 MOV ESI,0xd CALL 0x00109600 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOVUPS XMM0,xmmword ptr [R14 + 0x8] MOVUPS xmmword ptr [RSP + 0x28],XMM0 TEST RAX,RAX JZ 0x00114df2 INC.LOCK dword ptr [RAX] LAB_00114df2: LEA RDX,[0x121a65] LEA RDI,[RSP + 0x8] MOV ESI,0x1 CALL 0x001095e0 LAB_00114e08: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x8] CALL 0x00109170 MOV RAX,qword ptr [RSP + 0x8] TEST RAX,RAX JZ 0x00114e3a DEC.LOCK dword ptr [RAX] JNZ 0x00114e3a MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00109550 LAB_00114e3a: LEA RDI,[RSP + 0x8] CALL 0x00109ab0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x38],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP + 0x40],XMM0 TEST RAX,RAX JZ 0x00114e60 INC.LOCK dword ptr [RAX] LAB_00114e60: LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x8] CALL 0x00109170 MOV RAX,qword ptr [RSP + 0x8] TEST RAX,RAX JZ 0x00114e92 DEC.LOCK dword ptr [RAX] JNZ 0x00114e92 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00109550 LAB_00114e92: MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x00114eb5 DEC.LOCK dword ptr [RAX] JNZ 0x00114eb5 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00109550 LAB_00114eb5: MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x00114ed8 DEC.LOCK dword ptr [RAX] JNZ 0x00114ed8 MOV RDI,qword ptr [RSP + 0x50] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00109550 LAB_00114ed8: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x38] CALL 0x00109a90 LAB_00114ee7: LEA RDI,[RSP + 0x20] CALL 0x00109b20 TEST AL,AL JNZ 0x00114f04 LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x38] CALL 0x00109b10 LAB_00114f04: MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RBX],RAX MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RBX + 0x8],RCX MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RBX + 0x10],RCX TEST RAX,RAX JZ 0x00114f26 INC.LOCK dword ptr [RAX] LAB_00114f26: LEA RDX,[0x121a67] LEA RDI,[RSP + 0x8] MOV ESI,0xd CALL 0x001095e0 LAB_00114f3c: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00109170 LAB_00114f49: MOV RAX,qword ptr [RSP + 0x8] TEST RAX,RAX JZ 0x00114f6c DEC.LOCK dword ptr [RAX] JNZ 0x00114f6c MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00109550 LAB_00114f6c: LEA RDI,[RSP + 0x20] CALL 0x00109c90 MOV RAX,qword ptr [RSP + 0x38] TEST RAX,RAX JZ 0x00114f99 DEC.LOCK dword ptr [RAX] JNZ 0x00114f99 MOV RDI,qword ptr [RSP + 0x38] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00109550 LAB_00114f99: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R14 RET
/* Application::getSettingsPath() */ Application * __thiscall Application::getSettingsPath(Application *this) { char cVar1; QArrayData *local_70 [3]; QArrayData *local_58; int4 local_50; int4 uStack_4c; int4 uStack_48; int4 uStack_44; QArrayData *local_40; int8 local_38; int8 uStack_30; QArrayData *local_28; int4 local_20; int4 uStack_1c; int4 uStack_18; int4 uStack_14; QStandardPaths::writableLocation(&local_28,0xd); local_58 = local_28; local_50 = local_20; uStack_4c = uStack_1c; uStack_48 = uStack_18; uStack_44 = uStack_14; if (local_28 != (QArrayData *)0x0) { LOCK(); *(int *)local_28 = *(int *)local_28 + 1; UNLOCK(); } /* try { // try from 00114df2 to 00114e07 has its CatchHandler @ 00115027 */ QString::fromUtf8(local_70,1,&DAT_00121a65); /* try { // try from 00114e08 to 00114e16 has its CatchHandler @ 00114fff */ QString::append((QString *)&local_58); if (local_70[0] != (QArrayData *)0x0) { LOCK(); *(int *)local_70[0] = *(int *)local_70[0] + -1; UNLOCK(); if (*(int *)local_70[0] == 0) { QArrayData::deallocate(local_70[0],2,8); } } /* try { // try from 00114e3a to 00114e43 has its CatchHandler @ 00114ffd */ QCoreApplication::applicationName(); local_40 = local_58; local_38 = CONCAT44(uStack_4c,local_50); uStack_30 = CONCAT44(uStack_44,uStack_48); if (local_58 != (QArrayData *)0x0) { LOCK(); *(int *)local_58 = *(int *)local_58 + 1; UNLOCK(); } /* try { // try from 00114e60 to 00114e6e has its CatchHandler @ 00114fe4 */ QString::append((QString *)&local_40); if (local_70[0] != (QArrayData *)0x0) { LOCK(); *(int *)local_70[0] = *(int *)local_70[0] + -1; UNLOCK(); if (*(int *)local_70[0] == 0) { QArrayData::deallocate(local_70[0],2,8); } } if (local_58 != (QArrayData *)0x0) { LOCK(); *(int *)local_58 = *(int *)local_58 + -1; UNLOCK(); if (*(int *)local_58 == 0) { QArrayData::deallocate(local_58,2,8); } } if (local_28 != (QArrayData *)0x0) { LOCK(); *(int *)local_28 = *(int *)local_28 + -1; UNLOCK(); if (*(int *)local_28 == 0) { QArrayData::deallocate(local_28,2,8); } } /* try { // try from 00114ed8 to 00114ee6 has its CatchHandler @ 00114fdc */ QDir::QDir((QDir *)&local_58,(QString *)&local_40); /* try { // try from 00114ee7 to 00114f03 has its CatchHandler @ 00115063 */ cVar1 = QDir::exists(); if (cVar1 == '\0') { QDir::mkpath((QString *)&local_58); } *(QArrayData **)this = local_40; *(int8 *)(this + 8) = local_38; *(int8 *)(this + 0x10) = uStack_30; if (local_40 != (QArrayData *)0x0) { LOCK(); *(int *)local_40 = *(int *)local_40 + 1; UNLOCK(); } /* try { // try from 00114f26 to 00114f3b has its CatchHandler @ 00114fcc */ QString::fromUtf8(local_70,0xd,"/settings.ini"); /* try { // try from 00114f3c to 00114f48 has its CatchHandler @ 00114fa4 */ QString::append((QString *)this); if (local_70[0] != (QArrayData *)0x0) { LOCK(); *(int *)local_70[0] = *(int *)local_70[0] + -1; UNLOCK(); if (*(int *)local_70[0] == 0) { QArrayData::deallocate(local_70[0],2,8); } } QDir::~QDir((QDir *)&local_58); if (local_40 != (QArrayData *)0x0) { LOCK(); *(int *)local_40 = *(int *)local_40 + -1; UNLOCK(); if (*(int *)local_40 == 0) { QArrayData::deallocate(local_40,2,8); } } return this; }
44,905
ggml_dyn_tallocr_new
monkey531[P]llama/ggml/src/ggml-alloc.c
static struct ggml_dyn_tallocr * ggml_dyn_tallocr_new(size_t alignment) { struct ggml_dyn_tallocr * alloc = (struct ggml_dyn_tallocr *)malloc(sizeof(struct ggml_dyn_tallocr)); *alloc = (struct ggml_dyn_tallocr) { /*.alignment = */ alignment, /*.n_free_blocks = */ 0, /*.free_blocks = */ {{0}}, /*.max_size = */ 0, #ifdef GGML_ALLOCATOR_DEBUG /*.allocated_tensors = */ {{0}}, #endif }; ggml_dyn_tallocr_reset(alloc); return alloc; }
O0
c
ggml_dyn_tallocr_new: subq $0x1038, %rsp # imm = 0x1038 movq %rdi, 0x1030(%rsp) movl $0x1018, %edi # imm = 0x1018 callq 0x45080 movq %rax, 0x1028(%rsp) movq 0x1028(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x10(%rsp), %rdi xorl %esi, %esi movl $0x1018, %edx # imm = 0x1018 callq 0x41fa0 movq 0x8(%rsp), %rdi movq 0x1030(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x10(%rsp), %rsi movl $0x1018, %edx # imm = 0x1018 callq 0x432a0 movq 0x1028(%rsp), %rdi callq 0x5b640 movq 0x1028(%rsp), %rax addq $0x1038, %rsp # imm = 0x1038 retq nopl (%rax)
ggml_dyn_tallocr_new: sub rsp, 1038h mov [rsp+1038h+var_8], rdi mov edi, 1018h call _malloc mov [rsp+1038h+var_10], rax mov rax, [rsp+1038h+var_10] mov [rsp+1038h+var_1030], rax lea rdi, [rsp+1038h+var_1028] xor esi, esi mov edx, 1018h call _memset mov rdi, [rsp+1038h+var_1030] mov rax, [rsp+1038h+var_8] mov [rsp+1038h+var_1028], rax lea rsi, [rsp+1038h+var_1028] mov edx, 1018h call _memcpy mov rdi, [rsp+1038h+var_10] call ggml_dyn_tallocr_reset mov rax, [rsp+1038h+var_10] add rsp, 1038h retn
long long ggml_dyn_tallocr_new(long long a1) { long long v2; // [rsp+8h] [rbp-1030h] _QWORD v3[515]; // [rsp+10h] [rbp-1028h] BYREF long long v4; // [rsp+1028h] [rbp-10h] long long v5; // [rsp+1030h] [rbp-8h] v5 = a1; v4 = malloc(4120LL); v2 = v4; memset(v3, 0LL, sizeof(v3)); v3[0] = v5; memcpy(v2, v3, 4120LL); ggml_dyn_tallocr_reset(v4); return v4; }
ggml_dyn_tallocr_new: SUB RSP,0x1038 MOV qword ptr [RSP + 0x1030],RDI MOV EDI,0x1018 CALL 0x00145080 MOV qword ptr [RSP + 0x1028],RAX MOV RAX,qword ptr [RSP + 0x1028] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x10] XOR ESI,ESI MOV EDX,0x1018 CALL 0x00141fa0 MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x1030] MOV qword ptr [RSP + 0x10],RAX LEA RSI,[RSP + 0x10] MOV EDX,0x1018 CALL 0x001432a0 MOV RDI,qword ptr [RSP + 0x1028] CALL 0x0015b640 MOV RAX,qword ptr [RSP + 0x1028] ADD RSP,0x1038 RET
void * ggml_dyn_tallocr_new(int8 param_1) { void *__dest; int8 local_1028 [515]; void *local_10; int8 local_8; local_8 = param_1; __dest = malloc(0x1018); local_10 = __dest; memset(local_1028,0,0x1018); local_1028[0] = local_8; memcpy(__dest,local_1028,0x1018); ggml_dyn_tallocr_reset(local_10); return local_10; }
44,906
search_default_file
eloqsql/mysys/my_default.c
static int search_default_file(struct handle_option_ctx *ctx, const char *dir, const char *config_file) { char **ext; const char *empty_list[]= { "", 0 }; my_bool have_ext= fn_ext(config_file)[0] != 0; const char **exts_to_use= have_ext ? empty_list : f_extensions; for (ext= (char**) exts_to_use; *ext; ext++) { int error; if ((error= search_default_file_with_ext(ctx, dir, *ext, config_file, 0)) < 0) return error; } return 0; }
O3
c
search_default_file: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq %rdx, %rdi callq 0xb1114 cmpb $0x0, (%rax) leaq 0x2d4d88(%rip), %rax # 0x385b60 leaq 0x2d4d91(%rip), %r12 # 0x385b70 cmoveq %rax, %r12 movq (%r12), %rdx testq %rdx, %rdx je 0xb0e12 addq $0x8, %r12 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rcx xorl %r8d, %r8d callq 0x31066 testl %eax, %eax js 0xb0e14 movq (%r12), %rdx addq $0x8, %r12 testq %rdx, %rdx jne 0xb0df0 xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
search_default_file: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov r14, rsi mov r15, rdi mov rdi, rdx call fn_ext cmp byte ptr [rax], 0 lea rax, f_extensions lea r12, off_385B70; "" cmovz r12, rax mov rdx, [r12] test rdx, rdx jz short loc_B0E12 add r12, 8 loc_B0DF0: mov rdi, r15 mov rsi, r14 mov rcx, rbx xor r8d, r8d call search_default_file_with_ext test eax, eax js short loc_B0E14 mov rdx, [r12] add r12, 8 test rdx, rdx jnz short loc_B0DF0 loc_B0E12: xor eax, eax loc_B0E14: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long search_default_file(long long a1, _BYTE *a2, long long a3) { char **v4; // r12 char *v5; // rdx char **i; // r12 long long result; // rax v4 = (char **)&off_385B70; if ( !*(_BYTE *)fn_ext(a3) ) v4 = &f_extensions; v5 = *v4; if ( !*v4 ) return 0LL; for ( i = v4 + 1; ; ++i ) { result = search_default_file_with_ext(a1, a2, (int)v5, a3, 0); if ( (int)result < 0 ) break; v5 = *i; if ( !v5 ) return 0LL; } return result; }
search_default_file: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RDI,RDX CALL 0x001b1114 CMP byte ptr [RAX],0x0 LEA RAX,[0x485b60] LEA R12,[0x485b70] CMOVZ R12,RAX MOV RDX,qword ptr [R12] TEST RDX,RDX JZ 0x001b0e12 ADD R12,0x8 LAB_001b0df0: MOV RDI,R15 MOV RSI,R14 MOV RCX,RBX XOR R8D,R8D CALL 0x00131066 TEST EAX,EAX JS 0x001b0e14 MOV RDX,qword ptr [R12] ADD R12,0x8 TEST RDX,RDX JNZ 0x001b0df0 LAB_001b0e12: XOR EAX,EAX LAB_001b0e14: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 search_default_file(int8 param_1,int8 param_2,int8 param_3) { int *puVar1; char *pcVar2; int8 uVar3; int **ppuVar4; pcVar2 = (char *)fn_ext(param_3); ppuVar4 = &PTR_s__00485b70; if (*pcVar2 == '\0') { ppuVar4 = (int **)f_extensions; } puVar1 = *ppuVar4; while( true ) { if (puVar1 == (int *)0x0) { return 0; } ppuVar4 = ppuVar4 + 1; uVar3 = search_default_file_with_ext(param_1,param_2,puVar1,param_3,0); if ((int)uVar3 < 0) break; puVar1 = *ppuVar4; } return uVar3; }
44,907
my_thread_os_id()
eloqsql/storage/perfschema/my_thread.h
static inline my_thread_os_id_t my_thread_os_id() { #ifdef HAVE_PTHREAD_THREADID_NP /* macOS. Be careful to use this version first, and to not use SYS_gettid on macOS, as SYS_gettid has a different meaning compared to linux gettid(). */ uint64_t tid64; pthread_threadid_np(nullptr, &tid64); return (pid_t)tid64; #else #ifdef HAVE_GETTID /* Linux glibc-2.30+ */ return gettid(); #else #ifdef HAVE_SYS_GETTID /* Linux before glibc-2.30 See man gettid */ return syscall(SYS_gettid); #else #ifdef _WIN32 /* Windows */ return GetCurrentThreadId(); #else #ifdef HAVE_PTHREAD_GETTHREADID_NP /* FreeBSD 10.2 */ return pthread_getthreadid_np(); #else #ifdef HAVE_GETTHRID /* OpenBSD */ return getthrid(); #else #ifdef HAVE_INTEGER_PTHREAD_SELF /* NetBSD, and perhaps something else, fallback. */ return (my_thread_os_id_t) pthread_self(); #else /* Feature not available. */ return 0; #endif /* HAVE_INTEGER_PTHREAD_SELF */ #endif /* HAVE_GETTHRID */ #endif /* HAVE_PTHREAD_GETTHREADID_NP */ #endif /* _WIN32 */ #endif /* HAVE_SYS_GETTID */ #endif /* HAVE_GETTID */ #endif /* HAVE_PTHREAD_THREADID_NP */ }
O0
c
my_thread_os_id(): pushq %rbp movq %rsp, %rbp movl $0xba, %edi movb $0x0, %al callq 0x26090 popq %rbp retq nopw %cs:(%rax,%rax)
_ZL15my_thread_os_idv: push rbp mov rbp, rsp mov edi, 0BAh mov al, 0 call _syscall pop rbp retn
long long my_thread_os_id(void) { return syscall(186LL); }
my_thread_os_id: PUSH RBP MOV RBP,RSP MOV EDI,0xba MOV AL,0x0 CALL 0x00126090 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* my_thread_os_id() */ void my_thread_os_id(void) { syscall(0xba); return; }
44,908
get_wrlock
eloqsql/storage/maria/ma_pagecache.c
static my_bool get_wrlock(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block) { PAGECACHE_FILE file= block->hash_link->file; pgcache_page_no_t pageno= block->hash_link->pageno; pthread_t locker= pthread_self(); DBUG_ENTER("get_wrlock"); DBUG_PRINT("info", ("the block %p " "files %d(%d) pages %lu(%lu)", block, file.file, block->hash_link->file.file, (ulong) pageno, (ulong) block->hash_link->pageno)); PCBLOCK_INFO(block); /* We assume that the same thread will try write lock on block on which it has already read lock. */ while ((block->wlocks && !pthread_equal(block->write_locker, locker)) || block->rlocks) { /* Lock failed we will wait */ if (pagecache_wait_lock(pagecache, block, file, pageno, MY_PTHREAD_LOCK_WRITE)) DBUG_RETURN(1); } /* we are doing it by global cache mutex protection, so it is OK */ block->wlocks++; block->write_locker= locker; DBUG_PRINT("info", ("WR lock set, block %p", block)); DBUG_RETURN(0); }
O0
c
get_wrlock: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movq 0x20(%rax), %rsi addq $0x18, %rsi leaq -0x60(%rbp), %rdi movl $0x48, %edx callq 0x29090 movq -0x18(%rbp), %rax movq 0x20(%rax), %rax movq 0x60(%rax), %rax movq %rax, -0x68(%rbp) callq 0x294f0 movq %rax, -0x70(%rbp) jmp 0x9f478 jmp 0x9f47a jmp 0x9f47c jmp 0x9f47e movq -0x18(%rbp), %rax cmpl $0x0, 0x68(%rax) je 0x9f4a5 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi movq -0x70(%rbp), %rsi callq 0x298d0 movl %eax, %ecx movb $0x1, %al cmpl $0x0, %ecx movb %al, -0x71(%rbp) je 0x9f4b3 movq -0x18(%rbp), %rax cmpl $0x0, 0x6c(%rax) setne %al movb %al, -0x71(%rbp) movb -0x71(%rbp), %al testb $0x1, %al jne 0x9f4bc jmp 0x9f50d movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x68(%rbp), %rdx movq -0x20(%rbp), %rcx movq %rsp, %rax movq %rcx, 0x40(%rax) movups -0x60(%rbp), %xmm0 movups -0x50(%rbp), %xmm1 movups -0x40(%rbp), %xmm2 movups -0x30(%rbp), %xmm3 movups %xmm3, 0x30(%rax) movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) movl $0x1, %ecx callq 0x9f7e0 cmpb $0x0, %al je 0x9f508 jmp 0x9f502 movb $0x1, -0x1(%rbp) jmp 0x9f52e jmp 0x9f47e movq -0x18(%rbp), %rax movl 0x68(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x68(%rax) movq -0x70(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x38(%rax) jmp 0x9f528 jmp 0x9f52a movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xc0, %rsp popq %rbp retq nopw (%rax,%rax)
get_wrlock: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov rsi, [rax+20h] add rsi, 18h lea rdi, [rbp+var_60] mov edx, 48h ; 'H' call _memcpy mov rax, [rbp+var_18] mov rax, [rax+20h] mov rax, [rax+60h] mov [rbp+var_68], rax call _pthread_self mov [rbp+var_70], rax jmp short $+2 loc_9F478: jmp short $+2 loc_9F47A: jmp short $+2 loc_9F47C: jmp short $+2 loc_9F47E: mov rax, [rbp+var_18] cmp dword ptr [rax+68h], 0 jz short loc_9F4A5 mov rax, [rbp+var_18] mov rdi, [rax+38h] mov rsi, [rbp+var_70] call _pthread_equal mov ecx, eax mov al, 1 cmp ecx, 0 mov [rbp+var_71], al jz short loc_9F4B3 loc_9F4A5: mov rax, [rbp+var_18] cmp dword ptr [rax+6Ch], 0 setnz al mov [rbp+var_71], al loc_9F4B3: mov al, [rbp+var_71] test al, 1 jnz short loc_9F4BC jmp short loc_9F50D loc_9F4BC: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_68] mov rcx, [rbp+var_20] mov rax, rsp mov [rax+40h], rcx movups xmm0, [rbp+var_60] movups xmm1, [rbp+var_50] movups xmm2, [rbp+var_40] movups xmm3, [rbp+var_30] movups xmmword ptr [rax+30h], xmm3 movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 mov ecx, 1 call pagecache_wait_lock cmp al, 0 jz short loc_9F508 jmp short $+2 loc_9F502: mov [rbp+var_1], 1 jmp short loc_9F52E loc_9F508: jmp loc_9F47E loc_9F50D: mov rax, [rbp+var_18] mov ecx, [rax+68h] add ecx, 1 mov [rax+68h], ecx mov rcx, [rbp+var_70] mov rax, [rbp+var_18] mov [rax+38h], rcx jmp short $+2 loc_9F528: jmp short $+2 loc_9F52A: mov [rbp+var_1], 0 loc_9F52E: mov al, [rbp+var_1] add rsp, 0C0h pop rbp retn
char get_wrlock(long long a1, long long a2) { int v2; // r8d int v3; // r9d bool v5; // [rsp+4Fh] [rbp-71h] long long v6; // [rsp+50h] [rbp-70h] long long v7; // [rsp+58h] [rbp-68h] _OWORD v8[4]; // [rsp+60h] [rbp-60h] BYREF long long v9; // [rsp+A0h] [rbp-20h] long long v10; // [rsp+A8h] [rbp-18h] long long v11; // [rsp+B0h] [rbp-10h] v11 = a1; v10 = a2; memcpy(v8, *(_QWORD *)(a2 + 32) + 24LL, 72LL); v7 = *(_QWORD *)(*(_QWORD *)(v10 + 32) + 96LL); v6 = pthread_self(); while ( 1 ) { if ( !*(_DWORD *)(v10 + 104) || (v5 = 1, (unsigned int)pthread_equal(*(_QWORD *)(v10 + 56), v6)) ) v5 = *(_DWORD *)(v10 + 108) != 0; if ( !v5 ) break; if ( (unsigned __int8)pagecache_wait_lock(v11, v10, v7, 1, v2, v3, v8[0], v8[1], v8[2], v8[3], v9) ) return 1; } ++*(_DWORD *)(v10 + 104); *(_QWORD *)(v10 + 56) = v6; return 0; }
get_wrlock: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x20] ADD RSI,0x18 LEA RDI,[RBP + -0x60] MOV EDX,0x48 CALL 0x00129090 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x60] MOV qword ptr [RBP + -0x68],RAX CALL 0x001294f0 MOV qword ptr [RBP + -0x70],RAX JMP 0x0019f478 LAB_0019f478: JMP 0x0019f47a LAB_0019f47a: JMP 0x0019f47c LAB_0019f47c: JMP 0x0019f47e LAB_0019f47e: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x68],0x0 JZ 0x0019f4a5 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x70] CALL 0x001298d0 MOV ECX,EAX MOV AL,0x1 CMP ECX,0x0 MOV byte ptr [RBP + -0x71],AL JZ 0x0019f4b3 LAB_0019f4a5: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x6c],0x0 SETNZ AL MOV byte ptr [RBP + -0x71],AL LAB_0019f4b3: MOV AL,byte ptr [RBP + -0x71] TEST AL,0x1 JNZ 0x0019f4bc JMP 0x0019f50d LAB_0019f4bc: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x20] MOV RAX,RSP MOV qword ptr [RAX + 0x40],RCX MOVUPS XMM0,xmmword ptr [RBP + -0x60] MOVUPS XMM1,xmmword ptr [RBP + -0x50] MOVUPS XMM2,xmmword ptr [RBP + -0x40] MOVUPS XMM3,xmmword ptr [RBP + -0x30] MOVUPS xmmword ptr [RAX + 0x30],XMM3 MOVUPS xmmword ptr [RAX + 0x20],XMM2 MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 MOV ECX,0x1 CALL 0x0019f7e0 CMP AL,0x0 JZ 0x0019f508 JMP 0x0019f502 LAB_0019f502: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0019f52e LAB_0019f508: JMP 0x0019f47e LAB_0019f50d: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x68] ADD ECX,0x1 MOV dword ptr [RAX + 0x68],ECX MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x38],RCX JMP 0x0019f528 LAB_0019f528: JMP 0x0019f52a LAB_0019f52a: MOV byte ptr [RBP + -0x1],0x0 LAB_0019f52e: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xc0 POP RBP RET
int1 get_wrlock(int8 param_1,long param_2,int8 param_3,int8 param_4,int8 param_5, int8 param_6) { int8 uVar1; char cVar2; int iVar3; pthread_t __thread2; bool bVar4; int4 local_68 [2]; int4 uStack_60; int4 local_58; int4 uStack_50; int4 local_48; int4 uStack_40; int4 local_38; int4 uStack_30; int8 local_28; long local_20; int8 local_18; local_20 = param_2; local_18 = param_1; memcpy(local_68,(void *)(*(long *)(param_2 + 0x20) + 0x18),0x48); uVar1 = *(int8 *)(*(long *)(local_20 + 0x20) + 0x60); __thread2 = pthread_self(); do { if (*(int *)(local_20 + 0x68) == 0) { LAB_0019f4a5: bVar4 = *(int *)(local_20 + 0x6c) != 0; } else { iVar3 = pthread_equal(*(pthread_t *)(local_20 + 0x38),__thread2); bVar4 = true; if (iVar3 != 0) goto LAB_0019f4a5; } if (!bVar4) { *(int *)(local_20 + 0x68) = *(int *)(local_20 + 0x68) + 1; *(pthread_t *)(local_20 + 0x38) = __thread2; return 0; } cVar2 = pagecache_wait_lock(local_18,local_20,uVar1,1,param_5,param_6,local_68[0],uStack_60, local_58,uStack_50,local_48,uStack_40,local_38,uStack_30,local_28); if (cVar2 != '\0') { return 1; } } while( true ); }
44,909
my_mutex_end
eloqsql/mysys/thr_mutex.c
void my_mutex_end() { #ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP pthread_mutexattr_destroy(&my_fast_mutexattr); #endif #ifdef PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP pthread_mutexattr_destroy(&my_errorcheck_mutexattr); #endif }
O3
c
my_mutex_end: pushq %rbp movq %rsp, %rbp leaq 0x355639(%rip), %rdi # 0x3b6b30 callq 0x285a0 leaq 0x355631(%rip), %rdi # 0x3b6b34 popq %rbp jmp 0x285a0 nopl (%rax)
my_mutex_end: push rbp mov rbp, rsp lea rdi, my_fast_mutexattr call _pthread_mutexattr_destroy lea rdi, my_errorcheck_mutexattr pop rbp jmp _pthread_mutexattr_destroy
long long my_mutex_end() { pthread_mutexattr_destroy(&my_fast_mutexattr); return pthread_mutexattr_destroy(&my_errorcheck_mutexattr); }
my_mutex_end: PUSH RBP MOV RBP,RSP LEA RDI,[0x4b6b30] CALL 0x001285a0 LEA RDI,[0x4b6b34] POP RBP JMP 0x001285a0
void my_mutex_end(void) { pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_fast_mutexattr); pthread_mutexattr_destroy((pthread_mutexattr_t *)&my_errorcheck_mutexattr); return; }
44,910
js_symbol_toString
bluesky950520[P]quickjs/quickjs.c
static JSValue js_symbol_toString(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue val, ret; val = js_thisSymbolValue(ctx, this_val); if (JS_IsException(val)) return val; /* XXX: use JS_ToStringInternal() with a flags */ ret = js_string_constructor(ctx, JS_UNDEFINED, 1, &val); JS_FreeValue(ctx, val); return ret; }
O1
c
js_symbol_toString: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 callq 0x7e762 movq %rax, %rbx movq %rdx, %r14 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) cmpl $0x6, %r14d je 0x7e688 movq %rsp, %r8 movl $0x3, %edx movq %r15, %rdi xorl %esi, %esi movl $0x1, %ecx callq 0x389d8 movq %rax, %r12 movq %rdx, %r13 movq 0x18(%r15), %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1d8c6 movq %r12, %rbx movq %r13, %r14 movq %rbx, %rax movq %r14, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_symbol_toString: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r15, rdi call js_thisSymbolValue mov rbx, rax mov r14, rdx mov [rsp+38h+var_38], rax mov [rsp+38h+var_30], rdx cmp r14d, 6 jz short loc_7E688 mov r8, rsp mov edx, 3 mov rdi, r15 xor esi, esi mov ecx, 1 call js_string_constructor mov r12, rax mov r13, rdx mov rdi, [r15+18h] mov rsi, rbx mov rdx, r14 call JS_FreeValueRT mov rbx, r12 mov r14, r13 loc_7E688: mov rax, rbx mov rdx, r14 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
_DWORD * js_symbol_toString( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { _DWORD *v9; // rbx long long v10; // r9 __m128 v11; // xmm4 __m128 v12; // xmm5 long long v13; // rdx long long v14; // r14 unsigned long long v15; // r12 long long v17[7]; // [rsp+0h] [rbp-38h] BYREF v9 = (_DWORD *)js_thisSymbolValue(); v14 = v13; v17[0] = (long long)v9; v17[1] = v13; if ( (_DWORD)v13 != 6 ) { v15 = js_string_constructor(a1, 0LL, 3LL, 1, v17, v10, a2, a3, a4, a5, v11, v12, a8, a9); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v9, v14); return (_DWORD *)v15; } return v9; }
js_symbol_toString: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15,RDI CALL 0x0017e762 MOV RBX,RAX MOV R14,RDX MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX CMP R14D,0x6 JZ 0x0017e688 MOV R8,RSP MOV EDX,0x3 MOV RDI,R15 XOR ESI,ESI MOV ECX,0x1 CALL 0x001389d8 MOV R12,RAX MOV R13,RDX MOV RDI,qword ptr [R15 + 0x18] MOV RSI,RBX MOV RDX,R14 CALL 0x0011d8c6 MOV RBX,R12 MOV R14,R13 LAB_0017e688: MOV RAX,RBX MOV RDX,R14 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_symbol_toString(long param_1) { int8 uVar1; int8 uVar2; int1 auVar3 [16]; int1 local_38 [16]; auVar3 = js_thisSymbolValue(); uVar2 = auVar3._8_8_; uVar1 = auVar3._0_8_; if (auVar3._8_4_ != 6) { local_38 = auVar3; auVar3 = js_string_constructor(param_1,0,3,1,local_38); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar1,uVar2); } return auVar3; }
44,911
js_symbol_toString
bluesky950520[P]quickjs/quickjs.c
static JSValue js_symbol_toString(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue val, ret; val = js_thisSymbolValue(ctx, this_val); if (JS_IsException(val)) return val; /* XXX: use JS_ToStringInternal() with a flags */ ret = js_string_constructor(ctx, JS_UNDEFINED, 1, &val); JS_FreeValue(ctx, val); return ret; }
O2
c
js_symbol_toString: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdi, %r15 callq 0x6a4ab movq %rax, %rbx movq %rdx, %r14 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) cmpl $0x6, %r14d je 0x6a417 pushq $0x3 popq %rdx pushq $0x1 popq %rcx movq %rsp, %r8 movq %r15, %rdi xorl %esi, %esi callq 0x31bb3 movq %rax, %r12 movq %rdx, %r13 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x1801e movq %r12, %rbx movq %r13, %r14 movq %rbx, %rax movq %r14, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_symbol_toString: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r15, rdi call js_thisSymbolValue mov rbx, rax mov r14, rdx mov [rsp+38h+var_38], rax mov [rsp+38h+var_30], rdx cmp r14d, 6 jz short loc_6A417 push 3 pop rdx push 1 pop rcx mov r8, rsp mov rdi, r15 xor esi, esi call js_string_constructor mov r12, rax mov r13, rdx mov rdi, r15 mov rsi, rbx mov rdx, r14 call JS_FreeValue mov rbx, r12 mov r14, r13 loc_6A417: mov rax, rbx mov rdx, r14 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long js_symbol_toString( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { long long v9; // rbx double v10; // xmm4_8 double v11; // xmm5_8 long long v12; // rdx long long v13; // r14 long long v14; // r12 long long v16[7]; // [rsp+0h] [rbp-38h] BYREF v9 = js_thisSymbolValue(); v13 = v12; v16[0] = v9; v16[1] = v12; if ( (_DWORD)v12 != 6 ) { v14 = js_string_constructor(a1, 0LL, 3LL, 1, v16, a2, a3, a4, a5, v10, v11, a8, a9); JS_FreeValue(a1, v9, v13); return v14; } return v9; }
js_symbol_toString: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15,RDI CALL 0x0016a4ab MOV RBX,RAX MOV R14,RDX MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX CMP R14D,0x6 JZ 0x0016a417 PUSH 0x3 POP RDX PUSH 0x1 POP RCX MOV R8,RSP MOV RDI,R15 XOR ESI,ESI CALL 0x00131bb3 MOV R12,RAX MOV R13,RDX MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x0011801e MOV RBX,R12 MOV R14,R13 LAB_0016a417: MOV RAX,RBX MOV RDX,R14 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
int1 [16] js_symbol_toString(int8 param_1) { int8 uVar1; int8 uVar2; int1 auVar3 [16]; int1 local_38 [16]; auVar3 = js_thisSymbolValue(); uVar2 = auVar3._8_8_; uVar1 = auVar3._0_8_; if (auVar3._8_4_ != 6) { local_38 = auVar3; auVar3 = js_string_constructor(param_1,0,3,1,local_38); JS_FreeValue(param_1,uVar1,uVar2); } return auVar3; }
44,912
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; } }
O0
c
add_compiled_extra_collation: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x299be movq -0x8(%rbp), %rdx movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, %ecx leaq 0x35cc9f(%rip), %rax # 0x386670 movq %rdx, (%rax,%rcx,8) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x200, %ecx # imm = 0x200 movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rsi leaq 0x360c80(%rip), %rdi # 0x38a670 callq 0x2c700 cmpb $0x0, %al je 0x29a31 movq -0x8(%rbp), %rax movq 0x10(%rax), %rsi movq -0x8(%rbp), %rax movq 0x18(%rax), %rdx leaq 0x360c60(%rip), %rdi # 0x38a670 callq 0x2c310 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
add_compiled_extra_collation: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_299BE: mov rdx, [rbp+var_8] mov rax, [rbp+var_8] mov eax, [rax] mov ecx, eax lea rax, all_charsets mov [rax+rcx*8], rdx mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 200h mov [rax+0Ch], ecx mov rsi, [rbp+var_8] lea rdi, charset_name_hash call my_hash_insert cmp al, 0 jz short loc_29A31 mov rax, [rbp+var_8] mov rsi, [rax+10h] mov rax, [rbp+var_8] mov rdx, [rax+18h] lea rdi, charset_name_hash call my_hash_search mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rcx, [rbp+var_10] mov rdx, [rcx+10h] mov [rax+10h], rdx mov rcx, [rcx+18h] mov [rax+18h], rcx loc_29A31: add rsp, 10h pop rbp retn
long long add_compiled_extra_collation(unsigned int *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-10h] all_charsets[*a1] = a1; a1[3] |= 0x200u; result = my_hash_insert(&charset_name_hash, a1); if ( (_BYTE)result ) { v2 = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); result = (long long)a1; *((_QWORD *)a1 + 2) = *(_QWORD *)(v2 + 16); *((_QWORD *)a1 + 3) = *(_QWORD *)(v2 + 24); } return result; }
add_compiled_extra_collation: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001299be LAB_001299be: MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV ECX,EAX LEA RAX,[0x486670] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x200 MOV dword ptr [RAX + 0xc],ECX MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x48a670] CALL 0x0012c700 CMP AL,0x0 JZ 0x00129a31 MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x18] LEA RDI,[0x48a670] CALL 0x0012c310 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_00129a31: ADD RSP,0x10 POP RBP RET
void add_compiled_extra_collation(uint *param_1) { char cVar1; long lVar2; (&all_charsets)[*param_1] = param_1; param_1[3] = param_1[3] | 0x200; cVar1 = my_hash_insert(charset_name_hash,param_1); if (cVar1 != '\0') { lVar2 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4), *(int8 *)(param_1 + 6)); *(int8 *)(param_1 + 4) = *(int8 *)(lVar2 + 0x10); *(int8 *)(param_1 + 6) = *(int8 *)(lVar2 + 0x18); } return; }
44,913
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 0x33e914(%rip), %rcx # 0x366a50 movq %rdi, (%rcx,%rax,8) orb $0x2, 0xd(%rdi) leaq 0x342905(%rip), %rdi # 0x36aa50 movq %rbx, %rsi callq 0x29ada testb %al, %al je 0x28173 movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx leaq 0x3428ea(%rip), %rdi # 0x36aa50 callq 0x2987a 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_28173 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_28173: 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,[0x466a50] MOV qword ptr [RCX + RAX*0x8],RDI OR byte ptr [RDI + 0xd],0x2 LEA RDI,[0x46aa50] MOV RSI,RBX CALL 0x00129ada TEST AL,AL JZ 0x00128173 MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] LEA RDI,[0x46aa50] CALL 0x0012987a MOVUPS XMM0,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RBX + 0x10],XMM0 LAB_00128173: 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; }
44,914
ratio
eloqsql/strings/dtoa.c
static double ratio(Bigint *a, Bigint *b) { U da, db; int k, ka, kb; dval(&da)= b2d(a, &ka); dval(&db)= b2d(b, &kb); k= ka - kb + 32*(a->wds - b->wds); if (k > 0) word0(&da)+= (ULong)(k*Exp_msk1 * 1.0); else { k= -k; word0(&db)+= k*Exp_msk1; } return dval(&da) / dval(&db); }
O0
c
ratio: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0x73940 movsd %xmm0, -0x18(%rbp) movq -0x10(%rbp), %rdi leaq -0x2c(%rbp), %rsi callq 0x73940 movsd %xmm0, -0x20(%rbp) movl -0x28(%rbp), %eax subl -0x2c(%rbp), %eax movq -0x8(%rbp), %rcx movl 0x14(%rcx), %ecx movq -0x10(%rbp), %rdx subl 0x14(%rdx), %ecx shll $0x5, %ecx addl %ecx, %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jle 0x735e4 movl -0x24(%rbp), %eax shll $0x14, %eax addl -0x14(%rbp), %eax movl %eax, -0x14(%rbp) jmp 0x735f8 xorl %eax, %eax subl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax shll $0x14, %eax addl -0x1c(%rbp), %eax movl %eax, -0x1c(%rbp) movsd -0x18(%rbp), %xmm0 divsd -0x20(%rbp), %xmm0 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
ratio: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] lea rsi, [rbp+var_28] call b2d movsd [rbp+var_18], xmm0 mov rdi, [rbp+var_10] lea rsi, [rbp+var_2C] call b2d movsd [rbp+var_20], xmm0 mov eax, [rbp+var_28] sub eax, [rbp+var_2C] mov rcx, [rbp+var_8] mov ecx, [rcx+14h] mov rdx, [rbp+var_10] sub ecx, [rdx+14h] shl ecx, 5 add eax, ecx mov [rbp+var_24], eax cmp [rbp+var_24], 0 jle short loc_735E4 mov eax, [rbp+var_24] shl eax, 14h add eax, dword ptr [rbp+var_18+4] mov dword ptr [rbp+var_18+4], eax jmp short loc_735F8 loc_735E4: xor eax, eax sub eax, [rbp+var_24] mov [rbp+var_24], eax mov eax, [rbp+var_24] shl eax, 14h add eax, dword ptr [rbp+var_20+4] mov dword ptr [rbp+var_20+4], eax loc_735F8: movsd xmm0, [rbp+var_18] divsd xmm0, [rbp+var_20] add rsp, 30h pop rbp retn
double ratio(long long a1, long long a2) { int v3; // [rsp+4h] [rbp-2Ch] BYREF int v4; // [rsp+8h] [rbp-28h] BYREF int v5; // [rsp+Ch] [rbp-24h] double v6; // [rsp+10h] [rbp-20h] double v7; // [rsp+18h] [rbp-18h] long long v8; // [rsp+20h] [rbp-10h] long long v9; // [rsp+28h] [rbp-8h] v9 = a1; v8 = a2; v7 = b2d(a1, &v4); v6 = b2d(v8, &v3); v5 = 32 * (*(_DWORD *)(v9 + 20) - *(_DWORD *)(v8 + 20)) + v4 - v3; if ( v5 <= 0 ) { v5 = -v5; HIDWORD(v6) += v5 << 20; } else { HIDWORD(v7) += v5 << 20; } return v7 / v6; }
ratio: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x28] CALL 0x00173940 MOVSD qword ptr [RBP + -0x18],XMM0 MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x2c] CALL 0x00173940 MOVSD qword ptr [RBP + -0x20],XMM0 MOV EAX,dword ptr [RBP + -0x28] SUB EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x14] MOV RDX,qword ptr [RBP + -0x10] SUB ECX,dword ptr [RDX + 0x14] SHL ECX,0x5 ADD EAX,ECX MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JLE 0x001735e4 MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x14 ADD EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x14],EAX JMP 0x001735f8 LAB_001735e4: XOR EAX,EAX SUB EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x14 ADD EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x1c],EAX LAB_001735f8: MOVSD XMM0,qword ptr [RBP + -0x18] DIVSD XMM0,qword ptr [RBP + -0x20] ADD RSP,0x30 POP RBP RET
double ratio(long param_1,long param_2) { int iVar1; double dVar2; int local_34; int local_30 [2]; int8 local_28; int8 local_20; long local_18; long local_10; local_18 = param_2; local_10 = param_1; local_20 = (double)b2d(param_1,local_30); dVar2 = (double)b2d(local_18,&local_34); iVar1 = (local_30[0] - local_34) + (*(int *)(local_10 + 0x14) - *(int *)(local_18 + 0x14)) * 0x20; if (iVar1 < 1) { local_28._4_4_ = (int)((ulong)dVar2 >> 0x20); local_28 = (double)CONCAT44(iVar1 * -0x100000 + local_28._4_4_,SUB84(dVar2,0)); } else { local_20 = (double)CONCAT44(iVar1 * 0x100000 + local_20._4_4_,(int4)local_20); local_28 = dVar2; } return local_20 / local_28; }
44,915
std::unique_ptr<ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>, std::default_delete<ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>>> ftxui::MakeReceiver<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>()
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/include/ftxui/component/receiver.hpp
Receiver<T> MakeReceiver() { return std::make_unique<ReceiverImpl<T>>(); }
O1
cpp
std::unique_ptr<ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>, std::default_delete<ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>>> ftxui::MakeReceiver<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask>>(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 movl $0xb0, %edi callq 0xb3e0 movq %rax, %rbx leaq 0x28(%rax), %rdi xorps %xmm0, %xmm0 movups %xmm0, (%rax) movups %xmm0, 0x10(%rax) movups %xmm0, 0x20(%rax) movups %xmm0, 0x30(%rax) movups %xmm0, 0x40(%rax) movups %xmm0, 0x50(%rax) movups %xmm0, 0x60(%rax) movq $0x0, 0x70(%rax) xorl %r15d, %r15d xorl %esi, %esi callq 0x32408 movq %rbx, %rdi addq $0x78, %rdi callq 0xb5b0 xchgl %r15d, 0xa8(%rbx) movq %rbx, (%r14) movq %r14, %rax popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movl $0xb0, %esi movq %rbx, %rdi callq 0xb400 movq %r14, %rdi callq 0xb780 nop
_ZN5ftxui12MakeReceiverISt7variantIJNS_5EventESt8functionIFvvEENS_13AnimationTaskEEEEESt10unique_ptrINS_12ReceiverImplIT_EESt14default_deleteISB_EEv: push r15 push r14 push rbx mov r14, rdi mov edi, 0B0h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax lea rdi, [rax+28h] xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 movups xmmword ptr [rax+10h], xmm0 movups xmmword ptr [rax+20h], xmm0 movups xmmword ptr [rax+30h], xmm0 movups xmmword ptr [rax+40h], xmm0 movups xmmword ptr [rax+50h], xmm0 movups xmmword ptr [rax+60h], xmm0 mov qword ptr [rax+70h], 0 xor r15d, r15d xor esi, esi call _ZNSt11_Deque_baseISt7variantIJN5ftxui5EventESt8functionIFvvEENS1_13AnimationTaskEEESaIS7_EE17_M_initialize_mapEm; std::_Deque_base<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::_M_initialize_map(ulong) mov rdi, rbx add rdi, 78h ; 'x'; this call __ZNSt18condition_variableC1Ev; std::condition_variable::condition_variable(void) xchg r15d, [rbx+0A8h] mov [r14], rbx mov rax, r14 pop rbx pop r14 pop r15 retn mov r14, rax mov esi, 0B0h; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
_QWORD * ftxui::MakeReceiver<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>( _QWORD *a1) { long long v1; // rbx v1 = operator new(0xB0uLL); *(_OWORD *)v1 = 0LL; *(_OWORD *)(v1 + 16) = 0LL; *(_OWORD *)(v1 + 32) = 0LL; *(_OWORD *)(v1 + 48) = 0LL; *(_OWORD *)(v1 + 64) = 0LL; *(_OWORD *)(v1 + 80) = 0LL; *(_OWORD *)(v1 + 96) = 0LL; *(_QWORD *)(v1 + 112) = 0LL; std::_Deque_base<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::_M_initialize_map( v1 + 40, 0LL); std::condition_variable::condition_variable((std::condition_variable *)(v1 + 120)); _InterlockedExchange((volatile __int32 *)(v1 + 168), 0); *a1 = v1; return a1; }
MakeReceiver<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI MOV EDI,0xb0 CALL 0x0010b3e0 MOV RBX,RAX LEA RDI,[RAX + 0x28] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOVUPS xmmword ptr [RAX + 0x30],XMM0 MOVUPS xmmword ptr [RAX + 0x40],XMM0 MOVUPS xmmword ptr [RAX + 0x50],XMM0 MOVUPS xmmword ptr [RAX + 0x60],XMM0 MOV qword ptr [RAX + 0x70],0x0 LAB_001313ca: XOR R15D,R15D XOR ESI,ESI CALL 0x00132408 LAB_001313d4: MOV RDI,RBX ADD RDI,0x78 CALL 0x0010b5b0 XCHG dword ptr [RBX + 0xa8],R15D MOV qword ptr [R14],RBX MOV RAX,R14 POP RBX POP R14 POP R15 RET
/* std::unique_ptr<ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask> >, std::default_delete<ftxui::ReceiverImpl<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask> > > > ftxui::MakeReceiver<std::variant<ftxui::Event, std::function<void ()>, ftxui::AnimationTask> >() */ ftxui * __thiscall ftxui::MakeReceiver<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>> (ftxui *this) { int8 *puVar1; puVar1 = (int8 *)operator_new(0xb0); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; puVar1[3] = 0; puVar1[4] = 0; puVar1[5] = 0; puVar1[6] = 0; puVar1[7] = 0; puVar1[8] = 0; puVar1[9] = 0; puVar1[10] = 0; puVar1[0xb] = 0; puVar1[0xc] = 0; puVar1[0xd] = 0; puVar1[0xe] = 0; /* try { // try from 001313ca to 001313d3 has its CatchHandler @ 001313f3 */ std:: _Deque_base<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>,std::allocator<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>> ::_M_initialize_map((_Deque_base<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>,std::allocator<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>> *)(puVar1 + 5),0); std::condition_variable::condition_variable((condition_variable *)(puVar1 + 0xf)); LOCK(); *(int4 *)(puVar1 + 0x15) = 0; UNLOCK(); *(int8 **)this = puVar1; return this; }
44,916
mp_sqrtrem1
bluesky950520[P]quickjs/libbf.c
static limb_t mp_sqrtrem1(limb_t *pr, limb_t a) { limb_t s1, r1, s, r, q, u, num; /* use a table for the 16 -> 8 bit sqrt */ s1 = sqrt_table[(a >> (LIMB_BITS - 8)) - 64]; r1 = (a >> (LIMB_BITS - 16)) - s1 * s1; if (r1 > 2 * s1) { r1 -= 2 * s1 + 1; s1++; } /* one iteration to get a 32 -> 16 bit sqrt */ num = (r1 << 8) | ((a >> (LIMB_BITS - 32 + 8)) & 0xff); q = num / (2 * s1); /* q <= 2^8 */ u = num % (2 * s1); s = (s1 << 8) + q; r = (u << 8) | ((a >> (LIMB_BITS - 32)) & 0xff); r -= q * q; if ((slimb_t)r < 0) { s--; r += 2 * s + 1; } #if LIMB_BITS == 64 s1 = s; r1 = r; /* one more iteration for 64 -> 32 bit sqrt */ num = (r1 << 16) | ((a >> (LIMB_BITS - 64 + 16)) & 0xffff); q = num / (2 * s1); /* q <= 2^16 */ u = num % (2 * s1); s = (s1 << 16) + q; r = (u << 16) | ((a >> (LIMB_BITS - 64)) & 0xffff); r -= q * q; if ((slimb_t)r < 0) { s--; r += 2 * s + 1; } #endif *pr = r; return s; }
O2
c
mp_sqrtrem1: pushq %rbx movq %rsi, %rdx movq %rsi, %rax movq %rsi, %r8 movl %esi, %ecx movzwl %si, %r9d shrq $0x38, %rsi leaq 0x17e20(%rip), %r10 # 0x8cf00 movzwl -0x80(%r10,%rsi,2), %esi shrq $0x30, %rdx movq %rsi, %r10 imulq %rsi, %r10 subq %r10, %rdx leal (%rsi,%rsi), %r10d xorl %r11d, %r11d xorl %ebx, %ebx cmpq %r10, %rdx notq %r10 cmovbeq %r11, %r10 seta %bl addl %esi, %ebx addq %rdx, %r10 shlq $0x8, %r10 shrq $0x28, %rax movl $0xff, %esi andq %rsi, %rax orq %r10, %rax leal (%rbx,%rbx), %r10d xorl %edx, %edx divq %r10 shll $0x8, %ebx shrq $0x20, %r8 andq %rsi, %r8 leaq (%rbx,%rax), %rsi shll $0x8, %edx leaq (%rbx,%rax), %r10 decq %r10 imulq %rax, %rax subq %rax, %r8 addq %rdx, %r8 leaq -0x1(%rsi,%rsi), %rax cmovnsq %rsi, %r10 movq %r8, %rdx sarq $0x3f, %rdx andq %rax, %rdx addq %r8, %rdx shlq $0x10, %rdx shrl $0x10, %ecx orq %rdx, %rcx leaq (%r10,%r10), %rsi movq %rcx, %rax xorl %edx, %edx divq %rsi shlq $0x10, %r10 leaq (%r10,%rax), %rsi shlq $0x10, %rdx leaq (%r10,%rax), %rcx decq %rcx imulq %rax, %rax subq %rax, %r9 addq %rdx, %r9 leaq -0x1(%rsi,%rsi), %rax cmovnsq %rsi, %rcx movq %r9, %rdx sarq $0x3f, %rdx andq %rax, %rdx addq %r9, %rdx movq %rdx, (%rdi) movq %rcx, %rax popq %rbx retq
mp_sqrtrem1: push rbx mov rdx, rsi mov rax, rsi mov r8, rsi mov ecx, esi movzx r9d, si shr rsi, 38h lea r10, sqrt_table movzx esi, word ptr [r10+rsi*2-80h] shr rdx, 30h mov r10, rsi imul r10, rsi sub rdx, r10 lea r10d, [rsi+rsi] xor r11d, r11d xor ebx, ebx cmp rdx, r10 not r10 cmovbe r10, r11 setnbe bl add ebx, esi add r10, rdx shl r10, 8 shr rax, 28h mov esi, 0FFh and rax, rsi or rax, r10 lea r10d, [rbx+rbx] xor edx, edx div r10 shl ebx, 8 shr r8, 20h and r8, rsi lea rsi, [rbx+rax] shl edx, 8 lea r10, [rbx+rax] dec r10 imul rax, rax sub r8, rax add r8, rdx lea rax, [rsi+rsi-1] cmovns r10, rsi mov rdx, r8 sar rdx, 3Fh and rdx, rax add rdx, r8 shl rdx, 10h shr ecx, 10h or rcx, rdx lea rsi, [r10+r10] mov rax, rcx xor edx, edx div rsi shl r10, 10h lea rsi, [r10+rax] shl rdx, 10h lea rcx, [r10+rax] dec rcx imul rax, rax sub r9, rax add r9, rdx lea rax, [rsi+rsi-1] cmovns rcx, rsi mov rdx, r9 sar rdx, 3Fh and rdx, rax add rdx, r9 mov [rdi], rdx mov rax, rcx pop rbx retn
unsigned long long mp_sqrtrem1(_QWORD *a1, unsigned long long a2) { unsigned __int8 v3; // rax^5 unsigned __int8 v4; // r8^4 unsigned int v5; // ecx long long v6; // r9 long long v7; // rsi unsigned long long v8; // rdx unsigned long long v9; // r10 int v10; // ebx bool v11; // cf bool v12; // zf bool v13; // cc long long v14; // r10 int v15; // ebx unsigned long long v16; // rax unsigned long long v17; // rtt unsigned long long v18; // rsi unsigned long long v19; // r10 long long v20; // r8 unsigned long long v21; // rax unsigned long long v22; // rtt unsigned long long v23; // rsi unsigned long long v24; // rcx signed long long v25; // r9 v3 = BYTE5(a2); v4 = BYTE4(a2); v5 = a2; v6 = (unsigned __int16)a2; v7 = sqrt_table[HIBYTE(a2) - 64]; v8 = HIWORD(a2) - v7 * v7; v9 = (unsigned int)(2 * v7); v10 = 0; v11 = v8 < v9; v12 = v8 == v9; v13 = v8 <= v9; v14 = ~v9; if ( v13 ) v14 = 0LL; LOBYTE(v10) = !v11 && !v12; v15 = v7 + v10; v17 = ((v8 + v14) << 8) | v3; v16 = v17 / (unsigned int)(2 * v15); v18 = (unsigned int)(v15 << 8) + v16; v19 = v18 - 1; v20 = ((unsigned int)(v17 % (unsigned int)(2 * v15)) << 8) + v4 - v16 * v16; if ( v20 >= 0 ) v19 = (unsigned int)(v15 << 8) + v16; v22 = ((v20 + ((2 * v18 - 1) & (v20 >> 63))) << 16) | HIWORD(v5); v21 = v22 / (2 * v19); v23 = (v19 << 16) + v21; v24 = v23 - 1; v25 = ((v22 % (2 * v19)) << 16) + v6 - v21 * v21; if ( v25 >= 0 ) v24 = (v19 << 16) + v21; *a1 = v25 + ((2 * v23 - 1) & (v25 >> 63)); return v24; }
mp_sqrtrem1: PUSH RBX MOV RDX,RSI MOV RAX,RSI MOV R8,RSI MOV ECX,ESI MOVZX R9D,SI SHR RSI,0x38 LEA R10,[0x18cf00] MOVZX ESI,word ptr [R10 + RSI*0x2 + -0x80] SHR RDX,0x30 MOV R10,RSI IMUL R10,RSI SUB RDX,R10 LEA R10D,[RSI + RSI*0x1] XOR R11D,R11D XOR EBX,EBX CMP RDX,R10 NOT R10 CMOVBE R10,R11 SETA BL ADD EBX,ESI ADD R10,RDX SHL R10,0x8 SHR RAX,0x28 MOV ESI,0xff AND RAX,RSI OR RAX,R10 LEA R10D,[RBX + RBX*0x1] XOR EDX,EDX DIV R10 SHL EBX,0x8 SHR R8,0x20 AND R8,RSI LEA RSI,[RBX + RAX*0x1] SHL EDX,0x8 LEA R10,[RBX + RAX*0x1] DEC R10 IMUL RAX,RAX SUB R8,RAX ADD R8,RDX LEA RAX,[RSI + RSI*0x1 + -0x1] CMOVNS R10,RSI MOV RDX,R8 SAR RDX,0x3f AND RDX,RAX ADD RDX,R8 SHL RDX,0x10 SHR ECX,0x10 OR RCX,RDX LEA RSI,[R10 + R10*0x1] MOV RAX,RCX XOR EDX,EDX DIV RSI SHL R10,0x10 LEA RSI,[R10 + RAX*0x1] SHL RDX,0x10 LEA RCX,[R10 + RAX*0x1] DEC RCX IMUL RAX,RAX SUB R9,RAX ADD R9,RDX LEA RAX,[RSI + RSI*0x1 + -0x1] CMOVNS RCX,RSI MOV RDX,R9 SAR RDX,0x3f AND RDX,RAX ADD RDX,R9 MOV qword ptr [RDI],RDX MOV RAX,RCX POP RBX RET
long mp_sqrtrem1(long *param_1,ulong param_2) { long lVar1; ushort uVar2; uint uVar3; ulong uVar4; long lVar5; ulong uVar6; int iVar7; ulong uVar8; long lVar9; uVar2 = *(ushort *)(mp_pow_dec + (param_2 >> 0x38) * 2 + 0x40); uVar6 = (param_2 >> 0x30) - (ulong)uVar2 * (ulong)uVar2; uVar8 = (ulong)((uint)uVar2 + (uint)uVar2); uVar4 = ~uVar8; if (uVar6 <= uVar8) { uVar4 = 0; } iVar7 = (uint)(uVar8 < uVar6) + (uint)uVar2; uVar4 = param_2 >> 0x28 & 0xff | (uVar4 + uVar6) * 0x100; uVar3 = iVar7 * 2; uVar6 = uVar4 / uVar3; uVar8 = (ulong)(uint)(iVar7 * 0x100); lVar1 = uVar8 + uVar6; lVar9 = ((param_2 >> 0x20 & 0xff) - uVar6 * uVar6) + (ulong)(uint)((int)(uVar4 % (ulong)uVar3) << 8); lVar5 = uVar8 + uVar6 + -1; if (-1 < lVar9) { lVar5 = lVar1; } uVar6 = param_2 >> 0x10 & 0xffff | ((lVar9 >> 0x3f & lVar1 * 2 - 1U) + lVar9) * 0x10000; uVar4 = uVar6 / (ulong)(lVar5 * 2); lVar1 = lVar5 * 0x10000 + uVar4; lVar9 = ((param_2 & 0xffff) - uVar4 * uVar4) + (uVar6 % (ulong)(lVar5 * 2)) * 0x10000; lVar5 = lVar5 * 0x10000 + uVar4 + -1; if (-1 < lVar9) { lVar5 = lVar1; } *param_1 = (lVar9 >> 0x3f & lVar1 * 2 - 1U) + lVar9; return lVar5; }
44,917
common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/ngram-cache.cpp
void common_ngram_cache_save(common_ngram_cache & ngram_cache, std::string & filename) { std::ofstream file_out(filename, std::ios::binary); for (std::pair<common_ngram, common_ngram_cache_part> item : ngram_cache) { const common_ngram ngram = item.first; common_ngram_cache_part token_counts = item.second; GGML_ASSERT(!token_counts.empty()); const int32_t ntokens = token_counts.size(); GGML_ASSERT(ntokens > 0); file_out.write(reinterpret_cast<const char *>(&ngram), sizeof(common_ngram)); file_out.write(reinterpret_cast<const char *>(&ntokens), sizeof(int32_t)); for (std::pair<llama_token, int32_t> item2 : token_counts) { const llama_token token = item2.first; const int32_t count = item2.second; GGML_ASSERT(count > 0); file_out.write(reinterpret_cast<const char *>(&token), sizeof(llama_token)); file_out.write(reinterpret_cast<const char *>(&count), sizeof(int32_t)); } } }
O2
cpp
common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, 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 $0x2a8, %rsp # imm = 0x2A8 movq %rdi, %r14 leaq 0xa8(%rsp), %r15 pushq $0x4 popq %rdx movq %r15, %rdi callq 0x25100 addq $0x10, %r14 leaq 0x28(%rsp), %r13 pushq $0x4 popq %r12 leaq 0x8(%rsp), %rbp leaq 0x4(%rsp), %rbx movq (%r14), %r14 testq %r14, %r14 je 0x98193 leaq 0x8(%r14), %rsi leaq 0x60(%rsp), %rdi callq 0x9873c movups 0x60(%rsp), %xmm0 movaps %xmm0, 0x10(%rsp) movq %r13, %rdi leaq 0x70(%rsp), %rsi callq 0x98a4c movq 0x40(%rsp), %rax testq %rax, %rax je 0x981d3 movl %eax, 0xc(%rsp) testl %eax, %eax jle 0x981f4 movq %r15, %rdi leaq 0x10(%rsp), %rsi pushq $0x10 popq %rdx callq 0x24b40 movq %r15, %rdi leaq 0xc(%rsp), %rsi movq %r12, %rdx callq 0x24b40 leaq 0x38(%rsp), %r13 movq (%r13), %r13 testq %r13, %r13 je 0x98177 movl 0x8(%r13), %eax movl 0xc(%r13), %ecx movl %eax, 0x8(%rsp) movl %ecx, 0x4(%rsp) testl %ecx, %ecx jle 0x981b2 movq %r15, %rdi movq %rbp, %rsi movq %r12, %rdx callq 0x24b40 movq %r15, %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x24b40 jmp 0x9813c leaq 0x28(%rsp), %r13 movq %r13, %rdi callq 0x2800e leaq 0x70(%rsp), %rdi callq 0x2800e jmp 0x980cc leaq 0xa8(%rsp), %rdi callq 0x24cc0 addq $0x2a8, %rsp # imm = 0x2A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x22d1b(%rip), %rdi # 0xbaed4 leaq 0x13f80(%rip), %rdx # 0xac140 leaq 0x22db0(%rip), %rcx # 0xbaf77 movl $0xd5, %esi xorl %eax, %eax callq 0x24e90 leaq 0x22cfa(%rip), %rdi # 0xbaed4 leaq 0x13f5f(%rip), %rdx # 0xac140 leaq 0x22d6d(%rip), %rcx # 0xbaf55 movl $0xcc, %esi xorl %eax, %eax callq 0x24e90 leaq 0x22cd9(%rip), %rdi # 0xbaed4 leaq 0x13f3e(%rip), %rdx # 0xac140 leaq 0x22d62(%rip), %rcx # 0xbaf6b movl $0xce, %esi xorl %eax, %eax callq 0x24e90 jmp 0x98227 jmp 0x98227 movq %rax, %rbx jmp 0x9823e movq %rax, %rbx jmp 0x98234 jmp 0x98227 jmp 0x98227 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x2800e leaq 0x70(%rsp), %rdi callq 0x2800e leaq 0xa8(%rsp), %rdi callq 0x24cc0 movq %rbx, %rdi callq 0x24f60
_Z23common_ngram_cache_saveRSt13unordered_mapI12common_ngramS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE26common_ngram_hash_functionS3_IS0_ESaIS5_IKS0_S9_EEERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2A8h mov r14, rdi lea r15, [rsp+2D8h+var_230] push 4 pop rdx mov rdi, r15 call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) add r14, 10h lea r13, [rsp+2D8h+var_2B0] push 4 pop r12 lea rbp, [rsp+2D8h+var_2D0] lea rbx, [rsp+2D8h+var_2D4] loc_980CC: mov r14, [r14] test r14, r14 jz loc_98193 lea rsi, [r14+8] lea rdi, [rsp+2D8h+var_278] call _ZNSt4pairI12common_ngramSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS_IKiiEEEEC2IKS0_S9_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairISE_SF_EEclsr6_PCCFPISE_SF_EE26_ImplicitlyConvertiblePairISE_SF_EEEbE4typeELb1EEERKS_ISE_SF_E movups xmm0, [rsp+2D8h+var_278] movaps xmmword ptr [rsp+2D8h+var_2C8], xmm0 mov rdi, r13 lea rsi, [rsp+2D8h+var_268] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEEC2ERKSF_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&) mov rax, [rsp+2D8h+var_298] test rax, rax jz loc_981D3 mov dword ptr [rsp+2D8h+var_2CC], eax test eax, eax jle loc_981F4 mov rdi, r15; this lea rsi, [rsp+2D8h+var_2C8]; char * push 10h pop rdx; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov rdi, r15; this lea rsi, [rsp+2D8h+var_2CC]; char * mov rdx, r12; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) lea r13, [rsp+2D8h+var_2A0] loc_9813C: mov r13, [r13+0] test r13, r13 jz short loc_98177 mov eax, [r13+8] mov ecx, [r13+0Ch] mov dword ptr [rsp+2D8h+var_2D0], eax mov dword ptr [rsp+2D8h+var_2D4], ecx test ecx, ecx jle short loc_981B2 mov rdi, r15; this mov rsi, rbp; char * mov rdx, r12; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov rdi, r15; this mov rsi, rbx; char * mov rdx, r12; __int64 call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) jmp short loc_9813C loc_98177: lea r13, [rsp+2D8h+var_2B0] mov rdi, r13 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() lea rdi, [rsp+2D8h+var_268] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() jmp loc_980CC loc_98193: lea rdi, [rsp+2D8h+var_230] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() add rsp, 2A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_981B2: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCount0; "count > 0" mov esi, 0D5h xor eax, eax call _ggml_abort loc_981D3: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTokenCountsEmp; "!token_counts.empty()" mov esi, 0CCh xor eax, eax call _ggml_abort loc_981F4: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNtokens0; "ntokens > 0" mov esi, 0CEh xor eax, eax call _ggml_abort jmp short loc_98227 jmp short loc_98227 mov rbx, rax jmp short loc_9823E mov rbx, rax jmp short loc_98234 jmp short loc_98227 jmp short $+2 loc_98227: mov rbx, rax lea rdi, [rsp+2D8h+var_2B0] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_98234: lea rdi, [rsp+2D8h+var_268] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_9823E: lea rdi, [rsp+2D8h+var_230] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() mov rdi, rbx call __Unwind_Resume
long long common_ngram_cache_save(long long a1, long long a2) { _QWORD *v2; // r14 char *v3; // r13 int v4; // ecx long long v6; // rbx char v7[4]; // [rsp+4h] [rbp-2D4h] BYREF char v8[4]; // [rsp+8h] [rbp-2D0h] BYREF char v9[4]; // [rsp+Ch] [rbp-2CCh] BYREF char v10[24]; // [rsp+10h] [rbp-2C8h] BYREF _BYTE v11[16]; // [rsp+28h] [rbp-2B0h] BYREF char v12; // [rsp+38h] [rbp-2A0h] BYREF long long v13; // [rsp+40h] [rbp-298h] __int128 v14; // [rsp+60h] [rbp-278h] BYREF _BYTE v15[56]; // [rsp+70h] [rbp-268h] BYREF _BYTE v16[560]; // [rsp+A8h] [rbp-230h] BYREF std::ofstream::basic_ofstream(v16, a2, 4LL); v2 = (_QWORD *)(a1 + 16); while ( 1 ) { v2 = (_QWORD *)*v2; if ( !v2 ) return std::ofstream::~ofstream(v16); ZNSt4pairI12common_ngramSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS_IKiiEEEEC2IKS0_S9_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairISE_SF_EEclsr6_PCCFPISE_SF_EE26_ImplicitlyConvertiblePairISE_SF_EEEbE4typeELb1EEERKS_ISE_SF_E( &v14, v2 + 1); *(_OWORD *)v10 = v14; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_Hashtable( v11, v15); if ( !v13 ) goto LABEL_12; *(_DWORD *)v9 = v13; if ( (int)v13 <= 0 ) { LABEL_13: v6 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 206LL, "GGML_ASSERT(%s) failed", "ntokens > 0"); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v11); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v15); std::ofstream::~ofstream(v16); _Unwind_Resume(v6); } std::ostream::write((std::ostream *)v16, v10, 16LL); std::ostream::write((std::ostream *)v16, v9, 4LL); v3 = &v12; while ( 1 ) { v3 = *(char **)v3; if ( !v3 ) break; v4 = *((_DWORD *)v3 + 3); *(_DWORD *)v8 = *((_DWORD *)v3 + 2); *(_DWORD *)v7 = v4; if ( v4 <= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 213LL, "GGML_ASSERT(%s) failed", "count > 0"); LABEL_12: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 204LL, "GGML_ASSERT(%s) failed", "!token_counts.empty()"); goto LABEL_13; } std::ostream::write((std::ostream *)v16, v8, 4LL); std::ostream::write((std::ostream *)v16, v7, 4LL); } std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v11); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v15); } }
common_ngram_cache_save: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2a8 MOV R14,RDI LEA R15,[RSP + 0xa8] PUSH 0x4 POP RDX MOV RDI,R15 CALL 0x00125100 ADD R14,0x10 LEA R13,[RSP + 0x28] PUSH 0x4 POP R12 LEA RBP,[RSP + 0x8] LEA RBX,[RSP + 0x4] LAB_001980cc: MOV R14,qword ptr [R14] TEST R14,R14 JZ 0x00198193 LEA RSI,[R14 + 0x8] LAB_001980dc: LEA RDI,[RSP + 0x60] CALL 0x0019873c MOVUPS XMM0,xmmword ptr [RSP + 0x60] MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_001980f0: MOV RDI,R13 LEA RSI,[RSP + 0x70] CALL 0x00198a4c MOV RAX,qword ptr [RSP + 0x40] TEST RAX,RAX JZ 0x001981d3 MOV dword ptr [RSP + 0xc],EAX TEST EAX,EAX JLE 0x001981f4 LAB_00198117: MOV RDI,R15 LEA RSI,[RSP + 0x10] PUSH 0x10 POP RDX CALL 0x00124b40 MOV RDI,R15 LEA RSI,[RSP + 0xc] MOV RDX,R12 CALL 0x00124b40 LEA R13,[RSP + 0x38] LAB_0019813c: MOV R13,qword ptr [R13] TEST R13,R13 JZ 0x00198177 MOV EAX,dword ptr [R13 + 0x8] MOV ECX,dword ptr [R13 + 0xc] MOV dword ptr [RSP + 0x8],EAX MOV dword ptr [RSP + 0x4],ECX TEST ECX,ECX JLE 0x001981b2 LAB_00198159: MOV RDI,R15 MOV RSI,RBP MOV RDX,R12 CALL 0x00124b40 MOV RDI,R15 MOV RSI,RBX MOV RDX,R12 CALL 0x00124b40 JMP 0x0019813c LAB_00198177: LEA R13,[RSP + 0x28] MOV RDI,R13 CALL 0x0012800e LEA RDI,[RSP + 0x70] CALL 0x0012800e JMP 0x001980cc LAB_00198193: LEA RDI,[RSP + 0xa8] CALL 0x00124cc0 ADD RSP,0x2a8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001981b2: LEA RDI,[0x1baed4] LEA RDX,[0x1ac140] LEA RCX,[0x1baf77] MOV ESI,0xd5 XOR EAX,EAX CALL 0x00124e90 LAB_001981d3: LEA RDI,[0x1baed4] LEA RDX,[0x1ac140] LEA RCX,[0x1baf55] MOV ESI,0xcc XOR EAX,EAX CALL 0x00124e90 LAB_001981f4: LEA RDI,[0x1baed4] LEA RDX,[0x1ac140] LEA RCX,[0x1baf6b] MOV ESI,0xce XOR EAX,EAX CALL 0x00124e90
/* common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > >, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int> > > > > >&, std::__cxx11::string&) */ void common_ngram_cache_save(unordered_map *param_1,string *param_2) { long *plVar1; unordered_map *puVar2; int local_2d4; int4 local_2d0; int local_2cc; int8 local_2c8; int8 uStack_2c0; _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> local_2b0 [16]; long local_2a0; long local_298; int8 local_278; int8 uStack_270; _Hashtable local_268 [56]; ofstream local_230 [512]; std::ofstream::ofstream(local_230,param_2,4); puVar2 = param_1 + 0x10; while( true ) { puVar2 = *(unordered_map **)puVar2; if (puVar2 == (unordered_map *)0x0) { std::ofstream::~ofstream(local_230); return; } /* try { // try from 001980dc to 001980e5 has its CatchHandler @ 00198219 */ _ZNSt4pairI12common_ngramSt13unordered_mapIiiSt4hashIiESt8equal_toIiESaIS_IKiiEEEEC2IKS0_S9_TnNSt9enable_ifIXaaclsr6_PCCFPIT_T0_EE18_ConstructiblePairISE_SF_EEclsr6_PCCFPISE_SF_EE26_ImplicitlyConvertiblePairISE_SF_EEEbE4typeELb1EEERKS_ISE_SF_E (&local_278,puVar2 + 8); local_2c8 = local_278; uStack_2c0 = uStack_270; /* try { // try from 001980f0 to 001980fc has its CatchHandler @ 0019821e */ std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::_Hashtable(local_2b0,local_268); if (local_298 == 0) break; local_2cc = (int)local_298; if (local_2cc < 1) { /* try { // try from 001981f4 to 00198214 has its CatchHandler @ 00198215 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 0xce,"GGML_ASSERT(%s) failed","ntokens > 0"); } /* try { // try from 00198117 to 00198136 has its CatchHandler @ 00198223 */ std::ostream::write((char *)local_230,(long)&local_2c8); std::ostream::write((char *)local_230,(long)&local_2cc); plVar1 = &local_2a0; while (plVar1 = (long *)*plVar1, plVar1 != (long *)0x0) { local_2d0 = *(int4 *)(plVar1 + 1); local_2d4 = *(int *)((long)plVar1 + 0xc); if (local_2d4 < 1) { /* try { // try from 001981b2 to 001981d2 has its CatchHandler @ 00198225 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp" ,0xd5,"GGML_ASSERT(%s) failed","count > 0"); } /* try { // try from 00198159 to 00198174 has its CatchHandler @ 00198227 */ std::ostream::write((char *)local_230,(long)&local_2d0); std::ostream::write((char *)local_230,(long)&local_2d4); } std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable(local_2b0); std:: _Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::~_Hashtable((_Hashtable<int,std::pair<int_const,int>,std::allocator<std::pair<int_const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)local_268); } /* try { // try from 001981d3 to 001981f3 has its CatchHandler @ 00198217 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp",0xcc ,"GGML_ASSERT(%s) failed","!token_counts.empty()"); }
44,918
common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/ngram-cache.cpp
void common_ngram_cache_save(common_ngram_cache & ngram_cache, std::string & filename) { std::ofstream file_out(filename, std::ios::binary); for (std::pair<common_ngram, common_ngram_cache_part> item : ngram_cache) { const common_ngram ngram = item.first; common_ngram_cache_part token_counts = item.second; GGML_ASSERT(!token_counts.empty()); const int32_t ntokens = token_counts.size(); GGML_ASSERT(ntokens > 0); file_out.write(reinterpret_cast<const char *>(&ngram), sizeof(common_ngram)); file_out.write(reinterpret_cast<const char *>(&ntokens), sizeof(int32_t)); for (std::pair<llama_token, int32_t> item2 : token_counts) { const llama_token token = item2.first; const int32_t count = item2.second; GGML_ASSERT(count > 0); file_out.write(reinterpret_cast<const char *>(&token), sizeof(llama_token)); file_out.write(reinterpret_cast<const char *>(&count), sizeof(int32_t)); } } }
O3
cpp
common_ngram_cache_save(std::unordered_map<common_ngram, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>, common_ngram_hash_function, std::equal_to<common_ngram>, std::allocator<std::pair<common_ngram const, std::unordered_map<int, int, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, int>>>>>>&, 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 $0x2b8, %rsp # imm = 0x2B8 movq %rdi, %rbx leaq 0xb8(%rsp), %rdi movl $0x4, %edx callq 0x1c0f0 movq 0x10(%rbx), %r15 testq %r15, %r15 je 0xcd65d leaq 0x60(%rsp), %rbx xorl %ebp, %ebp leaq 0x18(%rsp), %r14 leaq 0xb8(%rsp), %r12 leaq 0x8(%rsp), %r13 movups 0x8(%r15), %xmm0 movaps %xmm0, 0x50(%rsp) leaq 0x18(%r15), %rsi movq %rbp, 0x60(%rsp) movq 0x20(%r15), %rax movq %rax, 0x68(%rsp) movq %rbp, 0x70(%rsp) movq 0x30(%r15), %rax movq %rax, 0x78(%rsp) movups 0x38(%r15), %xmm0 movups %xmm0, 0x20(%rbx) movq %rbp, 0x90(%rsp) movq %rbx, 0x18(%rsp) movq %rbx, %rdi movq %r14, %rdx callq 0xcdf9a movaps 0x50(%rsp), %xmm0 movaps %xmm0, 0xa0(%rsp) movq %rbp, 0x18(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x20(%rsp) movq %rbp, 0x28(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x30(%rsp) movups 0x20(%rbx), %xmm0 leaq 0x38(%rsp), %rax movups %xmm0, (%rax) movq %rbp, 0x48(%rsp) movq %r14, 0x10(%rsp) movq %r14, %rdi movq %rbx, %rsi leaq 0x10(%rsp), %rbx movq %rbx, %rdx callq 0xcdf9a movq 0x30(%rsp), %rax testq %rax, %rax leaq 0xc(%rsp), %rbp je 0xcd6c8 movl %eax, 0x10(%rsp) testl %eax, %eax jle 0xcd6e9 movl $0x10, %edx movq %r12, %rdi leaq 0xa0(%rsp), %rsi callq 0x1bb10 movl $0x4, %edx movq %r12, %rdi movq %rbx, %rsi callq 0x1bb10 movq 0x28(%rsp), %r14 testq %r14, %r14 je 0xcd632 movl 0x8(%r14), %eax movl 0xc(%r14), %ecx movl %eax, 0xc(%rsp) movl %ecx, 0x8(%rsp) testl %ecx, %ecx jle 0xcd6a7 movl $0x4, %edx movq %r12, %rdi movq %rbp, %rsi callq 0x1bb10 movl $0x4, %edx movq %r12, %rdi movq %r13, %rsi callq 0x1bb10 movq (%r14), %r14 jmp 0xcd5f0 leaq 0x18(%rsp), %r14 movq %r14, %rdi callq 0x21ec2 leaq 0x60(%rsp), %rbx movq %rbx, %rdi callq 0x21ec2 movq (%r15), %r15 testq %r15, %r15 movl $0x0, %ebp jne 0xcd508 movq 0x608dc(%rip), %rax # 0x12df40 movq (%rax), %rcx movq 0x18(%rax), %rax leaq 0xc0(%rsp), %rdi movq %rcx, -0x8(%rdi) movq -0x18(%rcx), %rcx movq %rax, 0xb8(%rsp,%rcx) callq 0x1b720 leaq 0x1b0(%rsp), %rdi callq 0x1b2b0 addq $0x2b8, %rsp # imm = 0x2B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x29850(%rip), %rdi # 0xf6efe leaq 0x1aa8b(%rip), %rdx # 0xe8140 leaq 0x298e5(%rip), %rcx # 0xf6fa1 movl $0xd5, %esi xorl %eax, %eax callq 0x1be80 leaq 0x2982f(%rip), %rdi # 0xf6efe leaq 0x1aa6a(%rip), %rdx # 0xe8140 leaq 0x298a2(%rip), %rcx # 0xf6f7f movl $0xcc, %esi xorl %eax, %eax callq 0x1be80 leaq 0x2980e(%rip), %rdi # 0xf6efe leaq 0x1aa49(%rip), %rdx # 0xe8140 leaq 0x29897(%rip), %rcx # 0xf6f95 movl $0xce, %esi xorl %eax, %eax callq 0x1be80 movq %rax, %r14 jmp 0xcd733 movq %rax, %r14 jmp 0xcd729 jmp 0xcd71c jmp 0xcd71c jmp 0xcd71c jmp 0xcd71c movq %rax, %r14 leaq 0x18(%rsp), %rdi callq 0x21ec2 leaq 0x60(%rsp), %rdi callq 0x21ec2 leaq 0xb8(%rsp), %rdi callq 0x1bcc0 movq %r14, %rdi callq 0x1bf70
_Z23common_ngram_cache_saveRSt13unordered_mapI12common_ngramS_IiiSt4hashIiESt8equal_toIiESaISt4pairIKiiEEE26common_ngram_hash_functionS3_IS0_ESaIS5_IKS0_S9_EEERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2B8h mov rbx, rdi lea rdi, [rsp+2E8h+var_230] mov edx, 4 call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) mov r15, [rbx+10h] test r15, r15 jz loc_CD65D lea rbx, [rsp+2E8h+var_288] xor ebp, ebp lea r14, [rsp+2E8h+var_2D0] lea r12, [rsp+2E8h+var_230] lea r13, [rsp+2E8h+var_2E0] loc_CD508: movups xmm0, xmmword ptr [r15+8] movaps [rsp+2E8h+var_298], xmm0 lea rsi, [r15+18h] mov [rsp+2E8h+var_288], rbp mov rax, [r15+20h] mov [rsp+2E8h+var_280], rax mov [rsp+2E8h+var_278], rbp mov rax, [r15+30h] mov [rsp+2E8h+var_270], rax movups xmm0, xmmword ptr [r15+38h] movups xmmword ptr [rbx+20h], xmm0 mov [rsp+2E8h+var_258], rbp mov [rsp+2E8h+var_2D0], rbx mov rdi, rbx mov rdx, r14 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE9_M_assignIRKSF_NS4_10_AllocNodeISaINS4_10_Hash_nodeIS2_Lb0EEEEEEEEvOT_RKT0_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>> const&) movaps xmm0, [rsp+2E8h+var_298] movaps xmmword ptr [rsp+2E8h+var_248], xmm0 mov [rsp+2E8h+var_2D0], rbp mov rax, [rsp+2E8h+var_280] mov [rsp+2E8h+var_2C8], rax mov [rsp+2E8h+var_2C0], rbp mov rax, [rsp+2E8h+var_270] mov [rsp+2E8h+var_2B8], rax movups xmm0, xmmword ptr [rbx+20h] lea rax, [rsp+2E8h+var_2B0] movups xmmword ptr [rax], xmm0 mov [rsp+2E8h+var_2A0], rbp mov qword ptr [rsp+2E8h+var_2D8], r14 mov rdi, r14 mov rsi, rbx lea rbx, [rsp+2E8h+var_2D8] mov rdx, rbx call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEE9_M_assignIRKSF_NS4_10_AllocNodeISaINS4_10_Hash_nodeIS2_Lb0EEEEEEEEvOT_RKT0_; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>(std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>> const&) mov rax, [rsp+2E8h+var_2B8] test rax, rax lea rbp, [rsp+2E8h+var_2DC] jz loc_CD6C8 mov dword ptr [rsp+2E8h+var_2D8], eax test eax, eax jle loc_CD6E9 mov edx, 10h; __int64 mov rdi, r12; this lea rsi, [rsp+2E8h+var_248]; char * call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov edx, 4; __int64 mov rdi, r12; this mov rsi, rbx; char * call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov r14, [rsp+2E8h+var_2C0] loc_CD5F0: test r14, r14 jz short loc_CD632 mov eax, [r14+8] mov ecx, [r14+0Ch] mov dword ptr [rsp+2E8h+var_2DC], eax mov dword ptr [rsp+2E8h+var_2E0], ecx test ecx, ecx jle loc_CD6A7 mov edx, 4; __int64 mov rdi, r12; this mov rsi, rbp; char * call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov edx, 4; __int64 mov rdi, r12; this mov rsi, r13; char * call __ZNSo5writeEPKcl; std::ostream::write(char const*,long) mov r14, [r14] jmp short loc_CD5F0 loc_CD632: lea r14, [rsp+2E8h+var_2D0] mov rdi, r14 call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() lea rbx, [rsp+2E8h+var_288] mov rdi, rbx call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() mov r15, [r15] test r15, r15 mov ebp, 0 jnz loc_CD508 loc_CD65D: mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr mov rcx, [rax] mov rax, [rax+18h] lea rdi, [rsp+2E8h+var_228] mov [rdi-8], rcx mov rcx, [rcx-18h] mov [rsp+rcx+2E8h+var_230], rax call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf() lea rdi, [rsp+2E8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() add rsp, 2B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CD6A7: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCount0; "count > 0" mov esi, 0D5h xor eax, eax call _ggml_abort loc_CD6C8: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTokenCountsEmp; "!token_counts.empty()" mov esi, 0CCh xor eax, eax call _ggml_abort loc_CD6E9: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNtokens0; "ntokens > 0" mov esi, 0CEh xor eax, eax call _ggml_abort mov r14, rax jmp short loc_CD733 mov r14, rax jmp short loc_CD729 jmp short loc_CD71C jmp short loc_CD71C jmp short loc_CD71C jmp short $+2 loc_CD71C: mov r14, rax lea rdi, [rsp+2E8h+var_2D0] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_CD729: lea rdi, [rsp+2E8h+var_288] call _ZNSt10_HashtableIiSt4pairIKiiESaIS2_ENSt8__detail10_Select1stESt8equal_toIiESt4hashIiENS4_18_Mod_range_hashingENS4_20_Default_ranged_hashENS4_20_Prime_rehash_policyENS4_17_Hashtable_traitsILb0ELb0ELb1EEEED2Ev; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable() loc_CD733: lea rdi, [rsp+2E8h+var_230] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() mov rdi, r14 call __Unwind_Resume
void common_ngram_cache_save(long long a1, long long a2) { long long *i; // r15 long long *j; // r14 int v4; // ecx long long v5; // rax double v6; // xmm0_8 long long v7; // rax long long v8; // r14 char v9[4]; // [rsp+8h] [rbp-2E0h] BYREF char v10[4]; // [rsp+Ch] [rbp-2DCh] BYREF char v11[8]; // [rsp+10h] [rbp-2D8h] BYREF _QWORD v12[2]; // [rsp+18h] [rbp-2D0h] BYREF long long *v13; // [rsp+28h] [rbp-2C0h] long long v14; // [rsp+30h] [rbp-2B8h] __int128 v15; // [rsp+38h] [rbp-2B0h] long long v16; // [rsp+48h] [rbp-2A0h] __int128 v17; // [rsp+50h] [rbp-298h] long long v18; // [rsp+60h] [rbp-288h] BYREF long long v19; // [rsp+68h] [rbp-280h] long long v20; // [rsp+70h] [rbp-278h] long long v21; // [rsp+78h] [rbp-270h] __int128 v22; // [rsp+80h] [rbp-268h] long long v23; // [rsp+90h] [rbp-258h] char v24[24]; // [rsp+A0h] [rbp-248h] BYREF long long v25; // [rsp+B8h] [rbp-230h] BYREF _BYTE v26[312]; // [rsp+1B0h] [rbp-138h] BYREF std::ofstream::basic_ofstream(&v25, a2, 4LL); for ( i = *(long long **)(a1 + 16); i; i = (long long *)*i ) { v17 = *(_OWORD *)(i + 1); v18 = 0LL; v19 = i[4]; v20 = 0LL; v21 = i[6]; v22 = *(_OWORD *)(i + 7); v23 = 0LL; v12[0] = &v18; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>( &v18, i + 3, v12); *(_OWORD *)v24 = v17; v12[0] = 0LL; v12[1] = v19; v13 = 0LL; v14 = v21; v15 = v22; v16 = 0LL; *(_QWORD *)v11 = v12; std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::_M_assign<std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<int const,int>,false>>>>( v12, &v18, v11); if ( !v14 ) goto LABEL_11; *(_DWORD *)v11 = v14; if ( (int)v14 <= 0 ) { LABEL_12: v6 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 206LL, "GGML_ASSERT(%s) failed", "ntokens > 0"); v8 = v7; std::ofstream::~ofstream(&v25, v6); _Unwind_Resume(v8); } std::ostream::write((std::ostream *)&v25, v24, 16LL); std::ostream::write((std::ostream *)&v25, v11, 4LL); for ( j = v13; j; j = (long long *)*j ) { v4 = *((_DWORD *)j + 3); *(_DWORD *)v10 = *((_DWORD *)j + 2); *(_DWORD *)v9 = v4; if ( v4 <= 0 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 213LL, "GGML_ASSERT(%s) failed", "count > 0"); LABEL_11: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/ngram-cache.cpp", 204LL, "GGML_ASSERT(%s) failed", "!token_counts.empty()"); goto LABEL_12; } std::ostream::write((std::ostream *)&v25, v10, 4LL); std::ostream::write((std::ostream *)&v25, v9, 4LL); } std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)v12); std::_Hashtable<int,std::pair<int const,int>,std::allocator<std::pair<int const,int>>,std::__detail::_Select1st,std::equal_to<int>,std::hash<int>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::~_Hashtable((long long)&v18); } v5 = `VTT for'std::ofstream[3]; v25 = `VTT for'std::ofstream[0]; *(_QWORD *)(v26 + *(_QWORD *)(`VTT for'std::ofstream[0] - 24LL) + 232) = v5; std::filebuf::~filebuf(); std::ios_base::~ios_base((std::ios_base *)v26); }
44,919
my_rw_rdlock
eloqsql/mysys/thr_rwlock.c
int my_rw_rdlock(my_rw_lock_t *rwp) { pthread_mutex_lock(&rwp->lock); /* active or queued writers */ while (( rwp->state < 0 ) || rwp->waiters) pthread_cond_wait( &rwp->readers, &rwp->lock); rwp->state++; pthread_mutex_unlock(&rwp->lock); return(0); }
O0
c
my_rw_rdlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x24450 movq -0x8(%rbp), %rcx movb $0x1, %al cmpl $0x0, 0x88(%rcx) movb %al, -0x9(%rbp) jl 0x30aa8 movq -0x8(%rbp), %rax cmpl $0x0, 0x8c(%rax) setne %al movb %al, -0x9(%rbp) movb -0x9(%rbp), %al testb $0x1, %al jne 0x30ab1 jmp 0x30ac4 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi callq 0x244f0 jmp 0x30a85 movq -0x8(%rbp), %rax movl 0x88(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x88(%rax) movq -0x8(%rbp), %rdi callq 0x241e0 xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
my_rw_rdlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock loc_30A85: mov rcx, [rbp+var_8] mov al, 1 cmp dword ptr [rcx+88h], 0 mov [rbp+var_9], al jl short loc_30AA8 mov rax, [rbp+var_8] cmp dword ptr [rax+8Ch], 0 setnz al mov [rbp+var_9], al loc_30AA8: mov al, [rbp+var_9] test al, 1 jnz short loc_30AB1 jmp short loc_30AC4 loc_30AB1: mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_8] call _pthread_cond_wait jmp short loc_30A85 loc_30AC4: mov rax, [rbp+var_8] mov ecx, [rax+88h] add ecx, 1 mov [rax+88h], ecx mov rdi, [rbp+var_8] call _pthread_mutex_unlock xor eax, eax add rsp, 10h pop rbp retn
long long my_rw_rdlock(long long a1) { bool v2; // [rsp+7h] [rbp-9h] pthread_mutex_lock(a1); while ( 1 ) { v2 = 1; if ( *(int *)(a1 + 136) >= 0 ) v2 = *(_DWORD *)(a1 + 140) != 0; if ( !v2 ) break; pthread_cond_wait(a1 + 40, a1); } ++*(_DWORD *)(a1 + 136); pthread_mutex_unlock(a1); return 0LL; }
my_rw_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x00124450 LAB_00130a85: MOV RCX,qword ptr [RBP + -0x8] MOV AL,0x1 CMP dword ptr [RCX + 0x88],0x0 MOV byte ptr [RBP + -0x9],AL JL 0x00130aa8 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x8c],0x0 SETNZ AL MOV byte ptr [RBP + -0x9],AL LAB_00130aa8: MOV AL,byte ptr [RBP + -0x9] TEST AL,0x1 JNZ 0x00130ab1 JMP 0x00130ac4 LAB_00130ab1: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] CALL 0x001244f0 JMP 0x00130a85 LAB_00130ac4: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x88] ADD ECX,0x1 MOV dword ptr [RAX + 0x88],ECX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001241e0 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 my_rw_rdlock(pthread_mutex_t *param_1) { bool bVar1; pthread_mutex_lock(param_1); while( true ) { bVar1 = true; if (-1 < *(int *)((long)param_1 + 0x88)) { bVar1 = *(int *)((long)param_1 + 0x8c) != 0; } if (!bVar1) break; pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1); } *(int *)((long)param_1 + 0x88) = *(int *)((long)param_1 + 0x88) + 1; pthread_mutex_unlock(param_1); return 0; }
44,920
google::protobuf::DescriptorBuilder::ValidateMapEntry(google::protobuf::FieldDescriptor*, google::protobuf::FieldDescriptorProto const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
bool DescriptorBuilder::ValidateMapEntry(FieldDescriptor* field, const FieldDescriptorProto& proto) { const Descriptor* message = field->message_type(); if ( // Must not contain extensions, extension range or nested message or // enums message->extension_count() != 0 || field->label() != FieldDescriptor::LABEL_REPEATED || message->extension_range_count() != 0 || message->nested_type_count() != 0 || message->enum_type_count() != 0 || // Must contain exactly two fields message->field_count() != 2 || // Field name and message name must match message->name() != ToCamelCase(field->name(), false) + "Entry" || // Entry message must be in the same containing type of the field. field->containing_type() != message->containing_type()) { return false; } const FieldDescriptor* key = message->map_key(); const FieldDescriptor* value = message->map_value(); if (key->label() != FieldDescriptor::LABEL_OPTIONAL || key->number() != 1 || key->name() != "key") { return false; } if (value->label() != FieldDescriptor::LABEL_OPTIONAL || value->number() != 2 || value->name() != "value") { return false; } // Check key types are legal. switch (key->type()) { case FieldDescriptor::TYPE_ENUM: AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, "Key in map fields cannot be enum types."); break; case FieldDescriptor::TYPE_FLOAT: case FieldDescriptor::TYPE_DOUBLE: case FieldDescriptor::TYPE_MESSAGE: case FieldDescriptor::TYPE_GROUP: case FieldDescriptor::TYPE_BYTES: AddError( field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, "Key in map fields cannot be float/double, bytes or message types."); break; case FieldDescriptor::TYPE_BOOL: case FieldDescriptor::TYPE_INT32: case FieldDescriptor::TYPE_INT64: case FieldDescriptor::TYPE_SINT32: case FieldDescriptor::TYPE_SINT64: case FieldDescriptor::TYPE_STRING: case FieldDescriptor::TYPE_UINT32: case FieldDescriptor::TYPE_UINT64: case FieldDescriptor::TYPE_FIXED32: case FieldDescriptor::TYPE_FIXED64: case FieldDescriptor::TYPE_SFIXED32: case FieldDescriptor::TYPE_SFIXED64: // Legal cases break; // Do not add a default, so that the compiler will complain when new types // are added. } if (value->type() == FieldDescriptor::TYPE_ENUM) { if (value->enum_type()->value(0)->number() != 0) { AddError(field->full_name(), proto, DescriptorPool::ErrorCollector::TYPE, "Enum value in map must define 0 as the first value."); } } return true; }
O3
cpp
google::protobuf::DescriptorBuilder::ValidateMapEntry(google::protobuf::FieldDescriptor*, google::protobuf::FieldDescriptorProto const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 movq %rsi, %rdi callq 0x1e7ba cmpl $0x0, 0x7c(%rax) jne 0x36e8b movq %rax, %r12 movb 0x1(%r15), %al notb %al testb $0x60, %al jne 0x36e8b cmpl $0x0, 0x78(%r12) jne 0x36e8b cmpl $0x0, 0x70(%r12) jne 0x36e8b cmpl $0x0, 0x74(%r12) jne 0x36e8b cmpl $0x2, 0x4(%r12) jne 0x36e8b movq 0x8(%r12), %rax movq %rax, (%rsp) movq 0x8(%r15), %rsi leaq 0x28(%rsp), %r13 movq %r13, %rdi xorl %edx, %edx callq 0x37159 leaq 0x80c4d(%rip), %rsi # 0xb7a30 movq %r13, %rdi callq 0x13a08 leaq 0x18(%rsp), %rsi movq %rsi, -0x10(%rsi) movq (%rax), %r13 movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %r13 je 0x36e12 movq %r13, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x36e1b movups (%rcx), %xmm0 movups %xmm0, (%rsi) movq %rsi, %r13 movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movb $0x1, %bpl movq (%rsp), %rax cmpq %rdx, 0x8(%rax) jne 0x36e66 testq %rdx, %rdx je 0x36e59 movq (%rax), %rdi movq %r13, %rsi callq 0xf370 leaq 0x18(%rsp), %rsi testl %eax, %eax jne 0x36e66 movq 0x20(%r15), %rax cmpq 0x18(%r12), %rax setne %bpl cmpq %rsi, %r13 je 0x36e73 movq %r13, %rdi callq 0xf330 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x36e86 callq 0xf330 testb %bpl, %bpl je 0x36ea0 xorl %r12d, %r12d movl %r12d, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x20(%r12), %rax movq 0x28(%r12), %rbp leaq 0x48(%rbp), %r13 xorl %r12d, %r12d cmpb $0x0, 0x4b(%rax) cmoveq %r12, %rbp cmoveq %r12, %r13 movb 0x1(%rbp), %al andb $0x60, %al cmpb $0x20, %al jne 0x36e8e cmpl $0x1, 0x4(%rbp) jne 0x36e8b movq 0x8(%rbp), %rdi leaq 0x80b5f(%rip), %rsi # 0xb7a36 callq 0xf0e0 testl %eax, %eax jne 0x36e8b movb 0x1(%r13), %al andb $0x60, %al cmpb $0x20, %al jne 0x36e8b cmpl $0x2, 0x4(%r13) jne 0x36e8b movq 0x8(%r13), %rdi leaq 0x7f178(%rip), %rsi # 0xb6074 callq 0xf0e0 testl %eax, %eax jne 0x36e8b movq %rbp, %rdi callq 0x3e09e decl %eax cmpl $0xd, %eax ja 0x36f46 movl $0x2e03, %ecx # imm = 0x2E03 btl %eax, %ecx jae 0x36f46 movl %eax, %eax leaq 0x7edc1(%rip), %rcx # 0xb5ce8 movslq (%rcx,%rax,4), %r8 addq %rcx, %r8 movq 0x8(%r15), %rsi addq $0x20, %rsi movq %r14, %rdi movq %rbx, %rdx movl $0x2, %ecx callq 0x27ade movq %r13, %rdi callq 0x3e09e movb $0x1, %r12b cmpl $0xe, %eax jne 0x36e8e movq %r13, %rdi callq 0x20c18 movq 0x28(%rax), %rax cmpl $0x0, 0x4(%rax) je 0x36e8e movq 0x8(%r15), %rsi addq $0x20, %rsi leaq 0x80b25(%rip), %r8 # 0xb7aa4 movq %r14, %rdi movq %rbx, %rdx movl $0x2, %ecx callq 0x27ade jmp 0x36e8e movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x36faa callq 0xf330 movq %rbx, %rdi callq 0xf570
_ZN6google8protobuf17DescriptorBuilder16ValidateMapEntryEPNS0_15FieldDescriptorERKNS0_20FieldDescriptorProtoE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rbx, rdx mov r15, rsi mov r14, rdi mov rdi, rsi; this call _ZNK6google8protobuf15FieldDescriptor12message_typeEv; google::protobuf::FieldDescriptor::message_type(void) cmp dword ptr [rax+7Ch], 0 jnz loc_36E8B mov r12, rax mov al, [r15+1] not al test al, 60h jnz loc_36E8B cmp dword ptr [r12+78h], 0 jnz loc_36E8B cmp dword ptr [r12+70h], 0 jnz loc_36E8B cmp dword ptr [r12+74h], 0 jnz loc_36E8B cmp dword ptr [r12+4], 2 jnz loc_36E8B mov rax, [r12+8] mov [rsp+78h+var_78], rax mov rsi, [r15+8] lea r13, [rsp+78h+var_50] mov rdi, r13 xor edx, edx call _ZN6google8protobuf12_GLOBAL__N_111ToCamelCaseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; google::protobuf::`anonymous namespace'::ToCamelCase(std::string const&,bool) lea rsi, aEntry; "Entry" mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rsi, [rsp+78h+var_60] mov [rsi-10h], rsi mov r13, [rax] mov rcx, rax add rcx, 10h cmp r13, rcx jz short loc_36E12 mov [rsp+78h+var_70], r13 mov rdx, [rcx] mov [rsp+78h+var_60], rdx jmp short loc_36E1B loc_36E12: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rsi], xmm0 mov r13, rsi loc_36E1B: mov rdx, [rax+8] mov [rsp+78h+var_68], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov bpl, 1 mov rax, [rsp+78h+var_78] cmp [rax+8], rdx jnz short loc_36E66 test rdx, rdx jz short loc_36E59 mov rdi, [rax] mov rsi, r13 call _bcmp lea rsi, [rsp+78h+var_60] test eax, eax jnz short loc_36E66 loc_36E59: mov rax, [r15+20h] cmp rax, [r12+18h] setnz bpl loc_36E66: cmp r13, rsi jz short loc_36E73 mov rdi, r13; void * call __ZdlPv; operator delete(void *) loc_36E73: lea rax, [rsp+78h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_36E86 call __ZdlPv; operator delete(void *) loc_36E86: test bpl, bpl jz short loc_36EA0 loc_36E8B: xor r12d, r12d loc_36E8E: mov eax, r12d add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_36EA0: mov rax, [r12+20h] mov rbp, [r12+28h] lea r13, [rbp+48h] xor r12d, r12d cmp byte ptr [rax+4Bh], 0 cmovz rbp, r12 cmovz r13, r12 mov al, [rbp+1] and al, 60h cmp al, 20h ; ' ' jnz short loc_36E8E cmp dword ptr [rbp+4], 1 jnz short loc_36E8B mov rdi, [rbp+8] lea rsi, aKey; "key" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_36E8B mov al, [r13+1] and al, 60h cmp al, 20h ; ' ' jnz short loc_36E8B cmp dword ptr [r13+4], 2 jnz short loc_36E8B mov rdi, [r13+8] lea rsi, aNoDefaultValue+0Bh; "value" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jnz short loc_36E8B mov rdi, rbp; this call _ZNK6google8protobuf15FieldDescriptor4typeEv; google::protobuf::FieldDescriptor::type(void) dec eax cmp eax, 0Dh ja short loc_36F46 mov ecx, 2E03h bt ecx, eax jnb short loc_36F46 mov eax, eax lea rcx, unk_B5CE8 movsxd r8, dword ptr [rcx+rax*4] add r8, rcx mov rsi, [r15+8] add rsi, 20h ; ' ' mov rdi, r14 mov rdx, rbx mov ecx, 2 call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*) loc_36F46: mov rdi, r13; this call _ZNK6google8protobuf15FieldDescriptor4typeEv; google::protobuf::FieldDescriptor::type(void) mov r12b, 1 cmp eax, 0Eh jnz loc_36E8E mov rdi, r13; this call _ZNK6google8protobuf15FieldDescriptor9enum_typeEv; google::protobuf::FieldDescriptor::enum_type(void) mov rax, [rax+28h] cmp dword ptr [rax+4], 0 jz loc_36E8E mov rsi, [r15+8] add rsi, 20h ; ' ' lea r8, aEnumValueInMap; "Enum value in map must define 0 as the "... mov rdi, r14 mov rdx, rbx mov ecx, 2 call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*) jmp loc_36E8E mov rbx, rax lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_36FAA call __ZdlPv; operator delete(void *) loc_36FAA: mov rdi, rbx call __Unwind_Resume
long long google::protobuf::DescriptorBuilder::ValidateMapEntry( google::protobuf::DescriptorBuilder *this, google::protobuf::FieldDescriptor *a2, const google::protobuf::FieldDescriptorProto *a3) { long long v4; // rax _QWORD *v5; // r12 long long v6; // rax __int128 *v7; // r13 __int128 *v8; // rcx long long v9; // rdx bool v10; // bp unsigned int v11; // r12d long long v13; // rax long long v14; // rbp long long v15; // r13 unsigned int v16; // eax int v17; // ecx _QWORD *v18; // [rsp+0h] [rbp-78h] __int128 v19; // [rsp+18h] [rbp-60h] BYREF void *v20[2]; // [rsp+28h] [rbp-50h] BYREF char v21; // [rsp+38h] [rbp-40h] BYREF v4 = google::protobuf::FieldDescriptor::message_type(a2); if ( *(_DWORD *)(v4 + 124) ) return 0; v5 = (_QWORD *)v4; if ( (~*((_BYTE *)a2 + 1) & 0x60) != 0 || *(_DWORD *)(v4 + 120) || *(_DWORD *)(v4 + 112) || *(_DWORD *)(v4 + 116) || *(_DWORD *)(v4 + 4) != 2 ) { return 0; } v18 = *(_QWORD **)(v4 + 8); google::protobuf::`anonymous namespace'::ToCamelCase(v20, *((_QWORD *)a2 + 1), 0LL); v6 = std::string::append((long long)v20, (long long)"Entry"); v7 = *(__int128 **)v6; v8 = (__int128 *)(v6 + 16); if ( *(_QWORD *)v6 == v6 + 16 ) { v19 = *v8; v7 = &v19; } else { *(_QWORD *)&v19 = *(_QWORD *)v8; } v9 = *(_QWORD *)(v6 + 8); *(_QWORD *)v6 = v8; *(_QWORD *)(v6 + 8) = 0LL; *(_BYTE *)(v6 + 16) = 0; v10 = 1; if ( v18[1] == v9 && (!v9 || !(unsigned int)bcmp(*v18, v7)) ) v10 = *((_QWORD *)a2 + 4) != v5[3]; if ( v7 != &v19 ) operator delete(v7); if ( v20[0] != &v21 ) operator delete(v20[0]); if ( v10 ) return 0; v13 = v5[4]; v14 = v5[5]; v15 = v14 + 72; v11 = 0; if ( !*(_BYTE *)(v13 + 75) ) { v14 = 0LL; v15 = 0LL; } if ( (*(_BYTE *)(v14 + 1) & 0x60) == 0x20 ) { if ( *(_DWORD *)(v14 + 4) != 1 || (unsigned int)std::string::compare(*(_QWORD *)(v14 + 8), "key") || (*(_BYTE *)(v15 + 1) & 0x60) != 0x20 || *(_DWORD *)(v15 + 4) != 2 || (unsigned int)std::string::compare(*(_QWORD *)(v15 + 8), "value") ) { return 0; } v16 = google::protobuf::FieldDescriptor::type((google::protobuf::FieldDescriptor *)v14) - 1; if ( v16 <= 0xD ) { v17 = 11779; if ( _bittest(&v17, v16) ) google::protobuf::DescriptorBuilder::AddError( (long long)this, *((_QWORD *)a2 + 1) + 32LL, (long long)a3, 2u, (long long)dword_B5CE8 + dword_B5CE8[v16]); } LOBYTE(v11) = 1; if ( (unsigned int)google::protobuf::FieldDescriptor::type((google::protobuf::FieldDescriptor *)v15) == 14 && *(_DWORD *)(*(_QWORD *)(google::protobuf::FieldDescriptor::enum_type((google::protobuf::FieldDescriptor *)v15) + 40) + 4LL) ) { google::protobuf::DescriptorBuilder::AddError( (long long)this, *((_QWORD *)a2 + 1) + 32LL, (long long)a3, 2u, (long long)"Enum value in map must define 0 as the first value."); } } return v11; }
ValidateMapEntry: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDX MOV R15,RSI MOV R14,RDI MOV RDI,RSI CALL 0x0011e7ba CMP dword ptr [RAX + 0x7c],0x0 JNZ 0x00136e8b MOV R12,RAX MOV AL,byte ptr [R15 + 0x1] NOT AL TEST AL,0x60 JNZ 0x00136e8b CMP dword ptr [R12 + 0x78],0x0 JNZ 0x00136e8b CMP dword ptr [R12 + 0x70],0x0 JNZ 0x00136e8b CMP dword ptr [R12 + 0x74],0x0 JNZ 0x00136e8b CMP dword ptr [R12 + 0x4],0x2 JNZ 0x00136e8b MOV RAX,qword ptr [R12 + 0x8] MOV qword ptr [RSP],RAX MOV RSI,qword ptr [R15 + 0x8] LEA R13,[RSP + 0x28] MOV RDI,R13 XOR EDX,EDX CALL 0x00137159 LAB_00136ddc: LEA RSI,[0x1b7a30] MOV RDI,R13 CALL 0x00113a08 LAB_00136deb: LEA RSI,[RSP + 0x18] MOV qword ptr [RSI + -0x10],RSI MOV R13,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP R13,RCX JZ 0x00136e12 MOV qword ptr [RSP + 0x8],R13 MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x00136e1b LAB_00136e12: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RSI],XMM0 MOV R13,RSI LAB_00136e1b: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV BPL,0x1 MOV RAX,qword ptr [RSP] CMP qword ptr [RAX + 0x8],RDX JNZ 0x00136e66 TEST RDX,RDX JZ 0x00136e59 MOV RDI,qword ptr [RAX] MOV RSI,R13 CALL 0x0010f370 LEA RSI,[RSP + 0x18] TEST EAX,EAX JNZ 0x00136e66 LAB_00136e59: MOV RAX,qword ptr [R15 + 0x20] CMP RAX,qword ptr [R12 + 0x18] SETNZ BPL LAB_00136e66: CMP R13,RSI JZ 0x00136e73 MOV RDI,R13 CALL 0x0010f330 LAB_00136e73: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00136e86 CALL 0x0010f330 LAB_00136e86: TEST BPL,BPL JZ 0x00136ea0 LAB_00136e8b: XOR R12D,R12D LAB_00136e8e: MOV EAX,R12D ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00136ea0: MOV RAX,qword ptr [R12 + 0x20] MOV RBP,qword ptr [R12 + 0x28] LEA R13,[RBP + 0x48] XOR R12D,R12D CMP byte ptr [RAX + 0x4b],0x0 CMOVZ RBP,R12 CMOVZ R13,R12 MOV AL,byte ptr [RBP + 0x1] AND AL,0x60 CMP AL,0x20 JNZ 0x00136e8e CMP dword ptr [RBP + 0x4],0x1 JNZ 0x00136e8b MOV RDI,qword ptr [RBP + 0x8] LEA RSI,[0x1b7a36] CALL 0x0010f0e0 TEST EAX,EAX JNZ 0x00136e8b MOV AL,byte ptr [R13 + 0x1] AND AL,0x60 CMP AL,0x20 JNZ 0x00136e8b CMP dword ptr [R13 + 0x4],0x2 JNZ 0x00136e8b MOV RDI,qword ptr [R13 + 0x8] LEA RSI,[0x1b6074] CALL 0x0010f0e0 TEST EAX,EAX JNZ 0x00136e8b MOV RDI,RBP CALL 0x0013e09e DEC EAX CMP EAX,0xd JA 0x00136f46 MOV ECX,0x2e03 BT ECX,EAX JNC 0x00136f46 MOV EAX,EAX LEA RCX,[0x1b5ce8] MOVSXD R8,dword ptr [RCX + RAX*0x4] ADD R8,RCX MOV RSI,qword ptr [R15 + 0x8] ADD RSI,0x20 MOV RDI,R14 MOV RDX,RBX MOV ECX,0x2 CALL 0x00127ade LAB_00136f46: MOV RDI,R13 CALL 0x0013e09e MOV R12B,0x1 CMP EAX,0xe JNZ 0x00136e8e MOV RDI,R13 CALL 0x00120c18 MOV RAX,qword ptr [RAX + 0x28] CMP dword ptr [RAX + 0x4],0x0 JZ 0x00136e8e MOV RSI,qword ptr [R15 + 0x8] ADD RSI,0x20 LEA R8,[0x1b7aa4] MOV RDI,R14 MOV RDX,RBX MOV ECX,0x2 CALL 0x00127ade JMP 0x00136e8e
/* google::protobuf::DescriptorBuilder::ValidateMapEntry(google::protobuf::FieldDescriptor*, google::protobuf::FieldDescriptorProto const&) */ int8 __thiscall google::protobuf::DescriptorBuilder::ValidateMapEntry (DescriptorBuilder *this,FieldDescriptor *param_1,FieldDescriptorProto *param_2) { int8 *puVar1; size_t __n; FieldDescriptor *this_00; int iVar2; uint uVar3; long lVar4; long *plVar5; long *plVar6; long *__s2; FieldDescriptor *this_01; bool bVar7; long local_60; long lStack_58; int1 *local_50 [2]; int1 local_40 [16]; lVar4 = FieldDescriptor::message_type(param_1); if ((((*(int *)(lVar4 + 0x7c) == 0) && ((~(byte)param_1[1] & 0x60) == 0)) && (*(int *)(lVar4 + 0x78) == 0)) && (((*(int *)(lVar4 + 0x70) == 0 && (*(int *)(lVar4 + 0x74) == 0)) && (*(int *)(lVar4 + 4) == 2)) )) { puVar1 = *(int8 **)(lVar4 + 8); (anonymous_namespace)::ToCamelCase ((_anonymous_namespace_ *)local_50,*(string **)(param_1 + 8),false); /* try { // try from 00136ddc to 00136dea has its CatchHandler @ 00136f94 */ plVar5 = (long *)std::__cxx11::string::append((string *)local_50,"Entry"); __s2 = &local_60; plVar6 = plVar5 + 2; if ((long *)*plVar5 == plVar6) { local_60 = *plVar6; lStack_58 = plVar5[3]; } else { local_60 = *plVar6; __s2 = (long *)*plVar5; } __n = plVar5[1]; *plVar5 = (long)plVar6; plVar5[1] = 0; *(int1 *)(plVar5 + 2) = 0; bVar7 = true; if ((puVar1[1] == __n) && ((__n == 0 || (iVar2 = bcmp((void *)*puVar1,__s2,__n), iVar2 == 0)))) { bVar7 = *(long *)(param_1 + 0x20) != *(long *)(lVar4 + 0x18); } if (__s2 != &local_60) { operator_delete(__s2); } if (local_50[0] != local_40) { operator_delete(local_50[0]); } if (!bVar7) { this_01 = *(FieldDescriptor **)(lVar4 + 0x28) + 0x48; this_00 = *(FieldDescriptor **)(lVar4 + 0x28); if (*(char *)(*(long *)(lVar4 + 0x20) + 0x4b) == '\0') { this_01 = (FieldDescriptor *)0x0; this_00 = (FieldDescriptor *)0x0; } if (((byte)this_00[1] & 0x60) != 0x20) { return 0; } if ((((*(int *)(this_00 + 4) == 1) && (iVar2 = std::__cxx11::string::compare(*(char **)(this_00 + 8)), iVar2 == 0)) && (((byte)this_01[1] & 0x60) == 0x20)) && ((*(int *)(this_01 + 4) == 2 && (iVar2 = std::__cxx11::string::compare(*(char **)(this_01 + 8)), iVar2 == 0)))) { iVar2 = FieldDescriptor::type(this_00); uVar3 = iVar2 - 1; if ((uVar3 < 0xe) && ((0x2e03U >> (uVar3 & 0x1f) & 1) != 0)) { AddError(this,*(long *)(param_1 + 8) + 0x20,param_2,2, &DAT_001b5ce8 + *(int *)(&DAT_001b5ce8 + (ulong)uVar3 * 4)); } iVar2 = FieldDescriptor::type(this_01); if (iVar2 != 0xe) { return 1; } lVar4 = FieldDescriptor::enum_type(this_01); if (*(int *)(*(long *)(lVar4 + 0x28) + 4) == 0) { return 1; } AddError(this,*(long *)(param_1 + 8) + 0x20,param_2,2, "Enum value in map must define 0 as the first value."); return 1; } } } return 0; }
44,921
thread_init
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/CThreadPool/thpool.c
static int thread_init (thpool_* thpool_p, struct thread** thread_p, int id){ *thread_p = (struct thread*)malloc(sizeof(struct thread)); if (thread_p == NULL){ fprintf(stderr, "thpool_init(): Could not allocate memory for thread\n"); return -1; } (*thread_p)->thpool_p = thpool_p; (*thread_p)->id = id; pthread_create(&(*thread_p)->pthread, NULL, (void *)thread_do, (*thread_p)); pthread_detach((*thread_p)->pthread); return 0; }
O0
c
thread_init: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movl %edx, 0xc(%rsp) movl $0x18, %edi callq 0x1130 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, (%rax) cmpq $0x0, 0x10(%rsp) jne 0x16c1 movq 0x293a(%rip), %rax # 0x3fe0 movq (%rax), %rdi leaq 0xac2(%rip), %rsi # 0x2172 movb $0x0, %al callq 0x10d0 movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x171d movq 0x18(%rsp), %rcx movq 0x10(%rsp), %rax movq (%rax), %rax movq %rcx, 0x10(%rax) movl 0xc(%rsp), %ecx movq 0x10(%rsp), %rax movq (%rax), %rax movl %ecx, (%rax) movq 0x10(%rsp), %rax movq (%rax), %rdi addq $0x8, %rdi movq 0x10(%rsp), %rax movq (%rax), %rcx xorl %eax, %eax movl %eax, %esi leaq 0x411(%rip), %rdx # 0x1b10 callq 0x1150 movq 0x10(%rsp), %rax movq (%rax), %rax movq 0x8(%rax), %rdi callq 0x1140 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
thread_init: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_1C], edx mov edi, 18h call _malloc mov rcx, rax mov rax, [rsp+28h+var_18] mov [rax], rcx cmp [rsp+28h+var_18], 0 jnz short loc_16C1 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aThpoolInitCoul_2; "thpool_init(): Could not allocate memor"... mov al, 0 call _fprintf mov [rsp+28h+var_4], 0FFFFFFFFh jmp short loc_171D loc_16C1: mov rcx, [rsp+28h+var_10] mov rax, [rsp+28h+var_18] mov rax, [rax] mov [rax+10h], rcx mov ecx, [rsp+28h+var_1C] mov rax, [rsp+28h+var_18] mov rax, [rax] mov [rax], ecx mov rax, [rsp+28h+var_18] mov rdi, [rax] add rdi, 8 mov rax, [rsp+28h+var_18] mov rcx, [rax] xor eax, eax mov esi, eax lea rdx, thread_do call _pthread_create mov rax, [rsp+28h+var_18] mov rax, [rax] mov rdi, [rax+8] call _pthread_detach mov [rsp+28h+var_4], 0 loc_171D: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long thread_init(long long a1, _QWORD *a2, int a3) { *a2 = malloc(24LL); if ( a2 ) { *(_QWORD *)(*a2 + 16LL) = a1; *(_DWORD *)*a2 = a3; pthread_create(*a2 + 8LL, 0LL, thread_do, *a2); pthread_detach(*(_QWORD *)(*a2 + 8LL)); return 0; } else { fprintf(stderr, "thpool_init(): Could not allocate memory for thread\n"); return (unsigned int)-1; } }
thread_init: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV dword ptr [RSP + 0xc],EDX MOV EDI,0x18 CALL 0x00101130 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX CMP qword ptr [RSP + 0x10],0x0 JNZ 0x001016c1 MOV RAX,qword ptr [0x00103fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x102172] MOV AL,0x0 CALL 0x001010d0 MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x0010171d LAB_001016c1: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x10],RCX MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX] ADD RDI,0x8 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX] XOR EAX,EAX MOV ESI,EAX LEA RDX,[0x101b10] CALL 0x00101150 MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00101140 MOV dword ptr [RSP + 0x24],0x0 LAB_0010171d: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 thread_init(int8 param_1,long *param_2,int4 param_3) { void *pvVar1; int4 local_4; pvVar1 = malloc(0x18); *param_2 = (long)pvVar1; if (param_2 == (long *)0x0) { fprintf(*(FILE **)PTR_stderr_00103fe0,"thpool_init(): Could not allocate memory for thread\n"); local_4 = 0xffffffff; } else { *(int8 *)(*param_2 + 0x10) = param_1; *(int4 *)*param_2 = param_3; pthread_create((pthread_t *)(*param_2 + 8),(pthread_attr_t *)0x0,thread_do,(void *)*param_2); pthread_detach(*(pthread_t *)(*param_2 + 8)); local_4 = 0; } return local_4; }
44,922
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
monkey531[P]llama/common/json.hpp
static std::string diagnostics(const BasicJsonType* leaf_element) { #if JSON_DIAGNOSTICS std::vector<std::string> tokens; for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent) { switch (current->m_parent->type()) { case value_t::array: { for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i) { if (&current->m_parent->m_data.m_value.array->operator[](i) == current) { tokens.emplace_back(std::to_string(i)); break; } } break; } case value_t::object: { for (const auto& element : *current->m_parent->m_data.m_value.object) { if (&element.second == current) { tokens.emplace_back(element.first.c_str()); break; } } break; } case value_t::null: // LCOV_EXCL_LINE case value_t::string: // LCOV_EXCL_LINE case value_t::boolean: // LCOV_EXCL_LINE case value_t::number_integer: // LCOV_EXCL_LINE case value_t::number_unsigned: // LCOV_EXCL_LINE case value_t::number_float: // LCOV_EXCL_LINE case value_t::binary: // LCOV_EXCL_LINE case value_t::discarded: // LCOV_EXCL_LINE default: // LCOV_EXCL_LINE break; // LCOV_EXCL_LINE } } if (tokens.empty()) { return ""; } auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{}, [](const std::string & a, const std::string & b) { return concat(a, '/', detail::escape(b)); }); return concat('(', str, ") "); #else static_cast<void>(leaf_element); return ""; #endif }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0x6dffe(%rip), %rsi # 0xbbc4f leaq 0xf(%rsp), %rdx callq 0x30aea movq %rbx, %rax addq $0x10, %rsp popq %rbx retq
_ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_: push rbx sub rsp, 10h mov rbx, rdi lea rsi, aErrorWhileHand_0+34h; "" lea rdx, [rsp+18h+var_9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rax, rbx add rsp, 10h pop rbx retn
_QWORD * nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( _QWORD *a1) { std::string::basic_string<std::allocator<char>>(a1, (long long)""); return a1; }
diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBX SUB RSP,0x10 MOV RBX,RDI LEA RSI,[0x1bbc4f] LEA RDX,[RSP + 0xf] CALL 0x00130aea MOV RAX,RBX ADD RSP,0x10 POP RBX RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const*) */ basic_json * nlohmann::json_abi_v3_11_3::detail::exception:: diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1) { allocator local_9; std::__cxx11::string::string<std::allocator<char>>((string *)param_1,"",&local_9); return param_1; }
44,923
ma_dpointer
eloqsql/storage/maria/ma_search.c
void _ma_dpointer(MARIA_SHARE *share, uchar *buff, my_off_t pos) { if (pos != HA_OFFSET_ERROR) pos= (*share->recpos_to_keypos)(share, pos); switch (share->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: mi_int8store(buff,pos); break; case 7: mi_int7store(buff,pos); break; case 6: mi_int6store(buff,pos); break; case 5: mi_int5store(buff,pos); break; #else case 8: *buff++=0; /* fall through */ case 7: *buff++=0; /* fall through */ case 6: *buff++=0; /* fall through */ case 5: *buff++=0; /* fall through */ #endif case 4: mi_int4store(buff,pos); break; case 3: mi_int3store(buff,pos); break; case 2: mi_int2store(buff,(uint) pos); break; case 0: break; /* For NO_RECORD */ default: abort(); /* Impossible */ } }
O0
c
ma_dpointer: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) cmpq $-0x1, -0x18(%rbp) je 0x3a717 movq -0x8(%rbp), %rax movq 0x6d0(%rax), %rax movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi callq *%rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x740(%rax), %eax movq %rax, -0x88(%rbp) subq $0x8, %rax ja 0x3a9f9 movq -0x88(%rbp), %rax leaq 0x128498(%rip), %rcx # 0x162bd8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x30(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x30(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x30(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x7(%rax) movq -0x38(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x6(%rax) movq -0x38(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x38(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) jmp 0x3a9fe movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x6(%rax) movq -0x40(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x40(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x40(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x48(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x48(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x48(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x3a9fe movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x5(%rax) movq -0x50(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x50(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x50(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x58(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x58(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x3a9fe movq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rax shrq $0x20, %rax movq %rax, -0x68(%rbp) movq -0x60(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x4(%rax) movq -0x60(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x60(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x60(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x68(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x3a9fe movq -0x18(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x3(%rax) movq -0x70(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x70(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x70(%rbp), %rax shrq $0x18, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x3a9fe movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x2(%rax) movq -0x78(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movq -0x78(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x3a9fe movq -0x18(%rbp), %rax movl %eax, -0x7c(%rbp) movl -0x7c(%rbp), %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, 0x1(%rax) movl -0x7c(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x10(%rbp), %rax movb %cl, (%rax) jmp 0x3a9fe jmp 0x3a9fe callq 0x2a5e0 addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_dpointer: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jz short loc_3A717 mov rax, [rbp+var_8] mov rax, [rax+6D0h] mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] call rax mov [rbp+var_18], rax loc_3A717: mov rax, [rbp+var_8] mov eax, [rax+740h] mov [rbp+var_88], rax sub rax, 8; switch 9 cases ja def_3A747; jumptable 000000000003A747 default case, case 1 mov rax, [rbp+var_88] lea rcx, jpt_3A747 movsxd rax, ds:(jpt_3A747 - 162BD8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_3A749: mov rax, [rbp+var_18]; jumptable 000000000003A747 case 8 mov [rbp+var_20], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_28], rax mov rax, [rbp+var_28] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_30] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_30] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_30] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl mov rax, [rbp+var_20] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov cl, al mov rax, [rbp+var_10] mov [rax+7], cl mov rax, [rbp+var_38] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+6], cl mov rax, [rbp+var_38] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_38] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl jmp loc_3A9FE loc_3A7F1: mov rax, [rbp+var_18]; jumptable 000000000003A747 case 7 mov [rbp+var_40], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_48], rax mov rax, [rbp+var_40] mov cl, al mov rax, [rbp+var_10] mov [rax+6], cl mov rax, [rbp+var_40] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_40] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_40] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_48] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_48] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_48] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_3A9FE loc_3A878: mov rax, [rbp+var_18]; jumptable 000000000003A747 case 6 mov [rbp+var_50], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_58], rax mov rax, [rbp+var_50] mov cl, al mov rax, [rbp+var_10] mov [rax+5], cl mov rax, [rbp+var_50] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_50] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_50] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_58] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_58] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_3A9FE loc_3A8EE: mov rax, [rbp+var_18]; jumptable 000000000003A747 case 5 mov [rbp+var_60], rax mov rax, [rbp+var_18] shr rax, 20h mov [rbp+var_68], rax mov rax, [rbp+var_60] mov cl, al mov rax, [rbp+var_10] mov [rax+4], cl mov rax, [rbp+var_60] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_60] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_60] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_68] mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp loc_3A9FE loc_3A953: mov rax, [rbp+var_18]; jumptable 000000000003A747 case 4 mov [rbp+var_70], rax mov rax, [rbp+var_70] mov cl, al mov rax, [rbp+var_10] mov [rax+3], cl mov rax, [rbp+var_70] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_70] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_70] shr rax, 18h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_3A9FE loc_3A99C: mov rax, [rbp+var_18]; jumptable 000000000003A747 case 3 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov cl, al mov rax, [rbp+var_10] mov [rax+2], cl mov rax, [rbp+var_78] shr rax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov rax, [rbp+var_78] shr rax, 10h mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_3A9FE loc_3A9D4: mov rax, [rbp+var_18]; jumptable 000000000003A747 case 2 mov [rbp+var_7C], eax mov eax, [rbp+var_7C] mov cl, al mov rax, [rbp+var_10] mov [rax+1], cl mov eax, [rbp+var_7C] shr eax, 8 mov cl, al mov rax, [rbp+var_10] mov [rax], cl jmp short loc_3A9FE loc_3A9F7: jmp short loc_3A9FE; jumptable 000000000003A747 case 0 def_3A747: call _abort; jumptable 000000000003A747 default case, case 1 loc_3A9FE: add rsp, 90h pop rbp retn
_BYTE * ma_dpointer(long long a1, _BYTE *a2, long long a3) { _BYTE *result; // rax long long v4; // [rsp+78h] [rbp-18h] _BYTE *v5; // [rsp+80h] [rbp-10h] v5 = a2; v4 = a3; if ( a3 != -1 ) { a2 = (_BYTE *)a3; v4 = (*(long long ( **)(long long, long long))(a1 + 1744))(a1, a3); } result = (_BYTE *)*(unsigned int *)(a1 + 1856); switch ( *(_DWORD *)(a1 + 1856) ) { case 0: return result; case 2: v5[1] = v4; result = v5; *v5 = BYTE1(v4); break; case 3: v5[2] = v4; v5[1] = BYTE1(v4); result = v5; *v5 = BYTE2(v4); break; case 4: v5[3] = v4; v5[2] = BYTE1(v4); v5[1] = BYTE2(v4); result = v5; *v5 = BYTE3(v4); break; case 5: v5[4] = v4; v5[3] = BYTE1(v4); v5[2] = BYTE2(v4); v5[1] = BYTE3(v4); result = v5; *v5 = BYTE4(v4); break; case 6: v5[5] = v4; v5[4] = BYTE1(v4); v5[3] = BYTE2(v4); v5[2] = BYTE3(v4); v5[1] = BYTE4(v4); result = v5; *v5 = BYTE5(v4); break; case 7: v5[6] = v4; v5[5] = BYTE1(v4); v5[4] = BYTE2(v4); v5[3] = BYTE3(v4); v5[2] = BYTE4(v4); v5[1] = BYTE5(v4); result = v5; *v5 = BYTE6(v4); break; case 8: v5[3] = BYTE4(v4); v5[2] = BYTE5(v4); v5[1] = BYTE6(v4); *v5 = HIBYTE(v4); v5[7] = v4; v5[6] = BYTE1(v4); v5[5] = BYTE2(v4); result = v5; v5[4] = BYTE3(v4); break; default: abort(a1, a2, a3); } return result; }
_ma_dpointer: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX CMP qword ptr [RBP + -0x18],-0x1 JZ 0x0013a717 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x6d0] MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] CALL RAX MOV qword ptr [RBP + -0x18],RAX LAB_0013a717: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x740] MOV qword ptr [RBP + -0x88],RAX SUB RAX,0x8 JA 0x0013a9f9 MOV RAX,qword ptr [RBP + -0x88] LEA RCX,[0x262bd8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_8: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x30] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x7],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x38] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL JMP 0x0013a9fe caseD_7: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x40] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x6],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x48] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x48] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0013a9fe caseD_6: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x50] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x58] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x58] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0013a9fe caseD_5: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x20 MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x60] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x60] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x68] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0013a9fe caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x70] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0013a9fe caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x78] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x78] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0013a9fe caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x7c],EAX MOV EAX,dword ptr [RBP + -0x7c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x7c] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],CL JMP 0x0013a9fe caseD_0: JMP 0x0013a9fe caseD_1: CALL 0x0012a5e0 LAB_0013a9fe: ADD RSP,0x90 POP RBP RET
void _ma_dpointer(long param_1,int1 *param_2,long param_3) { int1 uVar1; int1 uVar2; int1 uVar3; int1 uVar4; int1 uVar5; int1 uVar6; int1 uVar7; long local_20; local_20 = param_3; if (param_3 != -1) { local_20 = (**(code **)(param_1 + 0x6d0))(param_1,param_3); } uVar4 = (int1)local_20; uVar5 = (int1)((ulong)local_20 >> 8); uVar6 = (int1)((ulong)local_20 >> 0x10); uVar7 = (int1)((ulong)local_20 >> 0x18); uVar1 = (int1)((ulong)local_20 >> 0x20); uVar2 = (int1)((ulong)local_20 >> 0x28); uVar3 = (int1)((ulong)local_20 >> 0x30); switch(*(int4 *)(param_1 + 0x740)) { case 0: break; default: /* WARNING: Subroutine does not return */ abort(); case 2: param_2[1] = uVar4; *param_2 = uVar5; break; case 3: param_2[2] = uVar4; param_2[1] = uVar5; *param_2 = uVar6; break; case 4: param_2[3] = uVar4; param_2[2] = uVar5; param_2[1] = uVar6; *param_2 = uVar7; break; case 5: param_2[4] = uVar4; param_2[3] = uVar5; param_2[2] = uVar6; param_2[1] = uVar7; *param_2 = uVar1; break; case 6: param_2[5] = uVar4; param_2[4] = uVar5; param_2[3] = uVar6; param_2[2] = uVar7; param_2[1] = uVar1; *param_2 = uVar2; break; case 7: param_2[6] = uVar4; param_2[5] = uVar5; param_2[4] = uVar6; param_2[3] = uVar7; param_2[2] = uVar1; param_2[1] = uVar2; *param_2 = uVar3; break; case 8: param_2[3] = uVar1; param_2[2] = uVar2; param_2[1] = uVar3; *param_2 = (char)((ulong)local_20 >> 0x38); param_2[7] = uVar4; param_2[6] = uVar5; param_2[5] = uVar6; param_2[4] = uVar7; } return; }
44,924
js_array_buffer_get_maxByteLength
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_buffer_get_maxByteLength(JSContext *ctx, JSValue this_val, int class_id) { JSArrayBuffer *abuf = JS_GetOpaque2(ctx, this_val, class_id); if (!abuf) return JS_EXCEPTION; if (array_buffer_is_resizable(abuf)) return js_uint32(abuf->max_byte_length); return js_uint32(abuf->byte_length); }
O1
c
js_array_buffer_get_maxByteLength: pushq %rax callq 0x275b5 testq %rax, %rax je 0x7fb69 movslq 0x4(%rax), %rcx testq %rcx, %rcx js 0x7fb74 xorl %esi, %esi xorl %edx, %edx jmp 0x7fba2 movl $0x6, %edx xorl %ecx, %ecx xorl %esi, %esi jmp 0x7fba2 movslq (%rax), %rax xorl %esi, %esi testq %rax, %rax movl %eax, %ecx cvtsi2sd %rcx, %xmm0 movq %xmm0, %rcx cmovnsq %rax, %rcx movl $0x7, %edx cmovnsq %rsi, %rdx movabsq $0x7fffffff00000000, %rsi # imm = 0x7FFFFFFF00000000 andq %rcx, %rsi movl %ecx, %eax orq %rsi, %rax popq %rcx retq
js_array_buffer_get_maxByteLength: push rax call JS_GetOpaque2 test rax, rax jz short loc_7FB69 movsxd rcx, dword ptr [rax+4] test rcx, rcx js short loc_7FB74 xor esi, esi xor edx, edx jmp short loc_7FBA2 loc_7FB69: mov edx, 6 xor ecx, ecx xor esi, esi jmp short loc_7FBA2 loc_7FB74: movsxd rax, dword ptr [rax] xor esi, esi test rax, rax mov ecx, eax cvtsi2sd xmm0, rcx movq rcx, xmm0 cmovns rcx, rax mov edx, 7 cmovns rdx, rsi mov rsi, 7FFFFFFF00000000h and rsi, rcx loc_7FBA2: mov eax, ecx or rax, rsi pop rcx retn
long long js_array_buffer_get_maxByteLength(long long a1, long long a2, int a3, unsigned int a4) { int *Opaque2; // rax double v5; // rcx long long v6; // rsi long long v7; // rax Opaque2 = (int *)JS_GetOpaque2(a1, a2, a3, a4); if ( Opaque2 ) { *(_QWORD *)&v5 = Opaque2[1]; if ( v5 < 0.0 ) { v7 = *Opaque2; v5 = (double)(int)v7; if ( v7 >= 0 ) v5 = *(double *)&v7; v6 = *(_QWORD *)&v5 & 0x7FFFFFFF00000000LL; } else { v6 = 0LL; } } else { LODWORD(v5) = 0; v6 = 0LL; } return v6 | LODWORD(v5); }
js_array_buffer_get_maxByteLength: PUSH RAX CALL 0x001275b5 TEST RAX,RAX JZ 0x0017fb69 MOVSXD RCX,dword ptr [RAX + 0x4] TEST RCX,RCX JS 0x0017fb74 XOR ESI,ESI XOR EDX,EDX JMP 0x0017fba2 LAB_0017fb69: MOV EDX,0x6 XOR ECX,ECX XOR ESI,ESI JMP 0x0017fba2 LAB_0017fb74: MOVSXD RAX,dword ptr [RAX] XOR ESI,ESI TEST RAX,RAX MOV ECX,EAX CVTSI2SD XMM0,RCX MOVQ RCX,XMM0 CMOVNS RCX,RAX MOV EDX,0x7 CMOVNS RDX,RSI MOV RSI,0x7fffffff00000000 AND RSI,RCX LAB_0017fba2: MOV EAX,ECX OR RAX,RSI POP RCX RET
int1 [16] js_array_buffer_get_maxByteLength(void) { uint uVar1; uint *puVar2; double dVar3; double dVar4; int8 uVar5; ulong uVar6; int1 auVar7 [16]; puVar2 = (uint *)JS_GetOpaque2(); if (puVar2 == (uint *)0x0) { uVar5 = 6; dVar4 = 0.0; uVar6 = 0; } else { dVar4 = (double)(long)(int)puVar2[1]; if ((long)dVar4 < 0) { uVar1 = *puVar2; dVar3 = (double)(long)(int)uVar1; dVar4 = (double)uVar1; if (-1 < (long)dVar3) { dVar4 = dVar3; } uVar5 = 7; if (-1 < (long)dVar3) { uVar5 = 0; } uVar6 = (ulong)dVar4 & 0x7fffffff00000000; } else { uVar6 = 0; uVar5 = 0; } } auVar7._0_8_ = (ulong)dVar4 & 0xffffffff | uVar6; auVar7._8_8_ = uVar5; return auVar7; }
44,925
js_array_buffer_get_maxByteLength
bluesky950520[P]quickjs/quickjs.c
static JSValue js_array_buffer_get_maxByteLength(JSContext *ctx, JSValue this_val, int class_id) { JSArrayBuffer *abuf = JS_GetOpaque2(ctx, this_val, class_id); if (!abuf) return JS_EXCEPTION; if (array_buffer_is_resizable(abuf)) return js_uint32(abuf->max_byte_length); return js_uint32(abuf->byte_length); }
O2
c
js_array_buffer_get_maxByteLength: pushq %rax callq 0x21207 testq %rax, %rax je 0x6b5dc movslq 0x4(%rax), %rcx testq %rcx, %rcx js 0x6b5e5 xorl %esi, %esi xorl %edx, %edx jmp 0x6b611 pushq $0x6 popq %rdx xorl %ecx, %ecx xorl %esi, %esi jmp 0x6b611 movslq (%rax), %rax xorl %esi, %esi testq %rax, %rax movl %eax, %ecx cvtsi2sd %rcx, %xmm0 movq %xmm0, %rcx cmovnsq %rax, %rcx pushq $0x7 popq %rdx cmovnsq %rsi, %rdx movabsq $0x7fffffff00000000, %rsi # imm = 0x7FFFFFFF00000000 andq %rcx, %rsi movl %ecx, %eax orq %rsi, %rax popq %rcx retq
js_array_buffer_get_maxByteLength: push rax call JS_GetOpaque2 test rax, rax jz short loc_6B5DC movsxd rcx, dword ptr [rax+4] test rcx, rcx js short loc_6B5E5 xor esi, esi xor edx, edx jmp short loc_6B611 loc_6B5DC: push 6 pop rdx xor ecx, ecx xor esi, esi jmp short loc_6B611 loc_6B5E5: movsxd rax, dword ptr [rax] xor esi, esi test rax, rax mov ecx, eax cvtsi2sd xmm0, rcx movq rcx, xmm0 cmovns rcx, rax push 7 pop rdx cmovns rdx, rsi mov rsi, 7FFFFFFF00000000h and rsi, rcx loc_6B611: mov eax, ecx or rax, rsi pop rcx retn
long long js_array_buffer_get_maxByteLength(long long a1, long long a2, int a3, unsigned int a4) { int *Opaque2; // rax double v5; // rcx long long v6; // rsi long long v7; // rax Opaque2 = (int *)JS_GetOpaque2(a1, a2, a3, a4); if ( Opaque2 ) { *(_QWORD *)&v5 = Opaque2[1]; if ( v5 < 0.0 ) { v7 = *Opaque2; v5 = (double)(int)v7; if ( v7 >= 0 ) v5 = *(double *)&v7; v6 = *(_QWORD *)&v5 & 0x7FFFFFFF00000000LL; } else { v6 = 0LL; } } else { LODWORD(v5) = 0; v6 = 0LL; } return v6 | LODWORD(v5); }
js_array_buffer_get_maxByteLength: PUSH RAX CALL 0x00121207 TEST RAX,RAX JZ 0x0016b5dc MOVSXD RCX,dword ptr [RAX + 0x4] TEST RCX,RCX JS 0x0016b5e5 XOR ESI,ESI XOR EDX,EDX JMP 0x0016b611 LAB_0016b5dc: PUSH 0x6 POP RDX XOR ECX,ECX XOR ESI,ESI JMP 0x0016b611 LAB_0016b5e5: MOVSXD RAX,dword ptr [RAX] XOR ESI,ESI TEST RAX,RAX MOV ECX,EAX CVTSI2SD XMM0,RCX MOVQ RCX,XMM0 CMOVNS RCX,RAX PUSH 0x7 POP RDX CMOVNS RDX,RSI MOV RSI,0x7fffffff00000000 AND RSI,RCX LAB_0016b611: MOV EAX,ECX OR RAX,RSI POP RCX RET
int1 [16] js_array_buffer_get_maxByteLength(void) { uint uVar1; uint *puVar2; double dVar3; double dVar4; int8 uVar5; ulong uVar6; int1 auVar7 [16]; puVar2 = (uint *)JS_GetOpaque2(); if (puVar2 == (uint *)0x0) { uVar5 = 6; dVar4 = 0.0; uVar6 = 0; } else { dVar4 = (double)(long)(int)puVar2[1]; if ((long)dVar4 < 0) { uVar1 = *puVar2; dVar3 = (double)(long)(int)uVar1; dVar4 = (double)uVar1; if (-1 < (long)dVar3) { dVar4 = dVar3; } uVar5 = 7; if (-1 < (long)dVar3) { uVar5 = 0; } uVar6 = (ulong)dVar4 & 0x7fffffff00000000; } else { uVar6 = 0; uVar5 = 0; } } auVar7._0_8_ = (ulong)dVar4 & 0xffffffff | uVar6; auVar7._8_8_ = uVar5; return auVar7; }
44,926
ma_fcvt
eloqsql/libmariadb/libmariadb/ma_dtoa.c
size_t ma_fcvt(double x, int precision, char *to, my_bool *error) { int decpt, sign, len, i; char *res, *src, *end, *dst= to; char buf[DTOA_BUFF_SIZE]; DBUG_ASSERT(precision >= 0 && precision < NOT_FIXED_DEC && to != NULL); res= dtoa(x, 5, precision, &decpt, &sign, &end, buf, sizeof(buf)); if (decpt == DTOA_OVERFLOW) { dtoa_free(res, buf, sizeof(buf)); *to++= '0'; *to= '\0'; if (error != NULL) *error= TRUE; return 1; } src= res; len= (int)(end - src); if (sign) *dst++= '-'; if (decpt <= 0) { *dst++= '0'; *dst++= '.'; for (i= decpt; i < 0; i++) *dst++= '0'; } for (i= 1; i <= len; i++) { *dst++= *src++; if (i == decpt && i < len) *dst++= '.'; } while (i++ <= decpt) *dst++= '0'; if (precision > 0) { if (len <= decpt) *dst++= '.'; for (i= precision - MAX(0, (len - decpt)); i > 0; i--) *dst++= '0'; } *dst= '\0'; if (error != NULL) *error= FALSE; dtoa_free(res, buf, sizeof(buf)); return dst - to; }
O0
c
ma_fcvt: pushq %rbp movq %rsp, %rbp subq $0xee0, %rsp # imm = 0xEE0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movsd %xmm0, -0xe80(%rbp) movl %edi, -0xe84(%rbp) movq %rsi, -0xe90(%rbp) movq %rdx, -0xe98(%rbp) movq -0xe90(%rbp), %rax movq %rax, -0xec8(%rbp) movsd -0xe80(%rbp), %xmm0 movl -0xe84(%rbp), %esi leaq -0xe70(%rbp), %r9 movl $0x5, %edi leaq -0xe9c(%rbp), %rdx leaq -0xea0(%rbp), %rcx leaq -0xec0(%rbp), %r8 movq $0xe60, (%rsp) # imm = 0xE60 callq 0x32ed0 movq %rax, -0xeb0(%rbp) cmpl $0x270f, -0xe9c(%rbp) # imm = 0x270F jne 0x32c0f movq -0xeb0(%rbp), %rdi leaq -0xe70(%rbp), %rsi movl $0xe60, %edx # imm = 0xE60 callq 0x34530 movq -0xe90(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xe90(%rbp) movb $0x30, (%rax) movq -0xe90(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xe98(%rbp) je 0x32bff movq -0xe98(%rbp), %rax movb $0x1, (%rax) movq $0x1, -0xe78(%rbp) jmp 0x32e96 movq -0xeb0(%rbp), %rax movq %rax, -0xeb8(%rbp) movq -0xec0(%rbp), %rax movq -0xeb8(%rbp), %rcx subq %rcx, %rax movl %eax, -0xea4(%rbp) cmpl $0x0, -0xea0(%rbp) je 0x32c55 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2d, (%rax) cmpl $0x0, -0xe9c(%rbp) jg 0x32cce movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2e, (%rax) movl -0xe9c(%rbp), %eax movl %eax, -0xea8(%rbp) cmpl $0x0, -0xea8(%rbp) jge 0x32ccc movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) movl -0xea8(%rbp), %eax addl $0x1, %eax movl %eax, -0xea8(%rbp) jmp 0x32c9a jmp 0x32cce movl $0x1, -0xea8(%rbp) movl -0xea8(%rbp), %eax cmpl -0xea4(%rbp), %eax jg 0x32d5e movq -0xeb8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xeb8(%rbp) movb (%rax), %cl movq -0xec8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0xec8(%rbp) movb %cl, (%rax) movl -0xea8(%rbp), %eax cmpl -0xe9c(%rbp), %eax jne 0x32d48 movl -0xea8(%rbp), %eax cmpl -0xea4(%rbp), %eax jge 0x32d48 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2e, (%rax) jmp 0x32d4a movl -0xea8(%rbp), %eax addl $0x1, %eax movl %eax, -0xea8(%rbp) jmp 0x32cd8 jmp 0x32d60 movl -0xea8(%rbp), %eax movl %eax, %ecx addl $0x1, %ecx movl %ecx, -0xea8(%rbp) cmpl -0xe9c(%rbp), %eax jg 0x32d93 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) jmp 0x32d60 cmpl $0x0, -0xe84(%rbp) jle 0x32e48 movl -0xea4(%rbp), %eax cmpl -0xe9c(%rbp), %eax jg 0x32dc6 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x2e, (%rax) movl -0xe84(%rbp), %eax movl %eax, -0xecc(%rbp) movl -0xea4(%rbp), %ecx subl -0xe9c(%rbp), %ecx xorl %eax, %eax cmpl %ecx, %eax jle 0x32dee xorl %eax, %eax movl %eax, -0xed0(%rbp) jmp 0x32e00 movl -0xea4(%rbp), %eax subl -0xe9c(%rbp), %eax movl %eax, -0xed0(%rbp) movl -0xecc(%rbp), %eax movl -0xed0(%rbp), %ecx subl %ecx, %eax movl %eax, -0xea8(%rbp) cmpl $0x0, -0xea8(%rbp) jle 0x32e46 movq -0xec8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xec8(%rbp) movb $0x30, (%rax) movl -0xea8(%rbp), %eax addl $-0x1, %eax movl %eax, -0xea8(%rbp) jmp 0x32e14 jmp 0x32e48 movq -0xec8(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xe98(%rbp) je 0x32e66 movq -0xe98(%rbp), %rax movb $0x0, (%rax) movq -0xeb0(%rbp), %rdi leaq -0xe70(%rbp), %rsi movl $0xe60, %edx # imm = 0xE60 callq 0x34530 movq -0xec8(%rbp), %rax movq -0xe90(%rbp), %rcx subq %rcx, %rax movq %rax, -0xe78(%rbp) movq -0xe78(%rbp), %rax movq %rax, -0xed8(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x32ec6 movq -0xed8(%rbp), %rax addq $0xee0, %rsp # imm = 0xEE0 popq %rbp retq callq 0x134b0 nopl (%rax,%rax)
ma_fcvt: push rbp mov rbp, rsp sub rsp, 0EE0h mov rax, fs:28h mov [rbp+var_8], rax movsd [rbp+var_E80], xmm0 mov [rbp+var_E84], edi mov [rbp+var_E90], rsi mov [rbp+var_E98], rdx mov rax, [rbp+var_E90] mov [rbp+var_EC8], rax movsd xmm0, [rbp+var_E80] mov esi, [rbp+var_E84] lea r9, [rbp+var_E70] mov edi, 5 lea rdx, [rbp+var_E9C] lea rcx, [rbp+var_EA0] lea r8, [rbp+var_EC0] mov [rsp+0EE0h+var_EE0], 0E60h call dtoa mov [rbp+var_EB0], rax cmp [rbp+var_E9C], 270Fh jnz short loc_32C0F mov rdi, [rbp+var_EB0] lea rsi, [rbp+var_E70] mov edx, 0E60h call dtoa_free mov rax, [rbp+var_E90] mov rcx, rax add rcx, 1 mov [rbp+var_E90], rcx mov byte ptr [rax], 30h ; '0' mov rax, [rbp+var_E90] mov byte ptr [rax], 0 cmp [rbp+var_E98], 0 jz short loc_32BFF mov rax, [rbp+var_E98] mov byte ptr [rax], 1 loc_32BFF: mov [rbp+var_E78], 1 jmp loc_32E96 loc_32C0F: mov rax, [rbp+var_EB0] mov [rbp+var_EB8], rax mov rax, [rbp+var_EC0] mov rcx, [rbp+var_EB8] sub rax, rcx mov [rbp+var_EA4], eax cmp [rbp+var_EA0], 0 jz short loc_32C55 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Dh ; '-' loc_32C55: cmp [rbp+var_E9C], 0 jg short loc_32CCE mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Eh ; '.' mov eax, [rbp+var_E9C] mov [rbp+var_EA8], eax loc_32C9A: cmp [rbp+var_EA8], 0 jge short loc_32CCC mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' mov eax, [rbp+var_EA8] add eax, 1 mov [rbp+var_EA8], eax jmp short loc_32C9A loc_32CCC: jmp short $+2 loc_32CCE: mov [rbp+var_EA8], 1 loc_32CD8: mov eax, [rbp+var_EA8] cmp eax, [rbp+var_EA4] jg short loc_32D5E mov rax, [rbp+var_EB8] mov rcx, rax add rcx, 1 mov [rbp+var_EB8], rcx mov cl, [rax] mov rax, [rbp+var_EC8] mov rdx, rax add rdx, 1 mov [rbp+var_EC8], rdx mov [rax], cl mov eax, [rbp+var_EA8] cmp eax, [rbp+var_E9C] jnz short loc_32D48 mov eax, [rbp+var_EA8] cmp eax, [rbp+var_EA4] jge short loc_32D48 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Eh ; '.' loc_32D48: jmp short $+2 loc_32D4A: mov eax, [rbp+var_EA8] add eax, 1 mov [rbp+var_EA8], eax jmp loc_32CD8 loc_32D5E: jmp short $+2 loc_32D60: mov eax, [rbp+var_EA8] mov ecx, eax add ecx, 1 mov [rbp+var_EA8], ecx cmp eax, [rbp+var_E9C] jg short loc_32D93 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' jmp short loc_32D60 loc_32D93: cmp [rbp+var_E84], 0 jle loc_32E48 mov eax, [rbp+var_EA4] cmp eax, [rbp+var_E9C] jg short loc_32DC6 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 2Eh ; '.' loc_32DC6: mov eax, [rbp+var_E84] mov [rbp+var_ECC], eax mov ecx, [rbp+var_EA4] sub ecx, [rbp+var_E9C] xor eax, eax cmp eax, ecx jle short loc_32DEE xor eax, eax mov [rbp+var_ED0], eax jmp short loc_32E00 loc_32DEE: mov eax, [rbp+var_EA4] sub eax, [rbp+var_E9C] mov [rbp+var_ED0], eax loc_32E00: mov eax, [rbp+var_ECC] mov ecx, [rbp+var_ED0] sub eax, ecx mov [rbp+var_EA8], eax loc_32E14: cmp [rbp+var_EA8], 0 jle short loc_32E46 mov rax, [rbp+var_EC8] mov rcx, rax add rcx, 1 mov [rbp+var_EC8], rcx mov byte ptr [rax], 30h ; '0' mov eax, [rbp+var_EA8] add eax, 0FFFFFFFFh mov [rbp+var_EA8], eax jmp short loc_32E14 loc_32E46: jmp short $+2 loc_32E48: mov rax, [rbp+var_EC8] mov byte ptr [rax], 0 cmp [rbp+var_E98], 0 jz short loc_32E66 mov rax, [rbp+var_E98] mov byte ptr [rax], 0 loc_32E66: mov rdi, [rbp+var_EB0] lea rsi, [rbp+var_E70] mov edx, 0E60h call dtoa_free mov rax, [rbp+var_EC8] mov rcx, [rbp+var_E90] sub rax, rcx mov [rbp+var_E78], rax loc_32E96: mov rax, [rbp+var_E78] mov [rbp+var_ED8], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_32EC6 mov rax, [rbp+var_ED8] add rsp, 0EE0h pop rbp retn loc_32EC6: call ___stack_chk_fail
long long ma_fcvt(int a1, _BYTE *a2, _BYTE *a3, double a4) { _BYTE *v4; // rax _BYTE *v5; // rax _BYTE *v6; // rax char *v7; // rax char v8; // cl _BYTE *v9; // rax _BYTE *v10; // rax int v11; // eax _BYTE *v12; // rax _BYTE *v13; // rax _BYTE *v14; // rax int v16; // [rsp+10h] [rbp-ED0h] _BYTE *v17; // [rsp+18h] [rbp-EC8h] long long v18; // [rsp+20h] [rbp-EC0h] BYREF char *v19; // [rsp+28h] [rbp-EB8h] long long v20; // [rsp+30h] [rbp-EB0h] int i; // [rsp+38h] [rbp-EA8h] int v22; // [rsp+3Ch] [rbp-EA4h] int v23; // [rsp+40h] [rbp-EA0h] BYREF int v24; // [rsp+44h] [rbp-E9Ch] BYREF _BYTE *v25; // [rsp+48h] [rbp-E98h] _BYTE *v26; // [rsp+50h] [rbp-E90h] int v27; // [rsp+5Ch] [rbp-E84h] double v28; // [rsp+60h] [rbp-E80h] _BYTE v30[3688]; // [rsp+70h] [rbp-E70h] BYREF unsigned long long v31; // [rsp+ED8h] [rbp-8h] v31 = __readfsqword(0x28u); v28 = a4; v27 = a1; v26 = a2; v25 = a3; v17 = a2; v20 = dtoa(5, a1, (unsigned int)&v24, (unsigned int)&v23, (unsigned int)&v18, (unsigned int)v30, 3680LL); if ( v24 == 9999 ) { dtoa_free(v20, v30, 3680LL); v4 = v26++; *v4 = 48; *v26 = 0; if ( v25 ) *v25 = 1; return 1LL; } else { v19 = (char *)v20; v22 = v18 - v20; if ( v23 ) { v17 = a2 + 1; *a2 = 45; } if ( v24 <= 0 ) { *v17 = 48; v5 = v17 + 1; v17 += 2; *v5 = 46; for ( i = v24; i < 0; ++i ) { v6 = v17++; *v6 = 48; } } for ( i = 1; i <= v22; ++i ) { v7 = v19++; v8 = *v7; v9 = v17++; *v9 = v8; if ( i == v24 && i < v22 ) { v10 = v17++; *v10 = 46; } } while ( 1 ) { v11 = i++; if ( v11 > v24 ) break; v12 = v17++; *v12 = 48; } if ( v27 > 0 ) { if ( v22 <= v24 ) { v13 = v17++; *v13 = 46; } if ( v22 - v24 >= 0 ) v16 = v22 - v24; else v16 = 0; for ( i = v27 - v16; i > 0; --i ) { v14 = v17++; *v14 = 48; } } *v17 = 0; if ( v25 ) *v25 = 0; dtoa_free(v20, v30, 3680LL); return v17 - v26; } }
ma_fcvt: PUSH RBP MOV RBP,RSP SUB RSP,0xee0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOVSD qword ptr [RBP + -0xe80],XMM0 MOV dword ptr [RBP + -0xe84],EDI MOV qword ptr [RBP + -0xe90],RSI MOV qword ptr [RBP + -0xe98],RDX MOV RAX,qword ptr [RBP + -0xe90] MOV qword ptr [RBP + -0xec8],RAX MOVSD XMM0,qword ptr [RBP + -0xe80] MOV ESI,dword ptr [RBP + -0xe84] LEA R9,[RBP + -0xe70] MOV EDI,0x5 LEA RDX,[RBP + -0xe9c] LEA RCX,[RBP + -0xea0] LEA R8,[RBP + -0xec0] MOV qword ptr [RSP],0xe60 CALL 0x00132ed0 MOV qword ptr [RBP + -0xeb0],RAX CMP dword ptr [RBP + -0xe9c],0x270f JNZ 0x00132c0f MOV RDI,qword ptr [RBP + -0xeb0] LEA RSI,[RBP + -0xe70] MOV EDX,0xe60 CALL 0x00134530 MOV RAX,qword ptr [RBP + -0xe90] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xe90],RCX MOV byte ptr [RAX],0x30 MOV RAX,qword ptr [RBP + -0xe90] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xe98],0x0 JZ 0x00132bff MOV RAX,qword ptr [RBP + -0xe98] MOV byte ptr [RAX],0x1 LAB_00132bff: MOV qword ptr [RBP + -0xe78],0x1 JMP 0x00132e96 LAB_00132c0f: MOV RAX,qword ptr [RBP + -0xeb0] MOV qword ptr [RBP + -0xeb8],RAX MOV RAX,qword ptr [RBP + -0xec0] MOV RCX,qword ptr [RBP + -0xeb8] SUB RAX,RCX MOV dword ptr [RBP + -0xea4],EAX CMP dword ptr [RBP + -0xea0],0x0 JZ 0x00132c55 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2d LAB_00132c55: CMP dword ptr [RBP + -0xe9c],0x0 JG 0x00132cce MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2e MOV EAX,dword ptr [RBP + -0xe9c] MOV dword ptr [RBP + -0xea8],EAX LAB_00132c9a: CMP dword ptr [RBP + -0xea8],0x0 JGE 0x00132ccc MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 MOV EAX,dword ptr [RBP + -0xea8] ADD EAX,0x1 MOV dword ptr [RBP + -0xea8],EAX JMP 0x00132c9a LAB_00132ccc: JMP 0x00132cce LAB_00132cce: MOV dword ptr [RBP + -0xea8],0x1 LAB_00132cd8: MOV EAX,dword ptr [RBP + -0xea8] CMP EAX,dword ptr [RBP + -0xea4] JG 0x00132d5e MOV RAX,qword ptr [RBP + -0xeb8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xeb8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0xec8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0xec8],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0xea8] CMP EAX,dword ptr [RBP + -0xe9c] JNZ 0x00132d48 MOV EAX,dword ptr [RBP + -0xea8] CMP EAX,dword ptr [RBP + -0xea4] JGE 0x00132d48 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2e LAB_00132d48: JMP 0x00132d4a LAB_00132d4a: MOV EAX,dword ptr [RBP + -0xea8] ADD EAX,0x1 MOV dword ptr [RBP + -0xea8],EAX JMP 0x00132cd8 LAB_00132d5e: JMP 0x00132d60 LAB_00132d60: MOV EAX,dword ptr [RBP + -0xea8] MOV ECX,EAX ADD ECX,0x1 MOV dword ptr [RBP + -0xea8],ECX CMP EAX,dword ptr [RBP + -0xe9c] JG 0x00132d93 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 JMP 0x00132d60 LAB_00132d93: CMP dword ptr [RBP + -0xe84],0x0 JLE 0x00132e48 MOV EAX,dword ptr [RBP + -0xea4] CMP EAX,dword ptr [RBP + -0xe9c] JG 0x00132dc6 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x2e LAB_00132dc6: MOV EAX,dword ptr [RBP + -0xe84] MOV dword ptr [RBP + -0xecc],EAX MOV ECX,dword ptr [RBP + -0xea4] SUB ECX,dword ptr [RBP + -0xe9c] XOR EAX,EAX CMP EAX,ECX JLE 0x00132dee XOR EAX,EAX MOV dword ptr [RBP + -0xed0],EAX JMP 0x00132e00 LAB_00132dee: MOV EAX,dword ptr [RBP + -0xea4] SUB EAX,dword ptr [RBP + -0xe9c] MOV dword ptr [RBP + -0xed0],EAX LAB_00132e00: MOV EAX,dword ptr [RBP + -0xecc] MOV ECX,dword ptr [RBP + -0xed0] SUB EAX,ECX MOV dword ptr [RBP + -0xea8],EAX LAB_00132e14: CMP dword ptr [RBP + -0xea8],0x0 JLE 0x00132e46 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xec8],RCX MOV byte ptr [RAX],0x30 MOV EAX,dword ptr [RBP + -0xea8] ADD EAX,-0x1 MOV dword ptr [RBP + -0xea8],EAX JMP 0x00132e14 LAB_00132e46: JMP 0x00132e48 LAB_00132e48: MOV RAX,qword ptr [RBP + -0xec8] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xe98],0x0 JZ 0x00132e66 MOV RAX,qword ptr [RBP + -0xe98] MOV byte ptr [RAX],0x0 LAB_00132e66: MOV RDI,qword ptr [RBP + -0xeb0] LEA RSI,[RBP + -0xe70] MOV EDX,0xe60 CALL 0x00134530 MOV RAX,qword ptr [RBP + -0xec8] MOV RCX,qword ptr [RBP + -0xe90] SUB RAX,RCX MOV qword ptr [RBP + -0xe78],RAX LAB_00132e96: MOV RAX,qword ptr [RBP + -0xe78] MOV qword ptr [RBP + -0xed8],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00132ec6 MOV RAX,qword ptr [RBP + -0xed8] ADD RSP,0xee0 POP RBP RET LAB_00132ec6: CALL 0x001134b0
long ma_fcvt(int8 param_1,int param_2,int1 *param_3,int1 *param_4) { int1 *puVar1; long in_FS_OFFSET; int local_ed8; int1 *local_ed0; int local_ec8 [2]; int1 *local_ec0; int1 *local_eb8; int local_eb0; int local_eac; int local_ea8; int local_ea4; int1 *local_ea0; int1 *local_e98; int local_e8c; int8 local_e88; long local_e80; int1 local_e78 [3688]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_ea0 = param_4; local_e98 = param_3; local_e8c = param_2; local_e88 = param_1; local_eb8 = (int1 *)dtoa(param_1,5,param_2,&local_ea4,&local_ea8,local_ec8,local_e78,0xe60); if (local_ea4 == 9999) { dtoa_free(local_eb8,local_e78,0xe60); *local_e98 = 0x30; local_e98[1] = 0; if (local_ea0 != (int1 *)0x0) { *local_ea0 = 1; } local_e80 = 1; local_e98 = local_e98 + 1; } else { local_eac = local_ec8[0] - (int)local_eb8; local_ed0 = param_3; if (local_ea8 != 0) { local_ed0 = param_3 + 1; *param_3 = 0x2d; } if (local_ea4 < 1) { *local_ed0 = 0x30; local_ed0[1] = 0x2e; local_ed0 = local_ed0 + 2; for (local_eb0 = local_ea4; local_eb0 < 0; local_eb0 = local_eb0 + 1) { *local_ed0 = 0x30; local_ed0 = local_ed0 + 1; } } local_ec0 = local_eb8; for (local_eb0 = 1; local_eb0 <= local_eac; local_eb0 = local_eb0 + 1) { puVar1 = local_ed0 + 1; *local_ed0 = *local_ec0; if ((local_eb0 == local_ea4) && (local_eb0 < local_eac)) { *puVar1 = 0x2e; puVar1 = local_ed0 + 2; } local_ed0 = puVar1; local_ec0 = local_ec0 + 1; } while (local_eb0 <= local_ea4) { *local_ed0 = 0x30; local_ed0 = local_ed0 + 1; local_eb0 = local_eb0 + 1; } local_eb0 = local_eb0 + 1; if (0 < local_e8c) { if (local_eac <= local_ea4) { *local_ed0 = 0x2e; local_ed0 = local_ed0 + 1; } if (local_eac - local_ea4 < 0) { local_ed8 = 0; } else { local_ed8 = local_eac - local_ea4; } for (local_eb0 = local_e8c - local_ed8; 0 < local_eb0; local_eb0 = local_eb0 + -1) { *local_ed0 = 0x30; local_ed0 = local_ed0 + 1; } } *local_ed0 = 0; if (local_ea0 != (int1 *)0x0) { *local_ea0 = 0; } dtoa_free(local_eb8,local_e78,0xe60); local_e80 = (long)local_ed0 - (long)local_e98; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_e80; }
44,927
psi_rwlock_trywrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_trywrlock(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_TRYWRITELOCK, file, line); int result= rw_trywrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O0
c
psi_rwlock_trywrlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1a57e6(%rip), %rax # 0x1cc820 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 $0x3, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x276a0 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x27093 leaq 0x1a57a0(%rip), %rax # 0x1cc820 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_trywrlock: 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, 3 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call my_rw_trywrlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_27093 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_27093: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_rwlock_trywrlock(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), 3LL, a2, a3); v4 = my_rw_trywrlock(v9); if ( v5 ) (*((void ( **)(long long, _QWORD))PSI_server[0] + 55))(v5, v4); return v4; }
psi_rwlock_trywrlock: 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,[0x2cc820] 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,0x3 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x001276a0 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x00127093 LEA RAX,[0x2cc820] 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_00127093: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_rwlock_trywrlock(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),3,param_2,param_3); uVar1 = my_rw_trywrlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
44,928
minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
ForNode(const Location & location, std::vector<std::string> && var_names, std::shared_ptr<Expression> && iterable, std::shared_ptr<Expression> && condition, std::shared_ptr<TemplateNode> && body, bool recursive, std::shared_ptr<TemplateNode> && else_body) : TemplateNode(location), var_names(var_names), iterable(std::move(iterable)), condition(std::move(condition)), body(std::move(body)), recursive(recursive), else_body(std::move(else_body)) {}
O2
cpp
minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %r9, %r14 movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rdi, %rbx callq 0x74652 leaq 0x893a4(%rip), %rax # 0xfe080 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %rdi movq %r13, %rsi callq 0x3b582 andq $0x0, 0x40(%rbx) movups (%r12), %xmm0 andq $0x0, 0x8(%r12) movups %xmm0, 0x38(%rbx) andq $0x0, (%r12) movq 0x38(%rsp), %rax andq $0x0, 0x50(%rbx) movups (%r15), %xmm0 andq $0x0, 0x8(%r15) movups %xmm0, 0x48(%rbx) andq $0x0, (%r15) movb 0x30(%rsp), %cl andq $0x0, 0x60(%rbx) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x58(%rbx) andq $0x0, (%r14) movb %cl, 0x68(%rbx) andq $0x0, 0x78(%rbx) movups (%rax), %xmm0 andq $0x0, 0x8(%rax) movups %xmm0, 0x70(%rbx) andq $0x0, (%rax) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %rbx, %rdi callq 0x792cc movq %r14, %rdi callq 0x24030
_ZN5minja7ForNodeC2ERKNS_8LocationEOSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISA_EEOSt10shared_ptrINS_10ExpressionEESH_OSE_INS_12TemplateNodeEEbSK_: push r15 push r14 push r13 push r12 push rbx mov r14, r9 mov r15, r8 mov r12, rcx mov r13, rdx mov rbx, rdi call _ZN5minja12TemplateNodeC2ERKNS_8LocationE; minja::TemplateNode::TemplateNode(minja::Location const&) lea rax, _ZTVN5minja7ForNodeE; `vtable for'minja::ForNode add rax, 10h mov [rbx], rax lea rdi, [rbx+20h] mov rsi, r13 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) and qword ptr [rbx+40h], 0 movups xmm0, xmmword ptr [r12] and qword ptr [r12+8], 0 movups xmmword ptr [rbx+38h], xmm0 and qword ptr [r12], 0 mov rax, [rsp+28h+arg_8] and qword ptr [rbx+50h], 0 movups xmm0, xmmword ptr [r15] and qword ptr [r15+8], 0 movups xmmword ptr [rbx+48h], xmm0 and qword ptr [r15], 0 mov cl, [rsp+28h+arg_0] and qword ptr [rbx+60h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [rbx+58h], xmm0 and qword ptr [r14], 0 mov [rbx+68h], cl and qword ptr [rbx+78h], 0 movups xmm0, xmmword ptr [rax] and qword ptr [rax+8], 0 movups xmmword ptr [rbx+70h], xmm0 and qword ptr [rax], 0 pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, rbx; this call _ZN5minja12TemplateNodeD2Ev; minja::TemplateNode::~TemplateNode() mov rdi, r14 call __Unwind_Resume
long long minja::ForNode::ForNode( long long a1, _QWORD *a2, _QWORD *a3, __int128 *a4, __int128 *a5, __int128 *a6, char a7, __int128 *a8) { __int128 v12; // xmm0 long long result; // rax __int128 v14; // xmm0 __int128 v15; // xmm0 __int128 v16; // xmm0 minja::TemplateNode::TemplateNode((_QWORD *)a1, a2); *(_QWORD *)a1 = &`vtable for'minja::ForNode + 2; std::vector<std::string>::vector((_QWORD *)(a1 + 32), a3); *(_QWORD *)(a1 + 64) = 0LL; v12 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 56) = v12; *(_QWORD *)a4 = 0LL; result = (long long)a8; *(_QWORD *)(a1 + 80) = 0LL; v14 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v14; *(_QWORD *)a5 = 0LL; *(_QWORD *)(a1 + 96) = 0LL; v15 = *a6; *((_QWORD *)a6 + 1) = 0LL; *(_OWORD *)(a1 + 88) = v15; *(_QWORD *)a6 = 0LL; *(_BYTE *)(a1 + 104) = a7; *(_QWORD *)(a1 + 120) = 0LL; v16 = *a8; *((_QWORD *)a8 + 1) = 0LL; *(_OWORD *)(a1 + 112) = v16; *(_QWORD *)a8 = 0LL; return result; }
ForNode: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,R9 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV RBX,RDI CALL 0x00174652 LEA RAX,[0x1fe080] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x20] LAB_00174ce7: MOV RSI,R13 CALL 0x0013b582 LAB_00174cef: AND qword ptr [RBX + 0x40],0x0 MOVUPS XMM0,xmmword ptr [R12] AND qword ptr [R12 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x38],XMM0 AND qword ptr [R12],0x0 MOV RAX,qword ptr [RSP + 0x38] AND qword ptr [RBX + 0x50],0x0 MOVUPS XMM0,xmmword ptr [R15] AND qword ptr [R15 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 AND qword ptr [R15],0x0 MOV CL,byte ptr [RSP + 0x30] AND qword ptr [RBX + 0x60],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 AND qword ptr [R14],0x0 MOV byte ptr [RBX + 0x68],CL AND qword ptr [RBX + 0x78],0x0 MOVUPS XMM0,xmmword ptr [RAX] AND qword ptr [RAX + 0x8],0x0 MOVUPS xmmword ptr [RBX + 0x70],XMM0 AND qword ptr [RAX],0x0 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* minja::ForNode::ForNode(minja::Location const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::TemplateNode>&&, bool, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::ForNode::ForNode (ForNode *this,Location *param_1,vector *param_2,shared_ptr *param_3,shared_ptr *param_4, shared_ptr *param_5,bool param_6,shared_ptr *param_7) { int8 uVar1; TemplateNode::TemplateNode((TemplateNode *)this,param_1); *(int ***)this = &PTR_do_render_001fe090; /* try { // try from 00174ce7 to 00174cee has its CatchHandler @ 00174d5f */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)(this + 0x20), param_2); *(int8 *)(this + 0x40) = 0; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x38) = *(int8 *)param_3; *(int8 *)(this + 0x40) = uVar1; *(int8 *)param_3 = 0; *(int8 *)(this + 0x50) = 0; uVar1 = *(int8 *)(param_4 + 8); *(int8 *)(param_4 + 8) = 0; *(int8 *)(this + 0x48) = *(int8 *)param_4; *(int8 *)(this + 0x50) = uVar1; *(int8 *)param_4 = 0; *(int8 *)(this + 0x60) = 0; uVar1 = *(int8 *)(param_5 + 8); *(int8 *)(param_5 + 8) = 0; *(int8 *)(this + 0x58) = *(int8 *)param_5; *(int8 *)(this + 0x60) = uVar1; *(int8 *)param_5 = 0; this[0x68] = (ForNode)param_6; *(int8 *)(this + 0x78) = 0; uVar1 = *(int8 *)(param_7 + 8); *(int8 *)(param_7 + 8) = 0; *(int8 *)(this + 0x70) = *(int8 *)param_7; *(int8 *)(this + 0x78) = uVar1; *(int8 *)param_7 = 0; return; }
44,929
my_collation_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_collation_get_by_name(MY_CHARSET_LOADER *loader, const char *name, myf flags) { uint cs_number; CHARSET_INFO *cs; my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_collation_number(name,flags); my_charset_loader_init_mysys(loader); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_COLLATION, MYF(ME_BELL), name, index_file); } return cs; }
O0
c
my_collation_get_by_name: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x228(%rbp) movq %rsi, -0x230(%rbp) movq %rdx, -0x238(%rbp) leaq 0xbaf680(%rip), %rdi # 0xc8d6d4 leaq -0x90b(%rip), %rsi # 0xdd750 callq 0x2a240 movq -0x230(%rbp), %rdi movq -0x238(%rbp), %rsi callq 0xdd6a0 movl %eax, -0x23c(%rbp) movq -0x228(%rbp), %rdi callq 0xdcd70 cmpl $0x0, -0x23c(%rbp) je 0xde0b0 movq -0x228(%rbp), %rdi movl -0x23c(%rbp), %esi movq -0x238(%rbp), %rdx callq 0xddda0 movq %rax, -0x250(%rbp) jmp 0xde0bb xorl %eax, %eax movq %rax, -0x250(%rbp) jmp 0xde0bb movq -0x250(%rbp), %rax movq %rax, -0x248(%rbp) cmpq $0x0, -0x248(%rbp) jne 0xde11e movq -0x238(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0xde11e leaq -0x220(%rbp), %rdi callq 0xdd410 movq %rax, %rdi leaq 0x7f4a3(%rip), %rsi # 0x15d59d callq 0x2a7a0 movq -0x230(%rbp), %rdx leaq -0x220(%rbp), %rcx movl $0x1c, %edi movl $0x4, %esi movb $0x0, %al callq 0xf3f50 movq -0x248(%rbp), %rax movq %rax, -0x258(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xde14e movq -0x258(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
my_collation_get_by_name: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_228], rdi mov [rbp+var_230], rsi mov [rbp+var_238], rdx lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_230] mov rsi, [rbp+var_238] call get_collation_number mov [rbp+var_23C], eax mov rdi, [rbp+var_228] call my_charset_loader_init_mysys cmp [rbp+var_23C], 0 jz short loc_DE0B0 mov rdi, [rbp+var_228] mov esi, [rbp+var_23C] mov rdx, [rbp+var_238] call get_internal_charset mov [rbp+var_250], rax jmp short loc_DE0BB loc_DE0B0: xor eax, eax mov [rbp+var_250], rax jmp short $+2 loc_DE0BB: mov rax, [rbp+var_250] mov [rbp+var_248], rax cmp [rbp+var_248], 0 jnz short loc_DE11E mov rax, [rbp+var_238] and rax, 10h cmp rax, 0 jz short loc_DE11E lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov rdx, [rbp+var_230] lea rcx, [rbp+var_220] mov edi, 1Ch mov esi, 4 mov al, 0 call my_error loc_DE11E: mov rax, [rbp+var_248] mov [rbp+var_258], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DE14E mov rax, [rbp+var_258] add rsp, 260h pop rbp retn loc_DE14E: call ___stack_chk_fail
long long my_collation_get_by_name(long long a1, long long a2, long long a3) { long long charsets_dir; // rax int v4; // r8d int v5; // r9d long long internal_charset; // [rsp+10h] [rbp-250h] unsigned int collation_number; // [rsp+24h] [rbp-23Ch] _BYTE v10[536]; // [rsp+40h] [rbp-220h] BYREF unsigned long long v11; // [rsp+258h] [rbp-8h] v11 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); collation_number = get_collation_number(a2, a3); my_charset_loader_init_mysys(a1); if ( collation_number ) internal_charset = get_internal_charset(a1, collation_number, a3); else internal_charset = 0LL; if ( !internal_charset && (a3 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v10); stpcpy(charsets_dir, "Index.xml"); my_error(28, 4, a2, (unsigned int)v10, v4, v5); } return internal_charset; }
my_collation_get_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x228],RDI MOV qword ptr [RBP + -0x230],RSI MOV qword ptr [RBP + -0x238],RDX LEA RDI,[0xd8d6d4] LEA RSI,[0x1dd750] CALL 0x0012a240 MOV RDI,qword ptr [RBP + -0x230] MOV RSI,qword ptr [RBP + -0x238] CALL 0x001dd6a0 MOV dword ptr [RBP + -0x23c],EAX MOV RDI,qword ptr [RBP + -0x228] CALL 0x001dcd70 CMP dword ptr [RBP + -0x23c],0x0 JZ 0x001de0b0 MOV RDI,qword ptr [RBP + -0x228] MOV ESI,dword ptr [RBP + -0x23c] MOV RDX,qword ptr [RBP + -0x238] CALL 0x001ddda0 MOV qword ptr [RBP + -0x250],RAX JMP 0x001de0bb LAB_001de0b0: XOR EAX,EAX MOV qword ptr [RBP + -0x250],RAX JMP 0x001de0bb LAB_001de0bb: MOV RAX,qword ptr [RBP + -0x250] MOV qword ptr [RBP + -0x248],RAX CMP qword ptr [RBP + -0x248],0x0 JNZ 0x001de11e MOV RAX,qword ptr [RBP + -0x238] AND RAX,0x10 CMP RAX,0x0 JZ 0x001de11e LEA RDI,[RBP + -0x220] CALL 0x001dd410 MOV RDI,RAX LEA RSI,[0x25d59d] CALL 0x0012a7a0 MOV RDX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x220] MOV EDI,0x1c MOV ESI,0x4 MOV AL,0x0 CALL 0x001f3f50 LAB_001de11e: MOV RAX,qword ptr [RBP + -0x248] MOV qword ptr [RBP + -0x258],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001de14e MOV RAX,qword ptr [RBP + -0x258] ADD RSP,0x260 POP RBP RET LAB_001de14e: CALL 0x0012a270
long my_collation_get_by_name(int8 param_1,int8 param_2,ulong param_3) { int iVar1; char *__dest; long in_FS_OFFSET; long local_258; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_collation_number(param_2,param_3); my_charset_loader_init_mysys(param_1); if (iVar1 == 0) { local_258 = 0; } else { local_258 = get_internal_charset(param_1,iVar1,param_3); } if ((local_258 == 0) && ((param_3 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_error(0x1c,4,param_2,local_228); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_258; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
44,930
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>(float, float, float*, float*, float*, float*, float*, float*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBasis.cpp
int EvalBasisBezier(REAL s, REAL t, REAL wP[16], REAL wDs[16], REAL wDt[16], REAL wDss[16], REAL wDst[16], REAL wDtt[16]) { REAL sWeights[4], tWeights[4], dsWeights[4], dtWeights[4], dssWeights[4], dttWeights[4]; evalBezierCurve(s, wP ? sWeights : 0, wDs ? dsWeights : 0, wDss ? dssWeights : 0); evalBezierCurve(t, wP ? tWeights : 0, wDt ? dtWeights : 0, wDtt ? dttWeights : 0); if (wP) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wP[4*i+j] = sWeights[j] * tWeights[i]; } } } if (wDs && wDt) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wDs[4*i+j] = dsWeights[j] * tWeights[i]; wDt[4*i+j] = sWeights[j] * dtWeights[i]; } } if (wDss && wDst && wDtt) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wDss[4*i+j] = dssWeights[j] * tWeights[i]; wDst[4*i+j] = dsWeights[j] * dtWeights[i]; wDtt[4*i+j] = sWeights[j] * dttWeights[i]; } } } } return 16; }
O0
cpp
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>(float, float, float*, float*, float*, float*, float*, float*): pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movss %xmm0, -0x4(%rbp) movss %xmm1, -0x8(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movss -0x4(%rbp), %xmm0 movss %xmm0, -0xbc(%rbp) cmpq $0x0, -0x10(%rbp) je 0x13484e leaq -0x50(%rbp), %rax movq %rax, -0xc8(%rbp) jmp 0x134859 xorl %eax, %eax movq %rax, -0xc8(%rbp) jmp 0x134859 movq -0xc8(%rbp), %rax movq %rax, -0xd0(%rbp) cmpq $0x0, -0x18(%rbp) je 0x13487b leaq -0x70(%rbp), %rax movq %rax, -0xd8(%rbp) jmp 0x134886 xorl %eax, %eax movq %rax, -0xd8(%rbp) jmp 0x134886 movq -0xd8(%rbp), %rax movq %rax, -0xe0(%rbp) cmpq $0x0, -0x28(%rbp) je 0x1348ab leaq -0x90(%rbp), %rax movq %rax, -0xe8(%rbp) jmp 0x1348b6 xorl %eax, %eax movq %rax, -0xe8(%rbp) jmp 0x1348b6 movq -0xe0(%rbp), %rsi movq -0xd0(%rbp), %rdi movss -0xbc(%rbp), %xmm0 movq -0xe8(%rbp), %rdx callq 0x128910 movss -0x8(%rbp), %xmm0 movss %xmm0, -0xec(%rbp) cmpq $0x0, -0x10(%rbp) je 0x1348f9 leaq -0x60(%rbp), %rax movq %rax, -0xf8(%rbp) jmp 0x134904 xorl %eax, %eax movq %rax, -0xf8(%rbp) jmp 0x134904 movq -0xf8(%rbp), %rax movq %rax, -0x100(%rbp) cmpq $0x0, -0x20(%rbp) je 0x134926 leaq -0x80(%rbp), %rax movq %rax, -0x108(%rbp) jmp 0x134931 xorl %eax, %eax movq %rax, -0x108(%rbp) jmp 0x134931 movq -0x108(%rbp), %rax movq %rax, -0x110(%rbp) cmpq $0x0, -0x38(%rbp) je 0x134956 leaq -0xa0(%rbp), %rax movq %rax, -0x118(%rbp) jmp 0x134961 xorl %eax, %eax movq %rax, -0x118(%rbp) jmp 0x134961 movq -0x110(%rbp), %rsi movq -0x100(%rbp), %rdi movss -0xec(%rbp), %xmm0 movq -0x118(%rbp), %rdx callq 0x128910 cmpq $0x0, -0x10(%rbp) je 0x134a0f movl $0x0, -0xa4(%rbp) cmpl $0x4, -0xa4(%rbp) jge 0x134a0d movl $0x0, -0xa8(%rbp) cmpl $0x4, -0xa8(%rbp) jge 0x1349fa movslq -0xa8(%rbp), %rax movss -0x50(%rbp,%rax,4), %xmm0 movslq -0xa4(%rbp), %rax mulss -0x60(%rbp,%rax,4), %xmm0 movq -0x10(%rbp), %rax movl -0xa4(%rbp), %ecx shll $0x2, %ecx addl -0xa8(%rbp), %ecx movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) movl -0xa8(%rbp), %eax addl $0x1, %eax movl %eax, -0xa8(%rbp) jmp 0x1349ab jmp 0x1349fc movl -0xa4(%rbp), %eax addl $0x1, %eax movl %eax, -0xa4(%rbp) jmp 0x134998 jmp 0x134a0f cmpq $0x0, -0x18(%rbp) je 0x134c05 cmpq $0x0, -0x20(%rbp) je 0x134c05 movl $0x0, -0xac(%rbp) cmpl $0x4, -0xac(%rbp) jge 0x134ae3 movl $0x0, -0xb0(%rbp) cmpl $0x4, -0xb0(%rbp) jge 0x134acd movslq -0xb0(%rbp), %rax movss -0x70(%rbp,%rax,4), %xmm0 movslq -0xac(%rbp), %rax mulss -0x60(%rbp,%rax,4), %xmm0 movq -0x18(%rbp), %rax movl -0xac(%rbp), %ecx shll $0x2, %ecx addl -0xb0(%rbp), %ecx movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) movslq -0xb0(%rbp), %rax movss -0x50(%rbp,%rax,4), %xmm0 movslq -0xac(%rbp), %rax mulss -0x80(%rbp,%rax,4), %xmm0 movq -0x20(%rbp), %rax movl -0xac(%rbp), %ecx shll $0x2, %ecx addl -0xb0(%rbp), %ecx movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) movl -0xb0(%rbp), %eax addl $0x1, %eax movl %eax, -0xb0(%rbp) jmp 0x134a46 jmp 0x134acf movl -0xac(%rbp), %eax addl $0x1, %eax movl %eax, -0xac(%rbp) jmp 0x134a2f cmpq $0x0, -0x28(%rbp) je 0x134c03 cmpq $0x0, -0x30(%rbp) je 0x134c03 cmpq $0x0, -0x38(%rbp) je 0x134c03 movl $0x0, -0xb4(%rbp) cmpl $0x4, -0xb4(%rbp) jge 0x134c01 movl $0x0, -0xb8(%rbp) cmpl $0x4, -0xb8(%rbp) jge 0x134beb movslq -0xb8(%rbp), %rax movss -0x90(%rbp,%rax,4), %xmm0 movslq -0xb4(%rbp), %rax mulss -0x60(%rbp,%rax,4), %xmm0 movq -0x28(%rbp), %rax movl -0xb4(%rbp), %ecx shll $0x2, %ecx addl -0xb8(%rbp), %ecx movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) movslq -0xb8(%rbp), %rax movss -0x70(%rbp,%rax,4), %xmm0 movslq -0xb4(%rbp), %rax mulss -0x80(%rbp,%rax,4), %xmm0 movq -0x30(%rbp), %rax movl -0xb4(%rbp), %ecx shll $0x2, %ecx addl -0xb8(%rbp), %ecx movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) movslq -0xb8(%rbp), %rax movss -0x50(%rbp,%rax,4), %xmm0 movslq -0xb4(%rbp), %rax mulss -0xa0(%rbp,%rax,4), %xmm0 movq -0x38(%rbp), %rax movl -0xb4(%rbp), %ecx shll $0x2, %ecx addl -0xb8(%rbp), %ecx movslq %ecx, %rcx movss %xmm0, (%rax,%rcx,4) movl -0xb8(%rbp), %eax addl $0x1, %eax movl %eax, -0xb8(%rbp) jmp 0x134b25 jmp 0x134bed movl -0xb4(%rbp), %eax addl $0x1, %eax movl %eax, -0xb4(%rbp) jmp 0x134b0e jmp 0x134c03 jmp 0x134c05 movl $0x10, %eax addq $0x120, %rsp # imm = 0x120 popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN10OpenSubdiv6v3_6_03Far8internal15EvalBasisBezierIfEEiT_S4_PS4_S5_S5_S5_S5_S5_: push rbp mov rbp, rsp sub rsp, 120h movss [rbp+var_4], xmm0 movss [rbp+var_8], xmm1 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_38], r9 movss xmm0, [rbp+var_4] movss [rbp+var_BC], xmm0 cmp [rbp+var_10], 0 jz short loc_13484E lea rax, [rbp+var_50] mov [rbp+var_C8], rax jmp short loc_134859 loc_13484E: xor eax, eax mov [rbp+var_C8], rax jmp short $+2 loc_134859: mov rax, [rbp+var_C8] mov [rbp+var_D0], rax cmp [rbp+var_18], 0 jz short loc_13487B lea rax, [rbp+var_70] mov [rbp+var_D8], rax jmp short loc_134886 loc_13487B: xor eax, eax mov [rbp+var_D8], rax jmp short $+2 loc_134886: mov rax, [rbp+var_D8] mov [rbp+var_E0], rax cmp [rbp+var_28], 0 jz short loc_1348AB lea rax, [rbp+var_90] mov [rbp+var_E8], rax jmp short loc_1348B6 loc_1348AB: xor eax, eax mov [rbp+var_E8], rax jmp short $+2 loc_1348B6: mov rsi, [rbp+var_E0] mov rdi, [rbp+var_D0] movss xmm0, [rbp+var_BC] mov rdx, [rbp+var_E8] call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_115evalBezierCurveIfEEvT_PS5_S6_S6_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<float>(float,float*,float*,float*) movss xmm0, [rbp+var_8] movss [rbp+var_EC], xmm0 cmp [rbp+var_10], 0 jz short loc_1348F9 lea rax, [rbp+var_60] mov [rbp+var_F8], rax jmp short loc_134904 loc_1348F9: xor eax, eax mov [rbp+var_F8], rax jmp short $+2 loc_134904: mov rax, [rbp+var_F8] mov [rbp+var_100], rax cmp [rbp+var_20], 0 jz short loc_134926 lea rax, [rbp+var_80] mov [rbp+var_108], rax jmp short loc_134931 loc_134926: xor eax, eax mov [rbp+var_108], rax jmp short $+2 loc_134931: mov rax, [rbp+var_108] mov [rbp+var_110], rax cmp [rbp+var_38], 0 jz short loc_134956 lea rax, [rbp+var_A0] mov [rbp+var_118], rax jmp short loc_134961 loc_134956: xor eax, eax mov [rbp+var_118], rax jmp short $+2 loc_134961: mov rsi, [rbp+var_110] mov rdi, [rbp+var_100] movss xmm0, [rbp+var_EC] mov rdx, [rbp+var_118] call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_115evalBezierCurveIfEEvT_PS5_S6_S6_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<float>(float,float*,float*,float*) cmp [rbp+var_10], 0 jz loc_134A0F mov [rbp+var_A4], 0 loc_134998: cmp [rbp+var_A4], 4 jge short loc_134A0D mov [rbp+var_A8], 0 loc_1349AB: cmp [rbp+var_A8], 4 jge short loc_1349FA movsxd rax, [rbp+var_A8] movss xmm0, [rbp+rax*4+var_50] movsxd rax, [rbp+var_A4] mulss xmm0, [rbp+rax*4+var_60] mov rax, [rbp+var_10] mov ecx, [rbp+var_A4] shl ecx, 2 add ecx, [rbp+var_A8] movsxd rcx, ecx movss dword ptr [rax+rcx*4], xmm0 mov eax, [rbp+var_A8] add eax, 1 mov [rbp+var_A8], eax jmp short loc_1349AB loc_1349FA: jmp short $+2 loc_1349FC: mov eax, [rbp+var_A4] add eax, 1 mov [rbp+var_A4], eax jmp short loc_134998 loc_134A0D: jmp short $+2 loc_134A0F: cmp [rbp+var_18], 0 jz loc_134C05 cmp [rbp+var_20], 0 jz loc_134C05 mov [rbp+var_AC], 0 loc_134A2F: cmp [rbp+var_AC], 4 jge loc_134AE3 mov [rbp+var_B0], 0 loc_134A46: cmp [rbp+var_B0], 4 jge short loc_134ACD movsxd rax, [rbp+var_B0] movss xmm0, [rbp+rax*4+var_70] movsxd rax, [rbp+var_AC] mulss xmm0, [rbp+rax*4+var_60] mov rax, [rbp+var_18] mov ecx, [rbp+var_AC] shl ecx, 2 add ecx, [rbp+var_B0] movsxd rcx, ecx movss dword ptr [rax+rcx*4], xmm0 movsxd rax, [rbp+var_B0] movss xmm0, [rbp+rax*4+var_50] movsxd rax, [rbp+var_AC] mulss xmm0, [rbp+rax*4+var_80] mov rax, [rbp+var_20] mov ecx, [rbp+var_AC] shl ecx, 2 add ecx, [rbp+var_B0] movsxd rcx, ecx movss dword ptr [rax+rcx*4], xmm0 mov eax, [rbp+var_B0] add eax, 1 mov [rbp+var_B0], eax jmp loc_134A46 loc_134ACD: jmp short $+2 loc_134ACF: mov eax, [rbp+var_AC] add eax, 1 mov [rbp+var_AC], eax jmp loc_134A2F loc_134AE3: cmp [rbp+var_28], 0 jz loc_134C03 cmp [rbp+var_30], 0 jz loc_134C03 cmp [rbp+var_38], 0 jz loc_134C03 mov [rbp+var_B4], 0 loc_134B0E: cmp [rbp+var_B4], 4 jge loc_134C01 mov [rbp+var_B8], 0 loc_134B25: cmp [rbp+var_B8], 4 jge loc_134BEB movsxd rax, [rbp+var_B8] movss xmm0, [rbp+rax*4+var_90] movsxd rax, [rbp+var_B4] mulss xmm0, [rbp+rax*4+var_60] mov rax, [rbp+var_28] mov ecx, [rbp+var_B4] shl ecx, 2 add ecx, [rbp+var_B8] movsxd rcx, ecx movss dword ptr [rax+rcx*4], xmm0 movsxd rax, [rbp+var_B8] movss xmm0, [rbp+rax*4+var_70] movsxd rax, [rbp+var_B4] mulss xmm0, [rbp+rax*4+var_80] mov rax, [rbp+var_30] mov ecx, [rbp+var_B4] shl ecx, 2 add ecx, [rbp+var_B8] movsxd rcx, ecx movss dword ptr [rax+rcx*4], xmm0 movsxd rax, [rbp+var_B8] movss xmm0, [rbp+rax*4+var_50] movsxd rax, [rbp+var_B4] mulss xmm0, [rbp+rax*4+var_A0] mov rax, [rbp+var_38] mov ecx, [rbp+var_B4] shl ecx, 2 add ecx, [rbp+var_B8] movsxd rcx, ecx movss dword ptr [rax+rcx*4], xmm0 mov eax, [rbp+var_B8] add eax, 1 mov [rbp+var_B8], eax jmp loc_134B25 loc_134BEB: jmp short $+2 loc_134BED: mov eax, [rbp+var_B4] add eax, 1 mov [rbp+var_B4], eax jmp loc_134B0E loc_134C01: jmp short $+2 loc_134C03: jmp short $+2 loc_134C05: mov eax, 10h add rsp, 120h pop rbp retn
long long OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, float a7, float a8) { float *v9; // [rsp+8h] [rbp-118h] float *v10; // [rsp+18h] [rbp-108h] float *v11; // [rsp+28h] [rbp-F8h] float *v12; // [rsp+48h] [rbp-D8h] float *v13; // [rsp+58h] [rbp-C8h] int ii; // [rsp+68h] [rbp-B8h] int n; // [rsp+6Ch] [rbp-B4h] int m; // [rsp+70h] [rbp-B0h] int k; // [rsp+74h] [rbp-ACh] int j; // [rsp+78h] [rbp-A8h] int i; // [rsp+7Ch] [rbp-A4h] float v20[4]; // [rsp+80h] [rbp-A0h] BYREF float v21[4]; // [rsp+90h] [rbp-90h] BYREF float v22[4]; // [rsp+A0h] [rbp-80h] BYREF float v23[4]; // [rsp+B0h] [rbp-70h] BYREF float v24[4]; // [rsp+C0h] [rbp-60h] BYREF float v25[6]; // [rsp+D0h] [rbp-50h] BYREF long long v26; // [rsp+E8h] [rbp-38h] long long v27; // [rsp+F0h] [rbp-30h] long long v28; // [rsp+F8h] [rbp-28h] long long v29; // [rsp+100h] [rbp-20h] long long v30; // [rsp+108h] [rbp-18h] long long v31; // [rsp+110h] [rbp-10h] float v32; // [rsp+118h] [rbp-8h] float v33; // [rsp+11Ch] [rbp-4h] v33 = a7; v32 = a8; v31 = a1; v30 = a2; v29 = a3; v28 = a4; v27 = a5; v26 = a6; if ( a1 ) v13 = v25; else v13 = 0LL; if ( v30 ) v12 = v23; else v12 = 0LL; if ( v28 ) OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<float>(v13, v12, v21, a7); else OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<float>(v13, v12, 0LL, a7); if ( v31 ) v11 = v24; else v11 = 0LL; if ( v29 ) v10 = v22; else v10 = 0LL; if ( v26 ) v9 = v20; else v9 = 0LL; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<float>(v11, v10, v9, v32); if ( v31 ) { for ( i = 0; i < 4; ++i ) { for ( j = 0; j < 4; ++j ) *(float *)(v31 + 4LL * (j + 4 * i)) = v25[j] * v24[i]; } } if ( v30 ) { if ( v29 ) { for ( k = 0; k < 4; ++k ) { for ( m = 0; m < 4; ++m ) { *(float *)(v30 + 4LL * (m + 4 * k)) = v23[m] * v24[k]; *(float *)(v29 + 4LL * (m + 4 * k)) = v25[m] * v22[k]; } } if ( v28 && v27 && v26 ) { for ( n = 0; n < 4; ++n ) { for ( ii = 0; ii < 4; ++ii ) { *(float *)(v28 + 4LL * (ii + 4 * n)) = v21[ii] * v24[n]; *(float *)(v27 + 4LL * (ii + 4 * n)) = v23[ii] * v22[n]; *(float *)(v26 + 4LL * (ii + 4 * n)) = v25[ii] * v20[n]; } } } } } return 16LL; }
44,931
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>(float, float, float*, float*, float*, float*, float*, float*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBasis.cpp
int EvalBasisBezier(REAL s, REAL t, REAL wP[16], REAL wDs[16], REAL wDt[16], REAL wDss[16], REAL wDst[16], REAL wDtt[16]) { REAL sWeights[4], tWeights[4], dsWeights[4], dtWeights[4], dssWeights[4], dttWeights[4]; evalBezierCurve(s, wP ? sWeights : 0, wDs ? dsWeights : 0, wDss ? dssWeights : 0); evalBezierCurve(t, wP ? tWeights : 0, wDt ? dtWeights : 0, wDtt ? dttWeights : 0); if (wP) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wP[4*i+j] = sWeights[j] * tWeights[i]; } } } if (wDs && wDt) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wDs[4*i+j] = dsWeights[j] * tWeights[i]; wDt[4*i+j] = sWeights[j] * dtWeights[i]; } } if (wDss && wDst && wDtt) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wDss[4*i+j] = dssWeights[j] * tWeights[i]; wDst[4*i+j] = dsWeights[j] * dtWeights[i]; wDtt[4*i+j] = sWeights[j] * dttWeights[i]; } } } } return 16; }
O1
cpp
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>(float, float, float*, float*, float*, float*, float*, float*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %r9, %rbx movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbp movsd %xmm1, 0x8(%rsp) testq %rsi, %rsi leaq 0x70(%rsp), %rsi cmoveq %r13, %rsi testq %rcx, %rcx leaq 0xb0(%rsp), %rdx cmoveq %rcx, %rdx testq %rdi, %rdi leaq 0x30(%rsp), %rdi cmoveq %rbp, %rdi leaq 0x10(%rsp), %rax cmoveq %rbp, %rax movq %rax, (%rsp) callq 0x5d245 testq %r12, %r12 leaq 0x50(%rsp), %rsi cmoveq %r12, %rsi testq %rbx, %rbx leaq 0x90(%rsp), %rdx cmoveq %rbx, %rdx movsd 0x8(%rsp), %xmm0 movq (%rsp), %rdi callq 0x5d245 testq %rbp, %rbp je 0x6518d xorl %eax, %eax movsd 0x10(%rsp,%rax,8), %xmm0 xorl %ecx, %ecx movsd 0x30(%rsp,%rcx,8), %xmm1 mulsd %xmm0, %xmm1 movsd %xmm1, (%rbp,%rcx,8) incq %rcx cmpq $0x4, %rcx jne 0x65167 incq %rax addq $0x20, %rbp cmpq $0x4, %rax jne 0x6515f testq %r12, %r12 sete %al testq %r13, %r13 sete %cl orb %al, %cl jne 0x6526e xorl %eax, %eax movsd 0x10(%rsp,%rax,8), %xmm0 movsd 0x50(%rsp,%rax,8), %xmm1 xorl %ecx, %ecx movsd 0x70(%rsp,%rcx,8), %xmm2 mulsd %xmm0, %xmm2 movsd %xmm2, (%r13,%rcx,8) movsd 0x30(%rsp,%rcx,8), %xmm2 mulsd %xmm1, %xmm2 movsd %xmm2, (%r12,%rcx,8) incq %rcx cmpq $0x4, %rcx jne 0x651b1 incq %rax addq $0x20, %r12 addq $0x20, %r13 cmpq $0x4, %rax jne 0x651a3 testq %rbx, %rbx sete %al testq %r15, %r15 sete %cl testq %r14, %r14 sete %dl orb %cl, %dl orb %al, %dl jne 0x6526e xorl %eax, %eax movsd 0x10(%rsp,%rax,8), %xmm0 movsd 0x50(%rsp,%rax,8), %xmm1 movsd 0x90(%rsp,%rax,8), %xmm2 xorl %ecx, %ecx movsd 0xb0(%rsp,%rcx), %xmm3 mulsd %xmm0, %xmm3 movsd %xmm3, (%r15,%rcx) movsd 0x70(%rsp,%rcx), %xmm3 mulsd %xmm1, %xmm3 movsd %xmm3, (%r14,%rcx) movsd 0x30(%rsp,%rcx), %xmm3 mulsd %xmm2, %xmm3 movsd %xmm3, (%rbx,%rcx) addq $0x8, %rcx cmpq $0x20, %rcx jne 0x6521d incq %rax addq $0x20, %rbx addq $0x20, %r14 addq $0x20, %r15 cmpq $0x4, %rax jne 0x65206 movl $0x10, %eax addq $0xd8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Far8internal15EvalBasisBezierIdEEiT_S4_PS4_S5_S5_S5_S5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov rbx, r9 mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbp, rdi movsd [rsp+108h+var_100], xmm1 test rsi, rsi lea rsi, [rsp+108h+var_98] cmovz rsi, r13 test rcx, rcx lea rdx, [rsp+108h+var_58] cmovz rdx, rcx test rdi, rdi lea rdi, [rsp+108h+var_D8] cmovz rdi, rbp lea rax, [rsp+108h+var_F8] cmovz rax, rbp mov [rsp+108h+var_108], rax call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_115evalBezierCurveIdEEvT_PS5_S6_S6_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<double>(double,double*,double*,double*) test r12, r12 lea rsi, [rsp+108h+var_B8] cmovz rsi, r12 test rbx, rbx lea rdx, [rsp+108h+var_78] cmovz rdx, rbx movsd xmm0, [rsp+108h+var_100] mov rdi, [rsp+108h+var_108] call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_115evalBezierCurveIdEEvT_PS5_S6_S6_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<double>(double,double*,double*,double*) test rbp, rbp jz short loc_6518D xor eax, eax loc_6515F: movsd xmm0, [rsp+rax*8+108h+var_F8] xor ecx, ecx loc_65167: movsd xmm1, [rsp+rcx*8+108h+var_D8] mulsd xmm1, xmm0 movsd qword ptr [rbp+rcx*8+0], xmm1 inc rcx cmp rcx, 4 jnz short loc_65167 inc rax add rbp, 20h ; ' ' cmp rax, 4 jnz short loc_6515F loc_6518D: test r12, r12 setz al test r13, r13 setz cl or cl, al jnz loc_6526E xor eax, eax loc_651A3: movsd xmm0, [rsp+rax*8+108h+var_F8] movsd xmm1, [rsp+rax*8+108h+var_B8] xor ecx, ecx loc_651B1: movsd xmm2, [rsp+rcx*8+108h+var_98] mulsd xmm2, xmm0 movsd qword ptr [r13+rcx*8+0], xmm2 movsd xmm2, [rsp+rcx*8+108h+var_D8] mulsd xmm2, xmm1 movsd qword ptr [r12+rcx*8], xmm2 inc rcx cmp rcx, 4 jnz short loc_651B1 inc rax add r12, 20h ; ' ' add r13, 20h ; ' ' cmp rax, 4 jnz short loc_651A3 test rbx, rbx setz al test r15, r15 setz cl test r14, r14 setz dl or dl, cl or dl, al jnz short loc_6526E xor eax, eax loc_65206: movsd xmm0, [rsp+rax*8+108h+var_F8] movsd xmm1, [rsp+rax*8+108h+var_B8] movsd xmm2, [rsp+rax*8+108h+var_78] xor ecx, ecx loc_6521D: movsd xmm3, [rsp+rcx+108h+var_58] mulsd xmm3, xmm0 movsd qword ptr [r15+rcx], xmm3 movsd xmm3, [rsp+rcx+108h+var_98] mulsd xmm3, xmm1 movsd qword ptr [r14+rcx], xmm3 movsd xmm3, [rsp+rcx+108h+var_D8] mulsd xmm3, xmm2 movsd qword ptr [rbx+rcx], xmm3 add rcx, 8 cmp rcx, 20h ; ' ' jnz short loc_6521D inc rax add rbx, 20h ; ' ' add r14, 20h ; ' ' add r15, 20h ; ' ' cmp rax, 4 jnz short loc_65206 loc_6526E: mov eax, 10h add rsp, 0D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<double>( double *a1, double *a2, long long a3, long long a4, long long a5, long long a6, double a7, double a8) { long long v10; // r15 double *v12; // r13 double *v13; // rbp double *v14; // rsi double *v15; // rdx bool v16; // zf double *v17; // rdi double *v18; // rax double *v19; // rsi double *v20; // rdx long long i; // rax double v22; // xmm0_8 long long j; // rcx long long k; // rax double v25; // xmm0_8 double v26; // xmm1_8 long long m; // rcx long long v28; // rax double v29; // xmm0_8 double v30; // xmm1_8 double v31; // xmm2_8 long long n; // rcx double *v34; // [rsp+0h] [rbp-108h] double v35[4]; // [rsp+10h] [rbp-F8h] BYREF double v36[4]; // [rsp+30h] [rbp-D8h] BYREF double v37[4]; // [rsp+50h] [rbp-B8h] BYREF double v38[4]; // [rsp+70h] [rbp-98h] BYREF double v39[4]; // [rsp+90h] [rbp-78h] BYREF _QWORD v40[11]; // [rsp+B0h] [rbp-58h] BYREF v10 = a4; v12 = a2; v13 = a1; v16 = a2 == 0LL; v14 = v38; if ( v16 ) v14 = v12; v15 = (double *)v40; if ( !a4 ) v15 = 0LL; v16 = a1 == 0LL; v17 = v36; if ( v16 ) v17 = v13; v18 = v35; if ( v16 ) v18 = v13; v34 = v18; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<double>(v17, v14, v15, a7); v19 = v37; if ( !a3 ) v19 = 0LL; v20 = v39; if ( !a6 ) v20 = 0LL; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<double>(v34, v19, v20, a8); if ( v13 ) { for ( i = 0LL; i != 4; ++i ) { v22 = v35[i]; for ( j = 0LL; j != 4; ++j ) v13[j] = v36[j] * v22; v13 += 4; } } if ( a3 != 0 && v12 != 0LL ) { for ( k = 0LL; k != 4; ++k ) { v25 = v35[k]; v26 = v37[k]; for ( m = 0LL; m != 4; ++m ) { v12[m] = v38[m] * v25; *(double *)(a3 + 8 * m) = v36[m] * v26; } a3 += 32LL; v12 += 4; } if ( a6 != 0 && v10 != 0 && a5 != 0 ) { v28 = 0LL; do { v29 = v35[v28]; v30 = v37[v28]; v31 = v39[v28]; for ( n = 0LL; n != 4; ++n ) { *(double *)(v10 + n * 8) = *(double *)&v40[n] * v29; *(double *)(a5 + n * 8) = v38[n] * v30; *(double *)(a6 + n * 8) = v36[n] * v31; } ++v28; a6 += 32LL; a5 += 32LL; v10 += 32LL; } while ( v28 != 4 ); } } return 16LL; }
EvalBasisBezier<double>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV RBX,R9 MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBP,RDI MOVSD qword ptr [RSP + 0x8],XMM1 TEST RSI,RSI LEA RSI,[RSP + 0x70] CMOVZ RSI,R13 TEST RCX,RCX LEA RDX,[RSP + 0xb0] CMOVZ RDX,RCX TEST RDI,RDI LEA RDI,[RSP + 0x30] CMOVZ RDI,RBP LEA RAX,[RSP + 0x10] CMOVZ RAX,RBP MOV qword ptr [RSP],RAX CALL 0x0015d245 TEST R12,R12 LEA RSI,[RSP + 0x50] CMOVZ RSI,R12 TEST RBX,RBX LEA RDX,[RSP + 0x90] CMOVZ RDX,RBX MOVSD XMM0,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP] CALL 0x0015d245 TEST RBP,RBP JZ 0x0016518d XOR EAX,EAX LAB_0016515f: MOVSD XMM0,qword ptr [RSP + RAX*0x8 + 0x10] XOR ECX,ECX LAB_00165167: MOVSD XMM1,qword ptr [RSP + RCX*0x8 + 0x30] MULSD XMM1,XMM0 MOVSD qword ptr [RBP + RCX*0x8],XMM1 INC RCX CMP RCX,0x4 JNZ 0x00165167 INC RAX ADD RBP,0x20 CMP RAX,0x4 JNZ 0x0016515f LAB_0016518d: TEST R12,R12 SETZ AL TEST R13,R13 SETZ CL OR CL,AL JNZ 0x0016526e XOR EAX,EAX LAB_001651a3: MOVSD XMM0,qword ptr [RSP + RAX*0x8 + 0x10] MOVSD XMM1,qword ptr [RSP + RAX*0x8 + 0x50] XOR ECX,ECX LAB_001651b1: MOVSD XMM2,qword ptr [RSP + RCX*0x8 + 0x70] MULSD XMM2,XMM0 MOVSD qword ptr [R13 + RCX*0x8],XMM2 MOVSD XMM2,qword ptr [RSP + RCX*0x8 + 0x30] MULSD XMM2,XMM1 MOVSD qword ptr [R12 + RCX*0x8],XMM2 INC RCX CMP RCX,0x4 JNZ 0x001651b1 INC RAX ADD R12,0x20 ADD R13,0x20 CMP RAX,0x4 JNZ 0x001651a3 TEST RBX,RBX SETZ AL TEST R15,R15 SETZ CL TEST R14,R14 SETZ DL OR DL,CL OR DL,AL JNZ 0x0016526e XOR EAX,EAX LAB_00165206: MOVSD XMM0,qword ptr [RSP + RAX*0x8 + 0x10] MOVSD XMM1,qword ptr [RSP + RAX*0x8 + 0x50] MOVSD XMM2,qword ptr [RSP + RAX*0x8 + 0x90] XOR ECX,ECX LAB_0016521d: MOVSD XMM3,qword ptr [RSP + RCX*0x1 + 0xb0] MULSD XMM3,XMM0 MOVSD qword ptr [R15 + RCX*0x1],XMM3 MOVSD XMM3,qword ptr [RSP + RCX*0x1 + 0x70] MULSD XMM3,XMM1 MOVSD qword ptr [R14 + RCX*0x1],XMM3 MOVSD XMM3,qword ptr [RSP + RCX*0x1 + 0x30] MULSD XMM3,XMM2 MOVSD qword ptr [RBX + RCX*0x1],XMM3 ADD RCX,0x8 CMP RCX,0x20 JNZ 0x0016521d INC RAX ADD RBX,0x20 ADD R14,0x20 ADD R15,0x20 CMP RAX,0x4 JNZ 0x00165206 LAB_0016526e: MOV EAX,0x10 ADD RSP,0xd8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<double>(double, double, double*, double*, double*, double*, double*, double*) */ int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<double> (double param_1,double param_2,double *param_3,double *param_4,double *param_5, double *param_6,double *param_7,double *param_8) { double dVar1; double dVar2; double dVar3; double *pdVar4; long lVar5; long lVar6; double *pdVar7; double *pdVar8; double *pdVar9; double local_f8 [4]; double local_d8 [4]; double local_b8 [4]; double local_98 [4]; double local_78 [4]; double local_58 [5]; pdVar8 = local_98; if (param_4 == (double *)0x0) { pdVar8 = (double *)0x0; } pdVar7 = local_58; if (param_6 == (double *)0x0) { pdVar7 = (double *)0x0; } pdVar9 = local_d8; if (param_3 == (double *)0x0) { pdVar9 = (double *)0x0; } pdVar4 = local_f8; if (param_3 == (double *)0x0) { pdVar4 = (double *)0x0; } (anonymous_namespace)::evalBezierCurve<double>(param_1,pdVar9,pdVar8,pdVar7); pdVar8 = local_b8; if (param_5 == (double *)0x0) { pdVar8 = (double *)0x0; } pdVar7 = local_78; if (param_8 == (double *)0x0) { pdVar7 = (double *)0x0; } (anonymous_namespace)::evalBezierCurve<double>(param_2,pdVar4,pdVar8,pdVar7); if (param_3 != (double *)0x0) { lVar5 = 0; do { dVar1 = local_f8[lVar5]; lVar6 = 0; do { param_3[lVar6] = local_d8[lVar6] * dVar1; lVar6 = lVar6 + 1; } while (lVar6 != 4); lVar5 = lVar5 + 1; param_3 = param_3 + 4; } while (lVar5 != 4); } if (param_4 != (double *)0x0 && param_5 != (double *)0x0) { lVar5 = 0; do { dVar1 = local_f8[lVar5]; dVar2 = local_b8[lVar5]; lVar6 = 0; do { param_4[lVar6] = local_98[lVar6] * dVar1; param_5[lVar6] = local_d8[lVar6] * dVar2; lVar6 = lVar6 + 1; } while (lVar6 != 4); lVar5 = lVar5 + 1; param_5 = param_5 + 4; param_4 = param_4 + 4; } while (lVar5 != 4); if ((param_7 != (double *)0x0 && param_6 != (double *)0x0) && param_8 != (double *)0x0) { lVar5 = 0; do { dVar1 = local_f8[lVar5]; dVar2 = local_b8[lVar5]; dVar3 = local_78[lVar5]; lVar6 = 0; do { *(double *)((long)param_6 + lVar6) = *(double *)((long)local_58 + lVar6) * dVar1; *(double *)((long)param_7 + lVar6) = *(double *)((long)local_98 + lVar6) * dVar2; *(double *)((long)param_8 + lVar6) = *(double *)((long)local_d8 + lVar6) * dVar3; lVar6 = lVar6 + 8; } while (lVar6 != 0x20); lVar5 = lVar5 + 1; param_8 = param_8 + 4; param_7 = param_7 + 4; param_6 = param_6 + 4; } while (lVar5 != 4); } } return 0x10; }
44,932
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>(float, float, float*, float*, float*, float*, float*, float*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBasis.cpp
int EvalBasisBezier(REAL s, REAL t, REAL wP[16], REAL wDs[16], REAL wDt[16], REAL wDss[16], REAL wDst[16], REAL wDtt[16]) { REAL sWeights[4], tWeights[4], dsWeights[4], dtWeights[4], dssWeights[4], dttWeights[4]; evalBezierCurve(s, wP ? sWeights : 0, wDs ? dsWeights : 0, wDss ? dssWeights : 0); evalBezierCurve(t, wP ? tWeights : 0, wDt ? dtWeights : 0, wDtt ? dttWeights : 0); if (wP) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wP[4*i+j] = sWeights[j] * tWeights[i]; } } } if (wDs && wDt) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wDs[4*i+j] = dsWeights[j] * tWeights[i]; wDt[4*i+j] = sWeights[j] * dtWeights[i]; } } if (wDss && wDst && wDtt) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wDss[4*i+j] = dssWeights[j] * tWeights[i]; wDst[4*i+j] = dsWeights[j] * dtWeights[i]; wDtt[4*i+j] = sWeights[j] * dttWeights[i]; } } } } return 16; }
O2
cpp
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>(float, float, float*, float*, float*, float*, float*, float*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %r9, %rbx movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbp movss %xmm1, 0xc(%rsp) testq %rsi, %rsi leaq 0x50(%rsp), %rsi cmoveq %r13, %rsi testq %rcx, %rcx leaq 0x70(%rsp), %rdx cmoveq %rcx, %rdx testq %rdi, %rdi leaq 0x20(%rsp), %rdi cmoveq %rbp, %rdi leaq 0x10(%rsp), %rax cmoveq %rbp, %rax movq %rax, 0x38(%rsp) callq 0x71990 testq %r12, %r12 leaq 0x40(%rsp), %rsi cmoveq %r12, %rsi testq %rbx, %rbx leaq 0x60(%rsp), %rdx cmoveq %rbx, %rdx movss 0xc(%rsp), %xmm0 movq 0x38(%rsp), %rdi callq 0x71990 testq %rbp, %rbp je 0x77fdf xorl %eax, %eax cmpq $0x4, %rax je 0x77fdf movss 0x10(%rsp,%rax,4), %xmm0 xorl %ecx, %ecx cmpq $0x4, %rcx je 0x77fd6 movss 0x20(%rsp,%rcx,4), %xmm1 mulss %xmm0, %xmm1 movss %xmm1, (%rbp,%rcx,4) incq %rcx jmp 0x77fbb incq %rax addq $0x10, %rbp jmp 0x77fad testq %r12, %r12 sete %al testq %r13, %r13 sete %cl orb %al, %cl jne 0x780c2 xorl %eax, %eax cmpq $0x4, %rax je 0x78042 movss 0x10(%rsp,%rax,4), %xmm0 movss 0x40(%rsp,%rax,4), %xmm1 xorl %ecx, %ecx cmpq $0x4, %rcx je 0x78035 movss 0x50(%rsp,%rcx,4), %xmm2 mulss %xmm0, %xmm2 movss %xmm2, (%r13,%rcx,4) movss 0x20(%rsp,%rcx,4), %xmm2 mulss %xmm1, %xmm2 movss %xmm2, (%r12,%rcx,4) incq %rcx jmp 0x78009 incq %rax addq $0x10, %r12 addq $0x10, %r13 jmp 0x77ff5 testq %rbx, %rbx sete %al testq %r15, %r15 sete %cl testq %r14, %r14 sete %dl orb %cl, %dl orb %al, %dl jne 0x780c2 xorl %eax, %eax cmpq $0x4, %rax je 0x780c2 movss 0x10(%rsp,%rax,4), %xmm0 movss 0x40(%rsp,%rax,4), %xmm1 movss 0x60(%rsp,%rax,4), %xmm2 xorl %ecx, %ecx cmpq $0x10, %rcx je 0x780b1 movss 0x70(%rsp,%rcx), %xmm3 mulss %xmm0, %xmm3 movss %xmm3, (%r15,%rcx) movss 0x50(%rsp,%rcx), %xmm3 mulss %xmm1, %xmm3 movss %xmm3, (%r14,%rcx) movss 0x20(%rsp,%rcx), %xmm3 mulss %xmm2, %xmm3 movss %xmm3, (%rbx,%rcx) addq $0x4, %rcx jmp 0x78076 incq %rax addq $0x10, %rbx addq $0x10, %r14 addq $0x10, %r15 jmp 0x7805c pushq $0x10 popq %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Far8internal15EvalBasisBezierIfEEiT_S4_PS4_S5_S5_S5_S5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov rbx, r9 mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbp, rdi movss [rsp+0B8h+var_AC], xmm1 test rsi, rsi lea rsi, [rsp+0B8h+var_68] cmovz rsi, r13 test rcx, rcx lea rdx, [rsp+0B8h+var_48] cmovz rdx, rcx test rdi, rdi lea rdi, [rsp+0B8h+var_98] cmovz rdi, rbp lea rax, [rsp+0B8h+var_A8] cmovz rax, rbp mov [rsp+0B8h+var_80], rax call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_115evalBezierCurveIfEEvT_PS5_S6_S6_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<float>(float,float*,float*,float*) test r12, r12 lea rsi, [rsp+0B8h+var_78] cmovz rsi, r12 test rbx, rbx lea rdx, [rsp+0B8h+var_58] cmovz rdx, rbx movss xmm0, [rsp+0B8h+var_AC] mov rdi, [rsp+0B8h+var_80] call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_115evalBezierCurveIfEEvT_PS5_S6_S6_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<float>(float,float*,float*,float*) test rbp, rbp jz short loc_77FDF xor eax, eax loc_77FAD: cmp rax, 4 jz short loc_77FDF movss xmm0, [rsp+rax*4+0B8h+var_A8] xor ecx, ecx loc_77FBB: cmp rcx, 4 jz short loc_77FD6 movss xmm1, [rsp+rcx*4+0B8h+var_98] mulss xmm1, xmm0 movss dword ptr [rbp+rcx*4+0], xmm1 inc rcx jmp short loc_77FBB loc_77FD6: inc rax add rbp, 10h jmp short loc_77FAD loc_77FDF: test r12, r12 setz al test r13, r13 setz cl or cl, al jnz loc_780C2 xor eax, eax loc_77FF5: cmp rax, 4 jz short loc_78042 movss xmm0, [rsp+rax*4+0B8h+var_A8] movss xmm1, [rsp+rax*4+0B8h+var_78] xor ecx, ecx loc_78009: cmp rcx, 4 jz short loc_78035 movss xmm2, [rsp+rcx*4+0B8h+var_68] mulss xmm2, xmm0 movss dword ptr [r13+rcx*4+0], xmm2 movss xmm2, [rsp+rcx*4+0B8h+var_98] mulss xmm2, xmm1 movss dword ptr [r12+rcx*4], xmm2 inc rcx jmp short loc_78009 loc_78035: inc rax add r12, 10h add r13, 10h jmp short loc_77FF5 loc_78042: test rbx, rbx setz al test r15, r15 setz cl test r14, r14 setz dl or dl, cl or dl, al jnz short loc_780C2 xor eax, eax loc_7805C: cmp rax, 4 jz short loc_780C2 movss xmm0, [rsp+rax*4+0B8h+var_A8] movss xmm1, [rsp+rax*4+0B8h+var_78] movss xmm2, [rsp+rax*4+0B8h+var_58] xor ecx, ecx loc_78076: cmp rcx, 10h jz short loc_780B1 movss xmm3, [rsp+rcx+0B8h+var_48] mulss xmm3, xmm0 movss dword ptr [r15+rcx], xmm3 movss xmm3, [rsp+rcx+0B8h+var_68] mulss xmm3, xmm1 movss dword ptr [r14+rcx], xmm3 movss xmm3, [rsp+rcx+0B8h+var_98] mulss xmm3, xmm2 movss dword ptr [rbx+rcx], xmm3 add rcx, 4 jmp short loc_78076 loc_780B1: inc rax add rbx, 10h add r14, 10h add r15, 10h jmp short loc_7805C loc_780C2: push 10h pop rax add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>( __m128 *a1, float *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, float a8) { long long v10; // r15 float *v12; // r13 __m128 *v13; // rbp float *v14; // rsi _DWORD *v15; // rdx bool v16; // zf __m128 *v17; // rdi __m128 *v18; // rax float *v19; // rsi float *v20; // rdx long long i; // rax float v22; // xmm0_4 long long j; // rcx long long k; // rax float v25; // xmm0_4 float v26; // xmm1_4 long long m; // rcx long long v28; // rax float v29; // xmm0_4 float v30; // xmm1_4 float v31; // xmm2_4 long long n; // rcx float v34[4]; // [rsp+10h] [rbp-A8h] BYREF float v35[6]; // [rsp+20h] [rbp-98h] BYREF __m128 *v36; // [rsp+38h] [rbp-80h] float v37[4]; // [rsp+40h] [rbp-78h] BYREF float v38[4]; // [rsp+50h] [rbp-68h] BYREF float v39[4]; // [rsp+60h] [rbp-58h] BYREF _DWORD v40[18]; // [rsp+70h] [rbp-48h] BYREF v10 = a4; v12 = a2; v13 = a1; v16 = a2 == 0LL; v14 = v38; if ( v16 ) v14 = v12; v15 = v40; if ( !a4 ) v15 = 0LL; v16 = a1 == 0LL; v17 = (__m128 *)v35; if ( v16 ) v17 = v13; v18 = (__m128 *)v34; if ( v16 ) v18 = v13; v36 = v18; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<float>(v17, v14, (long long)v15, a7); v19 = v37; if ( !a3 ) v19 = 0LL; v20 = v39; if ( !a6 ) v20 = 0LL; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<float>( v36, v19, (long long)v20, (__m128)LODWORD(a8)); if ( v13 ) { for ( i = 0LL; i != 4; ++i ) { v22 = v34[i]; for ( j = 0LL; j != 4; ++j ) v13->m128_f32[j] = v35[j] * v22; ++v13; } } if ( a3 != 0 && v12 != 0LL ) { for ( k = 0LL; k != 4; ++k ) { v25 = v34[k]; v26 = v37[k]; for ( m = 0LL; m != 4; ++m ) { v12[m] = v38[m] * v25; *(float *)(a3 + 4 * m) = v35[m] * v26; } a3 += 16LL; v12 += 4; } if ( a6 != 0 && v10 != 0 && a5 != 0 ) { v28 = 0LL; while ( v28 != 4 ) { v29 = v34[v28]; v30 = v37[v28]; v31 = v39[v28]; for ( n = 0LL; n != 4; ++n ) { *(float *)(v10 + n * 4) = *(float *)&v40[n] * v29; *(float *)(a5 + n * 4) = v38[n] * v30; *(float *)(a6 + n * 4) = v35[n] * v31; } ++v28; a6 += 16LL; a5 += 16LL; v10 += 16LL; } } } return 16LL; }
EvalBasisBezier<float>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV RBX,R9 MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBP,RDI MOVSS dword ptr [RSP + 0xc],XMM1 TEST RSI,RSI LEA RSI,[RSP + 0x50] CMOVZ RSI,R13 TEST RCX,RCX LEA RDX,[RSP + 0x70] CMOVZ RDX,RCX TEST RDI,RDI LEA RDI,[RSP + 0x20] CMOVZ RDI,RBP LEA RAX,[RSP + 0x10] CMOVZ RAX,RBP MOV qword ptr [RSP + 0x38],RAX CALL 0x00171990 TEST R12,R12 LEA RSI,[RSP + 0x40] CMOVZ RSI,R12 TEST RBX,RBX LEA RDX,[RSP + 0x60] CMOVZ RDX,RBX MOVSS XMM0,dword ptr [RSP + 0xc] MOV RDI,qword ptr [RSP + 0x38] CALL 0x00171990 TEST RBP,RBP JZ 0x00177fdf XOR EAX,EAX LAB_00177fad: CMP RAX,0x4 JZ 0x00177fdf MOVSS XMM0,dword ptr [RSP + RAX*0x4 + 0x10] XOR ECX,ECX LAB_00177fbb: CMP RCX,0x4 JZ 0x00177fd6 MOVSS XMM1,dword ptr [RSP + RCX*0x4 + 0x20] MULSS XMM1,XMM0 MOVSS dword ptr [RBP + RCX*0x4],XMM1 INC RCX JMP 0x00177fbb LAB_00177fd6: INC RAX ADD RBP,0x10 JMP 0x00177fad LAB_00177fdf: TEST R12,R12 SETZ AL TEST R13,R13 SETZ CL OR CL,AL JNZ 0x001780c2 XOR EAX,EAX LAB_00177ff5: CMP RAX,0x4 JZ 0x00178042 MOVSS XMM0,dword ptr [RSP + RAX*0x4 + 0x10] MOVSS XMM1,dword ptr [RSP + RAX*0x4 + 0x40] XOR ECX,ECX LAB_00178009: CMP RCX,0x4 JZ 0x00178035 MOVSS XMM2,dword ptr [RSP + RCX*0x4 + 0x50] MULSS XMM2,XMM0 MOVSS dword ptr [R13 + RCX*0x4],XMM2 MOVSS XMM2,dword ptr [RSP + RCX*0x4 + 0x20] MULSS XMM2,XMM1 MOVSS dword ptr [R12 + RCX*0x4],XMM2 INC RCX JMP 0x00178009 LAB_00178035: INC RAX ADD R12,0x10 ADD R13,0x10 JMP 0x00177ff5 LAB_00178042: TEST RBX,RBX SETZ AL TEST R15,R15 SETZ CL TEST R14,R14 SETZ DL OR DL,CL OR DL,AL JNZ 0x001780c2 XOR EAX,EAX LAB_0017805c: CMP RAX,0x4 JZ 0x001780c2 MOVSS XMM0,dword ptr [RSP + RAX*0x4 + 0x10] MOVSS XMM1,dword ptr [RSP + RAX*0x4 + 0x40] MOVSS XMM2,dword ptr [RSP + RAX*0x4 + 0x60] XOR ECX,ECX LAB_00178076: CMP RCX,0x10 JZ 0x001780b1 MOVSS XMM3,dword ptr [RSP + RCX*0x1 + 0x70] MULSS XMM3,XMM0 MOVSS dword ptr [R15 + RCX*0x1],XMM3 MOVSS XMM3,dword ptr [RSP + RCX*0x1 + 0x50] MULSS XMM3,XMM1 MOVSS dword ptr [R14 + RCX*0x1],XMM3 MOVSS XMM3,dword ptr [RSP + RCX*0x1 + 0x20] MULSS XMM3,XMM2 MOVSS dword ptr [RBX + RCX*0x1],XMM3 ADD RCX,0x4 JMP 0x00178076 LAB_001780b1: INC RAX ADD RBX,0x10 ADD R14,0x10 ADD R15,0x10 JMP 0x0017805c LAB_001780c2: PUSH 0x10 POP RAX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>(float, float, float*, float*, float*, float*, float*, float*) */ int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float> (float param_1,float param_2,float *param_3,float *param_4,float *param_5, float *param_6,float *param_7,float *param_8) { float fVar1; float fVar2; float fVar3; long lVar4; long lVar5; float *pfVar6; float *pfVar7; float *pfVar8; float local_a8 [4]; float local_98 [6]; float *local_80; float local_78 [4]; float local_68 [4]; float local_58 [4]; float local_48 [6]; pfVar7 = local_68; if (param_4 == (float *)0x0) { pfVar7 = (float *)0x0; } pfVar6 = local_48; if (param_6 == (float *)0x0) { pfVar6 = (float *)0x0; } pfVar8 = local_98; if (param_3 == (float *)0x0) { pfVar8 = (float *)0x0; } local_80 = local_a8; if (param_3 == (float *)0x0) { local_80 = (float *)0x0; } (anonymous_namespace)::evalBezierCurve<float>(param_1,pfVar8,pfVar7,pfVar6); pfVar7 = local_78; if (param_5 == (float *)0x0) { pfVar7 = (float *)0x0; } pfVar6 = local_58; if (param_8 == (float *)0x0) { pfVar6 = (float *)0x0; } (anonymous_namespace)::evalBezierCurve<float>(param_2,local_80,pfVar7,pfVar6); if (param_3 != (float *)0x0) { for (lVar4 = 0; lVar4 != 4; lVar4 = lVar4 + 1) { fVar1 = local_a8[lVar4]; for (lVar5 = 0; lVar5 != 4; lVar5 = lVar5 + 1) { param_3[lVar5] = local_98[lVar5] * fVar1; } param_3 = param_3 + 4; } } if (param_4 != (float *)0x0 && param_5 != (float *)0x0) { for (lVar4 = 0; lVar4 != 4; lVar4 = lVar4 + 1) { fVar1 = local_a8[lVar4]; fVar2 = local_78[lVar4]; for (lVar5 = 0; lVar5 != 4; lVar5 = lVar5 + 1) { param_4[lVar5] = local_68[lVar5] * fVar1; param_5[lVar5] = local_98[lVar5] * fVar2; } param_5 = param_5 + 4; param_4 = param_4 + 4; } if ((param_7 != (float *)0x0 && param_6 != (float *)0x0) && param_8 != (float *)0x0) { for (lVar4 = 0; lVar4 != 4; lVar4 = lVar4 + 1) { fVar1 = local_a8[lVar4]; fVar2 = local_78[lVar4]; fVar3 = local_58[lVar4]; for (lVar5 = 0; lVar5 != 0x10; lVar5 = lVar5 + 4) { *(float *)((long)param_6 + lVar5) = *(float *)((long)local_48 + lVar5) * fVar1; *(float *)((long)param_7 + lVar5) = *(float *)((long)local_68 + lVar5) * fVar2; *(float *)((long)param_8 + lVar5) = *(float *)((long)local_98 + lVar5) * fVar3; } param_8 = param_8 + 4; param_7 = param_7 + 4; param_6 = param_6 + 4; } } } return 0x10; }
44,933
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>(float, float, float*, float*, float*, float*, float*, float*)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBasis.cpp
int EvalBasisBezier(REAL s, REAL t, REAL wP[16], REAL wDs[16], REAL wDt[16], REAL wDss[16], REAL wDst[16], REAL wDtt[16]) { REAL sWeights[4], tWeights[4], dsWeights[4], dtWeights[4], dssWeights[4], dttWeights[4]; evalBezierCurve(s, wP ? sWeights : 0, wDs ? dsWeights : 0, wDss ? dssWeights : 0); evalBezierCurve(t, wP ? tWeights : 0, wDt ? dtWeights : 0, wDtt ? dttWeights : 0); if (wP) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wP[4*i+j] = sWeights[j] * tWeights[i]; } } } if (wDs && wDt) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wDs[4*i+j] = dsWeights[j] * tWeights[i]; wDt[4*i+j] = sWeights[j] * dtWeights[i]; } } if (wDss && wDst && wDtt) { for (int i = 0; i < 4; ++i) { for (int j = 0; j < 4; ++j) { wDss[4*i+j] = dssWeights[j] * tWeights[i]; wDst[4*i+j] = dsWeights[j] * dtWeights[i]; wDtt[4*i+j] = sWeights[j] * dttWeights[i]; } } } } return 16; }
O3
cpp
int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<float>(float, float, float*, float*, float*, float*, float*, float*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xd8, %rsp movq %r9, %rbx movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbp movsd %xmm1, 0x8(%rsp) testq %rsi, %rsi leaq 0x70(%rsp), %rsi cmoveq %r13, %rsi testq %rcx, %rcx leaq 0xb0(%rsp), %rdx cmoveq %rcx, %rdx testq %rdi, %rdi leaq 0x30(%rsp), %rdi cmoveq %rbp, %rdi leaq 0x10(%rsp), %rax cmoveq %rbp, %rax movq %rax, (%rsp) callq 0x5f9ed testq %r12, %r12 leaq 0x50(%rsp), %rsi cmoveq %r12, %rsi testq %rbx, %rbx leaq 0x90(%rsp), %rdx cmoveq %rbx, %rdx movsd 0x8(%rsp), %xmm0 movq (%rsp), %rdi callq 0x5f9ed testq %rbp, %rbp je 0x66721 xorl %eax, %eax movsd 0x10(%rsp,%rax,8), %xmm0 unpcklpd %xmm0, %xmm0 # xmm0 = xmm0[0,0] xorl %ecx, %ecx movapd 0x30(%rsp,%rcx,8), %xmm1 mulpd %xmm0, %xmm1 movupd %xmm1, (%rbp,%rcx,8) addq $0x2, %rcx cmpq $0x4, %rcx jne 0x666fa incq %rax addq $0x20, %rbp cmpq $0x4, %rax jne 0x666ee testq %r12, %r12 sete %al testq %r13, %r13 sete %cl orb %al, %cl jne 0x66802 xorl %eax, %eax movsd 0x10(%rsp,%rax,8), %xmm0 movsd 0x50(%rsp,%rax,8), %xmm1 xorl %ecx, %ecx movsd 0x70(%rsp,%rcx,8), %xmm2 mulsd %xmm0, %xmm2 movsd %xmm2, (%r13,%rcx,8) movsd 0x30(%rsp,%rcx,8), %xmm2 mulsd %xmm1, %xmm2 movsd %xmm2, (%r12,%rcx,8) incq %rcx cmpq $0x4, %rcx jne 0x66745 incq %rax addq $0x20, %r12 addq $0x20, %r13 cmpq $0x4, %rax jne 0x66737 testq %rbx, %rbx sete %al testq %r15, %r15 sete %cl testq %r14, %r14 sete %dl orb %cl, %dl orb %al, %dl jne 0x66802 xorl %eax, %eax movsd 0x10(%rsp,%rax,8), %xmm0 movsd 0x50(%rsp,%rax,8), %xmm1 movsd 0x90(%rsp,%rax,8), %xmm2 xorl %ecx, %ecx movsd 0xb0(%rsp,%rcx), %xmm3 mulsd %xmm0, %xmm3 movsd %xmm3, (%r15,%rcx) movsd 0x70(%rsp,%rcx), %xmm3 mulsd %xmm1, %xmm3 movsd %xmm3, (%r14,%rcx) movsd 0x30(%rsp,%rcx), %xmm3 mulsd %xmm2, %xmm3 movsd %xmm3, (%rbx,%rcx) addq $0x8, %rcx cmpq $0x20, %rcx jne 0x667b1 incq %rax addq $0x20, %rbx addq $0x20, %r14 addq $0x20, %r15 cmpq $0x4, %rax jne 0x6679a movl $0x10, %eax addq $0xd8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Far8internal15EvalBasisBezierIdEEiT_S4_PS4_S5_S5_S5_S5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0D8h mov rbx, r9 mov r14, r8 mov r15, rcx mov r12, rdx mov r13, rsi mov rbp, rdi movsd [rsp+108h+var_100], xmm1 test rsi, rsi lea rsi, [rsp+108h+var_98] cmovz rsi, r13 test rcx, rcx lea rdx, [rsp+108h+var_58] cmovz rdx, rcx test rdi, rdi lea rdi, [rsp+108h+var_D8] cmovz rdi, rbp lea rax, [rsp+108h+var_F8] cmovz rax, rbp mov [rsp+108h+var_108], rax call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_115evalBezierCurveIdEEvT_PS5_S6_S6_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<double>(double,double*,double*,double*) test r12, r12 lea rsi, [rsp+108h+var_B8] cmovz rsi, r12 test rbx, rbx lea rdx, [rsp+108h+var_78] cmovz rdx, rbx movsd xmm0, [rsp+108h+var_100] mov rdi, [rsp+108h+var_108] call _ZN10OpenSubdiv6v3_6_03Far8internal12_GLOBAL__N_115evalBezierCurveIdEEvT_PS5_S6_S6_; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<double>(double,double*,double*,double*) test rbp, rbp jz short loc_66721 xor eax, eax loc_666EE: movsd xmm0, [rsp+rax*8+108h+var_F8] unpcklpd xmm0, xmm0 xor ecx, ecx loc_666FA: movapd xmm1, [rsp+rcx*8+108h+var_D8] mulpd xmm1, xmm0 movupd xmmword ptr [rbp+rcx*8+0], xmm1 add rcx, 2 cmp rcx, 4 jnz short loc_666FA inc rax add rbp, 20h ; ' ' cmp rax, 4 jnz short loc_666EE loc_66721: test r12, r12 setz al test r13, r13 setz cl or cl, al jnz loc_66802 xor eax, eax loc_66737: movsd xmm0, [rsp+rax*8+108h+var_F8] movsd xmm1, [rsp+rax*8+108h+var_B8] xor ecx, ecx loc_66745: movsd xmm2, [rsp+rcx*8+108h+var_98] mulsd xmm2, xmm0 movsd qword ptr [r13+rcx*8+0], xmm2 movsd xmm2, qword ptr [rsp+rcx*8+108h+var_D8] mulsd xmm2, xmm1 movsd qword ptr [r12+rcx*8], xmm2 inc rcx cmp rcx, 4 jnz short loc_66745 inc rax add r12, 20h ; ' ' add r13, 20h ; ' ' cmp rax, 4 jnz short loc_66737 test rbx, rbx setz al test r15, r15 setz cl test r14, r14 setz dl or dl, cl or dl, al jnz short loc_66802 xor eax, eax loc_6679A: movsd xmm0, [rsp+rax*8+108h+var_F8] movsd xmm1, [rsp+rax*8+108h+var_B8] movsd xmm2, [rsp+rax*8+108h+var_78] xor ecx, ecx loc_667B1: movsd xmm3, [rsp+rcx+108h+var_58] mulsd xmm3, xmm0 movsd qword ptr [r15+rcx], xmm3 movsd xmm3, [rsp+rcx+108h+var_98] mulsd xmm3, xmm1 movsd qword ptr [r14+rcx], xmm3 movsd xmm3, qword ptr [rsp+rcx+108h+var_D8] mulsd xmm3, xmm2 movsd qword ptr [rbx+rcx], xmm3 add rcx, 8 cmp rcx, 20h ; ' ' jnz short loc_667B1 inc rax add rbx, 20h ; ' ' add r14, 20h ; ' ' add r15, 20h ; ' ' cmp rax, 4 jnz short loc_6679A loc_66802: mov eax, 10h add rsp, 0D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<double>( __m128d *a1, double *a2, long long a3, long long a4, long long a5, long long a6, __m128d a7, double a8) { long long v10; // r15 double *v12; // r13 __m128d *v13; // rbp double *v14; // rsi _QWORD *v15; // rdx bool v16; // zf __m128d *v17; // rdi __m128d *v18; // rax double *v19; // rsi double *v20; // rdx long long i; // rax __m128d v22; // xmm0 long long j; // rcx long long k; // rax double v25; // xmm0_8 double v26; // xmm1_8 long long m; // rcx long long v28; // rax double v29; // xmm0_8 double v30; // xmm1_8 double v31; // xmm2_8 long long n; // rcx __m128d *v34; // [rsp+0h] [rbp-108h] double v35[4]; // [rsp+10h] [rbp-F8h] BYREF double v36[4]; // [rsp+30h] [rbp-D8h] BYREF double v37[4]; // [rsp+50h] [rbp-B8h] BYREF double v38[4]; // [rsp+70h] [rbp-98h] BYREF double v39[4]; // [rsp+90h] [rbp-78h] BYREF _QWORD v40[11]; // [rsp+B0h] [rbp-58h] BYREF v10 = a4; v12 = a2; v13 = a1; v16 = a2 == 0LL; v14 = v38; if ( v16 ) v14 = v12; v15 = v40; if ( !a4 ) v15 = 0LL; v16 = a1 == 0LL; v17 = (__m128d *)v36; if ( v16 ) v17 = v13; v18 = (__m128d *)v35; if ( v16 ) v18 = v13; v34 = v18; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<double>(v17, v14, (long long)v15, a7); v19 = v37; if ( !a3 ) v19 = 0LL; v20 = v39; if ( !a6 ) v20 = 0LL; OpenSubdiv::v3_6_0::Far::internal::`anonymous namespace'::evalBezierCurve<double>( v34, v19, (long long)v20, (__m128d)*(unsigned long long *)&a8); if ( v13 ) { for ( i = 0LL; i != 4; ++i ) { v22 = _mm_unpacklo_pd((__m128d)*(unsigned long long *)&v35[i], (__m128d)*(unsigned long long *)&v35[i]); for ( j = 0LL; j != 2; ++j ) v13[j] = _mm_mul_pd(*(__m128d *)&v36[j * 2], v22); v13 += 2; } } if ( a3 != 0 && v12 != 0LL ) { for ( k = 0LL; k != 4; ++k ) { v25 = v35[k]; v26 = v37[k]; for ( m = 0LL; m != 4; ++m ) { v12[m] = v38[m] * v25; *(double *)(a3 + 8 * m) = v36[m] * v26; } a3 += 32LL; v12 += 4; } if ( a6 != 0 && v10 != 0 && a5 != 0 ) { v28 = 0LL; do { v29 = v35[v28]; v30 = v37[v28]; v31 = v39[v28]; for ( n = 0LL; n != 4; ++n ) { *(double *)(v10 + n * 8) = *(double *)&v40[n] * v29; *(double *)(a5 + n * 8) = v38[n] * v30; *(double *)(a6 + n * 8) = v36[n] * v31; } ++v28; a6 += 32LL; a5 += 32LL; v10 += 32LL; } while ( v28 != 4 ); } } return 16LL; }
EvalBasisBezier<double>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xd8 MOV RBX,R9 MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBP,RDI MOVSD qword ptr [RSP + 0x8],XMM1 TEST RSI,RSI LEA RSI,[RSP + 0x70] CMOVZ RSI,R13 TEST RCX,RCX LEA RDX,[RSP + 0xb0] CMOVZ RDX,RCX TEST RDI,RDI LEA RDI,[RSP + 0x30] CMOVZ RDI,RBP LEA RAX,[RSP + 0x10] CMOVZ RAX,RBP MOV qword ptr [RSP],RAX CALL 0x0015f9ed TEST R12,R12 LEA RSI,[RSP + 0x50] CMOVZ RSI,R12 TEST RBX,RBX LEA RDX,[RSP + 0x90] CMOVZ RDX,RBX MOVSD XMM0,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP] CALL 0x0015f9ed TEST RBP,RBP JZ 0x00166721 XOR EAX,EAX LAB_001666ee: MOVSD XMM0,qword ptr [RSP + RAX*0x8 + 0x10] UNPCKLPD XMM0,XMM0 XOR ECX,ECX LAB_001666fa: MOVAPD XMM1,xmmword ptr [RSP + RCX*0x8 + 0x30] MULPD XMM1,XMM0 MOVUPD xmmword ptr [RBP + RCX*0x8],XMM1 ADD RCX,0x2 CMP RCX,0x4 JNZ 0x001666fa INC RAX ADD RBP,0x20 CMP RAX,0x4 JNZ 0x001666ee LAB_00166721: TEST R12,R12 SETZ AL TEST R13,R13 SETZ CL OR CL,AL JNZ 0x00166802 XOR EAX,EAX LAB_00166737: MOVSD XMM0,qword ptr [RSP + RAX*0x8 + 0x10] MOVSD XMM1,qword ptr [RSP + RAX*0x8 + 0x50] XOR ECX,ECX LAB_00166745: MOVSD XMM2,qword ptr [RSP + RCX*0x8 + 0x70] MULSD XMM2,XMM0 MOVSD qword ptr [R13 + RCX*0x8],XMM2 MOVSD XMM2,qword ptr [RSP + RCX*0x8 + 0x30] MULSD XMM2,XMM1 MOVSD qword ptr [R12 + RCX*0x8],XMM2 INC RCX CMP RCX,0x4 JNZ 0x00166745 INC RAX ADD R12,0x20 ADD R13,0x20 CMP RAX,0x4 JNZ 0x00166737 TEST RBX,RBX SETZ AL TEST R15,R15 SETZ CL TEST R14,R14 SETZ DL OR DL,CL OR DL,AL JNZ 0x00166802 XOR EAX,EAX LAB_0016679a: MOVSD XMM0,qword ptr [RSP + RAX*0x8 + 0x10] MOVSD XMM1,qword ptr [RSP + RAX*0x8 + 0x50] MOVSD XMM2,qword ptr [RSP + RAX*0x8 + 0x90] XOR ECX,ECX LAB_001667b1: MOVSD XMM3,qword ptr [RSP + RCX*0x1 + 0xb0] MULSD XMM3,XMM0 MOVSD qword ptr [R15 + RCX*0x1],XMM3 MOVSD XMM3,qword ptr [RSP + RCX*0x1 + 0x70] MULSD XMM3,XMM1 MOVSD qword ptr [R14 + RCX*0x1],XMM3 MOVSD XMM3,qword ptr [RSP + RCX*0x1 + 0x30] MULSD XMM3,XMM2 MOVSD qword ptr [RBX + RCX*0x1],XMM3 ADD RCX,0x8 CMP RCX,0x20 JNZ 0x001667b1 INC RAX ADD RBX,0x20 ADD R14,0x20 ADD R15,0x20 CMP RAX,0x4 JNZ 0x0016679a LAB_00166802: MOV EAX,0x10 ADD RSP,0xd8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<double>(double, double, double*, double*, double*, double*, double*, double*) */ int OpenSubdiv::v3_6_0::Far::internal::EvalBasisBezier<double> (double param_1,double param_2,double *param_3,double *param_4,double *param_5, double *param_6,double *param_7,double *param_8) { double dVar1; double dVar2; double dVar3; double *pdVar4; long lVar5; long lVar6; double *pdVar7; double *pdVar8; double *pdVar9; double local_f8 [4]; double local_d8 [4]; double local_b8 [4]; double local_98 [4]; double local_78 [4]; double local_58 [5]; pdVar8 = local_98; if (param_4 == (double *)0x0) { pdVar8 = (double *)0x0; } pdVar7 = local_58; if (param_6 == (double *)0x0) { pdVar7 = (double *)0x0; } pdVar9 = local_d8; if (param_3 == (double *)0x0) { pdVar9 = (double *)0x0; } pdVar4 = local_f8; if (param_3 == (double *)0x0) { pdVar4 = (double *)0x0; } (anonymous_namespace)::evalBezierCurve<double>(param_1,pdVar9,pdVar8,pdVar7); pdVar8 = local_d8 + 4; if (param_5 == (double *)0x0) { pdVar8 = (double *)0x0; } pdVar7 = local_78; if (param_8 == (double *)0x0) { pdVar7 = (double *)0x0; } (anonymous_namespace)::evalBezierCurve<double>(param_2,pdVar4,pdVar8,pdVar7); if (param_3 != (double *)0x0) { lVar5 = 0; do { dVar1 = local_f8[lVar5]; lVar6 = 0; do { dVar2 = local_d8[lVar6 + 1]; param_3[lVar6] = local_d8[lVar6] * dVar1; (param_3 + lVar6)[1] = dVar2 * dVar1; lVar6 = lVar6 + 2; } while (lVar6 != 4); lVar5 = lVar5 + 1; param_3 = param_3 + 4; } while (lVar5 != 4); } if (param_4 != (double *)0x0 && param_5 != (double *)0x0) { lVar5 = 0; do { dVar1 = local_f8[lVar5]; dVar2 = local_d8[lVar5 + 4]; lVar6 = 0; do { param_4[lVar6] = local_98[lVar6] * dVar1; param_5[lVar6] = local_d8[lVar6] * dVar2; lVar6 = lVar6 + 1; } while (lVar6 != 4); lVar5 = lVar5 + 1; param_5 = param_5 + 4; param_4 = param_4 + 4; } while (lVar5 != 4); if ((param_7 != (double *)0x0 && param_6 != (double *)0x0) && param_8 != (double *)0x0) { lVar5 = 0; do { dVar1 = local_f8[lVar5]; dVar2 = local_d8[lVar5 + 4]; dVar3 = local_78[lVar5]; lVar6 = 0; do { *(double *)((long)param_6 + lVar6) = *(double *)((long)local_58 + lVar6) * dVar1; *(double *)((long)param_7 + lVar6) = *(double *)((long)local_98 + lVar6) * dVar2; *(double *)((long)param_8 + lVar6) = *(double *)((long)local_d8 + lVar6) * dVar3; lVar6 = lVar6 + 8; } while (lVar6 != 0x20); lVar5 = lVar5 + 1; param_8 = param_8 + 4; param_7 = param_7 + 4; param_6 = param_6 + 4; } while (lVar5 != 4); } } return 0x10; }
44,934
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>)
monkey531[P]llama/common/json.hpp
iterator erase(iterator first, iterator last) { if (first == last) { return first; } const auto elements_affected = std::distance(first, last); const auto offset = std::distance(Container::begin(), first); // This is the start situation. We need to delete elements_affected // elements (3 in this example: e, f, g), and need to return an // iterator past the last deleted element (h in this example). // Note that offset is the distance from the start of the vector // to first. We will need this later. // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // first last // Since we cannot move const Keys, we re-construct them in place. // We start at first and re-construct (viz. copy) the elements from // the back of the vector. Example for first iteration: // ,--------. // v | destroy e and re-construct with h // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // it it + elements_affected for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it } // [ a, b, c, d, h, i, j, h, i, j ] // ^ ^ // first last // remove the unneeded elements at the end of the vector Container::resize(this->size() - static_cast<size_type>(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ // first last // first is now pointing past the last deleted element, but we cannot // use this iterator, because it may have been invalidated by the // resize call. Instead, we can return begin() + offset. return Container::begin() + offset; }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpq %rdx, %rsi je 0x72a03 movq %rdi, %r14 subq %rbx, %rdx pushq $0x60 popq %rcx movq %rdx, %rax cqto idivq %rcx movq %rax, %r15 movq (%rdi), %rax movq %rax, (%rsp) imulq $0x60, %r15, %r13 addq %rbx, %r13 movq %r13, %r12 negq %r12 movq %rbx, %rbp cmpq 0x8(%r14), %r13 je 0x729dd movq %rbp, %rdi callq 0x6c95e movq %rbp, %rdi movq %r13, %rsi callq 0x72a16 addq $0x60, %rbp addq $0x60, %r13 addq $-0x60, %r12 jmp 0x729b6 subq (%rsp), %rbx addq (%r14), %r12 negq %r12 movq %r12, %rax cqto pushq $0x60 popq %rcx idivq %rcx subq %r15, %rax movq %r14, %rdi movq %rax, %rsi callq 0x72a40 addq (%r14), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp rsi, rdx jz short loc_72A03 mov r14, rdi sub rdx, rbx push 60h ; '`' pop rcx mov rax, rdx cqo idiv rcx mov r15, rax mov rax, [rdi] mov [rsp+38h+var_38], rax imul r13, r15, 60h ; '`' add r13, rbx mov r12, r13 neg r12 mov rbp, rbx loc_729B6: cmp r13, [r14+8] jz short loc_729DD mov rdi, rbp call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::~pair() mov rdi, rbp mov rsi, r13 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&) add rbp, 60h ; '`' add r13, 60h ; '`' add r12, 0FFFFFFFFFFFFFFA0h jmp short loc_729B6 loc_729DD: sub rbx, [rsp+38h+var_38] add r12, [r14] neg r12 mov rax, r12 cqo push 60h ; '`' pop rcx idiv rcx sub rax, r15 mov rdi, r14 mov rsi, rax call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong) add rbx, [r14] loc_72A03: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( long long *a1, long long a2, long long a3) { long long v3; // rbx long long v4; // r15 long long v5; // r13 long long v6; // r12 long long v7; // rbp long long v9; // [rsp+0h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v4 = (a3 - a2) / 96; v9 = *a1; v5 = a2 + 96 * v4; v6 = -v5; v7 = a2; while ( v5 != a1[1] ) { std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::~pair(v7); std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair( v7, v5); v7 += 96LL; v5 += 96LL; v6 -= 96LL; } std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize( a1, -(*a1 + v6) / 96 - v4, -(*a1 + v6) % 96); return *a1 + a2 - v9; } return v3; }
erase: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP RSI,RDX JZ 0x00172a03 MOV R14,RDI SUB RDX,RBX PUSH 0x60 POP RCX MOV RAX,RDX CQO IDIV RCX MOV R15,RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP],RAX IMUL R13,R15,0x60 ADD R13,RBX MOV R12,R13 NEG R12 MOV RBP,RBX LAB_001729b6: CMP R13,qword ptr [R14 + 0x8] JZ 0x001729dd MOV RDI,RBP CALL 0x0016c95e MOV RDI,RBP MOV RSI,R13 CALL 0x00172a16 ADD RBP,0x60 ADD R13,0x60 ADD R12,-0x60 JMP 0x001729b6 LAB_001729dd: SUB RBX,qword ptr [RSP] ADD R12,qword ptr [R14] NEG R12 MOV RAX,R12 CQO PUSH 0x60 POP RCX IDIV RCX SUB RAX,R15 MOV RDI,R14 MOV RSI,RAX CALL 0x00172a40 ADD RBX,qword ptr [R14] LAB_00172a03: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >) */ pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_2, pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *param_3) { long lVar1; long lVar2; pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> *this_00; long lVar3; pair *ppVar4; if (param_2 != param_3) { lVar2 = ((long)param_3 - (long)param_2) / 0x60; lVar1 = *(long *)this; ppVar4 = (pair *)(param_2 + lVar2 * 0x60); lVar3 = -(long)ppVar4; this_00 = param_2; for (; ppVar4 != *(pair **)(this + 8); ppVar4 = ppVar4 + 0x60) { std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::~pair(this_00); std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::pair(this_00,ppVar4); this_00 = this_00 + 0x60; lVar3 = lVar3 + -0x60; } std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)this,-(lVar3 + *(long *)this) / 0x60 - lVar2); param_2 = param_2 + (*(long *)this - lVar1); } return param_2; }
44,935
raise_to_z_div_by_2
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/pairing.c
static void raise_to_z_div_by_2(vec384fp12 ret, const vec384fp12 a) { cyclotomic_sqr_fp12(ret, a); /* 0x2 */ mul_n_sqr(ret, a, 2); /* ..0xc */ mul_n_sqr(ret, a, 3); /* ..0x68 */ mul_n_sqr(ret, a, 9); /* ..0xd200 */ mul_n_sqr(ret, a, 32); /* ..0xd20100000000 */ mul_n_sqr(ret, a, 16-1); /* ..0x6900800000008000 */ conjugate_fp12(ret); /* account for z being negative */ }
O3
c
raise_to_z_div_by_2: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx callq 0x1ebd1 movl $0x2, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x2875a movl $0x3, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x2875a movl $0x9, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x2875a movl $0x20, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x2875a movl $0xf, %edx movq %rbx, %rdi movq %r14, %rsi callq 0x2875a addq $0x120, %rbx # imm = 0x120 movq %rbx, %rdi movq %rbx, %rsi popq %rbx popq %r14 popq %rbp jmp 0x279e1
raise_to_z_div_by_2: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi call cyclotomic_sqr_fp12 mov edx, 2 mov rdi, rbx mov rsi, r14 call mul_n_sqr mov edx, 3 mov rdi, rbx mov rsi, r14 call mul_n_sqr mov edx, 9 mov rdi, rbx mov rsi, r14 call mul_n_sqr mov edx, 20h ; ' ' mov rdi, rbx mov rsi, r14 call mul_n_sqr mov edx, 0Fh mov rdi, rbx mov rsi, r14 call mul_n_sqr add rbx, 120h mov rdi, rbx mov rsi, rbx pop rbx pop r14 pop rbp jmp neg_fp6
long long raise_to_z_div_by_2(long long a1, long long a2) { cyclotomic_sqr_fp12(a1, a2); mul_n_sqr(a1, a2, 2LL); mul_n_sqr(a1, a2, 3LL); mul_n_sqr(a1, a2, 9LL); mul_n_sqr(a1, a2, 32LL); mul_n_sqr(a1, a2, 15LL); return neg_fp6(a1 + 288, a1 + 288); }
raise_to_z_div_by_2: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI CALL 0x0011ebd1 MOV EDX,0x2 MOV RDI,RBX MOV RSI,R14 CALL 0x0012875a MOV EDX,0x3 MOV RDI,RBX MOV RSI,R14 CALL 0x0012875a MOV EDX,0x9 MOV RDI,RBX MOV RSI,R14 CALL 0x0012875a MOV EDX,0x20 MOV RDI,RBX MOV RSI,R14 CALL 0x0012875a MOV EDX,0xf MOV RDI,RBX MOV RSI,R14 CALL 0x0012875a ADD RBX,0x120 MOV RDI,RBX MOV RSI,RBX POP RBX POP R14 POP RBP JMP 0x001279e1
void raise_to_z_div_by_2(long param_1,int8 param_2) { cyclotomic_sqr_fp12(); mul_n_sqr(param_1,param_2,2); mul_n_sqr(param_1,param_2,3); mul_n_sqr(param_1,param_2,9); mul_n_sqr(param_1,param_2,0x20); mul_n_sqr(param_1,param_2,0xf); neg_fp6(param_1 + 0x120,param_1 + 0x120); return; }
44,936
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 0x46636 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x467b3 movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0x46663 movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x467b3 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0x4667a movl $0x0, -0x4(%rbp) jmp 0x467b3 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0x466f0 movq -0x18(%rbp), %rax addq $0x2, %rax cmpq -0x20(%rbp), %rax jbe 0x4669f movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x467b3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x466bd movl $0x0, -0x4(%rbp) jmp 0x467b3 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 0x467b3 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x467a6 movq -0x18(%rbp), %rax addq $0x3, %rax cmpq -0x20(%rbp), %rax jbe 0x46719 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x467b3 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x46757 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x46757 movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0x46760 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x46760 movl $0x0, -0x4(%rbp) jmp 0x467b3 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 0x467b3 jmp 0x467a8 jmp 0x467aa jmp 0x467ac 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_46636 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_467B3 loc_46636: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_46663 movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_467B3 loc_46663: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_4667A mov [rbp+var_4], 0 jmp loc_467B3 loc_4667A: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_466F0 mov rax, [rbp+var_18] add rax, 2 cmp rax, [rbp+var_20] jbe short loc_4669F mov [rbp+var_4], 0FFFFFF9Ah jmp loc_467B3 loc_4669F: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_466BD mov [rbp+var_4], 0 jmp loc_467B3 loc_466BD: 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_467B3 loc_466F0: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_467A6 mov rax, [rbp+var_18] add rax, 3 cmp rax, [rbp+var_20] jbe short loc_46719 mov [rbp+var_4], 0FFFFFF99h jmp loc_467B3 loc_46719: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_46757 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_46757 movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_46760 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_46760 loc_46757: mov [rbp+var_4], 0 jmp short loc_467B3 loc_46760: 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_467B3 loc_467A6: jmp short $+2 loc_467A8: jmp short $+2 loc_467AA: jmp short $+2 loc_467AC: mov [rbp+var_4], 0 loc_467B3: 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 0x00146636 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x001467b3 LAB_00146636: 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 0x00146663 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 0x001467b3 LAB_00146663: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x0014667a MOV dword ptr [RBP + -0x4],0x0 JMP 0x001467b3 LAB_0014667a: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x001466f0 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0014669f MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001467b3 LAB_0014669f: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x001466bd MOV dword ptr [RBP + -0x4],0x0 JMP 0x001467b3 LAB_001466bd: 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 0x001467b3 LAB_001466f0: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x001467a6 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x20] JBE 0x00146719 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x001467b3 LAB_00146719: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00146757 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x00146757 MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x00146760 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x00146760 LAB_00146757: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001467b3 LAB_00146760: 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 0x001467b3 LAB_001467a6: JMP 0x001467a8 LAB_001467a8: JMP 0x001467aa LAB_001467aa: JMP 0x001467ac LAB_001467ac: MOV dword ptr [RBP + -0x4],0x0 LAB_001467b3: 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; }
44,937
diag
eloqsql/unittest/mytap/tap.c
void diag(char const *fmt, ...) { va_list ap; va_start(ap, fmt); fprintf(tapout, "# "); vfprintf(tapout, fmt, ap); emit_endl(); va_end(ap); }
O3
c
diag: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rdi, %rbx leaq -0xe0(%rbp), %rdi movq %rsi, 0x8(%rdi) movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0x2515e movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) leaq -0x30(%rbp), %r14 movq %rdi, 0x10(%r14) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r14) movabsq $0x3000000008, %rax # imm = 0x3000000008 movq %rax, (%r14) movq 0x2c9e2e(%rip), %r15 # 0x2eefb0 movq (%r15), %rdi leaq 0x37031(%rip), %rdx # 0x5c1bd movl $0x1, %esi xorl %eax, %eax callq 0x24530 movq (%r15), %rdi movl $0x1, %esi movq %rbx, %rdx movq %r14, %rcx callq 0x240d0 movq (%r15), %rdi leaq 0x3aac0(%rip), %rdx # 0x5fc75 movl $0x1, %esi xorl %eax, %eax callq 0x24530 movq (%r15), %rdi callq 0x24360 addq $0xc8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
diag: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h mov rbx, rdi lea rdi, [rbp+var_E0] mov [rdi+8], rsi mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test al, al jz short loc_2515E movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_2515E: lea r14, [rbp+var_30] mov [r14+10h], rdi lea rax, [rbp+arg_0] mov [r14+8], rax mov rax, 3000000008h mov [r14], rax mov r15, cs:stdout_ptr mov rdi, [r15] lea rdx, asc_5C1BD; "# " mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [r15] mov esi, 1 mov rdx, rbx mov rcx, r14 call ___vfprintf_chk mov rdi, [r15] lea rdx, asc_5FC72+3; "\n" mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [r15] call _fflush add rsp, 0C8h pop rbx pop r14 pop r15 pop rbp retn
long long diag( 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 a15) { char v16; // [rsp+0h] [rbp-E0h] BYREF long long v17; // [rsp+8h] [rbp-D8h] long long v18; // [rsp+10h] [rbp-D0h] long long v19; // [rsp+18h] [rbp-C8h] long long v20; // [rsp+20h] [rbp-C0h] long long v21; // [rsp+28h] [rbp-B8h] __m128 v22; // [rsp+30h] [rbp-B0h] __m128 v23; // [rsp+40h] [rbp-A0h] __m128 v24; // [rsp+50h] [rbp-90h] __m128 v25; // [rsp+60h] [rbp-80h] __m128 v26; // [rsp+70h] [rbp-70h] __m128 v27; // [rsp+80h] [rbp-60h] __m128 v28; // [rsp+90h] [rbp-50h] __m128 v29; // [rsp+A0h] [rbp-40h] _QWORD v30[6]; // [rsp+B0h] [rbp-30h] BYREF v22 = a7; v23 = a8; v24 = a9; v25 = a10; v26 = a11; v27 = a12; v28 = a13; v29 = a14; v17 = a2; v18 = a3; v19 = a4; v20 = a5; v21 = a6; v30[2] = &v16; v30[1] = &a15; v30[0] = 0x3000000008LL; __fprintf_chk(stdout, 1LL, "# "); __vfprintf_chk(stdout, 1LL, a1, v30); __fprintf_chk(stdout, 1LL, "\n"); return fflush(stdout); }
diag: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 MOV RBX,RDI LEA RDI,[RBP + -0xe0] MOV qword ptr [RDI + 0x8],RSI MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST AL,AL JZ 0x0012515e MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_0012515e: LEA R14,[RBP + -0x30] MOV qword ptr [R14 + 0x10],RDI LEA RAX,[RBP + 0x10] MOV qword ptr [R14 + 0x8],RAX MOV RAX,0x3000000008 MOV qword ptr [R14],RAX MOV R15,qword ptr [0x003eefb0] MOV RDI,qword ptr [R15] LEA RDX,[0x15c1bd] MOV ESI,0x1 XOR EAX,EAX CALL 0x00124530 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,RBX MOV RCX,R14 CALL 0x001240d0 MOV RDI,qword ptr [R15] LEA RDX,[0x15fc75] MOV ESI,0x1 XOR EAX,EAX CALL 0x00124530 MOV RDI,qword ptr [R15] CALL 0x00124360 ADD RSP,0xc8 POP RBX POP R14 POP R15 POP RBP RET
void diag(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { int *puVar1; char in_AL; int1 local_e8 [8]; int8 local_e0; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int1 *local_30; int1 *local_28; puVar1 = PTR_stdout_003eefb0; local_28 = local_e8; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_30 = &stack0x00000008; local_38 = 0x3000000008; local_e0 = param_10; local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; __fprintf_chk(*(int8 *)PTR_stdout_003eefb0,1,&DAT_0015c1bd); __vfprintf_chk(*(int8 *)puVar1,1,param_9,&local_38); __fprintf_chk(*(int8 *)puVar1,1,&DAT_0015fc75); fflush(*(FILE **)puVar1); return; }
44,938
multadd
eloqsql/strings/dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O3
c
multadd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdi, %rbx movslq 0x14(%rdi), %r12 movq (%rdi), %rax movslq %edx, %r13 movslq %esi, %rcx cmpl $0x2, %r12d movl $0x1, %edx cmovgel %r12d, %edx xorl %esi, %esi movl (%rax,%rsi,4), %edi imulq %rcx, %rdi addq %r13, %rdi movq %rdi, %r13 shrq $0x20, %r13 movl %edi, (%rax,%rsi,4) incq %rsi cmpl %esi, %edx jne 0x90fc6 shrq $0x20, %rdi je 0x91033 cmpl 0xc(%rbx), %r12d jl 0x91024 movl 0x8(%rbx), %edi incl %edi movq %r14, %rsi callq 0x9096c movq %rax, %r15 leaq 0x10(%rax), %rdi leaq 0x10(%rbx), %rsi movslq 0x14(%rbx), %rax leaq 0x8(,%rax,4), %rdx callq 0x282d0 movq %rbx, %rdi movq %r14, %rsi callq 0x90d65 movq %r15, %rbx movq (%rbx), %rax leal 0x1(%r12), %ecx movl %r13d, (%rax,%r12,4) movl %ecx, 0x14(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
multadd: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov rbx, rdi movsxd r12, dword ptr [rdi+14h] mov rax, [rdi] movsxd r13, edx movsxd rcx, esi cmp r12d, 2 mov edx, 1 cmovge edx, r12d xor esi, esi loc_90FC6: mov edi, [rax+rsi*4] imul rdi, rcx add rdi, r13 mov r13, rdi shr r13, 20h mov [rax+rsi*4], edi inc rsi cmp edx, esi jnz short loc_90FC6 shr rdi, 20h jz short loc_91033 cmp r12d, [rbx+0Ch] jl short loc_91024 mov edi, [rbx+8] inc edi mov rsi, r14 call Balloc mov r15, rax lea rdi, [rax+10h] lea rsi, [rbx+10h] movsxd rax, dword ptr [rbx+14h] lea rdx, ds:8[rax*4] call _memcpy mov rdi, rbx mov rsi, r14 call Bfree mov rbx, r15 loc_91024: mov rax, [rbx] lea ecx, [r12+1] mov [rax+r12*4], r13d mov [rbx+14h], ecx loc_91033: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4) { unsigned long long v5; // rbx long long v6; // r12 long long v7; // rax unsigned long long v8; // r13 long long v9; // rcx int v10; // edx long long v11; // rsi unsigned long long v12; // rdi long long v13; // r15 v5 = a1; v6 = *(int *)(a1 + 20); v7 = *(_QWORD *)a1; v8 = a3; v9 = a2; v10 = 1; if ( (int)v6 >= 2 ) v10 = *(_DWORD *)(a1 + 20); v11 = 0LL; do { v12 = v8 + v9 * *(unsigned int *)(v7 + 4 * v11); v8 = HIDWORD(v12); *(_DWORD *)(v7 + 4 * v11++) = v12; } while ( v10 != (_DWORD)v11 ); if ( HIDWORD(v12) ) { if ( (int)v6 >= *(_DWORD *)(v5 + 12) ) { v13 = Balloc(*(_DWORD *)(v5 + 8) + 1, (long long)a4); memcpy(v13 + 16, v5 + 16, 4LL * *(int *)(v5 + 20) + 8); Bfree(v5, a4); v5 = v13; } *(_DWORD *)(*(_QWORD *)v5 + 4 * v6) = HIDWORD(v12); *(_DWORD *)(v5 + 20) = v6 + 1; } return v5; }
multadd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDI MOVSXD R12,dword ptr [RDI + 0x14] MOV RAX,qword ptr [RDI] MOVSXD R13,EDX MOVSXD RCX,ESI CMP R12D,0x2 MOV EDX,0x1 CMOVGE EDX,R12D XOR ESI,ESI LAB_00190fc6: MOV EDI,dword ptr [RAX + RSI*0x4] IMUL RDI,RCX ADD RDI,R13 MOV R13,RDI SHR R13,0x20 MOV dword ptr [RAX + RSI*0x4],EDI INC RSI CMP EDX,ESI JNZ 0x00190fc6 SHR RDI,0x20 JZ 0x00191033 CMP R12D,dword ptr [RBX + 0xc] JL 0x00191024 MOV EDI,dword ptr [RBX + 0x8] INC EDI MOV RSI,R14 CALL 0x0019096c MOV R15,RAX LEA RDI,[RAX + 0x10] LEA RSI,[RBX + 0x10] MOVSXD RAX,dword ptr [RBX + 0x14] LEA RDX,[0x8 + RAX*0x4] CALL 0x001282d0 MOV RDI,RBX MOV RSI,R14 CALL 0x00190d65 MOV RBX,R15 LAB_00191024: MOV RAX,qword ptr [RBX] LEA ECX,[R12 + 0x1] MOV dword ptr [RAX + R12*0x4],R13D MOV dword ptr [RBX + 0x14],ECX LAB_00191033: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * multadd(long *param_1,int param_2,int param_3,int8 param_4) { int iVar1; long lVar2; long *plVar3; int iVar4; long lVar5; ulong uVar6; ulong uVar7; iVar1 = *(int *)((long)param_1 + 0x14); lVar2 = *param_1; uVar7 = (ulong)param_3; iVar4 = 1; if (1 < iVar1) { iVar4 = iVar1; } lVar5 = 0; do { uVar6 = (ulong)*(uint *)(lVar2 + lVar5 * 4) * (long)param_2 + uVar7; uVar7 = uVar6 >> 0x20; *(int *)(lVar2 + lVar5 * 4) = (int)uVar6; lVar5 = lVar5 + 1; } while (iVar4 != (int)lVar5); plVar3 = param_1; if (uVar6 >> 0x20 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { plVar3 = (long *)Balloc((int)param_1[1] + 1,param_4); memcpy(plVar3 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_4); } *(int *)(*plVar3 + (long)iVar1 * 4) = (int)(uVar6 >> 0x20); *(int *)((long)plVar3 + 0x14) = iVar1 + 1; } return plVar3; }
44,939
mi_mark_file_changed
eloqsql/storage/myisam/mi_locking.c
int _mi_mark_file_changed(MI_INFO *info) { uchar buff[3]; register MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_mark_file_changed"); if (!(share->state.changed & STATE_CHANGED) || ! share->global_changed) { share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED | STATE_NOT_OPTIMIZED_KEYS); if (!share->global_changed) { share->global_changed=1; share->state.open_count++; } if (!share->temporary) { mi_int2store(buff,share->state.open_count); buff[2]=1; /* Mark that it's changed */ DBUG_RETURN((int)mysql_file_pwrite(share->kfile, buff, sizeof(buff), sizeof(share->state.header), MYF(MY_NABP))); } } DBUG_RETURN(0); }
O3
c
mi_mark_file_changed: movq (%rdi), %rax movb 0xf0(%rax), %cl movb 0x380(%rax), %dl testb $0x1, %cl jne 0x7f781 orb $0x19, %cl movb %cl, 0xf0(%rax) testb %dl, %dl jne 0x7f79b jmp 0x7f78e testb %dl, %dl jne 0x7f7a4 orb $0x19, %cl movb %cl, 0xf0(%rax) movb $0x1, 0x380(%rax) incl 0xec(%rax) cmpb $0x0, 0x382(%rax) je 0x7f7a7 xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movl 0xec(%rax), %ecx movb %cl, -0x12(%rbp) movb %ch, -0x13(%rbp) movb $0x1, -0x11(%rbp) movl 0x350(%rax), %ebx leaq 0x30fa89(%rip), %rax # 0x38f258 movq (%rax), %rax leaq -0x68(%rbp), %rdi movl %ebx, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x7f80c leaq -0x13(%rbp), %rsi movl $0x3, %edx movl $0x18, %ecx movl $0x4, %r8d movl %ebx, %edi callq 0xa6e22 addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x13(%rbp), %rdx leaq -0x20(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rcx callq 0x2eb19 movq (%r14), %rax jmp 0x7f803
_mi_mark_file_changed: mov rax, [rdi] mov cl, [rax+0F0h] mov dl, [rax+380h] test cl, 1 jnz short loc_7F781 or cl, 19h mov [rax+0F0h], cl test dl, dl jnz short loc_7F79B jmp short loc_7F78E loc_7F781: test dl, dl jnz short loc_7F7A4 or cl, 19h mov [rax+0F0h], cl loc_7F78E: mov byte ptr [rax+380h], 1 inc dword ptr [rax+0ECh] loc_7F79B: cmp byte ptr [rax+382h], 0 jz short loc_7F7A7 loc_7F7A4: xor eax, eax retn loc_7F7A7: push rbp mov rbp, rsp push r14 push rbx sub rsp, 60h mov ecx, [rax+0ECh] mov [rbp-12h], cl mov [rbp-13h], ch mov byte ptr [rbp-11h], 1 mov ebx, [rax+350h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp-68h] mov esi, ebx mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_7F80C lea rsi, [rbp-13h] mov edx, 3 mov ecx, 18h mov r8d, 4 mov edi, ebx call my_pwrite loc_7F803: add rsp, 60h pop rbx pop r14 pop rbp retn loc_7F80C: lea rdx, [rbp-13h] lea r14, [rbp-20h] mov rdi, rax mov esi, ebx mov rcx, r14 call _mi_mark_file_changed_cold_1 mov rax, [r14] jmp short loc_7F803
long long mi_mark_file_changed(long long *a1) { long long v1; // rax char v2; // cl char v3; // dl __int16 v5; // kr00_2 unsigned int v6; // ebx long long v7; // rax long long v8; // [rsp-70h] [rbp-70h] BYREF long long v9; // [rsp-28h] [rbp-28h] BYREF _BYTE v10[27]; // [rsp-1Bh] [rbp-1Bh] BYREF v1 = *a1; v2 = *(_BYTE *)(*a1 + 240); v3 = *(_BYTE *)(*a1 + 896); if ( (v2 & 1) != 0 ) { if ( v3 ) return 0LL; *(_BYTE *)(v1 + 240) = v2 | 0x19; } else { *(_BYTE *)(v1 + 240) = v2 | 0x19; if ( v3 ) goto LABEL_7; } *(_BYTE *)(v1 + 896) = 1; ++*(_DWORD *)(v1 + 236); LABEL_7: if ( *(_BYTE *)(v1 + 898) ) return 0LL; v5 = *(_DWORD *)(v1 + 236); v10[0] = HIBYTE(v5); v10[1] = v5; v10[2] = 1; v6 = *(_DWORD *)(v1 + 848); v7 = ((long long ( *)(long long *, _QWORD, long long))PSI_server[43])(&v8, v6, 7LL); if ( !v7 ) return my_pwrite(v6, v10, 3LL, 24LL, 4LL); mi_mark_file_changed_cold_1(v7, v6, (long long)v10, &v9); return v9; }
_mi_mark_file_changed: MOV RAX,qword ptr [RDI] MOV CL,byte ptr [RAX + 0xf0] MOV DL,byte ptr [RAX + 0x380] TEST CL,0x1 JNZ 0x0017f781 OR CL,0x19 MOV byte ptr [RAX + 0xf0],CL TEST DL,DL JNZ 0x0017f79b JMP 0x0017f78e LAB_0017f781: TEST DL,DL JNZ 0x0017f7a4 OR CL,0x19 MOV byte ptr [RAX + 0xf0],CL LAB_0017f78e: MOV byte ptr [RAX + 0x380],0x1 INC dword ptr [RAX + 0xec] LAB_0017f79b: CMP byte ptr [RAX + 0x382],0x0 JZ 0x0017f7a7 LAB_0017f7a4: XOR EAX,EAX RET LAB_0017f7a7: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x60 MOV ECX,dword ptr [RAX + 0xec] MOV byte ptr [RBP + -0x12],CL MOV byte ptr [RBP + -0x13],CH MOV byte ptr [RBP + -0x11],0x1 MOV EBX,dword ptr [RAX + 0x350] LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x68] MOV ESI,EBX MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0017f80c LEA RSI,[RBP + -0x13] MOV EDX,0x3 MOV ECX,0x18 MOV R8D,0x4 MOV EDI,EBX CALL 0x001a6e22 LAB_0017f803: ADD RSP,0x60 POP RBX POP R14 POP RBP RET LAB_0017f80c: LEA RDX,[RBP + -0x13] LEA R14,[RBP + -0x20] MOV RDI,RAX MOV ESI,EBX MOV RCX,R14 CALL 0x0012eb19 MOV RAX,qword ptr [R14] JMP 0x0017f803
int8 _mi_mark_file_changed(long *param_1) { byte bVar1; int4 uVar2; long lVar3; int1 local_70 [72]; int8 local_28; int1 local_1b; int1 local_1a; int1 local_19; lVar3 = *param_1; bVar1 = *(byte *)(lVar3 + 0xf0); if ((bVar1 & 1) == 0) { *(byte *)(lVar3 + 0xf0) = bVar1 | 0x19; if (*(char *)(lVar3 + 0x380) != '\0') goto LAB_0017f79b; } else { if (*(char *)(lVar3 + 0x380) != '\0') { return 0; } *(byte *)(lVar3 + 0xf0) = bVar1 | 0x19; } *(int1 *)(lVar3 + 0x380) = 1; *(int *)(lVar3 + 0xec) = *(int *)(lVar3 + 0xec) + 1; LAB_0017f79b: if (*(char *)(lVar3 + 0x382) != '\0') { return 0; } local_1a = (int1)*(int4 *)(lVar3 + 0xec); local_1b = (int1)((uint)*(int4 *)(lVar3 + 0xec) >> 8); local_19 = 1; uVar2 = *(int4 *)(lVar3 + 0x350); lVar3 = (**(code **)(PSI_server + 0x158))(local_70,uVar2,7); if (lVar3 == 0) { local_28 = my_pwrite(uVar2,&local_1b,3,0x18,4); } else { _mi_mark_file_changed_cold_1(lVar3,uVar2,&local_1b,&local_28); } return local_28; }
44,940
spdlog::details::source_funcname_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h
void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override { if (msg.source.empty()) { ScopedPadder p(0, padinfo_, dest); return; } size_t text_size = padinfo_.enabled() ? std::char_traits<char>::length(msg.source.funcname) : 0; ScopedPadder p(text_size, padinfo_, dest); fmt_helper::append_string_view(msg.source.funcname, dest); }
O0
c
spdlog::details::source_funcname_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&): subq $0x78, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq %rcx, 0x48(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x58(%rsp), %rdi addq $0x38, %rdi callq 0x4d490 testb $0x1, %al jne 0x70ae6 jmp 0x70b07 movq 0x18(%rsp), %rdx addq $0x8, %rdx movq 0x48(%rsp), %rcx leaq 0x47(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x4c850 jmp 0x70bb4 movq 0x18(%rsp), %rdi addq $0x8, %rdi callq 0x3b750 testb $0x1, %al jne 0x70b1b jmp 0x70b30 movq 0x58(%rsp), %rax movq 0x48(%rax), %rdi callq 0x1e520 movq %rax, 0x10(%rsp) jmp 0x70b39 xorl %eax, %eax movq %rax, 0x10(%rsp) jmp 0x70b39 movq 0x18(%rsp), %rdx movq 0x10(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rsi addq $0x8, %rdx movq 0x48(%rsp), %rcx leaq 0x37(%rsp), %rdi callq 0x4c850 movq 0x58(%rsp), %rax movq 0x48(%rax), %rax leaq 0x20(%rsp), %rcx movq %rcx, 0x70(%rsp) movq %rax, 0x68(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x68(%rsp), %rcx movq %rcx, (%rax) movq 0x68(%rsp), %rdi callq 0x14280 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x48(%rsp), %rdx movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x3b4e0 addq $0x78, %rsp retq nopl (%rax)
_ZN6spdlog7details25source_funcname_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE: sub rsp, 78h mov [rsp+78h+var_18], rdi mov [rsp+78h+var_20], rsi mov [rsp+78h+var_28], rdx mov [rsp+78h+var_30], rcx mov rax, [rsp+78h+var_18] mov [rsp+78h+var_60], rax mov rdi, [rsp+78h+var_20] add rdi, 38h ; '8'; this call _ZNK6spdlog10source_loc5emptyEv; spdlog::source_loc::empty(void) test al, 1 jnz short loc_70AE6 jmp short loc_70B07 loc_70AE6: mov rdx, [rsp+78h+var_60] add rdx, 8 mov rcx, [rsp+78h+var_30] lea rdi, [rsp+78h+var_31] xor eax, eax mov esi, eax call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) jmp loc_70BB4 loc_70B07: mov rdi, [rsp+78h+var_60] add rdi, 8; this call _ZNK6spdlog7details12padding_info7enabledEv; spdlog::details::padding_info::enabled(void) test al, 1 jnz short loc_70B1B jmp short loc_70B30 loc_70B1B: mov rax, [rsp+78h+var_20] mov rdi, [rax+48h] call _ZNSt11char_traitsIcE6lengthEPKc; std::char_traits<char>::length(char const*) mov [rsp+78h+var_68], rax jmp short loc_70B39 loc_70B30: xor eax, eax mov [rsp+78h+var_68], rax jmp short $+2 loc_70B39: mov rdx, [rsp+78h+var_60] mov rax, [rsp+78h+var_68] mov [rsp+78h+var_40], rax mov rsi, [rsp+78h+var_40] add rdx, 8 mov rcx, [rsp+78h+var_30] lea rdi, [rsp+78h+var_41] call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rax, [rsp+78h+var_20] mov rax, [rax+48h] lea rcx, [rsp+78h+var_58] mov [rsp+78h+var_8], rcx mov [rsp+78h+var_10], rax mov rax, [rsp+78h+var_8] mov [rsp+78h+var_70], rax mov rcx, [rsp+78h+var_10] mov [rax], rcx mov rdi, [rsp+78h+var_10] call _strlen mov rcx, rax mov rax, [rsp+78h+var_70] mov [rax+8], rcx mov rdx, [rsp+78h+var_30] mov rdi, [rsp+78h+var_58] mov rsi, [rsp+78h+var_50] call _ZN6spdlog7details10fmt_helper18append_string_viewEN3fmt3v1017basic_string_viewIcEERNS3_19basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_string_view(fmt::v10::basic_string_view<char>,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) loc_70BB4: add rsp, 78h retn
void spdlog::details::source_funcname_formatter<spdlog::details::null_scoped_padder>::format( long long a1, long long a2, long long a3, _QWORD *a4) { long long v4; // rax long long v5; // [rsp+10h] [rbp-68h] long long v6; // [rsp+20h] [rbp-58h] BYREF long long v7; // [rsp+28h] [rbp-50h] long long v8; // [rsp+38h] [rbp-40h] _QWORD *v9; // [rsp+48h] [rbp-30h] long long v10; // [rsp+50h] [rbp-28h] long long v11; // [rsp+58h] [rbp-20h] long long v12; // [rsp+60h] [rbp-18h] long long v13; // [rsp+68h] [rbp-10h] long long *v14; // [rsp+70h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; if ( spdlog::source_loc::empty((spdlog::source_loc *)(a2 + 56)) ) { spdlog::details::null_scoped_padder::null_scoped_padder(); } else { if ( (spdlog::details::padding_info::enabled((spdlog::details::padding_info *)(a1 + 8)) & 1) != 0 ) v5 = std::char_traits<char>::length(*(_QWORD *)(v11 + 72)); else v5 = 0LL; v8 = v5; spdlog::details::null_scoped_padder::null_scoped_padder(); v4 = *(_QWORD *)(v11 + 72); v14 = &v6; v13 = v4; v6 = v4; v7 = strlen(v4); spdlog::details::fmt_helper::append_string_view(v6, v7, v9); } }
format: SUB RSP,0x78 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x48],RCX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x38 CALL 0x0014d490 TEST AL,0x1 JNZ 0x00170ae6 JMP 0x00170b07 LAB_00170ae6: MOV RDX,qword ptr [RSP + 0x18] ADD RDX,0x8 MOV RCX,qword ptr [RSP + 0x48] LEA RDI,[RSP + 0x47] XOR EAX,EAX MOV ESI,EAX CALL 0x0014c850 JMP 0x00170bb4 LAB_00170b07: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x0013b750 TEST AL,0x1 JNZ 0x00170b1b JMP 0x00170b30 LAB_00170b1b: MOV RAX,qword ptr [RSP + 0x58] MOV RDI,qword ptr [RAX + 0x48] CALL 0x0011e520 MOV qword ptr [RSP + 0x10],RAX JMP 0x00170b39 LAB_00170b30: XOR EAX,EAX MOV qword ptr [RSP + 0x10],RAX JMP 0x00170b39 LAB_00170b39: MOV RDX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x38],RAX MOV RSI,qword ptr [RSP + 0x38] ADD RDX,0x8 MOV RCX,qword ptr [RSP + 0x48] LEA RDI,[RSP + 0x37] CALL 0x0014c850 MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x48] LEA RCX,[RSP + 0x20] MOV qword ptr [RSP + 0x70],RCX MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x68] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x68] CALL 0x00114280 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSP + 0x48] MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x0013b4e0 LAB_00170bb4: ADD RSP,0x78 RET
/* spdlog::details::source_funcname_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */ void __thiscall spdlog::details::source_funcname_formatter<spdlog::details::null_scoped_padder>::format (source_funcname_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1, tm *param_2,basic_memory_buffer *param_3) { ulong uVar1; size_t sVar2; ulong local_68; fmt_helper *local_58 [2]; null_scoped_padder local_41; ulong local_40; null_scoped_padder local_31; basic_memory_buffer *local_30; tm *local_28; log_msg *local_20; source_funcname_formatter<spdlog::details::null_scoped_padder> *local_18; fmt_helper *local_10; fmt_helper **local_8; local_30 = param_3; local_28 = param_2; local_20 = param_1; local_18 = this; uVar1 = source_loc::empty((source_loc *)(param_1 + 0x38)); if ((uVar1 & 1) == 0) { uVar1 = padding_info::enabled((padding_info *)(this + 8)); if ((uVar1 & 1) == 0) { local_68 = 0; } else { local_68 = std::char_traits<char>::length(*(char **)(local_20 + 0x48)); } local_40 = local_68; null_scoped_padder::null_scoped_padder(&local_41,local_68,(padding_info *)(this + 8),local_30); local_58[0] = *(fmt_helper **)(local_20 + 0x48); local_8 = local_58; local_10 = local_58[0]; sVar2 = strlen((char *)local_58[0]); fmt_helper::append_string_view(local_58[0],sVar2,local_30); } else { null_scoped_padder::null_scoped_padder(&local_31,0,(padding_info *)(this + 8),local_30); } return; }
44,941
intx_init_value
corpus-core[P]colibri-stateless/build_O2/_deps/intx-src/include/intx/intx.hpp
inline constexpr uint64_t bswap(uint64_t x) noexcept { #if __has_builtin(__builtin_bswap64) return __builtin_bswap64(x); #else #ifdef _MSC_VER if (!std::is_constant_evaluated()) return _byteswap_uint64(x); #endif const auto a = ((x << 8) & 0xFF00FF00FF00FF00) | ((x >> 8) & 0x00FF00FF00FF00FF); const auto b = ((a << 16) & 0xFFFF0000FFFF0000) | ((a >> 16) & 0x0000FFFF0000FFFF); return (b << 32) | (b >> 32); #endif }
O2
cpp
intx_init_value: bswapq %rsi xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) movq %rsi, 0x18(%rdi) retq
intx_init_value: bswap rsi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 mov [rdi+18h], rsi retn
void intx_init_value(long long a1, unsigned long long a2) { *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; *(_QWORD *)(a1 + 24) = _byteswap_uint64(a2); }
intx_init_value: BSWAP RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 MOV qword ptr [RDI + 0x18],RSI RET
void intx_init_value(int8 *param_1,ulong param_2) { *param_1 = 0; param_1[1] = 0; param_1[2] = 0; param_1[3] = param_2 >> 0x38 | (param_2 & 0xff000000000000) >> 0x28 | (param_2 & 0xff0000000000) >> 0x18 | (param_2 & 0xff00000000) >> 8 | (param_2 & 0xff000000) << 8 | (param_2 & 0xff0000) << 0x18 | (param_2 & 0xff00) << 0x28 | param_2 << 0x38; return; }
44,942
ft_init_boolean_search
eloqsql/storage/myisam/ft_boolean_search.c
FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, uchar *query, uint query_len, CHARSET_INFO *cs) { FTB *ftb; FTB_EXPR *ftbe; FTB_WORD *ftbw; if (!(ftb=(FTB *)my_malloc(mi_key_memory_FTB, sizeof(FTB), MYF(MY_WME)))) return 0; ftb->please= (struct _ft_vft *) & _ft_vft_boolean; ftb->state=UNINITIALIZED; ftb->info=info; ftb->keynr=keynr; ftb->charset=cs; DBUG_ASSERT(keynr==NO_SUCH_KEY || cs == info->s->keyinfo[keynr].seg->charset); ftb->with_scan=0; ftb->lastpos=HA_OFFSET_ERROR; bzero(& ftb->no_dupes, sizeof(TREE)); ftb->last_word= 0; init_alloc_root(mi_key_memory_FTB, &ftb->mem_root, 1024, 1024, MYF(0)); ftb->queue.max_elements= 0; if (!(ftbe=(FTB_EXPR *)alloc_root(&ftb->mem_root, sizeof(FTB_EXPR)))) goto err; ftbe->weight=1; ftbe->flags=FTB_FLAG_YES; ftbe->nos=1; ftbe->up=0; ftbe->max_docid= ftbe->ythresh= ftbe->yweaks= 0; ftbe->docid[0]=ftbe->docid[1]=HA_OFFSET_ERROR; ftbe->phrase= NULL; ftbe->document= 0; ftb->root=ftbe; if (unlikely(_ftb_parse_query(ftb, query, query_len, keynr == NO_SUCH_KEY ? &ft_default_parser : info->s->keyinfo[keynr].parser))) goto err; /* Hack: instead of init_queue, we'll use reinit queue to be able to alloc queue with alloc_root() */ if (! (ftb->queue.root= (uchar **)alloc_root(&ftb->mem_root, (ftb->queue.max_elements + 1) * sizeof(void *)))) goto err; reinit_queue(&ftb->queue, ftb->queue.max_elements, 0, 0, (int (*)(void*, uchar*, uchar*))FTB_WORD_cmp, 0, 0, 0); for (ftbw= ftb->last_word; ftbw; ftbw= ftbw->prev) queue_insert(&ftb->queue, (uchar *)ftbw); ftb->list=(FTB_WORD **)alloc_root(&ftb->mem_root, sizeof(FTB_WORD *)*ftb->queue.elements); memcpy(ftb->list, &queue_top(&ftb->queue), sizeof(FTB_WORD *)*ftb->queue.elements); my_qsort2(ftb->list, ftb->queue.elements, sizeof(FTB_WORD *), (qsort2_cmp)FTB_WORD_cmp_list, (void*)ftb->charset); if (ftb->queue.elements<2) ftb->with_scan &= ~FTB_FLAG_TRUNC; ftb->state=READY; return ftb; err: free_root(& ftb->mem_root, MYF(0)); my_free(ftb); return 0; }
O0
c
ft_init_boolean_search: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) leaq 0xbdc268(%rip), %rax # 0xc7a57c movl (%rax), %edi movl $0x350, %esi # imm = 0x350 movl $0x10, %edx callq 0xf3830 movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0x9e33c movq $0x0, -0x8(%rbp) jmp 0x9e689 movq -0x38(%rbp), %rax leaq 0x216281(%rip), %rcx # 0x2b45c8 movq %rcx, (%rax) movq -0x38(%rbp), %rax movl $0x0, 0x348(%rax) movq -0x10(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) movl -0x14(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x340(%rax) movq -0x30(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x10(%rax) jmp 0x9e37f movq -0x38(%rbp), %rax movb $0x0, 0x344(%rax) movq -0x38(%rbp), %rax movq $-0x1, 0x338(%rax) movq -0x38(%rbp), %rdi addq $0xa0, %rdi xorl %esi, %esi movl $0x298, %edx # imm = 0x298 callq 0x2a2c0 movq -0x38(%rbp), %rax movq $0x0, 0x28(%rax) leaq 0xbdc1b9(%rip), %rax # 0xc7a57c movl (%rax), %edi movq -0x38(%rbp), %rsi addq $0x30, %rsi movl $0x400, %ecx # imm = 0x400 xorl %eax, %eax movl %eax, %r8d movq %rcx, %rdx callq 0xed170 movq -0x38(%rbp), %rax movl $0x0, 0x84(%rax) movq -0x38(%rbp), %rdi addq $0x30, %rdi movl $0x50, %esi callq 0xed430 movq %rax, -0x40(%rbp) cmpq $0x0, %rax jne 0x9e40e jmp 0x9e667 movq -0x40(%rbp), %rax movss 0xb2bee(%rip), %xmm0 # 0x151008 movss %xmm0, 0x28(%rax) movq -0x40(%rbp), %rax movl $0x2, 0x8(%rax) movq -0x40(%rbp), %rax movl $0x1, 0x44(%rax) movq -0x40(%rbp), %rax movq $0x0, (%rax) movq -0x40(%rbp), %rax movl $0x0, 0x4c(%rax) movq -0x40(%rbp), %rax movl $0x0, 0x48(%rax) movq -0x40(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x40(%rbp), %rax movq $-0x1, 0x18(%rax) movq -0x40(%rbp), %rax movq $-0x1, 0x10(%rax) movq -0x40(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x40(%rbp), %rax movq $0x0, 0x38(%rax) movq -0x40(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x38(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x4c(%rbp) cmpl $-0x1, -0x14(%rbp) jne 0x9e4c7 leaq 0x220cbf(%rip), %rax # 0x2bf180 movq %rax, -0x68(%rbp) jmp 0x9e4e7 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x38(%rax), %rax movq %rax, -0x68(%rbp) movl -0x4c(%rbp), %edx movq -0x58(%rbp), %rsi movq -0x60(%rbp), %rdi movq -0x68(%rbp), %rcx callq 0x9e6a0 cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x9e513 jmp 0x9e667 movq -0x38(%rbp), %rdi addq $0x30, %rdi movq -0x38(%rbp), %rax movl 0x84(%rax), %eax addl $0x1, %eax movl %eax, %eax movl %eax, %esi shlq $0x3, %rsi callq 0xed430 movq -0x38(%rbp), %rcx movq %rax, 0x70(%rcx) cmpq $0x0, %rax jne 0x9e548 jmp 0x9e667 movq -0x38(%rbp), %rdi addq $0x70, %rdi movq -0x38(%rbp), %rax movl 0x84(%rax), %esi xorl %ecx, %ecx leaq 0x24d(%rip), %r8 # 0x9e7b0 xorl %eax, %eax movl %eax, %r9d movl %ecx, %edx movl $0x0, (%rsp) movl $0x0, 0x8(%rsp) callq 0xf7040 movq -0x38(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) je 0x9e5b0 movq -0x38(%rbp), %rdi addq $0x70, %rdi movq -0x48(%rbp), %rsi callq 0xf71c0 movq -0x48(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x48(%rbp) jmp 0x9e58a movq -0x38(%rbp), %rdi addq $0x30, %rdi movq -0x38(%rbp), %rax movl 0x80(%rax), %eax movl %eax, %esi shlq $0x3, %rsi callq 0xed430 movq %rax, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x38(%rbp), %rax movq 0x20(%rax), %rdi movq -0x38(%rbp), %rax movq 0x70(%rax), %rsi addq $0x8, %rsi movq -0x38(%rbp), %rax movl 0x80(%rax), %eax movl %eax, %edx shlq $0x3, %rdx callq 0x2a090 movq -0x38(%rbp), %rax movq 0x20(%rax), %rdi movq -0x38(%rbp), %rax movl 0x80(%rax), %eax movl %eax, %esi movq -0x38(%rbp), %rax movq 0x10(%rax), %r8 movl $0x8, %edx leaq 0x257(%rip), %rcx # 0x9e880 callq 0xeb150 movq -0x38(%rbp), %rax cmpl $0x2, 0x80(%rax) jae 0x9e64f movq -0x38(%rbp), %rax movzbl 0x344(%rax), %ecx andl $-0x2, %ecx movb %cl, 0x344(%rax) movq -0x38(%rbp), %rax movl $0x1, 0x348(%rax) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x9e689 movq -0x38(%rbp), %rdi addq $0x30, %rdi xorl %eax, %eax movl %eax, %esi callq 0xed9e0 movq -0x38(%rbp), %rdi callq 0xf3bb0 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ft_init_boolean_search: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 lea rax, mi_key_memory_FTB mov edi, [rax] mov esi, 350h mov edx, 10h call my_malloc mov [rbp+var_38], rax cmp rax, 0 jnz short loc_9E33C mov [rbp+var_8], 0 jmp loc_9E689 loc_9E33C: mov rax, [rbp+var_38] lea rcx, _ft_vft_boolean mov [rax], rcx mov rax, [rbp+var_38] mov dword ptr [rax+348h], 0 mov rcx, [rbp+var_10] mov rax, [rbp+var_38] mov [rax+8], rcx mov ecx, [rbp+var_14] mov rax, [rbp+var_38] mov [rax+340h], ecx mov rcx, [rbp+var_30] mov rax, [rbp+var_38] mov [rax+10h], rcx jmp short $+2 loc_9E37F: mov rax, [rbp+var_38] mov byte ptr [rax+344h], 0 mov rax, [rbp+var_38] mov qword ptr [rax+338h], 0FFFFFFFFFFFFFFFFh mov rdi, [rbp+var_38] add rdi, 0A0h xor esi, esi mov edx, 298h call _memset mov rax, [rbp+var_38] mov qword ptr [rax+28h], 0 lea rax, mi_key_memory_FTB mov edi, [rax] mov rsi, [rbp+var_38] add rsi, 30h ; '0' mov ecx, 400h xor eax, eax mov r8d, eax mov rdx, rcx call init_alloc_root mov rax, [rbp+var_38] mov dword ptr [rax+84h], 0 mov rdi, [rbp+var_38] add rdi, 30h ; '0' mov esi, 50h ; 'P' call alloc_root mov [rbp+var_40], rax cmp rax, 0 jnz short loc_9E40E jmp loc_9E667 loc_9E40E: mov rax, [rbp+var_40] movss xmm0, cs:dword_151008 movss dword ptr [rax+28h], xmm0 mov rax, [rbp+var_40] mov dword ptr [rax+8], 2 mov rax, [rbp+var_40] mov dword ptr [rax+44h], 1 mov rax, [rbp+var_40] mov qword ptr [rax], 0 mov rax, [rbp+var_40] mov dword ptr [rax+4Ch], 0 mov rax, [rbp+var_40] mov dword ptr [rax+48h], 0 mov rax, [rbp+var_40] mov qword ptr [rax+20h], 0 mov rax, [rbp+var_40] mov qword ptr [rax+18h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_40] mov qword ptr [rax+10h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_40] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_40] mov qword ptr [rax+38h], 0 mov rcx, [rbp+var_40] mov rax, [rbp+var_38] mov [rax+18h], rcx mov rax, [rbp+var_38] mov [rbp+var_60], rax mov rax, [rbp+var_20] mov [rbp+var_58], rax mov eax, [rbp+var_24] mov [rbp+var_4C], eax cmp [rbp+var_14], 0FFFFFFFFh jnz short loc_9E4C7 lea rax, ft_default_parser mov [rbp+var_68], rax jmp short loc_9E4E7 loc_9E4C7: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+38h] mov [rbp+var_68], rax loc_9E4E7: mov edx, [rbp+var_4C] mov rsi, [rbp+var_58] mov rdi, [rbp+var_60] mov rcx, [rbp+var_68] call _ftb_parse_query cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_9E513 jmp loc_9E667 loc_9E513: mov rdi, [rbp+var_38] add rdi, 30h ; '0' mov rax, [rbp+var_38] mov eax, [rax+84h] add eax, 1 mov eax, eax mov esi, eax shl rsi, 3 call alloc_root mov rcx, [rbp+var_38] mov [rcx+70h], rax cmp rax, 0 jnz short loc_9E548 jmp loc_9E667 loc_9E548: mov rdi, [rbp+var_38] add rdi, 70h ; 'p' mov rax, [rbp+var_38] mov esi, [rax+84h] xor ecx, ecx lea r8, FTB_WORD_cmp xor eax, eax mov r9d, eax mov edx, ecx mov [rsp+80h+var_80], 0 mov [rsp+80h+var_78], 0 call reinit_queue mov rax, [rbp+var_38] mov rax, [rax+28h] mov [rbp+var_48], rax loc_9E58A: cmp [rbp+var_48], 0 jz short loc_9E5B0 mov rdi, [rbp+var_38] add rdi, 70h ; 'p' mov rsi, [rbp+var_48] call queue_insert mov rax, [rbp+var_48] mov rax, [rax+38h] mov [rbp+var_48], rax jmp short loc_9E58A loc_9E5B0: mov rdi, [rbp+var_38] add rdi, 30h ; '0' mov rax, [rbp+var_38] mov eax, [rax+80h] mov esi, eax shl rsi, 3 call alloc_root mov rcx, rax mov rax, [rbp+var_38] mov [rax+20h], rcx mov rax, [rbp+var_38] mov rdi, [rax+20h] mov rax, [rbp+var_38] mov rsi, [rax+70h] add rsi, 8 mov rax, [rbp+var_38] mov eax, [rax+80h] mov edx, eax shl rdx, 3 call _memcpy mov rax, [rbp+var_38] mov rdi, [rax+20h] mov rax, [rbp+var_38] mov eax, [rax+80h] mov esi, eax mov rax, [rbp+var_38] mov r8, [rax+10h] mov edx, 8 lea rcx, FTB_WORD_cmp_list call my_qsort2 mov rax, [rbp+var_38] cmp dword ptr [rax+80h], 2 jnb short loc_9E64F mov rax, [rbp+var_38] movzx ecx, byte ptr [rax+344h] and ecx, 0FFFFFFFEh mov [rax+344h], cl loc_9E64F: mov rax, [rbp+var_38] mov dword ptr [rax+348h], 1 mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_9E689 loc_9E667: mov rdi, [rbp+var_38] add rdi, 30h ; '0' xor eax, eax mov esi, eax call free_root mov rdi, [rbp+var_38] call my_free mov [rbp+var_8], 0 loc_9E689: mov rax, [rbp+var_8] add rsp, 80h pop rbp retn
long long ft_init_boolean_search(long long a1, unsigned int a2, long long a3, unsigned int a4, long long a5) { int v5; // eax long long v6; // rax long long i; // [rsp+38h] [rbp-48h] long long v9; // [rsp+40h] [rbp-40h] long long v10; // [rsp+48h] [rbp-38h] v10 = my_malloc(mi_key_memory_FTB, 848LL, 16LL); if ( !v10 ) return 0LL; *(_QWORD *)v10 = ft_vft_boolean; *(_DWORD *)(v10 + 840) = 0; *(_QWORD *)(v10 + 8) = a1; *(_DWORD *)(v10 + 832) = a2; *(_QWORD *)(v10 + 16) = a5; *(_BYTE *)(v10 + 836) = 0; *(_QWORD *)(v10 + 824) = -1LL; memset(v10 + 160, 0LL, 664LL); *(_QWORD *)(v10 + 40) = 0LL; init_alloc_root(mi_key_memory_FTB, v10 + 48, 1024LL, 1024LL); *(_DWORD *)(v10 + 132) = 0; v9 = alloc_root(v10 + 48, 80LL); if ( !v9 ) goto LABEL_15; *(_DWORD *)(v9 + 40) = 1065353216; *(_DWORD *)(v9 + 8) = 2; *(_DWORD *)(v9 + 68) = 1; *(_QWORD *)v9 = 0LL; *(_DWORD *)(v9 + 76) = 0; *(_DWORD *)(v9 + 72) = 0; *(_QWORD *)(v9 + 32) = 0LL; *(_QWORD *)(v9 + 24) = -1LL; *(_QWORD *)(v9 + 16) = -1LL; *(_QWORD *)(v9 + 48) = 0LL; *(_QWORD *)(v9 + 56) = 0LL; *(_QWORD *)(v10 + 24) = v9; v5 = a2 == -1 ? ftb_parse_query(v10, a3, a4, &ft_default_parser) : ftb_parse_query(v10, a3, a4, *(_QWORD *)(112LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL) + 56)); if ( !v5 && (v6 = alloc_root(v10 + 48, 8LL * (unsigned int)(*(_DWORD *)(v10 + 132) + 1)), (*(_QWORD *)(v10 + 112) = v6) != 0LL) ) { reinit_queue(v10 + 112, *(_DWORD *)(v10 + 132), 0, 0, (unsigned int)FTB_WORD_cmp, 0, 0, 0); for ( i = *(_QWORD *)(v10 + 40); i; i = *(_QWORD *)(i + 56) ) queue_insert(v10 + 112, i); *(_QWORD *)(v10 + 32) = alloc_root(v10 + 48, 8LL * *(unsigned int *)(v10 + 128)); memcpy(*(_QWORD *)(v10 + 32), *(_QWORD *)(v10 + 112) + 8LL, 8LL * *(unsigned int *)(v10 + 128)); my_qsort2(*(_QWORD *)(v10 + 32), *(unsigned int *)(v10 + 128), 8LL, FTB_WORD_cmp_list, *(_QWORD *)(v10 + 16)); if ( *(_DWORD *)(v10 + 128) < 2u ) *(_BYTE *)(v10 + 836) &= ~1u; *(_DWORD *)(v10 + 840) = 1; return v10; } else { LABEL_15: free_root(v10 + 48, 0LL); my_free(v10); return 0LL; } }
ft_init_boolean_search: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 LEA RAX,[0xd7a57c] MOV EDI,dword ptr [RAX] MOV ESI,0x350 MOV EDX,0x10 CALL 0x001f3830 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x0019e33c MOV qword ptr [RBP + -0x8],0x0 JMP 0x0019e689 LAB_0019e33c: MOV RAX,qword ptr [RBP + -0x38] LEA RCX,[0x3b45c8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x348],0x0 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x340],ECX MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x10],RCX JMP 0x0019e37f LAB_0019e37f: MOV RAX,qword ptr [RBP + -0x38] MOV byte ptr [RAX + 0x344],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x338],-0x1 MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0xa0 XOR ESI,ESI MOV EDX,0x298 CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x28],0x0 LEA RAX,[0xd7a57c] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x38] ADD RSI,0x30 MOV ECX,0x400 XOR EAX,EAX MOV R8D,EAX MOV RDX,RCX CALL 0x001ed170 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x84],0x0 MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x30 MOV ESI,0x50 CALL 0x001ed430 MOV qword ptr [RBP + -0x40],RAX CMP RAX,0x0 JNZ 0x0019e40e JMP 0x0019e667 LAB_0019e40e: MOV RAX,qword ptr [RBP + -0x40] MOVSS XMM0,dword ptr [0x00251008] MOVSS dword ptr [RAX + 0x28],XMM0 MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RAX + 0x8],0x2 MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RAX + 0x44],0x1 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RAX + 0x4c],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV dword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX + 0x20],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX + 0x18],-0x1 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX + 0x10],-0x1 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX + 0x38],0x0 MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4c],EAX CMP dword ptr [RBP + -0x14],-0x1 JNZ 0x0019e4c7 LEA RAX,[0x3bf180] MOV qword ptr [RBP + -0x68],RAX JMP 0x0019e4e7 LAB_0019e4c7: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x68],RAX LAB_0019e4e7: MOV EDX,dword ptr [RBP + -0x4c] MOV RSI,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x68] CALL 0x0019e6a0 CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0019e513 JMP 0x0019e667 LAB_0019e513: MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x30 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x84] ADD EAX,0x1 MOV EAX,EAX MOV ESI,EAX SHL RSI,0x3 CALL 0x001ed430 MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RCX + 0x70],RAX CMP RAX,0x0 JNZ 0x0019e548 JMP 0x0019e667 LAB_0019e548: MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x70 MOV RAX,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RAX + 0x84] XOR ECX,ECX LEA R8,[0x19e7b0] XOR EAX,EAX MOV R9D,EAX MOV EDX,ECX MOV dword ptr [RSP],0x0 MOV dword ptr [RSP + 0x8],0x0 CALL 0x001f7040 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x48],RAX LAB_0019e58a: CMP qword ptr [RBP + -0x48],0x0 JZ 0x0019e5b0 MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x70 MOV RSI,qword ptr [RBP + -0x48] CALL 0x001f71c0 MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x48],RAX JMP 0x0019e58a LAB_0019e5b0: MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x30 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x80] MOV ESI,EAX SHL RSI,0x3 CALL 0x001ed430 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x70] ADD RSI,0x8 MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x80] MOV EDX,EAX SHL RDX,0x3 CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x80] MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x38] MOV R8,qword ptr [RAX + 0x10] MOV EDX,0x8 LEA RCX,[0x19e880] CALL 0x001eb150 MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX + 0x80],0x2 JNC 0x0019e64f MOV RAX,qword ptr [RBP + -0x38] MOVZX ECX,byte ptr [RAX + 0x344] AND ECX,0xfffffffe MOV byte ptr [RAX + 0x344],CL LAB_0019e64f: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x348],0x1 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x0019e689 LAB_0019e667: MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x30 XOR EAX,EAX MOV ESI,EAX CALL 0x001ed9e0 MOV RDI,qword ptr [RBP + -0x38] CALL 0x001f3bb0 MOV qword ptr [RBP + -0x8],0x0 LAB_0019e689: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x80 POP RBP RET
int8 * ft_init_boolean_search (long *param_1,uint param_2,int8 param_3,int4 param_4,int8 param_5) { int iVar1; int8 *puVar2; int8 *puVar3; long lVar4; int8 uVar5; int1 *local_70; long local_50; puVar2 = (int8 *)my_malloc(mi_key_memory_FTB,0x350,0x10); if (puVar2 != (int8 *)0x0) { *puVar2 = _ft_vft_boolean; *(int4 *)(puVar2 + 0x69) = 0; puVar2[1] = param_1; *(uint *)(puVar2 + 0x68) = param_2; puVar2[2] = param_5; *(int1 *)((long)puVar2 + 0x344) = 0; puVar2[0x67] = 0xffffffffffffffff; memset(puVar2 + 0x14,0,0x298); puVar2[5] = 0; init_alloc_root(mi_key_memory_FTB,puVar2 + 6,0x400,0x400,0); *(int4 *)((long)puVar2 + 0x84) = 0; puVar3 = (int8 *)alloc_root(puVar2 + 6,0x50); if (puVar3 != (int8 *)0x0) { *(int4 *)(puVar3 + 5) = DAT_00251008; *(int4 *)(puVar3 + 1) = 2; *(int4 *)((long)puVar3 + 0x44) = 1; *puVar3 = 0; *(int4 *)((long)puVar3 + 0x4c) = 0; *(int4 *)(puVar3 + 9) = 0; puVar3[4] = 0; puVar3[3] = 0xffffffffffffffff; puVar3[2] = 0xffffffffffffffff; puVar3[6] = 0; puVar3[7] = 0; puVar2[3] = puVar3; if (param_2 == 0xffffffff) { local_70 = ft_default_parser; } else { local_70 = *(int1 **)(*(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70 + 0x38); } iVar1 = _ftb_parse_query(puVar2,param_3,param_4,local_70); if (iVar1 == 0) { lVar4 = alloc_root(puVar2 + 6,(ulong)(*(int *)((long)puVar2 + 0x84) + 1) << 3); puVar2[0xe] = lVar4; if (lVar4 != 0) { reinit_queue(puVar2 + 0xe,*(int4 *)((long)puVar2 + 0x84),0,0,FTB_WORD_cmp,0,0,0); for (local_50 = puVar2[5]; local_50 != 0; local_50 = *(long *)(local_50 + 0x38)) { queue_insert(puVar2 + 0xe,local_50); } uVar5 = alloc_root(puVar2 + 6,(ulong)*(uint *)(puVar2 + 0x10) << 3); puVar2[4] = uVar5; memcpy((void *)puVar2[4],(void *)(puVar2[0xe] + 8),(ulong)*(uint *)(puVar2 + 0x10) << 3); my_qsort2(puVar2[4],*(int4 *)(puVar2 + 0x10),8,FTB_WORD_cmp_list,puVar2[2]); if (*(uint *)(puVar2 + 0x10) < 2) { *(byte *)((long)puVar2 + 0x344) = *(byte *)((long)puVar2 + 0x344) & 0xfe; } *(int4 *)(puVar2 + 0x69) = 1; return puVar2; } } } free_root(puVar2 + 6,0); my_free(puVar2); } return (int8 *)0x0; }
44,943
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const std::vector<int> & values) { std::stringstream buf; buf << "[ "; bool first = true; for (auto e : values) { if (first) { first = false; } else { buf << ", "; } buf << std::to_string(e); } buf << " ]"; return buf.str(); }
O0
cpp
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&): subq $0x208, %rsp # imm = 0x208 movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0x200(%rsp) movq %rsi, 0x1f8(%rsp) leaq 0x70(%rsp), %rdi callq 0x52460 leaq 0x80(%rsp), %rdi leaq 0xf116e(%rip), %rsi # 0x1ccffb callq 0x52890 jmp 0xdbe94 movb $0x1, 0x63(%rsp) movq 0x1f8(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0xe6850 movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rdi callq 0xe6880 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0xe68b0 testb $0x1, %al jne 0xdbedc jmp 0xdbf86 leaq 0x50(%rsp), %rdi callq 0xe68f0 movl (%rax), %eax movl %eax, 0x44(%rsp) testb $0x1, 0x63(%rsp) je 0xdbf0d movb $0x0, 0x63(%rsp) jmp 0xdbf25 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) jmp 0xdbfc4 leaq 0x80(%rsp), %rdi leaq 0xf1a99(%rip), %rsi # 0x1cd9b5 callq 0x52890 jmp 0xdbf23 jmp 0xdbf25 leaq 0x80(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x44(%rsp), %esi leaq 0x20(%rsp), %rdi callq 0x8f460 jmp 0xdbf42 movq 0x8(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x52450 jmp 0xdbf53 leaq 0x20(%rsp), %rdi callq 0x53140 leaq 0x50(%rsp), %rdi callq 0xe6900 jmp 0xdbec4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x68(%rsp) movl %eax, 0x64(%rsp) leaq 0x20(%rsp), %rdi callq 0x53140 jmp 0xdbfc4 leaq 0x80(%rsp), %rdi leaq 0xf1069(%rip), %rsi # 0x1ccffe callq 0x52890 jmp 0xdbf9c movq 0x10(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x52a40 jmp 0xdbfad leaq 0x70(%rsp), %rdi callq 0x52570 movq 0x18(%rsp), %rax addq $0x208, %rsp # imm = 0x208 retq leaq 0x70(%rsp), %rdi callq 0x52570 movq 0x68(%rsp), %rdi callq 0x52990 nopl (%rax,%rax)
_Z11string_fromB5cxx11RKSt6vectorIiSaIiEE: sub rsp, 208h mov [rsp+208h+var_1F8], rdi mov rax, rdi mov [rsp+208h+var_1F0], rax mov [rsp+208h+var_8], rdi mov [rsp+208h+var_10], rsi lea rdi, [rsp+208h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+208h+var_188] lea rsi, asc_1CCFFB; "[ " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_DBE94: mov [rsp+208h+var_1A5], 1 mov rax, [rsp+208h+var_10] mov [rsp+208h+var_1B0], rax mov rdi, [rsp+208h+var_1B0] call _ZNKSt6vectorIiSaIiEE5beginEv; std::vector<int>::begin(void) mov [rsp+208h+var_1B8], rax mov rdi, [rsp+208h+var_1B0] call _ZNKSt6vectorIiSaIiEE3endEv; std::vector<int>::end(void) mov [rsp+208h+var_1C0], rax loc_DBEC4: lea rdi, [rsp+208h+var_1B8] lea rsi, [rsp+208h+var_1C0] call _ZN9__gnu_cxxneIPKiSt6vectorIiSaIiEEEEbRKNS_17__normal_iteratorIT_T0_EESB_; __gnu_cxx::operator!=<int const*,std::vector<int>>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&,__gnu_cxx::__normal_iterator<int const*,std::vector<int>> const&) test al, 1 jnz short loc_DBEDC jmp loc_DBF86 loc_DBEDC: lea rdi, [rsp+208h+var_1B8] call _ZNK9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEdeEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(void) mov eax, [rax] mov [rsp+208h+var_1C4], eax test [rsp+208h+var_1A5], 1 jz short loc_DBF0D mov [rsp+208h+var_1A5], 0 jmp short loc_DBF25 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax jmp loc_DBFC4 loc_DBF0D: lea rdi, [rsp+208h+var_188] lea rsi, aZuD+6; ", " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_DBF23: jmp short $+2 loc_DBF25: lea rax, [rsp+208h+var_188] mov [rsp+208h+var_200], rax mov esi, [rsp+208h+var_1C4]; int lea rdi, [rsp+208h+var_1E8]; this call _ZNSt7__cxx119to_stringEi; std::to_string(int) jmp short $+2 loc_DBF42: mov rdi, [rsp+208h+var_200] lea rsi, [rsp+208h+var_1E8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) jmp short $+2 loc_DBF53: lea rdi, [rsp+208h+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+208h+var_1B8] call _ZN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEppEv; __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(void) jmp loc_DBEC4 mov rcx, rax mov eax, edx mov [rsp+arg_60], rcx mov [rsp+arg_5C], eax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_DBFC4 loc_DBF86: lea rdi, [rsp+208h+var_188] lea rsi, asc_1CCFFE; " ]" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_DBF9C: mov rdi, [rsp+208h+var_1F8] lea rsi, [rsp+208h+var_198] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_DBFAD: lea rdi, [rsp+208h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rsp+208h+var_1F0] add rsp, 208h retn loc_DBFC4: lea rdi, [rsp+arg_68] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, [rsp+arg_60] call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, long long a2) { _BYTE v3[36]; // [rsp+20h] [rbp-1E8h] BYREF int v4; // [rsp+44h] [rbp-1C4h] long long v5; // [rsp+48h] [rbp-1C0h] BYREF long long v6; // [rsp+50h] [rbp-1B8h] BYREF long long v7; // [rsp+58h] [rbp-1B0h] char v8; // [rsp+63h] [rbp-1A5h] _BYTE v9[16]; // [rsp+70h] [rbp-198h] BYREF _BYTE v10[376]; // [rsp+80h] [rbp-188h] BYREF long long v11; // [rsp+1F8h] [rbp-10h] long long v12; // [rsp+200h] [rbp-8h] v12 = a1; v11 = a2; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v9); std::operator<<<std::char_traits<char>>(v10, "[ "); v8 = 1; v7 = v11; v6 = std::vector<int>::begin(v11); v5 = std::vector<int>::end(v7); while ( (__gnu_cxx::operator!=<int const*,std::vector<int>>(&v6, &v5) & 1) != 0 ) { v4 = *(_DWORD *)__gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator*(&v6); if ( (v8 & 1) != 0 ) v8 = 0; else std::operator<<<std::char_traits<char>>(v10, ", "); std::to_string((std::__cxx11 *)v3, v4); std::operator<<<char>(v10, v3); std::string::~string(v3); __gnu_cxx::__normal_iterator<int const*,std::vector<int>>::operator++(&v6); } std::operator<<<std::char_traits<char>>(v10, " ]"); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v9); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v9); return a1; }
string_from[abi:cxx11]: SUB RSP,0x208 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x200],RDI MOV qword ptr [RSP + 0x1f8],RSI LEA RDI,[RSP + 0x70] CALL 0x00152460 LEA RDI,[RSP + 0x80] LAB_001dbe86: LEA RSI,[0x2ccffb] CALL 0x00152890 JMP 0x001dbe94 LAB_001dbe94: MOV byte ptr [RSP + 0x63],0x1 MOV RAX,qword ptr [RSP + 0x1f8] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x001e6850 MOV qword ptr [RSP + 0x50],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x001e6880 MOV qword ptr [RSP + 0x48],RAX LAB_001dbec4: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x48] CALL 0x001e68b0 TEST AL,0x1 JNZ 0x001dbedc JMP 0x001dbf86 LAB_001dbedc: LEA RDI,[RSP + 0x50] CALL 0x001e68f0 MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x44],EAX TEST byte ptr [RSP + 0x63],0x1 JZ 0x001dbf0d MOV byte ptr [RSP + 0x63],0x0 JMP 0x001dbf25 LAB_001dbf0d: LEA RDI,[RSP + 0x80] LEA RSI,[0x2cd9b5] CALL 0x00152890 JMP 0x001dbf23 LAB_001dbf23: JMP 0x001dbf25 LAB_001dbf25: LEA RAX,[RSP + 0x80] MOV qword ptr [RSP + 0x8],RAX MOV ESI,dword ptr [RSP + 0x44] LEA RDI,[RSP + 0x20] CALL 0x0018f460 JMP 0x001dbf42 LAB_001dbf42: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x20] CALL 0x00152450 JMP 0x001dbf53 LAB_001dbf53: LEA RDI,[RSP + 0x20] CALL 0x00153140 LEA RDI,[RSP + 0x50] CALL 0x001e6900 JMP 0x001dbec4 LAB_001dbf86: LEA RDI,[RSP + 0x80] LAB_001dbf8e: LEA RSI,[0x2ccffe] CALL 0x00152890 JMP 0x001dbf9c LAB_001dbf9c: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x70] CALL 0x00152a40 LAB_001dbfab: JMP 0x001dbfad LAB_001dbfad: LEA RDI,[RSP + 0x70] CALL 0x00152570 MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x208 RET
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */ vector * string_from_abi_cxx11_(vector *param_1) { bool bVar1; int *piVar2; vector<int,std::allocator<int>> *in_RSI; __cxx11 local_1e8 [36]; int local_1c4; int8 local_1c0; int8 local_1b8; vector<int,std::allocator<int>> *local_1b0; byte local_1a5; stringstream local_198 [16]; ostream local_188 [376]; vector<int,std::allocator<int>> *local_10; vector *local_8; local_10 = in_RSI; local_8 = param_1; std::__cxx11::stringstream::stringstream(local_198); /* try { // try from 001dbe86 to 001dbf3f has its CatchHandler @ 001dbefa */ std::operator<<(local_188,"[ "); local_1a5 = 1; local_1b0 = local_10; local_1b8 = std::vector<int,std::allocator<int>>::begin(local_10); local_1c0 = std::vector<int,std::allocator<int>>::end(local_1b0); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_1b8,(__normal_iterator *)&local_1c0); if (!bVar1) break; piVar2 = (int *)__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>:: operator*((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *) &local_1b8); local_1c4 = *piVar2; if ((local_1a5 & 1) == 0) { std::operator<<(local_188,", "); } else { local_1a5 = 0; } std::__cxx11::to_string(local_1e8,local_1c4); /* try { // try from 001dbf42 to 001dbf50 has its CatchHandler @ 001dbf6c */ std::operator<<(local_188,(string *)local_1e8); std::__cxx11::string::~string((string *)local_1e8); __gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>::operator++ ((__normal_iterator<int_const*,std::vector<int,std::allocator<int>>> *)&local_1b8); } /* try { // try from 001dbf8e to 001dbfaa has its CatchHandler @ 001dbefa */ std::operator<<(local_188," ]"); std::__cxx11::stringstream::str(); std::__cxx11::stringstream::~stringstream(local_198); return param_1; }
44,944
register_mutex_class(char const*, unsigned int, int)
eloqsql/storage/perfschema/pfs_instr_class.cc
PFS_sync_key register_mutex_class(const char *name, uint name_length, int flags) { uint32 index; PFS_mutex_class *entry; /* This is a full array scan, which is not optimal. This is acceptable since this code is only used at startup, or when a plugin is loaded. */ REGISTER_CLASS_BODY_PART(index, mutex_class_array, mutex_class_max, name, name_length) /* Note that: mutex_class_dirty_count is incremented *before* an entry is added mutex_class_allocated_count is incremented *after* an entry is added */ index= PFS_atomic::add_u32(&mutex_class_dirty_count, 1); if (index < mutex_class_max) { /* The instrument was not found (from a possible previous load / unload of a plugin), allocate it. This code is safe when 2 threads execute in parallel for different mutex classes: - thread 1 registering class A - thread 2 registering class B will not collide in the same mutex_class_array[index] entry. This code does not protect against 2 threads registering in parallel the same class: - thread 1 registering class A - thread 2 registering class A could lead to a duplicate class A entry. This is ok, since this case can not happen in the caller: - classes names are derived from a plugin name ('wait/synch/mutex/<plugin>/xxx') - 2 threads can not register concurrently the same plugin in INSTALL PLUGIN. */ entry= &mutex_class_array[index]; init_instr_class(entry, name, name_length, flags, PFS_CLASS_MUTEX); entry->m_mutex_stat.reset(); entry->m_event_name_index= mutex_class_start + index; entry->m_singleton= NULL; entry->m_enabled= false; /* disabled by default */ entry->m_timed= false; /* Set user-defined configuration options for this instrument */ configure_instr_class(entry); /* Now that this entry is populated, advertise it Technically, there is a small race condition here: T0: mutex_class_dirty_count= 10 mutex_class_allocated_count= 10 T1: Thread A increment mutex_class_dirty_count to 11 T2: Thread B increment mutex_class_dirty_count to 12 T3: Thread A populate entry 11 T4: Thread B populate entry 12 T5: Thread B increment mutex_class_allocated_count to 11, advertise thread A incomplete record 11, but does not advertise thread B complete record 12 T6: Thread A increment mutex_class_allocated_count to 12 This has no impact, and is acceptable. A reader will not see record 12 for a short time. A reader will see an incomplete record 11 for a short time, which is ok: the mutex name / statistics will be temporarily empty/NULL/zero, but this won't cause a crash (mutex_class_array is initialized with MY_ZEROFILL). */ PFS_atomic::add_u32(&mutex_class_allocated_count, 1); return (index + 1); } /* Out of space, report to SHOW STATUS that the allocated memory was too small. */ if (pfs_enabled) mutex_class_lost++; return 0; }
O0
cpp
register_mutex_class(char const*, unsigned int, int): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpq 0x3cfded(%rip), %rax # 0x40a040 jae 0x3a2af movq 0x3cfe7c(%rip), %rax # 0x40a0d8 movl -0x1c(%rbp), %ecx shlq $0x8, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movl 0x94(%rax), %eax cmpl -0x14(%rbp), %eax jne 0x3a2a2 movq -0x28(%rbp), %rdi addq $0x14, %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %eax movl %eax, %edx callq 0x26170 cmpl $0x0, %eax jne 0x3a2a2 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x3a387 jmp 0x3a2a4 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x3a249 leaq 0x3d0636(%rip), %rdi # 0x40a8ec movl $0x1, %esi callq 0x379a0 movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax cmpq 0x3cfd73(%rip), %rax # 0x40a040 jae 0x3a365 movq 0x3cfdfe(%rip), %rax # 0x40a0d8 movl -0x1c(%rbp), %ecx shlq $0x8, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movl -0x18(%rbp), %ecx movl $0x1, %r8d callq 0x38f70 movq -0x28(%rbp), %rdi addq $0xa0, %rdi callq 0x33370 movl 0x3d05b9(%rip), %ecx # 0x40a8d0 addl -0x1c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x28(%rbp), %rax movq $0x0, 0xc0(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x4(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x5(%rax) movq -0x28(%rbp), %rdi callq 0x39010 leaq 0x3d0598(%rip), %rdi # 0x40a8e8 movl $0x1, %esi callq 0x379a0 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x3a387 cmpb $0x0, 0x1d8fc4(%rip) # 0x213330 je 0x3a380 movq 0x3cfcd3(%rip), %rax # 0x40a048 addq $0x1, %rax movq %rax, 0x3cfcc8(%rip) # 0x40a048 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq
_Z20register_mutex_classPKcji: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_1C], 0 loc_3A249: mov eax, [rbp+var_1C] cmp rax, cs:mutex_class_max jnb short loc_3A2AF mov rax, cs:mutex_class_array mov ecx, [rbp+var_1C] shl rcx, 8 add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_28] mov eax, [rax+94h] cmp eax, [rbp+var_14] jnz short loc_3A2A2 mov rdi, [rbp+var_28] add rdi, 14h mov rsi, [rbp+var_10] mov eax, [rbp+var_14] mov edx, eax call _strncmp cmp eax, 0 jnz short loc_3A2A2 mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_4], eax jmp loc_3A387 loc_3A2A2: jmp short $+2 loc_3A2A4: mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_3A249 loc_3A2AF: lea rdi, _ZL23mutex_class_dirty_count; this mov esi, (offset dword_0+1); unsigned int * call _ZN10PFS_atomic7add_u32EPjj; PFS_atomic::add_u32(uint *,uint) mov [rbp+var_1C], eax mov eax, [rbp+var_1C] cmp rax, cs:mutex_class_max jnb loc_3A365 mov rax, cs:mutex_class_array mov ecx, [rbp+var_1C] shl rcx, 8 add rax, rcx mov [rbp+var_28], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov ecx, [rbp+var_18] mov r8d, 1 call _ZL16init_instr_classP15PFS_instr_classPKcji14PFS_class_type; init_instr_class(PFS_instr_class *,char const*,uint,int,PFS_class_type) mov rdi, [rbp+var_28] add rdi, 0A0h; this call _ZN14PFS_mutex_stat5resetEv; PFS_mutex_stat::reset(void) mov ecx, cs:mutex_class_start add ecx, [rbp+var_1C] mov rax, [rbp+var_28] mov [rax+10h], ecx mov rax, [rbp+var_28] mov qword ptr [rax+0C0h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+4], 0 mov rax, [rbp+var_28] mov byte ptr [rax+5], 0 mov rdi, [rbp+var_28]; PFS_instr_class * call _ZL21configure_instr_classP15PFS_instr_class; configure_instr_class(PFS_instr_class *) lea rdi, _ZL27mutex_class_allocated_count; this mov esi, (offset dword_0+1); unsigned int * call _ZN10PFS_atomic7add_u32EPjj; PFS_atomic::add_u32(uint *,uint) mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_4], eax jmp short loc_3A387 loc_3A365: cmp cs:pfs_enabled, 0 jz short loc_3A380 mov rax, cs:mutex_class_lost add rax, 1 mov cs:mutex_class_lost, rax loc_3A380: mov [rbp+var_4], 0 loc_3A387: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long register_mutex_class(const char *a1, unsigned int a2, int a3) { PFS_instr_class *v4; // [rsp+8h] [rbp-28h] PFS_instr_class *v5; // [rsp+8h] [rbp-28h] unsigned int i; // [rsp+14h] [rbp-1Ch] unsigned int v7; // [rsp+14h] [rbp-1Ch] for ( i = 0; i < mutex_class_max; ++i ) { v4 = (PFS_instr_class *)(((unsigned long long)i << 8) + mutex_class_array); if ( *((_DWORD *)v4 + 37) == a2 && !(unsigned int)strncmp((char *)v4 + 20, a1, a2) ) return i + 1; } v7 = PFS_atomic::add_u32((PFS_atomic *)&mutex_class_dirty_count, (unsigned int *)((char *)&dword_0 + 1)); if ( v7 >= mutex_class_max ) { if ( pfs_enabled ) ++mutex_class_lost; return 0; } else { v5 = (PFS_instr_class *)(((unsigned long long)v7 << 8) + mutex_class_array); init_instr_class((long long)v5, (long long)a1, a2, a3, 1); PFS_mutex_stat::reset((PFS_instr_class *)((char *)v5 + 160)); *((_DWORD *)v5 + 4) = v7 + mutex_class_start; *((_QWORD *)v5 + 24) = 0LL; *((_BYTE *)v5 + 4) = 0; *((_BYTE *)v5 + 5) = 0; configure_instr_class(v5); PFS_atomic::add_u32((PFS_atomic *)&mutex_class_allocated_count, (unsigned int *)((char *)&dword_0 + 1)); return v7 + 1; } }
register_mutex_class: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV dword ptr [RBP + -0x1c],0x0 LAB_0013a249: MOV EAX,dword ptr [RBP + -0x1c] CMP RAX,qword ptr [0x0050a040] JNC 0x0013a2af MOV RAX,qword ptr [0x0050a0d8] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x8 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX + 0x94] CMP EAX,dword ptr [RBP + -0x14] JNZ 0x0013a2a2 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x14 MOV RSI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX CALL 0x00126170 CMP EAX,0x0 JNZ 0x0013a2a2 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x0013a387 LAB_0013a2a2: JMP 0x0013a2a4 LAB_0013a2a4: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0013a249 LAB_0013a2af: LEA RDI,[0x50a8ec] MOV ESI,0x1 CALL 0x001379a0 MOV dword ptr [RBP + -0x1c],EAX MOV EAX,dword ptr [RBP + -0x1c] CMP RAX,qword ptr [0x0050a040] JNC 0x0013a365 MOV RAX,qword ptr [0x0050a0d8] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x8 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV ECX,dword ptr [RBP + -0x18] MOV R8D,0x1 CALL 0x00138f70 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0xa0 CALL 0x00133370 MOV ECX,dword ptr [0x0050a8d0] ADD ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0xc0],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x5],0x0 MOV RDI,qword ptr [RBP + -0x28] CALL 0x00139010 LEA RDI,[0x50a8e8] MOV ESI,0x1 CALL 0x001379a0 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x0013a387 LAB_0013a365: CMP byte ptr [0x00313330],0x0 JZ 0x0013a380 MOV RAX,qword ptr [0x0050a048] ADD RAX,0x1 MOV qword ptr [0x0050a048],RAX LAB_0013a380: MOV dword ptr [RBP + -0x4],0x0 LAB_0013a387: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
/* register_mutex_class(char const*, unsigned int, int) */ int register_mutex_class(char *param_1,uint param_2,int param_3) { int iVar1; uint uVar2; long lVar3; PFS_instr_class *pPVar4; uint local_24; int local_c; local_24 = 0; while( true ) { if (mutex_class_max <= local_24) { uVar2 = PFS_atomic::add_u32(&mutex_class_dirty_count,1); if (uVar2 < mutex_class_max) { pPVar4 = (PFS_instr_class *)(mutex_class_array + (ulong)uVar2 * 0x100); init_instr_class(pPVar4,param_1,param_2,param_3,1); PFS_mutex_stat::reset((PFS_mutex_stat *)(pPVar4 + 0xa0)); *(uint *)(pPVar4 + 0x10) = mutex_class_start + uVar2; *(int8 *)(pPVar4 + 0xc0) = 0; pPVar4[4] = (PFS_instr_class)0x0; pPVar4[5] = (PFS_instr_class)0x0; configure_instr_class(pPVar4); PFS_atomic::add_u32(&mutex_class_allocated_count,1); local_c = uVar2 + 1; } else { if (pfs_enabled != '\0') { mutex_class_lost = mutex_class_lost + 1; } local_c = 0; } return local_c; } lVar3 = mutex_class_array + (ulong)local_24 * 0x100; if ((*(uint *)(lVar3 + 0x94) == param_2) && (iVar1 = strncmp((char *)(lVar3 + 0x14),param_1,(ulong)param_2), iVar1 == 0)) break; local_24 = local_24 + 1; } return local_24 + 1; }
44,945
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
llama.cpp/common/minja/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { if (!filter) throw std::runtime_error("FilterNode.filter is null"); if (!body) throw std::runtime_error("FilterNode.body is null"); auto filter_value = filter->evaluate(context); if (!filter_value.is_callable()) { throw std::runtime_error("Filter must be a callable: " + filter_value.dump()); } std::string rendered_body = body->render(context); ArgumentsValue filter_args = {{Value(rendered_body)}, {}}; auto result = filter_value.call(context, filter_args); out << result.to_str(); }
O3
cpp
minja::FilterNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %rbx movq 0x20(%rdi), %rsi testq %rsi, %rsi je 0xf8993 movq %rdi, %r14 cmpq $0x0, 0x30(%rdi) je 0xf89b1 movq %rdx, %r15 leaq 0xc0(%rsp), %r12 movq %r12, %rdi callq 0xe4adc cmpq $0x0, 0x30(%r12) je 0xf89e3 movq 0x30(%r14), %rsi leaq 0xa0(%rsp), %rdi movq %r15, %rdx callq 0xbf940 leaq 0x50(%rsp), %rdi leaq 0xa0(%rsp), %rsi callq 0xbf7de movq %rsp, %rdi leaq 0x50(%rsp), %rsi leaq 0x30(%rsp), %rcx movl $0x1, %edx callq 0xc62dc xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movq $0x0, 0x28(%rsp) leaq 0x90(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x88a76 movq %r14, %rdi callq 0x8d190 leaq 0x88(%rsp), %rdi callq 0x7416e leaq 0x78(%rsp), %rdi callq 0x7416e leaq 0x68(%rsp), %r14 movq %r14, %rdi callq 0x7416e movq -0x10(%r14), %rdi testq %rdi, %rdi je 0xf880d movq 0x6d7b0(%rip), %rax # 0x165f98 cmpb $0x0, (%rax) je 0xf87f8 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xf8802 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xf880d movq (%rdi), %rax callq *0x18(%rax) leaq 0x18(%rsp), %r14 leaq 0x50(%rsp), %rdi leaq 0xc0(%rsp), %rsi movq %rsp, %rcx movq %r15, %rdx callq 0xcda98 leaq 0x30(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0xca9fc movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x210d0 leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf8866 movq 0x40(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x90(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x88a76 movq %rbx, %rdi callq 0x8d190 leaq 0x88(%rsp), %rdi callq 0x7416e leaq 0x78(%rsp), %rdi callq 0x7416e leaq 0x68(%rsp), %rbx movq %rbx, %rdi callq 0x7416e movq -0x10(%rbx), %rdi testq %rdi, %rdi je 0xf88d9 movq 0x6d6e4(%rip), %rax # 0x165f98 cmpb $0x0, (%rax) je 0xf88c4 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xf88ce movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xf88d9 movq (%rdi), %rax callq *0x18(%rax) movq %r14, %rdi callq 0xce162 movq %rsp, %rdi callq 0xc18fc leaq 0xb0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf890a movq 0xb0(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x100(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x88a76 movq %rbx, %rdi callq 0x8d190 leaq 0xf8(%rsp), %rdi callq 0x7416e leaq 0xe8(%rsp), %rdi callq 0x7416e leaq 0xd8(%rsp), %rbx movq %rbx, %rdi callq 0x7416e movq -0x10(%rbx), %rdi testq %rdi, %rdi je 0xf8983 movq 0x6d63a(%rip), %rax # 0x165f98 cmpb $0x0, (%rax) je 0xf896e movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xf8978 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xf8983 movq (%rdi), %rax callq *0x18(%rax) addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x20680 movq %rax, %r14 leaq 0x2cafd(%rip), %rsi # 0x1254a4 movq %rax, %rdi callq 0x20450 jmp 0xf89cd movl $0x10, %edi callq 0x20680 movq %rax, %r14 leaq 0x2caf9(%rip), %rsi # 0x1254be movq %rax, %rdi callq 0x20450 movq 0x6d5ec(%rip), %rsi # 0x165fc0 movq 0x6d5a5(%rip), %rdx # 0x165f80 movq %r14, %rdi callq 0x20ab0 movl $0x10, %edi callq 0x20680 movq %rax, %r14 movq %rsp, %rdi leaq 0xc0(%rsp), %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb99d8 leaq 0x2cac8(%rip), %rsi # 0x1254d6 leaq 0x50(%rsp), %rdi movq %rsp, %rdx callq 0xb3278 movb $0x1, %bpl leaq 0x50(%rsp), %rsi movq %r14, %rdi callq 0x204b0 xorl %ebp, %ebp movq 0x6d58c(%rip), %rsi # 0x165fc0 movq 0x6d545(%rip), %rdx # 0x165f80 movq %r14, %rdi callq 0x20ab0 movq %rax, %rbx leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf8a61 movq 0x60(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf8a7c movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xf8aa9 jmp 0xf8b44 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf8aa9 movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xf8aa9 movq %rax, %rbx movq %r14, %rdi callq 0x20f60 jmp 0xf8b44 jmp 0xf8ab8 movq %rax, %rbx movq %r14, %rdi callq 0x20f60 jmp 0xf8b51 movq %rax, %rbx leaq 0x40(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf8aeb movq 0x40(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xf8aeb movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0xb9a74 jmp 0xf8afa movq %rax, %rbx movq %r14, %rdi callq 0xce162 movq %rsp, %rdi callq 0xc18fc jmp 0xf8b1e movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0xb9a74 jmp 0xf8b1e movq %rax, %rbx leaq 0xb0(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xf8b44 movq 0xb0(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xf8b44 movq %rax, %rbx leaq 0xc0(%rsp), %rdi callq 0xb9a74 movq %rbx, %rdi callq 0x20b50 nop
_ZNK5minja10FilterNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 110h mov rbx, rsi mov rsi, [rdi+20h] test rsi, rsi jz loc_F8993 mov r14, rdi cmp qword ptr [rdi+30h], 0 jz loc_F89B1 mov r15, rdx lea r12, [rsp+138h+var_78] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp qword ptr [r12+30h], 0 jz loc_F89E3 mov rsi, [r14+30h] lea rdi, [rsp+138h+var_98] mov rdx, r15 call _ZNK5minja12TemplateNode6renderB5cxx11ERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::shared_ptr<minja::Context> const&) lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_98] call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, rsp lea rsi, [rsp+138h+var_E8] lea rcx, [rsp+138h+var_108] mov edx, 1 call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<minja::Value>::vector(std::initializer_list<minja::Value>,std::allocator<minja::Value> const&) xorps xmm0, xmm0 movups [rsp+138h+var_120], xmm0 mov [rsp+138h+var_110], 0 lea r14, [rsp+138h+var_A8] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+138h+var_B0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+138h+var_C0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r14, [rsp+138h+var_D0] mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r14-10h] test rdi, rdi jz short loc_F880D mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_F87F8 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_F8802 loc_F87F8: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_F8802: cmp eax, 1 jnz short loc_F880D mov rax, [rdi] call qword ptr [rax+18h] loc_F880D: lea r14, [rsp+138h+var_120] lea rdi, [rsp+138h+var_E8] lea rsi, [rsp+138h+var_78] mov rcx, rsp mov rdx, r15 call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) lea rdi, [rsp+138h+var_108] lea rsi, [rsp+138h+var_E8] call _ZNK5minja5Value6to_strB5cxx11Ev; minja::Value::to_str(void) mov rsi, [rsp+138h+var_108] mov rdx, [rsp+138h+var_100] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+138h+var_F8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F8866 mov rsi, [rsp+138h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F8866: lea rbx, [rsp+138h+var_A8] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+138h+var_B0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+138h+var_C0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rbx, [rsp+138h+var_D0] mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rbx-10h] test rdi, rdi jz short loc_F88D9 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_F88C4 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_F88CE loc_F88C4: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_F88CE: cmp eax, 1 jnz short loc_F88D9 mov rax, [rdi] call qword ptr [rax+18h] loc_F88D9: mov rdi, r14 call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector() mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() lea rax, [rsp+138h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F890A mov rsi, [rsp+138h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F890A: lea rbx, [rsp+138h+var_38] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+138h+var_40] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+138h+var_50] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rbx, [rsp+138h+var_60] mov rdi, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rbx-10h] test rdi, rdi jz short loc_F8983 mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_F896E mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_F8978 loc_F896E: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_F8978: cmp eax, 1 jnz short loc_F8983 mov rax, [rdi] call qword ptr [rax+18h] loc_F8983: add rsp, 110h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_F8993: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeFilt; "FilterNode.filter is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_F89CD loc_F89B1: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFilternodeBody; "FilterNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_F89CD: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_F89E3: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax mov rdi, rsp lea rsi, [rsp+138h+var_78] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aFilterMustBeAC; "Filter must be a callable: " lea rdi, [rsp+138h+var_E8] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+138h+var_E8] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw mov rbx, rax lea rax, [rsp+138h+var_D8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F8A61 mov rsi, [rsp+138h+var_D8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F8A61: lea rax, [rsp+138h+var_128] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F8A7C mov rsi, [rsp+138h+var_128] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_F8A7C: test bpl, bpl jnz short loc_F8AA9 jmp loc_F8B44 mov rbx, rax lea rax, [rsp+138h+var_128] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F8AA9 mov rsi, [rsp+138h+var_128] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F8AA9 mov rbx, rax loc_F8AA9: mov rdi, r14; void * call ___cxa_free_exception jmp loc_F8B44 jmp short $+2 loc_F8AB8: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp loc_F8B51 mov rbx, rax lea rax, [rsp+138h+var_F8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F8AEB mov rsi, [rsp+138h+var_F8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F8AEB mov rbx, rax loc_F8AEB: lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_F8AFA mov rbx, rax loc_F8AFA: mov rdi, r14 call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN5minja5ValueEESaIS9_EED2Ev; std::vector<std::pair<std::string,minja::Value>>::~vector() mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_F8B1E mov rbx, rax lea rdi, [rsp+138h+var_E8]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_F8B1E mov rbx, rax loc_F8B1E: lea rax, [rsp+138h+var_88] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_F8B44 mov rsi, [rsp+138h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_F8B44 mov rbx, rax loc_F8B44: lea rdi, [rsp+138h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_F8B51: mov rdi, rbx call __Unwind_Resume
void minja::FilterNode::do_render(long long a1, long long a2, int a3) { void (***v4)(void); // rsi long long v6; // rdi signed __int32 v7; // eax long long v8; // rdi signed __int32 v9; // eax long long v10; // rdi signed __int32 v11; // eax std::runtime_error *exception; // r14 void *v13; // r14 _QWORD v14[2]; // [rsp+0h] [rbp-138h] BYREF __int128 v15; // [rsp+18h] [rbp-120h] BYREF long long v16; // [rsp+28h] [rbp-110h] void *v17[2]; // [rsp+30h] [rbp-108h] BYREF long long v18; // [rsp+40h] [rbp-F8h] BYREF long long v19; // [rsp+50h] [rbp-E8h] BYREF long long v20; // [rsp+58h] [rbp-E0h] volatile signed __int32 *v21[2]; // [rsp+68h] [rbp-D0h] BYREF volatile signed __int32 *v22[2]; // [rsp+78h] [rbp-C0h] BYREF volatile signed __int32 *v23; // [rsp+88h] [rbp-B0h] BYREF char v24[16]; // [rsp+90h] [rbp-A8h] BYREF void *v25[2]; // [rsp+A0h] [rbp-98h] BYREF long long v26; // [rsp+B0h] [rbp-88h] BYREF _BYTE v27[8]; // [rsp+C0h] [rbp-78h] BYREF long long v28; // [rsp+C8h] [rbp-70h] volatile signed __int32 *v29; // [rsp+D8h] [rbp-60h] BYREF volatile signed __int32 *v30[2]; // [rsp+E8h] [rbp-50h] BYREF volatile signed __int32 *v31; // [rsp+F8h] [rbp-40h] BYREF char v32[56]; // [rsp+100h] [rbp-38h] BYREF v4 = *(void (****)(void))(a1 + 32); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.filter is null"); goto LABEL_29; } if ( !*(_QWORD *)(a1 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "FilterNode.body is null"); LABEL_29: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v27, v4); if ( !v30[1] ) { v13 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v14, (long long)v27, 0xFFFFFFFF, 0); std::operator+<char>(&v19, (long long)"Filter must be a callable: ", (long long)v14); std::runtime_error::runtime_error(v13, &v19); __cxa_throw( v13, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::TemplateNode::render[abi:cxx11]((long long)v25, *(_QWORD *)(a1 + 48), a3); minja::Value::Value((long long)&v19, (long long)v25); std::vector<minja::Value>::vector((long long)v14, (long long)&v19, 1LL); v15 = 0LL; v16 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v24); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v24); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v23); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v22); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v21); v6 = v20; if ( v20 ) { if ( _libc_single_threaded ) { v7 = *(_DWORD *)(v20 + 12); *(_DWORD *)(v20 + 12) = v7 - 1; } else { v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v20 + 12), 0xFFFFFFFF); } if ( v7 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL); } minja::Value::call((long long)&v19, (long long)v27); minja::Value::to_str[abi:cxx11](v17, (long long)&v19); std::__ostream_insert<char,std::char_traits<char>>(a2, v17[0], v17[1]); if ( v17[0] != &v18 ) operator delete(v17[0], v18 + 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(v24); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v24); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v23); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v22); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v21); v8 = v20; if ( v20 ) { if ( _libc_single_threaded ) { v9 = *(_DWORD *)(v20 + 12); *(_DWORD *)(v20 + 12) = v9 - 1; } else { v9 = _InterlockedExchangeAdd((volatile signed __int32 *)(v20 + 12), 0xFFFFFFFF); } if ( v9 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL); } std::vector<std::pair<std::string,minja::Value>>::~vector(&v15); std::vector<minja::Value>::~vector(v14); if ( v25[0] != &v26 ) operator delete(v25[0], v26 + 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(v32); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v32); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v31); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v30); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v29); v10 = v28; if ( v28 ) { if ( _libc_single_threaded ) { v11 = *(_DWORD *)(v28 + 12); *(_DWORD *)(v28 + 12) = v11 - 1; } else { v11 = _InterlockedExchangeAdd((volatile signed __int32 *)(v28 + 12), 0xFFFFFFFF); } if ( v11 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v10 + 24LL))(v10, 0LL); } }
do_render: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x110 MOV RBX,RSI MOV RSI,qword ptr [RDI + 0x20] TEST RSI,RSI JZ 0x001f8993 MOV R14,RDI CMP qword ptr [RDI + 0x30],0x0 JZ 0x001f89b1 MOV R15,RDX LEA R12,[RSP + 0xc0] MOV RDI,R12 CALL 0x001e4adc CMP qword ptr [R12 + 0x30],0x0 JZ 0x001f89e3 MOV RSI,qword ptr [R14 + 0x30] LAB_001f8750: LEA RDI,[RSP + 0xa0] MOV RDX,R15 CALL 0x001bf940 LAB_001f8760: LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xa0] CALL 0x001bf7de LAB_001f8772: MOV RDI,RSP LEA RSI,[RSP + 0x50] LEA RCX,[RSP + 0x30] MOV EDX,0x1 CALL 0x001c62dc LAB_001f8789: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV qword ptr [RSP + 0x28],0x0 LEA R14,[RSP + 0x90] MOV RDI,R14 XOR ESI,ESI CALL 0x00188a76 MOV RDI,R14 CALL 0x0018d190 LEA RDI,[RSP + 0x88] CALL 0x0017416e LEA RDI,[RSP + 0x78] CALL 0x0017416e LEA R14,[RSP + 0x68] MOV RDI,R14 CALL 0x0017416e MOV RDI,qword ptr [R14 + -0x10] TEST RDI,RDI JZ 0x001f880d MOV RAX,qword ptr [0x00265f98] CMP byte ptr [RAX],0x0 JZ 0x001f87f8 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001f8802 LAB_001f87f8: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001f8802: CMP EAX,0x1 JNZ 0x001f880d MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001f880d: LEA R14,[RSP + 0x18] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0xc0] MOV RCX,RSP MOV RDX,R15 CALL 0x001cda98 LAB_001f882a: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x50] CALL 0x001ca9fc MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] LAB_001f8843: MOV RDI,RBX CALL 0x001210d0 LAB_001f884b: LEA RAX,[RSP + 0x40] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001f8866 MOV RSI,qword ptr [RSP + 0x40] INC RSI CALL 0x00120180 LAB_001f8866: LEA RBX,[RSP + 0x90] MOV RDI,RBX XOR ESI,ESI CALL 0x00188a76 MOV RDI,RBX CALL 0x0018d190 LEA RDI,[RSP + 0x88] CALL 0x0017416e LEA RDI,[RSP + 0x78] CALL 0x0017416e LEA RBX,[RSP + 0x68] MOV RDI,RBX CALL 0x0017416e MOV RDI,qword ptr [RBX + -0x10] TEST RDI,RDI JZ 0x001f88d9 MOV RAX,qword ptr [0x00265f98] CMP byte ptr [RAX],0x0 JZ 0x001f88c4 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001f88ce LAB_001f88c4: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001f88ce: CMP EAX,0x1 JNZ 0x001f88d9 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001f88d9: MOV RDI,R14 CALL 0x001ce162 MOV RDI,RSP CALL 0x001c18fc LEA RAX,[RSP + 0xb0] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001f890a MOV RSI,qword ptr [RSP + 0xb0] INC RSI CALL 0x00120180 LAB_001f890a: LEA RBX,[RSP + 0x100] MOV RDI,RBX XOR ESI,ESI CALL 0x00188a76 MOV RDI,RBX CALL 0x0018d190 LEA RDI,[RSP + 0xf8] CALL 0x0017416e LEA RDI,[RSP + 0xe8] CALL 0x0017416e LEA RBX,[RSP + 0xd8] MOV RDI,RBX CALL 0x0017416e MOV RDI,qword ptr [RBX + -0x10] TEST RDI,RDI JZ 0x001f8983 MOV RAX,qword ptr [0x00265f98] CMP byte ptr [RAX],0x0 JZ 0x001f896e MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001f8978 LAB_001f896e: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001f8978: CMP EAX,0x1 JNZ 0x001f8983 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001f8983: ADD RSP,0x110 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001f8993: MOV EDI,0x10 CALL 0x00120680 MOV R14,RAX LAB_001f89a0: LEA RSI,[0x2254a4] MOV RDI,RAX CALL 0x00120450 LAB_001f89af: JMP 0x001f89cd LAB_001f89b1: MOV EDI,0x10 CALL 0x00120680 MOV R14,RAX LAB_001f89be: LEA RSI,[0x2254be] MOV RDI,RAX CALL 0x00120450 LAB_001f89cd: MOV RSI,qword ptr [0x00265fc0] MOV RDX,qword ptr [0x00265f80] MOV RDI,R14 CALL 0x00120ab0 LAB_001f89e3: MOV EDI,0x10 CALL 0x00120680 MOV R14,RAX LAB_001f89f0: MOV RDI,RSP LEA RSI,[RSP + 0xc0] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b99d8 LAB_001f8a07: LEA RSI,[0x2254d6] LEA RDI,[RSP + 0x50] MOV RDX,RSP CALL 0x001b3278 MOV BPL,0x1 LAB_001f8a1e: LEA RSI,[RSP + 0x50] MOV RDI,R14 CALL 0x001204b0 XOR EBP,EBP MOV RSI,qword ptr [0x00265fc0] MOV RDX,qword ptr [0x00265f80] MOV RDI,R14 CALL 0x00120ab0
/* minja::FilterNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::FilterNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int *piVar1; int iVar2; runtime_error *prVar3; vector<minja::Value,std::allocator<minja::Value>> avStack_138 [24]; int8 local_120; int8 uStack_118; int8 local_110; long *local_108; long local_100; long local_f8 [2]; Value local_e8 [8]; long *local_e0; __shared_count<(__gnu_cxx::_Lock_policy)2> local_d0 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_c0 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_b0 [8]; data local_a8 [16]; long *local_98 [2]; long local_88 [2]; Expression local_78 [8]; long *local_70; __shared_count<(__gnu_cxx::_Lock_policy)2> local_60 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_50 [8]; long local_48; __shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [8]; data local_38 [16]; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001f89a0 to 001f89ae has its CatchHandler @ 001f8ab8 */ std::runtime_error::runtime_error(prVar3,"FilterNode.filter is null"); } else { if (*(long *)(param_1 + 0x30) != 0) { Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20)); if (local_48 != 0) { /* try { // try from 001f8750 to 001f875f has its CatchHandler @ 001f8b41 */ TemplateNode::render_abi_cxx11_((TemplateNode *)local_98,*(shared_ptr **)(param_1 + 0x30)); /* try { // try from 001f8760 to 001f8771 has its CatchHandler @ 001f8b1b */ Value::Value(local_e8,(string *)local_98); /* try { // try from 001f8772 to 001f8788 has its CatchHandler @ 001f8b0c */ std::vector<minja::Value,std::allocator<minja::Value>>::vector (avStack_138,local_e8,1,&local_108); local_120 = 0; uStack_118 = 0; local_110 = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_a8,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_a8); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_b0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_c0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_d0); if (local_e0 != (long *)0x0) { if (*PTR___libc_single_threaded_00265f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_e0 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_e0 + 0xc); *(int *)((long)local_e0 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_e0 + 0x18))(); } } /* try { // try from 001f880d to 001f8829 has its CatchHandler @ 001f8af7 */ Value::call(local_e8,(ArgumentsValue *)local_78); /* try { // try from 001f882a to 001f8838 has its CatchHandler @ 001f8ae8 */ Value::to_str_abi_cxx11_(); /* try { // try from 001f8843 to 001f884a has its CatchHandler @ 001f8ac8 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)param_2,(char *)local_108,local_100); if (local_108 != local_f8) { operator_delete(local_108,local_f8[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_a8,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_a8); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_b0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_c0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_d0); if (local_e0 != (long *)0x0) { if (*PTR___libc_single_threaded_00265f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_e0 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_e0 + 0xc); *(int *)((long)local_e0 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_e0 + 0x18))(); } } std:: vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> ::~vector((vector<std::pair<std::__cxx11::string,minja::Value>,std::allocator<std::pair<std::__cxx11::string,minja::Value>>> *)&local_120); std::vector<minja::Value,std::allocator<minja::Value>>::~vector(avStack_138); if (local_98[0] != local_88) { operator_delete(local_98[0],local_88[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_38,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_50); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_60); if (local_70 != (long *)0x0) { if (*PTR___libc_single_threaded_00265f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_70 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_70 + 0xc); *(int *)((long)local_70 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_70 + 0x18))(); } } return; } prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001f89f0 to 001f8a06 has its CatchHandler @ 001f8aa6 */ Value::dump_abi_cxx11_((int)avStack_138,SUB81(local_78,0)); /* try { // try from 001f8a07 to 001f8a1a has its CatchHandler @ 001f8a86 */ std::operator+((char *)local_e8,(string *)"Filter must be a callable: "); /* try { // try from 001f8a1e to 001f8a42 has its CatchHandler @ 001f8a43 */ std::runtime_error::runtime_error(prVar3,(string *)local_e8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00265fc0,PTR__runtime_error_00265f80); } prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001f89be to 001f89cc has its CatchHandler @ 001f8ab6 */ std::runtime_error::runtime_error(prVar3,"FilterNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00265fc0,PTR__runtime_error_00265f80); }
44,946
test_auto5
eloqsql/unittest/mysys/my_getopt-t.c
void test_auto5() { int rc; char **av= (char **)auto5_argv; rc= handle_options(&auto5_argc, &av, auto_options, &auto_get_one_option); ok( (rc == 0), "%s", "test_auto5 call"); ok( (mopts_num == 1000000L), "%s", "test_auto5 num"); ok( (auto_num == 111), "%s", "test_auto5 anum"); }
O0
c
test_auto5: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp leaq 0x1b3291(%rip), %rax # 0x1d95f0 movq %rax, -0x10(%rbp) leaq 0x1b327e(%rip), %rdi # 0x1d95e8 leaq -0x10(%rbp), %rsi leaq 0x1b30db(%rip), %rdx # 0x1d9450 leaq -0x22c(%rip), %rcx # 0x26150 callq 0x27640 movl %eax, -0x4(%rbp) cmpl $0x0, -0x4(%rbp) sete %al andb $0x1, %al movzbl %al, %edi leaq 0x5fcf6(%rip), %rsi # 0x8608d leaq 0x5c0a2(%rip), %rdx # 0x82440 movb $0x0, %al callq 0x26ba0 cmpq $0xf4240, 0x36af80(%rip) # imm = 0xF4240 sete %al andb $0x1, %al movzbl %al, %edi leaq 0x5fcce(%rip), %rsi # 0x8608d leaq 0x5c08a(%rip), %rdx # 0x82450 movb $0x0, %al callq 0x26ba0 cmpq $0x6f, 0x36af73(%rip) # 0x391348 sete %al andb $0x1, %al movzbl %al, %edi leaq 0x5fca9(%rip), %rsi # 0x8608d leaq 0x5c074(%rip), %rdx # 0x8245f movb $0x0, %al callq 0x26ba0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
test_auto5: push rbp mov rbp, rsp sub rsp, 10h lea rax, auto5_argv mov [rbp+var_10], rax lea rdi, auto5_argc lea rsi, [rbp+var_10] lea rdx, auto_options lea rcx, auto_get_one_option call handle_options mov [rbp+var_4], eax cmp [rbp+var_4], 0 setz al and al, 1 movzx edi, al lea rsi, aAtLineDPosDS+13h; "%s" lea rdx, aTestAuto5Call; "test_auto5 call" mov al, 0 call ok cmp cs:mopts_num, offset unk_F4240 setz al and al, 1 movzx edi, al lea rsi, aAtLineDPosDS+13h; "%s" lea rdx, aTestAuto5Num; "test_auto5 num" mov al, 0 call ok cmp cs:auto_num, 6Fh ; 'o' setz al and al, 1 movzx edi, al lea rsi, aAtLineDPosDS+13h; "%s" lea rdx, aTestAuto5Anum; "test_auto5 anum" mov al, 0 call ok add rsp, 10h pop rbp retn
long long test_auto5() { int v0; // ecx int v1; // r8d int v2; // r9d int v3; // ecx int v4; // r8d int v5; // r9d int v6; // ecx int v7; // r8d int v8; // r9d char **v10; // [rsp+0h] [rbp-10h] BYREF int v11; // [rsp+Ch] [rbp-4h] v10 = auto5_argv; v11 = handle_options(&auto5_argc, &v10, &auto_options, auto_get_one_option); ok(v11 == 0, (unsigned int)"%s", (unsigned int)"test_auto5 call", v0, v1, v2, (char)v10); ok(mopts_num == (_QWORD)&unk_F4240, (unsigned int)"%s", (unsigned int)"test_auto5 num", v3, v4, v5, (char)v10); return ok(auto_num == 111, (unsigned int)"%s", (unsigned int)"test_auto5 anum", v6, v7, v8, (char)v10); }
test_auto5: PUSH RBP MOV RBP,RSP SUB RSP,0x10 LEA RAX,[0x2d95f0] MOV qword ptr [RBP + -0x10],RAX LEA RDI,[0x2d95e8] LEA RSI,[RBP + -0x10] LEA RDX,[0x2d9450] LEA RCX,[0x126150] CALL 0x00127640 MOV dword ptr [RBP + -0x4],EAX CMP dword ptr [RBP + -0x4],0x0 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x18608d] LEA RDX,[0x182440] MOV AL,0x0 CALL 0x00126ba0 CMP qword ptr [0x00491330],0xf4240 SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x18608d] LEA RDX,[0x182450] MOV AL,0x0 CALL 0x00126ba0 CMP qword ptr [0x00491348],0x6f SETZ AL AND AL,0x1 MOVZX EDI,AL LEA RSI,[0x18608d] LEA RDX,[0x18245f] MOV AL,0x0 CALL 0x00126ba0 ADD RSP,0x10 POP RBP RET
void test_auto5(void) { int1 *local_18; int local_c; local_18 = auto5_argv; local_c = handle_options(&auto5_argc,&local_18,auto_options,auto_get_one_option); ok(local_c == 0,"%s","test_auto5 call"); ok(mopts_num == 1000000,"%s","test_auto5 num"); ok(auto_num == 0x6f,"%s","test_auto5 anum"); return; }
44,947
dtoa_alloc
eloqsql/strings/dtoa.c
static char *dtoa_alloc(int i, Stack_alloc *alloc) { char *rv; int aligned_size= MY_ALIGN(i, SIZEOF_CHARP); if (alloc->free + aligned_size <= alloc->end) { rv= alloc->free; alloc->free+= aligned_size; } else rv= malloc(i); return rv; }
O0
c
dtoa_alloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl -0x4(%rbp), %eax addl $0x8, %eax subl $0x1, %eax andl $-0x8, %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x1c(%rbp), %rcx addq %rcx, %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax ja 0x72dca movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movl -0x1c(%rbp), %edx movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movslq %edx, %rdx addq %rdx, %rcx movq %rcx, 0x8(%rax) jmp 0x72dd7 movslq -0x4(%rbp), %rdi callq 0x243d0 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
dtoa_alloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov eax, [rbp+var_4] add eax, 8 sub eax, 1 and eax, 0FFFFFFF8h mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rcx, [rbp+var_1C] add rax, rcx mov rcx, [rbp+var_10] cmp rax, [rcx+10h] ja short loc_72DCA mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_18], rax mov edx, [rbp+var_1C] mov rax, [rbp+var_10] mov rcx, [rax+8] movsxd rdx, edx add rcx, rdx mov [rax+8], rcx jmp short loc_72DD7 loc_72DCA: movsxd rdi, [rbp+var_4] call _malloc mov [rbp+var_18], rax loc_72DD7: mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
long long dtoa_alloc(int a1, long long a2) { signed int v3; // [rsp+4h] [rbp-1Ch] long long v4; // [rsp+8h] [rbp-18h] v3 = (a1 + 7) & 0xFFFFFFF8; if ( (unsigned long long)(v3 + *(_QWORD *)(a2 + 8)) > *(_QWORD *)(a2 + 16) ) return malloc(a1); v4 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 8) = v3 + v4; return v4; }
dtoa_alloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV EAX,dword ptr [RBP + -0x4] ADD EAX,0x8 SUB EAX,0x1 AND EAX,0xfffffff8 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RBP + -0x1c] ADD RAX,RCX MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JA 0x00172dca MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV EDX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOVSXD RDX,EDX ADD RCX,RDX MOV qword ptr [RAX + 0x8],RCX JMP 0x00172dd7 LAB_00172dca: MOVSXD RDI,dword ptr [RBP + -0x4] CALL 0x001243d0 MOV qword ptr [RBP + -0x18],RAX LAB_00172dd7: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
void * dtoa_alloc(int param_1,long param_2) { uint uVar1; int8 local_20; uVar1 = param_1 + 7U & 0xfffffff8; if (*(ulong *)(param_2 + 0x10) < (ulong)(*(long *)(param_2 + 8) + (long)(int)uVar1)) { local_20 = malloc((long)param_1); } else { local_20 = *(void **)(param_2 + 8); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + (long)(int)uVar1; } return local_20; }
44,948
crypto_sign_ed25519_ref10_fe_0
eloqsql/plugin/auth_ed25519/ref10/fe_0.c
void fe_0(fe h) { h[0] = 0; h[1] = 0; h[2] = 0; h[3] = 0; h[4] = 0; h[5] = 0; h[6] = 0; h[7] = 0; h[8] = 0; h[9] = 0; }
O3
c
crypto_sign_ed25519_ref10_fe_0: pushq %rbp movq %rsp, %rbp xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) movq $0x0, 0x20(%rdi) popq %rbp retq
crypto_sign_ed25519_ref10_fe_0: push rbp mov rbp, rsp xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+20h], 0 pop rbp retn
void crypto_sign_ed25519_ref10_fe_0(long long a1) { *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 32) = 0LL; }
crypto_sign_ed25519_ref10_fe_0: PUSH RBP MOV RBP,RSP XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x20],0x0 POP RBP RET
void crypto_sign_ed25519_ref10_fe_0(int8 *param_1) { param_1[2] = 0; param_1[3] = 0; *param_1 = 0; param_1[1] = 0; param_1[4] = 0; return; }
44,949
ma_bitmap_init
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_init(MARIA_SHARE *share, File file, pgcache_page_no_t *last_page) { uint aligned_bit_blocks; uint max_page_size; MARIA_FILE_BITMAP *bitmap= &share->bitmap; uint size= share->block_size; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); pgcache_page_no_t first_bitmap_with_space; #ifndef DBUG_OFF /* We want to have a copy of the bitmap to be able to print differences */ size*= 2; #endif if (!((bitmap->map= (uchar*) my_malloc(PSI_INSTRUMENT_ME, size, flag))) || my_init_dynamic_array(PSI_INSTRUMENT_ME, &bitmap->pinned_pages, sizeof(MARIA_PINNED_PAGE), 1, 1, flag)) return 1; bitmap->share= share; bitmap->block_size= share->block_size; bitmap->file.file= file; _ma_bitmap_set_pagecache_callbacks(&bitmap->file, share); /* Size needs to be aligned on 6 */ aligned_bit_blocks= (share->block_size - PAGE_SUFFIX_SIZE) / 6; bitmap->max_total_size= bitmap->total_size= aligned_bit_blocks * 6; /* In each 6 bytes, we have 6*8/3 = 16 pages covered The +1 is to add the bitmap page, as this doesn't have to be covered */ bitmap->pages_covered= aligned_bit_blocks * 16 + 1; bitmap->flush_all_requested= bitmap->waiting_for_flush_all_requested= bitmap->waiting_for_non_flushable= 0; bitmap->non_flushable= 0; /* Update size for bits */ /* TODO; Make this dependent of the row size */ max_page_size= share->block_size - PAGE_OVERHEAD_SIZE(share) + DIR_ENTRY_SIZE; bitmap->sizes[0]= max_page_size; /* Empty page */ bitmap->sizes[1]= max_page_size - max_page_size * 30 / 100; bitmap->sizes[2]= max_page_size - max_page_size * 60 / 100; bitmap->sizes[3]= max_page_size - max_page_size * 90 / 100; bitmap->sizes[4]= 0; /* Full page */ bitmap->sizes[5]= max_page_size - max_page_size * 40 / 100; bitmap->sizes[6]= max_page_size - max_page_size * 80 / 100; bitmap->sizes[7]= 0; /* If a record size will fit into the smallest empty page, return first found page in find_head() */ if (bitmap->sizes[3] >= share->base.max_pack_length) bitmap->return_first_match= 1; mysql_mutex_init(key_SHARE_BITMAP_lock, &share->bitmap.bitmap_lock, MY_MUTEX_INIT_SLOW); mysql_cond_init(key_SHARE_BITMAP_cond, &share->bitmap.bitmap_cond, 0); first_bitmap_with_space= share->state.first_bitmap_with_space; _ma_bitmap_reset_cache(share); /* The bitmap used to map the file are aligned on 6 bytes. We now calculate the max file size that can be used by the bitmap. This is needed to get ma_info() give a true file size so that the user can estimate if there is still space free for records in the file. */ { pgcache_page_no_t last_bitmap_page; ulong blocks, bytes; last_bitmap_page= *last_page - *last_page % bitmap->pages_covered; blocks= (ulong) (*last_page - last_bitmap_page); bytes= (blocks * 3) / 8; /* 3 bit per page / 8 bits per byte */ /* Size needs to be aligned on 6 */ bytes/= 6; bytes*= 6; bitmap->last_bitmap_page= last_bitmap_page; bitmap->last_total_size= (uint)bytes; *last_page= ((last_bitmap_page + bytes*8/3)); } /* Restore first_bitmap_with_space if it's resonable */ if (first_bitmap_with_space <= (share->state.state.data_file_length / share->block_size)) share->state.first_bitmap_with_space= first_bitmap_with_space; return 0; }
O0
c
ma_bitmap_init: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rax movsbl 0x7d9(%rax), %edx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpl $0x0, %edx cmovnel %ecx, %eax orl $0x10, %eax movl %eax, %eax movq %rax, -0x40(%rbp) movl -0x34(%rbp), %eax movl %eax, %esi movq -0x40(%rbp), %rdx xorl %edi, %edi callq 0xf7980 movq -0x30(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax je 0x5e1b2 movq -0x30(%rbp), %rsi addq $0x140, %rsi # imm = 0x140 movq -0x40(%rbp), %rax xorl %edi, %edi movl $0x18, %edx xorl %ecx, %ecx movl $0x1, %r9d movl %r9d, %r8d movq %rax, (%rsp) callq 0xde930 movsbl %al, %eax cmpl $0x0, %eax je 0x5e1bb movb $0x1, -0x1(%rbp) jmp 0x5e498 movq -0x10(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movl 0x7bc(%rax), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x134(%rax) movl -0x14(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x50(%rax) movq -0x30(%rbp), %rdi addq $0x40, %rdi movq -0x10(%rbp), %rsi callq 0x5e4b0 movq -0x10(%rbp), %rax movl 0x7bc(%rax), %eax subl $0x4, %eax movl $0x6, %ecx xorl %edx, %edx divl %ecx movl %eax, -0x24(%rbp) imull $0x6, -0x24(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x128(%rax) movq -0x30(%rbp), %rax movl %ecx, 0x12c(%rax) movl -0x24(%rbp), %eax shll $0x4, %eax addl $0x1, %eax movl %eax, %eax movl %eax, %ecx movq -0x30(%rbp), %rax movq %rcx, 0x138(%rax) movq -0x30(%rbp), %rax movl $0x0, 0x3c(%rax) movq -0x30(%rbp), %rax movl $0x0, 0x34(%rax) movq -0x30(%rbp), %rax movl $0x0, 0x30(%rax) movq -0x30(%rbp), %rax movl $0x0, 0x38(%rax) movq -0x10(%rbp), %rax movl 0x7bc(%rax), %eax movq -0x10(%rbp), %rcx movl 0xc18(%rcx), %ecx addl $0x14, %ecx subl %ecx, %eax addl $0x4, %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, 0x108(%rax) movl -0x28(%rbp), %ecx imull $0x1e, -0x28(%rbp), %eax movl $0x64, %esi xorl %edx, %edx divl %esi subl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x10c(%rax) movl -0x28(%rbp), %ecx imull $0x3c, -0x28(%rbp), %eax movl $0x64, %esi xorl %edx, %edx divl %esi subl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x110(%rax) movl -0x28(%rbp), %ecx imull $0x5a, -0x28(%rbp), %eax movl $0x64, %esi xorl %edx, %edx divl %esi subl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x114(%rax) movq -0x30(%rbp), %rax movl $0x0, 0x118(%rax) movl -0x28(%rbp), %ecx imull $0x28, -0x28(%rbp), %eax movl $0x64, %esi xorl %edx, %edx divl %esi subl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x11c(%rax) movl -0x28(%rbp), %ecx imull $0x50, -0x28(%rbp), %eax movl $0x64, %esi xorl %edx, %edx divl %esi subl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x120(%rax) movq -0x30(%rbp), %rax movl $0x0, 0x124(%rax) movq -0x30(%rbp), %rax movl 0x114(%rax), %eax movq -0x10(%rbp), %rcx cmpq 0x3b0(%rcx), %rax jb 0x5e35d movq -0x30(%rbp), %rax movb $0x1, 0x22(%rax) leaq 0x41d58c(%rip), %rax # 0x47b8f0 movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0xa10, %rsi # imm = 0xA10 addq $0x88, %rsi xorl %eax, %eax movl %eax, %edx callq 0x5e590 leaq 0x41d5bc(%rip), %rax # 0x47b944 movl (%rax), %edi movq -0x10(%rbp), %rsi addq $0xa10, %rsi # imm = 0xA10 addq $0xd0, %rsi xorl %eax, %eax movl %eax, %edx callq 0x5e600 movq -0x10(%rbp), %rax movq 0xd0(%rax), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi callq 0x5e650 movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x70(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq -0x30(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) movq -0x70(%rbp), %rax subq %rdx, %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax subq -0x50(%rbp), %rax movq %rax, -0x58(%rbp) imulq $0x3, -0x58(%rbp), %rax shrq $0x3, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movl $0x6, %ecx xorl %edx, %edx divq %rcx movq %rax, -0x60(%rbp) imulq $0x6, -0x60(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x50(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x60(%rbp), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, 0x130(%rax) movq -0x50(%rbp), %rcx movq -0x60(%rbp), %rax shlq $0x3, %rax movl $0x3, %esi xorl %edx, %edx divq %rsi addq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x48(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx movq -0x68(%rbp), %rax cmpq %rcx, %rax ja 0x5e494 movq -0x48(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xd0(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_bitmap_init: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rax, [rbp+var_10] add rax, 0A10h mov [rbp+var_30], rax mov rax, [rbp+var_10] mov eax, [rax+7BCh] mov [rbp+var_34], eax mov rax, [rbp+var_10] movsx edx, byte ptr [rax+7D9h] xor eax, eax mov ecx, 10000h cmp edx, 0 cmovnz eax, ecx or eax, 10h mov eax, eax mov [rbp+var_40], rax mov eax, [rbp+var_34] mov esi, eax mov rdx, [rbp+var_40] xor edi, edi call my_malloc mov rcx, [rbp+var_30] mov [rcx+8], rax cmp rax, 0 jz short loc_5E1B2 mov rsi, [rbp+var_30] add rsi, 140h mov rax, [rbp+var_40] xor edi, edi mov edx, 18h xor ecx, ecx mov r9d, 1 mov r8d, r9d mov [rsp+80h+var_80], rax call init_dynamic_array2 movsx eax, al cmp eax, 0 jz short loc_5E1BB loc_5E1B2: mov [rbp+var_1], 1 jmp loc_5E498 loc_5E1BB: mov rcx, [rbp+var_10] mov rax, [rbp+var_30] mov [rax], rcx mov rax, [rbp+var_10] mov ecx, [rax+7BCh] mov rax, [rbp+var_30] mov [rax+134h], ecx mov ecx, [rbp+var_14] mov rax, [rbp+var_30] mov [rax+50h], ecx mov rdi, [rbp+var_30] add rdi, 40h ; '@' mov rsi, [rbp+var_10] call _ma_bitmap_set_pagecache_callbacks mov rax, [rbp+var_10] mov eax, [rax+7BCh] sub eax, 4 mov ecx, 6 xor edx, edx div ecx mov [rbp+var_24], eax imul ecx, [rbp+var_24], 6 mov rax, [rbp+var_30] mov [rax+128h], ecx mov rax, [rbp+var_30] mov [rax+12Ch], ecx mov eax, [rbp+var_24] shl eax, 4 add eax, 1 mov eax, eax mov ecx, eax mov rax, [rbp+var_30] mov [rax+138h], rcx mov rax, [rbp+var_30] mov dword ptr [rax+3Ch], 0 mov rax, [rbp+var_30] mov dword ptr [rax+34h], 0 mov rax, [rbp+var_30] mov dword ptr [rax+30h], 0 mov rax, [rbp+var_30] mov dword ptr [rax+38h], 0 mov rax, [rbp+var_10] mov eax, [rax+7BCh] mov rcx, [rbp+var_10] mov ecx, [rcx+0C18h] add ecx, 14h sub eax, ecx add eax, 4 mov [rbp+var_28], eax mov ecx, [rbp+var_28] mov rax, [rbp+var_30] mov [rax+108h], ecx mov ecx, [rbp+var_28] imul eax, [rbp+var_28], 1Eh mov esi, 64h ; 'd' xor edx, edx div esi sub ecx, eax mov rax, [rbp+var_30] mov [rax+10Ch], ecx mov ecx, [rbp+var_28] imul eax, [rbp+var_28], 3Ch ; '<' mov esi, 64h ; 'd' xor edx, edx div esi sub ecx, eax mov rax, [rbp+var_30] mov [rax+110h], ecx mov ecx, [rbp+var_28] imul eax, [rbp+var_28], 5Ah ; 'Z' mov esi, 64h ; 'd' xor edx, edx div esi sub ecx, eax mov rax, [rbp+var_30] mov [rax+114h], ecx mov rax, [rbp+var_30] mov dword ptr [rax+118h], 0 mov ecx, [rbp+var_28] imul eax, [rbp+var_28], 28h ; '(' mov esi, 64h ; 'd' xor edx, edx div esi sub ecx, eax mov rax, [rbp+var_30] mov [rax+11Ch], ecx mov ecx, [rbp+var_28] imul eax, [rbp+var_28], 50h ; 'P' mov esi, 64h ; 'd' xor edx, edx div esi sub ecx, eax mov rax, [rbp+var_30] mov [rax+120h], ecx mov rax, [rbp+var_30] mov dword ptr [rax+124h], 0 mov rax, [rbp+var_30] mov eax, [rax+114h] mov rcx, [rbp+var_10] cmp rax, [rcx+3B0h] jb short loc_5E35D mov rax, [rbp+var_30] mov byte ptr [rax+22h], 1 loc_5E35D: lea rax, key_SHARE_BITMAP_lock mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 0A10h add rsi, 88h xor eax, eax mov edx, eax call inline_mysql_mutex_init_1 lea rax, key_SHARE_BITMAP_cond mov edi, [rax] mov rsi, [rbp+var_10] add rsi, 0A10h add rsi, 0D0h xor eax, eax mov edx, eax call inline_mysql_cond_init_0 mov rax, [rbp+var_10] mov rax, [rax+0D0h] mov [rbp+var_48], rax mov rdi, [rbp+var_10] call _ma_bitmap_reset_cache mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_70], rax mov rax, [rbp+var_20] mov rax, [rax] mov rcx, [rbp+var_30] xor edx, edx div qword ptr [rcx+138h] mov rax, [rbp+var_70] sub rax, rdx mov [rbp+var_50], rax mov rax, [rbp+var_20] mov rax, [rax] sub rax, [rbp+var_50] mov [rbp+var_58], rax imul rax, [rbp+var_58], 3 shr rax, 3 mov [rbp+var_60], rax mov rax, [rbp+var_60] mov ecx, 6 xor edx, edx div rcx mov [rbp+var_60], rax imul rax, [rbp+var_60], 6 mov [rbp+var_60], rax mov rcx, [rbp+var_50] mov rax, [rbp+var_30] mov [rax+18h], rcx mov rax, [rbp+var_60] mov ecx, eax mov rax, [rbp+var_30] mov [rax+130h], ecx mov rcx, [rbp+var_50] mov rax, [rbp+var_60] shl rax, 3 mov esi, 3 xor edx, edx div rsi add rcx, rax mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_48] mov [rbp+var_68], rax mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_10] mov ecx, [rcx+7BCh] xor edx, edx div rcx mov rcx, rax mov rax, [rbp+var_68] cmp rax, rcx ja short loc_5E494 mov rcx, [rbp+var_48] mov rax, [rbp+var_10] mov [rax+0D0h], rcx loc_5E494: mov [rbp+var_1], 0 loc_5E498: mov al, [rbp+var_1] add rsp, 80h pop rbp retn
char ma_bitmap_init(long long a1, int a2, _QWORD *a3) { int v3; // eax long long v4; // rax unsigned long long v6; // [rsp+20h] [rbp-60h] long long v7; // [rsp+30h] [rbp-50h] unsigned long long v8; // [rsp+38h] [rbp-48h] long long v9; // [rsp+40h] [rbp-40h] int v10; // [rsp+58h] [rbp-28h] unsigned int v11; // [rsp+5Ch] [rbp-24h] v3 = 0; if ( *(_BYTE *)(a1 + 2009) ) v3 = 0x10000; v9 = v3 | 0x10u; v4 = my_malloc(0LL, *(unsigned int *)(a1 + 1980), v9); *(_QWORD *)(a1 + 2584) = v4; if ( !v4 || (unsigned __int8)init_dynamic_array2(0, (int)a1 + 2896, 24, 0, 1, 1, v9) ) return 1; *(_QWORD *)(a1 + 2576) = a1; *(_DWORD *)(a1 + 2884) = *(_DWORD *)(a1 + 1980); *(_DWORD *)(a1 + 2656) = a2; ma_bitmap_set_pagecache_callbacks(a1 + 2640, a1); v11 = (*(_DWORD *)(a1 + 1980) - 4) / 6u; *(_DWORD *)(a1 + 2872) = 6 * v11; *(_DWORD *)(a1 + 2876) = 6 * v11; *(_QWORD *)(a1 + 2888) = 16 * v11 + 1; *(_DWORD *)(a1 + 2636) = 0; *(_DWORD *)(a1 + 2628) = 0; *(_DWORD *)(a1 + 2624) = 0; *(_DWORD *)(a1 + 2632) = 0; v10 = *(_DWORD *)(a1 + 1980) - (*(_DWORD *)(a1 + 3096) + 20) + 4; *(_DWORD *)(a1 + 2840) = v10; *(_DWORD *)(a1 + 2844) = v10 - 30 * v10 / 0x64u; *(_DWORD *)(a1 + 2848) = v10 - 60 * v10 / 0x64u; *(_DWORD *)(a1 + 2852) = v10 - 90 * v10 / 0x64u; *(_DWORD *)(a1 + 2856) = 0; *(_DWORD *)(a1 + 2860) = v10 - 40 * v10 / 0x64u; *(_DWORD *)(a1 + 2864) = v10 - 80 * v10 / 0x64u; *(_DWORD *)(a1 + 2868) = 0; if ( (unsigned long long)*(unsigned int *)(a1 + 2852) >= *(_QWORD *)(a1 + 944) ) *(_BYTE *)(a1 + 2610) = 1; inline_mysql_mutex_init_1(key_SHARE_BITMAP_lock, a1 + 2712, 0LL); inline_mysql_cond_init_0(key_SHARE_BITMAP_cond, a1 + 2784, 0LL); v8 = *(_QWORD *)(a1 + 208); ma_bitmap_reset_cache(a1); v7 = *a3 - *a3 % *(_QWORD *)(a1 + 2888); v6 = 6 * (((unsigned long long)(3 * (*a3 - v7)) >> 3) / 6); *(_QWORD *)(a1 + 2600) = v7; *(_DWORD *)(a1 + 2880) = v6; *a3 = 8 * v6 / 3 + v7; if ( v8 <= *(_QWORD *)(a1 + 64) / (unsigned long long)*(unsigned int *)(a1 + 1980) ) *(_QWORD *)(a1 + 208) = v8; return 0; }
_ma_bitmap_init: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0xa10 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x10] MOVSX EDX,byte ptr [RAX + 0x7d9] XOR EAX,EAX MOV ECX,0x10000 CMP EDX,0x0 CMOVNZ EAX,ECX OR EAX,0x10 MOV EAX,EAX MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x34] MOV ESI,EAX MOV RDX,qword ptr [RBP + -0x40] XOR EDI,EDI CALL 0x001f7980 MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JZ 0x0015e1b2 MOV RSI,qword ptr [RBP + -0x30] ADD RSI,0x140 MOV RAX,qword ptr [RBP + -0x40] XOR EDI,EDI MOV EDX,0x18 XOR ECX,ECX MOV R9D,0x1 MOV R8D,R9D MOV qword ptr [RSP],RAX CALL 0x001de930 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0015e1bb LAB_0015e1b2: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015e498 LAB_0015e1bb: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x7bc] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x134],ECX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x50],ECX MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x40 MOV RSI,qword ptr [RBP + -0x10] CALL 0x0015e4b0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x7bc] SUB EAX,0x4 MOV ECX,0x6 XOR EDX,EDX DIV ECX MOV dword ptr [RBP + -0x24],EAX IMUL ECX,dword ptr [RBP + -0x24],0x6 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x128],ECX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x12c],ECX MOV EAX,dword ptr [RBP + -0x24] SHL EAX,0x4 ADD EAX,0x1 MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x138],RCX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x3c],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x34],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x7bc] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0xc18] ADD ECX,0x14 SUB EAX,ECX ADD EAX,0x4 MOV dword ptr [RBP + -0x28],EAX MOV ECX,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x108],ECX MOV ECX,dword ptr [RBP + -0x28] IMUL EAX,dword ptr [RBP + -0x28],0x1e MOV ESI,0x64 XOR EDX,EDX DIV ESI SUB ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x10c],ECX MOV ECX,dword ptr [RBP + -0x28] IMUL EAX,dword ptr [RBP + -0x28],0x3c MOV ESI,0x64 XOR EDX,EDX DIV ESI SUB ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x110],ECX MOV ECX,dword ptr [RBP + -0x28] IMUL EAX,dword ptr [RBP + -0x28],0x5a MOV ESI,0x64 XOR EDX,EDX DIV ESI SUB ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x114],ECX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x118],0x0 MOV ECX,dword ptr [RBP + -0x28] IMUL EAX,dword ptr [RBP + -0x28],0x28 MOV ESI,0x64 XOR EDX,EDX DIV ESI SUB ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x11c],ECX MOV ECX,dword ptr [RBP + -0x28] IMUL EAX,dword ptr [RBP + -0x28],0x50 MOV ESI,0x64 XOR EDX,EDX DIV ESI SUB ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x120],ECX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x124],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x114] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x3b0] JC 0x0015e35d MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x22],0x1 LAB_0015e35d: LEA RAX,[0x57b8f0] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0xa10 ADD RSI,0x88 XOR EAX,EAX MOV EDX,EAX CALL 0x0015e590 LEA RAX,[0x57b944] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0xa10 ADD RSI,0xd0 XOR EAX,EAX MOV EDX,EAX CALL 0x0015e600 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xd0] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0015e650 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] XOR EDX,EDX DIV qword ptr [RCX + 0x138] MOV RAX,qword ptr [RBP + -0x70] SUB RAX,RDX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x58],RAX IMUL RAX,qword ptr [RBP + -0x58],0x3 SHR RAX,0x3 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,0x6 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x60],RAX IMUL RAX,qword ptr [RBP + -0x60],0x6 MOV qword ptr [RBP + -0x60],RAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x130],ECX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x60] SHL RAX,0x3 MOV ESI,0x3 XOR EDX,EDX DIV RSI ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,RCX JA 0x0015e494 MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xd0],RCX LAB_0015e494: MOV byte ptr [RBP + -0x1],0x0 LAB_0015e498: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x80 POP RBP RET
int1 _ma_bitmap_init(long param_1,int4 param_2,ulong *param_3) { ulong uVar1; char cVar2; uint uVar3; long lVar4; ulong uVar5; int iVar6; uVar3 = 0; if (*(char *)(param_1 + 0x7d9) != '\0') { uVar3 = 0x10000; } lVar4 = my_malloc(0,*(int4 *)(param_1 + 0x7bc),uVar3 | 0x10); *(long *)(param_1 + 0xa18) = lVar4; if ((lVar4 != 0) && (cVar2 = init_dynamic_array2(0,param_1 + 0xb50,0x18,0,1,1,uVar3 | 0x10), cVar2 == '\0')) { *(long *)(param_1 + 0xa10) = param_1; *(int4 *)(param_1 + 0xb44) = *(int4 *)(param_1 + 0x7bc); *(int4 *)(param_1 + 0xa60) = param_2; _ma_bitmap_set_pagecache_callbacks(param_1 + 0xa50,param_1); uVar3 = (*(int *)(param_1 + 0x7bc) - 4U) / 6; iVar6 = uVar3 * 6; *(int *)(param_1 + 0xb38) = iVar6; *(int *)(param_1 + 0xb3c) = iVar6; *(ulong *)(param_1 + 0xb48) = (ulong)(uVar3 * 0x10 + 1); *(int4 *)(param_1 + 0xa4c) = 0; *(int4 *)(param_1 + 0xa44) = 0; *(int4 *)(param_1 + 0xa40) = 0; *(int4 *)(param_1 + 0xa48) = 0; iVar6 = (*(int *)(param_1 + 0x7bc) - (*(int *)(param_1 + 0xc18) + 0x14)) + 4; *(int *)(param_1 + 0xb18) = iVar6; *(uint *)(param_1 + 0xb1c) = iVar6 - (uint)(iVar6 * 0x1e) / 100; *(uint *)(param_1 + 0xb20) = iVar6 - (uint)(iVar6 * 0x3c) / 100; *(uint *)(param_1 + 0xb24) = iVar6 - (uint)(iVar6 * 0x5a) / 100; *(int4 *)(param_1 + 0xb28) = 0; *(uint *)(param_1 + 0xb2c) = iVar6 - (uint)(iVar6 * 0x28) / 100; *(uint *)(param_1 + 0xb30) = iVar6 - (uint)(iVar6 * 0x50) / 100; *(int4 *)(param_1 + 0xb34) = 0; if (*(ulong *)(param_1 + 0x3b0) <= (ulong)*(uint *)(param_1 + 0xb24)) { *(int1 *)(param_1 + 0xa32) = 1; } inline_mysql_mutex_init(key_SHARE_BITMAP_lock,param_1 + 0xa98,0); inline_mysql_cond_init(key_SHARE_BITMAP_cond,param_1 + 0xae0,0); uVar1 = *(ulong *)(param_1 + 0xd0); _ma_bitmap_reset_cache(param_1); lVar4 = *param_3 - *param_3 % *(ulong *)(param_1 + 0xb48); uVar5 = ((*param_3 - lVar4) * 3) / 0x30; *(long *)(param_1 + 0xa28) = lVar4; *(int *)(param_1 + 0xb40) = (int)uVar5 * 6; *param_3 = lVar4 + (uVar5 * 0x30) / 3; if (uVar1 <= *(ulong *)(param_1 + 0x40) / (ulong)*(uint *)(param_1 + 0x7bc)) { *(ulong *)(param_1 + 0xd0) = uVar1; } return 0; } return 1; }
44,950
uf_space_endspace_selected
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_endspace_selected(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill((uchar*) to,(end-to),' '); else { if (get_bit(bit_buff)) { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); } else decode_bytes(rec,bit_buff,to,end); } }
O3
c
uf_space_endspace_selected: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 movl 0x4(%rsi), %eax testl %eax, %eax je 0xa244d movl (%r15), %r12d decl %eax movl %eax, 0x4(%r15) btl %eax, %r12d jb 0xa24c2 testl %eax, %eax jne 0xa246a movq %r15, %rdi callq 0xa18dd movl $0x1f, 0x4(%r15) movl (%r15), %r12d testl %r12d, %r12d jns 0xa24d5 movl $0x1f, %eax jmp 0xa2476 movq %r15, %rdi callq 0xa18dd movl $0x1f, 0x4(%r15) movl (%r15), %r12d movl $0x1f, %eax testl %r12d, %r12d js 0xa24c2 decl %eax movl %eax, 0x4(%r15) btl %eax, %r12d jae 0xa24d5 movq %r13, %rdx movl 0x1c(%r13), %r13d movl %eax, %ecx subl %r13d, %ecx movq %rdx, -0x30(%rbp) jae 0xa24f4 subl %eax, %r13d movl %eax, %eax leaq 0x6c19c(%rip), %rcx # 0x10e630 andl (%rcx,%rax,4), %r12d movl %r13d, %ecx shll %cl, %r12d movq %r15, %rdi callq 0xa18dd movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r15) movl (%r15), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %r12d jmp 0xa2509 subq %r14, %rbx movq %r14, %rdi movl $0x20, %esi movq %rbx, %rdx jmp 0xa2558 movq %r13, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xa21ce movl %ecx, 0x4(%r15) shrl %cl, %r12d movl 0x1c(%rdx), %eax leaq 0x6c12b(%rip), %rcx # 0x10e630 andl (%rcx,%rax,4), %r12d movl %r12d, %r13d leaq (%r14,%r13), %rax cmpq %rbx, %rax jbe 0xa252c movl $0x1, 0x28(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, %r12 negq %r12 cmpq %rbx, %rax je 0xa254a leaq (%rbx,%r12), %rcx movq -0x30(%rbp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0xa21ce addq %r12, %rbx movq %rbx, %rdi movl $0x20, %esi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x2b2f0
uf_space_endspace_selected_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rsi mov r13, rdi mov eax, [rsi+4] test eax, eax jz short loc_A244D mov r12d, [r15] dec eax mov [r15+4], eax bt r12d, eax jb loc_A24C2 test eax, eax jnz short loc_A246A mov rdi, r15 call fill_buffer_0 mov dword ptr [r15+4], 1Fh mov r12d, [r15] test r12d, r12d jns loc_A24D5 mov eax, 1Fh jmp short loc_A2476 loc_A244D: mov rdi, r15 call fill_buffer_0 mov dword ptr [r15+4], 1Fh mov r12d, [r15] mov eax, 1Fh test r12d, r12d js short loc_A24C2 loc_A246A: dec eax mov [r15+4], eax bt r12d, eax jnb short loc_A24D5 loc_A2476: mov rdx, r13 mov r13d, [r13+1Ch] mov ecx, eax sub ecx, r13d mov [rbp+var_30], rdx jnb short loc_A24F4 sub r13d, eax mov eax, eax lea rcx, mask_0 and r12d, [rcx+rax*4] mov ecx, r13d shl r12d, cl mov rdi, r15 call fill_buffer_0 mov eax, 20h ; ' ' sub eax, r13d mov [r15+4], eax mov eax, [r15] neg r13d mov ecx, r13d shr eax, cl add r12d, eax jmp short loc_A2509 loc_A24C2: sub rbx, r14 mov rdi, r14 mov esi, 20h ; ' ' mov rdx, rbx jmp loc_A2558 loc_A24D5: mov rdi, r13 mov rsi, r15 mov rdx, r14 mov rcx, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp decode_bytes_0 loc_A24F4: mov [r15+4], ecx shr r12d, cl mov eax, [rdx+1Ch] lea rcx, mask_0 and r12d, [rcx+rax*4] loc_A2509: mov r13d, r12d lea rax, [r14+r13] cmp rax, rbx jbe short loc_A252C mov dword ptr [r15+28h], 1 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A252C: mov r12, r13 neg r12 cmp rax, rbx jz short loc_A254A lea rcx, [rbx+r12] mov rdi, [rbp+var_30] mov rsi, r15 mov rdx, r14 call decode_bytes_0 loc_A254A: add rbx, r12 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r13 loc_A2558: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset
_BYTE * uf_space_endspace_selected_0(long long a1, unsigned int *a2, _BYTE *a3, _BYTE *a4) { unsigned int v6; // eax unsigned int v7; // r12d unsigned int v8; // eax unsigned int v9; // eax unsigned int v10; // r13d unsigned int v11; // ecx int v12; // r13d int v13; // r12d unsigned int v14; // r12d _BYTE *result; // rax v6 = a2[1]; if ( !v6 ) { fill_buffer_0((long long)a2); a2[1] = 31; v7 = *a2; v8 = 31; if ( (*a2 & 0x80000000) == 0 ) { LABEL_7: v9 = v8 - 1; a2[1] = v9; if ( _bittest((const int *)&v7, v9) ) goto LABEL_8; return decode_bytes_0(a1, (long long)a2, a3, a4); } return (_BYTE *)memset(a3, 32LL, a4 - a3); } v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest((const int *)&v7, v8) ) return (_BYTE *)memset(a3, 32LL, a4 - a3); if ( v8 ) goto LABEL_7; fill_buffer_0((long long)a2); a2[1] = 31; v7 = *a2; if ( (*a2 & 0x80000000) == 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); v9 = 31; LABEL_8: v10 = *(_DWORD *)(a1 + 28); v11 = v9 - v10; if ( v9 >= v10 ) { a2[1] = v11; v14 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v11); } else { v12 = v10 - v9; v13 = (mask_0[v9] & v7) << v12; fill_buffer_0((long long)a2); a2[1] = 32 - v12; v14 = (*a2 >> -(char)v12) + v13; } result = &a3[v14]; if ( result <= a4 ) { if ( result != a4 ) decode_bytes_0(a1, (long long)a2, a3, &a4[-v14]); return (_BYTE *)memset(&a4[-v14], 32LL, v14); } else { a2[10] = 1; } return result; }
uf_space_endspace_selected: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R13,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x001a244d MOV R12D,dword ptr [R15] DEC EAX MOV dword ptr [R15 + 0x4],EAX BT R12D,EAX JC 0x001a24c2 TEST EAX,EAX JNZ 0x001a246a MOV RDI,R15 CALL 0x001a18dd MOV dword ptr [R15 + 0x4],0x1f MOV R12D,dword ptr [R15] TEST R12D,R12D JNS 0x001a24d5 MOV EAX,0x1f JMP 0x001a2476 LAB_001a244d: MOV RDI,R15 CALL 0x001a18dd MOV dword ptr [R15 + 0x4],0x1f MOV R12D,dword ptr [R15] MOV EAX,0x1f TEST R12D,R12D JS 0x001a24c2 LAB_001a246a: DEC EAX MOV dword ptr [R15 + 0x4],EAX BT R12D,EAX JNC 0x001a24d5 LAB_001a2476: MOV RDX,R13 MOV R13D,dword ptr [R13 + 0x1c] MOV ECX,EAX SUB ECX,R13D MOV qword ptr [RBP + -0x30],RDX JNC 0x001a24f4 SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x20e630] AND R12D,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL R12D,CL MOV RDI,R15 CALL 0x001a18dd MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R15 + 0x4],EAX MOV EAX,dword ptr [R15] NEG R13D MOV ECX,R13D SHR EAX,CL ADD R12D,EAX JMP 0x001a2509 LAB_001a24c2: SUB RBX,R14 MOV RDI,R14 MOV ESI,0x20 MOV RDX,RBX JMP 0x001a2558 LAB_001a24d5: MOV RDI,R13 MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001a21ce LAB_001a24f4: MOV dword ptr [R15 + 0x4],ECX SHR R12D,CL MOV EAX,dword ptr [RDX + 0x1c] LEA RCX,[0x20e630] AND R12D,dword ptr [RCX + RAX*0x4] LAB_001a2509: MOV R13D,R12D LEA RAX,[R14 + R13*0x1] CMP RAX,RBX JBE 0x001a252c MOV dword ptr [R15 + 0x28],0x1 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a252c: MOV R12,R13 NEG R12 CMP RAX,RBX JZ 0x001a254a LEA RCX,[RBX + R12*0x1] MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R15 MOV RDX,R14 CALL 0x001a21ce LAB_001a254a: ADD RBX,R12 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R13 LAB_001a2558: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0012b2f0
void uf_space_endspace_selected(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; size_t __n; uint uVar5; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar5 = *param_2; uVar3 = 0x1f; if ((int)uVar5 < 0) goto LAB_001a24c2; LAB_001a246a: uVar3 = uVar3 - 1; param_2[1] = uVar3; if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) { LAB_001a24d5: decode_bytes(param_1,param_2,param_3,param_4); return; } } else { uVar5 = *param_2; uVar3 = param_2[1] - 1; param_2[1] = uVar3; if ((uVar5 >> (uVar3 & 0x1f) & 1) != 0) { LAB_001a24c2: __n = param_4 - (long)param_3; goto LAB_001a2558; } if (uVar3 != 0) goto LAB_001a246a; fill_buffer(param_2); param_2[1] = 0x1f; uVar5 = *param_2; if (-1 < (int)uVar5) goto LAB_001a24d5; uVar3 = 0x1f; } uVar1 = *(uint *)(param_1 + 0x1c); if (uVar3 < uVar1) { uVar2 = (&mask)[uVar3]; bVar4 = (byte)(uVar1 - uVar3); fill_buffer(param_2); param_2[1] = 0x20 - (uVar1 - uVar3); uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f)); } else { param_2[1] = uVar3 - uVar1; uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)]; } __n = (size_t)uVar5; if (param_4 < (long)param_3 + __n) { param_2[10] = 1; return; } if ((long)param_3 + __n != param_4) { decode_bytes(param_1,param_2,param_3,param_4 + -__n); } param_3 = (void *)(param_4 + -__n); LAB_001a2558: memset(param_3,0x20,__n); return; }
44,951
common_sampler_accept(common_sampler*, int, bool)
monkey531[P]llama/common/sampling.cpp
void common_sampler_accept(struct common_sampler * gsmpl, llama_token token, bool accept_grammar) { if (accept_grammar) { llama_sampler_accept(gsmpl->grmr, token); } llama_sampler_accept(gsmpl->chain, token); gsmpl->prev.push_back(token); }
O3
cpp
common_sampler_accept(common_sampler*, int, bool): pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx testl %edx, %edx je 0xd21c9 movq 0x138(%rbx), %rdi movl %ebp, %esi callq 0x1b4e0 movq 0x140(%rbx), %rdi movl %ebp, %esi callq 0x1b4e0 movq 0x148(%rbx), %rcx movq 0x150(%rbx), %rsi cmpq %rcx, %rsi jne 0xd2202 movq 0x158(%rbx), %rax incq %rax xorl %edx, %edx divq %rsi movq %rdx, 0x158(%rbx) jmp 0xd220c incq %rsi movq %rsi, 0x150(%rbx) movq 0x160(%rbx), %rax movq 0x168(%rbx), %rdx movl %ebp, (%rdx,%rax,4) incq %rax xorl %edx, %edx divq %rcx movq %rdx, 0x160(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
_Z21common_sampler_acceptP14common_samplerib: push rbp push rbx push rax mov ebp, esi mov rbx, rdi test edx, edx jz short loc_D21C9 mov rdi, [rbx+138h] mov esi, ebp call _llama_sampler_accept loc_D21C9: mov rdi, [rbx+140h] mov esi, ebp call _llama_sampler_accept mov rcx, [rbx+148h] mov rsi, [rbx+150h] cmp rsi, rcx jnz short loc_D2202 mov rax, [rbx+158h] inc rax xor edx, edx div rsi mov [rbx+158h], rdx jmp short loc_D220C loc_D2202: inc rsi mov [rbx+150h], rsi loc_D220C: mov rax, [rbx+160h] mov rdx, [rbx+168h] mov [rdx+rax*4], ebp inc rax xor edx, edx div rcx mov [rbx+160h], rdx add rsp, 8 pop rbx pop rbp retn
unsigned long long common_sampler_accept(_QWORD *a1, unsigned int a2, int a3) { unsigned long long v4; // rcx unsigned long long v5; // rsi long long v6; // rax unsigned long long result; // rax unsigned long long v8; // rtt if ( a3 ) llama_sampler_accept(a1[39], a2); llama_sampler_accept(a1[40], a2); v4 = a1[41]; v5 = a1[42]; if ( v5 == v4 ) a1[43] = (a1[43] + 1LL) % v5; else a1[42] = v5 + 1; v6 = a1[44]; *(_DWORD *)(a1[45] + 4 * v6) = a2; v8 = v6 + 1; result = (v6 + 1) / v4; a1[44] = v8 % v4; return result; }
common_sampler_accept: PUSH RBP PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI TEST EDX,EDX JZ 0x001d21c9 MOV RDI,qword ptr [RBX + 0x138] MOV ESI,EBP CALL 0x0011b4e0 LAB_001d21c9: MOV RDI,qword ptr [RBX + 0x140] MOV ESI,EBP CALL 0x0011b4e0 MOV RCX,qword ptr [RBX + 0x148] MOV RSI,qword ptr [RBX + 0x150] CMP RSI,RCX JNZ 0x001d2202 MOV RAX,qword ptr [RBX + 0x158] INC RAX XOR EDX,EDX DIV RSI MOV qword ptr [RBX + 0x158],RDX JMP 0x001d220c LAB_001d2202: INC RSI MOV qword ptr [RBX + 0x150],RSI LAB_001d220c: MOV RAX,qword ptr [RBX + 0x160] MOV RDX,qword ptr [RBX + 0x168] MOV dword ptr [RDX + RAX*0x4],EBP INC RAX XOR EDX,EDX DIV RCX MOV qword ptr [RBX + 0x160],RDX ADD RSP,0x8 POP RBX POP RBP RET
/* common_sampler_accept(common_sampler*, int, bool) */ ulong common_sampler_accept(common_sampler *param_1,int param_2,bool param_3) { ulong uVar1; long lVar2; ulong uVar3; int7 in_register_00000011; if ((int)CONCAT71(in_register_00000011,param_3) != 0) { llama_sampler_accept(*(int8 *)(param_1 + 0x138),param_2); } llama_sampler_accept(*(int8 *)(param_1 + 0x140),param_2); uVar1 = *(ulong *)(param_1 + 0x148); uVar3 = *(ulong *)(param_1 + 0x150); if (uVar3 == uVar1) { *(ulong *)(param_1 + 0x158) = (*(long *)(param_1 + 0x158) + 1U) % uVar3; } else { *(ulong *)(param_1 + 0x150) = uVar3 + 1; } lVar2 = *(long *)(param_1 + 0x160); *(int *)(*(long *)(param_1 + 0x168) + lVar2 * 4) = param_2; uVar3 = lVar2 + 1; *(ulong *)(param_1 + 0x160) = uVar3 % uVar1; return uVar3 / uVar1; }
44,952
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); }
O0
c
plutovg_path_quad_to: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movss %xmm0, -0xc(%rbp) movss %xmm1, -0x10(%rbp) movss %xmm2, -0x14(%rbp) movss %xmm3, -0x18(%rbp) movq -0x8(%rbp), %rdi leaq -0x1c(%rbp), %rsi leaq -0x20(%rbp), %rdx callq 0x60190 movss -0xc(%rbp), %xmm0 movss 0x2da5a(%rip), %xmm1 # 0x8db28 mulss -0x1c(%rbp), %xmm1 movss 0x2da51(%rip), %xmm2 # 0x8db2c mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x24(%rbp) movss -0x10(%rbp), %xmm0 movss 0x2da33(%rip), %xmm1 # 0x8db28 mulss -0x20(%rbp), %xmm1 movss 0x2da2a(%rip), %xmm2 # 0x8db2c mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x28(%rbp) movss -0xc(%rbp), %xmm0 movss 0x2da0c(%rip), %xmm1 # 0x8db28 mulss -0x14(%rbp), %xmm1 movss 0x2da03(%rip), %xmm2 # 0x8db2c mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x2c(%rbp) movss -0x10(%rbp), %xmm0 movss 0x2d9e5(%rip), %xmm1 # 0x8db28 mulss -0x18(%rbp), %xmm1 movss 0x2d9dc(%rip), %xmm2 # 0x8db2c mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x30(%rbp) movq -0x8(%rbp), %rdi movss -0x24(%rbp), %xmm0 movss -0x28(%rbp), %xmm1 movss -0x2c(%rbp), %xmm2 movss -0x30(%rbp), %xmm3 movss -0x14(%rbp), %xmm4 movss -0x18(%rbp), %xmm5 callq 0x60230 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
plutovg_path_quad_to: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi movss [rbp+var_C], xmm0 movss [rbp+var_10], xmm1 movss [rbp+var_14], xmm2 movss [rbp+var_18], xmm3 mov rdi, [rbp+var_8] lea rsi, [rbp+var_1C] lea rdx, [rbp+var_20] call plutovg_path_get_current_point movss xmm0, [rbp+var_C] movss xmm1, cs:dword_8DB28 mulss xmm1, [rbp+var_1C] movss xmm2, cs:dword_8DB2C mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_24], xmm0 movss xmm0, [rbp+var_10] movss xmm1, cs:dword_8DB28 mulss xmm1, [rbp+var_20] movss xmm2, cs:dword_8DB2C mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_28], xmm0 movss xmm0, [rbp+var_C] movss xmm1, cs:dword_8DB28 mulss xmm1, [rbp+var_14] movss xmm2, cs:dword_8DB2C mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_2C], xmm0 movss xmm0, [rbp+var_10] movss xmm1, cs:dword_8DB28 mulss xmm1, [rbp+var_18] movss xmm2, cs:dword_8DB2C mulss xmm0, xmm2 addss xmm0, xmm1 movss [rbp+var_30], xmm0 mov rdi, [rbp+var_8] movss xmm0, [rbp+var_24] movss xmm1, [rbp+var_28] movss xmm2, [rbp+var_2C] movss xmm3, [rbp+var_30] movss xmm4, [rbp+var_14] movss xmm5, [rbp+var_18] call plutovg_path_cubic_to add rsp, 30h pop rbp retn
long long plutovg_path_quad_to(long long a1, float a2, float a3, float a4, float a5) { float v6; // [rsp+10h] [rbp-20h] BYREF float v7; // [rsp+14h] [rbp-1Ch] BYREF float v8; // [rsp+18h] [rbp-18h] float v9; // [rsp+1Ch] [rbp-14h] float v10; // [rsp+20h] [rbp-10h] float v11; // [rsp+24h] [rbp-Ch] long long v12; // [rsp+28h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; v8 = a5; plutovg_path_get_current_point(a1, &v7, &v6); return plutovg_path_cubic_to( v12, (float)(v11 * 0.66666669) + (float)(0.33333334 * v7), (float)(v10 * 0.66666669) + (float)(0.33333334 * v6), (float)(v11 * 0.66666669) + (float)(0.33333334 * v9), (float)(v10 * 0.66666669) + (float)(0.33333334 * v8), v9, v8); }
plutovg_path_quad_to: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOVSS dword ptr [RBP + -0xc],XMM0 MOVSS dword ptr [RBP + -0x10],XMM1 MOVSS dword ptr [RBP + -0x14],XMM2 MOVSS dword ptr [RBP + -0x18],XMM3 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x1c] LEA RDX,[RBP + -0x20] CALL 0x00160190 MOVSS XMM0,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [0x0018db28] MULSS XMM1,dword ptr [RBP + -0x1c] MOVSS XMM2,dword ptr [0x0018db2c] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x24],XMM0 MOVSS XMM0,dword ptr [RBP + -0x10] MOVSS XMM1,dword ptr [0x0018db28] MULSS XMM1,dword ptr [RBP + -0x20] MOVSS XMM2,dword ptr [0x0018db2c] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x28],XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] MOVSS XMM1,dword ptr [0x0018db28] MULSS XMM1,dword ptr [RBP + -0x14] MOVSS XMM2,dword ptr [0x0018db2c] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x2c],XMM0 MOVSS XMM0,dword ptr [RBP + -0x10] MOVSS XMM1,dword ptr [0x0018db28] MULSS XMM1,dword ptr [RBP + -0x18] MOVSS XMM2,dword ptr [0x0018db2c] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x30],XMM0 MOV RDI,qword ptr [RBP + -0x8] MOVSS XMM0,dword ptr [RBP + -0x24] MOVSS XMM1,dword ptr [RBP + -0x28] MOVSS XMM2,dword ptr [RBP + -0x2c] MOVSS XMM3,dword ptr [RBP + -0x30] MOVSS XMM4,dword ptr [RBP + -0x14] MOVSS XMM5,dword ptr [RBP + -0x18] CALL 0x00160230 ADD RSP,0x30 POP RBP RET
void plutovg_path_quad_to (float param_1,float param_2,float param_3,float param_4,int8 param_5) { float local_28; float local_24; float local_20; float local_1c; float local_18; float local_14; int8 local_10; local_20 = param_4; local_1c = param_3; local_18 = param_2; local_14 = param_1; local_10 = param_5; plutovg_path_get_current_point(param_5,&local_24,&local_28); plutovg_path_cubic_to (local_14 * DAT_0018db2c + DAT_0018db28 * local_24, local_18 * DAT_0018db2c + DAT_0018db28 * local_28, local_14 * DAT_0018db2c + DAT_0018db28 * local_1c, local_18 * DAT_0018db2c + DAT_0018db28 * local_20,local_1c,local_20,local_10); return; }
44,953
r3d_billboard_mode_front
r3d/src/details/r3d_billboard.c
void r3d_billboard_mode_front(Matrix* model, const Matrix* invView) { // Extract original scales float scaleX = Vector3Length((Vector3) { model->m0, model->m1, model->m2 }); float scaleY = Vector3Length((Vector3) { model->m4, model->m5, model->m6 }); float scaleZ = Vector3Length((Vector3) { model->m8, model->m9, model->m10 }); // Copy the view basis vectors, applying original scales model->m0 = invView->m0 * scaleX; model->m1 = invView->m1 * scaleX; model->m2 = invView->m2 * scaleX; model->m4 = invView->m4 * scaleY; model->m5 = invView->m5 * scaleY; model->m6 = invView->m6 * scaleY; model->m8 = invView->m8 * scaleZ; model->m9 = invView->m9 * scaleZ; model->m10 = invView->m10 * scaleZ; }
O3
c
r3d_billboard_mode_front: pushq %rbp movq %rsp, %rbp movss 0x10(%rdi), %xmm0 movss 0x20(%rdi), %xmm1 mulss %xmm0, %xmm0 movss (%rdi), %xmm2 movss 0x4(%rdi), %xmm3 mulss %xmm2, %xmm2 addss %xmm0, %xmm2 mulss %xmm1, %xmm1 addss %xmm2, %xmm1 xorps %xmm0, %xmm0 sqrtss %xmm1, %xmm0 movss 0x14(%rdi), %xmm1 movss 0x24(%rdi), %xmm2 mulss %xmm1, %xmm1 mulss %xmm3, %xmm3 addss %xmm1, %xmm3 mulss %xmm2, %xmm2 addss %xmm3, %xmm2 xorps %xmm1, %xmm1 sqrtss %xmm2, %xmm1 movss 0x8(%rdi), %xmm2 movss 0x18(%rdi), %xmm3 movss 0x28(%rdi), %xmm4 mulss %xmm3, %xmm3 mulss %xmm2, %xmm2 addss %xmm3, %xmm2 mulss %xmm4, %xmm4 addss %xmm2, %xmm4 movss (%rsi), %xmm2 mulss %xmm0, %xmm2 movss %xmm2, (%rdi) movss 0x10(%rsi), %xmm2 mulss %xmm0, %xmm2 movss %xmm2, 0x10(%rdi) mulss 0x20(%rsi), %xmm0 xorps %xmm2, %xmm2 sqrtss %xmm4, %xmm2 movss %xmm0, 0x20(%rdi) movss 0x4(%rsi), %xmm0 mulss %xmm1, %xmm0 movss %xmm0, 0x4(%rdi) movss 0x14(%rsi), %xmm0 mulss %xmm1, %xmm0 movss %xmm0, 0x14(%rdi) mulss 0x24(%rsi), %xmm1 movss %xmm1, 0x24(%rdi) movss 0x8(%rsi), %xmm0 mulss %xmm2, %xmm0 movss %xmm0, 0x8(%rdi) movss 0x18(%rsi), %xmm0 mulss %xmm2, %xmm0 movss %xmm0, 0x18(%rdi) mulss 0x28(%rsi), %xmm2 movss %xmm2, 0x28(%rdi) popq %rbp retq
r3d_billboard_mode_front: push rbp mov rbp, rsp movss xmm0, dword ptr [rdi+10h] movss xmm1, dword ptr [rdi+20h] mulss xmm0, xmm0 movss xmm2, dword ptr [rdi] movss xmm3, dword ptr [rdi+4] mulss xmm2, xmm2 addss xmm2, xmm0 mulss xmm1, xmm1 addss xmm1, xmm2 xorps xmm0, xmm0 sqrtss xmm0, xmm1 movss xmm1, dword ptr [rdi+14h] movss xmm2, dword ptr [rdi+24h] mulss xmm1, xmm1 mulss xmm3, xmm3 addss xmm3, xmm1 mulss xmm2, xmm2 addss xmm2, xmm3 xorps xmm1, xmm1 sqrtss xmm1, xmm2 movss xmm2, dword ptr [rdi+8] movss xmm3, dword ptr [rdi+18h] movss xmm4, dword ptr [rdi+28h] mulss xmm3, xmm3 mulss xmm2, xmm2 addss xmm2, xmm3 mulss xmm4, xmm4 addss xmm4, xmm2 movss xmm2, dword ptr [rsi] mulss xmm2, xmm0 movss dword ptr [rdi], xmm2 movss xmm2, dword ptr [rsi+10h] mulss xmm2, xmm0 movss dword ptr [rdi+10h], xmm2 mulss xmm0, dword ptr [rsi+20h] xorps xmm2, xmm2 sqrtss xmm2, xmm4 movss dword ptr [rdi+20h], xmm0 movss xmm0, dword ptr [rsi+4] mulss xmm0, xmm1 movss dword ptr [rdi+4], xmm0 movss xmm0, dword ptr [rsi+14h] mulss xmm0, xmm1 movss dword ptr [rdi+14h], xmm0 mulss xmm1, dword ptr [rsi+24h] movss dword ptr [rdi+24h], xmm1 movss xmm0, dword ptr [rsi+8] mulss xmm0, xmm2 movss dword ptr [rdi+8], xmm0 movss xmm0, dword ptr [rsi+18h] mulss xmm0, xmm2 movss dword ptr [rdi+18h], xmm0 mulss xmm2, dword ptr [rsi+28h] movss dword ptr [rdi+28h], xmm2 pop rbp retn
void r3d_billboard_mode_front(float *a1, float *a2) { float v2; // xmm0_4 float v3; // xmm1_4 float v4; // xmm4_4 float v5; // xmm2_4 v2 = fsqrt((float)(a1[8] * a1[8]) + (float)((float)(*a1 * *a1) + (float)(a1[4] * a1[4]))); v3 = fsqrt((float)(a1[9] * a1[9]) + (float)((float)(a1[1] * a1[1]) + (float)(a1[5] * a1[5]))); v4 = (float)(a1[10] * a1[10]) + (float)((float)(a1[2] * a1[2]) + (float)(a1[6] * a1[6])); *a1 = *a2 * v2; a1[4] = a2[4] * v2; v5 = fsqrt(v4); a1[8] = v2 * a2[8]; a1[1] = a2[1] * v3; a1[5] = a2[5] * v3; a1[9] = v3 * a2[9]; a1[2] = a2[2] * v5; a1[6] = a2[6] * v5; a1[10] = v5 * a2[10]; }
r3d_billboard_mode_front: PUSH RBP MOV RBP,RSP MOVSS XMM0,dword ptr [RDI + 0x10] MOVSS XMM1,dword ptr [RDI + 0x20] MULSS XMM0,XMM0 MOVSS XMM2,dword ptr [RDI] MOVSS XMM3,dword ptr [RDI + 0x4] MULSS XMM2,XMM2 ADDSS XMM2,XMM0 MULSS XMM1,XMM1 ADDSS XMM1,XMM2 XORPS XMM0,XMM0 SQRTSS XMM0,XMM1 MOVSS XMM1,dword ptr [RDI + 0x14] MOVSS XMM2,dword ptr [RDI + 0x24] MULSS XMM1,XMM1 MULSS XMM3,XMM3 ADDSS XMM3,XMM1 MULSS XMM2,XMM2 ADDSS XMM2,XMM3 XORPS XMM1,XMM1 SQRTSS XMM1,XMM2 MOVSS XMM2,dword ptr [RDI + 0x8] MOVSS XMM3,dword ptr [RDI + 0x18] MOVSS XMM4,dword ptr [RDI + 0x28] MULSS XMM3,XMM3 MULSS XMM2,XMM2 ADDSS XMM2,XMM3 MULSS XMM4,XMM4 ADDSS XMM4,XMM2 MOVSS XMM2,dword ptr [RSI] MULSS XMM2,XMM0 MOVSS dword ptr [RDI],XMM2 MOVSS XMM2,dword ptr [RSI + 0x10] MULSS XMM2,XMM0 MOVSS dword ptr [RDI + 0x10],XMM2 MULSS XMM0,dword ptr [RSI + 0x20] XORPS XMM2,XMM2 SQRTSS XMM2,XMM4 MOVSS dword ptr [RDI + 0x20],XMM0 MOVSS XMM0,dword ptr [RSI + 0x4] MULSS XMM0,XMM1 MOVSS dword ptr [RDI + 0x4],XMM0 MOVSS XMM0,dword ptr [RSI + 0x14] MULSS XMM0,XMM1 MOVSS dword ptr [RDI + 0x14],XMM0 MULSS XMM1,dword ptr [RSI + 0x24] MOVSS dword ptr [RDI + 0x24],XMM1 MOVSS XMM0,dword ptr [RSI + 0x8] MULSS XMM0,XMM2 MOVSS dword ptr [RDI + 0x8],XMM0 MOVSS XMM0,dword ptr [RSI + 0x18] MULSS XMM0,XMM2 MOVSS dword ptr [RDI + 0x18],XMM0 MULSS XMM2,dword ptr [RSI + 0x28] MOVSS dword ptr [RDI + 0x28],XMM2 POP RBP RET
void r3d_billboard_mode_front(float *param_1,float *param_2) { float fVar1; float fVar2; float fVar3; fVar1 = SQRT(param_1[8] * param_1[8] + *param_1 * *param_1 + param_1[4] * param_1[4]); fVar2 = SQRT(param_1[9] * param_1[9] + param_1[1] * param_1[1] + param_1[5] * param_1[5]); *param_1 = *param_2 * fVar1; param_1[4] = param_2[4] * fVar1; fVar3 = SQRT(param_1[10] * param_1[10] + param_1[2] * param_1[2] + param_1[6] * param_1[6]); param_1[8] = fVar1 * param_2[8]; param_1[1] = param_2[1] * fVar2; param_1[5] = param_2[5] * fVar2; param_1[9] = fVar2 * param_2[9]; param_1[2] = param_2[2] * fVar3; param_1[6] = param_2[6] * fVar3; param_1[10] = fVar3 * param_2[10]; return; }
44,954
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle( void* pc, char* out, size_t out_size, SymbolizeOptions /*options*/) { auto pc0 = reinterpret_cast<uintptr_t>(pc); uint64_t start_address = 0; uint64_t base_address = 0; FileDescriptor object_fd; if (out_size < 1) { return false; } out[0] = '\0'; SafeAppendString("(", out, out_size); if (g_symbolize_open_object_file_callback) { object_fd.reset(g_symbolize_open_object_file_callback( pc0, start_address, base_address, out + 1, out_size - 1)); } else { object_fd = OpenObjectFileContainingPcAndGetStartAddress( pc0, start_address, base_address, out + 1, out_size - 1); } # if defined(PRINT_UNSYMBOLIZED_STACK_TRACES) { # else // Check whether a file name was returned. if (!object_fd) { # endif if (out[1]) { // The object file containing PC was determined successfully however the // object file was not opened successfully. This is still considered // success because the object file name and offset are known and tools // like asan_symbolize.py can be used for the symbolization. out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated. SafeAppendString("+0x", out, out_size); SafeAppendHexNumber(pc0 - base_address, out, out_size); SafeAppendString(")", out, out_size); return true; } // Failed to determine the object file containing PC. Bail out. return false; } int elf_type = FileGetElfType(object_fd.get()); if (elf_type == -1) { return false; } if (g_symbolize_callback) { // Run the call back if it's installed. // Note: relocation (and much of the rest of this code) will be // wrong for prelinked shared libraries and PIE executables. uint64_t relocation = (elf_type == ET_DYN) ? start_address : 0; int num_bytes_written = g_symbolize_callback(object_fd.get(), pc, out, out_size, relocation); if (num_bytes_written > 0) { out += static_cast<size_t>(num_bytes_written); out_size -= static_cast<size_t>(num_bytes_written); } } if (!GetSymbolFromObjectFile(object_fd.get(), pc0, out, out_size, base_address)) { if (out[1] && !g_symbolize_callback) { // The object file containing PC was opened successfully however the // symbol was not found. The object may have been stripped. This is still // considered success because the object file name and offset are known // and tools like asan_symbolize.py can be used for the symbolization. out[out_size - 1] = '\0'; // Making sure |out| is always null-terminated. SafeAppendString("+0x", out, out_size); SafeAppendHexNumber(pc0 - base_address, out, out_size); SafeAppendString(")", out, out_size); return true; } return false; } // Symbolization succeeded. Now we try to demangle the symbol. DemangleInplace(out, out_size); return true; } }
O1
cpp
nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp xorl %r13d, %r13d movq %r13, 0x18(%rsp) movq %r13, 0x10(%rsp) testq %rdx, %rdx je 0x224a2 movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r12 movb $0x0, (%rsi) leaq 0x24d7(%rip), %rdi # 0x2494d callq 0x22722 movq 0x20656(%rip), %rax # 0x42ad8 testq %rax, %rax je 0x224ac leaq 0x1(%r15), %rcx leaq -0x1(%r14), %r8 leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %r12, %rdi callq *%rax movl %eax, %ebx jmp 0x224cf movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x226d2 leaq 0x1(%r15), %r8 leaq -0x1(%r14), %r9 leaq 0x28(%rsp), %rdi leaq 0x18(%rsp), %rdx leaq 0x10(%rsp), %rcx movq %r12, %rsi callq 0x2275f movl 0x28(%rsp), %ebx cmpl $-0x1, %ebx je 0x2266a leaq 0x28(%rsp), %rsi movl $0x40, %edx movl %ebx, %edi xorl %ecx, %ecx callq 0x22388 cmpq $0x40, %rax sete %al cmpl $0x464c457f, 0x28(%rsp) # imm = 0x464C457F sete %cl andb %al, %cl je 0x22679 movq 0x205c4(%rip), %rax # 0x42ad0 testq %rax, %rax je 0x22549 xorl %r8d, %r8d cmpw $0x3, 0x38(%rsp) movl $0x0, %edx jne 0x22526 movq 0x18(%rsp), %rdx testb %cl, %cl cmovneq %rdx, %r8 movl %ebx, %edi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq *%rax xorl %ecx, %ecx testl %eax, %eax movl %eax, %eax cmovgq %rax, %rcx subq %rcx, %r14 addq %rcx, %r15 movq 0x10(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x28(%rsp), %rsi movl $0x40, %edx movl %ebx, %edi xorl %ecx, %ecx callq 0x22388 cmpq $0x40, %rax jne 0x2267e movq 0x50(%rsp), %rbp movzwl 0x64(%rsp), %r13d leaq 0x68(%rsp), %r8 movl %ebx, %edi movl %r13d, %esi movq %rbp, %rdx movl $0x2, %ecx callq 0x22d64 testb %al, %al je 0x225ec movl 0x90(%rsp), %ecx shlq $0x6, %rcx addq %rbp, %rcx leaq 0xa8(%rsp), %rsi movl $0x40, %edx movl %ebx, %edi callq 0x22388 cmpq $0x40, %rax jne 0x2267e leaq 0x68(%rsp), %rax movq %rax, (%rsp) leaq 0xa8(%rsp), %r9 movq %r12, %rdi movl %ebx, %esi movq %r15, %rdx movq %r14, %rcx movq 0x20(%rsp), %r8 callq 0x22e83 testb %al, %al jne 0x2265a leaq 0x68(%rsp), %rax movl %ebx, %edi movl %r13d, %esi movq %rax, %r13 movq %rbp, %rdx movl $0xb, %ecx movq %rax, %r8 callq 0x22d64 testb %al, %al je 0x2267e movl 0x90(%rsp), %ecx shlq $0x6, %rcx addq %rbp, %rcx leaq 0xa8(%rsp), %rsi movl $0x40, %edx movl %ebx, %edi callq 0x22388 cmpq $0x40, %rax jne 0x2267e movq %r13, (%rsp) leaq 0xa8(%rsp), %r9 movq %r12, %rdi movl %ebx, %esi movq %r15, %rdx movq %r14, %rcx movq 0x20(%rsp), %r8 callq 0x22e83 testb %al, %al je 0x2267e movb $0x1, %r13b movq %r15, %rdi movq %r14, %rsi callq 0x22c6e jmp 0x226d2 cmpb $0x0, 0x1(%r15) je 0x22679 movb $0x0, -0x1(%r15,%r14) jmp 0x22698 xorl %r13d, %r13d jmp 0x226d2 xorl %r13d, %r13d cmpb $0x0, 0x1(%r15) je 0x226d2 cmpq $0x0, 0x20440(%rip) # 0x42ad0 jne 0x226d2 movb $0x0, -0x1(%r14,%r15) leaq 0x38d3(%rip), %rdi # 0x25f72 movq %r15, %rsi movq %r14, %rdx callq 0x22722 subq 0x10(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x22be7 leaq 0x2551(%rip), %rdi # 0x24c15 movq %r15, %rsi movq %r14, %rdx callq 0x22722 movb $0x1, %r13b cmpl $-0x1, %ebx je 0x226de movl %ebx, %edi callq 0x79e0 movl %r13d, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x22703 jmp 0x226f7 movq %rax, %r14 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x22706 jmp 0x2271a movq %rax, %r14 cmpl $-0x1, %ebx je 0x22712 movl %ebx, %edi callq 0x79e0 movq %r14, %rdi callq 0x7930 movq %rax, %rdi callq 0x9ebd
_ZN5nglog5toolsL20SymbolizeAndDemangleEPvPcmNS0_16SymbolizeOptionsE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h xor r13d, r13d mov [rsp+118h+var_100], r13 mov [rsp+118h+var_108], r13 test rdx, rdx jz short loc_224A2 mov r14, rdx mov r15, rsi mov r12, rdi mov byte ptr [rsi], 0 lea rdi, asc_2494C+1; this call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong) mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_137g_symbolize_open_object_file_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback test rax, rax jz short loc_224AC lea rcx, [r15+1] lea r8, [r14-1] lea rsi, [rsp+118h+var_100] lea rdx, [rsp+118h+var_108] mov rdi, r12 call rax ; nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback mov ebx, eax jmp short loc_224CF loc_224A2: mov ebx, 0FFFFFFFFh jmp loc_226D2 loc_224AC: lea r8, [r15+1]; char * lea r9, [r14-1]; unsigned __int64 lea rdi, [rsp+118h+var_F0]; this lea rdx, [rsp+118h+var_100]; unsigned __int64 * lea rcx, [rsp+118h+var_108]; unsigned __int64 * mov rsi, r12; unsigned __int64 call _ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm; nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(ulong,ulong &,ulong &,char *,ulong) mov ebx, [rsp+118h+var_F0] loc_224CF: cmp ebx, 0FFFFFFFFh jz loc_2266A lea rsi, [rsp+118h+var_F0]; int mov edx, offset dword_40; void * mov edi, ebx; this xor ecx, ecx; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' setz al cmp [rsp+118h+var_F0], 464C457Fh setz cl and cl, al jz loc_22679 mov rax, cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE; nglog::tools::`anonymous namespace'::g_symbolize_callback test rax, rax jz short loc_22549 xor r8d, r8d cmp [rsp+118h+var_E0], 3 mov edx, 0 jnz short loc_22526 mov rdx, [rsp+118h+var_100] loc_22526: test cl, cl cmovnz r8, rdx mov edi, ebx mov rsi, r12 mov rdx, r15 mov rcx, r14 call rax ; nglog::tools::`anonymous namespace'::g_symbolize_callback xor ecx, ecx test eax, eax mov eax, eax cmovg rcx, rax sub r14, rcx add r15, rcx loc_22549: mov rax, [rsp+118h+var_108] mov [rsp+118h+var_F8], rax lea rsi, [rsp+118h+var_F0]; int mov edx, offset dword_40; void * mov edi, ebx; this xor ecx, ecx; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' jnz loc_2267E mov rbp, [rsp+118h+var_C8] movzx r13d, [rsp+118h+var_B4] lea r8, [rsp+118h+var_B0] mov edi, ebx; this mov esi, r13d mov rdx, rbp mov ecx, 2 call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *) test al, al jz short loc_225EC mov ecx, [rsp+118h+var_88] shl rcx, 6 add rcx, rbp; unsigned __int64 lea rsi, [rsp+118h+var_70]; int mov edx, offset dword_40; void * mov edi, ebx; this call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' jnz loc_2267E lea rax, [rsp+118h+var_B0] mov [rsp+118h+var_118], rax lea r9, [rsp+118h+var_70] mov rdi, r12 mov esi, ebx mov rdx, r15 mov rcx, r14 mov r8, [rsp+118h+var_F8] call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*) test al, al jnz short loc_2265A loc_225EC: lea rax, [rsp+118h+var_B0] mov edi, ebx; this mov esi, r13d mov r13, rax mov rdx, rbp mov ecx, 0Bh mov r8, rax call _ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr; nglog::tools::GetSectionHeaderByType(int,ushort,ulong,uint,Elf64_Shdr *) test al, al jz short loc_2267E mov ecx, [rsp+118h+var_88] shl rcx, 6 add rcx, rbp; unsigned __int64 lea rsi, [rsp+118h+var_70]; int mov edx, offset dword_40; void * mov edi, ebx; this call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' jnz short loc_2267E mov [rsp+118h+var_118], r13 lea r9, [rsp+118h+var_70] mov rdi, r12 mov esi, ebx mov rdx, r15 mov rcx, r14 mov r8, [rsp+118h+var_F8] call _ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_; nglog::tools::FindSymbol(ulong,int,char *,ulong,ulong,Elf64_Shdr const*,Elf64_Shdr const*) test al, al jz short loc_2267E loc_2265A: mov r13b, 1 mov rdi, r15; this mov rsi, r14; char * call _ZN5nglog5tools12_GLOBAL__N_115DemangleInplaceEPcm; nglog::tools::`anonymous namespace'::DemangleInplace(char *,ulong) jmp short loc_226D2 loc_2266A: cmp byte ptr [r15+1], 0 jz short loc_22679 mov byte ptr [r15+r14-1], 0 jmp short loc_22698 loc_22679: xor r13d, r13d jmp short loc_226D2 loc_2267E: xor r13d, r13d cmp byte ptr [r15+1], 0 jz short loc_226D2 cmp cs:_ZN5nglog5tools12_GLOBAL__N_120g_symbolize_callbackE, 0; nglog::tools::`anonymous namespace'::g_symbolize_callback jnz short loc_226D2 mov byte ptr [r14+r15-1], 0 loc_22698: lea rdi, a0x_0; "+0x" mov rsi, r15; char * mov rdx, r14; char * call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong) sub r12, [rsp+118h+var_108] mov rdi, r12; this mov rsi, r15; unsigned __int64 mov rdx, r14; char * call _ZN5nglog5toolsL19SafeAppendHexNumberEmPcm; nglog::tools::SafeAppendHexNumber(ulong,char *,ulong) lea rdi, aVoidNglogAnony+86h; this mov rsi, r15; char * mov rdx, r14; char * call _ZN5nglog5toolsL16SafeAppendStringEPKcPcm; nglog::tools::SafeAppendString(char const*,char *,ulong) mov r13b, 1 loc_226D2: cmp ebx, 0FFFFFFFFh jz short loc_226DE mov edi, ebx call _close loc_226DE: mov eax, r13d add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_22703 jmp short $+2 loc_226F7: mov r14, rax mov ebx, 0FFFFFFFFh jmp short loc_22706 jmp short loc_2271A loc_22703: mov r14, rax loc_22706: cmp ebx, 0FFFFFFFFh jz short loc_22712 mov edi, ebx call _close loc_22712: mov rdi, r14 call __Unwind_Resume loc_2271A: mov rdi, rax call __clang_call_terminate
long long nglog::tools::SymbolizeAndDemangle( unsigned long long a1, nglog::tools::_anonymous_namespace_ *this, char *a3, unsigned long long a4) { _BYTE *v4; // r13 char *v5; // r14 nglog::tools::_anonymous_namespace_ *v6; // r15 unsigned long long v7; // rcx unsigned int v8; // ebx unsigned long long v9; // rax unsigned long long v10; // rdx int v11; // eax long long v12; // rcx long long v13; // rbp unsigned long long v14; // rdx unsigned long long v15; // rcx unsigned long long v16; // rcx unsigned long long v18; // [rsp+10h] [rbp-108h] BYREF unsigned long long v19; // [rsp+18h] [rbp-100h] BYREF unsigned long long v20; // [rsp+20h] [rbp-F8h] int v21[4]; // [rsp+28h] [rbp-F0h] BYREF __int16 v22; // [rsp+38h] [rbp-E0h] long long v23; // [rsp+50h] [rbp-C8h] unsigned __int16 v24; // [rsp+64h] [rbp-B4h] _BYTE v25[40]; // [rsp+68h] [rbp-B0h] BYREF unsigned int v26; // [rsp+90h] [rbp-88h] int v27[28]; // [rsp+A8h] [rbp-70h] BYREF LODWORD(v4) = 0; v19 = 0LL; v18 = 0LL; if ( !a3 ) { v8 = -1; goto LABEL_29; } v5 = a3; v6 = this; *(_BYTE *)this = 0; nglog::tools::SafeAppendString((nglog::tools *)"(", (const char *)this, a3, a4); if ( nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback ) { v8 = nglog::tools::`anonymous namespace'::g_symbolize_open_object_file_callback( a1, &v19, &v18, (char *)this + 1, v5 - 1); } else { nglog::tools::OpenObjectFileContainingPcAndGetStartAddress( (nglog::tools *)v21, a1, &v19, &v18, (char *)this + 1, (unsigned long long)(v5 - 1)); v8 = v21[0]; } if ( v8 == -1 ) { if ( *((_BYTE *)this + 1) ) { v5[(_QWORD)this - 1] = 0; LABEL_28: nglog::tools::SafeAppendString((nglog::tools *)"+0x", (const char *)v6, v5, v7); nglog::tools::SafeAppendHexNumber((nglog::tools *)(a1 - v18), (unsigned long long)v6, v5, v15); nglog::tools::SafeAppendString((nglog::tools *)")", (const char *)v6, v5, v16); LOBYTE(v4) = 1; goto LABEL_29; } LABEL_24: LODWORD(v4) = 0; goto LABEL_29; } v9 = nglog::tools::ReadFromOffset(v8, (long long)v21, (char *)&dword_40, 0LL); if ( v9 != 64 || v21[0] != 1179403647 ) goto LABEL_24; if ( nglog::tools::`anonymous namespace'::g_symbolize_callback ) { v10 = 0LL; if ( v22 == 3 ) v10 = v19; v11 = nglog::tools::`anonymous namespace'::g_symbolize_callback(v8, a1, this, v5, v10); v12 = 0LL; if ( v11 > 0 ) v12 = (unsigned int)v11; v5 -= v12; v6 = (nglog::tools::_anonymous_namespace_ *)((char *)this + v12); } v20 = v18; if ( nglog::tools::ReadFromOffset(v8, (long long)v21, (char *)&dword_40, 0LL) == 64 ) { v13 = v23; LODWORD(v4) = v24; if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType((nglog::tools *)v8) ) { if ( nglog::tools::ReadFromOffset(v8, (long long)v27, (char *)&dword_40, v13 + ((unsigned long long)v26 << 6)) != 64 ) goto LABEL_25; if ( (unsigned __int8)nglog::tools::FindSymbol(a1, v8, v6, v5, v20, v27, v25) ) { LABEL_21: LOBYTE(v4) = 1; nglog::tools::`anonymous namespace'::DemangleInplace(v6, v5, v14); goto LABEL_29; } } v4 = v25; if ( (unsigned __int8)nglog::tools::GetSectionHeaderByType((nglog::tools *)v8) && nglog::tools::ReadFromOffset(v8, (long long)v27, (char *)&dword_40, v13 + ((unsigned long long)v26 << 6)) == 64 && (unsigned __int8)nglog::tools::FindSymbol(a1, v8, v6, v5, v20, v27, v25) ) { goto LABEL_21; } } LABEL_25: LODWORD(v4) = 0; if ( *((_BYTE *)v6 + 1) && !nglog::tools::`anonymous namespace'::g_symbolize_callback ) { *((_BYTE *)v6 + (_QWORD)v5 - 1) = 0; goto LABEL_28; } LABEL_29: if ( v8 != -1 ) close(v8); return (unsigned int)v4; }
SymbolizeAndDemangle: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 XOR R13D,R13D MOV qword ptr [RSP + 0x18],R13 MOV qword ptr [RSP + 0x10],R13 TEST RDX,RDX JZ 0x001224a2 MOV R14,RDX MOV R15,RSI MOV R12,RDI MOV byte ptr [RSI],0x0 LEA RDI,[0x12494d] CALL 0x00122722 MOV RAX,qword ptr [0x00142ad8] TEST RAX,RAX JZ 0x001224ac LEA RCX,[R15 + 0x1] LEA R8,[R14 + -0x1] LAB_0012248f: LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] MOV RDI,R12 CALL RAX MOV EBX,EAX JMP 0x001224cf LAB_001224a2: MOV EBX,0xffffffff JMP 0x001226d2 LAB_001224ac: LEA R8,[R15 + 0x1] LEA R9,[R14 + -0x1] LAB_001224b4: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x18] LEA RCX,[RSP + 0x10] MOV RSI,R12 CALL 0x0012275f MOV EBX,dword ptr [RSP + 0x28] LAB_001224cf: CMP EBX,-0x1 JZ 0x0012266a LAB_001224d8: LEA RSI,[RSP + 0x28] MOV EDX,0x40 MOV EDI,EBX XOR ECX,ECX CALL 0x00122388 CMP RAX,0x40 SETZ AL CMP dword ptr [RSP + 0x28],0x464c457f SETZ CL AND CL,AL JZ 0x00122679 MOV RAX,qword ptr [0x00142ad0] TEST RAX,RAX JZ 0x00122549 XOR R8D,R8D CMP word ptr [RSP + 0x38],0x3 MOV EDX,0x0 JNZ 0x00122526 MOV RDX,qword ptr [RSP + 0x18] LAB_00122526: TEST CL,CL CMOVNZ R8,RDX LAB_0012252c: MOV EDI,EBX MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 CALL RAX XOR ECX,ECX TEST EAX,EAX MOV EAX,EAX CMOVG RCX,RAX SUB R14,RCX ADD R15,RCX LAB_00122549: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RAX LAB_00122553: LEA RSI,[RSP + 0x28] MOV EDX,0x40 MOV EDI,EBX XOR ECX,ECX CALL 0x00122388 CMP RAX,0x40 JNZ 0x0012267e MOV RBP,qword ptr [RSP + 0x50] MOVZX R13D,word ptr [RSP + 0x64] LEA R8,[RSP + 0x68] MOV EDI,EBX MOV ESI,R13D MOV RDX,RBP MOV ECX,0x2 CALL 0x00122d64 TEST AL,AL JZ 0x001225ec MOV ECX,dword ptr [RSP + 0x90] SHL RCX,0x6 ADD RCX,RBP LEA RSI,[RSP + 0xa8] MOV EDX,0x40 MOV EDI,EBX CALL 0x00122388 CMP RAX,0x40 JNZ 0x0012267e LEA RAX,[RSP + 0x68] MOV qword ptr [RSP],RAX LEA R9,[RSP + 0xa8] MOV RDI,R12 MOV ESI,EBX MOV RDX,R15 MOV RCX,R14 MOV R8,qword ptr [RSP + 0x20] CALL 0x00122e83 TEST AL,AL JNZ 0x0012265a LAB_001225ec: LEA RAX,[RSP + 0x68] MOV EDI,EBX MOV ESI,R13D MOV R13,RAX MOV RDX,RBP MOV ECX,0xb MOV R8,RAX CALL 0x00122d64 TEST AL,AL JZ 0x0012267e MOV ECX,dword ptr [RSP + 0x90] SHL RCX,0x6 ADD RCX,RBP LEA RSI,[RSP + 0xa8] MOV EDX,0x40 MOV EDI,EBX CALL 0x00122388 CMP RAX,0x40 JNZ 0x0012267e MOV qword ptr [RSP],R13 LEA R9,[RSP + 0xa8] MOV RDI,R12 MOV ESI,EBX MOV RDX,R15 MOV RCX,R14 MOV R8,qword ptr [RSP + 0x20] CALL 0x00122e83 TEST AL,AL JZ 0x0012267e LAB_0012265a: MOV R13B,0x1 MOV RDI,R15 MOV RSI,R14 CALL 0x00122c6e JMP 0x001226d2 LAB_0012266a: CMP byte ptr [R15 + 0x1],0x0 JZ 0x00122679 MOV byte ptr [R15 + R14*0x1 + -0x1],0x0 JMP 0x00122698 LAB_00122679: XOR R13D,R13D JMP 0x001226d2 LAB_0012267e: XOR R13D,R13D CMP byte ptr [R15 + 0x1],0x0 JZ 0x001226d2 CMP qword ptr [0x00142ad0],0x0 JNZ 0x001226d2 MOV byte ptr [R14 + R15*0x1 + -0x1],0x0 LAB_00122698: LEA RDI,[0x125f72] MOV RSI,R15 MOV RDX,R14 CALL 0x00122722 SUB R12,qword ptr [RSP + 0x10] MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 CALL 0x00122be7 LEA RDI,[0x124c15] MOV RSI,R15 MOV RDX,R14 CALL 0x00122722 MOV R13B,0x1 LAB_001226d2: CMP EBX,-0x1 JZ 0x001226de LAB_001226d7: MOV EDI,EBX CALL 0x001079e0 LAB_001226de: MOV EAX,R13D ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nglog::tools::SymbolizeAndDemangle(void*, char*, unsigned long, nglog::tools::SymbolizeOptions) */ ulong nglog::tools::SymbolizeAndDemangle(ulong param_1,char *param_2,ulong param_3) { char cVar1; int __fd; uint uVar2; long lVar3; ulong uVar4; ulong uVar5; Elf64_Shdr *pEVar6; ulong local_108; ulong local_100; ulong local_f8; int local_f0 [4]; short local_e0; ulong local_c8; ushort local_b4; Elf64_Shdr local_b0; Elf64_Shdr local_70; uVar5 = 0; local_100 = 0; local_108 = 0; if (param_3 == 0) { __fd = -1; goto LAB_001226d2; } *param_2 = '\0'; SafeAppendString("(",param_2,param_3); if ((anonymous_namespace)::g_symbolize_open_object_file_callback == (code *)0x0) { /* try { // try from 001224b4 to 001224ca has its CatchHandler @ 001226f5 */ OpenObjectFileContainingPcAndGetStartAddress ((tools *)local_f0,param_1,&local_100,&local_108,param_2 + 1,param_3 - 1); __fd = local_f0[0]; } else { /* try { // try from 0012248f to 0012249d has its CatchHandler @ 001226f7 */ __fd = (*(anonymous_namespace)::g_symbolize_open_object_file_callback) (param_1,&local_100,&local_108,param_2 + 1,param_3 - 1); } if (__fd == -1) { if (param_2[1] == '\0') goto LAB_00122679; param_2[param_3 - 1] = '\0'; } else { /* try { // try from 001224d8 to 001224ea has its CatchHandler @ 00122703 */ lVar3 = ReadFromOffset(__fd,local_f0,0x40,0); if (local_f0[0] != 0x464c457f || lVar3 != 0x40) { LAB_00122679: uVar5 = 0; goto LAB_001226d2; } if ((anonymous_namespace)::g_symbolize_callback != (code *)0x0) { uVar5 = 0; if (local_e0 == 3) { uVar5 = local_100; } uVar4 = 0; if (local_f0[0] == 0x464c457f && lVar3 == 0x40) { uVar4 = uVar5; } /* try { // try from 0012252c to 00122538 has its CatchHandler @ 001226f3 */ uVar2 = (*(anonymous_namespace)::g_symbolize_callback)(__fd,param_1,param_2,param_3,uVar4); uVar5 = 0; if (0 < (int)uVar2) { uVar5 = (ulong)uVar2; } param_3 = param_3 - uVar5; param_2 = param_2 + uVar5; } local_f8 = local_108; /* try { // try from 00122553 to 00122667 has its CatchHandler @ 00122703 */ lVar3 = ReadFromOffset(__fd,local_f0,0x40,0); if (lVar3 == 0x40) { pEVar6 = (Elf64_Shdr *)(ulong)local_b4; cVar1 = GetSectionHeaderByType(__fd,local_b4,local_c8,2,&local_b0); if (cVar1 == '\0') { LAB_001225ec: pEVar6 = &local_b0; cVar1 = GetSectionHeaderByType(__fd,local_b4,local_c8,0xb,pEVar6); if (cVar1 != '\0') { lVar3 = ReadFromOffset(__fd,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8); if (lVar3 == 0x40) { cVar1 = FindSymbol(param_1,__fd,param_2,param_3,local_f8,&local_70,pEVar6); if (cVar1 != '\0') goto LAB_0012265a; } } } else { lVar3 = ReadFromOffset(__fd,&local_70,0x40,(ulong)local_b0.sh_link * 0x40 + local_c8); if (lVar3 == 0x40) { cVar1 = FindSymbol(param_1,__fd,param_2,param_3,local_f8,&local_70,&local_b0); if (cVar1 == '\0') goto LAB_001225ec; LAB_0012265a: uVar5 = CONCAT71((int7)((ulong)pEVar6 >> 8),1); (anonymous_namespace)::DemangleInplace(param_2,param_3); goto LAB_001226d2; } } } uVar5 = 0; if ((param_2[1] == '\0') || ((anonymous_namespace)::g_symbolize_callback != (code *)0x0)) goto LAB_001226d2; param_2[param_3 - 1] = '\0'; } SafeAppendString("+0x",param_2,param_3); SafeAppendHexNumber(param_1 - local_108,param_2,param_3); SafeAppendString(")",param_2,param_3); uVar5 = 1; LAB_001226d2: if (__fd != -1) { /* try { // try from 001226d7 to 001226dd has its CatchHandler @ 00122701 */ close(__fd); } return uVar5 & 0xffffffff; }
44,955
ma_service_thread_control_end
eloqsql/storage/maria/ma_servicethread.c
void ma_service_thread_control_end(MA_SERVICE_THREAD_CONTROL *control) { DBUG_ENTER("ma_service_thread_control_end"); DBUG_PRINT("init", ("control %p", control)); DBUG_ASSERT(control->inited); mysql_mutex_lock(control->LOCK_control); if (!control->killed) { DBUG_PRINT("info",("killing Maria background thread")); control->killed= TRUE; /* kill it */ mysql_cond_broadcast(control->COND_control); mysql_mutex_unlock(control->LOCK_control); DBUG_PRINT("info", ("waiting for Maria background thread to die")); pthread_join(control->thread, NULL); } else mysql_mutex_unlock(control->LOCK_control); mysql_mutex_destroy(control->LOCK_control); mysql_cond_destroy(control->COND_control); control->inited= FALSE; DBUG_VOID_RETURN; }
O0
c
ma_service_thread_control_end: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x5f18e jmp 0x5f190 jmp 0x5f192 movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi leaq 0xfbef5(%rip), %rsi # 0x15b096 movl $0x3e, %edx callq 0x5f230 movq -0x8(%rbp), %rax cmpb $0x0, 0x8(%rax) jne 0x5f1ef jmp 0x5f1b7 jmp 0x5f1b9 movq -0x8(%rbp), %rax movb $0x1, 0x8(%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi callq 0x5f2a0 movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi callq 0x5f300 jmp 0x5f1dd movq -0x8(%rbp), %rax movq (%rax), %rdi xorl %eax, %eax movl %eax, %esi callq 0x2a2a0 jmp 0x5f1fc movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi callq 0x5f300 movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi callq 0x5f360 movq -0x8(%rbp), %rax movq 0x18(%rax), %rdi callq 0x5f3b0 movq -0x8(%rbp), %rax movb $0x0, 0x9(%rax) jmp 0x5f220 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_service_thread_control_end: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_5F18E: jmp short $+2 loc_5F190: jmp short $+2 loc_5F192: mov rax, [rbp+var_8] mov rdi, [rax+10h] lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 3Eh ; '>' call inline_mysql_mutex_lock_9 mov rax, [rbp+var_8] cmp byte ptr [rax+8], 0 jnz short loc_5F1EF jmp short $+2 loc_5F1B7: jmp short $+2 loc_5F1B9: mov rax, [rbp+var_8] mov byte ptr [rax+8], 1 mov rax, [rbp+var_8] mov rdi, [rax+18h] call inline_mysql_cond_broadcast_1 mov rax, [rbp+var_8] mov rdi, [rax+10h] call inline_mysql_mutex_unlock_9 jmp short $+2 loc_5F1DD: mov rax, [rbp+var_8] mov rdi, [rax] xor eax, eax mov esi, eax call _pthread_join jmp short loc_5F1FC loc_5F1EF: mov rax, [rbp+var_8] mov rdi, [rax+10h] call inline_mysql_mutex_unlock_9 loc_5F1FC: mov rax, [rbp+var_8] mov rdi, [rax+10h] call inline_mysql_mutex_destroy_4 mov rax, [rbp+var_8] mov rdi, [rax+18h] call inline_mysql_cond_destroy_2 mov rax, [rbp+var_8] mov byte ptr [rax+9], 0 jmp short $+2 loc_5F220: add rsp, 10h pop rbp retn
long long ma_service_thread_control_end(long long a1) { long long result; // rax inline_mysql_mutex_lock_9( *(_QWORD *)(a1 + 16), "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", 62LL); if ( *(_BYTE *)(a1 + 8) ) { inline_mysql_mutex_unlock_9(*(_QWORD *)(a1 + 16)); } else { *(_BYTE *)(a1 + 8) = 1; inline_mysql_cond_broadcast_1(*(_QWORD *)(a1 + 24)); inline_mysql_mutex_unlock_9(*(_QWORD *)(a1 + 16)); pthread_join(*(_QWORD *)a1, 0LL); } inline_mysql_mutex_destroy_4(*(_QWORD *)(a1 + 16)); inline_mysql_cond_destroy_2(*(_QWORD *)(a1 + 24)); result = a1; *(_BYTE *)(a1 + 9) = 0; return result; }
ma_service_thread_control_end: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x0015f18e LAB_0015f18e: JMP 0x0015f190 LAB_0015f190: JMP 0x0015f192 LAB_0015f192: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] LEA RSI,[0x25b096] MOV EDX,0x3e CALL 0x0015f230 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x8],0x0 JNZ 0x0015f1ef JMP 0x0015f1b7 LAB_0015f1b7: JMP 0x0015f1b9 LAB_0015f1b9: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x8],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0015f2a0 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0015f300 JMP 0x0015f1dd LAB_0015f1dd: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] XOR EAX,EAX MOV ESI,EAX CALL 0x0012a2a0 JMP 0x0015f1fc LAB_0015f1ef: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0015f300 LAB_0015f1fc: MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x0015f360 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0015f3b0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x9],0x0 JMP 0x0015f220 LAB_0015f220: ADD RSP,0x10 POP RBP RET
void ma_service_thread_control_end(pthread_t *param_1) { inline_mysql_mutex_lock (param_1[2],"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", 0x3e); if ((char)param_1[1] == '\0') { *(int1 *)(param_1 + 1) = 1; inline_mysql_cond_broadcast(param_1[3]); inline_mysql_mutex_unlock(param_1[2]); pthread_join(*param_1,(void **)0x0); } else { inline_mysql_mutex_unlock(param_1[2]); } inline_mysql_mutex_destroy(param_1[2]); inline_mysql_cond_destroy(param_1[3]); *(int1 *)((long)param_1 + 9) = 0; return; }
44,956
my_hash_sort_utf8mb4_nopad
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb4_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0) { my_tosort_unicode(uni_plane, &wc, cs->state); MY_HASH_ADD_16(m1, m2, (uint) (wc & 0xFFFF)); if (wc > 0xFFFF) { /* Put the highest byte only if it is non-zero, to make hash functions for utf8mb3 and utf8mb4 compatible for BMP characters. This is useful to keep order of records in test results, e.g. for "SHOW GRANTS". */ MY_HASH_ADD(m1, m2, (uint) ((wc >> 16) & 0xFF)); } s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf8mb4_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x64960 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0x699da movq -0x48(%rbp), %rdi movq -0x8(%rbp), %rax movl 0xc(%rax), %edx leaq -0x30(%rbp), %rsi callq 0x65080 jmp 0x698f1 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF andl $0xff, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x69935 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF shrl $0x8, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x69976 cmpq $0xffff, -0x30(%rbp) # imm = 0xFFFF jbe 0x699c4 jmp 0x69982 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x10, %rcx andq $0xff, %rcx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x699c4 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x698ba movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf8mb4_nopad: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_698BA: mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4 mov [rbp+var_34], eax cmp eax, 0 jle loc_699DA mov rdi, [rbp+var_48] mov rax, [rbp+var_8] mov edx, [rax+0Ch] lea rsi, [rbp+var_30] call my_tosort_unicode jmp short $+2 loc_698F1: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh and ecx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_69935: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh shr ecx, 8 mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_69976: cmp [rbp+var_30], 0FFFFh jbe short loc_699C4 jmp short $+2 loc_69982: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 10h and rcx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_699C4: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_698BA loc_699DA: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_utf8mb4_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax long long v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+10h] [rbp-50h] long long v10; // [rsp+10h] [rbp-50h] _QWORD *v11; // [rsp+18h] [rbp-48h] long long v12; // [rsp+20h] [rbp-40h] int v13; // [rsp+2Ch] [rbp-34h] unsigned long long v14; // [rsp+30h] [rbp-30h] BYREF _QWORD *v15; // [rsp+38h] [rbp-28h] long long *v16; // [rsp+40h] [rbp-20h] long long v17; // [rsp+48h] [rbp-18h] long long v18; // [rsp+50h] [rbp-10h] long long v19; // [rsp+58h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v12 = a3 + a2; v11 = *(_QWORD **)(a1 + 120); v9 = *a4; v7 = *a5; while ( 1 ) { v13 = my_mb_wc_utf8mb4(v19, (long long)&v14, v18, v12, (long long)a5, a6); if ( v13 <= 0 ) break; my_tosort_unicode(v11, &v14, *(_DWORD *)(v19 + 12)); v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v14 * (v7 + (v9 & 0x3F))); v8 = v7 + 3; v9 = v10 ^ ((v10 << 8) + BYTE1(v14) * (v8 + (v10 & 0x3F))); v7 = v8 + 3; if ( v14 > 0xFFFF ) { v9 ^= (v9 << 8) + BYTE2(v14) * (v7 + (v9 & 0x3F)); v7 += 3LL; } v18 += v13; } *v16 = v9; result = v15; *v15 = v7; return result; }
my_hash_sort_utf8mb4_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_001698ba: MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x00164960 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x001699da MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xc] LEA RSI,[RBP + -0x30] CALL 0x00165080 JMP 0x001698f1 LAB_001698f1: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff AND ECX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00169935 LAB_00169935: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff SHR ECX,0x8 MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00169976 LAB_00169976: CMP qword ptr [RBP + -0x30],0xffff JBE 0x001699c4 JMP 0x00169982 LAB_00169982: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x10 AND RCX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x001699c4 LAB_001699c4: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001698ba LAB_001699da: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_utf8mb4_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; long lVar2; int iVar3; long local_60; ulong local_58; ulong local_38; long *local_30; ulong *local_28; long local_20; long local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { iVar3 = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3); if (iVar3 < 1) break; my_tosort_unicode(uVar1,&local_38,*(int4 *)(local_10 + 0xc)); local_58 = ((local_58 & 0x3f) + local_60) * (ulong)((uint)local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)(((uint)local_38 & 0xffff) >> 8) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 6; if (0xffff < local_38) { local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 0x10) & 0xff) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 9; } local_60 = lVar2; local_18 = local_18 + iVar3; } *local_28 = local_58; *local_30 = local_60; return; }
44,957
mysql_stmt_reset_cont
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_reset_cont(my_bool *ret, MYSQL_STMT *stmt, int ready_status) { MK_ASYNC_CONT_BODY( stmt->mysql, TRUE, r_my_bool) }
O3
c
mysql_stmt_reset_cont: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax movq 0x480(%rax), %rcx movq 0x28(%rcx), %r15 cmpb $0x0, 0x15(%r15) je 0x709a9 movb $0x1, 0x14(%r15) movl %edx, 0x4(%r15) leaq 0x38(%r15), %rdi callq 0x71997 movb $0x0, 0x14(%r15) testl %eax, %eax jle 0x70a0c movl (%r15), %r15d jmp 0x70a82 movl $0x7de, 0x90(%rax) # imm = 0x7DE movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x2fd0ed(%rip), %rax # 0x36dab0 movq (%rax), %rsi movl $0x5, %edx callq 0x3a1a0 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x2fd0d2(%rip), %rax # 0x36dac0 movq 0x70(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x3a1a0 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, (%rbx) jmp 0x70a82 movb $0x0, 0x15(%r15) js 0x70a19 movb 0x8(%r15), %al jmp 0x70a7d movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x2fd079(%rip), %rax # 0x36dab0 movq (%rax), %rsi movl $0x5, %edx callq 0x3a1a0 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x2fd05e(%rip), %rax # 0x36dac0 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x3a1a0 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movb $0x1, %al movb %al, (%rbx) xorl %r15d, %r15d movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_reset_cont: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] mov rcx, [rax+480h] mov r15, [rcx+28h] cmp byte ptr [r15+15h], 0 jz short loc_709A9 mov byte ptr [r15+14h], 1 mov [r15+4], edx lea rdi, [r15+38h] call my_context_continue mov byte ptr [r15+14h], 0 test eax, eax jle short loc_70A0C mov r15d, [r15] jmp loc_70A82 loc_709A9: mov dword ptr [rax+90h], 7DEh mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+70h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov byte ptr [rbx], 1 jmp short loc_70A82 loc_70A0C: mov byte ptr [r15+15h], 0 js short loc_70A19 mov al, [r15+8] jmp short loc_70A7D loc_70A19: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov al, 1 loc_70A7D: mov [rbx], al xor r15d, r15d loc_70A82: mov eax, r15d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_reset_cont(char *a1, long long a2, unsigned int a3) { long long v3; // rax unsigned int *v4; // r15 int v5; // eax unsigned int v6; // r15d char v7; // al v3 = *(_QWORD *)(a2 + 56); v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); if ( *((_BYTE *)v4 + 21) ) { *((_BYTE *)v4 + 20) = 1; v4[1] = a3; v5 = my_context_continue(v4 + 14); *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { *((_BYTE *)v4 + 21) = 0; if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = *((_BYTE *)v4 + 8); } *a1 = v7; return 0; } else { return *v4; } } else { *(_DWORD *)(v3 + 144) = 2014; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); v6 = 0; *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[14], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; *a1 = 1; } return v6; }
mysql_stmt_reset_cont: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] MOV RCX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RCX + 0x28] CMP byte ptr [R15 + 0x15],0x0 JZ 0x001709a9 MOV byte ptr [R15 + 0x14],0x1 MOV dword ptr [R15 + 0x4],EDX LEA RDI,[R15 + 0x38] CALL 0x00171997 MOV byte ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x00170a0c MOV R15D,dword ptr [R15] JMP 0x00170a82 LAB_001709a9: MOV dword ptr [RAX + 0x90],0x7de MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x46dab0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0013a1a0 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x46dac0] MOV RSI,qword ptr [RAX + 0x70] MOV EDX,0x1ff CALL 0x0013a1a0 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV byte ptr [RBX],0x1 JMP 0x00170a82 LAB_00170a0c: MOV byte ptr [R15 + 0x15],0x0 JS 0x00170a19 MOV AL,byte ptr [R15 + 0x8] JMP 0x00170a7d LAB_00170a19: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x46dab0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x0013a1a0 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x46dac0] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x0013a1a0 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV AL,0x1 LAB_00170a7d: MOV byte ptr [RBX],AL XOR R15D,R15D LAB_00170a82: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_reset_cont(int1 *param_1,long param_2,int4 param_3) { int4 *puVar1; int1 uVar2; int iVar3; int4 uVar4; puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); if (*(char *)((long)puVar1 + 0x15) == '\0') { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7de; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); uVar4 = 0; *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97), PTR_s_Commands_out_of_sync__you_can_t_r_0046db30,0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; *param_1 = 1; } else { *(int1 *)(puVar1 + 5) = 1; puVar1[1] = param_3; iVar3 = my_context_continue(puVar1 + 0xe); *(int1 *)(puVar1 + 5) = 0; if (iVar3 < 1) { *(int1 *)((long)puVar1 + 0x15) = 0; if (iVar3 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0046db00, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar2 = 1; } else { uVar2 = *(int1 *)(puVar1 + 2); } *param_1 = uVar2; uVar4 = 0; } else { uVar4 = *puVar1; } } return uVar4; }
44,958
Item_param::clone_item(THD*)
eloqsql/sql/item.cc
Item * Item_param::clone_item(THD *thd) { // There's no "default". See comments in Item_param::save_in_field(). switch (state) { case IGNORE_VALUE: case DEFAULT_VALUE: invalid_default_param(); // fall through case NULL_VALUE: return new (thd->mem_root) Item_null(thd, name.str); case SHORT_DATA_VALUE: case LONG_DATA_VALUE: { DBUG_ASSERT(type_handler()->cmp_type() == value.type_handler()->cmp_type()); return value_clone_item(thd); } case NO_VALUE: return 0; } DBUG_ASSERT(0); // Garbage return 0; }
O0
cpp
Item_param::clone_item(THD*): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) movl 0x98(%rax), %eax movq %rax, -0x48(%rbp) subq $0x5, %rax ja 0x8fd65c movq -0x48(%rbp), %rax leaq 0x61b141(%rip), %rcx # 0xf186d8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x50(%rbp), %rdi callq 0x8fc600 movq -0x18(%rbp), %rax movq 0x28(%rax), %rsi movq %rsi, -0x68(%rbp) movl $0x70, %edi callq 0x4af070 movq %rax, %rcx movq %rcx, -0x60(%rbp) movb $0x0, -0x29(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movq %rax, -0x58(%rbp) je 0x8fd60e movq -0x60(%rbp), %rdi movq -0x50(%rbp), %rax movq -0x68(%rbp), %rcx movq %rdi, -0x20(%rbp) movq %rcx, -0x28(%rbp) movb $0x1, -0x29(%rbp) movq -0x18(%rbp), %rsi movq 0x48(%rax), %rdx leaq 0xb04813(%rip), %rcx # 0x1401e10 callq 0x4e3d20 jmp 0x8fd604 movq -0x60(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x8fd60e movq -0x58(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x8fd668 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) testb $0x1, -0x29(%rbp) jne 0x8fd62c jmp 0x8fd639 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x4af130 jmp 0x8fd672 jmp 0x8fd63d jmp 0x8fd63f movq -0x50(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x8fd110 movq %rax, -0x8(%rbp) jmp 0x8fd668 movq $0x0, -0x8(%rbp) jmp 0x8fd668 jmp 0x8fd65e jmp 0x8fd660 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x70, %rsp popq %rbp retq movq -0x38(%rbp), %rdi callq 0x433ff0 nopl (%rax,%rax)
_ZN10Item_param10clone_itemEP3THD: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_50], rax mov eax, [rax+98h] mov [rbp+var_48], rax sub rax, 5; switch 6 cases ja def_8FD59E; jumptable 00000000008FD59E default case mov rax, [rbp+var_48] lea rcx, jpt_8FD59E movsxd rax, ds:(jpt_8FD59E - 0F186D8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_8FD5A0: mov rdi, [rbp+var_50]; jumptable 00000000008FD59E cases 4,5 call _ZNK10Item_param21invalid_default_paramEv; Item_param::invalid_default_param(void) loc_8FD5A9: mov rax, [rbp+var_18]; jumptable 00000000008FD59E case 1 mov rsi, [rax+28h] mov [rbp+var_68], rsi mov edi, 70h ; 'p' call _ZN4ItemnwEmP11st_mem_root; Item::operator new(ulong,st_mem_root *) mov rcx, rax mov [rbp+var_60], rcx mov [rbp+var_29], 0 xor eax, eax cmp rcx, 0 mov [rbp+var_58], rax jz short loc_8FD60E mov rdi, [rbp+var_60]; this mov rax, [rbp+var_50] mov rcx, [rbp+var_68] mov [rbp+var_20], rdi mov [rbp+var_28], rcx mov [rbp+var_29], 1 mov rsi, [rbp+var_18]; THD * mov rdx, [rax+48h]; char * lea rcx, my_charset_bin; charset_info_st * call _ZN9Item_nullC2EP3THDPKcPK15charset_info_st; Item_null::Item_null(THD *,char const*,charset_info_st const*) jmp short $+2 loc_8FD604: mov rax, [rbp+var_60] mov [rbp+var_58], rax jmp short $+2 loc_8FD60E: mov rax, [rbp+var_58] mov [rbp+var_8], rax jmp short loc_8FD668 mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax test [rbp+var_29], 1 jnz short loc_8FD62C jmp short loc_8FD639 loc_8FD62C: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] call _ZN4ItemdlEPvP11st_mem_root; Item::operator delete(void *,st_mem_root *) loc_8FD639: jmp short loc_8FD672 loc_8FD63B: jmp short $+2; jumptable 00000000008FD59E cases 2,3 loc_8FD63D: jmp short $+2 loc_8FD63F: mov rdi, [rbp+var_50]; this mov rsi, [rbp+var_18]; THD * call _ZN10Item_param16value_clone_itemEP3THD; Item_param::value_clone_item(THD *) mov [rbp+var_8], rax jmp short loc_8FD668 loc_8FD652: mov [rbp+var_8], 0; jumptable 00000000008FD59E case 0 jmp short loc_8FD668 def_8FD59E: jmp short $+2; jumptable 00000000008FD59E default case loc_8FD65E: jmp short $+2 loc_8FD660: mov [rbp+var_8], 0 loc_8FD668: mov rax, [rbp+var_8] add rsp, 70h pop rbp retn loc_8FD672: mov rdi, [rbp+var_38] call __Unwind_Resume
long long Item_param::clone_item(char **this, THD *a2, long long a3) { Item_null *v4; // [rsp+10h] [rbp-60h] Item_null *v5; // [rsp+18h] [rbp-58h] long long v6; // [rsp+68h] [rbp-8h] switch ( *((_DWORD *)this + 38) ) { case 0: v6 = 0LL; break; case 1: goto LABEL_3; case 2: case 3: v6 = Item_param::value_clone_item((Item_param *)this, a2); break; case 4: case 5: Item_param::invalid_default_param((Item_param *)this, (long long)a2, a3); LABEL_3: v4 = (Item_null *)Item::operator new(112LL, *((_QWORD *)a2 + 5)); v5 = 0LL; if ( v4 ) { Item_null::Item_null(v4, a2, this[9], (const charset_info_st *)&my_charset_bin); v5 = v4; } v6 = (long long)v5; break; default: v6 = 0LL; break; } return v6; }
discover_check_version: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI XOR EAX,EAX POP RBP RET
/* handler::discover_check_version() */ int8 handler::discover_check_version(void) { return 0; }
44,959
ftxui::Container::Tab(std::vector<std::shared_ptr<ftxui::ComponentBase>, std::allocator<std::shared_ptr<ftxui::ComponentBase>>>, int*)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/container.cpp
Component Tab(Components children, int* selector) { return std::make_shared<TabContainer>(std::move(children), selector); }
O1
cpp
ftxui::Container::Tab(std::vector<std::shared_ptr<ftxui::ComponentBase>, std::allocator<std::shared_ptr<ftxui::ComponentBase>>>, int*): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %rcx movq %rdi, %rbx leaq 0x18(%rsp), %r8 movq %rdx, (%r8) xorl %r15d, %r15d leaq 0x10(%rsp), %rdi movq %r15, -0x8(%rdi) leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rsi callq 0x28e4e movq (%r14), %rax movq %rax, (%rbx) movq %r15, 0x8(%rbx) movq 0x8(%r14), %rax movq %r15, 0x8(%r14) movq %rax, 0x8(%rbx) movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN5ftxui9Container3TabESt6vectorISt10shared_ptrINS_13ComponentBaseEESaIS4_EEPi: push r15 push r14 push rbx sub rsp, 20h mov rcx, rsi mov rbx, rdi lea r8, [rsp+38h+var_20] mov [r8], rdx xor r15d, r15d lea rdi, [rsp+38h+var_28] mov [rdi-8], r15 lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rsi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN5ftxui12TabContainerESaIS5_EJSt6vectorISt10shared_ptrINS4_13ComponentBaseEESaISA_EERPiEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<ftxui::TabContainer,std::allocator<ftxui::TabContainer>,std::vector<std::shared_ptr<ftxui::ComponentBase>>,int *&>(ftxui::TabContainer *&,std::_Sp_alloc_shared_tag<std::allocator<ftxui::TabContainer>>,std::vector<std::shared_ptr<ftxui::ComponentBase>>,int *&) mov rax, [r14] mov [rbx], rax mov [rbx+8], r15 mov rax, [r14+8] mov [r14+8], r15 mov [rbx+8], rax mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn
_QWORD * ftxui::Container::Tab(_QWORD *a1, long long a2, long long a3) { char v4; // [rsp+7h] [rbp-31h] BYREF long long v5; // [rsp+8h] [rbp-30h] BYREF _QWORD v6[5]; // [rsp+10h] [rbp-28h] BYREF v6[1] = a3; v5 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<ftxui::TabContainer,std::allocator<ftxui::TabContainer>,std::vector<std::shared_ptr<ftxui::ComponentBase>>,int *&>( v6, &v5, &v4, a2); *a1 = v5; a1[1] = 0LL; a1[1] = v6[0]; return a1; }
Tab: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RCX,RSI MOV RBX,RDI LEA R8,[RSP + 0x18] MOV qword ptr [R8],RDX XOR R15D,R15D LEA RDI,[RSP + 0x10] MOV qword ptr [RDI + -0x8],R15 LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RSI,R14 CALL 0x00128e4e MOV RAX,qword ptr [R14] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],R15 MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [R14 + 0x8],R15 MOV qword ptr [RBX + 0x8],RAX MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* ftxui::Container::Tab(std::vector<std::shared_ptr<ftxui::ComponentBase>, std::allocator<std::shared_ptr<ftxui::ComponentBase> > >, int*) */ Container * __thiscall ftxui::Container::Tab(Container *this,int8 param_2,int8 param_3) { int1 local_31; int8 local_30; int8 local_28; int8 local_20; local_30 = 0; local_20 = param_3; std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<ftxui::TabContainer,std::allocator<ftxui::TabContainer>,std::vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>,int*&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&local_28,&local_30,&local_31,param_2); *(int8 *)this = local_30; *(int8 *)(this + 8) = 0; *(int8 *)(this + 8) = local_28; return this; }
44,960
common_log::set_colors(bool)
monkey531[P]llama/common/log.cpp
void set_colors(bool colors) { pause(); if (colors) { g_col[COMMON_LOG_COL_DEFAULT] = LOG_COL_DEFAULT; g_col[COMMON_LOG_COL_BOLD] = LOG_COL_BOLD; g_col[COMMON_LOG_COL_RED] = LOG_COL_RED; g_col[COMMON_LOG_COL_GREEN] = LOG_COL_GREEN; g_col[COMMON_LOG_COL_YELLOW] = LOG_COL_YELLOW; g_col[COMMON_LOG_COL_BLUE] = LOG_COL_BLUE; g_col[COMMON_LOG_COL_MAGENTA] = LOG_COL_MAGENTA; g_col[COMMON_LOG_COL_CYAN] = LOG_COL_CYAN; g_col[COMMON_LOG_COL_WHITE] = LOG_COL_WHITE; } else { for (size_t i = 0; i < g_col.size(); i++) { g_col[i] = ""; } } resume(); }
O3
cpp
common_log::set_colors(bool): pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx callq 0xcebc2 testl %ebp, %ebp je 0xcf081 movq 0x6059a(%rip), %rax # 0x12f5b0 leaq 0x28202(%rip), %rcx # 0xf721f movq %rcx, (%rax) movq 0x60589(%rip), %rax # 0x12f5b0 leaq 0x281f6(%rip), %rcx # 0xf7224 movq %rcx, 0x8(%rax) leaq 0x281f0(%rip), %rcx # 0xf7229 movq %rcx, 0x10(%rax) leaq 0x281eb(%rip), %rcx # 0xf722f movq %rcx, 0x18(%rax) leaq 0x281e6(%rip), %rcx # 0xf7235 movq %rcx, 0x20(%rax) leaq 0x281e1(%rip), %rcx # 0xf723b movq %rcx, 0x28(%rax) leaq 0x281dc(%rip), %rcx # 0xf7241 movq %rcx, 0x30(%rax) leaq 0x281d7(%rip), %rcx # 0xf7247 movq %rcx, 0x38(%rax) leaq 0x281d2(%rip), %rcx # 0xf724d movq %rcx, 0x40(%rax) jmp 0xcf0bb movq 0x60528(%rip), %rax # 0x12f5b0 cmpq %rax, 0x60529(%rip) # 0x12f5b8 je 0xcf0bb xorl %ecx, %ecx leaq 0x1ed12(%rip), %rdx # 0xeddac movq %rdx, (%rax,%rcx,8) incq %rcx movq 0x60510(%rip), %rsi # 0x12f5b8 movq 0x60501(%rip), %rax # 0x12f5b0 subq %rax, %rsi sarq $0x3, %rsi cmpq %rsi, %rcx jb 0xcf09a movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %rbp jmp 0xcec4a nop
_ZN10common_log10set_colorsEb: push rbp push rbx push rax mov ebp, esi mov rbx, rdi call _ZN10common_log5pauseEv; common_log::pause(void) test ebp, ebp jz short loc_CF081 mov rax, cs:_ZL5g_col; g_col lea rcx, a0m; "\x1B[0m" mov [rax], rcx mov rax, cs:_ZL5g_col; g_col lea rcx, a1m; "\x1B[1m" mov [rax+8], rcx lea rcx, a31m; "\x1B[31m" mov [rax+10h], rcx lea rcx, a32m; "\x1B[32m" mov [rax+18h], rcx lea rcx, a33m; "\x1B[33m" mov [rax+20h], rcx lea rcx, a34m; "\x1B[34m" mov [rax+28h], rcx lea rcx, a35m; "\x1B[35m" mov [rax+30h], rcx lea rcx, a36m; "\x1B[36m" mov [rax+38h], rcx lea rcx, a37m; "\x1B[37m" mov [rax+40h], rcx jmp short loc_CF0BB loc_CF081: mov rax, cs:_ZL5g_col; g_col cmp cs:qword_12F5B8, rax jz short loc_CF0BB xor ecx, ecx lea rdx, aErrorWhileHand_0+34h; "" loc_CF09A: mov [rax+rcx*8], rdx inc rcx mov rsi, cs:qword_12F5B8 mov rax, cs:_ZL5g_col; g_col sub rsi, rax sar rsi, 3 cmp rcx, rsi jb short loc_CF09A loc_CF0BB: mov rdi, rbx; this add rsp, 8 pop rbx pop rbp jmp _ZN10common_log6resumeEv; common_log::resume(void)
long long common_log::set_colors(common_log *this, int a2) { _QWORD *v2; // rax long long v3; // rax unsigned long long v4; // rcx common_log::pause(this); if ( a2 ) { *(_QWORD *)g_col = "\x1B[0m"; v2 = (_QWORD *)g_col; *(_QWORD *)(g_col + 8) = "\x1B[1m"; v2[2] = "\x1B[31m"; v2[3] = "\x1B[32m"; v2[4] = "\x1B[33m"; v2[5] = "\x1B[34m"; v2[6] = "\x1B[35m"; v2[7] = "\x1B[36m"; v2[8] = "\x1B[37m"; } else { v3 = g_col; if ( qword_12F5B8 != g_col ) { v4 = 0LL; do { *(_QWORD *)(v3 + 8 * v4++) = ""; v3 = g_col; } while ( v4 < (qword_12F5B8 - g_col) >> 3 ); } } return common_log::resume(this); }
set_colors: PUSH RBP PUSH RBX PUSH RAX MOV EBP,ESI MOV RBX,RDI CALL 0x001cebc2 TEST EBP,EBP JZ 0x001cf081 MOV RAX,qword ptr [0x0022f5b0] LEA RCX,[0x1f721f] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [0x0022f5b0] LEA RCX,[0x1f7224] MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x1f7229] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[0x1f722f] MOV qword ptr [RAX + 0x18],RCX LEA RCX,[0x1f7235] MOV qword ptr [RAX + 0x20],RCX LEA RCX,[0x1f723b] MOV qword ptr [RAX + 0x28],RCX LEA RCX,[0x1f7241] MOV qword ptr [RAX + 0x30],RCX LEA RCX,[0x1f7247] MOV qword ptr [RAX + 0x38],RCX LEA RCX,[0x1f724d] MOV qword ptr [RAX + 0x40],RCX JMP 0x001cf0bb LAB_001cf081: MOV RAX,qword ptr [0x0022f5b0] CMP qword ptr [0x0022f5b8],RAX JZ 0x001cf0bb XOR ECX,ECX LEA RDX,[0x1eddac] LAB_001cf09a: MOV qword ptr [RAX + RCX*0x8],RDX INC RCX MOV RSI,qword ptr [0x0022f5b8] MOV RAX,qword ptr [0x0022f5b0] SUB RSI,RAX SAR RSI,0x3 CMP RCX,RSI JC 0x001cf09a LAB_001cf0bb: MOV RDI,RBX ADD RSP,0x8 POP RBX POP RBP JMP 0x001cec4a
/* common_log::set_colors(bool) */ void __thiscall common_log::set_colors(common_log *this,bool param_1) { int8 *puVar1; ulong uVar2; int7 in_register_00000031; pause(this); if ((int)CONCAT71(in_register_00000031,param_1) == 0) { if (DAT_0022f5b8 != g_col) { uVar2 = 0; do { g_col[uVar2] = ""; uVar2 = uVar2 + 1; } while (uVar2 < (ulong)((long)DAT_0022f5b8 - (long)g_col >> 3)); } } else { *g_col = &DAT_001f721f; puVar1 = g_col; g_col[1] = &DAT_001f7224; puVar1[2] = &DAT_001f7229; puVar1[3] = &DAT_001f722f; puVar1[4] = &DAT_001f7235; puVar1[5] = &DAT_001f723b; puVar1[6] = &DAT_001f7241; puVar1[7] = &DAT_001f7247; puVar1[8] = &DAT_001f724d; } resume(this); return; }
44,961
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/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)); }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x60(%rbp) callq 0x5d880 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x65bb7 jmp 0x65c27 movq -0x60(%rbp), %rax movq 0x8(%rax), %rdi movq -0x10(%rbp), %rsi callq 0x5e6b0 movq %rax, %rcx movq -0x60(%rbp), %rax movq %rcx, -0x18(%rbp) movq 0x8(%rax), %rdi callq 0x5c2e0 movq %rax, -0x20(%rbp) leaq -0x18(%rbp), %rdi leaq -0x20(%rbp), %rsi callq 0x5f620 testb $0x1, %al jne 0x65bf3 jmp 0x65bf5 jmp 0x65c14 leaq 0x275e8(%rip), %rdi # 0x8d1e4 leaq 0x27300(%rip), %rsi # 0x8cf03 movl $0x56ac, %edx # imm = 0x56AC leaq 0x275f8(%rip), %rcx # 0x8d207 callq 0x5d1f0 leaq -0x18(%rbp), %rdi callq 0x5d9d0 addq $0x20, %rax addq $0x70, %rsp popq %rbp retq movb $0x1, -0x55(%rbp) movl $0x20, %edi callq 0x5c6c0 movq -0x60(%rbp), %rdi movq %rax, -0x68(%rbp) callq 0x5dca0 movq %rax, -0x48(%rbp) leaq 0x27767(%rip), %rsi # 0x8d3b4 leaq -0x40(%rbp), %rdi leaq -0x48(%rbp), %rdx callq 0x5b630 jmp 0x65c5c movq -0x60(%rbp), %rcx movq -0x68(%rbp), %rdi movl $0x131, %esi # imm = 0x131 leaq -0x40(%rbp), %rdx callq 0x61580 jmp 0x65c74 movq -0x68(%rbp), %rdi movb $0x0, -0x55(%rbp) movq 0x4130d(%rip), %rsi # 0xa6f90 movq 0x41346(%rip), %rdx # 0xa6fd0 callq 0x60f20 jmp 0x65cd0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) jmp 0x65cb4 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x40(%rbp), %rdi callq 0x5cfd0 testb $0x1, -0x55(%rbp) jne 0x65cbc jmp 0x65cc5 movq -0x68(%rbp), %rdi callq 0x5d520 jmp 0x65cc7 movq -0x50(%rbp), %rdi callq 0x611b0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov [rbp+var_60], rdi call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9is_objectEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::is_object(void) xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_65BB7 jmp short loc_65C27 loc_65BB7: mov rax, [rbp+var_60] mov rdi, [rax+8] mov rsi, [rbp+var_10] call __ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonIS_St6vectorS5_blmdSaNS7_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS5_SD_EEE4findERSH_; std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::find(std::string const&) mov rcx, rax mov rax, [rbp+var_60] mov [rbp+var_18], rcx mov rdi, [rax+8] call __ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonIS_St6vectorS5_blmdSaNS7_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS5_SD_EEE3endEv; std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::end(void) mov [rbp+var_20], rax lea rdi, [rbp+var_18] lea rsi, [rbp+var_20] call __ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS6_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEESK_; std::operator!=(std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> const&,std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>> const&) test al, 1 jnz short loc_65BF3 jmp short loc_65BF5 loc_65BF3: jmp short loc_65C14 loc_65BF5: lea rdi, aItMDataMValueO; "it != m_data.m_value.object->end()" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov edx, 56ACh lea rcx, aConstReference; "const_reference nlohmann::basic_json<>:"... call ___assert_fail loc_65C14: lea rdi, [rbp+var_18] call __ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS6_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEEEptEv; std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::operator->(void) add rax, 20h ; ' ' add rsp, 70h pop rbp retn loc_65C27: mov [rbp+var_55], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rbp+var_60] mov [rbp+var_68], rax call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov [rbp+var_48], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a string arg"... lea rdi, [rbp+var_40] lea rdx, [rbp+var_48] 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* &&) jmp short $+2 loc_65C5C: mov rcx, [rbp+var_60] mov rdi, [rbp+var_68] mov esi, 131h lea rdx, [rbp+var_40] call __ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_65C74: mov rdi, [rbp+var_68]; void * mov [rbp+var_55], 0 mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE_ptr; lptinfo mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev_ptr; void (*)(void *) call ___cxa_throw
long long nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { void *exception; // [rsp+8h] [rbp-68h] long long v4; // [rsp+28h] [rbp-48h] BYREF _BYTE v5[32]; // [rsp+30h] [rbp-40h] BYREF long long v6; // [rsp+50h] [rbp-20h] BYREF long long v7; // [rsp+58h] [rbp-18h] BYREF long long v8; // [rsp+60h] [rbp-10h] long long v9; // [rsp+68h] [rbp-8h] v9 = a1; v8 = a2; if ( (nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::is_object() & 1) == 0 ) { exception = __cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>( v5, "cannot use operator[] with a string argument with ", &v4); _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305LL, 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); } v7 = std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::find( *(_QWORD *)(a1 + 8), v8); v6 = std::map<std::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end(*(_QWORD *)(a1 + 8)); if ( (std::operator!=(&v7, &v6) & 1) == 0 ) __assert_fail( "it != m_data.m_value.object->end()", "/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp", 22188LL, "const_reference nlohmann::basic_json<>::operator[](const typename object_t::key_type &) const [ObjectType = std::m" "ap, ArrayType = std::vector, StringType = std::basic_string<char>, BooleanType = bool, NumberIntegerType = long, N" "umberUnsignedType = unsigned long, NumberFloatType = double, AllocatorType = std::allocator, JSONSerializer = nloh" "mann::adl_serializer, BinaryType = std::vector<unsigned char>, CustomBaseClass = void]"); return std::_Rb_tree_iterator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::operator->(&v7) + 32; }
operator[]: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x60],RDI CALL 0x0015d880 XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x00165bb7 JMP 0x00165c27 LAB_00165bb7: MOV RAX,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0015e6b0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x18],RCX MOV RDI,qword ptr [RAX + 0x8] CALL 0x0015c2e0 MOV qword ptr [RBP + -0x20],RAX LEA RDI,[RBP + -0x18] LEA RSI,[RBP + -0x20] CALL 0x0015f620 TEST AL,0x1 JNZ 0x00165bf3 JMP 0x00165bf5 LAB_00165bf3: JMP 0x00165c14 LAB_00165bf5: LEA RDI,[0x18d1e4] LEA RSI,[0x18cf03] MOV EDX,0x56ac LEA RCX,[0x18d207] CALL 0x0015d1f0 LAB_00165c14: LEA RDI,[RBP + -0x18] CALL 0x0015d9d0 ADD RAX,0x20 ADD RSP,0x70 POP RBP RET LAB_00165c27: MOV byte ptr [RBP + -0x55],0x1 MOV EDI,0x20 CALL 0x0015c6c0 MOV RDI,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x68],RAX CALL 0x0015dca0 MOV qword ptr [RBP + -0x48],RAX LAB_00165c46: LEA RSI,[0x18d3b4] LEA RDI,[RBP + -0x40] LEA RDX,[RBP + -0x48] CALL 0x0015b630 JMP 0x00165c5c LAB_00165c5c: MOV RCX,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x68] MOV ESI,0x131 LEA RDX,[RBP + -0x40] CALL 0x00161580 JMP 0x00165c74 LAB_00165c74: MOV RDI,qword ptr [RBP + -0x68] MOV byte ptr [RBP + -0x55],0x0 MOV RSI,qword ptr [0x001a6f90] MOV RDX,qword ptr [0x001a6fd0] CALL 0x00160f20
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](std::__cxx11::string const&) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,string *param_1) { byte bVar1; ulong uVar2; long lVar3; int8 uVar4; char *local_50; detail local_48 [32]; int8 local_28; int8 local_20; string *local_18; basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *local_10; local_18 = param_1; local_10 = this; bVar1 = is_object(this); if ((bVar1 & 1) == 0) { uVar4 = __cxa_allocate_exception(0x20); local_50 = (char *)type_name(this); /* try { // try from 00165c46 to 00165c59 has its CatchHandler @ 00165c91 */ detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> (local_48,"cannot use operator[] with a string argument with ",&local_50); /* try { // try from 00165c5c to 00165c8e has its CatchHandler @ 00165c9f */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x131,local_48,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,PTR_typeinfo_001a6f90,PTR__type_error_001a6fd0); } local_20 = std:: map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::find(*(map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),local_18); local_28 = std:: map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::end(*(map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8)); uVar2 = std::operator!=((_Rb_tree_iterator *)&local_20,(_Rb_tree_iterator *)&local_28); if ((uVar2 & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("it != m_data.m_value.object->end()", "/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp" ,0x56ac, "const_reference nlohmann::basic_json<>::operator[](const typename object_t::key_type &) const [ObjectType = std::map, ArrayType = std::vector, StringType = std::basic_string<char>, BooleanType = bool, NumberIntegerType = long, NumberUnsignedType = unsigned long, NumberFloatType = double, AllocatorType = std::allocator, JSONSerializer = nlohmann::adl_serializer, BinaryType = std::vector<unsigned char>, CustomBaseClass = void]" ); } lVar3 = std:: _Rb_tree_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::operator->((_Rb_tree_iterator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)&local_20); return lVar3 + 0x20; }
44,962
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/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)); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::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 0x14ded movq 0x8(%r14), %rdi callq 0x11850 movq 0x8(%r14), %rcx addq $0x8, %rcx cmpq %rcx, %rax je 0x14e4b addq $0x40, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x11460 movq %rax, %rbx movq %r14, %rdi callq 0x11820 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0xdf17(%rip), %rsi # 0x22d28 leaq 0x10(%rsp), %rdi callq 0x11140 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x120c0 xorl %ebp, %ebp movq 0x18164(%rip), %rsi # 0x2cfa0 movq 0x1810d(%rip), %rdx # 0x2cf50 movq %rbx, %rdi callq 0x11fb0 leaq 0xdd06(%rip), %rdi # 0x22b58 leaq 0xda1e(%rip), %rsi # 0x22877 leaq 0xdd1b(%rip), %rcx # 0x22b7b movl $0x56ac, %edx # imm = 0x56AC callq 0x11620 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x14e90 movq 0x20(%rsp), %rsi incq %rsi callq 0x119b0 jmp 0x14e90 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x14e9d movq %rbx, %rdi callq 0x116b0 movq %r14, %rdi callq 0x12010 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixERKS9_: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_14DED mov rdi, [r14+8] call __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESt10_Select1stISH_ESt4lessIvESaISH_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::_Select1st<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::find(std::string const&) mov rcx, [r14+8] add rcx, 8 cmp rax, rcx jz short loc_14E4B add rax, 40h ; '@' add rsp, 30h pop rbx pop r14 pop rbp retn loc_14DED: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "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_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE_ptr; lptinfo mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_14E4B: lea rdi, aItMDataMValueO; "it != m_data.m_value.object->end()" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstReference; "const_reference nlohmann::basic_json<>:"... mov edx, 56ACh call ___assert_fail mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_14E90 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_14E90 mov r14, rax mov bpl, 1 loc_14E90: test bpl, bpl jz short loc_14E9D mov rdi, rbx; void * call ___cxa_free_exception loc_14E9D: mov rdi, r14 call __Unwind_Resume
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x00114ded MOV RDI,qword ptr [R14 + 0x8] CALL 0x00111850 MOV RCX,qword ptr [R14 + 0x8] ADD RCX,0x8 CMP RAX,RCX JZ 0x00114e4b ADD RAX,0x40 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00114ded: MOV EDI,0x20 CALL 0x00111460 MOV RBX,RAX MOV RDI,R14 CALL 0x00111820 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00114e0a: LEA RSI,[0x122d28] LEA RDI,[RSP + 0x10] CALL 0x00111140 MOV BPL,0x1 LAB_00114e1e: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x001120c0 XOR EBP,EBP MOV RSI,qword ptr [0x0012cfa0] MOV RDX,qword ptr [0x0012cf50] MOV RDI,RBX CALL 0x00111fb0 LAB_00114e4b: LEA RDI,[0x122b58] LEA RSI,[0x122877] LEA RCX,[0x122b7b] MOV EDX,0x56ac CALL 0x00111620
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](std::__cxx11::string const&) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,string *param_1) { long lVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this != (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00114e0a to 00114e1a has its CatchHandler @ 00114e8a */ 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 00114e1e to 00114e4a has its CatchHandler @ 00114e6a */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__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,PTR_typeinfo_0012cfa0,PTR__exception_0012cf50); } lVar1 = std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::_Select1st<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::find(*(_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::_Select1st<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); if (lVar1 != *(long *)(this + 8) + 8) { return lVar1 + 0x40; } /* WARNING: Subroutine does not return */ __assert_fail("it != m_data.m_value.object->end()", "/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp" ,0x56ac, "const_reference nlohmann::basic_json<>::operator[](const typename object_t::key_type &) const [ObjectType = std::map, ArrayType = std::vector, StringType = std::basic_string<char>, BooleanType = bool, NumberIntegerType = long, NumberUnsignedType = unsigned long, NumberFloatType = double, AllocatorType = std::allocator, JSONSerializer = nlohmann::adl_serializer, BinaryType = std::vector<unsigned char>, CustomBaseClass = void]" ); }
44,963
nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/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<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::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 0x1fd8f movq 0x8(%r14), %rdi callq 0x1cef0 movq 0x8(%r14), %rcx addq $0x8, %rcx cmpq %rcx, %rax je 0x1fdeb addq $0x40, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x1c790 movq %rax, %rbx movq %r14, %rdi callq 0x1cea0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0xbf67(%rip), %rsi # 0x2bd18 leaq 0x10(%rsp), %rdi callq 0x1c250 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x1dd90 xorl %ebp, %ebp movq 0x191c4(%rip), %rsi # 0x38fa0 movq 0x1916d(%rip), %rdx # 0x38f50 movq %rbx, %rdi callq 0x1dc20 leaq 0xbd56(%rip), %rdi # 0x2bb48 leaq 0xba6e(%rip), %rsi # 0x2b867 leaq 0xbd6b(%rip), %rcx # 0x2bb6b movl $0x56ac, %edx # imm = 0x56AC callq 0x1cb30 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x1c6f0 testb %bpl, %bpl jne 0x1fe21 jmp 0x1fe29 movq %rax, %r14 movq %rbx, %rdi callq 0x1cc30 movq %r14, %rdi callq 0x1dcb0 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__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_1FD8F mov rdi, [r14+8] call __ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESt10_Select1stISH_ESt4lessIvESaISH_EE4findERS7_; std::_Rb_tree<std::string,std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::_Select1st<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::find(std::string const&) mov rcx, [r14+8] add rcx, 8 cmp rax, rcx jz short loc_1FDEB add rax, 40h ; '@' add rsp, 30h pop rbx pop r14 pop rbp retn loc_1FD8F: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call __ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "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_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp mov rsi, cs:_ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE_ptr; lptinfo mov rdx, cs:_ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_1FDEB: lea rdi, aItMDataMValueO; "it != m_data.m_value.object->end()" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstReference; "const_reference nlohmann::basic_json<>:"... mov edx, 56ACh call ___assert_fail mov r14, rax lea rdi, [rsp+48h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_1FE21 jmp short loc_1FE29 mov r14, rax loc_1FE21: mov rdi, rbx; void * call ___cxa_free_exception loc_1FE29: mov rdi, r14 call __Unwind_Resume
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x0011fd8f MOV RDI,qword ptr [R14 + 0x8] CALL 0x0011cef0 MOV RCX,qword ptr [R14 + 0x8] ADD RCX,0x8 CMP RAX,RCX JZ 0x0011fdeb ADD RAX,0x40 ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0011fd8f: PUSH 0x20 POP RDI CALL 0x0011c790 MOV RBX,RAX MOV RDI,R14 CALL 0x0011cea0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0011fdaa: LEA RSI,[0x12bd18] LEA RDI,[RSP + 0x10] CALL 0x0011c250 MOV BPL,0x1 LAB_0011fdbe: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x0011dd90 XOR EBP,EBP MOV RSI,qword ptr [0x00138fa0] MOV RDX,qword ptr [0x00138f50] MOV RDI,RBX CALL 0x0011dc20 LAB_0011fdeb: LEA RDI,[0x12bb48] LEA RSI,[0x12b867] LEA RCX,[0x12bb6b] MOV EDX,0x56ac CALL 0x0011cb30
/* nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](std::__cxx11::string const&) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,string *param_1) { long lVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this != (basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0011fdaa to 0011fdba has its CatchHandler @ 0011fe1e */ 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 0011fdbe to 0011fdea has its CatchHandler @ 0011fe0a */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonISt3mapSt6vectorNSt7__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,PTR_typeinfo_00138fa0,PTR__exception_00138f50); } lVar1 = std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::_Select1st<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::find(*(_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::_Select1st<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); if (lVar1 != *(long *)(this + 8) + 8) { return lVar1 + 0x40; } /* WARNING: Subroutine does not return */ __assert_fail("it != m_data.m_value.object->end()", "/workspace/llm4binary/github/2025_star3/11AgReS1SoR11[P]Graph/Common/FiguresStorage/src/json.hpp" ,0x56ac, "const_reference nlohmann::basic_json<>::operator[](const typename object_t::key_type &) const [ObjectType = std::map, ArrayType = std::vector, StringType = std::basic_string<char>, BooleanType = bool, NumberIntegerType = long, NumberUnsignedType = unsigned long, NumberFloatType = double, AllocatorType = std::allocator, JSONSerializer = nlohmann::adl_serializer, BinaryType = std::vector<unsigned char>, CustomBaseClass = void]" ); }
44,964
nglog::LogMessage::SendToSink()
ng-log[P]ng-log/src/logging.cc
EXCLUSIVE_LOCKS_REQUIRED(log_mutex) { if (data_->sink_ != nullptr) { RAW_DCHECK(data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\n', ""); data_->sink_->send( data_->severity_, data_->fullname_, data_->basename_, data_->line_, time_, data_->message_text_ + data_->num_prefix_chars_, (data_->num_chars_to_log_ - data_->num_prefix_chars_ - 1)); } }
O2
cpp
nglog::LogMessage::SendToSink(): pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax movq 0x76b0(%rax), %rdi testq %rdi, %rdi je 0xb829 movq 0x76c0(%rax), %r9 testq %r9, %r9 je 0xb7a8 cmpb $0xa, 0x3(%r9,%rax) je 0xb7e5 leaq 0x1422b(%rip), %rsi # 0x1f9da leaq 0x1426b(%rip), %rcx # 0x1fa21 leaq 0x14278(%rip), %r8 # 0x1fa35 leaq 0x14787(%rip), %r9 # 0x1ff4b pushq $0x3 popq %rdi movl $0x76b, %edx # imm = 0x76B xorl %eax, %eax callq 0x1c988 movq 0x8(%rbx), %rax movq 0x76b0(%rax), %rdi movq 0x76c0(%rax), %r9 movq 0x76d8(%rax), %rdx movq 0x76d0(%rax), %rcx movl 0x7698(%rax), %esi movl 0x769c(%rax), %r8d addq $0x10, %rbx movq 0x76b8(%rax), %r10 addq %r10, %rax addq $0x4, %rax notq %r10 addq %r9, %r10 movq (%rdi), %r11 movq %rbx, %r9 pushq %r10 pushq %rax callq *0x10(%r11) addq $0x10, %rsp popq %rbx retq nop
_ZN5nglog10LogMessage10SendToSinkEv: push rbx mov rbx, rdi mov rax, [rdi+8] mov rdi, [rax+76B0h] test rdi, rdi jz loc_B829 mov r9, [rax+76C0h] test r9, r9 jz short loc_B7A8 cmp byte ptr [r9+rax+3], 0Ah jz short loc_B7E5 loc_B7A8: lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCheckSFailedS; "Check %s failed: %s" lea r8, aDataNumCharsTo; "data_->num_chars_to_log_ > 0 && data_->"... lea r9, asc_1FF49+2; "" push 3 pop rdi mov edx, 76Bh xor eax, eax call _ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z; nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...) mov rax, [rbx+8] mov rdi, [rax+76B0h] mov r9, [rax+76C0h] loc_B7E5: mov rdx, [rax+76D8h] mov rcx, [rax+76D0h] mov esi, [rax+7698h] mov r8d, [rax+769Ch] add rbx, 10h mov r10, [rax+76B8h] add rax, r10 add rax, 4 not r10 add r10, r9 mov r11, [rdi] mov r9, rbx push r10 push rax call qword ptr [r11+10h] add rsp, 10h loc_B829: pop rbx retn
long long nglog::LogMessage::SendToSink(nglog::LogMessage *this) { long long result; // rax long long v3; // rdi long long v4; // r9 result = *((_QWORD *)this + 1); v3 = *(_QWORD *)(result + 30384); if ( v3 ) { v4 = *(_QWORD *)(result + 30400); if ( !v4 || *(_BYTE *)(v4 + result + 3) != 10 ) { nglog::RawLog( 3LL, "/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc", 1899LL, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == '\\n'", ""); result = *((_QWORD *)this + 1); v3 = *(_QWORD *)(result + 30384); v4 = *(_QWORD *)(result + 30400); } return (*(long long ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, char *, long long, long long))(*(_QWORD *)v3 + 16LL))( v3, *(unsigned int *)(result + 30360), *(_QWORD *)(result + 30424), *(_QWORD *)(result + 30416), *(unsigned int *)(result + 30364), (char *)this + 16, *(_QWORD *)(result + 30392) + result + 4, v4 + ~*(_QWORD *)(result + 30392)); } return result; }
SendToSink: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] TEST RDI,RDI JZ 0x0010b829 MOV R9,qword ptr [RAX + 0x76c0] TEST R9,R9 JZ 0x0010b7a8 CMP byte ptr [R9 + RAX*0x1 + 0x3],0xa JZ 0x0010b7e5 LAB_0010b7a8: LEA RSI,[0x11f9da] LEA RCX,[0x11fa21] LEA R8,[0x11fa35] LEA R9,[0x11ff4b] PUSH 0x3 POP RDI MOV EDX,0x76b XOR EAX,EAX CALL 0x0011c988 MOV RAX,qword ptr [RBX + 0x8] MOV RDI,qword ptr [RAX + 0x76b0] MOV R9,qword ptr [RAX + 0x76c0] LAB_0010b7e5: MOV RDX,qword ptr [RAX + 0x76d8] MOV RCX,qword ptr [RAX + 0x76d0] MOV ESI,dword ptr [RAX + 0x7698] MOV R8D,dword ptr [RAX + 0x769c] ADD RBX,0x10 MOV R10,qword ptr [RAX + 0x76b8] ADD RAX,R10 ADD RAX,0x4 NOT R10 ADD R10,R9 MOV R11,qword ptr [RDI] MOV R9,RBX PUSH R10 PUSH RAX CALL qword ptr [R11 + 0x10] ADD RSP,0x10 LAB_0010b829: POP RBX RET
/* nglog::LogMessage::SendToSink() */ void __thiscall nglog::LogMessage::SendToSink(LogMessage *this) { long lVar1; long *plVar2; long lVar3; lVar1 = *(long *)(this + 8); plVar2 = *(long **)(lVar1 + 0x76b0); if (plVar2 != (long *)0x0) { lVar3 = *(long *)(lVar1 + 0x76c0); if ((lVar3 == 0) || (*(char *)(lVar3 + 3 + lVar1) != '\n')) { RawLog(3,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/logging.cc",0x76b, "Check %s failed: %s", "data_->num_chars_to_log_ > 0 && data_->message_text_[data_->num_chars_to_log_ - 1] == \'\\n\'" ,&DAT_0011ff4b); lVar1 = *(long *)(this + 8); plVar2 = *(long **)(lVar1 + 0x76b0); lVar3 = *(long *)(lVar1 + 0x76c0); } (**(code **)(*plVar2 + 0x10)) (plVar2,*(int4 *)(lVar1 + 0x7698),*(int8 *)(lVar1 + 0x76d8), *(int8 *)(lVar1 + 0x76d0),*(int4 *)(lVar1 + 0x769c),this + 0x10, lVar1 + *(ulong *)(lVar1 + 0x76b8) + 4,~*(ulong *)(lVar1 + 0x76b8) + lVar3); } return; }
44,965
dns_parse_question
xtate/src/proto/proto-dns.c
bool dns_parse_question(uint8_t *buf, size_t len, dns_head_t *head, uint8_t **body_begin) { static uint8_t *end; // exclusive static bool name_parsed; static uint8_t *qname_end; end = buf + len; if (len < DNS_PACKET_MINIMUM_SIZE) { return false; } head->header.id = ntohs((*(uint16_t *)buf)); head->header.qr = (bool)(buf[2] & 0x80); head->header.opcode = (uint8_t)((buf[2] & (0x78)) >> 3); head->header.aa = (bool)(buf[2] & 0x04); head->header.tc = (bool)(buf[2] & 0x02); head->header.rd = (bool)(buf[2] & 0x01); head->header.ra = (bool)(buf[3] & 0x80); head->header.z = (bool)(buf[4] & 0x40); head->header.ad = (bool)(buf[3] & 0x20); head->header.cd = (bool)(buf[3] & 0x10); head->header.rcode = (uint8_t)(buf[3] & 0x0F); head->header.ans_count = ntohs((*(uint16_t *)(buf + 6))); head->header.auth_count = ntohs((*(uint16_t *)(buf + 8))); head->header.add_count = ntohs((*(uint16_t *)(buf + 10))); head->header.q_count = ntohs((*(uint16_t *)(buf + 4))); if (head->header.q_count != 1) { return false; } name_parsed = parse_name(buf, buf + 12, end, head->question.name.name, &head->question.name.length, &qname_end); if (qname_end + 2 > end) { return false; } if (!name_parsed) { return false; } head->question.type = (dns_record_type)ntohs((*(uint16_t *)qname_end)); head->question.class = ntohs((*(uint16_t *)(qname_end + 2))); if (body_begin) { *body_begin = qname_end + 4; } return true; }
O3
c
dns_parse_question: cmpq $0x11, %rsi jae 0x3149f xorl %eax, %eax retq pushq %r15 pushq %r14 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movzwl (%rdi), %eax rolw $0x8, %ax movw %ax, (%rdx) movb 0x2(%rdi), %al shrb $0x7, %al movb %al, 0x6(%rdx) movb 0x2(%rdi), %al shrb $0x3, %al andb $0xf, %al movb %al, 0x5(%rdx) movb 0x2(%rdi), %al shrb $0x2, %al andb $0x1, %al movb %al, 0x4(%rdx) movb 0x2(%rdi), %al shrb %al andb $0x1, %al movb %al, 0x3(%rdx) movb 0x2(%rdi), %al andb $0x1, %al movb %al, 0x2(%rdx) movb 0x3(%rdi), %al shrb $0x7, %al movb %al, 0xb(%rdx) movb 0x4(%rdi), %al shrb $0x6, %al andb $0x1, %al movb %al, 0x9(%rdx) movb 0x3(%rdi), %al shrb $0x5, %al andb $0x1, %al movb %al, 0x8(%rdx) movb 0x3(%rdi), %al shrb $0x4, %al andb $0x1, %al movb %al, 0xa(%rdx) movb 0x3(%rdi), %al andb $0xf, %al movb %al, 0x7(%rdx) movzwl 0x6(%rdi), %eax rolw $0x8, %ax movw %ax, 0xe(%rdx) movzwl 0x8(%rdi), %eax rolw $0x8, %ax movw %ax, 0x10(%rdx) movzwl 0xa(%rdi), %eax rolw $0x8, %ax movw %ax, 0x12(%rdx) movzwl 0x4(%rdi), %eax movl %eax, %ecx rolw $0x8, %cx movw %cx, 0xc(%rdx) cmpl $0x100, %eax # imm = 0x100 jne 0x315be movq %rsi, %r15 addq %rdi, %r15 leaq 0xc(%rdi), %rsi leaq 0x14(%r14), %rcx leaq 0x113(%r14), %r8 leaq 0x17285c(%rip), %r9 # 0x1a3dc8 movq %r15, %rdx callq 0x315c6 xorb $0x1, %al movq 0x17284b(%rip), %rcx # 0x1a3dc8 leaq 0x2(%rcx), %rdx cmpq %r15, %rdx seta %dl orb %al, %dl jne 0x315be movzwl (%rcx), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x114(%r14) movzwl 0x2(%rcx), %eax rolw $0x8, %ax movzwl %ax, %eax movl %eax, 0x118(%r14) movb $0x1, %al testq %rbx, %rbx je 0x315c0 addq $0x4, %rcx movq %rcx, (%rbx) jmp 0x315c0 xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq
dns_parse_question: cmp rsi, 11h jnb short loc_3149F xor eax, eax retn loc_3149F: push r15 push r14 push rbx mov rbx, rcx mov r14, rdx movzx eax, word ptr [rdi] rol ax, 8 mov [rdx], ax mov al, [rdi+2] shr al, 7 mov [rdx+6], al mov al, [rdi+2] shr al, 3 and al, 0Fh mov [rdx+5], al mov al, [rdi+2] shr al, 2 and al, 1 mov [rdx+4], al mov al, [rdi+2] shr al, 1 and al, 1 mov [rdx+3], al mov al, [rdi+2] and al, 1 mov [rdx+2], al mov al, [rdi+3] shr al, 7 mov [rdx+0Bh], al mov al, [rdi+4] shr al, 6 and al, 1 mov [rdx+9], al mov al, [rdi+3] shr al, 5 and al, 1 mov [rdx+8], al mov al, [rdi+3] shr al, 4 and al, 1 mov [rdx+0Ah], al mov al, [rdi+3] and al, 0Fh mov [rdx+7], al movzx eax, word ptr [rdi+6] rol ax, 8 mov [rdx+0Eh], ax movzx eax, word ptr [rdi+8] rol ax, 8 mov [rdx+10h], ax movzx eax, word ptr [rdi+0Ah] rol ax, 8 mov [rdx+12h], ax movzx eax, word ptr [rdi+4] mov ecx, eax rol cx, 8 mov [rdx+0Ch], cx cmp eax, 100h jnz short loc_315BE mov r15, rsi add r15, rdi lea rsi, [rdi+0Ch] lea rcx, [r14+14h] lea r8, [r14+113h] lea r9, dns_parse_question_qname_end mov rdx, r15 call parse_name xor al, 1 mov rcx, cs:dns_parse_question_qname_end lea rdx, [rcx+2] cmp rdx, r15 setnbe dl or dl, al jnz short loc_315BE movzx eax, word ptr [rcx] rol ax, 8 movzx eax, ax mov [r14+114h], eax movzx eax, word ptr [rcx+2] rol ax, 8 movzx eax, ax mov [r14+118h], eax mov al, 1 test rbx, rbx jz short loc_315C0 add rcx, 4 mov [rbx], rcx jmp short loc_315C0 loc_315BE: xor eax, eax loc_315C0: pop rbx pop r14 pop r15 retn
char dns_parse_question(long long a1, unsigned long long a2, long long a3, _QWORD *a4) { char result; // al int v7; // eax unsigned __int8 v8; // al long long v9; // rcx if ( a2 < 0x11 ) return 0; *(_WORD *)a3 = __ROL2__(*(_WORD *)a1, 8); *(_BYTE *)(a3 + 6) = *(_BYTE *)(a1 + 2) >> 7; *(_BYTE *)(a3 + 5) = (*(_BYTE *)(a1 + 2) >> 3) & 0xF; *(_BYTE *)(a3 + 4) = (*(_BYTE *)(a1 + 2) & 4) != 0; *(_BYTE *)(a3 + 3) = (*(_BYTE *)(a1 + 2) & 2) != 0; *(_BYTE *)(a3 + 2) = *(_BYTE *)(a1 + 2) & 1; *(_BYTE *)(a3 + 11) = *(_BYTE *)(a1 + 3) >> 7; *(_BYTE *)(a3 + 9) = (*(_BYTE *)(a1 + 4) & 0x40) != 0; *(_BYTE *)(a3 + 8) = (*(_BYTE *)(a1 + 3) & 0x20) != 0; *(_BYTE *)(a3 + 10) = (*(_BYTE *)(a1 + 3) & 0x10) != 0; *(_BYTE *)(a3 + 7) = *(_BYTE *)(a1 + 3) & 0xF; *(_WORD *)(a3 + 14) = __ROL2__(*(_WORD *)(a1 + 6), 8); *(_WORD *)(a3 + 16) = __ROL2__(*(_WORD *)(a1 + 8), 8); *(_WORD *)(a3 + 18) = __ROL2__(*(_WORD *)(a1 + 10), 8); v7 = *(unsigned __int16 *)(a1 + 4); *(_WORD *)(a3 + 12) = __ROL2__(*(_WORD *)(a1 + 4), 8); if ( v7 != 256 ) return 0; v8 = parse_name(a1, a1 + 12, a1 + a2, a3 + 20, a3 + 275, &dns_parse_question_qname_end); v9 = dns_parse_question_qname_end; if ( v8 ^ 1 | (dns_parse_question_qname_end + 2 > a1 + a2) ) return 0; *(_DWORD *)(a3 + 276) = (unsigned __int16)__ROL2__(*(_WORD *)dns_parse_question_qname_end, 8); *(_DWORD *)(a3 + 280) = (unsigned __int16)__ROL2__(*(_WORD *)(v9 + 2), 8); result = 1; if ( a4 ) *a4 = v9 + 4; return result; }
dns_parse_question: CMP RSI,0x11 JNC 0x0013149f XOR EAX,EAX RET LAB_0013149f: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RCX MOV R14,RDX MOVZX EAX,word ptr [RDI] ROL AX,0x8 MOV word ptr [RDX],AX MOV AL,byte ptr [RDI + 0x2] SHR AL,0x7 MOV byte ptr [RDX + 0x6],AL MOV AL,byte ptr [RDI + 0x2] SHR AL,0x3 AND AL,0xf MOV byte ptr [RDX + 0x5],AL MOV AL,byte ptr [RDI + 0x2] SHR AL,0x2 AND AL,0x1 MOV byte ptr [RDX + 0x4],AL MOV AL,byte ptr [RDI + 0x2] SHR AL,0x1 AND AL,0x1 MOV byte ptr [RDX + 0x3],AL MOV AL,byte ptr [RDI + 0x2] AND AL,0x1 MOV byte ptr [RDX + 0x2],AL MOV AL,byte ptr [RDI + 0x3] SHR AL,0x7 MOV byte ptr [RDX + 0xb],AL MOV AL,byte ptr [RDI + 0x4] SHR AL,0x6 AND AL,0x1 MOV byte ptr [RDX + 0x9],AL MOV AL,byte ptr [RDI + 0x3] SHR AL,0x5 AND AL,0x1 MOV byte ptr [RDX + 0x8],AL MOV AL,byte ptr [RDI + 0x3] SHR AL,0x4 AND AL,0x1 MOV byte ptr [RDX + 0xa],AL MOV AL,byte ptr [RDI + 0x3] AND AL,0xf MOV byte ptr [RDX + 0x7],AL MOVZX EAX,word ptr [RDI + 0x6] ROL AX,0x8 MOV word ptr [RDX + 0xe],AX MOVZX EAX,word ptr [RDI + 0x8] ROL AX,0x8 MOV word ptr [RDX + 0x10],AX MOVZX EAX,word ptr [RDI + 0xa] ROL AX,0x8 MOV word ptr [RDX + 0x12],AX MOVZX EAX,word ptr [RDI + 0x4] MOV ECX,EAX ROL CX,0x8 MOV word ptr [RDX + 0xc],CX CMP EAX,0x100 JNZ 0x001315be MOV R15,RSI ADD R15,RDI LEA RSI,[RDI + 0xc] LEA RCX,[R14 + 0x14] LEA R8,[R14 + 0x113] LEA R9,[0x2a3dc8] MOV RDX,R15 CALL 0x001315c6 XOR AL,0x1 MOV RCX,qword ptr [0x002a3dc8] LEA RDX,[RCX + 0x2] CMP RDX,R15 SETA DL OR DL,AL JNZ 0x001315be MOVZX EAX,word ptr [RCX] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [R14 + 0x114],EAX MOVZX EAX,word ptr [RCX + 0x2] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [R14 + 0x118],EAX MOV AL,0x1 TEST RBX,RBX JZ 0x001315c0 ADD RCX,0x4 MOV qword ptr [RBX],RCX JMP 0x001315c0 LAB_001315be: XOR EAX,EAX LAB_001315c0: POP RBX POP R14 POP R15 RET
int8 dns_parse_question(ushort *param_1,ulong param_2,ushort *param_3,int8 *param_4) { ushort uVar1; ushort *puVar2; char cVar3; int8 uVar4; if (param_2 < 0x11) { return 0; } *param_3 = *param_1 << 8 | *param_1 >> 8; *(byte *)(param_3 + 3) = (byte)param_1[1] >> 7; *(byte *)((long)param_3 + 5) = (byte)param_1[1] >> 3 & 0xf; *(byte *)(param_3 + 2) = (byte)param_1[1] >> 2 & 1; *(byte *)((long)param_3 + 3) = (byte)param_1[1] >> 1 & 1; *(byte *)(param_3 + 1) = (byte)param_1[1] & 1; *(byte *)((long)param_3 + 0xb) = *(byte *)((long)param_1 + 3) >> 7; *(byte *)((long)param_3 + 9) = (byte)param_1[2] >> 6 & 1; *(byte *)(param_3 + 4) = *(byte *)((long)param_1 + 3) >> 5 & 1; *(byte *)(param_3 + 5) = *(byte *)((long)param_1 + 3) >> 4 & 1; *(byte *)((long)param_3 + 7) = *(byte *)((long)param_1 + 3) & 0xf; param_3[7] = param_1[3] << 8 | param_1[3] >> 8; param_3[8] = param_1[4] << 8 | param_1[4] >> 8; param_3[9] = param_1[5] << 8 | param_1[5] >> 8; uVar1 = param_1[2]; param_3[6] = uVar1 << 8 | uVar1 >> 8; if ((uVar1 == 0x100) && (cVar3 = parse_name(param_1,param_1 + 6,(ushort *)(param_2 + (long)param_1),param_3 + 10, (long)param_3 + 0x113,&dns_parse_question_qname_end), puVar2 = dns_parse_question_qname_end, dns_parse_question_qname_end + 1 <= (ushort *)(param_2 + (long)param_1) && cVar3 == '\x01')) { *(uint *)(param_3 + 0x8a) = (uint)(ushort)(*dns_parse_question_qname_end << 8 | *dns_parse_question_qname_end >> 8); uVar1 = puVar2[1]; *(uint *)(param_3 + 0x8c) = (uint)(ushort)(uVar1 << 8 | uVar1 >> 8); uVar4 = CONCAT71((uint7)(byte)uVar1,1); if (param_4 == (int8 *)0x0) { return uVar4; } *param_4 = puVar2 + 2; return uVar4; } return 0; }
44,966
translog_prev_buffer_flush_wait
eloqsql/storage/maria/ma_loghandler.c
my_bool translog_prev_buffer_flush_wait(struct st_translog_buffer *buffer) { TRANSLOG_ADDRESS offset= buffer->offset; TRANSLOG_FILE *file= buffer->file; uint8 ver= buffer->ver; DBUG_ENTER("translog_prev_buffer_flush_wait"); DBUG_PRINT("enter", ("buffer: %p #%u offset: " LSN_FMT " " "prev sent: " LSN_FMT " prev offset: " LSN_FMT, buffer, (uint) buffer->buffer_no, LSN_IN_PARTS(buffer->offset), LSN_IN_PARTS(buffer->prev_sent_to_disk), LSN_IN_PARTS(buffer->prev_buffer_offset))); translog_buffer_lock_assert_owner(buffer); if (buffer->prev_buffer_offset != buffer->prev_sent_to_disk) { do { mysql_cond_wait(&buffer->prev_sent_to_disk_cond, &buffer->mutex); if (buffer->file != file || buffer->offset != offset || buffer->ver != ver) DBUG_RETURN(1); /* some the thread flushed the buffer already */ } while(buffer->prev_buffer_offset != buffer->prev_sent_to_disk); } DBUG_RETURN(0); }
O3
c
translog_prev_buffer_flush_wait: movq 0x100020(%rdi), %rax cmpq 0x1000e0(%rdi), %rax jne 0x64575 xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x100010(%rdi), %rax movq %rax, -0x30(%rbp) movq 0x100038(%rdi), %r12 movb 0x1000d9(%rdi), %r13b leaq 0x1000e8(%rdi), %r14 leaq 0x100090(%rdi), %r15 cmpq $0x0, 0x100118(%rbx) jne 0x645f5 movq %r14, %rdi movq %r15, %rsi callq 0x293d0 movb $0x1, %al cmpq %r12, 0x100038(%rbx) jne 0x64610 movq -0x30(%rbp), %rcx cmpq %rcx, 0x100010(%rbx) jne 0x64610 cmpb %r13b, 0x1000d9(%rbx) jne 0x64610 movq 0x100020(%rbx), %rax cmpq 0x1000e0(%rbx), %rax jne 0x645ad jmp 0x6460e movq %r14, %rdi movq %r15, %rsi leaq 0x7668a(%rip), %rdx # 0xdac8c movl $0xa24, %ecx # imm = 0xA24 callq 0x2f180 jmp 0x645c2 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
translog_prev_buffer_flush_wait: mov rax, ds:qword_100020[rdi] cmp rax, ds:qword_1000E0[rdi] jnz short loc_64575 xor eax, eax retn loc_64575: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rax, ds:qword_100010[rdi] mov [rbp-30h], rax mov r12, ds:qword_100038[rdi] mov r13b, ds:byte_1000D9[rdi] lea r14, unk_1000E8[rdi] lea r15, unk_100090[rdi] loc_645AD: cmp ds:qword_100118[rbx], 0 jnz short loc_645F5 mov rdi, r14 mov rsi, r15 call _pthread_cond_wait loc_645C2: mov al, 1 cmp ds:qword_100038[rbx], r12 jnz short loc_64610 mov rcx, [rbp-30h] cmp ds:qword_100010[rbx], rcx jnz short loc_64610 cmp ds:byte_1000D9[rbx], r13b jnz short loc_64610 mov rax, ds:qword_100020[rbx] cmp rax, ds:qword_1000E0[rbx] jnz short loc_645AD jmp short loc_6460E loc_645F5: mov rdi, r14 mov rsi, r15 lea rdx, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0A24h call psi_cond_wait jmp short loc_645C2 loc_6460E: xor eax, eax loc_64610: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char translog_prev_buffer_flush_wait(long long a1) { char result; // al long long v2; // r12 char v3; // r13 char *v4; // r14 char *v5; // r15 long long v6; // [rsp-38h] [rbp-38h] if ( *(long long *)((char *)&qword_100020 + a1) == *(long long *)((char *)&qword_1000E0 + a1) ) return 0; v6 = *(long long *)((char *)&qword_100010 + a1); v2 = *(long long *)((char *)&qword_100038 + a1); v3 = byte_1000D9[a1]; v4 = (char *)&unk_1000E8 + a1; v5 = (char *)&unk_100090 + a1; while ( 1 ) { if ( *(long long *)((char *)&qword_100118 + a1) ) psi_cond_wait( (long long)v4, (long long)v5, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0xA24u); else pthread_cond_wait(v4, v5); result = 1; if ( *(long long *)((char *)&qword_100038 + a1) != v2 || *(long long *)((char *)&qword_100010 + a1) != v6 || byte_1000D9[a1] != v3 ) { break; } if ( *(long long *)((char *)&qword_100020 + a1) == *(long long *)((char *)&qword_1000E0 + a1) ) return 0; } return result; }
translog_prev_buffer_flush_wait: MOV RAX,qword ptr [RDI + 0x100020] CMP RAX,qword ptr [RDI + 0x1000e0] JNZ 0x00164575 XOR EAX,EAX RET LAB_00164575: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x100010] MOV qword ptr [RBP + -0x30],RAX MOV R12,qword ptr [RDI + 0x100038] MOV R13B,byte ptr [RDI + 0x1000d9] LEA R14,[RDI + 0x1000e8] LEA R15,[RDI + 0x100090] LAB_001645ad: CMP qword ptr [RBX + 0x100118],0x0 JNZ 0x001645f5 MOV RDI,R14 MOV RSI,R15 CALL 0x001293d0 LAB_001645c2: MOV AL,0x1 CMP qword ptr [RBX + 0x100038],R12 JNZ 0x00164610 MOV RCX,qword ptr [RBP + -0x30] CMP qword ptr [RBX + 0x100010],RCX JNZ 0x00164610 CMP byte ptr [RBX + 0x1000d9],R13B JNZ 0x00164610 MOV RAX,qword ptr [RBX + 0x100020] CMP RAX,qword ptr [RBX + 0x1000e0] JNZ 0x001645ad JMP 0x0016460e LAB_001645f5: MOV RDI,R14 MOV RSI,R15 LEA RDX,[0x1dac8c] MOV ECX,0xa24 CALL 0x0012f180 JMP 0x001645c2 LAB_0016460e: XOR EAX,EAX LAB_00164610: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 translog_prev_buffer_flush_wait(long param_1) { pthread_cond_t *__cond; pthread_mutex_t *__mutex; char cVar1; long lVar2; long lVar3; if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x17) == *(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_align + param_1)) { return 0; } lVar2 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7); lVar3 = *(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f); cVar1 = *(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1); __cond = (pthread_cond_t *)((long)&Elf64_Phdr_ARRAY_00100040[3].p_type + param_1); __mutex = (pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + param_1); while( true ) { if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[3].p_align + param_1) == 0) { pthread_cond_wait(__cond,__mutex); } else { psi_cond_wait(__cond,__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c",0xa24); } if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != lVar3) { return 1; } if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 7) != lVar2) { return 1; } if (*(char *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_memsz + param_1 + 1) != cVar1) break; if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x17) == *(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_align + param_1)) { return 0; } } return 1; }
44,967
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling)
llama.cpp/common/minja/minja.hpp
std::string consumeToken(const std::regex & regex, SpaceHandling space_handling = SpaceHandling::Strip) { auto start = it; consumeSpaces(space_handling); std::smatch match; if (std::regex_search(it, end, match, regex) && match.position() == 0) { it += match[0].length(); return match[0].str(); } it = start; return ""; }
O3
cpp
minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char>> const&, minja::SpaceHandling): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq 0x20(%rsi), %r12 movq %rsi, %rdi movl %ecx, %esi callq 0xdfcb4 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) movq 0x18(%r14), %rsi movq 0x20(%r14), %rdi movl $0x0, (%rsp) movq %r15, %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x70b02 testb %al, %al je 0xdee44 movq 0x28(%rsp), %rsi movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, %rdx subq %rax, %rdx je 0xdee2b movq (%rax), %r8 cmpq $0x48, %rdx jne 0xdee3c cmpq %rsi, %r8 jne 0xdee44 jmp 0xdee32 cmpq %rsi, -0x48(%rax,%rdx) jne 0xdee44 leaq (%rax,%rdx), %rdi addq $-0x48, %rdi jmp 0xdee87 movq %rax, %rdi cmpq %rsi, %r8 je 0xdee87 movq %r12, 0x20(%r14) leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x4070b(%rip), %rdx # 0x11f561 movq %rbx, %rdi movq %rdx, %rsi callq 0x288ec movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xdee78 movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x20180 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x8(%rdi), %r8 subq %rsi, %r8 xorl %esi, %esi cmpb $0x0, 0x10(%rdi) cmovneq %r8, %rsi addq %rsi, 0x20(%r14) cmpq $0x48, %rdx leaq -0x48(%rax,%rdx), %rdx movq %rax, %rsi cmoveq %rdx, %rsi cmpq %rcx, %rax cmoveq %rdx, %rsi movq %rbx, %rdi callq 0x663da jmp 0xdee61 jmp 0xdeebf movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xdeed9 movq 0x20(%rsp), %rsi subq %rdi, %rsi callq 0x20180 movq %rbx, %rdi callq 0x20af0 nop
_ZN5minja6Parser12consumeTokenERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE: push r15 push r14 push r12 push rbx sub rsp, 38h mov r15, rdx mov r14, rsi mov rbx, rdi mov r12, [rsi+20h] mov rdi, rsi mov esi, ecx call _ZN5minja6Parser13consumeSpacesENS_13SpaceHandlingE; minja::Parser::consumeSpaces(minja::SpaceHandling) xorps xmm0, xmm0 lea rdx, [rsp+58h+var_48] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 mov rsi, [r14+18h] mov rdi, [r14+20h] mov [rsp+58h+var_58], 0 mov rcx, r15 xor r8d, r8d xor r9d, r9d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEEEEbT_SH_RNS5_13match_resultsISH_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeENS_20_RegexExecutorPolicyEb; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type,std::__detail::_RegexExecutorPolicy,bool) test al, al jz short loc_DEE44 mov rsi, [rsp+58h+var_30] mov rax, [rsp+58h+var_48] mov rcx, [rsp+58h+var_40] mov rdx, rcx sub rdx, rax jz short loc_DEE2B mov r8, [rax] cmp rdx, 48h ; 'H' jnz short loc_DEE3C cmp r8, rsi jnz short loc_DEE44 jmp short loc_DEE32 loc_DEE2B: cmp [rax+rdx-48h], rsi jnz short loc_DEE44 loc_DEE32: lea rdi, [rax+rdx] add rdi, 0FFFFFFFFFFFFFFB8h jmp short loc_DEE87 loc_DEE3C: mov rdi, rax cmp r8, rsi jz short loc_DEE87 loc_DEE44: mov [r14+20h], r12 lea rax, [rbx+10h] mov [rbx], rax lea rdx, aExampleToolCal+1Dh; "" mov rdi, rbx mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_DEE61: mov rdi, [rsp+58h+var_48]; void * test rdi, rdi jz short loc_DEE78 mov rsi, [rsp+58h+var_38] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DEE78: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_DEE87: mov r8, [rdi+8] sub r8, rsi xor esi, esi cmp byte ptr [rdi+10h], 0 cmovnz rsi, r8 add [r14+20h], rsi cmp rdx, 48h ; 'H' lea rdx, [rax+rdx-48h] mov rsi, rax cmovz rsi, rdx cmp rax, rcx cmovz rsi, rdx mov rdi, rbx call _ZNKSt7__cxx119sub_matchIN9__gnu_cxx17__normal_iteratorIPKcNS_12basic_stringIcSt11char_traitsIcESaIcEEEEEE3strEv; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str(void) jmp short loc_DEE61 jmp short $+2 loc_DEEBF: mov rbx, rax mov rdi, [rsp+arg_8]; void * test rdi, rdi jz short loc_DEED9 mov rsi, [rsp+arg_18] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DEED9: mov rdi, rbx call __Unwind_Resume
_QWORD * minja::Parser::consumeToken(_QWORD *a1, long long a2, long long a3, unsigned int a4) { long long v7; // r12 __int128 v8; // kr00_16 long long v9; // rdx long long v10; // r8 long long v11; // rdi long long v13; // rsi bool v14; // zf long long v15; // rdx long long *v16; // rsi __int128 v17; // [rsp+10h] [rbp-48h] BYREF __int128 v18; // [rsp+20h] [rbp-38h] v7 = *(_QWORD *)(a2 + 32); minja::Parser::consumeSpaces(a2, a4); v18 = 0LL; v17 = 0LL; if ( !std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>>( *(long long **)(a2 + 32), *(_QWORD *)(a2 + 24), (char **)&v17, a3, 0, 0, 0) ) goto LABEL_9; v8 = v17; v9 = *((_QWORD *)&v17 + 1) - v17; if ( *((_QWORD *)&v17 + 1) != (_QWORD)v17 ) { v10 = *(_QWORD *)v17; if ( v9 == 72 ) { if ( v10 == *((_QWORD *)&v18 + 1) ) goto LABEL_7; } else { v11 = v17; if ( v10 == *((_QWORD *)&v18 + 1) ) goto LABEL_13; } LABEL_9: *(_QWORD *)(a2 + 32) = v7; *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "", (long long)""); goto LABEL_10; } if ( *(_QWORD *)(*((_QWORD *)&v17 + 1) - 72LL) != *((_QWORD *)&v18 + 1) ) goto LABEL_9; LABEL_7: v11 = *((_QWORD *)&v17 + 1) - 72LL; LABEL_13: v13 = 0LL; if ( *(_BYTE *)(v11 + 16) ) v13 = *(_QWORD *)(v11 + 8) - *((_QWORD *)&v18 + 1); *(_QWORD *)(a2 + 32) += v13; v14 = v9 == 72; v15 = v8 + v9 - 72; v16 = (long long *)v8; if ( v14 ) v16 = (long long *)v15; if ( (_QWORD)v8 == *((_QWORD *)&v8 + 1) ) v16 = (long long *)v15; std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>::str((long long)a1, v16); LABEL_10: if ( (_QWORD)v17 ) operator delete((void *)v17, v18 - v17); return a1; }
consumeToken: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV R12,qword ptr [RSI + 0x20] MOV RDI,RSI MOV ESI,ECX CALL 0x001dfcb4 XORPS XMM0,XMM0 LEA RDX,[RSP + 0x10] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 MOV RSI,qword ptr [R14 + 0x18] MOV RDI,qword ptr [R14 + 0x20] LAB_001dedeb: MOV dword ptr [RSP],0x0 MOV RCX,R15 XOR R8D,R8D XOR R9D,R9D CALL 0x00170b02 TEST AL,AL JZ 0x001dee44 MOV RSI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV RDX,RCX SUB RDX,RAX JZ 0x001dee2b MOV R8,qword ptr [RAX] CMP RDX,0x48 JNZ 0x001dee3c CMP R8,RSI JNZ 0x001dee44 JMP 0x001dee32 LAB_001dee2b: CMP qword ptr [RAX + RDX*0x1 + -0x48],RSI JNZ 0x001dee44 LAB_001dee32: LEA RDI,[RAX + RDX*0x1] ADD RDI,-0x48 JMP 0x001dee87 LAB_001dee3c: MOV RDI,RAX CMP R8,RSI JZ 0x001dee87 LAB_001dee44: MOV qword ptr [R14 + 0x20],R12 LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LAB_001dee4f: LEA RDX,[0x21f561] MOV RDI,RBX MOV RSI,RDX CALL 0x001288ec LAB_001dee61: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001dee78 MOV RSI,qword ptr [RSP + 0x20] SUB RSI,RDI CALL 0x00120180 LAB_001dee78: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET LAB_001dee87: MOV R8,qword ptr [RDI + 0x8] SUB R8,RSI XOR ESI,ESI CMP byte ptr [RDI + 0x10],0x0 CMOVNZ RSI,R8 ADD qword ptr [R14 + 0x20],RSI CMP RDX,0x48 LEA RDX,[RAX + RDX*0x1 + -0x48] MOV RSI,RAX CMOVZ RSI,RDX CMP RAX,RCX CMOVZ RSI,RDX LAB_001deeb3: MOV RDI,RBX CALL 0x001663da LAB_001deebb: JMP 0x001dee61
/* minja::Parser::consumeToken(std::__cxx11::basic_regex<char, std::__cxx11::regex_traits<char> > const&, minja::SpaceHandling) */ long * minja::Parser::consumeToken (long *param_1,Parser *param_2,int8 param_3,int4 param_4) { int8 uVar1; long lVar2; bool bVar3; long lVar4; long *plVar5; long *local_48; long lStack_40; long local_38; long lStack_30; uVar1 = *(int8 *)(param_2 + 0x20); consumeSpaces(param_2,param_4); local_38 = 0; lStack_30 = 0; local_48 = (long *)0x0; lStack_40 = 0; /* try { // try from 001dedeb to 001dedff has its CatchHandler @ 001deebf */ bVar3 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>> (*(int8 *)(param_2 + 0x20),*(int8 *)(param_2 + 0x18),&local_48, param_3,0,0,0); if (bVar3) { lVar4 = lStack_40 - (long)local_48; if (lVar4 == 0) { lVar2 = local_48[-9]; joined_r0x001dee30: if (lVar2 != lStack_30) goto LAB_001dee44; plVar5 = (long *)((long)local_48 + lVar4 + -0x48); } else { lVar2 = *local_48; if (lVar4 == 0x48) goto joined_r0x001dee30; plVar5 = local_48; if (lVar2 != lStack_30) goto LAB_001dee44; } lVar4 = 0; if ((char)plVar5[2] != '\0') { lVar4 = plVar5[1] - lStack_30; } *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x20) + lVar4; /* try { // try from 001deeb3 to 001deeba has its CatchHandler @ 001deebf */ std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>::str(); } else { LAB_001dee44: *(int8 *)(param_2 + 0x20) = uVar1; *param_1 = (long)(param_1 + 2); /* try { // try from 001dee4f to 001dee60 has its CatchHandler @ 001deebd */ std::__cxx11::string::_M_construct<char_const*>(param_1,""); } if (local_48 != (long *)0x0) { operator_delete(local_48,local_38 - (long)local_48); } return param_1; }
44,968
my_strntoull_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulonglong my_strntoull_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative= 0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr + l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0]= (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]= EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]= EDOM; return 0L; } if (overflow) { err[0]= ERANGE; return (~(ulonglong) 0); } return (negative ? -((longlong) res) : (longlong) res); }
O0
c
my_strntoull_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movl $0x0, -0x3c(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0xb8fa1 movq -0x50(%rbp), %rax addq $-0x9, %rax movq %rax, -0x90(%rbp) subq $0x24, %rax ja 0xb8f9d movq -0x90(%rbp), %rax leaq 0x15a051(%rip), %rcx # 0x212fcc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0xb8f9f jmp 0xb8f9f cmpl $0x0, -0x3c(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x3c(%rbp) jmp 0xb8f9f jmp 0xb8f9f jmp 0xb8ff8 jmp 0xb8fd9 cmpq $0x0, -0x30(%rbp) je 0xb8fb3 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %edx movl $0x21, %ecx movl $0x54, %eax cmpl $0x0, %edx cmovel %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq $0x0, -0x8(%rbp) jmp 0xb91dc movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) movb $0x1, %al testb $0x1, %al jne 0xb8f3a jmp 0xb8ff6 jmp 0xb8ff8 movl $0x0, -0x40(%rbp) movq $0x0, -0x70(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x88(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x60(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x64(%rbp) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0xb9125 movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) cmpq $0x30, -0x50(%rbp) jb 0xb908a cmpq $0x39, -0x50(%rbp) ja 0xb908a movq -0x50(%rbp), %rax subq $0x30, %rax movq %rax, -0x50(%rbp) jmp 0xb90d3 cmpq $0x41, -0x50(%rbp) jb 0xb90aa cmpq $0x5a, -0x50(%rbp) ja 0xb90aa movq -0x50(%rbp), %rax subq $0x41, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0xb90d1 cmpq $0x61, -0x50(%rbp) jb 0xb90ca cmpq $0x7a, -0x50(%rbp) ja 0xb90ca movq -0x50(%rbp), %rax subq $0x61, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0xb90cf jmp 0xb9164 jmp 0xb90d1 jmp 0xb90d3 movq -0x50(%rbp), %rax cmpl -0x24(%rbp), %eax jl 0xb90e1 jmp 0xb9164 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax ja 0xb9101 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0xb910a movq -0x50(%rbp), %rax movl -0x64(%rbp), %ecx cmpq %rcx, %rax jbe 0xb910a movl $0x1, -0x40(%rbp) jmp 0xb9123 movslq -0x24(%rbp), %rax imulq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x50(%rbp), %rax addq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0xb9156 cmpl $0x0, -0x44(%rbp) jne 0xb9154 cmpq $0x0, -0x30(%rbp) je 0xb913d movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movl $0x54, (%rax) movq $0x0, -0x8(%rbp) jmp 0xb91dc jmp 0xb9164 jmp 0xb9158 movb $0x1, %al testb $0x1, %al jne 0xb903b jmp 0xb9164 cmpq $0x0, -0x30(%rbp) je 0xb9176 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0xb9197 movq -0x38(%rbp), %rax movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0xb91dc cmpl $0x0, -0x40(%rbp) je 0xb91b1 movq -0x38(%rbp), %rax movl $0x22, (%rax) movq $-0x1, -0x8(%rbp) jmp 0xb91dc cmpl $0x0, -0x3c(%rbp) je 0xb91c6 xorl %eax, %eax subq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0xb91d1 movq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopl (%rax)
my_strntoull_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov [rbp+var_3C], 0 mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov [rbp+var_78], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_80], rax mov rax, [rbp+var_38] mov dword ptr [rax], 0 loc_B8F3A: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle short loc_B8FA1 mov rax, [rbp+var_50] add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases mov [rbp+var_90], rax sub rax, 24h ja short def_B8F82; jumptable 00000000000B8F82 default case, cases 10-31,33-42,44 mov rax, [rbp+var_90] lea rcx, jpt_B8F82 movsxd rax, ds:(jpt_B8F82 - 212FCCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B8F84: jmp short loc_B8F9F; jumptable 00000000000B8F82 case 32 loc_B8F86: jmp short loc_B8F9F; jumptable 00000000000B8F82 case 9 loc_B8F88: cmp [rbp+var_3C], 0; jumptable 00000000000B8F82 case 45 setnz al xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_3C], eax jmp short loc_B8F9F loc_B8F9B: jmp short loc_B8F9F; jumptable 00000000000B8F82 case 43 def_B8F82: jmp short loc_B8FF8; jumptable 00000000000B8F82 default case, cases 10-31,33-42,44 loc_B8F9F: jmp short loc_B8FD9 loc_B8FA1: cmp [rbp+var_30], 0 jz short loc_B8FB3 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_B8FB3: mov edx, [rbp+var_44] mov ecx, 21h ; '!' mov eax, 54h ; 'T' cmp edx, 0 cmovz ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov [rbp+var_8], 0 jmp loc_B91DC loc_B8FD9: mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax mov al, 1 test al, 1 jnz loc_B8F3A jmp short $+2 loc_B8FF6: jmp short $+2 loc_B8FF8: mov [rbp+var_40], 0 mov [rbp+var_70], 0 mov rax, [rbp+var_78] mov [rbp+var_88], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_60], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_64], eax loc_B903B: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle loc_B9125 mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax cmp [rbp+var_50], 30h ; '0' jb short loc_B908A cmp [rbp+var_50], 39h ; '9' ja short loc_B908A mov rax, [rbp+var_50] sub rax, 30h ; '0' mov [rbp+var_50], rax jmp short loc_B90D3 loc_B908A: cmp [rbp+var_50], 41h ; 'A' jb short loc_B90AA cmp [rbp+var_50], 5Ah ; 'Z' ja short loc_B90AA mov rax, [rbp+var_50] sub rax, 41h ; 'A' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_B90D1 loc_B90AA: cmp [rbp+var_50], 61h ; 'a' jb short loc_B90CA cmp [rbp+var_50], 7Ah ; 'z' ja short loc_B90CA mov rax, [rbp+var_50] sub rax, 61h ; 'a' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_B90CF loc_B90CA: jmp loc_B9164 loc_B90CF: jmp short $+2 loc_B90D1: jmp short $+2 loc_B90D3: mov rax, [rbp+var_50] cmp eax, [rbp+var_24] jl short loc_B90E1 jmp loc_B9164 loc_B90E1: mov rax, [rbp+var_70] cmp rax, [rbp+var_60] ja short loc_B9101 mov rax, [rbp+var_70] cmp rax, [rbp+var_60] jnz short loc_B910A mov rax, [rbp+var_50] mov ecx, [rbp+var_64] cmp rax, rcx jbe short loc_B910A loc_B9101: mov [rbp+var_40], 1 jmp short loc_B9123 loc_B910A: movsxd rax, [rbp+var_24] imul rax, [rbp+var_70] mov [rbp+var_70], rax mov rax, [rbp+var_50] add rax, [rbp+var_70] mov [rbp+var_70], rax loc_B9123: jmp short loc_B9156 loc_B9125: cmp [rbp+var_44], 0 jnz short loc_B9154 cmp [rbp+var_30], 0 jz short loc_B913D mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_B913D: mov rax, [rbp+var_38] mov dword ptr [rax], 54h ; 'T' mov [rbp+var_8], 0 jmp loc_B91DC loc_B9154: jmp short loc_B9164 loc_B9156: jmp short $+2 loc_B9158: mov al, 1 test al, 1 jnz loc_B903B jmp short $+2 loc_B9164: cmp [rbp+var_30], 0 jz short loc_B9176 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_B9176: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_B9197 mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp short loc_B91DC loc_B9197: cmp [rbp+var_40], 0 jz short loc_B91B1 mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh jmp short loc_B91DC loc_B91B1: cmp [rbp+var_3C], 0 jz short loc_B91C6 xor eax, eax sub rax, [rbp+var_70] mov [rbp+var_98], rax jmp short loc_B91D1 loc_B91C6: mov rax, [rbp+var_70] mov [rbp+var_98], rax loc_B91D1: mov rax, [rbp+var_98] mov [rbp+var_8], rax loc_B91DC: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long my_strntoull_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { int v6; // ecx long long v9; // [rsp+18h] [rbp-88h] long long v10; // [rsp+20h] [rbp-80h] long long v11; // [rsp+28h] [rbp-78h] unsigned long long v12; // [rsp+30h] [rbp-70h] unsigned int v13; // [rsp+3Ch] [rbp-64h] unsigned long long v14; // [rsp+40h] [rbp-60h] long long ( *v15)(long long, unsigned long long *, long long, long long); // [rsp+48h] [rbp-58h] unsigned long long v16; // [rsp+50h] [rbp-50h] BYREF int v17; // [rsp+5Ch] [rbp-44h] int v18; // [rsp+60h] [rbp-40h] BOOL v19; // [rsp+64h] [rbp-3Ch] int *v20; // [rsp+68h] [rbp-38h] _QWORD *v21; // [rsp+70h] [rbp-30h] int v22; // [rsp+7Ch] [rbp-24h] long long v23; // [rsp+80h] [rbp-20h] long long v24; // [rsp+88h] [rbp-18h] long long v25; // [rsp+90h] [rbp-10h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = a5; v20 = a6; v19 = 0; v15 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v11 = a2; v10 = a3 + a2; *a6 = 0; while ( 2 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) { if ( v21 ) *v21 = v11; v6 = 33; if ( !v17 ) v6 = 84; *v20 = v6; return 0LL; } else { switch ( v16 ) { case 9uLL: case 0x20uLL: case 0x2BuLL: goto LABEL_10; case 0x2DuLL: v19 = !v19; LABEL_10: v11 += v17; continue; default: v18 = 0; v12 = 0LL; v9 = v11; v14 = 0xFFFFFFFFFFFFFFFFLL / v22; v13 = 0xFFFFFFFFFFFFFFFFLL % v22; break; } while ( 1 ) { v17 = v15(v25, &v16, v11, v10); if ( v17 <= 0 ) break; v11 += v17; if ( v16 < 0x30 || v16 > 0x39 ) { if ( v16 < 0x41 || v16 > 0x5A ) { if ( v16 < 0x61 || v16 > 0x7A ) goto LABEL_33; v16 = v16 - 97 + 10; } else { v16 = v16 - 65 + 10; } } else { v16 -= 48LL; } if ( (int)v16 >= v22 ) goto LABEL_33; if ( v12 > v14 || v12 == v14 && v16 > v13 ) v18 = 1; else v12 = v12 * v22 + v16; } if ( v17 ) { LABEL_33: if ( v21 ) *v21 = v11; if ( v11 == v9 ) { *v20 = 33; return 0LL; } else if ( v18 ) { *v20 = 34; return -1LL; } else if ( v19 ) { return -(long long)v12; } else { return v12; } } if ( v21 ) *v21 = v11; *v20 = 84; return 0LL; } } }
my_strntoull_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 LAB_001b8f3a: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x001b8fa1 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,-0x9 MOV qword ptr [RBP + -0x90],RAX SUB RAX,0x24 JA 0x001b8f9d MOV RAX,qword ptr [RBP + -0x90] LEA RCX,[0x312fcc] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_20: JMP 0x001b8f9f caseD_9: JMP 0x001b8f9f caseD_2d: CMP dword ptr [RBP + -0x3c],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x3c],EAX JMP 0x001b8f9f caseD_2b: JMP 0x001b8f9f caseD_a: JMP 0x001b8ff8 LAB_001b8f9f: JMP 0x001b8fd9 LAB_001b8fa1: CMP qword ptr [RBP + -0x30],0x0 JZ 0x001b8fb3 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001b8fb3: MOV EDX,dword ptr [RBP + -0x44] MOV ECX,0x21 MOV EAX,0x54 CMP EDX,0x0 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b91dc LAB_001b8fd9: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX MOV AL,0x1 TEST AL,0x1 JNZ 0x001b8f3a JMP 0x001b8ff6 LAB_001b8ff6: JMP 0x001b8ff8 LAB_001b8ff8: MOV dword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x70],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x88],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x60],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x64],EAX LAB_001b903b: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x001b9125 MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x50],0x30 JC 0x001b908a CMP qword ptr [RBP + -0x50],0x39 JA 0x001b908a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x30 MOV qword ptr [RBP + -0x50],RAX JMP 0x001b90d3 LAB_001b908a: CMP qword ptr [RBP + -0x50],0x41 JC 0x001b90aa CMP qword ptr [RBP + -0x50],0x5a JA 0x001b90aa MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x41 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x001b90d1 LAB_001b90aa: CMP qword ptr [RBP + -0x50],0x61 JC 0x001b90ca CMP qword ptr [RBP + -0x50],0x7a JA 0x001b90ca MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x61 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x001b90cf LAB_001b90ca: JMP 0x001b9164 LAB_001b90cf: JMP 0x001b90d1 LAB_001b90d1: JMP 0x001b90d3 LAB_001b90d3: MOV RAX,qword ptr [RBP + -0x50] CMP EAX,dword ptr [RBP + -0x24] JL 0x001b90e1 JMP 0x001b9164 LAB_001b90e1: MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JA 0x001b9101 MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x001b910a MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x64] CMP RAX,RCX JBE 0x001b910a LAB_001b9101: MOV dword ptr [RBP + -0x40],0x1 JMP 0x001b9123 LAB_001b910a: MOVSXD RAX,dword ptr [RBP + -0x24] IMUL RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX LAB_001b9123: JMP 0x001b9156 LAB_001b9125: CMP dword ptr [RBP + -0x44],0x0 JNZ 0x001b9154 CMP qword ptr [RBP + -0x30],0x0 JZ 0x001b913d MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001b913d: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x54 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b91dc LAB_001b9154: JMP 0x001b9164 LAB_001b9156: JMP 0x001b9158 LAB_001b9158: MOV AL,0x1 TEST AL,0x1 JNZ 0x001b903b JMP 0x001b9164 LAB_001b9164: CMP qword ptr [RBP + -0x30],0x0 JZ 0x001b9176 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_001b9176: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x001b9197 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001b91dc LAB_001b9197: CMP dword ptr [RBP + -0x40],0x0 JZ 0x001b91b1 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV qword ptr [RBP + -0x8],-0x1 JMP 0x001b91dc LAB_001b91b1: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x001b91c6 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX JMP 0x001b91d1 LAB_001b91c6: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX LAB_001b91d1: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x8],RAX LAB_001b91dc: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001b8ff4) */ /* WARNING: Removing unreachable block (ram,0x001b9162) */ ulong my_strntoull_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; long lVar4; ulong uVar5; int4 uVar6; ulong local_a0; long local_80; ulong local_78; ulong local_58; int local_4c; int local_48; uint local_44; int4 *local_40; long *local_38; int local_2c; long local_28; long local_20; long local_18; ulong local_10; local_44 = 0; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); *param_6 = 0; local_80 = param_2; local_40 = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; do { lVar4 = local_80; local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_38 != (long *)0x0) { *local_38 = local_80; } uVar6 = 0x21; if (local_4c == 0) { uVar6 = 0x54; } *local_40 = uVar6; return 0; } switch(local_58) { case 9: break; default: local_48 = 0; local_78 = 0; auVar2._8_8_ = 0; auVar2._0_8_ = (long)local_2c; uVar5 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar2,0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)local_2c; goto LAB_001b903b; case 0x20: break; case 0x2b: break; case 0x2d: local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1); } local_80 = local_80 + local_4c; } while( true ); LAB_001b903b: local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_4c == 0) { if (local_38 != (long *)0x0) { *local_38 = local_80; } *local_40 = 0x54; local_10 = 0; } else { LAB_001b9164: if (local_38 != (long *)0x0) { *local_38 = local_80; } if (local_80 == lVar4) { *local_40 = 0x21; local_10 = 0; } else if (local_48 == 0) { if (local_44 == 0) { local_a0 = local_78; } else { local_a0 = -local_78; } local_10 = local_a0; } else { *local_40 = 0x22; local_10 = 0xffffffffffffffff; } } return local_10; } local_80 = local_80 + local_4c; if ((local_58 < 0x30) || (0x39 < local_58)) { if ((local_58 < 0x41) || (0x5a < local_58)) { if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_001b9164; local_58 = local_58 - 0x57; } else { local_58 = local_58 - 0x37; } } else { local_58 = local_58 - 0x30; } if (local_2c <= (int)local_58) goto LAB_001b9164; if ((uVar5 < local_78) || ((local_78 == uVar5 && (SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar3,0) < local_58)))) { local_48 = 1; } else { local_78 = local_58 + (long)local_2c * local_78; } goto LAB_001b903b; }
44,969
ma_find_writepos
eloqsql/storage/maria/ma_dynrec.c
static int _ma_find_writepos(MARIA_HA *info, ulong reclength, /* record length */ my_off_t *filepos, /* Return file pos */ ulong *length) /* length of block at filepos */ { MARIA_BLOCK_INFO block_info; ulong tmp; DBUG_ENTER("_ma_find_writepos"); if (info->s->state.dellink != HA_OFFSET_ERROR && !info->append_insert_at_end) { /* Deleted blocks exists; Get last used block */ *filepos=info->s->state.dellink; block_info.second_read=0; info->rec_cache.seek_not_done=1; if (!(_ma_get_block_info(info, &block_info, info->dfile.file, info->s->state.dellink) & BLOCK_DELETED)) { DBUG_PRINT("error",("Delete link crashed")); _ma_set_fatal_error_with_share(info->s, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(-1); } info->s->state.dellink=block_info.next_filepos; info->state->del--; info->state->empty-= block_info.block_len; *length= block_info.block_len; } else { /* No deleted blocks; Allocate a new block */ *filepos=info->state->data_file_length; if ((tmp= reclength + 3 + MY_TEST(reclength >= (65520 - 3))) < info->s->base.min_block_length) tmp= info->s->base.min_block_length; else tmp= ((tmp+MARIA_DYN_ALIGN_SIZE-1) & (~ (ulong) (MARIA_DYN_ALIGN_SIZE-1))); if (info->state->data_file_length > (info->s->base.max_data_file_length - tmp)) { my_errno=HA_ERR_RECORD_FILE_FULL; DBUG_RETURN(-1); } if (tmp > MARIA_MAX_BLOCK_LENGTH) tmp=MARIA_MAX_BLOCK_LENGTH; *length= tmp; info->state->data_file_length+= tmp; info->s->state.split++; info->update|=HA_STATE_WRITE_AT_END; } DBUG_RETURN(0); }
O3
c
ma_find_writepos: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movq %rcx, %r14 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movq (%rdi), %rax movq 0xc8(%rax), %rax cmpq $-0x1, %rax je 0x3b688 cmpb $0x0, 0x681(%rbx) je 0x3b706 movq 0x20(%rbx), %rax movq 0x28(%rax), %rax movq %rax, (%rdx) cmpq $0xffed, %rsi # imm = 0xFFED sbbq $-0x1, %rsi leaq 0x3(%rsi), %rax movq (%rbx), %rcx movq 0x20(%rbx), %rdx movq 0x3b8(%rcx), %rdi addq $0x6, %rsi andq $-0x4, %rsi cmpq %rdi, %rax cmovbq %rdi, %rsi movq 0x368(%rcx), %rax subq %rsi, %rax cmpq %rax, 0x28(%rdx) jbe 0x3b6dc callq 0xa13e6 movl $0x87, (%rax) jmp 0x3b747 movl $0xfffffc, %eax # imm = 0xFFFFFC cmpq %rax, %rsi cmovbq %rsi, %rax movq %rax, (%r14) movq 0x20(%rbx), %rcx addq %rax, 0x28(%rcx) movq (%rbx), %rax incq 0xc0(%rax) orb $0x1, 0x625(%rbx) jmp 0x3b777 movq %rax, (%rdx) leaq -0x70(%rbp), %rsi movl $0x0, 0x50(%rsi) movl $0x1, 0x598(%rbx) movl 0x480(%rbx), %edx movq (%rbx), %rax movq 0xc8(%rax), %rcx movq %rbx, %rdi callq 0x39ab8 testb $0x4, %al jne 0x3b74e movq (%rbx), %rdi movl $0x7f, %esi callq 0x32b2a movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x3b779 movq -0x30(%rbp), %rax movq (%rbx), %rcx movq %rax, 0xc8(%rcx) movq 0x20(%rbx), %rax decq 0x8(%rax) movq -0x48(%rbp), %rax movq 0x20(%rbx), %rcx subq %rax, 0x10(%rcx) movq -0x48(%rbp), %rax movq %rax, (%r14) xorl %eax, %eax movq %fs:0x28, %rcx cmpq -0x18(%rbp), %rcx jne 0x3b791 addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x29260 nop
_ma_find_writepos: push rbp mov rbp, rsp push r14 push rbx sub rsp, 60h mov r14, rcx mov rbx, rdi mov rax, fs:28h mov [rbp+var_18], rax mov rax, [rdi] mov rax, [rax+0C8h] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_3B688 cmp byte ptr [rbx+681h], 0 jz short loc_3B706 loc_3B688: mov rax, [rbx+20h] mov rax, [rax+28h] mov [rdx], rax cmp rsi, 0FFEDh sbb rsi, 0FFFFFFFFFFFFFFFFh lea rax, [rsi+3] mov rcx, [rbx] mov rdx, [rbx+20h] mov rdi, [rcx+3B8h] add rsi, 6 and rsi, 0FFFFFFFFFFFFFFFCh cmp rax, rdi cmovb rsi, rdi mov rax, [rcx+368h] sub rax, rsi cmp [rdx+28h], rax jbe short loc_3B6DC call _my_thread_var mov dword ptr [rax], 87h jmp short loc_3B747 loc_3B6DC: mov eax, 0FFFFFCh cmp rsi, rax cmovb rax, rsi mov [r14], rax mov rcx, [rbx+20h] add [rcx+28h], rax mov rax, [rbx] inc qword ptr [rax+0C0h] or byte ptr [rbx+625h], 1 jmp short loc_3B777 loc_3B706: mov [rdx], rax lea rsi, [rbp+var_70] mov dword ptr [rsi+50h], 0 mov dword ptr [rbx+598h], 1 mov edx, [rbx+480h] mov rax, [rbx] mov rcx, [rax+0C8h] mov rdi, rbx call _ma_get_block_info test al, 4 jnz short loc_3B74E mov rdi, [rbx] mov esi, 7Fh call _ma_set_fatal_error_with_share loc_3B747: mov eax, 0FFFFFFFFh jmp short loc_3B779 loc_3B74E: mov rax, [rbp+var_30] mov rcx, [rbx] mov [rcx+0C8h], rax mov rax, [rbx+20h] dec qword ptr [rax+8] mov rax, [rbp+var_48] mov rcx, [rbx+20h] sub [rcx+10h], rax mov rax, [rbp+var_48] mov [r14], rax loc_3B777: xor eax, eax loc_3B779: mov rcx, fs:28h cmp rcx, [rbp+var_18] jnz short loc_3B791 add rsp, 60h pop rbx pop r14 pop rbp retn loc_3B791: call ___stack_chk_fail
long long ma_find_writepos(_QWORD *a1, unsigned long long a2, _QWORD *a3, long long *a4, long long a5, int a6) { long long v8; // rax unsigned long long v9; // rsi unsigned long long v10; // rax long long v11; // rcx long long v12; // rdx unsigned long long v13; // rdi unsigned long long v14; // rsi long long v15; // rax long long v16; // rdx long long v17; // rcx long long v18; // r8 int v19; // r9d unsigned __int8 v21[40]; // [rsp+0h] [rbp-70h] BYREF long long v22; // [rsp+28h] [rbp-48h] long long v23; // [rsp+40h] [rbp-30h] int v24; // [rsp+50h] [rbp-20h] unsigned long long v25; // [rsp+58h] [rbp-18h] v25 = __readfsqword(0x28u); v8 = *(_QWORD *)(*a1 + 200LL); if ( v8 == -1 || *((_BYTE *)a1 + 1665) ) { *a3 = *(_QWORD *)(a1[4] + 40LL); v9 = a2 - ((a2 < 0xFFED) - 1LL); v10 = v9 + 3; v11 = *a1; v12 = a1[4]; v13 = *(_QWORD *)(*a1 + 952LL); v14 = (v9 + 6) & 0xFFFFFFFFFFFFFFFCLL; if ( v10 < v13 ) v14 = *(_QWORD *)(*a1 + 952LL); if ( *(_QWORD *)(v12 + 40) > *(_QWORD *)(v11 + 872) - v14 ) { *(_DWORD *)my_thread_var(v13) = 135; return 0xFFFFFFFFLL; } v15 = 16777212LL; if ( v14 < 0xFFFFFC ) v15 = v14; *a4 = v15; *(_QWORD *)(a1[4] + 40LL) += v15; ++*(_QWORD *)(*a1 + 192LL); *((_BYTE *)a1 + 1573) |= 1u; } else { *a3 = v8; v24 = 0; *((_DWORD *)a1 + 358) = 1; if ( (ma_get_block_info((long long)a1, v21, *((unsigned int *)a1 + 288), *(_QWORD *)(*a1 + 200LL), a5, a6) & 4) == 0 ) { ma_set_fatal_error_with_share(*a1, 127, v16, v17, v18, v19); return 0xFFFFFFFFLL; } *(_QWORD *)(*a1 + 200LL) = v23; --*(_QWORD *)(a1[4] + 8LL); *(_QWORD *)(a1[4] + 16LL) -= v22; *a4 = v22; } return 0LL; }
_ma_find_writepos: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x60 MOV R14,RCX MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0xc8] CMP RAX,-0x1 JZ 0x0013b688 CMP byte ptr [RBX + 0x681],0x0 JZ 0x0013b706 LAB_0013b688: MOV RAX,qword ptr [RBX + 0x20] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RDX],RAX CMP RSI,0xffed SBB RSI,-0x1 LEA RAX,[RSI + 0x3] MOV RCX,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x20] MOV RDI,qword ptr [RCX + 0x3b8] ADD RSI,0x6 AND RSI,-0x4 CMP RAX,RDI CMOVC RSI,RDI MOV RAX,qword ptr [RCX + 0x368] SUB RAX,RSI CMP qword ptr [RDX + 0x28],RAX JBE 0x0013b6dc CALL 0x001a13e6 MOV dword ptr [RAX],0x87 JMP 0x0013b747 LAB_0013b6dc: MOV EAX,0xfffffc CMP RSI,RAX CMOVC RAX,RSI MOV qword ptr [R14],RAX MOV RCX,qword ptr [RBX + 0x20] ADD qword ptr [RCX + 0x28],RAX MOV RAX,qword ptr [RBX] INC qword ptr [RAX + 0xc0] OR byte ptr [RBX + 0x625],0x1 JMP 0x0013b777 LAB_0013b706: MOV qword ptr [RDX],RAX LEA RSI,[RBP + -0x70] MOV dword ptr [RSI + 0x50],0x0 MOV dword ptr [RBX + 0x598],0x1 MOV EDX,dword ptr [RBX + 0x480] MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0xc8] MOV RDI,RBX CALL 0x00139ab8 TEST AL,0x4 JNZ 0x0013b74e MOV RDI,qword ptr [RBX] MOV ESI,0x7f CALL 0x00132b2a LAB_0013b747: MOV EAX,0xffffffff JMP 0x0013b779 LAB_0013b74e: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBX] MOV qword ptr [RCX + 0xc8],RAX MOV RAX,qword ptr [RBX + 0x20] DEC qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBX + 0x20] SUB qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [R14],RAX LAB_0013b777: XOR EAX,EAX LAB_0013b779: MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x18] JNZ 0x0013b791 ADD RSP,0x60 POP RBX POP R14 POP RBP RET LAB_0013b791: CALL 0x00129260
int8 _ma_find_writepos(long *param_1,ulong param_2,long *param_3,ulong *param_4) { int4 *puVar1; ulong uVar2; int8 uVar3; long lVar4; ulong uVar5; long in_FS_OFFSET; int1 local_78 [40]; ulong local_50; int8 local_38; int4 local_28; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if ((*(long *)(*param_1 + 200) == -1) || (*(char *)((long)param_1 + 0x681) != '\0')) { *param_3 = *(long *)(param_1[4] + 0x28); lVar4 = (param_2 + 1) - (ulong)(param_2 < 0xffed); uVar2 = *(ulong *)(*param_1 + 0x3b8); uVar5 = lVar4 + 6U & 0xfffffffffffffffc; if (lVar4 + 3U < uVar2) { uVar5 = uVar2; } if (*(ulong *)(param_1[4] + 0x28) <= *(long *)(*param_1 + 0x368) - uVar5) { uVar2 = 0xfffffc; if (uVar5 < 0xfffffc) { uVar2 = uVar5; } *param_4 = uVar2; *(long *)(param_1[4] + 0x28) = *(long *)(param_1[4] + 0x28) + uVar2; *(long *)(*param_1 + 0xc0) = *(long *)(*param_1 + 0xc0) + 1; *(byte *)((long)param_1 + 0x625) = *(byte *)((long)param_1 + 0x625) | 1; LAB_0013b777: uVar3 = 0; goto LAB_0013b779; } puVar1 = (int4 *)_my_thread_var(); *puVar1 = 0x87; } else { *param_3 = *(long *)(*param_1 + 200); local_28 = 0; *(int4 *)(param_1 + 0xb3) = 1; uVar2 = _ma_get_block_info(param_1,local_78,(int)param_1[0x90],*(int8 *)(*param_1 + 200)); if ((uVar2 & 4) != 0) { *(int8 *)(*param_1 + 200) = local_38; *(long *)(param_1[4] + 8) = *(long *)(param_1[4] + 8) + -1; *(long *)(param_1[4] + 0x10) = *(long *)(param_1[4] + 0x10) - local_50; *param_4 = local_50; goto LAB_0013b777; } _ma_set_fatal_error_with_share(*param_1,0x7f); } uVar3 = 0xffffffff; LAB_0013b779: if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
44,970
my_uca_context_weight_find
eloqsql/strings/ctype-uca.c
static inline const MY_CONTRACTION * my_uca_context_weight_find(my_uca_scanner *scanner, my_wc_t *wc, size_t max_char_length) { const MY_CONTRACTION *cnt; DBUG_ASSERT(scanner->level->contractions.nitems); /* If we have scanned a character which can have previous context, and there were some more characters already before, then reconstruct codepoint of the previous character from "page" and "code" into w[1], and verify that {wc[1], wc[0]} together form a real previous context pair. Note, we support only 2-character long sequences with previous context at the moment. CLDR does not have longer sequences. */ if (my_uca_can_be_previous_context_tail(&scanner->level->contractions, wc[0]) && scanner->wbeg != nochar && /* if not the very first character */ my_uca_can_be_previous_context_head(&scanner->level->contractions, (wc[1]= ((scanner->page << 8) + scanner->code))) && (cnt= my_uca_previous_context_find(scanner, wc[1], wc[0]))) { scanner->page= scanner->code= 0; /* Clear for the next character */ return cnt; } else if (my_uca_can_be_contraction_head(&scanner->level->contractions, wc[0])) { /* Check if w[0] starts a contraction */ if ((cnt= my_uca_scanner_contraction_find(scanner, wc, max_char_length))) return cnt; } return NULL; }
O0
c
my_uca_context_weight_find: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0xd04c6 movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi addq $0x18, %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi callq 0xd0670 movsbl %al, %eax cmpl $0x0, %eax je 0xd0571 movq -0x10(%rbp), %rax leaq 0x1684cb(%rip), %rcx # 0x2389c0 cmpq %rcx, (%rax) je 0xd0571 movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi addq $0x18, %rdi movq -0x10(%rbp), %rax movl 0x24(%rax), %eax shll $0x8, %eax movq -0x10(%rbp), %rcx addl 0x28(%rcx), %eax movslq %eax, %rsi movq -0x18(%rbp), %rax movq %rsi, 0x8(%rax) callq 0xd06a0 movsbl %al, %eax cmpl $0x0, %eax je 0xd0571 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rsi movq -0x18(%rbp), %rax movq (%rax), %rdx callq 0xd06d0 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0xd0571 movq -0x10(%rbp), %rax movl $0x0, 0x28(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x24(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xd05be movq -0x10(%rbp), %rax movq 0x18(%rax), %rdi addq $0x18, %rdi movq -0x18(%rbp), %rax movq (%rax), %rsi callq 0xc7ae0 cmpb $0x0, %al je 0xd05b4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0xd0780 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0xd05b2 movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xd05be jmp 0xd05b4 jmp 0xd05b6 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_uca_context_weight_find: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_D04C6: mov rax, [rbp+var_10] mov rdi, [rax+18h] add rdi, 18h mov rax, [rbp+var_18] mov rsi, [rax] call my_uca_can_be_previous_context_tail movsx eax, al cmp eax, 0 jz loc_D0571 mov rax, [rbp+var_10] lea rcx, nochar cmp [rax], rcx jz short loc_D0571 mov rax, [rbp+var_10] mov rdi, [rax+18h] add rdi, 18h mov rax, [rbp+var_10] mov eax, [rax+24h] shl eax, 8 mov rcx, [rbp+var_10] add eax, [rcx+28h] movsxd rsi, eax mov rax, [rbp+var_18] mov [rax+8], rsi call my_uca_can_be_previous_context_head movsx eax, al cmp eax, 0 jz short loc_D0571 mov rdi, [rbp+var_10] mov rax, [rbp+var_18] mov rsi, [rax+8] mov rax, [rbp+var_18] mov rdx, [rax] call my_uca_previous_context_find mov [rbp+var_28], rax cmp rax, 0 jz short loc_D0571 mov rax, [rbp+var_10] mov dword ptr [rax+28h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+24h], 0 mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_D05BE loc_D0571: mov rax, [rbp+var_10] mov rdi, [rax+18h] add rdi, 18h mov rax, [rbp+var_18] mov rsi, [rax] call my_uca_can_be_contraction_head cmp al, 0 jz short loc_D05B4 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_uca_scanner_contraction_find mov [rbp+var_28], rax cmp rax, 0 jz short loc_D05B2 mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_D05BE loc_D05B2: jmp short $+2 loc_D05B4: jmp short $+2 loc_D05B6: mov [rbp+var_8], 0 loc_D05BE: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long my_uca_context_weight_find(long long a1, _QWORD *a2, long long a3) { long long v3; // rdi long long v5; // [rsp+8h] [rbp-28h] long long v6; // [rsp+8h] [rbp-28h] if ( (unsigned __int8)my_uca_can_be_previous_context_tail(*(_QWORD *)(a1 + 24) + 24LL, *a2) && *(_UNKNOWN **)a1 != &nochar && (v3 = *(_QWORD *)(a1 + 24) + 24LL, a2[1] = *(_DWORD *)(a1 + 40) + (*(_DWORD *)(a1 + 36) << 8), (unsigned __int8)my_uca_can_be_previous_context_head(v3)) && (v5 = my_uca_previous_context_find(a1, a2[1], *a2)) != 0 ) { *(_DWORD *)(a1 + 40) = 0; *(_DWORD *)(a1 + 36) = 0; return v5; } else if ( (unsigned __int8)my_uca_can_be_contraction_head(*(_QWORD *)(a1 + 24) + 24LL, *a2) && (v6 = my_uca_scanner_contraction_find(a1, a2, a3)) != 0 ) { return v6; } else { return 0LL; } }
my_uca_context_weight_find: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x001d04c6 LAB_001d04c6: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] ADD RDI,0x18 MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] CALL 0x001d0670 MOVSX EAX,AL CMP EAX,0x0 JZ 0x001d0571 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x3389c0] CMP qword ptr [RAX],RCX JZ 0x001d0571 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] ADD RDI,0x18 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x24] SHL EAX,0x8 MOV RCX,qword ptr [RBP + -0x10] ADD EAX,dword ptr [RCX + 0x28] MOVSXD RSI,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RSI CALL 0x001d06a0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x001d0571 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RAX] CALL 0x001d06d0 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x001d0571 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x24],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x001d05be LAB_001d0571: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x18] ADD RDI,0x18 MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX] CALL 0x001c7ae0 CMP AL,0x0 JZ 0x001d05b4 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001d0780 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x001d05b2 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x001d05be LAB_001d05b2: JMP 0x001d05b4 LAB_001d05b4: JMP 0x001d05b6 LAB_001d05b6: MOV qword ptr [RBP + -0x8],0x0 LAB_001d05be: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long my_uca_context_weight_find(int8 *param_1,int8 *param_2,int8 param_3) { char cVar1; long lVar2; long local_10; cVar1 = my_uca_can_be_previous_context_tail(param_1[3] + 0x18,*param_2); if ((cVar1 != '\0') && ((int4 *)*param_1 != &nochar)) { lVar2 = param_1[3]; param_2[1] = (long)(*(int *)((long)param_1 + 0x24) * 0x100 + *(int *)(param_1 + 5)); cVar1 = my_uca_can_be_previous_context_head(lVar2 + 0x18); if ((cVar1 != '\0') && (lVar2 = my_uca_previous_context_find(param_1,param_2[1],*param_2), lVar2 != 0)) { *(int4 *)(param_1 + 5) = 0; *(int4 *)((long)param_1 + 0x24) = 0; return lVar2; } } cVar1 = my_uca_can_be_contraction_head(param_1[3] + 0x18,*param_2); if ((cVar1 == '\0') || (local_10 = my_uca_scanner_contraction_find(param_1,param_2,param_3), local_10 == 0)) { local_10 = 0; } return local_10; }
44,971
my_getwd
eloqsql/mysys/my_getwd.c
int my_getwd(char * buf, size_t size, myf MyFlags) { char * pos; DBUG_ENTER("my_getwd"); DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu", buf, (uint) size, MyFlags)); if (size < 1) DBUG_RETURN(-1); if (curr_dir[0]) /* Current pos is saved here */ (void) strmake(buf,&curr_dir[0],size-1); else { #if defined(HAVE_GETCWD) if (size < 2) DBUG_RETURN(-1); if (!getcwd(buf,(uint) (size-2)) && MyFlags & MY_WME) { my_errno=errno; my_error(EE_GETWD,MYF(ME_BELL),errno); DBUG_RETURN(-1); } #elif defined(HAVE_GETWD) { char pathname[MAXPATHLEN]; getwd(pathname); strmake(buf,pathname,size-1); } #else #error "No way to get current directory" #endif if (*((pos=strend(buf))-1) != FN_LIBCHAR) /* End with FN_LIBCHAR */ { pos[0]= FN_LIBCHAR; pos[1]=0; } (void) strmake(&curr_dir[0],buf, (size_t) (FN_REFLEN-1)); } DBUG_RETURN(0); }
O3
c
my_getwd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testq %rsi, %rsi je 0x2b1c1 movq %rdx, %r15 movq %rsi, %rdx movq %rdi, %r14 leaq 0x3425b0(%rip), %rax # 0x36d710 cmpb $0x0, (%rax) je 0x2b17b decq %rdx leaq 0x3425a1(%rip), %rsi # 0x36d710 movq %r14, %rdi callq 0x5ed58 xorl %ebx, %ebx jmp 0x2b1c1 cmpq $0x1, %rdx je 0x2b1c1 addl $-0x2, %edx movq %r14, %rdi movq %rdx, %rsi callq 0x24170 testb $0x10, %r15b je 0x2b1ce testq %rax, %rax jne 0x2b1ce callq 0x24050 movq %rax, %r14 movl (%rax), %r15d callq 0x2cb22 movl %r15d, (%rax) movl (%r14), %edx movl $0x4, %esi movl $0x10, %edi xorl %eax, %eax callq 0x314c3 movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi callq 0x5ed10 cmpb $0x2f, -0x1(%rax) je 0x2b1e1 movw $0x2f, (%rax) leaq 0x342528(%rip), %rdi # 0x36d710 movl $0x1ff, %edx # imm = 0x1FF movq %r14, %rsi jmp 0x2b172
my_getwd: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov ebx, 0FFFFFFFFh test rsi, rsi jz short loc_2B1C1 mov r15, rdx mov rdx, rsi mov r14, rdi lea rax, curr_dir cmp byte ptr [rax], 0 jz short loc_2B17B dec rdx lea rsi, curr_dir mov rdi, r14 loc_2B172: call strmake xor ebx, ebx jmp short loc_2B1C1 loc_2B17B: cmp rdx, 1 jz short loc_2B1C1 add edx, 0FFFFFFFEh mov rdi, r14 mov rsi, rdx call _getcwd test r15b, 10h jz short loc_2B1CE test rax, rax jnz short loc_2B1CE call ___errno_location mov r14, rax mov r15d, [rax] call _my_thread_var mov [rax], r15d mov edx, [r14] mov esi, 4 mov edi, 10h xor eax, eax call my_error loc_2B1C1: mov eax, ebx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_2B1CE: mov rdi, r14 call strend cmp byte ptr [rax-1], 2Fh ; '/' jz short loc_2B1E1 mov word ptr [rax], 2Fh ; '/' loc_2B1E1: lea rdi, curr_dir mov edx, 1FFh mov rsi, r14 jmp short loc_2B172
long long my_getwd(_BYTE *a1, long long a2, char a3) { unsigned int v3; // ebx _BYTE *v5; // r14 long long v6; // rdx _BYTE *v7; // rsi long long v8; // rax _DWORD *v9; // r14 int v10; // r15d int v11; // ecx int v12; // r8d int v13; // r9d _WORD *v15; // rax v3 = -1; if ( a2 ) { v5 = a1; if ( curr_dir[0] ) { v6 = a2 - 1; v7 = curr_dir; } else { if ( a2 == 1 ) return v3; v8 = getcwd(a1, (unsigned int)(a2 - 2)); if ( (a3 & 0x10) != 0 && !v8 ) { v9 = (_DWORD *)__errno_location(a1); v10 = *v9; *(_DWORD *)my_thread_var(a1) = v10; my_error(16, 4, *v9, v11, v12, v13); return v3; } v15 = (_WORD *)strend(a1); if ( *((_BYTE *)v15 - 1) != 47 ) *v15 = 47; a1 = curr_dir; v6 = 511LL; v7 = v5; } strmake(a1, v7, v6); return 0; } return v3; }
my_getwd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBX,0xffffffff TEST RSI,RSI JZ 0x0012b1c1 MOV R15,RDX MOV RDX,RSI MOV R14,RDI LEA RAX,[0x46d710] CMP byte ptr [RAX],0x0 JZ 0x0012b17b DEC RDX LEA RSI,[0x46d710] MOV RDI,R14 LAB_0012b172: CALL 0x0015ed58 XOR EBX,EBX JMP 0x0012b1c1 LAB_0012b17b: CMP RDX,0x1 JZ 0x0012b1c1 ADD EDX,-0x2 MOV RDI,R14 MOV RSI,RDX CALL 0x00124170 TEST R15B,0x10 JZ 0x0012b1ce TEST RAX,RAX JNZ 0x0012b1ce CALL 0x00124050 MOV R14,RAX MOV R15D,dword ptr [RAX] CALL 0x0012cb22 MOV dword ptr [RAX],R15D MOV EDX,dword ptr [R14] MOV ESI,0x4 MOV EDI,0x10 XOR EAX,EAX CALL 0x001314c3 LAB_0012b1c1: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_0012b1ce: MOV RDI,R14 CALL 0x0015ed10 CMP byte ptr [RAX + -0x1],0x2f JZ 0x0012b1e1 MOV word ptr [RAX],0x2f LAB_0012b1e1: LEA RDI,[0x46d710] MOV EDX,0x1ff MOV RSI,R14 JMP 0x0012b172
int8 my_getwd(char *param_1,long param_2,ulong param_3) { int iVar1; char *pcVar2; int *piVar3; int *piVar4; int2 *puVar5; char *pcVar6; if (param_2 == 0) { return 0xffffffff; } if (curr_dir == '\0') { if (param_2 == 1) { return 0xffffffff; } pcVar2 = getcwd(param_1,(ulong)((int)param_2 - 2)); if (((param_3 & 0x10) != 0) && (pcVar2 == (char *)0x0)) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; my_error(0x10,4,*piVar3); return 0xffffffff; } puVar5 = (int2 *)strend(param_1); if (*(char *)((long)puVar5 + -1) != '/') { *puVar5 = 0x2f; } pcVar6 = &curr_dir; param_2 = 0x1ff; pcVar2 = param_1; } else { param_2 = param_2 + -1; pcVar2 = &curr_dir; pcVar6 = param_1; } strmake(pcVar6,pcVar2,param_2); return 0; }
44,972
evmone::(anonymous namespace)::InstructionTracer::on_instruction_start(unsigned int, intx::uint<256u> const*, int, long, evmone::ExecutionState const&)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/tracing.cpp
void on_instruction_start(uint32_t pc, const intx::uint256* stack_top, int stack_height, int64_t gas, const ExecutionState& state) noexcept override { const auto& ctx = m_contexts.top(); const auto opcode = ctx.code[pc]; m_out << "{"; m_out << R"("pc":)" << std::dec << pc; m_out << R"(,"op":)" << std::dec << int{opcode}; m_out << R"(,"gas":"0x)" << std::hex << gas << '"'; m_out << R"(,"gasCost":"0x)" << std::hex << instr::gas_costs[state.rev][opcode] << '"'; // Full memory can be dumped as evmc::hex({state.memory.data(), state.memory.size()}), // but this should not be done by default. Adding --tracing=+memory option would be nice. m_out << R"(,"memSize":)" << std::dec << state.memory.size(); output_stack(stack_top, stack_height); if (!state.return_data.empty()) m_out << R"(,"returnData":"0x)" << evmc::hex(state.return_data) << '"'; m_out << R"(,"depth":)" << std::dec << (ctx.depth + 1); m_out << R"(,"refund":)" << std::dec << state.gas_refund; m_out << R"(,"opName":")" << get_name(opcode) << '"'; m_out << "}\n"; }
O0
cpp
evmone::(anonymous namespace)::InstructionTracer::on_instruction_start(unsigned int, intx::uint<256u> const*, int, long, evmone::ExecutionState const&): pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0xa0(%rbp) addq $0x10, %rdi callq 0x8e490 movq %rax, -0x98(%rbp) jmp 0x8cc8e movq -0xa0(%rbp), %rax movq -0x98(%rbp), %rcx movq %rcx, -0x38(%rbp) movq -0x38(%rbp), %rcx movq 0x8(%rcx), %rcx movl -0xc(%rbp), %edx movb (%rcx,%rdx), %cl movb %cl, -0x39(%rbp) movq 0x60(%rax), %rdi leaq 0x59f29(%rip), %rsi # 0xe6be5 callq 0x232e0 jmp 0x8ccc3 movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59f12(%rip), %rsi # 0xe6be7 callq 0x232e0 movq %rax, -0xa8(%rbp) jmp 0x8cce3 movq -0xa8(%rbp), %rdi leaq 0x327f(%rip), %rsi # 0x8ff70 callq 0x23570 movq %rax, -0xb0(%rbp) jmp 0x8ccff movq -0xb0(%rbp), %rdi movl -0xc(%rbp), %esi callq 0x233e0 jmp 0x8cd10 movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59ecb(%rip), %rsi # 0xe6bed callq 0x232e0 movq %rax, -0xb8(%rbp) jmp 0x8cd30 movq -0xb8(%rbp), %rdi leaq 0x3232(%rip), %rsi # 0x8ff70 callq 0x23570 movq %rax, -0xc0(%rbp) jmp 0x8cd4c movq -0xc0(%rbp), %rdi movzbl -0x39(%rbp), %esi callq 0x231d0 jmp 0x8cd5e movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59e84(%rip), %rsi # 0xe6bf4 callq 0x232e0 movq %rax, -0xc8(%rbp) jmp 0x8cd7e movq -0xc8(%rbp), %rdi leaq 0x3324(%rip), %rsi # 0x900b0 callq 0x23570 movq %rax, -0xd0(%rbp) jmp 0x8cd9a movq -0xd0(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x23200 movq %rax, -0xd8(%rbp) jmp 0x8cdb3 movq -0xd8(%rbp), %rdi movl $0x22, %esi callq 0x23340 jmp 0x8cdc6 movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59e27(%rip), %rsi # 0xe6bff callq 0x232e0 movq %rax, -0xe0(%rbp) jmp 0x8cde6 movq -0xe0(%rbp), %rdi leaq 0x32bc(%rip), %rsi # 0x900b0 callq 0x23570 movq %rax, -0xe8(%rbp) jmp 0x8ce02 movq -0x30(%rbp), %rax movl 0x40(%rax), %eax movl %eax, %esi leaq 0x52cc8(%rip), %rdi # 0xdfada callq 0x610b0 movq %rax, %rdi movzbl -0x39(%rbp), %eax movl %eax, %esi callq 0x610e0 movq -0xe8(%rbp), %rdi movswl (%rax), %esi callq 0x232a0 movq %rax, -0xf0(%rbp) jmp 0x8ce3d movq -0xf0(%rbp), %rdi movl $0x22, %esi callq 0x23340 jmp 0x8ce50 movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59dac(%rip), %rsi # 0xe6c0e callq 0x232e0 movq %rax, -0xf8(%rbp) jmp 0x8ce70 movq -0xf8(%rbp), %rdi leaq 0x30f2(%rip), %rsi # 0x8ff70 callq 0x23570 movq %rax, -0x100(%rbp) jmp 0x8ce8c movq -0x30(%rbp), %rdi addq $0x8, %rdi callq 0x686e0 movq -0x100(%rbp), %rdi movq %rax, %rsi callq 0x23520 jmp 0x8ceaa movq -0xa0(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx callq 0x8e4b0 jmp 0x8cebf movq -0x30(%rbp), %rdi addq $0x48, %rdi callq 0x900e0 testb $0x1, %al jne 0x8cf4d movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59d38(%rip), %rsi # 0xe6c1a callq 0x232e0 movq %rax, -0x108(%rbp) jmp 0x8cef0 movq -0x30(%rbp), %rdi addq $0x48, %rdi callq 0x79d90 movq %rax, -0x70(%rbp) movq %rdx, -0x68(%rbp) movq -0x70(%rbp), %rsi movq -0x68(%rbp), %rdx leaq -0x60(%rbp), %rdi callq 0x90110 jmp 0x8cf18 movq -0x108(%rbp), %rdi leaq -0x60(%rbp), %rsi callq 0x231b0 movq %rax, -0x110(%rbp) jmp 0x8cf31 movq -0x110(%rbp), %rdi movl $0x22, %esi callq 0x23340 jmp 0x8cf44 leaq -0x60(%rbp), %rdi callq 0x8ec10 movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59ccd(%rip), %rsi # 0xe6c2c callq 0x232e0 movq %rax, -0x118(%rbp) jmp 0x8cf6d movq -0x118(%rbp), %rdi leaq 0x2ff5(%rip), %rsi # 0x8ff70 callq 0x23570 movq %rax, -0x120(%rbp) jmp 0x8cf89 movq -0x120(%rbp), %rdi movq -0x38(%rbp), %rax movl (%rax), %esi incl %esi callq 0x231d0 jmp 0x8cf9f movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59c85(%rip), %rsi # 0xe6c36 callq 0x232e0 movq %rax, -0x128(%rbp) jmp 0x8cfbf movq -0x128(%rbp), %rdi leaq 0x2fa3(%rip), %rsi # 0x8ff70 callq 0x23570 movq %rax, -0x130(%rbp) jmp 0x8cfdb movq -0x130(%rbp), %rdi movq -0x30(%rbp), %rax movq (%rax), %rsi callq 0x23200 jmp 0x8cff0 movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59c3f(%rip), %rsi # 0xe6c41 callq 0x232e0 movq %rax, -0x138(%rbp) jmp 0x8d010 movzbl -0x39(%rbp), %esi leaq -0x90(%rbp), %rdi callq 0x8c3f0 jmp 0x8d022 movq -0x138(%rbp), %rdi leaq -0x90(%rbp), %rsi callq 0x231b0 movq %rax, -0x140(%rbp) jmp 0x8d03e movq -0x140(%rbp), %rdi movl $0x22, %esi callq 0x23340 jmp 0x8d051 leaq -0x90(%rbp), %rdi callq 0x8ec10 movq -0xa0(%rbp), %rax movq 0x60(%rax), %rdi leaq 0x59bde(%rip), %rsi # 0xe6c4d callq 0x232e0 jmp 0x8d076 addq $0x140, %rsp # imm = 0x140 popq %rbp retq movq %rax, %rdi callq 0x37a70 nopw (%rax,%rax)
_ZN6evmone12_GLOBAL__N_117InstructionTracer20on_instruction_startEjPKN4intx4uintILj256EEEilRKNS_14ExecutionStateE: push rbp mov rbp, rsp sub rsp, 140h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rdi, [rbp+var_8] mov [rbp+var_A0], rdi add rdi, 10h call _ZNSt5stackIN6evmone12_GLOBAL__N_117InstructionTracer7ContextESt5dequeIS3_SaIS3_EEE3topEv; std::stack<evmone::`anonymous namespace'::InstructionTracer::Context>::top(void) mov [rbp+var_98], rax jmp short $+2 loc_8CC8E: mov rax, [rbp+var_A0] mov rcx, [rbp+var_98] mov [rbp+var_38], rcx mov rcx, [rbp+var_38] mov rcx, [rcx+8] mov edx, [rbp+var_C] mov cl, [rcx+rdx] mov [rbp+var_39], cl mov rdi, [rax+60h] lea rsi, asc_E6BE5; "{" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_8CCC3: mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, aPc; "\"pc\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_A8], rax jmp short $+2 loc_8CCE3: mov rdi, [rbp+var_A8] lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rbp+var_B0], rax jmp short $+2 loc_8CCFF: mov rdi, [rbp+var_B0] mov esi, [rbp+var_C] call __ZNSolsEj; std::ostream::operator<<(uint) jmp short $+2 loc_8CD10: mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, aOp; ",\"op\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_B8], rax jmp short $+2 loc_8CD30: mov rdi, [rbp+var_B8] lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rbp+var_C0], rax jmp short $+2 loc_8CD4C: mov rdi, [rbp+var_C0] movzx esi, [rbp+var_39] call __ZNSolsEi; std::ostream::operator<<(int) jmp short $+2 loc_8CD5E: mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, aGas0x; ",\"gas\":\"0x" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_C8], rax jmp short $+2 loc_8CD7E: mov rdi, [rbp+var_C8] lea rsi, _ZSt3hexRSt8ios_base; std::hex(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rbp+var_D0], rax jmp short $+2 loc_8CD9A: mov rdi, [rbp+var_D0] mov rsi, [rbp+var_28] call __ZNSolsEl; std::ostream::operator<<(long) mov [rbp+var_D8], rax jmp short $+2 loc_8CDB3: mov rdi, [rbp+var_D8] mov esi, 22h ; '"' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) jmp short $+2 loc_8CDC6: mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, aGascost0x; ",\"gasCost\":\"0x" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_E0], rax jmp short $+2 loc_8CDE6: mov rdi, [rbp+var_E0] lea rsi, _ZSt3hexRSt8ios_base; std::hex(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rbp+var_E8], rax jmp short $+2 loc_8CE02: mov rax, [rbp+var_30] mov eax, [rax+40h] mov esi, eax lea rdi, _ZN6evmone5instr9gas_costsE; evmone::instr::gas_costs call _ZNKSt5arrayIS_IsLm256EELm16EEixEm; std::array<std::array<short,256ul>,16ul>::operator[](ulong) mov rdi, rax movzx eax, [rbp+var_39] mov esi, eax call _ZNKSt5arrayIsLm256EEixEm; std::array<short,256ul>::operator[](ulong) mov rdi, [rbp+var_E8] movsx esi, word ptr [rax] call __ZNSolsEs; std::ostream::operator<<(short) mov [rbp+var_F0], rax jmp short $+2 loc_8CE3D: mov rdi, [rbp+var_F0] mov esi, 22h ; '"' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) jmp short $+2 loc_8CE50: mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, aMemsize; ",\"memSize\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_F8], rax jmp short $+2 loc_8CE70: mov rdi, [rbp+var_F8] lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rbp+var_100], rax jmp short $+2 loc_8CE8C: mov rdi, [rbp+var_30] add rdi, 8; this call _ZNK6evmone6Memory4sizeEv; evmone::Memory::size(void) mov rdi, [rbp+var_100] mov rsi, rax call __ZNSolsEm; std::ostream::operator<<(ulong) jmp short $+2 loc_8CEAA: mov rdi, [rbp+var_A0] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] call _ZN6evmone12_GLOBAL__N_117InstructionTracer12output_stackEPKN4intx4uintILj256EEEi; evmone::`anonymous namespace'::InstructionTracer::output_stack(intx::uint<256u> const*,int) jmp short $+2 loc_8CEBF: mov rdi, [rbp+var_30] add rdi, 48h ; 'H' call _ZNKSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEE5emptyEv; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::empty(void) test al, 1 jnz short loc_8CF4D mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, aReturndata0x; ",\"returnData\":\"0x" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_108], rax jmp short $+2 loc_8CEF0: mov rdi, [rbp+var_30] add rdi, 48h ; 'H' call _ZNKSt7__cxx1112basic_stringIhN4evmc11byte_traitsIhEESaIhEEcvSt17basic_string_viewIhS3_EEv; std::basic_string<uchar,evmc::byte_traits<uchar>,std::allocator<uchar>>::operator std::basic_string_view<uchar,evmc::byte_traits<uchar>>(void) mov [rbp+var_70], rax mov [rbp+var_68], rdx mov rsi, [rbp+var_70] mov rdx, [rbp+var_68] lea rdi, [rbp+var_60] call _ZN4evmc3hexB5cxx11ESt17basic_string_viewIhNS_11byte_traitsIhEEE; evmc::hex(std::basic_string_view<uchar,evmc::byte_traits<uchar>>) jmp short $+2 loc_8CF18: mov rdi, [rbp+var_108] lea rsi, [rbp+var_60] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_110], rax jmp short $+2 loc_8CF31: mov rdi, [rbp+var_110] mov esi, 22h ; '"' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) jmp short $+2 loc_8CF44: lea rdi, [rbp+var_60] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_8CF4D: mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, aDepth; ",\"depth\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_118], rax jmp short $+2 loc_8CF6D: mov rdi, [rbp+var_118] lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rbp+var_120], rax jmp short $+2 loc_8CF89: mov rdi, [rbp+var_120] mov rax, [rbp+var_38] mov esi, [rax] inc esi call __ZNSolsEi; std::ostream::operator<<(int) jmp short $+2 loc_8CF9F: mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, aRefund; ",\"refund\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_128], rax jmp short $+2 loc_8CFBF: mov rdi, [rbp+var_128] lea rsi, _ZSt3decRSt8ios_base; std::dec(std::ios_base &) call __ZNSolsEPFRSt8ios_baseS0_E; std::ostream::operator<<(std::ios_base & (*)(std::ios_base &)) mov [rbp+var_130], rax jmp short $+2 loc_8CFDB: mov rdi, [rbp+var_130] mov rax, [rbp+var_30] mov rsi, [rax] call __ZNSolsEl; std::ostream::operator<<(long) jmp short $+2 loc_8CFF0: mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, aOpname; ",\"opName\":\"" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_138], rax jmp short $+2 loc_8D010: movzx esi, [rbp+var_39] lea rdi, [rbp+var_90] call _ZN6evmone12_GLOBAL__N_18get_nameB5cxx11Eh; evmone::`anonymous namespace'::get_name(uchar) jmp short $+2 loc_8D022: mov rdi, [rbp+var_138] lea rsi, [rbp+var_90] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_140], rax jmp short $+2 loc_8D03E: mov rdi, [rbp+var_140] mov esi, 22h ; '"' call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) jmp short $+2 loc_8D051: lea rdi, [rbp+var_90] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rbp+var_A0] mov rdi, [rax+60h] lea rsi, asc_E6C4D; "}\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_8D076: add rsp, 140h pop rbp retn mov rdi, rax call __clang_call_terminate
long long evmone::`anonymous namespace'::InstructionTracer::on_instruction_start( long long a1, unsigned int a2, long long a3, unsigned int a4, long long a5, long long a6) { long long v6; // rax __int16 *v7; // rax long long v8; // rax long long v9; // rdx long long v11; // [rsp+0h] [rbp-140h] long long v12; // [rsp+8h] [rbp-138h] long long v13; // [rsp+10h] [rbp-130h] long long v14; // [rsp+18h] [rbp-128h] long long v15; // [rsp+20h] [rbp-120h] long long v16; // [rsp+28h] [rbp-118h] long long v17; // [rsp+30h] [rbp-110h] long long v18; // [rsp+38h] [rbp-108h] long long v19; // [rsp+40h] [rbp-100h] long long v20; // [rsp+48h] [rbp-F8h] long long v21; // [rsp+50h] [rbp-F0h] long long v22; // [rsp+58h] [rbp-E8h] long long v23; // [rsp+60h] [rbp-E0h] long long v24; // [rsp+68h] [rbp-D8h] long long v25; // [rsp+70h] [rbp-D0h] long long v26; // [rsp+78h] [rbp-C8h] long long v27; // [rsp+80h] [rbp-C0h] long long v28; // [rsp+88h] [rbp-B8h] long long v29; // [rsp+90h] [rbp-B0h] long long v30; // [rsp+98h] [rbp-A8h] _BYTE v31[32]; // [rsp+B0h] [rbp-90h] BYREF long long v32; // [rsp+D0h] [rbp-70h] long long v33; // [rsp+D8h] [rbp-68h] _BYTE v34[39]; // [rsp+E0h] [rbp-60h] BYREF unsigned __int8 v35; // [rsp+107h] [rbp-39h] long long v36; // [rsp+108h] [rbp-38h] long long v37; // [rsp+110h] [rbp-30h] long long v38; // [rsp+118h] [rbp-28h] unsigned int v39; // [rsp+124h] [rbp-1Ch] long long v40; // [rsp+128h] [rbp-18h] unsigned int v41; // [rsp+134h] [rbp-Ch] long long v42; // [rsp+138h] [rbp-8h] v42 = a1; v41 = a2; v40 = a3; v39 = a4; v38 = a5; v37 = a6; v36 = std::stack<evmone::`anonymous namespace'::InstructionTracer::Context>::top(a1 + 16); v35 = *(_BYTE *)(*(_QWORD *)(v36 + 8) + a2); std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), "{"); v30 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), "\"pc\":"); v29 = std::ostream::operator<<(v30, std::dec); std::ostream::operator<<(v29, a2); v28 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"op\":"); v27 = std::ostream::operator<<(v28, std::dec); std::ostream::operator<<(v27, v35); v26 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"gas\":\"0x"); v25 = std::ostream::operator<<(v26, std::hex); v24 = std::ostream::operator<<(v25, v38); std::operator<<<std::char_traits<char>>(v24, 34LL); v23 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"gasCost\":\"0x"); v22 = std::ostream::operator<<(v23, std::hex); v6 = std::array<std::array<short,256ul>,16ul>::operator[]( (long long)&evmone::instr::gas_costs, *(unsigned int *)(v37 + 64)); v7 = (__int16 *)std::array<short,256ul>::operator[](v6, v35); v21 = std::ostream::operator<<(v22, (unsigned int)*v7); std::operator<<<std::char_traits<char>>(v21, 34LL); v20 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"memSize\":"); v19 = std::ostream::operator<<(v20, std::dec); v8 = evmone::Memory::size((evmone::Memory *)(v37 + 8)); std::ostream::operator<<(v19, v8); evmone::`anonymous namespace'::InstructionTracer::output_stack(a1, v40, v39); if ( (std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::empty(v37 + 72) & 1) == 0 ) { v18 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"returnData\":\"0x"); v32 = std::basic_string<unsigned char,evmc::byte_traits<unsigned char>,std::allocator<unsigned char>>::operator std::basic_string_view<unsigned char,evmc::byte_traits<unsigned char>>(v37 + 72); v33 = v9; evmc::hex[abi:cxx11](v34, v32, v9); v17 = std::operator<<<char>(v18, v34); std::operator<<<std::char_traits<char>>(v17, 34LL); std::string::~string(v34); } v16 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"depth\":"); v15 = std::ostream::operator<<(v16, std::dec); std::ostream::operator<<(v15, (unsigned int)(*(_DWORD *)v36 + 1)); v14 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"refund\":"); v13 = std::ostream::operator<<(v14, std::dec); std::ostream::operator<<(v13, *(_QWORD *)v37); v12 = std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), ",\"opName\":\""); evmone::`anonymous namespace'::get_name[abi:cxx11]((long long)v31, v35); v11 = std::operator<<<char>(v12, v31); std::operator<<<std::char_traits<char>>(v11, 34LL); std::string::~string(v31); return std::operator<<<std::char_traits<char>>(*(_QWORD *)(a1 + 96), "}\n"); }
on_instruction_start: PUSH RBP MOV RBP,RSP SUB RSP,0x140 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xa0],RDI ADD RDI,0x10 LAB_0018cc80: CALL 0x0018e490 MOV qword ptr [RBP + -0x98],RAX JMP 0x0018cc8e LAB_0018cc8e: MOV RAX,qword ptr [RBP + -0xa0] MOV RCX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x38],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x8] MOV EDX,dword ptr [RBP + -0xc] MOV CL,byte ptr [RCX + RDX*0x1] MOV byte ptr [RBP + -0x39],CL MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6be5] CALL 0x001232e0 JMP 0x0018ccc3 LAB_0018ccc3: MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6be7] CALL 0x001232e0 MOV qword ptr [RBP + -0xa8],RAX JMP 0x0018cce3 LAB_0018cce3: MOV RDI,qword ptr [RBP + -0xa8] LEA RSI,[0x18ff70] CALL 0x00123570 MOV qword ptr [RBP + -0xb0],RAX JMP 0x0018ccff LAB_0018ccff: MOV RDI,qword ptr [RBP + -0xb0] MOV ESI,dword ptr [RBP + -0xc] CALL 0x001233e0 JMP 0x0018cd10 LAB_0018cd10: MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6bed] CALL 0x001232e0 MOV qword ptr [RBP + -0xb8],RAX JMP 0x0018cd30 LAB_0018cd30: MOV RDI,qword ptr [RBP + -0xb8] LEA RSI,[0x18ff70] CALL 0x00123570 MOV qword ptr [RBP + -0xc0],RAX JMP 0x0018cd4c LAB_0018cd4c: MOV RDI,qword ptr [RBP + -0xc0] MOVZX ESI,byte ptr [RBP + -0x39] CALL 0x001231d0 JMP 0x0018cd5e LAB_0018cd5e: MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6bf4] CALL 0x001232e0 MOV qword ptr [RBP + -0xc8],RAX JMP 0x0018cd7e LAB_0018cd7e: MOV RDI,qword ptr [RBP + -0xc8] LEA RSI,[0x1900b0] CALL 0x00123570 MOV qword ptr [RBP + -0xd0],RAX JMP 0x0018cd9a LAB_0018cd9a: MOV RDI,qword ptr [RBP + -0xd0] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00123200 MOV qword ptr [RBP + -0xd8],RAX JMP 0x0018cdb3 LAB_0018cdb3: MOV RDI,qword ptr [RBP + -0xd8] MOV ESI,0x22 CALL 0x00123340 JMP 0x0018cdc6 LAB_0018cdc6: MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6bff] CALL 0x001232e0 MOV qword ptr [RBP + -0xe0],RAX JMP 0x0018cde6 LAB_0018cde6: MOV RDI,qword ptr [RBP + -0xe0] LEA RSI,[0x1900b0] CALL 0x00123570 MOV qword ptr [RBP + -0xe8],RAX JMP 0x0018ce02 LAB_0018ce02: MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x40] MOV ESI,EAX LEA RDI,[0x1dfada] CALL 0x001610b0 MOV RDI,RAX MOVZX EAX,byte ptr [RBP + -0x39] MOV ESI,EAX CALL 0x001610e0 MOV RDI,qword ptr [RBP + -0xe8] MOVSX ESI,word ptr [RAX] CALL 0x001232a0 MOV qword ptr [RBP + -0xf0],RAX JMP 0x0018ce3d LAB_0018ce3d: MOV RDI,qword ptr [RBP + -0xf0] MOV ESI,0x22 CALL 0x00123340 JMP 0x0018ce50 LAB_0018ce50: MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6c0e] CALL 0x001232e0 MOV qword ptr [RBP + -0xf8],RAX JMP 0x0018ce70 LAB_0018ce70: MOV RDI,qword ptr [RBP + -0xf8] LEA RSI,[0x18ff70] CALL 0x00123570 MOV qword ptr [RBP + -0x100],RAX JMP 0x0018ce8c LAB_0018ce8c: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x8 CALL 0x001686e0 MOV RDI,qword ptr [RBP + -0x100] MOV RSI,RAX CALL 0x00123520 JMP 0x0018ceaa LAB_0018ceaa: MOV RDI,qword ptr [RBP + -0xa0] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] CALL 0x0018e4b0 JMP 0x0018cebf LAB_0018cebf: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x48 CALL 0x001900e0 TEST AL,0x1 JNZ 0x0018cf4d MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6c1a] CALL 0x001232e0 MOV qword ptr [RBP + -0x108],RAX JMP 0x0018cef0 LAB_0018cef0: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x48 CALL 0x00179d90 MOV qword ptr [RBP + -0x70],RAX MOV qword ptr [RBP + -0x68],RDX MOV RSI,qword ptr [RBP + -0x70] MOV RDX,qword ptr [RBP + -0x68] LEA RDI,[RBP + -0x60] CALL 0x00190110 JMP 0x0018cf18 LAB_0018cf18: MOV RDI,qword ptr [RBP + -0x108] LEA RSI,[RBP + -0x60] CALL 0x001231b0 MOV qword ptr [RBP + -0x110],RAX JMP 0x0018cf31 LAB_0018cf31: MOV RDI,qword ptr [RBP + -0x110] MOV ESI,0x22 CALL 0x00123340 JMP 0x0018cf44 LAB_0018cf44: LEA RDI,[RBP + -0x60] CALL 0x0018ec10 LAB_0018cf4d: MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6c2c] CALL 0x001232e0 MOV qword ptr [RBP + -0x118],RAX JMP 0x0018cf6d LAB_0018cf6d: MOV RDI,qword ptr [RBP + -0x118] LEA RSI,[0x18ff70] CALL 0x00123570 MOV qword ptr [RBP + -0x120],RAX JMP 0x0018cf89 LAB_0018cf89: MOV RDI,qword ptr [RBP + -0x120] MOV RAX,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RAX] INC ESI CALL 0x001231d0 JMP 0x0018cf9f LAB_0018cf9f: MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6c36] CALL 0x001232e0 MOV qword ptr [RBP + -0x128],RAX JMP 0x0018cfbf LAB_0018cfbf: MOV RDI,qword ptr [RBP + -0x128] LEA RSI,[0x18ff70] CALL 0x00123570 MOV qword ptr [RBP + -0x130],RAX JMP 0x0018cfdb LAB_0018cfdb: MOV RDI,qword ptr [RBP + -0x130] MOV RAX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RAX] CALL 0x00123200 JMP 0x0018cff0 LAB_0018cff0: MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6c41] CALL 0x001232e0 MOV qword ptr [RBP + -0x138],RAX JMP 0x0018d010 LAB_0018d010: MOVZX ESI,byte ptr [RBP + -0x39] LEA RDI,[RBP + -0x90] CALL 0x0018c3f0 JMP 0x0018d022 LAB_0018d022: MOV RDI,qword ptr [RBP + -0x138] LEA RSI,[RBP + -0x90] CALL 0x001231b0 MOV qword ptr [RBP + -0x140],RAX JMP 0x0018d03e LAB_0018d03e: MOV RDI,qword ptr [RBP + -0x140] MOV ESI,0x22 CALL 0x00123340 JMP 0x0018d051 LAB_0018d051: LEA RDI,[RBP + -0x90] CALL 0x0018ec10 MOV RAX,qword ptr [RBP + -0xa0] MOV RDI,qword ptr [RAX + 0x60] LEA RSI,[0x1e6c4d] CALL 0x001232e0 JMP 0x0018d076 LAB_0018d076: ADD RSP,0x140 POP RBP RET
/* evmone::(anonymous namespace)::InstructionTracer::on_instruction_start(unsigned int, intx::uint<256u> const*, int, long, evmone::ExecutionState const&) */ void __thiscall evmone::(anonymous_namespace)::InstructionTracer::on_instruction_start (InstructionTracer *this,uint param_1,uint *param_2,int param_3,long param_4, ExecutionState *param_5) { ostream *poVar1; array<short,256ul> *this_00; short *psVar2; ulong uVar3; _anonymous_namespace_ local_98 [32]; int1 local_78 [16]; string local_68 [39]; byte local_41; int *local_40; ExecutionState *local_38; long local_30; int local_24; uint *local_20; uint local_14; InstructionTracer *local_10; local_38 = param_5; local_30 = param_4; local_24 = param_3; local_20 = param_2; local_14 = param_1; local_10 = this; /* try { // try from 0018cc80 to 0018d073 has its CatchHandler @ 0018d07f */ local_40 = (int *)std:: stack<evmone::(anonymous_namespace)::InstructionTracer::Context,std::deque<evmone::(anonymous_namespace)::InstructionTracer::Context,std::allocator<evmone::(anonymous_namespace)::InstructionTracer::Context>>> ::top((stack<evmone::(anonymous_namespace)::InstructionTracer::Context,std::deque<evmone::(anonymous_namespace)::InstructionTracer::Context,std::allocator<evmone::(anonymous_namespace)::InstructionTracer::Context>>> *)(this + 0x10)); local_41 = *(byte *)(*(long *)(local_40 + 2) + (ulong)local_14); std::operator<<(*(ostream **)(this + 0x60),"{"); poVar1 = std::operator<<(*(ostream **)(this + 0x60),"\"pc\":"); poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec); std::ostream::operator<<(poVar1,local_14); poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"op\":"); poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec); std::ostream::operator<<(poVar1,(uint)local_41); poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"gas\":\"0x"); poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::hex); poVar1 = (ostream *)std::ostream::operator<<(poVar1,local_30); std::operator<<(poVar1,'\"'); poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"gasCost\":\"0x"); poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::hex); this_00 = (array<short,256ul> *) std::array<std::array<short,256ul>,16ul>::operator[] ((array<std::array<short,256ul>,16ul> *)instr::gas_costs, (ulong)*(uint *)(local_38 + 0x40)); psVar2 = (short *)std::array<short,256ul>::operator[](this_00,(ulong)local_41); poVar1 = (ostream *)std::ostream::operator<<(poVar1,*psVar2); std::operator<<(poVar1,'\"'); poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"memSize\":"); poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec); uVar3 = Memory::size((Memory *)(local_38 + 8)); std::ostream::operator<<(poVar1,uVar3); output_stack(this,local_20,local_24); uVar3 = std::__cxx11:: basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>> ::empty((basic_string<unsigned_char,evmc::byte_traits<unsigned_char>,std::allocator<unsigned_char>> *)(local_38 + 0x48)); if ((uVar3 & 1) == 0) { poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"returnData\":\"0x"); local_78 = std::__cxx11::basic_string::operator_cast_to_basic_string_view ((basic_string *)(local_38 + 0x48)); evmc::hex_abi_cxx11_(local_68,local_78._0_8_,local_78._8_8_); poVar1 = std::operator<<(poVar1,local_68); std::operator<<(poVar1,'\"'); std::__cxx11::string::~string(local_68); } poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"depth\":"); poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec); std::ostream::operator<<(poVar1,*local_40 + 1); poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"refund\":"); poVar1 = (ostream *)std::ostream::operator<<(poVar1,std::dec); std::ostream::operator<<(poVar1,*(long *)local_38); poVar1 = std::operator<<(*(ostream **)(this + 0x60),",\"opName\":\""); get_name_abi_cxx11_(local_98,local_41); poVar1 = std::operator<<(poVar1,(string *)local_98); std::operator<<(poVar1,'\"'); std::__cxx11::string::~string((string *)local_98); std::operator<<(*(ostream **)(this + 0x60),"}\n"); return; }
44,973
test_bug6049
eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c
static int test_bug6049(MYSQL *mysql) { MYSQL_STMT *stmt; MYSQL_BIND my_bind[1]; MYSQL_RES *res; MYSQL_ROW row; const char *stmt_text; char buffer[30]; ulong length; int rc; stmt_text= "SELECT MAKETIME(-25, 12, 12)"; rc= mysql_real_query(mysql, SL(stmt_text)); check_mysql_rc(rc, mysql); res= mysql_store_result(mysql); row= mysql_fetch_row(res); stmt= mysql_stmt_init(mysql); rc= mysql_stmt_prepare(stmt, SL(stmt_text)); check_stmt_rc(rc, stmt); rc= mysql_stmt_execute(stmt); check_stmt_rc(rc, stmt); memset(my_bind, '\0', sizeof(my_bind)); my_bind[0].buffer_type = MYSQL_TYPE_STRING; my_bind[0].buffer = &buffer; my_bind[0].buffer_length = sizeof(buffer); my_bind[0].length = &length; mysql_stmt_bind_result(stmt, my_bind); rc= mysql_stmt_fetch(stmt); check_stmt_rc(rc, stmt); FAIL_UNLESS(strcmp(row[0], (char*) buffer) == 0, "row[0] != buffer"); mysql_free_result(res); mysql_stmt_close(stmt); return OK; }
O0
c
test_bug6049: pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x40(%rbp) leaq 0x410ef(%rip), %rax # 0x69ba2 movq %rax, -0xd8(%rbp) movq -0x40(%rbp), %rax movq %rax, -0xf8(%rbp) movq -0xd8(%rbp), %rax movq %rax, -0xf0(%rbp) movq -0xd8(%rbp), %rdi callq 0x141a0 movq -0xf8(%rbp), %rdi movq -0xf0(%rbp), %rsi movq %rax, %rdx callq 0x377f0 movl %eax, -0xe4(%rbp) cmpl $0x0, -0xe4(%rbp) je 0x28b5f movl -0xe4(%rbp), %eax movl %eax, -0x104(%rbp) movq -0x40(%rbp), %rdi callq 0x3c3f0 movq %rax, -0x100(%rbp) movq -0x40(%rbp), %rdi callq 0x3c3c0 movl -0x104(%rbp), %esi movq -0x100(%rbp), %rdx movl %eax, %ecx leaq 0x3cb96(%rip), %rdi # 0x656d5 leaq 0x3d527(%rip), %r8 # 0x6606d movl $0xb40, %r9d # imm = 0xB40 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x28d51 jmp 0x28b61 movq -0x40(%rbp), %rdi callq 0x3a0c0 movq %rax, -0xc8(%rbp) movq -0xc8(%rbp), %rdi callq 0x3a400 movq %rax, -0xd0(%rbp) movq -0x40(%rbp), %rdi callq 0x44950 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x118(%rbp) movq -0xd8(%rbp), %rax movq %rax, -0x110(%rbp) movq -0xd8(%rbp), %rdi callq 0x141a0 movq -0x118(%rbp), %rdi movq -0x110(%rbp), %rsi movq %rax, %rdx callq 0x45070 movl %eax, -0xe4(%rbp) cmpl $0x0, -0xe4(%rbp) je 0x28c0d movq -0x48(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x3c9a2(%rip), %rdi # 0x65590 leaq 0x3d478(%rip), %rdx # 0x6606d movl $0xb46, %ecx # imm = 0xB46 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x28d51 jmp 0x28c0f movq -0x48(%rbp), %rdi callq 0x46580 movl %eax, -0xe4(%rbp) cmpl $0x0, -0xe4(%rbp) je 0x28c59 movq -0x48(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x3c956(%rip), %rdi # 0x65590 leaq 0x3d42c(%rip), %rdx # 0x6606d movl $0xb48, %ecx # imm = 0xB48 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x28d51 jmp 0x28c5b leaq -0xc0(%rbp), %rdi xorl %esi, %esi movl $0x70, %edx callq 0x14260 movl $0xfe, -0x60(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0xb0(%rbp) movq $0x1e, -0x80(%rbp) leaq -0xe0(%rbp), %rax movq %rax, -0xc0(%rbp) movq -0x48(%rbp), %rdi leaq -0xc0(%rbp), %rsi callq 0x43940 movq -0x48(%rbp), %rdi callq 0x44020 movl %eax, -0xe4(%rbp) cmpl $0x0, -0xe4(%rbp) je 0x28ced movq -0x48(%rbp), %rdi callq 0x43fd0 movq %rax, %rsi leaq 0x3c8bf(%rip), %rdi # 0x65590 leaq 0x3d395(%rip), %rdx # 0x6606d movl $0xb51, %ecx # imm = 0xB51 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x28d51 jmp 0x28cef jmp 0x28cf1 movq -0xd0(%rbp), %rax movq (%rax), %rdi leaq -0x30(%rbp), %rsi callq 0x14600 cmpl $0x0, %eax je 0x28d33 leaq 0x3c880(%rip), %rdi # 0x65590 leaq 0x40ea8(%rip), %rsi # 0x69bbf leaq 0x3d34f(%rip), %rdx # 0x6606d movl $0xb53, %ecx # imm = 0xB53 movb $0x0, %al callq 0x2fc40 movl $0x1, -0x34(%rbp) jmp 0x28d51 jmp 0x28d35 movq -0xc8(%rbp), %rdi callq 0x31900 movq -0x48(%rbp), %rdi callq 0x43eb0 movl $0x0, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x11c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x28d7b movl -0x11c(%rbp), %eax addq $0x120, %rsp # imm = 0x120 popq %rbp retq callq 0x144c0
test_bug6049: push rbp mov rbp, rsp sub rsp, 120h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_40], rdi lea rax, aSelectMaketime; "SELECT MAKETIME(-25, 12, 12)" mov [rbp+var_D8], rax mov rax, [rbp+var_40] mov [rbp+var_F8], rax mov rax, [rbp+var_D8] mov [rbp+var_F0], rax mov rdi, [rbp+var_D8] call _strlen mov rdi, [rbp+var_F8] mov rsi, [rbp+var_F0] mov rdx, rax call mysql_real_query mov [rbp+var_E4], eax cmp [rbp+var_E4], 0 jz short loc_28B5F mov eax, [rbp+var_E4] mov [rbp+var_104], eax mov rdi, [rbp+var_40] call mysql_error mov [rbp+var_100], rax mov rdi, [rbp+var_40] call mysql_errno mov esi, [rbp+var_104] mov rdx, [rbp+var_100] mov ecx, eax lea rdi, aErrorDSDInSLin; "Error (%d): %s (%d) in %s line %d" lea r8, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov r9d, 0B40h mov al, 0 call diag mov [rbp+var_34], 1 jmp loc_28D51 loc_28B5F: jmp short $+2 loc_28B61: mov rdi, [rbp+var_40] call mysql_store_result mov [rbp+var_C8], rax mov rdi, [rbp+var_C8] call mysql_fetch_row mov [rbp+var_D0], rax mov rdi, [rbp+var_40] call mysql_stmt_init mov [rbp+var_48], rax mov rax, [rbp+var_48] mov [rbp+var_118], rax mov rax, [rbp+var_D8] mov [rbp+var_110], rax mov rdi, [rbp+var_D8] call _strlen mov rdi, [rbp+var_118] mov rsi, [rbp+var_110] mov rdx, rax call mysql_stmt_prepare mov [rbp+var_E4], eax cmp [rbp+var_E4], 0 jz short loc_28C0D mov rdi, [rbp+var_48] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0B46h mov al, 0 call diag mov [rbp+var_34], 1 jmp loc_28D51 loc_28C0D: jmp short $+2 loc_28C0F: mov rdi, [rbp+var_48] call mysql_stmt_execute mov [rbp+var_E4], eax cmp [rbp+var_E4], 0 jz short loc_28C59 mov rdi, [rbp+var_48] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0B48h mov al, 0 call diag mov [rbp+var_34], 1 jmp loc_28D51 loc_28C59: jmp short $+2 loc_28C5B: lea rdi, [rbp+var_C0] xor esi, esi mov edx, 70h ; 'p' call _memset mov [rbp+var_60], 0FEh lea rax, [rbp+var_30] mov [rbp+var_B0], rax mov [rbp+var_80], 1Eh lea rax, [rbp+var_E0] mov [rbp+var_C0], rax mov rdi, [rbp+var_48] lea rsi, [rbp+var_C0] call mysql_stmt_bind_result mov rdi, [rbp+var_48] call mysql_stmt_fetch mov [rbp+var_E4], eax cmp [rbp+var_E4], 0 jz short loc_28CED mov rdi, [rbp+var_48] call mysql_stmt_error mov rsi, rax lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0B51h mov al, 0 call diag mov [rbp+var_34], 1 jmp short loc_28D51 loc_28CED: jmp short $+2 loc_28CEF: jmp short $+2 loc_28CF1: mov rax, [rbp+var_D0] mov rdi, [rax] lea rsi, [rbp+var_30] call _strcmp cmp eax, 0 jz short loc_28D33 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aRow0Buffer; "row[0] != buffer" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 0B53h mov al, 0 call diag mov [rbp+var_34], 1 jmp short loc_28D51 loc_28D33: jmp short $+2 loc_28D35: mov rdi, [rbp+var_C8] call mysql_free_result mov rdi, [rbp+var_48] call mysql_stmt_close mov [rbp+var_34], 0 loc_28D51: mov eax, [rbp+var_34] mov [rbp+var_11C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_28D7B mov eax, [rbp+var_11C] add rsp, 120h pop rbp retn loc_28D7B: call ___stack_chk_fail
long long test_bug6049(long long a1) { long long v1; // rax int v2; // eax long long v3; // rax int v4; // eax int v5; // r8d int v6; // r9d int v7; // eax int v8; // r8d int v9; // r9d int v10; // eax int v11; // r8d int v12; // r9d int v13; // r8d int v14; // r9d int v16; // [rsp+20h] [rbp-100h] int v17; // [rsp+3Ch] [rbp-E4h] char v18; // [rsp+40h] [rbp-E0h] BYREF const char *v19; // [rsp+48h] [rbp-D8h] _QWORD *row; // [rsp+50h] [rbp-D0h] long long v21; // [rsp+58h] [rbp-C8h] _QWORD v22[12]; // [rsp+60h] [rbp-C0h] BYREF int v23; // [rsp+C0h] [rbp-60h] long long v24; // [rsp+D8h] [rbp-48h] long long v25; // [rsp+E0h] [rbp-40h] _BYTE v27[40]; // [rsp+F0h] [rbp-30h] BYREF unsigned long long v28; // [rsp+118h] [rbp-8h] v28 = __readfsqword(0x28u); v25 = a1; v19 = "SELECT MAKETIME(-25, 12, 12)"; v1 = strlen("SELECT MAKETIME(-25, 12, 12)"); v17 = mysql_real_query(a1, "SELECT MAKETIME(-25, 12, 12)", v1); if ( v17 ) { v16 = mysql_error(v25); v2 = mysql_errno(v25); diag( (unsigned int)"Error (%d): %s (%d) in %s line %d", v17, v16, v2, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2880); return 1; } else { v21 = mysql_store_result(v25); row = (_QWORD *)mysql_fetch_row(v21); v24 = mysql_stmt_init(v25); v3 = strlen(v19); if ( (unsigned int)mysql_stmt_prepare(v24, v19, v3) ) { v4 = mysql_stmt_error(v24); diag( (unsigned int)"Error: %s (%s: %d)", v4, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2886, v5, v6); return 1; } else if ( (unsigned int)mysql_stmt_execute(v24) ) { v7 = mysql_stmt_error(v24); diag( (unsigned int)"Error: %s (%s: %d)", v7, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2888, v8, v9); return 1; } else { memset(v22, 0LL, 112LL); v23 = 254; v22[2] = v27; v22[8] = 30LL; v22[0] = &v18; mysql_stmt_bind_result(v24, v22); if ( (unsigned int)mysql_stmt_fetch(v24) ) { v10 = mysql_stmt_error(v24); diag( (unsigned int)"Error: %s (%s: %d)", v10, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2897, v11, v12); return 1; } else if ( !(unsigned int)strcmp(*row, v27) ) { mysql_free_result(v21); mysql_stmt_close(v24); return 0; } else { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"row[0] != buffer", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 2899, v13, v14); return 1; } } } }
test_bug6049: PUSH RBP MOV RBP,RSP SUB RSP,0x120 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x40],RDI LEA RAX,[0x169ba2] MOV qword ptr [RBP + -0xd8],RAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [RBP + -0xd8] MOV qword ptr [RBP + -0xf0],RAX MOV RDI,qword ptr [RBP + -0xd8] CALL 0x001141a0 MOV RDI,qword ptr [RBP + -0xf8] MOV RSI,qword ptr [RBP + -0xf0] MOV RDX,RAX CALL 0x001377f0 MOV dword ptr [RBP + -0xe4],EAX CMP dword ptr [RBP + -0xe4],0x0 JZ 0x00128b5f MOV EAX,dword ptr [RBP + -0xe4] MOV dword ptr [RBP + -0x104],EAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x0013c3f0 MOV qword ptr [RBP + -0x100],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x0013c3c0 MOV ESI,dword ptr [RBP + -0x104] MOV RDX,qword ptr [RBP + -0x100] MOV ECX,EAX LEA RDI,[0x1656d5] LEA R8,[0x16606d] MOV R9D,0xb40 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00128d51 LAB_00128b5f: JMP 0x00128b61 LAB_00128b61: MOV RDI,qword ptr [RBP + -0x40] CALL 0x0013a0c0 MOV qword ptr [RBP + -0xc8],RAX MOV RDI,qword ptr [RBP + -0xc8] CALL 0x0013a400 MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x00144950 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x118],RAX MOV RAX,qword ptr [RBP + -0xd8] MOV qword ptr [RBP + -0x110],RAX MOV RDI,qword ptr [RBP + -0xd8] CALL 0x001141a0 MOV RDI,qword ptr [RBP + -0x118] MOV RSI,qword ptr [RBP + -0x110] MOV RDX,RAX CALL 0x00145070 MOV dword ptr [RBP + -0xe4],EAX CMP dword ptr [RBP + -0xe4],0x0 JZ 0x00128c0d MOV RDI,qword ptr [RBP + -0x48] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0xb46 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00128d51 LAB_00128c0d: JMP 0x00128c0f LAB_00128c0f: MOV RDI,qword ptr [RBP + -0x48] CALL 0x00146580 MOV dword ptr [RBP + -0xe4],EAX CMP dword ptr [RBP + -0xe4],0x0 JZ 0x00128c59 MOV RDI,qword ptr [RBP + -0x48] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0xb48 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00128d51 LAB_00128c59: JMP 0x00128c5b LAB_00128c5b: LEA RDI,[RBP + -0xc0] XOR ESI,ESI MOV EDX,0x70 CALL 0x00114260 MOV dword ptr [RBP + -0x60],0xfe LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0xb0],RAX MOV qword ptr [RBP + -0x80],0x1e LEA RAX,[RBP + -0xe0] MOV qword ptr [RBP + -0xc0],RAX MOV RDI,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0xc0] CALL 0x00143940 MOV RDI,qword ptr [RBP + -0x48] CALL 0x00144020 MOV dword ptr [RBP + -0xe4],EAX CMP dword ptr [RBP + -0xe4],0x0 JZ 0x00128ced MOV RDI,qword ptr [RBP + -0x48] CALL 0x00143fd0 MOV RSI,RAX LEA RDI,[0x165590] LEA RDX,[0x16606d] MOV ECX,0xb51 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00128d51 LAB_00128ced: JMP 0x00128cef LAB_00128cef: JMP 0x00128cf1 LAB_00128cf1: MOV RAX,qword ptr [RBP + -0xd0] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0x30] CALL 0x00114600 CMP EAX,0x0 JZ 0x00128d33 LEA RDI,[0x165590] LEA RSI,[0x169bbf] LEA RDX,[0x16606d] MOV ECX,0xb53 MOV AL,0x0 CALL 0x0012fc40 MOV dword ptr [RBP + -0x34],0x1 JMP 0x00128d51 LAB_00128d33: JMP 0x00128d35 LAB_00128d35: MOV RDI,qword ptr [RBP + -0xc8] CALL 0x00131900 MOV RDI,qword ptr [RBP + -0x48] CALL 0x00143eb0 MOV dword ptr [RBP + -0x34],0x0 LAB_00128d51: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x11c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00128d7b MOV EAX,dword ptr [RBP + -0x11c] ADD RSP,0x120 POP RBP RET LAB_00128d7b: CALL 0x001144c0
int4 test_bug6049(int8 param_1) { char *pcVar1; int iVar2; int4 uVar3; size_t sVar4; int8 uVar5; long in_FS_OFFSET; int1 local_e8 [8]; char *local_e0; int8 *local_d8; int8 local_d0; int1 *local_c8 [2]; char *local_b8; int8 local_88; int4 local_68; int8 local_50; int8 local_48; int4 local_3c; char local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_e0 = "SELECT MAKETIME(-25, 12, 12)"; local_48 = param_1; sVar4 = strlen("SELECT MAKETIME(-25, 12, 12)"); iVar2 = mysql_real_query(param_1,"SELECT MAKETIME(-25, 12, 12)",sVar4); if (iVar2 == 0) { local_d0 = mysql_store_result(local_48); local_d8 = (int8 *)mysql_fetch_row(local_d0); uVar5 = mysql_stmt_init(local_48); pcVar1 = local_e0; local_50 = uVar5; sVar4 = strlen(local_e0); iVar2 = mysql_stmt_prepare(uVar5,pcVar1,sVar4); if (iVar2 == 0) { iVar2 = mysql_stmt_execute(local_50); if (iVar2 == 0) { memset(local_c8,0,0x70); local_68 = 0xfe; local_b8 = local_38; local_88 = 0x1e; local_c8[0] = local_e8; mysql_stmt_bind_result(local_50,local_c8); iVar2 = mysql_stmt_fetch(local_50); if (iVar2 == 0) { iVar2 = strcmp((char *)*local_d8,local_38); if (iVar2 == 0) { mysql_free_result(local_d0); mysql_stmt_close(local_50); local_3c = 0; } else { diag("Error: %s (%s: %d)","row[0] != buffer", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c" ,0xb53); local_3c = 1; } } else { uVar5 = mysql_stmt_error(local_50); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0xb51); local_3c = 1; } } else { uVar5 = mysql_stmt_error(local_50); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c", 0xb48); local_3c = 1; } } else { uVar5 = mysql_stmt_error(local_50); diag("Error: %s (%s: %d)",uVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xb46 ); local_3c = 1; } } else { uVar5 = mysql_error(local_48); uVar3 = mysql_errno(local_48); diag("Error (%d): %s (%d) in %s line %d",iVar2,uVar5,uVar3, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/ps_bugs.c",0xb40); local_3c = 1; } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_3c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
44,974
js_parseFloat
bluesky950520[P]quickjs/quickjs.c
static JSValue js_parseFloat(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *str; JSValue ret; int flags; size_t len; str = JS_ToCStringLen(ctx, &len, argv[0]); if (!str) return JS_EXCEPTION; flags = ATOD_TRIM_SPACES | ATOD_ACCEPT_FLOAT | ATOD_ACCEPT_INFINITY; ret = js_atof(ctx, str, len, NULL, 10, flags); JS_FreeCString(ctx, str); return ret; }
O2
c
js_parseFloat: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq (%r8), %rdx movq 0x8(%r8), %rcx movq %rsp, %rsi callq 0x36bee testq %rax, %rax je 0x65e22 movq %rax, %r14 movq (%rsp), %rdx pushq $0xa popq %r8 pushq $0xd popq %r9 movq %rbx, %rdi movq %rax, %rsi xorl %ecx, %ecx callq 0x36bf6 movq %rax, %r12 movq %rdx, %r15 movq %rbx, %rdi movq %r14, %rsi callq 0x1b057 jmp 0x65e29 pushq $0x6 popq %r15 xorl %r12d, %r12d movq %r12, %rax movq %r15, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_parseFloat: push r15 push r14 push r12 push rbx push rax mov rbx, rdi mov rdx, [r8] mov rcx, [r8+8] mov rsi, rsp call JS_ToCStringLen_0 test rax, rax jz short loc_65E22 mov r14, rax mov rdx, [rsp+28h+var_28] push 0Ah pop r8 push 0Dh pop r9 mov rdi, rbx mov rsi, rax xor ecx, ecx call js_atof mov r12, rax mov r15, rdx mov rdi, rbx mov rsi, r14 call JS_FreeCString jmp short loc_65E29 loc_65E22: push 6 pop r15 xor r12d, r12d loc_65E29: mov rax, r12 mov rdx, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long js_parseFloat(long long a1, long long a2, long long a3, long long a4, long long *a5) { long long v5; // rax unsigned __int8 *v6; // rax long long v7; // r14 long long v8; // r12 long long v10[5]; // [rsp+0h] [rbp-28h] BYREF v10[0] = v5; v6 = (unsigned __int8 *)JS_ToCStringLen_0(a1, v10, *a5, a5[1]); if ( !v6 ) return 0LL; v7 = (long long)v6; v8 = js_atof(a1, v6, v10[0], 0LL, 0xAu, 13); JS_FreeCString(a1, v7); return v8; }
js_parseFloat: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] MOV RSI,RSP CALL 0x00136bee TEST RAX,RAX JZ 0x00165e22 MOV R14,RAX MOV RDX,qword ptr [RSP] PUSH 0xa POP R8 PUSH 0xd POP R9 MOV RDI,RBX MOV RSI,RAX XOR ECX,ECX CALL 0x00136bf6 MOV R12,RAX MOV R15,RDX MOV RDI,RBX MOV RSI,R14 CALL 0x0011b057 JMP 0x00165e29 LAB_00165e22: PUSH 0x6 POP R15 XOR R12D,R12D LAB_00165e29: MOV RAX,R12 MOV RDX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] js_parseFloat(int8 param_1) { int8 in_RAX; long lVar1; int8 *in_R8; int1 auVar2 [16]; int8 local_28; local_28 = in_RAX; lVar1 = JS_ToCStringLen(param_1,&local_28,*in_R8,in_R8[1]); if (lVar1 == 0) { auVar2 = ZEXT816(6) << 0x40; } else { auVar2 = js_atof(param_1,lVar1,local_28,0,10,0xd); JS_FreeCString(param_1,lVar1); } return auVar2; }
44,975
my_thread_global_init
eloqsql/mysys/my_thr_init.c
my_bool my_thread_global_init(void) { int pth_ret; /* Normally this should never be called twice */ DBUG_ASSERT(my_thread_global_init_done == 0); if (my_thread_global_init_done) return 0; my_thread_global_init_done= 1; /* THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even after my_thread_global_end() is called. my_thr_key_mysys_exist is used to protect against application like QT that calls my_thread_global_init() + my_thread_global_end() multiple times without calling my_init() + my_end(). */ if (!my_thr_key_mysys_exists && (pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0) { fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret); return 1; } my_thr_key_mysys_exists= 1; /* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */ my_thread_init_internal_mutex(); if (my_thread_init()) return 1; my_thread_init_common_mutex(); return 0; }
O0
c
my_thread_global_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp jmp 0x2bb7a cmpb $0x0, 0x35d8cf(%rip) # 0x389450 je 0x2bb89 movb $0x0, -0x1(%rbp) jmp 0x2bbfc movb $0x1, 0x35d8c0(%rip) # 0x389450 leaq 0x35d5f5(%rip), %rax # 0x38918c cmpb $0x0, (%rax) jne 0x2bbd5 leaq 0x35d8b1(%rip), %rdi # 0x389454 xorl %eax, %eax movl %eax, %esi callq 0x24570 movl %eax, -0x8(%rbp) cmpl $0x0, %eax je 0x2bbd5 movq 0x1a5425(%rip), %rax # 0x1d0fe0 movq (%rax), %rdi movl -0x8(%rbp), %edx leaq 0x50cc0(%rip), %rsi # 0x7c888 movb $0x0, %al callq 0x24480 movb $0x1, -0x1(%rbp) jmp 0x2bbfc leaq 0x35d5b0(%rip), %rax # 0x38918c movb $0x1, (%rax) callq 0x2ba70 callq 0x2bc10 cmpb $0x0, %al je 0x2bbf3 movb $0x1, -0x1(%rbp) jmp 0x2bbfc callq 0x2b9a0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_thread_global_init: push rbp mov rbp, rsp sub rsp, 10h jmp short $+2 loc_2BB7A: cmp cs:my_thread_global_init_done, 0 jz short loc_2BB89 mov [rbp+var_1], 0 jmp short loc_2BBFC loc_2BB89: mov cs:my_thread_global_init_done, 1 lea rax, my_thr_key_mysys_exists cmp byte ptr [rax], 0 jnz short loc_2BBD5 lea rdi, THR_KEY_mysys xor eax, eax mov esi, eax call _pthread_key_create mov [rbp+var_8], eax cmp eax, 0 jz short loc_2BBD5 mov rax, cs:stderr_ptr mov rdi, [rax] mov edx, [rbp+var_8] lea rsi, aCanTInitialize; "Can't initialize threads: error %d\n" mov al, 0 call _fprintf mov [rbp+var_1], 1 jmp short loc_2BBFC loc_2BBD5: lea rax, my_thr_key_mysys_exists mov byte ptr [rax], 1 call my_thread_init_internal_mutex call my_thread_init cmp al, 0 jz short loc_2BBF3 mov [rbp+var_1], 1 jmp short loc_2BBFC loc_2BBF3: call my_thread_init_common_mutex mov [rbp+var_1], 0 loc_2BBFC: mov al, [rbp+var_1] add rsp, 10h pop rbp retn
char my_thread_global_init() { int v1; // [rsp+8h] [rbp-8h] if ( my_thread_global_init_done ) return 0; my_thread_global_init_done = 1; if ( my_thr_key_mysys_exists || (v1 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0 ) { my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); if ( (unsigned __int8)my_thread_init() ) { return 1; } else { my_thread_init_common_mutex(); return 0; } } else { fprintf(stderr, "Can't initialize threads: error %d\n", v1); return 1; } }
my_thread_global_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 JMP 0x0012bb7a LAB_0012bb7a: CMP byte ptr [0x00489450],0x0 JZ 0x0012bb89 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012bbfc LAB_0012bb89: MOV byte ptr [0x00489450],0x1 LEA RAX,[0x48918c] CMP byte ptr [RAX],0x0 JNZ 0x0012bbd5 LEA RDI,[0x489454] XOR EAX,EAX MOV ESI,EAX CALL 0x00124570 MOV dword ptr [RBP + -0x8],EAX CMP EAX,0x0 JZ 0x0012bbd5 MOV RAX,qword ptr [0x002d0fe0] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [RBP + -0x8] LEA RSI,[0x17c888] MOV AL,0x0 CALL 0x00124480 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012bbfc LAB_0012bbd5: LEA RAX,[0x48918c] MOV byte ptr [RAX],0x1 CALL 0x0012ba70 CALL 0x0012bc10 CMP AL,0x0 JZ 0x0012bbf3 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012bbfc LAB_0012bbf3: CALL 0x0012b9a0 MOV byte ptr [RBP + -0x1],0x0 LAB_0012bbfc: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x10 POP RBP RET
int1 my_thread_global_init(void) { char cVar1; uint uVar2; int1 local_9; if (my_thread_global_init_done == '\0') { my_thread_global_init_done = '\x01'; if ((my_thr_key_mysys_exists == '\0') && (uVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), uVar2 != 0)) { fprintf(*(FILE **)PTR_stderr_002d0fe0,"Can\'t initialize threads: error %d\n",(ulong)uVar2); return 1; } my_thr_key_mysys_exists = '\x01'; my_thread_init_internal_mutex(); cVar1 = my_thread_init(); if (cVar1 == '\0') { my_thread_init_common_mutex(); local_9 = 0; } else { local_9 = 1; } } else { local_9 = 0; } return local_9; }
44,976
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
hkr04[P]cpp-mcp/common/json.hpp
inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, diyfp M_minus, diyfp w, diyfp M_plus) { static_assert(kAlpha >= -60, "internal error"); static_assert(kGamma <= -32, "internal error"); // Generates the digits (and the exponent) of a decimal floating-point // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma. // // <--------------------------- delta ----> // <---- dist ---------> // --------------[------------------+-------------------]-------------- // M- w M+ // // Grisu2 generates the digits of M+ from left to right and stops as soon as // V is in [M-,M+]. JSON_ASSERT(M_plus.e >= kAlpha); JSON_ASSERT(M_plus.e <= kGamma); std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e) std::uint64_t dist = diyfp::sub(M_plus, w ).f; // (significand of (M+ - w ), implicit exponent is e) // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0): // // M+ = f * 2^e // = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e // = ((p1 ) * 2^-e + (p2 )) * 2^e // = p1 + p2 * 2^e const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.) std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e // 1) // // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0] JSON_ASSERT(p1 > 0); std::uint32_t pow10{}; const int k = find_largest_pow10(p1, pow10); // 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1) // // p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1)) // = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1)) // // M+ = p1 + p2 * 2^e // = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e // = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e // = d[k-1] * 10^(k-1) + ( rest) * 2^e // // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0) // // p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0] // // but stop as soon as // // rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e int n = k; while (n > 0) { // Invariants: // M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k) // pow10 = 10^(n-1) <= p1 < 10^n // const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1) const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1) // // M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e) // JSON_ASSERT(d <= 9); buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d // // M+ = buffer * 10^(n-1) + (r + p2 * 2^e) // p1 = r; n--; // // M+ = buffer * 10^n + (p1 + p2 * 2^e) // pow10 = 10^n // // Now check if enough digits have been generated. // Compute // // p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e // // Note: // Since rest and delta share the same exponent e, it suffices to // compare the significands. const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; if (rest <= delta) { // V = buffer * 10^n, with M- <= V <= M+. decimal_exponent += n; // We may now just stop. But instead look if the buffer could be // decremented to bring V closer to w. // // pow10 = 10^n is now 1 ulp in the decimal representation V. // The rounding procedure works with diyfp's with an implicit // exponent of e. // // 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e // const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; grisu2_round(buffer, length, dist, delta, rest, ten_n); return; } pow10 /= 10; // // pow10 = 10^(n-1) <= p1 < 10^n // Invariants restored. } // 2) // // The digits of the integral part have been generated: // // M+ = d[k-1]...d[1]d[0] + p2 * 2^e // = buffer + p2 * 2^e // // Now generate the digits of the fractional part p2 * 2^e. // // Note: // No decimal point is generated: the exponent is adjusted instead. // // p2 actually represents the fraction // // p2 * 2^e // = p2 / 2^-e // = d[-1] / 10^1 + d[-2] / 10^2 + ... // // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...) // // p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m // + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...) // // using // // 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e) // = ( d) * 2^-e + ( r) // // or // 10^m * p2 * 2^e = d + r * 2^e // // i.e. // // M+ = buffer + p2 * 2^e // = buffer + 10^-m * (d + r * 2^e) // = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e // // and stop as soon as 10^-m * r * 2^e <= delta * 2^e JSON_ASSERT(p2 > delta); int m = 0; for (;;) { // Invariant: // M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e // = buffer * 10^-m + 10^-m * (p2 ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e // JSON_ASSERT(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10); p2 *= 10; const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e // // M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e)) // = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e // JSON_ASSERT(d <= 9); buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d // // M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e // p2 = r; m++; // // M+ = buffer * 10^-m + 10^-m * p2 * 2^e // Invariant restored. // Check if enough digits have been generated. // // 10^-m * p2 * 2^e <= delta * 2^e // p2 * 2^e <= 10^m * delta * 2^e // p2 <= 10^m * delta delta *= 10; dist *= 10; if (p2 <= delta) { break; } } // V = buffer * 10^-m, with M- <= V <= M+. decimal_exponent -= m; // 1 ulp in the decimal representation is now 10^-m. // Since delta and dist are now scaled by 10^m, we need to do the // same with ulp in order to keep the units in sync. // // 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e // const std::uint64_t ten_m = one.f; grisu2_round(buffer, length, dist, delta, p2, ten_m); // By construction this algorithm generates the shortest possible decimal // number (Loitsch, Theorem 6.2) which rounds back to w. // For an input number of precision p, at least // // N = 1 + ceil(p * log_10(2)) // // decimal digits are sufficient to identify all binary floating-point // numbers (Matula, "In-and-Out conversions"). // This implies that the algorithm does not produce more than N decimal // digits. // // N = 17 for p = 53 (IEEE double precision) // N = 9 for p = 24 (IEEE single precision) }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rcx, %r10 movq %rdx, -0x18(%rsp) movq 0x48(%rsp), %rax xorl %ecx, %ecx subl 0x50(%rsp), %ecx movl $0x1, %r11d shlq %cl, %r11 movq %rax, %r8 shrq %cl, %rax movq 0x38(%rsp), %r13 leaq -0x1(%r11), %rdx cmpl $0x3b9ac9ff, %eax # imm = 0x3B9AC9FF movq %rdx, -0x20(%rsp) jbe 0xf09e movl $0xa, %r12d movl $0x3b9aca00, -0x3c(%rsp) # imm = 0x3B9ACA00 jmp 0xf15a cmpl $0x5f5e0ff, %eax # imm = 0x5F5E0FF jbe 0xf0b8 movl $0x9, %r12d movl $0x5f5e100, -0x3c(%rsp) # imm = 0x5F5E100 jmp 0xf15a cmpl $0x98967f, %eax # imm = 0x98967F jbe 0xf0d2 movl $0x8, %r12d movl $0x989680, -0x3c(%rsp) # imm = 0x989680 jmp 0xf15a cmpl $0xf423f, %eax # imm = 0xF423F jbe 0xf0e9 movl $0x7, %r12d movl $0xf4240, -0x3c(%rsp) # imm = 0xF4240 jmp 0xf15a cmpl $0x1869f, %eax # imm = 0x1869F jbe 0xf100 movl $0x6, %r12d movl $0x186a0, -0x3c(%rsp) # imm = 0x186A0 jmp 0xf15a cmpl $0x270f, %eax # imm = 0x270F jbe 0xf117 movl $0x5, %r12d movl $0x2710, -0x3c(%rsp) # imm = 0x2710 jmp 0xf15a cmpl $0x3e7, %eax # imm = 0x3E7 jbe 0xf12e movl $0x4, %r12d movl $0x3e8, -0x3c(%rsp) # imm = 0x3E8 jmp 0xf15a cmpl $0x63, %eax jbe 0xf143 movl $0x3, %r12d movl $0x64, -0x3c(%rsp) jmp 0xf15a xorl %r12d, %r12d cmpl $0xa, %eax setae %r12b leal (%r12,%r12,8), %edx incl %edx movl %edx, -0x3c(%rsp) incl %r12d movq %r8, %rbp subq %r10, %rbp movq %r8, %r14 subq %r13, %r14 movq -0x20(%rsp), %r15 andq %r8, %r15 movq %r8, %rdx subq %r13, %rdx movq %rdx, -0x10(%rsp) subq %r8, %r13 subq %r10, %r8 movq %r8, -0x8(%rsp) movq %r11, -0x30(%rsp) movq %rsi, -0x38(%rsp) testl %r12d, %r12d jle 0xf254 xorl %edx, %edx movl -0x3c(%rsp), %ebx divl %ebx addb $0x30, %al movslq (%rsi), %r8 leal 0x1(%r8), %r9d movl %r9d, (%rsi) movb %al, (%rdi,%r8) decl %r12d movl %edx, %eax movq %rax, %rdx shlq %cl, %rdx addq %r15, %rdx movq %rbp, %r10 movl %ebx, %r8d subq %rdx, %r10 jae 0xf1dd movl $0xcccccccd, %r9d # imm = 0xCCCCCCCD imulq %r9, %r8 shrq $0x23, %r8 movl %r8d, -0x3c(%rsp) jmp 0xf246 movq -0x18(%rsp), %r9 addl %r12d, (%r9) shlq %cl, %r8 cmpq %r14, %rdx jae 0xf246 cmpq %r8, %r10 jb 0xf246 movq %r12, -0x28(%rsp) movslq (%rsi), %rbx movq -0x10(%rsp), %r10 subq %rdx, %r10 leaq (%rdx,%r8), %r11 movq -0x8(%rsp), %r12 subq %r11, %r12 cmpq %r14, %r11 jb 0xf21c leaq (%r11,%r13), %r9 cmpq %r9, %r10 jbe 0xf237 decb -0x1(%rdi,%rbx) subq %r8, %r12 setb %r9b cmpq %r14, %r11 jae 0xf237 subq %r8, %r10 addq %r8, %r11 testb %r9b, %r9b je 0xf20e movq -0x30(%rsp), %r11 movq -0x38(%rsp), %rsi movq -0x28(%rsp), %r12 cmpq %rdx, %rbp jb 0xf18e jmp 0xf2ee xorl %eax, %eax movq -0x20(%rsp), %r10 addq %r15, %r15 leaq (%r15,%r15,4), %r15 movq %r15, %rdx shrq %cl, %rdx andq %r10, %r15 addb $0x30, %dl movslq (%rsi), %r8 leal 0x1(%r8), %r9d movl %r9d, (%rsi) movb %dl, (%rdi,%r8) movq %rbp, %r8 addq %rbp, %r8 leaq (%r8,%r8,4), %rbp movq %r14, %rdx addq %r14, %rdx leaq (%rdx,%rdx,4), %r14 decl %eax movq %rbp, %r9 subq %r15, %r9 jb 0xf25b movq -0x18(%rsp), %rcx addl %eax, (%rcx) cmpq %r14, %r15 jae 0xf2ee cmpq %r11, %r9 jb 0xf2ee movslq (%rsi), %rax leaq (%rdx,%rdx,4), %rcx movq %rcx, %rdx subq %r15, %rdx leaq (%r8,%r8,4), %rsi addq %r11, %r15 subq %r15, %rsi negq %rcx cmpq %r14, %r15 jb 0xf2d3 leaq (%rcx,%r15), %r8 cmpq %r8, %rdx jbe 0xf2ee decb -0x1(%rdi,%rax) subq %r11, %rsi setb %r8b cmpq %r14, %r15 jae 0xf2ee subq %r11, %rdx addq %r11, %r15 testb %r8b, %r8b je 0xf2c5 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx mov r10, rcx mov [rsp+30h+var_48], rdx mov rax, [rsp+30h+arg_10] xor ecx, ecx sub ecx, [rsp+30h+arg_18] mov r11d, 1 shl r11, cl mov r8, rax shr rax, cl mov r13, [rsp+30h+arg_0] lea rdx, [r11-1] cmp eax, 3B9AC9FFh mov [rsp+30h+var_50], rdx jbe short loc_F09E mov r12d, 0Ah mov [rsp+30h+var_6C], 3B9ACA00h jmp loc_F15A loc_F09E: cmp eax, 5F5E0FFh jbe short loc_F0B8 mov r12d, 9 mov [rsp+30h+var_6C], 5F5E100h jmp loc_F15A loc_F0B8: cmp eax, 98967Fh jbe short loc_F0D2 mov r12d, 8 mov [rsp+30h+var_6C], 989680h jmp loc_F15A loc_F0D2: cmp eax, 0F423Fh jbe short loc_F0E9 mov r12d, 7 mov [rsp+30h+var_6C], 0F4240h jmp short loc_F15A loc_F0E9: cmp eax, offset locret_1869F jbe short loc_F100 mov r12d, 6 mov [rsp+30h+var_6C], offset _ZNSt14_Function_base13_Base_managerIN7httplib6detail22ContentProviderAdapterEE10_M_destroyERSt9_Any_dataSt17integral_constantIbLb0EE; std::_Function_base::_Base_manager<httplib::detail::ContentProviderAdapter>::_M_destroy(std::_Any_data &,std::integral_constant<bool,false>) jmp short loc_F15A loc_F100: cmp eax, 270Fh jbe short loc_F117 mov r12d, 5 mov [rsp+30h+var_6C], 2710h jmp short loc_F15A loc_F117: cmp eax, 3E7h jbe short loc_F12E mov r12d, 4 mov [rsp+30h+var_6C], 3E8h jmp short loc_F15A loc_F12E: cmp eax, 63h ; 'c' jbe short loc_F143 mov r12d, 3 mov [rsp+30h+var_6C], 64h ; 'd' jmp short loc_F15A loc_F143: xor r12d, r12d cmp eax, 0Ah setnb r12b lea edx, [r12+r12*8] inc edx mov [rsp+30h+var_6C], edx inc r12d loc_F15A: mov rbp, r8 sub rbp, r10 mov r14, r8 sub r14, r13 mov r15, [rsp+30h+var_50] and r15, r8 mov rdx, r8 sub rdx, r13 mov [rsp+30h+var_40], rdx sub r13, r8 sub r8, r10 mov [rsp+30h+var_38], r8 mov [rsp+30h+var_60], r11 mov [rsp+30h+var_68], rsi loc_F18E: test r12d, r12d jle loc_F254 xor edx, edx mov ebx, [rsp+30h+var_6C] div ebx add al, 30h ; '0' movsxd r8, dword ptr [rsi] lea r9d, [r8+1] mov [rsi], r9d mov [rdi+r8], al dec r12d mov eax, edx mov rdx, rax shl rdx, cl add rdx, r15 mov r10, rbp mov r8d, ebx sub r10, rdx jnb short loc_F1DD mov r9d, 0CCCCCCCDh imul r8, r9 shr r8, 23h mov [rsp+30h+var_6C], r8d jmp short loc_F246 loc_F1DD: mov r9, [rsp+30h+var_48] add [r9], r12d shl r8, cl cmp rdx, r14 jnb short loc_F246 cmp r10, r8 jb short loc_F246 mov [rsp+30h+var_58], r12 movsxd rbx, dword ptr [rsi] mov r10, [rsp+30h+var_40] sub r10, rdx lea r11, [rdx+r8] mov r12, [rsp+30h+var_38] sub r12, r11 loc_F20E: cmp r11, r14 jb short loc_F21C lea r9, [r11+r13] cmp r10, r9 jbe short loc_F237 loc_F21C: dec byte ptr [rdi+rbx-1] sub r12, r8 setb r9b cmp r11, r14 jnb short loc_F237 sub r10, r8 add r11, r8 test r9b, r9b jz short loc_F20E loc_F237: mov r11, [rsp+30h+var_60] mov rsi, [rsp+30h+var_68] mov r12, [rsp+30h+var_58] loc_F246: cmp rbp, rdx jb loc_F18E jmp loc_F2EE loc_F254: xor eax, eax mov r10, [rsp+30h+var_50] loc_F25B: add r15, r15 lea r15, [r15+r15*4] mov rdx, r15 shr rdx, cl and r15, r10 add dl, 30h ; '0' movsxd r8, dword ptr [rsi] lea r9d, [r8+1] mov [rsi], r9d mov [rdi+r8], dl mov r8, rbp add r8, rbp lea rbp, [r8+r8*4] mov rdx, r14 add rdx, r14 lea r14, [rdx+rdx*4] dec eax mov r9, rbp sub r9, r15 jb short loc_F25B mov rcx, [rsp+30h+var_48] add [rcx], eax cmp r15, r14 jnb short loc_F2EE cmp r9, r11 jb short loc_F2EE movsxd rax, dword ptr [rsi] lea rcx, [rdx+rdx*4] mov rdx, rcx sub rdx, r15 lea rsi, [r8+r8*4] add r15, r11 sub rsi, r15 neg rcx loc_F2C5: cmp r15, r14 jb short loc_F2D3 lea r8, [rcx+r15] cmp rdx, r8 jbe short loc_F2EE loc_F2D3: dec byte ptr [rdi+rax-1] sub rsi, r11 setb r8b cmp r15, r14 jnb short loc_F2EE sub rdx, r11 add r15, r11 test r8b, r8b jz short loc_F2C5 loc_F2EE: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen( long long a1, int *a2, _DWORD *a3, long long a4, long long a5, long long a6, long long a7, int a8, unsigned long long a9, int a10) { int v11; // ecx unsigned long long v12; // r11 unsigned long long result; // rax int v14; // r12d BOOL v15; // r12d unsigned long long v16; // rbp unsigned long long v17; // r14 unsigned long long v18; // r15 long long v19; // r8 unsigned long long v20; // rdx unsigned long long v21; // r8 long long v22; // rbx unsigned long long v23; // r10 unsigned long long v24; // r11 unsigned long long v25; // r12 bool v26; // cf unsigned long long v27; // r15 unsigned long long v28; // rdx long long v29; // r8 long long v30; // r8 long long v31; // rdx long long v32; // rcx unsigned long long v33; // rdx unsigned long long v34; // r15 unsigned long long v35; // rsi long long v36; // rcx bool v37; // cf unsigned int v38; // [rsp+0h] [rbp-6Ch] int *v39; // [rsp+4h] [rbp-68h] int v40; // [rsp+14h] [rbp-58h] unsigned long long v41; // [rsp+1Ch] [rbp-50h] long long v43; // [rsp+34h] [rbp-38h] v11 = -a10; v12 = 1LL << -(char)a10; result = a9 >> -(char)a10; v41 = v12 - 1; if ( (unsigned int)result <= 0x3B9AC9FF ) { if ( (unsigned int)result <= 0x5F5E0FF ) { if ( (unsigned int)result <= 0x98967F ) { if ( (unsigned int)result <= 0xF423F ) { if ( (unsigned int)result <= (unsigned int)&locret_1869F ) { if ( (unsigned int)result <= 0x270F ) { if ( (unsigned int)result <= 0x3E7 ) { if ( (unsigned int)result <= 0x63 ) { v15 = (unsigned int)result >= 0xA; v38 = 9 * v15 + 1; v14 = v15 + 1; } else { v14 = 3; v38 = 100; } } else { v14 = 4; v38 = 1000; } } else { v14 = 5; v38 = 10000; } } else { v14 = 6; v38 = (unsigned int)std::_Function_base::_Base_manager<httplib::detail::ContentProviderAdapter>::_M_destroy; } } else { v14 = 7; v38 = 1000000; } } else { v14 = 8; v38 = 10000000; } } else { v14 = 9; v38 = 100000000; } } else { v14 = 10; v38 = 1000000000; } v16 = a9 - a4; v17 = a9 - a7; v18 = a9 & v41; v43 = a9 - a4; v39 = a2; while ( v14 > 0 ) { v19 = *a2; *a2 = v19 + 1; *(_BYTE *)(a1 + v19) = (unsigned int)result / v38 + 48; --v14; result = (unsigned int)result % v38; v20 = v18 + (result << v11); if ( v16 >= v20 ) { *a3 += v14; v21 = (unsigned long long)v38 << v11; if ( v20 < v17 && v16 - v20 >= v21 ) { v40 = v14; v22 = *a2; v23 = a9 - a7 - v20; v24 = v20 + v21; v25 = v43 - (v20 + v21); do { if ( v24 >= v17 && v23 <= v24 + a7 - a9 ) break; --*(_BYTE *)(a1 + v22 - 1); v26 = v25 < v21; v25 -= v21; if ( v24 >= v17 ) break; v23 -= v21; v24 += v21; } while ( !v26 ); v12 = 1LL << -(char)a10; a2 = v39; v14 = v40; } } else { v38 /= 0xAu; } if ( v16 >= v20 ) return result; } LODWORD(result) = 0; do { v27 = 10 * v18; v28 = v27 >> v11; v18 = v41 & v27; v29 = *a2; *a2 = v29 + 1; *(_BYTE *)(a1 + v29) = v28 + 48; v30 = 2 * v16; v16 *= 10LL; v31 = 2 * v17; v17 *= 10LL; result = (unsigned int)(result - 1); } while ( v16 < v18 ); *a3 += result; if ( v18 < v17 && v16 - v18 >= v12 ) { result = *a2; v32 = 5 * v31; v33 = 5 * v31 - v18; v34 = v12 + v18; v35 = 5 * v30 - v34; v36 = -v32; do { if ( v34 >= v17 && v33 <= v36 + v34 ) break; --*(_BYTE *)(a1 + result - 1); v37 = v35 < v12; v35 -= v12; if ( v34 >= v17 ) break; v33 -= v12; v34 += v12; } while ( !v37 ); } return result; }
grisu2_digit_gen: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R10,RCX MOV qword ptr [RSP + -0x18],RDX MOV RAX,qword ptr [RSP + 0x48] XOR ECX,ECX SUB ECX,dword ptr [RSP + 0x50] MOV R11D,0x1 SHL R11,CL MOV R8,RAX SHR RAX,CL MOV R13,qword ptr [RSP + 0x38] LEA RDX,[R11 + -0x1] CMP EAX,0x3b9ac9ff MOV qword ptr [RSP + -0x20],RDX JBE 0x0010f09e MOV R12D,0xa MOV dword ptr [RSP + -0x3c],0x3b9aca00 JMP 0x0010f15a LAB_0010f09e: CMP EAX,0x5f5e0ff JBE 0x0010f0b8 MOV R12D,0x9 MOV dword ptr [RSP + -0x3c],0x5f5e100 JMP 0x0010f15a LAB_0010f0b8: CMP EAX,0x98967f JBE 0x0010f0d2 MOV R12D,0x8 MOV dword ptr [RSP + -0x3c],0x989680 JMP 0x0010f15a LAB_0010f0d2: CMP EAX,0xf423f JBE 0x0010f0e9 MOV R12D,0x7 MOV dword ptr [RSP + -0x3c],0xf4240 JMP 0x0010f15a LAB_0010f0e9: CMP EAX,0x1869f JBE 0x0010f100 MOV R12D,0x6 MOV dword ptr [RSP + -0x3c],0x186a0 JMP 0x0010f15a LAB_0010f100: CMP EAX,0x270f JBE 0x0010f117 MOV R12D,0x5 MOV dword ptr [RSP + -0x3c],0x2710 JMP 0x0010f15a LAB_0010f117: CMP EAX,0x3e7 JBE 0x0010f12e MOV R12D,0x4 MOV dword ptr [RSP + -0x3c],0x3e8 JMP 0x0010f15a LAB_0010f12e: CMP EAX,0x63 JBE 0x0010f143 MOV R12D,0x3 MOV dword ptr [RSP + -0x3c],0x64 JMP 0x0010f15a LAB_0010f143: XOR R12D,R12D CMP EAX,0xa SETNC R12B LEA EDX,[R12 + R12*0x8] INC EDX MOV dword ptr [RSP + -0x3c],EDX INC R12D LAB_0010f15a: MOV RBP,R8 SUB RBP,R10 MOV R14,R8 SUB R14,R13 MOV R15,qword ptr [RSP + -0x20] AND R15,R8 MOV RDX,R8 SUB RDX,R13 MOV qword ptr [RSP + -0x10],RDX SUB R13,R8 SUB R8,R10 MOV qword ptr [RSP + -0x8],R8 MOV qword ptr [RSP + -0x30],R11 MOV qword ptr [RSP + -0x38],RSI LAB_0010f18e: TEST R12D,R12D JLE 0x0010f254 XOR EDX,EDX MOV EBX,dword ptr [RSP + -0x3c] DIV EBX ADD AL,0x30 MOVSXD R8,dword ptr [RSI] LEA R9D,[R8 + 0x1] MOV dword ptr [RSI],R9D MOV byte ptr [RDI + R8*0x1],AL DEC R12D MOV EAX,EDX MOV RDX,RAX SHL RDX,CL ADD RDX,R15 MOV R10,RBP MOV R8D,EBX SUB R10,RDX JNC 0x0010f1dd MOV R9D,0xcccccccd IMUL R8,R9 SHR R8,0x23 MOV dword ptr [RSP + -0x3c],R8D JMP 0x0010f246 LAB_0010f1dd: MOV R9,qword ptr [RSP + -0x18] ADD dword ptr [R9],R12D SHL R8,CL CMP RDX,R14 JNC 0x0010f246 CMP R10,R8 JC 0x0010f246 MOV qword ptr [RSP + -0x28],R12 MOVSXD RBX,dword ptr [RSI] MOV R10,qword ptr [RSP + -0x10] SUB R10,RDX LEA R11,[RDX + R8*0x1] MOV R12,qword ptr [RSP + -0x8] SUB R12,R11 LAB_0010f20e: CMP R11,R14 JC 0x0010f21c LEA R9,[R11 + R13*0x1] CMP R10,R9 JBE 0x0010f237 LAB_0010f21c: DEC byte ptr [RDI + RBX*0x1 + -0x1] SUB R12,R8 SETC R9B CMP R11,R14 JNC 0x0010f237 SUB R10,R8 ADD R11,R8 TEST R9B,R9B JZ 0x0010f20e LAB_0010f237: MOV R11,qword ptr [RSP + -0x30] MOV RSI,qword ptr [RSP + -0x38] MOV R12,qword ptr [RSP + -0x28] LAB_0010f246: CMP RBP,RDX JC 0x0010f18e JMP 0x0010f2ee LAB_0010f254: XOR EAX,EAX MOV R10,qword ptr [RSP + -0x20] LAB_0010f25b: ADD R15,R15 LEA R15,[R15 + R15*0x4] MOV RDX,R15 SHR RDX,CL AND R15,R10 ADD DL,0x30 MOVSXD R8,dword ptr [RSI] LEA R9D,[R8 + 0x1] MOV dword ptr [RSI],R9D MOV byte ptr [RDI + R8*0x1],DL MOV R8,RBP ADD R8,RBP LEA RBP,[R8 + R8*0x4] MOV RDX,R14 ADD RDX,R14 LEA R14,[RDX + RDX*0x4] DEC EAX MOV R9,RBP SUB R9,R15 JC 0x0010f25b MOV RCX,qword ptr [RSP + -0x18] ADD dword ptr [RCX],EAX CMP R15,R14 JNC 0x0010f2ee CMP R9,R11 JC 0x0010f2ee MOVSXD RAX,dword ptr [RSI] LEA RCX,[RDX + RDX*0x4] MOV RDX,RCX SUB RDX,R15 LEA RSI,[R8 + R8*0x4] ADD R15,R11 SUB RSI,R15 NEG RCX LAB_0010f2c5: CMP R15,R14 JC 0x0010f2d3 LEA R8,[RCX + R15*0x1] CMP RDX,R8 JBE 0x0010f2ee LAB_0010f2d3: DEC byte ptr [RDI + RAX*0x1 + -0x1] SUB RSI,R11 SETC R8B CMP R15,R14 JNC 0x0010f2ee SUB RDX,R11 ADD R15,R11 TEST R8B,R8B JZ 0x0010f2c5 LAB_0010f2ee: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen (long param_1,int *param_2,int *param_3,long param_4,int8 param_5, int8 param_6,long param_7,int8 param_8,ulong param_9,char param_10) { char *pcVar1; int iVar2; byte bVar3; uint uVar4; ulong uVar5; ulong uVar6; ulong uVar7; ulong uVar8; ulong uVar9; ulong uVar10; ulong uVar11; int iVar12; ulong uVar13; ulong uVar14; ulong uVar15; bool bVar16; uint local_6c; bVar3 = -param_10; uVar10 = 1L << (bVar3 & 0x3f); uVar5 = param_9 >> (bVar3 & 0x3f); uVar4 = (uint)uVar5; if (uVar4 < 1000000000) { if (uVar4 < 100000000) { if (uVar4 < 10000000) { if (uVar4 < 1000000) { if (uVar4 < 100000) { if (uVar4 < 10000) { if (uVar4 < 1000) { if (uVar4 < 100) { local_6c = (uint)(9 < uVar4) * 9 + 1; iVar12 = (9 < uVar4) + 1; } else { iVar12 = 3; local_6c = 100; } } else { iVar12 = 4; local_6c = 1000; } } else { iVar12 = 5; local_6c = 10000; } } else { iVar12 = 6; local_6c = 100000; } } else { iVar12 = 7; local_6c = 1000000; } } else { iVar12 = 8; local_6c = 10000000; } } else { iVar12 = 9; local_6c = 100000000; } } else { iVar12 = 10; local_6c = 1000000000; } uVar7 = param_9 - param_4; uVar14 = param_9 - param_7; uVar15 = uVar10 - 1 & param_9; do { if (iVar12 < 1) { iVar12 = 0; do { uVar8 = uVar14; uVar6 = uVar7; uVar5 = uVar15 * 10; uVar15 = uVar5 & uVar10 - 1; iVar2 = *param_2; *param_2 = iVar2 + 1; *(char *)(param_1 + iVar2) = (char)(uVar5 >> (bVar3 & 0x3f)) + '0'; uVar7 = uVar6 * 10; uVar14 = uVar8 * 10; iVar12 = iVar12 + -1; } while (uVar7 < uVar15); *param_3 = *param_3 + iVar12; if ((uVar15 < uVar14) && (uVar10 <= uVar7 - uVar15)) { iVar12 = *param_2; uVar5 = uVar8 * 10 - uVar15; uVar15 = uVar15 + uVar10; uVar7 = uVar6 * 10 - uVar15; do { if ((uVar14 <= uVar15) && (uVar5 <= uVar8 * -10 + uVar15)) { return; } pcVar1 = (char *)(param_1 + -1 + (long)iVar12); *pcVar1 = *pcVar1 + -1; bVar16 = uVar10 <= uVar7; uVar7 = uVar7 - uVar10; if (uVar14 <= uVar15) { return; } uVar5 = uVar5 - uVar10; uVar15 = uVar15 + uVar10; } while (bVar16); } return; } uVar6 = uVar5 & 0xffffffff; uVar5 = uVar6 % (ulong)local_6c; iVar2 = *param_2; *param_2 = iVar2 + 1; *(char *)(param_1 + iVar2) = (char)(uVar6 / local_6c) + '0'; iVar12 = iVar12 + -1; uVar6 = (uVar5 << (bVar3 & 0x3f)) + uVar15; if (uVar7 < uVar6) { local_6c = local_6c / 10; } else { *param_3 = *param_3 + iVar12; uVar8 = (ulong)local_6c << (bVar3 & 0x3f); if ((uVar6 < uVar14) && (uVar8 <= uVar7 - uVar6)) { iVar2 = *param_2; uVar9 = (param_9 - param_7) - uVar6; uVar11 = uVar6 + uVar8; uVar13 = (param_9 - param_4) - uVar11; do { if ((uVar14 <= uVar11) && (uVar9 <= uVar11 + (param_7 - param_9))) break; pcVar1 = (char *)(param_1 + -1 + (long)iVar2); *pcVar1 = *pcVar1 + -1; bVar16 = uVar8 <= uVar13; uVar13 = uVar13 - uVar8; if (uVar14 <= uVar11) break; uVar9 = uVar9 - uVar8; uVar11 = uVar11 + uVar8; } while (bVar16); } } if (uVar6 <= uVar7) { return; } } while( true ); }
44,977
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_comment()
llama.cpp/common/json.hpp
bool scan_comment() { switch (get()) { // single-line comments skip input until a newline or EOF is read case '/': { while (true) { switch (get()) { case '\n': case '\r': case char_traits<char_type>::eof(): case '\0': return true; default: break; } } } // multi-line comments skip input until */ is read case '*': { while (true) { switch (get()) { case char_traits<char_type>::eof(): case '\0': { error_message = "invalid comment; missing closing '*/'"; return false; } case '*': { switch (get()) { case '/': return true; default: { unget(); continue; } } } default: continue; } } } // unexpected character after reading '/' default: { error_message = "invalid comment; expecting '/' or '*' after '/'"; return false; } } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_comment(): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx callq 0x2154c cmpl $0x2f, %eax je 0x7379d cmpl $0x2a, %eax jne 0x737ba movq %rbx, %rdi callq 0x2154c leal 0x1(%rax), %ecx cmpl $0x2, %ecx jb 0x737c3 cmpl $0x2a, %eax jne 0x73771 movq %rbx, %rdi callq 0x2154c cmpl $0x2f, %eax je 0x737b6 movq %rbx, %rdi callq 0x7402c jmp 0x73771 movl $0x4803, %ebp # imm = 0x4803 movq %rbx, %rdi callq 0x2154c incl %eax cmpl $0xf, %eax jae 0x737a2 btl %eax, %ebp jae 0x737a2 movb $0x1, %al jmp 0x737d0 leaq 0xa515e(%rip), %rax # 0x11891f jmp 0x737ca leaq 0xa512f(%rip), %rax # 0x1188f9 movq %rax, 0x70(%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE12scan_commentEv: push rbp push rbx push rax mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) cmp eax, 2Fh ; '/' jz short loc_7379D cmp eax, 2Ah ; '*' jnz short loc_737BA loc_73771: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) lea ecx, [rax+1] cmp ecx, 2 jb short loc_737C3 cmp eax, 2Ah ; '*' jnz short loc_73771 mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) cmp eax, 2Fh ; '/' jz short loc_737B6 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget(void) jmp short loc_73771 loc_7379D: mov ebp, 4803h loc_737A2: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) inc eax cmp eax, 0Fh jnb short loc_737A2 bt ebp, eax jnb short loc_737A2 loc_737B6: mov al, 1 jmp short loc_737D0 loc_737BA: lea rax, aInvalidComment; "invalid comment; expecting '/' or '*' a"... jmp short loc_737CA loc_737C3: lea rax, aInvalidComment_0; "invalid comment; missing closing '*/'" loc_737CA: mov [rbx+70h], rax xor eax, eax loc_737D0: add rsp, 8 pop rbx pop rbp retn
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_comment( __m128i *this) { int v1; // eax int v2; // eax int v3; // ebp unsigned int v4; // eax const char *v6; // rax v1 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); if ( v1 == 47 ) { v3 = 18435; do { do v4 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) + 1; while ( v4 >= 0xF ); } while ( !_bittest(&v3, v4) ); return 1; } else { if ( v1 == 42 ) { while ( 1 ) { v2 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); if ( (unsigned int)(v2 + 1) < 2 ) break; if ( v2 == 42 ) { if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) == 47 ) return 1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget(this); } } v6 = "invalid comment; missing closing '*/'"; } else { v6 = "invalid comment; expecting '/' or '*' after '/'"; } this[7].m128i_i64[0] = (long long)v6; return 0; } }
scan_comment: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0012154c CMP EAX,0x2f JZ 0x0017379d CMP EAX,0x2a JNZ 0x001737ba LAB_00173771: MOV RDI,RBX CALL 0x0012154c LEA ECX,[RAX + 0x1] CMP ECX,0x2 JC 0x001737c3 CMP EAX,0x2a JNZ 0x00173771 MOV RDI,RBX CALL 0x0012154c CMP EAX,0x2f JZ 0x001737b6 MOV RDI,RBX CALL 0x0017402c JMP 0x00173771 LAB_0017379d: MOV EBP,0x4803 LAB_001737a2: MOV RDI,RBX CALL 0x0012154c INC EAX CMP EAX,0xf JNC 0x001737a2 BT EBP,EAX JNC 0x001737a2 LAB_001737b6: MOV AL,0x1 JMP 0x001737d0 LAB_001737ba: LEA RAX,[0x21891f] JMP 0x001737ca LAB_001737c3: LEA RAX,[0x2188f9] LAB_001737ca: MOV qword ptr [RBX + 0x70],RAX XOR EAX,EAX LAB_001737d0: ADD RSP,0x8 POP RBX POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_comment() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::scan_comment(lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *this) { int iVar1; int8 uVar2; char *pcVar3; iVar1 = get(this); if (iVar1 == 0x2f) { do { do { iVar1 = get(this); } while (0xe < iVar1 + 1U); } while ((0x4803U >> (iVar1 + 1U & 0x1f) & 1) == 0); LAB_001737b6: uVar2 = 1; } else { if (iVar1 == 0x2a) { while (iVar1 = get(this), 1 < iVar1 + 1U) { if (iVar1 == 0x2a) { iVar1 = get(this); if (iVar1 == 0x2f) goto LAB_001737b6; unget(this); } } pcVar3 = "invalid comment; missing closing \'*/\'"; } else { pcVar3 = "invalid comment; expecting \'/\' or \'*\' after \'/\'"; } *(char **)(this + 0x70) = pcVar3; uVar2 = 0; } return uVar2; }
44,978
testing::internal::ForkingDeathTest::Wait()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
int ForkingDeathTest::Wait() { if (!spawned()) return 0; ReadAndInterpretStatusByte(); int status_value; GTEST_DEATH_TEST_CHECK_SYSCALL_(waitpid(child_pid_, &status_value, 0)); set_status(status_value); return status_value; }
O0
cpp
testing::internal::ForkingDeathTest::Wait(): subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x148(%rsp) movq 0x148(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0xe2930 testb $0x1, %al jne 0xb2755 movl $0x0, 0x154(%rsp) jmp 0xb29e8 movq 0x18(%rsp), %rdi callq 0xb10a0 jmp 0xb2761 movq 0x18(%rsp), %rax movl 0x3c(%rax), %edi leaq 0x144(%rsp), %rsi xorl %edx, %edx callq 0x14550 movl %eax, 0x140(%rsp) xorl %eax, %eax cmpl $-0x1, 0x140(%rsp) movb %al, 0x17(%rsp) jne 0xb279e callq 0x14050 cmpl $0x4, (%rax) sete %al movb %al, 0x17(%rsp) movb 0x17(%rsp), %al testb $0x1, %al jne 0xb2761 cmpl $-0x1, 0x140(%rsp) jne 0xb29ba leaq 0x5f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x14c90 movq 0x8(%rsp), %rdx leaq 0x60057(%rip), %rsi # 0x112826 leaq 0x60(%rsp), %rdi callq 0x1a6a0 jmp 0xb27db leaq 0x5ff70(%rip), %rdx # 0x112752 leaq 0x80(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x39e60 jmp 0xb27f6 leaq 0x6003d(%rip), %rdx # 0x11283a leaq 0xa0(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0x39e60 jmp 0xb2814 movl $0x43d, 0x24(%rsp) # imm = 0x43D leaq 0x28(%rsp), %rdi leaq 0x24(%rsp), %rsi callq 0xe2830 jmp 0xb282d leaq 0xc0(%rsp), %rdi leaq 0xa0(%rsp), %rsi leaq 0x28(%rsp), %rdx callq 0x8bed0 jmp 0xb2849 leaq 0x615e7(%rip), %rdx # 0x113e37 leaq 0xe0(%rsp), %rdi leaq 0xc0(%rsp), %rsi callq 0x39e60 jmp 0xb2867 leaq 0x60151(%rip), %rdx # 0x1129bf leaq 0x100(%rsp), %rdi leaq 0xe0(%rsp), %rsi callq 0x39e60 jmp 0xb2885 leaq 0x601be(%rip), %rdx # 0x112a4a leaq 0x120(%rsp), %rdi leaq 0x100(%rsp), %rsi callq 0x39e60 jmp 0xb28a3 leaq 0x120(%rsp), %rdi callq 0xb0ee0 jmp 0xb28b2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xb29ae movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xb29a4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xb2997 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xb298a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xb2980 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xb2973 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xb2966 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) jmp 0xb2959 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) leaq 0x120(%rsp), %rdi callq 0x1aac0 leaq 0x100(%rsp), %rdi callq 0x1aac0 leaq 0xe0(%rsp), %rdi callq 0x1aac0 leaq 0xc0(%rsp), %rdi callq 0x1aac0 leaq 0x28(%rsp), %rdi callq 0x1aac0 leaq 0xa0(%rsp), %rdi callq 0x1aac0 leaq 0x80(%rsp), %rdi callq 0x1aac0 leaq 0x60(%rsp), %rdi callq 0x1aac0 leaq 0x5f(%rsp), %rdi callq 0x14750 jmp 0xb29f7 jmp 0xb29bc callq 0xe28c0 testb $0x1, %al jne 0xb275f movq 0x18(%rsp), %rdi movl 0x144(%rsp), %esi callq 0xe2cd0 movl 0x144(%rsp), %eax movl %eax, 0x154(%rsp) movl 0x154(%rsp), %eax addq $0x158, %rsp # imm = 0x158 retq movq 0x50(%rsp), %rdi callq 0x14c80 nopw %cs:(%rax,%rax)
_ZN7testing8internal16ForkingDeathTest4WaitEv: sub rsp, 158h mov [rsp+158h+var_10], rdi mov rdi, [rsp+158h+var_10]; this mov [rsp+158h+var_140], rdi call _ZNK7testing8internal13DeathTestImpl7spawnedEv; testing::internal::DeathTestImpl::spawned(void) test al, 1 jnz short loc_B2755 mov [rsp+158h+var_4], 0 jmp loc_B29E8 loc_B2755: mov rdi, [rsp+158h+var_140]; this call _ZN7testing8internal13DeathTestImpl26ReadAndInterpretStatusByteEv; testing::internal::DeathTestImpl::ReadAndInterpretStatusByte(void) loc_B275F: jmp short $+2 loc_B2761: mov rax, [rsp+158h+var_140] mov edi, [rax+3Ch]; this lea rsi, [rsp+158h+var_14] xor edx, edx call _waitpid mov [rsp+158h+var_18], eax xor eax, eax cmp [rsp+158h+var_18], 0FFFFFFFFh mov [rsp+158h+var_141], al jnz short loc_B279E call ___errno_location cmp dword ptr [rax], 4 setz al mov [rsp+158h+var_141], al loc_B279E: mov al, [rsp+158h+var_141] test al, 1 jnz short loc_B2761 cmp [rsp+158h+var_18], 0FFFFFFFFh jnz loc_B29BA lea rdi, [rsp+158h+var_F9] mov [rsp+158h+var_150], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+158h+var_150] lea rsi, aCheckFailedFil; "CHECK failed: File " lea rdi, [rsp+158h+var_F8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_B27DB: lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/AlayaL"... lea rdi, [rsp+158h+var_D8] lea rsi, [rsp+158h+var_F8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_B27F6: lea rdx, aLine; ", line " lea rdi, [rsp+158h+var_B8] lea rsi, [rsp+158h+var_D8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_B2814: mov [rsp+158h+var_134], 43Dh lea rdi, [rsp+158h+var_130] lea rsi, [rsp+158h+var_134] call _ZN7testing8internal18StreamableToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<int>(int const&) jmp short $+2 loc_B282D: lea rdi, [rsp+158h+var_98] lea rsi, [rsp+158h+var_B8] lea rdx, [rsp+158h+var_130] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_B2849: lea rdx, asc_113E36+1; ": " lea rdi, [rsp+158h+var_78] lea rsi, [rsp+158h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_B2867: lea rdx, aWaitpidChildPi; "waitpid(child_pid_, &status_value, 0)" lea rdi, [rsp+158h+var_58] lea rsi, [rsp+158h+var_78] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_B2885: lea rdx, aFcntlPipeFd1FS+1Dh; " != -1" lea rdi, [rsp+158h+var_38] lea rsi, [rsp+158h+var_58] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_B28A3: lea rdi, [rsp+158h+var_38] call _ZN7testing8internalL14DeathTestAbortERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; testing::internal::DeathTestAbort(std::string const&) jmp short $+2 loc_B28B2: mov rcx, rax mov eax, edx mov [rsp+50h], rcx mov [rsp+4Ch], eax jmp loc_B29AE mov rcx, rax mov eax, edx mov [rsp+50h], rcx mov [rsp+4Ch], eax jmp loc_B29A4 mov rcx, rax mov eax, edx mov [rsp+50h], rcx mov [rsp+4Ch], eax jmp loc_B2997 mov rcx, rax mov eax, edx mov [rsp+50h], rcx mov [rsp+4Ch], eax jmp loc_B298A mov rcx, rax mov eax, edx mov [rsp+50h], rcx mov [rsp+4Ch], eax jmp short loc_B2980 mov rcx, rax mov eax, edx mov [rsp+50h], rcx mov [rsp+4Ch], eax jmp short loc_B2973 mov rcx, rax mov eax, edx mov [rsp+50h], rcx mov [rsp+4Ch], eax jmp short loc_B2966 mov rcx, rax mov eax, edx mov [rsp+50h], rcx mov [rsp+4Ch], eax jmp short loc_B2959 mov rcx, rax mov eax, edx mov [rsp+50h], rcx mov [rsp+4Ch], eax lea rdi, [rsp+158h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B2959: lea rdi, [rsp+158h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B2966: lea rdi, [rsp+158h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B2973: lea rdi, [rsp+158h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B2980: lea rdi, [rsp+158h+var_130]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B298A: lea rdi, [rsp+158h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B2997: lea rdi, [rsp+158h+var_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B29A4: lea rdi, [rsp+158h+var_F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B29AE: lea rdi, [rsp+158h+var_F9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_B29F7 loc_B29BA: jmp short $+2 loc_B29BC: call _ZN7testing8internal11AlwaysFalseEv; testing::internal::AlwaysFalse(void) test al, 1 jnz loc_B275F mov rdi, [rsp+158h+var_140]; this mov esi, [rsp+158h+var_14]; int call _ZN7testing8internal13DeathTestImpl10set_statusEi; testing::internal::DeathTestImpl::set_status(int) mov eax, [rsp+158h+var_14] mov [rsp+158h+var_4], eax loc_B29E8: mov eax, [rsp+158h+var_4] add rsp, 158h retn loc_B29F7: mov rdi, [rsp+50h] call __Unwind_Resume
long long testing::internal::ForkingDeathTest::Wait(testing::internal::ForkingDeathTest *this) { testing::internal *v1; // rdi int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d bool v7; // [rsp+17h] [rbp-141h] int v9; // [rsp+24h] [rbp-134h] BYREF _BYTE v10[55]; // [rsp+28h] [rbp-130h] BYREF char v11; // [rsp+5Fh] [rbp-F9h] BYREF _BYTE v12[32]; // [rsp+60h] [rbp-F8h] BYREF _BYTE v13[32]; // [rsp+80h] [rbp-D8h] BYREF _BYTE v14[32]; // [rsp+A0h] [rbp-B8h] BYREF _BYTE v15[32]; // [rsp+C0h] [rbp-98h] BYREF _BYTE v16[32]; // [rsp+E0h] [rbp-78h] BYREF _BYTE v17[32]; // [rsp+100h] [rbp-58h] BYREF _BYTE v18[32]; // [rsp+120h] [rbp-38h] BYREF int v19; // [rsp+140h] [rbp-18h] int v20; // [rsp+144h] [rbp-14h] BYREF testing::internal::DeathTestImpl *v21; // [rsp+148h] [rbp-10h] v21 = this; if ( (testing::internal::DeathTestImpl::spawned(this) & 1) != 0 ) { testing::internal::DeathTestImpl::ReadAndInterpretStatusByte(this); while ( 1 ) { v1 = (testing::internal *)*((unsigned int *)this + 15); v19 = waitpid(v1, &v20, 0LL); v7 = 0; if ( v19 == -1 ) v7 = *(_DWORD *)__errno_location() == 4; if ( !v7 ) { if ( v19 == -1 ) { std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v12, (long long)"CHECK failed: File ", (long long)&v11); std::operator+<char>( (long long)v13, (long long)v12, (long long)"/workspace/llm4binary/github2025/AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc"); std::operator+<char>((long long)v14, (long long)v13, (long long)", line "); v9 = 1085; testing::internal::StreamableToString<int>((unsigned int)v10, (unsigned int)&v9, v2, v3, v4, v5); std::operator+<char>((long long)v15, (long long)v14, (long long)v10); std::operator+<char>((long long)v16, (long long)v15, (long long)": "); std::operator+<char>((long long)v17, (long long)v16, (long long)"waitpid(child_pid_, &status_value, 0)"); std::operator+<char>((long long)v18, (long long)v17, (long long)" != -1"); testing::internal::DeathTestAbort((testing::internal *)v18); } if ( (testing::internal::AlwaysFalse(v1) & 1) == 0 ) break; } } testing::internal::DeathTestImpl::set_status(this, v20); return (unsigned int)v20; } else { return 0; } }
Wait: SUB RSP,0x158 MOV qword ptr [RSP + 0x148],RDI MOV RDI,qword ptr [RSP + 0x148] MOV qword ptr [RSP + 0x18],RDI CALL 0x001e2930 TEST AL,0x1 JNZ 0x001b2755 MOV dword ptr [RSP + 0x154],0x0 JMP 0x001b29e8 LAB_001b2755: MOV RDI,qword ptr [RSP + 0x18] CALL 0x001b10a0 LAB_001b275f: JMP 0x001b2761 LAB_001b2761: MOV RAX,qword ptr [RSP + 0x18] MOV EDI,dword ptr [RAX + 0x3c] LEA RSI,[RSP + 0x144] XOR EDX,EDX CALL 0x00114550 MOV dword ptr [RSP + 0x140],EAX XOR EAX,EAX CMP dword ptr [RSP + 0x140],-0x1 MOV byte ptr [RSP + 0x17],AL JNZ 0x001b279e CALL 0x00114050 CMP dword ptr [RAX],0x4 SETZ AL MOV byte ptr [RSP + 0x17],AL LAB_001b279e: MOV AL,byte ptr [RSP + 0x17] TEST AL,0x1 JNZ 0x001b2761 CMP dword ptr [RSP + 0x140],-0x1 JNZ 0x001b29ba LEA RDI,[RSP + 0x5f] MOV qword ptr [RSP + 0x8],RDI CALL 0x00114c90 MOV RDX,qword ptr [RSP + 0x8] LAB_001b27c8: LEA RSI,[0x212826] LEA RDI,[RSP + 0x60] CALL 0x0011a6a0 JMP 0x001b27db LAB_001b27db: LEA RDX,[0x212752] LEA RDI,[RSP + 0x80] LEA RSI,[RSP + 0x60] CALL 0x00139e60 JMP 0x001b27f6 LAB_001b27f6: LEA RDX,[0x21283a] LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0x80] CALL 0x00139e60 JMP 0x001b2814 LAB_001b2814: MOV dword ptr [RSP + 0x24],0x43d LAB_001b281c: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x24] CALL 0x001e2830 JMP 0x001b282d LAB_001b282d: LEA RDI,[RSP + 0xc0] LEA RSI,[RSP + 0xa0] LEA RDX,[RSP + 0x28] CALL 0x0018bed0 JMP 0x001b2849 LAB_001b2849: LEA RDX,[0x213e37] LEA RDI,[RSP + 0xe0] LEA RSI,[RSP + 0xc0] CALL 0x00139e60 JMP 0x001b2867 LAB_001b2867: LEA RDX,[0x2129bf] LEA RDI,[RSP + 0x100] LEA RSI,[RSP + 0xe0] CALL 0x00139e60 JMP 0x001b2885 LAB_001b2885: LEA RDX,[0x212a4a] LEA RDI,[RSP + 0x120] LEA RSI,[RSP + 0x100] CALL 0x00139e60 JMP 0x001b28a3 LAB_001b28a3: LEA RDI,[RSP + 0x120] CALL 0x001b0ee0 LAB_001b28b0: JMP 0x001b28b2 LAB_001b28b2: MOV RCX,RAX MOV EAX,EDX MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX JMP 0x001b29ae LAB_001b29ae: LEA RDI,[RSP + 0x5f] CALL 0x00114750 JMP 0x001b29f7 LAB_001b29ba: JMP 0x001b29bc LAB_001b29bc: CALL 0x001e28c0 TEST AL,0x1 JNZ 0x001b275f MOV RDI,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RSP + 0x144] CALL 0x001e2cd0 MOV EAX,dword ptr [RSP + 0x144] MOV dword ptr [RSP + 0x154],EAX LAB_001b29e8: MOV EAX,dword ptr [RSP + 0x154] ADD RSP,0x158 RET LAB_001b29f7: MOV RDI,qword ptr [RSP + 0x50] CALL 0x00114c80
/* testing::internal::ForkingDeathTest::Wait() */ int __thiscall testing::internal::ForkingDeathTest::Wait(ForkingDeathTest *this) { ulong uVar1; int *piVar2; bool bVar3; int1 auVar4 [12]; int local_134; internal local_130 [36]; int4 local_10c; int8 local_108; allocator local_f9; string local_f8 [32]; string local_d8 [32]; string local_b8 [32]; string local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [32]; __pid_t local_18; int local_14; ForkingDeathTest *local_10; int local_4; local_10 = this; uVar1 = DeathTestImpl::spawned((DeathTestImpl *)this); if ((uVar1 & 1) == 0) { local_4 = 0; } else { DeathTestImpl::ReadAndInterpretStatusByte((DeathTestImpl *)this); do { do { local_18 = waitpid(*(__pid_t *)(this + 0x3c),&local_14,0); bVar3 = false; if (local_18 == -1) { piVar2 = __errno_location(); bVar3 = *piVar2 == 4; } } while (bVar3); if (local_18 == -1) { std::allocator<char>::allocator(); /* try { // try from 001b27c8 to 001b27d8 has its CatchHandler @ 001b28b2 */ std::__cxx11::string::string<std::allocator<char>>(local_f8,"CHECK failed: File ",&local_f9) ; /* try { // try from 001b27db to 001b27f3 has its CatchHandler @ 001b28c5 */ std::operator+(local_d8,(char *)local_f8); /* try { // try from 001b27f6 to 001b2811 has its CatchHandler @ 001b28d8 */ std::operator+(local_b8,(char *)local_d8); local_134 = 0x43d; /* try { // try from 001b281c to 001b282a has its CatchHandler @ 001b28eb */ StreamableToString<int>(local_130,&local_134); /* try { // try from 001b282d to 001b2846 has its CatchHandler @ 001b28fe */ std::operator+(local_98,local_b8); /* try { // try from 001b2849 to 001b2864 has its CatchHandler @ 001b290e */ std::operator+(local_78,(char *)local_98); /* try { // try from 001b2867 to 001b2882 has its CatchHandler @ 001b291e */ std::operator+(local_58,(char *)local_78); /* try { // try from 001b2885 to 001b28a0 has its CatchHandler @ 001b292e */ std::operator+(local_38,(char *)local_58); /* try { // try from 001b28a3 to 001b28af has its CatchHandler @ 001b293e */ auVar4 = DeathTestAbort(local_38); local_10c = auVar4._8_4_; local_108 = auVar4._0_8_; /* catch() { ... } // from try @ 001b27c8 with catch @ 001b28b2 */ std::allocator<char>::~allocator((allocator<char> *)&local_f9); /* WARNING: Subroutine does not return */ _Unwind_Resume(local_108); } uVar1 = AlwaysFalse(); } while ((uVar1 & 1) != 0); DeathTestImpl::set_status((DeathTestImpl *)this,local_14); local_4 = local_14; } return local_4; }
44,979
mysql_stmt_fetch_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_fetch_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_fetch, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_fetch(stmt); return 0; }) }
O0
c
mysql_stmt_fetch_start: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) jne 0x63dd8 movq -0x18(%rbp), %rdi callq 0x506e0 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) jmp 0x63ee9 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movb $0x1, 0x14(%rax) movq -0x28(%rbp), %rdi addq $0x38, %rdi leaq 0xf2(%rip), %rsi # 0x63f00 leaq -0x30(%rbp), %rdx callq 0x661d0 movl %eax, -0x1c(%rbp) movq -0x28(%rbp), %rax movb $0x0, 0x15(%rax) movq -0x28(%rbp), %rax movb $0x0, 0x14(%rax) cmpl $0x0, -0x1c(%rbp) jle 0x63e46 movq -0x28(%rbp), %rax movb $0x1, 0x15(%rax) movq -0x28(%rbp), %rax movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x63ee9 cmpl $0x0, -0x1c(%rbp) jge 0x63ed5 jmp 0x63e52 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1d38d6(%rip), %rax # 0x237750 movq (%rax), %rsi movl $0x5, %edx callq 0x37150 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x29c(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi addq $0x97, %rdi leaq 0x1d38b4(%rip), %rax # 0x237760 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37150 movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax movl $0x1, (%rax) jmp 0x63ee2 movq -0x28(%rbp), %rax movl 0x8(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mysql_stmt_fetch_start: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jnz short loc_63DD8 mov rdi, [rbp+var_18] call mysql_stmt_fetch mov ecx, eax mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 0 jmp loc_63EE9 loc_63DD8: mov rax, [rbp+var_18] mov rax, [rax+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov byte ptr [rax+14h], 1 mov rdi, [rbp+var_28] add rdi, 38h ; '8' lea rsi, mysql_stmt_fetch_start_internal lea rdx, [rbp+var_30] call my_context_spawn mov [rbp+var_1C], eax mov rax, [rbp+var_28] mov byte ptr [rax+15h], 0 mov rax, [rbp+var_28] mov byte ptr [rax+14h], 0 cmp [rbp+var_1C], 0 jle short loc_63E46 mov rax, [rbp+var_28] mov byte ptr [rax+15h], 1 mov rax, [rbp+var_28] mov eax, [rax] mov [rbp+var_4], eax jmp loc_63EE9 loc_63E46: cmp [rbp+var_1C], 0 jge loc_63ED5 jmp short $+2 loc_63E52: mov rax, [rbp+var_18] mov rax, [rax+38h] mov dword ptr [rax+90h], 7D8h mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+29Ch], 0 mov rax, [rbp+var_18] mov rdi, [rax+38h] add rdi, 97h lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_18] mov rax, [rax+38h] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] mov dword ptr [rax], 1 jmp short loc_63EE2 loc_63ED5: mov rax, [rbp+var_28] mov ecx, [rax+8] mov rax, [rbp+var_10] mov [rax], ecx loc_63EE2: mov [rbp+var_4], 0 loc_63EE9: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mysql_stmt_fetch_start(_DWORD *a1, long long a2) { long long v3; // [rsp+0h] [rbp-30h] BYREF unsigned int *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] long long v6; // [rsp+18h] [rbp-18h] _DWORD *v7; // [rsp+20h] [rbp-10h] v7 = a1; v6 = a2; if ( *(_QWORD *)(a2 + 56) ) { v4 = *(unsigned int **)(*(_QWORD *)(*(_QWORD *)(v6 + 56) + 1152LL) + 40LL); v3 = v6; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_fetch_start_internal, &v3); *((_BYTE *)v4 + 21) = 0; *((_BYTE *)v4 + 20) = 0; if ( v5 <= 0 ) { if ( v5 >= 0 ) { *v7 = v4[2]; } else { *(_DWORD *)(*(_QWORD *)(v6 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(v6 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(v6 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(v6 + 56) + 662LL) = 0; *v7 = 1; } return 0; } else { *((_BYTE *)v4 + 21) = 1; return *v4; } } else { *v7 = mysql_stmt_fetch(v6); return 0; } }
mysql_stmt_fetch_start: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JNZ 0x00163dd8 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001506e0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x00163ee9 LAB_00163dd8: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x1 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x38 LEA RSI,[0x163f00] LEA RDX,[RBP + -0x30] CALL 0x001661d0 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x14],0x0 CMP dword ptr [RBP + -0x1c],0x0 JLE 0x00163e46 MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x15],0x1 MOV RAX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00163ee9 LAB_00163e46: CMP dword ptr [RBP + -0x1c],0x0 JGE 0x00163ed5 JMP 0x00163e52 LAB_00163e52: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x297 LEA RAX,[0x337750] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x29c],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] ADD RDI,0x97 LEA RAX,[0x337760] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],0x1 JMP 0x00163ee2 LAB_00163ed5: MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX LAB_00163ee2: MOV dword ptr [RBP + -0x4],0x0 LAB_00163ee9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 mysql_stmt_fetch_start(int4 *param_1,long param_2) { int4 uVar1; long local_38; int4 *local_30; int local_24; long local_20; int4 *local_18; int4 local_c; local_20 = param_2; local_18 = param_1; if (*(long *)(param_2 + 0x38) == 0) { uVar1 = mysql_stmt_fetch(param_2); *local_18 = uVar1; local_c = 0; } else { local_30 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(local_30 + 5) = 1; local_38 = param_2; local_24 = my_context_spawn(local_30 + 0xe,mysql_stmt_fetch_start_internal,&local_38); *(int1 *)((long)local_30 + 0x15) = 0; *(int1 *)(local_30 + 5) = 0; if (local_24 < 1) { if (local_24 < 0) { *(int4 *)(*(long *)(local_20 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(local_20 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(local_20 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_003377a0, 0x1ff); *(int1 *)(*(long *)(local_20 + 0x38) + 0x296) = 0; *local_18 = 1; } else { *local_18 = local_30[2]; } local_c = 0; } else { *(int1 *)((long)local_30 + 0x15) = 1; local_c = *local_30; } } return local_c; }
44,980
ImPlotAxis::ImPlotAxis()
zkingston[P]unknot/build_O1/_deps/implot-src/implot.h
ImPlotRange() { Min = 0; Max = 0; }
O1
c
ImPlotAxis::ImPlotAxis(): xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, 0x28(%rdi) movups %xmm0, 0x80(%rdi) movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq 0x88(%rdi), %rax movq %rax, 0x80(%rdi) xorl %eax, %eax movq %rax, 0x88(%rdi) movl $0x1, 0x90(%rdi) movq %rax, 0xd8(%rdi) movl %eax, 0xe0(%rdi) movq %rax, 0xe8(%rdi) movl %eax, 0xf0(%rdi) movups %xmm0, 0x138(%rdi) movl %eax, (%rdi) movl %eax, 0x8(%rdi) movl %eax, 0x4(%rdi) xorps %xmm1, %xmm1 movhps 0x1c5086(%rip), %xmm1 # xmm1 = xmm1[0,1],mem[0,1] movups %xmm1, 0x10(%rdi) movl %eax, 0x24(%rdi) movq %rax, 0x108(%rdi) movups %xmm0, 0xf8(%rdi) movaps 0x1cf962(%rip), %xmm1 # 0x299970 movups %xmm1, 0x28(%rdi) movq %rax, 0x38(%rdi) movaps 0x1cf933(%rip), %xmm1 # 0x299950 movups %xmm1, 0x40(%rdi) movaps 0x1cf938(%rip), %xmm1 # 0x299960 movups %xmm1, 0x50(%rdi) movq %rax, 0x130(%rdi) movq %rax, 0x110(%rdi) movl %eax, 0xd0(%rdi) movups %xmm0, 0xc0(%rdi) movl $0xffffffff, 0x148(%rdi) # imm = 0xFFFFFFFF movq %rax, 0xb8(%rdi) movb %al, 0x173(%rdi) movb %al, 0x172(%rdi) movups %xmm0, 0x98(%rdi) movb %al, 0x16c(%rdi) movups %xmm0, 0x15c(%rdi) movups %xmm0, 0x14c(%rdi) movl $0x1000000, 0x16e(%rdi) # imm = 0x1000000 retq
_ZN10ImPlotAxisC2Ev: xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi+28h], xmm0 movups xmmword ptr [rdi+80h], xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov rax, [rdi+88h] mov [rdi+80h], rax xor eax, eax mov [rdi+88h], rax mov dword ptr [rdi+90h], 1 mov [rdi+0D8h], rax mov [rdi+0E0h], eax mov [rdi+0E8h], rax mov [rdi+0F0h], eax movups xmmword ptr [rdi+138h], xmm0 mov [rdi], eax mov [rdi+8], eax mov [rdi+4], eax xorps xmm1, xmm1 movhps xmm1, cs:qword_28F078 movups xmmword ptr [rdi+10h], xmm1 mov [rdi+24h], eax mov [rdi+108h], rax movups xmmword ptr [rdi+0F8h], xmm0 movaps xmm1, cs:xmmword_299970 movups xmmword ptr [rdi+28h], xmm1 mov [rdi+38h], rax movaps xmm1, cs:xmmword_299950 movups xmmword ptr [rdi+40h], xmm1 movaps xmm1, cs:xmmword_299960 movups xmmword ptr [rdi+50h], xmm1 mov [rdi+130h], rax mov [rdi+110h], rax mov [rdi+0D0h], eax movups xmmword ptr [rdi+0C0h], xmm0 mov dword ptr [rdi+148h], 0FFFFFFFFh mov [rdi+0B8h], rax mov [rdi+173h], al mov [rdi+172h], al movups xmmword ptr [rdi+98h], xmm0 mov [rdi+16Ch], al movups xmmword ptr [rdi+15Ch], xmm0 movups xmmword ptr [rdi+14Ch], xmm0 mov dword ptr [rdi+16Eh], 1000000h retn
void ImPlotAxis::ImPlotAxis(ImPlotAxis *this) { *((_OWORD *)this + 1) = 0LL; *(_OWORD *)((char *)this + 40) = 0LL; *((_OWORD *)this + 8) = 0LL; *((_OWORD *)this + 4) = 0LL; *((_OWORD *)this + 5) = 0LL; *((_OWORD *)this + 6) = 0LL; *((_OWORD *)this + 7) = 0LL; *((_QWORD *)this + 16) = *((_QWORD *)this + 17); *((_QWORD *)this + 17) = 0LL; *((_DWORD *)this + 36) = 1; *((_QWORD *)this + 27) = 0LL; *((_DWORD *)this + 56) = 0; *((_QWORD *)this + 29) = 0LL; *((_DWORD *)this + 60) = 0; *(_OWORD *)((char *)this + 312) = 0LL; *(_DWORD *)this = 0; *((_DWORD *)this + 2) = 0; *((_DWORD *)this + 1) = 0; *((__m128 *)this + 1) = _mm_loadh_ps((const double *)&qword_28F078); *((_DWORD *)this + 9) = 0; *((_QWORD *)this + 33) = 0LL; *(_OWORD *)((char *)this + 248) = 0LL; *(_OWORD *)((char *)this + 40) = xmmword_299970; *((_QWORD *)this + 7) = 0LL; *((_OWORD *)this + 4) = xmmword_299950; *((_OWORD *)this + 5) = xmmword_299960; *((_QWORD *)this + 38) = 0LL; *((_QWORD *)this + 34) = 0LL; *((_DWORD *)this + 52) = 0; *((_OWORD *)this + 12) = 0LL; *((_DWORD *)this + 82) = -1; *((_QWORD *)this + 23) = 0LL; *((_BYTE *)this + 371) = 0; *((_BYTE *)this + 370) = 0; *(_OWORD *)((char *)this + 152) = 0LL; *((_BYTE *)this + 364) = 0; *(_OWORD *)((char *)this + 348) = 0LL; *(_OWORD *)((char *)this + 332) = 0LL; *(_DWORD *)((char *)this + 366) = 0x1000000; }
ImPlotAxis: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI + 0x28],XMM0 MOVUPS xmmword ptr [RDI + 0x80],XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV RAX,qword ptr [RDI + 0x88] MOV qword ptr [RDI + 0x80],RAX XOR EAX,EAX MOV qword ptr [RDI + 0x88],RAX MOV dword ptr [RDI + 0x90],0x1 MOV qword ptr [RDI + 0xd8],RAX MOV dword ptr [RDI + 0xe0],EAX MOV qword ptr [RDI + 0xe8],RAX MOV dword ptr [RDI + 0xf0],EAX MOVUPS xmmword ptr [RDI + 0x138],XMM0 MOV dword ptr [RDI],EAX MOV dword ptr [RDI + 0x8],EAX MOV dword ptr [RDI + 0x4],EAX XORPS XMM1,XMM1 MOVHPS XMM1,qword ptr [0x0038f078] MOVUPS xmmword ptr [RDI + 0x10],XMM1 MOV dword ptr [RDI + 0x24],EAX MOV qword ptr [RDI + 0x108],RAX MOVUPS xmmword ptr [RDI + 0xf8],XMM0 MOVAPS XMM1,xmmword ptr [0x00399970] MOVUPS xmmword ptr [RDI + 0x28],XMM1 MOV qword ptr [RDI + 0x38],RAX MOVAPS XMM1,xmmword ptr [0x00399950] MOVUPS xmmword ptr [RDI + 0x40],XMM1 MOVAPS XMM1,xmmword ptr [0x00399960] MOVUPS xmmword ptr [RDI + 0x50],XMM1 MOV qword ptr [RDI + 0x130],RAX MOV qword ptr [RDI + 0x110],RAX MOV dword ptr [RDI + 0xd0],EAX MOVUPS xmmword ptr [RDI + 0xc0],XMM0 MOV dword ptr [RDI + 0x148],0xffffffff MOV qword ptr [RDI + 0xb8],RAX MOV byte ptr [RDI + 0x173],AL MOV byte ptr [RDI + 0x172],AL MOVUPS xmmword ptr [RDI + 0x98],XMM0 MOV byte ptr [RDI + 0x16c],AL MOVUPS xmmword ptr [RDI + 0x15c],XMM0 MOVUPS xmmword ptr [RDI + 0x14c],XMM0 MOV dword ptr [RDI + 0x16e],0x1000000 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlotAxis::ImPlotAxis() */ void __thiscall ImPlotAxis::ImPlotAxis(ImPlotAxis *this) { int8 uVar1; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int8 *)(this + 0x58) = 0; *(int8 *)(this + 0x60) = 0; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = *(int8 *)(this + 0x88); *(int8 *)(this + 0x88) = 0; *(int4 *)(this + 0x90) = 1; *(int8 *)(this + 0xd8) = 0; *(int4 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int4 *)(this + 0xf0) = 0; *(int8 *)(this + 0x138) = 0; *(int8 *)(this + 0x140) = 0; *(int4 *)this = 0; *(int4 *)(this + 8) = 0; *(int4 *)(this + 4) = 0; uVar1 = DAT_0038f078; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = uVar1; *(int4 *)(this + 0x24) = 0; *(int8 *)(this + 0x108) = 0; *(int8 *)(this + 0xf8) = 0; *(int8 *)(this + 0x100) = 0; uVar1 = _UNK_00399978; *(int8 *)(this + 0x28) = _DAT_00399970; *(int8 *)(this + 0x30) = uVar1; *(int8 *)(this + 0x38) = 0; uVar1 = _UNK_00399958; *(int8 *)(this + 0x40) = _DAT_00399950; *(int8 *)(this + 0x48) = uVar1; uVar1 = _UNK_00399968; *(int8 *)(this + 0x50) = _DAT_00399960; *(int8 *)(this + 0x58) = uVar1; *(int8 *)(this + 0x130) = 0; *(int8 *)(this + 0x110) = 0; *(int4 *)(this + 0xd0) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int4 *)(this + 0x148) = 0xffffffff; *(int8 *)(this + 0xb8) = 0; this[0x173] = (ImPlotAxis)0x0; this[0x172] = (ImPlotAxis)0x0; *(int8 *)(this + 0x98) = 0; *(int8 *)(this + 0xa0) = 0; this[0x16c] = (ImPlotAxis)0x0; *(int8 *)(this + 0x15c) = 0; *(int8 *)(this + 0x164) = 0; *(int8 *)(this + 0x14c) = 0; *(int8 *)(this + 0x154) = 0; *(int4 *)(this + 0x16e) = 0x1000000; return; }
44,981
translog_buffer_destroy
eloqsql/storage/maria/ma_loghandler.c
static void translog_buffer_destroy(struct st_translog_buffer *buffer) { DBUG_ENTER("translog_buffer_destroy"); DBUG_PRINT("enter", ("Buffer #%u: %p file: %d offset: " LSN_FMT " size: %lu", (uint) buffer->buffer_no, buffer, (buffer->file ? buffer->file->handler.file : -1), LSN_IN_PARTS(buffer->offset), (ulong) buffer->size)); if (buffer->file != NULL) { /* We ignore errors here, because we can't do something about it (it is shutting down) We also have to take the locks even if there can't be any other threads running, because translog_buffer_flush() requires that we have the buffer locked. */ translog_buffer_lock(buffer); translog_buffer_flush(buffer); translog_buffer_unlock(buffer); } DBUG_PRINT("info", ("Destroy mutex: %p", &buffer->mutex)); mysql_mutex_destroy(&buffer->mutex); mysql_cond_destroy(&buffer->waiting_filling_buffer); DBUG_VOID_RETURN; }
O0
c
translog_buffer_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x31bfe movq -0x8(%rbp), %rax cmpq $0x0, 0x100038(%rax) je 0x31c27 movq -0x8(%rbp), %rdi callq 0x2dfd0 movq -0x8(%rbp), %rdi callq 0x34200 movq -0x8(%rbp), %rdi callq 0x2e010 jmp 0x31c29 jmp 0x31c2b movq -0x8(%rbp), %rdi addq $0x100090, %rdi # imm = 0x100090 callq 0x31d20 movq -0x8(%rbp), %rdi addq $0x100040, %rdi # imm = 0x100040 callq 0x31d70 jmp 0x31c4d addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_buffer_destroy: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_31BFE: mov rax, [rbp+var_8] cmp ds:off_100038[rax], 0 jz short loc_31C27 mov rdi, [rbp+var_8] call translog_buffer_lock mov rdi, [rbp+var_8] call translog_buffer_flush mov rdi, [rbp+var_8] call translog_buffer_unlock loc_31C27: jmp short $+2 loc_31C29: jmp short $+2 loc_31C2B: mov rdi, [rbp+var_8] add rdi, 100090h call inline_mysql_mutex_destroy mov rdi, [rbp+var_8] add rdi, 100040h call inline_mysql_cond_destroy jmp short $+2 loc_31C4D: add rsp, 10h pop rbp retn
long long translog_buffer_destroy(long long a1) { if ( *(_UNKNOWN **)((char *)&off_100038 + a1) ) { translog_buffer_lock(a1); translog_buffer_flush(a1); translog_buffer_unlock(a1); } inline_mysql_mutex_destroy(a1 + 1048720); return inline_mysql_cond_destroy(a1 + 1048640); }
translog_buffer_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x00131bfe LAB_00131bfe: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x100038],0x0 JZ 0x00131c27 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012dfd0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x00134200 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012e010 LAB_00131c27: JMP 0x00131c29 LAB_00131c29: JMP 0x00131c2b LAB_00131c2b: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x100090 CALL 0x00131d20 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x100040 CALL 0x00131d70 JMP 0x00131c4d LAB_00131c4d: ADD RSP,0x10 POP RBP RET
void translog_buffer_destroy(long param_1) { if (*(long *)(Elf64_Ehdr_00100000.e_ident_pad + param_1 + 0x2f) != 0) { translog_buffer_lock(param_1); translog_buffer_flush(param_1); translog_buffer_unlock(param_1); } inline_mysql_mutex_destroy(param_1 + 0x100090); inline_mysql_cond_destroy((long)&Elf64_Phdr_ARRAY_00100040[0].p_type + param_1); return; }
44,982
R3D_GetFogColor
r3d/src/r3d_environment.c
Color R3D_GetFogColor(void) { Color color = { 0 }; color.r = (unsigned char)(R3D.env.fogColor.x * 255); color.g = (unsigned char)(R3D.env.fogColor.y * 255); color.b = (unsigned char)(R3D.env.fogColor.z * 255); color.a = 255; return color; }
O3
c
R3D_GetFogColor: pushq %rbp movq %rsp, %rbp leaq 0xf2a00(%rip), %rcx # 0x1b0370 movss 0x236ac(%rip), %xmm0 # 0xe1024 movss 0x1500(%rcx), %xmm1 mulss %xmm0, %xmm1 cvttss2si %xmm1, %eax movss 0x1504(%rcx), %xmm1 mulss %xmm0, %xmm1 cvttss2si %xmm1, %edx mulss 0x1508(%rcx), %xmm0 cvttss2si %xmm0, %ecx shll $0x10, %ecx movl $0xff, %esi andl %esi, %edx shll $0x8, %edx orl %ecx, %edx andl %esi, %eax orl %edx, %eax orl $0xff000000, %eax # imm = 0xFF000000 popq %rbp retq
R3D_GetFogColor: push rbp mov rbp, rsp lea rcx, R3D movss xmm0, cs:dword_E1024 movss xmm1, dword ptr [rcx+1500h] mulss xmm1, xmm0 cvttss2si eax, xmm1 movss xmm1, dword ptr [rcx+1504h] mulss xmm1, xmm0 cvttss2si edx, xmm1 mulss xmm0, dword ptr [rcx+1508h] cvttss2si ecx, xmm0 shl ecx, 10h mov esi, 0FFh and edx, esi shl edx, 8 or edx, ecx and eax, esi or eax, edx or eax, 0FF000000h pop rbp retn
long long R3D_GetFogColor() { return ((int)(float)(255.0 * *((float *)&R3D + 1346)) << 16) | ((unsigned __int8)(int)(float)(*((float *)&R3D + 1345) * 255.0) << 8) | (unsigned __int8)(int)(float)(*((float *)&R3D + 1344) * 255.0) | 0xFF000000; }
R3D_GetFogColor: PUSH RBP MOV RBP,RSP LEA RCX,[0x2b0370] MOVSS XMM0,dword ptr [0x001e1024] MOVSS XMM1,dword ptr [RCX + 0x1500] MULSS XMM1,XMM0 CVTTSS2SI EAX,XMM1 MOVSS XMM1,dword ptr [RCX + 0x1504] MULSS XMM1,XMM0 CVTTSS2SI EDX,XMM1 MULSS XMM0,dword ptr [RCX + 0x1508] CVTTSS2SI ECX,XMM0 SHL ECX,0x10 MOV ESI,0xff AND EDX,ESI SHL EDX,0x8 OR EDX,ECX AND EAX,ESI OR EAX,EDX OR EAX,0xff000000 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint R3D_GetFogColor(void) { return (int)(_DAT_002b1870 * DAT_001e1024) & 0xffU | ((int)(_DAT_002b1874 * DAT_001e1024) & 0xffU) << 8 | (int)(DAT_001e1024 * _DAT_002b1878) << 0x10 | 0xff000000; }
44,983
js_std_file_getByte
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_getByte(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { FILE *f = js_std_file_get(ctx, this_val); if (!f) return JS_EXCEPTION; return JS_NewInt32(ctx, fgetc(f)); }
O0
c
js_std_file_getByte: subq $0x68, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x13a80 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x13910 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x13955 movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x8(%rsp), %rdi callq 0xe390 movq (%rsp), %rcx movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax movl %eax, 0x58(%rsp) movq $0x0, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x38(%rsp) movq %rax, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x68, %rsp retq nopw %cs:(%rax,%rax)
js_std_file_getByte: sub rsp, 68h mov [rsp+68h+var_40], rsi mov [rsp+68h+var_38], rdx mov [rsp+68h+var_48], rdi mov [rsp+68h+var_4C], ecx mov [rsp+68h+var_58], r8 mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] mov rdx, [rsp+68h+var_38] call js_std_file_get mov [rsp+68h+var_60], rax cmp [rsp+68h+var_60], 0 jnz short loc_13910 mov dword ptr [rsp+68h+var_30], 0 mov [rsp+68h+var_28], 6 jmp short loc_13955 loc_13910: mov rax, [rsp+68h+var_48] mov [rsp+68h+var_68], rax mov rdi, [rsp+68h+var_60] call _fgetc mov rcx, [rsp+68h+var_68] mov [rsp+68h+var_18], rcx mov [rsp+68h+var_1C], eax mov eax, [rsp+68h+var_1C] mov dword ptr [rsp+68h+var_10], eax mov [rsp+68h+var_8], 0 mov rcx, [rsp+68h+var_10] mov rax, [rsp+68h+var_8] mov [rsp+68h+var_30], rcx mov [rsp+68h+var_28], rax loc_13955: mov rax, [rsp+68h+var_30] mov rdx, [rsp+68h+var_28] add rsp, 68h retn
long long js_std_file_getByte(long long a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-60h] long long v5; // [rsp+38h] [rbp-30h] long long v6; // [rsp+58h] [rbp-10h] v4 = js_std_file_get(a1, a2, a3); if ( v4 ) { LODWORD(v6) = fgetc(v4); return v6; } else { LODWORD(v5) = 0; } return v5; }
js_std_file_getByte: SUB RSP,0x68 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] CALL 0x00113a80 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00113910 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x00113955 LAB_00113910: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010e390 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],0x0 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RAX LAB_00113955: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x68 RET
int1 [16] js_std_file_getByte(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; FILE *__stream; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; __stream = (FILE *)js_std_file_get(param_1,param_2,param_3); if (__stream == (FILE *)0x0) { local_30 = 0; local_28 = 6; } else { local_30 = fgetc(__stream); uStack_2c = uStack_c; local_28 = 0; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
44,984
minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&)
monkey531[P]llama/common/minja.hpp
SetTemplateNode(const Location & location, const std::string & name, std::shared_ptr<TemplateNode> && tv) : TemplateNode(location), name(name), template_value(std::move(tv)) {}
O3
cpp
minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::shared_ptr<minja::TemplateNode>&&): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %r14 movq %rdi, %rbx leaq 0x79672(%rip), %r15 # 0xdafe8 addq $0x10, %r15 movq %r15, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0x619a6 movq 0x7a600(%rip), %rcx # 0xdbf98 cmpb $0x0, (%rcx) je 0x619a2 incl 0x8(%rax) jmp 0x619a6 lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x79a33(%rip), %rax # 0xdb3e8 addq $0x10, %rax movq %rax, (%rbx) leaq 0x20(%rbx), %rdi leaq 0x30(%rbx), %rax movq %rax, 0x20(%rbx) movq (%rdx), %rsi movq 0x8(%rdx), %rdx addq %rsi, %rdx callq 0x35b1e xorl %eax, %eax movq %rax, 0x48(%rbx) movups (%r14), %xmm0 movq %rax, 0x8(%r14) movups %xmm0, 0x40(%rbx) movq %rax, (%r14) popq %rbx popq %r14 popq %r15 retq movq %rax, %r14 movq %r15, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x61a06 callq 0x2ef66 movq %r14, %rdi callq 0x18ba0
_ZN5minja15SetTemplateNodeC2ERKNS_8LocationERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEOSt10shared_ptrINS_12TemplateNodeEE: push r15 push r14 push rbx mov r14, rcx mov rbx, rdi lea r15, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add r15, 10h mov [rdi], r15 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_619A6 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_619A2 inc dword ptr [rax+8] jmp short loc_619A6 loc_619A2: lock inc dword ptr [rax+8] loc_619A6: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja15SetTemplateNodeE; `vtable for'minja::SetTemplateNode add rax, 10h mov [rbx], rax lea rdi, [rbx+20h] lea rax, [rbx+30h] mov [rbx+20h], rax mov rsi, [rdx] mov rdx, [rdx+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) xor eax, eax mov [rbx+48h], rax movups xmm0, xmmword ptr [r14] mov [r14+8], rax movups xmmword ptr [rbx+40h], xmm0 mov [r14], rax pop rbx pop r14 pop r15 retn mov r14, rax mov [rbx], r15 mov rdi, [rbx+10h] test rdi, rdi jz short loc_61A06 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_61A06: mov rdi, r14 call __Unwind_Resume
long long minja::SetTemplateNode::SetTemplateNode(long long a1, _QWORD *a2, long long a3, __int128 *a4) { long long v5; // rax long long result; // rax __int128 v7; // xmm0 *(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2; *(_QWORD *)(a1 + 8) = *a2; v5 = a2[1]; *(_QWORD *)(a1 + 16) = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v5 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v5 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::SetTemplateNode + 2; *(_QWORD *)(a1 + 32) = a1 + 48; std::string::_M_construct<char *>(a1 + 32, *(_BYTE **)a3, *(_QWORD *)a3 + *(_QWORD *)(a3 + 8)); result = 0LL; *(_QWORD *)(a1 + 72) = 0LL; v7 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 64) = v7; *(_QWORD *)a4 = 0LL; return result; }
SetTemplateNode: PUSH R15 PUSH R14 PUSH RBX MOV R14,RCX MOV RBX,RDI LEA R15,[0x1dafe8] ADD R15,0x10 MOV qword ptr [RDI],R15 MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x8],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x10],RAX TEST RAX,RAX JZ 0x001619a6 MOV RCX,qword ptr [0x001dbf98] CMP byte ptr [RCX],0x0 JZ 0x001619a2 INC dword ptr [RAX + 0x8] JMP 0x001619a6 LAB_001619a2: INC.LOCK dword ptr [RAX + 0x8] LAB_001619a6: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x1db3e8] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x20] LEA RAX,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RAX MOV RSI,qword ptr [RDX] MOV RDX,qword ptr [RDX + 0x8] ADD RDX,RSI LAB_001619d2: CALL 0x00135b1e LAB_001619d7: XOR EAX,EAX MOV qword ptr [RBX + 0x48],RAX MOVUPS XMM0,xmmword ptr [R14] MOV qword ptr [R14 + 0x8],RAX MOVUPS xmmword ptr [RBX + 0x40],XMM0 MOV qword ptr [R14],RAX POP RBX POP R14 POP R15 RET
/* minja::SetTemplateNode::SetTemplateNode(minja::Location const&, std::__cxx11::string const&, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::SetTemplateNode::SetTemplateNode (SetTemplateNode *this,Location *param_1,string *param_2,shared_ptr *param_3) { long lVar1; int8 uVar2; *(int ***)this = &PTR___cxa_pure_virtual_001daff8; *(int8 *)(this + 8) = *(int8 *)param_1; lVar1 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_001dbf98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_render_001db3f8; *(SetTemplateNode **)(this + 0x20) = this + 0x30; /* try { // try from 001619d2 to 001619d6 has its CatchHandler @ 001619f2 */ std::__cxx11::string::_M_construct<char*> (this + 0x20,*(long *)param_2,*(long *)(param_2 + 8) + *(long *)param_2); *(int8 *)(this + 0x48) = 0; uVar2 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x40) = *(int8 *)param_3; *(int8 *)(this + 0x48) = uVar2; *(int8 *)param_3 = 0; return; }
44,985
my_register_filename
eloqsql/mysys/my_open.c
File my_register_filename(File fd, const char *FileName, enum file_type type_of_file, uint error_message_number, myf MyFlags) { DBUG_ENTER("my_register_filename"); if ((int) fd >= MY_FILE_MIN) { my_atomic_add32_explicit(&my_file_opened, 1, MY_MEMORY_ORDER_RELAXED); if ((uint) fd >= my_file_limit || (MyFlags & MY_NO_REGISTER)) DBUG_RETURN(fd); my_file_info[fd].name = my_strdup(key_memory_my_file_info, FileName, MyFlags); statistic_increment(my_file_total_opened,&THR_LOCK_open); my_file_info[fd].type = type_of_file; DBUG_PRINT("exit",("fd: %d",fd)); DBUG_RETURN(fd); } my_errno= errno; DBUG_PRINT("error",("Got error %d on open", my_errno)); if (MyFlags & (MY_FFNF | MY_FAE | MY_WME)) { if (my_errno == EMFILE) error_message_number= EE_OUT_OF_FILERESOURCES; my_error(error_message_number, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), FileName, my_errno); } DBUG_RETURN(-1); }
O3
c
my_register_filename: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rsi, %r15 testl %edi, %edi js 0x4f279 movl %edi, %ebx leaq 0x387049(%rip), %rax # 0x3d6264 lock incl (%rax) testl $0x2004, %r14d # imm = 0x2004 jne 0x4f2c8 leaq 0x2cd7ce(%rip), %rax # 0x31ca00 cmpl %ebx, (%rax) jbe 0x4f2c8 movl %edx, %r13d leaq 0x387550(%rip), %rax # 0x3d6794 movl (%rax), %edi movq %r15, %rsi movq %r14, %rdx callq 0x48958 leaq 0x2cd7b0(%rip), %rcx # 0x31ca08 movq (%rcx), %rdx movl %ebx, %esi shlq $0x4, %rsi movq %rax, (%rdx,%rsi) leaq 0x386fe4(%rip), %rax # 0x3d6250 incq (%rax) movq (%rcx), %rax movl %r13d, 0x8(%rax,%rsi) jmp 0x4f2c8 movl %ecx, %r12d callq 0x26060 movl (%rax), %ebx callq 0x49666 movl %ebx, (%rax) movl $0xffffffff, %ebx # imm = 0xFFFFFFFF testb $0x19, %r14b je 0x4f2c8 callq 0x49666 cmpl $0x18, (%rax) movl $0x17, %eax cmovel %eax, %r12d andl $0x440, %r14d # imm = 0x440 orq $0x4, %r14 callq 0x49666 movl (%rax), %ecx movl %r12d, %edi movq %r14, %rsi movq %r15, %rdx xorl %eax, %eax callq 0x4e80f movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_register_filename: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rsi test edi, edi js short loc_4F279 mov ebx, edi lea rax, my_file_opened lock inc dword ptr [rax] test r14d, 2004h jnz loc_4F2C8 lea rax, my_file_limit cmp [rax], ebx jbe loc_4F2C8 mov r13d, edx lea rax, key_memory_my_file_info mov edi, [rax] mov rsi, r15 mov rdx, r14 call my_strdup lea rcx, my_file_info mov rdx, [rcx] mov esi, ebx shl rsi, 4 mov [rdx+rsi], rax lea rax, my_file_total_opened inc qword ptr [rax] mov rax, [rcx] mov [rax+rsi+8], r13d jmp short loc_4F2C8 loc_4F279: mov r12d, ecx call ___errno_location mov ebx, [rax] call _my_thread_var mov [rax], ebx mov ebx, 0FFFFFFFFh test r14b, 19h jz short loc_4F2C8 call _my_thread_var cmp dword ptr [rax], 18h mov eax, 17h cmovz r12d, eax and r14d, 440h or r14, 4 call _my_thread_var mov ecx, [rax] mov edi, r12d mov rsi, r14 mov rdx, r15 xor eax, eax call my_error loc_4F2C8: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_register_filename(long long a1, long long a2, int a3, unsigned int a4, __int16 a5) { unsigned int v6; // ebx long long v8; // rax long long v9; // rsi int v11; // ebx unsigned int *v12; // rax if ( (int)a1 < 0 ) { v11 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var() = v11; v6 = -1; if ( (a5 & 0x19) != 0 ) { if ( *(_DWORD *)my_thread_var() == 24 ) a4 = 23; v12 = (unsigned int *)my_thread_var(); my_error(a4, a5 & 0x440 | 4, a2, *v12); } } else { v6 = a1; _InterlockedIncrement(my_file_opened); if ( (a5 & 0x2004) == 0 && my_file_limit > (unsigned int)a1 ) { v8 = my_strdup(key_memory_my_file_info, a2, a5); v9 = 16LL * (unsigned int)a1; *(_QWORD *)((char *)my_file_info + v9) = v8; ++my_file_total_opened; *(_DWORD *)((char *)my_file_info + v9 + 8) = a3; } } return v6; }
my_register_filename: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RSI TEST EDI,EDI JS 0x0014f279 MOV EBX,EDI LEA RAX,[0x4d6264] INC.LOCK dword ptr [RAX] TEST R14D,0x2004 JNZ 0x0014f2c8 LEA RAX,[0x41ca00] CMP dword ptr [RAX],EBX JBE 0x0014f2c8 MOV R13D,EDX LEA RAX,[0x4d6794] MOV EDI,dword ptr [RAX] MOV RSI,R15 MOV RDX,R14 CALL 0x00148958 LEA RCX,[0x41ca08] MOV RDX,qword ptr [RCX] MOV ESI,EBX SHL RSI,0x4 MOV qword ptr [RDX + RSI*0x1],RAX LEA RAX,[0x4d6250] INC qword ptr [RAX] MOV RAX,qword ptr [RCX] MOV dword ptr [RAX + RSI*0x1 + 0x8],R13D JMP 0x0014f2c8 LAB_0014f279: MOV R12D,ECX CALL 0x00126060 MOV EBX,dword ptr [RAX] CALL 0x00149666 MOV dword ptr [RAX],EBX MOV EBX,0xffffffff TEST R14B,0x19 JZ 0x0014f2c8 CALL 0x00149666 CMP dword ptr [RAX],0x18 MOV EAX,0x17 CMOVZ R12D,EAX AND R14D,0x440 OR R14,0x4 CALL 0x00149666 MOV ECX,dword ptr [RAX] MOV EDI,R12D MOV RSI,R14 MOV RDX,R15 XOR EAX,EAX CALL 0x0014e80f LAB_0014f2c8: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint my_register_filename (uint param_1,int8 param_2,int4 param_3,int4 param_4,ulong param_5) { int iVar1; int8 uVar2; int *piVar3; int4 *puVar4; if ((int)param_1 < 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar3 = (int *)_my_thread_var(); *piVar3 = iVar1; param_1 = 0xffffffff; if ((param_5 & 0x19) != 0) { piVar3 = (int *)_my_thread_var(); if (*piVar3 == 0x18) { param_4 = 0x17; } puVar4 = (int4 *)_my_thread_var(); my_error(param_4,(uint)param_5 & 0x440 | 4,param_2,*puVar4); } } else { LOCK(); my_file_opened = my_file_opened + 1; UNLOCK(); if (((param_5 & 0x2004) == 0) && (param_1 < my_file_limit)) { uVar2 = my_strdup(key_memory_my_file_info,param_2,param_5); *(int8 *)(my_file_info + (ulong)param_1 * 0x10) = uVar2; my_file_total_opened = my_file_total_opened + 1; *(int4 *)(my_file_info + (ulong)param_1 * 0x10 + 8) = param_3; } } return param_1; }
44,986
Cache::getBlockId(unsigned int)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/Cache.cpp
uint32_t Cache::getBlockId(uint32_t addr) { uint32_t tag = this->getTag(addr); uint32_t id = this->getId(addr); // printf("0x%x 0x%x 0x%x\n", addr, tag, id); // iterate over the given set for (uint32_t i = id * policy.associativity; i < (id + 1) * policy.associativity; ++i) { if (this->blocks[i].id != id) { fprintf(stderr, "Inconsistent ID in block %d\n", i); exit(-1); } if (this->blocks[i].valid && this->blocks[i].tag == tag) { return i; } } return -1; }
O3
cpp
Cache::getBlockId(unsigned int): pushq %rbp pushq %r14 pushq %rbx movl %esi, %ebp movq %rdi, %r14 callq 0x30be movl %eax, %ebx movq %r14, %rdi movl %ebp, %esi callq 0x3122 movl %eax, %ecx movl 0x3c(%r14), %edx movl %edx, %esi imull %eax, %esi leal 0x1(%rcx), %edi imull %edx, %edi movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl %edi, %esi jae 0x30b3 movq 0x48(%r14), %r8 movl %esi, %edi leaq (%rdi,%rdi,2), %rsi shlq $0x4, %rsi addq %r8, %rsi addq $0x8, %rsi cmpl %ecx, (%rsi) jne 0x30b8 cmpb $0x1, -0x8(%rsi) jne 0x30a4 cmpl %ebx, -0x4(%rsi) je 0x30b1 incq %rdi addq $0x30, %rsi decl %edx jne 0x3095 jmp 0x30b3 movl %edi, %eax popq %rbx popq %r14 popq %rbp retq callq 0x2322 nop
_ZN5Cache10getBlockIdEj: push rbp push r14 push rbx mov ebp, esi mov r14, rdi call _ZN5Cache6getTagEj; Cache::getTag(uint) mov ebx, eax mov rdi, r14; this mov esi, ebp; unsigned int call _ZN5Cache5getIdEj; Cache::getId(uint) mov ecx, eax mov edx, [r14+3Ch] mov esi, edx imul esi, eax lea edi, [rcx+1] imul edi, edx mov eax, 0FFFFFFFFh cmp esi, edi jnb short loc_30B3 mov r8, [r14+48h] mov edi, esi lea rsi, [rdi+rdi*2] shl rsi, 4 add rsi, r8 add rsi, 8 loc_3095: cmp [rsi], ecx jnz short loc_30B8 cmp byte ptr [rsi-8], 1 jnz short loc_30A4 cmp [rsi-4], ebx jz short loc_30B1 loc_30A4: inc rdi add rsi, 30h ; '0' dec edx jnz short loc_3095 jmp short loc_30B3 loc_30B1: mov eax, edi loc_30B3: pop rbx pop r14 pop rbp retn loc_30B8: call _ZN5Cache10getBlockIdEj_cold_1; Cache::getBlockId(uint) [clone]
long long Cache::getBlockId(Cache *this, unsigned int a2) { int Tag; // ebx int Id; // ecx int v5; // edx long long result; // rax unsigned int v7; // edi _DWORD *i; // rsi Tag = Cache::getTag(this, a2); Id = Cache::getId(this, a2); v5 = *((_DWORD *)this + 15); result = 0xFFFFFFFFLL; if ( Id * v5 < (unsigned int)(v5 * (Id + 1)) ) { v7 = Id * v5; for ( i = (_DWORD *)(*((_QWORD *)this + 9) + 48LL * (unsigned int)(Id * v5) + 8); ; i += 12 ) { if ( *i != Id ) Cache::getBlockId(v7); if ( *((_BYTE *)i - 8) == 1 && *(i - 1) == Tag ) break; ++v7; if ( !--v5 ) return result; } return v7; } return result; }
getBlockId: PUSH RBP PUSH R14 PUSH RBX MOV EBP,ESI MOV R14,RDI CALL 0x001030be MOV EBX,EAX MOV RDI,R14 MOV ESI,EBP CALL 0x00103122 MOV ECX,EAX MOV EDX,dword ptr [R14 + 0x3c] MOV ESI,EDX IMUL ESI,EAX LEA EDI,[RCX + 0x1] IMUL EDI,EDX MOV EAX,0xffffffff CMP ESI,EDI JNC 0x001030b3 MOV R8,qword ptr [R14 + 0x48] MOV EDI,ESI LEA RSI,[RDI + RDI*0x2] SHL RSI,0x4 ADD RSI,R8 ADD RSI,0x8 LAB_00103095: CMP dword ptr [RSI],ECX JNZ 0x001030b8 CMP byte ptr [RSI + -0x8],0x1 JNZ 0x001030a4 CMP dword ptr [RSI + -0x4],EBX JZ 0x001030b1 LAB_001030a4: INC RDI ADD RSI,0x30 DEC EDX JNZ 0x00103095 JMP 0x001030b3 LAB_001030b1: MOV EAX,EDI LAB_001030b3: POP RBX POP R14 POP RBP RET LAB_001030b8: CALL 0x00102322 NOP
/* Cache::getBlockId(unsigned int) */ int1 [16] __thiscall Cache::getBlockId(Cache *this,uint param_1) { bool bVar1; int iVar2; int iVar3; ulong uVar4; char cVar5; uint uVar6; ulong uVar7; int *piVar8; ulong uVar9; char cVar10; char cVar11; int1 auVar12 [16]; int1 auVar13 [16]; iVar2 = getTag(this,param_1); iVar3 = getId(this,param_1); uVar6 = *(uint *)(this + 0x3c); uVar7 = (ulong)uVar6; uVar4 = 0xffffffff; if (uVar6 * iVar3 < (iVar3 + 1) * uVar6) { uVar9 = (ulong)(uVar6 * iVar3); piVar8 = (int *)(uVar9 * 0x30 + *(long *)(this + 0x48) + 8); do { if (*piVar8 != iVar3) { getBlockId((uint)uVar9); uVar6 = *(uint *)(uVar9 + 0x34); cVar10 = -1; cVar5 = -1; if (uVar6 != 0) { cVar5 = '\0'; if (uVar6 != 1) { uVar4 = (ulong)uVar6; cVar5 = '\0'; do { uVar4 = uVar4 >> 1; cVar5 = cVar5 + '\x01'; bVar1 = 3 < uVar6; uVar6 = (uint)uVar4; } while (bVar1); } } uVar4 = (ulong)*(uint *)(uVar9 + 0x38) / (ulong)*(uint *)(uVar9 + 0x3c); uVar7 = (ulong)*(uint *)(uVar9 + 0x38) % (ulong)*(uint *)(uVar9 + 0x3c); if ((int)uVar4 != 0) { cVar11 = '\0'; cVar10 = '\0'; if ((int)uVar4 != 1) { do { uVar7 = uVar4 >> 1; cVar10 = cVar11 + '\x01'; uVar6 = (uint)uVar4; uVar4 = uVar7; cVar11 = cVar10; } while (3 < uVar6); } } auVar13._4_4_ = 0; auVar13._0_4_ = (uint)piVar8 >> (cVar10 + cVar5 & 0x1fU) & ~(-1 << (-(cVar10 + cVar5) & 0x1fU)); auVar13._8_8_ = uVar7; return auVar13; } if (((char)piVar8[-2] == '\x01') && (piVar8[-1] == iVar2)) { uVar4 = uVar9 & 0xffffffff; break; } uVar9 = uVar9 + 1; piVar8 = piVar8 + 0xc; uVar6 = (int)uVar7 - 1; uVar7 = (ulong)uVar6; } while (uVar6 != 0); } auVar12._8_8_ = uVar7; auVar12._0_8_ = uVar4; return auVar12; }
44,987
uf_space_endspace
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_endspace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill((uchar*) to,(end-to),' '); else { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); } }
O3
c
uf_space_endspace: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 movl 0x4(%rsi), %eax testl %eax, %eax je 0x82e9a movl (%r15), %r12d decl %eax movl %eax, 0x4(%r15) btl %eax, %r12d jae 0x82eb7 subq %r14, %rbx movq %r14, %rdi movl $0x20, %esi movq %rbx, %rdx jmp 0x82f67 movq %r15, %rdi callq 0x821c9 movl $0x1f, 0x4(%r15) movl (%r15), %r12d movl $0x1f, %eax testl %r12d, %r12d js 0x82e87 movq %r13, %rdx movl 0x1c(%r13), %r13d movl %eax, %ecx subl %r13d, %ecx movq %rdx, -0x30(%rbp) jae 0x82f03 subl %eax, %r13d movl %eax, %eax leaq 0x5e9bb(%rip), %rcx # 0xe1890 andl (%rcx,%rax,4), %r12d movl %r13d, %ecx shll %cl, %r12d movq %r15, %rdi callq 0x821c9 movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r15) movl (%r15), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %r12d jmp 0x82f18 movl %ecx, 0x4(%r15) shrl %cl, %r12d movl 0x1c(%rdx), %eax leaq 0x5e97c(%rip), %rcx # 0xe1890 andl (%rcx,%rax,4), %r12d movl %r12d, %r13d leaq (%r14,%r13), %rax cmpq %rbx, %rax jbe 0x82f3b movl $0x1, 0x28(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, %r12 negq %r12 cmpq %rbx, %rax je 0x82f59 leaq (%rbx,%r12), %rcx movq -0x30(%rbp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x82aba addq %r12, %rbx movq %rbx, %rdi movl $0x20, %esi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x292a0
uf_space_endspace_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rsi mov r13, rdi mov eax, [rsi+4] test eax, eax jz short loc_82E9A mov r12d, [r15] dec eax mov [r15+4], eax bt r12d, eax jnb short loc_82EB7 loc_82E87: sub rbx, r14 mov rdi, r14 mov esi, 20h ; ' ' mov rdx, rbx jmp loc_82F67 loc_82E9A: mov rdi, r15 call fill_buffer_0 mov dword ptr [r15+4], 1Fh mov r12d, [r15] mov eax, 1Fh test r12d, r12d js short loc_82E87 loc_82EB7: mov rdx, r13 mov r13d, [r13+1Ch] mov ecx, eax sub ecx, r13d mov [rbp+var_30], rdx jnb short loc_82F03 sub r13d, eax mov eax, eax lea rcx, mask_0 and r12d, [rcx+rax*4] mov ecx, r13d shl r12d, cl mov rdi, r15 call fill_buffer_0 mov eax, 20h ; ' ' sub eax, r13d mov [r15+4], eax mov eax, [r15] neg r13d mov ecx, r13d shr eax, cl add r12d, eax jmp short loc_82F18 loc_82F03: mov [r15+4], ecx shr r12d, cl mov eax, [rdx+1Ch] lea rcx, mask_0 and r12d, [rcx+rax*4] loc_82F18: mov r13d, r12d lea rax, [r14+r13] cmp rax, rbx jbe short loc_82F3B mov dword ptr [r15+28h], 1 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_82F3B: mov r12, r13 neg r12 cmp rax, rbx jz short loc_82F59 lea rcx, [rbx+r12] mov rdi, [rbp+var_30] mov rsi, r15 mov rdx, r14 call decode_bytes_0 loc_82F59: add rbx, r12 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r13 loc_82F67: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset
unsigned long long uf_space_endspace_0(long long a1, unsigned int *a2, _BYTE *a3, unsigned long long a4) { unsigned int v6; // eax unsigned int v7; // r12d unsigned int v8; // eax unsigned long long result; // rax unsigned int v10; // r13d unsigned int v11; // ecx int v12; // r13d int v13; // r12d unsigned int v14; // r12d v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest((const int *)&v7, v8) ) return memset(a3, 32LL, a4 - (_QWORD)a3); } else { fill_buffer_0((long long)a2); a2[1] = 31; v7 = *a2; v8 = 31; if ( (*a2 & 0x80000000) != 0 ) return memset(a3, 32LL, a4 - (_QWORD)a3); } v10 = *(_DWORD *)(a1 + 28); v11 = v8 - v10; if ( v8 >= v10 ) { a2[1] = v11; v14 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v11); } else { v12 = v10 - v8; v13 = (mask_0[v8] & v7) << v12; fill_buffer_0((long long)a2); a2[1] = 32 - v12; v14 = (*a2 >> -(char)v12) + v13; } result = (unsigned long long)&a3[v14]; if ( result <= a4 ) { if ( result != a4 ) decode_bytes_0(a1, (long long)a2, a3, (_BYTE *)(a4 - v14)); return memset(a4 - v14, 32LL, v14); } else { a2[10] = 1; } return result; }
uf_space_endspace: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R13,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x00182e9a MOV R12D,dword ptr [R15] DEC EAX MOV dword ptr [R15 + 0x4],EAX BT R12D,EAX JNC 0x00182eb7 LAB_00182e87: SUB RBX,R14 MOV RDI,R14 MOV ESI,0x20 MOV RDX,RBX JMP 0x00182f67 LAB_00182e9a: MOV RDI,R15 CALL 0x001821c9 MOV dword ptr [R15 + 0x4],0x1f MOV R12D,dword ptr [R15] MOV EAX,0x1f TEST R12D,R12D JS 0x00182e87 LAB_00182eb7: MOV RDX,R13 MOV R13D,dword ptr [R13 + 0x1c] MOV ECX,EAX SUB ECX,R13D MOV qword ptr [RBP + -0x30],RDX JNC 0x00182f03 SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x1e1890] AND R12D,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL R12D,CL MOV RDI,R15 CALL 0x001821c9 MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R15 + 0x4],EAX MOV EAX,dword ptr [R15] NEG R13D MOV ECX,R13D SHR EAX,CL ADD R12D,EAX JMP 0x00182f18 LAB_00182f03: MOV dword ptr [R15 + 0x4],ECX SHR R12D,CL MOV EAX,dword ptr [RDX + 0x1c] LEA RCX,[0x1e1890] AND R12D,dword ptr [RCX + RAX*0x4] LAB_00182f18: MOV R13D,R12D LEA RAX,[R14 + R13*0x1] CMP RAX,RBX JBE 0x00182f3b MOV dword ptr [R15 + 0x28],0x1 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00182f3b: MOV R12,R13 NEG R12 CMP RAX,RBX JZ 0x00182f59 LEA RCX,[RBX + R12*0x1] MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R15 MOV RDX,R14 CALL 0x00182aba LAB_00182f59: ADD RBX,R12 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R13 LAB_00182f67: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001292a0
void uf_space_endspace(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; size_t __n; uint uVar5; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar5 = *param_2; uVar3 = 0x1f; if (-1 < (int)uVar5) goto LAB_00182eb7; } else { uVar5 = *param_2; uVar3 = param_2[1] - 1; param_2[1] = uVar3; if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) { LAB_00182eb7: uVar1 = *(uint *)(param_1 + 0x1c); if (uVar3 < uVar1) { uVar2 = (&mask)[uVar3]; bVar4 = (byte)(uVar1 - uVar3); fill_buffer(param_2); param_2[1] = 0x20 - (uVar1 - uVar3); uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f)); } else { param_2[1] = uVar3 - uVar1; uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)]; } __n = (size_t)uVar5; if (param_4 < (long)param_3 + __n) { param_2[10] = 1; return; } if ((long)param_3 + __n != param_4) { decode_bytes(param_1,param_2,param_3,param_4 + -__n); } param_3 = (void *)(param_4 + -__n); goto LAB_00182f67; } } __n = param_4 - (long)param_3; LAB_00182f67: memset(param_3,0x20,__n); return; }
44,988
mi_keydef_write
eloqsql/storage/myisam/mi_open.c
uint mi_keydef_write(File file, MI_KEYDEF *keydef) { uchar buff[MI_KEYDEF_SIZE]; uchar *ptr=buff; *ptr++ = (uchar) keydef->keysegs; *ptr++ = keydef->key_alg; /* Rtree or Btree */ mi_int2store(ptr,keydef->flag); ptr +=2; mi_int2store(ptr,keydef->block_length); ptr +=2; mi_int2store(ptr,keydef->keylength); ptr +=2; mi_int2store(ptr,keydef->minlength); ptr +=2; mi_int2store(ptr,keydef->maxlength); ptr +=2; return mysql_file_write(file, buff, (size_t) (ptr-buff), MYF(MY_NABP)) != 0; }
O3
c
mi_keydef_write: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x70, %rsp movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movb 0x8(%rsi), %al movb %al, -0x24(%rbp) movb 0xc(%rsi), %al movb %al, -0x23(%rbp) movzwl 0xa(%rsi), %eax rolw $0x8, %ax movw %ax, -0x22(%rbp) movzwl 0xe(%rsi), %eax rolw $0x8, %ax movw %ax, -0x20(%rbp) movzwl 0x12(%rsi), %eax rolw $0x8, %ax movw %ax, -0x1e(%rbp) movzwl 0x14(%rsi), %eax rolw $0x8, %ax movw %ax, -0x1c(%rbp) movzwl 0x16(%rsi), %eax rolw $0x8, %ax movl %edi, %ebx movw %ax, -0x1a(%rbp) leaq 0x30b7be(%rip), %rax # 0x390ed8 movq (%rax), %rax leaq -0x78(%rbp), %rdi movl %ebx, %esi movl $0x7, %edx callq *0x158(%rax) testq %rax, %rax jne 0x8576d leaq -0x24(%rbp), %rsi movl $0xc, %edx movl $0x4, %ecx movl %ebx, %edi callq 0x303a4 movq %rax, %rcx xorl %eax, %eax testq %rcx, %rcx setne %cl movq %fs:0x28, %rdx cmpq -0x18(%rbp), %rdx jne 0x85787 movb %cl, %al addq $0x70, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x24(%rbp), %rdx leaq -0x30(%rbp), %r14 movq %rax, %rdi movl %ebx, %esi movq %r14, %rcx callq 0x2f455 movq (%r14), %rcx jmp 0x8574b callq 0x2a240
mi_keydef_write: push rbp mov rbp, rsp push r14 push rbx sub rsp, 70h mov rax, fs:28h mov [rbp+var_18], rax mov al, [rsi+8] mov [rbp+var_24], al mov al, [rsi+0Ch] mov [rbp+var_23], al movzx eax, word ptr [rsi+0Ah] rol ax, 8 mov [rbp+var_22], ax movzx eax, word ptr [rsi+0Eh] rol ax, 8 mov [rbp+var_20], ax movzx eax, word ptr [rsi+12h] rol ax, 8 mov [rbp+var_1E], ax movzx eax, word ptr [rsi+14h] rol ax, 8 mov [rbp+var_1C], ax movzx eax, word ptr [rsi+16h] rol ax, 8 mov ebx, edi mov [rbp+var_1A], ax lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_78] mov esi, ebx mov edx, 7 call qword ptr [rax+158h] test rax, rax jnz short loc_8576D lea rsi, [rbp+var_24] mov edx, 0Ch mov ecx, 4 mov edi, ebx call my_write mov rcx, rax loc_8574B: xor eax, eax test rcx, rcx setnz cl mov rdx, fs:28h cmp rdx, [rbp+var_18] jnz short loc_85787 mov al, cl add rsp, 70h pop rbx pop r14 pop rbp retn loc_8576D: lea rdx, [rbp+var_24] lea r14, [rbp+var_30] mov rdi, rax mov esi, ebx mov rcx, r14 call mi_keydef_write_cold_1 mov rcx, [r14] jmp short loc_8574B loc_85787: call ___stack_chk_fail
bool mi_keydef_write(unsigned int a1, long long a2) { long long v2; // rax long long v3; // rcx _BYTE v6[72]; // [rsp+8h] [rbp-78h] BYREF long long v7; // [rsp+50h] [rbp-30h] BYREF _BYTE v8[2]; // [rsp+5Ch] [rbp-24h] BYREF __int16 v9; // [rsp+5Eh] [rbp-22h] __int16 v10; // [rsp+60h] [rbp-20h] __int16 v11; // [rsp+62h] [rbp-1Eh] __int16 v12; // [rsp+64h] [rbp-1Ch] __int16 v13; // [rsp+66h] [rbp-1Ah] unsigned long long v14; // [rsp+68h] [rbp-18h] v14 = __readfsqword(0x28u); v8[0] = *(_BYTE *)(a2 + 8); v8[1] = *(_BYTE *)(a2 + 12); v9 = __ROL2__(*(_WORD *)(a2 + 10), 8); v10 = __ROL2__(*(_WORD *)(a2 + 14), 8); v11 = __ROL2__(*(_WORD *)(a2 + 18), 8); v12 = __ROL2__(*(_WORD *)(a2 + 20), 8); v13 = __ROL2__(*(_WORD *)(a2 + 22), 8); v2 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v6, a1, 7LL); if ( v2 ) { mi_keydef_write_cold_1(v2, a1, (long long)v8, &v7); v3 = v7; } else { v3 = my_write(a1, (long long)v8, 12LL, 4LL); } return v3 != 0; }
mi_keydef_write: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x70 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOV AL,byte ptr [RSI + 0x8] MOV byte ptr [RBP + -0x24],AL MOV AL,byte ptr [RSI + 0xc] MOV byte ptr [RBP + -0x23],AL MOVZX EAX,word ptr [RSI + 0xa] ROL AX,0x8 MOV word ptr [RBP + -0x22],AX MOVZX EAX,word ptr [RSI + 0xe] ROL AX,0x8 MOV word ptr [RBP + -0x20],AX MOVZX EAX,word ptr [RSI + 0x12] ROL AX,0x8 MOV word ptr [RBP + -0x1e],AX MOVZX EAX,word ptr [RSI + 0x14] ROL AX,0x8 MOV word ptr [RBP + -0x1c],AX MOVZX EAX,word ptr [RSI + 0x16] ROL AX,0x8 MOV EBX,EDI MOV word ptr [RBP + -0x1a],AX LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x78] MOV ESI,EBX MOV EDX,0x7 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x0018576d LEA RSI,[RBP + -0x24] MOV EDX,0xc MOV ECX,0x4 MOV EDI,EBX CALL 0x001303a4 MOV RCX,RAX LAB_0018574b: XOR EAX,EAX TEST RCX,RCX SETNZ CL MOV RDX,qword ptr FS:[0x28] CMP RDX,qword ptr [RBP + -0x18] JNZ 0x00185787 MOV AL,CL ADD RSP,0x70 POP RBX POP R14 POP RBP RET LAB_0018576d: LEA RDX,[RBP + -0x24] LEA R14,[RBP + -0x30] MOV RDI,RAX MOV ESI,EBX MOV RCX,R14 CALL 0x0012f455 MOV RCX,qword ptr [R14] JMP 0x0018574b LAB_00185787: CALL 0x0012a240
bool mi_keydef_write(int4 param_1,long param_2) { long lVar1; long in_FS_OFFSET; int1 local_80 [72]; long local_38; int1 local_2c; int1 local_2b; ushort local_2a; ushort local_28; ushort local_26; ushort local_24; ushort local_22; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); local_2c = *(int1 *)(param_2 + 8); local_2b = *(int1 *)(param_2 + 0xc); local_2a = *(ushort *)(param_2 + 10) << 8 | *(ushort *)(param_2 + 10) >> 8; local_28 = *(ushort *)(param_2 + 0xe) << 8 | *(ushort *)(param_2 + 0xe) >> 8; local_26 = *(ushort *)(param_2 + 0x12) << 8 | *(ushort *)(param_2 + 0x12) >> 8; local_24 = *(ushort *)(param_2 + 0x14) << 8 | *(ushort *)(param_2 + 0x14) >> 8; local_22 = *(ushort *)(param_2 + 0x16) << 8 | *(ushort *)(param_2 + 0x16) >> 8; lVar1 = (**(code **)(PSI_server + 0x158))(local_80,param_1,7); if (lVar1 == 0) { local_38 = my_write(param_1,&local_2c,0xc,4); } else { mi_keydef_write_cold_1(lVar1,param_1,&local_2c,&local_38); } if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return local_38 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
44,989
js_os_utimes
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_utimes(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; int64_t atime, mtime; int ret; if (JS_ToInt64(ctx, &atime, argv[1])) return JS_EXCEPTION; if (JS_ToInt64(ctx, &mtime, argv[2])) return JS_EXCEPTION; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; #if defined(_WIN32) { struct _utimbuf times; times.actime = atime / 1000; times.modtime = mtime / 1000; ret = js_get_errno(_utime(path, &times)); } #else { struct timeval times[2]; ms_to_timeval(&times[0], atime); ms_to_timeval(&times[1], mtime); ret = js_get_errno(utimes(path, times)); } #endif JS_FreeCString(ctx, path); return JS_NewInt32(ctx, ret); }
O0
c
js_os_utimes: subq $0xa8, %rsp movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq %rdi, 0x60(%rsp) movl %ecx, 0x5c(%rsp) movq %r8, 0x50(%rsp) movq 0x60(%rsp), %rdi movq 0x50(%rsp), %rax movq 0x10(%rax), %rdx movq 0x18(%rax), %rcx leaq 0x40(%rsp), %rsi callq 0x38bf0 cmpl $0x0, %eax je 0x1b1b9 movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x1b2cb movq 0x60(%rsp), %rdi movq 0x50(%rsp), %rax movq 0x20(%rax), %rdx movq 0x28(%rax), %rcx leaq 0x38(%rsp), %rsi callq 0x38bf0 cmpl $0x0, %eax je 0x1b1f3 movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x1b2cb movq 0x60(%rsp), %rdi movq 0x50(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x147e0 movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) jne 0x1b22f movl $0x0, 0x78(%rsp) movq $0x6, 0x80(%rsp) jmp 0x1b2cb movq 0x40(%rsp), %rsi leaq 0x10(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x1d0f0 leaq 0x20(%rsp), %rdi movq 0x38(%rsp), %rsi callq 0x1d0f0 movq 0x8(%rsp), %rsi movq 0x48(%rsp), %rdi callq 0xe4e0 movslq %eax, %rdi callq 0x13a50 movl %eax, 0x34(%rsp) movq 0x60(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x29e50 movq 0x60(%rsp), %rcx movl 0x34(%rsp), %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) movl 0x8c(%rsp), %eax movl %eax, 0x98(%rsp) movq $0x0, 0xa0(%rsp) movq 0x98(%rsp), %rcx movq 0xa0(%rsp), %rax movq %rcx, 0x78(%rsp) movq %rax, 0x80(%rsp) movq 0x78(%rsp), %rax movq 0x80(%rsp), %rdx addq $0xa8, %rsp retq
js_os_utimes: sub rsp, 0A8h mov [rsp+0A8h+var_40], rsi mov [rsp+0A8h+var_38], rdx mov [rsp+0A8h+var_48], rdi mov [rsp+0A8h+var_4C], ecx mov [rsp+0A8h+var_58], r8 mov rdi, [rsp+0A8h+var_48] mov rax, [rsp+0A8h+var_58] mov rdx, [rax+10h] mov rcx, [rax+18h] lea rsi, [rsp+0A8h+var_68] call JS_ToInt64 cmp eax, 0 jz short loc_1B1B9 mov dword ptr [rsp+0A8h+var_30], 0 mov [rsp+0A8h+var_28], 6 jmp loc_1B2CB loc_1B1B9: mov rdi, [rsp+0A8h+var_48] mov rax, [rsp+0A8h+var_58] mov rdx, [rax+20h] mov rcx, [rax+28h] lea rsi, [rsp+0A8h+var_70] call JS_ToInt64 cmp eax, 0 jz short loc_1B1F3 mov dword ptr [rsp+0A8h+var_30], 0 mov [rsp+0A8h+var_28], 6 jmp loc_1B2CB loc_1B1F3: mov rdi, [rsp+0A8h+var_48] mov rax, [rsp+0A8h+var_58] mov rsi, [rax] mov rdx, [rax+8] call JS_ToCString mov [rsp+0A8h+var_60], rax cmp [rsp+0A8h+var_60], 0 jnz short loc_1B22F mov dword ptr [rsp+0A8h+var_30], 0 mov [rsp+0A8h+var_28], 6 jmp loc_1B2CB loc_1B22F: mov rsi, [rsp+0A8h+var_68] lea rdi, [rsp+0A8h+var_98] mov [rsp+0A8h+var_A0], rdi call ms_to_timeval lea rdi, [rsp+0A8h+var_88] mov rsi, [rsp+0A8h+var_70] call ms_to_timeval mov rsi, [rsp+0A8h+var_A0] mov rdi, [rsp+0A8h+var_60] call _utimes movsxd rdi, eax call js_get_errno mov [rsp+0A8h+var_74], eax mov rdi, [rsp+0A8h+var_48] mov rsi, [rsp+0A8h+var_60] call JS_FreeCString mov rcx, [rsp+0A8h+var_48] mov eax, [rsp+0A8h+var_74] mov [rsp+0A8h+var_18], rcx mov [rsp+0A8h+var_1C], eax mov eax, [rsp+0A8h+var_1C] mov dword ptr [rsp+0A8h+var_10], eax mov [rsp+0A8h+var_8], 0 mov rcx, [rsp+0A8h+var_10] mov rax, [rsp+0A8h+var_8] mov [rsp+0A8h+var_30], rcx mov [rsp+0A8h+var_28], rax loc_1B2CB: mov rax, [rsp+0A8h+var_30] mov rdx, [rsp+0A8h+var_28] add rsp, 0A8h retn
long long js_os_utimes(long long a1, long long a2, long long a3, int a4, long long *a5) { int v5; // eax _BYTE v7[16]; // [rsp+10h] [rbp-98h] BYREF _BYTE v8[20]; // [rsp+20h] [rbp-88h] BYREF int errno; // [rsp+34h] [rbp-74h] long long v10; // [rsp+38h] [rbp-70h] BYREF long long v11; // [rsp+40h] [rbp-68h] BYREF long long v12; // [rsp+48h] [rbp-60h] long long *v13; // [rsp+50h] [rbp-58h] int v14; // [rsp+5Ch] [rbp-4Ch] long long v15; // [rsp+60h] [rbp-48h] long long v16; // [rsp+68h] [rbp-40h] long long v17; // [rsp+70h] [rbp-38h] long long v18; // [rsp+78h] [rbp-30h] long long v19; // [rsp+80h] [rbp-28h] int v20; // [rsp+8Ch] [rbp-1Ch] long long v21; // [rsp+90h] [rbp-18h] long long v22; // [rsp+98h] [rbp-10h] long long v23; // [rsp+A0h] [rbp-8h] v16 = a2; v17 = a3; v15 = a1; v14 = a4; v13 = a5; if ( (unsigned int)JS_ToInt64(a1, &v11, a5[2], a5[3]) ) { LODWORD(v18) = 0; v19 = 6LL; } else if ( (unsigned int)JS_ToInt64(v15, &v10, v13[4], v13[5]) ) { LODWORD(v18) = 0; v19 = 6LL; } else { v12 = JS_ToCString(v15, *v13, v13[1]); if ( v12 ) { ms_to_timeval(v7, v11); ms_to_timeval(v8, v10); v5 = utimes(v12, v7); errno = js_get_errno(v5); JS_FreeCString(v15, v12); v21 = v15; v20 = errno; LODWORD(v22) = errno; v23 = 0LL; v18 = v22; v19 = 0LL; } else { LODWORD(v18) = 0; v19 = 6LL; } } return v18; }
js_os_utimes: SUB RSP,0xa8 MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x60],RDI MOV dword ptr [RSP + 0x5c],ECX MOV qword ptr [RSP + 0x50],R8 MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x18] LEA RSI,[RSP + 0x40] CALL 0x00138bf0 CMP EAX,0x0 JZ 0x0011b1b9 MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x0011b2cb LAB_0011b1b9: MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x28] LEA RSI,[RSP + 0x38] CALL 0x00138bf0 CMP EAX,0x0 JZ 0x0011b1f3 MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x0011b2cb LAB_0011b1f3: MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001147e0 MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],0x0 JNZ 0x0011b22f MOV dword ptr [RSP + 0x78],0x0 MOV qword ptr [RSP + 0x80],0x6 JMP 0x0011b2cb LAB_0011b22f: MOV RSI,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI CALL 0x0011d0f0 LEA RDI,[RSP + 0x20] MOV RSI,qword ptr [RSP + 0x38] CALL 0x0011d0f0 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x48] CALL 0x0010e4e0 MOVSXD RDI,EAX CALL 0x00113a50 MOV dword ptr [RSP + 0x34],EAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00129e50 MOV RCX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RSP + 0x34] MOV qword ptr [RSP + 0x90],RCX MOV dword ptr [RSP + 0x8c],EAX MOV EAX,dword ptr [RSP + 0x8c] MOV dword ptr [RSP + 0x98],EAX MOV qword ptr [RSP + 0xa0],0x0 MOV RCX,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x80],RAX LAB_0011b2cb: MOV RAX,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x80] ADD RSP,0xa8 RET
int1 [16] js_os_utimes(int8 param_1,int8 param_2,int8 param_3,int4 param_4, int8 *param_5) { int1 auVar1 [16]; int iVar2; timeval local_98; int1 local_88 [20]; int4 local_74; int8 local_70; int8 local_68; char *local_60; int8 *local_58; int4 local_4c; int8 local_48; int8 local_40; int8 local_38; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; local_58 = param_5; local_4c = param_4; local_48 = param_1; local_40 = param_2; local_38 = param_3; iVar2 = JS_ToInt64(param_1,&local_68,param_5[2],param_5[3]); if (iVar2 == 0) { iVar2 = JS_ToInt64(local_48,&local_70,local_58[4],local_58[5]); if (iVar2 == 0) { local_60 = (char *)JS_ToCString(local_48,*local_58,local_58[1]); if (local_60 == (char *)0x0) { local_30 = 0; local_28 = 6; } else { ms_to_timeval(&local_98,local_68); ms_to_timeval(local_88,local_70); iVar2 = utimes(local_60,&local_98); local_74 = js_get_errno((long)iVar2); JS_FreeCString(local_48,local_60); local_30 = local_74; uStack_2c = uStack_c; local_28 = 0; } } else { local_30 = 0; local_28 = 6; } } else { local_30 = 0; local_28 = 6; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
44,990
js_os_utimes
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_utimes(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; int64_t atime, mtime; int ret; if (JS_ToInt64(ctx, &atime, argv[1])) return JS_EXCEPTION; if (JS_ToInt64(ctx, &mtime, argv[2])) return JS_EXCEPTION; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; #if defined(_WIN32) { struct _utimbuf times; times.actime = atime / 1000; times.modtime = mtime / 1000; ret = js_get_errno(_utime(path, &times)); } #else { struct timeval times[2]; ms_to_timeval(&times[0], atime); ms_to_timeval(&times[1], mtime); ret = js_get_errno(utimes(path, times)); } #endif JS_FreeCString(ctx, path); return JS_NewInt32(ctx, ret); }
O1
c
js_os_utimes: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %r8, %r14 movq %rdi, %rbx movq 0x10(%r8), %rdx movq 0x18(%r8), %rcx leaq 0x8(%rsp), %rsi callq 0x278b4 movl $0x6, %r15d testl %eax, %eax jne 0x19cae movq 0x20(%r14), %rdx movq 0x28(%r14), %rcx movq %rsp, %rsi movq %rbx, %rdi callq 0x278b4 testl %eax, %eax je 0x19cc4 xorl %r12d, %r12d movq %r12, %rax movq %r15, %rdx addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq (%r14), %rdx movq 0x8(%r14), %rcx xorl %r12d, %r12d movq %rbx, %rdi xorl %esi, %esi xorl %r8d, %r8d callq 0x20bf7 testq %rax, %rax je 0x19cb1 movq %rax, %r14 movq 0x8(%rsp), %rcx movq %rcx, %rax shrq $0x3, %rax movabsq $0x20c49ba5e353f7cf, %rdi # imm = 0x20C49BA5E353F7CF mulq %rdi shrq $0x4, %rdx leaq 0x10(%rsp), %rsi movq %rdx, (%rsi) imulq $0x3e8, %rdx, %rax # imm = 0x3E8 subq %rax, %rcx movq (%rsp), %r8 movq %r8, %rax shrq $0x3, %rax mulq %rdi imulq $0x3e8, %rcx, %rax # imm = 0x3E8 movq %rax, 0x8(%rsi) shrq $0x4, %rdx movq %rdx, 0x10(%rsi) imulq $0x3e8, %rdx, %rax # imm = 0x3E8 subq %rax, %r8 imulq $0x3e8, %r8, %rax # imm = 0x3E8 movq %rax, 0x18(%rsi) movq %r14, %rdi callq 0xe4e0 movl %eax, %ebp cmpl $-0x1, %eax jne 0x19d60 callq 0xe0b0 xorl %ebp, %ebp subl (%rax), %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x20edd movl %ebp, %r12d xorl %r15d, %r15d jmp 0x19cb1
js_os_utimes: push rbp push r15 push r14 push r12 push rbx sub rsp, 30h mov r14, r8 mov rbx, rdi mov rdx, [r8+10h] mov rcx, [r8+18h] lea rsi, [rsp+58h+var_50] call JS_ToInt64 mov r15d, 6 test eax, eax jnz short loc_19CAE mov rdx, [r14+20h] mov rcx, [r14+28h] mov rsi, rsp mov rdi, rbx call JS_ToInt64 test eax, eax jz short loc_19CC4 loc_19CAE: xor r12d, r12d loc_19CB1: mov rax, r12 mov rdx, r15 add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_19CC4: mov rdx, [r14] mov rcx, [r14+8] xor r12d, r12d mov rdi, rbx xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_19CB1 mov r14, rax mov rcx, [rsp+58h+var_50] mov rax, rcx shr rax, 3 mov rdi, 20C49BA5E353F7CFh mul rdi shr rdx, 4 lea rsi, [rsp+58h+var_48] mov [rsi], rdx imul rax, rdx, 3E8h sub rcx, rax mov r8, [rsp+58h+var_58] mov rax, r8 shr rax, 3 mul rdi imul rax, rcx, 3E8h mov [rsi+8], rax shr rdx, 4 mov [rsi+10h], rdx imul rax, rdx, 3E8h sub r8, rax imul rax, r8, 3E8h mov [rsi+18h], rax mov rdi, r14 call _utimes mov ebp, eax cmp eax, 0FFFFFFFFh jnz short loc_19D60 call ___errno_location xor ebp, ebp sub ebp, [rax] loc_19D60: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov r12d, ebp xor r15d, r15d jmp loc_19CB1
long long js_os_utimes(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v7; // r12 long long v9; // rax long long v10; // r14 long long v11; // rdi unsigned int v12; // ebp unsigned long long v13; // [rsp+0h] [rbp-58h] BYREF _QWORD v14[10]; // [rsp+8h] [rbp-50h] BYREF if ( (unsigned int)JS_ToInt64(a1, v14, a5[2], a5[3]) || (unsigned int)JS_ToInt64(a1, &v13, a5[4], a5[5]) ) return 0LL; v7 = 0LL; v9 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL); if ( v9 ) { v10 = v9; v14[1] = v14[0] / 0x3E8uLL; v14[2] = 1000 * (v14[0] % 0x3E8uLL); v14[3] = v13 / 0x3E8; v14[4] = 1000 * (v13 % 0x3E8); v11 = v9; v12 = utimes(v9); if ( v12 == -1 ) v12 = -*(_DWORD *)__errno_location(v11); JS_FreeCString(a1, v10); return v12; } return v7; }
js_os_utimes: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R14,R8 MOV RBX,RDI MOV RDX,qword ptr [R8 + 0x10] MOV RCX,qword ptr [R8 + 0x18] LEA RSI,[RSP + 0x8] CALL 0x001278b4 MOV R15D,0x6 TEST EAX,EAX JNZ 0x00119cae MOV RDX,qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x28] MOV RSI,RSP MOV RDI,RBX CALL 0x001278b4 TEST EAX,EAX JZ 0x00119cc4 LAB_00119cae: XOR R12D,R12D LAB_00119cb1: MOV RAX,R12 MOV RDX,R15 ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00119cc4: MOV RDX,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] XOR R12D,R12D MOV RDI,RBX XOR ESI,ESI XOR R8D,R8D CALL 0x00120bf7 TEST RAX,RAX JZ 0x00119cb1 MOV R14,RAX MOV RCX,qword ptr [RSP + 0x8] MOV RAX,RCX SHR RAX,0x3 MOV RDI,0x20c49ba5e353f7cf MUL RDI SHR RDX,0x4 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RDX IMUL RAX,RDX,0x3e8 SUB RCX,RAX MOV R8,qword ptr [RSP] MOV RAX,R8 SHR RAX,0x3 MUL RDI IMUL RAX,RCX,0x3e8 MOV qword ptr [RSI + 0x8],RAX SHR RDX,0x4 MOV qword ptr [RSI + 0x10],RDX IMUL RAX,RDX,0x3e8 SUB R8,RAX IMUL RAX,R8,0x3e8 MOV qword ptr [RSI + 0x18],RAX MOV RDI,R14 CALL 0x0010e4e0 MOV EBP,EAX CMP EAX,-0x1 JNZ 0x00119d60 CALL 0x0010e0b0 XOR EBP,EBP SUB EBP,dword ptr [RAX] LAB_00119d60: MOV RDI,RBX MOV RSI,R14 CALL 0x00120edd MOV R12D,EBP XOR R15D,R15D JMP 0x00119cb1
int js_os_utimes(int8 param_1) { int iVar1; char *__file; int *piVar2; int8 *in_R8; ulong local_58; ulong local_50; timeval local_48; ulong local_38; long local_30; iVar1 = JS_ToInt64(param_1,&local_50,in_R8[2],in_R8[3]); if ((iVar1 == 0) && (iVar1 = JS_ToInt64(param_1,&local_58,in_R8[4],in_R8[5]), iVar1 == 0)) { __file = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0); if (__file == (char *)0x0) { return 0; } local_48.tv_sec = local_50 / 1000; local_48.tv_usec = (local_50 % 1000) * 1000; local_38 = local_58 / 1000; local_30 = (local_58 % 1000) * 1000; iVar1 = utimes(__file,&local_48); if (iVar1 == -1) { piVar2 = __errno_location(); iVar1 = -*piVar2; } JS_FreeCString(param_1,__file); return iVar1; } return 0; }
44,991
js_os_utimes
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_utimes(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; int64_t atime, mtime; int ret; if (JS_ToInt64(ctx, &atime, argv[1])) return JS_EXCEPTION; if (JS_ToInt64(ctx, &mtime, argv[2])) return JS_EXCEPTION; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; #if defined(_WIN32) { struct _utimbuf times; times.actime = atime / 1000; times.modtime = mtime / 1000; ret = js_get_errno(_utime(path, &times)); } #else { struct timeval times[2]; ms_to_timeval(&times[0], atime); ms_to_timeval(&times[1], mtime); ret = js_get_errno(utimes(path, times)); } #endif JS_FreeCString(ctx, path); return JS_NewInt32(ctx, ret); }
O2
c
js_os_utimes: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r15 movq %rdi, %rbx movq 0x10(%r8), %rdx movq 0x18(%r8), %rcx leaq 0x8(%rsp), %rsi callq 0x214fe pushq $0x6 popq %r14 testl %eax, %eax jne 0x14760 movq 0x20(%r15), %rdx movq 0x28(%r15), %rcx movq %rsp, %rsi movq %rbx, %rdi callq 0x214fe testl %eax, %eax je 0x14771 xorl %eax, %eax movq %r14, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbx, %rdi callq 0x11a6c testq %rax, %rax je 0x14760 movq %rax, %r15 movq 0x8(%rsp), %rax movl $0x3e8, %ecx # imm = 0x3E8 xorl %edx, %edx divq %rcx leaq 0x10(%rsp), %rsi movq %rax, (%rsi) imulq $0x3e8, %rdx, %rax # imm = 0x3E8 movq %rax, 0x8(%rsi) movq (%rsp), %rax xorl %edx, %edx divq %rcx xorl %r14d, %r14d movq %rax, 0x10(%rsi) imulq $0x3e8, %rdx, %rax # imm = 0x3E8 movq %rax, 0x18(%rsi) movq %r15, %rdi callq 0xe4f0 movslq %eax, %rdi callq 0x113ab movq %rax, %r12 movq %rbx, %rdi movq %r15, %rsi callq 0x1b057 movl %r12d, %eax jmp 0x14762
js_os_utimes: push r15 push r14 push r12 push rbx sub rsp, 38h mov r15, r8 mov rbx, rdi mov rdx, [r8+10h] mov rcx, [r8+18h] lea rsi, [rsp+58h+var_50] call JS_ToInt64 push 6 pop r14 test eax, eax jnz short loc_14760 mov rdx, [r15+20h] mov rcx, [r15+28h] mov rsi, rsp mov rdi, rbx call JS_ToInt64 test eax, eax jz short loc_14771 loc_14760: xor eax, eax loc_14762: mov rdx, r14 add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_14771: mov rsi, [r15] mov rdx, [r15+8] mov rdi, rbx call JS_ToCString test rax, rax jz short loc_14760 mov r15, rax mov rax, [rsp+58h+var_50] mov ecx, 3E8h xor edx, edx div rcx lea rsi, [rsp+58h+var_48] mov [rsi], rax imul rax, rdx, 3E8h mov [rsi+8], rax mov rax, [rsp+58h+var_58] xor edx, edx div rcx xor r14d, r14d mov [rsi+10h], rax imul rax, rdx, 3E8h mov [rsi+18h], rax mov rdi, r15 call _utimes movsxd rdi, eax call js_get_errno mov r12, rax mov rdi, rbx mov rsi, r15 call JS_FreeCString mov eax, r12d jmp loc_14762
long long js_os_utimes(long long a1, long long a2, long long a3, long long a4, long long *a5) { long long v7; // rax long long v8; // r15 int v9; // eax unsigned int errno; // r12d unsigned long long v11; // [rsp+0h] [rbp-58h] BYREF _QWORD v12[10]; // [rsp+8h] [rbp-50h] BYREF if ( (unsigned int)JS_ToInt64(a1, v12, a5[2], a5[3]) ) return 0LL; if ( (unsigned int)JS_ToInt64(a1, &v11, a5[4], a5[5]) ) return 0LL; v7 = JS_ToCString(a1, *a5, a5[1]); if ( !v7 ) return 0LL; v8 = v7; v12[1] = v12[0] / 0x3E8uLL; v12[2] = 1000 * (v12[0] % 0x3E8uLL); v12[3] = v11 / 0x3E8; v12[4] = 1000 * (v11 % 0x3E8); v9 = utimes(v7); errno = js_get_errno(v9); JS_FreeCString(a1, v8); return errno; }
js_os_utimes: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,R8 MOV RBX,RDI MOV RDX,qword ptr [R8 + 0x10] MOV RCX,qword ptr [R8 + 0x18] LEA RSI,[RSP + 0x8] CALL 0x001214fe PUSH 0x6 POP R14 TEST EAX,EAX JNZ 0x00114760 MOV RDX,qword ptr [R15 + 0x20] MOV RCX,qword ptr [R15 + 0x28] MOV RSI,RSP MOV RDI,RBX CALL 0x001214fe TEST EAX,EAX JZ 0x00114771 LAB_00114760: XOR EAX,EAX LAB_00114762: MOV RDX,R14 ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET LAB_00114771: MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x00111a6c TEST RAX,RAX JZ 0x00114760 MOV R15,RAX MOV RAX,qword ptr [RSP + 0x8] MOV ECX,0x3e8 XOR EDX,EDX DIV RCX LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RAX IMUL RAX,RDX,0x3e8 MOV qword ptr [RSI + 0x8],RAX MOV RAX,qword ptr [RSP] XOR EDX,EDX DIV RCX XOR R14D,R14D MOV qword ptr [RSI + 0x10],RAX IMUL RAX,RDX,0x3e8 MOV qword ptr [RSI + 0x18],RAX MOV RDI,R15 CALL 0x0010e4f0 MOVSXD RDI,EAX CALL 0x001113ab MOV R12,RAX MOV RDI,RBX MOV RSI,R15 CALL 0x0011b057 MOV EAX,R12D JMP 0x00114762
int4 js_os_utimes(int8 param_1) { int iVar1; int4 uVar2; char *__file; int8 *in_R8; ulong local_58; ulong local_50; timeval local_48; ulong local_38; long local_30; iVar1 = JS_ToInt64(param_1,&local_50,in_R8[2],in_R8[3]); if (((iVar1 == 0) && (iVar1 = JS_ToInt64(param_1,&local_58,in_R8[4],in_R8[5]), iVar1 == 0)) && (__file = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]), __file != (char *)0x0)) { local_48.tv_sec = local_50 / 1000; local_48.tv_usec = (local_50 % 1000) * 1000; local_38 = local_58 / 1000; local_30 = (local_58 % 1000) * 1000; iVar1 = utimes(__file,&local_48); uVar2 = js_get_errno((long)iVar1); JS_FreeCString(param_1,__file); return uVar2; } return 0; }
44,992
js_os_utimes
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_os_utimes(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *path; int64_t atime, mtime; int ret; if (JS_ToInt64(ctx, &atime, argv[1])) return JS_EXCEPTION; if (JS_ToInt64(ctx, &mtime, argv[2])) return JS_EXCEPTION; path = JS_ToCString(ctx, argv[0]); if (!path) return JS_EXCEPTION; #if defined(_WIN32) { struct _utimbuf times; times.actime = atime / 1000; times.modtime = mtime / 1000; ret = js_get_errno(_utime(path, &times)); } #else { struct timeval times[2]; ms_to_timeval(&times[0], atime); ms_to_timeval(&times[1], mtime); ret = js_get_errno(utimes(path, times)); } #endif JS_FreeCString(ctx, path); return JS_NewInt32(ctx, ret); }
O3
c
js_os_utimes: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %r8, %r14 movq %rdi, %rbx movq 0x10(%r8), %rdx movq 0x18(%r8), %rcx leaq 0x8(%rsp), %rsi callq 0x27f5d movl $0x6, %r15d testl %eax, %eax jne 0x1a6b5 movq 0x20(%r14), %rdx movq 0x28(%r14), %rcx movq %rsp, %rsi movq %rbx, %rdi callq 0x27f5d testl %eax, %eax je 0x1a6cb xorl %r12d, %r12d movq %r12, %rax movq %r15, %rdx addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq (%r14), %rdx movq 0x8(%r14), %rcx xorl %r12d, %r12d movq %rbx, %rdi xorl %esi, %esi xorl %r8d, %r8d callq 0x21353 testq %rax, %rax je 0x1a6b8 movq %rax, %r14 movq 0x8(%rsp), %rcx movq %rcx, %rax shrq $0x3, %rax movabsq $0x20c49ba5e353f7cf, %rdi # imm = 0x20C49BA5E353F7CF mulq %rdi shrq $0x4, %rdx leaq 0x10(%rsp), %rsi movq %rdx, (%rsi) imulq $0x3e8, %rdx, %rax # imm = 0x3E8 subq %rax, %rcx movq (%rsp), %r8 movq %r8, %rax shrq $0x3, %rax mulq %rdi imulq $0x3e8, %rcx, %rax # imm = 0x3E8 movq %rax, 0x8(%rsi) shrq $0x4, %rdx movq %rdx, 0x10(%rsi) imulq $0x3e8, %rdx, %rax # imm = 0x3E8 subq %rax, %r8 imulq $0x3e8, %r8, %rax # imm = 0x3E8 movq %rax, 0x18(%rsi) movq %r14, %rdi callq 0xe4e0 movl %eax, %ebp cmpl $-0x1, %eax jne 0x1a767 callq 0xe0b0 xorl %ebp, %ebp subl (%rax), %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x21629 movl %ebp, %r12d xorl %r15d, %r15d jmp 0x1a6b8
js_os_utimes: push rbp push r15 push r14 push r12 push rbx sub rsp, 30h mov r14, r8 mov rbx, rdi mov rdx, [r8+10h] mov rcx, [r8+18h] lea rsi, [rsp+58h+var_50] call JS_ToInt64 mov r15d, 6 test eax, eax jnz short loc_1A6B5 mov rdx, [r14+20h] mov rcx, [r14+28h] mov rsi, rsp mov rdi, rbx call JS_ToInt64 test eax, eax jz short loc_1A6CB loc_1A6B5: xor r12d, r12d loc_1A6B8: mov rax, r12 mov rdx, r15 add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_1A6CB: mov rdx, [r14] mov rcx, [r14+8] xor r12d, r12d mov rdi, rbx xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_1A6B8 mov r14, rax mov rcx, [rsp+58h+var_50] mov rax, rcx shr rax, 3 mov rdi, 20C49BA5E353F7CFh mul rdi shr rdx, 4 lea rsi, [rsp+58h+var_48] mov [rsi], rdx imul rax, rdx, 3E8h sub rcx, rax mov r8, [rsp+58h+var_58] mov rax, r8 shr rax, 3 mul rdi imul rax, rcx, 3E8h mov [rsi+8], rax shr rdx, 4 mov [rsi+10h], rdx imul rax, rdx, 3E8h sub r8, rax imul rax, r8, 3E8h mov [rsi+18h], rax mov rdi, r14 call _utimes mov ebp, eax cmp eax, 0FFFFFFFFh jnz short loc_1A767 call ___errno_location xor ebp, ebp sub ebp, [rax] loc_1A767: mov rdi, rbx mov rsi, r14 call JS_FreeCString mov r12d, ebp xor r15d, r15d jmp loc_1A6B8
long long js_os_utimes(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v7; // r12 long long v9; // rax long long v10; // r14 long long v11; // rdi unsigned int v12; // ebp unsigned long long v13; // [rsp+0h] [rbp-58h] BYREF _QWORD v14[10]; // [rsp+8h] [rbp-50h] BYREF if ( (unsigned int)JS_ToInt64(a1, v14, a5[2], a5[3]) || (unsigned int)JS_ToInt64(a1, &v13, a5[4], a5[5]) ) return 0LL; v7 = 0LL; v9 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL); if ( v9 ) { v10 = v9; v14[1] = v14[0] / 0x3E8uLL; v14[2] = 1000 * (v14[0] % 0x3E8uLL); v14[3] = v13 / 0x3E8; v14[4] = 1000 * (v13 % 0x3E8); v11 = v9; v12 = utimes(v9); if ( v12 == -1 ) v12 = -*(_DWORD *)__errno_location(v11); JS_FreeCString(a1, v10); return v12; } return v7; }
js_os_utimes: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R14,R8 MOV RBX,RDI MOV RDX,qword ptr [R8 + 0x10] MOV RCX,qword ptr [R8 + 0x18] LEA RSI,[RSP + 0x8] CALL 0x00127f5d MOV R15D,0x6 TEST EAX,EAX JNZ 0x0011a6b5 MOV RDX,qword ptr [R14 + 0x20] MOV RCX,qword ptr [R14 + 0x28] MOV RSI,RSP MOV RDI,RBX CALL 0x00127f5d TEST EAX,EAX JZ 0x0011a6cb LAB_0011a6b5: XOR R12D,R12D LAB_0011a6b8: MOV RAX,R12 MOV RDX,R15 ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0011a6cb: MOV RDX,qword ptr [R14] MOV RCX,qword ptr [R14 + 0x8] XOR R12D,R12D MOV RDI,RBX XOR ESI,ESI XOR R8D,R8D CALL 0x00121353 TEST RAX,RAX JZ 0x0011a6b8 MOV R14,RAX MOV RCX,qword ptr [RSP + 0x8] MOV RAX,RCX SHR RAX,0x3 MOV RDI,0x20c49ba5e353f7cf MUL RDI SHR RDX,0x4 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RDX IMUL RAX,RDX,0x3e8 SUB RCX,RAX MOV R8,qword ptr [RSP] MOV RAX,R8 SHR RAX,0x3 MUL RDI IMUL RAX,RCX,0x3e8 MOV qword ptr [RSI + 0x8],RAX SHR RDX,0x4 MOV qword ptr [RSI + 0x10],RDX IMUL RAX,RDX,0x3e8 SUB R8,RAX IMUL RAX,R8,0x3e8 MOV qword ptr [RSI + 0x18],RAX MOV RDI,R14 CALL 0x0010e4e0 MOV EBP,EAX CMP EAX,-0x1 JNZ 0x0011a767 CALL 0x0010e0b0 XOR EBP,EBP SUB EBP,dword ptr [RAX] LAB_0011a767: MOV RDI,RBX MOV RSI,R14 CALL 0x00121629 MOV R12D,EBP XOR R15D,R15D JMP 0x0011a6b8
int js_os_utimes(int8 param_1) { int iVar1; char *__file; int *piVar2; int8 *in_R8; ulong local_58; ulong local_50; timeval local_48; ulong local_38; long local_30; iVar1 = JS_ToInt64(param_1,&local_50,in_R8[2],in_R8[3]); if ((iVar1 == 0) && (iVar1 = JS_ToInt64(param_1,&local_58,in_R8[4],in_R8[5]), iVar1 == 0)) { __file = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0); if (__file == (char *)0x0) { return 0; } local_48.tv_sec = local_50 / 1000; local_48.tv_usec = (local_50 % 1000) * 1000; local_38 = local_58 / 1000; local_30 = (local_58 % 1000) * 1000; iVar1 = utimes(__file,&local_48); if (iVar1 == -1) { piVar2 = __errno_location(); iVar1 = -*piVar2; } JS_FreeCString(param_1,__file); return iVar1; } return 0; }
44,993
tree_walk
eloqsql/mysys/tree.c
int tree_walk(TREE *tree, tree_walk_action action, void *argument, TREE_WALK visit) { switch (visit) { case left_root_right: return tree_walk_left_root_right(tree,tree->root,action,argument); case right_root_left: return tree_walk_right_root_left(tree,tree->root,action,argument); } return 0; /* Keep gcc happy */ }
O0
c
tree_walk: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x28(%rbp) testl %eax, %eax je 0xfbd2d jmp 0xfbd23 movl -0x28(%rbp), %eax subl $0x1, %eax je 0xfbd4a jmp 0xfbd67 movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xfbd80 movl %eax, -0x4(%rbp) jmp 0xfbd6e movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xfbe60 movl %eax, -0x4(%rbp) jmp 0xfbd6e movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
tree_walk: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov eax, [rbp+var_24] mov [rbp+var_28], eax test eax, eax jz short loc_FBD2D jmp short $+2 loc_FBD23: mov eax, [rbp+var_28] sub eax, 1 jz short loc_FBD4A jmp short loc_FBD67 loc_FBD2D: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call tree_walk_left_root_right mov [rbp+var_4], eax jmp short loc_FBD6E loc_FBD4A: mov rdi, [rbp+var_10] mov rax, [rbp+var_10] mov rsi, [rax] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call tree_walk_right_root_left mov [rbp+var_4], eax jmp short loc_FBD6E loc_FBD67: mov [rbp+var_4], 0 loc_FBD6E: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long tree_walk(_QWORD *a1, long long a2, long long a3, int a4) { if ( a4 ) { if ( a4 == 1 ) return (unsigned int)tree_walk_right_root_left(a1, *a1, a2, a3); else return 0; } else { return (unsigned int)tree_walk_left_root_right(a1, *a1, a2, a3); } }
tree_walk: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x28],EAX TEST EAX,EAX JZ 0x001fbd2d JMP 0x001fbd23 LAB_001fbd23: MOV EAX,dword ptr [RBP + -0x28] SUB EAX,0x1 JZ 0x001fbd4a JMP 0x001fbd67 LAB_001fbd2d: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001fbd80 MOV dword ptr [RBP + -0x4],EAX JMP 0x001fbd6e LAB_001fbd4a: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001fbe60 MOV dword ptr [RBP + -0x4],EAX JMP 0x001fbd6e LAB_001fbd67: MOV dword ptr [RBP + -0x4],0x0 LAB_001fbd6e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 tree_walk(int8 *param_1,int8 param_2,int8 param_3,int param_4) { int4 local_c; if (param_4 == 0) { local_c = tree_walk_left_root_right(param_1,*param_1,param_2,param_3); } else if (param_4 == 1) { local_c = tree_walk_right_root_left(param_1,*param_1,param_2,param_3); } else { local_c = 0; } return local_c; }
44,994
tree_walk
eloqsql/mysys/tree.c
int tree_walk(TREE *tree, tree_walk_action action, void *argument, TREE_WALK visit) { switch (visit) { case left_root_right: return tree_walk_left_root_right(tree,tree->root,action,argument); case right_root_left: return tree_walk_right_root_left(tree,tree->root,action,argument); } return 0; /* Keep gcc happy */ }
O3
c
tree_walk: pushq %rbp movq %rsp, %rbp movq %rdx, %rax movq %rsi, %rdx cmpl $0x1, %ecx je 0xa51cf testl %ecx, %ecx jne 0xa51db movq (%rdi), %rsi movq %rax, %rcx popq %rbp jmp 0xa51df movq (%rdi), %rsi movq %rax, %rcx popq %rbp jmp 0xa5260 xorl %eax, %eax popq %rbp retq
tree_walk: push rbp mov rbp, rsp mov rax, rdx mov rdx, rsi cmp ecx, 1 jz short loc_A51CF test ecx, ecx jnz short loc_A51DB mov rsi, [rdi] mov rcx, rax pop rbp jmp short tree_walk_left_root_right loc_A51CF: mov rsi, [rdi] mov rcx, rax pop rbp jmp tree_walk_right_root_left loc_A51DB: xor eax, eax pop rbp retn
long long tree_walk(_QWORD *a1, long long a2, long long a3, int a4) { if ( a4 == 1 ) return tree_walk_right_root_left(a1, *a1, a2, a3); if ( a4 ) return 0LL; return tree_walk_left_root_right(a1, *a1, a2, a3); }
tree_walk: PUSH RBP MOV RBP,RSP MOV RAX,RDX MOV RDX,RSI CMP ECX,0x1 JZ 0x001a51cf TEST ECX,ECX JNZ 0x001a51db MOV RSI,qword ptr [RDI] MOV RCX,RAX POP RBP JMP 0x001a51df LAB_001a51cf: MOV RSI,qword ptr [RDI] MOV RCX,RAX POP RBP JMP 0x001a5260 LAB_001a51db: XOR EAX,EAX POP RBP RET
int8 tree_walk(int8 *param_1,int8 param_2,int8 param_3,int param_4) { int8 uVar1; if (param_4 == 1) { uVar1 = tree_walk_right_root_left(param_1,*param_1,param_2,param_3); return uVar1; } if (param_4 == 0) { uVar1 = tree_walk_left_root_right(param_1,*param_1,param_2,param_3); return uVar1; } return 0; }
44,995
nglog::tools::InitializeLoggingUtilities(char const*)
ng-log[P]ng-log/src/utilities.cc
void InitializeLoggingUtilities(const char* argv0) { CHECK(!IsLoggingInitialized()) << "You called InitializeLogging() twice!"; g_program_invocation_short_name = const_basename(argv0); #ifdef HAVE_STACKTRACE InstallFailureFunction(&DumpStackTraceAndExit); #endif }
O0
cpp
nglog::tools::InitializeLoggingUtilities(char const*): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x8(%rbp) callq 0x4aaa0 xorb $-0x1, %al xorb $-0x1, %al movb $0x0, -0x71(%rbp) testb $0x1, %al jne 0x4ac32 jmp 0x4acaf leaq 0x433d(%rip), %rsi # 0x4ef76 leaq -0x70(%rbp), %rdi movq %rdi, -0x98(%rbp) movl $0x12b, %edx # imm = 0x12B callq 0x12960 movq -0x98(%rbp), %rdi movb $0x1, -0x71(%rbp) callq 0xe490 movq %rax, -0x90(%rbp) jmp 0x4ac67 movq -0x90(%rbp), %rdi leaq 0x434a(%rip), %rsi # 0x4efbf callq 0x96f0 movq %rax, -0xa0(%rbp) jmp 0x4ac83 movq -0xa0(%rbp), %rdi leaq 0x4355(%rip), %rsi # 0x4efe6 callq 0x96f0 movq %rax, -0xa8(%rbp) jmp 0x4ac9f movq -0xa8(%rbp), %rsi leaq -0x9(%rbp), %rdi callq 0x17cd0 testb $0x1, -0x71(%rbp) jne 0x4acb7 jmp 0x4acd7 leaq -0x70(%rbp), %rdi callq 0x129d0 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x80(%rbp) movl %eax, -0x84(%rbp) testb $0x1, -0x71(%rbp) jne 0x4acfc jmp 0x4ad07 movq -0x8(%rbp), %rdi callq 0x4aae0 movq %rax, 0x35f41(%rip) # 0x80c28 leaq 0x32(%rip), %rdi # 0x4ad20 callq 0xf480 addq $0xb0, %rsp popq %rbp retq leaq -0x70(%rbp), %rdi callq 0x129d0 jmp 0x4ad07 jmp 0x4ad09 movq -0x80(%rbp), %rdi callq 0x9d00 movq %rax, %rdi callq 0xbf30 nopw (%rax,%rax)
_ZN5nglog5tools26InitializeLoggingUtilitiesEPKc: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_8], rdi call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) xor al, 0FFh xor al, 0FFh mov [rbp+var_71], 0 test al, 1 jnz short loc_4AC32 jmp short loc_4ACAF loc_4AC32: lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdi, [rbp+var_70]; this mov [rbp+var_98], rdi mov edx, 12Bh; int call _ZN5nglog15LogMessageFatalC2EPKci; nglog::LogMessageFatal::LogMessageFatal(char const*,int) mov rdi, [rbp+var_98]; this mov [rbp+var_71], 1 call _ZN5nglog10LogMessage6streamEv; nglog::LogMessage::stream(void) mov [rbp+var_90], rax jmp short $+2 loc_4AC67: mov rdi, [rbp+var_90] lea rsi, aCheckFailedIsl; "Check failed: !IsLoggingInitialized() " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_A0], rax jmp short $+2 loc_4AC83: mov rdi, [rbp+var_A0] lea rsi, aYouCalledIniti; "You called InitializeLogging() twice!" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_A8], rax jmp short $+2 loc_4AC9F: mov rsi, [rbp+var_A8]; void (*)(void) lea rdi, [rbp+var_9] call _ZNK5nglog8internal17LogMessageVoidifyanERSo; nglog::internal::LogMessageVoidify::operator&(std::ostream &) loc_4ACAF: test [rbp+var_71], 1 jnz short loc_4ACB7 jmp short loc_4ACD7 loc_4ACB7: lea rdi, [rbp+var_70]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() mov rcx, rax mov eax, edx mov [rbp+var_80], rcx mov [rbp+var_84], eax test [rbp+var_71], 1 jnz short loc_4ACFC jmp short loc_4AD07 loc_4ACD7: mov rdi, [rbp+var_8]; this call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*) mov cs:_ZN5nglogL31g_program_invocation_short_nameE, rax; nglog::g_program_invocation_short_name lea rdi, _ZN5nglogL21DumpStackTraceAndExitEv; this call _ZN5nglog22InstallFailureFunctionEPFvvE; nglog::InstallFailureFunction(void (*)(void)) add rsp, 0B0h pop rbp retn loc_4ACFC: lea rdi, [rbp+var_70]; this call _ZN5nglog15LogMessageFatalD2Ev; nglog::LogMessageFatal::~LogMessageFatal() jmp short $+2 loc_4AD07: jmp short $+2 loc_4AD09: mov rdi, [rbp+var_80] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long nglog::tools::InitializeLoggingUtilities(nglog::tools *this, char *a2) { long long v3; // [rsp+10h] [rbp-A0h] long long v4; // [rsp+20h] [rbp-90h] char v5; // [rsp+3Fh] [rbp-71h] nglog::LogDestination *v6[12]; // [rsp+40h] [rbp-70h] BYREF nglog::tools *v7; // [rsp+A8h] [rbp-8h] v7 = this; v5 = 0; if ( nglog::IsLoggingInitialized(this) ) { nglog::LogMessageFatal::LogMessageFatal( v6, (std::this_thread *)"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc", 0x12Bu); v5 = 1; v4 = nglog::LogMessage::stream((nglog::LogMessage *)v6); v3 = std::operator<<<std::char_traits<char>>(v4, "Check failed: !IsLoggingInitialized() "); a2 = (char *)std::operator<<<std::char_traits<char>>(v3, "You called InitializeLogging() twice!"); nglog::internal::LogMessageVoidify::operator&(); } if ( (v5 & 1) != 0 ) nglog::LogMessageFatal::~LogMessageFatal(v6); nglog::g_program_invocation_short_name = (long long)nglog::tools::const_basename(v7, a2); return nglog::InstallFailureFunction((nglog *)nglog::DumpStackTraceAndExit, (void (*)(void))a2); }
InitializeLoggingUtilities: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x8],RDI CALL 0x0014aaa0 XOR AL,0xff XOR AL,0xff MOV byte ptr [RBP + -0x71],0x0 TEST AL,0x1 JNZ 0x0014ac32 JMP 0x0014acaf LAB_0014ac32: LEA RSI,[0x14ef76] LEA RDI,[RBP + -0x70] MOV qword ptr [RBP + -0x98],RDI MOV EDX,0x12b CALL 0x00112960 MOV RDI,qword ptr [RBP + -0x98] MOV byte ptr [RBP + -0x71],0x1 LAB_0014ac59: CALL 0x0010e490 MOV qword ptr [RBP + -0x90],RAX JMP 0x0014ac67 LAB_0014ac67: MOV RDI,qword ptr [RBP + -0x90] LEA RSI,[0x14efbf] CALL 0x001096f0 MOV qword ptr [RBP + -0xa0],RAX JMP 0x0014ac83 LAB_0014ac83: MOV RDI,qword ptr [RBP + -0xa0] LEA RSI,[0x14efe6] CALL 0x001096f0 LAB_0014ac96: MOV qword ptr [RBP + -0xa8],RAX JMP 0x0014ac9f LAB_0014ac9f: MOV RSI,qword ptr [RBP + -0xa8] LEA RDI,[RBP + -0x9] CALL 0x00117cd0 LAB_0014acaf: TEST byte ptr [RBP + -0x71],0x1 JNZ 0x0014acb7 JMP 0x0014acd7 LAB_0014acb7: LEA RDI,[RBP + -0x70] CALL 0x001129d0 LAB_0014acc0: MOV RCX,RAX MOV EAX,EDX MOV qword ptr [RBP + -0x80],RCX MOV dword ptr [RBP + -0x84],EAX TEST byte ptr [RBP + -0x71],0x1 JNZ 0x0014acfc JMP 0x0014ad07 LAB_0014acd7: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014aae0 MOV qword ptr [0x00180c28],RAX LEA RDI,[0x14ad20] CALL 0x0010f480 ADD RSP,0xb0 POP RBP RET LAB_0014acfc: LEA RDI,[RBP + -0x70] CALL 0x001129d0 LAB_0014ad05: JMP 0x0014ad07 LAB_0014ad07: JMP 0x0014ad09 LAB_0014ad09: MOV RDI,qword ptr [RBP + -0x80] CALL 0x00109d00
/* nglog::tools::InitializeLoggingUtilities(char const*) */ void nglog::tools::InitializeLoggingUtilities(char *param_1) { byte bVar1; ostream *poVar2; int8 uVar3; bool bVar4; LogMessageFatal local_78 [103]; LogMessageVoidify local_11; char *local_10; local_10 = param_1; bVar1 = IsLoggingInitialized(); bVar4 = (bVar1 & 1) != 0; if (bVar4) { LogMessageFatal::LogMessageFatal (local_78,"/workspace/llm4binary/github/2025_star3/ng-log[P]ng-log/src/utilities.cc", 299); /* try { // try from 0014ac59 to 0014ac95 has its CatchHandler @ 0014acc0 */ poVar2 = (ostream *)LogMessage::stream((LogMessage *)local_78); poVar2 = std::operator<<(poVar2,"Check failed: !IsLoggingInitialized() "); poVar2 = std::operator<<(poVar2,"You called InitializeLogging() twice!"); internal::LogMessageVoidify::operator&(&local_11,poVar2); uVar3 = LogMessageFatal::~LogMessageFatal(local_78); /* catch(type#1 @ 00000000) { ... } // from try @ 0014ac59 with catch @ 0014acc0 */ if (bVar4) { /* try { // try from 0014acfc to 0014ad04 has its CatchHandler @ 0014ad12 */ LogMessageFatal::~LogMessageFatal(local_78); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar3); } g_program_invocation_short_name = const_basename(local_10); InstallFailureFunction(DumpStackTraceAndExit); return; }
44,996
ToggleBorderlessWindowed
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
void ToggleBorderlessWindowed(void) { // Leave fullscreen before attempting to set borderless windowed mode bool wasOnFullscreen = false; if (CORE.Window.fullscreen) { // fullscreen already saves the previous position so it does not need to be set here again ToggleFullscreen(); wasOnFullscreen = true; } const int monitor = GetCurrentMonitor(); int monitorCount; GLFWmonitor **monitors = glfwGetMonitors(&monitorCount); if ((monitor >= 0) && (monitor < monitorCount)) { const GLFWvidmode *mode = glfwGetVideoMode(monitors[monitor]); if (mode) { if (!IsWindowState(FLAG_BORDERLESS_WINDOWED_MODE)) { // Store screen position and size // NOTE: If it was on fullscreen, screen position was already stored, so skip setting it here if (!wasOnFullscreen) CORE.Window.previousPosition = CORE.Window.position; CORE.Window.previousScreen = CORE.Window.screen; // Set undecorated and topmost modes and flags glfwSetWindowAttrib(platform.handle, GLFW_DECORATED, GLFW_FALSE); CORE.Window.flags |= FLAG_WINDOW_UNDECORATED; glfwSetWindowAttrib(platform.handle, GLFW_FLOATING, GLFW_TRUE); CORE.Window.flags |= FLAG_WINDOW_TOPMOST; // Get monitor position and size int monitorPosX = 0; int monitorPosY = 0; glfwGetMonitorPos(monitors[monitor], &monitorPosX, &monitorPosY); const int monitorWidth = mode->width; const int monitorHeight = mode->height; // Set screen position and size glfwSetWindowPos(platform.handle, monitorPosX, monitorPosY); glfwSetWindowSize(platform.handle, monitorWidth, monitorHeight); // Refocus window glfwFocusWindow(platform.handle); CORE.Window.flags |= FLAG_BORDERLESS_WINDOWED_MODE; } else { // Remove topmost and undecorated modes and flags glfwSetWindowAttrib(platform.handle, GLFW_FLOATING, GLFW_FALSE); CORE.Window.flags &= ~FLAG_WINDOW_TOPMOST; glfwSetWindowAttrib(platform.handle, GLFW_DECORATED, GLFW_TRUE); CORE.Window.flags &= ~FLAG_WINDOW_UNDECORATED; // Return previous screen size and position // NOTE: The order matters here, it must set size first, then set position, otherwise the screen will be positioned incorrectly glfwSetWindowSize(platform.handle, CORE.Window.previousScreen.width, CORE.Window.previousScreen.height); glfwSetWindowPos(platform.handle, CORE.Window.previousPosition.x, CORE.Window.previousPosition.y); // Refocus window glfwFocusWindow(platform.handle); CORE.Window.flags &= ~FLAG_BORDERLESS_WINDOWED_MODE; CORE.Window.position.x = CORE.Window.previousPosition.x; CORE.Window.position.y = CORE.Window.previousPosition.y; } } else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor"); } else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor"); }
O2
c
ToggleBorderlessWindowed: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movb 0xc99bc(%rip), %r15b # 0x127bed cmpb $0x1, %r15b jne 0x5e23c callq 0x5df6e callq 0x5e087 movl %eax, %ebp leaq 0xc(%rsp), %rdi callq 0xa6017 testl %ebp, %ebp js 0x5e33e cmpl 0xc(%rsp), %ebp jge 0x5e33e movq %rax, %rbx movl %ebp, %r13d movq (%rax,%r13,8), %rdi callq 0xa63dc testq %rax, %rax je 0x5e347 testb $-0x80, 0xc996b(%rip) # 0x127be9 jne 0x5e367 movq %rax, %r14 testb %r15b, %r15b jne 0x5e29a movq 0xc9961(%rip), %rax # 0x127bf4 movq %rax, 0xc9962(%rip) # 0x127bfc movq 0xc996b(%rip), %rax # 0x127c0c movq %rax, 0xc996c(%rip) # 0x127c14 movq 0xca419(%rip), %rdi # 0x1286c8 movl $0x20005, %esi # imm = 0x20005 xorl %edx, %edx callq 0xa8684 orb $0x8, 0xc9926(%rip) # 0x127be8 movq 0xca3ff(%rip), %rdi # 0x1286c8 pushq $0x1 popq %rdx movl $0x20007, %esi # imm = 0x20007 callq 0xa8684 orb $0x10, 0xc990c(%rip) # 0x127be9 leaq 0x14(%rsp), %r15 andl $0x0, (%r15) leaq 0x10(%rsp), %r12 andl $0x0, (%r12) movq (%rbx,%r13,8), %rdi movq %r15, %rsi movq %r12, %rdx callq 0xa60ac movl (%r14), %ebx movl 0x4(%r14), %ebp movq 0xca3bb(%rip), %rdi # 0x1286c8 movl (%r15), %esi movl (%r12), %edx callq 0xa7d91 movq 0xca3a8(%rip), %rdi # 0x1286c8 movl %ebx, %esi movl %ebp, %edx callq 0xa7e39 movq 0xca398(%rip), %rdi # 0x1286c8 callq 0xa84d9 orb $-0x80, 0xc98ad(%rip) # 0x127be9 jmp 0x5e358 leaq 0x67745(%rip), %rsi # 0xc5a8a jmp 0x5e34e leaq 0x67707(%rip), %rsi # 0xc5a55 pushq $0x4 popq %rdi xorl %eax, %eax callq 0xa128b addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0xca35a(%rip), %rdi # 0x1286c8 movl $0x20007, %esi # imm = 0x20007 xorl %edx, %edx callq 0xa8684 andb $-0x11, 0xc9868(%rip) # 0x127be9 movq 0xca340(%rip), %rdi # 0x1286c8 pushq $0x1 popq %rdx movl $0x20005, %esi # imm = 0x20005 callq 0xa8684 andb $-0x9, 0xc984c(%rip) # 0x127be8 movq 0xca325(%rip), %rdi # 0x1286c8 movl 0xc986b(%rip), %esi # 0x127c14 movl 0xc9869(%rip), %edx # 0x127c18 callq 0xa7e39 movq 0xca30d(%rip), %rdi # 0x1286c8 movl 0xc983b(%rip), %esi # 0x127bfc movl 0xc9839(%rip), %edx # 0x127c00 callq 0xa7d91 movq 0xca2f5(%rip), %rdi # 0x1286c8 callq 0xa84d9 andb $0x7f, 0xc980a(%rip) # 0x127be9 movq 0xc9816(%rip), %rax # 0x127bfc movq %rax, 0xc9807(%rip) # 0x127bf4 jmp 0x5e358
ToggleBorderlessWindowed: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15b, cs:byte_127BED cmp r15b, 1 jnz short loc_5E23C call ToggleFullscreen loc_5E23C: call GetCurrentMonitor mov ebp, eax lea rdi, [rsp+48h+var_3C] call glfwGetMonitors test ebp, ebp js loc_5E33E cmp ebp, [rsp+48h+var_3C] jge loc_5E33E mov rbx, rax mov r13d, ebp mov rdi, [rax+r13*8] call glfwGetVideoMode test rax, rax jz loc_5E347 test byte ptr cs:dword_127BE8+1, 80h jnz loc_5E367 mov r14, rax test r15b, r15b jnz short loc_5E29A mov rax, cs:qword_127BF4 mov cs:qword_127BFC, rax loc_5E29A: mov rax, cs:qword_127C0C mov cs:qword_127C14, rax mov rdi, cs:platform_0 mov esi, offset loc_20005 xor edx, edx call glfwSetWindowAttrib or byte ptr cs:dword_127BE8, 8 mov rdi, cs:platform_0 push 1 pop rdx mov esi, 20007h call glfwSetWindowAttrib or byte ptr cs:dword_127BE8+1, 10h lea r15, [rsp+48h+var_34] and dword ptr [r15], 0 lea r12, [rsp+48h+var_38] and dword ptr [r12], 0 mov rdi, [rbx+r13*8] mov rsi, r15 mov rdx, r12 call glfwGetMonitorPos mov ebx, [r14] mov ebp, [r14+4] mov rdi, cs:platform_0 mov esi, [r15] mov edx, [r12] call glfwSetWindowPos mov rdi, cs:platform_0 mov esi, ebx mov edx, ebp call glfwSetWindowSize mov rdi, cs:platform_0 call glfwFocusWindow or byte ptr cs:dword_127BE8+1, 80h jmp short loc_5E358 loc_5E33E: lea rsi, aGlfwFailedToFi_0; "GLFW: Failed to find selected monitor" jmp short loc_5E34E loc_5E347: lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"... loc_5E34E: push 4 pop rdi xor eax, eax call TraceLog loc_5E358: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5E367: mov rdi, cs:platform_0 mov esi, 20007h xor edx, edx call glfwSetWindowAttrib and byte ptr cs:dword_127BE8+1, 0EFh mov rdi, cs:platform_0 push 1 pop rdx mov esi, offset loc_20005 call glfwSetWindowAttrib and byte ptr cs:dword_127BE8, 0F7h mov rdi, cs:platform_0 mov esi, dword ptr cs:qword_127C14 mov edx, dword ptr cs:qword_127C14+4 call glfwSetWindowSize mov rdi, cs:platform_0 mov esi, dword ptr cs:qword_127BFC mov edx, dword ptr cs:qword_127BFC+4 call glfwSetWindowPos mov rdi, cs:platform_0 call glfwFocusWindow and byte ptr cs:dword_127BE8+1, 7Fh mov rax, cs:qword_127BFC mov cs:qword_127BF4, rax jmp loc_5E358
long long ToggleBorderlessWindowed() { char v0; // r15 int CurrentMonitor; // ebp long long Monitors; // rax int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d long long v7; // rbx long long VideoMode; // rax unsigned int *v9; // r14 unsigned int v10; // ebx unsigned int v11; // ebp long long result; // rax const char *v13; // rsi int v14; // [rsp+Ch] [rbp-3Ch] BYREF unsigned int v15; // [rsp+10h] [rbp-38h] BYREF _DWORD v16[13]; // [rsp+14h] [rbp-34h] BYREF v0 = byte_127BED; if ( byte_127BED == 1 ) ToggleFullscreen(); CurrentMonitor = GetCurrentMonitor(); Monitors = glfwGetMonitors(&v14); if ( CurrentMonitor < 0 || CurrentMonitor >= v14 ) { v13 = "GLFW: Failed to find selected monitor"; return TraceLog(4, (_DWORD)v13, v3, v4, v5, v6); } v7 = Monitors; VideoMode = glfwGetVideoMode(*(_QWORD *)(Monitors + 8LL * (unsigned int)CurrentMonitor)); if ( !VideoMode ) { v13 = "GLFW: Failed to find video mode for selected monitor"; return TraceLog(4, (_DWORD)v13, v3, v4, v5, v6); } if ( (dword_127BE8 & 0x8000) != 0 ) { glfwSetWindowAttrib(platform_0, 131079LL, 0LL); BYTE1(dword_127BE8) &= ~0x10u; glfwSetWindowAttrib(platform_0, &loc_20005, 1LL); LOBYTE(dword_127BE8) = dword_127BE8 & 0xF7; glfwSetWindowSize(platform_0, (unsigned int)qword_127C14, HIDWORD(qword_127C14)); glfwSetWindowPos(platform_0, (unsigned int)qword_127BFC, HIDWORD(qword_127BFC)); glfwFocusWindow(platform_0); BYTE1(dword_127BE8) &= ~0x80u; result = qword_127BFC; qword_127BF4 = qword_127BFC; } else { v9 = (unsigned int *)VideoMode; if ( !v0 ) qword_127BFC = qword_127BF4; qword_127C14 = qword_127C0C; glfwSetWindowAttrib(platform_0, &loc_20005, 0LL); LOBYTE(dword_127BE8) = dword_127BE8 | 8; glfwSetWindowAttrib(platform_0, 131079LL, 1LL); BYTE1(dword_127BE8) |= 0x10u; v16[0] = 0; v15 = 0; glfwGetMonitorPos(*(_QWORD *)(v7 + 8LL * (unsigned int)CurrentMonitor), v16, &v15); v10 = *v9; v11 = v9[1]; glfwSetWindowPos(platform_0, v16[0], v15); glfwSetWindowSize(platform_0, v10, v11); result = glfwFocusWindow(platform_0); BYTE1(dword_127BE8) |= 0x80u; } return result; }
ToggleBorderlessWindowed: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15B,byte ptr [0x00227bed] CMP R15B,0x1 JNZ 0x0015e23c CALL 0x0015df6e LAB_0015e23c: CALL 0x0015e087 MOV EBP,EAX LEA RDI,[RSP + 0xc] CALL 0x001a6017 TEST EBP,EBP JS 0x0015e33e CMP EBP,dword ptr [RSP + 0xc] JGE 0x0015e33e MOV RBX,RAX MOV R13D,EBP MOV RDI,qword ptr [RAX + R13*0x8] CALL 0x001a63dc TEST RAX,RAX JZ 0x0015e347 TEST byte ptr [0x00227be9],0x80 JNZ 0x0015e367 MOV R14,RAX TEST R15B,R15B JNZ 0x0015e29a MOV RAX,qword ptr [0x00227bf4] MOV qword ptr [0x00227bfc],RAX LAB_0015e29a: MOV RAX,qword ptr [0x00227c0c] MOV qword ptr [0x00227c14],RAX MOV RDI,qword ptr [0x002286c8] MOV ESI,0x20005 XOR EDX,EDX CALL 0x001a8684 OR byte ptr [0x00227be8],0x8 MOV RDI,qword ptr [0x002286c8] PUSH 0x1 POP RDX MOV ESI,0x20007 CALL 0x001a8684 OR byte ptr [0x00227be9],0x10 LEA R15,[RSP + 0x14] AND dword ptr [R15],0x0 LEA R12,[RSP + 0x10] AND dword ptr [R12],0x0 MOV RDI,qword ptr [RBX + R13*0x8] MOV RSI,R15 MOV RDX,R12 CALL 0x001a60ac MOV EBX,dword ptr [R14] MOV EBP,dword ptr [R14 + 0x4] MOV RDI,qword ptr [0x002286c8] MOV ESI,dword ptr [R15] MOV EDX,dword ptr [R12] CALL 0x001a7d91 MOV RDI,qword ptr [0x002286c8] MOV ESI,EBX MOV EDX,EBP CALL 0x001a7e39 MOV RDI,qword ptr [0x002286c8] CALL 0x001a84d9 OR byte ptr [0x00227be9],0x80 JMP 0x0015e358 LAB_0015e33e: LEA RSI,[0x1c5a8a] JMP 0x0015e34e LAB_0015e347: LEA RSI,[0x1c5a55] LAB_0015e34e: PUSH 0x4 POP RDI XOR EAX,EAX CALL 0x001a128b LAB_0015e358: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015e367: MOV RDI,qword ptr [0x002286c8] MOV ESI,0x20007 XOR EDX,EDX CALL 0x001a8684 AND byte ptr [0x00227be9],0xef MOV RDI,qword ptr [0x002286c8] PUSH 0x1 POP RDX MOV ESI,0x20005 CALL 0x001a8684 AND byte ptr [0x00227be8],0xf7 MOV RDI,qword ptr [0x002286c8] MOV ESI,dword ptr [0x00227c14] MOV EDX,dword ptr [0x00227c18] CALL 0x001a7e39 MOV RDI,qword ptr [0x002286c8] MOV ESI,dword ptr [0x00227bfc] MOV EDX,dword ptr [0x00227c00] CALL 0x001a7d91 MOV RDI,qword ptr [0x002286c8] CALL 0x001a84d9 AND byte ptr [0x00227be9],0x7f MOV RAX,qword ptr [0x00227bfc] MOV qword ptr [0x00227bf4],RAX JMP 0x0015e358
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void ToggleBorderlessWindowed(void) { int4 uVar1; int4 uVar2; char cVar3; uint uVar4; long lVar5; int4 *puVar6; char *pcVar7; int local_3c; int4 local_38; int4 local_34; cVar3 = DAT_00227bed; if (DAT_00227bed == '\x01') { ToggleFullscreen(); } uVar4 = GetCurrentMonitor(); lVar5 = glfwGetMonitors(&local_3c); if (((int)uVar4 < 0) || (local_3c <= (int)uVar4)) { pcVar7 = "GLFW: Failed to find selected monitor"; } else { puVar6 = (int4 *)glfwGetVideoMode(*(int8 *)(lVar5 + (ulong)uVar4 * 8)); if (puVar6 != (int4 *)0x0) { if ((DAT_00227be9 & 0x80) == 0) { if (cVar3 == '\0') { DAT_00227bfc = DAT_00227bf4; } _DAT_00227c14 = _DAT_00227c0c; glfwSetWindowAttrib(platform_0,0x20005,0); DAT_00227be8 = DAT_00227be8 | 8; glfwSetWindowAttrib(platform_0,0x20007,1); DAT_00227be9 = DAT_00227be9 | 0x10; local_34 = 0; local_38 = 0; glfwGetMonitorPos(*(int8 *)(lVar5 + (ulong)uVar4 * 8),&local_34,&local_38); uVar1 = *puVar6; uVar2 = puVar6[1]; glfwSetWindowPos(platform_0,local_34,local_38); glfwSetWindowSize(platform_0,uVar1,uVar2); glfwFocusWindow(platform_0); DAT_00227be9 = DAT_00227be9 | 0x80; return; } glfwSetWindowAttrib(platform_0,0x20007,0); DAT_00227be9 = DAT_00227be9 & 0xef; glfwSetWindowAttrib(platform_0,0x20005,1); DAT_00227be8 = DAT_00227be8 & 0xf7; glfwSetWindowSize(platform_0,_DAT_00227c14 & 0xffffffff,DAT_00227c18); glfwSetWindowPos(platform_0,DAT_00227bfc & 0xffffffff,DAT_00227bfc._4_4_); glfwFocusWindow(platform_0); DAT_00227be9 = DAT_00227be9 & 0x7f; DAT_00227bf4 = DAT_00227bfc; return; } pcVar7 = "GLFW: Failed to find video mode for selected monitor"; } TraceLog(4,pcVar7); return; }
44,997
ToggleBorderlessWindowed
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
void ToggleBorderlessWindowed(void) { // Leave fullscreen before attempting to set borderless windowed mode bool wasOnFullscreen = false; if (CORE.Window.fullscreen) { // fullscreen already saves the previous position so it does not need to be set here again ToggleFullscreen(); wasOnFullscreen = true; } const int monitor = GetCurrentMonitor(); int monitorCount; GLFWmonitor **monitors = glfwGetMonitors(&monitorCount); if ((monitor >= 0) && (monitor < monitorCount)) { const GLFWvidmode *mode = glfwGetVideoMode(monitors[monitor]); if (mode) { if (!IsWindowState(FLAG_BORDERLESS_WINDOWED_MODE)) { // Store screen position and size // NOTE: If it was on fullscreen, screen position was already stored, so skip setting it here if (!wasOnFullscreen) CORE.Window.previousPosition = CORE.Window.position; CORE.Window.previousScreen = CORE.Window.screen; // Set undecorated and topmost modes and flags glfwSetWindowAttrib(platform.handle, GLFW_DECORATED, GLFW_FALSE); CORE.Window.flags |= FLAG_WINDOW_UNDECORATED; glfwSetWindowAttrib(platform.handle, GLFW_FLOATING, GLFW_TRUE); CORE.Window.flags |= FLAG_WINDOW_TOPMOST; // Get monitor position and size int monitorPosX = 0; int monitorPosY = 0; glfwGetMonitorPos(monitors[monitor], &monitorPosX, &monitorPosY); const int monitorWidth = mode->width; const int monitorHeight = mode->height; // Set screen position and size glfwSetWindowPos(platform.handle, monitorPosX, monitorPosY); glfwSetWindowSize(platform.handle, monitorWidth, monitorHeight); // Refocus window glfwFocusWindow(platform.handle); CORE.Window.flags |= FLAG_BORDERLESS_WINDOWED_MODE; } else { // Remove topmost and undecorated modes and flags glfwSetWindowAttrib(platform.handle, GLFW_FLOATING, GLFW_FALSE); CORE.Window.flags &= ~FLAG_WINDOW_TOPMOST; glfwSetWindowAttrib(platform.handle, GLFW_DECORATED, GLFW_TRUE); CORE.Window.flags &= ~FLAG_WINDOW_UNDECORATED; // Return previous screen size and position // NOTE: The order matters here, it must set size first, then set position, otherwise the screen will be positioned incorrectly glfwSetWindowSize(platform.handle, CORE.Window.previousScreen.width, CORE.Window.previousScreen.height); glfwSetWindowPos(platform.handle, CORE.Window.previousPosition.x, CORE.Window.previousPosition.y); // Refocus window glfwFocusWindow(platform.handle); CORE.Window.flags &= ~FLAG_BORDERLESS_WINDOWED_MODE; CORE.Window.position.x = CORE.Window.previousPosition.x; CORE.Window.position.y = CORE.Window.previousPosition.y; } } else TRACELOG(LOG_WARNING, "GLFW: Failed to find video mode for selected monitor"); } else TRACELOG(LOG_WARNING, "GLFW: Failed to find selected monitor"); }
O3
c
ToggleBorderlessWindowed: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movb 0xcc415(%rip), %r15b # 0x13bbcd cmpb $0x1, %r15b jne 0x6f7c3 callq 0x6f4cf callq 0x6f5f8 movl %eax, %ebp leaq 0xc(%rsp), %rdi callq 0xbf07a testl %ebp, %ebp js 0x6f8c7 cmpl 0xc(%rsp), %ebp jge 0x6f8c7 movq %rax, %rbx movl %ebp, %r13d movq (%rax,%r13,8), %rdi callq 0xbf463 testq %rax, %rax je 0x6f8d0 testb $-0x80, 0xcc3c4(%rip) # 0x13bbc9 jne 0x6f8f2 movq %rax, %r14 testb %r15b, %r15b jne 0x6f821 movq 0xcc3ba(%rip), %rax # 0x13bbd4 movq %rax, 0xcc3bb(%rip) # 0x13bbdc movq 0xcc3c4(%rip), %rax # 0x13bbec movq %rax, 0xcc3c5(%rip) # 0x13bbf4 movq 0xcce72(%rip), %rdi # 0x13c6a8 xorl %ebp, %ebp movl $0x20005, %esi # imm = 0x20005 xorl %edx, %edx callq 0xc17de orb $0x8, 0xcc37d(%rip) # 0x13bbc8 movq 0xcce56(%rip), %rdi # 0x13c6a8 movl $0x20007, %esi # imm = 0x20007 movl $0x1, %edx callq 0xc17de orb $0x10, 0xcc361(%rip) # 0x13bbc9 leaq 0x14(%rsp), %r15 movl %ebp, (%r15) leaq 0x10(%rsp), %r12 movl %ebp, (%r12) movq (%rbx,%r13,8), %rdi movq %r15, %rsi movq %r12, %rdx callq 0xbf112 movl (%r14), %ebx movl 0x4(%r14), %ebp movq 0xcce12(%rip), %rdi # 0x13c6a8 movl (%r15), %esi movl (%r12), %edx callq 0xc0ecd movq 0xccdff(%rip), %rdi # 0x13c6a8 movl %ebx, %esi movl %ebp, %edx callq 0xc0f7b movq 0xccdef(%rip), %rdi # 0x13c6a8 callq 0xc1633 orb $-0x80, 0xcc304(%rip) # 0x13bbc9 jmp 0x6f8e3 leaq 0x70034(%rip), %rsi # 0xdf902 jmp 0x6f8d7 leaq 0x6fff6(%rip), %rsi # 0xdf8cd movl $0x4, %edi xorl %eax, %eax callq 0xb9db7 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0xccdaf(%rip), %rdi # 0x13c6a8 movl $0x20007, %esi # imm = 0x20007 xorl %edx, %edx callq 0xc17de andb $-0x11, 0xcc2bd(%rip) # 0x13bbc9 movq 0xccd95(%rip), %rdi # 0x13c6a8 movl $0x20005, %esi # imm = 0x20005 movl $0x1, %edx callq 0xc17de andb $-0x9, 0xcc29f(%rip) # 0x13bbc8 movq 0xccd78(%rip), %rdi # 0x13c6a8 movl 0xcc2be(%rip), %esi # 0x13bbf4 movl 0xcc2bc(%rip), %edx # 0x13bbf8 callq 0xc0f7b movq 0xccd60(%rip), %rdi # 0x13c6a8 movl 0xcc28e(%rip), %esi # 0x13bbdc movl 0xcc28c(%rip), %edx # 0x13bbe0 callq 0xc0ecd movq 0xccd48(%rip), %rdi # 0x13c6a8 callq 0xc1633 andb $0x7f, 0xcc25d(%rip) # 0x13bbc9 movq 0xcc269(%rip), %rax # 0x13bbdc movq %rax, 0xcc25a(%rip) # 0x13bbd4 jmp 0x6f8e3
ToggleBorderlessWindowed: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15b, cs:byte_13BBCD cmp r15b, 1 jnz short loc_6F7C3 call ToggleFullscreen loc_6F7C3: call GetCurrentMonitor mov ebp, eax lea rdi, [rsp+48h+var_3C] call glfwGetMonitors test ebp, ebp js loc_6F8C7 cmp ebp, [rsp+48h+var_3C] jge loc_6F8C7 mov rbx, rax mov r13d, ebp mov rdi, [rax+r13*8] call glfwGetVideoMode test rax, rax jz loc_6F8D0 test byte ptr cs:dword_13BBC8+1, 80h jnz loc_6F8F2 mov r14, rax test r15b, r15b jnz short loc_6F821 mov rax, cs:qword_13BBD4 mov cs:qword_13BBDC, rax loc_6F821: mov rax, cs:qword_13BBEC mov cs:qword_13BBF4, rax mov rdi, cs:platform_0 xor ebp, ebp mov esi, offset loc_20005 xor edx, edx call glfwSetWindowAttrib or byte ptr cs:dword_13BBC8, 8 mov rdi, cs:platform_0 mov esi, 20007h mov edx, 1 call glfwSetWindowAttrib or byte ptr cs:dword_13BBC8+1, 10h lea r15, [rsp+48h+var_34] mov [r15], ebp lea r12, [rsp+48h+var_38] mov [r12], ebp mov rdi, [rbx+r13*8] mov rsi, r15 mov rdx, r12 call glfwGetMonitorPos mov ebx, [r14] mov ebp, [r14+4] mov rdi, cs:platform_0 mov esi, [r15] mov edx, [r12] call glfwSetWindowPos mov rdi, cs:platform_0 mov esi, ebx mov edx, ebp call glfwSetWindowSize mov rdi, cs:platform_0 call glfwFocusWindow or byte ptr cs:dword_13BBC8+1, 80h jmp short loc_6F8E3 loc_6F8C7: lea rsi, aGlfwFailedToFi_0; "GLFW: Failed to find selected monitor" jmp short loc_6F8D7 loc_6F8D0: lea rsi, aGlfwFailedToFi; "GLFW: Failed to find video mode for sel"... loc_6F8D7: mov edi, 4 xor eax, eax call TraceLog loc_6F8E3: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6F8F2: mov rdi, cs:platform_0 mov esi, 20007h xor edx, edx call glfwSetWindowAttrib and byte ptr cs:dword_13BBC8+1, 0EFh mov rdi, cs:platform_0 mov esi, offset loc_20005 mov edx, 1 call glfwSetWindowAttrib and byte ptr cs:dword_13BBC8, 0F7h mov rdi, cs:platform_0 mov esi, dword ptr cs:qword_13BBF4 mov edx, dword ptr cs:qword_13BBF4+4 call glfwSetWindowSize mov rdi, cs:platform_0 mov esi, dword ptr cs:qword_13BBDC mov edx, dword ptr cs:qword_13BBDC+4 call glfwSetWindowPos mov rdi, cs:platform_0 call glfwFocusWindow and byte ptr cs:dword_13BBC8+1, 7Fh mov rax, cs:qword_13BBDC mov cs:qword_13BBD4, rax jmp loc_6F8E3
long long ToggleBorderlessWindowed() { char v0; // r15 int CurrentMonitor; // ebp long long Monitors; // rax int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d long long v7; // rbx long long VideoMode; // rax unsigned int *v9; // r14 unsigned int v10; // ebx unsigned int v11; // ebp long long result; // rax const char *v13; // rsi int v14; // [rsp+Ch] [rbp-3Ch] BYREF unsigned int v15; // [rsp+10h] [rbp-38h] BYREF _DWORD v16[13]; // [rsp+14h] [rbp-34h] BYREF v0 = byte_13BBCD; if ( byte_13BBCD == 1 ) ToggleFullscreen(); CurrentMonitor = GetCurrentMonitor(); Monitors = glfwGetMonitors(&v14); if ( CurrentMonitor < 0 || CurrentMonitor >= v14 ) { v13 = "GLFW: Failed to find selected monitor"; return TraceLog(4, (_DWORD)v13, v3, v4, v5, v6); } v7 = Monitors; VideoMode = glfwGetVideoMode(*(_QWORD *)(Monitors + 8LL * (unsigned int)CurrentMonitor)); if ( !VideoMode ) { v13 = "GLFW: Failed to find video mode for selected monitor"; return TraceLog(4, (_DWORD)v13, v3, v4, v5, v6); } if ( (dword_13BBC8 & 0x8000) != 0 ) { glfwSetWindowAttrib(platform_0, 131079LL, 0LL); BYTE1(dword_13BBC8) &= ~0x10u; glfwSetWindowAttrib(platform_0, &loc_20005, 1LL); LOBYTE(dword_13BBC8) = dword_13BBC8 & 0xF7; glfwSetWindowSize(platform_0, (unsigned int)qword_13BBF4, HIDWORD(qword_13BBF4)); glfwSetWindowPos(platform_0, (unsigned int)qword_13BBDC, HIDWORD(qword_13BBDC)); glfwFocusWindow(platform_0); BYTE1(dword_13BBC8) &= ~0x80u; result = qword_13BBDC; qword_13BBD4 = qword_13BBDC; } else { v9 = (unsigned int *)VideoMode; if ( !v0 ) qword_13BBDC = qword_13BBD4; qword_13BBF4 = qword_13BBEC; glfwSetWindowAttrib(platform_0, &loc_20005, 0LL); LOBYTE(dword_13BBC8) = dword_13BBC8 | 8; glfwSetWindowAttrib(platform_0, 131079LL, 1LL); BYTE1(dword_13BBC8) |= 0x10u; v16[0] = 0; v15 = 0; glfwGetMonitorPos(*(_QWORD *)(v7 + 8LL * (unsigned int)CurrentMonitor), v16, &v15); v10 = *v9; v11 = v9[1]; glfwSetWindowPos(platform_0, v16[0], v15); glfwSetWindowSize(platform_0, v10, v11); result = glfwFocusWindow(platform_0); BYTE1(dword_13BBC8) |= 0x80u; } return result; }
ToggleBorderlessWindowed: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15B,byte ptr [0x0023bbcd] CMP R15B,0x1 JNZ 0x0016f7c3 CALL 0x0016f4cf LAB_0016f7c3: CALL 0x0016f5f8 MOV EBP,EAX LEA RDI,[RSP + 0xc] CALL 0x001bf07a TEST EBP,EBP JS 0x0016f8c7 CMP EBP,dword ptr [RSP + 0xc] JGE 0x0016f8c7 MOV RBX,RAX MOV R13D,EBP MOV RDI,qword ptr [RAX + R13*0x8] CALL 0x001bf463 TEST RAX,RAX JZ 0x0016f8d0 TEST byte ptr [0x0023bbc9],0x80 JNZ 0x0016f8f2 MOV R14,RAX TEST R15B,R15B JNZ 0x0016f821 MOV RAX,qword ptr [0x0023bbd4] MOV qword ptr [0x0023bbdc],RAX LAB_0016f821: MOV RAX,qword ptr [0x0023bbec] MOV qword ptr [0x0023bbf4],RAX MOV RDI,qword ptr [0x0023c6a8] XOR EBP,EBP MOV ESI,0x20005 XOR EDX,EDX CALL 0x001c17de OR byte ptr [0x0023bbc8],0x8 MOV RDI,qword ptr [0x0023c6a8] MOV ESI,0x20007 MOV EDX,0x1 CALL 0x001c17de OR byte ptr [0x0023bbc9],0x10 LEA R15,[RSP + 0x14] MOV dword ptr [R15],EBP LEA R12,[RSP + 0x10] MOV dword ptr [R12],EBP MOV RDI,qword ptr [RBX + R13*0x8] MOV RSI,R15 MOV RDX,R12 CALL 0x001bf112 MOV EBX,dword ptr [R14] MOV EBP,dword ptr [R14 + 0x4] MOV RDI,qword ptr [0x0023c6a8] MOV ESI,dword ptr [R15] MOV EDX,dword ptr [R12] CALL 0x001c0ecd MOV RDI,qword ptr [0x0023c6a8] MOV ESI,EBX MOV EDX,EBP CALL 0x001c0f7b MOV RDI,qword ptr [0x0023c6a8] CALL 0x001c1633 OR byte ptr [0x0023bbc9],0x80 JMP 0x0016f8e3 LAB_0016f8c7: LEA RSI,[0x1df902] JMP 0x0016f8d7 LAB_0016f8d0: LEA RSI,[0x1df8cd] LAB_0016f8d7: MOV EDI,0x4 XOR EAX,EAX CALL 0x001b9db7 LAB_0016f8e3: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016f8f2: MOV RDI,qword ptr [0x0023c6a8] MOV ESI,0x20007 XOR EDX,EDX CALL 0x001c17de AND byte ptr [0x0023bbc9],0xef MOV RDI,qword ptr [0x0023c6a8] MOV ESI,0x20005 MOV EDX,0x1 CALL 0x001c17de AND byte ptr [0x0023bbc8],0xf7 MOV RDI,qword ptr [0x0023c6a8] MOV ESI,dword ptr [0x0023bbf4] MOV EDX,dword ptr [0x0023bbf8] CALL 0x001c0f7b MOV RDI,qword ptr [0x0023c6a8] MOV ESI,dword ptr [0x0023bbdc] MOV EDX,dword ptr [0x0023bbe0] CALL 0x001c0ecd MOV RDI,qword ptr [0x0023c6a8] CALL 0x001c1633 AND byte ptr [0x0023bbc9],0x7f MOV RAX,qword ptr [0x0023bbdc] MOV qword ptr [0x0023bbd4],RAX JMP 0x0016f8e3
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void ToggleBorderlessWindowed(void) { int4 uVar1; int4 uVar2; char cVar3; uint uVar4; long lVar5; int4 *puVar6; char *pcVar7; int local_3c; int4 local_38; int4 local_34; cVar3 = DAT_0023bbcd; if (DAT_0023bbcd == '\x01') { ToggleFullscreen(); } uVar4 = GetCurrentMonitor(); lVar5 = glfwGetMonitors(&local_3c); if (((int)uVar4 < 0) || (local_3c <= (int)uVar4)) { pcVar7 = "GLFW: Failed to find selected monitor"; } else { puVar6 = (int4 *)glfwGetVideoMode(*(int8 *)(lVar5 + (ulong)uVar4 * 8)); if (puVar6 != (int4 *)0x0) { if ((DAT_0023bbc8._1_1_ & 0x80) == 0) { if (cVar3 == '\0') { _DAT_0023bbdc = _DAT_0023bbd4; } _DAT_0023bbf4 = _DAT_0023bbec; glfwSetWindowAttrib(platform_0,0x20005,0); DAT_0023bbc8._0_1_ = (byte)DAT_0023bbc8 | 8; glfwSetWindowAttrib(platform_0,0x20007,1); DAT_0023bbc8._1_1_ = DAT_0023bbc8._1_1_ | 0x10; local_34 = 0; local_38 = 0; glfwGetMonitorPos(*(int8 *)(lVar5 + (ulong)uVar4 * 8),&local_34,&local_38); uVar1 = *puVar6; uVar2 = puVar6[1]; glfwSetWindowPos(platform_0,local_34,local_38); glfwSetWindowSize(platform_0,uVar1,uVar2); glfwFocusWindow(platform_0); DAT_0023bbc8._1_1_ = DAT_0023bbc8._1_1_ | 0x80; return; } glfwSetWindowAttrib(platform_0,0x20007,0); DAT_0023bbc8._1_1_ = DAT_0023bbc8._1_1_ & 0xef; glfwSetWindowAttrib(platform_0,0x20005,1); DAT_0023bbc8._0_1_ = (byte)DAT_0023bbc8 & 0xf7; glfwSetWindowSize(platform_0,_DAT_0023bbf4 & 0xffffffff,_DAT_0023bbf8); glfwSetWindowPos(platform_0,_DAT_0023bbdc & 0xffffffff,_DAT_0023bbe0); glfwFocusWindow(platform_0); DAT_0023bbc8._1_1_ = DAT_0023bbc8._1_1_ & 0x7f; _DAT_0023bbd4 = _DAT_0023bbdc; return; } pcVar7 = "GLFW: Failed to find video mode for selected monitor"; } TraceLog(4,pcVar7); return; }
44,998
my_longlong10_to_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_longlong10_to_str_8bit(CHARSET_INFO *cs __attribute__((unused)), char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *e; long long_val; uint sign= 0; ulonglong uval = (ulonglong)val; if (radix < 0) { if (val < 0) { /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; *dst++= '-'; len--; sign= 1; } } e = p = &buffer[sizeof(buffer)-1]; *p= 0; if (uval == 0) { *--p= '0'; len= 1; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p = '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p = (char) ('0' + (long_val - quo*10)); long_val= quo; } len= MY_MIN(len, (size_t) (e-p)); cnv: memcpy(dst, p, len); return len+sign; }
O3
c
my_longlong10_to_str_8bit: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdx, %r9 movq %rsi, %rdi movq %fs:0x28, %rax movq %rax, -0x18(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %cl orb %al, %cl jne 0x36f6e negq %r8 movb $0x2d, (%rdi) incq %rdi decq %r9 leaq -0x20(%rbp), %rbx movb $0x0, (%rbx) movl $0x1, %r14d jmp 0x36f82 movb $0x0, -0x20(%rbp) testq %r8, %r8 je 0x3700e leaq -0x20(%rbp), %rbx xorl %r14d, %r14d movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD testq %r8, %r8 js 0x36f96 movq %rbx, %rsi jmp 0x36fb7 movq %r8, %rax mulq %rcx shrq $0x3, %rdx leaq -0x21(%rbp), %rsi imull $0xf6, %edx, %eax addl %eax, %r8d addb $0x30, %r8b movb %r8b, (%rsi) movq %rdx, %r8 subq %rsi, %rbx movq %r8, %rax mulq %rcx shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %r8d, %eax addb $0x30, %al movb %al, -0x1(%rsi) decq %rsi incq %rbx cmpq $0x9, %r8 movq %rdx, %r8 ja 0x36fba cmpq %rbx, %r9 cmovbq %r9, %rbx movq %rbx, %rdx callq 0x2a250 movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x3701f addq %r14, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq leaq -0x21(%rbp), %rsi movb $0x30, (%rsi) movl $0x1, %ebx xorl %r14d, %r14d jmp 0x36fe8 callq 0x2a330
my_longlong10_to_str_8bit: push rbp mov rbp, rsp push r14 push rbx sub rsp, 50h mov r9, rdx mov rdi, rsi mov rax, fs:28h mov [rbp+var_18], rax test ecx, ecx setns al test r8, r8 setns cl or cl, al jnz short loc_36F6E neg r8 mov byte ptr [rdi], 2Dh ; '-' inc rdi dec r9 lea rbx, [rbp+var_20] mov byte ptr [rbx], 0 mov r14d, 1 jmp short loc_36F82 loc_36F6E: mov [rbp+var_20], 0 test r8, r8 jz loc_3700E lea rbx, [rbp+var_20] xor r14d, r14d loc_36F82: mov rcx, 0CCCCCCCCCCCCCCCDh test r8, r8 js short loc_36F96 mov rsi, rbx jmp short loc_36FB7 loc_36F96: mov rax, r8 mul rcx shr rdx, 3 lea rsi, [rbp+var_21] imul eax, edx, 0F6h add r8d, eax add r8b, 30h ; '0' mov [rsi], r8b mov r8, rdx loc_36FB7: sub rbx, rsi loc_36FBA: mov rax, r8 mul rcx shr rdx, 3 imul eax, edx, 0F6h add eax, r8d add al, 30h ; '0' mov [rsi-1], al dec rsi inc rbx cmp r8, 9 mov r8, rdx ja short loc_36FBA cmp r9, rbx cmovb rbx, r9 loc_36FE8: mov rdx, rbx call _memcpy mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_3701F add rbx, r14 mov rax, rbx add rsp, 50h pop rbx pop r14 pop rbp retn loc_3700E: lea rsi, [rbp+var_21] mov byte ptr [rsi], 30h ; '0' mov ebx, 1 xor r14d, r14d jmp short loc_36FE8 loc_3701F: call ___stack_chk_fail
_BYTE * my_longlong10_to_str_8bit(long long a1, _BYTE *a2, _BYTE *a3, int a4, unsigned long long a5) { _BYTE *v5; // r9 _BYTE *v6; // rdi long long v7; // r14 char *v8; // rsi _BYTE *v9; // rbx bool v10; // cc char v12; // [rsp+3Fh] [rbp-21h] BYREF _BYTE v13[8]; // [rsp+40h] [rbp-20h] BYREF unsigned long long v14; // [rsp+48h] [rbp-18h] v5 = a3; v6 = a2; v14 = __readfsqword(0x28u); if ( a4 >= 0 || (a5 & 0x8000000000000000LL) == 0LL ) { v13[0] = 0; if ( !a5 ) { v8 = &v12; v12 = 48; v9 = (_BYTE *)(&dword_0 + 1); v7 = 0LL; goto LABEL_12; } v7 = 0LL; } else { a5 = -(long long)a5; *a2 = 45; v6 = a2 + 1; v5 = a3 - 1; v13[0] = 0; v7 = 1LL; } if ( (a5 & 0x8000000000000000LL) != 0LL ) { v8 = &v12; v12 = a5 % 0xA + 48; a5 /= 0xAuLL; } else { v8 = v13; } v9 = (_BYTE *)(v13 - v8); do { *--v8 = a5 % 0xA + 48; ++v9; v10 = a5 <= 9; a5 /= 0xAuLL; } while ( !v10 ); if ( v5 < v9 ) v9 = v5; LABEL_12: memcpy(v6, v8, v9); return &v9[v7]; }
my_longlong10_to_str_8bit: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R9,RDX MOV RDI,RSI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX TEST ECX,ECX SETNS AL TEST R8,R8 SETNS CL OR CL,AL JNZ 0x00136f6e NEG R8 MOV byte ptr [RDI],0x2d INC RDI DEC R9 LEA RBX,[RBP + -0x20] MOV byte ptr [RBX],0x0 MOV R14D,0x1 JMP 0x00136f82 LAB_00136f6e: MOV byte ptr [RBP + -0x20],0x0 TEST R8,R8 JZ 0x0013700e LEA RBX,[RBP + -0x20] XOR R14D,R14D LAB_00136f82: MOV RCX,-0x3333333333333333 TEST R8,R8 JS 0x00136f96 MOV RSI,RBX JMP 0x00136fb7 LAB_00136f96: MOV RAX,R8 MUL RCX SHR RDX,0x3 LEA RSI,[RBP + -0x21] IMUL EAX,EDX,0xf6 ADD R8D,EAX ADD R8B,0x30 MOV byte ptr [RSI],R8B MOV R8,RDX LAB_00136fb7: SUB RBX,RSI LAB_00136fba: MOV RAX,R8 MUL RCX SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,R8D ADD AL,0x30 MOV byte ptr [RSI + -0x1],AL DEC RSI INC RBX CMP R8,0x9 MOV R8,RDX JA 0x00136fba CMP R9,RBX CMOVC RBX,R9 LAB_00136fe8: MOV RDX,RBX CALL 0x0012a250 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0013701f ADD RBX,R14 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_0013700e: LEA RSI,[RBP + -0x21] MOV byte ptr [RSI],0x30 MOV EBX,0x1 XOR R14D,R14D JMP 0x00136fe8 LAB_0013701f: CALL 0x0012a330
long my_longlong10_to_str_8bit (int8 param_1,int1 *param_2,ulong param_3,int param_4,ulong param_5) { bool bVar1; ulong __n; char *__src; long lVar2; long in_FS_OFFSET; char local_29 [9]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); if ((long)param_5 < 0 && param_4 < 0) { param_5 = -param_5; *param_2 = 0x2d; param_2 = param_2 + 1; param_3 = param_3 - 1; lVar2 = 1; } else { if (param_5 == 0) { __src = local_29; local_29[0] = '0'; __n = 1; lVar2 = 0; goto LAB_00136fe8; } lVar2 = 0; } __src = local_29 + 1; if ((long)param_5 < 0) { local_29[0] = (char)param_5 + (char)(param_5 / 10) * -10 + '0'; __src = local_29; param_5 = param_5 / 10; } __n = (long)(local_29 + 1) - (long)__src; do { __src[-1] = (char)(param_5 / 10) * -10 + (char)param_5 + '0'; __src = __src + -1; __n = __n + 1; bVar1 = 9 < param_5; param_5 = param_5 / 10; } while (bVar1); if (param_3 < __n) { __n = param_3; } LAB_00136fe8: local_29[1] = 0; memcpy(param_2,__src,__n); if (*(long *)(in_FS_OFFSET + 0x28) != local_20) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return __n + lVar2; }
44,999
my_wc_to_printable_ex
eloqsql/strings/ctype.c
int my_wc_to_printable_ex(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end, uint bs, uint bslen, uint diglen) { uchar *str0; uint i, length; uchar tmp[MY_CS_PRINTABLE_CHAR_LENGTH * MY_CS_MBMAXLEN]; if (my_is_printable(wc)) { int mblen= my_ci_wc_mb(cs, wc, str, end); if (mblen > 0) return mblen; } if (str + my_printable_length(bslen, diglen) > end) return MY_CS_TOOSMALLN(my_printable_length(bslen, diglen)); if ((cs->state & MY_CS_NONASCII) == 0) return to_printable_8bit(str, wc, bs); length= to_printable_8bit(tmp, wc, bs); str0= str; for (i= 0; i < length; i++) { uint expected_length= i == 0 ? bslen : diglen; if (my_ci_wc_mb(cs, tmp[i], str, end) != (int) expected_length) { DBUG_ASSERT(0); return MY_CS_ILSEQ; } str+= expected_length; } return (int) (str - str0); }
O0
c
my_wc_to_printable_ex: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl 0x10(%rbp), %eax movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x48(%rbp) movq %rdx, -0x50(%rbp) movq %rcx, -0x58(%rbp) movl %r8d, -0x5c(%rbp) movl %r9d, -0x60(%rbp) movq -0x48(%rbp), %rdi callq 0x7c330 cmpb $0x0, %al je 0x7c1e7 movq -0x40(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x40(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x50(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax movl %eax, -0x74(%rbp) cmpl $0x0, -0x74(%rbp) jle 0x7c1e5 movl -0x74(%rbp), %eax movl %eax, -0x34(%rbp) jmp 0x7c2ff jmp 0x7c1e7 movq -0x50(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x60(%rbp), %edi movl 0x10(%rbp), %esi callq 0x7c3b0 movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x58(%rbp), %rax jbe 0x7c227 movl -0x60(%rbp), %edi movl 0x10(%rbp), %esi callq 0x7c3b0 movl %eax, %ecx movl $0xffffff9c, %eax # imm = 0xFFFFFF9C subl %ecx, %eax movl %eax, -0x34(%rbp) jmp 0x7c2ff movq -0x40(%rbp), %rax movl 0xc(%rax), %eax andl $0x2000, %eax # imm = 0x2000 cmpl $0x0, %eax jne 0x7c250 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rsi movl -0x5c(%rbp), %edx callq 0x7c3d0 movl %eax, -0x34(%rbp) jmp 0x7c2ff leaq -0x30(%rbp), %rdi movq -0x48(%rbp), %rsi movl -0x5c(%rbp), %edx callq 0x7c3d0 movl %eax, -0x70(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x68(%rbp) movl $0x0, -0x6c(%rbp) movl -0x6c(%rbp), %eax cmpl -0x70(%rbp), %eax jae 0x7c2f1 cmpl $0x0, -0x6c(%rbp) jne 0x7c28b movl -0x60(%rbp), %eax movl %eax, -0x84(%rbp) jmp 0x7c294 movl 0x10(%rbp), %eax movl %eax, -0x84(%rbp) movl -0x84(%rbp), %eax movl %eax, -0x78(%rbp) movq -0x40(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x40(%rbp), %rdi movl -0x6c(%rbp), %ecx movzbl -0x30(%rbp,%rcx), %ecx movl %ecx, %esi movq -0x50(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax cmpl -0x78(%rbp), %eax je 0x7c2d6 jmp 0x7c2cb jmp 0x7c2cd movl $0x0, -0x34(%rbp) jmp 0x7c2ff movl -0x78(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movl -0x6c(%rbp), %eax addl $0x1, %eax movl %eax, -0x6c(%rbp) jmp 0x7c272 movq -0x50(%rbp), %rax movq -0x68(%rbp), %rcx subq %rcx, %rax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x88(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x7c329 movl -0x88(%rbp), %eax addq $0x90, %rsp popq %rbp retq callq 0x29390 nop
my_wc_to_printable_ex: push rbp mov rbp, rsp sub rsp, 90h mov eax, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_40], rdi mov [rbp+var_48], rsi mov [rbp+var_50], rdx mov [rbp+var_58], rcx mov [rbp+var_5C], r8d mov [rbp+var_60], r9d mov rdi, [rbp+var_48] call my_is_printable cmp al, 0 jz short loc_7C1E7 mov rax, [rbp+var_40] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_48] mov rdx, [rbp+var_50] mov rcx, [rbp+var_58] call rax mov [rbp+var_74], eax cmp [rbp+var_74], 0 jle short loc_7C1E5 mov eax, [rbp+var_74] mov [rbp+var_34], eax jmp loc_7C2FF loc_7C1E5: jmp short $+2 loc_7C1E7: mov rax, [rbp+var_50] mov [rbp+var_80], rax mov edi, [rbp+var_60] mov esi, [rbp+arg_0] call my_printable_length mov ecx, eax mov rax, [rbp+var_80] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_58] jbe short loc_7C227 mov edi, [rbp+var_60] mov esi, [rbp+arg_0] call my_printable_length mov ecx, eax mov eax, 0FFFFFF9Ch sub eax, ecx mov [rbp+var_34], eax jmp loc_7C2FF loc_7C227: mov rax, [rbp+var_40] mov eax, [rax+0Ch] and eax, 2000h cmp eax, 0 jnz short loc_7C250 mov rdi, [rbp+var_50] mov rsi, [rbp+var_48] mov edx, [rbp+var_5C] call to_printable_8bit mov [rbp+var_34], eax jmp loc_7C2FF loc_7C250: lea rdi, [rbp+var_30] mov rsi, [rbp+var_48] mov edx, [rbp+var_5C] call to_printable_8bit mov [rbp+var_70], eax mov rax, [rbp+var_50] mov [rbp+var_68], rax mov [rbp+var_6C], 0 loc_7C272: mov eax, [rbp+var_6C] cmp eax, [rbp+var_70] jnb short loc_7C2F1 cmp [rbp+var_6C], 0 jnz short loc_7C28B mov eax, [rbp+var_60] mov [rbp+var_84], eax jmp short loc_7C294 loc_7C28B: mov eax, [rbp+arg_0] mov [rbp+var_84], eax loc_7C294: mov eax, [rbp+var_84] mov [rbp+var_78], eax mov rax, [rbp+var_40] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_40] mov ecx, [rbp+var_6C] movzx ecx, [rbp+rcx+var_30] mov esi, ecx mov rdx, [rbp+var_50] mov rcx, [rbp+var_58] call rax cmp eax, [rbp+var_78] jz short loc_7C2D6 jmp short $+2 loc_7C2CB: jmp short $+2 loc_7C2CD: mov [rbp+var_34], 0 jmp short loc_7C2FF loc_7C2D6: mov ecx, [rbp+var_78] mov rax, [rbp+var_50] mov ecx, ecx add rax, rcx mov [rbp+var_50], rax mov eax, [rbp+var_6C] add eax, 1 mov [rbp+var_6C], eax jmp short loc_7C272 loc_7C2F1: mov rax, [rbp+var_50] mov rcx, [rbp+var_68] sub rax, rcx mov [rbp+var_34], eax loc_7C2FF: mov eax, [rbp+var_34] mov [rbp+var_88], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_7C329 mov eax, [rbp+var_88] add rsp, 90h pop rbp retn loc_7C329: call ___stack_chk_fail
long long my_wc_to_printable_ex( long long a1, long long a2, long long a3, unsigned long long a4, unsigned int a5, unsigned int a6, unsigned int a7) { unsigned int v8; // [rsp+Ch] [rbp-84h] int v9; // [rsp+1Ch] [rbp-74h] unsigned int v10; // [rsp+20h] [rbp-70h] unsigned int i; // [rsp+24h] [rbp-6Ch] int v12; // [rsp+28h] [rbp-68h] _BYTE v18[40]; // [rsp+60h] [rbp-30h] BYREF unsigned long long v19; // [rsp+88h] [rbp-8h] v19 = __readfsqword(0x28u); if ( (unsigned __int8)my_is_printable(a2) && (v9 = (*(long long ( **)(long long, long long, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, a2, a3, a4), v9 > 0) ) { return (unsigned int)v9; } else if ( (unsigned long long)(unsigned int)my_printable_length(a6, a7) + a3 <= a4 ) { if ( (*(_DWORD *)(a1 + 12) & 0x2000) != 0 ) { v10 = to_printable_8bit(v18, a2, a5); v12 = a3; for ( i = 0; i < v10; ++i ) { if ( i ) v8 = a7; else v8 = a6; if ( (*(unsigned int ( **)(long long, _QWORD, long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, (unsigned __int8)v18[i], a3, a4) != v8 ) return 0; a3 += v8; } return (unsigned int)(a3 - v12); } else { return (unsigned int)to_printable_8bit(a3, a2, a5); } } else { return (unsigned int)(-100 - my_printable_length(a6, a7)); } }
my_wc_to_printable_ex: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV EAX,dword ptr [RBP + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x48],RSI MOV qword ptr [RBP + -0x50],RDX MOV qword ptr [RBP + -0x58],RCX MOV dword ptr [RBP + -0x5c],R8D MOV dword ptr [RBP + -0x60],R9D MOV RDI,qword ptr [RBP + -0x48] CALL 0x0017c330 CMP AL,0x0 JZ 0x0017c1e7 MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x58] CALL RAX MOV dword ptr [RBP + -0x74],EAX CMP dword ptr [RBP + -0x74],0x0 JLE 0x0017c1e5 MOV EAX,dword ptr [RBP + -0x74] MOV dword ptr [RBP + -0x34],EAX JMP 0x0017c2ff LAB_0017c1e5: JMP 0x0017c1e7 LAB_0017c1e7: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x80],RAX MOV EDI,dword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + 0x10] CALL 0x0017c3b0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x80] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x58] JBE 0x0017c227 MOV EDI,dword ptr [RBP + -0x60] MOV ESI,dword ptr [RBP + 0x10] CALL 0x0017c3b0 MOV ECX,EAX MOV EAX,0xffffff9c SUB EAX,ECX MOV dword ptr [RBP + -0x34],EAX JMP 0x0017c2ff LAB_0017c227: MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x2000 CMP EAX,0x0 JNZ 0x0017c250 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x5c] CALL 0x0017c3d0 MOV dword ptr [RBP + -0x34],EAX JMP 0x0017c2ff LAB_0017c250: LEA RDI,[RBP + -0x30] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,dword ptr [RBP + -0x5c] CALL 0x0017c3d0 MOV dword ptr [RBP + -0x70],EAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x68],RAX MOV dword ptr [RBP + -0x6c],0x0 LAB_0017c272: MOV EAX,dword ptr [RBP + -0x6c] CMP EAX,dword ptr [RBP + -0x70] JNC 0x0017c2f1 CMP dword ptr [RBP + -0x6c],0x0 JNZ 0x0017c28b MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x84],EAX JMP 0x0017c294 LAB_0017c28b: MOV EAX,dword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x84],EAX LAB_0017c294: MOV EAX,dword ptr [RBP + -0x84] MOV dword ptr [RBP + -0x78],EAX MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x6c] MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x30] MOV ESI,ECX MOV RDX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x58] CALL RAX CMP EAX,dword ptr [RBP + -0x78] JZ 0x0017c2d6 JMP 0x0017c2cb LAB_0017c2cb: JMP 0x0017c2cd LAB_0017c2cd: MOV dword ptr [RBP + -0x34],0x0 JMP 0x0017c2ff LAB_0017c2d6: MOV ECX,dword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x6c] ADD EAX,0x1 MOV dword ptr [RBP + -0x6c],EAX JMP 0x0017c272 LAB_0017c2f1: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x68] SUB RAX,RCX MOV dword ptr [RBP + -0x34],EAX LAB_0017c2ff: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x88],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0017c329 MOV EAX,dword ptr [RBP + -0x88] ADD RSP,0x90 POP RBP RET LAB_0017c329: CALL 0x00129390
int my_wc_to_printable_ex (long param_1,int8 param_2,long param_3,ulong param_4,int4 param_5, uint param_6,uint param_7) { char cVar1; uint uVar2; uint uVar3; long in_FS_OFFSET; uint local_8c; uint local_74; long local_58; int local_3c; int1 local_38 [40]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); cVar1 = my_is_printable(param_2); if ((cVar1 == '\0') || (local_3c = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30))(param_1,param_2,param_3,param_4), local_3c < 1)) { uVar2 = my_printable_length(param_6,param_7); if (param_4 < param_3 + (ulong)uVar2) { local_3c = my_printable_length(param_6,param_7); local_3c = -100 - local_3c; } else if ((*(uint *)(param_1 + 0xc) & 0x2000) == 0) { local_3c = to_printable_8bit(param_3,param_2,param_5); } else { uVar2 = to_printable_8bit(local_38,param_2,param_5); local_58 = param_3; for (local_74 = 0; local_74 < uVar2; local_74 = local_74 + 1) { local_8c = param_6; if (local_74 != 0) { local_8c = param_7; } uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,local_38[local_74],local_58,param_4); if (uVar3 != local_8c) { local_3c = 0; goto LAB_0017c2ff; } local_58 = local_58 + (ulong)local_8c; } local_3c = (int)local_58 - (int)param_3; } } LAB_0017c2ff: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_3c; }