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
9,000
my_char_weight_put
eloqsql/strings/ctype-uca.c
static my_bool my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst, uint16 *to, size_t to_length, size_t *nweights, my_wc_t *str, size_t len) { size_t count; int rc= FALSE; if (!to_length) { *nweights= 0; return len > 0; } to_length--; /* Without trailing zero */ for (count= 0; len; ) { size_t chlen; const uint16 *from= NULL; uint16 implicit_weights[3]; for (chlen= len; chlen > 1; chlen--) { const MY_CONTRACTION *cnt; if (chlen <= MY_UCA_MAX_CONTRACTION && (cnt= my_uca_contraction_find(&dst->contractions, str, chlen))) { from= cnt->weight; str+= chlen; len-= chlen; break; } } if (!from) { from= my_char_weight_addr(dst, *str); if (!from) { from= implicit_weights; my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno); } str++; len--; } for ( ; from && *from && count < to_length; ) { *to++= *from++; count++; } if (count == to_length && from && * from) rc= TRUE; /* All weights did not fit */ } *to= 0; *nweights= count; return rc; }
O3
c
my_char_weight_put: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, -0x30(%rbp) testq %rdx, %rdx je 0x4456c movq %rcx, -0x68(%rbp) testq %r9, %r9 je 0x4457b movq %rdi, -0x60(%rbp) decq %rdx xorl %ecx, %ecx xorl %r13d, %r13d movq %rdx, -0x48(%rbp) movq %rcx, -0x50(%rbp) movq %rsi, -0x58(%rbp) movq %r9, -0x40(%rbp) cmpq $0x2, %r9 jb 0x44450 movq -0x40(%rbp), %rbx leaq (,%rbx,8), %r12 cmpq $0x6, %rbx ja 0x44443 movq -0x60(%rbp), %rax movq 0x18(%rax), %rax testq %rax, %rax jle 0x44443 movq -0x60(%rbp), %rcx movq 0x20(%rcx), %r15 imulq $0x58, %rax, %r14 addq %r15, %r14 leaq (,%rbx,8), %rax movq %rax, -0x70(%rbp) cmpq $0x6, %rbx je 0x4441b cmpq $0x0, (%r15,%r12) jne 0x4443a cmpb $0x0, 0x52(%r15) jne 0x4443a movq %r15, %rdi movq -0x30(%rbp), %rsi movq -0x70(%rbp), %rdx callq 0x242d0 testl %eax, %eax je 0x444f3 addq $0x58, %r15 cmpq %r14, %r15 jb 0x4440e decq %rbx addq $-0x8, %r12 cmpq $0x1, %rbx ja 0x443e0 movq -0x30(%rbp), %rax movq (%rax), %rax movl %eax, %ecx movq -0x60(%rbp), %rsi cmpq %rcx, (%rsi) jb 0x44488 movq 0x10(%rsi), %rcx movl %eax, %edx shrl $0x8, %edx movq (%rcx,%rdx,8), %rcx testq %rcx, %rcx je 0x44488 movzbl %al, %eax movq 0x8(%rsi), %rsi movzbl (%rsi,%rdx), %edx imull %eax, %edx leaq (%rcx,%rdx,2), %r15 jmp 0x444d9 leaq -0x3400(%rax), %rcx leaq -0x4e00(%rax), %rdx xorl %esi, %esi cmpq $0x51a6, %rdx # imm = 0x51A6 setae %sil shll $0x7, %esi orl $0xfffffb40, %esi # imm = 0xFFFFFB40 cmpq $0x19b6, %rcx # imm = 0x19B6 movl $0xfb80, %ecx # imm = 0xFB80 cmovbl %ecx, %esi movl %eax, %ecx shrl $0xf, %ecx addl %esi, %ecx movw %cx, -0x36(%rbp) orl $0x8000, %eax # imm = 0x8000 movw %ax, -0x34(%rbp) movw $0x0, -0x32(%rbp) leaq -0x36(%rbp), %r15 movq -0x58(%rbp), %rsi movq -0x40(%rbp), %r9 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rdx addq $0x8, -0x30(%rbp) decq %r9 jmp 0x44516 addq $0x30, %r15 movq -0x30(%rbp), %rax leaq (%rax,%rbx,8), %rax movq %rax, -0x30(%rbp) movq -0x40(%rbp), %r9 subq %rbx, %r9 movq -0x58(%rbp), %rsi movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rdx movzwl (%r15), %eax testw %ax, %ax sete %cl cmpq %rdx, %r13 setae %r8b orb %cl, %r8b jne 0x4454c addq $0x2, %r15 movw %ax, (%rsi) addq $0x2, %rsi incq %r13 movzwl (%r15), %eax testw %ax, %ax je 0x4454c addq $0x2, %r15 cmpq %rdx, %r13 jb 0x44530 testw %ax, %ax movzbl %dil, %eax movl $0x1, %ecx cmovel %eax, %ecx cmpq %rdx, %r13 cmovnel %eax, %ecx testq %r9, %r9 jne 0x443c2 jmp 0x44580 movq $0x0, (%rcx) testq %r9, %r9 setne %cl jmp 0x4458c xorl %r13d, %r13d xorl %ecx, %ecx movw $0x0, (%rsi) movq -0x68(%rbp), %rax movq %r13, (%rax) movl %ecx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_char_weight_put: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_30], r8 test rdx, rdx jz loc_4456C mov [rbp+var_68], rcx test r9, r9 jz loc_4457B mov [rbp+var_60], rdi dec rdx xor ecx, ecx xor r13d, r13d mov [rbp+var_48], rdx loc_443C2: mov [rbp+var_50], rcx mov [rbp+var_58], rsi mov [rbp+var_40], r9 cmp r9, 2 jb short loc_44450 mov rbx, [rbp+var_40] lea r12, ds:0[rbx*8] loc_443E0: cmp rbx, 6 ja short loc_44443 mov rax, [rbp+var_60] mov rax, [rax+18h] test rax, rax jle short loc_44443 mov rcx, [rbp+var_60] mov r15, [rcx+20h] imul r14, rax, 58h ; 'X' add r14, r15 lea rax, ds:0[rbx*8] mov [rbp+var_70], rax loc_4440E: cmp rbx, 6 jz short loc_4441B cmp qword ptr [r15+r12], 0 jnz short loc_4443A loc_4441B: cmp byte ptr [r15+52h], 0 jnz short loc_4443A mov rdi, r15 mov rsi, [rbp+var_30] mov rdx, [rbp+var_70] call _bcmp test eax, eax jz loc_444F3 loc_4443A: add r15, 58h ; 'X' cmp r15, r14 jb short loc_4440E loc_44443: dec rbx add r12, 0FFFFFFFFFFFFFFF8h cmp rbx, 1 ja short loc_443E0 loc_44450: mov rax, [rbp+var_30] mov rax, [rax] mov ecx, eax mov rsi, [rbp+var_60] cmp [rsi], rcx jb short loc_44488 mov rcx, [rsi+10h] mov edx, eax shr edx, 8 mov rcx, [rcx+rdx*8] test rcx, rcx jz short loc_44488 movzx eax, al mov rsi, [rsi+8] movzx edx, byte ptr [rsi+rdx] imul edx, eax lea r15, [rcx+rdx*2] jmp short loc_444D9 loc_44488: lea rcx, [rax-3400h] lea rdx, [rax-4E00h] xor esi, esi cmp rdx, 51A6h setnb sil shl esi, 7 or esi, 0FFFFFB40h cmp rcx, 19B6h mov ecx, 0FB80h cmovb esi, ecx mov ecx, eax shr ecx, 0Fh add ecx, esi mov [rbp+var_36], cx or eax, 8000h mov [rbp+var_34], ax mov [rbp+var_32], 0 lea r15, [rbp+var_36] loc_444D9: mov rsi, [rbp+var_58] mov r9, [rbp+var_40] mov rdi, [rbp+var_50] mov rdx, [rbp+var_48] add [rbp+var_30], 8 dec r9 jmp short loc_44516 loc_444F3: add r15, 30h ; '0' mov rax, [rbp+var_30] lea rax, [rax+rbx*8] mov [rbp+var_30], rax mov r9, [rbp+var_40] sub r9, rbx mov rsi, [rbp+var_58] mov rdi, [rbp+var_50] mov rdx, [rbp+var_48] loc_44516: movzx eax, word ptr [r15] test ax, ax setz cl cmp r13, rdx setnb r8b or r8b, cl jnz short loc_4454C add r15, 2 loc_44530: mov [rsi], ax add rsi, 2 inc r13 movzx eax, word ptr [r15] test ax, ax jz short loc_4454C add r15, 2 cmp r13, rdx jb short loc_44530 loc_4454C: test ax, ax movzx eax, dil mov ecx, 1 cmovz ecx, eax cmp r13, rdx cmovnz ecx, eax test r9, r9 jnz loc_443C2 jmp short loc_44580 loc_4456C: mov qword ptr [rcx], 0 test r9, r9 setnz cl jmp short loc_4458C loc_4457B: xor r13d, r13d xor ecx, ecx loc_44580: mov word ptr [rsi], 0 mov rax, [rbp+var_68] mov [rax], r13 loc_4458C: mov eax, ecx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_char_weight_put( _QWORD *a1, _WORD *a2, long long a3, unsigned long long *a4, long long *a5, unsigned long long a6) { unsigned long long v6; // r13 unsigned long long v7; // rbx long long v8; // r12 long long v9; // rax unsigned long long v10; // r15 unsigned long long v11; // r14 long long v12; // rax long long v13; // rdx long long v14; // rcx __int16 *v15; // r15 __int16 v16; // si unsigned __int8 v17; // di unsigned long long v18; // rdx __int16 v19; // ax __int16 *v20; // r15 unsigned long long *v22; // [rsp+8h] [rbp-68h] _WORD *v24; // [rsp+18h] [rbp-58h] unsigned __int8 v25; // [rsp+20h] [rbp-50h] unsigned long long v26; // [rsp+28h] [rbp-48h] unsigned long long v27; // [rsp+30h] [rbp-40h] _WORD v28[3]; // [rsp+3Ah] [rbp-36h] BYREF long long *v29; // [rsp+40h] [rbp-30h] v29 = a5; if ( a3 ) { v22 = a4; if ( a6 ) { LOBYTE(a4) = 0; v6 = 0LL; v26 = a3 - 1; do { v25 = (unsigned __int8)a4; v24 = a2; v27 = a6; if ( a6 < 2 ) { LABEL_15: v12 = *v29; if ( *a1 >= (unsigned long long)(unsigned int)*v29 && (v13 = (unsigned int)v12 >> 8, (v14 = *(_QWORD *)(a1[2] + 8 * v13)) != 0) ) { v15 = (__int16 *)(v14 + 2LL * (unsigned __int8)v12 * (unsigned int)*(unsigned __int8 *)(a1[1] + v13)); } else { v16 = (((unsigned long long)(v12 - 19968) >= 0x51A6) << 7) | 0xFB40; if ( (unsigned long long)(v12 - 13312) < 0x19B6 ) v16 = -1152; v28[0] = v16 + ((unsigned int)v12 >> 15); v28[1] = v12 | 0x8000; v28[2] = 0; v15 = v28; } a2 = v24; v17 = v25; v18 = v26; ++v29; a6 = v27 - 1; } else { v7 = a6; v8 = 8 * a6; while ( 1 ) { if ( v7 <= 6 ) { v9 = a1[3]; if ( v9 > 0 ) break; } LABEL_14: --v7; v8 -= 8LL; if ( v7 <= 1 ) goto LABEL_15; } v10 = a1[4]; v11 = v10 + 88 * v9; while ( v7 != 6 && *(_QWORD *)(v10 + v8) || *(_BYTE *)(v10 + 82) || (unsigned int)bcmp(v10, v29, 8 * v7) ) { v10 += 88LL; if ( v10 >= v11 ) goto LABEL_14; } v15 = (__int16 *)(v10 + 48); v29 += v7; a6 = v27 - v7; v17 = v25; v18 = v26; } v19 = *v15; if ( *v15 != 0 && v6 < v18 ) { v20 = v15 + 1; do { *a2++ = v19; ++v6; v19 = *v20; if ( !*v20 ) break; ++v20; } while ( v6 < v18 ); } LODWORD(a4) = 1; if ( !v19 ) LODWORD(a4) = v17; if ( v6 != v18 ) LODWORD(a4) = v17; } while ( a6 ); } else { v6 = 0LL; LODWORD(a4) = 0; } *a2 = 0; *v22 = v6; } else { *a4 = 0LL; LOBYTE(a4) = a6 != 0; } return (unsigned int)a4; }
my_char_weight_put: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x30],R8 TEST RDX,RDX JZ 0x0014456c MOV qword ptr [RBP + -0x68],RCX TEST R9,R9 JZ 0x0014457b MOV qword ptr [RBP + -0x60],RDI DEC RDX XOR ECX,ECX XOR R13D,R13D MOV qword ptr [RBP + -0x48],RDX LAB_001443c2: MOV qword ptr [RBP + -0x50],RCX MOV qword ptr [RBP + -0x58],RSI MOV qword ptr [RBP + -0x40],R9 CMP R9,0x2 JC 0x00144450 MOV RBX,qword ptr [RBP + -0x40] LEA R12,[RBX*0x8] LAB_001443e0: CMP RBX,0x6 JA 0x00144443 MOV RAX,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RAX + 0x18] TEST RAX,RAX JLE 0x00144443 MOV RCX,qword ptr [RBP + -0x60] MOV R15,qword ptr [RCX + 0x20] IMUL R14,RAX,0x58 ADD R14,R15 LEA RAX,[RBX*0x8] MOV qword ptr [RBP + -0x70],RAX LAB_0014440e: CMP RBX,0x6 JZ 0x0014441b CMP qword ptr [R15 + R12*0x1],0x0 JNZ 0x0014443a LAB_0014441b: CMP byte ptr [R15 + 0x52],0x0 JNZ 0x0014443a MOV RDI,R15 MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x70] CALL 0x001242d0 TEST EAX,EAX JZ 0x001444f3 LAB_0014443a: ADD R15,0x58 CMP R15,R14 JC 0x0014440e LAB_00144443: DEC RBX ADD R12,-0x8 CMP RBX,0x1 JA 0x001443e0 LAB_00144450: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ECX,EAX MOV RSI,qword ptr [RBP + -0x60] CMP qword ptr [RSI],RCX JC 0x00144488 MOV RCX,qword ptr [RSI + 0x10] MOV EDX,EAX SHR EDX,0x8 MOV RCX,qword ptr [RCX + RDX*0x8] TEST RCX,RCX JZ 0x00144488 MOVZX EAX,AL MOV RSI,qword ptr [RSI + 0x8] MOVZX EDX,byte ptr [RSI + RDX*0x1] IMUL EDX,EAX LEA R15,[RCX + RDX*0x2] JMP 0x001444d9 LAB_00144488: LEA RCX,[RAX + -0x3400] LEA RDX,[RAX + -0x4e00] XOR ESI,ESI CMP RDX,0x51a6 SETNC SIL SHL ESI,0x7 OR ESI,0xfffffb40 CMP RCX,0x19b6 MOV ECX,0xfb80 CMOVC ESI,ECX MOV ECX,EAX SHR ECX,0xf ADD ECX,ESI MOV word ptr [RBP + -0x36],CX OR EAX,0x8000 MOV word ptr [RBP + -0x34],AX MOV word ptr [RBP + -0x32],0x0 LEA R15,[RBP + -0x36] LAB_001444d9: MOV RSI,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] ADD qword ptr [RBP + -0x30],0x8 DEC R9 JMP 0x00144516 LAB_001444f3: ADD R15,0x30 MOV RAX,qword ptr [RBP + -0x30] LEA RAX,[RAX + RBX*0x8] MOV qword ptr [RBP + -0x30],RAX MOV R9,qword ptr [RBP + -0x40] SUB R9,RBX MOV RSI,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] LAB_00144516: MOVZX EAX,word ptr [R15] TEST AX,AX SETZ CL CMP R13,RDX SETNC R8B OR R8B,CL JNZ 0x0014454c ADD R15,0x2 LAB_00144530: MOV word ptr [RSI],AX ADD RSI,0x2 INC R13 MOVZX EAX,word ptr [R15] TEST AX,AX JZ 0x0014454c ADD R15,0x2 CMP R13,RDX JC 0x00144530 LAB_0014454c: TEST AX,AX MOVZX EAX,DIL MOV ECX,0x1 CMOVZ ECX,EAX CMP R13,RDX CMOVNZ ECX,EAX TEST R9,R9 JNZ 0x001443c2 JMP 0x00144580 LAB_0014456c: MOV qword ptr [RCX],0x0 TEST R9,R9 SETNZ CL JMP 0x0014458c LAB_0014457b: XOR R13D,R13D XOR ECX,ECX LAB_00144580: MOV word ptr [RSI],0x0 MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RAX],R13 LAB_0014458c: MOV EAX,ECX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_char_weight_put(ulong *param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5, ulong param_6) { ushort uVar1; short sVar2; int iVar3; ulong uVar4; ulong uVar5; ulong uVar6; ulong uVar7; long lVar8; ulong uVar9; void *pvVar10; void *__s1; short *psVar11; short local_3e; ushort local_3c; int2 local_3a; ulong *local_38; if (param_3 == 0) { *param_4 = 0; uVar7 = CONCAT71((int7)((ulong)param_4 >> 8),param_6 != 0); } else { if (param_6 == 0) { uVar9 = 0; uVar7 = 0; } else { uVar5 = param_3 - 1; uVar9 = 0; uVar4 = 0; local_38 = param_5; do { if (1 < param_6) { lVar8 = param_6 * 8; uVar7 = param_6; do { if ((uVar7 < 7) && (0 < (long)param_1[3])) { __s1 = (void *)param_1[4]; pvVar10 = (void *)(param_1[3] * 0x58 + (long)__s1); do { if ((((uVar7 == 6) || (*(long *)((long)__s1 + lVar8) == 0)) && (*(char *)((long)__s1 + 0x52) == '\0')) && (iVar3 = bcmp(__s1,local_38,uVar7 * 8), iVar3 == 0)) { psVar11 = (short *)((long)__s1 + 0x30); local_38 = local_38 + uVar7; param_6 = param_6 - uVar7; goto LAB_00144516; } __s1 = (void *)((long)__s1 + 0x58); } while (__s1 < pvVar10); } uVar7 = uVar7 - 1; lVar8 = lVar8 + -8; } while (1 < uVar7); } uVar7 = *local_38; if (*param_1 < (uVar7 & 0xffffffff)) { LAB_00144488: uVar1 = (ushort)(0x51a5 < uVar7 - 0x4e00) << 7 | 0xfb40; if (uVar7 - 0x3400 < 0x19b6) { uVar1 = 0xfb80; } local_3e = (short)(uVar7 >> 0xf) + uVar1; local_3c = (ushort)uVar7 | 0x8000; local_3a = 0; psVar11 = &local_3e; } else { uVar6 = uVar7 >> 8 & 0xffffff; lVar8 = *(long *)(param_1[2] + uVar6 * 8); if (lVar8 == 0) goto LAB_00144488; psVar11 = (short *)(lVar8 + (ulong)((uint)*(byte *)(param_1[1] + uVar6) * ((uint)uVar7 & 0xff)) * 2); } local_38 = local_38 + 1; param_6 = param_6 - 1; LAB_00144516: sVar2 = *psVar11; if (uVar9 < uVar5 && sVar2 != 0) { do { psVar11 = psVar11 + 1; *param_2 = sVar2; param_2 = param_2 + 1; uVar9 = uVar9 + 1; sVar2 = *psVar11; if (sVar2 == 0) break; } while (uVar9 < uVar5); } uVar7 = 1; if (sVar2 == 0) { uVar7 = uVar4; } if (uVar9 != uVar5) { uVar7 = uVar4; } uVar4 = uVar7; } while (param_6 != 0); } *param_2 = 0; *param_4 = uVar9; } return uVar7 & 0xffffffff; }
9,001
net_realloc
eloqsql/libmariadb/libmariadb/ma_net.c
static my_bool net_realloc(NET *net, size_t length) { uchar *buff; size_t pkt_length; if (length >= net->max_packet_size) { net->error=1; net->pvio->set_error(net->pvio->mysql, CR_NET_PACKET_TOO_LARGE, SQLSTATE_UNKNOWN, 0); return(1); } pkt_length = (length+IO_SIZE-1) & ~(IO_SIZE-1); /* reallocate buffer: size= pkt_length + NET_HEADER_SIZE + COMP_HEADER_SIZE */ if (!(buff=(uchar*) realloc(net->buff, pkt_length + NET_HEADER_SIZE + COMP_HEADER_SIZE))) { net->error=1; return(1); } net->buff=net->write_pos=buff; net->buff_end=buff+(net->max_packet=(unsigned long)pkt_length); return(0); }
O0
c
net_realloc: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x58(%rcx), %rax jb 0x6140d movq -0x10(%rbp), %rax movb $0x1, 0x94(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x50(%rax), %r8 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x40(%rax), %rdi leaq 0x1faaa(%rip), %rax # 0x80ea0 movq (%rax), %rdx movl $0x7e4, %esi # imm = 0x7E4 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq *%r8 movb $0x1, -0x1(%rbp) jmp 0x6148c movq -0x18(%rbp), %rax addq $0x1000, %rax # imm = 0x1000 subq $0x1, %rax andq $-0x1000, %rax # imm = 0xF000 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movq -0x28(%rbp), %rsi addq $0x4, %rsi addq $0x3, %rsi callq 0x14710 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x61459 movq -0x10(%rbp), %rax movb $0x1, 0x94(%rax) movb $0x1, -0x1(%rbp) jmp 0x6148c movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rcx movq -0x28(%rbp), %rax movq -0x10(%rbp), %rdx movq %rax, 0x50(%rdx) addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nop
net_realloc: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov rcx, [rbp+var_10] cmp rax, [rcx+58h] jb short loc_6140D mov rax, [rbp+var_10] mov byte ptr [rax+94h], 1 mov rax, [rbp+var_10] mov rax, [rax] mov r8, [rax+50h] mov rax, [rbp+var_10] mov rax, [rax] mov rdi, [rax+40h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7E4h xor eax, eax mov ecx, eax mov al, 0 call r8 mov [rbp+var_1], 1 jmp short loc_6148C loc_6140D: mov rax, [rbp+var_18] add rax, 1000h sub rax, 1 and rax, 0FFFFFFFFFFFFF000h mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rdi, [rax+8] mov rsi, [rbp+var_28] add rsi, 4 add rsi, 3 call _realloc mov [rbp+var_20], rax cmp rax, 0 jnz short loc_61459 mov rax, [rbp+var_10] mov byte ptr [rax+94h], 1 mov [rbp+var_1], 1 jmp short loc_6148C loc_61459: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_10] mov [rax+8], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_28] mov rdx, [rbp+var_10] mov [rdx+50h], rax add rcx, rax mov rax, [rbp+var_10] mov [rax+10h], rcx mov [rbp+var_1], 0 loc_6148C: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char net_realloc(_QWORD *a1, unsigned long long a2) { unsigned long long v3; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] if ( a2 < a1[11] ) { v3 = (a2 + 4095) & 0xFFFFFFFFFFFFF000LL; v4 = realloc(a1[1], v3 + 7); if ( v4 ) { a1[3] = v4; a1[1] = v4; a1[10] = v3; a1[2] = v3 + v4; return 0; } else { *((_BYTE *)a1 + 148) = 1; return 1; } } else { *((_BYTE *)a1 + 148) = 1; (*(void ( **)(_QWORD, long long, char *, _QWORD))(*a1 + 80LL))( *(_QWORD *)(*a1 + 64LL), 2020LL, SQLSTATE_UNKNOWN, 0LL); return 1; } }
net_realloc: 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] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x58] JC 0x0016140d MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x94],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV R8,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x40] LEA RAX,[0x180ea0] MOV RDX,qword ptr [RAX] MOV ESI,0x7e4 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL R8 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0016148c LAB_0016140d: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1000 SUB RAX,0x1 AND RAX,-0x1000 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x4 ADD RSI,0x3 CALL 0x00114710 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x00161459 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x94],0x1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0016148c LAB_00161459: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV qword ptr [RDX + 0x50],RAX ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_0016148c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 net_realloc(long *param_1,ulong param_2) { ulong uVar1; void *pvVar2; int1 local_9; if (param_2 < (ulong)param_1[0xb]) { uVar1 = param_2 + 0xfff & 0xfffffffffffff000; pvVar2 = realloc((void *)param_1[1],uVar1 + 7); if (pvVar2 == (void *)0x0) { *(int1 *)((long)param_1 + 0x94) = 1; local_9 = 1; } else { param_1[3] = (long)pvVar2; param_1[1] = (long)pvVar2; param_1[10] = uVar1; param_1[2] = (long)pvVar2 + uVar1; local_9 = 0; } } else { *(int1 *)((long)param_1 + 0x94) = 1; (**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x7e4,SQLSTATE_UNKNOWN,0); local_9 = 1; } return local_9; }
9,002
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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)
llama.cpp/common/json.hpp
basic_json(initializer_list_t init, bool type_deduction = true, value_t manual_type = value_t::array) { // check if each element is an array with two elements whose first // element is a string bool is_an_object = std::all_of(init.begin(), init.end(), [](const detail::json_ref<basic_json>& element_ref) { // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; // (many string types can be constructed from 0 via its null-pointer guise, so we get a // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); }); // adjust type if type deduction is not wanted if (!type_deduction) { // if array is wanted, do not create an object though possible if (manual_type == value_t::array) { is_an_object = false; } // if object is wanted but impossible, throw an exception if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) { JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); } } if (is_an_object) { // the initializer list is a list of pairs -> create object m_data.m_type = value_t::object; m_data.m_value = value_t::object; for (auto& element_ref : init) { auto element = element_ref.moved_or_copied(); m_data.m_value.object->emplace( std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), std::move((*element.m_data.m_value.array)[1])); } } else { // the initializer list describes an array -> create array m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(init.begin(), init.end()); } set_parents(); assert_invariant(); }
O3
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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq (%rdx,%rdx,2), %rax leaq (%rsi,%rax,8), %r12 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rsi, %rdi movq %r12, %rsi callq 0x8076e cmpq %r12, %rax sete %cl testb %r13b, %r13b jne 0x72dcf cmpq %r12, %rax sete %al cmpb $0x2, %bpl setne %cl cmpb $0x1, %bpl setne %dl orb %al, %dl je 0x72e8f andb %al, %cl testb %cl, %cl je 0x72e59 movb $0x1, (%rbx) movl $0x30, %edi callq 0x21200 movq %rax, %rcx addq $0x8, %rcx xorps %xmm0, %xmm0 movups %xmm0, (%rax) xorl %edx, %edx movq %rdx, 0x10(%rax) movq %rcx, 0x18(%rax) movq %rcx, 0x20(%rax) movq %rdx, 0x28(%rax) movq %rax, 0x8(%rbx) testq %r15, %r15 je 0x72e73 shlq $0x3, %r15 leaq (%r15,%r15,2), %r12 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x80640 movq 0x8(%rbx), %rdi movq 0x8(%rsp), %rax movq (%rax), %rdx movq 0x8(%rdx), %rsi addq $0x10, %rdx callq 0x80692 movq %r15, %rdi xorl %esi, %esi callq 0x72f4a movq %r15, %rdi callq 0x78a98 addq $0x18, %r14 addq $-0x18, %r12 jne 0x72e17 jmp 0x72e73 movb $0x2, (%rbx) movq %rsp, %rdi movq %r14, (%rdi) leaq 0x20(%rsp), %rsi movq %r12, (%rsi) callq 0x8071a movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x72f4a addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x21630 movq %rax, %r14 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0xa9f1f(%rip), %rsi # 0x11cdcc leaq 0xa9f42(%rip), %rdx # 0x11cdf6 movq %rsp, %rdi callq 0x28112 movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x12d, %esi # imm = 0x12D xorl %ecx, %ecx callq 0x7e21e xorl %ebp, %ebp leaq 0xf0156(%rip), %rsi # 0x163030 leaq 0x2e17(%rip), %rdx # 0x75cf8 movq %r14, %rdi callq 0x21a50 jmp 0x72eef jmp 0x72eef jmp 0x72eef movq %rax, %r15 jmp 0x72f39 movq %rax, %r15 movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x72f4a movq %r14, %rdi callq 0x78a98 jmp 0x72f39 movq %rax, %r15 movq (%rsp), %rdi cmpq %r12, %rdi je 0x72f27 movq 0x10(%rsp), %rsi incq %rsi callq 0x21170 testb %bpl, %bpl jne 0x72f31 jmp 0x72f39 movq %rax, %r15 movq %r14, %rdi callq 0x21ef0 movq %rbx, %rdi callq 0x78a98 movq %r15, %rdi callq 0x21af0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE: push rbp; __int64 push r15; int push r14; void * push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov ebp, r8d mov r13d, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea rax, [rdx+rdx*2] lea r12, [rsi+rax*8] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, r12 call _ZSt9__find_ifIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEN9__gnu_cxx5__ops12_Iter_negateIZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EEET_ST_ST_T0_St26random_access_iterator_tag; std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<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*,__gnu_cxx::__ops::_Iter_negate<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::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<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&)#1}>>(nlohmann::json_abi_v3_11_3::detail::json_ref<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*,nlohmann::json_abi_v3_11_3::detail::json_ref<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*,__gnu_cxx::__ops::_Iter_negate<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::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<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&)#1}>,std::random_access_iterator_tag) cmp rax, r12 setz cl test r13b, r13b jnz short loc_72DCF cmp rax, r12 setz al cmp bpl, 2 setnz cl cmp bpl, 1 setnz dl or dl, al jz loc_72E8F and cl, al loc_72DCF: test cl, cl jz loc_72E59 mov byte ptr [rbx], 1 mov edi, 30h ; '0'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, rax add rcx, 8 xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 xor edx, edx mov [rax+10h], rdx mov [rax+18h], rcx mov [rax+20h], rcx mov [rax+28h], rdx mov [rbx+8], rax test r15, r15 jz short loc_72E73 shl r15, 3 lea r12, [r15+r15*2] mov r15, rsp loc_72E17: mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<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>>::moved_or_copied(void) mov rdi, [rbx+8] mov rax, [rsp+58h+var_50] mov rdx, [rax] mov rsi, [rdx+8] add rdx, 10h call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonIS_St6vectorS5_blmdSaNS7_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS5_SD_EEE7emplaceIJS5_SD_EEESG_ISt17_Rb_tree_iteratorISI_EbEDpOT_; 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>>::emplace<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>>(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> &&) mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add r14, 18h add r12, 0FFFFFFFFFFFFFFE8h jnz short loc_72E17 jmp short loc_72E73 loc_72E59: mov byte ptr [rbx], 2 mov rdi, rsp mov [rdi], r14 lea rsi, [rsp+58h+var_38] mov [rsi], r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; 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>::create<std::vector<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::json_ref<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*,nlohmann::json_abi_v3_11_3::detail::json_ref<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*>(nlohmann::json_abi_v3_11_3::detail::json_ref<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*,nlohmann::json_abi_v3_11_3::detail::json_ref<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* &&) mov [rbx+8], rax loc_72E73: mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_72E8F: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax lea r12, [rsp+58h+var_48] mov [r12-10h], r12 lea rsi, aCannotCreateOb; "cannot create object from initializer l"... lea rdx, aCannotCreateOb+2Ah; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 12Dh; int xor ecx, ecx call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_72EEF jmp short loc_72EEF jmp short $+2 loc_72EEF: mov r15, rax jmp short loc_72F39 mov r15, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp short loc_72F39 mov r15, rax mov rdi, [rsp+58h+var_58]; void * cmp rdi, r12 jz short loc_72F27 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_72F27: test bpl, bpl jnz short loc_72F31 jmp short loc_72F39 mov r15, rax loc_72F31: mov rdi, r14; void * call ___cxa_free_exception loc_72F39: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r15 call __Unwind_Resume
basic_json: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R13D,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RAX,[RDX + RDX*0x2] LEA R12,[RSI + RAX*0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_00172d9b: MOV RDI,RSI MOV RSI,R12 CALL 0x0018076e CMP RAX,R12 SETZ CL TEST R13B,R13B JNZ 0x00172dcf CMP RAX,R12 SETZ AL CMP BPL,0x2 SETNZ CL CMP BPL,0x1 SETNZ DL OR DL,AL JZ 0x00172e8f AND CL,AL LAB_00172dcf: TEST CL,CL JZ 0x00172e59 MOV byte ptr [RBX],0x1 LAB_00172dda: MOV EDI,0x30 CALL 0x00121200 MOV RCX,RAX ADD RCX,0x8 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 XOR EDX,EDX MOV qword ptr [RAX + 0x10],RDX MOV qword ptr [RAX + 0x18],RCX MOV qword ptr [RAX + 0x20],RCX MOV qword ptr [RAX + 0x28],RDX MOV qword ptr [RBX + 0x8],RAX TEST R15,R15 JZ 0x00172e73 SHL R15,0x3 LEA R12,[R15 + R15*0x2] MOV R15,RSP LAB_00172e17: MOV RDI,R15 MOV RSI,R14 CALL 0x00180640 MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX] MOV RSI,qword ptr [RDX + 0x8] ADD RDX,0x10 LAB_00172e36: CALL 0x00180692 MOV RDI,R15 XOR ESI,ESI CALL 0x00172f4a MOV RDI,R15 CALL 0x00178a98 ADD R14,0x18 ADD R12,-0x18 JNZ 0x00172e17 JMP 0x00172e73 LAB_00172e59: MOV byte ptr [RBX],0x2 MOV RDI,RSP MOV qword ptr [RDI],R14 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],R12 LAB_00172e6a: CALL 0x0018071a LAB_00172e6f: MOV qword ptr [RBX + 0x8],RAX LAB_00172e73: MOV RDI,RBX MOV ESI,0x1 CALL 0x00172f4a ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00172e8f: MOV EDI,0x20 CALL 0x00121630 MOV R14,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_00172ea6: LEA RSI,[0x21cdcc] LEA RDX,[0x21cdf6] MOV RDI,RSP CALL 0x00128112 MOV BPL,0x1 LAB_00172ebf: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x12d XOR ECX,ECX CALL 0x0017e21e XOR EBP,EBP LEA RSI,[0x263030] LEA RDX,[0x175cf8] MOV RDI,R14 CALL 0x00121a50
/* 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>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */ void 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> ::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5) { json_ref *pjVar1; json_ref *pjVar2; int8 *puVar3; vector *pvVar4; int8 uVar5; bool bVar6; json_ref *local_58; long *local_50; json_ref local_48 [16]; json_ref *local_38; pjVar1 = param_2 + param_3 * 0x18; *param_1 = 0; param_1[1] = 0; /* try { // try from 00172d9b to 00172da5 has its CatchHandler @ 00172eed */ pjVar2 = std:: __find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<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>>const*,__gnu_cxx::__ops::_Iter_negate<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>::_Iter_negate(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<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>>const&)_1_>> (param_2,pjVar1); bVar6 = pjVar2 == pjVar1; if (param_4 == '\0') { if (param_5 == '\x01' && pjVar2 != pjVar1) { uVar5 = __cxa_allocate_exception(0x20); local_58 = local_48; /* try { // try from 00172ea6 to 00172ebb has its CatchHandler @ 00172f2e */ std::__cxx11::string::_M_construct<char_const*> (&local_58,"cannot create object from initializer list",""); /* try { // try from 00172ebf to 00172ee8 has its CatchHandler @ 00172f0e */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (uVar5,0x12d,&local_58,0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&detail::type_error::typeinfo,detail::exception::~exception); } bVar6 = param_5 != '\x02' && pjVar2 == pjVar1; } if (bVar6) { *(int1 *)param_1 = 1; /* try { // try from 00172dda to 00172de3 has its CatchHandler @ 00172eeb */ puVar3 = (int8 *)operator_new(0x30); *puVar3 = 0; puVar3[1] = 0; puVar3[2] = 0; puVar3[3] = puVar3 + 1; puVar3[4] = puVar3 + 1; puVar3[5] = 0; param_1[1] = puVar3; if (param_3 != 0) { param_3 = param_3 * 0x18; do { /* try { // try from 00172e17 to 00172e21 has its CatchHandler @ 00172eef */ detail:: json_ref<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>> ::moved_or_copied(); /* try { // try from 00172e36 to 00172e3a has its CatchHandler @ 00172ef4 */ 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>>>> :: emplace<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>> ((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>>>> *)param_1[1],*(string **)(*local_50 + 8),(basic_json *)(*local_50 + 0x10)); assert_invariant(SUB81(&local_58,0)); data::~data((data *)&local_58); param_3 = param_3 + -0x18; } while (param_3 != 0); } } else { *(int1 *)param_1 = 2; local_58 = param_2; local_38 = pjVar1; /* try { // try from 00172e6a to 00172e6e has its CatchHandler @ 00172ee9 */ pvVar4 = create<std::vector<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::allocator<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::json_ref<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>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<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>>const*> (&local_58,&local_38); param_1[1] = pvVar4; } assert_invariant(SUB81(param_1,0)); return; }
9,003
Json::OurReader::decodeDouble(Json::OurReader::Token&)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
bool OurReader::decodeDouble(Token& token) { Value decoded; if (!decodeDouble(token, decoded)) return false; currentValue().swapPayload(decoded); currentValue().setOffsetStart(token.start_ - begin_); currentValue().setOffsetLimit(token.end_ - begin_); return true; }
O0
cpp
Json::OurReader::decodeDouble(Json::OurReader::Token&): subq $0x88, %rsp movq %rdi, 0x78(%rsp) movq %rsi, 0x70(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x48(%rsp), %rdi movq %rdi, 0x28(%rsp) xorl %esi, %esi callq 0x186330 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rdx movq 0x70(%rsp), %rsi callq 0x178540 movb %al, 0x37(%rsp) jmp 0x178996 movb 0x37(%rsp), %al testb $0x1, %al jne 0x1789d2 jmp 0x1789a0 movb $0x0, 0x87(%rsp) movl $0x1, 0x38(%rsp) jmp 0x178a6e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) leaq 0x48(%rsp), %rdi callq 0x186ef0 jmp 0x178a89 movq 0x20(%rsp), %rdi callq 0x1760c0 movq %rax, 0x18(%rsp) jmp 0x1789e3 movq 0x18(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x187090 jmp 0x1789f4 movq 0x20(%rsp), %rdi callq 0x1760c0 movq %rax, 0x10(%rsp) jmp 0x178a05 movq 0x10(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x70(%rsp), %rcx movq 0x8(%rcx), %rsi movq 0xc0(%rax), %rax subq %rax, %rsi callq 0x18c890 jmp 0x178a29 movq 0x20(%rsp), %rdi callq 0x1760c0 movq %rax, 0x8(%rsp) jmp 0x178a3a movq 0x8(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x70(%rsp), %rcx movq 0x10(%rcx), %rsi movq 0xc0(%rax), %rax subq %rax, %rsi callq 0x18c8b0 jmp 0x178a5e movb $0x1, 0x87(%rsp) movl $0x1, 0x38(%rsp) leaq 0x48(%rsp), %rdi callq 0x186ef0 movb 0x87(%rsp), %al andb $0x1, %al addq $0x88, %rsp retq movq 0x40(%rsp), %rdi callq 0x92a70 nopw %cs:(%rax,%rax)
_ZN4Json9OurReader12decodeDoubleERNS0_5TokenE: sub rsp, 88h mov qword ptr [rsp+88h+var_10], rdi mov [rsp+88h+var_18], rsi mov rax, qword ptr [rsp+88h+var_10] mov [rsp+88h+var_68], rax; int lea rdi, [rsp+88h+var_40]; int mov [rsp+88h+var_60], rdi; __int64 xor esi, esi; int call _ZN4Json5ValueC2ENS_9ValueTypeE; Json::Value::Value(Json::ValueType) mov rdi, [rsp+88h+var_68] mov rdx, [rsp+88h+var_60] mov rsi, [rsp+88h+var_18] call _ZN4Json9OurReader12decodeDoubleERNS0_5TokenERNS_5ValueE; Json::OurReader::decodeDouble(Json::OurReader::Token &,Json::Value &) mov [rsp+88h+var_51], al jmp short $+2 loc_178996: mov al, [rsp+88h+var_51] test al, 1 jnz short loc_1789D2 jmp short $+2 loc_1789A0: mov [rsp+88h+var_1], 0 mov [rsp+88h+var_50], 1 jmp loc_178A6E mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax lea rdi, [rsp+arg_40]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() jmp loc_178A89 loc_1789D2: mov rdi, [rsp+88h+var_68]; this call _ZN4Json9OurReader12currentValueEv; Json::OurReader::currentValue(void) mov [rsp+88h+var_70], rax jmp short $+2 loc_1789E3: mov rdi, [rsp+88h+var_70]; this lea rsi, [rsp+88h+var_40]; Json::Value * call _ZN4Json5Value11swapPayloadERS0_; Json::Value::swapPayload(Json::Value&) jmp short $+2 loc_1789F4: mov rdi, [rsp+88h+var_68]; this call _ZN4Json9OurReader12currentValueEv; Json::OurReader::currentValue(void) mov [rsp+88h+var_78], rax jmp short $+2 loc_178A05: mov rdi, [rsp+88h+var_78]; this mov rax, [rsp+88h+var_68] mov rcx, [rsp+88h+var_18] mov rsi, [rcx+8] mov rax, [rax+0C0h] sub rsi, rax; __int64 call _ZN4Json5Value14setOffsetStartEl; Json::Value::setOffsetStart(long) jmp short $+2 loc_178A29: mov rdi, [rsp+88h+var_68]; this call _ZN4Json9OurReader12currentValueEv; Json::OurReader::currentValue(void) mov [rsp+88h+var_80], rax jmp short $+2 loc_178A3A: mov rdi, [rsp+88h+var_80]; this mov rax, [rsp+88h+var_68] mov rcx, [rsp+88h+var_18] mov rsi, [rcx+10h] mov rax, [rax+0C0h] sub rsi, rax; __int64 call _ZN4Json5Value14setOffsetLimitEl; Json::Value::setOffsetLimit(long) jmp short $+2 loc_178A5E: mov [rsp+88h+var_1], 1 mov [rsp+88h+var_50], 1 loc_178A6E: lea rdi, [rsp+88h+var_40]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov al, [rsp+88h+var_1] and al, 1 add rsp, 88h retn loc_178A89: mov rdi, [rsp+arg_38] call __Unwind_Resume
char Json::OurReader::decodeDouble(long long a1, long long a2, int a3, int a4, int a5, int a6) { int v7; // [rsp+0h] [rbp-88h] int v8; // [rsp+8h] [rbp-80h] Json::Value *v9; // [rsp+8h] [rbp-80h] Json::Value *v10; // [rsp+10h] [rbp-78h] Json::Value *v11; // [rsp+10h] [rbp-78h] int v12; // [rsp+18h] [rbp-70h] Json::Value *v13; // [rsp+18h] [rbp-70h] Json::OurReader *v14; // [rsp+20h] [rbp-68h] long long v15; // [rsp+28h] [rbp-60h] long long v16[5]; // [rsp+48h] [rbp-40h] BYREF long long v17; // [rsp+70h] [rbp-18h] int v18[2]; // [rsp+78h] [rbp-10h] char v19; // [rsp+87h] [rbp-1h] *(_QWORD *)v18 = a1; v17 = a2; Json::Value::Value((int)v16, 0, a3, a4, a5, a6, v7, v8, v10, v12, a1, (long long)v16); if ( (Json::OurReader::decodeDouble((long long)v14, v17, v15) & 1) != 0 ) { v13 = (Json::Value *)Json::OurReader::currentValue(v14); Json::Value::swapPayload(v13, (Json::Value *)v16); v11 = (Json::Value *)Json::OurReader::currentValue(v14); Json::Value::setOffsetStart(v11, *(_QWORD *)(v17 + 8) - *((_QWORD *)v14 + 24)); v9 = (Json::Value *)Json::OurReader::currentValue(v14); Json::Value::setOffsetLimit(v9, *(_QWORD *)(v17 + 16) - *((_QWORD *)v14 + 24)); v19 = 1; } else { v19 = 0; } Json::Value::~Value(v16); return v19 & 1; }
9,004
Json::OurReader::decodeDouble(Json::OurReader::Token&)
aimrt_mujoco_sim/_deps/jsoncpp-src/src/lib_json/json_reader.cpp
bool OurReader::decodeDouble(Token& token) { Value decoded; if (!decodeDouble(token, decoded)) return false; currentValue().swapPayload(decoded); currentValue().setOffsetStart(token.start_ - begin_); currentValue().setOffsetLimit(token.end_ - begin_); return true; }
O3
cpp
Json::OurReader::decodeDouble(Json::OurReader::Token&): pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %r15 movq %rdi, %r14 leaq 0x8(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x76670 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x71e24 movl %eax, %ebx testb %al, %al je 0x721a3 movq 0x30(%r14), %rax cmpq 0x38(%r14), %rax jne 0x7213f movq 0x48(%r14), %rcx movl $0x200, %eax # imm = 0x200 addq -0x8(%rcx), %rax movq -0x8(%rax), %rdi leaq 0x8(%rsp), %rsi callq 0x76d9a movq 0x30(%r14), %rax cmpq 0x38(%r14), %rax jne 0x72164 movq 0x48(%r14), %rcx movl $0x200, %eax # imm = 0x200 addq -0x8(%rcx), %rax movq -0x8(%rax), %rdi movq 0x8(%r15), %rsi subq 0xc0(%r14), %rsi callq 0x79aba movq 0x30(%r14), %rax cmpq 0x38(%r14), %rax jne 0x7218f movq 0x48(%r14), %rcx movl $0x200, %eax # imm = 0x200 addq -0x8(%rcx), %rax movq -0x8(%rax), %rdi movq 0x10(%r15), %rsi subq 0xc0(%r14), %rsi callq 0x79ac0 leaq 0x8(%rsp), %rdi callq 0x76cde movl %ebx, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x76cde movq %rbx, %rdi callq 0x1ffd0
_ZN4Json9OurReader12decodeDoubleERNS0_5TokenE: push r15; int push r14; int push rbx; int sub rsp, 30h mov r15, rsi mov r14, rdi lea rbx, [rsp+48h+var_40] mov rdi, rbx xor esi, esi call _ZN4Json5ValueC2ENS_9ValueTypeE; Json::Value::Value(Json::ValueType) mov rdi, r14; int mov rsi, r15; int mov rdx, rbx; Json::Value * call _ZN4Json9OurReader12decodeDoubleERNS0_5TokenERNS_5ValueE; Json::OurReader::decodeDouble(Json::OurReader::Token &,Json::Value &) mov ebx, eax test al, al jz short loc_721A3 mov rax, [r14+30h] cmp rax, [r14+38h] jnz short loc_7213F mov rcx, [r14+48h] mov eax, 200h add rax, [rcx-8] loc_7213F: mov rdi, [rax-8]; this lea rsi, [rsp+48h+var_40]; Json::Value * call _ZN4Json5Value11swapPayloadERS0_; Json::Value::swapPayload(Json::Value&) mov rax, [r14+30h] cmp rax, [r14+38h] jnz short loc_72164 mov rcx, [r14+48h] mov eax, 200h add rax, [rcx-8] loc_72164: mov rdi, [rax-8]; this mov rsi, [r15+8] sub rsi, [r14+0C0h]; __int64 call _ZN4Json5Value14setOffsetStartEl; Json::Value::setOffsetStart(long) mov rax, [r14+30h] cmp rax, [r14+38h] jnz short loc_7218F mov rcx, [r14+48h] mov eax, 200h add rax, [rcx-8] loc_7218F: mov rdi, [rax-8]; this mov rsi, [r15+10h] sub rsi, [r14+0C0h]; __int64 call _ZN4Json5Value14setOffsetLimitEl; Json::Value::setOffsetLimit(long) loc_721A3: lea rdi, [rsp+48h+var_40]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov eax, ebx add rsp, 30h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZN4Json5ValueD2Ev; Json::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long Json::OurReader::decodeDouble(_QWORD *a1, long long a2) { unsigned int v2; // ebx long long v3; // rax long long v4; // rax long long v5; // rax _BYTE v7[64]; // [rsp+8h] [rbp-40h] BYREF Json::Value::Value(v7, 0LL); v2 = Json::OurReader::decodeDouble((long long)a1, a2, (Json::Value *)v7); if ( (_BYTE)v2 ) { v3 = a1[6]; if ( v3 == a1[7] ) v3 = *(_QWORD *)(a1[9] - 8LL) + 512LL; Json::Value::swapPayload(*(Json::Value **)(v3 - 8), (Json::Value *)v7); v4 = a1[6]; if ( v4 == a1[7] ) v4 = *(_QWORD *)(a1[9] - 8LL) + 512LL; Json::Value::setOffsetStart(*(Json::Value **)(v4 - 8), *(_QWORD *)(a2 + 8) - a1[24]); v5 = a1[6]; if ( v5 == a1[7] ) v5 = *(_QWORD *)(a1[9] - 8LL) + 512LL; Json::Value::setOffsetLimit(*(Json::Value **)(v5 - 8), *(_QWORD *)(a2 + 16) - a1[24]); } Json::Value::~Value(v7); return v2; }
decodeDouble: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R15,RSI MOV R14,RDI LEA RBX,[RSP + 0x8] MOV RDI,RBX XOR ESI,ESI CALL 0x00176670 LAB_00172114: MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX CALL 0x00171e24 MOV EBX,EAX TEST AL,AL JZ 0x001721a3 MOV RAX,qword ptr [R14 + 0x30] CMP RAX,qword ptr [R14 + 0x38] JNZ 0x0017213f MOV RCX,qword ptr [R14 + 0x48] MOV EAX,0x200 ADD RAX,qword ptr [RCX + -0x8] LAB_0017213f: MOV RDI,qword ptr [RAX + -0x8] LEA RSI,[RSP + 0x8] CALL 0x00176d9a MOV RAX,qword ptr [R14 + 0x30] CMP RAX,qword ptr [R14 + 0x38] JNZ 0x00172164 MOV RCX,qword ptr [R14 + 0x48] MOV EAX,0x200 ADD RAX,qword ptr [RCX + -0x8] LAB_00172164: MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [R15 + 0x8] SUB RSI,qword ptr [R14 + 0xc0] CALL 0x00179aba MOV RAX,qword ptr [R14 + 0x30] CMP RAX,qword ptr [R14 + 0x38] JNZ 0x0017218f MOV RCX,qword ptr [R14 + 0x48] MOV EAX,0x200 ADD RAX,qword ptr [RCX + -0x8] LAB_0017218f: MOV RDI,qword ptr [RAX + -0x8] MOV RSI,qword ptr [R15 + 0x10] SUB RSI,qword ptr [R14 + 0xc0] CALL 0x00179ac0 LAB_001721a3: LEA RDI,[RSP + 0x8] CALL 0x00176cde MOV EAX,EBX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
/* Json::OurReader::decodeDouble(Json::OurReader::Token&) */ int4 __thiscall Json::OurReader::decodeDouble(OurReader *this,Token *param_1) { int4 uVar1; long lVar2; Value local_40 [40]; Value::Value(local_40,0); /* try { // try from 00172114 to 001721a2 has its CatchHandler @ 001721b9 */ uVar1 = decodeDouble(this,param_1,local_40); if ((char)uVar1 != '\0') { lVar2 = *(long *)(this + 0x30); if (lVar2 == *(long *)(this + 0x38)) { lVar2 = *(long *)(*(long *)(this + 0x48) + -8) + 0x200; } Value::swapPayload(*(Value **)(lVar2 + -8),local_40); lVar2 = *(long *)(this + 0x30); if (lVar2 == *(long *)(this + 0x38)) { lVar2 = *(long *)(*(long *)(this + 0x48) + -8) + 0x200; } Value::setOffsetStart(*(Value **)(lVar2 + -8),*(long *)(param_1 + 8) - *(long *)(this + 0xc0)); lVar2 = *(long *)(this + 0x30); if (lVar2 == *(long *)(this + 0x38)) { lVar2 = *(long *)(*(long *)(this + 0x48) + -8) + 0x200; } Value::setOffsetLimit (*(Value **)(lVar2 + -8),*(long *)(param_1 + 0x10) - *(long *)(this + 0xc0)); } Value::~Value(local_40); return uVar1; }
9,005
json_next_token
bluesky950520[P]quickjs/quickjs.c
static __exception int json_next_token(JSParseState *s) { const uint8_t *p, *p_next; int c; JSAtom atom; if (js_check_stack_overflow(s->ctx->rt, 1000)) { JS_ThrowStackOverflow(s->ctx); return -1; } free_token(s, &s->token); p = s->last_ptr = s->buf_ptr; s->last_line_num = s->token.line_num; s->last_col_num = s->token.col_num; redo: s->token.line_num = s->line_num; s->token.col_num = s->col_num; s->token.ptr = p; c = *p; switch(c) { case 0: if (p >= s->buf_end) { s->token.val = TOK_EOF; } else { goto def_token; } break; case '\'': /* JSON does not accept single quoted strings */ goto def_token; case '\"': p++; if (json_parse_string(s, &p)) goto fail; break; case '\r': /* accept DOS and MAC newline sequences */ if (p[1] == '\n') { p++; } /* fall thru */ case '\n': s->line_num++; s->eol = p++; s->mark = p; goto redo; case '\f': case '\v': /* JSONWhitespace does not match <VT>, nor <FF> */ goto def_token; case ' ': case '\t': p++; s->mark = p; goto redo; case '/': /* JSON does not accept comments */ goto def_token; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '_': case '$': /* identifier : only pure ascii characters are accepted */ p++; atom = json_parse_ident(s, &p, c); if (atom == JS_ATOM_NULL) goto fail; s->token.u.ident.atom = atom; s->token.u.ident.has_escape = FALSE; s->token.u.ident.is_reserved = FALSE; s->token.val = TOK_IDENT; break; case '-': if (!is_digit(p[1])) { json_parse_error(s, p, "No number after minus sign"); goto fail; } goto parse_number; case '0': if (is_digit(p[1])) { json_parse_error(s, p, "Unexpected number"); goto fail; } goto parse_number; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* number */ parse_number: if (json_parse_number(s, &p)) goto fail; break; default: if (c >= 0x80) { c = utf8_decode(p, &p_next); if (p_next == p + 1) { js_parse_error(s, "Unexpected token '\\x%02x' in JSON", *p); } else { if (c > 0xFFFF) { c = get_hi_surrogate(c); } js_parse_error(s, "Unexpected token '\\u%04x' in JSON", c); } goto fail; } def_token: s->token.val = c; p++; break; } s->token.col_num = s->mark - s->eol; s->buf_ptr = p; // dump_token(s, &s->token); return 0; fail: s->token.val = TOK_ERROR; return -1; }
O0
c
json_next_token: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq 0x38(%rsp), %rax movq (%rax), %rax movq 0x18(%rax), %rdi movl $0x3e8, %esi # imm = 0x3E8 callq 0x4ca20 cmpl $0x0, %eax je 0x4da18 movq 0x38(%rsp), %rax movq (%rax), %rdi callq 0x5ef20 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x4dd70 movq 0x38(%rsp), %rdi movq 0x38(%rsp), %rsi addq $0x20, %rsi callq 0x4e460 movq 0x38(%rsp), %rax movq 0x70(%rax), %rax movq 0x38(%rsp), %rcx movq %rax, 0x60(%rcx) movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax movl 0x24(%rax), %ecx movq 0x38(%rsp), %rax movl %ecx, 0x8(%rax) movq 0x38(%rsp), %rax movl 0x28(%rax), %ecx movq 0x38(%rsp), %rax movl %ecx, 0xc(%rax) movq 0x38(%rsp), %rax movl 0x10(%rax), %ecx movl %ecx, 0x24(%rax) movq 0x38(%rsp), %rax movl 0x14(%rax), %ecx movl %ecx, 0x28(%rax) movq 0x30(%rsp), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x30(%rax) movq 0x30(%rsp), %rax movzbl (%rax), %eax movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax movq %rax, 0x8(%rsp) subq $0x7a, %rax ja 0x4dc86 movq 0x8(%rsp), %rax leaq 0xbb883(%rip), %rcx # 0x109334 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x30(%rsp), %rax movq 0x38(%rsp), %rcx cmpq 0x78(%rcx), %rax jb 0x4dad8 movq 0x38(%rsp), %rax movl $0xffffffaa, 0x20(%rax) # imm = 0xFFFFFFAA jmp 0x4dadd jmp 0x4dd05 jmp 0x4dd1f jmp 0x4dd05 movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x85280 cmpl $0x0, %eax je 0x4db0e jmp 0x4dd5c jmp 0x4dd1f movq 0x30(%rsp), %rax movzbl 0x1(%rax), %eax cmpl $0xa, %eax jne 0x4db2f movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x30(%rsp) jmp 0x4db31 movq 0x38(%rsp), %rax movl 0x10(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x10(%rax) movq 0x30(%rsp), %rcx movq %rcx, %rax addq $0x1, %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax movq %rcx, 0x80(%rax) movq 0x30(%rsp), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x88(%rax) jmp 0x4da62 jmp 0x4dd05 movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x88(%rax) jmp 0x4da62 jmp 0x4dd05 movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rdi movl 0x24(%rsp), %edx leaq 0x30(%rsp), %rsi callq 0x85590 movl %eax, 0x20(%rsp) cmpl $0x0, 0x20(%rsp) jne 0x4dbd1 jmp 0x4dd5c movl 0x20(%rsp), %ecx movq 0x38(%rsp), %rax movl %ecx, 0x38(%rax) movq 0x38(%rsp), %rax movl $0x0, 0x3c(%rax) movq 0x38(%rsp), %rax movl $0x0, 0x40(%rax) movq 0x38(%rsp), %rax movl $0xffffff83, 0x20(%rax) # imm = 0xFFFFFF83 jmp 0x4dd1f movq 0x30(%rsp), %rax movzbl 0x1(%rax), %edi callq 0x26e30 cmpl $0x0, %eax jne 0x4dc34 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi leaq 0xbf93a(%rip), %rdx # 0x10d564 callq 0x85730 jmp 0x4dd5c jmp 0x4dc68 movq 0x30(%rsp), %rax movzbl 0x1(%rax), %edi callq 0x26e30 cmpl $0x0, %eax je 0x4dc64 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rsi leaq 0xbf925(%rip), %rdx # 0x10d57f callq 0x85730 jmp 0x4dd5c jmp 0x4dc68 jmp 0x4dc68 movq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x85850 cmpl $0x0, %eax je 0x4dc81 jmp 0x4dd5c jmp 0x4dd1f cmpl $0x80, 0x24(%rsp) jl 0x4dd03 movq 0x30(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x1d890 movl %eax, 0x24(%rsp) movq 0x28(%rsp), %rax movq 0x30(%rsp), %rcx addq $0x1, %rcx cmpq %rcx, %rax jne 0x4dcd3 movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rax movzbl (%rax), %edx leaq 0xbf8c7(%rip), %rsi # 0x10d591 movb $0x0, %al callq 0x473d0 jmp 0x4dd01 cmpl $0xffff, 0x24(%rsp) # imm = 0xFFFF jle 0x4dcea movl 0x24(%rsp), %edi callq 0x7d4a0 movl %eax, 0x24(%rsp) movq 0x38(%rsp), %rdi movl 0x24(%rsp), %edx leaq 0xbf8b9(%rip), %rsi # 0x10d5b3 movb $0x0, %al callq 0x473d0 jmp 0x4dd5c jmp 0x4dd05 movl 0x24(%rsp), %ecx movq 0x38(%rsp), %rax movl %ecx, 0x20(%rax) movq 0x30(%rsp), %rax addq $0x1, %rax movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rax movq 0x88(%rax), %rax movq 0x38(%rsp), %rcx movq 0x80(%rcx), %rcx subq %rcx, %rax movl %eax, %ecx movq 0x38(%rsp), %rax movl %ecx, 0x28(%rax) movq 0x30(%rsp), %rcx movq 0x38(%rsp), %rax movq %rcx, 0x70(%rax) movl $0x0, 0x44(%rsp) jmp 0x4dd70 movq 0x38(%rsp), %rax movl $0xffffffa8, 0x20(%rax) # imm = 0xFFFFFFA8 movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopl (%rax)
json_next_token: sub rsp, 48h mov [rsp+48h+var_10], rdi mov rax, [rsp+48h+var_10] mov rax, [rax] mov rdi, [rax+18h] mov esi, 3E8h call js_check_stack_overflow cmp eax, 0 jz short loc_4DA18 mov rax, [rsp+48h+var_10] mov rdi, [rax] call JS_ThrowStackOverflow mov [rsp+48h+var_38], rax mov [rsp+48h+var_30], rdx mov [rsp+48h+var_4], 0FFFFFFFFh jmp loc_4DD70 loc_4DA18: mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_10] add rsi, 20h ; ' ' call free_token mov rax, [rsp+48h+var_10] mov rax, [rax+70h] mov rcx, [rsp+48h+var_10] mov [rcx+60h], rax mov [rsp+48h+var_18], rax mov rax, [rsp+48h+var_10] mov ecx, [rax+24h] mov rax, [rsp+48h+var_10] mov [rax+8], ecx mov rax, [rsp+48h+var_10] mov ecx, [rax+28h] mov rax, [rsp+48h+var_10] mov [rax+0Ch], ecx loc_4DA62: mov rax, [rsp+48h+var_10] mov ecx, [rax+10h] mov [rax+24h], ecx mov rax, [rsp+48h+var_10] mov ecx, [rax+14h] mov [rax+28h], ecx mov rcx, [rsp+48h+var_18] mov rax, [rsp+48h+var_10] mov [rax+30h], rcx mov rax, [rsp+48h+var_18] movzx eax, byte ptr [rax] mov [rsp+48h+var_24], eax mov eax, [rsp+48h+var_24] mov [rsp+48h+var_40], rax sub rax, 7Ah; switch 123 cases ja def_4DAB8; jumptable 000000000004DAB8 default case, cases 1-8,14-31,33,35,37,38,40-44,46,58-64,91-94,96 mov rax, [rsp+48h+var_40] lea rcx, jpt_4DAB8 movsxd rax, ds:(jpt_4DAB8 - 109334h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_4DABA: mov rax, [rsp+48h+var_18]; jumptable 000000000004DAB8 case 0 mov rcx, [rsp+48h+var_10] cmp rax, [rcx+78h] jb short loc_4DAD8 mov rax, [rsp+48h+var_10] mov dword ptr [rax+20h], 0FFFFFFAAh jmp short loc_4DADD loc_4DAD8: jmp loc_4DD05 loc_4DADD: jmp loc_4DD1F loc_4DAE2: jmp loc_4DD05; jumptable 000000000004DAB8 case 39 loc_4DAE7: mov rax, [rsp+48h+var_18]; jumptable 000000000004DAB8 case 34 add rax, 1 mov [rsp+48h+var_18], rax mov rdi, [rsp+48h+var_10] lea rsi, [rsp+48h+var_18] call json_parse_string cmp eax, 0 jz short loc_4DB0E jmp loc_4DD5C loc_4DB0E: jmp loc_4DD1F loc_4DB13: mov rax, [rsp+48h+var_18]; jumptable 000000000004DAB8 case 13 movzx eax, byte ptr [rax+1] cmp eax, 0Ah jnz short loc_4DB2F mov rax, [rsp+48h+var_18] add rax, 1 mov [rsp+48h+var_18], rax loc_4DB2F: jmp short $+2; jumptable 000000000004DAB8 case 10 loc_4DB31: mov rax, [rsp+48h+var_10]; jumptable 000000000004DAB8 case 10 mov ecx, [rax+10h] add ecx, 1 mov [rax+10h], ecx mov rcx, [rsp+48h+var_18] mov rax, rcx add rax, 1 mov [rsp+48h+var_18], rax mov rax, [rsp+48h+var_10] mov [rax+80h], rcx mov rcx, [rsp+48h+var_18] mov rax, [rsp+48h+var_10] mov [rax+88h], rcx jmp loc_4DA62 loc_4DB72: jmp loc_4DD05; jumptable 000000000004DAB8 cases 11,12 loc_4DB77: mov rax, [rsp+48h+var_18]; jumptable 000000000004DAB8 cases 9,32 add rax, 1 mov [rsp+48h+var_18], rax mov rcx, [rsp+48h+var_18] mov rax, [rsp+48h+var_10] mov [rax+88h], rcx jmp loc_4DA62 loc_4DB9B: jmp loc_4DD05; jumptable 000000000004DAB8 case 47 loc_4DBA0: mov rax, [rsp+48h+var_18]; jumptable 000000000004DAB8 cases 36,65-90,95,97-122 add rax, 1 mov [rsp+48h+var_18], rax mov rdi, [rsp+48h+var_10] mov edx, [rsp+48h+var_24] lea rsi, [rsp+48h+var_18] call json_parse_ident mov [rsp+48h+var_28], eax cmp [rsp+48h+var_28], 0 jnz short loc_4DBD1 jmp loc_4DD5C loc_4DBD1: mov ecx, [rsp+48h+var_28] mov rax, [rsp+48h+var_10] mov [rax+38h], ecx mov rax, [rsp+48h+var_10] mov dword ptr [rax+3Ch], 0 mov rax, [rsp+48h+var_10] mov dword ptr [rax+40h], 0 mov rax, [rsp+48h+var_10] mov dword ptr [rax+20h], 0FFFFFF83h jmp loc_4DD1F loc_4DC06: mov rax, [rsp+48h+var_18]; jumptable 000000000004DAB8 case 45 movzx edi, byte ptr [rax+1] call is_digit cmp eax, 0 jnz short loc_4DC34 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_18] lea rdx, aNoNumberAfterM; "No number after minus sign" call json_parse_error jmp loc_4DD5C loc_4DC34: jmp short loc_4DC68 loc_4DC36: mov rax, [rsp+48h+var_18]; jumptable 000000000004DAB8 case 48 movzx edi, byte ptr [rax+1] call is_digit cmp eax, 0 jz short loc_4DC64 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_18] lea rdx, aUnexpectedNumb; "Unexpected number" call json_parse_error jmp loc_4DD5C loc_4DC64: jmp short loc_4DC68 loc_4DC66: jmp short $+2; jumptable 000000000004DAB8 cases 49-57 loc_4DC68: mov rdi, [rsp+48h+var_10] lea rsi, [rsp+48h+var_18] call json_parse_number cmp eax, 0 jz short loc_4DC81 jmp loc_4DD5C loc_4DC81: jmp loc_4DD1F def_4DAB8: cmp [rsp+48h+var_24], 80h; jumptable 000000000004DAB8 default case, cases 1-8,14-31,33,35,37,38,40-44,46,58-64,91-94,96 jl short loc_4DD03 mov rdi, [rsp+48h+var_18] lea rsi, [rsp+48h+var_20] call utf8_decode mov [rsp+48h+var_24], eax mov rax, [rsp+48h+var_20] mov rcx, [rsp+48h+var_18] add rcx, 1 cmp rax, rcx jnz short loc_4DCD3 mov rdi, [rsp+48h+var_10] mov rax, [rsp+48h+var_18] movzx edx, byte ptr [rax] lea rsi, aUnexpectedToke; "Unexpected token '\\x%02x' in JSON" mov al, 0 call js_parse_error jmp short loc_4DD01 loc_4DCD3: cmp [rsp+48h+var_24], 0FFFFh jle short loc_4DCEA mov edi, [rsp+48h+var_24] call get_hi_surrogate_0 mov [rsp+48h+var_24], eax loc_4DCEA: mov rdi, [rsp+48h+var_10] mov edx, [rsp+48h+var_24] lea rsi, aUnexpectedToke_0; "Unexpected token '\\u%04x' in JSON" mov al, 0 call js_parse_error loc_4DD01: jmp short loc_4DD5C loc_4DD03: jmp short $+2 loc_4DD05: mov ecx, [rsp+48h+var_24] mov rax, [rsp+48h+var_10] mov [rax+20h], ecx mov rax, [rsp+48h+var_18] add rax, 1 mov [rsp+48h+var_18], rax loc_4DD1F: mov rax, [rsp+48h+var_10] mov rax, [rax+88h] mov rcx, [rsp+48h+var_10] mov rcx, [rcx+80h] sub rax, rcx mov ecx, eax mov rax, [rsp+48h+var_10] mov [rax+28h], ecx mov rcx, [rsp+48h+var_18] mov rax, [rsp+48h+var_10] mov [rax+70h], rcx mov [rsp+48h+var_4], 0 jmp short loc_4DD70 loc_4DD5C: mov rax, [rsp+48h+var_10] mov dword ptr [rax+20h], 0FFFFFFA8h mov [rsp+48h+var_4], 0FFFFFFFFh loc_4DD70: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long json_next_token( _QWORD *a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9) { unsigned __int8 *v9; // rax unsigned __int8 *v10; // rcx long long v11; // r8 long long v12; // r9 __m128 v13; // xmm4 __m128 v14; // xmm5 unsigned __int8 *v15; // rcx char v17; // [rsp+0h] [rbp-48h] int v18; // [rsp+20h] [rbp-28h] unsigned int v19; // [rsp+24h] [rbp-24h] int hi_surrogate_0; // [rsp+24h] [rbp-24h] unsigned __int8 *v21; // [rsp+28h] [rbp-20h] BYREF unsigned __int8 *v22; // [rsp+30h] [rbp-18h] BYREF _QWORD *v23; // [rsp+38h] [rbp-10h] unsigned int v24; // [rsp+44h] [rbp-4h] v23 = a1; if ( js_check_stack_overflow(*(_QWORD *)(*a1 + 24LL), 1000LL) ) { JS_ThrowStackOverflow(*v23); return (unsigned int)-1; } else { free_token(v23, v23 + 4); v9 = (unsigned __int8 *)v23[14]; v23[12] = v9; v22 = v9; *((_DWORD *)v23 + 2) = *((_DWORD *)v23 + 9); *((_DWORD *)v23 + 3) = *((_DWORD *)v23 + 10); while ( 2 ) { *((_DWORD *)v23 + 9) = *((_DWORD *)v23 + 4); *((_DWORD *)v23 + 10) = *((_DWORD *)v23 + 5); v23[6] = v22; v19 = *v22; switch ( *v22 ) { case 0u: if ( (unsigned long long)v22 < v23[15] ) goto LABEL_29; *((_DWORD *)v23 + 8) = -86; goto LABEL_30; case 9u: case 0x20u: v23[17] = ++v22; continue; case 0xAu: goto LABEL_12; case 0xBu: case 0xCu: case 0x27u: case 0x2Fu: goto LABEL_29; case 0xDu: if ( v22[1] == 10 ) ++v22; LABEL_12: ++*((_DWORD *)v23 + 4); v10 = v22++; v23[16] = v10; v23[17] = v22; continue; case 0x22u: ++v22; if ( !(unsigned int)json_parse_string(v23, &v22) ) goto LABEL_30; goto LABEL_31; case 0x24u: case 0x41u: case 0x42u: case 0x43u: case 0x44u: case 0x45u: case 0x46u: case 0x47u: case 0x48u: case 0x49u: case 0x4Au: case 0x4Bu: case 0x4Cu: case 0x4Du: case 0x4Eu: case 0x4Fu: case 0x50u: case 0x51u: case 0x52u: case 0x53u: case 0x54u: case 0x55u: case 0x56u: case 0x57u: case 0x58u: case 0x59u: case 0x5Au: case 0x5Fu: case 0x61u: case 0x62u: case 0x63u: case 0x64u: case 0x65u: case 0x66u: case 0x67u: case 0x68u: case 0x69u: case 0x6Au: case 0x6Bu: case 0x6Cu: case 0x6Du: case 0x6Eu: case 0x6Fu: case 0x70u: case 0x71u: case 0x72u: case 0x73u: case 0x74u: case 0x75u: case 0x76u: case 0x77u: case 0x78u: case 0x79u: case 0x7Au: ++v22; v18 = json_parse_ident(v23, &v22, v19); if ( !v18 ) goto LABEL_31; *((_DWORD *)v23 + 14) = v18; *((_DWORD *)v23 + 15) = 0; *((_DWORD *)v23 + 16) = 0; *((_DWORD *)v23 + 8) = -125; goto LABEL_30; case 0x2Du: if ( is_digit(v22[1]) ) goto LABEL_21; json_parse_error(v23, v22, "No number after minus sign"); goto LABEL_31; case 0x30u: if ( !is_digit(v22[1]) ) goto LABEL_21; json_parse_error(v23, v22, "Unexpected number"); goto LABEL_31; case 0x31u: case 0x32u: case 0x33u: case 0x34u: case 0x35u: case 0x36u: case 0x37u: case 0x38u: case 0x39u: LABEL_21: if ( !(unsigned int)json_parse_number(v23, &v22) ) goto LABEL_30; goto LABEL_31; default: if ( *v22 < 0x80u ) { LABEL_29: *((_DWORD *)v23 + 8) = v19; ++v22; LABEL_30: *((_DWORD *)v23 + 10) = v23[17] - v23[16]; v23[14] = v22; v24 = 0; } else { hi_surrogate_0 = utf8_decode(v22, &v21); v15 = v22 + 1; if ( v21 == v22 + 1 ) { js_parse_error( v23, (long long)"Unexpected token '\\x%02x' in JSON", *v22, (long long)v15, v11, v12, a2, a3, a4, a5, v13, v14, a8, a9, v17); } else { if ( hi_surrogate_0 > 0xFFFF ) hi_surrogate_0 = get_hi_surrogate_0((unsigned int)hi_surrogate_0); js_parse_error( v23, (long long)"Unexpected token '\\u%04x' in JSON", (unsigned int)hi_surrogate_0, (long long)v15, v11, v12, a2, a3, a4, a5, v13, v14, a8, a9, v17); } LABEL_31: *((_DWORD *)v23 + 8) = -88; v24 = -1; } break; } break; } } return v24; }
json_next_token: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x18] MOV ESI,0x3e8 CALL 0x0014ca20 CMP EAX,0x0 JZ 0x0014da18 MOV RAX,qword ptr [RSP + 0x38] MOV RDI,qword ptr [RAX] CALL 0x0015ef20 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x0014dd70 LAB_0014da18: MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x38] ADD RSI,0x20 CALL 0x0014e460 MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x70] MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RCX + 0x60],RAX MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x38] MOV ECX,dword ptr [RAX + 0x24] MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RSP + 0x38] MOV ECX,dword ptr [RAX + 0x28] MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0xc],ECX LAB_0014da62: MOV RAX,qword ptr [RSP + 0x38] MOV ECX,dword ptr [RAX + 0x10] MOV dword ptr [RAX + 0x24],ECX MOV RAX,qword ptr [RSP + 0x38] MOV ECX,dword ptr [RAX + 0x14] MOV dword ptr [RAX + 0x28],ECX MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RSP + 0x30] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RSP + 0x24],EAX MOV EAX,dword ptr [RSP + 0x24] MOV qword ptr [RSP + 0x8],RAX SUB RAX,0x7a JA 0x0014dc86 MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x209334] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RAX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RSP + 0x38] CMP RAX,qword ptr [RCX + 0x78] JC 0x0014dad8 MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x20],0xffffffaa JMP 0x0014dadd LAB_0014dad8: JMP 0x0014dd05 LAB_0014dadd: JMP 0x0014dd1f caseD_27: JMP 0x0014dd05 caseD_22: MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[RSP + 0x30] CALL 0x00185280 CMP EAX,0x0 JZ 0x0014db0e JMP 0x0014dd5c LAB_0014db0e: JMP 0x0014dd1f caseD_d: MOV RAX,qword ptr [RSP + 0x30] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa JNZ 0x0014db2f MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX LAB_0014db2f: JMP 0x0014db31 caseD_a: MOV RAX,qword ptr [RSP + 0x38] MOV ECX,dword ptr [RAX + 0x10] ADD ECX,0x1 MOV dword ptr [RAX + 0x10],ECX MOV RCX,qword ptr [RSP + 0x30] MOV RAX,RCX ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x80],RCX MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x88],RCX JMP 0x0014da62 caseD_b: JMP 0x0014dd05 caseD_9: MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x88],RCX JMP 0x0014da62 caseD_2f: JMP 0x0014dd05 caseD_24: MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x38] MOV EDX,dword ptr [RSP + 0x24] LEA RSI,[RSP + 0x30] CALL 0x00185590 MOV dword ptr [RSP + 0x20],EAX CMP dword ptr [RSP + 0x20],0x0 JNZ 0x0014dbd1 JMP 0x0014dd5c LAB_0014dbd1: MOV ECX,dword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x38],ECX MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x3c],0x0 MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x20],0xffffff83 JMP 0x0014dd1f caseD_2d: MOV RAX,qword ptr [RSP + 0x30] MOVZX EDI,byte ptr [RAX + 0x1] CALL 0x00126e30 CMP EAX,0x0 JNZ 0x0014dc34 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] LEA RDX,[0x20d564] CALL 0x00185730 JMP 0x0014dd5c LAB_0014dc34: JMP 0x0014dc68 caseD_30: MOV RAX,qword ptr [RSP + 0x30] MOVZX EDI,byte ptr [RAX + 0x1] CALL 0x00126e30 CMP EAX,0x0 JZ 0x0014dc64 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x30] LEA RDX,[0x20d57f] CALL 0x00185730 JMP 0x0014dd5c LAB_0014dc64: JMP 0x0014dc68 caseD_31: JMP 0x0014dc68 LAB_0014dc68: MOV RDI,qword ptr [RSP + 0x38] LEA RSI,[RSP + 0x30] CALL 0x00185850 CMP EAX,0x0 JZ 0x0014dc81 JMP 0x0014dd5c LAB_0014dc81: JMP 0x0014dd1f caseD_1: CMP dword ptr [RSP + 0x24],0x80 JL 0x0014dd03 MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x28] CALL 0x0011d890 MOV dword ptr [RSP + 0x24],EAX MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] ADD RCX,0x1 CMP RAX,RCX JNZ 0x0014dcd3 MOV RDI,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x30] MOVZX EDX,byte ptr [RAX] LEA RSI,[0x20d591] MOV AL,0x0 CALL 0x001473d0 JMP 0x0014dd01 LAB_0014dcd3: CMP dword ptr [RSP + 0x24],0xffff JLE 0x0014dcea MOV EDI,dword ptr [RSP + 0x24] CALL 0x0017d4a0 MOV dword ptr [RSP + 0x24],EAX LAB_0014dcea: MOV RDI,qword ptr [RSP + 0x38] MOV EDX,dword ptr [RSP + 0x24] LEA RSI,[0x20d5b3] MOV AL,0x0 CALL 0x001473d0 LAB_0014dd01: JMP 0x0014dd5c LAB_0014dd03: JMP 0x0014dd05 LAB_0014dd05: MOV ECX,dword ptr [RSP + 0x24] MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x20],ECX MOV RAX,qword ptr [RSP + 0x30] ADD RAX,0x1 MOV qword ptr [RSP + 0x30],RAX LAB_0014dd1f: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x88] MOV RCX,qword ptr [RSP + 0x38] MOV RCX,qword ptr [RCX + 0x80] SUB RAX,RCX MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x28],ECX MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x70],RCX MOV dword ptr [RSP + 0x44],0x0 JMP 0x0014dd70 LAB_0014dd5c: MOV RAX,qword ptr [RSP + 0x38] MOV dword ptr [RAX + 0x20],0xffffffa8 MOV dword ptr [RSP + 0x44],0xffffffff LAB_0014dd70: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 json_next_token(long *param_1) { int iVar1; uint uVar2; int local_24; byte *local_20; byte *local_18; long *local_10; local_10 = param_1; iVar1 = js_check_stack_overflow(*(int8 *)(*param_1 + 0x18),1000); if (iVar1 != 0) { JS_ThrowStackOverflow(*local_10); return 0xffffffff; } free_token(local_10,local_10 + 4); local_10[0xc] = local_10[0xe]; *(int4 *)(local_10 + 1) = *(int4 *)((long)local_10 + 0x24); *(int *)((long)local_10 + 0xc) = (int)local_10[5]; local_18 = (byte *)local_10[0xe]; LAB_0014da62: *(int *)((long)local_10 + 0x24) = (int)local_10[2]; *(int4 *)(local_10 + 5) = *(int4 *)((long)local_10 + 0x14); local_10[6] = (long)local_18; uVar2 = (uint)*local_18; switch(uVar2) { case 0: if (local_18 < (byte *)local_10[0xf]) { LAB_0014dd05: *(uint *)(local_10 + 4) = uVar2; local_18 = local_18 + 1; } else { *(int4 *)(local_10 + 4) = 0xffffffaa; } LAB_0014dd1f: *(int *)(local_10 + 5) = (int)local_10[0x11] - (int)local_10[0x10]; local_10[0xe] = (long)local_18; return 0; default: if (0x7f < uVar2) { local_24 = utf8_decode(local_18,&local_20); if (local_20 == local_18 + 1) { js_parse_error(local_10,"Unexpected token \'\\x%02x\' in JSON",*local_18); } else { if (0xffff < local_24) { local_24 = get_hi_surrogate(local_24); } js_parse_error(local_10,"Unexpected token \'\\u%04x\' in JSON",local_24); } goto LAB_0014dd5c; } goto LAB_0014dd05; case 9: case 0x20: local_10[0x11] = (long)(local_18 + 1); local_18 = local_18 + 1; goto LAB_0014da62; case 10: goto switchD_0014dab8_caseD_a; case 0xb: case 0xc: goto LAB_0014dd05; case 0xd: if (local_18[1] == 10) { local_18 = local_18 + 1; } goto switchD_0014dab8_caseD_a; case 0x22: local_18 = local_18 + 1; iVar1 = json_parse_string(local_10,&local_18); goto joined_r0x0014dc7a; case 0x24: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: case 0x58: case 0x59: case 0x5a: case 0x5f: case 0x61: case 0x62: case 99: case 100: case 0x65: case 0x66: case 0x67: case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: case 0x78: case 0x79: case 0x7a: local_18 = local_18 + 1; iVar1 = json_parse_ident(local_10,&local_18,uVar2); if (iVar1 == 0) goto LAB_0014dd5c; *(int *)(local_10 + 7) = iVar1; *(int4 *)((long)local_10 + 0x3c) = 0; *(int4 *)(local_10 + 8) = 0; *(int4 *)(local_10 + 4) = 0xffffff83; goto LAB_0014dd1f; case 0x27: goto LAB_0014dd05; case 0x2d: iVar1 = is_digit(local_18[1]); if (iVar1 == 0) { json_parse_error(local_10,local_18,"No number after minus sign"); goto LAB_0014dd5c; } break; case 0x2f: goto LAB_0014dd05; case 0x30: iVar1 = is_digit(local_18[1]); if (iVar1 != 0) { json_parse_error(local_10,local_18,"Unexpected number"); goto LAB_0014dd5c; } break; case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: } iVar1 = json_parse_number(local_10,&local_18); joined_r0x0014dc7a: if (iVar1 != 0) { LAB_0014dd5c: *(int4 *)(local_10 + 4) = 0xffffffa8; return 0xffffffff; } goto LAB_0014dd1f; switchD_0014dab8_caseD_a: *(int *)(local_10 + 2) = (int)local_10[2] + 1; local_10[0x10] = (long)local_18; local_10[0x11] = (long)(local_18 + 1); local_18 = local_18 + 1; goto LAB_0014da62; }
9,006
json_next_token
bluesky950520[P]quickjs/quickjs.c
static __exception int json_next_token(JSParseState *s) { const uint8_t *p, *p_next; int c; JSAtom atom; if (js_check_stack_overflow(s->ctx->rt, 1000)) { JS_ThrowStackOverflow(s->ctx); return -1; } free_token(s, &s->token); p = s->last_ptr = s->buf_ptr; s->last_line_num = s->token.line_num; s->last_col_num = s->token.col_num; redo: s->token.line_num = s->line_num; s->token.col_num = s->col_num; s->token.ptr = p; c = *p; switch(c) { case 0: if (p >= s->buf_end) { s->token.val = TOK_EOF; } else { goto def_token; } break; case '\'': /* JSON does not accept single quoted strings */ goto def_token; case '\"': p++; if (json_parse_string(s, &p)) goto fail; break; case '\r': /* accept DOS and MAC newline sequences */ if (p[1] == '\n') { p++; } /* fall thru */ case '\n': s->line_num++; s->eol = p++; s->mark = p; goto redo; case '\f': case '\v': /* JSONWhitespace does not match <VT>, nor <FF> */ goto def_token; case ' ': case '\t': p++; s->mark = p; goto redo; case '/': /* JSON does not accept comments */ goto def_token; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '_': case '$': /* identifier : only pure ascii characters are accepted */ p++; atom = json_parse_ident(s, &p, c); if (atom == JS_ATOM_NULL) goto fail; s->token.u.ident.atom = atom; s->token.u.ident.has_escape = FALSE; s->token.u.ident.is_reserved = FALSE; s->token.val = TOK_IDENT; break; case '-': if (!is_digit(p[1])) { json_parse_error(s, p, "No number after minus sign"); goto fail; } goto parse_number; case '0': if (is_digit(p[1])) { json_parse_error(s, p, "Unexpected number"); goto fail; } goto parse_number; case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': /* number */ parse_number: if (json_parse_number(s, &p)) goto fail; break; default: if (c >= 0x80) { c = utf8_decode(p, &p_next); if (p_next == p + 1) { js_parse_error(s, "Unexpected token '\\x%02x' in JSON", *p); } else { if (c > 0xFFFF) { c = get_hi_surrogate(c); } js_parse_error(s, "Unexpected token '\\u%04x' in JSON", c); } goto fail; } def_token: s->token.val = c; p++; break; } s->token.col_num = s->mark - s->eol; s->buf_ptr = p; // dump_token(s, &s->token); return 0; fail: s->token.val = TOK_ERROR; return -1; }
O1
c
json_next_token: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdi, %rbx movq %rbp, %rax movq (%rdi), %rdi movq 0x18(%rdi), %rcx addq $-0x3e8, %rax # imm = 0xFC18 cmpq 0xe8(%rcx), %rax jae 0x330e8 leaq 0x6a7f2(%rip), %rsi # 0x9d8ce xorl %eax, %eax callq 0x1fec9 jmp 0x3345b leaq 0x20(%rbx), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x338e6 movq 0x70(%rbx), %rax movq %rax, 0x60(%rbx) movq %rax, -0x30(%rbp) movq 0x24(%rbx), %rax movq %rax, 0x8(%rbx) movl 0x10(%rbx), %eax movl 0x14(%rbx), %ecx movq -0x30(%rbp), %r15 leaq 0x680d0(%rip), %rsi # 0x9b1ec movq %r14, -0x48(%rbp) movl %eax, 0x24(%rbx) movl %ecx, 0x28(%rbx) movq %r15, 0x30(%rbx) movzbl (%r15), %edx cmpq $0x7a, %rdx ja 0x333e4 movslq (%rsi,%rdx,4), %rdi addq %rsi, %rdi jmpq *%rdi incq %r15 movq %r15, 0x88(%rbx) jmp 0x33120 leaq 0x1(%r15), %rdx cmpb $0xa, 0x1(%r15) cmoveq %rdx, %r15 incl %eax movl %eax, 0x10(%rbx) movq %r15, 0x80(%rbx) jmp 0x33141 leaq 0x1(%r15), %rcx movq %rcx, -0x30(%rbp) leaq -0xd0(%rbp), %rsi movq %rsi, -0x38(%rbp) movq $0x80, -0x40(%rbp) movb %dl, (%rsi) movsbl 0x1(%r15), %r13d movl $0x1, %r12d testl %r13d, %r13d js 0x33236 movzbl %r13b, %eax shrl $0x5, %eax leaq 0x6eaf9(%rip), %r14 # 0xa1ca0 movl (%r14,%rax,4), %eax btl %r13d, %eax jae 0x33236 movl $0x2, %eax leaq -0x38(%rbp), %rdx leaq -0x40(%rbp), %r8 leaq -0xd0(%rbp), %rcx movq %rax, %r12 decq %rax movq -0x40(%rbp), %rsi addq $-0x4, %rsi cmpq %rsi, %rax jae 0x33207 movq -0x38(%rbp), %rsi movb %r13b, -0x1(%rsi,%r12) movsbl (%r15,%r12), %r13d testl %r13d, %r13d js 0x33230 movzbl %r13b, %eax shrl $0x5, %eax movl (%r14,%rax,4), %edi leaq 0x1(%r12), %rax btl %r13d, %edi jb 0x331c9 jmp 0x33230 movq (%rbx), %rdi movq %rdx, %rsi movq %r8, %rdx callq 0x4c1b3 leaq -0xd0(%rbp), %rcx leaq -0x40(%rbp), %r8 leaq -0x38(%rbp), %rdx testl %eax, %eax je 0x331dc addq %r12, %r15 xorl %r12d, %r12d jmp 0x33247 addq %r12, %r15 movq %r15, %rcx movq %rcx, %r15 movq (%rbx), %rdi movq %r12, %rdx callq 0x1f1ac movl %eax, %r12d movq -0x38(%rbp), %rsi leaq -0xd0(%rbp), %rax cmpq %rax, %rsi movq %r15, %rax jne 0x334c0 movq %rax, -0x30(%rbp) testl %r12d, %r12d je 0x33451 movl %r12d, 0x38(%rbx) movq $0x0, 0x3c(%rbx) movl $0xffffff83, 0x20(%rbx) # imm = 0xFFFFFF83 movl 0x88(%rbx), %eax subl 0x80(%rbx), %eax movl %eax, 0x28(%rbx) movq -0x30(%rbp), %rax movq %rax, 0x70(%rbx) xorl %eax, %eax jmp 0x33460 movq %r15, -0x30(%rbp) cmpl $0x2d, %edx je 0x332ad movq %r15, %rsi cmpl $0x2b, %edx jne 0x332b1 leaq 0x1(%r15), %rsi movzbl (%rsi), %eax leal -0x3a(%rax), %ecx cmpl $-0xb, %ecx ja 0x332d2 leaq 0x6b3c5(%rip), %rsi # 0x9e688 movq %rbx, %rdi xorl %eax, %eax callq 0x2f0d5 jmp 0x33451 cmpb $0x30, %al jne 0x332e2 movzbl 0x1(%rsi), %eax addl $-0x3a, %eax cmpl $-0xa, %eax jae 0x3335e movzbl (%rsi), %eax leal -0x3a(%rax), %ecx incq %rsi cmpl $-0xb, %ecx ja 0x332e2 leaq -0x1(%rsi), %r12 cmpb $0x2e, %al jne 0x3331d movzbl (%rsi), %eax addl $-0x3a, %eax cmpl $-0xa, %eax jae 0x3330c leaq 0x6b394(%rip), %rdx # 0x9e69e jmp 0x33365 movzbl 0x1(%r12), %eax incq %r12 addl $-0x3a, %eax cmpl $-0xb, %eax ja 0x3330c movzbl (%r12), %eax orl $0x20, %eax cmpl $0x65, %eax jne 0x33486 movzbl 0x1(%r12), %eax cmpl $0x2d, %eax je 0x33342 cmpl $0x2b, %eax jne 0x3342f addq $0x2, %r12 jmp 0x33432 movq %r15, -0x30(%rbp) movl %edx, (%r14) incq %r15 movq %r15, -0x30(%rbp) jmp 0x3327e leaq 0x6b21e(%rip), %rdx # 0x9e583 movq %rbx, %rdi jmp 0x3344c movq %r15, -0x30(%rbp) movzbl 0x1(%r15), %eax addl $-0x3a, %eax cmpl $-0xa, %eax jb 0x332a0 leaq 0x6b1fa(%rip), %rdx # 0x9e583 jmp 0x333dc movq %r15, -0x30(%rbp) cmpq 0x78(%rbx), %r15 jb 0x3334f movl $0xffffffaa, (%r14) # imm = 0xFFFFFFAA jmp 0x3327e incq %r15 leaq -0x30(%rbp), %rsi movq %r15, (%rsi) movq %rbx, %rdi callq 0x4bef5 testl %eax, %eax jne 0x33451 jmp 0x3327e movq %r15, -0x30(%rbp) movzbl 0x1(%r15), %eax addl $-0x3a, %eax cmpl $-0xb, %eax ja 0x332a0 leaq 0x6b18c(%rip), %rdx # 0x9e568 movq %rbx, %rdi movq %r15, %rsi jmp 0x3344c movq %r15, -0x30(%rbp) testb %dl, %dl jns 0x3334f leaq -0xd0(%rbp), %r12 movq %r15, %rdi movq %r12, %rsi callq 0x1ab15 leaq 0x1(%r15), %rcx cmpq (%r12), %rcx je 0x334ad movl %eax, %edx shrl $0xa, %edx addl $0xd7c0, %edx # imm = 0xD7C0 cmpl $0x10000, %eax # imm = 0x10000 cmovll %eax, %edx leaq 0x6b18d(%rip), %rsi # 0x9e5b7 jmp 0x334b8 incq %r12 movzbl (%r12), %eax addl $-0x3a, %eax cmpl $-0xa, %eax jae 0x33472 leaq 0x6b277(%rip), %rdx # 0x9e6bd movq %rbx, %rdi movq %r12, %rsi callq 0x4c149 movq -0x48(%rbp), %rax movl $0xffffffa8, (%rax) # imm = 0xFFFFFFA8 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq decq %r12 movzbl 0x1(%r12), %eax incq %r12 addl $-0x3a, %eax cmpl $-0xb, %eax ja 0x33475 movl $0xffffff80, 0x20(%rbx) # imm = 0xFFFFFF80 movq %r15, %rdi xorl %esi, %esi callq 0xe180 movsd %xmm0, 0x38(%rbx) movq $0x7, 0x40(%rbx) movq %r12, -0x30(%rbp) jmp 0x3327e movzbl (%r15), %edx leaq 0x6b0dd(%rip), %rsi # 0x9e595 movq %rbx, %rdi jmp 0x332c6 movq (%rbx), %rdi callq 0x1bf85 movq %r15, %rax jmp 0x3325e
json_next_token: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov rbx, rdi mov rax, rbp mov rdi, [rdi] mov rcx, [rdi+18h] add rax, 0FFFFFFFFFFFFFC18h cmp rax, [rcx+0E8h] jnb short loc_330E8 lea rsi, aMaximumCallSta; "Maximum call stack size exceeded" xor eax, eax call JS_ThrowRangeError jmp loc_3345B loc_330E8: lea r14, [rbx+20h] mov rdi, rbx mov rsi, r14 call free_token mov rax, [rbx+70h] mov [rbx+60h], rax mov [rbp+var_30], rax mov rax, [rbx+24h] mov [rbx+8], rax mov eax, [rbx+10h] mov ecx, [rbx+14h] mov r15, [rbp+var_30] lea rsi, jpt_3313F mov [rbp+var_48], r14 loc_33120: mov [rbx+24h], eax mov [rbx+28h], ecx mov [rbx+30h], r15 movzx edx, byte ptr [r15] cmp rdx, 7Ah; switch 123 cases ja def_3313F; jumptable 000000000003313F default case, cases 1-8,14-31,33,35,37,38,40-44,46,58-64,91-94,96 movsxd rdi, ds:(jpt_3313F - 9B1ECh)[rsi+rdx*4] add rdi, rsi jmp rdi; switch jump loc_33141: inc r15; jumptable 000000000003313F cases 9,32 mov [rbx+88h], r15 jmp short loc_33120 loc_3314D: lea rdx, [r15+1]; jumptable 000000000003313F case 13 cmp byte ptr [r15+1], 0Ah cmovz r15, rdx loc_3315A: inc eax; jumptable 000000000003313F case 10 mov [rbx+10h], eax mov [rbx+80h], r15 jmp short loc_33141; jumptable 000000000003313F cases 9,32 loc_33168: lea rcx, [r15+1]; jumptable 000000000003313F cases 36,65-90,95,97-122 mov [rbp+var_30], rcx lea rsi, [rbp+var_D0] mov [rbp+var_38], rsi mov [rbp+var_40], 80h mov [rsi], dl movsx r13d, byte ptr [r15+1] mov r12d, 1 test r13d, r13d js loc_33236 movzx eax, r13b shr eax, 5 lea r14, lre_id_continue_table_ascii mov eax, [r14+rax*4] bt eax, r13d jnb loc_33236 mov eax, 2 lea rdx, [rbp+var_38] lea r8, [rbp+var_40] lea rcx, [rbp+var_D0] loc_331C9: mov r12, rax dec rax mov rsi, [rbp+var_40] add rsi, 0FFFFFFFFFFFFFFFCh cmp rax, rsi jnb short loc_33207 loc_331DC: mov rsi, [rbp+var_38] mov [rsi+r12-1], r13b movsx r13d, byte ptr [r15+r12] test r13d, r13d js short loc_33230 movzx eax, r13b shr eax, 5 mov edi, [r14+rax*4] lea rax, [r12+1] bt edi, r13d jb short loc_331C9 jmp short loc_33230 loc_33207: mov rdi, [rbx] mov rsi, rdx mov rdx, r8 call ident_realloc lea rcx, [rbp+var_D0] lea r8, [rbp+var_40] lea rdx, [rbp+var_38] test eax, eax jz short loc_331DC add r15, r12 xor r12d, r12d jmp short loc_33247 loc_33230: add r15, r12 mov rcx, r15 loc_33236: mov r15, rcx mov rdi, [rbx] mov rdx, r12 call JS_NewAtomLen mov r12d, eax loc_33247: mov rsi, [rbp+var_38] lea rax, [rbp+var_D0] cmp rsi, rax mov rax, r15 jnz loc_334C0 loc_3325E: mov [rbp+var_30], rax test r12d, r12d jz loc_33451 mov [rbx+38h], r12d mov qword ptr [rbx+3Ch], 0 mov dword ptr [rbx+20h], 0FFFFFF83h loc_3327E: mov eax, [rbx+88h] sub eax, [rbx+80h] mov [rbx+28h], eax mov rax, [rbp+var_30] mov [rbx+70h], rax xor eax, eax jmp loc_33460 loc_3329C: mov [rbp+var_30], r15; jumptable 000000000003313F cases 49-57 loc_332A0: cmp edx, 2Dh ; '-' jz short loc_332AD mov rsi, r15 cmp edx, 2Bh ; '+' jnz short loc_332B1 loc_332AD: lea rsi, [r15+1] loc_332B1: movzx eax, byte ptr [rsi] lea ecx, [rax-3Ah] cmp ecx, 0FFFFFFF5h ja short loc_332D2 lea rsi, aUnexpectedToke; "Unexpected token '%c'" mov rdi, rbx loc_332C6: xor eax, eax call js_parse_error jmp loc_33451 loc_332D2: cmp al, 30h ; '0' jnz short loc_332E2 movzx eax, byte ptr [rsi+1] add eax, 0FFFFFFC6h cmp eax, 0FFFFFFF6h jnb short loc_3335E loc_332E2: movzx eax, byte ptr [rsi] lea ecx, [rax-3Ah] inc rsi cmp ecx, 0FFFFFFF5h ja short loc_332E2 lea r12, [rsi-1] cmp al, 2Eh ; '.' jnz short loc_3331D movzx eax, byte ptr [rsi] add eax, 0FFFFFFC6h cmp eax, 0FFFFFFF6h jnb short loc_3330C lea rdx, aUnterminatedFr; "Unterminated fractional number" jmp short loc_33365 loc_3330C: movzx eax, byte ptr [r12+1] inc r12 add eax, 0FFFFFFC6h cmp eax, 0FFFFFFF5h ja short loc_3330C loc_3331D: movzx eax, byte ptr [r12] or eax, 20h cmp eax, 65h ; 'e' jnz loc_33486 movzx eax, byte ptr [r12+1] cmp eax, 2Dh ; '-' jz short loc_33342 cmp eax, 2Bh ; '+' jnz loc_3342F loc_33342: add r12, 2 jmp loc_33432 loc_3334B: mov [rbp+var_30], r15; jumptable 000000000003313F cases 11,12,39,47 loc_3334F: mov [r14], edx inc r15 mov [rbp+var_30], r15 jmp loc_3327E loc_3335E: lea rdx, aUnexpectedNumb; "Unexpected number" loc_33365: mov rdi, rbx jmp loc_3344C loc_3336D: mov [rbp+var_30], r15; jumptable 000000000003313F case 48 movzx eax, byte ptr [r15+1] add eax, 0FFFFFFC6h cmp eax, 0FFFFFFF6h jb loc_332A0 lea rdx, aUnexpectedNumb; "Unexpected number" jmp short loc_333DC loc_3338B: mov [rbp+var_30], r15; jumptable 000000000003313F case 0 cmp r15, [rbx+78h] jb short loc_3334F mov dword ptr [r14], 0FFFFFFAAh jmp loc_3327E loc_333A1: inc r15; jumptable 000000000003313F case 34 lea rsi, [rbp+var_30] mov [rsi], r15 mov rdi, rbx call json_parse_string test eax, eax jnz loc_33451 jmp loc_3327E loc_333C0: mov [rbp+var_30], r15; jumptable 000000000003313F case 45 movzx eax, byte ptr [r15+1] add eax, 0FFFFFFC6h cmp eax, 0FFFFFFF5h ja loc_332A0 lea rdx, aNoNumberAfterM; "No number after minus sign" loc_333DC: mov rdi, rbx mov rsi, r15 jmp short loc_3344C def_3313F: mov [rbp+var_30], r15; jumptable 000000000003313F default case, cases 1-8,14-31,33,35,37,38,40-44,46,58-64,91-94,96 test dl, dl jns loc_3334F lea r12, [rbp+var_D0] mov rdi, r15 mov rsi, r12 call utf8_decode lea rcx, [r15+1] cmp rcx, [r12] jz loc_334AD mov edx, eax shr edx, 0Ah add edx, 0D7C0h cmp eax, offset loc_10000 cmovl edx, eax lea rsi, aUnexpectedToke_0; "Unexpected token '\\u%04x' in JSON" jmp loc_334B8 loc_3342F: inc r12 loc_33432: movzx eax, byte ptr [r12] add eax, 0FFFFFFC6h cmp eax, 0FFFFFFF6h jnb short loc_33472 lea rdx, aExponentPartIs; "Exponent part is missing a number" mov rdi, rbx mov rsi, r12 loc_3344C: call json_parse_error loc_33451: mov rax, [rbp+var_48] mov dword ptr [rax], 0FFFFFFA8h loc_3345B: mov eax, 0FFFFFFFFh loc_33460: add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_33472: dec r12 loc_33475: movzx eax, byte ptr [r12+1] inc r12 add eax, 0FFFFFFC6h cmp eax, 0FFFFFFF5h ja short loc_33475 loc_33486: mov dword ptr [rbx+20h], 0FFFFFF80h mov rdi, r15 xor esi, esi call _strtod movsd qword ptr [rbx+38h], xmm0 mov qword ptr [rbx+40h], 7 mov [rbp+var_30], r12 jmp loc_3327E loc_334AD: movzx edx, byte ptr [r15] lea rsi, aUnexpectedToke_1; "Unexpected token '\\x%02x' in JSON" loc_334B8: mov rdi, rbx jmp loc_332C6 loc_334C0: mov rdi, [rbx] call js_free mov rax, r15 jmp loc_3325E
long long json_next_token( _QWORD *a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14) { long long v15; // rdi long long v16; // rcx _DWORD *v17; // r14 long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 char *v22; // rax int v23; // eax int v24; // ecx char *v25; // r15 long long v26; // rdx char *v27; // rcx char **v28; // rsi signed int v29; // r13d long long v30; // r12 int v31; // eax long long v32; // rax int v33; // edi char *v34; // r15 int v35; // r12d char *v36; // rax char *v38; // rsi int v39; // eax long long v40; // rcx const char *v41; // rsi long long *v42; // rdi int v43; // eax unsigned __int8 *v44; // r12 const char *v45; // rdx int v46; // eax int v47; // eax char *v48; // r12 _QWORD *v49; // rdi unsigned int v50; // eax int v51; // eax char *v52[17]; // [rsp+0h] [rbp-D0h] BYREF _DWORD *v53; // [rsp+88h] [rbp-48h] long long v54; // [rsp+90h] [rbp-40h] BYREF char **v55; // [rsp+98h] [rbp-38h] BYREF char *v56; // [rsp+A0h] [rbp-30h] BYREF long long savedregs; // [rsp+D0h] [rbp+0h] BYREF v15 = *a1; v16 = *(_QWORD *)(v15 + 24); if ( (unsigned long long)(&savedregs - 125) >= *(_QWORD *)(v16 + 232) ) { v17 = a1 + 4; free_token(a1, a1 + 4); v22 = (char *)a1[14]; a1[12] = v22; v56 = v22; a1[1] = *(_QWORD *)((char *)a1 + 36); v23 = *((_DWORD *)a1 + 4); v24 = *((_DWORD *)a1 + 5); v25 = v56; v53 = a1 + 4; while ( 2 ) { *((_DWORD *)a1 + 9) = v23; *((_DWORD *)a1 + 10) = v24; a1[6] = v25; v26 = (unsigned __int8)*v25; switch ( *v25 ) { case 0: v56 = v25; if ( (unsigned long long)v25 < a1[15] ) goto LABEL_44; *v17 = -86; goto LABEL_24; case 9: case 32: goto LABEL_5; case 10: goto LABEL_8; case 11: case 12: case 39: case 47: v56 = v25; goto LABEL_44; case 13: if ( v25[1] == 10 ) ++v25; LABEL_8: *((_DWORD *)a1 + 4) = ++v23; a1[16] = v25; LABEL_5: a1[17] = ++v25; continue; case 34: v56 = v25 + 1; if ( !(unsigned int)json_parse_string(a1, &v56, v26) ) goto LABEL_24; goto LABEL_65; case 36: case 65: case 66: case 67: case 68: case 69: case 70: case 71: case 72: case 73: case 74: case 75: case 76: case 77: case 78: case 79: case 80: case 81: case 82: case 83: case 84: case 85: case 86: case 87: case 88: case 89: case 90: case 95: case 97: case 98: case 99: case 100: case 101: case 102: case 103: case 104: case 105: case 106: case 107: case 108: case 109: case 110: case 111: case 112: case 113: case 114: case 115: case 116: case 117: case 118: case 119: case 120: case 121: case 122: v27 = v25 + 1; v56 = v25 + 1; v28 = v52; v55 = v52; v54 = 128LL; LOBYTE(v52[0]) = v26; v29 = v25[1]; v30 = 1LL; if ( v29 < 0 ) goto LABEL_19; v31 = lre_id_continue_table_ascii[(unsigned __int8)v29 >> 5]; if ( !_bittest(&v31, v29) ) goto LABEL_19; v32 = 2LL; do { v30 = v32; if ( v32 - 1 >= (unsigned long long)(v54 - 4) && (unsigned int)ident_realloc(*a1, &v55, &v54, v52) ) { v34 = &v25[v30]; v35 = 0; goto LABEL_20; } v28 = v55; *((_BYTE *)v55 + v30 - 1) = v29; v29 = v25[v30]; if ( v29 < 0 ) break; v33 = lre_id_continue_table_ascii[(unsigned __int8)v29 >> 5]; v32 = v30 + 1; } while ( _bittest(&v33, v29) ); v27 = &v25[v30]; LABEL_19: v34 = v27; v35 = JS_NewAtomLen(*a1, (unsigned __int8 *)v28, v30); LABEL_20: v36 = v34; if ( v55 != v52 ) { js_free(*a1, (long long)v55); v36 = v34; } v56 = v36; if ( v35 ) { *((_DWORD *)a1 + 14) = v35; *(_QWORD *)((char *)a1 + 60) = 0LL; *((_DWORD *)a1 + 8) = -125; goto LABEL_24; } LABEL_65: *v53 = -88; return 0xFFFFFFFFLL; case 45: v56 = v25; if ( (unsigned int)(unsigned __int8)v25[1] - 58 > 0xFFFFFFF5 ) goto LABEL_26; v45 = "No number after minus sign"; goto LABEL_55; case 48: v56 = v25; if ( (unsigned int)(unsigned __int8)v25[1] - 58 < 0xFFFFFFF6 ) goto LABEL_26; v45 = "Unexpected number"; LABEL_55: v49 = a1; v38 = v25; goto LABEL_64; case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: v56 = v25; LABEL_26: if ( (_DWORD)v26 == 45 || (v38 = v25, (_DWORD)v26 == 43) ) v38 = v25 + 1; v39 = (unsigned __int8)*v38; v40 = (unsigned int)(v39 - 58); if ( (unsigned int)v40 <= 0xFFFFFFF5 ) { v41 = "Unexpected token '%c'"; v42 = a1; goto LABEL_31; } if ( (_BYTE)v39 != 48 || (unsigned int)(unsigned __int8)v38[1] - 58 < 0xFFFFFFF6 ) { do v43 = (unsigned __int8)*v38++; while ( (unsigned int)(v43 - 58) > 0xFFFFFFF5 ); v44 = (unsigned __int8 *)(v38 - 1); if ( (_BYTE)v43 == 46 ) { if ( (unsigned int)(unsigned __int8)*v38 - 58 < 0xFFFFFFF6 ) { v45 = "Unterminated fractional number"; LABEL_46: v49 = a1; LABEL_64: json_parse_error(v49, v38, v45); goto LABEL_65; } do v46 = *++v44; while ( (unsigned int)(v46 - 58) > 0xFFFFFFF5 ); } if ( (*v44 | 0x20) == 0x65 ) { v47 = v44[1]; if ( v47 == 45 || v47 == 43 ) v48 = (char *)(v44 + 2); else v48 = (char *)(v44 + 1); if ( (unsigned int)(unsigned __int8)*v48 - 58 < 0xFFFFFFF6 ) { v45 = "Exponent part is missing a number"; v49 = a1; v38 = v48; goto LABEL_64; } v44 = (unsigned __int8 *)(v48 - 1); do v51 = *++v44; while ( (unsigned int)(v51 - 58) > 0xFFFFFFF5 ); } *((_DWORD *)a1 + 8) = -128; *((double *)a1 + 7) = strtod(v25, 0LL); a1[8] = 7LL; v56 = (char *)v44; LABEL_24: *((_DWORD *)a1 + 10) = *((_DWORD *)a1 + 34) - *((_DWORD *)a1 + 32); a1[14] = v56; return 0LL; } v45 = "Unexpected number"; goto LABEL_46; default: v56 = v25; if ( (v26 & 0x80u) == 0LL ) { LABEL_44: *v17 = v26; v56 = v25 + 1; goto LABEL_24; } v50 = utf8_decode(v25, v52); v40 = (long long)(v25 + 1); if ( v25 + 1 == v52[0] ) { v26 = (unsigned __int8)*v25; v41 = "Unexpected token '\\x%02x' in JSON"; } else { v26 = (v50 >> 10) + 55232; if ( (int)v50 < (int)&loc_10000 ) v26 = v50; v41 = "Unexpected token '\\u%04x' in JSON"; } v42 = a1; LABEL_31: js_parse_error(v42, (long long)v41, v26, v40, v18, v19, a2, a3, a4, a5, v20, v21, a8, a9, (char)v52[0]); goto LABEL_65; } } } JS_ThrowRangeError( v15, (long long)"Maximum call stack size exceeded", a11, v16, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, (char)v52[0]); return 0xFFFFFFFFLL; }
json_next_token: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV RBX,RDI MOV RAX,RBP MOV RDI,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x18] ADD RAX,-0x3e8 CMP RAX,qword ptr [RCX + 0xe8] JNC 0x001330e8 LEA RSI,[0x19d8ce] XOR EAX,EAX CALL 0x0011fec9 JMP 0x0013345b LAB_001330e8: LEA R14,[RBX + 0x20] MOV RDI,RBX MOV RSI,R14 CALL 0x001338e6 MOV RAX,qword ptr [RBX + 0x70] MOV qword ptr [RBX + 0x60],RAX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBX + 0x24] MOV qword ptr [RBX + 0x8],RAX MOV EAX,dword ptr [RBX + 0x10] MOV ECX,dword ptr [RBX + 0x14] MOV R15,qword ptr [RBP + -0x30] LEA RSI,[0x19b1ec] MOV qword ptr [RBP + -0x48],R14 LAB_00133120: MOV dword ptr [RBX + 0x24],EAX MOV dword ptr [RBX + 0x28],ECX MOV qword ptr [RBX + 0x30],R15 MOVZX EDX,byte ptr [R15] CMP RDX,0x7a JA 0x001333e4 MOVSXD RDI,dword ptr [RSI + RDX*0x4] ADD RDI,RSI switchD: JMP RDI caseD_9: INC R15 MOV qword ptr [RBX + 0x88],R15 JMP 0x00133120 caseD_d: LEA RDX,[R15 + 0x1] CMP byte ptr [R15 + 0x1],0xa CMOVZ R15,RDX caseD_a: INC EAX MOV dword ptr [RBX + 0x10],EAX MOV qword ptr [RBX + 0x80],R15 JMP 0x00133141 caseD_24: LEA RCX,[R15 + 0x1] MOV qword ptr [RBP + -0x30],RCX LEA RSI,[RBP + -0xd0] MOV qword ptr [RBP + -0x38],RSI MOV qword ptr [RBP + -0x40],0x80 MOV byte ptr [RSI],DL MOVSX R13D,byte ptr [R15 + 0x1] MOV R12D,0x1 TEST R13D,R13D JS 0x00133236 MOVZX EAX,R13B SHR EAX,0x5 LEA R14,[0x1a1ca0] MOV EAX,dword ptr [R14 + RAX*0x4] BT EAX,R13D JNC 0x00133236 MOV EAX,0x2 LEA RDX,[RBP + -0x38] LEA R8,[RBP + -0x40] LEA RCX,[RBP + -0xd0] LAB_001331c9: MOV R12,RAX DEC RAX MOV RSI,qword ptr [RBP + -0x40] ADD RSI,-0x4 CMP RAX,RSI JNC 0x00133207 LAB_001331dc: MOV RSI,qword ptr [RBP + -0x38] MOV byte ptr [RSI + R12*0x1 + -0x1],R13B MOVSX R13D,byte ptr [R15 + R12*0x1] TEST R13D,R13D JS 0x00133230 MOVZX EAX,R13B SHR EAX,0x5 MOV EDI,dword ptr [R14 + RAX*0x4] LEA RAX,[R12 + 0x1] BT EDI,R13D JC 0x001331c9 JMP 0x00133230 LAB_00133207: MOV RDI,qword ptr [RBX] MOV RSI,RDX MOV RDX,R8 CALL 0x0014c1b3 LEA RCX,[RBP + -0xd0] LEA R8,[RBP + -0x40] LEA RDX,[RBP + -0x38] TEST EAX,EAX JZ 0x001331dc ADD R15,R12 XOR R12D,R12D JMP 0x00133247 LAB_00133230: ADD R15,R12 MOV RCX,R15 LAB_00133236: MOV R15,RCX MOV RDI,qword ptr [RBX] MOV RDX,R12 CALL 0x0011f1ac MOV R12D,EAX LAB_00133247: MOV RSI,qword ptr [RBP + -0x38] LEA RAX,[RBP + -0xd0] CMP RSI,RAX MOV RAX,R15 JNZ 0x001334c0 LAB_0013325e: MOV qword ptr [RBP + -0x30],RAX TEST R12D,R12D JZ 0x00133451 MOV dword ptr [RBX + 0x38],R12D MOV qword ptr [RBX + 0x3c],0x0 MOV dword ptr [RBX + 0x20],0xffffff83 LAB_0013327e: MOV EAX,dword ptr [RBX + 0x88] SUB EAX,dword ptr [RBX + 0x80] MOV dword ptr [RBX + 0x28],EAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBX + 0x70],RAX XOR EAX,EAX JMP 0x00133460 caseD_31: MOV qword ptr [RBP + -0x30],R15 LAB_001332a0: CMP EDX,0x2d JZ 0x001332ad MOV RSI,R15 CMP EDX,0x2b JNZ 0x001332b1 LAB_001332ad: LEA RSI,[R15 + 0x1] LAB_001332b1: MOVZX EAX,byte ptr [RSI] LEA ECX,[RAX + -0x3a] CMP ECX,-0xb JA 0x001332d2 LEA RSI,[0x19e688] MOV RDI,RBX LAB_001332c6: XOR EAX,EAX CALL 0x0012f0d5 JMP 0x00133451 LAB_001332d2: CMP AL,0x30 JNZ 0x001332e2 MOVZX EAX,byte ptr [RSI + 0x1] ADD EAX,-0x3a CMP EAX,-0xa JNC 0x0013335e LAB_001332e2: MOVZX EAX,byte ptr [RSI] LEA ECX,[RAX + -0x3a] INC RSI CMP ECX,-0xb JA 0x001332e2 LEA R12,[RSI + -0x1] CMP AL,0x2e JNZ 0x0013331d MOVZX EAX,byte ptr [RSI] ADD EAX,-0x3a CMP EAX,-0xa JNC 0x0013330c LEA RDX,[0x19e69e] JMP 0x00133365 LAB_0013330c: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 ADD EAX,-0x3a CMP EAX,-0xb JA 0x0013330c LAB_0013331d: MOVZX EAX,byte ptr [R12] OR EAX,0x20 CMP EAX,0x65 JNZ 0x00133486 MOVZX EAX,byte ptr [R12 + 0x1] CMP EAX,0x2d JZ 0x00133342 CMP EAX,0x2b JNZ 0x0013342f LAB_00133342: ADD R12,0x2 JMP 0x00133432 caseD_b: MOV qword ptr [RBP + -0x30],R15 LAB_0013334f: MOV dword ptr [R14],EDX INC R15 MOV qword ptr [RBP + -0x30],R15 JMP 0x0013327e LAB_0013335e: LEA RDX,[0x19e583] LAB_00133365: MOV RDI,RBX JMP 0x0013344c caseD_30: MOV qword ptr [RBP + -0x30],R15 MOVZX EAX,byte ptr [R15 + 0x1] ADD EAX,-0x3a CMP EAX,-0xa JC 0x001332a0 LEA RDX,[0x19e583] JMP 0x001333dc caseD_0: MOV qword ptr [RBP + -0x30],R15 CMP R15,qword ptr [RBX + 0x78] JC 0x0013334f MOV dword ptr [R14],0xffffffaa JMP 0x0013327e caseD_22: INC R15 LEA RSI,[RBP + -0x30] MOV qword ptr [RSI],R15 MOV RDI,RBX CALL 0x0014bef5 TEST EAX,EAX JNZ 0x00133451 JMP 0x0013327e caseD_2d: MOV qword ptr [RBP + -0x30],R15 MOVZX EAX,byte ptr [R15 + 0x1] ADD EAX,-0x3a CMP EAX,-0xb JA 0x001332a0 LEA RDX,[0x19e568] LAB_001333dc: MOV RDI,RBX MOV RSI,R15 JMP 0x0013344c caseD_1: MOV qword ptr [RBP + -0x30],R15 TEST DL,DL JNS 0x0013334f LEA R12,[RBP + -0xd0] MOV RDI,R15 MOV RSI,R12 CALL 0x0011ab15 LEA RCX,[R15 + 0x1] CMP RCX,qword ptr [R12] JZ 0x001334ad MOV EDX,EAX SHR EDX,0xa ADD EDX,0xd7c0 CMP EAX,0x10000 CMOVL EDX,EAX LEA RSI,[0x19e5b7] JMP 0x001334b8 LAB_0013342f: INC R12 LAB_00133432: MOVZX EAX,byte ptr [R12] ADD EAX,-0x3a CMP EAX,-0xa JNC 0x00133472 LEA RDX,[0x19e6bd] MOV RDI,RBX MOV RSI,R12 LAB_0013344c: CALL 0x0014c149 LAB_00133451: MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],0xffffffa8 LAB_0013345b: MOV EAX,0xffffffff LAB_00133460: ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00133472: DEC R12 LAB_00133475: MOVZX EAX,byte ptr [R12 + 0x1] INC R12 ADD EAX,-0x3a CMP EAX,-0xb JA 0x00133475 LAB_00133486: MOV dword ptr [RBX + 0x20],0xffffff80 MOV RDI,R15 XOR ESI,ESI CALL 0x0010e180 MOVSD qword ptr [RBX + 0x38],XMM0 MOV qword ptr [RBX + 0x40],0x7 MOV qword ptr [RBP + -0x30],R12 JMP 0x0013327e LAB_001334ad: MOVZX EDX,byte ptr [R15] LEA RSI,[0x19e595] LAB_001334b8: MOV RDI,RBX JMP 0x001332c6 LAB_001334c0: MOV RDI,qword ptr [RBX] CALL 0x0011bf85 MOV RAX,R15 JMP 0x0013325e
int8 json_next_token(long *param_1) { uint *puVar1; byte bVar2; byte bVar3; long lVar4; int iVar5; uint uVar6; char *pcVar7; long lVar8; byte *pbVar9; uint uVar10; byte *__nptr; byte *pbVar11; double dVar12; int1 auStack_3f0 [784]; int8 uStack_e0; byte local_d8; int7 uStack_d7; uint *local_50; long local_48; byte *local_40; byte *local_38; if (auStack_3f0 < *(int1 **)(*(long *)(*param_1 + 0x18) + 0xe8)) { uStack_e0 = 0x1330e3; JS_ThrowRangeError(*param_1,"Maximum call stack size exceeded"); return 0xffffffff; } puVar1 = (uint *)(param_1 + 4); uStack_e0 = 0x1330f7; free_token(param_1,puVar1); __nptr = (byte *)param_1[0xe]; param_1[0xc] = (long)__nptr; param_1[1] = *(long *)((long)param_1 + 0x24); iVar5 = (int)param_1[2]; LAB_00133120: *(int *)((long)param_1 + 0x24) = iVar5; *(int4 *)(param_1 + 5) = *(int4 *)((long)param_1 + 0x14); param_1[6] = (long)__nptr; bVar2 = *__nptr; uVar10 = (uint)bVar2; uVar6 = (uint)bVar2; pbVar11 = __nptr; local_50 = puVar1; local_38 = __nptr; switch(uVar10) { case 0: goto switchD_0013313f_caseD_0; default: if ((char)bVar2 < '\0') { uStack_e0 = 0x133402; uVar6 = utf8_decode(__nptr,&local_d8); if (__nptr + 1 == (byte *)CONCAT71(uStack_d7,local_d8)) { uVar10 = (uint)*__nptr; pcVar7 = "Unexpected token \'\\x%02x\' in JSON"; } else { uVar10 = (uVar6 >> 10) + 0xd7c0; if ((int)uVar6 < 0x10000) { uVar10 = uVar6; } pcVar7 = "Unexpected token \'\\u%04x\' in JSON"; } goto LAB_001332c6; } goto LAB_0013334f; case 9: case 0x20: goto switchD_0013313f_caseD_9; case 10: goto switchD_0013313f_caseD_a; case 0xb: case 0xc: case 0x27: case 0x2f: goto LAB_0013334f; case 0xd: if (__nptr[1] == 10) { __nptr = __nptr + 1; } switchD_0013313f_caseD_a: iVar5 = iVar5 + 1; *(int *)(param_1 + 2) = iVar5; param_1[0x10] = (long)__nptr; switchD_0013313f_caseD_9: __nptr = __nptr + 1; param_1[0x11] = (long)__nptr; goto LAB_00133120; case 0x22: local_38 = __nptr + 1; uStack_e0 = 0x1333b3; iVar5 = json_parse_string(param_1); if (iVar5 != 0) goto LAB_00133451; goto LAB_0013327e; case 0x24: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: case 0x58: case 0x59: case 0x5a: case 0x5f: case 0x61: case 0x62: case 99: case 100: case 0x65: case 0x66: case 0x67: case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: case 0x78: case 0x79: case 0x7a: pbVar11 = __nptr + 1; local_40 = &local_d8; local_48 = 0x80; bVar3 = __nptr[1]; uVar10 = (uint)(char)bVar3; lVar8 = 1; local_d8 = bVar2; local_38 = pbVar11; if (((char)bVar3 < '\0') || ((*(uint *)(lre_id_continue_table_ascii + (ulong)(bVar3 >> 5) * 4) >> (uVar10 & 0x1f) & 1) == 0)) goto LAB_00133236; lVar4 = 2; goto LAB_001331c9; case 0x2d: if (__nptr[1] - 0x3a < 0xfffffff6) { pcVar7 = "No number after minus sign"; goto LAB_0013344c; } break; case 0x30: if (0xfffffff5 < __nptr[1] - 0x3a) { pcVar7 = "Unexpected number"; goto LAB_0013344c; } break; case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: } if ((uVar6 == 0x2d) || (uVar6 == 0x2b)) { pbVar11 = __nptr + 1; } if (*pbVar11 - 0x3a < 0xfffffff6) { pcVar7 = "Unexpected token \'%c\'"; LAB_001332c6: uStack_e0 = 0x1332cd; js_parse_error(param_1,pcVar7,uVar10); goto LAB_00133451; } if ((*pbVar11 != 0x30) || (pbVar11[1] - 0x3a < 0xfffffff6)) goto LAB_001332e2; pcVar7 = "Unexpected number"; goto LAB_0013344c; while( true ) { local_40[lVar8 + -1] = (byte)uVar10; bVar2 = __nptr[lVar8]; uVar10 = (uint)(char)bVar2; if (((char)bVar2 < '\0') || (lVar4 = lVar8 + 1, (*(uint *)(lre_id_continue_table_ascii + (ulong)(bVar2 >> 5) * 4) >> (uVar10 & 0x1f) & 1) == 0)) break; LAB_001331c9: lVar8 = lVar4; if (local_48 - 4U <= lVar8 - 1U) { uStack_e0 = 0x133215; iVar5 = ident_realloc(*param_1,&local_40,&local_48,&local_d8); if (iVar5 != 0) { pbVar11 = __nptr + lVar8; iVar5 = 0; goto LAB_00133247; } } } pbVar11 = __nptr + lVar8; LAB_00133236: uStack_e0 = 0x133244; iVar5 = JS_NewAtomLen(*param_1,local_40,lVar8); LAB_00133247: if (local_40 != &local_d8) { uStack_e0 = 0x1334c8; js_free(*param_1); } if (iVar5 != 0) { *(int *)(param_1 + 7) = iVar5; *(int8 *)((long)param_1 + 0x3c) = 0; *(int4 *)(param_1 + 4) = 0xffffff83; local_38 = pbVar11; goto LAB_0013327e; } goto LAB_00133451; switchD_0013313f_caseD_0: if (__nptr < (byte *)param_1[0xf]) { LAB_0013334f: *puVar1 = uVar6; local_38 = __nptr + 1; } else { *puVar1 = 0xffffffaa; } goto LAB_0013327e; LAB_001332e2: do { pbVar9 = pbVar11; pbVar11 = pbVar9 + 1; } while (0xfffffff5 < *pbVar9 - 0x3a); if (*pbVar9 == 0x2e) { if (0xfffffff5 < *pbVar11 - 0x3a) { do { pbVar11 = pbVar9 + 1; pbVar9 = pbVar9 + 1; } while (0xfffffff5 < *pbVar11 - 0x3a); goto LAB_0013331d; } pcVar7 = "Unterminated fractional number"; LAB_0013344c: uStack_e0 = 0x133451; json_parse_error(param_1,pbVar11,pcVar7); LAB_00133451: *local_50 = 0xffffffa8; return 0xffffffff; } LAB_0013331d: if ((*pbVar9 | 0x20) == 0x65) { if ((pbVar9[1] == 0x2d) || (pbVar9[1] == 0x2b)) { pbVar11 = pbVar9 + 2; } else { pbVar11 = pbVar9 + 1; } if (*pbVar11 - 0x3a < 0xfffffff6) { pcVar7 = "Exponent part is missing a number"; goto LAB_0013344c; } pbVar9 = pbVar11 + -1; do { pbVar11 = pbVar9 + 1; pbVar9 = pbVar9 + 1; } while (0xfffffff5 < *pbVar11 - 0x3a); } *(int4 *)(param_1 + 4) = 0xffffff80; uStack_e0 = 0x133497; dVar12 = strtod((char *)__nptr,(char **)0x0); param_1[7] = (long)dVar12; param_1[8] = 7; local_38 = pbVar9; LAB_0013327e: *(int *)(param_1 + 5) = (int)param_1[0x11] - (int)param_1[0x10]; param_1[0xe] = (long)local_38; return 0; }
9,007
ma_set_share_data_file_length
eloqsql/storage/maria/ma_state.c
void _ma_set_share_data_file_length(MARIA_SHARE *share, ulonglong new_length) { if (!share->internal_table) mysql_mutex_lock(&share->intern_lock); if (share->state.state.data_file_length < new_length) { share->state.state.data_file_length= new_length; if (new_length >= share->base.max_data_file_length) { /* Give an error on next insert */ share->state.changed|= STATE_DATA_FILE_FULL; } } if (!share->internal_table) mysql_mutex_unlock(&share->intern_lock); }
O0
c
ma_set_share_data_file_length: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x7e2(%rax) jne 0x46df9 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0x115e4d(%rip), %rsi # 0x15cc3c movl $0x313, %edx # imm = 0x313 callq 0x45fc0 movq -0x8(%rbp), %rax movq 0x40(%rax), %rax cmpq -0x10(%rbp), %rax jae 0x46e3c movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x368(%rcx), %rax jb 0x46e3a movq -0x8(%rbp), %rax movl 0x170(%rax), %ecx orl $0x1000, %ecx # imm = 0x1000 movl %ecx, 0x170(%rax) jmp 0x46e3c movq -0x8(%rbp), %rax cmpb $0x0, 0x7e2(%rax) jne 0x46e59 movq -0x8(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x46030 addq $0x10, %rsp popq %rbp retq nop
_ma_set_share_data_file_length: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] cmp byte ptr [rax+7E2h], 0 jnz short loc_46DF9 mov rdi, [rbp+var_8] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_7; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 313h call inline_mysql_mutex_lock_5 loc_46DF9: mov rax, [rbp+var_8] mov rax, [rax+40h] cmp rax, [rbp+var_10] jnb short loc_46E3C mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+40h], rcx mov rax, [rbp+var_10] mov rcx, [rbp+var_8] cmp rax, [rcx+368h] jb short loc_46E3A mov rax, [rbp+var_8] mov ecx, [rax+170h] or ecx, 1000h mov [rax+170h], ecx loc_46E3A: jmp short $+2 loc_46E3C: mov rax, [rbp+var_8] cmp byte ptr [rax+7E2h], 0 jnz short loc_46E59 mov rdi, [rbp+var_8] add rdi, 8F0h call inline_mysql_mutex_unlock_5 loc_46E59: add rsp, 10h pop rbp retn
long long ma_set_share_data_file_length(long long a1, unsigned long long a2) { long long result; // rax if ( !*(_BYTE *)(a1 + 2018) ) inline_mysql_mutex_lock_5( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x313u); if ( *(_QWORD *)(a1 + 64) < a2 ) { *(_QWORD *)(a1 + 64) = a2; if ( a2 >= *(_QWORD *)(a1 + 872) ) *(_DWORD *)(a1 + 368) |= 0x1000u; } result = a1; if ( !*(_BYTE *)(a1 + 2018) ) return inline_mysql_mutex_unlock_5(a1 + 2288); return result; }
_ma_set_share_data_file_length: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x7e2],0x0 JNZ 0x00146df9 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 LEA RSI,[0x25cc3c] MOV EDX,0x313 CALL 0x00145fc0 LAB_00146df9: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x40] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00146e3c MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x368] JC 0x00146e3a MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x1000 MOV dword ptr [RAX + 0x170],ECX LAB_00146e3a: JMP 0x00146e3c LAB_00146e3c: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x7e2],0x0 JNZ 0x00146e59 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x8f0 CALL 0x00146030 LAB_00146e59: ADD RSP,0x10 POP RBP RET
void _ma_set_share_data_file_length(long param_1,ulong param_2) { if (*(char *)(param_1 + 0x7e2) == '\0') { inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x313); } if ((*(ulong *)(param_1 + 0x40) < param_2) && (*(ulong *)(param_1 + 0x40) = param_2, *(ulong *)(param_1 + 0x368) <= param_2)) { *(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 0x1000; } if (*(char *)(param_1 + 0x7e2) == '\0') { inline_mysql_mutex_unlock(param_1 + 0x8f0); } return; }
9,008
my_b_write
eloqsql/include/my_sys.h
static inline int my_b_write(IO_CACHE *info, const uchar *Buffer, size_t Count) { MEM_CHECK_DEFINED(Buffer, Count); if (info->write_pos + Count <= info->write_end) { if (Count) { memcpy(info->write_pos, Buffer, Count); info->write_pos+= Count; } return 0; } return _my_b_write(info, Buffer, Count); }
O0
c
my_b_write: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax addq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x48(%rcx), %rax ja 0x3d03f cmpq $0x0, -0x20(%rbp) je 0x3d036 movq -0x10(%rbp), %rax movq 0x40(%rax), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x2a2d0 movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x40(%rax), %rcx movq %rcx, 0x40(%rax) movl $0x0, -0x4(%rbp) jmp 0x3d053 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x889b0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
my_b_write: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+40h] add rax, [rbp+var_20] mov rcx, [rbp+var_10] cmp rax, [rcx+48h] ja short loc_3D03F cmp [rbp+var_20], 0 jz short loc_3D036 mov rax, [rbp+var_10] mov rdi, [rax+40h] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _memcpy mov rcx, [rbp+var_20] mov rax, [rbp+var_10] add rcx, [rax+40h] mov [rax+40h], rcx loc_3D036: mov [rbp+var_4], 0 jmp short loc_3D053 loc_3D03F: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _my_b_write mov [rbp+var_4], eax loc_3D053: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_b_write(long long a1, long long a2, long long a3) { if ( (unsigned long long)(a3 + *(_QWORD *)(a1 + 64)) > *(_QWORD *)(a1 + 72) ) { return (unsigned int)my_b_write(a1, a2, a3); } else { if ( a3 ) { memcpy(*(_QWORD *)(a1 + 64), a2, a3); *(_QWORD *)(a1 + 64) += a3; } return 0; } }
my_b_write: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] ADD RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x48] JA 0x0013d03f CMP qword ptr [RBP + -0x20],0x0 JZ 0x0013d036 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0012a2d0 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x40] MOV qword ptr [RAX + 0x40],RCX LAB_0013d036: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013d053 LAB_0013d03f: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001889b0 MOV dword ptr [RBP + -0x4],EAX LAB_0013d053: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_b_write(long param_1,void *param_2,size_t param_3) { int4 local_c; if (*(ulong *)(param_1 + 0x48) < *(long *)(param_1 + 0x40) + param_3) { local_c = _my_b_write(param_1,param_2,param_3); } else { if (param_3 != 0) { memcpy(*(void **)(param_1 + 0x40),param_2,param_3); *(size_t *)(param_1 + 0x40) = param_3 + *(long *)(param_1 + 0x40); } local_c = 0; } return local_c; }
9,009
mysql_store_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_store_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_store_result, (parms->mysql), parms->mysql, MYSQL_RES *, r_ptr) }
O3
c
mysql_store_result_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x480(%rdi), %rax movq 0x28(%rax), %rbx callq 0x2caf1 movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_store_result_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+480h] mov rbx, [rax+28h] call mysql_store_result mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_store_result_start_internal(long long *a1) { long long v1; // rdi long long v2; // rbx long long result; // rax v1 = *a1; v2 = *(_QWORD *)(*(_QWORD *)(v1 + 1152) + 40LL); result = mysql_store_result(v1); *(_QWORD *)(v2 + 8) = result; *(_DWORD *)v2 = 0; return result; }
mysql_store_result_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x0012caf1 MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_store_result_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_store_result(); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
9,010
ma_free_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void ma_free_root(MA_MEM_ROOT *root, myf MyFlags) { reg1 MA_USED_MEM *next,*old; if (!root) return; /* purecov: inspected */ if (!(MyFlags & MY_KEEP_PREALLOC)) root->pre_alloc=0; for ( next=root->used; next ;) { old=next; next= next->next ; if (old != root->pre_alloc) free(old); } for (next= root->free ; next ; ) { old=next; next= next->next ; if (old != root->pre_alloc) free(old); } root->used=root->free=0; if (root->pre_alloc) { root->free=root->pre_alloc; root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(MA_USED_MEM)); root->free->next=0; } }
O0
c
ma_free_root: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x24aab jmp 0x24b99 movl -0xc(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x24ac2 movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x24b01 movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x24aff movq -0x20(%rbp), %rdi callq 0x13520 jmp 0x24ace movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x24b3f movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax je 0x24b3d movq -0x20(%rbp), %rdi callq 0x13520 jmp 0x24b0c movq -0x8(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x24b99 movq -0x8(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rcx subq $0x18, %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq (%rax), %rax movq $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nop
ma_free_root: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi cmp [rbp+var_8], 0 jnz short loc_24AAB jmp loc_24B99 loc_24AAB: mov eax, [rbp+var_C] and eax, 1 cmp eax, 0 jnz short loc_24AC2 mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_24AC2: mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax loc_24ACE: cmp [rbp+var_18], 0 jz short loc_24B01 mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jz short loc_24AFF mov rdi, [rbp+var_20] call _free loc_24AFF: jmp short loc_24ACE loc_24B01: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax loc_24B0C: cmp [rbp+var_18], 0 jz short loc_24B3F mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jz short loc_24B3D mov rdi, [rbp+var_20] call _free loc_24B3D: jmp short loc_24B0C loc_24B3F: mov rax, [rbp+var_8] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_24B99 mov rax, [rbp+var_8] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax], rcx mov rax, [rbp+var_8] mov rax, [rax+10h] mov rcx, [rax+10h] sub rcx, 18h mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx mov rax, [rbp+var_8] mov rax, [rax] mov qword ptr [rax], 0 loc_24B99: add rsp, 20h pop rbp retn
_QWORD * ma_free_root(_QWORD *a1, char a2) { _QWORD *result; // rax _QWORD *v3; // [rsp+0h] [rbp-20h] _QWORD *v4; // [rsp+0h] [rbp-20h] _QWORD *v5; // [rsp+8h] [rbp-18h] _QWORD *v6; // [rsp+8h] [rbp-18h] if ( a1 ) { if ( (a2 & 1) == 0 ) a1[2] = 0LL; v5 = (_QWORD *)a1[1]; while ( v5 ) { v3 = v5; v5 = (_QWORD *)*v5; if ( v3 != (_QWORD *)a1[2] ) free(v3); } v6 = (_QWORD *)*a1; while ( v6 ) { v4 = v6; v6 = (_QWORD *)*v6; if ( v4 != (_QWORD *)a1[2] ) free(v4); } *a1 = 0LL; a1[1] = 0LL; result = a1; if ( a1[2] ) { *a1 = a1[2]; *(_QWORD *)(*a1 + 8LL) = *(_QWORD *)(a1[2] + 16LL) - 24LL; result = (_QWORD *)*a1; *(_QWORD *)*a1 = 0LL; } } return result; }
ma_free_root: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x00124aab JMP 0x00124b99 LAB_00124aab: MOV EAX,dword ptr [RBP + -0xc] AND EAX,0x1 CMP EAX,0x0 JNZ 0x00124ac2 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_00124ac2: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX LAB_00124ace: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00124b01 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JZ 0x00124aff MOV RDI,qword ptr [RBP + -0x20] CALL 0x00113520 LAB_00124aff: JMP 0x00124ace LAB_00124b01: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_00124b0c: CMP qword ptr [RBP + -0x18],0x0 JZ 0x00124b3f MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JZ 0x00124b3d MOV RDI,qword ptr [RBP + -0x20] CALL 0x00113520 LAB_00124b3d: JMP 0x00124b0c LAB_00124b3f: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00124b99 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RAX + 0x10] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],0x0 LAB_00124b99: ADD RSP,0x20 POP RBP RET
void ma_free_root(long *param_1,uint param_2) { int8 *puVar1; int8 *local_20; if (param_1 != (long *)0x0) { if ((param_2 & 1) == 0) { param_1[2] = 0; } puVar1 = (int8 *)param_1[1]; while (local_20 = puVar1, local_20 != (int8 *)0x0) { puVar1 = (int8 *)*local_20; if (local_20 != (int8 *)param_1[2]) { free(local_20); } } puVar1 = (int8 *)*param_1; while (local_20 = puVar1, local_20 != (int8 *)0x0) { puVar1 = (int8 *)*local_20; if (local_20 != (int8 *)param_1[2]) { free(local_20); } } *param_1 = 0; param_1[1] = 0; if (param_1[2] != 0) { *param_1 = param_1[2]; *(long *)(*param_1 + 8) = *(long *)(param_1[2] + 0x10) + -0x18; *(int8 *)*param_1 = 0; } } return; }
9,011
FTB_WORD_cmp_list
eloqsql/storage/myisam/ft_boolean_search.c
static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b) { /* ORDER BY word, ndepth */ int i= ha_compare_text(cs, (uchar*) (*a)->word + 1, (*a)->len - 1, (uchar*) (*b)->word + 1, (*b)->len - 1, 0); if (!i) i= CMP_NUM((*a)->ndepth, (*b)->ndepth); return i; }
O0
c
FTB_WORD_cmp_list: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movq (%rax), %rsi addq $0x4d, %rsi addq $0x1, %rsi movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x48(%rax), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %edx movq -0x18(%rbp), %rax movq (%rax), %rcx addq $0x4d, %rcx addq $0x1, %rcx movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x48(%rax), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %r8d xorl %r9d, %r9d callq 0xf0440 movl %eax, -0x1c(%rbp) cmpl $0x0, -0x1c(%rbp) jne 0x9e673 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x44(%rax), %eax movq -0x18(%rbp), %rcx movq (%rcx), %rcx cmpl 0x44(%rcx), %eax jae 0x9e64a movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, -0x20(%rbp) jmp 0x9e66d movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x44(%rax), %edx movq -0x18(%rbp), %rax movq (%rax), %rax movl 0x44(%rax), %esi movl $0x1, %eax xorl %ecx, %ecx cmpl %esi, %edx cmovel %ecx, %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
FTB_WORD_cmp_list: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov rax, [rbp+var_10] mov rsi, [rax] add rsi, 4Dh ; 'M' add rsi, 1 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+48h] sub eax, 1 mov eax, eax mov edx, eax mov rax, [rbp+var_18] mov rcx, [rax] add rcx, 4Dh ; 'M' add rcx, 1 mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax+48h] sub eax, 1 mov eax, eax mov r8d, eax xor r9d, r9d call ha_compare_text mov [rbp+var_1C], eax cmp [rbp+var_1C], 0 jnz short loc_9E673 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+44h] mov rcx, [rbp+var_18] mov rcx, [rcx] cmp eax, [rcx+44h] jnb short loc_9E64A mov eax, 0FFFFFFFFh mov [rbp+var_20], eax jmp short loc_9E66D loc_9E64A: mov rax, [rbp+var_10] mov rax, [rax] mov edx, [rax+44h] mov rax, [rbp+var_18] mov rax, [rax] mov esi, [rax+44h] mov eax, 1 xor ecx, ecx cmp edx, esi cmovz eax, ecx mov [rbp+var_20], eax loc_9E66D: mov eax, [rbp+var_20] mov [rbp+var_1C], eax loc_9E673: mov eax, [rbp+var_1C] add rsp, 20h pop rbp retn
long long FTB_WORD_cmp_list(long long a1, long long a2, long long a3) { unsigned int v5; // [rsp+4h] [rbp-1Ch] v5 = ha_compare_text( a1, *(_QWORD *)a2 + 78LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a2 + 72LL) - 1), *(_QWORD *)a3 + 78LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a3 + 72LL) - 1), 0LL); if ( !v5 ) { if ( *(_DWORD *)(*(_QWORD *)a2 + 68LL) >= *(_DWORD *)(*(_QWORD *)a3 + 68LL) ) return *(_DWORD *)(*(_QWORD *)a2 + 68LL) != *(_DWORD *)(*(_QWORD *)a3 + 68LL); else return (unsigned int)-1; } return v5; }
FTB_WORD_cmp_list: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX] ADD RSI,0x4d ADD RSI,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x48] SUB EAX,0x1 MOV EAX,EAX MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] ADD RCX,0x4d ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x48] SUB EAX,0x1 MOV EAX,EAX MOV R8D,EAX XOR R9D,R9D CALL 0x001f0440 MOV dword ptr [RBP + -0x1c],EAX CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x0019e673 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x44] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] CMP EAX,dword ptr [RCX + 0x44] JNC 0x0019e64a MOV EAX,0xffffffff MOV dword ptr [RBP + -0x20],EAX JMP 0x0019e66d LAB_0019e64a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EDX,dword ptr [RAX + 0x44] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV ESI,dword ptr [RAX + 0x44] MOV EAX,0x1 XOR ECX,ECX CMP EDX,ESI CMOVZ EAX,ECX MOV dword ptr [RBP + -0x20],EAX LAB_0019e66d: MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x1c],EAX LAB_0019e673: MOV EAX,dword ptr [RBP + -0x1c] ADD RSP,0x20 POP RBP RET
uint FTB_WORD_cmp_list(int8 param_1,long *param_2,long *param_3) { uint local_28; uint local_24; local_24 = ha_compare_text(param_1,*param_2 + 0x4e,*(int *)(*param_2 + 0x48) + -1,*param_3 + 0x4e, *(int *)(*param_3 + 0x48) + -1,0); if (local_24 == 0) { if (*(uint *)(*param_2 + 0x44) < *(uint *)(*param_3 + 0x44)) { local_28 = 0xffffffff; } else { local_28 = (uint)(*(int *)(*param_2 + 0x44) != *(int *)(*param_3 + 0x44)); } local_24 = local_28; } return local_24; }
9,012
FTB_WORD_cmp_list
eloqsql/storage/myisam/ft_boolean_search.c
static int FTB_WORD_cmp_list(CHARSET_INFO *cs, FTB_WORD **a, FTB_WORD **b) { /* ORDER BY word, ndepth */ int i= ha_compare_text(cs, (uchar*) (*a)->word + 1, (*a)->len - 1, (uchar*) (*b)->word + 1, (*b)->len - 1, 0); if (!i) i= CMP_NUM((*a)->ndepth, (*b)->ndepth); return i; }
O3
c
FTB_WORD_cmp_list: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r14 movq (%rsi), %rsi movl 0x48(%rsi), %edx addq $0x4e, %rsi decl %edx movq (%rbx), %rcx movl 0x48(%rcx), %r8d addq $0x4e, %rcx decl %r8d xorl %r9d, %r9d callq 0x9e790 testl %eax, %eax jne 0x71a76 movq (%r14), %rax movl 0x44(%rax), %eax movq (%rbx), %rcx xorl %edx, %edx cmpl 0x44(%rcx), %eax setne %dl movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovael %edx, %eax popq %rbx popq %r14 popq %rbp retq
FTB_WORD_cmp_list: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdx mov r14, rsi mov rsi, [rsi] mov edx, [rsi+48h] add rsi, 4Eh ; 'N' dec edx mov rcx, [rbx] mov r8d, [rcx+48h] add rcx, 4Eh ; 'N' dec r8d xor r9d, r9d call ha_compare_text test eax, eax jnz short loc_71A76 mov rax, [r14] mov eax, [rax+44h] mov rcx, [rbx] xor edx, edx cmp eax, [rcx+44h] setnz dl mov eax, 0FFFFFFFFh cmovnb eax, edx loc_71A76: pop rbx pop r14 pop rbp retn
long long FTB_WORD_cmp_list(long long a1, long long a2, long long a3) { long long result; // rax unsigned int v5; // eax bool v6; // cf BOOL v7; // edx result = ha_compare_text( a1, *(_QWORD *)a2 + 78LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a2 + 72LL) - 1), *(_QWORD *)a3 + 78LL, (unsigned int)(*(_DWORD *)(*(_QWORD *)a3 + 72LL) - 1), 0LL); if ( !(_DWORD)result ) { v5 = *(_DWORD *)(*(_QWORD *)a2 + 68LL); v6 = v5 < *(_DWORD *)(*(_QWORD *)a3 + 68LL); v7 = v5 != *(_DWORD *)(*(_QWORD *)a3 + 68LL); result = 0xFFFFFFFFLL; if ( !v6 ) return v7; } return result; }
FTB_WORD_cmp_list: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDX MOV R14,RSI MOV RSI,qword ptr [RSI] MOV EDX,dword ptr [RSI + 0x48] ADD RSI,0x4e DEC EDX MOV RCX,qword ptr [RBX] MOV R8D,dword ptr [RCX + 0x48] ADD RCX,0x4e DEC R8D XOR R9D,R9D CALL 0x0019e790 TEST EAX,EAX JNZ 0x00171a76 MOV RAX,qword ptr [R14] MOV EAX,dword ptr [RAX + 0x44] MOV RCX,qword ptr [RBX] XOR EDX,EDX CMP EAX,dword ptr [RCX + 0x44] SETNZ DL MOV EAX,0xffffffff CMOVNC EAX,EDX LAB_00171a76: POP RBX POP R14 POP RBP RET
ulong FTB_WORD_cmp_list(int8 param_1,long *param_2,long *param_3) { ulong uVar1; uVar1 = ha_compare_text(param_1,*param_2 + 0x4e,*(int *)(*param_2 + 0x48) + -1,*param_3 + 0x4e, *(int *)(*param_3 + 0x48) + -1,0); if ((int)uVar1 == 0) { uVar1 = 0xffffffff; if (*(uint *)(*param_3 + 0x44) <= *(uint *)(*param_2 + 0x44)) { uVar1 = (ulong)(*(uint *)(*param_2 + 0x44) != *(uint *)(*param_3 + 0x44)); } } return uVar1; }
9,013
testing::internal::DeathTestThreadWarning[abi:cxx11](unsigned long)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
static std::string DeathTestThreadWarning(size_t thread_count) { Message msg; msg << "Death tests use fork(), which is unsafe particularly" << " in a threaded context. For this test, " << GTEST_NAME_ << " "; if (thread_count == 0) { msg << "couldn't detect the number of threads."; } else { msg << "detected " << thread_count << " threads."; } msg << " See " "https://github.com/google/googletest/blob/main/docs/" "advanced.md#death-tests-and-threads" << " for more explanation and suggested solutions, especially if" << " this is the last message you see before your test times out."; return msg.GetString(); }
O0
cpp
testing::internal::DeathTestThreadWarning[abi:cxx11](unsigned long): subq $0x78, %rsp movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) leaq 0x60(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0x22e80 movq 0x40(%rsp), %rdi leaq 0x5fab9(%rip), %rsi # 0x75aaf callq 0x50ae0 movq %rax, 0x48(%rsp) jmp 0x16002 movq 0x48(%rsp), %rdi leaq 0x5fad6(%rip), %rsi # 0x75ae4 callq 0x50b20 movq %rax, 0x28(%rsp) jmp 0x1601a movq 0x28(%rsp), %rdi leaq 0x5f0bb(%rip), %rsi # 0x750e1 callq 0x11690 movq %rax, 0x20(%rsp) jmp 0x16032 movq 0x20(%rsp), %rdi leaq 0x5ea26(%rip), %rsi # 0x74a64 callq 0x454a0 jmp 0x16045 cmpq $0x0, 0x68(%rsp) jne 0x1607f leaq 0x5fab8(%rip), %rsi # 0x75b0c leaq 0x60(%rsp), %rdi callq 0x4ae60 jmp 0x16060 jmp 0x160c2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x60(%rsp), %rdi callq 0xee50 jmp 0x16128 leaq 0x5faad(%rip), %rsi # 0x75b33 leaq 0x60(%rsp), %rdi callq 0x47210 movq %rax, 0x18(%rsp) jmp 0x16097 movq 0x18(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0x50b60 movq %rax, 0x10(%rsp) jmp 0x160ad movq 0x10(%rsp), %rdi leaq 0x5fa70(%rip), %rsi # 0x75b29 callq 0x47210 jmp 0x160c0 jmp 0x160c2 leaq 0x5fa74(%rip), %rsi # 0x75b3d leaq 0x60(%rsp), %rdi callq 0x50ba0 movq %rax, 0x8(%rsp) jmp 0x160da movq 0x8(%rsp), %rdi leaq 0x5fab4(%rip), %rsi # 0x75b9a callq 0x50be0 movq %rax, (%rsp) jmp 0x160f1 movq (%rsp), %rdi leaq 0x5fadb(%rip), %rsi # 0x75bd7 callq 0x4aea0 jmp 0x16103 movq 0x30(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x14e90 jmp 0x16114 leaq 0x60(%rsp), %rdi callq 0xee50 movq 0x38(%rsp), %rax addq $0x78, %rsp retq movq 0x58(%rsp), %rdi callq 0xb910 nopw %cs:(%rax,%rax)
_ZN7testing8internalL22DeathTestThreadWarningB5cxx11Em: sub rsp, 78h mov qword ptr [rsp+78h+var_48], rdi mov rax, rdi mov [rsp+78h+var_40], rax mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi lea rdi, [rsp+78h+var_18]; this mov [rsp+78h+var_38], rdi call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rdi, [rsp+78h+var_38] lea rsi, aDeathTestsUseF; "Death tests use fork(), which is unsafe"... call _ZN7testing7MessagelsIA53_cEERS0_RKT_; testing::Message::operator<<<char [53]>(char [53] const&) mov [rsp+78h+var_30], rax jmp short $+2 loc_16002: mov rdi, [rsp+78h+var_30] lea rsi, aInAThreadedCon; " in a threaded context. For this test, " call _ZN7testing7MessagelsIA40_cEERS0_RKT_; testing::Message::operator<<<char [40]>(char [40] const&) mov [rsp+78h+var_50], rax jmp short $+2 loc_1601A: mov rdi, [rsp+78h+var_50] lea rsi, aGoogleTest; "Google Test" call _ZN7testing7MessagelsIA12_cEERS0_RKT_; testing::Message::operator<<<char [12]>(char [12] const&) mov [rsp+78h+var_58], rax jmp short $+2 loc_16032: mov rdi, [rsp+78h+var_58] lea rsi, asc_74A62+2; " " call _ZN7testing7MessagelsIA2_cEERS0_RKT_; testing::Message::operator<<<char [2]>(char [2] const&) jmp short $+2 loc_16045: cmp [rsp+78h+var_10], 0 jnz short loc_1607F lea rsi, aCouldnTDetectT; "couldn't detect the number of threads." lea rdi, [rsp+78h+var_18] call _ZN7testing7MessagelsIA39_cEERS0_RKT_; testing::Message::operator<<<char [39]>(char [39] const&) jmp short $+2 loc_16060: jmp short loc_160C2 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_58]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() jmp loc_16128 loc_1607F: lea rsi, aDetected; "detected " lea rdi, [rsp+78h+var_18] call _ZN7testing7MessagelsIA10_cEERS0_RKT_; testing::Message::operator<<<char [10]>(char [10] const&) mov [rsp+78h+var_60], rax jmp short $+2 loc_16097: mov rdi, [rsp+78h+var_60] lea rsi, [rsp+78h+var_10] call _ZN7testing7MessagelsImEERS0_RKT_; testing::Message::operator<<<ulong>(ulong const&) mov [rsp+78h+var_68], rax jmp short $+2 loc_160AD: mov rdi, [rsp+78h+var_68] lea rsi, aCouldnTDetectT+1Dh; " threads." call _ZN7testing7MessagelsIA10_cEERS0_RKT_; testing::Message::operator<<<char [10]>(char [10] const&) jmp short $+2 loc_160C0: jmp short $+2 loc_160C2: lea rsi, aSeeHttpsGithub; " See https://github.com/google/googlete"... lea rdi, [rsp+78h+var_18] call _ZN7testing7MessagelsIA93_cEERS0_RKT_; testing::Message::operator<<<char [93]>(char [93] const&) mov [rsp+78h+var_70], rax jmp short $+2 loc_160DA: mov rdi, [rsp+78h+var_70] lea rsi, aForMoreExplana; " for more explanation and suggested sol"... call _ZN7testing7MessagelsIA61_cEERS0_RKT_; testing::Message::operator<<<char [61]>(char [61] const&) mov [rsp+78h+var_78], rax jmp short $+2 loc_160F1: mov rdi, [rsp+78h+var_78] lea rsi, aThisIsTheLastM; " this is the last message you see befor"... call _ZN7testing7MessagelsIA62_cEERS0_RKT_; testing::Message::operator<<<char [62]>(char [62] const&) jmp short $+2 loc_16103: mov rdi, qword ptr [rsp+78h+var_48]; int lea rsi, [rsp+78h+var_18]; int call _ZNK7testing7Message9GetStringB5cxx11Ev; testing::Message::GetString(void) jmp short $+2 loc_16114: lea rdi, [rsp+78h+var_18]; this call _ZN7testing7MessageD2Ev; testing::Message::~Message() mov rax, [rsp+78h+var_40] add rsp, 78h retn loc_16128: mov rdi, [rsp+arg_50] call __Unwind_Resume
long long testing::internal::DeathTestThreadWarning[abi:cxx11](long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-78h] long long v4; // [rsp+8h] [rbp-70h] long long v5; // [rsp+10h] [rbp-68h] long long v6; // [rsp+18h] [rbp-60h] long long v7; // [rsp+20h] [rbp-58h] long long v8; // [rsp+28h] [rbp-50h] long long v9; // [rsp+48h] [rbp-30h] int v10; // [rsp+60h] [rbp-18h] BYREF _QWORD v11[2]; // [rsp+68h] [rbp-10h] BYREF v11[1] = a1; v11[0] = a2; testing::Message::Message((testing::Message *)&v10); v9 = testing::Message::operator<<<char [53]>(&v10, "Death tests use fork(), which is unsafe particularly"); v8 = testing::Message::operator<<<char [40]>(v9, " in a threaded context. For this test, "); v7 = testing::Message::operator<<<char [12]>(v8, (long long)"Google Test"); testing::Message::operator<<<char [2]>(v7, " "); if ( v11[0] ) { v6 = testing::Message::operator<<<char [10]>(&v10, "detected "); v5 = testing::Message::operator<<<unsigned long>(v6, v11); testing::Message::operator<<<char [10]>(v5, " threads."); } else { testing::Message::operator<<<char [39]>(&v10, "couldn't detect the number of threads."); } v4 = testing::Message::operator<<<char [93]>( &v10, " See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads"); v3 = testing::Message::operator<<<char [61]>(v4, " for more explanation and suggested solutions, especially if"); testing::Message::operator<<<char [62]>(v3, " this is the last message you see before your test times out."); testing::Message::GetString[abi:cxx11](a1, (int)&v10); testing::Message::~Message((testing::Message *)&v10); return a1; }
DeathTestThreadWarning[abi:cxx11]: SUB RSP,0x78 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI LEA RDI,[RSP + 0x60] MOV qword ptr [RSP + 0x40],RDI CALL 0x00122e80 MOV RDI,qword ptr [RSP + 0x40] LAB_00115fef: LEA RSI,[0x175aaf] CALL 0x00150ae0 MOV qword ptr [RSP + 0x48],RAX JMP 0x00116002 LAB_00116002: MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[0x175ae4] CALL 0x00150b20 MOV qword ptr [RSP + 0x28],RAX JMP 0x0011601a LAB_0011601a: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[0x1750e1] CALL 0x00111690 MOV qword ptr [RSP + 0x20],RAX JMP 0x00116032 LAB_00116032: MOV RDI,qword ptr [RSP + 0x20] LEA RSI,[0x174a64] CALL 0x001454a0 JMP 0x00116045 LAB_00116045: CMP qword ptr [RSP + 0x68],0x0 JNZ 0x0011607f LEA RSI,[0x175b0c] LEA RDI,[RSP + 0x60] CALL 0x0014ae60 JMP 0x00116060 LAB_00116060: JMP 0x001160c2 LAB_0011607f: LEA RSI,[0x175b33] LEA RDI,[RSP + 0x60] CALL 0x00147210 MOV qword ptr [RSP + 0x18],RAX JMP 0x00116097 LAB_00116097: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x68] CALL 0x00150b60 MOV qword ptr [RSP + 0x10],RAX JMP 0x001160ad LAB_001160ad: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[0x175b29] CALL 0x00147210 JMP 0x001160c0 LAB_001160c0: JMP 0x001160c2 LAB_001160c2: LEA RSI,[0x175b3d] LEA RDI,[RSP + 0x60] CALL 0x00150ba0 MOV qword ptr [RSP + 0x8],RAX JMP 0x001160da LAB_001160da: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[0x175b9a] CALL 0x00150be0 MOV qword ptr [RSP],RAX JMP 0x001160f1 LAB_001160f1: MOV RDI,qword ptr [RSP] LEA RSI,[0x175bd7] CALL 0x0014aea0 JMP 0x00116103 LAB_00116103: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x60] CALL 0x00114e90 LAB_00116112: JMP 0x00116114 LAB_00116114: LEA RDI,[RSP + 0x60] CALL 0x0010ee50 MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x78 RET
/* testing::internal::DeathTestThreadWarning[abi:cxx11](unsigned long) */ internal * __thiscall testing::internal::DeathTestThreadWarning_abi_cxx11_(internal *this,ulong param_1) { Message *pMVar1; Message local_18 [8]; ulong local_10; internal *local_8; local_10 = param_1; local_8 = this; Message::Message(local_18); /* try { // try from 00115fef to 00116111 has its CatchHandler @ 00116062 */ pMVar1 = Message::operator<<(local_18,"Death tests use fork(), which is unsafe particularly"); pMVar1 = Message::operator<<(pMVar1," in a threaded context. For this test, "); pMVar1 = Message::operator<<(pMVar1,"Google Test"); Message::operator<<(pMVar1," "); if (local_10 == 0) { Message::operator<<(local_18,"couldn\'t detect the number of threads."); } else { pMVar1 = Message::operator<<(local_18,"detected "); pMVar1 = Message::operator<<(pMVar1,&local_10); Message::operator<<(pMVar1," threads."); } pMVar1 = Message::operator<<(local_18, " See https://github.com/google/googletest/blob/main/docs/advanced.md#death-tests-and-threads" ); pMVar1 = Message::operator<<(pMVar1," for more explanation and suggested solutions, especially if" ); Message::operator<<(pMVar1," this is the last message you see before your test times out."); Message::GetString_abi_cxx11_(); Message::~Message(local_18); return this; }
9,014
translog_put_LSN_diff
eloqsql/storage/maria/ma_loghandler.c
static uchar *translog_put_LSN_diff(LSN base_lsn, LSN lsn, uchar *dst) { uint64 diff; DBUG_ENTER("translog_put_LSN_diff"); DBUG_PRINT("enter", ("Base: " LSN_FMT " val: " LSN_FMT " dst: %p", LSN_IN_PARTS(base_lsn), LSN_IN_PARTS(lsn), dst)); DBUG_ASSERT(base_lsn > lsn); diff= base_lsn - lsn; DBUG_PRINT("info", ("Diff: 0x%llx", (ulonglong) diff)); if (diff <= 0x3FFF) { dst-= 2; /* Note we store this high uchar first to ensure that first uchar has 0 in the 3 upper bits. */ dst[0]= (uchar)(diff >> 8); dst[1]= (uchar)(diff & 0xFF); } else if (diff <= 0x3FFFFFL) { dst-= 3; dst[0]= (uchar)(0x40 | (diff >> 16)); int2store(dst + 1, diff & 0xFFFF); } else if (diff <= 0x3FFFFFFFL) { dst-= 4; dst[0]= (uchar)(0x80 | (diff >> 24)); int3store(dst + 1, diff & 0xFFFFFFL); } else if (diff <= 0x3FFFFFFFFFLL) { dst-= 5; dst[0]= (uchar)(0xC0 | (diff >> 32)); int4store(dst + 1, diff & 0xFFFFFFFFL); } else { /* It is full LSN after special 1 diff (which is impossible in real life) */ dst-= 2 + LSN_STORE_SIZE; dst[0]= 0; dst[1]= 1; lsn_store(dst + 2, lsn); } DBUG_PRINT("info", ("new dst: %p", dst)); DBUG_RETURN(dst); }
O0
c
translog_put_LSN_diff: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x39172 jmp 0x39174 jmp 0x39176 movq -0x8(%rbp), %rax subq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0x39184 cmpq $0x3fff, -0x20(%rbp) # imm = 0x3FFF ja 0x391c2 movq -0x18(%rbp), %rax addq $-0x2, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x1(%rax) jmp 0x39363 cmpq $0x3fffff, -0x20(%rbp) # imm = 0x3FFFFF ja 0x39211 movq -0x18(%rbp), %rax addq $-0x3, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax shrq $0x10, %rax orq $0x40, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax andq $0xffff, %rax # imm = 0xFFFF movw %ax, %cx movq -0x28(%rbp), %rax movw %cx, (%rax) jmp 0x39361 cmpq $0x3fffffff, -0x20(%rbp) # imm = 0x3FFFFFFF ja 0x39282 movq -0x18(%rbp), %rax addq $-0x4, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax shrq $0x18, %rax orq $0x80, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x20(%rbp), %rax andq $0xffffff, %rax # imm = 0xFFFFFF movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x1(%rax) movq -0x20(%rbp), %rax andq $0xffffff, %rax # imm = 0xFFFFFF shrl $0x8, %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x2(%rax) movq -0x20(%rbp), %rax andq $0xffffff, %rax # imm = 0xFFFFFF shrq $0x10, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x3(%rax) jmp 0x3935f movabsq $0x3fffffffff, %rax # imm = 0x3FFFFFFFFF cmpq %rax, -0x20(%rbp) ja 0x392db movq -0x18(%rbp), %rax addq $-0x5, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax shrq $0x20, %rax orq $0xc0, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x20(%rbp), %rax movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, (%rax) jmp 0x3935d movq -0x18(%rbp), %rax addq $-0x9, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x18(%rbp), %rax movb $0x1, 0x1(%rax) jmp 0x392f8 movq -0x10(%rbp), %rax sarq $0x20, %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x2(%rax) movq -0x10(%rbp), %rax sarq $0x20, %rax shrl $0x8, %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x3(%rax) movq -0x10(%rbp), %rax sarq $0x20, %rax shrl $0x10, %eax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, 0x4(%rax) jmp 0x39333 movq -0x18(%rbp), %rax addq $0x2, %rax addq $0x3, %rax movq %rax, -0x38(%rbp) movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x10(%rbp), %rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) jmp 0x3935b jmp 0x3935d jmp 0x3935f jmp 0x39361 jmp 0x39363 jmp 0x39365 jmp 0x39367 jmp 0x39369 movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
translog_put_LSN_diff: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_39172: jmp short $+2 loc_39174: jmp short $+2 loc_39176: mov rax, [rbp+var_8] sub rax, [rbp+var_10] mov [rbp+var_20], rax jmp short $+2 loc_39184: cmp [rbp+var_20], 3FFFh ja short loc_391C2 mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_18], rax mov rax, [rbp+var_20] shr rax, 8 mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_20] and rax, 0FFh mov cl, al mov rax, [rbp+var_18] mov [rax+1], cl jmp loc_39363 loc_391C2: cmp [rbp+var_20], offset unk_3FFFFF ja short loc_39211 mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFDh mov [rbp+var_18], rax mov rax, [rbp+var_20] shr rax, 10h or rax, 40h mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_28], rax mov rax, [rbp+var_20] and rax, 0FFFFh mov cx, ax mov rax, [rbp+var_28] mov [rax], cx jmp loc_39361 loc_39211: cmp [rbp+var_20], 3FFFFFFFh ja short loc_39282 mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_18], rax mov rax, [rbp+var_20] shr rax, 18h or rax, 80h mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_20] and rax, 0FFFFFFh mov cl, al mov rax, [rbp+var_18] mov [rax+1], cl mov rax, [rbp+var_20] and rax, 0FFFFFFh shr eax, 8 mov cl, al mov rax, [rbp+var_18] mov [rax+2], cl mov rax, [rbp+var_20] and rax, 0FFFFFFh shr rax, 10h mov cl, al mov rax, [rbp+var_18] mov [rax+3], cl jmp loc_3935F loc_39282: mov rax, 3FFFFFFFFFh cmp [rbp+var_20], rax ja short loc_392DB mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFBh mov [rbp+var_18], rax mov rax, [rbp+var_20] shr rax, 20h or rax, 0C0h mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_30], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_20] mov ecx, eax mov rax, [rbp+var_30] mov [rax], ecx jmp loc_3935D loc_392DB: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFF7h mov [rbp+var_18], rax mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov rax, [rbp+var_18] mov byte ptr [rax+1], 1 jmp short $+2 loc_392F8: mov rax, [rbp+var_10] sar rax, 20h mov cl, al mov rax, [rbp+var_18] mov [rax+2], cl mov rax, [rbp+var_10] sar rax, 20h shr eax, 8 mov cl, al mov rax, [rbp+var_18] mov [rax+3], cl mov rax, [rbp+var_10] sar rax, 20h shr eax, 10h mov cl, al mov rax, [rbp+var_18] mov [rax+4], cl jmp short $+2 loc_39333: mov rax, [rbp+var_18] add rax, 2 add rax, 3 mov [rbp+var_38], rax mov rax, 0FFFFFFFFh and rax, [rbp+var_10] mov ecx, eax mov rax, [rbp+var_38] mov [rax], ecx jmp short $+2 loc_3935B: jmp short $+2 loc_3935D: jmp short $+2 loc_3935F: jmp short $+2 loc_39361: jmp short $+2 loc_39363: jmp short $+2 loc_39365: jmp short $+2 loc_39367: jmp short $+2 loc_39369: mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_40] pop rbp retn
long long translog_put_LSN_diff(long long a1, long long a2, long long a3) { unsigned long long v4; // [rsp+20h] [rbp-20h] long long v5; // [rsp+28h] [rbp-18h] v4 = a1 - a2; if ( (unsigned long long)(a1 - a2) > 0x3FFF ) { if ( v4 > (unsigned long long)&unk_3FFFFF ) { if ( v4 > 0x3FFFFFFF ) { if ( v4 > 0x3FFFFFFFFFLL ) { v5 = a3 - 9; *(_BYTE *)v5 = 0; *(_BYTE *)(v5 + 1) = 1; *(_WORD *)(v5 + 2) = WORD2(a2); *(_BYTE *)(v5 + 4) = BYTE6(a2); *(_DWORD *)(v5 + 5) = a2; } else { v5 = a3 - 5; *(_BYTE *)v5 = BYTE4(v4) | 0xC0; *(_DWORD *)(v5 + 1) = v4; } } else { v5 = a3 - 4; *(_BYTE *)v5 = ((unsigned int)(a1 - a2) >> 24) | 0x80; *(_WORD *)(v5 + 1) = v4; *(_BYTE *)(v5 + 3) = (v4 & 0xFFFFFF) >> 16; } } else { v5 = a3 - 3; *(_BYTE *)v5 = BYTE2(v4) | 0x40; *(_WORD *)(v5 + 1) = v4; } } else { v5 = a3 - 2; *(_BYTE *)v5 = BYTE1(v4); *(_BYTE *)(v5 + 1) = v4; } return v5; }
translog_put_LSN_diff: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x00139172 LAB_00139172: JMP 0x00139174 LAB_00139174: JMP 0x00139176 LAB_00139176: MOV RAX,qword ptr [RBP + -0x8] SUB RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX JMP 0x00139184 LAB_00139184: CMP qword ptr [RBP + -0x20],0x3fff JA 0x001391c2 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x2 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x1],CL JMP 0x00139363 LAB_001391c2: CMP qword ptr [RBP + -0x20],0x3fffff JA 0x00139211 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x3 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x10 OR RAX,0x40 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xffff MOV CX,AX MOV RAX,qword ptr [RBP + -0x28] MOV word ptr [RAX],CX JMP 0x00139361 LAB_00139211: CMP qword ptr [RBP + -0x20],0x3fffffff JA 0x00139282 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x4 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x18 OR RAX,0x80 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xffffff MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xffffff SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x20] AND RAX,0xffffff SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x3],CL JMP 0x0013935f LAB_00139282: MOV RAX,0x3fffffffff CMP qword ptr [RBP + -0x20],RAX JA 0x001392db MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x5 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] SHR RAX,0x20 OR RAX,0xc0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x20] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],ECX JMP 0x0013935d LAB_001392db: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x9 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x1],0x1 JMP 0x001392f8 LAB_001392f8: MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x10] SAR RAX,0x20 SHR EAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x4],CL JMP 0x00139333 LAB_00139333: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 ADD RAX,0x3 MOV qword ptr [RBP + -0x38],RAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x10] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX JMP 0x0013935b LAB_0013935b: JMP 0x0013935d LAB_0013935d: JMP 0x0013935f LAB_0013935f: JMP 0x00139361 LAB_00139361: JMP 0x00139363 LAB_00139363: JMP 0x00139365 LAB_00139365: JMP 0x00139367 LAB_00139367: JMP 0x00139369 LAB_00139369: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] POP RBP RET
byte * translog_put_LSN_diff(long param_1,long param_2,long param_3) { byte bVar1; byte bVar2; ulong uVar3; int8 local_20; uVar3 = param_1 - param_2; bVar1 = (byte)(uVar3 >> 8); if (uVar3 < 0x4000) { local_20 = (byte *)(param_3 + -2); *local_20 = bVar1; *(char *)(param_3 + -1) = (char)uVar3; } else { bVar2 = (byte)(uVar3 >> 0x10); if (uVar3 < 0x400000) { local_20 = (byte *)(param_3 + -3); *local_20 = bVar2 | 0x40; *(short *)(param_3 + -2) = (short)uVar3; } else if (uVar3 < 0x40000000) { local_20 = (byte *)(param_3 + -4); *local_20 = (byte)(uVar3 >> 0x18) | 0x80; *(char *)(param_3 + -3) = (char)uVar3; *(byte *)(param_3 + -2) = bVar1; *(byte *)(param_3 + -1) = bVar2; } else if (uVar3 < 0x4000000000) { local_20 = (byte *)(param_3 + -5); *local_20 = (byte)(uVar3 >> 0x20) | 0xc0; *(int *)(param_3 + -4) = (int)uVar3; } else { local_20 = (byte *)(param_3 + -9); *local_20 = 0; *(int1 *)(param_3 + -8) = 1; *(char *)(param_3 + -7) = (char)((ulong)param_2 >> 0x20); *(char *)(param_3 + -6) = (char)((ulong)param_2 >> 0x28); *(char *)(param_3 + -5) = (char)((ulong)param_2 >> 0x30); *(int *)(param_3 + -4) = (int)param_2; } } return local_20; }
9,015
select_keccakf1600_implementation
corpus-core[P]colibri-stateless/build_O1/_deps/ethhash_external-src/lib/keccak/keccak.c
__attribute__((constructor)) static void select_keccakf1600_implementation(void) { // Init CPU information. // This is needed on macOS because of the bug: https://bugs.llvm.org/show_bug.cgi?id=48459. __builtin_cpu_init(); // Check if both BMI and BMI2 are supported. Some CPUs like Intel E5-2697 v2 incorrectly // report BMI2 but not BMI being available. if (__builtin_cpu_supports("bmi") && __builtin_cpu_supports("bmi2")) keccakf1600_best = keccakf1600_bmi; }
O1
c
select_keccakf1600_implementation: pushq %rax callq 0x23890 movl 0x70d80(%rip), %eax # 0xc586c notl %eax testl $0x30000, %eax # imm = 0x30000 jne 0x54b03 leaq 0x9(%rip), %rax # 0x54b05 movq %rax, 0x707d5(%rip) # 0xc52d8 popq %rax retq
select_keccakf1600_implementation: push rax call __cpu_indicator_init mov eax, cs:dword_C586C not eax test eax, 30000h jnz short loc_54B03 lea rax, keccakf1600_bmi mov cs:keccakf1600_best, rax loc_54B03: pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> select_keccakf1600_implementation(long long a1, long long a2) { _cpu_indicator_init(a1, a2); if ( (~dword_C586C & 0x30000) == 0 ) keccakf1600_best = keccakf1600_bmi; }
select_keccakf1600_implementation: PUSH RAX CALL 0x00123890 MOV EAX,dword ptr [0x001c586c] NOT EAX TEST EAX,0x30000 JNZ 0x00154b03 LEA RAX,[0x154b05] MOV qword ptr [0x001c52d8],RAX LAB_00154b03: POP RAX RET
int8 select_keccakf1600_implementation(void) { int8 in_RAX; __cpu_indicator_init(); if ((~DAT_001c586c & 0x30000) == 0) { keccakf1600_best = keccakf1600_bmi; } return in_RAX; }
9,016
ma_set_uuid
eloqsql/storage/maria/ma_locking.c
my_bool _ma_set_uuid(MARIA_SHARE *share, my_bool reset_uuid) { uchar buff[MY_UUID_SIZE], *uuid; uuid= maria_uuid; if (reset_uuid) { bzero(buff, sizeof(buff)); uuid= buff; } CRASH_IF_S3_TABLE(share); return (my_bool) my_pwrite(share->kfile.file, uuid, MY_UUID_SIZE, mi_uint2korr(share->state.header.base_pos), MYF(MY_NABP)); }
O0
c
ma_set_uuid: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %sil, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x28(%rbp) movb %al, -0x29(%rbp) leaq 0x40554a(%rip), %rax # 0x4406e0 movq %rax, -0x38(%rbp) cmpb $0x0, -0x29(%rbp) je 0x3b1b8 leaq -0x20(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0x27310 leaq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x3b1ba jmp 0x3b1bc movq -0x28(%rbp), %rax movl 0x760(%rax), %edi movq -0x38(%rbp), %rsi movw 0xc(%rax), %ax rolw $0x8, %ax movzwl %ax, %eax movl %eax, %ecx movl $0x10, %edx movl $0x4, %r8d callq 0xbf550 movb %al, -0x39(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x3b205 movb -0x39(%rbp), %al addq $0x40, %rsp popq %rbp retq callq 0x272b0 nopw (%rax,%rax)
_ma_set_uuid: push rbp mov rbp, rsp sub rsp, 40h mov al, sil mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_28], rdi mov [rbp+var_29], al lea rax, maria_uuid mov [rbp+var_38], rax cmp [rbp+var_29], 0 jz short loc_3B1B8 lea rdi, [rbp+var_20] xor esi, esi mov edx, 10h call _memset lea rax, [rbp+var_20] mov [rbp+var_38], rax loc_3B1B8: jmp short $+2 loc_3B1BA: jmp short $+2 loc_3B1BC: mov rax, [rbp+var_28] mov edi, [rax+760h] mov rsi, [rbp+var_38] mov ax, [rax+0Ch] rol ax, 8 movzx eax, ax mov ecx, eax mov edx, 10h mov r8d, 4 call my_pwrite mov [rbp+var_39], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_3B205 mov al, [rbp+var_39] add rsp, 40h pop rbp retn loc_3B205: call ___stack_chk_fail
char ma_set_uuid(long long a1, char a2) { _BYTE *v3; // [rsp+8h] [rbp-38h] _BYTE v4[24]; // [rsp+20h] [rbp-20h] BYREF unsigned long long v5; // [rsp+38h] [rbp-8h] v5 = __readfsqword(0x28u); v3 = &maria_uuid; if ( a2 ) { memset(v4, 0LL, 16LL); v3 = v4; } return my_pwrite(*(unsigned int *)(a1 + 1888), v3, 16LL, (unsigned __int16)__ROL2__(*(_WORD *)(a1 + 12), 8), 4LL); }
_ma_set_uuid: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,SIL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x28],RDI MOV byte ptr [RBP + -0x29],AL LEA RAX,[0x5406e0] MOV qword ptr [RBP + -0x38],RAX CMP byte ptr [RBP + -0x29],0x0 JZ 0x0013b1b8 LEA RDI,[RBP + -0x20] XOR ESI,ESI MOV EDX,0x10 CALL 0x00127310 LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX LAB_0013b1b8: JMP 0x0013b1ba LAB_0013b1ba: JMP 0x0013b1bc LAB_0013b1bc: MOV RAX,qword ptr [RBP + -0x28] MOV EDI,dword ptr [RAX + 0x760] MOV RSI,qword ptr [RBP + -0x38] MOV AX,word ptr [RAX + 0xc] ROL AX,0x8 MOVZX EAX,AX MOV ECX,EAX MOV EDX,0x10 MOV R8D,0x4 CALL 0x001bf550 MOV byte ptr [RBP + -0x39],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0013b205 MOV AL,byte ptr [RBP + -0x39] ADD RSP,0x40 POP RBP RET LAB_0013b205: CALL 0x001272b0
int8 _ma_set_uuid(long param_1,char param_2) { int1 uVar1; long in_FS_OFFSET; int8 *local_40; int8 local_28 [3]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_40 = &maria_uuid; if (param_2 != '\0') { memset(local_28,0,0x10); local_40 = local_28; } uVar1 = my_pwrite(*(int4 *)(param_1 + 0x760),local_40,0x10, *(ushort *)(param_1 + 0xc) << 8 | *(ushort *)(param_1 + 0xc) >> 8,4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),uVar1); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
9,017
sp_get_geometry_mbr
eloqsql/storage/maria/ma_sp_key.c
static int sp_get_geometry_mbr(uchar *(*wkb), uchar *end, uint n_dims, double *mbr, int top) { int res; uchar byte_order; uint wkb_type; byte_order = *(*wkb); ++(*wkb); wkb_type = uint4korr((*wkb)); (*wkb) += 4; switch ((enum wkbType) wkb_type) { case wkbPoint: res = sp_get_point_mbr(wkb, end, n_dims, byte_order, mbr); break; case wkbLineString: res = sp_get_linestring_mbr(wkb, end, n_dims, byte_order, mbr); break; case wkbPolygon: res = sp_get_polygon_mbr(wkb, end, n_dims, byte_order, mbr); break; case wkbMultiPoint: { uint n_items; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { byte_order = *(*wkb); ++(*wkb); (*wkb) += 4; if (sp_get_point_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } res = 0; break; } case wkbMultiLineString: { uint n_items; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { byte_order = *(*wkb); ++(*wkb); (*wkb) += 4; if (sp_get_linestring_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } res = 0; break; } case wkbMultiPolygon: { uint n_items; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { byte_order = *(*wkb); ++(*wkb); (*wkb) += 4; if (sp_get_polygon_mbr(wkb, end, n_dims, byte_order, mbr)) return -1; } res = 0; break; } case wkbGeometryCollection: { uint n_items; if (!top) return -1; n_items = uint4korr((*wkb)); (*wkb) += 4; for (; n_items > 0; --n_items) { if (sp_get_geometry_mbr(wkb, end, n_dims, mbr, 0)) return -1; } res = 0; break; } default: res = -1; } return res; }
O0
c
sp_get_geometry_mbr: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx incq %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movl -0x38(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x50(%rbp) subl $0x6, %eax ja 0x9c697 movq -0x50(%rbp), %rax leaq 0xbcec3(%rip), %rcx # 0x1592e0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c6b0 movl %eax, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c6f0 movl %eax, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c780 movl %eax, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x3c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x3c(%rbp) jbe 0x9c50c movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c6b0 cmpl $0x0, %eax je 0x9c4ff movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 jmp 0x9c501 movl -0x3c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x3c(%rbp) jmp 0x9c4a6 movl $0x0, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x40(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x40(%rbp) jbe 0x9c598 movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c6f0 cmpl $0x0, %eax je 0x9c58b movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 jmp 0x9c58d movl -0x40(%rbp), %eax addl $-0x1, %eax movl %eax, -0x40(%rbp) jmp 0x9c532 movl $0x0, -0x30(%rbp) jmp 0x9c69e movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x44(%rbp) jbe 0x9c624 movq -0x10(%rbp), %rax movq (%rax), %rax movb (%rax), %al movb %al, -0x31(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movb -0x31(%rbp), %al movq -0x28(%rbp), %r8 movzbl %al, %ecx callq 0x9c780 cmpl $0x0, %eax je 0x9c617 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 jmp 0x9c619 movl -0x44(%rbp), %eax addl $-0x1, %eax movl %eax, -0x44(%rbp) jmp 0x9c5be movl $0x0, -0x30(%rbp) jmp 0x9c69e cmpl $0x0, -0x2c(%rbp) jne 0x9c63c movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 movq -0x10(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x48(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) cmpl $0x0, -0x48(%rbp) jbe 0x9c68e movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x1c(%rbp), %edx movq -0x28(%rbp), %rcx xorl %r8d, %r8d callq 0x9c3b0 cmpl $0x0, %eax je 0x9c681 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x9c6a4 jmp 0x9c683 movl -0x48(%rbp), %eax addl $-0x1, %eax movl %eax, -0x48(%rbp) jmp 0x9c656 movl $0x0, -0x30(%rbp) jmp 0x9c69e movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF movl -0x30(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax)
sp_get_geometry_mbr: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] inc rcx mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_38], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov eax, [rbp+var_38] dec eax; switch 7 cases mov ecx, eax mov [rbp+var_50], rcx sub eax, 6 ja def_9C424; jumptable 000000000009C424 default case mov rax, [rbp+var_50] lea rcx, jpt_9C424 movsxd rax, ds:(jpt_9C424 - 1592E0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_9C426: mov rdi, [rbp+var_10]; jumptable 000000000009C424 case 1 mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_point_mbr mov [rbp+var_30], eax jmp loc_9C69E loc_9C448: mov rdi, [rbp+var_10]; jumptable 000000000009C424 case 2 mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_linestring_mbr mov [rbp+var_30], eax jmp loc_9C69E loc_9C46A: mov rdi, [rbp+var_10]; jumptable 000000000009C424 case 3 mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_polygon_mbr mov [rbp+var_30], eax jmp loc_9C69E loc_9C48C: mov rax, [rbp+var_10]; jumptable 000000000009C424 case 4 mov rax, [rax] mov eax, [rax] mov [rbp+var_3C], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_9C4A6: cmp [rbp+var_3C], 0 jbe short loc_9C50C mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_point_mbr cmp eax, 0 jz short loc_9C4FF mov [rbp+var_4], 0FFFFFFFFh jmp loc_9C6A4 loc_9C4FF: jmp short $+2 loc_9C501: mov eax, [rbp+var_3C] add eax, 0FFFFFFFFh mov [rbp+var_3C], eax jmp short loc_9C4A6 loc_9C50C: mov [rbp+var_30], 0 jmp loc_9C69E loc_9C518: mov rax, [rbp+var_10]; jumptable 000000000009C424 case 5 mov rax, [rax] mov eax, [rax] mov [rbp+var_40], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_9C532: cmp [rbp+var_40], 0 jbe short loc_9C598 mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_linestring_mbr cmp eax, 0 jz short loc_9C58B mov [rbp+var_4], 0FFFFFFFFh jmp loc_9C6A4 loc_9C58B: jmp short $+2 loc_9C58D: mov eax, [rbp+var_40] add eax, 0FFFFFFFFh mov [rbp+var_40], eax jmp short loc_9C532 loc_9C598: mov [rbp+var_30], 0 jmp loc_9C69E loc_9C5A4: mov rax, [rbp+var_10]; jumptable 000000000009C424 case 6 mov rax, [rax] mov eax, [rax] mov [rbp+var_44], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_9C5BE: cmp [rbp+var_44], 0 jbe short loc_9C624 mov rax, [rbp+var_10] mov rax, [rax] mov al, [rax] mov [rbp+var_31], al mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov al, [rbp+var_31] mov r8, [rbp+var_28] movzx ecx, al call sp_get_polygon_mbr cmp eax, 0 jz short loc_9C617 mov [rbp+var_4], 0FFFFFFFFh jmp loc_9C6A4 loc_9C617: jmp short $+2 loc_9C619: mov eax, [rbp+var_44] add eax, 0FFFFFFFFh mov [rbp+var_44], eax jmp short loc_9C5BE loc_9C624: mov [rbp+var_30], 0 jmp short loc_9C69E loc_9C62D: cmp [rbp+var_2C], 0; jumptable 000000000009C424 case 7 jnz short loc_9C63C mov [rbp+var_4], 0FFFFFFFFh jmp short loc_9C6A4 loc_9C63C: mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax] mov [rbp+var_48], eax mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 4 mov [rax], rcx loc_9C656: cmp [rbp+var_48], 0 jbe short loc_9C68E mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov edx, [rbp+var_1C] mov rcx, [rbp+var_28] xor r8d, r8d call sp_get_geometry_mbr cmp eax, 0 jz short loc_9C681 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_9C6A4 loc_9C681: jmp short $+2 loc_9C683: mov eax, [rbp+var_48] add eax, 0FFFFFFFFh mov [rbp+var_48], eax jmp short loc_9C656 loc_9C68E: mov [rbp+var_30], 0 jmp short loc_9C69E def_9C424: mov [rbp+var_30], 0FFFFFFFFh; jumptable 000000000009C424 default case loc_9C69E: mov eax, [rbp+var_30] mov [rbp+var_4], eax loc_9C6A4: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long sp_get_geometry_mbr(unsigned __int8 **a1, long long a2, unsigned int a3, long long a4, int a5) { int v6; // [rsp+8h] [rbp-48h] int v7; // [rsp+Ch] [rbp-44h] int v8; // [rsp+10h] [rbp-40h] int v9; // [rsp+14h] [rbp-3Ch] int v10; // [rsp+18h] [rbp-38h] unsigned __int8 v11; // [rsp+1Fh] [rbp-31h] unsigned __int8 v12; // [rsp+1Fh] [rbp-31h] unsigned __int8 v13; // [rsp+1Fh] [rbp-31h] unsigned __int8 v14; // [rsp+1Fh] [rbp-31h] v11 = *(*a1)++; v10 = *(_DWORD *)*a1; *a1 += 4; switch ( v10 ) { case 1: return (unsigned int)sp_get_point_mbr(a1, a2, a3, v11, a4); case 2: return (unsigned int)sp_get_linestring_mbr(a1, a2, a3, v11, a4); case 3: return (unsigned int)sp_get_polygon_mbr(a1, a2, a3, v11, a4); case 4: v9 = *(_DWORD *)*a1; *a1 += 4; while ( 2 ) { if ( !v9 ) return 0; v12 = *(*a1)++; *a1 += 4; if ( !(unsigned int)sp_get_point_mbr(a1, a2, a3, v12, a4) ) { --v9; continue; } return (unsigned int)-1; } case 5: v8 = *(_DWORD *)*a1; *a1 += 4; while ( 2 ) { if ( !v8 ) return 0; v13 = *(*a1)++; *a1 += 4; if ( !(unsigned int)sp_get_linestring_mbr(a1, a2, a3, v13, a4) ) { --v8; continue; } return (unsigned int)-1; } case 6: v7 = *(_DWORD *)*a1; *a1 += 4; while ( 2 ) { if ( !v7 ) return 0; v14 = *(*a1)++; *a1 += 4; if ( !(unsigned int)sp_get_polygon_mbr(a1, a2, a3, v14, a4) ) { --v7; continue; } break; } return (unsigned int)-1; case 7: if ( !a5 ) return (unsigned int)-1; v6 = *(_DWORD *)*a1; *a1 += 4; break; default: return (unsigned int)-1; } while ( v6 ) { if ( (unsigned int)sp_get_geometry_mbr(a1, a2, a3, a4, 0LL) ) return (unsigned int)-1; --v6; } return 0; }
sp_get_geometry_mbr: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x2c],R8D MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] INC RCX MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x38],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x38] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x50],RCX SUB EAX,0x6 JA 0x0019c697 MOV RAX,qword ptr [RBP + -0x50] LEA RCX,[0x2592e0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c6b0 MOV dword ptr [RBP + -0x30],EAX JMP 0x0019c69e caseD_2: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c6f0 MOV dword ptr [RBP + -0x30],EAX JMP 0x0019c69e caseD_3: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c780 MOV dword ptr [RBP + -0x30],EAX JMP 0x0019c69e caseD_4: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_0019c4a6: CMP dword ptr [RBP + -0x3c],0x0 JBE 0x0019c50c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c6b0 CMP EAX,0x0 JZ 0x0019c4ff MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c4ff: JMP 0x0019c501 LAB_0019c501: MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x3c],EAX JMP 0x0019c4a6 LAB_0019c50c: MOV dword ptr [RBP + -0x30],0x0 JMP 0x0019c69e caseD_5: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x40],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_0019c532: CMP dword ptr [RBP + -0x40],0x0 JBE 0x0019c598 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c6f0 CMP EAX,0x0 JZ 0x0019c58b MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c58b: JMP 0x0019c58d LAB_0019c58d: MOV EAX,dword ptr [RBP + -0x40] ADD EAX,-0x1 MOV dword ptr [RBP + -0x40],EAX JMP 0x0019c532 LAB_0019c598: MOV dword ptr [RBP + -0x30],0x0 JMP 0x0019c69e caseD_6: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_0019c5be: CMP dword ptr [RBP + -0x44],0x0 JBE 0x0019c624 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x31],AL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV AL,byte ptr [RBP + -0x31] MOV R8,qword ptr [RBP + -0x28] MOVZX ECX,AL CALL 0x0019c780 CMP EAX,0x0 JZ 0x0019c617 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c617: JMP 0x0019c619 LAB_0019c619: MOV EAX,dword ptr [RBP + -0x44] ADD EAX,-0x1 MOV dword ptr [RBP + -0x44],EAX JMP 0x0019c5be LAB_0019c624: MOV dword ptr [RBP + -0x30],0x0 JMP 0x0019c69e caseD_7: CMP dword ptr [RBP + -0x2c],0x0 JNZ 0x0019c63c MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c63c: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x48],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX LAB_0019c656: CMP dword ptr [RBP + -0x48],0x0 JBE 0x0019c68e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x1c] MOV RCX,qword ptr [RBP + -0x28] XOR R8D,R8D CALL 0x0019c3b0 CMP EAX,0x0 JZ 0x0019c681 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0019c6a4 LAB_0019c681: JMP 0x0019c683 LAB_0019c683: MOV EAX,dword ptr [RBP + -0x48] ADD EAX,-0x1 MOV dword ptr [RBP + -0x48],EAX JMP 0x0019c656 LAB_0019c68e: MOV dword ptr [RBP + -0x30],0x0 JMP 0x0019c69e default: MOV dword ptr [RBP + -0x30],0xffffffff LAB_0019c69e: MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x4],EAX LAB_0019c6a4: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 sp_get_geometry_mbr(long *param_1,int8 param_2,int4 param_3,int8 param_4, int param_5) { int1 uVar1; int4 uVar2; int iVar3; int local_50; int local_4c; int local_48; int local_44; int4 local_38; uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; uVar2 = *(int4 *)*param_1; *param_1 = *param_1 + 4; switch(uVar2) { case 1: local_38 = sp_get_point_mbr(param_1,param_2,param_3,uVar1,param_4); break; case 2: local_38 = sp_get_linestring_mbr(param_1,param_2,param_3,uVar1,param_4); break; case 3: local_38 = sp_get_polygon_mbr(param_1,param_2,param_3,uVar1,param_4); break; case 4: local_44 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_44 != 0; local_44 = local_44 + -1) { uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; *param_1 = *param_1 + 4; iVar3 = sp_get_point_mbr(param_1,param_2,param_3,uVar1,param_4); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; case 5: local_48 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_48 != 0; local_48 = local_48 + -1) { uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; *param_1 = *param_1 + 4; iVar3 = sp_get_linestring_mbr(param_1,param_2,param_3,uVar1,param_4); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; case 6: local_4c = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_4c != 0; local_4c = local_4c + -1) { uVar1 = *(int1 *)*param_1; *param_1 = *param_1 + 1; *param_1 = *param_1 + 4; iVar3 = sp_get_polygon_mbr(param_1,param_2,param_3,uVar1,param_4); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; case 7: if (param_5 == 0) { return 0xffffffff; } local_50 = *(int *)*param_1; *param_1 = *param_1 + 4; for (; local_50 != 0; local_50 = local_50 + -1) { iVar3 = sp_get_geometry_mbr(param_1,param_2,param_3,param_4,0); if (iVar3 != 0) { return 0xffffffff; } } local_38 = 0; break; default: local_38 = 0xffffffff; } return local_38; }
9,018
google::protobuf::compiler::CodeGeneratorResponse* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::CodeGeneratorResponse>(google::protobuf::Arena*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/plugin.pb.cc
PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse* Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(Arena* arena) { return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::compiler::CodeGeneratorResponse >(arena); }
O0
cpp
google::protobuf::compiler::CodeGeneratorResponse* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::CodeGeneratorResponse>(google::protobuf::Arena*): subq $0xb8, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) jne 0xaea4f movl $0x40, %edi callq 0x211c0 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x10(%rsp) xorl %edx, %edx movl %edx, %esi callq 0xad1d0 jmp 0xaea40 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) callq 0x21620 movq 0x38(%rsp), %rdi callq 0x21700 movq 0x10(%rsp), %rax movq %rax, 0x28(%rsp) jmp 0xaec03 movq 0x20(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq %rax, (%rsp) movq %rax, 0x98(%rsp) movq $0x40, 0x90(%rsp) movq $0x8, 0x88(%rsp) movq $0x0, 0x80(%rsp) leaq 0x43c163(%rip), %rax # 0x4eabf8 movq %rax, 0x78(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x8(%rsp) cmpq $0x0, 0x80(%rsp) jne 0xaeade movq 0x8(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x88(%rsp), %rdx movq 0x78(%rsp), %rcx callq 0xb2260 movq %rax, 0xa0(%rsp) jmp 0xaebe3 cmpq $0x8, 0x88(%rsp) ja 0xaeb42 movq 0x90(%rsp), %rdi callq 0xb2310 movq 0x8(%rsp), %rdi movq %rax, %rsi movq 0x78(%rsp), %rdx callq 0x1e50a0 movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq 0x68(%rsp), %rcx movq 0x70(%rsp), %rax movq %rcx, (%rax) movq 0x80(%rsp), %rcx movq 0x70(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x68(%rsp), %rax movq %rax, 0xa0(%rsp) jmp 0xaebe3 movq 0x8(%rsp), %rdi movq 0x90(%rsp), %rsi addq 0x88(%rsp), %rsi subq $0x8, %rsi movq 0x78(%rsp), %rdx callq 0x1e50a0 movq %rax, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x88(%rsp), %rax movq %rcx, 0xb0(%rsp) movq %rax, 0xa8(%rsp) movq 0xb0(%rsp), %rax addq 0xa8(%rsp), %rax subq $0x1, %rax movq 0xa8(%rsp), %rcx xorq $-0x1, %rcx addq $0x1, %rcx andq %rcx, %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, (%rax) movq 0x80(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x50(%rsp), %rax movq %rax, 0xa0(%rsp) movq (%rsp), %rax movq 0xa0(%rsp), %rdi movq %rax, 0x40(%rsp) leaq 0x40(%rsp), %rsi callq 0xb3c50 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rax addq $0xb8, %rsp retq
_ZN6google8protobuf5Arena18CreateMaybeMessageINS0_8compiler21CodeGeneratorResponseEJEEEPT_PS1_DpOT0_: sub rsp, 0B8h mov [rsp+0B8h+var_A0], rdi mov rax, [rsp+0B8h+var_A0] mov [rsp+0B8h+var_98], rax cmp [rsp+0B8h+var_98], 0 jnz short loc_AEA4F mov edi, 40h ; '@'; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov rax, rdi mov [rsp+0B8h+var_A8], rax xor edx, edx; bool mov esi, edx; google::protobuf::Arena * call _ZN6google8protobuf8compiler21CodeGeneratorResponseC2EPNS0_5ArenaEb; google::protobuf::compiler::CodeGeneratorResponse::CodeGeneratorResponse(google::protobuf::Arena *,bool) jmp short loc_AEA40 mov rdi, [rsp+arg_8]; void * mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax call __ZdlPv; operator delete(void *) mov rdi, [rsp+arg_30] call __Unwind_Resume loc_AEA40: mov rax, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_90], rax jmp loc_AEC03 loc_AEA4F: mov rax, [rsp+0B8h+var_98] mov [rsp+0B8h+var_70], rax mov rax, [rsp+0B8h+var_70] mov [rsp+0B8h+var_B8], rax mov [rsp+0B8h+var_20], rax mov [rsp+0B8h+var_28], 40h ; '@' mov [rsp+0B8h+var_30], 8 mov [rsp+0B8h+var_38], 0 lea rax, _ZTIN6google8protobuf8compiler21CodeGeneratorResponseE; `typeinfo for'google::protobuf::compiler::CodeGeneratorResponse mov [rsp+0B8h+var_40], rax mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_B0], rax cmp [rsp+0B8h+var_38], 0 jnz short loc_AEADE mov rdi, [rsp+0B8h+var_B0]; this mov rsi, [rsp+0B8h+var_28]; unsigned __int64 mov rdx, [rsp+0B8h+var_30]; unsigned __int64 mov rcx, [rsp+0B8h+var_40]; type_info * call _ZN6google8protobuf5Arena23AllocateAlignedWithHookEmmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithHook(ulong,ulong,std::type_info const*) mov [rsp+0B8h+var_18], rax jmp loc_AEBE3 loc_AEADE: cmp [rsp+0B8h+var_30], 8 ja short loc_AEB42 mov rdi, [rsp+0B8h+var_28]; this call _ZN6google8protobuf8internal10AlignUpTo8Em; google::protobuf::internal::AlignUpTo8(ulong) mov rdi, [rsp+0B8h+var_B0]; this mov rsi, rax; unsigned __int64 mov rdx, [rsp+0B8h+var_40]; type_info * call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*) mov [rsp+0B8h+var_50], rax mov [rsp+0B8h+var_48], rdx mov rcx, [rsp+0B8h+var_50] mov rax, [rsp+0B8h+var_48] mov [rax], rcx mov rcx, [rsp+0B8h+var_38] mov rax, [rsp+0B8h+var_48] mov [rax+8], rcx mov rax, [rsp+0B8h+var_50] mov [rsp+0B8h+var_18], rax jmp loc_AEBE3 loc_AEB42: mov rdi, [rsp+0B8h+var_B0]; this mov rsi, [rsp+0B8h+var_28] add rsi, [rsp+0B8h+var_30] sub rsi, 8; unsigned __int64 mov rdx, [rsp+0B8h+var_40]; type_info * call _ZN6google8protobuf5Arena26AllocateAlignedWithCleanupEmPKSt9type_info; google::protobuf::Arena::AllocateAlignedWithCleanup(ulong,std::type_info const*) mov [rsp+0B8h+var_60], rax mov [rsp+0B8h+var_58], rdx mov rcx, [rsp+0B8h+var_60] mov rax, [rsp+0B8h+var_30] mov [rsp+0B8h+var_8], rcx mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_8] add rax, [rsp+0B8h+var_10] sub rax, 1 mov rcx, [rsp+0B8h+var_10] xor rcx, 0FFFFFFFFFFFFFFFFh add rcx, 1 and rax, rcx mov [rsp+0B8h+var_68], rax mov rcx, [rsp+0B8h+var_68] mov rax, [rsp+0B8h+var_58] mov [rax], rcx mov rcx, [rsp+0B8h+var_38] mov rax, [rsp+0B8h+var_58] mov [rax+8], rcx mov rax, [rsp+0B8h+var_68] mov [rsp+0B8h+var_18], rax loc_AEBE3: mov rax, [rsp+0B8h+var_B8] mov rdi, [rsp+0B8h+var_18] mov [rsp+0B8h+var_78], rax lea rsi, [rsp+0B8h+var_78] call _ZN6google8protobuf5Arena14InternalHelperINS0_8compiler21CodeGeneratorResponseEE9ConstructIJPS1_EEEPS4_PvDpOT_; google::protobuf::Arena::InternalHelper<google::protobuf::compiler::CodeGeneratorResponse>::Construct<google::protobuf::Arena*>(void *,google::protobuf::Arena* &&) mov [rsp+0B8h+var_90], rax loc_AEC03: mov rax, [rsp+0B8h+var_90] add rsp, 0B8h retn
google::protobuf::compiler::CodeGeneratorResponse * google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::CodeGeneratorResponse>( google::protobuf::Arena *a1) { google::protobuf::compiler::CodeGeneratorResponse *v2; // [rsp+10h] [rbp-A8h] _QWORD v4[12]; // [rsp+40h] [rbp-78h] BYREF long long AlignedWithHook; // [rsp+A0h] [rbp-18h] if ( a1 ) { v4[1] = a1; v4[11] = a1; v4[10] = 64LL; v4[9] = 8LL; v4[8] = 0LL; v4[7] = &`typeinfo for'google::protobuf::compiler::CodeGeneratorResponse; AlignedWithHook = google::protobuf::Arena::AllocateAlignedWithHook( a1, 0x40uLL, 8uLL, (const type_info *)&`typeinfo for'google::protobuf::compiler::CodeGeneratorResponse); v4[0] = a1; return (google::protobuf::compiler::CodeGeneratorResponse *)google::protobuf::Arena::InternalHelper<google::protobuf::compiler::CodeGeneratorResponse>::Construct<google::protobuf::Arena*>( AlignedWithHook, v4); } else { v2 = (google::protobuf::compiler::CodeGeneratorResponse *)operator new(0x40uLL); google::protobuf::compiler::CodeGeneratorResponse::CodeGeneratorResponse(v2, 0LL, 0); return v2; } }
CreateMaybeMessage<google::protobuf::compiler::CodeGeneratorResponse>: SUB RSP,0xb8 MOV qword ptr [RSP + 0x18],RDI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x20],RAX CMP qword ptr [RSP + 0x20],0x0 JNZ 0x001aea4f MOV EDI,0x40 CALL 0x001211c0 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX LAB_001aea13: XOR EDX,EDX MOV ESI,EDX CALL 0x001ad1d0 LAB_001aea1c: JMP 0x001aea40 LAB_001aea40: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x28],RAX JMP 0x001aec03 LAB_001aea4f: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0x90],0x40 MOV qword ptr [RSP + 0x88],0x8 MOV qword ptr [RSP + 0x80],0x0 LEA RAX,[0x5eabf8] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x80],0x0 JNZ 0x001aeade MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x78] CALL 0x001b2260 MOV qword ptr [RSP + 0xa0],RAX JMP 0x001aebe3 LAB_001aeade: CMP qword ptr [RSP + 0x88],0x8 JA 0x001aeb42 MOV RDI,qword ptr [RSP + 0x90] CALL 0x001b2310 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x78] CALL 0x002e50a0 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX MOV RCX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xa0],RAX JMP 0x001aebe3 LAB_001aeb42: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x90] ADD RSI,qword ptr [RSP + 0x88] SUB RSI,0x8 MOV RDX,qword ptr [RSP + 0x78] CALL 0x002e50a0 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0xb0],RCX MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xb0] ADD RAX,qword ptr [RSP + 0xa8] SUB RAX,0x1 MOV RCX,qword ptr [RSP + 0xa8] XOR RCX,-0x1 ADD RCX,0x1 AND RAX,RCX MOV qword ptr [RSP + 0x50],RAX MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x80] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xa0],RAX LAB_001aebe3: MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x40],RAX LEA RSI,[RSP + 0x40] CALL 0x001b3c50 MOV qword ptr [RSP + 0x28],RAX LAB_001aec03: MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0xb8 RET
/* WARNING: Removing unreachable block (ram,0x001aeade) */ /* WARNING: Removing unreachable block (ram,0x001aeae9) */ /* WARNING: Removing unreachable block (ram,0x001aeb42) */ /* google::protobuf::compiler::CodeGeneratorResponse* google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::CodeGeneratorResponse>(google::protobuf::Arena*) */ CodeGeneratorResponse * google::protobuf::Arena::CreateMaybeMessage<google::protobuf::compiler::CodeGeneratorResponse> (Arena *param_1) { CodeGeneratorResponse *local_90; Arena *local_78; Arena *local_70; pointer_____offset_0x10___ *local_40; int8 local_38; int8 local_30; int8 local_28; Arena *local_20; void *local_18; if (param_1 == (Arena *)0x0) { local_90 = (CodeGeneratorResponse *)operator_new(0x40); /* try { // try from 001aea13 to 001aea1b has its CatchHandler @ 001aea1e */ compiler::CodeGeneratorResponse::CodeGeneratorResponse(local_90,(Arena *)0x0,false); } else { local_28 = 0x40; local_30 = 8; local_38 = 0; local_40 = &compiler::CodeGeneratorResponse::typeinfo; local_70 = param_1; local_20 = param_1; local_18 = (void *)AllocateAlignedWithHook (param_1,0x40,8, (type_info *)&compiler::CodeGeneratorResponse::typeinfo); local_78 = param_1; local_90 = InternalHelper<google::protobuf::compiler::CodeGeneratorResponse>:: Construct<google::protobuf::Arena*>(local_18,&local_78); } return local_90; }
9,019
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O3
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x93b60 testb %al, %al je 0x9d327 movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x9394e movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x9d346 movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax movl $0x10, %edi callq 0x1a450 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x86c10 leaq 0x53a10(%rip), %rsi # 0xf0d7e leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x793a5 movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1ae20 xorl %ebp, %ebp movq 0x8ec5a(%rip), %rsi # 0x12bff0 movq 0x8ebc3(%rip), %rdx # 0x12bf60 movq %rbx, %rdi callq 0x1af10 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9d3c3 movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8e0 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9d3de movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 testb %bpl, %bpl jne 0x9d408 jmp 0x9d410 movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9d408 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x9d408 movq %rax, %r14 movq %rbx, %rdi callq 0x1a690 movq %r14, %rdi callq 0x1af90
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_9D327 mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_9D327: mov rdi, [rbx+68h] test rdi, rdi jz short loc_9D346 mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_9D346: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUndefinedVaria; "Undefined variable: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+68h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9D3C3 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9D3C3: lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9D3DE mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9D3DE: test bpl, bpl jnz short loc_9D408 jmp short loc_9D410 mov r14, rax lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9D408 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9D408 mov r14, rax loc_9D408: mov rdi, rbx; void * call ___cxa_free_exception loc_9D410: mov rdi, r14 call __Unwind_Resume
unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3) { long long v4; // rdi void *exception; // rbx _BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF if ( minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) ) return minja::Value::at((minja::Context *)((char *)this + 24), a2); v4 = *((_QWORD *)this + 13); if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2); }
at: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x18] MOV RDI,R15 CALL 0x00193b60 TEST AL,AL JZ 0x0019d327 MOV RDI,R15 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x0019394e LAB_0019d327: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x0019d346 MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP RAX LAB_0019d346: MOV EDI,0x10 CALL 0x0011a450 MOV RBX,RAX LAB_0019d353: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x00186c10 LAB_0019d367: LEA RSI,[0x1f0d7e] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x001793a5 MOV BPL,0x1 LAB_0019d380: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0011ae20 XOR EBP,EBP MOV RSI,qword ptr [0x0022bff0] MOV RDX,qword ptr [0x0022bf60] MOV RDI,RBX CALL 0x0011af10
/* minja::Context::at(minja::Value const&) */ void __thiscall minja::Context::at(Context *this,Value *param_1) { long *plVar1; char cVar2; runtime_error *this_00; int1 local_60 [32]; string local_40 [32]; cVar2 = Value::contains((Value *)(this + 0x18),param_1); if (cVar2 != '\0') { Value::at((Value *)(this + 0x18),param_1); return; } plVar1 = *(long **)(this + 0x68); if (plVar1 != (long *)0x0) { /* WARNING: Could not recover jumptable at 0x0019d344. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 0x18))(plVar1,param_1); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019d353 to 0019d366 has its CatchHandler @ 0019d405 */ Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 0019d367 to 0019d37c has its CatchHandler @ 0019d3e5 */ std::operator+((char *)local_40,(string *)"Undefined variable: "); /* try { // try from 0019d380 to 0019d3a4 has its CatchHandler @ 0019d3a5 */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_0022bff0,PTR__runtime_error_0022bf60); }
9,020
js_binary_arith_bigint
bluesky950520[P]quickjs/quickjs.c
static int js_binary_arith_bigint(JSContext *ctx, OPCodeEnum op, JSValue *pres, JSValue op1, JSValue op2) { bf_t a_s, b_s, *r, *a, *b; int ret; JSValue res; a = JS_ToBigIntFree(ctx, &a_s, op1); if (!a) { JS_FreeValue(ctx, op2); return -1; } b = JS_ToBigIntFree(ctx, &b_s, op2); if (!b) { JS_FreeBigInt(ctx, a, &a_s); return -1; } res = JS_NewBigInt(ctx); if (JS_IsException(res)) { JS_FreeBigInt(ctx, a, &a_s); JS_FreeBigInt(ctx, b, &b_s); return -1; } r = JS_GetBigInt(res); ret = 0; switch(op) { case OP_add: ret = bf_add(r, a, b, BF_PREC_INF, BF_RNDZ); break; case OP_sub: ret = bf_sub(r, a, b, BF_PREC_INF, BF_RNDZ); break; case OP_mul: ret = bf_mul(r, a, b, BF_PREC_INF, BF_RNDZ); break; case OP_div: { bf_t rem_s, *rem = &rem_s; bf_init(ctx->bf_ctx, rem); ret = bf_divrem(r, rem, a, b, BF_PREC_INF, BF_RNDZ, BF_RNDZ); bf_delete(rem); } break; case OP_mod: ret = bf_rem(r, a, b, BF_PREC_INF, BF_RNDZ, BF_RNDZ) & BF_ST_INVALID_OP; break; case OP_pow: if (b->sign) { ret = BF_ST_INVALID_OP; } else { ret = bf_pow(r, a, b, BF_PREC_INF, BF_RNDZ | BF_POW_JS_QUIRKS); } break; /* logical operations */ case OP_shl: case OP_sar: { slimb_t v2; #if LIMB_BITS == 32 bf_get_int32(&v2, b, 0); if (v2 == INT32_MIN) v2 = INT32_MIN + 1; #else bf_get_int64(&v2, b, 0); if (v2 == INT64_MIN) v2 = INT64_MIN + 1; #endif if (op == OP_sar) v2 = -v2; ret = bf_set(r, a); ret |= bf_mul_2exp(r, v2, BF_PREC_INF, BF_RNDZ); if (v2 < 0) { ret |= bf_rint(r, BF_RNDD) & (BF_ST_OVERFLOW | BF_ST_MEM_ERROR); } } break; case OP_and: ret = bf_logic_and(r, a, b); break; case OP_or: ret = bf_logic_or(r, a, b); break; case OP_xor: ret = bf_logic_xor(r, a, b); break; default: abort(); } JS_FreeBigInt(ctx, a, &a_s); JS_FreeBigInt(ctx, b, &b_s); if (unlikely(ret)) { JS_FreeValue(ctx, res); throw_bf_exception(ctx, ret); return -1; } *pres = JS_CompactBigInt(ctx, res); return 0; }
O0
c
js_binary_arith_bigint: subq $0x138, %rsp # imm = 0x138 leaq 0x140(%rsp), %rax movq %rax, 0x18(%rsp) movq %rcx, 0x120(%rsp) movq %r8, 0x128(%rsp) movq %rdi, 0x118(%rsp) movl %esi, 0x114(%rsp) movq %rdx, 0x108(%rsp) movq 0x118(%rsp), %rdi movq 0x120(%rsp), %rdx movq 0x128(%rsp), %rcx leaq 0xe0(%rsp), %rsi callq 0x68e30 movq %rax, 0xa8(%rsp) cmpq $0x0, 0xa8(%rsp) jne 0x76e0c movq 0x18(%rsp), %rax movq 0x118(%rsp), %rdi movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x29f80 movl $0xffffffff, 0x134(%rsp) # imm = 0xFFFFFFFF jmp 0x77343 movq 0x18(%rsp), %rax movq 0x118(%rsp), %rdi movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0xb8(%rsp), %rsi callq 0x68e30 movq %rax, 0xa0(%rsp) cmpq $0x0, 0xa0(%rsp) jne 0x76e6d movq 0x118(%rsp), %rdi movq 0xa8(%rsp), %rsi leaq 0xe0(%rsp), %rdx callq 0x68d90 movl $0xffffffff, 0x134(%rsp) # imm = 0xFFFFFFFF jmp 0x77343 movq 0x118(%rsp), %rdi callq 0x400c0 movq %rax, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x80(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x88(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x76f08 movq 0x118(%rsp), %rdi movq 0xa8(%rsp), %rsi leaq 0xe0(%rsp), %rdx callq 0x68d90 movq 0x118(%rsp), %rdi movq 0xa0(%rsp), %rsi leaq 0xb8(%rsp), %rdx callq 0x68d90 movl $0xffffffff, 0x134(%rsp) # imm = 0xFFFFFFFF jmp 0x77343 movq 0x88(%rsp), %rdi movq 0x90(%rsp), %rsi callq 0x40140 movq %rax, 0xb0(%rsp) movl $0x0, 0x9c(%rsp) movl 0x114(%rsp), %eax addl $0xffffff66, %eax # imm = 0xFFFFFF66 movl %eax, %ecx movq %rcx, 0x10(%rsp) subl $0xb, %eax ja 0x77248 movq 0x10(%rsp), %rax leaq 0x9a1a0(%rip), %rcx # 0x1110f8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0xb0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r8d callq 0xf0460 movl %eax, 0x9c(%rsp) jmp 0x7724d movq 0xb0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r8d callq 0xef5f0 movl %eax, 0x9c(%rsp) jmp 0x7724d movq 0xb0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r8d callq 0xee970 movl %eax, 0x9c(%rsp) jmp 0x7724d leaq 0x50(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x118(%rsp), %rax movq 0x1d0(%rax), %rdi movq 0x48(%rsp), %rsi callq 0xec260 movq 0xb0(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0xa8(%rsp), %rdx movq 0xa0(%rsp), %rcx movabsq $0x3fffffffffffffff, %r8 # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r9d movl $0x1, (%rsp) callq 0xeefa0 movl %eax, 0x9c(%rsp) movq 0x48(%rsp), %rdi callq 0x64c10 jmp 0x7724d movq 0xb0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r9d movl %r9d, %r8d callq 0xef640 andl $0x1, %eax movl %eax, 0x9c(%rsp) jmp 0x7724d movq 0xa0(%rsp), %rax cmpl $0x0, 0x8(%rax) je 0x770d8 movl $0x1, 0x9c(%rsp) jmp 0x7710c movq 0xb0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movl $0x10001, %r8d # imm = 0x10001 callq 0xf5360 movl %eax, 0x9c(%rsp) jmp 0x7724d movq 0xa0(%rsp), %rsi leaq 0x40(%rsp), %rdi xorl %edx, %edx callq 0xf16d0 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 cmpq %rax, 0x40(%rsp) jne 0x77145 movabsq $-0x7fffffffffffffff, %rax # imm = 0x8000000000000001 movq %rax, 0x40(%rsp) cmpl $0xa0, 0x114(%rsp) jne 0x7715e xorl %eax, %eax subq 0x40(%rsp), %rax movq %rax, 0x40(%rsp) movq 0xb0(%rsp), %rdi movq 0xa8(%rsp), %rsi callq 0xec5b0 movl %eax, 0x9c(%rsp) movq 0xb0(%rsp), %rdi movq 0x40(%rsp), %rsi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %ecx callq 0xeee00 orl 0x9c(%rsp), %eax movl %eax, 0x9c(%rsp) cmpq $0x0, 0x40(%rsp) jge 0x771d4 movq 0xb0(%rsp), %rdi movl $0x2, %esi callq 0xf0410 andl $0x24, %eax orl 0x9c(%rsp), %eax movl %eax, 0x9c(%rsp) jmp 0x7724d movq 0xb0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0xf1060 movl %eax, 0x9c(%rsp) jmp 0x7724d movq 0xb0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0xf0bd0 movl %eax, 0x9c(%rsp) jmp 0x7724d movq 0xb0(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xa0(%rsp), %rdx callq 0xf1030 movl %eax, 0x9c(%rsp) jmp 0x7724d callq 0xe090 movq 0x118(%rsp), %rdi movq 0xa8(%rsp), %rsi leaq 0xe0(%rsp), %rdx callq 0x68d90 movq 0x118(%rsp), %rdi movq 0xa0(%rsp), %rsi leaq 0xb8(%rsp), %rdx callq 0x68d90 cmpl $0x0, 0x9c(%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x772eb movq 0x118(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx callq 0x29f80 movq 0x118(%rsp), %rdi movl 0x9c(%rsp), %esi callq 0x776e0 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movl $0xffffffff, 0x134(%rsp) # imm = 0xFFFFFFFF jmp 0x77343 movq 0x108(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x118(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx callq 0x77780 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rcx movq %rcx, (%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x8(%rax) movl $0x0, 0x134(%rsp) movl 0x134(%rsp), %eax addq $0x138, %rsp # imm = 0x138 retq nopw %cs:(%rax,%rax)
js_binary_arith_bigint: sub rsp, 138h lea rax, [rsp+138h+arg_0] mov [rsp+138h+var_120], rax mov [rsp+138h+var_18], rcx mov [rsp+138h+var_10], r8 mov [rsp+138h+var_20], rdi mov [rsp+138h+var_24], esi mov [rsp+138h+var_30], rdx mov rdi, [rsp+138h+var_20] mov rdx, [rsp+138h+var_18] mov rcx, [rsp+138h+var_10] lea rsi, [rsp+138h+var_58] call JS_ToBigIntFree mov [rsp+138h+var_90], rax cmp [rsp+138h+var_90], 0 jnz short loc_76E0C mov rax, [rsp+138h+var_120] mov rdi, [rsp+138h+var_20] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue mov [rsp+138h+var_4], 0FFFFFFFFh jmp loc_77343 loc_76E0C: mov rax, [rsp+138h+var_120] mov rdi, [rsp+138h+var_20] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+138h+var_80] call JS_ToBigIntFree mov [rsp+138h+var_98], rax cmp [rsp+138h+var_98], 0 jnz short loc_76E6D mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_90] lea rdx, [rsp+138h+var_58] call JS_FreeBigInt mov [rsp+138h+var_4], 0FFFFFFFFh jmp loc_77343 loc_76E6D: mov rdi, [rsp+138h+var_20] call JS_NewBigInt mov [rsp+138h+var_C0], rax mov [rsp+138h+var_B8], rdx mov rax, [rsp+138h+var_C0] mov [rsp+138h+var_B0], rax mov rax, [rsp+138h+var_B8] mov [rsp+138h+var_A8], rax mov rdi, [rsp+138h+var_B0] mov rsi, [rsp+138h+var_A8] call JS_IsException_1 cmp eax, 0 jz short loc_76F08 mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_90] lea rdx, [rsp+138h+var_58] call JS_FreeBigInt mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_98] lea rdx, [rsp+138h+var_80] call JS_FreeBigInt mov [rsp+138h+var_4], 0FFFFFFFFh jmp loc_77343 loc_76F08: mov rdi, [rsp+138h+var_B0] mov rsi, [rsp+138h+var_A8] call JS_GetBigInt mov [rsp+138h+var_88], rax mov [rsp+138h+var_9C], 0 mov eax, [rsp+138h+var_24] add eax, 0FFFFFF66h; switch 12 cases mov ecx, eax mov [rsp+138h+var_128], rcx sub eax, 0Bh ja def_76F5F; jumptable 0000000000076F5F default case, case 161 mov rax, [rsp+138h+var_128] lea rcx, jpt_76F5F movsxd rax, ds:(jpt_76F5F - 1110F8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_76F61: mov rdi, [rsp+138h+var_88]; jumptable 0000000000076F5F case 157 mov rsi, [rsp+138h+var_90] mov rdx, [rsp+138h+var_98] mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 1 call bf_add mov [rsp+138h+var_9C], eax jmp loc_7724D loc_76F9A: mov rdi, [rsp+138h+var_88]; jumptable 0000000000076F5F case 158 mov rsi, [rsp+138h+var_90] mov rdx, [rsp+138h+var_98] mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 1 call bf_sub mov [rsp+138h+var_9C], eax jmp loc_7724D loc_76FD3: mov rdi, [rsp+138h+var_88]; jumptable 0000000000076F5F case 154 mov rsi, [rsp+138h+var_90] mov rdx, [rsp+138h+var_98] mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 1 call bf_mul mov [rsp+138h+var_9C], eax jmp loc_7724D loc_7700C: lea rax, [rsp+138h+var_E8]; jumptable 0000000000076F5F case 155 mov [rsp+138h+var_F0], rax mov rax, [rsp+138h+var_20] mov rdi, [rax+1D0h] mov rsi, [rsp+138h+var_F0] call bf_init mov rdi, [rsp+138h+var_88] mov rsi, [rsp+138h+var_F0] mov rdx, [rsp+138h+var_90] mov rcx, [rsp+138h+var_98] mov r8, 3FFFFFFFFFFFFFFFh mov r9d, 1 mov [rsp+138h+var_138], 1 call bf_divrem mov [rsp+138h+var_9C], eax mov rdi, [rsp+138h+var_F0] call bf_delete jmp loc_7724D loc_7707E: mov rdi, [rsp+138h+var_88]; jumptable 0000000000076F5F case 156 mov rsi, [rsp+138h+var_90] mov rdx, [rsp+138h+var_98] mov rcx, 3FFFFFFFFFFFFFFFh mov r9d, 1 mov r8d, r9d call bf_rem and eax, 1 mov [rsp+138h+var_9C], eax jmp loc_7724D loc_770BD: mov rax, [rsp+138h+var_98]; jumptable 0000000000076F5F case 165 cmp dword ptr [rax+8], 0 jz short loc_770D8 mov [rsp+138h+var_9C], 1 jmp short loc_7710C loc_770D8: mov rdi, [rsp+138h+var_88] mov rsi, [rsp+138h+var_90] mov rdx, [rsp+138h+var_98] mov rcx, 3FFFFFFFFFFFFFFFh mov r8d, 10001h call bf_pow mov [rsp+138h+var_9C], eax loc_7710C: jmp loc_7724D loc_77111: mov rsi, [rsp+138h+var_98]; jumptable 0000000000076F5F cases 159,160 lea rdi, [rsp+138h+var_F8] xor edx, edx call bf_get_int64 mov rax, 8000000000000000h cmp [rsp+138h+var_F8], rax jnz short loc_77145 mov rax, 8000000000000001h mov [rsp+138h+var_F8], rax loc_77145: cmp [rsp+138h+var_24], 0A0h jnz short loc_7715E xor eax, eax sub rax, [rsp+138h+var_F8] mov [rsp+138h+var_F8], rax loc_7715E: mov rdi, [rsp+138h+var_88] mov rsi, [rsp+138h+var_90] call bf_set mov [rsp+138h+var_9C], eax mov rdi, [rsp+138h+var_88] mov rsi, [rsp+138h+var_F8] mov rdx, 3FFFFFFFFFFFFFFFh mov ecx, 1 call bf_mul_2exp or eax, [rsp+138h+var_9C] mov [rsp+138h+var_9C], eax cmp [rsp+138h+var_F8], 0 jge short loc_771D4 mov rdi, [rsp+138h+var_88] mov esi, 2 call bf_rint and eax, 24h or eax, [rsp+138h+var_9C] mov [rsp+138h+var_9C], eax loc_771D4: jmp short loc_7724D loc_771D6: mov rdi, [rsp+138h+var_88]; jumptable 0000000000076F5F case 162 mov rsi, [rsp+138h+var_90] mov rdx, [rsp+138h+var_98] call bf_logic_and mov [rsp+138h+var_9C], eax jmp short loc_7724D loc_771FC: mov rdi, [rsp+138h+var_88]; jumptable 0000000000076F5F case 164 mov rsi, [rsp+138h+var_90] mov rdx, [rsp+138h+var_98] call bf_logic_or mov [rsp+138h+var_9C], eax jmp short loc_7724D loc_77222: mov rdi, [rsp+138h+var_88]; jumptable 0000000000076F5F case 163 mov rsi, [rsp+138h+var_90] mov rdx, [rsp+138h+var_98] call bf_logic_xor mov [rsp+138h+var_9C], eax jmp short loc_7724D def_76F5F: call _abort; jumptable 0000000000076F5F default case, case 161 loc_7724D: mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_90] lea rdx, [rsp+138h+var_58] call JS_FreeBigInt mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_98] lea rdx, [rsp+138h+var_80] call JS_FreeBigInt cmp [rsp+138h+var_9C], 0 setnz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_772EB mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_B0] mov rdx, [rsp+138h+var_A8] call JS_FreeValue mov rdi, [rsp+138h+var_20] mov esi, [rsp+138h+var_9C] call throw_bf_exception mov [rsp+138h+var_108], rax mov [rsp+138h+var_100], rdx mov [rsp+138h+var_4], 0FFFFFFFFh jmp short loc_77343 loc_772EB: mov rax, [rsp+138h+var_30] mov [rsp+138h+var_130], rax mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_B0] mov rdx, [rsp+138h+var_A8] call JS_CompactBigInt mov rcx, rax mov rax, [rsp+138h+var_130] mov [rsp+138h+var_118], rcx mov [rsp+138h+var_110], rdx mov rcx, [rsp+138h+var_118] mov [rax], rcx mov rcx, [rsp+138h+var_110] mov [rax+8], rcx mov [rsp+138h+var_4], 0 loc_77343: mov eax, [rsp+138h+var_4] add rsp, 138h retn
long long js_binary_arith_bigint( long long a1, int a2, _QWORD *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, long long a15, long long a16) { long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 long long v20; // rdx int v21; // eax char v22; // al long long v23; // rdx _QWORD *v25; // [rsp+8h] [rbp-130h] _QWORD v26[2]; // [rsp+40h] [rbp-F8h] BYREF long long v27[5]; // [rsp+50h] [rbp-E8h] BYREF const char *v28; // [rsp+78h] [rbp-C0h] long long v29; // [rsp+80h] [rbp-B8h] const char *v30; // [rsp+88h] [rbp-B0h] long long v31; // [rsp+90h] [rbp-A8h] unsigned int v32; // [rsp+9Ch] [rbp-9Ch] long long *v33; // [rsp+A0h] [rbp-98h] long long *v34; // [rsp+A8h] [rbp-90h] long long BigInt; // [rsp+B0h] [rbp-88h] long long v36[5]; // [rsp+B8h] [rbp-80h] BYREF long long v37[5]; // [rsp+E0h] [rbp-58h] BYREF _QWORD *v38; // [rsp+108h] [rbp-30h] int v39; // [rsp+114h] [rbp-24h] long long v40; // [rsp+118h] [rbp-20h] long long v41; // [rsp+120h] [rbp-18h] long long v42; // [rsp+128h] [rbp-10h] v41 = a4; v42 = a5; v40 = a1; v39 = a2; v38 = a3; v34 = (long long *)JS_ToBigIntFree(a1, (long long)v37, a4, a5, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( v34 ) { v33 = (long long *)JS_ToBigIntFree(v40, (long long)v36, a15, a16, v16, v17, a7, a8, a9, a10, v18, v19, a13, a14); if ( v33 ) { v28 = (const char *)JS_NewBigInt(v40); v29 = v20; v30 = v28; v31 = v20; if ( JS_IsException_1((long long)v28, v20) ) { JS_FreeBigInt(v40, v34, v37); JS_FreeBigInt(v40, v33, v36); return (unsigned int)-1; } else { BigInt = JS_GetBigInt((long long)v30); v32 = 0; switch ( v39 ) { case 154: v32 = bf_mul(BigInt, v34, v33, 0x3FFFFFFFFFFFFFFFLL, 1LL); break; case 155: v26[1] = v27; bf_init(*(_QWORD *)(v40 + 464), v27); v32 = bf_divrem(BigInt, (unsigned int)v27, (_DWORD)v34, (_DWORD)v33, -1, 1, 1); bf_delete(v27); break; case 156: v32 = bf_rem(BigInt, v34, v33, 0x3FFFFFFFFFFFFFFFLL, 1LL) & 1; break; case 157: v32 = bf_add(BigInt, v34, v33, 0x3FFFFFFFFFFFFFFFLL, 1LL); break; case 158: v32 = bf_sub(BigInt, v34, v33, 0x3FFFFFFFFFFFFFFFLL, 1LL); break; case 159: case 160: bf_get_int64(v26, v33, 0LL); if ( v26[0] == 0x8000000000000000LL ) v26[0] = 0x8000000000000001LL; if ( v39 == 160 ) v26[0] = -v26[0]; v32 = bf_set(BigInt, v34); v21 = bf_mul_2exp(BigInt, v26[0], 0x3FFFFFFFFFFFFFFFLL, 1LL); v32 |= v21; if ( v26[0] < 0LL ) { v22 = bf_rint(BigInt, 2LL); v32 |= v22 & 0x24; } break; case 162: v32 = bf_logic_and(BigInt, v34, v33); break; case 163: v32 = bf_logic_xor(BigInt, v34, v33); break; case 164: v32 = bf_logic_or(BigInt, v34, v33); break; case 165: if ( *((_DWORD *)v33 + 2) ) v32 = 1; else v32 = bf_pow(BigInt, v34, v33, 0x3FFFFFFFFFFFFFFFLL, 65537LL); break; default: abort(v30, v31); } JS_FreeBigInt(v40, v34, v37); JS_FreeBigInt(v40, v33, v36); if ( v32 ) { JS_FreeValue(v40, (long long)v30, v31); throw_bf_exception(v40, v32); return (unsigned int)-1; } else { v25 = v38; *v25 = JS_CompactBigInt(v40, v30, v31); v25[1] = v23; return 0; } } } else { JS_FreeBigInt(v40, v34, v37); return (unsigned int)-1; } } else { JS_FreeValue(v40, a15, a16); return (unsigned int)-1; } }
js_binary_arith_bigint: SUB RSP,0x138 LEA RAX,[RSP + 0x140] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x120],RCX MOV qword ptr [RSP + 0x128],R8 MOV qword ptr [RSP + 0x118],RDI MOV dword ptr [RSP + 0x114],ESI MOV qword ptr [RSP + 0x108],RDX MOV RDI,qword ptr [RSP + 0x118] MOV RDX,qword ptr [RSP + 0x120] MOV RCX,qword ptr [RSP + 0x128] LEA RSI,[RSP + 0xe0] CALL 0x00168e30 MOV qword ptr [RSP + 0xa8],RAX CMP qword ptr [RSP + 0xa8],0x0 JNZ 0x00176e0c MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x118] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00129f80 MOV dword ptr [RSP + 0x134],0xffffffff JMP 0x00177343 LAB_00176e0c: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x118] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0xb8] CALL 0x00168e30 MOV qword ptr [RSP + 0xa0],RAX CMP qword ptr [RSP + 0xa0],0x0 JNZ 0x00176e6d MOV RDI,qword ptr [RSP + 0x118] MOV RSI,qword ptr [RSP + 0xa8] LEA RDX,[RSP + 0xe0] CALL 0x00168d90 MOV dword ptr [RSP + 0x134],0xffffffff JMP 0x00177343 LAB_00176e6d: MOV RDI,qword ptr [RSP + 0x118] CALL 0x001400c0 MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x80],RDX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x90] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x00176f08 MOV RDI,qword ptr [RSP + 0x118] MOV RSI,qword ptr [RSP + 0xa8] LEA RDX,[RSP + 0xe0] CALL 0x00168d90 MOV RDI,qword ptr [RSP + 0x118] MOV RSI,qword ptr [RSP + 0xa0] LEA RDX,[RSP + 0xb8] CALL 0x00168d90 MOV dword ptr [RSP + 0x134],0xffffffff JMP 0x00177343 LAB_00176f08: MOV RDI,qword ptr [RSP + 0x88] MOV RSI,qword ptr [RSP + 0x90] CALL 0x00140140 MOV qword ptr [RSP + 0xb0],RAX MOV dword ptr [RSP + 0x9c],0x0 MOV EAX,dword ptr [RSP + 0x114] ADD EAX,0xffffff66 MOV ECX,EAX MOV qword ptr [RSP + 0x10],RCX SUB EAX,0xb JA 0x00177248 MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[0x2110f8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_9d: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xa0] MOV RCX,0x3fffffffffffffff MOV R8D,0x1 CALL 0x001f0460 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0017724d caseD_9e: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xa0] MOV RCX,0x3fffffffffffffff MOV R8D,0x1 CALL 0x001ef5f0 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0017724d caseD_9a: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xa0] MOV RCX,0x3fffffffffffffff MOV R8D,0x1 CALL 0x001ee970 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0017724d caseD_9b: LEA RAX,[RSP + 0x50] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x118] MOV RDI,qword ptr [RAX + 0x1d0] MOV RSI,qword ptr [RSP + 0x48] CALL 0x001ec260 MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0xa8] MOV RCX,qword ptr [RSP + 0xa0] MOV R8,0x3fffffffffffffff MOV R9D,0x1 MOV dword ptr [RSP],0x1 CALL 0x001eefa0 MOV dword ptr [RSP + 0x9c],EAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x00164c10 JMP 0x0017724d caseD_9c: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xa0] MOV RCX,0x3fffffffffffffff MOV R9D,0x1 MOV R8D,R9D CALL 0x001ef640 AND EAX,0x1 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0017724d caseD_a5: MOV RAX,qword ptr [RSP + 0xa0] CMP dword ptr [RAX + 0x8],0x0 JZ 0x001770d8 MOV dword ptr [RSP + 0x9c],0x1 JMP 0x0017710c LAB_001770d8: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xa0] MOV RCX,0x3fffffffffffffff MOV R8D,0x10001 CALL 0x001f5360 MOV dword ptr [RSP + 0x9c],EAX LAB_0017710c: JMP 0x0017724d caseD_9f: MOV RSI,qword ptr [RSP + 0xa0] LEA RDI,[RSP + 0x40] XOR EDX,EDX CALL 0x001f16d0 MOV RAX,-0x8000000000000000 CMP qword ptr [RSP + 0x40],RAX JNZ 0x00177145 MOV RAX,-0x7fffffffffffffff MOV qword ptr [RSP + 0x40],RAX LAB_00177145: CMP dword ptr [RSP + 0x114],0xa0 JNZ 0x0017715e XOR EAX,EAX SUB RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x40],RAX LAB_0017715e: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xa8] CALL 0x001ec5b0 MOV dword ptr [RSP + 0x9c],EAX MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,0x3fffffffffffffff MOV ECX,0x1 CALL 0x001eee00 OR EAX,dword ptr [RSP + 0x9c] MOV dword ptr [RSP + 0x9c],EAX CMP qword ptr [RSP + 0x40],0x0 JGE 0x001771d4 MOV RDI,qword ptr [RSP + 0xb0] MOV ESI,0x2 CALL 0x001f0410 AND EAX,0x24 OR EAX,dword ptr [RSP + 0x9c] MOV dword ptr [RSP + 0x9c],EAX LAB_001771d4: JMP 0x0017724d caseD_a2: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x001f1060 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0017724d caseD_a4: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x001f0bd0 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0017724d caseD_a3: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xa0] CALL 0x001f1030 MOV dword ptr [RSP + 0x9c],EAX JMP 0x0017724d caseD_a1: CALL 0x0010e090 LAB_0017724d: MOV RDI,qword ptr [RSP + 0x118] MOV RSI,qword ptr [RSP + 0xa8] LEA RDX,[RSP + 0xe0] CALL 0x00168d90 MOV RDI,qword ptr [RSP + 0x118] MOV RSI,qword ptr [RSP + 0xa0] LEA RDX,[RSP + 0xb8] CALL 0x00168d90 CMP dword ptr [RSP + 0x9c],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001772eb MOV RDI,qword ptr [RSP + 0x118] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x118] MOV ESI,dword ptr [RSP + 0x9c] CALL 0x001776e0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV dword ptr [RSP + 0x134],0xffffffff JMP 0x00177343 LAB_001772eb: MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x118] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] CALL 0x00177780 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x20],RCX MOV qword ptr [RSP + 0x28],RDX MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RSP + 0x134],0x0 LAB_00177343: MOV EAX,dword ptr [RSP + 0x134] ADD RSP,0x138 RET
int4 js_binary_arith_bigint (long param_1,int param_2,int1 (*param_3) [16],int8 param_4,int8 param_5 ,int8 param_6,int8 param_7,int8 param_8) { int1 (*pauVar1) [16]; int iVar2; uint uVar3; int1 auVar4 [16]; long local_f8; int1 *local_f0; int1 local_e8 [40]; int1 local_c0 [16]; int1 local_b0 [16]; uint local_9c; long local_98; long local_90; int8 local_88; int1 local_80 [40]; int1 local_58 [40]; int1 (*local_30) [16]; int local_24; long local_20; int8 local_18; int8 local_10; int4 local_4; local_30 = param_3; local_24 = param_2; local_20 = param_1; local_18 = param_4; local_10 = param_5; local_90 = JS_ToBigIntFree(param_1,local_58,param_4,param_5); if (local_90 == 0) { JS_FreeValue(local_20,param_7,param_8); local_4 = 0xffffffff; } else { local_98 = JS_ToBigIntFree(local_20,local_80,param_7,param_8); if (local_98 == 0) { JS_FreeBigInt(local_20,local_90,local_58); local_4 = 0xffffffff; } else { local_c0 = JS_NewBigInt(local_20); local_b0 = local_c0; iVar2 = JS_IsException(local_c0._0_8_,local_c0._8_8_); if (iVar2 == 0) { local_88 = JS_GetBigInt(local_b0._0_8_,local_b0._8_8_); local_9c = 0; switch(local_24) { case 0x9a: local_9c = bf_mul(local_88,local_90,local_98,0x3fffffffffffffff,1); break; case 0x9b: local_f0 = local_e8; bf_init(*(int8 *)(local_20 + 0x1d0),local_f0); local_9c = bf_divrem(local_88,local_f0,local_90,local_98,0x3fffffffffffffff,1,1); bf_delete(local_f0); break; case 0x9c: local_9c = bf_rem(local_88,local_90,local_98,0x3fffffffffffffff,1); local_9c = local_9c & 1; break; case 0x9d: local_9c = bf_add(local_88,local_90,local_98,0x3fffffffffffffff,1); break; case 0x9e: local_9c = bf_sub(local_88,local_90,local_98,0x3fffffffffffffff,1); break; case 0x9f: case 0xa0: bf_get_int64(&local_f8,local_98,0); if (local_f8 == -0x8000000000000000) { local_f8 = -0x7fffffffffffffff; } if (local_24 == 0xa0) { local_f8 = -local_f8; } local_9c = bf_set(local_88,local_90); uVar3 = bf_mul_2exp(local_88,local_f8,0x3fffffffffffffff,1); local_9c = uVar3 | local_9c; if (local_f8 < 0) { uVar3 = bf_rint(local_88,2); local_9c = uVar3 & 0x24 | local_9c; } break; default: /* WARNING: Subroutine does not return */ abort(); case 0xa2: local_9c = bf_logic_and(local_88,local_90,local_98); break; case 0xa3: local_9c = bf_logic_xor(local_88,local_90,local_98); break; case 0xa4: local_9c = bf_logic_or(local_88,local_90,local_98); break; case 0xa5: if (*(int *)(local_98 + 8) == 0) { local_9c = bf_pow(local_88,local_90,local_98,0x3fffffffffffffff,0x10001); } else { local_9c = 1; } } JS_FreeBigInt(local_20,local_90,local_58); JS_FreeBigInt(local_20,local_98,local_80); pauVar1 = local_30; if (local_9c == 0) { auVar4 = JS_CompactBigInt(local_20,local_b0._0_8_,local_b0._8_8_); *pauVar1 = auVar4; local_4 = 0; } else { JS_FreeValue(local_20,local_b0._0_8_,local_b0._8_8_); throw_bf_exception(local_20,local_9c); local_4 = 0xffffffff; } } else { JS_FreeBigInt(local_20,local_90,local_58); JS_FreeBigInt(local_20,local_98,local_80); local_4 = 0xffffffff; } } } return local_4; }
9,021
js_binary_arith_bigint
bluesky950520[P]quickjs/quickjs.c
static int js_binary_arith_bigint(JSContext *ctx, OPCodeEnum op, JSValue *pres, JSValue op1, JSValue op2) { bf_t a_s, b_s, *r, *a, *b; int ret; JSValue res; a = JS_ToBigIntFree(ctx, &a_s, op1); if (!a) { JS_FreeValue(ctx, op2); return -1; } b = JS_ToBigIntFree(ctx, &b_s, op2); if (!b) { JS_FreeBigInt(ctx, a, &a_s); return -1; } res = JS_NewBigInt(ctx); if (JS_IsException(res)) { JS_FreeBigInt(ctx, a, &a_s); JS_FreeBigInt(ctx, b, &b_s); return -1; } r = JS_GetBigInt(res); ret = 0; switch(op) { case OP_add: ret = bf_add(r, a, b, BF_PREC_INF, BF_RNDZ); break; case OP_sub: ret = bf_sub(r, a, b, BF_PREC_INF, BF_RNDZ); break; case OP_mul: ret = bf_mul(r, a, b, BF_PREC_INF, BF_RNDZ); break; case OP_div: { bf_t rem_s, *rem = &rem_s; bf_init(ctx->bf_ctx, rem); ret = bf_divrem(r, rem, a, b, BF_PREC_INF, BF_RNDZ, BF_RNDZ); bf_delete(rem); } break; case OP_mod: ret = bf_rem(r, a, b, BF_PREC_INF, BF_RNDZ, BF_RNDZ) & BF_ST_INVALID_OP; break; case OP_pow: if (b->sign) { ret = BF_ST_INVALID_OP; } else { ret = bf_pow(r, a, b, BF_PREC_INF, BF_RNDZ | BF_POW_JS_QUIRKS); } break; /* logical operations */ case OP_shl: case OP_sar: { slimb_t v2; #if LIMB_BITS == 32 bf_get_int32(&v2, b, 0); if (v2 == INT32_MIN) v2 = INT32_MIN + 1; #else bf_get_int64(&v2, b, 0); if (v2 == INT64_MIN) v2 = INT64_MIN + 1; #endif if (op == OP_sar) v2 = -v2; ret = bf_set(r, a); ret |= bf_mul_2exp(r, v2, BF_PREC_INF, BF_RNDZ); if (v2 < 0) { ret |= bf_rint(r, BF_RNDD) & (BF_ST_OVERFLOW | BF_ST_MEM_ERROR); } } break; case OP_and: ret = bf_logic_and(r, a, b); break; case OP_or: ret = bf_logic_or(r, a, b); break; case OP_xor: ret = bf_logic_xor(r, a, b); break; default: abort(); } JS_FreeBigInt(ctx, a, &a_s); JS_FreeBigInt(ctx, b, &b_s); if (unlikely(ret)) { JS_FreeValue(ctx, res); throw_bf_exception(ctx, ret); return -1; } *pres = JS_CompactBigInt(ctx, res); return 0; }
O2
c
js_binary_arith_bigint: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx leaq 0x48(%rsp), %rsi movq %rcx, %rdx movq %r8, %rcx callq 0x3a61e movq 0xd0(%rsp), %rdx movq 0xd8(%rsp), %rcx testq %rax, %rax je 0x3dffa movq %rax, %r15 leaq 0x70(%rsp), %rsi movq %rbx, %rdi callq 0x3a61e testq %rax, %rax je 0x3e00a movq %rax, %r12 movq %rbx, %rdi callq 0x25965 movq %rdx, %r13 cmpl $0x6, %r13d jne 0x3e02f leaq 0x48(%rsp), %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x3a605 leaq 0x70(%rsp), %rdx movq %rbx, %rdi movq %r12, %rsi jmp 0x3e015 movq %rbx, %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x1bbce jmp 0x3e01a leaq 0x48(%rsp), %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x3a605 pushq $-0x1 popq %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leal -0x9a(%rbp), %edx cmpl $0xb, %edx ja 0x3e28c leaq 0x8(%rax), %rdi leaq 0x48eb7(%rip), %rcx # 0x86f00 movslq (%rcx,%rdx,4), %rdx addq %rcx, %rdx movq %rax, 0x18(%rsp) jmpq *%rdx movq %rdi, 0x10(%rsp) leaq 0x20(%rsp), %rdi movq %r12, %rsi xorl %edx, %edx callq 0x76253 leaq 0x20(%rsp), %rax movq (%rax), %rax movq %rax, %rcx negq %rcx setno %cl cmpl $0xa0, %ebp setne %dl testb %dl, %cl jne 0x3e0af movabsq $-0x7fffffffffffffff, %rcx # imm = 0x8000000000000001 cmpq %rcx, %rax cmovgq %rax, %rcx movq %rcx, %rax negq %rax cmpl $0xa0, %ebp cmovneq %rcx, %rax movq %rax, 0x20(%rsp) movq 0x10(%rsp), %rbp movq %rbp, %rdi movq %r15, %rsi callq 0x73216 movl %eax, 0xc(%rsp) movq 0x20(%rsp), %rsi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF pushq $0x1 popq %rcx movq %rbp, %rdi callq 0x74b92 movl %eax, %ebp orl 0xc(%rsp), %ebp cmpq $0x0, 0x20(%rsp) jns 0x3e22e pushq $0x2 popq %rsi movq 0x10(%rsp), %rdi callq 0x757ed andl $0x24, %eax orl %eax, %ebp jmp 0x3e22e movq %r15, %rsi movq %r12, %rdx callq 0x75bd4 jmp 0x3e22c cmpl $0x0, 0x8(%r12) je 0x3e211 pushq $0x1 popq %rbp jmp 0x3e22e movq %r15, %rsi movq %r12, %rdx callq 0x75f62 jmp 0x3e22c movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF pushq $0x1 popq %r8 movq %r15, %rsi movq %r12, %rdx callq 0x74fa7 jmp 0x3e22c movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF pushq $0x1 popq %r8 movq %r15, %rsi movq %r12, %rdx callq 0x74959 jmp 0x3e22c movq %r15, %rsi movq %r12, %rdx callq 0x75f6a jmp 0x3e22c movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF pushq $0x1 popq %r8 movq %r15, %rsi movq %r12, %rdx movl %r8d, %r9d callq 0x74fb3 movl %eax, %ebp andl $0x1, %ebp jmp 0x3e22e movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF pushq $0x1 popq %r8 movq %r15, %rsi movq %r12, %rdx callq 0x757f9 jmp 0x3e22c movq %rdi, %rbp movq 0x1d0(%rbx), %rdi leaq 0x20(%rsp), %rsi callq 0x730a2 movl $0x1, (%rsp) movabsq $0x3fffffffffffffff, %r8 # imm = 0x3FFFFFFFFFFFFFFF pushq $0x1 popq %r9 movq %rbp, %rdi leaq 0x20(%rsp), %rsi movq %r15, %rdx movq %r12, %rcx callq 0x74c0a movl %eax, %ebp leaq 0x20(%rsp), %rdi callq 0x38ea0 jmp 0x3e22e movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF movq %r15, %rsi movq %r12, %rdx movl $0x10001, %r8d # imm = 0x10001 callq 0x7881e movl %eax, %ebp leaq 0x48(%rsp), %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x3a605 leaq 0x70(%rsp), %rdx movq %rbx, %rdi movq %r12, %rsi callq 0x3a605 testl %ebp, %ebp jne 0x3e26d movq 0x18(%rsp), %rdi movq %r13, %rsi callq 0x3ae5b movq %rax, (%r14) movq %rdx, 0x8(%r14) xorl %eax, %eax jmp 0x3e01d movq %rbx, %rdi movq 0x18(%rsp), %rsi movq %r13, %rdx callq 0x1bbce movq %rbx, %rdi movl %ebp, %esi callq 0x3e3e7 jmp 0x3e01a callq 0xe090
js_binary_arith_bigint: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r14, rdx mov ebp, esi mov rbx, rdi lea rsi, [rsp+0C8h+var_80] mov rdx, rcx mov rcx, r8 call JS_ToBigIntFree mov rdx, [rsp+0C8h+arg_0] mov rcx, [rsp+0C8h+arg_8] test rax, rax jz short loc_3DFFA mov r15, rax lea rsi, [rsp+0C8h+var_58] mov rdi, rbx call JS_ToBigIntFree test rax, rax jz short loc_3E00A mov r12, rax mov rdi, rbx call JS_NewBigInt mov r13, rdx cmp r13d, 6 jnz short loc_3E02F lea rdx, [rsp+0C8h+var_80] mov rdi, rbx mov rsi, r15 call JS_FreeBigInt lea rdx, [rsp+0C8h+var_58] mov rdi, rbx mov rsi, r12 jmp short loc_3E015 loc_3DFFA: mov rdi, rbx mov rsi, rdx mov rdx, rcx call JS_FreeValue jmp short loc_3E01A loc_3E00A: lea rdx, [rsp+0C8h+var_80] mov rdi, rbx mov rsi, r15 loc_3E015: call JS_FreeBigInt loc_3E01A: push 0FFFFFFFFFFFFFFFFh pop rax loc_3E01D: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3E02F: lea edx, [rbp-9Ah]; switch 12 cases cmp edx, 0Bh ja def_3E055; jumptable 000000000003E055 default case, case 161 lea rdi, [rax+8] lea rcx, jpt_3E055 movsxd rdx, ds:(jpt_3E055 - 86F00h)[rcx+rdx*4] add rdx, rcx mov [rsp+0C8h+var_B0], rax jmp rdx; switch jump loc_3E057: mov [rsp+0C8h+var_B8], rdi; jumptable 000000000003E055 cases 159,160 lea rdi, [rsp+0C8h+var_A8] mov rsi, r12 xor edx, edx call bf_get_int64 lea rax, [rsp+0C8h+var_A8] mov rax, [rax] mov rcx, rax neg rcx setno cl cmp ebp, 0A0h setnz dl test cl, dl jnz short loc_3E0AF mov rcx, 8000000000000001h cmp rax, rcx cmovg rcx, rax mov rax, rcx neg rax cmp ebp, 0A0h cmovnz rax, rcx mov [rsp+0C8h+var_A8], rax loc_3E0AF: mov rbp, [rsp+0C8h+var_B8] mov rdi, rbp mov rsi, r15 call bf_set mov [rsp+0C8h+var_BC], eax mov rsi, [rsp+0C8h+var_A8] mov rdx, 3FFFFFFFFFFFFFFFh push 1 pop rcx mov rdi, rbp call bf_mul_2exp mov ebp, eax or ebp, [rsp+0C8h+var_BC] cmp [rsp+0C8h+var_A8], 0 jns loc_3E22E push 2 pop rsi mov rdi, [rsp+0C8h+var_B8] call bf_rint and eax, 24h or ebp, eax jmp loc_3E22E loc_3E106: mov rsi, r15; jumptable 000000000003E055 case 164 mov rdx, r12 call bf_logic_or jmp loc_3E22C loc_3E116: cmp dword ptr [r12+8], 0; jumptable 000000000003E055 case 165 jz loc_3E211 push 1 pop rbp jmp loc_3E22E loc_3E12A: mov rsi, r15; jumptable 000000000003E055 case 163 mov rdx, r12 call bf_logic_xor jmp loc_3E22C loc_3E13A: mov rcx, 3FFFFFFFFFFFFFFFh; jumptable 000000000003E055 case 158 push 1 pop r8 mov rsi, r15 mov rdx, r12 call bf_sub jmp loc_3E22C loc_3E158: mov rcx, 3FFFFFFFFFFFFFFFh; jumptable 000000000003E055 case 154 push 1 pop r8 mov rsi, r15 mov rdx, r12 call bf_mul jmp loc_3E22C loc_3E176: mov rsi, r15; jumptable 000000000003E055 case 162 mov rdx, r12 call bf_logic_and jmp loc_3E22C loc_3E186: mov rcx, 3FFFFFFFFFFFFFFFh; jumptable 000000000003E055 case 156 push 1 pop r8 mov rsi, r15 mov rdx, r12 mov r9d, r8d call bf_rem mov ebp, eax and ebp, 1 jmp loc_3E22E loc_3E1AC: mov rcx, 3FFFFFFFFFFFFFFFh; jumptable 000000000003E055 case 157 push 1 pop r8 mov rsi, r15 mov rdx, r12 call bf_add jmp short loc_3E22C loc_3E1C7: mov rbp, rdi; jumptable 000000000003E055 case 155 mov rdi, [rbx+1D0h] lea rsi, [rsp+0C8h+var_A8] call bf_init mov [rsp+0C8h+var_C8], 1 mov r8, 3FFFFFFFFFFFFFFFh push 1 pop r9 mov rdi, rbp lea rsi, [rsp+0C8h+var_A8] mov rdx, r15 mov rcx, r12 call bf_divrem mov ebp, eax lea rdi, [rsp+0C8h+var_A8] call bf_delete jmp short loc_3E22E loc_3E211: mov rcx, 3FFFFFFFFFFFFFFFh mov rsi, r15 mov rdx, r12 mov r8d, 10001h call bf_pow loc_3E22C: mov ebp, eax loc_3E22E: lea rdx, [rsp+0C8h+var_80] mov rdi, rbx mov rsi, r15 call JS_FreeBigInt lea rdx, [rsp+0C8h+var_58] mov rdi, rbx mov rsi, r12 call JS_FreeBigInt test ebp, ebp jnz short loc_3E26D mov rdi, [rsp+0C8h+var_B0] mov rsi, r13 call JS_CompactBigInt1 mov [r14], rax mov [r14+8], rdx xor eax, eax jmp loc_3E01D loc_3E26D: mov rdi, rbx mov rsi, [rsp+0C8h+var_B0] mov rdx, r13 call JS_FreeValue mov rdi, rbx mov esi, ebp call throw_bf_exception jmp loc_3E01A def_3E055: call _abort; jumptable 000000000003E055 default case, case 161
long long js_binary_arith_bigint( long long a1, int a2, long long *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, long long a15, long long a16) { long long v18; // rax long long v19; // r8 long long v20; // r9 __m128 v21; // xmm4 __m128 v22; // xmm5 long long *v23; // r15 long long v24; // rax long long v25; // r12 _DWORD *v26; // rax long long v27; // rdx long long v28; // r13 long long *v29; // rdx long long *v30; // rsi const char *v32; // rdi long long v33; // rcx long long v34; // rax long long v35; // rbp int v36; // eax int v37; // ebp long long v38; // rdx int v39; // [rsp+Ch] [rbp-BCh] _DWORD *v40; // [rsp+10h] [rbp-B8h] long long v41; // [rsp+18h] [rbp-B0h] long long v42[5]; // [rsp+20h] [rbp-A8h] BYREF long long v43[5]; // [rsp+48h] [rbp-80h] BYREF long long v44[11]; // [rsp+70h] [rbp-58h] BYREF v18 = JS_ToBigIntFree(a1, (long long)v43, a4, a5, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( v18 ) { v23 = (long long *)v18; v24 = JS_ToBigIntFree(a1, (long long)v44, a15, a16, v19, v20, a7, a8, a9, a10, v21, v22, a13, a14); if ( !v24 ) { v29 = v43; v30 = v23; goto LABEL_7; } v25 = v24; v26 = JS_NewBigInt(a1); v28 = v27; if ( (_DWORD)v27 == 6 ) { JS_FreeBigInt(a1, v23, v43); v29 = v44; v30 = (long long *)v25; LABEL_7: JS_FreeBigInt(a1, v30, v29); return -1LL; } v32 = (const char *)(v26 + 2); v41 = (long long)v26; switch ( a2 ) { case 154: v36 = bf_mul(v32, v23, v25, 0x3FFFFFFFFFFFFFFFLL, 1LL); goto LABEL_29; case 155: v37 = (_DWORD)v26 + 8; bf_init(*(_QWORD *)(a1 + 464), v42); LODWORD(v35) = bf_divrem(v37, (unsigned int)v42, (_DWORD)v23, v25, -1, 1, 1); bf_delete(v42); goto LABEL_30; case 156: v35 = bf_rem(v32, v23, v25, 0x3FFFFFFFFFFFFFFFLL, 1LL, 1LL) & 1; goto LABEL_30; case 157: v36 = bf_add(v32, v23, v25, 0x3FFFFFFFFFFFFFFFLL, 1LL); goto LABEL_29; case 158: v36 = bf_sub(v32, v23, v25, 0x3FFFFFFFFFFFFFFFLL, 1LL); goto LABEL_29; case 159: case 160: v40 = v26 + 2; bf_get_int64(v42, v25, 0LL); if ( ((a2 != 160) & !__OFSUB__(-v42[0], 1LL)) == 0 ) { v33 = 0x8000000000000001LL; if ( v42[0] != 0x8000000000000000LL && v42[0] != 0x8000000000000001LL ) v33 = v42[0]; v34 = -v33; if ( a2 != 160 ) v34 = v33; v42[0] = v34; } v39 = bf_set(v40, v23); LODWORD(v35) = v39 | bf_mul_2exp(v40, v42[0], 0x3FFFFFFFFFFFFFFFLL, 1LL); if ( v42[0] < 0 ) LODWORD(v35) = bf_rint(v40, 2LL) & 0x24 | v35; goto LABEL_30; case 162: v36 = bf_logic_and(v32, v23, v25); goto LABEL_29; case 163: v36 = bf_logic_xor(v32, v23, v25); goto LABEL_29; case 164: v36 = bf_logic_or(v32, v23, v25); goto LABEL_29; case 165: if ( *(_DWORD *)(v25 + 8) ) { LODWORD(v35) = 1; } else { v36 = bf_pow(v32, v23, v25, 0x3FFFFFFFFFFFFFFFLL, 65537LL); LABEL_29: LODWORD(v35) = v36; } LABEL_30: JS_FreeBigInt(a1, v23, v43); JS_FreeBigInt(a1, (long long *)v25, v44); if ( !(_DWORD)v35 ) { *a3 = JS_CompactBigInt1(v41, v28); a3[1] = v38; return 0LL; } JS_FreeValue(a1, v41, v28); throw_bf_exception(a1, (unsigned int)v35); break; default: abort(v32); } } else { JS_FreeValue(a1, a15, a16); } return -1LL; }
js_binary_arith_bigint: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R14,RDX MOV EBP,ESI MOV RBX,RDI LEA RSI,[RSP + 0x48] MOV RDX,RCX MOV RCX,R8 CALL 0x0013a61e MOV RDX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RSP + 0xd8] TEST RAX,RAX JZ 0x0013dffa MOV R15,RAX LEA RSI,[RSP + 0x70] MOV RDI,RBX CALL 0x0013a61e TEST RAX,RAX JZ 0x0013e00a MOV R12,RAX MOV RDI,RBX CALL 0x00125965 MOV R13,RDX CMP R13D,0x6 JNZ 0x0013e02f LEA RDX,[RSP + 0x48] MOV RDI,RBX MOV RSI,R15 CALL 0x0013a605 LEA RDX,[RSP + 0x70] MOV RDI,RBX MOV RSI,R12 JMP 0x0013e015 LAB_0013dffa: MOV RDI,RBX MOV RSI,RDX MOV RDX,RCX CALL 0x0011bbce JMP 0x0013e01a LAB_0013e00a: LEA RDX,[RSP + 0x48] MOV RDI,RBX MOV RSI,R15 LAB_0013e015: CALL 0x0013a605 LAB_0013e01a: PUSH -0x1 POP RAX LAB_0013e01d: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013e02f: LEA EDX,[RBP + -0x9a] CMP EDX,0xb JA 0x0013e28c LEA RDI,[RAX + 0x8] LEA RCX,[0x186f00] MOVSXD RDX,dword ptr [RCX + RDX*0x4] ADD RDX,RCX MOV qword ptr [RSP + 0x18],RAX switchD: JMP RDX caseD_9f: MOV qword ptr [RSP + 0x10],RDI LEA RDI,[RSP + 0x20] MOV RSI,R12 XOR EDX,EDX CALL 0x00176253 LEA RAX,[RSP + 0x20] MOV RAX,qword ptr [RAX] MOV RCX,RAX NEG RCX SETNO CL CMP EBP,0xa0 SETNZ DL TEST CL,DL JNZ 0x0013e0af MOV RCX,-0x7fffffffffffffff CMP RAX,RCX CMOVG RCX,RAX MOV RAX,RCX NEG RAX CMP EBP,0xa0 CMOVNZ RAX,RCX MOV qword ptr [RSP + 0x20],RAX LAB_0013e0af: MOV RBP,qword ptr [RSP + 0x10] MOV RDI,RBP MOV RSI,R15 CALL 0x00173216 MOV dword ptr [RSP + 0xc],EAX MOV RSI,qword ptr [RSP + 0x20] MOV RDX,0x3fffffffffffffff PUSH 0x1 POP RCX MOV RDI,RBP CALL 0x00174b92 MOV EBP,EAX OR EBP,dword ptr [RSP + 0xc] CMP qword ptr [RSP + 0x20],0x0 JNS 0x0013e22e PUSH 0x2 POP RSI MOV RDI,qword ptr [RSP + 0x10] CALL 0x001757ed AND EAX,0x24 OR EBP,EAX JMP 0x0013e22e caseD_a4: MOV RSI,R15 MOV RDX,R12 CALL 0x00175bd4 JMP 0x0013e22c caseD_a5: CMP dword ptr [R12 + 0x8],0x0 JZ 0x0013e211 PUSH 0x1 POP RBP JMP 0x0013e22e caseD_a3: MOV RSI,R15 MOV RDX,R12 CALL 0x00175f62 JMP 0x0013e22c caseD_9e: MOV RCX,0x3fffffffffffffff PUSH 0x1 POP R8 MOV RSI,R15 MOV RDX,R12 CALL 0x00174fa7 JMP 0x0013e22c caseD_9a: MOV RCX,0x3fffffffffffffff PUSH 0x1 POP R8 MOV RSI,R15 MOV RDX,R12 CALL 0x00174959 JMP 0x0013e22c caseD_a2: MOV RSI,R15 MOV RDX,R12 CALL 0x00175f6a JMP 0x0013e22c caseD_9c: MOV RCX,0x3fffffffffffffff PUSH 0x1 POP R8 MOV RSI,R15 MOV RDX,R12 MOV R9D,R8D CALL 0x00174fb3 MOV EBP,EAX AND EBP,0x1 JMP 0x0013e22e caseD_9d: MOV RCX,0x3fffffffffffffff PUSH 0x1 POP R8 MOV RSI,R15 MOV RDX,R12 CALL 0x001757f9 JMP 0x0013e22c caseD_9b: MOV RBP,RDI MOV RDI,qword ptr [RBX + 0x1d0] LEA RSI,[RSP + 0x20] CALL 0x001730a2 MOV dword ptr [RSP],0x1 MOV R8,0x3fffffffffffffff PUSH 0x1 POP R9 MOV RDI,RBP LEA RSI,[RSP + 0x20] MOV RDX,R15 MOV RCX,R12 CALL 0x00174c0a MOV EBP,EAX LEA RDI,[RSP + 0x20] CALL 0x00138ea0 JMP 0x0013e22e LAB_0013e211: MOV RCX,0x3fffffffffffffff MOV RSI,R15 MOV RDX,R12 MOV R8D,0x10001 CALL 0x0017881e LAB_0013e22c: MOV EBP,EAX LAB_0013e22e: LEA RDX,[RSP + 0x48] MOV RDI,RBX MOV RSI,R15 CALL 0x0013a605 LEA RDX,[RSP + 0x70] MOV RDI,RBX MOV RSI,R12 CALL 0x0013a605 TEST EBP,EBP JNZ 0x0013e26d MOV RDI,qword ptr [RSP + 0x18] MOV RSI,R13 CALL 0x0013ae5b MOV qword ptr [R14],RAX MOV qword ptr [R14 + 0x8],RDX XOR EAX,EAX JMP 0x0013e01d LAB_0013e26d: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,R13 CALL 0x0011bbce MOV RDI,RBX MOV ESI,EBP CALL 0x0013e3e7 JMP 0x0013e01a caseD_a1: CALL 0x0010e090
/* WARNING: Removing unreachable block (ram,0x0013e0a6) */ int8 js_binary_arith_bigint (long param_1,int param_2,int1 (*param_3) [16],int8 param_4,int8 param_5 ,int8 param_6,int8 param_7,int8 param_8) { long lVar1; uint uVar2; uint uVar3; long lVar4; long lVar5; long lVar6; long lVar7; int1 *puVar8; int1 auVar9 [16]; long local_a8 [5]; int1 local_80 [40]; int1 local_58 [40]; lVar4 = JS_ToBigIntFree(param_1,local_80,param_4,param_5); if (lVar4 == 0) { JS_FreeValue(param_1,param_7,param_8); } else { lVar5 = JS_ToBigIntFree(param_1,local_58); if (lVar5 == 0) { puVar8 = local_80; } else { auVar9 = JS_NewBigInt(param_1); lVar6 = auVar9._0_8_; if (auVar9._8_4_ != 6) { if (param_2 - 0x9aU < 0xc) { lVar1 = lVar6 + 8; switch(param_2) { case 0x9a: uVar3 = bf_mul(lVar1,lVar4,lVar5,0x3fffffffffffffff,1); break; case 0x9b: bf_init(*(int8 *)(param_1 + 0x1d0),local_a8); uVar3 = bf_divrem(lVar1,local_a8,lVar4,lVar5,0x3fffffffffffffff,1,1); bf_delete(local_a8); break; case 0x9c: uVar3 = bf_rem(lVar1,lVar4,lVar5,0x3fffffffffffffff,1,1); uVar3 = uVar3 & 1; break; case 0x9d: uVar3 = bf_add(lVar1,lVar4,lVar5,0x3fffffffffffffff,1); break; case 0x9e: uVar3 = bf_sub(lVar1,lVar4,lVar5,0x3fffffffffffffff,1); break; default: bf_get_int64(local_a8,lVar5,0); if (param_2 == 0xa0) { lVar7 = -0x7fffffffffffffff; if (-0x7fffffffffffffff < local_a8[0]) { lVar7 = local_a8[0]; } local_a8[0] = -lVar7; } uVar2 = bf_set(lVar1,lVar4); uVar3 = bf_mul_2exp(lVar1,local_a8[0],0x3fffffffffffffff,1); uVar3 = uVar3 | uVar2; if (local_a8[0] < 0) { uVar2 = bf_rint(lVar1,2); uVar3 = uVar3 | uVar2 & 0x24; } break; case 0xa1: goto switchD_0013e055_caseD_a1; case 0xa2: uVar3 = bf_logic_and(lVar1,lVar4,lVar5); break; case 0xa3: uVar3 = bf_logic_xor(lVar1,lVar4,lVar5); break; case 0xa4: uVar3 = bf_logic_or(lVar1,lVar4,lVar5); break; case 0xa5: if (*(int *)(lVar5 + 8) == 0) { uVar3 = bf_pow(lVar1,lVar4,lVar5,0x3fffffffffffffff,0x10001); } else { uVar3 = 1; } } JS_FreeBigInt(param_1,lVar4,local_80); JS_FreeBigInt(param_1,lVar5,local_58); if (uVar3 != 0) { JS_FreeValue(param_1,lVar6,auVar9._8_8_); throw_bf_exception(param_1,uVar3); return 0xffffffffffffffff; } auVar9 = JS_CompactBigInt1(lVar6,auVar9._8_8_); *param_3 = auVar9; return 0; } switchD_0013e055_caseD_a1: /* WARNING: Subroutine does not return */ abort(); } JS_FreeBigInt(param_1,lVar4,local_80); puVar8 = local_58; lVar4 = lVar5; } JS_FreeBigInt(param_1,lVar4,puVar8); } return 0xffffffffffffffff; }
9,022
js_regexp_get_source
bluesky950520[P]quickjs/quickjs.c
static JSValue js_regexp_get_source(JSContext *ctx, JSValue this_val) { JSRegExp *re; JSString *p; StringBuffer b_s, *b = &b_s; int i, n, c, c2, bra; if (JS_VALUE_GET_TAG(this_val) != JS_TAG_OBJECT) return JS_ThrowTypeErrorNotAnObject(ctx); if (js_same_value(ctx, this_val, ctx->class_proto[JS_CLASS_REGEXP])) goto empty_regex; re = js_get_regexp(ctx, this_val, TRUE); if (!re) return JS_EXCEPTION; p = re->pattern; if (p->len == 0) { empty_regex: return js_new_string8(ctx, "(?:)"); } string_buffer_init2(ctx, b, p->len, p->is_wide_char); /* Escape '/' and newline sequences as needed */ bra = 0; for (i = 0, n = p->len; i < n;) { c2 = -1; switch (c = string_get(p, i++)) { case '\\': if (i < n) c2 = string_get(p, i++); break; case ']': bra = 0; break; case '[': if (!bra) { if (i < n && string_get(p, i) == ']') c2 = string_get(p, i++); bra = 1; } break; case '\n': c = '\\'; c2 = 'n'; break; case '\r': c = '\\'; c2 = 'r'; break; case '/': if (!bra) { c = '\\'; c2 = '/'; } break; } string_buffer_putc16(b, c); if (c2 >= 0) string_buffer_putc16(b, c2); } return string_buffer_end(b); }
O2
c
js_regexp_get_source: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r14 movq %rdi, %r15 cmpl $-0x1, %r14d jne 0x41bb4 movq %rsi, %r12 movq 0x40(%r15), %rax movq 0x120(%rax), %rcx movq 0x128(%rax), %r8 movq %r15, %rdi movq %r14, %rdx callq 0x23ae2 testl %eax, %eax je 0x41bd7 leaq 0x4819d(%rip), %rsi # 0x89d3a movq %r15, %rdi callq 0x25406 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx jmp 0x41bc3 movq %r15, %rdi callq 0x21191 pushq $0x6 popq %rdx xorl %eax, %eax xorl %ecx, %ecx movl %eax, %eax orq %rcx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x1 popq %rcx movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x44ec0 testq %rax, %rax je 0x41bbc movq (%rax), %r12 movl 0x4(%r12), %ecx movl %ecx, %edx andl $0x7fffffff, %edx # imm = 0x7FFFFFFF je 0x41b96 shrl $0x1f, %ecx leaq 0x8(%rsp), %r14 movq %r15, %rdi movq %r14, %rsi callq 0x305f7 movl $0x7fffffff, %r15d # imm = 0x7FFFFFFF andl 0x4(%r12), %r15d xorl %ebx, %ebx xorl %r13d, %r13d cmpl %r15d, %ebx jge 0x41d27 movslq %ebx, %rcx movq 0x4(%r12), %rdx testl %edx, %edx js 0x41c3f movzbl 0x18(%r12,%rcx), %esi jmp 0x41c45 movzwl 0x18(%r12,%rcx,2), %esi leaq 0x1(%rcx), %rax cmpl $0xa, %esi je 0x41cb7 cmpl $0xd, %esi je 0x41cae cmpl $0x2f, %esi je 0x41c7b cmpl $0x5b, %esi je 0x41c8f cmpl $0x5d, %esi je 0x41c86 cmpl $0x5c, %esi jne 0x41caa cmpl %r15d, %eax jge 0x41cca addl $0x2, %ebx testl %edx, %edx js 0x41ce0 movzbl 0x18(%r12,%rax), %ebp jmp 0x41ce6 testl %r13d, %r13d je 0x41cd4 movl %eax, %ebx pushq $0x2f jmp 0x41cc4 xorl %r13d, %r13d movl %eax, %ebx pushq $0x5d jmp 0x41cce testl %r13d, %r13d jne 0x41cc0 cmpl %r15d, %eax jge 0x41cc0 addl $0x2, %ebx xorl %ebp, %ebp testl %edx, %edx js 0x41ceb cmpb $0x5d, 0x18(%r12,%rax) jmp 0x41cf2 movl %eax, %ebx jmp 0x41ccf movl %eax, %ebx pushq $0x5c popq %rsi pushq $0x72 jmp 0x41cd1 movl %eax, %ebx pushq $0x5c popq %rsi pushq $0x6e jmp 0x41cd1 movl %eax, %ebx pushq $0x5b popq %rsi pushq $-0x1 popq %rbp jmp 0x41d04 movl %eax, %ebx pushq $0x5c popq %rsi pushq $-0x1 popq %rbp jmp 0x41d08 xorl %r13d, %r13d movl %eax, %ebx pushq $0x5c popq %rsi pushq $0x2f jmp 0x41cd1 movzwl 0x1a(%r12,%rcx,2), %ebp pushq $0x5c popq %rsi jmp 0x41d08 cmpw $0x5d, 0x1a(%r12,%rcx,2) setne %cl je 0x41cf9 movl %eax, %ebx movb %cl, %bpl negl %ebp orl $0x5d, %ebp pushq $0x5b popq %rsi pushq $0x1 popq %r13 movq %r14, %rdi callq 0x418a6 testl %ebp, %ebp js 0x41c22 movq %r14, %rdi movl %ebp, %esi callq 0x418a6 jmp 0x41c22 leaq 0x8(%rsp), %rdi callq 0x30684 jmp 0x41ba5
js_regexp_get_source: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rdx mov r15, rdi cmp r14d, 0FFFFFFFFh jnz short loc_41BB4 mov r12, rsi mov rax, [r15+40h] mov rcx, [rax+120h] mov r8, [rax+128h] mov rdi, r15 mov rdx, r14 call js_same_value test eax, eax jz short loc_41BD7 loc_41B96: lea rsi, asc_89D3A; "(?:)" mov rdi, r15 call js_new_string8 loc_41BA5: mov rcx, 0FFFFFFFF00000000h and rcx, rax jmp short loc_41BC3 loc_41BB4: mov rdi, r15 call JS_ThrowTypeErrorNotAnObject loc_41BBC: push 6 pop rdx xor eax, eax xor ecx, ecx loc_41BC3: mov eax, eax or rax, rcx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_41BD7: push 1 pop rcx mov rdi, r15 mov rsi, r12 mov rdx, r14 call js_get_regexp test rax, rax jz short loc_41BBC mov r12, [rax] mov ecx, [r12+4] mov edx, ecx and edx, 7FFFFFFFh jz short loc_41B96 shr ecx, 1Fh lea r14, [rsp+58h+var_50] mov rdi, r15 mov rsi, r14 call string_buffer_init2 mov r15d, 7FFFFFFFh and r15d, [r12+4] xor ebx, ebx xor r13d, r13d loc_41C22: cmp ebx, r15d jge loc_41D27 movsxd rcx, ebx mov rdx, [r12+4] test edx, edx js short loc_41C3F movzx esi, byte ptr [r12+rcx+18h] jmp short loc_41C45 loc_41C3F: movzx esi, word ptr [r12+rcx*2+18h] loc_41C45: lea rax, [rcx+1] cmp esi, 0Ah jz short loc_41CB7 cmp esi, 0Dh jz short loc_41CAE cmp esi, 2Fh ; '/' jz short loc_41C7B cmp esi, 5Bh ; '[' jz short loc_41C8F cmp esi, 5Dh ; ']' jz short loc_41C86 cmp esi, 5Ch ; '\' jnz short loc_41CAA cmp eax, r15d jge short loc_41CCA add ebx, 2 test edx, edx js short loc_41CE0 movzx ebp, byte ptr [r12+rax+18h] jmp short loc_41CE6 loc_41C7B: test r13d, r13d jz short loc_41CD4 mov ebx, eax push 2Fh ; '/' jmp short loc_41CC4 loc_41C86: xor r13d, r13d mov ebx, eax push 5Dh ; ']' jmp short loc_41CCE loc_41C8F: test r13d, r13d jnz short loc_41CC0 cmp eax, r15d jge short loc_41CC0 add ebx, 2 xor ebp, ebp test edx, edx js short loc_41CEB cmp byte ptr [r12+rax+18h], 5Dh ; ']' jmp short loc_41CF2 loc_41CAA: mov ebx, eax jmp short loc_41CCF loc_41CAE: mov ebx, eax push 5Ch ; '\' pop rsi push 72h ; 'r' jmp short loc_41CD1 loc_41CB7: mov ebx, eax push 5Ch ; '\' pop rsi push 6Eh ; 'n' jmp short loc_41CD1 loc_41CC0: mov ebx, eax push 5Bh ; '[' loc_41CC4: pop rsi push 0FFFFFFFFFFFFFFFFh pop rbp jmp short loc_41D04 loc_41CCA: mov ebx, eax push 5Ch ; '\' loc_41CCE: pop rsi loc_41CCF: push 0FFFFFFFFFFFFFFFFh loc_41CD1: pop rbp jmp short loc_41D08 loc_41CD4: xor r13d, r13d mov ebx, eax push 5Ch ; '\' pop rsi push 2Fh ; '/' jmp short loc_41CD1 loc_41CE0: movzx ebp, word ptr [r12+rcx*2+1Ah] loc_41CE6: push 5Ch ; '\' pop rsi jmp short loc_41D08 loc_41CEB: cmp word ptr [r12+rcx*2+1Ah], 5Dh ; ']' loc_41CF2: setnz cl jz short loc_41CF9 mov ebx, eax loc_41CF9: mov bpl, cl neg ebp or ebp, 5Dh push 5Bh ; '[' pop rsi loc_41D04: push 1 pop r13 loc_41D08: mov rdi, r14 call string_buffer_putc16 test ebp, ebp js loc_41C22 mov rdi, r14 mov esi, ebp call string_buffer_putc16 jmp loc_41C22 loc_41D27: lea rdi, [rsp+58h+var_50] call string_buffer_end jmp loc_41BA5
unsigned long long js_regexp_get_source( long long a1, _DWORD *a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v15; // rax unsigned long long v16; // rcx long long regexp; // rax long long v19; // r12 int v20; // r15d int v21; // ebx int v22; // r13d long long v23; // rcx long long v24; // rdx unsigned int v25; // esi long long v26; // rax signed int v27; // ebp int v28; // ebp bool v29; // zf int v30; // [rsp-8h] [rbp-60h] int v31; // [rsp-8h] [rbp-60h] int v32; // [rsp-8h] [rbp-60h] char v33; // [rsp+0h] [rbp-58h] long long v34[10]; // [rsp+8h] [rbp-50h] BYREF if ( (_DWORD)a3 != -1 ) { JS_ThrowTypeErrorNotAnObject(a1, a7, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, a5, a6, v33); goto LABEL_6; } if ( (unsigned int)js_same_value( a1, a2, a3, *(_DWORD **)(*(_QWORD *)(a1 + 64) + 288LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 296LL)) ) { LABEL_3: v15 = js_new_string8(a1, (long long)"(?:)"); goto LABEL_4; } regexp = js_get_regexp(a1, a2, a3, 1LL); if ( !regexp ) { LABEL_6: LODWORD(v15) = 0; v16 = 0LL; return v16 | (unsigned int)v15; } v19 = *(_QWORD *)regexp; if ( (*(_DWORD *)(*(_QWORD *)regexp + 4LL) & 0x7FFFFFFF) == 0 ) goto LABEL_3; string_buffer_init2( a1, (long long)v34, *(_DWORD *)(*(_QWORD *)regexp + 4LL) & 0x7FFFFFFF, *(_DWORD *)(*(_QWORD *)regexp + 4LL) >> 31); v20 = *(_DWORD *)(v19 + 4) & 0x7FFFFFFF; v21 = 0; v22 = 0; while ( v21 < v20 ) { v23 = v21; v24 = *(_QWORD *)(v19 + 4); if ( (int)v24 < 0 ) v25 = *(unsigned __int16 *)(v19 + 2LL * v21 + 24); else v25 = *(unsigned __int8 *)(v19 + v21 + 24); v26 = v21 + 1LL; switch ( v25 ) { case 0xAu: ++v21; v25 = 92; v32 = 110; goto LABEL_39; case 0xDu: ++v21; v25 = 92; v32 = 114; goto LABEL_39; case 0x2Fu: if ( v22 ) { ++v21; v30 = 47; goto LABEL_35; } v22 = 0; ++v21; v25 = 92; v32 = 47; goto LABEL_39; case 0x5Bu: if ( v22 || (int)v26 >= v20 ) { ++v21; v30 = 91; LABEL_35: v25 = v30; v27 = -1; } else { v21 += 2; v28 = 0; if ( (int)v24 < 0 ) v29 = *(_WORD *)(v19 + 2 * v23 + 26) == 93; else v29 = *(_BYTE *)(v19 + v26 + 24) == 93; if ( !v29 ) v21 = v26; LOBYTE(v28) = !v29; v27 = -v28 | 0x5D; v25 = 91; } v22 = 1; goto LABEL_48; case 0x5Du: v22 = 0; ++v21; v31 = 93; goto LABEL_37; } if ( v25 != 92 ) { ++v21; goto LABEL_38; } if ( (int)v26 >= v20 ) { ++v21; v31 = 92; LABEL_37: v25 = v31; LABEL_38: v32 = -1; LABEL_39: v27 = v32; goto LABEL_48; } v21 += 2; if ( (int)v24 < 0 ) v27 = *(unsigned __int16 *)(v19 + 2 * v23 + 26); else v27 = *(unsigned __int8 *)(v19 + v26 + 24); v25 = 92; LABEL_48: string_buffer_putc16((long long)v34, v25); if ( v27 >= 0 ) string_buffer_putc16((long long)v34, v27); } v15 = string_buffer_end(v34); LABEL_4: v16 = v15 & 0xFFFFFFFF00000000LL; return v16 | (unsigned int)v15; }
js_regexp_get_source: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RDX MOV R15,RDI CMP R14D,-0x1 JNZ 0x00141bb4 MOV R12,RSI MOV RAX,qword ptr [R15 + 0x40] MOV RCX,qword ptr [RAX + 0x120] MOV R8,qword ptr [RAX + 0x128] MOV RDI,R15 MOV RDX,R14 CALL 0x00123ae2 TEST EAX,EAX JZ 0x00141bd7 LAB_00141b96: LEA RSI,[0x189d3a] MOV RDI,R15 CALL 0x00125406 LAB_00141ba5: MOV RCX,-0x100000000 AND RCX,RAX JMP 0x00141bc3 LAB_00141bb4: MOV RDI,R15 CALL 0x00121191 LAB_00141bbc: PUSH 0x6 POP RDX XOR EAX,EAX XOR ECX,ECX LAB_00141bc3: MOV EAX,EAX OR RAX,RCX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00141bd7: PUSH 0x1 POP RCX MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 CALL 0x00144ec0 TEST RAX,RAX JZ 0x00141bbc MOV R12,qword ptr [RAX] MOV ECX,dword ptr [R12 + 0x4] MOV EDX,ECX AND EDX,0x7fffffff JZ 0x00141b96 SHR ECX,0x1f LEA R14,[RSP + 0x8] MOV RDI,R15 MOV RSI,R14 CALL 0x001305f7 MOV R15D,0x7fffffff AND R15D,dword ptr [R12 + 0x4] XOR EBX,EBX XOR R13D,R13D LAB_00141c22: CMP EBX,R15D JGE 0x00141d27 MOVSXD RCX,EBX MOV RDX,qword ptr [R12 + 0x4] TEST EDX,EDX JS 0x00141c3f MOVZX ESI,byte ptr [R12 + RCX*0x1 + 0x18] JMP 0x00141c45 LAB_00141c3f: MOVZX ESI,word ptr [R12 + RCX*0x2 + 0x18] LAB_00141c45: LEA RAX,[RCX + 0x1] CMP ESI,0xa JZ 0x00141cb7 CMP ESI,0xd JZ 0x00141cae CMP ESI,0x2f JZ 0x00141c7b CMP ESI,0x5b JZ 0x00141c8f CMP ESI,0x5d JZ 0x00141c86 CMP ESI,0x5c JNZ 0x00141caa CMP EAX,R15D JGE 0x00141cca ADD EBX,0x2 TEST EDX,EDX JS 0x00141ce0 MOVZX EBP,byte ptr [R12 + RAX*0x1 + 0x18] JMP 0x00141ce6 LAB_00141c7b: TEST R13D,R13D JZ 0x00141cd4 MOV EBX,EAX PUSH 0x2f JMP 0x00141cc4 LAB_00141c86: XOR R13D,R13D MOV EBX,EAX PUSH 0x5d JMP 0x00141cce LAB_00141c8f: TEST R13D,R13D JNZ 0x00141cc0 CMP EAX,R15D JGE 0x00141cc0 ADD EBX,0x2 XOR EBP,EBP TEST EDX,EDX JS 0x00141ceb CMP byte ptr [R12 + RAX*0x1 + 0x18],0x5d JMP 0x00141cf2 LAB_00141caa: MOV EBX,EAX JMP 0x00141ccf LAB_00141cae: MOV EBX,EAX PUSH 0x5c POP RSI PUSH 0x72 JMP 0x00141cd1 LAB_00141cb7: MOV EBX,EAX PUSH 0x5c POP RSI PUSH 0x6e JMP 0x00141cd1 LAB_00141cc0: MOV EBX,EAX PUSH 0x5b LAB_00141cc4: POP RSI PUSH -0x1 POP RBP JMP 0x00141d04 LAB_00141cca: MOV EBX,EAX PUSH 0x5c LAB_00141cce: POP RSI LAB_00141ccf: PUSH -0x1 LAB_00141cd1: POP RBP JMP 0x00141d08 LAB_00141cd4: XOR R13D,R13D MOV EBX,EAX PUSH 0x5c POP RSI PUSH 0x2f JMP 0x00141cd1 LAB_00141ce0: MOVZX EBP,word ptr [R12 + RCX*0x2 + 0x1a] LAB_00141ce6: PUSH 0x5c POP RSI JMP 0x00141d08 LAB_00141ceb: CMP word ptr [R12 + RCX*0x2 + 0x1a],0x5d LAB_00141cf2: SETNZ CL JZ 0x00141cf9 MOV EBX,EAX LAB_00141cf9: MOV BPL,CL NEG EBP OR EBP,0x5d PUSH 0x5b POP RSI LAB_00141d04: PUSH 0x1 POP R13 LAB_00141d08: MOV RDI,R14 CALL 0x001418a6 TEST EBP,EBP JS 0x00141c22 MOV RDI,R14 MOV ESI,EBP CALL 0x001418a6 JMP 0x00141c22 LAB_00141d27: LEA RDI,[RSP + 0x8] CALL 0x00130684 JMP 0x00141ba5
ulong js_regexp_get_source(long param_1,int8 param_2,int8 param_3) { long lVar1; long lVar2; int iVar3; ulong uVar4; long *plVar5; ulong uVar6; long lVar7; uint uVar8; int iVar9; int iVar10; uint uVar11; ushort uVar12; bool bVar13; int1 local_50 [32]; if ((int)param_3 == -1) { iVar3 = js_same_value(param_1,param_2,param_3,*(int8 *)(*(long *)(param_1 + 0x40) + 0x120) ,*(int8 *)(*(long *)(param_1 + 0x40) + 0x128)); if (iVar3 == 0) { plVar5 = (long *)js_get_regexp(param_1,param_2,param_3,1); if (plVar5 == (long *)0x0) goto LAB_00141bbc; lVar2 = *plVar5; uVar8 = *(uint *)(lVar2 + 4) & 0x7fffffff; if (uVar8 == 0) goto LAB_00141b96; string_buffer_init2(param_1,local_50,uVar8,*(uint *)(lVar2 + 4) >> 0x1f); uVar8 = *(uint *)(lVar2 + 4) & 0x7fffffff; iVar3 = 0; bVar13 = false; while (iVar3 < (int)uVar8) { lVar7 = (long)iVar3; iVar9 = (int)*(int8 *)(lVar2 + 4); if (iVar9 < 0) { uVar12 = *(ushort *)(lVar2 + 0x18 + lVar7 * 2); } else { uVar12 = (ushort)*(byte *)(lVar2 + 0x18 + lVar7); } lVar1 = lVar7 + 1; iVar10 = (int)lVar1; if (uVar12 == 10) { uVar12 = 0x5c; uVar11 = 0x6e; iVar3 = iVar10; } else if (uVar12 == 0xd) { uVar12 = 0x5c; uVar11 = 0x72; iVar3 = iVar10; } else if (uVar12 == 0x2f) { if (bVar13) { uVar12 = 0x2f; LAB_00141cc4: uVar11 = 0xffffffff; goto LAB_00141d04; } bVar13 = false; uVar12 = 0x5c; uVar11 = 0x2f; iVar3 = iVar10; } else if (uVar12 == 0x5b) { if ((bVar13) || ((int)uVar8 <= iVar10)) { uVar12 = 0x5b; goto LAB_00141cc4; } if (iVar9 < 0) { bVar13 = *(short *)(lVar2 + 0x1a + lVar7 * 2) == 0x5d; } else { bVar13 = *(char *)(lVar2 + 0x18 + lVar1) == ']'; } iVar3 = iVar3 + 2; if (!bVar13) { iVar3 = iVar10; } iVar10 = iVar3; uVar11 = -(uint)!bVar13 | 0x5d; uVar12 = 0x5b; LAB_00141d04: bVar13 = true; iVar3 = iVar10; } else { if (uVar12 == 0x5d) { bVar13 = false; uVar12 = 0x5d; } else if (uVar12 == 0x5c) { if (iVar10 < (int)uVar8) { if (iVar9 < 0) { uVar11 = (uint)*(ushort *)(lVar2 + 0x1a + lVar7 * 2); } else { uVar11 = (uint)*(byte *)(lVar2 + 0x18 + lVar1); } uVar12 = 0x5c; iVar3 = iVar3 + 2; goto LAB_00141d08; } uVar12 = 0x5c; } uVar11 = 0xffffffff; iVar3 = iVar10; } LAB_00141d08: string_buffer_putc16(local_50,uVar12); if (-1 < (int)uVar11) { string_buffer_putc16(local_50,uVar11); } } uVar4 = string_buffer_end(local_50); } else { LAB_00141b96: uVar4 = js_new_string8(param_1,&DAT_00189d3a); } uVar6 = uVar4 & 0xffffffff00000000; } else { JS_ThrowTypeErrorNotAnObject(param_1); LAB_00141bbc: uVar4 = 0; uVar6 = 0; } return uVar4 & 0xffffffff | uVar6; }
9,023
fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format-inl.h
FMT_FUNC detail::utf8_to_utf16::utf8_to_utf16(string_view s) { for_each_codepoint(s, [this](uint32_t cp, string_view) { if (cp == invalid_code_point) FMT_THROW(std::runtime_error("invalid utf8")); if (cp <= 0xFFFF) { buffer_.push_back(static_cast<wchar_t>(cp)); } else { cp -= 0x10000; buffer_.push_back(static_cast<wchar_t>(0xD800 + (cp >> 10))); buffer_.push_back(static_cast<wchar_t>(0xDC00 + (cp & 0x3FF))); } return true; }); buffer_.push_back(0); }
O3
c
fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx movq $0x0, 0x10(%rdi) leaq 0x723eb(%rip), %rax # 0xb2bd8 addq $0x10, %rax movq %rax, (%rdi) leaq 0x20(%rdi), %r12 movq %r12, 0x8(%rdi) movq $0x1f4, 0x18(%rdi) # imm = 0x1F4 movq %rsi, %rax cmpq $0x4, %rdx jb 0x4082f leaq (%r14,%r15), %r13 addq $-0x3, %r13 movq %r14, %rax cmpq %r13, %rax jae 0x4082f movq %rbx, %rdi movq %rax, %rsi callq 0x40c82 testq %rax, %rax jne 0x40818 jmp 0x40871 addq %r15, %r14 subq %rax, %r14 je 0x40871 xorl %ecx, %ecx leaq 0x8(%rsp), %r15 movl %ecx, 0x3(%r15) movl %ecx, (%r15) movq %r15, %rdi movq %rax, %rsi movq %r14, %rdx callq 0x110c0 movq %r15, %rax movq %rbx, %rdi movq %rax, %rsi callq 0x40c82 testq %rax, %rax je 0x40871 movq %rax, %rcx subq %r15, %rcx cmpq %r14, %rcx jl 0x40856 movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x4088f movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movl $0x0, (%rcx,%rax,4) addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x408b0 jmp 0x408b0 movq %rax, %r14 movq 0x8(%rbx), %rdi cmpq %r12, %rdi je 0x408c9 movq 0x18(%rbx), %rsi shlq $0x2, %rsi callq 0x11120 movq %r14, %rdi callq 0x11760
_ZN3fmt3v106detail13utf8_to_utf16C2ENS0_17basic_string_viewIcEE: push r15; Alternative name is 'fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)' push r14 push r13 push r12 push rbx sub rsp, 10h mov r15, rdx mov r14, rsi mov rbx, rdi mov qword ptr [rdi+10h], 0 lea rax, _ZTVN3fmt3v1019basic_memory_bufferIwLm500ESaIwEEE; `vtable for'fmt::v10::basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>> add rax, 10h mov [rdi], rax lea r12, [rdi+20h] mov [rdi+8], r12 mov qword ptr [rdi+18h], 1F4h mov rax, rsi cmp rdx, 4 jb short loc_4082F lea r13, [r14+r15] add r13, 0FFFFFFFFFFFFFFFDh mov rax, r14 loc_40818: cmp rax, r13 jnb short loc_4082F mov rdi, rbx mov rsi, rax call _ZZN3fmt3v106detail18for_each_codepointIZNS1_13utf8_to_utf16C1ENS0_17basic_string_viewIcEEE3$_0EEvS5_T_ENKUlPKcS9_E_clES9_S9_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>,fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0)::{lambda(char const*,char const*)#1}::operator()(char const*,char const*) test rax, rax jnz short loc_40818 jmp short loc_40871 loc_4082F: add r14, r15 sub r14, rax jz short loc_40871 xor ecx, ecx lea r15, [rsp+38h+var_30] mov [r15+3], ecx mov [r15], ecx mov rdi, r15 mov rsi, rax mov rdx, r14 call _memcpy mov rax, r15 loc_40856: mov rdi, rbx mov rsi, rax call _ZZN3fmt3v106detail18for_each_codepointIZNS1_13utf8_to_utf16C1ENS0_17basic_string_viewIcEEE3$_0EEvS5_T_ENKUlPKcS9_E_clES9_S9_; fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>,fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0)::{lambda(char const*,char const*)#1}::operator()(char const*,char const*) test rax, rax jz short loc_40871 mov rcx, rax sub rcx, r15 cmp rcx, r14 jl short loc_40856 loc_40871: mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_4088F mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_4088F: mov rcx, [rbx+8] mov [rbx+10h], rsi mov dword ptr [rcx+rax*4], 0 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short loc_408B0 jmp short $+2 loc_408B0: mov r14, rax mov rdi, [rbx+8]; void * cmp rdi, r12 jz short loc_408C9 mov rsi, [rbx+18h] shl rsi, 2; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_408C9: mov rdi, r14 call __Unwind_Resume
long long fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(_QWORD *a1, unsigned long long a2, unsigned long long a3) { unsigned long long v4; // rax unsigned long long v5; // r13 signed long long v6; // r14 _BYTE *v7; // rax long long result; // rax long long v9; // rsi long long v10; // rcx _DWORD v11[12]; // [rsp+8h] [rbp-30h] BYREF a1[2] = 0LL; *a1 = &`vtable for'fmt::v10::basic_memory_buffer<wchar_t,500ul,std::allocator<wchar_t>> + 2; a1[1] = a1 + 4; a1[3] = 500LL; v4 = a2; if ( a3 >= 4 ) { v5 = a2 + a3 - 3; v4 = a2; while ( v4 < v5 ) { v4 = fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>,fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0)::{lambda(char const*,char const*)#1}::operator()( a1, v4); if ( !v4 ) goto LABEL_10; } } v6 = a3 + a2 - v4; if ( v6 ) { *(_DWORD *)((char *)v11 + 3) = 0; v11[0] = 0; memcpy(v11); v7 = v11; do v7 = (_BYTE *)fmt::v10::detail::for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>,fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0)::{lambda(char const*,char const*)#1}::operator()( a1, v7); while ( v7 && v7 - (_BYTE *)v11 < v6 ); } LABEL_10: result = a1[2]; v9 = result + 1; if ( a1[3] < (unsigned long long)(result + 1) ) { (*(void ( **)(_QWORD *))*a1)(a1); result = a1[2]; v9 = result + 1; } v10 = a1[1]; a1[2] = v9; *(_DWORD *)(v10 + 4 * result) = 0; return result; }
utf8_to_utf16: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15,RDX MOV R14,RSI MOV RBX,RDI MOV qword ptr [RDI + 0x10],0x0 LEA RAX,[0x1b2bd8] ADD RAX,0x10 MOV qword ptr [RDI],RAX LEA R12,[RDI + 0x20] MOV qword ptr [RDI + 0x8],R12 MOV qword ptr [RDI + 0x18],0x1f4 MOV RAX,RSI CMP RDX,0x4 JC 0x0014082f LEA R13,[R14 + R15*0x1] ADD R13,-0x3 MOV RAX,R14 LAB_00140818: CMP RAX,R13 JNC 0x0014082f LAB_0014081d: MOV RDI,RBX MOV RSI,RAX CALL 0x00140c82 LAB_00140828: TEST RAX,RAX JNZ 0x00140818 JMP 0x00140871 LAB_0014082f: ADD R14,R15 SUB R14,RAX JZ 0x00140871 XOR ECX,ECX LEA R15,[RSP + 0x8] MOV dword ptr [R15 + 0x3],ECX MOV dword ptr [R15],ECX MOV RDI,R15 MOV RSI,RAX MOV RDX,R14 CALL 0x001110c0 MOV RAX,R15 LAB_00140856: MOV RDI,RBX MOV RSI,RAX CALL 0x00140c82 TEST RAX,RAX JZ 0x00140871 MOV RCX,RAX SUB RCX,R15 CMP RCX,R14 JL 0x00140856 LAB_00140871: MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x0014088f MOV RAX,qword ptr [RBX] LAB_00140882: MOV RDI,RBX CALL qword ptr [RAX] LAB_00140887: MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_0014088f: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV dword ptr [RCX + RAX*0x4],0x0 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>) */ void __thiscall fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(utf8_to_utf16 *this,char *param_2,ulong param_3) { char *pcVar1; long lVar2; ulong uVar3; char local_30 [8]; *(int8 *)(this + 0x10) = 0; *(int ***)this = &PTR_grow_001b2be8; *(utf8_to_utf16 **)(this + 8) = this + 0x20; *(int8 *)(this + 0x18) = 500; pcVar1 = param_2; if (param_3 < 4) { LAB_0014082f: param_2 = param_2 + (param_3 - (long)pcVar1); if (param_2 != (char *)0x0) { local_30[4] = '\0'; local_30[5] = '\0'; local_30[6] = '\0'; local_30[0] = '\0'; local_30[1] = '\0'; local_30[2] = '\0'; local_30[3] = '\0'; memcpy(local_30,pcVar1,(size_t)param_2); pcVar1 = local_30; do { /* try { // try from 00140856 to 00140860 has its CatchHandler @ 001408ae */ pcVar1 = (char *)for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>,fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0) ::{lambda(char_const*,char_const*)#1}::operator()((char *)this,pcVar1); if (pcVar1 == (char *)0x0) break; } while ((long)pcVar1 - (long)local_30 < (long)param_2); } } else { do { if (param_2 + (param_3 - 3) <= pcVar1) goto LAB_0014082f; /* try { // try from 0014081d to 00140827 has its CatchHandler @ 001408b0 */ pcVar1 = (char *)for_each_codepoint<fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0>(fmt::v10::basic_string_view<char>,fmt::v10::detail::utf8_to_utf16::utf8_to_utf16(fmt::v10::basic_string_view<char>)::$_0) ::{lambda(char_const*,char_const*)#1}::operator()((char *)this,pcVar1); } while (pcVar1 != (char *)0x0); } lVar2 = *(long *)(this + 0x10); uVar3 = lVar2 + 1; if (*(ulong *)(this + 0x18) < uVar3) { /* try { // try from 00140882 to 00140886 has its CatchHandler @ 001408ac */ (*(code *)**(int8 **)this)(this); lVar2 = *(long *)(this + 0x10); uVar3 = lVar2 + 1; } *(ulong *)(this + 0x10) = uVar3; *(int4 *)(*(long *)(this + 8) + lVar2 * 4) = 0; return; }
9,024
aimrt::protocols::sensor::ImuState::~ImuState()
aimrt_mujoco_sim/_deps/aimrt-build/src/protocols/pb/sensor/imu.pb.cc
ImuState::~ImuState() { // @@protoc_insertion_point(destructor:aimrt.protocols.sensor.ImuState) if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { (void)arena; return; } SharedDtor(); }
O3
cpp
aimrt::protocols::sensor::ImuState::~ImuState(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 leaq 0x8(%rdi), %rbx movq 0x8(%rdi), %rax testb $0x1, %al jne 0x725fd andq $-0x4, %rax jmp 0x72605 movq %rbx, %rdi callq 0x734ec testq %rax, %rax jne 0x72612 movq %r14, %rdi callq 0x7328a leaq 0x197f07(%rip), %rax # 0x20a520 addq $0x10, %rax movq %rax, (%r14) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x73456 movq %rax, %rdi callq 0x33bfc nop
_ZN5aimrt9protocols6sensor8ImuStateD2Ev: push r14 push rbx push rax mov r14, rdi lea rbx, [rdi+8] mov rax, [rdi+8] test al, 1 jnz short loc_725FD and rax, 0FFFFFFFFFFFFFFFCh jmp short loc_72605 loc_725FD: mov rdi, rbx call _ZN6google8protobuf8internal16InternalMetadata21DeleteOutOfLineHelperINS0_15UnknownFieldSetEEEPNS0_5ArenaEv; google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>(void) loc_72605: test rax, rax jnz short loc_72612 mov rdi, r14; this call _ZN5aimrt9protocols6sensor8ImuState10SharedDtorEv; aimrt::protocols::sensor::ImuState::SharedDtor(void) loc_72612: lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite add rax, 10h mov [r14], rax mov rdi, rbx; this add rsp, 8 pop rbx pop r14 jmp _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata() mov rdi, rax call __clang_call_terminate
void aimrt::protocols::sensor::ImuState::~ImuState(aimrt::protocols::sensor::ImuState *this) { long long v1; // rax unsigned long long v2; // rax v1 = *((_QWORD *)this + 1); if ( (v1 & 1) != 0 ) v2 = google::protobuf::internal::InternalMetadata::DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet>((char *)this + 8); else v2 = v1 & 0xFFFFFFFFFFFFFFFCLL; if ( !v2 ) aimrt::protocols::sensor::ImuState::SharedDtor(this); *(_QWORD *)this = &`vtable for'google::protobuf::MessageLite + 2; google::protobuf::internal::InternalMetadata::~InternalMetadata((aimrt::protocols::sensor::ImuState *)((char *)this + 8)); }
~ImuState: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI LEA RBX,[RDI + 0x8] MOV RAX,qword ptr [RDI + 0x8] TEST AL,0x1 JNZ 0x001725fd AND RAX,-0x4 JMP 0x00172605 LAB_001725fd: MOV RDI,RBX CALL 0x001734ec LAB_00172605: TEST RAX,RAX JNZ 0x00172612 MOV RDI,R14 CALL 0x0017328a LAB_00172612: LEA RAX,[0x30a520] ADD RAX,0x10 MOV qword ptr [R14],RAX MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00173456
/* aimrt::protocols::sensor::ImuState::~ImuState() */ void __thiscall aimrt::protocols::sensor::ImuState::~ImuState(ImuState *this) { Arena *pAVar1; if ((*(ulong *)(this + 8) & 1) == 0) { pAVar1 = (Arena *)(*(ulong *)(this + 8) & 0xfffffffffffffffc); } else { /* try { // try from 001725fd to 00172611 has its CatchHandler @ 0017262f */ pAVar1 = google::protobuf::internal::InternalMetadata:: DeleteOutOfLineHelper<google::protobuf::UnknownFieldSet> ((InternalMetadata *)(this + 8)); } if (pAVar1 == (Arena *)0x0) { SharedDtor(this); } *(int ***)this = &PTR__MessageLite_0030a530; google::protobuf::internal::InternalMetadata::~InternalMetadata((InternalMetadata *)(this + 8)); return; }
9,025
testing::AssertionResult& testing::AssertionResult::operator<<<char [12]>(char const (&) [12])
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/gtest-assertion-result.h
AssertionResult& operator<<(const T& value) { AppendMessage(Message() << value); return *this; }
O3
c
testing::AssertionResult& testing::AssertionResult::operator<<<char [12]>(char const (&) [12]): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x1c968 movq (%r15), %rdi addq $0x10, %rdi movq %r14, %rsi callq 0x18140 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0xe5d6 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x36c4e movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x36c6e movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x8990
_ZN7testing15AssertionResultlsINS_14TestPartResultEEERS0_RKT_: push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi lea r15, [rsp+28h+var_20] mov rdi, r15; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov rdi, [r15] add rdi, 10h mov rsi, r14 call _ZN7testinglsERSoRKNS_14TestPartResultE; testing::operator<<(std::ostream &,testing::TestPartResult const&) lea rsi, [rsp+28h+var_20]; testing::Message * mov rdi, rbx; this call _ZN7testing15AssertionResult13AppendMessageERKNS_7MessageE; testing::AssertionResult::AppendMessage(testing::Message const&) mov rdi, [rsp+28h+var_20] test rdi, rdi jz short loc_36C4E mov rax, [rdi] call qword ptr [rax+8] loc_36C4E: mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_36C6E mov rax, [rdi] call qword ptr [rax+8] loc_36C6E: mov rdi, rbx call __Unwind_Resume
testing::AssertionResult * testing::AssertionResult::operator<<<testing::TestPartResult>( testing::AssertionResult *this, int *a2) { _QWORD v3[4]; // [rsp+8h] [rbp-20h] BYREF testing::Message::Message((testing::Message *)v3); testing::operator<<(v3[0] + 16LL, a2); testing::AssertionResult::AppendMessage(this, (const testing::Message *)v3); if ( v3[0] ) (*(void ( **)(_QWORD))(*(_QWORD *)v3[0] + 8LL))(v3[0]); return this; }
operator<<: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x0011c968 MOV RDI,qword ptr [R15] ADD RDI,0x10 LAB_00136c29: MOV RSI,R14 CALL 0x00118140 LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x0010e5d6 LAB_00136c3e: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x00136c4e MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_00136c4e: MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* testing::AssertionResult& testing::AssertionResult::TEMPNAMEPLACEHOLDERVALUE(testing::TestPartResult const&) */ AssertionResult * __thiscall testing::AssertionResult::operator<<(AssertionResult *this,TestPartResult *param_1) { long *local_20; Message::Message((Message *)&local_20); /* try { // try from 00136c29 to 00136c3d has its CatchHandler @ 00136c5b */ testing::operator<<((ostream *)(local_20 + 2),param_1); AppendMessage((Message *)this); if (local_20 != (long *)0x0) { (**(code **)(*local_20 + 8))(); } return this; }
9,026
YAML::NodeBuilder::Push(YAML::detail::node&)
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/nodebuilder.cpp
void NodeBuilder::Push(detail::node& node) { const bool needsKey = (!m_stack.empty() && m_stack.back()->type() == NodeType::Map && m_keys.size() < m_mapDepth); m_stack.push_back(&node); if (needsKey) m_keys.emplace_back(&node, false); }
O0
cpp
YAML::NodeBuilder::Push(YAML::detail::node&): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x30(%rsp), %rdi movq %rdi, (%rsp) addq $0x20, %rdi callq 0x149790 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0xe(%rsp) jne 0x14940b movq (%rsp), %rdi addq $0x20, %rdi callq 0x12abe0 movq (%rax), %rdi callq 0xe3320 movl %eax, %ecx xorl %eax, %eax cmpl $0x4, %ecx movb %al, 0xe(%rsp) jne 0x14940b movq (%rsp), %rdi addq $0x50, %rdi callq 0x1497e0 movq (%rsp), %rcx cmpq 0x68(%rcx), %rax setb %al movb %al, 0xe(%rsp) movq (%rsp), %rdi movb 0xe(%rsp), %al andb $0x1, %al movb %al, 0x27(%rsp) addq $0x20, %rdi movq 0x28(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x18(%rsp), %rsi callq 0x12a140 testb $0x1, 0x27(%rsp) je 0x14945e movq (%rsp), %rdi addq $0x50, %rdi movq 0x28(%rsp), %rax movq %rax, 0x10(%rsp) movb $0x0, 0xf(%rsp) leaq 0x10(%rsp), %rsi leaq 0xf(%rsp), %rdx callq 0x149800 addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
_ZN4YAML11NodeBuilder4PushERNS_6detail4nodeE: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov rdi, [rsp+38h+var_8] mov [rsp+38h+var_38], rdi add rdi, 20h ; ' ' call _ZNKSt6vectorIPN4YAML6detail4nodeESaIS3_EE5emptyEv; std::vector<YAML::detail::node *>::empty(void) mov cl, al xor eax, eax test cl, 1 mov [rsp+38h+var_2A], al jnz short loc_14940B mov rdi, [rsp+38h+var_38] add rdi, 20h ; ' ' call _ZNSt6vectorIPN4YAML6detail4nodeESaIS3_EE4backEv; std::vector<YAML::detail::node *>::back(void) mov rdi, [rax]; this call _ZNK4YAML6detail4node4typeEv; YAML::detail::node::type(void) mov ecx, eax xor eax, eax cmp ecx, 4 mov [rsp+38h+var_2A], al jnz short loc_14940B mov rdi, [rsp+38h+var_38] add rdi, 50h ; 'P' call _ZNKSt6vectorISt4pairIPN4YAML6detail4nodeEbESaIS5_EE4sizeEv; std::vector<std::pair<YAML::detail::node *,bool>>::size(void) mov rcx, [rsp+38h+var_38] cmp rax, [rcx+68h] setb al mov [rsp+38h+var_2A], al loc_14940B: mov rdi, [rsp+38h+var_38] mov al, [rsp+38h+var_2A] and al, 1 mov [rsp+38h+var_11], al add rdi, 20h ; ' ' mov rax, [rsp+38h+var_10] mov [rsp+38h+var_20], rax lea rsi, [rsp+38h+var_20] call _ZNSt6vectorIPN4YAML6detail4nodeESaIS3_EE9push_backEOS3_; std::vector<YAML::detail::node *>::push_back(YAML::detail::node *&&) test [rsp+38h+var_11], 1 jz short loc_14945E mov rdi, [rsp+38h+var_38] add rdi, 50h ; 'P' mov rax, [rsp+38h+var_10] mov [rsp+38h+var_28], rax mov [rsp+38h+var_29], 0 lea rsi, [rsp+38h+var_28] lea rdx, [rsp+38h+var_29] call _ZNSt6vectorISt4pairIPN4YAML6detail4nodeEbESaIS5_EE12emplace_backIJS4_bEEERS5_DpOT_; std::vector<std::pair<YAML::detail::node *,bool>>::emplace_back<YAML::detail::node *,bool>(YAML::detail::node *,bool &&) loc_14945E: add rsp, 38h retn
long long YAML::NodeBuilder::Push(YAML::NodeBuilder *this, YAML::detail::node *a2) { YAML::detail::node **v2; // rax long long result; // rax bool v4; // [rsp+Eh] [rbp-2Ah] char v5; // [rsp+Fh] [rbp-29h] BYREF YAML::detail::node *v6; // [rsp+10h] [rbp-28h] BYREF YAML::detail::node *v7; // [rsp+18h] [rbp-20h] BYREF bool v8; // [rsp+27h] [rbp-11h] YAML::detail::node *v9; // [rsp+28h] [rbp-10h] YAML::NodeBuilder *v10; // [rsp+30h] [rbp-8h] v10 = this; v9 = a2; v4 = 0; if ( (std::vector<YAML::detail::node *>::empty((char *)this + 32) & 1) == 0 ) { v2 = (YAML::detail::node **)std::vector<YAML::detail::node *>::back((long long)this + 32); v4 = 0; if ( (unsigned int)YAML::detail::node::type(*v2) == 4 ) v4 = (unsigned long long)std::vector<std::pair<YAML::detail::node *,bool>>::size((char *)this + 80) < *((_QWORD *)this + 13); } v8 = v4; v7 = v9; result = std::vector<YAML::detail::node *>::push_back((long long)this + 32, (long long)&v7); if ( v8 ) { v6 = v9; v5 = 0; return std::vector<std::pair<YAML::detail::node *,bool>>::emplace_back<YAML::detail::node *,bool>( (char *)this + 80, &v6, &v5); } return result; }
9,027
YAML::NodeBuilder::Push(YAML::detail::node&)
aimrt_mujoco_sim/_deps/yaml-cpp-src/src/nodebuilder.cpp
void NodeBuilder::Push(detail::node& node) { const bool needsKey = (!m_stack.empty() && m_stack.back()->type() == NodeType::Map && m_keys.size() < m_mapDepth); m_stack.push_back(&node); if (needsKey) m_keys.emplace_back(&node, false); }
O3
cpp
YAML::NodeBuilder::Push(YAML::detail::node&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx addq $0x20, %rdi movq 0x28(%rbx), %rax cmpq %rax, 0x20(%rbx) je 0x6ece4 movq -0x8(%rax), %rax movq (%rax), %rax movq (%rax), %rax cmpb $0x1, (%rax) jne 0x6ece4 cmpl $0x4, 0x10(%rax) jne 0x6ece4 movq 0x58(%rbx), %r15 subq 0x50(%rbx), %r15 sarq $0x4, %r15 movq 0x68(%rbx), %r12 leaq 0x10(%rsp), %rsi movq %r14, (%rsi) callq 0x61cf4 cmpq %r12, %r15 jae 0x6ecf1 addq $0x50, %rbx leaq 0x10(%rsp), %rsi movq %r14, (%rsi) leaq 0xf(%rsp), %rdx movb $0x0, (%rdx) movq %rbx, %rdi callq 0x6ee56 jmp 0x6ecf1 leaq 0x10(%rsp), %rsi movq %r14, (%rsi) callq 0x61cf4 addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN4YAML11NodeBuilder4PushERNS_6detail4nodeE: push r15 push r14 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi add rdi, 20h ; ' ' mov rax, [rbx+28h] cmp [rbx+20h], rax jz short loc_6ECE4 mov rax, [rax-8] mov rax, [rax] mov rax, [rax] cmp byte ptr [rax], 1 jnz short loc_6ECE4 cmp dword ptr [rax+10h], 4 jnz short loc_6ECE4 mov r15, [rbx+58h] sub r15, [rbx+50h] sar r15, 4 mov r12, [rbx+68h] lea rsi, [rsp+38h+var_28] mov [rsi], r14 call _ZNSt6vectorIPN4YAML6detail4nodeESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<YAML::detail::node *>::emplace_back<YAML::detail::node *>(YAML::detail::node * &&) cmp r15, r12 jnb short loc_6ECF1 add rbx, 50h ; 'P' lea rsi, [rsp+38h+var_28] mov [rsi], r14 lea rdx, [rsp+38h+var_29] mov byte ptr [rdx], 0 mov rdi, rbx call _ZNSt6vectorISt4pairIPN4YAML6detail4nodeEbESaIS5_EE12emplace_backIJS4_bEEERS5_DpOT_; std::vector<std::pair<YAML::detail::node *,bool>>::emplace_back<YAML::detail::node *,bool>(YAML::detail::node *,bool &&) jmp short loc_6ECF1 loc_6ECE4: lea rsi, [rsp+38h+var_28] mov [rsi], r14 call _ZNSt6vectorIPN4YAML6detail4nodeESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<YAML::detail::node *>::emplace_back<YAML::detail::node *>(YAML::detail::node * &&) loc_6ECF1: add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long YAML::NodeBuilder::Push(YAML::NodeBuilder *this, YAML::detail::node *a2) { char *v3; // rdi long long v4; // rax long long v5; // rax unsigned long long v6; // r15 unsigned long long v7; // r12 long long result; // rax char v9; // [rsp+Fh] [rbp-29h] BYREF _QWORD v10[5]; // [rsp+10h] [rbp-28h] BYREF v3 = (char *)this + 32; v4 = *((_QWORD *)this + 5); if ( *((_QWORD *)this + 4) != v4 && (v5 = ***(_QWORD ***)(v4 - 8), *(_BYTE *)v5 == 1) && *(_DWORD *)(v5 + 16) == 4 ) { v6 = (long long)(*((_QWORD *)this + 11) - *((_QWORD *)this + 10)) >> 4; v7 = *((_QWORD *)this + 13); v10[0] = a2; result = std::vector<YAML::detail::node *>::emplace_back<YAML::detail::node *>((long long)v3, v10); if ( v6 < v7 ) { v10[0] = a2; v9 = 0; return std::vector<std::pair<YAML::detail::node *,bool>>::emplace_back<YAML::detail::node *,bool>( (char *)this + 80, v10, &v9); } } else { v10[0] = a2; return std::vector<YAML::detail::node *>::emplace_back<YAML::detail::node *>((long long)v3, v10); } return result; }
Push: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI ADD RDI,0x20 MOV RAX,qword ptr [RBX + 0x28] CMP qword ptr [RBX + 0x20],RAX JZ 0x0016ece4 MOV RAX,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX] CMP byte ptr [RAX],0x1 JNZ 0x0016ece4 CMP dword ptr [RAX + 0x10],0x4 JNZ 0x0016ece4 MOV R15,qword ptr [RBX + 0x58] SUB R15,qword ptr [RBX + 0x50] SAR R15,0x4 MOV R12,qword ptr [RBX + 0x68] LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],R14 CALL 0x00161cf4 CMP R15,R12 JNC 0x0016ecf1 ADD RBX,0x50 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],R14 LEA RDX,[RSP + 0xf] MOV byte ptr [RDX],0x0 MOV RDI,RBX CALL 0x0016ee56 JMP 0x0016ecf1 LAB_0016ece4: LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],R14 CALL 0x00161cf4 LAB_0016ecf1: ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
/* YAML::NodeBuilder::Push(YAML::detail::node&) */ void __thiscall YAML::NodeBuilder::Push(NodeBuilder *this,node *param_1) { char *pcVar1; long lVar2; long lVar3; ulong uVar4; bool local_29; node *local_28; local_28 = param_1; if (((*(long *)(this + 0x20) == *(long *)(this + 0x28)) || (pcVar1 = *(char **)**(int8 **)(*(long *)(this + 0x28) + -8), *pcVar1 != '\x01')) || (*(int *)(pcVar1 + 0x10) != 4)) { std::vector<YAML::detail::node*,std::allocator<YAML::detail::node*>>:: emplace_back<YAML::detail::node*> ((vector<YAML::detail::node*,std::allocator<YAML::detail::node*>> *)(this + 0x20), &local_28); } else { lVar2 = *(long *)(this + 0x58); lVar3 = *(long *)(this + 0x50); uVar4 = *(ulong *)(this + 0x68); std::vector<YAML::detail::node*,std::allocator<YAML::detail::node*>>:: emplace_back<YAML::detail::node*> ((vector<YAML::detail::node*,std::allocator<YAML::detail::node*>> *)(this + 0x20), &local_28); if ((ulong)(lVar2 - lVar3 >> 4) < uVar4) { local_29 = false; local_28 = param_1; std:: vector<std::pair<YAML::detail::node*,bool>,std::allocator<std::pair<YAML::detail::node*,bool>>> ::emplace_back<YAML::detail::node*,bool> ((vector<std::pair<YAML::detail::node*,bool>,std::allocator<std::pair<YAML::detail::node*,bool>>> *)(this + 0x50),&local_28,&local_29); } } return; }
9,028
findPeaks::_select_by_peak_distance(std::vector<unsigned long, std::allocator<unsigned long>> const&, std::vector<double, std::allocator<double>> const&, unsigned long)
giladroyz[P]FindPeaks/src/cpp/find_peaks.cpp
std::vector<bool> _select_by_peak_distance(const std::vector<size_t> &peaks, const std::vector<double> &priority, size_t distance) { size_t i, k, j; std::vector<bool> keep(peaks.size(), true); //Create map from `i` (index for `peaks` sorted by `priority`) to `j` (index //for `peaks` sorted by position). This allows to iterate `peaks` and `keep` //with `j` by order of `priority` while still maintaining the ability to //step to neighbouring peaks with (`j` + 1) or (`j` - 1). std::vector<size_t> priority_to_position = argsort(priority); // //Round up because actual peak distance can only be natural number // size_t distance_ = distance; // distance_ = distance_ == distance ? distance_ : distance_ + 1; //Highest priority first -> iterate in reverse order (decreasing) for (i = 0; i < peaks.size(); i++) { //"Translate" `i` to `j` which points to current peak whose //neighbours are to be evaluated j = priority_to_position[peaks.size() - 1 - i]; //Skip evaluation for peak already marked as "don't keep" if (keep[j] == 0) continue; k = 1; //Flag "earlier" peaks for removal until minimal distance is exceeded while (k <= j && peaks[j] - peaks[j - k] < distance) { keep[j - k] = false; k++; } k = j + 1; //Flag "later" peaks for removal until minimal distance is exceeded while (k < peaks.size() && peaks[k] - peaks[j] < distance) { keep[k] = false; k++; } } return keep; }
O1
cpp
findPeaks::_select_by_peak_distance(std::vector<unsigned long, std::allocator<unsigned long>> const&, std::vector<double, std::allocator<double>> const&, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %r14 movq %rdx, %r12 movq %rsi, %r15 movq 0x8(%rsi), %rsi subq (%r15), %rsi sarq $0x3, %rsi leaq 0x10(%rsp), %rdx movb $0x1, (%rdx) leaq 0x7(%rsp), %rcx movq %rdi, 0x8(%rsp) callq 0x3e82c leaq 0x10(%rsp), %rdi movq %r12, %rsi callq 0x3cbba movq (%r15), %rax movq 0x8(%r15), %rdx movq %rdx, %rsi subq %rax, %rsi subq %rax, %rdx je 0x3cf23 sarq $0x3, %rsi addq 0x10(%rsp), %rdx movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000 movq 0x8(%rsp), %rcx movq (%rcx), %r8 cmpq $0x1, %rsi movq %rsi, %r9 adcq $0x0, %r9 xorl %r10d, %r10d leaq 0x3f(%rdi), %r11 movq %r10, %rcx notq %rcx movq (%rdx,%rcx,8), %r15 leaq 0x3f(%r15), %rcx testq %r15, %r15 cmovnsq %r15, %rcx sarq $0x6, %rcx leaq (%r8,%rcx,8), %rcx movq %r15, %r12 andq %r11, %r12 xorl %r13d, %r13d cmpq %rdi, %r12 setbe %r13b movq -0x8(%rcx,%r13,8), %rcx btq %r15, %rcx jae 0x3cf17 testq %r15, %r15 je 0x3cec7 leaq -0x1(%r15), %rcx movl $0x1, %r12d movq (%rax,%r15,8), %r13 subq (%rax,%rcx,8), %r13 cmpq %r14, %r13 jae 0x3cec7 leaq 0x3f(%rcx), %r13 testq %rcx, %rcx cmovnsq %rcx, %r13 sarq $0x6, %r13 movq %rcx, %rbp andq %r11, %rbp xorl %ebx, %ebx cmpq %rdi, %rbp setbe %bl movq $-0x2, %rbp rolq %cl, %rbp leaq (%r8,%r13,8), %r13 andq %rbp, -0x8(%r13,%rbx,8) incq %r12 decq %rcx cmpq %r15, %r12 jbe 0x3ce7f leaq 0x1(%r15), %rcx cmpq %rsi, %rcx jae 0x3cf17 movq (%rax,%rcx,8), %rbx subq (%rax,%r15,8), %rbx cmpq %r14, %rbx jae 0x3cf17 leaq 0x3f(%rcx), %rbx testq %rcx, %rcx cmovnsq %rcx, %rbx sarq $0x6, %rbx movq %rcx, %r12 andq %r11, %r12 xorl %r13d, %r13d cmpq %rdi, %r12 setbe %r13b movq $-0x2, %r12 rolq %cl, %r12 leaq (%r8,%rbx,8), %rbx andq %r12, -0x8(%rbx,%r13,8) incq %rcx cmpq %rcx, %rsi jne 0x3ced0 incq %r10 cmpq %r9, %r10 jne 0x3ce34 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x3cf32 callq 0x8470 movq 0x8(%rsp), %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq 0x8(%rsp), %rdi callq 0x3f140 movq %r14, %rdi callq 0x8990 movq %rax, %rdi callq 0x326a4
_ZN9findPeaks24_select_by_peak_distanceERKSt6vectorImSaImEERKS0_IdSaIdEEm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rcx mov r12, rdx mov r15, rsi mov rsi, [rsi+8] sub rsi, [r15] sar rsi, 3 lea rdx, [rsp+58h+var_48] mov byte ptr [rdx], 1 lea rcx, [rsp+58h+var_51] mov [rsp+58h+var_50], rdi call _ZNSt6vectorIbSaIbEEC2EmRKbRKS0_; std::vector<bool>::vector(ulong,bool const&,std::allocator<bool> const&) lea rdi, [rsp+58h+var_48] mov rsi, r12 call _ZN9findPeaks7argsortERKSt6vectorIdSaIdEE; findPeaks::argsort(std::vector<double> const&) mov rax, [r15] mov rdx, [r15+8] mov rsi, rdx sub rsi, rax sub rdx, rax jz loc_3CF23 sar rsi, 3 add rdx, [rsp+58h+var_48] mov rdi, 8000000000000000h mov rcx, [rsp+58h+var_50] mov r8, [rcx] cmp rsi, 1 mov r9, rsi adc r9, 0 xor r10d, r10d lea r11, [rdi+3Fh] loc_3CE34: mov rcx, r10 not rcx mov r15, [rdx+rcx*8] lea rcx, [r15+3Fh] test r15, r15 cmovns rcx, r15 sar rcx, 6 lea rcx, [r8+rcx*8] mov r12, r15 and r12, r11 xor r13d, r13d cmp r12, rdi setbe r13b mov rcx, [rcx+r13*8-8] bt rcx, r15 jnb loc_3CF17 test r15, r15 jz short loc_3CEC7 lea rcx, [r15-1] mov r12d, 1 loc_3CE7F: mov r13, [rax+r15*8] sub r13, [rax+rcx*8] cmp r13, r14 jnb short loc_3CEC7 lea r13, [rcx+3Fh] test rcx, rcx cmovns r13, rcx sar r13, 6 mov rbp, rcx and rbp, r11 xor ebx, ebx cmp rbp, rdi setbe bl mov rbp, 0FFFFFFFFFFFFFFFEh rol rbp, cl lea r13, [r8+r13*8] and [r13+rbx*8-8], rbp inc r12 dec rcx cmp r12, r15 jbe short loc_3CE7F loc_3CEC7: lea rcx, [r15+1] cmp rcx, rsi jnb short loc_3CF17 loc_3CED0: mov rbx, [rax+rcx*8] sub rbx, [rax+r15*8] cmp rbx, r14 jnb short loc_3CF17 lea rbx, [rcx+3Fh] test rcx, rcx cmovns rbx, rcx sar rbx, 6 mov r12, rcx and r12, r11 xor r13d, r13d cmp r12, rdi setbe r13b mov r12, 0FFFFFFFFFFFFFFFEh rol r12, cl lea rbx, [r8+rbx*8] and [rbx+r13*8-8], r12 inc rcx cmp rsi, rcx jnz short loc_3CED0 loc_3CF17: inc r10 cmp r10, r9 jnz loc_3CE34 loc_3CF23: mov rdi, [rsp+58h+var_48]; void * test rdi, rdi jz short loc_3CF32 call __ZdlPv; operator delete(void *) loc_3CF32: mov rax, [rsp+58h+var_50] add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [rsp+arg_0] call _ZNSt13_Bvector_baseISaIbEE13_M_deallocateEv; std::_Bvector_base<std::allocator<bool>>::_M_deallocate(void) mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long * findPeaks::_select_by_peak_distance(long long *a1, long long *a2, _QWORD *a3, unsigned long long a4) { long long v7; // rsi long long v8; // rax long long v9; // rdx unsigned long long v10; // rsi char *v11; // rdx long long v12; // r8 long long v13; // r10 signed long long v14; // r15 long long v15; // rcx long long v16; // rcx signed long long v17; // rcx unsigned long long i; // r12 signed long long v19; // rcx char v21; // [rsp+7h] [rbp-51h] BYREF long long *v22; // [rsp+8h] [rbp-50h] void *v23[9]; // [rsp+10h] [rbp-48h] BYREF v7 = (a2[1] - *a2) >> 3; LOBYTE(v23[0]) = 1; v22 = a1; std::vector<bool>::vector(a1, v7, v23, &v21); findPeaks::argsort(v23, a3); v8 = *a2; v9 = a2[1] - *a2; if ( v9 ) { v10 = (a2[1] - *a2) >> 3; v11 = (char *)v23[0] + v9; v12 = *v22; v13 = 0LL; do { v14 = *(_QWORD *)&v11[8 * ~v13]; v15 = v14 + 63; if ( v14 >= 0 ) v15 = *(_QWORD *)&v11[8 * ~v13]; v16 = *(_QWORD *)(v12 + 8 * (v15 >> 6) + 8LL * ((v14 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8); if ( _bittest64(&v16, v14) ) { if ( v14 ) { v17 = v14 - 1; for ( i = 1LL; i <= v14; ++i ) { if ( *(_QWORD *)(v8 + 8 * v14) - *(_QWORD *)(v8 + 8 * v17) >= a4 ) break; *(_QWORD *)(v12 + 8 * (v17 / 64) + 8LL * ((v17 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) &= __ROL8__(-2LL, v17); --v17; } } v19 = v14 + 1; if ( v14 + 1 < v10 ) { do { if ( *(_QWORD *)(v8 + 8 * v19) - *(_QWORD *)(v8 + 8 * v14) >= a4 ) break; *(_QWORD *)(v12 + 8 * (v19 / 64) + 8LL * ((v19 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) &= __ROL8__(-2LL, v19); ++v19; } while ( v10 != v19 ); } } ++v13; } while ( v13 != (v10 == 0) + v10 ); } if ( v23[0] ) operator delete(v23[0]); return v22; }
_select_by_peak_distance: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RCX MOV R12,RDX MOV R15,RSI MOV RSI,qword ptr [RSI + 0x8] SUB RSI,qword ptr [R15] SAR RSI,0x3 LEA RDX,[RSP + 0x10] MOV byte ptr [RDX],0x1 LEA RCX,[RSP + 0x7] MOV qword ptr [RSP + 0x8],RDI CALL 0x0013e82c LAB_0013cde4: LEA RDI,[RSP + 0x10] MOV RSI,R12 CALL 0x0013cbba MOV RAX,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RSI,RDX SUB RSI,RAX SUB RDX,RAX JZ 0x0013cf23 SAR RSI,0x3 ADD RDX,qword ptr [RSP + 0x10] MOV RDI,-0x8000000000000000 MOV RCX,qword ptr [RSP + 0x8] MOV R8,qword ptr [RCX] CMP RSI,0x1 MOV R9,RSI ADC R9,0x0 XOR R10D,R10D LEA R11,[RDI + 0x3f] LAB_0013ce34: MOV RCX,R10 NOT RCX MOV R15,qword ptr [RDX + RCX*0x8] LEA RCX,[R15 + 0x3f] TEST R15,R15 CMOVNS RCX,R15 SAR RCX,0x6 LEA RCX,[R8 + RCX*0x8] MOV R12,R15 AND R12,R11 XOR R13D,R13D CMP R12,RDI SETBE R13B MOV RCX,qword ptr [RCX + R13*0x8 + -0x8] BT RCX,R15 JNC 0x0013cf17 TEST R15,R15 JZ 0x0013cec7 LEA RCX,[R15 + -0x1] MOV R12D,0x1 LAB_0013ce7f: MOV R13,qword ptr [RAX + R15*0x8] SUB R13,qword ptr [RAX + RCX*0x8] CMP R13,R14 JNC 0x0013cec7 LEA R13,[RCX + 0x3f] TEST RCX,RCX CMOVNS R13,RCX SAR R13,0x6 MOV RBP,RCX AND RBP,R11 XOR EBX,EBX CMP RBP,RDI SETBE BL MOV RBP,-0x2 ROL RBP,CL LEA R13,[R8 + R13*0x8] AND qword ptr [R13 + RBX*0x8 + -0x8],RBP INC R12 DEC RCX CMP R12,R15 JBE 0x0013ce7f LAB_0013cec7: LEA RCX,[R15 + 0x1] CMP RCX,RSI JNC 0x0013cf17 LAB_0013ced0: MOV RBX,qword ptr [RAX + RCX*0x8] SUB RBX,qword ptr [RAX + R15*0x8] CMP RBX,R14 JNC 0x0013cf17 LEA RBX,[RCX + 0x3f] TEST RCX,RCX CMOVNS RBX,RCX SAR RBX,0x6 MOV R12,RCX AND R12,R11 XOR R13D,R13D CMP R12,RDI SETBE R13B MOV R12,-0x2 ROL R12,CL LEA RBX,[R8 + RBX*0x8] AND qword ptr [RBX + R13*0x8 + -0x8],R12 INC RCX CMP RSI,RCX JNZ 0x0013ced0 LAB_0013cf17: INC R10 CMP R10,R9 JNZ 0x0013ce34 LAB_0013cf23: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0013cf32 CALL 0x00108470 LAB_0013cf32: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* findPeaks::_select_by_peak_distance(std::vector<unsigned long, std::allocator<unsigned long> > const&, std::vector<double, std::allocator<double> > const&, unsigned long) */ findPeaks * __thiscall findPeaks::_select_by_peak_distance(findPeaks *this,vector *param_1,vector *param_2,ulong param_3) { ulong *puVar1; long lVar2; long lVar3; ulong uVar4; byte bVar5; ulong uVar6; ulong uVar7; long lVar8; ulong uVar9; ulong uVar10; ulong uVar11; allocator local_48; int7 uStack_47; local_48 = (allocator)0x1; std::vector<bool,std::allocator<bool>>::vector ((ulong)this,(bool *)(*(long *)(param_1 + 8) - *(long *)param_1 >> 3),&local_48); /* try { // try from 0013cde4 to 0013cdf0 has its CatchHandler @ 0013cf46 */ argsort((findPeaks *)&local_48,param_2); lVar2 = *(long *)param_1; lVar8 = *(long *)(param_1 + 8) - lVar2; if (lVar8 != 0) { uVar9 = *(long *)(param_1 + 8) - lVar2 >> 3; lVar3 = *(long *)this; uVar10 = 0; do { uVar4 = *(ulong *)(lVar8 + CONCAT71(uStack_47,local_48) + ~uVar10 * 8); uVar7 = uVar4 + 0x3f; if (-1 < (long)uVar4) { uVar7 = uVar4; } if ((*(ulong *)(lVar3 + ((long)uVar7 >> 6) * 8 + -8 + (ulong)((uVar4 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar4 & 0x3f) & 1) != 0) { if (uVar4 != 0) { uVar11 = 1; uVar7 = uVar4; do { uVar6 = uVar7 - 1; if (param_3 <= (ulong)(*(long *)(lVar2 + uVar4 * 8) - *(long *)(lVar2 + uVar6 * 8))) break; uVar7 = uVar7 + 0x3e; if (-1 < (long)uVar6) { uVar7 = uVar6; } bVar5 = (byte)uVar6 & 0x3f; puVar1 = (ulong *)(lVar3 + ((long)uVar7 >> 6) * 8 + -8 + (ulong)((uVar6 & 0x800000000000003f) < 0x8000000000000001) * 8); *puVar1 = *puVar1 & (-2L << bVar5 | 0xfffffffffffffffeU >> 0x40 - bVar5); uVar11 = uVar11 + 1; uVar7 = uVar6; } while (uVar11 <= uVar4); } uVar7 = uVar4 + 1; if (uVar7 < uVar9) { do { if (param_3 <= (ulong)(*(long *)(lVar2 + uVar7 * 8) - *(long *)(lVar2 + uVar4 * 8))) break; uVar11 = uVar7 + 0x3f; if (-1 < (long)uVar7) { uVar11 = uVar7; } bVar5 = (byte)uVar7 & 0x3f; puVar1 = (ulong *)(lVar3 + ((long)uVar11 >> 6) * 8 + -8 + (ulong)((uVar7 & 0x800000000000003f) < 0x8000000000000001) * 8); *puVar1 = *puVar1 & (-2L << bVar5 | 0xfffffffffffffffeU >> 0x40 - bVar5); uVar7 = uVar7 + 1; } while (uVar9 != uVar7); } } uVar10 = uVar10 + 1; } while (uVar10 != uVar9 + (uVar9 == 0)); } if ((void *)CONCAT71(uStack_47,local_48) != (void *)0x0) { operator_delete((void *)CONCAT71(uStack_47,local_48)); } return this; }
9,029
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array()
monkey531[P]llama/common/json.hpp
bool end_array() { JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(ref_stack.back()->is_array()); ref_stack.back()->set_parents(); ref_stack.pop_back(); return true; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array(): pushq %rax movq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x62116 movq -0x8(%rax), %rcx cmpb $0x2, (%rcx) jne 0x62132 addq $-0x8, %rax movq %rax, 0x10(%rdi) movb $0x1, %al popq %rcx retq leaq 0x8ce6c(%rip), %rdi # 0xeef89 leaq 0x870f8(%rip), %rdx # 0xe921c leaq 0x8de49(%rip), %rcx # 0xeff74 movl $0x1b01, %esi # imm = 0x1B01 jmp 0x6214c leaq 0x8ce50(%rip), %rdi # 0xeef89 leaq 0x870dc(%rip), %rdx # 0xe921c leaq 0x8e0f8(%rip), %rcx # 0xf023f movl $0x1b02, %esi # imm = 0x1B02 xorl %eax, %eax callq 0x1bea0 nop
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: push rax mov rax, [rdi+10h] cmp [rdi+8], rax jz short loc_62116 mov rcx, [rax-8] cmp byte ptr [rcx], 2 jnz short loc_62132 add rax, 0FFFFFFFFFFFFFFF8h mov [rdi+10h], rax mov al, 1 pop rcx retn loc_62116: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1B01h jmp short loc_6214C loc_62132: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackBackIs_0; "ref_stack.back()->is_array()" mov esi, 1B02h loc_6214C: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array( long long a1) { long long v1; // rax long long v3; // rsi long long v4; // rdx long long v5; // rcx v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v1 ) { v3 = 6913LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6913LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); } else { if ( **(_BYTE **)(v1 - 8) == 2 ) { *(_QWORD *)(a1 + 16) = v1 - 8; return 1; } v3 = 6914LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6914LL, "GGML_ASSERT(%s) failed", "ref_stack.back()->is_array()"); } return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::out_of_range>( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v3, v4, v5); }
end_array: PUSH RAX MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x00162116 MOV RCX,qword ptr [RAX + -0x8] CMP byte ptr [RCX],0x2 JNZ 0x00162132 ADD RAX,-0x8 MOV qword ptr [RDI + 0x10],RAX MOV AL,0x1 POP RCX RET LAB_00162116: LEA RDI,[0x1eef89] LEA RDX,[0x1e921c] LEA RCX,[0x1eff74] MOV ESI,0x1b01 JMP 0x0016214c LAB_00162132: LEA RDI,[0x1eef89] LEA RDX,[0x1e921c] LEA RCX,[0x1f023f] MOV ESI,0x1b02 LAB_0016214c: XOR EAX,EAX CALL 0x0011bea0
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar1) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1b01; } else { if (**(char **)(lVar1 + -8) == '\x02') { *(long *)(this + 0x10) = lVar1 + -8; return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1); } pcVar2 = "ref_stack.back()->is_array()"; uVar3 = 0x1b02; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
9,030
get_length
eloqsql/strings/my_vsnprintf.c
static const char *get_length(const char *fmt, size_t *length, uint *pre_zero) { for (; my_isdigit(&my_charset_latin1, *fmt); fmt++) { *length= *length * 10 + (uint)(*fmt - '0'); if (!*length) *pre_zero|= PREZERO_ARG; /* first digit was 0 */ } return fmt; }
O0
c
get_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x1ff929(%rip), %rax # 0x274840 movq 0x40(%rax), %rax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x74f72 movq -0x10(%rbp), %rax imulq $0xa, (%rax), %rcx movq -0x8(%rbp), %rax movsbl (%rax), %eax subl $0x30, %eax movl %eax, %eax addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x74f62 movq -0x18(%rbp), %rax movl (%rax), %ecx orl $0x4, %ecx movl %ecx, (%rax) jmp 0x74f64 movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) jmp 0x74f10 movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
get_length: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx loc_74F10: lea rax, my_charset_latin1 mov rax, [rax+40h] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 4 cmp eax, 0 jz short loc_74F72 mov rax, [rbp+var_10] imul rcx, [rax], 0Ah mov rax, [rbp+var_8] movsx eax, byte ptr [rax] sub eax, 30h ; '0' mov eax, eax add rcx, rax mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_74F62 mov rax, [rbp+var_18] mov ecx, [rax] or ecx, 4 mov [rax], ecx loc_74F62: jmp short $+2 loc_74F64: mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax jmp short loc_74F10 loc_74F72: mov rax, [rbp+var_8] pop rbp retn
unsigned __int8 * get_length(unsigned __int8 *a1, _QWORD *a2, _DWORD *a3) { while ( (*(_BYTE *)(*(_QWORD *)&my_charset_latin1[16] + *a1 + 1LL) & 4) != 0 ) { *a2 = (unsigned int)((char)*a1 - 48) + 10LL * *a2; if ( !*a2 ) *a3 |= 4u; ++a1; } return a1; }
get_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LAB_00174f10: LEA RAX,[0x374840] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x4 CMP EAX,0x0 JZ 0x00174f72 MOV RAX,qword ptr [RBP + -0x10] IMUL RCX,qword ptr [RAX],0xa MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] SUB EAX,0x30 MOV EAX,EAX ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x00174f62 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX] OR ECX,0x4 MOV dword ptr [RAX],ECX LAB_00174f62: JMP 0x00174f64 LAB_00174f64: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x00174f10 LAB_00174f72: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
byte * get_length(byte *param_1,long *param_2,uint *param_3) { byte *local_10; local_10 = param_1; while ((PTR_ctype_latin1_00374880[(ulong)*local_10 + 1] & 4) != 0) { *param_2 = *param_2 * 10 + (ulong)((int)(char)*local_10 - 0x30); if (*param_2 == 0) { *param_3 = *param_3 | 4; } local_10 = local_10 + 1; } return local_10; }
9,031
change_partitioned_key_cache_param
eloqsql/mysys/mf_keycache.c
static void change_partitioned_key_cache_param(PARTITIONED_KEY_CACHE_CB *keycache, uint division_limit, uint age_threshold) { uint i; uint partitions= keycache->partitions; DBUG_ENTER("partitioned_change_key_cache_param"); for (i= 0; i < partitions; i++) { change_simple_key_cache_param(keycache->partition_array[i], division_limit, age_threshold); } DBUG_VOID_RETURN; }
O3
c
change_partitioned_key_cache_param: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl 0x1c(%rdi), %r12d testq %r12, %r12 je 0x9d6d3 movl %edx, %ebx movl %esi, %r14d movq %rdi, %r15 xorl %r13d, %r13d movq 0x8(%r15), %rax movq (%rax,%r13,8), %rdi movl %r14d, %esi movl %ebx, %edx callq 0x9be62 incq %r13 cmpq %r13, %r12 jne 0x9d6b9 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
change_partitioned_key_cache_param: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, [rdi+1Ch] test r12, r12 jz short loc_9D6D3 mov ebx, edx mov r14d, esi mov r15, rdi xor r13d, r13d loc_9D6B9: mov rax, [r15+8] mov rdi, [rax+r13*8] mov esi, r14d mov edx, ebx call change_simple_key_cache_param inc r13 cmp r12, r13 jnz short loc_9D6B9 loc_9D6D3: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long change_partitioned_key_cache_param(long long a1, int a2, int a3) { long long v3; // r12 long long v5; // r13 long long result; // rax v3 = *(unsigned int *)(a1 + 28); if ( *(_DWORD *)(a1 + 28) ) { v5 = 0LL; do result = change_simple_key_cache_param(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 8 * v5++), a2, a3); while ( v3 != v5 ); } return result; }
change_partitioned_key_cache_param: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,dword ptr [RDI + 0x1c] TEST R12,R12 JZ 0x0019d6d3 MOV EBX,EDX MOV R14D,ESI MOV R15,RDI XOR R13D,R13D LAB_0019d6b9: MOV RAX,qword ptr [R15 + 0x8] MOV RDI,qword ptr [RAX + R13*0x8] MOV ESI,R14D MOV EDX,EBX CALL 0x0019be62 INC R13 CMP R12,R13 JNZ 0x0019d6b9 LAB_0019d6d3: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void change_partitioned_key_cache_param(long param_1,int4 param_2,int4 param_3) { uint uVar1; ulong uVar2; uVar1 = *(uint *)(param_1 + 0x1c); if ((ulong)uVar1 != 0) { uVar2 = 0; do { change_simple_key_cache_param (*(int8 *)(*(long *)(param_1 + 8) + uVar2 * 8),param_2,param_3); uVar2 = uVar2 + 1; } while (uVar1 != uVar2); } return; }
9,032
nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*)
ng-log[P]ng-log/src/logging.cc
void LogMessage::RecordCrashReason(internal::CrashReason* reason) { reason->filename = fatal_msg_data_exclusive.fullname_; reason->line_number = fatal_msg_data_exclusive.line_; reason->message = fatal_msg_data_exclusive.message_text_ + fatal_msg_data_exclusive.num_prefix_chars_; #ifdef HAVE_STACKTRACE // Retrieve the stack trace, omitting the logging frames that got us here. reason->depth = GetStackTrace(reason->stack, ARRAYSIZE(reason->stack), 4); #else reason->depth = 0; #endif }
O3
cpp
nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*): pushq %rbx movq %rsi, %rbx leaq 0x2615d(%rip), %rax # 0x31df0 movq 0x2d82e(%rip), %rcx # 0x394c8 movq %rcx, (%rsi) movl 0x2d7e9(%rip), %ecx # 0x3948c movl %ecx, 0x8(%rsi) movq 0x2d7fb(%rip), %rcx # 0x394a8 leaq 0x4(%rcx,%rax), %rax movq %rax, 0x10(%rsi) leaq 0x18(%rsi), %rdi movl $0x20, %esi movl $0x4, %edx callq 0x210d0 movl %eax, 0x118(%rbx) popq %rbx retq nop
_ZN5nglog10LogMessage17RecordCrashReasonEPNS_8internal11CrashReasonE: push rbx mov rbx, rsi lea rax, _ZN5nglogL24fatal_msg_data_exclusiveE; nglog::fatal_msg_data_exclusive mov rcx, cs:qword_394C8 mov [rsi], rcx mov ecx, cs:dword_3948C mov [rsi+8], ecx mov rcx, cs:qword_394A8; int lea rax, [rcx+rax+4] mov [rsi+10h], rax lea rdi, [rsi+18h]; this mov esi, offset qword_20; void ** mov edx, 4; int call _ZN5nglog5tools13GetStackTraceEPPvii; nglog::tools::GetStackTrace(void **,int,int) mov [rbx+118h], eax pop rbx retn
long long nglog::LogMessage::RecordCrashReason(long long a1, long long a2) { int v2; // ecx long long result; // rax *(_QWORD *)a2 = qword_394C8; *(_DWORD *)(a2 + 8) = dword_3948C; v2 = qword_394A8[0]; *(_QWORD *)(a2 + 16) = (char *)&nglog::fatal_msg_data_exclusive + *(_QWORD *)qword_394A8 + 4; result = nglog::tools::GetStackTrace((nglog::tools *)(a2 + 24), (void **)&qword_20, 4, v2); *(_DWORD *)(a2 + 280) = result; return result; }
RecordCrashReason: PUSH RBX MOV RBX,RSI LEA RAX,[0x131df0] MOV RCX,qword ptr [0x001394c8] MOV qword ptr [RSI],RCX MOV ECX,dword ptr [0x0013948c] MOV dword ptr [RSI + 0x8],ECX MOV RCX,qword ptr [0x001394a8] LEA RAX,[RCX + RAX*0x1 + 0x4] MOV qword ptr [RSI + 0x10],RAX LEA RDI,[RSI + 0x18] MOV ESI,0x20 MOV EDX,0x4 CALL 0x001210d0 MOV dword ptr [RBX + 0x118],EAX POP RBX RET
/* nglog::LogMessage::RecordCrashReason(nglog::internal::CrashReason*) */ void __thiscall nglog::LogMessage::RecordCrashReason(LogMessage *this,CrashReason *param_1) { int4 uVar1; *(int8 *)param_1 = fatal_msg_data_exclusive._30424_8_; *(int4 *)(param_1 + 8) = fatal_msg_data_exclusive._30364_4_; *(long *)(param_1 + 0x10) = fatal_msg_data_exclusive._30392_8_ + 0x131df4; uVar1 = tools::GetStackTrace((void **)(param_1 + 0x18),0x20,4); *(int4 *)(param_1 + 0x118) = uVar1; return; }
9,033
my_coll_parser_init
eloqsql/strings/ctype-uca.c
static void my_coll_parser_init(MY_COLL_RULE_PARSER *p, MY_COLL_RULES *rules, const char *str, const char *str_end) { /* Initialize parser to the input buffer and scan two tokens, to make the current token and the next token known. */ memset(p, 0, sizeof(*p)); p->rules= rules; p->errstr[0]= '\0'; my_coll_lexem_init(my_coll_parser_curr(p), str, str_end); my_coll_lexem_next(my_coll_parser_curr(p)); my_coll_parser_next(p)[0]= my_coll_parser_curr(p)[0]; my_coll_lexem_next(my_coll_parser_next(p)); }
O0
c
my_coll_parser_init: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi movl $0x178, %edx # imm = 0x178 callq 0x24180 movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xf0(%rax) movq -0x8(%rbp), %rax movb $0x0, 0xf8(%rax) movq -0x8(%rbp), %rdi callq 0x4ec80 movq %rax, %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x4ec90 movq -0x8(%rbp), %rdi callq 0x4ec80 movq %rax, %rdi callq 0x4ece0 movq -0x8(%rbp), %rdi callq 0x4f0d0 movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rdi callq 0x4ec80 movq -0x28(%rbp), %rdi movq %rax, %rsi movl $0x28, %edx callq 0x24210 movq -0x8(%rbp), %rdi callq 0x4f0d0 movq %rax, %rdi callq 0x4ece0 addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
my_coll_parser_init: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rdi, [rbp+var_8] xor esi, esi mov edx, 178h call _memset mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+0F0h], rcx mov rax, [rbp+var_8] mov byte ptr [rax+0F8h], 0 mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call my_coll_lexem_init mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, rax call my_coll_lexem_next mov rdi, [rbp+var_8] call my_coll_parser_next mov [rbp+var_28], rax mov rdi, [rbp+var_8] call my_coll_parser_curr mov rdi, [rbp+var_28] mov rsi, rax mov edx, 28h ; '(' call _memcpy mov rdi, [rbp+var_8] call my_coll_parser_next mov rdi, rax call my_coll_lexem_next add rsp, 30h pop rbp retn
long long my_coll_parser_init(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // rax long long v6; // rsi long long v7; // rax long long v9; // [rsp+8h] [rbp-28h] memset(a1, 0LL, 376LL); *(_QWORD *)(a1 + 240) = a2; *(_BYTE *)(a1 + 248) = 0; v4 = my_coll_parser_curr(a1); my_coll_lexem_init(v4, a3, a4); v5 = my_coll_parser_curr(a1); my_coll_lexem_next(v5); v9 = my_coll_parser_next(a1); v6 = my_coll_parser_curr(a1); memcpy(v9, v6, 40LL); v7 = my_coll_parser_next(a1); return my_coll_lexem_next(v7); }
my_coll_parser_init: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI MOV EDX,0x178 CALL 0x00124180 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xf0],RCX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0xf8],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014ec80 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x0014ec90 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014ec80 MOV RDI,RAX CALL 0x0014ece0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014f0d0 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014ec80 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,RAX MOV EDX,0x28 CALL 0x00124210 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014f0d0 MOV RDI,RAX CALL 0x0014ece0 ADD RSP,0x30 POP RBP RET
void my_coll_parser_init(void *param_1,int8 param_2,int8 param_3,int8 param_4) { int8 uVar1; void *__dest; void *__src; memset(param_1,0,0x178); *(int8 *)((long)param_1 + 0xf0) = param_2; *(int1 *)((long)param_1 + 0xf8) = 0; uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_init(uVar1,param_3,param_4); uVar1 = my_coll_parser_curr(param_1); my_coll_lexem_next(uVar1); __dest = (void *)my_coll_parser_next(param_1); __src = (void *)my_coll_parser_curr(param_1); memcpy(__dest,__src,0x28); uVar1 = my_coll_parser_next(param_1); my_coll_lexem_next(uVar1); return; }
9,034
evmone::instr::core::balance(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O0/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline Result balance(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { auto& x = stack.top(); const auto addr = intx::be::trunc<evmc::address>(x); if (state.rev >= EVMC_BERLIN && state.host.access_account(addr) == EVMC_ACCESS_COLD) { if ((gas_left -= instr::additional_cold_account_access_cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; } x = intx::be::load<uint256>(state.host.get_balance(addr)); return {EVMC_SUCCESS, gas_left}; }
O0
cpp
evmone::instr::core::balance(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq %rdx, -0x28(%rbp) leaq -0x18(%rbp), %rdi callq 0x611d0 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rsi leaq -0x44(%rbp), %rdi callq 0x68cf0 movq -0x28(%rbp), %rax cmpl $0x8, 0x40(%rax) jl 0x68c78 movq -0x28(%rbp), %rdi addq $0x28, %rdi leaq -0x44(%rbp), %rsi callq 0x3b8e0 cmpl $0x0, %eax jne 0x68c78 movq -0x20(%rbp), %rax subq $0x9c4, %rax # imm = 0x9C4 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jge 0x68c76 movl $0x3, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x68cd2 jmp 0x68c78 movq -0x28(%rbp), %rsi addq $0x28, %rsi leaq -0x88(%rbp), %rdi leaq -0x44(%rbp), %rdx callq 0x3b570 leaq -0x68(%rbp), %rdi leaq -0x88(%rbp), %rsi callq 0x68d50 movq -0x30(%rbp), %rax movq -0x68(%rbp), %rcx movq %rcx, (%rax) movq -0x60(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x58(%rbp), %rcx movq %rcx, 0x10(%rax) movq -0x50(%rbp), %rcx movq %rcx, 0x18(%rax) movl $0x0, -0x10(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movl -0x10(%rbp), %eax movq -0x8(%rbp), %rdx addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN6evmone5instr4core7balanceENS_8StackTopElRNS_14ExecutionStateE: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_28], rdx lea rdi, [rbp+var_18]; this call _ZN6evmone8StackTop3topEv; evmone::StackTop::top(void) mov [rbp+var_30], rax mov rsi, [rbp+var_30] lea rdi, [rbp+var_44] call _ZN4intx2be5truncIN4evmc7addressELj256EEET_RKNS_4uintIXT0_EEE; intx::be::trunc<evmc::address,256u>(intx::uint<256u> const&) mov rax, [rbp+var_28] cmp dword ptr [rax+40h], 8 jl short loc_68C78 mov rdi, [rbp+var_28] add rdi, 28h ; '(' lea rsi, [rbp+var_44] call _ZN4evmc11HostContext14access_accountERKNS_7addressE; evmc::HostContext::access_account(evmc::address const&) cmp eax, 0 jnz short loc_68C78 mov rax, [rbp+var_20] sub rax, 9C4h mov [rbp+var_20], rax cmp rax, 0 jge short loc_68C76 mov [rbp+var_10], 3 mov rax, [rbp+var_20] mov [rbp+var_8], rax jmp short loc_68CD2 loc_68C76: jmp short $+2 loc_68C78: mov rsi, [rbp+var_28] add rsi, 28h ; '(' lea rdi, [rbp+var_88] lea rdx, [rbp+var_44] call _ZNK4evmc11HostContext11get_balanceERKNS_7addressE; evmc::HostContext::get_balance(evmc::address const&) lea rdi, [rbp+var_68] lea rsi, [rbp+var_88] call _ZN4intx2be4loadINS_4uintILj256EEEN4evmc7bytes32EEET_RKT0_; intx::be::load<intx::uint<256u>,evmc::bytes32>(evmc::bytes32 const&) mov rax, [rbp+var_30] mov rcx, [rbp+var_68] mov [rax], rcx mov rcx, [rbp+var_60] mov [rax+8], rcx mov rcx, [rbp+var_58] mov [rax+10h], rcx mov rcx, [rbp+var_50] mov [rax+18h], rcx mov [rbp+var_10], 0 mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_68CD2: mov eax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 90h pop rbp retn
long long evmone::instr::core::balance(long long a1, long long a2, long long a3) { _QWORD *v3; // rax _QWORD v5[4]; // [rsp+8h] [rbp-88h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-68h] BYREF _BYTE v7[20]; // [rsp+4Ch] [rbp-44h] BYREF _QWORD *v8; // [rsp+60h] [rbp-30h] long long v9; // [rsp+68h] [rbp-28h] long long v10; // [rsp+70h] [rbp-20h] long long v11; // [rsp+78h] [rbp-18h] BYREF unsigned int v12; // [rsp+80h] [rbp-10h] long long v13; // [rsp+88h] [rbp-8h] v11 = a1; v10 = a2; v9 = a3; v8 = (_QWORD *)evmone::StackTop::top((evmone::StackTop *)&v11); intx::be::trunc<evmc::address,256u>(v7, v8); if ( *(int *)(v9 + 64) < 8 || (unsigned int)evmc::HostContext::access_account(v9 + 40) || (v10 -= 2500LL, v10 >= 0) ) { evmc::HostContext::get_balance(v5, v9 + 40, (long long)v7); intx::be::load<intx::uint<256u>,evmc::bytes32>(v6, v5); v3 = v8; *v8 = v6[0]; v3[1] = v6[1]; v3[2] = v6[2]; v3[3] = v6[3]; v12 = 0; v13 = v10; } else { v12 = 3; v13 = v10; } return v12; }
balance: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x28],RDX LEA RDI,[RBP + -0x18] CALL 0x001611d0 MOV qword ptr [RBP + -0x30],RAX MOV RSI,qword ptr [RBP + -0x30] LEA RDI,[RBP + -0x44] CALL 0x00168cf0 MOV RAX,qword ptr [RBP + -0x28] CMP dword ptr [RAX + 0x40],0x8 JL 0x00168c78 MOV RDI,qword ptr [RBP + -0x28] ADD RDI,0x28 LEA RSI,[RBP + -0x44] CALL 0x0013b8e0 CMP EAX,0x0 JNZ 0x00168c78 MOV RAX,qword ptr [RBP + -0x20] SUB RAX,0x9c4 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JGE 0x00168c76 MOV dword ptr [RBP + -0x10],0x3 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX JMP 0x00168cd2 LAB_00168c76: JMP 0x00168c78 LAB_00168c78: MOV RSI,qword ptr [RBP + -0x28] ADD RSI,0x28 LEA RDI,[RBP + -0x88] LEA RDX,[RBP + -0x44] CALL 0x0013b570 LEA RDI,[RBP + -0x68] LEA RSI,[RBP + -0x88] CALL 0x00168d50 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x60] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x18],RCX MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_00168cd2: MOV EAX,dword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x90 POP RBP RET
/* evmone::instr::core::balance(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::balance(int8 param_1,long param_2,long param_3) { int iVar1; int1 auVar2 [16]; address local_90 [32]; int8 local_70; int8 local_68; int8 local_60; int8 local_58; be local_4c [20]; uint *local_38; long local_30; long local_28; int8 local_20; uint local_18; long local_10; local_30 = param_3; local_28 = param_2; local_20 = param_1; local_38 = (uint *)StackTop::top((StackTop *)&local_20); intx::be::trunc<evmc::address,256u>(local_4c,local_38); if (((*(int *)(local_30 + 0x40) < 8) || (iVar1 = evmc::HostContext::access_account ((HostContext *)(local_30 + 0x28),(address *)local_4c), iVar1 != 0)) || (local_28 = local_28 + -0x9c4, -1 < local_28)) { evmc::HostContext::get_balance(local_90); intx::be::load<intx::uint<256u>,evmc::bytes32>((be *)&local_70,(bytes32 *)local_90); *(int8 *)local_38 = local_70; *(int8 *)(local_38 + 8) = local_68; *(int8 *)(local_38 + 0x10) = local_60; *(int8 *)(local_38 + 0x18) = local_58; local_18 = 0; local_10 = local_28; } else { local_18 = 3; local_10 = local_28; } auVar2._4_4_ = 0; auVar2._0_4_ = local_18; auVar2._8_8_ = local_10; return auVar2; }
9,035
mi_mempack_get_block_info
eloqsql/storage/myisam/mi_packrec.c
static uchar *_mi_mempack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, MI_BLOCK_INFO *info, uchar **rec_buff_p, uchar *header) { header+= read_pack_length((uint) myisam->s->pack.version, header, &info->rec_len); if (myisam->s->base.blobs) { header+= read_pack_length((uint) myisam->s->pack.version, header, &info->blob_len); /* mi_alloc_rec_buff sets my_errno on error */ if (!(mi_alloc_rec_buff(myisam, info->blob_len , rec_buff_p))) return 0; /* not enough memory */ bit_buff->blob_pos= (uchar*) *rec_buff_p; bit_buff->blob_end= (uchar*) *rec_buff_p + info->blob_len; } return header; }
O3
c
mi_mempack_get_block_info: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %rbx movq %rcx, %r12 movq %rdx, %r15 movq %rsi, %r14 movzbl (%r8), %eax cmpq $0xfd, %rax ja 0x83bd7 movl $0x1, %ecx jmp 0x83c12 cmpl $0xfe, %eax jne 0x83be9 movzwl 0x1(%rbx), %eax movl $0x3, %ecx jmp 0x83c12 movq (%rdi), %rax cmpb $0x1, 0x244(%rax) jne 0x83c0a movzwl 0x1(%rbx), %ecx movzbl 0x3(%rbx), %eax shll $0x10, %eax orq %rcx, %rax movl $0x4, %ecx jmp 0x83c12 movl 0x1(%rbx), %eax movl $0x5, %ecx movq %rax, 0x18(%r15) addq %rcx, %rbx movq (%rdi), %rax cmpl $0x0, 0x188(%rax) je 0x83c9d movzbl (%rbx), %esi cmpq $0xfd, %rsi ja 0x83c39 movl $0x1, %r13d jmp 0x83c75 cmpl $0xfe, %esi jne 0x83c4d movzwl 0x1(%rbx), %esi movl $0x3, %r13d jmp 0x83c75 cmpb $0x1, 0x244(%rax) jne 0x83c6c movzwl 0x1(%rbx), %eax movzbl 0x3(%rbx), %esi shll $0x10, %esi orq %rax, %rsi movl $0x4, %r13d jmp 0x83c75 movl 0x1(%rbx), %esi movl $0x5, %r13d movq %rsi, 0x30(%r15) movq %r12, %rdx callq 0x7fcd5 testq %rax, %rax je 0x83c9b addq %r13, %rbx movq (%r12), %rax movq %rax, 0x18(%r14) addq 0x30(%r15), %rax movq %rax, 0x20(%r14) jmp 0x83c9d xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_mi_mempack_get_block_info: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r8 mov r12, rcx mov r15, rdx mov r14, rsi movzx eax, byte ptr [r8] cmp rax, 0FDh ja short loc_83BD7 mov ecx, 1 jmp short loc_83C12 loc_83BD7: cmp eax, 0FEh jnz short loc_83BE9 movzx eax, word ptr [rbx+1] mov ecx, 3 jmp short loc_83C12 loc_83BE9: mov rax, [rdi] cmp byte ptr [rax+244h], 1 jnz short loc_83C0A movzx ecx, word ptr [rbx+1] movzx eax, byte ptr [rbx+3] shl eax, 10h or rax, rcx mov ecx, 4 jmp short loc_83C12 loc_83C0A: mov eax, [rbx+1] mov ecx, 5 loc_83C12: mov [r15+18h], rax add rbx, rcx mov rax, [rdi] cmp dword ptr [rax+188h], 0 jz short loc_83C9D movzx esi, byte ptr [rbx] cmp rsi, 0FDh ja short loc_83C39 mov r13d, 1 jmp short loc_83C75 loc_83C39: cmp esi, 0FEh jnz short loc_83C4D movzx esi, word ptr [rbx+1] mov r13d, 3 jmp short loc_83C75 loc_83C4D: cmp byte ptr [rax+244h], 1 jnz short loc_83C6C movzx eax, word ptr [rbx+1] movzx esi, byte ptr [rbx+3] shl esi, 10h or rsi, rax mov r13d, 4 jmp short loc_83C75 loc_83C6C: mov esi, [rbx+1] mov r13d, 5 loc_83C75: mov [r15+30h], rsi mov rdx, r12 call mi_alloc_rec_buff test rax, rax jz short loc_83C9B add rbx, r13 mov rax, [r12] mov [r14+18h], rax add rax, [r15+30h] mov [r14+20h], rax jmp short loc_83C9D loc_83C9B: xor ebx, ebx loc_83C9D: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned __int8 * mi_mempack_get_block_info( long long *a1, long long a2, long long a3, long long *a4, unsigned __int8 *a5, long long a6) { unsigned long long v9; // rax long long v10; // rcx unsigned __int8 *v11; // rbx unsigned long long v12; // rsi long long v13; // r13 long long v14; // rax v9 = *a5; if ( v9 > 0xFD ) { if ( (_DWORD)v9 == 254 ) { v9 = *(unsigned __int16 *)(a5 + 1); v10 = 3LL; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v9 = *(unsigned __int16 *)(a5 + 1) | (unsigned long long)(a5[3] << 16); v10 = 4LL; } else { v9 = *(unsigned int *)(a5 + 1); v10 = 5LL; } } else { v10 = 1LL; } *(_QWORD *)(a3 + 24) = v9; v11 = &a5[v10]; if ( *(_DWORD *)(*a1 + 392) ) { v12 = *v11; if ( v12 > 0xFD ) { if ( (_DWORD)v12 == 254 ) { v12 = *(unsigned __int16 *)(v11 + 1); v13 = 3LL; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v12 = *(unsigned __int16 *)(v11 + 1) | (unsigned long long)(v11[3] << 16); v13 = 4LL; } else { v12 = *(unsigned int *)(v11 + 1); v13 = 5LL; } } else { v13 = 1LL; } *(_QWORD *)(a3 + 48) = v12; if ( mi_alloc_rec_buff(a1, v12, a4, v10, (long long)a5, a6) ) { v11 += v13; v14 = *a4; *(_QWORD *)(a2 + 24) = *a4; *(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + v14; } else { return 0LL; } } return v11; }
_mi_mempack_get_block_info: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R8 MOV R12,RCX MOV R15,RDX MOV R14,RSI MOVZX EAX,byte ptr [R8] CMP RAX,0xfd JA 0x00183bd7 MOV ECX,0x1 JMP 0x00183c12 LAB_00183bd7: CMP EAX,0xfe JNZ 0x00183be9 MOVZX EAX,word ptr [RBX + 0x1] MOV ECX,0x3 JMP 0x00183c12 LAB_00183be9: MOV RAX,qword ptr [RDI] CMP byte ptr [RAX + 0x244],0x1 JNZ 0x00183c0a MOVZX ECX,word ptr [RBX + 0x1] MOVZX EAX,byte ptr [RBX + 0x3] SHL EAX,0x10 OR RAX,RCX MOV ECX,0x4 JMP 0x00183c12 LAB_00183c0a: MOV EAX,dword ptr [RBX + 0x1] MOV ECX,0x5 LAB_00183c12: MOV qword ptr [R15 + 0x18],RAX ADD RBX,RCX MOV RAX,qword ptr [RDI] CMP dword ptr [RAX + 0x188],0x0 JZ 0x00183c9d MOVZX ESI,byte ptr [RBX] CMP RSI,0xfd JA 0x00183c39 MOV R13D,0x1 JMP 0x00183c75 LAB_00183c39: CMP ESI,0xfe JNZ 0x00183c4d MOVZX ESI,word ptr [RBX + 0x1] MOV R13D,0x3 JMP 0x00183c75 LAB_00183c4d: CMP byte ptr [RAX + 0x244],0x1 JNZ 0x00183c6c MOVZX EAX,word ptr [RBX + 0x1] MOVZX ESI,byte ptr [RBX + 0x3] SHL ESI,0x10 OR RSI,RAX MOV R13D,0x4 JMP 0x00183c75 LAB_00183c6c: MOV ESI,dword ptr [RBX + 0x1] MOV R13D,0x5 LAB_00183c75: MOV qword ptr [R15 + 0x30],RSI MOV RDX,R12 CALL 0x0017fcd5 TEST RAX,RAX JZ 0x00183c9b ADD RBX,R13 MOV RAX,qword ptr [R12] MOV qword ptr [R14 + 0x18],RAX ADD RAX,qword ptr [R15 + 0x30] MOV qword ptr [R14 + 0x20],RAX JMP 0x00183c9d LAB_00183c9b: XOR EBX,EBX LAB_00183c9d: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
byte * _mi_mempack_get_block_info (long *param_1,long param_2,long param_3,long *param_4,byte *param_5) { long lVar1; long lVar2; ulong uVar3; uVar3 = (ulong)*param_5; if (uVar3 < 0xfe) { lVar2 = 1; } else if (*param_5 == 0xfe) { uVar3 = (ulong)*(ushort *)(param_5 + 1); lVar2 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)*(uint3 *)(param_5 + 1); lVar2 = 4; } else { uVar3 = (ulong)*(uint *)(param_5 + 1); lVar2 = 5; } *(ulong *)(param_3 + 0x18) = uVar3; param_5 = param_5 + lVar2; if (*(int *)(*param_1 + 0x188) != 0) { uVar3 = (ulong)*param_5; if (uVar3 < 0xfe) { lVar2 = 1; } else if (*param_5 == 0xfe) { uVar3 = (ulong)*(ushort *)(param_5 + 1); lVar2 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)*(uint3 *)(param_5 + 1); lVar2 = 4; } else { uVar3 = (ulong)*(uint *)(param_5 + 1); lVar2 = 5; } *(ulong *)(param_3 + 0x30) = uVar3; lVar1 = mi_alloc_rec_buff(param_1,uVar3,param_4); if (lVar1 == 0) { param_5 = (byte *)0x0; } else { param_5 = param_5 + lVar2; lVar2 = *param_4; *(long *)(param_2 + 0x18) = lVar2; *(long *)(param_2 + 0x20) = lVar2 + *(long *)(param_3 + 0x30); } } return param_5; }
9,036
inherit_charset_data
eloqsql/mysys/charset.c
static void inherit_charset_data(struct charset_info_st *cs, CHARSET_INFO *refcs) { if (!cs->to_upper) cs->to_upper= refcs->to_upper; if (!cs->to_lower) cs->to_lower= refcs->to_lower; if (!cs->m_ctype) cs->m_ctype= refcs->m_ctype; if (!cs->tab_to_uni) cs->tab_to_uni= refcs->tab_to_uni; }
O0
c
inherit_charset_data: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x50(%rax) jne 0x7ece7 movq -0x10(%rbp), %rax movq 0x50(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x50(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x48(%rax) jne 0x7ed02 movq -0x10(%rbp), %rax movq 0x48(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x48(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x40(%rax) jne 0x7ed1d movq -0x10(%rbp), %rax movq 0x40(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x7ed38 movq -0x10(%rbp), %rax movq 0x68(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x68(%rax) popq %rbp retq nopw (%rax,%rax)
inherit_charset_data: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] cmp qword ptr [rax+50h], 0 jnz short loc_7ECE7 mov rax, [rbp+var_10] mov rcx, [rax+50h] mov rax, [rbp+var_8] mov [rax+50h], rcx loc_7ECE7: mov rax, [rbp+var_8] cmp qword ptr [rax+48h], 0 jnz short loc_7ED02 mov rax, [rbp+var_10] mov rcx, [rax+48h] mov rax, [rbp+var_8] mov [rax+48h], rcx loc_7ED02: mov rax, [rbp+var_8] cmp qword ptr [rax+40h], 0 jnz short loc_7ED1D mov rax, [rbp+var_10] mov rcx, [rax+40h] mov rax, [rbp+var_8] mov [rax+40h], rcx loc_7ED1D: mov rax, [rbp+var_8] cmp qword ptr [rax+68h], 0 jnz short loc_7ED38 mov rax, [rbp+var_10] mov rcx, [rax+68h] mov rax, [rbp+var_8] mov [rax+68h], rcx loc_7ED38: pop rbp retn
_QWORD * inherit_charset_data(_QWORD *a1, _QWORD *a2) { _QWORD *result; // rax if ( !a1[10] ) a1[10] = a2[10]; if ( !a1[9] ) a1[9] = a2[9]; if ( !a1[8] ) a1[8] = a2[8]; result = a1; if ( !a1[13] ) { result = a1; a1[13] = a2[13]; } return result; }
inherit_charset_data: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x50],0x0 JNZ 0x0017ece7 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x50],RCX LAB_0017ece7: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x48],0x0 JNZ 0x0017ed02 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x48] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x48],RCX LAB_0017ed02: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x0017ed1d MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x40] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],RCX LAB_0017ed1d: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x0017ed38 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x68],RCX LAB_0017ed38: POP RBP RET
void inherit_charset_data(long param_1,long param_2) { if (*(long *)(param_1 + 0x50) == 0) { *(int8 *)(param_1 + 0x50) = *(int8 *)(param_2 + 0x50); } if (*(long *)(param_1 + 0x48) == 0) { *(int8 *)(param_1 + 0x48) = *(int8 *)(param_2 + 0x48); } if (*(long *)(param_1 + 0x40) == 0) { *(int8 *)(param_1 + 0x40) = *(int8 *)(param_2 + 0x40); } if (*(long *)(param_1 + 0x68) == 0) { *(int8 *)(param_1 + 0x68) = *(int8 *)(param_2 + 0x68); } return; }
9,037
append_json_point(String*, unsigned int, char const*)
eloqsql/sql/spatial.cc
static void append_json_point(String *txt, uint max_dec, const char *data) { double x,y; get_point(&x, &y, data); if (max_dec < FLOATING_POINT_DECIMALS) { x= my_double_round(x, max_dec, FALSE, FALSE); y= my_double_round(y, max_dec, FALSE, FALSE); } txt->qs_append('['); txt->qs_append(x); txt->qs_append(", ", 2); txt->qs_append(y); txt->qs_append(']'); }
O0
cpp
append_json_point(String*, unsigned int, char const*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rdx leaq -0x20(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0xe24510 cmpl $0x1f, -0xc(%rbp) jae 0xe24b9a movsd -0x20(%rbp), %xmm0 movl -0xc(%rbp), %eax movl %eax, %edi xorl %edx, %edx movl %edx, %esi callq 0xd88540 movsd %xmm0, -0x20(%rbp) movsd -0x28(%rbp), %xmm0 movl -0xc(%rbp), %eax movl %eax, %edi xorl %edx, %edx movl %edx, %esi callq 0xd88540 movsd %xmm0, -0x28(%rbp) movq -0x8(%rbp), %rdi addq $0x8, %rdi movl $0x5b, %esi callq 0x8dc600 movq -0x8(%rbp), %rdi addq $0x8, %rdi movsd -0x20(%rbp), %xmm0 callq 0xaaeea0 movq -0x8(%rbp), %rdi addq $0x8, %rdi leaq 0x61f56a(%rip), %rsi # 0x1444137 movl $0x2, %edx callq 0xaaee50 movq -0x8(%rbp), %rdi addq $0x8, %rdi movsd -0x28(%rbp), %xmm0 callq 0xaaeea0 movq -0x8(%rbp), %rdi addq $0x8, %rdi movl $0x5d, %esi callq 0x8dc600 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZL17append_json_pointP6StringjPKc: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_C+4], rdi mov dword ptr [rbp+var_C], esi mov [rbp+var_18], rdx mov rdx, [rbp+var_18]; char * lea rdi, [rbp+var_20]; double * lea rsi, [rbp+var_28]; double * call _ZL9get_pointPdS_PKc; get_point(double *,double *,char const*) cmp dword ptr [rbp+var_C], 1Fh jnb short loc_E24B9A movsd xmm0, [rbp+var_20]; double mov eax, dword ptr [rbp+var_C] mov edi, eax; __int64 xor edx, edx; bool mov esi, edx; bool call _Z15my_double_rounddxbb; my_double_round(double,long long,bool,bool) movsd [rbp+var_20], xmm0 movsd xmm0, [rbp+var_28]; double mov eax, dword ptr [rbp+var_C] mov edi, eax; __int64 xor edx, edx; bool mov esi, edx; bool call _Z15my_double_rounddxbb; my_double_round(double,long long,bool,bool) movsd [rbp+var_28], xmm0 loc_E24B9A: mov rdi, [rbp+var_C+4] add rdi, 8; this mov esi, 5Bh ; '['; char call _ZN13Binary_string9qs_appendEc; Binary_string::qs_append(char) mov rdi, [rbp+var_C+4] add rdi, 8; this movsd xmm0, [rbp+var_20]; double call _ZN13Binary_string9qs_appendEd; Binary_string::qs_append(double) mov rdi, [rbp+var_C+4] add rdi, 8; this lea rsi, asc_1444135+2; char * mov edx, 2; unsigned __int64 call _ZN13Binary_string9qs_appendEPKcm; Binary_string::qs_append(char const*,ulong) mov rdi, [rbp+var_C+4] add rdi, 8; this movsd xmm0, [rbp+var_28]; double call _ZN13Binary_string9qs_appendEd; Binary_string::qs_append(double) mov rdi, [rbp+var_C+4] add rdi, 8; this mov esi, 5Dh ; ']'; char call _ZN13Binary_string9qs_appendEc; Binary_string::qs_append(char) add rsp, 30h pop rbp retn
Binary_string * append_json_point(String *a1, int a2, double *a3) { double v4; // [rsp+8h] [rbp-28h] BYREF double v5[2]; // [rsp+10h] [rbp-20h] BYREF _DWORD v6[3]; // [rsp+24h] [rbp-Ch] *(_QWORD *)&v6[1] = a1; v6[0] = a2; *(_QWORD *)&v5[1] = a3; get_point(v5, &v4, a3); if ( v6[0] < 0x1Fu ) { v5[0] = my_double_round(v5[0], v6[0], 0LL, 0LL); v4 = my_double_round(v4, v6[0], 0LL, 0LL); } Binary_string::qs_append((Binary_string *)(*(_QWORD *)&v6[1] + 8LL), 91); Binary_string::qs_append((Binary_string *)(*(_QWORD *)&v6[1] + 8LL), v5[0]); Binary_string::qs_append((Binary_string *)(*(_QWORD *)&v6[1] + 8LL), ", ", 2LL); Binary_string::qs_append((Binary_string *)(*(_QWORD *)&v6[1] + 8LL), v4); return Binary_string::qs_append((Binary_string *)(*(_QWORD *)&v6[1] + 8LL), 93); }
set_value: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,-0x80 MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] POP RBP JMP 0x00e24ae0
/* non-virtual thunk to Item_splocal_row_field::set_value(THD*, sp_rcontext*, Item**) */ void __thiscall Item_splocal_row_field::set_value (Item_splocal_row_field *this,THD *param_1,sp_rcontext *param_2,Item **param_3) { set_value(this + -0x80,param_1,param_2,param_3); return; }
9,038
uf_space_prespace_selected
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_prespace_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; } bfill((uchar*) to,spaces,' '); if (to+spaces != end) decode_bytes(rec,bit_buff,to+spaces,end); } else decode_bytes(rec,bit_buff,to,end); } }
O0
c
uf_space_prespace_selected: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbd3f7 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbd41b jmp 0xbd439 movq -0x10(%rbp), %rdi callq 0xbc2b0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbd439 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx movl $0x20, %esi callq 0x2a2b0 jmp 0xbd562 movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbd46b movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbd493 jmp 0xbd54b movq -0x10(%rbp), %rdi callq 0xbc2b0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbd54b movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbd4d6 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x202302(%rip), %rcx # 0x2bf7d0 andl (%rcx,%rdx,4), %eax movl %eax, -0x28(%rbp) jmp 0xbd4e9 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbaa60 movl %eax, -0x28(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax jbe 0xbd50b movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) jmp 0xbd562 movq -0x18(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, %edx movl $0x20, %esi callq 0x2a2b0 movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax cmpq -0x20(%rbp), %rax je 0xbd549 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x24(%rbp), %eax addq %rax, %rdx movq -0x20(%rbp), %rcx callq 0xbc9c0 jmp 0xbd560 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xbc9c0 jmp 0xbd562 addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
uf_space_prespace_selected_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BD3F7 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BD41B jmp short loc_BD439 loc_BD3F7: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_BD439 loc_BD41B: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax mov esi, 20h ; ' ' call _memset jmp loc_BD562 loc_BD439: mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BD46B mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BD493 jmp loc_BD54B loc_BD46B: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz loc_BD54B loc_BD493: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BD4D6 mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_28], eax jmp short loc_BD4E9 loc_BD4D6: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_28], eax loc_BD4E9: mov ecx, [rbp+var_28] mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx cmp rax, [rbp+var_20] jbe short loc_BD50B mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 jmp short loc_BD562 loc_BD50B: mov rdi, [rbp+var_18] mov eax, [rbp+var_24] mov edx, eax mov esi, 20h ; ' ' call _memset mov rax, [rbp+var_18] mov ecx, [rbp+var_24] add rax, rcx cmp rax, [rbp+var_20] jz short loc_BD549 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov eax, [rbp+var_24] add rdx, rax mov rcx, [rbp+var_20] call decode_bytes_0 loc_BD549: jmp short loc_BD560 loc_BD54B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call decode_bytes_0 loc_BD560: jmp short $+2 loc_BD562: add rsp, 30h pop rbp retn
long long uf_space_prespace_selected_0(long long a1, int *a2, _BYTE *a3, _BYTE *a4) { int v4; // eax int v5; // ecx long long result; // rax int v7; // eax int v8; // ecx unsigned int v9; // eax int v10; // ecx unsigned int bits_0; // [rsp+8h] [rbp-28h] if ( !a2[1] ) { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) goto LABEL_6; return memset(a3, 32LL, a4 - a3); } v4 = *a2; v5 = a2[1] - 1; a2[1] = v5; if ( ((1 << v5) & v4) != 0 ) return memset(a3, 32LL, a4 - a3); LABEL_6: if ( a2[1] ) { v7 = *a2; v8 = a2[1] - 1; a2[1] = v8; if ( ((1 << v8) & v7) == 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } else { fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 >= 0 ) return decode_bytes_0(a1, (long long)a2, a3, a4); } if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v9 = *a2; v10 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v10; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v9 >> v10); } if ( &a3[bits_0] <= a4 ) { memset(a3, 32LL, bits_0); result = (long long)&a3[bits_0]; if ( (_BYTE *)result != a4 ) return decode_bytes_0(a1, (long long)a2, &a3[bits_0], a4); } else { result = (long long)a2; a2[10] = 1; } return result; }
uf_space_prespace_selected: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bd3f7 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bd41b JMP 0x001bd439 LAB_001bd3f7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bc2b0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bd439 LAB_001bd41b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX MOV ESI,0x20 CALL 0x0012a2b0 JMP 0x001bd562 LAB_001bd439: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bd46b MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bd493 JMP 0x001bd54b LAB_001bd46b: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bc2b0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bd54b LAB_001bd493: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001bd4d6 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3bf7d0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x28],EAX JMP 0x001bd4e9 LAB_001bd4d6: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001baa60 MOV dword ptr [RBP + -0x28],EAX LAB_001bd4e9: MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JBE 0x001bd50b MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 JMP 0x001bd562 LAB_001bd50b: MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX MOV ESI,0x20 CALL 0x0012a2b0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX CMP RAX,qword ptr [RBP + -0x20] JZ 0x001bd549 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x20] CALL 0x001bc9c0 LAB_001bd549: JMP 0x001bd560 LAB_001bd54b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001bc9c0 LAB_001bd560: JMP 0x001bd562 LAB_001bd562: ADD RSP,0x30 POP RBP RET
void uf_space_prespace_selected(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint local_30; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { decode_bytes(param_1,param_2,param_3,param_4); } else { if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_30 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_30 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } if (param_4 < (long)param_3 + (ulong)local_30) { param_2[10] = 1; } else { memset(param_3,0x20,(ulong)local_30); if ((long)param_3 + (ulong)local_30 != param_4) { decode_bytes(param_1,param_2,(long)param_3 + (ulong)local_30,param_4); } } } } else { memset(param_3,0x20,param_4 - (long)param_3); } return; }
9,039
my_mb_wc_latin1
eloqsql/strings/ctype-latin1.c
static int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *wc, const uchar *str, const uchar *end __attribute__((unused))) { if (str >= end) return MY_CS_TOOSMALL; /* There are no unassigned characters in latin1. Every code point in latin1 is mapped to some Unicode code point. We can always return 1, no needs to check the value of cs_to_uni[*str]. */ *wc= cs_to_uni[*str]; DBUG_ASSERT(wc[0] || !str[0]); return 1; }
O3
c
my_mb_wc_latin1: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x3ec84 movzbl (%rdx), %eax leaq 0x16ba98(%rip), %rcx # 0x1aa710 movzwl (%rcx,%rax,2), %eax movq %rax, (%rsi) movl $0x1, %eax popq %rbp retq
my_mb_wc_latin1: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_3EC84 movzx eax, byte ptr [rdx] lea rcx, cs_to_uni movzx eax, word ptr [rcx+rax*2] mov [rsi], rax mov eax, 1 loc_3EC84: pop rbp retn
long long my_mb_wc_latin1(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { *a2 = cs_to_uni[*a3]; return 1LL; } return result; }
my_mb_wc_latin1: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0013ec84 MOVZX EAX,byte ptr [RDX] LEA RCX,[0x2aa710] MOVZX EAX,word ptr [RCX + RAX*0x2] MOV qword ptr [RSI],RAX MOV EAX,0x1 LAB_0013ec84: POP RBP RET
int8 my_mb_wc_latin1(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { int8 uVar1; uVar1 = 0xffffff9b; if (param_3 < param_4) { *param_2 = (ulong)*(ushort *)(cs_to_uni + (ulong)*param_3 * 2); uVar1 = 1; } return uVar1; }
9,040
decode_pos
eloqsql/storage/maria/ma_packrec.c
static uint decode_pos(MARIA_BIT_BUFF *bit_buff, MARIA_DECODE_TREE *decode_tree) { uint16 *pos=decode_tree->table; for (;;) { if (get_bit(bit_buff)) pos++; if (*pos & IS_CHAR) return (uint) (*pos & ~IS_CHAR); pos+= *pos; } }
O0
c
decode_pos: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0x3c1ba movq -0x8(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0x3c1de jmp 0x3c1ea movq -0x8(%rbp), %rdi callq 0x3aa40 movq -0x8(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x8(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0x3c1ea movq -0x18(%rbp), %rax addq $0x2, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax je 0x3c20d movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0xffff7fff, %eax # imm = 0xFFFF7FFF addq $0x20, %rsp popq %rbp retq movq -0x18(%rbp), %rax movzwl (%rax), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx shlq %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) jmp 0x3c18b nopw (%rax,%rax)
decode_pos: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax loc_3C18B: mov rax, [rbp+var_8] cmp dword ptr [rax+4], 0 jz short loc_3C1BA mov rax, [rbp+var_8] mov eax, [rax] mov rdx, [rbp+var_8] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_3C1DE jmp short loc_3C1EA loc_3C1BA: mov rdi, [rbp+var_8] call fill_buffer mov rax, [rbp+var_8] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_8] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_3C1EA loc_3C1DE: mov rax, [rbp+var_18] add rax, 2 mov [rbp+var_18], rax loc_3C1EA: mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jz short loc_3C20D mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 0FFFF7FFFh add rsp, 20h pop rbp retn loc_3C20D: mov rax, [rbp+var_18] movzx ecx, word ptr [rax] mov rax, [rbp+var_18] movsxd rcx, ecx shl rcx, 1 add rax, rcx mov [rbp+var_18], rax jmp loc_3C18B
long long decode_pos(int *a1, _WORD **a2) { int v2; // eax int v3; // ecx _WORD *i; // [rsp+8h] [rbp-18h] for ( i = *a2; ; i += (unsigned __int16)*i ) { if ( !a1[1] ) { fill_buffer((long long)a1); a1[1] = 31; if ( *a1 >= 0 ) goto LABEL_7; LABEL_6: ++i; goto LABEL_7; } v2 = *a1; v3 = a1[1] - 1; a1[1] = v3; if ( ((1 << v3) & v2) != 0 ) goto LABEL_6; LABEL_7: if ( (*i & 0x8000) != 0 ) break; } return *i & 0x7FFF; }
decode_pos: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX LAB_0013c18b: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x4],0x0 JZ 0x0013c1ba MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x0013c1de JMP 0x0013c1ea LAB_0013c1ba: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0013aa40 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x0013c1ea LAB_0013c1de: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 MOV qword ptr [RBP + -0x18],RAX LAB_0013c1ea: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JZ 0x0013c20d MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0xffff7fff ADD RSP,0x20 POP RBP RET LAB_0013c20d: MOV RAX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX SHL RCX,0x1 ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX JMP 0x0013c18b
ushort decode_pos(uint *param_1,int8 *param_2) { uint uVar1; ushort *local_20; local_20 = (ushort *)*param_2; while( true ) { if (param_1[1] == 0) { fill_buffer(param_1); param_1[1] = 0x1f; uVar1 = *param_1 & 0x80000000; } else { uVar1 = param_1[1]; param_1[1] = uVar1 - 1; uVar1 = *param_1 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 != 0) { local_20 = local_20 + 1; } if ((*local_20 & 0x8000) != 0) break; local_20 = local_20 + (int)(uint)*local_20; } return *local_20 & 0x7fff; }
9,041
translog_cursor_init
eloqsql/storage/maria/ma_loghandler.c
static void translog_cursor_init(struct st_buffer_cursor *cursor, struct st_translog_buffer *buffer, uint8 buffer_no) { DBUG_ENTER("translog_cursor_init"); cursor->ptr= buffer->buffer; cursor->buffer= buffer; cursor->buffer_no= buffer_no; cursor->current_page_fill= 0; cursor->chaser= (cursor != &log_descriptor.bc); cursor->write_counter= 0; cursor->previous_offset= 0; cursor->protected= 0; DBUG_VOID_RETURN; }
O0
c
translog_cursor_init: pushq %rbp movq %rsp, %rbp movb %dl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb %al, -0x11(%rbp) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x28(%rax) movb -0x11(%rbp), %cl movq -0x8(%rbp), %rax movb %cl, 0x36(%rax) movq -0x8(%rbp), %rax movw $0x0, 0x30(%rax) leaq 0x44248c(%rip), %rax # 0x478c70 addq $0x800c50, %rax # imm = 0x800C50 cmpq %rax, -0x8(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq -0x8(%rbp), %rax movb %cl, 0x37(%rax) movq -0x8(%rbp), %rax movw $0x0, 0x32(%rax) movq -0x8(%rbp), %rax movw $0x0, 0x34(%rax) movq -0x8(%rbp), %rax movb $0x0, 0x38(%rax) jmp 0x3681d popq %rbp retq nop
translog_cursor_init: push rbp mov rbp, rsp mov al, dl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], al mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+20h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+28h], rcx mov cl, [rbp+var_11] mov rax, [rbp+var_8] mov [rax+36h], cl mov rax, [rbp+var_8] mov word ptr [rax+30h], 0 lea rax, log_descriptor add rax, 800C50h cmp [rbp+var_8], rax setnz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+var_8] mov [rax+37h], cl mov rax, [rbp+var_8] mov word ptr [rax+32h], 0 mov rax, [rbp+var_8] mov word ptr [rax+34h], 0 mov rax, [rbp+var_8] mov byte ptr [rax+38h], 0 jmp short $+2 loc_3681D: pop rbp retn
long long * translog_cursor_init(long long *a1, long long a2, char a3) { long long *result; // rax a1[4] = a2; a1[5] = a2; *((_BYTE *)a1 + 54) = a3; *((_WORD *)a1 + 24) = 0; *((_BYTE *)a1 + 55) = a1 != &log_descriptor[1048970]; *((_WORD *)a1 + 25) = 0; *((_WORD *)a1 + 26) = 0; result = a1; *((_BYTE *)a1 + 56) = 0; return result; }
translog_cursor_init: PUSH RBP MOV RBP,RSP MOV AL,DL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],AL MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x28],RCX MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x36],CL MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX + 0x30],0x0 LEA RAX,[0x578c70] ADD RAX,0x800c50 CMP qword ptr [RBP + -0x8],RAX SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x37],CL MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX + 0x32],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX + 0x34],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x38],0x0 JMP 0x0013681d LAB_0013681d: POP RBP RET
void translog_cursor_init(int *param_1,int8 param_2,int1 param_3) { *(int8 *)(param_1 + 0x20) = param_2; *(int8 *)(param_1 + 0x28) = param_2; param_1[0x36] = param_3; *(int2 *)(param_1 + 0x30) = 0; param_1[0x37] = param_1 != &DAT_00d798c0; *(int2 *)(param_1 + 0x32) = 0; *(int2 *)(param_1 + 0x34) = 0; param_1[0x38] = 0; return; }
9,042
nglog::tools::MyUserNameInitializer()
ng-log[P]ng-log/src/utilities.cc
static void MyUserNameInitializer() { // TODO(hamaji): Probably this is not portable. #if defined(NGLOG_OS_WINDOWS) const char* user = getenv("USERNAME"); #else const char* user = getenv("USER"); #endif if (user != nullptr) { g_my_user_name = user; } else { #if defined(HAVE_PWD_H) && defined(HAVE_UNISTD_H) struct passwd pwd; struct passwd* result = nullptr; char buffer[1024] = {'\0'}; uid_t uid = geteuid(); int pwuid_res = getpwuid_r(uid, &pwd, buffer, sizeof(buffer), &result); if (pwuid_res == 0 && result) { g_my_user_name = pwd.pw_name; } else { std::snprintf(buffer, sizeof(buffer), "uid%d", uid); g_my_user_name = buffer; } #endif if (g_my_user_name.empty()) { g_my_user_name = "invalid-user"; } } }
O0
cpp
nglog::tools::MyUserNameInitializer(): pushq %rbp movq %rsp, %rbp subq $0x450, %rsp # imm = 0x450 leaq 0x3f60(%rip), %rdi # 0x4f072 callq 0x9900 movq %rax, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x4b137 movq -0x8(%rbp), %rsi leaq 0x35b0b(%rip), %rdi # 0x80c38 callq 0x9a30 jmp 0x4b1fe movq $0x0, -0x40(%rbp) leaq -0x440(%rbp), %rdi xorl %esi, %esi movl $0x400, %edx # imm = 0x400 callq 0x93a0 callq 0x93e0 movl %eax, -0x444(%rbp) movl -0x444(%rbp), %edi leaq -0x440(%rbp), %rdx leaq -0x38(%rbp), %rsi movl $0x400, %ecx # imm = 0x400 leaq -0x40(%rbp), %r8 callq 0x9e80 movl %eax, -0x448(%rbp) cmpl $0x0, -0x448(%rbp) jne 0x4b1a4 cmpq $0x0, -0x40(%rbp) je 0x4b1a4 movq -0x38(%rbp), %rsi leaq 0x35a9b(%rip), %rdi # 0x80c38 callq 0x9a30 jmp 0x4b1d7 leaq -0x440(%rbp), %rdi movl -0x444(%rbp), %ecx movl $0x400, %esi # imm = 0x400 leaq 0x3eba(%rip), %rdx # 0x4f077 movb $0x0, %al callq 0x9bd0 leaq -0x440(%rbp), %rsi leaq 0x35a66(%rip), %rdi # 0x80c38 callq 0x9a30 leaq 0x35a5a(%rip), %rdi # 0x80c38 callq 0x9c30 testb $0x1, %al jne 0x4b1e9 jmp 0x4b1fc leaq 0x35a48(%rip), %rdi # 0x80c38 leaq 0x2812(%rip), %rsi # 0x4da09 callq 0x9a30 jmp 0x4b1fe addq $0x450, %rsp # imm = 0x450 popq %rbp retq nopw (%rax,%rax)
_ZN5nglog5toolsL21MyUserNameInitializerEv: push rbp mov rbp, rsp sub rsp, 450h lea rdi, aUser; "USER" call _getenv mov [rbp+var_8], rax cmp [rbp+var_8], 0 jz short loc_4B137 mov rsi, [rbp+var_8] lea rdi, _ZN5nglog5toolsL14g_my_user_nameB5cxx11E; nglog::tools::g_my_user_name call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp loc_4B1FE loc_4B137: mov [rbp+var_40], 0 lea rdi, [rbp+var_440] xor esi, esi mov edx, 400h call _memset call _geteuid mov [rbp+var_444], eax mov edi, [rbp+var_444] lea rdx, [rbp+var_440] lea rsi, [rbp+var_38] mov ecx, 400h lea r8, [rbp+var_40] call _getpwuid_r mov [rbp+var_448], eax cmp [rbp+var_448], 0 jnz short loc_4B1A4 cmp [rbp+var_40], 0 jz short loc_4B1A4 mov rsi, [rbp+var_38] lea rdi, _ZN5nglog5toolsL14g_my_user_nameB5cxx11E; nglog::tools::g_my_user_name call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short loc_4B1D7 loc_4B1A4: lea rdi, [rbp+var_440] mov ecx, [rbp+var_444] mov esi, 400h lea rdx, aUidD; "uid%d" mov al, 0 call _snprintf lea rsi, [rbp+var_440] lea rdi, _ZN5nglog5toolsL14g_my_user_nameB5cxx11E; nglog::tools::g_my_user_name call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) loc_4B1D7: lea rdi, _ZN5nglog5toolsL14g_my_user_nameB5cxx11E; nglog::tools::g_my_user_name call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_4B1E9 jmp short loc_4B1FC loc_4B1E9: lea rdi, _ZN5nglog5toolsL14g_my_user_nameB5cxx11E; nglog::tools::g_my_user_name lea rsi, aInvalidUser; "invalid-user" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) loc_4B1FC: jmp short $+2 loc_4B1FE: add rsp, 450h pop rbp retn
long long nglog::tools::MyUserNameInitializer(nglog::tools *this) { long long result; // rax unsigned int v2; // [rsp+Ch] [rbp-444h] _BYTE v3[1024]; // [rsp+10h] [rbp-440h] BYREF long long v4; // [rsp+410h] [rbp-40h] BYREF _QWORD v5[6]; // [rsp+418h] [rbp-38h] BYREF long long v6; // [rsp+448h] [rbp-8h] v6 = getenv("USER"); if ( v6 ) return std::string::operator=(&nglog::tools::g_my_user_name[abi:cxx11], v6); v4 = 0LL; memset(v3, 0LL, sizeof(v3)); v2 = geteuid(); if ( (unsigned int)getpwuid_r(v2, v5, v3, 1024LL, &v4) || !v4 ) { snprintf(v3, 1024LL, "uid%d", v2); std::string::operator=(&nglog::tools::g_my_user_name[abi:cxx11], v3); } else { std::string::operator=(&nglog::tools::g_my_user_name[abi:cxx11], v5[0]); } result = std::string::empty(&nglog::tools::g_my_user_name[abi:cxx11]); if ( (result & 1) != 0 ) return std::string::operator=(&nglog::tools::g_my_user_name[abi:cxx11], "invalid-user"); return result; }
MyUserNameInitializer: PUSH RBP MOV RBP,RSP SUB RSP,0x450 LEA RDI,[0x14f072] CALL 0x00109900 MOV qword ptr [RBP + -0x8],RAX CMP qword ptr [RBP + -0x8],0x0 JZ 0x0014b137 MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x180c38] CALL 0x00109a30 JMP 0x0014b1fe LAB_0014b137: MOV qword ptr [RBP + -0x40],0x0 LEA RDI,[RBP + -0x440] XOR ESI,ESI MOV EDX,0x400 CALL 0x001093a0 CALL 0x001093e0 MOV dword ptr [RBP + -0x444],EAX MOV EDI,dword ptr [RBP + -0x444] LEA RDX,[RBP + -0x440] LEA RSI,[RBP + -0x38] MOV ECX,0x400 LEA R8,[RBP + -0x40] CALL 0x00109e80 MOV dword ptr [RBP + -0x448],EAX CMP dword ptr [RBP + -0x448],0x0 JNZ 0x0014b1a4 CMP qword ptr [RBP + -0x40],0x0 JZ 0x0014b1a4 MOV RSI,qword ptr [RBP + -0x38] LEA RDI,[0x180c38] CALL 0x00109a30 JMP 0x0014b1d7 LAB_0014b1a4: LEA RDI,[RBP + -0x440] MOV ECX,dword ptr [RBP + -0x444] MOV ESI,0x400 LEA RDX,[0x14f077] MOV AL,0x0 CALL 0x00109bd0 LEA RSI,[RBP + -0x440] LEA RDI,[0x180c38] CALL 0x00109a30 LAB_0014b1d7: LEA RDI,[0x180c38] CALL 0x00109c30 TEST AL,0x1 JNZ 0x0014b1e9 JMP 0x0014b1fc LAB_0014b1e9: LEA RDI,[0x180c38] LEA RSI,[0x14da09] CALL 0x00109a30 LAB_0014b1fc: JMP 0x0014b1fe LAB_0014b1fe: ADD RSP,0x450 POP RBP RET
/* nglog::tools::MyUserNameInitializer() */ void nglog::tools::MyUserNameInitializer(void) { __uid_t __uid; int iVar1; ulong uVar2; char local_448 [1024]; passwd *local_48; passwd local_40; char *local_10; local_10 = getenv("USER"); if (local_10 == (char *)0x0) { local_48 = (passwd *)0x0; memset(local_448,0,0x400); __uid = geteuid(); iVar1 = getpwuid_r(__uid,&local_40,local_448,0x400,&local_48); if ((iVar1 == 0) && (local_48 != (passwd *)0x0)) { std::__cxx11::string::operator=((string *)g_my_user_name_abi_cxx11_,local_40.pw_name); } else { snprintf(local_448,0x400,"uid%d",(ulong)__uid); std::__cxx11::string::operator=((string *)g_my_user_name_abi_cxx11_,local_448); } uVar2 = std::__cxx11::string::empty(); if ((uVar2 & 1) != 0) { std::__cxx11::string::operator=((string *)g_my_user_name_abi_cxx11_,"invalid-user"); } } else { std::__cxx11::string::operator=((string *)g_my_user_name_abi_cxx11_,local_10); } return; }
9,043
mjv_moveModel
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_vis_interact.c
void mjv_moveModel(const mjModel* m, int action, mjtNum reldx, mjtNum reldy, const mjtNum roomup[3], mjvScene* scn) { mjtNum roomforward[3], roomright[3], camforward[3]; mjtNum vec[3], scl, quat[4], rotate[4], result[4]; // transformation disabled: nothing to do if (!scn->enabletransform) { return; } // get camera forward in room space mjv_cameraInRoom(NULL, camforward, NULL, scn); // make orthogonal to roomright mju_addScl3(roomforward, camforward, roomup, -mju_dot3(camforward, roomup)); mju_normalize3(roomforward); // compute roomright mju_cross(roomright, roomforward, roomup); mju_normalize3(roomright); // process action switch ((mjtMouse) action) { case mjMOUSE_ROTATE_V: case mjMOUSE_ROTATE_H: // construct rotation vector for (int i=0; i < 3; i++) { if (action == mjMOUSE_ROTATE_V) { vec[i] = roomup[i]*reldx + roomright[i]*reldy; } else { vec[i] = roomforward[i]*reldx + roomright[i]*reldy; } } // make quaternion from angle-axis scl = mju_normalize3(vec); mju_axisAngle2Quat(quat, vec, scl*mjPI); // get current model rotation mju_f2n(rotate, scn->rotate, 4); // compose rotation, normalize and and set mju_mulQuat(result, quat, rotate); mju_normalize4(result); mju_n2f(scn->rotate, result, 4); break; case mjMOUSE_MOVE_V: for (int i=0; i < 3; i++) { scn->translate[i] += (float)(roomright[i]*reldx - roomup[i]*reldy) * m->stat.extent; } break; case mjMOUSE_MOVE_H: for (int i=0; i < 3; i++) { scn->translate[i] += (float)(roomright[i]*reldx - roomforward[i]*reldy) * m->stat.extent; } break; case mjMOUSE_ZOOM: scn->scale += (float)(mju_log(1 + scn->scale/3) * reldy * 3); if (scn->scale < 0.01f) { scn->scale = 0.01f; } else if (scn->scale > 100.0f) { scn->scale = 100.0f; } break; default: mjERROR("unexpected action %d", action); } }
O3
c
mjv_moveModel: cmpb $0x0, 0x238c(%rcx) je 0xa779c pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x4e8, %rsp # imm = 0x4E8 movq %rcx, %rbx movq %rdx, %r15 movl %esi, %r14d movq %rdi, %r12 vmovapd %xmm0, 0x10(%rsp) vmovaps %xmm1, (%rsp) leaq 0x80(%rsp), %rbp xorl %edi, %edi movq %rbp, %rsi xorl %edx, %edx callq 0x2e540 movq %rbp, %rdi movq %r15, %rsi callq 0x2d1b0 vmovddup 0x11568a(%rip), %xmm1 # xmm1 = mem[0,0] vxorpd %xmm1, %xmm0, %xmm0 leaq 0x60(%rsp), %r13 movq %r13, %rdi movq %rbp, %rsi movq %r15, %rdx callq 0x2d220 movq %r13, %rdi callq 0x2d130 leaq 0x20(%rsp), %rbp movq %rbp, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x2d420 movq %rbp, %rdi callq 0x2d130 leal -0x1(%r14), %eax cmpl $0x4, %eax ja 0xa7733 leaq 0x14ae30(%rip), %rcx # 0x1f2394 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax xorl %eax, %eax vmovapd (%rsp), %xmm2 vmovapd 0x10(%rsp), %xmm3 cmpl $0x1, %r14d vmulsd 0x20(%rsp,%rax), %xmm2, %xmm0 movq %r13, %rcx cmoveq %r15, %rcx vmulsd (%rcx,%rax), %xmm3, %xmm1 vaddsd %xmm0, %xmm1, %xmm0 vmovsd %xmm0, 0x40(%rsp,%rax) addq $0x8, %rax cmpq $0x18, %rax jne 0xa757a leaq 0x40(%rsp), %r14 movq %r14, %rdi callq 0x2d130 vmulsd 0x11573f(%rip), %xmm0, %xmm0 # 0x1bccf8 leaq 0xe0(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x2d290 addq $0x239c, %rbx # imm = 0x239C leaq 0xc0(%rsp), %r14 movq %r14, %rdi movq %rbx, %rsi movl $0x4, %edx callq 0x2e4f0 leaq 0xa0(%rsp), %r12 movq %r12, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x2d620 movq %r12, %rdi callq 0x2d760 movq %rbx, %rdi movq %r12, %rsi movl $0x4, %edx callq 0x2e550 jmp 0xa778b vmovss 0x23ac(%rbx), %xmm0 vdivss 0x11601e(%rip), %xmm0, %xmm0 # 0x1bd64c vaddss 0x11601a(%rip), %xmm0, %xmm0 # 0x1bd650 vcvtss2sd %xmm0, %xmm0, %xmm0 callq 0x2e4a0 vmulsd (%rsp), %xmm0, %xmm0 vmulsd 0x1155ac(%rip), %xmm0, %xmm0 # 0x1bcbf8 vcvtsd2ss %xmm0, %xmm0, %xmm0 vaddss 0x23ac(%rbx), %xmm0, %xmm0 vmovss %xmm0, 0x23ac(%rbx) vmovss 0x115fec(%rip), %xmm1 # 0x1bd654 vucomiss %xmm0, %xmm1 jbe 0xa7777 movl $0x3c23d70a, 0x23ac(%rbx) # imm = 0x3C23D70A jmp 0xa778b vmovddup (%rsp), %xmm0 # xmm0 = mem[0,0] vinsertf128 $0x1, %xmm0, %ymm0, %ymm0 vmovddup 0x10(%rsp), %xmm1 # xmm1 = mem[0,0] vinsertf128 $0x1, %xmm1, %ymm1, %ymm1 vbroadcastsd 0x4f8(%r12), %ymm2 vmovapd 0x116076(%rip), %ymm3 # 0x1bd720 vmaskmovpd 0x20(%rsp), %ymm3, %ymm4 vmulpd %ymm1, %ymm4, %ymm1 vmaskmovpd (%r15), %ymm3, %ymm3 jmp 0xa76f7 vmovddup (%rsp), %xmm0 # xmm0 = mem[0,0] vinsertf128 $0x1, %xmm0, %ymm0, %ymm0 vmovddup 0x10(%rsp), %xmm1 # xmm1 = mem[0,0] vinsertf128 $0x1, %xmm1, %ymm1, %ymm1 vbroadcastsd 0x4f8(%r12), %ymm2 vmovapd 0x11603b(%rip), %ymm3 # 0x1bd720 vmaskmovpd 0x20(%rsp), %ymm3, %ymm4 vmulpd %ymm1, %ymm4, %ymm1 vmaskmovpd 0x60(%rsp), %ymm3, %ymm3 vmulpd %ymm3, %ymm0, %ymm0 vsubpd %ymm0, %ymm1, %ymm0 vcvtpd2ps %ymm0, %xmm0 vmovaps 0x1159b5(%rip), %xmm1 # 0x1bd0c0 vmaskmovps 0x2390(%rbx), %xmm1, %xmm3 vcvtps2pd %xmm0, %ymm0 vcvtps2pd %xmm3, %ymm3 vmulpd %ymm2, %ymm0, %ymm0 vaddpd %ymm3, %ymm0, %ymm0 vcvtpd2ps %ymm0, %xmm0 vmaskmovps %xmm0, %xmm1, 0x2390(%rbx) jmp 0xa778b leaq 0x127911(%rip), %rsi # 0x1cf04b leaq 0xe0(%rsp), %rbx movl $0x400, %edx # imm = 0x400 movq %rbx, %rdi callq 0x2d240 leaq 0xed(%rsp), %rdi leaq 0x1278a9(%rip), %rdx # 0x1cf007 movl $0x3f3, %esi # imm = 0x3F3 movl %r14d, %ecx xorl %eax, %eax callq 0x2d250 movq %rbx, %rdi callq 0x2d260 jmp 0xa778b vucomiss 0x115ed9(%rip), %xmm0 # 0x1bd658 jbe 0xa778b movl $0x42c80000, 0x23ac(%rbx) # imm = 0x42C80000 addq $0x4e8, %rsp # imm = 0x4E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp vzeroupper retq
mjv_moveModel: cmp byte ptr [rcx+238Ch], 0 jz loc_A779C push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 4E8h mov rbx, rcx mov r15, rdx mov r14d, esi mov r12, rdi vmovapd [rsp+518h+var_508], xmm0 vmovaps [rsp+518h+var_518], xmm1 lea rbp, [rsp+518h+var_498] xor edi, edi mov rsi, rbp xor edx, edx call _mjv_cameraInRoom mov rdi, rbp mov rsi, r15 call _mju_dot3 vmovddup xmm1, cs:qword_1BCBA0 vxorpd xmm0, xmm0, xmm1 lea r13, [rsp+518h+var_4B8] mov rdi, r13 mov rsi, rbp mov rdx, r15 call _mju_addScl3 mov rdi, r13 call _mju_normalize3 lea rbp, [rsp+518h+var_4F8] mov rdi, rbp mov rsi, r13 mov rdx, r15 call _mju_cross mov rdi, rbp call _mju_normalize3 lea eax, [r14-1]; switch 5 cases cmp eax, 4 ja def_A756B; jumptable 00000000000A756B default case lea rcx, jpt_A756B movsxd rax, ds:(jpt_A756B - 1F2394h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_A756D: xor eax, eax; jumptable 00000000000A756B cases 1,2 vmovapd xmm2, [rsp+518h+var_518] vmovapd xmm3, [rsp+518h+var_508] loc_A757A: cmp r14d, 1 vmulsd xmm0, xmm2, qword ptr [rsp+rax+518h+var_4F8] mov rcx, r13 cmovz rcx, r15 vmulsd xmm1, xmm3, qword ptr [rcx+rax] vaddsd xmm0, xmm1, xmm0 vmovsd [rsp+rax+518h+var_4D8], xmm0 add rax, 8 cmp rax, 18h jnz short loc_A757A lea r14, [rsp+518h+var_4D8] mov rdi, r14 call _mju_normalize3 vmulsd xmm0, xmm0, cs:qword_1BCCF8 lea r15, [rsp+518h+var_438] mov rdi, r15 mov rsi, r14 call _mju_axisAngle2Quat add rbx, 239Ch lea r14, [rsp+518h+var_458] mov rdi, r14 mov rsi, rbx mov edx, 4 call _mju_f2n lea r12, [rsp+518h+var_478] mov rdi, r12 mov rsi, r15 mov rdx, r14 call _mju_mulQuat mov rdi, r12 call _mju_normalize4 mov rdi, rbx mov rsi, r12 mov edx, 4 call _mju_n2f jmp loc_A778B loc_A761E: vmovss xmm0, dword ptr [rbx+23ACh]; jumptable 00000000000A756B case 5 vdivss xmm0, xmm0, cs:dword_1BD64C vaddss xmm0, xmm0, cs:dword_1BD650 vcvtss2sd xmm0, xmm0, xmm0 call _log vmulsd xmm0, xmm0, qword ptr [rsp+518h+var_518] vmulsd xmm0, xmm0, cs:qword_1BCBF8 vcvtsd2ss xmm0, xmm0, xmm0 vaddss xmm0, xmm0, dword ptr [rbx+23ACh] vmovss dword ptr [rbx+23ACh], xmm0 vmovss xmm1, cs:dword_1BD654 vucomiss xmm1, xmm0 jbe loc_A7777 mov dword ptr [rbx+23ACh], 3C23D70Ah jmp loc_A778B loc_A7681: vmovddup xmm0, qword ptr [rsp+518h+var_518]; jumptable 00000000000A756B case 3 vinsertf128 ymm0, ymm0, xmm0, 1 vmovddup xmm1, qword ptr [rsp+518h+var_508] vinsertf128 ymm1, ymm1, xmm1, 1 vbroadcastsd ymm2, qword ptr [r12+4F8h] vmovapd ymm3, cs:ymmword_1BD720 vmaskmovpd ymm4, ymm3, [rsp+518h+var_4F8] vmulpd ymm1, ymm4, ymm1 vmaskmovpd ymm3, ymm3, ymmword ptr [r15] jmp short loc_A76F7 loc_A76BC: vmovddup xmm0, qword ptr [rsp+518h+var_518]; jumptable 00000000000A756B case 4 vinsertf128 ymm0, ymm0, xmm0, 1 vmovddup xmm1, qword ptr [rsp+518h+var_508] vinsertf128 ymm1, ymm1, xmm1, 1 vbroadcastsd ymm2, qword ptr [r12+4F8h] vmovapd ymm3, cs:ymmword_1BD720 vmaskmovpd ymm4, ymm3, [rsp+518h+var_4F8] vmulpd ymm1, ymm4, ymm1 vmaskmovpd ymm3, ymm3, [rsp+518h+var_4B8] loc_A76F7: vmulpd ymm0, ymm0, ymm3 vsubpd ymm0, ymm1, ymm0 vcvtpd2ps xmm0, ymm0 vmovaps xmm1, cs:xmmword_1BD0C0 vmaskmovps xmm3, xmm1, xmmword ptr [rbx+2390h] vcvtps2pd ymm0, xmm0 vcvtps2pd ymm3, xmm3 vmulpd ymm0, ymm0, ymm2 vaddpd ymm0, ymm0, ymm3 vcvtpd2ps xmm0, ymm0 vmaskmovps xmmword ptr [rbx+2390h], xmm1, xmm0 jmp short loc_A778B def_A756B: lea rsi, aMjvMovemodel_0; jumptable 00000000000A756B default case lea rbx, [rsp+518h+var_438] mov edx, 400h mov rdi, rbx call _strncpy lea rdi, [rsp+518h+var_42B] lea rdx, aUnexpectedActi; ": unexpected action %d" mov esi, 3F3h mov ecx, r14d xor eax, eax call _snprintf mov rdi, rbx call _mju_error_raw jmp short loc_A778B loc_A7777: vucomiss xmm0, cs:dword_1BD658 jbe short loc_A778B mov dword ptr [rbx+23ACh], 42C80000h loc_A778B: add rsp, 4E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp loc_A779C: vzeroupper retn
void mjv_moveModel( long long a1, int a2, long long a3, long long a4, __m128 _XMM0, __m128 _XMM1, double a7, __m128 a8) { long long v22; // rbx __m128 v23; // xmm4 __m128 v24; // xmm4 char v34; // cf char v35; // zf __m256 v64; // [rsp+20h] [rbp-4F8h] BYREF _QWORD v65[4]; // [rsp+40h] [rbp-4D8h] BYREF __m256 v66; // [rsp+60h] [rbp-4B8h] BYREF _BYTE v67[32]; // [rsp+80h] [rbp-498h] BYREF _BYTE v68[32]; // [rsp+A0h] [rbp-478h] BYREF _BYTE v69[32]; // [rsp+C0h] [rbp-458h] BYREF _BYTE v70[13]; // [rsp+E0h] [rbp-438h] BYREF _BYTE v71[1067]; // [rsp+EDh] [rbp-42Bh] BYREF if ( *(_BYTE *)(a4 + 9100) ) { _RBX = a4; _R12 = a1; __asm { vmovapd [rsp+518h+var_508], xmm0 vmovaps [rsp+518h+var_518], xmm1 } mjv_cameraInRoom(0LL, (long long)v67, 0LL, a4, _XMM0, *(double *)_XMM1.m128_u64, a7, a8); *(double *)_XMM0.m128_u64 = mju_dot3(v67, a3); __asm { vmovddup xmm1, cs:qword_1BCBA0 vxorpd xmm0, xmm0, xmm1 } mju_addScl3(&v66, v67, a3, *(double *)&_XMM0); mju_normalize3(&v66, *(double *)&_XMM0, *(double *)&_XMM1); *(double *)&_XMM0 = mju_cross(&v64, &v66, a3); mju_normalize3(&v64, *(double *)&_XMM0, *(double *)&_XMM1); switch ( a2 ) { case 1: case 2: _RAX = 0LL; __asm { vmovapd xmm2, [rsp+518h+var_518] vmovapd xmm3, [rsp+518h+var_508] } do { __asm { vmulsd xmm0, xmm2, qword ptr [rsp+rax+518h+var_4F8] vmulsd xmm1, xmm3, qword ptr [rcx+rax] vaddsd xmm0, xmm1, xmm0 vmovsd [rsp+rax+518h+var_4D8], xmm0 } _RAX += 8LL; } while ( _RAX != 24 ); *(double *)&_XMM0 = mju_normalize3(v65, *(double *)&_XMM0, *(double *)&_XMM1); __asm { vmulsd xmm0, xmm0, cs:qword_1BCCF8 } mju_axisAngle2Quat(v70, v65, *(double *)&_XMM0); v22 = _RBX + 9116; mju_f2n((long long)v69, *(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2, _XMM3, v23, v22, 4); mju_mulQuat(v68, v70, v69, *(double *)&_XMM0); mju_normalize4(v68); mju_n2f(v22, *(double *)&_XMM0, *(double *)&_XMM1, *(double *)&_XMM2, _XMM3, v24, (long long)v68, 4); break; case 3: __asm { vmovddup xmm0, qword ptr [rsp+518h+var_518]; jumptable 00000000000A756B case 3 vinsertf128 ymm0, ymm0, xmm0, 1 vmovddup xmm1, qword ptr [rsp+518h+var_508] vinsertf128 ymm1, ymm1, xmm1, 1 vbroadcastsd ymm2, qword ptr [r12+4F8h] vmovapd ymm3, cs:ymmword_1BD720 vmaskmovpd ymm4, ymm3, [rsp+518h+var_4F8] vmulpd ymm1, ymm4, ymm1 vmaskmovpd ymm3, ymm3, ymmword ptr [r15] } goto LABEL_10; case 4: __asm { vmovddup xmm0, qword ptr [rsp+518h+var_518]; jumptable 00000000000A756B case 4 vinsertf128 ymm0, ymm0, xmm0, 1 vmovddup xmm1, qword ptr [rsp+518h+var_508] vinsertf128 ymm1, ymm1, xmm1, 1 vbroadcastsd ymm2, qword ptr [r12+4F8h] vmovapd ymm3, cs:ymmword_1BD720 vmaskmovpd ymm4, ymm3, [rsp+518h+var_4F8] vmulpd ymm1, ymm4, ymm1 vmaskmovpd ymm3, ymm3, [rsp+518h+var_4B8] } LABEL_10: __asm { vmulpd ymm0, ymm0, ymm3 vsubpd ymm0, ymm1, ymm0 vcvtpd2ps xmm0, ymm0 vmovaps xmm1, cs:xmmword_1BD0C0 vmaskmovps xmm3, xmm1, xmmword ptr [rbx+2390h] vcvtps2pd ymm0, xmm0 vcvtps2pd ymm3, xmm3 vmulpd ymm0, ymm0, ymm2 vaddpd ymm0, ymm0, ymm3 vcvtpd2ps xmm0, ymm0 vmaskmovps xmmword ptr [rbx+2390h], xmm1, xmm0 } break; case 5: __asm { vmovss xmm0, dword ptr [rbx+23ACh]; jumptable 00000000000A756B case 5 vdivss xmm0, xmm0, cs:dword_1BD64C vaddss xmm0, xmm0, cs:dword_1BD650 vcvtss2sd xmm0, xmm0, xmm0 } *(double *)&_XMM0 = log(*(double *)&_XMM0); __asm { vmulsd xmm0, xmm0, qword ptr [rsp+518h+var_518] vmulsd xmm0, xmm0, cs:qword_1BCBF8 vcvtsd2ss xmm0, xmm0, xmm0 vaddss xmm0, xmm0, dword ptr [rbx+23ACh] vmovss dword ptr [rbx+23ACh], xmm0 vmovss xmm1, cs:dword_1BD654 vucomiss xmm1, xmm0 } if ( v34 | v35 ) __asm { vucomiss xmm0, cs:dword_1BD658 } else *(_DWORD *)(_RBX + 9132) = 1008981770; break; default: strncpy(v70, "mjv_moveModel", 1024LL); snprintf(v71, 1011LL, ": unexpected action %d", a2); mju_error_raw(v70); break; } } __asm { vzeroupper } }
mjv_moveModel: CMP byte ptr [RCX + 0x238c],0x0 JZ 0x001a779c PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x4e8 MOV RBX,RCX MOV R15,RDX MOV R14D,ESI MOV R12,RDI VMOVAPD xmmword ptr [RSP + 0x10],XMM0 VMOVAPS xmmword ptr [RSP],XMM1 LEA RBP,[RSP + 0x80] XOR EDI,EDI MOV RSI,RBP XOR EDX,EDX CALL 0x0012e540 MOV RDI,RBP MOV RSI,R15 CALL 0x0012d1b0 VMOVDDUP XMM1,qword ptr [0x002bcba0] VXORPD XMM0,XMM0,XMM1 LEA R13,[RSP + 0x60] MOV RDI,R13 MOV RSI,RBP MOV RDX,R15 CALL 0x0012d220 MOV RDI,R13 CALL 0x0012d130 LEA RBP,[RSP + 0x20] MOV RDI,RBP MOV RSI,R13 MOV RDX,R15 CALL 0x0012d420 MOV RDI,RBP CALL 0x0012d130 LEA EAX,[R14 + -0x1] CMP EAX,0x4 JA 0x001a7733 LEA RCX,[0x2f2394] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: XOR EAX,EAX VMOVAPD XMM2,xmmword ptr [RSP] VMOVAPD XMM3,xmmword ptr [RSP + 0x10] LAB_001a757a: CMP R14D,0x1 VMULSD XMM0,XMM2,qword ptr [RSP + RAX*0x1 + 0x20] MOV RCX,R13 CMOVZ RCX,R15 VMULSD XMM1,XMM3,qword ptr [RCX + RAX*0x1] VADDSD XMM0,XMM1,XMM0 VMOVSD qword ptr [RSP + RAX*0x1 + 0x40],XMM0 ADD RAX,0x8 CMP RAX,0x18 JNZ 0x001a757a LEA R14,[RSP + 0x40] MOV RDI,R14 CALL 0x0012d130 VMULSD XMM0,XMM0,qword ptr [0x002bccf8] LEA R15,[RSP + 0xe0] MOV RDI,R15 MOV RSI,R14 CALL 0x0012d290 ADD RBX,0x239c LEA R14,[RSP + 0xc0] MOV RDI,R14 MOV RSI,RBX MOV EDX,0x4 CALL 0x0012e4f0 LEA R12,[RSP + 0xa0] MOV RDI,R12 MOV RSI,R15 MOV RDX,R14 CALL 0x0012d620 MOV RDI,R12 CALL 0x0012d760 MOV RDI,RBX MOV RSI,R12 MOV EDX,0x4 CALL 0x0012e550 JMP 0x001a778b caseD_5: VMOVSS XMM0,dword ptr [RBX + 0x23ac] VDIVSS XMM0,XMM0,dword ptr [0x002bd64c] VADDSS XMM0,XMM0,dword ptr [0x002bd650] VCVTSS2SD XMM0,XMM0,XMM0 CALL 0x0012e4a0 VMULSD XMM0,XMM0,qword ptr [RSP] VMULSD XMM0,XMM0,qword ptr [0x002bcbf8] VCVTSD2SS XMM0,XMM0,XMM0 VADDSS XMM0,XMM0,dword ptr [RBX + 0x23ac] VMOVSS dword ptr [RBX + 0x23ac],XMM0 VMOVSS XMM1,dword ptr [0x002bd654] VUCOMISS XMM1,XMM0 JBE 0x001a7777 MOV dword ptr [RBX + 0x23ac],0x3c23d70a JMP 0x001a778b caseD_3: VMOVDDUP XMM0,qword ptr [RSP] VINSERTF128 YMM0,YMM0,XMM0,0x1 VMOVDDUP XMM1,qword ptr [RSP + 0x10] VINSERTF128 YMM1,YMM1,XMM1,0x1 VBROADCASTSD YMM2,qword ptr [R12 + 0x4f8] VMOVAPD YMM3,ymmword ptr [0x002bd720] VMASKMOVPD YMM4,YMM3,ymmword ptr [RSP + 0x20] VMULPD YMM1,YMM4,YMM1 VMASKMOVPD YMM3,YMM3,ymmword ptr [R15] JMP 0x001a76f7 caseD_4: VMOVDDUP XMM0,qword ptr [RSP] VINSERTF128 YMM0,YMM0,XMM0,0x1 VMOVDDUP XMM1,qword ptr [RSP + 0x10] VINSERTF128 YMM1,YMM1,XMM1,0x1 VBROADCASTSD YMM2,qword ptr [R12 + 0x4f8] VMOVAPD YMM3,ymmword ptr [0x002bd720] VMASKMOVPD YMM4,YMM3,ymmword ptr [RSP + 0x20] VMULPD YMM1,YMM4,YMM1 VMASKMOVPD YMM3,YMM3,ymmword ptr [RSP + 0x60] LAB_001a76f7: VMULPD YMM0,YMM0,YMM3 VSUBPD YMM0,YMM1,YMM0 VCVTPD2PS XMM0,YMM0 VMOVAPS XMM1,xmmword ptr [0x002bd0c0] VMASKMOVPS XMM3,XMM1,xmmword ptr [RBX + 0x2390] VCVTPS2PD YMM0,XMM0 VCVTPS2PD YMM3,XMM3 VMULPD YMM0,YMM0,YMM2 VADDPD YMM0,YMM0,YMM3 VCVTPD2PS XMM0,YMM0 VMASKMOVPS xmmword ptr [RBX + 0x2390],XMM1,XMM0 JMP 0x001a778b default: LEA RSI,[0x2cf04b] LEA RBX,[RSP + 0xe0] MOV EDX,0x400 MOV RDI,RBX CALL 0x0012d240 LEA RDI,[RSP + 0xed] LEA RDX,[0x2cf007] MOV ESI,0x3f3 MOV ECX,R14D XOR EAX,EAX CALL 0x0012d250 MOV RDI,RBX CALL 0x0012d260 JMP 0x001a778b LAB_001a7777: VUCOMISS XMM0,dword ptr [0x002bd658] JBE 0x001a778b MOV dword ptr [RBX + 0x23ac],0x42c80000 LAB_001a778b: ADD RSP,0x4e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_001a779c: VZEROUPPER RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void mjv_moveModel(double param_1,double param_2,long param_3,uint param_4, int1 (*param_5) [32],long param_6) { float fVar1; int1 auVar2 [16]; int1 auVar3 [16]; long lVar4; int1 (*pauVar5) [32]; ulong uVar6; double dVar7; int1 auVar8 [32]; int1 auVar9 [32]; int1 auVar10 [32]; int1 auVar11 [32]; int1 local_4f8 [32]; double local_4d8 [4]; int1 local_4b8 [32]; int1 local_498 [32]; int1 local_478 [32]; int1 local_458 [32]; char local_438 [13]; char local_42b [1019]; if (*(char *)(param_6 + 0x238c) == '\0') { return; } mjv_cameraInRoom(0,local_498,0); uVar6 = mju_dot3(local_498,param_5); mju_addScl3(uVar6 ^ DAT_002bcba0,&local_4b8,local_498,param_5); mju_normalize3(&local_4b8); mju_cross(local_4f8,&local_4b8,param_5); mju_normalize3(local_4f8); switch(param_4) { case 1: case 2: lVar4 = 0; do { pauVar5 = &local_4b8; if (param_4 == 1) { pauVar5 = param_5; } *(double *)((long)local_4d8 + lVar4) = param_1 * *(double *)(*pauVar5 + lVar4) + param_2 * *(double *)(local_4f8 + lVar4); lVar4 = lVar4 + 8; } while (lVar4 != 0x18); dVar7 = (double)mju_normalize3(local_4d8); mju_axisAngle2Quat(dVar7 * DAT_002bccf8,local_438,local_4d8); mju_f2n(local_458,param_6 + 0x239c,4); mju_mulQuat(local_478,local_438,local_458); mju_normalize4(local_478); mju_n2f(param_6 + 0x239c,local_478,4); break; case 3: dVar7 = *(double *)(param_3 + 0x4f8); auVar11 = vmaskmovpd_avx(_DAT_002bd720,local_4f8); auVar10._0_8_ = auVar11._0_8_ * param_1; auVar10._8_8_ = auVar11._8_8_ * param_1; auVar10._16_8_ = auVar11._16_8_ * param_1; auVar10._24_8_ = auVar11._24_8_ * param_1; auVar11 = vmaskmovpd_avx(_DAT_002bd720,*param_5); goto LAB_001a76f7; case 4: dVar7 = *(double *)(param_3 + 0x4f8); auVar11 = vmaskmovpd_avx(_DAT_002bd720,local_4f8); auVar10._0_8_ = auVar11._0_8_ * param_1; auVar10._8_8_ = auVar11._8_8_ * param_1; auVar10._16_8_ = auVar11._16_8_ * param_1; auVar10._24_8_ = auVar11._24_8_ * param_1; auVar11 = vmaskmovpd_avx(_DAT_002bd720,local_4b8); LAB_001a76f7: auVar8._0_8_ = param_2 * auVar11._0_8_; auVar8._8_8_ = param_2 * auVar11._8_8_; auVar8._16_8_ = param_2 * auVar11._16_8_; auVar8._24_8_ = param_2 * auVar11._24_8_; auVar11 = vsubpd_avx(auVar10,auVar8); auVar2 = vcvtpd2ps_avx(auVar11); auVar3 = vmaskmovps_avx(_DAT_002bd0c0,*(int1 (*) [16])(param_6 + 0x2390)); auVar11 = vcvtps2pd_avx(auVar2); auVar10 = vcvtps2pd_avx(auVar3); auVar9._0_8_ = auVar11._0_8_ * dVar7 + auVar10._0_8_; auVar9._8_8_ = auVar11._8_8_ * dVar7 + auVar10._8_8_; auVar9._16_8_ = auVar11._16_8_ * dVar7 + auVar10._16_8_; auVar9._24_8_ = auVar11._24_8_ * dVar7 + auVar10._24_8_; auVar2 = vcvtpd2ps_avx(auVar9); auVar2 = vmaskmovps_avx(_DAT_002bd0c0,auVar2); *(int1 (*) [16])(param_6 + 0x2390) = auVar2; break; case 5: dVar7 = log((double)(*(float *)(param_6 + 0x23ac) / DAT_002bd64c + DAT_002bd650)); fVar1 = (float)(dVar7 * param_2 * DAT_002bcbf8) + *(float *)(param_6 + 0x23ac); *(float *)(param_6 + 0x23ac) = fVar1; if (DAT_002bd654 <= fVar1) { if (DAT_002bd658 < fVar1) { *(int4 *)(param_6 + 0x23ac) = 0x42c80000; } } else { *(int4 *)(param_6 + 0x23ac) = 0x3c23d70a; } break; default: strncpy(local_438,"mjv_moveModel",0x400); snprintf(local_42b,0x3f3,": unexpected action %d",(ulong)param_4); mju_error_raw(local_438); } return; }
9,044
chess::Board::getCastleString[abi:cxx11]() const::'lambda'(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side)::operator()(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side) const
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
[[nodiscard]] std::string getCastleString() const { static const auto get_file = [](const CastlingRights &cr, Color c, CastlingRights::Side side) { auto file = static_cast<std::string>(cr.getRookFile(c, side)); return c == Color::WHITE ? std::toupper(file[0]) : file[0]; }; if (chess960_) { std::string ss; for (auto color : {Color::WHITE, Color::BLACK}) for (auto side : {CastlingRights::Side::KING_SIDE, CastlingRights::Side::QUEEN_SIDE}) if (cr_.has(color, side)) ss += get_file(cr_, color, side); return ss; } std::string ss; if (cr_.has(Color::WHITE, CastlingRights::Side::KING_SIDE)) ss += 'K'; if (cr_.has(Color::WHITE, CastlingRights::Side::QUEEN_SIDE)) ss += 'Q'; if (cr_.has(Color::BLACK, CastlingRights::Side::KING_SIDE)) ss += 'k'; if (cr_.has(Color::BLACK, CastlingRights::Side::QUEEN_SIDE)) ss += 'q'; return ss; }
O0
cpp
chess::Board::getCastleString[abi:cxx11]() const::'lambda'(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side)::operator()(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side) const: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movb %cl, %al movb %dl, %cl movb %cl, -0x1(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb %al, -0x19(%rbp) movq -0x18(%rbp), %rdi movb -0x1(%rbp), %al movb %al, -0x42(%rbp) movzbl -0x19(%rbp), %edx movzbl -0x42(%rbp), %esi callq 0x11f20 movb %al, -0x41(%rbp) leaq -0x40(%rbp), %rdi leaq -0x41(%rbp), %rsi callq 0x11f80 leaq -0x43(%rbp), %rdi xorl %esi, %esi callq 0x5e10 jmp 0x11e51 leaq -0x1(%rbp), %rdi leaq -0x43(%rbp), %rsi callq 0x7da0 testb $0x1, %al jne 0x11e64 jmp 0x11e88 xorl %eax, %eax movl %eax, %esi leaq -0x40(%rbp), %rdi callq 0x3540 movq %rax, -0x60(%rbp) jmp 0x11e77 movq -0x60(%rbp), %rax movsbl (%rax), %edi callq 0x3510 movl %eax, -0x64(%rbp) jmp 0x11ea5 xorl %eax, %eax movl %eax, %esi leaq -0x40(%rbp), %rdi callq 0x3540 movq %rax, -0x70(%rbp) jmp 0x11e9b movq -0x70(%rbp), %rax movsbl (%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0x74(%rbp) leaq -0x40(%rbp), %rdi callq 0x3180 movl -0x74(%rbp), %eax addq $0x80, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x50(%rbp) movl %eax, -0x54(%rbp) leaq -0x40(%rbp), %rdi callq 0x3180 movq -0x50(%rbp), %rdi callq 0x34d0 nop
_ZZNK5chess5Board15getCastleStringB5cxx11EvENKUlRKNS0_14CastlingRightsENS_5ColorENS1_4SideEE_clES3_S4_S5_: push rbp mov rbp, rsp sub rsp, 80h mov al, cl mov cl, dl mov [rbp+var_1], cl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], al mov rdi, [rbp+var_18] mov al, [rbp+var_1] mov [rbp+var_42], al movzx edx, [rbp+var_19] movzx esi, [rbp+var_42] call _ZNK5chess5Board14CastlingRights11getRookFileENS_5ColorENS1_4SideE; chess::Board::CastlingRights::getRookFile(chess::Color,chess::Board::CastlingRights::Side) mov [rbp+var_41], al lea rdi, [rbp+var_40] lea rsi, [rbp+var_41] call _ZNK5chess4FilecvNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEv; chess::File::operator std::string(void) lea rdi, [rbp+var_43] xor esi, esi call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying) jmp short $+2 loc_11E51: lea rdi, [rbp+var_1] lea rsi, [rbp+var_43] call _ZNK5chess5ColoreqERKS0_; chess::Color::operator==(chess::Color const&) test al, 1 jnz short loc_11E64 jmp short loc_11E88 loc_11E64: xor eax, eax mov esi, eax lea rdi, [rbp+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov [rbp+var_60], rax jmp short $+2 loc_11E77: mov rax, [rbp+var_60] movsx edi, byte ptr [rax] call _toupper mov [rbp+var_64], eax jmp short loc_11EA5 loc_11E88: xor eax, eax mov esi, eax lea rdi, [rbp+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov [rbp+var_70], rax jmp short $+2 loc_11E9B: mov rax, [rbp+var_70] movsx eax, byte ptr [rax] mov [rbp+var_64], eax loc_11EA5: mov eax, [rbp+var_64] mov [rbp+var_74], eax lea rdi, [rbp+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rbp+var_74] add rsp, 80h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_50], rcx mov [rbp+var_54], eax lea rdi, [rbp+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_50] call __Unwind_Resume
long long chess::Board::getCastleString[abi:cxx11](void)const::{lambda(chess::Board::CastlingRights const&,chess::Color,chess::Board::CastlingRights::Side)#1}::operator()( long long a1, long long a2, unsigned __int8 a3, unsigned __int8 a4) { unsigned int v5; // [rsp+1Ch] [rbp-64h] char *v6; // [rsp+20h] [rbp-60h] _BYTE v7[2]; // [rsp+3Dh] [rbp-43h] BYREF char RookFile; // [rsp+3Fh] [rbp-41h] BYREF _BYTE v9[40]; // [rsp+40h] [rbp-40h] BYREF long long v10; // [rsp+68h] [rbp-18h] long long v11; // [rsp+70h] [rbp-10h] unsigned __int8 v12; // [rsp+7Fh] [rbp-1h] BYREF v12 = a3; v11 = a1; v10 = a2; v9[39] = a4; v7[1] = a3; RookFile = chess::Board::CastlingRights::getRookFile(a2, a3, a4); chess::File::operator std::string(v9, &RookFile); chess::Color::Color(v7, 0); if ( chess::Color::operator==(&v12, v7) ) { v6 = (char *)std::string::operator[](v9, 0LL); v5 = toupper((unsigned int)*v6); } else { v5 = *(char *)std::string::operator[](v9, 0LL); } std::string::~string(v9); return v5; }
operator(): PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV AL,CL MOV CL,DL MOV byte ptr [RBP + -0x1],CL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],AL MOV RDI,qword ptr [RBP + -0x18] MOV AL,byte ptr [RBP + -0x1] MOV byte ptr [RBP + -0x42],AL MOVZX EDX,byte ptr [RBP + -0x19] MOVZX ESI,byte ptr [RBP + -0x42] CALL 0x00111f20 MOV byte ptr [RBP + -0x41],AL LEA RDI,[RBP + -0x40] LEA RSI,[RBP + -0x41] CALL 0x00111f80 LAB_00111e44: LEA RDI,[RBP + -0x43] XOR ESI,ESI CALL 0x00105e10 JMP 0x00111e51 LAB_00111e51: LEA RDI,[RBP + -0x1] LEA RSI,[RBP + -0x43] CALL 0x00107da0 TEST AL,0x1 JNZ 0x00111e64 JMP 0x00111e88 LAB_00111e64: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RBP + -0x40] CALL 0x00103540 MOV qword ptr [RBP + -0x60],RAX JMP 0x00111e77 LAB_00111e77: MOV RAX,qword ptr [RBP + -0x60] MOVSX EDI,byte ptr [RAX] CALL 0x00103510 MOV dword ptr [RBP + -0x64],EAX JMP 0x00111ea5 LAB_00111e88: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RBP + -0x40] CALL 0x00103540 LAB_00111e95: MOV qword ptr [RBP + -0x70],RAX JMP 0x00111e9b LAB_00111e9b: MOV RAX,qword ptr [RBP + -0x70] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x64],EAX LAB_00111ea5: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x74],EAX LEA RDI,[RBP + -0x40] CALL 0x00103180 MOV EAX,dword ptr [RBP + -0x74] ADD RSP,0x80 POP RBP RET
/* chess::Board::getCastleString[abi:cxx11]() const::{lambda(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side)#1}::TEMPNAMEPLACEHOLDERVALUE(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side) const */ _func_getCastleString * __thiscall const:: {lambda(chess::Board::CastlingRights_const&,chess::Color,chess::Board::CastlingRights::Side)#1}:: operator()(_lambda_chess__Board__CastlingRights_const__chess__Color_chess__Board__CastlingRights__Side__1_ *this,CastlingRights *param_1,Color param_3,int1 param_4) { ulong uVar1; char *pcVar2; uint local_6c; Color local_4b; Color local_4a; int1 local_49; File local_48 [39]; int1 local_21; CastlingRights *local_20; _lambda_chess__Board__CastlingRights_const__chess__Color_chess__Board__CastlingRights__Side__1_ *local_18; Color local_9; local_4a = param_3; local_21 = param_4; local_20 = param_1; local_18 = this; local_9 = param_3; local_49 = chess::Board::CastlingRights::getRookFile(param_1,param_3,param_4); chess::File::operator_cast_to_string(local_48); /* try { // try from 00111e44 to 00111e94 has its CatchHandler @ 00111ec0 */ chess::Color::Color(&local_4b,0); uVar1 = chess::Color::operator==(&local_9,&local_4b); if ((uVar1 & 1) == 0) { pcVar2 = (char *)std::__cxx11::string::operator[]((ulong)local_48); local_6c = (uint)*pcVar2; } else { pcVar2 = (char *)std::__cxx11::string::operator[]((ulong)local_48); local_6c = toupper((int)*pcVar2); } std::__cxx11::string::~string((string *)local_48); return (_func_getCastleString *)(ulong)local_6c; }
9,045
chess::Board::getCastleString[abi:cxx11]() const::'lambda'(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side)::operator()(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side) const
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
[[nodiscard]] std::string getCastleString() const { static const auto get_file = [](const CastlingRights &cr, Color c, CastlingRights::Side side) { auto file = static_cast<std::string>(cr.getRookFile(c, side)); return c == Color::WHITE ? std::toupper(file[0]) : file[0]; }; if (chess960_) { std::string ss; for (auto color : {Color::WHITE, Color::BLACK}) for (auto side : {CastlingRights::Side::KING_SIDE, CastlingRights::Side::QUEEN_SIDE}) if (cr_.has(color, side)) ss += get_file(cr_, color, side); return ss; } std::string ss; if (cr_.has(Color::WHITE, CastlingRights::Side::KING_SIDE)) ss += 'K'; if (cr_.has(Color::WHITE, CastlingRights::Side::QUEEN_SIDE)) ss += 'Q'; if (cr_.has(Color::BLACK, CastlingRights::Side::KING_SIDE)) ss += 'k'; if (cr_.has(Color::BLACK, CastlingRights::Side::QUEEN_SIDE)) ss += 'q'; return ss; }
O1
cpp
chess::Board::getCastleString[abi:cxx11]() const::'lambda'(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side)::operator()(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r15 movq %rdi, %rbx movb 0xb5(%rsi), %al leaq 0x10(%rdi), %r14 movq %r14, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) cmpb $0x1, %al jne 0x7f2d movq %r14, 0x10(%rsp) movw $0x100, 0xe(%rsp) # imm = 0x100 addq $0xa8, %r15 leaq 0x38(%rsp), %r13 xorl %eax, %eax movq %r15, 0x18(%rsp) movq %rax, 0x20(%rsp) movsbq 0xe(%rsp,%rax), %r14 movw $0x100, 0xc(%rsp) # imm = 0x100 leal 0x1(%r14), %eax cmpb $0x2, %al ja 0x7f9b leaq (%r15,%r14,2), %r12 xorl %r15d, %r15d movzbl 0xc(%rsp,%r15), %eax movb (%r12,%rax), %al cmpb $0x8, %al je 0x7f0b addb $0x61, %al movq %r13, 0x28(%rsp) movsbl %al, %edx movl $0x1, %esi leaq 0x28(%rsp), %rdi callq 0x3260 movq 0x28(%rsp), %rax movb (%rax), %bpl testb %r14b, %r14b jne 0x7ee8 movsbl %bpl, %edi callq 0x33a0 movl %eax, %ebp movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x7eff movq 0x38(%rsp), %rsi incq %rsi callq 0x3210 movsbl %bpl, %esi movq %rbx, %rdi callq 0x31d0 incq %r15 cmpq $0x2, %r15 jne 0x7ea9 movq 0x20(%rsp), %rax incq %rax cmpq $0x2, %rax movq 0x18(%rsp), %r15 jne 0x7e84 jmp 0x7f89 cmpb $0x8, 0xa8(%r15) je 0x7f44 movq %rbx, %rdi movl $0x4b, %esi callq 0x31d0 cmpb $0x8, 0xa9(%r15) je 0x7f5b movq %rbx, %rdi movl $0x51, %esi callq 0x31d0 cmpb $0x8, 0xaa(%r15) je 0x7f72 movq %rbx, %rdi movl $0x6b, %esi callq 0x31d0 cmpb $0x8, 0xab(%r15) je 0x7f89 movq %rbx, %rdi movl $0x71, %esi callq 0x31d0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x8d0d(%rip), %rdi # 0x10caf leaq 0x8c33(%rip), %rsi # 0x10bdc leaq 0x8d49(%rip), %rcx # 0x10cf9 movl $0x46, %edx callq 0x3130 movq %r14, %rcx movq %rax, %r14 movq (%rbx), %rdi jmp 0x7fd0 movq %rax, %r14 movq (%rbx), %rdi movq 0x10(%rsp), %rcx cmpq %rcx, %rdi je 0x7fe0 movq (%rcx), %rsi incq %rsi callq 0x3210 movq %r14, %rdi callq 0x3360
_ZNK5chess5Board15getCastleStringB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, rsi mov rbx, rdi mov al, [rsi+0B5h] lea r14, [rdi+10h] mov [rdi], r14 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 cmp al, 1 jnz loc_7F2D mov [rsp+78h+var_68], r14 mov [rsp+78h+var_6A], 100h add r15, 0A8h lea r13, [rsp+78h+var_40] xor eax, eax mov [rsp+78h+var_60], r15 loc_7E84: mov [rsp+78h+var_58], rax movsx r14, byte ptr [rsp+rax+78h+var_6A] mov [rsp+78h+var_6C], 100h lea eax, [r14+1] cmp al, 2 ja loc_7F9B lea r12, [r15+r14*2] xor r15d, r15d loc_7EA9: movzx eax, byte ptr [rsp+r15+78h+var_6C] mov al, [r12+rax] cmp al, 8 jz short loc_7F0B add al, 61h ; 'a' mov [rsp+78h+var_50], r13 movsx edx, al mov esi, 1 lea rdi, [rsp+78h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rax, [rsp+78h+var_50] mov bpl, [rax] test r14b, r14b jnz short loc_7EE8 movsx edi, bpl call _toupper mov ebp, eax loc_7EE8: mov rdi, [rsp+78h+var_50]; void * cmp rdi, r13 jz short loc_7EFF mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7EFF: movsx esi, bpl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_7F0B: inc r15 cmp r15, 2 jnz short loc_7EA9 mov rax, [rsp+78h+var_58] inc rax cmp rax, 2 mov r15, [rsp+78h+var_60] jnz loc_7E84 jmp short loc_7F89 loc_7F2D: cmp byte ptr [r15+0A8h], 8 jz short loc_7F44 mov rdi, rbx mov esi, 4Bh ; 'K' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_7F44: cmp byte ptr [r15+0A9h], 8 jz short loc_7F5B mov rdi, rbx mov esi, 51h ; 'Q' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_7F5B: cmp byte ptr [r15+0AAh], 8 jz short loc_7F72 mov rdi, rbx mov esi, 6Bh ; 'k' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_7F72: cmp byte ptr [r15+0ABh], 8 jz short loc_7F89 mov rdi, rbx mov esi, 71h ; 'q' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_7F89: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7F9B: lea rdi, aCUnderlyingWhi; "c == underlying::WHITE || c == underlyi"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aChessColorColo_0; "chess::Color::Color(underlying)" mov edx, 46h ; 'F' call ___assert_fail mov rcx, r14 mov r14, rax mov rdi, [rbx] jmp short loc_7FD0 mov r14, rax mov rdi, [rbx]; void * mov rcx, [rsp+78h+var_68] loc_7FD0: cmp rdi, rcx jz short loc_7FE0 mov rsi, [rcx] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7FE0: mov rdi, r14 call __Unwind_Resume
long long chess::Board::getCastleString[abi:cxx11](long long a1, _BYTE *a2) { char v2; // al _BYTE *v3; // r15 long long v4; // rax long long v5; // r14 _BYTE *v6; // r12 long long i; // r15 char v8; // al char v9; // bp __int16 v11; // [rsp+Ch] [rbp-6Ch] __int16 v12; // [rsp+Eh] [rbp-6Ah] long long v13; // [rsp+10h] [rbp-68h] _BYTE *v14; // [rsp+18h] [rbp-60h] long long v15; // [rsp+20h] [rbp-58h] void *v16; // [rsp+28h] [rbp-50h] BYREF _QWORD v17[8]; // [rsp+38h] [rbp-40h] BYREF v2 = a2[181]; *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( v2 == 1 ) { v13 = a1 + 16; v12 = 256; v3 = a2 + 168; v4 = 0LL; v14 = a2 + 168; do { v15 = v4; v5 = *((char *)&v12 + v4); v11 = 256; if ( (unsigned __int8)(v5 + 1) > 2u ) __assert_fail( "c == underlying::WHITE || c == underlying::BLACK || c == underlying::NONE", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp", 70LL, "chess::Color::Color(underlying)"); v6 = &v3[2 * v5]; for ( i = 0LL; i != 2; ++i ) { v8 = v6[*((unsigned __int8 *)&v11 + i)]; if ( v8 != 8 ) { v16 = v17; std::string::_M_construct(&v16, 1LL, (unsigned int)(char)(v8 + 97)); v9 = *(_BYTE *)v16; if ( !(_BYTE)v5 ) v9 = toupper((unsigned int)v9); if ( v16 != v17 ) operator delete(v16, v17[0] + 1LL); std::string::push_back(a1, (unsigned int)v9); } } v4 = v15 + 1; v3 = v14; } while ( v15 != 1 ); } else { if ( a2[168] != 8 ) std::string::push_back(a1, 75LL); if ( a2[169] != 8 ) std::string::push_back(a1, 81LL); if ( a2[170] != 8 ) std::string::push_back(a1, 107LL); if ( a2[171] != 8 ) std::string::push_back(a1, 113LL); } return a1; }
getCastleString[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,RSI MOV RBX,RDI MOV AL,byte ptr [RSI + 0xb5] LEA R14,[RDI + 0x10] MOV qword ptr [RDI],R14 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 CMP AL,0x1 JNZ 0x00107f2d MOV qword ptr [RSP + 0x10],R14 MOV word ptr [RSP + 0xe],0x100 ADD R15,0xa8 LEA R13,[RSP + 0x38] XOR EAX,EAX MOV qword ptr [RSP + 0x18],R15 LAB_00107e84: MOV qword ptr [RSP + 0x20],RAX MOVSX R14,byte ptr [RSP + RAX*0x1 + 0xe] MOV word ptr [RSP + 0xc],0x100 LEA EAX,[R14 + 0x1] CMP AL,0x2 JA 0x00107f9b LEA R12,[R15 + R14*0x2] XOR R15D,R15D LAB_00107ea9: MOVZX EAX,byte ptr [RSP + R15*0x1 + 0xc] MOV AL,byte ptr [R12 + RAX*0x1] CMP AL,0x8 JZ 0x00107f0b ADD AL,0x61 MOV qword ptr [RSP + 0x28],R13 LAB_00107ebe: MOVSX EDX,AL MOV ESI,0x1 LEA RDI,[RSP + 0x28] CALL 0x00103260 MOV RAX,qword ptr [RSP + 0x28] MOV BPL,byte ptr [RAX] TEST R14B,R14B JNZ 0x00107ee8 MOVSX EDI,BPL CALL 0x001033a0 MOV EBP,EAX LAB_00107ee8: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x00107eff MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00103210 LAB_00107eff: MOVSX ESI,BPL MOV RDI,RBX CALL 0x001031d0 LAB_00107f0b: INC R15 CMP R15,0x2 JNZ 0x00107ea9 MOV RAX,qword ptr [RSP + 0x20] INC RAX CMP RAX,0x2 MOV R15,qword ptr [RSP + 0x18] JNZ 0x00107e84 JMP 0x00107f89 LAB_00107f2d: CMP byte ptr [R15 + 0xa8],0x8 JZ 0x00107f44 LAB_00107f37: MOV RDI,RBX MOV ESI,0x4b CALL 0x001031d0 LAB_00107f44: CMP byte ptr [R15 + 0xa9],0x8 JZ 0x00107f5b MOV RDI,RBX MOV ESI,0x51 CALL 0x001031d0 LAB_00107f5b: CMP byte ptr [R15 + 0xaa],0x8 JZ 0x00107f72 MOV RDI,RBX MOV ESI,0x6b CALL 0x001031d0 LAB_00107f72: CMP byte ptr [R15 + 0xab],0x8 JZ 0x00107f89 MOV RDI,RBX MOV ESI,0x71 CALL 0x001031d0 LAB_00107f89: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00107f9b: LEA RDI,[0x110caf] LEA RSI,[0x110bdc] LEA RCX,[0x110cf9] MOV EDX,0x46 CALL 0x00103130
/* chess::Board::getCastleString[abi:cxx11]() const */ void chess::Board::getCastleString_abi_cxx11_(void) { long lVar1; char cVar2; byte bVar3; long in_RSI; char cVar4; long *in_RDI; long lVar5; byte local_6c [4]; long *local_68; long local_60; long local_58; long *local_50 [2]; long local_40 [2]; cVar2 = *(char *)(in_RSI + 0xb5); *in_RDI = (long)(in_RDI + 2); in_RDI[1] = 0; *(int1 *)(in_RDI + 2) = 0; cVar4 = (char)in_RDI; if (cVar2 == '\x01') { local_68 = in_RDI + 2; local_6c[2] = 0; local_6c[3] = 1; local_58 = 0; local_60 = in_RSI + 0xa8; do { bVar3 = local_6c[local_58 + 2]; local_6c[0] = 0; local_6c[1] = 1; if (2 < (byte)(bVar3 + 1)) { /* WARNING: Subroutine does not return */ __assert_fail("c == underlying::WHITE || c == underlying::BLACK || c == underlying::NONE", "/workspace/llm4binary/github/2025_star3/Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp" ,0x46,"chess::Color::Color(underlying)"); } lVar1 = local_60 + (long)(char)bVar3 * 2; lVar5 = 0; do { if (*(char *)(lVar1 + (ulong)local_6c[lVar5]) != '\b') { /* try { // try from 00107ebe to 00107f0a has its CatchHandler @ 00107fc5 */ local_50[0] = local_40; std::__cxx11::string::_M_construct((ulong)local_50,'\x01'); if (bVar3 == 0) { toupper((int)(char)*local_50[0]); } if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } std::__cxx11::string::push_back(cVar4); } lVar5 = lVar5 + 1; } while (lVar5 != 2); local_58 = local_58 + 1; } while (local_58 != 2); } else { if (*(char *)(in_RSI + 0xa8) != '\b') { /* try { // try from 00107f37 to 00107f88 has its CatchHandler @ 00107fba */ std::__cxx11::string::push_back(cVar4); } if (*(char *)(in_RSI + 0xa9) != '\b') { std::__cxx11::string::push_back(cVar4); } if (*(char *)(in_RSI + 0xaa) != '\b') { std::__cxx11::string::push_back(cVar4); } if (*(char *)(in_RSI + 0xab) != '\b') { std::__cxx11::string::push_back(cVar4); } } return; }
9,046
chess::Board::getCastleString[abi:cxx11]() const::'lambda'(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side)::operator()(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side) const
Razamindset[P]pawnstar-chess-engine/src/engine/../chess-library/include/chess.hpp
[[nodiscard]] std::string getCastleString() const { static const auto get_file = [](const CastlingRights &cr, Color c, CastlingRights::Side side) { auto file = static_cast<std::string>(cr.getRookFile(c, side)); return c == Color::WHITE ? std::toupper(file[0]) : file[0]; }; if (chess960_) { std::string ss; for (auto color : {Color::WHITE, Color::BLACK}) for (auto side : {CastlingRights::Side::KING_SIDE, CastlingRights::Side::QUEEN_SIDE}) if (cr_.has(color, side)) ss += get_file(cr_, color, side); return ss; } std::string ss; if (cr_.has(Color::WHITE, CastlingRights::Side::KING_SIDE)) ss += 'K'; if (cr_.has(Color::WHITE, CastlingRights::Side::QUEEN_SIDE)) ss += 'Q'; if (cr_.has(Color::BLACK, CastlingRights::Side::KING_SIDE)) ss += 'k'; if (cr_.has(Color::BLACK, CastlingRights::Side::QUEEN_SIDE)) ss += 'q'; return ss; }
O2
cpp
chess::Board::getCastleString[abi:cxx11]() const::'lambda'(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side)::operator()(chess::Board::CastlingRights const&, chess::Color, chess::Board::CastlingRights::Side) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movb 0xb5(%rsi), %al leaq 0x10(%rdi), %rcx movq %rcx, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) cmpb $0x1, %al jne 0x6d66 movw $0x100, 0xe(%rsp) # imm = 0x100 addq $0xa8, %r14 xorl %eax, %eax leaq 0xb(%rsp), %r15 cmpq $0x2, %rax je 0x6dba movq %rax, 0x10(%rsp) movb 0xe(%rsp,%rax), %al movw $0x100, 0xc(%rsp) # imm = 0x100 movsbl %al, %ebp xorl %r12d, %r12d cmpq $0x2, %r12 je 0x6d59 movzbl 0xc(%rsp,%r12), %r13d movq %r15, %rdi movl %ebp, %esi callq 0x310e movsbq 0xb(%rsp), %rax leaq (%r14,%rax,2), %rax cmpb $0x8, (%r13,%rax) je 0x6d54 leaq 0xa(%rsp), %rdi movl %ebp, %esi callq 0x310e movzbl 0xa(%rsp), %edx movzbl %r13b, %ecx leaq 0x97b3(%rip), %rdi # 0x104f4 movq %r14, %rsi callq 0x6de2 movsbl %al, %esi movq %rbx, %rdi callq 0x21f0 incq %r12 jmp 0x6cfd movq 0x10(%rsp), %rax incq %rax jmp 0x6cdd cmpb $0x8, 0xa8(%r14) je 0x6d7b pushq $0x4b popq %rsi movq %rbx, %rdi callq 0x21f0 cmpb $0x8, 0xa9(%r14) je 0x6d90 pushq $0x51 popq %rsi movq %rbx, %rdi callq 0x21f0 cmpb $0x8, 0xaa(%r14) je 0x6da5 pushq $0x6b popq %rsi movq %rbx, %rdi callq 0x21f0 cmpb $0x8, 0xab(%r14) je 0x6dba pushq $0x71 popq %rsi movq %rbx, %rdi callq 0x21f0 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x6dce movq %rax, %r14 movq %rbx, %rdi callq 0x20d0 movq %r14, %rdi callq 0x2360 nop
_ZNK5chess5Board15getCastleStringB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov al, [rsi+0B5h] lea rcx, [rdi+10h] mov [rdi], rcx and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 cmp al, 1 jnz loc_6D66 mov [rsp+48h+var_3A], 100h add r14, 0A8h xor eax, eax lea r15, [rsp+48h+var_3D] loc_6CDD: cmp rax, 2 jz loc_6DBA mov [rsp+48h+var_38], rax mov al, byte ptr [rsp+rax+48h+var_3A] mov [rsp+48h+var_3C], 100h movsx ebp, al xor r12d, r12d loc_6CFD: cmp r12, 2 jz short loc_6D59 movzx r13d, byte ptr [rsp+r12+48h+var_3C] mov rdi, r15 mov esi, ebp call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying) movsx rax, [rsp+48h+var_3D] lea rax, [r14+rax*2] cmp byte ptr [r13+rax+0], 8 jz short loc_6D54 lea rdi, [rsp+48h+var_3E] mov esi, ebp call _ZN5chess5ColorC2ENS0_10underlyingE; chess::Color::Color(chess::Color::underlying) movzx edx, [rsp+48h+var_3E] movzx ecx, r13b lea rdi, _ZZNK5chess5Board15getCastleStringB5cxx11EvE8get_file; chess::Board::getCastleString(void)::get_file mov rsi, r14 call _ZZNK5chess5Board15getCastleStringB5cxx11EvENKUlRKNS0_14CastlingRightsENS_5ColorENS1_4SideEE_clES3_S4_S5_; chess::Board::getCastleString(void)::{lambda(chess::Board::CastlingRights const&,chess::Color,chess::Board::CastlingRights::Side)#1}::operator()(chess::Board::CastlingRights const&,chess::Color,chess::Board::CastlingRights::Side) movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_6D54: inc r12 jmp short loc_6CFD loc_6D59: mov rax, [rsp+48h+var_38] inc rax jmp loc_6CDD loc_6D66: cmp byte ptr [r14+0A8h], 8 jz short loc_6D7B push 4Bh ; 'K' pop rsi mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_6D7B: cmp byte ptr [r14+0A9h], 8 jz short loc_6D90 push 51h ; 'Q' pop rsi mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_6D90: cmp byte ptr [r14+0AAh], 8 jz short loc_6DA5 push 6Bh ; 'k' pop rsi mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_6DA5: cmp byte ptr [r14+0ABh], 8 jz short loc_6DBA push 71h ; 'q' pop rsi mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_6DBA: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_6DCE: mov r14, rax mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long chess::Board::getCastleString[abi:cxx11](long long a1, _BYTE *a2) { char v2; // al _BYTE *v3; // r14 long long i; // rax char v5; // al char v6; // bp long long j; // r12 long long v8; // r13 char v9; // al unsigned __int8 v11; // [rsp+Ah] [rbp-3Eh] BYREF char v12; // [rsp+Bh] [rbp-3Dh] BYREF __int16 v13; // [rsp+Ch] [rbp-3Ch] __int16 v14; // [rsp+Eh] [rbp-3Ah] long long v15; // [rsp+10h] [rbp-38h] v2 = a2[181]; *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; if ( v2 == 1 ) { v14 = 256; v3 = a2 + 168; for ( i = 0LL; i != 2; i = v15 + 1 ) { v15 = i; v5 = *((_BYTE *)&v14 + i); v13 = 256; v6 = v5; for ( j = 0LL; j != 2; ++j ) { v8 = *((unsigned __int8 *)&v13 + j); chess::Color::Color(&v12, v6); if ( v3[2 * v12 + v8] != 8 ) { chess::Color::Color(&v11, v6); v9 = chess::Board::getCastleString[abi:cxx11](void)const::{lambda(chess::Board::CastlingRights const&,chess::Color,chess::Board::CastlingRights::Side)#1}::operator()( &chess::Board::getCastleString[abi:cxx11](void)const::get_file, v3, v11, (unsigned __int8)v8); std::string::push_back(a1, (unsigned int)v9); } } } } else { if ( a2[168] != 8 ) std::string::push_back(a1, 75LL); if ( a2[169] != 8 ) std::string::push_back(a1, 81LL); if ( a2[170] != 8 ) std::string::push_back(a1, 107LL); if ( a2[171] != 8 ) std::string::push_back(a1, 113LL); } return a1; }
getCastleString[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV AL,byte ptr [RSI + 0xb5] LEA RCX,[RDI + 0x10] MOV qword ptr [RDI],RCX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 CMP AL,0x1 JNZ 0x00106d66 MOV word ptr [RSP + 0xe],0x100 ADD R14,0xa8 XOR EAX,EAX LEA R15,[RSP + 0xb] LAB_00106cdd: CMP RAX,0x2 JZ 0x00106dba MOV qword ptr [RSP + 0x10],RAX MOV AL,byte ptr [RSP + RAX*0x1 + 0xe] MOV word ptr [RSP + 0xc],0x100 MOVSX EBP,AL XOR R12D,R12D LAB_00106cfd: CMP R12,0x2 JZ 0x00106d59 MOVZX R13D,byte ptr [RSP + R12*0x1 + 0xc] MOV RDI,R15 MOV ESI,EBP CALL 0x0010310e MOVSX RAX,byte ptr [RSP + 0xb] LEA RAX,[R14 + RAX*0x2] CMP byte ptr [R13 + RAX*0x1],0x8 JZ 0x00106d54 LEA RDI,[RSP + 0xa] MOV ESI,EBP CALL 0x0010310e MOVZX EDX,byte ptr [RSP + 0xa] LAB_00106d36: MOVZX ECX,R13B LEA RDI,[0x1104f4] MOV RSI,R14 CALL 0x00106de2 MOVSX ESI,AL MOV RDI,RBX CALL 0x001021f0 LAB_00106d54: INC R12 JMP 0x00106cfd LAB_00106d59: MOV RAX,qword ptr [RSP + 0x10] INC RAX JMP 0x00106cdd LAB_00106d66: CMP byte ptr [R14 + 0xa8],0x8 JZ 0x00106d7b LAB_00106d70: PUSH 0x4b POP RSI MOV RDI,RBX CALL 0x001021f0 LAB_00106d7b: CMP byte ptr [R14 + 0xa9],0x8 JZ 0x00106d90 PUSH 0x51 POP RSI MOV RDI,RBX CALL 0x001021f0 LAB_00106d90: CMP byte ptr [R14 + 0xaa],0x8 JZ 0x00106da5 PUSH 0x6b POP RSI MOV RDI,RBX CALL 0x001021f0 LAB_00106da5: CMP byte ptr [R14 + 0xab],0x8 JZ 0x00106dba PUSH 0x71 POP RSI MOV RDI,RBX CALL 0x001021f0 LAB_00106dba: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* chess::Board::getCastleString[abi:cxx11]() const */ void chess::Board::getCastleString_abi_cxx11_(void) { char cVar1; byte bVar2; byte bVar3; long in_RSI; char cVar4; long *in_RDI; long lVar5; Color local_3e; Color local_3d; byte local_3c [4]; long local_38; cVar1 = *(char *)(in_RSI + 0xb5); *in_RDI = (long)(in_RDI + 2); in_RDI[1] = 0; *(int1 *)(in_RDI + 2) = 0; cVar4 = (char)in_RDI; if (cVar1 == '\x01') { local_3c[2] = 0; local_3c[3] = 1; for (local_38 = 0; local_38 != 2; local_38 = local_38 + 1) { bVar2 = local_3c[local_38 + 2]; local_3c[0] = 0; local_3c[1] = 1; for (lVar5 = 0; lVar5 != 2; lVar5 = lVar5 + 1) { bVar3 = local_3c[lVar5]; Color::Color(&local_3d,(int)(char)bVar2); if (*(char *)((ulong)bVar3 + in_RSI + 0xa8 + (long)(char)local_3d * 2) != '\b') { Color::Color(&local_3e,(int)(char)bVar2); /* try { // try from 00106d36 to 00106d53 has its CatchHandler @ 00106dce */ const:: {lambda(chess::Board::CastlingRights_const&,chess::Color,chess::Board::CastlingRights::Side)#1} ::operator()(&getCastleString[abi:cxx11]()::get_file,in_RSI + 0xa8,local_3e,(ulong)bVar3); std::__cxx11::string::push_back(cVar4); } } } } else { if (*(char *)(in_RSI + 0xa8) != '\b') { /* try { // try from 00106d70 to 00106db9 has its CatchHandler @ 00106dcc */ std::__cxx11::string::push_back(cVar4); } if (*(char *)(in_RSI + 0xa9) != '\b') { std::__cxx11::string::push_back(cVar4); } if (*(char *)(in_RSI + 0xaa) != '\b') { std::__cxx11::string::push_back(cVar4); } if (*(char *)(in_RSI + 0xab) != '\b') { std::__cxx11::string::push_back(cVar4); } } return; }
9,047
my_hash_free
eloqsql/mysys/hash.c
void my_hash_free(HASH *hash) { DBUG_ENTER("my_hash_free"); DBUG_PRINT("enter",("hash:%p elements: %ld", hash, hash->records)); my_hash_free_elements(hash); hash->free= 0; delete_dynamic(&hash->array); hash->blength= 0; DBUG_VOID_RETURN; }
O3
c
my_hash_free: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x94ec1 movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x94ec1 movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x94eb1 xorl %r14d, %r14d movq %r14, 0x60(%rbx) leaq 0x28(%rbx), %rdi callq 0x930b0 movq %r14, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_free: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_94EC1 mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_94EC1 mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_94EB1: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_94EB1 loc_94EC1: xor r14d, r14d mov [rbx+60h], r14 lea rdi, [rbx+28h] call delete_dynamic mov [rbx+10h], r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_free(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; (*(void ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_QWORD *)(a1 + 96) = 0LL; result = delete_dynamic((long long *)(a1 + 40)); *(_QWORD *)(a1 + 16) = 0LL; return result; }
my_hash_free: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x00194ec1 MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x00194ec1 MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_00194eb1: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x00194eb1 LAB_00194ec1: XOR R14D,R14D MOV qword ptr [RBX + 0x60],R14 LEA RDI,[RBX + 0x28] CALL 0x001930b0 MOV qword ptr [RBX + 0x10],R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_free(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int8 *)(param_1 + 0x60) = 0; delete_dynamic(param_1 + 0x28); *(int8 *)(param_1 + 0x10) = 0; return; }
9,048
corofx::effect_awaiter<bar>::~effect_awaiter()
corofx/include/corofx/effect.hpp
~effect_awaiter() = default;
O3
cpp
corofx::effect_awaiter<bar>::~effect_awaiter(): endbr64 pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpb $0x1, 0x48(%rdi) jne 0x2592 movb $0x0, 0x48(%rbx) movq 0x30(%rbx), %rdi testq %rdi, %rdi je 0x2592 movq 0x40(%rbx), %rsi subq %rdi, %rsi callq 0x1210 movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x259e callq *0x8(%rdi) movq (%rbx), %rdi testq %rdi, %rdi je 0x25b8 movq 0x10(%rbx), %rsi subq %rdi, %rsi addq $0x8, %rsp popq %rbx popq %rbp jmp 0x1210 addq $0x8, %rsp popq %rbx popq %rbp retq endbr64 movq %rax, %rdi callq 0x2616 nop
_ZN6corofx14effect_awaiterI3barED2Ev: endbr64 push rbp mov rbp, rsp push rbx push rax mov rbx, rdi cmp byte ptr [rdi+48h], 1 jnz short loc_2592 mov byte ptr [rbx+48h], 0 mov rdi, [rbx+30h]; void * test rdi, rdi jz short loc_2592 mov rsi, [rbx+40h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2592: mov rdi, [rbx+28h] test rdi, rdi jz short loc_259E call qword ptr [rdi+8] loc_259E: mov rdi, [rbx]; void * test rdi, rdi jz short loc_25B8 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 add rsp, 8 pop rbx pop rbp jmp __ZdlPvm; operator delete(void *,ulong) loc_25B8: add rsp, 8 pop rbx pop rbp retn endbr64 mov rdi, rax call __clang_call_terminate
void corofx::effect_awaiter<bar>::~effect_awaiter(long long a1) { void *v2; // rdi long long v3; // rdi if ( *(_BYTE *)(a1 + 72) == 1 ) { *(_BYTE *)(a1 + 72) = 0; v2 = *(void **)(a1 + 48); if ( v2 ) operator delete(v2, *(_QWORD *)(a1 + 64) - (_QWORD)v2); } v3 = *(_QWORD *)(a1 + 40); if ( v3 ) (*(void ( **)(long long))(v3 + 8))(v3); if ( *(_QWORD *)a1 ) operator delete(*(void **)a1, *(_QWORD *)(a1 + 16) - *(_QWORD *)a1); }
~effect_awaiter: ENDBR64 PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI CMP byte ptr [RDI + 0x48],0x1 JNZ 0x00102592 MOV byte ptr [RBX + 0x48],0x0 MOV RDI,qword ptr [RBX + 0x30] TEST RDI,RDI JZ 0x00102592 MOV RSI,qword ptr [RBX + 0x40] SUB RSI,RDI CALL 0x00101210 LAB_00102592: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x0010259e LAB_0010259b: CALL qword ptr [RDI + 0x8] LAB_0010259e: MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x001025b8 MOV RSI,qword ptr [RBX + 0x10] SUB RSI,RDI ADD RSP,0x8 POP RBX POP RBP JMP 0x00101210 LAB_001025b8: ADD RSP,0x8 POP RBX POP RBP RET
/* corofx::effect_awaiter<bar>::~effect_awaiter() */ void __thiscall corofx::effect_awaiter<bar>::~effect_awaiter(effect_awaiter<bar> *this) { void *pvVar1; if (this[0x48] == (effect_awaiter<bar>)0x1) { this[0x48] = (effect_awaiter<bar>)0x0; pvVar1 = *(void **)(this + 0x30); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x40) - (long)pvVar1); } } if (*(long *)(this + 0x28) != 0) { /* try { // try from 0010259b to 0010259d has its CatchHandler @ 001025bf */ (**(code **)(*(long *)(this + 0x28) + 8))(); } pvVar1 = *(void **)this; if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x10) - (long)pvVar1); return; } return; }
9,049
common_params_get_system_info[abi:cxx11](common_params const&)
monkey531[P]llama/common/common.cpp
std::string common_params_get_system_info(const common_params & params) { std::ostringstream os; os << "system_info: n_threads = " << params.cpuparams.n_threads; if (params.cpuparams_batch.n_threads != -1) { os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")"; } #if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later // TODO: windows + arm64 + mingw64 DWORD logicalProcessorCount = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); os << " / " << logicalProcessorCount << " | " << llama_print_system_info(); #else os << " / " << std::thread::hardware_concurrency() << " | " << llama_print_system_info(); #endif return os.str(); }
O2
cpp
common_params_get_system_info[abi:cxx11](common_params const&): pushq %r15 pushq %r14 pushq %rbx subq $0x180, %rsp # imm = 0x180 movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x24b90 leaq 0x60720(%rip), %rsi # 0xb4a6e movq %r15, %rdi callq 0x24890 movl 0x274(%r14), %esi movq %rax, %rdi callq 0x24f00 cmpl $-0x1, 0x488(%r14) je 0x5439e leaq 0x60712(%rip), %rsi # 0xb4a88 leaq 0x8(%rsp), %rdi callq 0x24890 movl 0x488(%r14), %esi movq %rax, %rdi callq 0x24f00 leaq 0x661d8(%rip), %rsi # 0xba56e movq %rax, %rdi callq 0x24890 leaq 0x606f8(%rip), %rsi # 0xb4a9d leaq 0x8(%rsp), %rdi callq 0x24890 movq %rax, %r14 callq 0x24bd0 movl %eax, %esi movq %r14, %rdi callq 0x24610 leaq 0x665ed(%rip), %rsi # 0xba9b5 movq %rax, %rdi callq 0x24890 movq %rax, %r14 callq 0x24520 movq %r14, %rdi movq %rax, %rsi callq 0x24890 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x24da0 leaq 0x8(%rsp), %rdi callq 0x241f0 movq %rbx, %rax addq $0x180, %rsp # imm = 0x180 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x241f0 movq %rbx, %rdi callq 0x24f80
_Z29common_params_get_system_infoB5cxx11RK13common_params: push r15 push r14 push rbx sub rsp, 180h mov r14, rsi mov rbx, rdi lea r15, [rsp+198h+var_190] mov rdi, r15 call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, aSystemInfoNThr; "system_info: n_threads = " mov rdi, r15 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov esi, [r14+274h] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) cmp dword ptr [r14+488h], 0FFFFFFFFh jz short loc_5439E lea rsi, aNThreadsBatch; " (n_threads_batch = " lea rdi, [rsp+198h+var_190] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov esi, [r14+488h] mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, a09401910201912+51h; ")" mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_5439E: lea rsi, asc_B4A9D; " / " lea rdi, [rsp+198h+var_190]; this call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov esi, eax mov rdi, r14 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) lea rsi, asc_BA9B4+1; " | " mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax call _llama_print_system_info mov rdi, r14 mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [rsp+198h+var_188] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rdi, [rsp+198h+var_190] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rax, rbx add rsp, 180h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rdi, rbx call __Unwind_Resume
long long common_params_get_system_info[abi:cxx11](long long a1, long long a2) { long long v3; // rax long long v4; // rax long long v5; // rax long long v6; // r14 unsigned int v7; // eax long long v8; // rdi long long v9; // r14 long long v10; // rax _BYTE v12[8]; // [rsp+8h] [rbp-190h] BYREF _BYTE v13[392]; // [rsp+10h] [rbp-188h] BYREF std::ostringstream::basic_ostringstream(v12); v3 = std::operator<<<std::char_traits<char>>(v12, "system_info: n_threads = "); std::ostream::operator<<(v3, *(unsigned int *)(a2 + 628)); if ( *(_DWORD *)(a2 + 1160) != -1 ) { v4 = std::operator<<<std::char_traits<char>>(v12, " (n_threads_batch = "); v5 = std::ostream::operator<<(v4, *(unsigned int *)(a2 + 1160)); std::operator<<<std::char_traits<char>>(v5, ")"); } v6 = std::operator<<<std::char_traits<char>>(v12, " / "); v7 = std::thread::hardware_concurrency((std::thread *)v12); v8 = std::ostream::_M_insert<unsigned long>(v6, v7); v9 = std::operator<<<std::char_traits<char>>(v8, " | "); v10 = llama_print_system_info(); std::operator<<<std::char_traits<char>>(v9, v10); std::stringbuf::str(a1, v13); std::ostringstream::~ostringstream(v12); return a1; }
common_params_get_system_info[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x180 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00124b90 LAB_00154347: LEA RSI,[0x1b4a6e] MOV RDI,R15 CALL 0x00124890 MOV ESI,dword ptr [R14 + 0x274] MOV RDI,RAX CALL 0x00124f00 CMP dword ptr [R14 + 0x488],-0x1 JZ 0x0015439e LEA RSI,[0x1b4a88] LEA RDI,[RSP + 0x8] CALL 0x00124890 MOV ESI,dword ptr [R14 + 0x488] MOV RDI,RAX CALL 0x00124f00 LEA RSI,[0x1ba56e] MOV RDI,RAX CALL 0x00124890 LAB_0015439e: LEA RSI,[0x1b4a9d] LEA RDI,[RSP + 0x8] CALL 0x00124890 MOV R14,RAX CALL 0x00124bd0 MOV ESI,EAX MOV RDI,R14 CALL 0x00124610 LEA RSI,[0x1ba9b5] MOV RDI,RAX CALL 0x00124890 MOV R14,RAX CALL 0x00124520 MOV RDI,R14 MOV RSI,RAX CALL 0x00124890 LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00124da0 LAB_001543f0: LEA RDI,[RSP + 0x8] CALL 0x001241f0 MOV RAX,RBX ADD RSP,0x180 POP RBX POP R14 POP R15 RET
/* common_params_get_system_info[abi:cxx11](common_params const&) */ common_params * common_params_get_system_info_abi_cxx11_(common_params *param_1) { ostream *poVar1; char *pcVar2; long in_RSI; ostringstream local_190 [376]; std::__cxx11::ostringstream::ostringstream(local_190); /* try { // try from 00154347 to 001543ef has its CatchHandler @ 0015440a */ poVar1 = std::operator<<((ostream *)local_190,"system_info: n_threads = "); std::ostream::operator<<(poVar1,*(int *)(in_RSI + 0x274)); if (*(int *)(in_RSI + 0x488) != -1) { poVar1 = std::operator<<((ostream *)local_190," (n_threads_batch = "); poVar1 = (ostream *)std::ostream::operator<<(poVar1,*(int *)(in_RSI + 0x488)); std::operator<<(poVar1,")"); } poVar1 = std::operator<<((ostream *)local_190," / "); std::thread::hardware_concurrency(); poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)poVar1); poVar1 = std::operator<<(poVar1," | "); pcVar2 = (char *)llama_print_system_info(); std::operator<<(poVar1,pcVar2); std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream(local_190); return param_1; }
9,050
ma_tls_verify_server_cert
eloqsql/libmariadb/libmariadb/secure/openssl.c
int ma_tls_verify_server_cert(MARIADB_TLS *ctls) { X509 *cert; MYSQL *mysql; SSL *ssl; MARIADB_PVIO *pvio; #if !defined(HAVE_OPENSSL_CHECK_HOST) X509_NAME *x509sn; int cn_pos; X509_NAME_ENTRY *cn_entry; ASN1_STRING *cn_asn1; const char *cn_str; #endif if (!ctls || !ctls->ssl) return 1; ssl= (SSL *)ctls->ssl; mysql= (MYSQL *)SSL_get_app_data(ssl); pvio= mysql->net.pvio; if (!mysql->host) { pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Invalid (empty) hostname"); return 1; } if (!(cert= SSL_get_peer_certificate(ssl))) { pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Unable to get server certificate"); return 1; } #ifdef HAVE_OPENSSL_CHECK_HOST if (X509_check_host(cert, mysql->host, 0, 0, 0) != 1 && X509_check_ip_asc(cert, mysql->host, 0) != 1) goto error; #else x509sn= X509_get_subject_name(cert); if ((cn_pos= X509_NAME_get_index_by_NID(x509sn, NID_commonName, -1)) < 0) goto error; if (!(cn_entry= X509_NAME_get_entry(x509sn, cn_pos))) goto error; if (!(cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry))) goto error; cn_str = (char *)ASN1_STRING_data(cn_asn1); /* Make sure there is no embedded \0 in the CN */ if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn_str)) goto error; if (strcmp(cn_str, mysql->host)) goto error; #endif X509_free(cert); return 0; error: X509_free(cert); pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Validation of SSL server certificate failed"); return 1; }
O0
c
ma_tls_verify_server_cert: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x5e58e movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x5e59a movl $0x1, -0x4(%rbp) jmp 0x5e6fa movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi xorl %esi, %esi callq 0x37310 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, 0x2b0(%rax) jne 0x5e60f movq -0x30(%rbp), %rax movq 0x50(%rax), %r9 movq -0x20(%rbp), %rdi leaq 0x1d916f(%rip), %rax # 0x237750 movq (%rax), %rdx leaq 0x1d9175(%rip), %rax # 0x237760 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x70c25(%rip), %r8 # 0xcf223 movb $0x0, %al callq *%r9 movl $0x1, -0x4(%rbp) jmp 0x5e6fa movq -0x28(%rbp), %rdi callq 0x37ad0 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x5e663 movq -0x30(%rbp), %rax movq 0x50(%rax), %r9 movq -0x20(%rbp), %rdi leaq 0x1d911b(%rip), %rax # 0x237750 movq (%rax), %rdx leaq 0x1d9121(%rip), %rax # 0x237760 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x70bea(%rip), %r8 # 0xcf23c movb $0x0, %al callq *%r9 movl $0x1, -0x4(%rbp) jmp 0x5e6fa movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x2b0(%rax), %rsi xorl %eax, %eax movl %eax, %r8d xorl %ecx, %ecx movq %r8, %rdx callq 0x37630 cmpl $0x1, %eax je 0x5e6a3 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x2b0(%rax), %rsi xorl %edx, %edx callq 0x37860 cmpl $0x1, %eax je 0x5e6a3 jmp 0x5e6b5 movq -0x18(%rbp), %rdi callq 0x37c20 movl $0x0, -0x4(%rbp) jmp 0x5e6fa movq -0x18(%rbp), %rdi callq 0x37c20 movq -0x30(%rbp), %rax movq 0x50(%rax), %r9 movq -0x20(%rbp), %rdi leaq 0x1d907f(%rip), %rax # 0x237750 movq (%rax), %rdx leaq 0x1d9085(%rip), %rax # 0x237760 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x70b6f(%rip), %r8 # 0xcf25d movb $0x0, %al callq *%r9 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_tls_verify_server_cert: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jz short loc_5E58E mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jnz short loc_5E59A loc_5E58E: mov [rbp+var_4], 1 jmp loc_5E6FA loc_5E59A: mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_28], rax mov rdi, [rbp+var_28] xor esi, esi call _SSL_get_ex_data mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_20] cmp qword ptr [rax+2B0h], 0 jnz short loc_5E60F mov rax, [rbp+var_30] mov r9, [rax+50h] mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aInvalidEmptyHo; "Invalid (empty) hostname" mov al, 0 call r9 mov [rbp+var_4], 1 jmp loc_5E6FA loc_5E60F: mov rdi, [rbp+var_28] call _SSL_get1_peer_certificate mov [rbp+var_18], rax cmp rax, 0 jnz short loc_5E663 mov rax, [rbp+var_30] mov r9, [rax+50h] mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aUnableToGetSer; "Unable to get server certificate" mov al, 0 call r9 mov [rbp+var_4], 1 jmp loc_5E6FA loc_5E663: mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov rsi, [rax+2B0h] xor eax, eax mov r8d, eax xor ecx, ecx mov rdx, r8 call _X509_check_host cmp eax, 1 jz short loc_5E6A3 mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov rsi, [rax+2B0h] xor edx, edx call _X509_check_ip_asc cmp eax, 1 jz short loc_5E6A3 jmp short loc_5E6B5 loc_5E6A3: mov rdi, [rbp+var_18] call _X509_free mov [rbp+var_4], 0 jmp short loc_5E6FA loc_5E6B5: mov rdi, [rbp+var_18] call _X509_free mov rax, [rbp+var_30] mov r9, [rax+50h] mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aValidationOfSs; "Validation of SSL server certificate fa"... mov al, 0 call r9 mov [rbp+var_4], 1 loc_5E6FA: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ma_tls_verify_server_cert(long long a1) { long long v2; // [rsp+0h] [rbp-30h] long long v3; // [rsp+8h] [rbp-28h] long long *v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] if ( a1 && *(_QWORD *)(a1 + 16) ) { v3 = *(_QWORD *)(a1 + 16); v4 = (long long *)SSL_get_ex_data(v3, 0LL); v2 = *v4; if ( v4[86] ) { v5 = SSL_get1_peer_certificate(v3); if ( v5 ) { if ( (unsigned int)X509_check_host(v5, v4[86], 0LL, 0LL) == 1 || (unsigned int)X509_check_ip_asc(v5, v4[86], 0LL) == 1 ) { X509_free(v5); return 0; } else { X509_free(v5); (*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))( v4, 2026LL, SQLSTATE_UNKNOWN, client_errors[26], "Validation of SSL server certificate failed"); return 1; } } else { (*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))( v4, 2026LL, SQLSTATE_UNKNOWN, client_errors[26], "Unable to get server certificate"); return 1; } } else { (*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))( v4, 2026LL, SQLSTATE_UNKNOWN, client_errors[26], "Invalid (empty) hostname"); return 1; } } else { return 1; } }
ma_tls_verify_server_cert: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0015e58e MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0015e59a LAB_0015e58e: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015e6fa LAB_0015e59a: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x00137310 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x2b0],0x0 JNZ 0x0015e60f MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x337750] MOV RDX,qword ptr [RAX] LEA RAX,[0x337760] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1cf223] MOV AL,0x0 CALL R9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015e6fa LAB_0015e60f: MOV RDI,qword ptr [RBP + -0x28] CALL 0x00137ad0 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0015e663 MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x337750] MOV RDX,qword ptr [RAX] LEA RAX,[0x337760] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1cf23c] MOV AL,0x0 CALL R9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015e6fa LAB_0015e663: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x2b0] XOR EAX,EAX MOV R8D,EAX XOR ECX,ECX MOV RDX,R8 CALL 0x00137630 CMP EAX,0x1 JZ 0x0015e6a3 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x2b0] XOR EDX,EDX CALL 0x00137860 CMP EAX,0x1 JZ 0x0015e6a3 JMP 0x0015e6b5 LAB_0015e6a3: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00137c20 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0015e6fa LAB_0015e6b5: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00137c20 MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x337750] MOV RDX,qword ptr [RAX] LEA RAX,[0x337760] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1cf25d] MOV AL,0x0 CALL R9 MOV dword ptr [RBP + -0x4],0x1 LAB_0015e6fa: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 ma_tls_verify_server_cert(long param_1) { SSL *ssl; long lVar1; int iVar2; long *plVar3; X509 *a; int4 local_c; if ((param_1 == 0) || (*(long *)(param_1 + 0x10) == 0)) { local_c = 1; } else { ssl = *(SSL **)(param_1 + 0x10); plVar3 = (long *)SSL_get_ex_data(ssl,0); lVar1 = *plVar3; if (plVar3[0x56] == 0) { (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00337830, "Invalid (empty) hostname"); local_c = 1; } else { a = (X509 *)SSL_get1_peer_certificate(ssl); if (a == (X509 *)0x0) { (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00337830, "Unable to get server certificate"); local_c = 1; } else { iVar2 = X509_check_host(a,plVar3[0x56],0,0); if ((iVar2 != 1) && (iVar2 = X509_check_ip_asc(a,plVar3[0x56],0), iVar2 != 1)) { X509_free(a); (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00337830, "Validation of SSL server certificate failed"); return 1; } X509_free(a); local_c = 0; } } } return local_c; }
9,051
StableDiffusionGGML::~StableDiffusionGGML()
7CodeWizard[P]stablediffusion/stable-diffusion.cpp
~StableDiffusionGGML() { ggml_backend_free(backend); }
O1
cpp
StableDiffusionGGML::~StableDiffusionGGML(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x1f90(%rdi), %rdi callq 0xb3ec7 movq 0x25a0(%rbx), %rdi leaq 0x25b0(%rbx), %rax cmpq %rax, %rdi je 0x34947 movq (%rax), %rsi incq %rsi callq 0xa5e0 leaq 0x1fa0(%rbx), %rdi callq 0x37f4e movq 0x1f88(%rbx), %rdi testq %rdi, %rdi je 0x34964 callq 0x3859c leaq 0x1f50(%rbx), %rdi callq 0x3c74e leaq 0x1f18(%rbx), %rdi callq 0x36fd6 movq 0x1ef8(%rbx), %rdi leaq 0x1f08(%rbx), %rax cmpq %rax, %rdi je 0x3499a movq (%rax), %rsi incq %rsi callq 0xa5e0 leaq 0x1ec8(%rbx), %rdi callq 0x3c9e2 leaq 0x13c0(%rbx), %rdi callq 0x37f4e leaq 0x228(%rbx), %rdi callq 0x37f84 leaq 0xc0ddb(%rip), %rax # 0xf57a0 movq %rax, 0x20(%rbx) movq 0x1f8(%rbx), %rdi testq %rdi, %rdi je 0x349e4 movq 0x208(%rbx), %rsi subq %rdi, %rsi callq 0xa5e0 leaq 0x20(%rbx), %r14 movq 0x188(%rbx), %rdi testq %rdi, %rdi je 0x34a03 movq 0x198(%rbx), %rsi subq %rdi, %rsi callq 0xa5e0 leaq 0x128(%rbx), %rdi callq 0x3327a leaq 0xf8(%rbx), %rdi callq 0x38a72 leaq 0xc8(%rbx), %rdi callq 0x38b4e leaq 0x98(%rbx), %rdi callq 0x38bcc movq %r14, %rdi callq 0x37f4e movq 0x10(%rbx), %rdi addq $0x8, %rsp testq %rdi, %rdi je 0x34a50 popq %rbx popq %r14 jmp 0x3859c popq %rbx popq %r14 retq movq %rax, %rdi callq 0x37049
_ZN19StableDiffusionGGMLD2Ev: push r14 push rbx push rax mov rbx, rdi mov rdi, [rdi+1F90h] call ggml_backend_free mov rdi, [rbx+25A0h]; void * lea rax, [rbx+25B0h] cmp rdi, rax jz short loc_34947 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_34947: lea rdi, [rbx+1FA0h]; this call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule() mov rdi, [rbx+1F88h] test rdi, rdi jz short loc_34964 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_34964: lea rdi, [rbx+1F50h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_9LoraModelESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,LoraModel>,std::_Select1st<std::pair<std::string const,LoraModel>>,std::less<std::string>,std::allocator<std::pair<std::string const,LoraModel>>>::~_Rb_tree() lea rdi, [rbx+1F18h] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_fESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,float>,std::allocator<std::pair<std::string const,float>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, [rbx+1EF8h]; void * lea rax, [rbx+1F08h] cmp rdi, rax jz short loc_3499A mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3499A: lea rdi, [rbx+1EC8h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree() lea rdi, [rbx+13C0h]; this call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule() lea rdi, [rbx+228h]; this call _ZN9UNetModelD2Ev; UNetModel::~UNetModel() lea rax, off_F57A0 mov [rbx+20h], rax mov rdi, [rbx+1F8h]; void * test rdi, rdi jz short loc_349E4 mov rsi, [rbx+208h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_349E4: lea r14, [rbx+20h] mov rdi, [rbx+188h]; void * test rdi, rdi jz short loc_34A03 mov rsi, [rbx+198h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_34A03: lea rdi, [rbx+128h] call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() lea rdi, [rbx+0F8h] call _ZNSt8_Rb_treeISt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES6_ES0_IKS7_iESt10_Select1stIS9_ESt4lessIS7_ESaIS9_EED2Ev; std::_Rb_tree<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>,std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>,std::_Select1st<std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>>,std::less<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>,std::allocator<std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>>>::~_Rb_tree() lea rdi, [rbx+0C8h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::basic_string<char32_t>,std::pair<std::basic_string<char32_t> const,int>,std::_Select1st<std::pair<std::basic_string<char32_t> const,int>>,std::less<std::basic_string<char32_t>>,std::allocator<std::pair<std::basic_string<char32_t> const,int>>>::~_Rb_tree() lea rdi, [rbx+98h] call _ZNSt8_Rb_treeIiSt4pairIKiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEESt10_Select1stIS8_ESt4lessIiESaIS8_EED2Ev; std::_Rb_tree<int,std::pair<int const,std::basic_string<char32_t>>,std::_Select1st<std::pair<int const,std::basic_string<char32_t>>>,std::less<int>,std::allocator<std::pair<int const,std::basic_string<char32_t>>>>::~_Rb_tree() mov rdi, r14; this call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule() mov rdi, [rbx+10h] add rsp, 8 test rdi, rdi jz short loc_34A50 pop rbx pop r14 jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_34A50: pop rbx pop r14 retn mov rdi, rax call __clang_call_terminate
void StableDiffusionGGML::~StableDiffusionGGML(StableDiffusionGGML *this) { char *v2; // rdi long long v3; // rdi char *v4; // rdi void *v5; // rdi void *v6; // rdi long long v7; // rdi ggml_backend_free(*((_QWORD *)this + 1010)); v2 = (char *)*((_QWORD *)this + 1204); if ( v2 != (char *)this + 9648 ) operator delete(v2, *((_QWORD *)this + 1206) + 1LL); GGMLModule::~GGMLModule((StableDiffusionGGML *)((char *)this + 8096)); v3 = *((_QWORD *)this + 1009); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); std::_Rb_tree<std::string,std::pair<std::string const,LoraModel>,std::_Select1st<std::pair<std::string const,LoraModel>>,std::less<std::string>,std::allocator<std::pair<std::string const,LoraModel>>>::~_Rb_tree((char *)this + 8016); std::_Hashtable<std::string,std::pair<std::string const,float>,std::allocator<std::pair<std::string const,float>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable((char *)this + 7960); v4 = (char *)*((_QWORD *)this + 991); if ( v4 != (char *)this + 7944 ) operator delete(v4, *((_QWORD *)this + 993) + 1LL); std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree((char *)this + 7880); GGMLModule::~GGMLModule((StableDiffusionGGML *)((char *)this + 5056)); UNetModel::~UNetModel((StableDiffusionGGML *)((char *)this + 552)); *((_QWORD *)this + 4) = off_F57A0; v5 = (void *)*((_QWORD *)this + 63); if ( v5 ) operator delete(v5, *((_QWORD *)this + 65) - (_QWORD)v5); v6 = (void *)*((_QWORD *)this + 49); if ( v6 ) operator delete(v6, *((_QWORD *)this + 51) - (_QWORD)v6); std::basic_regex<char,std::regex_traits<char>>::~basic_regex((long long)this + 296); std::_Rb_tree<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>,std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>,std::_Select1st<std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>>,std::less<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>,std::allocator<std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>>>::~_Rb_tree((char *)this + 248); std::_Rb_tree<std::basic_string<char32_t>,std::pair<std::basic_string<char32_t> const,int>,std::_Select1st<std::pair<std::basic_string<char32_t> const,int>>,std::less<std::basic_string<char32_t>>,std::allocator<std::pair<std::basic_string<char32_t> const,int>>>::~_Rb_tree((char *)this + 200); std::_Rb_tree<int,std::pair<int const,std::basic_string<char32_t>>,std::_Select1st<std::pair<int const,std::basic_string<char32_t>>>,std::less<int>,std::allocator<std::pair<int const,std::basic_string<char32_t>>>>::~_Rb_tree((char *)this + 152); GGMLModule::~GGMLModule((StableDiffusionGGML *)((char *)this + 32)); v7 = *((_QWORD *)this + 2); if ( v7 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); }
9,052
StableDiffusionGGML::~StableDiffusionGGML()
7CodeWizard[P]stablediffusion/stable-diffusion.cpp
~StableDiffusionGGML() { ggml_backend_free(backend); }
O2
cpp
StableDiffusionGGML::~StableDiffusionGGML(): pushq %rbx movq %rdi, %rbx movq 0x1f90(%rdi), %rdi callq 0x8fcf5 leaq 0x25a0(%rbx), %rdi callq 0xac60 leaq 0x1fa0(%rbx), %rdi callq 0x213e6 leaq 0x1f88(%rbx), %rdi callq 0x21a50 leaq 0x1f50(%rbx), %rdi callq 0x25c42 leaq 0x1f18(%rbx), %rdi callq 0x20796 leaq 0x1ef8(%rbx), %rdi callq 0xac60 leaq 0x1ec8(%rbx), %rdi callq 0x25e24 leaq 0x13c0(%rbx), %rdi callq 0x213e6 leaq 0x228(%rbx), %rdi callq 0x2140e leaq 0x20(%rbx), %rdi callq 0x21496 addq $0x10, %rbx movq %rbx, %rdi popq %rbx jmp 0x21a50 movq %rax, %rdi callq 0x207fc
_ZN19StableDiffusionGGMLD2Ev: push rbx mov rbx, rdi mov rdi, [rdi+1F90h] call ggml_backend_free lea rdi, [rbx+25A0h]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbx+1FA0h]; this call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule() lea rdi, [rbx+1F88h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rbx+1F50h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_9LoraModelESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,LoraModel>,std::_Select1st<std::pair<std::string const,LoraModel>>,std::less<std::string>,std::allocator<std::pair<std::string const,LoraModel>>>::~_Rb_tree() lea rdi, [rbx+1F18h] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_fESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,float>,std::allocator<std::pair<std::string const,float>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() lea rdi, [rbx+1EF8h]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbx+1EC8h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree() lea rdi, [rbx+13C0h]; this call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule() lea rdi, [rbx+228h]; this call _ZN9UNetModelD2Ev; UNetModel::~UNetModel() lea rdi, [rbx+20h]; this call _ZN33FrozenCLIPEmbedderWithCustomWordsD2Ev; FrozenCLIPEmbedderWithCustomWords::~FrozenCLIPEmbedderWithCustomWords() add rbx, 10h mov rdi, rbx pop rbx jmp _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, rax call __clang_call_terminate
void StableDiffusionGGML::~StableDiffusionGGML(StableDiffusionGGML *this) { ggml_backend_free(*((_QWORD *)this + 1010)); std::string::~string((char *)this + 9632); GGMLModule::~GGMLModule((StableDiffusionGGML *)((char *)this + 8096)); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((char *)this + 8072); std::_Rb_tree<std::string,std::pair<std::string const,LoraModel>,std::_Select1st<std::pair<std::string const,LoraModel>>,std::less<std::string>,std::allocator<std::pair<std::string const,LoraModel>>>::~_Rb_tree((char *)this + 8016); std::_Hashtable<std::string,std::pair<std::string const,float>,std::allocator<std::pair<std::string const,float>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable((char *)this + 7960); std::string::~string((char *)this + 7928); std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree((char *)this + 7880); GGMLModule::~GGMLModule((StableDiffusionGGML *)((char *)this + 5056)); UNetModel::~UNetModel((StableDiffusionGGML *)((char *)this + 552)); FrozenCLIPEmbedderWithCustomWords::~FrozenCLIPEmbedderWithCustomWords((StableDiffusionGGML *)((char *)this + 32)); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((char *)this + 16); }
~StableDiffusionGGML: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x1f90] LAB_0011ea1f: CALL 0x0018fcf5 LEA RDI,[RBX + 0x25a0] CALL 0x0010ac60 LEA RDI,[RBX + 0x1fa0] CALL 0x001213e6 LEA RDI,[RBX + 0x1f88] CALL 0x00121a50 LEA RDI,[RBX + 0x1f50] CALL 0x00125c42 LEA RDI,[RBX + 0x1f18] CALL 0x00120796 LEA RDI,[RBX + 0x1ef8] CALL 0x0010ac60 LEA RDI,[RBX + 0x1ec8] CALL 0x00125e24 LEA RDI,[RBX + 0x13c0] CALL 0x001213e6 LEA RDI,[RBX + 0x228] CALL 0x0012140e LEA RDI,[RBX + 0x20] CALL 0x00121496 ADD RBX,0x10 MOV RDI,RBX POP RBX JMP 0x00121a50
/* StableDiffusionGGML::~StableDiffusionGGML() */ void __thiscall StableDiffusionGGML::~StableDiffusionGGML(StableDiffusionGGML *this) { /* try { // try from 0011ea1f to 0011ea23 has its CatchHandler @ 0011eaa6 */ ggml_backend_free(*(int8 *)(this + 0x1f90)); std::__cxx11::string::~string((string *)(this + 0x25a0)); GGMLModule::~GGMLModule((GGMLModule *)(this + 0x1fa0)); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(this + 0x1f88)); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,LoraModel>,std::_Select1st<std::pair<std::__cxx11::string_const,LoraModel>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,LoraModel>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,LoraModel>,std::_Select1st<std::pair<std::__cxx11::string_const,LoraModel>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,LoraModel>>> *)(this + 0x1f50)); std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,float>,std::allocator<std::pair<std::__cxx11::string_const,float>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,float>,std::allocator<std::pair<std::__cxx11::string_const,float>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>> *)(this + 0x1f18)); std::__cxx11::string::~string((string *)(this + 0x1ef8)); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,ggml_tensor*>,std::_Select1st<std::pair<std::__cxx11::string_const,ggml_tensor*>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,ggml_tensor*>>> *)(this + 0x1ec8)); GGMLModule::~GGMLModule((GGMLModule *)(this + 0x13c0)); UNetModel::~UNetModel((UNetModel *)(this + 0x228)); FrozenCLIPEmbedderWithCustomWords::~FrozenCLIPEmbedderWithCustomWords ((FrozenCLIPEmbedderWithCustomWords *)(this + 0x20)); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(this + 0x10)); return; }
9,053
StableDiffusionGGML::~StableDiffusionGGML()
7CodeWizard[P]stablediffusion/stable-diffusion.cpp
~StableDiffusionGGML() { ggml_backend_free(backend); }
O3
cpp
StableDiffusionGGML::~StableDiffusionGGML(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x1f90(%rdi), %rdi callq 0xb2aaf movq 0x25a0(%rbx), %rdi leaq 0x25b0(%rbx), %rax cmpq %rax, %rdi je 0x33bc1 movq (%rax), %rsi incq %rsi callq 0xa5d0 leaq 0x1fa0(%rbx), %rdi callq 0x373e6 movq 0x1f88(%rbx), %rdi testq %rdi, %rdi je 0x33bde callq 0x37a24 leaq 0x1f50(%rbx), %rdi callq 0x3bbfe leaq 0x1f18(%rbx), %rdi callq 0x362be movq 0x1ef8(%rbx), %rdi leaq 0x1f08(%rbx), %rax cmpq %rax, %rdi je 0x33c14 movq (%rax), %rsi incq %rsi callq 0xa5d0 leaq 0x1ec8(%rbx), %rdi callq 0x3be96 leaq 0x13c0(%rbx), %rdi callq 0x373e6 leaq 0x228(%rbx), %rdi callq 0x3741c leaq 0xbfb69(%rip), %rax # 0xf37a8 movq %rax, 0x20(%rbx) movq 0x1f8(%rbx), %rdi testq %rdi, %rdi je 0x33c5e movq 0x208(%rbx), %rsi subq %rdi, %rsi callq 0xa5d0 leaq 0x20(%rbx), %r14 movq 0x188(%rbx), %rdi testq %rdi, %rdi je 0x33c7d movq 0x198(%rbx), %rsi subq %rdi, %rsi callq 0xa5d0 leaq 0x128(%rbx), %rdi callq 0x324f2 leaq 0xf8(%rbx), %rdi callq 0x37eda leaq 0xc8(%rbx), %rdi callq 0x37fb6 leaq 0x98(%rbx), %rdi callq 0x38034 movq %r14, %rdi callq 0x373e6 movq 0x10(%rbx), %rdi addq $0x8, %rsp testq %rdi, %rdi je 0x33cca popq %rbx popq %r14 jmp 0x37a24 popq %rbx popq %r14 retq movq %rax, %rdi callq 0x36331
_ZN19StableDiffusionGGMLD2Ev: push r14 push rbx push rax mov rbx, rdi mov rdi, [rdi+1F90h] call ggml_backend_free mov rdi, [rbx+25A0h]; void * lea rax, [rbx+25B0h] cmp rdi, rax jz short loc_33BC1 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_33BC1: lea rdi, [rbx+1FA0h]; this call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule() mov rdi, [rbx+1F88h] test rdi, rdi jz short loc_33BDE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_33BDE: lea rdi, [rbx+1F50h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_9LoraModelESt10_Select1stIS9_ESt4lessIS5_ESaIS9_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,LoraModel>,std::_Select1st<std::pair<std::string const,LoraModel>>,std::less<std::string>,std::allocator<std::pair<std::string const,LoraModel>>>::~_Rb_tree() lea rdi, [rbx+1F18h] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_fESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,float>,std::allocator<std::pair<std::string const,float>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, [rbx+1EF8h]; void * lea rax, [rbx+1F08h] cmp rdi, rax jz short loc_33C14 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_33C14: lea rdi, [rbx+1EC8h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_P11ggml_tensorESt10_Select1stISA_ESt4lessIS5_ESaISA_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree() lea rdi, [rbx+13C0h]; this call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule() lea rdi, [rbx+228h]; this call _ZN9UNetModelD2Ev; UNetModel::~UNetModel() lea rax, off_F37A8 mov [rbx+20h], rax mov rdi, [rbx+1F8h]; void * test rdi, rdi jz short loc_33C5E mov rsi, [rbx+208h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_33C5E: lea r14, [rbx+20h] mov rdi, [rbx+188h]; void * test rdi, rdi jz short loc_33C7D mov rsi, [rbx+198h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_33C7D: lea rdi, [rbx+128h] call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; std::basic_regex<char,std::regex_traits<char>>::~basic_regex() lea rdi, [rbx+0F8h] call _ZNSt8_Rb_treeISt4pairINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEES6_ES0_IKS7_iESt10_Select1stIS9_ESt4lessIS7_ESaIS9_EED2Ev; std::_Rb_tree<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>,std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>,std::_Select1st<std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>>,std::less<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>,std::allocator<std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>>>::~_Rb_tree() lea rdi, [rbx+0C8h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEESt4pairIKS5_iESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::basic_string<char32_t>,std::pair<std::basic_string<char32_t> const,int>,std::_Select1st<std::pair<std::basic_string<char32_t> const,int>>,std::less<std::basic_string<char32_t>>,std::allocator<std::pair<std::basic_string<char32_t> const,int>>>::~_Rb_tree() lea rdi, [rbx+98h] call _ZNSt8_Rb_treeIiSt4pairIKiNSt7__cxx1112basic_stringIDiSt11char_traitsIDiESaIDiEEEESt10_Select1stIS8_ESt4lessIiESaIS8_EED2Ev; std::_Rb_tree<int,std::pair<int const,std::basic_string<char32_t>>,std::_Select1st<std::pair<int const,std::basic_string<char32_t>>>,std::less<int>,std::allocator<std::pair<int const,std::basic_string<char32_t>>>>::~_Rb_tree() mov rdi, r14; this call _ZN10GGMLModuleD2Ev; GGMLModule::~GGMLModule() mov rdi, [rbx+10h] add rsp, 8 test rdi, rdi jz short loc_33CCA pop rbx pop r14 jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_33CCA: pop rbx pop r14 retn mov rdi, rax call __clang_call_terminate
void StableDiffusionGGML::~StableDiffusionGGML(StableDiffusionGGML *this) { char *v2; // rdi long long v3; // rdi char *v4; // rdi void *v5; // rdi void *v6; // rdi long long v7; // rdi ggml_backend_free(*((_QWORD *)this + 1010)); v2 = (char *)*((_QWORD *)this + 1204); if ( v2 != (char *)this + 9648 ) operator delete(v2, *((_QWORD *)this + 1206) + 1LL); GGMLModule::~GGMLModule((StableDiffusionGGML *)((char *)this + 8096)); v3 = *((_QWORD *)this + 1009); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); std::_Rb_tree<std::string,std::pair<std::string const,LoraModel>,std::_Select1st<std::pair<std::string const,LoraModel>>,std::less<std::string>,std::allocator<std::pair<std::string const,LoraModel>>>::~_Rb_tree((char *)this + 8016); std::_Hashtable<std::string,std::pair<std::string const,float>,std::allocator<std::pair<std::string const,float>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable((char *)this + 7960); v4 = (char *)*((_QWORD *)this + 991); if ( v4 != (char *)this + 7944 ) operator delete(v4, *((_QWORD *)this + 993) + 1LL); std::_Rb_tree<std::string,std::pair<std::string const,ggml_tensor *>,std::_Select1st<std::pair<std::string const,ggml_tensor *>>,std::less<std::string>,std::allocator<std::pair<std::string const,ggml_tensor *>>>::~_Rb_tree((char *)this + 7880); GGMLModule::~GGMLModule((StableDiffusionGGML *)((char *)this + 5056)); UNetModel::~UNetModel((StableDiffusionGGML *)((char *)this + 552)); *((_QWORD *)this + 4) = &off_F37A8; v5 = (void *)*((_QWORD *)this + 63); if ( v5 ) operator delete(v5, *((_QWORD *)this + 65) - (_QWORD)v5); v6 = (void *)*((_QWORD *)this + 49); if ( v6 ) operator delete(v6, *((_QWORD *)this + 51) - (_QWORD)v6); std::basic_regex<char,std::regex_traits<char>>::~basic_regex((long long)this + 296); std::_Rb_tree<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>,std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>,std::_Select1st<std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>>,std::less<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>>>,std::allocator<std::pair<std::pair<std::basic_string<char32_t>,std::basic_string<char32_t>> const,int>>>::~_Rb_tree((char *)this + 248); std::_Rb_tree<std::basic_string<char32_t>,std::pair<std::basic_string<char32_t> const,int>,std::_Select1st<std::pair<std::basic_string<char32_t> const,int>>,std::less<std::basic_string<char32_t>>,std::allocator<std::pair<std::basic_string<char32_t> const,int>>>::~_Rb_tree((char *)this + 200); std::_Rb_tree<int,std::pair<int const,std::basic_string<char32_t>>,std::_Select1st<std::pair<int const,std::basic_string<char32_t>>>,std::less<int>,std::allocator<std::pair<int const,std::basic_string<char32_t>>>>::~_Rb_tree((char *)this + 152); GGMLModule::~GGMLModule((StableDiffusionGGML *)((char *)this + 32)); v7 = *((_QWORD *)this + 2); if ( v7 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v7); }
9,054
ggml_compute_forward_add1_f16_f32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_add1_f16_f32( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; const struct ggml_tensor * src1 = dst->src[1]; GGML_ASSERT(ggml_are_same_shape(src0, dst)); GGML_ASSERT(ggml_is_scalar(src1)); // scalar to add const float v = *(float *) src1->data; const int ith = params->ith; const int nth = params->nth; const int nr = ggml_nrows(src0); GGML_TENSOR_UNARY_OP_LOCALS GGML_ASSERT(src0->type == GGML_TYPE_F16); GGML_ASSERT(src1->type == GGML_TYPE_F32); GGML_ASSERT(dst->type == GGML_TYPE_F16); GGML_ASSERT( nb0 == sizeof(ggml_fp16_t)); GGML_ASSERT(nb00 == sizeof(ggml_fp16_t)); // rows per thread const int dr = (nr + nth - 1)/nth; // row range for this thread const int ir0 = dr*ith; const int ir1 = MIN(ir0 + dr, nr); for (int ir = ir0; ir < ir1; ++ir) { // src0 and dst are same shape => same indices const int i3 = ir/(ne2*ne1); const int i2 = (ir - i3*ne2*ne1)/ne1; const int i1 = (ir - i3*ne2*ne1 - i2*ne1); ggml_fp16_t * dst_ptr = (ggml_fp16_t *) ((char *) dst->data + i3*nb3 + i2*nb2 + i1*nb1 ); ggml_fp16_t * src0_ptr = (ggml_fp16_t *) ((char *) src0->data + i3*nb03 + i2*nb02 + i1*nb01); for (int i = 0; i < ne0; i++) { dst_ptr[i] = GGML_FP32_TO_FP16(GGML_FP16_TO_FP32(src0_ptr[i]) + v); } } }
O1
c
ggml_compute_forward_add1_f16_f32: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r14 movq %rdi, %r13 movq 0x98(%rsi), %r15 movq 0xa0(%rsi), %r12 movq %r15, %rdi callq 0x89b0 testb %al, %al je 0x254c1 movq %r12, %rdi callq 0x89d0 testb %al, %al je 0x254e0 movq 0xf8(%r12), %rax vmovd (%rax), %xmm0 vmovd %xmm0, 0xc(%rsp) movslq (%r13), %rbx movl 0x4(%r13), %r13d movq %r15, %rdi callq 0x86d0 cmpl $0x1, (%r15) jne 0x254ff cmpl $0x0, (%r12) jne 0x2551b cmpl $0x1, (%r14) vmovss 0xc(%rsp), %xmm1 jne 0x25537 cmpq $0x2, 0x30(%r14) jne 0x25553 cmpq $0x2, 0x30(%r15) jne 0x2556f movq %rax, %rcx addl %r13d, %eax decl %eax cltd idivl %r13d cltq imulq %rax, %rbx addl %ebx, %eax cmpl %ecx, %eax cmovgel %ecx, %eax cmpl %eax, %ebx jge 0x254b2 movq 0x38(%r15), %rcx movq %rcx, 0x30(%rsp) movq 0x40(%r15), %rcx movq %rcx, 0x28(%rsp) movq 0x48(%r15), %rcx movq %rcx, 0x20(%rsp) movq 0x10(%r14), %r8 movq 0x18(%r14), %r9 movq 0x38(%r14), %rcx movq %rcx, 0x18(%rsp) movq 0x40(%r14), %rcx movq %rcx, 0x10(%rsp) movq 0x48(%r14), %r12 movq 0x20(%r14), %r13 imulq %r9, %r13 movq 0xf8(%r14), %r14 movq 0xf8(%r15), %r15 movslq %eax, %rbp movq 0x23b47(%rip), %rcx # 0x48f68 movq %rbx, %rax cqto idivq %r13 movslq %eax, %r10 movq %r13, %rdx imulq %r10, %rdx movq %rbx, %rax subq %rdx, %rax cqto idivq %r9 testq %r8, %r8 jle 0x254a6 movslq %eax, %r11 movq %r10, %rsi imulq %r12, %rsi movq %r11, %rdi imulq 0x10(%rsp), %rdi movslq %edx, %rax movq %rax, %rdx imulq 0x18(%rsp), %rdx addq %rsi, %rdx addq %r14, %rdx addq %rdi, %rdx imulq 0x20(%rsp), %r10 imulq 0x28(%rsp), %r11 imulq 0x30(%rsp), %rax addq %r10, %rax addq %r15, %rax addq %r11, %rax xorl %esi, %esi movzwl (%rax,%rsi,2), %edi vaddss (%rcx,%rdi,4), %xmm1, %xmm0 vcvtps2ph $0x0, %xmm0, %xmm0 vpextrw $0x0, %xmm0, (%rdx,%rsi,2) incq %rsi cmpq %rsi, %r8 jne 0x25488 incq %rbx cmpq %rbp, %rbx jne 0x25421 addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x111fa(%rip), %rdi # 0x366c2 leaq 0x11252(%rip), %rdx # 0x36721 leaq 0x118d1(%rip), %rcx # 0x36da7 movl $0x11bb, %esi # imm = 0x11BB jmp 0x25589 leaq 0x111db(%rip), %rdi # 0x366c2 leaq 0x11233(%rip), %rdx # 0x36721 leaq 0x11b35(%rip), %rcx # 0x3702a movl $0x11bc, %esi # imm = 0x11BC jmp 0x25589 leaq 0x111bc(%rip), %rdi # 0x366c2 leaq 0x11214(%rip), %rdx # 0x36721 leaq 0x1191f(%rip), %rcx # 0x36e33 movl $0x11c8, %esi # imm = 0x11C8 jmp 0x25589 leaq 0x111a0(%rip), %rdi # 0x366c2 leaq 0x111f8(%rip), %rdx # 0x36721 leaq 0x11972(%rip), %rcx # 0x36ea2 movl $0x11c9, %esi # imm = 0x11C9 jmp 0x25589 leaq 0x11184(%rip), %rdi # 0x366c2 leaq 0x111dc(%rip), %rdx # 0x36721 leaq 0x12ae9(%rip), %rcx # 0x38035 movl $0x11ca, %esi # imm = 0x11CA jmp 0x25589 leaq 0x11168(%rip), %rdi # 0x366c2 leaq 0x111c0(%rip), %rdx # 0x36721 leaq 0x11903(%rip), %rcx # 0x36e6b movl $0x11cc, %esi # imm = 0x11CC jmp 0x25589 leaq 0x1114c(%rip), %rdi # 0x366c2 leaq 0x111a4(%rip), %rdx # 0x36721 leaq 0x11902(%rip), %rcx # 0x36e86 movl $0x11cd, %esi # imm = 0x11CD xorl %eax, %eax callq 0x89c0
ggml_compute_forward_add1_f16_f32: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rsi mov r13, rdi mov r15, [rsi+98h] mov r12, [rsi+0A0h] mov rdi, r15 call _ggml_are_same_shape test al, al jz loc_254C1 mov rdi, r12 call _ggml_is_scalar test al, al jz loc_254E0 mov rax, [r12+0F8h] vmovd xmm0, dword ptr [rax] vmovd [rsp+68h+var_5C], xmm0 movsxd rbx, dword ptr [r13+0] mov r13d, [r13+4] mov rdi, r15 call _ggml_nrows cmp dword ptr [r15], 1 jnz loc_254FF cmp dword ptr [r12], 0 jnz loc_2551B cmp dword ptr [r14], 1 vmovss xmm1, [rsp+68h+var_5C] jnz loc_25537 cmp qword ptr [r14+30h], 2 jnz loc_25553 cmp qword ptr [r15+30h], 2 jnz loc_2556F mov rcx, rax add eax, r13d dec eax cdq idiv r13d cdqe imul rbx, rax add eax, ebx cmp eax, ecx cmovge eax, ecx cmp ebx, eax jge loc_254B2 mov rcx, [r15+38h] mov [rsp+68h+var_38], rcx mov rcx, [r15+40h] mov [rsp+68h+var_40], rcx mov rcx, [r15+48h] mov [rsp+68h+var_48], rcx mov r8, [r14+10h] mov r9, [r14+18h] mov rcx, [r14+38h] mov [rsp+68h+var_50], rcx mov rcx, [r14+40h] mov [rsp+68h+var_58], rcx mov r12, [r14+48h] mov r13, [r14+20h] imul r13, r9 mov r14, [r14+0F8h] mov r15, [r15+0F8h] movsxd rbp, eax mov rcx, cs:ggml_table_f32_f16_ptr loc_25421: mov rax, rbx cqo idiv r13 movsxd r10, eax mov rdx, r13 imul rdx, r10 mov rax, rbx sub rax, rdx cqo idiv r9 test r8, r8 jle short loc_254A6 movsxd r11, eax mov rsi, r10 imul rsi, r12 mov rdi, r11 imul rdi, [rsp+68h+var_58] movsxd rax, edx mov rdx, rax imul rdx, [rsp+68h+var_50] add rdx, rsi add rdx, r14 add rdx, rdi imul r10, [rsp+68h+var_48] imul r11, [rsp+68h+var_40] imul rax, [rsp+68h+var_38] add rax, r10 add rax, r15 add rax, r11 xor esi, esi loc_25488: movzx edi, word ptr [rax+rsi*2] vaddss xmm0, xmm1, dword ptr [rcx+rdi*4] vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rdx+rsi*2], xmm0, 0 inc rsi cmp r8, rsi jnz short loc_25488 loc_254A6: inc rbx cmp rbx, rbp jnz loc_25421 loc_254B2: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_254C1: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlCanRepeatS+1Fh; "ggml_are_same_shape(src0, dst)" mov esi, 11BBh jmp loc_25589 loc_254E0: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsScalarSr; "ggml_is_scalar(src1)" mov esi, 11BCh jmp loc_25589 loc_254FF: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrc0TypeGgmlTy; "src0->type == GGML_TYPE_F16" mov esi, 11C8h jmp short loc_25589 loc_2551B: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrc1TypeGgmlTy; "src1->type == GGML_TYPE_F32" mov esi, 11C9h jmp short loc_25589 loc_25537: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstTypeGgmlTyp_1+1Eh; "dst->type == GGML_TYPE_F16" mov esi, 11CAh jmp short loc_25589 loc_25553: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNb0SizeofGgmlF; "nb0 == sizeof(ggml_fp16_t)" mov esi, 11CCh jmp short loc_25589 loc_2556F: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNb00SizeofGgml; "nb00 == sizeof(ggml_fp16_t)" mov esi, 11CDh loc_25589: xor eax, eax call _ggml_abort
long long ggml_compute_forward_add1_f16_f32(int *a1, long long a2) { long long v2; // r15 long long v3; // r12 long long v6; // rbx int v7; // r13d int v8; // eax int v10; // ecx int v11; // eax long long v12; // rbx long long result; // rax long long v14; // r8 long long v15; // r9 long long v16; // r12 long long v17; // r13 long long v18; // r14 long long v19; // r15 long long v20; // rbp long long v21; // r10 long long v22; // rdx long long v23; // r11 long long v24; // rdi long long v25; // rax long long v31; // [rsp+10h] [rbp-58h] long long v32; // [rsp+18h] [rbp-50h] long long v33; // [rsp+20h] [rbp-48h] long long v34; // [rsp+28h] [rbp-40h] long long v35; // [rsp+30h] [rbp-38h] v2 = *(_QWORD *)(a2 + 152); v3 = *(_QWORD *)(a2 + 160); if ( !(unsigned __int8)ggml_are_same_shape(v2) ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4539LL, "GGML_ASSERT(%s) failed", "ggml_are_same_shape(src0, dst)"); return ggml_compute_forward_add1_bf16_bf16(); } if ( !(unsigned __int8)ggml_is_scalar(v3) ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4540LL, "GGML_ASSERT(%s) failed", "ggml_is_scalar(src1)"); return ggml_compute_forward_add1_bf16_bf16(); } _RAX = *(_QWORD *)(v3 + 248); __asm { vmovd xmm0, dword ptr [rax] vmovd [rsp+68h+var_5C], xmm0 } v6 = *a1; v7 = a1[1]; v8 = ggml_nrows(v2); if ( *(_DWORD *)v2 != 1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4552LL, "GGML_ASSERT(%s) failed", "src0->type == GGML_TYPE_F16"); return ggml_compute_forward_add1_bf16_bf16(); } if ( *(_DWORD *)v3 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4553LL, "GGML_ASSERT(%s) failed", "src1->type == GGML_TYPE_F32"); return ggml_compute_forward_add1_bf16_bf16(); } __asm { vmovss xmm1, [rsp+68h+var_5C] } if ( *(_DWORD *)a2 != 1 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4554LL, "GGML_ASSERT(%s) failed", "dst->type == GGML_TYPE_F16"); return ggml_compute_forward_add1_bf16_bf16(); } if ( *(_QWORD *)(a2 + 48) != 2LL ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4556LL, "GGML_ASSERT(%s) failed", "nb0 == sizeof(ggml_fp16_t)"); return ggml_compute_forward_add1_bf16_bf16(); } if ( *(_QWORD *)(v2 + 48) != 2LL ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 4557LL, "GGML_ASSERT(%s) failed", "nb00 == sizeof(ggml_fp16_t)"); return ggml_compute_forward_add1_bf16_bf16(); } v10 = v8; v11 = (v7 + v8 - 1) / v7; v12 = v11 * v6; result = (unsigned int)(v12 + v11); if ( (int)result >= v10 ) result = (unsigned int)v10; if ( (int)v12 < (int)result ) { v35 = *(_QWORD *)(v2 + 56); v34 = *(_QWORD *)(v2 + 64); v33 = *(_QWORD *)(v2 + 72); v14 = *(_QWORD *)(a2 + 16); v15 = *(_QWORD *)(a2 + 24); v32 = *(_QWORD *)(a2 + 56); v31 = *(_QWORD *)(a2 + 64); v16 = *(_QWORD *)(a2 + 72); v17 = v15 * *(_QWORD *)(a2 + 32); v18 = *(_QWORD *)(a2 + 248); v19 = *(_QWORD *)(v2 + 248); v20 = (int)result; do { v21 = (int)(v12 / v17); result = (v12 - v21 * v17) / v15; v22 = (v12 - v21 * v17) % v15; if ( v14 > 0 ) { v23 = (int)result; v24 = v31 * (int)result; v25 = (int)v22; _RDX = v24 + v18 + v16 * v21 + v32 * (int)v22; result = v34 * v23 + v19 + v33 * v21 + v35 * v25; for ( _RSI = 0LL; _RSI != v14; ++_RSI ) { __asm { vaddss xmm0, xmm1, dword ptr [rcx+rdi*4] vcvtps2ph xmm0, xmm0, 0 vpextrw word ptr [rdx+rsi*2], xmm0, 0 } } } ++v12; } while ( v12 != v20 ); } return result; }
ggml_compute_forward_add1_f16_f32: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RSI MOV R13,RDI MOV R15,qword ptr [RSI + 0x98] MOV R12,qword ptr [RSI + 0xa0] MOV RDI,R15 CALL 0x001089b0 TEST AL,AL JZ 0x001254c1 MOV RDI,R12 CALL 0x001089d0 TEST AL,AL JZ 0x001254e0 MOV RAX,qword ptr [R12 + 0xf8] VMOVD XMM0,dword ptr [RAX] VMOVD dword ptr [RSP + 0xc],XMM0 MOVSXD RBX,dword ptr [R13] MOV R13D,dword ptr [R13 + 0x4] MOV RDI,R15 CALL 0x001086d0 CMP dword ptr [R15],0x1 JNZ 0x001254ff CMP dword ptr [R12],0x0 JNZ 0x0012551b CMP dword ptr [R14],0x1 VMOVSS XMM1,dword ptr [RSP + 0xc] JNZ 0x00125537 CMP qword ptr [R14 + 0x30],0x2 JNZ 0x00125553 CMP qword ptr [R15 + 0x30],0x2 JNZ 0x0012556f MOV RCX,RAX ADD EAX,R13D DEC EAX CDQ IDIV R13D CDQE IMUL RBX,RAX ADD EAX,EBX CMP EAX,ECX CMOVGE EAX,ECX CMP EBX,EAX JGE 0x001254b2 MOV RCX,qword ptr [R15 + 0x38] MOV qword ptr [RSP + 0x30],RCX MOV RCX,qword ptr [R15 + 0x40] MOV qword ptr [RSP + 0x28],RCX MOV RCX,qword ptr [R15 + 0x48] MOV qword ptr [RSP + 0x20],RCX MOV R8,qword ptr [R14 + 0x10] MOV R9,qword ptr [R14 + 0x18] MOV RCX,qword ptr [R14 + 0x38] MOV qword ptr [RSP + 0x18],RCX MOV RCX,qword ptr [R14 + 0x40] MOV qword ptr [RSP + 0x10],RCX MOV R12,qword ptr [R14 + 0x48] MOV R13,qword ptr [R14 + 0x20] IMUL R13,R9 MOV R14,qword ptr [R14 + 0xf8] MOV R15,qword ptr [R15 + 0xf8] MOVSXD RBP,EAX MOV RCX,qword ptr [0x00148f68] LAB_00125421: MOV RAX,RBX CQO IDIV R13 MOVSXD R10,EAX MOV RDX,R13 IMUL RDX,R10 MOV RAX,RBX SUB RAX,RDX CQO IDIV R9 TEST R8,R8 JLE 0x001254a6 MOVSXD R11,EAX MOV RSI,R10 IMUL RSI,R12 MOV RDI,R11 IMUL RDI,qword ptr [RSP + 0x10] MOVSXD RAX,EDX MOV RDX,RAX IMUL RDX,qword ptr [RSP + 0x18] ADD RDX,RSI ADD RDX,R14 ADD RDX,RDI IMUL R10,qword ptr [RSP + 0x20] IMUL R11,qword ptr [RSP + 0x28] IMUL RAX,qword ptr [RSP + 0x30] ADD RAX,R10 ADD RAX,R15 ADD RAX,R11 XOR ESI,ESI LAB_00125488: MOVZX EDI,word ptr [RAX + RSI*0x2] VADDSS XMM0,XMM1,dword ptr [RCX + RDI*0x4] VCVTPS2PH XMM0,XMM0,0x0 VPEXTRW word ptr [RDX + RSI*0x2],XMM0,0x0 INC RSI CMP R8,RSI JNZ 0x00125488 LAB_001254a6: INC RBX CMP RBX,RBP JNZ 0x00125421 LAB_001254b2: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001254c1: LEA RDI,[0x1366c2] LEA RDX,[0x136721] LEA RCX,[0x136da7] MOV ESI,0x11bb JMP 0x00125589 LAB_001254e0: LEA RDI,[0x1366c2] LEA RDX,[0x136721] LEA RCX,[0x13702a] MOV ESI,0x11bc JMP 0x00125589 LAB_001254ff: LEA RDI,[0x1366c2] LEA RDX,[0x136721] LEA RCX,[0x136e33] MOV ESI,0x11c8 JMP 0x00125589 LAB_0012551b: LEA RDI,[0x1366c2] LEA RDX,[0x136721] LEA RCX,[0x136ea2] MOV ESI,0x11c9 JMP 0x00125589 LAB_00125537: LEA RDI,[0x1366c2] LEA RDX,[0x136721] LEA RCX,[0x138035] MOV ESI,0x11ca JMP 0x00125589 LAB_00125553: LEA RDI,[0x1366c2] LEA RDX,[0x136721] LEA RCX,[0x136e6b] MOV ESI,0x11cc JMP 0x00125589 LAB_0012556f: LEA RDI,[0x1366c2] LEA RDX,[0x136721] LEA RCX,[0x136e86] MOV ESI,0x11cd LAB_00125589: XOR EAX,EAX CALL 0x001089c0
void ggml_compute_forward_add1_f16_f32(int *param_1,int *param_2) { float fVar1; int iVar2; int *piVar3; int *piVar4; long lVar5; char cVar6; int iVar7; int iVar8; long lVar9; char *pcVar10; long lVar11; long lVar12; int8 uVar13; long lVar14; int1 auVar15 [16]; piVar3 = *(int **)(param_2 + 0x26); piVar4 = *(int **)(param_2 + 0x28); cVar6 = ggml_are_same_shape(piVar3); if (cVar6 == '\0') { pcVar10 = "ggml_are_same_shape(src0, dst)"; uVar13 = 0x11bb; } else { cVar6 = ggml_is_scalar(piVar4); if (cVar6 == '\0') { pcVar10 = "ggml_is_scalar(src1)"; uVar13 = 0x11bc; } else { fVar1 = **(float **)(piVar4 + 0x3e); iVar2 = *param_1; iVar8 = param_1[1]; iVar7 = ggml_nrows(piVar3); if (*piVar3 == 1) { if (*piVar4 == 0) { if (*param_2 == 1) { if (*(long *)(param_2 + 0xc) == 2) { if (*(long *)(piVar3 + 0xc) == 2) { iVar8 = (iVar7 + iVar8 + -1) / iVar8; lVar11 = (long)iVar2 * (long)iVar8; iVar8 = iVar8 + (int)lVar11; if (iVar7 <= iVar8) { iVar8 = iVar7; } if ((int)lVar11 < iVar8) { lVar5 = *(long *)(param_2 + 6); do { lVar14 = (long)(int)(lVar11 / (*(long *)(param_2 + 8) * lVar5)); lVar9 = lVar11 - *(long *)(param_2 + 8) * lVar5 * lVar14; if (0 < *(long *)(param_2 + 4)) { lVar12 = 0; do { auVar15 = vcvtps2ph_f16c(ZEXT416((uint)(fVar1 + *(float *)( PTR_ggml_table_f32_f16_00148f68 + (ulong)*(ushort *) ((long)(int)(lVar9 % lVar5) * *(long *)(piVar3 + 0xe) + lVar14 * *(long *)(piVar3 + 0x12) + *(long *)(piVar3 + 0x3e) + (long)(int)(lVar9 / lVar5) * *(long *)(piVar3 + 0x10) + lVar12 * 2) * 4))),0); vpextrw_avx(auVar15,0); lVar12 = lVar12 + 1; } while (*(long *)(param_2 + 4) != lVar12); } lVar11 = lVar11 + 1; } while (lVar11 != iVar8); } return; } pcVar10 = "nb00 == sizeof(ggml_fp16_t)"; uVar13 = 0x11cd; } else { pcVar10 = "nb0 == sizeof(ggml_fp16_t)"; uVar13 = 0x11cc; } } else { pcVar10 = "dst->type == GGML_TYPE_F16"; uVar13 = 0x11ca; } } else { pcVar10 = "src1->type == GGML_TYPE_F32"; uVar13 = 0x11c9; } } else { pcVar10 = "src0->type == GGML_TYPE_F16"; uVar13 = 0x11c8; } } } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,uVar13,"GGML_ASSERT(%s) failed",pcVar10); }
9,055
my_wc_mb_sjis
eloqsql/strings/ctype-sjis.c
static int my_wc_mb_sjis(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if ((int) wc < 0x80) /* ASCII: [U+0000..U+007F] -> [00-7F] */ { /* This branch is for performance purposes on ASCII range, to avoid using unicode_to_cp932[]: about 10% improvement. */ if (wc == 0x5c) { /* Special case when converting from Unicode to SJIS: U+005C -> [81][5F] FULL WIDTH REVERSE SOLIDUS */ code= MB2(0x815F); goto mb; } if (s >= e) return MY_CS_TOOSMALL; s[0]= (uchar) wc; /* ASCII */ return 1; } if (wc > 0xFFFF || !(code= unicode_to_sjis[wc])) /* Bad Unicode code point */ return MY_CS_ILUNI; if (code <= 0xFF) { /* JIS-X-0201 HALF WIDTH KATAKANA [U+FF61..U+FF9F] -> [A1..DF] */ if (s >= e) return MY_CS_TOOSMALL; s[0]= code; return 1; } mb: if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, code); /* JIS-X-0208 */ return 2; }
O0
c
my_wc_mb_sjis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x4e7c0 cmpq $0x5c, -0x18(%rbp) jne 0x4e792 movl $0x815f, -0x2c(%rbp) # imm = 0x815F jmp 0x4e81c movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x4e7a8 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x4e859 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x4e859 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x4e7e1 movq -0x18(%rbp), %rcx leaq 0x25437b(%rip), %rax # 0x2a2b50 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x4e7ea movl $0x0, -0x4(%rbp) jmp 0x4e859 cmpl $0xff, -0x2c(%rbp) jg 0x4e81a movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x4e806 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x4e859 movl -0x2c(%rbp), %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x4e859 jmp 0x4e81c movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x4e833 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x4e859 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nop
my_wc_mb_sjis: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp eax, 80h jge short loc_4E7C0 cmp [rbp+var_18], 5Ch ; '\' jnz short loc_4E792 mov [rbp+var_2C], 815Fh jmp loc_4E81C loc_4E792: mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_4E7A8 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_4E859 loc_4E7A8: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_4E859 loc_4E7C0: cmp [rbp+var_18], 0FFFFh ja short loc_4E7E1 mov rcx, [rbp+var_18] lea rax, unicode_to_sjis movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_4E7EA loc_4E7E1: mov [rbp+var_4], 0 jmp short loc_4E859 loc_4E7EA: cmp [rbp+var_2C], 0FFh jg short loc_4E81A mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_4E806 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_4E859 loc_4E806: mov eax, [rbp+var_2C] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp short loc_4E859 loc_4E81A: jmp short $+2 loc_4E81C: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_4E833 mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_4E859 loc_4E833: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 loc_4E859: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_sjis(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { __int16 v5; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 > 0xFFFF || (v5 = unicode_to_sjis[a2]) == 0 ) return 0; if ( unicode_to_sjis[a2] > 0xFFu ) goto LABEL_14; if ( (unsigned long long)a3 < a4 ) { *a3 = v5; return 1; } else { return (unsigned int)-101; } } else { if ( a2 == 92 ) { v5 = -32417; LABEL_14: if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } } }
my_wc_mb_sjis: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JGE 0x0014e7c0 CMP qword ptr [RBP + -0x18],0x5c JNZ 0x0014e792 MOV dword ptr [RBP + -0x2c],0x815f JMP 0x0014e81c LAB_0014e792: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0014e7a8 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0014e859 LAB_0014e7a8: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014e859 LAB_0014e7c0: CMP qword ptr [RBP + -0x18],0xffff JA 0x0014e7e1 MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x3a2b50] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x0014e7ea LAB_0014e7e1: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014e859 LAB_0014e7ea: CMP dword ptr [RBP + -0x2c],0xff JG 0x0014e81a MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0014e806 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0014e859 LAB_0014e806: MOV EAX,dword ptr [RBP + -0x2c] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014e859 LAB_0014e81a: JMP 0x0014e81c LAB_0014e81c: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0014e833 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x0014e859 LAB_0014e833: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 LAB_0014e859: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_sjis(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { ushort local_34; int4 local_c; if ((int)param_2 < 0x80) { if (param_2 != 0x5c) { if (param_4 <= param_3) { return 0xffffff9b; } *param_3 = (char)param_2; return 1; } local_34 = 0x815f; } else { if ((0xffff < param_2) || (local_34 = *(ushort *)(unicode_to_sjis + param_2 * 2), local_34 == 0) ) { return 0; } if (local_34 < 0x100) { if (param_4 <= param_3) { return 0xffffff9b; } *param_3 = (char)local_34; return 1; } } if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)(local_34 >> 8); param_3[1] = (char)local_34; local_c = 2; } return local_c; }
9,056
js_atomics_get_ptr
bluesky950520[P]quickjs/quickjs.c
static void *js_atomics_get_ptr(JSContext *ctx, JSArrayBuffer **pabuf, int *psize_log2, JSClassID *pclass_id, JSValue obj, JSValue idx_val, int is_waitable) { JSObject *p; JSTypedArray *ta; JSArrayBuffer *abuf; void *ptr; uint64_t idx; BOOL err; int size_log2; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) goto fail; p = JS_VALUE_GET_OBJ(obj); if (is_waitable) err = (p->class_id != JS_CLASS_INT32_ARRAY && p->class_id != JS_CLASS_BIG_INT64_ARRAY); else err = !(p->class_id >= JS_CLASS_INT8_ARRAY && p->class_id <= JS_CLASS_BIG_UINT64_ARRAY); if (err) { fail: JS_ThrowTypeError(ctx, "integer TypedArray expected"); return NULL; } ta = p->u.typed_array; abuf = ta->buffer->u.array_buffer; if (!abuf->shared) { if (is_waitable == 2) { JS_ThrowTypeError(ctx, "not a SharedArrayBuffer TypedArray"); return NULL; } if (abuf->detached) { JS_ThrowTypeErrorDetachedArrayBuffer(ctx); return NULL; } } if (JS_ToIndex(ctx, &idx, idx_val)) { return NULL; } /* if the array buffer is detached, p->u.array.count = 0 */ if (idx >= p->u.array.count) { JS_ThrowRangeError(ctx, "out-of-bound access"); return NULL; } size_log2 = typed_array_size_log2(p->class_id); ptr = p->u.array.u.uint8_ptr + ((uintptr_t)idx << size_log2); if (pabuf) *pabuf = abuf; if (psize_log2) *psize_log2 = size_log2; if (pclass_id) *pclass_id = p->class_id; return ptr; }
O1
c
js_atomics_get_ptr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r15 movq %r8, 0x10(%rsp) cmpl $-0x1, %r9d jne 0x7fa33 movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r12 movl 0x60(%rsp), %eax movq 0x10(%rsp), %rbp movzwl 0x6(%rbp), %ecx testl %eax, %eax je 0x7fa25 addl $-0x1a, %ecx testl $0xfffd, %ecx # imm = 0xFFFD setne %cl jmp 0x7fa2f addl $-0x1e, %ecx cmpw $-0x8, %cx setb %cl testb %cl, %cl je 0x7fa59 leaq 0x22a76(%rip), %rsi # 0xa24b0 xorl %r13d, %r13d movq %r15, %rdi xorl %eax, %eax callq 0x22567 movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x30(%rbp), %rcx movq 0x18(%rcx), %rcx movq 0x30(%rcx), %r13 cmpb $0x0, 0x9(%r13) je 0x7fa8e leaq 0x50(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x8(%rsp), %rsi movq %r15, %rdi callq 0x27a6f testl %eax, %eax je 0x7fa9c xorl %r13d, %r13d jmp 0x7fa47 cmpl $0x2, %eax jne 0x7fae8 leaq 0x22a32(%rip), %rsi # 0xa24cc jmp 0x7fa3a movq %r13, %rdx movq 0x8(%rsp), %r13 movl 0x40(%rbp), %eax cmpq %rax, %r13 jae 0x7faff movzwl 0x6(%rbp), %eax leaq 0x1de28(%rip), %rcx # 0x9d8df movzbl -0x15(%rax,%rcx), %ecx shlq %cl, %r13 addq 0x38(%rbp), %r13 testq %r12, %r12 je 0x7facc movq %rdx, (%r12) testq %r14, %r14 je 0x7fad4 movl %ecx, (%r14) testq %rbx, %rbx je 0x7fa47 movzwl 0x6(%rbp), %eax movl %eax, (%rbx) jmp 0x7fa47 cmpb $0x0, 0x8(%r13) je 0x7fa6c leaq 0x228ff(%rip), %rsi # 0xa23f9 jmp 0x7fa3a leaq 0x229e9(%rip), %rsi # 0xa24ef xorl %r13d, %r13d movq %r15, %rdi xorl %eax, %eax callq 0x20add jmp 0x7fa47
js_atomics_get_ptr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rdi mov [rsp+48h+var_38], r8 cmp r9d, 0FFFFFFFFh jnz short loc_7FA33 mov rbx, rcx mov r14, rdx mov r12, rsi mov eax, [rsp+48h+arg_10] mov rbp, [rsp+48h+var_38] movzx ecx, word ptr [rbp+6] test eax, eax jz short loc_7FA25 add ecx, 0FFFFFFE6h test ecx, 0FFFDh setnz cl jmp short loc_7FA2F loc_7FA25: add ecx, 0FFFFFFE2h cmp cx, 0FFF8h setb cl loc_7FA2F: test cl, cl jz short loc_7FA59 loc_7FA33: lea rsi, aIntegerTypedar; "integer TypedArray expected" loc_7FA3A: xor r13d, r13d mov rdi, r15 xor eax, eax call JS_ThrowTypeError loc_7FA47: mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7FA59: mov rcx, [rbp+30h] mov rcx, [rcx+18h] mov r13, [rcx+30h] cmp byte ptr [r13+9], 0 jz short loc_7FA8E loc_7FA6C: lea rax, [rsp+48h+arg_0] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+48h+var_40] mov rdi, r15 call JS_ToIndex test eax, eax jz short loc_7FA9C xor r13d, r13d jmp short loc_7FA47 loc_7FA8E: cmp eax, 2 jnz short loc_7FAE8 lea rsi, aNotASharedarra; "not a SharedArrayBuffer TypedArray" jmp short loc_7FA3A loc_7FA9C: mov rdx, r13 mov r13, [rsp+48h+var_40] mov eax, [rbp+40h] cmp r13, rax jnb short loc_7FAFF movzx eax, word ptr [rbp+6] lea rcx, typed_array_size_log2 movzx ecx, byte ptr [rax+rcx-15h] shl r13, cl add r13, [rbp+38h] test r12, r12 jz short loc_7FACC mov [r12], rdx loc_7FACC: test r14, r14 jz short loc_7FAD4 mov [r14], ecx loc_7FAD4: test rbx, rbx jz loc_7FA47 movzx eax, word ptr [rbp+6] mov [rbx], eax jmp loc_7FA47 loc_7FAE8: cmp byte ptr [r13+8], 0 jz loc_7FA6C lea rsi, aArraybufferIsD; "ArrayBuffer is detached" jmp loc_7FA3A loc_7FAFF: lea rsi, aOutOfBoundAcce; "out-of-bound access" xor r13d, r13d mov rdi, r15 xor eax, eax call JS_ThrowRangeError jmp loc_7FA47
unsigned long long js_atomics_get_ptr( long long a1, long long *a2, _DWORD *a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, long long a15, long long a16, int a17) { _DWORD *v17; // rbx long long v19; // rbp int v20; // ecx const char *v21; // rsi unsigned long long v22; // r13 long long v24; // r13 long long v25; // rcx long long v26; // r8 long long v27; // r9 __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rdx int v31; // ecx char v32; // [rsp+0h] [rbp-48h] unsigned long long v33; // [rsp+8h] [rbp-40h] BYREF long long v34; // [rsp+10h] [rbp-38h] v34 = a5; if ( (_DWORD)a6 != -1 || ((v17 = (_DWORD *)a4, v19 = v34, v20 = *(unsigned __int16 *)(v34 + 6), !a17) ? (a4 = (unsigned int)(v20 - 30), LOBYTE(a4) = (unsigned __int16)a4 < 0xFFF8u) : (a4 = (unsigned int)(v20 - 26), LOBYTE(a4) = (a4 & 0xFFFD) != 0), (_BYTE)a4) ) { v21 = "integer TypedArray expected"; LABEL_7: v22 = 0LL; JS_ThrowTypeError(a1, (long long)v21, (long long)a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v32); return v22; } a4 = *(_QWORD *)(*(_QWORD *)(v34 + 48) + 24LL); v24 = *(_QWORD *)(a4 + 48); if ( !*(_BYTE *)(v24 + 9) ) { if ( a17 == 2 ) { v21 = "not a SharedArrayBuffer TypedArray"; goto LABEL_7; } if ( *(_BYTE *)(v24 + 8) ) { v21 = "ArrayBuffer is detached"; goto LABEL_7; } } if ( (unsigned int)JS_ToIndex( a1, &v33, a15, a16, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14) ) return 0LL; v30 = v24; if ( v33 >= *(unsigned int *)(v19 + 64) ) { v22 = 0LL; JS_ThrowRangeError(a1, (long long)"out-of-bound access", v30, v25, v26, v27, a7, a8, a9, a10, v28, v29, a13, a14, v32); } else { v31 = (unsigned __int8)typed_array_size_log2[*(unsigned __int16 *)(v19 + 6) - 21]; v22 = *(_QWORD *)(v19 + 56) + (v33 << v31); if ( a2 ) *a2 = v30; if ( a3 ) *a3 = v31; if ( v17 ) *v17 = *(unsigned __int16 *)(v19 + 6); } return v22; }
js_atomics_get_ptr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDI MOV qword ptr [RSP + 0x10],R8 CMP R9D,-0x1 JNZ 0x0017fa33 MOV RBX,RCX MOV R14,RDX MOV R12,RSI MOV EAX,dword ptr [RSP + 0x60] MOV RBP,qword ptr [RSP + 0x10] MOVZX ECX,word ptr [RBP + 0x6] TEST EAX,EAX JZ 0x0017fa25 ADD ECX,-0x1a TEST ECX,0xfffd SETNZ CL JMP 0x0017fa2f LAB_0017fa25: ADD ECX,-0x1e CMP CX,-0x8 SETC CL LAB_0017fa2f: TEST CL,CL JZ 0x0017fa59 LAB_0017fa33: LEA RSI,[0x1a24b0] LAB_0017fa3a: XOR R13D,R13D MOV RDI,R15 XOR EAX,EAX CALL 0x00122567 LAB_0017fa47: MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017fa59: MOV RCX,qword ptr [RBP + 0x30] MOV RCX,qword ptr [RCX + 0x18] MOV R13,qword ptr [RCX + 0x30] CMP byte ptr [R13 + 0x9],0x0 JZ 0x0017fa8e LAB_0017fa6c: LEA RAX,[RSP + 0x50] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x8] MOV RDI,R15 CALL 0x00127a6f TEST EAX,EAX JZ 0x0017fa9c XOR R13D,R13D JMP 0x0017fa47 LAB_0017fa8e: CMP EAX,0x2 JNZ 0x0017fae8 LEA RSI,[0x1a24cc] JMP 0x0017fa3a LAB_0017fa9c: MOV RDX,R13 MOV R13,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RBP + 0x40] CMP R13,RAX JNC 0x0017faff MOVZX EAX,word ptr [RBP + 0x6] LEA RCX,[0x19d8df] MOVZX ECX,byte ptr [RAX + RCX*0x1 + -0x15] SHL R13,CL ADD R13,qword ptr [RBP + 0x38] TEST R12,R12 JZ 0x0017facc MOV qword ptr [R12],RDX LAB_0017facc: TEST R14,R14 JZ 0x0017fad4 MOV dword ptr [R14],ECX LAB_0017fad4: TEST RBX,RBX JZ 0x0017fa47 MOVZX EAX,word ptr [RBP + 0x6] MOV dword ptr [RBX],EAX JMP 0x0017fa47 LAB_0017fae8: CMP byte ptr [R13 + 0x8],0x0 JZ 0x0017fa6c LEA RSI,[0x1a23f9] JMP 0x0017fa3a LAB_0017faff: LEA RSI,[0x1a24ef] XOR R13D,R13D MOV RDI,R15 XOR EAX,EAX CALL 0x00120add JMP 0x0017fa47
long js_atomics_get_ptr(int8 param_1,long *param_2,uint *param_3,uint *param_4,long param_5, int param_6,int8 param_7,int8 param_8,int param_9) { byte bVar1; long lVar2; int iVar3; char *pcVar4; long lVar5; bool bVar6; ulong local_40; long local_38; local_38 = param_5; if (param_6 == -1) { if (param_9 == 0) { bVar6 = (ushort)(*(short *)(param_5 + 6) - 0x1eU) < 0xfff8; } else { bVar6 = (*(short *)(param_5 + 6) - 0x1aU & 0xfffd) != 0; } if (!bVar6) { lVar2 = *(long *)(*(long *)(*(long *)(param_5 + 0x30) + 0x18) + 0x30); if (*(char *)(lVar2 + 9) != '\0') { LAB_0017fa6c: iVar3 = JS_ToIndex(param_1,&local_40,param_7,param_8); if (iVar3 != 0) { return 0; } if (local_40 < *(uint *)(param_5 + 0x40)) { bVar1 = "toSorted"[(ulong)*(ushort *)(param_5 + 6) + 6]; lVar5 = (local_40 << (bVar1 & 0x3f)) + *(long *)(param_5 + 0x38); if (param_2 != (long *)0x0) { *param_2 = lVar2; } if (param_3 != (uint *)0x0) { *param_3 = (uint)bVar1; } if (param_4 == (uint *)0x0) { return lVar5; } *param_4 = (uint)*(ushort *)(param_5 + 6); return lVar5; } JS_ThrowRangeError(param_1,"out-of-bound access"); return 0; } if (param_9 == 2) { pcVar4 = "not a SharedArrayBuffer TypedArray"; } else { if (*(char *)(lVar2 + 8) == '\0') goto LAB_0017fa6c; pcVar4 = "ArrayBuffer is detached"; } goto LAB_0017fa3a; } } pcVar4 = "integer TypedArray expected"; LAB_0017fa3a: JS_ThrowTypeError(param_1,pcVar4); return 0; }
9,057
js_atomics_get_ptr
bluesky950520[P]quickjs/quickjs.c
static void *js_atomics_get_ptr(JSContext *ctx, JSArrayBuffer **pabuf, int *psize_log2, JSClassID *pclass_id, JSValue obj, JSValue idx_val, int is_waitable) { JSObject *p; JSTypedArray *ta; JSArrayBuffer *abuf; void *ptr; uint64_t idx; BOOL err; int size_log2; if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) goto fail; p = JS_VALUE_GET_OBJ(obj); if (is_waitable) err = (p->class_id != JS_CLASS_INT32_ARRAY && p->class_id != JS_CLASS_BIG_INT64_ARRAY); else err = !(p->class_id >= JS_CLASS_INT8_ARRAY && p->class_id <= JS_CLASS_BIG_UINT64_ARRAY); if (err) { fail: JS_ThrowTypeError(ctx, "integer TypedArray expected"); return NULL; } ta = p->u.typed_array; abuf = ta->buffer->u.array_buffer; if (!abuf->shared) { if (is_waitable == 2) { JS_ThrowTypeError(ctx, "not a SharedArrayBuffer TypedArray"); return NULL; } if (abuf->detached) { JS_ThrowTypeErrorDetachedArrayBuffer(ctx); return NULL; } } if (JS_ToIndex(ctx, &idx, idx_val)) { return NULL; } /* if the array buffer is detached, p->u.array.count = 0 */ if (idx >= p->u.array.count) { JS_ThrowRangeError(ctx, "out-of-bound access"); return NULL; } size_log2 = typed_array_size_log2(p->class_id); ptr = p->u.array.u.uint8_ptr + ((uintptr_t)idx << size_log2); if (pabuf) *pabuf = abuf; if (psize_log2) *psize_log2 = size_log2; if (pclass_id) *pclass_id = p->class_id; return ptr; }
O2
c
js_atomics_get_ptr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r12 cmpl $-0x1, %r9d jne 0x6b4b5 movq %r8, %r14 movq %rcx, %rbx movq %rdx, %r15 movq %rsi, %r13 movl 0x50(%rsp), %eax movzwl 0x6(%r8), %edx testl %eax, %eax je 0x6b4a4 cmpw $0x1c, %dx setne %cl cmpw $0x1a, %dx jne 0x6b4b1 jmp 0x6b4da cmpw $0x1e, %dx setae %cl cmpw $0x16, %dx jb 0x6b4b5 testb %cl, %cl je 0x6b4da leaq 0x1df2e(%rip), %rsi # 0x893ea xorl %ebp, %ebp movq %r12, %rdi xorl %eax, %eax callq 0x1c64d movq %rbp, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x30(%r14), %rcx movq 0x18(%rcx), %rcx movq 0x30(%rcx), %rbp cmpb $0x0, 0x9(%rbp) je 0x6b551 leaq 0x40(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx movq %rsp, %rsi movq %r12, %rdi callq 0x21680 testl %eax, %eax jne 0x6b570 movq %rbp, %rdx movq (%rsp), %rbp movl 0x40(%r14), %eax cmpq %rax, %rbp jae 0x6b577 movzwl 0x6(%r14), %eax leaq 0x1935c(%rip), %rcx # 0x8487f movzbl -0x15(%rax,%rcx), %ecx shlq %cl, %rbp addq 0x38(%r14), %rbp testq %r13, %r13 je 0x6b538 movq %rdx, (%r13) testq %r15, %r15 je 0x6b540 movl %ecx, (%r15) testq %rbx, %rbx je 0x6b4c8 movzwl 0x6(%r14), %eax movl %eax, (%rbx) jmp 0x6b4c8 cmpl $0x2, %eax jne 0x6b562 leaq 0x1dea9(%rip), %rsi # 0x89406 jmp 0x6b4bc cmpb $0x0, 0x8(%rbp) je 0x6b4ec movq %r12, %rdi callq 0x32121 xorl %ebp, %ebp jmp 0x6b4c8 leaq 0x1deab(%rip), %rsi # 0x89429 xorl %ebp, %ebp movq %r12, %rdi xorl %eax, %eax callq 0x1acb3 jmp 0x6b4c8
js_atomics_get_ptr: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rdi cmp r9d, 0FFFFFFFFh jnz short loc_6B4B5 mov r14, r8 mov rbx, rcx mov r15, rdx mov r13, rsi mov eax, [rsp+38h+arg_10] movzx edx, word ptr [r8+6] test eax, eax jz short loc_6B4A4 cmp dx, 1Ch setnz cl cmp dx, 1Ah jnz short loc_6B4B1 jmp short loc_6B4DA loc_6B4A4: cmp dx, 1Eh setnb cl cmp dx, 16h jb short loc_6B4B5 loc_6B4B1: test cl, cl jz short loc_6B4DA loc_6B4B5: lea rsi, aIntegerTypedar; "integer TypedArray expected" loc_6B4BC: xor ebp, ebp mov rdi, r12 xor eax, eax call JS_ThrowTypeError loc_6B4C8: mov rax, rbp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6B4DA: mov rcx, [r14+30h] mov rcx, [rcx+18h] mov rbp, [rcx+30h] cmp byte ptr [rbp+9], 0 jz short loc_6B551 loc_6B4EC: lea rax, [rsp+38h+arg_0] mov rdx, [rax] mov rcx, [rax+8] mov rsi, rsp mov rdi, r12 call JS_ToIndex test eax, eax jnz short loc_6B570 mov rdx, rbp mov rbp, [rsp+38h+var_38] mov eax, [r14+40h] cmp rbp, rax jnb short loc_6B577 movzx eax, word ptr [r14+6] lea rcx, typed_array_size_log2 movzx ecx, byte ptr [rax+rcx-15h] shl rbp, cl add rbp, [r14+38h] test r13, r13 jz short loc_6B538 mov [r13+0], rdx loc_6B538: test r15, r15 jz short loc_6B540 mov [r15], ecx loc_6B540: test rbx, rbx jz short loc_6B4C8 movzx eax, word ptr [r14+6] mov [rbx], eax jmp loc_6B4C8 loc_6B551: cmp eax, 2 jnz short loc_6B562 lea rsi, aNotASharedarra; "not a SharedArrayBuffer TypedArray" jmp loc_6B4BC loc_6B562: cmp byte ptr [rbp+8], 0 jz short loc_6B4EC mov rdi, r12 call JS_ThrowTypeErrorDetachedArrayBuffer loc_6B570: xor ebp, ebp jmp loc_6B4C8 loc_6B577: lea rsi, aOutOfBoundAcce; "out-of-bound access" xor ebp, ebp mov rdi, r12 xor eax, eax call JS_ThrowRangeError jmp loc_6B4C8
unsigned long long js_atomics_get_ptr( 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, _DWORD *a15, unsigned int a16, int a17) { unsigned long long v17; // rax _DWORD *v19; // rbx _DWORD *v20; // r15 const char *v21; // rsi unsigned long long v22; // rbp long long v24; // rbp long long v25; // rcx long long v26; // r8 long long v27; // r9 __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rdx int v31; // ecx unsigned long long v32[7]; // [rsp+0h] [rbp-38h] BYREF v32[0] = v17; if ( (_DWORD)a6 != -1 ) goto LABEL_7; v19 = (_DWORD *)a4; v20 = (_DWORD *)a3; a3 = *(unsigned __int16 *)(a5 + 6); if ( !a17 ) { LOBYTE(a4) = (unsigned __int16)a3 >= 0x1Eu; if ( (unsigned __int16)a3 < 0x16u ) goto LABEL_7; goto LABEL_6; } LOBYTE(a4) = (_WORD)a3 != 28; if ( (_WORD)a3 != 26 ) { LABEL_6: if ( !(_BYTE)a4 ) goto LABEL_10; LABEL_7: v21 = "integer TypedArray expected"; LABEL_8: v22 = 0LL; JS_ThrowTypeError(a1, (long long)v21, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v32[0]); return v22; } LABEL_10: a4 = *(_QWORD *)(*(_QWORD *)(a5 + 48) + 24LL); v24 = *(_QWORD *)(a4 + 48); if ( *(_BYTE *)(v24 + 9) ) goto LABEL_11; if ( a17 == 2 ) { v21 = "not a SharedArrayBuffer TypedArray"; goto LABEL_8; } if ( *(_BYTE *)(v24 + 8) ) { JS_ThrowTypeErrorDetachedArrayBuffer(a1, a7, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, a5, a6, v32[0]); return 0LL; } LABEL_11: if ( (unsigned int)JS_ToIndex( a1, v32, a15, a16, a7, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14) ) return 0LL; v30 = v24; if ( v32[0] >= *(unsigned int *)(a5 + 64) ) { v22 = 0LL; JS_ThrowRangeError( a1, (long long)"out-of-bound access", v30, v25, v26, v27, a7, a8, a9, a10, v28, v29, a13, a14, v32[0]); } else { v31 = (unsigned __int8)typed_array_size_log2[*(unsigned __int16 *)(a5 + 6) - 21]; v22 = *(_QWORD *)(a5 + 56) + (v32[0] << v31); if ( a2 ) *a2 = v30; if ( v20 ) *v20 = v31; if ( v19 ) *v19 = *(unsigned __int16 *)(a5 + 6); } return v22; }
js_atomics_get_ptr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RDI CMP R9D,-0x1 JNZ 0x0016b4b5 MOV R14,R8 MOV RBX,RCX MOV R15,RDX MOV R13,RSI MOV EAX,dword ptr [RSP + 0x50] MOVZX EDX,word ptr [R8 + 0x6] TEST EAX,EAX JZ 0x0016b4a4 CMP DX,0x1c SETNZ CL CMP DX,0x1a JNZ 0x0016b4b1 JMP 0x0016b4da LAB_0016b4a4: CMP DX,0x1e SETNC CL CMP DX,0x16 JC 0x0016b4b5 LAB_0016b4b1: TEST CL,CL JZ 0x0016b4da LAB_0016b4b5: LEA RSI,[0x1893ea] LAB_0016b4bc: XOR EBP,EBP MOV RDI,R12 XOR EAX,EAX CALL 0x0011c64d LAB_0016b4c8: MOV RAX,RBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016b4da: MOV RCX,qword ptr [R14 + 0x30] MOV RCX,qword ptr [RCX + 0x18] MOV RBP,qword ptr [RCX + 0x30] CMP byte ptr [RBP + 0x9],0x0 JZ 0x0016b551 LAB_0016b4ec: LEA RAX,[RSP + 0x40] MOV RDX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] MOV RSI,RSP MOV RDI,R12 CALL 0x00121680 TEST EAX,EAX JNZ 0x0016b570 MOV RDX,RBP MOV RBP,qword ptr [RSP] MOV EAX,dword ptr [R14 + 0x40] CMP RBP,RAX JNC 0x0016b577 MOVZX EAX,word ptr [R14 + 0x6] LEA RCX,[0x18487f] MOVZX ECX,byte ptr [RAX + RCX*0x1 + -0x15] SHL RBP,CL ADD RBP,qword ptr [R14 + 0x38] TEST R13,R13 JZ 0x0016b538 MOV qword ptr [R13],RDX LAB_0016b538: TEST R15,R15 JZ 0x0016b540 MOV dword ptr [R15],ECX LAB_0016b540: TEST RBX,RBX JZ 0x0016b4c8 MOVZX EAX,word ptr [R14 + 0x6] MOV dword ptr [RBX],EAX JMP 0x0016b4c8 LAB_0016b551: CMP EAX,0x2 JNZ 0x0016b562 LEA RSI,[0x189406] JMP 0x0016b4bc LAB_0016b562: CMP byte ptr [RBP + 0x8],0x0 JZ 0x0016b4ec MOV RDI,R12 CALL 0x00132121 LAB_0016b570: XOR EBP,EBP JMP 0x0016b4c8 LAB_0016b577: LEA RSI,[0x189429] XOR EBP,EBP MOV RDI,R12 XOR EAX,EAX CALL 0x0011acb3 JMP 0x0016b4c8
long js_atomics_get_ptr(int8 param_1,long *param_2,uint *param_3,uint *param_4,long param_5, int param_6,int8 param_7,int8 param_8,int param_9) { byte bVar1; ushort uVar2; long lVar3; int iVar4; ulong in_RAX; long lVar5; char *pcVar6; bool bVar7; ulong local_38; if (param_6 == -1) { uVar2 = *(ushort *)(param_5 + 6); if (param_9 != 0) { bVar7 = uVar2 != 0x1c; if (uVar2 != 0x1a) goto LAB_0016b4b1; LAB_0016b4da: lVar3 = *(long *)(*(long *)(*(long *)(param_5 + 0x30) + 0x18) + 0x30); if (*(char *)(lVar3 + 9) != '\0') { LAB_0016b4ec: local_38 = in_RAX; iVar4 = JS_ToIndex(param_1,&local_38,param_7,param_8); if (iVar4 != 0) { return 0; } if (local_38 < *(uint *)(param_5 + 0x40)) { bVar1 = "toSorted"[(ulong)*(ushort *)(param_5 + 6) + 6]; lVar5 = (local_38 << (bVar1 & 0x3f)) + *(long *)(param_5 + 0x38); if (param_2 != (long *)0x0) { *param_2 = lVar3; } if (param_3 != (uint *)0x0) { *param_3 = (uint)bVar1; } if (param_4 != (uint *)0x0) { *param_4 = (uint)*(ushort *)(param_5 + 6); return lVar5; } return lVar5; } JS_ThrowRangeError(param_1,"out-of-bound access"); return 0; } if (param_9 != 2) { if (*(char *)(lVar3 + 8) != '\0') { JS_ThrowTypeErrorDetachedArrayBuffer(param_1); return 0; } goto LAB_0016b4ec; } pcVar6 = "not a SharedArrayBuffer TypedArray"; goto LAB_0016b4bc; } bVar7 = 0x1d < uVar2; if (0x15 < uVar2) { LAB_0016b4b1: if (!bVar7) goto LAB_0016b4da; } } pcVar6 = "integer TypedArray expected"; LAB_0016b4bc: JS_ThrowTypeError(param_1,pcVar6); return 0; }
9,058
mbedtls_ctr_drbg_reseed_internal
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/ctr_drbg.c
static int mbedtls_ctr_drbg_reseed_internal(mbedtls_ctr_drbg_context *ctx, const unsigned char *additional, size_t len, size_t nonce_len) { unsigned char seed[MBEDTLS_CTR_DRBG_MAX_SEED_INPUT]; size_t seedlen = 0; int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; if (ctx->entropy_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT) { return MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG; } if (nonce_len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len) { return MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG; } if (len > MBEDTLS_CTR_DRBG_MAX_SEED_INPUT - ctx->entropy_len - nonce_len) { return MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG; } memset(seed, 0, MBEDTLS_CTR_DRBG_MAX_SEED_INPUT); /* Gather entropy_len bytes of entropy to seed state. */ if (0 != ctx->f_entropy(ctx->p_entropy, seed, ctx->entropy_len)) { return MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED; } seedlen += ctx->entropy_len; /* Gather entropy for a nonce if requested. */ if (nonce_len != 0) { if (0 != ctx->f_entropy(ctx->p_entropy, seed + seedlen, nonce_len)) { return MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED; } seedlen += nonce_len; } /* Add additional data if provided. */ if (additional != NULL && len != 0) { memcpy(seed + seedlen, additional, len); seedlen += len; } /* Reduce to 384 bits. */ if ((ret = block_cipher_df(seed, seed, seedlen)) != 0) { goto exit; } /* Update state. */ if ((ret = ctr_drbg_update_internal(ctx, seed)) != 0) { goto exit; } ctx->reseed_counter = 1; exit: mbedtls_platform_zeroize(seed, sizeof(seed)); return ret; }
O3
c
mbedtls_ctr_drbg_reseed_internal: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x188, %rsp # imm = 0x188 movq 0x18(%rdi), %r13 movl $0xffffffc8, %ebp # imm = 0xFFFFFFC8 cmpq $0x180, %r13 # imm = 0x180 ja 0x830ac movq %rcx, %r12 movq %rdx, %r14 movl $0x180, %eax # imm = 0x180 subq %r13, %rax subq %rcx, %rax setb %cl cmpq %rdx, %rax setb %al orb %cl, %al jne 0x830ac movq %rsi, %r15 movq %rdi, %rbx movq %rsp, %rbp movl $0x180, %edx # imm = 0x180 movq %rbp, %rdi xorl %esi, %esi callq 0xf2b0 movq 0x150(%rbx), %rdi movq %rbp, %rsi movq %r13, %rdx callq *0x148(%rbx) movl $0xffffffcc, %ebp # imm = 0xFFFFFFCC testl %eax, %eax jne 0x830ac movq 0x18(%rbx), %r13 testq %r12, %r12 je 0x8305a movq 0x150(%rbx), %rdi leaq (%rsp,%r13), %rsi movq %r12, %rdx callq *0x148(%rbx) testl %eax, %eax jne 0x830ac addq %r12, %r13 testq %r15, %r15 sete %al testq %r14, %r14 sete %cl orb %al, %cl jne 0x8307c leaq (%rsp,%r13), %rdi movq %r15, %rsi movq %r14, %rdx callq 0xf3a0 addq %r14, %r13 movq %rsp, %rdi movq %rdi, %rsi movq %r13, %rdx callq 0x82ca1 testl %eax, %eax jne 0x8309d movq %rsp, %rsi movq %rbx, %rdi callq 0x82edd testl %eax, %eax je 0x830c0 movl %eax, %ebp movq %rsp, %rdi movl $0x180, %esi # imm = 0x180 callq 0x8db8c movl %ebp, %eax addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, 0x10(%rbx) xorl %ebp, %ebp jmp 0x8309f
mbedtls_ctr_drbg_reseed_internal: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 188h mov r13, [rdi+18h] mov ebp, 0FFFFFFC8h cmp r13, 180h ja loc_830AC mov r12, rcx mov r14, rdx mov eax, 180h sub rax, r13 sub rax, rcx setb cl cmp rax, rdx setb al or al, cl jnz loc_830AC mov r15, rsi mov rbx, rdi mov rbp, rsp mov edx, 180h mov rdi, rbp xor esi, esi call _memset mov rdi, [rbx+150h] mov rsi, rbp mov rdx, r13 call qword ptr [rbx+148h] mov ebp, 0FFFFFFCCh test eax, eax jnz short loc_830AC mov r13, [rbx+18h] test r12, r12 jz short loc_8305A mov rdi, [rbx+150h] lea rsi, [rsp+r13+1B8h+var_1B8] mov rdx, r12 call qword ptr [rbx+148h] test eax, eax jnz short loc_830AC add r13, r12 loc_8305A: test r15, r15 setz al test r14, r14 setz cl or cl, al jnz short loc_8307C lea rdi, [rsp+r13+1B8h+var_1B8] mov rsi, r15 mov rdx, r14 call _memcpy add r13, r14 loc_8307C: mov rdi, rsp mov rsi, rdi mov rdx, r13 call block_cipher_df test eax, eax jnz short loc_8309D mov rsi, rsp mov rdi, rbx call ctr_drbg_update_internal test eax, eax jz short loc_830C0 loc_8309D: mov ebp, eax loc_8309F: mov rdi, rsp mov esi, 180h call mbedtls_platform_zeroize loc_830AC: mov eax, ebp add rsp, 188h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_830C0: mov dword ptr [rbx+10h], 1 xor ebp, ebp jmp short loc_8309F
long long mbedtls_ctr_drbg_reseed_internal(long long a1, long long a2, unsigned long long a3, unsigned long long a4) { unsigned long long v4; // r13 unsigned int v5; // ebp unsigned long long v8; // r13 unsigned int updated; // eax _OWORD v11[27]; // [rsp+0h] [rbp-1B8h] BYREF v4 = *(_QWORD *)(a1 + 24); v5 = -56; if ( v4 <= 0x180 && 384 - v4 >= a4 && 384 - v4 - a4 >= a3 ) { memset(v11, 0LL, 384LL); v5 = -52; if ( !(*(unsigned int ( **)(_QWORD, _OWORD *, unsigned long long))(a1 + 328))( *(_QWORD *)(a1 + 336), v11, v4) ) { v8 = *(_QWORD *)(a1 + 24); if ( a4 ) { if ( (*(unsigned int ( **)(_QWORD, char *, unsigned long long))(a1 + 328))( *(_QWORD *)(a1 + 336), (char *)v11 + v8, a4) ) { return v5; } v8 += a4; } if ( a2 != 0 && a3 != 0 ) { memcpy((char *)v11 + v8, a2, a3); v8 += a3; } updated = block_cipher_df(v11, (long long)v11, v8); if ( updated || (updated = ctr_drbg_update_internal((_DWORD *)a1, (long long)v11)) != 0 ) { v5 = updated; } else { *(_DWORD *)(a1 + 16) = 1; v5 = 0; } mbedtls_platform_zeroize(v11, 384LL); } } return v5; }
mbedtls_ctr_drbg_reseed_internal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x188 MOV R13,qword ptr [RDI + 0x18] MOV EBP,0xffffffc8 CMP R13,0x180 JA 0x001830ac MOV R12,RCX MOV R14,RDX MOV EAX,0x180 SUB RAX,R13 SUB RAX,RCX SETC CL CMP RAX,RDX SETC AL OR AL,CL JNZ 0x001830ac MOV R15,RSI MOV RBX,RDI MOV RBP,RSP MOV EDX,0x180 MOV RDI,RBP XOR ESI,ESI CALL 0x0010f2b0 MOV RDI,qword ptr [RBX + 0x150] MOV RSI,RBP MOV RDX,R13 CALL qword ptr [RBX + 0x148] MOV EBP,0xffffffcc TEST EAX,EAX JNZ 0x001830ac MOV R13,qword ptr [RBX + 0x18] TEST R12,R12 JZ 0x0018305a MOV RDI,qword ptr [RBX + 0x150] LEA RSI,[RSP + R13*0x1] MOV RDX,R12 CALL qword ptr [RBX + 0x148] TEST EAX,EAX JNZ 0x001830ac ADD R13,R12 LAB_0018305a: TEST R15,R15 SETZ AL TEST R14,R14 SETZ CL OR CL,AL JNZ 0x0018307c LEA RDI,[RSP + R13*0x1] MOV RSI,R15 MOV RDX,R14 CALL 0x0010f3a0 ADD R13,R14 LAB_0018307c: MOV RDI,RSP MOV RSI,RDI MOV RDX,R13 CALL 0x00182ca1 TEST EAX,EAX JNZ 0x0018309d MOV RSI,RSP MOV RDI,RBX CALL 0x00182edd TEST EAX,EAX JZ 0x001830c0 LAB_0018309d: MOV EBP,EAX LAB_0018309f: MOV RDI,RSP MOV ESI,0x180 CALL 0x0018db8c LAB_001830ac: MOV EAX,EBP ADD RSP,0x188 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001830c0: MOV dword ptr [RBX + 0x10],0x1 XOR EBP,EBP JMP 0x0018309f
int mbedtls_ctr_drbg_reseed_internal(long param_1,void *param_2,ulong param_3,ulong param_4) { ulong uVar1; int iVar2; int iVar3; long lVar4; int1 auStack_1b8 [392]; uVar1 = *(ulong *)(param_1 + 0x18); iVar3 = -0x38; if ((uVar1 < 0x181) && (param_3 <= (0x180 - uVar1) - param_4 && param_4 <= 0x180 - uVar1)) { memset(auStack_1b8,0,0x180); iVar2 = (**(code **)(param_1 + 0x148))(*(int8 *)(param_1 + 0x150),auStack_1b8,uVar1); iVar3 = -0x34; if (iVar2 == 0) { lVar4 = *(long *)(param_1 + 0x18); if (param_4 != 0) { iVar3 = (**(code **)(param_1 + 0x148)) (*(int8 *)(param_1 + 0x150),auStack_1b8 + lVar4,param_4); if (iVar3 != 0) { return -0x34; } lVar4 = lVar4 + param_4; } if (param_3 != 0 && param_2 != (void *)0x0) { memcpy(auStack_1b8 + lVar4,param_2,param_3); lVar4 = lVar4 + param_3; } iVar3 = block_cipher_df(auStack_1b8,auStack_1b8,lVar4); if ((iVar3 == 0) && (iVar3 = ctr_drbg_update_internal(param_1,auStack_1b8), iVar3 == 0)) { *(int4 *)(param_1 + 0x10) = 1; iVar3 = 0; } mbedtls_platform_zeroize(auStack_1b8,0x180); } } return iVar3; }
9,059
buffer_add_bytes
corpus-core[P]colibri-stateless/src/util/bytes.c
void buffer_add_bytes(buffer_t* buf, uint32_t len, ...) { buffer_grow(buf, buf->data.len + len); va_list args; va_start(args, len); for (uint32_t i = 0; i < len; i++) { buf->data.data[buf->data.len] = (uint8_t) va_arg(args, int); buf->data.len++; } va_end(args); }
O0
c
buffer_add_bytes: pushq %rbp movq %rsp, %rbp subq $0x110, %rsp # imm = 0x110 testb %al, %al je 0x1959b movaps %xmm0, -0xc0(%rbp) movaps %xmm1, -0xb0(%rbp) movaps %xmm2, -0xa0(%rbp) movaps %xmm3, -0x90(%rbp) movaps %xmm4, -0x80(%rbp) movaps %xmm5, -0x70(%rbp) movaps %xmm6, -0x60(%rbp) movaps %xmm7, -0x50(%rbp) movq %r9, -0xc8(%rbp) movq %r8, -0xd0(%rbp) movq %rcx, -0xd8(%rbp) movq %rdx, -0xe0(%rbp) movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rax movl (%rax), %eax addl -0xc(%rbp), %eax movl %eax, %eax movl %eax, %esi callq 0x18af0 leaq -0x30(%rbp), %rax leaq -0xf0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) movl $0x0, -0x34(%rbp) movl -0x34(%rbp), %eax cmpl -0xc(%rbp), %eax jae 0x19698 leaq -0x30(%rbp), %rax movq %rax, -0x100(%rbp) movl -0x30(%rbp), %eax movl %eax, -0xf4(%rbp) cmpl $0x28, %eax ja 0x19646 movq -0x100(%rbp), %rcx movl -0xf4(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x108(%rbp) jmp 0x19663 movq -0x100(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x108(%rbp) movq -0x108(%rbp), %rax movl (%rax), %eax movb %al, %dl movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movl (%rcx), %ecx movb %dl, (%rax,%rcx) movq -0x8(%rbp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movl -0x34(%rbp), %eax addl $0x1, %eax movl %eax, -0x34(%rbp) jmp 0x195ff addq $0x110, %rsp # imm = 0x110 popq %rbp retq nopw %cs:(%rax,%rax)
buffer_add_bytes: push rbp mov rbp, rsp sub rsp, 110h test al, al jz short loc_1959B movaps [rbp+var_C0], xmm0 movaps [rbp+var_B0], xmm1 movaps [rbp+var_A0], xmm2 movaps [rbp+var_90], xmm3 movaps [rbp+var_80], xmm4 movaps [rbp+var_70], xmm5 movaps [rbp+var_60], xmm6 movaps [rbp+var_50], xmm7 loc_1959B: mov [rbp+var_C8], r9 mov [rbp+var_D0], r8 mov [rbp+var_D8], rcx mov [rbp+var_E0], rdx mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rdi, [rbp+var_8] mov rax, [rbp+var_8] mov eax, [rax] add eax, [rbp+var_C] mov eax, eax mov esi, eax call buffer_grow lea rax, [rbp+var_30] lea rcx, [rbp+var_F0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h mov [rbp+var_34], 0 loc_195FF: mov eax, [rbp+var_34] cmp eax, [rbp+var_C] jnb loc_19698 lea rax, [rbp+var_30] mov [rbp+var_100], rax mov eax, [rbp+var_30] mov [rbp+var_F4], eax cmp eax, 28h ; '(' ja short loc_19646 mov rcx, [rbp+var_100] mov edx, [rbp+var_F4] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_108], rax jmp short loc_19663 loc_19646: mov rcx, [rbp+var_100] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_108], rax loc_19663: mov rax, [rbp+var_108] mov eax, [rax] mov dl, al mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov ecx, [rcx] mov [rax+rcx], dl mov rax, [rbp+var_8] mov ecx, [rax] add ecx, 1 mov [rax], ecx mov eax, [rbp+var_34] add eax, 1 mov [rbp+var_34], eax jmp loc_195FF loc_19698: add rsp, 110h pop rbp retn
long long buffer_add_bytes(_DWORD *a1, int a2, ...) { long long result; // rax _DWORD *overflow_arg_area; // rax unsigned int i; // [rsp+DCh] [rbp-34h] va_list va; // [rsp+E0h] [rbp-30h] BYREF unsigned int v6; // [rsp+104h] [rbp-Ch] _DWORD *v7; // [rsp+108h] [rbp-8h] va_start(va, a2); v7 = a1; v6 = a2; buffer_grow((unsigned long long)a1, (unsigned int)(a2 + *a1)); for ( i = 0; ; ++i ) { result = i; if ( i >= v6 ) break; if ( va[0].gp_offset > 0x28 ) { overflow_arg_area = va[0].overflow_arg_area; va[0].overflow_arg_area = (char *)va[0].overflow_arg_area + 8; } else { overflow_arg_area = (char *)va[0].reg_save_area + (int)va[0].gp_offset; va[0].gp_offset += 8; } *(_BYTE *)(*((_QWORD *)v7 + 1) + (unsigned int)(*v7)++) = *overflow_arg_area; } return result; }
buffer_add_bytes: PUSH RBP MOV RBP,RSP SUB RSP,0x110 TEST AL,AL JZ 0x0011959b MOVAPS xmmword ptr [RBP + -0xc0],XMM0 MOVAPS xmmword ptr [RBP + -0xb0],XMM1 MOVAPS xmmword ptr [RBP + -0xa0],XMM2 MOVAPS xmmword ptr [RBP + -0x90],XMM3 MOVAPS xmmword ptr [RBP + -0x80],XMM4 MOVAPS xmmword ptr [RBP + -0x70],XMM5 MOVAPS xmmword ptr [RBP + -0x60],XMM6 MOVAPS xmmword ptr [RBP + -0x50],XMM7 LAB_0011959b: MOV qword ptr [RBP + -0xc8],R9 MOV qword ptr [RBP + -0xd0],R8 MOV qword ptr [RBP + -0xd8],RCX MOV qword ptr [RBP + -0xe0],RDX MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] ADD EAX,dword ptr [RBP + -0xc] MOV EAX,EAX MOV ESI,EAX CALL 0x00118af0 LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0xf0] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 MOV dword ptr [RBP + -0x34],0x0 LAB_001195ff: MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0xc] JNC 0x00119698 LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x100],RAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0xf4],EAX CMP EAX,0x28 JA 0x00119646 MOV RCX,qword ptr [RBP + -0x100] MOV EDX,dword ptr [RBP + -0xf4] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x108],RAX JMP 0x00119663 LAB_00119646: MOV RCX,qword ptr [RBP + -0x100] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x108],RAX LAB_00119663: MOV RAX,qword ptr [RBP + -0x108] MOV EAX,dword ptr [RAX] MOV DL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX] MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x34] ADD EAX,0x1 MOV dword ptr [RBP + -0x34],EAX JMP 0x001195ff LAB_00119698: ADD RSP,0x110 POP RBP RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ void buffer_add_bytes(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, uint *param_9,uint param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int4 *local_110; int4 local_f8 [4]; int8 local_e8; int8 local_e0; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; uint local_3c; uint local_38; int4 *local_30; uint local_14; uint *local_10; if (in_AL != '\0') { local_c8 = param_1; local_b8 = param_2; local_a8 = param_3; local_98 = param_4; local_88 = param_5; local_78 = param_6; local_68 = param_7; local_58 = param_8; } local_e8 = param_11; local_e0 = param_12; local_d8 = param_13; local_d0 = param_14; local_14 = param_10; local_10 = param_9; buffer_grow(param_9,*param_9 + param_10); local_30 = (int4 *)&stack0x00000008; local_38 = 0x10; for (local_3c = 0; local_3c < local_14; local_3c = local_3c + 1) { if (local_38 < 0x29) { local_110 = (int4 *)((long)local_f8 + (long)(int)local_38); local_38 = local_38 + 8; } else { local_110 = local_30; local_30 = local_30 + 2; } *(char *)(*(long *)(local_10 + 2) + (ulong)*local_10) = (char)*local_110; *local_10 = *local_10 + 1; } return; }
9,060
buffer_add_bytes
corpus-core[P]colibri-stateless/src/util/bytes.c
void buffer_add_bytes(buffer_t* buf, uint32_t len, ...) { buffer_grow(buf, buf->data.len + len); va_list args; va_start(args, len); for (uint32_t i = 0; i < len; i++) { buf->data.data[buf->data.len] = (uint8_t) va_arg(args, int); buf->data.len++; } va_end(args); }
O1
c
buffer_add_bytes: pushq %r15 pushq %r14 pushq %rbx subq $0xd0, %rsp movl %esi, %ebx movq %rdi, %r14 leaq 0x20(%rsp), %r15 movq %rdx, 0x10(%r15) movq %rcx, 0x18(%r15) movq %r8, 0x20(%r15) movq %r9, 0x28(%r15) testb %al, %al je 0x12fcd movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movl (%rdi), %esi addl %ebx, %esi callq 0x128e1 movq %r15, 0x10(%rsp) leaq 0xf0(%rsp), %rax movq %rax, 0x8(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rsp) testl %ebx, %ebx je 0x13034 movl (%rsp), %ecx cmpq $0x28, %rcx ja 0x13013 movq %rcx, %rax addq 0x10(%rsp), %rax addl $0x8, %ecx movl %ecx, (%rsp) jmp 0x13021 movq 0x8(%rsp), %rax leaq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movb (%rax), %al movq 0x8(%r14), %rcx movl (%r14), %edx movb %al, (%rcx,%rdx) incl (%r14) decl %ebx jne 0x12ffa addq $0xd0, %rsp popq %rbx popq %r14 popq %r15 retq
buffer_add_bytes: push r15 push r14 push rbx sub rsp, 0D0h mov ebx, esi mov r14, rdi lea r15, [rsp+0E8h+var_C8] mov [r15+10h], rdx mov [r15+18h], rcx mov [r15+20h], r8 mov [r15+28h], r9 test al, al jz short loc_12FCD movaps [rsp+0E8h+var_98], xmm0 movaps [rsp+0E8h+var_88], xmm1 movaps [rsp+0E8h+var_78], xmm2 movaps [rsp+0E8h+var_68], xmm3 movaps [rsp+0E8h+var_58], xmm4 movaps [rsp+0E8h+var_48], xmm5 movaps [rsp+0E8h+var_38], xmm6 movaps [rsp+0E8h+var_28], xmm7 loc_12FCD: mov esi, [rdi] add esi, ebx call buffer_grow mov [rsp+0E8h+var_D8], r15 lea rax, [rsp+0E8h+arg_0] mov [rsp+0E8h+var_E0], rax mov rax, 3000000010h mov [rsp+0E8h+var_E8], rax test ebx, ebx jz short loc_13034 loc_12FFA: mov ecx, dword ptr [rsp+0E8h+var_E8] cmp rcx, 28h ; '(' ja short loc_13013 mov rax, rcx add rax, [rsp+0E8h+var_D8] add ecx, 8 mov dword ptr [rsp+0E8h+var_E8], ecx jmp short loc_13021 loc_13013: mov rax, [rsp+0E8h+var_E0] lea rcx, [rax+8] mov [rsp+0E8h+var_E0], rcx loc_13021: mov al, [rax] mov rcx, [r14+8] mov edx, [r14] mov [rcx+rdx], al inc dword ptr [r14] dec ebx jnz short loc_12FFA loc_13034: add rsp, 0D0h pop rbx pop r14 pop r15 retn
char buffer_add_bytes(long long a1, int a2, long long a3, long long a4, long long a5, long long a6, ...) { int v6; // ebx char result; // al char *v8; // rax long long v9; // kr00_8 va_list va; // [rsp+0h] [rbp-E8h] BYREF long long v11; // [rsp+30h] [rbp-B8h] long long v12; // [rsp+38h] [rbp-B0h] long long v13; // [rsp+40h] [rbp-A8h] long long v14; // [rsp+48h] [rbp-A0h] va_start(va, a6); v6 = a2; v11 = a3; v12 = a4; v13 = a5; v14 = a6; buffer_grow(a1, (unsigned int)(a2 + *(_DWORD *)a1)); result = 16; va[0].gp_offset = 16; if ( a2 ) { do { if ( va[0].gp_offset > 0x28uLL ) { v9 = va_arg(va, _QWORD); v8 = (char *)&v9; } else { v8 = (char *)va[0].reg_save_area + va[0].gp_offset; va[0].gp_offset += 8; } result = *v8; *(_BYTE *)(*(_QWORD *)(a1 + 8) + (unsigned int)(*(_DWORD *)a1)++) = result; --v6; } while ( v6 ); } return result; }
buffer_add_bytes: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xd0 MOV EBX,ESI MOV R14,RDI LEA R15,[RSP + 0x20] MOV qword ptr [R15 + 0x10],RDX MOV qword ptr [R15 + 0x18],RCX MOV qword ptr [R15 + 0x20],R8 MOV qword ptr [R15 + 0x28],R9 TEST AL,AL JZ 0x00112fcd MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_00112fcd: MOV ESI,dword ptr [RDI] ADD ESI,EBX CALL 0x001128e1 MOV qword ptr [RSP + 0x10],R15 LEA RAX,[RSP + 0xf0] MOV qword ptr [RSP + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RSP],RAX TEST EBX,EBX JZ 0x00113034 LAB_00112ffa: MOV ECX,dword ptr [RSP] CMP RCX,0x28 JA 0x00113013 MOV RAX,RCX ADD RAX,qword ptr [RSP + 0x10] ADD ECX,0x8 MOV dword ptr [RSP],ECX JMP 0x00113021 LAB_00113013: MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX LAB_00113021: MOV AL,byte ptr [RAX] MOV RCX,qword ptr [R14 + 0x8] MOV EDX,dword ptr [R14] MOV byte ptr [RCX + RDX*0x1],AL INC dword ptr [R14] DEC EBX JNZ 0x00112ffa LAB_00113034: ADD RSP,0xd0 POP RBX POP R14 POP R15 RET
void buffer_add_bytes(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, uint *param_9,int param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 *puVar1; uint uVar2; ulong uVar3; int1 *local_e0; int1 local_c8 [16]; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_a0; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; if (in_AL != '\0') { local_98 = param_1; local_88 = param_2; local_78 = param_3; local_68 = param_4; local_58 = param_5; local_48 = param_6; local_38 = param_7; local_28 = param_8; } local_b8 = param_11; local_b0 = param_12; local_a8 = param_13; local_a0 = param_14; buffer_grow(param_9,*param_9 + param_10); local_e0 = &stack0x00000008; uVar2 = 0x10; if (param_10 != 0) { do { uVar3 = (ulong)uVar2; if (uVar3 < 0x29) { uVar2 = uVar2 + 8; puVar1 = local_c8 + uVar3; } else { puVar1 = local_e0; local_e0 = local_e0 + 8; } *(int1 *)(*(long *)(param_9 + 2) + (ulong)*param_9) = *puVar1; *param_9 = *param_9 + 1; param_10 = param_10 + -1; } while (param_10 != 0); } return; }
9,061
buffer_add_bytes
corpus-core[P]colibri-stateless/src/util/bytes.c
void buffer_add_bytes(buffer_t* buf, uint32_t len, ...) { buffer_grow(buf, buf->data.len + len); va_list args; va_start(args, len); for (uint32_t i = 0; i < len; i++) { buf->data.data[buf->data.len] = (uint8_t) va_arg(args, int); buf->data.len++; } va_end(args); }
O3
c
buffer_add_bytes: pushq %r15 pushq %r14 pushq %rbx subq $0xd0, %rsp movl %esi, %ebx movq %rdi, %r14 leaq 0x20(%rsp), %r15 movq %rdx, 0x10(%r15) movq %rcx, 0x18(%r15) movq %r8, 0x20(%r15) movq %r9, 0x28(%r15) testb %al, %al je 0x12ce0 movaps %xmm0, 0x50(%rsp) movaps %xmm1, 0x60(%rsp) movaps %xmm2, 0x70(%rsp) movaps %xmm3, 0x80(%rsp) movaps %xmm4, 0x90(%rsp) movaps %xmm5, 0xa0(%rsp) movaps %xmm6, 0xb0(%rsp) movaps %xmm7, 0xc0(%rsp) movl (%rdi), %esi addl %ebx, %esi callq 0x125e5 movq %r15, 0x10(%rsp) leaq 0xf0(%rsp), %rax movq %rax, 0x8(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rsp) testl %ebx, %ebx je 0x12d47 movl (%rsp), %ecx cmpq $0x28, %rcx ja 0x12d26 movq %rcx, %rax addq 0x10(%rsp), %rax addl $0x8, %ecx movl %ecx, (%rsp) jmp 0x12d34 movq 0x8(%rsp), %rax leaq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movb (%rax), %al movq 0x8(%r14), %rcx movl (%r14), %edx movb %al, (%rcx,%rdx) incl (%r14) decl %ebx jne 0x12d0d addq $0xd0, %rsp popq %rbx popq %r14 popq %r15 retq
buffer_add_bytes: push r15 push r14 push rbx sub rsp, 0D0h mov ebx, esi mov r14, rdi lea r15, [rsp+0E8h+var_C8] mov [r15+10h], rdx mov [r15+18h], rcx mov [r15+20h], r8 mov [r15+28h], r9 test al, al jz short loc_12CE0 movaps [rsp+0E8h+var_98], xmm0 movaps [rsp+0E8h+var_88], xmm1 movaps [rsp+0E8h+var_78], xmm2 movaps [rsp+0E8h+var_68], xmm3 movaps [rsp+0E8h+var_58], xmm4 movaps [rsp+0E8h+var_48], xmm5 movaps [rsp+0E8h+var_38], xmm6 movaps [rsp+0E8h+var_28], xmm7 loc_12CE0: mov esi, [rdi] add esi, ebx call buffer_grow mov [rsp+0E8h+var_D8], r15 lea rax, [rsp+0E8h+arg_0] mov [rsp+0E8h+var_E0], rax mov rax, 3000000010h mov [rsp+0E8h+var_E8], rax test ebx, ebx jz short loc_12D47 loc_12D0D: mov ecx, dword ptr [rsp+0E8h+var_E8] cmp rcx, 28h ; '(' ja short loc_12D26 mov rax, rcx add rax, [rsp+0E8h+var_D8] add ecx, 8 mov dword ptr [rsp+0E8h+var_E8], ecx jmp short loc_12D34 loc_12D26: mov rax, [rsp+0E8h+var_E0] lea rcx, [rax+8] mov [rsp+0E8h+var_E0], rcx loc_12D34: mov al, [rax] mov rcx, [r14+8] mov edx, [r14] mov [rcx+rdx], al inc dword ptr [r14] dec ebx jnz short loc_12D0D loc_12D47: add rsp, 0D0h pop rbx pop r14 pop r15 retn
char buffer_add_bytes(long long a1, int a2, long long a3, long long a4, long long a5, long long a6, ...) { int v6; // ebx char result; // al char *v8; // rax long long v9; // kr00_8 va_list va; // [rsp+0h] [rbp-E8h] BYREF long long v11; // [rsp+30h] [rbp-B8h] long long v12; // [rsp+38h] [rbp-B0h] long long v13; // [rsp+40h] [rbp-A8h] long long v14; // [rsp+48h] [rbp-A0h] va_start(va, a6); v6 = a2; v11 = a3; v12 = a4; v13 = a5; v14 = a6; buffer_grow(a1, (unsigned int)(a2 + *(_DWORD *)a1)); result = 16; va[0].gp_offset = 16; if ( a2 ) { do { if ( va[0].gp_offset > 0x28uLL ) { v9 = va_arg(va, _QWORD); v8 = (char *)&v9; } else { v8 = (char *)va[0].reg_save_area + va[0].gp_offset; va[0].gp_offset += 8; } result = *v8; *(_BYTE *)(*(_QWORD *)(a1 + 8) + (unsigned int)(*(_DWORD *)a1)++) = result; --v6; } while ( v6 ); } return result; }
buffer_add_bytes: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xd0 MOV EBX,ESI MOV R14,RDI LEA R15,[RSP + 0x20] MOV qword ptr [R15 + 0x10],RDX MOV qword ptr [R15 + 0x18],RCX MOV qword ptr [R15 + 0x20],R8 MOV qword ptr [R15 + 0x28],R9 TEST AL,AL JZ 0x00112ce0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM3 MOVAPS xmmword ptr [RSP + 0x90],XMM4 MOVAPS xmmword ptr [RSP + 0xa0],XMM5 MOVAPS xmmword ptr [RSP + 0xb0],XMM6 MOVAPS xmmword ptr [RSP + 0xc0],XMM7 LAB_00112ce0: MOV ESI,dword ptr [RDI] ADD ESI,EBX CALL 0x001125e5 MOV qword ptr [RSP + 0x10],R15 LEA RAX,[RSP + 0xf0] MOV qword ptr [RSP + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RSP],RAX TEST EBX,EBX JZ 0x00112d47 LAB_00112d0d: MOV ECX,dword ptr [RSP] CMP RCX,0x28 JA 0x00112d26 MOV RAX,RCX ADD RAX,qword ptr [RSP + 0x10] ADD ECX,0x8 MOV dword ptr [RSP],ECX JMP 0x00112d34 LAB_00112d26: MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX LAB_00112d34: MOV AL,byte ptr [RAX] MOV RCX,qword ptr [R14 + 0x8] MOV EDX,dword ptr [R14] MOV byte ptr [RCX + RDX*0x1],AL INC dword ptr [R14] DEC EBX JNZ 0x00112d0d LAB_00112d47: ADD RSP,0xd0 POP RBX POP R14 POP R15 RET
void buffer_add_bytes(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, uint *param_9,int param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 *puVar1; uint uVar2; ulong uVar3; int1 *local_e0; int1 local_c8 [16]; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_a0; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; if (in_AL != '\0') { local_98 = param_1; local_88 = param_2; local_78 = param_3; local_68 = param_4; local_58 = param_5; local_48 = param_6; local_38 = param_7; local_28 = param_8; } local_b8 = param_11; local_b0 = param_12; local_a8 = param_13; local_a0 = param_14; buffer_grow(param_9,*param_9 + param_10); local_e0 = &stack0x00000008; uVar2 = 0x10; if (param_10 != 0) { do { uVar3 = (ulong)uVar2; if (uVar3 < 0x29) { uVar2 = uVar2 + 8; puVar1 = local_c8 + uVar3; } else { puVar1 = local_e0; local_e0 = local_e0 + 8; } *(int1 *)(*(long *)(param_9 + 2) + (ulong)*param_9) = *puVar1; *param_9 = *param_9 + 1; param_10 = param_10 + -1; } while (param_10 != 0); } return; }
9,062
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)
monkey531[P]llama/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) }
O2
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 subq $0x38, %rsp movq %rcx, 0x28(%rsp) movl %r8d, 0x30(%rsp) movl 0x88(%rsp), %eax cmpl $-0x3d, %eax jle 0x5e8af movq %rdx, 0x8(%rsp) movq %rdi, 0x20(%rsp) cmpl $-0x1f, %eax jge 0x5e8ce movq %rsi, %r14 leaq 0x80(%rsp), %rbx leaq 0x70(%rsp), %r15 leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x5e92c movq %rax, %r12 movq %rbx, %rdi movq %r15, %rsi callq 0x5e92c xorl %ebp, %ebp subl 0x8(%rbx), %ebp pushq $0x1 popq %rdx movl %ebp, %ecx shlq %cl, %rdx movq (%rbx), %r15 movq %r15, %rbx shrq %cl, %rbx testl %ebx, %ebx je 0x5e8ed movq %rax, %r13 movq %rdx, 0x10(%rsp) leaq -0x1(%rdx), %rax movq %rax, 0x18(%rsp) andq %rax, %r15 leaq 0x4(%rsp), %rsi andl $0x0, (%rsi) movl %ebx, %edi callq 0x5e97d movl %eax, %esi leaq 0x4(%rsp), %rax movl (%rax), %r10d pushq $0xa popq %r9 movq 0x20(%rsp), %rdi testl %esi, %esi jle 0x5e7a9 movl %ebx, %eax xorl %edx, %edx divl %r10d cmpl $0xa, %eax jae 0x5e890 movl %edx, %ebx movslq (%r14), %rdx leal 0x1(%rdx), %ecx movl %ecx, (%r14) movl %ebx, %r8d movl %ebp, %ecx shlq %cl, %r8 orb $0x30, %al movb %al, (%rdi,%rdx) addq %r15, %r8 cmpq %r12, %r8 jbe 0x5e820 movl %r10d, %eax xorl %edx, %edx divl %r9d movl %eax, %r10d movl %eax, 0x4(%rsp) decl %esi jmp 0x5e75e cmpq %r12, %r15 jbe 0x5e90c xorl %eax, %eax movabsq $0x199999999999999a, %rdx # imm = 0x199999999999999A movq 0x18(%rsp), %r9 cmpq %rdx, %r15 jae 0x5e852 imulq $0xa, %r15, %r15 movq %r15, %rsi movl %ebp, %ecx shrq %cl, %rsi cmpq $0xa, %rsi jae 0x5e871 andq %r9, %r15 orb $0x30, %sil movslq (%r14), %rcx leal 0x1(%rcx), %r8d movl %r8d, (%r14) movb %sil, (%rdi,%rcx) imulq $0xa, %r12, %r12 imulq $0xa, %r13, %r13 decl %eax cmpq %r12, %r15 ja 0x5e7c3 movq 0x8(%rsp), %rcx addl %eax, (%rcx) movl (%r14), %esi movq %r13, %rdx movq %r12, %rcx movq %r15, %r8 movq 0x10(%rsp), %r9 jmp 0x5e83e movq 0x8(%rsp), %rcx movl (%rcx), %eax addl %esi, %eax decl %eax movl %eax, (%rcx) movl %r10d, %r9d movl %ebp, %ecx shlq %cl, %r9 movl (%r14), %esi movq %r13, %rdx movq %r12, %rcx callq 0x5ea1d addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x426ba(%rip), %rdi # 0xa0f13 leaq 0x3b5ce(%rip), %rsi # 0x99e2e leaq 0x42622(%rip), %rcx # 0xa0e89 movl $0x4505, %edx # imm = 0x4505 callq 0x204a0 leaq 0x42689(%rip), %rdi # 0xa0f01 leaq 0x3b5af(%rip), %rsi # 0x99e2e leaq 0x42603(%rip), %rcx # 0xa0e89 movl $0x450e, %edx # imm = 0x450E callq 0x204a0 leaq 0x4266a(%rip), %rdi # 0xa0f01 leaq 0x3b590(%rip), %rsi # 0x99e2e leaq 0x425e4(%rip), %rcx # 0xa0e89 movl $0x44a3, %edx # imm = 0x44A3 callq 0x204a0 leaq 0x425c0(%rip), %rdi # 0xa0e76 leaq 0x3b571(%rip), %rsi # 0x99e2e leaq 0x425c5(%rip), %rcx # 0xa0e89 movl $0x4469, %edx # imm = 0x4469 callq 0x204a0 leaq 0x42612(%rip), %rdi # 0xa0ee7 leaq 0x3b552(%rip), %rsi # 0x99e2e leaq 0x425a6(%rip), %rcx # 0xa0e89 movl $0x446a, %edx # imm = 0x446A callq 0x204a0 leaq 0x42606(%rip), %rdi # 0xa0efa leaq 0x3b533(%rip), %rsi # 0x99e2e leaq 0x42587(%rip), %rcx # 0xa0e89 movl $0x447f, %edx # imm = 0x447F callq 0x204a0 leaq 0x425f5(%rip), %rdi # 0xa0f08 leaq 0x3b514(%rip), %rsi # 0x99e2e leaq 0x42568(%rip), %rcx # 0xa0e89 movl $0x44fa, %edx # imm = 0x44FA callq 0x204a0 nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rsp+68h+var_40], rcx mov [rsp+68h+var_38], r8d mov eax, [rsp+68h+arg_18] cmp eax, 0FFFFFFC3h jle loc_5E8AF mov [rsp+68h+var_60], rdx mov [rsp+68h+var_48], rdi cmp eax, 0FFFFFFE1h jge loc_5E8CE mov r14, rsi lea rbx, [rsp+68h+arg_10] lea r15, [rsp+68h+arg_0] lea rsi, [rsp+68h+var_40] mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r12, rax mov rdi, rbx mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) xor ebp, ebp sub ebp, [rbx+8] push 1 pop rdx mov ecx, ebp shl rdx, cl; unsigned int * mov r15, [rbx] mov rbx, r15 shr rbx, cl test ebx, ebx jz loc_5E8ED mov r13, rax mov [rsp+68h+var_58], rdx lea rax, [rdx-1] mov [rsp+68h+var_50], rax and r15, rax lea rsi, [rsp+68h+var_64]; unsigned int and dword ptr [rsi], 0 mov edi, ebx; this call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18find_largest_pow10EjRj; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(uint,uint &) mov esi, eax lea rax, [rsp+68h+var_64] mov r10d, [rax] push 0Ah pop r9 mov rdi, [rsp+68h+var_48]; this loc_5E75E: test esi, esi jle short loc_5E7A9 mov eax, ebx xor edx, edx div r10d cmp eax, 0Ah jnb loc_5E890 mov ebx, edx movsxd rdx, dword ptr [r14] lea ecx, [rdx+1] mov [r14], ecx mov r8d, ebx mov ecx, ebp shl r8, cl or al, 30h mov [rdi+rdx], al add r8, r15; unsigned __int64 cmp r8, r12 jbe loc_5E820 mov eax, r10d xor edx, edx div r9d mov r10d, eax mov [rsp+68h+var_64], eax dec esi jmp short loc_5E75E loc_5E7A9: cmp r15, r12 jbe loc_5E90C xor eax, eax mov rdx, 199999999999999Ah mov r9, [rsp+68h+var_50] loc_5E7C3: cmp r15, rdx jnb loc_5E852 imul r15, 0Ah mov rsi, r15 mov ecx, ebp shr rsi, cl cmp rsi, 0Ah jnb loc_5E871 and r15, r9 or sil, 30h movsxd rcx, dword ptr [r14] lea r8d, [rcx+1] mov [r14], r8d mov [rdi+rcx], sil imul r12, 0Ah imul r13, 0Ah dec eax cmp r15, r12 ja short loc_5E7C3 mov rcx, [rsp+68h+var_60] add [rcx], eax mov esi, [r14] mov rdx, r13 mov rcx, r12 mov r8, r15 mov r9, [rsp+68h+var_58] jmp short loc_5E83E loc_5E820: mov rcx, [rsp+68h+var_60] mov eax, [rcx] add eax, esi dec eax mov [rcx], eax mov r9d, r10d mov ecx, ebp shl r9, cl; unsigned __int64 mov esi, [r14]; char * mov rdx, r13; int mov rcx, r12; unsigned __int64 loc_5E83E: call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char *,int,ulong,ulong,ulong,ulong) add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5E852: lea rdi, aP2StdNumericLi; "p2 <= (std::numeric_limits<std::uint64_"... lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_11; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 4505h call ___assert_fail loc_5E871: lea rdi, aD9; "d <= 9" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_11; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 450Eh call ___assert_fail loc_5E890: lea rdi, aD9; "d <= 9" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_11; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 44A3h call ___assert_fail loc_5E8AF: lea rdi, aMPlusEKalpha; "M_plus.e >= kAlpha" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_11; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 4469h call ___assert_fail loc_5E8CE: lea rdi, aMPlusEKgamma; "M_plus.e <= kGamma" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_11; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 446Ah call ___assert_fail loc_5E8ED: lea rdi, aP10; "p1 > 0" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_11; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 447Fh call ___assert_fail loc_5E90C: lea rdi, aP2Delta; "p2 > delta" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_11; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 44FAh call ___assert_fail
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *a1, unsigned int *a2, _DWORD *a3, long long a4, int a5, long long a6, char a7, int a8, unsigned long long a9, int a10) { unsigned long long v11; // r12 int v12; // eax int v13; // ebp unsigned int *v14; // rdx unsigned long long v15; // rbx int v16; // r13d unsigned long long v17; // r15 int largest_pow10; // esi unsigned int v19; // r10d nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v20; // rdi unsigned int v21; // eax long long v22; // rdx unsigned long long v23; // r8 int v24; // eax unsigned long long v25; // r9 unsigned long long v26; // r15 unsigned long long v27; // rsi long long v28; // rcx char *v29; // rsi int v30; // edx unsigned long long v31; // rcx unsigned long long v32; // r9 unsigned long long v34; // [rsp+0h] [rbp-68h] BYREF _DWORD *v35; // [rsp+8h] [rbp-60h] long long v36; // [rsp+10h] [rbp-58h] char *v37; // [rsp+18h] [rbp-50h] nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v38; // [rsp+20h] [rbp-48h] long long v39; // [rsp+28h] [rbp-40h] BYREF int v40; // [rsp+30h] [rbp-38h] v39 = a4; v40 = a5; if ( a10 <= -61 ) __assert_fail( "M_plus.e >= kAlpha", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17513LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v35 = a3; v38 = a1; if ( a10 >= -31 ) __assert_fail( "M_plus.e <= kGamma", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17514LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v11 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &v39); v12 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &a7); v13 = -a10; v14 = (unsigned int *)(1LL << -(char)a10); v15 = a9 >> -(char)a10; if ( !(_DWORD)v15 ) __assert_fail( "p1 > 0", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17535LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v16 = v12; v36 = 1LL << -(char)a10; v37 = (char *)v14 - 1; v17 = ((unsigned long long)v14 - 1) & a9; HIDWORD(v34) = 0; largest_pow10 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)(unsigned int)v15, (unsigned int)&v34 + 4, v14); v19 = HIDWORD(v34); v20 = v38; while ( largest_pow10 > 0 ) { v21 = (unsigned int)v15 / v19; if ( (unsigned int)v15 / v19 >= 0xA ) __assert_fail( "d <= 9", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17571LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); LODWORD(v15) = (unsigned int)v15 % v19; v22 = (int)*a2; *a2 = v22 + 1; *((_BYTE *)v20 + v22) = v21 | 0x30; v23 = v17 + ((unsigned long long)(unsigned int)v15 << v13); if ( v23 <= v11 ) { *v35 = largest_pow10 + *v35 - 1; v32 = (unsigned long long)v19 << v13; v29 = (char *)*a2; v30 = v16; v31 = v11; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(v20, v29, v30, v31, v23, v32, v34); } v19 /= 0xAu; HIDWORD(v34) = v19; --largest_pow10; } if ( v17 <= v11 ) __assert_fail( "p2 > delta", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17658LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v24 = 0; v25 = (unsigned long long)v37; do { if ( v17 >= 0x199999999999999ALL ) __assert_fail( "p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17669LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v26 = 10 * v17; v27 = v26 >> v13; if ( v26 >> v13 >= 0xA ) __assert_fail( "d <= 9", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17678LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v17 = v25 & v26; v28 = (int)*a2; *a2 = v28 + 1; *((_BYTE *)v20 + v28) = v27 | 0x30; v11 *= 10LL; v16 *= 10; --v24; } while ( v17 > v11 ); *v35 += v24; v29 = (char *)*a2; v30 = v16; v31 = v11; v23 = v17; v32 = v36; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(v20, v29, v30, v31, v23, v32, v34); }
9,063
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)
monkey531[P]llama/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) }
O3
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 subq $0x18, %rsp movq %rcx, 0x8(%rsp) movl %r8d, 0x10(%rsp) movl 0x68(%rsp), %eax cmpl $-0x3d, %eax jle 0x67db6 movq %rdx, (%rsp) cmpl $-0x1f, %eax jge 0x67dd5 movq %rsi, %r14 movq %rdi, %rbx leaq 0x60(%rsp), %r13 leaq 0x50(%rsp), %rbp leaq 0x8(%rsp), %rsi movq %r13, %rdi callq 0x67e32 movq %rax, %r12 movq %r13, %rdi movq %rbp, %rsi callq 0x67e32 xorl %ecx, %ecx subl 0x8(%r13), %ecx movl $0x1, %r9d shlq %cl, %r9 movq (%r13), %r8 movq %r8, %rdx shrq %cl, %rdx testl %edx, %edx je 0x67df4 movq %rax, %r10 leaq -0x1(%r9), %rsi cmpl $0x3b9ac9ff, %edx # imm = 0x3B9AC9FF jbe 0x67bbb movl $0x3b9aca00, %edi # imm = 0x3B9ACA00 movl $0xa, %r13d jmp 0x67c60 cmpl $0x5f5e0ff, %edx # imm = 0x5F5E0FF jbe 0x67bd3 movl $0x5f5e100, %edi # imm = 0x5F5E100 movl $0x9, %r13d jmp 0x67c60 cmpl $0x98967f, %edx # imm = 0x98967F jbe 0x67be8 movl $0x989680, %edi # imm = 0x989680 movl $0x8, %r13d jmp 0x67c60 cmpl $0xf423f, %edx # imm = 0xF423F jbe 0x67bfd movl $0xf4240, %edi # imm = 0xF4240 movl $0x7, %r13d jmp 0x67c60 cmpl $0x1869f, %edx # imm = 0x1869F jbe 0x67c12 movl $0x186a0, %edi # imm = 0x186A0 movl $0x6, %r13d jmp 0x67c60 cmpl $0x270f, %edx # imm = 0x270F jbe 0x67c27 movl $0x2710, %edi # imm = 0x2710 movl $0x5, %r13d jmp 0x67c60 cmpl $0x3e7, %edx # imm = 0x3E7 jbe 0x67c3c movl $0x3e8, %edi # imm = 0x3E8 movl $0x4, %r13d jmp 0x67c60 cmpl $0x63, %edx jbe 0x67c4e movl $0x64, %edi movl $0x3, %r13d jmp 0x67c60 xorl %r13d, %r13d cmpl $0xa, %edx setae %r13b leal 0x1(%r13,%r13,8), %edi incl %r13d andq %rsi, %r8 incl %r13d movl $0xcccccccd, %ebp # imm = 0xCCCCCCCD movl %edx, %eax xorl %edx, %edx divl %edi cmpl $0xa, %eax jae 0x67d59 movslq (%r14), %r15 leal 0x1(%r15), %r11d movl %r11d, (%r14) movl %edx, %r11d shlq %cl, %r11 orb $0x30, %al movb %al, (%rbx,%r15) addq %r8, %r11 cmpq %r12, %r11 jbe 0x67d22 movl %edi, %edi imulq %rbp, %rdi shrq $0x23, %rdi decl %r13d cmpl $0x1, %r13d ja 0x67c6b cmpq %r12, %r8 jbe 0x67e13 xorl %eax, %eax movabsq $0x199999999999999a, %rdx # imm = 0x199999999999999A cmpq %rdx, %r8 jae 0x67d78 addq %r8, %r8 leaq (%r8,%r8,4), %r8 movq %r8, %rdi shrq %cl, %rdi cmpq $0xa, %rdi jae 0x67d97 andq %rsi, %r8 orb $0x30, %dil movslq (%r14), %r11 leal 0x1(%r11), %ebp movl %ebp, (%r14) movb %dil, (%rbx,%r11) addq %r12, %r12 leaq (%r12,%r12,4), %r12 addq %r10, %r10 leaq (%r10,%r10,4), %r10 decl %eax cmpq %r12, %r8 ja 0x67cc4 movq (%rsp), %rcx addl %eax, (%rcx) movl (%r14), %esi movq %rbx, %rdi movq %r10, %rdx movq %r12, %rcx jmp 0x67d45 movq (%rsp), %rdx movl (%rdx), %eax addl %r13d, %eax addl $-0x2, %eax movl %eax, (%rdx) movl %edi, %r9d shlq %cl, %r9 movl (%r14), %esi movq %rbx, %rdi movq %r10, %rdx movq %r12, %rcx movq %r11, %r8 callq 0x67e83 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x54728(%rip), %rdi # 0xbc488 leaq 0x4ef3f(%rip), %rsi # 0xb6ca6 leaq 0x546a2(%rip), %rcx # 0xbc410 movl $0x44a3, %edx # imm = 0x44A3 callq 0x18470 leaq 0x5471b(%rip), %rdi # 0xbc49a leaq 0x4ef20(%rip), %rsi # 0xb6ca6 leaq 0x54683(%rip), %rcx # 0xbc410 movl $0x4505, %edx # imm = 0x4505 callq 0x18470 leaq 0x546ea(%rip), %rdi # 0xbc488 leaq 0x4ef01(%rip), %rsi # 0xb6ca6 leaq 0x54664(%rip), %rcx # 0xbc410 movl $0x450e, %edx # imm = 0x450E callq 0x18470 leaq 0x54640(%rip), %rdi # 0xbc3fd leaq 0x4eee2(%rip), %rsi # 0xb6ca6 leaq 0x54645(%rip), %rcx # 0xbc410 movl $0x4469, %edx # imm = 0x4469 callq 0x18470 leaq 0x54692(%rip), %rdi # 0xbc46e leaq 0x4eec3(%rip), %rsi # 0xb6ca6 leaq 0x54626(%rip), %rcx # 0xbc410 movl $0x446a, %edx # imm = 0x446A callq 0x18470 leaq 0x54686(%rip), %rdi # 0xbc481 leaq 0x4eea4(%rip), %rsi # 0xb6ca6 leaq 0x54607(%rip), %rcx # 0xbc410 movl $0x447f, %edx # imm = 0x447F callq 0x18470 leaq 0x54675(%rip), %rdi # 0xbc48f leaq 0x4ee85(%rip), %rsi # 0xb6ca6 leaq 0x545e8(%rip), %rcx # 0xbc410 movl $0x44fa, %edx # imm = 0x44FA callq 0x18470
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_40], rcx mov [rsp+48h+var_38], r8d mov eax, [rsp+48h+arg_18] cmp eax, 0FFFFFFC3h jle loc_67DB6 mov [rsp+48h+var_48], rdx; unsigned __int64 cmp eax, 0FFFFFFE1h jge loc_67DD5 mov r14, rsi mov rbx, rdi lea r13, [rsp+48h+arg_10] lea rbp, [rsp+48h+arg_0] lea rsi, [rsp+48h+var_40] mov rdi, r13 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r12, rax mov rdi, r13 mov rsi, rbp call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) xor ecx, ecx sub ecx, [r13+8] mov r9d, 1 shl r9, cl mov r8, [r13+0] mov rdx, r8 shr rdx, cl test edx, edx jz loc_67DF4 mov r10, rax lea rsi, [r9-1] cmp edx, 3B9AC9FFh jbe short loc_67BBB mov edi, 3B9ACA00h mov r13d, 0Ah jmp loc_67C60 loc_67BBB: cmp edx, 5F5E0FFh jbe short loc_67BD3 mov edi, 5F5E100h mov r13d, 9 jmp loc_67C60 loc_67BD3: cmp edx, 98967Fh jbe short loc_67BE8 mov edi, 989680h mov r13d, 8 jmp short loc_67C60 loc_67BE8: cmp edx, 0F423Fh jbe short loc_67BFD mov edi, 0F4240h mov r13d, 7 jmp short loc_67C60 loc_67BFD: cmp edx, 1869Fh jbe short loc_67C12 mov edi, offset __ZdlPvm; operator delete(void *,ulong) mov r13d, 6 jmp short loc_67C60 loc_67C12: cmp edx, 270Fh jbe short loc_67C27 mov edi, 2710h mov r13d, 5 jmp short loc_67C60 loc_67C27: cmp edx, 3E7h jbe short loc_67C3C mov edi, 3E8h mov r13d, 4 jmp short loc_67C60 loc_67C3C: cmp edx, 63h ; 'c' jbe short loc_67C4E mov edi, 64h ; 'd' mov r13d, 3 jmp short loc_67C60 loc_67C4E: xor r13d, r13d cmp edx, 0Ah setnb r13b lea edi, [r13+r13*8+1] inc r13d loc_67C60: and r8, rsi inc r13d mov ebp, 0CCCCCCCDh loc_67C6B: mov eax, edx xor edx, edx div edi cmp eax, 0Ah jnb loc_67D59 movsxd r15, dword ptr [r14] lea r11d, [r15+1] mov [r14], r11d mov r11d, edx shl r11, cl or al, 30h mov [rbx+r15], al add r11, r8 cmp r11, r12 jbe loc_67D22 mov edi, edi imul rdi, rbp shr rdi, 23h dec r13d cmp r13d, 1 ja short loc_67C6B cmp r8, r12 jbe loc_67E13 xor eax, eax mov rdx, 199999999999999Ah loc_67CC4: cmp r8, rdx jnb loc_67D78 add r8, r8 lea r8, [r8+r8*4] mov rdi, r8 shr rdi, cl cmp rdi, 0Ah jnb loc_67D97 and r8, rsi or dil, 30h movsxd r11, dword ptr [r14] lea ebp, [r11+1] mov [r14], ebp mov [rbx+r11], dil add r12, r12 lea r12, [r12+r12*4] add r10, r10 lea r10, [r10+r10*4] dec eax cmp r8, r12 ja short loc_67CC4 mov rcx, [rsp+48h+var_48] add [rcx], eax mov esi, [r14] mov rdi, rbx mov rdx, r10 mov rcx, r12 jmp short loc_67D45 loc_67D22: mov rdx, [rsp+48h+var_48] mov eax, [rdx] add eax, r13d add eax, 0FFFFFFFEh mov [rdx], eax mov r9d, edi shl r9, cl; unsigned __int64 mov esi, [r14]; char * mov rdi, rbx; this mov rdx, r10; int mov rcx, r12; unsigned __int64 mov r8, r11; unsigned __int64 loc_67D45: call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char *,int,ulong,ulong,ulong,ulong) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_67D59: lea rdi, aD9; "d <= 9" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_10; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 44A3h call ___assert_fail loc_67D78: lea rdi, aP2StdNumericLi; "p2 <= (std::numeric_limits<std::uint64_"... lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_10; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 4505h call ___assert_fail loc_67D97: lea rdi, aD9; "d <= 9" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_10; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 450Eh call ___assert_fail loc_67DB6: lea rdi, aMPlusEKalpha; "M_plus.e >= kAlpha" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_10; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 4469h call ___assert_fail loc_67DD5: lea rdi, aMPlusEKgamma; "M_plus.e <= kGamma" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_10; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 446Ah call ___assert_fail loc_67DF4: lea rdi, aP10; "p1 > 0" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_10; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 447Fh call ___assert_fail loc_67E13: lea rdi, aP2Delta; "p2 > delta" lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe_10; "void nlohmann::detail::dtoa_impl::grisu"... mov edx, 44FAh call ___assert_fail
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, unsigned int *a2, _DWORD *a3, long long a4, int a5, long long a6, char a7, int a8, unsigned long long a9, int a10) { unsigned long long v12; // r12 int v13; // eax int v14; // ecx unsigned long long v15; // r9 unsigned long long v16; // rdx int v17; // r10d unsigned long long v18; // rsi void (*v19)(void *, unsigned long long); // rdi int v20; // r13d BOOL v21; // r13d unsigned long long v22; // r8 unsigned int v23; // r13d unsigned int v24; // eax unsigned int v25; // eax long long v26; // r15 unsigned long long v27; // r11 int v28; // eax unsigned long long v29; // r8 unsigned long long v30; // rdi long long v31; // r11 char *v32; // rsi nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v33; // rdi int v34; // edx unsigned long long v35; // rcx long long v38; // [rsp+8h] [rbp-40h] BYREF int v39; // [rsp+10h] [rbp-38h] v38 = a4; v39 = a5; if ( a10 <= -61 ) __assert_fail( "M_plus.e >= kAlpha", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17513LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); if ( a10 >= -31 ) __assert_fail( "M_plus.e <= kGamma", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17514LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v12 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &v38); v13 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &a7); v14 = -a10; v15 = 1LL << -(char)a10; v16 = a9 >> -(char)a10; if ( !(_DWORD)v16 ) __assert_fail( "p1 > 0", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17535LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v17 = v13; v18 = v15 - 1; if ( (unsigned int)v16 <= 0x3B9AC9FF ) { if ( (unsigned int)v16 <= 0x5F5E0FF ) { if ( (unsigned int)v16 <= 0x98967F ) { if ( (unsigned int)v16 <= 0xF423F ) { if ( (unsigned int)v16 <= 0x1869F ) { if ( (unsigned int)v16 <= 0x270F ) { if ( (unsigned int)v16 <= 0x3E7 ) { if ( (unsigned int)v16 <= 0x63 ) { v21 = (unsigned int)v16 >= 0xA; LODWORD(v19) = 9 * v21 + 1; v20 = v21 + 1; } else { LODWORD(v19) = 100; v20 = 3; } } else { LODWORD(v19) = 1000; v20 = 4; } } else { LODWORD(v19) = 10000; v20 = 5; } } else { v19 = operator delete; v20 = 6; } } else { LODWORD(v19) = 1000000; v20 = 7; } } else { LODWORD(v19) = 10000000; v20 = 8; } } else { LODWORD(v19) = 100000000; v20 = 9; } } else { LODWORD(v19) = 1000000000; v20 = 10; } v22 = v18 & a9; v23 = v20 + 1; do { v24 = v16; LODWORD(v16) = (unsigned int)v16 % (unsigned int)v19; v25 = v24 / (unsigned int)v19; if ( v25 >= 0xA ) __assert_fail( "d <= 9", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17571LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v26 = (int)*a2; *a2 = v26 + 1; *((_BYTE *)this + v26) = v25 | 0x30; v27 = v22 + ((unsigned long long)(unsigned int)v16 << v14); if ( v27 <= v12 ) { *a3 = v23 + *a3 - 2; v15 = (unsigned long long)(unsigned int)v19 << v14; v32 = (char *)*a2; v33 = this; v34 = v17; v35 = v12; v22 = v27; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round( v33, v32, v34, v35, v22, v15, (unsigned long long)a3); } LODWORD(v19) = (unsigned int)v19 / 0xA; --v23; } while ( v23 > 1 ); if ( v22 <= v12 ) __assert_fail( "p2 > delta", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17658LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v28 = 0; do { if ( v22 >= 0x199999999999999ALL ) __assert_fail( "p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17669LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v29 = 10 * v22; v30 = v29 >> v14; if ( v29 >> v14 >= 0xA ) __assert_fail( "d <= 9", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 17678LL, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)"); v22 = v18 & v29; v31 = (int)*a2; *a2 = v31 + 1; *((_BYTE *)this + v31) = v30 | 0x30; v12 *= 10LL; v17 *= 10; --v28; } while ( v22 > v12 ); *a3 += v28; v32 = (char *)*a2; v33 = this; v34 = v17; v35 = v12; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(v33, v32, v34, v35, v22, v15, (unsigned long long)a3); }
grisu2_digit_gen: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RCX MOV dword ptr [RSP + 0x10],R8D MOV EAX,dword ptr [RSP + 0x68] CMP EAX,-0x3d JLE 0x00167db6 MOV qword ptr [RSP],RDX CMP EAX,-0x1f JGE 0x00167dd5 MOV R14,RSI MOV RBX,RDI LEA R13,[RSP + 0x60] LEA RBP,[RSP + 0x50] LEA RSI,[RSP + 0x8] MOV RDI,R13 CALL 0x00167e32 MOV R12,RAX MOV RDI,R13 MOV RSI,RBP CALL 0x00167e32 XOR ECX,ECX SUB ECX,dword ptr [R13 + 0x8] MOV R9D,0x1 SHL R9,CL MOV R8,qword ptr [R13] MOV RDX,R8 SHR RDX,CL TEST EDX,EDX JZ 0x00167df4 MOV R10,RAX LEA RSI,[R9 + -0x1] CMP EDX,0x3b9ac9ff JBE 0x00167bbb MOV EDI,0x3b9aca00 MOV R13D,0xa JMP 0x00167c60 LAB_00167bbb: CMP EDX,0x5f5e0ff JBE 0x00167bd3 MOV EDI,0x5f5e100 MOV R13D,0x9 JMP 0x00167c60 LAB_00167bd3: CMP EDX,0x98967f JBE 0x00167be8 MOV EDI,0x989680 MOV R13D,0x8 JMP 0x00167c60 LAB_00167be8: CMP EDX,0xf423f JBE 0x00167bfd MOV EDI,0xf4240 MOV R13D,0x7 JMP 0x00167c60 LAB_00167bfd: CMP EDX,0x1869f JBE 0x00167c12 MOV EDI,0x186a0 MOV R13D,0x6 JMP 0x00167c60 LAB_00167c12: CMP EDX,0x270f JBE 0x00167c27 MOV EDI,0x2710 MOV R13D,0x5 JMP 0x00167c60 LAB_00167c27: CMP EDX,0x3e7 JBE 0x00167c3c MOV EDI,0x3e8 MOV R13D,0x4 JMP 0x00167c60 LAB_00167c3c: CMP EDX,0x63 JBE 0x00167c4e MOV EDI,0x64 MOV R13D,0x3 JMP 0x00167c60 LAB_00167c4e: XOR R13D,R13D CMP EDX,0xa SETNC R13B LEA EDI,[R13 + R13*0x8 + 0x1] INC R13D LAB_00167c60: AND R8,RSI INC R13D MOV EBP,0xcccccccd LAB_00167c6b: MOV EAX,EDX XOR EDX,EDX DIV EDI CMP EAX,0xa JNC 0x00167d59 MOVSXD R15,dword ptr [R14] LEA R11D,[R15 + 0x1] MOV dword ptr [R14],R11D MOV R11D,EDX SHL R11,CL OR AL,0x30 MOV byte ptr [RBX + R15*0x1],AL ADD R11,R8 CMP R11,R12 JBE 0x00167d22 MOV EDI,EDI IMUL RDI,RBP SHR RDI,0x23 DEC R13D CMP R13D,0x1 JA 0x00167c6b CMP R8,R12 JBE 0x00167e13 XOR EAX,EAX MOV RDX,0x199999999999999a LAB_00167cc4: CMP R8,RDX JNC 0x00167d78 ADD R8,R8 LEA R8,[R8 + R8*0x4] MOV RDI,R8 SHR RDI,CL CMP RDI,0xa JNC 0x00167d97 AND R8,RSI OR DIL,0x30 MOVSXD R11,dword ptr [R14] LEA EBP,[R11 + 0x1] MOV dword ptr [R14],EBP MOV byte ptr [RBX + R11*0x1],DIL ADD R12,R12 LEA R12,[R12 + R12*0x4] ADD R10,R10 LEA R10,[R10 + R10*0x4] DEC EAX CMP R8,R12 JA 0x00167cc4 MOV RCX,qword ptr [RSP] ADD dword ptr [RCX],EAX MOV ESI,dword ptr [R14] MOV RDI,RBX MOV RDX,R10 MOV RCX,R12 JMP 0x00167d45 LAB_00167d22: MOV RDX,qword ptr [RSP] MOV EAX,dword ptr [RDX] ADD EAX,R13D ADD EAX,-0x2 MOV dword ptr [RDX],EAX MOV R9D,EDI SHL R9,CL MOV ESI,dword ptr [R14] MOV RDI,RBX MOV RDX,R10 MOV RCX,R12 MOV R8,R11 LAB_00167d45: CALL 0x00167e83 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00167d59: LEA RDI,[0x1bc488] LEA RSI,[0x1b6ca6] LEA RCX,[0x1bc410] MOV EDX,0x44a3 CALL 0x00118470 LAB_00167d78: LEA RDI,[0x1bc49a] LEA RSI,[0x1b6ca6] LEA RCX,[0x1bc410] MOV EDX,0x4505 CALL 0x00118470 LAB_00167d97: LEA RDI,[0x1bc488] LEA RSI,[0x1b6ca6] LEA RCX,[0x1bc410] MOV EDX,0x450e CALL 0x00118470 LAB_00167db6: LEA RDI,[0x1bc3fd] LEA RSI,[0x1b6ca6] LEA RCX,[0x1bc410] MOV EDX,0x4469 CALL 0x00118470 LAB_00167dd5: LEA RDI,[0x1bc46e] LEA RSI,[0x1b6ca6] LEA RCX,[0x1bc410] MOV EDX,0x446a CALL 0x00118470 LAB_00167df4: LEA RDI,[0x1bc481] LEA RSI,[0x1b6ca6] LEA RCX,[0x1bc410] MOV EDX,0x447f CALL 0x00118470 LAB_00167e13: LEA RDI,[0x1bc48f] LEA RSI,[0x1b6ca6] LEA RCX,[0x1bc410] MOV EDX,0x44fa CALL 0x00118470
/* 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 (char *param_1,int *param_2,int *param_3,int8 param_4,int4 param_5) { int iVar1; byte bVar2; int iVar3; ulong uVar4; ulong uVar5; ulong uVar6; ulong uVar7; ulong uVar8; ulong uVar9; ulong uVar10; uint uVar11; ulong in_stack_00000018; int in_stack_00000020; int8 local_40; int4 local_38; local_40 = param_4; local_38 = param_5; if (in_stack_00000020 < -0x3c) { /* WARNING: Subroutine does not return */ __assert_fail("M_plus.e >= kAlpha", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 0x4469, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)" ); } if (-0x20 < in_stack_00000020) { /* WARNING: Subroutine does not return */ __assert_fail("M_plus.e <= kGamma", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 0x446a, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)" ); } uVar4 = diyfp::sub((diyfp *)&stack0x00000018,(diyfp *)&local_40); uVar5 = diyfp::sub((diyfp *)&stack0x00000018,&stack0x00000008); bVar2 = -(char)in_stack_00000020; uVar9 = 1L << (bVar2 & 0x3f); uVar6 = in_stack_00000018 >> (bVar2 & 0x3f); uVar11 = (uint)uVar6; if (uVar11 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("p1 > 0", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 0x447f, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)" ); } if (uVar11 < 1000000000) { if (uVar11 < 100000000) { if (uVar11 < 10000000) { if (uVar11 < 1000000) { if (uVar11 < 100000) { if (uVar11 < 10000) { if (uVar11 < 1000) { if (uVar11 < 100) { uVar7 = (ulong)(9 < uVar11) * 9 + 1; iVar3 = (9 < uVar11) + 1; } else { uVar7 = 100; iVar3 = 3; } } else { uVar7 = 1000; iVar3 = 4; } } else { uVar7 = 10000; iVar3 = 5; } } else { uVar7 = 100000; iVar3 = 6; } } else { uVar7 = 1000000; iVar3 = 7; } } else { uVar7 = 10000000; iVar3 = 8; } } else { uVar7 = 100000000; iVar3 = 9; } } else { uVar7 = 1000000000; iVar3 = 10; } uVar8 = in_stack_00000018 & uVar9 - 1; uVar11 = iVar3 + 1; while( true ) { uVar10 = (uVar6 & 0xffffffff) / uVar7; uVar6 = (uVar6 & 0xffffffff) % uVar7; if (9 < (uint)uVar10) { /* WARNING: Subroutine does not return */ __assert_fail("d <= 9", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 0x44a3, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)" ); } iVar3 = *param_2; *param_2 = iVar3 + 1; param_1[iVar3] = (byte)uVar10 | 0x30; uVar10 = (uVar6 << (bVar2 & 0x3f)) + uVar8; if (uVar10 <= uVar4) break; uVar7 = uVar7 / 10; uVar11 = uVar11 - 1; if (uVar11 < 2) { if (uVar8 <= uVar4) { /* WARNING: Subroutine does not return */ __assert_fail("p2 > delta", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 0x44fa, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)" ); } iVar3 = 0; do { if (0x1999999999999999 < uVar8) { /* WARNING: Subroutine does not return */ __assert_fail("p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp" ,0x4505, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)" ); } uVar6 = uVar8 * 10 >> (bVar2 & 0x3f); if (9 < uVar6) { /* WARNING: Subroutine does not return */ __assert_fail("d <= 9", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp" ,0x450e, "void nlohmann::detail::dtoa_impl::grisu2_digit_gen(char *, int &, int &, diyfp, diyfp, diyfp)" ); } uVar8 = uVar8 * 10 & uVar9 - 1; iVar1 = *param_2; *param_2 = iVar1 + 1; param_1[iVar1] = (byte)uVar6 | 0x30; uVar4 = uVar4 * 10; uVar5 = uVar5 * 10; iVar3 = iVar3 + -1; } while (uVar4 < uVar8); *param_3 = *param_3 + iVar3; iVar3 = *param_2; uVar10 = uVar8; LAB_00167d45: grisu2_round(param_1,iVar3,uVar5,uVar4,uVar10,uVar9); return; } } *param_3 = *param_3 + uVar11 + -2; uVar9 = uVar7 << (bVar2 & 0x3f); iVar3 = *param_2; goto LAB_00167d45; }
9,064
ftxui::EatCodePoint(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long*, unsigned int*)
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/screen/string.cpp
bool EatCodePoint(const std::string& input, size_t start, size_t* end, uint32_t* ucs) { if (start >= input.size()) { *end = start + 1; return false; } const uint8_t C0 = input[start]; // 1 byte string. if ((C0 & 0b1000'0000) == 0b0000'0000) { // NOLINT *ucs = C0 & 0b0111'1111; // NOLINT *end = start + 1; return true; } // 2 byte string. if ((C0 & 0b1110'0000) == 0b1100'0000 && // NOLINT start + 1 < input.size()) { const uint8_t C1 = input[start + 1]; *ucs = 0; *ucs += C0 & 0b0001'1111; // NOLINT *ucs <<= 6; // NOLINT *ucs += C1 & 0b0011'1111; // NOLINT *end = start + 2; return true; } // 3 byte string. if ((C0 & 0b1111'0000) == 0b1110'0000 && // NOLINT start + 2 < input.size()) { const uint8_t C1 = input[start + 1]; const uint8_t C2 = input[start + 2]; *ucs = 0; *ucs += C0 & 0b0000'1111; // NOLINT *ucs <<= 6; // NOLINT *ucs += C1 & 0b0011'1111; // NOLINT *ucs <<= 6; // NOLINT *ucs += C2 & 0b0011'1111; // NOLINT *end = start + 3; return true; } // 4 byte string. if ((C0 & 0b1111'1000) == 0b1111'0000 && // NOLINT start + 3 < input.size()) { const uint8_t C1 = input[start + 1]; const uint8_t C2 = input[start + 2]; const uint8_t C3 = input[start + 3]; *ucs = 0; *ucs += C0 & 0b0000'0111; // NOLINT *ucs <<= 6; // NOLINT *ucs += C1 & 0b0011'1111; // NOLINT *ucs <<= 6; // NOLINT *ucs += C2 & 0b0011'1111; // NOLINT *ucs <<= 6; // NOLINT *ucs += C3 & 0b0011'1111; // NOLINT *end = start + 4; return true; } *end = start + 1; return false; }
O0
cpp
ftxui::EatCodePoint(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long, unsigned long*, unsigned int*): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rdi callq 0xd3c0 movq %rax, %rcx movq -0x38(%rbp), %rax cmpq %rcx, %rax jb 0x8cf5d movq -0x18(%rbp), %rcx addq $0x1, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x1(%rbp) jmp 0x8d20c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0xd650 movb (%rax), %al movb %al, -0x29(%rbp) movzbl -0x29(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax jne 0x8cfa2 movzbl -0x29(%rbp), %ecx andl $0x7f, %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rcx addq $0x1, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x8d20c movzbl -0x29(%rbp), %eax andl $0xe0, %eax cmpl $0xc0, %eax jne 0x8d038 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi callq 0xd3c0 movq %rax, %rcx movq -0x40(%rbp), %rax cmpq %rcx, %rax jae 0x8d038 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi addq $0x1, %rsi callq 0xd650 movb (%rax), %al movb %al, -0x2a(%rbp) movq -0x28(%rbp), %rax movl $0x0, (%rax) movzbl -0x29(%rbp), %ecx andl $0x1f, %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x28(%rbp), %rax movl (%rax), %ecx shll $0x6, %ecx movl %ecx, (%rax) movzbl -0x2a(%rbp), %ecx andl $0x3f, %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x18(%rbp), %rcx addq $0x2, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x8d20c movzbl -0x29(%rbp), %eax andl $0xf0, %eax cmpl $0xe0, %eax jne 0x8d102 movq -0x18(%rbp), %rax addq $0x2, %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rdi callq 0xd3c0 movq %rax, %rcx movq -0x48(%rbp), %rax cmpq %rcx, %rax jae 0x8d102 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi addq $0x1, %rsi callq 0xd650 movb (%rax), %al movb %al, -0x2b(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi addq $0x2, %rsi callq 0xd650 movb (%rax), %al movb %al, -0x2c(%rbp) movq -0x28(%rbp), %rax movl $0x0, (%rax) movzbl -0x29(%rbp), %ecx andl $0xf, %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x28(%rbp), %rax movl (%rax), %ecx shll $0x6, %ecx movl %ecx, (%rax) movzbl -0x2b(%rbp), %ecx andl $0x3f, %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x28(%rbp), %rax movl (%rax), %ecx shll $0x6, %ecx movl %ecx, (%rax) movzbl -0x2c(%rbp), %ecx andl $0x3f, %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x18(%rbp), %rcx addq $0x3, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x8d20c movzbl -0x29(%rbp), %eax andl $0xf8, %eax cmpl $0xf0, %eax jne 0x8d1f9 movq -0x18(%rbp), %rax addq $0x3, %rax movq %rax, -0x50(%rbp) movq -0x10(%rbp), %rdi callq 0xd3c0 movq %rax, %rcx movq -0x50(%rbp), %rax cmpq %rcx, %rax jae 0x8d1f9 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi addq $0x1, %rsi callq 0xd650 movb (%rax), %al movb %al, -0x2d(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi addq $0x2, %rsi callq 0xd650 movb (%rax), %al movb %al, -0x2e(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi addq $0x3, %rsi callq 0xd650 movb (%rax), %al movb %al, -0x2f(%rbp) movq -0x28(%rbp), %rax movl $0x0, (%rax) movzbl -0x29(%rbp), %ecx andl $0x7, %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x28(%rbp), %rax movl (%rax), %ecx shll $0x6, %ecx movl %ecx, (%rax) movzbl -0x2d(%rbp), %ecx andl $0x3f, %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x28(%rbp), %rax movl (%rax), %ecx shll $0x6, %ecx movl %ecx, (%rax) movzbl -0x2e(%rbp), %ecx andl $0x3f, %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x28(%rbp), %rax movl (%rax), %ecx shll $0x6, %ecx movl %ecx, (%rax) movzbl -0x2f(%rbp), %ecx andl $0x3f, %ecx movq -0x28(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) movq -0x18(%rbp), %rcx addq $0x4, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x8d20c movq -0x18(%rbp), %rcx addq $0x1, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_ZN5ftxui12EatCodePointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmPmPj: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] mov [rbp+var_38], rax mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rbp+var_38] cmp rax, rcx jb short loc_8CF5D mov rcx, [rbp+var_18] add rcx, 1 mov rax, [rbp+var_20] mov [rax], rcx mov [rbp+var_1], 0 jmp loc_8D20C loc_8CF5D: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rbp+var_29], al movzx eax, [rbp+var_29] and eax, 80h cmp eax, 0 jnz short loc_8CFA2 movzx ecx, [rbp+var_29] and ecx, 7Fh mov rax, [rbp+var_28] mov [rax], ecx mov rcx, [rbp+var_18] add rcx, 1 mov rax, [rbp+var_20] mov [rax], rcx mov [rbp+var_1], 1 jmp loc_8D20C loc_8CFA2: movzx eax, [rbp+var_29] and eax, 0E0h cmp eax, 0C0h jnz loc_8D038 mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_40], rax mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rbp+var_40] cmp rax, rcx jnb short loc_8D038 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] add rsi, 1 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rbp+var_2A], al mov rax, [rbp+var_28] mov dword ptr [rax], 0 movzx ecx, [rbp+var_29] and ecx, 1Fh mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rax, [rbp+var_28] mov ecx, [rax] shl ecx, 6 mov [rax], ecx movzx ecx, [rbp+var_2A] and ecx, 3Fh mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rcx, [rbp+var_18] add rcx, 2 mov rax, [rbp+var_20] mov [rax], rcx mov [rbp+var_1], 1 jmp loc_8D20C loc_8D038: movzx eax, [rbp+var_29] and eax, 0F0h cmp eax, 0E0h jnz loc_8D102 mov rax, [rbp+var_18] add rax, 2 mov [rbp+var_48], rax mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rbp+var_48] cmp rax, rcx jnb loc_8D102 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] add rsi, 1 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rbp+var_2B], al mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] add rsi, 2 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rbp+var_2C], al mov rax, [rbp+var_28] mov dword ptr [rax], 0 movzx ecx, [rbp+var_29] and ecx, 0Fh mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rax, [rbp+var_28] mov ecx, [rax] shl ecx, 6 mov [rax], ecx movzx ecx, [rbp+var_2B] and ecx, 3Fh mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rax, [rbp+var_28] mov ecx, [rax] shl ecx, 6 mov [rax], ecx movzx ecx, [rbp+var_2C] and ecx, 3Fh mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rcx, [rbp+var_18] add rcx, 3 mov rax, [rbp+var_20] mov [rax], rcx mov [rbp+var_1], 1 jmp loc_8D20C loc_8D102: movzx eax, [rbp+var_29] and eax, 0F8h cmp eax, 0F0h jnz loc_8D1F9 mov rax, [rbp+var_18] add rax, 3 mov [rbp+var_50], rax mov rdi, [rbp+var_10] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, rax mov rax, [rbp+var_50] cmp rax, rcx jnb loc_8D1F9 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] add rsi, 1 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rbp+var_2D], al mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] add rsi, 2 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rbp+var_2E], al mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] add rsi, 3 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov al, [rax] mov [rbp+var_2F], al mov rax, [rbp+var_28] mov dword ptr [rax], 0 movzx ecx, [rbp+var_29] and ecx, 7 mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rax, [rbp+var_28] mov ecx, [rax] shl ecx, 6 mov [rax], ecx movzx ecx, [rbp+var_2D] and ecx, 3Fh mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rax, [rbp+var_28] mov ecx, [rax] shl ecx, 6 mov [rax], ecx movzx ecx, [rbp+var_2E] and ecx, 3Fh mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rax, [rbp+var_28] mov ecx, [rax] shl ecx, 6 mov [rax], ecx movzx ecx, [rbp+var_2F] and ecx, 3Fh mov rax, [rbp+var_28] add ecx, [rax] mov [rax], ecx mov rcx, [rbp+var_18] add rcx, 4 mov rax, [rbp+var_20] mov [rax], rcx mov [rbp+var_1], 1 jmp short loc_8D20C loc_8D1F9: mov rcx, [rbp+var_18] add rcx, 1 mov rax, [rbp+var_20] mov [rax], rcx mov [rbp+var_1], 0 loc_8D20C: mov al, [rbp+var_1] and al, 1 add rsp, 50h pop rbp retn
char ftxui::EatCodePoint(long long a1, unsigned long long a2, _QWORD *a3, int *a4) { char v5; // [rsp+21h] [rbp-2Fh] char v6; // [rsp+22h] [rbp-2Eh] char v7; // [rsp+23h] [rbp-2Dh] char v8; // [rsp+24h] [rbp-2Ch] char v9; // [rsp+25h] [rbp-2Bh] char v10; // [rsp+26h] [rbp-2Ah] char v11; // [rsp+27h] [rbp-29h] if ( a2 < std::string::size(a1) ) { v11 = *(_BYTE *)std::string::operator[](a1, a2); if ( v11 < 0 ) { if ( (v11 & 0xE0) == 0xC0 && a2 + 1 < std::string::size(a1) ) { v10 = *(_BYTE *)std::string::operator[](a1, a2 + 1); *a4 = 0; *a4 += v11 & 0x1F; *a4 <<= 6; *a4 += v10 & 0x3F; *a3 = a2 + 2; return 1; } else if ( (v11 & 0xF0) == 0xE0 && a2 + 2 < std::string::size(a1) ) { v9 = *(_BYTE *)std::string::operator[](a1, a2 + 1); v8 = *(_BYTE *)std::string::operator[](a1, a2 + 2); *a4 = 0; *a4 += v11 & 0xF; *a4 <<= 6; *a4 += v9 & 0x3F; *a4 <<= 6; *a4 += v8 & 0x3F; *a3 = a2 + 3; return 1; } else if ( (v11 & 0xF8) == 0xF0 && a2 + 3 < std::string::size(a1) ) { v7 = *(_BYTE *)std::string::operator[](a1, a2 + 1); v6 = *(_BYTE *)std::string::operator[](a1, a2 + 2); v5 = *(_BYTE *)std::string::operator[](a1, a2 + 3); *a4 = 0; *a4 += v11 & 7; *a4 <<= 6; *a4 += v7 & 0x3F; *a4 <<= 6; *a4 += v6 & 0x3F; *a4 <<= 6; *a4 += v5 & 0x3F; *a3 = a2 + 4; return 1; } else { *a3 = a2 + 1; return 0; } } else { *a4 = v11 & 0x7F; *a3 = a2 + 1; return 1; } } else { *a3 = a2 + 1; return 0; } }
EatCodePoint: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d3c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,RCX JC 0x0018cf5d MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 JMP 0x0018d20c LAB_0018cf5d: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0010d650 MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x29],AL MOVZX EAX,byte ptr [RBP + -0x29] AND EAX,0x80 CMP EAX,0x0 JNZ 0x0018cfa2 MOVZX ECX,byte ptr [RBP + -0x29] AND ECX,0x7f MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0018d20c LAB_0018cfa2: MOVZX EAX,byte ptr [RBP + -0x29] AND EAX,0xe0 CMP EAX,0xc0 JNZ 0x0018d038 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d3c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] CMP RAX,RCX JNC 0x0018d038 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x1 CALL 0x0010d650 MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x2a],AL MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0x0 MOVZX ECX,byte ptr [RBP + -0x29] AND ECX,0x1f MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] SHL ECX,0x6 MOV dword ptr [RAX],ECX MOVZX ECX,byte ptr [RBP + -0x2a] AND ECX,0x3f MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x2 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0018d20c LAB_0018d038: MOVZX EAX,byte ptr [RBP + -0x29] AND EAX,0xf0 CMP EAX,0xe0 JNZ 0x0018d102 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d3c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,RCX JNC 0x0018d102 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x1 CALL 0x0010d650 MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x2b],AL MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x2 CALL 0x0010d650 MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x2c],AL MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0x0 MOVZX ECX,byte ptr [RBP + -0x29] AND ECX,0xf MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] SHL ECX,0x6 MOV dword ptr [RAX],ECX MOVZX ECX,byte ptr [RBP + -0x2b] AND ECX,0x3f MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] SHL ECX,0x6 MOV dword ptr [RAX],ECX MOVZX ECX,byte ptr [RBP + -0x2c] AND ECX,0x3f MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x3 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0018d20c LAB_0018d102: MOVZX EAX,byte ptr [RBP + -0x29] AND EAX,0xf8 CMP EAX,0xf0 JNZ 0x0018d1f9 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x3 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010d3c0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,RCX JNC 0x0018d1f9 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x1 CALL 0x0010d650 MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x2d],AL MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x2 CALL 0x0010d650 MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x2e],AL MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x3 CALL 0x0010d650 MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x2f],AL MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],0x0 MOVZX ECX,byte ptr [RBP + -0x29] AND ECX,0x7 MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] SHL ECX,0x6 MOV dword ptr [RAX],ECX MOVZX ECX,byte ptr [RBP + -0x2d] AND ECX,0x3f MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] SHL ECX,0x6 MOV dword ptr [RAX],ECX MOVZX ECX,byte ptr [RBP + -0x2e] AND ECX,0x3f MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX] SHL ECX,0x6 MOV dword ptr [RAX],ECX MOVZX ECX,byte ptr [RBP + -0x2f] AND ECX,0x3f MOV RAX,qword ptr [RBP + -0x28] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x4 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x1 JMP 0x0018d20c LAB_0018d1f9: MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV byte ptr [RBP + -0x1],0x0 LAB_0018d20c: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x50 POP RBP RET
/* ftxui::EatCodePoint(std::__cxx11::string const&, unsigned long, unsigned long*, unsigned int*) */ int1 ftxui::EatCodePoint(string *param_1,ulong param_2,ulong *param_3,uint *param_4) { byte bVar1; byte bVar2; byte bVar3; byte bVar4; ulong uVar5; byte *pbVar6; int1 local_9; uVar5 = std::__cxx11::string::size(); if (param_2 < uVar5) { pbVar6 = (byte *)std::__cxx11::string::operator[]((ulong)param_1); bVar1 = *pbVar6; if ((bVar1 & 0x80) == 0) { *param_4 = bVar1 & 0x7f; *param_3 = param_2 + 1; local_9 = 1; } else { if (((bVar1 & 0xe0) == 0xc0) && (uVar5 = std::__cxx11::string::size(), param_2 + 1 < uVar5)) { pbVar6 = (byte *)std::__cxx11::string::operator[]((ulong)param_1); bVar2 = *pbVar6; *param_4 = 0; *param_4 = (bVar1 & 0x1f) + *param_4; *param_4 = *param_4 << 6; *param_4 = (bVar2 & 0x3f) + *param_4; *param_3 = param_2 + 2; return 1; } if (((bVar1 & 0xf0) == 0xe0) && (uVar5 = std::__cxx11::string::size(), param_2 + 2 < uVar5)) { pbVar6 = (byte *)std::__cxx11::string::operator[]((ulong)param_1); bVar2 = *pbVar6; pbVar6 = (byte *)std::__cxx11::string::operator[]((ulong)param_1); bVar3 = *pbVar6; *param_4 = 0; *param_4 = (bVar1 & 0xf) + *param_4; *param_4 = *param_4 << 6; *param_4 = (bVar2 & 0x3f) + *param_4; *param_4 = *param_4 << 6; *param_4 = (bVar3 & 0x3f) + *param_4; *param_3 = param_2 + 3; return 1; } if (((bVar1 & 0xf8) == 0xf0) && (uVar5 = std::__cxx11::string::size(), param_2 + 3 < uVar5)) { pbVar6 = (byte *)std::__cxx11::string::operator[]((ulong)param_1); bVar2 = *pbVar6; pbVar6 = (byte *)std::__cxx11::string::operator[]((ulong)param_1); bVar3 = *pbVar6; pbVar6 = (byte *)std::__cxx11::string::operator[]((ulong)param_1); bVar4 = *pbVar6; *param_4 = 0; *param_4 = (bVar1 & 7) + *param_4; *param_4 = *param_4 << 6; *param_4 = (bVar2 & 0x3f) + *param_4; *param_4 = *param_4 << 6; *param_4 = (bVar3 & 0x3f) + *param_4; *param_4 = *param_4 << 6; *param_4 = (bVar4 & 0x3f) + *param_4; *param_3 = param_2 + 4; return 1; } *param_3 = param_2 + 1; local_9 = 0; } } else { *param_3 = param_2 + 1; local_9 = 0; } return local_9; }
9,065
ggml_rms_norm_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_rms_norm_impl( struct ggml_context * ctx, struct ggml_tensor * a, float eps, bool inplace) { struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params(result, &eps, sizeof(eps)); result->op = GGML_OP_RMS_NORM; result->src[0] = a; return result; }
O0
c
ggml_rms_norm_impl: subq $0x28, %rsp movb %dl, %al movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movss %xmm0, 0x14(%rsp) andb $0x1, %al movb %al, 0x13(%rsp) testb $0x1, 0x13(%rsp) je 0x4c938 movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x408f0 movq %rax, (%rsp) jmp 0x4c94b movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x43c20 movq %rax, (%rsp) movq (%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rdi leaq 0x14(%rsp), %rsi movl $0x4, %edx callq 0x4c4d0 movq 0x8(%rsp), %rax movl $0x17, 0x50(%rax) movq 0x18(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x8(%rsp), %rax addq $0x28, %rsp retq nop
ggml_rms_norm_impl: sub rsp, 28h mov al, dl mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi movss [rsp+28h+var_14], xmm0 and al, 1 mov [rsp+28h+var_15], al test [rsp+28h+var_15], 1 jz short loc_4C938 mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] call _ggml_view_tensor mov [rsp+28h+var_28], rax jmp short loc_4C94B loc_4C938: mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_10] call _ggml_dup_tensor mov [rsp+28h+var_28], rax loc_4C94B: mov rax, [rsp+28h+var_28] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_20] lea rsi, [rsp+28h+var_14] mov edx, 4 call ggml_set_op_params mov rax, [rsp+28h+var_20] mov dword ptr [rax+50h], 17h mov rcx, [rsp+28h+var_10] mov rax, [rsp+28h+var_20] mov [rax+98h], rcx mov rax, [rsp+28h+var_20] add rsp, 28h retn
long long ggml_rms_norm_impl( long long a1, unsigned int *a2, char a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v12; // [rsp+0h] [rbp-28h] __int32 v13; // [rsp+14h] [rbp-14h] BYREF unsigned int *v14; // [rsp+18h] [rbp-10h] long long v15; // [rsp+20h] [rbp-8h] v15 = a1; v14 = a2; v13 = a4.m128_i32[0]; if ( (a3 & 1) != 0 ) v12 = (long long)ggml_view_tensor(v15, (long long)v14, a4, a5, a6, a7, a8, a9, a10, a11); else v12 = ggml_dup_tensor(v15, v14); ggml_set_op_params(v12, (long long)&v13, 4LL); *(_DWORD *)(v12 + 80) = 23; *(_QWORD *)(v12 + 152) = v14; return v12; }
ggml_rms_norm_impl: SUB RSP,0x28 MOV AL,DL MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOVSS dword ptr [RSP + 0x14],XMM0 AND AL,0x1 MOV byte ptr [RSP + 0x13],AL TEST byte ptr [RSP + 0x13],0x1 JZ 0x0014c938 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001408f0 MOV qword ptr [RSP],RAX JMP 0x0014c94b LAB_0014c938: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00143c20 MOV qword ptr [RSP],RAX LAB_0014c94b: MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x14] MOV EDX,0x4 CALL 0x0014c4d0 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x50],0x17 MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x28 RET
long ggml_rms_norm_impl(int4 param_1,int8 param_2,int8 param_3,byte param_4) { long local_28; int4 local_14; int8 local_10; int8 local_8; local_14 = param_1; local_10 = param_3; local_8 = param_2; if ((param_4 & 1) == 0) { local_28 = ggml_dup_tensor(param_2,param_3); } else { local_28 = ggml_view_tensor(param_2,param_3); } ggml_set_op_params(local_28,&local_14,4); *(int4 *)(local_28 + 0x50) = 0x17; *(int8 *)(local_28 + 0x98) = local_10; return local_28; }
9,066
ggml_rms_norm_impl
ngxson[P]ggml-easy/ggml/src/ggml.c
static struct ggml_tensor * ggml_rms_norm_impl( struct ggml_context * ctx, struct ggml_tensor * a, float eps, bool inplace) { struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params(result, &eps, sizeof(eps)); result->op = GGML_OP_RMS_NORM; result->src[0] = a; return result; }
O2
c
ggml_rms_norm_impl: pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movss %xmm0, 0x4(%rsp) testl %edx, %edx je 0x210e5 callq 0x1c3e0 jmp 0x210ea callq 0x1d660 movq %rax, %r14 leaq 0x4(%rsp), %rsi pushq $0x4 popq %rdx movq %rax, %rdi callq 0x20fbc movl $0x17, 0x50(%r14) movq %rbx, 0x98(%r14) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
ggml_rms_norm_impl: push r14 push rbx push rax mov rbx, rsi movss [rsp+18h+var_14], xmm0 test edx, edx jz short loc_210E5 call _ggml_view_tensor jmp short loc_210EA loc_210E5: call _ggml_dup_tensor loc_210EA: mov r14, rax lea rsi, [rsp+18h+var_14] push 4 pop rdx mov rdi, rax call ggml_set_op_params mov dword ptr [r14+50h], 17h mov [r14+98h], rbx mov rax, r14 add rsp, 8 pop rbx pop r14 retn
long long ggml_rms_norm_impl( long long a1, unsigned int *a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11) { long long v11; // rax long long v12; // rcx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 long long v17; // r14 __int32 v19[5]; // [rsp+0h] [rbp-14h] BYREF v19[0] = a4.m128_i32[0]; if ( a3 ) v11 = ggml_view_tensor(a1, (long long)a2, a4, a5, a6, a7, a8, a9, a10, a11); else v11 = ggml_dup_tensor(a1, a2); v17 = v11; ggml_set_op_params(v11, (long long)v19, 4LL, a4, a5, a6, a7, v15, v16, a10, a11, v12, v13, v14); *(_DWORD *)(v17 + 80) = 23; *(_QWORD *)(v17 + 152) = a2; return v17; }
ggml_rms_norm_impl: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOVSS dword ptr [RSP + 0x4],XMM0 TEST EDX,EDX JZ 0x001210e5 CALL 0x0011c3e0 JMP 0x001210ea LAB_001210e5: CALL 0x0011d660 LAB_001210ea: MOV R14,RAX LEA RSI,[RSP + 0x4] PUSH 0x4 POP RDX MOV RDI,RAX CALL 0x00120fbc MOV dword ptr [R14 + 0x50],0x17 MOV qword ptr [R14 + 0x98],RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
long ggml_rms_norm_impl(int8 param_1,int8 param_2,int param_3) { long lVar1; int1 local_14 [4]; if (param_3 == 0) { lVar1 = ggml_dup_tensor(); } else { lVar1 = ggml_view_tensor(); } ggml_set_op_params(lVar1,local_14,4); *(int4 *)(lVar1 + 0x50) = 0x17; *(int8 *)(lVar1 + 0x98) = param_2; return lVar1; }
9,067
httplib::ClientImpl::read_response_line(httplib::Stream&, httplib::Request const&, httplib::Response&) const
hkr04[P]cpp-mcp/common/httplib.h
inline bool ClientImpl::read_response_line(Stream &strm, const Request &req, Response &res) const { std::array<char, 2048> buf{}; detail::stream_line_reader line_reader(strm, buf.data(), buf.size()); if (!line_reader.getline()) { return false; } #ifdef CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR const static std::regex re("(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r?\n"); #else const static std::regex re("(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r\n"); #endif std::cmatch m; if (!std::regex_match(line_reader.ptr(), m, re)) { return req.method == "CONNECT"; } res.version = std::string(m[1]); res.status = std::stoi(std::string(m[2])); res.reason = std::string(m[3]); // Ignore '100 Continue' while (res.status == StatusCode::Continue_100) { if (!line_reader.getline()) { return false; } // CRLF if (!line_reader.getline()) { return false; } // next response line if (!std::regex_match(line_reader.ptr(), m, re)) { return false; } res.version = std::string(m[1]); res.status = std::stoi(std::string(m[2])); res.reason = std::string(m[3]); } return true; }
O0
c
httplib::ClientImpl::read_response_line(httplib::Stream&, httplib::Request const&, httplib::Response&) const: subq $0x9f8, %rsp # imm = 0x9F8 movq %rdi, 0x9e8(%rsp) movq %rsi, 0x9e0(%rsp) movq %rdx, 0x9d8(%rsp) movq %rcx, 0x9d0(%rsp) leaq 0x1d0(%rsp), %rdi movq %rdi, 0x78(%rsp) xorl %esi, %esi movl $0x800, %edx # imm = 0x800 callq 0xb420 movq 0x78(%rsp), %rdi movq 0x9e0(%rsp), %rax movq %rax, 0x80(%rsp) callq 0x16a20 movq 0x78(%rsp), %rdi movq %rax, 0x88(%rsp) callq 0x16a30 movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx movq %rax, %rcx leaq 0x190(%rsp), %rdi movq %rdi, 0x90(%rsp) callq 0x16a40 movq 0x90(%rsp), %rdi callq 0x16a90 movb %al, 0x9f(%rsp) jmp 0x9306a movb 0x9f(%rsp), %al testb $0x1, %al jne 0x930a8 jmp 0x93077 movb $0x0, 0x9f7(%rsp) movl $0x1, 0x180(%rsp) jmp 0x93527 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x188(%rsp) movl %eax, 0x184(%rsp) jmp 0x93545 cmpb $0x0, 0x8b4f1(%rip) # 0x11e5a0 jne 0x93102 leaq 0x8b4e8(%rip), %rdi # 0x11e5a0 callq 0xbe60 cmpl $0x0, %eax je 0x93102 leaq 0x8b4b7(%rip), %rdi # 0x11e580 leaq 0x404b9(%rip), %rsi # 0xd3589 movl $0x10, %edx callq 0x38120 jmp 0x930dc leaq -0x807d3(%rip), %rdi # 0x12910 leaq 0x8b496(%rip), %rsi # 0x11e580 leaq 0x886e7(%rip), %rdx # 0x11b7d8 callq 0xb720 leaq 0x8b4a3(%rip), %rdi # 0x11e5a0 callq 0xb550 leaq 0x160(%rsp), %rdi callq 0x98010 jmp 0x93111 leaq 0x190(%rsp), %rdi callq 0x17b00 movq %rax, 0x70(%rsp) jmp 0x93125 movq 0x70(%rsp), %rdi leaq 0x8b44f(%rip), %rdx # 0x11e580 leaq 0x160(%rsp), %rsi xorl %ecx, %ecx callq 0x98050 movb %al, 0x6f(%rsp) jmp 0x93146 movb 0x6f(%rsp), %al testb $0x1, %al jne 0x931c5 jmp 0x93150 movq 0x9d8(%rsp), %rdi leaq 0x3af28(%rip), %rsi # 0xce087 callq 0x17b50 movb %al, 0x6e(%rsp) jmp 0x9316a movb 0x6e(%rsp), %al andb $0x1, %al movb %al, 0x9f7(%rsp) movl $0x1, 0x180(%rsp) jmp 0x93509 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x188(%rsp) movl %eax, 0x184(%rsp) leaq 0x8b3fe(%rip), %rdi # 0x11e5a0 callq 0xb540 jmp 0x93545 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x188(%rsp) movl %eax, 0x184(%rsp) jmp 0x93518 leaq 0x160(%rsp), %rdi movl $0x1, %esi callq 0x980b0 movq %rax, 0x60(%rsp) jmp 0x931de movq 0x60(%rsp), %rsi leaq 0x140(%rsp), %rdi callq 0x98120 jmp 0x931f2 movq 0x9d0(%rsp), %rdi leaq 0x140(%rsp), %rsi movq %rsi, 0x50(%rsp) callq 0xb9e0 movq 0x50(%rsp), %rdi callq 0xbfb0 leaq 0x160(%rsp), %rdi movl $0x2, %esi callq 0x980b0 movq %rax, 0x58(%rsp) jmp 0x9322f movq 0x58(%rsp), %rsi leaq 0x120(%rsp), %rdi callq 0x98120 jmp 0x93243 xorl %eax, %eax movl %eax, %esi leaq 0x120(%rsp), %rdi movl $0xa, %edx callq 0x98150 movl %eax, 0x4c(%rsp) jmp 0x9325f movl 0x4c(%rsp), %ecx movq 0x9d0(%rsp), %rax movl %ecx, 0x20(%rax) leaq 0x120(%rsp), %rdi callq 0xbfb0 leaq 0x160(%rsp), %rdi movl $0x3, %esi callq 0x980b0 movq %rax, 0x40(%rsp) jmp 0x93294 movq 0x40(%rsp), %rsi leaq 0x100(%rsp), %rdi callq 0x98120 jmp 0x932a8 movq 0x9d0(%rsp), %rdi addq $0x28, %rdi leaq 0x100(%rsp), %rsi callq 0xb9e0 leaq 0x100(%rsp), %rdi callq 0xbfb0 movq 0x9d0(%rsp), %rax cmpl $0x64, 0x20(%rax) jne 0x934f6 leaq 0x190(%rsp), %rdi callq 0x16a90 movb %al, 0x3f(%rsp) jmp 0x932f3 movb 0x3f(%rsp), %al testb $0x1, %al jne 0x9333b jmp 0x932fd movb $0x0, 0x9f7(%rsp) movl $0x1, 0x180(%rsp) jmp 0x93509 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x188(%rsp) movl %eax, 0x184(%rsp) leaq 0x120(%rsp), %rdi callq 0xbfb0 jmp 0x93518 leaq 0x190(%rsp), %rdi callq 0x16a90 movb %al, 0x3e(%rsp) jmp 0x9334e movb 0x3e(%rsp), %al testb $0x1, %al jne 0x93370 jmp 0x93358 movb $0x0, 0x9f7(%rsp) movl $0x1, 0x180(%rsp) jmp 0x93509 leaq 0x190(%rsp), %rdi callq 0x17b00 movq %rax, 0x30(%rsp) jmp 0x93384 movq 0x30(%rsp), %rdi leaq 0x8b1f0(%rip), %rdx # 0x11e580 leaq 0x160(%rsp), %rsi xorl %ecx, %ecx callq 0x98050 movb %al, 0x2f(%rsp) jmp 0x933a5 movb 0x2f(%rsp), %al testb $0x1, %al jne 0x933c7 jmp 0x933af movb $0x0, 0x9f7(%rsp) movl $0x1, 0x180(%rsp) jmp 0x93509 leaq 0x160(%rsp), %rdi movl $0x1, %esi callq 0x980b0 movq %rax, 0x20(%rsp) jmp 0x933e0 movq 0x20(%rsp), %rsi leaq 0xe0(%rsp), %rdi callq 0x98120 jmp 0x933f4 movq 0x9d0(%rsp), %rdi leaq 0xe0(%rsp), %rsi movq %rsi, 0x10(%rsp) callq 0xb9e0 movq 0x10(%rsp), %rdi callq 0xbfb0 leaq 0x160(%rsp), %rdi movl $0x2, %esi callq 0x980b0 movq %rax, 0x18(%rsp) jmp 0x93431 movq 0x18(%rsp), %rsi leaq 0xc0(%rsp), %rdi callq 0x98120 jmp 0x93445 xorl %eax, %eax movl %eax, %esi leaq 0xc0(%rsp), %rdi movl $0xa, %edx callq 0x98150 movl %eax, 0xc(%rsp) jmp 0x93461 movl 0xc(%rsp), %ecx movq 0x9d0(%rsp), %rax movl %ecx, 0x20(%rax) leaq 0xc0(%rsp), %rdi callq 0xbfb0 leaq 0x160(%rsp), %rdi movl $0x3, %esi callq 0x980b0 movq %rax, (%rsp) jmp 0x93495 movq (%rsp), %rsi leaq 0xa0(%rsp), %rdi callq 0x98120 jmp 0x934a8 movq 0x9d0(%rsp), %rdi addq $0x28, %rdi leaq 0xa0(%rsp), %rsi callq 0xb9e0 leaq 0xa0(%rsp), %rdi callq 0xbfb0 jmp 0x932ce movq %rax, %rcx movl %edx, %eax movq %rcx, 0x188(%rsp) movl %eax, 0x184(%rsp) leaq 0xc0(%rsp), %rdi callq 0xbfb0 jmp 0x93518 movb $0x1, 0x9f7(%rsp) movl $0x1, 0x180(%rsp) leaq 0x160(%rsp), %rdi callq 0x981a0 jmp 0x93527 leaq 0x160(%rsp), %rdi callq 0x981a0 jmp 0x93545 leaq 0x190(%rsp), %rdi callq 0x1ab30 movb 0x9f7(%rsp), %al andb $0x1, %al addq $0x9f8, %rsp # imm = 0x9F8 retq leaq 0x190(%rsp), %rdi callq 0x1ab30 movq 0x188(%rsp), %rdi callq 0xbe10 nop
_ZNK7httplib10ClientImpl18read_response_lineERNS_6StreamERKNS_7RequestERNS_8ResponseE: sub rsp, 9F8h mov [rsp+9F8h+var_10], rdi mov [rsp+9F8h+var_18], rsi mov [rsp+9F8h+var_20], rdx mov [rsp+9F8h+var_28], rcx lea rdi, [rsp+9F8h+var_828] mov [rsp+9F8h+var_980], rdi xor esi, esi mov edx, 800h call _memset mov rdi, [rsp+9F8h+var_980] mov rax, [rsp+9F8h+var_18] mov [rsp+9F8h+var_978], rax call _ZNSt5arrayIcLm2048EE4dataEv; std::array<char,2048ul>::data(void) mov rdi, [rsp+9F8h+var_980] mov [rsp+9F8h+var_970], rax call _ZNKSt5arrayIcLm2048EE4sizeEv; std::array<char,2048ul>::size(void) mov rsi, [rsp+9F8h+var_978]; httplib::Stream * mov rdx, [rsp+9F8h+var_970]; char * mov rcx, rax; unsigned __int64 lea rdi, [rsp+9F8h+var_868]; this mov [rsp+9F8h+var_968], rdi call _ZN7httplib6detail18stream_line_readerC2ERNS_6StreamEPcm; httplib::detail::stream_line_reader::stream_line_reader(httplib::Stream &,char *,ulong) mov rdi, [rsp+9F8h+var_968]; this call _ZN7httplib6detail18stream_line_reader7getlineEv; httplib::detail::stream_line_reader::getline(void) mov [rsp+9F8h+var_959], al jmp short $+2 loc_9306A: mov al, [rsp+9F8h+var_959] test al, 1 jnz short loc_930A8 jmp short $+2 loc_93077: mov [rsp+9F8h+var_1], 0 mov [rsp+9F8h+var_878], 1 jmp loc_93527 mov rcx, rax mov eax, edx mov [rsp+arg_180], rcx mov [rsp+arg_17C], eax jmp loc_93545 loc_930A8: cmp cs:_ZGVZNK7httplib10ClientImpl18read_response_lineERNS_6StreamERKNS_7RequestERNS_8ResponseEE2reB5cxx11, 0; `guard variable for'httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)::re jnz short loc_93102 lea rdi, _ZGVZNK7httplib10ClientImpl18read_response_lineERNS_6StreamERKNS_7RequestERNS_8ResponseEE2reB5cxx11; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_93102 lea rdi, _ZZNK7httplib10ClientImpl18read_response_lineERNS_6StreamERKNS_7RequestERNS_8ResponseEE2reB5cxx11; httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)::re lea rsi, aHttp101D3; "(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r\n" mov edx, 10h call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) jmp short $+2 loc_930DC: lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZNK7httplib10ClientImpl18read_response_lineERNS_6StreamERKNS_7RequestERNS_8ResponseEE2reB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZNK7httplib10ClientImpl18read_response_lineERNS_6StreamERKNS_7RequestERNS_8ResponseEE2reB5cxx11; __guard * call ___cxa_guard_release loc_93102: lea rdi, [rsp+9F8h+var_898] call _ZNSt7__cxx1113match_resultsIPKcSaINS_9sub_matchIS2_EEEEC2Ev; std::match_results<char const*>::match_results(void) jmp short $+2 loc_93111: lea rdi, [rsp+9F8h+var_868]; this call _ZNK7httplib6detail18stream_line_reader3ptrEv; httplib::detail::stream_line_reader::ptr(void) mov [rsp+9F8h+var_988], rax jmp short $+2 loc_93125: mov rdi, [rsp+9F8h+var_988] lea rdx, _ZZNK7httplib10ClientImpl18read_response_lineERNS_6StreamERKNS_7RequestERNS_8ResponseEE2reB5cxx11; httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)::re lea rsi, [rsp+9F8h+var_898] xor ecx, ecx call _ZSt11regex_matchIcSaINSt7__cxx119sub_matchIPKcEEENS0_12regex_traitsIcEEEbPKT_RNS0_13match_resultsISA_T0_EERKNS0_11basic_regexIS8_T1_EENSt15regex_constants15match_flag_typeE; std::regex_match<char,std::allocator<std::sub_match<char const*>>,std::regex_traits<char>>(char const*,std::match_results<char const*> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov [rsp+9F8h+var_989], al jmp short $+2 loc_93146: mov al, [rsp+9F8h+var_989] test al, 1 jnz short loc_931C5 jmp short $+2 loc_93150: mov rdi, [rsp+9F8h+var_20] lea rsi, aConnect_0; "CONNECT" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rsp+9F8h+var_98A], al jmp short $+2 loc_9316A: mov al, [rsp+9F8h+var_98A] and al, 1 mov [rsp+9F8h+var_1], al mov [rsp+9F8h+var_878], 1 jmp loc_93509 mov rcx, rax mov eax, edx mov [rsp+arg_180], rcx mov [rsp+arg_17C], eax lea rdi, _ZGVZNK7httplib10ClientImpl18read_response_lineERNS_6StreamERKNS_7RequestERNS_8ResponseEE2reB5cxx11; __guard * call ___cxa_guard_abort jmp loc_93545 mov rcx, rax mov eax, edx mov [rsp+arg_180], rcx mov [rsp+arg_17C], eax jmp loc_93518 loc_931C5: lea rdi, [rsp+9F8h+var_898] mov esi, 1 call _ZNKSt7__cxx1113match_resultsIPKcSaINS_9sub_matchIS2_EEEEixEm; std::match_results<char const*>::operator[](ulong) mov [rsp+9F8h+var_998], rax jmp short $+2 loc_931DE: mov rsi, [rsp+9F8h+var_998] lea rdi, [rsp+9F8h+var_8B8] call _ZNKSt7__cxx119sub_matchIPKcEcvNS_12basic_stringIcSt11char_traitsIcESaIcEEEEv; std::sub_match<char const*>::operator std::string(void) jmp short $+2 loc_931F2: mov rdi, [rsp+9F8h+var_28] lea rsi, [rsp+9F8h+var_8B8] mov [rsp+9F8h+var_9A8], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+9F8h+var_9A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+9F8h+var_898] mov esi, 2 call _ZNKSt7__cxx1113match_resultsIPKcSaINS_9sub_matchIS2_EEEEixEm; std::match_results<char const*>::operator[](ulong) mov [rsp+9F8h+var_9A0], rax jmp short $+2 loc_9322F: mov rsi, [rsp+9F8h+var_9A0] lea rdi, [rsp+9F8h+var_8D8] call _ZNKSt7__cxx119sub_matchIPKcEcvNS_12basic_stringIcSt11char_traitsIcESaIcEEEEv; std::sub_match<char const*>::operator std::string(void) jmp short $+2 loc_93243: xor eax, eax mov esi, eax lea rdi, [rsp+9F8h+var_8D8] mov edx, 0Ah call _ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoi(std::string const&,ulong *,int) mov [rsp+9F8h+var_9AC], eax jmp short $+2 loc_9325F: mov ecx, [rsp+9F8h+var_9AC] mov rax, [rsp+9F8h+var_28] mov [rax+20h], ecx lea rdi, [rsp+9F8h+var_8D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+9F8h+var_898] mov esi, 3 call _ZNKSt7__cxx1113match_resultsIPKcSaINS_9sub_matchIS2_EEEEixEm; std::match_results<char const*>::operator[](ulong) mov [rsp+9F8h+var_9B8], rax jmp short $+2 loc_93294: mov rsi, [rsp+9F8h+var_9B8] lea rdi, [rsp+9F8h+var_8F8] call _ZNKSt7__cxx119sub_matchIPKcEcvNS_12basic_stringIcSt11char_traitsIcESaIcEEEEv; std::sub_match<char const*>::operator std::string(void) jmp short $+2 loc_932A8: mov rdi, [rsp+9F8h+var_28] add rdi, 28h ; '(' lea rsi, [rsp+9F8h+var_8F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+9F8h+var_8F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_932CE: mov rax, [rsp+9F8h+var_28] cmp dword ptr [rax+20h], 64h ; 'd' jnz loc_934F6 lea rdi, [rsp+9F8h+var_868]; this call _ZN7httplib6detail18stream_line_reader7getlineEv; httplib::detail::stream_line_reader::getline(void) mov [rsp+9F8h+var_9B9], al jmp short $+2 loc_932F3: mov al, [rsp+9F8h+var_9B9] test al, 1 jnz short loc_9333B jmp short $+2 loc_932FD: mov [rsp+9F8h+var_1], 0 mov [rsp+9F8h+var_878], 1 jmp loc_93509 mov rcx, rax mov eax, edx mov [rsp+arg_180], rcx mov [rsp+arg_17C], eax lea rdi, [rsp+arg_118]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_93518 loc_9333B: lea rdi, [rsp+9F8h+var_868]; this call _ZN7httplib6detail18stream_line_reader7getlineEv; httplib::detail::stream_line_reader::getline(void) mov [rsp+9F8h+var_9BA], al jmp short $+2 loc_9334E: mov al, [rsp+9F8h+var_9BA] test al, 1 jnz short loc_93370 jmp short $+2 loc_93358: mov [rsp+9F8h+var_1], 0 mov [rsp+9F8h+var_878], 1 jmp loc_93509 loc_93370: lea rdi, [rsp+9F8h+var_868]; this call _ZNK7httplib6detail18stream_line_reader3ptrEv; httplib::detail::stream_line_reader::ptr(void) mov [rsp+9F8h+var_9C8], rax jmp short $+2 loc_93384: mov rdi, [rsp+9F8h+var_9C8] lea rdx, _ZZNK7httplib10ClientImpl18read_response_lineERNS_6StreamERKNS_7RequestERNS_8ResponseEE2reB5cxx11; httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)::re lea rsi, [rsp+9F8h+var_898] xor ecx, ecx call _ZSt11regex_matchIcSaINSt7__cxx119sub_matchIPKcEEENS0_12regex_traitsIcEEEbPKT_RNS0_13match_resultsISA_T0_EERKNS0_11basic_regexIS8_T1_EENSt15regex_constants15match_flag_typeE; std::regex_match<char,std::allocator<std::sub_match<char const*>>,std::regex_traits<char>>(char const*,std::match_results<char const*> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) mov [rsp+9F8h+var_9C9], al jmp short $+2 loc_933A5: mov al, [rsp+9F8h+var_9C9] test al, 1 jnz short loc_933C7 jmp short $+2 loc_933AF: mov [rsp+9F8h+var_1], 0 mov [rsp+9F8h+var_878], 1 jmp loc_93509 loc_933C7: lea rdi, [rsp+9F8h+var_898] mov esi, 1 call _ZNKSt7__cxx1113match_resultsIPKcSaINS_9sub_matchIS2_EEEEixEm; std::match_results<char const*>::operator[](ulong) mov [rsp+9F8h+var_9D8], rax jmp short $+2 loc_933E0: mov rsi, [rsp+9F8h+var_9D8] lea rdi, [rsp+9F8h+var_918] call _ZNKSt7__cxx119sub_matchIPKcEcvNS_12basic_stringIcSt11char_traitsIcESaIcEEEEv; std::sub_match<char const*>::operator std::string(void) jmp short $+2 loc_933F4: mov rdi, [rsp+9F8h+var_28] lea rsi, [rsp+9F8h+var_918] mov [rsp+9F8h+var_9E8], rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+9F8h+var_9E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+9F8h+var_898] mov esi, 2 call _ZNKSt7__cxx1113match_resultsIPKcSaINS_9sub_matchIS2_EEEEixEm; std::match_results<char const*>::operator[](ulong) mov [rsp+9F8h+var_9E0], rax jmp short $+2 loc_93431: mov rsi, [rsp+9F8h+var_9E0] lea rdi, [rsp+9F8h+var_938] call _ZNKSt7__cxx119sub_matchIPKcEcvNS_12basic_stringIcSt11char_traitsIcESaIcEEEEv; std::sub_match<char const*>::operator std::string(void) jmp short $+2 loc_93445: xor eax, eax mov esi, eax lea rdi, [rsp+9F8h+var_938] mov edx, 0Ah call _ZNSt7__cxx114stoiERKNS_12basic_stringIcSt11char_traitsIcESaIcEEEPmi; std::stoi(std::string const&,ulong *,int) mov [rsp+9F8h+var_9EC], eax jmp short $+2 loc_93461: mov ecx, [rsp+9F8h+var_9EC] mov rax, [rsp+9F8h+var_28] mov [rax+20h], ecx lea rdi, [rsp+9F8h+var_938]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+9F8h+var_898] mov esi, 3 call _ZNKSt7__cxx1113match_resultsIPKcSaINS_9sub_matchIS2_EEEEixEm; std::match_results<char const*>::operator[](ulong) mov [rsp+9F8h+var_9F8], rax jmp short $+2 loc_93495: mov rsi, [rsp+9F8h+var_9F8] lea rdi, [rsp+9F8h+var_958] call _ZNKSt7__cxx119sub_matchIPKcEcvNS_12basic_stringIcSt11char_traitsIcESaIcEEEEv; std::sub_match<char const*>::operator std::string(void) jmp short $+2 loc_934A8: mov rdi, [rsp+9F8h+var_28] add rdi, 28h ; '(' lea rsi, [rsp+9F8h+var_958] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+9F8h+var_958]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_932CE mov rcx, rax mov eax, edx mov [rsp+arg_180], rcx mov [rsp+arg_17C], eax lea rdi, [rsp+arg_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_93518 loc_934F6: mov [rsp+9F8h+var_1], 1 mov [rsp+9F8h+var_878], 1 loc_93509: lea rdi, [rsp+9F8h+var_898] call _ZNSt7__cxx1113match_resultsIPKcSaINS_9sub_matchIS2_EEEED2Ev; std::match_results<char const*>::~match_results() jmp short loc_93527 loc_93518: lea rdi, [rsp+arg_158] call _ZNSt7__cxx1113match_resultsIPKcSaINS_9sub_matchIS2_EEEED2Ev; std::match_results<char const*>::~match_results() jmp short loc_93545 loc_93527: lea rdi, [rsp+9F8h+var_868]; this call _ZN7httplib6detail18stream_line_readerD2Ev; httplib::detail::stream_line_reader::~stream_line_reader() mov al, [rsp+9F8h+var_1] and al, 1 add rsp, 9F8h retn loc_93545: lea rdi, [rsp+arg_188]; this call _ZN7httplib6detail18stream_line_readerD2Ev; httplib::detail::stream_line_reader::~stream_line_reader() mov rdi, [rsp+arg_180] call __Unwind_Resume
bool httplib::ClientImpl::read_response_line( httplib::ClientImpl *this, httplib::Stream *a2, const httplib::Request *a3, httplib::Response *a4) { long long v4; // rax long long v6; // [rsp+0h] [rbp-9F8h] int v7; // [rsp+Ch] [rbp-9ECh] long long v8; // [rsp+18h] [rbp-9E0h] long long v9; // [rsp+20h] [rbp-9D8h] long long v10; // [rsp+30h] [rbp-9C8h] long long v11; // [rsp+40h] [rbp-9B8h] int v12; // [rsp+4Ch] [rbp-9ACh] long long v13; // [rsp+58h] [rbp-9A0h] long long v14; // [rsp+60h] [rbp-998h] long long v15; // [rsp+70h] [rbp-988h] httplib::Stream *v16; // [rsp+80h] [rbp-978h] char *v17; // [rsp+88h] [rbp-970h] _BYTE v18[32]; // [rsp+A0h] [rbp-958h] BYREF _BYTE v19[32]; // [rsp+C0h] [rbp-938h] BYREF _BYTE v20[32]; // [rsp+E0h] [rbp-918h] BYREF _BYTE v21[32]; // [rsp+100h] [rbp-8F8h] BYREF _BYTE v22[32]; // [rsp+120h] [rbp-8D8h] BYREF _BYTE v23[32]; // [rsp+140h] [rbp-8B8h] BYREF _BYTE v24[32]; // [rsp+160h] [rbp-898h] BYREF int v25; // [rsp+180h] [rbp-878h] _BYTE v26[64]; // [rsp+190h] [rbp-868h] BYREF _BYTE v27[2048]; // [rsp+1D0h] [rbp-828h] BYREF httplib::Response *v28; // [rsp+9D0h] [rbp-28h] const httplib::Request *v29; // [rsp+9D8h] [rbp-20h] httplib::Stream *v30; // [rsp+9E0h] [rbp-18h] httplib::ClientImpl *v31; // [rsp+9E8h] [rbp-10h] bool v32; // [rsp+9F7h] [rbp-1h] v31 = this; v30 = a2; v29 = a3; v28 = a4; memset(v27, 0LL, sizeof(v27)); v16 = v30; v17 = (char *)std::array<char,2048ul>::data((long long)v27); v4 = std::array<char,2048ul>::size(); httplib::detail::stream_line_reader::stream_line_reader((httplib::detail::stream_line_reader *)v26, v16, v17, v4); if ( httplib::detail::stream_line_reader::getline((httplib::detail::stream_line_reader *)v26) ) { if ( !(_BYTE)`guard variable for'httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)::re[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)::re[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)const::re[abi:cxx11], (long long)"(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r\n", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)const::re[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)::re[abi:cxx11]); } std::match_results<char const*>::match_results(v24); v15 = httplib::detail::stream_line_reader::ptr((httplib::detail::stream_line_reader *)v26); if ( (std::regex_match<char,std::allocator<std::sub_match<char const*>>,std::regex_traits<char>>( v15, v24, &httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)const::re[abi:cxx11], 0LL) & 1) != 0 ) { v14 = std::match_results<char const*>::operator[](v24, 1LL); std::sub_match<char const*>::operator std::string(v23, v14); std::string::operator=(v28, v23); std::string::~string(v23); v13 = std::match_results<char const*>::operator[](v24, 2LL); std::sub_match<char const*>::operator std::string(v22, v13); v12 = std::stoi(v22, 0LL, 10LL); *((_DWORD *)v28 + 8) = v12; std::string::~string(v22); v11 = std::match_results<char const*>::operator[](v24, 3LL); std::sub_match<char const*>::operator std::string(v21, v11); std::string::operator=((char *)v28 + 40, v21); std::string::~string(v21); while ( *((_DWORD *)v28 + 8) == 100 ) { if ( !httplib::detail::stream_line_reader::getline((httplib::detail::stream_line_reader *)v26) ) { v32 = 0; v25 = 1; goto LABEL_18; } if ( !httplib::detail::stream_line_reader::getline((httplib::detail::stream_line_reader *)v26) ) { v32 = 0; v25 = 1; goto LABEL_18; } v10 = httplib::detail::stream_line_reader::ptr((httplib::detail::stream_line_reader *)v26); if ( (std::regex_match<char,std::allocator<std::sub_match<char const*>>,std::regex_traits<char>>( v10, v24, &httplib::ClientImpl::read_response_line(httplib::Stream &,httplib::Request const&,httplib::Response &)const::re[abi:cxx11], 0LL) & 1) == 0 ) { v32 = 0; v25 = 1; goto LABEL_18; } v9 = std::match_results<char const*>::operator[](v24, 1LL); std::sub_match<char const*>::operator std::string(v20, v9); std::string::operator=(v28, v20); std::string::~string(v20); v8 = std::match_results<char const*>::operator[](v24, 2LL); std::sub_match<char const*>::operator std::string(v19, v8); v7 = std::stoi(v19, 0LL, 10LL); *((_DWORD *)v28 + 8) = v7; std::string::~string(v19); v6 = std::match_results<char const*>::operator[](v24, 3LL); std::sub_match<char const*>::operator std::string(v18, v6); std::string::operator=((char *)v28 + 40, v18); std::string::~string(v18); } v32 = 1; v25 = 1; } else { v32 = std::operator==<char>((long long)v29, (long long)"CONNECT"); v25 = 1; } LABEL_18: std::match_results<char const*>::~match_results(v24); } else { v32 = 0; v25 = 1; } httplib::detail::stream_line_reader::~stream_line_reader((httplib::detail::stream_line_reader *)v26); return v32; }
read_response_line: SUB RSP,0x9f8 MOV qword ptr [RSP + 0x9e8],RDI MOV qword ptr [RSP + 0x9e0],RSI MOV qword ptr [RSP + 0x9d8],RDX MOV qword ptr [RSP + 0x9d0],RCX LEA RDI,[RSP + 0x1d0] MOV qword ptr [RSP + 0x78],RDI XOR ESI,ESI MOV EDX,0x800 CALL 0x0010b420 MOV RDI,qword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0x9e0] MOV qword ptr [RSP + 0x80],RAX CALL 0x00116a20 MOV RDI,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x88],RAX CALL 0x00116a30 MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] MOV RCX,RAX LEA RDI,[RSP + 0x190] MOV qword ptr [RSP + 0x90],RDI CALL 0x00116a40 MOV RDI,qword ptr [RSP + 0x90] LAB_0019305c: CALL 0x00116a90 MOV byte ptr [RSP + 0x9f],AL JMP 0x0019306a LAB_0019306a: MOV AL,byte ptr [RSP + 0x9f] TEST AL,0x1 JNZ 0x001930a8 JMP 0x00193077 LAB_00193077: MOV byte ptr [RSP + 0x9f7],0x0 MOV dword ptr [RSP + 0x180],0x1 JMP 0x00193527 LAB_001930a8: CMP byte ptr [0x0021e5a0],0x0 JNZ 0x00193102 LEA RDI,[0x21e5a0] CALL 0x0010be60 CMP EAX,0x0 JZ 0x00193102 LAB_001930c2: LEA RDI,[0x21e580] LEA RSI,[0x1d3589] MOV EDX,0x10 CALL 0x00138120 JMP 0x001930dc LAB_001930dc: LEA RDI,[0x112910] LEA RSI,[0x21e580] LEA RDX,[0x21b7d8] CALL 0x0010b720 LEA RDI,[0x21e5a0] CALL 0x0010b550 LAB_00193102: LEA RDI,[RSP + 0x160] CALL 0x00198010 JMP 0x00193111 LAB_00193111: LEA RDI,[RSP + 0x190] CALL 0x00117b00 MOV qword ptr [RSP + 0x70],RAX JMP 0x00193125 LAB_00193125: MOV RDI,qword ptr [RSP + 0x70] LEA RDX,[0x21e580] LEA RSI,[RSP + 0x160] XOR ECX,ECX CALL 0x00198050 MOV byte ptr [RSP + 0x6f],AL JMP 0x00193146 LAB_00193146: MOV AL,byte ptr [RSP + 0x6f] TEST AL,0x1 JNZ 0x001931c5 JMP 0x00193150 LAB_00193150: MOV RDI,qword ptr [RSP + 0x9d8] LEA RSI,[0x1ce087] CALL 0x00117b50 MOV byte ptr [RSP + 0x6e],AL JMP 0x0019316a LAB_0019316a: MOV AL,byte ptr [RSP + 0x6e] AND AL,0x1 MOV byte ptr [RSP + 0x9f7],AL MOV dword ptr [RSP + 0x180],0x1 JMP 0x00193509 LAB_001931c5: LEA RDI,[RSP + 0x160] MOV ESI,0x1 CALL 0x001980b0 MOV qword ptr [RSP + 0x60],RAX JMP 0x001931de LAB_001931de: MOV RSI,qword ptr [RSP + 0x60] LEA RDI,[RSP + 0x140] CALL 0x00198120 JMP 0x001931f2 LAB_001931f2: MOV RDI,qword ptr [RSP + 0x9d0] LEA RSI,[RSP + 0x140] MOV qword ptr [RSP + 0x50],RSI CALL 0x0010b9e0 MOV RDI,qword ptr [RSP + 0x50] CALL 0x0010bfb0 LEA RDI,[RSP + 0x160] MOV ESI,0x2 CALL 0x001980b0 MOV qword ptr [RSP + 0x58],RAX JMP 0x0019322f LAB_0019322f: MOV RSI,qword ptr [RSP + 0x58] LEA RDI,[RSP + 0x120] CALL 0x00198120 JMP 0x00193243 LAB_00193243: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x120] MOV EDX,0xa CALL 0x00198150 MOV dword ptr [RSP + 0x4c],EAX JMP 0x0019325f LAB_0019325f: MOV ECX,dword ptr [RSP + 0x4c] MOV RAX,qword ptr [RSP + 0x9d0] MOV dword ptr [RAX + 0x20],ECX LEA RDI,[RSP + 0x120] CALL 0x0010bfb0 LAB_0019327b: LEA RDI,[RSP + 0x160] MOV ESI,0x3 CALL 0x001980b0 MOV qword ptr [RSP + 0x40],RAX JMP 0x00193294 LAB_00193294: MOV RSI,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x100] CALL 0x00198120 JMP 0x001932a8 LAB_001932a8: MOV RDI,qword ptr [RSP + 0x9d0] ADD RDI,0x28 LEA RSI,[RSP + 0x100] CALL 0x0010b9e0 LEA RDI,[RSP + 0x100] CALL 0x0010bfb0 LAB_001932ce: MOV RAX,qword ptr [RSP + 0x9d0] CMP dword ptr [RAX + 0x20],0x64 JNZ 0x001934f6 LEA RDI,[RSP + 0x190] CALL 0x00116a90 MOV byte ptr [RSP + 0x3f],AL JMP 0x001932f3 LAB_001932f3: MOV AL,byte ptr [RSP + 0x3f] TEST AL,0x1 JNZ 0x0019333b JMP 0x001932fd LAB_001932fd: MOV byte ptr [RSP + 0x9f7],0x0 MOV dword ptr [RSP + 0x180],0x1 JMP 0x00193509 LAB_0019333b: LEA RDI,[RSP + 0x190] CALL 0x00116a90 MOV byte ptr [RSP + 0x3e],AL JMP 0x0019334e LAB_0019334e: MOV AL,byte ptr [RSP + 0x3e] TEST AL,0x1 JNZ 0x00193370 JMP 0x00193358 LAB_00193358: MOV byte ptr [RSP + 0x9f7],0x0 MOV dword ptr [RSP + 0x180],0x1 JMP 0x00193509 LAB_00193370: LEA RDI,[RSP + 0x190] CALL 0x00117b00 MOV qword ptr [RSP + 0x30],RAX JMP 0x00193384 LAB_00193384: MOV RDI,qword ptr [RSP + 0x30] LEA RDX,[0x21e580] LEA RSI,[RSP + 0x160] XOR ECX,ECX CALL 0x00198050 MOV byte ptr [RSP + 0x2f],AL JMP 0x001933a5 LAB_001933a5: MOV AL,byte ptr [RSP + 0x2f] TEST AL,0x1 JNZ 0x001933c7 JMP 0x001933af LAB_001933af: MOV byte ptr [RSP + 0x9f7],0x0 MOV dword ptr [RSP + 0x180],0x1 JMP 0x00193509 LAB_001933c7: LEA RDI,[RSP + 0x160] MOV ESI,0x1 CALL 0x001980b0 MOV qword ptr [RSP + 0x20],RAX JMP 0x001933e0 LAB_001933e0: MOV RSI,qword ptr [RSP + 0x20] LEA RDI,[RSP + 0xe0] CALL 0x00198120 JMP 0x001933f4 LAB_001933f4: MOV RDI,qword ptr [RSP + 0x9d0] LEA RSI,[RSP + 0xe0] MOV qword ptr [RSP + 0x10],RSI CALL 0x0010b9e0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0010bfb0 LEA RDI,[RSP + 0x160] MOV ESI,0x2 CALL 0x001980b0 MOV qword ptr [RSP + 0x18],RAX JMP 0x00193431 LAB_00193431: MOV RSI,qword ptr [RSP + 0x18] LEA RDI,[RSP + 0xc0] CALL 0x00198120 JMP 0x00193445 LAB_00193445: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0xc0] MOV EDX,0xa CALL 0x00198150 MOV dword ptr [RSP + 0xc],EAX JMP 0x00193461 LAB_00193461: MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x9d0] MOV dword ptr [RAX + 0x20],ECX LEA RDI,[RSP + 0xc0] CALL 0x0010bfb0 LAB_0019347d: LEA RDI,[RSP + 0x160] MOV ESI,0x3 CALL 0x001980b0 MOV qword ptr [RSP],RAX JMP 0x00193495 LAB_00193495: MOV RSI,qword ptr [RSP] LEA RDI,[RSP + 0xa0] CALL 0x00198120 LAB_001934a6: JMP 0x001934a8 LAB_001934a8: MOV RDI,qword ptr [RSP + 0x9d0] ADD RDI,0x28 LEA RSI,[RSP + 0xa0] CALL 0x0010b9e0 LEA RDI,[RSP + 0xa0] CALL 0x0010bfb0 JMP 0x001932ce LAB_001934f6: MOV byte ptr [RSP + 0x9f7],0x1 MOV dword ptr [RSP + 0x180],0x1 LAB_00193509: LEA RDI,[RSP + 0x160] CALL 0x001981a0 JMP 0x00193527 LAB_00193527: LEA RDI,[RSP + 0x190] CALL 0x0011ab30 MOV AL,byte ptr [RSP + 0x9f7] AND AL,0x1 ADD RSP,0x9f8 RET
/* httplib::ClientImpl::read_response_line(httplib::Stream&, httplib::Request const&, httplib::Response&) const */ ulong __thiscall httplib::ClientImpl::read_response_line (ClientImpl *this,Stream *param_1,Request *param_2,Response *param_3) { Stream *pSVar1; byte bVar2; bool bVar3; int iVar4; int4 uVar5; char *pcVar6; ulong uVar7; int8 uVar8; sub_match local_958 [32]; sub_match local_938 [32]; sub_match local_918 [32]; sub_match local_8f8 [32]; sub_match local_8d8 [32]; sub_match local_8b8 [32]; match_results<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>> local_898 [32]; int4 local_878; stream_line_reader local_868 [64]; array<char,2048ul> local_828 [2048]; Response *local_28; Request *local_20; Stream *local_18; ClientImpl *local_10; bool local_1; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_10 = this; memset(local_828,0,0x800); pSVar1 = local_18; pcVar6 = (char *)std::array<char,2048ul>::data(local_828); uVar7 = std::array<char,2048ul>::size(); detail::stream_line_reader::stream_line_reader(local_868,pSVar1,pcVar6,uVar7); /* try { // try from 0019305c to 00193060 has its CatchHandler @ 0019308f */ bVar2 = detail::stream_line_reader::getline(local_868); if ((bVar2 & 1) == 0) { local_1 = false; local_878 = 1; } else { if (read_response_line(httplib::Stream&,httplib::Request_const&,httplib::Response&):: re_abi_cxx11_ == '\0') { iVar4 = __cxa_guard_acquire(&read_response_line(httplib::Stream&,httplib::Request_const&,httplib::Response&) ::re_abi_cxx11_); if (iVar4 != 0) { /* try { // try from 001930c2 to 001930d9 has its CatchHandler @ 00193187 */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex (read_response_line(httplib::Stream&,httplib::Request_const&,httplib::Response&):: re_abi_cxx11_,"(HTTP/1\\.[01]) (\\d{3})(?: (.*?))?\r\n",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, read_response_line(httplib::Stream&,httplib::Request_const&,httplib::Response&) ::re_abi_cxx11_,&__dso_handle); __cxa_guard_release(&read_response_line(httplib::Stream&,httplib::Request_const&,httplib::Response&) ::re_abi_cxx11_); } } /* try { // try from 00193102 to 0019310e has its CatchHandler @ 0019308f */ std::__cxx11::match_results<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>>:: match_results(local_898); /* try { // try from 00193111 to 00193240 has its CatchHandler @ 001931ac */ uVar8 = detail::stream_line_reader::ptr(local_868); bVar3 = std:: regex_match<char,std::allocator<std::__cxx11::sub_match<char_const*>>,std::__cxx11::regex_traits<char>> (uVar8,local_898, read_response_line(httplib::Stream&,httplib::Request_const&,httplib::Response&) ::re_abi_cxx11_,0); if (bVar3) { std::__cxx11::match_results<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>> ::operator[](local_898,1); std::__cxx11::sub_match::operator_cast_to_string(local_8b8); std::__cxx11::string::operator=((string *)local_28,(string *)local_8b8); std::__cxx11::string::~string((string *)local_8b8); std::__cxx11::match_results<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>> ::operator[](local_898,2); std::__cxx11::sub_match::operator_cast_to_string(local_8d8); /* try { // try from 00193243 to 00193258 has its CatchHandler @ 00193315 */ uVar5 = std::__cxx11::stoi((string *)local_8d8,(ulong *)0x0,10); *(int4 *)(local_28 + 0x20) = uVar5; std::__cxx11::string::~string((string *)local_8d8); /* try { // try from 0019327b to 00193442 has its CatchHandler @ 001931ac */ std::__cxx11::match_results<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>> ::operator[](local_898,3); std::__cxx11::sub_match::operator_cast_to_string(local_8f8); std::__cxx11::string::operator=((string *)(local_28 + 0x28),(string *)local_8f8); std::__cxx11::string::~string((string *)local_8f8); while (*(int *)(local_28 + 0x20) == 100) { bVar2 = detail::stream_line_reader::getline(local_868); if ((bVar2 & 1) == 0) { local_1 = false; goto LAB_00193509; } bVar2 = detail::stream_line_reader::getline(local_868); if ((bVar2 & 1) == 0) { local_1 = false; goto LAB_00193509; } uVar8 = detail::stream_line_reader::ptr(local_868); bVar3 = std:: regex_match<char,std::allocator<std::__cxx11::sub_match<char_const*>>,std::__cxx11::regex_traits<char>> (uVar8,local_898, read_response_line(httplib::Stream&,httplib::Request_const&,httplib::Response&) ::re_abi_cxx11_,0); if (!bVar3) { local_1 = false; goto LAB_00193509; } std::__cxx11:: match_results<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>>::operator[] (local_898,1); std::__cxx11::sub_match::operator_cast_to_string(local_918); std::__cxx11::string::operator=((string *)local_28,(string *)local_918); std::__cxx11::string::~string((string *)local_918); std::__cxx11:: match_results<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>>::operator[] (local_898,2); std::__cxx11::sub_match::operator_cast_to_string(local_938); /* try { // try from 00193445 to 0019345a has its CatchHandler @ 001934d3 */ uVar5 = std::__cxx11::stoi((string *)local_938,(ulong *)0x0,10); *(int4 *)(local_28 + 0x20) = uVar5; std::__cxx11::string::~string((string *)local_938); /* try { // try from 0019347d to 001934a5 has its CatchHandler @ 001931ac */ std::__cxx11:: match_results<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>>::operator[] (local_898,3); std::__cxx11::sub_match::operator_cast_to_string(local_958); std::__cxx11::string::operator=((string *)(local_28 + 0x28),(string *)local_958); std::__cxx11::string::~string((string *)local_958); } local_1 = true; } else { local_1 = std::operator==((string *)local_20,"CONNECT"); } LAB_00193509: local_878 = 1; std::__cxx11::match_results<char_const*,std::allocator<std::__cxx11::sub_match<char_const*>>>:: ~match_results(local_898); } uVar8 = detail::stream_line_reader::~stream_line_reader(local_868); return CONCAT71((int7)((ulong)uVar8 >> 8),local_1) & 0xffffffffffffff01; }
9,068
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&)
llama.cpp/common/minja/minja.hpp
MacroNode(const Location & loc, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p, std::shared_ptr<TemplateNode> && b) : TemplateNode(loc), name(std::move(n)), params(std::move(p)), body(std::move(b)) { for (size_t i = 0; i < params.size(); ++i) { const auto & name = params[i].first; if (!name.empty()) { named_param_positions[name] = i; } } }
O3
cpp
minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&, std::shared_ptr<minja::TemplateNode>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x6e832(%rip), %r14 # 0x162510 addq $0x10, %r14 movq %r14, (%rdi) movq (%rsi), %rax movq %rax, 0x8(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x10(%rdi) testq %rax, %rax je 0xf3d0e movq 0x6f298(%rip), %rdi # 0x162f98 cmpb $0x0, (%rdi) je 0xf3d0a incl 0x8(%rax) jmp 0xf3d0e lock incl 0x8(%rax) movq 0x10(%rsi), %rax movq %rax, 0x18(%rbx) leaq 0x6eb7b(%rip), %rax # 0x162898 addq $0x10, %rax movq %rax, (%rbx) xorl %eax, %eax movq %rax, 0x28(%rbx) movups (%rdx), %xmm0 movq %rax, 0x8(%rdx) movups %xmm0, 0x20(%rbx) movq %rax, (%rdx) movups (%rcx), %xmm0 movups %xmm0, 0x30(%rbx) movq 0x10(%rcx), %rdx movq %rdx, 0x40(%rbx) movq %rax, 0x10(%rcx) xorps %xmm0, %xmm0 movups %xmm0, (%rcx) movq %rax, 0x50(%rbx) movups (%r8), %xmm1 movq %rax, 0x8(%r8) movups %xmm1, 0x48(%rbx) movq %rax, (%r8) leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) movq $0x1, 0x60(%rbx) movups %xmm0, 0x68(%rbx) movl $0x3f800000, 0x78(%rbx) # imm = 0x3F800000 movups %xmm0, 0x80(%rbx) movq 0x30(%rbx), %rsi movq 0x38(%rbx), %rax cmpq %rsi, %rax je 0xf3e06 leaq 0x10(%rbx), %rcx movq %rcx, 0x20(%rsp) leaq 0x28(%rbx), %rcx movq %rcx, 0x18(%rsp) leaq 0x30(%rbx), %rcx movq %rcx, 0x10(%rsp) leaq 0x50(%rbx), %rcx movq %rcx, 0x8(%rsp) leaq 0x58(%rbx), %rbp xorl %r15d, %r15d movabsq $-0x5555555555555555, %r12 # imm = 0xAAAAAAAAAAAAAAAB xorl %r13d, %r13d cmpq $0x0, 0x8(%rsi,%r15) je 0xf3dec addq %r15, %rsi movq %rbp, %rdi callq 0xf4182 movq %r13, (%rax) movq 0x30(%rbx), %rsi movq 0x38(%rbx), %rax incq %r13 movq %rax, %rcx subq %rsi, %rcx sarq $0x4, %rcx imulq %r12, %rcx addq $0x30, %r15 cmpq %rcx, %r13 jb 0xf3dce addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 movq %rbp, %rdi callq 0xf45a4 movq 0x8(%rsp), %rdi callq 0x70a60 movq 0x10(%rsp), %rdi callq 0xdfe3c movq 0x18(%rsp), %rdi callq 0x70a60 movq %r14, (%rbx) movq 0x20(%rsp), %rdi callq 0x70a60 movq %r15, %rdi callq 0x20af0 nop
_ZN5minja9MacroNodeC2ERKNS_8LocationEOSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES4_INS_10ExpressionEEESaISI_EEOS4_INS_12TemplateNodeEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi lea r14, _ZTVN5minja12TemplateNodeE; `vtable for'minja::TemplateNode add r14, 10h mov [rdi], r14 mov rax, [rsi] mov [rdi+8], rax mov rax, [rsi+8] mov [rdi+10h], rax test rax, rax jz short loc_F3D0E mov rdi, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rdi], 0 jz short loc_F3D0A inc dword ptr [rax+8] jmp short loc_F3D0E loc_F3D0A: lock inc dword ptr [rax+8] loc_F3D0E: mov rax, [rsi+10h] mov [rbx+18h], rax lea rax, _ZTVN5minja9MacroNodeE; `vtable for'minja::MacroNode add rax, 10h mov [rbx], rax xor eax, eax mov [rbx+28h], rax movups xmm0, xmmword ptr [rdx] mov [rdx+8], rax movups xmmword ptr [rbx+20h], xmm0 mov [rdx], rax movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rbx+30h], xmm0 mov rdx, [rcx+10h] mov [rbx+40h], rdx mov [rcx+10h], rax xorps xmm0, xmm0 movups xmmword ptr [rcx], xmm0 mov [rbx+50h], rax movups xmm1, xmmword ptr [r8] mov [r8+8], rax movups xmmword ptr [rbx+48h], xmm1 mov [r8], rax lea rax, [rbx+88h] mov [rbx+58h], rax mov qword ptr [rbx+60h], 1 movups xmmword ptr [rbx+68h], xmm0 mov dword ptr [rbx+78h], 3F800000h movups xmmword ptr [rbx+80h], xmm0 mov rsi, [rbx+30h] mov rax, [rbx+38h] cmp rax, rsi jz short loc_F3E06 lea rcx, [rbx+10h] mov [rsp+58h+var_38], rcx lea rcx, [rbx+28h] mov [rsp+58h+var_40], rcx lea rcx, [rbx+30h] mov [rsp+58h+var_48], rcx lea rcx, [rbx+50h] mov [rsp+58h+var_50], rcx lea rbp, [rbx+58h] xor r15d, r15d mov r12, 0AAAAAAAAAAAAAAABh xor r13d, r13d loc_F3DCE: cmp qword ptr [rsi+r15+8], 0 jz short loc_F3DEC add rsi, r15 mov rdi, rbp call _ZNSt8__detail9_Map_baseINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS6_mESaIS9_ENS_10_Select1stESt8equal_toIS6_ESt4hashIS6_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb1ELb0ELb1EEELb1EEixERS8_; std::__detail::_Map_base<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[](std::string const&) mov [rax], r13 mov rsi, [rbx+30h] mov rax, [rbx+38h] loc_F3DEC: inc r13 mov rcx, rax sub rcx, rsi sar rcx, 4 imul rcx, r12 add r15, 30h ; '0' cmp r13, rcx jb short loc_F3DCE loc_F3E06: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax mov rdi, rbp call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESaIS8_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,ulong>,std::allocator<std::pair<std::string const,ulong>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, [rsp+arg_0] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [rsp+arg_8] call _ZNSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN5minja10ExpressionEEESaISB_EED2Ev; std::vector<std::pair<std::string,std::shared_ptr<minja::Expression>>>::~vector() mov rdi, [rsp+arg_10] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov [rbx], r14 mov rdi, [rsp+arg_18] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r15 call __Unwind_Resume
long long minja::MacroNode::MacroNode(long long a1, _QWORD *a2, __int128 *a3, long long a4, __int128 *a5, int a6) { long long v6; // rax __int128 v7; // xmm0 long long v8; // rdx __int128 v9; // xmm1 long long v10; // rsi long long result; // rax unsigned long long v12; // rcx long long v13; // r15 unsigned long long v14; // r13 char v15; // [rsp+0h] [rbp-58h] *(_QWORD *)a1 = &`vtable for'minja::TemplateNode + 2; *(_QWORD *)(a1 + 8) = *a2; v6 = a2[1]; *(_QWORD *)(a1 + 16) = v6; if ( v6 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v6 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v6 + 8)); } *(_QWORD *)(a1 + 24) = a2[2]; *(_QWORD *)a1 = &`vtable for'minja::MacroNode + 2; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_OWORD *)(a1 + 48) = *(_OWORD *)a4; v8 = *(_QWORD *)(a4 + 16); *(_QWORD *)(a1 + 64) = v8; *(_QWORD *)(a4 + 16) = 0LL; *(_OWORD *)a4 = 0LL; *(_QWORD *)(a1 + 80) = 0LL; v9 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 72) = v9; *(_QWORD *)a5 = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; v10 = *(_QWORD *)(a1 + 48); result = *(_QWORD *)(a1 + 56); if ( result != v10 ) { LODWORD(v12) = a1 + 80; v13 = 0LL; v14 = 0LL; do { if ( *(_QWORD *)(v10 + v13 + 8) ) { *(_QWORD *)std::__detail::_Map_base<std::string,std::pair<std::string const,unsigned long>,std::allocator<std::pair<std::string const,unsigned long>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true>::operator[]( (int)a1 + 88, (int)v13 + (int)v10, v8, v12, (_DWORD)a5, a6, v15) = v14; v10 = *(_QWORD *)(a1 + 48); result = *(_QWORD *)(a1 + 56); } ++v14; v12 = 0xAAAAAAAAAAAAAAABLL * ((result - v10) >> 4); v13 += 48LL; } while ( v14 < v12 ); } return result; }
MacroNode: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[0x262510] ADD R14,0x10 MOV qword ptr [RDI],R14 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 0x001f3d0e MOV RDI,qword ptr [0x00262f98] CMP byte ptr [RDI],0x0 JZ 0x001f3d0a INC dword ptr [RAX + 0x8] JMP 0x001f3d0e LAB_001f3d0a: INC.LOCK dword ptr [RAX + 0x8] LAB_001f3d0e: MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x18],RAX LEA RAX,[0x262898] ADD RAX,0x10 MOV qword ptr [RBX],RAX XOR EAX,EAX MOV qword ptr [RBX + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDX] MOV qword ptr [RDX + 0x8],RAX MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOV qword ptr [RDX],RAX MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RBX + 0x40],RDX MOV qword ptr [RCX + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RCX],XMM0 MOV qword ptr [RBX + 0x50],RAX MOVUPS XMM1,xmmword ptr [R8] MOV qword ptr [R8 + 0x8],RAX MOVUPS xmmword ptr [RBX + 0x48],XMM1 MOV qword ptr [R8],RAX LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX MOV qword ptr [RBX + 0x60],0x1 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV dword ptr [RBX + 0x78],0x3f800000 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV RSI,qword ptr [RBX + 0x30] MOV RAX,qword ptr [RBX + 0x38] CMP RAX,RSI JZ 0x001f3e06 LEA RCX,[RBX + 0x10] MOV qword ptr [RSP + 0x20],RCX LEA RCX,[RBX + 0x28] MOV qword ptr [RSP + 0x18],RCX LEA RCX,[RBX + 0x30] MOV qword ptr [RSP + 0x10],RCX LEA RCX,[RBX + 0x50] MOV qword ptr [RSP + 0x8],RCX LEA RBP,[RBX + 0x58] XOR R15D,R15D MOV R12,-0x5555555555555555 XOR R13D,R13D LAB_001f3dce: CMP qword ptr [RSI + R15*0x1 + 0x8],0x0 JZ 0x001f3dec ADD RSI,R15 LAB_001f3dd9: MOV RDI,RBP CALL 0x001f4182 LAB_001f3de1: MOV qword ptr [RAX],R13 MOV RSI,qword ptr [RBX + 0x30] MOV RAX,qword ptr [RBX + 0x38] LAB_001f3dec: INC R13 MOV RCX,RAX SUB RCX,RSI SAR RCX,0x4 IMUL RCX,R12 ADD R15,0x30 CMP R13,RCX JC 0x001f3dce LAB_001f3e06: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::MacroNode::MacroNode(minja::Location const&, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >, std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&, std::shared_ptr<minja::TemplateNode>&&) */ void __thiscall minja::MacroNode::MacroNode (MacroNode *this,Location *param_1,shared_ptr *param_2,vector *param_3,shared_ptr *param_4 ) { int8 uVar1; ulong *puVar2; long lVar3; long lVar4; ulong uVar5; long lVar6; *(int ***)this = &PTR___cxa_pure_virtual_00262520; *(int8 *)(this + 8) = *(int8 *)param_1; lVar4 = *(long *)(param_1 + 8); *(long *)(this + 0x10) = lVar4; if (lVar4 != 0) { if (*PTR___libc_single_threaded_00262f98 == '\0') { LOCK(); *(int *)(lVar4 + 8) = *(int *)(lVar4 + 8) + 1; UNLOCK(); } else { *(int *)(lVar4 + 8) = *(int *)(lVar4 + 8) + 1; } } *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x10); *(int ***)this = &PTR_do_render_002628a8; *(int8 *)(this + 0x28) = 0; uVar1 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar1; *(int8 *)param_2 = 0; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar1; *(int8 *)(this + 0x40) = *(int8 *)(param_3 + 0x10); *(int8 *)(param_3 + 0x10) = 0; *(int8 *)param_3 = 0; *(int8 *)(param_3 + 8) = 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; *(MacroNode **)(this + 0x58) = this + 0x88; *(int8 *)(this + 0x60) = 1; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int4 *)(this + 0x78) = 0x3f800000; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; lVar4 = *(long *)(this + 0x30); lVar3 = *(long *)(this + 0x38); if (lVar3 != lVar4) { lVar6 = 0; uVar5 = 0; do { if (*(long *)(lVar4 + 8 + lVar6) != 0) { /* try { // try from 001f3dd9 to 001f3de0 has its CatchHandler @ 001f3e15 */ puVar2 = (ulong *)std::__detail:: _Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> ::operator[]((_Map_base<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>,std::__detail::_Select1st,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>,true> *)(this + 0x58),(string *)(lVar4 + lVar6)); *puVar2 = uVar5; lVar4 = *(long *)(this + 0x30); lVar3 = *(long *)(this + 0x38); } uVar5 = uVar5 + 1; lVar6 = lVar6 + 0x30; } while (uVar5 < (ulong)((lVar3 - lVar4 >> 4) * -0x5555555555555555)); } return; }
9,069
mysql_select_db_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_select_db_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_select_db, (parms->mysql, parms->db), parms->mysql, int, r_int) }
O3
c
mysql_select_db_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movq 0x8(%rdi), %rsi movq 0x480(%rax), %rcx movq 0x28(%rcx), %rbx movq %rax, %rdi callq 0x1a1df movl %eax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_select_db_start_internal: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov rsi, [rdi+8] mov rcx, [rax+480h] mov rbx, [rcx+28h] mov rdi, rax call mysql_select_db mov [rbx+8], eax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_select_db_start_internal(long long *a1) { _DWORD *v1; // rbx long long result; // rax v1 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); result = mysql_select_db(*a1, a1[1]); v1[2] = result; *v1 = 0; return result; }
mysql_select_db_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RCX + 0x28] MOV RDI,RAX CALL 0x0011a1df MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_select_db_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_select_db(*param_1,param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
9,070
google::protobuf::compiler::java::ExtraBuilderInterfaces[abi:cxx11](google::protobuf::Descriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/java/helpers.cc
std::string ExtraBuilderInterfaces(const Descriptor* descriptor) { std::string interfaces = "// @@protoc_insertion_point(builder_implements:" + descriptor->full_name() + ")"; return interfaces; }
O0
cpp
google::protobuf::compiler::java::ExtraBuilderInterfaces[abi:cxx11](google::protobuf::Descriptor const*): subq $0x68, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movb $0x0, 0x57(%rsp) movq 0x58(%rsp), %rdi callq 0x39b60 movq %rax, %rdx leaq 0x33b853(%rip), %rsi # 0x3afdb7 leaq 0x30(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x4d3a0 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi leaq 0x337b84(%rip), %rdx # 0x3ac108 callq 0x38840 jmp 0x7458b leaq 0x30(%rsp), %rdi callq 0x21cc8 movb $0x1, 0x57(%rsp) testb $0x1, 0x57(%rsp) jne 0x745c7 jmp 0x745bd movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x30(%rsp), %rdi callq 0x21cc8 jmp 0x745d1 movq 0x10(%rsp), %rdi callq 0x21cc8 movq 0x8(%rsp), %rax addq $0x68, %rsp retq movq 0x28(%rsp), %rdi callq 0x21700 nopl (%rax,%rax)
_ZN6google8protobuf8compiler4java22ExtraBuilderInterfacesB5cxx11EPKNS0_10DescriptorE: sub rsp, 68h mov [rsp+68h+var_58], rdi; void * mov rax, rdi mov qword ptr [rsp+68h+var_60], rax; int mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_11], 0 mov rdi, [rsp+68h+var_10] call _ZNK6google8protobuf10Descriptor9full_nameB5cxx11Ev; google::protobuf::Descriptor::full_name(void) mov rdx, rax; int lea rsi, aProtocInsertio_1; "// @@protoc_insertion_point(builder_imp"... lea rdi, [rsp+68h+var_38]; int mov qword ptr [rsp+68h+var_50], rdi; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov rdi, [rsp+68h+var_58] mov rsi, qword ptr [rsp+68h+var_50] lea rdx, a1_1+5; ")" call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_7458B: lea rdi, [rsp+68h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov [rsp+68h+var_11], 1 test [rsp+68h+var_11], 1 jnz short loc_745C7 jmp short loc_745BD mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_745D1 loc_745BD: mov rdi, [rsp+68h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_745C7: mov rax, qword ptr [rsp+68h+var_60] add rsp, 68h retn loc_745D1: mov rdi, [rsp+arg_20] call __Unwind_Resume
long long google::protobuf::compiler::java::ExtraBuilderInterfaces[abi:cxx11](long long a1, long long a2) { long long v2; // rax int v4[9]; // [rsp+30h] [rbp-38h] BYREF char v5; // [rsp+57h] [rbp-11h] long long v6; // [rsp+58h] [rbp-10h] long long v7; // [rsp+60h] [rbp-8h] v7 = a1; v6 = a2; v5 = 0; v2 = google::protobuf::Descriptor::full_name[abi:cxx11](a2); std::operator+<char>((long long)v4, (long long)"// @@protoc_insertion_point(builder_implements:", v2); std::operator+<char>(a1, (long long)v4, (long long)")"); std::string::~string(v4); return a1; }
ExtraBuilderInterfaces[abi:cxx11]: SUB RSP,0x68 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV byte ptr [RSP + 0x57],0x0 MOV RDI,qword ptr [RSP + 0x58] CALL 0x00139b60 MOV RDX,RAX LEA RSI,[0x4afdb7] LEA RDI,[RSP + 0x30] MOV qword ptr [RSP + 0x18],RDI CALL 0x0014d3a0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] LAB_0017457d: LEA RDX,[0x4ac108] CALL 0x00138840 LAB_00174589: JMP 0x0017458b LAB_0017458b: LEA RDI,[RSP + 0x30] CALL 0x00121cc8 MOV byte ptr [RSP + 0x57],0x1 TEST byte ptr [RSP + 0x57],0x1 JNZ 0x001745c7 JMP 0x001745bd LAB_001745bd: MOV RDI,qword ptr [RSP + 0x10] CALL 0x00121cc8 LAB_001745c7: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x68 RET
/* WARNING: Removing unreachable block (ram,0x001745a1) */ /* google::protobuf::compiler::java::ExtraBuilderInterfaces[abi:cxx11](google::protobuf::Descriptor const*) */ java * __thiscall google::protobuf::compiler::java::ExtraBuilderInterfaces_abi_cxx11_(java *this,Descriptor *param_1) { string local_38 [39]; int1 local_11; Descriptor *local_10; java *local_8; local_11 = 0; local_10 = param_1; local_8 = this; Descriptor::full_name_abi_cxx11_(param_1); std::operator+((char *)local_38,(string *)"// @@protoc_insertion_point(builder_implements:"); /* try { // try from 0017457d to 00174588 has its CatchHandler @ 001745a3 */ std::operator+((string *)this,(char *)local_38); std::__cxx11::string::~string(local_38); return this; }
9,071
extend_area_on_page
eloqsql/storage/maria/ma_blockrec.c
static my_bool extend_area_on_page(MARIA_HA *info, uchar *buff, uchar *dir, uint rownr, uint request_length, uint *empty_space, uint *ret_offset, uint *ret_length, my_bool head_page) { uint rec_offset, length, org_rec_length; uint max_entry= (uint) buff[DIR_COUNT_OFFSET]; MARIA_SHARE *share= info->s; uint block_size= share->block_size; DBUG_ENTER("extend_area_on_page"); /* We can't check for min length here as we may have called extend_directory() to create a new (empty) entry just before */ check_directory(share, buff, block_size, 0, *empty_space); rec_offset= uint2korr(dir); if (rec_offset) { /* Extending old row; Mark current space as 'free' */ length= org_rec_length= uint2korr(dir + 2); DBUG_PRINT("info", ("rec_offset: %u length: %u request_length: %u " "empty_space: %u", rec_offset, org_rec_length, request_length, *empty_space)); *empty_space+= org_rec_length; } else { /* Reusing free directory entry; Free it from the directory list */ if (dir[2] == END_OF_DIR_FREE_LIST) buff[DIR_FREE_OFFSET]= dir[3]; else { uchar *prev_dir= dir_entry_pos(buff, block_size, (uint) dir[2]); DBUG_ASSERT(uint2korr(prev_dir) == 0 && prev_dir[3] == (uchar) rownr); prev_dir[3]= dir[3]; } if (dir[3] != END_OF_DIR_FREE_LIST) { uchar *next_dir= dir_entry_pos(buff, block_size, (uint) dir[3]); DBUG_ASSERT(uint2korr(next_dir) == 0 && next_dir[2] == (uchar) rownr); next_dir[2]= dir[2]; } rec_offset= start_of_next_entry(dir); length= 0; } if (length < request_length) { uint old_rec_offset; /* New data did not fit in old position. Find first possible position where to put new data. */ old_rec_offset= rec_offset; rec_offset= end_of_previous_entry(share, dir, buff + block_size - PAGE_SUFFIX_SIZE); length+= (uint) (old_rec_offset - rec_offset); DBUG_ASSERT(old_rec_offset); /* 'length' is 0 if we are doing an insert into a not allocated block. This can only happen during "REDO of INSERT" or "UNDO of DELETE." */ if (length < request_length) { /* Did not fit in current block + empty space. Extend with empty space after block. */ if (rownr == max_entry - 1) { /* Last entry; Everything is free between this and directory */ length= ((block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE * max_entry) - rec_offset); } else length= start_of_next_entry(dir) - rec_offset; DBUG_ASSERT((int) length >= 0); if (length < request_length) { /* Not enough continuous space, compact page to get more */ int2store(dir, rec_offset); /* Reset length, as this may be a deleted block */ int2store(dir+2, 0); _ma_compact_block_page(share, buff, rownr, 1, head_page ? info->trn->min_read_from: 0, head_page ? share->base.min_block_length : 0); rec_offset= uint2korr(dir); length= uint2korr(dir+2); if (length < request_length) { DBUG_PRINT("error", ("Not enough space: " "length: %u request_length: %u", length, request_length)); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(1); /* Error in block */ } *empty_space= length; /* All space is here */ } } } int2store(dir, rec_offset); int2store(dir + 2, length); *ret_offset= rec_offset; *ret_length= length; check_directory(share, buff, block_size, head_page ? share->base.min_block_length : 0, *empty_space - length); DBUG_RETURN(0); }
O3
c
extend_area_on_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r14 movl %r8d, %r12d movq %rdx, %rbx movq %rdi, %r15 movzbl 0x8(%rsi), %edx movq (%rdi), %rdi movl 0x7bc(%rdi), %eax movzwl (%rbx), %r9d testw %r9w, %r9w je 0x4dd95 movzwl 0x2(%rbx), %r8d addl %r8d, (%r14) jmp 0x4ddfd movzbl 0x2(%rbx), %r8d cmpq $0xff, %r8 je 0x4ddb8 leaq (%rsi,%rax), %r9 shll $0x2, %r8d subq %r8, %r9 movb 0x3(%rbx), %r8b movb %r8b, -0x5(%r9) jmp 0x4ddc0 movb 0x3(%rbx), %r8b movb %r8b, 0x9(%rsi) cmpb $-0x1, %r8b je 0x4dddd leaq (%rsi,%rax), %r9 movzbl %r8b, %r8d shll $0x2, %r8d subq %r8, %r9 movb 0x2(%rbx), %r8b movb %r8b, -0x6(%r9) leaq -0x3(%rbx), %r9 movq %r9, %r8 cmpb $0x0, -0x1(%r9) jne 0x4ddf5 leaq -0x4(%r8), %r9 cmpb $0x0, (%r8) je 0x4dde1 movzwl -0x1(%r8), %r9d xorl %r8d, %r8d movzwl %r9w, %r11d cmpl %r12d, %r8d jae 0x4dea9 leaq (%rsi,%rax), %r13 addq $-0x4, %r13 leaq 0x4(%rbx), %r10 cmpq %r13, %r10 jae 0x4de32 movzwl (%r10), %r9d addq $0x4, %r10 testl %r9d, %r9d je 0x4de16 movzwl -0x2(%r10), %r10d addl %r9d, %r10d jmp 0x4de3d movl 0xc18(%rdi), %r10d addl $0xc, %r10d subl %r10d, %r11d addl %r11d, %r8d cmpl %r12d, %r8d jae 0x4dea6 leal -0x1(%rdx), %r8d cmpl %ecx, %r8d jne 0x4de5f leal (%r10,%rdx,4), %edx subl %edx, %eax addl $-0x4, %eax movl %eax, %r8d jmp 0x4de7d leaq -0x3(%rbx), %rdx movq %rdx, %rax cmpb $0x0, -0x1(%rdx) jne 0x4de75 leaq -0x4(%rax), %rdx cmpb $0x0, (%rax) je 0x4de63 movzwl -0x1(%rax), %r8d subl %r10d, %r8d cmpl %r12d, %r8d jae 0x4dea6 movw %r10w, (%rbx) movw $0x0, 0x2(%rbx) cmpb $0x0, 0x20(%rbp) je 0x4ded1 movq 0x8(%r15), %rax movq 0x80(%rax), %r8 movl 0x3b8(%rdi), %r9d jmp 0x4ded7 movl %r10d, %r11d movq 0x18(%rbp), %rax movq 0x10(%rbp), %rcx movw %r11w, (%rbx) movw %r8w, 0x2(%rbx) movl %r11d, (%rcx) movl %r8d, (%rax) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r8d, %r8d xorl %r9d, %r9d movl %ecx, %edx movl $0x1, %ecx callq 0x4a7ec movzwl 0x2(%rbx), %r8d cmpl %r12d, %r8d jae 0x4defe movq %r15, %rdi movl $0x7f, %esi callq 0x3fe24 movb $0x1, %al jmp 0x4dec2 movzwl (%rbx), %r11d movl %r8d, (%r14) jmp 0x4dea9
extend_area_on_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r9 mov r12d, r8d mov rbx, rdx mov r15, rdi movzx edx, byte ptr [rsi+8] mov rdi, [rdi] mov eax, [rdi+7BCh] movzx r9d, word ptr [rbx] test r9w, r9w jz short loc_4DD95 movzx r8d, word ptr [rbx+2] add [r14], r8d jmp short loc_4DDFD loc_4DD95: movzx r8d, byte ptr [rbx+2] cmp r8, 0FFh jz short loc_4DDB8 lea r9, [rsi+rax] shl r8d, 2 sub r9, r8 mov r8b, [rbx+3] mov [r9-5], r8b jmp short loc_4DDC0 loc_4DDB8: mov r8b, [rbx+3] mov [rsi+9], r8b loc_4DDC0: cmp r8b, 0FFh jz short loc_4DDDD lea r9, [rsi+rax] movzx r8d, r8b shl r8d, 2 sub r9, r8 mov r8b, [rbx+2] mov [r9-6], r8b loc_4DDDD: lea r9, [rbx-3] loc_4DDE1: mov r8, r9 cmp byte ptr [r9-1], 0 jnz short loc_4DDF5 lea r9, [r8-4] cmp byte ptr [r8], 0 jz short loc_4DDE1 loc_4DDF5: movzx r9d, word ptr [r8-1] xor r8d, r8d loc_4DDFD: movzx r11d, r9w cmp r8d, r12d jnb loc_4DEA9 lea r13, [rsi+rax] add r13, 0FFFFFFFFFFFFFFFCh lea r10, [rbx+4] loc_4DE16: cmp r10, r13 jnb short loc_4DE32 movzx r9d, word ptr [r10] add r10, 4 test r9d, r9d jz short loc_4DE16 movzx r10d, word ptr [r10-2] add r10d, r9d jmp short loc_4DE3D loc_4DE32: mov r10d, [rdi+0C18h] add r10d, 0Ch loc_4DE3D: sub r11d, r10d add r8d, r11d cmp r8d, r12d jnb short loc_4DEA6 lea r8d, [rdx-1] cmp r8d, ecx jnz short loc_4DE5F lea edx, [r10+rdx*4] sub eax, edx add eax, 0FFFFFFFCh mov r8d, eax jmp short loc_4DE7D loc_4DE5F: lea rdx, [rbx-3] loc_4DE63: mov rax, rdx cmp byte ptr [rdx-1], 0 jnz short loc_4DE75 lea rdx, [rax-4] cmp byte ptr [rax], 0 jz short loc_4DE63 loc_4DE75: movzx r8d, word ptr [rax-1] sub r8d, r10d loc_4DE7D: cmp r8d, r12d jnb short loc_4DEA6 mov [rbx], r10w mov word ptr [rbx+2], 0 cmp [rbp+arg_10], 0 jz short loc_4DED1 mov rax, [r15+8] mov r8, [rax+80h] mov r9d, [rdi+3B8h] jmp short loc_4DED7 loc_4DEA6: mov r11d, r10d loc_4DEA9: mov rax, [rbp+arg_8] mov rcx, [rbp+arg_0] mov [rbx], r11w mov [rbx+2], r8w mov [rcx], r11d mov [rax], r8d xor eax, eax loc_4DEC2: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4DED1: xor r8d, r8d xor r9d, r9d loc_4DED7: mov edx, ecx mov ecx, 1 call _ma_compact_block_page movzx r8d, word ptr [rbx+2] cmp r8d, r12d jnb short loc_4DEFE mov rdi, r15 mov esi, 7Fh call _ma_set_fatal_error mov al, 1 jmp short loc_4DEC2 loc_4DEFE: movzx r11d, word ptr [rbx] mov [r14], r8d jmp short loc_4DEA9
char extend_area_on_page( long long a1, long long a2, unsigned __int16 *a3, int a4, unsigned int a5, _DWORD *a6, _DWORD *a7, _DWORD *a8, char a9) { int v13; // edx _DWORD *v14; // rdi long long v15; // rax unsigned __int16 v16; // r9 long long v17; // r8 long long v18; // r8 long long v19; // r9 unsigned __int8 v20; // r8 char *v21; // r9 int v22; // r11d unsigned __int16 *v23; // r10 int v24; // r9d int v25; // r10d _BYTE *v26; // rdx _BYTE *v27; // rax unsigned long long v28; // r8 unsigned int v29; // r9d long long v31; // rdx long long v32; // rcx int v33; // r9d v13 = *(unsigned __int8 *)(a2 + 8); v14 = *(_DWORD **)a1; v15 = (unsigned int)v14[495]; v16 = *a3; if ( *a3 ) { LODWORD(v17) = a3[1]; *a6 += v17; } else { v18 = *((unsigned __int8 *)a3 + 2); if ( v18 == 255 ) { v20 = *((_BYTE *)a3 + 3); *(_BYTE *)(a2 + 9) = v20; } else { v19 = a2 + v15 - (unsigned int)(4 * v18); v20 = *((_BYTE *)a3 + 3); *(_BYTE *)(v19 - 5) = v20; } if ( v20 != 0xFF ) *(_BYTE *)(a2 + v15 - 4 * (unsigned int)v20 - 6) = *((_BYTE *)a3 + 2); v21 = (char *)a3 - 3; do { v17 = (long long)v21; if ( *(v21 - 1) ) break; v21 -= 4; } while ( !*(_BYTE *)v17 ); v16 = *(_WORD *)(v17 - 1); LODWORD(v17) = 0; } v22 = v16; if ( (unsigned int)v17 < a5 ) { v23 = a3 + 2; while ( (unsigned long long)v23 < a2 + v15 - 4 ) { v24 = *v23; v23 += 2; if ( v24 ) { v25 = v24 + *(v23 - 1); goto LABEL_18; } } v25 = v14[774] + 12; LABEL_18: LODWORD(v17) = v22 - v25 + v17; if ( (unsigned int)v17 >= a5 ) goto LABEL_28; if ( v13 - 1 == a4 ) { LODWORD(v17) = v15 - (v25 + 4 * v13) - 4; } else { v26 = (char *)a3 - 3; do { v27 = v26; if ( *(v26 - 1) ) break; v26 -= 4; } while ( !*v27 ); LODWORD(v17) = *(unsigned __int16 *)(v27 - 1) - v25; } if ( (unsigned int)v17 >= a5 ) { LABEL_28: v22 = v25; } else { *a3 = v25; a3[1] = 0; if ( a9 ) { v28 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 128LL); v29 = v14[238]; } else { v28 = 0LL; v29 = 0; } ma_compact_block_page((long long)v14, a2, a4, 1, v28, v29); v17 = a3[1]; if ( (unsigned int)v17 < a5 ) { ma_set_fatal_error((_DWORD *)a1, 127, v31, v32, v17, v33); return 1; } v22 = *a3; *a6 = v17; } } *a3 = v22; a3[1] = v17; *a7 = v22; *a8 = v17; return 0; }
extend_area_on_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R9 MOV R12D,R8D MOV RBX,RDX MOV R15,RDI MOVZX EDX,byte ptr [RSI + 0x8] MOV RDI,qword ptr [RDI] MOV EAX,dword ptr [RDI + 0x7bc] MOVZX R9D,word ptr [RBX] TEST R9W,R9W JZ 0x0014dd95 MOVZX R8D,word ptr [RBX + 0x2] ADD dword ptr [R14],R8D JMP 0x0014ddfd LAB_0014dd95: MOVZX R8D,byte ptr [RBX + 0x2] CMP R8,0xff JZ 0x0014ddb8 LEA R9,[RSI + RAX*0x1] SHL R8D,0x2 SUB R9,R8 MOV R8B,byte ptr [RBX + 0x3] MOV byte ptr [R9 + -0x5],R8B JMP 0x0014ddc0 LAB_0014ddb8: MOV R8B,byte ptr [RBX + 0x3] MOV byte ptr [RSI + 0x9],R8B LAB_0014ddc0: CMP R8B,0xff JZ 0x0014dddd LEA R9,[RSI + RAX*0x1] MOVZX R8D,R8B SHL R8D,0x2 SUB R9,R8 MOV R8B,byte ptr [RBX + 0x2] MOV byte ptr [R9 + -0x6],R8B LAB_0014dddd: LEA R9,[RBX + -0x3] LAB_0014dde1: MOV R8,R9 CMP byte ptr [R9 + -0x1],0x0 JNZ 0x0014ddf5 LEA R9,[R8 + -0x4] CMP byte ptr [R8],0x0 JZ 0x0014dde1 LAB_0014ddf5: MOVZX R9D,word ptr [R8 + -0x1] XOR R8D,R8D LAB_0014ddfd: MOVZX R11D,R9W CMP R8D,R12D JNC 0x0014dea9 LEA R13,[RSI + RAX*0x1] ADD R13,-0x4 LEA R10,[RBX + 0x4] LAB_0014de16: CMP R10,R13 JNC 0x0014de32 MOVZX R9D,word ptr [R10] ADD R10,0x4 TEST R9D,R9D JZ 0x0014de16 MOVZX R10D,word ptr [R10 + -0x2] ADD R10D,R9D JMP 0x0014de3d LAB_0014de32: MOV R10D,dword ptr [RDI + 0xc18] ADD R10D,0xc LAB_0014de3d: SUB R11D,R10D ADD R8D,R11D CMP R8D,R12D JNC 0x0014dea6 LEA R8D,[RDX + -0x1] CMP R8D,ECX JNZ 0x0014de5f LEA EDX,[R10 + RDX*0x4] SUB EAX,EDX ADD EAX,-0x4 MOV R8D,EAX JMP 0x0014de7d LAB_0014de5f: LEA RDX,[RBX + -0x3] LAB_0014de63: MOV RAX,RDX CMP byte ptr [RDX + -0x1],0x0 JNZ 0x0014de75 LEA RDX,[RAX + -0x4] CMP byte ptr [RAX],0x0 JZ 0x0014de63 LAB_0014de75: MOVZX R8D,word ptr [RAX + -0x1] SUB R8D,R10D LAB_0014de7d: CMP R8D,R12D JNC 0x0014dea6 MOV word ptr [RBX],R10W MOV word ptr [RBX + 0x2],0x0 CMP byte ptr [RBP + 0x20],0x0 JZ 0x0014ded1 MOV RAX,qword ptr [R15 + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x0014ded7 LAB_0014dea6: MOV R11D,R10D LAB_0014dea9: MOV RAX,qword ptr [RBP + 0x18] MOV RCX,qword ptr [RBP + 0x10] MOV word ptr [RBX],R11W MOV word ptr [RBX + 0x2],R8W MOV dword ptr [RCX],R11D MOV dword ptr [RAX],R8D XOR EAX,EAX LAB_0014dec2: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014ded1: XOR R8D,R8D XOR R9D,R9D LAB_0014ded7: MOV EDX,ECX MOV ECX,0x1 CALL 0x0014a7ec MOVZX R8D,word ptr [RBX + 0x2] CMP R8D,R12D JNC 0x0014defe MOV RDI,R15 MOV ESI,0x7f CALL 0x0013fe24 MOV AL,0x1 JMP 0x0014dec2 LAB_0014defe: MOVZX R11D,word ptr [RBX] MOV dword ptr [R14],R8D JMP 0x0014dea9
int8 extend_area_on_page(long *param_1,long param_2,ushort *param_3,int param_4,uint param_5, uint *param_6,uint *param_7,uint *param_8,char param_9) { byte bVar1; ushort uVar2; uint uVar3; long lVar4; char *pcVar5; ushort *puVar6; ulong uVar7; char *pcVar8; byte bVar9; uint uVar10; int8 uVar11; int4 uVar12; uint uVar13; ushort *puVar14; bVar1 = *(byte *)(param_2 + 8); lVar4 = *param_1; uVar3 = *(uint *)(lVar4 + 0x7bc); uVar7 = (ulong)uVar3; uVar2 = *param_3; if (uVar2 == 0) { if ((byte)param_3[1] == 0xff) { bVar9 = *(byte *)((long)param_3 + 3); *(byte *)(param_2 + 9) = bVar9; } else { bVar9 = *(byte *)((long)param_3 + 3); *(byte *)(param_2 + uVar7 + (ulong)(byte)param_3[1] * -4 + -5) = bVar9; } if (bVar9 != 0xff) { *(char *)(param_2 + uVar7 + (ulong)bVar9 * -4 + -6) = (char)param_3[1]; } pcVar5 = (char *)((long)param_3 + -3); do { pcVar8 = pcVar5; if (pcVar8[-1] != '\0') break; pcVar5 = pcVar8 + -4; } while (*pcVar8 == '\0'); uVar2 = *(ushort *)(pcVar8 + -1); uVar10 = 0; } else { uVar10 = (uint)param_3[1]; *param_6 = *param_6 + (uint)param_3[1]; } uVar13 = (uint)uVar2; if (uVar10 < param_5) { puVar6 = param_3 + 2; do { puVar14 = puVar6; if ((ushort *)(param_2 + uVar7 + -4) <= puVar14) { uVar13 = *(int *)(lVar4 + 0xc18) + 0xc; goto LAB_0014de3d; } puVar6 = puVar14 + 2; } while (*puVar14 == 0); uVar13 = (uint)puVar14[1] + (uint)*puVar14; LAB_0014de3d: uVar10 = uVar10 + (uVar2 - uVar13); if (uVar10 < param_5) { if (bVar1 - 1 == param_4) { uVar10 = (uVar3 - (uVar13 + (uint)bVar1 * 4)) - 4; } else { pcVar5 = (char *)((long)param_3 + -3); do { pcVar8 = pcVar5; if (pcVar8[-1] != '\0') break; pcVar5 = pcVar8 + -4; } while (*pcVar8 == '\0'); uVar10 = *(ushort *)(pcVar8 + -1) - uVar13; } if (uVar10 < param_5) { *param_3 = (ushort)uVar13; param_3[1] = 0; if (param_9 == '\0') { uVar11 = 0; uVar12 = 0; } else { uVar11 = *(int8 *)(param_1[1] + 0x80); uVar12 = *(int4 *)(lVar4 + 0x3b8); } _ma_compact_block_page(lVar4,param_2,param_4,1,uVar11,uVar12); uVar10 = (uint)param_3[1]; if (uVar10 < param_5) { _ma_set_fatal_error(param_1,0x7f); return 1; } uVar13 = (uint)*param_3; *param_6 = uVar10; } } } *param_3 = (ushort)uVar13; param_3[1] = (ushort)uVar10; *param_7 = uVar13; *param_8 = uVar10; return 0; }
9,072
mcp::server::set_mount_point(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>)
hkr04[P]cpp-mcp/src/mcp_server.cpp
bool server::set_mount_point(const std::string& mount_point, const std::string& dir, httplib::Headers headers) { return http_server_->set_mount_point(mount_point, dir, headers); }
O1
cpp
mcp::server::set_mount_point(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::unordered_multimap<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %rbx movq %rsi, %r14 movq 0x78(%rdi), %r15 xorl %eax, %eax leaq 0x10(%rsp), %r12 movq %rax, (%r12) movq 0x8(%rcx), %rdx movq %rdx, 0x8(%r12) movq %rax, 0x10(%r12) movq 0x18(%rcx), %rdx movq %rdx, 0x18(%r12) movups 0x20(%rcx), %xmm0 movups %xmm0, 0x20(%r12) movq %rax, 0x30(%r12) leaq 0x8(%rsp), %rdx movq %r12, (%rdx) movq %r12, %rdi movq %rcx, %rsi callq 0x2df08 movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r12, %rcx callq 0x1e618 movl %eax, %ebx leaq 0x10(%rsp), %rdi callq 0x1f32a movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x1f32a movq %rbx, %rdi callq 0xaa60 nop
_ZN3mcp6server15set_mount_pointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_St18unordered_multimapIS6_S6_N7httplib6detail11case_ignore4hashENSC_8equal_toESaISt4pairIS7_S6_EEE: push r15 push r14 push r12 push rbx sub rsp, 48h mov rbx, rdx mov r14, rsi mov r15, [rdi+78h] xor eax, eax lea r12, [rsp+68h+var_58] mov [r12], rax mov rdx, [rcx+8] mov [r12+8], rdx mov [r12+10h], rax mov rdx, [rcx+18h] mov [r12+18h], rdx movups xmm0, xmmword ptr [rcx+20h] movups xmmword ptr [r12+20h], xmm0 mov [r12+30h], rax lea rdx, [rsp+68h+var_60] mov [rdx], r12 mov rdi, r12 mov rsi, rcx call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEE9_M_assignIRKSM_NSA_10_AllocNodeISaINSA_10_Hash_nodeIS8_Lb1EEEEEEEEvOT_RKT0_; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_assign<std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<std::string const,std::string>,true>>>>(std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<std::string const,std::string>,true>>> const&) mov rdi, r15; int mov rsi, r14; int mov rdx, rbx; int mov rcx, r12; int call _ZN7httplib6Server15set_mount_pointERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_St18unordered_multimapIS6_S6_NS_6detail11case_ignore4hashENSB_8equal_toESaISt4pairIS7_S6_EEE; httplib::Server::set_mount_point(std::string const&,std::string const&,std::unordered_multimap<std::string,std::string,httplib::detail::case_ignore::hash,httplib::detail::case_ignore::equal_to,std::allocator<std::pair<std::string const,std::string>>>) mov ebx, eax lea rdi, [rsp+68h+var_58] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::~_Hashtable() mov eax, ebx add rsp, 48h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_8] call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESaIS8_ENSt8__detail10_Select1stEN7httplib6detail11case_ignore8equal_toENSE_4hashENSA_18_Mod_range_hashingENSA_20_Default_ranged_hashENSA_20_Prime_rehash_policyENSA_17_Hashtable_traitsILb1ELb0ELb0EEEED2Ev; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::~_Hashtable() mov rdi, rbx call __Unwind_Resume
long long mcp::server::set_mount_point(long long a1, int a2, int a3, long long a4) { long long v5; // r15 int v6; // r8d int v7; // r9d unsigned int v8; // ebx void *v10; // [rsp+0h] [rbp-68h] long long v11; // [rsp+10h] [rbp-58h] BYREF long long v12; // [rsp+18h] [rbp-50h] void *v13; // [rsp+20h] [rbp-48h] long long v14; // [rsp+28h] [rbp-40h] __int128 v15; // [rsp+30h] [rbp-38h] long long v16; // [rsp+40h] [rbp-28h] v5 = *(_QWORD *)(a1 + 120); v11 = 0LL; v12 = *(_QWORD *)(a4 + 8); v13 = 0LL; v14 = *(_QWORD *)(a4 + 24); v15 = *(_OWORD *)(a4 + 32); v16 = 0LL; std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::_M_assign<std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<std::string const,std::string>,true>>>>( &v11, a4); v8 = httplib::Server::set_mount_point(v5, a2, a3, (int)&v11, v6, v7, v10, (int)&v11, v11, v12, v13, v14, v15); std::_Hashtable<std::string,std::pair<std::string const,std::string>,std::allocator<std::pair<std::string const,std::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>::~_Hashtable(&v11); return v8; }
set_mount_point: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RDX MOV R14,RSI MOV R15,qword ptr [RDI + 0x78] XOR EAX,EAX LEA R12,[RSP + 0x10] MOV qword ptr [R12],RAX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [R12 + 0x8],RDX MOV qword ptr [R12 + 0x10],RAX MOV RDX,qword ptr [RCX + 0x18] MOV qword ptr [R12 + 0x18],RDX MOVUPS XMM0,xmmword ptr [RCX + 0x20] MOVUPS xmmword ptr [R12 + 0x20],XMM0 MOV qword ptr [R12 + 0x30],RAX LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],R12 MOV RDI,R12 MOV RSI,RCX CALL 0x0012df08 LAB_001182db: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX MOV RCX,R12 CALL 0x0011e618 LAB_001182ec: MOV EBX,EAX LEA RDI,[RSP + 0x10] CALL 0x0011f32a MOV EAX,EBX ADD RSP,0x48 POP RBX POP R12 POP R14 POP R15 RET
/* mcp::server::set_mount_point(std::__cxx11::string const&, std::__cxx11::string const&, std::unordered_multimap<std::__cxx11::string, std::__cxx11::string, httplib::detail::case_ignore::hash, httplib::detail::case_ignore::equal_to, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > >) */ int4 __thiscall mcp::server::set_mount_point(server *this,int8 param_1,int8 param_2,_Hashtable *param_4) { Server *pSVar1; int4 uVar2; _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> *local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int8 local_38; int8 uStack_30; int8 local_28; pSVar1 = *(Server **)(this + 0x78); local_58 = 0; local_50 = *(int8 *)(param_4 + 8); local_48 = 0; local_40 = *(int8 *)(param_4 + 0x18); local_38 = *(int8 *)(param_4 + 0x20); uStack_30 = *(int8 *)(param_4 + 0x28); local_28 = 0; local_60 = (_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> *)&local_58; std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> :: _M_assign<std::_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>>const&,std::__detail::_AllocNode<std::allocator<std::__detail::_Hash_node<std::pair<std::__cxx11::string_const,std::__cxx11::string>,true>>>> ((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> *)&local_58,param_4,(_AllocNode *)&local_60); /* try { // try from 001182db to 001182eb has its CatchHandler @ 00118306 */ uVar2 = httplib::Server::set_mount_point (pSVar1,param_1,param_2, (_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> *)&local_58); std:: _Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> ::~_Hashtable((_Hashtable<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::__detail::_Select1st,httplib::detail::case_ignore::equal_to,httplib::detail::case_ignore::hash,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,false>> *)&local_58); return uVar2; }
9,073
inverse_fp6
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/fp12_tower.c
static void inverse_fp6(vec384fp6 ret, const vec384fp6 a) { vec384x c0, c1, c2, t0, t1; /* c0 = a0^2 - (a1*a2)*(u+1) */ sqr_fp2(c0, a[0]); mul_fp2(t0, a[1], a[2]); mul_by_u_plus_1_fp2(t0, t0); sub_fp2(c0, c0, t0); /* c1 = a2^2*(u+1) - (a0*a1) */ sqr_fp2(c1, a[2]); mul_by_u_plus_1_fp2(c1, c1); mul_fp2(t0, a[0], a[1]); sub_fp2(c1, c1, t0); /* c2 = a1^2 - a0*a2 */ sqr_fp2(c2, a[1]); mul_fp2(t0, a[0], a[2]); sub_fp2(c2, c2, t0); /* (a2*c1 + a1*c2)*(u+1) + a0*c0 */ mul_fp2(t0, c1, a[2]); mul_fp2(t1, c2, a[1]); add_fp2(t0, t0, t1); mul_by_u_plus_1_fp2(t0, t0); mul_fp2(t1, c0, a[0]); add_fp2(t0, t0, t1); reciprocal_fp2(t1, t0); mul_fp2(ret[0], c0, t1); mul_fp2(ret[1], c1, t1); mul_fp2(ret[2], c2, t1); }
O0
c
inverse_fp6: pushq %rbp movq %rsp, %rbp subq $0x1f0, %rsp # imm = 0x1F0 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) leaq -0x70(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xb6750 leaq -0x190(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x60, %rsi movq -0x10(%rbp), %rdx addq $0xc0, %rdx callq 0xb66e0 leaq -0x190(%rbp), %rdi leaq -0x190(%rbp), %rsi callq 0xbd630 leaq -0x70(%rbp), %rdi leaq -0x70(%rbp), %rsi leaq -0x190(%rbp), %rdx callq 0xb6520 leaq -0xd0(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0xc0, %rsi callq 0xb6750 leaq -0xd0(%rbp), %rdi leaq -0xd0(%rbp), %rsi callq 0xbd630 leaq -0x190(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq $0x60, %rdx callq 0xb66e0 leaq -0xd0(%rbp), %rdi leaq -0xd0(%rbp), %rsi leaq -0x190(%rbp), %rdx callq 0xb6520 leaq -0x130(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x60, %rsi callq 0xb6750 leaq -0x190(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rdx addq $0xc0, %rdx callq 0xb66e0 leaq -0x130(%rbp), %rdi leaq -0x130(%rbp), %rsi leaq -0x190(%rbp), %rdx callq 0xb6520 leaq -0x190(%rbp), %rdi leaq -0xd0(%rbp), %rsi movq -0x10(%rbp), %rdx addq $0xc0, %rdx callq 0xb66e0 leaq -0x1f0(%rbp), %rdi leaq -0x130(%rbp), %rsi movq -0x10(%rbp), %rdx addq $0x60, %rdx callq 0xb66e0 leaq -0x190(%rbp), %rdi leaq -0x190(%rbp), %rsi leaq -0x1f0(%rbp), %rdx callq 0xb64b0 leaq -0x190(%rbp), %rdi leaq -0x190(%rbp), %rsi callq 0xbd630 leaq -0x1f0(%rbp), %rdi leaq -0x70(%rbp), %rsi movq -0x10(%rbp), %rdx callq 0xb66e0 leaq -0x190(%rbp), %rdi leaq -0x190(%rbp), %rsi leaq -0x1f0(%rbp), %rdx callq 0xb64b0 leaq -0x1f0(%rbp), %rdi leaq -0x190(%rbp), %rsi callq 0xb2730 movq -0x8(%rbp), %rdi leaq -0x70(%rbp), %rsi leaq -0x1f0(%rbp), %rdx callq 0xb66e0 movq -0x8(%rbp), %rdi addq $0x60, %rdi leaq -0xd0(%rbp), %rsi leaq -0x1f0(%rbp), %rdx callq 0xb66e0 movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq -0x130(%rbp), %rsi leaq -0x1f0(%rbp), %rdx callq 0xb66e0 addq $0x1f0, %rsp # imm = 0x1F0 popq %rbp retq nopl (%rax,%rax)
inverse_fp6: push rbp mov rbp, rsp sub rsp, 1F0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi lea rdi, [rbp+var_70] mov rsi, [rbp+var_10] call sqr_fp2 lea rdi, [rbp+var_190] mov rsi, [rbp+var_10] add rsi, 60h ; '`' mov rdx, [rbp+var_10] add rdx, 0C0h call mul_fp2 lea rdi, [rbp+var_190] lea rsi, [rbp+var_190] call mul_by_u_plus_1_fp2 lea rdi, [rbp+var_70] lea rsi, [rbp+var_70] lea rdx, [rbp+var_190] call _sub_fp2 lea rdi, [rbp+var_D0] mov rsi, [rbp+var_10] add rsi, 0C0h call sqr_fp2 lea rdi, [rbp+var_D0] lea rsi, [rbp+var_D0] call mul_by_u_plus_1_fp2 lea rdi, [rbp+var_190] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, 60h ; '`' call mul_fp2 lea rdi, [rbp+var_D0] lea rsi, [rbp+var_D0] lea rdx, [rbp+var_190] call _sub_fp2 lea rdi, [rbp+var_130] mov rsi, [rbp+var_10] add rsi, 60h ; '`' call sqr_fp2 lea rdi, [rbp+var_190] mov rsi, [rbp+var_10] mov rdx, [rbp+var_10] add rdx, 0C0h call mul_fp2 lea rdi, [rbp+var_130] lea rsi, [rbp+var_130] lea rdx, [rbp+var_190] call _sub_fp2 lea rdi, [rbp+var_190] lea rsi, [rbp+var_D0] mov rdx, [rbp+var_10] add rdx, 0C0h call mul_fp2 lea rdi, [rbp+var_1F0] lea rsi, [rbp+var_130] mov rdx, [rbp+var_10] add rdx, 60h ; '`' call mul_fp2 lea rdi, [rbp+var_190] lea rsi, [rbp+var_190] lea rdx, [rbp+var_1F0] call add_fp2 lea rdi, [rbp+var_190] lea rsi, [rbp+var_190] call mul_by_u_plus_1_fp2 lea rdi, [rbp+var_1F0] lea rsi, [rbp+var_70] mov rdx, [rbp+var_10] call mul_fp2 lea rdi, [rbp+var_190] lea rsi, [rbp+var_190] lea rdx, [rbp+var_1F0] call add_fp2 lea rdi, [rbp+var_1F0] lea rsi, [rbp+var_190] call reciprocal_fp2 mov rdi, [rbp+var_8] lea rsi, [rbp+var_70] lea rdx, [rbp+var_1F0] call mul_fp2 mov rdi, [rbp+var_8] add rdi, 60h ; '`' lea rsi, [rbp+var_D0] lea rdx, [rbp+var_1F0] call mul_fp2 mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, [rbp+var_130] lea rdx, [rbp+var_1F0] call mul_fp2 add rsp, 1F0h pop rbp retn
long long inverse_fp6(long long a1, long long a2) { _BYTE v3[96]; // [rsp+0h] [rbp-1F0h] BYREF _BYTE v4[96]; // [rsp+60h] [rbp-190h] BYREF _BYTE v5[96]; // [rsp+C0h] [rbp-130h] BYREF _BYTE v6[96]; // [rsp+120h] [rbp-D0h] BYREF _BYTE v7[96]; // [rsp+180h] [rbp-70h] BYREF long long v8; // [rsp+1E0h] [rbp-10h] long long v9; // [rsp+1E8h] [rbp-8h] v9 = a1; v8 = a2; sqr_fp2((long long)v7, a2); mul_fp2((long long)v4, v8 + 96, v8 + 192); mul_by_u_plus_1_fp2((long long)v4, (long long)v4); sub_fp2((long long)v7, (long long)v7, (long long)v4); sqr_fp2((long long)v6, v8 + 192); mul_by_u_plus_1_fp2((long long)v6, (long long)v6); mul_fp2((long long)v4, v8, v8 + 96); sub_fp2((long long)v6, (long long)v6, (long long)v4); sqr_fp2((long long)v5, v8 + 96); mul_fp2((long long)v4, v8, v8 + 192); sub_fp2((long long)v5, (long long)v5, (long long)v4); mul_fp2((long long)v4, (long long)v6, v8 + 192); mul_fp2((long long)v3, (long long)v5, v8 + 96); add_fp2((long long)v4, (long long)v4, (long long)v3); mul_by_u_plus_1_fp2((long long)v4, (long long)v4); mul_fp2((long long)v3, (long long)v7, v8); add_fp2((long long)v4, (long long)v4, (long long)v3); reciprocal_fp2((long long)v3, (long long)v4); mul_fp2(v9, (long long)v7, (long long)v3); mul_fp2(v9 + 96, (long long)v6, (long long)v3); return mul_fp2(v9 + 192, (long long)v5, (long long)v3); }
inverse_fp6: PUSH RBP MOV RBP,RSP SUB RSP,0x1f0 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI LEA RDI,[RBP + -0x70] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001b6750 LEA RDI,[RBP + -0x190] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x60 MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0xc0 CALL 0x001b66e0 LEA RDI,[RBP + -0x190] LEA RSI,[RBP + -0x190] CALL 0x001bd630 LEA RDI,[RBP + -0x70] LEA RSI,[RBP + -0x70] LEA RDX,[RBP + -0x190] CALL 0x001b6520 LEA RDI,[RBP + -0xd0] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0xc0 CALL 0x001b6750 LEA RDI,[RBP + -0xd0] LEA RSI,[RBP + -0xd0] CALL 0x001bd630 LEA RDI,[RBP + -0x190] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x60 CALL 0x001b66e0 LEA RDI,[RBP + -0xd0] LEA RSI,[RBP + -0xd0] LEA RDX,[RBP + -0x190] CALL 0x001b6520 LEA RDI,[RBP + -0x130] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x60 CALL 0x001b6750 LEA RDI,[RBP + -0x190] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0xc0 CALL 0x001b66e0 LEA RDI,[RBP + -0x130] LEA RSI,[RBP + -0x130] LEA RDX,[RBP + -0x190] CALL 0x001b6520 LEA RDI,[RBP + -0x190] LEA RSI,[RBP + -0xd0] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0xc0 CALL 0x001b66e0 LEA RDI,[RBP + -0x1f0] LEA RSI,[RBP + -0x130] MOV RDX,qword ptr [RBP + -0x10] ADD RDX,0x60 CALL 0x001b66e0 LEA RDI,[RBP + -0x190] LEA RSI,[RBP + -0x190] LEA RDX,[RBP + -0x1f0] CALL 0x001b64b0 LEA RDI,[RBP + -0x190] LEA RSI,[RBP + -0x190] CALL 0x001bd630 LEA RDI,[RBP + -0x1f0] LEA RSI,[RBP + -0x70] MOV RDX,qword ptr [RBP + -0x10] CALL 0x001b66e0 LEA RDI,[RBP + -0x190] LEA RSI,[RBP + -0x190] LEA RDX,[RBP + -0x1f0] CALL 0x001b64b0 LEA RDI,[RBP + -0x1f0] LEA RSI,[RBP + -0x190] CALL 0x001b2730 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x70] LEA RDX,[RBP + -0x1f0] CALL 0x001b66e0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x60 LEA RSI,[RBP + -0xd0] LEA RDX,[RBP + -0x1f0] CALL 0x001b66e0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[RBP + -0x130] LEA RDX,[RBP + -0x1f0] CALL 0x001b66e0 ADD RSP,0x1f0 POP RBP RET
void inverse_fp6(long param_1,long param_2) { int1 local_1f8 [96]; int1 local_198 [96]; int1 local_138 [96]; int1 local_d8 [96]; int1 local_78 [96]; long local_18; long local_10; local_18 = param_2; local_10 = param_1; sqr_fp2(local_78,param_2); mul_fp2(local_198,local_18 + 0x60,local_18 + 0xc0); mul_by_u_plus_1_fp2(local_198,local_198); sub_fp2(local_78,local_78,local_198); sqr_fp2(local_d8,local_18 + 0xc0); mul_by_u_plus_1_fp2(local_d8,local_d8); mul_fp2(local_198,local_18,local_18 + 0x60); sub_fp2(local_d8,local_d8,local_198); sqr_fp2(local_138,local_18 + 0x60); mul_fp2(local_198,local_18,local_18 + 0xc0); sub_fp2(local_138,local_138,local_198); mul_fp2(local_198,local_d8,local_18 + 0xc0); mul_fp2(local_1f8,local_138,local_18 + 0x60); add_fp2(local_198,local_198,local_1f8); mul_by_u_plus_1_fp2(local_198,local_198); mul_fp2(local_1f8,local_78,local_18); add_fp2(local_198,local_198,local_1f8); reciprocal_fp2(local_1f8,local_198); mul_fp2(local_10,local_78,local_1f8); mul_fp2(local_10 + 0x60,local_d8,local_1f8); mul_fp2(local_10 + 0xc0,local_138,local_1f8); return; }
9,074
my_mb_wc_euc_kr
eloqsql/strings/ctype-euc_kr.c
static int my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O3
c
my_mb_wc_euc_kr: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x3a501 movsbq (%rdx), %rdi testq %rdi, %rdi js 0x3a4c0 movq %rdi, (%rsi) movl $0x1, %eax retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x3a501 movzbl %dil, %ecx xorl %eax, %eax cmpl $0x80, %ecx je 0x3a501 cmpl $0xff, %ecx je 0x3a501 movzbl 0x1(%rdx), %edx leal 0x1(%rdx), %edi cmpb $-0x7f, %dil ja 0x3a502 movl %edx, %edi andb $-0x21, %dil addb $-0x5b, %dil cmpb $-0x1a, %dil jae 0x3a502 retq pushq %rbp movq %rsp, %rbp shll $0x8, %ecx leal (%rcx,%rdx), %eax addl $0xffff7ebf, %eax # imm = 0xFFFF7EBF cmpl $0x47bd, %eax # imm = 0x47BD ja 0x3a523 movl %eax, %eax leaq 0x873ff(%rip), %rcx # 0xc1920 jmp 0x3a53c orl %edx, %ecx addl $0xffff355f, %ecx # imm = 0xFFFF355F cmpl $0x335e, %ecx # imm = 0x335E jae 0x3a555 movl %ecx, %eax leaq 0x90364(%rip), %rcx # 0xca8a0 leaq (%rcx,%rax,2), %rax movzwl (%rax), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0x3a561 jmp 0x3a55c movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_euc_kr: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_3A501 movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_3A4C0 mov [rsi], rdi mov eax, 1 retn loc_3A4C0: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short locret_3A501 movzx ecx, dil xor eax, eax cmp ecx, 80h jz short locret_3A501 cmp ecx, 0FFh jz short locret_3A501 movzx edx, byte ptr [rdx+1] lea edi, [rdx+1] cmp dil, 81h ja short loc_3A502 mov edi, edx and dil, 0DFh add dil, 0A5h cmp dil, 0E6h jnb short loc_3A502 locret_3A501: retn loc_3A502: push rbp mov rbp, rsp shl ecx, 8 lea eax, [rcx+rdx] add eax, 0FFFF7EBFh cmp eax, 47BDh ja short loc_3A523 mov eax, eax lea rcx, tab_ksc5601_uni0 jmp short loc_3A53C loc_3A523: or ecx, edx add ecx, 0FFFF355Fh cmp ecx, 335Eh jnb short loc_3A555 mov eax, ecx lea rcx, tab_ksc5601_uni1 loc_3A53C: lea rax, [rcx+rax*2] movzx eax, word ptr [rax] movzx ecx, ax mov [rsi], rcx mov eax, 2 test cx, cx jnz short loc_3A561 jmp short loc_3A55C loc_3A555: mov qword ptr [rsi], 0 loc_3A55C: mov eax, 0FFFFFFFEh loc_3A561: pop rbp retn
long long my_mb_wc_euc_kr(long long a1, long long *a2, char *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi int v6; // edx int v7; // ecx long long v8; // rax unsigned __int16 *v9; // rcx unsigned int v10; // ecx long long v11; // rcx result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( v5 >= 0 ) { *a2 = v5; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { result = 0LL; if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 ) { v6 = (unsigned __int8)a3[1]; if ( (unsigned __int8)(v6 + 1) > 0x81u || (unsigned __int8)((v6 & 0xDF) - 91) >= 0xE6u ) { v7 = (unsigned __int8)v5 << 8; LODWORD(v8) = v7 + v6 - 33089; if ( (unsigned int)v8 > 0x47BD ) { v10 = (v6 | v7) - 51873; if ( v10 >= 0x335E ) { *a2 = 0LL; return 4294967294LL; } v8 = v10; v9 = (unsigned __int16 *)&tab_ksc5601_uni1; } else { v8 = (unsigned int)v8; v9 = (unsigned __int16 *)&tab_ksc5601_uni0; } v11 = v9[v8]; *a2 = v11; result = 2LL; if ( (_WORD)v11 ) return result; return 4294967294LL; } } } } return result; }
my_mb_wc_euc_kr: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0013a501 MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x0013a4c0 MOV qword ptr [RSI],RDI MOV EAX,0x1 RET LAB_0013a4c0: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x0013a501 MOVZX ECX,DIL XOR EAX,EAX CMP ECX,0x80 JZ 0x0013a501 CMP ECX,0xff JZ 0x0013a501 MOVZX EDX,byte ptr [RDX + 0x1] LEA EDI,[RDX + 0x1] CMP DIL,0x81 JA 0x0013a502 MOV EDI,EDX AND DIL,0xdf ADD DIL,0xa5 CMP DIL,0xe6 JNC 0x0013a502 LAB_0013a501: RET LAB_0013a502: PUSH RBP MOV RBP,RSP SHL ECX,0x8 LEA EAX,[RCX + RDX*0x1] ADD EAX,0xffff7ebf CMP EAX,0x47bd JA 0x0013a523 MOV EAX,EAX LEA RCX,[0x1c1920] JMP 0x0013a53c LAB_0013a523: OR ECX,EDX ADD ECX,0xffff355f CMP ECX,0x335e JNC 0x0013a555 MOV EAX,ECX LEA RCX,[0x1ca8a0] LAB_0013a53c: LEA RAX,[RCX + RAX*0x2] MOVZX EAX,word ptr [RAX] MOVZX ECX,AX MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST CX,CX JNZ 0x0013a561 JMP 0x0013a55c LAB_0013a555: MOV qword ptr [RSI],0x0 LAB_0013a55c: MOV EAX,0xfffffffe LAB_0013a561: POP RBP RET
int8 my_mb_wc_euc_kr(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ushort uVar3; uint uVar4; int1 *puVar5; if (param_4 <= param_3) { return 0xffffff9b; } bVar1 = *param_3; if (-1 < (long)(char)bVar1) { *param_2 = (long)(char)bVar1; return 1; } if (param_4 < param_3 + 2) { return 0xffffff9a; } if (bVar1 == 0x80) { return 0; } if (bVar1 == 0xff) { return 0; } bVar2 = param_3[1]; if (((byte)(bVar2 + 1) < 0x82) && ((byte)((bVar2 & 0xdf) + 0xa5) < 0xe6)) { return 0; } uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8141; if (uVar4 < 0x47be) { puVar5 = tab_ksc5601_uni0; } else { uVar4 = CONCAT11(bVar1,bVar2) - 0xcaa1; if (0x335d < uVar4) { *param_2 = 0; return 0xfffffffe; } puVar5 = tab_ksc5601_uni1; } uVar3 = *(ushort *)(puVar5 + (ulong)uVar4 * 2); *param_2 = (ulong)uVar3; if (uVar3 == 0) { return 0xfffffffe; } return 2; }
9,075
evmone::(anonymous namespace)::InstructionTracer::on_instruction_start(unsigned int, intx::uint<256u> const*, int, long, evmone::ExecutionState const&)
corpus-core[P]colibri-stateless/build_O2/_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"; }
O2
cpp
evmone::(anonymous namespace)::InstructionTracer::on_instruction_start(unsigned int, intx::uint<256u> const*, int, long, evmone::ExecutionState const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r9, 0x20(%rsp) movq %r8, %r13 movl %ecx, %r12d movq %rdx, %r15 movq %rdi, %rbx movq 0x40(%rdi), %rcx cmpq 0x48(%rdi), %rcx jne 0x45768 movq 0x58(%rbx), %rax movl $0x1f8, %ecx # imm = 0x1F8 addq -0x8(%rax), %rcx movq %rcx, 0x30(%rsp) movq -0x10(%rcx), %rax movl %esi, %r14d movzbl (%rax,%r14), %ebp movq 0x60(%rbx), %rdi leaq 0x37201(%rip), %rsi # 0x7c985 callq 0x222f0 movq 0x60(%rbx), %rdi leaq 0x371f3(%rip), %rsi # 0x7c987 callq 0x222f0 movq (%rax), %rcx movq -0x18(%rcx), %rcx movl 0x18(%rax,%rcx), %edx andl $-0x4b, %edx orl $0x2, %edx movl %edx, 0x18(%rax,%rcx) movq %rax, %rdi movq %r14, %rsi callq 0x22290 movq 0x60(%rbx), %rdi leaq 0x371c9(%rip), %rsi # 0x7c98d callq 0x222f0 movq (%rax), %rcx movq -0x18(%rcx), %rcx movl 0x18(%rax,%rcx), %edx andl $-0x4b, %edx orl $0x2, %edx movl %edx, 0x18(%rax,%rcx) movq %rax, %rdi movl %ebp, %esi callq 0x221b0 movq 0x60(%rbx), %rdi leaq 0x371a1(%rip), %rsi # 0x7c994 callq 0x222f0 movq (%rax), %rcx movq -0x18(%rcx), %rcx movl 0x18(%rax,%rcx), %edx andl $-0x4b, %edx orl $0x8, %edx movl %edx, 0x18(%rax,%rcx) movq %rax, %rdi movq %r13, %rsi callq 0x221f0 pushq $0x22 popq %rsi movq %rax, %rdi callq 0x22350 movq 0x60(%rbx), %rdi leaq 0x37171(%rip), %rsi # 0x7c99f callq 0x222f0 movq (%rax), %rcx movq -0x18(%rcx), %rcx movl 0x18(%rax,%rcx), %edx andl $-0x4b, %edx orl $0x8, %edx movl %edx, 0x18(%rax,%rcx) movq 0x20(%rsp), %rcx movl 0x40(%rcx), %ecx shlq $0x9, %rcx leaq 0x371ad(%rip), %rdx # 0x7ca08 addq %rcx, %rdx movl %ebp, %ecx movswl (%rdx,%rcx,2), %esi movq %rax, %rdi callq 0x222b0 pushq $0x22 popq %rsi movq %rax, %rdi callq 0x22350 movq 0x60(%rbx), %rdi leaq 0x3712c(%rip), %rsi # 0x7c9ae callq 0x222f0 movq (%rax), %rcx movq -0x18(%rcx), %rcx movl 0x18(%rax,%rcx), %edx andl $-0x4b, %edx orl $0x2, %edx movl %edx, 0x18(%rax,%rcx) movq 0x20(%rsp), %rcx movq 0x10(%rcx), %rsi movq %rax, %rdi callq 0x22290 movq 0x60(%rbx), %rdi leaq 0x37138(%rip), %rsi # 0x7c9f0 callq 0x222f0 movl %ebp, 0x2c(%rsp) movslq %r12d, %rbp shlq $0x5, %rbp movq %r15, %r14 subq %rbp, %r14 addq $0x20, %r14 xorl %r12d, %r12d leaq 0x38(%rsp), %r13 cmpq %r12, %rbp je 0x45946 testq %r12, %r12 je 0x458f0 movq 0x60(%rbx), %rdi pushq $0x2c popq %rsi callq 0x22350 movq 0x60(%rbx), %rdi leaq 0x370cd(%rip), %rsi # 0x7c9c8 callq 0x222f0 movq %rax, %r15 leaq (%r14,%r12), %rax movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movq %r13, %rdi pushq $0x10 popq %rsi callq 0x461b2 movq %r15, %rdi movq %r13, %rsi callq 0x22190 movq %rax, %rdi pushq $0x22 popq %rsi callq 0x22350 movq %r13, %rdi callq 0x45b22 addq $0x20, %r12 jmp 0x458da movq 0x60(%rbx), %rdi pushq $0x5d popq %rsi callq 0x22350 movl 0x2c(%rsp), %ebp movq 0x20(%rsp), %rax cmpq $0x0, 0x50(%rax) je 0x459ae movq 0x60(%rbx), %rdi leaq 0x3704d(%rip), %rsi # 0x7c9ba callq 0x222f0 movq %rax, %r14 movq 0x20(%rsp), %rax movq 0x48(%rax), %rdx movq 0x50(%rax), %rsi leaq 0x38(%rsp), %rdi callq 0x460eb leaq 0x38(%rsp), %rsi movq %r14, %rdi callq 0x22190 pushq $0x22 popq %rsi movq %rax, %rdi callq 0x22350 leaq 0x38(%rsp), %rdi callq 0x45b22 movq 0x60(%rbx), %rdi leaq 0x37013(%rip), %rsi # 0x7c9cc callq 0x222f0 movq (%rax), %rcx movq -0x18(%rcx), %rcx movl 0x18(%rax,%rcx), %edx andl $-0x4b, %edx orl $0x2, %edx movl %edx, 0x18(%rax,%rcx) movq 0x30(%rsp), %rcx movl -0x18(%rcx), %esi incl %esi movq %rax, %rdi callq 0x221b0 movq 0x60(%rbx), %rdi leaq 0x36fe6(%rip), %rsi # 0x7c9d6 callq 0x222f0 movq (%rax), %rcx movq -0x18(%rcx), %rcx movl 0x18(%rax,%rcx), %edx andl $-0x4b, %edx orl $0x2, %edx movl %edx, 0x18(%rax,%rcx) movq 0x20(%rsp), %rcx movq (%rcx), %rsi movq %rax, %rdi callq 0x221f0 movq 0x60(%rbx), %rdi leaq 0x36fbc(%rip), %rsi # 0x7c9e1 callq 0x222f0 movq %rax, %r14 leaq 0x38(%rsp), %rdi movl %ebp, %esi callq 0x45406 leaq 0x38(%rsp), %rsi movq %r14, %rdi callq 0x22190 pushq $0x22 popq %rsi movq %rax, %rdi callq 0x22350 leaq 0x38(%rsp), %rdi callq 0x45b22 movq 0x60(%rbx), %rdi leaq 0x36f87(%rip), %rsi # 0x7c9ed callq 0x222f0 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x45a8b movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x45b22 jmp 0x45a8e movq %rax, %rbx movq %rbx, %rdi callq 0x2e859
_ZN6evmone12_GLOBAL__N_117InstructionTracer20on_instruction_startEjPKN4intx4uintILj256EEEilRKNS_14ExecutionStateE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rsp+88h+var_68], r9 mov r13, r8 mov r12d, ecx mov r15, rdx mov rbx, rdi mov rcx, [rdi+40h] cmp rcx, [rdi+48h] jnz short loc_45768 mov rax, [rbx+58h] mov ecx, 1F8h add rcx, [rax-8] loc_45768: mov [rsp+88h+var_58], rcx mov rax, [rcx-10h] mov r14d, esi movzx ebp, byte ptr [rax+r14] mov rdi, [rbx+60h] lea rsi, asc_7C985; "{" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, [rbx+60h] lea rsi, aPc; "\"pc\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [rax] mov rcx, [rcx-18h] mov edx, [rax+rcx+18h] and edx, 0FFFFFFB5h or edx, 2 mov [rax+rcx+18h], edx mov rdi, rax mov rsi, r14 call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rdi, [rbx+60h] lea rsi, aOp; ",\"op\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [rax] mov rcx, [rcx-18h] mov edx, [rax+rcx+18h] and edx, 0FFFFFFB5h or edx, 2 mov [rax+rcx+18h], edx mov rdi, rax mov esi, ebp call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, [rbx+60h] lea rsi, aGas0x; ",\"gas\":\"0x" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [rax] mov rcx, [rcx-18h] mov edx, [rax+rcx+18h] and edx, 0FFFFFFB5h or edx, 8 mov [rax+rcx+18h], edx mov rdi, rax mov rsi, r13 call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long) push 22h ; '"' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rdi, [rbx+60h] lea rsi, aGascost0x; ",\"gasCost\":\"0x" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [rax] mov rcx, [rcx-18h] mov edx, [rax+rcx+18h] and edx, 0FFFFFFB5h or edx, 8 mov [rax+rcx+18h], edx mov rcx, [rsp+88h+var_68] mov ecx, [rcx+40h] shl rcx, 9 lea rdx, _ZN6evmone5instr9gas_costsE; evmone::instr::gas_costs add rdx, rcx mov ecx, ebp movsx esi, word ptr [rdx+rcx*2] mov rdi, rax call __ZNSolsEs; std::ostream::operator<<(short) push 22h ; '"' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rdi, [rbx+60h] lea rsi, aMemsize; ",\"memSize\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [rax] mov rcx, [rcx-18h] mov edx, [rax+rcx+18h] and edx, 0FFFFFFB5h or edx, 2 mov [rax+rcx+18h], edx mov rcx, [rsp+88h+var_68] mov rsi, [rcx+10h] mov rdi, rax call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov rdi, [rbx+60h] lea rsi, aStack; ",\"stack\":[" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+88h+var_5C], ebp movsxd rbp, r12d shl rbp, 5 mov r14, r15 sub r14, rbp add r14, 20h ; ' ' xor r12d, r12d lea r13, [rsp+88h+var_50] loc_458DA: cmp rbp, r12 jz short loc_45946 test r12, r12 jz short loc_458F0 mov rdi, [rbx+60h] push 2Ch ; ',' pop rsi call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) loc_458F0: mov rdi, [rbx+60h] lea rsi, aReturndata0x+0Eh; "\"0x" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r15, rax lea rax, [r14+r12] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups [rsp+88h+var_78], xmm1 movups [rsp+88h+var_88], xmm0 mov rdi, r13 push 10h pop rsi call _ZN4intx9to_stringILj256EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4uintIXT_EEEi; intx::to_string<256u>(intx::uint<256u>,int) mov rdi, r15 mov rsi, r13 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax push 22h ; '"' pop rsi call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov rdi, r13 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add r12, 20h ; ' ' jmp short loc_458DA loc_45946: mov rdi, [rbx+60h] push 5Dh ; ']' pop rsi call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) mov ebp, [rsp+88h+var_5C] mov rax, [rsp+88h+var_68] cmp qword ptr [rax+50h], 0 jz short loc_459AE mov rdi, [rbx+60h] lea rsi, aReturndata0x; ",\"returnData\":\"0x" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax mov rax, [rsp+88h+var_68] mov rdx, [rax+48h] mov rsi, [rax+50h] lea rdi, [rsp+88h+var_50] call _ZN4evmc3hexB5cxx11ESt17basic_string_viewIhNS_11byte_traitsIhEEE; evmc::hex(std::basic_string_view<uchar,evmc::byte_traits<uchar>>) lea rsi, [rsp+88h+var_50] mov rdi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) push 22h ; '"' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) lea rdi, [rsp+88h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_459AE: mov rdi, [rbx+60h] lea rsi, aDepth; ",\"depth\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [rax] mov rcx, [rcx-18h] mov edx, [rax+rcx+18h] and edx, 0FFFFFFB5h or edx, 2 mov [rax+rcx+18h], edx mov rcx, [rsp+88h+var_58] mov esi, [rcx-18h] inc esi mov rdi, rax call __ZNSolsEi; std::ostream::operator<<(int) mov rdi, [rbx+60h] lea rsi, aRefund; ",\"refund\":" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rcx, [rax] mov rcx, [rcx-18h] mov edx, [rax+rcx+18h] and edx, 0FFFFFFB5h or edx, 2 mov [rax+rcx+18h], edx mov rcx, [rsp+88h+var_68] mov rsi, [rcx] mov rdi, rax call __ZNSo9_M_insertIlEERSoT_; std::ostream::_M_insert<long>(long) mov rdi, [rbx+60h] lea rsi, aOpname; ",\"opName\":\"" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov r14, rax lea rdi, [rsp+88h+var_50] mov esi, ebp call _ZN6evmone12_GLOBAL__N_18get_nameB5cxx11Eh; evmone::`anonymous namespace'::get_name(uchar) lea rsi, [rsp+88h+var_50] mov rdi, r14 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) push 22h ; '"' pop rsi mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_c; std::operator<<<std::char_traits<char>>(std::ostream &,char) lea rdi, [rsp+88h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rbx+60h] lea rsi, asc_7C9ED; "}\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_45A8B mov rbx, rax lea rdi, [rsp+88h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_45A8E loc_45A8B: mov rbx, rax loc_45A8E: mov rdi, rbx call __clang_call_terminate
long long evmone::`anonymous namespace'::InstructionTracer::on_instruction_start( _QWORD *a1, unsigned int a2, long long a3, int a4, long long a5, long long a6) { long long v9; // rcx unsigned int v10; // ebp _QWORD *v11; // rax _QWORD *v12; // rax _QWORD *v13; // rax long long v14; // rax _QWORD *v15; // rax long long v16; // rax _QWORD *v17; // rax long long v18; // rbp long long v19; // r14 long long i; // r12 long long v21; // r15 int v22; // edx int v23; // ecx int v24; // r8d int v25; // r9d long long v26; // rax long long v27; // r14 int v28; // ecx int v29; // r8d int v30; // r9d long long v31; // rax _QWORD *v32; // rax _QWORD *v33; // rax long long v34; // r14 long long v35; // rax char v37; // [rsp+0h] [rbp-88h] int v39; // [rsp+2Ch] [rbp-5Ch] long long v40; // [rsp+30h] [rbp-58h] _BYTE v41[80]; // [rsp+38h] [rbp-50h] BYREF v9 = a1[8]; if ( v9 == a1[9] ) v9 = *(_QWORD *)(a1[11] - 8LL) + 504LL; v40 = v9; v10 = *(unsigned __int8 *)(*(_QWORD *)(v9 - 16) + a2); std::operator<<<std::char_traits<char>>(a1[12], "{"); v11 = (_QWORD *)std::operator<<<std::char_traits<char>>(a1[12], "\"pc\":"); *(_DWORD *)((char *)v11 + *(_QWORD *)(*v11 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v11 + *(_QWORD *)(*v11 - 24LL) + 24) & 0xFFFFFFB5 | 2; std::ostream::_M_insert<unsigned long>(v11, a2); v12 = (_QWORD *)std::operator<<<std::char_traits<char>>(a1[12], ",\"op\":"); *(_DWORD *)((char *)v12 + *(_QWORD *)(*v12 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v12 + *(_QWORD *)(*v12 - 24LL) + 24) & 0xFFFFFFB5 | 2; std::ostream::operator<<(v12, v10); v13 = (_QWORD *)std::operator<<<std::char_traits<char>>(a1[12], ",\"gas\":\"0x"); *(_DWORD *)((char *)v13 + *(_QWORD *)(*v13 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v13 + *(_QWORD *)(*v13 - 24LL) + 24) & 0xFFFFFFB5 | 8; v14 = std::ostream::_M_insert<long>(v13, a5); std::operator<<<std::char_traits<char>>(v14, 34LL); v15 = (_QWORD *)std::operator<<<std::char_traits<char>>(a1[12], ",\"gasCost\":\"0x"); *(_DWORD *)((char *)v15 + *(_QWORD *)(*v15 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v15 + *(_QWORD *)(*v15 - 24LL) + 24) & 0xFFFFFFB5 | 8; v16 = std::ostream::operator<<( v15, (unsigned int)evmone::instr::gas_costs[256 * (unsigned long long)*(unsigned int *)(a6 + 64) + v10]); std::operator<<<std::char_traits<char>>(v16, 34LL); v17 = (_QWORD *)std::operator<<<std::char_traits<char>>(a1[12], ",\"memSize\":"); *(_DWORD *)((char *)v17 + *(_QWORD *)(*v17 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v17 + *(_QWORD *)(*v17 - 24LL) + 24) & 0xFFFFFFB5 | 2; std::ostream::_M_insert<unsigned long>(v17, *(_QWORD *)(a6 + 16)); std::operator<<<std::char_traits<char>>(a1[12], ",\"stack\":["); v39 = v10; v18 = 32LL * a4; v19 = a3 - v18 + 32; for ( i = 0LL; v18 != i; i += 32LL ) { if ( i ) std::operator<<<std::char_traits<char>>(a1[12], 44LL); v21 = std::operator<<<std::char_traits<char>>(a1[12], "\"0x"); intx::to_string<256u>( (unsigned int)v41, 16, v22, v23, v24, v25, *(_QWORD *)(v19 + i), *(_QWORD *)(v19 + i + 8), *(_QWORD *)(v19 + i + 16), *(_QWORD *)(v19 + i + 24)); v26 = std::operator<<<char>(v21, v41); std::operator<<<std::char_traits<char>>(v26, 34LL); std::string::~string(v41); } std::operator<<<std::char_traits<char>>(a1[12], 93LL); if ( *(_QWORD *)(a6 + 80) ) { v27 = std::operator<<<std::char_traits<char>>(a1[12], ",\"returnData\":\"0x"); evmc::hex[abi:cxx11]((unsigned int)v41, *(_QWORD *)(a6 + 80), *(_QWORD *)(a6 + 72), v28, v29, v30, v37); v31 = std::operator<<<char>(v27, v41); std::operator<<<std::char_traits<char>>(v31, 34LL); std::string::~string(v41); } v32 = (_QWORD *)std::operator<<<std::char_traits<char>>(a1[12], ",\"depth\":"); *(_DWORD *)((char *)v32 + *(_QWORD *)(*v32 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v32 + *(_QWORD *)(*v32 - 24LL) + 24) & 0xFFFFFFB5 | 2; std::ostream::operator<<(v32, (unsigned int)(*(_DWORD *)(v40 - 24) + 1)); v33 = (_QWORD *)std::operator<<<std::char_traits<char>>(a1[12], ",\"refund\":"); *(_DWORD *)((char *)v33 + *(_QWORD *)(*v33 - 24LL) + 24) = *(_DWORD *)((_BYTE *)v33 + *(_QWORD *)(*v33 - 24LL) + 24) & 0xFFFFFFB5 | 2; std::ostream::_M_insert<long>(v33, *(_QWORD *)a6); v34 = std::operator<<<std::char_traits<char>>(a1[12], ",\"opName\":\""); evmone::`anonymous namespace'::get_name[abi:cxx11]((long long)v41, v39); v35 = std::operator<<<char>(v34, v41); std::operator<<<std::char_traits<char>>(v35, 34LL); std::string::~string(v41); return std::operator<<<std::char_traits<char>>(a1[12], "}\n"); }
on_instruction_start: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RSP + 0x20],R9 MOV R13,R8 MOV R12D,ECX MOV R15,RDX MOV RBX,RDI MOV RCX,qword ptr [RDI + 0x40] CMP RCX,qword ptr [RDI + 0x48] JNZ 0x00145768 MOV RAX,qword ptr [RBX + 0x58] MOV ECX,0x1f8 ADD RCX,qword ptr [RAX + -0x8] LAB_00145768: MOV qword ptr [RSP + 0x30],RCX MOV RAX,qword ptr [RCX + -0x10] MOV R14D,ESI MOVZX EBP,byte ptr [RAX + R14*0x1] MOV RDI,qword ptr [RBX + 0x60] LAB_0014577d: LEA RSI,[0x17c985] CALL 0x001222f0 MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c987] CALL 0x001222f0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18] AND EDX,0xffffffb5 OR EDX,0x2 MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX MOV RDI,RAX MOV RSI,R14 CALL 0x00122290 MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c98d] CALL 0x001222f0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18] AND EDX,0xffffffb5 OR EDX,0x2 MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX MOV RDI,RAX MOV ESI,EBP CALL 0x001221b0 MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c994] CALL 0x001222f0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18] AND EDX,0xffffffb5 OR EDX,0x8 MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX MOV RDI,RAX MOV RSI,R13 CALL 0x001221f0 PUSH 0x22 POP RSI MOV RDI,RAX CALL 0x00122350 MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c99f] CALL 0x001222f0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18] AND EDX,0xffffffb5 OR EDX,0x8 MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX MOV RCX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RCX + 0x40] SHL RCX,0x9 LEA RDX,[0x17ca08] ADD RDX,RCX MOV ECX,EBP MOVSX ESI,word ptr [RDX + RCX*0x2] MOV RDI,RAX CALL 0x001222b0 PUSH 0x22 POP RSI MOV RDI,RAX CALL 0x00122350 MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c9ae] CALL 0x001222f0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18] AND EDX,0xffffffb5 OR EDX,0x2 MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RCX + 0x10] MOV RDI,RAX CALL 0x00122290 MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c9f0] CALL 0x001222f0 MOV dword ptr [RSP + 0x2c],EBP MOVSXD RBP,R12D SHL RBP,0x5 MOV R14,R15 SUB R14,RBP ADD R14,0x20 XOR R12D,R12D LEA R13,[RSP + 0x38] LAB_001458da: CMP RBP,R12 JZ 0x00145946 TEST R12,R12 JZ 0x001458f0 MOV RDI,qword ptr [RBX + 0x60] LAB_001458e8: PUSH 0x2c POP RSI CALL 0x00122350 LAB_001458f0: MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c9c8] CALL 0x001222f0 MOV R15,RAX LEA RAX,[R14 + R12*0x1] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R13 PUSH 0x10 POP RSI CALL 0x001461b2 LAB_00145922: MOV RDI,R15 MOV RSI,R13 CALL 0x00122190 MOV RDI,RAX PUSH 0x22 POP RSI CALL 0x00122350 MOV RDI,R13 CALL 0x00145b22 ADD R12,0x20 JMP 0x001458da LAB_00145946: MOV RDI,qword ptr [RBX + 0x60] LAB_0014594a: PUSH 0x5d POP RSI CALL 0x00122350 MOV EBP,dword ptr [RSP + 0x2c] MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX + 0x50],0x0 JZ 0x001459ae MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c9ba] CALL 0x001222f0 MOV R14,RAX MOV RAX,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RAX + 0x48] MOV RSI,qword ptr [RAX + 0x50] LEA RDI,[RSP + 0x38] CALL 0x001460eb LEA RSI,[RSP + 0x38] MOV RDI,R14 CALL 0x00122190 PUSH 0x22 POP RSI MOV RDI,RAX CALL 0x00122350 LEA RDI,[RSP + 0x38] CALL 0x00145b22 LAB_001459ae: MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c9cc] CALL 0x001222f0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18] AND EDX,0xffffffb5 OR EDX,0x2 MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX MOV RCX,qword ptr [RSP + 0x30] MOV ESI,dword ptr [RCX + -0x18] INC ESI MOV RDI,RAX CALL 0x001221b0 MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c9d6] CALL 0x001222f0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] MOV EDX,dword ptr [RAX + RCX*0x1 + 0x18] AND EDX,0xffffffb5 OR EDX,0x2 MOV dword ptr [RAX + RCX*0x1 + 0x18],EDX MOV RCX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RCX] MOV RDI,RAX CALL 0x001221f0 MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c9e1] CALL 0x001222f0 MOV R14,RAX LEA RDI,[RSP + 0x38] MOV ESI,EBP CALL 0x00145406 LEA RSI,[RSP + 0x38] MOV RDI,R14 CALL 0x00122190 PUSH 0x22 POP RSI MOV RDI,RAX CALL 0x00122350 LEA RDI,[RSP + 0x38] CALL 0x00145b22 MOV RDI,qword ptr [RBX + 0x60] LEA RSI,[0x17c9ed] CALL 0x001222f0 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 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) { byte bVar1; ostream *poVar2; long lVar3; long lVar4; string local_50 [32]; lVar3 = *(long *)(this + 0x40); if (lVar3 == *(long *)(this + 0x48)) { lVar3 = *(long *)(*(long *)(this + 0x58) + -8) + 0x1f8; } bVar1 = *(byte *)(*(long *)(lVar3 + -0x10) + (ulong)param_1); /* try { // try from 0014577d to 001458bc has its CatchHandler @ 00145a7a */ std::operator<<(*(ostream **)(this + 0x60),"{"); poVar2 = std::operator<<(*(ostream **)(this + 0x60),"\"pc\":"); *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) = *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) & 0xffffffb5 | 2; std::ostream::_M_insert<unsigned_long>((ulong)poVar2); poVar2 = std::operator<<(*(ostream **)(this + 0x60),",\"op\":"); *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) = *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) & 0xffffffb5 | 2; std::ostream::operator<<(poVar2,(uint)bVar1); poVar2 = std::operator<<(*(ostream **)(this + 0x60),",\"gas\":\"0x"); *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) = *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) & 0xffffffb5 | 8; poVar2 = std::ostream::_M_insert<long>((long)poVar2); std::operator<<(poVar2,'\"'); poVar2 = std::operator<<(*(ostream **)(this + 0x60),",\"gasCost\":\"0x"); *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) = *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) & 0xffffffb5 | 8; poVar2 = (ostream *) std::ostream::operator<< (poVar2,*(short *)(instr::gas_costs + (ulong)(uint)bVar1 * 2 + (ulong)*(uint *)(param_5 + 0x40) * 0x200)); std::operator<<(poVar2,'\"'); poVar2 = std::operator<<(*(ostream **)(this + 0x60),",\"memSize\":"); *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) = *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) & 0xffffffb5 | 2; std::ostream::_M_insert<unsigned_long>((ulong)poVar2); std::operator<<(*(ostream **)(this + 0x60),",\"stack\":["); for (lVar4 = 0; (long)param_3 * 0x20 != lVar4; lVar4 = lVar4 + 0x20) { if (lVar4 != 0) { /* try { // try from 001458e8 to 00145921 has its CatchHandler @ 00145a8b */ std::operator<<(*(ostream **)(this + 0x60),','); } poVar2 = std::operator<<(*(ostream **)(this + 0x60),"\"0x"); intx::to_string<256u>(local_50,0x10); /* try { // try from 00145922 to 00145937 has its CatchHandler @ 00145a7c */ poVar2 = std::operator<<(poVar2,local_50); std::operator<<(poVar2,'\"'); std::__cxx11::string::~string(local_50); } /* try { // try from 0014594a to 00145a6a has its CatchHandler @ 00145a7a */ std::operator<<(*(ostream **)(this + 0x60),']'); if (*(long *)(param_5 + 0x50) != 0) { poVar2 = std::operator<<(*(ostream **)(this + 0x60),",\"returnData\":\"0x"); evmc::hex_abi_cxx11_(local_50,*(int8 *)(param_5 + 0x50),*(int8 *)(param_5 + 0x48)); poVar2 = std::operator<<(poVar2,local_50); std::operator<<(poVar2,'\"'); std::__cxx11::string::~string(local_50); } poVar2 = std::operator<<(*(ostream **)(this + 0x60),",\"depth\":"); *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) = *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) & 0xffffffb5 | 2; std::ostream::operator<<(poVar2,*(int *)(lVar3 + -0x18) + 1); poVar2 = std::operator<<(*(ostream **)(this + 0x60),",\"refund\":"); *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) = *(uint *)(poVar2 + *(long *)(*(long *)poVar2 + -0x18) + 0x18) & 0xffffffb5 | 2; std::ostream::_M_insert<long>((long)poVar2); poVar2 = std::operator<<(*(ostream **)(this + 0x60),",\"opName\":\""); get_name_abi_cxx11_((_anonymous_namespace_ *)local_50,bVar1); poVar2 = std::operator<<(poVar2,local_50); std::operator<<(poVar2,'\"'); std::__cxx11::string::~string(local_50); std::operator<<(*(ostream **)(this + 0x60),"}\n"); return; }
9,076
my_snprintf
eloqsql/strings/my_vsnprintf.c
size_t my_snprintf(char* to, size_t n, const char* fmt, ...) { size_t result; va_list args; va_start(args,fmt); result= my_vsnprintf(to, n, fmt, args); va_end(args); return result; }
O3
c
my_snprintf: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %rdx, %r10 movq %rsi, %rdx movq %rdi, %rsi leaq -0xd0(%rbp), %rdi movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %al, %al je 0xd9a63 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) leaq -0x20(%rbp), %r8 movq %rdi, 0x10(%r8) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r8) movabsq $0x3000000018, %rax # imm = 0x3000000018 movq %rax, (%r8) leaq 0x2d54e9(%rip), %rdi # 0x3aef70 movq %r10, %rcx callq 0xd8830 addq $0xd0, %rsp popq %rbp retq
my_snprintf: push rbp mov rbp, rsp sub rsp, 0D0h mov r10, rdx mov rdx, rsi mov rsi, rdi lea rdi, [rbp+var_D0] mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test al, al jz short loc_D9A63 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_D9A63: lea r8, [rbp+var_20] mov [r8+10h], rdi lea rax, [rbp+arg_0] mov [r8+8], rax mov rax, 3000000018h mov [r8], rax lea rdi, my_charset_latin1 mov rcx, r10 call my_vsnprintf_ex add rsp, 0D0h pop rbp retn
unsigned long long my_snprintf( unsigned long long a1, long long a2, unsigned __int8 *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-D0h] BYREF long long v17; // [rsp+18h] [rbp-B8h] long long v18; // [rsp+20h] [rbp-B0h] long long v19; // [rsp+28h] [rbp-A8h] __m128 v20; // [rsp+30h] [rbp-A0h] __m128 v21; // [rsp+40h] [rbp-90h] __m128 v22; // [rsp+50h] [rbp-80h] __m128 v23; // [rsp+60h] [rbp-70h] __m128 v24; // [rsp+70h] [rbp-60h] __m128 v25; // [rsp+80h] [rbp-50h] __m128 v26; // [rsp+90h] [rbp-40h] __m128 v27; // [rsp+A0h] [rbp-30h] _QWORD v28[4]; // [rsp+B0h] [rbp-20h] BYREF v20 = a7; v21 = a8; v22 = a9; v23 = a10; v24 = a11; v25 = a12; v26 = a13; v27 = a14; v17 = a4; v18 = a5; v19 = a6; v28[2] = &v16; v28[1] = &a15; v28[0] = 0x3000000018LL; return my_vsnprintf_ex((long long)my_charset_latin1, a1, a2, a3, (unsigned int *)v28); }
my_snprintf: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV R10,RDX MOV RDX,RSI MOV RSI,RDI LEA RDI,[RBP + -0xd0] MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST AL,AL JZ 0x001d9a63 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_001d9a63: LEA R8,[RBP + -0x20] MOV qword ptr [R8 + 0x10],RDI LEA RAX,[RBP + 0x10] MOV qword ptr [R8 + 0x8],RAX MOV RAX,0x3000000018 MOV qword ptr [R8],RAX LEA RDI,[0x4aef70] MOV RCX,R10 CALL 0x001d8830 ADD RSP,0xd0 POP RBP RET
void my_snprintf(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int1 local_d8 [24]; int8 local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int8 local_28; int1 *local_20; int1 *local_18; local_18 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } local_20 = &stack0x00000008; local_28 = 0x3000000018; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; my_vsnprintf_ex(&my_charset_latin1,param_9,param_10,param_11); return; }
9,077
findPeaks::_peak_plateaus(std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t>> const&)
giladroyz[P]FindPeaks/src/cpp/find_peaks.cpp
std::vector<lpr_peak_plateau_t> _peak_plateaus(const std::vector<lmr_peak_index_t> &peaks) { std::vector<lpr_peak_plateau_t> plateaus; for (size_t p = 0; p < peaks.size(); p++) { lpr_peak_plateau_t plateau; plateau.right_edge = peaks[p].right_edge; plateau.left_edge = peaks[p].left_edge; plateau.plateau_size = plateau.right_edge - plateau.left_edge + 1; plateaus.push_back(plateau); } return plateaus; }
O2
cpp
findPeaks::_peak_plateaus(std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) andq $0x0, 0x10(%rdi) pushq $0x10 popq %r12 xorl %r13d, %r13d pushq $0x18 popq %rbp movq %rsp, %r15 movq (%r14), %rcx movq 0x8(%r14), %rax subq %rcx, %rax cqto idivq %rbp cmpq %rax, %r13 jae 0x215c movq (%rcx,%r12), %rax movq %rax, 0x10(%rsp) movq -0x10(%rcx,%r12), %rcx movq %rcx, 0x8(%rsp) subq %rcx, %rax incq %rax movq %rax, (%rsp) movq %rbx, %rdi movq %r15, %rsi callq 0x3252 incq %r13 addq $0x18, %r12 jmp 0x2117 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq %rbx, %rdi callq 0x3f6e movq %r14, %rdi callq 0x1120
_ZN9findPeaks14_peak_plateausERKSt6vectorINS_16lmr_peak_index_tESaIS1_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 push 10h pop r12 xor r13d, r13d push 18h pop rbp mov r15, rsp loc_2117: mov rcx, [r14] mov rax, [r14+8] sub rax, rcx cqo idiv rbp cmp r13, rax jnb short loc_215C mov rax, [rcx+r12] mov [rsp+48h+var_38], rax mov rcx, [rcx+r12-10h] mov [rsp+48h+var_40], rcx sub rax, rcx inc rax mov [rsp+48h+var_48], rax mov rdi, rbx mov rsi, r15 call _ZNSt6vectorIN9findPeaks18lpr_peak_plateau_tESaIS1_EE9push_backERKS1_; std::vector<findPeaks::lpr_peak_plateau_t>::push_back(findPeaks::lpr_peak_plateau_t const&) inc r13 add r12, 18h jmp short loc_2117 loc_215C: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, rbx call _ZNSt12_Vector_baseIN9findPeaks18lpr_peak_plateau_tESaIS1_EED2Ev; std::_Vector_base<findPeaks::lpr_peak_plateau_t>::~_Vector_base() mov rdi, r14 call __Unwind_Resume
long long findPeaks::_peak_plateaus(long long a1, long long *a2) { long long v2; // r12 unsigned long long i; // r13 long long v4; // rcx long long v5; // rdx long long v7; // [rsp+0h] [rbp-48h] BYREF long long v8; // [rsp+8h] [rbp-40h] long long v9; // [rsp+10h] [rbp-38h] *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v2 = 16LL; for ( i = 0LL; ; ++i ) { v4 = *a2; v5 = (a2[1] - *a2) % 24; if ( i >= (a2[1] - *a2) / 24 ) break; v9 = *(_QWORD *)(v4 + v2); v8 = *(_QWORD *)(v4 + v2 - 16); v7 = v9 - v8 + 1; ((void ( *)(long long, long long *, long long))std::vector<findPeaks::lpr_peak_plateau_t>::push_back)( a1, &v7, v5); v2 += 24LL; } return a1; }
_peak_plateaus: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 PUSH 0x10 POP R12 XOR R13D,R13D PUSH 0x18 POP RBP MOV R15,RSP LAB_00102117: MOV RCX,qword ptr [R14] MOV RAX,qword ptr [R14 + 0x8] SUB RAX,RCX CQO IDIV RBP CMP R13,RAX JNC 0x0010215c MOV RAX,qword ptr [RCX + R12*0x1] MOV qword ptr [RSP + 0x10],RAX MOV RCX,qword ptr [RCX + R12*0x1 + -0x10] MOV qword ptr [RSP + 0x8],RCX SUB RAX,RCX INC RAX MOV qword ptr [RSP],RAX LAB_00102148: MOV RDI,RBX MOV RSI,R15 CALL 0x00103252 LAB_00102153: INC R13 ADD R12,0x18 JMP 0x00102117 LAB_0010215c: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* findPeaks::_peak_plateaus(std::vector<findPeaks::lmr_peak_index_t, std::allocator<findPeaks::lmr_peak_index_t> > const&) */ findPeaks * __thiscall findPeaks::_peak_plateaus(findPeaks *this,vector *param_1) { long lVar1; long lVar2; ulong uVar3; long local_48; long local_40; long local_38; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; lVar2 = 0x10; for (uVar3 = 0; lVar1 = *(long *)param_1, uVar3 < (ulong)((*(long *)(param_1 + 8) - lVar1) / 0x18) ; uVar3 = uVar3 + 1) { local_38 = *(long *)(lVar1 + lVar2); local_40 = *(long *)(lVar1 + -0x10 + lVar2); local_48 = (local_38 - local_40) + 1; /* try { // try from 00102148 to 00102152 has its CatchHandler @ 0010216e */ std::vector<findPeaks::lpr_peak_plateau_t,std::allocator<findPeaks::lpr_peak_plateau_t>>:: push_back((vector<findPeaks::lpr_peak_plateau_t,std::allocator<findPeaks::lpr_peak_plateau_t>> * )this,(lpr_peak_plateau_t *)&local_48); lVar2 = lVar2 + 0x18; } return this; }
9,078
LefDefParser::defwDieAreaList(int, int*, int*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwDieAreaList(int num_points, int *xl, int *yl) { int i; defwFunc = DEFW_DIE_AREA; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (!defwDidInit) return DEFW_BAD_ORDER; if (defwState == DEFW_DIE_AREA) return DEFW_BAD_ORDER; if (defVersionNum < 5.6) return DEFW_WRONG_VERSION; if (num_points < 4) return DEFW_BAD_DATA; fprintf(defwFile, "DIEAREA "); for (i = 0; i < num_points; i++) { if (i == 0) fprintf(defwFile, "( %d %d ) ", *xl++, *yl++); else { if ((i % 5) == 0) { fprintf(defwFile, "\n ( %d %d ) ", *xl++, *yl++); defwLines++; } else fprintf(defwFile, "( %d %d ) ", *xl++, *yl++); } } fprintf(defwFile, ";\n"); defwLines++; defwState = DEFW_DIE_AREA; return DEFW_OK; }
O0
cpp
LefDefParser::defwDieAreaList(int, int*, int*): subq $0x28, %rsp movl %edi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) leaq 0x1922f(%rip), %rax # 0x2b168 movl $0xf, (%rax) leaq 0x19212(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x11f59 movl $0x1, 0x24(%rsp) jmp 0x12130 leaq 0x19214(%rip), %rax # 0x2b174 cmpl $0x0, (%rax) jne 0x11f72 movl $0x2, 0x24(%rsp) jmp 0x12130 leaq 0x191eb(%rip), %rax # 0x2b164 cmpl $0xf, (%rax) jne 0x11f8b movl $0x2, 0x24(%rsp) jmp 0x12130 movsd 0x11355(%rip), %xmm0 # 0x232e8 ucomisd 0x19115(%rip), %xmm0 # 0x2b0b0 jbe 0x11faa movl $0x5, 0x24(%rsp) jmp 0x12130 cmpl $0x4, 0x20(%rsp) jge 0x11fbe movl $0x3, 0x24(%rsp) jmp 0x12130 leaq 0x19193(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0x120d2(%rip), %rsi # 0x240a1 movb $0x0, %al callq 0x10f0 movl $0x0, 0xc(%rsp) movl 0xc(%rsp), %eax cmpl 0x20(%rsp), %eax jge 0x120ee cmpl $0x0, 0xc(%rsp) jne 0x12036 leaq 0x1915e(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x18(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x18(%rsp) movl (%rax), %edx movq 0x10(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x10(%rsp) movl (%rax), %ecx leaq 0x12089(%rip), %rsi # 0x240b3 movb $0x0, %al callq 0x10f0 jmp 0x120dc movl 0xc(%rsp), %eax movl $0x5, %ecx cltd idivl %ecx cmpl $0x0, %edx jne 0x1209c leaq 0x1910a(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x18(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x18(%rsp) movl (%rax), %edx movq 0x10(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x10(%rsp) movl (%rax), %ecx leaq 0x1202c(%rip), %rsi # 0x240aa movb $0x0, %al callq 0x10f0 leaq 0x190d4(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0x190c8(%rip), %rax # 0x2b160 movl %ecx, (%rax) jmp 0x120da leaq 0x190b5(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x18(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x18(%rsp) movl (%rax), %edx movq 0x10(%rsp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, 0x10(%rsp) movl (%rax), %ecx leaq 0x11fe0(%rip), %rsi # 0x240b3 movb $0x0, %al callq 0x10f0 jmp 0x120dc jmp 0x120de movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x11fde leaq 0x19063(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0x11d54(%rip), %rsi # 0x23e53 movb $0x0, %al callq 0x10f0 leaq 0x19053(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0x19047(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0x19042(%rip), %rax # 0x2b164 movl $0xf, (%rax) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax)
_ZN12LefDefParser15defwDieAreaListEiPiS0_: sub rsp, 28h mov [rsp+28h+var_8], edi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 0Fh lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_11F59 mov [rsp+28h+var_4], 1 jmp loc_12130 loc_11F59: lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit cmp dword ptr [rax], 0 jnz short loc_11F72 mov [rsp+28h+var_4], 2 jmp loc_12130 loc_11F72: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 0Fh jnz short loc_11F8B mov [rsp+28h+var_4], 2 jmp loc_12130 loc_11F8B: movsd xmm0, cs:dbl_232E8 ucomisd xmm0, cs:_ZN12LefDefParserL13defVersionNumE; LefDefParser::defVersionNum jbe short loc_11FAA mov [rsp+28h+var_4], 5 jmp loc_12130 loc_11FAA: cmp [rsp+28h+var_8], 4 jge short loc_11FBE mov [rsp+28h+var_4], 3 jmp loc_12130 loc_11FBE: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, aDiearea; "DIEAREA " mov al, 0 call _fprintf mov [rsp+28h+var_1C], 0 loc_11FDE: mov eax, [rsp+28h+var_1C] cmp eax, [rsp+28h+var_8] jge loc_120EE cmp [rsp+28h+var_1C], 0 jnz short loc_12036 lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rax, [rsp+28h+var_10] mov rcx, rax add rcx, 4 mov [rsp+28h+var_10], rcx mov edx, [rax] mov rax, [rsp+28h+var_18] mov rcx, rax add rcx, 4 mov [rsp+28h+var_18], rcx mov ecx, [rax] lea rsi, aDD+9; "( %d %d ) " mov al, 0 call _fprintf jmp loc_120DC loc_12036: mov eax, [rsp+28h+var_1C] mov ecx, 5 cdq idiv ecx cmp edx, 0 jnz short loc_1209C lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rax, [rsp+28h+var_10] mov rcx, rax add rcx, 4 mov [rsp+28h+var_10], rcx mov edx, [rax] mov rax, [rsp+28h+var_18] mov rcx, rax add rcx, 4 mov [rsp+28h+var_18], rcx mov ecx, [rax] lea rsi, aDD; "\n ( %d %d ) " mov al, 0 call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx jmp short loc_120DA loc_1209C: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rax, [rsp+28h+var_10] mov rcx, rax add rcx, 4 mov [rsp+28h+var_10], rcx mov edx, [rax] mov rax, [rsp+28h+var_18] mov rcx, rax add rcx, 4 mov [rsp+28h+var_18], rcx mov ecx, [rax] lea rsi, aDD+9; "( %d %d ) " mov al, 0 call _fprintf loc_120DA: jmp short $+2 loc_120DC: jmp short $+2 loc_120DE: mov eax, [rsp+28h+var_1C] add eax, 1 mov [rsp+28h+var_1C], eax jmp loc_11FDE loc_120EE: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 0Fh mov [rsp+28h+var_4], 0 loc_12130: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long LefDefParser::defwDieAreaList(LefDefParser *this, int *a2, int *a3, int *a4) { int *v4; // rax int v5; // edx int *v6; // rax int *v7; // rax int v8; // edx int *v9; // rax int i; // [rsp+Ch] [rbp-1Ch] LefDefParser::defwFunc = 15; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwDidInit ) { if ( LefDefParser::defwState == 15 ) { return 2; } else if ( *(double *)&LefDefParser::defVersionNum >= 5.6 ) { if ( (int)this >= 4 ) { fprintf(LefDefParser::defwFile, "DIEAREA "); for ( i = 0; i < (int)this; ++i ) { if ( i ) { v7 = a2++; v8 = *v7; v9 = a3++; if ( i % 5 ) { fprintf(LefDefParser::defwFile, "( %d %d ) ", v8, *v9); } else { fprintf(LefDefParser::defwFile, "\n ( %d %d ) ", v8, *v9); ++LefDefParser::defwLines; } } else { v4 = a2++; v5 = *v4; v6 = a3++; fprintf(LefDefParser::defwFile, "( %d %d ) ", v5, *v6); } } fprintf(LefDefParser::defwFile, ";\n"); ++LefDefParser::defwLines; LefDefParser::defwState = 15; return 0; } else { return 3; } } else { return 5; } } else { return 2; } } else { return 1; } }
defwDieAreaList: SUB RSP,0x28 MOV dword ptr [RSP + 0x20],EDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX LEA RAX,[0x12b168] MOV dword ptr [RAX],0xf LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x00111f59 MOV dword ptr [RSP + 0x24],0x1 JMP 0x00112130 LAB_00111f59: LEA RAX,[0x12b174] CMP dword ptr [RAX],0x0 JNZ 0x00111f72 MOV dword ptr [RSP + 0x24],0x2 JMP 0x00112130 LAB_00111f72: LEA RAX,[0x12b164] CMP dword ptr [RAX],0xf JNZ 0x00111f8b MOV dword ptr [RSP + 0x24],0x2 JMP 0x00112130 LAB_00111f8b: MOVSD XMM0,qword ptr [0x001232e8] UCOMISD XMM0,qword ptr [0x0012b0b0] JBE 0x00111faa MOV dword ptr [RSP + 0x24],0x5 JMP 0x00112130 LAB_00111faa: CMP dword ptr [RSP + 0x20],0x4 JGE 0x00111fbe MOV dword ptr [RSP + 0x24],0x3 JMP 0x00112130 LAB_00111fbe: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x1240a1] MOV AL,0x0 CALL 0x001010f0 MOV dword ptr [RSP + 0xc],0x0 LAB_00111fde: MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RSP + 0x20] JGE 0x001120ee CMP dword ptr [RSP + 0xc],0x0 JNZ 0x00112036 LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RSP + 0x18],RCX MOV EDX,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RSP + 0x10],RCX MOV ECX,dword ptr [RAX] LEA RSI,[0x1240b3] MOV AL,0x0 CALL 0x001010f0 JMP 0x001120dc LAB_00112036: MOV EAX,dword ptr [RSP + 0xc] MOV ECX,0x5 CDQ IDIV ECX CMP EDX,0x0 JNZ 0x0011209c LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RSP + 0x18],RCX MOV EDX,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RSP + 0x10],RCX MOV ECX,dword ptr [RAX] LEA RSI,[0x1240aa] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX JMP 0x001120da LAB_0011209c: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RSP + 0x18],RCX MOV EDX,dword ptr [RAX] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RSP + 0x10],RCX MOV ECX,dword ptr [RAX] LEA RSI,[0x1240b3] MOV AL,0x0 CALL 0x001010f0 LAB_001120da: JMP 0x001120dc LAB_001120dc: JMP 0x001120de LAB_001120de: MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x00111fde LAB_001120ee: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x123e53] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LEA RAX,[0x12b164] MOV dword ptr [RAX],0xf MOV dword ptr [RSP + 0x24],0x0 LAB_00112130: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* LefDefParser::defwDieAreaList(int, int*, int*) */ int4 LefDefParser::defwDieAreaList(int param_1,int *param_2,int *param_3) { int local_1c; uint *local_18; uint *local_10; int4 local_4; defwFunc = 0xf; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if (defwDidInit == 0) { local_4 = 2; } else if (defwState == 0xf) { local_4 = 2; } else if (DAT_001232e8 <= defVersionNum) { if (param_1 < 4) { local_4 = 3; } else { fprintf(defwFile,"DIEAREA "); local_18 = (uint *)param_3; local_10 = (uint *)param_2; for (local_1c = 0; local_1c < param_1; local_1c = local_1c + 1) { if (local_1c == 0) { fprintf(defwFile,"( %d %d ) ",(ulong)*local_10,(ulong)*local_18); } else if (local_1c % 5 == 0) { fprintf(defwFile,"\n ( %d %d ) ",(ulong)*local_10,(ulong)*local_18); defwLines = defwLines + 1; } else { fprintf(defwFile,"( %d %d ) ",(ulong)*local_10,(ulong)*local_18); } local_10 = local_10 + 1; local_18 = local_18 + 1; } fprintf(defwFile,";\n"); defwLines = defwLines + 1; defwState = 0xf; local_4 = 0; } } else { local_4 = 5; } return local_4; }
9,079
LefDefParser::defwDieAreaList(int, int*, int*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwDieAreaList(int num_points, int *xl, int *yl) { int i; defwFunc = DEFW_DIE_AREA; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; if (!defwDidInit) return DEFW_BAD_ORDER; if (defwState == DEFW_DIE_AREA) return DEFW_BAD_ORDER; if (defVersionNum < 5.6) return DEFW_WRONG_VERSION; if (num_points < 4) return DEFW_BAD_DATA; fprintf(defwFile, "DIEAREA "); for (i = 0; i < num_points; i++) { if (i == 0) fprintf(defwFile, "( %d %d ) ", *xl++, *yl++); else { if ((i % 5) == 0) { fprintf(defwFile, "\n ( %d %d ) ", *xl++, *yl++); defwLines++; } else fprintf(defwFile, "( %d %d ) ", *xl++, *yl++); } } fprintf(defwFile, ";\n"); defwLines++; defwState = DEFW_DIE_AREA; return DEFW_OK; }
O3
cpp
LefDefParser::defwDieAreaList(int, int*, int*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax leaq 0x15fb3(%rip), %rax # 0x1e178 movl $0xf, (%rax) leaq 0x15f96(%rip), %r12 # 0x1e168 movq (%r12), %rcx testq %rcx, %rcx je 0x82ed leaq 0x15f9e(%rip), %rax # 0x1e184 cmpl $0x0, (%rax) movl $0x2, %eax je 0x82f2 movq %rdx, %rbx leaq 0x15f76(%rip), %rdx # 0x1e174 cmpl $0xf, (%rdx) je 0x82f2 movl $0x5, %eax movsd 0xbecc(%rip), %xmm0 # 0x140e0 ucomisd 0x15ea4(%rip), %xmm0 # 0x1e0c0 ja 0x82f2 movl %edi, %ebp movl $0x3, %eax cmpl $0x4, %edi jl 0x82f2 movq %rsi, %r14 leaq 0xcfa4(%rip), %rdi # 0x151e0 movl $0x8, %esi movl $0x1, %edx callq 0x1110 movl %ebp, %ebp leaq 0xcf9e(%rip), %r15 # 0x151f2 xorl %r13d, %r13d testl %r13d, %r13d je 0x829b movl %r13d, %eax movl $0xcccccccd, %ecx # imm = 0xCCCCCCCD imulq %rcx, %rax shrq $0x22, %rax leal (%rax,%rax,4), %eax negl %eax movq (%r12), %rdi movl (%r14,%r13,4), %edx movl (%rbx,%r13,4), %ecx addl %r13d, %eax jne 0x82a7 leaq 0xcf60(%rip), %rsi # 0x151e9 xorl %eax, %eax callq 0x10e0 leaq 0x15ed9(%rip), %rax # 0x1e170 incl (%rax) jmp 0x82b1 movq (%r12), %rdi movl (%r14,%r13,4), %edx movl (%rbx,%r13,4), %ecx movq %r15, %rsi xorl %eax, %eax callq 0x10e0 incq %r13 cmpl %r13d, %ebp jne 0x8257 movq (%r12), %rcx leaq 0xccce(%rip), %rdi # 0x14f92 movl $0x2, %esi movl $0x1, %edx callq 0x1110 leaq 0x15e96(%rip), %rax # 0x1e170 incl (%rax) leaq 0x15e91(%rip), %rax # 0x1e174 movl $0xf, (%rax) xorl %eax, %eax jmp 0x82f2 movl $0x1, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN12LefDefParser15defwDieAreaListEiPiS0_: push rbp push r15 push r14 push r13 push r12 push rbx push rax lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 0Fh lea r12, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rcx, [r12] test rcx, rcx jz loc_82ED lea rax, _ZN12LefDefParser11defwDidInitE; LefDefParser::defwDidInit cmp dword ptr [rax], 0 mov eax, 2 jz loc_82F2 mov rbx, rdx lea rdx, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rdx], 0Fh jz loc_82F2 mov eax, 5 movsd xmm0, cs:dbl_140E0 ucomisd xmm0, cs:_ZN12LefDefParserL13defVersionNumE; LefDefParser::defVersionNum ja loc_82F2 mov ebp, edi mov eax, 3 cmp edi, 4 jl loc_82F2 mov r14, rsi lea rdi, aDiearea; "DIEAREA " mov esi, 8 mov edx, 1 call _fwrite mov ebp, ebp lea r15, aDD+9; "( %d %d ) " xor r13d, r13d loc_8257: test r13d, r13d jz short loc_829B mov eax, r13d mov ecx, 0CCCCCCCDh imul rax, rcx shr rax, 22h lea eax, [rax+rax*4] neg eax mov rdi, [r12] mov edx, [r14+r13*4] mov ecx, [rbx+r13*4] add eax, r13d jnz short loc_82A7 lea rsi, aDD; "\n ( %d %d ) " xor eax, eax call _fprintf lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines inc dword ptr [rax] jmp short loc_82B1 loc_829B: mov rdi, [r12] mov edx, [r14+r13*4] mov ecx, [rbx+r13*4] loc_82A7: mov rsi, r15 xor eax, eax call _fprintf loc_82B1: inc r13 cmp ebp, r13d jnz short loc_8257 mov rcx, [r12] lea rdi, aDividercharS+11h; ";\n" mov esi, 2 mov edx, 1 call _fwrite lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines inc dword ptr [rax] lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 0Fh xor eax, eax jmp short loc_82F2 loc_82ED: mov eax, 1 loc_82F2: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::defwDieAreaList(LefDefParser *this, long long a2, int *a3, int *a4) { long long result; // rax int v6; // ebp long long v7; // r13 long long v8; // rdi int v9; // edx int v10; // ecx LefDefParser::defwFunc = 15; if ( !LefDefParser::defwFile ) return 1LL; result = 2LL; if ( LefDefParser::defwDidInit ) { if ( LefDefParser::defwState != 15 ) { result = 5LL; if ( *(double *)&LefDefParser::defVersionNum >= 5.6 ) { result = 3LL; if ( (int)this >= 4 ) { fwrite("DIEAREA ", 8LL, 1LL, LefDefParser::defwFile); v6 = (int)this; v7 = 0LL; while ( (_DWORD)v7 ) { v8 = LefDefParser::defwFile; v9 = *(_DWORD *)(a2 + 4 * v7); v10 = a3[v7]; if ( (unsigned int)v7 % 5 ) goto LABEL_11; fprintf(LefDefParser::defwFile, "\n ( %d %d ) ", v9, v10); ++LefDefParser::defwLines; LABEL_12: if ( v6 == (_DWORD)++v7 ) { fwrite(";\n", 2LL, 1LL, LefDefParser::defwFile); ++LefDefParser::defwLines; LefDefParser::defwState = 15; return 0LL; } } v8 = LefDefParser::defwFile; v9 = *(_DWORD *)(a2 + 4 * v7); v10 = a3[v7]; LABEL_11: fprintf(v8, "( %d %d ) ", v9, v10); goto LABEL_12; } } } } return result; }
defwDieAreaList: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX LEA RAX,[0x11e178] MOV dword ptr [RAX],0xf LEA R12,[0x11e168] MOV RCX,qword ptr [R12] TEST RCX,RCX JZ 0x001082ed LEA RAX,[0x11e184] CMP dword ptr [RAX],0x0 MOV EAX,0x2 JZ 0x001082f2 MOV RBX,RDX LEA RDX,[0x11e174] CMP dword ptr [RDX],0xf JZ 0x001082f2 MOV EAX,0x5 MOVSD XMM0,qword ptr [0x001140e0] UCOMISD XMM0,qword ptr [0x0011e0c0] JA 0x001082f2 MOV EBP,EDI MOV EAX,0x3 CMP EDI,0x4 JL 0x001082f2 MOV R14,RSI LEA RDI,[0x1151e0] MOV ESI,0x8 MOV EDX,0x1 CALL 0x00101110 MOV EBP,EBP LEA R15,[0x1151f2] XOR R13D,R13D LAB_00108257: TEST R13D,R13D JZ 0x0010829b MOV EAX,R13D MOV ECX,0xcccccccd IMUL RAX,RCX SHR RAX,0x22 LEA EAX,[RAX + RAX*0x4] NEG EAX MOV RDI,qword ptr [R12] MOV EDX,dword ptr [R14 + R13*0x4] MOV ECX,dword ptr [RBX + R13*0x4] ADD EAX,R13D JNZ 0x001082a7 LEA RSI,[0x1151e9] XOR EAX,EAX CALL 0x001010e0 LEA RAX,[0x11e170] INC dword ptr [RAX] JMP 0x001082b1 LAB_0010829b: MOV RDI,qword ptr [R12] MOV EDX,dword ptr [R14 + R13*0x4] MOV ECX,dword ptr [RBX + R13*0x4] LAB_001082a7: MOV RSI,R15 XOR EAX,EAX CALL 0x001010e0 LAB_001082b1: INC R13 CMP EBP,R13D JNZ 0x00108257 MOV RCX,qword ptr [R12] LEA RDI,[0x114f92] MOV ESI,0x2 MOV EDX,0x1 CALL 0x00101110 LEA RAX,[0x11e170] INC dword ptr [RAX] LEA RAX,[0x11e174] MOV dword ptr [RAX],0xf XOR EAX,EAX JMP 0x001082f2 LAB_001082ed: MOV EAX,0x1 LAB_001082f2: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::defwDieAreaList(int, int*, int*) */ int8 LefDefParser::defwDieAreaList(int param_1,int *param_2,int *param_3) { int8 uVar1; ulong uVar2; ulong uVar3; ulong uVar4; defwFunc = 0xf; if (defwFile == (FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if ((((defwDidInit != 0) && (defwState != 0xf)) && (uVar1 = 5, DAT_001140e0 <= defVersionNum)) && (uVar1 = 3, 3 < param_1)) { fwrite("DIEAREA ",8,1,defwFile); uVar4 = 0; do { if ((int)uVar4 == 0) { uVar3 = (ulong)(uint)param_2[uVar4]; uVar2 = (ulong)(uint)param_3[uVar4]; LAB_001082a7: fprintf(defwFile,"( %d %d ) ",uVar3,uVar2); } else { uVar3 = (ulong)(uint)param_2[uVar4]; uVar2 = (ulong)(uint)param_3[uVar4]; if ((int)uVar4 != (int)((uVar4 & 0xffffffff) / 5) * 5) goto LAB_001082a7; fprintf(defwFile,"\n ( %d %d ) ",uVar3,uVar2); defwLines = defwLines + 1; } uVar4 = uVar4 + 1; } while (param_1 != (int)uVar4); fwrite(";\n",2,1,defwFile); defwLines = defwLines + 1; defwState = 0xf; uVar1 = 0; } } return uVar1; }
9,080
insert_dynamic
eloqsql/mysys/array.c
my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void * element) { void *buffer; if (array->elements == array->max_element) { /* Call only when necessary */ if (!(buffer=alloc_dynamic(array))) return TRUE; } else { buffer=array->buffer+(array->elements * array->size_of_element); array->elements++; } memcpy(buffer,element,(size_t) array->size_of_element); return FALSE; }
O0
c
insert_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jne 0x30b2b movq -0x10(%rbp), %rdi callq 0x30b80 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x30b29 movb $0x1, -0x1(%rbp) jmp 0x30b71 jmp 0x30b57 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx movl 0x8(%rcx), %ecx movq -0x10(%rbp), %rdx imull 0x14(%rdx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x24230 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
insert_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jnz short loc_30B2B mov rdi, [rbp+var_10] call alloc_dynamic mov [rbp+var_20], rax cmp rax, 0 jnz short loc_30B29 mov [rbp+var_1], 1 jmp short loc_30B71 loc_30B29: jmp short loc_30B57 loc_30B2B: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] mov ecx, [rcx+8] mov rdx, [rbp+var_10] imul ecx, [rdx+14h] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_10] mov ecx, [rax+8] add ecx, 1 mov [rax+8], ecx loc_30B57: mov rdi, [rbp+var_20] mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+14h] mov edx, eax call _memcpy mov [rbp+var_1], 0 loc_30B71: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char insert_dynamic(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-20h] if ( *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 12) ) { v3 = (unsigned int)(*(_DWORD *)(a1 + 20) * (*(_DWORD *)(a1 + 8))++) + *(_QWORD *)a1; LABEL_6: memcpy(v3, a2, *(unsigned int *)(a1 + 20)); return 0; } v3 = alloc_dynamic(a1); if ( v3 ) goto LABEL_6; return 1; }
insert_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x00130b2b MOV RDI,qword ptr [RBP + -0x10] CALL 0x00130b80 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x00130b29 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00130b71 LAB_00130b29: JMP 0x00130b57 LAB_00130b2b: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x10] IMUL ECX,dword ptr [RDX + 0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 MOV dword ptr [RAX + 0x8],ECX LAB_00130b57: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x00124230 MOV byte ptr [RBP + -0x1],0x0 LAB_00130b71: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 insert_dynamic(long *param_1,void *param_2) { void *local_28; if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) { local_28 = (void *)alloc_dynamic(param_1); if (local_28 == (void *)0x0) { return 1; } } else { local_28 = (void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))); *(int *)(param_1 + 1) = (int)param_1[1] + 1; } memcpy(local_28,param_2,(ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
9,081
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
iterator insert(const_iterator pos, const basic_json& val) { // insert only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { // check if iterator pos fits to this JSON value if (JSON_HEDLEY_UNLIKELY(pos.m_object != this)) { JSON_THROW(invalid_iterator::create(202, "iterator does not fit current value", this)); } // insert to array and return iterator return insert_iterator(pos, val); } JSON_THROW(type_error::create(309, detail::concat("cannot use insert() with ", type_name()), this)); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 cmpb $0x2, (%rsi) jne 0x70c1a movq (%rdx), %rsi cmpq %r14, %rsi jne 0x70c76 movq %rdi, %rbx leaq 0x28(%rsp), %rax movq %rsi, (%rax) movups 0x8(%rdx), %xmm0 movups %xmm0, 0x8(%rax) movq 0x18(%rdx), %rdx movq %rdx, 0x18(%rax) movq %r14, %rsi movq %rax, %rdx callq 0x70d1c movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x18350 movq %rax, %rbx movq %r14, %rdi callq 0x3fecc leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x3f163(%rip), %rsi # 0xafda1 movq %rsp, %rdi callq 0x70db7 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x135, %esi # imm = 0x135 movq %r14, %rcx callq 0x4beb2 xorl %ebp, %ebp leaq 0x6e663(%rip), %rsi # 0xdf2c8 leaq -0x22738(%rip), %rdx # 0x4e534 movq %rbx, %rdi callq 0x18b50 jmp 0x70cd0 movl $0x20, %edi callq 0x18350 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x3e10e(%rip), %rsi # 0xaeda1 leaq 0x3e12a(%rip), %rdx # 0xaedc4 movq %rsp, %rdi callq 0x1de7e movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x4bc4a xorl %ebp, %ebp leaq 0x6e72f(%rip), %rsi # 0xdf3f0 leaq -0x22794(%rip), %rdx # 0x4e534 movq %rbx, %rdi callq 0x18b50 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi jne 0x70cf1 jmp 0x70d06 jmp 0x70d00 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x70d06 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x70d06 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x70d13 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18bc0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EERSG_: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r14, rsi cmp byte ptr [rsi], 2 jnz short loc_70C1A mov rsi, [rdx] cmp rsi, r14 jnz loc_70C76 mov rbx, rdi lea rax, [rsp+68h+var_40] mov [rax], rsi movups xmm0, xmmword ptr [rdx+8] movups xmmword ptr [rax+8], xmm0 mov rdx, [rdx+18h] mov [rax+18h], rdx mov rsi, r14 mov rdx, rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE15insert_iteratorIJRKSD_EEENS0_6detail9iter_implISD_EENSI_ISF_EEDpOT_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&>(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rax, rbx add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_70C1A: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_48] mov [rdx], rax lea rsi, aCannotUseInser; "cannot use insert() with " mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA26_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>(char const(&)[26],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 135h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_70CD0 loc_70C76: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+68h+var_58] mov [r15-10h], r15 lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdx, aIteratorDoesNo+23h; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 0CAh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_70CD0: mov r14, rax mov rdi, [rsp+68h+var_68] cmp rdi, r15 jnz short loc_70CF1 jmp short loc_70D06 jmp short loc_70D00 mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_70D06 loc_70CF1: mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_70D06 loc_70D00: mov r14, rax mov bpl, 1 loc_70D06: test bpl, bpl jz short loc_70D13 mov rdi, rbx; void * call ___cxa_free_exception loc_70D13: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert( long long a1, unsigned __int8 *a2, long long a3) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx nlohmann::json_abi_v3_11_3::detail::exception *v5; // rbx _QWORD v6[2]; // [rsp+0h] [rbp-68h] BYREF _QWORD v7[3]; // [rsp+10h] [rbp-58h] BYREF unsigned __int8 *v8; // [rsp+28h] [rbp-40h] BYREF __int128 v9; // [rsp+30h] [rbp-38h] long long v10; // [rsp+40h] [rbp-28h] if ( *a2 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v7[2] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[26],char const*>( v6, "cannot use insert() with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 309, v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } if ( *(unsigned __int8 **)a3 != a2 ) { v5 = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v6[0] = v7; std::string::_M_construct<char const*>(v6, "iterator does not fit current value", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( v5, 202, v6); __cxa_throw( v5, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::invalid_iterator, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v8 = *(unsigned __int8 **)a3; v9 = *(_OWORD *)(a3 + 8); v10 = *(_QWORD *)(a3 + 24); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&>( a1, a2, &v8); return a1; }
insert: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI CMP byte ptr [RSI],0x2 JNZ 0x00170c1a MOV RSI,qword ptr [RDX] CMP RSI,R14 JNZ 0x00170c76 MOV RBX,RDI LEA RAX,[RSP + 0x28] MOV qword ptr [RAX],RSI MOVUPS XMM0,xmmword ptr [RDX + 0x8] MOVUPS xmmword ptr [RAX + 0x8],XMM0 MOV RDX,qword ptr [RDX + 0x18] MOV qword ptr [RAX + 0x18],RDX MOV RSI,R14 MOV RDX,RAX CALL 0x00170d1c MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_00170c1a: MOV EDI,0x20 CALL 0x00118350 MOV RBX,RAX MOV RDI,R14 CALL 0x0013fecc LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_00170c37: LEA RSI,[0x1afda1] MOV RDI,RSP CALL 0x00170db7 MOV BPL,0x1 LAB_00170c49: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x135 MOV RCX,R14 CALL 0x0014beb2 XOR EBP,EBP LEA RSI,[0x1df2c8] LEA RDX,[0x14e534] MOV RDI,RBX CALL 0x00118b50 LAB_00170c76: MOV EDI,0x20 CALL 0x00118350 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_00170c8c: LEA RSI,[0x1aeda1] LEA RDX,[0x1aedc4] MOV RDI,RSP CALL 0x0011de7e MOV BPL,0x1 LAB_00170ca5: MOV RDX,RSP MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x0014bc4a XOR EBP,EBP LEA RSI,[0x1df3f0] LEA RDX,[0x14e534] MOV RDI,RBX CALL 0x00118b50
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::insert(nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::insert(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_2,long *param_3) { int8 uVar1; int1 *local_68 [2]; int1 local_58 [16]; char *local_48; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *local_40; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; long local_28; if (*param_2 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { uVar1 = __cxa_allocate_exception(0x20); local_48 = (char *)type_name(param_2); /* try { // try from 00170c37 to 00170c45 has its CatchHandler @ 00170d00 */ detail::concat<std::__cxx11::string,char_const(&)[26],char_const*> ((detail *)local_68,"cannot use insert() with ",&local_48); /* try { // try from 00170c49 to 00170c73 has its CatchHandler @ 00170ce0 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0x135,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } local_40 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*param_3; if (local_40 == param_2) { local_38 = (int4)param_3[1]; uStack_34 = *(int4 *)((long)param_3 + 0xc); uStack_30 = (int4)param_3[2]; uStack_2c = *(int4 *)((long)param_3 + 0x14); local_28 = param_3[3]; insert_iterator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const&> (this,param_2,&local_40); return this; } uVar1 = __cxa_allocate_exception(0x20); local_68[0] = local_58; /* try { // try from 00170c8c to 00170ca1 has its CatchHandler @ 00170cde */ std::__cxx11::string::_M_construct<char_const*>(local_68,"iterator does not fit current value","") ; /* try { // try from 00170ca5 to 00170ccf has its CatchHandler @ 00170cd0 */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar1,0xca,local_68,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::invalid_iterator::typeinfo,detail::exception::~exception); }
9,082
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x120(%rsp) movq %rsi, 0x118(%rsp) movl %edx, 0x114(%rsp) movq %rcx, 0x108(%rsp) movq 0x118(%rsp), %rax movq %rax, 0x10(%rsp) movb $0x0, 0x107(%rsp) leaq 0x106(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x5a080 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rdx leaq 0x1658c1(%rip), %rsi # 0x20b35c callq 0x5ea00 jmp 0xa5aa2 leaq 0x106(%rsp), %rdi callq 0x5a4b0 movq 0x108(%rsp), %rdi callq 0x594c0 testb $0x1, %al jne 0xa5b7a movq 0x108(%rsp), %rdx movb $0x20, 0xcf(%rsp) leaq 0x1718f3(%rip), %rsi # 0x2173ce leaq 0xd0(%rsp), %rdi leaq 0xcf(%rsp), %rcx callq 0xb7b50 jmp 0xa5af2 movq 0x18(%rsp), %rdi leaq 0xd0(%rsp), %rsi callq 0x59150 jmp 0xa5b06 leaq 0xd0(%rsp), %rdi callq 0x5a4d8 jmp 0xa5b7a movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0x106(%rsp), %rdi callq 0x5a4b0 jmp 0xa5d82 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) jmp 0xa5d78 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0xd0(%rsp), %rdi callq 0x5a4d8 jmp 0xa5d78 movq 0x18(%rsp), %rdi leaq 0x1657e4(%rip), %rsi # 0x20b36a callq 0x59220 jmp 0xa5b8d movq 0x10(%rsp), %rax cmpl $0xe, 0x20(%rax) jne 0xa5c75 movq 0x10(%rsp), %rdi addq $0x28, %rdi movq %rdi, (%rsp) callq 0xb7ce0 movq (%rsp), %rsi movq %rax, 0xa0(%rsp) leaq 0x80(%rsp), %rdi callq 0xa5680 jmp 0xa5bc9 movb $0x27, 0x7f(%rsp) leaq 0x165798(%rip), %rdx # 0x20b36d leaq 0xa8(%rsp), %rdi leaq 0xa0(%rsp), %rsi leaq 0x80(%rsp), %rcx leaq 0x7f(%rsp), %r8 callq 0xb7c10 jmp 0xa5bf9 movq 0x18(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0x59150 jmp 0xa5c0d leaq 0xa8(%rsp), %rdi callq 0x5a4d8 leaq 0x80(%rsp), %rdi callq 0x5a4d8 jmp 0xa5cdf movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) jmp 0xa5c63 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0xa8(%rsp), %rdi callq 0x5a4d8 leaq 0x80(%rsp), %rdi callq 0x5a4d8 jmp 0xa5d78 movq 0x10(%rsp), %rax movl 0x20(%rax), %edi callq 0xb7da0 movq %rax, 0x50(%rsp) leaq 0x1656ee(%rip), %rsi # 0x20b37c leaq 0x58(%rsp), %rdi leaq 0x50(%rsp), %rdx callq 0xb7cf0 jmp 0xa5c9f movq 0x18(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x59150 jmp 0xa5cb0 leaq 0x58(%rsp), %rdi callq 0x5a4d8 jmp 0xa5cdf movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0x58(%rsp), %rdi callq 0x5a4d8 jmp 0xa5d78 cmpl $0x0, 0x114(%rsp) je 0xa5d4f movl 0x114(%rsp), %edi callq 0xb7da0 movq %rax, 0x28(%rsp) leaq 0x165687(%rip), %rsi # 0x20b388 leaq 0x30(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0xb7cf0 jmp 0xa5d12 movq 0x18(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x59150 jmp 0xa5d23 leaq 0x30(%rsp), %rdi callq 0x5a4d8 jmp 0xa5d4f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf8(%rsp) movl %eax, 0xf4(%rsp) leaq 0x30(%rsp), %rdi callq 0x5a4d8 jmp 0xa5d78 movb $0x1, 0x107(%rsp) testb $0x1, 0x107(%rsp) jne 0xa5d6b movq 0x18(%rsp), %rdi callq 0x5a4d8 movq 0x8(%rsp), %rax addq $0x128, %rsp # imm = 0x128 retq movq 0x18(%rsp), %rdi callq 0x5a4d8 movq 0xf8(%rsp), %rdi callq 0x59b80 nop
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: sub rsp, 128h mov [rsp+128h+var_110], rdi; __int64 mov rax, rdi mov [rsp+128h+var_120], rax; void * mov [rsp+128h+var_8], rdi mov qword ptr [rsp+128h+var_10], rsi mov [rsp+128h+var_14], edx mov [rsp+128h+var_22+2], rcx mov rax, qword ptr [rsp+128h+var_10] mov qword ptr [rsp+128h+var_118], rax; int mov byte ptr [rsp+128h+var_22+1], 0 lea rdi, [rsp+128h+var_22] mov [rsp+128h+var_108], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+128h+var_110] mov rdx, [rsp+128h+var_108] lea rsi, aSyntaxError; "syntax error " call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_A5AA2: lea rdi, [rsp+128h+var_22] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+128h+var_22+2] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz loc_A5B7A mov rdx, [rsp+128h+var_22+2]; int mov byte ptr [rsp+128h+var_59], 20h ; ' ' lea rsi, aSyntaxErrorWhi+0Dh; int lea rdi, [rsp+128h+var_59+1]; int lea rcx, [rsp+128h+var_59]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA15_KcRKS8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>(char const(&)[15],std::string const&,char &&) jmp short $+2 loc_A5AF2: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_59+1] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_A5B06: lea rdi, [rsp+128h+var_59+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_A5B7A mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_FE] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_A5D82 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax jmp loc_A5D78 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_A5D78 loc_A5B7A: mov rdi, [rsp+128h+var_110] lea rsi, asc_20B36A; "- " call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_A5B8D: mov rax, qword ptr [rsp+128h+var_118] cmp dword ptr [rax+20h], 0Eh jnz loc_A5C75 mov rdi, qword ptr [rsp+128h+var_118] add rdi, 28h ; '(' mov qword ptr [rsp+128h+var_128], rdi; int call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17get_error_messageEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_error_message(void) mov rsi, qword ptr [rsp+128h+var_128]; int mov [rsp+128h+var_88], rax lea rdi, [rsp+128h+var_A8]; int call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) jmp short $+2 loc_A5BC9: mov [rsp+128h+var_A9], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+128h+var_80] lea rsi, [rsp+128h+var_88] lea rcx, [rsp+128h+var_A8] lea r8, [rsp+128h+var_A9] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) jmp short $+2 loc_A5BF9: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_A5C0D: lea rdi, [rsp+128h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+128h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_A5CDF mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax jmp short loc_A5C63 mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_A5C63: lea rdi, [rsp+arg_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_A5D78 loc_A5C75: mov rax, qword ptr [rsp+128h+var_118] mov edi, [rax+20h] call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov qword ptr [rsp+128h+var_D8], rax lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+128h+var_D0]; int lea rdx, [rsp+128h+var_D8]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) jmp short $+2 loc_A5C9F: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_D0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_A5CB0: lea rdi, [rsp+128h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_A5CDF mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_A5D78 loc_A5CDF: cmp [rsp+128h+var_14], 0 jz short loc_A5D4F mov edi, [rsp+128h+var_14] call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov qword ptr [rsp+128h+var_100], rax lea rsi, aExpected; "; expected " lea rdi, [rsp+128h+var_F8]; int lea rdx, [rsp+128h+var_100]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA12_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>(char const(&)[12],char const* &&) jmp short $+2 loc_A5D12: mov rdi, [rsp+128h+var_110] lea rsi, [rsp+128h+var_F8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_A5D23: lea rdi, [rsp+128h+var_F8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_A5D4F mov rcx, rax mov eax, edx mov [rsp+arg_F0], rcx mov [rsp+arg_EC], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_A5D78 loc_A5D4F: mov byte ptr [rsp+128h+var_22+1], 1 test byte ptr [rsp+128h+var_22+1], 1 jnz short loc_A5D6B mov rdi, [rsp+128h+var_110]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_A5D6B: mov rax, [rsp+128h+var_120] add rsp, 128h retn loc_A5D78: mov rdi, [rsp+arg_10]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_A5D82: mov rdi, [rsp+arg_F0] call __Unwind_Resume
void * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( long long a1, long long a2, long long a3, long long a4) { int v4; // r8d int v5; // r9d int v6; // r9d int v7; // ecx int v8; // r8d int v9; // r9d int v10; // ecx int v11; // r8d int v12; // r9d void *v14; // [rsp+0h] [rbp-128h] int v15; // [rsp+0h] [rbp-128h] void *v16; // [rsp+8h] [rbp-120h] void *v17; // [rsp+8h] [rbp-120h] int v18[2]; // [rsp+10h] [rbp-118h] int v19; // [rsp+10h] [rbp-118h] void *v20; // [rsp+18h] [rbp-110h] void *v21; // [rsp+18h] [rbp-110h] void *v22; // [rsp+18h] [rbp-110h] int v23[2]; // [rsp+28h] [rbp-100h] BYREF int v24[8]; // [rsp+30h] [rbp-F8h] BYREF int v25[2]; // [rsp+50h] [rbp-D8h] BYREF int v26[9]; // [rsp+58h] [rbp-D0h] BYREF char v27; // [rsp+7Fh] [rbp-A9h] BYREF int v28[8]; // [rsp+80h] [rbp-A8h] BYREF long long error_message; // [rsp+A0h] [rbp-88h] BYREF _BYTE v30[39]; // [rsp+A8h] [rbp-80h] BYREF char v31; // [rsp+CFh] [rbp-59h] BYREF _BYTE v32[54]; // [rsp+D0h] [rbp-58h] BYREF _BYTE v33[14]; // [rsp+106h] [rbp-22h] BYREF unsigned int v34; // [rsp+114h] [rbp-14h] int v35[2]; // [rsp+118h] [rbp-10h] long long v36; // [rsp+120h] [rbp-8h] v20 = (void *)a1; v16 = (void *)a1; v36 = a1; *(_QWORD *)v35 = a2; v34 = a3; *(_QWORD *)&v33[2] = a4; *(_QWORD *)v18 = a2; v33[1] = 0; std::allocator<char>::allocator(v33, a2, a3); std::string::basic_string<std::allocator<char>>(a1, (long long)"syntax error ", (long long)v33); std::allocator<char>::~allocator(v33); if ( (std::string::empty(*(_QWORD *)&v33[2]) & 1) == 0 ) { v31 = 32; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[15],std::string const&,char>( (int)v32, (int)"while parsing ", *(int *)&v33[2], (int)&v31, v4, v5, v14, a1, a2, a1, (long long)v33); std::string::operator+=(v20, v32); std::string::~string(v32); } std::string::operator+=(v20, "- "); if ( *(_DWORD *)(*(_QWORD *)v18 + 32LL) == 14 ) { error_message = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_error_message(); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( (long long)v28, *(_QWORD *)v18 + 40LL); v27 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( (unsigned int)v30, (unsigned int)&error_message, (unsigned int)"; last read: '", (unsigned int)v28, (unsigned int)&v27, v6, v18[0] + 40, (_DWORD)v16, v18[0], (long long)v20); std::string::operator+=(v21, v30); std::string::~string(v30); std::string::~string(v28); } else { *(_QWORD *)v25 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name(*(unsigned int *)(*(_QWORD *)v18 + 32LL)); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>( (int)v26, (int)"unexpected ", (int)v25, v7, v8, v9, (int)v14, v16, v18[0], (long long)v20); std::string::operator+=(v21, v26); std::string::~string(v26); } if ( v34 ) { *(_QWORD *)v23 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name(v34); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[12],char const*>( (int)v24, (int)"; expected ", (int)v23, v10, v11, v12, v15, v17, v19, (long long)v21); std::string::operator+=(v22, v24); std::string::~string(v24); } return v17; }
exception_message: SUB RSP,0x128 MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x120],RDI MOV qword ptr [RSP + 0x118],RSI MOV dword ptr [RSP + 0x114],EDX MOV qword ptr [RSP + 0x108],RCX MOV RAX,qword ptr [RSP + 0x118] MOV qword ptr [RSP + 0x10],RAX MOV byte ptr [RSP + 0x107],0x0 LEA RDI,[RSP + 0x106] MOV qword ptr [RSP + 0x20],RDI CALL 0x0015a080 MOV RDI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_001a5a94: LEA RSI,[0x30b35c] CALL 0x0015ea00 JMP 0x001a5aa2 LAB_001a5aa2: LEA RDI,[RSP + 0x106] CALL 0x0015a4b0 MOV RDI,qword ptr [RSP + 0x108] CALL 0x001594c0 TEST AL,0x1 JNZ 0x001a5b7a MOV RDX,qword ptr [RSP + 0x108] MOV byte ptr [RSP + 0xcf],0x20 LAB_001a5ad4: LEA RSI,[0x3173ce] LEA RDI,[RSP + 0xd0] LEA RCX,[RSP + 0xcf] CALL 0x001b7b50 JMP 0x001a5af2 LAB_001a5af2: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0xd0] CALL 0x00159150 JMP 0x001a5b06 LAB_001a5b06: LEA RDI,[RSP + 0xd0] CALL 0x0015a4d8 JMP 0x001a5b7a LAB_001a5b7a: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[0x30b36a] CALL 0x00159220 JMP 0x001a5b8d LAB_001a5b8d: MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x20],0xe JNZ 0x001a5c75 MOV RDI,qword ptr [RSP + 0x10] ADD RDI,0x28 MOV qword ptr [RSP],RDI CALL 0x001b7ce0 MOV RSI,qword ptr [RSP] MOV qword ptr [RSP + 0xa0],RAX LEA RDI,[RSP + 0x80] CALL 0x001a5680 JMP 0x001a5bc9 LAB_001a5bc9: MOV byte ptr [RSP + 0x7f],0x27 LAB_001a5bce: LEA RDX,[0x30b36d] LEA RDI,[RSP + 0xa8] LEA RSI,[RSP + 0xa0] LEA RCX,[RSP + 0x80] LEA R8,[RSP + 0x7f] CALL 0x001b7c10 JMP 0x001a5bf9 LAB_001a5bf9: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0xa8] CALL 0x00159150 JMP 0x001a5c0d LAB_001a5c0d: LEA RDI,[RSP + 0xa8] CALL 0x0015a4d8 LEA RDI,[RSP + 0x80] CALL 0x0015a4d8 JMP 0x001a5cdf LAB_001a5c75: MOV RAX,qword ptr [RSP + 0x10] MOV EDI,dword ptr [RAX + 0x20] CALL 0x001b7da0 MOV qword ptr [RSP + 0x50],RAX LAB_001a5c87: LEA RSI,[0x30b37c] LEA RDI,[RSP + 0x58] LEA RDX,[RSP + 0x50] CALL 0x001b7cf0 JMP 0x001a5c9f LAB_001a5c9f: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x58] CALL 0x00159150 JMP 0x001a5cb0 LAB_001a5cb0: LEA RDI,[RSP + 0x58] CALL 0x0015a4d8 JMP 0x001a5cdf LAB_001a5cdf: CMP dword ptr [RSP + 0x114],0x0 JZ 0x001a5d4f MOV EDI,dword ptr [RSP + 0x114] CALL 0x001b7da0 MOV qword ptr [RSP + 0x28],RAX LAB_001a5cfa: LEA RSI,[0x30b388] LEA RDI,[RSP + 0x30] LEA RDX,[RSP + 0x28] CALL 0x001b7cf0 JMP 0x001a5d12 LAB_001a5d12: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x30] CALL 0x00159150 LAB_001a5d21: JMP 0x001a5d23 LAB_001a5d23: LEA RDI,[RSP + 0x30] CALL 0x0015a4d8 JMP 0x001a5d4f LAB_001a5d4f: MOV byte ptr [RSP + 0x107],0x1 TEST byte ptr [RSP + 0x107],0x1 JNZ 0x001a5d6b MOV RDI,qword ptr [RSP + 0x18] CALL 0x0015a4d8 LAB_001a5d6b: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x128 RET
/* WARNING: Removing unreachable block (ram,0x001a5d61) */ /* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::token_type, std::__cxx11::string const&) */ string * nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::exception_message(string *param_1,long param_2,int param_3,string *param_4) { ulong uVar1; char *local_100; detail local_f8 [32]; char *local_d8; detail local_d0 [39]; char local_a9; string local_a8 [32]; char *local_88; detail local_80 [39]; char local_59; detail local_58 [54]; allocator local_22; int1 local_21; string *local_20; int local_14; long local_10; string *local_8; local_21 = 0; local_20 = param_4; local_14 = param_3; local_10 = param_2; local_8 = param_1; std::allocator<char>::allocator(); /* try { // try from 001a5a94 to 001a5a9f has its CatchHandler @ 001a5b15 */ std::__cxx11::string::string<std::allocator<char>>(param_1,"syntax error ",&local_22); std::allocator<char>::~allocator((allocator<char> *)&local_22); uVar1 = std::__cxx11::string::empty(); if ((uVar1 & 1) == 0) { local_59 = ' '; /* try { // try from 001a5ad4 to 001a5aef has its CatchHandler @ 001a5b3b */ concat<std::__cxx11::string,char_const(&)[15],std::__cxx11::string_const&,char> (local_58,"while parsing ",local_20,&local_59); /* try { // try from 001a5af2 to 001a5b03 has its CatchHandler @ 001a5b54 */ std::__cxx11::string::operator+=(param_1,(string *)local_58); std::__cxx11::string::~string((string *)local_58); } /* try { // try from 001a5b7a to 001a5bc6 has its CatchHandler @ 001a5b3b */ std::__cxx11::string::operator+=(param_1,"- "); if (*(int *)(param_2 + 0x20) == 0xe) { local_88 = (char *)lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_error_message((lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *)(param_2 + 0x28)); lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_a9 = '\''; /* try { // try from 001a5bce to 001a5bf6 has its CatchHandler @ 001a5c2c */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> (local_80,&local_88,"; last read: \'",local_a8,&local_a9); /* try { // try from 001a5bf9 to 001a5c0a has its CatchHandler @ 001a5c42 */ std::__cxx11::string::operator+=(param_1,(string *)local_80); std::__cxx11::string::~string((string *)local_80); std::__cxx11::string::~string(local_a8); } else { local_d8 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(*(int4 *)(param_2 + 0x20)); /* try { // try from 001a5c87 to 001a5c9c has its CatchHandler @ 001a5b3b */ concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_d0,"unexpected ",&local_d8); /* try { // try from 001a5c9f to 001a5cad has its CatchHandler @ 001a5cbc */ std::__cxx11::string::operator+=(param_1,(string *)local_d0); std::__cxx11::string::~string((string *)local_d0); } if (local_14 != 0) { local_100 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(local_14); /* try { // try from 001a5cfa to 001a5d0f has its CatchHandler @ 001a5b3b */ concat<std::__cxx11::string,char_const(&)[12],char_const*>(local_f8,"; expected ",&local_100); /* try { // try from 001a5d12 to 001a5d20 has its CatchHandler @ 001a5d2f */ std::__cxx11::string::operator+=(param_1,(string *)local_f8); std::__cxx11::string::~string((string *)local_f8); } return param_1; }
9,083
glfwGetGamepadName
untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c
GLFWAPI const char* glfwGetGamepadName(int jid) { _GLFWjoystick* js; assert(jid >= GLFW_JOYSTICK_1); assert(jid <= GLFW_JOYSTICK_LAST); _GLFW_REQUIRE_INIT_OR_RETURN(NULL); if (jid < 0 || jid > GLFW_JOYSTICK_LAST) { _glfwInputError(GLFW_INVALID_ENUM, "Invalid joystick ID %i", jid); return NULL; } js = _glfw.joysticks + jid; if (!js->present) return NULL; if (!_glfwPlatformPollJoystick(js, _GLFW_POLL_PRESENCE)) return NULL; if (!js->mapping) return NULL; return js->mapping->name; }
O3
c
glfwGetGamepadName: pushq %r14 pushq %rbx pushq %rax testl %edi, %edi js 0x1b45a cmpl $0x10, %edi jae 0x1b479 leaq 0x8d236(%rip), %rax # 0xa8638 cmpl $0x0, (%rax) je 0x1b43b movl %edi, %ecx imulq $0x1fa0, %rcx, %rcx # imm = 0x1FA0 cmpl $0x0, 0x408(%rax,%rcx) je 0x1b44d leaq (%rax,%rcx), %r14 addq $0x408, %r14 # imm = 0x408 xorl %ebx, %ebx movq %r14, %rdi xorl %esi, %esi callq 0x28ef5 testl %eax, %eax je 0x1b44f movq 0x70(%r14), %rbx jmp 0x1b44f xorl %ebx, %ebx movl $0x10001, %edi # imm = 0x10001 xorl %esi, %esi xorl %eax, %eax callq 0x18e91 jmp 0x1b44f xorl %ebx, %ebx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x67d1f(%rip), %rdi # 0x83180 leaq 0x6784c(%rip), %rsi # 0x82cb4 leaq 0x67f01(%rip), %rcx # 0x83370 movl $0x4b2, %edx # imm = 0x4B2 callq 0xc540 leaq 0x67d34(%rip), %rdi # 0x831b4 leaq 0x6782d(%rip), %rsi # 0x82cb4 leaq 0x67ee2(%rip), %rcx # 0x83370 movl $0x4b3, %edx # imm = 0x4B3 callq 0xc540
glfwGetGamepadName: push r14 push rbx push rax test edi, edi js short loc_1B45A cmp edi, 10h jnb short loc_1B479 lea rax, _glfw cmp dword ptr [rax], 0 jz short loc_1B43B mov ecx, edi imul rcx, 1FA0h cmp dword ptr [rax+rcx+408h], 0 jz short loc_1B44D lea r14, [rax+rcx] add r14, 408h xor ebx, ebx mov rdi, r14 xor esi, esi call _glfwPlatformPollJoystick test eax, eax jz short loc_1B44F mov rbx, [r14+70h] jmp short loc_1B44F loc_1B43B: xor ebx, ebx mov edi, offset loc_10001 xor esi, esi xor eax, eax call _glfwInputError jmp short loc_1B44F loc_1B44D: xor ebx, ebx loc_1B44F: mov rax, rbx add rsp, 8 pop rbx pop r14 retn loc_1B45A: lea rdi, aJidGlfwJoystic; "jid >= GLFW_JOYSTICK_1" lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstCharGlfwg_1; "const char *glfwGetGamepadName(int)" mov edx, 4B2h call ___assert_fail loc_1B479: lea rdi, aJidGlfwJoystic_0; "jid <= GLFW_JOYSTICK_LAST" lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github/2025_star3"... lea rcx, aConstCharGlfwg_1; "const char *glfwGetGamepadName(int)" mov edx, 4B3h call ___assert_fail
long long glfwGetGamepadName(int a1) { long long v1; // rcx _DWORD *v2; // r14 long long v3; // rbx if ( a1 < 0 ) __assert_fail( "jid >= GLFW_JOYSTICK_1", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c", 1202LL, "const char *glfwGetGamepadName(int)"); if ( (unsigned int)a1 >= 0x10 ) __assert_fail( "jid <= GLFW_JOYSTICK_LAST", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c", 1203LL, "const char *glfwGetGamepadName(int)"); if ( glfw[0] ) { v1 = 2024LL * (unsigned int)a1; if ( glfw[v1 + 258] ) { v2 = &glfw[v1 + 258]; v3 = 0LL; if ( (unsigned int)glfwPlatformPollJoystick(v2, 0LL) ) return *((_QWORD *)v2 + 14); } else { return 0LL; } } else { v3 = 0LL; glfwInputError((unsigned int)&loc_10001, 0LL); } return v3; }
glfwGetGamepadName: PUSH R14 PUSH RBX PUSH RAX TEST EDI,EDI JS 0x0011b45a CMP EDI,0x10 JNC 0x0011b479 LEA RAX,[0x1a8638] CMP dword ptr [RAX],0x0 JZ 0x0011b43b MOV ECX,EDI IMUL RCX,RCX,0x1fa0 CMP dword ptr [RAX + RCX*0x1 + 0x408],0x0 JZ 0x0011b44d LEA R14,[RAX + RCX*0x1] ADD R14,0x408 XOR EBX,EBX MOV RDI,R14 XOR ESI,ESI CALL 0x00128ef5 TEST EAX,EAX JZ 0x0011b44f MOV RBX,qword ptr [R14 + 0x70] JMP 0x0011b44f LAB_0011b43b: XOR EBX,EBX MOV EDI,0x10001 XOR ESI,ESI XOR EAX,EAX CALL 0x00118e91 JMP 0x0011b44f LAB_0011b44d: XOR EBX,EBX LAB_0011b44f: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET LAB_0011b45a: LEA RDI,[0x183180] LEA RSI,[0x182cb4] LEA RCX,[0x183370] MOV EDX,0x4b2 CALL 0x0010c540 LAB_0011b479: LEA RDI,[0x1831b4] LEA RSI,[0x182cb4] LEA RCX,[0x183370] MOV EDX,0x4b3 CALL 0x0010c540
int8 glfwGetGamepadName(uint param_1) { int iVar1; ulong uVar2; int8 uVar3; if ((int)param_1 < 0) { /* WARNING: Subroutine does not return */ __assert_fail("jid >= GLFW_JOYSTICK_1", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c" ,0x4b2,"const char *glfwGetGamepadName(int)"); } if (param_1 < 0x10) { if (_glfw == 0) { uVar3 = 0; _glfwInputError(0x10001,0); } else { uVar2 = (ulong)param_1; if ((&DAT_001a8a40)[uVar2 * 0x7e8] == 0) { uVar3 = 0; } else { uVar3 = 0; iVar1 = _glfwPlatformPollJoystick(&DAT_001a8a40 + uVar2 * 0x7e8,0); if (iVar1 != 0) { uVar3 = (&DAT_001a8ab0)[uVar2 * 0x3f4]; } } } return uVar3; } /* WARNING: Subroutine does not return */ __assert_fail("jid <= GLFW_JOYSTICK_LAST", "/workspace/llm4binary/github/2025_star3/untodesu[P]riteg/build_O3/_deps/glfw-src/src/input.c" ,0x4b3,"const char *glfwGetGamepadName(int)"); }
9,084
deadlock_search
eloqsql/mysys/waiting_threads.c
static int deadlock_search(struct deadlock_arg *arg, WT_THD *blocker, uint depth) { WT_RESOURCE *rc, *volatile *shared_ptr= &blocker->waiting_for; WT_THD *cursor; uint i; int ret= WT_OK; DBUG_ENTER("deadlock_search"); DBUG_PRINT("wt", ("enter: thd=%s, blocker=%s, depth=%u", arg->thd->name, blocker->name, depth)); arg->last_locked_rc= 0; if (depth > arg->max_depth) { DBUG_PRINT("wt", ("exit: WT_DEPTH_EXCEEDED (early)")); DBUG_RETURN(WT_DEPTH_EXCEEDED); } retry: /* safe dereference as explained in lf_alloc-pin.c (in short: protects against lf_alloc_free() in lf_hash_delete()) */ do { rc= *shared_ptr; lf_pin(arg->thd->pins, 0, rc); } while (rc != *shared_ptr && LF_BACKOFF()); if (rc == 0) { DBUG_PRINT("wt", ("exit: OK (early)")); DBUG_RETURN(0); } rc_rdlock(rc); if (rc->state != ACTIVE || *shared_ptr != rc) { /* blocker is not waiting on this resource anymore */ rc_unlock(rc); lf_unpin(arg->thd->pins, 0); goto retry; } /* as the state is locked, we can unpin now */ lf_unpin(arg->thd->pins, 0); /* Below is not a pure depth-first search. It's a depth-first with a slightest hint of breadth-first. Depth-first is: check(element, X): foreach current in element->nodes[] do: if current == X return error; check(current, X); while we do check(element, X): foreach current in element->nodes[] do: if current == X return error; foreach current in element->nodes[] do: check(current, X); preferring shorter deadlocks over longer ones. */ for (i= 0; i < rc->owners.elements; i++) { cursor= *dynamic_element(&rc->owners, i, WT_THD**); /* We're only looking for (and detecting) cycles that include 'arg->thd'. That is, only deadlocks that *we* have created. For example, thd->A->B->thd (thd waits for A, A waits for B, while B is waiting for thd). While walking the graph we can encounter other cicles, e.g. thd->A->B->C->A This will not be detected. Instead we will walk it in circles until the search depth limit is reached (the latter guarantees that an infinite loop is impossible). We expect the thread that has created the cycle (one of A, B, and C) to detect its deadlock. */ if (cursor == arg->thd) { ret= WT_DEADLOCK; increment_cycle_stats(depth, arg->max_depth == *arg->thd->deadlock_search_depth_long); arg->victim= cursor; goto end; } } for (i= 0; i < rc->owners.elements; i++) { cursor= *dynamic_element(&rc->owners, i, WT_THD**); switch (deadlock_search(arg, cursor, depth+1)) { case WT_OK: break; case WT_DEPTH_EXCEEDED: ret= WT_DEPTH_EXCEEDED; break; case WT_DEADLOCK: ret= WT_DEADLOCK; change_victim(cursor, arg); /* also sets arg->last_locked_rc to 0 */ i= rc->owners.elements; /* jump out of the loop */ break; default: DBUG_ASSERT(0); } if (arg->last_locked_rc) rc_unlock(arg->last_locked_rc); } end: /* Note that 'rc' is locked in this function, but it's never unlocked here. Instead it's saved in arg->last_locked_rc and the *caller* is expected to unlock it. It's done to support different killing strategies. This is how it works: Assuming a graph thd->A->B->C->thd deadlock_search() function starts from thd, locks it (in fact it locks not a thd, but a resource it is waiting on, but below, for simplicity, I'll talk about "locking a thd"). Then it goes down recursively, locks A, and so on. Goes down recursively, locks B. Goes down recursively, locks C. Notices that C is waiting on thd. Deadlock detected. Sets arg->victim=thd. Returns from the last deadlock_search() call. C stays locked! Now it checks whether C is a more appropriate victim than 'thd'. If yes - arg->victim=C, otherwise C is unlocked. Returns. B stays locked. Now it checks whether B is a more appropriate victim than arg->victim. If yes - old arg->victim is unlocked and arg->victim=B, otherwise B is unlocked. Return. And so on. In short, a resource is locked in a frame. But it's not unlocked in the same frame, it's unlocked by the caller, and only after the caller checks that it doesn't need to use current WT_THD as a victim. If it does - the lock is kept and the old victim's resource is unlocked. When the recursion is unrolled and we are back to deadlock() function, there are only two locks left - on thd and on the victim. */ arg->last_locked_rc= rc; DBUG_PRINT("wt", ("exit: %s", ret == WT_DEPTH_EXCEEDED ? "WT_DEPTH_EXCEEDED" : ret ? "WT_DEADLOCK" : "OK")); DBUG_RETURN(ret); }
O3
c
deadlock_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq $0x0, 0x18(%rdi) movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE movl %edx, -0x2c(%rbp) cmpl %edx, 0x8(%rdi) jb 0xa7413 movq %rsi, %r12 movq %rdi, %rbx leaq 0x2ded68(%rip), %r14 # 0x386018 movq 0x28(%r12), %r13 movq (%rbx), %rax movq 0x30(%rax), %rax movq %r13, %rcx xchgq %rcx, (%rax) cmpq 0x28(%r12), %r13 je 0xa72d8 movl (%r14), %eax testl %eax, %eax je 0xa72b0 pause decl %eax jne 0xa72d0 jmp 0xa72b0 testq %r13, %r13 je 0xa7310 leaq 0x18(%r13), %r15 movq %r15, %rdi callq 0xa4348 cmpl $0x0, 0x14(%r13) jne 0xa72fa movq 0x28(%r12), %rax cmpq %r13, %rax je 0xa7318 movq %r15, %rdi callq 0xa4476 movq (%rbx), %rax movq 0x30(%rax), %rax xorl %ecx, %ecx xchgq %rcx, (%rax) jmp 0xa72b0 xorl %r15d, %r15d jmp 0xa7413 movq (%rbx), %rax movq 0x30(%rax), %rax xorl %ecx, %ecx xchgq %rcx, (%rax) xorl %r15d, %r15d movl 0xe8(%r13), %eax testq %rax, %rax je 0xa740f movq 0xe0(%r13), %rsi movq (%rbx), %rdx xorl %edi, %edi movq (%rsi,%rdi,8), %rcx cmpq %rdx, %rcx je 0xa73d0 incq %rdi cmpq %rdi, %rax jne 0xa7343 testq %rax, %rax je 0xa740c incl -0x2c(%rbp) xorl %r14d, %r14d xorl %r15d, %r15d movq 0xe0(%r13), %rax movl %r14d, %ecx movq (%rax,%rcx,8), %r12 movq %rbx, %rdi movq %r12, %rsi movl -0x2c(%rbp), %edx callq 0xa727b cmpl $-0x1, %eax je 0xa7398 cmpl $-0x2, %eax jne 0xa73b0 movl $0xfffffffe, %r15d # imm = 0xFFFFFFFE jmp 0xa73b0 movq %r12, %rdi movq %rbx, %rsi callq 0xa7425 movl 0xe8(%r13), %r14d movl $0xffffffff, %r15d # imm = 0xFFFFFFFF movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0xa73c2 addq $0x18, %rdi callq 0xa4476 incl %r14d cmpl 0xe8(%r13), %r14d jb 0xa736a jmp 0xa740f movl 0x8(%rbx), %eax movq 0x50(%rdx), %rdx xorl %esi, %esi cmpq %rax, (%rdx) sete %sil movl -0x2c(%rbp), %edx cmpl $0x20, %edx movl $0x20, %eax cmovbl %edx, %eax movl %esi, %edx shll $0x7, %edx leal (%rdx,%rsi,4), %edx addq 0x2dcb93(%rip), %rdx # 0x383f90 incl (%rdx,%rax,4) movq %rcx, 0x10(%rbx) movl $0xffffffff, %r15d # imm = 0xFFFFFFFF jmp 0xa740f xorl %r15d, %r15d movq %r13, 0x18(%rbx) movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
deadlock_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov qword ptr [rdi+18h], 0 mov r15d, 0FFFFFFFEh mov [rbp+var_2C], edx cmp [rdi+8], edx jb loc_A7413 mov r12, rsi mov rbx, rdi lea r14, my_cpu_relax_multiplier loc_A72B0: mov r13, [r12+28h] mov rax, [rbx] mov rax, [rax+30h] mov rcx, r13 xchg rcx, [rax] cmp r13, [r12+28h] jz short loc_A72D8 mov eax, [r14] test eax, eax jz short loc_A72B0 loc_A72D0: pause dec eax jnz short loc_A72D0 jmp short loc_A72B0 loc_A72D8: test r13, r13 jz short loc_A7310 lea r15, [r13+18h] mov rdi, r15 call my_rw_rdlock cmp dword ptr [r13+14h], 0 jnz short loc_A72FA mov rax, [r12+28h] cmp rax, r13 jz short loc_A7318 loc_A72FA: mov rdi, r15 call my_rw_unlock mov rax, [rbx] mov rax, [rax+30h] xor ecx, ecx xchg rcx, [rax] jmp short loc_A72B0 loc_A7310: xor r15d, r15d jmp loc_A7413 loc_A7318: mov rax, [rbx] mov rax, [rax+30h] xor ecx, ecx xchg rcx, [rax] xor r15d, r15d mov eax, [r13+0E8h] test rax, rax jz loc_A740F mov rsi, [r13+0E0h] mov rdx, [rbx] xor edi, edi loc_A7343: mov rcx, [rsi+rdi*8] cmp rcx, rdx jz loc_A73D0 inc rdi cmp rax, rdi jnz short loc_A7343 test rax, rax jz loc_A740C inc [rbp+var_2C] xor r14d, r14d xor r15d, r15d loc_A736A: mov rax, [r13+0E0h] mov ecx, r14d mov r12, [rax+rcx*8] mov rdi, rbx mov rsi, r12 mov edx, [rbp+var_2C] call deadlock_search cmp eax, 0FFFFFFFFh jz short loc_A7398 cmp eax, 0FFFFFFFEh jnz short loc_A73B0 mov r15d, 0FFFFFFFEh jmp short loc_A73B0 loc_A7398: mov rdi, r12 mov rsi, rbx call change_victim mov r14d, [r13+0E8h] mov r15d, 0FFFFFFFFh loc_A73B0: mov rdi, [rbx+18h] test rdi, rdi jz short loc_A73C2 add rdi, 18h call my_rw_unlock loc_A73C2: inc r14d cmp r14d, [r13+0E8h] jb short loc_A736A jmp short loc_A740F loc_A73D0: mov eax, [rbx+8] mov rdx, [rdx+50h] xor esi, esi cmp [rdx], rax setz sil mov edx, [rbp+var_2C] cmp edx, 20h ; ' ' mov eax, 20h ; ' ' cmovb eax, edx mov edx, esi shl edx, 7 lea edx, [rdx+rsi*4] add rdx, cs:wt_cycle_stats_ptr inc dword ptr [rdx+rax*4] mov [rbx+10h], rcx mov r15d, 0FFFFFFFFh jmp short loc_A740F loc_A740C: xor r15d, r15d loc_A740F: mov [rbx+18h], r13 loc_A7413: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long deadlock_search(long long *a1, long long a2, unsigned int a3) { unsigned int v3; // r15d long long v5; // r13 int i; // eax long long v7; // rdx long long v8; // rdi long long v9; // rcx unsigned int v10; // r14d long long v11; // r12 int v12; // eax long long v13; // rdi BOOL v14; // esi long long v15; // rax unsigned int v18; // [rsp+0h] [rbp-2Ch] a1[3] = 0LL; v3 = -2; if ( *((_DWORD *)a1 + 2) >= a3 ) { while ( 1 ) { while ( 1 ) { v5 = *(_QWORD *)(a2 + 40); _InterlockedExchange64(*(volatile long long **)(*a1 + 48), v5); if ( v5 == *(_QWORD *)(a2 + 40) ) break; for ( i = my_cpu_relax_multiplier; i; --i ) _mm_pause(); } if ( !v5 ) return 0; my_rw_rdlock(v5 + 24); if ( !*(_DWORD *)(v5 + 20) && *(_QWORD *)(a2 + 40) == v5 ) break; my_rw_unlock(v5 + 24); _InterlockedExchange64(*(volatile long long **)(*a1 + 48), 0LL); } _InterlockedExchange64(*(volatile long long **)(*a1 + 48), 0LL); v3 = 0; if ( *(_DWORD *)(v5 + 232) ) { v7 = *a1; v8 = 0LL; while ( 1 ) { v9 = *(_QWORD *)(*(_QWORD *)(v5 + 224) + 8 * v8); if ( v9 == v7 ) break; if ( *(_DWORD *)(v5 + 232) == ++v8 ) { if ( *(_DWORD *)(v5 + 232) ) { v18 = a3 + 1; v10 = 0; v3 = 0; do { v11 = *(_QWORD *)(*(_QWORD *)(v5 + 224) + 8LL * v10); v12 = deadlock_search(a1, v11, v18); if ( v12 == -1 ) { change_victim(v11, a1); v10 = *(_DWORD *)(v5 + 232); v3 = -1; } else if ( v12 == -2 ) { v3 = -2; } v13 = a1[3]; if ( v13 ) my_rw_unlock(v13 + 24); ++v10; } while ( v10 < *(_DWORD *)(v5 + 232) ); } else { v3 = 0; } goto LABEL_29; } } v15 = 32LL; if ( a3 < 0x20 ) v15 = a3; v14 = **(_QWORD **)(v7 + 80) == *((_DWORD *)a1 + 2); ++*(_DWORD *)((char *)&wt_cycle_stats[v15] + (unsigned int)(132 * v14)); a1[2] = v9; v3 = -1; } LABEL_29: a1[3] = v5; } return v3; }
deadlock_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RDI + 0x18],0x0 MOV R15D,0xfffffffe MOV dword ptr [RBP + -0x2c],EDX CMP dword ptr [RDI + 0x8],EDX JC 0x001a7413 MOV R12,RSI MOV RBX,RDI LEA R14,[0x486018] LAB_001a72b0: MOV R13,qword ptr [R12 + 0x28] MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x30] MOV RCX,R13 XCHG qword ptr [RAX],RCX CMP R13,qword ptr [R12 + 0x28] JZ 0x001a72d8 MOV EAX,dword ptr [R14] TEST EAX,EAX JZ 0x001a72b0 LAB_001a72d0: PAUSE DEC EAX JNZ 0x001a72d0 JMP 0x001a72b0 LAB_001a72d8: TEST R13,R13 JZ 0x001a7310 LEA R15,[R13 + 0x18] MOV RDI,R15 CALL 0x001a4348 CMP dword ptr [R13 + 0x14],0x0 JNZ 0x001a72fa MOV RAX,qword ptr [R12 + 0x28] CMP RAX,R13 JZ 0x001a7318 LAB_001a72fa: MOV RDI,R15 CALL 0x001a4476 MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x30] XOR ECX,ECX XCHG qword ptr [RAX],RCX JMP 0x001a72b0 LAB_001a7310: XOR R15D,R15D JMP 0x001a7413 LAB_001a7318: MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x30] XOR ECX,ECX XCHG qword ptr [RAX],RCX XOR R15D,R15D MOV EAX,dword ptr [R13 + 0xe8] TEST RAX,RAX JZ 0x001a740f MOV RSI,qword ptr [R13 + 0xe0] MOV RDX,qword ptr [RBX] XOR EDI,EDI LAB_001a7343: MOV RCX,qword ptr [RSI + RDI*0x8] CMP RCX,RDX JZ 0x001a73d0 INC RDI CMP RAX,RDI JNZ 0x001a7343 TEST RAX,RAX JZ 0x001a740c INC dword ptr [RBP + -0x2c] XOR R14D,R14D XOR R15D,R15D LAB_001a736a: MOV RAX,qword ptr [R13 + 0xe0] MOV ECX,R14D MOV R12,qword ptr [RAX + RCX*0x8] MOV RDI,RBX MOV RSI,R12 MOV EDX,dword ptr [RBP + -0x2c] CALL 0x001a727b CMP EAX,-0x1 JZ 0x001a7398 CMP EAX,-0x2 JNZ 0x001a73b0 MOV R15D,0xfffffffe JMP 0x001a73b0 LAB_001a7398: MOV RDI,R12 MOV RSI,RBX CALL 0x001a7425 MOV R14D,dword ptr [R13 + 0xe8] MOV R15D,0xffffffff LAB_001a73b0: MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x001a73c2 ADD RDI,0x18 CALL 0x001a4476 LAB_001a73c2: INC R14D CMP R14D,dword ptr [R13 + 0xe8] JC 0x001a736a JMP 0x001a740f LAB_001a73d0: MOV EAX,dword ptr [RBX + 0x8] MOV RDX,qword ptr [RDX + 0x50] XOR ESI,ESI CMP qword ptr [RDX],RAX SETZ SIL MOV EDX,dword ptr [RBP + -0x2c] CMP EDX,0x20 MOV EAX,0x20 CMOVC EAX,EDX MOV EDX,ESI SHL EDX,0x7 LEA EDX,[RDX + RSI*0x4] ADD RDX,qword ptr [0x00483f90] INC dword ptr [RDX + RAX*0x4] MOV qword ptr [RBX + 0x10],RCX MOV R15D,0xffffffff JMP 0x001a740f LAB_001a740c: XOR R15D,R15D LAB_001a740f: MOV qword ptr [RBX + 0x18],R13 LAB_001a7413: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 deadlock_search(long *param_1,long param_2,uint param_3) { long lVar1; long lVar2; int8 uVar3; int iVar4; ulong uVar5; ulong uVar6; int iVar7; int8 uVar8; bool bVar9; param_1[3] = 0; uVar8 = 0xfffffffe; if (param_3 <= *(uint *)(param_1 + 1)) { while( true ) { while( true ) { lVar1 = *(long *)(param_2 + 0x28); LOCK(); **(long **)(*param_1 + 0x30) = lVar1; UNLOCK(); iVar7 = my_cpu_relax_multiplier; if (lVar1 == *(long *)(param_2 + 0x28)) break; for (; iVar7 != 0; iVar7 = iVar7 + -1) { } } if (lVar1 == 0) { return 0; } my_rw_rdlock(); if ((*(int *)(lVar1 + 0x14) == 0) && (*(long *)(param_2 + 0x28) == lVar1)) break; my_rw_unlock(lVar1 + 0x18); LOCK(); **(int8 **)(*param_1 + 0x30) = 0; UNLOCK(); } LOCK(); **(int8 **)(*param_1 + 0x30) = 0; UNLOCK(); uVar8 = 0; uVar5 = (ulong)*(uint *)(lVar1 + 0xe8); if (uVar5 != 0) { uVar6 = 0; do { lVar2 = *(long *)(*(long *)(lVar1 + 0xe0) + uVar6 * 8); if (lVar2 == *param_1) { bVar9 = **(ulong **)(*param_1 + 0x50) == (ulong)*(uint *)(param_1 + 1); uVar5 = 0x20; if (param_3 < 0x20) { uVar5 = (ulong)param_3; } *(int *)(PTR_wt_cycle_stats_00483f90 + uVar5 * 4 + (ulong)((uint)bVar9 * 0x80 + (uint)bVar9 * 4)) = *(int *)(PTR_wt_cycle_stats_00483f90 + uVar5 * 4 + (ulong)((uint)bVar9 * 0x80 + (uint)bVar9 * 4)) + 1; param_1[2] = lVar2; uVar8 = 0xffffffff; goto LAB_001a740f; } uVar6 = uVar6 + 1; } while (uVar5 != uVar6); if (uVar5 == 0) { uVar8 = 0; } else { uVar5 = 0; uVar8 = 0; do { iVar7 = (int)uVar5; uVar3 = *(int8 *)(*(long *)(lVar1 + 0xe0) + uVar5 * 8); iVar4 = deadlock_search(param_1,uVar3,param_3 + 1); if (iVar4 == -1) { change_victim(uVar3,param_1); iVar7 = *(int *)(lVar1 + 0xe8); uVar8 = 0xffffffff; } else if (iVar4 == -2) { uVar8 = 0xfffffffe; } if (param_1[3] != 0) { my_rw_unlock(param_1[3] + 0x18); } uVar5 = (ulong)(iVar7 + 1U); } while (iVar7 + 1U < *(uint *)(lVar1 + 0xe8)); } } LAB_001a740f: param_1[3] = lVar1; } return uVar8; }
9,085
translog_scanner_eol
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_scanner_eol(TRANSLOG_SCANNER_DATA *scanner) { DBUG_ENTER("translog_scanner_eol"); DBUG_PRINT("enter", ("Horizon: " LSN_FMT " Current: (%u, 0x%x+0x%x=0x%x)", LSN_IN_PARTS(scanner->horizon), LSN_IN_PARTS(scanner->page_addr), (uint) scanner->page_offset, (uint) (LSN_OFFSET(scanner->page_addr) + scanner->page_offset))); if (scanner->horizon > (scanner->page_addr + scanner->page_offset)) { DBUG_PRINT("info", ("Horizon is not reached")); DBUG_RETURN(0); } if (scanner->fixed_horizon) { DBUG_PRINT("info", ("Horizon is fixed and reached")); DBUG_RETURN(1); } scanner->horizon= translog_get_horizon(); DBUG_PRINT("info", ("Horizon is re-read, EOL: %d", scanner->horizon <= (scanner->page_addr + scanner->page_offset))); DBUG_RETURN(scanner->horizon <= (scanner->page_addr + scanner->page_offset)); }
O3
c
translog_scanner_eol: movl 0x2028(%rdi), %eax addq 0x2000(%rdi), %rax cmpq %rax, 0x2008(%rdi) jle 0x4b3a4 xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movb $0x1, %al cmpb $0x0, 0x202c(%rdi) jne 0x4b3d7 callq 0x4720c movq %rax, 0x2008(%rbx) movl 0x2028(%rbx), %ecx addq 0x2000(%rbx), %rcx cmpq %rcx, %rax setle %al addq $0x8, %rsp popq %rbx popq %rbp retq
translog_scanner_eol: mov eax, [rdi+2028h] add rax, [rdi+2000h] cmp [rdi+2008h], rax jle short loc_4B3A4 xor eax, eax retn loc_4B3A4: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov al, 1 cmp byte ptr [rdi+202Ch], 0 jnz short loc_4B3D7 call translog_get_horizon mov [rbx+2008h], rax mov ecx, [rbx+2028h] add rcx, [rbx+2000h] cmp rax, rcx setle al loc_4B3D7: add rsp, 8 pop rbx pop rbp retn
bool translog_scanner_eol(long long a1) { bool result; // al long long horizon; // rax if ( *(_QWORD *)(a1 + 8200) > (signed long long)(*(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232)) ) return 0; result = 1; if ( !*(_BYTE *)(a1 + 8236) ) { horizon = translog_get_horizon(); *(_QWORD *)(a1 + 8200) = horizon; return horizon <= *(_QWORD *)(a1 + 0x2000) + *(unsigned int *)(a1 + 8232); } return result; }
translog_scanner_eol: MOV EAX,dword ptr [RDI + 0x2028] ADD RAX,qword ptr [RDI + 0x2000] CMP qword ptr [RDI + 0x2008],RAX JLE 0x0014b3a4 XOR EAX,EAX RET LAB_0014b3a4: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV AL,0x1 CMP byte ptr [RDI + 0x202c],0x0 JNZ 0x0014b3d7 CALL 0x0014720c MOV qword ptr [RBX + 0x2008],RAX MOV ECX,dword ptr [RBX + 0x2028] ADD RCX,qword ptr [RBX + 0x2000] CMP RAX,RCX SETLE AL LAB_0014b3d7: ADD RSP,0x8 POP RBX POP RBP RET
bool translog_scanner_eol(long param_1) { bool bVar1; long lVar2; if ((long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000)) < *(long *)(param_1 + 0x2008)) { return false; } bVar1 = true; if (*(char *)(param_1 + 0x202c) == '\0') { lVar2 = translog_get_horizon(); *(long *)(param_1 + 0x2008) = lVar2; bVar1 = lVar2 <= (long)((ulong)*(uint *)(param_1 + 0x2028) + *(long *)(param_1 + 0x2000)); } return bVar1; }
9,086
get_rowpos_in_head_or_tail_page
eloqsql/storage/maria/ma_blockrec.c
static my_bool get_rowpos_in_head_or_tail_page(MARIA_HA *info, const MARIA_BITMAP_BLOCK *block, uchar *buff, uint length, uint page_type, enum pagecache_page_lock lock, uint rownr, struct st_row_pos_info *res) { MARIA_PINNED_PAGE page_link; MARIA_SHARE *share= info->s; uchar *dir; uint block_size= share->block_size; uint max_entry, max_length, rec_offset; DBUG_ENTER("get_rowpos_in_head_or_tail_page"); if (block->org_bitmap_value == 0) /* Empty block */ { /* New page */ make_empty_page(info, buff, page_type, 0); res->empty_space= block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE; } else { page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; buff= pagecache_read(share->pagecache, &info->dfile, block->page, 0, 0, share->page_type, lock, &page_link.link); page_link.changed= buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!page_link.changed) /* Read error */ { _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == (uchar) page_type); if ((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) != (uchar) page_type) goto err; res->empty_space= uint2korr(buff + EMPTY_SPACE_OFFSET); } max_entry= (uint) buff[DIR_COUNT_OFFSET]; if (max_entry <= rownr) { if (extend_directory(info, buff, block_size, max_entry, rownr, &res->empty_space, page_type == HEAD_PAGE)) goto err; } /* The following dir entry is unused in case of insert / update but not in case of undo_update / undo_delete */ dir= dir_entry_pos(buff, block_size, rownr); if (extend_area_on_page(info, buff, dir, rownr, length, &res->empty_space, &rec_offset, &max_length, page_type == HEAD_PAGE)) goto err; res->buff= buff; res->rownr= rownr; res->dir= dir; res->data= buff + rec_offset; res->length= length; DBUG_RETURN(0); err: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); /* File crashed */ DBUG_RETURN(1); }
O3
c
get_rowpos_in_head_or_tail_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, -0x40(%rbp) movl %ecx, -0x2c(%rbp) movq %rdi, %r14 movq (%rdi), %rbx movl 0x7bc(%rbx), %r12d cmpb $0x0, 0x15(%rsi) je 0x50b28 movl %r8d, -0x30(%rbp) leaq -0x60(%rbp), %r15 movl $0x6, 0x8(%r15) movq 0x600(%rbx), %rdi leaq 0x470(%r14), %rax movq (%rsi), %rdx movl 0x7d4(%rbx), %r9d movq %rax, %rsi xorl %ecx, %ecx xorl %r8d, %r8d pushq %r15 pushq $0x4 callq 0x3c546 addq $0x10, %rsp movq %rax, %r13 testq %rax, %rax setne 0x10(%r15) leaq 0x2e8(%r14), %rdi movq %r15, %rsi callq 0x92e56 cmpb $0x0, 0x10(%r15) je 0x50bee movb 0x7(%r13), %al andb $0x7, %al movl -0x30(%rbp), %r8d cmpb %r8b, %al movq -0x40(%rbp), %rbx jne 0x50be4 movzwl 0xa(%r13), %eax jmp 0x50b53 movq %rdx, %r13 movq %r14, %rdi movq %rdx, %rsi movl %r8d, %edx xorl %ecx, %ecx movl %r8d, %r15d callq 0x4ee12 movl %r15d, %r8d movl 0xc18(%rbx), %ecx movl %r12d, %eax subl %ecx, %eax addl $-0x10, %eax movq -0x40(%rbp), %rbx movq 0x10(%rbp), %r15 movl %eax, 0x20(%r15) movzbl 0x8(%r13), %ecx cmpl %ebx, %ecx ja 0x50b99 leaq 0x20(%r15), %r9 xorl %eax, %eax cmpl $0x1, %r8d sete %al subq $0x8, %rsp movq %r14, %rdi movq %r13, %rsi movl %r12d, %edx movl %r8d, %r15d movl %ebx, %r8d pushq %rax callq 0x4eea8 movl %r15d, %r8d movq 0x10(%rbp), %r15 addq $0x10, %rsp testb %al, %al jne 0x50be4 addq %r13, %r12 leal (,%rbx,4), %eax subq %rax, %r12 addq $-0x8, %r12 leaq 0x20(%r15), %r9 xorl %eax, %eax cmpl $0x1, %r8d sete %al subq $0x8, %rsp leaq -0x44(%rbp), %r10 leaq -0x34(%rbp), %r11 movq %r14, %rdi movq %r13, %rsi movq %r12, %rdx movl %ebx, %ecx movl -0x2c(%rbp), %r8d pushq %rax pushq %r10 pushq %r11 callq 0x4f01e addq $0x20, %rsp testb %al, %al je 0x50c0e movq %r14, %rdi movl $0x7f, %esi jmp 0x50bf8 callq 0xa2f56 movl (%rax), %esi movq %r14, %rdi callq 0x410e8 movb $0x1, %al addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, (%r15) movl %ebx, 0x1c(%r15) movq %r12, 0x10(%r15) movl -0x34(%rbp), %eax addq %r13, %rax movq %rax, 0x8(%r15) movl -0x2c(%rbp), %eax movl %eax, 0x18(%r15) xorl %eax, %eax jmp 0x50bff
get_rowpos_in_head_or_tail_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov [rbp+var_40], r9 mov [rbp+var_2C], ecx mov r14, rdi mov rbx, [rdi] mov r12d, [rbx+7BCh] cmp byte ptr [rsi+15h], 0 jz loc_50B28 mov [rbp+var_30], r8d lea r15, [rbp+var_60] mov dword ptr [r15+8], 6 mov rdi, [rbx+600h] lea rax, [r14+470h] mov rdx, [rsi] mov r9d, [rbx+7D4h] mov rsi, rax xor ecx, ecx xor r8d, r8d push r15 push 4 call pagecache_read add rsp, 10h mov r13, rax test rax, rax setnz byte ptr [r15+10h] lea rdi, [r14+2E8h] mov rsi, r15 call insert_dynamic cmp byte ptr [r15+10h], 0 jz loc_50BEE mov al, [r13+7] and al, 7 mov r8d, [rbp+var_30] cmp al, r8b mov rbx, [rbp+var_40] jnz loc_50BE4 movzx eax, word ptr [r13+0Ah] jmp short loc_50B53 loc_50B28: mov r13, rdx mov rdi, r14 mov rsi, rdx mov edx, r8d xor ecx, ecx mov r15d, r8d call make_empty_page mov r8d, r15d mov ecx, [rbx+0C18h] mov eax, r12d sub eax, ecx add eax, 0FFFFFFF0h mov rbx, [rbp+var_40] loc_50B53: mov r15, [rbp+arg_0] mov [r15+20h], eax movzx ecx, byte ptr [r13+8] cmp ecx, ebx ja short loc_50B99 lea r9, [r15+20h] xor eax, eax cmp r8d, 1 setz al sub rsp, 8 mov rdi, r14 mov rsi, r13 mov edx, r12d mov r15d, r8d mov r8d, ebx push rax call extend_directory mov r8d, r15d mov r15, [rbp+arg_0] add rsp, 10h test al, al jnz short loc_50BE4 loc_50B99: add r12, r13 lea eax, ds:0[rbx*4] sub r12, rax add r12, 0FFFFFFFFFFFFFFF8h lea r9, [r15+20h] xor eax, eax cmp r8d, 1 setz al sub rsp, 8 lea r10, [rbp+var_44] lea r11, [rbp+var_34] mov rdi, r14 mov rsi, r13 mov rdx, r12 mov ecx, ebx mov r8d, [rbp+var_2C] push rax push r10 push r11 call extend_area_on_page add rsp, 20h test al, al jz short loc_50C0E loc_50BE4: mov rdi, r14 mov esi, 7Fh jmp short loc_50BF8 loc_50BEE: call _my_thread_var mov esi, [rax] mov rdi, r14 loc_50BF8: call _ma_set_fatal_error mov al, 1 loc_50BFF: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_50C0E: mov [r15], r13 mov [r15+1Ch], ebx mov [r15+10h], r12 mov eax, [rbp+var_34] add rax, r13 mov [r15+8], rax mov eax, [rbp+var_2C] mov [r15+18h], eax xor eax, eax jmp short loc_50BFF
char get_rowpos_in_head_or_tail_page( long long *a1, long long a2, _BYTE *a3, unsigned int a4, int a5, long long a6, long long a7) { long long v8; // rbx long long v9; // r12 long long v10; // r13 long long *v11; // rdi long long v12; // rdx long long v13; // rcx int v14; // r9d long long v15; // r8 unsigned int v16; // ebx int v17; // eax long long v19; // r15 unsigned int v20; // ecx unsigned int v21; // r15d char v22; // al unsigned __int16 *v23; // r12 long long *v24; // rdi int v25; // esi long long v27; // [rsp+0h] [rbp-60h] BYREF int v28; // [rsp+8h] [rbp-58h] bool v29; // [rsp+10h] [rbp-50h] int v30; // [rsp+1Ch] [rbp-44h] BYREF long long v31; // [rsp+20h] [rbp-40h] unsigned int v32; // [rsp+2Ch] [rbp-34h] BYREF unsigned int v33; // [rsp+30h] [rbp-30h] unsigned int v34; // [rsp+34h] [rbp-2Ch] v31 = a6; v34 = a4; v8 = *a1; v9 = *(unsigned int *)(*a1 + 1980); if ( *(_BYTE *)(a2 + 21) ) { v33 = a5; v28 = 6; v10 = pagecache_read( *(_QWORD *)(v8 + 1536), (long long)(a1 + 142), *(_QWORD *)a2, 0, 0LL, *(_DWORD *)(v8 + 2004), 4u, &v27); v29 = v10 != 0; v11 = a1 + 93; insert_dynamic(a1 + 93, &v27); if ( !v29 ) { v25 = *(_DWORD *)my_thread_var(v11); v24 = a1; goto LABEL_11; } v15 = v33; v16 = v31; if ( (*(_BYTE *)(v10 + 7) & 7) != (_BYTE)v33 ) { LABEL_9: v24 = a1; v25 = 127; LABEL_11: ma_set_fatal_error(v24, v25, v12, v13, v15, v14); return 1; } v17 = *(unsigned __int16 *)(v10 + 10); } else { v10 = (long long)a3; make_empty_page((long long)a1, a3, a5, 0); LODWORD(v15) = a5; v17 = v9 - *(_DWORD *)(v8 + 3096) - 16; v16 = v31; } v19 = a7; *(_DWORD *)(a7 + 32) = v17; v20 = *(unsigned __int8 *)(v10 + 8); if ( v20 <= v16 ) { v21 = v15; v22 = extend_directory(a1, v10, v9, v20, v16, (unsigned int *)(a7 + 32), (_DWORD)v15 == 1); v15 = v21; v19 = a7; if ( v22 ) goto LABEL_9; } v23 = (unsigned __int16 *)(v10 + v9 - 4 * v16 - 8); if ( extend_area_on_page((long long)a1, v10, v23, v16, v34, (_DWORD *)(v19 + 32), &v32, &v30, (_DWORD)v15 == 1) ) goto LABEL_9; *(_QWORD *)v19 = v10; *(_DWORD *)(v19 + 28) = v16; *(_QWORD *)(v19 + 16) = v23; *(_QWORD *)(v19 + 8) = v10 + v32; *(_DWORD *)(v19 + 24) = v34; return 0; }
get_rowpos_in_head_or_tail_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV qword ptr [RBP + -0x40],R9 MOV dword ptr [RBP + -0x2c],ECX MOV R14,RDI MOV RBX,qword ptr [RDI] MOV R12D,dword ptr [RBX + 0x7bc] CMP byte ptr [RSI + 0x15],0x0 JZ 0x00150b28 MOV dword ptr [RBP + -0x30],R8D LEA R15,[RBP + -0x60] MOV dword ptr [R15 + 0x8],0x6 MOV RDI,qword ptr [RBX + 0x600] LEA RAX,[R14 + 0x470] MOV RDX,qword ptr [RSI] MOV R9D,dword ptr [RBX + 0x7d4] MOV RSI,RAX XOR ECX,ECX XOR R8D,R8D PUSH R15 PUSH 0x4 CALL 0x0013c546 ADD RSP,0x10 MOV R13,RAX TEST RAX,RAX SETNZ byte ptr [R15 + 0x10] LEA RDI,[R14 + 0x2e8] MOV RSI,R15 CALL 0x00192e56 CMP byte ptr [R15 + 0x10],0x0 JZ 0x00150bee MOV AL,byte ptr [R13 + 0x7] AND AL,0x7 MOV R8D,dword ptr [RBP + -0x30] CMP AL,R8B MOV RBX,qword ptr [RBP + -0x40] JNZ 0x00150be4 MOVZX EAX,word ptr [R13 + 0xa] JMP 0x00150b53 LAB_00150b28: MOV R13,RDX MOV RDI,R14 MOV RSI,RDX MOV EDX,R8D XOR ECX,ECX MOV R15D,R8D CALL 0x0014ee12 MOV R8D,R15D MOV ECX,dword ptr [RBX + 0xc18] MOV EAX,R12D SUB EAX,ECX ADD EAX,-0x10 MOV RBX,qword ptr [RBP + -0x40] LAB_00150b53: MOV R15,qword ptr [RBP + 0x10] MOV dword ptr [R15 + 0x20],EAX MOVZX ECX,byte ptr [R13 + 0x8] CMP ECX,EBX JA 0x00150b99 LEA R9,[R15 + 0x20] XOR EAX,EAX CMP R8D,0x1 SETZ AL SUB RSP,0x8 MOV RDI,R14 MOV RSI,R13 MOV EDX,R12D MOV R15D,R8D MOV R8D,EBX PUSH RAX CALL 0x0014eea8 MOV R8D,R15D MOV R15,qword ptr [RBP + 0x10] ADD RSP,0x10 TEST AL,AL JNZ 0x00150be4 LAB_00150b99: ADD R12,R13 LEA EAX,[RBX*0x4] SUB R12,RAX ADD R12,-0x8 LEA R9,[R15 + 0x20] XOR EAX,EAX CMP R8D,0x1 SETZ AL SUB RSP,0x8 LEA R10,[RBP + -0x44] LEA R11,[RBP + -0x34] MOV RDI,R14 MOV RSI,R13 MOV RDX,R12 MOV ECX,EBX MOV R8D,dword ptr [RBP + -0x2c] PUSH RAX PUSH R10 PUSH R11 CALL 0x0014f01e ADD RSP,0x20 TEST AL,AL JZ 0x00150c0e LAB_00150be4: MOV RDI,R14 MOV ESI,0x7f JMP 0x00150bf8 LAB_00150bee: CALL 0x001a2f56 MOV ESI,dword ptr [RAX] MOV RDI,R14 LAB_00150bf8: CALL 0x001410e8 MOV AL,0x1 LAB_00150bff: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00150c0e: MOV qword ptr [R15],R13 MOV dword ptr [R15 + 0x1c],EBX MOV qword ptr [R15 + 0x10],R12 MOV EAX,dword ptr [RBP + -0x34] ADD RAX,R13 MOV qword ptr [R15 + 0x8],RAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [R15 + 0x18],EAX XOR EAX,EAX JMP 0x00150bff
int8 get_rowpos_in_head_or_tail_page (long *param_1,int8 *param_2,long param_3,int4 param_4,int param_5, ulong param_6,long *param_7) { uint uVar1; ulong uVar2; char cVar3; uint uVar4; int4 *puVar5; int4 uVar6; long lVar7; int1 local_68 [8]; int4 local_60; char local_58; int1 local_4c [4]; ulong local_48; uint local_3c; int local_38; int4 local_34; lVar7 = *param_1; uVar1 = *(uint *)(lVar7 + 0x7bc); local_48 = param_6; local_34 = param_4; if (*(char *)((long)param_2 + 0x15) == '\0') { make_empty_page(param_1,param_3,param_5,0); uVar4 = (uVar1 - *(int *)(lVar7 + 0xc18)) - 0x10; LAB_00150b53: uVar2 = local_48; *(uint *)(param_7 + 4) = uVar4; uVar4 = (uint)local_48; if ((uVar4 < *(byte *)(param_3 + 8)) || (cVar3 = extend_directory(param_1,param_3,(ulong)uVar1,*(byte *)(param_3 + 8), local_48 & 0xffffffff,param_7 + 4,param_5 == 1), cVar3 == '\0')) { lVar7 = (((ulong)uVar1 + param_3) - (ulong)(uVar4 * 4)) + -8; cVar3 = extend_area_on_page(param_1,param_3,lVar7,uVar2 & 0xffffffff,local_34,param_7 + 4, &local_3c,local_4c,param_5 == 1); if (cVar3 == '\0') { *param_7 = param_3; *(uint *)((long)param_7 + 0x1c) = uVar4; param_7[2] = lVar7; param_7[1] = (ulong)local_3c + param_3; *(int4 *)(param_7 + 3) = local_34; return 0; } } } else { local_60 = 6; local_38 = param_5; param_3 = pagecache_read(*(int8 *)(lVar7 + 0x600),param_1 + 0x8e,*param_2,0,0, *(int4 *)(lVar7 + 0x7d4),4,local_68); local_58 = param_3 != 0; insert_dynamic(param_1 + 0x5d,local_68); if (local_58 == '\0') { puVar5 = (int4 *)_my_thread_var(); uVar6 = *puVar5; goto LAB_00150bf8; } if ((*(byte *)(param_3 + 7) & 7) == (byte)local_38) { uVar4 = (uint)*(ushort *)(param_3 + 10); param_5 = local_38; goto LAB_00150b53; } } uVar6 = 0x7f; LAB_00150bf8: _ma_set_fatal_error(param_1,uVar6); return 1; }
9,087
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>::update(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> const&, bool)
llama.cpp/common/json.hpp
void update(const_reference j, bool merge_objects = false) { update(j.begin(), j.end(), merge_objects); }
O3
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>::update(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> const&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %edx, %ebx movq %rsi, %r14 movq %rdi, %r15 leaq 0x28(%rsp), %r12 movq %rsi, (%r12) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r12) movabsq $-0x8000000000000000, %rbp # imm = 0x8000000000000000 movq %rbp, 0x18(%r12) movq %r12, %rdi callq 0x802ca leaq 0x8(%rsp), %r13 movq %r14, (%r13) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%r13) movq %rbp, 0x18(%r13) movq %r13, %rdi callq 0x8033c movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movl %ebx, %ecx callq 0x7f914 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6updateERKSD_b: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebx, edx mov r14, rsi mov r15, rdi lea r12, [rsp+78h+var_50] mov [r12], rsi xorps xmm0, xmm0 movups xmmword ptr [r12+8], xmm0 mov rbp, 8000000000000000h mov [r12+18h], rbp mov rdi, r12 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9set_beginEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::set_begin(void) lea r13, [rsp+78h+var_70] mov [r13+0], r14 xorps xmm0, xmm0 movups xmmword ptr [r13+8], xmm0 mov [r13+18h], rbp mov rdi, r13 call _ZN8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE7set_endEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<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>::set_end(void) mov rdi, r15 mov rsi, r12 mov rdx, r13 mov ecx, ebx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6updateENS0_6detail9iter_implIKSD_EESH_b; 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>::update(nlohmann::json_abi_v3_11_3::detail::iter_impl<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>,nlohmann::json_abi_v3_11_3::detail::iter_impl<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>,bool) add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
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>::update( long long a1, long long a2, unsigned int a3) { long long v5; // [rsp+8h] [rbp-70h] BYREF __int128 v6; // [rsp+10h] [rbp-68h] unsigned long long v7; // [rsp+20h] [rbp-58h] long long v8; // [rsp+28h] [rbp-50h] BYREF __int128 v9; // [rsp+30h] [rbp-48h] unsigned long long v10; // [rsp+40h] [rbp-38h] v8 = a2; v9 = 0LL; v10 = 0x8000000000000000LL; nlohmann::json_abi_v3_11_3::detail::iter_impl<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> const>::set_begin(&v8); v5 = a2; v6 = 0LL; v7 = 0x8000000000000000LL; nlohmann::json_abi_v3_11_3::detail::iter_impl<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> const>::set_end(&v5); return 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>::update( a1, &v8, &v5, a3); }
update: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBX,EDX MOV R14,RSI MOV R15,RDI LEA R12,[RSP + 0x28] MOV qword ptr [R12],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [R12 + 0x8],XMM0 MOV RBP,-0x8000000000000000 MOV qword ptr [R12 + 0x18],RBP MOV RDI,R12 CALL 0x001802ca LEA R13,[RSP + 0x8] MOV qword ptr [R13],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R13 + 0x8],XMM0 MOV qword ptr [R13 + 0x18],RBP MOV RDI,R13 CALL 0x0018033c MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV ECX,EBX CALL 0x0017f914 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* 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>::update(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> const&, bool) */ void __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> ::update(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,basic_json *param_1,bool param_2) { int7 in_register_00000011; basic_json *local_70; int8 local_68; int8 uStack_60; int8 local_58; basic_json *local_50; int8 local_48; int8 uStack_40; int8 local_38; local_48 = 0; uStack_40 = 0; local_38 = 0x8000000000000000; local_50 = param_1; detail:: iter_impl<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>const> ::set_begin((iter_impl<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>const> *)&local_50); local_68 = 0; uStack_60 = 0; local_58 = 0x8000000000000000; local_70 = param_1; detail:: iter_impl<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>const> ::set_end((iter_impl<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>const> *)&local_70); update(this,(iter_impl<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>const> *)&local_50, (iter_impl<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>const> *)&local_70,CONCAT71(in_register_00000011,param_2) & 0xffffffff); return; }
9,088
ggml_threadpool_params_from_cpu_params(cpu_params const&)
monkey531[P]llama/common/common.cpp
struct ggml_threadpool_params ggml_threadpool_params_from_cpu_params(const cpu_params & params) { struct ggml_threadpool_params tpp; ggml_threadpool_params_init(&tpp, params.n_threads); // setup the defaults if (params.mask_valid) { std::memcpy(&tpp.cpumask, &params.cpumask, GGML_MAX_N_THREADS); } tpp.prio = params.priority; tpp.poll = params.poll; tpp.strict_cpu = params.strict_cpu; return tpp; }
O3
cpp
ggml_threadpool_params_from_cpu_params(cpu_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movl (%rsi), %esi callq 0x1b7f0 cmpb $0x1, 0x204(%r14) jne 0x8338b leaq 0x4(%r14), %rsi movl $0x200, %edx # imm = 0x200 movq %rbx, %rdi callq 0x1b750 movl 0x208(%r14), %eax movl %eax, 0x204(%rbx) movl 0x210(%r14), %eax movl %eax, 0x208(%rbx) movb 0x20c(%r14), %al movb %al, 0x20c(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z38ggml_threadpool_params_from_cpu_paramsRK10cpu_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov esi, [rsi] call _ggml_threadpool_params_init cmp byte ptr [r14+204h], 1 jnz short loc_8338B lea rsi, [r14+4] mov edx, 200h mov rdi, rbx call _memcpy loc_8338B: mov eax, [r14+208h] mov [rbx+204h], eax mov eax, [r14+210h] mov [rbx+208h], eax mov al, [r14+20Ch] mov [rbx+20Ch], al mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long ggml_threadpool_params_from_cpu_params(long long a1, unsigned int *a2) { ggml_threadpool_params_init(a1, *a2); if ( *((_BYTE *)a2 + 516) == 1 ) memcpy(a1, a2 + 1, 512LL); *(_DWORD *)(a1 + 516) = a2[130]; *(_DWORD *)(a1 + 520) = a2[132]; *(_BYTE *)(a1 + 524) = *((_BYTE *)a2 + 524); return a1; }
ggml_threadpool_params_from_cpu_params: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV ESI,dword ptr [RSI] CALL 0x0011b7f0 CMP byte ptr [R14 + 0x204],0x1 JNZ 0x0018338b LEA RSI,[R14 + 0x4] MOV EDX,0x200 MOV RDI,RBX CALL 0x0011b750 LAB_0018338b: MOV EAX,dword ptr [R14 + 0x208] MOV dword ptr [RBX + 0x204],EAX MOV EAX,dword ptr [R14 + 0x210] MOV dword ptr [RBX + 0x208],EAX MOV AL,byte ptr [R14 + 0x20c] MOV byte ptr [RBX + 0x20c],AL MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* ggml_threadpool_params_from_cpu_params(cpu_params const&) */ cpu_params * ggml_threadpool_params_from_cpu_params(cpu_params *param_1) { int4 *in_RSI; ggml_threadpool_params_init(param_1,*in_RSI); if (*(char *)(in_RSI + 0x81) == '\x01') { memcpy(param_1,in_RSI + 1,0x200); } *(int4 *)(param_1 + 0x204) = in_RSI[0x82]; *(int4 *)(param_1 + 0x208) = in_RSI[0x84]; param_1[0x20c] = *(cpu_params *)(in_RSI + 0x83); return param_1; }
9,089
ggml_set_loss
llama.cpp/ggml/src/ggml.c
void ggml_set_loss(struct ggml_tensor * tensor) { GGML_ASSERT(ggml_is_scalar(tensor)); GGML_ASSERT(tensor->type == GGML_TYPE_F32); tensor->flags |= GGML_TENSOR_FLAG_LOSS; }
O3
c
ggml_set_loss: pushq %rax cmpq $0x1, 0x10(%rdi) jne 0x22de7 cmpq $0x1, 0x18(%rdi) jne 0x22de7 cmpq $0x1, 0x20(%rdi) jne 0x22de7 cmpq $0x1, 0x28(%rdi) jne 0x22de7 cmpl $0x0, (%rdi) jne 0x22e08 orb $0x8, 0x94(%rdi) popq %rax retq leaq 0x27825(%rip), %rdi # 0x4a613 leaq 0x27859(%rip), %rdx # 0x4a64e leaq 0x28ceb(%rip), %rcx # 0x4bae7 movl $0x18c6, %esi # imm = 0x18C6 xorl %eax, %eax callq 0x17c80 leaq 0x27804(%rip), %rdi # 0x4a613 leaq 0x27838(%rip), %rdx # 0x4a64e leaq 0x28ce1(%rip), %rcx # 0x4bafe movl $0x18c7, %esi # imm = 0x18C7 jmp 0x22e01
ggml_set_loss: push rax cmp qword ptr [rdi+10h], 1 jnz short loc_22DE7 cmp qword ptr [rdi+18h], 1 jnz short loc_22DE7 cmp qword ptr [rdi+20h], 1 jnz short loc_22DE7 cmp qword ptr [rdi+28h], 1 jnz short loc_22DE7 cmp dword ptr [rdi], 0 jnz short loc_22E08 or byte ptr [rdi+94h], 8 pop rax retn loc_22DE7: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsScalarTe; "ggml_is_scalar(tensor)" mov esi, 18C6h loc_22E01: xor eax, eax call _ggml_abort loc_22E08: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorTypeGgml; "tensor->type == GGML_TYPE_F32" mov esi, 18C7h jmp short loc_22E01
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> ggml_set_loss( long long a1, long long a2, long long a3, long long a4, int a5, int a6) { const char *v6; // rcx int v7; // esi if ( *(_QWORD *)(a1 + 16) != 1LL || *(_QWORD *)(a1 + 24) != 1LL || *(_QWORD *)(a1 + 32) != 1LL || *(_QWORD *)(a1 + 40) != 1LL ) { v6 = "ggml_is_scalar(tensor)"; v7 = 6342; goto LABEL_8; } if ( *(_DWORD *)a1 ) { v6 = "tensor->type == GGML_TYPE_F32"; v7 = 6343; LABEL_8: ggml_abort( (unsigned int)"/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c", v7, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v6, a5, a6); } *(_BYTE *)(a1 + 148) |= 8u; }
ggml_set_loss: PUSH RAX CMP qword ptr [RDI + 0x10],0x1 JNZ 0x00122de7 CMP qword ptr [RDI + 0x18],0x1 JNZ 0x00122de7 CMP qword ptr [RDI + 0x20],0x1 JNZ 0x00122de7 CMP qword ptr [RDI + 0x28],0x1 JNZ 0x00122de7 CMP dword ptr [RDI],0x0 JNZ 0x00122e08 OR byte ptr [RDI + 0x94],0x8 POP RAX RET LAB_00122de7: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14bae7] MOV ESI,0x18c6 LAB_00122e01: XOR EAX,EAX CALL 0x00117c80 LAB_00122e08: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14bafe] MOV ESI,0x18c7 JMP 0x00122e01
int8 ggml_set_loss(int *param_1) { int8 in_RAX; char *pcVar1; int8 uVar2; if ((((*(long *)(param_1 + 4) == 1) && (*(long *)(param_1 + 6) == 1)) && (*(long *)(param_1 + 8) == 1)) && (*(long *)(param_1 + 10) == 1)) { if (*param_1 == 0) { *(byte *)(param_1 + 0x25) = *(byte *)(param_1 + 0x25) | 8; return in_RAX; } pcVar1 = "tensor->type == GGML_TYPE_F32"; uVar2 = 0x18c7; } else { pcVar1 = "ggml_is_scalar(tensor)"; uVar2 = 0x18c6; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c",uVar2, "GGML_ASSERT(%s) failed",pcVar1); }
9,090
check_variable
eloqsql/libmariadb/unittest/libmariadb/my_test.h
int check_variable(MYSQL *mysql, const char *variable, const char *value) { char query[MAX_TEST_QUERY_LENGTH]; MYSQL_RES *result; MYSQL_ROW row; sprintf(query, "SELECT %s", variable); result= mysql_store_result(mysql); if (!result) return FAIL; if ((row = mysql_fetch_row(result))) if (strcmp(row[0], value) == 0) { mysql_free_result(result); return OK; } mysql_free_result(result); return FAIL; }
O3
c
check_variable: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x138, %rsp # imm = 0x138 movq %rdx, %rbx movq %rsi, %r8 movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x21213(%rip), %rcx # 0x351af leaq -0x150(%rbp), %rdi movl $0x1, %r14d movl $0x12c, %edx # imm = 0x12C movl $0x1, %esi xorl %eax, %eax callq 0x132a0 movq %r15, %rdi callq 0x1c0f5 testq %rax, %rax je 0x13ff1 movq %rax, %r15 movq %rax, %rdi callq 0x1c2f8 testq %rax, %rax je 0x13fe9 movq (%rax), %rdi movq %rbx, %rsi callq 0x13640 testl %eax, %eax jne 0x13fe9 xorl %r14d, %r14d movq %r15, %rdi callq 0x16eaa movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x14011 movl %r14d, %eax addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x13500
check_variable: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 138h mov rbx, rdx mov r8, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_20], rax lea rcx, aSelectS; "SELECT %s" lea rdi, [rbp+var_150] mov r14d, 1 mov edx, 12Ch mov esi, 1 xor eax, eax call ___sprintf_chk mov rdi, r15 call mysql_store_result test rax, rax jz short loc_13FF1 mov r15, rax mov rdi, rax call mysql_fetch_row test rax, rax jz short loc_13FE9 mov rdi, [rax] mov rsi, rbx call _strcmp test eax, eax jnz short loc_13FE9 xor r14d, r14d loc_13FE9: mov rdi, r15 call mysql_free_result loc_13FF1: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_14011 mov eax, r14d add rsp, 138h pop rbx pop r14 pop r15 pop rbp retn loc_14011: call ___stack_chk_fail
_BOOL8 check_variable(long long a1, const char *a2, long long a3) { BOOL v4; // r14d long long v5; // rax long long v6; // r15 _QWORD *row; // rax _BYTE v9[304]; // [rsp+0h] [rbp-150h] BYREF unsigned long long v10; // [rsp+130h] [rbp-20h] v10 = __readfsqword(0x28u); v4 = 1; __sprintf_chk(v9, 1LL, 300LL, "SELECT %s", a2); v5 = mysql_store_result(a1); if ( v5 ) { v6 = v5; row = (_QWORD *)mysql_fetch_row(v5); if ( row ) v4 = strcmp(*row, a3) != 0; mysql_free_result(v6); } return v4; }
check_variable: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x138 MOV RBX,RDX MOV R8,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RCX,[0x1351af] LEA RDI,[RBP + -0x150] MOV R14D,0x1 MOV EDX,0x12c MOV ESI,0x1 XOR EAX,EAX CALL 0x001132a0 MOV RDI,R15 CALL 0x0011c0f5 TEST RAX,RAX JZ 0x00113ff1 MOV R15,RAX MOV RDI,RAX CALL 0x0011c2f8 TEST RAX,RAX JZ 0x00113fe9 MOV RDI,qword ptr [RAX] MOV RSI,RBX CALL 0x00113640 TEST EAX,EAX JNZ 0x00113fe9 XOR R14D,R14D LAB_00113fe9: MOV RDI,R15 CALL 0x00116eaa LAB_00113ff1: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00114011 MOV EAX,R14D ADD RSP,0x138 POP RBX POP R14 POP R15 POP RBP RET LAB_00114011: CALL 0x00113500
int8 check_variable(int8 param_1,int8 param_2,char *param_3) { int iVar1; long lVar2; int8 *puVar3; int8 uVar4; long in_FS_OFFSET; int1 local_158 [304]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = 1; __sprintf_chk(local_158,1,300,"SELECT %s",param_2); lVar2 = mysql_store_result(param_1); if (lVar2 != 0) { puVar3 = (int8 *)mysql_fetch_row(lVar2); if (puVar3 != (int8 *)0x0) { iVar1 = strcmp((char *)*puVar3,param_3); if (iVar1 == 0) { uVar4 = 0; } } mysql_free_result(lVar2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar4; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
9,091
add_compiled_collation
eloqsql/mysys/charset.c
void add_compiled_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))) { #ifndef DBUG_OFF CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); DBUG_ASSERT(org); DBUG_ASSERT(org->cs_name.str == cs->cs_name.str); DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str)); #endif } }
O0
c
add_compiled_collation: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x333fe movq -0x8(%rbp), %rdx movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, %ecx leaq 0x35aa0f(%rip), %rax # 0x38de20 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 0x35e9f0(%rip), %rdi # 0x391e20 callq 0x361a0 cmpb $0x0, %al je 0x3343b jmp 0x3343b addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
add_compiled_collation: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_333FE: 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_3343B jmp short $+2 loc_3343B: add rsp, 10h pop rbp retn
long long add_compiled_collation(unsigned int *a1) { all_charsets[*a1] = a1; a1[3] |= 0x200u; return my_hash_insert(&charset_name_hash, a1); }
add_compiled_collation: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001333fe LAB_001333fe: MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV ECX,EAX LEA RAX,[0x48de20] 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,[0x491e20] CALL 0x001361a0 CMP AL,0x0 JZ 0x0013343b JMP 0x0013343b LAB_0013343b: ADD RSP,0x10 POP RBP RET
void add_compiled_collation(uint *param_1) { (&all_charsets)[*param_1] = param_1; param_1[3] = param_1[3] | 0x200; my_hash_insert(charset_name_hash,param_1); return; }
9,092
add_compiled_collation
eloqsql/mysys/charset.c
void add_compiled_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))) { #ifndef DBUG_OFF CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); DBUG_ASSERT(org); DBUG_ASSERT(org->cs_name.str == cs->cs_name.str); DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str)); #endif } }
O3
c
add_compiled_collation: pushq %rbp movq %rsp, %rbp movq %rdi, %rsi movl (%rdi), %eax leaq 0x33d7b3(%rip), %rcx # 0x36b270 movq %rdi, (%rcx,%rax,8) orb $0x2, 0xd(%rdi) leaq 0x3417a4(%rip), %rdi # 0x36f270 popq %rbp jmp 0x2f482
add_compiled_collation: push rbp mov rbp, rsp mov rsi, rdi mov eax, [rdi] lea rcx, all_charsets mov [rcx+rax*8], rdi or byte ptr [rdi+0Dh], 2 lea rdi, charset_name_hash pop rbp jmp my_hash_insert
long long add_compiled_collation(unsigned int *a1) { all_charsets[*a1] = a1; *((_BYTE *)a1 + 13) |= 2u; return my_hash_insert(&charset_name_hash, a1); }
add_compiled_collation: PUSH RBP MOV RBP,RSP MOV RSI,RDI MOV EAX,dword ptr [RDI] LEA RCX,[0x46b270] MOV qword ptr [RCX + RAX*0x8],RDI OR byte ptr [RDI + 0xd],0x2 LEA RDI,[0x46f270] POP RBP JMP 0x0012f482
void add_compiled_collation(uint *param_1) { (&all_charsets)[*param_1] = param_1; *(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2; my_hash_insert(charset_name_hash,param_1); return; }
9,093
JS_RegExpDelete
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_RegExpDelete(JSContext *ctx, JSValue this_val, JSValue arg) { JSRegExp *re = js_get_regexp(ctx, this_val, TRUE); JSString *str; JSValue str_val, val; uint8_t *re_bytecode; int ret; uint8_t **capture, *str_buf; int capture_count, shift, re_flags; int next_src_pos, start, end; int64_t last_index; StringBuffer b_s, *b = &b_s; if (!re) return JS_EXCEPTION; string_buffer_init(ctx, b, 0); capture = NULL; str_val = JS_ToString(ctx, arg); if (JS_IsException(str_val)) goto fail; str = JS_VALUE_GET_STRING(str_val); re_bytecode = re->bytecode->u.str8; re_flags = lre_get_flags(re_bytecode); if ((re_flags & (LRE_FLAG_GLOBAL | LRE_FLAG_STICKY)) == 0) { last_index = 0; } else { val = JS_GetProperty(ctx, this_val, JS_ATOM_lastIndex); if (JS_IsException(val) || JS_ToLengthFree(ctx, &last_index, val)) goto fail; } capture_count = lre_get_capture_count(re_bytecode); if (capture_count > 0) { capture = js_malloc(ctx, sizeof(capture[0]) * capture_count * 2); if (!capture) goto fail; } shift = str->is_wide_char; str_buf = str->u.str8; next_src_pos = 0; for (;;) { if (last_index > str->len) break; ret = lre_exec(capture, re_bytecode, str_buf, last_index, str->len, shift, ctx); if (ret != 1) { if (ret >= 0) { if (ret == 2 || (re_flags & (LRE_FLAG_GLOBAL | LRE_FLAG_STICKY))) { if (JS_SetProperty(ctx, this_val, JS_ATOM_lastIndex, js_int32(0)) < 0) goto fail; } } else { JS_ThrowInternalError(ctx, "out of memory in regexp execution"); goto fail; } break; } start = (capture[0] - str_buf) >> shift; end = (capture[1] - str_buf) >> shift; last_index = end; if (next_src_pos < start) { if (string_buffer_concat(b, str, next_src_pos, start)) goto fail; } next_src_pos = end; if (!(re_flags & LRE_FLAG_GLOBAL)) { if (JS_SetProperty(ctx, this_val, JS_ATOM_lastIndex, js_int32(end)) < 0) goto fail; break; } if (end == start) { if (!(re_flags & LRE_FLAG_UNICODE) || (unsigned)end >= str->len || !str->is_wide_char) { end++; } else { string_getc(str, &end); } } last_index = end; } if (string_buffer_concat(b, str, next_src_pos, str->len)) goto fail; JS_FreeValue(ctx, str_val); js_free(ctx, capture); return string_buffer_end(b); fail: JS_FreeValue(ctx, str_val); js_free(ctx, capture); string_buffer_free(b); return JS_EXCEPTION; }
O0
c
JS_RegExpDelete: subq $0x138, %rsp # imm = 0x138 movq %rsi, 0x118(%rsp) movq %rdx, 0x120(%rsp) movq %rcx, 0x108(%rsp) movq %r8, 0x110(%rsp) movq %rdi, 0x100(%rsp) movq 0x100(%rsp), %rdi movq 0x118(%rsp), %rsi movq 0x120(%rsp), %rdx movl $0x1, %ecx callq 0x8a5c0 movq %rax, 0xf8(%rsp) leaq 0x70(%rsp), %rax movq %rax, 0x68(%rsp) cmpq $0x0, 0xf8(%rsp) jne 0x8ad2a movl $0x0, 0x128(%rsp) movq $0x6, 0x130(%rsp) jmp 0x8b2d2 movq 0x100(%rsp), %rdi movq 0x68(%rsp), %rsi xorl %edx, %edx callq 0x56930 movq $0x0, 0xb8(%rsp) movq 0x100(%rsp), %rdi movq 0x108(%rsp), %rsi movq 0x110(%rsp), %rdx callq 0x30030 movq %rax, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq 0x58(%rsp), %rax movq %rax, 0xe0(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xe8(%rsp) movq 0xe0(%rsp), %rdi movq 0xe8(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x8adaa jmp 0x8b27f movq 0xe0(%rsp), %rax movq %rax, 0xf0(%rsp) movq 0xf8(%rsp), %rax movq 0x8(%rax), %rax addq $0x18, %rax movq %rax, 0xc8(%rsp) movq 0xc8(%rsp), %rdi callq 0x103fa0 movl %eax, 0xa4(%rsp) movl 0xa4(%rsp), %eax andl $0x21, %eax cmpl $0x0, %eax jne 0x8ae06 movq $0x0, 0x90(%rsp) jmp 0x8ae97 movq 0x100(%rsp), %rdi movq 0x118(%rsp), %rsi movq 0x120(%rsp), %rdx movl $0x56, %ecx callq 0x30070 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq 0x48(%rsp), %rax movq %rax, 0xd0(%rsp) movq 0x50(%rsp), %rax movq %rax, 0xd8(%rsp) movq 0xd0(%rsp), %rdi movq 0xd8(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax jne 0x8ae90 movq 0x100(%rsp), %rdi movq 0xd0(%rsp), %rdx movq 0xd8(%rsp), %rcx leaq 0x90(%rsp), %rsi callq 0x84540 cmpl $0x0, %eax je 0x8ae95 jmp 0x8b27f jmp 0x8ae97 movq 0xc8(%rsp), %rdi callq 0x1061b0 movl %eax, 0xac(%rsp) cmpl $0x0, 0xac(%rsp) jle 0x8aeeb movq 0x100(%rsp), %rdi movslq 0xac(%rsp), %rsi shlq $0x3, %rsi shlq %rsi callq 0x27fa0 movq %rax, 0xb8(%rsp) cmpq $0x0, 0xb8(%rsp) jne 0x8aee9 jmp 0x8b27f jmp 0x8aeeb movq 0xf0(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax movzbl %al, %eax movl %eax, 0xa8(%rsp) movq 0xf0(%rsp), %rax addq $0x18, %rax movq %rax, 0xb0(%rsp) movl $0x0, 0xa0(%rsp) movq 0x90(%rsp), %rax movq 0xf0(%rsp), %rcx movq 0x4(%rcx), %rcx andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF movl %ecx, %ecx cmpq %rcx, %rax jle 0x8af4f jmp 0x8b1fd movq 0xb8(%rsp), %rdi movq 0xc8(%rsp), %rsi movq 0xb0(%rsp), %rdx movq 0x90(%rsp), %rax movl %eax, %ecx movq 0xf0(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, %r8d movl 0xa8(%rsp), %r9d movq 0x100(%rsp), %rax movq %rax, (%rsp) callq 0x103fb0 movl %eax, 0xc4(%rsp) cmpl $0x1, 0xc4(%rsp) je 0x8b056 cmpl $0x0, 0xc4(%rsp) jl 0x8b02c cmpl $0x2, 0xc4(%rsp) je 0x8afd7 movl 0xa4(%rsp), %eax andl $0x21, %eax cmpl $0x0, %eax je 0x8b02a movq 0x100(%rsp), %rax movq %rax, 0x10(%rsp) xorl %edi, %edi callq 0x39fb0 movq 0x10(%rsp), %rdi movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x118(%rsp), %rsi movq 0x120(%rsp), %rdx movq 0x38(%rsp), %r8 movq 0x40(%rsp), %r9 movl $0x56, %ecx callq 0x381f0 cmpl $0x0, %eax jge 0x8b028 jmp 0x8b27f jmp 0x8b02a jmp 0x8b051 movq 0x100(%rsp), %rdi leaq 0x89da0(%rip), %rsi # 0x114ddb movb $0x0, %al callq 0x337d0 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) jmp 0x8b27f jmp 0x8b1fd movq 0xb8(%rsp), %rax movq (%rax), %rax movq 0xb0(%rsp), %rcx subq %rcx, %rax movl 0xa8(%rsp), %ecx sarq %cl, %rax movl %eax, 0x9c(%rsp) movq 0xb8(%rsp), %rax movq 0x8(%rax), %rax movq 0xb0(%rsp), %rcx subq %rcx, %rax movl 0xa8(%rsp), %ecx sarq %cl, %rax movl %eax, 0x98(%rsp) movslq 0x98(%rsp), %rax movq %rax, 0x90(%rsp) movl 0xa0(%rsp), %eax cmpl 0x9c(%rsp), %eax jge 0x8b0f1 movq 0x68(%rsp), %rdi movq 0xf0(%rsp), %rsi movl 0xa0(%rsp), %edx movl 0x9c(%rsp), %ecx callq 0x75f20 cmpl $0x0, %eax je 0x8b0ef jmp 0x8b27f jmp 0x8b0f1 movl 0x98(%rsp), %eax movl %eax, 0xa0(%rsp) movl 0xa4(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x8b169 movq 0x100(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x98(%rsp), %edi callq 0x39fb0 movq 0x8(%rsp), %rdi movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x118(%rsp), %rsi movq 0x120(%rsp), %rdx movq 0x18(%rsp), %r8 movq 0x20(%rsp), %r9 movl $0x56, %ecx callq 0x381f0 cmpl $0x0, %eax jge 0x8b164 jmp 0x8b27f jmp 0x8b1fd movl 0x98(%rsp), %eax cmpl 0x9c(%rsp), %eax jne 0x8b1e8 movl 0xa4(%rsp), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x8b1be movl 0x98(%rsp), %eax movq 0xf0(%rsp), %rcx movq 0x4(%rcx), %rcx andq $0x7fffffff, %rcx # imm = 0x7FFFFFFF cmpl %ecx, %eax jae 0x8b1be movq 0xf0(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al jne 0x8b1d1 movl 0x98(%rsp), %eax addl $0x1, %eax movl %eax, 0x98(%rsp) jmp 0x8b1e6 movq 0xf0(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x8be50 jmp 0x8b1e8 movslq 0x98(%rsp), %rax movq %rax, 0x90(%rsp) jmp 0x8af28 movq 0x68(%rsp), %rdi movq 0xf0(%rsp), %rsi movl 0xa0(%rsp), %edx movq 0xf0(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, %ecx callq 0x75f20 cmpl $0x0, %eax je 0x8b231 jmp 0x8b27f movq 0x100(%rsp), %rdi movq 0xe0(%rsp), %rsi movq 0xe8(%rsp), %rdx callq 0x29f80 movq 0x100(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x280a0 movq 0x68(%rsp), %rdi callq 0x53df0 movq %rax, 0x128(%rsp) movq %rdx, 0x130(%rsp) jmp 0x8b2d2 movq 0x100(%rsp), %rdi movq 0xe0(%rsp), %rsi movq 0xe8(%rsp), %rdx callq 0x29f80 movq 0x100(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x280a0 movq 0x68(%rsp), %rdi callq 0x587a0 movl $0x0, 0x128(%rsp) movq $0x6, 0x130(%rsp) movq 0x128(%rsp), %rax movq 0x130(%rsp), %rdx addq $0x138, %rsp # imm = 0x138 retq nopw (%rax,%rax)
JS_RegExpDelete: sub rsp, 138h mov [rsp+138h+var_20], rsi mov [rsp+138h+var_18], rdx mov [rsp+138h+var_30], rcx mov [rsp+138h+var_28], r8 mov [rsp+138h+var_38], rdi mov rdi, [rsp+138h+var_38] mov rsi, [rsp+138h+var_20] mov rdx, [rsp+138h+var_18] mov ecx, 1 call js_get_regexp mov [rsp+138h+var_40], rax lea rax, [rsp+138h+var_C8] mov [rsp+138h+var_D0], rax cmp [rsp+138h+var_40], 0 jnz short loc_8AD2A mov dword ptr [rsp+138h+var_10], 0 mov [rsp+138h+var_8], 6 jmp loc_8B2D2 loc_8AD2A: mov rdi, [rsp+138h+var_38] mov rsi, [rsp+138h+var_D0] xor edx, edx call string_buffer_init mov [rsp+138h+var_80], 0 mov rdi, [rsp+138h+var_38] mov rsi, [rsp+138h+var_30] mov rdx, [rsp+138h+var_28] call JS_ToString mov [rsp+138h+var_E0], rax mov [rsp+138h+var_D8], rdx mov rax, [rsp+138h+var_E0] mov [rsp+138h+var_58], rax mov rax, [rsp+138h+var_D8] mov [rsp+138h+var_50], rax mov rdi, [rsp+138h+var_58] mov rsi, [rsp+138h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_8ADAA jmp loc_8B27F loc_8ADAA: mov rax, [rsp+138h+var_58] mov [rsp+138h+var_48], rax mov rax, [rsp+138h+var_40] mov rax, [rax+8] add rax, 18h mov [rsp+138h+var_70], rax mov rdi, [rsp+138h+var_70] call lre_get_flags mov [rsp+138h+var_94], eax mov eax, [rsp+138h+var_94] and eax, 21h cmp eax, 0 jnz short loc_8AE06 mov [rsp+138h+var_A8], 0 jmp loc_8AE97 loc_8AE06: mov rdi, [rsp+138h+var_38] mov rsi, [rsp+138h+var_20] mov rdx, [rsp+138h+var_18] mov ecx, 56h ; 'V' call JS_GetProperty mov [rsp+138h+var_F0], rax mov [rsp+138h+var_E8], rdx mov rax, [rsp+138h+var_F0] mov [rsp+138h+var_68], rax mov rax, [rsp+138h+var_E8] mov [rsp+138h+var_60], rax mov rdi, [rsp+138h+var_68] mov rsi, [rsp+138h+var_60] call JS_IsException_1 cmp eax, 0 jnz short loc_8AE90 mov rdi, [rsp+138h+var_38] mov rdx, [rsp+138h+var_68] mov rcx, [rsp+138h+var_60] lea rsi, [rsp+138h+var_A8] call JS_ToLengthFree cmp eax, 0 jz short loc_8AE95 loc_8AE90: jmp loc_8B27F loc_8AE95: jmp short $+2 loc_8AE97: mov rdi, [rsp+138h+var_70] call lre_get_capture_count mov [rsp+138h+var_8C], eax cmp [rsp+138h+var_8C], 0 jle short loc_8AEEB mov rdi, [rsp+138h+var_38] movsxd rsi, [rsp+138h+var_8C] shl rsi, 3 shl rsi, 1 call js_malloc mov [rsp+138h+var_80], rax cmp [rsp+138h+var_80], 0 jnz short loc_8AEE9 jmp loc_8B27F loc_8AEE9: jmp short $+2 loc_8AEEB: mov rax, [rsp+138h+var_48] mov rax, [rax+4] shr rax, 1Fh and rax, 1 movzx eax, al mov [rsp+138h+var_90], eax mov rax, [rsp+138h+var_48] add rax, 18h mov [rsp+138h+var_88], rax mov [rsp+138h+var_98], 0 loc_8AF28: mov rax, [rsp+138h+var_A8] mov rcx, [rsp+138h+var_48] mov rcx, [rcx+4] and rcx, 7FFFFFFFh mov ecx, ecx cmp rax, rcx jle short loc_8AF4F jmp loc_8B1FD loc_8AF4F: mov rdi, [rsp+138h+var_80] mov rsi, [rsp+138h+var_70] mov rdx, [rsp+138h+var_88] mov rax, [rsp+138h+var_A8] mov ecx, eax mov rax, [rsp+138h+var_48] mov rax, [rax+4] and rax, 7FFFFFFFh mov r8d, eax mov r9d, [rsp+138h+var_90] mov rax, [rsp+138h+var_38] mov [rsp+138h+var_138], rax call lre_exec mov [rsp+138h+var_74], eax cmp [rsp+138h+var_74], 1 jz loc_8B056 cmp [rsp+138h+var_74], 0 jl short loc_8B02C cmp [rsp+138h+var_74], 2 jz short loc_8AFD7 mov eax, [rsp+138h+var_94] and eax, 21h cmp eax, 0 jz short loc_8B02A loc_8AFD7: mov rax, [rsp+138h+var_38] mov [rsp+138h+var_128], rax xor edi, edi call js_int32 mov rdi, [rsp+138h+var_128] mov [rsp+138h+var_100], rax mov [rsp+138h+var_F8], rdx mov rsi, [rsp+138h+var_20] mov rdx, [rsp+138h+var_18] mov r8, [rsp+138h+var_100] mov r9, [rsp+138h+var_F8] mov ecx, 56h ; 'V' call JS_SetProperty cmp eax, 0 jge short loc_8B028 jmp loc_8B27F loc_8B028: jmp short $+2 loc_8B02A: jmp short loc_8B051 loc_8B02C: mov rdi, [rsp+138h+var_38] lea rsi, aOutOfMemoryInR; "out of memory in regexp execution" mov al, 0 call JS_ThrowInternalError mov [rsp+138h+var_110], rax mov [rsp+138h+var_108], rdx jmp loc_8B27F loc_8B051: jmp loc_8B1FD loc_8B056: mov rax, [rsp+138h+var_80] mov rax, [rax] mov rcx, [rsp+138h+var_88] sub rax, rcx mov ecx, [rsp+138h+var_90] sar rax, cl mov [rsp+138h+var_9C], eax mov rax, [rsp+138h+var_80] mov rax, [rax+8] mov rcx, [rsp+138h+var_88] sub rax, rcx mov ecx, [rsp+138h+var_90] sar rax, cl mov [rsp+138h+var_A0], eax movsxd rax, [rsp+138h+var_A0] mov [rsp+138h+var_A8], rax mov eax, [rsp+138h+var_98] cmp eax, [rsp+138h+var_9C] jge short loc_8B0F1 mov rdi, [rsp+138h+var_D0] mov rsi, [rsp+138h+var_48] mov edx, [rsp+138h+var_98] mov ecx, [rsp+138h+var_9C] call string_buffer_concat cmp eax, 0 jz short loc_8B0EF jmp loc_8B27F loc_8B0EF: jmp short $+2 loc_8B0F1: mov eax, [rsp+138h+var_A0] mov [rsp+138h+var_98], eax mov eax, [rsp+138h+var_94] and eax, 1 cmp eax, 0 jnz short loc_8B169 mov rax, [rsp+138h+var_38] mov [rsp+138h+var_130], rax mov edi, [rsp+138h+var_A0] call js_int32 mov rdi, [rsp+138h+var_130] mov [rsp+138h+var_120], rax mov [rsp+138h+var_118], rdx mov rsi, [rsp+138h+var_20] mov rdx, [rsp+138h+var_18] mov r8, [rsp+138h+var_120] mov r9, [rsp+138h+var_118] mov ecx, 56h ; 'V' call JS_SetProperty cmp eax, 0 jge short loc_8B164 jmp loc_8B27F loc_8B164: jmp loc_8B1FD loc_8B169: mov eax, [rsp+138h+var_A0] cmp eax, [rsp+138h+var_9C] jnz short loc_8B1E8 mov eax, [rsp+138h+var_94] and eax, 10h cmp eax, 0 jz short loc_8B1BE mov eax, [rsp+138h+var_A0] mov rcx, [rsp+138h+var_48] mov rcx, [rcx+4] and rcx, 7FFFFFFFh cmp eax, ecx jnb short loc_8B1BE mov rax, [rsp+138h+var_48] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jnz short loc_8B1D1 loc_8B1BE: mov eax, [rsp+138h+var_A0] add eax, 1 mov [rsp+138h+var_A0], eax jmp short loc_8B1E6 loc_8B1D1: mov rdi, [rsp+138h+var_48] lea rsi, [rsp+138h+var_A0] call string_getc loc_8B1E6: jmp short $+2 loc_8B1E8: movsxd rax, [rsp+138h+var_A0] mov [rsp+138h+var_A8], rax jmp loc_8AF28 loc_8B1FD: mov rdi, [rsp+138h+var_D0] mov rsi, [rsp+138h+var_48] mov edx, [rsp+138h+var_98] mov rax, [rsp+138h+var_48] mov rax, [rax+4] and rax, 7FFFFFFFh mov ecx, eax call string_buffer_concat cmp eax, 0 jz short loc_8B231 jmp short loc_8B27F loc_8B231: mov rdi, [rsp+138h+var_38] mov rsi, [rsp+138h+var_58] mov rdx, [rsp+138h+var_50] call JS_FreeValue mov rdi, [rsp+138h+var_38] mov rsi, [rsp+138h+var_80] call js_free mov rdi, [rsp+138h+var_D0] call string_buffer_end mov [rsp+138h+var_10], rax mov [rsp+138h+var_8], rdx jmp short loc_8B2D2 loc_8B27F: mov rdi, [rsp+138h+var_38] mov rsi, [rsp+138h+var_58] mov rdx, [rsp+138h+var_50] call JS_FreeValue mov rdi, [rsp+138h+var_38] mov rsi, [rsp+138h+var_80] call js_free mov rdi, [rsp+138h+var_D0] call string_buffer_free mov dword ptr [rsp+138h+var_10], 0 mov [rsp+138h+var_8], 6 loc_8B2D2: mov rax, [rsp+138h+var_10] mov rdx, [rsp+138h+var_8] add rsp, 138h retn
long long JS_RegExpDelete( long long a1, long long a2, long long a3, long long a4, long long a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { long long v13; // rcx long long v14; // r8 long long v15; // r9 long long v16; // rdx long long v17; // rdx long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 int v24; // edx int v25; // edx long long v26; // rdx char v28; // [rsp+0h] [rbp-138h] int v29; // [rsp+8h] [rbp-130h] int v30; // [rsp+10h] [rbp-128h] int v31; // [rsp+18h] [rbp-120h] int v32; // [rsp+38h] [rbp-100h] long long v33[4]; // [rsp+70h] [rbp-C8h] BYREF long long v34; // [rsp+90h] [rbp-A8h] BYREF unsigned int v35; // [rsp+98h] [rbp-A0h] BYREF signed int v36; // [rsp+9Ch] [rbp-9Ch] signed int v37; // [rsp+A0h] [rbp-98h] int flags; // [rsp+A4h] [rbp-94h] int v39; // [rsp+A8h] [rbp-90h] int capture_count; // [rsp+ACh] [rbp-8Ch] long long v41; // [rsp+B0h] [rbp-88h] _QWORD *v42; // [rsp+B8h] [rbp-80h] int v43; // [rsp+C4h] [rbp-74h] long long v44; // [rsp+C8h] [rbp-70h] _DWORD *Property; // [rsp+D0h] [rbp-68h] long long v46; // [rsp+D8h] [rbp-60h] long long v47; // [rsp+E0h] [rbp-58h] long long v48; // [rsp+E8h] [rbp-50h] long long v49; // [rsp+F0h] [rbp-48h] long long regexp; // [rsp+F8h] [rbp-40h] long long v51; // [rsp+100h] [rbp-38h] long long v52; // [rsp+108h] [rbp-30h] long long v53; // [rsp+110h] [rbp-28h] long long v54; // [rsp+118h] [rbp-20h] long long v55; // [rsp+120h] [rbp-18h] long long v56; // [rsp+128h] [rbp-10h] long long v57; // [rsp+130h] [rbp-8h] v54 = a2; v55 = a3; v52 = a4; v53 = a5; v51 = a1; regexp = js_get_regexp(a1, a2, a3, 1); if ( !regexp ) { LODWORD(v56) = 0; v57 = 6LL; return v56; } string_buffer_init(v51, (long long)v33, 0); v42 = 0LL; v47 = JS_ToString(v51, v52, v53, v13, v14, v15); v48 = v16; if ( JS_IsException_1(v47, v16) ) goto LABEL_34; v49 = v47; v44 = *(_QWORD *)(regexp + 8) + 24LL; flags = lre_get_flags(v44); if ( (flags & 0x21) != 0 ) { Property = (_DWORD *)JS_GetProperty(v51, v54, v55, 86); v46 = v17; if ( JS_IsException_1((long long)Property, v17) || (unsigned int)JS_ToLengthFree(v51, &v34, Property, v46) ) goto LABEL_34; } else { v34 = 0LL; } capture_count = lre_get_capture_count(v44); if ( capture_count > 0 ) { v42 = (_QWORD *)js_malloc(v51, 16LL * capture_count); if ( !v42 ) { LABEL_34: JS_FreeValue(v51, v47, v48); js_free(v51, (long long)v42); string_buffer_free(v33); LODWORD(v56) = 0; v57 = 6LL; return v56; } } v39 = (*(_QWORD *)(v49 + 4) & 0x80000000LL) != 0; v41 = v49 + 24; v37 = 0; while ( v34 <= (*(_QWORD *)(v49 + 4) & 0x7FFFFFFFLL) ) { v43 = lre_exec((_DWORD)v42, v44, v41, v34, *(_DWORD *)(v49 + 4) & 0x7FFFFFFF, v39, v51); if ( v43 != 1 ) { if ( v43 < 0 ) { JS_ThrowInternalError( v51, (long long)"out of memory in regexp execution", v18, v19, v20, v21, a6, a7, a8, a9, v22, v23, a12, a13, v28); goto LABEL_34; } if ( v43 == 2 || (flags & 0x21) != 0 ) { v30 = v51; v32 = js_int32(0); if ( (int)JS_SetProperty(v30, v54, v55, 86, v32, v24) < 0 ) goto LABEL_34; } break; } v36 = (*v42 - v41) >> v39; v35 = (v42[1] - v41) >> v39; v34 = (int)v35; if ( v37 < v36 && (unsigned int)string_buffer_concat((long long)v33, v49, v37, v36) ) goto LABEL_34; v37 = v35; if ( (flags & 1) == 0 ) { v29 = v51; v31 = js_int32(v35); if ( (int)JS_SetProperty(v29, v54, v55, 86, v31, v25) < 0 ) goto LABEL_34; break; } if ( v35 == v36 ) { if ( (flags & 0x10) != 0 && v35 < (*(_DWORD *)(v49 + 4) & 0x7FFFFFFFu) && (*(_QWORD *)(v49 + 4) & 0x80000000LL) != 0 ) { string_getc(v49, &v35); } else { ++v35; } } v34 = (int)v35; } if ( (unsigned int)string_buffer_concat((long long)v33, v49, v37, *(_DWORD *)(v49 + 4) & 0x7FFFFFFF) ) goto LABEL_34; JS_FreeValue(v51, v47, v48); js_free(v51, (long long)v42); v56 = string_buffer_end((long long)v33); v57 = v26; return v56; }
JS_RegExpDelete: SUB RSP,0x138 MOV qword ptr [RSP + 0x118],RSI MOV qword ptr [RSP + 0x120],RDX MOV qword ptr [RSP + 0x108],RCX MOV qword ptr [RSP + 0x110],R8 MOV qword ptr [RSP + 0x100],RDI MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x118] MOV RDX,qword ptr [RSP + 0x120] MOV ECX,0x1 CALL 0x0018a5c0 MOV qword ptr [RSP + 0xf8],RAX LEA RAX,[RSP + 0x70] MOV qword ptr [RSP + 0x68],RAX CMP qword ptr [RSP + 0xf8],0x0 JNZ 0x0018ad2a MOV dword ptr [RSP + 0x128],0x0 MOV qword ptr [RSP + 0x130],0x6 JMP 0x0018b2d2 LAB_0018ad2a: MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x68] XOR EDX,EDX CALL 0x00156930 MOV qword ptr [RSP + 0xb8],0x0 MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x108] MOV RDX,qword ptr [RSP + 0x110] CALL 0x00130030 MOV qword ptr [RSP + 0x58],RAX MOV qword ptr [RSP + 0x60],RDX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xe0],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xe8],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xe8] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x0018adaa JMP 0x0018b27f LAB_0018adaa: MOV RAX,qword ptr [RSP + 0xe0] MOV qword ptr [RSP + 0xf0],RAX MOV RAX,qword ptr [RSP + 0xf8] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,0x18 MOV qword ptr [RSP + 0xc8],RAX MOV RDI,qword ptr [RSP + 0xc8] CALL 0x00203fa0 MOV dword ptr [RSP + 0xa4],EAX MOV EAX,dword ptr [RSP + 0xa4] AND EAX,0x21 CMP EAX,0x0 JNZ 0x0018ae06 MOV qword ptr [RSP + 0x90],0x0 JMP 0x0018ae97 LAB_0018ae06: MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x118] MOV RDX,qword ptr [RSP + 0x120] MOV ECX,0x56 CALL 0x00130070 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xd0],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xd8],RAX MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0xd8] CALL 0x00129fb0 CMP EAX,0x0 JNZ 0x0018ae90 MOV RDI,qword ptr [RSP + 0x100] MOV RDX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RSP + 0xd8] LEA RSI,[RSP + 0x90] CALL 0x00184540 CMP EAX,0x0 JZ 0x0018ae95 LAB_0018ae90: JMP 0x0018b27f LAB_0018ae95: JMP 0x0018ae97 LAB_0018ae97: MOV RDI,qword ptr [RSP + 0xc8] CALL 0x002061b0 MOV dword ptr [RSP + 0xac],EAX CMP dword ptr [RSP + 0xac],0x0 JLE 0x0018aeeb MOV RDI,qword ptr [RSP + 0x100] MOVSXD RSI,dword ptr [RSP + 0xac] SHL RSI,0x3 SHL RSI,0x1 CALL 0x00127fa0 MOV qword ptr [RSP + 0xb8],RAX CMP qword ptr [RSP + 0xb8],0x0 JNZ 0x0018aee9 JMP 0x0018b27f LAB_0018aee9: JMP 0x0018aeeb LAB_0018aeeb: MOV RAX,qword ptr [RSP + 0xf0] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 MOVZX EAX,AL MOV dword ptr [RSP + 0xa8],EAX MOV RAX,qword ptr [RSP + 0xf0] ADD RAX,0x18 MOV qword ptr [RSP + 0xb0],RAX MOV dword ptr [RSP + 0xa0],0x0 LAB_0018af28: MOV RAX,qword ptr [RSP + 0x90] MOV RCX,qword ptr [RSP + 0xf0] MOV RCX,qword ptr [RCX + 0x4] AND RCX,0x7fffffff MOV ECX,ECX CMP RAX,RCX JLE 0x0018af4f JMP 0x0018b1fd LAB_0018af4f: MOV RDI,qword ptr [RSP + 0xb8] MOV RSI,qword ptr [RSP + 0xc8] MOV RDX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0x90] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0xf0] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV R8D,EAX MOV R9D,dword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP],RAX CALL 0x00203fb0 MOV dword ptr [RSP + 0xc4],EAX CMP dword ptr [RSP + 0xc4],0x1 JZ 0x0018b056 CMP dword ptr [RSP + 0xc4],0x0 JL 0x0018b02c CMP dword ptr [RSP + 0xc4],0x2 JZ 0x0018afd7 MOV EAX,dword ptr [RSP + 0xa4] AND EAX,0x21 CMP EAX,0x0 JZ 0x0018b02a LAB_0018afd7: MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x10],RAX XOR EDI,EDI CALL 0x00139fb0 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RSI,qword ptr [RSP + 0x118] MOV RDX,qword ptr [RSP + 0x120] MOV R8,qword ptr [RSP + 0x38] MOV R9,qword ptr [RSP + 0x40] MOV ECX,0x56 CALL 0x001381f0 CMP EAX,0x0 JGE 0x0018b028 JMP 0x0018b27f LAB_0018b028: JMP 0x0018b02a LAB_0018b02a: JMP 0x0018b051 LAB_0018b02c: MOV RDI,qword ptr [RSP + 0x100] LEA RSI,[0x214ddb] MOV AL,0x0 CALL 0x001337d0 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX JMP 0x0018b27f LAB_0018b051: JMP 0x0018b1fd LAB_0018b056: MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RSP + 0xb0] SUB RAX,RCX MOV ECX,dword ptr [RSP + 0xa8] SAR RAX,CL MOV dword ptr [RSP + 0x9c],EAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0xb0] SUB RAX,RCX MOV ECX,dword ptr [RSP + 0xa8] SAR RAX,CL MOV dword ptr [RSP + 0x98],EAX MOVSXD RAX,dword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x90],RAX MOV EAX,dword ptr [RSP + 0xa0] CMP EAX,dword ptr [RSP + 0x9c] JGE 0x0018b0f1 MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0xf0] MOV EDX,dword ptr [RSP + 0xa0] MOV ECX,dword ptr [RSP + 0x9c] CALL 0x00175f20 CMP EAX,0x0 JZ 0x0018b0ef JMP 0x0018b27f LAB_0018b0ef: JMP 0x0018b0f1 LAB_0018b0f1: MOV EAX,dword ptr [RSP + 0x98] MOV dword ptr [RSP + 0xa0],EAX MOV EAX,dword ptr [RSP + 0xa4] AND EAX,0x1 CMP EAX,0x0 JNZ 0x0018b169 MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x8],RAX MOV EDI,dword ptr [RSP + 0x98] CALL 0x00139fb0 MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RSI,qword ptr [RSP + 0x118] MOV RDX,qword ptr [RSP + 0x120] MOV R8,qword ptr [RSP + 0x18] MOV R9,qword ptr [RSP + 0x20] MOV ECX,0x56 CALL 0x001381f0 CMP EAX,0x0 JGE 0x0018b164 JMP 0x0018b27f LAB_0018b164: JMP 0x0018b1fd LAB_0018b169: MOV EAX,dword ptr [RSP + 0x98] CMP EAX,dword ptr [RSP + 0x9c] JNZ 0x0018b1e8 MOV EAX,dword ptr [RSP + 0xa4] AND EAX,0x10 CMP EAX,0x0 JZ 0x0018b1be MOV EAX,dword ptr [RSP + 0x98] MOV RCX,qword ptr [RSP + 0xf0] MOV RCX,qword ptr [RCX + 0x4] AND RCX,0x7fffffff CMP EAX,ECX JNC 0x0018b1be MOV RAX,qword ptr [RSP + 0xf0] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JNZ 0x0018b1d1 LAB_0018b1be: MOV EAX,dword ptr [RSP + 0x98] ADD EAX,0x1 MOV dword ptr [RSP + 0x98],EAX JMP 0x0018b1e6 LAB_0018b1d1: MOV RDI,qword ptr [RSP + 0xf0] LEA RSI,[RSP + 0x98] CALL 0x0018be50 LAB_0018b1e6: JMP 0x0018b1e8 LAB_0018b1e8: MOVSXD RAX,dword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x90],RAX JMP 0x0018af28 LAB_0018b1fd: MOV RDI,qword ptr [RSP + 0x68] MOV RSI,qword ptr [RSP + 0xf0] MOV EDX,dword ptr [RSP + 0xa0] MOV RAX,qword ptr [RSP + 0xf0] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV ECX,EAX CALL 0x00175f20 CMP EAX,0x0 JZ 0x0018b231 JMP 0x0018b27f LAB_0018b231: MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0xe0] MOV RDX,qword ptr [RSP + 0xe8] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x001280a0 MOV RDI,qword ptr [RSP + 0x68] CALL 0x00153df0 MOV qword ptr [RSP + 0x128],RAX MOV qword ptr [RSP + 0x130],RDX JMP 0x0018b2d2 LAB_0018b27f: MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0xe0] MOV RDX,qword ptr [RSP + 0xe8] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x001280a0 MOV RDI,qword ptr [RSP + 0x68] CALL 0x001587a0 MOV dword ptr [RSP + 0x128],0x0 MOV qword ptr [RSP + 0x130],0x6 LAB_0018b2d2: MOV RAX,qword ptr [RSP + 0x128] MOV RDX,qword ptr [RSP + 0x130] ADD RSP,0x138 RET
int1 [16] JS_RegExpDelete(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { int8 uVar1; int iVar2; ulong uVar3; int1 auVar4 [16]; int1 local_c8 [32]; ulong local_a8; uint local_a0; uint local_9c; uint local_98; uint local_94; uint local_90; int local_8c; long local_88; long *local_80; int local_74; long local_70; int1 local_68 [16]; int1 local_58 [16]; long local_48; long local_40; int8 local_38; int8 local_30; int8 local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_38 = param_1; local_30 = param_4; local_28 = param_5; local_20 = param_2; local_18 = param_3; local_40 = js_get_regexp(param_1,param_2,param_3,1); if (local_40 == 0) { local_10 = 0; local_8 = 6; goto LAB_0018b2d2; } string_buffer_init(local_38,local_c8,0); local_80 = (long *)0x0; local_58 = JS_ToString(local_38,local_30,local_28); iVar2 = JS_IsException(local_58._0_8_,local_58._8_8_); if (iVar2 == 0) { local_48 = local_58._0_8_; local_70 = *(long *)(local_40 + 8) + 0x18; local_94 = lre_get_flags(local_70); if ((local_94 & 0x21) == 0) { local_a8 = 0; LAB_0018ae97: local_8c = lre_get_capture_count(local_70); if (0 < local_8c) { local_80 = (long *)js_malloc(local_38,(long)local_8c << 4); if (local_80 == (long *)0x0) goto LAB_0018b27f; } local_90 = (uint)((byte)(*(ulong *)(local_48 + 4) >> 0x1f) & 1); local_88 = local_48 + 0x18; local_98 = 0; while ((long)local_a8 <= (long)(ulong)((uint)*(int8 *)(local_48 + 4) & 0x7fffffff)) { local_74 = lre_exec(local_80,local_70,local_88,local_a8 & 0xffffffff, (uint)*(int8 *)(local_48 + 4) & 0x7fffffff,local_90,local_38); uVar1 = local_38; if (local_74 != 1) { if (local_74 < 0) { JS_ThrowInternalError(local_38,"out of memory in regexp execution"); goto LAB_0018b27f; } if ((local_74 == 2) || ((local_94 & 0x21) != 0)) { auVar4 = js_int32(0); iVar2 = JS_SetProperty(uVar1,local_20,local_18,0x56,auVar4._0_8_,auVar4._8_8_); joined_r0x0018b021: if (iVar2 < 0) goto LAB_0018b27f; } break; } uVar3 = *local_80 - local_88 >> ((byte)local_90 & 0x3f); local_9c = (uint)uVar3; local_a0 = (uint)(local_80[1] - local_88 >> ((byte)local_90 & 0x3f)); local_a8 = (ulong)(int)local_a0; if ((int)local_98 < (int)local_9c) { iVar2 = string_buffer_concat(local_c8,local_48,local_98,uVar3 & 0xffffffff); if (iVar2 != 0) goto LAB_0018b27f; } uVar1 = local_38; local_98 = local_a0; if ((local_94 & 1) == 0) { auVar4 = js_int32(local_a0); iVar2 = JS_SetProperty(uVar1,local_20,local_18,0x56,auVar4._0_8_,auVar4._8_8_); goto joined_r0x0018b021; } if (local_a0 == local_9c) { if ((((local_94 & 0x10) == 0) || (((uint)*(int8 *)(local_48 + 4) & 0x7fffffff) <= local_a0)) || ((*(ulong *)(local_48 + 4) >> 0x1f & 1) == 0)) { local_a0 = local_a0 + 1; } else { string_getc(local_48,&local_a0); } } local_a8 = (ulong)(int)local_a0; } iVar2 = string_buffer_concat (local_c8,local_48,local_98,(uint)*(int8 *)(local_48 + 4) & 0x7fffffff ); if (iVar2 == 0) { JS_FreeValue(local_38,local_58._0_8_,local_58._8_8_); js_free(local_38,local_80); auVar4 = string_buffer_end(local_c8); local_8 = auVar4._8_8_; local_10 = auVar4._0_4_; uStack_c = auVar4._4_4_; goto LAB_0018b2d2; } } else { local_68 = JS_GetProperty(local_38,local_20,local_18,0x56); iVar2 = JS_IsException(local_68._0_8_,local_68._8_8_); if (iVar2 == 0) { iVar2 = JS_ToLengthFree(local_38,&local_a8,local_68._0_8_,local_68._8_8_); if (iVar2 == 0) goto LAB_0018ae97; } } } LAB_0018b27f: JS_FreeValue(local_38,local_58._0_8_,local_58._8_8_); js_free(local_38,local_80); string_buffer_free(local_c8); local_10 = 0; local_8 = 6; LAB_0018b2d2: auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
9,094
ma_tls_async_check_result
eloqsql/libmariadb/libmariadb/secure/openssl.c
static my_bool ma_tls_async_check_result(int res, struct mysql_async_context *b, SSL *ssl) { int ssl_err; b->events_to_wait_for= 0; if (res >= 0) return 1; ssl_err= SSL_get_error(ssl, res); if (ssl_err == SSL_ERROR_WANT_READ) b->events_to_wait_for|= MYSQL_WAIT_READ; else if (ssl_err == SSL_ERROR_WANT_WRITE) b->events_to_wait_for|= MYSQL_WAIT_WRITE; else return 1; if (b->suspend_resume_hook) (*b->suspend_resume_hook)(TRUE, b->suspend_resume_hook_user_data); my_context_yield(&b->async_context); if (b->suspend_resume_hook) (*b->suspend_resume_hook)(FALSE, b->suspend_resume_hook_user_data); return 0; }
O3
c
ma_tls_async_check_result: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movl $0x0, (%rsi) movb $0x1, %r14b testl %edi, %edi js 0x39c19 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq movl %edi, %esi movq %rdx, %rdi callq 0x14050 cmpl $0x2, %eax je 0x39c34 cmpl $0x3, %eax jne 0x39c11 movl $0x2, %eax jmp 0x39c39 movl $0x1, %eax orl %eax, (%rbx) movq 0x20(%rbx), %rax testq %rax, %rax je 0x39c4f movq 0x28(%rbx), %rsi movl $0x1, %edi callq *%rax leaq 0x38(%rbx), %rdi callq 0x3f041 movq 0x20(%rbx), %rax testq %rax, %rax je 0x39c6e movq 0x28(%rbx), %rsi xorl %r14d, %r14d xorl %edi, %edi callq *%rax jmp 0x39c11 xorl %r14d, %r14d jmp 0x39c11
ma_tls_async_check_result: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov dword ptr [rsi], 0 mov r14b, 1 test edi, edi js short loc_39C19 loc_39C11: mov eax, r14d pop rbx pop r14 pop rbp retn loc_39C19: mov esi, edi mov rdi, rdx call _SSL_get_error cmp eax, 2 jz short loc_39C34 cmp eax, 3 jnz short loc_39C11 mov eax, 2 jmp short loc_39C39 loc_39C34: mov eax, 1 loc_39C39: or [rbx], eax mov rax, [rbx+20h] test rax, rax jz short loc_39C4F mov rsi, [rbx+28h] mov edi, 1 call rax loc_39C4F: lea rdi, [rbx+38h] call my_context_yield mov rax, [rbx+20h] test rax, rax jz short loc_39C6E mov rsi, [rbx+28h] xor r14d, r14d xor edi, edi call rax jmp short loc_39C11 loc_39C6E: xor r14d, r14d jmp short loc_39C11
long long ma_tls_async_check_result(int a1, long long a2, long long a3) { unsigned int v3; // r14d int error; // eax int v6; // eax void ( *v7)(long long, _QWORD); // rax void ( *v8)(_QWORD, _QWORD); // rax *(_DWORD *)a2 = 0; LOBYTE(v3) = 1; if ( a1 < 0 ) { error = SSL_get_error(a3, (unsigned int)a1); if ( error == 2 ) { v6 = 1; } else { if ( error != 3 ) return v3; v6 = 2; } *(_DWORD *)a2 |= v6; v7 = *(void ( **)(long long, _QWORD))(a2 + 32); if ( v7 ) v7(1LL, *(_QWORD *)(a2 + 40)); my_context_yield(a2 + 56); v8 = *(void ( **)(_QWORD, _QWORD))(a2 + 32); v3 = 0; if ( v8 ) v8(0LL, *(_QWORD *)(a2 + 40)); } return v3; }
ma_tls_async_check_result: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV dword ptr [RSI],0x0 MOV R14B,0x1 TEST EDI,EDI JS 0x00139c19 LAB_00139c11: MOV EAX,R14D POP RBX POP R14 POP RBP RET LAB_00139c19: MOV ESI,EDI MOV RDI,RDX CALL 0x00114050 CMP EAX,0x2 JZ 0x00139c34 CMP EAX,0x3 JNZ 0x00139c11 MOV EAX,0x2 JMP 0x00139c39 LAB_00139c34: MOV EAX,0x1 LAB_00139c39: OR dword ptr [RBX],EAX MOV RAX,qword ptr [RBX + 0x20] TEST RAX,RAX JZ 0x00139c4f MOV RSI,qword ptr [RBX + 0x28] MOV EDI,0x1 CALL RAX LAB_00139c4f: LEA RDI,[RBX + 0x38] CALL 0x0013f041 MOV RAX,qword ptr [RBX + 0x20] TEST RAX,RAX JZ 0x00139c6e MOV RSI,qword ptr [RBX + 0x28] XOR R14D,R14D XOR EDI,EDI CALL RAX JMP 0x00139c11 LAB_00139c6e: XOR R14D,R14D JMP 0x00139c11
ulong ma_tls_async_check_result(int param_1,uint *param_2,SSL *param_3) { int iVar1; uint uVar2; int8 unaff_R14; ulong uVar3; *param_2 = 0; uVar3 = CONCAT71((int7)((ulong)unaff_R14 >> 8),1); if (param_1 < 0) { iVar1 = SSL_get_error(param_3,param_1); if (iVar1 == 2) { uVar2 = 1; } else { if (iVar1 != 3) goto LAB_00139c11; uVar2 = 2; } *param_2 = *param_2 | uVar2; if (*(code **)(param_2 + 8) != (code *)0x0) { (**(code **)(param_2 + 8))(1,*(int8 *)(param_2 + 10)); } my_context_yield(param_2 + 0xe); if (*(code **)(param_2 + 8) == (code *)0x0) { uVar3 = 0; } else { uVar3 = 0; (**(code **)(param_2 + 8))(0,*(int8 *)(param_2 + 10)); } } LAB_00139c11: return uVar3 & 0xffffffff; }
9,095
bitmap_is_overlapping
eloqsql/mysys/my_bitmap.c
my_bool bitmap_is_overlapping(const MY_BITMAP *map1, const MY_BITMAP *map2) { my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end; DBUG_ASSERT(map1->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map1->n_bits==map2->n_bits); end= map1->last_word_ptr; while (m1 < end) { if ((*m1++) & (*m2++)) return 1; } /* here both maps have the same number of bits - see assert above */ return ((*m1 & *m2 & ~map1->last_word_mask) ? 1 : 0); }
O3
c
bitmap_is_overlapping: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x8(%rdi), %rdx movq (%rsi), %rcx cmpq %rdx, %rax jae 0xa4e56 leaq 0x4(%rax), %rsi movl (%rcx), %r8d addq $0x4, %rcx testl %r8d, (%rax) movq %rsi, %rax je 0xa4e3a movb $0x1, %al jmp 0xa4e64 movl (%rcx), %ecx andl (%rax), %ecx movl 0x18(%rdi), %eax notl %eax testl %eax, %ecx setne %al popq %rbp retq
bitmap_is_overlapping: push rbp mov rbp, rsp mov rax, [rdi] mov rdx, [rdi+8] mov rcx, [rsi] loc_A4E3A: cmp rax, rdx jnb short loc_A4E56 lea rsi, [rax+4] mov r8d, [rcx] add rcx, 4 test [rax], r8d mov rax, rsi jz short loc_A4E3A mov al, 1 jmp short loc_A4E64 loc_A4E56: mov ecx, [rcx] and ecx, [rax] mov eax, [rdi+18h] not eax test ecx, eax setnz al loc_A4E64: pop rbp retn
bool bitmap_is_overlapping(long long a1, int **a2) { _DWORD *v2; // rax int *v3; // rcx int v4; // r8d v2 = *(_DWORD **)a1; v3 = *a2; while ( (unsigned long long)v2 < *(_QWORD *)(a1 + 8) ) { v4 = *v3++; if ( (v4 & *v2++) != 0 ) return 1; } return (~*(_DWORD *)(a1 + 24) & *v2 & *v3) != 0; }
bitmap_is_overlapping: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RSI] LAB_001a4e3a: CMP RAX,RDX JNC 0x001a4e56 LEA RSI,[RAX + 0x4] MOV R8D,dword ptr [RCX] ADD RCX,0x4 TEST dword ptr [RAX],R8D MOV RAX,RSI JZ 0x001a4e3a MOV AL,0x1 JMP 0x001a4e64 LAB_001a4e56: MOV ECX,dword ptr [RCX] AND ECX,dword ptr [RAX] MOV EAX,dword ptr [RDI + 0x18] NOT EAX TEST ECX,EAX SETNZ AL LAB_001a4e64: POP RBP RET
ulong bitmap_is_overlapping(int8 *param_1,int8 *param_2) { uint *puVar1; uint uVar2; uint uVar3; uint *puVar4; uint *puVar5; puVar5 = (uint *)*param_2; puVar4 = (uint *)*param_1; do { if ((uint *)param_1[1] <= puVar4) { return (ulong)CONCAT31((int3)(~*(uint *)(param_1 + 3) >> 8), (*puVar5 & *puVar4 & ~*(uint *)(param_1 + 3)) != 0); } puVar1 = puVar4 + 1; uVar2 = *puVar5; puVar5 = puVar5 + 1; uVar3 = *puVar4; puVar4 = puVar1; } while ((uVar3 & uVar2) == 0); return CONCAT71((int7)((ulong)puVar1 >> 8),1); }
9,096
select_keccakf1600_implementation
corpus-core[P]colibri-stateless/build_O3/_deps/ethhash_external-src/lib/keccak/keccak.c
__attribute__((constructor)) static void select_keccakf1600_implementation(void) { // Init CPU information. // This is needed on macOS because of the bug: https://bugs.llvm.org/show_bug.cgi?id=48459. __builtin_cpu_init(); // Check if both BMI and BMI2 are supported. Some CPUs like Intel E5-2697 v2 incorrectly // report BMI2 but not BMI being available. if (__builtin_cpu_supports("bmi") && __builtin_cpu_supports("bmi2")) keccakf1600_best = keccakf1600_bmi; }
O3
c
select_keccakf1600_implementation: pushq %rax callq 0x220f0 movl 0x6fc28(%rip), %eax # 0xbe7ac notl %eax testl $0x30000, %eax # imm = 0x30000 jne 0x4eb9b leaq 0x9(%rip), %rax # 0x4eb9d movq %rax, 0x6f695(%rip) # 0xbe230 popq %rax retq
select_keccakf1600_implementation: push rax call __cpu_indicator_init mov eax, cs:dword_BE7AC not eax test eax, 30000h jnz short loc_4EB9B lea rax, keccakf1600_bmi mov cs:keccakf1600_best, rax loc_4EB9B: pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> select_keccakf1600_implementation(long long a1, long long a2) { _cpu_indicator_init(a1, a2); if ( (~dword_BE7AC & 0x30000) == 0 ) keccakf1600_best = keccakf1600_bmi; }
select_keccakf1600_implementation: PUSH RAX CALL 0x001220f0 MOV EAX,dword ptr [0x001be7ac] NOT EAX TEST EAX,0x30000 JNZ 0x0014eb9b LEA RAX,[0x14eb9d] MOV qword ptr [0x001be230],RAX LAB_0014eb9b: POP RAX RET
int8 select_keccakf1600_implementation(void) { int8 in_RAX; __cpu_indicator_init(); if ((~DAT_001be7ac & 0x30000) == 0) { keccakf1600_best = keccakf1600_bmi; } return in_RAX; }
9,097
StartTree::VectorizedMatrix<float, StartTree::NJMatrix<float>, Vec8f, Vec8fb>::getRowMinima() const
iqtree3/utils/bionj2.cpp
virtual void getRowMinima() const { T nless2 = ( n - 2 ); T tMultiplier = ( n <= 2 ) ? 0 : (1 / nless2); T* tot = matrixAlign ( scratchTotals.data() ); T* nums = matrixAlign ( scratchColumnNumbers.data() ); for (size_t r=0; r<n; ++r) { tot[r] = rowTotals[r] * tMultiplier; nums[r] = r; } rowMinima.resize(n); rowMinima[0].value = infiniteDistance; #pragma omp parallel for schedule(dynamic) for (size_t row=1; row<n; ++row) { Position<T> pos(row, 0, infiniteDistance, 0); const T* rowData = rows[row]; size_t col; V minVector = infiniteDistance; //The minima of columns with indices //"congruent modulo blockSize" //For example, if blockSize is 4, //minVector[1] holds the minimum of //columns 1,5,9,13,17,... V ixVector = -1; //For each entry in minVector, the column from which //that value came. for (col=0; col+blockSize<row; col+=blockSize) { V rowVector; rowVector.load_a(rowData+col); V totVector; totVector.load_a(tot+col); V adjVector = rowVector - totVector; VB less = adjVector < minVector; V numVector; numVector.load_a(nums+col); ixVector = select(less, numVector, ixVector); minVector = select(less, adjVector, minVector); } //Extract minimum and column number for (int c=0; c<blockSize; ++c) { if (minVector[c] < pos.value) { pos.value = minVector[c]; pos.column = ixVector[c]; } } for (; col<row; ++col) { T v = rowData[col] - tot[col]; if (v < pos.value) { pos.column = col; pos.value = v; } } pos.value -= tot [row]; pos.imbalance = getImbalance(pos.row, pos.column); rowMinima[row] = pos; } }
O0
cpp
StartTree::VectorizedMatrix<float, StartTree::NJMatrix<float>, Vec8f, Vec8fb>::getRowMinima() const: subq $0x1b8, %rsp # imm = 0x1B8 movq %rdi, 0x1b0(%rsp) movq 0x1b0(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x8(%rax), %rax addq $-0x2, %rax movq %rax, %rdx shrq %rdx movl %eax, %ecx andl $0x1, %ecx orq %rdx, %rcx cvtsi2ss %rcx, %xmm0 addss %xmm0, %xmm0 cvtsi2ss %rax, %xmm1 movss %xmm1, 0x20(%rsp) testq %rax, %rax movss %xmm0, 0x24(%rsp) js 0x57efd movss 0x20(%rsp), %xmm0 movss %xmm0, 0x24(%rsp) movq 0x18(%rsp), %rax movss 0x24(%rsp), %xmm0 movss %xmm0, 0x1ac(%rsp) cmpq $0x2, 0x8(%rax) ja 0x57f23 xorps %xmm0, %xmm0 movss %xmm0, 0x14(%rsp) jmp 0x57f3a movss 0x1159d(%rip), %xmm0 # 0x694c8 divss 0x1ac(%rsp), %xmm0 movss %xmm0, 0x14(%rsp) movq 0x18(%rsp), %rdi movss 0x14(%rsp), %xmm0 movss %xmm0, 0x1a8(%rsp) addq $0xc8, %rdi callq 0x46090 movq %rax, %rdi callq 0x41080 movq 0x18(%rsp), %rdi movq %rax, 0x1a0(%rsp) addq $0xe0, %rdi callq 0x46090 movq %rax, %rdi callq 0x41080 movq %rax, 0x198(%rsp) movq $0x0, 0x190(%rsp) movq 0x18(%rsp), %rcx movq 0x190(%rsp), %rax cmpq 0x8(%rcx), %rax jae 0x58053 movq 0x18(%rsp), %rax movq 0x28(%rax), %rax movq 0x190(%rsp), %rcx movss (%rax,%rcx,4), %xmm0 movss 0x1a8(%rsp), %xmm1 mulss %xmm1, %xmm0 movq 0x1a0(%rsp), %rax movss %xmm0, (%rax,%rcx,4) movq 0x190(%rsp), %rax movq %rax, %rdx shrq %rdx movl %eax, %ecx andl $0x1, %ecx orq %rdx, %rcx cvtsi2ss %rcx, %xmm0 addss %xmm0, %xmm0 cvtsi2ss %rax, %xmm1 movss %xmm1, 0xc(%rsp) testq %rax, %rax movss %xmm0, 0x10(%rsp) js 0x5801f movss 0xc(%rsp), %xmm0 movss %xmm0, 0x10(%rsp) movss 0x10(%rsp), %xmm0 movq 0x198(%rsp), %rax movq 0x190(%rsp), %rcx movss %xmm0, (%rax,%rcx,4) movq 0x190(%rsp), %rax addq $0x1, %rax movq %rax, 0x190(%rsp) jmp 0x57f97 movq 0x18(%rsp), %rax movq %rax, %rdi addq $0x60, %rdi movq 0x8(%rax), %rsi callq 0x41b70 movq 0x18(%rsp), %rdi addq $0x60, %rdi xorl %eax, %eax movl %eax, %esi callq 0x41c10 movss 0x11646(%rip), %xmm0 # 0x696c8 movss %xmm0, 0x10(%rax) movq $0x1, 0x188(%rsp) movq 0x18(%rsp), %rcx movq 0x188(%rsp), %rax cmpq 0x8(%rcx), %rax jae 0x5849e movq 0x188(%rsp), %rsi leaq 0x168(%rsp), %rdi xorl %eax, %eax movl %eax, %ecx movss 0x11602(%rip), %xmm0 # 0x696c8 movq %rcx, %rdx callq 0x41cf0 movq 0x18(%rsp), %rax movq 0x20(%rax), %rax movq 0x188(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x160(%rsp) leaq 0x130(%rsp), %rdi movss 0x115cd(%rip), %xmm0 # 0x696c8 callq 0x54360 leaq 0x110(%rsp), %rdi movss 0x115c0(%rip), %xmm0 # 0x696d0 callq 0x54360 movq $0x0, 0x158(%rsp) movq 0x18(%rsp), %rcx movq 0x158(%rsp), %rax addq 0xf8(%rcx), %rax cmpq 0x188(%rsp), %rax jae 0x582d4 leaq 0xf0(%rsp), %rdi callq 0x543b0 movq 0x160(%rsp), %rsi movq 0x158(%rsp), %rax shlq $0x2, %rax addq %rax, %rsi leaq 0xf0(%rsp), %rdi callq 0x543c0 leaq 0xd0(%rsp), %rdi callq 0x543b0 movq 0x1a0(%rsp), %rsi movq 0x158(%rsp), %rax shlq $0x2, %rax addq %rax, %rsi leaq 0xd0(%rsp), %rdi callq 0x543c0 leaq 0xb0(%rsp), %rdi leaq 0xf0(%rsp), %rsi leaq 0xd0(%rsp), %rdx callq 0x54400 leaq 0x90(%rsp), %rdi leaq 0xb0(%rsp), %rsi leaq 0x130(%rsp), %rdx callq 0x544b0 leaq 0x70(%rsp), %rdi callq 0x543b0 movq 0x198(%rsp), %rsi movq 0x158(%rsp), %rax shlq $0x2, %rax addq %rax, %rsi leaq 0x70(%rsp), %rdi callq 0x543c0 leaq 0x50(%rsp), %rdi leaq 0x90(%rsp), %rsi leaq 0x70(%rsp), %rdx leaq 0x110(%rsp), %rcx callq 0x54560 movq 0x50(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x118(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x120(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x128(%rsp) leaq 0x30(%rsp), %rdi leaq 0x90(%rsp), %rsi leaq 0xb0(%rsp), %rdx leaq 0x130(%rsp), %rcx callq 0x54560 movq 0x30(%rsp), %rax movq %rax, 0x130(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x138(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x140(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x148(%rsp) movq 0x18(%rsp), %rax movq 0xf8(%rax), %rax addq 0x158(%rsp), %rax movq %rax, 0x158(%rsp) jmp 0x58121 movl $0x0, 0x2c(%rsp) movq 0x18(%rsp), %rcx movslq 0x2c(%rsp), %rax cmpq 0xf8(%rcx), %rax jae 0x58380 movl 0x2c(%rsp), %esi leaq 0x130(%rsp), %rdi callq 0x54650 movaps %xmm0, %xmm1 movss 0x178(%rsp), %xmm0 ucomiss %xmm1, %xmm0 jbe 0x5836e movl 0x2c(%rsp), %esi leaq 0x130(%rsp), %rdi callq 0x54650 movss %xmm0, 0x178(%rsp) movl 0x2c(%rsp), %esi leaq 0x110(%rsp), %rdi callq 0x54650 movaps %xmm0, %xmm1 cvttss2si %xmm1, %rax movq %rax, %rdx sarq $0x3f, %rdx movss 0x1137d(%rip), %xmm1 # 0x696d4 subss %xmm1, %xmm0 cvttss2si %xmm0, %rcx andq %rdx, %rcx orq %rcx, %rax movq %rax, 0x170(%rsp) jmp 0x58370 movl 0x2c(%rsp), %eax addl $0x1, %eax movl %eax, 0x2c(%rsp) jmp 0x582dc jmp 0x58382 movq 0x158(%rsp), %rax cmpq 0x188(%rsp), %rax jae 0x58412 movq 0x160(%rsp), %rax movq 0x158(%rsp), %rcx movss (%rax,%rcx,4), %xmm0 movq 0x1a0(%rsp), %rax movq 0x158(%rsp), %rcx subss (%rax,%rcx,4), %xmm0 movss %xmm0, 0x28(%rsp) movss 0x28(%rsp), %xmm1 movss 0x178(%rsp), %xmm0 ucomiss %xmm1, %xmm0 jbe 0x583f7 movq 0x158(%rsp), %rax movq %rax, 0x170(%rsp) movss 0x28(%rsp), %xmm0 movss %xmm0, 0x178(%rsp) jmp 0x583f9 movq 0x158(%rsp), %rax addq $0x1, %rax movq %rax, 0x158(%rsp) jmp 0x58382 movq 0x18(%rsp), %rdi movq 0x1a0(%rsp), %rax movq 0x188(%rsp), %rcx movss (%rax,%rcx,4), %xmm1 movss 0x178(%rsp), %xmm0 subss %xmm1, %xmm0 movss %xmm0, 0x178(%rsp) movq 0x168(%rsp), %rsi movq 0x170(%rsp), %rdx callq 0x41c30 movq 0x18(%rsp), %rdi movq %rax, 0x180(%rsp) addq $0x60, %rdi movq 0x188(%rsp), %rsi callq 0x41c10 movq %rax, %rdi leaq 0x168(%rsp), %rsi callq 0x41d30 movq 0x188(%rsp), %rax addq $0x1, %rax movq %rax, 0x188(%rsp) jmp 0x58093 addq $0x1b8, %rsp # imm = 0x1B8 retq nopw %cs:(%rax,%rax)
_ZNK9StartTree16VectorizedMatrixIfNS_11BIONJMatrixIfEE5Vec8f6Vec8fbE12getRowMinimaEv: sub rsp, 1B8h mov [rsp+1B8h+var_8], rdi mov rax, [rsp+1B8h+var_8] mov [rsp+1B8h+var_1A0], rax mov rax, [rax+8] add rax, 0FFFFFFFFFFFFFFFEh mov rdx, rax shr rdx, 1 mov ecx, eax and ecx, 1 or rcx, rdx cvtsi2ss xmm0, rcx addss xmm0, xmm0 cvtsi2ss xmm1, rax movss [rsp+1B8h+var_198], xmm1 test rax, rax movss [rsp+1B8h+var_194], xmm0 js short loc_57EFD movss xmm0, [rsp+1B8h+var_198] movss [rsp+1B8h+var_194], xmm0 loc_57EFD: mov rax, [rsp+1B8h+var_1A0] movss xmm0, [rsp+1B8h+var_194] movss [rsp+1B8h+var_C], xmm0 cmp qword ptr [rax+8], 2 ja short loc_57F23 xorps xmm0, xmm0 movss [rsp+1B8h+var_1A4], xmm0 jmp short loc_57F3A loc_57F23: movss xmm0, cs:dword_694C8 divss xmm0, [rsp+1B8h+var_C] movss [rsp+1B8h+var_1A4], xmm0 loc_57F3A: mov rdi, [rsp+1B8h+var_1A0] movss xmm0, [rsp+1B8h+var_1A4] movss [rsp+1B8h+var_10], xmm0 add rdi, 0C8h call _ZNSt6vectorIfSaIfEE4dataEv; std::vector<float>::data(void) mov rdi, rax call _ZN9StartTree11matrixAlignIfEEPT_S2_; StartTree::matrixAlign<float>(float *) mov rdi, [rsp+1B8h+var_1A0] mov [rsp+1B8h+var_18], rax add rdi, 0E0h call _ZNSt6vectorIfSaIfEE4dataEv; std::vector<float>::data(void) mov rdi, rax call _ZN9StartTree11matrixAlignIfEEPT_S2_; StartTree::matrixAlign<float>(float *) mov [rsp+1B8h+var_20], rax mov [rsp+1B8h+var_28], 0 loc_57F97: mov rcx, [rsp+1B8h+var_1A0] mov rax, [rsp+1B8h+var_28] cmp rax, [rcx+8] jnb loc_58053 mov rax, [rsp+1B8h+var_1A0] mov rax, [rax+28h] mov rcx, [rsp+1B8h+var_28] movss xmm0, dword ptr [rax+rcx*4] movss xmm1, [rsp+1B8h+var_10] mulss xmm0, xmm1 mov rax, [rsp+1B8h+var_18] movss dword ptr [rax+rcx*4], xmm0 mov rax, [rsp+1B8h+var_28] mov rdx, rax shr rdx, 1 mov ecx, eax and ecx, 1 or rcx, rdx cvtsi2ss xmm0, rcx addss xmm0, xmm0 cvtsi2ss xmm1, rax movss [rsp+1B8h+var_1AC], xmm1 test rax, rax movss [rsp+1B8h+var_1A8], xmm0 js short loc_5801F movss xmm0, [rsp+1B8h+var_1AC] movss [rsp+1B8h+var_1A8], xmm0 loc_5801F: movss xmm0, [rsp+1B8h+var_1A8] mov rax, [rsp+1B8h+var_20] mov rcx, [rsp+1B8h+var_28] movss dword ptr [rax+rcx*4], xmm0 mov rax, [rsp+1B8h+var_28] add rax, 1 mov [rsp+1B8h+var_28], rax jmp loc_57F97 loc_58053: mov rax, [rsp+1B8h+var_1A0] mov rdi, rax add rdi, 60h ; '`' mov rsi, [rax+8] call _ZNSt6vectorIN9StartTree8PositionIfEESaIS2_EE6resizeEm; std::vector<StartTree::Position<float>>::resize(ulong) mov rdi, [rsp+1B8h+var_1A0] add rdi, 60h ; '`' xor eax, eax mov esi, eax call _ZNSt6vectorIN9StartTree8PositionIfEESaIS2_EEixEm; std::vector<StartTree::Position<float>>::operator[](ulong) movss xmm0, cs:flt_696C8 movss dword ptr [rax+10h], xmm0 mov [rsp+1B8h+var_30], 1 loc_58093: mov rcx, [rsp+1B8h+var_1A0] mov rax, [rsp+1B8h+var_30] cmp rax, [rcx+8] jnb loc_5849E mov rsi, [rsp+1B8h+var_30] lea rdi, [rsp+1B8h+var_50] xor eax, eax mov ecx, eax movss xmm0, cs:flt_696C8 mov rdx, rcx call _ZN9StartTree8PositionIfEC2Emmfm; StartTree::Position<float>::Position(ulong,ulong,float,ulong) mov rax, [rsp+1B8h+var_1A0] mov rax, [rax+20h] mov rcx, [rsp+1B8h+var_30] mov rax, [rax+rcx*8] mov [rsp+1B8h+var_58], rax lea rdi, [rsp+1B8h+var_88]; this movss xmm0, cs:flt_696C8; float call _ZN5Vec8fC2Ef; Vec8f::Vec8f(float) lea rdi, [rsp+1B8h+var_A8]; this movss xmm0, cs:flt_696D0; float call _ZN5Vec8fC2Ef; Vec8f::Vec8f(float) mov [rsp+1B8h+var_60], 0 loc_58121: mov rcx, [rsp+1B8h+var_1A0] mov rax, [rsp+1B8h+var_60] add rax, [rcx+0F8h] cmp rax, [rsp+1B8h+var_30] jnb loc_582D4 lea rdi, [rsp+1B8h+var_C8]; this call _ZN5Vec8fC2Ev; Vec8f::Vec8f(void) mov rsi, [rsp+1B8h+var_58] mov rax, [rsp+1B8h+var_60] shl rax, 2 add rsi, rax; float * lea rdi, [rsp+1B8h+var_C8]; this call _ZN5Vec8f6load_aEPKf; Vec8f::load_a(float const*) lea rdi, [rsp+1B8h+var_E8]; this call _ZN5Vec8fC2Ev; Vec8f::Vec8f(void) mov rsi, [rsp+1B8h+var_18] mov rax, [rsp+1B8h+var_60] shl rax, 2 add rsi, rax; float * lea rdi, [rsp+1B8h+var_E8]; this call _ZN5Vec8f6load_aEPKf; Vec8f::load_a(float const*) lea rdi, [rsp+1B8h+var_108] lea rsi, [rsp+1B8h+var_C8] lea rdx, [rsp+1B8h+var_E8] call _ZmiRK5Vec8fS1_; operator-(Vec8f const&,Vec8f const&) lea rdi, [rsp+1B8h+var_128] lea rsi, [rsp+1B8h+var_108] lea rdx, [rsp+1B8h+var_88] call _ZltRK5Vec8fS1_; operator<(Vec8f const&,Vec8f const&) lea rdi, [rsp+1B8h+var_148]; this call _ZN5Vec8fC2Ev; Vec8f::Vec8f(void) mov rsi, [rsp+1B8h+var_20] mov rax, [rsp+1B8h+var_60] shl rax, 2 add rsi, rax; float * lea rdi, [rsp+1B8h+var_148]; this call _ZN5Vec8f6load_aEPKf; Vec8f::load_a(float const*) lea rdi, [rsp+1B8h+var_168]; Vec8fb * lea rsi, [rsp+1B8h+var_128]; Vec8f * lea rdx, [rsp+1B8h+var_148]; Vec8f * lea rcx, [rsp+1B8h+var_A8] call _ZL6selectRK6Vec8fbRK5Vec8fS4_; select(Vec8fb const&,Vec8f const&,Vec8f const&) mov rax, [rsp+1B8h+var_168] mov [rsp+1B8h+var_A8], rax mov rax, [rsp+1B8h+var_160] mov [rsp+1B8h+var_A0], rax mov rax, [rsp+1B8h+var_158] mov [rsp+1B8h+var_98], rax mov rax, [rsp+1B8h+var_150] mov [rsp+1B8h+var_90], rax lea rdi, [rsp+1B8h+var_188]; Vec8fb * lea rsi, [rsp+1B8h+var_128]; Vec8f * lea rdx, [rsp+1B8h+var_108]; Vec8f * lea rcx, [rsp+1B8h+var_88] call _ZL6selectRK6Vec8fbRK5Vec8fS4_; select(Vec8fb const&,Vec8f const&,Vec8f const&) mov rax, [rsp+1B8h+var_188] mov [rsp+1B8h+var_88], rax mov rax, [rsp+1B8h+var_180] mov [rsp+1B8h+var_80], rax mov rax, [rsp+1B8h+var_178] mov [rsp+1B8h+var_78], rax mov rax, [rsp+1B8h+var_170] mov [rsp+1B8h+var_70], rax mov rax, [rsp+1B8h+var_1A0] mov rax, [rax+0F8h] add rax, [rsp+1B8h+var_60] mov [rsp+1B8h+var_60], rax jmp loc_58121 loc_582D4: mov [rsp+1B8h+var_18C], 0 loc_582DC: mov rcx, [rsp+1B8h+var_1A0] movsxd rax, [rsp+1B8h+var_18C] cmp rax, [rcx+0F8h] jnb loc_58380 mov esi, [rsp+1B8h+var_18C] lea rdi, [rsp+1B8h+var_88] call _ZNK5Vec8fixEj; Vec8f::operator[](uint) movaps xmm1, xmm0 movss xmm0, [rsp+1B8h+var_40] ucomiss xmm0, xmm1 jbe short loc_5836E mov esi, [rsp+1B8h+var_18C] lea rdi, [rsp+1B8h+var_88] call _ZNK5Vec8fixEj; Vec8f::operator[](uint) movss [rsp+1B8h+var_40], xmm0 mov esi, [rsp+1B8h+var_18C] lea rdi, [rsp+1B8h+var_A8] call _ZNK5Vec8fixEj; Vec8f::operator[](uint) movaps xmm1, xmm0 cvttss2si rax, xmm1 mov rdx, rax sar rdx, 3Fh movss xmm1, cs:dword_696D4 subss xmm0, xmm1 cvttss2si rcx, xmm0 and rcx, rdx or rax, rcx mov [rsp+1B8h+var_48], rax loc_5836E: jmp short $+2 loc_58370: mov eax, [rsp+1B8h+var_18C] add eax, 1 mov [rsp+1B8h+var_18C], eax jmp loc_582DC loc_58380: jmp short $+2 loc_58382: mov rax, [rsp+1B8h+var_60] cmp rax, [rsp+1B8h+var_30] jnb short loc_58412 mov rax, [rsp+1B8h+var_58] mov rcx, [rsp+1B8h+var_60] movss xmm0, dword ptr [rax+rcx*4] mov rax, [rsp+1B8h+var_18] mov rcx, [rsp+1B8h+var_60] subss xmm0, dword ptr [rax+rcx*4] movss [rsp+1B8h+var_190], xmm0 movss xmm1, [rsp+1B8h+var_190] movss xmm0, [rsp+1B8h+var_40] ucomiss xmm0, xmm1 jbe short loc_583F7 mov rax, [rsp+1B8h+var_60] mov [rsp+1B8h+var_48], rax movss xmm0, [rsp+1B8h+var_190] movss [rsp+1B8h+var_40], xmm0 loc_583F7: jmp short $+2 loc_583F9: mov rax, [rsp+1B8h+var_60] add rax, 1 mov [rsp+1B8h+var_60], rax jmp loc_58382 loc_58412: mov rdi, [rsp+1B8h+var_1A0] mov rax, [rsp+1B8h+var_18] mov rcx, [rsp+1B8h+var_30] movss xmm1, dword ptr [rax+rcx*4] movss xmm0, [rsp+1B8h+var_40] subss xmm0, xmm1 movss [rsp+1B8h+var_40], xmm0 mov rsi, [rsp+1B8h+var_50] mov rdx, [rsp+1B8h+var_48] call _ZNK9StartTree12UPGMA_MatrixIfE12getImbalanceEmm; StartTree::UPGMA_Matrix<float>::getImbalance(ulong,ulong) mov rdi, [rsp+1B8h+var_1A0] mov [rsp+1B8h+var_38], rax add rdi, 60h ; '`' mov rsi, [rsp+1B8h+var_30] call _ZNSt6vectorIN9StartTree8PositionIfEESaIS2_EEixEm; std::vector<StartTree::Position<float>>::operator[](ulong) mov rdi, rax lea rsi, [rsp+1B8h+var_50] call _ZN9StartTree8PositionIfEaSERKS1_; StartTree::Position<float>::operator=(StartTree::Position<float> const&) mov rax, [rsp+1B8h+var_30] add rax, 1 mov [rsp+1B8h+var_30], rax jmp loc_58093 loc_5849E: add rsp, 1B8h retn
unsigned long long StartTree::VectorizedMatrix<float,StartTree::BIONJMatrix<float>,Vec8f,Vec8fb>::getRowMinima( _QWORD *a1) { long long v1; // rax unsigned long long v2; // rcx long long v3; // rax long long v4; // rax unsigned long long result; // rax float v6; // xmm0_4 float v7; // xmm1_4 __int128 v8; // rax long long v9; // rax float v10; // [rsp+10h] [rbp-1A8h] float v11; // [rsp+14h] [rbp-1A4h] float v12; // [rsp+24h] [rbp-194h] float v13; // [rsp+28h] [rbp-190h] signed int m; // [rsp+2Ch] [rbp-18Ch] _QWORD v15[4]; // [rsp+30h] [rbp-188h] BYREF _QWORD v16[4]; // [rsp+50h] [rbp-168h] BYREF _BYTE v17[32]; // [rsp+70h] [rbp-148h] BYREF _BYTE v18[32]; // [rsp+90h] [rbp-128h] BYREF _BYTE v19[32]; // [rsp+B0h] [rbp-108h] BYREF _BYTE v20[32]; // [rsp+D0h] [rbp-E8h] BYREF _BYTE v21[32]; // [rsp+F0h] [rbp-C8h] BYREF _QWORD v22[4]; // [rsp+110h] [rbp-A8h] BYREF _QWORD v23[5]; // [rsp+130h] [rbp-88h] BYREF unsigned long long k; // [rsp+158h] [rbp-60h] long long v25; // [rsp+160h] [rbp-58h] long long v26; // [rsp+168h] [rbp-50h] BYREF unsigned long long v27; // [rsp+170h] [rbp-48h] float v28; // [rsp+178h] [rbp-40h] unsigned long long Imbalance; // [rsp+180h] [rbp-38h] unsigned long long j; // [rsp+188h] [rbp-30h] unsigned long long i; // [rsp+190h] [rbp-28h] long long v32; // [rsp+198h] [rbp-20h] long long v33; // [rsp+1A0h] [rbp-18h] float v34; // [rsp+1A8h] [rbp-10h] float v35; // [rsp+1ACh] [rbp-Ch] _QWORD *v36; // [rsp+1B0h] [rbp-8h] v36 = a1; v1 = a1[1] - 2LL; v2 = ((unsigned long long)v1 >> 1) | (*((_BYTE *)a1 + 8) - 2) & 1; v12 = (float)(int)v2 + (float)(int)v2; if ( v1 >= 0 ) v12 = (float)(int)v1; v35 = v12; if ( a1[1] > 2uLL ) v11 = 1.0 / v35; else v11 = 0.0; v34 = v11; v3 = std::vector<float>::data(a1 + 25); v33 = StartTree::matrixAlign<float>(v3); v4 = std::vector<float>::data(a1 + 28); v32 = StartTree::matrixAlign<float>(v4); for ( i = 0LL; i < a1[1]; ++i ) { *(float *)(v33 + 4 * i) = *(float *)(a1[5] + 4 * i) * v34; v10 = (float)(int)((i >> 1) | i & 1) + (float)(int)((i >> 1) | i & 1); if ( (i & 0x8000000000000000LL) == 0LL ) v10 = (float)(int)i; *(float *)(v32 + 4 * i) = v10; } std::vector<StartTree::Position<float>>::resize(a1 + 12, a1[1]); *(_DWORD *)(std::vector<StartTree::Position<float>>::operator[](a1 + 12, 0LL) + 16) = 2067830734; for ( j = 1LL; ; ++j ) { result = j; if ( j >= a1[1] ) break; StartTree::Position<float>::Position((long long)&v26, j, 0LL, 9.9999996e35); v25 = *(_QWORD *)(a1[4] + 8 * j); Vec8f::Vec8f((Vec8f *)v23, 9.9999996e35); v6 = -1.0; Vec8f::Vec8f((Vec8f *)v22, -1.0); for ( k = 0LL; a1[31] + k < j; k += a1[31] ) { Vec8f::Vec8f((Vec8f *)v21); Vec8f::load_a((Vec8f *)v21, (const float *)(4 * k + v25)); Vec8f::Vec8f((Vec8f *)v20); Vec8f::load_a((Vec8f *)v20, (const float *)(4 * k + v33)); operator-((Vec8f *)v19, (Vec8f *)v21, (Vec8f *)v20, (__m128)0xBF800000); operator<((long long)v18, (Vec8f *)v19, (Vec8f *)v23, (__m128)0xBF800000); Vec8f::Vec8f((Vec8f *)v17); Vec8f::load_a((Vec8f *)v17, (const float *)(4 * k + v32)); select((const Vec8fb *)v16, (const Vec8f *)v18, (const Vec8f *)v17, (Vec8f *)v22, (__m128)0xBF800000); v22[0] = v16[0]; v22[1] = v16[1]; v22[2] = v16[2]; v22[3] = v16[3]; select((const Vec8fb *)v15, (const Vec8f *)v18, (const Vec8f *)v19, (Vec8f *)v23, (__m128)0xBF800000); v23[0] = v15[0]; v23[1] = v15[1]; v23[2] = v15[2]; v23[3] = v15[3]; } for ( m = 0; (unsigned long long)m < a1[31]; ++m ) { Vec8f::operator[]((Vec8f *)v23, m); v7 = v6; v6 = v28; if ( v28 > v7 ) { Vec8f::operator[]((Vec8f *)v23, m); v28 = v6; Vec8f::operator[]((Vec8f *)v22, m); v8 = (unsigned int)(int)v6; v6 = v6 - 9.223372e18; v27 = DWORD2(v8) & (unsigned int)(int)v6 | (unsigned long long)v8; } } while ( k < j ) { v13 = *(float *)(v25 + 4 * k) - *(float *)(v33 + 4 * k); if ( v28 > v13 ) { v27 = k; v28 = v13; } ++k; } v28 = v28 - *(float *)(v33 + 4 * j); Imbalance = StartTree::UPGMA_Matrix<float>::getImbalance((long long)a1, v26, v27); v9 = std::vector<StartTree::Position<float>>::operator[](a1 + 12, j); StartTree::Position<float>::operator=(v9, (long long)&v26); } return result; }
getRowMinima: SUB RSP,0x1b8 MOV qword ptr [RSP + 0x1b0],RDI MOV RAX,qword ptr [RSP + 0x1b0] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RAX + 0x8] ADD RAX,-0x2 MOV RDX,RAX SHR RDX,0x1 MOV ECX,EAX AND ECX,0x1 OR RCX,RDX CVTSI2SS XMM0,RCX ADDSS XMM0,XMM0 CVTSI2SS XMM1,RAX MOVSS dword ptr [RSP + 0x20],XMM1 TEST RAX,RAX MOVSS dword ptr [RSP + 0x24],XMM0 JS 0x00157efd MOVSS XMM0,dword ptr [RSP + 0x20] MOVSS dword ptr [RSP + 0x24],XMM0 LAB_00157efd: MOV RAX,qword ptr [RSP + 0x18] MOVSS XMM0,dword ptr [RSP + 0x24] MOVSS dword ptr [RSP + 0x1ac],XMM0 CMP qword ptr [RAX + 0x8],0x2 JA 0x00157f23 XORPS XMM0,XMM0 MOVSS dword ptr [RSP + 0x14],XMM0 JMP 0x00157f3a LAB_00157f23: MOVSS XMM0,dword ptr [0x001694c8] DIVSS XMM0,dword ptr [RSP + 0x1ac] MOVSS dword ptr [RSP + 0x14],XMM0 LAB_00157f3a: MOV RDI,qword ptr [RSP + 0x18] MOVSS XMM0,dword ptr [RSP + 0x14] MOVSS dword ptr [RSP + 0x1a8],XMM0 ADD RDI,0xc8 CALL 0x00146090 MOV RDI,RAX CALL 0x00141080 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x1a0],RAX ADD RDI,0xe0 CALL 0x00146090 MOV RDI,RAX CALL 0x00141080 MOV qword ptr [RSP + 0x198],RAX MOV qword ptr [RSP + 0x190],0x0 LAB_00157f97: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x190] CMP RAX,qword ptr [RCX + 0x8] JNC 0x00158053 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x28] MOV RCX,qword ptr [RSP + 0x190] MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOVSS XMM1,dword ptr [RSP + 0x1a8] MULSS XMM0,XMM1 MOV RAX,qword ptr [RSP + 0x1a0] MOVSS dword ptr [RAX + RCX*0x4],XMM0 MOV RAX,qword ptr [RSP + 0x190] MOV RDX,RAX SHR RDX,0x1 MOV ECX,EAX AND ECX,0x1 OR RCX,RDX CVTSI2SS XMM0,RCX ADDSS XMM0,XMM0 CVTSI2SS XMM1,RAX MOVSS dword ptr [RSP + 0xc],XMM1 TEST RAX,RAX MOVSS dword ptr [RSP + 0x10],XMM0 JS 0x0015801f MOVSS XMM0,dword ptr [RSP + 0xc] MOVSS dword ptr [RSP + 0x10],XMM0 LAB_0015801f: MOVSS XMM0,dword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP + 0x198] MOV RCX,qword ptr [RSP + 0x190] MOVSS dword ptr [RAX + RCX*0x4],XMM0 MOV RAX,qword ptr [RSP + 0x190] ADD RAX,0x1 MOV qword ptr [RSP + 0x190],RAX JMP 0x00157f97 LAB_00158053: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,RAX ADD RDI,0x60 MOV RSI,qword ptr [RAX + 0x8] CALL 0x00141b70 MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x60 XOR EAX,EAX MOV ESI,EAX CALL 0x00141c10 MOVSS XMM0,dword ptr [0x001696c8] MOVSS dword ptr [RAX + 0x10],XMM0 MOV qword ptr [RSP + 0x188],0x1 LAB_00158093: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x188] CMP RAX,qword ptr [RCX + 0x8] JNC 0x0015849e MOV RSI,qword ptr [RSP + 0x188] LEA RDI,[RSP + 0x168] XOR EAX,EAX MOV ECX,EAX MOVSS XMM0,dword ptr [0x001696c8] MOV RDX,RCX CALL 0x00141cf0 MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RSP + 0x188] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x160],RAX LEA RDI,[RSP + 0x130] MOVSS XMM0,dword ptr [0x001696c8] CALL 0x00154360 LEA RDI,[RSP + 0x110] MOVSS XMM0,dword ptr [0x001696d0] CALL 0x00154360 MOV qword ptr [RSP + 0x158],0x0 LAB_00158121: MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x158] ADD RAX,qword ptr [RCX + 0xf8] CMP RAX,qword ptr [RSP + 0x188] JNC 0x001582d4 LEA RDI,[RSP + 0xf0] CALL 0x001543b0 MOV RSI,qword ptr [RSP + 0x160] MOV RAX,qword ptr [RSP + 0x158] SHL RAX,0x2 ADD RSI,RAX LEA RDI,[RSP + 0xf0] CALL 0x001543c0 LEA RDI,[RSP + 0xd0] CALL 0x001543b0 MOV RSI,qword ptr [RSP + 0x1a0] MOV RAX,qword ptr [RSP + 0x158] SHL RAX,0x2 ADD RSI,RAX LEA RDI,[RSP + 0xd0] CALL 0x001543c0 LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0xf0] LEA RDX,[RSP + 0xd0] CALL 0x00154400 LEA RDI,[RSP + 0x90] LEA RSI,[RSP + 0xb0] LEA RDX,[RSP + 0x130] CALL 0x001544b0 LEA RDI,[RSP + 0x70] CALL 0x001543b0 MOV RSI,qword ptr [RSP + 0x198] MOV RAX,qword ptr [RSP + 0x158] SHL RAX,0x2 ADD RSI,RAX LEA RDI,[RSP + 0x70] CALL 0x001543c0 LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0x70] LEA RCX,[RSP + 0x110] CALL 0x00154560 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x110],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x118],RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x120],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x128],RAX LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x90] LEA RDX,[RSP + 0xb0] LEA RCX,[RSP + 0x130] CALL 0x00154560 MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x130],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x138],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x140],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x148],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0xf8] ADD RAX,qword ptr [RSP + 0x158] MOV qword ptr [RSP + 0x158],RAX JMP 0x00158121 LAB_001582d4: MOV dword ptr [RSP + 0x2c],0x0 LAB_001582dc: MOV RCX,qword ptr [RSP + 0x18] MOVSXD RAX,dword ptr [RSP + 0x2c] CMP RAX,qword ptr [RCX + 0xf8] JNC 0x00158380 MOV ESI,dword ptr [RSP + 0x2c] LEA RDI,[RSP + 0x130] CALL 0x00154650 MOVAPS XMM1,XMM0 MOVSS XMM0,dword ptr [RSP + 0x178] UCOMISS XMM0,XMM1 JBE 0x0015836e MOV ESI,dword ptr [RSP + 0x2c] LEA RDI,[RSP + 0x130] CALL 0x00154650 MOVSS dword ptr [RSP + 0x178],XMM0 MOV ESI,dword ptr [RSP + 0x2c] LEA RDI,[RSP + 0x110] CALL 0x00154650 MOVAPS XMM1,XMM0 CVTTSS2SI RAX,XMM1 MOV RDX,RAX SAR RDX,0x3f MOVSS XMM1,dword ptr [0x001696d4] SUBSS XMM0,XMM1 CVTTSS2SI RCX,XMM0 AND RCX,RDX OR RAX,RCX MOV qword ptr [RSP + 0x170],RAX LAB_0015836e: JMP 0x00158370 LAB_00158370: MOV EAX,dword ptr [RSP + 0x2c] ADD EAX,0x1 MOV dword ptr [RSP + 0x2c],EAX JMP 0x001582dc LAB_00158380: JMP 0x00158382 LAB_00158382: MOV RAX,qword ptr [RSP + 0x158] CMP RAX,qword ptr [RSP + 0x188] JNC 0x00158412 MOV RAX,qword ptr [RSP + 0x160] MOV RCX,qword ptr [RSP + 0x158] MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x1a0] MOV RCX,qword ptr [RSP + 0x158] SUBSS XMM0,dword ptr [RAX + RCX*0x4] MOVSS dword ptr [RSP + 0x28],XMM0 MOVSS XMM1,dword ptr [RSP + 0x28] MOVSS XMM0,dword ptr [RSP + 0x178] UCOMISS XMM0,XMM1 JBE 0x001583f7 MOV RAX,qword ptr [RSP + 0x158] MOV qword ptr [RSP + 0x170],RAX MOVSS XMM0,dword ptr [RSP + 0x28] MOVSS dword ptr [RSP + 0x178],XMM0 LAB_001583f7: JMP 0x001583f9 LAB_001583f9: MOV RAX,qword ptr [RSP + 0x158] ADD RAX,0x1 MOV qword ptr [RSP + 0x158],RAX JMP 0x00158382 LAB_00158412: MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x1a0] MOV RCX,qword ptr [RSP + 0x188] MOVSS XMM1,dword ptr [RAX + RCX*0x4] MOVSS XMM0,dword ptr [RSP + 0x178] SUBSS XMM0,XMM1 MOVSS dword ptr [RSP + 0x178],XMM0 MOV RSI,qword ptr [RSP + 0x168] MOV RDX,qword ptr [RSP + 0x170] CALL 0x00141c30 MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x180],RAX ADD RDI,0x60 MOV RSI,qword ptr [RSP + 0x188] CALL 0x00141c10 MOV RDI,RAX LEA RSI,[RSP + 0x168] CALL 0x00141d30 MOV RAX,qword ptr [RSP + 0x188] ADD RAX,0x1 MOV qword ptr [RSP + 0x188],RAX JMP 0x00158093 LAB_0015849e: ADD RSP,0x1b8 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* StartTree::VectorizedMatrix<float, StartTree::BIONJMatrix<float>, Vec8f, Vec8fb>::getRowMinima() const */ void __thiscall StartTree::VectorizedMatrix<float,StartTree::BIONJMatrix<float>,Vec8f,Vec8fb>::getRowMinima (VectorizedMatrix<float,StartTree::BIONJMatrix<float>,Vec8f,Vec8fb> *this) { float *pfVar1; long lVar2; Position<float> *this_00; float fVar3; float local_1a8; float local_1a4; float local_194; uint local_18c; Vec8fb local_188 [32]; int8 local_168; int8 local_160; int8 local_158; int8 local_150; Vec8f local_148 [32]; Vec8f local_128 [32]; Vec8f local_108 [32]; Vec8f local_e8 [32]; Vec8f local_c8 [32]; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; Vec8f local_88 [40]; ulong local_60; long local_58; ulong local_50; ulong local_48; float local_40; int8 local_38; ulong local_30; ulong local_28; float *local_20; float *local_18; float local_10; float local_c; VectorizedMatrix<float,StartTree::BIONJMatrix<float>,Vec8f,Vec8fb> *local_8; local_194 = (float)(*(long *)(this + 8) - 2); local_c = local_194; if (*(ulong *)(this + 8) < 3) { local_1a4 = 0.0; } else { local_1a4 = DAT_001694c8 / local_194; } local_10 = local_1a4; local_8 = this; pfVar1 = (float *)std::vector<float,std::allocator<float>>::data ((vector<float,std::allocator<float>> *)(this + 200)); local_18 = matrixAlign<float>(pfVar1); pfVar1 = (float *)std::vector<float,std::allocator<float>>::data ((vector<float,std::allocator<float>> *)(this + 0xe0)); local_20 = matrixAlign<float>(pfVar1); for (local_28 = 0; local_28 < *(ulong *)(this + 8); local_28 = local_28 + 1) { local_18[local_28] = *(float *)(*(long *)(this + 0x28) + local_28 * 4) * local_10; local_1a8 = (float)local_28; local_20[local_28] = local_1a8; } std::vector<StartTree::Position<float>,std::allocator<StartTree::Position<float>>>::resize ((vector<StartTree::Position<float>,std::allocator<StartTree::Position<float>>> *) (this + 0x60),*(ulong *)(this + 8)); lVar2 = std::vector<StartTree::Position<float>,std::allocator<StartTree::Position<float>>>:: operator[]((vector<StartTree::Position<float>,std::allocator<StartTree::Position<float>>> *)(this + 0x60),0); *(float *)(lVar2 + 0x10) = DAT_001696c8; for (local_30 = 1; local_30 < *(ulong *)(this + 8); local_30 = local_30 + 1) { Position<float>::Position((ulong)&local_50,local_30,DAT_001696c8,0); local_58 = *(long *)(*(long *)(this + 0x20) + local_30 * 8); Vec8f::Vec8f(local_88,DAT_001696c8); Vec8f::Vec8f((Vec8f *)&local_a8,DAT_001696d0); for (local_60 = 0; local_60 + *(long *)(this + 0xf8) < local_30; local_60 = *(long *)(this + 0xf8) + local_60) { Vec8f::Vec8f(local_c8); Vec8f::load_a(local_c8,(float *)(local_58 + local_60 * 4)); Vec8f::Vec8f(local_e8); Vec8f::load_a(local_e8,local_18 + local_60); ::operator-(local_108,local_c8); operator<(local_128,local_108); Vec8f::Vec8f(local_148); Vec8f::load_a(local_148,local_20 + local_60); select((Vec8fb *)&local_168,local_128,local_148); local_a8 = local_168; local_a0 = local_160; local_98 = local_158; local_90 = local_150; select(local_188,local_128,local_108); } for (local_18c = 0; (ulong)(long)(int)local_18c < *(ulong *)(this + 0xf8); local_18c = local_18c + 1) { fVar3 = (float)Vec8f::operator[](local_88,local_18c); if (fVar3 < local_40) { local_40 = (float)Vec8f::operator[](local_88,local_18c); fVar3 = (float)Vec8f::operator[]((Vec8f *)&local_a8,local_18c); local_48 = (long)fVar3 | (long)(fVar3 - _DAT_001696d4) & (long)fVar3 >> 0x3f; } } for (; local_60 < local_30; local_60 = local_60 + 1) { fVar3 = *(float *)(local_58 + local_60 * 4) - local_18[local_60]; if (fVar3 < local_40) { local_48 = local_60; local_40 = fVar3; } } local_40 = local_40 - local_18[local_30]; local_38 = UPGMA_Matrix<float>::getImbalance((UPGMA_Matrix<float> *)this,local_50,local_48); this_00 = (Position<float> *) std::vector<StartTree::Position<float>,std::allocator<StartTree::Position<float>>>:: operator[]((vector<StartTree::Position<float>,std::allocator<StartTree::Position<float>>> *)(this + 0x60),local_30); Position<float>::operator=(this_00,(Position *)&local_50); } return; }
9,098
mi_dpointer
eloqsql/storage/myisam/mi_search.c
void _mi_dpointer(MI_INFO *info, uchar *buff, my_off_t pos) { if (!(info->s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) && pos != HA_OFFSET_ERROR) pos/=info->s->base.pack_reclength; switch (info->s->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; default: abort(); /* Impossible */ } }
O0
c
mi_dpointer: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x318(%rax), %rax andq $0x5, %rax cmpq $0x0, %rax jne 0xc3a11 cmpq $-0x1, -0x18(%rbp) je 0xc3a11 movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x148(%rax), %rcx movq -0x18(%rbp), %rax xorl %edx, %edx divq %rcx movq %rax, -0x18(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x338(%rax), %eax addl $-0x2, %eax movl %eax, %ecx movq %rcx, -0x88(%rbp) subl $0x6, %eax ja 0xc3cf8 movq -0x88(%rbp), %rax leaq 0x9f8ef(%rip), %rcx # 0x163330 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 0xc3cfd 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 0xc3cfd 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 0xc3cfd 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 0xc3cfd 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 0xc3cfd 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 0xc3cfd 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 0xc3cfd callq 0x2a5e0 addq $0x90, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_dpointer: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+318h] and rax, 5 cmp rax, 0 jnz short loc_C3A11 cmp [rbp+var_18], 0FFFFFFFFFFFFFFFFh jz short loc_C3A11 mov rax, [rbp+var_8] mov rax, [rax] mov rcx, [rax+148h] mov rax, [rbp+var_18] xor edx, edx div rcx mov [rbp+var_18], rax loc_C3A11: mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+338h] add eax, 0FFFFFFFEh; switch 7 cases mov ecx, eax mov [rbp+var_88], rcx sub eax, 6 ja def_C3A48; jumptable 00000000000C3A48 default case mov rax, [rbp+var_88] lea rcx, jpt_C3A48 movsxd rax, ds:(jpt_C3A48 - 163330h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_C3A4A: mov rax, [rbp+var_18]; jumptable 00000000000C3A48 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_C3CFD loc_C3AF2: mov rax, [rbp+var_18]; jumptable 00000000000C3A48 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_C3CFD loc_C3B79: mov rax, [rbp+var_18]; jumptable 00000000000C3A48 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_C3CFD loc_C3BEF: mov rax, [rbp+var_18]; jumptable 00000000000C3A48 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_C3CFD loc_C3C54: mov rax, [rbp+var_18]; jumptable 00000000000C3A48 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_C3CFD loc_C3C9D: mov rax, [rbp+var_18]; jumptable 00000000000C3A48 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_C3CFD loc_C3CD5: mov rax, [rbp+var_18]; jumptable 00000000000C3A48 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_C3CFD def_C3A48: call _abort; jumptable 00000000000C3A48 default case loc_C3CFD: add rsp, 90h pop rbp retn
_BYTE * mi_dpointer(long long a1, _BYTE *a2, unsigned long long a3) { unsigned long long v3; // rcx _BYTE *result; // rax unsigned long long v5; // [rsp+78h] [rbp-18h] v5 = a3; if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 5LL) == 0 && a3 != -1LL ) { v3 = *(_QWORD *)(*(_QWORD *)a1 + 328LL); a3 %= v3; v5 /= v3; } switch ( *(_DWORD *)(*(_QWORD *)a1 + 824LL) ) { case 2: a2[1] = v5; result = a2; *a2 = BYTE1(v5); break; case 3: a2[2] = v5; a2[1] = BYTE1(v5); result = a2; *a2 = BYTE2(v5); break; case 4: a2[3] = v5; a2[2] = BYTE1(v5); a2[1] = BYTE2(v5); result = a2; *a2 = BYTE3(v5); break; case 5: a2[4] = v5; a2[3] = BYTE1(v5); a2[2] = BYTE2(v5); a2[1] = BYTE3(v5); result = a2; *a2 = BYTE4(v5); break; case 6: a2[5] = v5; a2[4] = BYTE1(v5); a2[3] = BYTE2(v5); a2[2] = BYTE3(v5); a2[1] = BYTE4(v5); result = a2; *a2 = BYTE5(v5); break; case 7: a2[6] = v5; a2[5] = BYTE1(v5); a2[4] = BYTE2(v5); a2[3] = BYTE3(v5); a2[2] = BYTE4(v5); a2[1] = BYTE5(v5); result = a2; *a2 = BYTE6(v5); break; case 8: a2[3] = BYTE4(v5); a2[2] = BYTE5(v5); a2[1] = BYTE6(v5); *a2 = HIBYTE(v5); a2[7] = v5; a2[6] = BYTE1(v5); a2[5] = BYTE2(v5); result = a2; a2[4] = BYTE3(v5); break; default: abort(a1, a2, a3); } return result; }
_mi_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 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x318] AND RAX,0x5 CMP RAX,0x0 JNZ 0x001c3a11 CMP qword ptr [RBP + -0x18],-0x1 JZ 0x001c3a11 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x148] MOV RAX,qword ptr [RBP + -0x18] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x18],RAX LAB_001c3a11: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x338] ADD EAX,-0x2 MOV ECX,EAX MOV qword ptr [RBP + -0x88],RCX SUB EAX,0x6 JA 0x001c3cf8 MOV RAX,qword ptr [RBP + -0x88] LEA RCX,[0x263330] 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 0x001c3cfd 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 0x001c3cfd 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 0x001c3cfd 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 0x001c3cfd 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 0x001c3cfd 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 0x001c3cfd 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 0x001c3cfd default: CALL 0x0012a5e0 LAB_001c3cfd: ADD RSP,0x90 POP RBP RET
void _mi_dpointer(long *param_1,int1 *param_2,ulong param_3) { int1 uVar1; int1 uVar2; int1 uVar3; int1 uVar4; int1 uVar5; int1 uVar6; int1 uVar7; ulong local_20; local_20 = param_3; if (((*(ulong *)(*param_1 + 0x318) & 5) == 0) && (param_3 != 0xffffffffffffffff)) { local_20 = param_3 / *(ulong *)(*param_1 + 0x148); } uVar4 = (int1)local_20; uVar5 = (int1)(local_20 >> 8); uVar6 = (int1)(local_20 >> 0x10); uVar7 = (int1)(local_20 >> 0x18); uVar1 = (int1)(local_20 >> 0x20); uVar2 = (int1)(local_20 >> 0x28); uVar3 = (int1)(local_20 >> 0x30); switch(*(int4 *)(*param_1 + 0x338)) { 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)(local_20 >> 0x38); param_2[7] = uVar4; param_2[6] = uVar5; param_2[5] = uVar6; param_2[4] = uVar7; break; default: /* WARNING: Subroutine does not return */ abort(); } return; }
9,099
ma_sp_make_key
eloqsql/storage/maria/ma_sp_key.c
MARIA_KEY *_ma_sp_make_key(MARIA_HA *info, MARIA_KEY *ret_key, uint keynr, uchar *key, const uchar *record, my_off_t filepos, ulonglong trid) { HA_KEYSEG *keyseg; MARIA_KEYDEF *keyinfo = &info->s->keyinfo[keynr]; uint len = 0; const uchar *pos; uint dlen; uchar *dptr; double mbr[SPDIMS * 2]; uint i; DBUG_ENTER("_ma_sp_make_key"); keyseg = &keyinfo->seg[-1]; pos = record + keyseg->start; ret_key->data= key; dlen = _ma_calc_blob_length(keyseg->bit_start, pos); memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*)); if (!dptr) { my_errno= HA_ERR_NULL_IN_SPATIAL; DBUG_RETURN(0); } sp_mbr_from_wkb(dptr + 4, dlen - 4, SPDIMS, mbr); /* SRID */ for (i = 0, keyseg = keyinfo->seg; keyseg->type; keyseg++, i++) { uint length = keyseg->length, start= keyseg->start; double val; DBUG_ASSERT(length == 8); DBUG_ASSERT(!(start % 8)); DBUG_ASSERT(start < sizeof(mbr)); DBUG_ASSERT(keyseg->type == HA_KEYTYPE_DOUBLE); val= mbr[start / sizeof (double)]; if (isnan(val)) { bzero(key, length); key+= length; len+= length; continue; } if (keyseg->flag & HA_SWAP_KEY) { mi_float8store(key, val); } else { float8store((uchar *)key, val); } key += length; len+= length; } _ma_dpointer(info->s, key, filepos); ret_key->keyinfo= keyinfo; ret_key->data_length= len; ret_key->ref_length= info->s->rec_reflength; ret_key->flag= 0; if (_ma_have_versioning(info) && trid) { ret_key->ref_length+= transid_store_packed(info, key + ret_key->ref_length, trid); } DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, ret_key);); DBUG_RETURN(ret_key); }
O0
c
ma_sp_make_key: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movq %rax, -0x48(%rbp) movl $0x0, -0x4c(%rbp) movq -0x48(%rbp), %rax movq 0xc0(%rax), %rax addq $-0x20, %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax movq -0x40(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x40(%rbp), %rax movzbl 0x1a(%rax), %edi movq -0x58(%rbp), %rsi callq 0x52560 movl %eax, -0x5c(%rbp) movq -0x58(%rbp), %rax movq -0x40(%rbp), %rcx movzbl 0x1a(%rcx), %ecx movslq %ecx, %rcx movq (%rax,%rcx), %rax movq %rax, -0x68(%rbp) cmpq $0x0, -0x68(%rbp) jne 0x9be26 callq 0xf6060 movl $0x9e, (%rax) movq $0x0, -0x8(%rbp) jmp 0x9c059 movq -0x68(%rbp), %rdi addq $0x4, %rdi movl -0x5c(%rbp), %esi subl $0x4, %esi leaq -0x90(%rbp), %rcx movl $0x2, %edx callq 0x9c070 movl $0x0, -0x94(%rbp) movq -0x48(%rbp), %rax movq 0xc0(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax cmpb $0x0, 0x18(%rax) je 0x9bfc2 movq -0x40(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x98(%rbp) movq -0x40(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x9c(%rbp) jmp 0x9be89 jmp 0x9be8b jmp 0x9be8d jmp 0x9be8f jmp 0x9be91 jmp 0x9be93 jmp 0x9be95 movl -0x9c(%rbp), %eax shrq $0x3, %rax movsd -0x90(%rbp,%rax,8), %xmm0 movsd %xmm0, -0xa8(%rbp) movsd -0xa8(%rbp), %xmm0 ucomisd %xmm0, %xmm0 setp %al testb $0x1, %al jne 0x9bec5 jmp 0x9befc movq -0x28(%rbp), %rdi movl -0x98(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 movl -0x98(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movl -0x98(%rbp), %eax addl -0x4c(%rbp), %eax movl %eax, -0x4c(%rbp) jmp 0x9bfa2 movq -0x40(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x40, %eax cmpl $0x0, %eax je 0x9bf75 movb -0xa1(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, (%rax) movb -0xa2(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, 0x1(%rax) movb -0xa3(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, 0x2(%rax) movb -0xa4(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, 0x3(%rax) movb -0xa5(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, 0x4(%rax) movb -0xa6(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, 0x5(%rax) movb -0xa7(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, 0x6(%rax) movb -0xa8(%rbp), %cl movq -0x28(%rbp), %rax movb %cl, 0x7(%rax) jmp 0x9bf83 movq -0x28(%rbp), %rax movq -0xa8(%rbp), %rcx movq %rcx, (%rax) movl -0x98(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movl -0x98(%rbp), %eax addl -0x4c(%rbp), %eax movl %eax, -0x4c(%rbp) movq -0x40(%rbp), %rax addq $0x20, %rax movq %rax, -0x40(%rbp) movl -0x94(%rbp), %eax addl $0x1, %eax movl %eax, -0x94(%rbp) jmp 0x9be5e movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x95d80 movq -0x48(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x8(%rax) movl -0x4c(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x740(%rax), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x18(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x10(%rbp), %rax movl 0x618(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x9c04b cmpq $0x0, 0x10(%rbp) je 0x9c04b movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rax movl 0x14(%rax), %eax addq %rax, %rsi movq 0x10(%rbp), %rdx callq 0x46a00 movl %eax, %ecx movq -0x18(%rbp), %rax addl 0x14(%rax), %ecx movl %ecx, 0x14(%rax) jmp 0x9c04d jmp 0x9c04f jmp 0x9c051 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xb0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_sp_make_key: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_1C] imul rcx, 118h add rax, rcx mov [rbp+var_48], rax mov [rbp+var_4C], 0 mov rax, [rbp+var_48] mov rax, [rax+0C0h] add rax, 0FFFFFFFFFFFFFFE0h mov [rbp+var_40], rax mov rax, [rbp+var_30] mov rcx, [rbp+var_40] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_58], rax mov rcx, [rbp+var_28] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_40] movzx edi, byte ptr [rax+1Ah] mov rsi, [rbp+var_58] call _ma_calc_blob_length mov [rbp+var_5C], eax mov rax, [rbp+var_58] mov rcx, [rbp+var_40] movzx ecx, byte ptr [rcx+1Ah] movsxd rcx, ecx mov rax, [rax+rcx] mov [rbp+var_68], rax cmp [rbp+var_68], 0 jnz short loc_9BE26 call _my_thread_var mov dword ptr [rax], 9Eh mov [rbp+var_8], 0 jmp loc_9C059 loc_9BE26: mov rdi, [rbp+var_68] add rdi, 4 mov esi, [rbp+var_5C] sub esi, 4 lea rcx, [rbp+var_90] mov edx, 2 call sp_mbr_from_wkb mov [rbp+var_94], 0 mov rax, [rbp+var_48] mov rax, [rax+0C0h] mov [rbp+var_40], rax loc_9BE5E: mov rax, [rbp+var_40] cmp byte ptr [rax+18h], 0 jz loc_9BFC2 mov rax, [rbp+var_40] movzx eax, word ptr [rax+14h] mov [rbp+var_98], eax mov rax, [rbp+var_40] mov eax, [rax+8] mov [rbp+var_9C], eax jmp short $+2 loc_9BE89: jmp short $+2 loc_9BE8B: jmp short $+2 loc_9BE8D: jmp short $+2 loc_9BE8F: jmp short $+2 loc_9BE91: jmp short $+2 loc_9BE93: jmp short $+2 loc_9BE95: mov eax, [rbp+var_9C] shr rax, 3 movsd xmm0, [rbp+rax*8+var_90] movsd [rbp+var_A8], xmm0 movsd xmm0, [rbp+var_A8] ucomisd xmm0, xmm0 setp al test al, 1 jnz short loc_9BEC5 jmp short loc_9BEFC loc_9BEC5: mov rdi, [rbp+var_28] mov eax, [rbp+var_98] mov edx, eax xor esi, esi call _memset mov ecx, [rbp+var_98] mov rax, [rbp+var_28] mov ecx, ecx add rax, rcx mov [rbp+var_28], rax mov eax, [rbp+var_98] add eax, [rbp+var_4C] mov [rbp+var_4C], eax jmp loc_9BFA2 loc_9BEFC: mov rax, [rbp+var_40] movzx eax, word ptr [rax+12h] and eax, 40h cmp eax, 0 jz short loc_9BF75 mov cl, byte ptr [rbp+var_A8+7] mov rax, [rbp+var_28] mov [rax], cl mov cl, byte ptr [rbp+var_A8+6] mov rax, [rbp+var_28] mov [rax+1], cl mov cl, byte ptr [rbp+var_A8+5] mov rax, [rbp+var_28] mov [rax+2], cl mov cl, byte ptr [rbp+var_A8+4] mov rax, [rbp+var_28] mov [rax+3], cl mov cl, byte ptr [rbp+var_A8+3] mov rax, [rbp+var_28] mov [rax+4], cl mov cl, byte ptr [rbp+var_A8+2] mov rax, [rbp+var_28] mov [rax+5], cl mov cl, byte ptr [rbp+var_A8+1] mov rax, [rbp+var_28] mov [rax+6], cl mov cl, byte ptr [rbp+var_A8] mov rax, [rbp+var_28] mov [rax+7], cl jmp short loc_9BF83 loc_9BF75: mov rax, [rbp+var_28] mov rcx, [rbp+var_A8] mov [rax], rcx loc_9BF83: mov ecx, [rbp+var_98] mov rax, [rbp+var_28] mov ecx, ecx add rax, rcx mov [rbp+var_28], rax mov eax, [rbp+var_98] add eax, [rbp+var_4C] mov [rbp+var_4C], eax loc_9BFA2: mov rax, [rbp+var_40] add rax, 20h ; ' ' mov [rbp+var_40], rax mov eax, [rbp+var_94] add eax, 1 mov [rbp+var_94], eax jmp loc_9BE5E loc_9BFC2: mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] call _ma_dpointer mov rcx, [rbp+var_48] mov rax, [rbp+var_18] mov [rax+8], rcx mov ecx, [rbp+var_4C] mov rax, [rbp+var_18] mov [rax+10h], ecx mov rax, [rbp+var_10] mov rax, [rax] mov ecx, [rax+740h] mov rax, [rbp+var_18] mov [rax+14h], ecx mov rax, [rbp+var_18] mov dword ptr [rax+18h], 0 mov rax, [rbp+var_10] mov eax, [rax+618h] and eax, 1 cmp eax, 0 jz short loc_9C04B cmp [rbp+arg_0], 0 jz short loc_9C04B mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rax, [rbp+var_18] mov eax, [rax+14h] add rsi, rax mov rdx, [rbp+arg_0] call transid_store_packed mov ecx, eax mov rax, [rbp+var_18] add ecx, [rax+14h] mov [rax+14h], ecx loc_9C04B: jmp short $+2 loc_9C04D: jmp short $+2 loc_9C04F: jmp short $+2 loc_9C051: mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_9C059: mov rax, [rbp+var_8] add rsp, 0B0h pop rbp retn
_QWORD * ma_sp_make_key( long long a1, _QWORD *a2, unsigned int a3, _BYTE *a4, long long a5, long long a6, long long a7) { long long v7; // rdi int v8; // eax long long v10; // [rsp+8h] [rbp-A8h] unsigned int v11; // [rsp+18h] [rbp-98h] int v12; // [rsp+1Ch] [rbp-94h] _QWORD v13[5]; // [rsp+20h] [rbp-90h] BYREF long long v14; // [rsp+48h] [rbp-68h] int v15; // [rsp+54h] [rbp-5Ch] unsigned __int8 *v16; // [rsp+58h] [rbp-58h] int v17; // [rsp+64h] [rbp-4Ch] long long v18; // [rsp+68h] [rbp-48h] long long v19; // [rsp+70h] [rbp-40h] long long v20; // [rsp+78h] [rbp-38h] long long v21; // [rsp+80h] [rbp-30h] _BYTE *v22; // [rsp+88h] [rbp-28h] unsigned int v23; // [rsp+94h] [rbp-1Ch] _QWORD *v24; // [rsp+98h] [rbp-18h] long long v25; // [rsp+A0h] [rbp-10h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = a5; v20 = a6; v18 = 280LL * a3 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL); v17 = 0; v19 = *(_QWORD *)(v18 + 192) - 32LL; v16 = (unsigned __int8 *)(*(unsigned int *)(v19 + 8) + a5); *a2 = a4; v7 = *(unsigned __int8 *)(v19 + 26); v15 = ma_calc_blob_length(v7, v16); v14 = *(_QWORD *)&v16[*(unsigned __int8 *)(v19 + 26)]; if ( v14 ) { sp_mbr_from_wkb(v14 + 4, (unsigned int)(v15 - 4), 2LL, v13); v12 = 0; v19 = *(_QWORD *)(v18 + 192); while ( *(_BYTE *)(v19 + 24) ) { v11 = *(unsigned __int16 *)(v19 + 20); v10 = v13[(unsigned long long)*(unsigned int *)(v19 + 8) >> 3]; if ( (*(_WORD *)(v19 + 18) & 0x40) != 0 ) { *v22 = HIBYTE(v10); v22[1] = BYTE6(v10); v22[2] = BYTE5(v10); v22[3] = BYTE4(v10); v22[4] = BYTE3(v10); v22[5] = BYTE2(v10); v22[6] = BYTE1(v10); v22[7] = v10; } else { *(_QWORD *)v22 = v10; } v22 += v11; v17 += v11; v19 += 32LL; ++v12; } ma_dpointer(*(_QWORD *)v25, v22, v20); v24[1] = v18; *((_DWORD *)v24 + 4) = v17; *(_QWORD *)((char *)v24 + 20) = *(unsigned int *)(*(_QWORD *)v25 + 1856LL); if ( (*(_DWORD *)(v25 + 1560) & 1) != 0 && a7 ) { v8 = transid_store_packed(v25, &v22[*((unsigned int *)v24 + 5)], a7); *((_DWORD *)v24 + 5) += v8; } return v24; } else { *(_DWORD *)my_thread_var(v7, (const char *)v16) = 158; return 0LL; } }
_ma_sp_make_key: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV dword ptr [RBP + -0x4c],0x0 MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0xc0] ADD RAX,-0x20 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x40] MOVZX EDI,byte ptr [RAX + 0x1a] MOV RSI,qword ptr [RBP + -0x58] CALL 0x00152560 MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x40] MOVZX ECX,byte ptr [RCX + 0x1a] MOVSXD RCX,ECX MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x68],RAX CMP qword ptr [RBP + -0x68],0x0 JNZ 0x0019be26 CALL 0x001f6060 MOV dword ptr [RAX],0x9e MOV qword ptr [RBP + -0x8],0x0 JMP 0x0019c059 LAB_0019be26: MOV RDI,qword ptr [RBP + -0x68] ADD RDI,0x4 MOV ESI,dword ptr [RBP + -0x5c] SUB ESI,0x4 LEA RCX,[RBP + -0x90] MOV EDX,0x2 CALL 0x0019c070 MOV dword ptr [RBP + -0x94],0x0 MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0xc0] MOV qword ptr [RBP + -0x40],RAX LAB_0019be5e: MOV RAX,qword ptr [RBP + -0x40] CMP byte ptr [RAX + 0x18],0x0 JZ 0x0019bfc2 MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x98],EAX MOV RAX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x9c],EAX JMP 0x0019be89 LAB_0019be89: JMP 0x0019be8b LAB_0019be8b: JMP 0x0019be8d LAB_0019be8d: JMP 0x0019be8f LAB_0019be8f: JMP 0x0019be91 LAB_0019be91: JMP 0x0019be93 LAB_0019be93: JMP 0x0019be95 LAB_0019be95: MOV EAX,dword ptr [RBP + -0x9c] SHR RAX,0x3 MOVSD XMM0,qword ptr [RBP + RAX*0x8 + -0x90] MOVSD qword ptr [RBP + -0xa8],XMM0 MOVSD XMM0,qword ptr [RBP + -0xa8] UCOMISD XMM0,XMM0 SETP AL TEST AL,0x1 JNZ 0x0019bec5 JMP 0x0019befc LAB_0019bec5: MOV RDI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x98] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 MOV ECX,dword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x98] ADD EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x0019bfa2 LAB_0019befc: MOV RAX,qword ptr [RBP + -0x40] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x40 CMP EAX,0x0 JZ 0x0019bf75 MOV CL,byte ptr [RBP + -0xa1] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],CL MOV CL,byte ptr [RBP + -0xa2] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],CL MOV CL,byte ptr [RBP + -0xa3] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x2],CL MOV CL,byte ptr [RBP + -0xa4] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x3],CL MOV CL,byte ptr [RBP + -0xa5] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x4],CL MOV CL,byte ptr [RBP + -0xa6] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x5],CL MOV CL,byte ptr [RBP + -0xa7] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x6],CL MOV CL,byte ptr [RBP + -0xa8] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x7],CL JMP 0x0019bf83 LAB_0019bf75: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0xa8] MOV qword ptr [RAX],RCX LAB_0019bf83: MOV ECX,dword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x98] ADD EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x4c],EAX LAB_0019bfa2: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x20 MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x94] ADD EAX,0x1 MOV dword ptr [RBP + -0x94],EAX JMP 0x0019be5e LAB_0019bfc2: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00195d80 MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x740] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x618] AND EAX,0x1 CMP EAX,0x0 JZ 0x0019c04b CMP qword ptr [RBP + 0x10],0x0 JZ 0x0019c04b MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x14] ADD RSI,RAX MOV RDX,qword ptr [RBP + 0x10] CALL 0x00146a00 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] ADD ECX,dword ptr [RAX + 0x14] MOV dword ptr [RAX + 0x14],ECX LAB_0019c04b: JMP 0x0019c04d LAB_0019c04d: JMP 0x0019c04f LAB_0019c04f: JMP 0x0019c051 LAB_0019c051: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_0019c059: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xb0 POP RBP RET
int8 * _ma_sp_make_key(long *param_1,int8 *param_2,uint param_3,double *param_4,long param_5, int8 param_6,long param_7) { double dVar1; long lVar2; uint uVar3; int iVar4; int4 *puVar5; int1 local_b0; int1 uStack_af; int1 uStack_ae; int1 uStack_ad; int1 uStack_ac; int1 uStack_ab; int1 uStack_aa; int1 uStack_a9; double local_98 [5]; long local_70; int local_64; long local_60; int local_54; long local_50; long local_48; int8 local_40; long local_38; double *local_30; uint local_24; int8 *local_20; long *local_18; int8 *local_10; local_50 = *(long *)(*param_1 + 0x570) + (ulong)param_3 * 0x118; local_54 = 0; lVar2 = *(long *)(local_50 + 0xc0); local_48 = lVar2 + -0x20; local_60 = param_5 + (ulong)*(uint *)(lVar2 + -0x18); *param_2 = param_4; local_40 = param_6; local_38 = param_5; local_30 = param_4; local_24 = param_3; local_20 = param_2; local_18 = param_1; local_64 = _ma_calc_blob_length(*(int1 *)(lVar2 + -6),local_60); local_70 = *(long *)(local_60 + (int)(uint)*(byte *)(local_48 + 0x1a)); if (local_70 == 0) { puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x9e; local_10 = (int8 *)0x0; } else { sp_mbr_from_wkb(local_70 + 4,local_64 + -4,2,local_98); for (local_48 = *(long *)(local_50 + 0xc0); *(char *)(local_48 + 0x18) != '\0'; local_48 = local_48 + 0x20) { uVar3 = (uint)*(ushort *)(local_48 + 0x14); dVar1 = local_98[*(uint *)(local_48 + 8) >> 3]; if (NAN(dVar1)) { memset(local_30,0,(ulong)uVar3); local_30 = (double *)((long)local_30 + (ulong)uVar3); local_54 = uVar3 + local_54; } else { if ((*(ushort *)(local_48 + 0x12) & 0x40) == 0) { *local_30 = dVar1; } else { uStack_a9 = (int1)((ulong)dVar1 >> 0x38); *(int1 *)local_30 = uStack_a9; uStack_aa = (int1)((ulong)dVar1 >> 0x30); *(int1 *)((long)local_30 + 1) = uStack_aa; uStack_ab = (int1)((ulong)dVar1 >> 0x28); *(int1 *)((long)local_30 + 2) = uStack_ab; uStack_ac = (int1)((ulong)dVar1 >> 0x20); *(int1 *)((long)local_30 + 3) = uStack_ac; uStack_ad = (int1)((ulong)dVar1 >> 0x18); *(int1 *)((long)local_30 + 4) = uStack_ad; uStack_ae = (int1)((ulong)dVar1 >> 0x10); *(int1 *)((long)local_30 + 5) = uStack_ae; uStack_af = (int1)((ulong)dVar1 >> 8); *(int1 *)((long)local_30 + 6) = uStack_af; local_b0 = SUB81(dVar1,0); *(int1 *)((long)local_30 + 7) = local_b0; } local_30 = (double *)((long)local_30 + (ulong)uVar3); local_54 = uVar3 + local_54; } } _ma_dpointer(*local_18,local_30,local_40); local_20[1] = local_50; *(int *)(local_20 + 2) = local_54; *(int4 *)((long)local_20 + 0x14) = *(int4 *)(*local_18 + 0x740); *(int4 *)(local_20 + 3) = 0; if (((*(uint *)(local_18 + 0xc3) & 1) != 0) && (param_7 != 0)) { iVar4 = transid_store_packed (local_18,(long)local_30 + (ulong)*(uint *)((long)local_20 + 0x14),param_7); *(int *)((long)local_20 + 0x14) = iVar4 + *(int *)((long)local_20 + 0x14); } local_10 = local_20; } return local_10; }