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
39,200
string_get_tzoffset
bluesky950520[P]quickjs/quickjs.c
static BOOL string_get_tzoffset(const uint8_t *sp, int *pp, int *tzp, BOOL strict) { int tz = 0, sgn, hh, mm, p = *pp; sgn = sp[p++]; if (sgn == '+' || sgn == '-') { int n = p; if (!string_get_digits(sp, &p, &hh, 1, 9)) return FALSE; n = p - n; if (strict && n != 2 && n != 4) return FALSE; while (n > 4) { n -= 2; hh /= 100; } if (n > 2) { mm = hh % 100; hh = hh / 100; } else { mm = 0; if (string_skip_char(sp, &p, ':') /* optional separator */ && !string_get_digits(sp, &p, &mm, 2, 2)) return FALSE; } if (hh > 23 || mm > 59) return FALSE; tz = hh * 60 + mm; if (sgn != '+') tz = -tz; } else if (sgn != 'Z') { return FALSE; } *pp = p; *tzp = tz; return TRUE; }
O3
c
string_get_tzoffset: pushq %rbp pushq %r15 pushq %r14 pushq %rbx movslq (%rsi), %r11 leal 0x1(%r11), %ebx movzbl (%rdi,%r11), %r8d cmpl $0x2b, %r8d je 0x5a596 xorl %eax, %eax cmpl $0x5a, %r8d je 0x5a5e8 cmpl $0x2d, %r8d jne 0x5a5f5 movslq %ebx, %r14 leal 0xa(%r11), %r9d addq %rdi, %r14 xorl %eax, %eax xorl %r10d, %r10d movzbl (%r14,%rax), %r15d leal -0x30(%r15), %ebp cmpb $0x9, %bpl ja 0x5a5ca leal (%r10,%r10,4), %r10d leal (%r15,%r10,2), %r10d addl $-0x30, %r10d incq %rax cmpl $0x9, %eax jne 0x5a5a5 jmp 0x5a5cf addl %ebx, %eax movl %eax, %r9d movl %r9d, %eax subl %ebx, %eax jle 0x5a5e4 testl %ecx, %ecx je 0x5a5fc cmpl $0x2, %eax je 0x5a5fc cmpl $0x4, %eax je 0x5a5fc xorl %eax, %eax jmp 0x5a5f5 movl %ebx, %r9d movl %r9d, (%rsi) movl %eax, (%rdx) movl $0x1, %eax popq %rbx popq %r14 popq %r15 popq %rbp retq cmpl $0x5, %eax jl 0x5a62b movl %r9d, %eax subl %r11d, %eax incl %eax movslq %r10d, %rcx imulq $0x51eb851f, %rcx, %r10 # imm = 0x51EB851F movq %r10, %rcx shrq $0x3f, %rcx sarq $0x25, %r10 addl %ecx, %r10d addl $-0x2, %eax cmpl $0x6, %eax ja 0x5a609 jmp 0x5a630 cmpl $0x3, %eax jl 0x5a674 movslq %r10d, %rcx imulq $0x51eb851f, %rcx, %r10 # imm = 0x51EB851F movq %r10, %rax shrq $0x3f, %rax sarq $0x25, %r10 addl %eax, %r10d imull $0x64, %r10d, %eax subl %eax, %ecx cmpl $0x17, %r10d jg 0x5a5e4 movl $0x0, %eax cmpl $0x3b, %ecx jg 0x5a5f5 imull $0x3c, %r10d, %edi addl %ecx, %edi movl %edi, %eax negl %eax cmpb $0x2b, %r8b cmovel %edi, %eax jmp 0x5a5eb movslq %r9d, %rax xorl %ecx, %ecx cmpb $0x3a, (%rdi,%rax) jne 0x5a64e leal 0x1(%r9), %eax movslq %eax, %rcx addl $0x3, %r9d addq %rcx, %rdi xorl %r11d, %r11d xorl %ecx, %ecx movzbl (%rdi,%r11), %ebx leal -0x30(%rbx), %ebp cmpb $0x9, %bpl ja 0x5a6b4 leal (%rcx,%rcx,4), %ecx leal (%rbx,%rcx,2), %ecx addl $-0x30, %ecx incq %r11 cmpl $0x2, %r11d jne 0x5a692 jmp 0x5a6ba addl %eax, %r11d movl %r11d, %r9d movl %r9d, %edi subl %eax, %edi xorl %eax, %eax cmpl $0x2, %edi jl 0x5a5f5 jmp 0x5a64e
string_get_tzoffset: push rbp push r15 push r14 push rbx movsxd r11, dword ptr [rsi] lea ebx, [r11+1] movzx r8d, byte ptr [rdi+r11] cmp r8d, 2Bh ; '+' jz short loc_5A596 xor eax, eax cmp r8d, 5Ah ; 'Z' jz short loc_5A5E8 cmp r8d, 2Dh ; '-' jnz short loc_5A5F5 loc_5A596: movsxd r14, ebx lea r9d, [r11+0Ah] add r14, rdi xor eax, eax xor r10d, r10d loc_5A5A5: movzx r15d, byte ptr [r14+rax] lea ebp, [r15-30h] cmp bpl, 9 ja short loc_5A5CA lea r10d, [r10+r10*4] lea r10d, [r15+r10*2] add r10d, 0FFFFFFD0h inc rax cmp eax, 9 jnz short loc_5A5A5 jmp short loc_5A5CF loc_5A5CA: add eax, ebx mov r9d, eax loc_5A5CF: mov eax, r9d sub eax, ebx jle short loc_5A5E4 test ecx, ecx jz short loc_5A5FC cmp eax, 2 jz short loc_5A5FC cmp eax, 4 jz short loc_5A5FC loc_5A5E4: xor eax, eax jmp short loc_5A5F5 loc_5A5E8: mov r9d, ebx loc_5A5EB: mov [rsi], r9d mov [rdx], eax mov eax, 1 loc_5A5F5: pop rbx pop r14 pop r15 pop rbp retn loc_5A5FC: cmp eax, 5 jl short loc_5A62B mov eax, r9d sub eax, r11d inc eax loc_5A609: movsxd rcx, r10d imul r10, rcx, 51EB851Fh mov rcx, r10 shr rcx, 3Fh sar r10, 25h add r10d, ecx add eax, 0FFFFFFFEh cmp eax, 6 ja short loc_5A609 jmp short loc_5A630 loc_5A62B: cmp eax, 3 jl short loc_5A674 loc_5A630: movsxd rcx, r10d imul r10, rcx, 51EB851Fh mov rax, r10 shr rax, 3Fh sar r10, 25h add r10d, eax imul eax, r10d, 64h ; 'd' sub ecx, eax loc_5A64E: cmp r10d, 17h jg short loc_5A5E4 mov eax, 0 cmp ecx, 3Bh ; ';' jg short loc_5A5F5 imul edi, r10d, 3Ch ; '<' add edi, ecx mov eax, edi neg eax cmp r8b, 2Bh ; '+' cmovz eax, edi jmp loc_5A5EB loc_5A674: movsxd rax, r9d xor ecx, ecx cmp byte ptr [rdi+rax], 3Ah ; ':' jnz short loc_5A64E lea eax, [r9+1] movsxd rcx, eax add r9d, 3 add rdi, rcx xor r11d, r11d xor ecx, ecx loc_5A692: movzx ebx, byte ptr [rdi+r11] lea ebp, [rbx-30h] cmp bpl, 9 ja short loc_5A6B4 lea ecx, [rcx+rcx*4] lea ecx, [rbx+rcx*2] add ecx, 0FFFFFFD0h inc r11 cmp r11d, 2 jnz short loc_5A692 jmp short loc_5A6BA loc_5A6B4: add r11d, eax mov r9d, r11d loc_5A6BA: mov edi, r9d sub edi, eax xor eax, eax cmp edi, 2 jl loc_5A5F5 jmp short loc_5A64E
long long string_get_tzoffset(long long a1, int *a2, _DWORD *a3, int a4) { long long v4; // r11 int v5; // ebx int v6; // r8d long long result; // rax int v8; // r9d long long v9; // rax int v10; // r10d int v11; // r15d int v12; // eax unsigned int v13; // eax int v14; // ecx int v15; // ecx int v16; // eax long long v17; // rdi long long v18; // r11 int v19; // ebx int v20; // edi v4 = *a2; v5 = v4 + 1; v6 = *(unsigned __int8 *)(a1 + v4); if ( v6 != 43 ) { result = 0LL; if ( v6 == 90 ) { v8 = v4 + 1; LABEL_15: *a2 = v8; *a3 = result; return 1LL; } if ( v6 != 45 ) return result; } v8 = v4 + 10; v9 = 0LL; v10 = 0; while ( 1 ) { v11 = *(unsigned __int8 *)(a1 + v5 + v9); if ( (unsigned __int8)(v11 - 48) > 9u ) break; v10 = v11 + 10 * v10 - 48; if ( (_DWORD)++v9 == 9 ) goto LABEL_9; } v8 = v5 + v9; LABEL_9: v12 = v8 - v5; if ( v8 <= v5 || a4 && v12 != 2 && v12 != 4 ) return 0LL; if ( v12 < 5 ) { if ( v12 < 3 ) { v15 = 0; if ( *(_BYTE *)(a1 + v8) == 58 ) { v16 = v8 + 1; v8 += 3; v17 = v16 + a1; v18 = 0LL; v15 = 0; while ( 1 ) { v19 = *(unsigned __int8 *)(v17 + v18); if ( (unsigned __int8)(v19 - 48) > 9u ) break; v15 = v19 + 10 * v15 - 48; if ( (_DWORD)++v18 == 2 ) goto LABEL_34; } v8 = v16 + v18; LABEL_34: v20 = v8 - v16; result = 0LL; if ( v20 < 2 ) return result; } goto LABEL_23; } } else { v13 = v8 - v4 + 1; do { v10 /= 100; v13 -= 2; } while ( v13 > 6 ); } v14 = v10; v10 /= 100; v15 = v14 - 100 * v10; LABEL_23: if ( v10 > 23 ) return 0LL; result = 0LL; if ( v15 <= 59 ) { LODWORD(result) = -(v15 + 60 * v10); if ( (_BYTE)v6 == 43 ) LODWORD(result) = v15 + 60 * v10; goto LABEL_15; } return result; }
string_get_tzoffset: PUSH RBP PUSH R15 PUSH R14 PUSH RBX MOVSXD R11,dword ptr [RSI] LEA EBX,[R11 + 0x1] MOVZX R8D,byte ptr [RDI + R11*0x1] CMP R8D,0x2b JZ 0x0015a596 XOR EAX,EAX CMP R8D,0x5a JZ 0x0015a5e8 CMP R8D,0x2d JNZ 0x0015a5f5 LAB_0015a596: MOVSXD R14,EBX LEA R9D,[R11 + 0xa] ADD R14,RDI XOR EAX,EAX XOR R10D,R10D LAB_0015a5a5: MOVZX R15D,byte ptr [R14 + RAX*0x1] LEA EBP,[R15 + -0x30] CMP BPL,0x9 JA 0x0015a5ca LEA R10D,[R10 + R10*0x4] LEA R10D,[R15 + R10*0x2] ADD R10D,-0x30 INC RAX CMP EAX,0x9 JNZ 0x0015a5a5 JMP 0x0015a5cf LAB_0015a5ca: ADD EAX,EBX MOV R9D,EAX LAB_0015a5cf: MOV EAX,R9D SUB EAX,EBX JLE 0x0015a5e4 TEST ECX,ECX JZ 0x0015a5fc CMP EAX,0x2 JZ 0x0015a5fc CMP EAX,0x4 JZ 0x0015a5fc LAB_0015a5e4: XOR EAX,EAX JMP 0x0015a5f5 LAB_0015a5e8: MOV R9D,EBX LAB_0015a5eb: MOV dword ptr [RSI],R9D MOV dword ptr [RDX],EAX MOV EAX,0x1 LAB_0015a5f5: POP RBX POP R14 POP R15 POP RBP RET LAB_0015a5fc: CMP EAX,0x5 JL 0x0015a62b MOV EAX,R9D SUB EAX,R11D INC EAX LAB_0015a609: MOVSXD RCX,R10D IMUL R10,RCX,0x51eb851f MOV RCX,R10 SHR RCX,0x3f SAR R10,0x25 ADD R10D,ECX ADD EAX,-0x2 CMP EAX,0x6 JA 0x0015a609 JMP 0x0015a630 LAB_0015a62b: CMP EAX,0x3 JL 0x0015a674 LAB_0015a630: MOVSXD RCX,R10D IMUL R10,RCX,0x51eb851f MOV RAX,R10 SHR RAX,0x3f SAR R10,0x25 ADD R10D,EAX IMUL EAX,R10D,0x64 SUB ECX,EAX LAB_0015a64e: CMP R10D,0x17 JG 0x0015a5e4 MOV EAX,0x0 CMP ECX,0x3b JG 0x0015a5f5 IMUL EDI,R10D,0x3c ADD EDI,ECX MOV EAX,EDI NEG EAX CMP R8B,0x2b CMOVZ EAX,EDI JMP 0x0015a5eb LAB_0015a674: MOVSXD RAX,R9D XOR ECX,ECX CMP byte ptr [RDI + RAX*0x1],0x3a JNZ 0x0015a64e LEA EAX,[R9 + 0x1] MOVSXD RCX,EAX ADD R9D,0x3 ADD RDI,RCX XOR R11D,R11D XOR ECX,ECX LAB_0015a692: MOVZX EBX,byte ptr [RDI + R11*0x1] LEA EBP,[RBX + -0x30] CMP BPL,0x9 JA 0x0015a6b4 LEA ECX,[RCX + RCX*0x4] LEA ECX,[RBX + RCX*0x2] ADD ECX,-0x30 INC R11 CMP R11D,0x2 JNZ 0x0015a692 JMP 0x0015a6ba LAB_0015a6b4: ADD R11D,EAX MOV R9D,R11D LAB_0015a6ba: MOV EDI,R9D SUB EDI,EAX XOR EAX,EAX CMP EDI,0x2 JL 0x0015a5f5 JMP 0x0015a64e
int8 string_get_tzoffset(long param_1,int *param_2,int *param_3,int param_4) { char cVar1; byte bVar2; int iVar3; uint uVar4; long lVar5; int8 uVar6; int iVar7; int iVar8; int iVar9; int iVar10; iVar7 = *param_2; iVar8 = iVar7 + 1; cVar1 = *(char *)(param_1 + iVar7); if (cVar1 == '+') { LAB_0015a596: iVar9 = iVar7 + 10; lVar5 = 0; iVar10 = 0; do { bVar2 = *(byte *)(iVar8 + param_1 + lVar5); if (9 < (byte)(bVar2 - 0x30)) { iVar9 = (int)lVar5 + iVar8; break; } iVar10 = (uint)bVar2 + iVar10 * 10 + -0x30; lVar5 = lVar5 + 1; } while ((int)lVar5 != 9); iVar3 = iVar9 - iVar8; if ((iVar8 < iVar9) && (((param_4 == 0 || (iVar3 == 2)) || (iVar3 == 4)))) { if (iVar3 < 5) { if (2 < iVar3) goto LAB_0015a630; iVar7 = 0; if (*(char *)(param_1 + iVar9) == ':') { iVar8 = iVar9 + 1; iVar9 = iVar9 + 3; lVar5 = 0; iVar7 = 0; do { bVar2 = *(byte *)(param_1 + iVar8 + lVar5); if (9 < (byte)(bVar2 - 0x30)) { iVar9 = (int)lVar5 + iVar8; break; } iVar7 = (uint)bVar2 + iVar7 * 10 + -0x30; lVar5 = lVar5 + 1; } while ((int)lVar5 != 2); if (iVar9 - iVar8 < 2) { return 0; } } } else { uVar4 = (iVar9 - iVar7) + 1; do { iVar10 = iVar10 / 100; uVar4 = uVar4 - 2; } while (6 < uVar4); LAB_0015a630: iVar7 = iVar10 % 100; iVar10 = iVar10 / 100; } if (iVar10 < 0x18) { if (0x3b < iVar7) { return 0; } iVar7 = iVar10 * 0x3c + iVar7; iVar10 = -iVar7; if (cVar1 == '+') { iVar10 = iVar7; } goto LAB_0015a5eb; } } uVar6 = 0; } else { iVar9 = iVar8; iVar10 = 0; if (cVar1 != 'Z') { if (cVar1 != '-') { return 0; } goto LAB_0015a596; } LAB_0015a5eb: *param_2 = iVar9; *param_3 = iVar10; uVar6 = 1; } return uVar6; }
39,201
gzstreambuf::open(char const*, int, int)
iqtree3/utils/gzstream.cpp
gzstreambuf* gzstreambuf::open( const char* name, int open_mode, int compression_level) { if ( is_open()) return (gzstreambuf*)0; mode = open_mode; // no append nor read/write mode if ((mode & std::ios::ate) || (mode & std::ios::app) || ((mode & std::ios::in) && (mode & std::ios::out))) return (gzstreambuf*)0; char fmode[10]; char* fmodeptr = fmode; if ( mode & std::ios::in) *fmodeptr++ = 'r'; else if ( mode & std::ios::out) *fmodeptr++ = 'w'; *fmodeptr++ = 'b'; if (mode & GZ_NO_COMPRESSION) *fmodeptr++ = '0'; // no compression else *fmodeptr++ = '1'; // fast compression ratio *fmodeptr = '\0'; //BEGIN - Figure out length of the compressed file if ( mode & std::ios::in) { FILE *fp = fopen(name, "rb"); if (fp) { fseek(fp, 0, SEEK_END); #if defined(WIN64) compressed_length = _ftelli64(fp); #elif defined(WIN32) compressed_length = ftell(fp); #else compressed_length = ftello(fp); #endif fclose(fp); } } //FINISH - Determining compressed_length file = gzopen( name, fmode); if (file == 0) { return (gzstreambuf*)0; } opened = 1; if ( mode & std::ios::out) { gzsetparams(file, compression_level, Z_DEFAULT_STRATEGY ); } return this; }
O3
cpp
gzstreambuf::open(char const*, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp cmpb $0x0, 0x177(%rdi) jne 0x2969c movq %rdi, %rbx movl %edx, 0x178(%rdi) testb $0x3, %dl jne 0x2969c movl %edx, %eax notl %eax testb $0x18, %al je 0x2969c movl %ecx, %ebp movq %rsi, %r14 testb $0x8, %dl jne 0x295f3 testb $0x10, %dl jne 0x2964b leaq 0xe(%rsp), %rax jmp 0x29654 movw $0x6272, 0xe(%rsp) # imm = 0x6272 btl $0xb, %edx setae %al orb $0x30, %al movb %al, 0x10(%rsp) movb $0x0, 0x11(%rsp) leaq 0x29d4(%rip), %rsi # 0x2bfe7 movq %r14, %rdi callq 0x15390 testq %rax, %rax je 0x29668 movq %rax, %r15 movq %rax, %rdi xorl %esi, %esi movl $0x2, %edx callq 0x15330 movq %r15, %rdi callq 0x153e0 movq %rax, 0x180(%rbx) movq %r15, %rdi callq 0x152c0 jmp 0x29668 leaq 0xf(%rsp), %rax movb $0x77, -0x1(%rax) movb $0x62, (%rax) btl $0xb, %edx setae %cl orb $0x30, %cl movb %cl, 0x1(%rax) movb $0x0, 0x2(%rax) leaq 0xe(%rsp), %rsi movq %r14, %rdi callq 0x15480 movq %rax, 0x40(%rbx) testq %rax, %rax je 0x2969c movb $0x1, 0x177(%rbx) testb $0x10, 0x178(%rbx) je 0x2969e movq %rax, %rdi movl %ebp, %esi xorl %edx, %edx callq 0x15490 jmp 0x2969e xorl %ebx, %ebx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN11gzstreambuf4openEPKcii: push rbp push r15 push r14 push rbx sub rsp, 18h cmp byte ptr [rdi+177h], 0 jnz loc_2969C mov rbx, rdi mov [rdi+178h], edx test dl, 3 jnz loc_2969C mov eax, edx not eax test al, 18h jz loc_2969C mov ebp, ecx mov r14, rsi test dl, 8 jnz short loc_295F3 test dl, 10h jnz short loc_2964B lea rax, [rsp+38h+var_2A] jmp short loc_29654 loc_295F3: mov [rsp+38h+var_2A], 6272h bt edx, 0Bh setnb al or al, 30h mov [rsp+38h+var_28], al mov [rsp+38h+var_27], 0 lea rsi, aRb; "rb" mov rdi, r14 call _fopen test rax, rax jz short loc_29668 mov r15, rax mov rdi, rax xor esi, esi mov edx, 2 call _fseek mov rdi, r15 call _ftello mov [rbx+180h], rax mov rdi, r15 call _fclose jmp short loc_29668 loc_2964B: lea rax, [rsp+38h+var_2A+1] mov byte ptr [rax-1], 77h ; 'w' loc_29654: mov byte ptr [rax], 62h ; 'b' bt edx, 0Bh setnb cl or cl, 30h mov [rax+1], cl mov byte ptr [rax+2], 0 loc_29668: lea rsi, [rsp+38h+var_2A] mov rdi, r14 call _gzopen mov [rbx+40h], rax test rax, rax jz short loc_2969C mov byte ptr [rbx+177h], 1 test byte ptr [rbx+178h], 10h jz short loc_2969E mov rdi, rax mov esi, ebp xor edx, edx call _gzsetparams jmp short loc_2969E loc_2969C: xor ebx, ebx loc_2969E: mov rax, rbx add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn
gzstreambuf * gzstreambuf::open(gzstreambuf *this, const char *a2, int a3, unsigned int a4) { gzstreambuf *v4; // rbx __int16 *v6; // rax long long v7; // rax long long v8; // r15 long long v9; // rax __int16 v11; // [rsp+Eh] [rbp-2Ah] BYREF char v12; // [rsp+10h] [rbp-28h] char v13; // [rsp+11h] [rbp-27h] if ( *((_BYTE *)this + 375) ) return 0LL; v4 = this; *((_DWORD *)this + 94) = a3; if ( (a3 & 3) != 0 || (~(_BYTE)a3 & 0x18) == 0 ) return 0LL; if ( (a3 & 8) != 0 ) { v11 = 25202; v12 = ((a3 & 0x800) == 0) | 0x30; v13 = 0; v7 = fopen(a2, "rb"); if ( v7 ) { v8 = v7; fseek(v7, 0LL, 2LL); *((_QWORD *)this + 48) = ftello(v8); fclose(v8); } } else { if ( (a3 & 0x10) != 0 ) { v6 = (__int16 *)((char *)&v11 + 1); LOBYTE(v11) = 119; } else { v6 = &v11; } *(_BYTE *)v6 = 98; *((_BYTE *)v6 + 1) = ((a3 & 0x800) == 0) | 0x30; *((_BYTE *)v6 + 2) = 0; } v9 = gzopen(a2, &v11); *((_QWORD *)this + 8) = v9; if ( !v9 ) return 0LL; *((_BYTE *)this + 375) = 1; if ( (*((_BYTE *)this + 376) & 0x10) != 0 ) gzsetparams(v9, a4, 0LL); return v4; }
open: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 CMP byte ptr [RDI + 0x177],0x0 JNZ 0x0012969c MOV RBX,RDI MOV dword ptr [RDI + 0x178],EDX TEST DL,0x3 JNZ 0x0012969c MOV EAX,EDX NOT EAX TEST AL,0x18 JZ 0x0012969c MOV EBP,ECX MOV R14,RSI TEST DL,0x8 JNZ 0x001295f3 TEST DL,0x10 JNZ 0x0012964b LEA RAX,[RSP + 0xe] JMP 0x00129654 LAB_001295f3: MOV word ptr [RSP + 0xe],0x6272 BT EDX,0xb SETNC AL OR AL,0x30 MOV byte ptr [RSP + 0x10],AL MOV byte ptr [RSP + 0x11],0x0 LEA RSI,[0x12bfe7] MOV RDI,R14 CALL 0x00115390 TEST RAX,RAX JZ 0x00129668 MOV R15,RAX MOV RDI,RAX XOR ESI,ESI MOV EDX,0x2 CALL 0x00115330 MOV RDI,R15 CALL 0x001153e0 MOV qword ptr [RBX + 0x180],RAX MOV RDI,R15 CALL 0x001152c0 JMP 0x00129668 LAB_0012964b: LEA RAX,[RSP + 0xf] MOV byte ptr [RAX + -0x1],0x77 LAB_00129654: MOV byte ptr [RAX],0x62 BT EDX,0xb SETNC CL OR CL,0x30 MOV byte ptr [RAX + 0x1],CL MOV byte ptr [RAX + 0x2],0x0 LAB_00129668: LEA RSI,[RSP + 0xe] MOV RDI,R14 CALL 0x00115480 MOV qword ptr [RBX + 0x40],RAX TEST RAX,RAX JZ 0x0012969c MOV byte ptr [RBX + 0x177],0x1 TEST byte ptr [RBX + 0x178],0x10 JZ 0x0012969e MOV RDI,RAX MOV ESI,EBP XOR EDX,EDX CALL 0x00115490 JMP 0x0012969e LAB_0012969c: XOR EBX,EBX LAB_0012969e: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET
/* WARNING: Type propagation algorithm not settling */ /* gzstreambuf::open(char const*, int, int) */ gzstreambuf * __thiscall gzstreambuf::open(gzstreambuf *this,char *param_1,int param_2,int param_3) { FILE *__stream; __off_t _Var1; int2 *puVar2; long lVar3; int1 local_2a [2]; byte local_28; int1 local_27; if (((this[0x177] == (gzstreambuf)0x0) && (*(int *)(this + 0x178) = param_2, (param_2 & 3U) == 0)) && ((~param_2 & 0x18U) != 0)) { if ((param_2 & 8U) == 0) { if ((param_2 & 0x10U) == 0) { puVar2 = (int2 *)local_2a; } else { puVar2 = (int2 *)((long)local_2a + 1); local_2a[0] = 0x77; } *(int1 *)puVar2 = 0x62; *(byte *)((long)puVar2 + 1) = ((uint)param_2 >> 0xb & 1) == 0 | 0x30; *(int1 *)(puVar2 + 1) = 0; } else { local_2a = (int1 [2])0x6272; local_28 = ((uint)param_2 >> 0xb & 1) == 0 | 0x30; local_27 = 0; __stream = fopen(param_1,"rb"); if (__stream != (FILE *)0x0) { fseek(__stream,0,2); _Var1 = ftello(__stream); *(__off_t *)(this + 0x180) = _Var1; fclose(__stream); } } lVar3 = gzopen(param_1,local_2a); *(long *)(this + 0x40) = lVar3; if (lVar3 != 0) { this[0x177] = (gzstreambuf)0x1; if (((byte)this[0x178] & 0x10) == 0) { return this; } gzsetparams(lVar3,param_3,0); return this; } } return (gzstreambuf *)0x0; }
39,202
my_sync_dir_by_file
eloqsql/mysys/my_sync.c
int my_sync_dir_by_file(const char *file_name __attribute__((unused)), myf my_flags __attribute__((unused))) { #ifdef NEED_EXPLICIT_SYNC_DIR char dir_name[FN_REFLEN]; size_t dir_name_length; dirname_part(dir_name, file_name, &dir_name_length); return my_sync_dir(dir_name, my_flags & ~MY_NOSYMLINKS); #else return 0; #endif }
O0
c
my_sync_dir_by_file: pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x218(%rbp), %rsi leaq -0x210(%rbp), %rdi movq %rdi, -0x238(%rbp) leaq -0x228(%rbp), %rdx callq 0x2c8b0 movq -0x238(%rbp), %rdi movq -0x220(%rbp), %rax andl $0xfffffdff, %eax # imm = 0xFFFFFDFF movl %eax, %esi callq 0x33a20 movl %eax, -0x22c(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x33b58 movl -0x22c(%rbp), %eax addq $0x240, %rsp # imm = 0x240 popq %rbp retq callq 0x25340 nopl (%rax)
my_sync_dir_by_file: push rbp mov rbp, rsp sub rsp, 240h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rsi, [rbp+var_218] lea rdi, [rbp+var_210] mov [rbp+var_238], rdi lea rdx, [rbp+var_228] call dirname_part mov rdi, [rbp+var_238] mov rax, [rbp+var_220] and eax, 0FFFFFDFFh mov esi, eax call my_sync_dir mov [rbp+var_22C], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_33B58 mov eax, [rbp+var_22C] add rsp, 240h pop rbp retn loc_33B58: call ___stack_chk_fail
long long my_sync_dir_by_file(_BYTE *a1, long long a2) { long long v3; // [rsp+18h] [rbp-228h] BYREF long long v4; // [rsp+20h] [rbp-220h] _BYTE *v5; // [rsp+28h] [rbp-218h] _BYTE v6[520]; // [rsp+30h] [rbp-210h] BYREF unsigned long long v7; // [rsp+238h] [rbp-8h] v7 = __readfsqword(0x28u); v5 = a1; v4 = a2; dirname_part((long long)v6, a1, &v3); return (unsigned int)my_sync_dir(v6, (unsigned int)v4 & 0xFFFFFDFF); }
my_sync_dir_by_file: PUSH RBP MOV RBP,RSP SUB RSP,0x240 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV RSI,qword ptr [RBP + -0x218] LEA RDI,[RBP + -0x210] MOV qword ptr [RBP + -0x238],RDI LEA RDX,[RBP + -0x228] CALL 0x0012c8b0 MOV RDI,qword ptr [RBP + -0x238] MOV RAX,qword ptr [RBP + -0x220] AND EAX,0xfffffdff MOV ESI,EAX CALL 0x00133a20 MOV dword ptr [RBP + -0x22c],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00133b58 MOV EAX,dword ptr [RBP + -0x22c] ADD RSP,0x240 POP RBP RET LAB_00133b58: CALL 0x00125340
int4 my_sync_dir_by_file(int8 param_1,int8 param_2) { int4 uVar1; long in_FS_OFFSET; int1 local_230 [8]; int8 local_228; int8 local_220; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_228 = param_2; local_220 = param_1; dirname_part(local_218,param_1,local_230); uVar1 = my_sync_dir(local_218,(uint)local_228 & 0xfffffdff); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return uVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,203
LefDefParser::defiNet::addPts(char const*, int, LefDefParser::defiGeometries*, int*, int, char const*, char const*, char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
void defiNet::addPts(const char* viaName, int o, defiGeometries* geom, int *needCbk, int colorMask, const char* routeStatus, const char* shapeType, const char* routeStatusShieldName) { struct defiPoints* p; int x, y; int i; *needCbk = 0; if (numPts_ == ptsAllocated_) { struct defiPoints** pts; char** newn; char** newRS; char** newST; char** newRSN; int* orientn; int* maskn; ptsAllocated_ = (ptsAllocated_ == 0) ? 1000 : ptsAllocated_ * 2; newn = (char**)malloc(sizeof(char*) *ptsAllocated_); newRS = (char**)malloc(sizeof(char*) *ptsAllocated_); newST = (char**)malloc(sizeof(char*) *ptsAllocated_); newRSN = (char**)malloc(sizeof(char*) *ptsAllocated_); orientn = (int*)malloc(sizeof(int) *ptsAllocated_); pts= (struct defiPoints**)malloc(sizeof(struct defiPoints*) * ptsAllocated_); maskn = (int*)malloc(sizeof(int) *ptsAllocated_); for (i = 0; i < numPts_; i++) { pts[i] = viaPts_[i]; newn[i] = viaNames_[i]; newRS[i] = viaRouteStatus_[i]; newST[i] = viaShapeTypes_[i]; newRSN[i] = viaRouteStatusShieldNames_[i]; orientn[i] = viaOrients_[i]; maskn[i] = viaMasks_[i]; } if (viaPts_) free((char*)(viaPts_)); if (viaNames_) free((char*)(viaNames_)); if (viaOrients_) free((char*)(viaOrients_)); if (viaMasks_) free((char*)(viaMasks_)); if (viaRouteStatus_) free((char*)(viaRouteStatus_)); if (viaShapeTypes_) free((char*)(viaShapeTypes_)); if (viaRouteStatusShieldNames_) free((char*)(viaRouteStatusShieldNames_)); viaPts_ = pts; viaNames_ = newn; viaOrients_ = orientn; viaMasks_ = maskn; viaShapeTypes_= newST; viaRouteStatus_ = newRS; viaRouteStatusShieldNames_ = newRSN; } viaNames_[numPts_] = strdup(viaName); viaShapeTypes_[numPts_] = strdup(shapeType); viaRouteStatus_[numPts_] = strdup(routeStatus); viaRouteStatusShieldNames_[numPts_] = strdup(routeStatusShieldName); viaOrients_[numPts_] = o; viaMasks_[numPts_] = colorMask; p = (struct defiPoints*)malloc(sizeof(struct defiPoints)); p->numPoints = geom->numPoints(); p->x = (int*)malloc(sizeof(int)*p->numPoints); p->y = (int*)malloc(sizeof(int)*p->numPoints); for (i = 0; i < p->numPoints; i++) { geom->points(i, &x, &y); p->x[i] = x; p->y[i] = y; } viaPts_[numPts_] = p; numPts_ += 1; if (numPts_ == 1000) // Want to invoke the partial callback if set *needCbk = 1; }
O0
cpp
LefDefParser::defiNet::addPts(char const*, int, LefDefParser::defiGeometries*, int*, int, char const*, char const*, char const*): subq $0x98, %rsp movq 0xb0(%rsp), %rax movq 0xa8(%rsp), %rax movq 0xa0(%rsp), %rax movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movl %edx, 0x84(%rsp) movq %rcx, 0x78(%rsp) movq %r8, 0x70(%rsp) movl %r9d, 0x6c(%rsp) movq 0x90(%rsp), %rcx movq %rcx, 0x10(%rsp) movq 0x70(%rsp), %rax movl $0x0, (%rax) movl 0x210(%rcx), %eax cmpl 0x214(%rcx), %eax jne 0x3fe74 movq 0x10(%rsp), %rax cmpl $0x0, 0x214(%rax) jne 0x3fb58 movl $0x3e8, %eax # imm = 0x3E8 movl %eax, 0xc(%rsp) jmp 0x3fb69 movq 0x10(%rsp), %rax movl 0x214(%rax), %eax shll %eax movl %eax, 0xc(%rsp) movq 0x10(%rsp), %rax movl 0xc(%rsp), %ecx movl %ecx, 0x214(%rax) movslq 0x214(%rax), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x40(%rsp) movslq 0x214(%rax), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x38(%rsp) movslq 0x214(%rax), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x30(%rsp) movslq 0x214(%rax), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x28(%rsp) movslq 0x214(%rax), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x20(%rsp) movslq 0x214(%rax), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, %rcx movq 0x10(%rsp), %rax movq %rcx, 0x48(%rsp) movslq 0x214(%rax), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x18(%rsp) movl $0x0, 0x54(%rsp) movq 0x10(%rsp), %rcx movl 0x54(%rsp), %eax cmpl 0x210(%rcx), %eax jge 0x3fd3b movq 0x10(%rsp), %rax movq 0x200(%rax), %rcx movslq 0x54(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x48(%rsp), %rcx movslq 0x54(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x208(%rax), %rcx movslq 0x54(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x40(%rsp), %rcx movslq 0x54(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x228(%rax), %rcx movslq 0x54(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x38(%rsp), %rcx movslq 0x54(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x238(%rax), %rcx movslq 0x54(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x30(%rsp), %rcx movslq 0x54(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x230(%rax), %rcx movslq 0x54(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x28(%rsp), %rcx movslq 0x54(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x218(%rax), %rcx movslq 0x54(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x20(%rsp), %rcx movslq 0x54(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x220(%rax), %rax movslq 0x54(%rsp), %rcx movl (%rax,%rcx,4), %edx movq 0x18(%rsp), %rax movslq 0x54(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x54(%rsp), %eax addl $0x1, %eax movl %eax, 0x54(%rsp) jmp 0x3fc43 movq 0x10(%rsp), %rax cmpq $0x0, 0x200(%rax) je 0x3fd5b movq 0x10(%rsp), %rax movq 0x200(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x208(%rax) je 0x3fd7b movq 0x10(%rsp), %rax movq 0x208(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x218(%rax) je 0x3fd9b movq 0x10(%rsp), %rax movq 0x218(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x220(%rax) je 0x3fdbb movq 0x10(%rsp), %rax movq 0x220(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x228(%rax) je 0x3fddb movq 0x10(%rsp), %rax movq 0x228(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x238(%rax) je 0x3fdfb movq 0x10(%rsp), %rax movq 0x238(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x230(%rax) je 0x3fe1b movq 0x10(%rsp), %rax movq 0x230(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x48(%rsp), %rcx movq %rcx, 0x200(%rax) movq 0x40(%rsp), %rcx movq %rcx, 0x208(%rax) movq 0x20(%rsp), %rcx movq %rcx, 0x218(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x220(%rax) movq 0x30(%rsp), %rcx movq %rcx, 0x238(%rax) movq 0x38(%rsp), %rcx movq %rcx, 0x228(%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x230(%rax) movq 0x88(%rsp), %rdi callq 0x73d0 movq 0x10(%rsp), %rcx movq %rax, %rdx movq 0x208(%rcx), %rax movslq 0x210(%rcx), %rcx movq %rdx, (%rax,%rcx,8) movq 0xa8(%rsp), %rdi callq 0x73d0 movq 0x10(%rsp), %rcx movq %rax, %rdx movq 0x238(%rcx), %rax movslq 0x210(%rcx), %rcx movq %rdx, (%rax,%rcx,8) movq 0xa0(%rsp), %rdi callq 0x73d0 movq 0x10(%rsp), %rcx movq %rax, %rdx movq 0x228(%rcx), %rax movslq 0x210(%rcx), %rcx movq %rdx, (%rax,%rcx,8) movq 0xb0(%rsp), %rdi callq 0x73d0 movq 0x10(%rsp), %rcx movq %rax, %rsi movq 0x230(%rcx), %rax movslq 0x210(%rcx), %rdx movq %rsi, (%rax,%rdx,8) movl 0x84(%rsp), %esi movq 0x218(%rcx), %rax movslq 0x210(%rcx), %rdx movl %esi, (%rax,%rdx,4) movl 0x6c(%rsp), %edx movq 0x220(%rcx), %rax movslq 0x210(%rcx), %rcx movl %edx, (%rax,%rcx,4) movl $0x18, %edi callq 0x72d0 movq %rax, 0x60(%rsp) movq 0x78(%rsp), %rdi callq 0x2a930 movl %eax, %ecx movq 0x60(%rsp), %rax movl %ecx, (%rax) movq 0x60(%rsp), %rax movslq (%rax), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, %rcx movq 0x60(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x60(%rsp), %rax movslq (%rax), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, %rcx movq 0x60(%rsp), %rax movq %rcx, 0x10(%rax) movl $0x0, 0x54(%rsp) movl 0x54(%rsp), %eax movq 0x60(%rsp), %rcx cmpl (%rcx), %eax jge 0x3fffd movq 0x78(%rsp), %rdi movl 0x54(%rsp), %esi leaq 0x5c(%rsp), %rdx leaq 0x58(%rsp), %rcx callq 0x2a940 movl 0x5c(%rsp), %edx movq 0x60(%rsp), %rax movq 0x8(%rax), %rax movslq 0x54(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x58(%rsp), %edx movq 0x60(%rsp), %rax movq 0x10(%rax), %rax movslq 0x54(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x54(%rsp), %eax addl $0x1, %eax movl %eax, 0x54(%rsp) jmp 0x3ffa1 movq 0x10(%rsp), %rax movq 0x60(%rsp), %rsi movq 0x200(%rax), %rcx movslq 0x210(%rax), %rdx movq %rsi, (%rcx,%rdx,8) movl 0x210(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x210(%rax) cmpl $0x3e8, 0x210(%rax) # imm = 0x3E8 jne 0x4003f movq 0x70(%rsp), %rax movl $0x1, (%rax) addq $0x98, %rsp retq nopw (%rax,%rax)
_ZN12LefDefParser7defiNet6addPtsEPKciPNS_14defiGeometriesEPiiS2_S2_S2_: sub rsp, 98h mov rax, [rsp+98h+arg_10] mov rax, [rsp+98h+arg_8] mov rax, [rsp+98h+arg_0] mov [rsp+98h+var_8], rdi mov [rsp+98h+var_10], rsi mov [rsp+98h+var_14], edx mov [rsp+98h+var_20], rcx mov [rsp+98h+var_28], r8 mov [rsp+98h+var_2C], r9d mov rcx, [rsp+98h+var_8] mov [rsp+98h+var_88], rcx mov rax, [rsp+98h+var_28] mov dword ptr [rax], 0 mov eax, [rcx+210h] cmp eax, [rcx+214h] jnz loc_3FE74 mov rax, [rsp+98h+var_88] cmp dword ptr [rax+214h], 0 jnz short loc_3FB58 mov eax, 3E8h mov [rsp+98h+var_8C], eax jmp short loc_3FB69 loc_3FB58: mov rax, [rsp+98h+var_88] mov eax, [rax+214h] shl eax, 1 mov [rsp+98h+var_8C], eax loc_3FB69: mov rax, [rsp+98h+var_88] mov ecx, [rsp+98h+var_8C] mov [rax+214h], ecx movsxd rdi, dword ptr [rax+214h] shl rdi, 3 call _malloc mov rcx, rax mov rax, [rsp+98h+var_88] mov [rsp+98h+var_58], rcx movsxd rdi, dword ptr [rax+214h] shl rdi, 3 call _malloc mov rcx, rax mov rax, [rsp+98h+var_88] mov [rsp+98h+var_60], rcx movsxd rdi, dword ptr [rax+214h] shl rdi, 3 call _malloc mov rcx, rax mov rax, [rsp+98h+var_88] mov [rsp+98h+var_68], rcx movsxd rdi, dword ptr [rax+214h] shl rdi, 3 call _malloc mov rcx, rax mov rax, [rsp+98h+var_88] mov [rsp+98h+var_70], rcx movsxd rdi, dword ptr [rax+214h] shl rdi, 2 call _malloc mov rcx, rax mov rax, [rsp+98h+var_88] mov [rsp+98h+var_78], rcx movsxd rdi, dword ptr [rax+214h] shl rdi, 3 call _malloc mov rcx, rax mov rax, [rsp+98h+var_88] mov [rsp+98h+var_50], rcx movsxd rdi, dword ptr [rax+214h] shl rdi, 2 call _malloc mov [rsp+98h+var_80], rax mov [rsp+98h+var_44], 0 loc_3FC43: mov rcx, [rsp+98h+var_88] mov eax, [rsp+98h+var_44] cmp eax, [rcx+210h] jge loc_3FD3B mov rax, [rsp+98h+var_88] mov rcx, [rax+200h] movsxd rdx, [rsp+98h+var_44] mov rsi, [rcx+rdx*8] mov rcx, [rsp+98h+var_50] movsxd rdx, [rsp+98h+var_44] mov [rcx+rdx*8], rsi mov rcx, [rax+208h] movsxd rdx, [rsp+98h+var_44] mov rsi, [rcx+rdx*8] mov rcx, [rsp+98h+var_58] movsxd rdx, [rsp+98h+var_44] mov [rcx+rdx*8], rsi mov rcx, [rax+228h] movsxd rdx, [rsp+98h+var_44] mov rsi, [rcx+rdx*8] mov rcx, [rsp+98h+var_60] movsxd rdx, [rsp+98h+var_44] mov [rcx+rdx*8], rsi mov rcx, [rax+238h] movsxd rdx, [rsp+98h+var_44] mov rsi, [rcx+rdx*8] mov rcx, [rsp+98h+var_68] movsxd rdx, [rsp+98h+var_44] mov [rcx+rdx*8], rsi mov rcx, [rax+230h] movsxd rdx, [rsp+98h+var_44] mov rsi, [rcx+rdx*8] mov rcx, [rsp+98h+var_70] movsxd rdx, [rsp+98h+var_44] mov [rcx+rdx*8], rsi mov rcx, [rax+218h] movsxd rdx, [rsp+98h+var_44] mov esi, [rcx+rdx*4] mov rcx, [rsp+98h+var_78] movsxd rdx, [rsp+98h+var_44] mov [rcx+rdx*4], esi mov rax, [rax+220h] movsxd rcx, [rsp+98h+var_44] mov edx, [rax+rcx*4] mov rax, [rsp+98h+var_80] movsxd rcx, [rsp+98h+var_44] mov [rax+rcx*4], edx mov eax, [rsp+98h+var_44] add eax, 1 mov [rsp+98h+var_44], eax jmp loc_3FC43 loc_3FD3B: mov rax, [rsp+98h+var_88] cmp qword ptr [rax+200h], 0 jz short loc_3FD5B mov rax, [rsp+98h+var_88] mov rdi, [rax+200h] call _free loc_3FD5B: mov rax, [rsp+98h+var_88] cmp qword ptr [rax+208h], 0 jz short loc_3FD7B mov rax, [rsp+98h+var_88] mov rdi, [rax+208h] call _free loc_3FD7B: mov rax, [rsp+98h+var_88] cmp qword ptr [rax+218h], 0 jz short loc_3FD9B mov rax, [rsp+98h+var_88] mov rdi, [rax+218h] call _free loc_3FD9B: mov rax, [rsp+98h+var_88] cmp qword ptr [rax+220h], 0 jz short loc_3FDBB mov rax, [rsp+98h+var_88] mov rdi, [rax+220h] call _free loc_3FDBB: mov rax, [rsp+98h+var_88] cmp qword ptr [rax+228h], 0 jz short loc_3FDDB mov rax, [rsp+98h+var_88] mov rdi, [rax+228h] call _free loc_3FDDB: mov rax, [rsp+98h+var_88] cmp qword ptr [rax+238h], 0 jz short loc_3FDFB mov rax, [rsp+98h+var_88] mov rdi, [rax+238h] call _free loc_3FDFB: mov rax, [rsp+98h+var_88] cmp qword ptr [rax+230h], 0 jz short loc_3FE1B mov rax, [rsp+98h+var_88] mov rdi, [rax+230h] call _free loc_3FE1B: mov rax, [rsp+98h+var_88] mov rcx, [rsp+98h+var_50] mov [rax+200h], rcx mov rcx, [rsp+98h+var_58] mov [rax+208h], rcx mov rcx, [rsp+98h+var_78] mov [rax+218h], rcx mov rcx, [rsp+98h+var_80] mov [rax+220h], rcx mov rcx, [rsp+98h+var_68] mov [rax+238h], rcx mov rcx, [rsp+98h+var_60] mov [rax+228h], rcx mov rcx, [rsp+98h+var_70] mov [rax+230h], rcx loc_3FE74: mov rdi, [rsp+98h+var_10] call _strdup mov rcx, [rsp+98h+var_88] mov rdx, rax mov rax, [rcx+208h] movsxd rcx, dword ptr [rcx+210h] mov [rax+rcx*8], rdx mov rdi, [rsp+98h+arg_8] call _strdup mov rcx, [rsp+98h+var_88] mov rdx, rax mov rax, [rcx+238h] movsxd rcx, dword ptr [rcx+210h] mov [rax+rcx*8], rdx mov rdi, [rsp+98h+arg_0] call _strdup mov rcx, [rsp+98h+var_88] mov rdx, rax mov rax, [rcx+228h] movsxd rcx, dword ptr [rcx+210h] mov [rax+rcx*8], rdx mov rdi, [rsp+98h+arg_10] call _strdup mov rcx, [rsp+98h+var_88] mov rsi, rax mov rax, [rcx+230h] movsxd rdx, dword ptr [rcx+210h] mov [rax+rdx*8], rsi mov esi, [rsp+98h+var_14] mov rax, [rcx+218h] movsxd rdx, dword ptr [rcx+210h] mov [rax+rdx*4], esi mov edx, [rsp+98h+var_2C] mov rax, [rcx+220h] movsxd rcx, dword ptr [rcx+210h] mov [rax+rcx*4], edx mov edi, 18h call _malloc mov [rsp+98h+var_38], rax mov rdi, [rsp+98h+var_20]; this call _ZNK12LefDefParser14defiGeometries9numPointsEv; LefDefParser::defiGeometries::numPoints(void) mov ecx, eax mov rax, [rsp+98h+var_38] mov [rax], ecx mov rax, [rsp+98h+var_38] movsxd rdi, dword ptr [rax] shl rdi, 2 call _malloc mov rcx, rax mov rax, [rsp+98h+var_38] mov [rax+8], rcx mov rax, [rsp+98h+var_38] movsxd rdi, dword ptr [rax] shl rdi, 2 call _malloc mov rcx, rax mov rax, [rsp+98h+var_38] mov [rax+10h], rcx mov [rsp+98h+var_44], 0 loc_3FFA1: mov eax, [rsp+98h+var_44] mov rcx, [rsp+98h+var_38] cmp eax, [rcx] jge short loc_3FFFD mov rdi, [rsp+98h+var_20]; this mov esi, [rsp+98h+var_44]; int lea rdx, [rsp+98h+var_3C]; int * lea rcx, [rsp+98h+var_40]; int * call _ZNK12LefDefParser14defiGeometries6pointsEiPiS1_; LefDefParser::defiGeometries::points(int,int *,int *) mov edx, [rsp+98h+var_3C] mov rax, [rsp+98h+var_38] mov rax, [rax+8] movsxd rcx, [rsp+98h+var_44] mov [rax+rcx*4], edx mov edx, [rsp+98h+var_40] mov rax, [rsp+98h+var_38] mov rax, [rax+10h] movsxd rcx, [rsp+98h+var_44] mov [rax+rcx*4], edx mov eax, [rsp+98h+var_44] add eax, 1 mov [rsp+98h+var_44], eax jmp short loc_3FFA1 loc_3FFFD: mov rax, [rsp+98h+var_88] mov rsi, [rsp+98h+var_38] mov rcx, [rax+200h] movsxd rdx, dword ptr [rax+210h] mov [rcx+rdx*8], rsi mov ecx, [rax+210h] add ecx, 1 mov [rax+210h], ecx cmp dword ptr [rax+210h], 3E8h jnz short loc_4003F mov rax, [rsp+98h+var_28] mov dword ptr [rax], 1 loc_4003F: add rsp, 98h retn
LefDefParser::defiNet * LefDefParser::defiNet::addPts( LefDefParser::defiNet *this, const char *a2, int a3, LefDefParser::defiGeometries *a4, int *a5, int a6, const char *a7, const char *a8, const char *a9) { LefDefParser::defiNet *result; // rax int v10; // [rsp+Ch] [rbp-8Ch] long long v11; // [rsp+18h] [rbp-80h] long long v12; // [rsp+20h] [rbp-78h] long long v13; // [rsp+28h] [rbp-70h] long long v14; // [rsp+30h] [rbp-68h] long long v15; // [rsp+38h] [rbp-60h] long long v16; // [rsp+40h] [rbp-58h] long long v17; // [rsp+48h] [rbp-50h] int i; // [rsp+54h] [rbp-44h] int j; // [rsp+54h] [rbp-44h] int v20; // [rsp+58h] [rbp-40h] BYREF int v21; // [rsp+5Ch] [rbp-3Ch] BYREF int *v22; // [rsp+60h] [rbp-38h] int v23; // [rsp+6Ch] [rbp-2Ch] int *v24; // [rsp+70h] [rbp-28h] LefDefParser::defiGeometries *v25; // [rsp+78h] [rbp-20h] int v26; // [rsp+84h] [rbp-14h] const char *v27; // [rsp+88h] [rbp-10h] LefDefParser::defiNet *v28; // [rsp+90h] [rbp-8h] v28 = this; v27 = a2; v26 = a3; v25 = a4; v24 = a5; v23 = a6; *a5 = 0; if ( *((_DWORD *)this + 132) == *((_DWORD *)this + 133) ) { if ( *((_DWORD *)this + 133) ) v10 = 2 * *((_DWORD *)this + 133); else v10 = 1000; *((_DWORD *)this + 133) = v10; v16 = malloc(8LL * *((int *)this + 133)); v15 = malloc(8LL * *((int *)this + 133)); v14 = malloc(8LL * *((int *)this + 133)); v13 = malloc(8LL * *((int *)this + 133)); v12 = malloc(4LL * *((int *)this + 133)); v17 = malloc(8LL * *((int *)this + 133)); v11 = malloc(4LL * *((int *)this + 133)); for ( i = 0; i < *((_DWORD *)this + 132); ++i ) { *(_QWORD *)(v17 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 64) + 8LL * i); *(_QWORD *)(v16 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 65) + 8LL * i); *(_QWORD *)(v15 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 69) + 8LL * i); *(_QWORD *)(v14 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 71) + 8LL * i); *(_QWORD *)(v13 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 70) + 8LL * i); *(_DWORD *)(v12 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 67) + 4LL * i); *(_DWORD *)(v11 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 68) + 4LL * i); } if ( *((_QWORD *)this + 64) ) free(*((_QWORD *)this + 64)); if ( *((_QWORD *)this + 65) ) free(*((_QWORD *)this + 65)); if ( *((_QWORD *)this + 67) ) free(*((_QWORD *)this + 67)); if ( *((_QWORD *)this + 68) ) free(*((_QWORD *)this + 68)); if ( *((_QWORD *)this + 69) ) free(*((_QWORD *)this + 69)); if ( *((_QWORD *)this + 71) ) free(*((_QWORD *)this + 71)); if ( *((_QWORD *)this + 70) ) free(*((_QWORD *)this + 70)); *((_QWORD *)this + 64) = v17; *((_QWORD *)this + 65) = v16; *((_QWORD *)this + 67) = v12; *((_QWORD *)this + 68) = v11; *((_QWORD *)this + 71) = v14; *((_QWORD *)this + 69) = v15; *((_QWORD *)this + 70) = v13; } *(_QWORD *)(*((_QWORD *)this + 65) + 8LL * *((int *)this + 132)) = strdup(v27); *(_QWORD *)(*((_QWORD *)this + 71) + 8LL * *((int *)this + 132)) = strdup(a8); *(_QWORD *)(*((_QWORD *)this + 69) + 8LL * *((int *)this + 132)) = strdup(a7); *(_QWORD *)(*((_QWORD *)this + 70) + 8LL * *((int *)this + 132)) = strdup(a9); *(_DWORD *)(*((_QWORD *)this + 67) + 4LL * *((int *)this + 132)) = v26; *(_DWORD *)(*((_QWORD *)this + 68) + 4LL * *((int *)this + 132)) = v23; v22 = (int *)malloc(24LL); *v22 = LefDefParser::defiGeometries::numPoints(v25); *((_QWORD *)v22 + 1) = malloc(4LL * *v22); *((_QWORD *)v22 + 2) = malloc(4LL * *v22); for ( j = 0; j < *v22; ++j ) { LefDefParser::defiGeometries::points((LefDefParser::defrData **)v25, j, &v21, &v20); *(_DWORD *)(*((_QWORD *)v22 + 1) + 4LL * j) = v21; *(_DWORD *)(*((_QWORD *)v22 + 2) + 4LL * j) = v20; } result = this; *(_QWORD *)(*((_QWORD *)this + 64) + 8LL * (int)(*((_DWORD *)this + 132))++) = v22; if ( *((_DWORD *)this + 132) == 1000 ) { result = (LefDefParser::defiNet *)v24; *v24 = 1; } return result; }
addPts: SUB RSP,0x98 MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV dword ptr [RSP + 0x84],EDX MOV qword ptr [RSP + 0x78],RCX MOV qword ptr [RSP + 0x70],R8 MOV dword ptr [RSP + 0x6c],R9D MOV RCX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x10],RCX MOV RAX,qword ptr [RSP + 0x70] MOV dword ptr [RAX],0x0 MOV EAX,dword ptr [RCX + 0x210] CMP EAX,dword ptr [RCX + 0x214] JNZ 0x0013fe74 MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x214],0x0 JNZ 0x0013fb58 MOV EAX,0x3e8 MOV dword ptr [RSP + 0xc],EAX JMP 0x0013fb69 LAB_0013fb58: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x214] SHL EAX,0x1 MOV dword ptr [RSP + 0xc],EAX LAB_0013fb69: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0xc] MOV dword ptr [RAX + 0x214],ECX MOVSXD RDI,dword ptr [RAX + 0x214] SHL RDI,0x3 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x40],RCX MOVSXD RDI,dword ptr [RAX + 0x214] SHL RDI,0x3 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x38],RCX MOVSXD RDI,dword ptr [RAX + 0x214] SHL RDI,0x3 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RCX MOVSXD RDI,dword ptr [RAX + 0x214] SHL RDI,0x3 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x28],RCX MOVSXD RDI,dword ptr [RAX + 0x214] SHL RDI,0x2 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x20],RCX MOVSXD RDI,dword ptr [RAX + 0x214] SHL RDI,0x3 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RCX MOVSXD RDI,dword ptr [RAX + 0x214] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x18],RAX MOV dword ptr [RSP + 0x54],0x0 LAB_0013fc43: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0x54] CMP EAX,dword ptr [RCX + 0x210] JGE 0x0013fd3b MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0x200] MOVSXD RDX,dword ptr [RSP + 0x54] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x48] MOVSXD RDX,dword ptr [RSP + 0x54] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x208] MOVSXD RDX,dword ptr [RSP + 0x54] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x40] MOVSXD RDX,dword ptr [RSP + 0x54] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x228] MOVSXD RDX,dword ptr [RSP + 0x54] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RSP + 0x54] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x238] MOVSXD RDX,dword ptr [RSP + 0x54] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x30] MOVSXD RDX,dword ptr [RSP + 0x54] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x230] MOVSXD RDX,dword ptr [RSP + 0x54] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x28] MOVSXD RDX,dword ptr [RSP + 0x54] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x218] MOVSXD RDX,dword ptr [RSP + 0x54] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x20] MOVSXD RDX,dword ptr [RSP + 0x54] MOV dword ptr [RCX + RDX*0x4],ESI MOV RAX,qword ptr [RAX + 0x220] MOVSXD RCX,dword ptr [RSP + 0x54] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x54] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RSP + 0x54] ADD EAX,0x1 MOV dword ptr [RSP + 0x54],EAX JMP 0x0013fc43 LAB_0013fd3b: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x200],0x0 JZ 0x0013fd5b MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x200] CALL 0x001072a0 LAB_0013fd5b: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x208],0x0 JZ 0x0013fd7b MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x208] CALL 0x001072a0 LAB_0013fd7b: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x218],0x0 JZ 0x0013fd9b MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x218] CALL 0x001072a0 LAB_0013fd9b: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x220],0x0 JZ 0x0013fdbb MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x220] CALL 0x001072a0 LAB_0013fdbb: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x228],0x0 JZ 0x0013fddb MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x228] CALL 0x001072a0 LAB_0013fddb: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x238],0x0 JZ 0x0013fdfb MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x238] CALL 0x001072a0 LAB_0013fdfb: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x230],0x0 JZ 0x0013fe1b MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x230] CALL 0x001072a0 LAB_0013fe1b: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x200],RCX MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RAX + 0x208],RCX MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x218],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x220],RCX MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x238],RCX MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x228],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x230],RCX LAB_0013fe74: MOV RDI,qword ptr [RSP + 0x88] CALL 0x001073d0 MOV RCX,qword ptr [RSP + 0x10] MOV RDX,RAX MOV RAX,qword ptr [RCX + 0x208] MOVSXD RCX,dword ptr [RCX + 0x210] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RSP + 0xa8] CALL 0x001073d0 MOV RCX,qword ptr [RSP + 0x10] MOV RDX,RAX MOV RAX,qword ptr [RCX + 0x238] MOVSXD RCX,dword ptr [RCX + 0x210] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x001073d0 MOV RCX,qword ptr [RSP + 0x10] MOV RDX,RAX MOV RAX,qword ptr [RCX + 0x228] MOVSXD RCX,dword ptr [RCX + 0x210] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RSP + 0xb0] CALL 0x001073d0 MOV RCX,qword ptr [RSP + 0x10] MOV RSI,RAX MOV RAX,qword ptr [RCX + 0x230] MOVSXD RDX,dword ptr [RCX + 0x210] MOV qword ptr [RAX + RDX*0x8],RSI MOV ESI,dword ptr [RSP + 0x84] MOV RAX,qword ptr [RCX + 0x218] MOVSXD RDX,dword ptr [RCX + 0x210] MOV dword ptr [RAX + RDX*0x4],ESI MOV EDX,dword ptr [RSP + 0x6c] MOV RAX,qword ptr [RCX + 0x220] MOVSXD RCX,dword ptr [RCX + 0x210] MOV dword ptr [RAX + RCX*0x4],EDX MOV EDI,0x18 CALL 0x001072d0 MOV qword ptr [RSP + 0x60],RAX MOV RDI,qword ptr [RSP + 0x78] CALL 0x0012a930 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x60] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x60] MOVSXD RDI,dword ptr [RAX] SHL RDI,0x2 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x60] MOVSXD RDI,dword ptr [RAX] SHL RDI,0x2 CALL 0x001072d0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RAX + 0x10],RCX MOV dword ptr [RSP + 0x54],0x0 LAB_0013ffa1: MOV EAX,dword ptr [RSP + 0x54] MOV RCX,qword ptr [RSP + 0x60] CMP EAX,dword ptr [RCX] JGE 0x0013fffd MOV RDI,qword ptr [RSP + 0x78] MOV ESI,dword ptr [RSP + 0x54] LEA RDX,[RSP + 0x5c] LEA RCX,[RSP + 0x58] CALL 0x0012a940 MOV EDX,dword ptr [RSP + 0x5c] MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RSP + 0x54] MOV dword ptr [RAX + RCX*0x4],EDX MOV EDX,dword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RCX,dword ptr [RSP + 0x54] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RSP + 0x54] ADD EAX,0x1 MOV dword ptr [RSP + 0x54],EAX JMP 0x0013ffa1 LAB_0013fffd: MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RAX + 0x200] MOVSXD RDX,dword ptr [RAX + 0x210] MOV qword ptr [RCX + RDX*0x8],RSI MOV ECX,dword ptr [RAX + 0x210] ADD ECX,0x1 MOV dword ptr [RAX + 0x210],ECX CMP dword ptr [RAX + 0x210],0x3e8 JNZ 0x0014003f MOV RAX,qword ptr [RSP + 0x70] MOV dword ptr [RAX],0x1 LAB_0014003f: ADD RSP,0x98 RET
/* LefDefParser::defiNet::addPts(char const*, int, LefDefParser::defiGeometries*, int*, int, char const*, char const*, char const*) */ void __thiscall LefDefParser::defiNet::addPts (defiNet *this,char *param_1,int param_2,defiGeometries *param_3,int *param_4,int param_5, char *param_6,char *param_7,char *param_8) { int iVar1; void *pvVar2; void *pvVar3; void *pvVar4; void *pvVar5; void *pvVar6; void *pvVar7; void *pvVar8; char *pcVar9; int local_8c; int local_44; int local_40; int local_3c; int *local_38; int local_2c; int *local_28; defiGeometries *local_20; int local_14; char *local_10; defiNet *local_8; *param_4 = 0; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; local_8 = this; if (*(int *)(this + 0x210) == *(int *)(this + 0x214)) { if (*(int *)(this + 0x214) == 0) { local_8c = 1000; } else { local_8c = *(int *)(this + 0x214) << 1; } *(int *)(this + 0x214) = local_8c; pvVar2 = malloc((long)*(int *)(this + 0x214) << 3); pvVar3 = malloc((long)*(int *)(this + 0x214) << 3); pvVar4 = malloc((long)*(int *)(this + 0x214) << 3); pvVar5 = malloc((long)*(int *)(this + 0x214) << 3); pvVar6 = malloc((long)*(int *)(this + 0x214) << 2); pvVar7 = malloc((long)*(int *)(this + 0x214) << 3); pvVar8 = malloc((long)*(int *)(this + 0x214) << 2); for (local_44 = 0; local_44 < *(int *)(this + 0x210); local_44 = local_44 + 1) { *(int8 *)((long)pvVar7 + (long)local_44 * 8) = *(int8 *)(*(long *)(this + 0x200) + (long)local_44 * 8); *(int8 *)((long)pvVar2 + (long)local_44 * 8) = *(int8 *)(*(long *)(this + 0x208) + (long)local_44 * 8); *(int8 *)((long)pvVar3 + (long)local_44 * 8) = *(int8 *)(*(long *)(this + 0x228) + (long)local_44 * 8); *(int8 *)((long)pvVar4 + (long)local_44 * 8) = *(int8 *)(*(long *)(this + 0x238) + (long)local_44 * 8); *(int8 *)((long)pvVar5 + (long)local_44 * 8) = *(int8 *)(*(long *)(this + 0x230) + (long)local_44 * 8); *(int4 *)((long)pvVar6 + (long)local_44 * 4) = *(int4 *)(*(long *)(this + 0x218) + (long)local_44 * 4); *(int4 *)((long)pvVar8 + (long)local_44 * 4) = *(int4 *)(*(long *)(this + 0x220) + (long)local_44 * 4); } if (*(long *)(this + 0x200) != 0) { free(*(void **)(this + 0x200)); } if (*(long *)(this + 0x208) != 0) { free(*(void **)(this + 0x208)); } if (*(long *)(this + 0x218) != 0) { free(*(void **)(this + 0x218)); } if (*(long *)(this + 0x220) != 0) { free(*(void **)(this + 0x220)); } if (*(long *)(this + 0x228) != 0) { free(*(void **)(this + 0x228)); } if (*(long *)(this + 0x238) != 0) { free(*(void **)(this + 0x238)); } if (*(long *)(this + 0x230) != 0) { free(*(void **)(this + 0x230)); } *(void **)(this + 0x200) = pvVar7; *(void **)(this + 0x208) = pvVar2; *(void **)(this + 0x218) = pvVar6; *(void **)(this + 0x220) = pvVar8; *(void **)(this + 0x238) = pvVar4; *(void **)(this + 0x228) = pvVar3; *(void **)(this + 0x230) = pvVar5; } pcVar9 = strdup(local_10); *(char **)(*(long *)(this + 0x208) + (long)*(int *)(this + 0x210) * 8) = pcVar9; pcVar9 = strdup(param_7); *(char **)(*(long *)(this + 0x238) + (long)*(int *)(this + 0x210) * 8) = pcVar9; pcVar9 = strdup(param_6); *(char **)(*(long *)(this + 0x228) + (long)*(int *)(this + 0x210) * 8) = pcVar9; pcVar9 = strdup(param_8); *(char **)(*(long *)(this + 0x230) + (long)*(int *)(this + 0x210) * 8) = pcVar9; *(int *)(*(long *)(this + 0x218) + (long)*(int *)(this + 0x210) * 4) = local_14; *(int *)(*(long *)(this + 0x220) + (long)*(int *)(this + 0x210) * 4) = local_2c; local_38 = (int *)malloc(0x18); iVar1 = defiGeometries::numPoints(local_20); *local_38 = iVar1; pvVar2 = malloc((long)*local_38 << 2); *(void **)(local_38 + 2) = pvVar2; pvVar2 = malloc((long)*local_38 << 2); *(void **)(local_38 + 4) = pvVar2; for (local_44 = 0; local_44 < *local_38; local_44 = local_44 + 1) { defiGeometries::points(local_20,local_44,&local_3c,&local_40); *(int *)(*(long *)(local_38 + 2) + (long)local_44 * 4) = local_3c; *(int *)(*(long *)(local_38 + 4) + (long)local_44 * 4) = local_40; } *(int **)(*(long *)(this + 0x200) + (long)*(int *)(this + 0x210) * 8) = local_38; *(int *)(this + 0x210) = *(int *)(this + 0x210) + 1; if (*(int *)(this + 0x210) == 1000) { *local_28 = 1; } return; }
39,204
my_snprintf_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_snprintf_mb2(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n, const char* fmt, ...) { size_t ret; va_list args; va_start(args,fmt); ret= my_vsnprintf_mb2(to, n, fmt, args); va_end(args); return ret; }
O3
c
my_snprintf_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rsi, %r14 leaq -0x120(%rbp), %rcx movq %r8, 0x20(%rcx) movq %r9, 0x28(%rcx) testb %al, %al je 0x692d4 movaps %xmm0, -0xf0(%rbp) movaps %xmm1, -0xe0(%rbp) movaps %xmm2, -0xd0(%rbp) movaps %xmm3, -0xc0(%rbp) movaps %xmm4, -0xb0(%rbp) movaps %xmm5, -0xa0(%rbp) movaps %xmm6, -0x90(%rbp) movaps %xmm7, -0x80(%rbp) movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq %rcx, -0x50(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x58(%rbp) movabsq $0x3000000020, %rax # imm = 0x3000000020 movq %rax, -0x60(%rbp) leaq (%rsi,%rdx), %rbx decq %rbx leaq -0x40(%rbp), %r12 movq %rsi, -0x68(%rbp) movzbl (%r15), %eax cmpl $0x25, %eax je 0x69338 testl %eax, %eax je 0x6949e cmpq %rbx, %r14 je 0x6949b movb $0x0, (%r14) movb (%r15), %al movb %al, 0x1(%r14) addq $0x2, %r14 incq %r15 jmp 0x6930a addq $0x2, %r15 movb -0x1(%r15), %al leal -0x30(%rax), %ecx cmpb $0xa, %cl jb 0x69353 movzbl %al, %ecx leal -0x2d(%rcx), %edx cmpl $0x2, %edx jae 0x69358 incq %r15 jmp 0x6933c cmpl $0x6c, %ecx jne 0x69362 movb (%r15), %al jmp 0x69365 decq %r15 cmpb $0x64, %al je 0x69395 movzbl %al, %eax cmpl $0x75, %eax je 0x69395 cmpl $0x73, %eax jne 0x693bd movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0x6942a movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0x69436 movq %rbx, %rax subq %r14, %rax cmpq $0x1f, %rax jbe 0x6949e movl -0x60(%rbp), %ecx cmpq $0x28, %rcx ja 0x693d1 movq %rcx, %rax addq -0x50(%rbp), %rax addl $0x8, %ecx movl %ecx, -0x60(%rbp) jmp 0x693dd cmpq %rbx, %r14 je 0x6949b movw $0x2500, (%r14) # imm = 0x2500 jmp 0x6932f movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movslq (%rax), %rdi cmpb $0x64, (%r15) jne 0x693f0 movq %r12, %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 jmp 0x693fa movl %edi, %edi movq %r12, %rsi movl $0xa, %edx callq 0x7b996 cmpb $0x0, -0x40(%rbp) je 0x69333 leaq -0x3f(%rbp), %rax movb $0x0, (%r14) movb -0x1(%rax), %cl movb %cl, 0x1(%r14) addq $0x2, %r14 cmpb $0x0, (%rax) leaq 0x1(%rax), %rax jne 0x6940d jmp 0x69333 movq -0x58(%rbp), %rax leaq 0x8(%rax), %rcx movq %rcx, -0x58(%rbp) movq (%rax), %r13 movq %rbx, %r12 subq %r14, %r12 testq %r13, %r13 leaq 0x1a4b0(%rip), %rax # 0x838f9 cmoveq %rax, %r13 movq %r13, %rdi callq 0x26150 leaq (%rax,%rax), %rdx movq %r12, %rcx shrq %rcx decq %rcx cmpq %rdx, %r12 cmovaq %rax, %rcx testq %rcx, %rcx je 0x69492 xorl %eax, %eax leaq -0x40(%rbp), %r12 movb $0x0, (%r14) movb (%r13,%rax), %dl movb %dl, 0x1(%r14) addq $0x2, %r14 incq %rax cmpq %rax, %rcx jne 0x69474 jmp 0x69333 leaq -0x40(%rbp), %r12 jmp 0x69333 movq %rbx, %r14 movb $0x0, (%r14) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x694ca subq -0x68(%rbp), %r14 movq %r14, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x263a0
my_snprintf_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r14, rsi lea rcx, [rbp+var_120] mov [rcx+20h], r8 mov [rcx+28h], r9 test al, al jz short loc_692D4 movaps [rbp+var_F0], xmm0 movaps [rbp+var_E0], xmm1 movaps [rbp+var_D0], xmm2 movaps [rbp+var_C0], xmm3 movaps [rbp+var_B0], xmm4 movaps [rbp+var_A0], xmm5 movaps [rbp+var_90], xmm6 movaps [rbp+var_80], xmm7 loc_692D4: mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_50], rcx lea rax, [rbp+arg_0] mov [rbp+var_58], rax mov rax, 3000000020h mov [rbp+var_60], rax lea rbx, [rsi+rdx] dec rbx lea r12, [rbp+var_40] mov [rbp+var_68], rsi loc_6930A: movzx eax, byte ptr [r15] cmp eax, 25h ; '%' jz short loc_69338 test eax, eax jz loc_6949E cmp r14, rbx jz loc_6949B mov byte ptr [r14], 0 mov al, [r15] mov [r14+1], al loc_6932F: add r14, 2 loc_69333: inc r15 jmp short loc_6930A loc_69338: add r15, 2 loc_6933C: mov al, [r15-1] lea ecx, [rax-30h] cmp cl, 0Ah jb short loc_69353 movzx ecx, al lea edx, [rcx-2Dh] cmp edx, 2 jnb short loc_69358 loc_69353: inc r15 jmp short loc_6933C loc_69358: cmp ecx, 6Ch ; 'l' jnz short loc_69362 mov al, [r15] jmp short loc_69365 loc_69362: dec r15 loc_69365: cmp al, 64h ; 'd' jz short loc_69395 movzx eax, al cmp eax, 75h ; 'u' jz short loc_69395 cmp eax, 73h ; 's' jnz short loc_693BD mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja loc_6942A mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp loc_69436 loc_69395: mov rax, rbx sub rax, r14 cmp rax, 1Fh jbe loc_6949E mov ecx, dword ptr [rbp+var_60] cmp rcx, 28h ; '(' ja short loc_693D1 mov rax, rcx add rax, [rbp+var_50] add ecx, 8 mov dword ptr [rbp+var_60], ecx jmp short loc_693DD loc_693BD: cmp r14, rbx jz loc_6949B mov word ptr [r14], 2500h jmp loc_6932F loc_693D1: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_693DD: movsxd rdi, dword ptr [rax] cmp byte ptr [r15], 64h ; 'd' jnz short loc_693F0 mov rsi, r12 mov edx, 0FFFFFFF6h jmp short loc_693FA loc_693F0: mov edi, edi mov rsi, r12 mov edx, 0Ah loc_693FA: call int10_to_str cmp [rbp+var_40], 0 jz loc_69333 lea rax, [rbp+var_3F] loc_6940D: mov byte ptr [r14], 0 mov cl, [rax-1] mov [r14+1], cl add r14, 2 cmp byte ptr [rax], 0 lea rax, [rax+1] jnz short loc_6940D jmp loc_69333 loc_6942A: mov rax, [rbp+var_58] lea rcx, [rax+8] mov [rbp+var_58], rcx loc_69436: mov r13, [rax] mov r12, rbx sub r12, r14 test r13, r13 lea rax, aNull; "(null)" cmovz r13, rax mov rdi, r13 call _strlen lea rdx, [rax+rax] mov rcx, r12 shr rcx, 1 dec rcx cmp r12, rdx cmova rcx, rax test rcx, rcx jz short loc_69492 xor eax, eax lea r12, [rbp+var_40] loc_69474: mov byte ptr [r14], 0 mov dl, [r13+rax+0] mov [r14+1], dl add r14, 2 inc rax cmp rcx, rax jnz short loc_69474 jmp loc_69333 loc_69492: lea r12, [rbp+var_40] jmp loc_69333 loc_6949B: mov r14, rbx loc_6949E: mov byte ptr [r14], 0 mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_694CA sub r14, [rbp+var_68] mov rax, r14 add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_694CA: call ___stack_chk_fail
_BYTE * my_snprintf_mb2( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, _BYTE *a10, long long a11, unsigned __int8 *a12, long long a13, long long a14, char a15) { _BYTE *v16; // r14 long long v17; // rbx unsigned __int8 v18; // al const char **v19; // rax char *v20; // rax long long v21; // rdi long long v22; // rdx char *v23; // rax const char *v25; // r13 unsigned long long v26; // r12 long long v27; // rax long long v28; // rcx long long i; // rax char v31; // [rsp+0h] [rbp-120h] BYREF long long v32; // [rsp+20h] [rbp-100h] long long v33; // [rsp+28h] [rbp-F8h] __m128 v34; // [rsp+30h] [rbp-F0h] __m128 v35; // [rsp+40h] [rbp-E0h] __m128 v36; // [rsp+50h] [rbp-D0h] __m128 v37; // [rsp+60h] [rbp-C0h] __m128 v38; // [rsp+70h] [rbp-B0h] __m128 v39; // [rsp+80h] [rbp-A0h] __m128 v40; // [rsp+90h] [rbp-90h] __m128 v41; // [rsp+A0h] [rbp-80h] _BYTE *v42; // [rsp+B8h] [rbp-68h] long long v43; // [rsp+C0h] [rbp-60h] char *v44; // [rsp+C8h] [rbp-58h] char *v45; // [rsp+D0h] [rbp-50h] char v46; // [rsp+E0h] [rbp-40h] BYREF char v47; // [rsp+E1h] [rbp-3Fh] BYREF unsigned long long v48; // [rsp+F0h] [rbp-30h] v34 = a1; v35 = a2; v36 = a3; v37 = a4; v38 = a5; v39 = a6; v40 = a7; v41 = a8; v16 = a10; v32 = a13; v33 = a14; v48 = __readfsqword(0x28u); v45 = &v31; v44 = &a15; v43 = 0x3000000020LL; v17 = (long long)&a10[a11 - 1]; v42 = a10; while ( *a12 == 37 ) { for ( a12 += 2; ; ++a12 ) { v18 = *(a12 - 1); if ( (unsigned __int8)(v18 - 48) >= 0xAu && (unsigned int)v18 - 45 >= 2 ) break; } if ( v18 == 108 ) v18 = *a12; else --a12; if ( v18 == 100 || v18 == 117 ) { if ( (unsigned long long)(v17 - (_QWORD)v16) <= 0x1F ) goto LABEL_44; if ( (unsigned int)v43 > 0x28uLL ) { v20 = v44; v44 += 8; } else { v20 = &v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v21 = *(int *)v20; if ( *a12 == 100 ) { v22 = 4294967286LL; } else { v21 = (unsigned int)v21; v22 = 10LL; } int10_to_str(v21, &v46, v22); if ( v46 ) { v23 = &v47; do { *v16 = 0; v16[1] = *(v23 - 1); v16 += 2; } while ( *v23++ != 0 ); } } else { if ( v18 != 115 ) { if ( v16 == (_BYTE *)v17 ) goto LABEL_43; *(_WORD *)v16 = 9472; goto LABEL_6; } if ( (unsigned int)v43 > 0x28uLL ) { v19 = (const char **)v44; v44 += 8; } else { v19 = (const char **)&v45[(unsigned int)v43]; LODWORD(v43) = v43 + 8; } v25 = *v19; v26 = v17 - (_QWORD)v16; if ( !*v19 ) v25 = "(null)"; v27 = strlen(v25); v28 = (v26 >> 1) - 1; if ( v26 > 2 * v27 ) v28 = v27; if ( v28 ) { for ( i = 0LL; i != v28; ++i ) { *v16 = 0; v16[1] = v25[i]; v16 += 2; } } } LABEL_7: ++a12; } if ( !*a12 ) goto LABEL_44; if ( v16 != (_BYTE *)v17 ) { *v16 = 0; v16[1] = *a12; LABEL_6: v16 += 2; goto LABEL_7; } LABEL_43: v16 = (_BYTE *)v17; LABEL_44: *v16 = 0; return (_BYTE *)(v16 - v42); }
my_snprintf_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R14,RSI LEA RCX,[RBP + -0x120] MOV qword ptr [RCX + 0x20],R8 MOV qword ptr [RCX + 0x28],R9 TEST AL,AL JZ 0x001692d4 MOVAPS xmmword ptr [RBP + -0xf0],XMM0 MOVAPS xmmword ptr [RBP + -0xe0],XMM1 MOVAPS xmmword ptr [RBP + -0xd0],XMM2 MOVAPS xmmword ptr [RBP + -0xc0],XMM3 MOVAPS xmmword ptr [RBP + -0xb0],XMM4 MOVAPS xmmword ptr [RBP + -0xa0],XMM5 MOVAPS xmmword ptr [RBP + -0x90],XMM6 MOVAPS xmmword ptr [RBP + -0x80],XMM7 LAB_001692d4: MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x50],RCX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x58],RAX MOV RAX,0x3000000020 MOV qword ptr [RBP + -0x60],RAX LEA RBX,[RSI + RDX*0x1] DEC RBX LEA R12,[RBP + -0x40] MOV qword ptr [RBP + -0x68],RSI LAB_0016930a: MOVZX EAX,byte ptr [R15] CMP EAX,0x25 JZ 0x00169338 TEST EAX,EAX JZ 0x0016949e CMP R14,RBX JZ 0x0016949b MOV byte ptr [R14],0x0 MOV AL,byte ptr [R15] MOV byte ptr [R14 + 0x1],AL LAB_0016932f: ADD R14,0x2 LAB_00169333: INC R15 JMP 0x0016930a LAB_00169338: ADD R15,0x2 LAB_0016933c: MOV AL,byte ptr [R15 + -0x1] LEA ECX,[RAX + -0x30] CMP CL,0xa JC 0x00169353 MOVZX ECX,AL LEA EDX,[RCX + -0x2d] CMP EDX,0x2 JNC 0x00169358 LAB_00169353: INC R15 JMP 0x0016933c LAB_00169358: CMP ECX,0x6c JNZ 0x00169362 MOV AL,byte ptr [R15] JMP 0x00169365 LAB_00169362: DEC R15 LAB_00169365: CMP AL,0x64 JZ 0x00169395 MOVZX EAX,AL CMP EAX,0x75 JZ 0x00169395 CMP EAX,0x73 JNZ 0x001693bd MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x0016942a MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x00169436 LAB_00169395: MOV RAX,RBX SUB RAX,R14 CMP RAX,0x1f JBE 0x0016949e MOV ECX,dword ptr [RBP + -0x60] CMP RCX,0x28 JA 0x001693d1 MOV RAX,RCX ADD RAX,qword ptr [RBP + -0x50] ADD ECX,0x8 MOV dword ptr [RBP + -0x60],ECX JMP 0x001693dd LAB_001693bd: CMP R14,RBX JZ 0x0016949b MOV word ptr [R14],0x2500 JMP 0x0016932f LAB_001693d1: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_001693dd: MOVSXD RDI,dword ptr [RAX] CMP byte ptr [R15],0x64 JNZ 0x001693f0 MOV RSI,R12 MOV EDX,0xfffffff6 JMP 0x001693fa LAB_001693f0: MOV EDI,EDI MOV RSI,R12 MOV EDX,0xa LAB_001693fa: CALL 0x0017b996 CMP byte ptr [RBP + -0x40],0x0 JZ 0x00169333 LEA RAX,[RBP + -0x3f] LAB_0016940d: MOV byte ptr [R14],0x0 MOV CL,byte ptr [RAX + -0x1] MOV byte ptr [R14 + 0x1],CL ADD R14,0x2 CMP byte ptr [RAX],0x0 LEA RAX,[RAX + 0x1] JNZ 0x0016940d JMP 0x00169333 LAB_0016942a: MOV RAX,qword ptr [RBP + -0x58] LEA RCX,[RAX + 0x8] MOV qword ptr [RBP + -0x58],RCX LAB_00169436: MOV R13,qword ptr [RAX] MOV R12,RBX SUB R12,R14 TEST R13,R13 LEA RAX,[0x1838f9] CMOVZ R13,RAX MOV RDI,R13 CALL 0x00126150 LEA RDX,[RAX + RAX*0x1] MOV RCX,R12 SHR RCX,0x1 DEC RCX CMP R12,RDX CMOVA RCX,RAX TEST RCX,RCX JZ 0x00169492 XOR EAX,EAX LEA R12,[RBP + -0x40] LAB_00169474: MOV byte ptr [R14],0x0 MOV DL,byte ptr [R13 + RAX*0x1] MOV byte ptr [R14 + 0x1],DL ADD R14,0x2 INC RAX CMP RCX,RAX JNZ 0x00169474 JMP 0x00169333 LAB_00169492: LEA R12,[RBP + -0x40] JMP 0x00169333 LAB_0016949b: MOV R14,RBX LAB_0016949e: MOV byte ptr [R14],0x0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x001694ca SUB R14,qword ptr [RBP + -0x68] MOV RAX,R14 ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001694ca: CALL 0x001263a0
long my_snprintf_mb2(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,int2 *param_10,long param_11,byte *param_12, int8 param_13,int8 param_14) { char in_AL; byte bVar1; uint *puVar2; size_t sVar3; size_t sVar4; int8 uVar5; int2 *puVar6; ulong uVar7; char *pcVar8; int2 *puVar9; long in_FS_OFFSET; int1 local_128 [32]; int8 local_108; int8 local_100; int8 local_f8; int8 local_e8; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int2 *local_70; ulong local_68; uint *local_60; int1 *local_58; char local_48 [16]; long local_38; local_58 = local_128; if (in_AL != '\0') { local_f8 = param_1; local_e8 = param_2; local_d8 = param_3; local_c8 = param_4; local_b8 = param_5; local_a8 = param_6; local_98 = param_7; local_88 = param_8; } local_38 = *(long *)(in_FS_OFFSET + 0x28); local_60 = (uint *)&stack0x00000008; local_68 = 0x3000000020; puVar6 = (int2 *)((long)param_10 + param_11 + -1); local_108 = param_13; local_100 = param_14; local_70 = param_10; do { puVar9 = param_10; if (*param_12 == 0x25) { param_12 = param_12 + 2; while ((bVar1 = param_12[-1], (byte)(bVar1 - 0x30) < 10 || (bVar1 - 0x2d < 2))) { param_12 = param_12 + 1; } if (bVar1 == 0x6c) { bVar1 = *param_12; } else { param_12 = param_12 + -1; } if ((bVar1 == 100) || (bVar1 == 0x75)) { if ((ulong)((long)puVar6 - (long)param_10) < 0x20) { LAB_0016949e: *(int1 *)puVar9 = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)puVar9 - (long)local_70; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } uVar7 = (ulong)(int)*puVar2; if (*param_12 == 100) { uVar5 = 0xfffffff6; } else { uVar7 = (ulong)*puVar2; uVar5 = 10; } int10_to_str(uVar7,local_48,uVar5); if (local_48[0] != '\0') { pcVar8 = local_48; do { pcVar8 = pcVar8 + 1; *(int1 *)param_10 = 0; *(char *)((long)param_10 + 1) = pcVar8[-1]; param_10 = param_10 + 1; } while (*pcVar8 != '\0'); } } else { if (bVar1 != 0x73) { puVar9 = puVar6; if (param_10 != puVar6) { *param_10 = 0x2500; goto LAB_0016932f; } goto LAB_0016949e; } uVar7 = local_68 & 0xffffffff; if (uVar7 < 0x29) { local_68 = CONCAT44(local_68._4_4_,(int)local_68 + 8); puVar2 = (uint *)(local_58 + uVar7); } else { puVar2 = local_60; local_60 = local_60 + 2; } pcVar8 = *(char **)puVar2; if (pcVar8 == (char *)0x0) { pcVar8 = "(null)"; } sVar3 = strlen(pcVar8); sVar4 = ((ulong)((long)puVar6 - (long)param_10) >> 1) - 1; if (sVar3 * 2 < (ulong)((long)puVar6 - (long)param_10)) { sVar4 = sVar3; } if (sVar4 != 0) { sVar3 = 0; do { *(int1 *)param_10 = 0; *(char *)((long)param_10 + 1) = pcVar8[sVar3]; param_10 = param_10 + 1; sVar3 = sVar3 + 1; } while (sVar4 != sVar3); } } } else { if ((*param_12 == 0) || (puVar9 = puVar6, param_10 == puVar6)) goto LAB_0016949e; *(int1 *)param_10 = 0; *(byte *)((long)param_10 + 1) = *param_12; LAB_0016932f: param_10 = param_10 + 1; } param_12 = param_12 + 1; } while( true ); }
39,205
compare_columns
eloqsql/storage/maria/ma_create.c
static int compare_columns(MARIA_COLUMNDEF **a_ptr, MARIA_COLUMNDEF **b_ptr) { MARIA_COLUMNDEF *a= *a_ptr, *b= *b_ptr; enum en_fieldtype a_type, b_type; a_type= (a->type == FIELD_CHECK) ? FIELD_NORMAL : a->type; b_type= (b->type == FIELD_CHECK) ? FIELD_NORMAL : b->type; if (a_type == FIELD_NORMAL && !a->null_bit) { if (b_type != FIELD_NORMAL || b->null_bit) return -1; return sign((long) a->offset - (long) b->offset); } if (b_type == FIELD_NORMAL && !b->null_bit) return 1; if (a_type == b_type) return sign((long) a->offset - (long) b->offset); if (a_type == FIELD_NORMAL) return -1; if (b_type == FIELD_NORMAL) return 1; if (a_type == FIELD_SKIP_ZERO) return -1; if (b_type == FIELD_SKIP_ZERO) return 1; if (a->type != FIELD_BLOB && b->type != FIELD_BLOB) if (a->length != b->length) return sign((long) a->length - (long) b->length); if (a_type == FIELD_BLOB) return 1; if (b_type == FIELD_BLOB) return -1; return sign((long) a->offset - (long) b->offset); }
O3
c
compare_columns: pushq %rbp movq %rsp, %rbp movq (%rdi), %rdx movq (%rsi), %rcx movl (%rdx), %r8d xorl %esi, %esi cmpl $0x9, %r8d movl %r8d, %edi cmovel %esi, %edi movl (%rcx), %r9d cmpl $0x9, %r9d cmovnel %r9d, %esi testl %edi, %edi jne 0x5e6c8 cmpb $0x0, 0x12(%rdx) je 0x5e759 testl %esi, %esi jne 0x5e6d6 cmpb $0x0, 0x12(%rcx) je 0x5e76d cmpl %esi, %edi jne 0x5e6f2 movl 0x4(%rdx), %eax xorl %edx, %edx cmpl 0x4(%rcx), %eax setne %dl movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmovael %edx, %eax jmp 0x5e772 testl %esi, %esi sete %r11b xorl %eax, %eax testl %edi, %edi sete %r10b orb %r10b, %r11b je 0x5e70f movb %r10b, %al negl %eax orl $0x1, %eax jmp 0x5e772 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0x3, %edi je 0x5e772 movl $0x1, %eax cmpl $0x3, %esi je 0x5e772 cmpl $0x4, %r8d sete %r8b cmpl $0x4, %r9d sete %r9b orb %r8b, %r9b jne 0x5e748 movzwl 0x8(%rdx), %r8d movzwl 0x8(%rcx), %r9d cmpw %r9w, %r8w jne 0x5e774 cmpl $0x4, %edi je 0x5e772 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0x4, %esi jne 0x5e6da jmp 0x5e772 movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %esi, %esi jne 0x5e772 cmpb $0x0, 0x12(%rcx) jne 0x5e772 jmp 0x5e6da movl $0x1, %eax popq %rbp retq xorl %eax, %eax cmpw %r9w, %r8w sbbl %eax, %eax jmp 0x5e70a
compare_columns: push rbp mov rbp, rsp mov rdx, [rdi] mov rcx, [rsi] mov r8d, [rdx] xor esi, esi cmp r8d, 9 mov edi, r8d cmovz edi, esi mov r9d, [rcx] cmp r9d, 9 cmovnz esi, r9d test edi, edi jnz short loc_5E6C8 cmp byte ptr [rdx+12h], 0 jz loc_5E759 loc_5E6C8: test esi, esi jnz short loc_5E6D6 cmp byte ptr [rcx+12h], 0 jz loc_5E76D loc_5E6D6: cmp edi, esi jnz short loc_5E6F2 loc_5E6DA: mov eax, [rdx+4] xor edx, edx cmp eax, [rcx+4] setnz dl mov eax, 0FFFFFFFFh cmovnb eax, edx jmp loc_5E772 loc_5E6F2: test esi, esi setz r11b xor eax, eax test edi, edi setz r10b or r11b, r10b jz short loc_5E70F mov al, r10b neg eax loc_5E70A: or eax, 1 jmp short loc_5E772 loc_5E70F: mov eax, 0FFFFFFFFh cmp edi, 3 jz short loc_5E772 mov eax, 1 cmp esi, 3 jz short loc_5E772 cmp r8d, 4 setz r8b cmp r9d, 4 setz r9b or r9b, r8b jnz short loc_5E748 movzx r8d, word ptr [rdx+8] movzx r9d, word ptr [rcx+8] cmp r8w, r9w jnz short loc_5E774 loc_5E748: cmp edi, 4 jz short loc_5E772 mov eax, 0FFFFFFFFh cmp esi, 4 jnz short loc_5E6DA jmp short loc_5E772 loc_5E759: mov eax, 0FFFFFFFFh test esi, esi jnz short loc_5E772 cmp byte ptr [rcx+12h], 0 jnz short loc_5E772 jmp loc_5E6DA loc_5E76D: mov eax, 1 loc_5E772: pop rbp retn loc_5E774: xor eax, eax cmp r8w, r9w sbb eax, eax jmp short loc_5E70A
long long compare_columns(int **a1, int **a2) { int *v2; // rdx int *v3; // rcx int v4; // r8d int v5; // esi int v6; // edi unsigned int v7; // eax bool v8; // cf BOOL v9; // edx long long result; // rax int v11; // eax int v12; // eax unsigned __int16 v13; // r8 unsigned __int16 v14; // r9 v2 = *a1; v3 = *a2; v5 = 0; v6 = **a1; v4 = v6; if ( v6 == 9 ) v6 = 0; if ( *v3 != 9 ) v5 = *v3; if ( !v6 && !*((_BYTE *)v2 + 18) ) { result = 0xFFFFFFFFLL; if ( v5 || *((_BYTE *)v3 + 18) ) return result; LABEL_10: v7 = v2[1]; v8 = v7 < v3[1]; v9 = v7 != v3[1]; result = 0xFFFFFFFFLL; if ( !v8 ) return v9; return result; } if ( !v5 && !*((_BYTE *)v3 + 18) ) return 1LL; if ( v6 == v5 ) goto LABEL_10; v11 = 0; if ( v6 == 0 || v5 == 0 ) { LOBYTE(v11) = v6 == 0; v12 = -v11; return v12 | 1u; } result = 0xFFFFFFFFLL; if ( v6 != 3 ) { result = 1LL; if ( v5 != 3 ) { if ( v4 != 4 && *v3 != 4 ) { v13 = *((_WORD *)v2 + 4); v14 = *((_WORD *)v3 + 4); if ( v13 != v14 ) { v12 = -(v13 < v14); return v12 | 1u; } } if ( v6 != 4 ) { result = 0xFFFFFFFFLL; if ( v5 != 4 ) goto LABEL_10; } } } return result; }
compare_columns: PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RDI] MOV RCX,qword ptr [RSI] MOV R8D,dword ptr [RDX] XOR ESI,ESI CMP R8D,0x9 MOV EDI,R8D CMOVZ EDI,ESI MOV R9D,dword ptr [RCX] CMP R9D,0x9 CMOVNZ ESI,R9D TEST EDI,EDI JNZ 0x0015e6c8 CMP byte ptr [RDX + 0x12],0x0 JZ 0x0015e759 LAB_0015e6c8: TEST ESI,ESI JNZ 0x0015e6d6 CMP byte ptr [RCX + 0x12],0x0 JZ 0x0015e76d LAB_0015e6d6: CMP EDI,ESI JNZ 0x0015e6f2 LAB_0015e6da: MOV EAX,dword ptr [RDX + 0x4] XOR EDX,EDX CMP EAX,dword ptr [RCX + 0x4] SETNZ DL MOV EAX,0xffffffff CMOVNC EAX,EDX JMP 0x0015e772 LAB_0015e6f2: TEST ESI,ESI SETZ R11B XOR EAX,EAX TEST EDI,EDI SETZ R10B OR R11B,R10B JZ 0x0015e70f MOV AL,R10B NEG EAX LAB_0015e70a: OR EAX,0x1 JMP 0x0015e772 LAB_0015e70f: MOV EAX,0xffffffff CMP EDI,0x3 JZ 0x0015e772 MOV EAX,0x1 CMP ESI,0x3 JZ 0x0015e772 CMP R8D,0x4 SETZ R8B CMP R9D,0x4 SETZ R9B OR R9B,R8B JNZ 0x0015e748 MOVZX R8D,word ptr [RDX + 0x8] MOVZX R9D,word ptr [RCX + 0x8] CMP R8W,R9W JNZ 0x0015e774 LAB_0015e748: CMP EDI,0x4 JZ 0x0015e772 MOV EAX,0xffffffff CMP ESI,0x4 JNZ 0x0015e6da JMP 0x0015e772 LAB_0015e759: MOV EAX,0xffffffff TEST ESI,ESI JNZ 0x0015e772 CMP byte ptr [RCX + 0x12],0x0 JNZ 0x0015e772 JMP 0x0015e6da LAB_0015e76d: MOV EAX,0x1 LAB_0015e772: POP RBP RET LAB_0015e774: XOR EAX,EAX CMP R8W,R9W SBB EAX,EAX JMP 0x0015e70a
uint compare_columns(int8 *param_1,int8 *param_2) { int iVar1; int iVar2; int *piVar3; int *piVar4; uint uVar5; int iVar6; int iVar7; bool bVar8; piVar3 = (int *)*param_1; piVar4 = (int *)*param_2; iVar1 = *piVar3; iVar7 = iVar1; if (iVar1 == 9) { iVar7 = 0; } iVar2 = *piVar4; iVar6 = 0; if (iVar2 != 9) { iVar6 = iVar2; } if ((iVar7 == 0) && (*(char *)((long)piVar3 + 0x12) == '\0')) { if (iVar6 != 0) { return 0xffffffff; } if (*(char *)((long)piVar4 + 0x12) != '\0') { return 0xffffffff; } } else { if ((iVar6 == 0) && (*(char *)((long)piVar4 + 0x12) == '\0')) { return 1; } if (iVar7 != iVar6) { bVar8 = iVar7 == 0; if (iVar6 == 0 || bVar8) { LAB_0015e70a: return -(uint)bVar8 | 1; } if (iVar7 == 3) { return 0xffffffff; } if (iVar6 == 3) { return 1; } if (iVar2 != 4 && iVar1 != 4) { if (*(ushort *)(piVar3 + 2) != *(ushort *)(piVar4 + 2)) { bVar8 = *(ushort *)(piVar3 + 2) < *(ushort *)(piVar4 + 2); goto LAB_0015e70a; } } if (iVar7 == 4) { return 1; } if (iVar6 == 4) { return 0xffffffff; } } } uVar5 = 0xffffffff; if ((uint)piVar4[1] <= (uint)piVar3[1]) { uVar5 = (uint)(piVar3[1] != piVar4[1]); } return uVar5; }
39,206
HeapPrintStatus
seiftnesse[P]memoryallocator/src/custom_alloc_debug.c
void HeapPrintStatus() { if (!heap_initialized) { HEAP_LOG("Heap not initialized\n"); return; } #ifdef CUSTOM_ALLOC_ENABLE_LOGGING if (heap_log_function) { heap_log_function("=== Memory Allocator Status ===\n"); heap_log_function("Total allocated: %zu bytes\n", allocation_stats.total_allocated); heap_log_function("Total freed: %zu bytes\n", allocation_stats.total_freed); heap_log_function("Active allocations: %zu\n", allocation_stats.allocation_count); heap_log_function("Peak memory usage: %zu bytes\n", allocation_stats.peak_allocation); heap_log_function("Small pool usage: %zu/%zu bytes\n", allocation_stats.small_pool_used, SMALL_POOL_SIZE); heap_log_function("Fragmentation: %.2f%%\n", HeapGetFragmentation() * 100.0f); // Add zero-on-free configuration to status report const char* depth_str; switch (zero_on_free_depth) { case ZERO_DEPTH_NONE: depth_str = "none (best performance)"; break; case ZERO_DEPTH_SHALLOW: depth_str = "shallow (headers/pointers only)"; break; case ZERO_DEPTH_MEDIUM: depth_str = "medium (50% of memory)"; break; case ZERO_DEPTH_DEEP: depth_str = "deep (entire memory block)"; break; default: depth_str = "unknown"; } heap_log_function("Zero-on-free depth: %s\n", depth_str); if (zero_on_free_depth == ZERO_DEPTH_SHALLOW) { heap_log_function("Shallow zero size: %zu bytes\n", shallow_zero_size); } if (track_allocations) { heap_log_function("\n=== Active Allocations ===\n"); segment_t *s = segments; while (s) { if (!s->is_free) { if (s->allocation_file) { heap_log_function("ID: %u, Size: %d blocks, Location: %s:%d\n", s->allocation_id, s->size, s->allocation_file, s->allocation_line); } else { heap_log_function("ID: %u, Size: %d blocks, Location: unknown\n", s->allocation_id, s->size); } } s = s->next; } } heap_log_function("==============================\n"); } #endif }
O3
c
HeapPrintStatus: retq
HeapPrintStatus: retn
void HeapPrintStatus() { ; }
HeapPrintStatus: RET
void HeapPrintStatus(void) { return; }
39,207
find_mid
eloqsql/storage/maria/ma_bitmap.c
static my_bool find_mid(MARIA_HA *info, ulong pages, uint position) { MARIA_FILE_BITMAP *bitmap= &info->s->bitmap; MARIA_BITMAP_BLOCK *block; block= dynamic_element(&info->bitmap_blocks, position, MARIA_BITMAP_BLOCK *); while (!allocate_full_pages(bitmap, pages, block, 1)) { if (move_to_next_bitmap(info, bitmap)) return 1; } return 0; }
O0
c
find_mid: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax addq $0xa10, %rax # imm = 0xA10 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x2c0(%rax), %rax movl -0x1c(%rbp), %ecx imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx movl $0x1, %ecx callq 0x64470 cmpq $0x0, %rax setne %al xorb $-0x1, %al testb $0x1, %al jne 0x64d42 jmp 0x64d5b movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi callq 0x63ff0 cmpb $0x0, %al je 0x64d59 movb $0x1, -0x1(%rbp) jmp 0x64d5f jmp 0x64d1d movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
find_mid: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov rax, [rax] add rax, 0A10h mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+2C0h] mov ecx, [rbp+var_1C] imul rcx, 18h add rax, rcx mov [rbp+var_30], rax loc_64D1D: mov rdi, [rbp+var_28] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] mov ecx, 1 call allocate_full_pages cmp rax, 0 setnz al xor al, 0FFh test al, 1 jnz short loc_64D42 jmp short loc_64D5B loc_64D42: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] call move_to_next_bitmap cmp al, 0 jz short loc_64D59 mov [rbp+var_1], 1 jmp short loc_64D5F loc_64D59: jmp short loc_64D1D loc_64D5B: mov [rbp+var_1], 0 loc_64D5F: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char find_mid(long long *a1, unsigned long long a2, unsigned int a3) { long long v4; // [rsp+0h] [rbp-30h] long long v5; // [rsp+8h] [rbp-28h] v5 = *a1 + 2576; v4 = 24LL * a3 + a1[88]; while ( !allocate_full_pages(v5, a2, v4, 1) ) { if ( move_to_next_bitmap(a1, v5) ) return 1; } return 0; }
find_mid: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] ADD RAX,0xa10 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2c0] MOV ECX,dword ptr [RBP + -0x1c] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_00164d1d: MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOV ECX,0x1 CALL 0x00164470 CMP RAX,0x0 SETNZ AL XOR AL,0xff TEST AL,0x1 JNZ 0x00164d42 JMP 0x00164d5b LAB_00164d42: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] CALL 0x00163ff0 CMP AL,0x0 JZ 0x00164d59 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00164d5f LAB_00164d59: JMP 0x00164d1d LAB_00164d5b: MOV byte ptr [RBP + -0x1],0x0 LAB_00164d5f: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 find_mid(long *param_1,int8 param_2,uint param_3) { long lVar1; long lVar2; char cVar3; long lVar4; lVar1 = *param_1; lVar2 = param_1[0x58]; do { lVar4 = allocate_full_pages(lVar1 + 0xa10,param_2,lVar2 + (ulong)param_3 * 0x18,1); if (lVar4 != 0) { return 0; } cVar3 = move_to_next_bitmap(param_1,lVar1 + 0xa10); } while (cVar3 == '\0'); return 1; }
39,208
ggml_get_f32_1d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
float ggml_get_f32_1d(const struct ggml_tensor * tensor, int i) { if (!ggml_is_contiguous(tensor)) { int64_t id[4] = { 0, 0, 0, 0 }; ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]); return ggml_get_f32_nd(tensor, id[0], id[1], id[2], id[3]); } switch (tensor->type) { case GGML_TYPE_I8: { GGML_ASSERT(tensor->nb[0] == sizeof(int8_t)); return ((int8_t *)(tensor->data))[i]; } case GGML_TYPE_I16: { GGML_ASSERT(tensor->nb[0] == sizeof(int16_t)); return ((int16_t *)(tensor->data))[i]; } case GGML_TYPE_I32: { GGML_ASSERT(tensor->nb[0] == sizeof(int32_t)); return ((int32_t *)(tensor->data))[i]; } case GGML_TYPE_F16: { GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t)); return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]); } case GGML_TYPE_F32: { GGML_ASSERT(tensor->nb[0] == sizeof(float)); return ((float *)(tensor->data))[i]; } default: { GGML_ASSERT(false); } } return 0.0f; }
O1
c
ggml_get_f32_1d: pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx callq 0x8e334 testb %al, %al je 0x90711 movl (%rbx), %eax cmpl $0xf, %eax jle 0x90755 cmpl $0x12, %eax je 0x90785 cmpl $0x11, %eax je 0x9079d cmpl $0x10, %eax jne 0x907d5 cmpq $0x1, 0x30(%rbx) jne 0x907df movq 0x118(%rbx), %rax movslq %ebp, %rcx movsbl (%rax,%rcx), %eax jmp 0x907b2 movslq %ebp, %rax movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rcx imulq %rsi, %rcx movq 0x20(%rbx), %rdi imulq %rcx, %rdi cqto idivq %rdi movq %rax, %r8 movq %rdx, %rax cqto idivq %rcx movq %rax, %rcx movq %rdx, %rax cqto idivq %rsi movq %rbx, %rdi movl %edx, %esi movl %eax, %edx addq $0x8, %rsp popq %rbx popq %rbp jmp 0x907f3 testl %eax, %eax je 0x907b8 cmpl $0x1, %eax jne 0x907d5 cmpq $0x2, 0x30(%rbx) jne 0x907ee movq 0x118(%rbx), %rax movslq %ebp, %rcx movzwl (%rax,%rcx,2), %eax leaq 0xedb02(%rip), %rcx # 0x17e280 vmovss (%rcx,%rax,4), %xmm0 jmp 0x907ce cmpq $0x4, 0x30(%rbx) jne 0x907da movq 0x118(%rbx), %rax movslq %ebp, %rcx vcvtsi2ssl (%rax,%rcx,4), %xmm0, %xmm0 jmp 0x907ce cmpq $0x2, 0x30(%rbx) jne 0x907e4 movq 0x118(%rbx), %rax movslq %ebp, %rcx movswl (%rax,%rcx,2), %eax vcvtsi2ss %eax, %xmm0, %xmm0 jmp 0x907ce cmpq $0x4, 0x30(%rbx) jne 0x907e9 movq 0x118(%rbx), %rax movslq %ebp, %rcx vmovss (%rax,%rcx,4), %xmm0 addq $0x8, %rsp popq %rbx popq %rbp retq callq 0xc89c callq 0xc7cd callq 0xc857 callq 0xc812 callq 0xc743 callq 0xc788
ggml_get_f32_1d: push rbp push rbx push rax mov ebp, esi mov rbx, rdi call ggml_is_contiguous test al, al jz short loc_90711 mov eax, [rbx] cmp eax, 0Fh jle short loc_90755 cmp eax, 12h jz loc_90785 cmp eax, 11h jz loc_9079D cmp eax, 10h jnz loc_907D5 cmp qword ptr [rbx+30h], 1 jnz loc_907DF mov rax, [rbx+118h] movsxd rcx, ebp movsx eax, byte ptr [rax+rcx] jmp loc_907B2 loc_90711: movsxd rax, ebp mov rsi, [rbx+10h] mov rcx, [rbx+18h] imul rcx, rsi mov rdi, [rbx+20h] imul rdi, rcx cqo idiv rdi mov r8, rax mov rax, rdx cqo idiv rcx mov rcx, rax mov rax, rdx cqo idiv rsi mov rdi, rbx mov esi, edx mov edx, eax add rsp, 8 pop rbx pop rbp jmp ggml_get_f32_nd loc_90755: test eax, eax jz short loc_907B8 cmp eax, 1 jnz short loc_907D5 cmp qword ptr [rbx+30h], 2 jnz loc_907EE mov rax, [rbx+118h] movsxd rcx, ebp movzx eax, word ptr [rax+rcx*2] lea rcx, ggml_table_f32_f16 vmovss xmm0, dword ptr [rcx+rax*4] jmp short loc_907CE loc_90785: cmp qword ptr [rbx+30h], 4 jnz short loc_907DA mov rax, [rbx+118h] movsxd rcx, ebp vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] jmp short loc_907CE loc_9079D: cmp qword ptr [rbx+30h], 2 jnz short loc_907E4 mov rax, [rbx+118h] movsxd rcx, ebp movsx eax, word ptr [rax+rcx*2] loc_907B2: vcvtsi2ss xmm0, xmm0, eax jmp short loc_907CE loc_907B8: cmp qword ptr [rbx+30h], 4 jnz short loc_907E9 mov rax, [rbx+118h] movsxd rcx, ebp vmovss xmm0, dword ptr [rax+rcx*4] loc_907CE: add rsp, 8 pop rbx pop rbp retn loc_907D5: call ggml_get_f32_1d_cold_6 loc_907DA: call ggml_get_f32_1d_cold_3 loc_907DF: call ggml_get_f32_1d_cold_5 loc_907E4: call ggml_get_f32_1d_cold_4 loc_907E9: call ggml_get_f32_1d_cold_1 loc_907EE: call ggml_get_f32_1d_cold_2
__m128 ggml_get_f32_1d(_QWORD *a1, int a2, __m128 result) { int v4; // eax long long v5; // rsi long long v6; // rcx if ( !(unsigned __int8)ggml_is_contiguous(a1) ) { v5 = a1[2]; v6 = v5 * a1[3]; ggml_get_f32_nd( a1, (unsigned int)(a2 % (v6 * a1[4]) % v6 % v5), (unsigned int)(a2 % (v6 * a1[4]) % v6 / v5), a2 % (v6 * a1[4]) / v6, a2 / (v6 * a1[4])); return result; } v4 = *(_DWORD *)a1; if ( *(int *)a1 <= 15 ) { if ( v4 ) { if ( v4 != 1 ) goto LABEL_19; if ( a1[6] != 2LL ) ggml_get_f32_1d_cold_2(a1); _RAX = *(unsigned __int16 *)(a1[35] + 2LL * a2); _RCX = &ggml_table_f32_f16; __asm { vmovss xmm0, dword ptr [rcx+rax*4] } } else { if ( a1[6] != 4LL ) ggml_get_f32_1d_cold_1(a1); _RAX = a1[35]; _RCX = a2; __asm { vmovss xmm0, dword ptr [rax+rcx*4] } } } else { if ( v4 != 18 ) { if ( v4 == 17 ) { if ( a1[6] != 2LL ) ggml_get_f32_1d_cold_4(a1); goto LABEL_16; } if ( v4 == 16 ) { if ( a1[6] != 1LL ) ggml_get_f32_1d_cold_5(a1); LABEL_16: __asm { vcvtsi2ss xmm0, xmm0, eax } return result; } LABEL_19: ggml_get_f32_1d_cold_6(a1); } if ( a1[6] != 4LL ) ggml_get_f32_1d_cold_3(a1); __asm { vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] } } return result; }
39,209
ggml_get_f32_1d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
float ggml_get_f32_1d(const struct ggml_tensor * tensor, int i) { if (!ggml_is_contiguous(tensor)) { int64_t id[4] = { 0, 0, 0, 0 }; ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]); return ggml_get_f32_nd(tensor, id[0], id[1], id[2], id[3]); } switch (tensor->type) { case GGML_TYPE_I8: { GGML_ASSERT(tensor->nb[0] == sizeof(int8_t)); return ((int8_t *)(tensor->data))[i]; } case GGML_TYPE_I16: { GGML_ASSERT(tensor->nb[0] == sizeof(int16_t)); return ((int16_t *)(tensor->data))[i]; } case GGML_TYPE_I32: { GGML_ASSERT(tensor->nb[0] == sizeof(int32_t)); return ((int32_t *)(tensor->data))[i]; } case GGML_TYPE_F16: { GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t)); return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]); } case GGML_TYPE_F32: { GGML_ASSERT(tensor->nb[0] == sizeof(float)); return ((float *)(tensor->data))[i]; } default: { GGML_ASSERT(false); } } return 0.0f; }
O2
c
ggml_get_f32_1d: pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movl %esi, %ebp movq %rdi, %rbx callq 0x67db9 testb %al, %al je 0x69225 movl (%rbx), %eax testl %eax, %eax je 0x6928d cmpl $0x1, %eax je 0x6926a cmpl $0x12, %eax je 0x692a9 cmpl $0x11, %eax je 0x692c5 cmpl $0x10, %eax jne 0x693fd cmpq $0x1, 0x30(%rbx) jne 0x6935b movq 0x118(%rbx), %rax movslq %ebp, %rcx movsbl (%rax,%rcx), %eax jmp 0x692de vxorps %xmm0, %xmm0, %xmm0 leaq 0x8(%rsp), %rcx vmovups %ymm0, -0x8(%rcx) movslq %ebp, %rsi leaq 0x10(%rsp), %r8 leaq 0x18(%rsp), %r9 movq %rsp, %r14 movq %rbx, %rdi movq %r14, %rdx vzeroupper callq 0x68b0d movl (%r14), %esi movl 0x8(%r14), %edx movl 0x10(%r14), %ecx movl 0x18(%r14), %r8d movq %rbx, %rdi callq 0x69441 jmp 0x692e2 cmpq $0x2, 0x30(%rbx) jne 0x692eb movq 0x118(%rbx), %rax movslq %ebp, %rcx movzwl (%rax,%rcx,2), %eax leaq 0xf400a(%rip), %rcx # 0x15d290 vmovss (%rcx,%rax,4), %xmm0 jmp 0x692e2 cmpq $0x4, 0x30(%rbx) jne 0x69323 movq 0x118(%rbx), %rax movslq %ebp, %rcx vmovss (%rax,%rcx,4), %xmm0 jmp 0x692e2 cmpq $0x4, 0x30(%rbx) jne 0x69393 movq 0x118(%rbx), %rax movslq %ebp, %rcx vcvtsi2ssl (%rax,%rcx,4), %xmm0, %xmm0 jmp 0x692e2 cmpq $0x2, 0x30(%rbx) jne 0x693c8 movq 0x118(%rbx), %rax movslq %ebp, %rcx movswl (%rax,%rcx,2), %eax vcvtsi2ss %eax, %xmm0, %xmm0 addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq movq 0x6cc56(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6cca7(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x30f13(%rip), %rsi # 0x9a21e leaq 0x3856c(%rip), %rdx # 0xa187e leaq 0x387ed(%rip), %r8 # 0xa1b06 movl $0xb74, %ecx # imm = 0xB74 jmp 0x69430 movq 0x6cc1e(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6cc6f(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x30edb(%rip), %rsi # 0x9a21e leaq 0x38534(%rip), %rdx # 0xa187e leaq 0x316db(%rip), %r8 # 0x9aa2c movl $0xb79, %ecx # imm = 0xB79 jmp 0x69430 movq 0x6cbe6(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6cc37(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x30ea3(%rip), %rsi # 0x9a21e leaq 0x384fc(%rip), %rdx # 0xa187e leaq 0x3871b(%rip), %r8 # 0xa1aa4 movl $0xb65, %ecx # imm = 0xB65 jmp 0x69430 movq 0x6cbae(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6cbff(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x30e6b(%rip), %rsi # 0x9a21e leaq 0x384c4(%rip), %rdx # 0xa187e leaq 0x38724(%rip), %r8 # 0xa1ae5 movl $0xb6f, %ecx # imm = 0xB6F jmp 0x69430 movq 0x6cb79(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6cbca(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x30e36(%rip), %rsi # 0x9a21e leaq 0x3848f(%rip), %rdx # 0xa187e leaq 0x386ce(%rip), %r8 # 0xa1ac4 movl $0xb6a, %ecx # imm = 0xB6A jmp 0x69430 movq 0x6cb44(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6cb95(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x30e01(%rip), %rsi # 0x9a21e leaq 0x3845a(%rip), %rdx # 0xa187e leaq 0x2ec14(%rip), %r8 # 0x9803f movl $0xb7e, %ecx # imm = 0xB7E xorl %eax, %eax callq 0xa8b0 callq 0x67550 callq 0xa300
ggml_get_f32_1d: push rbp push r14 push rbx sub rsp, 20h mov ebp, esi mov rbx, rdi call ggml_is_contiguous test al, al jz short loc_69225 mov eax, [rbx] test eax, eax jz loc_6928D cmp eax, 1 jz short loc_6926A cmp eax, 12h jz loc_692A9 cmp eax, 11h jz loc_692C5 cmp eax, 10h jnz loc_693FD cmp qword ptr [rbx+30h], 1 jnz loc_6935B mov rax, [rbx+118h] movsxd rcx, ebp movsx eax, byte ptr [rax+rcx] jmp loc_692DE loc_69225: vxorps xmm0, xmm0, xmm0 lea rcx, [rsp+38h+var_30] vmovups ymmword ptr [rcx-8], ymm0 movsxd rsi, ebp lea r8, [rsp+38h+var_28] lea r9, [rsp+38h+var_20] mov r14, rsp mov rdi, rbx mov rdx, r14 vzeroupper call ggml_unravel_index mov esi, [r14] mov edx, [r14+8] mov ecx, [r14+10h] mov r8d, [r14+18h] mov rdi, rbx call ggml_get_f32_nd jmp short loc_692E2 loc_6926A: cmp qword ptr [rbx+30h], 2 jnz short loc_692EB mov rax, [rbx+118h] movsxd rcx, ebp movzx eax, word ptr [rax+rcx*2] lea rcx, ggml_table_f32_f16 vmovss xmm0, dword ptr [rcx+rax*4] jmp short loc_692E2 loc_6928D: cmp qword ptr [rbx+30h], 4 jnz loc_69323 mov rax, [rbx+118h] movsxd rcx, ebp vmovss xmm0, dword ptr [rax+rcx*4] jmp short loc_692E2 loc_692A9: cmp qword ptr [rbx+30h], 4 jnz loc_69393 mov rax, [rbx+118h] movsxd rcx, ebp vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] jmp short loc_692E2 loc_692C5: cmp qword ptr [rbx+30h], 2 jnz loc_693C8 mov rax, [rbx+118h] movsxd rcx, ebp movsx eax, word ptr [rax+rcx*2] loc_692DE: vcvtsi2ss xmm0, xmm0, eax loc_692E2: add rsp, 20h pop rbx pop r14 pop rbp retn loc_692EB: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aTensorNb0Sizeo_0; "tensor->nb[0] == sizeof(ggml_fp16_t)" mov ecx, 0B74h jmp loc_69430 loc_69323: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aTensorNb0Sizeo; "tensor->nb[0] == sizeof(float)" mov ecx, 0B79h jmp loc_69430 loc_6935B: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aTensorNb0Sizeo_1; "tensor->nb[0] == sizeof(int8_t)" mov ecx, 0B65h jmp loc_69430 loc_69393: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aTensorNb0Sizeo_2; "tensor->nb[0] == sizeof(int32_t)" mov ecx, 0B6Fh jmp short loc_69430 loc_693C8: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aTensorNb0Sizeo_3; "tensor->nb[0] == sizeof(int16_t)" mov ecx, 0B6Ah jmp short loc_69430 loc_693FD: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aFalse; "false" mov ecx, 0B7Eh loc_69430: xor eax, eax call _fprintf call ggml_print_backtrace call _abort
__int128 __usercall ggml_get_f32_1d@<xmm0>(_QWORD *a1@<rdi>, int a2@<esi>, __m128 _XMM0@<xmm0>) { int v4; // eax __int128 result; // xmm0 long long v11; // rdi long long v12; // [rsp+0h] [rbp-38h] BYREF long long v13; // [rsp+8h] [rbp-30h] BYREF long long v14; // [rsp+10h] [rbp-28h] BYREF long long v15[4]; // [rsp+18h] [rbp-20h] BYREF if ( !(unsigned __int8)ggml_is_contiguous(a1) ) { __asm { vxorps xmm0, xmm0, xmm0 } _RCX = &v13; __asm { vmovups ymmword ptr [rcx-8], ymm0 vzeroupper } ggml_unravel_index(a1, a2, &v12, &v13, &v14, v15); ggml_get_f32_nd(a1, (unsigned int)v12, (unsigned int)v13, (unsigned int)v14, LODWORD(v15[0]), *(double *)&result); return result; } v4 = *(_DWORD *)a1; if ( !*(_DWORD *)a1 ) { if ( a1[6] == 4LL ) { _RAX = a1[35]; _RCX = a2; __asm { vmovss xmm0, dword ptr [rax+rcx*4] } return result; } fflush(stdout); v11 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 2937LL, "tensor->nb[0] == sizeof(float)"); goto LABEL_24; } if ( v4 == 1 ) { if ( a1[6] == 2LL ) { _RAX = *(unsigned __int16 *)(a1[35] + 2LL * a2); _RCX = &ggml_table_f32_f16; __asm { vmovss xmm0, dword ptr [rcx+rax*4] } return result; } fflush(stdout); v11 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 2932LL, "tensor->nb[0] == sizeof(ggml_fp16_t)"); goto LABEL_24; } if ( v4 == 18 ) { if ( a1[6] == 4LL ) { __asm { vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] } return result; } fflush(stdout); v11 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 2927LL, "tensor->nb[0] == sizeof(int32_t)"); goto LABEL_24; } if ( v4 != 17 ) { if ( v4 == 16 ) { if ( a1[6] == 1LL ) goto LABEL_17; fflush(stdout); v11 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 2917LL, "tensor->nb[0] == sizeof(int8_t)"); } else { fflush(stdout); v11 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 2942LL, "false"); } LABEL_24: ggml_print_backtrace(); abort(v11); } if ( a1[6] != 2LL ) { fflush(stdout); v11 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 2922LL, "tensor->nb[0] == sizeof(int16_t)"); goto LABEL_24; } LABEL_17: __asm { vcvtsi2ss xmm0, xmm0, eax } return result; }
ggml_get_f32_1d: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV EBP,ESI MOV RBX,RDI CALL 0x00167db9 TEST AL,AL JZ 0x00169225 MOV EAX,dword ptr [RBX] TEST EAX,EAX JZ 0x0016928d CMP EAX,0x1 JZ 0x0016926a CMP EAX,0x12 JZ 0x001692a9 CMP EAX,0x11 JZ 0x001692c5 CMP EAX,0x10 JNZ 0x001693fd CMP qword ptr [RBX + 0x30],0x1 JNZ 0x0016935b MOV RAX,qword ptr [RBX + 0x118] MOVSXD RCX,EBP MOVSX EAX,byte ptr [RAX + RCX*0x1] JMP 0x001692de LAB_00169225: VXORPS XMM0,XMM0,XMM0 LEA RCX,[RSP + 0x8] VMOVUPS ymmword ptr [RCX + -0x8],YMM0 MOVSXD RSI,EBP LEA R8,[RSP + 0x10] LEA R9,[RSP + 0x18] MOV R14,RSP MOV RDI,RBX MOV RDX,R14 VZEROUPPER CALL 0x00168b0d MOV ESI,dword ptr [R14] MOV EDX,dword ptr [R14 + 0x8] MOV ECX,dword ptr [R14 + 0x10] MOV R8D,dword ptr [R14 + 0x18] MOV RDI,RBX CALL 0x00169441 JMP 0x001692e2 LAB_0016926a: CMP qword ptr [RBX + 0x30],0x2 JNZ 0x001692eb MOV RAX,qword ptr [RBX + 0x118] MOVSXD RCX,EBP MOVZX EAX,word ptr [RAX + RCX*0x2] LEA RCX,[0x25d290] VMOVSS XMM0,dword ptr [RCX + RAX*0x4] JMP 0x001692e2 LAB_0016928d: CMP qword ptr [RBX + 0x30],0x4 JNZ 0x00169323 MOV RAX,qword ptr [RBX + 0x118] MOVSXD RCX,EBP VMOVSS XMM0,dword ptr [RAX + RCX*0x4] JMP 0x001692e2 LAB_001692a9: CMP qword ptr [RBX + 0x30],0x4 JNZ 0x00169393 MOV RAX,qword ptr [RBX + 0x118] MOVSXD RCX,EBP VCVTSI2SS XMM0,XMM0,dword ptr [RAX + RCX*0x4] JMP 0x001692e2 LAB_001692c5: CMP qword ptr [RBX + 0x30],0x2 JNZ 0x001693c8 MOV RAX,qword ptr [RBX + 0x118] MOVSXD RCX,EBP MOVSX EAX,word ptr [RAX + RCX*0x2] LAB_001692de: VCVTSI2SS XMM0,XMM0,EAX LAB_001692e2: ADD RSP,0x20 POP RBX POP R14 POP RBP RET LAB_001692eb: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a1b06] MOV ECX,0xb74 JMP 0x00169430 LAB_00169323: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x19aa2c] MOV ECX,0xb79 JMP 0x00169430 LAB_0016935b: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a1aa4] MOV ECX,0xb65 JMP 0x00169430 LAB_00169393: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a1ae5] MOV ECX,0xb6f JMP 0x00169430 LAB_001693c8: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a1ac4] MOV ECX,0xb6a JMP 0x00169430 LAB_001693fd: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x19803f] MOV ECX,0xb7e LAB_00169430: XOR EAX,EAX CALL 0x0010a8b0 CALL 0x00167550 CALL 0x0010a300
ulong ggml_get_f32_1d(int *param_1,int param_2) { char cVar1; int iVar2; int8 uVar3; FILE *__stream; char *pcVar4; int8 extraout_XMM0_Qa; ulong uVar5; int1 auVar6 [16]; int1 auVar7 [16]; int1 extraout_var [56]; ulong local_38; ulong uStack_30; ulong uStack_28; ulong uStack_20; int1 auVar8 [64]; cVar1 = ggml_is_contiguous(); auVar8._8_56_ = extraout_var; auVar8._0_8_ = extraout_XMM0_Qa; if (cVar1 == '\0') { local_38 = 0; uStack_30 = 0; uStack_28 = 0; uStack_20 = 0; ggml_unravel_index(param_1,(long)param_2,&local_38,&uStack_30,&uStack_28,&uStack_20); uVar5 = ggml_get_f32_nd(param_1,local_38 & 0xffffffff,uStack_30 & 0xffffffff, uStack_28 & 0xffffffff,uStack_20 & 0xffffffff); } else { iVar2 = *param_1; if (iVar2 == 0) { if (*(long *)(param_1 + 0xc) != 4) { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar4 = "tensor->nb[0] == sizeof(float)"; uVar3 = 0xb79; goto LAB_00169430; } uVar5 = (ulong)*(uint *)(*(long *)(param_1 + 0x46) + (long)param_2 * 4); } else if (iVar2 == 1) { if (*(long *)(param_1 + 0xc) != 2) { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar4 = "tensor->nb[0] == sizeof(ggml_fp16_t)"; uVar3 = 0xb74; goto LAB_00169430; } uVar5 = (ulong)(uint)(&ggml_table_f32_f16) [*(ushort *)(*(long *)(param_1 + 0x46) + (long)param_2 * 2)]; } else { auVar6._4_12_ = auVar8._4_12_; if (iVar2 == 0x12) { if (*(long *)(param_1 + 0xc) != 4) { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar4 = "tensor->nb[0] == sizeof(int32_t)"; uVar3 = 0xb6f; goto LAB_00169430; } auVar6._0_4_ = (float)*(int *)(*(long *)(param_1 + 0x46) + (long)param_2 * 4); uVar5 = auVar6._0_8_; } else { if (iVar2 == 0x11) { if (*(long *)(param_1 + 0xc) != 2) { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar4 = "tensor->nb[0] == sizeof(int16_t)"; uVar3 = 0xb6a; goto LAB_00169430; } iVar2 = (int)*(short *)(*(long *)(param_1 + 0x46) + (long)param_2 * 2); } else { if (iVar2 != 0x10) { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar4 = "false"; uVar3 = 0xb7e; LAB_00169430: fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c" ,uVar3,pcVar4); ggml_print_backtrace(); /* WARNING: Subroutine does not return */ abort(); } if (*(long *)(param_1 + 0xc) != 1) { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar4 = "tensor->nb[0] == sizeof(int8_t)"; uVar3 = 0xb65; goto LAB_00169430; } iVar2 = (int)*(char *)(*(long *)(param_1 + 0x46) + (long)param_2); } auVar7._0_4_ = (float)iVar2; auVar7._4_12_ = auVar6._4_12_; uVar5 = auVar7._0_8_; } } } return uVar5; }
39,210
ggml_get_f32_1d
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
float ggml_get_f32_1d(const struct ggml_tensor * tensor, int i) { if (!ggml_is_contiguous(tensor)) { int64_t id[4] = { 0, 0, 0, 0 }; ggml_unravel_index(tensor, i, &id[0], &id[1], &id[2], &id[3]); return ggml_get_f32_nd(tensor, id[0], id[1], id[2], id[3]); } switch (tensor->type) { case GGML_TYPE_I8: { GGML_ASSERT(tensor->nb[0] == sizeof(int8_t)); return ((int8_t *)(tensor->data))[i]; } case GGML_TYPE_I16: { GGML_ASSERT(tensor->nb[0] == sizeof(int16_t)); return ((int16_t *)(tensor->data))[i]; } case GGML_TYPE_I32: { GGML_ASSERT(tensor->nb[0] == sizeof(int32_t)); return ((int32_t *)(tensor->data))[i]; } case GGML_TYPE_F16: { GGML_ASSERT(tensor->nb[0] == sizeof(ggml_fp16_t)); return GGML_FP16_TO_FP32(((ggml_fp16_t *)(tensor->data))[i]); } case GGML_TYPE_F32: { GGML_ASSERT(tensor->nb[0] == sizeof(float)); return ((float *)(tensor->data))[i]; } default: { GGML_ASSERT(false); } } return 0.0f; }
O3
c
ggml_get_f32_1d: pushq %rbp pushq %rbx pushq %rax movl %esi, %ebp movq %rdi, %rbx callq 0x8d0a3 testb %al, %al je 0x8f477 movl (%rbx), %eax cmpl $0xf, %eax jle 0x8f4bb cmpl $0x12, %eax je 0x8f4eb cmpl $0x11, %eax je 0x8f503 cmpl $0x10, %eax jne 0x8f53b cmpq $0x1, 0x30(%rbx) jne 0x8f545 movq 0x118(%rbx), %rax movslq %ebp, %rcx movsbl (%rax,%rcx), %eax jmp 0x8f518 movslq %ebp, %rax movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rcx imulq %rsi, %rcx movq 0x20(%rbx), %rdi imulq %rcx, %rdi cqto idivq %rdi movq %rax, %r8 movq %rdx, %rax cqto idivq %rcx movq %rax, %rcx movq %rdx, %rax cqto idivq %rsi movq %rbx, %rdi movl %edx, %esi movl %eax, %edx addq $0x8, %rsp popq %rbx popq %rbp jmp 0x8f559 testl %eax, %eax je 0x8f51e cmpl $0x1, %eax jne 0x8f53b cmpq $0x2, 0x30(%rbx) jne 0x8f554 movq 0x118(%rbx), %rax movslq %ebp, %rcx movzwl (%rax,%rcx,2), %eax leaq 0xecd9c(%rip), %rcx # 0x17c280 vmovss (%rcx,%rax,4), %xmm0 jmp 0x8f534 cmpq $0x4, 0x30(%rbx) jne 0x8f540 movq 0x118(%rbx), %rax movslq %ebp, %rcx vcvtsi2ssl (%rax,%rcx,4), %xmm0, %xmm0 jmp 0x8f534 cmpq $0x2, 0x30(%rbx) jne 0x8f54a movq 0x118(%rbx), %rax movslq %ebp, %rcx movswl (%rax,%rcx,2), %eax vcvtsi2ss %eax, %xmm0, %xmm0 jmp 0x8f534 cmpq $0x4, 0x30(%rbx) jne 0x8f54f movq 0x118(%rbx), %rax movslq %ebp, %rcx vmovss (%rax,%rcx,4), %xmm0 addq $0x8, %rsp popq %rbx popq %rbp retq callq 0xc847 callq 0xc778 callq 0xc802 callq 0xc7bd callq 0xc6ee callq 0xc733
ggml_get_f32_1d: push rbp push rbx push rax mov ebp, esi mov rbx, rdi call ggml_is_contiguous test al, al jz short loc_8F477 mov eax, [rbx] cmp eax, 0Fh jle short loc_8F4BB cmp eax, 12h jz loc_8F4EB cmp eax, 11h jz loc_8F503 cmp eax, 10h jnz loc_8F53B cmp qword ptr [rbx+30h], 1 jnz loc_8F545 mov rax, [rbx+118h] movsxd rcx, ebp movsx eax, byte ptr [rax+rcx] jmp loc_8F518 loc_8F477: movsxd rax, ebp mov rsi, [rbx+10h] mov rcx, [rbx+18h] imul rcx, rsi mov rdi, [rbx+20h] imul rdi, rcx cqo idiv rdi mov r8, rax mov rax, rdx cqo idiv rcx mov rcx, rax mov rax, rdx cqo idiv rsi mov rdi, rbx mov esi, edx mov edx, eax add rsp, 8 pop rbx pop rbp jmp ggml_get_f32_nd loc_8F4BB: test eax, eax jz short loc_8F51E cmp eax, 1 jnz short loc_8F53B cmp qword ptr [rbx+30h], 2 jnz loc_8F554 mov rax, [rbx+118h] movsxd rcx, ebp movzx eax, word ptr [rax+rcx*2] lea rcx, ggml_table_f32_f16 vmovss xmm0, dword ptr [rcx+rax*4] jmp short loc_8F534 loc_8F4EB: cmp qword ptr [rbx+30h], 4 jnz short loc_8F540 mov rax, [rbx+118h] movsxd rcx, ebp vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] jmp short loc_8F534 loc_8F503: cmp qword ptr [rbx+30h], 2 jnz short loc_8F54A mov rax, [rbx+118h] movsxd rcx, ebp movsx eax, word ptr [rax+rcx*2] loc_8F518: vcvtsi2ss xmm0, xmm0, eax jmp short loc_8F534 loc_8F51E: cmp qword ptr [rbx+30h], 4 jnz short loc_8F54F mov rax, [rbx+118h] movsxd rcx, ebp vmovss xmm0, dword ptr [rax+rcx*4] loc_8F534: add rsp, 8 pop rbx pop rbp retn loc_8F53B: call ggml_get_f32_1d_cold_6 loc_8F540: call ggml_get_f32_1d_cold_3 loc_8F545: call ggml_get_f32_1d_cold_5 loc_8F54A: call ggml_get_f32_1d_cold_4 loc_8F54F: call ggml_get_f32_1d_cold_1 loc_8F554: call ggml_get_f32_1d_cold_2
__m128 ggml_get_f32_1d(_QWORD *a1, int a2, __m128 result) { int v4; // eax long long v5; // rsi long long v6; // rcx if ( !(unsigned __int8)ggml_is_contiguous(a1) ) { v5 = a1[2]; v6 = v5 * a1[3]; ggml_get_f32_nd( a1, (unsigned int)(a2 % (v6 * a1[4]) % v6 % v5), (unsigned int)(a2 % (v6 * a1[4]) % v6 / v5), a2 % (v6 * a1[4]) / v6, a2 / (v6 * a1[4])); return result; } v4 = *(_DWORD *)a1; if ( *(int *)a1 <= 15 ) { if ( v4 ) { if ( v4 != 1 ) goto LABEL_19; if ( a1[6] != 2LL ) ggml_get_f32_1d_cold_2(a1); _RAX = *(unsigned __int16 *)(a1[35] + 2LL * a2); _RCX = &ggml_table_f32_f16; __asm { vmovss xmm0, dword ptr [rcx+rax*4] } } else { if ( a1[6] != 4LL ) ggml_get_f32_1d_cold_1(a1); _RAX = a1[35]; _RCX = a2; __asm { vmovss xmm0, dword ptr [rax+rcx*4] } } } else { if ( v4 != 18 ) { if ( v4 == 17 ) { if ( a1[6] != 2LL ) ggml_get_f32_1d_cold_4(a1); goto LABEL_16; } if ( v4 == 16 ) { if ( a1[6] != 1LL ) ggml_get_f32_1d_cold_5(a1); LABEL_16: __asm { vcvtsi2ss xmm0, xmm0, eax } return result; } LABEL_19: ggml_get_f32_1d_cold_6(a1); } if ( a1[6] != 4LL ) ggml_get_f32_1d_cold_3(a1); __asm { vcvtsi2ss xmm0, xmm0, dword ptr [rax+rcx*4] } } return result; }
39,211
mi_get_key
eloqsql/storage/myisam/mi_search.c
uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length) { uint nod_flag; DBUG_ENTER("_mi_get_key"); nod_flag=mi_test_if_nod(page); if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { bmove((uchar*) key,(uchar*) keypos,keyinfo->keylength+nod_flag); DBUG_RETURN(keypos+keyinfo->keylength+nod_flag); } else { page+=2+nod_flag; key[0]=0; /* safety */ while (page <= keypos) { *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key); if (*return_key_length == 0) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } } } DBUG_PRINT("exit",("page: %p length: %u", page, *return_key_length)); DBUG_RETURN(page); }
O0
c
mi_get_key: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x20(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc18b3 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x40(%rbp) jmp 0xc18ba xorl %eax, %eax movl %eax, -0x40(%rbp) jmp 0xc18ba movl -0x40(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x18(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0xc190d movq -0x28(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rax movzwl 0x12(%rax), %eax addl -0x3c(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x2a130 movq -0x30(%rbp), %rax movq -0x18(%rbp), %rcx movzwl 0x12(%rcx), %ecx movslq %ecx, %rcx addq %rcx, %rax movl -0x3c(%rbp), %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xc199a movl -0x3c(%rbp), %ecx addl $0x2, %ecx movq -0x20(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax cmpq -0x30(%rbp), %rax ja 0xc198a movq -0x18(%rbp), %rax movq 0x48(%rax), %rax movq -0x18(%rbp), %rdi movl -0x3c(%rbp), %esi movq -0x28(%rbp), %rcx leaq -0x20(%rbp), %rdx callq *%rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq -0x38(%rbp), %rax cmpl $0x0, (%rax) jne 0xc1988 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0xae540 callq 0xf6090 movl $0x7e, (%rax) movq $0x0, -0x8(%rbp) jmp 0xc199a jmp 0xc1927 jmp 0xc198c jmp 0xc198e jmp 0xc1990 jmp 0xc1992 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_get_key: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_20] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C18B3 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_40], eax jmp short loc_C18BA loc_C18B3: xor eax, eax mov [rbp+var_40], eax jmp short $+2 loc_C18BA: mov eax, [rbp+var_40] mov [rbp+var_3C], eax mov rax, [rbp+var_18] movzx eax, word ptr [rax+0Ah] and eax, 28h cmp eax, 0 jnz short loc_C190D mov rdi, [rbp+var_28] mov rsi, [rbp+var_30] mov rax, [rbp+var_18] movzx eax, word ptr [rax+12h] add eax, [rbp+var_3C] mov eax, eax mov edx, eax call _memmove mov rax, [rbp+var_30] mov rcx, [rbp+var_18] movzx ecx, word ptr [rcx+12h] movsxd rcx, ecx add rax, rcx mov ecx, [rbp+var_3C] add rax, rcx mov [rbp+var_8], rax jmp loc_C199A loc_C190D: mov ecx, [rbp+var_3C] add ecx, 2 mov rax, [rbp+var_20] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_28] mov byte ptr [rax], 0 loc_C1927: mov rax, [rbp+var_20] cmp rax, [rbp+var_30] ja short loc_C198A mov rax, [rbp+var_18] mov rax, [rax+48h] mov rdi, [rbp+var_18] mov esi, [rbp+var_3C] mov rcx, [rbp+var_28] lea rdx, [rbp+var_20] call rax mov ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov rax, [rbp+var_38] cmp dword ptr [rax], 0 jnz short loc_C1988 mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_8], 0 jmp short loc_C199A loc_C1988: jmp short loc_C1927 loc_C198A: jmp short $+2 loc_C198C: jmp short $+2 loc_C198E: jmp short $+2 loc_C1990: jmp short $+2 loc_C1992: mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_C199A: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
_BYTE * mi_get_key(long long a1, long long a2, _BYTE *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6) { const char *v6; // rsi unsigned int v8; // [rsp+0h] [rbp-40h] _BYTE *v12; // [rsp+20h] [rbp-20h] BYREF long long v13; // [rsp+28h] [rbp-18h] long long v14; // [rsp+30h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; if ( (*a3 & 0x80) != 0 ) v8 = *(_DWORD *)(*(_QWORD *)v14 + 380LL); else v8 = 0; if ( (*(_WORD *)(v13 + 10) & 0x28) != 0 ) { v12 += v8 + 2; *a4 = 0; while ( (unsigned long long)v12 <= a5 ) { *a6 = (*(long long ( **)(long long, _QWORD, _BYTE **, _BYTE *))(v13 + 72))(v13, v8, &v12, a4); if ( !*a6 ) { v6 = *(const char **)(*(_QWORD *)v14 + 616LL); mi_report_error(126, (long long)v6); *(_DWORD *)my_thread_var(126LL, v6) = 126; return 0LL; } } return v12; } else { memmove(a4, a5, v8 + *(unsigned __int16 *)(v13 + 18)); return (_BYTE *)(v8 + *(unsigned __int16 *)(v13 + 18) + a5); } }
_mi_get_key: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c18b3 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x40],EAX JMP 0x001c18ba LAB_001c18b3: XOR EAX,EAX MOV dword ptr [RBP + -0x40],EAX JMP 0x001c18ba LAB_001c18ba: MOV EAX,dword ptr [RBP + -0x40] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x28 CMP EAX,0x0 JNZ 0x001c190d MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX + 0x12] ADD EAX,dword ptr [RBP + -0x3c] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a130 MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RCX + 0x12] MOVSXD RCX,ECX ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x3c] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001c199a LAB_001c190d: MOV ECX,dword ptr [RBP + -0x3c] ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 LAB_001c1927: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x30] JA 0x001c198a MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x48] MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x3c] MOV RCX,qword ptr [RBP + -0x28] LEA RDX,[RBP + -0x20] CALL RAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x38] CMP dword ptr [RAX],0x0 JNZ 0x001c1988 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x001ae540 CALL 0x001f6090 MOV dword ptr [RAX],0x7e MOV qword ptr [RBP + -0x8],0x0 JMP 0x001c199a LAB_001c1988: JMP 0x001c1927 LAB_001c198a: JMP 0x001c198c LAB_001c198c: JMP 0x001c198e LAB_001c198e: JMP 0x001c1990 LAB_001c1990: JMP 0x001c1992 LAB_001c1992: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_001c199a: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
byte * _mi_get_key(long *param_1,long param_2,byte *param_3,int1 *param_4,byte *param_5, int *param_6) { int iVar1; int4 *puVar2; uint local_48; byte *local_28; long local_20; long *local_18; byte *local_10; if ((*param_3 & 0x80) == 0) { local_48 = 0; } else { local_48 = *(uint *)(*param_1 + 0x17c); } local_20 = param_2; local_18 = param_1; if ((*(ushort *)(param_2 + 10) & 0x28) == 0) { local_28 = param_3; memmove(param_4,param_5,(ulong)(*(ushort *)(param_2 + 0x12) + local_48)); local_10 = param_5 + (ulong)local_48 + (long)(int)(uint)*(ushort *)(local_20 + 0x12); } else { local_28 = param_3 + (local_48 + 2); *param_4 = 0; do { if (param_5 < local_28) { return local_28; } iVar1 = (**(code **)(local_20 + 0x48))(local_20,local_48,&local_28,param_4); *param_6 = iVar1; } while (*param_6 != 0); mi_report_error(0x7e,*(int8 *)(*local_18 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; local_10 = (byte *)0x0; } return local_10; }
39,212
std::enable_if<has_member_tm_gmtoff<tm>::value, std::tuple<tm, long, std::chrono::duration<long, std::ratio<3600l, 1l>>>>::type nglog::(anonymous namespace)::Breakdown<tm>(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&)
ng-log[P]ng-log/src/logging.cc
auto Breakdown(const std::chrono::system_clock::time_point& now) -> std::enable_if_t<has_member_tm_gmtoff<T>::value, std::tuple<std::tm, std::time_t, std::chrono::hours>> { std::time_t timestamp = std::chrono::system_clock::to_time_t(now); T tm; if (FLAGS_log_utc_time) { gmtime_r(&timestamp, &tm); } else { localtime_r(&timestamp, &tm); } const auto gmtoffset = std::chrono::duration_cast<std::chrono::hours>( std::chrono::seconds{tm.tm_gmtoff}); return std::make_tuple(tm, timestamp, gmtoffset); }
O0
cpp
std::enable_if<has_member_tm_gmtoff<tm>::value, std::tuple<tm, long, std::chrono::duration<long, std::ratio<3600l, 1l>>>>::type nglog::(anonymous namespace)::Breakdown<tm>(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l>>> const&): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x70(%rbp) movq %rdi, %rax movq %rax, -0x68(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rdi callq 0x19160 movq %rax, -0x18(%rbp) leaq 0x5d9aa(%rip), %rax # 0x70ca9 testb $0x1, (%rax) je 0x13313 leaq -0x18(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x9e30 jmp 0x13320 leaq -0x18(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x9380 leaq -0x50(%rbp), %rsi addq $0x28, %rsi leaq -0x60(%rbp), %rdi callq 0x19630 leaq -0x60(%rbp), %rdi callq 0x46e30 movq -0x70(%rbp), %rdi movq %rax, -0x58(%rbp) leaq -0x50(%rbp), %rsi leaq -0x18(%rbp), %rdx leaq -0x58(%rbp), %rcx callq 0x46e60 movq -0x68(%rbp), %rax addq $0x70, %rsp popq %rbp retq nopl (%rax)
_ZN5nglog12_GLOBAL__N_19BreakdownI2tmEENSt9enable_ifIXsr20has_member_tm_gmtoffIT_EE5valueESt5tupleIJS2_lNSt6chrono8durationIlSt5ratioILl3600ELl1EEEEEEE4typeERKNS6_10time_pointINS6_3_V212system_clockENS7_IlS8_ILl1ELl1000000000EEEEEE: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_70], rdi mov rax, rdi mov [rbp+var_68], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_10] call _ZNSt6chrono3_V212system_clock9to_time_tERKNS_10time_pointIS1_NS_8durationIlSt5ratioILl1ELl1000000000EEEEEE; std::chrono::_V2::system_clock::to_time_t(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&) mov [rbp+var_18], rax lea rax, _ZN3fLB18FLAGS_log_utc_timeE; fLB::FLAGS_log_utc_time test byte ptr [rax], 1 jz short loc_13313 lea rdi, [rbp+var_18] lea rsi, [rbp+var_50] call _gmtime_r jmp short loc_13320 loc_13313: lea rdi, [rbp+var_18] lea rsi, [rbp+var_50] call _localtime_r loc_13320: lea rsi, [rbp+var_50] add rsi, 28h ; '(' lea rdi, [rbp+var_60] call _ZNSt6chrono8durationIlSt5ratioILl1ELl1EEEC2IlvEERKT_; std::chrono::duration<long,std::ratio<1l,1l>>::duration<long,void>(long const&) lea rdi, [rbp+var_60] call _ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl3600ELl1EEEElS2_ILl1ELl1EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE mov rdi, [rbp+var_70] mov [rbp+var_58], rax lea rsi, [rbp+var_50] lea rdx, [rbp+var_18] lea rcx, [rbp+var_58] call _ZSt10make_tupleIJR2tmRlRKNSt6chrono8durationIlSt5ratioILl3600ELl1EEEEEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOSD_; std::make_tuple<tm &,long &,std::chrono::duration<long,std::ratio<3600l,1l>> const&>(tm &,long &,std::chrono::duration<long,std::ratio<3600l,1l>> const&&&) mov rax, [rbp+var_68] add rsp, 70h pop rbp retn
long long nglog::`anonymous namespace'::Breakdown<tm>(long long a1, long long a2) { _BYTE v3[8]; // [rsp+10h] [rbp-60h] BYREF long long v4; // [rsp+18h] [rbp-58h] BYREF _BYTE v5[40]; // [rsp+20h] [rbp-50h] BYREF long long v6; // [rsp+48h] [rbp-28h] BYREF _QWORD v7[3]; // [rsp+58h] [rbp-18h] BYREF v7[2] = a1; v7[1] = a2; v7[0] = std::chrono::_V2::system_clock::to_time_t(a2); if ( (fLB::FLAGS_log_utc_time & 1) != 0 ) gmtime_r(v7, v5); else localtime_r(v7, v5); std::chrono::duration<long,std::ratio<1l,1l>>::duration<long,void>(v3, &v6); v4 = std::chrono::duration_cast<std::chrono::duration<long,std::ratio<3600l,1l>>,long,std::ratio<1l,1l>>(v3); std::make_tuple<tm &,long &,std::chrono::duration<long,std::ratio<3600l,1l>> const&>(a1, v5, v7, &v4); return a1; }
Breakdown<tm>: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x70],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x68],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x10] CALL 0x00119160 MOV qword ptr [RBP + -0x18],RAX LEA RAX,[0x170ca9] TEST byte ptr [RAX],0x1 JZ 0x00113313 LEA RDI,[RBP + -0x18] LEA RSI,[RBP + -0x50] CALL 0x00109e30 JMP 0x00113320 LAB_00113313: LEA RDI,[RBP + -0x18] LEA RSI,[RBP + -0x50] CALL 0x00109380 LAB_00113320: LEA RSI,[RBP + -0x50] ADD RSI,0x28 LEA RDI,[RBP + -0x60] CALL 0x00119630 LEA RDI,[RBP + -0x60] CALL 0x00146e30 MOV RDI,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x58],RAX LEA RSI,[RBP + -0x50] LEA RDX,[RBP + -0x18] LEA RCX,[RBP + -0x58] CALL 0x00146e60 MOV RAX,qword ptr [RBP + -0x68] ADD RSP,0x70 POP RBP RET
/* std::enable_if<has_member_tm_gmtoff<tm>::value, std::tuple<tm, long, std::chrono::duration<long, std::ratio<3600l, 1l> > > >::type nglog::(anonymous namespace)::Breakdown<tm>(std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&) */ _anonymous_namespace_ * __thiscall nglog::(anonymous_namespace)::Breakdown<tm>(_anonymous_namespace_ *this,time_point *param_1) { duration<long,std::ratio<1l,1l>> local_68 [8]; int8 local_60; tm local_58; time_t local_20; time_point *local_18; _anonymous_namespace_ *local_10; local_18 = param_1; local_10 = this; local_20 = std::chrono::_V2::system_clock::to_time_t(param_1); if ((fLB::FLAGS_log_utc_time & 1) == 0) { localtime_r(&local_20,&local_58); } else { gmtime_r(&local_20,&local_58); } std::chrono::duration<long,std::ratio<1l,1l>>::duration<long,void>(local_68,&local_58.tm_gmtoff); local_60 = std::chrono:: duration_cast<std::chrono::duration<long,std::ratio<3600l,1l>>,long,std::ratio<1l,1l>> ((duration *)local_68); std::make_tuple<tm&,long&,std::chrono::duration<long,std::ratio<3600l,1l>>const&> ((tm *)this,(long *)&local_58,(duration *)&local_20); return this; }
39,213
IsFileNameValid
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
bool IsFileNameValid(const char *fileName) { bool valid = true; if ((fileName != NULL) && (fileName[0] != '\0')) { int length = (int)strlen(fileName); bool allPeriods = true; for (int i = 0; i < length; i++) { // Check invalid characters if ((fileName[i] == '<') || (fileName[i] == '>') || (fileName[i] == ':') || (fileName[i] == '\"') || (fileName[i] == '/') || (fileName[i] == '\\') || (fileName[i] == '|') || (fileName[i] == '?') || (fileName[i] == '*')) { valid = false; break; } // Check non-glyph characters if ((unsigned char)fileName[i] < 32) { valid = false; break; } // TODO: Check trailing periods/spaces? // Check if filename is not all periods if (fileName[i] != '.') allPeriods = false; } if (allPeriods) valid = false; /* if (valid) { // Check invalid DOS names if (length >= 3) { if (((fileName[0] == 'C') && (fileName[1] == 'O') && (fileName[2] == 'N')) || // CON ((fileName[0] == 'P') && (fileName[1] == 'R') && (fileName[2] == 'N')) || // PRN ((fileName[0] == 'A') && (fileName[1] == 'U') && (fileName[2] == 'X')) || // AUX ((fileName[0] == 'N') && (fileName[1] == 'U') && (fileName[2] == 'L'))) valid = false; // NUL } if (length >= 4) { if (((fileName[0] == 'C') && (fileName[1] == 'O') && (fileName[2] == 'M') && ((fileName[3] >= '0') && (fileName[3] <= '9'))) || // COM0-9 ((fileName[0] == 'L') && (fileName[1] == 'P') && (fileName[2] == 'T') && ((fileName[3] >= '0') && (fileName[3] <= '9')))) valid = false; // LPT0-9 } } */ } return valid; }
O0
c
IsFileNameValid: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movb $0x1, -0x9(%rbp) cmpq $0x0, -0x8(%rbp) je 0xd20d9 movq -0x8(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0xd20d9 movq -0x8(%rbp), %rdi callq 0xa230 movl %eax, -0x10(%rbp) movb $0x1, -0x11(%rbp) movl $0x0, -0x18(%rbp) movl -0x18(%rbp), %eax cmpl -0x10(%rbp), %eax jge 0xd20cd movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x3c, %eax je 0xd208b movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x3e, %eax je 0xd208b movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x3a, %eax je 0xd208b movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x22, %eax je 0xd208b movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2f, %eax je 0xd208b movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x5c, %eax je 0xd208b movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x7c, %eax je 0xd208b movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x3f, %eax je 0xd208b movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2a, %eax jne 0xd2091 movb $0x0, -0x9(%rbp) jmp 0xd20cd movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x20, %eax jge 0xd20a8 movb $0x0, -0x9(%rbp) jmp 0xd20cd movq -0x8(%rbp), %rax movslq -0x18(%rbp), %rcx movsbl (%rax,%rcx), %eax cmpl $0x2e, %eax je 0xd20bd movb $0x0, -0x11(%rbp) jmp 0xd20bf movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0xd1fe2 testb $0x1, -0x11(%rbp) je 0xd20d7 movb $0x0, -0x9(%rbp) jmp 0xd20d9 movb -0x9(%rbp), %al andb $0x1, %al addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
IsFileNameValid: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_9], 1 cmp [rbp+var_8], 0 jz loc_D20D9 mov rax, [rbp+var_8] movsx eax, byte ptr [rax] cmp eax, 0 jz loc_D20D9 mov rdi, [rbp+var_8] call _strlen mov [rbp+var_10], eax mov [rbp+var_11], 1 mov [rbp+var_18], 0 loc_D1FE2: mov eax, [rbp+var_18] cmp eax, [rbp+var_10] jge loc_D20CD mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 3Ch ; '<' jz loc_D208B mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 3Eh ; '>' jz short loc_D208B mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 3Ah ; ':' jz short loc_D208B mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 22h ; '"' jz short loc_D208B mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 2Fh ; '/' jz short loc_D208B mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 5Ch ; '\' jz short loc_D208B mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 7Ch ; '|' jz short loc_D208B mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 3Fh ; '?' jz short loc_D208B mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 2Ah ; '*' jnz short loc_D2091 loc_D208B: mov [rbp+var_9], 0 jmp short loc_D20CD loc_D2091: mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movzx eax, byte ptr [rax+rcx] cmp eax, 20h ; ' ' jge short loc_D20A8 mov [rbp+var_9], 0 jmp short loc_D20CD loc_D20A8: mov rax, [rbp+var_8] movsxd rcx, [rbp+var_18] movsx eax, byte ptr [rax+rcx] cmp eax, 2Eh ; '.' jz short loc_D20BD mov [rbp+var_11], 0 loc_D20BD: jmp short $+2 loc_D20BF: mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp loc_D1FE2 loc_D20CD: test [rbp+var_11], 1 jz short loc_D20D7 mov [rbp+var_9], 0 loc_D20D7: jmp short $+2 loc_D20D9: mov al, [rbp+var_9] and al, 1 add rsp, 20h pop rbp retn
char IsFileNameValid(_BYTE *a1) { int i; // [rsp+8h] [rbp-18h] char v3; // [rsp+Fh] [rbp-11h] int v4; // [rsp+10h] [rbp-10h] char v5; // [rsp+17h] [rbp-9h] v5 = 1; if ( a1 && *a1 ) { v4 = strlen(a1); v3 = 1; for ( i = 0; i < v4; ++i ) { if ( a1[i] == 60 || a1[i] == 62 || a1[i] == 58 || a1[i] == 34 || a1[i] == 47 || a1[i] == 92 || a1[i] == 124 || a1[i] == 63 || a1[i] == 42 ) { v5 = 0; break; } if ( (unsigned __int8)a1[i] < 0x20u ) { v5 = 0; break; } if ( a1[i] != 46 ) v3 = 0; } if ( (v3 & 1) != 0 ) return 0; } return v5; }
IsFileNameValid: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],0x1 CMP qword ptr [RBP + -0x8],0x0 JZ 0x001d20d9 MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x001d20d9 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010a230 MOV dword ptr [RBP + -0x10],EAX MOV byte ptr [RBP + -0x11],0x1 MOV dword ptr [RBP + -0x18],0x0 LAB_001d1fe2: MOV EAX,dword ptr [RBP + -0x18] CMP EAX,dword ptr [RBP + -0x10] JGE 0x001d20cd MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x3c JZ 0x001d208b MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x3e JZ 0x001d208b MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x3a JZ 0x001d208b MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x22 JZ 0x001d208b MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2f JZ 0x001d208b MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x5c JZ 0x001d208b MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x7c JZ 0x001d208b MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x3f JZ 0x001d208b MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2a JNZ 0x001d2091 LAB_001d208b: MOV byte ptr [RBP + -0x9],0x0 JMP 0x001d20cd LAB_001d2091: MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x20 JGE 0x001d20a8 MOV byte ptr [RBP + -0x9],0x0 JMP 0x001d20cd LAB_001d20a8: MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x2e JZ 0x001d20bd MOV byte ptr [RBP + -0x11],0x0 LAB_001d20bd: JMP 0x001d20bf LAB_001d20bf: MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x001d1fe2 LAB_001d20cd: TEST byte ptr [RBP + -0x11],0x1 JZ 0x001d20d7 MOV byte ptr [RBP + -0x9],0x0 LAB_001d20d7: JMP 0x001d20d9 LAB_001d20d9: MOV AL,byte ptr [RBP + -0x9] AND AL,0x1 ADD RSP,0x20 POP RBP RET
int1 IsFileNameValid(char *param_1) { bool bVar1; size_t sVar2; int local_20; int1 local_11; local_11 = 1; if ((param_1 != (char *)0x0) && (*param_1 != '\0')) { sVar2 = strlen(param_1); bVar1 = true; for (local_20 = 0; local_20 < (int)sVar2; local_20 = local_20 + 1) { if ((((((param_1[local_20] == '<') || (param_1[local_20] == '>')) || (param_1[local_20] == ':')) || ((param_1[local_20] == '\"' || (param_1[local_20] == '/')))) || ((param_1[local_20] == '\\' || ((param_1[local_20] == '|' || (param_1[local_20] == '?')))) )) || (param_1[local_20] == '*')) { local_11 = 0; break; } if ((byte)param_1[local_20] < 0x20) { local_11 = 0; break; } if (param_1[local_20] != '.') { bVar1 = false; } } if (bVar1) { local_11 = 0; } } return local_11; }
39,214
IsFileNameValid
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
bool IsFileNameValid(const char *fileName) { bool valid = true; if ((fileName != NULL) && (fileName[0] != '\0')) { int length = (int)strlen(fileName); bool allPeriods = true; for (int i = 0; i < length; i++) { // Check invalid characters if ((fileName[i] == '<') || (fileName[i] == '>') || (fileName[i] == ':') || (fileName[i] == '\"') || (fileName[i] == '/') || (fileName[i] == '\\') || (fileName[i] == '|') || (fileName[i] == '?') || (fileName[i] == '*')) { valid = false; break; } // Check non-glyph characters if ((unsigned char)fileName[i] < 32) { valid = false; break; } // TODO: Check trailing periods/spaces? // Check if filename is not all periods if (fileName[i] != '.') allPeriods = false; } if (allPeriods) valid = false; /* if (valid) { // Check invalid DOS names if (length >= 3) { if (((fileName[0] == 'C') && (fileName[1] == 'O') && (fileName[2] == 'N')) || // CON ((fileName[0] == 'P') && (fileName[1] == 'R') && (fileName[2] == 'N')) || // PRN ((fileName[0] == 'A') && (fileName[1] == 'U') && (fileName[2] == 'X')) || // AUX ((fileName[0] == 'N') && (fileName[1] == 'U') && (fileName[2] == 'L'))) valid = false; // NUL } if (length >= 4) { if (((fileName[0] == 'C') && (fileName[1] == 'O') && (fileName[2] == 'M') && ((fileName[3] >= '0') && (fileName[3] <= '9'))) || // COM0-9 ((fileName[0] == 'L') && (fileName[1] == 'P') && (fileName[2] == 'T') && ((fileName[3] >= '0') && (fileName[3] <= '9')))) valid = false; // LPT0-9 } } */ } return valid; }
O1
c
IsFileNameValid: movb $0x1, %al testq %rdi, %rdi je 0x7aa53 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx cmpb $0x0, (%rdi) je 0x7aa4c movq %rbx, %rdi callq 0x9230 movq %rax, %rcx xorl %esi, %esi testl %ecx, %ecx setle %dl jle 0x7aa48 andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movq %rcx, %rdi negq %rdi movb $0x1, %al movl $0x1, %r8d movabsq $0x400000035002101, %r9 # imm = 0x400000035002101 movb -0x1(%rbx,%r8), %r10b movzbl %r10b, %r11d leal -0x22(%r11), %r14d cmpl $0x3a, %r14d ja 0x7aa18 btq %r14, %r9 jb 0x7aa44 cmpl $0x7c, %r11d je 0x7aa44 cmpb $0x20, %r10b jb 0x7aa44 cmpb $0x2e, %r10b movzbl %al, %eax cmovnel %esi, %eax cmpq %rcx, %r8 setae %dl leaq (%rdi,%r8), %r10 incq %r10 incq %r8 cmpq $0x1, %r10 jne 0x7a9ff xorb $0x1, %al jmp 0x7aa4a xorl %eax, %eax andb %dl, %al addq $0x8, %rsp popq %rbx popq %r14 andb $0x1, %al retq
IsFileNameValid: mov al, 1 test rdi, rdi jz loc_7AA53 push r14 push rbx push rax mov rbx, rdi cmp byte ptr [rdi], 0 jz short loc_7AA4C mov rdi, rbx call _strlen mov rcx, rax xor esi, esi test ecx, ecx setle dl jle short loc_7AA48 and ecx, 7FFFFFFFh mov rdi, rcx neg rdi mov al, 1 mov r8d, 1 mov r9, 400000035002101h loc_7A9FF: mov r10b, [rbx+r8-1] movzx r11d, r10b lea r14d, [r11-22h] cmp r14d, 3Ah ; ':' ja short loc_7AA18 bt r9, r14 jb short loc_7AA44 loc_7AA18: cmp r11d, 7Ch ; '|' jz short loc_7AA44 cmp r10b, 20h ; ' ' jb short loc_7AA44 cmp r10b, 2Eh ; '.' movzx eax, al cmovnz eax, esi cmp r8, rcx setnb dl lea r10, [rdi+r8] inc r10 inc r8 cmp r10, 1 jnz short loc_7A9FF loc_7AA44: xor al, 1 jmp short loc_7AA4A loc_7AA48: xor eax, eax loc_7AA4A: and al, dl loc_7AA4C: add rsp, 8 pop rbx pop r14 loc_7AA53: and al, 1 retn
char IsFileNameValid(_BYTE *a1) { char v1; // al int v2; // eax bool v3; // dl unsigned long long v4; // rcx char v5; // al unsigned long long v6; // r8 long long v7; // r9 unsigned __int8 v8; // r10 unsigned long long v9; // r14 long long v10; // r10 char v11; // al v1 = 1; if ( a1 && *a1 ) { v2 = strlen(a1); v3 = v2 <= 0; if ( v2 <= 0 ) { v11 = 0; } else { v4 = v2 & 0x7FFFFFFF; v5 = 1; v6 = 1LL; v7 = 0x400000035002101LL; do { v8 = a1[v6 - 1]; v9 = (unsigned int)v8 - 34; if ( (unsigned int)v9 <= 0x3A && _bittest64(&v7, v9) || v8 == 124 || v8 < 0x20u ) break; if ( v8 != 46 ) v5 = 0; v3 = v6 >= v4; v10 = v6 - v4 + 1; ++v6; } while ( v10 != 1 ); v11 = v5 ^ 1; } v1 = v3 & v11; } return v1 & 1; }
IsFileNameValid: MOV AL,0x1 TEST RDI,RDI JZ 0x0017aa53 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CMP byte ptr [RDI],0x0 JZ 0x0017aa4c MOV RDI,RBX CALL 0x00109230 MOV RCX,RAX XOR ESI,ESI TEST ECX,ECX SETLE DL JLE 0x0017aa48 AND ECX,0x7fffffff MOV RDI,RCX NEG RDI MOV AL,0x1 MOV R8D,0x1 MOV R9,0x400000035002101 LAB_0017a9ff: MOV R10B,byte ptr [RBX + R8*0x1 + -0x1] MOVZX R11D,R10B LEA R14D,[R11 + -0x22] CMP R14D,0x3a JA 0x0017aa18 BT R9,R14 JC 0x0017aa44 LAB_0017aa18: CMP R11D,0x7c JZ 0x0017aa44 CMP R10B,0x20 JC 0x0017aa44 CMP R10B,0x2e MOVZX EAX,AL CMOVNZ EAX,ESI CMP R8,RCX SETNC DL LEA R10,[RDI + R8*0x1] INC R10 INC R8 CMP R10,0x1 JNZ 0x0017a9ff LAB_0017aa44: XOR AL,0x1 JMP 0x0017aa4a LAB_0017aa48: XOR EAX,EAX LAB_0017aa4a: AND AL,DL LAB_0017aa4c: ADD RSP,0x8 POP RBX POP R14 LAB_0017aa53: AND AL,0x1 RET
byte IsFileNameValid(char *param_1) { byte bVar1; byte bVar2; size_t sVar3; uint uVar4; ulong uVar5; bool bVar6; bool bVar7; bVar2 = 1; if ((param_1 != (char *)0x0) && (*param_1 != '\0')) { sVar3 = strlen(param_1); uVar4 = (uint)sVar3; bVar6 = (int)uVar4 < 1; if ((int)uVar4 < 1) { bVar2 = 0; } else { bVar2 = 1; uVar5 = 1; do { bVar1 = param_1[uVar5 - 1]; if ((((bVar1 - 0x22 < 0x3b) && ((0x400000035002101U >> ((ulong)(bVar1 - 0x22) & 0x3f) & 1) != 0)) || (bVar1 == 0x7c)) || (bVar1 < 0x20)) break; if (bVar1 != 0x2e) { bVar2 = 0; } bVar6 = (uVar4 & 0x7fffffff) <= uVar5; bVar7 = uVar5 != (uVar4 & 0x7fffffff); uVar5 = uVar5 + 1; } while (bVar7); bVar2 = bVar2 ^ 1; } bVar2 = bVar2 & bVar6; } return bVar2; }
39,215
IsFileNameValid
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
bool IsFileNameValid(const char *fileName) { bool valid = true; if ((fileName != NULL) && (fileName[0] != '\0')) { int length = (int)strlen(fileName); bool allPeriods = true; for (int i = 0; i < length; i++) { // Check invalid characters if ((fileName[i] == '<') || (fileName[i] == '>') || (fileName[i] == ':') || (fileName[i] == '\"') || (fileName[i] == '/') || (fileName[i] == '\\') || (fileName[i] == '|') || (fileName[i] == '?') || (fileName[i] == '*')) { valid = false; break; } // Check non-glyph characters if ((unsigned char)fileName[i] < 32) { valid = false; break; } // TODO: Check trailing periods/spaces? // Check if filename is not all periods if (fileName[i] != '.') allPeriods = false; } if (allPeriods) valid = false; /* if (valid) { // Check invalid DOS names if (length >= 3) { if (((fileName[0] == 'C') && (fileName[1] == 'O') && (fileName[2] == 'N')) || // CON ((fileName[0] == 'P') && (fileName[1] == 'R') && (fileName[2] == 'N')) || // PRN ((fileName[0] == 'A') && (fileName[1] == 'U') && (fileName[2] == 'X')) || // AUX ((fileName[0] == 'N') && (fileName[1] == 'U') && (fileName[2] == 'L'))) valid = false; // NUL } if (length >= 4) { if (((fileName[0] == 'C') && (fileName[1] == 'O') && (fileName[2] == 'M') && ((fileName[3] >= '0') && (fileName[3] <= '9'))) || // COM0-9 ((fileName[0] == 'L') && (fileName[1] == 'P') && (fileName[2] == 'T') && ((fileName[3] >= '0') && (fileName[3] <= '9')))) valid = false; // LPT0-9 } } */ } return valid; }
O3
c
IsFileNameValid: movb $0x1, %al testq %rdi, %rdi je 0x76632 pushq %rbx movq %rdi, %rbx cmpb $0x0, (%rdi) je 0x76631 movq %rbx, %rdi callq 0xa230 movq %rax, %rcx testl %ecx, %ecx jle 0x7662f andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movq %rcx, %rsi negq %rsi movb $0x1, %al movl $0x1, %edi xorl %edx, %edx movabsq $0x400000035002101, %r8 # imm = 0x400000035002101 movb -0x1(%rbx,%rdi), %r9b movzbl %r9b, %r10d leal -0x22(%r10), %r11d cmpl $0x3a, %r11d ja 0x765fe btq %r11, %r8 jb 0x76629 cmpl $0x7c, %r10d je 0x76629 cmpb $0x20, %r9b jb 0x76629 cmpb $0x2e, %r9b sete %dl andb %dl, %al cmpq %rcx, %rdi setae %dl leaq (%rsi,%rdi), %r9 incq %r9 incq %rdi cmpq $0x1, %r9 jne 0x765e5 xorb $0x1, %al andb %dl, %al jmp 0x76631 xorl %eax, %eax popq %rbx andb $0x1, %al retq
IsFileNameValid: mov al, 1 test rdi, rdi jz loc_76632 push rbx mov rbx, rdi cmp byte ptr [rdi], 0 jz short loc_76631 mov rdi, rbx call _strlen mov rcx, rax test ecx, ecx jle short loc_7662F and ecx, 7FFFFFFFh mov rsi, rcx neg rsi mov al, 1 mov edi, 1 xor edx, edx mov r8, 400000035002101h loc_765E5: mov r9b, [rbx+rdi-1] movzx r10d, r9b lea r11d, [r10-22h] cmp r11d, 3Ah ; ':' ja short loc_765FE bt r8, r11 jb short loc_76629 loc_765FE: cmp r10d, 7Ch ; '|' jz short loc_76629 cmp r9b, 20h ; ' ' jb short loc_76629 cmp r9b, 2Eh ; '.' setz dl and al, dl cmp rdi, rcx setnb dl lea r9, [rsi+rdi] inc r9 inc rdi cmp r9, 1 jnz short loc_765E5 loc_76629: xor al, 1 and al, dl jmp short loc_76631 loc_7662F: xor eax, eax loc_76631: pop rbx loc_76632: and al, 1 retn
char IsFileNameValid(_BYTE *a1) { char v1; // al int v3; // eax unsigned long long v4; // rcx char v5; // al unsigned long long v6; // rdi bool v7; // dl long long v8; // r8 unsigned __int8 v9; // r9 unsigned long long v10; // r11 long long v11; // r9 v1 = 1; if ( a1 && *a1 ) { v3 = strlen(a1); if ( v3 <= 0 ) { v1 = 0; } else { v4 = v3 & 0x7FFFFFFF; v5 = 1; v6 = 1LL; v7 = 0; v8 = 0x400000035002101LL; do { v9 = a1[v6 - 1]; v10 = (unsigned int)v9 - 34; if ( (unsigned int)v10 <= 0x3A && _bittest64(&v8, v10) ) break; if ( v9 == 124 ) break; if ( v9 < 0x20u ) break; v5 &= v9 == 46; v7 = v6 >= v4; v11 = v6 - v4 + 1; ++v6; } while ( v11 != 1 ); v1 = v7 & (v5 ^ 1); } } return v1 & 1; }
IsFileNameValid: MOV AL,0x1 TEST RDI,RDI JZ 0x00176632 PUSH RBX MOV RBX,RDI CMP byte ptr [RDI],0x0 JZ 0x00176631 MOV RDI,RBX CALL 0x0010a230 MOV RCX,RAX TEST ECX,ECX JLE 0x0017662f AND ECX,0x7fffffff MOV RSI,RCX NEG RSI MOV AL,0x1 MOV EDI,0x1 XOR EDX,EDX MOV R8,0x400000035002101 LAB_001765e5: MOV R9B,byte ptr [RBX + RDI*0x1 + -0x1] MOVZX R10D,R9B LEA R11D,[R10 + -0x22] CMP R11D,0x3a JA 0x001765fe BT R8,R11 JC 0x00176629 LAB_001765fe: CMP R10D,0x7c JZ 0x00176629 CMP R9B,0x20 JC 0x00176629 CMP R9B,0x2e SETZ DL AND AL,DL CMP RDI,RCX SETNC DL LEA R9,[RSI + RDI*0x1] INC R9 INC RDI CMP R9,0x1 JNZ 0x001765e5 LAB_00176629: XOR AL,0x1 AND AL,DL JMP 0x00176631 LAB_0017662f: XOR EAX,EAX LAB_00176631: POP RBX LAB_00176632: AND AL,0x1 RET
byte IsFileNameValid(char *param_1) { byte bVar1; byte bVar2; size_t sVar3; ulong uVar4; ulong uVar5; bool bVar6; bool bVar7; bVar2 = 1; if ((param_1 != (char *)0x0) && (*param_1 != '\0')) { sVar3 = strlen(param_1); if ((int)(uint)sVar3 < 1) { bVar2 = 0; } else { uVar4 = (ulong)((uint)sVar3 & 0x7fffffff); bVar2 = 1; bVar6 = false; uVar5 = 1; do { bVar1 = param_1[uVar5 - 1]; if ((((bVar1 - 0x22 < 0x3b) && ((0x400000035002101U >> ((ulong)(bVar1 - 0x22) & 0x3f) & 1) != 0)) || (bVar1 == 0x7c)) || (bVar1 < 0x20)) break; bVar2 = bVar2 & bVar1 == 0x2e; bVar6 = uVar4 <= uVar5; bVar7 = uVar5 != uVar4; uVar5 = uVar5 + 1; } while (bVar7); bVar2 = (bVar2 ^ 1) & bVar6; } } return bVar2; }
39,216
cr_regexp_canonicalize
bluesky950520[P]quickjs/libunicode.c
int cr_regexp_canonicalize(CharRange *cr, BOOL is_unicode) { CharRange cr_inter, cr_mask, cr_result, cr_sub; uint32_t v, code, len, i, idx, start, end, c, d_start, d_end, d; cr_init(&cr_mask, cr->mem_opaque, cr->realloc_func); cr_init(&cr_inter, cr->mem_opaque, cr->realloc_func); cr_init(&cr_result, cr->mem_opaque, cr->realloc_func); cr_init(&cr_sub, cr->mem_opaque, cr->realloc_func); if (unicode_case1(&cr_mask, is_unicode ? CASE_F : CASE_U)) goto fail; if (cr_op(&cr_inter, cr_mask.points, cr_mask.len, cr->points, cr->len, CR_OP_INTER)) goto fail; if (cr_invert(&cr_mask)) goto fail; if (cr_op(&cr_sub, cr_mask.points, cr_mask.len, cr->points, cr->len, CR_OP_INTER)) goto fail; /* cr_inter = cr & cr_mask */ /* cr_sub = cr & ~cr_mask */ /* use the case conversion table to compute the result */ d_start = -1; d_end = -1; idx = 0; v = case_conv_table1[idx]; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; for(i = 0; i < cr_inter.len; i += 2) { start = cr_inter.points[i]; end = cr_inter.points[i + 1]; for(c = start; c < end; c++) { for(;;) { if (c >= code && c < code + len) break; idx++; assert(idx < countof(case_conv_table1)); v = case_conv_table1[idx]; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; } d = lre_case_folding_entry(c, idx, v, is_unicode); /* try to merge with the current interval */ if (d_start == -1) { d_start = d; d_end = d + 1; } else if (d_end == d) { d_end++; } else { cr_add_interval(&cr_result, d_start, d_end); d_start = d; d_end = d + 1; } } } if (d_start != -1) { if (cr_add_interval(&cr_result, d_start, d_end)) goto fail; } /* the resulting ranges are not necessarily sorted and may overlap */ cr_sort_and_remove_overlap(&cr_result); /* or with the character not affected by the case folding */ cr->len = 0; if (cr_op(cr, cr_result.points, cr_result.len, cr_sub.points, cr_sub.len, CR_OP_UNION)) goto fail; cr_free(&cr_inter); cr_free(&cr_mask); cr_free(&cr_result); cr_free(&cr_sub); return 0; fail: cr_free(&cr_inter); cr_free(&cr_mask); cr_free(&cr_result); cr_free(&cr_sub); return -1; }
O1
c
cr_regexp_canonicalize: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rcx movq 0x18(%rdi), %rax xorps %xmm0, %xmm0 leaq 0xa0(%rsp), %rdi movaps %xmm0, (%rdi) movq %rcx, 0x10(%rdi) testq %rax, %rax leaq -0xe92(%rip), %rdx # 0x98655 cmovneq %rax, %rdx movq %rdx, 0x18(%rdi) movaps %xmm0, 0x60(%rsp) movq %rcx, 0x70(%rsp) movq %rdx, 0x78(%rsp) movaps %xmm0, 0x20(%rsp) movq %rcx, 0x30(%rsp) movq %rdx, 0x38(%rsp) movaps %xmm0, 0x80(%rsp) movq %rcx, 0xe0(%rsp) movq %rcx, 0x90(%rsp) movq %rdx, 0xd8(%rsp) movq %rdx, 0x98(%rsp) xorl %eax, %eax movl %esi, 0x5c(%rsp) testl %esi, %esi setne %al leal (%rax,%rax,2), %esi incl %esi callq 0x998a9 testl %eax, %eax jne 0x995b9 movq 0xa8(%rsp), %rsi movl 0xa0(%rsp), %edx movq 0x8(%rbx), %rcx movl (%rbx), %r8d leaq 0x60(%rsp), %rdi movl $0x1, %r9d callq 0x986fe testl %eax, %eax jne 0x995b9 leaq 0xa0(%rsp), %rdi callq 0x988f1 testl %eax, %eax jne 0x995b9 movq 0xa8(%rsp), %r14 movl 0xa0(%rsp), %edx movq 0x8(%rbx), %rcx movl (%rbx), %r8d leaq 0x80(%rsp), %rdi movq %r14, %rsi movl $0x1, %r9d callq 0x986fe testl %eax, %eax je 0x99624 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdi xorl %edx, %edx callq *0x78(%rsp) movq 0xa8(%rsp), %rsi movq 0xb0(%rsp), %rdi xorl %edx, %edx callq *0xb8(%rsp) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdi xorl %edx, %edx callq *0x38(%rsp) movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdi xorl %edx, %edx callq *0x98(%rsp) movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movl %ebx, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r14, 0xc8(%rsp) movq %rbx, 0xd0(%rsp) cmpl $0x0, 0x60(%rsp) je 0x997e5 movl $0x1a, %r13d xorl %r12d, %r12d movl $0x41, %ebp movl $0x209a30, %r15d # imm = 0x209A30 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF leaq 0xa1e1(%rip), %rdx # 0xa3840 movl $0xffffffff, %esi # imm = 0xFFFFFFFF xorl %ecx, %ecx movq 0x68(%rsp), %rax movl %ecx, 0x48(%rsp) movl %ecx, %ecx movl (%rax,%rcx,4), %r14d movl 0x4(%rax,%rcx,4), %ecx movl 0x20(%rsp), %eax movq %rax, 0x18(%rsp) movl %ecx, 0x58(%rsp) cmpl %ecx, %r14d jae 0x997c9 movl 0x24(%rsp), %eax movq %rax, 0x40(%rsp) movq 0x28(%rsp), %rcx movl %esi, 0x14(%rsp) cmpl %ebp, %r14d movq %rcx, 0x8(%rsp) jb 0x996b5 leal (%rbp,%r13), %eax cmpl %eax, %r14d jb 0x996d4 incl %r12d movl (%rdx,%r12,4), %r15d movl %r15d, %ebp shrl $0xf, %ebp cmpl %ebp, %r14d jb 0x996b5 movl %r15d, %r13d shrl $0x8, %r13d andl $0x7f, %r13d jmp 0x996ab movl %r14d, %edi movl %r12d, %esi movl %r15d, %edx movl 0x5c(%rsp), %ecx callq 0x9846d movl %eax, %edi movl 0x14(%rsp), %esi cmpl $-0x1, %esi je 0x996f9 cmpl %edi, %ebx jne 0x9970c movl %ebx, %edi jmp 0x996fb movl %edi, %esi leaq 0xa13e(%rip), %rdx # 0xa3840 movq 0x8(%rsp), %rcx jmp 0x997a9 movl %ebx, 0x54(%rsp) movq 0x18(%rsp), %rax leal 0x2(%rax), %r8d movq 0x40(%rsp), %rcx cmpl %ecx, %r8d jle 0x99777 leal (%rcx,%rcx,2), %eax movl %eax, %ebx shrl $0x1f, %ebx addl %eax, %ebx sarl %ebx cmpl %ebx, %r8d cmovgl %r8d, %ebx movslq %ebx, %rdx shlq $0x2, %rdx movl %edi, 0x50(%rsp) movq 0xe0(%rsp), %rdi movq 0x8(%rsp), %rsi movl %r8d, 0x4c(%rsp) callq *0xd8(%rsp) movl 0x4c(%rsp), %r8d movl 0x50(%rsp), %edi movl 0x14(%rsp), %esi testq %rax, %rax leaq 0xa0cf(%rip), %rdx # 0xa3840 jne 0x99785 movl %edi, %esi jmp 0x99702 movq 0x8(%rsp), %rax movl %ecx, %ebx leaq 0xa0bb(%rip), %rdx # 0xa3840 movslq 0x18(%rsp), %rcx movl %esi, (%rax,%rcx,4) movl 0x54(%rsp), %esi movl %esi, 0x4(%rax,%rcx,4) movq %rax, %rcx movl %ebx, %eax movq %rax, 0x40(%rsp) movl %r8d, %eax movq %rax, 0x18(%rsp) movl %edi, %esi movl %edi, %ebx incl %ebx incl %r14d cmpl 0x58(%rsp), %r14d jne 0x9969d movq 0x40(%rsp), %rax movl %eax, 0x24(%rsp) movq %rcx, 0x28(%rsp) movq 0x18(%rsp), %rax movl %eax, 0x20(%rsp) movl 0x48(%rsp), %ecx addl $0x2, %ecx cmpl 0x60(%rsp), %ecx jb 0x99666 jmp 0x997ef movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpl $-0x1, %esi movq 0xd0(%rsp), %r12 movq 0xc8(%rsp), %r13 je 0x99818 leaq 0x20(%rsp), %rdi movl %ebx, %edx callq 0x99464 testl %eax, %eax jne 0x995b9 leaq 0x20(%rsp), %rbx movq %rbx, %rdi callq 0x99ac9 movl $0x0, (%r12) movq 0x8(%rbx), %r15 movl (%rbx), %edx movq 0x88(%rsp), %r14 movl 0x80(%rsp), %r8d xorl %ebx, %ebx movq %r12, %rdi movq %r15, %rsi movq %r14, %rcx xorl %r9d, %r9d callq 0x986fe testl %eax, %eax jne 0x995b9 movq 0x68(%rsp), %rsi movq 0x70(%rsp), %rdi xorl %edx, %edx callq *0x78(%rsp) movq 0xb0(%rsp), %rdi movq %r13, %rsi xorl %edx, %edx callq *0xb8(%rsp) movq 0x30(%rsp), %rdi movq %r15, %rsi xorl %edx, %edx callq *0x38(%rsp) movq 0x90(%rsp), %rdi movq %r14, %rsi xorl %edx, %edx callq *0x98(%rsp) jmp 0x99610
cr_regexp_canonicalize: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov rbx, rdi mov rcx, [rdi+10h] mov rax, [rdi+18h] xorps xmm0, xmm0 lea rdi, [rsp+118h+var_78] movaps xmmword ptr [rdi], xmm0 mov [rdi+10h], rcx test rax, rax lea rdx, cr_default_realloc cmovnz rdx, rax mov [rdi+18h], rdx movaps [rsp+118h+var_B8], xmm0 mov [rsp+118h+var_A8], rcx mov [rsp+118h+var_A0], rdx movaps [rsp+118h+var_F8], xmm0 mov [rsp+118h+var_E8], rcx mov [rsp+118h+var_E0], rdx movaps [rsp+118h+var_98], xmm0 mov [rsp+118h+var_38], rcx mov [rsp+118h+var_88], rcx mov [rsp+118h+var_40], rdx mov [rsp+118h+var_80], rdx xor eax, eax mov [rsp+118h+var_BC], esi test esi, esi setnz al lea esi, [rax+rax*2] inc esi call unicode_case1 test eax, eax jnz short loc_995B9 mov rsi, [rsp+118h+var_70] mov edx, [rsp+118h+var_78] mov rcx, [rbx+8] mov r8d, [rbx] lea rdi, [rsp+118h+var_B8] mov r9d, 1 call cr_op test eax, eax jnz short loc_995B9 lea rdi, [rsp+118h+var_78] call cr_invert test eax, eax jnz short loc_995B9 mov r14, [rsp+118h+var_70] mov edx, [rsp+118h+var_78] mov rcx, [rbx+8] mov r8d, [rbx] lea rdi, [rsp+118h+var_98] mov rsi, r14 mov r9d, 1 call cr_op test eax, eax jz short loc_99624 loc_995B9: mov rsi, qword ptr [rsp+118h+var_B8+8] mov rdi, [rsp+118h+var_A8] xor edx, edx call [rsp+118h+var_A0] mov rsi, [rsp+118h+var_70] mov rdi, [rsp+118h+var_68] xor edx, edx call [rsp+118h+var_60] mov rsi, qword ptr [rsp+118h+var_F8+8] mov rdi, [rsp+118h+var_E8] xor edx, edx call [rsp+118h+var_E0] mov rsi, qword ptr [rsp+118h+var_98+8] mov rdi, [rsp+118h+var_88] xor edx, edx call [rsp+118h+var_80] mov ebx, 0FFFFFFFFh loc_99610: mov eax, ebx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_99624: mov [rsp+118h+var_50], r14 mov [rsp+118h+var_48], rbx cmp dword ptr [rsp+118h+var_B8], 0 jz loc_997E5 mov r13d, 1Ah xor r12d, r12d mov ebp, 41h ; 'A' mov r15d, 209A30h mov ebx, 0FFFFFFFFh lea rdx, case_conv_table1 mov esi, 0FFFFFFFFh xor ecx, ecx loc_99666: mov rax, qword ptr [rsp+118h+var_B8+8] mov [rsp+118h+var_D0], ecx mov ecx, ecx mov r14d, [rax+rcx*4] mov ecx, [rax+rcx*4+4] mov eax, dword ptr [rsp+118h+var_F8] mov [rsp+118h+var_100], rax mov [rsp+118h+var_C0], ecx cmp r14d, ecx jnb loc_997C9 mov eax, dword ptr [rsp+118h+var_F8+4] mov [rsp+118h+var_D8], rax mov rcx, qword ptr [rsp+118h+var_F8+8] loc_9969D: mov [rsp+118h+var_104], esi cmp r14d, ebp mov [rsp+118h+var_110], rcx jb short loc_996B5 loc_996AB: lea eax, [rbp+r13+0] cmp r14d, eax jb short loc_996D4 loc_996B5: inc r12d mov r15d, [rdx+r12*4] mov ebp, r15d shr ebp, 0Fh cmp r14d, ebp jb short loc_996B5 mov r13d, r15d shr r13d, 8 and r13d, 7Fh jmp short loc_996AB loc_996D4: mov edi, r14d mov esi, r12d mov edx, r15d mov ecx, [rsp+118h+var_BC] call lre_case_folding_entry mov edi, eax mov esi, [rsp+118h+var_104] cmp esi, 0FFFFFFFFh jz short loc_996F9 cmp ebx, edi jnz short loc_9970C mov edi, ebx jmp short loc_996FB loc_996F9: mov esi, edi loc_996FB: lea rdx, case_conv_table1 loc_99702: mov rcx, [rsp+118h+var_110] jmp loc_997A9 loc_9970C: mov [rsp+118h+var_C4], ebx mov rax, [rsp+118h+var_100] lea r8d, [rax+2] mov rcx, [rsp+118h+var_D8] cmp r8d, ecx jle short loc_99777 lea eax, [rcx+rcx*2] mov ebx, eax shr ebx, 1Fh add ebx, eax sar ebx, 1 cmp r8d, ebx cmovg ebx, r8d movsxd rdx, ebx shl rdx, 2 mov [rsp+118h+var_C8], edi mov rdi, [rsp+118h+var_38] mov rsi, [rsp+118h+var_110] mov [rsp+118h+var_CC], r8d call [rsp+118h+var_40] mov r8d, [rsp+118h+var_CC] mov edi, [rsp+118h+var_C8] mov esi, [rsp+118h+var_104] test rax, rax lea rdx, case_conv_table1 jnz short loc_99785 mov esi, edi jmp short loc_99702 loc_99777: mov rax, [rsp+118h+var_110] mov ebx, ecx lea rdx, case_conv_table1 loc_99785: movsxd rcx, dword ptr [rsp+118h+var_100] mov [rax+rcx*4], esi mov esi, [rsp+118h+var_C4] mov [rax+rcx*4+4], esi mov rcx, rax mov eax, ebx mov [rsp+118h+var_D8], rax mov eax, r8d mov [rsp+118h+var_100], rax mov esi, edi loc_997A9: mov ebx, edi inc ebx inc r14d cmp r14d, [rsp+118h+var_C0] jnz loc_9969D mov rax, [rsp+118h+var_D8] mov dword ptr [rsp+118h+var_F8+4], eax mov qword ptr [rsp+118h+var_F8+8], rcx loc_997C9: mov rax, [rsp+118h+var_100] mov dword ptr [rsp+118h+var_F8], eax mov ecx, [rsp+118h+var_D0] add ecx, 2 cmp ecx, dword ptr [rsp+118h+var_B8] jb loc_99666 jmp short loc_997EF loc_997E5: mov esi, 0FFFFFFFFh mov ebx, 0FFFFFFFFh loc_997EF: cmp esi, 0FFFFFFFFh mov r12, [rsp+118h+var_48] mov r13, [rsp+118h+var_50] jz short loc_99818 lea rdi, [rsp+118h+var_F8] mov edx, ebx call cr_add_interval test eax, eax jnz loc_995B9 loc_99818: lea rbx, [rsp+118h+var_F8] mov rdi, rbx call cr_sort_and_remove_overlap mov dword ptr [r12], 0 mov r15, [rbx+8] mov edx, [rbx] mov r14, qword ptr [rsp+118h+var_98+8] mov r8d, dword ptr [rsp+118h+var_98] xor ebx, ebx mov rdi, r12 mov rsi, r15 mov rcx, r14 xor r9d, r9d call cr_op test eax, eax jnz loc_995B9 mov rsi, qword ptr [rsp+118h+var_B8+8] mov rdi, [rsp+118h+var_A8] xor edx, edx call [rsp+118h+var_A0] mov rdi, [rsp+118h+var_68] mov rsi, r13 xor edx, edx call [rsp+118h+var_60] mov rdi, [rsp+118h+var_E8] mov rsi, r15 xor edx, edx call [rsp+118h+var_E0] mov rdi, [rsp+118h+var_88] mov rsi, r14 xor edx, edx call [rsp+118h+var_80] jmp loc_99610
long long cr_regexp_canonicalize(long long a1, int a2) { long long v2; // rcx long long ( *v3)(long long, long long, long long); // rax long long ( *v4)(long long, long long, long long); // rdx long long v5; // r14 _DWORD *v6; // rdx unsigned int v7; // ebx int v9; // r13d long long v10; // r12 unsigned int v11; // ebp unsigned int v12; // r15d int v13; // ebx long long v14; // rsi unsigned int v15; // ecx unsigned int v16; // r14d long long v17; // rcx unsigned int v18; // edi int v19; // r8d int v20; // ebx long long v21; // rax _DWORD *v22; // r12 long long v23; // r13 long long v24; // r15 long long v25; // r14 long long v26; // [rsp+8h] [rbp-110h] int v27; // [rsp+18h] [rbp-100h] __int128 v28; // [rsp+20h] [rbp-F8h] BYREF long long v29; // [rsp+30h] [rbp-E8h] long long ( *v30)(long long, long long, long long); // [rsp+38h] [rbp-E0h] long long v31; // [rsp+40h] [rbp-D8h] unsigned int v32; // [rsp+48h] [rbp-D0h] int v33; // [rsp+4Ch] [rbp-CCh] unsigned int v34; // [rsp+50h] [rbp-C8h] int v35; // [rsp+54h] [rbp-C4h] unsigned int v36; // [rsp+58h] [rbp-C0h] int v37; // [rsp+5Ch] [rbp-BCh] __int128 v38; // [rsp+60h] [rbp-B8h] BYREF long long v39; // [rsp+70h] [rbp-A8h] long long ( *v40)(long long, long long, long long); // [rsp+78h] [rbp-A0h] __int128 v41; // [rsp+80h] [rbp-98h] BYREF long long v42; // [rsp+90h] [rbp-88h] long long ( *v43)(long long, long long, long long); // [rsp+98h] [rbp-80h] __int128 v44; // [rsp+A0h] [rbp-78h] BYREF long long v45; // [rsp+B0h] [rbp-68h] long long ( *v46)(long long, long long, long long); // [rsp+B8h] [rbp-60h] long long v47; // [rsp+C8h] [rbp-50h] _DWORD *v48; // [rsp+D0h] [rbp-48h] long long ( *v49)(long long, long long, long long); // [rsp+D8h] [rbp-40h] long long v50; // [rsp+E0h] [rbp-38h] v2 = *(_QWORD *)(a1 + 16); v3 = *(long long ( **)(long long, long long, long long))(a1 + 24); v44 = 0LL; v45 = v2; v4 = cr_default_realloc; if ( v3 ) v4 = v3; v46 = v4; v38 = 0LL; v39 = v2; v40 = v4; v28 = 0LL; v29 = v2; v30 = v4; v41 = 0LL; v50 = v2; v42 = v2; v49 = v4; v43 = v4; v37 = a2; if ( (unsigned int)unicode_case1(&v44, 3 * (unsigned int)(a2 != 0) + 1) ) goto LABEL_7; if ( (unsigned int)cr_op((unsigned long long)&v38, *((long long *)&v44 + 1), v44, *(_QWORD *)(a1 + 8), *(_DWORD *)a1, 1) ) goto LABEL_7; if ( (unsigned int)cr_invert((int *)&v44) ) goto LABEL_7; v5 = *((_QWORD *)&v44 + 1); if ( (unsigned int)cr_op((unsigned long long)&v41, *((long long *)&v44 + 1), v44, *(_QWORD *)(a1 + 8), *(_DWORD *)a1, 1) ) goto LABEL_7; v47 = v5; v48 = (_DWORD *)a1; if ( (_DWORD)v38 ) { v9 = 26; LODWORD(v10) = 0; v11 = 65; v12 = 2136624; v13 = -1; v6 = case_conv_table1; v14 = 0xFFFFFFFFLL; v15 = 0; while ( 1 ) { v32 = v15; v16 = *(_DWORD *)(*((_QWORD *)&v38 + 1) + 4LL * v15); v27 = v28; v36 = *(_DWORD *)(*((_QWORD *)&v38 + 1) + 4LL * v15 + 4); if ( v16 < v36 ) break; LABEL_32: LODWORD(v28) = v27; v15 = v32 + 2; if ( v32 + 2 >= (unsigned int)v38 ) goto LABEL_35; } v31 = DWORD1(v28); v17 = *((_QWORD *)&v28 + 1); while ( 1 ) { v26 = v17; if ( v16 < v11 ) goto LABEL_15; while ( v16 >= v11 + v9 ) { do { LABEL_15: v10 = (unsigned int)(v10 + 1); v12 = case_conv_table1[v10]; v11 = v12 >> 15; } while ( v16 < v12 >> 15 ); v9 = (v12 >> 8) & 0x7F; } v18 = lre_case_folding_entry(v16, v10, v12, v37); v14 = (unsigned int)v14; if ( (_DWORD)v14 == -1 ) break; if ( v13 == v18 ) { v18 = v13; LABEL_21: v6 = case_conv_table1; goto LABEL_22; } v35 = v13; v19 = v27 + 2; if ( v27 + 2 <= (int)v31 ) { v21 = v26; v20 = v31; v6 = case_conv_table1; LABEL_29: *(_DWORD *)(v21 + 4LL * v27) = v14; *(_DWORD *)(v21 + 4LL * v27 + 4) = v35; v17 = v21; v31 = (unsigned int)v20; v27 = v19; v14 = v18; goto LABEL_30; } v20 = 3 * (int)v31 / 2; if ( v19 > v20 ) v20 = v27 + 2; v34 = v18; v33 = v27 + 2; v21 = v49(v50, v26, 4LL * v20); v19 = v27 + 2; v6 = case_conv_table1; if ( v21 ) goto LABEL_29; v14 = v18; LABEL_22: v17 = v26; LABEL_30: v13 = v18 + 1; if ( ++v16 == v36 ) { DWORD1(v28) = v31; *((_QWORD *)&v28 + 1) = v17; goto LABEL_32; } } v14 = v18; goto LABEL_21; } v14 = 0xFFFFFFFFLL; v13 = -1; LABEL_35: v22 = v48; v23 = v47; if ( (_DWORD)v14 == -1 || !(unsigned int)cr_add_interval((int *)&v28, v14, v13) ) { cr_sort_and_remove_overlap(&v28, v14, v6); *v22 = 0; v24 = *((_QWORD *)&v28 + 1); v25 = *((_QWORD *)&v41 + 1); v7 = 0; if ( !(unsigned int)cr_op((unsigned long long)v22, *((long long *)&v28 + 1), v28, *((long long *)&v41 + 1), v41, 0) ) { v40(v39, *((_QWORD *)&v38 + 1), 0LL); v46(v45, v23, 0LL); v30(v29, v24, 0LL); v43(v42, v25, 0LL); return v7; } } LABEL_7: v40(v39, *((_QWORD *)&v38 + 1), 0LL); v46(v45, *((_QWORD *)&v44 + 1), 0LL); v30(v29, *((_QWORD *)&v28 + 1), 0LL); v43(v42, *((_QWORD *)&v41 + 1), 0LL); return (unsigned int)-1; }
39,217
cr_regexp_canonicalize
bluesky950520[P]quickjs/libunicode.c
int cr_regexp_canonicalize(CharRange *cr, BOOL is_unicode) { CharRange cr_inter, cr_mask, cr_result, cr_sub; uint32_t v, code, len, i, idx, start, end, c, d_start, d_end, d; cr_init(&cr_mask, cr->mem_opaque, cr->realloc_func); cr_init(&cr_inter, cr->mem_opaque, cr->realloc_func); cr_init(&cr_result, cr->mem_opaque, cr->realloc_func); cr_init(&cr_sub, cr->mem_opaque, cr->realloc_func); if (unicode_case1(&cr_mask, is_unicode ? CASE_F : CASE_U)) goto fail; if (cr_op(&cr_inter, cr_mask.points, cr_mask.len, cr->points, cr->len, CR_OP_INTER)) goto fail; if (cr_invert(&cr_mask)) goto fail; if (cr_op(&cr_sub, cr_mask.points, cr_mask.len, cr->points, cr->len, CR_OP_INTER)) goto fail; /* cr_inter = cr & cr_mask */ /* cr_sub = cr & ~cr_mask */ /* use the case conversion table to compute the result */ d_start = -1; d_end = -1; idx = 0; v = case_conv_table1[idx]; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; for(i = 0; i < cr_inter.len; i += 2) { start = cr_inter.points[i]; end = cr_inter.points[i + 1]; for(c = start; c < end; c++) { for(;;) { if (c >= code && c < code + len) break; idx++; assert(idx < countof(case_conv_table1)); v = case_conv_table1[idx]; code = v >> (32 - 17); len = (v >> (32 - 17 - 7)) & 0x7f; } d = lre_case_folding_entry(c, idx, v, is_unicode); /* try to merge with the current interval */ if (d_start == -1) { d_start = d; d_end = d + 1; } else if (d_end == d) { d_end++; } else { cr_add_interval(&cr_result, d_start, d_end); d_start = d; d_end = d + 1; } } } if (d_start != -1) { if (cr_add_interval(&cr_result, d_start, d_end)) goto fail; } /* the resulting ranges are not necessarily sorted and may overlap */ cr_sort_and_remove_overlap(&cr_result); /* or with the character not affected by the case folding */ cr->len = 0; if (cr_op(cr, cr_result.points, cr_result.len, cr_sub.points, cr_sub.len, CR_OP_UNION)) goto fail; cr_free(&cr_inter); cr_free(&cr_mask); cr_free(&cr_result); cr_free(&cr_sub); return 0; fail: cr_free(&cr_inter); cr_free(&cr_mask); cr_free(&cr_result); cr_free(&cr_sub); return -1; }
O2
c
cr_regexp_canonicalize: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movl %esi, %ebp movq %rdi, %rbx movq 0x10(%rdi), %rax movq 0x18(%rdi), %rcx xorps %xmm0, %xmm0 leaq 0x70(%rsp), %rdi movaps %xmm0, (%rdi) movq %rax, 0x10(%rdi) testq %rcx, %rcx leaq -0xd0a(%rip), %rdx # 0x7f411 cmovneq %rcx, %rdx movq %rdx, 0x18(%rdi) movaps %xmm0, 0x90(%rsp) movq %rax, 0xa0(%rsp) movq %rdx, 0xa8(%rsp) movaps %xmm0, 0x20(%rsp) movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movaps %xmm0, 0x50(%rsp) movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) xorl %eax, %eax testl %esi, %esi setne %al leal (%rax,%rax,2), %esi incl %esi callq 0x80441 testl %eax, %eax jne 0x801a1 movq 0x78(%rsp), %rsi movl 0x70(%rsp), %edx movq 0x8(%rbx), %rcx movl (%rbx), %r8d leaq 0x90(%rsp), %rdi pushq $0x1 popq %r9 callq 0x7f4b5 testl %eax, %eax jne 0x801a1 leaq 0x70(%rsp), %rdi callq 0x7f6a0 testl %eax, %eax je 0x80208 xorl %r15d, %r15d pushq $-0x1 popq %rbx movq 0x98(%rsp), %rsi movq 0xa0(%rsp), %rdi xorl %edx, %edx callq *0xa8(%rsp) movq 0x78(%rsp), %rsi movq 0x80(%rsp), %rdi xorl %edx, %edx callq *0x88(%rsp) movq 0x30(%rsp), %rdi movq %r15, %rsi xorl %edx, %edx callq *0x38(%rsp) movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdi xorl %edx, %edx callq *0x68(%rsp) movl %ebx, %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x78(%rsp), %r14 movl 0x70(%rsp), %edx movq 0x8(%rbx), %rcx movl (%rbx), %r8d leaq 0x50(%rsp), %rdi pushq $0x1 popq %r9 movq %r14, %rsi callq 0x7f4b5 xorl %r15d, %r15d testl %eax, %eax jne 0x801a4 movl %ebp, 0x14(%rsp) movq %r14, 0xb0(%rsp) movq %rbx, 0xb8(%rsp) movl 0x90(%rsp), %eax movl %eax, 0x10(%rsp) pushq $-0x1 popq %rsi xorl %eax, %eax movl $0x209a30, %r15d # imm = 0x209A30 pushq $0x41 popq %rbx pushq $0x1a popq %r13 movq 0x98(%rsp), %rcx movq %rcx, 0x48(%rsp) leaq 0xa4d7(%rip), %rbp # 0x8a750 xorl %r12d, %r12d movl %esi, %edx cmpl 0x10(%rsp), %eax jae 0x8032f movq %rax, 0xc0(%rsp) movl %eax, %eax movq 0x48(%rsp), %rcx movl (%rcx,%rax,4), %r14d movl 0x4(%rcx,%rax,4), %eax movl %eax, 0x18(%rsp) cmpl 0x18(%rsp), %r14d jae 0x8031f cmpl %ebx, %r14d jb 0x802b8 leal (%rbx,%r13), %eax cmpl %eax, %r14d jb 0x802d3 incl %r12d movl (%rbp,%r12,4), %r15d movl %r15d, %ebx shrl $0xf, %ebx movl %r15d, %r13d shrl $0x8, %r13d andl $0x7f, %r13d jmp 0x802aa movl %edx, 0x1c(%rsp) movl %r14d, %edi movl %esi, 0xc(%rsp) movl %r12d, %esi movl %r15d, %edx movl 0x14(%rsp), %ecx callq 0x7f233 movl 0xc(%rsp), %esi cmpl $-0x1, %esi je 0x80314 movl 0x1c(%rsp), %edx cmpl %eax, %edx jne 0x80302 movl %esi, %eax jmp 0x80316 leaq 0x20(%rsp), %rdi movl %eax, 0xc(%rsp) callq 0x80099 movl 0xc(%rsp), %eax movl %eax, %edx incl %edx incl %r14d movl %eax, %esi jmp 0x802a3 movq 0xc0(%rsp), %rax addl $0x2, %eax jmp 0x8027e cmpl $-0x1, %esi je 0x8034c leaq 0x20(%rsp), %rdi callq 0x80099 testl %eax, %eax je 0x8034c movq 0x28(%rsp), %r15 jmp 0x801a4 movq 0x28(%rsp), %r15 movl 0x20(%rsp), %ebx pushq $0x2 popq %rcx movl %ebx, %eax cltd idivl %ecx movslq %eax, %rsi leaq 0xd8a(%rip), %rcx # 0x810f1 xorl %r14d, %r14d pushq $0x8 popq %rdx movq %r15, %rdi xorl %r8d, %r8d callq 0x1683c xorl %edx, %edx movq 0xb8(%rsp), %rdi movq 0xb0(%rsp), %r12 cmpl %ebx, %r14d jae 0x803d7 movl %r14d, %ecx movl (%r15,%rcx,4), %eax movl 0x4(%r15,%rcx,4), %ecx addl $0x3, %r14d movl %r14d, %esi leal -0x1(%rsi), %r14d cmpl %ebx, %r14d jae 0x803c7 movl %r14d, %r8d cmpl %ecx, (%r15,%r8,4) ja 0x803c7 movl %esi, %r8d movl (%r15,%r8,4), %r8d cmpl %ecx, %r8d cmoval %r8d, %ecx addl $0x2, %esi jmp 0x803a2 movl %edx, %esi movl %eax, (%r15,%rsi,4) movl %ecx, 0x4(%r15,%rsi,4) addl $0x2, %edx jmp 0x8038a andl $0x0, (%rdi) movq 0x58(%rsp), %r14 movl 0x50(%rsp), %r8d xorl %ebx, %ebx movq %r15, %rsi movq %r14, %rcx xorl %r9d, %r9d callq 0x7f4b5 testl %eax, %eax jne 0x801a4 movq 0xa0(%rsp), %rdi movq 0x48(%rsp), %rsi xorl %edx, %edx callq *0xa8(%rsp) movq 0x80(%rsp), %rdi movq %r12, %rsi xorl %edx, %edx callq *0x88(%rsp) movq 0x30(%rsp), %rdi movq %r15, %rsi xorl %edx, %edx callq *0x38(%rsp) movq 0x60(%rsp), %rdi movq %r14, %rsi jmp 0x801ee
cr_regexp_canonicalize: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov ebp, esi mov rbx, rdi mov rax, [rdi+10h] mov rcx, [rdi+18h] xorps xmm0, xmm0 lea rdi, [rsp+0F8h+var_88] movaps xmmword ptr [rdi], xmm0 mov [rdi+10h], rax test rcx, rcx lea rdx, cr_default_realloc cmovnz rdx, rcx mov [rdi+18h], rdx movaps [rsp+0F8h+var_68], xmm0 mov [rsp+0F8h+var_58], rax mov [rsp+0F8h+var_50], rdx movaps [rsp+0F8h+var_D8], xmm0 mov [rsp+0F8h+var_C8], rax mov [rsp+0F8h+var_C0], rdx movaps [rsp+0F8h+var_A8], xmm0 mov [rsp+0F8h+var_98], rax mov [rsp+0F8h+var_90], rdx xor eax, eax test esi, esi setnz al lea esi, [rax+rax*2] inc esi call unicode_case1 test eax, eax jnz short loc_801A1 mov rsi, [rsp+0F8h+var_80] mov edx, [rsp+0F8h+var_88] mov rcx, [rbx+8] mov r8d, [rbx] lea rdi, [rsp+0F8h+var_68] push 1 pop r9 call cr_op test eax, eax jnz short loc_801A1 lea rdi, [rsp+0F8h+var_88] call cr_invert test eax, eax jz short loc_80208 loc_801A1: xor r15d, r15d loc_801A4: push 0FFFFFFFFFFFFFFFFh pop rbx mov rsi, qword ptr [rsp+0F8h+var_68+8] mov rdi, [rsp+0F8h+var_58] xor edx, edx call [rsp+0F8h+var_50] mov rsi, [rsp+0F8h+var_80] mov rdi, [rsp+0F8h+var_78] xor edx, edx call [rsp+0F8h+var_70] mov rdi, [rsp+0F8h+var_C8] mov rsi, r15 xor edx, edx call [rsp+0F8h+var_C0] mov rsi, qword ptr [rsp+0F8h+var_A8+8] mov rdi, [rsp+0F8h+var_98] loc_801EE: xor edx, edx call [rsp+0F8h+var_90] mov eax, ebx add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_80208: mov r14, [rsp+0F8h+var_80] mov edx, [rsp+0F8h+var_88] mov rcx, [rbx+8] mov r8d, [rbx] lea rdi, [rsp+0F8h+var_A8] push 1 pop r9 mov rsi, r14 call cr_op xor r15d, r15d test eax, eax jnz loc_801A4 mov [rsp+0F8h+var_E4], ebp mov [rsp+0F8h+var_48], r14 mov [rsp+0F8h+var_40], rbx mov eax, dword ptr [rsp+0F8h+var_68] mov [rsp+0F8h+var_E8], eax push 0FFFFFFFFFFFFFFFFh pop rsi xor eax, eax mov r15d, 209A30h push 41h ; 'A' pop rbx push 1Ah pop r13 mov rcx, qword ptr [rsp+0F8h+var_68+8] mov [rsp+0F8h+var_B0], rcx lea rbp, case_conv_table1 xor r12d, r12d mov edx, esi loc_8027E: cmp eax, [rsp+0F8h+var_E8] jnb loc_8032F mov [rsp+0F8h+var_38], rax mov eax, eax mov rcx, [rsp+0F8h+var_B0] mov r14d, [rcx+rax*4] mov eax, [rcx+rax*4+4] mov [rsp+0F8h+var_E0], eax loc_802A3: cmp r14d, [rsp+0F8h+var_E0] jnb short loc_8031F loc_802AA: cmp r14d, ebx jb short loc_802B8 lea eax, [rbx+r13] cmp r14d, eax jb short loc_802D3 loc_802B8: inc r12d mov r15d, [rbp+r12*4+0] mov ebx, r15d shr ebx, 0Fh mov r13d, r15d shr r13d, 8 and r13d, 7Fh jmp short loc_802AA loc_802D3: mov [rsp+0F8h+var_DC], edx mov edi, r14d mov [rsp+0F8h+var_EC], esi mov esi, r12d mov edx, r15d mov ecx, [rsp+0F8h+var_E4] call lre_case_folding_entry mov esi, [rsp+0F8h+var_EC] cmp esi, 0FFFFFFFFh jz short loc_80314 mov edx, [rsp+0F8h+var_DC] cmp edx, eax jnz short loc_80302 mov eax, esi jmp short loc_80316 loc_80302: lea rdi, [rsp+0F8h+var_D8] mov [rsp+0F8h+var_EC], eax call cr_add_interval mov eax, [rsp+0F8h+var_EC] loc_80314: mov edx, eax loc_80316: inc edx inc r14d mov esi, eax jmp short loc_802A3 loc_8031F: mov rax, [rsp+0F8h+var_38] add eax, 2 jmp loc_8027E loc_8032F: cmp esi, 0FFFFFFFFh jz short loc_8034C lea rdi, [rsp+0F8h+var_D8] call cr_add_interval test eax, eax jz short loc_8034C mov r15, qword ptr [rsp+0F8h+var_D8+8] jmp loc_801A4 loc_8034C: mov r15, qword ptr [rsp+0F8h+var_D8+8] mov ebx, dword ptr [rsp+0F8h+var_D8] push 2 pop rcx mov eax, ebx cdq idiv ecx movsxd rsi, eax lea rcx, point_cmp xor r14d, r14d push 8 pop rdx mov rdi, r15 xor r8d, r8d call rqsort xor edx, edx mov rdi, [rsp+0F8h+var_40] mov r12, [rsp+0F8h+var_48] loc_8038A: cmp r14d, ebx jnb short loc_803D7 mov ecx, r14d mov eax, [r15+rcx*4] mov ecx, [r15+rcx*4+4] add r14d, 3 mov esi, r14d loc_803A2: lea r14d, [rsi-1] cmp r14d, ebx jnb short loc_803C7 mov r8d, r14d cmp [r15+r8*4], ecx ja short loc_803C7 mov r8d, esi mov r8d, [r15+r8*4] cmp r8d, ecx cmova ecx, r8d add esi, 2 jmp short loc_803A2 loc_803C7: mov esi, edx mov [r15+rsi*4], eax mov [r15+rsi*4+4], ecx add edx, 2 jmp short loc_8038A loc_803D7: and dword ptr [rdi], 0 mov r14, qword ptr [rsp+0F8h+var_A8+8] mov r8d, dword ptr [rsp+0F8h+var_A8] xor ebx, ebx mov rsi, r15 mov rcx, r14 xor r9d, r9d call cr_op test eax, eax jnz loc_801A4 mov rdi, [rsp+0F8h+var_58] mov rsi, [rsp+0F8h+var_B0] xor edx, edx call [rsp+0F8h+var_50] mov rdi, [rsp+0F8h+var_78] mov rsi, r12 xor edx, edx call [rsp+0F8h+var_70] mov rdi, [rsp+0F8h+var_C8] mov rsi, r15 xor edx, edx call [rsp+0F8h+var_C0] mov rdi, [rsp+0F8h+var_98] mov rsi, r14 jmp loc_801EE
long long cr_regexp_canonicalize(long long a1, int a2) { long long v3; // rax long long ( *v4)(long long, long long, long long); // rcx long long ( *v5)(long long, long long, long long); // rdx long long v6; // r15 unsigned int v7; // ebx long long v8; // rsi long long v9; // rdi long long v11; // r14 int v12; // esi long long v13; // rax unsigned int v14; // r15d unsigned int v15; // ebx int v16; // r13d long long v17; // r12 int v18; // edx unsigned int v19; // r14d int v20; // eax int v21; // edx unsigned int v22; // ebx unsigned int v23; // r14d unsigned int v24; // edx const char *v25; // rdi long long v26; // r12 int v27; // eax unsigned int v28; // ecx unsigned int i; // esi long long v30; // r14 int v31; // [rsp+Ch] [rbp-ECh] unsigned int v32; // [rsp+10h] [rbp-E8h] unsigned int v33; // [rsp+18h] [rbp-E0h] int v34; // [rsp+1Ch] [rbp-DCh] __int128 v35; // [rsp+20h] [rbp-D8h] BYREF long long v36; // [rsp+30h] [rbp-C8h] long long ( *v37)(long long, long long, long long); // [rsp+38h] [rbp-C0h] long long v38; // [rsp+48h] [rbp-B0h] __int128 v39; // [rsp+50h] [rbp-A8h] BYREF long long v40; // [rsp+60h] [rbp-98h] long long ( *v41)(long long, long long, long long); // [rsp+68h] [rbp-90h] __int128 v42; // [rsp+70h] [rbp-88h] BYREF long long v43; // [rsp+80h] [rbp-78h] long long ( *v44)(long long, long long, long long); // [rsp+88h] [rbp-70h] __int128 v45; // [rsp+90h] [rbp-68h] BYREF long long v46; // [rsp+A0h] [rbp-58h] long long ( *v47)(long long, long long, long long); // [rsp+A8h] [rbp-50h] long long v48; // [rsp+B0h] [rbp-48h] const char *v49; // [rsp+B8h] [rbp-40h] long long v50; // [rsp+C0h] [rbp-38h] v3 = *(_QWORD *)(a1 + 16); v4 = *(long long ( **)(long long, long long, long long))(a1 + 24); v42 = 0LL; v43 = v3; v5 = cr_default_realloc; if ( v4 ) v5 = v4; v44 = v5; v45 = 0LL; v46 = v3; v47 = v5; v35 = 0LL; v36 = v3; v37 = v5; v39 = 0LL; v40 = v3; v41 = v5; if ( (unsigned int)unicode_case1(&v42, 3 * (unsigned int)(a2 != 0) + 1) || (unsigned int)cr_op((const char *)&v45, *((long long *)&v42 + 1), v42, *(_QWORD *)(a1 + 8), *(_DWORD *)a1, 1) || (unsigned int)cr_invert((int *)&v42) ) { v6 = 0LL; goto LABEL_7; } v11 = *((_QWORD *)&v42 + 1); v6 = 0LL; if ( (unsigned int)cr_op((const char *)&v39, *((long long *)&v42 + 1), v42, *(_QWORD *)(a1 + 8), *(_DWORD *)a1, 1) ) goto LABEL_7; v48 = v11; v49 = (const char *)a1; v32 = v45; v12 = -1; v13 = 0LL; v14 = 2136624; v15 = 65; v16 = 26; v38 = *((_QWORD *)&v45 + 1); LODWORD(v17) = 0; v18 = -1; LABEL_11: if ( (unsigned int)v13 < v32 ) { v50 = v13; v19 = *(_DWORD *)(v38 + 4LL * (unsigned int)v13); v33 = *(_DWORD *)(v38 + 4LL * (unsigned int)v13 + 4); while ( 1 ) { if ( v19 >= v33 ) { v13 = (unsigned int)(v50 + 2); goto LABEL_11; } while ( v19 < v15 || v19 >= v15 + v16 ) { v17 = (unsigned int)(v17 + 1); v14 = case_conv_table1[v17]; v15 = v14 >> 15; v16 = (v14 >> 8) & 0x7F; } v34 = v18; v20 = lre_case_folding_entry(v19, v17, v14, a2); if ( v12 != -1 ) { v21 = v34; if ( v34 == v20 ) { v20 = v12; goto LABEL_22; } v31 = v20; cr_add_interval((int *)&v35, v12, v34); v20 = v31; } v21 = v20; LABEL_22: v18 = v21 + 1; ++v19; v12 = v20; } } if ( v12 != -1 && (unsigned int)cr_add_interval((int *)&v35, v12, v18) ) { v6 = *((_QWORD *)&v35 + 1); goto LABEL_7; } v6 = *((_QWORD *)&v35 + 1); v22 = v35; v23 = 0; rqsort( *((long long *)&v35 + 1), (int)v35 / 2, 8LL, (long long ( *)(unsigned long long, unsigned long long, long long))point_cmp, 0LL); v24 = 0; v25 = v49; v26 = v48; while ( v23 < v22 ) { v27 = *(_DWORD *)(v6 + 4LL * v23); v28 = *(_DWORD *)(v6 + 4LL * v23 + 4); for ( i = v23 + 3; ; i += 2 ) { v23 = i - 1; if ( i - 1 >= v22 || *(_DWORD *)(v6 + 4LL * v23) > v28 ) break; if ( *(_DWORD *)(v6 + 4LL * i) > v28 ) v28 = *(_DWORD *)(v6 + 4LL * i); } *(_DWORD *)(v6 + 4LL * v24) = v27; *(_DWORD *)(v6 + 4LL * v24 + 4) = v28; v24 += 2; } *(_DWORD *)v25 = 0; v30 = *((_QWORD *)&v39 + 1); v7 = 0; if ( !(unsigned int)cr_op(v25, v6, v24, *((long long *)&v39 + 1), v39, 0) ) { v47(v46, v38, 0LL); v44(v43, v26, 0LL); v37(v36, v6, 0LL); v9 = v40; v8 = v30; goto LABEL_8; } LABEL_7: v7 = -1; v47(v46, *((_QWORD *)&v45 + 1), 0LL); v44(v43, *((_QWORD *)&v42 + 1), 0LL); v37(v36, v6, 0LL); v8 = *((_QWORD *)&v39 + 1); v9 = v40; LABEL_8: v41(v9, v8, 0LL); return v7; }
cr_regexp_canonicalize: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV EBP,ESI MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x10] MOV RCX,qword ptr [RDI + 0x18] XORPS XMM0,XMM0 LEA RDI,[RSP + 0x70] MOVAPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],RAX TEST RCX,RCX LEA RDX,[0x17f411] CMOVNZ RDX,RCX MOV qword ptr [RDI + 0x18],RDX MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOV qword ptr [RSP + 0xa0],RAX MOV qword ptr [RSP + 0xa8],RDX MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX XOR EAX,EAX TEST ESI,ESI SETNZ AL LEA ESI,[RAX + RAX*0x2] INC ESI CALL 0x00180441 TEST EAX,EAX JNZ 0x001801a1 MOV RSI,qword ptr [RSP + 0x78] MOV EDX,dword ptr [RSP + 0x70] MOV RCX,qword ptr [RBX + 0x8] MOV R8D,dword ptr [RBX] LEA RDI,[RSP + 0x90] PUSH 0x1 POP R9 CALL 0x0017f4b5 TEST EAX,EAX JNZ 0x001801a1 LEA RDI,[RSP + 0x70] CALL 0x0017f6a0 TEST EAX,EAX JZ 0x00180208 LAB_001801a1: XOR R15D,R15D LAB_001801a4: PUSH -0x1 POP RBX MOV RSI,qword ptr [RSP + 0x98] MOV RDI,qword ptr [RSP + 0xa0] XOR EDX,EDX CALL qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x78] MOV RDI,qword ptr [RSP + 0x80] XOR EDX,EDX CALL qword ptr [RSP + 0x88] MOV RDI,qword ptr [RSP + 0x30] MOV RSI,R15 XOR EDX,EDX CALL qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x58] MOV RDI,qword ptr [RSP + 0x60] LAB_001801ee: XOR EDX,EDX CALL qword ptr [RSP + 0x68] MOV EAX,EBX ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00180208: MOV R14,qword ptr [RSP + 0x78] MOV EDX,dword ptr [RSP + 0x70] MOV RCX,qword ptr [RBX + 0x8] MOV R8D,dword ptr [RBX] LEA RDI,[RSP + 0x50] PUSH 0x1 POP R9 MOV RSI,R14 CALL 0x0017f4b5 XOR R15D,R15D TEST EAX,EAX JNZ 0x001801a4 MOV dword ptr [RSP + 0x14],EBP MOV qword ptr [RSP + 0xb0],R14 MOV qword ptr [RSP + 0xb8],RBX MOV EAX,dword ptr [RSP + 0x90] MOV dword ptr [RSP + 0x10],EAX PUSH -0x1 POP RSI XOR EAX,EAX MOV R15D,0x209a30 PUSH 0x41 POP RBX PUSH 0x1a POP R13 MOV RCX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x48],RCX LEA RBP,[0x18a750] XOR R12D,R12D MOV EDX,ESI LAB_0018027e: CMP EAX,dword ptr [RSP + 0x10] JNC 0x0018032f MOV qword ptr [RSP + 0xc0],RAX MOV EAX,EAX MOV RCX,qword ptr [RSP + 0x48] MOV R14D,dword ptr [RCX + RAX*0x4] MOV EAX,dword ptr [RCX + RAX*0x4 + 0x4] MOV dword ptr [RSP + 0x18],EAX LAB_001802a3: CMP R14D,dword ptr [RSP + 0x18] JNC 0x0018031f LAB_001802aa: CMP R14D,EBX JC 0x001802b8 LEA EAX,[RBX + R13*0x1] CMP R14D,EAX JC 0x001802d3 LAB_001802b8: INC R12D MOV R15D,dword ptr [RBP + R12*0x4] MOV EBX,R15D SHR EBX,0xf MOV R13D,R15D SHR R13D,0x8 AND R13D,0x7f JMP 0x001802aa LAB_001802d3: MOV dword ptr [RSP + 0x1c],EDX MOV EDI,R14D MOV dword ptr [RSP + 0xc],ESI MOV ESI,R12D MOV EDX,R15D MOV ECX,dword ptr [RSP + 0x14] CALL 0x0017f233 MOV ESI,dword ptr [RSP + 0xc] CMP ESI,-0x1 JZ 0x00180314 MOV EDX,dword ptr [RSP + 0x1c] CMP EDX,EAX JNZ 0x00180302 MOV EAX,ESI JMP 0x00180316 LAB_00180302: LEA RDI,[RSP + 0x20] MOV dword ptr [RSP + 0xc],EAX CALL 0x00180099 MOV EAX,dword ptr [RSP + 0xc] LAB_00180314: MOV EDX,EAX LAB_00180316: INC EDX INC R14D MOV ESI,EAX JMP 0x001802a3 LAB_0018031f: MOV RAX,qword ptr [RSP + 0xc0] ADD EAX,0x2 JMP 0x0018027e LAB_0018032f: CMP ESI,-0x1 JZ 0x0018034c LEA RDI,[RSP + 0x20] CALL 0x00180099 TEST EAX,EAX JZ 0x0018034c MOV R15,qword ptr [RSP + 0x28] JMP 0x001801a4 LAB_0018034c: MOV R15,qword ptr [RSP + 0x28] MOV EBX,dword ptr [RSP + 0x20] PUSH 0x2 POP RCX MOV EAX,EBX CDQ IDIV ECX MOVSXD RSI,EAX LEA RCX,[0x1810f1] XOR R14D,R14D PUSH 0x8 POP RDX MOV RDI,R15 XOR R8D,R8D CALL 0x0011683c XOR EDX,EDX MOV RDI,qword ptr [RSP + 0xb8] MOV R12,qword ptr [RSP + 0xb0] LAB_0018038a: CMP R14D,EBX JNC 0x001803d7 MOV ECX,R14D MOV EAX,dword ptr [R15 + RCX*0x4] MOV ECX,dword ptr [R15 + RCX*0x4 + 0x4] ADD R14D,0x3 MOV ESI,R14D LAB_001803a2: LEA R14D,[RSI + -0x1] CMP R14D,EBX JNC 0x001803c7 MOV R8D,R14D CMP dword ptr [R15 + R8*0x4],ECX JA 0x001803c7 MOV R8D,ESI MOV R8D,dword ptr [R15 + R8*0x4] CMP R8D,ECX CMOVA ECX,R8D ADD ESI,0x2 JMP 0x001803a2 LAB_001803c7: MOV ESI,EDX MOV dword ptr [R15 + RSI*0x4],EAX MOV dword ptr [R15 + RSI*0x4 + 0x4],ECX ADD EDX,0x2 JMP 0x0018038a LAB_001803d7: AND dword ptr [RDI],0x0 MOV R14,qword ptr [RSP + 0x58] MOV R8D,dword ptr [RSP + 0x50] XOR EBX,EBX MOV RSI,R15 MOV RCX,R14 XOR R9D,R9D CALL 0x0017f4b5 TEST EAX,EAX JNZ 0x001801a4 MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0x48] XOR EDX,EDX CALL qword ptr [RSP + 0xa8] MOV RDI,qword ptr [RSP + 0x80] MOV RSI,R12 XOR EDX,EDX CALL qword ptr [RSP + 0x88] MOV RDI,qword ptr [RSP + 0x30] MOV RSI,R15 XOR EDX,EDX CALL qword ptr [RSP + 0x38] MOV RDI,qword ptr [RSP + 0x60] MOV RSI,R14 JMP 0x001801ee
int4 cr_regexp_canonicalize(int4 *param_1,int param_2) { uint uVar1; int8 uVar2; int iVar3; uint uVar4; int iVar5; int iVar6; int iVar8; ulong uVar10; int4 uVar11; uint uVar12; int8 uVar13; uint uVar14; uint uVar15; uint uVar16; long lVar17; int8 local_d8; long lStack_d0; int8 local_c8; code *local_c0; long local_b0; ulong local_a8; int8 uStack_a0; int8 local_98; code *local_90; ulong local_88; int8 uStack_80; int8 local_78; code *local_70; int8 local_68; long lStack_60; int8 local_58; code *local_50; int8 local_48; int4 *local_40; ulong local_38; ulong uVar7; int iVar9; local_c8 = *(int8 *)(param_1 + 4); local_88 = 0; uStack_80 = 0; local_c0 = cr_default_realloc; if (*(code **)(param_1 + 6) != (code *)0x0) { local_c0 = *(code **)(param_1 + 6); } local_68 = 0; lStack_60 = 0; local_d8 = 0; lStack_d0 = 0; local_a8 = 0; uStack_a0 = 0; local_98 = local_c8; local_90 = local_c0; local_78 = local_c8; local_70 = local_c0; local_58 = local_c8; local_50 = local_c0; iVar3 = unicode_case1(&local_88,(param_2 != 0) * '\x03' + '\x01'); if (((iVar3 == 0) && (iVar3 = cr_op(&local_68,uStack_80,local_88 & 0xffffffff,*(int8 *)(param_1 + 2),*param_1 ,1), iVar3 == 0)) && (iVar3 = cr_invert(&local_88), uVar13 = uStack_80, iVar3 == 0)) { iVar3 = cr_op(&local_a8,uStack_80,local_88 & 0xffffffff,*(int8 *)(param_1 + 2),*param_1,1) ; lVar17 = 0; if (iVar3 == 0) { local_48 = uVar13; uVar15 = (uint)local_68; iVar3 = -1; uVar16 = 0x209a30; uVar12 = 0x41; uVar14 = 0x1a; local_b0 = lStack_60; uVar10 = 0; iVar8 = -1; uVar4 = 0; local_40 = param_1; while (uVar7 = (ulong)uVar4, uVar4 < uVar15) { uVar1 = *(uint *)(local_b0 + 4 + uVar7 * 4); local_38 = uVar7; for (uVar4 = *(uint *)(local_b0 + uVar7 * 4); uVar4 < uVar1; uVar4 = uVar4 + 1) { while ((uVar4 < uVar12 || (uVar12 + uVar14 <= uVar4))) { uVar10 = (ulong)((int)uVar10 + 1); uVar16 = (&case_conv_table1)[uVar10]; uVar14 = uVar16 >> 8 & 0x7f; uVar12 = uVar16 >> 0xf; } iVar5 = lre_case_folding_entry(uVar4,uVar10,uVar16,param_2); iVar6 = iVar5; iVar9 = iVar5; if ((iVar3 != -1) && (iVar6 = iVar3, iVar9 = iVar8, iVar8 != iVar5)) { cr_add_interval(&local_d8); iVar6 = iVar5; iVar9 = iVar5; } iVar8 = iVar9 + 1; iVar3 = iVar6; } uVar4 = (int)local_38 + 2; } if ((iVar3 == -1) || (iVar3 = cr_add_interval(&local_d8), lVar17 = lStack_d0, iVar3 == 0)) { lVar17 = lStack_d0; uVar12 = (uint)local_d8; uVar16 = 0; rqsort(lStack_d0,(long)((int)(uint)local_d8 / 2),8,point_cmp,0); uVar2 = local_48; uVar13 = uStack_a0; uVar10 = 0; while (uVar16 < uVar12) { uVar7 = (ulong)uVar16; uVar14 = *(uint *)(lVar17 + 4 + uVar7 * 4); uVar15 = uVar16 + 3; while ((uVar16 = uVar15 - 1, uVar16 < uVar12 && (*(uint *)(lVar17 + (ulong)uVar16 * 4) <= uVar14))) { uVar16 = *(uint *)(lVar17 + (ulong)uVar15 * 4); if (uVar14 < uVar16) { uVar14 = uVar16; } uVar15 = uVar15 + 2; } *(int4 *)(lVar17 + uVar10 * 4) = *(int4 *)(lVar17 + uVar7 * 4); *(uint *)(lVar17 + 4 + uVar10 * 4) = uVar14; uVar10 = (ulong)((int)uVar10 + 2); } *local_40 = 0; uVar11 = 0; iVar3 = cr_op(local_40,lVar17,uVar10,uStack_a0,local_a8 & 0xffffffff,0); if (iVar3 == 0) { (*local_50)(local_58,local_b0,0); (*local_70)(local_78,uVar2,0); (*local_c0)(local_c8,lVar17,0); goto LAB_001801ee; } } } } else { lVar17 = 0; } uVar11 = 0xffffffff; (*local_50)(local_58,lStack_60,0); (*local_70)(local_78,uStack_80,0); (*local_c0)(local_c8,lVar17,0); uVar13 = uStack_a0; LAB_001801ee: (*local_90)(local_98,uVar13,0); return uVar11; }
39,218
my_strcasecmp_mb
eloqsql/strings/ctype-mb.c
int my_strcasecmp_mb(CHARSET_INFO * cs,const char *s, const char *t) { register uint32 l; register const uchar *map=cs->to_upper; while (*s && *t) { /* Pointing after the '\0' is safe here. */ if ((l=my_ismbchar(cs, s, s + cs->mbmaxlen))) { while (l--) if (*s++ != *t++) return 1; } else if (my_ci_charlen(cs, (const uchar *) t, (const uchar *) t + cs->mbmaxlen) > 1) return 1; else if (map[(uchar) *s++] != map[(uchar) *t++]) return 1; } /* At least one of '*s' and '*t' is zero here. */ return (*t != *s); }
O3
c
my_strcasecmp_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %rbx movb (%rsi), %cl testb %cl, %cl je 0x36553 cmpb $0x0, (%rbx) je 0x36555 movq %rsi, %r15 movq %rdi, %r14 movq 0x50(%rdi), %r12 movl 0x9c(%r14), %edx addq %r15, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %r15, %rsi callq *0xc0(%rax) cmpl $0x2, %eax jge 0x36518 movl 0x9c(%r14), %edx addq %rbx, %rdx movq 0xb8(%r14), %rax movq %r14, %rdi movq %rbx, %rsi callq *0xc0(%rax) movl %eax, %ecx movl $0x1, %eax cmpl $0x1, %ecx jg 0x36563 movzbl (%r15), %ecx movb (%r12,%rcx), %cl movzbl (%rbx), %edx cmpb (%r12,%rdx), %cl jne 0x36563 incq %r15 incq %rbx jmp 0x36541 movl %eax, %eax leaq (%r15,%rax), %rcx leaq (%rbx,%rax), %rdx xorl %esi, %esi cmpl %esi, %eax je 0x3653b movb (%r15,%rsi), %dil leaq 0x1(%rsi), %r8 cmpb (%rbx,%rsi), %dil movq %r8, %rsi je 0x36524 jmp 0x3655e movq %rcx, %r15 movq %rdx, %rbx movb (%r15), %cl testb %cl, %cl je 0x36553 cmpb $0x0, (%rbx) jne 0x364b4 jmp 0x36555 xorl %ecx, %ecx xorl %eax, %eax cmpb %cl, (%rbx) setne %al jmp 0x36563 movl $0x1, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_strcasecmp_mb: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdx mov cl, [rsi] test cl, cl jz loc_36553 cmp byte ptr [rbx], 0 jz loc_36555 mov r15, rsi mov r14, rdi mov r12, [rdi+50h] loc_364B4: mov edx, [r14+9Ch] add rdx, r15 mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r15 call qword ptr [rax+0C0h] cmp eax, 2 jge short loc_36518 mov edx, [r14+9Ch] add rdx, rbx mov rax, [r14+0B8h] mov rdi, r14 mov rsi, rbx call qword ptr [rax+0C0h] mov ecx, eax mov eax, 1 cmp ecx, 1 jg short loc_36563 movzx ecx, byte ptr [r15] mov cl, [r12+rcx] movzx edx, byte ptr [rbx] cmp cl, [r12+rdx] jnz short loc_36563 inc r15 inc rbx jmp short loc_36541 loc_36518: mov eax, eax lea rcx, [r15+rax] lea rdx, [rbx+rax] xor esi, esi loc_36524: cmp eax, esi jz short loc_3653B mov dil, [r15+rsi] lea r8, [rsi+1] cmp dil, [rbx+rsi] mov rsi, r8 jz short loc_36524 jmp short loc_3655E loc_3653B: mov r15, rcx mov rbx, rdx loc_36541: mov cl, [r15] test cl, cl jz short loc_36553 cmp byte ptr [rbx], 0 jnz loc_364B4 jmp short loc_36555 loc_36553: xor ecx, ecx loc_36555: xor eax, eax cmp [rbx], cl setnz al jmp short loc_36563 loc_3655E: mov eax, 1 loc_36563: pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BOOL8 my_strcasecmp_mb(long long a1, unsigned __int8 *a2, _BYTE *a3) { _BYTE *v3; // rbx unsigned __int8 v4; // cl unsigned __int8 *v5; // r15 long long v6; // r12 int v7; // eax int v8; // ecx _BOOL8 result; // rax long long i; // rsi v3 = a3; v4 = *a2; if ( *a2 ) { if ( *a3 ) { v5 = a2; v6 = *(_QWORD *)(a1 + 80); do { v7 = (*(long long ( **)(long long, unsigned __int8 *, unsigned __int8 *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v5, &v5[*(unsigned int *)(a1 + 156)]); if ( v7 >= 2 ) { for ( i = 0LL; v7 != (_DWORD)i; ++i ) { if ( v5[i] != v3[i] ) return 1LL; } v5 += (unsigned int)v7; v3 += (unsigned int)v7; } else { v8 = (*(long long ( **)(long long, _BYTE *, _BYTE *))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v3, &v3[*(unsigned int *)(a1 + 156)]); result = 1LL; if ( v8 > 1 || *(_BYTE *)(v6 + *v5) != *(_BYTE *)(v6 + (unsigned __int8)*v3) ) return result; ++v5; ++v3; } v4 = *v5; if ( !*v5 ) goto LABEL_16; } while ( *v3 ); } } else { LABEL_16: v4 = 0; } return *v3 != v4; }
my_strcasecmp_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDX MOV CL,byte ptr [RSI] TEST CL,CL JZ 0x00136553 CMP byte ptr [RBX],0x0 JZ 0x00136555 MOV R15,RSI MOV R14,RDI MOV R12,qword ptr [RDI + 0x50] LAB_001364b4: MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,R15 MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 JGE 0x00136518 MOV EDX,dword ptr [R14 + 0x9c] ADD RDX,RBX MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,RBX CALL qword ptr [RAX + 0xc0] MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x1 JG 0x00136563 MOVZX ECX,byte ptr [R15] MOV CL,byte ptr [R12 + RCX*0x1] MOVZX EDX,byte ptr [RBX] CMP CL,byte ptr [R12 + RDX*0x1] JNZ 0x00136563 INC R15 INC RBX JMP 0x00136541 LAB_00136518: MOV EAX,EAX LEA RCX,[R15 + RAX*0x1] LEA RDX,[RBX + RAX*0x1] XOR ESI,ESI LAB_00136524: CMP EAX,ESI JZ 0x0013653b MOV DIL,byte ptr [R15 + RSI*0x1] LEA R8,[RSI + 0x1] CMP DIL,byte ptr [RBX + RSI*0x1] MOV RSI,R8 JZ 0x00136524 JMP 0x0013655e LAB_0013653b: MOV R15,RCX MOV RBX,RDX LAB_00136541: MOV CL,byte ptr [R15] TEST CL,CL JZ 0x00136553 CMP byte ptr [RBX],0x0 JNZ 0x001364b4 JMP 0x00136555 LAB_00136553: XOR ECX,ECX LAB_00136555: XOR EAX,EAX CMP byte ptr [RBX],CL SETNZ AL JMP 0x00136563 LAB_0013655e: MOV EAX,0x1 LAB_00136563: POP RBX POP R12 POP R14 POP R15 POP RBP RET
bool my_strcasecmp_mb(long param_1,byte *param_2,byte *param_3) { byte *pbVar1; byte *pbVar2; long lVar3; uint uVar4; int iVar5; byte bVar6; byte *pbVar7; long lVar8; byte *pbVar9; bVar6 = *param_2; if (bVar6 == 0) { LAB_00136553: bVar6 = 0; } else if (*param_3 != 0) { lVar3 = *(long *)(param_1 + 0x50); pbVar7 = param_3; do { uVar4 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,param_2,param_2 + *(uint *)(param_1 + 0x9c)); if ((int)uVar4 < 2) { iVar5 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,pbVar7,pbVar7 + *(uint *)(param_1 + 0x9c)); if (1 < iVar5) { return true; } if (*(char *)(lVar3 + (ulong)*param_2) != *(char *)(lVar3 + (ulong)*pbVar7)) { return true; } pbVar9 = param_2 + 1; param_3 = pbVar7 + 1; } else { pbVar9 = param_2 + uVar4; param_3 = pbVar7 + uVar4; lVar8 = 0; while (uVar4 != (uint)lVar8) { pbVar1 = param_2 + lVar8; pbVar2 = pbVar7 + lVar8; lVar8 = lVar8 + 1; if (*pbVar1 != *pbVar2) { return true; } } } bVar6 = *pbVar9; if (bVar6 == 0) goto LAB_00136553; pbVar7 = param_3; param_2 = pbVar9; } while (*param_3 != 0); } return *param_3 != bVar6; }
39,219
gc_scan
bluesky950520[P]quickjs/quickjs.c
static void gc_scan(JSRuntime *rt) { struct list_head *el; JSGCObjectHeader *p; /* keep the objects with a refcount > 0 and their children. */ list_for_each(el, &rt->gc_obj_list) { p = list_entry(el, JSGCObjectHeader, link); assert(p->ref_count > 0); p->mark = 0; /* reset the mark for the next GC call */ mark_children(rt, p, gc_scan_incref_child); } /* restore the refcount of the objects to be deleted. */ list_for_each(el, &rt->tmp_obj_list) { p = list_entry(el, JSGCObjectHeader, link); mark_children(rt, p, gc_scan_incref_child2); } }
O0
c
gc_scan: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq 0xa0(%rax), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx addq $0x98, %rcx cmpq %rcx, %rax je 0x2ad82 movq 0x8(%rsp), %rax addq $-0x8, %rax movq %rax, (%rsp) movq (%rsp), %rax movb 0x4(%rax), %cl andb $0xf, %cl orb $0x0, %cl movb %cl, 0x4(%rax) movq 0x10(%rsp), %rdi movq (%rsp), %rsi leaq 0x34ec3(%rip), %rdx # 0x5fc30 callq 0x5f210 movq 0x8(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) jmp 0x2ad2a movq 0x10(%rsp), %rax movq 0xc0(%rax), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx addq $0xb8, %rcx cmpq %rcx, %rax je 0x2addb movq 0x8(%rsp), %rax addq $-0x8, %rax movq %rax, (%rsp) movq 0x10(%rsp), %rdi movq (%rsp), %rsi leaq 0x34eda(%rip), %rdx # 0x5fca0 callq 0x5f210 movq 0x8(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) jmp 0x2ad93 addq $0x18, %rsp retq
gc_scan: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov rax, [rax+0A0h] mov [rsp+18h+var_10], rax loc_2AD2A: mov rax, [rsp+18h+var_10] mov rcx, [rsp+18h+var_8] add rcx, 98h cmp rax, rcx jz short loc_2AD82 mov rax, [rsp+18h+var_10] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+18h+var_18], rax mov rax, [rsp+18h+var_18] mov cl, [rax+4] and cl, 0Fh or cl, 0 mov [rax+4], cl mov rdi, [rsp+18h+var_8] mov rsi, [rsp+18h+var_18] lea rdx, gc_scan_incref_child call mark_children mov rax, [rsp+18h+var_10] mov rax, [rax+8] mov [rsp+18h+var_10], rax jmp short loc_2AD2A loc_2AD82: mov rax, [rsp+18h+var_8] mov rax, [rax+0C0h] mov [rsp+18h+var_10], rax loc_2AD93: mov rax, [rsp+18h+var_10] mov rcx, [rsp+18h+var_8] add rcx, 0B8h cmp rax, rcx jz short loc_2ADDB mov rax, [rsp+18h+var_10] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+18h+var_18], rax mov rdi, [rsp+18h+var_8] mov rsi, [rsp+18h+var_18] lea rdx, gc_scan_incref_child2 call mark_children mov rax, [rsp+18h+var_10] mov rax, [rax+8] mov [rsp+18h+var_10], rax jmp short loc_2AD93 loc_2ADDB: add rsp, 18h retn
long long gc_scan(long long a1) { long long result; // rax long long i; // [rsp+8h] [rbp-10h] long long j; // [rsp+8h] [rbp-10h] for ( i = *(_QWORD *)(a1 + 160); i != a1 + 152; i = *(_QWORD *)(i + 8) ) { *(_BYTE *)(i - 8 + 4) &= 0xFu; mark_children(a1, i - 8, gc_scan_incref_child); } for ( j = *(_QWORD *)(a1 + 192); ; j = *(_QWORD *)(j + 8) ) { result = j; if ( j == a1 + 184 ) break; mark_children(a1, j - 8, gc_scan_incref_child2); } return result; }
gc_scan: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RSP + 0x8],RAX LAB_0012ad2a: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] ADD RCX,0x98 CMP RAX,RCX JZ 0x0012ad82 MOV RAX,qword ptr [RSP + 0x8] ADD RAX,-0x8 MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP] MOV CL,byte ptr [RAX + 0x4] AND CL,0xf OR CL,0x0 MOV byte ptr [RAX + 0x4],CL MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP] LEA RDX,[0x15fc30] CALL 0x0015f210 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX JMP 0x0012ad2a LAB_0012ad82: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0xc0] MOV qword ptr [RSP + 0x8],RAX LAB_0012ad93: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] ADD RCX,0xb8 CMP RAX,RCX JZ 0x0012addb MOV RAX,qword ptr [RSP + 0x8] ADD RAX,-0x8 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP] LEA RDX,[0x15fca0] CALL 0x0015f210 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX JMP 0x0012ad93 LAB_0012addb: ADD RSP,0x18 RET
void gc_scan(long param_1) { long local_10; for (local_10 = *(long *)(param_1 + 0xa0); local_10 != param_1 + 0x98; local_10 = *(long *)(local_10 + 8)) { *(byte *)(local_10 + -4) = *(byte *)(local_10 + -4) & 0xf; mark_children(param_1,local_10 + -8,gc_scan_incref_child); } for (local_10 = *(long *)(param_1 + 0xc0); local_10 != param_1 + 0xb8; local_10 = *(long *)(local_10 + 8)) { mark_children(param_1,local_10 + -8,gc_scan_incref_child2); } return; }
39,220
my_wildcmp_unicode_impl
eloqsql/strings/ctype-utf8.c
static int my_wildcmp_unicode_impl(CHARSET_INFO *cs, const char *str,const char *str_end, const char *wildstr,const char *wildend, int escape, int w_one, int w_many, MY_UNICASE_INFO *weights, int recurse_level) { int result= -1; /* Not found, using wildcards */ my_wc_t s_wc, w_wc; int scan; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; if (my_string_stack_guard && my_string_stack_guard(recurse_level)) return 1; while (wildstr != wildend) { while (1) { my_bool escaped= 0; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; if (w_wc == (my_wc_t) w_many) { result= 1; /* Found an anchor char */ break; } wildstr+= scan; if (w_wc == (my_wc_t) escape && wildstr < wildend) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; escaped= 1; } if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; str+= scan; if (!escaped && w_wc == (my_wc_t) w_one) { result= 1; /* Found an anchor char */ } else { if (weights) { my_tosort_unicode(weights, &s_wc, cs->state); my_tosort_unicode(weights, &w_wc, cs->state); } if (s_wc != w_wc) return 1; /* No match */ } if (wildstr == wildend) return (str != str_end); /* Match if both are at end */ } if (w_wc == (my_wc_t) w_many) { /* Found w_many */ /* Remove any '%' and '_' from the wild search string */ for ( ; wildstr != wildend ; ) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; if (w_wc == (my_wc_t) w_many) { wildstr+= scan; continue; } if (w_wc == (my_wc_t) w_one) { wildstr+= scan; if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; str+= scan; continue; } break; /* Not a wild character */ } if (wildstr == wildend) return 0; /* Ok if w_many is last */ if (str == str_end) return -1; if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; if (w_wc == (my_wc_t) escape) { if (wildstr < wildend) { if ((scan= mb_wc(cs, &w_wc, (const uchar*)wildstr, (const uchar*)wildend)) <= 0) return 1; wildstr+= scan; } } while (1) { /* Skip until the first character from wildstr is found */ while (str != str_end) { if ((scan= mb_wc(cs, &s_wc, (const uchar*)str, (const uchar*)str_end)) <= 0) return 1; if (weights) { my_tosort_unicode(weights, &s_wc, cs->state); my_tosort_unicode(weights, &w_wc, cs->state); } if (s_wc == w_wc) break; str+= scan; } if (str == str_end) return -1; str+= scan; result= my_wildcmp_unicode_impl(cs, str, str_end, wildstr, wildend, escape, w_one, w_many, weights, recurse_level + 1); if (result <= 0) return result; } } } return (str != str_end ? 1 : 0); }
O3
c
my_wildcmp_unicode_impl: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movl %r9d, -0x54(%rbp) movq %r8, %r12 movq %rcx, %r13 movq %rdx, -0x50(%rbp) movq %rsi, -0x38(%rbp) movq %rdi, %r15 movl 0x28(%rbp), %eax movq %rax, -0x60(%rbp) movq 0xb8(%rdi), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) leaq 0x322eef(%rip), %rax # 0x37a110 movq (%rax), %rax testq %rax, %rax je 0x5723b movl 0x28(%rbp), %edi callq *%rax movl $0x1, %ebx testl %eax, %eax jne 0x575cb cmpq %r12, %r13 je 0x573ca movl 0x18(%rbp), %eax movl 0x10(%rbp), %ecx cltq movq %rax, -0x78(%rbp) movslq -0x54(%rbp), %rax movq %rax, -0x70(%rbp) movslq %ecx, %rax movq %rax, -0x68(%rbp) movq %r15, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx movq -0x40(%rbp), %r14 callq *%r14 testl %eax, %eax jle 0x575c6 movq -0x30(%rbp), %rcx cmpq -0x78(%rbp), %rcx je 0x573dc movl %eax, %eax addq %rax, %r13 cmpq -0x70(%rbp), %rcx jne 0x572e2 cmpq %r12, %r13 jae 0x572e2 movq %r15, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0x575c6 movl %eax, %ebx movq %r15, %rdi leaq -0x48(%rbp), %rsi movq %r14, %rax movq -0x38(%rbp), %r14 movq %r14, %rdx movq -0x50(%rbp), %rcx callq *%rax testl %eax, %eax jle 0x575c6 movl %ebx, %ecx addq %rcx, %r13 movl %eax, %eax addq %rax, %r14 movq %r14, -0x38(%rbp) jmp 0x57316 movq %r15, %rdi leaq -0x48(%rbp), %rsi movq -0x38(%rbp), %rbx movq %rbx, %rdx movq -0x50(%rbp), %rcx callq *%r14 testl %eax, %eax jle 0x575c6 movl %eax, %eax addq %rax, %rbx movq %rbx, -0x38(%rbp) movq -0x68(%rbp), %rax cmpq %rax, -0x30(%rbp) je 0x573c1 movq -0x48(%rbp), %rax movq 0x20(%rbp), %r8 testq %r8, %r8 je 0x573af movl 0xc(%r15), %ecx movq (%r8), %rdx movl $0xfffd, %esi # imm = 0xFFFD cmpq %rdx, %rax ja 0x57364 movq 0x8(%r8), %rsi movq %rax, %rdi shrq $0x8, %rdi movq (%rsi,%rdi,8), %rsi testq %rsi, %rsi je 0x5736b xorl %edi, %edi testw %cx, %cx setns %dil movzbl %al, %eax leaq (%rax,%rax,2), %rax leaq (%rsi,%rax,4), %rax movl 0x4(%rax,%rdi,4), %esi movq %rsi, -0x48(%rbp) movq %rsi, %rax movq -0x30(%rbp), %rsi movl $0xfffd, %edi # imm = 0xFFFD cmpq %rdx, %rsi ja 0x573a6 movq 0x8(%r8), %rdx movq %rsi, %rdi shrq $0x8, %rdi movq (%rdx,%rdi,8), %rdx testq %rdx, %rdx je 0x573b3 xorl %edi, %edi testw %cx, %cx setns %dil movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx leaq (%rdx,%rcx,4), %rcx movl 0x4(%rcx,%rdi,4), %edi movq %rdi, -0x30(%rbp) movq %rdi, %rsi jmp 0x573b3 movq -0x30(%rbp), %rsi movl $0x1, %ebx cmpq %rsi, %rax jne 0x575cb cmpq %r12, %r13 jne 0x5725f xorl %ebx, %ebx movq -0x50(%rbp), %rax cmpq %rax, -0x38(%rbp) setne %bl jmp 0x575cb xorl %ebx, %ebx cmpq %r12, %r13 je 0x575cb movq %r15, %rdi leaq -0x30(%rbp), %rsi movq %r13, %rdx movq %r12, %rcx callq *%r14 testl %eax, %eax jle 0x575c6 movl %eax, %r14d movq -0x30(%rbp), %rax cmpq -0x78(%rbp), %rax jne 0x57420 movl %r14d, %eax addq %rax, %r13 cmpq %r12, %r13 movq -0x40(%rbp), %r14 jne 0x573e7 jmp 0x575cb cmpq -0x68(%rbp), %rax jne 0x5744e movq %r15, %rdi leaq -0x48(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x50(%rbp), %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0x575c6 movl %r14d, %ecx addq %rcx, %r13 movl %eax, %eax addq %rax, -0x38(%rbp) jmp 0x57412 movq -0x50(%rbp), %r14 cmpq %r14, -0x38(%rbp) je 0x575dc leaq -0x30(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0x575c6 movl %eax, %eax addq %rax, %r13 movq -0x70(%rbp), %rax cmpq %rax, -0x30(%rbp) jne 0x574a5 cmpq %r12, %r13 jae 0x574a5 leaq -0x30(%rbp), %rsi movq %r15, %rdi movq %r13, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0x575c6 movl %eax, %eax addq %rax, %r13 movq -0x60(%rbp), %rax incl %eax movq %rax, -0x60(%rbp) movq -0x38(%rbp), %rbx cmpq %r14, %rbx je 0x575dc movq %r15, %rdi leaq -0x48(%rbp), %rsi movq %rbx, %rdx movq %r14, %rcx callq *-0x40(%rbp) testl %eax, %eax jle 0x575c6 movq -0x48(%rbp), %rcx movq 0x20(%rbp), %rsi testq %rsi, %rsi je 0x5757a movl 0xc(%r15), %edx movq (%rsi), %rsi movl $0xfffd, %edi # imm = 0xFFFD cmpq %rsi, %rcx ja 0x57528 movq 0x20(%rbp), %rdi movq 0x8(%rdi), %rdi movq %rcx, %r8 shrq $0x8, %r8 movq (%rdi,%r8,8), %rdi testq %rdi, %rdi je 0x5752f xorl %r8d, %r8d testw %dx, %dx setns %r8b movzbl %cl, %ecx leaq (%rcx,%rcx,2), %rcx leaq (%rdi,%rcx,4), %rcx movl 0x4(%rcx,%r8,4), %edi movq %rdi, -0x48(%rbp) movq %rdi, %rcx movq -0x30(%rbp), %rdi movl $0xfffd, %r8d # imm = 0xFFFD cmpq %rsi, %rdi ja 0x57571 movq 0x20(%rbp), %rsi movq 0x8(%rsi), %rsi movq %rdi, %r8 shrq $0x8, %r8 movq (%rsi,%r8,8), %rsi testq %rsi, %rsi je 0x5757e xorl %r8d, %r8d testw %dx, %dx setns %r8b movzbl %dil, %edx leaq (%rdx,%rdx,2), %rdx leaq (%rsi,%rdx,4), %rdx movl 0x4(%rdx,%r8,4), %r8d movq %r8, -0x30(%rbp) movq %r8, %rdi jmp 0x5757e movq -0x30(%rbp), %rdi movl %eax, %eax addq %rax, %rbx cmpq %rdi, %rcx jne 0x574b3 movq %r15, %rdi movq %rbx, -0x38(%rbp) movq %rbx, %rsi movq %r14, %rdx movq %r13, %rcx movq %r12, %r8 movl -0x54(%rbp), %r9d pushq -0x60(%rbp) pushq 0x20(%rbp) movl 0x18(%rbp), %eax pushq %rax movl 0x10(%rbp), %eax pushq %rax callq 0x571de addq $0x20, %rsp movl %eax, %ebx testl %eax, %eax jg 0x574af jmp 0x575cb movl $0x1, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x575cb
my_wildcmp_unicode_impl: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_54], r9d mov r12, r8 mov r13, rcx mov [rbp+var_50], rdx mov [rbp+var_38], rsi mov r15, rdi mov eax, [rbp+arg_18] mov [rbp+var_60], rax mov rax, [rdi+0B8h] mov rax, [rax+28h] mov [rbp+var_40], rax lea rax, my_string_stack_guard mov rax, [rax] test rax, rax jz short loc_5723B mov edi, [rbp+arg_18] call rax mov ebx, 1 test eax, eax jnz loc_575CB loc_5723B: cmp r13, r12 jz loc_573CA mov eax, [rbp+arg_8] mov ecx, [rbp+arg_0] cdqe mov [rbp+var_78], rax movsxd rax, [rbp+var_54] mov [rbp+var_70], rax movsxd rax, ecx mov [rbp+var_68], rax loc_5725F: mov rdi, r15 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 mov r14, [rbp+var_40] call r14 test eax, eax jle loc_575C6 mov rcx, [rbp+var_30] cmp rcx, [rbp+var_78] jz loc_573DC mov eax, eax add r13, rax cmp rcx, [rbp+var_70] jnz short loc_572E2 cmp r13, r12 jnb short loc_572E2 mov rdi, r15 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_575C6 mov ebx, eax mov rdi, r15 lea rsi, [rbp+var_48] mov rax, r14 mov r14, [rbp+var_38] mov rdx, r14 mov rcx, [rbp+var_50] call rax test eax, eax jle loc_575C6 mov ecx, ebx add r13, rcx mov eax, eax add r14, rax mov [rbp+var_38], r14 jmp short loc_57316 loc_572E2: mov rdi, r15 lea rsi, [rbp+var_48] mov rbx, [rbp+var_38] mov rdx, rbx mov rcx, [rbp+var_50] call r14 test eax, eax jle loc_575C6 mov eax, eax add rbx, rax mov [rbp+var_38], rbx mov rax, [rbp+var_68] cmp [rbp+var_30], rax jz loc_573C1 loc_57316: mov rax, [rbp+var_48] mov r8, [rbp+arg_10] test r8, r8 jz loc_573AF mov ecx, [r15+0Ch] mov rdx, [r8] mov esi, 0FFFDh cmp rax, rdx ja short loc_57364 mov rsi, [r8+8] mov rdi, rax shr rdi, 8 mov rsi, [rsi+rdi*8] test rsi, rsi jz short loc_5736B xor edi, edi test cx, cx setns dil movzx eax, al lea rax, [rax+rax*2] lea rax, [rsi+rax*4] mov esi, [rax+rdi*4+4] loc_57364: mov [rbp+var_48], rsi mov rax, rsi loc_5736B: mov rsi, [rbp+var_30] mov edi, 0FFFDh cmp rsi, rdx ja short loc_573A6 mov rdx, [r8+8] mov rdi, rsi shr rdi, 8 mov rdx, [rdx+rdi*8] test rdx, rdx jz short loc_573B3 xor edi, edi test cx, cx setns dil movzx ecx, sil lea rcx, [rcx+rcx*2] lea rcx, [rdx+rcx*4] mov edi, [rcx+rdi*4+4] loc_573A6: mov [rbp+var_30], rdi mov rsi, rdi jmp short loc_573B3 loc_573AF: mov rsi, [rbp+var_30] loc_573B3: mov ebx, 1 cmp rax, rsi jnz loc_575CB loc_573C1: cmp r13, r12 jnz loc_5725F loc_573CA: xor ebx, ebx mov rax, [rbp+var_50] cmp [rbp+var_38], rax setnz bl jmp loc_575CB loc_573DC: xor ebx, ebx cmp r13, r12 jz loc_575CB loc_573E7: mov rdi, r15 lea rsi, [rbp+var_30] mov rdx, r13 mov rcx, r12 call r14 test eax, eax jle loc_575C6 mov r14d, eax mov rax, [rbp+var_30] cmp rax, [rbp+var_78] jnz short loc_57420 mov eax, r14d add r13, rax loc_57412: cmp r13, r12 mov r14, [rbp+var_40] jnz short loc_573E7 jmp loc_575CB loc_57420: cmp rax, [rbp+var_68] jnz short loc_5744E mov rdi, r15 lea rsi, [rbp+var_48] mov rdx, [rbp+var_38] mov rcx, [rbp+var_50] call [rbp+var_40] test eax, eax jle loc_575C6 mov ecx, r14d add r13, rcx mov eax, eax add [rbp+var_38], rax jmp short loc_57412 loc_5744E: mov r14, [rbp+var_50] cmp [rbp+var_38], r14 jz loc_575DC lea rsi, [rbp+var_30] mov rdi, r15 mov rdx, r13 mov rcx, r12 call [rbp+var_40] test eax, eax jle loc_575C6 mov eax, eax add r13, rax mov rax, [rbp+var_70] cmp [rbp+var_30], rax jnz short loc_574A5 cmp r13, r12 jnb short loc_574A5 lea rsi, [rbp+var_30] mov rdi, r15 mov rdx, r13 mov rcx, r12 call [rbp+var_40] test eax, eax jle loc_575C6 mov eax, eax add r13, rax loc_574A5: mov rax, [rbp+var_60] inc eax mov [rbp+var_60], rax loc_574AF: mov rbx, [rbp+var_38] loc_574B3: cmp rbx, r14 jz loc_575DC mov rdi, r15 lea rsi, [rbp+var_48] mov rdx, rbx mov rcx, r14 call [rbp+var_40] test eax, eax jle loc_575C6 mov rcx, [rbp+var_48] mov rsi, [rbp+arg_10] test rsi, rsi jz loc_5757A mov edx, [r15+0Ch] mov rsi, [rsi] mov edi, 0FFFDh cmp rcx, rsi ja short loc_57528 mov rdi, [rbp+arg_10] mov rdi, [rdi+8] mov r8, rcx shr r8, 8 mov rdi, [rdi+r8*8] test rdi, rdi jz short loc_5752F xor r8d, r8d test dx, dx setns r8b movzx ecx, cl lea rcx, [rcx+rcx*2] lea rcx, [rdi+rcx*4] mov edi, [rcx+r8*4+4] loc_57528: mov [rbp+var_48], rdi mov rcx, rdi loc_5752F: mov rdi, [rbp+var_30] mov r8d, 0FFFDh cmp rdi, rsi ja short loc_57571 mov rsi, [rbp+arg_10] mov rsi, [rsi+8] mov r8, rdi shr r8, 8 mov rsi, [rsi+r8*8] test rsi, rsi jz short loc_5757E xor r8d, r8d test dx, dx setns r8b movzx edx, dil lea rdx, [rdx+rdx*2] lea rdx, [rsi+rdx*4] mov r8d, [rdx+r8*4+4] loc_57571: mov [rbp+var_30], r8 mov rdi, r8 jmp short loc_5757E loc_5757A: mov rdi, [rbp+var_30] loc_5757E: mov eax, eax add rbx, rax cmp rcx, rdi jnz loc_574B3 mov rdi, r15 mov [rbp+var_38], rbx mov rsi, rbx mov rdx, r14 mov rcx, r13 mov r8, r12 mov r9d, [rbp+var_54] push [rbp+var_60] push [rbp+arg_10] mov eax, [rbp+arg_8] push rax mov eax, [rbp+arg_0] push rax call my_wildcmp_unicode_impl add rsp, 20h mov ebx, eax test eax, eax jg loc_574AF jmp short loc_575CB loc_575C6: mov ebx, 1 loc_575CB: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_575DC: mov ebx, 0FFFFFFFFh jmp short loc_575CB
long long my_wildcmp_unicode_impl( long long a1, long long a2, unsigned long long a3, unsigned long long a4, unsigned long long a5, int a6, int a7, int a8, unsigned long long *a9, unsigned int a10) { unsigned int v13; // ebx long long ( *v14)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // r14 int v15; // eax int v16; // eax unsigned int v17; // ebx long long ( *v18)(long long, unsigned long long *, long long, long long); // rax long long v19; // r14 int v20; // eax long long v21; // rbx int v22; // eax long long v23; // rax int v24; // ecx unsigned long long v25; // rdx long long v26; // rsi long long v27; // rsi long long v28; // rsi long long v29; // rdi long long v30; // rdx int v31; // eax unsigned int v32; // r14d int v33; // eax int v34; // eax unsigned long long v35; // r13 int v36; // eax unsigned long long v37; // rbx int v38; // eax long long v39; // rcx int v40; // edx unsigned long long v41; // rsi long long v42; // rdi long long v43; // rdi long long v44; // rdi long long v45; // r8 long long v46; // rsi unsigned long long v50; // [rsp+38h] [rbp-48h] BYREF long long ( *v51)(long long, unsigned __int8 *, unsigned long long, unsigned long long); // [rsp+40h] [rbp-40h] long long v52; // [rsp+48h] [rbp-38h] unsigned __int8 v53[48]; // [rsp+50h] [rbp-30h] BYREF v52 = a2; v51 = *(long long ( **)(long long, unsigned __int8 *, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 40LL); if ( my_string_stack_guard ) { v13 = 1; if ( (unsigned int)my_string_stack_guard(a10) ) return v13; } if ( a4 == a5 ) return v52 != a3; while ( 1 ) { v14 = v51; v15 = v51(a1, v53, a4, a5); if ( v15 <= 0 ) return 1; if ( *(_QWORD *)v53 == a8 ) break; a4 += (unsigned int)v15; if ( *(_QWORD *)v53 == a6 && a4 < a5 ) { v16 = v14(a1, v53, a4, a5); if ( v16 <= 0 ) return 1; v17 = v16; v18 = (long long ( *)(long long, unsigned long long *, long long, long long))v14; v19 = v52; v20 = v18(a1, &v50, v52, a3); if ( v20 <= 0 ) return 1; a4 += v17; v52 = (unsigned int)v20 + v19; LABEL_13: v23 = v50; if ( a9 ) { v24 = *(_DWORD *)(a1 + 12); v25 = *a9; v26 = 65533LL; if ( v50 > *a9 ) goto LABEL_17; v27 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8)); if ( v27 ) { v26 = *(unsigned int *)(v27 + 12LL * (unsigned __int8)v50 + 4LL * ((v24 & 0x8000u) == 0) + 4); LABEL_17: v50 = v26; v23 = v26; } v28 = *(_QWORD *)v53; v29 = 65533LL; if ( *(_QWORD *)v53 > v25 ) { LABEL_21: *(_QWORD *)v53 = v29; v28 = v29; } else { v30 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8)); if ( v30 ) { v29 = *(unsigned int *)(v30 + 12LL * v53[0] + 4LL * ((v24 & 0x8000u) == 0) + 4); goto LABEL_21; } } } else { v28 = *(_QWORD *)v53; } v13 = 1; if ( v23 != v28 ) return v13; goto LABEL_24; } v21 = v52; v22 = v14(a1, (unsigned __int8 *)&v50, v52, a3); if ( v22 <= 0 ) return 1; v52 = (unsigned int)v22 + v21; if ( *(_QWORD *)v53 != a7 ) goto LABEL_13; LABEL_24: if ( a4 == a5 ) return v52 != a3; } v13 = 0; if ( a4 == a5 ) return v13; while ( 2 ) { v31 = v14(a1, v53, a4, a5); if ( v31 <= 0 ) return 1; v32 = v31; if ( *(_QWORD *)v53 == a8 ) { a4 += (unsigned int)v31; LABEL_30: v14 = v51; if ( a4 == a5 ) return v13; continue; } break; } if ( *(_QWORD *)v53 == a7 ) { v33 = v51(a1, (unsigned __int8 *)&v50, v52, a3); if ( v33 <= 0 ) return 1; a4 += v32; v52 += (unsigned int)v33; goto LABEL_30; } if ( v52 == a3 ) return (unsigned int)-1; v34 = v51(a1, v53, a4, a5); if ( v34 <= 0 ) return 1; v35 = (unsigned int)v34 + a4; if ( *(_QWORD *)v53 != a6 || v35 >= a5 ) { LABEL_41: v37 = v52; while ( 1 ) { if ( v37 == a3 ) return (unsigned int)-1; v38 = v51(a1, (unsigned __int8 *)&v50, v37, a3); if ( v38 <= 0 ) return 1; v39 = v50; if ( !a9 ) { v44 = *(_QWORD *)v53; goto LABEL_54; } v40 = *(_DWORD *)(a1 + 12); v41 = *a9; v42 = 65533LL; if ( v50 <= *a9 ) { v43 = *(_QWORD *)(a9[1] + 8 * (v50 >> 8)); if ( !v43 ) goto LABEL_49; v42 = *(unsigned int *)(v43 + 12LL * (unsigned __int8)v50 + 4LL * ((v40 & 0x8000u) == 0) + 4); } v50 = v42; v39 = v42; LABEL_49: v44 = *(_QWORD *)v53; v45 = 65533LL; if ( *(_QWORD *)v53 > v41 ) goto LABEL_52; v46 = *(_QWORD *)(a9[1] + 8LL * (*(_QWORD *)v53 >> 8)); if ( v46 ) { v45 = *(unsigned int *)(v46 + 12LL * v53[0] + 4LL * ((v40 & 0x8000u) == 0) + 4); LABEL_52: *(_QWORD *)v53 = v45; v44 = v45; } LABEL_54: v37 += (unsigned int)v38; if ( v39 == v44 ) { v52 = v37; v13 = my_wildcmp_unicode_impl(a1, v37, a3, v35, a5, a6, a7, a8, (long long)a9, a10 + 1); if ( (int)v13 > 0 ) goto LABEL_41; return v13; } } } v36 = v51(a1, v53, v35, a5); if ( v36 > 0 ) { LODWORD(v35) = v36 + v35; goto LABEL_41; } return 1; }
my_wildcmp_unicode_impl: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV dword ptr [RBP + -0x54],R9D MOV R12,R8 MOV R13,RCX MOV qword ptr [RBP + -0x50],RDX MOV qword ptr [RBP + -0x38],RSI MOV R15,RDI MOV EAX,dword ptr [RBP + 0x28] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RDI + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX LEA RAX,[0x47a110] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0015723b MOV EDI,dword ptr [RBP + 0x28] CALL RAX MOV EBX,0x1 TEST EAX,EAX JNZ 0x001575cb LAB_0015723b: CMP R13,R12 JZ 0x001573ca MOV EAX,dword ptr [RBP + 0x18] MOV ECX,dword ptr [RBP + 0x10] CDQE MOV qword ptr [RBP + -0x78],RAX MOVSXD RAX,dword ptr [RBP + -0x54] MOV qword ptr [RBP + -0x70],RAX MOVSXD RAX,ECX MOV qword ptr [RBP + -0x68],RAX LAB_0015725f: MOV RDI,R15 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,R12 MOV R14,qword ptr [RBP + -0x40] CALL R14 TEST EAX,EAX JLE 0x001575c6 MOV RCX,qword ptr [RBP + -0x30] CMP RCX,qword ptr [RBP + -0x78] JZ 0x001573dc MOV EAX,EAX ADD R13,RAX CMP RCX,qword ptr [RBP + -0x70] JNZ 0x001572e2 CMP R13,R12 JNC 0x001572e2 MOV RDI,R15 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x001575c6 MOV EBX,EAX MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RAX,R14 MOV R14,qword ptr [RBP + -0x38] MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x50] CALL RAX TEST EAX,EAX JLE 0x001575c6 MOV ECX,EBX ADD R13,RCX MOV EAX,EAX ADD R14,RAX MOV qword ptr [RBP + -0x38],R14 JMP 0x00157316 LAB_001572e2: MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RBX,qword ptr [RBP + -0x38] MOV RDX,RBX MOV RCX,qword ptr [RBP + -0x50] CALL R14 TEST EAX,EAX JLE 0x001575c6 MOV EAX,EAX ADD RBX,RAX MOV qword ptr [RBP + -0x38],RBX MOV RAX,qword ptr [RBP + -0x68] CMP qword ptr [RBP + -0x30],RAX JZ 0x001573c1 LAB_00157316: MOV RAX,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + 0x20] TEST R8,R8 JZ 0x001573af MOV ECX,dword ptr [R15 + 0xc] MOV RDX,qword ptr [R8] MOV ESI,0xfffd CMP RAX,RDX JA 0x00157364 MOV RSI,qword ptr [R8 + 0x8] MOV RDI,RAX SHR RDI,0x8 MOV RSI,qword ptr [RSI + RDI*0x8] TEST RSI,RSI JZ 0x0015736b XOR EDI,EDI TEST CX,CX SETNS DIL MOVZX EAX,AL LEA RAX,[RAX + RAX*0x2] LEA RAX,[RSI + RAX*0x4] MOV ESI,dword ptr [RAX + RDI*0x4 + 0x4] LAB_00157364: MOV qword ptr [RBP + -0x48],RSI MOV RAX,RSI LAB_0015736b: MOV RSI,qword ptr [RBP + -0x30] MOV EDI,0xfffd CMP RSI,RDX JA 0x001573a6 MOV RDX,qword ptr [R8 + 0x8] MOV RDI,RSI SHR RDI,0x8 MOV RDX,qword ptr [RDX + RDI*0x8] TEST RDX,RDX JZ 0x001573b3 XOR EDI,EDI TEST CX,CX SETNS DIL MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] LEA RCX,[RDX + RCX*0x4] MOV EDI,dword ptr [RCX + RDI*0x4 + 0x4] LAB_001573a6: MOV qword ptr [RBP + -0x30],RDI MOV RSI,RDI JMP 0x001573b3 LAB_001573af: MOV RSI,qword ptr [RBP + -0x30] LAB_001573b3: MOV EBX,0x1 CMP RAX,RSI JNZ 0x001575cb LAB_001573c1: CMP R13,R12 JNZ 0x0015725f LAB_001573ca: XOR EBX,EBX MOV RAX,qword ptr [RBP + -0x50] CMP qword ptr [RBP + -0x38],RAX SETNZ BL JMP 0x001575cb LAB_001573dc: XOR EBX,EBX CMP R13,R12 JZ 0x001575cb LAB_001573e7: MOV RDI,R15 LEA RSI,[RBP + -0x30] MOV RDX,R13 MOV RCX,R12 CALL R14 TEST EAX,EAX JLE 0x001575c6 MOV R14D,EAX MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x78] JNZ 0x00157420 MOV EAX,R14D ADD R13,RAX LAB_00157412: CMP R13,R12 MOV R14,qword ptr [RBP + -0x40] JNZ 0x001573e7 JMP 0x001575cb LAB_00157420: CMP RAX,qword ptr [RBP + -0x68] JNZ 0x0015744e MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RDX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x50] CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x001575c6 MOV ECX,R14D ADD R13,RCX MOV EAX,EAX ADD qword ptr [RBP + -0x38],RAX JMP 0x00157412 LAB_0015744e: MOV R14,qword ptr [RBP + -0x50] CMP qword ptr [RBP + -0x38],R14 JZ 0x001575dc LEA RSI,[RBP + -0x30] MOV RDI,R15 MOV RDX,R13 MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x001575c6 MOV EAX,EAX ADD R13,RAX MOV RAX,qword ptr [RBP + -0x70] CMP qword ptr [RBP + -0x30],RAX JNZ 0x001574a5 CMP R13,R12 JNC 0x001574a5 LEA RSI,[RBP + -0x30] MOV RDI,R15 MOV RDX,R13 MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x001575c6 MOV EAX,EAX ADD R13,RAX LAB_001574a5: MOV RAX,qword ptr [RBP + -0x60] INC EAX MOV qword ptr [RBP + -0x60],RAX LAB_001574af: MOV RBX,qword ptr [RBP + -0x38] LAB_001574b3: CMP RBX,R14 JZ 0x001575dc MOV RDI,R15 LEA RSI,[RBP + -0x48] MOV RDX,RBX MOV RCX,R14 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JLE 0x001575c6 MOV RCX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + 0x20] TEST RSI,RSI JZ 0x0015757a MOV EDX,dword ptr [R15 + 0xc] MOV RSI,qword ptr [RSI] MOV EDI,0xfffd CMP RCX,RSI JA 0x00157528 MOV RDI,qword ptr [RBP + 0x20] MOV RDI,qword ptr [RDI + 0x8] MOV R8,RCX SHR R8,0x8 MOV RDI,qword ptr [RDI + R8*0x8] TEST RDI,RDI JZ 0x0015752f XOR R8D,R8D TEST DX,DX SETNS R8B MOVZX ECX,CL LEA RCX,[RCX + RCX*0x2] LEA RCX,[RDI + RCX*0x4] MOV EDI,dword ptr [RCX + R8*0x4 + 0x4] LAB_00157528: MOV qword ptr [RBP + -0x48],RDI MOV RCX,RDI LAB_0015752f: MOV RDI,qword ptr [RBP + -0x30] MOV R8D,0xfffd CMP RDI,RSI JA 0x00157571 MOV RSI,qword ptr [RBP + 0x20] MOV RSI,qword ptr [RSI + 0x8] MOV R8,RDI SHR R8,0x8 MOV RSI,qword ptr [RSI + R8*0x8] TEST RSI,RSI JZ 0x0015757e XOR R8D,R8D TEST DX,DX SETNS R8B MOVZX EDX,DIL LEA RDX,[RDX + RDX*0x2] LEA RDX,[RSI + RDX*0x4] MOV R8D,dword ptr [RDX + R8*0x4 + 0x4] LAB_00157571: MOV qword ptr [RBP + -0x30],R8 MOV RDI,R8 JMP 0x0015757e LAB_0015757a: MOV RDI,qword ptr [RBP + -0x30] LAB_0015757e: MOV EAX,EAX ADD RBX,RAX CMP RCX,RDI JNZ 0x001574b3 MOV RDI,R15 MOV qword ptr [RBP + -0x38],RBX MOV RSI,RBX MOV RDX,R14 MOV RCX,R13 MOV R8,R12 MOV R9D,dword ptr [RBP + -0x54] PUSH qword ptr [RBP + -0x60] PUSH qword ptr [RBP + 0x20] MOV EAX,dword ptr [RBP + 0x18] PUSH RAX MOV EAX,dword ptr [RBP + 0x10] PUSH RAX CALL 0x001571de ADD RSP,0x20 MOV EBX,EAX TEST EAX,EAX JG 0x001574af JMP 0x001575cb LAB_001575c6: MOV EBX,0x1 LAB_001575cb: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001575dc: MOV EBX,0xffffffff JMP 0x001575cb
uint my_wildcmp_unicode_impl (long param_1,long param_2,long param_3,ulong param_4,ulong param_5,int param_6, int param_7,int param_8,ulong *param_9,int param_10) { long lVar1; code *pcVar2; ulong uVar3; int iVar4; uint uVar5; uint uVar6; short sVar7; long lVar8; ulong local_50; code *local_48; long local_40; ulong local_38; local_48 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); local_40 = param_2; if ((my_string_stack_guard != (code *)0x0) && (iVar4 = (*my_string_stack_guard)(param_10), iVar4 != 0)) { return 1; } if (param_4 != param_5) { do { pcVar2 = local_48; uVar5 = (*local_48)(param_1,&local_38,param_4,param_5); lVar8 = local_40; if ((int)uVar5 < 1) { return 1; } if (local_38 == (long)param_8) { do { if (param_4 == param_5) { return 0; } uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5); if ((int)uVar5 < 1) { return 1; } if (local_38 != (long)param_8) { if (local_38 != (long)param_7) { if (local_40 == param_3) { return 0xffffffff; } uVar5 = (*local_48)(param_1,&local_38,param_4,param_5); if (0 < (int)uVar5) { param_4 = param_4 + uVar5; if ((local_38 == (long)param_6) && (param_4 < param_5)) { uVar5 = (*local_48)(param_1,&local_38,param_4,param_5); if ((int)uVar5 < 1) { return 1; } param_4 = param_4 + uVar5; } lVar8 = local_40; while( true ) { if (lVar8 == param_3) { return 0xffffffff; } uVar5 = (*local_48)(param_1,&local_50,lVar8,param_3); if ((int)uVar5 < 1) break; uVar3 = local_38; if (param_9 != (ulong *)0x0) { sVar7 = (short)*(int4 *)(param_1 + 0xc); uVar3 = 0xfffd; if ((local_50 <= *param_9) && (lVar1 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50, lVar1 != 0)) { uVar3 = (ulong)*(uint *)(lVar1 + (local_50 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } local_50 = uVar3; uVar3 = 0xfffd; if ((local_38 <= *param_9) && (lVar1 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38, lVar1 != 0)) { uVar3 = (ulong)*(uint *)(lVar1 + (local_38 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } } local_38 = uVar3; lVar8 = lVar8 + (ulong)uVar5; if ((local_50 == local_38) && (local_40 = lVar8, uVar5 = my_wildcmp_unicode_impl (param_1,lVar8,param_3,param_4,param_5,param_6,param_7, param_8,param_9,param_10 + 1), lVar8 = local_40, (int)uVar5 < 1)) { return uVar5; } } return 1; } return 1; } uVar6 = (*local_48)(param_1,&local_50,local_40,param_3); if ((int)uVar6 < 1) { return 1; } local_40 = local_40 + (ulong)uVar6; } param_4 = param_4 + uVar5; pcVar2 = local_48; } while( true ); } param_4 = param_4 + uVar5; if ((local_38 == (long)param_6) && (param_4 < param_5)) { uVar5 = (*pcVar2)(param_1,&local_38,param_4,param_5); lVar8 = local_40; if ((int)uVar5 < 1) { return 1; } uVar6 = (*pcVar2)(param_1,&local_50,local_40,param_3); if ((int)uVar6 < 1) { return 1; } param_4 = param_4 + uVar5; local_40 = lVar8 + (ulong)uVar6; LAB_00157316: uVar3 = local_38; if (param_9 != (ulong *)0x0) { sVar7 = (short)*(int4 *)(param_1 + 0xc); uVar3 = 0xfffd; if ((local_50 <= *param_9) && (lVar8 = *(long *)(param_9[1] + (local_50 >> 8) * 8), uVar3 = local_50, lVar8 != 0)) { uVar3 = (ulong)*(uint *)(lVar8 + (local_50 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } local_50 = uVar3; uVar3 = 0xfffd; if ((local_38 <= *param_9) && (lVar8 = *(long *)(param_9[1] + (local_38 >> 8) * 8), uVar3 = local_38, lVar8 != 0)) { uVar3 = (ulong)*(uint *)(lVar8 + (local_38 & 0xff) * 0xc + 4 + (ulong)(-1 < sVar7) * 4); } } local_38 = uVar3; if (local_50 != local_38) { return 1; } } else { uVar5 = (*pcVar2)(param_1,&local_50,local_40,param_3); if ((int)uVar5 < 1) { return 1; } local_40 = lVar8 + (ulong)uVar5; if (local_38 != (long)param_7) goto LAB_00157316; } } while (param_4 != param_5); } return (uint)(local_40 != param_3); }
39,221
mysql_stmt_prepare_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_prepare_start(int *ret, MYSQL_STMT *stmt, const char *query, unsigned long length) { MK_ASYNC_START_BODY( mysql_stmt_prepare, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; parms.query= query; parms.length= length; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_prepare(stmt, query, length); return 0; }) }
O3
c
mysql_stmt_prepare_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x2ba8e movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x30(%rbp), %rax movq %r14, (%rax) movq %rdx, 0x8(%rax) movq %rcx, 0x10(%rax) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0xae(%rip), %rsi # 0x2bb1c movq %rax, %rdx callq 0x2d668 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x2ba9e movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x2bb11 movq %r14, %rdi movq %rdx, %rsi movq %rcx, %rdx callq 0x20d8c jmp 0x2bb0d js 0x2baa6 movl 0x8(%r15), %eax jmp 0x2bb0d movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x1cf3c(%rip), %rax # 0x48a00 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x1cf21(%rip), %rax # 0x48a10 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movl $0x1, %eax movl %eax, (%rbx) xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_prepare_start: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_2BA8E mov rax, [rax+480h] mov r15, [rax+28h] lea rax, [rbp+var_30] mov [rax], r14 mov [rax+8], rdx mov [rax+10h], rcx mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_prepare_start_internal mov rdx, rax call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_2BA9E mov byte ptr [r15+15h], 1 mov eax, [r15] jmp loc_2BB11 loc_2BA8E: mov rdi, r14 mov rsi, rdx mov rdx, rcx call mysql_stmt_prepare jmp short loc_2BB0D loc_2BA9E: js short loc_2BAA6 mov eax, [r15+8] jmp short loc_2BB0D loc_2BAA6: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov eax, 1 loc_2BB0D: mov [rbx], eax xor eax, eax loc_2BB11: add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_prepare_start(int *a1, long long a2, long long a3, long long a4) { long long v4; // rax unsigned int *v5; // r15 int v6; // eax int v8; // eax _QWORD v9[6]; // [rsp+0h] [rbp-30h] BYREF v4 = *(_QWORD *)(a2 + 56); if ( v4 ) { v5 = *(unsigned int **)(*(_QWORD *)(v4 + 1152) + 40LL); v9[0] = a2; v9[1] = a3; v9[2] = a4; *((_BYTE *)v5 + 20) = 1; v6 = my_context_spawn(v5 + 14, mysql_stmt_prepare_start_internal, v9); *((_WORD *)v5 + 10) = 0; if ( v6 > 0 ) { *((_BYTE *)v5 + 21) = 1; return *v5; } if ( v6 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v8 = 1; } else { v8 = v5[2]; } } else { v8 = mysql_stmt_prepare(a2, a3, a4); } *a1 = v8; return 0LL; }
mysql_stmt_prepare_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0012ba8e MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RAX,[RBP + -0x30] MOV qword ptr [RAX],R14 MOV qword ptr [RAX + 0x8],RDX MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x12bb1c] MOV RDX,RAX CALL 0x0012d668 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0012ba9e MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0012bb11 LAB_0012ba8e: MOV RDI,R14 MOV RSI,RDX MOV RDX,RCX CALL 0x00120d8c JMP 0x0012bb0d LAB_0012ba9e: JS 0x0012baa6 MOV EAX,dword ptr [R15 + 0x8] JMP 0x0012bb0d LAB_0012baa6: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x148a00] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x148a10] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV EAX,0x1 LAB_0012bb0d: MOV dword ptr [RBX],EAX XOR EAX,EAX LAB_0012bb11: ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_prepare_start(int4 *param_1,long param_2,int8 param_3,int8 param_4) { int4 *puVar1; int iVar2; int4 uVar3; long local_38; int8 local_30; int8 local_28; if (*(long *)(param_2 + 0x38) == 0) { uVar3 = mysql_stmt_prepare(param_2,param_3,param_4); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; local_38 = param_2; local_30 = param_3; local_28 = param_4; iVar2 = my_context_spawn(puVar1 + 0xe,mysql_stmt_prepare_start_internal,&local_38); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar2) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar2 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_00148a50, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar3 = 1; } else { uVar3 = puVar1[2]; } } *param_1 = uVar3; return 0; }
39,222
set_prealloc_root
eloqsql/mysys/my_alloc.c
void set_prealloc_root(MEM_ROOT *root, char *ptr) { USED_MEM *next; for (next=root->used; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } for (next=root->free ; next ; next=next->next) { if ((char*) next <= ptr && (char*) next + next->size > ptr) { root->pre_alloc=next; return; } } }
O3
c
set_prealloc_root: pushq %rbp movq %rsp, %rbp movq 0x8(%rdi), %rax testq %rax, %rax je 0x4d932 cmpq %rsi, %rax ja 0x4d92d movq 0x10(%rax), %rcx addq %rax, %rcx cmpq %rsi, %rcx ja 0x4d950 movq (%rax), %rax jmp 0x4d917 movq (%rdi), %rax testq %rax, %rax je 0x4d954 cmpq %rsi, %rax ja 0x4d94b movq 0x10(%rax), %rcx addq %rax, %rcx cmpq %rsi, %rcx ja 0x4d950 movq (%rax), %rax jmp 0x4d935 movq %rax, 0x10(%rdi) popq %rbp retq
set_prealloc_root: push rbp mov rbp, rsp mov rax, [rdi+8] loc_4D917: test rax, rax jz short loc_4D932 cmp rax, rsi ja short loc_4D92D mov rcx, [rax+10h] add rcx, rax cmp rcx, rsi ja short loc_4D950 loc_4D92D: mov rax, [rax] jmp short loc_4D917 loc_4D932: mov rax, [rdi] loc_4D935: test rax, rax jz short loc_4D954 cmp rax, rsi ja short loc_4D94B mov rcx, [rax+10h] add rcx, rax cmp rcx, rsi ja short loc_4D950 loc_4D94B: mov rax, [rax] jmp short loc_4D935 loc_4D950: mov [rdi+10h], rax loc_4D954: pop rbp retn
_QWORD * set_prealloc_root(_QWORD *a1, unsigned long long a2) { _QWORD *result; // rax for ( result = (_QWORD *)a1[1]; result; result = (_QWORD *)*result ) { if ( (unsigned long long)result <= a2 && (unsigned long long)result + result[2] > a2 ) { LABEL_11: a1[2] = result; return result; } } for ( result = (_QWORD *)*a1; result; result = (_QWORD *)*result ) { if ( (unsigned long long)result <= a2 && (unsigned long long)result + result[2] > a2 ) goto LABEL_11; } return result; }
set_prealloc_root: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0x8] LAB_0014d917: TEST RAX,RAX JZ 0x0014d932 CMP RAX,RSI JA 0x0014d92d MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RAX CMP RCX,RSI JA 0x0014d950 LAB_0014d92d: MOV RAX,qword ptr [RAX] JMP 0x0014d917 LAB_0014d932: MOV RAX,qword ptr [RDI] LAB_0014d935: TEST RAX,RAX JZ 0x0014d954 CMP RAX,RSI JA 0x0014d94b MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RAX CMP RCX,RSI JA 0x0014d950 LAB_0014d94b: MOV RAX,qword ptr [RAX] JMP 0x0014d935 LAB_0014d950: MOV qword ptr [RDI + 0x10],RAX LAB_0014d954: POP RBP RET
void set_prealloc_root(int8 *param_1,int8 *param_2) { int8 *puVar1; for (puVar1 = (int8 *)param_1[1]; puVar1 != (int8 *)0x0; puVar1 = (int8 *)*puVar1) { if ((puVar1 <= param_2) && (param_2 < (int8 *)(puVar1[2] + (long)puVar1))) goto LAB_0014d950; } puVar1 = (int8 *)*param_1; while( true ) { if (puVar1 == (int8 *)0x0) { return; } if ((puVar1 <= param_2) && (param_2 < (int8 *)(puVar1[2] + (long)puVar1))) break; puVar1 = (int8 *)*puVar1; } LAB_0014d950: param_1[2] = puVar1; return; }
39,223
my_printv_error
eloqsql/mysys/my_error.c
void my_printv_error(uint error, const char *format, myf MyFlags, va_list ap) { char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printv_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); (void) my_vsnprintf(ebuff, sizeof(ebuff), format, ap); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O3
c
my_printv_error: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x208, %rsp # imm = 0x208 movq %rdx, %rbx movq %rsi, %rdx movl %edi, %r14d movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq -0x220(%rbp), %r15 movl $0x200, %esi # imm = 0x200 movq %r15, %rdi callq 0xd69b5 leaq 0x2e7b5b(%rip), %rax # 0x385b40 movl %r14d, %edi movq %r15, %rsi movq %rbx, %rdx callq *(%rax) movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x9e00d addq $0x208, %rsp # imm = 0x208 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x29270
my_printv_error: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 208h mov rbx, rdx mov rdx, rsi mov r14d, edi mov rax, fs:28h mov [rbp+var_20], rax lea r15, [rbp+var_220] mov esi, 200h mov rdi, r15 call my_vsnprintf lea rax, error_handler_hook mov edi, r14d mov rsi, r15 mov rdx, rbx call qword ptr [rax] mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_9E00D add rsp, 208h pop rbx pop r14 pop r15 pop rbp retn loc_9E00D: call ___stack_chk_fail
unsigned long long my_printv_error(long long a1, long long a2) { _BYTE v3[512]; // [rsp+0h] [rbp-220h] BYREF unsigned long long v4; // [rsp+200h] [rbp-20h] v4 = __readfsqword(0x28u); my_vsnprintf(v3, 512LL, a2); error_handler_hook(); return __readfsqword(0x28u); }
my_printv_error: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x208 MOV RBX,RDX MOV RDX,RSI MOV R14D,EDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA R15,[RBP + -0x220] MOV ESI,0x200 MOV RDI,R15 CALL 0x001d69b5 LEA RAX,[0x485b40] MOV EDI,R14D MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX] MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0019e00d ADD RSP,0x208 POP RBX POP R14 POP R15 POP RBP RET LAB_0019e00d: CALL 0x00129270
void my_printv_error(int4 param_1,int8 param_2,int8 param_3) { long in_FS_OFFSET; int1 local_228 [512]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); my_vsnprintf(local_228,0x200,param_2); (*(code *)error_handler_hook)(param_1,local_228,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,224
ma_ft_segiterator_dummy_init
eloqsql/storage/maria/ma_ft_update.c
void _ma_ft_segiterator_dummy_init(const uchar *record, uint len, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_ma_ft_segiterator_dummy_init"); ftsi->num=1; ftsi->seg=0; ftsi->pos=record; ftsi->len=len; DBUG_VOID_RETURN; }
O3
c
ma_ft_segiterator_dummy_init: pushq %rbp movq %rsp, %rbp movl $0x1, (%rdx) movq $0x0, 0x8(%rdx) movq %rdi, 0x18(%rdx) movl %esi, 0x4(%rdx) popq %rbp retq
_ma_ft_segiterator_dummy_init: push rbp mov rbp, rsp mov dword ptr [rdx], 1 mov qword ptr [rdx+8], 0 mov [rdx+18h], rdi mov [rdx+4], esi pop rbp retn
void ma_ft_segiterator_dummy_init(long long a1, int a2, long long a3) { *(_DWORD *)a3 = 1; *(_QWORD *)(a3 + 8) = 0LL; *(_QWORD *)(a3 + 24) = a1; *(_DWORD *)(a3 + 4) = a2; }
_ma_ft_segiterator_dummy_init: PUSH RBP MOV RBP,RSP MOV dword ptr [RDX],0x1 MOV qword ptr [RDX + 0x8],0x0 MOV qword ptr [RDX + 0x18],RDI MOV dword ptr [RDX + 0x4],ESI POP RBP RET
void _ma_ft_segiterator_dummy_init(int8 param_1,int4 param_2,int4 *param_3) { *param_3 = 1; *(int8 *)(param_3 + 2) = 0; *(int8 *)(param_3 + 6) = param_1; param_3[1] = param_2; return; }
39,225
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 0xaa8b2 movq (%rdx), %rsi cmpq %r14, %rsi jne 0xaa90e 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 0xaa9b4 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1a430 movq %rax, %rbx movq %r14, %rdi callq 0x5d76e leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x47492(%rip), %rsi # 0xf1d68 movq %rsp, %rdi callq 0xaaa4f movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x135, %esi # imm = 0x135 movq %r14, %rcx callq 0x5d516 xorl %ebp, %ebp leaq 0x7f60b(%rip), %rsi # 0x129f08 leaq -0x51054(%rip), %rdx # 0x598b0 movq %rbx, %rdi callq 0x1aea0 jmp 0xaa968 movl $0x20, %edi callq 0x1a430 movq %rax, %rbx leaq 0x10(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x433a2(%rip), %rsi # 0xedccd leaq 0x433be(%rip), %rdx # 0xedcf0 movq %rsp, %rdi callq 0x21530 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x5d2ae xorl %ebp, %ebp leaq 0x7f56f(%rip), %rsi # 0x129ec8 leaq -0x510b0(%rip), %rdx # 0x598b0 movq %rbx, %rdi callq 0x1aea0 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi jne 0xaa989 jmp 0xaa99e jmp 0xaa998 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xaa99e movq 0x10(%rsp), %rsi incq %rsi callq 0x1a890 jmp 0xaa99e movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xaa9ab movq %rbx, %rdi callq 0x1a640 movq %r14, %rdi callq 0x1af20 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_AA8B2 mov rsi, [rdx] cmp rsi, r14 jnz loc_AA90E 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_AA8B2: 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_AA968 loc_AA90E: 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_AA968: mov r14, rax mov rdi, [rsp+68h+var_68] cmp rdi, r15 jnz short loc_AA989 jmp short loc_AA99E jmp short loc_AA998 mov r14, rax lea rax, [rsp+68h+var_58] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AA99E loc_AA989: mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AA99E loc_AA998: mov r14, rax mov bpl, 1 loc_AA99E: test bpl, bpl jz short loc_AA9AB mov rdi, rbx; void * call ___cxa_free_exception loc_AA9AB: 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 0x001aa8b2 MOV RSI,qword ptr [RDX] CMP RSI,R14 JNZ 0x001aa90e 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 0x001aa9b4 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_001aa8b2: MOV EDI,0x20 CALL 0x0011a430 MOV RBX,RAX MOV RDI,R14 CALL 0x0015d76e LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001aa8cf: LEA RSI,[0x1f1d68] MOV RDI,RSP CALL 0x001aaa4f MOV BPL,0x1 LAB_001aa8e1: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x135 MOV RCX,R14 CALL 0x0015d516 XOR EBP,EBP LEA RSI,[0x229f08] LEA RDX,[0x1598b0] MOV RDI,RBX CALL 0x0011aea0 LAB_001aa90e: MOV EDI,0x20 CALL 0x0011a430 MOV RBX,RAX LEA R15,[RSP + 0x10] MOV qword ptr [R15 + -0x10],R15 LAB_001aa924: LEA RSI,[0x1edccd] LEA RDX,[0x1edcf0] MOV RDI,RSP CALL 0x00121530 MOV BPL,0x1 LAB_001aa93d: MOV RDX,RSP MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x0015d2ae XOR EBP,EBP LEA RSI,[0x229ec8] LEA RDX,[0x1598b0] MOV RDI,RBX CALL 0x0011aea0
/* 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 001aa8cf to 001aa8dd has its CatchHandler @ 001aa998 */ detail::concat<std::__cxx11::string,char_const(&)[26],char_const*> ((detail *)local_68,"cannot use insert() with ",&local_48); /* try { // try from 001aa8e1 to 001aa90b has its CatchHandler @ 001aa978 */ _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 001aa924 to 001aa939 has its CatchHandler @ 001aa976 */ std::__cxx11::string::_M_construct<char_const*>(local_68,"iterator does not fit current value","") ; /* try { // try from 001aa93d to 001aa967 has its CatchHandler @ 001aa968 */ _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); }
39,226
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)); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::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 %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %r14 cmpb $0x2, (%rsi) jne 0x7d110 movq (%rdx), %rsi cmpq %r14, %rsi jne 0x7d16e movq %rdi, %rbx leaq 0x30(%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 0x7d1ea movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x23450 movq %rax, %rbx movq %r14, %rdi callq 0x425be leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x36c16(%rip), %rsi # 0xb3d48 leaq 0x10(%rsp), %rdi callq 0x7d25b movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x135, %esi # imm = 0x135 movq %r14, %rcx callq 0x42472 xorl %ebp, %ebp leaq 0x7cdeb(%rip), %rsi # 0xf9f48 leaq -0x3e016(%rip), %rdx # 0x3f14e movq %rbx, %rdi callq 0x23e90 jmp 0x7d1bf pushq $0x20 popq %rdi callq 0x23450 movq %rax, %rbx leaq 0x32b5f(%rip), %rsi # 0xafcdf leaq 0x10(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x25c26 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0xca, %esi movq %r14, %rcx callq 0x422de xorl %ebp, %ebp leaq 0x7cd58(%rip), %rsi # 0xf9f08 leaq -0x3e069(%rip), %rdx # 0x3f14e movq %rbx, %rdi callq 0x23e90 jmp 0x7d1c3 jmp 0x7d1d7 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x24158 testb %bpl, %bpl jne 0x7d1da jmp 0x7d1e2 movq %rax, %r14 movq %rbx, %rdi callq 0x23660 movq %r14, %rdi callq 0x23f10
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6insertENS0_6detail9iter_implIKSD_EERSG_: push rbp; char push r14; int push rbx; int sub rsp, 50h mov r14, rsi cmp byte ptr [rsi], 2 jnz short loc_7D110 mov rsi, [rdx] cmp rsi, r14 jnz loc_7D16E mov rbx, rdi lea rax, [rsp+68h+var_38] 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, 50h pop rbx pop r14 pop rbp retn loc_7D110: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+68h+var_60] mov [rdx], rax lea rsi, aCannotUseInser; "cannot use insert() with " lea rdi, [rsp+68h+var_58] 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 lea rdx, [rsp+68h+var_58] 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_7D1BF loc_7D16E: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aIteratorDoesNo; "iterator does not fit current value" lea rdi, [rsp+68h+var_58] lea rdx, [rsp+68h+var_60] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov bpl, 1 lea rdx, [rsp+68h+var_58] 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_7D1BF: jmp short loc_7D1C3 jmp short loc_7D1D7 loc_7D1C3: mov r14, rax lea rdi, [rsp+68h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7D1DA jmp short loc_7D1E2 loc_7D1D7: mov r14, rax loc_7D1DA: mov rdi, rbx; void * call ___cxa_free_exception loc_7D1E2: 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::type_error *exception; // rbx nlohmann::json_abi_v3_11_3::detail::invalid_iterator *v5; // rbx _QWORD v6[4]; // [rsp+10h] [rbp-58h] BYREF unsigned __int8 *v7; // [rsp+30h] [rbp-38h] BYREF __int128 v8; // [rsp+38h] [rbp-30h] long long v9; // [rsp+48h] [rbp-20h] if ( *a2 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); 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, (long long)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::invalid_iterator *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(v6, (long long)"iterator does not fit current value"); 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, (long long)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); } v7 = *(unsigned __int8 **)a3; v8 = *(_OWORD *)(a3 + 8); v9 = *(_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, &v7); return a1; }
insert: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x50 MOV R14,RSI CMP byte ptr [RSI],0x2 JNZ 0x0017d110 MOV RSI,qword ptr [RDX] CMP RSI,R14 JNZ 0x0017d16e MOV RBX,RDI LEA RAX,[RSP + 0x30] 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 0x0017d1ea MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP RBP RET LAB_0017d110: PUSH 0x20 POP RDI CALL 0x00123450 MOV RBX,RAX MOV RDI,R14 CALL 0x001425be LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017d12b: LEA RSI,[0x1b3d48] LEA RDI,[RSP + 0x10] CALL 0x0017d25b MOV BPL,0x1 LAB_0017d13f: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x135 MOV RCX,R14 CALL 0x00142472 XOR EBP,EBP LEA RSI,[0x1f9f48] LEA RDX,[0x13f14e] MOV RDI,RBX CALL 0x00123e90 LAB_0017d16e: PUSH 0x20 POP RDI CALL 0x00123450 MOV RBX,RAX LAB_0017d179: LEA RSI,[0x1afcdf] LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x8] CALL 0x00125c26 MOV BPL,0x1 LAB_0017d192: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0xca MOV RCX,R14 CALL 0x001422de XOR EBP,EBP LEA RSI,[0x1f9f08] LEA RDX,[0x13f14e] MOV RDI,RBX CALL 0x00123e90
/* 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; char *local_60; detail local_58 [32]; 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_38; int4 local_30; int4 uStack_2c; int4 uStack_28; int4 uStack_24; long local_20; 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_60 = (char *)type_name(param_2); /* try { // try from 0017d12b to 0017d13b has its CatchHandler @ 0017d1d7 */ detail::concat<std::__cxx11::string,char_const(&)[26],char_const*> (local_58,"cannot use insert() with ",&local_60); /* try { // try from 0017d13f to 0017d16b has its CatchHandler @ 0017d1c3 */ _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_58,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); } local_38 = (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_38 == param_2) { local_30 = (int4)param_3[1]; uStack_2c = *(int4 *)((long)param_3 + 0xc); uStack_28 = (int4)param_3[2]; uStack_24 = *(int4 *)((long)param_3 + 0x14); local_20 = 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_38); return this; } uVar1 = __cxa_allocate_exception(0x20); /* try { // try from 0017d179 to 0017d18e has its CatchHandler @ 0017d1c1 */ std::__cxx11::string::string<std::allocator<char>> ((string *)local_58,"iterator does not fit current value",(allocator *)&local_60); /* try { // try from 0017d192 to 0017d1be has its CatchHandler @ 0017d1bf */ _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_58,param_2); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::invalid_iterator::typeinfo,detail::exception::~exception); }
39,227
inline_mysql_mutex_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_mutex_init( #ifdef HAVE_PSI_MUTEX_INTERFACE PSI_mutex_key key, #endif mysql_mutex_t *that, const pthread_mutexattr_t *attr #ifdef SAFE_MUTEX , const char *src_name, const char *src_file, uint src_line #endif ) { #ifdef HAVE_PSI_MUTEX_INTERFACE that->m_psi= PSI_MUTEX_CALL(init_mutex)(key, &that->m_mutex); #else that->m_psi= NULL; #endif #ifdef COROUTINE_ENABLED that->l.data= that; that->l.prev= that->l.next= NULL; #endif #ifdef SAFE_MUTEX return safe_mutex_init(&that->m_mutex, attr, src_name, src_file, src_line); #else return pthread_mutex_init(&that->m_mutex, attr); #endif }
O0
c
inline_mysql_mutex_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x2619ae(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x40(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x38(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x28(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2a340 addq $0x20, %rsp popq %rbp retq nopl (%rax)
inline_mysql_mutex_init_4: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+40h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+40h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_10] mov [rax+38h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+28h], 0 mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_mutex_init add rsp, 20h pop rbp retn
long long inline_mysql_mutex_init_4(unsigned int a1, _QWORD *a2, long long a3) { a2[8] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[8])(a1, a2); a2[7] = a2; a2[6] = 0LL; a2[5] = 0LL; return pthread_mutex_init(a2, a3); }
inline_mysql_mutex_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x40] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012a340 ADD RSP,0x20 POP RBP RET
void inline_mysql_mutex_init (int4 param_1,pthread_mutex_t *param_2,pthread_mutexattr_t *param_3) { int8 uVar1; uVar1 = (**(code **)(PSI_server + 0x40))(param_1,param_2); *(int8 *)((long)param_2 + 0x40) = uVar1; *(pthread_mutex_t **)((long)param_2 + 0x38) = param_2; *(int8 *)((long)param_2 + 0x30) = 0; param_2[1].__align = 0; pthread_mutex_init(param_2,param_3); return; }
39,228
user_coll_fill
eloqsql/plugin/server_audit/server_audit.c
static int user_coll_fill(struct user_coll *c, char *users, struct user_coll *cmp_c, int take_over_cmp) { char *orig_users= users; char *cmp_user= 0; size_t cmp_length; int refill_cmp_coll= 0; c->n_users= 0; while (*users) { while (*users == ' ') users++; if (!*users) return 0; (void) getkey_user(users, &cmp_length, FALSE); if (cmp_c) { cmp_user= coll_search(cmp_c, users, cmp_length); if (cmp_user && take_over_cmp) { ADD_ATOMIC(internal_stop_logging, 1); CLIENT_ERROR(1, "User '%.*b' was removed from the" " server_audit_excl_users.", MYF(ME_WARNING), (int) cmp_length, users); ADD_ATOMIC(internal_stop_logging, -1); blank_user(cmp_user); refill_cmp_coll= 1; } else if (cmp_user) { ADD_ATOMIC(internal_stop_logging, 1); CLIENT_ERROR(1, "User '%.*b' is in the server_audit_incl_users, " "so wasn't added.", MYF(ME_WARNING), (int) cmp_length, users); ADD_ATOMIC(internal_stop_logging, -1); remove_user(users); continue; } } if (coll_insert(c, users, cmp_length)) return 1; while (*users && *users != ',') users++; if (!*users) break; users++; } if (refill_cmp_coll) { remove_blanks(excl_users); return user_coll_fill(cmp_c, excl_users, 0, 0); } if (users > orig_users && users[-1] == ',') users[-1]= 0; coll_sort(c); return 0; }
O3
c
user_coll_fill: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl $0x0, (%rdi) movq %rsi, -0x48(%rbp) movb (%rsi), %al testb %al, %al je 0x710e movq %rdi, %r14 testl %ecx, %ecx setne %cl movq %rcx, -0x40(%rbp) movabsq $0x100100000001, %rbx # imm = 0x100100000001 movq %r14, -0x30(%rbp) movq %rdx, %r14 movq -0x40(%rbp), %rcx notb %cl movq %rcx, -0x40(%rbp) movl $0x0, -0x34(%rbp) movq -0x48(%rbp), %r15 leaq 0x1(%r15), %rcx movq %rcx, -0x50(%rbp) testb %al, %al je 0x710e movzbl %al, %ecx cmpl $0x20, %ecx je 0x6ebe xorl %r12d, %r12d cmpb $0x2c, %al ja 0x6dbf movzbl %al, %eax btq %rax, %rbx jb 0x6dc9 movb 0x1(%r15,%r12), %al incq %r12 jmp 0x6db2 testq %r14, %r14 je 0x6f5a movq %r14, %r13 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x5d8b movq %rax, %r14 testq %rax, %rax sete %al orb -0x40(%rbp), %al testb $0x1, %al je 0x6ece testq %r14, %r14 je 0x6f57 leaq 0x7f49(%rip), %r14 # 0xed50 movq %r14, %rdi callq 0x3340 incl 0x6337(%rip) # 0xd14c movq %r14, %rdi callq 0x31f0 cmpb $0x0, 0x7f1c(%rip) # 0xed40 jne 0x6e4d movq 0x512b(%rip), %rax # 0xbf58 movq (%rax), %r9 movl $0x800, %edx # imm = 0x800 movl $0x1, %edi leaq 0x26d9(%rip), %rsi # 0x951a movl %r12d, %ecx movq %r15, %r8 xorl %eax, %eax callq *0x8(%r9) leaq 0x7efc(%rip), %r14 # 0xed50 movq %r14, %rdi callq 0x3340 decl 0x62ea(%rip) # 0xd14c movq %r14, %rdi callq 0x31f0 movq %r15, %rax movq %r13, %r14 movzbl (%rax), %ecx testl %ecx, %ecx je 0x6fed cmpl $0x2c, %ecx je 0x6e85 incq %rax jmp 0x6e70 movb 0x1(%rax), %cl incq %rax cmpb $0x20, %cl je 0x6e85 movb %cl, (%r15) testb %cl, %cl je 0x6ff1 movl $0x1, %ecx movb (%rax,%rcx), %dl movb %dl, (%r15,%rcx) incq %rcx testb %dl, %dl jne 0x6ea0 movb (%r15), %al testb %al, %al jne 0x6d9b jmp 0x6ff1 movb 0x1(%r15), %al incq %r15 incq -0x50(%rbp) jmp 0x6d9b leaq 0x7e7b(%rip), %rdi # 0xed50 callq 0x3340 incl 0x626c(%rip) # 0xd14c leaq 0x7e69(%rip), %rdi # 0xed50 callq 0x31f0 cmpb $0x0, 0x7e4d(%rip) # 0xed40 jne 0x6f1c movq 0x505c(%rip), %rax # 0xbf58 movq (%rax), %r9 movl $0x800, %edx # imm = 0x800 movl $0x1, %edi leaq 0x25d0(%rip), %rsi # 0x94e0 movl %r12d, %ecx movq %r15, %r8 xorl %eax, %eax callq *0x8(%r9) leaq 0x7e2d(%rip), %rdi # 0xed50 callq 0x3340 decl 0x621e(%rip) # 0xd14c leaq 0x7e1b(%rip), %rdi # 0xed50 callq 0x31f0 movzbl (%r14), %eax testl %eax, %eax je 0x6f50 cmpl $0x2c, %eax je 0x6f50 movb $0x20, (%r14) incq %r14 jmp 0x6f3a movl $0x1, -0x34(%rbp) movq %r13, %r14 movq -0x30(%rbp), %rdx movl (%rdx), %ecx movslq 0x10(%rdx), %rsi cmpl %esi, %ecx jge 0x6f6e movq 0x8(%rdx), %rax jmp 0x6fa8 subq $-0x80, %rsi movl %esi, 0x10(%rdx) movq 0x8(%rdx), %rdi shlq $0x4, %rsi testq %rdi, %rdi je 0x6f89 callq 0x3250 jmp 0x6f91 movq %rsi, %rdi callq 0x3200 movq -0x30(%rbp), %rcx movq %rax, 0x8(%rcx) testq %rax, %rax je 0x710e movq -0x30(%rbp), %rdx movl (%rdx), %ecx movslq %ecx, %rcx shlq $0x4, %rcx movq %r15, 0x8(%rax,%rcx) movq 0x8(%rdx), %rax movslq (%rdx), %rcx shlq $0x4, %rcx movq %r12, (%rax,%rcx) incl (%rdx) movq -0x50(%rbp), %r15 movzbl -0x1(%r15), %eax testl %eax, %eax je 0x70c1 cmpl $0x2c, %eax je 0x6fe0 incq %r15 jmp 0x6fc9 movb (%r15), %al testb %al, %al jne 0x6d93 jmp 0x6ff1 movb $0x0, (%r15) cmpl $0x0, -0x34(%rbp) je 0x70c9 movq 0x85ae(%rip), %rax # 0xf5b0 movb (%rax), %dil testb %dil, %dil je 0x7093 movq %rax, %rcx movq %rax, %rsi movl $0x1, %r8d movq %rsi, %rdx cmpb $0x20, %dil je 0x7035 movzbl %dil, %r9d testl %r9d, %r9d je 0x703e cmpl $0x2c, %r9d je 0x703e xorl %r8d, %r8d movb 0x1(%rdx), %dil incq %rdx jmp 0x701d testl %r8d, %r8d setne %r8b cmpq %rdx, %rsi seta %r9b orb %r8b, %r9b jne 0x7065 movb (%rsi), %dil incq %rsi movb %dil, (%rcx) incq %rcx cmpq %rdx, %rsi jbe 0x7051 movb (%rdx), %dil xorl %r8d, %r8d cmpb $0x2c, %dil sete %r8b leaq (%rdx,%r8), %rsi movb (%rdx,%r8), %dil testb %dil, %dil jne 0x7014 cmpq %rax, %rcx jbe 0x7090 leaq -0x1(%rcx), %rax cmpb $0x2c, -0x1(%rcx) cmovneq %rcx, %rax jmp 0x7093 movq %rcx, %rax movb $0x0, (%rax) movq 0x8513(%rip), %rax # 0xf5b0 movl $0x0, (%r14) movq %rax, -0x48(%rbp) movb (%rax), %al movq $0x0, -0x40(%rbp) movl $0x0, %edx testb %al, %al jne 0x6d77 jmp 0x710e decq %r15 jmp 0x6ff1 cmpq -0x48(%rbp), %r15 jbe 0x70db cmpb $0x2c, -0x1(%r15) jne 0x70db movb $0x0, -0x1(%r15) movq -0x30(%rbp), %rax movslq (%rax), %rsi testq %rsi, %rsi je 0x710e movq -0x30(%rbp), %rax movq 0x8(%rax), %rdi leaq -0x131f(%rip), %rcx # 0x5dd7 movl $0x10, %edx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x30a0 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
user_coll_fill: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov dword ptr [rdi], 0 mov [rbp+var_48], rsi mov al, [rsi] test al, al jz loc_710E mov r14, rdi test ecx, ecx setnz cl mov [rbp+var_40], rcx mov rbx, 100100000001h loc_6D77: mov [rbp+var_30], r14 mov r14, rdx mov rcx, [rbp+var_40] not cl mov [rbp+var_40], rcx mov [rbp+var_34], 0 mov r15, [rbp+var_48] loc_6D93: lea rcx, [r15+1] mov [rbp+var_50], rcx loc_6D9B: test al, al jz loc_710E movzx ecx, al cmp ecx, 20h ; ' ' jz loc_6EBE xor r12d, r12d loc_6DB2: cmp al, 2Ch ; ',' ja short loc_6DBF movzx eax, al bt rbx, rax jb short loc_6DC9 loc_6DBF: mov al, [r15+r12+1] inc r12 jmp short loc_6DB2 loc_6DC9: test r14, r14 jz loc_6F5A mov r13, r14 mov rdi, r14 mov rsi, r15 mov rdx, r12 call coll_search mov r14, rax test rax, rax setz al or al, byte ptr [rbp+var_40] test al, 1 jz loc_6ECE test r14, r14 jz loc_6F57 lea r14, lock_atomic mov rdi, r14 call _pthread_mutex_lock inc cs:internal_stop_logging mov rdi, r14 call _pthread_mutex_unlock cmp cs:started_mysql, 0 jnz short loc_6E4D mov rax, cs:my_print_error_service_ptr mov r9, [rax] mov edx, 800h mov edi, 1 lea rsi, aUserBIsInTheSe; "User '%.*b' is in the server_audit_incl"... mov ecx, r12d mov r8, r15 xor eax, eax call qword ptr [r9+8] loc_6E4D: lea r14, lock_atomic mov rdi, r14 call _pthread_mutex_lock dec cs:internal_stop_logging mov rdi, r14 call _pthread_mutex_unlock mov rax, r15 mov r14, r13 loc_6E70: movzx ecx, byte ptr [rax] test ecx, ecx jz loc_6FED cmp ecx, 2Ch ; ',' jz short loc_6E85 inc rax jmp short loc_6E70 loc_6E85: mov cl, [rax+1] inc rax cmp cl, 20h ; ' ' jz short loc_6E85 mov [r15], cl test cl, cl jz loc_6FF1 mov ecx, 1 loc_6EA0: mov dl, [rax+rcx] mov [r15+rcx], dl inc rcx test dl, dl jnz short loc_6EA0 mov al, [r15] test al, al jnz loc_6D9B jmp loc_6FF1 loc_6EBE: mov al, [r15+1] inc r15 inc [rbp+var_50] jmp loc_6D9B loc_6ECE: lea rdi, lock_atomic call _pthread_mutex_lock inc cs:internal_stop_logging lea rdi, lock_atomic call _pthread_mutex_unlock cmp cs:started_mysql, 0 jnz short loc_6F1C mov rax, cs:my_print_error_service_ptr mov r9, [rax] mov edx, 800h mov edi, 1 lea rsi, aUserBWasRemove; "User '%.*b' was removed from the server"... mov ecx, r12d mov r8, r15 xor eax, eax call qword ptr [r9+8] loc_6F1C: lea rdi, lock_atomic call _pthread_mutex_lock dec cs:internal_stop_logging lea rdi, lock_atomic call _pthread_mutex_unlock loc_6F3A: movzx eax, byte ptr [r14] test eax, eax jz short loc_6F50 cmp eax, 2Ch ; ',' jz short loc_6F50 mov byte ptr [r14], 20h ; ' ' inc r14 jmp short loc_6F3A loc_6F50: mov [rbp+var_34], 1 loc_6F57: mov r14, r13 loc_6F5A: mov rdx, [rbp+var_30] mov ecx, [rdx] movsxd rsi, dword ptr [rdx+10h] cmp ecx, esi jge short loc_6F6E mov rax, [rdx+8] jmp short loc_6FA8 loc_6F6E: sub rsi, 0FFFFFFFFFFFFFF80h mov [rdx+10h], esi mov rdi, [rdx+8] shl rsi, 4 test rdi, rdi jz short loc_6F89 call _realloc jmp short loc_6F91 loc_6F89: mov rdi, rsi call _malloc loc_6F91: mov rcx, [rbp+var_30] mov [rcx+8], rax test rax, rax jz loc_710E mov rdx, [rbp+var_30] mov ecx, [rdx] loc_6FA8: movsxd rcx, ecx shl rcx, 4 mov [rax+rcx+8], r15 mov rax, [rdx+8] movsxd rcx, dword ptr [rdx] shl rcx, 4 mov [rax+rcx], r12 inc dword ptr [rdx] mov r15, [rbp+var_50] loc_6FC9: movzx eax, byte ptr [r15-1] test eax, eax jz loc_70C1 cmp eax, 2Ch ; ',' jz short loc_6FE0 inc r15 jmp short loc_6FC9 loc_6FE0: mov al, [r15] test al, al jnz loc_6D93 jmp short loc_6FF1 loc_6FED: mov byte ptr [r15], 0 loc_6FF1: cmp [rbp+var_34], 0 jz loc_70C9 mov rax, cs:excl_users mov dil, [rax] test dil, dil jz loc_7093 mov rcx, rax mov rsi, rax loc_7014: mov r8d, 1 mov rdx, rsi loc_701D: cmp dil, 20h ; ' ' jz short loc_7035 movzx r9d, dil test r9d, r9d jz short loc_703E cmp r9d, 2Ch ; ',' jz short loc_703E xor r8d, r8d loc_7035: mov dil, [rdx+1] inc rdx jmp short loc_701D loc_703E: test r8d, r8d setnz r8b cmp rsi, rdx setnbe r9b or r9b, r8b jnz short loc_7065 loc_7051: mov dil, [rsi] inc rsi mov [rcx], dil inc rcx cmp rsi, rdx jbe short loc_7051 mov dil, [rdx] loc_7065: xor r8d, r8d cmp dil, 2Ch ; ',' setz r8b lea rsi, [rdx+r8] mov dil, [rdx+r8] test dil, dil jnz short loc_7014 cmp rcx, rax jbe short loc_7090 lea rax, [rcx-1] cmp byte ptr [rcx-1], 2Ch ; ',' cmovnz rax, rcx jmp short loc_7093 loc_7090: mov rax, rcx loc_7093: mov byte ptr [rax], 0 mov rax, cs:excl_users mov dword ptr [r14], 0 mov [rbp+var_48], rax mov al, [rax] mov [rbp+var_40], 0 mov edx, 0 test al, al jnz loc_6D77 jmp short loc_710E loc_70C1: dec r15 jmp loc_6FF1 loc_70C9: cmp r15, [rbp+var_48] jbe short loc_70DB cmp byte ptr [r15-1], 2Ch ; ',' jnz short loc_70DB mov byte ptr [r15-1], 0 loc_70DB: mov rax, [rbp+var_30] movsxd rsi, dword ptr [rax] test rsi, rsi jz short loc_710E mov rax, [rbp+var_30] mov rdi, [rax+8] lea rcx, cmp_users mov edx, 10h add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _qsort loc_710E: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char user_coll_fill(int *a1, _BYTE *a2, int *a3, int a4) { _BYTE *v4; // rax int *v5; // r14 long long v6; // rbx _BYTE *i; // r15 long long v8; // r12 int *v9; // r13 _BYTE *v10; // r14 _BYTE *v11; // rax char v12; // cl long long v13; // rcx char v14; // dl int *v15; // rdx int v16; // ecx long long v17; // rsi long long v18; // rsi long long v19; // rdi long long v20; // rsi _BYTE *v21; // rax char v22; // di _BYTE *v23; // rcx char *v24; // rsi int v25; // r8d char *j; // rdx char v27; // di _BYTE *v29; // [rsp+0h] [rbp-50h] _BYTE *v30; // [rsp+8h] [rbp-48h] char v31; // [rsp+10h] [rbp-40h] char v32; // [rsp+10h] [rbp-40h] int v33; // [rsp+1Ch] [rbp-34h] int *v34; // [rsp+20h] [rbp-30h] *a1 = 0; v30 = a2; LOBYTE(v4) = *a2; if ( !*a2 ) return (char)v4; v5 = a1; v31 = a4 != 0; v6 = 0x100100000001LL; do { v34 = v5; v5 = a3; v32 = ~v31; v33 = 0; i = v30; while ( 2 ) { v29 = i + 1; while ( 1 ) { while ( 1 ) { if ( !(_BYTE)v4 ) return (char)v4; if ( (unsigned __int8)v4 != 32 ) break; LOBYTE(v4) = *++i; ++v29; } v8 = 0LL; while ( (unsigned __int8)v4 > 0x2Cu || !_bittest64(&v6, (unsigned __int8)v4) ) LOBYTE(v4) = i[++v8]; if ( !v5 ) break; v9 = v5; v10 = (_BYTE *)coll_search(v5, (long long)i, v8); if ( !(v32 & 1 | (v10 == 0LL)) ) { pthread_mutex_lock(&lock_atomic); ++internal_stop_logging; pthread_mutex_unlock(&lock_atomic); if ( !started_mysql ) (*(void (**)(long long, const char *, ...))(my_print_error_service + 8LL))( 1LL, "User '%.*b' was removed from the server_audit_excl_users.", 2048LL, (unsigned int)v8, i); pthread_mutex_lock(&lock_atomic); --internal_stop_logging; pthread_mutex_unlock(&lock_atomic); while ( *v10 && *v10 != 44 ) *v10++ = 32; v33 = 1; LABEL_34: v5 = v9; break; } if ( !v10 ) goto LABEL_34; pthread_mutex_lock(&lock_atomic); ++internal_stop_logging; pthread_mutex_unlock(&lock_atomic); if ( !started_mysql ) (*(void (**)(long long, const char *, ...))(my_print_error_service + 8LL))( 1LL, "User '%.*b' is in the server_audit_incl_users, so wasn't added.", 2048LL, (unsigned int)v8, i); pthread_mutex_lock(&lock_atomic); --internal_stop_logging; pthread_mutex_unlock(&lock_atomic); v11 = i; v5 = v9; while ( 1 ) { if ( !*v11 ) { *i = 0; goto LABEL_49; } if ( *v11 == 44 ) break; ++v11; } do v12 = *++v11; while ( v12 == 32 ); *i = v12; if ( v12 ) { v13 = 1LL; do { v14 = v11[v13]; i[v13++] = v14; } while ( v14 ); LOBYTE(v4) = *i; if ( *i ) continue; } goto LABEL_49; } v15 = v34; v16 = *v34; v17 = v34[4]; if ( *v34 >= (int)v17 ) { v18 = v17 + 128; v34[4] = v18; v19 = *((_QWORD *)v34 + 1); v20 = 16 * v18; if ( v19 ) v4 = (_BYTE *)realloc(v19, v20); else v4 = (_BYTE *)malloc(v20); *((_QWORD *)v34 + 1) = v4; if ( !v4 ) return (char)v4; v15 = v34; v16 = *v34; } else { v4 = (_BYTE *)*((_QWORD *)v34 + 1); } *(_QWORD *)&v4[16 * v16 + 8] = i; *(_QWORD *)(*((_QWORD *)v15 + 1) + 16LL * (*v15)++) = v8; for ( i = v29; ; ++i ) { if ( !*(i - 1) ) { --i; goto LABEL_49; } if ( *(i - 1) == 44 ) break; } LOBYTE(v4) = *i; if ( *i ) continue; break; } LABEL_49: if ( !v33 ) { if ( i > v30 && *(i - 1) == 44 ) *(i - 1) = 0; LOBYTE(v4) = (_BYTE)v34; if ( *v34 ) LOBYTE(v4) = qsort(*((_QWORD *)v34 + 1), *v34, 16LL, cmp_users); return (char)v4; } v21 = (_BYTE *)excl_users; v22 = *(_BYTE *)excl_users; if ( !*(_BYTE *)excl_users ) goto LABEL_67; v23 = (_BYTE *)excl_users; v24 = (char *)excl_users; do { v25 = 1; for ( j = v24; ; ++j ) { if ( v22 == 32 ) goto LABEL_57; if ( !v22 || v22 == 44 ) break; v25 = 0; LABEL_57: v22 = j[1]; } if ( v25 == 0 && v24 <= j ) { do { v27 = *v24++; *v23++ = v27; } while ( v24 <= j ); v22 = *j; } v24 = &j[v22 == 44]; v22 = *v24; } while ( *v24 ); if ( v23 <= v21 ) { v21 = v23; } else { v21 = v23 - 1; if ( *(v23 - 1) != 44 ) v21 = v23; } LABEL_67: *v21 = 0; v4 = (_BYTE *)excl_users; *v5 = 0; v30 = v4; LOBYTE(v4) = *v4; v31 = 0; a3 = 0LL; } while ( (_BYTE)v4 ); return (char)v4; }
user_coll_fill: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV dword ptr [RDI],0x0 MOV qword ptr [RBP + -0x48],RSI MOV AL,byte ptr [RSI] TEST AL,AL JZ 0x0010710e MOV R14,RDI TEST ECX,ECX SETNZ CL MOV qword ptr [RBP + -0x40],RCX MOV RBX,0x100100000001 LAB_00106d77: MOV qword ptr [RBP + -0x30],R14 MOV R14,RDX MOV RCX,qword ptr [RBP + -0x40] NOT CL MOV qword ptr [RBP + -0x40],RCX MOV dword ptr [RBP + -0x34],0x0 MOV R15,qword ptr [RBP + -0x48] LAB_00106d93: LEA RCX,[R15 + 0x1] MOV qword ptr [RBP + -0x50],RCX LAB_00106d9b: TEST AL,AL JZ 0x0010710e MOVZX ECX,AL CMP ECX,0x20 JZ 0x00106ebe XOR R12D,R12D LAB_00106db2: CMP AL,0x2c JA 0x00106dbf MOVZX EAX,AL BT RBX,RAX JC 0x00106dc9 LAB_00106dbf: MOV AL,byte ptr [R15 + R12*0x1 + 0x1] INC R12 JMP 0x00106db2 LAB_00106dc9: TEST R14,R14 JZ 0x00106f5a MOV R13,R14 MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 CALL 0x00105d8b MOV R14,RAX TEST RAX,RAX SETZ AL OR AL,byte ptr [RBP + -0x40] TEST AL,0x1 JZ 0x00106ece TEST R14,R14 JZ 0x00106f57 LEA R14,[0x10ed50] MOV RDI,R14 CALL 0x00103340 INC dword ptr [0x0010d14c] MOV RDI,R14 CALL 0x001031f0 CMP byte ptr [0x0010ed40],0x0 JNZ 0x00106e4d MOV RAX,qword ptr [0x0010bf58] MOV R9,qword ptr [RAX] MOV EDX,0x800 MOV EDI,0x1 LEA RSI,[0x10951a] MOV ECX,R12D MOV R8,R15 XOR EAX,EAX CALL qword ptr [R9 + 0x8] LAB_00106e4d: LEA R14,[0x10ed50] MOV RDI,R14 CALL 0x00103340 DEC dword ptr [0x0010d14c] MOV RDI,R14 CALL 0x001031f0 MOV RAX,R15 MOV R14,R13 LAB_00106e70: MOVZX ECX,byte ptr [RAX] TEST ECX,ECX JZ 0x00106fed CMP ECX,0x2c JZ 0x00106e85 INC RAX JMP 0x00106e70 LAB_00106e85: MOV CL,byte ptr [RAX + 0x1] INC RAX CMP CL,0x20 JZ 0x00106e85 MOV byte ptr [R15],CL TEST CL,CL JZ 0x00106ff1 MOV ECX,0x1 LAB_00106ea0: MOV DL,byte ptr [RAX + RCX*0x1] MOV byte ptr [R15 + RCX*0x1],DL INC RCX TEST DL,DL JNZ 0x00106ea0 MOV AL,byte ptr [R15] TEST AL,AL JNZ 0x00106d9b JMP 0x00106ff1 LAB_00106ebe: MOV AL,byte ptr [R15 + 0x1] INC R15 INC qword ptr [RBP + -0x50] JMP 0x00106d9b LAB_00106ece: LEA RDI,[0x10ed50] CALL 0x00103340 INC dword ptr [0x0010d14c] LEA RDI,[0x10ed50] CALL 0x001031f0 CMP byte ptr [0x0010ed40],0x0 JNZ 0x00106f1c MOV RAX,qword ptr [0x0010bf58] MOV R9,qword ptr [RAX] MOV EDX,0x800 MOV EDI,0x1 LEA RSI,[0x1094e0] MOV ECX,R12D MOV R8,R15 XOR EAX,EAX CALL qword ptr [R9 + 0x8] LAB_00106f1c: LEA RDI,[0x10ed50] CALL 0x00103340 DEC dword ptr [0x0010d14c] LEA RDI,[0x10ed50] CALL 0x001031f0 LAB_00106f3a: MOVZX EAX,byte ptr [R14] TEST EAX,EAX JZ 0x00106f50 CMP EAX,0x2c JZ 0x00106f50 MOV byte ptr [R14],0x20 INC R14 JMP 0x00106f3a LAB_00106f50: MOV dword ptr [RBP + -0x34],0x1 LAB_00106f57: MOV R14,R13 LAB_00106f5a: MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RDX] MOVSXD RSI,dword ptr [RDX + 0x10] CMP ECX,ESI JGE 0x00106f6e MOV RAX,qword ptr [RDX + 0x8] JMP 0x00106fa8 LAB_00106f6e: SUB RSI,-0x80 MOV dword ptr [RDX + 0x10],ESI MOV RDI,qword ptr [RDX + 0x8] SHL RSI,0x4 TEST RDI,RDI JZ 0x00106f89 CALL 0x00103250 JMP 0x00106f91 LAB_00106f89: MOV RDI,RSI CALL 0x00103200 LAB_00106f91: MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RCX + 0x8],RAX TEST RAX,RAX JZ 0x0010710e MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RDX] LAB_00106fa8: MOVSXD RCX,ECX SHL RCX,0x4 MOV qword ptr [RAX + RCX*0x1 + 0x8],R15 MOV RAX,qword ptr [RDX + 0x8] MOVSXD RCX,dword ptr [RDX] SHL RCX,0x4 MOV qword ptr [RAX + RCX*0x1],R12 INC dword ptr [RDX] MOV R15,qword ptr [RBP + -0x50] LAB_00106fc9: MOVZX EAX,byte ptr [R15 + -0x1] TEST EAX,EAX JZ 0x001070c1 CMP EAX,0x2c JZ 0x00106fe0 INC R15 JMP 0x00106fc9 LAB_00106fe0: MOV AL,byte ptr [R15] TEST AL,AL JNZ 0x00106d93 JMP 0x00106ff1 LAB_00106fed: MOV byte ptr [R15],0x0 LAB_00106ff1: CMP dword ptr [RBP + -0x34],0x0 JZ 0x001070c9 MOV RAX,qword ptr [0x0010f5b0] MOV DIL,byte ptr [RAX] TEST DIL,DIL JZ 0x00107093 MOV RCX,RAX MOV RSI,RAX LAB_00107014: MOV R8D,0x1 MOV RDX,RSI LAB_0010701d: CMP DIL,0x20 JZ 0x00107035 MOVZX R9D,DIL TEST R9D,R9D JZ 0x0010703e CMP R9D,0x2c JZ 0x0010703e XOR R8D,R8D LAB_00107035: MOV DIL,byte ptr [RDX + 0x1] INC RDX JMP 0x0010701d LAB_0010703e: TEST R8D,R8D SETNZ R8B CMP RSI,RDX SETA R9B OR R9B,R8B JNZ 0x00107065 LAB_00107051: MOV DIL,byte ptr [RSI] INC RSI MOV byte ptr [RCX],DIL INC RCX CMP RSI,RDX JBE 0x00107051 MOV DIL,byte ptr [RDX] LAB_00107065: XOR R8D,R8D CMP DIL,0x2c SETZ R8B LEA RSI,[RDX + R8*0x1] MOV DIL,byte ptr [RDX + R8*0x1] TEST DIL,DIL JNZ 0x00107014 CMP RCX,RAX JBE 0x00107090 LEA RAX,[RCX + -0x1] CMP byte ptr [RCX + -0x1],0x2c CMOVNZ RAX,RCX JMP 0x00107093 LAB_00107090: MOV RAX,RCX LAB_00107093: MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [0x0010f5b0] MOV dword ptr [R14],0x0 MOV qword ptr [RBP + -0x48],RAX MOV AL,byte ptr [RAX] MOV qword ptr [RBP + -0x40],0x0 MOV EDX,0x0 TEST AL,AL JNZ 0x00106d77 JMP 0x0010710e LAB_001070c1: DEC R15 JMP 0x00106ff1 LAB_001070c9: CMP R15,qword ptr [RBP + -0x48] JBE 0x001070db CMP byte ptr [R15 + -0x1],0x2c JNZ 0x001070db MOV byte ptr [R15 + -0x1],0x0 LAB_001070db: MOV RAX,qword ptr [RBP + -0x30] MOVSXD RSI,dword ptr [RAX] TEST RSI,RSI JZ 0x0010710e MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x8] LEA RCX,[0x105dd7] MOV EDX,0x10 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001030a0 LAB_0010710e: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void user_coll_fill(int *param_1,byte *param_2,int *param_3,int param_4) { byte bVar1; bool bVar2; byte bVar3; char *pcVar4; byte *pbVar5; void *pvVar6; int iVar7; long lVar8; byte *pbVar9; int *piVar10; byte *pbVar11; size_t __size; byte *pbVar12; ulong uVar13; bool bVar14; byte *local_58; byte *local_50; *param_1 = 0; bVar3 = *param_2; if (bVar3 == 0) { return; } bVar14 = param_4 != 0; local_50 = param_2; do { piVar10 = param_3; bVar2 = false; pbVar12 = local_50; do { local_58 = pbVar12 + 1; while( true ) { while( true ) { if (bVar3 == 0) { return; } if (bVar3 != 0x20) break; bVar3 = pbVar12[1]; pbVar12 = pbVar12 + 1; local_58 = local_58 + 1; } uVar13 = 0; while ((0x2c < bVar3 || ((0x100100000001U >> ((ulong)bVar3 & 0x3f) & 1) == 0))) { bVar3 = pbVar12[uVar13 + 1]; uVar13 = uVar13 + 1; } if (piVar10 == (int *)0x0) goto LAB_00106f5a; pcVar4 = (char *)coll_search(piVar10,pbVar12,uVar13); if (pcVar4 != (char *)0x0 && !(bool)(~bVar14 & 1)) break; if (pcVar4 == (char *)0x0) goto LAB_00106f5a; pthread_mutex_lock((pthread_mutex_t *)lock_atomic); internal_stop_logging = internal_stop_logging + 1; pthread_mutex_unlock((pthread_mutex_t *)lock_atomic); if (started_mysql == '\0') { (**(code **)(*(long *)PTR_my_print_error_service_0010bf58 + 8)) (1,"User \'%.*b\' is in the server_audit_incl_users, so wasn\'t added.",0x800, uVar13 & 0xffffffff,pbVar12); } pthread_mutex_lock((pthread_mutex_t *)lock_atomic); internal_stop_logging = internal_stop_logging + -1; pthread_mutex_unlock((pthread_mutex_t *)lock_atomic); pbVar5 = pbVar12; while( true ) { if (*pbVar5 == 0) { *pbVar12 = 0; goto LAB_00106ff1; } if (*pbVar5 == 0x2c) break; pbVar5 = pbVar5 + 1; } do { bVar3 = pbVar5[1]; pbVar5 = pbVar5 + 1; } while (bVar3 == 0x20); *pbVar12 = bVar3; if (bVar3 == 0) goto LAB_00106ff1; lVar8 = 1; do { bVar3 = pbVar5[lVar8]; pbVar12[lVar8] = bVar3; lVar8 = lVar8 + 1; } while (bVar3 != 0); bVar3 = *pbVar12; if (bVar3 == 0) goto LAB_00106ff1; } pthread_mutex_lock((pthread_mutex_t *)lock_atomic); internal_stop_logging = internal_stop_logging + 1; pthread_mutex_unlock((pthread_mutex_t *)lock_atomic); if (started_mysql == '\0') { (**(code **)(*(long *)PTR_my_print_error_service_0010bf58 + 8)) (1,"User \'%.*b\' was removed from the server_audit_excl_users.",0x800, uVar13 & 0xffffffff,pbVar12); } pthread_mutex_lock((pthread_mutex_t *)lock_atomic); internal_stop_logging = internal_stop_logging + -1; pthread_mutex_unlock((pthread_mutex_t *)lock_atomic); for (; (*pcVar4 != '\0' && (*pcVar4 != ',')); pcVar4 = pcVar4 + 1) { *pcVar4 = ' '; } bVar2 = true; LAB_00106f5a: iVar7 = *param_1; if (iVar7 < param_1[4]) { pvVar6 = *(void **)(param_1 + 2); } else { lVar8 = (long)param_1[4] + 0x80; param_1[4] = (int)lVar8; __size = lVar8 * 0x10; if (*(void **)(param_1 + 2) == (void *)0x0) { pvVar6 = malloc(__size); } else { pvVar6 = realloc(*(void **)(param_1 + 2),__size); } *(void **)(param_1 + 2) = pvVar6; if (pvVar6 == (void *)0x0) { return; } iVar7 = *param_1; } *(byte **)((long)pvVar6 + (long)iVar7 * 0x10 + 8) = pbVar12; *(ulong *)(*(long *)(param_1 + 2) + (long)*param_1 * 0x10) = uVar13; *param_1 = *param_1 + 1; while( true ) { if (local_58[-1] == 0) { pbVar12 = local_58 + -1; goto LAB_00106ff1; } if (local_58[-1] == 0x2c) break; local_58 = local_58 + 1; } bVar3 = *local_58; pbVar12 = local_58; } while (bVar3 != 0); LAB_00106ff1: pbVar5 = excl_users; if (!bVar2) { if ((local_50 < pbVar12) && (pbVar12[-1] == 0x2c)) { pbVar12[-1] = 0; } if ((long)*param_1 == 0) { return; } qsort(*(void **)(param_1 + 2),(long)*param_1,0x10,cmp_users); return; } bVar3 = *excl_users; pbVar12 = excl_users; pbVar9 = excl_users; if (bVar3 != 0) { LAB_00107014: bVar1 = 1; pbVar11 = pbVar12; do { if (bVar3 != 0x20) { if ((bVar3 == 0) || (bVar3 == 0x2c)) goto LAB_0010703e; bVar1 = 0; } bVar3 = pbVar11[1]; pbVar11 = pbVar11 + 1; } while( true ); } LAB_00107093: *pbVar12 = 0; local_50 = excl_users; *piVar10 = 0; bVar3 = *local_50; bVar14 = false; param_3 = (int *)0x0; param_1 = piVar10; if (bVar3 == 0) { return; } } while( true ); LAB_0010703e: if (!(bool)(pbVar11 < pbVar12 | bVar1)) { do { bVar3 = *pbVar12; pbVar12 = pbVar12 + 1; *pbVar9 = bVar3; pbVar9 = pbVar9 + 1; } while (pbVar12 <= pbVar11); bVar3 = *pbVar11; } bVar14 = bVar3 == 0x2c; bVar3 = pbVar11[bVar14]; pbVar12 = pbVar11 + bVar14; if (bVar3 == 0) { pbVar12 = pbVar9; if ((pbVar5 < pbVar9) && (pbVar12 = pbVar9 + -1, pbVar9[-1] != 0x2c)) { pbVar12 = pbVar9; } goto LAB_00107093; } goto LAB_00107014; }
39,229
get_length_arg
eloqsql/strings/my_vsnprintf.c
static const char *get_length_arg(const char *fmt, ARGS_INFO *args_arr, size_t *arg_count, size_t *length, uint *flags) { fmt= get_length(fmt+1, length, flags); *arg_count= MY_MAX(*arg_count, *length); (*length)--; DBUG_ASSERT(*fmt == '$' && *length < MAX_ARGS); args_arr[*length].arg_type= 'd'; args_arr[*length].have_longlong= 0; return fmt+1; }
O0
c
get_length_arg: 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 %r8, -0x28(%rbp) movq -0x8(%rbp), %rdi addq $0x1, %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx callq 0x7b820 movq %rax, -0x8(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movq -0x20(%rbp), %rcx cmpq (%rcx), %rax jbe 0x7d632 movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) jmp 0x7d63d movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rax movq (%rax), %rcx addq $-0x1, %rcx movq %rcx, (%rax) jmp 0x7d658 movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx shlq $0x5, %rcx addq %rcx, %rax movb $0x64, (%rax) movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx movq (%rcx), %rcx shlq $0x5, %rcx addq %rcx, %rax movl $0x0, 0x4(%rax) movq -0x8(%rbp), %rax addq $0x1, %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_length_arg: 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 [rbp+var_28], r8 mov rdi, [rbp+var_8] add rdi, 1 mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] call get_length mov [rbp+var_8], rax mov rax, [rbp+var_18] mov rax, [rax] mov rcx, [rbp+var_20] cmp rax, [rcx] jbe short loc_7D632 mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_30], rax jmp short loc_7D63D loc_7D632: mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_30], rax loc_7D63D: mov rcx, [rbp+var_30] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_20] mov rcx, [rax] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax], rcx jmp short $+2 loc_7D658: mov rax, [rbp+var_10] mov rcx, [rbp+var_20] mov rcx, [rcx] shl rcx, 5 add rax, rcx mov byte ptr [rax], 64h ; 'd' mov rax, [rbp+var_10] mov rcx, [rbp+var_20] mov rcx, [rcx] shl rcx, 5 add rax, rcx mov dword ptr [rax+4], 0 mov rax, [rbp+var_8] add rax, 1 add rsp, 30h pop rbp retn
unsigned __int8 * get_length_arg(long long a1, long long a2, long long *a3, long long *a4, _DWORD *a5) { long long v6; // [rsp+0h] [rbp-30h] unsigned __int8 *length; // [rsp+28h] [rbp-8h] length = get_length((unsigned __int8 *)(a1 + 1), a4, a5); if ( *a3 <= (unsigned long long)*a4 ) v6 = *a4; else v6 = *a3; *a3 = v6; --*a4; *(_BYTE *)(32 * *a4 + a2) = 100; *(_DWORD *)(32 * *a4 + a2 + 4) = 0; return length + 1; }
get_length_arg: 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 qword ptr [RBP + -0x28],R8 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x1 MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] CALL 0x0017b820 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RCX] JBE 0x0017d632 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX JMP 0x0017d63d LAB_0017d632: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX LAB_0017d63d: MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] ADD RCX,-0x1 MOV qword ptr [RAX],RCX JMP 0x0017d658 LAB_0017d658: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] SHL RCX,0x5 ADD RAX,RCX MOV byte ptr [RAX],0x64 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX] SHL RCX,0x5 ADD RAX,RCX MOV dword ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 ADD RSP,0x30 POP RBP RET
long get_length_arg(long param_1,long param_2,ulong *param_3,ulong *param_4,int8 param_5) { long lVar1; int8 local_38; lVar1 = get_length(param_1 + 1,param_4,param_5); if (*param_4 < *param_3) { local_38 = *param_3; } else { local_38 = *param_4; } *param_3 = local_38; *param_4 = *param_4 - 1; *(int1 *)(param_2 + *param_4 * 0x20) = 100; *(int4 *)(param_2 + *param_4 * 0x20 + 4) = 0; return lVar1 + 1; }
39,230
LefDefParser::lefwNonDefaultRuleUseViaRule(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwNonDefaultRuleUseViaRule(const char *viaRuleName) { if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_NONDEFAULTRULE_START && lefwState != LEFW_NONDEFAULTRULE) return LEFW_BAD_ORDER; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " USEVIARULE %s ;\n", viaRuleName); else fprintf(lefwFile, " USEVIARULE %s ;\n", viaRuleName); return LEFW_OK; }
O3
cpp
LefDefParser::lefwNonDefaultRuleUseViaRule(char const*): pushq %rbx movq %rdi, %rdx leaq 0x14ed0(%rip), %rax # 0x24e00 movq (%rax), %rdi testq %rdi, %rdi je 0xff77 leaq 0x15115(%rip), %rax # 0x25054 movl $0x2, %ebx cmpl $0x0, (%rax) je 0xff8e leaq 0x15100(%rip), %rax # 0x25050 movl (%rax), %eax cmpl $0x3b, %eax je 0xff5c cmpl $0xb, %eax jne 0xff8e cmpb $0x1, 0x15189(%rip) # 0x250ec jne 0xff7e leaq 0xb488(%rip), %rsi # 0x1b3f4 xorl %ebx, %ebx xorl %eax, %eax callq 0x18c35 jmp 0xff8e movl $0x1, %ebx jmp 0xff8e leaq 0xb46f(%rip), %rsi # 0x1b3f4 xorl %ebx, %ebx xorl %eax, %eax callq 0x10f0 movl %ebx, %eax popq %rbx retq
_ZN12LefDefParser28lefwNonDefaultRuleUseViaRuleEPKc: push rbx mov rdx, rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_FF77 lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit mov ebx, 2 cmp dword ptr [rax], 0 jz short loc_FF8E lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState mov eax, [rax] cmp eax, 3Bh ; ';' jz short loc_FF5C cmp eax, 0Bh jnz short loc_FF8E loc_FF5C: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_FF7E lea rsi, aUseviaruleS; " USEVIARULE %s ;\n" xor ebx, ebx xor eax, eax call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_FF8E loc_FF77: mov ebx, 1 jmp short loc_FF8E loc_FF7E: lea rsi, aUseviaruleS; " USEVIARULE %s ;\n" xor ebx, ebx xor eax, eax call _fprintf loc_FF8E: mov eax, ebx pop rbx retn
long long LefDefParser::lefwNonDefaultRuleUseViaRule( LefDefParser *this, const char *a2, long long a3, int a4, int a5, int a6) { unsigned int v6; // ebx if ( *(_QWORD *)&LefDefParser::lefwFile ) { v6 = 2; if ( LefDefParser::lefwDidInit && (LefDefParser::lefwState == 59 || LefDefParser::lefwState == 11) ) { v6 = 0; if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" USEVIARULE %s ;\n", (_DWORD)this, a4, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " USEVIARULE %s ;\n", (const char *)this); } } else { return 1; } return v6; }
lefwNonDefaultRuleUseViaRule: PUSH RBX MOV RDX,RDI LEA RAX,[0x124e00] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x0010ff77 LEA RAX,[0x125054] MOV EBX,0x2 CMP dword ptr [RAX],0x0 JZ 0x0010ff8e LEA RAX,[0x125050] MOV EAX,dword ptr [RAX] CMP EAX,0x3b JZ 0x0010ff5c CMP EAX,0xb JNZ 0x0010ff8e LAB_0010ff5c: CMP byte ptr [0x001250ec],0x1 JNZ 0x0010ff7e LEA RSI,[0x11b3f4] XOR EBX,EBX XOR EAX,EAX CALL 0x00118c35 JMP 0x0010ff8e LAB_0010ff77: MOV EBX,0x1 JMP 0x0010ff8e LAB_0010ff7e: LEA RSI,[0x11b3f4] XOR EBX,EBX XOR EAX,EAX CALL 0x001010f0 LAB_0010ff8e: MOV EAX,EBX POP RBX RET
/* LefDefParser::lefwNonDefaultRuleUseViaRule(char const*) */ int8 LefDefParser::lefwNonDefaultRuleUseViaRule(char *param_1) { int8 uVar1; if (lefwFile == (_IO_FILE *)0x0) { uVar1 = 1; } else { uVar1 = 2; if ((lefwDidInit != 0) && ((lefwState == 0x3b || (lefwState == 0xb)))) { if (lefwWriteEncrypt == '\x01') { uVar1 = 0; encPrint(lefwFile," USEVIARULE %s ;\n"); } else { uVar1 = 0; fprintf(lefwFile," USEVIARULE %s ;\n",param_1); } } } return uVar1; }
39,231
JS_WriteRegExp
bluesky950520[P]quickjs/quickjs.c
static int JS_WriteRegExp(BCWriterState *s, JSRegExp regexp) { JSString *bc = regexp.bytecode; assert(!bc->is_wide_char); JS_WriteString(s, regexp.pattern); if (is_be()) lre_byte_swap(bc->u.str8, bc->len, /*is_byte_swapped*/FALSE); JS_WriteString(s, bc); if (is_be()) lre_byte_swap(bc->u.str8, bc->len, /*is_byte_swapped*/TRUE); return 0; }
O0
c
JS_WriteRegExp: subq $0x28, %rsp movq %rsi, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq %rdi, 0x10(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x77c50 callq 0x2cc60 cmpb $0x0, %al je 0x78e78 movq 0x8(%rsp), %rdi addq $0x18, %rdi movq 0x8(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, %eax movl %eax, %esi xorl %edx, %edx callq 0xfff70 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x77c50 callq 0x2cc60 cmpb $0x0, %al je 0x78eb6 movq 0x8(%rsp), %rdi addq $0x18, %rdi movq 0x8(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, %eax movl %eax, %esi movl $0x1, %edx callq 0xfff70 xorl %eax, %eax addq $0x28, %rsp retq nopl (%rax)
JS_WriteRegExp: sub rsp, 28h mov [rsp+28h+var_10], rsi mov [rsp+28h+var_8], rdx mov [rsp+28h+var_18], rdi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_18] mov rsi, [rsp+28h+var_10] call JS_WriteString call is_be_0 cmp al, 0 jz short loc_78E78 mov rdi, [rsp+28h+var_20] add rdi, 18h mov rax, [rsp+28h+var_20] mov rax, [rax+4] and rax, 7FFFFFFFh mov eax, eax mov esi, eax xor edx, edx call lre_byte_swap loc_78E78: mov rdi, [rsp+28h+var_18] mov rsi, [rsp+28h+var_20] call JS_WriteString call is_be_0 cmp al, 0 jz short loc_78EB6 mov rdi, [rsp+28h+var_20] add rdi, 18h mov rax, [rsp+28h+var_20] mov rax, [rax+4] and rax, 7FFFFFFFh mov eax, eax mov esi, eax mov edx, 1 call lre_byte_swap loc_78EB6: xor eax, eax add rsp, 28h retn
long long JS_WriteRegExp(long long a1, long long a2, long long a3) { JS_WriteString(a1, a2); if ( is_be_0() ) lre_byte_swap(a3 + 24, *(_DWORD *)(a3 + 4) & 0x7FFFFFFF, 0LL); JS_WriteString(a1, a3); if ( is_be_0() ) lre_byte_swap(a3 + 24, *(_DWORD *)(a3 + 4) & 0x7FFFFFFF, 1LL); return 0LL; }
JS_WriteRegExp: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00177c50 CALL 0x0012cc60 CMP AL,0x0 JZ 0x00178e78 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x18 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV EAX,EAX MOV ESI,EAX XOR EDX,EDX CALL 0x001fff70 LAB_00178e78: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00177c50 CALL 0x0012cc60 CMP AL,0x0 JZ 0x00178eb6 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x18 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV EAX,EAX MOV ESI,EAX MOV EDX,0x1 CALL 0x001fff70 LAB_00178eb6: XOR EAX,EAX ADD RSP,0x28 RET
int8 JS_WriteRegExp(int8 param_1,int8 param_2,long param_3) { char cVar1; JS_WriteString(param_1,param_2); cVar1 = is_be(); if (cVar1 != '\0') { lre_byte_swap(param_3 + 0x18,(uint)*(int8 *)(param_3 + 4) & 0x7fffffff,0); } JS_WriteString(param_1,param_3); cVar1 = is_be(); if (cVar1 != '\0') { lre_byte_swap(param_3 + 0x18,(uint)*(int8 *)(param_3 + 4) & 0x7fffffff,1); } return 0; }
39,232
c4_state_free
corpus-core[P]colibri-stateless/src/util/state.c
void c4_state_free(c4_state_t* state) { data_request_t* data_request = state->requests; while (data_request) { data_request_t* next = data_request->next; if (data_request->url) safe_free(data_request->url); if (data_request->error) safe_free(data_request->error); if (data_request->payload.data) safe_free(data_request->payload.data); if (data_request->response.data) safe_free(data_request->response.data); safe_free(data_request); data_request = next; } if (state->error) safe_free(state->error); }
O0
c
c4_state_free: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x222c4 movq -0x10(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x22266 movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi callq 0x18740 movq -0x10(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x2227e movq -0x10(%rbp), %rax movq 0x48(%rax), %rdi callq 0x18740 movq -0x10(%rbp), %rax cmpq $0x0, 0x28(%rax) je 0x22296 movq -0x10(%rbp), %rax movq 0x28(%rax), %rdi callq 0x18740 movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x222ae movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x18740 movq -0x10(%rbp), %rdi callq 0x18740 movq -0x18(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x22237 movq -0x8(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x222dc movq -0x8(%rbp), %rax movq 0x8(%rax), %rdi callq 0x18740 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
c4_state_free: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_10], rax loc_22237: cmp [rbp+var_10], 0 jz loc_222C4 mov rax, [rbp+var_10] mov rax, [rax+50h] mov [rbp+var_18], rax mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jz short loc_22266 mov rax, [rbp+var_10] mov rdi, [rax+10h] call safe_free loc_22266: mov rax, [rbp+var_10] cmp qword ptr [rax+48h], 0 jz short loc_2227E mov rax, [rbp+var_10] mov rdi, [rax+48h] call safe_free loc_2227E: mov rax, [rbp+var_10] cmp qword ptr [rax+28h], 0 jz short loc_22296 mov rax, [rbp+var_10] mov rdi, [rax+28h] call safe_free loc_22296: mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jz short loc_222AE mov rax, [rbp+var_10] mov rdi, [rax+38h] call safe_free loc_222AE: mov rdi, [rbp+var_10] call safe_free mov rax, [rbp+var_18] mov [rbp+var_10], rax jmp loc_22237 loc_222C4: mov rax, [rbp+var_8] cmp qword ptr [rax+8], 0 jz short loc_222DC mov rax, [rbp+var_8] mov rdi, [rax+8] call safe_free loc_222DC: add rsp, 20h pop rbp retn
long long c4_state_free(long long a1) { long long result; // rax long long *v2; // [rsp+8h] [rbp-18h] long long *i; // [rsp+10h] [rbp-10h] for ( i = *(long long **)a1; i; i = v2 ) { v2 = (long long *)i[10]; if ( i[2] ) safe_free(i[2]); if ( i[9] ) safe_free(i[9]); if ( i[5] ) safe_free(i[5]); if ( i[7] ) safe_free(i[7]); safe_free((long long)i); } result = a1; if ( *(_QWORD *)(a1 + 8) ) return safe_free(*(_QWORD *)(a1 + 8)); return result; }
c4_state_free: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX LAB_00122237: CMP qword ptr [RBP + -0x10],0x0 JZ 0x001222c4 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00122266 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] CALL 0x00118740 LAB_00122266: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x48],0x0 JZ 0x0012227e MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x48] CALL 0x00118740 LAB_0012227e: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x28],0x0 JZ 0x00122296 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x28] CALL 0x00118740 LAB_00122296: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JZ 0x001222ae MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x00118740 LAB_001222ae: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00118740 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x10],RAX JMP 0x00122237 LAB_001222c4: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x8],0x0 JZ 0x001222dc MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00118740 LAB_001222dc: ADD RSP,0x20 POP RBP RET
void c4_state_free(long *param_1) { long lVar1; long local_18; local_18 = *param_1; while (local_18 != 0) { lVar1 = *(long *)(local_18 + 0x50); if (*(long *)(local_18 + 0x10) != 0) { safe_free(*(int8 *)(local_18 + 0x10)); } if (*(long *)(local_18 + 0x48) != 0) { safe_free(*(int8 *)(local_18 + 0x48)); } if (*(long *)(local_18 + 0x28) != 0) { safe_free(*(int8 *)(local_18 + 0x28)); } if (*(long *)(local_18 + 0x38) != 0) { safe_free(*(int8 *)(local_18 + 0x38)); } safe_free(local_18); local_18 = lVar1; } if (param_1[1] != 0) { safe_free(param_1[1]); } return; }
39,233
pow5mult
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static Bigint *pow5mult(Bigint *b, int k, Stack_alloc *alloc) { Bigint *b1, *p5, *p51=NULL; int i; static int p05[3]= { 5, 25, 125 }; my_bool overflow= FALSE; if ((i= k & 3)) b= multadd(b, p05[i-1], 0, alloc); if (!(k>>= 2)) return b; p5= p5_a; for (;;) { if (k & 1) { b1= mult(b, p5, alloc); Bfree(b, alloc); b= b1; } if (!(k>>= 1)) break; /* Calculate next power of 5 */ if (overflow) { p51= mult(p5, p5, alloc); Bfree(p5, alloc); p5= p51; } else if (p5 < p5_a + P5A_MAX) ++p5; else if (p5 == p5_a + P5A_MAX) { p5= mult(p5, p5, alloc); overflow= TRUE; } } if (p51) Bfree(p51, alloc); return b; }
O0
c
pow5mult: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq $0x0, -0x38(%rbp) movb $0x0, -0x3d(%rbp) movl -0x14(%rbp), %eax andl $0x3, %eax movl %eax, -0x3c(%rbp) cmpl $0x0, %eax je 0x38da3 movq -0x10(%rbp), %rdi movl -0x3c(%rbp), %eax subl $0x1, %eax movslq %eax, %rcx leaq 0x2b17f(%rip), %rax # 0x63f10 movl (%rax,%rcx,4), %esi movq -0x20(%rbp), %rcx xorl %edx, %edx callq 0x394e0 movq %rax, -0x10(%rbp) movl -0x14(%rbp), %eax sarl $0x2, %eax movl %eax, -0x14(%rbp) cmpl $0x0, %eax jne 0x38dbe movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x38eb4 leaq 0x2b15b(%rip), %rax # 0x63f20 movq %rax, -0x30(%rbp) movl -0x14(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x38dfe movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x38ec0 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x39110 movq -0x28(%rbp), %rax movq %rax, -0x10(%rbp) movl -0x14(%rbp), %eax sarl %eax movl %eax, -0x14(%rbp) cmpl $0x0, %eax jne 0x38e10 jmp 0x38e98 cmpb $0x0, -0x3d(%rbp) je 0x38e42 movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x38ec0 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x39110 movq -0x38(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x38e93 leaq 0x2b0d7(%rip), %rax # 0x63f20 addq $0x90, %rax cmpq %rax, -0x30(%rbp) jae 0x38e63 movq -0x30(%rbp), %rax addq $0x18, %rax movq %rax, -0x30(%rbp) jmp 0x38e91 leaq 0x2b0b6(%rip), %rax # 0x63f20 addq $0x90, %rax cmpq %rax, -0x30(%rbp) jne 0x38e8f movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x38ec0 movq %rax, -0x30(%rbp) movb $0x1, -0x3d(%rbp) jmp 0x38e91 jmp 0x38e93 jmp 0x38dc9 cmpq $0x0, -0x38(%rbp) je 0x38eac movq -0x38(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x39110 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nop
pow5mult: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_38], 0 mov [rbp+var_3D], 0 mov eax, [rbp+var_14] and eax, 3 mov [rbp+var_3C], eax cmp eax, 0 jz short loc_38DA3 mov rdi, [rbp+var_10] mov eax, [rbp+var_3C] sub eax, 1 movsxd rcx, eax lea rax, pow5mult_p05 mov esi, [rax+rcx*4] mov rcx, [rbp+var_20] xor edx, edx call multadd mov [rbp+var_10], rax loc_38DA3: mov eax, [rbp+var_14] sar eax, 2 mov [rbp+var_14], eax cmp eax, 0 jnz short loc_38DBE mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp loc_38EB4 loc_38DBE: lea rax, p5_a mov [rbp+var_30], rax loc_38DC9: mov eax, [rbp+var_14] and eax, 1 cmp eax, 0 jz short loc_38DFE mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] call mult mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call Bfree mov rax, [rbp+var_28] mov [rbp+var_10], rax loc_38DFE: mov eax, [rbp+var_14] sar eax, 1 mov [rbp+var_14], eax cmp eax, 0 jnz short loc_38E10 jmp loc_38E98 loc_38E10: cmp [rbp+var_3D], 0 jz short loc_38E42 mov rdi, [rbp+var_30] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] call mult mov [rbp+var_38], rax mov rdi, [rbp+var_30] mov rsi, [rbp+var_20] call Bfree mov rax, [rbp+var_38] mov [rbp+var_30], rax jmp short loc_38E93 loc_38E42: lea rax, p5_a add rax, 90h cmp [rbp+var_30], rax jnb short loc_38E63 mov rax, [rbp+var_30] add rax, 18h mov [rbp+var_30], rax jmp short loc_38E91 loc_38E63: lea rax, p5_a add rax, 90h cmp [rbp+var_30], rax jnz short loc_38E8F mov rdi, [rbp+var_30] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] call mult mov [rbp+var_30], rax mov [rbp+var_3D], 1 loc_38E8F: jmp short $+2 loc_38E91: jmp short $+2 loc_38E93: jmp loc_38DC9 loc_38E98: cmp [rbp+var_38], 0 jz short loc_38EAC mov rdi, [rbp+var_38] mov rsi, [rbp+var_20] call Bfree loc_38EAC: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_38EB4: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long pow5mult(long long a1, int a2, long long a3) { char v4; // [rsp+3h] [rbp-3Dh] _BYTE v5[12]; // [rsp+4h] [rbp-3Ch] _UNKNOWN **v6; // [rsp+10h] [rbp-30h] long long v7; // [rsp+18h] [rbp-28h] int v9; // [rsp+2Ch] [rbp-14h] long long v10; // [rsp+30h] [rbp-10h] v10 = a1; *(_DWORD *)&v5[8] = 0; v4 = 0; *(_QWORD *)v5 = a2 & 3; if ( (a2 & 3) != 0 ) v10 = multadd(a1, pow5mult_p05[*(_DWORD *)v5 - 1], 0LL, a3); v9 = a2 >> 2; if ( !(a2 >> 2) ) return v10; v6 = &p5_a; while ( 1 ) { if ( (v9 & 1) != 0 ) { v7 = mult(v10, v6, a3); Bfree(v10, a3); v10 = v7; } v9 >>= 1; if ( !v9 ) break; if ( v4 ) { *(_QWORD *)&v5[4] = mult(v6, v6, a3); Bfree(v6, a3); v6 = *(_UNKNOWN ***)&v5[4]; } else if ( v6 >= &p5_a + 18 ) { if ( v6 == &p5_a + 18 ) { v6 = (_UNKNOWN **)mult(v6, v6, a3); v4 = 1; } } else { v6 += 3; } } if ( *(_QWORD *)&v5[4] ) Bfree(*(_QWORD *)&v5[4], a3); return v10; }
pow5mult: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x38],0x0 MOV byte ptr [RBP + -0x3d],0x0 MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x3 MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JZ 0x00138da3 MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x3c] SUB EAX,0x1 MOVSXD RCX,EAX LEA RAX,[0x163f10] MOV ESI,dword ptr [RAX + RCX*0x4] MOV RCX,qword ptr [RBP + -0x20] XOR EDX,EDX CALL 0x001394e0 MOV qword ptr [RBP + -0x10],RAX LAB_00138da3: MOV EAX,dword ptr [RBP + -0x14] SAR EAX,0x2 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JNZ 0x00138dbe MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX JMP 0x00138eb4 LAB_00138dbe: LEA RAX,[0x163f20] MOV qword ptr [RBP + -0x30],RAX LAB_00138dc9: MOV EAX,dword ptr [RBP + -0x14] AND EAX,0x1 CMP EAX,0x0 JZ 0x00138dfe MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00138ec0 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00139110 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x10],RAX LAB_00138dfe: MOV EAX,dword ptr [RBP + -0x14] SAR EAX,0x1 MOV dword ptr [RBP + -0x14],EAX CMP EAX,0x0 JNZ 0x00138e10 JMP 0x00138e98 LAB_00138e10: CMP byte ptr [RBP + -0x3d],0x0 JZ 0x00138e42 MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00138ec0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00139110 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x30],RAX JMP 0x00138e93 LAB_00138e42: LEA RAX,[0x163f20] ADD RAX,0x90 CMP qword ptr [RBP + -0x30],RAX JNC 0x00138e63 MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x18 MOV qword ptr [RBP + -0x30],RAX JMP 0x00138e91 LAB_00138e63: LEA RAX,[0x163f20] ADD RAX,0x90 CMP qword ptr [RBP + -0x30],RAX JNZ 0x00138e8f MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00138ec0 MOV qword ptr [RBP + -0x30],RAX MOV byte ptr [RBP + -0x3d],0x1 LAB_00138e8f: JMP 0x00138e91 LAB_00138e91: JMP 0x00138e93 LAB_00138e93: JMP 0x00138dc9 LAB_00138e98: CMP qword ptr [RBP + -0x38],0x0 JZ 0x00138eac MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x20] CALL 0x00139110 LAB_00138eac: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_00138eb4: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
int8 pow5mult(int8 param_1,uint param_2,int8 param_3) { bool bVar1; int8 uVar2; int1 *local_40; int1 *local_38; uint local_1c; int8 local_18; int8 local_10; local_40 = (int1 *)0x0; bVar1 = false; local_18 = param_1; if ((param_2 & 3) != 0) { local_18 = multadd(param_1,*(int4 *)(pow5mult_p05 + (long)(int)((param_2 & 3) - 1) * 4),0, param_3); } local_1c = (int)param_2 >> 2; if (local_1c == 0) { local_10 = local_18; } else { local_38 = p5_a; while( true ) { if ((local_1c & 1) != 0) { uVar2 = mult(local_18,local_38,param_3); Bfree(local_18,param_3); local_18 = uVar2; } local_1c = (int)local_1c >> 1; if (local_1c == 0) break; if (bVar1) { local_40 = (int1 *)mult(local_38,local_38,param_3); Bfree(local_38,param_3); local_38 = local_40; } else if (local_38 < (int1 *)0x163fb0) { local_38 = local_38 + 0x18; } else if (local_38 == (int1 *)0x163fb0) { local_38 = (int1 *)mult(0x163fb0,0x163fb0,param_3); bVar1 = true; } } if (local_40 != (int1 *)0x0) { Bfree(local_40,param_3); } local_10 = local_18; } return local_10; }
39,234
string_buffer_write16
bluesky950520[P]quickjs/quickjs.c
static int string_buffer_write16(StringBuffer *s, const uint16_t *p, int len) { int c = 0, i; for (i = 0; i < len; i++) { c |= p[i]; } if (s->len + len > s->size) { if (string_buffer_realloc(s, s->len + len, c)) return -1; } else if (!s->is_wide_char && c >= 0x100) { if (string_buffer_widen(s, s->size)) return -1; } if (s->is_wide_char) { memcpy(&s->str->u.str16[s->len], p, len << 1); s->len += len; } else { for (i = 0; i < len; i++) { s->str->u.str8[s->len + i] = p[i]; } s->len += len; } return 0; }
O0
c
string_buffer_write16: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movl %edx, 0xc(%rsp) movl $0x0, 0x8(%rsp) movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0xc(%rsp), %eax jge 0x762df movq 0x10(%rsp), %rax movslq 0x4(%rsp), %rcx movzwl (%rax,%rcx,2), %eax orl 0x8(%rsp), %eax movl %eax, 0x8(%rsp) movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x762b2 movq 0x18(%rsp), %rax movl 0x10(%rax), %eax addl 0xc(%rsp), %eax movq 0x18(%rsp), %rcx cmpl 0x14(%rcx), %eax jle 0x76323 movq 0x18(%rsp), %rdi movq 0x18(%rsp), %rax movl 0x10(%rax), %esi addl 0xc(%rsp), %esi movl 0x8(%rsp), %edx callq 0x75fc0 cmpl $0x0, %eax je 0x76321 movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x7640d jmp 0x76360 movq 0x18(%rsp), %rax cmpl $0x0, 0x18(%rax) jne 0x7635e cmpl $0x100, 0x8(%rsp) # imm = 0x100 jl 0x7635e movq 0x18(%rsp), %rdi movq 0x18(%rsp), %rax movl 0x14(%rax), %esi callq 0x76190 cmpl $0x0, %eax je 0x7635c movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x7640d jmp 0x7635e jmp 0x76360 movq 0x18(%rsp), %rax cmpl $0x0, 0x18(%rax) je 0x763ab movq 0x18(%rsp), %rax movq 0x8(%rax), %rdi addq $0x18, %rdi movq 0x18(%rsp), %rax movslq 0x10(%rax), %rax shlq %rax addq %rax, %rdi movq 0x10(%rsp), %rsi movl 0xc(%rsp), %eax shll %eax movslq %eax, %rdx callq 0xe610 movl 0xc(%rsp), %ecx movq 0x18(%rsp), %rax addl 0x10(%rax), %ecx movl %ecx, 0x10(%rax) jmp 0x76405 movl $0x0, 0x4(%rsp) movl 0x4(%rsp), %eax cmpl 0xc(%rsp), %eax jge 0x763f6 movq 0x10(%rsp), %rax movslq 0x4(%rsp), %rcx movw (%rax,%rcx,2), %ax movb %al, %dl movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq 0x18(%rsp), %rcx movl 0x10(%rcx), %ecx addl 0x4(%rsp), %ecx movslq %ecx, %rcx movb %dl, 0x18(%rax,%rcx) movl 0x4(%rsp), %eax addl $0x1, %eax movl %eax, 0x4(%rsp) jmp 0x763b3 movl 0xc(%rsp), %ecx movq 0x18(%rsp), %rax addl 0x10(%rax), %ecx movl %ecx, 0x10(%rax) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
string_buffer_write16: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_1C], edx mov [rsp+28h+var_20], 0 mov [rsp+28h+var_24], 0 loc_762B2: mov eax, [rsp+28h+var_24] cmp eax, [rsp+28h+var_1C] jge short loc_762DF mov rax, [rsp+28h+var_18] movsxd rcx, [rsp+28h+var_24] movzx eax, word ptr [rax+rcx*2] or eax, [rsp+28h+var_20] mov [rsp+28h+var_20], eax mov eax, [rsp+28h+var_24] add eax, 1 mov [rsp+28h+var_24], eax jmp short loc_762B2 loc_762DF: mov rax, [rsp+28h+var_10] mov eax, [rax+10h] add eax, [rsp+28h+var_1C] mov rcx, [rsp+28h+var_10] cmp eax, [rcx+14h] jle short loc_76323 mov rdi, [rsp+28h+var_10] mov rax, [rsp+28h+var_10] mov esi, [rax+10h] add esi, [rsp+28h+var_1C] mov edx, [rsp+28h+var_20] call string_buffer_realloc cmp eax, 0 jz short loc_76321 mov [rsp+28h+var_4], 0FFFFFFFFh jmp loc_7640D loc_76321: jmp short loc_76360 loc_76323: mov rax, [rsp+28h+var_10] cmp dword ptr [rax+18h], 0 jnz short loc_7635E cmp [rsp+28h+var_20], 100h jl short loc_7635E mov rdi, [rsp+28h+var_10] mov rax, [rsp+28h+var_10] mov esi, [rax+14h] call string_buffer_widen cmp eax, 0 jz short loc_7635C mov [rsp+28h+var_4], 0FFFFFFFFh jmp loc_7640D loc_7635C: jmp short $+2 loc_7635E: jmp short $+2 loc_76360: mov rax, [rsp+28h+var_10] cmp dword ptr [rax+18h], 0 jz short loc_763AB mov rax, [rsp+28h+var_10] mov rdi, [rax+8] add rdi, 18h mov rax, [rsp+28h+var_10] movsxd rax, dword ptr [rax+10h] shl rax, 1 add rdi, rax mov rsi, [rsp+28h+var_18] mov eax, [rsp+28h+var_1C] shl eax, 1 movsxd rdx, eax call _memcpy mov ecx, [rsp+28h+var_1C] mov rax, [rsp+28h+var_10] add ecx, [rax+10h] mov [rax+10h], ecx jmp short loc_76405 loc_763AB: mov [rsp+28h+var_24], 0 loc_763B3: mov eax, [rsp+28h+var_24] cmp eax, [rsp+28h+var_1C] jge short loc_763F6 mov rax, [rsp+28h+var_18] movsxd rcx, [rsp+28h+var_24] mov ax, [rax+rcx*2] mov dl, al mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov rcx, [rsp+28h+var_10] mov ecx, [rcx+10h] add ecx, [rsp+28h+var_24] movsxd rcx, ecx mov [rax+rcx+18h], dl mov eax, [rsp+28h+var_24] add eax, 1 mov [rsp+28h+var_24], eax jmp short loc_763B3 loc_763F6: mov ecx, [rsp+28h+var_1C] mov rax, [rsp+28h+var_10] add ecx, [rax+10h] mov [rax+10h], ecx loc_76405: mov [rsp+28h+var_4], 0 loc_7640D: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long string_buffer_write16( long long a1, long long a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { int i; // [rsp+4h] [rbp-24h] int j; // [rsp+4h] [rbp-24h] int v17; // [rsp+8h] [rbp-20h] v17 = 0; for ( i = 0; i < a3; ++i ) v17 |= *(unsigned __int16 *)(a2 + 2LL * i); if ( a3 + *(_DWORD *)(a1 + 16) <= *(_DWORD *)(a1 + 20) ) { if ( !*(_DWORD *)(a1 + 24) && v17 >= 256 && (unsigned int)string_buffer_widen(a1, *(_DWORD *)(a1 + 20)) ) return (unsigned int)-1; } else if ( (unsigned int)string_buffer_realloc( a1, a3 + *(_DWORD *)(a1 + 16), (unsigned int)v17, a1, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11) ) { return (unsigned int)-1; } if ( *(_DWORD *)(a1 + 24) ) { memcpy(2LL * *(int *)(a1 + 16) + *(_QWORD *)(a1 + 8) + 24LL, a2, 2 * a3); *(_DWORD *)(a1 + 16) += a3; } else { for ( j = 0; j < a3; ++j ) *(_BYTE *)(*(_QWORD *)(a1 + 8) + j + *(_DWORD *)(a1 + 16) + 24LL) = *(_WORD *)(a2 + 2LL * j); *(_DWORD *)(a1 + 16) += a3; } return 0; }
string_buffer_write16: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV dword ptr [RSP + 0xc],EDX MOV dword ptr [RSP + 0x8],0x0 MOV dword ptr [RSP + 0x4],0x0 LAB_001762b2: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0xc] JGE 0x001762df MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0x4] MOVZX EAX,word ptr [RAX + RCX*0x2] OR EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x001762b2 LAB_001762df: MOV RAX,qword ptr [RSP + 0x18] MOV EAX,dword ptr [RAX + 0x10] ADD EAX,dword ptr [RSP + 0xc] MOV RCX,qword ptr [RSP + 0x18] CMP EAX,dword ptr [RCX + 0x14] JLE 0x00176323 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RAX + 0x10] ADD ESI,dword ptr [RSP + 0xc] MOV EDX,dword ptr [RSP + 0x8] CALL 0x00175fc0 CMP EAX,0x0 JZ 0x00176321 MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x0017640d LAB_00176321: JMP 0x00176360 LAB_00176323: MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x18],0x0 JNZ 0x0017635e CMP dword ptr [RSP + 0x8],0x100 JL 0x0017635e MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x18] MOV ESI,dword ptr [RAX + 0x14] CALL 0x00176190 CMP EAX,0x0 JZ 0x0017635c MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x0017640d LAB_0017635c: JMP 0x0017635e LAB_0017635e: JMP 0x00176360 LAB_00176360: MOV RAX,qword ptr [RSP + 0x18] CMP dword ptr [RAX + 0x18],0x0 JZ 0x001763ab MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX + 0x8] ADD RDI,0x18 MOV RAX,qword ptr [RSP + 0x18] MOVSXD RAX,dword ptr [RAX + 0x10] SHL RAX,0x1 ADD RDI,RAX MOV RSI,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0xc] SHL EAX,0x1 MOVSXD RDX,EAX CALL 0x0010e610 MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x18] ADD ECX,dword ptr [RAX + 0x10] MOV dword ptr [RAX + 0x10],ECX JMP 0x00176405 LAB_001763ab: MOV dword ptr [RSP + 0x4],0x0 LAB_001763b3: MOV EAX,dword ptr [RSP + 0x4] CMP EAX,dword ptr [RSP + 0xc] JGE 0x001763f6 MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0x4] MOV AX,word ptr [RAX + RCX*0x2] MOV DL,AL MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x18] MOV ECX,dword ptr [RCX + 0x10] ADD ECX,dword ptr [RSP + 0x4] MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1 + 0x18],DL MOV EAX,dword ptr [RSP + 0x4] ADD EAX,0x1 MOV dword ptr [RSP + 0x4],EAX JMP 0x001763b3 LAB_001763f6: MOV ECX,dword ptr [RSP + 0xc] MOV RAX,qword ptr [RSP + 0x18] ADD ECX,dword ptr [RAX + 0x10] MOV dword ptr [RAX + 0x10],ECX LAB_00176405: MOV dword ptr [RSP + 0x24],0x0 LAB_0017640d: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 string_buffer_write16(long param_1,void *param_2,int param_3) { ushort uVar1; int iVar2; int local_24; uVar1 = 0; for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 1) { uVar1 = *(ushort *)((long)param_2 + (long)local_24 * 2) | uVar1; } if (*(int *)(param_1 + 0x14) < *(int *)(param_1 + 0x10) + param_3) { iVar2 = string_buffer_realloc(param_1,*(int *)(param_1 + 0x10) + param_3,uVar1); if (iVar2 != 0) { return 0xffffffff; } } else if (((*(int *)(param_1 + 0x18) == 0) && (0xff < uVar1)) && (iVar2 = string_buffer_widen(param_1,*(int4 *)(param_1 + 0x14)), iVar2 != 0)) { return 0xffffffff; } if (*(int *)(param_1 + 0x18) == 0) { for (local_24 = 0; local_24 < param_3; local_24 = local_24 + 1) { *(char *)(*(long *)(param_1 + 8) + 0x18 + (long)(*(int *)(param_1 + 0x10) + local_24)) = (char)*(int2 *)((long)param_2 + (long)local_24 * 2); } *(int *)(param_1 + 0x10) = param_3 + *(int *)(param_1 + 0x10); } else { memcpy((void *)(*(long *)(param_1 + 8) + 0x18 + (long)*(int *)(param_1 + 0x10) * 2),param_2, (long)(param_3 << 1)); *(int *)(param_1 + 0x10) = param_3 + *(int *)(param_1 + 0x10); } return 0; }
39,235
mysql_stat
eloqsql/libmariadb/libmariadb/mariadb_lib.c
char * STDCALL mysql_stat(MYSQL *mysql) { if (ma_simple_command(mysql, COM_STATISTICS,0,0,0,0)) return mysql->net.last_error; mysql->net.read_pos[mysql->packet_length]=0; /* End of stat string */ if (!mysql->net.read_pos[0]) { SET_CLIENT_ERROR(mysql, CR_WRONG_HOST_INFO , SQLSTATE_UNKNOWN, 0); return mysql->net.last_error; } return((char*) mysql->net.read_pos); }
O0
c
mysql_stat: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movl $0x9, %esi xorl %eax, %eax movl %eax, %r9d xorl %r8d, %r8d movq %r9, %rdx movq %r9, %rcx callq 0x31620 cmpl $0x0, %eax je 0x3ae70 movq -0x10(%rbp), %rax addq $0x97, %rax movq %rax, -0x8(%rbp) jmp 0x3af15 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq -0x10(%rbp), %rcx movq 0x358(%rcx), %rcx movb $0x0, (%rax,%rcx) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax cmpb $0x0, (%rax) jne 0x3af09 jmp 0x3ae96 movq -0x10(%rbp), %rax movl $0x7d9, 0x90(%rax) # imm = 0x7D9 movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x45fea(%rip), %rax # 0x80ea0 movq (%rax), %rsi movl $0x5, %edx callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rdi addq $0x97, %rdi leaq 0x45fd0(%rip), %rax # 0x80eb0 movq 0x48(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x14220 movq -0x10(%rbp), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax addq $0x97, %rax movq %rax, -0x8(%rbp) jmp 0x3af15 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nop
mysql_stat: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] mov esi, 9 xor eax, eax mov r9d, eax xor r8d, r8d mov rdx, r9 mov rcx, r9 call ma_simple_command cmp eax, 0 jz short loc_3AE70 mov rax, [rbp+var_10] add rax, 97h mov [rbp+var_8], rax jmp loc_3AF15 loc_3AE70: mov rax, [rbp+var_10] mov rax, [rax+20h] mov rcx, [rbp+var_10] mov rcx, [rcx+358h] mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_10] mov rax, [rax+20h] cmp byte ptr [rax], 0 jnz short loc_3AF09 jmp short $+2 loc_3AE96: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D9h mov rdi, [rbp+var_10] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_10] add rdi, 97h lea rax, client_errors mov rsi, [rax+48h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] add rax, 97h mov [rbp+var_8], rax jmp short loc_3AF15 loc_3AF09: mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_8], rax loc_3AF15: mov rax, [rbp+var_8] add rsp, 10h pop rbp retn
long long mysql_stat(long long a1) { if ( (unsigned int)ma_simple_command(a1, 9u, 0LL, 0LL, 0, 0LL) ) return a1 + 151; *(_BYTE *)(*(_QWORD *)(a1 + 32) + *(_QWORD *)(a1 + 856)) = 0; if ( **(_BYTE **)(a1 + 32) ) return *(_QWORD *)(a1 + 32); *(_DWORD *)(a1 + 144) = 2009; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 668) = 0; strncpy(a1 + 151, client_errors[9], 511LL); *(_BYTE *)(a1 + 662) = 0; return a1 + 151; }
mysql_stat: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x9 XOR EAX,EAX MOV R9D,EAX XOR R8D,R8D MOV RDX,R9 MOV RCX,R9 CALL 0x00131620 CMP EAX,0x0 JZ 0x0013ae70 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x97 MOV qword ptr [RBP + -0x8],RAX JMP 0x0013af15 LAB_0013ae70: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x358] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] CMP byte ptr [RAX],0x0 JNZ 0x0013af09 JMP 0x0013ae96 LAB_0013ae96: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d9 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x180ea0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x180eb0] MOV RSI,qword ptr [RAX + 0x48] MOV EDX,0x1ff CALL 0x00114220 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x97 MOV qword ptr [RBP + -0x8],RAX JMP 0x0013af15 LAB_0013af09: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x8],RAX LAB_0013af15: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
long mysql_stat(long param_1) { int iVar1; int8 local_10; iVar1 = ma_simple_command(param_1,9,0,0,0); if (iVar1 == 0) { *(int1 *)(*(long *)(param_1 + 0x20) + *(long *)(param_1 + 0x358)) = 0; if (**(char **)(param_1 + 0x20) == '\0') { *(int4 *)(param_1 + 0x90) = 0x7d9; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; strncpy((char *)(param_1 + 0x97),PTR_s_Wrong_host_info_00180ef8,0x1ff); *(int1 *)(param_1 + 0x296) = 0; local_10 = param_1 + 0x97; } else { local_10 = *(long *)(param_1 + 0x20); } } else { local_10 = param_1 + 0x97; } return local_10; }
39,236
mju_readResource
aimrt_mujoco_sim/_deps/mujoco-src/src/engine/engine_resource.c
int mju_readResource(mjResource* resource, const void** buffer) { if (resource == NULL) { return 0; } if (resource->provider) { return resource->provider->read(resource, buffer); } // if provider is NULL, then OS filesystem is used file_spec* spec = (file_spec*) resource->data; if (!spec->fp && !spec->is_read) { mjERROR("internal error FILE pointer undefined"); // should not occur } // only read once from file if (!spec->is_read) { spec->buffer = _fileToMemory(spec->fp, resource->name, &(spec->nbuffer)); spec->fp = NULL; // closed by _fileToMemory spec->is_read = 1; } *buffer = spec->buffer; return spec->nbuffer; }
O3
c
mju_readResource: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x408, %rsp # imm = 0x408 testq %rdi, %rdi je 0x8eb4c movq %rsi, %rbx movq %rdi, %r14 movq 0x210(%rdi), %rax testq %rax, %rax je 0x8eb53 movq 0x10(%rax), %rax movq %r14, %rdi movq %rbx, %rsi addq $0x408, %rsp # imm = 0x408 popq %rbx popq %r12 popq %r14 popq %r15 jmpq *%rax xorl %eax, %eax jmp 0x8ebe2 movq 0x8(%r14), %r12 cmpq $0x0, (%r12) jne 0x8eba4 cmpl $0x0, 0x8(%r12) jne 0x8eba4 leaq 0x13f2f4(%rip), %rsi # 0x1cde61 movq %rsp, %r15 movl $0x400, %edx # imm = 0x400 movq %r15, %rdi callq 0x2d240 movabsq $0x64656e69666564, %rax # imm = 0x64656E69666564 movq %rax, 0x30(%r15) vmovups 0x13f2df(%rip), %ymm0 # 0x1cde72 vmovups %ymm0, 0x10(%r15) movq %r15, %rdi vzeroupper callq 0x2d260 cmpl $0x0, 0x8(%r12) je 0x8ebb3 movq 0x10(%r12), %rax jmp 0x8ebda movq (%r12), %rdi movq (%r14), %rsi leaq 0x18(%r12), %rdx callq 0x8ebf1 movq %rax, 0x10(%r12) movq $0x0, (%r12) movl $0x1, 0x8(%r12) movq %rax, (%rbx) movl 0x18(%r12), %eax addq $0x408, %rsp # imm = 0x408 popq %rbx popq %r12 popq %r14 popq %r15 retq
mju_readResource: push r15 push r14 push r12 push rbx sub rsp, 408h test rdi, rdi jz short loc_8EB4C mov rbx, rsi mov r14, rdi mov rax, [rdi+210h] test rax, rax jz short loc_8EB53 mov rax, [rax+10h] mov rdi, r14 mov rsi, rbx add rsp, 408h pop rbx pop r12 pop r14 pop r15 jmp rax loc_8EB4C: xor eax, eax jmp loc_8EBE2 loc_8EB53: mov r12, [r14+8] cmp qword ptr [r12], 0 jnz short loc_8EBA4 cmp dword ptr [r12+8], 0 jnz short loc_8EBA4 lea rsi, aMjuReadresourc_0; "mju_readResource" mov r15, rsp mov edx, 400h mov rdi, r15 call _strncpy mov rax, 64656E69666564h mov [r15+30h], rax vmovups ymm0, cs:ymmword_1CDE72 vmovups ymmword ptr [r15+10h], ymm0 mov rdi, r15 vzeroupper call _mju_error_raw loc_8EBA4: cmp dword ptr [r12+8], 0 jz short loc_8EBB3 mov rax, [r12+10h] jmp short loc_8EBDA loc_8EBB3: mov rdi, [r12] mov rsi, [r14] lea rdx, [r12+18h] call _fileToMemory mov [r12+10h], rax mov qword ptr [r12], 0 mov dword ptr [r12+8], 1 loc_8EBDA: mov [rbx], rax mov eax, [r12+18h] loc_8EBE2: add rsp, 408h pop rbx pop r12 pop r14 pop r15 retn
long long mju_readResource(_QWORD *a1, long long *a2) { long long v2; // rax long long v4; // r12 long long v7; // rax _QWORD v8[133]; // [rsp+0h] [rbp-428h] BYREF if ( !a1 ) return 0LL; v2 = a1[66]; if ( v2 ) return (*(long long ( **)(_QWORD *, long long *))(v2 + 16))(a1, a2); v4 = a1[1]; if ( !*(_QWORD *)v4 && !*(_DWORD *)(v4 + 8) ) { _R15 = v8; strncpy(v8, "mju_readResource", 1024LL); v8[6] = 0x64656E69666564LL; __asm { vmovups ymm0, cs:ymmword_1CDE72 vmovups ymmword ptr [r15+10h], ymm0 vzeroupper } mju_error_raw(v8); } if ( *(_DWORD *)(v4 + 8) ) { v7 = *(_QWORD *)(v4 + 16); } else { v7 = fileToMemory(*(_QWORD *)v4, *a1, v4 + 24); *(_QWORD *)(v4 + 16) = v7; *(_QWORD *)v4 = 0LL; *(_DWORD *)(v4 + 8) = 1; } *a2 = v7; return *(unsigned int *)(v4 + 24); }
mju_readResource: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x408 TEST RDI,RDI JZ 0x0018eb4c MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0x210] TEST RAX,RAX JZ 0x0018eb53 MOV RAX,qword ptr [RAX + 0x10] MOV RDI,R14 MOV RSI,RBX ADD RSP,0x408 POP RBX POP R12 POP R14 POP R15 JMP RAX LAB_0018eb4c: XOR EAX,EAX JMP 0x0018ebe2 LAB_0018eb53: MOV R12,qword ptr [R14 + 0x8] CMP qword ptr [R12],0x0 JNZ 0x0018eba4 CMP dword ptr [R12 + 0x8],0x0 JNZ 0x0018eba4 LEA RSI,[0x2cde61] MOV R15,RSP MOV EDX,0x400 MOV RDI,R15 CALL 0x0012d240 MOV RAX,0x64656e69666564 MOV qword ptr [R15 + 0x30],RAX VMOVUPS YMM0,ymmword ptr [0x002cde72] VMOVUPS ymmword ptr [R15 + 0x10],YMM0 MOV RDI,R15 VZEROUPPER CALL 0x0012d260 LAB_0018eba4: CMP dword ptr [R12 + 0x8],0x0 JZ 0x0018ebb3 MOV RAX,qword ptr [R12 + 0x10] JMP 0x0018ebda LAB_0018ebb3: MOV RDI,qword ptr [R12] MOV RSI,qword ptr [R14] LEA RDX,[R12 + 0x18] CALL 0x0018ebf1 MOV qword ptr [R12 + 0x10],RAX MOV qword ptr [R12],0x0 MOV dword ptr [R12 + 0x8],0x1 LAB_0018ebda: MOV qword ptr [RBX],RAX MOV EAX,dword ptr [R12 + 0x18] LAB_0018ebe2: ADD RSP,0x408 POP RBX POP R12 POP R14 POP R15 RET
ulong mju_readResource(int8 *param_1,long *param_2) { long *plVar1; ulong uVar2; long lVar3; char acStack_428 [16]; char local_418 [8]; char acStack_410 [8]; char acStack_408 [8]; char acStack_400 [8]; int8 local_3f8; if (param_1 == (int8 *)0x0) { uVar2 = 0; } else { if (param_1[0x42] != 0) { /* WARNING: Could not recover jumptable at 0x0018eb4a. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar2 = (**(code **)(param_1[0x42] + 0x10))(param_1,param_2); return uVar2; } plVar1 = (long *)param_1[1]; if ((*plVar1 == 0) && ((int)plVar1[1] == 0)) { strncpy(acStack_428,"mju_readResource",0x400); local_3f8 = 0x64656e69666564; local_418[0] = s___internal_error_FILE_pointer_un_002cde72[0]; local_418[1] = s___internal_error_FILE_pointer_un_002cde72[1]; local_418[2] = s___internal_error_FILE_pointer_un_002cde72[2]; local_418[3] = s___internal_error_FILE_pointer_un_002cde72[3]; local_418[4] = s___internal_error_FILE_pointer_un_002cde72[4]; local_418[5] = s___internal_error_FILE_pointer_un_002cde72[5]; local_418[6] = s___internal_error_FILE_pointer_un_002cde72[6]; local_418[7] = s___internal_error_FILE_pointer_un_002cde72[7]; acStack_410[0] = s___internal_error_FILE_pointer_un_002cde72[8]; acStack_410[1] = s___internal_error_FILE_pointer_un_002cde72[9]; acStack_410[2] = s___internal_error_FILE_pointer_un_002cde72[10]; acStack_410[3] = s___internal_error_FILE_pointer_un_002cde72[0xb]; acStack_410[4] = s___internal_error_FILE_pointer_un_002cde72[0xc]; acStack_410[5] = s___internal_error_FILE_pointer_un_002cde72[0xd]; acStack_410[6] = s___internal_error_FILE_pointer_un_002cde72[0xe]; acStack_410[7] = s___internal_error_FILE_pointer_un_002cde72[0xf]; acStack_408[0] = s___internal_error_FILE_pointer_un_002cde72[0x10]; acStack_408[1] = s___internal_error_FILE_pointer_un_002cde72[0x11]; acStack_408[2] = s___internal_error_FILE_pointer_un_002cde72[0x12]; acStack_408[3] = s___internal_error_FILE_pointer_un_002cde72[0x13]; acStack_408[4] = s___internal_error_FILE_pointer_un_002cde72[0x14]; acStack_408[5] = s___internal_error_FILE_pointer_un_002cde72[0x15]; acStack_408[6] = s___internal_error_FILE_pointer_un_002cde72[0x16]; acStack_408[7] = s___internal_error_FILE_pointer_un_002cde72[0x17]; acStack_400[0] = s___internal_error_FILE_pointer_un_002cde72[0x18]; acStack_400[1] = s___internal_error_FILE_pointer_un_002cde72[0x19]; acStack_400[2] = s___internal_error_FILE_pointer_un_002cde72[0x1a]; acStack_400[3] = s___internal_error_FILE_pointer_un_002cde72[0x1b]; acStack_400[4] = s___internal_error_FILE_pointer_un_002cde72[0x1c]; acStack_400[5] = s___internal_error_FILE_pointer_un_002cde72[0x1d]; acStack_400[6] = s___internal_error_FILE_pointer_un_002cde72[0x1e]; acStack_400[7] = s___internal_error_FILE_pointer_un_002cde72[0x1f]; mju_error_raw(acStack_428); } if ((int)plVar1[1] == 0) { lVar3 = _fileToMemory(*plVar1,*param_1,plVar1 + 3); plVar1[2] = lVar3; *plVar1 = 0; *(int4 *)(plVar1 + 1) = 1; } else { lVar3 = plVar1[2]; } *param_2 = lVar3; uVar2 = (ulong)*(uint *)(plVar1 + 3); } return uVar2; }
39,237
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, 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>::string_t&)
llama.cpp/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) { if (JSON_HEDLEY_UNLIKELY(!j.is_string())) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&, 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>::string_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0xbe40a movq 0x8(%r14), %rax movq %rsi, %rdi movq %rax, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x212f0 movl $0x20, %edi callq 0x20660 movq %rax, %rbx movq %r14, %rdi callq 0x896c0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x5ba55(%rip), %rsi # 0x119e83 leaq 0x10(%rsp), %rdi callq 0x7f04c movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0xbb0e8 xorl %ebp, %ebp leaq 0xa0be7(%rip), %rsi # 0x15f040 leaq -0x48e50(%rip), %rdx # 0x75610 movq %rbx, %rdi callq 0x20a60 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbe486 movq 0x20(%rsp), %rsi incq %rsi callq 0x20190 testb %bpl, %bpl jne 0xbe490 jmp 0xbe498 movq %rax, %r14 movq %rbx, %rdi callq 0x20f00 movq %r14, %rdi callq 0x20b00
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE: push rbp; void * push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_BE40A mov rax, [r14+8] mov rdi, rsi mov rsi, rax add rsp, 30h pop rbx pop r14 pop rbp jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_BE40A: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeStri; "type must be string, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BE486 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BE486: test bpl, bpl jnz short loc_BE490 jmp short loc_BE498 mov r14, rax loc_BE490: mov rdi, rbx; void * call ___cxa_free_exception loc_BE498: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::from_json<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>>( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"type must be string, but is ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v5); __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); } return std::string::_M_assign(a2, *(_QWORD *)(a1 + 8)); }
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x001be40a MOV RAX,qword ptr [R14 + 0x8] MOV RDI,RSI MOV RSI,RAX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x001212f0 LAB_001be40a: MOV EDI,0x20 CALL 0x00120660 MOV RBX,RAX MOV RDI,R14 CALL 0x001896c0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001be427: LEA RSI,[0x219e83] LEA RDI,[RSP + 0x10] CALL 0x0017f04c MOV BPL,0x1 LAB_001be43b: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x001bb0e8 XOR EBP,EBP LEA RSI,[0x25f040] LEA RDX,[0x175610] MOV RDI,RBX CALL 0x00120a60
/* void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, 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>::string_t&) */ void nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,string_t *param_2) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == (basic_json)0x3) { std::__cxx11::string::_M_assign((string *)param_2); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::type_name((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 001be427 to 001be437 has its CatchHandler @ 001be48d */ concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be string, but is ",&local_40); /* try { // try from 001be43b to 001be467 has its CatchHandler @ 001be468 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&type_error::typeinfo,exception::~exception); }
39,238
commit_fragment(wsrep::server_state&, wsrep::high_priority_service&, wsrep::high_priority_service*, wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&)
eloqsql/wsrep-lib/src/server_state.cpp
static int commit_fragment(wsrep::server_state& server_state, wsrep::high_priority_service& high_priority_service, wsrep::high_priority_service* streaming_applier, const wsrep::ws_handle& ws_handle, const wsrep::ws_meta& ws_meta, const wsrep::const_buffer& data) { int ret(0); { wsrep::high_priority_switch sw( high_priority_service, *streaming_applier); wsrep::mutable_buffer err; int const apply_err( streaming_applier->apply_write_set(ws_meta, data, err)); if (apply_err) { assert(streaming_applier->transaction( ).streaming_context().fragments().size() > 0); ret = streaming_applier->rollback(ws_handle, ws_meta); ret = ret || (streaming_applier->after_apply(), 0); ret = ret || streaming_applier->start_transaction( ws_handle, ws_meta); ret = ret || (streaming_applier->adopt_apply_error(err),0); } else { assert(err.size() == 0); } const wsrep::transaction& trx(streaming_applier->transaction()); // Fragment removal for XA is going to happen in after_commit if (trx.state() != wsrep::transaction::s_prepared) { streaming_applier->debug_crash( "crash_apply_cb_before_fragment_removal"); ret = ret || streaming_applier->remove_fragments(ws_meta); streaming_applier->debug_crash( "crash_apply_cb_after_fragment_removal"); } streaming_applier->debug_crash( "crash_commit_cb_before_last_fragment_commit"); ret = ret || streaming_applier->commit(ws_handle, ws_meta); streaming_applier->debug_crash( "crash_commit_cb_last_fragment_commit_success"); ret = ret || (streaming_applier->after_apply(), 0); ret = resolve_return_error(err.size() > 0, ret, apply_err); } if (!ret) { discard_streaming_applier(server_state, high_priority_service, streaming_applier, ws_meta); } return ret; }
O0
cpp
commit_fragment(wsrep::server_state&, wsrep::high_priority_service&, wsrep::high_priority_service*, wsrep::ws_handle const&, wsrep::ws_meta const&, wsrep::const_buffer const&): pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movl $0x0, -0x34(%rbp) movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx leaq -0x48(%rbp), %rdi callq 0x13c2860 leaq -0x60(%rbp), %rdi callq 0xfd1570 jmp 0x13c1216 movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x30(%rbp), %rdx movq (%rdi), %rax movq 0x30(%rax), %rax leaq -0x60(%rbp), %rcx callq *%rax movl %eax, -0x7c(%rbp) jmp 0x13c1234 movl -0x7c(%rbp), %eax movl %eax, -0x70(%rbp) cmpl $0x0, -0x70(%rbp) je 0x13c134d movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq (%rdi), %rax movq 0x50(%rax), %rax callq *%rax movl %eax, -0x80(%rbp) jmp 0x13c125e movl -0x80(%rbp), %eax movl %eax, -0x34(%rbp) movb $0x1, %al cmpl $0x0, -0x34(%rbp) movb %al, -0x81(%rbp) jne 0x13c128b movq -0x18(%rbp), %rdi movq (%rdi), %rax movq 0x68(%rax), %rax callq *%rax jmp 0x13c1281 xorl %eax, %eax movb %al, -0x81(%rbp) jmp 0x13c128b movb -0x81(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x34(%rbp) movb $0x1, %al cmpl $0x0, -0x34(%rbp) movb %al, -0x82(%rbp) jne 0x13c12d6 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movl %eax, -0x88(%rbp) jmp 0x13c12c4 movl -0x88(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0x82(%rbp) movb -0x82(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x34(%rbp) movb $0x1, %al cmpl $0x0, -0x34(%rbp) movb %al, -0x89(%rbp) jne 0x13c1312 movq -0x18(%rbp), %rdi movq (%rdi), %rax movq 0x90(%rax), %rax leaq -0x60(%rbp), %rsi callq *%rax jmp 0x13c1308 xorl %eax, %eax movb %al, -0x89(%rbp) jmp 0x13c1312 movb -0x89(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x34(%rbp) jmp 0x13c134f movq %rax, %rcx movl %edx, %eax movq %rcx, -0x68(%rbp) movl %eax, -0x6c(%rbp) jmp 0x13c150e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x68(%rbp) movl %eax, -0x6c(%rbp) leaq -0x60(%rbp), %rdi callq 0xfd1600 jmp 0x13c150e jmp 0x13c134f movq -0x18(%rbp), %rdi movq (%rdi), %rax movq 0x20(%rax), %rax callq *%rax movq %rax, -0x98(%rbp) jmp 0x13c1365 movq -0x98(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rdi callq 0x857490 movl %eax, -0x9c(%rbp) jmp 0x13c1381 movl -0x9c(%rbp), %eax cmpl $0x2, %eax je 0x13c1408 movq -0x18(%rbp), %rdi movq (%rdi), %rax movq 0xa0(%rax), %rax leaq 0xe8161(%rip), %rsi # 0x14a9502 callq *%rax jmp 0x13c13a5 movb $0x1, %al cmpl $0x0, -0x34(%rbp) movb %al, -0x9d(%rbp) jne 0x13c13de movq -0x18(%rbp), %rdi movq -0x28(%rbp), %rsi movq (%rdi), %rax movq 0x40(%rax), %rax callq *%rax movl %eax, -0xa4(%rbp) jmp 0x13c13cc movl -0xa4(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0x9d(%rbp) movb -0x9d(%rbp), %al movzbl %al, %eax andl $0x1, %eax movl %eax, -0x34(%rbp) movq -0x18(%rbp), %rdi movq (%rdi), %rax movq 0xa0(%rax), %rax leaq 0xe8127(%rip), %rsi # 0x14a9529 callq *%rax jmp 0x13c1406 jmp 0x13c1408 movq -0x18(%rbp), %rdi movq (%rdi), %rax movq 0xa0(%rax), %rax leaq 0xe8132(%rip), %rsi # 0x14a954f callq *%rax jmp 0x13c1421 movb $0x1, %al cmpl $0x0, -0x34(%rbp) movb %al, -0xa5(%rbp) jne 0x13c145e movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq (%rdi), %rax movq 0x48(%rax), %rax callq *%rax movl %eax, -0xac(%rbp) jmp 0x13c144c movl -0xac(%rbp), %eax cmpl $0x0, %eax setne %al movb %al, -0xa5(%rbp) movb -0xa5(%rbp), %al movzbl %al, %eax andl $0x1, %eax movl %eax, -0x34(%rbp) movq -0x18(%rbp), %rdi movq (%rdi), %rax movq 0xa0(%rax), %rax leaq 0xe80f9(%rip), %rsi # 0x14a957b callq *%rax jmp 0x13c1486 movb $0x1, %al cmpl $0x0, -0x34(%rbp) movb %al, -0xad(%rbp) jne 0x13c14ad movq -0x18(%rbp), %rdi movq (%rdi), %rax movq 0x68(%rax), %rax callq *%rax jmp 0x13c14a3 xorl %eax, %eax movb %al, -0xad(%rbp) jmp 0x13c14ad movb -0xad(%rbp), %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x34(%rbp) leaq -0x60(%rbp), %rdi callq 0xfdff10 cmpq $0x0, %rax seta %al movl -0x34(%rbp), %esi movl -0x70(%rbp), %edx movzbl %al, %edi andl $0x1, %edi callq 0x13c09d0 movl %eax, -0x34(%rbp) leaq -0x60(%rbp), %rdi callq 0xfd1600 leaq -0x48(%rbp), %rdi callq 0x13c28c0 cmpl $0x0, -0x34(%rbp) jne 0x13c1519 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x28(%rbp), %rcx callq 0x13c1530 jmp 0x13c1519 leaq -0x48(%rbp), %rdi callq 0x13c28c0 jmp 0x13c1525 movl -0x34(%rbp), %eax addq $0xb0, %rsp popq %rbp retq movq -0x68(%rbp), %rdi callq 0x775a20 nop
_ZL15commit_fragmentRN5wsrep12server_stateERNS_21high_priority_serviceEPS2_RKNS_9ws_handleERKNS_7ws_metaERKNS_12const_bufferE: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov [rbp+var_34], 0 mov rsi, [rbp+var_10]; wsrep::high_priority_service * mov rdx, [rbp+var_18]; wsrep::high_priority_service * lea rdi, [rbp+var_48]; this call _ZN5wsrep20high_priority_switchC2ERNS_21high_priority_serviceES2_; wsrep::high_priority_switch::high_priority_switch(wsrep::high_priority_service &,wsrep::high_priority_service &) lea rdi, [rbp+var_60]; this call _ZN5wsrep14mutable_bufferC2Ev; wsrep::mutable_buffer::mutable_buffer(void) jmp short $+2 loc_13C1216: mov rdi, [rbp+var_18] mov rsi, [rbp+var_28] mov rdx, [rbp+var_30] mov rax, [rdi] mov rax, [rax+30h] lea rcx, [rbp+var_60] call rax mov [rbp+var_7C], eax jmp short $+2 loc_13C1234: mov eax, [rbp+var_7C] mov [rbp+var_70], eax cmp [rbp+var_70], 0 jz loc_13C134D mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rax, [rdi] mov rax, [rax+50h] call rax mov [rbp+var_80], eax jmp short $+2 loc_13C125E: mov eax, [rbp+var_80] mov [rbp+var_34], eax mov al, 1 cmp [rbp+var_34], 0 mov [rbp+var_81], al jnz short loc_13C128B mov rdi, [rbp+var_18] mov rax, [rdi] mov rax, [rax+68h] call rax jmp short $+2 loc_13C1281: xor eax, eax mov [rbp+var_81], al jmp short $+2 loc_13C128B: mov al, [rbp+var_81] and al, 1 movzx eax, al mov [rbp+var_34], eax mov al, 1 cmp [rbp+var_34], 0 mov [rbp+var_82], al jnz short loc_13C12D6 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rax, [rdi] mov rax, [rax+10h] call rax mov [rbp+var_88], eax jmp short $+2 loc_13C12C4: mov eax, [rbp+var_88] cmp eax, 0 setnz al mov [rbp+var_82], al loc_13C12D6: mov al, [rbp+var_82] and al, 1 movzx eax, al mov [rbp+var_34], eax mov al, 1 cmp [rbp+var_34], 0 mov [rbp+var_89], al jnz short loc_13C1312 mov rdi, [rbp+var_18] mov rax, [rdi] mov rax, [rax+90h] lea rsi, [rbp+var_60] call rax jmp short $+2 loc_13C1308: xor eax, eax mov [rbp+var_89], al jmp short $+2 loc_13C1312: mov al, [rbp+var_89] and al, 1 movzx eax, al mov [rbp+var_34], eax jmp short loc_13C134F mov rcx, rax mov eax, edx mov [rbp+var_68], rcx mov [rbp+var_6C], eax jmp loc_13C150E mov rcx, rax mov eax, edx mov [rbp+var_68], rcx mov [rbp+var_6C], eax lea rdi, [rbp+var_60]; this call _ZN5wsrep14mutable_bufferD2Ev; wsrep::mutable_buffer::~mutable_buffer() jmp loc_13C150E loc_13C134D: jmp short $+2 loc_13C134F: mov rdi, [rbp+var_18] mov rax, [rdi] mov rax, [rax+20h] call rax mov [rbp+var_98], rax jmp short $+2 loc_13C1365: mov rax, [rbp+var_98] mov [rbp+var_78], rax mov rdi, [rbp+var_78]; this call _ZNK5wsrep11transaction5stateEv; wsrep::transaction::state(void) mov [rbp+var_9C], eax jmp short $+2 loc_13C1381: mov eax, [rbp+var_9C] cmp eax, 2 jz short loc_13C1408 mov rdi, [rbp+var_18] mov rax, [rdi] mov rax, [rax+0A0h] lea rsi, aCrashApplyCbBe_0; "crash_apply_cb_before_fragment_removal" call rax jmp short $+2 loc_13C13A5: mov al, 1 cmp [rbp+var_34], 0 mov [rbp+var_9D], al jnz short loc_13C13DE mov rdi, [rbp+var_18] mov rsi, [rbp+var_28] mov rax, [rdi] mov rax, [rax+40h] call rax mov [rbp+var_A4], eax jmp short $+2 loc_13C13CC: mov eax, [rbp+var_A4] cmp eax, 0 setnz al mov [rbp+var_9D], al loc_13C13DE: mov al, [rbp+var_9D] movzx eax, al and eax, 1 mov [rbp+var_34], eax mov rdi, [rbp+var_18] mov rax, [rdi] mov rax, [rax+0A0h] lea rsi, aCrashApplyCbAf_0; "crash_apply_cb_after_fragment_removal" call rax jmp short $+2 loc_13C1406: jmp short $+2 loc_13C1408: mov rdi, [rbp+var_18] mov rax, [rdi] mov rax, [rax+0A0h] lea rsi, aCrashCommitCbB; "crash_commit_cb_before_last_fragment_co"... call rax jmp short $+2 loc_13C1421: mov al, 1 cmp [rbp+var_34], 0 mov [rbp+var_A5], al jnz short loc_13C145E mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rax, [rdi] mov rax, [rax+48h] call rax mov [rbp+var_AC], eax jmp short $+2 loc_13C144C: mov eax, [rbp+var_AC] cmp eax, 0 setnz al mov [rbp+var_A5], al loc_13C145E: mov al, [rbp+var_A5] movzx eax, al and eax, 1 mov [rbp+var_34], eax mov rdi, [rbp+var_18] mov rax, [rdi] mov rax, [rax+0A0h] lea rsi, aCrashCommitCbL; "crash_commit_cb_last_fragment_commit_su"... call rax jmp short $+2 loc_13C1486: mov al, 1 cmp [rbp+var_34], 0 mov [rbp+var_AD], al jnz short loc_13C14AD mov rdi, [rbp+var_18] mov rax, [rdi] mov rax, [rax+68h] call rax jmp short $+2 loc_13C14A3: xor eax, eax mov [rbp+var_AD], al jmp short $+2 loc_13C14AD: mov al, [rbp+var_AD] and al, 1 movzx eax, al mov [rbp+var_34], eax lea rdi, [rbp+var_60]; this call _ZNK5wsrep14mutable_buffer4sizeEv; wsrep::mutable_buffer::size(void) cmp rax, 0 setnbe al mov esi, [rbp+var_34]; int mov edx, [rbp+var_70]; int movzx edi, al and edi, 1; bool call _ZL20resolve_return_errorbii; resolve_return_error(bool,int,int) mov [rbp+var_34], eax lea rdi, [rbp+var_60]; this call _ZN5wsrep14mutable_bufferD2Ev; wsrep::mutable_buffer::~mutable_buffer() lea rdi, [rbp+var_48]; this call _ZN5wsrep20high_priority_switchD2Ev; wsrep::high_priority_switch::~high_priority_switch() cmp [rbp+var_34], 0 jnz short loc_13C1519 mov rdi, [rbp+var_8]; wsrep::server_state * mov rsi, [rbp+var_10]; wsrep::high_priority_service * mov rdx, [rbp+var_18]; wsrep::high_priority_service * mov rcx, [rbp+var_28]; wsrep::ws_meta * call _ZL25discard_streaming_applierRN5wsrep12server_stateERNS_21high_priority_serviceEPS2_RKNS_7ws_metaE; discard_streaming_applier(wsrep::server_state &,wsrep::high_priority_service &,wsrep::high_priority_service*,wsrep::ws_meta const&) jmp short loc_13C1519 loc_13C150E: lea rdi, [rbp+var_48]; this call _ZN5wsrep20high_priority_switchD2Ev; wsrep::high_priority_switch::~high_priority_switch() jmp short loc_13C1525 loc_13C1519: mov eax, [rbp+var_34] add rsp, 0B0h pop rbp retn loc_13C1525: mov rdi, [rbp+var_68] call __Unwind_Resume
long long commit_fragment( wsrep::server_state *a1, wsrep::high_priority_service *a2, wsrep::high_priority_service *a3, const wsrep::ws_handle *a4, const wsrep::ws_meta *a5, const wsrep::const_buffer *a6) { long long v6; // rax char v8; // [rsp+3h] [rbp-ADh] bool v9; // [rsp+Bh] [rbp-A5h] bool v10; // [rsp+13h] [rbp-9Dh] char v11; // [rsp+27h] [rbp-89h] bool v12; // [rsp+2Eh] [rbp-82h] char v13; // [rsp+2Fh] [rbp-81h] wsrep::transaction *v14; // [rsp+38h] [rbp-78h] unsigned int v15; // [rsp+40h] [rbp-70h] _BYTE v16[24]; // [rsp+50h] [rbp-60h] BYREF _BYTE v17[20]; // [rsp+68h] [rbp-48h] BYREF int v18; // [rsp+7Ch] [rbp-34h] const wsrep::const_buffer *v19; // [rsp+80h] [rbp-30h] wsrep::ws_meta *v20; // [rsp+88h] [rbp-28h] const wsrep::ws_handle *v21; // [rsp+90h] [rbp-20h] wsrep::high_priority_service *v22; // [rsp+98h] [rbp-18h] wsrep::high_priority_service *v23; // [rsp+A0h] [rbp-10h] wsrep::server_state *v24; // [rsp+A8h] [rbp-8h] v24 = a1; v23 = a2; v22 = a3; v21 = a4; v20 = a5; v19 = a6; v18 = 0; wsrep::high_priority_switch::high_priority_switch((wsrep::high_priority_switch *)v17, a2, a3); wsrep::mutable_buffer::mutable_buffer((wsrep::mutable_buffer *)v16); v15 = (*(long long ( **)(wsrep::high_priority_service *, wsrep::ws_meta *, const wsrep::const_buffer *, _BYTE *))(*(_QWORD *)v22 + 48LL))( v22, v20, v19, v16); if ( v15 ) { v18 = (*(long long ( **)(wsrep::high_priority_service *, const wsrep::ws_handle *, wsrep::ws_meta *))(*(_QWORD *)v22 + 80LL))( v22, v21, v20); v13 = 1; if ( !v18 ) { (*(void ( **)(wsrep::high_priority_service *))(*(_QWORD *)v22 + 104LL))(v22); v13 = 0; } v18 = v13 & 1; v12 = 1; if ( (v13 & 1) == 0 ) v12 = (*(unsigned int ( **)(wsrep::high_priority_service *, const wsrep::ws_handle *, wsrep::ws_meta *))(*(_QWORD *)v22 + 16LL))( v22, v21, v20) != 0; v18 = v12; v11 = 1; if ( !v12 ) { (*(void ( **)(wsrep::high_priority_service *, _BYTE *))(*(_QWORD *)v22 + 144LL))(v22, v16); v11 = 0; } v18 = v11 & 1; } v14 = (wsrep::transaction *)(*(long long ( **)(wsrep::high_priority_service *))(*(_QWORD *)v22 + 32LL))(v22); if ( (unsigned int)wsrep::transaction::state(v14) != 2 ) { (*(void ( **)(wsrep::high_priority_service *, const char *))(*(_QWORD *)v22 + 160LL))( v22, "crash_apply_cb_before_fragment_removal"); v10 = 1; if ( !v18 ) v10 = (*(unsigned int ( **)(wsrep::high_priority_service *, wsrep::ws_meta *))(*(_QWORD *)v22 + 64LL))( v22, v20) != 0; v18 = v10; (*(void ( **)(wsrep::high_priority_service *, const char *))(*(_QWORD *)v22 + 160LL))( v22, "crash_apply_cb_after_fragment_removal"); } (*(void ( **)(wsrep::high_priority_service *, const char *))(*(_QWORD *)v22 + 160LL))( v22, "crash_commit_cb_before_last_fragment_commit"); v9 = 1; if ( !v18 ) v9 = (*(unsigned int ( **)(wsrep::high_priority_service *, const wsrep::ws_handle *, wsrep::ws_meta *))(*(_QWORD *)v22 + 72LL))( v22, v21, v20) != 0; v18 = v9; (*(void ( **)(wsrep::high_priority_service *, const char *))(*(_QWORD *)v22 + 160LL))( v22, "crash_commit_cb_last_fragment_commit_success"); v8 = 1; if ( !v18 ) { (*(void ( **)(wsrep::high_priority_service *))(*(_QWORD *)v22 + 104LL))(v22); v8 = 0; } v18 = v8 & 1; v6 = wsrep::mutable_buffer::size((wsrep::mutable_buffer *)v16); v18 = resolve_return_error(v6 != 0, v18, v15); wsrep::mutable_buffer::~mutable_buffer((wsrep::mutable_buffer *)v16); wsrep::high_priority_switch::~high_priority_switch((wsrep::high_priority_switch *)v17); if ( !v18 ) discard_streaming_applier(v24, v23, v22, v20); return (unsigned int)v18; }
inline_mysql_file_chsize: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x1c88ec0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0xd CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x013c1292 LEA RAX,[0x1c88ec0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x0141b1d0 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x1c88ec0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x20] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x013c12ae LAB_013c1292: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x30] CALL 0x0141b1d0 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_013c12ae: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_chsize (int8 param_1,int4 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,0xd); if (local_48 == 0) { local_c = my_chsize(local_20,local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_28,local_18,local_1c); local_3c = my_chsize(local_20,local_28,local_2c,local_38); (**(code **)(PSI_server + 0x218))(local_48,local_28); local_c = local_3c; } return local_c; }
39,239
ma_mark_file_changed
eloqsql/storage/maria/ma_locking.c
int _ma_mark_file_changed(register MARIA_SHARE *share) { if (!share->base.born_transactional) { if (!_MA_ALREADY_MARKED_FILE_CHANGED) return _ma_mark_file_changed_now(share); } else { /* For transactional tables, the table is marked changed when the first page is written. Here we just mark the state to be updated so that caller can do 'analyze table' and find that is has changed before any pages are written. */ if (! test_all_bits(share->state.changed, (STATE_CHANGED | STATE_NOT_ANALYZED | STATE_NOT_OPTIMIZED_KEYS))) { mysql_mutex_lock(&share->intern_lock); share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED | STATE_NOT_OPTIMIZED_KEYS); mysql_mutex_unlock(&share->intern_lock); } } return 0; }
O0
c
ma_mark_file_changed: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x44c(%rax) jne 0x48f4b movq -0x10(%rbp), %rax movl 0x170(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x48f3b movq -0x10(%rbp), %rax movsbl 0x7df(%rax), %eax cmpl $0x0, %eax jne 0x48f49 movq -0x10(%rbp), %rdi callq 0x48fb0 movl %eax, -0x4(%rbp) jmp 0x48fa5 jmp 0x48f9e movq -0x10(%rbp), %rax movl 0x170(%rax), %eax andl $0x19, %eax cmpl $0x19, %eax je 0x48f9c movq -0x10(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 leaq 0x1093e6(%rip), %rsi # 0x152355 movl $0x19c, %edx # imm = 0x19C callq 0x48c20 movq -0x10(%rbp), %rax movl 0x170(%rax), %ecx orl $0x19, %ecx movl %ecx, 0x170(%rax) movq -0x10(%rbp), %rdi addq $0x8f0, %rdi # imm = 0x8F0 callq 0x48dc0 jmp 0x48f9e movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nop
_ma_mark_file_changed: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp byte ptr [rax+44Ch], 0 jnz short loc_48F4B mov rax, [rbp+var_10] mov eax, [rax+170h] and eax, 1 cmp eax, 0 jz short loc_48F3B mov rax, [rbp+var_10] movsx eax, byte ptr [rax+7DFh] cmp eax, 0 jnz short loc_48F49 loc_48F3B: mov rdi, [rbp+var_10] call _ma_mark_file_changed_now mov [rbp+var_4], eax jmp short loc_48FA5 loc_48F49: jmp short loc_48F9E loc_48F4B: mov rax, [rbp+var_10] mov eax, [rax+170h] and eax, 19h cmp eax, 19h jz short loc_48F9C mov rdi, [rbp+var_10] add rdi, 8F0h lea rsi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 19Ch call inline_mysql_mutex_lock_5 mov rax, [rbp+var_10] mov ecx, [rax+170h] or ecx, 19h mov [rax+170h], ecx mov rdi, [rbp+var_10] add rdi, 8F0h call inline_mysql_mutex_unlock_5 loc_48F9C: jmp short $+2 loc_48F9E: mov [rbp+var_4], 0 loc_48FA5: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
long long ma_mark_file_changed(long long a1) { if ( *(_BYTE *)(a1 + 1100) ) { if ( (*(_DWORD *)(a1 + 368) & 0x19) != 0x19 ) { inline_mysql_mutex_lock_5( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x19Cu); *(_DWORD *)(a1 + 368) |= 0x19u; inline_mysql_mutex_unlock_5(a1 + 2288); } return 0; } if ( (*(_DWORD *)(a1 + 368) & 1) != 0 && *(_BYTE *)(a1 + 2015) ) return 0; return (unsigned int)ma_mark_file_changed_now(a1); }
_ma_mark_file_changed: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x44c],0x0 JNZ 0x00148f4b MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x170] AND EAX,0x1 CMP EAX,0x0 JZ 0x00148f3b MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x7df] CMP EAX,0x0 JNZ 0x00148f49 LAB_00148f3b: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00148fb0 MOV dword ptr [RBP + -0x4],EAX JMP 0x00148fa5 LAB_00148f49: JMP 0x00148f9e LAB_00148f4b: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x170] AND EAX,0x19 CMP EAX,0x19 JZ 0x00148f9c MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8f0 LEA RSI,[0x252355] MOV EDX,0x19c CALL 0x00148c20 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x170] OR ECX,0x19 MOV dword ptr [RAX + 0x170],ECX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x8f0 CALL 0x00148dc0 LAB_00148f9c: JMP 0x00148f9e LAB_00148f9e: MOV dword ptr [RBP + -0x4],0x0 LAB_00148fa5: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 _ma_mark_file_changed(long param_1) { int4 uVar1; if (*(char *)(param_1 + 0x44c) == '\0') { if (((*(uint *)(param_1 + 0x170) & 1) == 0) || (*(char *)(param_1 + 0x7df) == '\0')) { uVar1 = _ma_mark_file_changed_now(param_1); return uVar1; } } else if ((*(uint *)(param_1 + 0x170) & 0x19) != 0x19) { inline_mysql_mutex_lock (param_1 + 0x8f0,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c" ,0x19c); *(uint *)(param_1 + 0x170) = *(uint *)(param_1 + 0x170) | 0x19; inline_mysql_mutex_unlock(param_1 + 0x8f0); } return 0; }
39,240
stbiw__zhash
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-stb-image-write.h
static unsigned int stbiw__zhash(unsigned char *data) { stbiw_uint32 hash = data[0] + (data[1] << 8) + (data[2] << 16); hash ^= hash << 3; hash += hash >> 5; hash ^= hash << 4; hash += hash >> 17; hash ^= hash << 25; hash += hash >> 6; return hash; }
O0
c
stbiw__zhash: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl (%rax), %eax movq -0x8(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x8(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax shll $0x3, %eax xorl -0xc(%rbp), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax shrl $0x5, %eax addl -0xc(%rbp), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax shll $0x4, %eax xorl -0xc(%rbp), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax shrl $0x11, %eax addl -0xc(%rbp), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax shll $0x19, %eax xorl -0xc(%rbp), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax shrl $0x6, %eax addl -0xc(%rbp), %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax popq %rbp retq nopl (%rax)
stbiw__zhash: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] movzx eax, byte ptr [rax] mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx+2] shl ecx, 10h add eax, ecx mov [rbp+var_C], eax mov eax, [rbp+var_C] shl eax, 3 xor eax, [rbp+var_C] mov [rbp+var_C], eax mov eax, [rbp+var_C] shr eax, 5 add eax, [rbp+var_C] mov [rbp+var_C], eax mov eax, [rbp+var_C] shl eax, 4 xor eax, [rbp+var_C] mov [rbp+var_C], eax mov eax, [rbp+var_C] shr eax, 11h add eax, [rbp+var_C] mov [rbp+var_C], eax mov eax, [rbp+var_C] shl eax, 19h xor eax, [rbp+var_C] mov [rbp+var_C], eax mov eax, [rbp+var_C] shr eax, 6 add eax, [rbp+var_C] mov [rbp+var_C], eax mov eax, [rbp+var_C] pop rbp retn
long long stbiw__zhash(unsigned __int8 *a1) { int v2; // [rsp+0h] [rbp-Ch] unsigned int v3; // [rsp+0h] [rbp-Ch] unsigned int v4; // [rsp+0h] [rbp-Ch] v2 = (a1[2] << 16) + (a1[1] << 8) + *a1; v3 = (v2 ^ (8 * v2)) + ((v2 ^ (unsigned int)(8 * v2)) >> 5); v4 = (v3 ^ (16 * v3)) + ((v3 ^ (16 * v3)) >> 17); return (v4 ^ (v4 << 25)) + ((v4 ^ (v4 << 25)) >> 6); }
stbiw__zhash: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] SHL EAX,0x3 XOR EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] SHR EAX,0x5 ADD EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] SHL EAX,0x4 XOR EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] SHR EAX,0x11 ADD EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] SHL EAX,0x19 XOR EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] SHR EAX,0x6 ADD EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] POP RBP RET
int stbiw__zhash(byte *param_1) { uint uVar1; uVar1 = (uint)*param_1 + (uint)param_1[1] * 0x100 + (uint)param_1[2] * 0x10000; uVar1 = uVar1 * 8 ^ uVar1; uVar1 = (uVar1 >> 5) + uVar1; uVar1 = uVar1 * 0x10 ^ uVar1; uVar1 = (uVar1 >> 0x11) + uVar1; uVar1 = uVar1 * 0x2000000 ^ uVar1; return (uVar1 >> 6) + uVar1; }
39,241
nlohmann::json_abi_v3_11_3::detail::exception::name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
monkey531[P]llama/common/json.hpp
static std::string name(const std::string& ename, int id_) { return concat("[json.exception.", ename, '.', std::to_string(id_), "] "); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::exception::name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %edx, %r15d movq %rsi, 0x10(%rsp) movq %rdi, %rbx movb $0x2e, 0xf(%rsp) movl %edx, %ebp negl %ebp cmovsl %edx, %ebp movl $0x1, %r12d cmpl $0xa, %ebp jb 0x5d16f movl $0x4, %r12d movl $0xd1b71759, %eax # imm = 0xD1B71759 movl %ebp, %ecx cmpl $0x63, %ecx jbe 0x5d166 cmpl $0x3e7, %ecx # imm = 0x3E7 jbe 0x5d16c cmpl $0x2710, %ecx # imm = 0x2710 jb 0x5d16f movl %ecx, %edx imulq %rax, %rdx shrq $0x2d, %rdx addl $0x4, %r12d cmpl $0x1869f, %ecx # imm = 0x1869F movl %edx, %ecx ja 0x5d133 addl $-0x3, %r12d jmp 0x5d16f addl $-0x2, %r12d jmp 0x5d16f decl %r12d shrl $0x1f, %r15d leal (%r12,%r15), %esi leaq 0x28(%rsp), %r14 movq %r14, -0x10(%r14) leaq 0x18(%rsp), %r13 movq %r13, %rdi movl $0x2d, %edx callq 0x1ba90 addq (%r13), %r15 movq %r15, %rdi movl %r12d, %esi movl %ebp, %edx callq 0x5d2f1 leaq 0x96159(%rip), %rsi # 0xf3303 leaq 0x9ee43(%rip), %r9 # 0xfbff4 leaq 0xf(%rsp), %rcx movq %rbx, %rdi movq 0x10(%rsp), %rdx movq %r13, %r8 callq 0x5d211 movq 0x18(%rsp), %rdi cmpq %r14, %rdi je 0x5d1dd movq 0x28(%rsp), %rsi incq %rsi callq 0x1b940 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x18(%rsp), %rdi cmpq %r14, %rdi je 0x5d209 movq 0x28(%rsp), %rsi incq %rsi callq 0x1b940 movq %rbx, %rdi callq 0x1c040
_ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15d, edx mov [rsp+68h+var_58], rsi mov rbx, rdi mov [rsp+68h+var_59], 2Eh ; '.' mov ebp, edx neg ebp cmovs ebp, edx mov r12d, 1 cmp ebp, 0Ah jb short loc_5D16F mov r12d, 4 mov eax, 0D1B71759h mov ecx, ebp loc_5D133: cmp ecx, 63h ; 'c' jbe short loc_5D166 cmp ecx, 3E7h jbe short loc_5D16C cmp ecx, 2710h jb short loc_5D16F mov edx, ecx imul rdx, rax shr rdx, 2Dh add r12d, 4 cmp ecx, 1869Fh mov ecx, edx ja short loc_5D133 add r12d, 0FFFFFFFDh jmp short loc_5D16F loc_5D166: add r12d, 0FFFFFFFEh jmp short loc_5D16F loc_5D16C: dec r12d loc_5D16F: shr r15d, 1Fh lea esi, [r12+r15] lea r14, [rsp+68h+var_40] mov [r14-10h], r14 lea r13, [rsp+68h+var_50] mov rdi, r13 mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r15, [r13+0] mov rdi, r15 mov esi, r12d mov edx, ebp call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint) lea rsi, aJsonException; "[json.exception." lea r9, a19+8; "] " lea rcx, [rsp+68h+var_59] mov rdi, rbx mov rdx, [rsp+68h+var_58] mov r8, r13 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA17_KcRKS8_cS8_RA3_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[17],std::string const&,char,std::string,char const(&)[3]>(char const(&)[17],std::string const&,char,std::string,char const(&)[3] &&) mov rdi, [rsp+68h+var_50]; void * cmp rdi, r14 jz short loc_5D1DD mov rsi, [rsp+68h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5D1DD: mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_10]; void * cmp rdi, r14 jz short loc_5D209 mov rsi, [rsp+arg_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5D209: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::exception::name(long long a1, long long a2, int a3) { unsigned int v3; // ebp unsigned int v4; // r12d unsigned int v5; // ecx bool v6; // cc unsigned int v7; // r15d char v9; // [rsp+Fh] [rbp-59h] BYREF long long v10; // [rsp+10h] [rbp-58h] void *v11[2]; // [rsp+18h] [rbp-50h] BYREF _QWORD v12[8]; // [rsp+28h] [rbp-40h] BYREF v10 = a2; v9 = 46; v3 = -a3; if ( a3 > 0 ) v3 = a3; v4 = 1; if ( v3 >= 0xA ) { v4 = 4; v5 = v3; while ( 1 ) { if ( v5 <= 0x63 ) { v4 -= 2; goto LABEL_12; } if ( v5 <= 0x3E7 ) break; if ( v5 < 0x2710 ) goto LABEL_12; v4 += 4; v6 = v5 <= 0x1869F; v5 /= 0x2710u; if ( v6 ) { v4 -= 3; goto LABEL_12; } } --v4; } LABEL_12: v7 = (unsigned int)a3 >> 31; v11[0] = v12; std::string::_M_construct(v11, v4 + ((unsigned int)a3 >> 31), 45LL); std::__detail::__to_chars_10_impl<unsigned int>((char *)v11[0] + v7, v4, v3); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[17],std::string const&,char,std::string,char const(&)[3]>( a1, (unsigned int)"[json.exception.", v10, (unsigned int)&v9, (unsigned int)v11, (unsigned int)"] "); if ( v11[0] != v12 ) operator delete(v11[0], v12[0] + 1LL); return a1; }
name: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15D,EDX MOV qword ptr [RSP + 0x10],RSI MOV RBX,RDI MOV byte ptr [RSP + 0xf],0x2e MOV EBP,EDX NEG EBP CMOVS EBP,EDX MOV R12D,0x1 CMP EBP,0xa JC 0x0015d16f MOV R12D,0x4 MOV EAX,0xd1b71759 MOV ECX,EBP LAB_0015d133: CMP ECX,0x63 JBE 0x0015d166 CMP ECX,0x3e7 JBE 0x0015d16c CMP ECX,0x2710 JC 0x0015d16f MOV EDX,ECX IMUL RDX,RAX SHR RDX,0x2d ADD R12D,0x4 CMP ECX,0x1869f MOV ECX,EDX JA 0x0015d133 ADD R12D,-0x3 JMP 0x0015d16f LAB_0015d166: ADD R12D,-0x2 JMP 0x0015d16f LAB_0015d16c: DEC R12D LAB_0015d16f: SHR R15D,0x1f LEA ESI,[R12 + R15*0x1] LEA R14,[RSP + 0x28] MOV qword ptr [R14 + -0x10],R14 LEA R13,[RSP + 0x18] MOV RDI,R13 MOV EDX,0x2d CALL 0x0011ba90 ADD R15,qword ptr [R13] MOV RDI,R15 MOV ESI,R12D MOV EDX,EBP CALL 0x0015d2f1 LAB_0015d1a3: LEA RSI,[0x1f3303] LEA R9,[0x1fbff4] LEA RCX,[RSP + 0xf] MOV RDI,RBX MOV RDX,qword ptr [RSP + 0x10] MOV R8,R13 CALL 0x0015d211 LAB_0015d1c6: MOV RDI,qword ptr [RSP + 0x18] CMP RDI,R14 JZ 0x0015d1dd MOV RSI,qword ptr [RSP + 0x28] INC RSI CALL 0x0011b940 LAB_0015d1dd: MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::exception::name(std::__cxx11::string const&, int) */ exception * __thiscall nlohmann::json_abi_v3_11_3::detail::exception::name(exception *this,string *param_1,int param_2) { uint uVar1; uint uVar2; ulong uVar3; uint uVar4; uint uVar5; char local_59; string *local_58; long *local_50 [2]; long local_40 [2]; local_59 = '.'; uVar4 = -param_2; if (0 < param_2) { uVar4 = param_2; } uVar5 = 1; if (9 < uVar4) { uVar3 = (ulong)uVar4; uVar1 = 4; do { uVar5 = uVar1; uVar2 = (uint)uVar3; if (uVar2 < 100) { uVar5 = uVar5 - 2; goto LAB_0015d16f; } if (uVar2 < 1000) { uVar5 = uVar5 - 1; goto LAB_0015d16f; } if (uVar2 < 10000) goto LAB_0015d16f; uVar3 = uVar3 / 10000; uVar1 = uVar5 + 4; } while (99999 < uVar2); uVar5 = uVar5 + 1; } LAB_0015d16f: local_58 = param_1; local_50[0] = local_40; std::__cxx11::string::_M_construct((ulong)local_50,(char)uVar5 - (char)(param_2 >> 0x1f)); std::__detail::__to_chars_10_impl<unsigned_int> ((char *)((ulong)((uint)param_2 >> 0x1f) + (long)local_50[0]),uVar5,uVar4); /* try { // try from 0015d1a3 to 0015d1c5 has its CatchHandler @ 0015d1ef */ concat<std::__cxx11::string,char_const(&)[17],std::__cxx11::string_const&,char,std::__cxx11::string,char_const(&)[3]> ((detail *)this,"[json.exception.",local_58,&local_59,(string *)local_50,"] "); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return this; }
39,242
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(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(char* buf, int& len, int& decimal_exponent, diyfp m_minus, diyfp v, diyfp m_plus) { JSON_ASSERT(m_plus.e == m_minus.e); JSON_ASSERT(m_plus.e == v.e); // --------(-----------------------+-----------------------)-------- (A) // m- v m+ // // --------------------(-----------+-----------------------)-------- (B) // m- v m+ // // First scale v (and m- and m+) such that the exponent is in the range // [alpha, gamma]. const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e); const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k // The exponent of the products is = v.e + c_minus_k.e + q and is in the range [alpha,gamma] const diyfp w = diyfp::mul(v, c_minus_k); const diyfp w_minus = diyfp::mul(m_minus, c_minus_k); const diyfp w_plus = diyfp::mul(m_plus, c_minus_k); // ----(---+---)---------------(---+---)---------------(---+---)---- // w- w w+ // = c*m- = c*v = c*m+ // // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and // w+ are now off by a small amount. // In fact: // // w - v * 10^k < 1 ulp // // To account for this inaccuracy, add resp. subtract 1 ulp. // // --------+---[---------------(---+---)---------------]---+-------- // w- M- w M+ w+ // // Now any number in [M-, M+] (bounds included) will round to w when input, // regardless of how the input rounding algorithm breaks ties. // // And digit_gen generates the shortest possible such number in [M-, M+]. // Note that this does not mean that Grisu2 always generates the shortest // possible number in the interval (m-, m+). const diyfp M_minus(w_minus.f + 1, w_minus.e); const diyfp M_plus (w_plus.f - 1, w_plus.e ); decimal_exponent = -cached.k; // = -(-k) = k grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(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 $0x78, %rsp movq %rcx, 0x58(%rsp) movl %r8d, 0x60(%rsp) cmpl %r8d, 0xc8(%rsp) jne 0x8c2de movq %rdi, 0x20(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) leaq 0xb0(%rsp), %r13 cmpl %r8d, 0x8(%r13) jne 0x8c2fa movl %r8d, %edi callq 0x8c3b3 movq %rdx, %r12 leaq 0x68(%rsp), %r14 movq %rax, (%r14) movl %r12d, 0x8(%r14) movq %r13, %rdi movq %r14, %rsi callq 0x8c4e8 movq %rax, %r15 movl %edx, %ebx leaq 0x58(%rsp), %rdi movq %r14, %rsi callq 0x8c4e8 movq %rax, %r13 movl %edx, %ebp leaq 0xc0(%rsp), %rdi movq %r14, %rsi callq 0x8c4e8 incq %r13 decq %rax shrq $0x20, %r12 negl %r12d movq 0x30(%rsp), %rcx movl %r12d, (%rcx) movq %r15, 0x48(%rsp) movl %ebx, 0x50(%rsp) movq %rax, 0x38(%rsp) movl %edx, 0x40(%rsp) movups 0x38(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, (%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq %rcx, %rdx movq %r13, %rcx movl %ebp, %r8d callq 0x8c544 addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x29a1a(%rip), %rdi # 0xb5cff leaq 0x222d9(%rip), %rdx # 0xae5c5 leaq 0x2e46a(%rip), %rcx # 0xba75d movl $0x454b, %esi # imm = 0x454B jmp 0x8c314 leaq 0x299fe(%rip), %rdi # 0xb5cff leaq 0x222bd(%rip), %rdx # 0xae5c5 leaq 0x2e464(%rip), %rcx # 0xba773 movl $0x454c, %esi # imm = 0x454C xorl %eax, %eax callq 0x24f00 nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl6grisu2EPcRiS4_NS2_5diyfpES5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov [rsp+0A8h+var_50], rcx mov [rsp+0A8h+var_48], r8d cmp [rsp+0A8h+arg_18], r8d jnz loc_8C2DE mov [rsp+0A8h+var_88], rdi mov [rsp+0A8h+var_80], rsi mov [rsp+0A8h+var_78], rdx lea r13, [rsp+0A8h+arg_0] cmp [r13+8], r8d jnz loc_8C2FA mov edi, r8d; this call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl36get_cached_power_for_binary_exponentEi; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent(int) mov r12, rdx lea r14, [rsp+0A8h+var_40] mov [r14], rax mov [r14+8], r12d mov rdi, r13 mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r15, rax mov ebx, edx lea rdi, [rsp+0A8h+var_50] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r13, rax mov ebp, edx lea rdi, [rsp+0A8h+arg_10] mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3mulERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) inc r13 dec rax shr r12, 20h neg r12d mov rcx, [rsp+0A8h+var_78] mov [rcx], r12d mov qword ptr [rsp+0A8h+var_60], r15 mov dword ptr [rsp+0A8h+var_60+8], ebx mov qword ptr [rsp+0A8h+var_70], rax mov dword ptr [rsp+0A8h+var_70+8], edx movups xmm0, [rsp+0A8h+var_70] movups [rsp+0A8h+var_98], xmm0 movups xmm0, [rsp+0A8h+var_60] movups [rsp+0A8h+var_A8], xmm0 mov rdi, [rsp+0A8h+var_88] mov rsi, [rsp+0A8h+var_80] mov rdx, rcx mov rcx, r13 mov r8d, ebp call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_; 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) add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8C2DE: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEMMinusE; "m_plus.e == m_minus.e" mov esi, 454Bh jmp short loc_8C314 loc_8C2FA: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEVE; "m_plus.e == v.e" mov esi, 454Ch loc_8C314: xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( int a1, int a2, _DWORD *a3, long long a4, unsigned int a5, long long a6, char a7, int a8, char a9, int a10) { long long cached_power_for_binary_exponent; // rax int v11; // rdx^4 int v12; // r12^4 int v13; // edx char v14; // r15 int v15; // edx int v16; // ebx int v17; // r13d int v18; // edx int v19; // ebp char v20; // al int v21; // edx int v22; // r9d long long v25; // [rsp+58h] [rbp-50h] BYREF unsigned int v26; // [rsp+60h] [rbp-48h] long long v27; // [rsp+68h] [rbp-40h] BYREF int v28; // [rsp+70h] [rbp-38h] v25 = a4; v26 = a5; if ( a10 == a5 ) { if ( a8 == a5 ) { cached_power_for_binary_exponent = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::get_cached_power_for_binary_exponent( (nlohmann::json_abi_v3_11_3::detail::dtoa_impl *)a5, a2); v12 = v11; v27 = cached_power_for_binary_exponent; v28 = v13; v14 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a7, &v27); v16 = v15; v17 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&v25, &v27); v19 = v18; v20 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::mul(&a9, &v27); *a3 = -v12; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen( a1, a2, (_DWORD)a3, v17 + 1, v19, v22, v14, v16, v20 - 1, v21); } ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17740LL, "GGML_ASSERT(%s) failed", "m_plus.e == v.e"); } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17739LL, "GGML_ASSERT(%s) failed", "m_plus.e == m_minus.e"); } return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); }
grisu2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV qword ptr [RSP + 0x58],RCX MOV dword ptr [RSP + 0x60],R8D CMP dword ptr [RSP + 0xc8],R8D JNZ 0x0018c2de MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX LEA R13,[RSP + 0xb0] CMP dword ptr [R13 + 0x8],R8D JNZ 0x0018c2fa MOV EDI,R8D CALL 0x0018c3b3 MOV R12,RDX LEA R14,[RSP + 0x68] MOV qword ptr [R14],RAX MOV dword ptr [R14 + 0x8],R12D MOV RDI,R13 MOV RSI,R14 CALL 0x0018c4e8 MOV R15,RAX MOV EBX,EDX LEA RDI,[RSP + 0x58] MOV RSI,R14 CALL 0x0018c4e8 MOV R13,RAX MOV EBP,EDX LEA RDI,[RSP + 0xc0] MOV RSI,R14 CALL 0x0018c4e8 INC R13 DEC RAX SHR R12,0x20 NEG R12D MOV RCX,qword ptr [RSP + 0x30] MOV dword ptr [RCX],R12D MOV qword ptr [RSP + 0x48],R15 MOV dword ptr [RSP + 0x50],EBX MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x40],EDX MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,RCX MOV RCX,R13 MOV R8D,EBP CALL 0x0018c544 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018c2de: LEA RDI,[0x1b5cff] LEA RDX,[0x1ae5c5] LEA RCX,[0x1ba75d] MOV ESI,0x454b JMP 0x0018c314 LAB_0018c2fa: LEA RDI,[0x1b5cff] LEA RDX,[0x1ae5c5] LEA RCX,[0x1ba773] MOV ESI,0x454c LAB_0018c314: XOR EAX,EAX CALL 0x00124f00
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2(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 (int8 param_1,int8 param_2,int *param_3,int8 param_4,int param_5, int8 param_6,int8 param_7,int param_8,int8 param_9,int param_10) { int4 uVar1; char *pcVar2; int4 extraout_EDX; int8 uVar3; int1 auVar4 [16]; int1 auVar5 [12]; int1 auVar6 [12]; int4 uStack_64; int8 local_50; int local_48; int8 local_40; int4 local_38; local_50 = param_4; local_48 = param_5; if (param_10 == param_5) { if (param_8 == param_5) { auVar4 = get_cached_power_for_binary_exponent(param_5); local_40 = auVar4._0_8_; local_38 = auVar4._8_4_; uVar1 = diyfp::mul((diyfp *)&param_7,(diyfp *)&local_40); auVar5 = diyfp::mul((diyfp *)&local_50,(diyfp *)&local_40); auVar6 = diyfp::mul((diyfp *)&param_9,(diyfp *)&local_40); *param_3 = -auVar4._12_4_; grisu2_digit_gen(param_1,param_2,param_3,auVar5._0_8_ + 1,auVar5._8_4_,param_6,uVar1, extraout_EDX,auVar6._0_8_ + -1,CONCAT44(uStack_64,auVar6._8_4_)); return; } pcVar2 = "m_plus.e == v.e"; uVar3 = 0x454c; } else { pcVar2 = "m_plus.e == m_minus.e"; uVar3 = 0x454b; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
39,243
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&)
monkey531[P]llama/common/./json.hpp
static std::string position_string(const position_t& pos) { return concat(" at line ", std::to_string(pos.lines_read + 1), ", column ", std::to_string(pos.chars_read_current_line)); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %r15 incq %r15 movl $0x1, %ebp movabsq $0x346dc5d63886594b, %r13 # imm = 0x346DC5D63886594B movl $0x1, %esi cmpq $0xa, %r15 jb 0x4d9e4 movl $0x4, %esi movq %r15, %rcx cmpq $0x63, %rcx jbe 0x4d9dd cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x4d9e2 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x4d9e4 movq %rcx, %rax mulq %r13 shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x4d9a7 addl $-0x3, %esi jmp 0x4d9e4 addl $-0x2, %esi jmp 0x4d9e4 decl %esi movl %esi, %esi leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x8(%rsp), %r12 movq %r12, %rdi xorl %edx, %edx callq 0x187a0 movq (%r12), %rdi movl 0x8(%r12), %esi movq %r15, %rdx callq 0x4ae1b movq 0x8(%r14), %r14 cmpq $0xa, %r14 jb 0x4da5e movl $0x4, %ebp movq %r14, %rcx cmpq $0x63, %rcx jbe 0x4da57 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x4da5c cmpq $0x2710, %rcx # imm = 0x2710 jb 0x4da5e movq %rcx, %rax mulq %r13 shrq $0xb, %rdx addl $0x4, %ebp cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x4da21 addl $-0x3, %ebp jmp 0x4da5e addl $-0x2, %ebp jmp 0x4da5e decl %ebp movl %ebp, %esi leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x28(%rsp), %rdi xorl %edx, %edx callq 0x187a0 leaq 0x28(%rsp), %r15 movq (%r15), %rdi movl 0x8(%r15), %esi movq %r14, %rdx callq 0x4ae1b leaq 0x7046b(%rip), %rsi # 0xbdefc leaq 0x7046e(%rip), %rcx # 0xbdf06 leaq 0x8(%rsp), %rdx movq %rbx, %rdi movq %r15, %r8 callq 0x4db30 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x4dabf movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x4dadb movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x4db0c movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x4db0c movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x4db28 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq %rbx, %rdi callq 0x18b90
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi mov r15, [rsi+10h] inc r15 mov ebp, 1 mov r13, 346DC5D63886594Bh mov esi, 1 cmp r15, 0Ah jb short loc_4D9E4 mov esi, 4 mov rcx, r15 loc_4D9A7: cmp rcx, 63h ; 'c' jbe short loc_4D9DD cmp rcx, 3E7h jbe short loc_4D9E2 cmp rcx, 2710h jb short loc_4D9E4 mov rax, rcx mul r13 shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_4D9A7 add esi, 0FFFFFFFDh jmp short loc_4D9E4 loc_4D9DD: add esi, 0FFFFFFFEh jmp short loc_4D9E4 loc_4D9E2: dec esi loc_4D9E4: mov esi, esi lea rax, [rsp+78h+var_60] mov [rax-10h], rax lea r12, [rsp+78h+var_70] mov rdi, r12 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [r12] mov esi, [r12+8] mov rdx, r15 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) mov r14, [r14+8] cmp r14, 0Ah jb short loc_4DA5E mov ebp, 4 mov rcx, r14 loc_4DA21: cmp rcx, 63h ; 'c' jbe short loc_4DA57 cmp rcx, 3E7h jbe short loc_4DA5C cmp rcx, 2710h jb short loc_4DA5E mov rax, rcx mul r13 shr rdx, 0Bh add ebp, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_4DA21 add ebp, 0FFFFFFFDh jmp short loc_4DA5E loc_4DA57: add ebp, 0FFFFFFFEh jmp short loc_4DA5E loc_4DA5C: dec ebp loc_4DA5E: mov esi, ebp lea r12, [rsp+78h+var_40] mov [r12-10h], r12 lea rdi, [rsp+78h+var_50] xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) lea r15, [rsp+78h+var_50] mov rdi, [r15] mov esi, [r15+8] mov rdx, r14 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) lea rsi, aAtLine; " at line " lea rcx, aColumn; ", column " lea rdx, [rsp+78h+var_70] mov rdi, rbx mov r8, r15 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA10_KcS8_SB_S8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>(char const(&)[10],std::string,char const(&)[10],std::string &&) mov rdi, [rsp+78h+var_50]; void * cmp rdi, r12 jz short loc_4DABF mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4DABF: mov rdi, [rsp+78h+var_70]; void * lea rax, [rsp+78h+var_60] cmp rdi, rax jz short loc_4DADB mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4DADB: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_4DB0C mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4DB0C mov rbx, rax loc_4DB0C: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_4DB28 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4DB28: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](long long a1, long long a2) { unsigned long long v3; // r15 unsigned int v4; // ebp unsigned int v5; // esi unsigned long long v6; // rcx bool v7; // cc unsigned long long v8; // r14 unsigned long long v9; // rcx void *v11; // [rsp+8h] [rbp-70h] BYREF int v12; // [rsp+10h] [rbp-68h] _QWORD v13[2]; // [rsp+18h] [rbp-60h] BYREF void *v14; // [rsp+28h] [rbp-50h] BYREF int v15; // [rsp+30h] [rbp-48h] _QWORD v16[8]; // [rsp+38h] [rbp-40h] BYREF v3 = *(_QWORD *)(a2 + 16) + 1LL; v4 = 1; v5 = 1; if ( v3 >= 0xA ) { v5 = 4; v6 = v3; while ( 1 ) { if ( v6 <= 0x63 ) { v5 -= 2; goto LABEL_10; } if ( v6 <= 0x3E7 ) break; if ( v6 < 0x2710 ) goto LABEL_10; v5 += 4; v7 = v6 <= 0x1869F; v6 /= 0x2710uLL; if ( v7 ) { v5 -= 3; goto LABEL_10; } } --v5; } LABEL_10: v11 = v13; std::string::_M_construct(&v11, v5, 0LL); std::__detail::__to_chars_10_impl<unsigned long>((char *)v11, v12, v3); v8 = *(_QWORD *)(a2 + 8); if ( v8 >= 0xA ) { v4 = 4; v9 = v8; while ( 1 ) { if ( v9 <= 0x63 ) { v4 -= 2; goto LABEL_19; } if ( v9 <= 0x3E7 ) break; if ( v9 < 0x2710 ) goto LABEL_19; v4 += 4; v7 = v9 <= 0x1869F; v9 /= 0x2710uLL; if ( v7 ) { v4 -= 3; goto LABEL_19; } } --v4; } LABEL_19: v14 = v16; std::string::_M_construct(&v14, v4, 0LL); std::__detail::__to_chars_10_impl<unsigned long>((char *)v14, v15, v8); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>( a1, " at line ", &v11, ", column ", &v14); if ( v14 != v16 ) operator delete(v14, v16[0] + 1LL); if ( v11 != v13 ) operator delete(v11, v13[0] + 1LL); return a1; }
position_string[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV R15,qword ptr [RSI + 0x10] INC R15 MOV EBP,0x1 MOV R13,0x346dc5d63886594b MOV ESI,0x1 CMP R15,0xa JC 0x0014d9e4 MOV ESI,0x4 MOV RCX,R15 LAB_0014d9a7: CMP RCX,0x63 JBE 0x0014d9dd CMP RCX,0x3e7 JBE 0x0014d9e2 CMP RCX,0x2710 JC 0x0014d9e4 MOV RAX,RCX MUL R13 SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0014d9a7 ADD ESI,-0x3 JMP 0x0014d9e4 LAB_0014d9dd: ADD ESI,-0x2 JMP 0x0014d9e4 LAB_0014d9e2: DEC ESI LAB_0014d9e4: MOV ESI,ESI LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX LEA R12,[RSP + 0x8] MOV RDI,R12 XOR EDX,EDX CALL 0x001187a0 MOV RDI,qword ptr [R12] MOV ESI,dword ptr [R12 + 0x8] MOV RDX,R15 CALL 0x0014ae1b MOV R14,qword ptr [R14 + 0x8] CMP R14,0xa JC 0x0014da5e MOV EBP,0x4 MOV RCX,R14 LAB_0014da21: CMP RCX,0x63 JBE 0x0014da57 CMP RCX,0x3e7 JBE 0x0014da5c CMP RCX,0x2710 JC 0x0014da5e MOV RAX,RCX MUL R13 SHR RDX,0xb ADD EBP,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0014da21 ADD EBP,-0x3 JMP 0x0014da5e LAB_0014da57: ADD EBP,-0x2 JMP 0x0014da5e LAB_0014da5c: DEC EBP LAB_0014da5e: MOV ESI,EBP LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 LAB_0014da6a: LEA RDI,[RSP + 0x28] XOR EDX,EDX CALL 0x001187a0 LEA R15,[RSP + 0x28] MOV RDI,qword ptr [R15] MOV ESI,dword ptr [R15 + 0x8] MOV RDX,R14 CALL 0x0014ae1b LAB_0014da8a: LEA RSI,[0x1bdefc] LEA RCX,[0x1bdf06] LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV R8,R15 CALL 0x0014db30 LAB_0014daa8: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x0014dabf MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_0014dabf: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x0014dadb MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0014dadb: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&) */ parse_error * __thiscall nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_ (parse_error *this,position_t *param_1) { bool bVar1; char cVar2; ulong uVar3; char cVar4; char cVar5; ulong uVar6; long *local_70; uint local_68; long local_60 [2]; long *local_50; uint local_48; long local_40 [2]; uVar6 = *(long *)(param_1 + 0x10) + 1; cVar4 = '\x01'; cVar5 = '\x01'; if (9 < uVar6) { uVar3 = uVar6; cVar2 = '\x04'; do { cVar5 = cVar2; if (uVar3 < 100) { cVar5 = cVar5 + -2; goto LAB_0014d9e4; } if (uVar3 < 1000) { cVar5 = cVar5 + -1; goto LAB_0014d9e4; } if (uVar3 < 10000) goto LAB_0014d9e4; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar2 = cVar5 + '\x04'; } while (bVar1); cVar5 = cVar5 + '\x01'; } LAB_0014d9e4: local_70 = local_60; std::__cxx11::string::_M_construct((ulong)&local_70,cVar5); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_70,local_68,uVar6); uVar6 = *(ulong *)(param_1 + 8); if (9 < uVar6) { uVar3 = uVar6; cVar5 = '\x04'; do { cVar4 = cVar5; if (uVar3 < 100) { cVar4 = cVar4 + -2; goto LAB_0014da5e; } if (uVar3 < 1000) { cVar4 = cVar4 + -1; goto LAB_0014da5e; } if (uVar3 < 10000) goto LAB_0014da5e; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar5 = cVar4 + '\x04'; } while (bVar1); cVar4 = cVar4 + '\x01'; } LAB_0014da5e: /* try { // try from 0014da6a to 0014da75 has its CatchHandler @ 0014db09 */ local_50 = local_40; std::__cxx11::string::_M_construct((ulong)&local_50,cVar4); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_50,local_48,uVar6); /* try { // try from 0014da8a to 0014daa7 has its CatchHandler @ 0014daed */ concat<std::__cxx11::string,char_const(&)[10],std::__cxx11::string,char_const(&)[10],std::__cxx11::string> ((detail *)this," at line ",(string *)&local_70,", column ",(string *)&local_50); if (local_50 != local_40) { operator_delete(local_50,local_40[0] + 1); } if (local_70 != local_60) { operator_delete(local_70,local_60[0] + 1); } return this; }
39,244
reset_root_defaults
eloqsql/mysys/my_alloc.c
void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused))) { DBUG_ENTER("reset_root_defaults"); DBUG_ASSERT(alloc_root_inited(mem_root)); mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) | (mem_root->block_size & 1)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size) { USED_MEM *mem, **prev= &mem_root->free; /* Free unused blocks, so that consequent calls to reset_root_defaults won't eat away memory. */ while (*prev) { mem= *prev; if (mem->size == size) { /* We found a suitable block, no need to do anything else */ mem_root->pre_alloc= mem; DBUG_VOID_RETURN; } if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size) { /* remove block from the list and free it */ *prev= mem->next; my_free(mem); } else prev= &mem->next; } /* Allocate new prealloc block and add it to the end of free list */ if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size, MYF(MALLOC_FLAG(mem_root-> block_size))))) { mem->size= size; mem->left= pre_alloc_size; mem->next= *prev; *prev= mem_root->pre_alloc= mem; TRASH_MEM(mem); } else { mem_root->pre_alloc= 0; } } } else #endif mem_root->pre_alloc= 0; DBUG_VOID_RETURN; }
O0
c
reset_root_defaults: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x35296 movq -0x10(%rbp), %rcx subq $0x28, %rcx andq $-0x2, %rcx movq -0x8(%rbp), %rax movq 0x20(%rax), %rax andq $0x1, %rax orq %rax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x20(%rax) cmpq $0x0, -0x18(%rbp) je 0x353ef movq -0x18(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x352f1 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax cmpq -0x20(%rbp), %rax je 0x353ed movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq $0x0, (%rax) je 0x35366 movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq 0x10(%rax), %rax cmpq -0x20(%rbp), %rax jne 0x3532d movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) jmp 0x353ff movq -0x28(%rbp), %rax movq 0x8(%rax), %rax addq $0x18, %rax movq -0x28(%rbp), %rcx cmpq 0x10(%rcx), %rax jne 0x3535c movq -0x28(%rbp), %rax movq (%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rdi callq 0x29db0 jmp 0x35364 movq -0x28(%rbp), %rax movq %rax, -0x30(%rbp) jmp 0x352f9 movq -0x8(%rbp), %rax movl 0x38(%rax), %edi movq -0x20(%rbp), %rsi movq -0x8(%rbp), %rax movq 0x20(%rax), %rdx andq $0x1, %rdx xorl %eax, %eax movl $0x10000, %ecx # imm = 0x10000 cmpq $0x0, %rdx cmovnel %ecx, %eax movl %eax, %eax movl %eax, %edx callq 0x29a30 movq %rax, -0x28(%rbp) cmpq $0x0, %rax je 0x353df movq -0x20(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rax movq (%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movq -0x28(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x30(%rbp), %rax movq %rcx, (%rax) jmp 0x353d9 jmp 0x353db jmp 0x353dd jmp 0x353eb movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0x353ed jmp 0x353fb movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0x353fd jmp 0x353ff addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
reset_root_defaults: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_35296: mov rcx, [rbp+var_10] sub rcx, 28h ; '(' and rcx, 0FFFFFFFFFFFFFFFEh mov rax, [rbp+var_8] mov rax, [rax+20h] and rax, 1 or rcx, rax mov rax, [rbp+var_8] mov [rax+20h], rcx cmp [rbp+var_18], 0 jz loc_353EF mov rax, [rbp+var_18] add rax, 18h mov [rbp+var_20], rax mov rax, [rbp+var_8] cmp qword ptr [rax+10h], 0 jz short loc_352F1 mov rax, [rbp+var_8] mov rax, [rax+10h] mov rax, [rax+10h] cmp rax, [rbp+var_20] jz loc_353ED loc_352F1: mov rax, [rbp+var_8] mov [rbp+var_30], rax loc_352F9: mov rax, [rbp+var_30] cmp qword ptr [rax], 0 jz short loc_35366 mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rax, [rax+10h] cmp rax, [rbp+var_20] jnz short loc_3532D mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+10h], rcx jmp loc_353FF loc_3532D: mov rax, [rbp+var_28] mov rax, [rax+8] add rax, 18h mov rcx, [rbp+var_28] cmp rax, [rcx+10h] jnz short loc_3535C mov rax, [rbp+var_28] mov rcx, [rax] mov rax, [rbp+var_30] mov [rax], rcx mov rdi, [rbp+var_28] call my_free jmp short loc_35364 loc_3535C: mov rax, [rbp+var_28] mov [rbp+var_30], rax loc_35364: jmp short loc_352F9 loc_35366: mov rax, [rbp+var_8] mov edi, [rax+38h] mov rsi, [rbp+var_20] mov rax, [rbp+var_8] mov rdx, [rax+20h] and rdx, 1 xor eax, eax mov ecx, 10000h cmp rdx, 0 cmovnz eax, ecx mov eax, eax mov edx, eax call my_malloc mov [rbp+var_28], rax cmp rax, 0 jz short loc_353DF mov rcx, [rbp+var_20] mov rax, [rbp+var_28] mov [rax+10h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_28] mov [rax+8], rcx mov rax, [rbp+var_30] mov rcx, [rax] mov rax, [rbp+var_28] mov [rax], rcx mov rcx, [rbp+var_28] mov rax, [rbp+var_8] mov [rax+10h], rcx mov rax, [rbp+var_30] mov [rax], rcx jmp short $+2 loc_353D9: jmp short $+2 loc_353DB: jmp short $+2 loc_353DD: jmp short loc_353EB loc_353DF: mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_353EB: jmp short $+2 loc_353ED: jmp short loc_353FB loc_353EF: mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 loc_353FB: jmp short $+2 loc_353FD: jmp short $+2 loc_353FF: add rsp, 30h pop rbp retn
long long * reset_root_defaults(long long *a1, long long a2, long long a3) { long long *result; // rax unsigned int v4; // edi int v5; // eax long long *v6; // [rsp+0h] [rbp-30h] long long *v7; // [rsp+8h] [rbp-28h] _QWORD *v8; // [rsp+8h] [rbp-28h] unsigned long long v9; // [rsp+10h] [rbp-20h] a1[4] = a1[4] & 1 | (a2 - 40) & 0xFFFFFFFFFFFFFFFELL; if ( a3 ) { v9 = a3 + 24; if ( !a1[2] || (result = *(long long **)(a1[2] + 16), result != (long long *)v9) ) { v6 = a1; while ( *v6 ) { v7 = (long long *)*v6; if ( *(_QWORD *)(*v6 + 16) == v9 ) { result = a1; a1[2] = (long long)v7; return result; } if ( v7[1] + 24 == v7[2] ) { *v6 = *v7; my_free((long long)v7); } else { v6 = (long long *)*v6; } } v4 = *((_DWORD *)a1 + 14); v5 = 0; if ( (a1[4] & 1) != 0 ) v5 = 0x10000; v8 = (_QWORD *)my_malloc(v4, v9, v5); if ( v8 ) { v8[2] = v9; v8[1] = a3; *v8 = *v6; a1[2] = (long long)v8; result = v6; *v6 = (long long)v8; } else { result = a1; a1[2] = 0LL; } } } else { result = a1; a1[2] = 0LL; } return result; }
reset_root_defaults: 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 JMP 0x00135296 LAB_00135296: MOV RCX,qword ptr [RBP + -0x10] SUB RCX,0x28 AND RCX,-0x2 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] AND RAX,0x1 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],RCX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001353ef MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x10],0x0 JZ 0x001352f1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x20] JZ 0x001353ed LAB_001352f1: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x30],RAX LAB_001352f9: MOV RAX,qword ptr [RBP + -0x30] CMP qword ptr [RAX],0x0 JZ 0x00135366 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0013532d MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX JMP 0x001353ff LAB_0013532d: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] ADD RAX,0x18 MOV RCX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RCX + 0x10] JNZ 0x0013535c MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RBP + -0x28] CALL 0x00129db0 JMP 0x00135364 LAB_0013535c: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x30],RAX LAB_00135364: JMP 0x001352f9 LAB_00135366: MOV RAX,qword ptr [RBP + -0x8] MOV EDI,dword ptr [RAX + 0x38] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x20] AND RDX,0x1 XOR EAX,EAX MOV ECX,0x10000 CMP RDX,0x0 CMOVNZ EAX,ECX MOV EAX,EAX MOV EDX,EAX CALL 0x00129a30 MOV qword ptr [RBP + -0x28],RAX CMP RAX,0x0 JZ 0x001353df MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX JMP 0x001353d9 LAB_001353d9: JMP 0x001353db LAB_001353db: JMP 0x001353dd LAB_001353dd: JMP 0x001353eb LAB_001353df: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_001353eb: JMP 0x001353ed LAB_001353ed: JMP 0x001353fb LAB_001353ef: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 LAB_001353fb: JMP 0x001353fd LAB_001353fd: JMP 0x001353ff LAB_001353ff: ADD RSP,0x30 POP RBP RET
void reset_root_defaults(long *param_1,long param_2,long param_3) { int4 uVar1; long lVar2; long *plVar3; long *local_38; param_1[4] = param_2 - 0x28U & 0xfffffffffffffffe | param_1[4] & 1U; if (param_3 == 0) { param_1[2] = 0; } else { lVar2 = param_3 + 0x18; plVar3 = param_1; if ((param_1[2] == 0) || (plVar3 = param_1, *(long *)(param_1[2] + 0x10) != lVar2)) { while (local_38 = plVar3, *local_38 != 0) { plVar3 = (long *)*local_38; if (plVar3[2] == lVar2) { param_1[2] = (long)plVar3; return; } if (plVar3[1] + 0x18 == plVar3[2]) { *local_38 = *plVar3; my_free(plVar3); plVar3 = local_38; } } uVar1 = 0; if ((param_1[4] & 1U) != 0) { uVar1 = 0x10000; } plVar3 = (long *)my_malloc((int)param_1[7],lVar2,uVar1); if (plVar3 == (long *)0x0) { param_1[2] = 0; } else { plVar3[2] = lVar2; plVar3[1] = param_3; *plVar3 = *local_38; param_1[2] = (long)plVar3; *local_38 = (long)plVar3; } } } return; }
39,245
reset_root_defaults
eloqsql/mysys/my_alloc.c
void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused))) { DBUG_ENTER("reset_root_defaults"); DBUG_ASSERT(alloc_root_inited(mem_root)); mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) | (mem_root->block_size & 1)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size) { USED_MEM *mem, **prev= &mem_root->free; /* Free unused blocks, so that consequent calls to reset_root_defaults won't eat away memory. */ while (*prev) { mem= *prev; if (mem->size == size) { /* We found a suitable block, no need to do anything else */ mem_root->pre_alloc= mem; DBUG_VOID_RETURN; } if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size) { /* remove block from the list and free it */ *prev= mem->next; my_free(mem); } else prev= &mem->next; } /* Allocate new prealloc block and add it to the end of free list */ if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size, MYF(MALLOC_FLAG(mem_root-> block_size))))) { mem->size= size; mem->left= pre_alloc_size; mem->next= *prev; *prev= mem_root->pre_alloc= mem; TRASH_MEM(mem); } else { mem_root->pre_alloc= 0; } } } else #endif mem_root->pre_alloc= 0; DBUG_VOID_RETURN; }
O3
c
reset_root_defaults: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx andq $-0x2, %rsi movq 0x20(%rdi), %rax andl $0x1, %eax leaq (%rsi,%rax), %rdx addq $-0x28, %rdx movq %rdx, 0x20(%rdi) testq %r14, %r14 je 0x2e430 leaq 0x18(%r14), %r15 movq 0x10(%rbx), %rax testq %rax, %rax je 0x2e3bf cmpq %r15, 0x10(%rax) je 0x2e43e movq (%rbx), %rdi movq %rbx, %r12 testq %rdi, %rdi je 0x2e401 movq %rbx, %r12 movq 0x10(%rdi), %rax cmpq %r15, %rax je 0x2e43a movq 0x8(%rdi), %rcx addq $0x18, %rcx cmpq %rax, %rcx jne 0x2e3f1 movq (%rdi), %rax movq %rax, (%r12) callq 0x28146 jmp 0x2e3f4 movq %rdi, %r12 movq (%r12), %rdi testq %rdi, %rdi jne 0x2e3cd movq 0x20(%rbx), %rdx movl 0x38(%rbx), %edi andl $0x1, %edx shll $0x10, %edx movq %r15, %rsi callq 0x27f19 testq %rax, %rax je 0x2e430 movq %r15, 0x10(%rax) movq %r14, 0x8(%rax) movq (%r12), %rcx movq %rcx, (%rax) movq %rax, 0x10(%rbx) movq %rax, (%r12) jmp 0x2e43e movq $0x0, 0x10(%rbx) jmp 0x2e43e movq %rdi, 0x10(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
reset_root_defaults: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdx mov rbx, rdi and rsi, 0FFFFFFFFFFFFFFFEh mov rax, [rdi+20h] and eax, 1 lea rdx, [rsi+rax] add rdx, 0FFFFFFFFFFFFFFD8h mov [rdi+20h], rdx test r14, r14 jz loc_2E430 lea r15, [r14+18h] mov rax, [rbx+10h] test rax, rax jz short loc_2E3BF cmp [rax+10h], r15 jz short loc_2E43E loc_2E3BF: mov rdi, [rbx] mov r12, rbx test rdi, rdi jz short loc_2E401 mov r12, rbx loc_2E3CD: mov rax, [rdi+10h] cmp rax, r15 jz short loc_2E43A mov rcx, [rdi+8] add rcx, 18h cmp rcx, rax jnz short loc_2E3F1 mov rax, [rdi] mov [r12], rax call my_free jmp short loc_2E3F4 loc_2E3F1: mov r12, rdi loc_2E3F4: mov rdi, [r12] test rdi, rdi jnz short loc_2E3CD mov rdx, [rbx+20h] loc_2E401: mov edi, [rbx+38h] and edx, 1 shl edx, 10h mov rsi, r15 call my_malloc test rax, rax jz short loc_2E430 mov [rax+10h], r15 mov [rax+8], r14 mov rcx, [r12] mov [rax], rcx mov [rbx+10h], rax mov [r12], rax jmp short loc_2E43E loc_2E430: mov qword ptr [rbx+10h], 0 jmp short loc_2E43E loc_2E43A: mov [rbx+10h], rdi loc_2E43E: pop rbx pop r12 pop r14 pop r15 pop rbp retn
_QWORD * reset_root_defaults(long long a1, long long a2, long long a3) { _QWORD *result; // rax unsigned long long v6; // rdx _QWORD *v7; // r15 _QWORD *v8; // rdi _QWORD *v9; // r12 result = (_QWORD *)(*(_QWORD *)(a1 + 32) & 1LL); v6 = (unsigned long long)result + (a2 & 0xFFFFFFFFFFFFFFFELL) - 40; *(_QWORD *)(a1 + 32) = v6; if ( !a3 ) { LABEL_14: *(_QWORD *)(a1 + 16) = 0LL; return result; } v7 = (_QWORD *)(a3 + 24); result = *(_QWORD **)(a1 + 16); if ( result && (_QWORD *)result[2] == v7 ) return result; v8 = *(_QWORD **)a1; v9 = (_QWORD *)a1; if ( !*(_QWORD *)a1 ) { LABEL_12: result = (_QWORD *)my_malloc(*(_DWORD *)(a1 + 56), a3 + 24, (unsigned __int8)(v6 & 1) << 16); if ( result ) { result[2] = v7; result[1] = a3; *result = *v9; *(_QWORD *)(a1 + 16) = result; *v9 = result; return result; } goto LABEL_14; } v9 = (_QWORD *)a1; while ( 1 ) { result = (_QWORD *)v8[2]; if ( result == v7 ) break; if ( (_QWORD *)(v8[1] + 24LL) == result ) { *v9 = *v8; my_free((long long)v8); } else { v9 = v8; } v8 = (_QWORD *)*v9; if ( !*v9 ) { v6 = *(_QWORD *)(a1 + 32); goto LABEL_12; } } *(_QWORD *)(a1 + 16) = v8; return result; }
reset_root_defaults: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV RBX,RDI AND RSI,-0x2 MOV RAX,qword ptr [RDI + 0x20] AND EAX,0x1 LEA RDX,[RSI + RAX*0x1] ADD RDX,-0x28 MOV qword ptr [RDI + 0x20],RDX TEST R14,R14 JZ 0x0012e430 LEA R15,[R14 + 0x18] MOV RAX,qword ptr [RBX + 0x10] TEST RAX,RAX JZ 0x0012e3bf CMP qword ptr [RAX + 0x10],R15 JZ 0x0012e43e LAB_0012e3bf: MOV RDI,qword ptr [RBX] MOV R12,RBX TEST RDI,RDI JZ 0x0012e401 MOV R12,RBX LAB_0012e3cd: MOV RAX,qword ptr [RDI + 0x10] CMP RAX,R15 JZ 0x0012e43a MOV RCX,qword ptr [RDI + 0x8] ADD RCX,0x18 CMP RCX,RAX JNZ 0x0012e3f1 MOV RAX,qword ptr [RDI] MOV qword ptr [R12],RAX CALL 0x00128146 JMP 0x0012e3f4 LAB_0012e3f1: MOV R12,RDI LAB_0012e3f4: MOV RDI,qword ptr [R12] TEST RDI,RDI JNZ 0x0012e3cd MOV RDX,qword ptr [RBX + 0x20] LAB_0012e401: MOV EDI,dword ptr [RBX + 0x38] AND EDX,0x1 SHL EDX,0x10 MOV RSI,R15 CALL 0x00127f19 TEST RAX,RAX JZ 0x0012e430 MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RAX + 0x8],R14 MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [R12],RAX JMP 0x0012e43e LAB_0012e430: MOV qword ptr [RBX + 0x10],0x0 JMP 0x0012e43e LAB_0012e43a: MOV qword ptr [RBX + 0x10],RDI LAB_0012e43e: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void reset_root_defaults(long *param_1,ulong param_2,long param_3) { long lVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; lVar3 = (param_2 & 0xfffffffffffffffe) + (ulong)((uint)param_1[4] & 1) + -0x28; param_1[4] = lVar3; if (param_3 != 0) { lVar1 = param_3 + 0x18; if ((param_1[2] != 0) && (*(long *)(param_1[2] + 0x10) == lVar1)) { return; } plVar2 = (long *)*param_1; plVar4 = param_1; plVar5 = param_1; if (plVar2 != (long *)0x0) { do { if (plVar2[2] == lVar1) { param_1[2] = (long)plVar2; return; } plVar5 = plVar2; if (plVar2[1] + 0x18 == plVar2[2]) { *plVar4 = *plVar2; my_free(); plVar5 = plVar4; } plVar2 = (long *)*plVar5; plVar4 = plVar5; } while (plVar2 != (long *)0x0); lVar3 = param_1[4]; } plVar2 = (long *)my_malloc((int)param_1[7],lVar1,((uint)lVar3 & 1) << 0x10); if (plVar2 != (long *)0x0) { plVar2[2] = lVar1; plVar2[1] = param_3; *plVar2 = *plVar5; param_1[2] = (long)plVar2; *plVar5 = (long)plVar2; return; } } param_1[2] = 0; return; }
39,246
ma_zlib_decompress
eloqsql/libmariadb/plugins/compress/c_zlib.c
my_bool ma_zlib_decompress(ma_compress_ctx *ctx, void *dst, size_t *dst_len, void *source, size_t *source_len) { int rc; if (!ctx) return 1; rc= uncompress((Bytef*) dst, (uLongf *)dst_len, (Bytef*) source, (uLongf)*source_len); if (rc != Z_OK) return 1; return 0; }
O3
c
ma_zlib_decompress: testq %rdi, %rdi je 0x2ef52 pushq %rbp movq %rsp, %rbp movq (%r8), %rax movq %rsi, %rdi movq %rdx, %rsi movq %rcx, %rdx movq %rax, %rcx callq 0x131b0 testl %eax, %eax setne %al popq %rbp retq movb $0x1, %al retq
ma_zlib_decompress: test rdi, rdi jz short loc_2EF52 push rbp mov rbp, rsp mov rax, [r8] mov rdi, rsi mov rsi, rdx mov rdx, rcx mov rcx, rax call _uncompress test eax, eax setnz al pop rbp retn loc_2EF52: mov al, 1 retn
bool ma_zlib_decompress(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { return !a1 || (unsigned int)uncompress(a2, a3, a4, *a5) != 0; }
ma_zlib_decompress: TEST RDI,RDI JZ 0x0012ef52 PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [R8] MOV RDI,RSI MOV RSI,RDX MOV RDX,RCX MOV RCX,RAX CALL 0x001131b0 TEST EAX,EAX SETNZ AL POP RBP RET LAB_0012ef52: MOV AL,0x1 RET
bool ma_zlib_decompress(long param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int iVar1; if (param_1 != 0) { iVar1 = uncompress(param_2,param_3,param_4,*param_5); return iVar1 != 0; } return true; }
39,247
my_hash_sort_simple_nopad
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple_nopad(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end= key + len; register ulong m1= *nr1, m2= *nr2; for (; key < (uchar*) end ; key++) { MY_HASH_ADD(m1, m2, (uint) sort_order[(uint) *key]); } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_simple_nopad: movq (%rcx), %rax movq (%r8), %r9 testq %rdx, %rdx jle 0xbafb8 pushq %rbp movq %rsp, %rbp movq 0x58(%rdi), %rdi addq %rsi, %rdx movl %eax, %r10d andl $0x3f, %r10d addq %r9, %r10 movzbl (%rsi), %r11d movzbl (%rdi,%r11), %r11d imulq %r10, %r11 movq %rax, %r10 shlq $0x8, %r10 addq %r11, %r10 xorq %r10, %rax addq $0x3, %r9 incq %rsi cmpq %rdx, %rsi jb 0xbaf87 popq %rbp movq %rax, (%rcx) movq %r9, (%r8) retq
my_hash_sort_simple_nopad: mov rax, [rcx] mov r9, [r8] test rdx, rdx jle short loc_BAFB8 push rbp mov rbp, rsp mov rdi, [rdi+58h] add rdx, rsi loc_BAF87: mov r10d, eax and r10d, 3Fh add r10, r9 movzx r11d, byte ptr [rsi] movzx r11d, byte ptr [rdi+r11] imul r11, r10 mov r10, rax shl r10, 8 add r10, r11 xor rax, r10 add r9, 3 inc rsi cmp rsi, rdx jb short loc_BAF87 pop rbp loc_BAFB8: mov [rcx], rax mov [r8], r9 retn
long long my_hash_sort_simple_nopad(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long result; // rax long long v6; // r9 long long v7; // rdi unsigned __int8 *v8; // rdx result = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = *(_QWORD *)(a1 + 88); v8 = &a2[a3]; do { result ^= (v6 + (result & 0x3F)) * *(unsigned __int8 *)(v7 + *a2) + (result << 8); v6 += 3LL; ++a2; } while ( a2 < v8 ); } *a4 = result; *a5 = v6; return result; }
my_hash_sort_simple_nopad: MOV RAX,qword ptr [RCX] MOV R9,qword ptr [R8] TEST RDX,RDX JLE 0x001bafb8 PUSH RBP MOV RBP,RSP MOV RDI,qword ptr [RDI + 0x58] ADD RDX,RSI LAB_001baf87: MOV R10D,EAX AND R10D,0x3f ADD R10,R9 MOVZX R11D,byte ptr [RSI] MOVZX R11D,byte ptr [RDI + R11*0x1] IMUL R11,R10 MOV R10,RAX SHL R10,0x8 ADD R10,R11 XOR RAX,R10 ADD R9,0x3 INC RSI CMP RSI,RDX JC 0x001baf87 POP RBP LAB_001bafb8: MOV qword ptr [RCX],RAX MOV qword ptr [R8],R9 RET
void my_hash_sort_simple_nopad(long param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { ulong uVar1; byte *pbVar2; long lVar3; uVar1 = *param_4; lVar3 = *param_5; if (0 < param_3) { pbVar2 = param_2 + param_3; do { uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*(byte *)(*(long *)(param_1 + 0x58) + (ulong)*param_2) * ((ulong)((uint)uVar1 & 0x3f) + lVar3); lVar3 = lVar3 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar1; *param_5 = lVar3; return; }
39,248
JS_ToIndex
bluesky950520[P]quickjs/quickjs.c
int JS_ToIndex(JSContext *ctx, uint64_t *plen, JSValue val) { int64_t v; if (JS_ToInt64Sat(ctx, &v, val)) return -1; if (v < 0 || v > MAX_SAFE_INTEGER) { JS_ThrowRangeError(ctx, "invalid array index"); *plen = 0; return -1; } *plen = v; return 0; }
O2
c
JS_ToIndex: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x8(%rsp), %rsi callq 0x24fc6 testl %eax, %eax je 0x25252 pushq $-0x1 popq %rax jmp 0x2527c movq 0x8(%rsp), %r15 xorl %eax, %eax movq %r15, %rcx shrq $0x35, %rcx je 0x25279 leaq 0x63cc1(%rip), %rsi # 0x88f2a xorl %r15d, %r15d movq %r14, %rdi xorl %eax, %eax callq 0x1e863 pushq $-0x1 popq %rax movq %r15, (%rbx) addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
JS_ToIndex: push r15 push r14 push rbx sub rsp, 10h mov rbx, rsi mov r14, rdi lea rsi, [rsp+28h+var_20] call JS_ToInt64Sat test eax, eax jz short loc_25252 push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_2527C loc_25252: mov r15, [rsp+28h+var_20] xor eax, eax mov rcx, r15 shr rcx, 35h jz short loc_25279 lea rsi, aInvalidArrayIn; "invalid array index" xor r15d, r15d mov rdi, r14 xor eax, eax call JS_ThrowRangeError push 0FFFFFFFFFFFFFFFFh pop rax loc_25279: mov [rbx], r15 loc_2527C: add rsp, 10h pop rbx pop r14 pop r15 retn
long long JS_ToIndex( long long a1, _QWORD *a2, _DWORD *a3, unsigned int a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v12; // rdx long long v13; // r8 long long v14; // r9 __m128 v15; // xmm4 __m128 v16; // xmm5 long long result; // rax long long v18; // r15 char v19; // [rsp+0h] [rbp-28h] _QWORD v20[4]; // [rsp+8h] [rbp-20h] BYREF if ( (unsigned int)JS_ToInt64Sat(a1, (long long)v20, a3, a4) ) return -1LL; v18 = v20[0]; result = 0LL; if ( v20[0] >> 53 ) { v18 = 0LL; JS_ThrowRangeError( a1, (long long)"invalid array index", v12, v20[0] >> 53, v13, v14, a5, a6, a7, a8, v15, v16, a11, a12, v19); result = -1LL; } *a2 = v18; return result; }
JS_ToIndex: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV R14,RDI LEA RSI,[RSP + 0x8] CALL 0x00124fc6 TEST EAX,EAX JZ 0x00125252 PUSH -0x1 POP RAX JMP 0x0012527c LAB_00125252: MOV R15,qword ptr [RSP + 0x8] XOR EAX,EAX MOV RCX,R15 SHR RCX,0x35 JZ 0x00125279 LEA RSI,[0x188f2a] XOR R15D,R15D MOV RDI,R14 XOR EAX,EAX CALL 0x0011e863 PUSH -0x1 POP RAX LAB_00125279: MOV qword ptr [RBX],R15 LAB_0012527c: ADD RSP,0x10 POP RBX POP R14 POP R15 RET
int8 JS_ToIndex(int8 param_1,ulong *param_2) { int iVar1; int8 uVar2; ulong uVar3; ulong local_20; iVar1 = JS_ToInt64Sat(param_1,&local_20); if (iVar1 == 0) { uVar2 = 0; uVar3 = local_20; if (local_20 >> 0x35 != 0) { uVar3 = 0; JS_ThrowRangeError(param_1,"invalid array index"); uVar2 = 0xffffffffffffffff; } *param_2 = uVar3; } else { uVar2 = 0xffffffffffffffff; } return uVar2; }
39,249
ftxui::(anonymous namespace)::Border::Border(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>, ftxui::BorderStyle, std::optional<ftxui::Color>)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/dom/border.cpp
Border(Elements children, BorderStyle style, std::optional<Color> foreground_color = std::nullopt) : Node(std::move(children)), charset_(simple_border_charset[style]), foreground_color_(foreground_color) {}
O2
cpp
ftxui::(anonymous namespace)::Border::Border(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node>>>, ftxui::BorderStyle, std::optional<ftxui::Color>): pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movq %rcx, %rbx movl %edx, %ebp movq %rdi, %r14 movups (%rsi), %xmm0 movq %rsp, %rax movaps %xmm0, (%rax) movq 0x10(%rsi), %rcx movq %rcx, 0x10(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rsi) andq $0x0, 0x10(%rsi) movq %rax, %rsi callq 0x1ef4e movq %rsp, %rdi callq 0x13b2c leaq 0x334c7(%rip), %rax # 0x50080 movq %rax, (%r14) movl %ebp, %eax imulq $0xc0, %rax, %rax leaq 0x35904(%rip), %rcx # 0x524d0 addq %rax, %rcx movq %rcx, 0x60(%r14) movl %ebx, 0x68(%r14) shrq $0x20, %rbx movb %bl, 0x6c(%r14) addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx movq %rsp, %rdi callq 0x13b2c movq %rbx, %rdi callq 0xc7f0 nop
_ZN5ftxui12_GLOBAL__N_16BorderC2ESt6vectorISt10shared_ptrINS_4NodeEESaIS5_EENS_11BorderStyleESt8optionalINS_5ColorEE: push rbp push r14 push rbx sub rsp, 20h mov rbx, rcx mov ebp, edx mov r14, rdi movups xmm0, xmmword ptr [rsi] mov rax, rsp movaps xmmword ptr [rax], xmm0 mov rcx, [rsi+10h] mov [rax+10h], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi], xmm0 and qword ptr [rsi+10h], 0 mov rsi, rax call _ZN5ftxui4NodeC2ESt6vectorISt10shared_ptrIS0_ESaIS3_EE; ftxui::Node::Node(std::vector<std::shared_ptr<ftxui::Node>>) mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() lea rax, off_50080 mov [r14], rax mov eax, ebp imul rax, 0C0h lea rcx, _ZN5ftxui12_GLOBAL__N_121simple_border_charsetB5cxx11E; ftxui::`anonymous namespace'::simple_border_charset add rcx, rax mov [r14+60h], rcx mov [r14+68h], ebx shr rbx, 20h mov [r14+6Ch], bl add rsp, 20h pop rbx pop r14 pop rbp retn mov rbx, rax mov rdi, rsp call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, rbx call __Unwind_Resume
long long ftxui::`anonymous namespace'::Border::Border(long long a1, __int128 *a2, unsigned int a3, long long a4) { long long result; // rax __int128 v7; // [rsp+0h] [rbp-38h] BYREF long long v8; // [rsp+10h] [rbp-28h] v7 = *a2; v8 = *((_QWORD *)a2 + 2); *a2 = 0LL; *((_QWORD *)a2 + 2) = 0LL; ((void ( *)(long long, __int128 *))ftxui::Node::Node)(a1, &v7); std::vector<std::shared_ptr<ftxui::Node>>::~vector(&v7); *(_QWORD *)a1 = off_50080; result = 192LL * a3; *(_QWORD *)(a1 + 96) = (char *)&ftxui::`anonymous namespace'::simple_border_charset[abi:cxx11] + result; *(_DWORD *)(a1 + 104) = a4; *(_BYTE *)(a1 + 108) = BYTE4(a4); return result; }
Border: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RCX MOV EBP,EDX MOV R14,RDI MOVUPS XMM0,xmmword ptr [RSI] MOV RAX,RSP MOVAPS xmmword ptr [RAX],XMM0 MOV RCX,qword ptr [RSI + 0x10] MOV qword ptr [RAX + 0x10],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI],XMM0 AND qword ptr [RSI + 0x10],0x0 LAB_0011cba2: MOV RSI,RAX CALL 0x0011ef4e LAB_0011cbaa: MOV RDI,RSP CALL 0x00113b2c LEA RAX,[0x150080] MOV qword ptr [R14],RAX MOV EAX,EBP IMUL RAX,RAX,0xc0 LEA RCX,[0x1524d0] ADD RCX,RAX MOV qword ptr [R14 + 0x60],RCX MOV dword ptr [R14 + 0x68],EBX SHR RBX,0x20 MOV byte ptr [R14 + 0x6c],BL ADD RSP,0x20 POP RBX POP R14 POP RBP RET
/* ftxui::(anonymous namespace)::Border::Border(std::vector<std::shared_ptr<ftxui::Node>, std::allocator<std::shared_ptr<ftxui::Node> > >, ftxui::BorderStyle, std::optional<ftxui::Color>) */ void __thiscall ftxui::(anonymous_namespace)::Border::Border (Border *this,int8 *param_2,uint param_3,int8 param_4) { int8 local_38; int8 uStack_30; int8 local_28; local_38 = *param_2; uStack_30 = param_2[1]; local_28 = param_2[2]; *param_2 = 0; param_2[1] = 0; param_2[2] = 0; /* try { // try from 0011cba2 to 0011cba9 has its CatchHandler @ 0011cbe8 */ Node::Node((Node *)this,&local_38); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector ((vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> *) &local_38); *(int ***)this = &PTR__Node_00150080; *(int1 **)(this + 0x60) = simple_border_charset_abi_cxx11_ + (ulong)param_3 * 0xc0; *(int *)(this + 0x68) = (int)param_4; this[0x6c] = SUB81((ulong)param_4 >> 0x20,0); return; }
39,250
my_instr_bin
eloqsql/strings/ctype-bin.c
static uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) { register const uchar *str, *search, *end, *search_end; if (s_length <= b_length) { if (!s_length) { if (nmatch) { match->beg= 0; match->end= 0; match->mb_len= 0; } return 1; /* Empty string is always found */ } str= (const uchar*) b; search= (const uchar*) s; end= (const uchar*) b+b_length-s_length+1; search_end= (const uchar*) s + s_length; skip: while (str != end) { if ( (*str++) == (*search)) { register const uchar *i,*j; i= str; j= search+1; while (j != search_end) if ((*i++) != (*j++)) goto skip; if (nmatch > 0) { match[0].beg= 0; match[0].end= (uint) (str- (const uchar*)b-1); match[0].mb_len= match[0].end; if (nmatch > 1) { match[1].beg= match[0].end; match[1].end= (uint)(match[0].end+s_length); match[1].mb_len= match[1].end-match[1].beg; } } return 2; } } } return 0; }
O0
c
my_instr_bin: pushq %rbp movq %rsp, %rbp movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax ja 0xdb05b cmpq $0x0, -0x30(%rbp) jne 0xdaf26 cmpl $0x0, 0x10(%rbp) je 0xdaf1a movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x38(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x38(%rbp), %rax movl $0x0, 0x8(%rax) movl $0x1, -0x4(%rbp) jmp 0xdb062 movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax xorl %ecx, %ecx subq -0x30(%rbp), %rcx addq %rcx, %rax addq $0x1, %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0xdaf5d movq -0x40(%rbp), %rax cmpq -0x50(%rbp), %rax je 0xdb059 movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x40(%rbp) movzbl (%rax), %eax movq -0x48(%rbp), %rcx movzbl (%rcx), %ecx cmpl %ecx, %eax jne 0xdb054 movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax cmpq -0x58(%rbp), %rax je 0xdafd6 movq -0x60(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x60(%rbp) movzbl (%rax), %eax movq -0x68(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x68(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0xdafd4 jmp 0xdaf5b jmp 0xdafa0 cmpl $0x0, 0x10(%rbp) jbe 0xdb04b movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x40(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax subq $0x1, %rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x38(%rbp), %rax movl 0x4(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x8(%rax) cmpl $0x1, 0x10(%rbp) jbe 0xdb049 movq -0x38(%rbp), %rax movl 0x4(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x38(%rbp), %rax movl 0x4(%rax), %eax addq -0x30(%rbp), %rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x38(%rbp), %rax movl 0x10(%rax), %ecx movq -0x38(%rbp), %rax subl 0xc(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x14(%rax) jmp 0xdb04b movl $0x2, -0x4(%rbp) jmp 0xdb062 jmp 0xdaf5d jmp 0xdb05b movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_instr_bin: push rbp mov rbp, rsp mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_30] cmp rax, [rbp+var_20] ja loc_DB05B cmp [rbp+var_30], 0 jnz short loc_DAF26 cmp [rbp+arg_0], 0 jz short loc_DAF1A mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_38] mov dword ptr [rax+4], 0 mov rax, [rbp+var_38] mov dword ptr [rax+8], 0 loc_DAF1A: mov [rbp+var_4], 1 jmp loc_DB062 loc_DAF26: mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] xor ecx, ecx sub rcx, [rbp+var_30] add rax, rcx add rax, 1 mov [rbp+var_50], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_58], rax loc_DAF5B: jmp short $+2 loc_DAF5D: mov rax, [rbp+var_40] cmp rax, [rbp+var_50] jz loc_DB059 mov rax, [rbp+var_40] mov rcx, rax add rcx, 1 mov [rbp+var_40], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx] cmp eax, ecx jnz loc_DB054 mov rax, [rbp+var_40] mov [rbp+var_60], rax mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_68], rax loc_DAFA0: mov rax, [rbp+var_68] cmp rax, [rbp+var_58] jz short loc_DAFD6 mov rax, [rbp+var_60] mov rcx, rax add rcx, 1 mov [rbp+var_60], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_68] mov rdx, rcx add rdx, 1 mov [rbp+var_68], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_DAFD4 jmp short loc_DAF5B loc_DAFD4: jmp short loc_DAFA0 loc_DAFD6: cmp [rbp+arg_0], 0 jbe short loc_DB04B mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_40] mov rcx, [rbp+var_18] sub rax, rcx sub rax, 1 mov ecx, eax mov rax, [rbp+var_38] mov [rax+4], ecx mov rax, [rbp+var_38] mov ecx, [rax+4] mov rax, [rbp+var_38] mov [rax+8], ecx cmp [rbp+arg_0], 1 jbe short loc_DB049 mov rax, [rbp+var_38] mov ecx, [rax+4] mov rax, [rbp+var_38] mov [rax+0Ch], ecx mov rax, [rbp+var_38] mov eax, [rax+4] add rax, [rbp+var_30] mov ecx, eax mov rax, [rbp+var_38] mov [rax+10h], ecx mov rax, [rbp+var_38] mov ecx, [rax+10h] mov rax, [rbp+var_38] sub ecx, [rax+0Ch] mov rax, [rbp+var_38] mov [rax+14h], ecx loc_DB049: jmp short $+2 loc_DB04B: mov [rbp+var_4], 2 jmp short loc_DB062 loc_DB054: jmp loc_DAF5D loc_DB059: jmp short $+2 loc_DB05B: mov [rbp+var_4], 0 loc_DB062: mov eax, [rbp+var_4] pop rbp retn
long long my_instr_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, _DWORD *a6, unsigned int a7) { unsigned __int8 *v7; // rax unsigned __int8 *v8; // rax unsigned __int8 *v9; // rcx unsigned __int8 *v11; // [rsp+0h] [rbp-68h] unsigned __int8 *v12; // [rsp+8h] [rbp-60h] unsigned __int8 *v13; // [rsp+10h] [rbp-58h] unsigned __int8 *v14; // [rsp+28h] [rbp-40h] if ( a5 > a3 ) return 0; if ( a5 ) { v14 = a2; v13 = &a4[a5]; LABEL_7: while ( v14 != &a2[a3 - a5 + 1] ) { v7 = v14++; if ( *v7 == *a4 ) { v12 = v14; v11 = a4 + 1; while ( v11 != v13 ) { v8 = v12++; v9 = v11++; if ( *v8 != *v9 ) goto LABEL_7; } if ( a7 ) { *a6 = 0; a6[1] = (_DWORD)v14 - (_DWORD)a2 - 1; a6[2] = a6[1]; if ( a7 > 1 ) { a6[3] = a6[1]; a6[4] = a5 + a6[1]; a6[5] = a6[4] - a6[3]; } } return 2; } } return 0; } if ( a7 ) { *a6 = 0; a6[1] = 0; a6[2] = 0; } return 1; }
my_instr_bin: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JA 0x001db05b CMP qword ptr [RBP + -0x30],0x0 JNZ 0x001daf26 CMP dword ptr [RBP + 0x10],0x0 JZ 0x001daf1a MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x8],0x0 LAB_001daf1a: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001db062 LAB_001daf26: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] XOR ECX,ECX SUB RCX,qword ptr [RBP + -0x30] ADD RAX,RCX ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x58],RAX LAB_001daf5b: JMP 0x001daf5d LAB_001daf5d: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x50] JZ 0x001db059 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x40],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JNZ 0x001db054 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x68],RAX LAB_001dafa0: MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x58] JZ 0x001dafd6 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x60],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x68] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x68],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x001dafd4 JMP 0x001daf5b LAB_001dafd4: JMP 0x001dafa0 LAB_001dafd6: CMP dword ptr [RBP + 0x10],0x0 JBE 0x001db04b MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX SUB RAX,0x1 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x8],ECX CMP dword ptr [RBP + 0x10],0x1 JBE 0x001db049 MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x4] ADD RAX,qword ptr [RBP + -0x30] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x38] SUB ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x14],ECX LAB_001db049: JMP 0x001db04b LAB_001db04b: MOV dword ptr [RBP + -0x4],0x2 JMP 0x001db062 LAB_001db054: JMP 0x001daf5d LAB_001db059: JMP 0x001db05b LAB_001db05b: MOV dword ptr [RBP + -0x4],0x0 LAB_001db062: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_instr_bin(int8 param_1,char *param_2,ulong param_3,char *param_4,ulong param_5, int4 *param_6,uint param_7) { char cVar1; char cVar2; char *pcVar3; char *local_70; char *local_68; char *local_48; if (param_5 <= param_3) { if (param_5 == 0) { if (param_7 != 0) { *param_6 = 0; param_6[1] = 0; param_6[2] = 0; } return 1; } local_48 = param_2; while (local_48 != param_2 + (param_3 - param_5) + 1) { pcVar3 = local_48 + 1; cVar1 = *local_48; local_48 = pcVar3; if (cVar1 == *param_4) { local_70 = param_4 + 1; local_68 = pcVar3; do { if (local_70 == param_4 + param_5) { if (param_7 != 0) { *param_6 = 0; param_6[1] = ((int)pcVar3 - (int)param_2) + -1; param_6[2] = param_6[1]; if (1 < param_7) { param_6[3] = param_6[1]; param_6[4] = param_6[1] + (int)param_5; param_6[5] = param_6[4] - param_6[3]; } } return 2; } cVar1 = *local_68; cVar2 = *local_70; local_70 = local_70 + 1; local_68 = local_68 + 1; } while (cVar1 == cVar2); } } } return 0; }
39,251
fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int>>::move(fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int>>&)
zkingston[P]unknot/build_O0/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR20 void move(basic_memory_buffer& other) { alloc_ = std::move(other.alloc_); T* data = other.data(); size_t size = other.size(), capacity = other.capacity(); if (data == other.store_) { this->set(store_, capacity); detail::copy<T>(other.store_, other.store_ + size, store_); } else { this->set(data, capacity); // Set pointer to the inline array so that delete is not called // when deallocating. other.set(other.store_, 0); other.clear(); } this->resize(size); }
O0
c
fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int>>::move(fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int>>&): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x28(%rsp), %rdi callq 0xb8cf0 movq %rax, 0x20(%rsp) movq 0x28(%rsp), %rdi callq 0xb8da0 movq %rax, 0x18(%rsp) movq 0x28(%rsp), %rdi callq 0xb8ce0 movq %rax, 0x10(%rsp) movq 0x20(%rsp), %rax movq 0x28(%rsp), %rcx addq $0x20, %rcx cmpq %rcx, %rax jne 0xb960c movq 0x8(%rsp), %rdi movq %rdi, %rsi addq $0x20, %rsi movq 0x10(%rsp), %rdx callq 0xb8c70 movq 0x8(%rsp), %rdx movq 0x28(%rsp), %rdi addq $0x20, %rdi movq 0x28(%rsp), %rsi addq $0x20, %rsi movq 0x18(%rsp), %rax shlq $0x2, %rax addq %rax, %rsi addq $0x20, %rdx callq 0xb9660 jmp 0xb9641 movq 0x8(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0xb8c70 movq 0x28(%rsp), %rdi movq 0x28(%rsp), %rsi addq $0x20, %rsi xorl %eax, %eax movl %eax, %edx callq 0xb8c70 movq 0x28(%rsp), %rdi callq 0xb96b0 movq 0x8(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0xb8ed0 addq $0x38, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN3fmt3v1119basic_memory_bufferIjLm32ENS0_6detail9allocatorIjEEE4moveERS5_: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov rax, [rsp+38h+var_8] mov [rsp+38h+var_30], rax mov rdi, [rsp+38h+var_10] call _ZN3fmt3v116detail6bufferIjE4dataEv; fmt::v11::detail::buffer<uint>::data(void) mov [rsp+38h+var_18], rax mov rdi, [rsp+38h+var_10] call _ZNK3fmt3v116detail6bufferIjE4sizeEv; fmt::v11::detail::buffer<uint>::size(void) mov [rsp+38h+var_20], rax mov rdi, [rsp+38h+var_10] call _ZNK3fmt3v116detail6bufferIjE8capacityEv; fmt::v11::detail::buffer<uint>::capacity(void) mov [rsp+38h+var_28], rax mov rax, [rsp+38h+var_18] mov rcx, [rsp+38h+var_10] add rcx, 20h ; ' ' cmp rax, rcx jnz short loc_B960C mov rdi, [rsp+38h+var_30] mov rsi, rdi add rsi, 20h ; ' ' mov rdx, [rsp+38h+var_28] call _ZN3fmt3v116detail6bufferIjE3setEPjm; fmt::v11::detail::buffer<uint>::set(uint *,ulong) mov rdx, [rsp+38h+var_30] mov rdi, [rsp+38h+var_10] add rdi, 20h ; ' ' mov rsi, [rsp+38h+var_10] add rsi, 20h ; ' ' mov rax, [rsp+38h+var_20] shl rax, 2 add rsi, rax add rdx, 20h ; ' ' call _ZN3fmt3v116detail4copyIjPjS3_TnNSt9enable_ifIXntsr23is_back_insert_iteratorIT1_EE5valueEiE4typeELi0EEES5_T0_S8_S5_ jmp short loc_B9641 loc_B960C: mov rdi, [rsp+38h+var_30] mov rsi, [rsp+38h+var_18] mov rdx, [rsp+38h+var_28] call _ZN3fmt3v116detail6bufferIjE3setEPjm; fmt::v11::detail::buffer<uint>::set(uint *,ulong) mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_10] add rsi, 20h ; ' ' xor eax, eax mov edx, eax call _ZN3fmt3v116detail6bufferIjE3setEPjm; fmt::v11::detail::buffer<uint>::set(uint *,ulong) mov rdi, [rsp+38h+var_10] call _ZN3fmt3v116detail6bufferIjE5clearEv; fmt::v11::detail::buffer<uint>::clear(void) loc_B9641: mov rdi, [rsp+38h+var_30] mov rsi, [rsp+38h+var_20] call _ZN3fmt3v1119basic_memory_bufferIjLm32ENS0_6detail9allocatorIjEEE6resizeEm; fmt::v11::basic_memory_buffer<uint,32ul,fmt::v11::detail::allocator<uint>>::resize(ulong) add rsp, 38h retn
long long fmt::v11::basic_memory_buffer<unsigned int,32ul,fmt::v11::detail::allocator<unsigned int>>::move( _QWORD *a1, _QWORD *a2) { long long v3; // [rsp+10h] [rbp-28h] long long v4; // [rsp+18h] [rbp-20h] long long v5; // [rsp+20h] [rbp-18h] v5 = fmt::v11::detail::buffer<unsigned int>::data((long long)a2); v4 = fmt::v11::detail::buffer<unsigned int>::size((long long)a2); v3 = fmt::v11::detail::buffer<unsigned int>::capacity((long long)a2); if ( (_QWORD *)v5 == a2 + 4 ) { fmt::v11::detail::buffer<unsigned int>::set(a1, (long long)(a1 + 4), v3); ZN3fmt3v116detail4copyIjPjS3_TnNSt9enable_ifIXntsr23is_back_insert_iteratorIT1_EE5valueEiE4typeELi0EEES5_T0_S8_S5_( a2 + 4, (char *)a2 + 4 * v4 + 32, a1 + 4); } else { fmt::v11::detail::buffer<unsigned int>::set(a1, v5, v3); fmt::v11::detail::buffer<unsigned int>::set(a2, (long long)(a2 + 4), 0LL); fmt::v11::detail::buffer<unsigned int>::clear(a2); } return fmt::v11::basic_memory_buffer<unsigned int,32ul,fmt::v11::detail::allocator<unsigned int>>::resize( (long long)a1, v4); }
move: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001b8cf0 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001b8da0 MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x28] CALL 0x001b8ce0 MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] ADD RCX,0x20 CMP RAX,RCX JNZ 0x001b960c MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RDI ADD RSI,0x20 MOV RDX,qword ptr [RSP + 0x10] CALL 0x001b8c70 MOV RDX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x28] ADD RDI,0x20 MOV RSI,qword ptr [RSP + 0x28] ADD RSI,0x20 MOV RAX,qword ptr [RSP + 0x18] SHL RAX,0x2 ADD RSI,RAX ADD RDX,0x20 CALL 0x001b9660 JMP 0x001b9641 LAB_001b960c: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x10] CALL 0x001b8c70 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x28] ADD RSI,0x20 XOR EAX,EAX MOV EDX,EAX CALL 0x001b8c70 MOV RDI,qword ptr [RSP + 0x28] CALL 0x001b96b0 LAB_001b9641: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001b8ed0 ADD RSP,0x38 RET
/* fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int> >::move(fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int> >&) */ void __thiscall fmt::v11::basic_memory_buffer<unsigned_int,32ul,fmt::v11::detail::allocator<unsigned_int>>::move (basic_memory_buffer<unsigned_int,32ul,fmt::v11::detail::allocator<unsigned_int>> *this, basic_memory_buffer *param_1) { basic_memory_buffer *pbVar1; ulong uVar2; ulong uVar3; pbVar1 = (basic_memory_buffer *) detail::buffer<unsigned_int>::data((buffer<unsigned_int> *)param_1); uVar2 = detail::buffer<unsigned_int>::size((buffer<unsigned_int> *)param_1); uVar3 = detail::buffer<unsigned_int>::capacity((buffer<unsigned_int> *)param_1); if (pbVar1 == param_1 + 0x20) { detail::buffer<unsigned_int>::set((buffer<unsigned_int> *)this,(uint *)(this + 0x20),uVar3); _ZN3fmt3v116detail4copyIjPjS3_TnNSt9enable_ifIXntsr23is_back_insert_iteratorIT1_EE5valueEiE4typeELi0EEES5_T0_S8_S5_ (param_1 + 0x20,param_1 + uVar2 * 4 + 0x20,this + 0x20); } else { detail::buffer<unsigned_int>::set((buffer<unsigned_int> *)this,(uint *)pbVar1,uVar3); detail::buffer<unsigned_int>::set((buffer<unsigned_int> *)param_1,(uint *)(param_1 + 0x20),0); detail::buffer<unsigned_int>::clear((buffer<unsigned_int> *)param_1); } resize(this,uVar2); return; }
39,252
init_default_directories
eloqsql/mysys/my_default.c
static const char **init_default_directories(MEM_ROOT *alloc) { const char **dirs; char *env; int errors= 0; DBUG_ENTER("init_default_directories"); dirs= (const char **)alloc_root(alloc, DEFAULT_DIRS_SIZE * sizeof(char *)); if (dirs == NULL) DBUG_RETURN(NULL); bzero((char *) dirs, DEFAULT_DIRS_SIZE * sizeof(char *)); #ifdef _WIN32 { char fname_buffer[FN_REFLEN]; if (GetSystemWindowsDirectory(fname_buffer, sizeof(fname_buffer))) errors += add_directory(alloc, fname_buffer, dirs); if (GetWindowsDirectory(fname_buffer, sizeof(fname_buffer))) errors += add_directory(alloc, fname_buffer, dirs); errors += add_directory(alloc, "C:/", dirs); if (my_get_module_parent(fname_buffer, sizeof(fname_buffer)) != NULL) { errors += add_directory(alloc, fname_buffer, dirs); strcat_s(fname_buffer, sizeof(fname_buffer), "/data"); errors += add_directory(alloc, fname_buffer, dirs); } } #else #if defined(DEFAULT_SYSCONFDIR) if (DEFAULT_SYSCONFDIR[0]) errors += add_directory(alloc, DEFAULT_SYSCONFDIR, dirs); #else errors += add_directory(alloc, "/etc/", dirs); errors += add_directory(alloc, "/etc/mysql/", dirs); #endif /* DEFAULT_SYSCONFDIR */ #endif /* If value of $MARIADB_HOME environment variable name is NULL, check for $MYSQL_HOME */ if ((env= getenv("MARIADB_HOME"))) errors += add_directory(alloc, env, dirs); else { if ((env= getenv("MYSQL_HOME"))) errors += add_directory(alloc, env, dirs); } /* Placeholder for --defaults-extra-file=<path> */ errors += add_directory(alloc, "", dirs); #if !defined(_WIN32) errors += add_directory(alloc, "~/", dirs); #endif DBUG_RETURN(errors > 0 ? NULL : dirs); }
O0
c
init_default_directories: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x24(%rbp) movq -0x10(%rbp), %rdi movl $0x40, %esi callq 0x2f070 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x2b8eb jmp 0x2b8de movq $0x0, -0x8(%rbp) jmp 0x2b9df movq -0x18(%rbp), %rdi xorl %esi, %esi movl $0x40, %edx callq 0x24180 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq 0x546df(%rip), %rsi # 0x7ffe9 callq 0x2d5f0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq 0x546cb(%rip), %rsi # 0x7ffef callq 0x2d5f0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) leaq 0x546c5(%rip), %rdi # 0x7fffb callq 0x243a0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0x2b95e movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2d5f0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) jmp 0x2b98d leaq 0x546a3(%rip), %rdi # 0x80008 callq 0x243a0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0x2b98b movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2d5f0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) jmp 0x2b98d movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq 0x537f9(%rip), %rsi # 0x7f195 callq 0x2d5f0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx leaq 0x5465d(%rip), %rsi # 0x80013 callq 0x2d5f0 addl -0x24(%rbp), %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jle 0x2b9cf xorl %eax, %eax movq %rax, -0x30(%rbp) jmp 0x2b9d7 movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
init_default_directories: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_24], 0 mov rdi, [rbp+var_10] mov esi, 40h ; '@' call alloc_root mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_2B8EB jmp short $+2 loc_2B8DE: mov [rbp+var_8], 0 jmp loc_2B9DF loc_2B8EB: mov rdi, [rbp+var_18] xor esi, esi mov edx, 40h ; '@' call _memset mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, aEtc; "/etc/" call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, aEtcMysql; "/etc/mysql/" call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax lea rdi, aMariadbHome; "MARIADB_HOME" call _getenv mov [rbp+var_20], rax cmp rax, 0 jz short loc_2B95E mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_18] call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax jmp short loc_2B98D loc_2B95E: lea rdi, aMysqlHome; "MYSQL_HOME" call _getenv mov [rbp+var_20], rax cmp rax, 0 jz short loc_2B98B mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rdx, [rbp+var_18] call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax loc_2B98B: jmp short $+2 loc_2B98D: mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, aIntegerArgumen+14h; "" call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] lea rsi, asc_80013; "~/" call add_directory add eax, [rbp+var_24] mov [rbp+var_24], eax cmp [rbp+var_24], 0 jle short loc_2B9CF xor eax, eax mov [rbp+var_30], rax jmp short loc_2B9D7 loc_2B9CF: mov rax, [rbp+var_18] mov [rbp+var_30], rax loc_2B9D7: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_2B9DF: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long init_default_directories(long long a1) { int v3; // [rsp+Ch] [rbp-24h] int v4; // [rsp+Ch] [rbp-24h] int v5; // [rsp+Ch] [rbp-24h] long long v6; // [rsp+10h] [rbp-20h] long long v7; // [rsp+18h] [rbp-18h] v7 = alloc_root(a1, 64LL); if ( !v7 ) return 0LL; memset(v7, 0LL, 64LL); v3 = add_directory(a1, "/etc/", v7); v4 = v3 + add_directory(a1, "/etc/mysql/", v7); v6 = getenv("MARIADB_HOME"); if ( v6 || (v6 = getenv("MYSQL_HOME")) != 0 ) v4 += add_directory(a1, v6, v7); v5 = v4 + add_directory(a1, "", v7); if ( (int)(v5 + add_directory(a1, "~/", v7)) <= 0 ) return v7; else return 0LL; }
init_default_directories: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x24],0x0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x40 CALL 0x0012f070 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x0012b8eb JMP 0x0012b8de LAB_0012b8de: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012b9df LAB_0012b8eb: MOV RDI,qword ptr [RBP + -0x18] XOR ESI,ESI MOV EDX,0x40 CALL 0x00124180 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x17ffe9] CALL 0x0012d5f0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x17ffef] CALL 0x0012d5f0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX LEA RDI,[0x17fffb] CALL 0x001243a0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x0012b95e MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0012d5f0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX JMP 0x0012b98d LAB_0012b95e: LEA RDI,[0x180008] CALL 0x001243a0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x0012b98b MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0012d5f0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX LAB_0012b98b: JMP 0x0012b98d LAB_0012b98d: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x17f195] CALL 0x0012d5f0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x180013] CALL 0x0012d5f0 ADD EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JLE 0x0012b9cf XOR EAX,EAX MOV qword ptr [RBP + -0x30],RAX JMP 0x0012b9d7 LAB_0012b9cf: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX LAB_0012b9d7: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0012b9df: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
void * init_default_directories(int8 param_1) { int iVar1; int iVar2; char *pcVar3; void *local_38; int local_2c; void *local_10; local_38 = (void *)alloc_root(param_1); if (local_38 == (void *)0x0) { local_10 = (void *)0x0; } else { memset(local_38,0,0x40); iVar1 = add_directory(param_1,"/etc/",local_38); local_2c = add_directory(param_1,"/etc/mysql/",local_38); local_2c = local_2c + iVar1; pcVar3 = getenv("MARIADB_HOME"); if (pcVar3 == (char *)0x0) { pcVar3 = getenv("MYSQL_HOME"); if (pcVar3 != (char *)0x0) { iVar1 = add_directory(param_1,pcVar3,local_38); local_2c = iVar1 + local_2c; } } else { iVar1 = add_directory(param_1,pcVar3,local_38); local_2c = iVar1 + local_2c; } iVar1 = add_directory(param_1,"",local_38); iVar2 = add_directory(param_1,&DAT_00180013,local_38); if (0 < iVar2 + iVar1 + local_2c) { local_38 = (void *)0x0; } local_10 = local_38; } return local_10; }
39,253
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; }
O0
c
my_hash_free: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0xe21ce movq -0x8(%rbp), %rdi callq 0xe2210 movq -0x8(%rbp), %rax movq $0x0, 0x60(%rax) movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0xdcb70 movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0xe21fe addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_free: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_E21CE: mov rdi, [rbp+var_8] call my_hash_free_elements mov rax, [rbp+var_8] mov qword ptr [rax+60h], 0 mov rdi, [rbp+var_8] add rdi, 28h ; '(' call delete_dynamic mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 jmp short $+2 loc_E21FE: add rsp, 10h pop rbp retn
long long my_hash_free(long long a1) { long long result; // rax my_hash_free_elements(a1); *(_QWORD *)(a1 + 96) = 0LL; delete_dynamic(a1 + 40); result = a1; *(_QWORD *)(a1 + 16) = 0LL; return result; }
my_hash_free: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x001e21ce LAB_001e21ce: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e2210 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x60],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x001dcb70 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 JMP 0x001e21fe LAB_001e21fe: ADD RSP,0x10 POP RBP RET
void my_hash_free(long param_1) { my_hash_free_elements(param_1); *(int8 *)(param_1 + 0x60) = 0; delete_dynamic(param_1 + 0x28); *(int8 *)(param_1 + 0x10) = 0; return; }
39,254
glob(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&)
ami-iit[P]serial_cpp/src/impl/list_ports/list_ports_linux.cc
vector<string> glob(const vector<string>& patterns) { vector<string> paths_found; if(patterns.size() == 0) return paths_found; glob_t glob_results; int glob_retval = glob(patterns[0].c_str(), 0, NULL, &glob_results); vector<string>::const_iterator iter = patterns.begin(); while(++iter != patterns.end()) { glob_retval = glob(iter->c_str(), GLOB_APPEND, NULL, &glob_results); } for(int path_index = 0; path_index < glob_results.gl_pathc; path_index++) { paths_found.push_back(glob_results.gl_pathv[path_index]); } globfree(&glob_results); return paths_found; }
O0
cpp
glob(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&): pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp movq %rdi, -0xc8(%rbp) movq %rdi, %rax movq %rax, -0xc0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movb $0x0, -0x11(%rbp) callq 0x6490 movq -0x10(%rbp), %rdi callq 0x8260 cmpq $0x0, %rax jne 0xd5bc movb $0x1, -0x11(%rbp) movl $0x1, -0x18(%rbp) jmp 0xd743 movq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xea40 movq %rax, %rdi callq 0x3150 movq %rax, %rdi xorl %esi, %esi xorl %eax, %eax movl %eax, %edx leaq -0x60(%rbp), %rcx callq 0x3370 movl %eax, -0x64(%rbp) movq -0x10(%rbp), %rdi callq 0xea60 movq %rax, -0x70(%rbp) leaq -0x70(%rbp), %rdi callq 0xead0 movq %rax, -0xd0(%rbp) movq -0x10(%rbp), %rdi callq 0xeaf0 movq -0xd0(%rbp), %rdi movq %rax, -0x78(%rbp) leaq -0x78(%rbp), %rsi callq 0xea90 testb $0x1, %al jne 0xd626 jmp 0xd651 leaq -0x70(%rbp), %rdi callq 0xeb20 movq %rax, %rdi callq 0x3150 movq %rax, %rdi movl $0x20, %esi xorl %eax, %eax movl %eax, %edx leaq -0x60(%rbp), %rcx callq 0x3370 movl %eax, -0x64(%rbp) jmp 0xd5f3 movl $0x0, -0x7c(%rbp) movslq -0x7c(%rbp), %rax cmpq -0x60(%rbp), %rax jae 0xd72f movq -0x58(%rbp), %rax movslq -0x7c(%rbp), %rcx movq (%rax,%rcx,8), %rax movq %rax, -0xe0(%rbp) leaq -0xa1(%rbp), %rdi movq %rdi, -0xd8(%rbp) callq 0x35e0 movq -0xe0(%rbp), %rsi movq -0xd8(%rbp), %rdx leaq -0xa0(%rbp), %rdi callq 0x4680 jmp 0xd6a8 movq -0xc8(%rbp), %rdi leaq -0xa0(%rbp), %rsi callq 0x64b0 jmp 0xd6bd leaq -0xa0(%rbp), %rdi callq 0x31e0 leaq -0xa1(%rbp), %rdi callq 0x3380 movl -0x7c(%rbp), %eax addl $0x1, %eax movl %eax, -0x7c(%rbp) jmp 0xd658 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb0(%rbp) movl %eax, -0xb4(%rbp) jmp 0xd715 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb0(%rbp) movl %eax, -0xb4(%rbp) leaq -0xa0(%rbp), %rdi callq 0x31e0 leaq -0xa1(%rbp), %rdi callq 0x3380 movq -0xc8(%rbp), %rdi callq 0x64e0 jmp 0xd765 leaq -0x60(%rbp), %rdi callq 0x30b0 movb $0x1, -0x11(%rbp) movl $0x1, -0x18(%rbp) testb $0x1, -0x11(%rbp) jne 0xd755 movq -0xc8(%rbp), %rdi callq 0x64e0 movq -0xc0(%rbp), %rax addq $0xe0, %rsp popq %rbp retq movq -0xb0(%rbp), %rdi callq 0x35d0 nopw %cs:(%rax,%rax)
_ZL4globRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: push rbp mov rbp, rsp sub rsp, 0E0h mov [rbp+var_C8], rdi mov rax, rdi mov [rbp+var_C0], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_11], 0 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov rdi, [rbp+var_10] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) cmp rax, 0 jnz short loc_D5BC mov [rbp+var_11], 1 mov [rbp+var_18], 1 jmp loc_D743 loc_D5BC: mov rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, rax xor esi, esi xor eax, eax mov edx, eax lea rcx, [rbp+var_60] call _glob mov [rbp+var_64], eax mov rdi, [rbp+var_10] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rbp+var_70], rax loc_D5F3: lea rdi, [rbp+var_70] call _ZN9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(void) mov [rbp+var_D0], rax mov rdi, [rbp+var_10] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov rdi, [rbp+var_D0] mov [rbp+var_78], rax lea rsi, [rbp+var_78] call _ZN9__gnu_cxxneIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_; __gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>> const&) test al, 1 jnz short loc_D626 jmp short loc_D651 loc_D626: lea rdi, [rbp+var_70] call _ZNK9__gnu_cxx17__normal_iteratorIPKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator->(void) mov rdi, rax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, rax mov esi, 20h ; ' ' xor eax, eax mov edx, eax lea rcx, [rbp+var_60] call _glob mov [rbp+var_64], eax jmp short loc_D5F3 loc_D651: mov [rbp+var_7C], 0 loc_D658: movsxd rax, [rbp+var_7C] cmp rax, [rbp+var_60] jnb loc_D72F mov rax, [rbp+var_58] movsxd rcx, [rbp+var_7C] mov rax, [rax+rcx*8] mov [rbp+var_E0], rax lea rdi, [rbp+var_A1] mov [rbp+var_D8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_E0] mov rdx, [rbp+var_D8] lea rdi, [rbp+var_A0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_D6A8: mov rdi, [rbp+var_C8] lea rsi, [rbp+var_A0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) jmp short $+2 loc_D6BD: lea rdi, [rbp+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_A1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, [rbp+var_7C] add eax, 1 mov [rbp+var_7C], eax jmp loc_D658 mov rcx, rax mov eax, edx mov [rbp+var_B0], rcx mov [rbp+var_B4], eax jmp short loc_D715 mov rcx, rax mov eax, edx mov [rbp+var_B0], rcx mov [rbp+var_B4], eax lea rdi, [rbp+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_D715: lea rdi, [rbp+var_A1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rbp+var_C8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_D765 loc_D72F: lea rdi, [rbp+var_60] call _globfree mov [rbp+var_11], 1 mov [rbp+var_18], 1 loc_D743: test [rbp+var_11], 1 jnz short loc_D755 mov rdi, [rbp+var_C8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_D755: mov rax, [rbp+var_C0] add rsp, 0E0h pop rbp retn loc_D765: mov rdi, [rbp+var_B0] call __Unwind_Resume
long long glob(long long a1, _QWORD *a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax long long v7; // [rsp+0h] [rbp-E0h] long long v8; // [rsp+10h] [rbp-D0h] char v9; // [rsp+3Fh] [rbp-A1h] BYREF _BYTE v10[36]; // [rsp+40h] [rbp-A0h] BYREF int i; // [rsp+64h] [rbp-7Ch] long long v12; // [rsp+68h] [rbp-78h] BYREF long long v13; // [rsp+70h] [rbp-70h] BYREF int v14; // [rsp+7Ch] [rbp-64h] _QWORD v15[9]; // [rsp+80h] [rbp-60h] BYREF int v16; // [rsp+C8h] [rbp-18h] char v17; // [rsp+CFh] [rbp-11h] _QWORD *v18; // [rsp+D0h] [rbp-10h] long long v19; // [rsp+D8h] [rbp-8h] v19 = a1; v18 = a2; v17 = 0; std::vector<std::string>::vector(a1); if ( std::vector<std::string>::size(a2) ) { v2 = std::vector<std::string>::operator[](v18, 0LL); v3 = std::string::c_str(v2); v14 = glob(v3, 0LL, 0LL, v15); v13 = std::vector<std::string>::begin(v18); while ( 1 ) { v8 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator++(&v13); v12 = std::vector<std::string>::end(v18); if ( (__gnu_cxx::operator!=<std::string const*,std::vector<std::string>>(v8, &v12) & 1) == 0 ) break; v4 = __gnu_cxx::__normal_iterator<std::string const*,std::vector<std::string>>::operator->(&v13); v5 = std::string::c_str(v4); v14 = glob(v5, 32LL, 0LL, v15); } for ( i = 0; (unsigned long long)i < v15[0]; ++i ) { v7 = *(_QWORD *)(v15[1] + 8LL * i); std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v10, v7, (long long)&v9); std::vector<std::string>::push_back(a1, (long long)v10); std::string::~string(v10); std::allocator<char>::~allocator(&v9); } globfree(v15); v17 = 1; v16 = 1; } else { v17 = 1; v16 = 1; } return a1; }
glob: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 MOV qword ptr [RBP + -0xc8],RDI MOV RAX,RDI MOV qword ptr [RBP + -0xc0],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV byte ptr [RBP + -0x11],0x0 CALL 0x00106490 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00108260 CMP RAX,0x0 JNZ 0x0010d5bc MOV byte ptr [RBP + -0x11],0x1 MOV dword ptr [RBP + -0x18],0x1 JMP 0x0010d743 LAB_0010d5bc: MOV RDI,qword ptr [RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x0010ea40 MOV RDI,RAX CALL 0x00103150 MOV RDI,RAX XOR ESI,ESI XOR EAX,EAX MOV EDX,EAX LEA RCX,[RBP + -0x60] CALL 0x00103370 MOV dword ptr [RBP + -0x64],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010ea60 MOV qword ptr [RBP + -0x70],RAX LAB_0010d5f3: LEA RDI,[RBP + -0x70] CALL 0x0010ead0 MOV qword ptr [RBP + -0xd0],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0010eaf0 MOV RDI,qword ptr [RBP + -0xd0] MOV qword ptr [RBP + -0x78],RAX LEA RSI,[RBP + -0x78] CALL 0x0010ea90 TEST AL,0x1 JNZ 0x0010d626 JMP 0x0010d651 LAB_0010d626: LEA RDI,[RBP + -0x70] CALL 0x0010eb20 MOV RDI,RAX CALL 0x00103150 MOV RDI,RAX MOV ESI,0x20 XOR EAX,EAX MOV EDX,EAX LEA RCX,[RBP + -0x60] CALL 0x00103370 MOV dword ptr [RBP + -0x64],EAX JMP 0x0010d5f3 LAB_0010d651: MOV dword ptr [RBP + -0x7c],0x0 LAB_0010d658: MOVSXD RAX,dword ptr [RBP + -0x7c] CMP RAX,qword ptr [RBP + -0x60] JNC 0x0010d72f MOV RAX,qword ptr [RBP + -0x58] MOVSXD RCX,dword ptr [RBP + -0x7c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0xe0],RAX LEA RDI,[RBP + -0xa1] MOV qword ptr [RBP + -0xd8],RDI CALL 0x001035e0 MOV RSI,qword ptr [RBP + -0xe0] MOV RDX,qword ptr [RBP + -0xd8] LAB_0010d69a: LEA RDI,[RBP + -0xa0] CALL 0x00104680 JMP 0x0010d6a8 LAB_0010d6a8: MOV RDI,qword ptr [RBP + -0xc8] LEA RSI,[RBP + -0xa0] CALL 0x001064b0 LAB_0010d6bb: JMP 0x0010d6bd LAB_0010d6bd: LEA RDI,[RBP + -0xa0] CALL 0x001031e0 LEA RDI,[RBP + -0xa1] CALL 0x00103380 MOV EAX,dword ptr [RBP + -0x7c] ADD EAX,0x1 MOV dword ptr [RBP + -0x7c],EAX JMP 0x0010d658 LAB_0010d72f: LEA RDI,[RBP + -0x60] CALL 0x001030b0 MOV byte ptr [RBP + -0x11],0x1 MOV dword ptr [RBP + -0x18],0x1 LAB_0010d743: TEST byte ptr [RBP + -0x11],0x1 JNZ 0x0010d755 MOV RDI,qword ptr [RBP + -0xc8] CALL 0x001064e0 LAB_0010d755: MOV RAX,qword ptr [RBP + -0xc0] ADD RSP,0xe0 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x0010d749) */ /* glob(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&) */ vector * glob(vector *param_1) { bool bVar1; long lVar2; char *pcVar3; __normal_iterator *p_Var4; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RSI; allocator local_a9; string local_a8 [36]; int local_84; int8 local_80; int8 local_78; int local_6c; glob_t local_68; int1 local_19; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18; vector *local_10; local_19 = 0; local_18 = in_RSI; local_10 = param_1; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1); lVar2 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_18); if (lVar2 != 0) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[](local_18,0); pcVar3 = (char *)std::__cxx11::string::c_str(); local_6c = glob(pcVar3,0,(__errfunc *)0x0,&local_68); local_78 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin (local_18); while( true ) { p_Var4 = (__normal_iterator *) __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_78); local_80 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end (local_18); bVar1 = __gnu_cxx::operator!=(p_Var4,(__normal_iterator *)&local_80); if (!bVar1) break; __gnu_cxx:: __normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator->((__normal_iterator<std::__cxx11::string_const*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_78); pcVar3 = (char *)std::__cxx11::string::c_str(); local_6c = glob(pcVar3,0x20,(__errfunc *)0x0,&local_68); } for (local_84 = 0; (ulong)(long)local_84 < local_68.gl_pathc; local_84 = local_84 + 1) { pcVar3 = local_68.gl_pathv[local_84]; std::allocator<char>::allocator(); /* try { // try from 0010d69a to 0010d6a5 has its CatchHandler @ 0010d6e3 */ std::__cxx11::string::string<std::allocator<char>>(local_a8,pcVar3,&local_a9); /* try { // try from 0010d6a8 to 0010d6ba has its CatchHandler @ 0010d6f7 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1, local_a8); std::__cxx11::string::~string(local_a8); std::allocator<char>::~allocator((allocator<char> *)&local_a9); } globfree(&local_68); } return param_1; }
39,255
scan_one_character
eloqsql/strings/ctype.c
static size_t scan_one_character(const char *s, const char *e, my_wc_t *wc) { CHARSET_INFO *cs= &my_charset_utf8mb3_general_ci; if (s >= e) return 0; /* Escape sequence: \uXXXX */ if (s[0] == '\\' && s + 2 < e && s[1] == 'u' && my_isxdigit(cs, s[2])) { size_t len= 3; /* We have at least one digit */ for (s+= 3; s < e && my_isxdigit(cs, s[0]); s++, len++) { } wc[0]= 0; return len; } else if ((int8) s[0] > 0) /* 7-bit character */ { wc[0]= 0; return 1; } else /* Non-escaped character */ { int rc= my_ci_mb_wc(cs, wc, (uchar *) s, (uchar *) e); if (rc > 0) return (size_t) rc; } return 0; }
O0
c
scan_one_character: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) leaq 0x322f45(%rip), %rax # 0x388da0 movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax cmpq -0x18(%rbp), %rax jb 0x65e76 movq $0x0, -0x8(%rbp) jmp 0x65fa8 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x5c, %eax jne 0x65f47 movq -0x10(%rbp), %rax addq $0x2, %rax cmpq -0x18(%rbp), %rax jae 0x65f47 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax cmpl $0x75, %eax jne 0x65f47 movq -0x28(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl 0x2(%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x65f47 movq $0x3, -0x30(%rbp) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x18(%rbp), %rcx movb %al, -0x35(%rbp) jae 0x65f0d movq -0x28(%rbp), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x80, %eax cmpl $0x0, %eax setne %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %al testb $0x1, %al jne 0x65f16 jmp 0x65f32 jmp 0x65f18 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) jmp 0x65edc movq -0x20(%rbp), %rax movq $0x0, (%rax) movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x65fa8 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jle 0x65f68 movq -0x20(%rbp), %rax movq $0x0, (%rax) movq $0x1, -0x8(%rbp) jmp 0x65fa8 movq -0x28(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rdx movq -0x18(%rbp), %rcx callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) jle 0x65f9c movslq -0x34(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x65fa8 jmp 0x65f9e jmp 0x65fa0 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
scan_one_character: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx lea rax, my_charset_utf8mb3_general_ci mov [rbp+var_28], rax mov rax, [rbp+var_10] cmp rax, [rbp+var_18] jb short loc_65E76 mov [rbp+var_8], 0 jmp loc_65FA8 loc_65E76: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 5Ch ; '\' jnz loc_65F47 mov rax, [rbp+var_10] add rax, 2 cmp rax, [rbp+var_18] jnb loc_65F47 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] cmp eax, 75h ; 'u' jnz loc_65F47 mov rax, [rbp+var_28] mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+2] movzx eax, byte ptr [rax+rcx+1] and eax, 80h cmp eax, 0 jz short loc_65F47 mov [rbp+var_30], 3 mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_65EDC: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_18] mov [rbp+var_35], al jnb short loc_65F0D mov rax, [rbp+var_28] mov rax, [rax+40h] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 80h cmp eax, 0 setnz al mov [rbp+var_35], al loc_65F0D: mov al, [rbp+var_35] test al, 1 jnz short loc_65F16 jmp short loc_65F32 loc_65F16: jmp short $+2 loc_65F18: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax jmp short loc_65EDC loc_65F32: mov rax, [rbp+var_20] mov qword ptr [rax], 0 mov rax, [rbp+var_30] mov [rbp+var_8], rax jmp short loc_65FA8 loc_65F47: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jle short loc_65F68 mov rax, [rbp+var_20] mov qword ptr [rax], 0 mov [rbp+var_8], 1 jmp short loc_65FA8 loc_65F68: mov rax, [rbp+var_28] mov rax, [rax+0B8h] mov rax, [rax+28h] mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] mov rdx, [rbp+var_10] mov rcx, [rbp+var_18] call rax mov [rbp+var_34], eax cmp [rbp+var_34], 0 jle short loc_65F9C movsxd rax, [rbp+var_34] mov [rbp+var_8], rax jmp short loc_65FA8 loc_65F9C: jmp short $+2 loc_65F9E: jmp short $+2 loc_65FA0: mov [rbp+var_8], 0 loc_65FA8: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long scan_one_character(char *a1, unsigned long long a2, _QWORD *a3) { bool v4; // [rsp+Bh] [rbp-35h] int v5; // [rsp+Ch] [rbp-34h] long long v6; // [rsp+10h] [rbp-30h] unsigned __int8 *i; // [rsp+30h] [rbp-10h] if ( (unsigned long long)a1 >= a2 ) return 0LL; if ( *a1 == 92 && (unsigned long long)(a1 + 2) < a2 && a1[1] == 117 && (*(_BYTE *)(*((_QWORD *)&my_charset_utf8mb3_general_ci + 8) + (unsigned __int8)a1[2] + 1LL) & 0x80) != 0 ) { v6 = 3LL; for ( i = (unsigned __int8 *)(a1 + 3); ; ++i ) { v4 = 0; if ( (unsigned long long)i < a2 ) v4 = (*(_BYTE *)(*((_QWORD *)&my_charset_utf8mb3_general_ci + 8) + *i + 1LL) & 0x80) != 0; if ( !v4 ) break; ++v6; } *a3 = 0LL; return v6; } else if ( *a1 <= 0 ) { v5 = (*(long long ( **)(void *, _QWORD *, char *, unsigned long long))(*((_QWORD *)&my_charset_utf8mb3_general_ci + 23) + 40LL))( &my_charset_utf8mb3_general_ci, a3, a1, a2); if ( v5 <= 0 ) return 0LL; else return v5; } else { *a3 = 0LL; return 1LL; } }
scan_one_character: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX LEA RAX,[0x488da0] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x18] JC 0x00165e76 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00165fa8 LAB_00165e76: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x5c JNZ 0x00165f47 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x18] JNC 0x00165f47 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] CMP EAX,0x75 JNZ 0x00165f47 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0x2] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x80 CMP EAX,0x0 JZ 0x00165f47 MOV qword ptr [RBP + -0x30],0x3 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_00165edc: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x18] MOV byte ptr [RBP + -0x35],AL JNC 0x00165f0d MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x80 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x35],AL LAB_00165f0d: MOV AL,byte ptr [RBP + -0x35] TEST AL,0x1 JNZ 0x00165f16 JMP 0x00165f32 LAB_00165f16: JMP 0x00165f18 LAB_00165f18: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX JMP 0x00165edc LAB_00165f32: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX JMP 0x00165fa8 LAB_00165f47: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JLE 0x00165f68 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x0 MOV qword ptr [RBP + -0x8],0x1 JMP 0x00165fa8 LAB_00165f68: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JLE 0x00165f9c MOVSXD RAX,dword ptr [RBP + -0x34] MOV qword ptr [RBP + -0x8],RAX JMP 0x00165fa8 LAB_00165f9c: JMP 0x00165f9e LAB_00165f9e: JMP 0x00165fa0 LAB_00165fa0: MOV qword ptr [RBP + -0x8],0x0 LAB_00165fa8: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
long scan_one_character(byte *param_1,byte *param_2,int8 *param_3) { int iVar1; bool bVar2; long local_38; byte *local_18; long local_10; if (param_1 < param_2) { if ((((*param_1 == 0x5c) && (param_1 + 2 < param_2)) && (param_1[1] == 0x75)) && ((*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)param_1[2]) & 0x80) != 0)) { local_38 = 3; local_18 = param_1 + 3; while( true ) { bVar2 = false; if (local_18 < param_2) { bVar2 = (*(byte *)(my_charset_utf8mb3_general_ci._64_8_ + 1 + (ulong)*local_18) & 0x80) != 0; } if (!bVar2) break; local_18 = local_18 + 1; local_38 = local_38 + 1; } *param_3 = 0; local_10 = local_38; } else if ((char)*param_1 < '\x01') { iVar1 = (**(code **)(my_charset_utf8mb3_general_ci._184_8_ + 0x28)) (my_charset_utf8mb3_general_ci,param_3,param_1,param_2); if (iVar1 < 1) { local_10 = 0; } else { local_10 = (long)iVar1; } } else { *param_3 = 0; local_10 = 1; } } else { local_10 = 0; } return local_10; }
39,256
my_stat
eloqsql/mysys/my_lib.c
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) { int m_used; DBUG_ENTER("my_stat"); DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path, stat_area, my_flags)); if ((m_used= (stat_area == NULL))) if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT), my_flags))) goto error; #ifndef _WIN32 if (!stat((char *) path, (struct stat *) stat_area)) { MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(stat_area); } #else if (!my_win_stat(path, stat_area)) DBUG_RETURN(stat_area); #endif DBUG_PRINT("error",("Got errno: %d from stat", errno)); my_errno= errno; if (m_used) /* Free if new area */ my_free(stat_area); error: if (my_flags & (MY_FAE+MY_WME)) { my_error(EE_STAT, MYF(ME_BELL), path, my_errno); DBUG_RETURN((MY_STAT *) NULL); } DBUG_RETURN((MY_STAT *) NULL); }
O3
c
my_stat: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq %rsi, %r14 testq %rsi, %rsi jne 0x9f9b4 leaq 0xb68d2b(%rip), %rax # 0xc086c8 movl (%rax), %edi movl $0x90, %esi movq %r15, %rdx callq 0x9fc95 movq %rax, %r14 testq %rax, %rax je 0x9f9e0 movq %rbx, %rdi movq %r14, %rsi callq 0x29830 testl %eax, %eax je 0x9fa09 callq 0x297b0 movl (%rax), %r13d callq 0xa1a06 movl %r13d, (%rax) testq %r12, %r12 jne 0x9f9e0 movq %r14, %rdi callq 0x9fec2 testb $0x18, %r15b je 0x9fa06 callq 0xa1a06 movl (%rax), %ecx xorl %r14d, %r14d movl $0x4, %esi movl $0xd, %edi movq %rbx, %rdx xorl %eax, %eax callq 0x9e0bb jmp 0x9fa09 xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_stat: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rdx mov r12, rsi mov rbx, rdi mov r14, rsi test rsi, rsi jnz short loc_9F9B4 lea rax, key_memory_MY_STAT mov edi, [rax] mov esi, 90h mov rdx, r15 call my_malloc mov r14, rax test rax, rax jz short loc_9F9E0 loc_9F9B4: mov rdi, rbx mov rsi, r14 call _stat64 test eax, eax jz short loc_9FA09 call ___errno_location mov r13d, [rax] call _my_thread_var mov [rax], r13d test r12, r12 jnz short loc_9F9E0 mov rdi, r14 call my_free loc_9F9E0: test r15b, 18h jz short loc_9FA06 call _my_thread_var mov ecx, [rax] xor r14d, r14d mov esi, 4 mov edi, 0Dh mov rdx, rbx xor eax, eax call my_error jmp short loc_9FA09 loc_9FA06: xor r14d, r14d loc_9FA09: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
const char * my_stat(const char *a1, const char *a2, long long a3) { char v3; // r15 const char *v6; // r14 const char *v7; // rdi const char *v8; // rsi int v9; // r13d unsigned int *v10; // rax v3 = a3; v6 = a2; if ( a2 || (v7 = (const char *)key_memory_MY_STAT, v8 = (const char *)&qword_90, (v6 = (const char *)my_malloc(key_memory_MY_STAT, 144LL, a3)) != 0LL) ) { v7 = a1; v8 = v6; if ( !(unsigned int)stat64(a1, v6) ) return v6; v9 = *(_DWORD *)__errno_location(a1); *(_DWORD *)my_thread_var(a1, v6) = v9; if ( !a2 ) { v7 = v6; my_free(v6); } } if ( (v3 & 0x18) == 0 ) return 0LL; v10 = (unsigned int *)my_thread_var(v7, v8); v6 = 0LL; my_error(0xDu, 4LL, a1, *v10); return v6; }
my_stat: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV R14,RSI TEST RSI,RSI JNZ 0x0019f9b4 LEA RAX,[0xd086c8] MOV EDI,dword ptr [RAX] MOV ESI,0x90 MOV RDX,R15 CALL 0x0019fc95 MOV R14,RAX TEST RAX,RAX JZ 0x0019f9e0 LAB_0019f9b4: MOV RDI,RBX MOV RSI,R14 CALL 0x00129830 TEST EAX,EAX JZ 0x0019fa09 CALL 0x001297b0 MOV R13D,dword ptr [RAX] CALL 0x001a1a06 MOV dword ptr [RAX],R13D TEST R12,R12 JNZ 0x0019f9e0 MOV RDI,R14 CALL 0x0019fec2 LAB_0019f9e0: TEST R15B,0x18 JZ 0x0019fa06 CALL 0x001a1a06 MOV ECX,dword ptr [RAX] XOR R14D,R14D MOV ESI,0x4 MOV EDI,0xd MOV RDX,RBX XOR EAX,EAX CALL 0x0019e0bb JMP 0x0019fa09 LAB_0019fa06: XOR R14D,R14D LAB_0019fa09: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3) { int iVar1; stat64 *__buf; int *piVar2; int4 *puVar3; __buf = param_2; if ((param_2 != (stat64 *)0x0) || (__buf = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), __buf != (stat64 *)0x0)) { iVar1 = stat64(param_1,__buf); if (iVar1 == 0) { return __buf; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if (param_2 == (stat64 *)0x0) { my_free(__buf); } } if ((param_3 & 0x18) != 0) { puVar3 = (int4 *)_my_thread_var(); my_error(0xd,4,param_1,*puVar3); } return (stat64 *)0x0; }
39,257
SchemaConverter::format_grammar[abi:cxx11]()
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string format_grammar() { std::stringstream ss; for (const auto & kv : _rules) { ss << kv.first << " ::= " << kv.second << std::endl; } return ss.str(); }
O0
cpp
SchemaConverter::format_grammar[abi:cxx11](): subq $0x1f8, %rsp # imm = 0x1F8 movq %rdi, 0x18(%rsp) movq %rdi, %rax movq %rax, 0x20(%rsp) movq %rdi, 0x1f0(%rsp) movq %rsi, 0x1e8(%rsp) movq 0x1e8(%rsp), %rax movq %rax, 0x28(%rsp) leaq 0x60(%rsp), %rdi callq 0x5b580 movq 0x28(%rsp), %rax addq $0x28, %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi callq 0x1ac280 movq %rax, 0x50(%rsp) movq 0x58(%rsp), %rdi callq 0x1aad10 movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x1ac2b0 testb $0x1, %al jne 0x1a9a4f jmp 0x1a9ae2 leaq 0x50(%rsp), %rdi callq 0x1aad60 movq %rax, 0x40(%rsp) leaq 0x70(%rsp), %rdi movq 0x40(%rsp), %rsi callq 0x5b570 movq %rax, 0x10(%rsp) jmp 0x1a9a74 movq 0x10(%rsp), %rdi leaq 0x729e8(%rip), %rsi # 0x21c468 callq 0x5bb50 movq %rax, 0x8(%rsp) jmp 0x1a9a8c movq 0x8(%rsp), %rdi movq 0x40(%rsp), %rsi addq $0x20, %rsi callq 0x5b570 movq %rax, (%rsp) jmp 0x1a9aa5 movq (%rsp), %rdi movq 0x101508(%rip), %rsi # 0x2aafb8 callq 0x5c3d0 jmp 0x1a9ab7 jmp 0x1a9ab9 leaq 0x50(%rsp), %rdi callq 0x1abbe0 jmp 0x1a9a37 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) leaq 0x60(%rsp), %rdi callq 0x5b730 jmp 0x1a9b0a movq 0x18(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x5bde0 jmp 0x1a9af3 leaq 0x60(%rsp), %rdi callq 0x5b730 movq 0x20(%rsp), %rax addq $0x1f8, %rsp # imm = 0x1F8 retq movq 0x38(%rsp), %rdi callq 0x5bd10 nopw %cs:(%rax,%rax) nop
_ZN15SchemaConverter14format_grammarB5cxx11Ev: sub rsp, 1F8h mov [rsp+1F8h+var_1E0], rdi mov rax, rdi mov [rsp+1F8h+var_1D8], rax mov [rsp+1F8h+var_8], rdi mov [rsp+1F8h+var_10], rsi mov rax, [rsp+1F8h+var_10] mov [rsp+1F8h+var_1D0], rax lea rdi, [rsp+1F8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov rax, [rsp+1F8h+var_1D0] add rax, 28h ; '(' mov [rsp+1F8h+var_1A0], rax mov rdi, [rsp+1F8h+var_1A0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE5beginEv; std::map<std::string,std::string>::begin(void) mov [rsp+1F8h+var_1A8], rax mov rdi, [rsp+1F8h+var_1A0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE3endEv; std::map<std::string,std::string>::end(void) mov [rsp+1F8h+var_1B0], rax loc_1A9A37: lea rdi, [rsp+1F8h+var_1A8] lea rsi, [rsp+1F8h+var_1B0] call _ZStneRKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EESB_; std::operator!=(std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&,std::_Rb_tree_iterator<std::pair<std::string const,std::string>> const&) test al, 1 jnz short loc_1A9A4F jmp loc_1A9AE2 loc_1A9A4F: lea rdi, [rsp+1F8h+var_1A8] call _ZNKSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEdeEv; std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator*(void) mov [rsp+1F8h+var_1B8], rax lea rdi, [rsp+1F8h+var_188] mov rsi, [rsp+1F8h+var_1B8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+1F8h+var_1E8], rax jmp short $+2 loc_1A9A74: mov rdi, [rsp+1F8h+var_1E8] lea rsi, asc_21C468; " ::= " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rsp+1F8h+var_1F0], rax jmp short $+2 loc_1A9A8C: mov rdi, [rsp+1F8h+var_1F0] mov rsi, [rsp+1F8h+var_1B8] add rsi, 20h ; ' ' call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rsp+1F8h+var_1F8], rax jmp short $+2 loc_1A9AA5: mov rdi, [rsp+1F8h+var_1F8] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_1A9AB7: jmp short $+2 loc_1A9AB9: lea rdi, [rsp+1F8h+var_1A8] call _ZNSt17_Rb_tree_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_EEppEv; std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator++(void) jmp loc_1A9A37 mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax lea rdi, [rsp+arg_58] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() jmp short loc_1A9B0A loc_1A9AE2: mov rdi, [rsp+1F8h+var_1E0] lea rsi, [rsp+1F8h+var_198] call __ZNKSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEE3strEv; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(void) jmp short $+2 loc_1A9AF3: lea rdi, [rsp+1F8h+var_198] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, [rsp+1F8h+var_1D8] add rsp, 1F8h retn loc_1A9B0A: mov rdi, [rsp+arg_30] call __Unwind_Resume
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-1F8h] long long v4; // [rsp+8h] [rbp-1F0h] long long v5; // [rsp+10h] [rbp-1E8h] long long v6; // [rsp+40h] [rbp-1B8h] long long v7; // [rsp+48h] [rbp-1B0h] BYREF _QWORD v8[2]; // [rsp+50h] [rbp-1A8h] BYREF _BYTE v9[16]; // [rsp+60h] [rbp-198h] BYREF _BYTE v10[376]; // [rsp+70h] [rbp-188h] BYREF long long v11; // [rsp+1E8h] [rbp-10h] long long v12; // [rsp+1F0h] [rbp-8h] v12 = a1; v11 = a2; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v9); v8[1] = a2 + 40; v8[0] = std::map<std::string,std::string>::begin(a2 + 40); v7 = std::map<std::string,std::string>::end(a2 + 40); while ( (std::operator!=(v8, &v7) & 1) != 0 ) { v6 = std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator*(v8); v5 = std::operator<<<char>(v10, v6); v4 = std::operator<<<std::char_traits<char>>(v5, " ::= "); v3 = std::operator<<<char>(v4, v6 + 32); std::ostream::operator<<(v3, &std::endl<char,std::char_traits<char>>); std::_Rb_tree_iterator<std::pair<std::string const,std::string>>::operator++(v8); } std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::str(a1, v9); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v9); return a1; }
_ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA17_KcJRKS8_cS8_RA3_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSH_OSI_DpOT1_: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x10],R8 MOV qword ptr [RSP + 0x8],R9 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x28] CALL 0x0015bd60 MOV RDI,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV R8,qword ptr [RSP + 0x8] CALL 0x001a9b20 ADD RSP,0x38 RET
void _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERA17_KcJRKS8_cS8_RA3_S9_ETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSH_OSI_DpOT1_ (char *param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { std::__cxx11::string::append(param_1); _ZN8nlohmann16json_abi_v3_11_36detail11concat_intoINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS8_JcS8_RA3_KcETnNSt9enable_ifIXsr24detect_string_can_appendIT_T0_EE5valueEiE4typeELi0EEEvRSF_OSG_DpOT1_ (param_1,param_3,param_4,param_5,param_6); return; }
39,258
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O3
c
get_internal_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2c8, %rsp # imm = 0x2C8 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl %esi, %r13d leaq 0xb6e28f(%rip), %r12 # 0xc01d70 movq (%r12,%r13,8), %rbx testq %rbx, %rbx je 0x93bca testb $0x1, 0xd(%rbx) jne 0x93bd1 movq %rdx, %r15 movq %rdi, %r14 leaq 0xb7708b(%rip), %rax # 0xc0ab90 cmpq $0x0, 0x40(%rax) jne 0x93db3 leaq 0xb77079(%rip), %rdi # 0xc0ab90 callq 0x29220 movl 0xc(%rbx), %eax testb $0x9, %al jne 0x93bbd leaq -0x230(%rbp), %rdi callq 0x933e7 movq 0x10(%rbx), %rsi leaq 0x49800(%rip), %rdx # 0xdd33e movq %rax, %rdi xorl %ecx, %ecx xorl %eax, %eax callq 0xd810c leaq -0x2e0(%rbp), %rdi movb $0x0, (%rdi) leaq -0xd01(%rip), %rax # 0x92e5a movq %rax, 0x80(%rdi) leaq -0xd00(%rip), %rax # 0x92e69 movq %rax, 0x88(%rdi) leaq -0xcf3(%rip), %rax # 0x92e84 movq %rax, 0x90(%rdi) leaq 0xd335(%rip), %rax # 0xa0eba movq %rax, 0x98(%rdi) leaq 0x2f3c0d(%rip), %rax # 0x3877a0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xd02(%rip), %rax # 0x92ea2 movq %rax, 0xa8(%rdi) leaq -0x230(%rbp), %rsi movq %r15, %rdx callq 0x94790 movl 0xc(%rbx), %eax btl $0x9, %eax jb 0x93be1 xorl %ebx, %ebx jmp 0x93d73 xorl %ebx, %ebx jmp 0x93d8f leaq 0xb72208(%rip), %rax # 0xc05de0 incq (%rax,%r13,8) jmp 0x93d8f btl $0x8, %eax jb 0x93d68 cmpq $0x0, 0x40(%rbx) je 0x93c07 cmpq $0x0, 0x50(%rbx) je 0x93c07 cmpq $0x0, 0x48(%rbx) je 0x93c07 cmpq $0x0, 0x68(%rbx) jne 0x93c36 movq 0x10(%rbx), %rdi movl $0x20, %esi callq 0x93898 testl %eax, %eax je 0x93c36 cmpl %eax, (%rbx) je 0x93c36 movl %eax, %eax movq (%r12,%rax,8), %rsi testq %rsi, %rsi je 0x93c36 testb $0x2, 0xd(%rsi) je 0x93c36 movq %rbx, %rdi callq 0x949d9 cmpq $0x0, 0x58(%rbx) jne 0x93d2a testb $0x10, 0xc(%rbx) jne 0x93d2a movq 0x38(%rbx), %rax testq %rax, %rax je 0x93d2a leaq 0x49765(%rip), %rsi # 0xdd3c4 movl $0x8, %edx movq %rax, -0x2e8(%rbp) movq -0x2e8(%rbp), %rdi callq 0x291d0 movq -0x2e8(%rbp), %rcx testl %eax, %eax jne 0x93d2a leaq 0x8(%rcx), %rdi movq %rdi, -0x2f0(%rbp) movl $0x5d, %esi callq 0x29440 testq %rax, %rax setne %dl movq -0x2e8(%rbp), %rcx addq $0x28, %rcx cmpq %rax, %rcx seta %cl andb %dl, %cl cmpb $0x1, %cl jne 0x93d2a movq -0x2f0(%rbp), %rsi subq %rsi, %rax leaq -0x2e0(%rbp), %rdi movl $0x21, %ecx movq %rax, %rdx movq %rax, -0x2e8(%rbp) callq 0x29420 movq -0x2e8(%rbp), %rax movb $0x0, -0x2e0(%rbp,%rax) leaq -0x2e0(%rbp), %rdi movq %r15, %rsi callq 0x9357b testl %eax, %eax je 0x93d2a cmpl %eax, (%rbx) je 0x93d2a movl %eax, %eax movq (%r12,%rax,8), %rax testq %rax, %rax je 0x93d2a testb $0x2, 0xd(%rax) je 0x93d2a cmpq $0x0, 0x58(%rbx) jne 0x93d2a testb $0x10, 0xc(%rbx) jne 0x93d2a movq 0x58(%rax), %rax movq %rax, 0x58(%rbx) movq 0xb8(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x93d45 movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al jne 0x93d60 movq 0xc0(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x93d64 movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al je 0x93d64 xorl %ebx, %ebx jmp 0x93d68 orb $0x1, 0xd(%rbx) leaq 0xb72071(%rip), %rax # 0xc05de0 incq (%rax,%r13,8) leaq 0xb76e16(%rip), %rax # 0xc0ab90 movq 0x40(%rax), %rdi testq %rdi, %rdi jne 0x93dbd leaq 0xb76e06(%rip), %rdi # 0xc0ab90 callq 0x291e0 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x93dcf movq %rbx, %rax addq $0x2c8, %rsp # imm = 0x2C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2e8a7 jmp 0x93b1c leaq 0x2f42fc(%rip), %rax # 0x3880c0 movq (%rax), %rax callq *0x160(%rax) jmp 0x93d83 callq 0x29270
get_internal_charset: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2C8h mov rax, fs:28h mov [rbp+var_30], rax mov r13d, esi lea r12, all_charsets mov rbx, [r12+r13*8] test rbx, rbx jz loc_93BCA test byte ptr [rbx+0Dh], 1 jnz loc_93BD1 mov r15, rdx mov r14, rdi lea rax, THR_LOCK_charset cmp qword ptr [rax+40h], 0 jnz loc_93DB3 lea rdi, THR_LOCK_charset call _pthread_mutex_lock loc_93B1C: mov eax, [rbx+0Ch] test al, 9 jnz loc_93BBD lea rdi, [rbp+var_230] call get_charsets_dir mov rsi, [rbx+10h] lea rdx, aIndexXml+5; ".xml" mov rdi, rax xor ecx, ecx xor eax, eax call strxmov lea rdi, [rbp+var_2E0] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax lea rsi, [rbp+var_230] mov rdx, r15 call my_read_charset_file mov eax, [rbx+0Ch] loc_93BBD: bt eax, 9 jb short loc_93BE1 xor ebx, ebx jmp loc_93D73 loc_93BCA: xor ebx, ebx jmp loc_93D8F loc_93BD1: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] jmp loc_93D8F loc_93BE1: bt eax, 8 jb loc_93D68 cmp qword ptr [rbx+40h], 0 jz short loc_93C07 cmp qword ptr [rbx+50h], 0 jz short loc_93C07 cmp qword ptr [rbx+48h], 0 jz short loc_93C07 cmp qword ptr [rbx+68h], 0 jnz short loc_93C36 loc_93C07: mov rdi, [rbx+10h] mov esi, 20h ; ' ' call get_charset_number_internal test eax, eax jz short loc_93C36 cmp [rbx], eax jz short loc_93C36 mov eax, eax mov rsi, [r12+rax*8] test rsi, rsi jz short loc_93C36 test byte ptr [rsi+0Dh], 2 jz short loc_93C36 mov rdi, rbx call inherit_charset_data loc_93C36: cmp qword ptr [rbx+58h], 0 jnz loc_93D2A test byte ptr [rbx+0Ch], 10h jnz loc_93D2A mov rax, [rbx+38h] test rax, rax jz loc_93D2A lea rsi, aImport; "[import " mov edx, 8 mov [rbp+var_2E8], rax mov rdi, [rbp+var_2E8] call _strncmp mov rcx, [rbp+var_2E8] test eax, eax jnz loc_93D2A lea rdi, [rcx+8] mov [rbp+var_2F0], rdi mov esi, 5Dh ; ']' call _strchr test rax, rax setnz dl mov rcx, [rbp+var_2E8] add rcx, 28h ; '(' cmp rcx, rax setnbe cl and cl, dl cmp cl, 1 jnz short loc_93D2A mov rsi, [rbp+var_2F0] sub rax, rsi lea rdi, [rbp+var_2E0] mov ecx, 21h ; '!' mov rdx, rax mov [rbp+var_2E8], rax call ___memcpy_chk mov rax, [rbp+var_2E8] mov [rbp+rax+var_2E0], 0 lea rdi, [rbp+var_2E0] mov rsi, r15 call get_collation_number test eax, eax jz short loc_93D2A cmp [rbx], eax jz short loc_93D2A mov eax, eax mov rax, [r12+rax*8] test rax, rax jz short loc_93D2A test byte ptr [rax+0Dh], 2 jz short loc_93D2A cmp qword ptr [rbx+58h], 0 jnz short loc_93D2A test byte ptr [rbx+0Ch], 10h jnz short loc_93D2A mov rax, [rax+58h] mov [rbx+58h], rax loc_93D2A: mov rax, [rbx+0B8h] mov rax, [rax] test rax, rax jz short loc_93D45 mov rdi, rbx mov rsi, r14 call rax test al, al jnz short loc_93D60 loc_93D45: mov rax, [rbx+0C0h] mov rax, [rax] test rax, rax jz short loc_93D64 mov rdi, rbx mov rsi, r14 call rax test al, al jz short loc_93D64 loc_93D60: xor ebx, ebx jmp short loc_93D68 loc_93D64: or byte ptr [rbx+0Dh], 1 loc_93D68: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] loc_93D73: lea rax, THR_LOCK_charset mov rdi, [rax+40h] test rdi, rdi jnz short loc_93DBD loc_93D83: lea rdi, THR_LOCK_charset call _pthread_mutex_unlock loc_93D8F: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_93DCF mov rax, rbx add rsp, 2C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_93DB3: call get_internal_charset_cold_1 jmp loc_93B1C loc_93DBD: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_93D83 loc_93DCF: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { long long v3; // r13 long long v4; // rbx long long v6; // rdx long long v7; // rcx int v8; // eax int charsets_dir; // eax int v10; // r8d int v11; // r9d int charset_number_internal; // eax long long v13; // rsi long long v14; // rax int v15; // eax unsigned long long v16; // rax int collation_number; // eax long long v18; // rax unsigned __int8 ( *v19)(long long, long long, long long, long long); // rax unsigned __int8 ( *v20)(long long, long long, long long, long long); // rax long long v22; // [rsp+0h] [rbp-2F0h] long long v23; // [rsp+8h] [rbp-2E8h] _BYTE v24[128]; // [rsp+10h] [rbp-2E0h] BYREF long long ( *v25)(long long); // [rsp+90h] [rbp-260h] long long ( *v26)(long long); // [rsp+98h] [rbp-258h] long long ( *v27)(long long, long long, long long, long long, long long, long long); // [rsp+A0h] [rbp-250h] long long ( *v28)(_QWORD); // [rsp+A8h] [rbp-248h] long long ( *v29)(); // [rsp+B0h] [rbp-240h] long long ( *v30)(unsigned int *); // [rsp+B8h] [rbp-238h] _BYTE v31[512]; // [rsp+C0h] [rbp-230h] BYREF unsigned long long v32; // [rsp+2C0h] [rbp-30h] v32 = __readfsqword(0x28u); v3 = a2; v4 = all_charsets[a2]; if ( !v4 ) return 0LL; if ( (*(_BYTE *)(v4 + 13) & 1) != 0 ) { ++my_collation_statistics[a2]; } else { if ( THR_LOCK_charset[8] ) get_internal_charset_cold_1(); else pthread_mutex_lock(THR_LOCK_charset); v8 = *(_DWORD *)(v4 + 12); if ( (v8 & 9) == 0 ) { charsets_dir = get_charsets_dir((long long)v31); strxmov(charsets_dir, *(_QWORD *)(v4 + 16), (unsigned int)".xml", 0, v10, v11); v24[0] = 0; v25 = my_once_alloc_c; v26 = my_malloc_c; v27 = my_realloc_c; v28 = my_free; v29 = my_charset_error_reporter; v30 = add_collation; my_read_charset_file(v24, v31, a3); v8 = *(_DWORD *)(v4 + 12); } if ( (v8 & 0x200) != 0 ) { if ( (v8 & 0x100) == 0 ) { if ( !*(_QWORD *)(v4 + 64) || !*(_QWORD *)(v4 + 80) || !*(_QWORD *)(v4 + 72) || !*(_QWORD *)(v4 + 104) ) { charset_number_internal = get_charset_number_internal(*(_QWORD *)(v4 + 16), 32); if ( charset_number_internal ) { if ( *(_DWORD *)v4 != charset_number_internal ) { v13 = all_charsets[charset_number_internal]; if ( v13 ) { if ( (*(_BYTE *)(v13 + 13) & 2) != 0 ) inherit_charset_data(v4); } } } } if ( !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) { v14 = *(_QWORD *)(v4 + 56); if ( v14 ) { v23 = *(_QWORD *)(v4 + 56); v15 = strncmp(v14, "[import ", 8LL); v7 = v23; if ( !v15 ) { v22 = v23 + 8; v16 = strchr(v23 + 8, 93LL); LOBYTE(v6) = v16 != 0; v7 = v23 + 40; LOBYTE(v7) = v16 != 0 && v23 + 40 > v16; if ( (_BYTE)v7 == 1 ) { v23 = v16 - v22; __memcpy_chk(v24, v22, v16 - v22, 33LL); v24[v23] = 0; collation_number = get_collation_number((long long)v24, a3); if ( collation_number ) { if ( *(_DWORD *)v4 != collation_number ) { v18 = all_charsets[collation_number]; if ( v18 ) { if ( (*(_BYTE *)(v18 + 13) & 2) != 0 && !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) *(_QWORD *)(v4 + 88) = *(_QWORD *)(v18 + 88); } } } } } } } v19 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 184); if ( v19 && v19(v4, a1, v6, v7) || (v20 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 192)) != 0LL && v20(v4, a1, v6, v7) ) { v4 = 0LL; } else { *(_BYTE *)(v4 + 13) |= 1u; } } ++my_collation_statistics[v3]; } else { v4 = 0LL; } if ( THR_LOCK_charset[8] ) PSI_server[44](); pthread_mutex_unlock(THR_LOCK_charset); } return v4; }
get_internal_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2c8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13D,ESI LEA R12,[0xd01d70] MOV RBX,qword ptr [R12 + R13*0x8] TEST RBX,RBX JZ 0x00193bca TEST byte ptr [RBX + 0xd],0x1 JNZ 0x00193bd1 MOV R15,RDX MOV R14,RDI LEA RAX,[0xd0ab90] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x00193db3 LEA RDI,[0xd0ab90] CALL 0x00129220 LAB_00193b1c: MOV EAX,dword ptr [RBX + 0xc] TEST AL,0x9 JNZ 0x00193bbd LEA RDI,[RBP + -0x230] CALL 0x001933e7 MOV RSI,qword ptr [RBX + 0x10] LEA RDX,[0x1dd33e] MOV RDI,RAX XOR ECX,ECX XOR EAX,EAX CALL 0x001d810c LEA RDI,[RBP + -0x2e0] MOV byte ptr [RDI],0x0 LEA RAX,[0x192e5a] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x192e69] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x192e84] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x1a0eba] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x4877a0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x192ea2] MOV qword ptr [RDI + 0xa8],RAX LEA RSI,[RBP + -0x230] MOV RDX,R15 CALL 0x00194790 MOV EAX,dword ptr [RBX + 0xc] LAB_00193bbd: BT EAX,0x9 JC 0x00193be1 XOR EBX,EBX JMP 0x00193d73 LAB_00193bca: XOR EBX,EBX JMP 0x00193d8f LAB_00193bd1: LEA RAX,[0xd05de0] INC qword ptr [RAX + R13*0x8] JMP 0x00193d8f LAB_00193be1: BT EAX,0x8 JC 0x00193d68 CMP qword ptr [RBX + 0x40],0x0 JZ 0x00193c07 CMP qword ptr [RBX + 0x50],0x0 JZ 0x00193c07 CMP qword ptr [RBX + 0x48],0x0 JZ 0x00193c07 CMP qword ptr [RBX + 0x68],0x0 JNZ 0x00193c36 LAB_00193c07: MOV RDI,qword ptr [RBX + 0x10] MOV ESI,0x20 CALL 0x00193898 TEST EAX,EAX JZ 0x00193c36 CMP dword ptr [RBX],EAX JZ 0x00193c36 MOV EAX,EAX MOV RSI,qword ptr [R12 + RAX*0x8] TEST RSI,RSI JZ 0x00193c36 TEST byte ptr [RSI + 0xd],0x2 JZ 0x00193c36 MOV RDI,RBX CALL 0x001949d9 LAB_00193c36: CMP qword ptr [RBX + 0x58],0x0 JNZ 0x00193d2a TEST byte ptr [RBX + 0xc],0x10 JNZ 0x00193d2a MOV RAX,qword ptr [RBX + 0x38] TEST RAX,RAX JZ 0x00193d2a LEA RSI,[0x1dd3c4] MOV EDX,0x8 MOV qword ptr [RBP + -0x2e8],RAX MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001291d0 MOV RCX,qword ptr [RBP + -0x2e8] TEST EAX,EAX JNZ 0x00193d2a LEA RDI,[RCX + 0x8] MOV qword ptr [RBP + -0x2f0],RDI MOV ESI,0x5d CALL 0x00129440 TEST RAX,RAX SETNZ DL MOV RCX,qword ptr [RBP + -0x2e8] ADD RCX,0x28 CMP RCX,RAX SETA CL AND CL,DL CMP CL,0x1 JNZ 0x00193d2a MOV RSI,qword ptr [RBP + -0x2f0] SUB RAX,RSI LEA RDI,[RBP + -0x2e0] MOV ECX,0x21 MOV RDX,RAX MOV qword ptr [RBP + -0x2e8],RAX CALL 0x00129420 MOV RAX,qword ptr [RBP + -0x2e8] MOV byte ptr [RBP + RAX*0x1 + -0x2e0],0x0 LEA RDI,[RBP + -0x2e0] MOV RSI,R15 CALL 0x0019357b TEST EAX,EAX JZ 0x00193d2a CMP dword ptr [RBX],EAX JZ 0x00193d2a MOV EAX,EAX MOV RAX,qword ptr [R12 + RAX*0x8] TEST RAX,RAX JZ 0x00193d2a TEST byte ptr [RAX + 0xd],0x2 JZ 0x00193d2a CMP qword ptr [RBX + 0x58],0x0 JNZ 0x00193d2a TEST byte ptr [RBX + 0xc],0x10 JNZ 0x00193d2a MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBX + 0x58],RAX LAB_00193d2a: MOV RAX,qword ptr [RBX + 0xb8] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00193d45 MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JNZ 0x00193d60 LAB_00193d45: MOV RAX,qword ptr [RBX + 0xc0] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x00193d64 MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JZ 0x00193d64 LAB_00193d60: XOR EBX,EBX JMP 0x00193d68 LAB_00193d64: OR byte ptr [RBX + 0xd],0x1 LAB_00193d68: LEA RAX,[0xd05de0] INC qword ptr [RAX + R13*0x8] LAB_00193d73: LEA RAX,[0xd0ab90] MOV RDI,qword ptr [RAX + 0x40] TEST RDI,RDI JNZ 0x00193dbd LAB_00193d83: LEA RDI,[0xd0ab90] CALL 0x001291e0 LAB_00193d8f: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00193dcf MOV RAX,RBX ADD RSP,0x2c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00193db3: CALL 0x0012e8a7 JMP 0x00193b1c LAB_00193dbd: LEA RAX,[0x4880c0] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00193d83 LAB_00193dcf: CALL 0x00129270
uint * get_internal_charset(int8 param_1,ulong param_2,int8 param_3) { char *__s; char *__s1; long lVar1; char cVar2; uint uVar3; int iVar4; int8 uVar5; char *pcVar6; uint *puVar7; long in_FS_OFFSET; int1 local_2e8 [128]; code *local_268; code *local_260; code *local_258; code *local_250; int *local_248; code *local_240; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); param_2 = param_2 & 0xffffffff; puVar7 = (uint *)(&all_charsets)[param_2]; if (puVar7 == (uint *)0x0) { puVar7 = (uint *)0x0; goto LAB_00193d8f; } if ((*(byte *)((long)puVar7 + 0xd) & 1) != 0) { *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; goto LAB_00193d8f; } if (THR_LOCK_charset._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_charset); } else { get_internal_charset_cold_1(); } uVar3 = puVar7[3]; if ((uVar3 & 9) == 0) { uVar5 = get_charsets_dir(local_238); strxmov(uVar5,*(int8 *)(puVar7 + 4),".xml",0); local_2e8[0] = 0; local_268 = my_once_alloc_c; local_260 = my_malloc_c; local_258 = my_realloc_c; local_250 = my_free; local_248 = my_charset_error_reporter; local_240 = add_collation; my_read_charset_file(local_2e8,local_238,param_3); uVar3 = puVar7[3]; } if ((uVar3 >> 9 & 1) == 0) { puVar7 = (uint *)0x0; } else { if ((uVar3 >> 8 & 1) == 0) { if ((((*(long *)(puVar7 + 0x10) == 0) || (*(long *)(puVar7 + 0x14) == 0)) || (*(long *)(puVar7 + 0x12) == 0)) || (*(long *)(puVar7 + 0x1a) == 0)) { uVar3 = get_charset_number_internal(*(int8 *)(puVar7 + 4),0x20); if (((uVar3 != 0) && (*puVar7 != uVar3)) && (((&all_charsets)[uVar3] != 0 && ((*(byte *)((&all_charsets)[uVar3] + 0xd) & 2) != 0)))) { inherit_charset_data(puVar7); } } if (((*(long *)(puVar7 + 0x16) == 0) && ((puVar7[3] & 0x10) == 0)) && (__s1 = *(char **)(puVar7 + 0xe), __s1 != (char *)0x0)) { iVar4 = strncmp(__s1,"[import ",8); if (iVar4 == 0) { __s = __s1 + 8; pcVar6 = strchr(__s,0x5d); if (pcVar6 < __s1 + 0x28 && pcVar6 != (char *)0x0) { __memcpy_chk(local_2e8,__s,(long)pcVar6 - (long)__s,0x21); local_2e8[(long)pcVar6 - (long)__s] = 0; uVar3 = get_collation_number(local_2e8,param_3); if (((((uVar3 != 0) && (*puVar7 != uVar3)) && (lVar1 = (&all_charsets)[uVar3], lVar1 != 0)) && (((*(byte *)(lVar1 + 0xd) & 2) != 0 && (*(long *)(puVar7 + 0x16) == 0)))) && ((puVar7[3] & 0x10) == 0)) { *(int8 *)(puVar7 + 0x16) = *(int8 *)(lVar1 + 0x58); } } } } if ((code *)**(int8 **)(puVar7 + 0x2e) == (code *)0x0) { LAB_00193d45: if ((code *)**(int8 **)(puVar7 + 0x30) != (code *)0x0) { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x30))(puVar7,param_1); if (cVar2 != '\0') goto LAB_00193d60; } *(byte *)((long)puVar7 + 0xd) = *(byte *)((long)puVar7 + 0xd) | 1; } else { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x2e))(puVar7,param_1); if (cVar2 == '\0') goto LAB_00193d45; LAB_00193d60: puVar7 = (uint *)0x0; } } *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; } if (THR_LOCK_charset._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_charset); LAB_00193d8f: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return puVar7; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,259
get_charset_number_internal
eloqsql/mysys/charset.c
static uint get_charset_number_internal(const char *charset_name, uint cs_flags) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if ( cs[0] && cs[0]->cs_name.str && (cs[0]->state & cs_flags) && !my_strcasecmp(&my_charset_latin1, cs[0]->cs_name.str, charset_name)) return cs[0]->number; } return 0; }
O3
c
get_charset_number_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movq $-0x8, %r12 leaq 0x31d193(%rip), %r13 # 0x36a960 leaq 0x2e982c(%rip), %r15 # 0x337000 movq 0x8(%r13,%r12), %rax testq %rax, %rax je 0x4d800 movq 0x10(%rax), %rsi testq %rsi, %rsi je 0x4d800 testl %ebx, 0xc(%rax) je 0x4d800 movq 0xc0(%r15), %rax movq %r15, %rdi movq %r14, %rdx callq *0x40(%rax) testl %eax, %eax je 0x4d81e addq $0x8, %r12 cmpq $0x3ff8, %r12 # imm = 0x3FF8 jb 0x4d7d4 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x8(%r13,%r12), %rax movl (%rax), %eax jmp 0x4d80f
get_charset_number_internal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, esi mov r14, rdi mov r12, 0FFFFFFFFFFFFFFF8h lea r13, all_charsets lea r15, my_charset_latin1 loc_4D7D4: mov rax, [r13+r12+8] test rax, rax jz short loc_4D800 mov rsi, [rax+10h] test rsi, rsi jz short loc_4D800 test [rax+0Ch], ebx jz short loc_4D800 mov rax, [r15+0C0h] mov rdi, r15 mov rdx, r14 call qword ptr [rax+40h] test eax, eax jz short loc_4D81E loc_4D800: add r12, 8 cmp r12, 3FF8h jb short loc_4D7D4 xor eax, eax loc_4D80F: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4D81E: mov rax, [r13+r12+8] mov eax, [rax] jmp short loc_4D80F
long long get_charset_number_internal(long long a1, int a2) { long long v3; // r12 long long v4; // rax long long v5; // rsi v3 = 0x1FFFFFFFFFFFFFFFLL; while ( 1 ) { v4 = all_charsets[v3 + 1]; if ( v4 ) { v5 = *(_QWORD *)(v4 + 16); if ( v5 ) { if ( (a2 & *(_DWORD *)(v4 + 12)) != 0 && !(*(unsigned int ( **)(void *, long long, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, v5, a1) ) { break; } } } if ( (unsigned long long)++v3 >= 2047 ) return 0LL; } return *(unsigned int *)all_charsets[v3 + 1]; }
get_charset_number_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV R12,-0x8 LEA R13,[0x46a960] LEA R15,[0x437000] LAB_0014d7d4: MOV RAX,qword ptr [R13 + R12*0x1 + 0x8] TEST RAX,RAX JZ 0x0014d800 MOV RSI,qword ptr [RAX + 0x10] TEST RSI,RSI JZ 0x0014d800 TEST dword ptr [RAX + 0xc],EBX JZ 0x0014d800 MOV RAX,qword ptr [R15 + 0xc0] MOV RDI,R15 MOV RDX,R14 CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0014d81e LAB_0014d800: ADD R12,0x8 CMP R12,0x3ff8 JC 0x0014d7d4 XOR EAX,EAX LAB_0014d80f: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014d81e: MOV RAX,qword ptr [R13 + R12*0x1 + 0x8] MOV EAX,dword ptr [RAX] JMP 0x0014d80f
int4 get_charset_number_internal(int8 param_1,uint param_2) { long lVar1; int iVar2; ulong uVar3; uVar3 = 0xfffffffffffffff8; while ((((lVar1 = *(long *)((long)&DAT_0046a968 + uVar3), lVar1 == 0 || (*(long *)(lVar1 + 0x10) == 0)) || ((*(uint *)(lVar1 + 0xc) & param_2) == 0)) || (iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_004370c0 + 0x40)) (&my_charset_latin1,*(long *)(lVar1 + 0x10),param_1), iVar2 != 0))) { uVar3 = uVar3 + 8; if (0x3ff7 < uVar3) { return 0; } } return **(int4 **)((long)&DAT_0046a968 + uVar3); }
39,260
js_string_raw
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_raw(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { // raw(temp,...a) JSValue cooked, val, raw; StringBuffer b_s, *b = &b_s; int64_t i, n; string_buffer_init(ctx, b, 0); raw = JS_UNDEFINED; cooked = JS_ToObject(ctx, argv[0]); if (JS_IsException(cooked)) goto exception; raw = JS_ToObjectFree(ctx, JS_GetProperty(ctx, cooked, JS_ATOM_raw)); if (JS_IsException(raw)) goto exception; if (js_get_length64(ctx, &n, raw) < 0) goto exception; for (i = 0; i < n; i++) { val = JS_ToStringFree(ctx, JS_GetPropertyInt64(ctx, raw, i)); if (JS_IsException(val)) goto exception; string_buffer_concat_value_free(b, val); if (i < n - 1 && i + 1 < argc) { if (string_buffer_concat_value(b, argv[i + 1])) goto exception; } } JS_FreeValue(ctx, cooked); JS_FreeValue(ctx, raw); return string_buffer_end(b); exception: JS_FreeValue(ctx, cooked); JS_FreeValue(ctx, raw); string_buffer_free(b); return JS_EXCEPTION; }
O2
c
js_string_raw: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %r13 movl %ecx, %r12d movq %rdi, %rbx leaq 0x38(%rsp), %rsi xorl %r15d, %r15d xorl %edx, %edx callq 0x2e042 movq (%r13), %rsi movq 0x8(%r13), %rdx movq %rbx, %rdi callq 0x20b92 cmpl $0x6, %edx movq %rdx, 0x10(%rsp) movq %rax, 0x8(%rsp) jne 0x672c6 pushq $0x3 popq %rbp jmp 0x6739d pushq $0x71 popq %rcx movq %rbx, %rdi movq %rax, %rsi callq 0x1b043 movq %rbx, %rdi movq %rax, %rsi callq 0x3964c movq %rax, %r15 movq %rdx, %rbp cmpl $0x6, %ebp je 0x6739d leaq 0x30(%rsp), %rsi movq %rbx, %rdi movq %r15, %rdx movq %rbp, %rcx callq 0x1cc43 testl %eax, %eax js 0x6739d movq 0x30(%rsp), %rax leaq -0x1(%rax), %rcx movq %rcx, 0x20(%rsp) movslq %r12d, %rcx movq %rcx, 0x18(%rsp) xorl %r12d, %r12d testq %rax, %rax cmovleq %r12, %rax movq %rax, 0x28(%rsp) addq $0x18, %r13 cmpq %r12, 0x28(%rsp) je 0x673db movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx movq %r12, %rcx callq 0x1e178 movq %rbx, %rdi movq %rax, %rsi callq 0x2e049 cmpl $0x6, %edx je 0x6739d leaq 0x38(%rsp), %rdi movq %rax, %rsi callq 0x41476 leaq 0x1(%r12), %r14 cmpq 0x20(%rsp), %r12 jge 0x67394 cmpq 0x18(%rsp), %r14 jge 0x67394 movq -0x8(%r13), %rsi movq (%r13), %rdx leaq 0x38(%rsp), %rdi callq 0x4194c testl %eax, %eax jne 0x6739d addq $0x10, %r13 movq %r14, %r12 jmp 0x67332 movq %rbx, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x1801e movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx callq 0x1801e leaq 0x38(%rsp), %rdi callq 0x2ef01 pushq $0x6 popq %rdx xorl %eax, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x1801e movq %rbx, %rdi movq %r15, %rsi movq %rbp, %rdx callq 0x1801e leaq 0x38(%rsp), %rdi callq 0x2cad4 jmp 0x673cc
js_string_raw: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r13, r8 mov r12d, ecx mov rbx, rdi lea rsi, [rsp+88h+var_50] xor r15d, r15d xor edx, edx call string_buffer_init mov rsi, [r13+0] mov rdx, [r13+8] mov rdi, rbx call JS_ToObject cmp edx, 6 mov [rsp+88h+var_78], rdx mov [rsp+88h+var_80], rax jnz short loc_672C6 push 3 pop rbp jmp loc_6739D loc_672C6: push 71h ; 'q' pop rcx mov rdi, rbx mov rsi, rax call JS_GetProperty mov rdi, rbx mov rsi, rax call JS_ToObjectFree mov r15, rax mov rbp, rdx cmp ebp, 6 jz loc_6739D lea rsi, [rsp+88h+var_58] mov rdi, rbx mov rdx, r15 mov rcx, rbp call js_get_length64 test eax, eax js loc_6739D mov rax, [rsp+88h+var_58] lea rcx, [rax-1] mov [rsp+88h+var_68], rcx movsxd rcx, r12d mov [rsp+88h+var_70], rcx xor r12d, r12d test rax, rax cmovle rax, r12 mov [rsp+88h+var_60], rax add r13, 18h loc_67332: cmp [rsp+88h+var_60], r12 jz loc_673DB mov rdi, rbx mov rsi, r15 mov rdx, rbp mov rcx, r12 call JS_GetPropertyInt64 mov rdi, rbx mov rsi, rax call JS_ToStringFree cmp edx, 6 jz short loc_6739D lea rdi, [rsp+88h+var_50] mov rsi, rax call string_buffer_concat_value_free lea r14, [r12+1] cmp r12, [rsp+88h+var_68] jge short loc_67394 cmp r14, [rsp+88h+var_70] jge short loc_67394 mov rsi, [r13-8] mov rdx, [r13+0] lea rdi, [rsp+88h+var_50] call string_buffer_concat_value test eax, eax jnz short loc_6739D loc_67394: add r13, 10h mov r12, r14 jmp short loc_67332 loc_6739D: mov rdi, rbx mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] call JS_FreeValue mov rdi, rbx mov rsi, r15 mov rdx, rbp call JS_FreeValue lea rdi, [rsp+88h+var_50] call string_buffer_free push 6 pop rdx xor eax, eax loc_673CC: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_673DB: mov rdi, rbx mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] call JS_FreeValue mov rdi, rbx mov rsi, r15 mov rdx, rbp call JS_FreeValue lea rdi, [rsp+88h+var_50] call string_buffer_end jmp short loc_673CC
long long js_string_raw( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, long long *a13) { long long v15; // r15 long long v16; // rcx long long v17; // r8 long long v18; // r9 __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // rax long long v22; // rdx long long v23; // rbp long long Property; // rax long long v25; // rdx long long v26; // rcx long long v27; // r8 long long v28; // r9 __m128 v29; // xmm4 __m128 v30; // xmm5 long long v31; // rax long long v32; // rdx long long v33; // rax signed long long v34; // r12 long long *v35; // r13 unsigned long long PropertyInt64; // rax long long v37; // rdx long long v38; // rax long long v39; // rdx long long v41; // [rsp+8h] [rbp-80h] long long v42; // [rsp+10h] [rbp-78h] signed long long v43; // [rsp+18h] [rbp-70h] signed long long v44; // [rsp+20h] [rbp-68h] long long v45; // [rsp+28h] [rbp-60h] long long v46; // [rsp+30h] [rbp-58h] BYREF long long v47[10]; // [rsp+38h] [rbp-50h] BYREF v15 = 0LL; string_buffer_init(a1, (long long)v47, 0); v21 = JS_ToObject(a1, *a13, a13[1], v16, v17, v18, a2, a3, a4, a5, v19, v20, a8, a9); v42 = v22; v41 = v21; if ( (_DWORD)v22 == 6 ) { v23 = 3LL; LABEL_14: JS_FreeValue(a1, v41, v42); JS_FreeValue(a1, v15, v23); string_buffer_free(v47); return 0LL; } Property = JS_GetProperty(a1, v21, v22, 113); v31 = JS_ToObjectFree(a1, Property, v25, v26, v27, v28, a2, a3, a4, a5, v29, v30, a8, a9); v15 = v31; v23 = v32; if ( (_DWORD)v32 == 6 || (int)js_get_length64(a1, &v46, v31, v32) < 0 ) goto LABEL_14; v33 = v46; v44 = v46 - 1; v43 = a12; v34 = 0LL; if ( v46 <= 0 ) v33 = 0LL; v45 = v33; v35 = a13 + 3; while ( v45 != v34 ) { PropertyInt64 = JS_GetPropertyInt64(a1, v15, v23, v34); v38 = JS_ToStringFree(a1, PropertyInt64, v37); if ( (_DWORD)v39 == 6 ) goto LABEL_14; string_buffer_concat_value_free((long long)v47, v38, v39); if ( v34 < v44 && v34 + 1 < v43 && (unsigned int)string_buffer_concat_value((long long)v47, *(v35 - 1), *v35) ) goto LABEL_14; v35 += 2; ++v34; } JS_FreeValue(a1, v41, v42); JS_FreeValue(a1, v15, v23); return string_buffer_end(v47); }
js_string_raw: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R13,R8 MOV R12D,ECX MOV RBX,RDI LEA RSI,[RSP + 0x38] XOR R15D,R15D XOR EDX,EDX CALL 0x0012e042 MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] MOV RDI,RBX CALL 0x00120b92 CMP EDX,0x6 MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x8],RAX JNZ 0x001672c6 PUSH 0x3 POP RBP JMP 0x0016739d LAB_001672c6: PUSH 0x71 POP RCX MOV RDI,RBX MOV RSI,RAX CALL 0x0011b043 MOV RDI,RBX MOV RSI,RAX CALL 0x0013964c MOV R15,RAX MOV RBP,RDX CMP EBP,0x6 JZ 0x0016739d LEA RSI,[RSP + 0x30] MOV RDI,RBX MOV RDX,R15 MOV RCX,RBP CALL 0x0011cc43 TEST EAX,EAX JS 0x0016739d MOV RAX,qword ptr [RSP + 0x30] LEA RCX,[RAX + -0x1] MOV qword ptr [RSP + 0x20],RCX MOVSXD RCX,R12D MOV qword ptr [RSP + 0x18],RCX XOR R12D,R12D TEST RAX,RAX CMOVLE RAX,R12 MOV qword ptr [RSP + 0x28],RAX ADD R13,0x18 LAB_00167332: CMP qword ptr [RSP + 0x28],R12 JZ 0x001673db MOV RDI,RBX MOV RSI,R15 MOV RDX,RBP MOV RCX,R12 CALL 0x0011e178 MOV RDI,RBX MOV RSI,RAX CALL 0x0012e049 CMP EDX,0x6 JZ 0x0016739d LEA RDI,[RSP + 0x38] MOV RSI,RAX CALL 0x00141476 LEA R14,[R12 + 0x1] CMP R12,qword ptr [RSP + 0x20] JGE 0x00167394 CMP R14,qword ptr [RSP + 0x18] JGE 0x00167394 MOV RSI,qword ptr [R13 + -0x8] MOV RDX,qword ptr [R13] LEA RDI,[RSP + 0x38] CALL 0x0014194c TEST EAX,EAX JNZ 0x0016739d LAB_00167394: ADD R13,0x10 MOV R12,R14 JMP 0x00167332 LAB_0016739d: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011801e MOV RDI,RBX MOV RSI,R15 MOV RDX,RBP CALL 0x0011801e LEA RDI,[RSP + 0x38] CALL 0x0012ef01 PUSH 0x6 POP RDX XOR EAX,EAX LAB_001673cc: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001673db: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011801e MOV RDI,RBX MOV RSI,R15 MOV RDX,RBP CALL 0x0011801e LEA RDI,[RSP + 0x38] CALL 0x0012cad4 JMP 0x001673cc
int8 js_string_raw(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int iVar1; int8 uVar2; long lVar3; int8 uVar4; int8 uVar5; int8 uVar6; int8 uVar7; long lVar8; int1 auVar9 [16]; int1 auVar10 [12]; long local_58; int1 local_50 [32]; string_buffer_init(param_1,local_50,0); auVar9 = JS_ToObject(param_1,*param_5,param_5[1]); uVar6 = auVar9._8_8_; uVar5 = auVar9._0_8_; if (auVar9._8_4_ == 6) { auVar9 = ZEXT816(3) << 0x40; } else { uVar2 = JS_GetProperty(param_1,uVar5,uVar6,0x71); auVar9 = JS_ToObjectFree(param_1,uVar2); uVar7 = auVar9._8_8_; uVar2 = auVar9._0_8_; if ((auVar9._8_4_ != 6) && (iVar1 = js_get_length64(param_1,&local_58,uVar2,uVar7), -1 < iVar1)) { lVar3 = local_58; if (local_58 < 1) { lVar3 = 0; } param_5 = param_5 + 3; lVar8 = 0; while( true ) { if (lVar3 == lVar8) { JS_FreeValue(param_1,uVar5,uVar6); JS_FreeValue(param_1,uVar2,uVar7); uVar5 = string_buffer_end(local_50); return uVar5; } uVar4 = JS_GetPropertyInt64(param_1,uVar2,uVar7,lVar8); auVar10 = JS_ToStringFree(param_1,uVar4); if (auVar10._8_4_ == 6) break; string_buffer_concat_value_free(local_50,auVar10._0_8_); if (((lVar8 < local_58 + -1) && (lVar8 + 1 < (long)param_4)) && (iVar1 = string_buffer_concat_value(local_50,param_5[-1],*param_5), iVar1 != 0)) break; param_5 = param_5 + 2; lVar8 = lVar8 + 1; } } } JS_FreeValue(param_1,uVar5,uVar6); JS_FreeValue(param_1,auVar9._0_8_,auVar9._8_8_); string_buffer_free(local_50); return 0; }
39,261
init_statement_class(unsigned int)
eloqsql/storage/perfschema/pfs_instr_class.cc
int init_statement_class(uint statement_class_sizing) { int result= 0; statement_class_dirty_count= statement_class_allocated_count= 0; statement_class_max= statement_class_sizing; statement_class_lost= 0; if (statement_class_max > 0) { statement_class_array= PFS_MALLOC_ARRAY(& builtin_memory_statement_class, statement_class_max, sizeof(PFS_statement_class), PFS_statement_class, MYF(MY_ZEROFILL)); if (unlikely(statement_class_array == NULL)) return 1; } else statement_class_array= NULL; return result; }
O0
cpp
init_statement_class(unsigned int): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl %edi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movl $0x0, 0x3d08c4(%rip) # 0x40a930 movl $0x0, 0x3d08be(%rip) # 0x40a934 movl -0x8(%rbp), %eax movq %rax, 0x3d0020(%rip) # 0x40a0a0 movq $0x0, 0x3d001d(%rip) # 0x40a0a8 cmpq $0x0, 0x3d000d(%rip) # 0x40a0a0 jbe 0x3a0d9 movq 0x3d0004(%rip), %rsi # 0x40a0a0 leaq 0x3ce55d(%rip), %rdi # 0x408600 movl $0xc0, %edx movl $0x20, %ecx callq 0x29b10 movq %rax, 0x3d087f(%rip) # 0x40a938 cmpq $0x0, 0x3d0877(%rip) # 0x40a938 sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x3a0d7 movl $0x1, -0x4(%rbp) jmp 0x3a0ea jmp 0x3a0e4 movq $0x0, 0x3d0854(%rip) # 0x40a938 movl -0xc(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z20init_statement_classj: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], edi mov [rbp+var_C], 0 mov cs:_ZL31statement_class_allocated_count, 0; statement_class_allocated_count mov cs:_ZL27statement_class_dirty_count, 0; statement_class_dirty_count mov eax, [rbp+var_8] mov cs:statement_class_max, rax mov cs:statement_class_lost, 0 cmp cs:statement_class_max, 0 jbe short loc_3A0D9 mov rsi, cs:statement_class_max; unsigned __int64 lea rdi, builtin_memory_statement_class; PFS_builtin_memory_class * mov edx, 0C0h; unsigned __int64 mov ecx, 20h ; ' '; unsigned __int64 call _Z16pfs_malloc_arrayP24PFS_builtin_memory_classmmm; pfs_malloc_array(PFS_builtin_memory_class *,ulong,ulong,ulong) mov cs:_ZL21statement_class_array, rax; statement_class_array cmp cs:_ZL21statement_class_array, 0; statement_class_array setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_3A0D7 mov [rbp+var_4], 1 jmp short loc_3A0EA loc_3A0D7: jmp short loc_3A0E4 loc_3A0D9: mov cs:_ZL21statement_class_array, 0; statement_class_array loc_3A0E4: mov eax, [rbp+var_C] mov [rbp+var_4], eax loc_3A0EA: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
_BOOL8 init_statement_class(unsigned int a1) { statement_class_allocated_count = 0; statement_class_dirty_count = 0; statement_class_max = a1; statement_class_lost = 0LL; if ( !a1 ) { statement_class_array = 0LL; return 0; } statement_class_array = pfs_malloc_array( (PFS_builtin_memory_class *)&builtin_memory_statement_class, statement_class_max, 0xC0uLL); return !statement_class_array; }
init_statement_class: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x8],EDI MOV dword ptr [RBP + -0xc],0x0 MOV dword ptr [0x0050a930],0x0 MOV dword ptr [0x0050a934],0x0 MOV EAX,dword ptr [RBP + -0x8] MOV qword ptr [0x0050a0a0],RAX MOV qword ptr [0x0050a0a8],0x0 CMP qword ptr [0x0050a0a0],0x0 JBE 0x0013a0d9 MOV RSI,qword ptr [0x0050a0a0] LEA RDI,[0x508600] MOV EDX,0xc0 MOV ECX,0x20 CALL 0x00129b10 MOV qword ptr [0x0050a938],RAX CMP qword ptr [0x0050a938],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0013a0d7 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013a0ea LAB_0013a0d7: JMP 0x0013a0e4 LAB_0013a0d9: MOV qword ptr [0x0050a938],0x0 LAB_0013a0e4: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x4],EAX LAB_0013a0ea: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
/* init_statement_class(unsigned int) */ int4 init_statement_class(uint param_1) { statement_class_allocated_count = 0; statement_class_dirty_count = 0; statement_class_max = (ulong)param_1; statement_class_lost = 0; if (statement_class_max == 0) { statement_class_array = 0; } else { statement_class_array = pfs_malloc_array((PFS_builtin_memory_class *)builtin_memory_statement_class, statement_class_max,0xc0,0x20); if (statement_class_array == 0) { return 1; } } return 0; }
39,262
testing::internal::RE::~RE()
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest-port.cc
RE::~RE() { if (is_valid_) { // regfree'ing an invalid regex might crash because the content // of the regex is undefined. Since the regex's are essentially // the same, one cannot be valid (or invalid) without the other // being so too. regfree(&partial_regex_); regfree(&full_regex_); } }
O3
cpp
testing::internal::RE::~RE(): pushq %rbx movq %rdi, %rbx cmpb $0x1, 0x20(%rdi) jne 0x160da leaq 0x68(%rbx), %rdi callq 0x84c0 leaq 0x28(%rbx), %rdi callq 0x84c0 movq (%rbx), %rdi addq $0x10, %rbx cmpq %rbx, %rdi je 0x160f2 movq (%rbx), %rsi incq %rsi popq %rbx jmp 0x84e0 popq %rbx retq movq %rax, %rdi callq 0x321df
_ZN7testing8internal2RED2Ev: push rbx; Alternative name is 'testing::internal::RE::~RE()' mov rbx, rdi cmp byte ptr [rdi+20h], 1 jnz short loc_160DA lea rdi, [rbx+68h] call _regfree lea rdi, [rbx+28h] call _regfree loc_160DA: mov rdi, [rbx]; void * add rbx, 10h cmp rdi, rbx jz short loc_160F2 mov rsi, [rbx] inc rsi; unsigned __int64 pop rbx jmp __ZdlPvm; operator delete(void *,ulong) loc_160F2: pop rbx retn mov rdi, rax call __clang_call_terminate
void testing::internal::RE::~RE(testing::internal::RE *this) { _QWORD *v2; // rdi _QWORD *v3; // rbx if ( *((_BYTE *)this + 32) == 1 ) { regfree((char *)this + 104); regfree((char *)this + 40); } v2 = *(_QWORD **)this; v3 = (_QWORD *)((char *)this + 16); if ( v2 != v3 ) operator delete(v2, *v3 + 1LL); }
~RE: PUSH RBX MOV RBX,RDI CMP byte ptr [RDI + 0x20],0x1 JNZ 0x001160da LEA RDI,[RBX + 0x68] LAB_001160cc: CALL 0x001084c0 LEA RDI,[RBX + 0x28] CALL 0x001084c0 LAB_001160da: MOV RDI,qword ptr [RBX] ADD RBX,0x10 CMP RDI,RBX JZ 0x001160f2 MOV RSI,qword ptr [RBX] INC RSI POP RBX JMP 0x001084e0 LAB_001160f2: POP RBX RET
/* testing::internal::RE::~RE() */ void __thiscall testing::internal::RE::~RE(RE *this) { if (this[0x20] == (RE)0x1) { /* try { // try from 001160cc to 001160d9 has its CatchHandler @ 001160f4 */ regfree((regex_t *)(this + 0x68)); regfree((regex_t *)(this + 0x28)); } if (*(RE **)this != this + 0x10) { operator_delete(*(RE **)this,*(long *)(this + 0x10) + 1); return; } return; }
39,263
get_wval_limb
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/ec_mult.h
static limb_t get_wval_limb(const byte *d, size_t off, size_t bits) { size_t i, top = (off + bits - 1)/8; limb_t ret, mask = (limb_t)0 - 1; d += off/8; top -= off/8-1; /* this is not about constant-time-ness, but branch optimization */ for (ret=0, i=0; i<4;) { ret |= (*d & mask) << (8*i); mask = (limb_t)0 - ((++i - top) >> (8*sizeof(top)-1)); d += 1 & mask; } return ret >> (off%8); }
O0
c
get_wval_limb: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax subq $0x1, %rax shrq $0x3, %rax movq %rax, -0x28(%rbp) movq $-0x1, -0x38(%rbp) movq -0x10(%rbp), %rax shrq $0x3, %rax addq -0x8(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rcx shrq $0x3, %rcx subq $0x1, %rcx movq -0x28(%rbp), %rax subq %rcx, %rax movq %rax, -0x28(%rbp) movq $0x0, -0x30(%rbp) movq $0x0, -0x20(%rbp) cmpq $0x4, -0x20(%rbp) jae 0xbe247 movq -0x8(%rbp), %rax movzbl (%rax), %eax andq -0x38(%rbp), %rax movq -0x20(%rbp), %rcx shlq $0x3, %rcx shlq %cl, %rax orq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) subq -0x28(%rbp), %rcx shrq $0x3f, %rcx xorl %eax, %eax subq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax andq $0x1, %rax addq -0x8(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xbe1f3 movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx andq $0x7, %rcx shrq %cl, %rax popq %rbp retq nopl (%rax,%rax)
get_wval_limb: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] add rax, [rbp+var_18] sub rax, 1 shr rax, 3 mov [rbp+var_28], rax mov [rbp+var_38], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_10] shr rax, 3 add rax, [rbp+var_8] mov [rbp+var_8], rax mov rcx, [rbp+var_10] shr rcx, 3 sub rcx, 1 mov rax, [rbp+var_28] sub rax, rcx mov [rbp+var_28], rax mov [rbp+var_30], 0 mov [rbp+var_20], 0 loc_BE1F3: cmp [rbp+var_20], 4 jnb short loc_BE247 mov rax, [rbp+var_8] movzx eax, byte ptr [rax] and rax, [rbp+var_38] mov rcx, [rbp+var_20] shl rcx, 3 shl rax, cl or rax, [rbp+var_30] mov [rbp+var_30], rax mov rcx, [rbp+var_20] add rcx, 1 mov [rbp+var_20], rcx sub rcx, [rbp+var_28] shr rcx, 3Fh xor eax, eax sub rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_38] and rax, 1 add rax, [rbp+var_8] mov [rbp+var_8], rax jmp short loc_BE1F3 loc_BE247: mov rax, [rbp+var_30] mov rcx, [rbp+var_10] and rcx, 7 shr rax, cl pop rbp retn
unsigned long long get_wval_limb(long long a1, unsigned long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-38h] unsigned long long v5; // [rsp+8h] [rbp-30h] unsigned long long v6; // [rsp+10h] [rbp-28h] unsigned long long i; // [rsp+18h] [rbp-20h] _BYTE *v8; // [rsp+30h] [rbp-8h] LOBYTE(v4) = -1; v8 = (_BYTE *)(a1 + (a2 >> 3)); v6 = ((a3 + a2 - 1) >> 3) - ((a2 >> 3) - 1); v5 = 0LL; for ( i = 0LL; i < 4; v8 += (long long)(i - v6) < 0 ) { v5 |= (unsigned long long)(unsigned __int8)(v4 & *v8) << (8 * (unsigned __int8)i++); v4 = -(long long)((i - v6) >> 63); } return v5 >> (a2 & 7); }
get_wval_limb: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] SUB RAX,0x1 SHR RAX,0x3 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x38],-0x1 MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0x3 ADD RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x8],RAX MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0x3 SUB RCX,0x1 MOV RAX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x30],0x0 MOV qword ptr [RBP + -0x20],0x0 LAB_001be1f3: CMP qword ptr [RBP + -0x20],0x4 JNC 0x001be247 MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX] AND RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x20] SHL RCX,0x3 SHL RAX,CL OR RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RCX,qword ptr [RBP + -0x20] ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX SUB RCX,qword ptr [RBP + -0x28] SHR RCX,0x3f XOR EAX,EAX SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] AND RAX,0x1 ADD RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x8],RAX JMP 0x001be1f3 LAB_001be247: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] AND RCX,0x7 SHR RAX,CL POP RBP RET
ulong get_wval_limb(long param_1,ulong param_2,long param_3) { ulong local_40; ulong local_38; ulong local_28; byte *local_10; local_40 = 0xffffffffffffffff; local_10 = (byte *)((param_2 >> 3) + param_1); local_38 = 0; local_28 = 0; while (local_28 < 4) { local_38 = (*local_10 & local_40) << ((byte)(local_28 << 3) & 0x3f) | local_38; local_28 = local_28 + 1; local_40 = (long)(local_28 - (((param_2 + param_3) - 1 >> 3) - ((param_2 >> 3) - 1))) >> 0x3f; local_10 = local_10 + (local_40 & 1); } return local_38 >> ((byte)param_2 & 7); }
39,264
ma_kpos
eloqsql/storage/maria/ma_search.c
my_off_t _ma_kpos(uint nod_flag, const uchar *after_key) { after_key-=nod_flag; switch (nod_flag) { #if SIZEOF_OFF_T > 4 case 7: return mi_uint7korr(after_key)*maria_block_size; case 6: return mi_uint6korr(after_key)*maria_block_size; case 5: return mi_uint5korr(after_key)*maria_block_size; #else case 7: after_key++; case 6: after_key++; case 5: after_key++; #endif case 4: return ((my_off_t) mi_uint4korr(after_key))*maria_block_size; case 3: return ((my_off_t) mi_uint3korr(after_key))*maria_block_size; case 2: return (my_off_t) (mi_uint2korr(after_key)*maria_block_size); case 1: return (uint) (*after_key)*maria_block_size; case 0: /* At leaf page */ default: /* Impossible */ return(HA_OFFSET_ERROR); } }
O0
c
ma_kpos: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0xc(%rbp) movq %rsi, -0x18(%rbp) movl -0xc(%rbp), %eax movl %eax, %ecx movq -0x18(%rbp), %rax subq %rcx, %rax movq %rax, -0x18(%rbp) movl -0xc(%rbp), %eax movq %rax, -0x20(%rbp) subq $0x7, %rax ja 0x7560d movq -0x20(%rbp), %rax leaq 0xb0a79(%rip), %rcx # 0x125f64 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x18(%rbp), %rdi callq 0x75620 leaq 0x2124cc(%rip), %rcx # 0x2879d0 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x75615 movq -0x18(%rbp), %rdi callq 0x75680 leaq 0x2124af(%rip), %rcx # 0x2879d0 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x75615 movq -0x18(%rbp), %rdi callq 0x756d0 leaq 0x212492(%rip), %rcx # 0x2879d0 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x75615 movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx shll $0x18, %ecx orl %ecx, %eax movl %eax, %eax leaq 0x21244e(%rip), %rcx # 0x2879d0 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x75615 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax movq -0x18(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax leaq 0x212417(%rip), %rcx # 0x2879d0 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x75615 movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax leaq 0x2123e9(%rip), %rcx # 0x2879d0 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x75615 movq -0x18(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax leaq 0x2123cf(%rip), %rcx # 0x2879d0 imulq (%rcx), %rax movq %rax, -0x8(%rbp) jmp 0x75615 jmp 0x7560d movq $-0x1, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
_ma_kpos: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], edi mov [rbp+var_18], rsi mov eax, [rbp+var_C] mov ecx, eax mov rax, [rbp+var_18] sub rax, rcx mov [rbp+var_18], rax mov eax, [rbp+var_C] mov [rbp+var_20], rax sub rax, 7; switch 8 cases ja def_754F2; jumptable 00000000000754F2 default case mov rax, [rbp+var_20] lea rcx, jpt_754F2 movsxd rax, ds:(jpt_754F2 - 125F64h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_754F4: mov rdi, [rbp+var_18]; jumptable 00000000000754F2 case 7 call mi_uint7korr lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp loc_75615 loc_75511: mov rdi, [rbp+var_18]; jumptable 00000000000754F2 case 6 call mi_uint6korr lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp loc_75615 loc_7552E: mov rdi, [rbp+var_18]; jumptable 00000000000754F2 case 5 call mi_uint5korr lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp loc_75615 loc_7554B: mov rax, [rbp+var_18]; jumptable 00000000000754F2 case 4 movzx eax, byte ptr [rax+3] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+2] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 10h or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] shl ecx, 18h or eax, ecx mov eax, eax lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp loc_75615 loc_7558F: mov rax, [rbp+var_18]; jumptable 00000000000754F2 case 3 movzx eax, byte ptr [rax+2] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] shl ecx, 10h or eax, ecx mov eax, eax lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp short loc_75615 loc_755C3: mov rax, [rbp+var_18]; jumptable 00000000000754F2 case 2 movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp short loc_75615 loc_755F1: mov rax, [rbp+var_18]; jumptable 00000000000754F2 case 1 movzx eax, byte ptr [rax] mov eax, eax lea rcx, maria_block_size imul rax, [rcx] mov [rbp+var_8], rax jmp short loc_75615 loc_7560B: jmp short $+2; jumptable 00000000000754F2 case 0 def_754F2: mov [rbp+var_8], 0FFFFFFFFFFFFFFFFh; jumptable 00000000000754F2 default case loc_75615: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long ma_kpos(unsigned int a1, long long a2) { unsigned __int8 *v3; // [rsp+8h] [rbp-18h] long long v4; // [rsp+18h] [rbp-8h] v3 = (unsigned __int8 *)(a2 - a1); switch ( a1 ) { case 1u: v4 = *(_QWORD *)&maria_block_size * *v3; break; case 2u: v4 = *(_QWORD *)&maria_block_size * _byteswap_ushort(*(_WORD *)v3); break; case 3u: v4 = *(_QWORD *)&maria_block_size * ((*v3 << 16) | (v3[1] << 8) | (unsigned int)v3[2]); break; case 4u: v4 = *(_QWORD *)&maria_block_size * _byteswap_ulong(*(_DWORD *)v3); break; case 5u: v4 = *(_QWORD *)&maria_block_size * mi_uint5korr(v3); break; case 6u: v4 = *(_QWORD *)&maria_block_size * mi_uint6korr(v3); break; case 7u: v4 = *(_QWORD *)&maria_block_size * mi_uint7korr(v3); break; default: v4 = -1LL; break; } return v4; }
_ma_kpos: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],EDI MOV qword ptr [RBP + -0x18],RSI MOV EAX,dword ptr [RBP + -0xc] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x20],RAX SUB RAX,0x7 JA 0x0017560d MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x225f64] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_7: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00175620 LEA RCX,[0x3879d0] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00175615 caseD_6: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00175680 LEA RCX,[0x3879d0] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00175615 caseD_5: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001756d0 LEA RCX,[0x3879d0] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00175615 caseD_4: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x10 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x18 OR EAX,ECX MOV EAX,EAX LEA RCX,[0x3879d0] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00175615 caseD_3: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX LEA RCX,[0x3879d0] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00175615 caseD_2: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX LEA RCX,[0x3879d0] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00175615 caseD_1: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX LEA RCX,[0x3879d0] IMUL RAX,qword ptr [RCX] MOV qword ptr [RBP + -0x8],RAX JMP 0x00175615 caseD_0: JMP 0x0017560d default: MOV qword ptr [RBP + -0x8],-0x1 LAB_00175615: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long _ma_kpos(uint param_1,long param_2) { byte *pbVar1; long local_10; pbVar1 = (byte *)(param_2 - (ulong)param_1); switch(param_1) { case 0: default: local_10 = -1; break; case 1: local_10 = (ulong)*pbVar1 * maria_block_size; break; case 2: local_10 = (ulong)CONCAT11(*pbVar1,pbVar1[1]) * maria_block_size; break; case 3: local_10 = (ulong)CONCAT12(*pbVar1,CONCAT11(pbVar1[1],pbVar1[2])) * maria_block_size; break; case 4: local_10 = (ulong)CONCAT13(*pbVar1,CONCAT12(pbVar1[1],CONCAT11(pbVar1[2],pbVar1[3]))) * maria_block_size; break; case 5: local_10 = mi_uint5korr(pbVar1); local_10 = local_10 * maria_block_size; break; case 6: local_10 = mi_uint6korr(pbVar1); local_10 = local_10 * maria_block_size; break; case 7: local_10 = mi_uint7korr(pbVar1); local_10 = local_10 * maria_block_size; } return local_10; }
39,265
codegen_generate_if_expr
tsotchke[P]eshkol/src/backend/codegen/conditionals.c
char* codegen_generate_if_expr(CodegenContext* context, const AstNode* node) { assert(context != NULL); assert(node != NULL); assert(node->type == AST_IF); Arena* arena = codegen_context_get_arena(context); TypeInferenceContext* type_context = codegen_context_get_type_context(context); // Generate condition char* condition = codegen_generate_expression_str(context, node->as.if_expr.condition); if (!condition) return NULL; // Generate then branch char* then_branch = codegen_generate_expression_str(context, node->as.if_expr.then_branch); if (!then_branch) return NULL; // Generate else branch char* else_branch = NULL; if (node->as.if_expr.else_branch) { else_branch = codegen_generate_expression_str(context, node->as.if_expr.else_branch); if (!else_branch) return NULL; } else { else_branch = "0"; // Default to 0 for no else branch } // Get the types of the branches Type* then_type = type_inference_get_type(type_context, node->as.if_expr.then_branch); Type* else_type = node->as.if_expr.else_branch ? type_inference_get_type(type_context, node->as.if_expr.else_branch) : type_void_create(arena); // Check if we have mixed types (e.g., number and string) if (then_type && else_type && then_type->kind != else_type->kind && then_type->kind != TYPE_VOID && else_type->kind != TYPE_VOID) { // Special case for mixed numeric types (integer and float) if ((then_type->kind == TYPE_INTEGER && else_type->kind == TYPE_FLOAT) || (then_type->kind == TYPE_FLOAT && else_type->kind == TYPE_INTEGER)) { // Promote to float - this is handled automatically by the ternary operator char* result = arena_alloc(arena, strlen(condition) + strlen(then_branch) + strlen(else_branch) + 50); sprintf(result, "(%s ? %s : %s)", condition, then_branch, else_branch); return result; } // Special case for string and numeric types if ((then_type->kind == TYPE_STRING && (else_type->kind == TYPE_INTEGER || else_type->kind == TYPE_FLOAT)) || (else_type->kind == TYPE_STRING && (then_type->kind == TYPE_INTEGER || then_type->kind == TYPE_FLOAT))) { // For scientific computing, we need to be careful with mixed types // We'll use void* as a generic return type // Convert both branches to void* char* then_converted = codegen_type_apply_conversion(context, then_branch, then_type, type_any_create(arena)); char* else_converted = codegen_type_apply_conversion(context, else_branch, else_type, type_any_create(arena)); // Generate the if expression with converted branches char* result = arena_alloc(arena, strlen(condition) + strlen(then_converted) + strlen(else_converted) + 50); sprintf(result, "(%s ? %s : %s)", condition, then_converted, else_converted); return result; } } // Generate the if expression char* result = arena_alloc(arena, strlen(condition) + strlen(then_branch) + strlen(else_branch) + 50); sprintf(result, "(%s ? %s : %s)", condition, then_branch, else_branch); return result; }
O2
c
codegen_generate_if_expr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp testq %rdi, %rdi je 0x11ddb movq %rsi, %r15 testq %rsi, %rsi je 0x11dfa cmpl $0x9, (%r15) jne 0x11e19 movq %rdi, %r13 callq 0xa55e movq %rax, %rbp movq %r13, %rdi callq 0xa5ad movq %rax, %r14 movq 0x48(%r15), %rsi movq %r13, %rdi callq 0xfa52 testq %rax, %rax je 0x11c3f movq %rax, %rbx movq 0x50(%r15), %rsi movq %r13, %rdi callq 0xfa52 testq %rax, %rax je 0x11c3f movq %rax, %r12 movq 0x58(%r15), %rsi testq %rsi, %rsi je 0x11c47 movq %r13, %rdi callq 0xfa52 testq %rax, %rax jne 0x11c4e xorl %r14d, %r14d jmp 0x11d0b leaq 0x7c99(%rip), %rax # 0x198e7 movq %rax, 0x10(%rsp) movq %rbp, 0x8(%rsp) movq 0x50(%r15), %rsi movq %r14, %rdi callq 0x807c movq %rax, %rbp movq 0x58(%r15), %rsi testq %rsi, %rsi je 0x11c7a movq %r14, %rdi callq 0x807c jmp 0x11c84 movq 0x8(%rsp), %rdi callq 0x15510 movq %rax, %r15 testq %rbp, %rbp setne %al testq %r15, %r15 setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x11cb6 movl (%r15), %eax testl %eax, %eax je 0x11cb6 movl (%rbp), %ecx testl %ecx, %ecx je 0x11cb6 cmpl %eax, %ecx je 0x11cb6 cmpl $0x2, %ecx jne 0x11d1d cmpl $0x3, %eax jne 0x11d1d movq %rbx, %rdi callq 0x2100 movq %rax, %r14 movq %r12, %rdi callq 0x2100 movq %rax, %r15 movq 0x10(%rsp), %r13 movq %r13, %rdi callq 0x2100 addq %r14, %r15 leaq (%rax,%r15), %rsi addq $0x32, %rsi movq 0x8(%rsp), %rdi callq 0x2fb9 movq %rax, %r14 leaq 0xcc84(%rip), %rsi # 0x1e97c movq %rax, %rdi movq %rbx, %rdx movq %r12, %rcx movq %r13, %r8 xorl %eax, %eax callq 0x22b0 movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x5, %ecx je 0x11d31 cmpl $0x3, %ecx jne 0x11d3b cmpl $0x5, %eax je 0x11d50 cmpl $0x2, %eax jmp 0x11cb6 movl %eax, %edx andl $-0x2, %edx cmpl $0x2, %edx je 0x11d50 cmpl $0x5, %eax jne 0x11cb6 andl $-0x2, %ecx cmpl $0x2, %ecx jne 0x11cb6 movq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x157f7 movq %r13, %rdi movq %r12, %rsi movq %rbp, %rdx movq %rax, %rcx callq 0x1369c movq %rax, %r12 movq %r14, %rdi callq 0x157f7 movq %r13, %rdi movq 0x10(%rsp), %rsi movq %r15, %rdx movq %rax, %rcx callq 0x1369c movq %rax, %r15 movq %rbx, %rdi callq 0x2100 movq %rax, %rbp movq %r12, %rdi callq 0x2100 movq %rax, %r13 movq %r15, %rdi callq 0x2100 addq %rbp, %r13 leaq (%rax,%r13), %rsi addq $0x32, %rsi movq %r14, %rdi callq 0x2fb9 movq %rax, %r14 leaq 0xcbb2(%rip), %rsi # 0x1e97c movq %rax, %rdi movq %rbx, %rdx movq %r12, %rcx movq %r15, %r8 jmp 0x11d04 leaq 0x5f7d(%rip), %rdi # 0x17d5f leaq 0xc9c0(%rip), %rsi # 0x1e7a9 leaq 0xcb4a(%rip), %rcx # 0x1e93a movl $0xc4, %edx callq 0x2180 leaq 0x7ace(%rip), %rdi # 0x198cf leaq 0xc9a1(%rip), %rsi # 0x1e7a9 leaq 0xcb2b(%rip), %rcx # 0x1e93a movl $0xc5, %edx callq 0x2180 leaq 0xca23(%rip), %rdi # 0x1e843 leaq 0xc982(%rip), %rsi # 0x1e7a9 leaq 0xcb0c(%rip), %rcx # 0x1e93a movl $0xc6, %edx callq 0x2180
codegen_generate_if_expr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h test rdi, rdi jz loc_11DDB mov r15, rsi test rsi, rsi jz loc_11DFA cmp dword ptr [r15], 9 jnz loc_11E19 mov r13, rdi call codegen_context_get_arena mov rbp, rax mov rdi, r13 call codegen_context_get_type_context mov r14, rax mov rsi, [r15+48h] mov rdi, r13 call codegen_generate_expression_str test rax, rax jz short loc_11C3F mov rbx, rax mov rsi, [r15+50h] mov rdi, r13 call codegen_generate_expression_str test rax, rax jz short loc_11C3F mov r12, rax mov rsi, [r15+58h] test rsi, rsi jz short loc_11C47 mov rdi, r13 call codegen_generate_expression_str test rax, rax jnz short loc_11C4E loc_11C3F: xor r14d, r14d jmp loc_11D0B loc_11C47: lea rax, aBindId0+0Bh; "0" loc_11C4E: mov [rsp+48h+var_38], rax mov [rsp+48h+var_40], rbp mov rsi, [r15+50h] mov rdi, r14 call type_inference_get_type mov rbp, rax mov rsi, [r15+58h] test rsi, rsi jz short loc_11C7A mov rdi, r14 call type_inference_get_type jmp short loc_11C84 loc_11C7A: mov rdi, [rsp+48h+var_40] call type_void_create loc_11C84: mov r15, rax test rbp, rbp setnz al test r15, r15 setnz cl and cl, al cmp cl, 1 jnz short loc_11CB6 mov eax, [r15] test eax, eax jz short loc_11CB6 mov ecx, [rbp+0] test ecx, ecx jz short loc_11CB6 cmp ecx, eax jz short loc_11CB6 cmp ecx, 2 jnz short loc_11D1D cmp eax, 3 jnz short loc_11D1D loc_11CB6: mov rdi, rbx call _strlen mov r14, rax mov rdi, r12 call _strlen mov r15, rax mov r13, [rsp+48h+var_38] mov rdi, r13 call _strlen add r15, r14 lea rsi, [rax+r15] add rsi, 32h ; '2' mov rdi, [rsp+48h+var_40] call arena_alloc mov r14, rax lea rsi, aSSS_0; "(%s ? %s : %s)" mov rdi, rax mov rdx, rbx mov rcx, r12 mov r8, r13 loc_11D04: xor eax, eax call _sprintf loc_11D0B: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_11D1D: cmp ecx, 5 jz short loc_11D31 cmp ecx, 3 jnz short loc_11D3B cmp eax, 5 jz short loc_11D50 cmp eax, 2 jmp short loc_11CB6 loc_11D31: mov edx, eax and edx, 0FFFFFFFEh cmp edx, 2 jz short loc_11D50 loc_11D3B: cmp eax, 5 jnz loc_11CB6 and ecx, 0FFFFFFFEh cmp ecx, 2 jnz loc_11CB6 loc_11D50: mov r14, [rsp+48h+var_40] mov rdi, r14 call type_any_create mov rdi, r13 mov rsi, r12 mov rdx, rbp mov rcx, rax call codegen_type_apply_conversion mov r12, rax mov rdi, r14 call type_any_create mov rdi, r13 mov rsi, [rsp+48h+var_38] mov rdx, r15 mov rcx, rax call codegen_type_apply_conversion mov r15, rax mov rdi, rbx call _strlen mov rbp, rax mov rdi, r12 call _strlen mov r13, rax mov rdi, r15 call _strlen add r13, rbp lea rsi, [rax+r13] add rsi, 32h ; '2' mov rdi, r14 call arena_alloc mov r14, rax lea rsi, aSSS_0; "(%s ? %s : %s)" mov rdi, rax mov rdx, rbx mov rcx, r12 mov r8, r15 jmp loc_11D04 loc_11DDB: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCharCodegenGen_0; "char *codegen_generate_if_expr(CodegenC"... mov edx, 0C4h call ___assert_fail loc_11DFA: lea rdi, aNodeNull; "node != NULL" lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCharCodegenGen_0; "char *codegen_generate_if_expr(CodegenC"... mov edx, 0C5h call ___assert_fail loc_11E19: lea rdi, aNodeTypeAstIf; "node->type == AST_IF" lea rsi, aWorkspaceLlm4b_19; "/workspace/llm4binary/github/2025_star3"... lea rcx, aCharCodegenGen_0; "char *codegen_generate_if_expr(CodegenC"... mov edx, 0C6h call ___assert_fail
long long codegen_generate_if_expr(long long a1, long long a2) { long long arena; // rbp _QWORD *type_context; // r14 long long expression_str; // rax long long v6; // rbx long long v7; // rax long long v8; // r12 _DWORD *v9; // rsi char *v10; // rax long long v11; // r14 int *type; // rbp long long v13; // rsi _DWORD *v14; // rax _DWORD *v15; // r15 int v16; // eax int v17; // ecx long long v18; // r14 long long v19; // r15 long long v20; // rax long long v21; // rdi long long v22; // rdx long long v23; // rcx long long v24; // r8 long long v26; // rax long long v27; // r12 long long v28; // rax long long v29; // r15 long long v30; // rbp long long v31; // r13 long long v32; // rax long long v33; // [rsp+8h] [rbp-40h] char *v34; // [rsp+10h] [rbp-38h] if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/conditionals.c", 196LL, "char *codegen_generate_if_expr(CodegenContext *, const AstNode *)"); if ( !a2 ) __assert_fail( "node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/conditionals.c", 197LL, "char *codegen_generate_if_expr(CodegenContext *, const AstNode *)"); if ( *(_DWORD *)a2 != 9 ) __assert_fail( "node->type == AST_IF", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/conditionals.c", 198LL, "char *codegen_generate_if_expr(CodegenContext *, const AstNode *)"); arena = codegen_context_get_arena(a1); type_context = (_QWORD *)codegen_context_get_type_context(a1); expression_str = codegen_generate_expression_str(a1, *(_DWORD **)(a2 + 72)); if ( !expression_str ) return 0LL; v6 = expression_str; v7 = codegen_generate_expression_str(a1, *(_DWORD **)(a2 + 80)); if ( !v7 ) return 0LL; v8 = v7; v9 = *(_DWORD **)(a2 + 88); if ( !v9 ) { v10 = "0"; LABEL_10: v34 = v10; v33 = arena; type = (int *)type_inference_get_type(type_context, *(_QWORD *)(a2 + 80)); v13 = *(_QWORD *)(a2 + 88); if ( v13 ) v14 = (_DWORD *)type_inference_get_type(type_context, v13); else v14 = (_DWORD *)type_void_create(v33); v15 = v14; if ( type == 0LL || v14 == 0LL ) goto LABEL_19; v16 = *v14; if ( !*v15 ) goto LABEL_19; v17 = *type; if ( !*type || v17 == v16 || v17 == 2 && v16 == 3 ) goto LABEL_19; if ( v17 == 5 ) { if ( (v16 & 0xFFFFFFFE) == 2 ) goto LABEL_29; } else if ( v17 == 3 ) { if ( v16 != 5 ) { LABEL_19: v18 = strlen(v6); v19 = strlen(v8); v20 = strlen(v34); v11 = arena_alloc(v33, v20 + v18 + v19 + 50); v21 = v11; v22 = v6; v23 = v8; v24 = (long long)v34; LABEL_20: sprintf(v21, "(%s ? %s : %s)", v22, v23, v24); return v11; } LABEL_29: v26 = type_any_create(v33); v27 = codegen_type_apply_conversion(a1, v8, type, v26); v28 = type_any_create(v33); v29 = codegen_type_apply_conversion(a1, v34, v15, v28); v30 = strlen(v6); v31 = strlen(v27); v32 = strlen(v29); v11 = arena_alloc(v33, v32 + v30 + v31 + 50); v21 = v11; v22 = v6; v23 = v27; v24 = v29; goto LABEL_20; } if ( v16 != 5 || (v17 & 0xFFFFFFFE) != 2 ) goto LABEL_19; goto LABEL_29; } v10 = (char *)codegen_generate_expression_str(a1, v9); if ( v10 ) goto LABEL_10; return 0LL; }
codegen_generate_if_expr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 TEST RDI,RDI JZ 0x00111ddb MOV R15,RSI TEST RSI,RSI JZ 0x00111dfa CMP dword ptr [R15],0x9 JNZ 0x00111e19 MOV R13,RDI CALL 0x0010a55e MOV RBP,RAX MOV RDI,R13 CALL 0x0010a5ad MOV R14,RAX MOV RSI,qword ptr [R15 + 0x48] MOV RDI,R13 CALL 0x0010fa52 TEST RAX,RAX JZ 0x00111c3f MOV RBX,RAX MOV RSI,qword ptr [R15 + 0x50] MOV RDI,R13 CALL 0x0010fa52 TEST RAX,RAX JZ 0x00111c3f MOV R12,RAX MOV RSI,qword ptr [R15 + 0x58] TEST RSI,RSI JZ 0x00111c47 MOV RDI,R13 CALL 0x0010fa52 TEST RAX,RAX JNZ 0x00111c4e LAB_00111c3f: XOR R14D,R14D JMP 0x00111d0b LAB_00111c47: LEA RAX,[0x1198e7] LAB_00111c4e: MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x8],RBP MOV RSI,qword ptr [R15 + 0x50] MOV RDI,R14 CALL 0x0010807c MOV RBP,RAX MOV RSI,qword ptr [R15 + 0x58] TEST RSI,RSI JZ 0x00111c7a MOV RDI,R14 CALL 0x0010807c JMP 0x00111c84 LAB_00111c7a: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00115510 LAB_00111c84: MOV R15,RAX TEST RBP,RBP SETNZ AL TEST R15,R15 SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x00111cb6 MOV EAX,dword ptr [R15] TEST EAX,EAX JZ 0x00111cb6 MOV ECX,dword ptr [RBP] TEST ECX,ECX JZ 0x00111cb6 CMP ECX,EAX JZ 0x00111cb6 CMP ECX,0x2 JNZ 0x00111d1d CMP EAX,0x3 JNZ 0x00111d1d LAB_00111cb6: MOV RDI,RBX CALL 0x00102100 MOV R14,RAX MOV RDI,R12 CALL 0x00102100 MOV R15,RAX MOV R13,qword ptr [RSP + 0x10] MOV RDI,R13 CALL 0x00102100 ADD R15,R14 LEA RSI,[RAX + R15*0x1] ADD RSI,0x32 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00102fb9 MOV R14,RAX LEA RSI,[0x11e97c] MOV RDI,RAX MOV RDX,RBX MOV RCX,R12 MOV R8,R13 LAB_00111d04: XOR EAX,EAX CALL 0x001022b0 LAB_00111d0b: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00111d1d: CMP ECX,0x5 JZ 0x00111d31 CMP ECX,0x3 JNZ 0x00111d3b CMP EAX,0x5 JZ 0x00111d50 CMP EAX,0x2 JMP 0x00111cb6 LAB_00111d31: MOV EDX,EAX AND EDX,0xfffffffe CMP EDX,0x2 JZ 0x00111d50 LAB_00111d3b: CMP EAX,0x5 JNZ 0x00111cb6 AND ECX,0xfffffffe CMP ECX,0x2 JNZ 0x00111cb6 LAB_00111d50: MOV R14,qword ptr [RSP + 0x8] MOV RDI,R14 CALL 0x001157f7 MOV RDI,R13 MOV RSI,R12 MOV RDX,RBP MOV RCX,RAX CALL 0x0011369c MOV R12,RAX MOV RDI,R14 CALL 0x001157f7 MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,R15 MOV RCX,RAX CALL 0x0011369c MOV R15,RAX MOV RDI,RBX CALL 0x00102100 MOV RBP,RAX MOV RDI,R12 CALL 0x00102100 MOV R13,RAX MOV RDI,R15 CALL 0x00102100 ADD R13,RBP LEA RSI,[RAX + R13*0x1] ADD RSI,0x32 MOV RDI,R14 CALL 0x00102fb9 MOV R14,RAX LEA RSI,[0x11e97c] MOV RDI,RAX MOV RDX,RBX MOV RCX,R12 MOV R8,R15 JMP 0x00111d04 LAB_00111ddb: LEA RDI,[0x117d5f] LEA RSI,[0x11e7a9] LEA RCX,[0x11e93a] MOV EDX,0xc4 CALL 0x00102180 LAB_00111dfa: LEA RDI,[0x1198cf] LEA RSI,[0x11e7a9] LEA RCX,[0x11e93a] MOV EDX,0xc5 CALL 0x00102180 LAB_00111e19: LEA RDI,[0x11e843] LEA RSI,[0x11e7a9] LEA RCX,[0x11e93a] MOV EDX,0xc6 CALL 0x00102180
char * codegen_generate_if_expr(long param_1,int *param_2) { uint uVar1; uint uVar2; int8 uVar3; int8 uVar4; char *__s; char *__s_00; char *__s_01; uint *puVar5; uint *puVar6; size_t sVar7; size_t sVar8; size_t sVar9; char *__s_02; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/conditionals.c" ,0xc4,"char *codegen_generate_if_expr(CodegenContext *, const AstNode *)"); } if (param_2 == (int *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("node != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/conditionals.c" ,0xc5,"char *codegen_generate_if_expr(CodegenContext *, const AstNode *)"); } if (*param_2 != 9) { /* WARNING: Subroutine does not return */ __assert_fail("node->type == AST_IF", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/backend/codegen/conditionals.c" ,0xc6,"char *codegen_generate_if_expr(CodegenContext *, const AstNode *)"); } uVar3 = codegen_context_get_arena(); uVar4 = codegen_context_get_type_context(param_1); __s = (char *)codegen_generate_expression_str(param_1,*(int8 *)(param_2 + 0x12)); if ((__s == (char *)0x0) || (__s_00 = (char *)codegen_generate_expression_str(param_1,*(int8 *)(param_2 + 0x14)), __s_00 == (char *)0x0)) { return (char *)0x0; } if (*(long *)(param_2 + 0x16) == 0) { __s_01 = "0"; } else { __s_01 = (char *)codegen_generate_expression_str(param_1); if (__s_01 == (char *)0x0) { return (char *)0x0; } } puVar5 = (uint *)type_inference_get_type(uVar4,*(int8 *)(param_2 + 0x14)); if (*(long *)(param_2 + 0x16) == 0) { puVar6 = (uint *)type_void_create(uVar3); } else { puVar6 = (uint *)type_inference_get_type(uVar4); } if (((((puVar6 == (uint *)0x0 || puVar5 == (uint *)0x0) || (uVar1 = *puVar6, uVar1 == 0)) || (uVar2 = *puVar5, uVar2 == 0)) || (uVar2 == uVar1)) || ((uVar2 == 2 && (uVar1 == 3)))) { LAB_00111cb6: sVar7 = strlen(__s); sVar8 = strlen(__s_00); sVar9 = strlen(__s_01); __s_02 = (char *)arena_alloc(uVar3,sVar9 + sVar8 + sVar7 + 0x32); } else { if (uVar2 == 5) { if ((uVar1 & 0xfffffffe) != 2) { LAB_00111d3b: if ((uVar1 != 5) || ((uVar2 & 0xfffffffe) != 2)) goto LAB_00111cb6; } } else { if (uVar2 != 3) goto LAB_00111d3b; if (uVar1 != 5) goto LAB_00111cb6; } uVar4 = type_any_create(uVar3); __s_00 = (char *)codegen_type_apply_conversion(param_1,__s_00,puVar5,uVar4); uVar4 = type_any_create(uVar3); __s_01 = (char *)codegen_type_apply_conversion(param_1,__s_01,puVar6,uVar4); sVar7 = strlen(__s); sVar8 = strlen(__s_00); sVar9 = strlen(__s_01); __s_02 = (char *)arena_alloc(uVar3,sVar9 + sVar8 + sVar7 + 0x32); } sprintf(__s_02,"(%s ? %s : %s)",__s,__s_00,__s_01); return __s_02; }
39,266
ma_writeinfo
eloqsql/storage/maria/ma_locking.c
int _ma_writeinfo(register MARIA_HA *info, uint operation) { int error,olderror; MARIA_SHARE *share= info->s; DBUG_ENTER("_ma_writeinfo"); DBUG_PRINT("info",("operation: %u tot_locks: %u", operation, share->tot_locks)); error=0; if (share->tot_locks == 0 && !share->base.born_transactional) { /* transactional tables flush their state at Checkpoint */ if (operation) { /* Two threads can't be here */ CRASH_IF_S3_TABLE(info->s); /* S3 readonly doesn't come here */ olderror= my_errno; /* Remember last error */ #ifdef MARIA_EXTERNAL_LOCKING /* The following only makes sense if we want to be allow two different processes access the same table at the same time */ share->state.process= share->last_process= share->this_process; share->state.unique= info->last_unique= info->this_unique; share->state.update_count= info->last_loop= ++info->this_loop; #endif if ((error= _ma_state_info_write_sub(share->kfile.file, &share->state, MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET))) olderror=my_errno; #ifdef _WIN32 if (maria_flush) { _commit(share->kfile.file); _commit(info->dfile.file); } #endif my_errno=olderror; } } else if (operation) share->changed= 1; /* Mark keyfile changed */ DBUG_RETURN(error); }
O0
c
ma_writeinfo: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x4713c movl $0x0, -0x10(%rbp) movq -0x20(%rbp), %rax cmpl $0x0, 0x7b8(%rax) jne 0x471ad movq -0x20(%rbp), %rax cmpb $0x0, 0x44c(%rax) jne 0x471ad cmpl $0x0, -0xc(%rbp) je 0x471ab jmp 0x47165 jmp 0x47167 callq 0xfc1b0 movl (%rax), %eax movl %eax, -0x14(%rbp) movq -0x20(%rbp), %rax movl 0x760(%rax), %edi movq -0x20(%rbp), %rsi movl $0x1, %edx callq 0x8fb60 movl %eax, -0x10(%rbp) cmpl $0x0, %eax je 0x4719b callq 0xfc1b0 movl (%rax), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x24(%rbp) callq 0xfc1b0 movl -0x24(%rbp), %ecx movl %ecx, (%rax) jmp 0x471c0 cmpl $0x0, -0xc(%rbp) je 0x471be movq -0x20(%rbp), %rax movb $0x1, 0x7de(%rax) jmp 0x471c0 jmp 0x471c2 movl -0x10(%rbp), %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_writeinfo: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_20], rax jmp short $+2 loc_4713C: mov [rbp+var_10], 0 mov rax, [rbp+var_20] cmp dword ptr [rax+7B8h], 0 jnz short loc_471AD mov rax, [rbp+var_20] cmp byte ptr [rax+44Ch], 0 jnz short loc_471AD cmp [rbp+var_C], 0 jz short loc_471AB jmp short $+2 loc_47165: jmp short $+2 loc_47167: call _my_thread_var mov eax, [rax] mov [rbp+var_14], eax mov rax, [rbp+var_20] mov edi, [rax+760h] mov rsi, [rbp+var_20] mov edx, 1 call _ma_state_info_write_sub mov [rbp+var_10], eax cmp eax, 0 jz short loc_4719B call _my_thread_var mov eax, [rax] mov [rbp+var_14], eax loc_4719B: mov eax, [rbp+var_14] mov [rbp+var_24], eax call _my_thread_var mov ecx, [rbp+var_24] mov [rax], ecx loc_471AB: jmp short loc_471C0 loc_471AD: cmp [rbp+var_C], 0 jz short loc_471BE mov rax, [rbp+var_20] mov byte ptr [rax+7DEh], 1 loc_471BE: jmp short $+2 loc_471C0: jmp short $+2 loc_471C2: mov eax, [rbp+var_10] mov [rbp+var_28], eax mov eax, [rbp+var_28] add rsp, 30h pop rbp retn
long long ma_writeinfo(long long *a1, int a2) { long long v3; // [rsp+10h] [rbp-20h] int v4; // [rsp+1Ch] [rbp-14h] unsigned int v5; // [rsp+20h] [rbp-10h] v3 = *a1; v5 = 0; if ( *(_DWORD *)(*a1 + 1976) || *(_BYTE *)(v3 + 1100) ) { if ( a2 ) *(_BYTE *)(v3 + 2014) = 1; } else if ( a2 ) { v4 = *(_DWORD *)my_thread_var(); v5 = ma_state_info_write_sub(*(unsigned int *)(v3 + 1888), v3, 1LL); if ( v5 ) v4 = *(_DWORD *)my_thread_var(); *(_DWORD *)my_thread_var() = v4; } return v5; }
_ma_writeinfo: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x0014713c LAB_0014713c: MOV dword ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x7b8],0x0 JNZ 0x001471ad MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x44c],0x0 JNZ 0x001471ad CMP dword ptr [RBP + -0xc],0x0 JZ 0x001471ab JMP 0x00147165 LAB_00147165: JMP 0x00147167 LAB_00147167: CALL 0x001fc1b0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX + 0x760] MOV RSI,qword ptr [RBP + -0x20] MOV EDX,0x1 CALL 0x0018fb60 MOV dword ptr [RBP + -0x10],EAX CMP EAX,0x0 JZ 0x0014719b CALL 0x001fc1b0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x14],EAX LAB_0014719b: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x24],EAX CALL 0x001fc1b0 MOV ECX,dword ptr [RBP + -0x24] MOV dword ptr [RAX],ECX LAB_001471ab: JMP 0x001471c0 LAB_001471ad: CMP dword ptr [RBP + -0xc],0x0 JZ 0x001471be MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x7de],0x1 LAB_001471be: JMP 0x001471c0 LAB_001471c0: JMP 0x001471c2 LAB_001471c2: MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
int _ma_writeinfo(long *param_1,int param_2) { long lVar1; int4 *puVar2; int4 local_1c; int4 local_18; lVar1 = *param_1; local_18 = 0; if ((*(int *)(lVar1 + 0x7b8) == 0) && (*(char *)(lVar1 + 0x44c) == '\0')) { if (param_2 != 0) { puVar2 = (int4 *)_my_thread_var(); local_1c = *puVar2; local_18 = _ma_state_info_write_sub(*(int4 *)(lVar1 + 0x760),lVar1,1); if (local_18 != 0) { puVar2 = (int4 *)_my_thread_var(); local_1c = *puVar2; } puVar2 = (int4 *)_my_thread_var(); *puVar2 = local_1c; } } else if (param_2 != 0) { *(int1 *)(lVar1 + 0x7de) = 1; } return local_18; }
39,267
js_proxy_delete_property
bluesky950520[P]quickjs/quickjs.c
static int js_proxy_delete_property(JSContext *ctx, JSValue obj, JSAtom atom) { JSProxyData *s; JSValue method, ret, atom_val; int res, res2, is_extensible; JSValue args[2]; s = get_proxy_method(ctx, &method, obj, JS_ATOM_deleteProperty); if (!s) return -1; if (JS_IsUndefined(method)) { return JS_DeleteProperty(ctx, s->target, atom, 0); } atom_val = JS_AtomToValue(ctx, atom);; if (JS_IsException(atom_val)) { JS_FreeValue(ctx, method); return -1; } args[0] = s->target; args[1] = atom_val; ret = JS_CallFree(ctx, method, s->handler, 2, args); JS_FreeValue(ctx, atom_val); if (JS_IsException(ret)) return -1; res = JS_ToBoolFree(ctx, ret); if (res) { JSPropertyDescriptor desc; res2 = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(s->target), atom); if (res2 < 0) return -1; if (res2) { if (!(desc.flags & JS_PROP_CONFIGURABLE)) goto fail; is_extensible = JS_IsExtensible(ctx, s->target); if (is_extensible < 0) goto fail1; if (!is_extensible) { /* proxy-missing-checks */ fail: JS_ThrowTypeError(ctx, "proxy: inconsistent deleteProperty"); fail1: js_free_desc(ctx, &desc); return -1; } js_free_desc(ctx, &desc); } } return res; }
O0
c
js_proxy_delete_property: subq $0x108, %rsp # imm = 0x108 movq %rsi, 0xf0(%rsp) movq %rdx, 0xf8(%rsp) movq %rdi, 0xe8(%rsp) movl %ecx, 0xe4(%rsp) movq 0xe8(%rsp), %rdi movq 0xf0(%rsp), %rdx movq 0xf8(%rsp), %rcx leaq 0xc8(%rsp), %rsi movl $0x65, %r8d callq 0x5edb0 movq %rax, 0xd8(%rsp) cmpq $0x0, 0xd8(%rsp) jne 0x88a94 movl $0xffffffff, 0x104(%rsp) # imm = 0xFFFFFFFF jmp 0x88d6e movq 0xc8(%rsp), %rdi movq 0xd0(%rsp), %rsi callq 0x2cfa0 cmpl $0x0, %eax je 0x88ae0 movq 0xe8(%rsp), %rdi movq 0xd8(%rsp), %rax movl 0xe4(%rsp), %ecx movq (%rax), %rsi movq 0x8(%rax), %rdx xorl %r8d, %r8d callq 0x36390 movl %eax, 0x104(%rsp) jmp 0x88d6e movq 0xe8(%rsp), %rdi movl 0xe4(%rsp), %esi callq 0x27b70 movq %rax, 0x60(%rsp) movq %rdx, 0x68(%rsp) movq 0x60(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x68(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0xa8(%rsp), %rdi movq 0xb0(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x88b5f movq 0xe8(%rsp), %rdi movq 0xc8(%rsp), %rsi movq 0xd0(%rsp), %rdx callq 0x229d0 movl $0xffffffff, 0x104(%rsp) # imm = 0xFFFFFFFF jmp 0x88d6e movq 0xd8(%rsp), %rax movq (%rax), %rcx movq %rcx, 0x70(%rsp) movq 0x8(%rax), %rax movq %rax, 0x78(%rsp) movq 0xa8(%rsp), %rax movq %rax, 0x80(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x88(%rsp) movq 0xe8(%rsp), %rdi movq 0xd8(%rsp), %r8 leaq 0x70(%rsp), %rax movq 0xc8(%rsp), %rsi movq 0xd0(%rsp), %rdx movq 0x10(%r8), %rcx movq 0x18(%r8), %r8 movl $0x2, %r9d movq %rax, (%rsp) callq 0x2cfc0 movq %rax, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq 0x50(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0x58(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0xe8(%rsp), %rdi movq 0xa8(%rsp), %rsi movq 0xb0(%rsp), %rdx callq 0x229d0 movq 0xb8(%rsp), %rdi movq 0xc0(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x88c3f movl $0xffffffff, 0x104(%rsp) # imm = 0xFFFFFFFF jmp 0x88d6e movq 0xe8(%rsp), %rdi movq 0xb8(%rsp), %rsi movq 0xc0(%rsp), %rdx callq 0x2d070 movl %eax, 0xa4(%rsp) cmpl $0x0, 0xa4(%rsp) je 0x88d60 movq 0xe8(%rsp), %rdi movq 0xd8(%rsp), %rax movq (%rax), %rdx movl 0xe4(%rsp), %ecx leaq 0x18(%rsp), %rsi callq 0x2ef00 movl %eax, 0xa0(%rsp) cmpl $0x0, 0xa0(%rsp) jge 0x88cb6 movl $0xffffffff, 0x104(%rsp) # imm = 0xFFFFFFFF jmp 0x88d6e cmpl $0x0, 0xa0(%rsp) je 0x88d5e movl 0x18(%rsp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x88cd2 jmp 0x88d0d movq 0xe8(%rsp), %rdi movq 0xd8(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x2f7e0 movl %eax, 0x9c(%rsp) cmpl $0x0, 0x9c(%rsp) jge 0x88d01 jmp 0x88d2d cmpl $0x0, 0x9c(%rsp) jne 0x88d4c jmp 0x88d0d movq 0xe8(%rsp), %rdi leaq 0x84c9b(%rip), %rsi # 0x10d9b7 movb $0x0, %al callq 0x2c040 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq 0xe8(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x5f740 movl $0xffffffff, 0x104(%rsp) # imm = 0xFFFFFFFF jmp 0x88d6e movq 0xe8(%rsp), %rdi leaq 0x18(%rsp), %rsi callq 0x5f740 jmp 0x88d60 movl 0xa4(%rsp), %eax movl %eax, 0x104(%rsp) movl 0x104(%rsp), %eax addq $0x108, %rsp # imm = 0x108 retq nopl (%rax)
js_proxy_delete_property: sub rsp, 108h mov [rsp+108h+var_18], rsi mov [rsp+108h+var_10], rdx mov [rsp+108h+var_20], rdi mov [rsp+108h+var_24], ecx mov rdi, [rsp+108h+var_20] mov rdx, [rsp+108h+var_18] mov rcx, [rsp+108h+var_10] lea rsi, [rsp+108h+var_40] mov r8d, 65h ; 'e' call get_proxy_method mov [rsp+108h+var_30], rax cmp [rsp+108h+var_30], 0 jnz short loc_88A94 mov [rsp+108h+var_4], 0FFFFFFFFh jmp loc_88D6E loc_88A94: mov rdi, [rsp+108h+var_40] mov rsi, [rsp+108h+var_38] call JS_IsUndefined_0 cmp eax, 0 jz short loc_88AE0 mov rdi, [rsp+108h+var_20] mov rax, [rsp+108h+var_30] mov ecx, [rsp+108h+var_24] mov rsi, [rax] mov rdx, [rax+8] xor r8d, r8d call JS_DeleteProperty mov [rsp+108h+var_4], eax jmp loc_88D6E loc_88AE0: mov rdi, [rsp+108h+var_20] mov esi, [rsp+108h+var_24] call JS_AtomToValue mov [rsp+108h+var_A8], rax mov [rsp+108h+var_A0], rdx mov rax, [rsp+108h+var_A8] mov [rsp+108h+var_60], rax mov rax, [rsp+108h+var_A0] mov [rsp+108h+var_58], rax mov rdi, [rsp+108h+var_60] mov rsi, [rsp+108h+var_58] call JS_IsException_1 cmp eax, 0 jz short loc_88B5F mov rdi, [rsp+108h+var_20] mov rsi, [rsp+108h+var_40] mov rdx, [rsp+108h+var_38] call JS_FreeValue mov [rsp+108h+var_4], 0FFFFFFFFh jmp loc_88D6E loc_88B5F: mov rax, [rsp+108h+var_30] mov rcx, [rax] mov [rsp+108h+var_98], rcx mov rax, [rax+8] mov [rsp+108h+var_90], rax mov rax, [rsp+108h+var_60] mov [rsp+108h+var_88], rax mov rax, [rsp+108h+var_58] mov [rsp+108h+var_80], rax mov rdi, [rsp+108h+var_20] mov r8, [rsp+108h+var_30] lea rax, [rsp+108h+var_98] mov rsi, [rsp+108h+var_40] mov rdx, [rsp+108h+var_38] mov rcx, [r8+10h] mov r8, [r8+18h] mov r9d, 2 mov [rsp+108h+var_108], rax call JS_CallFree mov [rsp+108h+var_B8], rax mov [rsp+108h+var_B0], rdx mov rax, [rsp+108h+var_B8] mov [rsp+108h+var_50], rax mov rax, [rsp+108h+var_B0] mov [rsp+108h+var_48], rax mov rdi, [rsp+108h+var_20] mov rsi, [rsp+108h+var_60] mov rdx, [rsp+108h+var_58] call JS_FreeValue mov rdi, [rsp+108h+var_50] mov rsi, [rsp+108h+var_48] call JS_IsException_1 cmp eax, 0 jz short loc_88C3F mov [rsp+108h+var_4], 0FFFFFFFFh jmp loc_88D6E loc_88C3F: mov rdi, [rsp+108h+var_20] mov rsi, [rsp+108h+var_50] mov rdx, [rsp+108h+var_48] call JS_ToBoolFree mov [rsp+108h+var_64], eax cmp [rsp+108h+var_64], 0 jz loc_88D60 mov rdi, [rsp+108h+var_20] mov rax, [rsp+108h+var_30] mov rdx, [rax] mov ecx, [rsp+108h+var_24] lea rsi, [rsp+108h+var_F0] call JS_GetOwnPropertyInternal mov [rsp+108h+var_68], eax cmp [rsp+108h+var_68], 0 jge short loc_88CB6 mov [rsp+108h+var_4], 0FFFFFFFFh jmp loc_88D6E loc_88CB6: cmp [rsp+108h+var_68], 0 jz loc_88D5E mov eax, [rsp+108h+var_F0] and eax, 1 cmp eax, 0 jnz short loc_88CD2 jmp short loc_88D0D loc_88CD2: mov rdi, [rsp+108h+var_20] mov rax, [rsp+108h+var_30] mov rsi, [rax] mov rdx, [rax+8] call JS_IsExtensible mov [rsp+108h+var_6C], eax cmp [rsp+108h+var_6C], 0 jge short loc_88D01 jmp short loc_88D2D loc_88D01: cmp [rsp+108h+var_6C], 0 jnz short loc_88D4C jmp short $+2 loc_88D0D: mov rdi, [rsp+108h+var_20] lea rsi, aProxyInconsist_3; "proxy: inconsistent deleteProperty" mov al, 0 call JS_ThrowTypeError mov [rsp+108h+var_100], rax mov [rsp+108h+var_F8], rdx loc_88D2D: mov rdi, [rsp+108h+var_20] lea rsi, [rsp+108h+var_F0] call js_free_desc mov [rsp+108h+var_4], 0FFFFFFFFh jmp short loc_88D6E loc_88D4C: mov rdi, [rsp+108h+var_20] lea rsi, [rsp+108h+var_F0] call js_free_desc loc_88D5E: jmp short $+2 loc_88D60: mov eax, [rsp+108h+var_64] mov [rsp+108h+var_4], eax loc_88D6E: mov eax, [rsp+108h+var_4] add rsp, 108h retn
long long js_proxy_delete_property( long long a1, long long a2, long long a3, unsigned int a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { double v12; // xmm4_8 double v13; // xmm5_8 long long v14; // rdx long long v15; // rdx long long v16; // rdx long long v17; // rcx long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 char v23; // [rsp+0h] [rbp-108h] long long v24[7]; // [rsp+18h] [rbp-F0h] BYREF long long v25; // [rsp+50h] [rbp-B8h] long long v26; // [rsp+58h] [rbp-B0h] long long v27; // [rsp+60h] [rbp-A8h] long long v28; // [rsp+68h] [rbp-A0h] _QWORD v29[5]; // [rsp+70h] [rbp-98h] BYREF int IsExtensible; // [rsp+9Ch] [rbp-6Ch] int OwnPropertyInternal; // [rsp+A0h] [rbp-68h] unsigned int v32; // [rsp+A4h] [rbp-64h] long long v33; // [rsp+A8h] [rbp-60h] long long v34; // [rsp+B0h] [rbp-58h] long long v35; // [rsp+B8h] [rbp-50h] long long v36; // [rsp+C0h] [rbp-48h] long long v37; // [rsp+C8h] [rbp-40h] BYREF long long v38; // [rsp+D0h] [rbp-38h] long long *proxy_method; // [rsp+D8h] [rbp-30h] unsigned int v40; // [rsp+E4h] [rbp-24h] long long v41; // [rsp+E8h] [rbp-20h] long long v42; // [rsp+F0h] [rbp-18h] long long v43; // [rsp+F8h] [rbp-10h] v42 = a2; v43 = a3; v41 = a1; v40 = a4; proxy_method = (long long *)get_proxy_method(a1, &v37, a2, a3, 101); if ( proxy_method ) { if ( JS_IsUndefined_0(v37, v38) ) return (unsigned int)JS_DeleteProperty( v41, *proxy_method, proxy_method[1], v40, 0, a5, a6, a7, a8, v12, v13, a11, a12); v27 = JS_AtomToValue(v41, v40); v28 = v14; v33 = v27; v34 = v14; if ( JS_IsException_1(v27, v14) ) { JS_FreeValue(v41, v37, v38); return (unsigned int)-1; } v29[0] = *proxy_method; v29[1] = proxy_method[1]; v29[2] = v33; v29[3] = v34; v25 = JS_CallFree(v41, v37, v38, proxy_method[2], proxy_method[3], 2, (long long)v29); v26 = v15; v35 = v25; v36 = v15; JS_FreeValue(v41, v33, v34); if ( JS_IsException_1(v35, v36) ) return (unsigned int)-1; v32 = JS_ToBoolFree(v41, v35, v36); if ( v32 ) { OwnPropertyInternal = JS_GetOwnPropertyInternal(v41, (long long)v24, *proxy_method, v40); if ( OwnPropertyInternal < 0 ) return (unsigned int)-1; if ( OwnPropertyInternal ) { if ( (v24[0] & 1) == 0 ) goto LABEL_16; IsExtensible = JS_IsExtensible(v41, *proxy_method, proxy_method[1]); if ( IsExtensible < 0 ) { LABEL_17: js_free_desc(v41, v24); return (unsigned int)-1; } if ( !IsExtensible ) { LABEL_16: JS_ThrowTypeError( v41, (long long)"proxy: inconsistent deleteProperty", v16, v17, v18, v19, a5, a6, a7, a8, v20, v21, a11, a12, v23); goto LABEL_17; } js_free_desc(v41, v24); } } return v32; } return (unsigned int)-1; }
js_proxy_delete_property: SUB RSP,0x108 MOV qword ptr [RSP + 0xf0],RSI MOV qword ptr [RSP + 0xf8],RDX MOV qword ptr [RSP + 0xe8],RDI MOV dword ptr [RSP + 0xe4],ECX MOV RDI,qword ptr [RSP + 0xe8] MOV RDX,qword ptr [RSP + 0xf0] MOV RCX,qword ptr [RSP + 0xf8] LEA RSI,[RSP + 0xc8] MOV R8D,0x65 CALL 0x0015edb0 MOV qword ptr [RSP + 0xd8],RAX CMP qword ptr [RSP + 0xd8],0x0 JNZ 0x00188a94 MOV dword ptr [RSP + 0x104],0xffffffff JMP 0x00188d6e LAB_00188a94: MOV RDI,qword ptr [RSP + 0xc8] MOV RSI,qword ptr [RSP + 0xd0] CALL 0x0012cfa0 CMP EAX,0x0 JZ 0x00188ae0 MOV RDI,qword ptr [RSP + 0xe8] MOV RAX,qword ptr [RSP + 0xd8] MOV ECX,dword ptr [RSP + 0xe4] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] XOR R8D,R8D CALL 0x00136390 MOV dword ptr [RSP + 0x104],EAX JMP 0x00188d6e LAB_00188ae0: MOV RDI,qword ptr [RSP + 0xe8] MOV ESI,dword ptr [RSP + 0xe4] CALL 0x00127b70 MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xb0],RAX MOV RDI,qword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0xb0] CALL 0x00122a00 CMP EAX,0x0 JZ 0x00188b5f MOV RDI,qword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xc8] MOV RDX,qword ptr [RSP + 0xd0] CALL 0x001229d0 MOV dword ptr [RSP + 0x104],0xffffffff JMP 0x00188d6e LAB_00188b5f: MOV RAX,qword ptr [RSP + 0xd8] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x70],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0xe8] MOV R8,qword ptr [RSP + 0xd8] LEA RAX,[RSP + 0x70] MOV RSI,qword ptr [RSP + 0xc8] MOV RDX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [R8 + 0x10] MOV R8,qword ptr [R8 + 0x18] MOV R9D,0x2 MOV qword ptr [RSP],RAX CALL 0x0012cfc0 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RDX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xb8],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xc0],RAX MOV RDI,qword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] CALL 0x001229d0 MOV RDI,qword ptr [RSP + 0xb8] MOV RSI,qword ptr [RSP + 0xc0] CALL 0x00122a00 CMP EAX,0x0 JZ 0x00188c3f MOV dword ptr [RSP + 0x104],0xffffffff JMP 0x00188d6e LAB_00188c3f: MOV RDI,qword ptr [RSP + 0xe8] MOV RSI,qword ptr [RSP + 0xb8] MOV RDX,qword ptr [RSP + 0xc0] CALL 0x0012d070 MOV dword ptr [RSP + 0xa4],EAX CMP dword ptr [RSP + 0xa4],0x0 JZ 0x00188d60 MOV RDI,qword ptr [RSP + 0xe8] MOV RAX,qword ptr [RSP + 0xd8] MOV RDX,qword ptr [RAX] MOV ECX,dword ptr [RSP + 0xe4] LEA RSI,[RSP + 0x18] CALL 0x0012ef00 MOV dword ptr [RSP + 0xa0],EAX CMP dword ptr [RSP + 0xa0],0x0 JGE 0x00188cb6 MOV dword ptr [RSP + 0x104],0xffffffff JMP 0x00188d6e LAB_00188cb6: CMP dword ptr [RSP + 0xa0],0x0 JZ 0x00188d5e MOV EAX,dword ptr [RSP + 0x18] AND EAX,0x1 CMP EAX,0x0 JNZ 0x00188cd2 JMP 0x00188d0d LAB_00188cd2: MOV RDI,qword ptr [RSP + 0xe8] MOV RAX,qword ptr [RSP + 0xd8] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0012f7e0 MOV dword ptr [RSP + 0x9c],EAX CMP dword ptr [RSP + 0x9c],0x0 JGE 0x00188d01 JMP 0x00188d2d LAB_00188d01: CMP dword ptr [RSP + 0x9c],0x0 JNZ 0x00188d4c JMP 0x00188d0d LAB_00188d0d: MOV RDI,qword ptr [RSP + 0xe8] LEA RSI,[0x20d9b7] MOV AL,0x0 CALL 0x0012c040 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX LAB_00188d2d: MOV RDI,qword ptr [RSP + 0xe8] LEA RSI,[RSP + 0x18] CALL 0x0015f740 MOV dword ptr [RSP + 0x104],0xffffffff JMP 0x00188d6e LAB_00188d4c: MOV RDI,qword ptr [RSP + 0xe8] LEA RSI,[RSP + 0x18] CALL 0x0015f740 LAB_00188d5e: JMP 0x00188d60 LAB_00188d60: MOV EAX,dword ptr [RSP + 0xa4] MOV dword ptr [RSP + 0x104],EAX LAB_00188d6e: MOV EAX,dword ptr [RSP + 0x104] ADD RSP,0x108 RET
int js_proxy_delete_property (int8 param_1,int8 param_2,int8 param_3,int4 param_4) { int iVar1; uint local_f0 [14]; int1 local_b8 [16]; int1 local_a8 [16]; int8 local_98; int8 local_90; int1 local_88 [16]; int local_6c; int local_68; int local_64; int1 local_60 [16]; int1 local_50 [16]; int8 local_40; int8 local_38; int8 *local_30; int4 local_24; int8 local_20; int8 local_18; int8 local_10; local_24 = param_4; local_20 = param_1; local_18 = param_2; local_10 = param_3; local_30 = (int8 *)get_proxy_method(param_1,&local_40,param_2,param_3,0x65); if (local_30 == (int8 *)0x0) { return -1; } iVar1 = JS_IsUndefined(local_40,local_38); if (iVar1 != 0) { iVar1 = JS_DeleteProperty(local_20,*local_30,local_30[1],local_24,0); return iVar1; } local_a8 = JS_AtomToValue(local_20,local_24); local_60 = local_a8; iVar1 = JS_IsException(local_a8._0_8_,local_a8._8_8_); if (iVar1 != 0) { JS_FreeValue(local_20,local_40,local_38); return -1; } local_98 = *local_30; local_90 = local_30[1]; local_88 = local_60; local_b8 = JS_CallFree(local_20,local_40,local_38,local_30[2],local_30[3],2,&local_98); local_50 = local_b8; JS_FreeValue(local_20,local_60._0_8_,local_60._8_8_); iVar1 = JS_IsException(local_50._0_8_,local_50._8_8_); if (iVar1 != 0) { return -1; } local_64 = JS_ToBoolFree(local_20,local_50._0_8_,local_50._8_8_); if (local_64 == 0) { return 0; } local_68 = JS_GetOwnPropertyInternal(local_20,local_f0,*local_30,local_24); if (local_68 < 0) { return -1; } if (local_68 == 0) { return local_64; } if ((local_f0[0] & 1) != 0) { local_6c = JS_IsExtensible(local_20,*local_30,local_30[1]); if (local_6c < 0) goto LAB_00188d2d; if (local_6c != 0) { js_free_desc(local_20,local_f0); return local_64; } } JS_ThrowTypeError(local_20,"proxy: inconsistent deleteProperty"); LAB_00188d2d: js_free_desc(local_20,local_f0); return -1; }
39,268
js_proxy_delete_property
bluesky950520[P]quickjs/quickjs.c
static int js_proxy_delete_property(JSContext *ctx, JSValue obj, JSAtom atom) { JSProxyData *s; JSValue method, ret, atom_val; int res, res2, is_extensible; JSValue args[2]; s = get_proxy_method(ctx, &method, obj, JS_ATOM_deleteProperty); if (!s) return -1; if (JS_IsUndefined(method)) { return JS_DeleteProperty(ctx, s->target, atom, 0); } atom_val = JS_AtomToValue(ctx, atom);; if (JS_IsException(atom_val)) { JS_FreeValue(ctx, method); return -1; } args[0] = s->target; args[1] = atom_val; ret = JS_CallFree(ctx, method, s->handler, 2, args); JS_FreeValue(ctx, atom_val); if (JS_IsException(ret)) return -1; res = JS_ToBoolFree(ctx, ret); if (res) { JSPropertyDescriptor desc; res2 = JS_GetOwnPropertyInternal(ctx, &desc, JS_VALUE_GET_OBJ(s->target), atom); if (res2 < 0) return -1; if (res2) { if (!(desc.flags & JS_PROP_CONFIGURABLE)) goto fail; is_extensible = JS_IsExtensible(ctx, s->target); if (is_extensible < 0) goto fail1; if (!is_extensible) { /* proxy-missing-checks */ fail: JS_ThrowTypeError(ctx, "proxy: inconsistent deleteProperty"); fail1: js_free_desc(ctx, &desc); return -1; } js_free_desc(ctx, &desc); } } return res; }
O1
c
js_proxy_delete_property: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movl %ecx, %r15d movq %rdx, %rcx movq %rsi, %rdx movq %rdi, %rbx leaq 0x18(%rsp), %rsi movl $0x65, %r8d callq 0x3c7cc movl $0xffffffff, %ebp # imm = 0xFFFFFFFF testq %rax, %rax je 0x4dd92 movq %rax, %r14 movq 0x20(%rsp), %r12 cmpl $0x3, %r12d jne 0x4dcb3 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi movl %r15d, %ecx xorl %r8d, %r8d addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x26127 movq %rbx, %rdi movl %r15d, %esi xorl %edx, %edx callq 0x1fb46 movq %rdx, %r13 cmpl $0x6, %r13d jne 0x4dcdf movq 0x18(%rsp), %rsi movq 0x18(%rbx), %rdi movq %r12, %rdx callq 0x1ccb2 jmp 0x4dd92 movups (%r14), %xmm0 leaq 0x60(%rsp), %rdx movaps %xmm0, (%rdx) movq %rax, 0x10(%rdx) movq %r13, 0x18(%rdx) movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rsi movq 0x10(%r14), %rcx movq 0x18(%r14), %r8 movq %rdx, (%rsp) movq %rbx, %rdi movq %r12, %rdx movl $0x2, %r9d callq 0x22089 movq %rax, 0x8(%rsp) movq %rdx, %r12 movq 0x18(%rbx), %rdi movq 0x10(%rsp), %rsi movq %r13, %rdx callq 0x1ccb2 cmpl $0x6, %r12d je 0x4dd92 movq %rbx, %rdi movq 0x8(%rsp), %rsi movq %r12, %rdx callq 0x220f9 movl %eax, %ebp testl %eax, %eax je 0x4dd92 movq (%r14), %rdx leaq 0x28(%rsp), %rsi movq %rbx, %rdi movl %r15d, %ecx callq 0x22fc5 testl %eax, %eax js 0x4dd8d je 0x4dd92 testb $0x1, 0x28(%rsp) jne 0x4dda6 leaq 0x50c45(%rip), %rsi # 0x9e9bb movq %rbx, %rdi xorl %eax, %eax callq 0x21953 leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x3ccaf movl $0xffffffff, %ebp # imm = 0xFFFFFFFF movl %ebp, %eax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x28(%rsp), %rdx movq %r14, %rdi movq %rbx, %rsi callq 0x134ad testw %ax, %ax je 0x4dd80 movzwl %ax, %eax cmpl $0x1, %eax je 0x4dd6f jmp 0x4dd92
js_proxy_delete_property: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov r15d, ecx mov rcx, rdx mov rdx, rsi mov rbx, rdi lea rsi, [rsp+0B8h+var_A0] mov r8d, 65h ; 'e' call get_proxy_method mov ebp, 0FFFFFFFFh test rax, rax jz loc_4DD92 mov r14, rax mov r12, [rsp+0B8h+var_98] cmp r12d, 3 jnz short loc_4DCB3 mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx mov ecx, r15d xor r8d, r8d add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_DeleteProperty loc_4DCB3: mov rdi, rbx mov esi, r15d xor edx, edx call __JS_AtomToValue mov r13, rdx cmp r13d, 6 jnz short loc_4DCDF mov rsi, [rsp+0B8h+var_A0] mov rdi, [rbx+18h] mov rdx, r12 call JS_FreeValueRT jmp loc_4DD92 loc_4DCDF: movups xmm0, xmmword ptr [r14] lea rdx, [rsp+0B8h+var_58] movaps xmmword ptr [rdx], xmm0 mov [rdx+10h], rax mov [rdx+18h], r13 mov [rsp+0B8h+var_A8], rax mov rsi, [rsp+0B8h+var_A0] mov rcx, [r14+10h] mov r8, [r14+18h] mov [rsp+0B8h+var_B8], rdx mov rdi, rbx mov rdx, r12 mov r9d, 2 call JS_CallFree mov [rsp+0B8h+var_B0], rax mov r12, rdx mov rdi, [rbx+18h] mov rsi, [rsp+0B8h+var_A8] mov rdx, r13 call JS_FreeValueRT cmp r12d, 6 jz short loc_4DD92 mov rdi, rbx mov rsi, [rsp+0B8h+var_B0] mov rdx, r12 call JS_ToBoolFree mov ebp, eax test eax, eax jz short loc_4DD92 mov rdx, [r14] lea rsi, [rsp+0B8h+var_90] mov rdi, rbx mov ecx, r15d call JS_GetOwnPropertyInternal test eax, eax js short loc_4DD8D jz short loc_4DD92 test [rsp+0B8h+var_90], 1 jnz short loc_4DDA6 loc_4DD6F: lea rsi, aProxyInconsist_3; "proxy: inconsistent deleteProperty" mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_4DD80: lea rsi, [rsp+0B8h+var_90] mov rdi, rbx call js_free_desc loc_4DD8D: mov ebp, 0FFFFFFFFh loc_4DD92: mov eax, ebp add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4DDA6: lea rdx, [rsp+0B8h+var_90] mov rdi, r14 mov rsi, rbx call js_proxy_delete_property_cold_1 test ax, ax jz short loc_4DD80 movzx eax, ax cmp eax, 1 jz short loc_4DD6F jmp short loc_4DD92
long long js_proxy_delete_property( long long a1, long long a2, long long a3, unsigned int a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, long long a13, long long a14) { long long *proxy_method; // rax double v16; // xmm4_8 double v17; // xmm5_8 unsigned int v18; // ebp long long *v19; // r14 long long v20; // r12 long long v22; // rax long long v23; // rdx long long v24; // r13 __m128 v25; // xmm0 long long v26; // rdx long long v27; // r12 int OwnPropertyInternal; // eax long long v29; // rdx long long v30; // rcx long long v31; // r8 long long v32; // r9 __m128 v33; // xmm4 __m128 v34; // xmm5 __int16 v35; // ax char v36; // [rsp+0h] [rbp-B8h] long long v37; // [rsp+8h] [rbp-B0h] _DWORD *v38; // [rsp+10h] [rbp-A8h] _DWORD *v39; // [rsp+18h] [rbp-A0h] BYREF long long v40; // [rsp+20h] [rbp-98h] _BYTE v41[56]; // [rsp+28h] [rbp-90h] BYREF __m128 v42; // [rsp+60h] [rbp-58h] BYREF long long v43; // [rsp+70h] [rbp-48h] long long v44; // [rsp+78h] [rbp-40h] proxy_method = (long long *)get_proxy_method( a1, (unsigned long long *)&v39, a2, a3, 101LL, a14, a5, a6, a7, a8, a9, a10, a11, a12); v18 = -1; if ( !proxy_method ) return v18; v19 = proxy_method; v20 = v40; if ( (_DWORD)v40 == 3 ) return JS_DeleteProperty(a1, *proxy_method, proxy_method[1], a4, 0, a5, a6, a7, a8, v16, v17, a11, a12); v22 = _JS_AtomToValue(a1, a4, 0); v24 = v23; if ( (_DWORD)v23 != 6 ) { v25 = *(__m128 *)v19; v42 = *(__m128 *)v19; v43 = v22; v44 = v23; v38 = (_DWORD *)v22; v37 = JS_CallFree(a1, v39, v20, v19[2], v19[3], 2, (long long)&v42); v27 = v26; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v38, v24); if ( (_DWORD)v27 == 6 ) return v18; v18 = JS_ToBoolFree(a1, v37, v27); if ( !v18 ) return v18; OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, (long long)v41, *v19, a4); if ( OwnPropertyInternal < 0 ) return (unsigned int)-1; if ( !OwnPropertyInternal ) return v18; if ( (v41[0] & 1) != 0 ) { v35 = js_proxy_delete_property_cold_1(v19, a1); if ( !v35 ) goto LABEL_12; if ( v35 != 1 ) return v18; } JS_ThrowTypeError( a1, (long long)"proxy: inconsistent deleteProperty", v29, v30, v31, v32, v25, a6, a7, a8, v33, v34, a11, a12, v36); LABEL_12: js_free_desc(a1, (long long)v41); return (unsigned int)-1; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v20); return v18; }
js_proxy_delete_property: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R15D,ECX MOV RCX,RDX MOV RDX,RSI MOV RBX,RDI LEA RSI,[RSP + 0x18] MOV R8D,0x65 CALL 0x0013c7cc MOV EBP,0xffffffff TEST RAX,RAX JZ 0x0014dd92 MOV R14,RAX MOV R12,qword ptr [RSP + 0x20] CMP R12D,0x3 JNZ 0x0014dcb3 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV ECX,R15D XOR R8D,R8D ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00126127 LAB_0014dcb3: MOV RDI,RBX MOV ESI,R15D XOR EDX,EDX CALL 0x0011fb46 MOV R13,RDX CMP R13D,0x6 JNZ 0x0014dcdf MOV RSI,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RBX + 0x18] MOV RDX,R12 CALL 0x0011ccb2 JMP 0x0014dd92 LAB_0014dcdf: MOVUPS XMM0,xmmword ptr [R14] LEA RDX,[RSP + 0x60] MOVAPS xmmword ptr [RDX],XMM0 MOV qword ptr [RDX + 0x10],RAX MOV qword ptr [RDX + 0x18],R13 MOV qword ptr [RSP + 0x10],RAX MOV RSI,qword ptr [RSP + 0x18] MOV RCX,qword ptr [R14 + 0x10] MOV R8,qword ptr [R14 + 0x18] MOV qword ptr [RSP],RDX MOV RDI,RBX MOV RDX,R12 MOV R9D,0x2 CALL 0x00122089 MOV qword ptr [RSP + 0x8],RAX MOV R12,RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,R13 CALL 0x0011ccb2 CMP R12D,0x6 JZ 0x0014dd92 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x8] MOV RDX,R12 CALL 0x001220f9 MOV EBP,EAX TEST EAX,EAX JZ 0x0014dd92 MOV RDX,qword ptr [R14] LEA RSI,[RSP + 0x28] MOV RDI,RBX MOV ECX,R15D CALL 0x00122fc5 TEST EAX,EAX JS 0x0014dd8d JZ 0x0014dd92 TEST byte ptr [RSP + 0x28],0x1 JNZ 0x0014dda6 LAB_0014dd6f: LEA RSI,[0x19e9bb] MOV RDI,RBX XOR EAX,EAX CALL 0x00121953 LAB_0014dd80: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0013ccaf LAB_0014dd8d: MOV EBP,0xffffffff LAB_0014dd92: MOV EAX,EBP ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014dda6: LEA RDX,[RSP + 0x28] MOV RDI,R14 MOV RSI,RBX CALL 0x001134ad TEST AX,AX JZ 0x0014dd80 MOVZX EAX,AX CMP EAX,0x1 JZ 0x0014dd6f JMP 0x0014dd92
ulong js_proxy_delete_property (long param_1,int8 param_2,int8 param_3,int4 param_4) { short sVar1; uint uVar2; int iVar3; int8 *puVar4; ulong uVar5; int8 uVar6; int8 uVar7; int1 auVar8 [16]; int8 local_a0; int8 local_98; byte local_90 [56]; int4 local_58; int4 uStack_54; int4 uStack_50; int4 uStack_4c; int1 local_48 [16]; puVar4 = (int8 *)get_proxy_method(param_1,&local_a0,param_2,param_3,0x65); if (puVar4 == (int8 *)0x0) { return 0xffffffff; } if ((int)local_98 == 3) { uVar5 = JS_DeleteProperty(param_1,*puVar4,puVar4[1],param_4,0); return uVar5; } local_48 = __JS_AtomToValue(param_1,param_4,0); uVar7 = local_48._8_8_; uVar6 = local_48._0_8_; if (local_48._8_4_ == 6) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_a0,local_98); return 0xffffffff; } local_58 = *(int4 *)puVar4; uStack_54 = *(int4 *)((long)puVar4 + 4); uStack_50 = *(int4 *)(puVar4 + 1); uStack_4c = *(int4 *)((long)puVar4 + 0xc); auVar8 = JS_CallFree(param_1,local_a0,local_98,puVar4[2],puVar4[3],2,&local_58); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar7); if (auVar8._8_4_ == 6) { return 0xffffffff; } uVar2 = JS_ToBoolFree(param_1,auVar8._0_8_,auVar8._8_8_); uVar5 = (ulong)uVar2; if (uVar2 == 0) { return uVar5; } iVar3 = JS_GetOwnPropertyInternal(param_1,local_90,*puVar4,param_4); if (iVar3 < 0) { return 0xffffffff; } if (iVar3 == 0) { return uVar5; } if ((local_90[0] & 1) != 0) { sVar1 = js_proxy_delete_property_cold_1(puVar4,param_1,local_90); if (sVar1 == 0) goto LAB_0014dd80; if (sVar1 != 1) { return uVar5; } } JS_ThrowTypeError(param_1,"proxy: inconsistent deleteProperty"); LAB_0014dd80: js_free_desc(param_1,local_90); return 0xffffffff; }
39,269
OpenSubdiv::v3_6_0::Far::PatchBuilder::gatherIrregularSourcePoints(int, int, OpenSubdiv::v3_6_0::Vtr::internal::Level::VSpan const*, OpenSubdiv::v3_6_0::Far::SourcePatch&, int*, int) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp
int PatchBuilder::gatherIrregularSourcePoints( int levelIndex, Index faceIndex, Level::VSpan const cornerSpans[4], SourcePatch & sourcePatch, Index patchVerts[], int fvarChannel) const { // // Allocate temporary space for rings around the corners in both the Level // and the Patch, then retrieve corresponding rings and assign the source // vertices to the given array of patch points // int numSourceVerts = sourcePatch.GetNumSourcePoints(); StackBuffer<Index,64,true> sourceRingVertices(sourcePatch.GetMaxRingSize()); StackBuffer<Index,64,true> patchRingPoints(sourcePatch.GetMaxRingSize()); Level const & level = _refiner.getLevel(levelIndex); ConstIndexArray faceVerts = level.getFaceVertices(faceIndex); for (int corner = 0; corner < sourcePatch._numCorners; ++corner) { Index cornerVertex = faceVerts[corner]; // Gather the ring of source points from the Vtr level: int sourceRingSize = 0; if (cornerSpans[corner].isAssigned()) { sourceRingSize = gatherRegularPartialRingAroundVertex(level, cornerVertex, cornerSpans[corner], sourceRingVertices, fvarChannel); } else if (sourcePatch._numCorners == 4) { sourceRingSize = level.gatherQuadRegularRingAroundVertex( cornerVertex, sourceRingVertices, fvarChannel); } else { sourceRingSize = gatherTriRegularRingAroundVertex(level, cornerVertex, sourceRingVertices, fvarChannel); } // Gather the ring of local points from the patch: int patchRingSize = sourcePatch.GetCornerRingPoints( corner, patchRingPoints); assert(patchRingSize == sourceRingSize); // Identify source points for corresponding local patch points of ring: for (int i = 0; i < patchRingSize; ++i) { assert(patchRingPoints[i] < numSourceVerts); patchVerts[patchRingPoints[i]] = sourceRingVertices[i]; } } return numSourceVerts; }
O2
cpp
OpenSubdiv::v3_6_0::Far::PatchBuilder::gatherIrregularSourcePoints(int, int, OpenSubdiv::v3_6_0::Vtr::internal::Level::VSpan const*, OpenSubdiv::v3_6_0::Far::SourcePatch&, int*, int) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2b8, %rsp # imm = 0x2B8 movq %r9, %r13 movq %r8, %r12 movq %rcx, 0x28(%rsp) movl %edx, %ebx movl %esi, %ebp movq %rdi, %r15 movl 0x1c(%r8), %r14d movl 0x24(%r8), %esi leaq 0x88(%rsp), %rdi callq 0x54510 movq %r12, 0x50(%rsp) movl 0x24(%r12), %esi leaq 0x1a0(%rsp), %rdi callq 0x54510 movq 0x8(%r15), %rax movslq %ebp, %rcx movq 0x30(%rax), %rax movq (%rax,%rcx,8), %r12 movq %r12, %rdi movl %ebx, %esi callq 0x52db0 movq %rax, 0x58(%rsp) xorl %edx, %edx movl %r14d, 0x1c(%rsp) movq %r13, 0x48(%rsp) movq %r12, 0x8(%rsp) movq 0x50(%rsp), %rax movslq 0x18(%rax), %rax cmpq %rax, %rdx jge 0x7a164 movq 0x58(%rsp), %rcx movslq (%rcx,%rdx,4), %rbp movq 0x28(%rsp), %rcx movq %rdx, 0x20(%rsp) cmpw $0x0, (%rcx,%rdx,8) je 0x79ff9 movq 0x88(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x1b0(%r12), %rax movzwl (%rax,%rbp,2), %eax movw %ax, 0x30(%rsp) movq %r12, %rdi movl %ebp, %esi callq 0x55df0 movl %edx, 0x44(%rsp) movq %r12, %rdi movq %rax, %r12 movl %ebp, %esi callq 0x507c0 movq 0x28(%rsp), %rcx movq 0x20(%rsp), %rdx movzwl (%rcx,%rdx,8), %esi movzwl 0x2(%rcx,%rdx,8), %ecx movl (%r12,%rcx,4), %ebp movzwl (%rax,%rcx,2), %r15d leaq 0x2(%rax,%rcx,2), %rax movq %rax, 0x68(%rsp) leaq (%r12,%rcx,4), %rax addq $0x4, %rax movq %rax, 0x60(%rsp) incq %rcx movq %rcx, 0x70(%rsp) negl %esi movq %rsi, 0x38(%rsp) xorl %r13d, %r13d xorl %r12d, %r12d movq 0x38(%rsp), %rax leaq (%rax,%r13), %r14 testl %r14d, %r14d je 0x7a0ef movl 0x2f0(%rsp), %edx testl %edx, %edx js 0x79ea0 movq 0x8(%rsp), %rdi movl %ebp, %esi callq 0x53d20 jmp 0x79eac movq 0x8(%rsp), %rdi movl %ebp, %esi callq 0x52db0 movl %edx, %ebx leal 0x1(%r15), %edx movslq %r12d, %rcx cmpl $0x4, %ebx jne 0x79ede andl $0x3, %edx movl (%rax,%rdx,4), %edx movq 0x10(%rsp), %rsi movl %edx, (%rsi,%rcx,4) movl %r15d, %edx andl $0x3, %edx xorl $0x2, %edx movl (%rax,%rdx,4), %edx leal 0x2(%rcx), %r12d movl %edx, 0x4(%rsi,%rcx,4) jmp 0x79efb movslq %edx, %rdx leaq 0x486d8(%rip), %rsi # 0xc25c0 movslq (%rsi,%rdx,4), %rdx movl (%rax,%rdx,4), %edx leal 0x1(%rcx), %r12d movq 0x10(%rsp), %rsi movl %edx, (%rsi,%rcx,4) cmpl $-0x1, %r14d je 0x79f4b testb $0x1, 0x30(%rsp) jne 0x79f71 movq 0x70(%rsp), %rax addl %r13d, %eax movl 0x44(%rsp), %ecx cmpl %ecx, %eax movl %ecx, %eax movl $0x0, %ecx cmovll %ecx, %eax cltq leaq (,%rax,4), %rcx movq 0x60(%rsp), %rdx subq %rcx, %rdx movl (%rdx,%r13,4), %ebp addq %rax, %rax movq 0x68(%rsp), %rcx subq %rax, %rcx movzwl (%rcx,%r13,2), %r15d jmp 0x79ff1 movq 0x28(%rsp), %rcx movq 0x20(%rsp), %rdx testb $0x1, 0x6(%rcx,%rdx,8) jne 0x79ff1 movslq %r12d, %rcx cmpl $0x4, %ebx jne 0x79fd3 leal -0x1(%r15), %edx andl $0x3, %edx jmp 0x79fe2 movq 0x8(%rsp), %rdi movl %ebp, %esi callq 0x52d60 leal (%rbx,%r15), %ecx testl %r15d, %r15d notl %ebx pushq $-0x1 popq %rdx cmovlel %edx, %ebx addl %ecx, %ebx movslq %ebx, %rcx movl (%rax,%rcx,4), %ebx movq 0x8(%rsp), %rdi movl %ebx, %esi callq 0x52330 xorl %ecx, %ecx cmpl %ebp, (%rax) sete %cl movl (%rax,%rcx,4), %ebp movq 0x8(%rsp), %rdi movl %ebp, %esi callq 0x52d60 movq %rax, 0x78(%rsp) movl %edx, 0x80(%rsp) leaq 0x78(%rsp), %rdi movl %ebx, %esi callq 0x52640 movl %eax, %r15d jmp 0x79ff1 movslq %r15d, %rdx leaq 0x485e3(%rip), %rsi # 0xc25c0 movslq 0x8(%rsi,%rdx,4), %rdx movl (%rax,%rdx,4), %eax leal 0x1(%rcx), %r12d movq 0x10(%rsp), %rdx movl %eax, (%rdx,%rcx,4) incq %r13 jmp 0x79e75 movq 0x88(%rsp), %r15 cmpl $0x4, %eax jne 0x7a022 movq %r12, %rdi movl %ebp, %esi movq %r15, %rdx movl 0x2f0(%rsp), %ecx callq 0x55bb0 movl %eax, %r12d jmp 0x7a0f9 movq %r12, %rdi movl %ebp, %esi callq 0x54550 movl %edx, 0x38(%rsp) movq %r12, %rdi movl %ebp, %esi callq 0x55df0 movq %rax, 0x10(%rsp) movl %edx, %ebx movq %r12, %rdi movl %ebp, %esi callq 0x507c0 movq %rax, %rbp movq %rbx, %r13 leal -0x1(%rbx), %eax movq %rax, 0x30(%rsp) xorl %r14d, %r14d testl %r13d, %r13d cmovlel %r14d, %r13d xorl %r12d, %r12d cmpq %r14, %r13 je 0x7a0ef movq 0x10(%rsp), %rax movl (%rax,%r14,4), %esi movl 0x2f0(%rsp), %edx testl %edx, %edx js 0x7a08f movq 0x8(%rsp), %rdi callq 0x53d20 jmp 0x7a099 movq 0x8(%rsp), %rdi callq 0x52db0 leal 0x1(%r12), %ecx movzwl (%rbp,%r14,2), %edx leaq 0x48515(%rip), %rsi # 0xc25c0 movslq 0x4(%rsi,%rdx,4), %rsi movl (%rax,%rsi,4), %esi movslq %r12d, %rdi movl %esi, (%r15,%rdi,4) cmpl %ebx, 0x38(%rsp) jle 0x7a0e4 cmpq %r14, 0x30(%rsp) jne 0x7a0e4 leaq 0x484f2(%rip), %rsi # 0xc25c0 movslq 0x8(%rsi,%rdx,4), %rdx movl (%rax,%rdx,4), %eax addl $0x2, %r12d movslq %ecx, %rcx movl %eax, (%r15,%rcx,4) movl %r12d, %ecx incq %r14 movl %ecx, %r12d jmp 0x7a066 movl 0x1c(%rsp), %r14d movq 0x48(%rsp), %r13 movq 0x1a0(%rsp), %rdx movq 0x50(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x51ea0 cmpl %r12d, %eax jne 0x7a1b2 movq 0x1a0(%rsp), %rax movq 0x88(%rsp), %rcx testl %r12d, %r12d movl $0x0, %edx cmovlel %edx, %r12d xorl %edx, %edx cmpq %rdx, %r12 je 0x7a152 movslq (%rax,%rdx,4), %rsi cmpl %r14d, %esi jge 0x7a193 movl (%rcx,%rdx,4), %edi movl %edi, (%r13,%rsi,4) incq %rdx jmp 0x7a137 movq 0x20(%rsp), %rdx incq %rdx movq 0x8(%rsp), %r12 jmp 0x79dc4 movq 0x2b0(%rsp), %rdi callq 0x524d0 movq 0x198(%rsp), %rdi callq 0x524d0 movl %r14d, %eax addq $0x2b8, %rsp # imm = 0x2B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x485f7(%rip), %rdi # 0xc2791 leaq 0x48479(%rip), %rsi # 0xc261a leaq 0x4855d(%rip), %rcx # 0xc2705 movl $0x4c5, %edx # imm = 0x4C5 callq 0x512a0 leaq 0x4852c(%rip), %rdi # 0xc26e5 leaq 0x4845a(%rip), %rsi # 0xc261a leaq 0x4853e(%rip), %rcx # 0xc2705 movl $0x4c1, %edx # imm = 0x4C1 callq 0x512a0 jmp 0x7a1de movq %rax, %rbx jmp 0x7a1ee jmp 0x7a1de jmp 0x7a1de jmp 0x7a1de movq %rax, %rbx movq 0x2b0(%rsp), %rdi callq 0x524d0 movq 0x198(%rsp), %rdi callq 0x524d0 movq %rbx, %rdi callq 0x55300 nop
_ZNK10OpenSubdiv6v3_6_03Far12PatchBuilder27gatherIrregularSourcePointsEiiPKNS0_3Vtr8internal5Level5VSpanERNS1_11SourcePatchEPii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 2B8h mov r13, r9 mov r12, r8 mov [rsp+2E8h+var_2C0], rcx mov ebx, edx mov ebp, esi mov r15, rdi mov r14d, [r8+1Ch] mov esi, [r8+24h] lea rdi, [rsp+2E8h+var_260] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj64ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,64u,true>::StackBuffer(uint) mov [rsp+2E8h+var_298], r12 mov esi, [r12+24h] lea rdi, [rsp+2E8h+var_148] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIiLj64ELb1EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,64u,true>::StackBuffer(uint) mov rax, [r15+8] movsxd rcx, ebp mov rax, [rax+30h] mov r12, [rax+rcx*8] mov rdi, r12; this mov esi, ebx; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int) mov [rsp+2E8h+var_290], rax xor edx, edx mov [rsp+2E8h+var_2CC], r14d mov [rsp+2E8h+var_2A0], r13 mov [rsp+2E8h+var_2E0], r12 loc_79DC4: mov rax, [rsp+2E8h+var_298] movsxd rax, dword ptr [rax+18h] cmp rdx, rax jge loc_7A164 mov rcx, [rsp+2E8h+var_290] movsxd rbp, dword ptr [rcx+rdx*4] mov rcx, [rsp+2E8h+var_2C0] mov qword ptr [rsp+2E8h+var_2C8], rdx cmp word ptr [rcx+rdx*8], 0 jz loc_79FF9 mov rax, [rsp+2E8h+var_260] mov [rsp+2E8h+var_2D8], rax mov rax, [r12+1B0h] movzx eax, word ptr [rax+rbp*2] mov word ptr [rsp+2E8h+var_2B8], ax mov rdi, r12; this mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(int) mov [rsp+2E8h+var_2A4], edx mov rdi, r12; this mov r12, rax mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexFaceLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(int) mov rcx, [rsp+2E8h+var_2C0] mov rdx, qword ptr [rsp+2E8h+var_2C8] movzx esi, word ptr [rcx+rdx*8] movzx ecx, word ptr [rcx+rdx*8+2] mov ebp, [r12+rcx*4] movzx r15d, word ptr [rax+rcx*2] lea rax, [rax+rcx*2+2] mov [rsp+2E8h+var_280], rax lea rax, [r12+rcx*4] add rax, 4 mov [rsp+2E8h+var_288], rax inc rcx mov [rsp+2E8h+var_278], rcx neg esi mov [rsp+2E8h+var_2B0], rsi xor r13d, r13d xor r12d, r12d loc_79E75: mov rax, [rsp+2E8h+var_2B0] lea r14, [rax+r13] test r14d, r14d jz loc_7A0EF mov edx, [rsp+2E8h+arg_0]; int test edx, edx js short loc_79EA0 mov rdi, [rsp+2E8h+var_2E0]; this mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int,int) jmp short loc_79EAC loc_79EA0: mov rdi, [rsp+2E8h+var_2E0]; this mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int) loc_79EAC: mov ebx, edx lea edx, [r15+1] movsxd rcx, r12d cmp ebx, 4 jnz short loc_79EDE and edx, 3 mov edx, [rax+rdx*4] mov rsi, [rsp+2E8h+var_2D8] mov [rsi+rcx*4], edx mov edx, r15d and edx, 3 xor edx, 2 mov edx, [rax+rdx*4] lea r12d, [rcx+2] mov [rsi+rcx*4+4], edx jmp short loc_79EFB loc_79EDE: movsxd rdx, edx lea rsi, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_18fastMod3EiE9mod3Array; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastMod3(int)::mod3Array movsxd rdx, dword ptr [rsi+rdx*4] mov edx, [rax+rdx*4] lea r12d, [rcx+1] mov rsi, [rsp+2E8h+var_2D8] mov [rsi+rcx*4], edx loc_79EFB: cmp r14d, 0FFFFFFFFh jz short loc_79F4B test byte ptr [rsp+2E8h+var_2B8], 1 jnz short loc_79F71 mov rax, [rsp+2E8h+var_278] add eax, r13d mov ecx, [rsp+2E8h+var_2A4] cmp eax, ecx mov eax, ecx mov ecx, 0 cmovl eax, ecx cdqe lea rcx, ds:0[rax*4] mov rdx, [rsp+2E8h+var_288] sub rdx, rcx mov ebp, [rdx+r13*4] add rax, rax mov rcx, [rsp+2E8h+var_280] sub rcx, rax movzx r15d, word ptr [rcx+r13*2] jmp loc_79FF1 loc_79F4B: mov rcx, [rsp+2E8h+var_2C0] mov rdx, qword ptr [rsp+2E8h+var_2C8] test byte ptr [rcx+rdx*8+6], 1 jnz loc_79FF1 movsxd rcx, r12d cmp ebx, 4 jnz short loc_79FD3 lea edx, [r15-1] and edx, 3 jmp short loc_79FE2 loc_79F71: mov rdi, [rsp+2E8h+var_2E0]; this mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(int) lea ecx, [rbx+r15] test r15d, r15d not ebx push 0FFFFFFFFFFFFFFFFh pop rdx cmovle ebx, edx add ebx, ecx movsxd rcx, ebx mov ebx, [rax+rcx*4] mov rdi, [rsp+2E8h+var_2E0]; this mov esi, ebx; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getEdgeFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeFaces(int) xor ecx, ecx cmp [rax], ebp setz cl mov ebp, [rax+rcx*4] mov rdi, [rsp+2E8h+var_2E0]; this mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level12getFaceEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(int) mov [rsp+2E8h+var_270], rax mov [rsp+2E8h+var_268], edx lea rdi, [rsp+2E8h+var_270] mov esi, ebx call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE9FindIndexEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::FindIndex(int) mov r15d, eax jmp short loc_79FF1 loc_79FD3: movsxd rdx, r15d lea rsi, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_18fastMod3EiE9mod3Array; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastMod3(int)::mod3Array movsxd rdx, dword ptr [rsi+rdx*4+8] loc_79FE2: mov eax, [rax+rdx*4] lea r12d, [rcx+1] mov rdx, [rsp+2E8h+var_2D8] mov [rdx+rcx*4], eax loc_79FF1: inc r13 jmp loc_79E75 loc_79FF9: mov r15, [rsp+2E8h+var_260] cmp eax, 4 jnz short loc_7A022 mov rdi, r12; this mov esi, ebp; int mov rdx, r15; int * mov ecx, [rsp+2E8h+arg_0]; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level33gatherQuadRegularRingAroundVertexEiPii; OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex(int,int *,int) mov r12d, eax jmp loc_7A0F9 loc_7A022: mov rdi, r12; this mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int) mov dword ptr [rsp+2E8h+var_2B0], edx mov rdi, r12; this mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexFacesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(int) mov [rsp+2E8h+var_2D8], rax mov ebx, edx mov rdi, r12; this mov esi, ebp; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexFaceLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(int) mov rbp, rax mov r13, rbx lea eax, [rbx-1] mov [rsp+2E8h+var_2B8], rax xor r14d, r14d test r13d, r13d cmovle r13d, r14d xor r12d, r12d loc_7A066: cmp r13, r14 jz loc_7A0EF mov rax, [rsp+2E8h+var_2D8] mov esi, [rax+r14*4]; int mov edx, [rsp+2E8h+arg_0]; int test edx, edx js short loc_7A08F mov rdi, [rsp+2E8h+var_2E0]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level17getFaceFVarValuesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(int,int) jmp short loc_7A099 loc_7A08F: mov rdi, [rsp+2E8h+var_2E0]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int) loc_7A099: lea ecx, [r12+1] movzx edx, word ptr [rbp+r14*2+0] lea rsi, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_18fastMod3EiE9mod3Array; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastMod3(int)::mod3Array movsxd rsi, dword ptr [rsi+rdx*4+4] mov esi, [rax+rsi*4] movsxd rdi, r12d mov [r15+rdi*4], esi cmp dword ptr [rsp+2E8h+var_2B0], ebx jle short loc_7A0E4 cmp [rsp+2E8h+var_2B8], r14 jnz short loc_7A0E4 lea rsi, _ZZN10OpenSubdiv6v3_6_03Far12_GLOBAL__N_18fastMod3EiE9mod3Array; OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastMod3(int)::mod3Array movsxd rdx, dword ptr [rsi+rdx*4+8] mov eax, [rax+rdx*4] add r12d, 2 movsxd rcx, ecx mov [r15+rcx*4], eax mov ecx, r12d loc_7A0E4: inc r14 mov r12d, ecx jmp loc_7A066 loc_7A0EF: mov r14d, [rsp+2E8h+var_2CC] mov r13, [rsp+2E8h+var_2A0] loc_7A0F9: mov rdx, [rsp+2E8h+var_148]; int * mov rdi, [rsp+2E8h+var_298]; this mov rsi, qword ptr [rsp+2E8h+var_2C8]; int call __ZNK10OpenSubdiv6v3_6_03Far11SourcePatch19GetCornerRingPointsEiPi; OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints(int,int *) cmp eax, r12d jnz loc_7A1B2 mov rax, [rsp+2E8h+var_148] mov rcx, [rsp+2E8h+var_260] test r12d, r12d mov edx, 0 cmovle r12d, edx xor edx, edx loc_7A137: cmp r12, rdx jz short loc_7A152 movsxd rsi, dword ptr [rax+rdx*4] cmp esi, r14d jge short loc_7A193 mov edi, [rcx+rdx*4] mov [r13+rsi*4+0], edi inc rdx jmp short loc_7A137 loc_7A152: mov rdx, qword ptr [rsp+2E8h+var_2C8] inc rdx mov r12, [rsp+2E8h+var_2E0] jmp loc_79DC4 loc_7A164: mov rdi, [rsp+2E8h+var_38]; void * call __ZdlPv; operator delete(void *) mov rdi, [rsp+2E8h+var_150]; void * call __ZdlPv; operator delete(void *) mov eax, r14d add rsp, 2B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7A193: lea rdi, aPatchringpoint; "patchRingPoints[i] < numSourceVerts" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"... lea rcx, aIntOpensubdivV_15; "int OpenSubdiv::v3_6_0::Far::PatchBuild"... mov edx, 4C5h call ___assert_fail loc_7A1B2: lea rdi, aPatchringsizeS; "patchRingSize == sourceRingSize" lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github/2025_star3"... lea rcx, aIntOpensubdivV_15; "int OpenSubdiv::v3_6_0::Far::PatchBuild"... mov edx, 4C1h call ___assert_fail jmp short loc_7A1DE mov rbx, rax jmp short loc_7A1EE jmp short loc_7A1DE jmp short loc_7A1DE jmp short $+2 loc_7A1DE: mov rbx, rax mov rdi, [rsp+2E8h+var_38]; void * call __ZdlPv; operator delete(void *) loc_7A1EE: mov rdi, [rsp+2E8h+var_150]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::PatchBuilder::gatherIrregularSourcePoints( long long a1, int a2, int a3, long long a4, long long a5, long long a6, int a7) { int v10; // r14d OpenSubdiv::v3_6_0::Vtr::internal::Level *v11; // r12 long long v12; // rdx long long v13; // rax long long v14; // rbp long long VertexFaces; // rax int v16; // edx OpenSubdiv::v3_6_0::Vtr::internal::Level *v17; // rdi long long v18; // r12 long long VertexFaceLocalIndices; // rax long long v20; // rcx int v21; // ebp int Index; // r15d long long v23; // r13 long long v24; // r12 long long FaceFVarValues; // rax int v26; // edx int v27; // ebx int v28; // edx long long v29; // rcx int v30; // eax long long v31; // rcx long long v32; // rdx long long FaceEdges; // rax int v34; // ecx int v35; // ebx unsigned int v36; // ebx _DWORD *EdgeFaces; // rax int v38; // edx int *v39; // r15 int v40; // edx unsigned int v41; // edx long long v42; // rbx long long v43; // rbp long long v44; // r13 long long v45; // r14 int v46; // esi long long v47; // rax unsigned int v48; // ecx long long v49; // rdx int *v50; // rax int *v51; // rcx long long j; // rdx long long v53; // rsi OpenSubdiv::v3_6_0::Vtr::internal::Level *i; // [rsp+8h] [rbp-2E0h] int *v56; // [rsp+10h] [rbp-2D8h] long long v57; // [rsp+10h] [rbp-2D8h] int v58; // [rsp+1Ch] [rbp-2CCh] int v59[2]; // [rsp+20h] [rbp-2C8h] __int16 v61; // [rsp+30h] [rbp-2B8h] int v62; // [rsp+38h] [rbp-2B0h] int v63; // [rsp+38h] [rbp-2B0h] int v64; // [rsp+44h] [rbp-2A4h] long long v65; // [rsp+48h] [rbp-2A0h] int *v66; // [rsp+50h] [rbp-298h] long long FaceVertices; // [rsp+58h] [rbp-290h] long long v68; // [rsp+60h] [rbp-288h] long long v69; // [rsp+68h] [rbp-280h] int v70; // [rsp+70h] [rbp-278h] long long v71; // [rsp+78h] [rbp-270h] BYREF int v72; // [rsp+80h] [rbp-268h] int *v73[35]; // [rsp+88h] [rbp-260h] BYREF int *v74[41]; // [rsp+1A0h] [rbp-148h] BYREF v10 = *(_DWORD *)(a5 + 28); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,64u,true>::StackBuffer(v73, *(unsigned int *)(a5 + 36)); v66 = (int *)a5; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<int,64u,true>::StackBuffer(v74, *(unsigned int *)(a5 + 36)); v11 = *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(*(_QWORD *)(*(_QWORD *)(a1 + 8) + 48LL) + 8LL * a2); FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(v11, a3); v12 = 0LL; v58 = v10; v65 = a6; for ( i = v11; ; v11 = i ) { v13 = v66[6]; if ( v12 >= v13 ) break; v14 = *(int *)(FaceVertices + 4 * v12); *(_QWORD *)v59 = v12; if ( *(_WORD *)(a4 + 8 * v12) ) { v56 = v73[0]; v61 = *(_WORD *)(*((_QWORD *)v11 + 54) + 2 * v14); VertexFaces = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(v11, v14); v64 = v16; v17 = v11; v18 = VertexFaces; VertexFaceLocalIndices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(v17, v14); v20 = *(unsigned __int16 *)(a4 + 8LL * *(_QWORD *)v59 + 2); v21 = *(_DWORD *)(v18 + 4 * v20); Index = *(unsigned __int16 *)(VertexFaceLocalIndices + 2 * v20); v69 = VertexFaceLocalIndices + 2 * v20 + 2; v68 = v18 + 4 * v20 + 4; v70 = v20 + 1; v62 = -*(unsigned __int16 *)(a4 + 8LL * *(_QWORD *)v59); v23 = 0LL; v24 = 0LL; while ( v62 + (_DWORD)v23 ) { if ( a7 < 0 ) FaceFVarValues = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(i, v21); else FaceFVarValues = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(i, v21, a7); v27 = v26; v28 = Index + 1; v29 = (int)v24; if ( v27 == 4 ) { v56[(int)v24] = *(_DWORD *)(FaceFVarValues + 4LL * (v28 & 3)); v24 = (unsigned int)(v24 + 2); v56[v29 + 1] = *(_DWORD *)(FaceFVarValues + 4LL * (Index & 3 ^ 2u)); } else { v24 = (unsigned int)(v24 + 1); v56[v29] = *(_DWORD *)(FaceFVarValues + 4LL * OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastMod3(int)::mod3Array[v28]); } if ( v62 + (_DWORD)v23 == -1 ) { if ( (*(_BYTE *)(a4 + 8LL * *(_QWORD *)v59 + 6) & 1) == 0 ) { v31 = (int)v24; if ( v27 == 4 ) v32 = ((_BYTE)Index - 1) & 3; else v32 = OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastMod3(int)::mod3Array[Index + 2]; v24 = (unsigned int)(v24 + 1); v56[v31] = *(_DWORD *)(FaceFVarValues + 4 * v32); } } else if ( (v61 & 1) != 0 ) { FaceEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(i, v21); v34 = v27 + Index; v35 = ~v27; if ( Index <= 0 ) v35 = -1; v36 = *(_DWORD *)(FaceEdges + 4LL * (v34 + v35)); EdgeFaces = (_DWORD *)OpenSubdiv::v3_6_0::Vtr::internal::Level::getEdgeFaces(i, v36); v21 = EdgeFaces[*EdgeFaces == v21]; v71 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceEdges(i, v21); v72 = v38; Index = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::FindIndex(&v71, v36); } else { v30 = v64; if ( (int)v23 + v70 < v64 ) v30 = 0; v21 = *(_DWORD *)(v68 - 4LL * v30 + 4 * v23); Index = *(unsigned __int16 *)(v69 - 2LL * v30 + 2 * v23); } ++v23; } } else { v39 = v73[0]; if ( (_DWORD)v13 == 4 ) { v24 = (unsigned int)OpenSubdiv::v3_6_0::Vtr::internal::Level::gatherQuadRegularRingAroundVertex( v11, v14, v73[0], a7); goto LABEL_40; } OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(v11, v14); v63 = v40; v57 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaces(v11, v14); v42 = v41; v43 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexFaceLocalIndices(v11, v14); v44 = v42; v45 = 0LL; if ( (int)v42 <= 0 ) v44 = 0LL; v24 = 0LL; while ( v44 != v45 ) { v46 = *(_DWORD *)(v57 + 4 * v45); if ( a7 < 0 ) v47 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(i, v46); else v47 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceFVarValues(i, v46, a7); v48 = v24 + 1; v49 = *(unsigned __int16 *)(v43 + 2 * v45); v39[(int)v24] = *(_DWORD *)(v47 + 4LL * OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastMod3(int)::mod3Array[v49 + 1]); if ( v63 > (int)v42 && (_DWORD)v42 - 1 == v45 ) { v39[v48] = *(_DWORD *)(v47 + 4LL * OpenSubdiv::v3_6_0::Far::`anonymous namespace'::fastMod3(int)::mod3Array[v49 + 2]); v48 = v24 + 2; } ++v45; v24 = v48; } } v10 = v58; a6 = v65; LABEL_40: if ( (unsigned int)OpenSubdiv::v3_6_0::Far::SourcePatch::GetCornerRingPoints( (OpenSubdiv::v3_6_0::Far::SourcePatch *)v66, v59[0], v74[0]) != (_DWORD)v24 ) __assert_fail( "patchRingSize == sourceRingSize", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp", 1217LL, "int OpenSubdiv::v3_6_0::Far::PatchBuilder::gatherIrregularSourcePoints(int, Index, const Level::VSpan *, SourceP" "atch &, Index *, int) const"); v50 = v74[0]; v51 = v73[0]; if ( (int)v24 <= 0 ) v24 = 0LL; for ( j = 0LL; v24 != j; ++j ) { v53 = v50[j]; if ( (int)v53 >= v10 ) __assert_fail( "patchRingPoints[i] < numSourceVerts", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp", 1221LL, "int OpenSubdiv::v3_6_0::Far::PatchBuilder::gatherIrregularSourcePoints(int, Index, const Level::VSpan *, Sourc" "ePatch &, Index *, int) const"); *(_DWORD *)(a6 + 4 * v53) = v51[j]; } v12 = *(_QWORD *)v59 + 1LL; } operator delete(v74[34]); operator delete(v73[34]); return (unsigned int)v10; }
gatherIrregularSourcePoints: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2b8 MOV R13,R9 MOV R12,R8 MOV qword ptr [RSP + 0x28],RCX MOV EBX,EDX MOV EBP,ESI MOV R15,RDI MOV R14D,dword ptr [R8 + 0x1c] MOV ESI,dword ptr [R8 + 0x24] LEA RDI,[RSP + 0x88] CALL 0x00154510 MOV qword ptr [RSP + 0x50],R12 MOV ESI,dword ptr [R12 + 0x24] LAB_00179d88: LEA RDI,[RSP + 0x1a0] CALL 0x00154510 MOV RAX,qword ptr [R15 + 0x8] MOVSXD RCX,EBP MOV RAX,qword ptr [RAX + 0x30] MOV R12,qword ptr [RAX + RCX*0x8] LAB_00179da4: MOV RDI,R12 MOV ESI,EBX CALL 0x00152db0 MOV qword ptr [RSP + 0x58],RAX XOR EDX,EDX MOV dword ptr [RSP + 0x1c],R14D MOV qword ptr [RSP + 0x48],R13 MOV qword ptr [RSP + 0x8],R12 LAB_00179dc4: MOV RAX,qword ptr [RSP + 0x50] MOVSXD RAX,dword ptr [RAX + 0x18] CMP RDX,RAX JGE 0x0017a164 MOV RCX,qword ptr [RSP + 0x58] MOVSXD RBP,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x20],RDX CMP word ptr [RCX + RDX*0x8],0x0 JZ 0x00179ff9 MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [R12 + 0x1b0] MOVZX EAX,word ptr [RAX + RBP*0x2] MOV word ptr [RSP + 0x30],AX LAB_00179e12: MOV RDI,R12 MOV ESI,EBP CALL 0x00155df0 MOV dword ptr [RSP + 0x44],EDX MOV RDI,R12 MOV R12,RAX MOV ESI,EBP CALL 0x001507c0 MOV RCX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOVZX ESI,word ptr [RCX + RDX*0x8] MOVZX ECX,word ptr [RCX + RDX*0x8 + 0x2] MOV EBP,dword ptr [R12 + RCX*0x4] MOVZX R15D,word ptr [RAX + RCX*0x2] LEA RAX,[RAX + RCX*0x2 + 0x2] MOV qword ptr [RSP + 0x68],RAX LEA RAX,[R12 + RCX*0x4] ADD RAX,0x4 MOV qword ptr [RSP + 0x60],RAX INC RCX MOV qword ptr [RSP + 0x70],RCX NEG ESI MOV qword ptr [RSP + 0x38],RSI XOR R13D,R13D XOR R12D,R12D LAB_00179e75: MOV RAX,qword ptr [RSP + 0x38] LEA R14,[RAX + R13*0x1] TEST R14D,R14D JZ 0x0017a0ef MOV EDX,dword ptr [RSP + 0x2f0] TEST EDX,EDX JS 0x00179ea0 LAB_00179e92: MOV RDI,qword ptr [RSP + 0x8] MOV ESI,EBP CALL 0x00153d20 JMP 0x00179eac LAB_00179ea0: MOV RDI,qword ptr [RSP + 0x8] MOV ESI,EBP CALL 0x00152db0 LAB_00179eac: MOV EBX,EDX LEA EDX,[R15 + 0x1] MOVSXD RCX,R12D CMP EBX,0x4 JNZ 0x00179ede AND EDX,0x3 MOV EDX,dword ptr [RAX + RDX*0x4] MOV RSI,qword ptr [RSP + 0x10] MOV dword ptr [RSI + RCX*0x4],EDX MOV EDX,R15D AND EDX,0x3 XOR EDX,0x2 MOV EDX,dword ptr [RAX + RDX*0x4] LEA R12D,[RCX + 0x2] MOV dword ptr [RSI + RCX*0x4 + 0x4],EDX JMP 0x00179efb LAB_00179ede: MOVSXD RDX,EDX LEA RSI,[0x1c25c0] MOVSXD RDX,dword ptr [RSI + RDX*0x4] MOV EDX,dword ptr [RAX + RDX*0x4] LEA R12D,[RCX + 0x1] MOV RSI,qword ptr [RSP + 0x10] MOV dword ptr [RSI + RCX*0x4],EDX LAB_00179efb: CMP R14D,-0x1 JZ 0x00179f4b TEST byte ptr [RSP + 0x30],0x1 JNZ 0x00179f71 MOV RAX,qword ptr [RSP + 0x70] ADD EAX,R13D MOV ECX,dword ptr [RSP + 0x44] CMP EAX,ECX MOV EAX,ECX MOV ECX,0x0 CMOVL EAX,ECX CDQE LEA RCX,[RAX*0x4] MOV RDX,qword ptr [RSP + 0x60] SUB RDX,RCX MOV EBP,dword ptr [RDX + R13*0x4] ADD RAX,RAX MOV RCX,qword ptr [RSP + 0x68] SUB RCX,RAX MOVZX R15D,word ptr [RCX + R13*0x2] JMP 0x00179ff1 LAB_00179f4b: MOV RCX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] TEST byte ptr [RCX + RDX*0x8 + 0x6],0x1 JNZ 0x00179ff1 MOVSXD RCX,R12D CMP EBX,0x4 JNZ 0x00179fd3 LEA EDX,[R15 + -0x1] AND EDX,0x3 JMP 0x00179fe2 LAB_00179f71: MOV RDI,qword ptr [RSP + 0x8] MOV ESI,EBP CALL 0x00152d60 LEA ECX,[RBX + R15*0x1] TEST R15D,R15D NOT EBX PUSH -0x1 POP RDX CMOVLE EBX,EDX ADD EBX,ECX MOVSXD RCX,EBX MOV EBX,dword ptr [RAX + RCX*0x4] MOV RDI,qword ptr [RSP + 0x8] MOV ESI,EBX CALL 0x00152330 XOR ECX,ECX CMP dword ptr [RAX],EBP SETZ CL MOV EBP,dword ptr [RAX + RCX*0x4] MOV RDI,qword ptr [RSP + 0x8] MOV ESI,EBP CALL 0x00152d60 MOV qword ptr [RSP + 0x78],RAX MOV dword ptr [RSP + 0x80],EDX LEA RDI,[RSP + 0x78] MOV ESI,EBX CALL 0x00152640 MOV R15D,EAX JMP 0x00179ff1 LAB_00179fd3: MOVSXD RDX,R15D LEA RSI,[0x1c25c0] MOVSXD RDX,dword ptr [RSI + RDX*0x4 + 0x8] LAB_00179fe2: MOV EAX,dword ptr [RAX + RDX*0x4] LEA R12D,[RCX + 0x1] MOV RDX,qword ptr [RSP + 0x10] MOV dword ptr [RDX + RCX*0x4],EAX LAB_00179ff1: INC R13 JMP 0x00179e75 LAB_00179ff9: MOV R15,qword ptr [RSP + 0x88] CMP EAX,0x4 JNZ 0x0017a022 LAB_0017a006: MOV RDI,R12 MOV ESI,EBP MOV RDX,R15 MOV ECX,dword ptr [RSP + 0x2f0] CALL 0x00155bb0 MOV R12D,EAX JMP 0x0017a0f9 LAB_0017a022: MOV RDI,R12 MOV ESI,EBP CALL 0x00154550 MOV dword ptr [RSP + 0x38],EDX MOV RDI,R12 MOV ESI,EBP CALL 0x00155df0 MOV qword ptr [RSP + 0x10],RAX MOV EBX,EDX MOV RDI,R12 MOV ESI,EBP CALL 0x001507c0 MOV RBP,RAX MOV R13,RBX LEA EAX,[RBX + -0x1] MOV qword ptr [RSP + 0x30],RAX XOR R14D,R14D TEST R13D,R13D CMOVLE R13D,R14D XOR R12D,R12D LAB_0017a066: CMP R13,R14 JZ 0x0017a0ef MOV RAX,qword ptr [RSP + 0x10] MOV ESI,dword ptr [RAX + R14*0x4] MOV EDX,dword ptr [RSP + 0x2f0] TEST EDX,EDX JS 0x0017a08f LAB_0017a083: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00153d20 JMP 0x0017a099 LAB_0017a08f: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00152db0 LAB_0017a099: LEA ECX,[R12 + 0x1] MOVZX EDX,word ptr [RBP + R14*0x2] LEA RSI,[0x1c25c0] MOVSXD RSI,dword ptr [RSI + RDX*0x4 + 0x4] MOV ESI,dword ptr [RAX + RSI*0x4] MOVSXD RDI,R12D MOV dword ptr [R15 + RDI*0x4],ESI CMP dword ptr [RSP + 0x38],EBX JLE 0x0017a0e4 CMP qword ptr [RSP + 0x30],R14 JNZ 0x0017a0e4 LEA RSI,[0x1c25c0] MOVSXD RDX,dword ptr [RSI + RDX*0x4 + 0x8] MOV EAX,dword ptr [RAX + RDX*0x4] ADD R12D,0x2 MOVSXD RCX,ECX MOV dword ptr [R15 + RCX*0x4],EAX MOV ECX,R12D LAB_0017a0e4: INC R14 MOV R12D,ECX JMP 0x0017a066 LAB_0017a0ef: MOV R14D,dword ptr [RSP + 0x1c] MOV R13,qword ptr [RSP + 0x48] LAB_0017a0f9: MOV RDX,qword ptr [RSP + 0x1a0] LAB_0017a101: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x20] CALL 0x00151ea0 LAB_0017a110: CMP EAX,R12D JNZ 0x0017a1b2 MOV RAX,qword ptr [RSP + 0x1a0] MOV RCX,qword ptr [RSP + 0x88] TEST R12D,R12D MOV EDX,0x0 CMOVLE R12D,EDX XOR EDX,EDX LAB_0017a137: CMP R12,RDX JZ 0x0017a152 MOVSXD RSI,dword ptr [RAX + RDX*0x4] CMP ESI,R14D JGE 0x0017a193 MOV EDI,dword ptr [RCX + RDX*0x4] MOV dword ptr [R13 + RSI*0x4],EDI INC RDX JMP 0x0017a137 LAB_0017a152: MOV RDX,qword ptr [RSP + 0x20] INC RDX MOV R12,qword ptr [RSP + 0x8] JMP 0x00179dc4 LAB_0017a164: MOV RDI,qword ptr [RSP + 0x2b0] CALL 0x001524d0 MOV RDI,qword ptr [RSP + 0x198] CALL 0x001524d0 MOV EAX,R14D ADD RSP,0x2b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017a193: LEA RDI,[0x1c2791] LEA RSI,[0x1c261a] LEA RCX,[0x1c2705] MOV EDX,0x4c5 CALL 0x001512a0 LAB_0017a1b2: LEA RDI,[0x1c26e5] LEA RSI,[0x1c261a] LEA RCX,[0x1c2705] MOV EDX,0x4c1 CALL 0x001512a0
/* OpenSubdiv::v3_6_0::Far::PatchBuilder::gatherIrregularSourcePoints(int, int, OpenSubdiv::v3_6_0::Vtr::internal::Level::VSpan const*, OpenSubdiv::v3_6_0::Far::SourcePatch&, int*, int) const */ int __thiscall OpenSubdiv::v3_6_0::Far::PatchBuilder::gatherIrregularSourcePoints (PatchBuilder *this,int param_1,int param_2,VSpan *param_3,SourcePatch *param_4, int *param_5,int param_6) { ushort uVar1; ushort uVar2; ushort uVar3; int iVar4; Level *this_00; int *piVar5; int iVar6; uint uVar7; long lVar8; long lVar9; long lVar10; int *piVar11; long lVar12; uint uVar13; int extraout_EDX; ulong uVar14; ulong uVar15; ulong uVar16; long lVar17; uint uVar18; int iVar19; uint uVar20; long lVar21; int1 auVar22 [12]; int1 auVar23 [12]; int1 local_270 [12]; int *local_260 [34]; void *local_150; int *local_148 [34]; void *local_38; iVar4 = *(int *)(param_4 + 0x1c); Vtr::internal::StackBuffer<int,64u,true>::StackBuffer ((StackBuffer<int,64u,true> *)local_260,*(uint *)(param_4 + 0x24)); /* try { // try from 00179d88 to 00179d94 has its CatchHandler @ 0017a1d3 */ Vtr::internal::StackBuffer<int,64u,true>::StackBuffer ((StackBuffer<int,64u,true> *)local_148,*(uint *)(param_4 + 0x24)); this_00 = *(Level **)(*(long *)(*(long *)(this + 8) + 0x30) + (long)param_1 * 8); /* try { // try from 00179da4 to 00179db2 has its CatchHandler @ 0017a1d1 */ lVar8 = Vtr::internal::Level::getFaceVertices(this_00,param_2); lVar17 = 0; while( true ) { piVar5 = local_260[0]; if (*(int *)(param_4 + 0x18) <= lVar17) { operator_delete(local_38); operator_delete(local_150); return iVar4; } iVar19 = *(int *)(lVar8 + lVar17 * 4); if (*(short *)(param_3 + lVar17 * 8) == 0) { if (*(int *)(param_4 + 0x18) == 4) { /* try { // try from 0017a006 to 0017a04a has its CatchHandler @ 0017a1da */ uVar20 = Vtr::internal::Level::gatherQuadRegularRingAroundVertex (this_00,iVar19,local_260[0],param_6); } else { Vtr::internal::Level::getVertexEdges(this_00,iVar19); auVar22 = Vtr::internal::Level::getVertexFaces(this_00,iVar19); uVar7 = auVar22._8_4_; lVar9 = Vtr::internal::Level::getVertexFaceLocalIndices(this_00,iVar19); uVar14 = 0; uVar16 = (ulong)uVar7; if ((int)uVar7 < 1) { uVar16 = uVar14; } uVar20 = 0; for (; uVar16 != uVar14; uVar14 = uVar14 + 1) { iVar19 = *(int *)(auVar22._0_8_ + uVar14 * 4); if (param_6 < 0) { lVar21 = Vtr::internal::Level::getFaceVertices(this_00,iVar19); } else { /* try { // try from 0017a083 to 0017a098 has its CatchHandler @ 0017a1dc */ lVar21 = Vtr::internal::Level::getFaceFVarValues(this_00,iVar19,param_6); } uVar18 = uVar20 + 1; uVar15 = (ulong)*(ushort *)(lVar9 + uVar14 * 2); piVar5[(int)uVar20] = *(int *)(lVar21 + (long)*(int *)((anonymous_namespace)::fastMod3(int)::mod3Array + uVar15 * 4 + 4) * 4); if (((int)uVar7 < extraout_EDX) && (uVar7 - 1 == uVar14)) { piVar5[(int)uVar18] = *(int *)(lVar21 + (long)*(int *)((anonymous_namespace)::fastMod3(int)::mod3Array + uVar15 * 4 + 8) * 4); uVar18 = uVar20 + 2; } uVar20 = uVar18; } } } else { uVar1 = *(ushort *)(*(long *)(this_00 + 0x1b0) + (long)iVar19 * 2); /* try { // try from 00179e12 to 00179e2c has its CatchHandler @ 0017a1da */ auVar22 = Vtr::internal::Level::getVertexFaces(this_00,iVar19); lVar9 = Vtr::internal::Level::getVertexFaceLocalIndices(this_00,iVar19); uVar2 = *(ushort *)(param_3 + lVar17 * 8); uVar3 = *(ushort *)(param_3 + lVar17 * 8 + 2); uVar16 = (ulong)uVar3; iVar19 = *(int *)(auVar22._0_8_ + uVar16 * 4); uVar7 = (uint)*(ushort *)(lVar9 + uVar16 * 2); lVar21 = 0; uVar20 = 0; while( true ) { uVar18 = (uint)lVar21; if (uVar18 == uVar2) break; if (param_6 < 0) { auVar23 = Vtr::internal::Level::getFaceVertices(this_00,iVar19); } else { /* try { // try from 00179e92 to 00179fb5 has its CatchHandler @ 0017a1de */ auVar23 = Vtr::internal::Level::getFaceFVarValues(this_00,iVar19,param_6); } uVar13 = auVar23._8_4_; lVar10 = auVar23._0_8_; if (uVar13 == 4) { piVar5[(int)uVar20] = *(int *)(lVar10 + (ulong)(uVar7 + 1 & 3) * 4); piVar5[(long)(int)uVar20 + 1] = *(int *)(lVar10 + (ulong)(uVar7 & 3 ^ 2) * 4); uVar20 = uVar20 + 2; } else { piVar5[(int)uVar20] = *(int *)(lVar10 + (long)*(int *)((anonymous_namespace)::fastMod3(int)::mod3Array + (long)(int)(uVar7 + 1) * 4) * 4); uVar20 = uVar20 + 1; } if (uVar18 - uVar2 == -1) { if (((byte)param_3[lVar17 * 8 + 6] & 1) == 0) { lVar12 = (long)(int)uVar20; if (uVar13 == 4) { uVar14 = (ulong)(uVar7 - 1 & 3); } else { uVar14 = (ulong)*(int *)((anonymous_namespace)::fastMod3(int)::mod3Array + (long)(int)uVar7 * 4 + 8); } uVar20 = uVar20 + 1; piVar5[lVar12] = *(int *)(lVar10 + uVar14 * 4); } } else if ((uVar1 & 1) == 0) { iVar6 = auVar22._8_4_; if ((int)(uVar3 + 1 + uVar18) < auVar22._8_4_) { iVar6 = 0; } iVar19 = *(int *)(auVar22._0_8_ + uVar16 * 4 + 4 + (long)iVar6 * -4 + lVar21 * 4); uVar7 = (uint)*(ushort *)(lVar9 + 2 + uVar16 * 2 + (long)iVar6 * -2 + lVar21 * 2); } else { lVar10 = Vtr::internal::Level::getFaceEdges(this_00,iVar19); uVar18 = ~uVar13; if ((int)uVar7 < 1) { uVar18 = 0xffffffff; } iVar6 = *(int *)(lVar10 + (long)(int)(uVar18 + uVar13 + uVar7) * 4); piVar11 = (int *)Vtr::internal::Level::getEdgeFaces(this_00,iVar6); iVar19 = piVar11[*piVar11 == iVar19]; auVar23 = Vtr::internal::Level::getFaceEdges(this_00,iVar19); local_270 = auVar23; uVar7 = Vtr::ConstArray<int>::FindIndex((ConstArray<int> *)local_270,iVar6); } lVar21 = lVar21 + 1; } } /* try { // try from 0017a101 to 0017a10f has its CatchHandler @ 0017a1d8 */ uVar7 = SourcePatch::GetCornerRingPoints(param_4,(int)lVar17,local_148[0]); if (uVar7 != uVar20) break; if ((int)uVar20 < 1) { uVar20 = 0; } for (uVar16 = 0; uVar20 != uVar16; uVar16 = uVar16 + 1) { if (iVar4 <= local_148[0][uVar16]) { /* WARNING: Subroutine does not return */ __assert_fail("patchRingPoints[i] < numSourceVerts", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp" ,0x4c5, "int OpenSubdiv::v3_6_0::Far::PatchBuilder::gatherIrregularSourcePoints(int, Index, const Level::VSpan *, SourcePatch &, Index *, int) const" ); } param_5[local_148[0][uVar16]] = local_260[0][uVar16]; } lVar17 = lVar17 + 1; } /* WARNING: Subroutine does not return */ __assert_fail("patchRingSize == sourceRingSize", "/workspace/llm4binary/github/2025_star3/NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchBuilder.cpp" ,0x4c1, "int OpenSubdiv::v3_6_0::Far::PatchBuilder::gatherIrregularSourcePoints(int, Index, const Level::VSpan *, SourcePatch &, Index *, int) const" ); }
39,270
my_hash_sort_utf8mb4
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb4(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { /* Remove end space. We do this to be able to compare 'A ' and 'A' as identical */ const uchar *e= skip_trailing_space(s, slen); my_hash_sort_utf8mb4_nopad(cs, s, e - s, nr1, nr2); }
O3
c
my_hash_sort_utf8mb4: pushq %rbp movq %rsp, %rbp leaq (%rsi,%rdx), %r10 cmpq $0x15, %rdx jb 0xcf8b7 movq %r10, %r9 andq $-0x4, %r9 cmpq %rsi, %r9 jbe 0xcf8b7 leaq 0x3(%rsi), %rdx andq $-0x4, %rdx movq %r10, %rax movb -0x1(%r10), %r11b cmpq %r9, %r10 jbe 0xcf8dc leaq -0x1(%rax), %r10 cmpb $0x20, %r11b je 0xcf89f jmp 0xcf8ba movq %r10, %rax movq %rax, %r9 subq %rsi, %r9 movq %r9, %rdx cmpq %rsi, %rax jbe 0xcf8d6 cmpb $0x20, -0x1(%rax) leaq -0x1(%rax), %rax leaq -0x1(%rdx), %r9 je 0xcf8c0 popq %rbp jmp 0xcfb60 cmpb $0x20, %r11b setne %r10b cmpq %r9, %rdx setae %r9b orb %r10b, %r9b jne 0xcf8ba movq %rax, %r9 movq %r9, %rax cmpq %rdx, %r9 jbe 0xcf8ba leaq -0x4(%rax), %r9 cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 je 0xcf8f3 jmp 0xcf8ba
my_hash_sort_utf8mb4: push rbp mov rbp, rsp lea r10, [rsi+rdx] cmp rdx, 15h jb short loc_CF8B7 mov r9, r10 and r9, 0FFFFFFFFFFFFFFFCh cmp r9, rsi jbe short loc_CF8B7 lea rdx, [rsi+3] and rdx, 0FFFFFFFFFFFFFFFCh loc_CF89F: mov rax, r10 mov r11b, [r10-1] cmp r10, r9 jbe short loc_CF8DC lea r10, [rax-1] cmp r11b, 20h ; ' ' jz short loc_CF89F jmp short loc_CF8BA loc_CF8B7: mov rax, r10 loc_CF8BA: mov r9, rax sub r9, rsi loc_CF8C0: mov rdx, r9 cmp rax, rsi jbe short loc_CF8D6 cmp byte ptr [rax-1], 20h ; ' ' lea rax, [rax-1] lea r9, [rdx-1] jz short loc_CF8C0 loc_CF8D6: pop rbp jmp my_hash_sort_utf8mb4_nopad loc_CF8DC: cmp r11b, 20h ; ' ' setnz r10b cmp rdx, r9 setnb r9b or r9b, r10b jnz short loc_CF8BA mov r9, rax loc_CF8F3: mov rax, r9 cmp r9, rdx jbe short loc_CF8BA lea r9, [rax-4] cmp dword ptr [rax-4], 20202020h jz short loc_CF8F3 jmp short loc_CF8BA
long long my_hash_sort_utf8mb4(long long a1, unsigned long long a2, unsigned long long a3, long long a4, long long a5) { unsigned long long v5; // r10 unsigned long long v6; // r9 unsigned long long v7; // rdx unsigned long long v8; // rax char v9; // r11 unsigned long long v10; // r9 unsigned long long v11; // rdx bool v12; // zf unsigned long long v14; // r9 v5 = a2 + a3; if ( a3 < 0x15 || (v6 = v5 & 0xFFFFFFFFFFFFFFFCLL, (v5 & 0xFFFFFFFFFFFFFFFCLL) <= a2) ) { v8 = a2 + a3; } else { v7 = (a2 + 3) & 0xFFFFFFFFFFFFFFFCLL; while ( 1 ) { v8 = v5; v9 = *(_BYTE *)(v5 - 1); if ( v5 <= v6 ) break; --v5; if ( v9 != 32 ) goto LABEL_8; } if ( v9 == 32 && v7 < v6 ) { v14 = v5; do { v8 = v14; if ( v14 <= v7 ) break; v14 -= 4LL; } while ( *(_DWORD *)(v8 - 4) == 538976288 ); } } LABEL_8: v10 = v8 - a2; do { v11 = v10; if ( v8 <= a2 ) break; v12 = *(_BYTE *)--v8 == 32; --v10; } while ( v12 ); return my_hash_sort_utf8mb4_nopad(a1, a2, v11, a4, a5, v10); }
my_hash_sort_utf8mb4: PUSH RBP MOV RBP,RSP LEA R10,[RSI + RDX*0x1] CMP RDX,0x15 JC 0x001cf8b7 MOV R9,R10 AND R9,-0x4 CMP R9,RSI JBE 0x001cf8b7 LEA RDX,[RSI + 0x3] AND RDX,-0x4 LAB_001cf89f: MOV RAX,R10 MOV R11B,byte ptr [R10 + -0x1] CMP R10,R9 JBE 0x001cf8dc LEA R10,[RAX + -0x1] CMP R11B,0x20 JZ 0x001cf89f JMP 0x001cf8ba LAB_001cf8b7: MOV RAX,R10 LAB_001cf8ba: MOV R9,RAX SUB R9,RSI LAB_001cf8c0: MOV RDX,R9 CMP RAX,RSI JBE 0x001cf8d6 CMP byte ptr [RAX + -0x1],0x20 LEA RAX,[RAX + -0x1] LEA R9,[RDX + -0x1] JZ 0x001cf8c0 LAB_001cf8d6: POP RBP JMP 0x001cfb60 LAB_001cf8dc: CMP R11B,0x20 SETNZ R10B CMP RDX,R9 SETNC R9B OR R9B,R10B JNZ 0x001cf8ba MOV R9,RAX LAB_001cf8f3: MOV RAX,R9 CMP R9,RDX JBE 0x001cf8ba LEA R9,[RAX + -0x4] CMP dword ptr [RAX + -0x4],0x20202020 JZ 0x001cf8f3 JMP 0x001cf8ba
void my_hash_sort_utf8mb4(int8 param_1,ulong param_2,ulong param_3) { char *pcVar1; ulong uVar2; ulong uVar3; ulong uVar4; ulong uVar5; uVar3 = param_2 + param_3; if ((0x14 < param_3) && (uVar5 = uVar3 & 0xfffffffffffffffc, param_2 < uVar5)) { uVar4 = param_2 + 3 & 0xfffffffffffffffc; uVar2 = uVar3; do { uVar3 = uVar2; if (uVar3 <= uVar5) { uVar2 = uVar3; if (uVar4 < uVar5 && *(char *)(uVar3 - 1) == ' ') goto LAB_001cf8f3; break; } uVar2 = uVar3 - 1; } while (*(char *)(uVar3 - 1) == ' '); } goto LAB_001cf8c0; while (uVar2 = uVar3 - 4, *(int *)(uVar3 - 4) == 0x20202020) { LAB_001cf8f3: uVar3 = uVar2; if (uVar3 <= uVar4) break; } LAB_001cf8c0: do { if (uVar3 <= param_2) break; pcVar1 = (char *)(uVar3 - 1); uVar3 = uVar3 - 1; } while (*pcVar1 == ' '); my_hash_sort_utf8mb4_nopad(); return; }
39,271
simple_key_cache_read
eloqsql/mysys/mf_keycache.c
uchar *simple_key_cache_read(SIMPLE_KEY_CACHE_CB *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, uint block_length __attribute__((unused)), int return_buffer __attribute__((unused))) { my_bool locked_and_incremented= FALSE; int error=0; uchar *start= buff; DBUG_ENTER("simple_key_cache_read"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file, (ulong) filepos, length)); if (keycache->key_cache_inited) { /* Key cache is used */ reg1 BLOCK_LINK *block; uint read_length; uint offset; int page_st; if (MYSQL_KEYCACHE_READ_START_ENABLED()) { MYSQL_KEYCACHE_READ_START(my_filename(file), length, (ulong) (keycache->blocks_used * keycache->key_cache_block_size), (ulong) (keycache->blocks_unused * keycache->key_cache_block_size)); } /* When the key cache is once initialized, we use the cache_lock to reliably distinguish the cases of normal operation, resizing, and disabled cache. We always increment and decrement 'cnt_for_resize_op' so that a resizer can wait for pending I/O. */ keycache_pthread_mutex_lock(&keycache->cache_lock); /* Cache resizing has two phases: Flushing and re-initializing. In the flush phase read requests are allowed to bypass the cache for blocks not in the cache. find_key_block() returns NULL in this case. After the flush phase new I/O requests must wait until the re-initialization is done. The re-initialization can be done only if no I/O request is in progress. The reason is that key_cache_block_size can change. With enabled cache, I/O is done in chunks of key_cache_block_size. Every chunk tries to use a cache block first. If the block size changes in the middle, a block could be missed and old data could be read. */ while (keycache->in_resize && !keycache->resize_in_flush) wait_on_queue(&keycache->resize_queue, &keycache->cache_lock); /* Register the I/O for the next resize. */ inc_counter_for_resize_op(keycache); locked_and_incremented= TRUE; /* Requested data may not always be aligned to cache blocks. */ offset= (uint) (filepos % keycache->key_cache_block_size); /* Read data in key_cache_block_size increments */ do { /* Cache could be disabled in a later iteration. */ if (!keycache->can_be_used) { KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache cannot be used")); goto no_key_cache; } /* Start reading at the beginning of the cache block. */ filepos-= offset; /* Do not read beyond the end of the cache block. */ read_length= length; set_if_smaller(read_length, keycache->key_cache_block_size-offset); KEYCACHE_DBUG_ASSERT(read_length > 0); /* Request the cache block that matches file/pos. */ keycache->global_cache_r_requests++; MYSQL_KEYCACHE_READ_BLOCK(keycache->key_cache_block_size); block=find_key_block(keycache, file, filepos, level, 0, &page_st); if (!block) { /* This happens only for requests submitted during key cache resize. The block is not in the cache and shall not go in. Read directly from file. */ keycache->global_cache_read++; keycache_pthread_mutex_unlock(&keycache->cache_lock); error= (my_pread(file, (uchar*) buff, read_length, filepos + offset, MYF(MY_NABP)) != 0); keycache_pthread_mutex_lock(&keycache->cache_lock); goto next_block; } if (!(block->status & BLOCK_ERROR)) { if (page_st == PAGE_TO_BE_READ) { MYSQL_KEYCACHE_READ_MISS(); read_block_primary(keycache, block, keycache->key_cache_block_size, read_length+offset); } else if (page_st == PAGE_WAIT_TO_BE_READ) { MYSQL_KEYCACHE_READ_MISS(); /* The requested page is to be read into the block buffer */ read_block_secondary(keycache, block); /* A secondary request must now have the block assigned to the requested file block. */ DBUG_ASSERT(block->hash_link->file == file); DBUG_ASSERT(block->hash_link->diskpos == filepos); } else if (block->length < read_length + offset) { /* Impossible if nothing goes wrong: this could only happen if we are using a file with small key blocks and are trying to read outside the file */ my_errno= -1; block->status|= BLOCK_ERROR; } else { MYSQL_KEYCACHE_READ_HIT(); } } /* block status may have added BLOCK_ERROR in the above 'if'. */ if (!(block->status & BLOCK_ERROR)) { { DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); #if !defined(SERIALIZED_READ_FROM_CACHE) keycache_pthread_mutex_unlock(&keycache->cache_lock); #endif /* Copy data from the cache buffer */ memcpy(buff, block->buffer+offset, (size_t) read_length); #if !defined(SERIALIZED_READ_FROM_CACHE) keycache_pthread_mutex_lock(&keycache->cache_lock); DBUG_ASSERT(block->status & (BLOCK_READ | BLOCK_IN_USE)); #endif } } remove_reader(block); /* Error injection for coverage testing. */ DBUG_EXECUTE_IF("key_cache_read_block_error", block->status|= BLOCK_ERROR;); /* Do not link erroneous blocks into the LRU ring, but free them. */ if (!(block->status & BLOCK_ERROR)) { /* Link the block into the LRU ring if it's the last submitted request for the block. This enables eviction for the block. */ unreg_request(keycache, block, 1); } else { free_block(keycache, block); error= 1; break; } next_block: buff+= read_length; filepos+= read_length+offset; offset= 0; } while ((length-= read_length)); if (MYSQL_KEYCACHE_READ_DONE_ENABLED()) { MYSQL_KEYCACHE_READ_DONE((ulong) (keycache->blocks_used * keycache->key_cache_block_size), (ulong) (keycache->blocks_unused * keycache->key_cache_block_size)); } goto end; } KEYCACHE_DBUG_PRINT("key_cache_read", ("keycache not initialized")); no_key_cache: /* Key cache is not used */ keycache->global_cache_r_requests++; keycache->global_cache_read++; if (locked_and_incremented) keycache_pthread_mutex_unlock(&keycache->cache_lock); if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP))) error= 1; if (locked_and_incremented) keycache_pthread_mutex_lock(&keycache->cache_lock); end: if (locked_and_incremented) { dec_counter_for_resize_op(keycache); keycache_pthread_mutex_unlock(&keycache->cache_lock); } DBUG_PRINT("exit", ("error: %d", error )); DBUG_RETURN(error ? (uchar*) 0 : start); }
O0
c
simple_key_cache_read: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movb $0x0, -0x2d(%rbp) movl $0x0, -0x34(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0xe75d9 movq -0x8(%rbp), %rax cmpb $0x0, (%rax) je 0xe78cf movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x76866(%rip), %rsi # 0x15de5e movl $0xaf2, %edx # imm = 0xAF2 callq 0xe79b0 movq -0x8(%rbp), %rax movsbl 0x1(%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x55(%rbp) je 0xe7624 movq -0x8(%rbp), %rax cmpb $0x0, 0x2(%rax) setne %al xorb $-0x1, %al movb %al, -0x55(%rbp) movb -0x55(%rbp), %al testb $0x1, %al jne 0xe762d jmp 0xe764a movq -0x8(%rbp), %rdi addq $0x108, %rdi # imm = 0x108 movq -0x8(%rbp), %rsi addq $0xc0, %rsi callq 0xe7a20 jmp 0xe7602 movq -0x8(%rbp), %rdi callq 0xe7ad0 movb $0x1, -0x2d(%rbp) movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx movl 0x18(%rcx), %ecx xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x50(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x3(%rax) jne 0xe767f jmp 0xe7678 jmp 0xe767a jmp 0xe78d5 movl -0x50(%rbp), %eax movl %eax, %ecx movq -0x18(%rbp), %rax subq %rcx, %rax movq %rax, -0x18(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x4c(%rbp) movl -0x4c(%rbp), %eax movq -0x8(%rbp), %rcx movl 0x18(%rcx), %ecx subl -0x50(%rbp), %ecx cmpl %ecx, %eax jbe 0xe76b3 movq -0x8(%rbp), %rax movl 0x18(%rax), %eax subl -0x50(%rbp), %eax movl %eax, -0x4c(%rbp) jmp 0xe76b5 jmp 0xe76b7 jmp 0xe76b9 movq -0x8(%rbp), %rax movq 0x150(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x150(%rax) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx xorl %r8d, %r8d leaq -0x54(%rbp), %r9 callq 0xe7af0 movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) jne 0xe776b movq -0x8(%rbp), %rax movq 0x158(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x158(%rax) movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe83d0 movl -0xc(%rbp), %edi movq -0x28(%rbp), %rsi movl -0x4c(%rbp), %eax movl %eax, %edx movq -0x18(%rbp), %rcx movl -0x50(%rbp), %eax addq %rax, %rcx movl $0x4, %r8d callq 0xfce90 cmpq $0x0, %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x34(%rbp) movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x76702(%rip), %rsi # 0x15de5e movl $0xb29, %edx # imm = 0xB29 callq 0xe79b0 jmp 0xe788f movq -0x48(%rbp), %rax movl 0x50(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xe77ea cmpl $0x1, -0x54(%rbp) jne 0xe779c movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x8(%rbp), %rax movl 0x18(%rax), %edx movl -0x4c(%rbp), %ecx addl -0x50(%rbp), %ecx callq 0xe8430 jmp 0xe77e8 cmpl $0x2, -0x54(%rbp) jne 0xe77b7 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0xe8530 jmp 0xe77b1 jmp 0xe77b3 jmp 0xe77b5 jmp 0xe77e6 movq -0x48(%rbp), %rax movl 0x4c(%rax), %eax movl -0x4c(%rbp), %ecx addl -0x50(%rbp), %ecx cmpl %ecx, %eax jae 0xe77e2 callq 0xfe8f0 movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movq -0x48(%rbp), %rax movl 0x50(%rax), %ecx orl $0x1, %ecx movl %ecx, 0x50(%rax) jmp 0xe77e4 jmp 0xe77e4 jmp 0xe77e6 jmp 0xe77e8 jmp 0xe77ea movq -0x48(%rbp), %rax movl 0x50(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xe7849 jmp 0xe77fb jmp 0xe77fd movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe83d0 movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rax movq 0x40(%rax), %rsi movl -0x50(%rbp), %eax addq %rax, %rsi movl -0x4c(%rbp), %eax movl %eax, %edx callq 0x2a0b0 movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x76623(%rip), %rsi # 0x15de5e movl $0xb5e, %edx # imm = 0xB5E callq 0xe79b0 jmp 0xe7847 jmp 0xe7849 movq -0x48(%rbp), %rdi callq 0xe8570 jmp 0xe7854 movq -0x48(%rbp), %rax movl 0x50(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xe7877 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x1, %edx callq 0xe85d0 jmp 0xe788d movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi callq 0xe8760 movl $0x1, -0x34(%rbp) jmp 0xe78ca jmp 0xe788f movl -0x4c(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x28(%rbp) movl -0x4c(%rbp), %eax addl -0x50(%rbp), %eax movl %eax, %eax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) movl $0x0, -0x50(%rbp) movl -0x4c(%rbp), %ecx movl -0x2c(%rbp), %eax subl %ecx, %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0xe766c jmp 0xe7963 jmp 0xe78d1 jmp 0xe78d3 jmp 0xe78d5 movq -0x8(%rbp), %rax movq 0x150(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x150(%rax) movq -0x8(%rbp), %rax movq 0x158(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x158(%rax) cmpb $0x0, -0x2d(%rbp) je 0xe7917 movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe83d0 movl -0xc(%rbp), %edi movq -0x28(%rbp), %rsi movl -0x2c(%rbp), %eax movl %eax, %edx movq -0x18(%rbp), %rcx movl $0x4, %r8d callq 0xfce90 cmpq $0x0, %rax je 0xe793f movl $0x1, -0x34(%rbp) cmpb $0x0, -0x2d(%rbp) je 0xe7961 movq -0x8(%rbp), %rdi addq $0xc0, %rdi leaq 0x76507(%rip), %rsi # 0x15de5e movl $0xb96, %edx # imm = 0xB96 callq 0xe79b0 jmp 0xe7963 cmpb $0x0, -0x2d(%rbp) je 0xe7982 movq -0x8(%rbp), %rdi callq 0xe88d0 movq -0x8(%rbp), %rdi addq $0xc0, %rdi callq 0xe83d0 jmp 0xe7984 jmp 0xe7986 jmp 0xe7988 cmpl $0x0, -0x34(%rbp) je 0xe7996 xorl %eax, %eax movq %rax, -0x60(%rbp) jmp 0xe799e movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax addq $0x70, %rsp popq %rbp retq
simple_key_cache_read: push rbp mov rbp, rsp sub rsp, 70h mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_2C], r9d mov [rbp+var_2D], 0 mov [rbp+var_34], 0 mov rax, [rbp+var_28] mov [rbp+var_40], rax jmp short $+2 loc_E75D9: mov rax, [rbp+var_8] cmp byte ptr [rax], 0 jz loc_E78CF mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0AF2h call inline_mysql_mutex_lock_24 loc_E7602: mov rax, [rbp+var_8] movsx ecx, byte ptr [rax+1] xor eax, eax cmp ecx, 0 mov [rbp+var_55], al jz short loc_E7624 mov rax, [rbp+var_8] cmp byte ptr [rax+2], 0 setnz al xor al, 0FFh mov [rbp+var_55], al loc_E7624: mov al, [rbp+var_55] test al, 1 jnz short loc_E762D jmp short loc_E764A loc_E762D: mov rdi, [rbp+var_8] add rdi, 108h mov rsi, [rbp+var_8] add rsi, 0C0h call wait_on_queue jmp short loc_E7602 loc_E764A: mov rdi, [rbp+var_8] call inc_counter_for_resize_op_0 mov [rbp+var_2D], 1 mov rax, [rbp+var_18] mov rcx, [rbp+var_8] mov ecx, [rcx+18h] xor edx, edx div rcx mov eax, edx mov [rbp+var_50], eax loc_E766C: mov rax, [rbp+var_8] cmp byte ptr [rax+3], 0 jnz short loc_E767F jmp short $+2 loc_E7678: jmp short $+2 loc_E767A: jmp loc_E78D5 loc_E767F: mov eax, [rbp+var_50] mov ecx, eax mov rax, [rbp+var_18] sub rax, rcx mov [rbp+var_18], rax mov eax, [rbp+var_2C] mov [rbp+var_4C], eax mov eax, [rbp+var_4C] mov rcx, [rbp+var_8] mov ecx, [rcx+18h] sub ecx, [rbp+var_50] cmp eax, ecx jbe short loc_E76B3 mov rax, [rbp+var_8] mov eax, [rax+18h] sub eax, [rbp+var_50] mov [rbp+var_4C], eax loc_E76B3: jmp short $+2 loc_E76B5: jmp short $+2 loc_E76B7: jmp short $+2 loc_E76B9: mov rax, [rbp+var_8] mov rcx, [rax+150h] add rcx, 1 mov [rax+150h], rcx mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] xor r8d, r8d lea r9, [rbp+var_54] call find_key_block mov [rbp+var_48], rax cmp [rbp+var_48], 0 jnz short loc_E776B mov rax, [rbp+var_8] mov rcx, [rax+158h] add rcx, 1 mov [rax+158h], rcx mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_25 mov edi, [rbp+var_C] mov rsi, [rbp+var_28] mov eax, [rbp+var_4C] mov edx, eax mov rcx, [rbp+var_18] mov eax, [rbp+var_50] add rcx, rax mov r8d, 4 call my_pread cmp rax, 0 setnz al and al, 1 movzx eax, al mov [rbp+var_34], eax mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B29h call inline_mysql_mutex_lock_24 jmp loc_E788F loc_E776B: mov rax, [rbp+var_48] mov eax, [rax+50h] and eax, 1 cmp eax, 0 jnz short loc_E77EA cmp [rbp+var_54], 1 jnz short loc_E779C mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov rax, [rbp+var_8] mov edx, [rax+18h] mov ecx, [rbp+var_4C] add ecx, [rbp+var_50] call read_block_primary jmp short loc_E77E8 loc_E779C: cmp [rbp+var_54], 2 jnz short loc_E77B7 mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] call read_block_secondary jmp short $+2 loc_E77B1: jmp short $+2 loc_E77B3: jmp short $+2 loc_E77B5: jmp short loc_E77E6 loc_E77B7: mov rax, [rbp+var_48] mov eax, [rax+4Ch] mov ecx, [rbp+var_4C] add ecx, [rbp+var_50] cmp eax, ecx jnb short loc_E77E2 call _my_thread_var mov dword ptr [rax], 0FFFFFFFFh mov rax, [rbp+var_48] mov ecx, [rax+50h] or ecx, 1 mov [rax+50h], ecx jmp short loc_E77E4 loc_E77E2: jmp short $+2 loc_E77E4: jmp short $+2 loc_E77E6: jmp short $+2 loc_E77E8: jmp short $+2 loc_E77EA: mov rax, [rbp+var_48] mov eax, [rax+50h] and eax, 1 cmp eax, 0 jnz short loc_E7849 jmp short $+2 loc_E77FB: jmp short $+2 loc_E77FD: mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_25 mov rdi, [rbp+var_28] mov rax, [rbp+var_48] mov rsi, [rax+40h] mov eax, [rbp+var_50] add rsi, rax mov eax, [rbp+var_4C] mov edx, eax call _memcpy mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B5Eh call inline_mysql_mutex_lock_24 jmp short $+2 loc_E7847: jmp short $+2 loc_E7849: mov rdi, [rbp+var_48] call remove_reader_0 jmp short $+2 loc_E7854: mov rax, [rbp+var_48] mov eax, [rax+50h] and eax, 1 cmp eax, 0 jnz short loc_E7877 mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov edx, 1 call unreg_request_0 jmp short loc_E788D loc_E7877: mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] call free_block_0 mov [rbp+var_34], 1 jmp short loc_E78CA loc_E788D: jmp short $+2 loc_E788F: mov ecx, [rbp+var_4C] mov rax, [rbp+var_28] mov ecx, ecx add rax, rcx mov [rbp+var_28], rax mov eax, [rbp+var_4C] add eax, [rbp+var_50] mov eax, eax add rax, [rbp+var_18] mov [rbp+var_18], rax mov [rbp+var_50], 0 mov ecx, [rbp+var_4C] mov eax, [rbp+var_2C] sub eax, ecx mov [rbp+var_2C], eax cmp eax, 0 jnz loc_E766C loc_E78CA: jmp loc_E7963 loc_E78CF: jmp short $+2 loc_E78D1: jmp short $+2 loc_E78D3: jmp short $+2 loc_E78D5: mov rax, [rbp+var_8] mov rcx, [rax+150h] add rcx, 1 mov [rax+150h], rcx mov rax, [rbp+var_8] mov rcx, [rax+158h] add rcx, 1 mov [rax+158h], rcx cmp [rbp+var_2D], 0 jz short loc_E7917 mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_25 loc_E7917: mov edi, [rbp+var_C] mov rsi, [rbp+var_28] mov eax, [rbp+var_2C] mov edx, eax mov rcx, [rbp+var_18] mov r8d, 4 call my_pread cmp rax, 0 jz short loc_E793F mov [rbp+var_34], 1 loc_E793F: cmp [rbp+var_2D], 0 jz short loc_E7961 mov rdi, [rbp+var_8] add rdi, 0C0h lea rsi, aWorkspaceLlm4b_37; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0B96h call inline_mysql_mutex_lock_24 loc_E7961: jmp short $+2 loc_E7963: cmp [rbp+var_2D], 0 jz short loc_E7982 mov rdi, [rbp+var_8] call dec_counter_for_resize_op_0 mov rdi, [rbp+var_8] add rdi, 0C0h call inline_mysql_mutex_unlock_25 loc_E7982: jmp short $+2 loc_E7984: jmp short $+2 loc_E7986: jmp short $+2 loc_E7988: cmp [rbp+var_34], 0 jz short loc_E7996 xor eax, eax mov [rbp+var_60], rax jmp short loc_E799E loc_E7996: mov rax, [rbp+var_40] mov [rbp+var_60], rax loc_E799E: mov rax, [rbp+var_60] mov [rbp+var_68], rax mov rax, [rbp+var_68] add rsp, 70h pop rbp retn
long long simple_key_cache_read( _BYTE *a1, unsigned int a2, unsigned long long a3, unsigned int a4, long long a5, unsigned int a6) { _BYTE *v6; // rdi const char *v7; // rsi char v10; // [rsp+1Bh] [rbp-55h] int v11; // [rsp+1Ch] [rbp-54h] BYREF unsigned int v12; // [rsp+20h] [rbp-50h] unsigned int v13; // [rsp+24h] [rbp-4Ch] long long key_block; // [rsp+28h] [rbp-48h] long long v15; // [rsp+30h] [rbp-40h] BOOL v16; // [rsp+3Ch] [rbp-34h] char v17; // [rsp+43h] [rbp-2Dh] unsigned int v18; // [rsp+44h] [rbp-2Ch] long long v19; // [rsp+48h] [rbp-28h] unsigned int v20; // [rsp+54h] [rbp-1Ch] unsigned long long v21; // [rsp+58h] [rbp-18h] unsigned int v22; // [rsp+64h] [rbp-Ch] _BYTE *v23; // [rsp+68h] [rbp-8h] v23 = a1; v22 = a2; v21 = a3; v20 = a4; v19 = a5; v18 = a6; v17 = 0; v16 = 0; v15 = a5; if ( *a1 ) { inline_mysql_mutex_lock_24(v23 + 192, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 2802LL); while ( 1 ) { v10 = 0; if ( v23[1] ) v10 = ~(v23[2] != 0); if ( (v10 & 1) == 0 ) break; wait_on_queue(v23 + 264, v23 + 192); } inc_counter_for_resize_op_0(v23); v17 = 1; v12 = v21 % *((unsigned int *)v23 + 6); while ( v23[3] ) { v21 -= v12; v13 = v18; if ( v18 > *((_DWORD *)v23 + 6) - v12 ) v13 = *((_DWORD *)v23 + 6) - v12; ++*((_QWORD *)v23 + 42); v6 = v23; v7 = (const char *)v22; key_block = find_key_block(v23, v22, v21, v20, 0LL, &v11); if ( key_block ) { if ( (*(_DWORD *)(key_block + 80) & 1) == 0 ) { if ( v11 == 1 ) { read_block_primary(v23, key_block, *((unsigned int *)v23 + 6), v12 + v13); } else if ( v11 == 2 ) { read_block_secondary(v23, key_block); } else if ( *(_DWORD *)(key_block + 76) < v12 + v13 ) { *(_DWORD *)my_thread_var(v6, v7) = -1; *(_DWORD *)(key_block + 80) |= 1u; } } if ( (*(_DWORD *)(key_block + 80) & 1) == 0 ) { inline_mysql_mutex_unlock_25(v23 + 192); memcpy(v19, v12 + *(_QWORD *)(key_block + 64), v13); inline_mysql_mutex_lock_24(v23 + 192, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 2910LL); } remove_reader_0(key_block); if ( (*(_DWORD *)(key_block + 80) & 1) != 0 ) { free_block_0(v23, key_block); v16 = 1; goto LABEL_33; } unreg_request_0(v23, key_block, 1LL); } else { ++*((_QWORD *)v23 + 43); inline_mysql_mutex_unlock_25(v23 + 192); v16 = my_pread(v22, v19, v13, v12 + v21, 4LL) != 0; inline_mysql_mutex_lock_24(v23 + 192, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 2857LL); } v19 += v13; v21 += v12 + v13; v12 = 0; v18 -= v13; if ( !v18 ) goto LABEL_33; } } ++*((_QWORD *)v23 + 42); ++*((_QWORD *)v23 + 43); if ( v17 ) inline_mysql_mutex_unlock_25(v23 + 192); if ( my_pread(v22, v19, v18, v21, 4LL) ) v16 = 1; if ( v17 ) inline_mysql_mutex_lock_24(v23 + 192, "/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 2966LL); LABEL_33: if ( v17 ) { dec_counter_for_resize_op_0(v23); inline_mysql_mutex_unlock_25(v23 + 192); } if ( v16 ) return 0LL; else return v15; }
simple_key_cache_read: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV dword ptr [RBP + -0x2c],R9D MOV byte ptr [RBP + -0x2d],0x0 MOV dword ptr [RBP + -0x34],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX JMP 0x001e75d9 LAB_001e75d9: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX],0x0 JZ 0x001e78cf MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x25de5e] MOV EDX,0xaf2 CALL 0x001e79b0 LAB_001e7602: MOV RAX,qword ptr [RBP + -0x8] MOVSX ECX,byte ptr [RAX + 0x1] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x55],AL JZ 0x001e7624 MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x2],0x0 SETNZ AL XOR AL,0xff MOV byte ptr [RBP + -0x55],AL LAB_001e7624: MOV AL,byte ptr [RBP + -0x55] TEST AL,0x1 JNZ 0x001e762d JMP 0x001e764a LAB_001e762d: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x108 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0xc0 CALL 0x001e7a20 JMP 0x001e7602 LAB_001e764a: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e7ad0 MOV byte ptr [RBP + -0x2d],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x18] XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x50],EAX LAB_001e766c: MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x3],0x0 JNZ 0x001e767f JMP 0x001e7678 LAB_001e7678: JMP 0x001e767a LAB_001e767a: JMP 0x001e78d5 LAB_001e767f: MOV EAX,dword ptr [RBP + -0x50] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] SUB RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4c],EAX MOV EAX,dword ptr [RBP + -0x4c] MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,dword ptr [RBP + -0x50] CMP EAX,ECX JBE 0x001e76b3 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x18] SUB EAX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x4c],EAX LAB_001e76b3: JMP 0x001e76b5 LAB_001e76b5: JMP 0x001e76b7 LAB_001e76b7: JMP 0x001e76b9 LAB_001e76b9: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x150] ADD RCX,0x1 MOV qword ptr [RAX + 0x150],RCX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] XOR R8D,R8D LEA R9,[RBP + -0x54] CALL 0x001e7af0 MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JNZ 0x001e776b MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x158] ADD RCX,0x1 MOV qword ptr [RAX + 0x158],RCX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e83d0 MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x4c] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x50] ADD RCX,RAX MOV R8D,0x4 CALL 0x001fce90 CMP RAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x34],EAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x25de5e] MOV EDX,0xb29 CALL 0x001e79b0 JMP 0x001e788f LAB_001e776b: MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001e77ea CMP dword ptr [RBP + -0x54],0x1 JNZ 0x001e779c MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x4c] ADD ECX,dword ptr [RBP + -0x50] CALL 0x001e8430 JMP 0x001e77e8 LAB_001e779c: CMP dword ptr [RBP + -0x54],0x2 JNZ 0x001e77b7 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] CALL 0x001e8530 JMP 0x001e77b1 LAB_001e77b1: JMP 0x001e77b3 LAB_001e77b3: JMP 0x001e77b5 LAB_001e77b5: JMP 0x001e77e6 LAB_001e77b7: MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x4c] MOV ECX,dword ptr [RBP + -0x4c] ADD ECX,dword ptr [RBP + -0x50] CMP EAX,ECX JNC 0x001e77e2 CALL 0x001fe8f0 MOV dword ptr [RAX],0xffffffff MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0x50] OR ECX,0x1 MOV dword ptr [RAX + 0x50],ECX JMP 0x001e77e4 LAB_001e77e2: JMP 0x001e77e4 LAB_001e77e4: JMP 0x001e77e6 LAB_001e77e6: JMP 0x001e77e8 LAB_001e77e8: JMP 0x001e77ea LAB_001e77ea: MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001e7849 JMP 0x001e77fb LAB_001e77fb: JMP 0x001e77fd LAB_001e77fd: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e83d0 MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RAX + 0x40] MOV EAX,dword ptr [RBP + -0x50] ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x4c] MOV EDX,EAX CALL 0x0012a0b0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x25de5e] MOV EDX,0xb5e CALL 0x001e79b0 JMP 0x001e7847 LAB_001e7847: JMP 0x001e7849 LAB_001e7849: MOV RDI,qword ptr [RBP + -0x48] CALL 0x001e8570 JMP 0x001e7854 LAB_001e7854: MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001e7877 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x1 CALL 0x001e85d0 JMP 0x001e788d LAB_001e7877: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] CALL 0x001e8760 MOV dword ptr [RBP + -0x34],0x1 JMP 0x001e78ca LAB_001e788d: JMP 0x001e788f LAB_001e788f: MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,dword ptr [RBP + -0x50] MOV EAX,EAX ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x50],0x0 MOV ECX,dword ptr [RBP + -0x4c] MOV EAX,dword ptr [RBP + -0x2c] SUB EAX,ECX MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x001e766c LAB_001e78ca: JMP 0x001e7963 LAB_001e78cf: JMP 0x001e78d1 LAB_001e78d1: JMP 0x001e78d3 LAB_001e78d3: JMP 0x001e78d5 LAB_001e78d5: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x150] ADD RCX,0x1 MOV qword ptr [RAX + 0x150],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x158] ADD RCX,0x1 MOV qword ptr [RAX + 0x158],RCX CMP byte ptr [RBP + -0x2d],0x0 JZ 0x001e7917 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e83d0 LAB_001e7917: MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x2c] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x18] MOV R8D,0x4 CALL 0x001fce90 CMP RAX,0x0 JZ 0x001e793f MOV dword ptr [RBP + -0x34],0x1 LAB_001e793f: CMP byte ptr [RBP + -0x2d],0x0 JZ 0x001e7961 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 LEA RSI,[0x25de5e] MOV EDX,0xb96 CALL 0x001e79b0 LAB_001e7961: JMP 0x001e7963 LAB_001e7963: CMP byte ptr [RBP + -0x2d],0x0 JZ 0x001e7982 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e88d0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc0 CALL 0x001e83d0 LAB_001e7982: JMP 0x001e7984 LAB_001e7984: JMP 0x001e7986 LAB_001e7986: JMP 0x001e7988 LAB_001e7988: CMP dword ptr [RBP + -0x34],0x0 JZ 0x001e7996 XOR EAX,EAX MOV qword ptr [RBP + -0x60],RAX JMP 0x001e799e LAB_001e7996: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX LAB_001e799e: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] ADD RSP,0x70 POP RBP RET
void * simple_key_cache_read (char *param_1,int4 param_2,ulong param_3,int4 param_4,void *param_5, uint param_6) { int4 *puVar1; long lVar2; bool bVar3; void *local_68; int local_5c; uint local_58; uint local_54; long local_50; void *local_48; uint local_3c; char local_35; uint local_34; void *local_30; int4 local_24; ulong local_20; int4 local_14; char *local_10; local_35 = '\0'; local_3c = 0; local_48 = param_5; local_34 = param_6; local_30 = param_5; local_24 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; if (*param_1 == '\0') { LAB_001e78d5: *(long *)(local_10 + 0x150) = *(long *)(local_10 + 0x150) + 1; *(long *)(local_10 + 0x158) = *(long *)(local_10 + 0x158) + 1; if (local_35 != '\0') { inline_mysql_mutex_unlock(local_10 + 0xc0); } lVar2 = my_pread(local_14,local_30,local_34,local_20,4); if (lVar2 != 0) { local_3c = 1; } if (local_35 != '\0') { inline_mysql_mutex_lock (local_10 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xb96); } } else { inline_mysql_mutex_lock (param_1 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c",0xaf2); while( true ) { bVar3 = false; if (local_10[1] != '\0') { bVar3 = local_10[2] == '\0'; } if (!bVar3) break; wait_on_queue(local_10 + 0x108,local_10 + 0xc0); } inc_counter_for_resize_op(local_10); local_35 = '\x01'; local_58 = (uint)(local_20 % (ulong)*(uint *)(local_10 + 0x18)); do { if (local_10[3] == '\0') goto LAB_001e78d5; local_20 = local_20 - local_58; local_54 = local_34; if (*(int *)(local_10 + 0x18) - local_58 < local_34) { local_54 = *(int *)(local_10 + 0x18) - local_58; } *(long *)(local_10 + 0x150) = *(long *)(local_10 + 0x150) + 1; local_50 = find_key_block(local_10,local_14,local_20,local_24,0,&local_5c); if (local_50 == 0) { *(long *)(local_10 + 0x158) = *(long *)(local_10 + 0x158) + 1; inline_mysql_mutex_unlock(local_10 + 0xc0); lVar2 = my_pread(local_14,local_30,local_54,local_20 + local_58); local_3c = (uint)(lVar2 != 0); inline_mysql_mutex_lock (local_10 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xb29); } else { if ((*(uint *)(local_50 + 0x50) & 1) == 0) { if (local_5c == 1) { read_block_primary(local_10,local_50,*(int4 *)(local_10 + 0x18), local_54 + local_58); } else if (local_5c == 2) { read_block_secondary(local_10,local_50); } else if (*(uint *)(local_50 + 0x4c) < local_54 + local_58) { puVar1 = (int4 *)_my_thread_var(); *puVar1 = 0xffffffff; *(uint *)(local_50 + 0x50) = *(uint *)(local_50 + 0x50) | 1; } } if ((*(uint *)(local_50 + 0x50) & 1) == 0) { inline_mysql_mutex_unlock(local_10 + 0xc0); memcpy(local_30,(void *)(*(long *)(local_50 + 0x40) + (ulong)local_58),(ulong)local_54); inline_mysql_mutex_lock (local_10 + 0xc0,"/workspace/llm4binary/github2025/eloqsql/mysys/mf_keycache.c", 0xb5e); } remove_reader(local_50); if ((*(uint *)(local_50 + 0x50) & 1) != 0) { free_block(local_10,local_50); local_3c = 1; break; } unreg_request(local_10,local_50,1); } local_30 = (void *)((long)local_30 + (ulong)local_54); local_20 = (local_54 + local_58) + local_20; local_58 = 0; local_34 = local_34 - local_54; } while (local_34 != 0); } if (local_35 != '\0') { dec_counter_for_resize_op(local_10); inline_mysql_mutex_unlock(local_10 + 0xc0); } if (local_3c == 0) { local_68 = local_48; } else { local_68 = (void *)0x0; } return local_68; }
39,272
mysql_stmt_attr_set
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool STDCALL mysql_stmt_attr_set(MYSQL_STMT *stmt, enum enum_stmt_attr_type attr_type, const void *value) { switch (attr_type) { case STMT_ATTR_UPDATE_MAX_LENGTH: stmt->update_max_length= *(my_bool *)value; break; case STMT_ATTR_CURSOR_TYPE: if (*(ulong *)value > (unsigned long) CURSOR_TYPE_READ_ONLY) { SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); return(1); } stmt->flags = *(ulong *)value; break; case STMT_ATTR_PREFETCH_ROWS: if (*(ulong *)value == 0) *(long *)value= MYSQL_DEFAULT_PREFETCH_ROWS; else stmt->prefetch_rows= *(long *)value; break; case STMT_ATTR_PREBIND_PARAMS: if (stmt->state > MYSQL_STMT_INITTED) { mysql_stmt_internal_reset(stmt, 1); net_stmt_close(stmt, 0); stmt->state= MYSQL_STMT_INITTED; stmt->params= 0; } stmt->prebind_params= stmt->param_count= *(unsigned int *)value; break; case STMT_ATTR_ARRAY_SIZE: stmt->array_size= *(unsigned int *)value; break; case STMT_ATTR_ROW_SIZE: stmt->row_size= *(size_t *)value; break; case STMT_ATTR_CB_RESULT: stmt->result_callback= (ps_result_callback)value; break; case STMT_ATTR_CB_PARAM: stmt->param_callback= (ps_param_callback)value; break; case STMT_ATTR_CB_USER_DATA: stmt->user_data= (void *)value; break; default: SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); return(1); } return(0); }
O0
c
mysql_stmt_attr_set: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x24(%rbp) testl %eax, %eax je 0x25672 jmp 0x255f3 movl -0x24(%rbp), %eax subl $0x1, %eax je 0x25687 jmp 0x25601 movl -0x24(%rbp), %eax subl $0x2, %eax je 0x25716 jmp 0x2560f movl -0x24(%rbp), %eax subl $0xc8, %eax je 0x25744 jmp 0x2561f movl -0x24(%rbp), %eax subl $0xc9, %eax je 0x2579a jmp 0x2562f movl -0x24(%rbp), %eax subl $0xca, %eax je 0x257af jmp 0x2563f movl -0x24(%rbp), %eax subl $0xcc, %eax je 0x257eb jmp 0x2564f movl -0x24(%rbp), %eax subl $0xcd, %eax je 0x257da jmp 0x2565f movl -0x24(%rbp), %eax subl $0xce, %eax je 0x257c6 jmp 0x257fc movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0x313(%rax) jmp 0x2586a movq -0x20(%rbp), %rax cmpq $0x1, (%rax) jbe 0x25702 jmp 0x25693 movq -0x10(%rbp), %rax movl $0x806, 0x108(%rax) # imm = 0x806 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x3672d(%rip), %rax # 0x5bde0 movq (%rax), %rsi movl $0x5, %edx callq 0x121f0 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x36713(%rip), %rax # 0x5bdf0 movq 0x1b0(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x121f0 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0x1(%rbp) jmp 0x2586e movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x48(%rax) jmp 0x2586a movq -0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x2572d movq -0x20(%rbp), %rax movq $0x1, (%rax) jmp 0x2573f movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x318(%rax) jmp 0x2586a movq -0x10(%rbp), %rax cmpl $0x0, 0x50(%rax) jbe 0x2577e movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x25880 movq -0x10(%rbp), %rdi xorl %esi, %esi callq 0x25a90 movq -0x10(%rbp), %rax movl $0x0, 0x50(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x70(%rax) movq -0x20(%rbp), %rax movl (%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x64(%rax) movq -0x10(%rbp), %rax movl %ecx, 0x378(%rax) jmp 0x2586a movq -0x20(%rbp), %rax movl (%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x368(%rax) jmp 0x2586a movq -0x20(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x370(%rax) jmp 0x2586a movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x388(%rax) jmp 0x2586a movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x390(%rax) jmp 0x2586a movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x380(%rax) jmp 0x2586a jmp 0x257fe movq -0x10(%rbp), %rax movl $0x806, 0x108(%rax) # imm = 0x806 movq -0x10(%rbp), %rdi addq $0x30d, %rdi # imm = 0x30D leaq 0x365c2(%rip), %rax # 0x5bde0 movq (%rax), %rsi movl $0x5, %edx callq 0x121f0 movq -0x10(%rbp), %rax movb $0x0, 0x312(%rax) movq -0x10(%rbp), %rdi addq $0x10c, %rdi # imm = 0x10C leaq 0x365a8(%rip), %rax # 0x5bdf0 movq 0x1b0(%rax), %rsi movl $0x200, %edx # imm = 0x200 callq 0x121f0 movq -0x10(%rbp), %rax movb $0x0, 0x30b(%rax) movb $0x1, -0x1(%rbp) jmp 0x2586e movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_stmt_attr_set: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov eax, [rbp+var_14] mov [rbp+var_24], eax test eax, eax jz loc_25672 jmp short $+2 loc_255F3: mov eax, [rbp+var_24] sub eax, 1 jz loc_25687 jmp short $+2 loc_25601: mov eax, [rbp+var_24] sub eax, 2 jz loc_25716 jmp short $+2 loc_2560F: mov eax, [rbp+var_24] sub eax, 0C8h jz loc_25744 jmp short $+2 loc_2561F: mov eax, [rbp+var_24] sub eax, 0C9h jz loc_2579A jmp short $+2 loc_2562F: mov eax, [rbp+var_24] sub eax, 0CAh jz loc_257AF jmp short $+2 loc_2563F: mov eax, [rbp+var_24] sub eax, 0CCh jz loc_257EB jmp short $+2 loc_2564F: mov eax, [rbp+var_24] sub eax, 0CDh jz loc_257DA jmp short $+2 loc_2565F: mov eax, [rbp+var_24] sub eax, 0CEh jz loc_257C6 jmp loc_257FC loc_25672: mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_10] mov [rax+313h], cl jmp loc_2586A loc_25687: mov rax, [rbp+var_20] cmp qword ptr [rax], 1 jbe short loc_25702 jmp short $+2 loc_25693: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 806h mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+1B0h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_1], 1 jmp loc_2586E loc_25702: mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+48h], rcx jmp loc_2586A loc_25716: mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jnz short loc_2572D mov rax, [rbp+var_20] mov qword ptr [rax], 1 jmp short loc_2573F loc_2572D: mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+318h], rcx loc_2573F: jmp loc_2586A loc_25744: mov rax, [rbp+var_10] cmp dword ptr [rax+50h], 0 jbe short loc_2577E mov rdi, [rbp+var_10] mov esi, 1 call mysql_stmt_internal_reset mov rdi, [rbp+var_10] xor esi, esi call net_stmt_close mov rax, [rbp+var_10] mov dword ptr [rax+50h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+70h], 0 loc_2577E: mov rax, [rbp+var_20] mov ecx, [rax] mov rax, [rbp+var_10] mov [rax+64h], ecx mov rax, [rbp+var_10] mov [rax+378h], ecx jmp loc_2586A loc_2579A: mov rax, [rbp+var_20] mov ecx, [rax] mov rax, [rbp+var_10] mov [rax+368h], ecx jmp loc_2586A loc_257AF: mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+370h], rcx jmp loc_2586A loc_257C6: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+388h], rcx jmp loc_2586A loc_257DA: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+390h], rcx jmp short loc_2586A loc_257EB: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+380h], rcx jmp short loc_2586A loc_257FC: jmp short $+2 loc_257FE: mov rax, [rbp+var_10] mov dword ptr [rax+108h], 806h mov rdi, [rbp+var_10] add rdi, 30Dh lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+312h], 0 mov rdi, [rbp+var_10] add rdi, 10Ch lea rax, client_errors mov rsi, [rax+1B0h] mov edx, 200h call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+30Bh], 0 mov [rbp+var_1], 1 jmp short loc_2586E loc_2586A: mov [rbp+var_1], 0 loc_2586E: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char mysql_stmt_attr_set(long long a1, int a2, _BYTE *a3) { int v3; // ecx if ( !a2 ) { *(_BYTE *)(a1 + 787) = *a3; return 0; } if ( a2 != 1 ) { switch ( a2 ) { case 2: if ( *(_QWORD *)a3 ) *(_QWORD *)(a1 + 792) = *(_QWORD *)a3; else *(_QWORD *)a3 = 1LL; break; case 200: if ( *(_DWORD *)(a1 + 80) ) { mysql_stmt_internal_reset(a1, 1LL); net_stmt_close(a1, 0LL); *(_DWORD *)(a1 + 80) = 0; *(_QWORD *)(a1 + 112) = 0LL; } v3 = *(_DWORD *)a3; *(_DWORD *)(a1 + 100) = *(_DWORD *)a3; *(_DWORD *)(a1 + 888) = v3; break; case 201: *(_DWORD *)(a1 + 872) = *(_DWORD *)a3; break; case 202: *(_QWORD *)(a1 + 880) = *(_QWORD *)a3; break; case 204: *(_QWORD *)(a1 + 896) = a3; break; case 205: *(_QWORD *)(a1 + 912) = a3; break; case 206: *(_QWORD *)(a1 + 904) = a3; break; default: goto LABEL_13; } return 0; } if ( *(_QWORD *)a3 <= 1uLL ) { *(_QWORD *)(a1 + 72) = *(_QWORD *)a3; return 0; } LABEL_13: *(_DWORD *)(a1 + 264) = 2054; strncpy(a1 + 781, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 786) = 0; strncpy(a1 + 268, client_errors[54], 512LL); *(_BYTE *)(a1 + 779) = 0; return 1; }
mysql_stmt_attr_set: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x24],EAX TEST EAX,EAX JZ 0x00125672 JMP 0x001255f3 LAB_001255f3: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0x1 JZ 0x00125687 JMP 0x00125601 LAB_00125601: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0x2 JZ 0x00125716 JMP 0x0012560f LAB_0012560f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xc8 JZ 0x00125744 JMP 0x0012561f LAB_0012561f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xc9 JZ 0x0012579a JMP 0x0012562f LAB_0012562f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xca JZ 0x001257af JMP 0x0012563f LAB_0012563f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xcc JZ 0x001257eb JMP 0x0012564f LAB_0012564f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xcd JZ 0x001257da JMP 0x0012565f LAB_0012565f: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,0xce JZ 0x001257c6 JMP 0x001257fc LAB_00125672: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x313],CL JMP 0x0012586a LAB_00125687: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x1 JBE 0x00125702 JMP 0x00125693 LAB_00125693: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x806 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x15bde0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x001121f0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x15bdf0] MOV RSI,qword ptr [RAX + 0x1b0] MOV EDX,0x200 CALL 0x001121f0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012586e LAB_00125702: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x48],RCX JMP 0x0012586a LAB_00125716: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JNZ 0x0012572d MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x1 JMP 0x0012573f LAB_0012572d: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x318],RCX LAB_0012573f: JMP 0x0012586a LAB_00125744: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x50],0x0 JBE 0x0012577e MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x00125880 MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00125a90 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x70],0x0 LAB_0012577e: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x64],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x378],ECX JMP 0x0012586a LAB_0012579a: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x368],ECX JMP 0x0012586a LAB_001257af: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x370],RCX JMP 0x0012586a LAB_001257c6: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x388],RCX JMP 0x0012586a LAB_001257da: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x390],RCX JMP 0x0012586a LAB_001257eb: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x380],RCX JMP 0x0012586a LAB_001257fc: JMP 0x001257fe LAB_001257fe: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x108],0x806 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x30d LEA RAX,[0x15bde0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x001121f0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x312],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x10c LEA RAX,[0x15bdf0] MOV RSI,qword ptr [RAX + 0x1b0] MOV EDX,0x200 CALL 0x001121f0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x30b],0x0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012586e LAB_0012586a: MOV byte ptr [RBP + -0x1],0x0 LAB_0012586e: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 mysql_stmt_attr_set(long param_1,int param_2,ulong *param_3) { ulong uVar1; if (param_2 == 0) { *(char *)(param_1 + 0x313) = (char)*param_3; } else if (param_2 == 1) { if (1 < *param_3) { *(int4 *)(param_1 + 0x108) = 0x806; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_This_feature_is_not_implemented_o_0015bfa0,0x200); *(int1 *)(param_1 + 0x30b) = 0; return 1; } *(ulong *)(param_1 + 0x48) = *param_3; } else if (param_2 == 2) { if (*param_3 == 0) { *param_3 = 1; } else { *(ulong *)(param_1 + 0x318) = *param_3; } } else if (param_2 == 200) { if (*(int *)(param_1 + 0x50) != 0) { mysql_stmt_internal_reset(param_1,1); net_stmt_close(param_1,0); *(int4 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x70) = 0; } uVar1 = *param_3; *(int *)(param_1 + 100) = (int)uVar1; *(int *)(param_1 + 0x378) = (int)uVar1; } else if (param_2 == 0xc9) { *(int *)(param_1 + 0x368) = (int)*param_3; } else if (param_2 == 0xca) { *(ulong *)(param_1 + 0x370) = *param_3; } else if (param_2 == 0xcc) { *(ulong **)(param_1 + 0x380) = param_3; } else if (param_2 == 0xcd) { *(ulong **)(param_1 + 0x390) = param_3; } else { if (param_2 != 0xce) { *(int4 *)(param_1 + 0x108) = 0x806; strncpy((char *)(param_1 + 0x30d),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x312) = 0; strncpy((char *)(param_1 + 0x10c),PTR_s_This_feature_is_not_implemented_o_0015bfa0,0x200); *(int1 *)(param_1 + 0x30b) = 0; return 1; } *(ulong **)(param_1 + 0x388) = param_3; } return 0; }
39,273
mysql_stmt_fetch_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_fetch_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_fetch, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If stmt->mysql==NULL then we will not block so can call directly. */ if (!stmt->mysql) { *ret= mysql_stmt_fetch(stmt); return 0; }) }
O3
c
mysql_stmt_fetch_start: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x38(%rsi), %rax testq %rax, %rax je 0x2e61b movq 0x480(%rax), %rax movq 0x28(%rax), %r15 leaq -0x20(%rbp), %rdx movq %r14, (%rdx) movb $0x1, 0x14(%r15) leaq 0x38(%r15), %rdi leaq 0xa2(%rip), %rsi # 0x2e6a3 callq 0x2fd64 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x2e625 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x2e698 movq %r14, %rdi callq 0x22b7f jmp 0x2e694 js 0x2e62d movl 0x8(%r15), %eax jmp 0x2e694 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x1f5c5(%rip), %rax # 0x4dc10 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x1f5aa(%rip), %rax # 0x4dc20 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x13220 movq 0x38(%r14), %rax movb %r15b, 0x296(%rax) movl $0x1, %eax movl %eax, (%rbx) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
mysql_stmt_fetch_start: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rax, [rsi+38h] test rax, rax jz short loc_2E61B mov rax, [rax+480h] mov r15, [rax+28h] lea rdx, [rbp+var_20] mov [rdx], r14 mov byte ptr [r15+14h], 1 lea rdi, [r15+38h] lea rsi, mysql_stmt_fetch_start_internal call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_2E625 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_2E698 loc_2E61B: mov rdi, r14 call mysql_stmt_fetch jmp short loc_2E694 loc_2E625: js short loc_2E62D mov eax, [r15+8] jmp short loc_2E694 loc_2E62D: mov rax, [r14+38h] mov dword ptr [rax+90h], 7D8h mov edi, 297h add rdi, [r14+38h] lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [r14+38h] xor r15d, r15d mov [rax+29Ch], r15b mov edi, 97h add rdi, [r14+38h] lea rax, client_errors mov rsi, [rax+40h] mov edx, 1FFh call _strncpy mov rax, [r14+38h] mov [rax+296h], r15b mov eax, 1 loc_2E694: mov [rbx], eax xor eax, eax loc_2E698: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_fetch_start(int *a1, long long a2) { long long v2; // rax long long v3; // rax unsigned int *v4; // r15 int v5; // eax int v7; // eax long long v8[4]; // [rsp+0h] [rbp-20h] BYREF v8[0] = v2; v3 = *(_QWORD *)(a2 + 56); if ( v3 ) { v4 = *(unsigned int **)(*(_QWORD *)(v3 + 1152) + 40LL); v8[0] = a2; *((_BYTE *)v4 + 20) = 1; v5 = my_context_spawn(v4 + 14, mysql_stmt_fetch_start_internal, v8); *((_WORD *)v4 + 10) = 0; if ( v5 > 0 ) { *((_BYTE *)v4 + 21) = 1; return *v4; } if ( v5 < 0 ) { *(_DWORD *)(*(_QWORD *)(a2 + 56) + 144LL) = 2008; strncpy(*(_QWORD *)(a2 + 56) + 663LL, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 668LL) = 0; strncpy(*(_QWORD *)(a2 + 56) + 151LL, client_errors[8], 511LL); *(_BYTE *)(*(_QWORD *)(a2 + 56) + 662LL) = 0; v7 = 1; } else { v7 = v4[2]; } } else { v7 = mysql_stmt_fetch(a2); } *a1 = v7; return 0LL; }
mysql_stmt_fetch_start: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x38] TEST RAX,RAX JZ 0x0012e61b MOV RAX,qword ptr [RAX + 0x480] MOV R15,qword ptr [RAX + 0x28] LEA RDX,[RBP + -0x20] MOV qword ptr [RDX],R14 MOV byte ptr [R15 + 0x14],0x1 LEA RDI,[R15 + 0x38] LEA RSI,[0x12e6a3] CALL 0x0012fd64 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0012e625 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0012e698 LAB_0012e61b: MOV RDI,R14 CALL 0x00122b7f JMP 0x0012e694 LAB_0012e625: JS 0x0012e62d MOV EAX,dword ptr [R15 + 0x8] JMP 0x0012e694 LAB_0012e62d: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x14dc10] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] XOR R15D,R15D MOV byte ptr [RAX + 0x29c],R15B MOV EDI,0x97 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x14dc20] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00113220 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV EAX,0x1 LAB_0012e694: MOV dword ptr [RBX],EAX XOR EAX,EAX LAB_0012e698: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_fetch_start(int4 *param_1,long param_2) { int4 *puVar1; int iVar2; int4 uVar3; if (*(long *)(param_2 + 0x38) == 0) { uVar3 = mysql_stmt_fetch(param_2); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; iVar2 = my_context_spawn(puVar1 + 0xe,mysql_stmt_fetch_start_internal); *(int2 *)(puVar1 + 5) = 0; if (0 < iVar2) { *(int1 *)((long)puVar1 + 0x15) = 1; return *puVar1; } if (iVar2 < 0) { *(int4 *)(*(long *)(param_2 + 0x38) + 0x90) = 0x7d8; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(*(long *)(param_2 + 0x38) + 0x29c) = 0; strncpy((char *)(*(long *)(param_2 + 0x38) + 0x97),PTR_s_Client_run_out_of_memory_0014dc60, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar3 = 1; } else { uVar3 = puVar1[2]; } } *param_1 = uVar3; return 0; }
39,274
mi_bin_search
eloqsql/storage/myisam/mi_search.c
int _mi_bin_search(MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint key_len, uint comp_flag, uchar **ret_pos, uchar *buff __attribute__((unused)), my_bool *last_key) { reg4 int start,mid,end,save_end; int UNINIT_VAR(flag); uint totlength,nod_flag,not_used[2]; DBUG_ENTER("_mi_bin_search"); totlength=keyinfo->keylength+(nod_flag=mi_test_if_nod(page)); start=0; mid=1; save_end=end=(int) ((mi_getint(page)-2-nod_flag)/totlength-1); DBUG_PRINT("test",("mi_getint: %d end: %d",mi_getint(page),end)); page+=2+nod_flag; while (start != end) { mid= (start+end)/2; if ((flag=ha_key_cmp(keyinfo->seg,page+(uint) mid*totlength,key,key_len, comp_flag, not_used)) >= 0) end=mid; else start=mid+1; } if (mid != start) flag=ha_key_cmp(keyinfo->seg,page+(uint) start*totlength,key,key_len, comp_flag, not_used); if (flag < 0) start++; /* point at next, bigger key */ *ret_pos=page+(uint) start*totlength; *last_key= end == save_end; DBUG_PRINT("exit",("flag: %d keypos: %d",flag,start)); DBUG_RETURN(flag); }
O0
c
mi_bin_search: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq 0x20(%rbp), %rax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movl %r9d, -0x28(%rbp) movl -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) movq -0x10(%rbp), %rax movzwl 0x12(%rax), %eax movl %eax, -0x50(%rbp) movq -0x18(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xc00b0 movq -0x8(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x54(%rbp) jmp 0xc00b7 xorl %eax, %eax movl %eax, -0x54(%rbp) jmp 0xc00b7 movl -0x50(%rbp), %eax movl -0x54(%rbp), %ecx movl %ecx, -0x44(%rbp) addl %ecx, %eax movl %eax, -0x40(%rbp) movl $0x0, -0x2c(%rbp) movl $0x1, -0x30(%rbp) movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF subl $0x2, %eax subl -0x44(%rbp), %eax xorl %edx, %edx divl -0x40(%rbp) subl $0x1, %eax movl %eax, -0x34(%rbp) movl %eax, -0x38(%rbp) jmp 0xc010b movl -0x44(%rbp), %ecx addl $0x2, %ecx movq -0x18(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x18(%rbp) movl -0x2c(%rbp), %eax cmpl -0x34(%rbp), %eax je 0xc017e movl -0x2c(%rbp), %eax addl -0x34(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rdi movq -0x18(%rbp), %rsi movl -0x30(%rbp), %eax imull -0x40(%rbp), %eax movl %eax, %eax addq %rax, %rsi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movl -0x28(%rbp), %r8d leaq -0x4c(%rbp), %r9 callq 0xf1480 movl %eax, -0x3c(%rbp) cmpl $0x0, %eax jl 0xc0173 movl -0x30(%rbp), %eax movl %eax, -0x34(%rbp) jmp 0xc017c movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0xc011e movl -0x30(%rbp), %eax cmpl -0x2c(%rbp), %eax je 0xc01b5 movq -0x10(%rbp), %rax movq 0x28(%rax), %rdi movq -0x18(%rbp), %rsi movl -0x2c(%rbp), %eax imull -0x40(%rbp), %eax movl %eax, %eax addq %rax, %rsi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movl -0x28(%rbp), %r8d leaq -0x4c(%rbp), %r9 callq 0xf1480 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jge 0xc01c4 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rcx movl -0x2c(%rbp), %eax imull -0x40(%rbp), %eax movl %eax, %eax addq %rax, %rcx movq 0x10(%rbp), %rax movq %rcx, (%rax) movl -0x34(%rbp), %eax cmpl -0x38(%rbp), %eax sete %al andb $0x1, %al movzbl %al, %eax movb %al, %cl movq 0x20(%rbp), %rax movb %cl, (%rax) jmp 0xc01f3 jmp 0xc01f5 movl -0x3c(%rbp), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_bin_search: push rbp mov rbp, rsp sub rsp, 60h mov rax, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_28], r9d mov eax, [rbp+var_3C] mov [rbp+var_3C], eax mov rax, [rbp+var_10] movzx eax, word ptr [rax+12h] mov [rbp+var_50], eax mov rax, [rbp+var_18] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_C00B0 mov rax, [rbp+var_8] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_54], eax jmp short loc_C00B7 loc_C00B0: xor eax, eax mov [rbp+var_54], eax jmp short $+2 loc_C00B7: mov eax, [rbp+var_50] mov ecx, [rbp+var_54] mov [rbp+var_44], ecx add eax, ecx mov [rbp+var_40], eax mov [rbp+var_2C], 0 mov [rbp+var_30], 1 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh sub eax, 2 sub eax, [rbp+var_44] xor edx, edx div [rbp+var_40] sub eax, 1 mov [rbp+var_34], eax mov [rbp+var_38], eax jmp short $+2 loc_C010B: mov ecx, [rbp+var_44] add ecx, 2 mov rax, [rbp+var_18] mov ecx, ecx add rax, rcx mov [rbp+var_18], rax loc_C011E: mov eax, [rbp+var_2C] cmp eax, [rbp+var_34] jz short loc_C017E mov eax, [rbp+var_2C] add eax, [rbp+var_34] mov ecx, 2 cdq idiv ecx mov [rbp+var_30], eax mov rax, [rbp+var_10] mov rdi, [rax+28h] mov rsi, [rbp+var_18] mov eax, [rbp+var_30] imul eax, [rbp+var_40] mov eax, eax add rsi, rax mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8d, [rbp+var_28] lea r9, [rbp+var_4C] call ha_key_cmp mov [rbp+var_3C], eax cmp eax, 0 jl short loc_C0173 mov eax, [rbp+var_30] mov [rbp+var_34], eax jmp short loc_C017C loc_C0173: mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_2C], eax loc_C017C: jmp short loc_C011E loc_C017E: mov eax, [rbp+var_30] cmp eax, [rbp+var_2C] jz short loc_C01B5 mov rax, [rbp+var_10] mov rdi, [rax+28h] mov rsi, [rbp+var_18] mov eax, [rbp+var_2C] imul eax, [rbp+var_40] mov eax, eax add rsi, rax mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8d, [rbp+var_28] lea r9, [rbp+var_4C] call ha_key_cmp mov [rbp+var_3C], eax loc_C01B5: cmp [rbp+var_3C], 0 jge short loc_C01C4 mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax loc_C01C4: mov rcx, [rbp+var_18] mov eax, [rbp+var_2C] imul eax, [rbp+var_40] mov eax, eax add rcx, rax mov rax, [rbp+arg_0] mov [rax], rcx mov eax, [rbp+var_34] cmp eax, [rbp+var_38] setz al and al, 1 movzx eax, al mov cl, al mov rax, [rbp+arg_10] mov [rax], cl jmp short $+2 loc_C01F3: jmp short $+2 loc_C01F5: mov eax, [rbp+var_3C] mov [rbp+var_58], eax mov eax, [rbp+var_58] add rsp, 60h pop rbp retn
long long mi_bin_search( long long a1, long long a2, unsigned __int16 *a3, long long a4, unsigned int a5, unsigned int a6, _QWORD *a7, long long a8, bool *a9) { int v10; // [rsp+Ch] [rbp-54h] int v11; // [rsp+10h] [rbp-50h] _BYTE v12[8]; // [rsp+14h] [rbp-4Ch] BYREF int v13; // [rsp+1Ch] [rbp-44h] int v14; // [rsp+20h] [rbp-40h] int v15; // [rsp+24h] [rbp-3Ch] unsigned int v16; // [rsp+28h] [rbp-38h] unsigned int v17; // [rsp+2Ch] [rbp-34h] int v18; // [rsp+30h] [rbp-30h] int v19; // [rsp+34h] [rbp-2Ch] unsigned int v20; // [rsp+38h] [rbp-28h] unsigned int v21; // [rsp+3Ch] [rbp-24h] long long v22; // [rsp+40h] [rbp-20h] unsigned __int16 *v23; // [rsp+48h] [rbp-18h] long long v24; // [rsp+50h] [rbp-10h] long long v25; // [rsp+58h] [rbp-8h] v25 = a1; v24 = a2; v23 = a3; v22 = a4; v21 = a5; v20 = a6; v11 = *(unsigned __int16 *)(a2 + 18); if ( (*(_BYTE *)a3 & 0x80) != 0 ) v10 = *(_DWORD *)(*(_QWORD *)v25 + 380LL); else v10 = 0; v13 = v10; v14 = v10 + v11; v19 = 0; v18 = 1; v17 = ((_byteswap_ushort(*v23) & 0x7FFFu) - 2 - v10) / (v10 + v11) - 1; v16 = v17; v23 = (unsigned __int16 *)((char *)v23 + (unsigned int)(v10 + 2)); while ( v19 != v17 ) { v18 = (int)(v17 + v19) / 2; v15 = ha_key_cmp(*(_QWORD *)(v24 + 40), (char *)v23 + (unsigned int)(v14 * v18), v22, v21, v20, v12); if ( v15 < 0 ) v19 = v18 + 1; else v17 = v18; } if ( v18 != v19 ) v15 = ha_key_cmp(*(_QWORD *)(v24 + 40), (char *)v23 + (unsigned int)(v14 * v19), v22, v21, v20, v12); if ( v15 < 0 ) ++v19; *a7 = (char *)v23 + (unsigned int)(v14 * v19); *a9 = v17 == v16; return (unsigned int)v15; }
_mi_bin_search: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV dword ptr [RBP + -0x28],R9D MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x12] MOV dword ptr [RBP + -0x50],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001c00b0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x54],EAX JMP 0x001c00b7 LAB_001c00b0: XOR EAX,EAX MOV dword ptr [RBP + -0x54],EAX JMP 0x001c00b7 LAB_001c00b7: MOV EAX,dword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x44],ECX ADD EAX,ECX MOV dword ptr [RBP + -0x40],EAX MOV dword ptr [RBP + -0x2c],0x0 MOV dword ptr [RBP + -0x30],0x1 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff SUB EAX,0x2 SUB EAX,dword ptr [RBP + -0x44] XOR EDX,EDX DIV dword ptr [RBP + -0x40] SUB EAX,0x1 MOV dword ptr [RBP + -0x34],EAX MOV dword ptr [RBP + -0x38],EAX JMP 0x001c010b LAB_001c010b: MOV ECX,dword ptr [RBP + -0x44] ADD ECX,0x2 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX LAB_001c011e: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,dword ptr [RBP + -0x34] JZ 0x001c017e MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,dword ptr [RBP + -0x34] MOV ECX,0x2 CDQ IDIV ECX MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x30] IMUL EAX,dword ptr [RBP + -0x40] MOV EAX,EAX ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8D,dword ptr [RBP + -0x28] LEA R9,[RBP + -0x4c] CALL 0x001f1480 MOV dword ptr [RBP + -0x3c],EAX CMP EAX,0x0 JL 0x001c0173 MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x34],EAX JMP 0x001c017c LAB_001c0173: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX LAB_001c017c: JMP 0x001c011e LAB_001c017e: MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x2c] JZ 0x001c01b5 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x28] MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x2c] IMUL EAX,dword ptr [RBP + -0x40] MOV EAX,EAX ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8D,dword ptr [RBP + -0x28] LEA R9,[RBP + -0x4c] CALL 0x001f1480 MOV dword ptr [RBP + -0x3c],EAX LAB_001c01b5: CMP dword ptr [RBP + -0x3c],0x0 JGE 0x001c01c4 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX LAB_001c01c4: MOV RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x2c] IMUL EAX,dword ptr [RBP + -0x40] MOV EAX,EAX ADD RCX,RAX MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x38] SETZ AL AND AL,0x1 MOVZX EAX,AL MOV CL,AL MOV RAX,qword ptr [RBP + 0x20] MOV byte ptr [RAX],CL JMP 0x001c01f3 LAB_001c01f3: JMP 0x001c01f5 LAB_001c01f5: MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x58],EAX MOV EAX,dword ptr [RBP + -0x58] ADD RSP,0x60 POP RBP RET
int _mi_bin_search(long *param_1,long param_2,byte *param_3,int8 param_4,int4 param_5, int4 param_6,int8 *param_7,int8 param_8,int8 param_9) { int local_5c; int1 local_54 [8]; int local_4c; uint local_48; int local_44; int local_40; int local_3c; int local_38; int local_34; int4 local_30; int4 local_2c; int8 local_28; byte *local_20; long local_18; long *local_10; if ((*param_3 & 0x80) == 0) { local_5c = 0; } else { local_5c = *(int *)(*param_1 + 0x17c); } local_4c = local_5c; local_48 = (uint)*(ushort *)(param_2 + 0x12) + local_5c; local_34 = 0; local_38 = 1; local_40 = ((((uint)param_3[1] | (*param_3 & 0x7f) << 8) - 2) - local_5c) / local_48 - 1; local_20 = param_3 + (local_5c + 2); local_3c = local_40; local_30 = param_6; local_2c = param_5; local_28 = param_4; local_18 = param_2; local_10 = param_1; while (local_34 != local_3c) { local_38 = (local_34 + local_3c) / 2; local_44 = ha_key_cmp(*(int8 *)(local_18 + 0x28),local_20 + local_38 * local_48,local_28, local_2c,local_30,local_54); if (local_44 < 0) { local_34 = local_38 + 1; } else { local_3c = local_38; } } if (local_38 != local_34) { local_44 = ha_key_cmp(*(int8 *)(local_18 + 0x28),local_20 + local_34 * local_48,local_28, local_2c,local_30,local_54); } if (local_44 < 0) { local_34 = local_34 + 1; } *param_7 = local_20 + local_34 * local_48; *(bool *)param_9 = local_3c == local_40; return local_44; }
39,275
gzungetc
3fs/build_O3/src/apache-arrow-cpp/cpp/zlib_ep-prefix/src/zlib_ep/gzread.c
int ZEXPORT gzungetc(c, file) int c; gzFile file; { gz_statep state; /* get internal structure */ if (file == NULL) return -1; state = (gz_statep)file; /* check that we're reading and that there's no (serious) error */ if (state->mode != GZ_READ || (state->err != Z_OK && state->err != Z_BUF_ERROR)) return -1; /* process a skip request */ if (state->seek) { state->seek = 0; if (gz_skip(state, state->skip) == -1) return -1; } /* can't push EOF */ if (c < 0) return -1; /* if output buffer empty, put byte at end (allows more pushing) */ if (state->x.have == 0) { state->x.have = 1; state->x.next = state->out + (state->size << 1) - 1; state->x.next[0] = (unsigned char)c; state->x.pos--; state->past = 0; return c; } /* if no room, give up (must have already done a gzungetc()) */ if (state->x.have == (state->size << 1)) { gz_error(state, Z_DATA_ERROR, "out of room to push characters"); return -1; } /* slide output data if needed and insert byte before existing data */ if (state->x.next == state->out) { unsigned char *src = state->out + state->x.have; unsigned char *dest = state->out + (state->size << 1); while (src > state->out) *--dest = *--src; state->x.next = dest; } state->x.have++; state->x.next--; state->x.next[0] = (unsigned char)c; state->x.pos--; state->past = 0; return c; }
O3
c
gzungetc: pushq %r14 pushq %rbx pushq %rax testq %rsi, %rsi je 0x7ab5 movq %rsi, %r14 cmpl $0x1c4f, 0x18(%rsi) # imm = 0x1C4F jne 0x7ab5 movl %edi, %ebx movl 0x74(%r14), %eax testl %eax, %eax je 0x7a65 cmpl $-0x5, %eax jne 0x7ab5 cmpl $0x0, 0x70(%r14) je 0x7a8b movl $0x0, 0x70(%r14) movq 0x68(%r14), %rsi movq %r14, %rdi callq 0x7b2b testl %ebx, %ebx js 0x7ab5 cmpl $-0x1, %eax jne 0x7a8f jmp 0x7ab5 testl %ebx, %ebx js 0x7ab5 movl (%r14), %eax testq %rax, %rax je 0x7ac4 movl 0x28(%r14), %edx addl %edx, %edx cmpl %edx, %eax jne 0x7ae3 leaq 0x9acc(%rip), %rdx # 0x11574 movq %r14, %rdi movl $0xfffffffd, %esi # imm = 0xFFFFFFFD callq 0x757b movl $0xffffffff, %ebx # imm = 0xFFFFFFFF movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x1, (%r14) movq 0x38(%r14), %rax movl 0x28(%r14), %ecx addl %ecx, %ecx addq %rcx, %rax decq %rax movq %rax, 0x8(%r14) movb %bl, (%rax) jmp 0x7b1d movq 0x8(%r14), %rcx movq 0x38(%r14), %rsi cmpq %rsi, %rcx jne 0x7b0d addq %rsi, %rax movl %edx, %ecx addq %rsi, %rcx movb -0x1(%rax), %dl decq %rax movb %dl, -0x1(%rcx) decq %rcx cmpq 0x38(%r14), %rax ja 0x7af8 movl (%r14), %eax incl %eax movl %eax, (%r14) leaq -0x1(%rcx), %rax movq %rax, 0x8(%r14) movb %bl, -0x1(%rcx) decq 0x10(%r14) movl $0x0, 0x54(%r14) jmp 0x7aba
gzungetc: push r14 push rbx push rax test rsi, rsi jz short loc_7AB5 mov r14, rsi cmp dword ptr [rsi+18h], 1C4Fh jnz short loc_7AB5 mov ebx, edi mov eax, [r14+74h] test eax, eax jz short loc_7A65 cmp eax, 0FFFFFFFBh jnz short loc_7AB5 loc_7A65: cmp dword ptr [r14+70h], 0 jz short loc_7A8B mov dword ptr [r14+70h], 0 mov rsi, [r14+68h] mov rdi, r14 call gz_skip test ebx, ebx js short loc_7AB5 cmp eax, 0FFFFFFFFh jnz short loc_7A8F jmp short loc_7AB5 loc_7A8B: test ebx, ebx js short loc_7AB5 loc_7A8F: mov eax, [r14] test rax, rax jz short loc_7AC4 mov edx, [r14+28h] add edx, edx cmp eax, edx jnz short loc_7AE3 lea rdx, aOutOfRoomToPus; "out of room to push characters" mov rdi, r14 mov esi, 0FFFFFFFDh call gz_error loc_7AB5: mov ebx, 0FFFFFFFFh loc_7ABA: mov eax, ebx add rsp, 8 pop rbx pop r14 retn loc_7AC4: mov dword ptr [r14], 1 mov rax, [r14+38h] mov ecx, [r14+28h] add ecx, ecx add rax, rcx dec rax mov [r14+8], rax mov [rax], bl jmp short loc_7B1D loc_7AE3: mov rcx, [r14+8] mov rsi, [r14+38h] cmp rcx, rsi jnz short loc_7B0D add rax, rsi mov ecx, edx add rcx, rsi loc_7AF8: mov dl, [rax-1] dec rax mov [rcx-1], dl dec rcx cmp rax, [r14+38h] ja short loc_7AF8 mov eax, [r14] loc_7B0D: inc eax mov [r14], eax lea rax, [rcx-1] mov [r14+8], rax mov [rcx-1], bl loc_7B1D: dec qword ptr [r14+10h] mov dword ptr [r14+54h], 0 jmp short loc_7ABA
long long gzungetc(int a1, unsigned int *a2) { unsigned int v3; // ebx unsigned int v4; // eax int v5; // eax long long v6; // rax unsigned int v7; // edx _BYTE *v9; // rax long long v10; // rcx long long v11; // rsi unsigned long long v12; // rax char v13; // dl if ( !a2 ) return (unsigned int)-1; if ( a2[6] != 7247 ) return (unsigned int)-1; v3 = a1; v4 = a2[29]; if ( v4 ) { if ( v4 != -5 ) return (unsigned int)-1; } if ( a2[28] ) { a2[28] = 0; v5 = gz_skip(a2, *((_QWORD *)a2 + 13)); if ( a1 < 0 || v5 == -1 ) return (unsigned int)-1; LABEL_10: v6 = *a2; if ( *a2 ) { v7 = 2 * a2[10]; if ( (_DWORD)v6 == v7 ) { gz_error((long long)a2, -3, "out of room to push characters"); return (unsigned int)-1; } v10 = *((_QWORD *)a2 + 1); v11 = *((_QWORD *)a2 + 7); if ( v10 == v11 ) { v12 = v11 + v6; v10 = v11 + v7; do { v13 = *(_BYTE *)--v12; *(_BYTE *)--v10 = v13; } while ( v12 > *((_QWORD *)a2 + 7) ); LODWORD(v6) = *a2; } *a2 = v6 + 1; *((_QWORD *)a2 + 1) = v10 - 1; *(_BYTE *)(v10 - 1) = a1; } else { *a2 = 1; v9 = (_BYTE *)(2 * a2[10] + *((_QWORD *)a2 + 7) - 1LL); *((_QWORD *)a2 + 1) = v9; *v9 = a1; } --*((_QWORD *)a2 + 2); a2[21] = 0; return v3; } if ( a1 >= 0 ) goto LABEL_10; return (unsigned int)-1; }
gzungetc: PUSH R14 PUSH RBX PUSH RAX TEST RSI,RSI JZ 0x00107ab5 MOV R14,RSI CMP dword ptr [RSI + 0x18],0x1c4f JNZ 0x00107ab5 MOV EBX,EDI MOV EAX,dword ptr [R14 + 0x74] TEST EAX,EAX JZ 0x00107a65 CMP EAX,-0x5 JNZ 0x00107ab5 LAB_00107a65: CMP dword ptr [R14 + 0x70],0x0 JZ 0x00107a8b MOV dword ptr [R14 + 0x70],0x0 MOV RSI,qword ptr [R14 + 0x68] MOV RDI,R14 CALL 0x00107b2b TEST EBX,EBX JS 0x00107ab5 CMP EAX,-0x1 JNZ 0x00107a8f JMP 0x00107ab5 LAB_00107a8b: TEST EBX,EBX JS 0x00107ab5 LAB_00107a8f: MOV EAX,dword ptr [R14] TEST RAX,RAX JZ 0x00107ac4 MOV EDX,dword ptr [R14 + 0x28] ADD EDX,EDX CMP EAX,EDX JNZ 0x00107ae3 LEA RDX,[0x111574] MOV RDI,R14 MOV ESI,0xfffffffd CALL 0x0010757b LAB_00107ab5: MOV EBX,0xffffffff LAB_00107aba: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R14 RET LAB_00107ac4: MOV dword ptr [R14],0x1 MOV RAX,qword ptr [R14 + 0x38] MOV ECX,dword ptr [R14 + 0x28] ADD ECX,ECX ADD RAX,RCX DEC RAX MOV qword ptr [R14 + 0x8],RAX MOV byte ptr [RAX],BL JMP 0x00107b1d LAB_00107ae3: MOV RCX,qword ptr [R14 + 0x8] MOV RSI,qword ptr [R14 + 0x38] CMP RCX,RSI JNZ 0x00107b0d ADD RAX,RSI MOV ECX,EDX ADD RCX,RSI LAB_00107af8: MOV DL,byte ptr [RAX + -0x1] DEC RAX MOV byte ptr [RCX + -0x1],DL DEC RCX CMP RAX,qword ptr [R14 + 0x38] JA 0x00107af8 MOV EAX,dword ptr [R14] LAB_00107b0d: INC EAX MOV dword ptr [R14],EAX LEA RAX,[RCX + -0x1] MOV qword ptr [R14 + 0x8],RAX MOV byte ptr [RCX + -0x1],BL LAB_00107b1d: DEC qword ptr [R14 + 0x10] MOV dword ptr [R14 + 0x54],0x0 JMP 0x00107aba
int gzungetc(int param_1,uint *param_2) { long lVar1; int iVar2; uint uVar3; int1 *puVar4; ulong uVar5; long lVar6; if (((param_2 == (uint *)0x0) || (param_2[6] != 0x1c4f)) || ((param_2[0x1d] != 0 && (param_2[0x1d] != 0xfffffffb)))) { return -1; } if (param_2[0x1c] == 0) { if (param_1 < 0) { return -1; } } else { param_2[0x1c] = 0; iVar2 = gz_skip(param_2,*(int8 *)(param_2 + 0x1a)); if (param_1 < 0) { return -1; } if (iVar2 == -1) { return -1; } } uVar3 = *param_2; if ((ulong)uVar3 == 0) { *param_2 = 1; puVar4 = (int1 *)(*(long *)(param_2 + 0xe) + (ulong)(param_2[10] * 2) + -1); *(int1 **)(param_2 + 2) = puVar4; *puVar4 = (char)param_1; } else { if (uVar3 == param_2[10] * 2) { gz_error(param_2,0xfffffffd,"out of room to push characters"); return -1; } lVar6 = *(long *)(param_2 + 2); lVar1 = *(long *)(param_2 + 0xe); if (lVar6 == lVar1) { uVar5 = (ulong)uVar3 + lVar1; lVar6 = (ulong)(param_2[10] * 2) + lVar1; do { puVar4 = (int1 *)(uVar5 - 1); uVar5 = uVar5 - 1; *(int1 *)(lVar6 + -1) = *puVar4; lVar6 = lVar6 + -1; } while (*(ulong *)(param_2 + 0xe) < uVar5); uVar3 = *param_2; } *param_2 = uVar3 + 1; *(long *)(param_2 + 2) = lVar6 + -1; *(char *)(lVar6 + -1) = (char)param_1; } *(long *)(param_2 + 4) = *(long *)(param_2 + 4) + -1; param_2[0x15] = 0; return param_1; }
39,276
add_cfg_dir
eloqsql/libmariadb/libmariadb/ma_default.c
static int add_cfg_dir(char **cfg_dirs, const char *directory) { int i; for (i = 0; i < MAX_CONFIG_DIRS && cfg_dirs[i]; i++) if (!strcmp(cfg_dirs[i], directory)) /* already present */ return 0; if (i < MAX_CONFIG_DIRS) { cfg_dirs[i]= strdup(directory); return 0; } return 1; }
O0
c
add_cfg_dir: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl $0x0, -0x1c(%rbp) xorl %eax, %eax cmpl $0x6, -0x1c(%rbp) movb %al, -0x1d(%rbp) jge 0x61815 movq -0x10(%rbp), %rax movslq -0x1c(%rbp), %rcx cmpq $0x0, (%rax,%rcx,8) setne %al movb %al, -0x1d(%rbp) movb -0x1d(%rbp), %al testb $0x1, %al jne 0x6181e jmp 0x6184e movq -0x10(%rbp), %rax movslq -0x1c(%rbp), %rcx movq (%rax,%rcx,8), %rdi movq -0x18(%rbp), %rsi callq 0x14600 cmpl $0x0, %eax jne 0x61841 movl $0x0, -0x4(%rbp) jmp 0x6187c jmp 0x61843 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0x617f7 cmpl $0x6, -0x1c(%rbp) jge 0x61875 movq -0x18(%rbp), %rdi callq 0x147c0 movq %rax, %rdx movq -0x10(%rbp), %rax movslq -0x1c(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movl $0x0, -0x4(%rbp) jmp 0x6187c movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
add_cfg_dir: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], 0 loc_617F7: xor eax, eax cmp [rbp+var_1C], 6 mov [rbp+var_1D], al jge short loc_61815 mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1C] cmp qword ptr [rax+rcx*8], 0 setnz al mov [rbp+var_1D], al loc_61815: mov al, [rbp+var_1D] test al, 1 jnz short loc_6181E jmp short loc_6184E loc_6181E: mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1C] mov rdi, [rax+rcx*8] mov rsi, [rbp+var_18] call _strcmp cmp eax, 0 jnz short loc_61841 mov [rbp+var_4], 0 jmp short loc_6187C loc_61841: jmp short $+2 loc_61843: mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_617F7 loc_6184E: cmp [rbp+var_1C], 6 jge short loc_61875 mov rdi, [rbp+var_18] call _strdup mov rdx, rax mov rax, [rbp+var_10] movsxd rcx, [rbp+var_1C] mov [rax+rcx*8], rdx mov [rbp+var_4], 0 jmp short loc_6187C loc_61875: mov [rbp+var_4], 1 loc_6187C: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long add_cfg_dir(long long a1, long long a2) { bool v3; // [rsp+3h] [rbp-1Dh] int i; // [rsp+4h] [rbp-1Ch] for ( i = 0; ; ++i ) { v3 = 0; if ( i < 6 ) v3 = *(_QWORD *)(a1 + 8LL * i) != 0LL; if ( !v3 ) break; if ( !(unsigned int)strcmp(*(_QWORD *)(a1 + 8LL * i), a2) ) return 0; } if ( i >= 6 ) { return 1; } else { *(_QWORD *)(a1 + 8LL * i) = strdup(a2); return 0; } }
add_cfg_dir: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],0x0 LAB_001617f7: XOR EAX,EAX CMP dword ptr [RBP + -0x1c],0x6 MOV byte ptr [RBP + -0x1d],AL JGE 0x00161815 MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x1c] CMP qword ptr [RAX + RCX*0x8],0x0 SETNZ AL MOV byte ptr [RBP + -0x1d],AL LAB_00161815: MOV AL,byte ptr [RBP + -0x1d] TEST AL,0x1 JNZ 0x0016181e JMP 0x0016184e LAB_0016181e: MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00114600 CMP EAX,0x0 JNZ 0x00161841 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016187c LAB_00161841: JMP 0x00161843 LAB_00161843: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x001617f7 LAB_0016184e: CMP dword ptr [RBP + -0x1c],0x6 JGE 0x00161875 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001147c0 MOV RDX,RAX MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x1c] MOV qword ptr [RAX + RCX*0x8],RDX MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016187c LAB_00161875: MOV dword ptr [RBP + -0x4],0x1 LAB_0016187c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 add_cfg_dir(long param_1,char *param_2) { int iVar1; char *pcVar2; bool bVar3; int local_24; local_24 = 0; while( true ) { bVar3 = false; if (local_24 < 6) { bVar3 = *(long *)(param_1 + (long)local_24 * 8) != 0; } if (!bVar3) break; iVar1 = strcmp(*(char **)(param_1 + (long)local_24 * 8),param_2); if (iVar1 == 0) { return 0; } local_24 = local_24 + 1; } if (local_24 < 6) { pcVar2 = strdup(param_2); *(char **)(param_1 + (long)local_24 * 8) = pcVar2; return 0; } return 1; }
39,277
minja::Context::get(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value get(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->get(key); return Value(); }
O1
cpp
minja::Context::get(minja::Value const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leaq 0x18(%rsi), %r12 movq %r12, %rdi movq %rdx, %rsi callq 0x55166 testb %al, %al je 0x60c0c movq %r12, %rdi movq %r14, %rsi callq 0x54f68 movq %rbx, %rdi movq %rax, %rsi callq 0x4f48a jmp 0x60c5f movq 0x68(%r15), %rsi testq %rsi, %rsi je 0x60c23 movq (%rsi), %rax movq %rbx, %rdi movq %r14, %rdx callq *0x10(%rax) jmp 0x60c5f leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x3dcd2 movq %r14, %rdi movl $0x1, %esi callq 0x3dcd2 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
_ZN5minja7Context3getERKNS_5ValueE: push r15 push r14 push r12 push rbx push rax mov r14, rdx mov r15, rsi mov rbx, rdi lea r12, [rsi+18h] mov rdi, r12; this mov rsi, rdx; minja::Value * call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_60C0C mov rdi, r12; this mov rsi, r14; minja::Value * call _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) mov rdi, rbx; this mov rsi, rax; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) jmp short loc_60C5F loc_60C0C: mov rsi, [r15+68h] test rsi, rsi jz short loc_60C23 mov rax, [rsi] mov rdi, rbx mov rdx, r14 call qword ptr [rax+10h] jmp short loc_60C5F loc_60C23: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_60C5F: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
minja::Context * minja::Context::get( minja::Context *this, const minja::Value *a2, const minja::Value *a3, __m128d a4) { const minja::Value *v5; // rax long long v6; // rsi if ( (unsigned __int8)minja::Value::contains((const minja::Value *)((char *)a2 + 24), a3, a4) ) { v5 = (const minja::Value *)minja::Value::at((const minja::Value *)((char *)a2 + 24), a3); minja::Value::Value(this, v5); } else { v6 = *((_QWORD *)a2 + 13); if ( v6 ) { (*(void ( **)(minja::Context *, long long, const minja::Value *))(*(_QWORD *)v6 + 16LL))(this, v6, a3); } else { *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)this + 64); } } return this; }
get: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA R12,[RSI + 0x18] MOV RDI,R12 MOV RSI,RDX CALL 0x00155166 TEST AL,AL JZ 0x00160c0c MOV RDI,R12 MOV RSI,R14 CALL 0x00154f68 MOV RDI,RBX MOV RSI,RAX CALL 0x0014f48a JMP 0x00160c5f LAB_00160c0c: MOV RSI,qword ptr [R15 + 0x68] TEST RSI,RSI JZ 0x00160c23 MOV RAX,qword ptr [RSI] MOV RDI,RBX MOV RDX,R14 CALL qword ptr [RAX + 0x10] JMP 0x00160c5f LAB_00160c23: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013dcd2 MOV RDI,R14 MOV ESI,0x1 CALL 0x0013dcd2 LAB_00160c5f: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Context::get(minja::Value const&) */ Value * minja::Context::get(Value *param_1) { char cVar1; Value *pVVar2; Value *in_RDX; long in_RSI; bool bVar3; cVar1 = Value::contains((Value *)(in_RSI + 0x18),in_RDX); if (cVar1 == '\0') { if (*(long **)(in_RSI + 0x68) == (long *)0x0) { bVar3 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (Value)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar3); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar3); } else { (**(code **)(**(long **)(in_RSI + 0x68) + 0x10))(param_1); } } else { pVVar2 = (Value *)Value::at((Value *)(in_RSI + 0x18),in_RDX); Value::Value(param_1,pVVar2); } return param_1; }
39,278
parse_is_reserved
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_engine-src/src/tool/parse.c
static int parse_is_reserved (struct LexState * Lexer, enum LexToken Token) { PARSER_STATEMACHINE_T * statemachine = (PARSER_STATEMACHINE_T *)Lexer->ctx ; if ((Token >= TokenEvents) && (Token <= TokenStartState)) { unsigned int i ; for (i=0; i<sizeof(ReservedWords)/sizeof(ReservedWords[0]); i++) { if (ReservedWords[i].Token == Token) { PARSER_REPORT(statemachine->logif, "warning: reserved word (%s)!\r\n", ReservedWords[i].Word) ; } } return 0 ; } return 1 ; }
O3
c
parse_is_reserved: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx leal -0x3b(%rbx), %ecx movl $0x1, %eax cmpl $0x18, %ecx ja 0xabc0 movq %rdi, %r14 movl $0x8, %r12d leaq 0x32b1a(%rip), %r13 # 0x3d6a0 leaq 0x1b1ff(%rip), %r15 # 0x25d8c cmpl %ebx, (%r12,%r13) jne 0xabb1 movq 0x50(%r14), %rax testq %rax, %rax je 0xabb1 movq 0x8(%rax), %rcx testq %rcx, %rcx je 0xabb1 movq -0x8(%r12,%r13), %rsi movq %r15, %rdi xorl %eax, %eax callq *%rcx addq $0x10, %r12 cmpq $0x198, %r12 # imm = 0x198 jne 0xab8d xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
parse_is_reserved: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, esi lea ecx, [rbx-3Bh] mov eax, 1 cmp ecx, 18h ja short loc_ABC0 mov r14, rdi mov r12d, 8 lea r13, ReservedWords lea r15, aWarningReserve; "warning: reserved word (%s)!\r\n" loc_AB8D: cmp [r12+r13], ebx jnz short loc_ABB1 mov rax, [r14+50h] test rax, rax jz short loc_ABB1 mov rcx, [rax+8] test rcx, rcx jz short loc_ABB1 mov rsi, [r12+r13-8] mov rdi, r15 xor eax, eax call rcx loc_ABB1: add r12, 10h cmp r12, 198h jnz short loc_AB8D xor eax, eax loc_ABC0: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long parse_is_reserved(long long a1, int a2) { long long result; // rax long long i; // r12 long long v4; // rax void (*v5)(const char *, ...); // rcx result = 1LL; if ( (unsigned int)(a2 - 59) <= 0x18 ) { for ( i = 1LL; i != 51; i += 2LL ) { if ( LODWORD((&ReservedWords)[i]) == a2 ) { v4 = *(_QWORD *)(a1 + 80); if ( v4 ) { v5 = *(void (**)(const char *, ...))(v4 + 8); if ( v5 ) v5("warning: reserved word (%s)!\r\n", (&ReservedWords)[i - 1]); } } } return 0LL; } return result; }
parse_is_reserved: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ESI LEA ECX,[RBX + -0x3b] MOV EAX,0x1 CMP ECX,0x18 JA 0x0010abc0 MOV R14,RDI MOV R12D,0x8 LEA R13,[0x13d6a0] LEA R15,[0x125d8c] LAB_0010ab8d: CMP dword ptr [R12 + R13*0x1],EBX JNZ 0x0010abb1 MOV RAX,qword ptr [R14 + 0x50] TEST RAX,RAX JZ 0x0010abb1 MOV RCX,qword ptr [RAX + 0x8] TEST RCX,RCX JZ 0x0010abb1 MOV RSI,qword ptr [R12 + R13*0x1 + -0x8] MOV RDI,R15 XOR EAX,EAX CALL RCX LAB_0010abb1: ADD R12,0x10 CMP R12,0x198 JNZ 0x0010ab8d XOR EAX,EAX LAB_0010abc0: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 parse_is_reserved(long param_1,int param_2) { code *pcVar1; int8 uVar2; long lVar3; uVar2 = 1; if (param_2 - 0x3bU < 0x19) { lVar3 = 8; do { if (((*(int *)((long)&ReservedWords + lVar3) == param_2) && (*(long *)(param_1 + 0x50) != 0)) && (pcVar1 = *(code **)(*(long *)(param_1 + 0x50) + 8), pcVar1 != (code *)0x0)) { (*pcVar1)(s_warning__reserved_word___s___00125d8c, *(int8 *)(collection_init_str_key + lVar3 + 0x28)); } lVar3 = lVar3 + 0x10; } while (lVar3 != 0x198); uVar2 = 0; } return uVar2; }
39,279
ma_update_status
eloqsql/storage/maria/ma_state.c
void _ma_update_status(void* param) { MARIA_HA *info=(MARIA_HA*) param; /* Because someone may have closed the table we point at, we only update the state if its our own state. This isn't a problem as we are always pointing at our own lock or at a read lock. (This is enforced by thr_multi_lock.c) */ if (info->state == &info->state_save) { MARIA_SHARE *share= info->s; #ifndef DBUG_OFF DBUG_PRINT("info",("updating status: key_file: %ld data_file: %ld", (long) info->state->key_file_length, (long) info->state->data_file_length)); if (info->state->key_file_length < share->state.state.key_file_length || info->state->data_file_length < share->state.state.data_file_length) DBUG_PRINT("warning",("old info: key_file: %ld data_file: %ld", (long) share->state.state.key_file_length, (long) share->state.state.data_file_length)); #endif /* we are going to modify the state without lock's log, this would break recovery if done with a transactional table. */ DBUG_ASSERT(!info->s->base.born_transactional); share->state.state= *info->state; info->state= &share->state.state; #ifdef HAVE_QUERY_CACHE DBUG_PRINT("info", ("invalidator... '%s' (status update)", info->s->data_file_name.str)); DBUG_ASSERT(info->s->chst_invalidator != NULL); (*info->s->chst_invalidator)((const char *)info->s->data_file_name.str); #endif } info->append_insert_at_end= 0; }
O3
c
ma_update_status: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x20(%rdi), %rax leaq 0x28(%rdi), %rcx cmpq %rcx, %rax jne 0x45fe8 movq (%rbx), %rcx leaq 0x18(%rcx), %rdx movq 0x30(%rax), %rsi movq %rsi, 0x48(%rcx) movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups 0x20(%rax), %xmm2 movups %xmm2, 0x38(%rcx) movups %xmm1, 0x28(%rcx) movups %xmm0, 0x18(%rcx) movq %rdx, 0x20(%rbx) movq (%rbx), %rax movq 0x5c0(%rax), %rdi callq *0x6f8(%rax) movb $0x0, 0x681(%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
_ma_update_status: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rax, [rdi+20h] lea rcx, [rdi+28h] cmp rax, rcx jnz short loc_45FE8 mov rcx, [rbx] lea rdx, [rcx+18h] mov rsi, [rax+30h] mov [rcx+48h], rsi movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups xmm2, xmmword ptr [rax+20h] movups xmmword ptr [rcx+38h], xmm2 movups xmmword ptr [rcx+28h], xmm1 movups xmmword ptr [rcx+18h], xmm0 mov [rbx+20h], rdx mov rax, [rbx] mov rdi, [rax+5C0h] call qword ptr [rax+6F8h] loc_45FE8: mov byte ptr [rbx+681h], 0 add rsp, 8 pop rbx pop rbp retn
long long ma_update_status(_QWORD *a1) { long long result; // rax long long v2; // rcx long long v3; // rdx __int128 v4; // xmm0 __int128 v5; // xmm1 result = a1[4]; if ( (_QWORD *)result == a1 + 5 ) { v2 = *a1; v3 = *a1 + 24LL; *(_QWORD *)(v2 + 72) = *(_QWORD *)(result + 48); v4 = *(_OWORD *)result; v5 = *(_OWORD *)(result + 16); *(_OWORD *)(v2 + 56) = *(_OWORD *)(result + 32); *(_OWORD *)(v2 + 40) = v5; *(_OWORD *)(v2 + 24) = v4; a1[4] = v3; result = (*(long long ( **)(_QWORD))(*a1 + 1784LL))(*(_QWORD *)(*a1 + 1472LL)); } *((_BYTE *)a1 + 1665) = 0; return result; }
_ma_update_status: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x20] LEA RCX,[RDI + 0x28] CMP RAX,RCX JNZ 0x00145fe8 MOV RCX,qword ptr [RBX] LEA RDX,[RCX + 0x18] MOV RSI,qword ptr [RAX + 0x30] MOV qword ptr [RCX + 0x48],RSI MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS XMM2,xmmword ptr [RAX + 0x20] MOVUPS xmmword ptr [RCX + 0x38],XMM2 MOVUPS xmmword ptr [RCX + 0x28],XMM1 MOVUPS xmmword ptr [RCX + 0x18],XMM0 MOV qword ptr [RBX + 0x20],RDX MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + 0x5c0] CALL qword ptr [RAX + 0x6f8] LAB_00145fe8: MOV byte ptr [RBX + 0x681],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void _ma_update_status(long *param_1) { long *plVar1; long lVar2; int4 uVar3; int4 uVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; long lVar9; long lVar10; long lVar11; long lVar12; long lVar13; plVar1 = (long *)param_1[4]; if (plVar1 == param_1 + 5) { lVar2 = *param_1; *(long *)(lVar2 + 0x48) = plVar1[6]; lVar9 = *plVar1; uVar3 = *(int4 *)((long)plVar1 + 4); lVar10 = plVar1[1]; uVar4 = *(int4 *)((long)plVar1 + 0xc); lVar11 = plVar1[2]; uVar5 = *(int4 *)((long)plVar1 + 0x14); lVar12 = plVar1[3]; uVar6 = *(int4 *)((long)plVar1 + 0x1c); uVar7 = *(int4 *)((long)plVar1 + 0x24); lVar13 = plVar1[5]; uVar8 = *(int4 *)((long)plVar1 + 0x2c); *(int *)(lVar2 + 0x38) = (int)plVar1[4]; *(int4 *)(lVar2 + 0x3c) = uVar7; *(int *)(lVar2 + 0x40) = (int)lVar13; *(int4 *)(lVar2 + 0x44) = uVar8; *(int *)(lVar2 + 0x28) = (int)lVar11; *(int4 *)(lVar2 + 0x2c) = uVar5; *(int *)(lVar2 + 0x30) = (int)lVar12; *(int4 *)(lVar2 + 0x34) = uVar6; *(int *)(lVar2 + 0x18) = (int)lVar9; *(int4 *)(lVar2 + 0x1c) = uVar3; *(int *)(lVar2 + 0x20) = (int)lVar10; *(int4 *)(lVar2 + 0x24) = uVar4; param_1[4] = lVar2 + 0x18; (**(code **)(*param_1 + 0x6f8))(*(int8 *)(*param_1 + 0x5c0)); } *(int1 *)((long)param_1 + 0x681) = 0; return; }
39,280
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long)
monkey531[P]llama/common/json.hpp
void int_to_string( string_type& target, std::size_t value ) { // For ADL using std::to_string; target = to_string(value); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx movl $0x1, %esi cmpq $0xa, %r14 jb 0x4db37 movl $0x4, %esi movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B movq %r14, %rcx cmpq $0x63, %rcx jbe 0x4db30 cmpq $0x3e7, %rcx # imm = 0x3E7 jbe 0x4db35 cmpq $0x2710, %rcx # imm = 0x2710 jb 0x4db37 movq %rcx, %rax mulq %rdi shrq $0xb, %rdx addl $0x4, %esi cmpq $0x1869f, %rcx # imm = 0x1869F movq %rdx, %rcx ja 0x4dafa addl $-0x3, %esi jmp 0x4db37 addl $-0x2, %esi jmp 0x4db37 decl %esi movl %esi, %esi leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x8(%rsp), %r15 movq %r15, %rdi xorl %edx, %edx callq 0x197b0 movq (%r15), %rdi movl 0x8(%r15), %esi movq %r14, %rdx callq 0x2d447 movq %rbx, %rdi movq %r15, %rsi callq 0x19820 movq (%r15), %rdi cmpq %r12, %rdi je 0x4db81 movq 0x18(%rsp), %rsi incq %rsi callq 0x196b0 addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m: push r15 push r14 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi mov esi, 1 cmp r14, 0Ah jb short loc_4DB37 mov esi, 4 mov rdi, 346DC5D63886594Bh mov rcx, r14 loc_4DAFA: cmp rcx, 63h ; 'c' jbe short loc_4DB30 cmp rcx, 3E7h jbe short loc_4DB35 cmp rcx, 2710h jb short loc_4DB37 mov rax, rcx mul rdi shr rdx, 0Bh add esi, 4 cmp rcx, 1869Fh mov rcx, rdx ja short loc_4DAFA add esi, 0FFFFFFFDh jmp short loc_4DB37 loc_4DB30: add esi, 0FFFFFFFEh jmp short loc_4DB37 loc_4DB35: dec esi loc_4DB37: mov esi, esi lea r12, [rsp+48h+var_30] mov [r12-10h], r12 lea r15, [rsp+48h+var_40] mov rdi, r15 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, [r15] mov esi, [r15+8] mov rdx, r14 call _ZNSt8__detail18__to_chars_10_implImEEvPcjT_; std::__detail::__to_chars_10_impl<ulong>(char *,uint,ulong) mov rdi, rbx mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r15]; void * cmp rdi, r12 jz short loc_4DB81 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4DB81: add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn
void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(long long a1, unsigned long long a2) { unsigned int v3; // esi unsigned long long v4; // rcx bool v5; // cc char *v6; // [rsp+8h] [rbp-40h] BYREF int v7; // [rsp+10h] [rbp-38h] _QWORD v8[6]; // [rsp+18h] [rbp-30h] BYREF v3 = 1; if ( a2 >= 0xA ) { v3 = 4; v4 = a2; while ( 1 ) { if ( v4 <= 0x63 ) { v3 -= 2; goto LABEL_10; } if ( v4 <= 0x3E7 ) break; if ( v4 < 0x2710 ) goto LABEL_10; v3 += 4; v5 = v4 <= 0x1869F; v4 /= 0x2710uLL; if ( v5 ) { v3 -= 3; goto LABEL_10; } } --v3; } LABEL_10: v6 = (char *)v8; std::string::_M_construct(&v6, v3, 0LL); std::__detail::__to_chars_10_impl<unsigned long>(v6, v7, a2); std::string::operator=(a1, &v6); if ( v6 != (char *)v8 ) operator delete(v6, v8[0] + 1LL); }
int_to_string<std::__cxx11::string>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI MOV ESI,0x1 CMP R14,0xa JC 0x0014db37 MOV ESI,0x4 MOV RDI,0x346dc5d63886594b MOV RCX,R14 LAB_0014dafa: CMP RCX,0x63 JBE 0x0014db30 CMP RCX,0x3e7 JBE 0x0014db35 CMP RCX,0x2710 JC 0x0014db37 MOV RAX,RCX MUL RDI SHR RDX,0xb ADD ESI,0x4 CMP RCX,0x1869f MOV RCX,RDX JA 0x0014dafa ADD ESI,-0x3 JMP 0x0014db37 LAB_0014db30: ADD ESI,-0x2 JMP 0x0014db37 LAB_0014db35: DEC ESI LAB_0014db37: MOV ESI,ESI LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 LEA R15,[RSP + 0x8] MOV RDI,R15 XOR EDX,EDX CALL 0x001197b0 MOV RDI,qword ptr [R15] MOV ESI,dword ptr [R15 + 0x8] MOV RDX,R14 CALL 0x0012d447 MOV RDI,RBX MOV RSI,R15 CALL 0x00119820 MOV RDI,qword ptr [R15] CMP RDI,R12 JZ 0x0014db81 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001196b0 LAB_0014db81: ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string >(std::__cxx11::string&, unsigned long) */ void nlohmann::json_abi_v3_11_3::detail::int_to_string<std::__cxx11::string> (string *param_1,ulong param_2) { bool bVar1; char cVar2; ulong uVar3; char cVar4; long *local_40; uint local_38; long local_30 [2]; cVar4 = '\x01'; if (9 < param_2) { uVar3 = param_2; cVar2 = '\x04'; do { cVar4 = cVar2; if (uVar3 < 100) { cVar4 = cVar4 + -2; goto LAB_0014db37; } if (uVar3 < 1000) { cVar4 = cVar4 + -1; goto LAB_0014db37; } if (uVar3 < 10000) goto LAB_0014db37; bVar1 = 99999 < uVar3; uVar3 = uVar3 / 10000; cVar2 = cVar4 + '\x04'; } while (bVar1); cVar4 = cVar4 + '\x01'; } LAB_0014db37: local_40 = local_30; std::__cxx11::string::_M_construct((ulong)&local_40,cVar4); std::__detail::__to_chars_10_impl<unsigned_long>((char *)local_40,local_38,param_2); std::__cxx11::string::operator=(param_1,(string *)&local_40); if (local_40 != local_30) { operator_delete(local_40,local_30[0] + 1); } return; }
39,281
format_literal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
static std::string format_literal(const std::string & literal) { std::string escaped = replacePattern(literal, GRAMMAR_LITERAL_ESCAPE_RE, [&](const std::smatch & match) { char c = match.str()[0]; return GRAMMAR_LITERAL_ESCAPES.at(c); }); return "\"" + escaped + "\""; }
O1
cpp
format_literal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdi, 0x80(%rsp) xorps %xmm0, %xmm0 leaq 0x60(%rsp), %rcx movaps %xmm0, (%rcx) leaq 0x2f9(%rip), %rax # 0xbedf0 movq %rax, 0x18(%rcx) leaq 0x35e(%rip), %rax # 0xbee60 movq %rax, 0x10(%rcx) movq %rsp, %r12 movaps %xmm0, 0x10(%r12) movaps %xmm0, (%r12) leaq 0x30(%rsp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) movq (%rsi), %r14 movq 0x8(%rsi), %r15 addq %r14, %r15 leaq 0x717c7(%rip), %r13 # 0x130300 leaq 0x20(%rsp), %rbp leaq 0x40(%rsp), %rbx movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movq %r13, %rcx xorl %r8d, %r8d callq 0x6df5f testb %al, %al je 0xbec1d movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, %rdx subq %rax, %rdx leaq -0x48(%rcx), %rsi cmpq $0x48, %rdx movq %rax, %rdx cmoveq %rsi, %rdx cmpq %rax, %rcx cmoveq %rsi, %rdx movq (%rdx), %r8 subq 0x18(%rsp), %r8 movq 0x28(%rsp), %rsi movq %rbp, %rdi xorl %edx, %edx movq %r14, %rcx callq 0x1b9e0 cmpq $0x0, 0x70(%rsp) je 0xbed1b movq %rbx, %rdi leaq 0x60(%rsp), %rsi movq %r12, %rdx callq *0x78(%rsp) movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq %rbp, %rdi callq 0x1b270 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xbebe7 movq 0x50(%rsp), %rsi incq %rsi callq 0x1b8d0 movq 0x8(%rsp), %rax movq %rax, %rcx subq (%rsp), %rcx sarq $0x3, %rcx movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB imulq %rdx, %rcx leaq -0x18(%rax), %rdx addq $-0x48, %rax cmpq $0x4, %rcx cmovaeq %rdx, %rax movq (%rax), %r14 jmp 0xbeb43 leaq 0x20(%rsp), %rdi movq 0x8(%rdi), %rsi subq %r14, %r15 xorl %edx, %edx movq %r14, %rcx movq %r15, %r8 callq 0x1b9e0 movq (%rsp), %rdi testq %rdi, %rdi movq 0x80(%rsp), %rbx je 0xbec54 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x1b8d0 movq 0x70(%rsp), %rax testq %rax, %rax je 0xbec6d leaq 0x60(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x3ae4b(%rip), %rsi # 0xf9abf movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x54775 leaq 0x3ae37(%rip), %rsi # 0xf9abf movq %rsp, %rdi callq 0x1c110 leaq 0x10(%rbx), %rdx movq %rdx, (%rbx) movq (%rax), %rsi movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rsi je 0xbecb2 movq %rsi, (%rbx) movq (%rcx), %rdx movq %rdx, 0x10(%rbx) jmp 0xbecb8 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq 0x8(%rax), %rdx movq %rdx, 0x8(%rbx) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbecea movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8d0 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0xbed06 movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8d0 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x1b320 jmp 0xbede7 movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xbed48 movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8d0 jmp 0xbed48 movq %rax, %rbx movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0xbeddf movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8d0 jmp 0xbeddf jmp 0xbed91 jmp 0xbed91 movq %rax, %rbx movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0xbed94 movq 0x50(%rsp), %rsi incq %rsi callq 0x1b8d0 jmp 0xbed94 jmp 0xbed91 movq %rax, %rbx movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0xbedb0 movq 0x30(%rsp), %rsi incq %rsi callq 0x1b8d0 movq (%rsp), %rdi testq %rdi, %rdi je 0xbedc6 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x1b8d0 movq 0x70(%rsp), %rax testq %rax, %rax je 0xbeddf leaq 0x60(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x1bfc0 movq %rax, %rdi callq 0x22abb nop
_ZL14format_literalRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov [rsp+0B8h+var_38], rdi xorps xmm0, xmm0 lea rcx, [rsp+0B8h+var_58] movaps xmmword ptr [rcx], xmm0 lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS5_EESaINS0_9sub_matchISB_EEEEEEZL14format_literalRKS5_E3$_0E9_M_invokeERKSt9_Any_dataSH_; std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_invoke(std::_Any_data const&,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&) mov [rcx+18h], rax lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS5_EESaINS0_9sub_matchISB_EEEEEEZL14format_literalRKS5_E3$_0E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rcx+10h], rax mov r12, rsp movaps xmmword ptr [r12+10h], xmm0 movaps xmmword ptr [r12], xmm0 lea rax, [rsp+0B8h+var_88] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 mov r14, [rsi] mov r15, [rsi+8] add r15, r14 lea r13, _Z25GRAMMAR_LITERAL_ESCAPE_REB5cxx11; GRAMMAR_LITERAL_ESCAPE_RE lea rbp, [rsp+0B8h+var_98] lea rbx, [rsp+0B8h+var_78] loc_BEB43: mov rdi, r14 mov rsi, r15 mov rdx, r12 mov rcx, r13 xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz loc_BEC1D mov rax, [rsp+0B8h+var_B8] mov rcx, [rsp+0B8h+var_B0] mov rdx, rcx sub rdx, rax lea rsi, [rcx-48h] cmp rdx, 48h ; 'H' mov rdx, rax cmovz rdx, rsi cmp rcx, rax cmovz rdx, rsi mov r8, [rdx] sub r8, [rsp+0B8h+var_A0] mov rsi, [rsp+0B8h+var_90] mov rdi, rbp xor edx, edx mov rcx, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) cmp [rsp+0B8h+var_48], 0 jz loc_BED1B mov rdi, rbx lea rsi, [rsp+0B8h+var_58] mov rdx, r12 call [rsp+0B8h+var_40] mov rsi, [rsp+0B8h+var_78] mov rdx, [rsp+0B8h+var_70] mov rdi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0B8h+var_78]; void * lea rax, [rsp+0B8h+var_68] cmp rdi, rax jz short loc_BEBE7 mov rsi, [rsp+0B8h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BEBE7: mov rax, [rsp+0B8h+var_B0] mov rcx, rax sub rcx, [rsp+0B8h+var_B8] sar rcx, 3 mov rdx, 0AAAAAAAAAAAAAAABh imul rcx, rdx lea rdx, [rax-18h] add rax, 0FFFFFFFFFFFFFFB8h cmp rcx, 4 cmovnb rax, rdx mov r14, [rax] jmp loc_BEB43 loc_BEC1D: lea rdi, [rsp+0B8h+var_98] mov rsi, [rdi+8] sub r15, r14 xor edx, edx mov rcx, r14 mov r8, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) mov rdi, [rsp+0B8h+var_B8]; void * test rdi, rdi mov rbx, [rsp+0B8h+var_38] jz short loc_BEC54 mov rsi, [rsp+0B8h+var_A8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BEC54: mov rax, [rsp+0B8h+var_48] test rax, rax jz short loc_BEC6D lea rdi, [rsp+0B8h+var_58] mov rsi, rdi mov edx, 3 call rax loc_BEC6D: lea rsi, aName+9; "\"" mov rdi, rsp lea rdx, [rsp+0B8h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, aName+9; "\"" mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdx, [rbx+10h] mov [rbx], rdx mov rsi, [rax] mov rcx, rax add rcx, 10h cmp rsi, rcx jz short loc_BECB2 mov [rbx], rsi mov rdx, [rcx] mov [rbx+10h], rdx jmp short loc_BECB8 loc_BECB2: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_BECB8: mov rdx, [rax+8] mov [rbx+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rax, [rsp+0B8h+var_A8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BECEA mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BECEA: mov rdi, [rsp+0B8h+var_98]; void * lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz short loc_BED06 mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BED06: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_BED1B: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp loc_BEDE7 mov rbx, rax lea rax, [rsp+0B8h+var_A8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_BED48 mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BED48 mov rbx, rax loc_BED48: mov rdi, [rsp+0B8h+var_98]; void * lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz loc_BEDDF mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BEDDF jmp short loc_BED91 jmp short loc_BED91 mov rbx, rax mov rdi, [rsp+0B8h+var_78]; void * lea rax, [rsp+0B8h+var_68] cmp rdi, rax jz short loc_BED94 mov rsi, [rsp+0B8h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BED94 jmp short $+2 loc_BED91: mov rbx, rax loc_BED94: mov rdi, [rsp+0B8h+var_98]; void * lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz short loc_BEDB0 mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BEDB0: mov rdi, [rsp+0B8h+var_B8]; void * test rdi, rdi jz short loc_BEDC6 mov rsi, [rsp+0B8h+var_A8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BEDC6: mov rax, [rsp+0B8h+var_48] test rax, rax jz short loc_BEDDF lea rdi, [rsp+0B8h+var_58] mov rsi, rdi mov edx, 3 call rax loc_BEDDF: mov rdi, rbx call __Unwind_Resume loc_BEDE7: mov rdi, rax call __clang_call_terminate
long long format_literal(long long a1, long long a2) { long long *v2; // r14 long long v3; // r15 _QWORD *v4; // rdx long long **v5; // rax long long v6; // rbx long long v7; // rax _OWORD *v8; // rcx __int128 v10; // [rsp+0h] [rbp-B8h] BYREF __int128 v11; // [rsp+10h] [rbp-A8h] BYREF void *v12; // [rsp+20h] [rbp-98h] BYREF long long v13; // [rsp+28h] [rbp-90h] _QWORD v14[2]; // [rsp+30h] [rbp-88h] BYREF void *v15[2]; // [rsp+40h] [rbp-78h] BYREF long long v16; // [rsp+50h] [rbp-68h] BYREF __int128 v17; // [rsp+60h] [rbp-58h] BYREF long long ( *v18)(); // [rsp+70h] [rbp-48h] long long ( *v19)(); // [rsp+78h] [rbp-40h] long long v20; // [rsp+80h] [rbp-38h] v20 = a1; v17 = 0LL; v19 = std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_invoke; v18 = std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_manager; v11 = 0LL; v10 = 0LL; v12 = v14; v13 = 0LL; LOBYTE(v14[0]) = 0; v2 = *(long long **)a2; v3 = *(_QWORD *)a2 + *(_QWORD *)(a2 + 8); while ( (unsigned __int8)std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>( v2, v3, (long long **)&v10, (long long)&GRAMMAR_LITERAL_ESCAPE_RE[abi:cxx11], 0) ) { v4 = (_QWORD *)v10; if ( *((_QWORD *)&v10 + 1) - (_QWORD)v10 == 72LL ) v4 = (_QWORD *)(*((_QWORD *)&v10 + 1) - 72LL); if ( *((_QWORD *)&v10 + 1) == (_QWORD)v10 ) v4 = (_QWORD *)(*((_QWORD *)&v10 + 1) - 72LL); std::string::replace(&v12, v13, 0LL, v2, *v4 - *((_QWORD *)&v11 + 1)); if ( !v18 ) std::__throw_bad_function_call(); ((void ( *)(void **, __int128 *, __int128 *))v19)(v15, &v17, &v10); std::string::_M_append(&v12, v15[0], v15[1]); if ( v15[0] != &v16 ) operator delete(v15[0], v16 + 1); v5 = (long long **)(*((_QWORD *)&v10 + 1) - 72LL); if ( 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v10 + 1) - v10) >> 3) >= 4 ) v5 = (long long **)(*((_QWORD *)&v10 + 1) - 24LL); v2 = *v5; } std::string::replace(&v12, v13, 0LL, v2, v3 - (_QWORD)v2); v6 = v20; if ( (_QWORD)v10 ) operator delete((void *)v10, v11 - v10); if ( v18 ) ((void ( *)(__int128 *, __int128 *, long long))v18)(&v17, &v17, 3LL); std::operator+<char>((long long)&v10, (long long)"\"", &v12); v7 = std::string::append(&v10, "\""); *(_QWORD *)v6 = v6 + 16; v8 = (_OWORD *)(v7 + 16); if ( *(_QWORD *)v7 == v7 + 16 ) { *(_OWORD *)(v6 + 16) = *v8; } else { *(_QWORD *)v6 = *(_QWORD *)v7; *(_QWORD *)(v6 + 16) = *(_QWORD *)v8; } *(_QWORD *)(v6 + 8) = *(_QWORD *)(v7 + 8); *(_QWORD *)v7 = v8; *(_QWORD *)(v7 + 8) = 0LL; *(_BYTE *)(v7 + 16) = 0; if ( (__int128 *)v10 != &v11 ) operator delete((void *)v10, v11 + 1); if ( v12 != v14 ) operator delete(v12, v14[0] + 1LL); return v6; }
format_literal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI XORPS XMM0,XMM0 LEA RCX,[RSP + 0x60] MOVAPS xmmword ptr [RCX],XMM0 LEA RAX,[0x1bedf0] MOV qword ptr [RCX + 0x18],RAX LEA RAX,[0x1bee60] MOV qword ptr [RCX + 0x10],RAX MOV R12,RSP MOVAPS xmmword ptr [R12 + 0x10],XMM0 MOVAPS xmmword ptr [R12],XMM0 LEA RAX,[RSP + 0x30] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 MOV R14,qword ptr [RSI] MOV R15,qword ptr [RSI + 0x8] ADD R15,R14 LEA R13,[0x230300] LEA RBP,[RSP + 0x20] LEA RBX,[RSP + 0x40] LAB_001beb43: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV RCX,R13 XOR R8D,R8D CALL 0x0016df5f TEST AL,AL JZ 0x001bec1d MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RDX,RCX SUB RDX,RAX LEA RSI,[RCX + -0x48] CMP RDX,0x48 MOV RDX,RAX CMOVZ RDX,RSI CMP RCX,RAX CMOVZ RDX,RSI MOV R8,qword ptr [RDX] SUB R8,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x28] MOV RDI,RBP XOR EDX,EDX MOV RCX,R14 CALL 0x0011b9e0 CMP qword ptr [RSP + 0x70],0x0 JZ 0x001bed1b LAB_001bebaa: MOV RDI,RBX LEA RSI,[RSP + 0x60] MOV RDX,R12 CALL qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] LAB_001bebc3: MOV RDI,RBP CALL 0x0011b270 MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x001bebe7 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x0011b8d0 LAB_001bebe7: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,RAX SUB RCX,qword ptr [RSP] SAR RCX,0x3 MOV RDX,-0x5555555555555555 IMUL RCX,RDX LEA RDX,[RAX + -0x18] ADD RAX,-0x48 CMP RCX,0x4 CMOVNC RAX,RDX MOV R14,qword ptr [RAX] JMP 0x001beb43 LAB_001bec1d: LEA RDI,[RSP + 0x20] MOV RSI,qword ptr [RDI + 0x8] SUB R15,R14 LAB_001bec29: XOR EDX,EDX MOV RCX,R14 MOV R8,R15 CALL 0x0011b9e0 MOV RDI,qword ptr [RSP] TEST RDI,RDI MOV RBX,qword ptr [RSP + 0x80] JZ 0x001bec54 MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x0011b8d0 LAB_001bec54: MOV RAX,qword ptr [RSP + 0x70] TEST RAX,RAX JZ 0x001bec6d LAB_001bec5e: LEA RDI,[RSP + 0x60] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001bec6d: LEA RSI,[0x1f9abf] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x00154775 LAB_001bec81: LEA RSI,[0x1f9abf] MOV RDI,RSP CALL 0x0011c110 LEA RDX,[RBX + 0x10] MOV qword ptr [RBX],RDX MOV RSI,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RSI,RCX JZ 0x001becb2 MOV qword ptr [RBX],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RBX + 0x10],RDX JMP 0x001becb8 LAB_001becb2: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_001becb8: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001becea MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x0011b8d0 LAB_001becea: MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x001bed06 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x0011b8d0 LAB_001bed06: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001bed1b: CALL 0x0011b320
/* format_literal(std::__cxx11::string const&) */ string * format_literal(string *param_1) { string *psVar1; bool bVar2; ulong *puVar3; int8 *puVar4; long *plVar5; ulong *in_RSI; ulong uVar6; long lVar7; long *local_b8; long lStack_b0; long local_a8 [2]; int1 *local_98; ulong local_90; int1 local_88; int7 uStack_87; long *local_78 [2]; long local_68 [2]; int8 local_58; int8 uStack_50; code *local_48; code *local_40; string *local_38; local_58 = 0; uStack_50 = 0; local_40 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>const&),format_literal(std::__cxx11::string_const&)::$_0> ::_M_invoke; local_48 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>const&),format_literal(std::__cxx11::string_const&)::$_0> ::_M_manager; local_a8[0] = 0; local_a8[1] = 0; local_b8 = (long *)0x0; lStack_b0 = 0; local_98 = &local_88; local_90 = 0; local_88 = 0; uVar6 = *in_RSI; lVar7 = in_RSI[1] + uVar6; local_38 = param_1; while( true ) { /* try { // try from 001beb43 to 001beb9d has its CatchHandler @ 001bed91 */ bVar2 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false> (uVar6,lVar7,&local_b8,GRAMMAR_LITERAL_ESCAPE_RE_abi_cxx11_,0); if (!bVar2) { /* try { // try from 001bec29 to 001bec35 has its CatchHandler @ 001bed6a */ std::__cxx11::string::replace((ulong)&local_98,local_90,(char *)0x0,uVar6); psVar1 = local_38; if (local_b8 != (long *)0x0) { operator_delete(local_b8,local_a8[0] - (long)local_b8); } if (local_48 != (code *)0x0) { /* try { // try from 001bec5e to 001bec6c has its CatchHandler @ 001bed20 */ (*local_48)(&local_58,&local_58,3); } /* try { // try from 001bec6d to 001bec80 has its CatchHandler @ 001bed45 */ std::operator+((char *)&local_b8,(string *)&DAT_001f9abf); /* try { // try from 001bec81 to 001bec8f has its CatchHandler @ 001bed25 */ puVar4 = (int8 *)std::__cxx11::string::append((char *)&local_b8); *(string **)psVar1 = psVar1 + 0x10; plVar5 = puVar4 + 2; if ((long *)*puVar4 == plVar5) { lVar7 = puVar4[3]; *(long *)(psVar1 + 0x10) = *plVar5; *(long *)(psVar1 + 0x18) = lVar7; } else { *(long **)psVar1 = (long *)*puVar4; *(long *)(psVar1 + 0x10) = *plVar5; } *(int8 *)(psVar1 + 8) = puVar4[1]; *puVar4 = plVar5; puVar4[1] = 0; *(int1 *)(puVar4 + 2) = 0; if (local_b8 != local_a8) { operator_delete(local_b8,local_a8[0] + 1); } if (local_98 != &local_88) { operator_delete(local_98,CONCAT71(uStack_87,local_88) + 1); } return psVar1; } std::__cxx11::string::replace((ulong)&local_98,local_90,(char *)0x0,uVar6); if (local_48 == (code *)0x0) break; /* try { // try from 001bebaa to 001bebb8 has its CatchHandler @ 001bed8f */ (*local_40)(local_78,&local_58,&local_b8); /* try { // try from 001bebc3 to 001bebca has its CatchHandler @ 001bed6e */ std::__cxx11::string::_M_append((char *)&local_98,(ulong)local_78[0]); if (local_78[0] != local_68) { operator_delete(local_78[0],local_68[0] + 1); } puVar3 = (ulong *)(lStack_b0 + -0x48); if (3 < (ulong)((lStack_b0 - (long)local_b8 >> 3) * -0x5555555555555555)) { puVar3 = (ulong *)(lStack_b0 + -0x18); } uVar6 = *puVar3; } /* WARNING: Subroutine does not return */ /* try { // try from 001bed1b to 001bed1f has its CatchHandler @ 001bed6c */ std::__throw_bad_function_call(); }
39,282
JS_GetPrototypePrimitive
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_GetPrototypePrimitive(JSContext *ctx, JSValue val) { switch(JS_VALUE_GET_NORM_TAG(val)) { case JS_TAG_BIG_INT: val = ctx->class_proto[JS_CLASS_BIG_INT]; break; case JS_TAG_INT: case JS_TAG_FLOAT64: val = ctx->class_proto[JS_CLASS_NUMBER]; break; case JS_TAG_BOOL: val = ctx->class_proto[JS_CLASS_BOOLEAN]; break; case JS_TAG_STRING: val = ctx->class_proto[JS_CLASS_STRING]; break; case JS_TAG_SYMBOL: val = ctx->class_proto[JS_CLASS_SYMBOL]; break; case JS_TAG_OBJECT: case JS_TAG_NULL: case JS_TAG_UNDEFINED: default: val = JS_NULL; break; } return val; }
O0
c
JS_GetPrototypePrimitive: movq %rsi, -0x28(%rsp) movq %rdx, -0x20(%rsp) movq %rdi, -0x30(%rsp) movl -0x20(%rsp), %eax addl $0x9, %eax movl %eax, %ecx movq %rcx, -0x48(%rsp) subl $0x10, %eax ja 0x2ded7 movq -0x48(%rsp), %rax leaq 0xdc83e(%rip), %rcx # 0x10a670 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x220(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x228(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2defc movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x40(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x48(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2defc movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x60(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x68(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2defc movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x50(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x58(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2defc movq -0x30(%rsp), %rax movq 0x40(%rax), %rax movq 0x70(%rax), %rcx movq %rcx, -0x28(%rsp) movq 0x78(%rax), %rax movq %rax, -0x20(%rsp) jmp 0x2defc jmp 0x2ded7 movl $0x0, -0x40(%rsp) movq $0x2, -0x38(%rsp) movq -0x40(%rsp), %rax movq %rax, -0x28(%rsp) movq -0x38(%rsp), %rax movq %rax, -0x20(%rsp) movups -0x28(%rsp), %xmm0 movaps %xmm0, -0x18(%rsp) movq -0x18(%rsp), %rax movq -0x10(%rsp), %rdx retq nopw %cs:(%rax,%rax)
JS_GetPrototypePrimitive: mov qword ptr [rsp+var_28], rsi mov qword ptr [rsp+var_28+8], rdx mov [rsp+var_30], rdi mov eax, dword ptr [rsp+var_28+8] add eax, 9; switch 17 cases mov ecx, eax mov [rsp+var_48], rcx sub eax, 10h ja def_2DE39; jumptable 000000000002DE39 default case, cases -6--2,4-6 mov rax, [rsp+var_48] lea rcx, jpt_2DE39 movsxd rax, ds:(jpt_2DE39 - 10A670h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2DE3B: mov rax, [rsp+var_30]; jumptable 000000000002DE39 case -9 mov rax, [rax+40h] mov rcx, [rax+220h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+228h] mov qword ptr [rsp+var_28+8], rax jmp loc_2DEFC loc_2DE61: mov rax, [rsp+var_30]; jumptable 000000000002DE39 cases 0,7 mov rax, [rax+40h] mov rcx, [rax+40h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+48h] mov qword ptr [rsp+var_28+8], rax jmp short loc_2DEFC loc_2DE7E: mov rax, [rsp+var_30]; jumptable 000000000002DE39 case 1 mov rax, [rax+40h] mov rcx, [rax+60h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+68h] mov qword ptr [rsp+var_28+8], rax jmp short loc_2DEFC loc_2DE9B: mov rax, [rsp+var_30]; jumptable 000000000002DE39 case -7 mov rax, [rax+40h] mov rcx, [rax+50h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+58h] mov qword ptr [rsp+var_28+8], rax jmp short loc_2DEFC loc_2DEB8: mov rax, [rsp+var_30]; jumptable 000000000002DE39 case -8 mov rax, [rax+40h] mov rcx, [rax+70h] mov qword ptr [rsp+var_28], rcx mov rax, [rax+78h] mov qword ptr [rsp+var_28+8], rax jmp short loc_2DEFC loc_2DED5: jmp short $+2; jumptable 000000000002DE39 cases -1,2,3 def_2DE39: mov dword ptr [rsp+var_40], 0; jumptable 000000000002DE39 default case, cases -6--2,4-6 mov [rsp+var_38], 2 mov rax, [rsp+var_40] mov qword ptr [rsp+var_28], rax mov rax, [rsp+var_38] mov qword ptr [rsp+var_28+8], rax loc_2DEFC: movups xmm0, [rsp+var_28] movaps [rsp+var_18], xmm0 mov rax, qword ptr [rsp+var_18] mov rdx, qword ptr [rsp+var_18+8] retn
long long JS_GetPrototypePrimitive(long long a1, long long a2, int a3) { long long v4; // [rsp+8h] [rbp-40h] __int128 v5; // [rsp+20h] [rbp-28h] switch ( a3 ) { case -9: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 544LL); break; case -8: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 112LL); break; case -7: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 80LL); break; case 0: case 7: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 64LL); break; case 1: v5 = *(_OWORD *)(*(_QWORD *)(a1 + 64) + 96LL); break; default: LODWORD(v4) = 0; *(_QWORD *)&v5 = v4; break; } return v5; }
JS_GetPrototypePrimitive: MOV qword ptr [RSP + -0x28],RSI MOV qword ptr [RSP + -0x20],RDX MOV qword ptr [RSP + -0x30],RDI MOV EAX,dword ptr [RSP + -0x20] ADD EAX,0x9 MOV ECX,EAX MOV qword ptr [RSP + -0x48],RCX SUB EAX,0x10 JA 0x0012ded7 MOV RAX,qword ptr [RSP + -0x48] LEA RCX,[0x20a670] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_fffffff7: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x220] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x228] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012defc caseD_0: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012defc caseD_1: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x60] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012defc caseD_fffffff9: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x50] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012defc caseD_fffffff8: MOV RAX,qword ptr [RSP + -0x30] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RAX + 0x70] MOV qword ptr [RSP + -0x28],RCX MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RSP + -0x20],RAX JMP 0x0012defc caseD_ffffffff: JMP 0x0012ded7 caseD_fffffffa: MOV dword ptr [RSP + -0x40],0x0 MOV qword ptr [RSP + -0x38],0x2 MOV RAX,qword ptr [RSP + -0x40] MOV qword ptr [RSP + -0x28],RAX MOV RAX,qword ptr [RSP + -0x38] MOV qword ptr [RSP + -0x20],RAX LAB_0012defc: MOVUPS XMM0,xmmword ptr [RSP + -0x28] MOVAPS xmmword ptr [RSP + -0x18],XMM0 MOV RAX,qword ptr [RSP + -0x18] MOV RDX,qword ptr [RSP + -0x10] RET
int1 [16] JS_GetPrototypePrimitive(long param_1,int8 param_2,int4 param_3) { int1 auVar1 [16]; uint uStack_3c; long local_28; int8 uStack_20; switch(param_3) { case 0: case 7: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x40); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x48); break; case 1: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x60); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x68); break; case 0xfffffff7: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x220); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x228); break; case 0xfffffff8: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x70); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x78); break; case 0xfffffff9: local_28 = *(long *)(*(long *)(param_1 + 0x40) + 0x50); uStack_20 = *(int8 *)(*(long *)(param_1 + 0x40) + 0x58); break; case 0xffffffff: case 2: case 3: default: local_28 = (ulong)uStack_3c << 0x20; uStack_20 = 2; } auVar1._8_8_ = uStack_20; auVar1._0_8_ = local_28; return auVar1; }
39,283
JS_GetPrototypePrimitive
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_GetPrototypePrimitive(JSContext *ctx, JSValue val) { switch(JS_VALUE_GET_NORM_TAG(val)) { case JS_TAG_BIG_INT: val = ctx->class_proto[JS_CLASS_BIG_INT]; break; case JS_TAG_INT: case JS_TAG_FLOAT64: val = ctx->class_proto[JS_CLASS_NUMBER]; break; case JS_TAG_BOOL: val = ctx->class_proto[JS_CLASS_BOOLEAN]; break; case JS_TAG_STRING: val = ctx->class_proto[JS_CLASS_STRING]; break; case JS_TAG_SYMBOL: val = ctx->class_proto[JS_CLASS_SYMBOL]; break; case JS_TAG_OBJECT: case JS_TAG_NULL: case JS_TAG_UNDEFINED: default: val = JS_NULL; break; } return val; }
O1
c
JS_GetPrototypePrimitive: movl $0x2, %edx xorl %eax, %eax leal 0x9(%rsi), %ecx cmpl $0xa, %ecx ja 0x22a8e leaq 0x79abb(%rip), %rsi # 0x9c534 movslq (%rsi,%rcx,4), %rcx addq %rsi, %rcx jmpq *%rcx movl $0x228, %ecx # imm = 0x228 movl $0x220, %eax # imm = 0x220 jmp 0x22ac1 cmpl $0x7, %esi jne 0x22acd movl $0x48, %ecx movl $0x40, %eax jmp 0x22ac1 movl $0x68, %ecx movl $0x60, %eax jmp 0x22ac1 movl $0x78, %ecx movl $0x70, %eax jmp 0x22ac1 movl $0x58, %ecx movl $0x50, %eax movq 0x40(%rdi), %rdx movq (%rdx,%rax), %rax movq (%rdx,%rcx), %rdx retq
JS_GetPrototypePrimitive: mov edx, 2 xor eax, eax lea ecx, [rsi+9]; switch 11 cases cmp ecx, 0Ah ja short def_22A80; jumptable 0000000000022A80 default case lea rsi, jpt_22A80 movsxd rcx, ds:(jpt_22A80 - 9C534h)[rsi+rcx*4] add rcx, rsi jmp rcx; switch jump loc_22A82: mov ecx, 228h; jumptable 0000000000022A80 case -9 mov eax, 220h jmp short loc_22AC1 def_22A80: cmp esi, 7; jumptable 0000000000022A80 default case jnz short locret_22ACD; jumptable 0000000000022A80 cases -6--1 loc_22A93: mov ecx, 48h ; 'H'; jumptable 0000000000022A80 case 0 mov eax, 40h ; '@' jmp short loc_22AC1 loc_22A9F: mov ecx, 68h ; 'h'; jumptable 0000000000022A80 case 1 mov eax, 60h ; '`' jmp short loc_22AC1 loc_22AAB: mov ecx, 78h ; 'x'; jumptable 0000000000022A80 case -8 mov eax, 70h ; 'p' jmp short loc_22AC1 loc_22AB7: mov ecx, 58h ; 'X'; jumptable 0000000000022A80 case -7 mov eax, 50h ; 'P' loc_22AC1: mov rdx, [rdi+40h] mov rax, [rdx+rax] mov rdx, [rdx+rcx] locret_22ACD: retn; jumptable 0000000000022A80 cases -6--1
long long JS_GetPrototypePrimitive(long long a1, int a2) { long long result; // rax long long v3; // rax result = 0LL; switch ( a2 ) { case -9: v3 = 544LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -8: v3 = 112LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -7: v3 = 80LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -6: case -5: case -4: case -3: case -2: case -1: return result; case 0: goto LABEL_4; case 1: v3 = 96LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); default: if ( a2 == 7 ) { LABEL_4: v3 = 64LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); } return result; } }
39,284
JS_GetPrototypePrimitive
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_GetPrototypePrimitive(JSContext *ctx, JSValue val) { switch(JS_VALUE_GET_NORM_TAG(val)) { case JS_TAG_BIG_INT: val = ctx->class_proto[JS_CLASS_BIG_INT]; break; case JS_TAG_INT: case JS_TAG_FLOAT64: val = ctx->class_proto[JS_CLASS_NUMBER]; break; case JS_TAG_BOOL: val = ctx->class_proto[JS_CLASS_BOOLEAN]; break; case JS_TAG_STRING: val = ctx->class_proto[JS_CLASS_STRING]; break; case JS_TAG_SYMBOL: val = ctx->class_proto[JS_CLASS_SYMBOL]; break; case JS_TAG_OBJECT: case JS_TAG_NULL: case JS_TAG_UNDEFINED: default: val = JS_NULL; break; } return val; }
O3
c
JS_GetPrototypePrimitive: movl $0x2, %edx xorl %eax, %eax leal 0x9(%rsi), %ecx cmpl $0xa, %ecx ja 0x232cd leaq 0x7c24c(%rip), %rsi # 0x9f504 movslq (%rsi,%rcx,4), %rcx addq %rsi, %rcx jmpq *%rcx movl $0x228, %ecx # imm = 0x228 movl $0x220, %eax # imm = 0x220 jmp 0x23300 cmpl $0x7, %esi jne 0x2330c movl $0x48, %ecx movl $0x40, %eax jmp 0x23300 movl $0x68, %ecx movl $0x60, %eax jmp 0x23300 movl $0x78, %ecx movl $0x70, %eax jmp 0x23300 movl $0x58, %ecx movl $0x50, %eax movq 0x40(%rdi), %rdx movq (%rdx,%rax), %rax movq (%rdx,%rcx), %rdx retq
JS_GetPrototypePrimitive: mov edx, 2 xor eax, eax lea ecx, [rsi+9]; switch 11 cases cmp ecx, 0Ah ja short def_232BF; jumptable 00000000000232BF default case lea rsi, jpt_232BF movsxd rcx, ds:(jpt_232BF - 9F504h)[rsi+rcx*4] add rcx, rsi jmp rcx; switch jump loc_232C1: mov ecx, 228h; jumptable 00000000000232BF case -9 mov eax, 220h jmp short loc_23300 def_232BF: cmp esi, 7; jumptable 00000000000232BF default case jnz short locret_2330C; jumptable 00000000000232BF cases -6--1 loc_232D2: mov ecx, 48h ; 'H'; jumptable 00000000000232BF case 0 mov eax, 40h ; '@' jmp short loc_23300 loc_232DE: mov ecx, 68h ; 'h'; jumptable 00000000000232BF case 1 mov eax, 60h ; '`' jmp short loc_23300 loc_232EA: mov ecx, 78h ; 'x'; jumptable 00000000000232BF case -8 mov eax, 70h ; 'p' jmp short loc_23300 loc_232F6: mov ecx, 58h ; 'X'; jumptable 00000000000232BF case -7 mov eax, 50h ; 'P' loc_23300: mov rdx, [rdi+40h] mov rax, [rdx+rax] mov rdx, [rdx+rcx] locret_2330C: retn; jumptable 00000000000232BF cases -6--1
long long JS_GetPrototypePrimitive(long long a1, int a2) { long long result; // rax long long v3; // rax result = 0LL; switch ( a2 ) { case -9: v3 = 544LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -8: v3 = 112LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -7: v3 = 80LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); case -6: case -5: case -4: case -3: case -2: case -1: return result; case 0: goto LABEL_4; case 1: v3 = 96LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); default: if ( a2 == 7 ) { LABEL_4: v3 = 64LL; return *(_QWORD *)(*(_QWORD *)(a1 + 64) + v3); } return result; } }
JS_GetPrototypePrimitive: MOV EDX,0x2 XOR EAX,EAX LEA ECX,[RSI + 0x9] CMP ECX,0xa JA 0x001232cd LEA RSI,[0x19f504] MOVSXD RCX,dword ptr [RSI + RCX*0x4] ADD RCX,RSI switchD: JMP RCX caseD_fffffff7: MOV ECX,0x228 MOV EAX,0x220 JMP 0x00123300 default: CMP ESI,0x7 JNZ 0x0012330c caseD_0: MOV ECX,0x48 MOV EAX,0x40 JMP 0x00123300 caseD_1: MOV ECX,0x68 MOV EAX,0x60 JMP 0x00123300 caseD_fffffff8: MOV ECX,0x78 MOV EAX,0x70 JMP 0x00123300 caseD_fffffff9: MOV ECX,0x58 MOV EAX,0x50 LAB_00123300: MOV RDX,qword ptr [RDI + 0x40] MOV RAX,qword ptr [RDX + RAX*0x1] MOV RDX,qword ptr [RDX + RCX*0x1] caseD_fffffffa: RET
int1 [16] JS_GetPrototypePrimitive(long param_1,int param_2) { int8 uVar1; long lVar2; long lVar3; int8 uVar4; int1 auVar5 [16]; uVar4 = 2; uVar1 = 0; switch(param_2) { case 1: lVar3 = 0x68; lVar2 = 0x60; break; case -9: lVar3 = 0x228; lVar2 = 0x220; break; case -8: lVar3 = 0x78; lVar2 = 0x70; break; case -7: lVar3 = 0x58; lVar2 = 0x50; break; case -6: case -5: case -4: case -3: case -2: case -1: goto switchD_001232bf_caseD_fffffffa; default: if (param_2 != 7) goto switchD_001232bf_caseD_fffffffa; case 0: lVar3 = 0x48; lVar2 = 0x40; } uVar1 = *(int8 *)(*(long *)(param_1 + 0x40) + lVar2); uVar4 = *(int8 *)(*(long *)(param_1 + 0x40) + lVar3); switchD_001232bf_caseD_fffffffa: auVar5._8_8_ = uVar4; auVar5._0_8_ = uVar1; return auVar5; }
39,285
my_ll10tostr_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *db, *de; long long_val; int sl= 0; ulonglong uval= (ulonglong) val; if (radix < 0) { if (val < 0) { sl= 1; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; } } p= &buffer[sizeof(buffer)-1]; *p='\0'; if (uval == 0) { *--p= '0'; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p= '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p= (char) ('0' + (long_val - quo*10)); long_val= quo; } cnv: if (sl) { *--p= '-'; } for ( db= dst, de= dst + len ; (dst < de) && *p ; p++) { int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de); if (cnvres > 0) dst+= cnvres; else break; } return (int) (dst -db); }
O3
c
my_ll10tostr_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %sil orb %al, %sil movq %r8, %rcx negq %rcx testb %sil, %sil cmovneq %r8, %rcx movb $0x0, -0x40(%rbp) testq %rcx, %rcx je 0x4fa72 movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD js 0x4fa7d leaq -0x40(%rbp), %r13 jmp 0x4fa9d leaq -0x41(%rbp), %r13 movb $0x30, (%r13) jmp 0x4fac1 movq %rcx, %rax mulq %rdi shrq $0x3, %rdx leaq -0x41(%rbp), %r13 imull $0xf6, %edx, %eax addl %eax, %ecx addb $0x30, %cl movb %cl, (%r13) movq %rdx, %rcx movq %rcx, %rax mulq %rdi shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %ecx, %eax addb $0x30, %al movb %al, -0x1(%r13) decq %r13 cmpq $0x9, %rcx movq %rdx, %rcx ja 0x4fa9d testb %sil, %sil jne 0x4face movb $0x2d, -0x1(%r13) decq %r13 movq %rbx, %r12 testq %r14, %r14 jle 0x4fb0a addq %rbx, %r14 movq %rbx, %r12 movsbq (%r13), %rsi testq %rsi, %rsi je 0x4fb0a movq 0xb8(%r15), %rax movq %r15, %rdi movq %r12, %rdx movq %r14, %rcx callq *0x30(%rax) testl %eax, %eax jle 0x4fb0a movl %eax, %eax addq %rax, %r12 incq %r13 cmpq %r14, %r12 jb 0x4fadc movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4fb2e subl %ebx, %r12d movslq %r12d, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24360
my_ll10tostr_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rdx mov rbx, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax test ecx, ecx setns al test r8, r8 setns sil or sil, al mov rcx, r8 neg rcx test sil, sil cmovnz rcx, r8 mov [rbp+var_40], 0 test rcx, rcx jz short loc_4FA72 mov rdi, 0CCCCCCCCCCCCCCCDh js short loc_4FA7D lea r13, [rbp+var_40] jmp short loc_4FA9D loc_4FA72: lea r13, [rbp+var_41] mov byte ptr [r13+0], 30h ; '0' jmp short loc_4FAC1 loc_4FA7D: mov rax, rcx mul rdi shr rdx, 3 lea r13, [rbp+var_41] imul eax, edx, 0F6h add ecx, eax add cl, 30h ; '0' mov [r13+0], cl mov rcx, rdx loc_4FA9D: mov rax, rcx mul rdi shr rdx, 3 imul eax, edx, 0F6h add eax, ecx add al, 30h ; '0' mov [r13-1], al dec r13 cmp rcx, 9 mov rcx, rdx ja short loc_4FA9D loc_4FAC1: test sil, sil jnz short loc_4FACE mov byte ptr [r13-1], 2Dh ; '-' dec r13 loc_4FACE: mov r12, rbx test r14, r14 jle short loc_4FB0A add r14, rbx mov r12, rbx loc_4FADC: movsx rsi, byte ptr [r13+0] test rsi, rsi jz short loc_4FB0A mov rax, [r15+0B8h] mov rdi, r15 mov rdx, r12 mov rcx, r14 call qword ptr [rax+30h] test eax, eax jle short loc_4FB0A mov eax, eax add r12, rax inc r13 cmp r12, r14 jb short loc_4FADC loc_4FB0A: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4FB2E sub r12d, ebx movsxd rax, r12d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4FB2E: call ___stack_chk_fail
long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, signed long long a5) { bool v6; // si unsigned long long v7; // rcx char *v8; // r13 bool v9; // cc unsigned long long v10; // r12 unsigned long long v11; // r14 int v12; // eax char v14; // [rsp+3Fh] [rbp-41h] BYREF char v15; // [rsp+40h] [rbp-40h] BYREF unsigned long long v16; // [rsp+50h] [rbp-30h] v16 = __readfsqword(0x28u); v6 = a4 >= 0 || a5 >= 0; v7 = -a5; if ( v6 ) v7 = a5; v15 = 0; if ( v7 ) { if ( (v7 & 0x8000000000000000LL) != 0LL ) { v8 = &v14; v14 = v7 % 0xA + 48; v7 /= 0xAuLL; } else { v8 = &v15; } do { *--v8 = v7 % 0xA + 48; v9 = v7 <= 9; v7 /= 0xAuLL; } while ( !v9 ); } else { v8 = &v14; v14 = 48; } if ( !v6 ) *--v8 = 45; LODWORD(v10) = a2; if ( a3 > 0 ) { v11 = a2 + a3; v10 = a2; do { if ( !*v8 ) break; v12 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, *v8, v10, v11); if ( v12 <= 0 ) break; v10 += (unsigned int)v12; ++v8; } while ( v10 < v11 ); } return (int)v10 - (int)a2; }
my_ll10tostr_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST ECX,ECX SETNS AL TEST R8,R8 SETNS SIL OR SIL,AL MOV RCX,R8 NEG RCX TEST SIL,SIL CMOVNZ RCX,R8 MOV byte ptr [RBP + -0x40],0x0 TEST RCX,RCX JZ 0x0014fa72 MOV RDI,-0x3333333333333333 JS 0x0014fa7d LEA R13,[RBP + -0x40] JMP 0x0014fa9d LAB_0014fa72: LEA R13,[RBP + -0x41] MOV byte ptr [R13],0x30 JMP 0x0014fac1 LAB_0014fa7d: MOV RAX,RCX MUL RDI SHR RDX,0x3 LEA R13,[RBP + -0x41] IMUL EAX,EDX,0xf6 ADD ECX,EAX ADD CL,0x30 MOV byte ptr [R13],CL MOV RCX,RDX LAB_0014fa9d: MOV RAX,RCX MUL RDI SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,ECX ADD AL,0x30 MOV byte ptr [R13 + -0x1],AL DEC R13 CMP RCX,0x9 MOV RCX,RDX JA 0x0014fa9d LAB_0014fac1: TEST SIL,SIL JNZ 0x0014face MOV byte ptr [R13 + -0x1],0x2d DEC R13 LAB_0014face: MOV R12,RBX TEST R14,R14 JLE 0x0014fb0a ADD R14,RBX MOV R12,RBX LAB_0014fadc: MOVSX RSI,byte ptr [R13] TEST RSI,RSI JZ 0x0014fb0a MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RAX + 0x30] TEST EAX,EAX JLE 0x0014fb0a MOV EAX,EAX ADD R12,RAX INC R13 CMP R12,R14 JC 0x0014fadc LAB_0014fb0a: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014fb2e SUB R12D,EBX MOVSXD RAX,R12D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014fb2e: CALL 0x00124360
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5) { bool bVar1; uint uVar2; ulong uVar3; ulong uVar4; char *pcVar5; long in_FS_OFFSET; char local_49 [17]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = -param_5; if ((long)param_5 >= 0 || param_4 >= 0) { uVar4 = param_5; } local_49[1] = 0; if (uVar4 == 0) { pcVar5 = local_49; local_49[0] = '0'; } else { if ((long)uVar4 < 0) { uVar3 = uVar4 / 10; pcVar5 = local_49; local_49[0] = (char)uVar4 + (char)uVar3 * -10 + '0'; } else { pcVar5 = local_49 + 1; uVar3 = uVar4; } do { pcVar5[-1] = (char)(uVar3 / 10) * -10 + (char)uVar3 + '0'; pcVar5 = pcVar5 + -1; bVar1 = 9 < uVar3; uVar3 = uVar3 / 10; } while (bVar1); } if ((long)param_5 < 0 && param_4 < 0) { pcVar5[-1] = '-'; pcVar5 = pcVar5 + -1; } uVar4 = param_2; if (0 < param_3) { do { if ((long)*pcVar5 == 0) break; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,(long)*pcVar5,uVar4,param_3 + param_2); if ((int)uVar2 < 1) break; uVar4 = uVar4 + uVar2; pcVar5 = pcVar5 + 1; } while (uVar4 < param_3 + param_2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return (long)((int)uVar4 - (int)param_2); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,286
init_partitioned_key_cache
eloqsql/mysys/mf_keycache.c
static int init_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size) { int i; size_t mem_per_cache; size_t mem_decr; int cnt; SIMPLE_KEY_CACHE_CB *partition; SIMPLE_KEY_CACHE_CB **partition_ptr; uint partitions= keycache->partitions; int blocks= 0; DBUG_ENTER("partitioned_init_key_cache"); keycache->key_cache_block_size = key_cache_block_size; if (keycache->key_cache_inited) partition_ptr= keycache->partition_array; else { if(!(partition_ptr= (SIMPLE_KEY_CACHE_CB **) my_malloc(key_memory_KEY_CACHE, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions, MYF(MY_WME)))) DBUG_RETURN(-1); bzero(partition_ptr, sizeof(SIMPLE_KEY_CACHE_CB *) * partitions); keycache->partition_array= partition_ptr; } mem_per_cache = use_mem / partitions; mem_decr= mem_per_cache / 5; for (i= 0; i < (int) partitions; i++) { my_bool key_cache_inited= keycache->key_cache_inited; if (key_cache_inited) partition= *partition_ptr; else { if (!(partition= (SIMPLE_KEY_CACHE_CB *) my_malloc(key_memory_KEY_CACHE, sizeof(SIMPLE_KEY_CACHE_CB), MYF(MY_WME)))) continue; partition->key_cache_inited= 0; } cnt= init_simple_key_cache(partition, key_cache_block_size, mem_per_cache, division_limit, age_threshold, changed_blocks_hash_size); if (cnt <= 0) { end_simple_key_cache(partition, 1); if (!key_cache_inited) { my_free(partition); partition= 0; } if ((i == 0 && cnt < 0) || i > 0) { /* Here we have two cases: 1. i == 0 and cnt < 0 cnt < 0 => mem_per_cache is not big enough to allocate minimal number of key blocks in the key cache of the partition. Decrease the the number of the partitions by 1 and start again. 2. i > 0 There is not enough memory for one of the succeeding partitions. Just skip this partition decreasing the number of partitions in the key cache by one. Do not change the value of mem_per_cache in both cases. */ if (key_cache_inited) { my_free(partition); partition= 0; if(key_cache_inited) memmove(partition_ptr, partition_ptr+1, sizeof(partition_ptr)*(partitions-i-1)); } if (!--partitions) break; } else { /* We come here when i == 0 && cnt == 0. cnt == 0 => the memory allocator fails to allocate a block of memory of the size mem_per_cache. Decrease the value of mem_per_cache without changing the current number of partitions and start again. Make sure that such a decrease may happen not more than 5 times in total. */ if (use_mem <= mem_decr) break; use_mem-= mem_decr; } i--; mem_per_cache= use_mem/partitions; continue; } else { blocks+= cnt; *partition_ptr++= partition; } } keycache->partitions= partitions= (uint) (partition_ptr-keycache->partition_array); keycache->key_cache_mem_size= mem_per_cache * partitions; for (i= 0; i < (int) partitions; i++) keycache->partition_array[i]->hash_factor= partitions; keycache->key_cache_inited= 1; if (!partitions) blocks= -1; DBUG_RETURN(blocks); }
O0
c
init_partitioned_key_cache: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl %r8d, -0x28(%rbp) movl %r9d, -0x2c(%rbp) movq -0x10(%rbp), %rax movl 0x1c(%rax), %eax movl %eax, -0x5c(%rbp) movl $0x0, -0x60(%rbp) movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x18(%rax) movq -0x10(%rbp), %rax cmpb $0x0, (%rax) je 0xe7ca0 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x58(%rbp) jmp 0xe7cf4 leaq 0xb9b611(%rip), %rax # 0xc832b8 movl (%rax), %edi movl -0x5c(%rbp), %eax movl %eax, %esi shlq $0x3, %rsi movl $0x10, %edx callq 0xf3830 movq %rax, -0x58(%rbp) cmpq $0x0, %rax jne 0xe7cd4 jmp 0xe7cc8 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xe7f0b movq -0x58(%rbp), %rdi movl -0x5c(%rbp), %eax movl %eax, %edx shlq $0x3, %rdx xorl %esi, %esi callq 0x2a2c0 movq -0x58(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movl -0x5c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movl $0x5, %ecx xorl %edx, %edx divq %rcx movq %rax, -0x40(%rbp) movl $0x0, -0x30(%rbp) movl -0x30(%rbp), %eax cmpl -0x5c(%rbp), %eax jge 0xe7e8a movq -0x10(%rbp), %rax movb (%rax), %al movb %al, -0x61(%rbp) cmpb $0x0, -0x61(%rbp) je 0xe7d45 movq -0x58(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) jmp 0xe7d73 leaq 0xb9b56c(%rip), %rax # 0xc832b8 movl (%rax), %edi movl $0x170, %esi # imm = 0x170 movl $0x10, %edx callq 0xf3830 movq %rax, -0x50(%rbp) cmpq $0x0, %rax jne 0xe7d6c jmp 0xe7e7c movq -0x50(%rbp), %rax movb $0x0, (%rax) movq -0x50(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x38(%rbp), %rdx movl -0x24(%rbp), %ecx movl -0x28(%rbp), %r8d movl -0x2c(%rbp), %r9d callq 0xe59d0 movl %eax, -0x44(%rbp) cmpl $0x0, -0x44(%rbp) jg 0xe7e5b movq -0x50(%rbp), %rdi movl $0x1, %esi callq 0xe6af0 cmpb $0x0, -0x61(%rbp) jne 0xe7dc0 movq -0x50(%rbp), %rdi callq 0xf3bb0 movq $0x0, -0x50(%rbp) cmpl $0x0, -0x30(%rbp) jne 0xe7dcc cmpl $0x0, -0x44(%rbp) jl 0xe7dd2 cmpl $0x0, -0x30(%rbp) jle 0xe7e25 cmpb $0x0, -0x61(%rbp) je 0xe7e13 movq -0x50(%rbp), %rdi callq 0xf3bb0 movq $0x0, -0x50(%rbp) cmpb $0x0, -0x61(%rbp) je 0xe7e11 movq -0x58(%rbp), %rdi movq -0x58(%rbp), %rsi addq $0x8, %rsi movl -0x5c(%rbp), %eax subl -0x30(%rbp), %eax subl $0x1, %eax movl %eax, %eax movl %eax, %edx shlq $0x3, %rdx callq 0x2a130 jmp 0xe7e13 movl -0x5c(%rbp), %eax addl $-0x1, %eax movl %eax, -0x5c(%rbp) cmpl $0x0, %eax jne 0xe7e23 jmp 0xe7e8a jmp 0xe7e40 movq -0x20(%rbp), %rax cmpq -0x40(%rbp), %rax ja 0xe7e31 jmp 0xe7e8a movq -0x40(%rbp), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movl -0x30(%rbp), %eax addl $-0x1, %eax movl %eax, -0x30(%rbp) movq -0x20(%rbp), %rax movl -0x5c(%rbp), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x38(%rbp) jmp 0xe7e7c movl -0x44(%rbp), %eax addl -0x60(%rbp), %eax movl %eax, -0x60(%rbp) movq -0x50(%rbp), %rcx movq -0x58(%rbp), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, -0x58(%rbp) movq %rcx, (%rax) jmp 0xe7e7c movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0xe7d1d movq -0x58(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx subq %rcx, %rax sarq $0x3, %rax movl %eax, %ecx movl %ecx, -0x5c(%rbp) movq -0x10(%rbp), %rax movl %ecx, 0x1c(%rax) movq -0x38(%rbp), %rcx movl -0x5c(%rbp), %eax imulq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movl $0x0, -0x30(%rbp) movl -0x30(%rbp), %eax cmpl -0x5c(%rbp), %eax jge 0xe7eef movl -0x5c(%rbp), %ecx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movslq -0x30(%rbp), %rdx movq (%rax,%rdx,8), %rax movl %ecx, 0x164(%rax) movl -0x30(%rbp), %eax addl $0x1, %eax movl %eax, -0x30(%rbp) jmp 0xe7ec3 movq -0x10(%rbp), %rax movb $0x1, (%rax) cmpl $0x0, -0x5c(%rbp) jne 0xe7f03 movl $0xffffffff, -0x60(%rbp) # imm = 0xFFFFFFFF jmp 0xe7f05 movl -0x60(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
init_partitioned_key_cache: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_28], r8d mov [rbp+var_2C], r9d mov rax, [rbp+var_10] mov eax, [rax+1Ch] mov [rbp+var_5C], eax mov [rbp+var_60], 0 mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+18h], ecx mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jz short loc_E7CA0 mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_58], rax jmp short loc_E7CF4 loc_E7CA0: lea rax, key_memory_KEY_CACHE mov edi, [rax] mov eax, [rbp+var_5C] mov esi, eax shl rsi, 3 mov edx, 10h call my_malloc mov [rbp+var_58], rax cmp rax, 0 jnz short loc_E7CD4 jmp short $+2 loc_E7CC8: mov [rbp+var_4], 0FFFFFFFFh jmp loc_E7F0B loc_E7CD4: mov rdi, [rbp+var_58] mov eax, [rbp+var_5C] mov edx, eax shl rdx, 3 xor esi, esi call _memset mov rcx, [rbp+var_58] mov rax, [rbp+var_10] mov [rax+8], rcx loc_E7CF4: mov rax, [rbp+var_20] mov ecx, [rbp+var_5C] xor edx, edx div rcx mov [rbp+var_38], rax mov rax, [rbp+var_38] mov ecx, 5 xor edx, edx div rcx mov [rbp+var_40], rax mov [rbp+var_30], 0 loc_E7D1D: mov eax, [rbp+var_30] cmp eax, [rbp+var_5C] jge loc_E7E8A mov rax, [rbp+var_10] mov al, [rax] mov [rbp+var_61], al cmp [rbp+var_61], 0 jz short loc_E7D45 mov rax, [rbp+var_58] mov rax, [rax] mov [rbp+var_50], rax jmp short loc_E7D73 loc_E7D45: lea rax, key_memory_KEY_CACHE mov edi, [rax] mov esi, 170h mov edx, 10h call my_malloc mov [rbp+var_50], rax cmp rax, 0 jnz short loc_E7D6C jmp loc_E7E7C loc_E7D6C: mov rax, [rbp+var_50] mov byte ptr [rax], 0 loc_E7D73: mov rdi, [rbp+var_50] mov esi, [rbp+var_14] mov rdx, [rbp+var_38] mov ecx, [rbp+var_24] mov r8d, [rbp+var_28] mov r9d, [rbp+var_2C] call init_simple_key_cache mov [rbp+var_44], eax cmp [rbp+var_44], 0 jg loc_E7E5B mov rdi, [rbp+var_50] mov esi, 1 call end_simple_key_cache cmp [rbp+var_61], 0 jnz short loc_E7DC0 mov rdi, [rbp+var_50] call my_free mov [rbp+var_50], 0 loc_E7DC0: cmp [rbp+var_30], 0 jnz short loc_E7DCC cmp [rbp+var_44], 0 jl short loc_E7DD2 loc_E7DCC: cmp [rbp+var_30], 0 jle short loc_E7E25 loc_E7DD2: cmp [rbp+var_61], 0 jz short loc_E7E13 mov rdi, [rbp+var_50] call my_free mov [rbp+var_50], 0 cmp [rbp+var_61], 0 jz short loc_E7E11 mov rdi, [rbp+var_58] mov rsi, [rbp+var_58] add rsi, 8 mov eax, [rbp+var_5C] sub eax, [rbp+var_30] sub eax, 1 mov eax, eax mov edx, eax shl rdx, 3 call _memmove loc_E7E11: jmp short $+2 loc_E7E13: mov eax, [rbp+var_5C] add eax, 0FFFFFFFFh mov [rbp+var_5C], eax cmp eax, 0 jnz short loc_E7E23 jmp short loc_E7E8A loc_E7E23: jmp short loc_E7E40 loc_E7E25: mov rax, [rbp+var_20] cmp rax, [rbp+var_40] ja short loc_E7E31 jmp short loc_E7E8A loc_E7E31: mov rcx, [rbp+var_40] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax loc_E7E40: mov eax, [rbp+var_30] add eax, 0FFFFFFFFh mov [rbp+var_30], eax mov rax, [rbp+var_20] mov ecx, [rbp+var_5C] xor edx, edx div rcx mov [rbp+var_38], rax jmp short loc_E7E7C loc_E7E5B: mov eax, [rbp+var_44] add eax, [rbp+var_60] mov [rbp+var_60], eax mov rcx, [rbp+var_50] mov rax, [rbp+var_58] mov rdx, rax add rdx, 8 mov [rbp+var_58], rdx mov [rax], rcx jmp short $+2 loc_E7E7C: mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp loc_E7D1D loc_E7E8A: mov rax, [rbp+var_58] mov rcx, [rbp+var_10] mov rcx, [rcx+8] sub rax, rcx sar rax, 3 mov ecx, eax mov [rbp+var_5C], ecx mov rax, [rbp+var_10] mov [rax+1Ch], ecx mov rcx, [rbp+var_38] mov eax, [rbp+var_5C] imul rcx, rax mov rax, [rbp+var_10] mov [rax+10h], rcx mov [rbp+var_30], 0 loc_E7EC3: mov eax, [rbp+var_30] cmp eax, [rbp+var_5C] jge short loc_E7EEF mov ecx, [rbp+var_5C] mov rax, [rbp+var_10] mov rax, [rax+8] movsxd rdx, [rbp+var_30] mov rax, [rax+rdx*8] mov [rax+164h], ecx mov eax, [rbp+var_30] add eax, 1 mov [rbp+var_30], eax jmp short loc_E7EC3 loc_E7EEF: mov rax, [rbp+var_10] mov byte ptr [rax], 1 cmp [rbp+var_5C], 0 jnz short loc_E7F03 mov [rbp+var_60], 0FFFFFFFFh loc_E7F03: jmp short $+2 loc_E7F05: mov eax, [rbp+var_60] mov [rbp+var_4], eax loc_E7F0B: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long init_partitioned_key_cache( char *a1, unsigned int a2, unsigned long long a3, unsigned int a4, unsigned int a5, unsigned int a6) { int inited; // eax long long *v7; // rax char v9; // [rsp+Fh] [rbp-61h] unsigned int v10; // [rsp+10h] [rbp-60h] unsigned int v11; // [rsp+14h] [rbp-5Ch] unsigned int v12; // [rsp+14h] [rbp-5Ch] long long *v13; // [rsp+18h] [rbp-58h] _BYTE *v14; // [rsp+20h] [rbp-50h] int v15; // [rsp+2Ch] [rbp-44h] unsigned long long v16; // [rsp+30h] [rbp-40h] unsigned long long v17; // [rsp+38h] [rbp-38h] int i; // [rsp+40h] [rbp-30h] int j; // [rsp+40h] [rbp-30h] v11 = *((_DWORD *)a1 + 7); v10 = 0; *((_DWORD *)a1 + 6) = a2; if ( *a1 ) { v13 = (long long *)*((_QWORD *)a1 + 1); } else { v13 = (long long *)my_malloc(key_memory_KEY_CACHE, 8LL * v11, 16LL); if ( !v13 ) return (unsigned int)-1; memset(v13, 0LL, 8LL * v11); *((_QWORD *)a1 + 1) = v13; } v17 = a3 / v11; v16 = v17 / 5; for ( i = 0; i < (int)v11; ++i ) { v9 = *a1; if ( *a1 ) { v14 = (_BYTE *)*v13; inited = init_simple_key_cache(*v13, a2, v17, a4, a5, a6); } else { v14 = (_BYTE *)my_malloc(key_memory_KEY_CACHE, 368LL, 16LL); if ( !v14 ) continue; *v14 = 0; inited = init_simple_key_cache((long long)v14, a2, v17, a4, a5, a6); } v15 = inited; if ( inited > 0 ) { v10 += inited; v7 = v13++; *v7 = (long long)v14; } else { end_simple_key_cache((long long)v14, 1); if ( !v9 ) { my_free(v14); v14 = 0LL; } if ( (i || v15 >= 0) && i <= 0 ) { if ( a3 <= v16 ) break; a3 -= v16; } else { if ( v9 ) { my_free(v14); memmove(v13, v13 + 1, 8LL * (v11 - i - 1)); } if ( !--v11 ) break; } --i; v17 = a3 / v11; } } v12 = ((long long)v13 - *((_QWORD *)a1 + 1)) >> 3; *((_DWORD *)a1 + 7) = v12; *((_QWORD *)a1 + 2) = v12 * v17; for ( j = 0; j < (int)v12; ++j ) *(_DWORD *)(*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL * j) + 356LL) = v12; *a1 = 1; if ( !v12 ) return (unsigned int)-1; return v10; }
init_partitioned_key_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV dword ptr [RBP + -0x28],R8D MOV dword ptr [RBP + -0x2c],R9D MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1c] MOV dword ptr [RBP + -0x5c],EAX MOV dword ptr [RBP + -0x60],0x0 MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x18],ECX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX],0x0 JZ 0x001e7ca0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x58],RAX JMP 0x001e7cf4 LAB_001e7ca0: LEA RAX,[0xd832b8] MOV EDI,dword ptr [RAX] MOV EAX,dword ptr [RBP + -0x5c] MOV ESI,EAX SHL RSI,0x3 MOV EDX,0x10 CALL 0x001f3830 MOV qword ptr [RBP + -0x58],RAX CMP RAX,0x0 JNZ 0x001e7cd4 JMP 0x001e7cc8 LAB_001e7cc8: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001e7f0b LAB_001e7cd4: MOV RDI,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x5c] MOV EDX,EAX SHL RDX,0x3 XOR ESI,ESI CALL 0x0012a2c0 MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX LAB_001e7cf4: MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x5c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,0x5 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x30],0x0 LAB_001e7d1d: MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x5c] JGE 0x001e7e8a MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x61],AL CMP byte ptr [RBP + -0x61],0x0 JZ 0x001e7d45 MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX JMP 0x001e7d73 LAB_001e7d45: LEA RAX,[0xd832b8] MOV EDI,dword ptr [RAX] MOV ESI,0x170 MOV EDX,0x10 CALL 0x001f3830 MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JNZ 0x001e7d6c JMP 0x001e7e7c LAB_001e7d6c: MOV RAX,qword ptr [RBP + -0x50] MOV byte ptr [RAX],0x0 LAB_001e7d73: MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x24] MOV R8D,dword ptr [RBP + -0x28] MOV R9D,dword ptr [RBP + -0x2c] CALL 0x001e59d0 MOV dword ptr [RBP + -0x44],EAX CMP dword ptr [RBP + -0x44],0x0 JG 0x001e7e5b MOV RDI,qword ptr [RBP + -0x50] MOV ESI,0x1 CALL 0x001e6af0 CMP byte ptr [RBP + -0x61],0x0 JNZ 0x001e7dc0 MOV RDI,qword ptr [RBP + -0x50] CALL 0x001f3bb0 MOV qword ptr [RBP + -0x50],0x0 LAB_001e7dc0: CMP dword ptr [RBP + -0x30],0x0 JNZ 0x001e7dcc CMP dword ptr [RBP + -0x44],0x0 JL 0x001e7dd2 LAB_001e7dcc: CMP dword ptr [RBP + -0x30],0x0 JLE 0x001e7e25 LAB_001e7dd2: CMP byte ptr [RBP + -0x61],0x0 JZ 0x001e7e13 MOV RDI,qword ptr [RBP + -0x50] CALL 0x001f3bb0 MOV qword ptr [RBP + -0x50],0x0 CMP byte ptr [RBP + -0x61],0x0 JZ 0x001e7e11 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x58] ADD RSI,0x8 MOV EAX,dword ptr [RBP + -0x5c] SUB EAX,dword ptr [RBP + -0x30] SUB EAX,0x1 MOV EAX,EAX MOV EDX,EAX SHL RDX,0x3 CALL 0x0012a130 LAB_001e7e11: JMP 0x001e7e13 LAB_001e7e13: MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,-0x1 MOV dword ptr [RBP + -0x5c],EAX CMP EAX,0x0 JNZ 0x001e7e23 JMP 0x001e7e8a LAB_001e7e23: JMP 0x001e7e40 LAB_001e7e25: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x40] JA 0x001e7e31 JMP 0x001e7e8a LAB_001e7e31: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001e7e40: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,-0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x5c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x38],RAX JMP 0x001e7e7c LAB_001e7e5b: MOV EAX,dword ptr [RBP + -0x44] ADD EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x60],EAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x58] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RBP + -0x58],RDX MOV qword ptr [RAX],RCX JMP 0x001e7e7c LAB_001e7e7c: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x001e7d1d LAB_001e7e8a: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] SUB RAX,RCX SAR RAX,0x3 MOV ECX,EAX MOV dword ptr [RBP + -0x5c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x1c],ECX MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x5c] IMUL RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV dword ptr [RBP + -0x30],0x0 LAB_001e7ec3: MOV EAX,dword ptr [RBP + -0x30] CMP EAX,dword ptr [RBP + -0x5c] JGE 0x001e7eef MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RDX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + RDX*0x8] MOV dword ptr [RAX + 0x164],ECX MOV EAX,dword ptr [RBP + -0x30] ADD EAX,0x1 MOV dword ptr [RBP + -0x30],EAX JMP 0x001e7ec3 LAB_001e7eef: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x1 CMP dword ptr [RBP + -0x5c],0x0 JNZ 0x001e7f03 MOV dword ptr [RBP + -0x60],0xffffffff LAB_001e7f03: JMP 0x001e7f05 LAB_001e7f05: MOV EAX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x4],EAX LAB_001e7f0b: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
int init_partitioned_key_cache (char *param_1,int4 param_2,ulong param_3,int4 param_4,int4 param_5, int4 param_6) { char cVar1; int iVar2; ulong uVar3; int local_68; uint local_64; int8 *local_60; int1 *local_58; ulong local_40; int local_38; ulong local_28; local_64 = *(uint *)(param_1 + 0x1c); local_68 = 0; *(int4 *)(param_1 + 0x18) = param_2; if (*param_1 == '\0') { local_60 = (int8 *)my_malloc(key_memory_KEY_CACHE,(ulong)local_64 << 3,0x10); if (local_60 == (int8 *)0x0) { return -1; } memset(local_60,0,(ulong)local_64 << 3); *(int8 **)(param_1 + 8) = local_60; } else { local_60 = *(int8 **)(param_1 + 8); } local_40 = param_3 / local_64; uVar3 = local_40 / 5; local_28 = param_3; for (local_38 = 0; local_38 < (int)local_64; local_38 = local_38 + 1) { cVar1 = *param_1; if (cVar1 == '\0') { local_58 = (int1 *)my_malloc(key_memory_KEY_CACHE,0x170,0x10); if (local_58 != (int1 *)0x0) { *local_58 = 0; goto LAB_001e7d73; } } else { local_58 = (int1 *)*local_60; LAB_001e7d73: iVar2 = init_simple_key_cache(local_58,param_2,local_40,param_4,param_5,param_6); if (iVar2 < 1) { end_simple_key_cache(local_58,1); if (cVar1 == '\0') { my_free(local_58); local_58 = (int1 *)0x0; } if (((local_38 == 0) && (iVar2 < 0)) || (0 < local_38)) { if ((cVar1 != '\0') && (my_free(local_58), cVar1 != '\0')) { memmove(local_60,local_60 + 1,(ulong)((local_64 - local_38) - 1) << 3); } local_64 = local_64 - 1; if (local_64 == 0) break; } else { if (local_28 <= uVar3) break; local_28 = local_28 - uVar3; } local_38 = local_38 + -1; local_40 = local_28 / local_64; } else { local_68 = iVar2 + local_68; *local_60 = local_58; local_60 = local_60 + 1; } } } uVar3 = (long)local_60 - *(long *)(param_1 + 8) >> 3; iVar2 = (int)uVar3; *(int *)(param_1 + 0x1c) = iVar2; *(ulong *)(param_1 + 0x10) = local_40 * (uVar3 & 0xffffffff); for (local_38 = 0; local_38 < iVar2; local_38 = local_38 + 1) { *(int *)(*(long *)(*(long *)(param_1 + 8) + (long)local_38 * 8) + 0x164) = iVar2; } *param_1 = '\x01'; if (iVar2 == 0) { local_68 = -1; } return local_68; }
39,287
cxxopts::Options::Options(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
shubhamoy[P]dir2txt/include/cxxopts.hpp
explicit Options(std::string program_name, std::string help_string = "") : m_program(std::move(program_name)) , m_help_string(toLocalString(std::move(help_string))) , m_custom_help("[OPTION...]") , m_positional_help("positional parameters") , m_show_positional(false) , m_allow_unrecognised(false) , m_width(76) , m_tab_expansion(false) , m_options(std::make_shared<OptionMap>()) { }
O3
cpp
cxxopts::Options::Options(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx addq $0x10, %rdi movq %rdi, (%rbx) movq (%rsi), %rcx leaq 0x10(%rsi), %rax cmpq %rax, %rcx je 0xba1c movq %rcx, (%rbx) movq (%rax), %rcx movq %rcx, 0x10(%rbx) jmp 0xba22 movups (%rax), %xmm0 movups %xmm0, (%rdi) movq 0x8(%rsi), %rcx movq %rcx, 0x8(%rbx) movq %rax, (%rsi) movq $0x0, 0x8(%rsi) movb $0x0, 0x10(%rsi) leaq 0x30(%rbx), %rbp movq %rbp, 0x20(%rbx) movq (%rdx), %rcx leaq 0x10(%rdx), %rax cmpq %rax, %rcx movq %rdi, 0x10(%rsp) je 0xba5f movq %rcx, 0x20(%rbx) movq (%rax), %rcx movq %rcx, 0x30(%rbx) jmp 0xba66 movups (%rax), %xmm0 movups %xmm0, (%rbp) movq 0x8(%rdx), %rcx movq %rcx, 0x28(%rbx) movq %rax, (%rdx) movq $0x0, 0x8(%rdx) movb $0x0, 0x10(%rdx) leaq 0x40(%rbx), %r15 leaq 0x50(%rbx), %r14 movq %r14, 0x40(%rbx) leaq 0x29d83(%rip), %rsi # 0x35813 leaq 0x29d87(%rip), %rdx # 0x3581e movq %r15, %rdi callq 0x9a9e leaq 0x60(%rbx), %r12 leaq 0x70(%rbx), %r13 movq %r13, 0x60(%rbx) leaq 0x29d6d(%rip), %rsi # 0x3581f leaq 0x29d7b(%rip), %rdx # 0x35834 movq %r12, %rdi callq 0x9a9e movw $0x0, 0x80(%rbx) movq $0x4c, 0x88(%rbx) movb $0x0, 0x90(%rbx) movl $0x48, %edi callq 0x8370 movabsq $0x100000001, %rcx # imm = 0x100000001 movq %rcx, 0x8(%rax) leaq 0x4153d(%rip), %rcx # 0x4d038 movq %rcx, (%rax) leaq 0x10(%rax), %rdx xorl %ecx, %ecx movq %rcx, 0x30(%rax) movq %rax, %rsi addq $0x40, %rsi movq %rsi, 0x10(%rax) movl $0x1, %esi movq %rsi, 0x18(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rax) movl $0x3f800000, %edi # imm = 0x3F800000 movl %edi, 0x30(%rax) movups %xmm0, 0x38(%rax) movq %rax, 0xa0(%rbx) movq %rdx, 0x98(%rbx) leaq 0xf0(%rbx), %rax movups %xmm0, 0xb8(%rbx) movups %xmm0, 0xc8(%rbx) movups %xmm0, 0xd8(%rbx) movups %xmm0, 0xa8(%rbx) movq %rax, 0xc0(%rbx) movq %rsi, 0xc8(%rbx) movups %xmm0, 0xd0(%rbx) movl %edi, 0xe0(%rbx) leaq 0x118(%rbx), %rax movups %xmm0, 0xe8(%rbx) movups %xmm0, 0xf8(%rbx) movups %xmm0, 0x108(%rbx) movups %xmm0, 0x118(%rbx) movq %rax, 0x128(%rbx) movq %rax, 0x130(%rbx) movq %rcx, 0x138(%rbx) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, 0x8(%rsp) movq (%r12), %rdi cmpq %r13, %rdi je 0xbbe3 movq (%r13), %rsi incq %rsi callq 0x8380 jmp 0xbbe3 movq %rax, 0x8(%rsp) movq (%r15), %rdi cmpq %r14, %rdi je 0xbbfd movq (%r14), %rsi incq %rsi callq 0x8380 jmp 0xbbfd movq %rax, 0x8(%rsp) movq 0x20(%rbx), %rdi cmpq %rbp, %rdi je 0xbc12 movq (%rbp), %rsi incq %rsi callq 0x8380 movq (%rbx), %rdi cmpq 0x10(%rsp), %rdi je 0xbc2c movq 0x10(%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x8380 movq 0x8(%rsp), %rdi callq 0x85d0
_ZN7cxxopts7OptionsC2ENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi add rdi, 10h mov [rbx], rdi mov rcx, [rsi] lea rax, [rsi+10h] cmp rcx, rax jz short loc_BA1C mov [rbx], rcx mov rcx, [rax] mov [rbx+10h], rcx jmp short loc_BA22 loc_BA1C: movups xmm0, xmmword ptr [rax] movups xmmword ptr [rdi], xmm0 loc_BA22: mov rcx, [rsi+8] mov [rbx+8], rcx mov [rsi], rax mov qword ptr [rsi+8], 0 mov byte ptr [rsi+10h], 0 lea rbp, [rbx+30h] mov [rbx+20h], rbp mov rcx, [rdx] lea rax, [rdx+10h] cmp rcx, rax mov [rsp+48h+var_38], rdi jz short loc_BA5F mov [rbx+20h], rcx mov rcx, [rax] mov [rbx+30h], rcx jmp short loc_BA66 loc_BA5F: movups xmm0, xmmword ptr [rax] movups xmmword ptr [rbp+0], xmm0 loc_BA66: mov rcx, [rdx+8] mov [rbx+28h], rcx mov [rdx], rax mov qword ptr [rdx+8], 0 mov byte ptr [rdx+10h], 0 lea r15, [rbx+40h] lea r14, [rbx+50h] mov [rbx+40h], r14 lea rsi, aOption; "[OPTION...]" lea rdx, aOption+0Bh; "" mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r12, [rbx+60h] lea r13, [rbx+70h] mov [rbx+60h], r13 lea rsi, aPositionalPara; "positional parameters" lea rdx, aPositionalPara+15h; "" mov rdi, r12 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 word ptr [rbx+80h], 0 mov qword ptr [rbx+88h], 4Ch ; 'L' mov byte ptr [rbx+90h], 0 mov edi, 48h ; 'H'; unsigned __int64 call __Znwm; operator new(ulong) mov rcx, 100000001h mov [rax+8], rcx lea rcx, off_4D038 mov [rax], rcx lea rdx, [rax+10h] xor ecx, ecx mov [rax+30h], rcx mov rsi, rax add rsi, 40h ; '@' mov [rax+10h], rsi mov esi, 1 mov [rax+18h], rsi xorps xmm0, xmm0 movups xmmword ptr [rax+20h], xmm0 mov edi, 3F800000h mov [rax+30h], edi movups xmmword ptr [rax+38h], xmm0 mov [rbx+0A0h], rax mov [rbx+98h], rdx lea rax, [rbx+0F0h] movups xmmword ptr [rbx+0B8h], xmm0 movups xmmword ptr [rbx+0C8h], xmm0 movups xmmword ptr [rbx+0D8h], xmm0 movups xmmword ptr [rbx+0A8h], xmm0 mov [rbx+0C0h], rax mov [rbx+0C8h], rsi movups xmmword ptr [rbx+0D0h], xmm0 mov [rbx+0E0h], edi lea rax, [rbx+118h] movups xmmword ptr [rbx+0E8h], xmm0 movups xmmword ptr [rbx+0F8h], xmm0 movups xmmword ptr [rbx+108h], xmm0 movups xmmword ptr [rbx+118h], xmm0 mov [rbx+128h], rax mov [rbx+130h], rax mov [rbx+138h], rcx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov [rsp+arg_0], rax mov rdi, [r12]; void * cmp rdi, r13 jz short loc_BBE3 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BBE3 mov [rsp+arg_0], rax loc_BBE3: mov rdi, [r15]; void * cmp rdi, r14 jz short loc_BBFD mov rsi, [r14] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_BBFD mov [rsp+arg_0], rax loc_BBFD: mov rdi, [rbx+20h]; void * cmp rdi, rbp jz short loc_BC12 mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BC12: mov rdi, [rbx]; void * cmp rdi, [rsp+arg_8] jz short loc_BC2C mov rax, [rsp+arg_8] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_BC2C: mov rdi, [rsp+arg_0] call __Unwind_Resume
long long cxxopts::Options::Options(long long a1, long long a2, long long a3) { _OWORD *v4; // rdi _OWORD *v5; // rax _OWORD *v6; // rax long long v7; // rax long long result; // rax v4 = (_OWORD *)(a1 + 16); *(_QWORD *)a1 = v4; v5 = (_OWORD *)(a2 + 16); if ( *(_QWORD *)a2 == a2 + 16 ) { *v4 = *v5; } else { *(_QWORD *)a1 = *(_QWORD *)a2; *(_QWORD *)(a1 + 16) = *(_QWORD *)v5; } *(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8); *(_QWORD *)a2 = v5; *(_QWORD *)(a2 + 8) = 0LL; *(_BYTE *)(a2 + 16) = 0; *(_QWORD *)(a1 + 32) = a1 + 48; v6 = (_OWORD *)(a3 + 16); if ( *(_QWORD *)a3 == a3 + 16 ) { *(_OWORD *)(a1 + 48) = *v6; } else { *(_QWORD *)(a1 + 32) = *(_QWORD *)a3; *(_QWORD *)(a1 + 48) = *(_QWORD *)v6; } *(_QWORD *)(a1 + 40) = *(_QWORD *)(a3 + 8); *(_QWORD *)a3 = v6; *(_QWORD *)(a3 + 8) = 0LL; *(_BYTE *)(a3 + 16) = 0; *(_QWORD *)(a1 + 64) = a1 + 80; std::string::_M_construct<char const*>(a1 + 64, "[OPTION...]", (long long)""); *(_QWORD *)(a1 + 96) = a1 + 112; std::string::_M_construct<char const*>(a1 + 96, "positional parameters", (long long)""); *(_WORD *)(a1 + 128) = 0; *(_QWORD *)(a1 + 136) = 76LL; *(_BYTE *)(a1 + 144) = 0; v7 = operator new(0x48uLL); *(_QWORD *)(v7 + 8) = 0x100000001LL; *(_QWORD *)v7 = off_4D038; *(_QWORD *)(v7 + 48) = 0LL; *(_QWORD *)(v7 + 16) = v7 + 64; *(_QWORD *)(v7 + 24) = 1LL; *(_OWORD *)(v7 + 32) = 0LL; *(_DWORD *)(v7 + 48) = 1065353216; *(_OWORD *)(v7 + 56) = 0LL; *(_QWORD *)(a1 + 160) = v7; *(_QWORD *)(a1 + 152) = v7 + 16; *(_OWORD *)(a1 + 184) = 0LL; *(_OWORD *)(a1 + 200) = 0LL; *(_OWORD *)(a1 + 216) = 0LL; *(_OWORD *)(a1 + 168) = 0LL; *(_QWORD *)(a1 + 192) = a1 + 240; *(_QWORD *)(a1 + 200) = 1LL; *(_OWORD *)(a1 + 208) = 0LL; *(_DWORD *)(a1 + 224) = 1065353216; result = a1 + 280; *(_OWORD *)(a1 + 232) = 0LL; *(_OWORD *)(a1 + 248) = 0LL; *(_OWORD *)(a1 + 264) = 0LL; *(_OWORD *)(a1 + 280) = 0LL; *(_QWORD *)(a1 + 296) = a1 + 280; *(_QWORD *)(a1 + 304) = a1 + 280; *(_QWORD *)(a1 + 312) = 0LL; return result; }
Options: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI ADD RDI,0x10 MOV qword ptr [RBX],RDI MOV RCX,qword ptr [RSI] LEA RAX,[RSI + 0x10] CMP RCX,RAX JZ 0x0010ba1c MOV qword ptr [RBX],RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RBX + 0x10],RCX JMP 0x0010ba22 LAB_0010ba1c: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RDI],XMM0 LAB_0010ba22: MOV RCX,qword ptr [RSI + 0x8] MOV qword ptr [RBX + 0x8],RCX MOV qword ptr [RSI],RAX MOV qword ptr [RSI + 0x8],0x0 MOV byte ptr [RSI + 0x10],0x0 LEA RBP,[RBX + 0x30] MOV qword ptr [RBX + 0x20],RBP MOV RCX,qword ptr [RDX] LEA RAX,[RDX + 0x10] CMP RCX,RAX MOV qword ptr [RSP + 0x10],RDI JZ 0x0010ba5f MOV qword ptr [RBX + 0x20],RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RBX + 0x30],RCX JMP 0x0010ba66 LAB_0010ba5f: MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RBP],XMM0 LAB_0010ba66: MOV RCX,qword ptr [RDX + 0x8] MOV qword ptr [RBX + 0x28],RCX MOV qword ptr [RDX],RAX MOV qword ptr [RDX + 0x8],0x0 MOV byte ptr [RDX + 0x10],0x0 LEA R15,[RBX + 0x40] LEA R14,[RBX + 0x50] MOV qword ptr [RBX + 0x40],R14 LAB_0010ba89: LEA RSI,[0x135813] LEA RDX,[0x13581e] MOV RDI,R15 CALL 0x00109a9e LEA R12,[RBX + 0x60] LEA R13,[RBX + 0x70] MOV qword ptr [RBX + 0x60],R13 LAB_0010baab: LEA RSI,[0x13581f] LEA RDX,[0x135834] MOV RDI,R12 CALL 0x00109a9e MOV word ptr [RBX + 0x80],0x0 MOV qword ptr [RBX + 0x88],0x4c MOV byte ptr [RBX + 0x90],0x0 LAB_0010badc: MOV EDI,0x48 CALL 0x00108370 LAB_0010bae6: MOV RCX,0x100000001 MOV qword ptr [RAX + 0x8],RCX LEA RCX,[0x14d038] MOV qword ptr [RAX],RCX LEA RDX,[RAX + 0x10] XOR ECX,ECX MOV qword ptr [RAX + 0x30],RCX MOV RSI,RAX ADD RSI,0x40 MOV qword ptr [RAX + 0x10],RSI MOV ESI,0x1 MOV qword ptr [RAX + 0x18],RSI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOV EDI,0x3f800000 MOV dword ptr [RAX + 0x30],EDI MOVUPS xmmword ptr [RAX + 0x38],XMM0 MOV qword ptr [RBX + 0xa0],RAX MOV qword ptr [RBX + 0x98],RDX LEA RAX,[RBX + 0xf0] MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 MOVUPS xmmword ptr [RBX + 0xd8],XMM0 MOVUPS xmmword ptr [RBX + 0xa8],XMM0 MOV qword ptr [RBX + 0xc0],RAX MOV qword ptr [RBX + 0xc8],RSI MOVUPS xmmword ptr [RBX + 0xd0],XMM0 MOV dword ptr [RBX + 0xe0],EDI LEA RAX,[RBX + 0x118] MOVUPS xmmword ptr [RBX + 0xe8],XMM0 MOVUPS xmmword ptr [RBX + 0xf8],XMM0 MOVUPS xmmword ptr [RBX + 0x108],XMM0 MOVUPS xmmword ptr [RBX + 0x118],XMM0 MOV qword ptr [RBX + 0x128],RAX MOV qword ptr [RBX + 0x130],RAX MOV qword ptr [RBX + 0x138],RCX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* cxxopts::Options::Options(std::__cxx11::string, std::__cxx11::string) */ void __thiscall cxxopts::Options::Options(Options *this,long *param_2,long *param_3) { long *plVar1; int4 uVar2; int4 uVar3; long lVar4; int8 *puVar5; *(Options **)this = this + 0x10; plVar1 = param_2 + 2; if ((long *)*param_2 == plVar1) { uVar2 = *(int4 *)((long)param_2 + 0x14); lVar4 = param_2[3]; uVar3 = *(int4 *)((long)param_2 + 0x1c); *(int *)(this + 0x10) = (int)*plVar1; *(int4 *)(this + 0x14) = uVar2; *(int *)(this + 0x18) = (int)lVar4; *(int4 *)(this + 0x1c) = uVar3; } else { *(long *)this = *param_2; *(long *)(this + 0x10) = *plVar1; } *(long *)(this + 8) = param_2[1]; *param_2 = (long)plVar1; param_2[1] = 0; *(int1 *)(param_2 + 2) = 0; *(Options **)(this + 0x20) = this + 0x30; plVar1 = param_3 + 2; if ((long *)*param_3 == plVar1) { uVar2 = *(int4 *)((long)param_3 + 0x14); lVar4 = param_3[3]; uVar3 = *(int4 *)((long)param_3 + 0x1c); *(int *)(this + 0x30) = (int)*plVar1; *(int4 *)(this + 0x34) = uVar2; *(int *)(this + 0x38) = (int)lVar4; *(int4 *)(this + 0x3c) = uVar3; } else { *(long *)(this + 0x20) = *param_3; *(long *)(this + 0x30) = *plVar1; } *(long *)(this + 0x28) = param_3[1]; *param_3 = (long)plVar1; param_3[1] = 0; *(int1 *)(param_3 + 2) = 0; *(Options **)(this + 0x40) = this + 0x50; /* try { // try from 0010ba89 to 0010ba9e has its CatchHandler @ 0010bbf8 */ std::__cxx11::string::_M_construct<char_const*>(this + 0x40,"[OPTION...]",""); *(Options **)(this + 0x60) = this + 0x70; /* try { // try from 0010baab to 0010bac0 has its CatchHandler @ 0010bbde */ std::__cxx11::string::_M_construct<char_const*>(this + 0x60,"positional parameters",""); *(int2 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0x4c; this[0x90] = (Options)0x0; /* try { // try from 0010badc to 0010bae5 has its CatchHandler @ 0010bbc2 */ puVar5 = (int8 *)operator_new(0x48); puVar5[1] = 0x100000001; *puVar5 = &PTR___Sp_counted_ptr_inplace_0014d038; puVar5[6] = 0; puVar5[2] = puVar5 + 8; puVar5[3] = 1; puVar5[4] = 0; puVar5[5] = 0; *(int4 *)(puVar5 + 6) = 0x3f800000; puVar5[7] = 0; puVar5[8] = 0; *(int8 **)(this + 0xa0) = puVar5; *(int8 **)(this + 0x98) = puVar5 + 2; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; *(Options **)(this + 0xc0) = this + 0xf0; *(int8 *)(this + 200) = 1; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int4 *)(this + 0xe0) = 0x3f800000; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0xf0) = 0; *(int8 *)(this + 0xf8) = 0; *(int8 *)(this + 0x100) = 0; *(int8 *)(this + 0x108) = 0; *(int8 *)(this + 0x110) = 0; *(int8 *)(this + 0x118) = 0; *(int8 *)(this + 0x120) = 0; *(Options **)(this + 0x128) = this + 0x118; *(Options **)(this + 0x130) = this + 0x118; *(int8 *)(this + 0x138) = 0; return; }
39,288
SchemaConverter::format_grammar[abi:cxx11]()
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string format_grammar() { std::stringstream ss; for (const auto & kv : _rules) { ss << kv.first << " ::= " << kv.second << std::endl; } return ss.str(); }
O2
cpp
SchemaConverter::format_grammar[abi:cxx11](): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x190, %rsp # imm = 0x190 movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %rdi callq 0x287f0 movq 0x40(%r14), %r12 addq $0x30, %r14 leaq 0x18(%rsp), %r15 leaq 0x243c8(%rip), %r13 # 0x1070b0 cmpq %r14, %r12 je 0xe2d27 leaq 0x20(%r12), %rsi movq %r15, %rdi callq 0x289b0 movq %rax, %rdi movq %r13, %rsi callq 0x28ae0 leaq 0x40(%r12), %rsi movq %rax, %rdi callq 0x289b0 movq %rax, %rdi callq 0x28570 movq %r12, %rdi callq 0x287e0 movq %rax, %r12 jmp 0xe2ce8 leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x29150 leaq 0x8(%rsp), %rdi callq 0x28870 movq %rbx, %rax addq $0x190, %rsp # imm = 0x190 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0xe2d54 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x28870 movq %rbx, %rdi callq 0x293c0 nop
_ZN15SchemaConverter14format_grammarB5cxx11Ev: push r15 push r14 push r13 push r12 push rbx sub rsp, 190h mov r14, rsi mov rbx, rdi lea rdi, [rsp+1B8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov r12, [r14+40h] add r14, 30h ; '0' lea r15, [rsp+1B8h+var_1A0] lea r13, asc_1070B0; " ::= " loc_E2CE8: cmp r12, r14 jz short loc_E2D27 lea rsi, [r12+20h] mov rdi, r15 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax mov rsi, r13 call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, [r12+40h] mov rdi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) mov rdi, r12 call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov r12, rax jmp short loc_E2CE8 loc_E2D27: lea rsi, [rsp+1B8h+var_198] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rdi, [rsp+1B8h+var_1B0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rax, rbx add rsp, 190h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_E2D54: mov rbx, rax lea rdi, [rsp+arg_0] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2) { long long i; // r12 long long v3; // rax long long v4; // rax long long v5; // rax _BYTE v7[16]; // [rsp+8h] [rbp-1B0h] BYREF _BYTE v8[8]; // [rsp+18h] [rbp-1A0h] BYREF _BYTE v9[408]; // [rsp+20h] [rbp-198h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v7); for ( i = *(_QWORD *)(a2 + 64); i != a2 + 48; i = std::_Rb_tree_increment(i) ) { v3 = std::operator<<<char>(v8, i + 32); v4 = std::operator<<<std::char_traits<char>>(v3, " ::= "); v5 = std::operator<<<char>(v4, i + 64); std::endl<char,std::char_traits<char>>(v5); } std::stringbuf::str(a1, v9); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream(v7); return a1; }
format_grammar[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x190 MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x8] CALL 0x001287f0 MOV R12,qword ptr [R14 + 0x40] ADD R14,0x30 LEA R15,[RSP + 0x18] LEA R13,[0x2070b0] LAB_001e2ce8: CMP R12,R14 JZ 0x001e2d27 LEA RSI,[R12 + 0x20] LAB_001e2cf2: MOV RDI,R15 CALL 0x001289b0 MOV RDI,RAX MOV RSI,R13 CALL 0x00128ae0 LEA RSI,[R12 + 0x40] MOV RDI,RAX CALL 0x001289b0 MOV RDI,RAX CALL 0x00128570 MOV RDI,R12 CALL 0x001287e0 MOV R12,RAX JMP 0x001e2ce8 LAB_001e2d27: LEA RSI,[RSP + 0x20] LAB_001e2d2c: MOV RDI,RBX CALL 0x00129150 LAB_001e2d34: LEA RDI,[RSP + 0x8] CALL 0x00128870 MOV RAX,RBX ADD RSP,0x190 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* SchemaConverter::format_grammar[abi:cxx11]() */ void SchemaConverter::format_grammar_abi_cxx11_(void) { ostream *poVar1; _Rb_tree_node_base *p_Var2; long in_RSI; stringstream local_1b0 [16]; ostream local_1a0 [376]; std::__cxx11::stringstream::stringstream(local_1b0); for (p_Var2 = *(_Rb_tree_node_base **)(in_RSI + 0x40); p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30); p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2)) { /* try { // try from 001e2cf2 to 001e2d19 has its CatchHandler @ 001e2d54 */ poVar1 = std::operator<<(local_1a0,(string *)(p_Var2 + 0x20)); poVar1 = std::operator<<(poVar1," ::= "); poVar1 = std::operator<<(poVar1,(string *)(p_Var2 + 0x40)); std::endl<char,std::char_traits<char>>(poVar1); } /* try { // try from 001e2d2c to 001e2d33 has its CatchHandler @ 001e2d52 */ std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b0); return; }
39,289
SchemaConverter::format_grammar[abi:cxx11]()
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string format_grammar() { std::stringstream ss; for (const auto & kv : _rules) { ss << kv.first << " ::= " << kv.second << std::endl; } return ss.str(); }
O3
cpp
SchemaConverter::format_grammar[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x188, %rsp # imm = 0x188 movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rdi callq 0x1f7a0 movq 0x40(%r14), %r15 addq $0x30, %r14 cmpq %r14, %r15 je 0x1332cf leaq 0x10(%rsp), %r12 leaq 0x27e1b(%rip), %r13 # 0x15b07d movq 0x20(%r15), %rsi movq 0x28(%r15), %rdx movq %r12, %rdi callq 0x1fc50 movq %rax, %rbp movl $0x5, %edx movq %rax, %rdi movq %r13, %rsi callq 0x1fc50 movq 0x40(%r15), %rsi movq 0x48(%r15), %rdx movq %rbp, %rdi callq 0x1fc50 movq %rax, %rbp movq (%rax), %rax movq -0x18(%rax), %rdi addq %rbp, %rdi movl $0xa, %esi callq 0x1fa50 movsbl %al, %esi movq %rbp, %rdi callq 0x1f040 movq %rax, %rdi callq 0x1f760 movq %r15, %rdi callq 0x1f790 movq %rax, %r15 cmpq %r14, %rax jne 0x133262 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x20110 movq 0x71c35(%rip), %rsi # 0x1a4f18 movq %rsp, %rdi callq 0x1f810 leaq 0x80(%rsp), %rdi callq 0x1f380 movq %rbx, %rax addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x13330f movq %rax, %rbx movq 0x71bff(%rip), %rsi # 0x1a4f18 movq %rsp, %rdi callq 0x1f810 leaq 0x80(%rsp), %rdi callq 0x1f380 movq %rbx, %rdi callq 0x20380
_ZN15SchemaConverter14format_grammarB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 188h mov r14, rsi mov rbx, rdi mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov r15, [r14+40h] add r14, 30h ; '0' cmp r15, r14 jz short loc_1332CF lea r12, [rsp+1B8h+var_1A8] lea r13, asc_15B07D; " ::= " loc_133262: mov rsi, [r15+20h] mov rdx, [r15+28h] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbp, rax mov edx, 5 mov rdi, rax mov rsi, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r15+40h] mov rdx, [r15+48h] mov rdi, rbp call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbp, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, rbp mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbp; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov rdi, r15 call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov r15, rax cmp rax, r14 jnz short loc_133262 loc_1332CF: lea rsi, [rsp+1B8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1B8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 188h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_13330F: mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_78]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2) { _QWORD *i; // r15 long long v3; // rbp std::ostream *v4; // rbp char v5; // al std::ostream *v6; // rax _BYTE v8[16]; // [rsp+0h] [rbp-1B8h] BYREF _BYTE v9[8]; // [rsp+10h] [rbp-1A8h] BYREF _BYTE v10[104]; // [rsp+18h] [rbp-1A0h] BYREF _BYTE v11[312]; // [rsp+80h] [rbp-138h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v8); for ( i = *(_QWORD **)(a2 + 64); i != (_QWORD *)(a2 + 48); i = (_QWORD *)std::_Rb_tree_increment(i) ) { v3 = std::__ostream_insert<char,std::char_traits<char>>(v9, i[4], i[5]); std::__ostream_insert<char,std::char_traits<char>>(v3, " ::= ", 5LL); v4 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v3, i[8], i[9]); v5 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL); v6 = (std::ostream *)std::ostream::put(v4, v5); std::ostream::flush(v6); } std::stringbuf::str(a1, v10); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v8, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v11); return a1; }
39,290
blst_uint32_from_scalar
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/exports.c
void blst_uint32_from_scalar(unsigned int ret[8], const pow256 a) { const union { long one; char little; } is_endian = { 1 }; size_t i; if ((uptr_t)ret==(uptr_t)a && is_endian.little) return; for(i = 0; i < 8; i++) { unsigned int w = (unsigned int)(*a++); w |= (unsigned int)(*a++) << 8; w |= (unsigned int)(*a++) << 16; w |= (unsigned int)(*a++) << 24; ret[i] = w; } }
O2
c
blst_uint32_from_scalar: pushq %rbp movq %rsp, %rbp cmpq %rsi, %rdi je 0x5ae52 xorl %eax, %eax cmpq $0x8, %rax je 0x5ae52 movl (%rsi,%rax,4), %ecx movl %ecx, (%rdi,%rax,4) incq %rax jmp 0x5ae41 popq %rbp retq
blst_uint32_from_scalar: push rbp mov rbp, rsp cmp rdi, rsi jz short loc_5AE52 xor eax, eax loc_5AE41: cmp rax, 8 jz short loc_5AE52 mov ecx, [rsi+rax*4] mov [rdi+rax*4], ecx inc rax jmp short loc_5AE41 loc_5AE52: pop rbp retn
void blst_uint32_from_scalar(long long a1, long long a2) { long long i; // rax if ( a1 != a2 ) { for ( i = 0LL; i != 8; ++i ) *(_DWORD *)(a1 + 4 * i) = *(_DWORD *)(a2 + 4 * i); } }
blst_uint32_from_scalar: PUSH RBP MOV RBP,RSP CMP RDI,RSI JZ 0x0015ae52 XOR EAX,EAX LAB_0015ae41: CMP RAX,0x8 JZ 0x0015ae52 MOV ECX,dword ptr [RSI + RAX*0x4] MOV dword ptr [RDI + RAX*0x4],ECX INC RAX JMP 0x0015ae41 LAB_0015ae52: POP RBP RET
void blst_uint32_from_scalar(long param_1,long param_2) { long lVar1; if (param_1 != param_2) { for (lVar1 = 0; lVar1 != 8; lVar1 = lVar1 + 1) { *(int4 *)(param_1 + lVar1 * 4) = *(int4 *)(param_2 + lVar1 * 4); } } return; }
39,291
test_count_equal::vars[abi:cxx11]()
monkey531[P]llama/tests/test-backend-ops.cpp
std::string vars() override { return VARS_TO_STR2(type, ne); }
O1
cpp
test_count_equal::vars[abi:cxx11](): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, %rbx movl 0x38(%rsi), %edi callq 0xd540 leaq 0x88(%rsp), %r15 leaq 0x8(%rsp), %rdx movq %r15, %rdi movq %rax, %rsi callq 0x1a992 leaq 0x29cb(%rip), %rcx # 0x45e1c movl $0x5, %r8d movq %r15, %rdi xorl %esi, %esi xorl %edx, %edx callq 0xd6b0 leaq 0x58(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x4348a movq %rdx, 0x48(%rsp) movq (%rcx), %rdx movq %rdx, 0x58(%rsp) jmp 0x43491 movups (%rcx), %xmm0 movups %xmm0, (%r15) movq 0x8(%rax), %rdx leaq 0x48(%rsp), %rdi movq %rdx, 0x8(%rdi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x2929(%rip), %rsi # 0x45ddd callq 0xdc10 leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x434e1 movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0x434e9 movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx movq %rdx, 0x30(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) addq $0x40, %r14 leaq 0x68(%rsp), %rdi movq %r14, %rsi callq 0x1736d leaq 0x2979(%rip), %rcx # 0x45e92 leaq 0x68(%rsp), %rdi movl $0x3, %r8d xorl %esi, %esi xorl %edx, %edx callq 0xd6b0 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x43554 movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x4355b movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movq 0x10(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %esi cmpq %r12, %rcx je 0x43595 movq 0x38(%rsp), %rsi cmpq %rsi, %rax jbe 0x435b0 movl $0xf, %esi cmpq %r14, 0x8(%rsp) je 0x435ab movq 0x18(%rsp), %rsi cmpq %rsi, %rax jbe 0x435c1 movq 0x8(%rsp), %rsi leaq 0x28(%rsp), %rdi callq 0xd180 jmp 0x435cf leaq 0x8(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0xd6b0 leaq 0x10(%rbx), %rdx movq %rdx, (%rbx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x435ee movq %rsi, (%rbx) movq (%rcx), %rdx movq %rdx, 0x10(%rbx) jmp 0x435f4 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x8(%rbx) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x43627 movq 0x18(%rsp), %rsi incq %rsi callq 0xd5e0 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x43642 movq 0x78(%rsp), %rsi incq %rsi callq 0xd5e0 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x43659 movq 0x38(%rsp), %rsi incq %rsi callq 0xd5e0 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x43670 movq 0x58(%rsp), %rsi incq %rsi callq 0xd5e0 leaq 0x98(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x43691 movq 0x98(%rsp), %rsi incq %rsi callq 0xd5e0 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x436c2 movq 0x18(%rsp), %rsi incq %rsi callq 0xd5e0 jmp 0x436c2 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x436e2 movq 0x78(%rsp), %rsi incq %rsi callq 0xd5e0 jmp 0x436e2 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x436fe movq 0x38(%rsp), %rsi incq %rsi callq 0xd5e0 jmp 0x436fe movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x4371a movq 0x58(%rsp), %rsi incq %rsi callq 0xd5e0 jmp 0x4371a movq %rax, %rbx leaq 0x98(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4373b movq 0x98(%rsp), %rsi incq %rsi callq 0xd5e0 movq %rbx, %rdi callq 0xdb00 nop
_ZN19test_opt_step_adamw4varsB5cxx11Ev: push r15 push r14 push r12 push rbx sub rsp, 0A8h mov r14, rsi mov rbx, rdi mov edi, [rsi+38h] call _ggml_type_name lea r15, [rsp+0C8h+var_40] lea rdx, [rsp+0C8h+var_C0] mov rdi, r15 mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rcx, aPoolType+5; "type=" mov r8d, 5 mov rdi, r15 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r15, [rsp+0C8h+var_70] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_4348A mov [rsp+0C8h+var_80], rdx mov rdx, [rcx] mov [rsp+0C8h+var_70], rdx jmp short loc_43491 loc_4348A: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 loc_43491: mov rdx, [rax+8] lea rdi, [rsp+0C8h+var_80] mov [rdi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rsi, asc_45DDD; "," call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r12, [rsp+0C8h+var_90] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h; int cmp rdx, rcx jz short loc_434E1 mov [rsp+0C8h+var_A0], rdx mov rdx, [rcx] mov [rsp+0C8h+var_90], rdx jmp short loc_434E9 loc_434E1: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_434E9: mov rdx, [rax+8]; int mov [rsp+0C8h+var_98], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 add r14, 40h ; '@' lea rdi, [rsp+0C8h+var_60]; int mov rsi, r14; int call _ZL10var_to_strIlLm4EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt5arrayIT_XT0_EE; var_to_str<long,4ul>(std::array<long,4ul> const&) lea rcx, aNe; "ne=" lea rdi, [rsp+0C8h+var_60] mov r8d, 3 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r14, [rsp+0C8h+var_B0] mov [r14-10h], r14 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_43554 mov [rsp+0C8h+var_C0], rdx mov rdx, [rcx] mov [rsp+0C8h+var_B0], rdx jmp short loc_4355B loc_43554: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r14], xmm0 loc_4355B: mov rdx, [rax+8] mov [rsp+0C8h+var_B8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rcx, [rsp+0C8h+var_A0] mov r8, [rsp+0C8h+var_98] mov rdx, [rsp+0C8h+var_B8] lea rax, [rdx+r8] mov esi, 0Fh cmp rcx, r12 jz short loc_43595 mov rsi, [rsp+0C8h+var_90] loc_43595: cmp rax, rsi jbe short loc_435B0 mov esi, 0Fh cmp [rsp+0C8h+var_C0], r14 jz short loc_435AB mov rsi, [rsp+0C8h+var_B0] loc_435AB: cmp rax, rsi jbe short loc_435C1 loc_435B0: mov rsi, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_435CF loc_435C1: lea rdi, [rsp+0C8h+var_C0] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_435CF: lea rdx, [rbx+10h] mov [rbx], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_435EE mov [rbx], rsi mov rdx, [rcx] mov [rbx+10h], rdx jmp short loc_435F4 loc_435EE: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_435F4: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rbx+8], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r14 jz short loc_43627 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_43627: lea rax, [rsp+0C8h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_43642 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_43642: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r12 jz short loc_43659 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_43659: mov rdi, [rsp+0C8h+var_80]; void * cmp rdi, r15 jz short loc_43670 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_43670: lea rax, [rsp+0C8h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_43691 mov rsi, [rsp+0C8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_43691: mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_436C2 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_436C2 mov rbx, rax loc_436C2: lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_436E2 mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_436E2 mov rbx, rax loc_436E2: mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_436FE mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_436FE mov rbx, rax loc_436FE: mov rdi, [rsp+arg_40]; void * cmp rdi, r15 jz short loc_4371A mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4371A mov rbx, rax loc_4371A: lea rax, [rsp+arg_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4373B mov rsi, [rsp+arg_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4373B: mov rdi, rbx call __Unwind_Resume
long long test_opt_step_adamw::vars[abi:cxx11](long long a1, long long a2) { long long v2; // rax long long v3; // rax __int128 *v4; // rcx long long v5; // rax __int128 *v6; // rcx long long v7; // rax __int128 *v8; // rcx unsigned long long v9; // rax unsigned long long v10; // rsi unsigned long long v11; // rsi _QWORD *v12; // rax _OWORD *v13; // rcx void *v15; // [rsp+8h] [rbp-C0h] BYREF long long v16; // [rsp+10h] [rbp-B8h] __int128 v17; // [rsp+18h] [rbp-B0h] BYREF void *v18; // [rsp+28h] [rbp-A0h] BYREF long long v19; // [rsp+30h] [rbp-98h] __int128 v20; // [rsp+38h] [rbp-90h] BYREF void *v21[2]; // [rsp+48h] [rbp-80h] BYREF __int128 v22; // [rsp+58h] [rbp-70h] BYREF int v23[4]; // [rsp+68h] [rbp-60h] BYREF long long v24; // [rsp+78h] [rbp-50h] BYREF void *v25[2]; // [rsp+88h] [rbp-40h] BYREF long long v26; // [rsp+98h] [rbp-30h] BYREF v2 = ggml_type_name(*(unsigned int *)(a2 + 56)); std::string::basic_string<std::allocator<char>>(v25, v2); v3 = std::string::replace(v25, 0LL, 0LL, "type=", 5LL); v21[0] = &v22; v4 = (__int128 *)(v3 + 16); if ( *(_QWORD *)v3 == v3 + 16 ) { v22 = *v4; } else { v21[0] = *(void **)v3; *(_QWORD *)&v22 = *(_QWORD *)v4; } v21[1] = *(void **)(v3 + 8); *(_QWORD *)v3 = v4; *(_QWORD *)(v3 + 8) = 0LL; *(_BYTE *)(v3 + 16) = 0; v5 = std::string::append(v21, ","); v18 = &v20; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v20 = *v6; } else { v18 = *(void **)v5; *(_QWORD *)&v20 = *(_QWORD *)v6; } v19 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; var_to_str<long,4ul>(v23, a2 + 64); v7 = std::string::replace(v23, 0LL, 0LL, "ne=", 3LL); v15 = &v17; v8 = (__int128 *)(v7 + 16); if ( *(_QWORD *)v7 == v7 + 16 ) { v17 = *v8; } else { v15 = *(void **)v7; *(_QWORD *)&v17 = *(_QWORD *)v8; } v16 = *(_QWORD *)(v7 + 8); *(_QWORD *)v7 = v8; *(_QWORD *)(v7 + 8) = 0LL; *(_BYTE *)(v7 + 16) = 0; v9 = v16 + v19; v10 = 15LL; if ( v18 != &v20 ) v10 = v20; if ( v9 <= v10 ) goto LABEL_16; v11 = 15LL; if ( v15 != &v17 ) v11 = v17; if ( v9 <= v11 ) v12 = (_QWORD *)std::string::replace(&v15, 0LL, 0LL, v18, v19); else LABEL_16: v12 = (_QWORD *)std::string::_M_append(&v18, v15, v16); *(_QWORD *)a1 = a1 + 16; v13 = v12 + 2; if ( (_QWORD *)*v12 == v12 + 2 ) { *(_OWORD *)(a1 + 16) = *v13; } else { *(_QWORD *)a1 = *v12; *(_QWORD *)(a1 + 16) = *(_QWORD *)v13; } *(_QWORD *)(a1 + 8) = v12[1]; *v12 = v13; v12[1] = 0LL; *(_BYTE *)v13 = 0; if ( v15 != &v17 ) operator delete(v15, v17 + 1); if ( *(long long **)v23 != &v24 ) operator delete(*(void **)v23, v24 + 1); if ( v18 != &v20 ) operator delete(v18, v20 + 1); if ( v21[0] != &v22 ) operator delete(v21[0], v22 + 1); if ( v25[0] != &v26 ) operator delete(v25[0], v26 + 1); return a1; }
vars[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV RBX,RDI MOV EDI,dword ptr [RSI + 0x38] CALL 0x0010d540 LEA R15,[RSP + 0x88] LEA RDX,[RSP + 0x8] MOV RDI,R15 MOV RSI,RAX CALL 0x0011a992 LAB_0014344a: LEA RCX,[0x145e1c] MOV R8D,0x5 MOV RDI,R15 XOR ESI,ESI XOR EDX,EDX CALL 0x0010d6b0 LEA R15,[RSP + 0x58] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0014348a MOV qword ptr [RSP + 0x48],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x58],RDX JMP 0x00143491 LAB_0014348a: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 LAB_00143491: MOV RDX,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x48] MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_001434ad: LEA RSI,[0x145ddd] CALL 0x0010dc10 LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001434e1 MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x001434e9 LAB_001434e1: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 LAB_001434e9: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 ADD R14,0x40 LAB_00143505: LEA RDI,[RSP + 0x68] MOV RSI,R14 CALL 0x0011736d LAB_00143512: LEA RCX,[0x145e92] LEA RDI,[RSP + 0x68] MOV R8D,0x3 XOR ESI,ESI XOR EDX,EDX CALL 0x0010d6b0 LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x00143554 MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x0014355b LAB_00143554: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R14],XMM0 LAB_0014355b: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x10] LEA RAX,[RDX + R8*0x1] MOV ESI,0xf CMP RCX,R12 JZ 0x00143595 MOV RSI,qword ptr [RSP + 0x38] LAB_00143595: CMP RAX,RSI JBE 0x001435b0 MOV ESI,0xf CMP qword ptr [RSP + 0x8],R14 JZ 0x001435ab MOV RSI,qword ptr [RSP + 0x18] LAB_001435ab: CMP RAX,RSI JBE 0x001435c1 LAB_001435b0: MOV RSI,qword ptr [RSP + 0x8] LAB_001435b5: LEA RDI,[RSP + 0x28] CALL 0x0010d180 JMP 0x001435cf LAB_001435c1: LEA RDI,[RSP + 0x8] XOR ESI,ESI XOR EDX,EDX CALL 0x0010d6b0 LAB_001435cf: LEA RDX,[RBX + 0x10] MOV qword ptr [RBX],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x001435ee MOV qword ptr [RBX],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RBX + 0x10],RDX JMP 0x001435f4 LAB_001435ee: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_001435f4: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x8],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x00143627 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010d5e0 LAB_00143627: LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00143642 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0010d5e0 LAB_00143642: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x00143659 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0010d5e0 LAB_00143659: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R15 JZ 0x00143670 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0010d5e0 LAB_00143670: LEA RAX,[RSP + 0x98] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00143691 MOV RSI,qword ptr [RSP + 0x98] INC RSI CALL 0x0010d5e0 LAB_00143691: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R14 POP R15 RET
/* test_opt_step_adamw::vars[abi:cxx11]() */ void test_opt_step_adamw::vars_abi_cxx11_(void) { int8 *puVar1; int8 uVar2; char *pcVar3; long *plVar4; int8 *puVar5; long *plVar6; ulong *puVar7; long in_RSI; ulong uVar8; int8 *in_RDI; ulong *local_c0; long local_b8; ulong local_b0; long lStack_a8; ulong *local_a0; long local_98; ulong local_90; long lStack_88; long *local_80; long local_78; long local_70; long lStack_68; long *local_60 [2]; long local_50 [2]; long *local_40 [2]; long local_30 [2]; pcVar3 = (char *)ggml_type_name(*(int4 *)(in_RSI + 0x38)); std::__cxx11::string::string<std::allocator<char>> ((string *)local_40,pcVar3,(allocator *)&local_c0); /* try { // try from 0014344a to 00143462 has its CatchHandler @ 00143717 */ plVar4 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x145e1c); plVar6 = plVar4 + 2; if ((long *)*plVar4 == plVar6) { local_70 = *plVar6; lStack_68 = plVar4[3]; local_80 = &local_70; } else { local_70 = *plVar6; local_80 = (long *)*plVar4; } local_78 = plVar4[1]; *plVar4 = (long)plVar6; plVar4[1] = 0; *(int1 *)(plVar4 + 2) = 0; /* try { // try from 001434ad to 001434b8 has its CatchHandler @ 001436fb */ plVar4 = (long *)std::__cxx11::string::append((char *)&local_80); puVar7 = (ulong *)(plVar4 + 2); if ((ulong *)*plVar4 == puVar7) { local_90 = *puVar7; lStack_88 = plVar4[3]; local_a0 = &local_90; } else { local_90 = *puVar7; local_a0 = (ulong *)*plVar4; } local_98 = plVar4[1]; *plVar4 = (long)puVar7; plVar4[1] = 0; *(int1 *)(plVar4 + 2) = 0; /* try { // try from 00143505 to 00143511 has its CatchHandler @ 001436df */ var_to_str<long,4ul>((array *)local_60); /* try { // try from 00143512 to 0014352c has its CatchHandler @ 001436bf */ plVar4 = (long *)std::__cxx11::string::replace((ulong)local_60,0,(char *)0x0,0x145e92); puVar7 = (ulong *)(plVar4 + 2); if ((ulong *)*plVar4 == puVar7) { local_b0 = *puVar7; lStack_a8 = plVar4[3]; local_c0 = &local_b0; } else { local_b0 = *puVar7; local_c0 = (ulong *)*plVar4; } local_b8 = plVar4[1]; *plVar4 = (long)puVar7; plVar4[1] = 0; *(int1 *)(plVar4 + 2) = 0; uVar8 = 0xf; if (local_a0 != &local_90) { uVar8 = local_90; } if (uVar8 < (ulong)(local_b8 + local_98)) { uVar8 = 0xf; if (local_c0 != &local_b0) { uVar8 = local_b0; } if ((ulong)(local_b8 + local_98) <= uVar8) { puVar5 = (int8 *) std::__cxx11::string::replace((ulong)&local_c0,0,(char *)0x0,(ulong)local_a0); goto LAB_001435cf; } } /* try { // try from 001435b5 to 001435ce has its CatchHandler @ 001436a3 */ puVar5 = (int8 *)std::__cxx11::string::_M_append((char *)&local_a0,(ulong)local_c0); LAB_001435cf: *in_RDI = in_RDI + 2; puVar1 = puVar5 + 2; if ((int8 *)*puVar5 == puVar1) { uVar2 = puVar5[3]; in_RDI[2] = *puVar1; in_RDI[3] = uVar2; } else { *in_RDI = (int8 *)*puVar5; in_RDI[2] = *puVar1; } in_RDI[1] = puVar5[1]; *puVar5 = puVar1; puVar5[1] = 0; *(int1 *)puVar1 = 0; if (local_c0 != &local_b0) { operator_delete(local_c0,local_b0 + 1); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } if (local_a0 != &local_90) { operator_delete(local_a0,local_90 + 1); } if (local_80 != &local_70) { operator_delete(local_80,local_70 + 1); } if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return; }
39,292
test_count_equal::vars[abi:cxx11]()
monkey531[P]llama/tests/test-backend-ops.cpp
std::string vars() override { return VARS_TO_STR2(type, ne); }
O2
cpp
test_count_equal::vars[abi:cxx11](): pushq %r15 pushq %r14 pushq %rbx subq $0xa0, %rsp movq %rsi, %r14 movq %rdi, %rbx movl 0x38(%rsi), %esi leaq 0x80(%rsp), %r15 movq %r15, %rdi callq 0x18e2b leaq 0x2996(%rip), %rsi # 0x30db6 leaq 0x40(%rsp), %rdi movq %r15, %rdx callq 0x1ca87 leaq 0x2943(%rip), %rdx # 0x30d77 leaq 0x60(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x1cff2 addq $0x40, %r14 movq %rsp, %rdi movq %r14, %rsi callq 0x18e53 leaq 0x29d3(%rip), %rsi # 0x30e2c leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x1ca87 leaq 0x60(%rsp), %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi callq 0x1cf8b leaq 0x20(%rsp), %rdi callq 0xf280 movq %rsp, %rdi callq 0xf280 leaq 0x60(%rsp), %rdi callq 0xf280 leaq 0x40(%rsp), %rdi callq 0xf280 leaq 0x80(%rsp), %rdi callq 0xf280 movq %rbx, %rax addq $0xa0, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0xf280 jmp 0x2e4cd movq %rax, %rbx movq %rsp, %rdi callq 0xf280 jmp 0x2e4da movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0xf280 jmp 0x2e4e9 movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0xf280 jmp 0x2e4f8 movq %rax, %rbx leaq 0x80(%rsp), %rdi callq 0xf280 movq %rbx, %rdi callq 0xfb30 nop
_ZN28test_cross_entropy_loss_back4varsB5cxx11Ev: push r15 push r14 push rbx sub rsp, 0A0h mov r14, rsi mov rbx, rdi mov esi, [rsi+38h] lea r15, [rsp+0B8h+var_38] mov rdi, r15 call _ZL10var_to_strB5cxx119ggml_type; var_to_str(ggml_type) lea rsi, aPoolType+5; "type=" lea rdi, [rsp+0B8h+var_78] mov rdx, r15 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rdx, asc_30D77; "," lea rdi, [rsp+0B8h+var_58] lea rsi, [rsp+0B8h+var_78] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) add r14, 40h ; '@' mov rdi, rsp mov rsi, r14 call _ZL10var_to_strIlLm4EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt5arrayIT_XT0_EE; var_to_str<long,4ul>(std::array<long,4ul> const&) lea rsi, aNe; "ne=" lea rdi, [rsp+0B8h+var_98] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) lea rsi, [rsp+0B8h+var_58] lea rdx, [rsp+0B8h+var_98] mov rdi, rbx call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rdi, [rsp+0B8h+var_98] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 0A0h pop rbx pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2E4CD mov rbx, rax loc_2E4CD: mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2E4DA mov rbx, rax loc_2E4DA: lea rdi, [rsp+arg_58] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2E4E9 mov rbx, rax loc_2E4E9: lea rdi, [rsp+arg_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_2E4F8 mov rbx, rax loc_2E4F8: lea rdi, [rsp+arg_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long test_cross_entropy_loss_back::vars[abi:cxx11](long long a1, long long a2) { _BYTE v3[32]; // [rsp+0h] [rbp-B8h] BYREF _QWORD v4[4]; // [rsp+20h] [rbp-98h] BYREF _BYTE v5[32]; // [rsp+40h] [rbp-78h] BYREF _QWORD v6[4]; // [rsp+60h] [rbp-58h] BYREF _BYTE v7[56]; // [rsp+80h] [rbp-38h] BYREF var_to_str[abi:cxx11]((long long)v7, *(_DWORD *)(a2 + 56)); std::operator+<char>((long long)v5, (long long)"type=", (long long)v7); std::operator+<char>((long long)v6, (long long)v5, (long long)","); var_to_str<long,4ul>((long long)v3, a2 + 64); std::operator+<char>((long long)v4, (long long)"ne=", (long long)v3); std::operator+<char>(a1, v6, v4); std::string::~string(v4); std::string::~string(v3); std::string::~string(v6); std::string::~string(v5); std::string::~string(v7); return a1; }
vars[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xa0 MOV R14,RSI MOV RBX,RDI MOV ESI,dword ptr [RSI + 0x38] LEA R15,[RSP + 0x80] MOV RDI,R15 CALL 0x00118e2b LAB_0012e419: LEA RSI,[0x130db6] LEA RDI,[RSP + 0x40] MOV RDX,R15 CALL 0x0011ca87 LAB_0012e42d: LEA RDX,[0x130d77] LEA RDI,[RSP + 0x60] LEA RSI,[RSP + 0x40] CALL 0x0011cff2 ADD R14,0x40 LAB_0012e447: MOV RDI,RSP MOV RSI,R14 CALL 0x00118e53 LAB_0012e452: LEA RSI,[0x130e2c] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x0011ca87 LAB_0012e466: LEA RSI,[RSP + 0x60] LEA RDX,[RSP + 0x20] MOV RDI,RBX CALL 0x0011cf8b LAB_0012e478: LEA RDI,[RSP + 0x20] CALL 0x0010f280 MOV RDI,RSP CALL 0x0010f280 LEA RDI,[RSP + 0x60] CALL 0x0010f280 LEA RDI,[RSP + 0x40] CALL 0x0010f280 LEA RDI,[RSP + 0x80] CALL 0x0010f280 MOV RAX,RBX ADD RSP,0xa0 POP RBX POP R14 POP R15 RET
/* test_cross_entropy_loss_back::vars[abi:cxx11]() */ void test_cross_entropy_loss_back::vars_abi_cxx11_(void) { long in_RSI; string *in_RDI; string asStack_b8 [32]; string local_98 [32]; string local_78 [32]; string local_58 [32]; string local_38 [32]; var_to_str_abi_cxx11_(local_38,*(int4 *)(in_RSI + 0x38)); /* try { // try from 0012e419 to 0012e42c has its CatchHandler @ 0012e4f5 */ std::operator+((char *)local_78,(string *)0x130db6); /* try { // try from 0012e42d to 0012e442 has its CatchHandler @ 0012e4e6 */ std::operator+(local_58,(char *)local_78); /* try { // try from 0012e447 to 0012e451 has its CatchHandler @ 0012e4d7 */ var_to_str<long,4ul>(asStack_b8); /* try { // try from 0012e452 to 0012e465 has its CatchHandler @ 0012e4ca */ std::operator+((char *)local_98,(string *)&DAT_00130e2c); /* try { // try from 0012e466 to 0012e477 has its CatchHandler @ 0012e4bb */ std::operator+(in_RDI,local_58); std::__cxx11::string::~string(local_98); std::__cxx11::string::~string(asStack_b8); std::__cxx11::string::~string(local_58); std::__cxx11::string::~string(local_78); std::__cxx11::string::~string(local_38); return; }
39,293
test_count_equal::vars[abi:cxx11]()
monkey531[P]llama/tests/test-backend-ops.cpp
std::string vars() override { return VARS_TO_STR2(type, ne); }
O3
cpp
test_count_equal::vars[abi:cxx11](): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rsi, %r14 movq %rdi, %rbx movl 0x38(%rsi), %edi callq 0xd540 leaq 0x88(%rsp), %r15 leaq 0x8(%rsp), %rdx movq %r15, %rdi movq %rax, %rsi callq 0x1a5b2 leaq 0x29ef(%rip), %rcx # 0x44bb2 movl $0x5, %r8d movq %r15, %rdi xorl %esi, %esi xorl %edx, %edx callq 0xd6b0 leaq 0x58(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x421fc movq %rdx, 0x48(%rsp) movq (%rcx), %rdx movq %rdx, 0x58(%rsp) jmp 0x42203 movups (%rcx), %xmm0 movups %xmm0, (%r15) movq 0x8(%rax), %rdx leaq 0x48(%rsp), %rdi movq %rdx, 0x8(%rdi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x294d(%rip), %rsi # 0x44b73 callq 0xdc10 leaq 0x38(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x42253 movq %rdx, 0x28(%rsp) movq (%rcx), %rdx movq %rdx, 0x38(%rsp) jmp 0x4225b movups (%rcx), %xmm0 movups %xmm0, (%r12) movq 0x8(%rax), %rdx movq %rdx, 0x30(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) addq $0x40, %r14 leaq 0x68(%rsp), %rdi movq %r14, %rsi callq 0x16e0e leaq 0x299d(%rip), %rcx # 0x44c28 leaq 0x68(%rsp), %rdi movl $0x3, %r8d xorl %esi, %esi xorl %edx, %edx callq 0xd6b0 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x422c6 movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x422cd movups (%rcx), %xmm0 movups %xmm0, (%r14) movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movq 0x10(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r12, %rcx je 0x42307 movq 0x38(%rsp), %rdi movq 0x8(%rsp), %rsi cmpq %rdi, %rax jbe 0x42325 movl $0xf, %edi cmpq %r14, %rsi je 0x42320 movq 0x18(%rsp), %rdi cmpq %rdi, %rax jbe 0x42331 leaq 0x28(%rsp), %rdi callq 0xd180 jmp 0x4233f leaq 0x8(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0xd6b0 leaq 0x10(%rbx), %rdx movq %rdx, (%rbx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x4235e movq %rsi, (%rbx) movq (%rcx), %rdx movq %rdx, 0x10(%rbx) jmp 0x42364 movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x8(%rbx) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x42397 movq 0x18(%rsp), %rsi incq %rsi callq 0xd5e0 leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x423b2 movq 0x78(%rsp), %rsi incq %rsi callq 0xd5e0 movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x423c9 movq 0x38(%rsp), %rsi incq %rsi callq 0xd5e0 movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x423e0 movq 0x58(%rsp), %rsi incq %rsi callq 0xd5e0 leaq 0x98(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x42401 movq 0x98(%rsp), %rsi incq %rsi callq 0xd5e0 movq %rbx, %rax addq $0xa8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0x42432 movq 0x18(%rsp), %rsi incq %rsi callq 0xd5e0 jmp 0x42432 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x42452 movq 0x78(%rsp), %rsi incq %rsi callq 0xd5e0 jmp 0x42452 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r12, %rdi je 0x4246e movq 0x38(%rsp), %rsi incq %rsi callq 0xd5e0 jmp 0x4246e movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r15, %rdi je 0x4248a movq 0x58(%rsp), %rsi incq %rsi callq 0xd5e0 jmp 0x4248a movq %rax, %rbx leaq 0x98(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x424ab movq 0x98(%rsp), %rsi incq %rsi callq 0xd5e0 movq %rbx, %rdi callq 0xdb00 nop
_ZN23test_cross_entropy_loss4varsB5cxx11Ev: push r15 push r14 push r12 push rbx sub rsp, 0A8h mov r14, rsi mov rbx, rdi mov edi, [rsi+38h] call _ggml_type_name lea r15, [rsp+0C8h+var_40] lea rdx, [rsp+0C8h+var_C0] mov rdi, r15 mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rcx, aPoolType+5; "type=" mov r8d, 5 mov rdi, r15 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r15, [rsp+0C8h+var_70] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_421FC mov [rsp+0C8h+var_80], rdx mov rdx, [rcx] mov [rsp+0C8h+var_70], rdx jmp short loc_42203 loc_421FC: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 loc_42203: mov rdx, [rax+8] lea rdi, [rsp+0C8h+var_80] mov [rdi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rsi, asc_44B73; "," call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r12, [rsp+0C8h+var_90] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h; int cmp rdx, rcx jz short loc_42253 mov [rsp+0C8h+var_A0], rdx mov rdx, [rcx] mov [rsp+0C8h+var_90], rdx jmp short loc_4225B loc_42253: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 loc_4225B: mov rdx, [rax+8]; int mov [rsp+0C8h+var_98], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 add r14, 40h ; '@' lea rdi, [rsp+0C8h+var_60]; int mov rsi, r14; int call _ZL10var_to_strIlLm4EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt5arrayIT_XT0_EE; var_to_str<long,4ul>(std::array<long,4ul> const&) lea rcx, aNe; "ne=" lea rdi, [rsp+0C8h+var_60] mov r8d, 3 xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) lea r14, [rsp+0C8h+var_B0] mov [r14-10h], r14 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_422C6 mov [rsp+0C8h+var_C0], rdx mov rdx, [rcx] mov [rsp+0C8h+var_B0], rdx jmp short loc_422CD loc_422C6: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r14], xmm0 loc_422CD: mov rdx, [rax+8] mov [rsp+0C8h+var_B8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rcx, [rsp+0C8h+var_A0] mov r8, [rsp+0C8h+var_98] mov rdx, [rsp+0C8h+var_B8] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r12 jz short loc_42307 mov rdi, [rsp+0C8h+var_90] loc_42307: mov rsi, [rsp+0C8h+var_C0] cmp rax, rdi jbe short loc_42325 mov edi, 0Fh cmp rsi, r14 jz short loc_42320 mov rdi, [rsp+0C8h+var_B0] loc_42320: cmp rax, rdi jbe short loc_42331 loc_42325: lea rdi, [rsp+0C8h+var_A0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_4233F loc_42331: lea rdi, [rsp+0C8h+var_C0] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_4233F: lea rdx, [rbx+10h] mov [rbx], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_4235E mov [rbx], rsi mov rdx, [rcx] mov [rbx+10h], rdx jmp short loc_42364 loc_4235E: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_42364: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rbx+8], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 mov rdi, [rsp+0C8h+var_C0]; void * cmp rdi, r14 jz short loc_42397 mov rsi, [rsp+0C8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_42397: lea rax, [rsp+0C8h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_423B2 mov rsi, [rsp+0C8h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_423B2: mov rdi, [rsp+0C8h+var_A0]; void * cmp rdi, r12 jz short loc_423C9 mov rsi, [rsp+0C8h+var_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_423C9: mov rdi, [rsp+0C8h+var_80]; void * cmp rdi, r15 jz short loc_423E0 mov rsi, [rsp+0C8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_423E0: lea rax, [rsp+0C8h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_42401 mov rsi, [rsp+0C8h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_42401: mov rax, rbx add rsp, 0A8h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_42432 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_42432 mov rbx, rax loc_42432: lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_42452 mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_42452 mov rbx, rax loc_42452: mov rdi, [rsp+arg_20]; void * cmp rdi, r12 jz short loc_4246E mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4246E mov rbx, rax loc_4246E: mov rdi, [rsp+arg_40]; void * cmp rdi, r15 jz short loc_4248A mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4248A mov rbx, rax loc_4248A: lea rax, [rsp+arg_90] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_424AB mov rsi, [rsp+arg_90] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_424AB: mov rdi, rbx call __Unwind_Resume
long long test_cross_entropy_loss::vars[abi:cxx11](long long a1, long long a2) { long long v3; // rax long long v4; // rax __int128 *v5; // rcx long long v6; // rax __int128 *v7; // rcx long long v8; // rax __int128 *v9; // rcx unsigned long long v10; // rax unsigned long long v11; // rdi unsigned long long v12; // rdi _QWORD *v13; // rax _OWORD *v14; // rcx void *v16; // [rsp+8h] [rbp-C0h] BYREF long long v17; // [rsp+10h] [rbp-B8h] __int128 v18; // [rsp+18h] [rbp-B0h] BYREF void *v19; // [rsp+28h] [rbp-A0h] BYREF long long v20; // [rsp+30h] [rbp-98h] __int128 v21; // [rsp+38h] [rbp-90h] BYREF void *v22[2]; // [rsp+48h] [rbp-80h] BYREF __int128 v23; // [rsp+58h] [rbp-70h] BYREF int v24[4]; // [rsp+68h] [rbp-60h] BYREF long long v25; // [rsp+78h] [rbp-50h] BYREF void *v26[2]; // [rsp+88h] [rbp-40h] BYREF long long v27; // [rsp+98h] [rbp-30h] BYREF v3 = ggml_type_name(*(unsigned int *)(a2 + 56)); std::string::basic_string<std::allocator<char>>(v26, v3); v4 = std::string::replace(v26, 0LL, 0LL, "type=", 5LL); v22[0] = &v23; v5 = (__int128 *)(v4 + 16); if ( *(_QWORD *)v4 == v4 + 16 ) { v23 = *v5; } else { v22[0] = *(void **)v4; *(_QWORD *)&v23 = *(_QWORD *)v5; } v22[1] = *(void **)(v4 + 8); *(_QWORD *)v4 = v5; *(_QWORD *)(v4 + 8) = 0LL; *(_BYTE *)(v4 + 16) = 0; v6 = std::string::append(v22, ","); v19 = &v21; v7 = (__int128 *)(v6 + 16); if ( *(_QWORD *)v6 == v6 + 16 ) { v21 = *v7; } else { v19 = *(void **)v6; *(_QWORD *)&v21 = *(_QWORD *)v7; } v20 = *(_QWORD *)(v6 + 8); *(_QWORD *)v6 = v7; *(_QWORD *)(v6 + 8) = 0LL; *(_BYTE *)(v6 + 16) = 0; var_to_str<long,4ul>(v24, a2 + 64); v8 = std::string::replace(v24, 0LL, 0LL, "ne=", 3LL); v16 = &v18; v9 = (__int128 *)(v8 + 16); if ( *(_QWORD *)v8 == v8 + 16 ) { v18 = *v9; } else { v16 = *(void **)v8; *(_QWORD *)&v18 = *(_QWORD *)v9; } v17 = *(_QWORD *)(v8 + 8); *(_QWORD *)v8 = v9; *(_QWORD *)(v8 + 8) = 0LL; *(_BYTE *)(v8 + 16) = 0; v10 = v17 + v20; v11 = 15LL; if ( v19 != &v21 ) v11 = v21; if ( v10 <= v11 ) goto LABEL_16; v12 = 15LL; if ( v16 != &v18 ) v12 = v18; if ( v10 <= v12 ) v13 = (_QWORD *)std::string::replace(&v16, 0LL, 0LL, v19, v20); else LABEL_16: v13 = (_QWORD *)std::string::_M_append(&v19, v16, v17); *(_QWORD *)a1 = a1 + 16; v14 = v13 + 2; if ( (_QWORD *)*v13 == v13 + 2 ) { *(_OWORD *)(a1 + 16) = *v14; } else { *(_QWORD *)a1 = *v13; *(_QWORD *)(a1 + 16) = *(_QWORD *)v14; } *(_QWORD *)(a1 + 8) = v13[1]; *v13 = v14; v13[1] = 0LL; *(_BYTE *)v14 = 0; if ( v16 != &v18 ) operator delete(v16, v18 + 1); if ( *(long long **)v24 != &v25 ) operator delete(*(void **)v24, v25 + 1); if ( v19 != &v21 ) operator delete(v19, v21 + 1); if ( v22[0] != &v23 ) operator delete(v22[0], v23 + 1); if ( v26[0] != &v27 ) operator delete(v26[0], v27 + 1); return a1; }
vars[abi:cxx11]: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R14,RSI MOV RBX,RDI MOV EDI,dword ptr [RSI + 0x38] CALL 0x0010d540 LEA R15,[RSP + 0x88] LEA RDX,[RSP + 0x8] MOV RDI,R15 MOV RSI,RAX CALL 0x0011a5b2 LAB_001421bc: LEA RCX,[0x144bb2] MOV R8D,0x5 MOV RDI,R15 XOR ESI,ESI XOR EDX,EDX CALL 0x0010d6b0 LEA R15,[RSP + 0x58] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001421fc MOV qword ptr [RSP + 0x48],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x58],RDX JMP 0x00142203 LAB_001421fc: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 LAB_00142203: MOV RDX,qword ptr [RAX + 0x8] LEA RDI,[RSP + 0x48] MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_0014221f: LEA RSI,[0x144b73] CALL 0x0010dc10 LEA R12,[RSP + 0x38] MOV qword ptr [R12 + -0x10],R12 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x00142253 MOV qword ptr [RSP + 0x28],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x38],RDX JMP 0x0014225b LAB_00142253: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R12],XMM0 LAB_0014225b: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 ADD R14,0x40 LAB_00142277: LEA RDI,[RSP + 0x68] MOV RSI,R14 CALL 0x00116e0e LAB_00142284: LEA RCX,[0x144c28] LEA RDI,[RSP + 0x68] MOV R8D,0x3 XOR ESI,ESI XOR EDX,EDX CALL 0x0010d6b0 LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001422c6 MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x001422cd LAB_001422c6: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R14],XMM0 LAB_001422cd: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x10] LEA RAX,[RDX + R8*0x1] MOV EDI,0xf CMP RCX,R12 JZ 0x00142307 MOV RDI,qword ptr [RSP + 0x38] LAB_00142307: MOV RSI,qword ptr [RSP + 0x8] CMP RAX,RDI JBE 0x00142325 MOV EDI,0xf CMP RSI,R14 JZ 0x00142320 MOV RDI,qword ptr [RSP + 0x18] LAB_00142320: CMP RAX,RDI JBE 0x00142331 LAB_00142325: LEA RDI,[RSP + 0x28] CALL 0x0010d180 JMP 0x0014233f LAB_00142331: LEA RDI,[RSP + 0x8] XOR ESI,ESI XOR EDX,EDX CALL 0x0010d6b0 LAB_0014233f: LEA RDX,[RBX + 0x10] MOV qword ptr [RBX],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x0014235e MOV qword ptr [RBX],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RBX + 0x10],RDX JMP 0x00142364 LAB_0014235e: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_00142364: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x8],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R14 JZ 0x00142397 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0010d5e0 LAB_00142397: LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001423b2 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x0010d5e0 LAB_001423b2: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R12 JZ 0x001423c9 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0010d5e0 LAB_001423c9: MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R15 JZ 0x001423e0 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0010d5e0 LAB_001423e0: LEA RAX,[RSP + 0x98] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00142401 MOV RSI,qword ptr [RSP + 0x98] INC RSI CALL 0x0010d5e0 LAB_00142401: MOV RAX,RBX ADD RSP,0xa8 POP RBX POP R12 POP R14 POP R15 RET
/* test_cross_entropy_loss::vars[abi:cxx11]() */ void test_cross_entropy_loss::vars_abi_cxx11_(void) { int8 *puVar1; int8 uVar2; char *pcVar3; long *plVar4; int8 *puVar5; long *plVar6; ulong *puVar7; long in_RSI; int8 *in_RDI; ulong uVar8; ulong *local_c0; long local_b8; ulong local_b0; long lStack_a8; ulong *local_a0; long local_98; ulong local_90; long lStack_88; long *local_80; long local_78; long local_70; long lStack_68; long *local_60 [2]; long local_50 [2]; long *local_40 [2]; long local_30 [2]; pcVar3 = (char *)ggml_type_name(*(int4 *)(in_RSI + 0x38)); std::__cxx11::string::string<std::allocator<char>> ((string *)local_40,pcVar3,(allocator *)&local_c0); /* try { // try from 001421bc to 001421d4 has its CatchHandler @ 00142487 */ plVar4 = (long *)std::__cxx11::string::replace((ulong)local_40,0,(char *)0x0,0x144bb2); plVar6 = plVar4 + 2; if ((long *)*plVar4 == plVar6) { local_70 = *plVar6; lStack_68 = plVar4[3]; local_80 = &local_70; } else { local_70 = *plVar6; local_80 = (long *)*plVar4; } local_78 = plVar4[1]; *plVar4 = (long)plVar6; plVar4[1] = 0; *(int1 *)(plVar4 + 2) = 0; /* try { // try from 0014221f to 0014222a has its CatchHandler @ 0014246b */ plVar4 = (long *)std::__cxx11::string::append((char *)&local_80); puVar7 = (ulong *)(plVar4 + 2); if ((ulong *)*plVar4 == puVar7) { local_90 = *puVar7; lStack_88 = plVar4[3]; local_a0 = &local_90; } else { local_90 = *puVar7; local_a0 = (ulong *)*plVar4; } local_98 = plVar4[1]; *plVar4 = (long)puVar7; plVar4[1] = 0; *(int1 *)(plVar4 + 2) = 0; /* try { // try from 00142277 to 00142283 has its CatchHandler @ 0014244f */ var_to_str<long,4ul>((array *)local_60); /* try { // try from 00142284 to 0014229e has its CatchHandler @ 0014242f */ plVar4 = (long *)std::__cxx11::string::replace((ulong)local_60,0,(char *)0x0,0x144c28); puVar7 = (ulong *)(plVar4 + 2); if ((ulong *)*plVar4 == puVar7) { local_b0 = *puVar7; lStack_a8 = plVar4[3]; local_c0 = &local_b0; } else { local_b0 = *puVar7; local_c0 = (ulong *)*plVar4; } local_b8 = plVar4[1]; *plVar4 = (long)puVar7; plVar4[1] = 0; *(int1 *)(plVar4 + 2) = 0; uVar8 = 0xf; if (local_a0 != &local_90) { uVar8 = local_90; } if (uVar8 < (ulong)(local_b8 + local_98)) { uVar8 = 0xf; if (local_c0 != &local_b0) { uVar8 = local_b0; } if ((ulong)(local_b8 + local_98) <= uVar8) { puVar5 = (int8 *) std::__cxx11::string::replace((ulong)&local_c0,0,(char *)0x0,(ulong)local_a0); goto LAB_0014233f; } } /* try { // try from 00142325 to 0014233e has its CatchHandler @ 00142413 */ puVar5 = (int8 *)std::__cxx11::string::_M_append((char *)&local_a0,(ulong)local_c0); LAB_0014233f: *in_RDI = in_RDI + 2; puVar1 = puVar5 + 2; if ((int8 *)*puVar5 == puVar1) { uVar2 = puVar5[3]; in_RDI[2] = *puVar1; in_RDI[3] = uVar2; } else { *in_RDI = (int8 *)*puVar5; in_RDI[2] = *puVar1; } in_RDI[1] = puVar5[1]; *puVar5 = puVar1; puVar5[1] = 0; *(int1 *)puVar1 = 0; if (local_c0 != &local_b0) { operator_delete(local_c0,local_b0 + 1); } if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } if (local_a0 != &local_90) { operator_delete(local_a0,local_90 + 1); } if (local_80 != &local_70) { operator_delete(local_80,local_70 + 1); } if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } return; }
39,294
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!left) throw std::runtime_error("BinaryOpExpr.left is null"); if (!right) throw std::runtime_error("BinaryOpExpr.right is null"); auto l = left->evaluate(context); auto do_eval = [&](const Value & l) -> Value { if (op == Op::Is || op == Op::IsNot) { auto t = dynamic_cast<VariableExpr*>(right.get()); if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable"); auto eval = [&]() { const auto & name = t->get_name(); if (name == "none") return l.is_null(); if (name == "boolean") return l.is_boolean(); if (name == "integer") return l.is_number_integer(); if (name == "float") return l.is_number_float(); if (name == "number") return l.is_number(); if (name == "string") return l.is_string(); if (name == "mapping") return l.is_object(); if (name == "iterable") return l.is_iterable(); if (name == "sequence") return l.is_array(); if (name == "defined") return !l.is_null(); throw std::runtime_error("Unknown type for 'is' operator: " + name); }; auto value = eval(); return Value(op == Op::Is ? value : !value); } if (op == Op::And) { if (!l.to_bool()) return Value(false); return right->evaluate(context).to_bool(); } else if (op == Op::Or) { if (l.to_bool()) return l; return right->evaluate(context); } auto r = right->evaluate(context); switch (op) { case Op::StrConcat: return l.to_str() + r.to_str(); case Op::Add: return l + r; case Op::Sub: return l - r; case Op::Mul: return l * r; case Op::Div: return l / r; case Op::MulMul: return std::pow(l.get<double>(), r.get<double>()); case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>(); case Op::Mod: return l.get<int64_t>() % r.get<int64_t>(); case Op::Eq: return l == r; case Op::Ne: return l != r; case Op::Lt: return l < r; case Op::Gt: return l > r; case Op::Le: return l <= r; case Op::Ge: return l >= r; case Op::In: return (r.is_array() || r.is_object()) && r.contains(l); case Op::NotIn: return !(r.is_array() && r.contains(l)); default: break; } throw std::runtime_error("Unknown binary operator"); }; if (l.is_callable()) { return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) { auto ll = l.call(context, args); return do_eval(ll); //args[0].second); }); } else { return do_eval(l); } }
O2
cpp
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x6f695 cmpq $0x0, 0x30(%r15) je 0x6f6b1 movq %rdx, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r12 movq %r12, %rdi callq 0x62a82 movq %r15, 0x8(%rsp) movq %r14, 0x10(%rsp) cmpq $0x0, 0x30(%r12) je 0x6f667 leaq 0x88(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x686e8 movups 0x8(%rsp), %xmm0 leaq 0x88(%rsp), %rsi movups %xmm0, 0x50(%rsi) leaq 0x18(%rsp), %rdi callq 0x6f7b8 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x6f76c leaq 0x18(%rsp), %rdi callq 0x47c98 leaq 0x88(%rsp), %rdi callq 0x62d12 jmp 0x6f679 leaq 0x8(%rsp), %rsi leaq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x6f800 leaq 0x38(%rsp), %rdi callq 0x62d12 movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x23480 movq %rax, %r14 leaq 0x45169(%rip), %rsi # 0xb4810 movq %rax, %rdi callq 0x23340 jmp 0x6f6cb pushq $0x10 popq %rdi callq 0x23480 movq %rax, %r14 leaq 0x45167(%rip), %rsi # 0xb482a movq %rax, %rdi callq 0x23340 movq 0x8e91e(%rip), %rsi # 0xfdff0 movq 0x8e87f(%rip), %rdx # 0xfdf58 movq %r14, %rdi callq 0x23f30 jmp 0x6f713 jmp 0x6f6e5 movq %rax, %rbx movq %r14, %rdi callq 0x236b0 jmp 0x6f720 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x47c98 jmp 0x6f704 movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x62d12 jmp 0x6f716 movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x62d12 movq %rbx, %rdi callq 0x23fd0
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 0E8h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_6F695 cmp qword ptr [r15+30h], 0 jz loc_6F6B1 mov r14, rdx mov rbx, rdi lea r12, [rsp+108h+var_D0] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov qword ptr [rsp+108h+var_100], r15 mov qword ptr [rsp+108h+var_100+8], r14 cmp qword ptr [r12+30h], 0 jz short loc_6F667 lea rdi, [rsp+108h+var_80]; this lea rsi, [rsp+108h+var_D0]; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) movups xmm0, [rsp+108h+var_100] lea rsi, [rsp+108h+var_80] movups xmmword ptr [rsi+50h], xmm0 lea rdi, [rsp+108h+var_F0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&) lea rsi, [rsp+108h+var_F0] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) lea rdi, [rsp+108h+var_F0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+108h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_6F679 loc_6F667: lea rsi, [rsp+108h+var_100] lea rdx, [rsp+108h+var_D0] mov rdi, rbx; this call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&) loc_6F679: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r14 pop r15 retn loc_6F695: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_6F6CB loc_6F6B1: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_6F6CB: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_6F713 jmp short $+2 loc_6F6E5: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_6F720 mov rbx, rax lea rdi, [rsp+108h+var_F0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_6F704 mov rbx, rax loc_6F704: lea rdi, [rsp+108h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_6F716 loc_6F713: mov rbx, rax loc_6F716: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6F720: mov rdi, rbx call __Unwind_Resume
minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3) { void (***v4)(void); // rsi int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d std::runtime_error *exception; // r14 __int128 v12; // [rsp+8h] [rbp-100h] _BYTE v13[32]; // [rsp+18h] [rbp-F0h] BYREF _BYTE v14[48]; // [rsp+38h] [rbp-D0h] BYREF long long v15; // [rsp+68h] [rbp-A0h] _BYTE v16[80]; // [rsp+88h] [rbp-80h] BYREF __int128 v17; // [rsp+D8h] [rbp-30h] v4 = *(void (****)(void))(a2 + 32); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null"); goto LABEL_9; } if ( !*(_QWORD *)(a2 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null"); LABEL_9: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v14, v4); *(_QWORD *)&v12 = a2; *((_QWORD *)&v12 + 1) = a3; if ( v15 ) { minja::Value::Value((minja::Value *)v16, (const minja::Value *)v14); v17 = v12; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v13); minja::Value::callable((_DWORD)this, (unsigned int)v13, v6, v7, v8, v9); std::_Function_base::~_Function_base((std::_Function_base *)v13); minja::Value::~Value((minja::Value *)v16); } else { minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this); } minja::Value::~Value((minja::Value *)v14); return this; }
do_evaluate: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x0016f695 CMP qword ptr [R15 + 0x30],0x0 JZ 0x0016f6b1 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x38] MOV RDI,R12 CALL 0x00162a82 MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],R14 CMP qword ptr [R12 + 0x30],0x0 JZ 0x0016f667 LAB_0016f614: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x38] CALL 0x001686e8 MOVUPS XMM0,xmmword ptr [RSP + 0x8] LEA RSI,[RSP + 0x88] MOVUPS xmmword ptr [RSI + 0x50],XMM0 LAB_0016f637: LEA RDI,[RSP + 0x18] CALL 0x0016f7b8 LAB_0016f641: LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x0016f76c LEA RDI,[RSP + 0x18] CALL 0x00147c98 LEA RDI,[RSP + 0x88] CALL 0x00162d12 JMP 0x0016f679 LAB_0016f667: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x38] MOV RDI,RBX CALL 0x0016f800 LAB_0016f679: LEA RDI,[RSP + 0x38] CALL 0x00162d12 MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R14 POP R15 RET LAB_0016f695: PUSH 0x10 POP RDI CALL 0x00123480 MOV R14,RAX LAB_0016f6a0: LEA RSI,[0x1b4810] MOV RDI,RAX CALL 0x00123340 LAB_0016f6af: JMP 0x0016f6cb LAB_0016f6b1: PUSH 0x10 POP RDI CALL 0x00123480 MOV R14,RAX LAB_0016f6bc: LEA RSI,[0x1b482a] MOV RDI,RAX CALL 0x00123340 LAB_0016f6cb: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R14 CALL 0x00123f30
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1) { runtime_error *this; int8 in_RDX; long in_RSI; long local_100; int8 uStack_f8; _lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [32]; Expression local_d0 [48]; long local_a0; Value local_80 [80]; long local_30; int8 uStack_28; if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016f6a0 to 0016f6ae has its CatchHandler @ 0016f6e5 */ std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null"); } else { if (*(long *)(in_RSI + 0x30) != 0) { Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20)); if (local_a0 == 0) { /* try { // try from 0016f667 to 0016f678 has its CatchHandler @ 0016f6e1 */ const::{lambda(minja::Value_const&)#1}::operator() ((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100); } else { /* try { // try from 0016f614 to 0016f625 has its CatchHandler @ 0016f713 */ local_100 = in_RSI; uStack_f8 = in_RDX; Value::Value(local_80,(Value *)local_d0); local_30 = local_100; uStack_28 = uStack_f8; /* try { // try from 0016f637 to 0016f640 has its CatchHandler @ 0016f701 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void> (local_f0); /* try { // try from 0016f641 to 0016f64d has its CatchHandler @ 0016f6f2 */ Value::callable(param_1); std::_Function_base::~_Function_base((_Function_base *)local_f0); Value::~Value(local_80); } Value::~Value((Value *)local_d0); return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016f6bc to 0016f6ca has its CatchHandler @ 0016f6e3 */ std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
39,295
js_map_forEach
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_forEach(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSValue func, this_arg; JSValue ret, args[3]; struct list_head *el; JSMapRecord *mr; if (!s) return JS_EXCEPTION; func = argv[0]; if (argc > 1) this_arg = argv[1]; else this_arg = JS_UNDEFINED; if (check_function(ctx, func)) return JS_EXCEPTION; /* Note: the list can be modified while traversing it, but the current element is locked */ el = s->records.next; while (el != &s->records) { mr = list_entry(el, JSMapRecord, link); if (!mr->empty) { mr->ref_count++; /* must duplicate in case the record is deleted */ args[1] = js_dup(mr->key); if (magic) args[0] = args[1]; else args[0] = js_dup(mr->value); args[2] = this_val; ret = JS_Call(ctx, func, this_arg, 3, args); JS_FreeValue(ctx, args[0]); if (!magic) JS_FreeValue(ctx, args[1]); el = el->next; map_decref_record(ctx->rt, mr); if (JS_IsException(ret)) return ret; JS_FreeValue(ctx, ret); } else { el = el->next; } } return JS_UNDEFINED; }
O0
c
js_map_forEach: subq $0x108, %rsp # imm = 0x108 movq %rsi, 0xe8(%rsp) movq %rdx, 0xf0(%rsp) movq %rdi, 0xe0(%rsp) movl %ecx, 0xdc(%rsp) movq %r8, 0xd0(%rsp) movl %r9d, 0xcc(%rsp) movq 0xe0(%rsp), %rdi movl 0xcc(%rsp), %ecx addl $0x23, %ecx movq 0xe8(%rsp), %rsi movq 0xf0(%rsp), %rdx callq 0x383b0 movq %rax, 0xc0(%rsp) cmpq $0x0, 0xc0(%rsp) jne 0x8cabc movl $0x0, 0xf8(%rsp) movq $0x6, 0x100(%rsp) jmp 0x8cda5 movq 0xd0(%rsp), %rax movq (%rax), %rcx movq %rcx, 0xb0(%rsp) movq 0x8(%rax), %rax movq %rax, 0xb8(%rsp) cmpl $0x1, 0xdc(%rsp) jle 0x8cb07 movq 0xd0(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0xa0(%rsp) movq 0x18(%rax), %rax movq %rax, 0xa8(%rsp) jmp 0x8cb32 movl $0x0, 0x40(%rsp) movq $0x3, 0x48(%rsp) movq 0x40(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x48(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0xe0(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x6da80 cmpl $0x0, %eax je 0x8cb70 movl $0x0, 0xf8(%rsp) movq $0x6, 0x100(%rsp) jmp 0x8cda5 movq 0xc0(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rax movq 0xc0(%rsp), %rcx addq $0x8, %rcx cmpq %rcx, %rax je 0x8cd8e movq 0x58(%rsp), %rax addq $-0x10, %rax movq %rax, 0x50(%rsp) movq 0x50(%rsp), %rax cmpl $0x0, 0x4(%rax) jne 0x8cd7b movq 0x50(%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movq 0x50(%rsp), %rax movq 0x30(%rax), %rdi movq 0x38(%rax), %rsi callq 0x216d0 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x78(%rsp) cmpl $0x0, 0xcc(%rsp) je 0x8cc14 movq 0x70(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x68(%rsp) jmp 0x8cc44 movq 0x50(%rsp), %rax movq 0x40(%rax), %rdi movq 0x48(%rax), %rsi callq 0x216d0 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x68(%rsp) movq 0xe8(%rsp), %rax movq %rax, 0x80(%rsp) movq 0xf0(%rsp), %rax movq %rax, 0x88(%rsp) movq 0xe0(%rsp), %rdi leaq 0x60(%rsp), %rax movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0xa0(%rsp), %rcx movq 0xa8(%rsp), %r8 movl $0x3, %r9d movq %rax, (%rsp) callq 0x3a050 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x90(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x98(%rsp) movq 0xe0(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 cmpl $0x0, 0xcc(%rsp) jne 0x8ccfc movq 0xe0(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movq 0x58(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x58(%rsp) movq 0xe0(%rsp), %rax movq 0x18(%rax), %rdi movq 0x50(%rsp), %rsi callq 0x5c180 movq 0x90(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x8cd5c movq 0x90(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x100(%rsp) jmp 0x8cda5 movq 0xe0(%rsp), %rdi movq 0x90(%rsp), %rsi movq 0x98(%rsp), %rdx callq 0x23c90 jmp 0x8cd89 movq 0x58(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x58(%rsp) jmp 0x8cb81 movl $0x0, 0xf8(%rsp) movq $0x3, 0x100(%rsp) movq 0xf8(%rsp), %rax movq 0x100(%rsp), %rdx addq $0x108, %rsp # imm = 0x108 retq nopl (%rax)
js_map_forEach: sub rsp, 108h mov [rsp+108h+var_20], rsi mov [rsp+108h+var_18], rdx mov [rsp+108h+var_28], rdi mov [rsp+108h+var_2C], ecx mov [rsp+108h+var_38], r8 mov [rsp+108h+var_3C], r9d mov rdi, [rsp+108h+var_28] mov ecx, [rsp+108h+var_3C] add ecx, 23h ; '#' mov rsi, [rsp+108h+var_20] mov rdx, [rsp+108h+var_18] call JS_GetOpaque2 mov [rsp+108h+var_48], rax cmp [rsp+108h+var_48], 0 jnz short loc_8CABC mov dword ptr [rsp+108h+var_10], 0 mov [rsp+108h+var_8], 6 jmp loc_8CDA5 loc_8CABC: mov rax, [rsp+108h+var_38] mov rcx, [rax] mov [rsp+108h+var_58], rcx mov rax, [rax+8] mov [rsp+108h+var_50], rax cmp [rsp+108h+var_2C], 1 jle short loc_8CB07 mov rax, [rsp+108h+var_38] mov rcx, [rax+10h] mov [rsp+108h+var_68], rcx mov rax, [rax+18h] mov [rsp+108h+var_60], rax jmp short loc_8CB32 loc_8CB07: mov dword ptr [rsp+108h+var_C8], 0 mov [rsp+108h+var_C0], 3 mov rax, [rsp+108h+var_C8] mov [rsp+108h+var_68], rax mov rax, [rsp+108h+var_C0] mov [rsp+108h+var_60], rax loc_8CB32: mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_50] call check_function cmp eax, 0 jz short loc_8CB70 mov dword ptr [rsp+108h+var_10], 0 mov [rsp+108h+var_8], 6 jmp loc_8CDA5 loc_8CB70: mov rax, [rsp+108h+var_48] mov rax, [rax+10h] mov [rsp+108h+var_B0], rax loc_8CB81: mov rax, [rsp+108h+var_B0] mov rcx, [rsp+108h+var_48] add rcx, 8 cmp rax, rcx jz loc_8CD8E mov rax, [rsp+108h+var_B0] add rax, 0FFFFFFFFFFFFFFF0h mov [rsp+108h+var_B8], rax mov rax, [rsp+108h+var_B8] cmp dword ptr [rax+4], 0 jnz loc_8CD7B mov rax, [rsp+108h+var_B8] mov ecx, [rax] add ecx, 1 mov [rax], ecx mov rax, [rsp+108h+var_B8] mov rdi, [rax+30h] mov rsi, [rax+38h] call js_dup mov [rsp+108h+var_D8], rax mov [rsp+108h+var_D0], rdx mov rax, [rsp+108h+var_D8] mov [rsp+108h+var_98], rax mov rax, [rsp+108h+var_D0] mov [rsp+108h+var_90], rax cmp [rsp+108h+var_3C], 0 jz short loc_8CC14 mov rax, [rsp+108h+var_98] mov [rsp+108h+var_A8], rax mov rax, [rsp+108h+var_90] mov [rsp+108h+var_A0], rax jmp short loc_8CC44 loc_8CC14: mov rax, [rsp+108h+var_B8] mov rdi, [rax+40h] mov rsi, [rax+48h] call js_dup mov [rsp+108h+var_E8], rax mov [rsp+108h+var_E0], rdx mov rax, [rsp+108h+var_E8] mov [rsp+108h+var_A8], rax mov rax, [rsp+108h+var_E0] mov [rsp+108h+var_A0], rax loc_8CC44: mov rax, [rsp+108h+var_20] mov [rsp+108h+var_88], rax mov rax, [rsp+108h+var_18] mov [rsp+108h+var_80], rax mov rdi, [rsp+108h+var_28] lea rax, [rsp+108h+var_A8] mov rsi, [rsp+108h+var_58] mov rdx, [rsp+108h+var_50] mov rcx, [rsp+108h+var_68] mov r8, [rsp+108h+var_60] mov r9d, 3 mov [rsp+108h+var_108], rax call JS_Call mov [rsp+108h+var_F8], rax mov [rsp+108h+var_F0], rdx mov rax, [rsp+108h+var_F8] mov [rsp+108h+var_78], rax mov rax, [rsp+108h+var_F0] mov [rsp+108h+var_70], rax mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_A8] mov rdx, [rsp+108h+var_A0] call JS_FreeValue cmp [rsp+108h+var_3C], 0 jnz short loc_8CCFC mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_98] mov rdx, [rsp+108h+var_90] call JS_FreeValue loc_8CCFC: mov rax, [rsp+108h+var_B0] mov rax, [rax+8] mov [rsp+108h+var_B0], rax mov rax, [rsp+108h+var_28] mov rdi, [rax+18h] mov rsi, [rsp+108h+var_B8] call map_decref_record mov rdi, [rsp+108h+var_78] mov rsi, [rsp+108h+var_70] call JS_IsException_1 cmp eax, 0 jz short loc_8CD5C mov rax, [rsp+108h+var_78] mov [rsp+108h+var_10], rax mov rax, [rsp+108h+var_70] mov [rsp+108h+var_8], rax jmp short loc_8CDA5 loc_8CD5C: mov rdi, [rsp+108h+var_28] mov rsi, [rsp+108h+var_78] mov rdx, [rsp+108h+var_70] call JS_FreeValue jmp short loc_8CD89 loc_8CD7B: mov rax, [rsp+108h+var_B0] mov rax, [rax+8] mov [rsp+108h+var_B0], rax loc_8CD89: jmp loc_8CB81 loc_8CD8E: mov dword ptr [rsp+108h+var_10], 0 mov [rsp+108h+var_8], 3 loc_8CDA5: mov rax, [rsp+108h+var_10] mov rdx, [rsp+108h+var_8] add rsp, 108h retn
long long js_map_forEach( long long a1, long long a2, long long a3, int a4, long long *a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { double v14; // xmm4_8 double v15; // xmm5_8 long long v16; // rdx long long v17; // rdx long long v18; // rdx long long v20; // [rsp+40h] [rbp-C8h] long long v21; // [rsp+50h] [rbp-B8h] long long v22; // [rsp+58h] [rbp-B0h] _DWORD *v23; // [rsp+60h] [rbp-A8h] BYREF long long v24; // [rsp+68h] [rbp-A0h] _DWORD *v25; // [rsp+70h] [rbp-98h] long long v26; // [rsp+78h] [rbp-90h] long long v27; // [rsp+80h] [rbp-88h] long long v28; // [rsp+88h] [rbp-80h] long long v29; // [rsp+90h] [rbp-78h] long long v30; // [rsp+98h] [rbp-70h] long long v31; // [rsp+A0h] [rbp-68h] long long v32; // [rsp+A8h] [rbp-60h] long long v33; // [rsp+B0h] [rbp-58h] long long v34; // [rsp+B8h] [rbp-50h] long long Opaque2; // [rsp+C0h] [rbp-48h] int v36; // [rsp+CCh] [rbp-3Ch] long long *v37; // [rsp+D0h] [rbp-38h] int v38; // [rsp+DCh] [rbp-2Ch] long long v39; // [rsp+E0h] [rbp-28h] long long v40; // [rsp+E8h] [rbp-20h] long long v41; // [rsp+F0h] [rbp-18h] long long v42; // [rsp+F8h] [rbp-10h] long long v43; // [rsp+100h] [rbp-8h] v40 = a2; v41 = a3; v39 = a1; v38 = a4; v37 = a5; v36 = a6; Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( Opaque2 ) { v33 = *v37; v34 = v37[1]; if ( v38 <= 1 ) { LODWORD(v20) = 0; v31 = v20; v32 = 3LL; } else { v31 = v37[2]; v32 = v37[3]; } if ( (unsigned int)check_function(v39, v33, v34, a7, a8, a9, a10, v14, v15, a13, a14) ) { LODWORD(v42) = 0; v43 = 6LL; } else { v22 = *(_QWORD *)(Opaque2 + 16); while ( v22 != Opaque2 + 8 ) { v21 = v22 - 16; if ( *(_DWORD *)(v22 - 16 + 4) ) { v22 = *(_QWORD *)(v22 + 8); } else { ++*(_DWORD *)v21; v25 = js_dup(*(_DWORD **)(v21 + 48), *(_QWORD *)(v21 + 56)); v26 = v16; if ( v36 ) { v23 = v25; v24 = v26; } else { v23 = js_dup(*(_DWORD **)(v21 + 64), *(_QWORD *)(v21 + 72)); v24 = v17; } v27 = v40; v28 = v41; v29 = JS_Call(v39, v33, v34, v31, v32, 3, (long long)&v23); v30 = v18; JS_FreeValue(v39, (long long)v23, v24); if ( !v36 ) JS_FreeValue(v39, (long long)v25, v26); v22 = *(_QWORD *)(v22 + 8); map_decref_record(*(_QWORD *)(v39 + 24), v21); if ( JS_IsException_1(v29, v30) ) { v42 = v29; v43 = v30; return v42; } JS_FreeValue(v39, v29, v30); } } LODWORD(v42) = 0; v43 = 3LL; } } else { LODWORD(v42) = 0; v43 = 6LL; } return v42; }
js_map_forEach: SUB RSP,0x108 MOV qword ptr [RSP + 0xe8],RSI MOV qword ptr [RSP + 0xf0],RDX MOV qword ptr [RSP + 0xe0],RDI MOV dword ptr [RSP + 0xdc],ECX MOV qword ptr [RSP + 0xd0],R8 MOV dword ptr [RSP + 0xcc],R9D MOV RDI,qword ptr [RSP + 0xe0] MOV ECX,dword ptr [RSP + 0xcc] ADD ECX,0x23 MOV RSI,qword ptr [RSP + 0xe8] MOV RDX,qword ptr [RSP + 0xf0] CALL 0x001383b0 MOV qword ptr [RSP + 0xc0],RAX CMP qword ptr [RSP + 0xc0],0x0 JNZ 0x0018cabc MOV dword ptr [RSP + 0xf8],0x0 MOV qword ptr [RSP + 0x100],0x6 JMP 0x0018cda5 LAB_0018cabc: MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xb0],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xb8],RAX CMP dword ptr [RSP + 0xdc],0x1 JLE 0x0018cb07 MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0xa0],RCX MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xa8],RAX JMP 0x0018cb32 LAB_0018cb07: MOV dword ptr [RSP + 0x40],0x0 MOV qword ptr [RSP + 0x48],0x3 MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xa8],RAX LAB_0018cb32: MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x0016da80 CMP EAX,0x0 JZ 0x0018cb70 MOV dword ptr [RSP + 0xf8],0x0 MOV qword ptr [RSP + 0x100],0x6 JMP 0x0018cda5 LAB_0018cb70: MOV RAX,qword ptr [RSP + 0xc0] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x58],RAX LAB_0018cb81: MOV RAX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0xc0] ADD RCX,0x8 CMP RAX,RCX JZ 0x0018cd8e MOV RAX,qword ptr [RSP + 0x58] ADD RAX,-0x10 MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x50] CMP dword ptr [RAX + 0x4],0x0 JNZ 0x0018cd7b MOV RAX,qword ptr [RSP + 0x50] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x50] MOV RDI,qword ptr [RAX + 0x30] MOV RSI,qword ptr [RAX + 0x38] CALL 0x001216d0 MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RDX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x78],RAX CMP dword ptr [RSP + 0xcc],0x0 JZ 0x0018cc14 MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x68],RAX JMP 0x0018cc44 LAB_0018cc14: MOV RAX,qword ptr [RSP + 0x50] MOV RDI,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RAX + 0x48] CALL 0x001216d0 MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x68],RAX LAB_0018cc44: MOV RAX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0xe0] LEA RAX,[RSP + 0x60] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV RCX,qword ptr [RSP + 0xa0] MOV R8,qword ptr [RSP + 0xa8] MOV R9D,0x3 MOV qword ptr [RSP],RAX CALL 0x0013a050 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00123c90 CMP dword ptr [RSP + 0xcc],0x0 JNZ 0x0018ccfc MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] CALL 0x00123c90 LAB_0018ccfc: MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0xe0] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x50] CALL 0x0015c180 MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x98] CALL 0x00123cc0 CMP EAX,0x0 JZ 0x0018cd5c MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0xf8],RAX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x100],RAX JMP 0x0018cda5 LAB_0018cd5c: MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x98] CALL 0x00123c90 JMP 0x0018cd89 LAB_0018cd7b: MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x58],RAX LAB_0018cd89: JMP 0x0018cb81 LAB_0018cd8e: MOV dword ptr [RSP + 0xf8],0x0 MOV qword ptr [RSP + 0x100],0x3 LAB_0018cda5: MOV RAX,qword ptr [RSP + 0xf8] MOV RDX,qword ptr [RSP + 0x100] ADD RSP,0x108 RET
int1 [16] js_map_forEach(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5, int param_6) { int iVar1; int *piVar2; int1 auVar3 [16]; int1 auVar4 [16]; uint uStack_c4; long local_b0; int1 local_a8 [16]; int1 local_98 [16]; int8 local_88; int8 local_80; int1 local_78 [16]; long local_68; int8 local_60; int8 local_58; int8 local_50; long local_48; int local_3c; int8 *local_38; int local_2c; long local_28; int8 local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_3c = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_1; local_20 = param_2; local_18 = param_3; local_48 = JS_GetOpaque2(param_1,param_2,param_3,param_6 + 0x23); if (local_48 == 0) { local_10 = 0; local_8 = 6; } else { local_58 = *local_38; local_50 = local_38[1]; if (local_2c < 2) { local_68 = (ulong)uStack_c4 << 0x20; local_60 = 3; } else { local_68 = local_38[2]; local_60 = local_38[3]; } iVar1 = check_function(local_28,local_58,local_50); if (iVar1 == 0) { local_b0 = *(long *)(local_48 + 0x10); while (local_b0 != local_48 + 8) { piVar2 = (int *)(local_b0 + -0x10); if (*(int *)(local_b0 + -0xc) == 0) { *piVar2 = *piVar2 + 1; auVar3 = js_dup(*(int8 *)(local_b0 + 0x20),*(int8 *)(local_b0 + 0x28)); auVar4 = auVar3; if (local_3c == 0) { local_98 = auVar3; auVar4 = js_dup(*(int8 *)(local_b0 + 0x30),*(int8 *)(local_b0 + 0x38)); auVar3 = local_98; } local_88 = local_20; local_80 = local_18; local_a8 = auVar4; local_98 = auVar3; auVar3 = JS_Call(local_28,local_58,local_50,local_68,local_60,3,local_a8); local_78 = auVar3; JS_FreeValue(local_28,local_a8._0_8_,local_a8._8_8_); if (local_3c == 0) { JS_FreeValue(local_28,local_98._0_8_,local_98._8_8_); } local_b0 = *(long *)(local_b0 + 8); map_decref_record(*(int8 *)(local_28 + 0x18),piVar2); iVar1 = JS_IsException(local_78._0_8_,local_78._8_8_); if (iVar1 != 0) { local_10 = local_78._0_4_; uStack_c = local_78._4_4_; local_8 = local_78._8_8_; goto LAB_0018cda5; } JS_FreeValue(local_28,local_78._0_8_,local_78._8_8_); } else { local_b0 = *(long *)(local_b0 + 8); } } local_10 = 0; local_8 = 3; } else { local_10 = 0; local_8 = 6; } } LAB_0018cda5: auVar3._4_4_ = uStack_c; auVar3._0_4_ = local_10; auVar3._8_8_ = local_8; return auVar3; }
39,296
js_map_forEach
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_forEach(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSValue func, this_arg; JSValue ret, args[3]; struct list_head *el; JSMapRecord *mr; if (!s) return JS_EXCEPTION; func = argv[0]; if (argc > 1) this_arg = argv[1]; else this_arg = JS_UNDEFINED; if (check_function(ctx, func)) return JS_EXCEPTION; /* Note: the list can be modified while traversing it, but the current element is locked */ el = s->records.next; while (el != &s->records) { mr = list_entry(el, JSMapRecord, link); if (!mr->empty) { mr->ref_count++; /* must duplicate in case the record is deleted */ args[1] = js_dup(mr->key); if (magic) args[0] = args[1]; else args[0] = js_dup(mr->value); args[2] = this_val; ret = JS_Call(ctx, func, this_arg, 3, args); JS_FreeValue(ctx, args[0]); if (!magic) JS_FreeValue(ctx, args[1]); el = el->next; map_decref_record(ctx->rt, mr); if (JS_IsException(ret)) return ret; JS_FreeValue(ctx, ret); } else { el = el->next; } } return JS_UNDEFINED; }
O1
c
js_map_forEach: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %r8, %rbx movl %ecx, %r14d movq %rdi, %r13 movq %r9, 0x48(%rsp) leal 0x23(%r9), %ecx movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) callq 0x275b5 movl $0x6, %r12d testq %rax, %rax je 0x4fde8 movq %rax, %rbp movq (%rbx), %r15 movq 0x8(%rbx), %rdx cmpl $0x2, %r14d jl 0x4fdc0 movq 0x10(%rbx), %rax movq 0x18(%rbx), %rcx movq %rcx, 0x40(%rsp) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movq %rcx, 0x28(%rsp) movl %eax, %r14d jmp 0x4fdd6 movl $0x3, %eax movq %rax, 0x40(%rsp) xorl %r14d, %r14d movq $0x0, 0x28(%rsp) movq %r13, %rdi movq %r15, %rsi movq %rdx, %rbx callq 0x415b1 testl %eax, %eax je 0x4fe04 xorl %eax, %eax xorl %edx, %edx orq %rdx, %rax movq %r12, %rdx addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, 0x88(%rsp) movq %r15, 0x90(%rsp) movq %rbp, %rax addq $0x8, %rbp movq 0x10(%rax), %r15 cmpq %rbp, %r15 je 0x4ff82 orq %r14, 0x28(%rsp) cmpl $0x0, -0xc(%r15) je 0x4fe3d movq 0x8(%r15), %rbx jmp 0x4ff67 incl -0x10(%r15) movq 0x20(%r15), %rax movq 0x28(%r15), %rcx movq %rax, 0x30(%rsp) cmpl $-0x9, %ecx jb 0x4fe5a movq 0x30(%rsp), %rdx incl (%rdx) movq %rax, 0x60(%rsp) movq %rcx, 0x68(%rsp) cmpl $0x0, 0x48(%rsp) je 0x4fe7a leaq 0x60(%rsp), %rax movaps (%rax), %xmm0 movaps %xmm0, 0x50(%rsp) jmp 0x4fe9d movq 0x30(%r15), %rax movq 0x38(%r15), %rcx movq %rax, 0x30(%rsp) cmpl $-0x9, %ecx jb 0x4fe93 movq 0x30(%rsp), %rdx incl (%rdx) movq %rax, 0x50(%rsp) movq %rcx, 0x58(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x70(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x78(%rsp) movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) movups 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x50(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movq %r13, %rdi movq 0x90(%rsp), %rsi movq 0x88(%rsp), %rdx movq 0x28(%rsp), %rcx movq 0x40(%rsp), %r8 movl $0x3, %r9d callq 0x284ca movq %rax, %r14 movq %rdx, %r12 movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x18(%r13), %rdi callq 0x1d8c6 cmpl $0x0, 0x48(%rsp) jne 0x4ff3e movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movq 0x18(%r13), %rdi callq 0x1d8c6 movq 0x8(%r15), %rbx addq $-0x10, %r15 movq 0x18(%r13), %rdi movq %r15, %rsi callq 0x3b477 cmpl $0x6, %r12d je 0x4ff91 movq 0x18(%r13), %rdi movq %r14, %rsi movq %r12, %rdx callq 0x1d8c6 movq %rbx, %r15 cmpq %rbp, %rbx jne 0x4fe2d xorl %edx, %edx movl $0x3, %r12d xorl %eax, %eax jmp 0x4fdec xorl %eax, %eax xorl %edx, %edx movl $0x3, %r12d jmp 0x4fdec movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 movq %r14, %rdx andq %rcx, %rdx movl %r14d, %eax jmp 0x4fdec
js_map_forEach: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov rbx, r8 mov r14d, ecx mov r13, rdi mov [rsp+0D8h+var_90], r9 lea ecx, [r9+23h] mov [rsp+0D8h+var_40], rsi mov [rsp+0D8h+var_38], rdx call JS_GetOpaque2 mov r12d, 6 test rax, rax jz short loc_4FDE8 mov rbp, rax mov r15, [rbx] mov rdx, [rbx+8] cmp r14d, 2 jl short loc_4FDC0 mov rax, [rbx+10h] mov rcx, [rbx+18h] mov [rsp+0D8h+var_98], rcx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov [rsp+0D8h+var_B0], rcx mov r14d, eax jmp short loc_4FDD6 loc_4FDC0: mov eax, 3 mov [rsp+0D8h+var_98], rax xor r14d, r14d mov [rsp+0D8h+var_B0], 0 loc_4FDD6: mov rdi, r13 mov rsi, r15 mov rbx, rdx call check_function test eax, eax jz short loc_4FE04 loc_4FDE8: xor eax, eax xor edx, edx loc_4FDEC: or rax, rdx mov rdx, r12 add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4FE04: mov [rsp+0D8h+var_50], rbx mov [rsp+0D8h+var_48], r15 mov rax, rbp add rbp, 8 mov r15, [rax+10h] cmp r15, rbp jz loc_4FF82 or [rsp+0D8h+var_B0], r14 loc_4FE2D: cmp dword ptr [r15-0Ch], 0 jz short loc_4FE3D mov rbx, [r15+8] jmp loc_4FF67 loc_4FE3D: inc dword ptr [r15-10h] mov rax, [r15+20h] mov rcx, [r15+28h] mov qword ptr [rsp+0D8h+var_A8], rax cmp ecx, 0FFFFFFF7h jb short loc_4FE5A mov rdx, qword ptr [rsp+0D8h+var_A8] inc dword ptr [rdx] loc_4FE5A: mov [rsp+0D8h+var_78], rax mov [rsp+0D8h+var_70], rcx cmp dword ptr [rsp+0D8h+var_90], 0 jz short loc_4FE7A lea rax, [rsp+0D8h+var_78] movaps xmm0, xmmword ptr [rax] movaps [rsp+0D8h+var_88], xmm0 jmp short loc_4FE9D loc_4FE7A: mov rax, [r15+30h] mov rcx, [r15+38h] mov qword ptr [rsp+0D8h+var_A8], rax cmp ecx, 0FFFFFFF7h jb short loc_4FE93 mov rdx, qword ptr [rsp+0D8h+var_A8] inc dword ptr [rdx] loc_4FE93: mov qword ptr [rsp+0D8h+var_88], rax mov qword ptr [rsp+0D8h+var_88+8], rcx loc_4FE9D: mov rax, [rsp+0D8h+var_40] mov [rsp+0D8h+var_68], rax mov rax, [rsp+0D8h+var_38] mov [rsp+0D8h+var_60], rax mov dword ptr [rsp+0D8h+var_A8], 0 mov qword ptr [rsp+0D8h+var_A8+8], 3 movups xmm0, [rsp+0D8h+var_A8] movups [rsp+0D8h+var_D8], xmm0 lea rax, [rsp+0D8h+var_88] mov [rsp+0D8h+var_C8], rax mov [rsp+0D8h+var_C0], 2 mov rdi, r13 mov rsi, [rsp+0D8h+var_48] mov rdx, [rsp+0D8h+var_50] mov rcx, [rsp+0D8h+var_B0] mov r8, [rsp+0D8h+var_98] mov r9d, 3 call JS_CallInternal mov r14, rax mov r12, rdx mov rsi, qword ptr [rsp+0D8h+var_88] mov rdx, qword ptr [rsp+0D8h+var_88+8] mov rdi, [r13+18h] call JS_FreeValueRT cmp dword ptr [rsp+0D8h+var_90], 0 jnz short loc_4FF3E mov rsi, [rsp+0D8h+var_78] mov rdx, [rsp+0D8h+var_70] mov rdi, [r13+18h] call JS_FreeValueRT loc_4FF3E: mov rbx, [r15+8] add r15, 0FFFFFFFFFFFFFFF0h mov rdi, [r13+18h] mov rsi, r15 call map_decref_record cmp r12d, 6 jz short loc_4FF91 mov rdi, [r13+18h] mov rsi, r14 mov rdx, r12 call JS_FreeValueRT loc_4FF67: mov r15, rbx cmp rbx, rbp jnz loc_4FE2D xor edx, edx mov r12d, 3 xor eax, eax jmp loc_4FDEC loc_4FF82: xor eax, eax xor edx, edx mov r12d, 3 jmp loc_4FDEC loc_4FF91: mov rcx, 0FFFFFFFF00000000h mov rdx, r14 and rdx, rcx mov eax, r14d jmp loc_4FDEC
unsigned long long js_map_forEach( long long a1, long long a2, long long a3, int a4, long long *a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long Opaque2; // rax double v17; // xmm4_8 double v18; // xmm5_8 long long v19; // rbp long long v20; // r15 long long v21; // rdx long long v22; // rax long long v23; // r14 long long v24; // rbx __m128 v25; // xmm4 __m128 v26; // xmm5 long long v27; // rax unsigned long long v28; // rdx long long v30; // rax _QWORD *v31; // rbp _QWORD *v32; // r15 _QWORD *v33; // rbx _DWORD *v34; // rax long long v35; // rcx _DWORD *v36; // rax long long v37; // rcx unsigned long long v38; // r14 long long v39; // rdx long long v40; // r12 unsigned long long v41; // [rsp+28h] [rbp-B0h] long long v42; // [rsp+28h] [rbp-B0h] __m128 v43; // [rsp+30h] [rbp-A8h] long long v44; // [rsp+40h] [rbp-98h] __int128 v46; // [rsp+50h] [rbp-88h] BYREF __int128 v47; // [rsp+60h] [rbp-78h] long long v48; // [rsp+70h] [rbp-68h] long long v49; // [rsp+78h] [rbp-60h] long long v50; // [rsp+88h] [rbp-50h] long long v51; // [rsp+90h] [rbp-48h] long long v52; // [rsp+98h] [rbp-40h] long long v53; // [rsp+A0h] [rbp-38h] v52 = a2; v53 = a3; Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( !Opaque2 ) goto LABEL_6; v19 = Opaque2; v20 = *a5; v21 = a5[1]; if ( a4 < 2 ) { v44 = 3LL; v23 = 0LL; v41 = 0LL; } else { v22 = a5[2]; v44 = a5[3]; v41 = v22 & 0xFFFFFFFF00000000LL; v23 = (unsigned int)v22; } v24 = a5[1]; if ( !(unsigned int)check_function(a1, v20, v21, a7, a8, a9, a10, v17, v18, a13, a14) ) { v50 = v24; v51 = v20; v30 = v19; v31 = (_QWORD *)(v19 + 8); v32 = *(_QWORD **)(v30 + 16); if ( v32 != v31 ) { v42 = v23 | v41; while ( 1 ) { if ( *((_DWORD *)v32 - 3) ) { v33 = (_QWORD *)v32[1]; } else { ++*((_DWORD *)v32 - 4); v34 = (_DWORD *)v32[4]; v35 = v32[5]; v43.m128_i32[1] = HIDWORD(v34); if ( (unsigned int)v35 >= 0xFFFFFFF7 ) ++*v34; *(_QWORD *)&v47 = v34; *((_QWORD *)&v47 + 1) = v35; if ( a6 ) { v46 = v47; } else { v36 = (_DWORD *)v32[6]; v37 = v32[7]; v43.m128_i32[1] = HIDWORD(v36); if ( (unsigned int)v37 >= 0xFFFFFFF7 ) ++*v36; *(_QWORD *)&v46 = v36; *((_QWORD *)&v46 + 1) = v37; } v48 = v52; v49 = v53; v43.m128_i32[0] = 0; v43.m128_u64[1] = 3LL; v38 = JS_CallInternal( a1, v51, v50, v42, v44, 3LL, v43, a8, a9, a10, v25, v26, a13, a14, v43.m128_i8[0], 3, (long long)&v46, 2u); v40 = v39; JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v46, *((long long *)&v46 + 1)); if ( !a6 ) JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v47, *((long long *)&v47 + 1)); v33 = (_QWORD *)v32[1]; map_decref_record(*(_QWORD *)(a1 + 24), (long long)(v32 - 2)); if ( (_DWORD)v40 == 6 ) { v28 = v38 & 0xFFFFFFFF00000000LL; v27 = (unsigned int)v38; return v28 | v27; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v38, v40); } v32 = v33; if ( v33 == v31 ) { v28 = 0LL; v27 = 0LL; return v28 | v27; } } } v27 = 0LL; v28 = 0LL; } else { LABEL_6: v27 = 0LL; v28 = 0LL; } return v28 | v27; }
39,297
js_map_forEach
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_forEach(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSValue func, this_arg; JSValue ret, args[3]; struct list_head *el; JSMapRecord *mr; if (!s) return JS_EXCEPTION; func = argv[0]; if (argc > 1) this_arg = argv[1]; else this_arg = JS_UNDEFINED; if (check_function(ctx, func)) return JS_EXCEPTION; /* Note: the list can be modified while traversing it, but the current element is locked */ el = s->records.next; while (el != &s->records) { mr = list_entry(el, JSMapRecord, link); if (!mr->empty) { mr->ref_count++; /* must duplicate in case the record is deleted */ args[1] = js_dup(mr->key); if (magic) args[0] = args[1]; else args[0] = js_dup(mr->value); args[2] = this_val; ret = JS_Call(ctx, func, this_arg, 3, args); JS_FreeValue(ctx, args[0]); if (!magic) JS_FreeValue(ctx, args[1]); el = el->next; map_decref_record(ctx->rt, mr); if (JS_IsException(ret)) return ret; JS_FreeValue(ctx, ret); } else { el = el->next; } } return JS_UNDEFINED; }
O2
c
js_map_forEach: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %r8, %rbx movl %ecx, %r15d movq %rdi, %r13 movq %r9, 0x18(%rsp) leal 0x23(%r9), %ecx movq %rsi, 0x68(%rsp) movq %rdx, 0x70(%rsp) callq 0x21207 pushq $0x6 popq %r14 testq %rax, %rax je 0x44947 movq %rax, %rbp movq (%rbx), %r12 movq 0x8(%rbx), %rdx movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 cmpl $0x2, %r15d jl 0x44922 movq 0x10(%rbx), %rax movq 0x18(%rbx), %rsi movq %rsi, 0x10(%rsp) movl %eax, %ebx andq %rcx, %rax movq %rax, 0x8(%rsp) jmp 0x44935 pushq $0x3 popq %rax movq %rax, 0x10(%rsp) xorl %ebx, %ebx movq $0x0, 0x8(%rsp) movq %r13, %rdi movq %r12, %rsi movq %rdx, %r15 callq 0x3949a testl %eax, %eax je 0x44960 xorl %eax, %eax xorl %edx, %edx orq %rdx, %rax movq %r14, %rdx addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, 0x60(%rsp) movq %rbp, %rax addq $0x8, %rbp movq 0x10(%rax), %r12 orq %rbx, 0x8(%rsp) movq %r15, %rdx movq %rbp, 0x58(%rsp) cmpq %rbp, %r12 je 0x44a8a cmpl $0x0, -0xc(%r12) je 0x44995 movq 0x8(%r12), %r12 jmp 0x4497d incl -0x10(%r12) movq 0x20(%r12), %rax movq 0x28(%r12), %rcx cmpl $-0x9, %ecx jb 0x449ab incl (%rax) movq %rax, 0x30(%rsp) movq %rcx, 0x38(%rsp) cmpl $0x0, 0x18(%rsp) je 0x449cb leaq 0x30(%rsp), %rax movaps (%rax), %xmm0 movaps %xmm0, 0x20(%rsp) jmp 0x449e6 movq 0x30(%r12), %rax movq 0x38(%r12), %rcx cmpl $-0x9, %ecx jb 0x449dc incl (%rax) movq %rax, 0x20(%rsp) movq %rcx, 0x28(%rsp) movq 0x68(%rsp), %rax movq %rax, 0x40(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x20(%rsp), %rax movq %rax, (%rsp) movq %r13, %rdi movq 0x60(%rsp), %rsi movq %rdx, %rbp movq 0x8(%rsp), %rcx movq 0x10(%rsp), %r8 pushq $0x3 popq %r9 callq 0x21eb6 movq %rax, %r15 movq %rdx, %rbx movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movq %r13, %rdi callq 0x1801e cmpl $0x0, 0x18(%rsp) jne 0x44a52 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movq %r13, %rdi callq 0x1801e movq 0x8(%r12), %r14 addq $-0x10, %r12 movq 0x18(%r13), %rdi movq %r12, %rsi callq 0x34237 cmpl $0x6, %ebx je 0x44a97 movq %r13, %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x1801e movq %r14, %r12 movq %rbp, %rdx movq 0x58(%rsp), %rbp jmp 0x4497d xorl %edx, %edx pushq $0x3 popq %r14 xorl %eax, %eax jmp 0x4494b movq %r15, %rdx movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rcx, %rdx movl %r15d, %eax movq %rbx, %r14 jmp 0x4494b
js_map_forEach: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, r8 mov r15d, ecx mov r13, rdi mov [rsp+0A8h+var_90], r9 lea ecx, [r9+23h] mov [rsp+0A8h+var_40], rsi mov [rsp+0A8h+var_38], rdx call JS_GetOpaque2 push 6 pop r14 test rax, rax jz short loc_44947 mov rbp, rax mov r12, [rbx] mov rdx, [rbx+8] mov rcx, 0FFFFFFFF00000000h cmp r15d, 2 jl short loc_44922 mov rax, [rbx+10h] mov rsi, [rbx+18h] mov [rsp+0A8h+var_98], rsi mov ebx, eax and rax, rcx mov [rsp+0A8h+var_A0], rax jmp short loc_44935 loc_44922: push 3 pop rax mov [rsp+0A8h+var_98], rax xor ebx, ebx mov [rsp+0A8h+var_A0], 0 loc_44935: mov rdi, r13 mov rsi, r12 mov r15, rdx call check_function test eax, eax jz short loc_44960 loc_44947: xor eax, eax xor edx, edx loc_4494B: or rax, rdx mov rdx, r14 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_44960: mov [rsp+0A8h+var_48], r12 mov rax, rbp add rbp, 8 mov r12, [rax+10h] or [rsp+0A8h+var_A0], rbx mov rdx, r15 mov [rsp+0A8h+var_50], rbp loc_4497D: cmp r12, rbp jz loc_44A8A cmp dword ptr [r12-0Ch], 0 jz short loc_44995 mov r12, [r12+8] jmp short loc_4497D loc_44995: inc dword ptr [r12-10h] mov rax, [r12+20h] mov rcx, [r12+28h] cmp ecx, 0FFFFFFF7h jb short loc_449AB inc dword ptr [rax] loc_449AB: mov [rsp+0A8h+var_78], rax mov [rsp+0A8h+var_70], rcx cmp dword ptr [rsp+0A8h+var_90], 0 jz short loc_449CB lea rax, [rsp+0A8h+var_78] movaps xmm0, xmmword ptr [rax] movaps [rsp+0A8h+var_88], xmm0 jmp short loc_449E6 loc_449CB: mov rax, [r12+30h] mov rcx, [r12+38h] cmp ecx, 0FFFFFFF7h jb short loc_449DC inc dword ptr [rax] loc_449DC: mov qword ptr [rsp+0A8h+var_88], rax mov qword ptr [rsp+0A8h+var_88+8], rcx loc_449E6: mov rax, [rsp+0A8h+var_40] mov [rsp+0A8h+var_68], rax mov rax, [rsp+0A8h+var_38] mov [rsp+0A8h+var_60], rax lea rax, [rsp+0A8h+var_88] mov [rsp+0A8h+var_A8], rax mov rdi, r13 mov rsi, [rsp+0A8h+var_48] mov rbp, rdx mov rcx, [rsp+0A8h+var_A0] mov r8, [rsp+0A8h+var_98] push 3 pop r9 call JS_Call mov r15, rax mov rbx, rdx mov rsi, qword ptr [rsp+0A8h+var_88] mov rdx, qword ptr [rsp+0A8h+var_88+8] mov rdi, r13 call JS_FreeValue cmp dword ptr [rsp+0A8h+var_90], 0 jnz short loc_44A52 mov rsi, [rsp+0A8h+var_78] mov rdx, [rsp+0A8h+var_70] mov rdi, r13 call JS_FreeValue loc_44A52: mov r14, [r12+8] add r12, 0FFFFFFFFFFFFFFF0h mov rdi, [r13+18h] mov rsi, r12 call map_decref_record cmp ebx, 6 jz short loc_44A97 mov rdi, r13 mov rsi, r15 mov rdx, rbx call JS_FreeValue mov r12, r14 mov rdx, rbp mov rbp, [rsp+0A8h+var_50] jmp loc_4497D loc_44A8A: xor edx, edx push 3 pop r14 xor eax, eax jmp loc_4494B loc_44A97: mov rdx, r15 mov rcx, 0FFFFFFFF00000000h and rdx, rcx mov eax, r15d mov r14, rbx jmp loc_4494B
unsigned long long js_map_forEach( long long a1, long long a2, long long a3, int a4, long long *a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long Opaque2; // rax double v17; // xmm4_8 double v18; // xmm5_8 long long v19; // rbp long long v20; // r12 long long v21; // rdx int v22; // ebx long long v23; // r15 long long v24; // rax unsigned long long v25; // rdx long long v27; // rax _QWORD *v28; // rbp _QWORD *v29; // r12 long long v30; // rdx _DWORD *v31; // rax long long v32; // rcx _DWORD *v33; // rax long long v34; // rcx long long v35; // rbp long long v36; // r15 long long v37; // rdx long long v38; // rbx _QWORD *v39; // r14 int v40; // [rsp+8h] [rbp-A0h] long long v41; // [rsp+10h] [rbp-98h] __int128 v43; // [rsp+20h] [rbp-88h] BYREF __int128 v44; // [rsp+30h] [rbp-78h] long long v45; // [rsp+40h] [rbp-68h] long long v46; // [rsp+48h] [rbp-60h] _QWORD *i; // [rsp+58h] [rbp-50h] long long v48; // [rsp+60h] [rbp-48h] long long v49; // [rsp+68h] [rbp-40h] long long v50; // [rsp+70h] [rbp-38h] v49 = a2; v50 = a3; Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( Opaque2 && ((v19 = Opaque2, v20 = *a5, v21 = a5[1], a4 < 2) ? (LODWORD(v41) = 3, v22 = 0) : (v41 = a5[3], v22 = a5[2]), v23 = v21, !(unsigned int)check_function(a1, v20, v21, a7, a8, a9, a10, v17, v18, a13, a14)) ) { v48 = v20; v27 = v19; v28 = (_QWORD *)(v19 + 8); v29 = *(_QWORD **)(v27 + 16); v40 = v22; v30 = v23; for ( i = v28; ; v28 = i ) { while ( 1 ) { if ( v29 == v28 ) { v25 = 0LL; v24 = 0LL; return v25 | v24; } if ( !*((_DWORD *)v29 - 3) ) break; v29 = (_QWORD *)v29[1]; } ++*((_DWORD *)v29 - 4); v31 = (_DWORD *)v29[4]; v32 = v29[5]; if ( (unsigned int)v32 >= 0xFFFFFFF7 ) ++*v31; *(_QWORD *)&v44 = v31; *((_QWORD *)&v44 + 1) = v32; if ( a6 ) { v43 = v44; } else { v33 = (_DWORD *)v29[6]; v34 = v29[7]; if ( (unsigned int)v34 >= 0xFFFFFFF7 ) ++*v33; *(_QWORD *)&v43 = v33; *((_QWORD *)&v43 + 1) = v34; } v45 = v49; v46 = v50; v35 = v30; v36 = JS_Call(a1, v48, v30, v40, v41, 3, (long long)&v43); v38 = v37; JS_FreeValue(a1, v43, *((long long *)&v43 + 1)); if ( !a6 ) JS_FreeValue(a1, v44, *((long long *)&v44 + 1)); v39 = (_QWORD *)v29[1]; map_decref_record(*(_QWORD *)(a1 + 24), (long long)(v29 - 2)); if ( (_DWORD)v38 == 6 ) break; JS_FreeValue(a1, v36, v38); v29 = v39; v30 = v35; } v25 = v36 & 0xFFFFFFFF00000000LL; v24 = (unsigned int)v36; } else { v24 = 0LL; v25 = 0LL; } return v25 | v24; }
js_map_forEach: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,R8 MOV R15D,ECX MOV R13,RDI MOV qword ptr [RSP + 0x18],R9 LEA ECX,[R9 + 0x23] MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x70],RDX CALL 0x00121207 PUSH 0x6 POP R14 TEST RAX,RAX JZ 0x00144947 MOV RBP,RAX MOV R12,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] MOV RCX,-0x100000000 CMP R15D,0x2 JL 0x00144922 MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RBX + 0x18] MOV qword ptr [RSP + 0x10],RSI MOV EBX,EAX AND RAX,RCX MOV qword ptr [RSP + 0x8],RAX JMP 0x00144935 LAB_00144922: PUSH 0x3 POP RAX MOV qword ptr [RSP + 0x10],RAX XOR EBX,EBX MOV qword ptr [RSP + 0x8],0x0 LAB_00144935: MOV RDI,R13 MOV RSI,R12 MOV R15,RDX CALL 0x0013949a TEST EAX,EAX JZ 0x00144960 LAB_00144947: XOR EAX,EAX XOR EDX,EDX LAB_0014494b: OR RAX,RDX MOV RDX,R14 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00144960: MOV qword ptr [RSP + 0x60],R12 MOV RAX,RBP ADD RBP,0x8 MOV R12,qword ptr [RAX + 0x10] OR qword ptr [RSP + 0x8],RBX MOV RDX,R15 MOV qword ptr [RSP + 0x58],RBP LAB_0014497d: CMP R12,RBP JZ 0x00144a8a CMP dword ptr [R12 + -0xc],0x0 JZ 0x00144995 MOV R12,qword ptr [R12 + 0x8] JMP 0x0014497d LAB_00144995: INC dword ptr [R12 + -0x10] MOV RAX,qword ptr [R12 + 0x20] MOV RCX,qword ptr [R12 + 0x28] CMP ECX,-0x9 JC 0x001449ab INC dword ptr [RAX] LAB_001449ab: MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RCX CMP dword ptr [RSP + 0x18],0x0 JZ 0x001449cb LEA RAX,[RSP + 0x30] MOVAPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RSP + 0x20],XMM0 JMP 0x001449e6 LAB_001449cb: MOV RAX,qword ptr [R12 + 0x30] MOV RCX,qword ptr [R12 + 0x38] CMP ECX,-0x9 JC 0x001449dc INC dword ptr [RAX] LAB_001449dc: MOV qword ptr [RSP + 0x20],RAX MOV qword ptr [RSP + 0x28],RCX LAB_001449e6: MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x48],RAX LEA RAX,[RSP + 0x20] MOV qword ptr [RSP],RAX MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x60] MOV RBP,RDX MOV RCX,qword ptr [RSP + 0x8] MOV R8,qword ptr [RSP + 0x10] PUSH 0x3 POP R9 CALL 0x00121eb6 MOV R15,RAX MOV RBX,RDX MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] MOV RDI,R13 CALL 0x0011801e CMP dword ptr [RSP + 0x18],0x0 JNZ 0x00144a52 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] MOV RDI,R13 CALL 0x0011801e LAB_00144a52: MOV R14,qword ptr [R12 + 0x8] ADD R12,-0x10 MOV RDI,qword ptr [R13 + 0x18] MOV RSI,R12 CALL 0x00134237 CMP EBX,0x6 JZ 0x00144a97 MOV RDI,R13 MOV RSI,R15 MOV RDX,RBX CALL 0x0011801e MOV R12,R14 MOV RDX,RBP MOV RBP,qword ptr [RSP + 0x58] JMP 0x0014497d LAB_00144a8a: XOR EDX,EDX PUSH 0x3 POP R14 XOR EAX,EAX JMP 0x0014494b LAB_00144a97: MOV RDX,R15 MOV RCX,-0x100000000 AND RDX,RCX MOV EAX,R15D MOV R14,RBX JMP 0x0014494b
int1 [16] js_map_forEach(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5, int param_6) { int8 uVar1; int8 uVar2; long lVar3; int iVar4; long lVar5; ulong uVar6; ulong uVar7; long lVar8; int1 auVar9 [16]; int8 uStackY_b0; ulong local_a0; int8 local_98; int *local_88; int8 uStack_80; int *local_78; int8 uStack_70; int8 local_68; int8 local_60; long local_50; int8 local_48; int8 local_40; int8 local_38; local_40 = param_2; local_38 = param_3; lVar5 = JS_GetOpaque2(); uStackY_b0 = 6; if (lVar5 != 0) { uVar1 = *param_5; uVar2 = param_5[1]; if (param_4 < 2) { local_98 = 3; uVar7 = 0; local_a0 = 0; } else { local_98 = param_5[3]; uVar7 = param_5[2] & 0xffffffff; local_a0 = param_5[2] & 0xffffffff00000000; } iVar4 = check_function(param_1,uVar1); if (iVar4 == 0) { local_50 = lVar5 + 8; lVar8 = local_50; lVar5 = *(long *)(lVar5 + 0x10); local_48 = uVar1; while (lVar5 != lVar8) { if (*(int *)(lVar5 + -0xc) == 0) { *(int *)(lVar5 + -0x10) = *(int *)(lVar5 + -0x10) + 1; local_78 = *(int **)(lVar5 + 0x20); uStack_70 = *(int8 *)(lVar5 + 0x28); if (0xfffffff6 < (uint)uStack_70) { *local_78 = *local_78 + 1; } local_88 = local_78; uStack_80 = uStack_70; if (param_6 == 0) { local_88 = *(int **)(lVar5 + 0x30); uStack_80 = *(int8 *)(lVar5 + 0x38); if (0xfffffff6 < (uint)uStack_80) { *local_88 = *local_88 + 1; } } local_68 = local_40; local_60 = local_38; auVar9 = JS_Call(param_1,local_48,uVar2,local_a0 | uVar7,local_98,3,&local_88); uStackY_b0 = auVar9._8_8_; uVar6 = auVar9._0_8_; JS_FreeValue(param_1,local_88,uStack_80); if (param_6 == 0) { JS_FreeValue(param_1,local_78,uStack_70); } lVar3 = *(long *)(lVar5 + 8); map_decref_record(*(int8 *)(param_1 + 0x18),lVar5 + -0x10); if (auVar9._8_4_ == 6) { uVar7 = uVar6 & 0xffffffff00000000; uVar6 = uVar6 & 0xffffffff; goto LAB_0014494b; } JS_FreeValue(param_1,uVar6,uStackY_b0); lVar8 = local_50; lVar5 = lVar3; } else { lVar5 = *(long *)(lVar5 + 8); } } uVar7 = 0; uStackY_b0 = 3; uVar6 = 0; goto LAB_0014494b; } } uVar6 = 0; uVar7 = 0; LAB_0014494b: auVar9._0_8_ = uVar6 | uVar7; auVar9._8_8_ = uStackY_b0; return auVar9; }
39,298
ma_ft_parserecord
eloqsql/storage/maria/ma_ft_update.c
FT_WORD * _ma_ft_parserecord(MARIA_HA *info, uint keynr, const uchar *record, MEM_ROOT *mem_root) { TREE ptree; MYSQL_FTPARSER_PARAM *param; DBUG_ENTER("_ma_ft_parserecord"); if (! (param= maria_ftparser_call_initializer(info, keynr, 0))) DBUG_RETURN(NULL); bzero((char*) &ptree, sizeof(ptree)); param->flags= 0; if (_ma_ft_parse(&ptree, info, keynr, record, param, mem_root)) DBUG_RETURN(NULL); DBUG_RETURN(maria_ft_linearize(&ptree, mem_root)); }
O0
c
ma_ft_parserecord: pushq %rbp movq %rsp, %rbp subq $0x2d0, %rsp # imm = 0x2D0 movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi xorl %edx, %edx callq 0x4c020 movq %rax, -0x2c8(%rbp) cmpq $0x0, %rax jne 0x8c841 jmp 0x8c837 movq $0x0, -0x8(%rbp) jmp 0x8c8ab leaq -0x2c0(%rbp), %rdi xorl %esi, %esi movl $0x298, %edx # imm = 0x298 callq 0x2a2c0 movq -0x2c8(%rbp), %rax movl $0x0, 0x34(%rax) movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx movq -0x20(%rbp), %rcx movq -0x2c8(%rbp), %r8 movq -0x28(%rbp), %r9 leaq -0x2c0(%rbp), %rdi callq 0x8c720 cmpl $0x0, %eax je 0x8c895 jmp 0x8c88b movq $0x0, -0x8(%rbp) jmp 0x8c8ab jmp 0x8c897 movq -0x28(%rbp), %rsi leaq -0x2c0(%rbp), %rdi callq 0x4b330 movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x2d0, %rsp # imm = 0x2D0 popq %rbp retq nopl (%rax,%rax)
_ma_ft_parserecord: push rbp mov rbp, rsp sub rsp, 2D0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_10] mov esi, [rbp+var_14] xor edx, edx call maria_ftparser_call_initializer mov [rbp+var_2C8], rax cmp rax, 0 jnz short loc_8C841 jmp short $+2 loc_8C837: mov [rbp+var_8], 0 jmp short loc_8C8AB loc_8C841: lea rdi, [rbp+var_2C0] xor esi, esi mov edx, 298h call _memset mov rax, [rbp+var_2C8] mov dword ptr [rax+34h], 0 mov rsi, [rbp+var_10] mov edx, [rbp+var_14] mov rcx, [rbp+var_20] mov r8, [rbp+var_2C8] mov r9, [rbp+var_28] lea rdi, [rbp+var_2C0] call _ma_ft_parse cmp eax, 0 jz short loc_8C895 jmp short $+2 loc_8C88B: mov [rbp+var_8], 0 jmp short loc_8C8AB loc_8C895: jmp short $+2 loc_8C897: mov rsi, [rbp+var_28] lea rdi, [rbp+var_2C0] call maria_ft_linearize mov [rbp+var_8], rax loc_8C8AB: mov rax, [rbp+var_8] add rsp, 2D0h pop rbp retn
long long ma_ft_parserecord(_QWORD *a1, unsigned int a2, long long a3, long long a4) { unsigned long long v5; // [rsp+8h] [rbp-2C8h] _QWORD v6[83]; // [rsp+10h] [rbp-2C0h] BYREF long long v7; // [rsp+2A8h] [rbp-28h] long long v8; // [rsp+2B0h] [rbp-20h] unsigned int v9; // [rsp+2BCh] [rbp-14h] _QWORD *v10; // [rsp+2C0h] [rbp-10h] v10 = a1; v9 = a2; v8 = a3; v7 = a4; v5 = maria_ftparser_call_initializer(a1, a2, 0); if ( !v5 ) return 0LL; memset(v6, 0LL, sizeof(v6)); *(_DWORD *)(v5 + 52) = 0; if ( (unsigned int)ma_ft_parse(v6, (long long)v10, v9, v8, (_QWORD *)v5, v7) ) return 0LL; else return maria_ft_linearize((long long)v6, v7); }
_ma_ft_parserecord: PUSH RBP MOV RBP,RSP SUB RSP,0x2d0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] XOR EDX,EDX CALL 0x0014c020 MOV qword ptr [RBP + -0x2c8],RAX CMP RAX,0x0 JNZ 0x0018c841 JMP 0x0018c837 LAB_0018c837: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0018c8ab LAB_0018c841: LEA RDI,[RBP + -0x2c0] XOR ESI,ESI MOV EDX,0x298 CALL 0x0012a2c0 MOV RAX,qword ptr [RBP + -0x2c8] MOV dword ptr [RAX + 0x34],0x0 MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x2c8] MOV R9,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x2c0] CALL 0x0018c720 CMP EAX,0x0 JZ 0x0018c895 JMP 0x0018c88b LAB_0018c88b: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0018c8ab LAB_0018c895: JMP 0x0018c897 LAB_0018c897: MOV RSI,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x2c0] CALL 0x0014b330 MOV qword ptr [RBP + -0x8],RAX LAB_0018c8ab: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x2d0 POP RBP RET
int8 _ma_ft_parserecord(int8 param_1,int4 param_2,int8 param_3,int8 param_4) { int iVar1; long lVar2; int1 local_2c8 [664]; int8 local_30; int8 local_28; int4 local_1c; int8 local_18; int8 local_10; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; lVar2 = maria_ftparser_call_initializer(param_1,param_2,0); if (lVar2 == 0) { local_10 = 0; } else { memset(local_2c8,0,0x298); *(int4 *)(lVar2 + 0x34) = 0; iVar1 = _ma_ft_parse(local_2c8,local_18,local_1c,local_28,lVar2,local_30); if (iVar1 == 0) { local_10 = maria_ft_linearize(local_2c8,local_30); } else { local_10 = 0; } } return local_10; }
39,299
MY_RELAX_CPU
eloqsql/include/my_cpu.h
static inline void MY_RELAX_CPU(void) { #ifdef _WIN32 /* In the Win32 API, the x86 PAUSE instruction is executed by calling the YieldProcessor macro defined in WinNT.h. It is a CPU architecture- independent way by using YieldProcessor. */ YieldProcessor(); #elif defined HAVE_PAUSE_INSTRUCTION /* According to the gcc info page, asm volatile means that the instruction has important side-effects and must not be removed. Also asm volatile may trigger a memory barrier (spilling all registers to memory). */ #ifdef __SUNPRO_CC asm ("pause" ); #else __asm__ __volatile__ ("pause"); #endif #elif defined(_ARCH_PWR8) __ppc_get_timebase(); #elif defined __GNUC__ && (defined __arm__ || defined __aarch64__) /* Mainly, prevent the compiler from optimizing away delay loops */ __asm__ __volatile__ ("":::"memory"); #else int32 var, oldval = 0; my_atomic_cas32_strong_explicit(&var, &oldval, 1, MY_MEMORY_ORDER_RELAXED, MY_MEMORY_ORDER_RELAXED); #endif }
O0
c
MY_RELAX_CPU: pushq %rbp movq %rsp, %rbp pause popq %rbp retq nopl (%rax,%rax)
_ZL12MY_RELAX_CPUv: push rbp mov rbp, rsp pause pop rbp retn
void MY_RELAX_CPU(void) { _mm_pause(); }
MY_RELAX_CPU: PUSH RBP MOV RBP,RSP PAUSE POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* MY_RELAX_CPU() */ void MY_RELAX_CPU(void) { return; }