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,700
_JS_FindAtom
bluesky950520[P]quickjs/quickjs.c
static JSAtom __JS_FindAtom(JSRuntime *rt, const char *str, size_t len, int atom_type) { uint32_t h, h1, i; JSAtomStruct *p; h = hash_string8((const uint8_t *)str, len, JS_ATOM_TYPE_STRING); h &= JS_ATOM_HASH_MASK; h1 = h & (rt->atom_hash_size - 1); i = rt->atom_hash[h1]; while (i != 0) { p = rt->atom_array[i]; if (p->hash == h && p->atom_type == JS_ATOM_TYPE_STRING && p->len == len && p->is_wide_char == 0 && memcmp(p->u.str8, str, len) == 0) { if (!__JS_AtomIsConst(i)) p->header.ref_count++; return i; } i = p->hash_next; } return JS_ATOM_NULL; }
O2
c
_JS_FindAtom: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 pushq $0x1 popq %rdx movq %rsi, %rdi movq %rbx, %rsi callq 0x34631 movl %eax, %ebp movl 0x50(%r15), %r13d decl %r13d andl %eax, %r13d andl $0x3fffffff, %ebp # imm = 0x3FFFFFFF shll $0x2, %r13d addq 0x60(%r15), %r13 movl (%r13), %r12d testq %r12, %r12 je 0x1a2d8 movq 0x68(%r15), %rax movq (%rax,%r12,8), %r13 movq 0x4(%r13), %rax testl %eax, %eax js 0x1a2c5 movl %eax, %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF cmpq %rbx, %rcx jne 0x1a2c5 movq %rax, %rcx movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000 andq %rdx, %rcx movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000 cmpq %rdx, %rcx jne 0x1a2c5 shrq $0x20, %rax andl $0x3fffffff, %eax # imm = 0x3FFFFFFF cmpl %ebp, %eax jne 0x1a2c5 leaq 0x18(%r13), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0xe6c0 testl %eax, %eax je 0x1a2cb addq $0xc, %r13 jmp 0x1a260 cmpl $0xe0, %r12d jl 0x1a2d8 incl (%r13) movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
__JS_FindAtom: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r15, rdi push 1 pop rdx mov rdi, rsi mov rsi, rbx call hash_string8 mov ebp, eax mov r13d, [r15+50h] dec r13d and r13d, eax and ebp, 3FFFFFFFh shl r13d, 2 add r13, [r15+60h] loc_1A260: mov r12d, [r13+0] test r12, r12 jz short loc_1A2D8 mov rax, [r15+68h] mov r13, [rax+r12*8] mov rax, [r13+4] test eax, eax js short loc_1A2C5 mov ecx, eax and ecx, 7FFFFFFFh cmp rcx, rbx jnz short loc_1A2C5 mov rcx, rax mov rdx, 0C000000000000000h and rcx, rdx mov rdx, 4000000000000000h cmp rcx, rdx jnz short loc_1A2C5 shr rax, 20h and eax, 3FFFFFFFh cmp eax, ebp jnz short loc_1A2C5 lea rdi, [r13+18h] mov rsi, r14 mov rdx, rbx call _bcmp test eax, eax jz short loc_1A2CB loc_1A2C5: add r13, 0Ch jmp short loc_1A260 loc_1A2CB: cmp r12d, 0E0h jl short loc_1A2D8 inc dword ptr [r13+0] loc_1A2D8: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long _JS_FindAtom(long long a1, long long a2, long long a3) { int v4; // eax int v5; // ebp _DWORD *i; // r13 long long v7; // r12 long long v8; // r13 long long v9; // rax v4 = hash_string8(a2, a3, 1LL); v5 = v4 & 0x3FFFFFFF; for ( i = (_DWORD *)(*(_QWORD *)(a1 + 96) + 4 * (v4 & (unsigned int)(*(_DWORD *)(a1 + 80) - 1))); ; i = (_DWORD *)(v8 + 12) ) { v7 = (unsigned int)*i; if ( !*i ) break; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8 * v7); v9 = *(_QWORD *)(v8 + 4); if ( (int)v9 >= 0 && (*(_QWORD *)(v8 + 4) & 0x7FFFFFFFLL) == a3 && (v9 & 0xC000000000000000LL) == 0x4000000000000000LL && (HIDWORD(v9) & 0x3FFFFFFF) == v5 && !(unsigned int)bcmp(v8 + 24, a2, a3, 0x4000000000000000LL) ) { if ( (int)v7 >= 224 ) ++*(_DWORD *)v8; return (unsigned int)v7; } } return (unsigned int)v7; }
__JS_FindAtom: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15,RDI PUSH 0x1 POP RDX MOV RDI,RSI MOV RSI,RBX CALL 0x00134631 MOV EBP,EAX MOV R13D,dword ptr [R15 + 0x50] DEC R13D AND R13D,EAX AND EBP,0x3fffffff SHL R13D,0x2 ADD R13,qword ptr [R15 + 0x60] LAB_0011a260: MOV R12D,dword ptr [R13] TEST R12,R12 JZ 0x0011a2d8 MOV RAX,qword ptr [R15 + 0x68] MOV R13,qword ptr [RAX + R12*0x8] MOV RAX,qword ptr [R13 + 0x4] TEST EAX,EAX JS 0x0011a2c5 MOV ECX,EAX AND ECX,0x7fffffff CMP RCX,RBX JNZ 0x0011a2c5 MOV RCX,RAX MOV RDX,-0x4000000000000000 AND RCX,RDX MOV RDX,0x4000000000000000 CMP RCX,RDX JNZ 0x0011a2c5 SHR RAX,0x20 AND EAX,0x3fffffff CMP EAX,EBP JNZ 0x0011a2c5 LEA RDI,[R13 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0010e6c0 TEST EAX,EAX JZ 0x0011a2cb LAB_0011a2c5: ADD R13,0xc JMP 0x0011a260 LAB_0011a2cb: CMP R12D,0xe0 JL 0x0011a2d8 INC dword ptr [R13] LAB_0011a2d8: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong __JS_FindAtom(long param_1,void *param_2,size_t param_3) { uint uVar1; int *piVar2; ulong uVar3; uint uVar4; int iVar5; ulong uVar6; uint *puVar7; uVar4 = hash_string8(param_2,param_3,1); puVar7 = (uint *)((ulong)((*(int *)(param_1 + 0x50) - 1U & uVar4) << 2) + *(long *)(param_1 + 0x60)); while( true ) { uVar1 = *puVar7; uVar6 = (ulong)uVar1; if (uVar6 == 0) { return 0; } piVar2 = *(int **)(*(long *)(param_1 + 0x68) + uVar6 * 8); uVar3 = *(ulong *)(piVar2 + 1); if ((((-1 < (int)(uint)uVar3) && (((uint)uVar3 & 0x7fffffff) == param_3)) && ((uVar3 & 0xc000000000000000) == 0x4000000000000000)) && ((((uint)(uVar3 >> 0x20) & 0x3fffffff) == (uVar4 & 0x3fffffff) && (iVar5 = bcmp(piVar2 + 6,param_2,param_3), iVar5 == 0)))) break; puVar7 = (uint *)(piVar2 + 3); } if ((int)uVar1 < 0xe0) { return uVar6; } *piVar2 = *piVar2 + 1; return uVar6; }
39,701
Binary_string::strrstr(Binary_string const&, unsigned int)
eloqsql/sql/sql_string.cc
int Binary_string::strrstr(const Binary_string &s, uint32 offset) { if (s.length() <= offset && offset <= str_length) { if (!s.length()) return offset; // Empty string is always found const char *str = Ptr+offset-1; const char *search=s.ptr()+s.length()-1; const char *end=Ptr+s.length()-2; const char *search_end=s.ptr()-1; skip: while (str != end) { if (*str-- == *search) { char *i,*j; i=(char*) str; j=(char*) search-1; while (j != search_end) if (*i-- != *j--) goto skip; return (int) (i-Ptr) +1; } } } return -1; }
O0
cpp
Binary_string::strrstr(Binary_string const&, unsigned int): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rdi callq 0x261d0 cmpl -0x1c(%rbp), %eax ja 0x28930 movq -0x58(%rbp), %rcx movl -0x1c(%rbp), %eax cmpl 0x8(%rcx), %eax ja 0x28930 movq -0x18(%rbp), %rdi callq 0x261d0 cmpl $0x0, %eax jne 0x28826 movl -0x1c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x28937 movq -0x58(%rbp), %rax movq (%rax), %rax movl -0x1c(%rbp), %ecx addq %rcx, %rax addq $-0x1, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0x265c0 movq %rax, -0x68(%rbp) movq -0x18(%rbp), %rdi callq 0x261d0 movq -0x68(%rbp), %rcx movl %eax, %edx movq -0x58(%rbp), %rax movl %edx, %edx addq %rdx, %rcx addq $-0x1, %rcx movq %rcx, -0x30(%rbp) movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x18(%rbp), %rdi callq 0x261d0 movl %eax, %ecx movq -0x60(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax addq $-0x2, %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rdi callq 0x265c0 addq $-0x1, %rax movq %rax, -0x40(%rbp) jmp 0x2889e movq -0x28(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x2892e movq -0x28(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x28(%rbp) movsbl (%rax), %eax movq -0x30(%rbp), %rcx movsbl (%rcx), %ecx cmpl %ecx, %eax jne 0x28929 movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x30(%rbp), %rax addq $-0x1, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax cmpq -0x40(%rbp), %rax je 0x28913 movq -0x48(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x48(%rbp) movsbl (%rax), %eax movq -0x50(%rbp), %rcx movq %rcx, %rdx addq $-0x1, %rdx movq %rdx, -0x50(%rbp) movsbl (%rcx), %ecx cmpl %ecx, %eax je 0x28911 jmp 0x2889c jmp 0x288dd movq -0x58(%rbp), %rcx movq -0x48(%rbp), %rax movq (%rcx), %rcx subq %rcx, %rax addl $0x1, %eax movl %eax, -0x4(%rbp) jmp 0x28937 jmp 0x2889e jmp 0x28930 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x70, %rsp popq %rbp retq
_ZN13Binary_string7strrstrERKS_j: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] mov [rbp+var_58], rax mov rdi, [rbp+var_18]; this call _ZNK13Binary_string6lengthEv; Binary_string::length(void) cmp eax, [rbp+var_1C] ja loc_28930 mov rcx, [rbp+var_58] mov eax, [rbp+var_1C] cmp eax, [rcx+8] ja loc_28930 mov rdi, [rbp+var_18]; this call _ZNK13Binary_string6lengthEv; Binary_string::length(void) cmp eax, 0 jnz short loc_28826 mov eax, [rbp+var_1C] mov [rbp+var_4], eax jmp loc_28937 loc_28826: mov rax, [rbp+var_58] mov rax, [rax] mov ecx, [rbp+var_1C] add rax, rcx add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_28], rax mov rdi, [rbp+var_18]; this call _ZNK13Binary_string3ptrEv; Binary_string::ptr(void) mov [rbp+var_68], rax mov rdi, [rbp+var_18]; this call _ZNK13Binary_string6lengthEv; Binary_string::length(void) mov rcx, [rbp+var_68] mov edx, eax mov rax, [rbp+var_58] mov edx, edx add rcx, rdx add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_30], rcx mov rax, [rax] mov [rbp+var_60], rax mov rdi, [rbp+var_18]; this call _ZNK13Binary_string6lengthEv; Binary_string::length(void) mov ecx, eax mov rax, [rbp+var_60] mov ecx, ecx add rax, rcx add rax, 0FFFFFFFFFFFFFFFEh mov [rbp+var_38], rax mov rdi, [rbp+var_18]; this call _ZNK13Binary_string3ptrEv; Binary_string::ptr(void) add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_40], rax loc_2889C: jmp short $+2 loc_2889E: mov rax, [rbp+var_28] cmp rax, [rbp+var_38] jz loc_2892E mov rax, [rbp+var_28] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_28], rcx movsx eax, byte ptr [rax] mov rcx, [rbp+var_30] movsx ecx, byte ptr [rcx] cmp eax, ecx jnz short loc_28929 mov rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_30] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_50], rax loc_288DD: mov rax, [rbp+var_50] cmp rax, [rbp+var_40] jz short loc_28913 mov rax, [rbp+var_48] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_48], rcx movsx eax, byte ptr [rax] mov rcx, [rbp+var_50] mov rdx, rcx add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_50], rdx movsx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_28911 jmp short loc_2889C loc_28911: jmp short loc_288DD loc_28913: mov rcx, [rbp+var_58] mov rax, [rbp+var_48] mov rcx, [rcx] sub rax, rcx add eax, 1 mov [rbp+var_4], eax jmp short loc_28937 loc_28929: jmp loc_2889E loc_2892E: jmp short $+2 loc_28930: mov [rbp+var_4], 0FFFFFFFFh loc_28937: mov eax, [rbp+var_4] add rsp, 70h pop rbp retn
long long Binary_string::strrstr(Binary_string *this, const Binary_string *a2, unsigned int a3) { char *v3; // rax char *v4; // rax char *v5; // rcx long long v7; // [rsp+8h] [rbp-68h] long long v8; // [rsp+10h] [rbp-60h] char *v9; // [rsp+20h] [rbp-50h] char *v10; // [rsp+28h] [rbp-48h] long long v11; // [rsp+30h] [rbp-40h] long long v12; // [rsp+38h] [rbp-38h] char *v13; // [rsp+40h] [rbp-30h] long long v14; // [rsp+48h] [rbp-28h] if ( (unsigned int)Binary_string::length(a2) > a3 || a3 > *((_DWORD *)this + 2) ) return (unsigned int)-1; if ( (unsigned int)Binary_string::length(a2) ) { v14 = a3 + *(_QWORD *)this - 1LL; v7 = Binary_string::ptr(a2); v13 = (char *)((unsigned int)Binary_string::length(a2) + v7 - 1); v8 = *(_QWORD *)this; v12 = (unsigned int)Binary_string::length(a2) + v8 - 2; v11 = Binary_string::ptr(a2) - 1; LABEL_6: while ( v14 != v12 ) { v3 = (char *)v14--; if ( *v3 == *v13 ) { v10 = (char *)v14; v9 = v13 - 1; while ( v9 != (char *)v11 ) { v4 = v10--; v5 = v9--; if ( *v4 != *v5 ) goto LABEL_6; } return (unsigned int)((_DWORD)v10 - *(_QWORD *)this + 1); } } return (unsigned int)-1; } return a3; }
strrstr: PUSH RBP MOV RBP,RSP SUB RSP,0x70 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 qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001261d0 CMP EAX,dword ptr [RBP + -0x1c] JA 0x00128930 MOV RCX,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RCX + 0x8] JA 0x00128930 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001261d0 CMP EAX,0x0 JNZ 0x00128826 MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00128937 LAB_00128826: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x1c] ADD RAX,RCX ADD RAX,-0x1 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001265c0 MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001261d0 MOV RCX,qword ptr [RBP + -0x68] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x58] MOV EDX,EDX ADD RCX,RDX ADD RCX,-0x1 MOV qword ptr [RBP + -0x30],RCX MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001261d0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,ECX ADD RAX,RCX ADD RAX,-0x2 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001265c0 ADD RAX,-0x1 MOV qword ptr [RBP + -0x40],RAX LAB_0012889c: JMP 0x0012889e LAB_0012889e: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0012892e MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x28],RCX MOVSX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] MOVSX ECX,byte ptr [RCX] CMP EAX,ECX JNZ 0x00128929 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,-0x1 MOV qword ptr [RBP + -0x50],RAX LAB_001288dd: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x40] JZ 0x00128913 MOV RAX,qword ptr [RBP + -0x48] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x48],RCX MOVSX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x50] MOV RDX,RCX ADD RDX,-0x1 MOV qword ptr [RBP + -0x50],RDX MOVSX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x00128911 JMP 0x0012889c LAB_00128911: JMP 0x001288dd LAB_00128913: MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RCX] SUB RAX,RCX ADD EAX,0x1 MOV dword ptr [RBP + -0x4],EAX JMP 0x00128937 LAB_00128929: JMP 0x0012889e LAB_0012892e: JMP 0x00128930 LAB_00128930: MOV dword ptr [RBP + -0x4],0xffffffff LAB_00128937: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x70 POP RBP RET
/* Binary_string::strrstr(Binary_string const&, unsigned int) */ uint __thiscall Binary_string::strrstr(Binary_string *this,Binary_string *param_1,uint param_2) { char cVar1; char cVar2; long lVar3; long lVar4; uint uVar5; int iVar6; uint uVar7; long lVar8; long lVar9; char *local_58; char *local_50; char *local_30; uVar5 = length(param_1); if ((uVar5 <= param_2) && (param_2 <= *(uint *)(this + 8))) { iVar6 = length(param_1); if (iVar6 == 0) { return param_2; } lVar3 = *(long *)this; lVar8 = ptr(param_1); uVar5 = length(param_1); lVar4 = *(long *)this; uVar7 = length(param_1); lVar9 = ptr(param_1); local_30 = (char *)(lVar3 + (ulong)param_2 + -1); while (local_30 != (char *)(lVar4 + (ulong)uVar7 + -2)) { local_50 = local_30 + -1; cVar1 = *local_30; local_30 = local_50; if (cVar1 == *(char *)(lVar8 + (ulong)uVar5 + -1)) { local_58 = (char *)(lVar8 + (ulong)uVar5 + -2); do { if (local_58 == (char *)(lVar9 + -1)) { return ((int)local_50 - (int)*(int8 *)this) + 1; } cVar1 = *local_50; cVar2 = *local_58; local_58 = local_58 + -1; local_50 = local_50 + -1; } while (cVar1 == cVar2); } } } return 0xffffffff; }
39,702
link_to_file_list
eloqsql/storage/maria/ma_pagecache.c
static void link_to_file_list(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block, PAGECACHE_FILE *file, my_bool unlink_flag) { if (unlink_flag) unlink_changed(block); link_changed(block, &pagecache->file_blocks[FILE_HASH(*file, pagecache)]); if (block->status & PCBLOCK_CHANGED) { block->status&= ~(PCBLOCK_CHANGED | PCBLOCK_DEL_WRITE); block->rec_lsn= LSN_MAX; pagecache->blocks_changed--; pagecache->global_blocks_changed--; } }
O0
c
link_to_file_list: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movb %cl, %al movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movb %al, -0x19(%rbp) cmpb $0x0, -0x19(%rbp) je 0x30c98 movq -0x10(%rbp), %rdi callq 0x30e60 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movq 0x130(%rax), %rsi movq -0x18(%rbp), %rax movl 0x10(%rax), %eax movq -0x8(%rbp), %rcx movq 0x28(%rcx), %rcx subq $0x1, %rcx andq %rcx, %rax shlq $0x3, %rax addq %rax, %rsi callq 0x30f60 movq -0x10(%rbp), %rax movzwl 0x74(%rax), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x30d26 movq -0x10(%rbp), %rax movzwl 0x74(%rax), %ecx andl $0xffffff5f, %ecx # imm = 0xFFFFFF5F movw %cx, 0x74(%rax) movq -0x10(%rbp), %rax movabsq $0xffffffffffffff, %rcx # imm = 0xFFFFFFFFFFFFFF movq %rcx, 0x88(%rax) movq -0x8(%rbp), %rax movq 0x58(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x58(%rax) movq -0x8(%rbp), %rax movq 0x168(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x168(%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax)
link_to_file_list: push rbp mov rbp, rsp sub rsp, 20h mov al, cl mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_19], al cmp [rbp+var_19], 0 jz short loc_30C98 mov rdi, [rbp+var_10] call unlink_changed loc_30C98: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov rsi, [rax+130h] mov rax, [rbp+var_18] mov eax, [rax+10h] mov rcx, [rbp+var_8] mov rcx, [rcx+28h] sub rcx, 1 and rax, rcx shl rax, 3 add rsi, rax call link_changed mov rax, [rbp+var_10] movzx eax, word ptr [rax+74h] and eax, 20h cmp eax, 0 jz short loc_30D26 mov rax, [rbp+var_10] movzx ecx, word ptr [rax+74h] and ecx, 0FFFFFF5Fh mov [rax+74h], cx mov rax, [rbp+var_10] mov rcx, 0FFFFFFFFFFFFFFh mov [rax+88h], rcx mov rax, [rbp+var_8] mov rcx, [rax+58h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+58h], rcx mov rax, [rbp+var_8] mov rcx, [rax+168h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+168h], rcx loc_30D26: add rsp, 20h pop rbp retn
_QWORD * link_to_file_list(_QWORD *a1, long long a2, long long a3, char a4) { _QWORD *result; // rax if ( a4 ) unlink_changed(a2); link_changed(a2, 8 * ((a1[5] - 1LL) & *(unsigned int *)(a3 + 16)) + a1[38]); result = (_QWORD *)(*(_WORD *)(a2 + 116) & 0x20); if ( (_DWORD)result ) { *(_WORD *)(a2 + 116) &= 0xFF5Fu; *(_QWORD *)(a2 + 136) = 0xFFFFFFFFFFFFFFLL; --a1[11]; result = a1; --a1[45]; } return result; }
link_to_file_list: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV AL,CL MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV byte ptr [RBP + -0x19],AL CMP byte ptr [RBP + -0x19],0x0 JZ 0x00130c98 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00130e60 LAB_00130c98: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x130] MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x28] SUB RCX,0x1 AND RAX,RCX SHL RAX,0x3 ADD RSI,RAX CALL 0x00130f60 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,word ptr [RAX + 0x74] AND EAX,0x20 CMP EAX,0x0 JZ 0x00130d26 MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,word ptr [RAX + 0x74] AND ECX,0xffffff5f MOV word ptr [RAX + 0x74],CX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,0xffffffffffffff MOV qword ptr [RAX + 0x88],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x58] ADD RCX,-0x1 MOV qword ptr [RAX + 0x58],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x168] ADD RCX,-0x1 MOV qword ptr [RAX + 0x168],RCX LAB_00130d26: ADD RSP,0x20 POP RBP RET
void link_to_file_list(long param_1,long param_2,long param_3,char param_4) { if (param_4 != '\0') { unlink_changed(param_2); } link_changed(param_2,*(long *)(param_1 + 0x130) + ((ulong)*(uint *)(param_3 + 0x10) & *(long *)(param_1 + 0x28) - 1U) * 8); if ((*(ushort *)(param_2 + 0x74) & 0x20) != 0) { *(ushort *)(param_2 + 0x74) = *(ushort *)(param_2 + 0x74) & 0xff5f; *(int8 *)(param_2 + 0x88) = 0xffffffffffffff; *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + -1; *(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + -1; } return; }
39,703
my_mb_wc_euc_kr
eloqsql/strings/ctype-euc_kr.c
static int my_mb_wc_euc_kr(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) { pwc[0]=hi; return 1; } if (s+2>e) return MY_CS_TOOSMALL2; if (!IS_MB2_CHAR(hi, s[1])) return MY_CS_ILSEQ; if (!(pwc[0]=func_ksc5601_uni_onechar((hi<<8)+s[1]))) return -2; return 2; }
O3
c
my_mb_wc_euc_kr: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x38f4d movsbq (%rdx), %rdi testq %rdi, %rdi js 0x38f0c movq %rdi, (%rsi) movl $0x1, %eax retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0x38f4d movzbl %dil, %ecx xorl %eax, %eax cmpl $0x80, %ecx je 0x38f4d cmpl $0xff, %ecx je 0x38f4d movzbl 0x1(%rdx), %edx leal 0x1(%rdx), %edi cmpb $-0x7f, %dil ja 0x38f4e movl %edx, %edi andb $-0x21, %dil addb $-0x5b, %dil cmpb $-0x1a, %dil jae 0x38f4e retq pushq %rbp movq %rsp, %rbp shll $0x8, %ecx leal (%rcx,%rdx), %eax addl $0xffff7ebf, %eax # imm = 0xFFFF7EBF cmpl $0x47bd, %eax # imm = 0x47BD ja 0x38f6f movl %eax, %eax leaq 0x89993(%rip), %rcx # 0xc2900 jmp 0x38f88 orl %edx, %ecx addl $0xffff355f, %ecx # imm = 0xFFFF355F cmpl $0x335e, %ecx # imm = 0x335E jae 0x38fa1 movl %ecx, %eax leaq 0x928f8(%rip), %rcx # 0xcb880 leaq (%rcx,%rax,2), %rax movzwl (%rax), %eax movzwl %ax, %ecx movq %rcx, (%rsi) movl $0x2, %eax testw %cx, %cx jne 0x38fad jmp 0x38fa8 movq $0x0, (%rsi) movl $0xfffffffe, %eax # imm = 0xFFFFFFFE popq %rbp retq
my_mb_wc_euc_kr: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_38F4D movsx rdi, byte ptr [rdx] test rdi, rdi js short loc_38F0C mov [rsi], rdi mov eax, 1 retn loc_38F0C: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short locret_38F4D movzx ecx, dil xor eax, eax cmp ecx, 80h jz short locret_38F4D cmp ecx, 0FFh jz short locret_38F4D movzx edx, byte ptr [rdx+1] lea edi, [rdx+1] cmp dil, 81h ja short loc_38F4E mov edi, edx and dil, 0DFh add dil, 0A5h cmp dil, 0E6h jnb short loc_38F4E locret_38F4D: retn loc_38F4E: push rbp mov rbp, rsp shl ecx, 8 lea eax, [rcx+rdx] add eax, 0FFFF7EBFh cmp eax, 47BDh ja short loc_38F6F mov eax, eax lea rcx, tab_ksc5601_uni0 jmp short loc_38F88 loc_38F6F: or ecx, edx add ecx, 0FFFF355Fh cmp ecx, 335Eh jnb short loc_38FA1 mov eax, ecx lea rcx, tab_ksc5601_uni1 loc_38F88: lea rax, [rcx+rax*2] movzx eax, word ptr [rax] movzx ecx, ax mov [rsi], rcx mov eax, 2 test cx, cx jnz short loc_38FAD jmp short loc_38FA8 loc_38FA1: mov qword ptr [rsi], 0 loc_38FA8: mov eax, 0FFFFFFFEh loc_38FAD: pop rbp retn
long long my_mb_wc_euc_kr(long long a1, long long *a2, char *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi int v6; // edx int v7; // ecx long long v8; // rax unsigned __int16 *v9; // rcx unsigned int v10; // ecx long long v11; // rcx result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( v5 >= 0 ) { *a2 = v5; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { result = 0LL; if ( (unsigned __int8)v5 != 128 && (unsigned __int8)v5 != 255 ) { v6 = (unsigned __int8)a3[1]; if ( (unsigned __int8)(v6 + 1) > 0x81u || (unsigned __int8)((v6 & 0xDF) - 91) >= 0xE6u ) { v7 = (unsigned __int8)v5 << 8; LODWORD(v8) = v7 + v6 - 33089; if ( (unsigned int)v8 > 0x47BD ) { v10 = (v6 | v7) - 51873; if ( v10 >= 0x335E ) { *a2 = 0LL; return 4294967294LL; } v8 = v10; v9 = (unsigned __int16 *)&tab_ksc5601_uni1; } else { v8 = (unsigned int)v8; v9 = (unsigned __int16 *)&tab_ksc5601_uni0; } v11 = v9[v8]; *a2 = v11; result = 2LL; if ( (_WORD)v11 ) return result; return 4294967294LL; } } } } return result; }
my_mb_wc_euc_kr: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00138f4d MOVSX RDI,byte ptr [RDX] TEST RDI,RDI JS 0x00138f0c MOV qword ptr [RSI],RDI MOV EAX,0x1 RET LAB_00138f0c: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x00138f4d MOVZX ECX,DIL XOR EAX,EAX CMP ECX,0x80 JZ 0x00138f4d CMP ECX,0xff JZ 0x00138f4d MOVZX EDX,byte ptr [RDX + 0x1] LEA EDI,[RDX + 0x1] CMP DIL,0x81 JA 0x00138f4e MOV EDI,EDX AND DIL,0xdf ADD DIL,0xa5 CMP DIL,0xe6 JNC 0x00138f4e LAB_00138f4d: RET LAB_00138f4e: PUSH RBP MOV RBP,RSP SHL ECX,0x8 LEA EAX,[RCX + RDX*0x1] ADD EAX,0xffff7ebf CMP EAX,0x47bd JA 0x00138f6f MOV EAX,EAX LEA RCX,[0x1c2900] JMP 0x00138f88 LAB_00138f6f: OR ECX,EDX ADD ECX,0xffff355f CMP ECX,0x335e JNC 0x00138fa1 MOV EAX,ECX LEA RCX,[0x1cb880] LAB_00138f88: LEA RAX,[RCX + RAX*0x2] MOVZX EAX,word ptr [RAX] MOVZX ECX,AX MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST CX,CX JNZ 0x00138fad JMP 0x00138fa8 LAB_00138fa1: MOV qword ptr [RSI],0x0 LAB_00138fa8: MOV EAX,0xfffffffe LAB_00138fad: POP RBP RET
int8 my_mb_wc_euc_kr(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; ushort uVar3; uint uVar4; int1 *puVar5; if (param_4 <= param_3) { return 0xffffff9b; } bVar1 = *param_3; if (-1 < (long)(char)bVar1) { *param_2 = (long)(char)bVar1; return 1; } if (param_4 < param_3 + 2) { return 0xffffff9a; } if (bVar1 == 0x80) { return 0; } if (bVar1 == 0xff) { return 0; } bVar2 = param_3[1]; if (((byte)(bVar2 + 1) < 0x82) && ((byte)((bVar2 & 0xdf) + 0xa5) < 0xe6)) { return 0; } uVar4 = ((uint)bVar1 * 0x100 + (uint)bVar2) - 0x8141; if (uVar4 < 0x47be) { puVar5 = tab_ksc5601_uni0; } else { uVar4 = CONCAT11(bVar1,bVar2) - 0xcaa1; if (0x335d < uVar4) { *param_2 = 0; return 0xfffffffe; } puVar5 = tab_ksc5601_uni1; } uVar3 = *(ushort *)(puVar5 + (ulong)uVar4 * 2); *param_2 = (ulong)uVar3; if (uVar3 == 0) { return 0xfffffffe; } return 2; }
39,704
ft_init_nlq_search
eloqsql/storage/myisam/ft_nlq_search.c
FT_INFO *ft_init_nlq_search(MI_INFO *info, uint keynr, uchar *query, uint query_len, uint flags, uchar *record) { TREE wtree; ALL_IN_ONE aio; FT_DOC *dptr; FT_INFO *dlist=NULL; my_off_t saved_lastpos=info->lastpos; struct st_mysql_ftparser *parser; MYSQL_FTPARSER_PARAM *ftparser_param; DBUG_ENTER("ft_init_nlq_search"); /* black magic ON */ if ((int) (keynr = _mi_check_index(info,keynr)) < 0) DBUG_RETURN(NULL); if (_mi_readinfo(info,F_RDLCK,1)) DBUG_RETURN(NULL); /* black magic OFF */ aio.info=info; aio.keynr=keynr; aio.charset=info->s->keyinfo[keynr].seg->charset; aio.keybuff=info->lastkey+info->s->base.max_key_length; parser= info->s->keyinfo[keynr].parser; if (! (ftparser_param= ftparser_call_initializer(info, keynr, 0))) goto err; bzero(&wtree,sizeof(wtree)); init_tree(&aio.dtree,0,0,sizeof(FT_SUPERDOC),(qsort_cmp2)&FT_SUPERDOC_cmp, NULL, NULL, MYF(0)); ft_parse_init(&wtree, aio.charset); ftparser_param->flags= 0; if (ft_parse(&wtree, query, query_len, parser, ftparser_param, &wtree.mem_root)) goto err; if (tree_walk(&wtree, (tree_walk_action)&walk_and_match, &aio, left_root_right)) goto err; if (flags & FT_EXPAND && ft_query_expansion_limit) { QUEUE best; init_queue(&best,ft_query_expansion_limit,0,0, (queue_compare) &FT_DOC_cmp, 0, 0, 0); tree_walk(&aio.dtree, (tree_walk_action) &walk_and_push, &best, left_root_right); while (best.elements) { my_off_t docid= ((FT_DOC *)queue_remove_top(&best))->dpos; if (!(*info->read_record)(info,docid,record)) { info->update|= HA_STATE_AKTIV; ftparser_param->flags= MYSQL_FTFLAGS_NEED_COPY; if (unlikely(_mi_ft_parse(&wtree, info, keynr, record, ftparser_param, &wtree.mem_root))) { delete_queue(&best); goto err; } } } delete_queue(&best); reset_tree(&aio.dtree); if (tree_walk(&wtree, (tree_walk_action)&walk_and_match, &aio, left_root_right)) goto err; } /* If ndocs == 0, this will not allocate RAM for FT_INFO.doc[], so if ndocs == 0, FT_INFO.doc[] must not be accessed. */ dlist=(FT_INFO *)my_malloc(mi_key_memory_FT_INFO, sizeof(FT_INFO)+ sizeof(FT_DOC)* (int)(aio.dtree.elements_in_tree-1), MYF(0)); if (!dlist) goto err; dlist->please= (struct _ft_vft *) & _ft_vft_nlq; dlist->ndocs=aio.dtree.elements_in_tree; dlist->curdoc=-1; dlist->info=aio.info; dptr=dlist->doc; tree_walk(&aio.dtree, (tree_walk_action) &walk_and_copy, &dptr, left_root_right); if (flags & FT_SORTED) my_qsort2(dlist->doc, dlist->ndocs, sizeof(FT_DOC), (qsort2_cmp)&FT_DOC_cmp, 0); err: delete_tree(&aio.dtree, 0); delete_tree(&wtree, 0); info->lastpos=saved_lastpos; DBUG_RETURN(dlist); }
O3
c
ft_init_nlq_search: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x5b8, %rsp # imm = 0x5B8 movq %r9, -0x50(%rbp) movl %r8d, -0x2c(%rbp) movl %ecx, %r12d movq %rdx, %r15 movq %rdi, %rbx movq 0x170(%rdi), %r14 callq 0x84028 testl %eax, %eax js 0x72e9c movl %eax, %r13d movq %r14, -0x48(%rbp) xorl %r14d, %r14d movq %rbx, %rdi xorl %esi, %esi movl $0x1, %edx callq 0x7c823 testl %eax, %eax jne 0x72f67 movq %rbx, -0x338(%rbp) movl %r13d, -0x330(%rbp) movq (%rbx), %rax movq 0x218(%rax), %rcx movl %r13d, %edx imulq $0x70, %rdx, %rdx movq 0x28(%rcx,%rdx), %rsi movq (%rsi), %rsi movq %rsi, -0x328(%rbp) movl 0x194(%rax), %eax addq 0x108(%rbx), %rax movq %rax, -0x320(%rbp) movq 0x38(%rcx,%rdx), %rax movq %rax, -0x40(%rbp) xorl %r14d, %r14d movq %rbx, %rdi movl %r13d, %esi xorl %edx, %edx callq 0x73f1d testq %rax, %rax je 0x72f40 leaq -0x5d0(%rbp), %rdi xorl %r14d, %r14d movl $0x298, %edx # imm = 0x298 xorl %esi, %esi movq %rax, -0x38(%rbp) callq 0x292c0 leaq -0x318(%rbp), %rdi xorps %xmm0, %xmm0 movups %xmm0, (%rsp) leaq 0x275(%rip), %r8 # 0x72f8a xorl %esi, %esi xorl %edx, %edx movl $0x20, %ecx xorl %r9d, %r9d callq 0xa4640 leaq -0x318(%rbp), %rax movq -0x10(%rax), %rsi leaq -0x5d0(%rbp), %rdi callq 0x73d0e movq -0x38(%rbp), %rax movl $0x0, 0x34(%rax) leaq -0x398(%rbp), %r9 leaq -0x5d0(%rbp), %rdi movq %r15, %rsi movq %rax, %r15 movl %r12d, %edx movq -0x40(%rbp), %rcx movq %rax, %r8 callq 0x73d5e testl %eax, %eax jne 0x72f40 leaq 0x229(%rip), %rsi # 0x72fa3 leaq -0x5d0(%rbp), %rdi leaq -0x338(%rbp), %rdx xorl %r14d, %r14d xorl %ecx, %ecx callq 0xa52cf testl %eax, %eax jne 0x72f40 movl -0x2c(%rbp), %eax shrb $0x2, %al leaq 0x311449(%rip), %rcx # 0x3841f0 movq (%rcx), %rsi testq %rsi, %rsi setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x72ea4 xorl %r12d, %r12d movl %r12d, 0x8(%rsp) movl %r12d, (%rsp) leaq 0x77a(%rip), %r8 # 0x73548 leaq -0x80(%rbp), %r14 movq %r14, %rdi xorl %edx, %edx xorl %ecx, %ecx xorl %r9d, %r9d callq 0xa2050 leaq 0x78d(%rip), %rsi # 0x73575 leaq -0x318(%rbp), %rdi movq %r14, %rdx xorl %ecx, %ecx callq 0xa52cf cmpl %r12d, 0x10(%r14) movq -0x50(%rbp), %r12 je 0x72e5f movq %r14, %rdi movl $0x1, %esi callq 0xa22a2 movq (%rax), %rsi movq %rbx, %rdi movq %r12, %rdx callq *0x140(%rbx) testl %eax, %eax jne 0x72e59 orb $0x2, 0x1d0(%rbx) movq %r15, %r8 movl $0x1, 0x34(%r15) leaq -0x5d0(%rbp), %rdi movq %rbx, %rsi movl %r13d, %edx movq %r12, %rcx leaq -0x398(%rbp), %r9 callq 0x7419a testl %eax, %eax jne 0x72f7c cmpl $0x0, -0x70(%rbp) jne 0x72e03 leaq -0x80(%rbp), %rdi callq 0xa2178 leaq -0x318(%rbp), %rdi callq 0xa4841 leaq 0x128(%rip), %rsi # 0x72fa3 leaq -0x5d0(%rbp), %rdi leaq -0x338(%rbp), %rdx xorl %ecx, %ecx callq 0xa52cf testl %eax, %eax je 0x72ea4 xorl %r14d, %r14d jmp 0x72f40 xorl %r14d, %r14d jmp 0x72f67 leaq 0xb8cad5(%rip), %rax # 0xbff980 movl (%rax), %edi movl -0x10c(%rbp), %eax decl %eax movslq %eax, %rsi shlq $0x4, %rsi addq $0x28, %rsi xorl %r14d, %r14d xorl %edx, %edx callq 0x9fdb1 testq %rax, %rax leaq -0x318(%rbp), %rdi je 0x72f40 movq %rax, %r15 leaq 0x308530(%rip), %rax # 0x37b410 movq %rax, (%r15) movl -0x10c(%rbp), %eax movl %eax, 0x10(%r15) movl $0xffffffff, 0x14(%r15) # imm = 0xFFFFFFFF movq -0x338(%rbp), %rax movq %rax, 0x8(%r15) movq %r15, %r14 addq $0x18, %r14 leaq -0x80(%rbp), %rdx movq %r14, (%rdx) leaq 0x6a3(%rip), %rsi # 0x735b8 xorl %ecx, %ecx callq 0xa52cf testb $0x2, -0x2c(%rbp) je 0x72f3d movslq 0x10(%r15), %rsi leaq 0x61b(%rip), %rcx # 0x73548 movl $0x10, %edx movq %r14, %rdi xorl %r8d, %r8d callq 0x9bf30 movq %r15, %r14 leaq -0x318(%rbp), %rdi xorl %esi, %esi callq 0xa476a leaq -0x5d0(%rbp), %rdi xorl %esi, %esi callq 0xa476a movq -0x48(%rbp), %rax movq %rax, 0x170(%rbx) movq %r14, %rax addq $0x5b8, %rsp # imm = 0x5B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq -0x80(%rbp), %rdi callq 0xa2178 jmp 0x72e94
ft_init_nlq_search: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 5B8h mov [rbp+var_50], r9 mov [rbp+var_2C], r8d mov r12d, ecx mov r15, rdx mov rbx, rdi mov r14, [rdi+170h] call _mi_check_index test eax, eax js loc_72E9C mov r13d, eax mov [rbp+var_48], r14 xor r14d, r14d mov rdi, rbx xor esi, esi mov edx, 1 call _mi_readinfo test eax, eax jnz loc_72F67 mov [rbp+var_338], rbx mov [rbp+var_330], r13d mov rax, [rbx] mov rcx, [rax+218h] mov edx, r13d imul rdx, 70h ; 'p' mov rsi, [rcx+rdx+28h] mov rsi, [rsi] mov [rbp+var_328], rsi mov eax, [rax+194h] add rax, [rbx+108h] mov [rbp+var_320], rax mov rax, [rcx+rdx+38h] mov [rbp+var_40], rax xor r14d, r14d mov rdi, rbx mov esi, r13d xor edx, edx call ftparser_call_initializer test rax, rax jz loc_72F40 lea rdi, [rbp+var_5D0] xor r14d, r14d mov edx, 298h xor esi, esi mov [rbp+var_38], rax call _memset lea rdi, [rbp+var_318] xorps xmm0, xmm0 movups [rsp+5E0h+var_5E0], xmm0 lea r8, FT_SUPERDOC_cmp xor esi, esi xor edx, edx mov ecx, 20h ; ' ' xor r9d, r9d call init_tree lea rax, [rbp+var_318] mov rsi, [rax-10h] lea rdi, [rbp+var_5D0] call ft_parse_init mov rax, [rbp+var_38] mov dword ptr [rax+34h], 0 lea r9, [rbp+var_398] lea rdi, [rbp+var_5D0] mov rsi, r15 mov r15, rax mov edx, r12d mov rcx, [rbp+var_40] mov r8, rax call ft_parse test eax, eax jnz loc_72F40 lea rsi, walk_and_match lea rdi, [rbp+var_5D0] lea rdx, [rbp+var_338] xor r14d, r14d xor ecx, ecx call tree_walk test eax, eax jnz loc_72F40 mov eax, [rbp+var_2C] shr al, 2 lea rcx, ft_query_expansion_limit mov rsi, [rcx] test rsi, rsi setnz cl and cl, al cmp cl, 1 jnz loc_72EA4 xor r12d, r12d mov dword ptr [rsp+5E0h+var_5E0+8], r12d mov dword ptr [rsp+5E0h+var_5E0], r12d lea r8, FT_DOC_cmp lea r14, [rbp+var_80] mov rdi, r14 xor edx, edx xor ecx, ecx xor r9d, r9d call init_queue lea rsi, walk_and_push lea rdi, [rbp+var_318] mov rdx, r14 xor ecx, ecx call tree_walk cmp [r14+10h], r12d mov r12, [rbp+var_50] jz short loc_72E5F loc_72E03: mov rdi, r14 mov esi, 1 call queue_remove mov rsi, [rax] mov rdi, rbx mov rdx, r12 call qword ptr [rbx+140h] test eax, eax jnz short loc_72E59 or byte ptr [rbx+1D0h], 2 mov r8, r15 mov dword ptr [r15+34h], 1 lea rdi, [rbp+var_5D0] mov rsi, rbx mov edx, r13d mov rcx, r12 lea r9, [rbp+var_398] call _mi_ft_parse test eax, eax jnz loc_72F7C loc_72E59: cmp [rbp+var_70], 0 jnz short loc_72E03 loc_72E5F: lea rdi, [rbp+var_80] call delete_queue lea rdi, [rbp+var_318] call reset_tree lea rsi, walk_and_match lea rdi, [rbp+var_5D0] lea rdx, [rbp+var_338] xor ecx, ecx call tree_walk test eax, eax jz short loc_72EA4 loc_72E94: xor r14d, r14d jmp loc_72F40 loc_72E9C: xor r14d, r14d jmp loc_72F67 loc_72EA4: lea rax, mi_key_memory_FT_INFO mov edi, [rax] mov eax, [rbp+var_10C] dec eax movsxd rsi, eax shl rsi, 4 add rsi, 28h ; '(' xor r14d, r14d xor edx, edx call my_malloc test rax, rax lea rdi, [rbp+var_318] jz short loc_72F40 mov r15, rax lea rax, _ft_vft_nlq mov [r15], rax mov eax, [rbp+var_10C] mov [r15+10h], eax mov dword ptr [r15+14h], 0FFFFFFFFh mov rax, [rbp+var_338] mov [r15+8], rax mov r14, r15 add r14, 18h lea rdx, [rbp+var_80] mov [rdx], r14 lea rsi, walk_and_copy_0 xor ecx, ecx call tree_walk test byte ptr [rbp+var_2C], 2 jz short loc_72F3D movsxd rsi, dword ptr [r15+10h] lea rcx, FT_DOC_cmp mov edx, 10h mov rdi, r14 xor r8d, r8d call my_qsort2 loc_72F3D: mov r14, r15 loc_72F40: lea rdi, [rbp+var_318] xor esi, esi call delete_tree lea rdi, [rbp+var_5D0] xor esi, esi call delete_tree mov rax, [rbp+var_48] mov [rbx+170h], rax loc_72F67: mov rax, r14 add rsp, 5B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_72F7C: lea rdi, [rbp+var_80] call delete_queue jmp loc_72E94
long long ft_init_nlq_search( long long *a1, long long a2, long long a3, unsigned int a4, int a5, long long a6, double a7) { long long v9; // r14 int v10; // eax unsigned int v11; // r13d long long v12; // r14 long long v13; // rax long long v14; // rcx long long v15; // rdx long long v16; // rax long long v17; // rax long long v18; // rsi long long v19; // r15 long long v20; // r12 _QWORD *v21; // rax long long v22; // rax long long v23; // r15 _BYTE v25[568]; // [rsp+10h] [rbp-5D0h] BYREF _BYTE v26[96]; // [rsp+248h] [rbp-398h] BYREF long long *v27; // [rsp+2A8h] [rbp-338h] BYREF unsigned int v28; // [rsp+2B0h] [rbp-330h] long long v29; // [rsp+2B8h] [rbp-328h] long long v30; // [rsp+2C0h] [rbp-320h] _BYTE v31[524]; // [rsp+2C8h] [rbp-318h] BYREF int v32; // [rsp+4D4h] [rbp-10Ch] _QWORD v33[2]; // [rsp+560h] [rbp-80h] BYREF int v34; // [rsp+570h] [rbp-70h] long long v35; // [rsp+590h] [rbp-50h] long long v36; // [rsp+598h] [rbp-48h] long long v37; // [rsp+5A0h] [rbp-40h] long long v38; // [rsp+5A8h] [rbp-38h] int v39; // [rsp+5B4h] [rbp-2Ch] v35 = a6; v39 = a5; v9 = a1[46]; v10 = mi_check_index(a1, a2); if ( v10 < 0 ) return 0LL; v11 = v10; v36 = v9; v12 = 0LL; if ( !(unsigned int)mi_readinfo(a1, 0LL, 1LL) ) { v27 = a1; v28 = v11; v13 = *a1; v14 = *(_QWORD *)(*a1 + 536); v15 = 112LL * v11; v29 = **(_QWORD **)(v14 + v15 + 40); v30 = a1[33] + *(unsigned int *)(v13 + 404); v37 = *(_QWORD *)(v14 + v15 + 56); v12 = 0LL; v16 = ftparser_call_initializer(a1, v11, 0LL, a7); if ( !v16 ) goto LABEL_18; v12 = 0LL; v38 = v16; memset(v25, 0LL, 664LL); init_tree((unsigned int)v31, 0, 0, 32, (unsigned int)FT_SUPERDOC_cmp, 0, 0LL, 0LL); ft_parse_init(v25, v29); v17 = v38; *(_DWORD *)(v38 + 52) = 0; v18 = a3; v19 = v17; if ( (unsigned int)ft_parse(v25, v18, a4, v37, v17, v26) ) goto LABEL_18; v12 = 0LL; if ( (unsigned int)tree_walk(v25, walk_and_match, &v27, 0LL) ) goto LABEL_18; if ( (((unsigned __int8)v39 >> 2) & (ft_query_expansion_limit != 0LL)) == 1 ) { init_queue((unsigned int)v33, ft_query_expansion_limit, 0, 0, (unsigned int)FT_DOC_cmp, 0, 0, 0); tree_walk(v31, walk_and_push, v33, 0LL); v20 = v35; if ( v34 ) { while ( 1 ) { v21 = (_QWORD *)queue_remove(v33, 1LL); if ( !((unsigned int ( *)(long long *, _QWORD, long long))a1[40])(a1, *v21, v20) ) { *((_BYTE *)a1 + 464) |= 2u; *(_DWORD *)(v19 + 52) = 1; if ( (unsigned int)mi_ft_parse(v25, a1, v11, v20, v19, v26) ) break; } if ( !v34 ) goto LABEL_11; } delete_queue(v33); goto LABEL_12; } LABEL_11: delete_queue(v33); reset_tree(v31); if ( (unsigned int)tree_walk(v25, walk_and_match, &v27, 0LL) ) { LABEL_12: v12 = 0LL; LABEL_18: delete_tree(v31, 0LL); delete_tree(v25, 0LL); a1[46] = v36; return v12; } } v12 = 0LL; v22 = my_malloc(mi_key_memory_FT_INFO, 16LL * (v32 - 1) + 40, 0LL); if ( v22 ) { v23 = v22; *(_QWORD *)v22 = ft_vft_nlq; *(_DWORD *)(v22 + 16) = v32; *(_DWORD *)(v22 + 20) = -1; *(_QWORD *)(v22 + 8) = v27; v33[0] = v22 + 24; tree_walk(v31, walk_and_copy_0, v33, 0LL); if ( (v39 & 2) != 0 ) my_qsort2(v23 + 24, *(int *)(v23 + 16), 16LL, FT_DOC_cmp, 0LL); v12 = v23; } goto LABEL_18; } return v12; }
ft_init_nlq_search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x5b8 MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [RBP + -0x2c],R8D MOV R12D,ECX MOV R15,RDX MOV RBX,RDI MOV R14,qword ptr [RDI + 0x170] CALL 0x00184028 TEST EAX,EAX JS 0x00172e9c MOV R13D,EAX MOV qword ptr [RBP + -0x48],R14 XOR R14D,R14D MOV RDI,RBX XOR ESI,ESI MOV EDX,0x1 CALL 0x0017c823 TEST EAX,EAX JNZ 0x00172f67 MOV qword ptr [RBP + -0x338],RBX MOV dword ptr [RBP + -0x330],R13D MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RAX + 0x218] MOV EDX,R13D IMUL RDX,RDX,0x70 MOV RSI,qword ptr [RCX + RDX*0x1 + 0x28] MOV RSI,qword ptr [RSI] MOV qword ptr [RBP + -0x328],RSI MOV EAX,dword ptr [RAX + 0x194] ADD RAX,qword ptr [RBX + 0x108] MOV qword ptr [RBP + -0x320],RAX MOV RAX,qword ptr [RCX + RDX*0x1 + 0x38] MOV qword ptr [RBP + -0x40],RAX XOR R14D,R14D MOV RDI,RBX MOV ESI,R13D XOR EDX,EDX CALL 0x00173f1d TEST RAX,RAX JZ 0x00172f40 LEA RDI,[RBP + -0x5d0] XOR R14D,R14D MOV EDX,0x298 XOR ESI,ESI MOV qword ptr [RBP + -0x38],RAX CALL 0x001292c0 LEA RDI,[RBP + -0x318] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP],XMM0 LEA R8,[0x172f8a] XOR ESI,ESI XOR EDX,EDX MOV ECX,0x20 XOR R9D,R9D CALL 0x001a4640 LEA RAX,[RBP + -0x318] MOV RSI,qword ptr [RAX + -0x10] LEA RDI,[RBP + -0x5d0] CALL 0x00173d0e MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x34],0x0 LEA R9,[RBP + -0x398] LEA RDI,[RBP + -0x5d0] MOV RSI,R15 MOV R15,RAX MOV EDX,R12D MOV RCX,qword ptr [RBP + -0x40] MOV R8,RAX CALL 0x00173d5e TEST EAX,EAX JNZ 0x00172f40 LEA RSI,[0x172fa3] LEA RDI,[RBP + -0x5d0] LEA RDX,[RBP + -0x338] XOR R14D,R14D XOR ECX,ECX CALL 0x001a52cf TEST EAX,EAX JNZ 0x00172f40 MOV EAX,dword ptr [RBP + -0x2c] SHR AL,0x2 LEA RCX,[0x4841f0] MOV RSI,qword ptr [RCX] TEST RSI,RSI SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x00172ea4 XOR R12D,R12D MOV dword ptr [RSP + 0x8],R12D MOV dword ptr [RSP],R12D LEA R8,[0x173548] LEA R14,[RBP + -0x80] MOV RDI,R14 XOR EDX,EDX XOR ECX,ECX XOR R9D,R9D CALL 0x001a2050 LEA RSI,[0x173575] LEA RDI,[RBP + -0x318] MOV RDX,R14 XOR ECX,ECX CALL 0x001a52cf CMP dword ptr [R14 + 0x10],R12D MOV R12,qword ptr [RBP + -0x50] JZ 0x00172e5f LAB_00172e03: MOV RDI,R14 MOV ESI,0x1 CALL 0x001a22a2 MOV RSI,qword ptr [RAX] MOV RDI,RBX MOV RDX,R12 CALL qword ptr [RBX + 0x140] TEST EAX,EAX JNZ 0x00172e59 OR byte ptr [RBX + 0x1d0],0x2 MOV R8,R15 MOV dword ptr [R15 + 0x34],0x1 LEA RDI,[RBP + -0x5d0] MOV RSI,RBX MOV EDX,R13D MOV RCX,R12 LEA R9,[RBP + -0x398] CALL 0x0017419a TEST EAX,EAX JNZ 0x00172f7c LAB_00172e59: CMP dword ptr [RBP + -0x70],0x0 JNZ 0x00172e03 LAB_00172e5f: LEA RDI,[RBP + -0x80] CALL 0x001a2178 LEA RDI,[RBP + -0x318] CALL 0x001a4841 LEA RSI,[0x172fa3] LEA RDI,[RBP + -0x5d0] LEA RDX,[RBP + -0x338] XOR ECX,ECX CALL 0x001a52cf TEST EAX,EAX JZ 0x00172ea4 LAB_00172e94: XOR R14D,R14D JMP 0x00172f40 LAB_00172e9c: XOR R14D,R14D JMP 0x00172f67 LAB_00172ea4: LEA RAX,[0xcff980] MOV EDI,dword ptr [RAX] MOV EAX,dword ptr [RBP + -0x10c] DEC EAX MOVSXD RSI,EAX SHL RSI,0x4 ADD RSI,0x28 XOR R14D,R14D XOR EDX,EDX CALL 0x0019fdb1 TEST RAX,RAX LEA RDI,[RBP + -0x318] JZ 0x00172f40 MOV R15,RAX LEA RAX,[0x47b410] MOV qword ptr [R15],RAX MOV EAX,dword ptr [RBP + -0x10c] MOV dword ptr [R15 + 0x10],EAX MOV dword ptr [R15 + 0x14],0xffffffff MOV RAX,qword ptr [RBP + -0x338] MOV qword ptr [R15 + 0x8],RAX MOV R14,R15 ADD R14,0x18 LEA RDX,[RBP + -0x80] MOV qword ptr [RDX],R14 LEA RSI,[0x1735b8] XOR ECX,ECX CALL 0x001a52cf TEST byte ptr [RBP + -0x2c],0x2 JZ 0x00172f3d MOVSXD RSI,dword ptr [R15 + 0x10] LEA RCX,[0x173548] MOV EDX,0x10 MOV RDI,R14 XOR R8D,R8D CALL 0x0019bf30 LAB_00172f3d: MOV R14,R15 LAB_00172f40: LEA RDI,[RBP + -0x318] XOR ESI,ESI CALL 0x001a476a LEA RDI,[RBP + -0x5d0] XOR ESI,ESI CALL 0x001a476a MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBX + 0x170],RAX LAB_00172f67: MOV RAX,R14 ADD RSP,0x5b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00172f7c: LEA RDI,[RBP + -0x80] CALL 0x001a2178 JMP 0x00172e94
int8 * ft_init_nlq_search(long *param_1,int8 param_2,int8 param_3,int4 param_4, uint param_5,int8 param_6) { int8 uVar1; uint uVar2; int iVar3; long lVar4; int8 *puVar5; int8 *puVar6; ulong uVar7; ulong uVar8; int1 local_5d8 [568]; int1 local_3a0 [96]; long *local_340; uint local_338; int8 local_330; long local_328; int1 local_320 [524]; int local_114; int8 *local_88 [2]; int local_78; int8 local_58; long local_50; int8 local_48; long local_40; uint local_34; lVar4 = param_1[0x2e]; local_58 = param_6; local_34 = param_5; uVar2 = _mi_check_index(); if ((int)uVar2 < 0) { puVar5 = (int8 *)0x0; } else { puVar5 = (int8 *)0x0; local_50 = lVar4; iVar3 = _mi_readinfo(param_1,0,1); if (iVar3 == 0) { lVar4 = *(long *)(*param_1 + 0x218); local_330 = **(int8 **)(lVar4 + 0x28 + (ulong)uVar2 * 0x70); local_328 = (ulong)*(uint *)(*param_1 + 0x194) + param_1[0x21]; local_48 = *(int8 *)(lVar4 + 0x38 + (ulong)uVar2 * 0x70); local_340 = param_1; local_338 = uVar2; lVar4 = ftparser_call_initializer(param_1,uVar2,0); puVar5 = (int8 *)0x0; if (lVar4 != 0) { local_40 = lVar4; memset(local_5d8,0,0x298); uVar7 = 0; uVar8 = 0; init_tree(local_320,0,0,0x20,FT_SUPERDOC_cmp,0,0,0); ft_parse_init(local_5d8,local_330); lVar4 = local_40; *(int4 *)(local_40 + 0x34) = 0; iVar3 = ft_parse(local_5d8,param_3,param_4,local_48,local_40,local_3a0); puVar5 = (int8 *)0x0; if (iVar3 == 0) { iVar3 = tree_walk(local_5d8,walk_and_match,&local_340,0); puVar5 = (int8 *)0x0; if (iVar3 == 0) { if ((ft_query_expansion_limit != 0 & (byte)local_34 >> 2) == 1) { init_queue(local_88,ft_query_expansion_limit,0,0,FT_DOC_cmp,0, uVar7 & 0xffffffff00000000,uVar8 & 0xffffffff00000000); tree_walk(local_320,walk_and_push,local_88,0); uVar1 = local_58; do { do { if (local_78 == 0) { delete_queue(local_88); reset_tree(local_320); iVar3 = tree_walk(local_5d8,walk_and_match,&local_340,0); if (iVar3 == 0) goto LAB_00172ea4; goto LAB_00172e94; } puVar5 = (int8 *)queue_remove(local_88,1); iVar3 = (*(code *)param_1[0x28])(param_1,*puVar5,uVar1); } while (iVar3 != 0); *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2; *(int4 *)(lVar4 + 0x34) = 1; iVar3 = _mi_ft_parse(local_5d8,param_1,uVar2,uVar1,lVar4,local_3a0); } while (iVar3 == 0); delete_queue(local_88); LAB_00172e94: puVar5 = (int8 *)0x0; } else { LAB_00172ea4: puVar6 = (int8 *) my_malloc(mi_key_memory_FT_INFO,(long)(local_114 + -1) * 0x10 + 0x28,0); puVar5 = (int8 *)0x0; if (puVar6 != (int8 *)0x0) { *puVar6 = _ft_vft_nlq; *(int *)(puVar6 + 2) = local_114; *(int4 *)((long)puVar6 + 0x14) = 0xffffffff; puVar6[1] = local_340; local_88[0] = puVar6 + 3; tree_walk(local_320,walk_and_copy,local_88,0); puVar5 = puVar6; if ((local_34 & 2) != 0) { my_qsort2(puVar6 + 3,(long)*(int *)(puVar6 + 2),0x10,FT_DOC_cmp,0); } } } } } } delete_tree(local_320,0); delete_tree(local_5d8,0); param_1[0x2e] = local_50; } } return puVar5; }
39,705
partitioned_key_cache_insert
eloqsql/mysys/mf_keycache.c
static int partitioned_key_cache_insert(PARTITIONED_KEY_CACHE_CB *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length) { uint w_length; uint offset= (uint) (filepos % keycache->key_cache_block_size); DBUG_ENTER("partitioned_key_cache_insert"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file,(ulong) filepos, length)); /* Write data in key_cache_block_size increments */ do { SIMPLE_KEY_CACHE_CB *partition= get_key_cache_partition(keycache, file, filepos); w_length= length; set_if_smaller(w_length, keycache->key_cache_block_size - offset); if (simple_key_cache_insert((void *) partition, file, filepos, level, buff, w_length)) DBUG_RETURN(1); filepos+= w_length; buff+= w_length; offset = 0; } while ((length-= w_length)); DBUG_RETURN(0); }
O0
c
partitioned_key_cache_insert: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movq -0x20(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x18(%rcx), %ecx xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x3c(%rbp) jmp 0xe7be5 jmp 0xe7be7 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx callq 0xe8110 movq %rax, -0x48(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax movq -0x10(%rbp), %rcx movl 0x18(%rcx), %ecx subl -0x3c(%rbp), %ecx cmpl %ecx, %eax jbe 0xe7c1f movq -0x10(%rbp), %rax movl 0x18(%rax), %eax subl -0x3c(%rbp), %eax movl %eax, -0x38(%rbp) jmp 0xe7c21 movq -0x48(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movq -0x30(%rbp), %r8 movl -0x38(%rbp), %r9d callq 0xe5af0 cmpl $0x0, %eax je 0xe7c4c jmp 0xe7c43 movl $0x1, -0x4(%rbp) jmp 0xe7c8b movl -0x38(%rbp), %eax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movl -0x38(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movl $0x0, -0x3c(%rbp) movl -0x38(%rbp), %ecx movl -0x34(%rbp), %eax subl %ecx, %eax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jne 0xe7be7 jmp 0xe7c84 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
partitioned_key_cache_insert: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov rax, [rbp+var_20] mov rcx, [rbp+var_10] mov ecx, [rcx+18h] xor edx, edx div rcx mov eax, edx mov [rbp+var_3C], eax jmp short $+2 loc_E7BE5: jmp short $+2 loc_E7BE7: mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] call get_key_cache_partition mov [rbp+var_48], rax mov eax, [rbp+var_34] mov [rbp+var_38], eax mov eax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+18h] sub ecx, [rbp+var_3C] cmp eax, ecx jbe short loc_E7C1F mov rax, [rbp+var_10] mov eax, [rax+18h] sub eax, [rbp+var_3C] mov [rbp+var_38], eax loc_E7C1F: jmp short $+2 loc_E7C21: mov rdi, [rbp+var_48] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8, [rbp+var_30] mov r9d, [rbp+var_38] call simple_key_cache_insert cmp eax, 0 jz short loc_E7C4C jmp short $+2 loc_E7C43: mov [rbp+var_4], 1 jmp short loc_E7C8B loc_E7C4C: mov eax, [rbp+var_38] add rax, [rbp+var_20] mov [rbp+var_20], rax mov ecx, [rbp+var_38] mov rax, [rbp+var_30] mov ecx, ecx add rax, rcx mov [rbp+var_30], rax mov [rbp+var_3C], 0 mov ecx, [rbp+var_38] mov eax, [rbp+var_34] sub eax, ecx mov [rbp+var_34], eax cmp eax, 0 jnz loc_E7BE7 jmp short $+2 loc_E7C84: mov [rbp+var_4], 0 loc_E7C8B: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long partitioned_key_cache_insert( long long a1, unsigned int a2, unsigned long long a3, int a4, long long a5, unsigned int a6) { _QWORD *key_cache_partition; // [rsp+8h] [rbp-48h] int v8; // [rsp+14h] [rbp-3Ch] unsigned int v9; // [rsp+18h] [rbp-38h] unsigned long long v13; // [rsp+30h] [rbp-20h] v13 = a3; v8 = a3 % *(unsigned int *)(a1 + 24); do { key_cache_partition = (_QWORD *)get_key_cache_partition(a1, a2, v13); v9 = a6; if ( a6 > *(_DWORD *)(a1 + 24) - v8 ) v9 = *(_DWORD *)(a1 + 24) - v8; if ( (unsigned int)simple_key_cache_insert(key_cache_partition, a2, v13, a4, a5, v9) ) return 1; v13 += v9; a5 += v9; v8 = 0; a6 -= v9; } while ( a6 ); return 0; }
partitioned_key_cache_insert: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x18] XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x3c],EAX JMP 0x001e7be5 LAB_001e7be5: JMP 0x001e7be7 LAB_001e7be7: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] CALL 0x001e8110 MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x38],EAX MOV EAX,dword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,dword ptr [RBP + -0x3c] CMP EAX,ECX JBE 0x001e7c1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] SUB EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x38],EAX LAB_001e7c1f: JMP 0x001e7c21 LAB_001e7c21: MOV RDI,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x38] CALL 0x001e5af0 CMP EAX,0x0 JZ 0x001e7c4c JMP 0x001e7c43 LAB_001e7c43: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001e7c8b LAB_001e7c4c: MOV EAX,dword ptr [RBP + -0x38] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x3c],0x0 MOV ECX,dword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x34] SUB EAX,ECX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JNZ 0x001e7be7 JMP 0x001e7c84 LAB_001e7c84: MOV dword ptr [RBP + -0x4],0x0 LAB_001e7c8b: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 partitioned_key_cache_insert (long param_1,int4 param_2,ulong param_3,int4 param_4,long param_5, uint param_6) { int iVar1; int8 uVar2; int local_44; uint local_40; uint local_3c; long local_38; ulong local_28; local_44 = (int)(param_3 % (ulong)*(uint *)(param_1 + 0x18)); local_3c = param_6; local_38 = param_5; local_28 = param_3; while( true ) { uVar2 = get_key_cache_partition(param_1,param_2,local_28); local_40 = local_3c; if ((uint)(*(int *)(param_1 + 0x18) - local_44) < local_3c) { local_40 = *(int *)(param_1 + 0x18) - local_44; } iVar1 = simple_key_cache_insert(uVar2,param_2,local_28,param_4,local_38,local_40); if (iVar1 != 0) break; local_28 = local_40 + local_28; local_38 = local_38 + (ulong)local_40; local_44 = 0; local_3c = local_3c - local_40; if (local_3c == 0) { return 0; } } return 1; }
39,706
partitioned_key_cache_insert
eloqsql/mysys/mf_keycache.c
static int partitioned_key_cache_insert(PARTITIONED_KEY_CACHE_CB *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length) { uint w_length; uint offset= (uint) (filepos % keycache->key_cache_block_size); DBUG_ENTER("partitioned_key_cache_insert"); DBUG_PRINT("enter", ("fd: %u pos: %lu length: %u", (uint) file,(ulong) filepos, length)); /* Write data in key_cache_block_size increments */ do { SIMPLE_KEY_CACHE_CB *partition= get_key_cache_partition(keycache, file, filepos); w_length= length; set_if_smaller(w_length, keycache->key_cache_block_size - offset); if (simple_key_cache_insert((void *) partition, file, filepos, level, buff, w_length)) DBUG_RETURN(1); filepos+= w_length; buff+= w_length; offset = 0; } while ((length-= w_length)); DBUG_RETURN(0); }
O3
c
partitioned_key_cache_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, %ebx movq %r8, %r14 movl %ecx, -0x2c(%rbp) movq %rdx, %r12 movq %rdi, %r13 movl 0x18(%rdi), %ecx movq %rdx, %rax xorl %edx, %edx divq %rcx movq %rdx, %rcx movslq %esi, %rax movq %rax, -0x38(%rbp) movl 0x18(%r13), %r15d movq %r12, %rax xorl %edx, %edx divq %r15 movq -0x38(%rbp), %rsi addq %rsi, %rax movl 0x1c(%r13), %edi xorl %edx, %edx divq %rdi movq 0x8(%r13), %rax movq (%rax,%rdx,8), %rdi subl %ecx, %r15d cmpl %r15d, %ebx cmovbl %ebx, %r15d movq %r12, %rdx movl -0x2c(%rbp), %ecx movq %r14, %r8 movl %r15d, %r9d callq 0x98d73 testl %eax, %eax jne 0x9a686 movl %r15d, %eax addq %rax, %r14 addq %rax, %r12 xorl %ecx, %ecx subl %r15d, %ebx jne 0x9a631 jmp 0x9a68b movl $0x1, %ecx movl %ecx, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
partitioned_key_cache_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebx, r9d mov r14, r8 mov [rbp+var_2C], ecx mov r12, rdx mov r13, rdi mov ecx, [rdi+18h] mov rax, rdx xor edx, edx div rcx mov rcx, rdx movsxd rax, esi mov [rbp+var_38], rax loc_9A631: mov r15d, [r13+18h] mov rax, r12 xor edx, edx div r15 mov rsi, [rbp+var_38] add rax, rsi mov edi, [r13+1Ch] xor edx, edx div rdi mov rax, [r13+8] mov rdi, [rax+rdx*8] sub r15d, ecx cmp ebx, r15d cmovb r15d, ebx mov rdx, r12 mov ecx, [rbp+var_2C] mov r8, r14 mov r9d, r15d call simple_key_cache_insert test eax, eax jnz short loc_9A686 mov eax, r15d add r14, rax add r12, rax xor ecx, ecx sub ebx, r15d jnz short loc_9A631 jmp short loc_9A68B loc_9A686: mov ecx, 1 loc_9A68B: mov eax, ecx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long partitioned_key_cache_insert( long long a1, signed int a2, unsigned long long a3, int a4, long long a5, unsigned int a6) { unsigned long long v8; // r12 unsigned long long v9; // rcx unsigned int v10; // r15d v8 = a3; v9 = a3 % *(unsigned int *)(a1 + 24); while ( 1 ) { v10 = *(_DWORD *)(a1 + 24) - v9; if ( a6 < v10 ) v10 = a6; if ( (unsigned int)simple_key_cache_insert( *(__m128i **)(*(_QWORD *)(a1 + 8) + 8 * ((a2 + v8 / *(unsigned int *)(a1 + 24)) % *(unsigned int *)(a1 + 28))), a2, v8, a4, a5, v10) ) break; a5 += v10; v8 += v10; LODWORD(v9) = 0; a6 -= v10; if ( !a6 ) return (unsigned int)v9; } LODWORD(v9) = 1; return (unsigned int)v9; }
partitioned_key_cache_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBX,R9D MOV R14,R8 MOV dword ptr [RBP + -0x2c],ECX MOV R12,RDX MOV R13,RDI MOV ECX,dword ptr [RDI + 0x18] MOV RAX,RDX XOR EDX,EDX DIV RCX MOV RCX,RDX MOVSXD RAX,ESI MOV qword ptr [RBP + -0x38],RAX LAB_0019a631: MOV R15D,dword ptr [R13 + 0x18] MOV RAX,R12 XOR EDX,EDX DIV R15 MOV RSI,qword ptr [RBP + -0x38] ADD RAX,RSI MOV EDI,dword ptr [R13 + 0x1c] XOR EDX,EDX DIV RDI MOV RAX,qword ptr [R13 + 0x8] MOV RDI,qword ptr [RAX + RDX*0x8] SUB R15D,ECX CMP EBX,R15D CMOVC R15D,EBX MOV RDX,R12 MOV ECX,dword ptr [RBP + -0x2c] MOV R8,R14 MOV R9D,R15D CALL 0x00198d73 TEST EAX,EAX JNZ 0x0019a686 MOV EAX,R15D ADD R14,RAX ADD R12,RAX XOR ECX,ECX SUB EBX,R15D JNZ 0x0019a631 JMP 0x0019a68b LAB_0019a686: MOV ECX,0x1 LAB_0019a68b: MOV EAX,ECX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 partitioned_key_cache_insert (long param_1,int param_2,ulong param_3,int4 param_4,long param_5,uint param_6) { int iVar1; ulong uVar2; uint uVar3; uVar2 = param_3 % (ulong)*(uint *)(param_1 + 0x18); while( true ) { uVar3 = *(uint *)(param_1 + 0x18) - (int)uVar2; if (param_6 < uVar3) { uVar3 = param_6; } iVar1 = simple_key_cache_insert (*(int8 *) (*(long *)(param_1 + 8) + ((param_3 / *(uint *)(param_1 + 0x18) + (long)param_2) % (ulong)*(uint *)(param_1 + 0x1c)) * 8),(long)param_2,param_3,param_4,param_5 ,uVar3); if (iVar1 != 0) break; param_5 = param_5 + (ulong)uVar3; param_3 = param_3 + uVar3; uVar2 = 0; param_6 = param_6 - uVar3; if (param_6 == 0) { return 0; } } return 1; }
39,707
peek_token
bluesky950520[P]quickjs/quickjs.c
static int peek_token(JSParseState *s, BOOL no_line_terminator) { const uint8_t *p = s->buf_ptr; return simple_next_token(&p, no_line_terminator); }
O2
c
peek_token: pushq %r15 pushq %r14 pushq %rbx movq 0x70(%rdi), %r15 pushq $0xa popq %rcx pushq $0x2f popq %rax movl $0x2401, %edx # imm = 0x2401 movq %r15, %r14 incq %r15 movzbl (%r14), %ebx leal -0xb(%rbx), %edi cmpl $0x2, %edi jb 0x50fd9 cmpl $0x9, %ebx je 0x50fd9 cmpl $0xa, %ebx je 0x51048 cmpl $0xd, %ebx je 0x51048 cmpl $0x20, %ebx je 0x50fd9 cmpl $0x2f, %ebx jne 0x51082 movzbl (%r15), %edi cmpl $0x2f, %edi je 0x5104e cmpl $0x2a, %edi jne 0x5107c addq $0x2, %r14 movq %r14, %r15 movzbl (%r15), %edi cmpl $0xd, %edi je 0x5103f testl %edi, %edi je 0x50fd9 testl %esi, %esi je 0x51030 cmpb $0xa, %dil je 0x5107a cmpb $0x2a, %dil jne 0x51043 cmpb $0x2f, 0x1(%r15) jne 0x51043 jmp 0x51071 testl %esi, %esi jne 0x5107a incq %r15 jmp 0x51019 testl %esi, %esi je 0x50fd9 jmp 0x5107a testl %esi, %esi jne 0x5107a movb $0x2f, %dil cmpb $0xd, %dil ja 0x51068 movzbl %dil, %edi btl %edi, %edx jb 0x50fd9 movb 0x1(%r15), %dil incq %r15 jmp 0x51055 addq $0x2, %r15 jmp 0x50fd9 movl %ecx, %eax popq %rbx popq %r14 popq %r15 retq cmpl $0x3d, %ebx jne 0x51096 cmpb $0x3e, (%r15) pushq $-0x5c popq %rcx pushq $0x3d popq %rax cmovel %ecx, %eax jmp 0x5107c movl %ebx, %edi callq 0x50cd1 testl %eax, %eax je 0x510fd leal -0x61(%rbx), %eax cmpl $0x8, %eax ja 0x51104 leaq 0x31b50(%rip), %rcx # 0x82c00 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax cmpb $0x77, (%r15) jne 0x51208 cmpb $0x61, 0x2(%r14) jne 0x51208 cmpb $0x69, 0x3(%r14) jne 0x51208 cmpb $0x74, 0x4(%r14) jne 0x51208 movzbl 0x5(%r14), %edi callq 0x50f1c testl %eax, %eax jne 0x51208 pushq $-0x28 jmp 0x5120a movl %ebx, %eax jmp 0x5107c cmpl $0x6f, %ebx jne 0x51208 cmpb $0x66, (%r15) jne 0x51208 movzbl 0x2(%r14), %edi callq 0x50f1c testl %eax, %eax jne 0x51208 pushq $-0x27 jmp 0x5120a cmpb $0x75, (%r15) jne 0x51208 cmpb $0x6e, 0x2(%r14) jne 0x51208 cmpb $0x63, 0x3(%r14) jne 0x51208 cmpb $0x74, 0x4(%r14) jne 0x51208 cmpb $0x69, 0x5(%r14) jne 0x51208 cmpb $0x6f, 0x6(%r14) jne 0x51208 cmpb $0x6e, 0x7(%r14) jne 0x51208 movzbl 0x8(%r14), %edi callq 0x50f1c testl %eax, %eax jne 0x51208 pushq $-0x3b jmp 0x5120a movb (%r15), %al cmpb $0x6e, %al jne 0x511a6 movzbl 0x2(%r14), %edi callq 0x50f1c testl %eax, %eax je 0x51210 movb (%r15), %al cmpb $0x6d, %al jne 0x51208 cmpb $0x70, 0x2(%r14) jne 0x51208 cmpb $0x6f, 0x3(%r14) jne 0x51208 cmpb $0x72, 0x4(%r14) jne 0x51208 cmpb $0x74, 0x5(%r14) jne 0x51208 movzbl 0x6(%r14), %edi callq 0x50f1c testl %eax, %eax jne 0x51208 pushq $-0x33 jmp 0x5120a cmpb $0x78, (%r15) jne 0x51208 cmpb $0x70, 0x2(%r14) jne 0x51208 cmpb $0x6f, 0x3(%r14) jne 0x51208 cmpb $0x72, 0x4(%r14) jne 0x51208 cmpb $0x74, 0x5(%r14) jne 0x51208 movzbl 0x6(%r14), %edi callq 0x50f1c testl %eax, %eax je 0x51214 pushq $-0x7d popq %rax jmp 0x5107c pushq $-0x49 jmp 0x5120a pushq $-0x35 jmp 0x5120a
peek_token: push r15 push r14 push rbx mov r15, [rdi+70h] push 0Ah pop rcx push 2Fh ; '/' pop rax mov edx, 2401h loc_50FD9: mov r14, r15 inc r15 movzx ebx, byte ptr [r14] lea edi, [rbx-0Bh] cmp edi, 2 jb short loc_50FD9 cmp ebx, 9 jz short loc_50FD9 cmp ebx, 0Ah jz short loc_51048 cmp ebx, 0Dh jz short loc_51048 cmp ebx, 20h ; ' ' jz short loc_50FD9 cmp ebx, 2Fh ; '/' jnz short loc_51082 movzx edi, byte ptr [r15] cmp edi, 2Fh ; '/' jz short loc_5104E cmp edi, 2Ah ; '*' jnz short loc_5107C add r14, 2 mov r15, r14 loc_51019: movzx edi, byte ptr [r15] cmp edi, 0Dh jz short loc_5103F test edi, edi jz short loc_50FD9 test esi, esi jz short loc_51030 cmp dil, 0Ah jz short loc_5107A loc_51030: cmp dil, 2Ah ; '*' jnz short loc_51043 cmp byte ptr [r15+1], 2Fh ; '/' jnz short loc_51043 jmp short loc_51071 loc_5103F: test esi, esi jnz short loc_5107A loc_51043: inc r15 jmp short loc_51019 loc_51048: test esi, esi jz short loc_50FD9 jmp short loc_5107A loc_5104E: test esi, esi jnz short loc_5107A mov dil, 2Fh ; '/' loc_51055: cmp dil, 0Dh ja short loc_51068 movzx edi, dil bt edx, edi jb loc_50FD9 loc_51068: mov dil, [r15+1] inc r15 jmp short loc_51055 loc_51071: add r15, 2 jmp loc_50FD9 loc_5107A: mov eax, ecx loc_5107C: pop rbx pop r14 pop r15 retn loc_51082: cmp ebx, 3Dh ; '=' jnz short loc_51096 cmp byte ptr [r15], 3Eh ; '>' push 0FFFFFFFFFFFFFFA4h pop rcx push 3Dh ; '=' pop rax cmovz eax, ecx jmp short loc_5107C loc_51096: mov edi, ebx call lre_js_is_ident_first test eax, eax jz short loc_510FD lea eax, [rbx-61h]; switch 9 cases cmp eax, 8 ja short def_510B7; jumptable 00000000000510B7 default case lea rcx, jpt_510B7 movsxd rax, ds:(jpt_510B7 - 82C00h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_510B9: cmp byte ptr [r15], 77h ; 'w'; jumptable 00000000000510B7 case 97 jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+2], 61h ; 'a' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+3], 69h ; 'i' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+4], 74h ; 't' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 movzx edi, byte ptr [r14+5] call lre_js_is_ident_next test eax, eax jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 push 0FFFFFFFFFFFFFFD8h jmp loc_5120A loc_510FD: mov eax, ebx jmp loc_5107C def_510B7: cmp ebx, 6Fh ; 'o'; jumptable 00000000000510B7 default case jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r15], 66h ; 'f' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 movzx edi, byte ptr [r14+2] call lre_js_is_ident_next test eax, eax jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 push 0FFFFFFFFFFFFFFD9h jmp loc_5120A loc_51130: cmp byte ptr [r15], 75h ; 'u'; jumptable 00000000000510B7 case 102 jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+2], 6Eh ; 'n' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+3], 63h ; 'c' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+4], 74h ; 't' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+5], 69h ; 'i' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+6], 6Fh ; 'o' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+7], 6Eh ; 'n' jnz loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 movzx edi, byte ptr [r14+8] call lre_js_is_ident_next test eax, eax jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 push 0FFFFFFFFFFFFFFC5h jmp short loc_5120A loc_5118E: mov al, [r15]; jumptable 00000000000510B7 case 105 cmp al, 6Eh ; 'n' jnz short loc_511A6 movzx edi, byte ptr [r14+2] call lre_js_is_ident_next test eax, eax jz short loc_51210 mov al, [r15] loc_511A6: cmp al, 6Dh ; 'm' jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+2], 70h ; 'p' jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+3], 6Fh ; 'o' jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+4], 72h ; 'r' jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+5], 74h ; 't' jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 movzx edi, byte ptr [r14+6] call lre_js_is_ident_next test eax, eax jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 push 0FFFFFFFFFFFFFFCDh jmp short loc_5120A loc_511D8: cmp byte ptr [r15], 78h ; 'x'; jumptable 00000000000510B7 case 101 jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+2], 70h ; 'p' jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+3], 6Fh ; 'o' jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+4], 72h ; 'r' jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 cmp byte ptr [r14+5], 74h ; 't' jnz short loc_51208; jumptable 00000000000510B7 cases 98-100,103,104 movzx edi, byte ptr [r14+6] call lre_js_is_ident_next test eax, eax jz short loc_51214 loc_51208: push 0FFFFFFFFFFFFFF83h; jumptable 00000000000510B7 cases 98-100,103,104 loc_5120A: pop rax jmp loc_5107C loc_51210: push 0FFFFFFFFFFFFFFB7h jmp short loc_5120A loc_51214: push 0FFFFFFFFFFFFFFCBh jmp short loc_5120A
long long peek_token(long long a1, int a2) { unsigned __int8 *j; // r15 long long result; // rax int v4; // edx unsigned __int8 *v5; // r14 unsigned int v6; // ebx int v7; // edi int v8; // edi unsigned __int8 i; // di unsigned __int8 v10; // al long long v11; // [rsp-8h] [rbp-20h] j = *(unsigned __int8 **)(a1 + 112); result = 47LL; v4 = 9217; while ( 1 ) { do { while ( 1 ) { do { do { LABEL_2: v5 = j++; v6 = *v5; } while ( v6 - 11 < 2 ); } while ( v6 == 9 ); if ( v6 != 10 && v6 != 13 ) break; if ( a2 ) return 10LL; } } while ( v6 == 32 ); if ( v6 != 47 ) break; v7 = *j; if ( v7 == 47 ) { if ( !a2 ) { for ( i = 47; i > 0xDu || !_bittest(&v4, i); i = *++j ) ; goto LABEL_2; } return 10LL; } if ( v7 != 42 ) return result; for ( j = v5 + 2; ; ++j ) { v8 = *j; if ( v8 == 13 ) { if ( a2 ) return 10LL; continue; } if ( !*j ) goto LABEL_2; if ( a2 && (_BYTE)v8 == 10 ) return 10LL; if ( (_BYTE)v8 == 42 && j[1] == 47 ) break; } j += 2; } if ( v6 == 61 ) { result = 61LL; if ( *j == 62 ) return 4294967204LL; } else if ( (unsigned int)lre_js_is_ident_first(*v5) ) { switch ( v6 ) { case 'a': if ( *j != 119 || v5[2] != 97 || v5[3] != 105 || v5[4] != 116 || (unsigned int)lre_js_is_ident_next(v5[5]) ) goto LABEL_71; return -40LL; case 'b': case 'c': case 'd': case 'g': case 'h': goto LABEL_71; case 'e': if ( *j != 120 || v5[2] != 112 || v5[3] != 111 || v5[4] != 114 || v5[5] != 116 || (unsigned int)lre_js_is_ident_next(v5[6]) ) { goto LABEL_71; } v11 = -53LL; break; case 'f': if ( *j != 117 || v5[2] != 110 || v5[3] != 99 || v5[4] != 116 || v5[5] != 105 || v5[6] != 111 || v5[7] != 110 || (unsigned int)lre_js_is_ident_next(v5[8]) ) { goto LABEL_71; } v11 = -59LL; break; case 'i': v10 = *j; if ( *j != 110 ) goto LABEL_58; if ( (unsigned int)lre_js_is_ident_next(v5[2]) ) { v10 = *j; LABEL_58: if ( v10 == 109 && v5[2] == 112 && v5[3] == 111 && v5[4] == 114 && v5[5] == 116 && !(unsigned int)lre_js_is_ident_next(v5[6]) ) { v11 = -51LL; } else { LABEL_71: v11 = -125LL; } } else { v11 = -73LL; } break; default: if ( v6 != 111 || *j != 102 || (unsigned int)lre_js_is_ident_next(v5[2]) ) goto LABEL_71; v11 = -39LL; break; } return v11; } else { return v6; } return result; }
peek_token: PUSH R15 PUSH R14 PUSH RBX MOV R15,qword ptr [RDI + 0x70] PUSH 0xa POP RCX PUSH 0x2f POP RAX MOV EDX,0x2401 LAB_00150fd9: MOV R14,R15 INC R15 MOVZX EBX,byte ptr [R14] LEA EDI,[RBX + -0xb] CMP EDI,0x2 JC 0x00150fd9 CMP EBX,0x9 JZ 0x00150fd9 CMP EBX,0xa JZ 0x00151048 CMP EBX,0xd JZ 0x00151048 CMP EBX,0x20 JZ 0x00150fd9 CMP EBX,0x2f JNZ 0x00151082 MOVZX EDI,byte ptr [R15] CMP EDI,0x2f JZ 0x0015104e CMP EDI,0x2a JNZ 0x0015107c ADD R14,0x2 MOV R15,R14 LAB_00151019: MOVZX EDI,byte ptr [R15] CMP EDI,0xd JZ 0x0015103f TEST EDI,EDI JZ 0x00150fd9 TEST ESI,ESI JZ 0x00151030 CMP DIL,0xa JZ 0x0015107a LAB_00151030: CMP DIL,0x2a JNZ 0x00151043 CMP byte ptr [R15 + 0x1],0x2f JNZ 0x00151043 JMP 0x00151071 LAB_0015103f: TEST ESI,ESI JNZ 0x0015107a LAB_00151043: INC R15 JMP 0x00151019 LAB_00151048: TEST ESI,ESI JZ 0x00150fd9 JMP 0x0015107a LAB_0015104e: TEST ESI,ESI JNZ 0x0015107a MOV DIL,0x2f LAB_00151055: CMP DIL,0xd JA 0x00151068 MOVZX EDI,DIL BT EDX,EDI JC 0x00150fd9 LAB_00151068: MOV DIL,byte ptr [R15 + 0x1] INC R15 JMP 0x00151055 LAB_00151071: ADD R15,0x2 JMP 0x00150fd9 LAB_0015107a: MOV EAX,ECX LAB_0015107c: POP RBX POP R14 POP R15 RET LAB_00151082: CMP EBX,0x3d JNZ 0x00151096 CMP byte ptr [R15],0x3e PUSH -0x5c POP RCX PUSH 0x3d POP RAX CMOVZ EAX,ECX JMP 0x0015107c LAB_00151096: MOV EDI,EBX CALL 0x00150cd1 TEST EAX,EAX JZ 0x001510fd LEA EAX,[RBX + -0x61] CMP EAX,0x8 JA 0x00151104 LEA RCX,[0x182c00] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_61: CMP byte ptr [R15],0x77 JNZ 0x00151208 CMP byte ptr [R14 + 0x2],0x61 JNZ 0x00151208 CMP byte ptr [R14 + 0x3],0x69 JNZ 0x00151208 CMP byte ptr [R14 + 0x4],0x74 JNZ 0x00151208 MOVZX EDI,byte ptr [R14 + 0x5] CALL 0x00150f1c TEST EAX,EAX JNZ 0x00151208 PUSH -0x28 JMP 0x0015120a LAB_001510fd: MOV EAX,EBX JMP 0x0015107c default: CMP EBX,0x6f JNZ 0x00151208 CMP byte ptr [R15],0x66 JNZ 0x00151208 MOVZX EDI,byte ptr [R14 + 0x2] CALL 0x00150f1c TEST EAX,EAX JNZ 0x00151208 PUSH -0x27 JMP 0x0015120a caseD_66: CMP byte ptr [R15],0x75 JNZ 0x00151208 CMP byte ptr [R14 + 0x2],0x6e JNZ 0x00151208 CMP byte ptr [R14 + 0x3],0x63 JNZ 0x00151208 CMP byte ptr [R14 + 0x4],0x74 JNZ 0x00151208 CMP byte ptr [R14 + 0x5],0x69 JNZ 0x00151208 CMP byte ptr [R14 + 0x6],0x6f JNZ 0x00151208 CMP byte ptr [R14 + 0x7],0x6e JNZ 0x00151208 MOVZX EDI,byte ptr [R14 + 0x8] CALL 0x00150f1c TEST EAX,EAX JNZ 0x00151208 PUSH -0x3b JMP 0x0015120a caseD_69: MOV AL,byte ptr [R15] CMP AL,0x6e JNZ 0x001511a6 MOVZX EDI,byte ptr [R14 + 0x2] CALL 0x00150f1c TEST EAX,EAX JZ 0x00151210 MOV AL,byte ptr [R15] LAB_001511a6: CMP AL,0x6d JNZ 0x00151208 CMP byte ptr [R14 + 0x2],0x70 JNZ 0x00151208 CMP byte ptr [R14 + 0x3],0x6f JNZ 0x00151208 CMP byte ptr [R14 + 0x4],0x72 JNZ 0x00151208 CMP byte ptr [R14 + 0x5],0x74 JNZ 0x00151208 MOVZX EDI,byte ptr [R14 + 0x6] CALL 0x00150f1c TEST EAX,EAX JNZ 0x00151208 PUSH -0x33 JMP 0x0015120a caseD_65: CMP byte ptr [R15],0x78 JNZ 0x00151208 CMP byte ptr [R14 + 0x2],0x70 JNZ 0x00151208 CMP byte ptr [R14 + 0x3],0x6f JNZ 0x00151208 CMP byte ptr [R14 + 0x4],0x72 JNZ 0x00151208 CMP byte ptr [R14 + 0x5],0x74 JNZ 0x00151208 MOVZX EDI,byte ptr [R14 + 0x6] CALL 0x00150f1c TEST EAX,EAX JZ 0x00151214 caseD_62: PUSH -0x7d LAB_0015120a: POP RAX JMP 0x0015107c LAB_00151210: PUSH -0x49 JMP 0x0015120a LAB_00151214: PUSH -0x35 JMP 0x0015120a
ulong peek_token(long param_1,int param_2) { ulong uVar1; int iVar2; uint uVar3; byte bVar4; byte *pbVar5; byte *pbVar6; pbVar6 = *(byte **)(param_1 + 0x70); LAB_00150fd9: do { do { while( true ) { do { do { pbVar5 = pbVar6; pbVar6 = pbVar5 + 1; bVar4 = *pbVar5; } while (bVar4 - 0xb < 2); } while (bVar4 == 9); if ((bVar4 != 10) && (bVar4 != 0xd)) break; if (param_2 != 0) { return 10; } } } while (bVar4 == 0x20); if (bVar4 != 0x2f) { if (bVar4 == 0x3d) { uVar1 = 0x3d; if (*pbVar6 == 0x3e) { uVar1 = 0xffffffffffffffa4; } return uVar1 & 0xffffffff; } uVar3 = (uint)bVar4; iVar2 = lre_js_is_ident_first(uVar3); if (iVar2 == 0) { return (ulong)uVar3; } switch(bVar4) { case 0x61: if (((*pbVar6 == 0x77) && (pbVar5[2] == 0x61)) && ((pbVar5[3] == 0x69 && ((pbVar5[4] == 0x74 && (iVar2 = lre_js_is_ident_next(pbVar5[5]), iVar2 == 0)))))) { return 0xffffffffffffffd8; } break; case 0x62: case 99: case 100: case 0x67: case 0x68: break; case 0x65: if (((((*pbVar6 == 0x78) && (pbVar5[2] == 0x70)) && (pbVar5[3] == 0x6f)) && ((pbVar5[4] == 0x72 && (pbVar5[5] == 0x74)))) && (iVar2 = lre_js_is_ident_next(pbVar5[6]), iVar2 == 0)) { return 0xffffffffffffffcb; } break; case 0x66: if (((((*pbVar6 == 0x75) && (pbVar5[2] == 0x6e)) && (pbVar5[3] == 99)) && ((pbVar5[4] == 0x74 && (pbVar5[5] == 0x69)))) && ((pbVar5[6] == 0x6f && ((pbVar5[7] == 0x6e && (iVar2 = lre_js_is_ident_next(pbVar5[8]), iVar2 == 0)))))) { return 0xffffffffffffffc5; } break; case 0x69: bVar4 = *pbVar6; if (bVar4 == 0x6e) { iVar2 = lre_js_is_ident_next(pbVar5[2]); if (iVar2 == 0) { return 0xffffffffffffffb7; } bVar4 = *pbVar6; } if ((((bVar4 == 0x6d) && (pbVar5[2] == 0x70)) && ((pbVar5[3] == 0x6f && ((pbVar5[4] == 0x72 && (pbVar5[5] == 0x74)))))) && (iVar2 = lre_js_is_ident_next(pbVar5[6]), iVar2 == 0)) { return 0xffffffffffffffcd; } break; default: if (((uVar3 == 0x6f) && (*pbVar6 == 0x66)) && (iVar2 = lre_js_is_ident_next(pbVar5[2]), iVar2 == 0)) { return 0xffffffffffffffd9; } } return 0xffffffffffffff83; } if (*pbVar6 != 0x2f) { if (*pbVar6 != 0x2a) { return 0x2f; } pbVar6 = pbVar5 + 2; do { bVar4 = *pbVar6; if (bVar4 == 0xd) { if (param_2 != 0) { return 10; } } else { if (bVar4 == 0) goto LAB_00150fd9; if ((param_2 != 0) && (bVar4 == 10)) { return 10; } if ((bVar4 == 0x2a) && (pbVar6[1] == 0x2f)) goto LAB_00151071; } pbVar6 = pbVar6 + 1; } while( true ); } if (param_2 != 0) { return 10; } bVar4 = 0x2f; while ((0xd < bVar4 || ((0x2401U >> (bVar4 & 0x1f) & 1) == 0))) { bVar4 = pbVar6[1]; pbVar6 = pbVar6 + 1; } } while( true ); LAB_00151071: pbVar6 = pbVar6 + 2; goto LAB_00150fd9; }
39,708
peek_token
bluesky950520[P]quickjs/quickjs.c
static int peek_token(JSParseState *s, BOOL no_line_terminator) { const uint8_t *p = s->buf_ptr; return simple_next_token(&p, no_line_terminator); }
O3
c
peek_token: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movl $0x2401, %eax # imm = 0x2401 movq %rbx, %r15 incq %rbx movzbl (%r15), %r14d cmpl $0xc, %r14d jg 0x61ac6 leal -0xb(%r14), %ecx cmpl $0x2, %ecx jb 0x61a9c cmpl $0x9, %r14d je 0x61a9c cmpl $0xa, %r14d je 0x61add jmp 0x61b7d cmpl $0x2e, %r14d jg 0x61ae3 cmpl $0xd, %r14d je 0x61add cmpl $0x20, %r14d je 0x61a9c jmp 0x61b7d testl %esi, %esi je 0x61a9c jmp 0x61b54 cmpl $0x2f, %r14d jne 0x61b63 movzbl (%rbx), %ecx cmpl $0x2f, %ecx je 0x61b2c cmpl $0x2a, %ecx jne 0x61b9d addq $0x2, %r15 movq %r15, %rbx movzbl (%rbx), %ecx cmpl $0xd, %ecx je 0x61b23 testl %ecx, %ecx je 0x61a9c testl %esi, %esi je 0x61b16 cmpb $0xa, %cl je 0x61b54 cmpb $0x2a, %cl jne 0x61b27 cmpb $0x2f, 0x1(%rbx) jne 0x61b27 jmp 0x61b4b testl %esi, %esi jne 0x61b54 incq %rbx jmp 0x61b01 testl %esi, %esi jne 0x61b54 movb $0x2f, %cl cmpb $0xd, %cl ja 0x61b43 movzbl %cl, %ecx btl %ecx, %eax jb 0x61a9c movb 0x1(%rbx), %cl incq %rbx jmp 0x61b32 addq $0x2, %rbx jmp 0x61a9c movl $0xa, %r14d movl %r14d, %eax popq %rbx popq %r14 popq %r15 retq cmpl $0x3d, %r14d jne 0x61b7d cmpb $0x3e, (%rbx) movl $0xffffffa4, %eax # imm = 0xFFFFFFA4 movl $0x3d, %r14d cmovel %eax, %r14d jmp 0x61b5a testb %r14b, %r14b js 0x61ba5 movl %r14d, %eax shrl $0x5, %eax leaq 0x430b1(%rip), %rcx # 0xa4c40 movl (%rcx,%rax,4), %ecx xorl %eax, %eax btl %r14d, %ecx setb %al jmp 0x61bad movl $0x2f, %r14d jmp 0x61b5a movl %r14d, %edi callq 0x9a624 testl %eax, %eax je 0x61b5a leal -0x61(%r14), %eax cmpl $0x8, %eax ja 0x61c11 leaq 0x3d023(%rip), %rcx # 0x9ebe4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax cmpb $0x77, (%rbx) jne 0x61d27 cmpb $0x61, 0x2(%r15) jne 0x61d27 cmpb $0x69, 0x3(%r15) jne 0x61d27 cmpb $0x74, 0x4(%r15) jne 0x61d27 movzbl 0x5(%r15), %edi callq 0x61a4f testl %eax, %eax jne 0x61d27 movl $0xffffffd8, %r14d # imm = 0xFFFFFFD8 jmp 0x61b5a cmpl $0x6f, %r14d jne 0x61d27 cmpb $0x66, (%rbx) jne 0x61d27 movzbl 0x2(%r15), %edi callq 0x61a4f testl %eax, %eax jne 0x61d27 movl $0xffffffd9, %r14d # imm = 0xFFFFFFD9 jmp 0x61b5a cmpb $0x75, (%rbx) jne 0x61d27 cmpb $0x6e, 0x2(%r15) jne 0x61d27 cmpb $0x63, 0x3(%r15) jne 0x61d27 cmpb $0x74, 0x4(%r15) jne 0x61d27 cmpb $0x69, 0x5(%r15) jne 0x61d27 cmpb $0x6f, 0x6(%r15) jne 0x61d27 cmpb $0x6e, 0x7(%r15) jne 0x61d27 movzbl 0x8(%r15), %edi callq 0x61a4f testl %eax, %eax jne 0x61d27 movl $0xffffffc5, %r14d # imm = 0xFFFFFFC5 jmp 0x61b5a movb (%rbx), %al cmpb $0x6e, %al jne 0x61cbf movzbl 0x2(%r15), %edi callq 0x61a4f testl %eax, %eax je 0x61d32 movb (%rbx), %al cmpb $0x6d, %al jne 0x61d27 cmpb $0x70, 0x2(%r15) jne 0x61d27 cmpb $0x6f, 0x3(%r15) jne 0x61d27 cmpb $0x72, 0x4(%r15) jne 0x61d27 cmpb $0x74, 0x5(%r15) jne 0x61d27 movzbl 0x6(%r15), %edi callq 0x61a4f testl %eax, %eax jne 0x61d27 movl $0xffffffcd, %r14d # imm = 0xFFFFFFCD jmp 0x61b5a cmpb $0x78, (%rbx) jne 0x61d27 cmpb $0x70, 0x2(%r15) jne 0x61d27 cmpb $0x6f, 0x3(%r15) jne 0x61d27 cmpb $0x72, 0x4(%r15) jne 0x61d27 cmpb $0x74, 0x5(%r15) jne 0x61d27 movzbl 0x6(%r15), %edi callq 0x61a4f testl %eax, %eax je 0x61d3d movl $0xffffff83, %r14d # imm = 0xFFFFFF83 jmp 0x61b5a movl $0xffffffb7, %r14d # imm = 0xFFFFFFB7 jmp 0x61b5a movl $0xffffffcb, %r14d # imm = 0xFFFFFFCB jmp 0x61b5a
peek_token: push r15 push r14 push rbx mov rbx, rdi mov eax, 2401h loc_61A9C: mov r15, rbx inc rbx movzx r14d, byte ptr [r15] cmp r14d, 0Ch jg short loc_61AC6 lea ecx, [r14-0Bh] cmp ecx, 2 jb short loc_61A9C cmp r14d, 9 jz short loc_61A9C cmp r14d, 0Ah jz short loc_61ADD jmp loc_61B7D loc_61AC6: cmp r14d, 2Eh ; '.' jg short loc_61AE3 cmp r14d, 0Dh jz short loc_61ADD cmp r14d, 20h ; ' ' jz short loc_61A9C jmp loc_61B7D loc_61ADD: test esi, esi jz short loc_61A9C jmp short loc_61B54 loc_61AE3: cmp r14d, 2Fh ; '/' jnz short loc_61B63 movzx ecx, byte ptr [rbx] cmp ecx, 2Fh ; '/' jz short loc_61B2C cmp ecx, 2Ah ; '*' jnz loc_61B9D add r15, 2 mov rbx, r15 loc_61B01: movzx ecx, byte ptr [rbx] cmp ecx, 0Dh jz short loc_61B23 test ecx, ecx jz short loc_61A9C test esi, esi jz short loc_61B16 cmp cl, 0Ah jz short loc_61B54 loc_61B16: cmp cl, 2Ah ; '*' jnz short loc_61B27 cmp byte ptr [rbx+1], 2Fh ; '/' jnz short loc_61B27 jmp short loc_61B4B loc_61B23: test esi, esi jnz short loc_61B54 loc_61B27: inc rbx jmp short loc_61B01 loc_61B2C: test esi, esi jnz short loc_61B54 mov cl, 2Fh ; '/' loc_61B32: cmp cl, 0Dh ja short loc_61B43 movzx ecx, cl bt eax, ecx jb loc_61A9C loc_61B43: mov cl, [rbx+1] inc rbx jmp short loc_61B32 loc_61B4B: add rbx, 2 jmp loc_61A9C loc_61B54: mov r14d, 0Ah loc_61B5A: mov eax, r14d pop rbx pop r14 pop r15 retn loc_61B63: cmp r14d, 3Dh ; '=' jnz short loc_61B7D cmp byte ptr [rbx], 3Eh ; '>' mov eax, 0FFFFFFA4h mov r14d, 3Dh ; '=' cmovz r14d, eax jmp short loc_61B5A loc_61B7D: test r14b, r14b js short loc_61BA5 mov eax, r14d shr eax, 5 lea rcx, lre_id_start_table_ascii mov ecx, [rcx+rax*4] xor eax, eax bt ecx, r14d setb al jmp short loc_61BAD loc_61B9D: mov r14d, 2Fh ; '/' jmp short loc_61B5A loc_61BA5: mov edi, r14d call lre_is_id_start loc_61BAD: test eax, eax jz short loc_61B5A lea eax, [r14-61h]; switch 9 cases cmp eax, 8 ja short def_61BC8; jumptable 0000000000061BC8 default case lea rcx, jpt_61BC8 movsxd rax, ds:(jpt_61BC8 - 9EBE4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_61BCA: cmp byte ptr [rbx], 77h ; 'w'; jumptable 0000000000061BC8 case 97 jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+2], 61h ; 'a' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+3], 69h ; 'i' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+4], 74h ; 't' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 movzx edi, byte ptr [r15+5] call lre_js_is_ident_next test eax, eax jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 mov r14d, 0FFFFFFD8h jmp loc_61B5A def_61BC8: cmp r14d, 6Fh ; 'o'; jumptable 0000000000061BC8 default case jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [rbx], 66h ; 'f' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 movzx edi, byte ptr [r15+2] call lre_js_is_ident_next test eax, eax jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 mov r14d, 0FFFFFFD9h jmp loc_61B5A loc_61C41: cmp byte ptr [rbx], 75h ; 'u'; jumptable 0000000000061BC8 case 102 jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+2], 6Eh ; 'n' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+3], 63h ; 'c' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+4], 74h ; 't' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+5], 69h ; 'i' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+6], 6Fh ; 'o' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+7], 6Eh ; 'n' jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 movzx edi, byte ptr [r15+8] call lre_js_is_ident_next test eax, eax jnz loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 mov r14d, 0FFFFFFC5h jmp loc_61B5A loc_61CA9: mov al, [rbx]; jumptable 0000000000061BC8 case 105 cmp al, 6Eh ; 'n' jnz short loc_61CBF movzx edi, byte ptr [r15+2] call lre_js_is_ident_next test eax, eax jz short loc_61D32 mov al, [rbx] loc_61CBF: cmp al, 6Dh ; 'm' jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+2], 70h ; 'p' jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+3], 6Fh ; 'o' jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+4], 72h ; 'r' jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+5], 74h ; 't' jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 movzx edi, byte ptr [r15+6] call lre_js_is_ident_next test eax, eax jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 mov r14d, 0FFFFFFCDh jmp loc_61B5A loc_61CF8: cmp byte ptr [rbx], 78h ; 'x'; jumptable 0000000000061BC8 case 101 jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+2], 70h ; 'p' jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+3], 6Fh ; 'o' jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+4], 72h ; 'r' jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 cmp byte ptr [r15+5], 74h ; 't' jnz short loc_61D27; jumptable 0000000000061BC8 cases 98-100,103,104 movzx edi, byte ptr [r15+6] call lre_js_is_ident_next test eax, eax jz short loc_61D3D loc_61D27: mov r14d, 0FFFFFF83h; jumptable 0000000000061BC8 cases 98-100,103,104 jmp loc_61B5A loc_61D32: mov r14d, 0FFFFFFB7h jmp loc_61B5A loc_61D3D: mov r14d, 0FFFFFFCBh jmp loc_61B5A
long long peek_token(unsigned __int8 *j, int a2) { int v3; // eax unsigned __int8 *v4; // r15 unsigned int v5; // r14d int v6; // ecx int v7; // ecx unsigned __int8 i; // cl unsigned int v10; // ecx int is_id_start; // eax unsigned __int8 v12; // al v3 = 9217; while ( 1 ) { LABEL_2: while ( 1 ) { v4 = j++; v5 = *v4; if ( v5 > 0xC ) break; if ( v5 - 11 >= 2 && v5 != 9 ) { if ( v5 != 10 ) goto LABEL_37; LABEL_11: if ( !a2 ) continue; return 10; } } if ( *v4 <= 0x2Eu ) { if ( v5 == 13 ) goto LABEL_11; if ( v5 == 32 ) continue; goto LABEL_37; } if ( v5 != 47 ) { if ( v5 == 61 ) { v5 = 61; if ( *j == 62 ) return (unsigned int)-92; return v5; } LABEL_37: if ( (v5 & 0x80u) != 0 ) { is_id_start = lre_is_id_start(*v4); } else { v10 = lre_id_start_table_ascii[v5 >> 5]; is_id_start = _bittest((const int *)&v10, v5); } if ( is_id_start ) { switch ( v5 ) { case 'a': if ( *j != 119 || v4[2] != 97 || v4[3] != 105 || v4[4] != 116 || (unsigned int)lre_js_is_ident_next(v4[5]) ) goto LABEL_78; return (unsigned int)-40; case 'b': case 'c': case 'd': case 'g': case 'h': goto LABEL_78; case 'e': if ( *j != 120 || v4[2] != 112 || v4[3] != 111 || v4[4] != 114 || v4[5] != 116 || (unsigned int)lre_js_is_ident_next(v4[6]) ) { goto LABEL_78; } v5 = -53; break; case 'f': if ( *j != 117 || v4[2] != 110 || v4[3] != 99 || v4[4] != 116 || v4[5] != 105 || v4[6] != 111 || v4[7] != 110 || (unsigned int)lre_js_is_ident_next(v4[8]) ) { goto LABEL_78; } v5 = -59; break; case 'i': v12 = *j; if ( *j != 110 ) goto LABEL_65; if ( (unsigned int)lre_js_is_ident_next(v4[2]) ) { v12 = *j; LABEL_65: if ( v12 == 109 && v4[2] == 112 && v4[3] == 111 && v4[4] == 114 && v4[5] == 116 && !(unsigned int)lre_js_is_ident_next(v4[6]) ) { v5 = -51; } else { LABEL_78: v5 = -125; } } else { v5 = -73; } break; default: if ( v5 != 111 || *j != 102 || (unsigned int)lre_js_is_ident_next(v4[2]) ) goto LABEL_78; v5 = -39; break; } } return v5; } v6 = *j; if ( v6 != 47 ) break; if ( a2 ) return 10; for ( i = 47; i > 0xDu || !_bittest(&v3, i); i = *++j ) ; } if ( v6 == 42 ) { for ( j = v4 + 2; ; ++j ) { v7 = *j; if ( v7 == 13 ) { if ( a2 ) return 10; } else { if ( !*j ) goto LABEL_2; if ( a2 && (_BYTE)v7 == 10 ) return 10; if ( (_BYTE)v7 == 42 && j[1] == 47 ) { j += 2; goto LABEL_2; } } } } return 47; }
peek_token: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI MOV EAX,0x2401 LAB_00161a9c: MOV R15,RBX INC RBX MOVZX R14D,byte ptr [R15] CMP R14D,0xc JG 0x00161ac6 LEA ECX,[R14 + -0xb] CMP ECX,0x2 JC 0x00161a9c CMP R14D,0x9 JZ 0x00161a9c CMP R14D,0xa JZ 0x00161add JMP 0x00161b7d LAB_00161ac6: CMP R14D,0x2e JG 0x00161ae3 CMP R14D,0xd JZ 0x00161add CMP R14D,0x20 JZ 0x00161a9c JMP 0x00161b7d LAB_00161add: TEST ESI,ESI JZ 0x00161a9c JMP 0x00161b54 LAB_00161ae3: CMP R14D,0x2f JNZ 0x00161b63 MOVZX ECX,byte ptr [RBX] CMP ECX,0x2f JZ 0x00161b2c CMP ECX,0x2a JNZ 0x00161b9d ADD R15,0x2 MOV RBX,R15 LAB_00161b01: MOVZX ECX,byte ptr [RBX] CMP ECX,0xd JZ 0x00161b23 TEST ECX,ECX JZ 0x00161a9c TEST ESI,ESI JZ 0x00161b16 CMP CL,0xa JZ 0x00161b54 LAB_00161b16: CMP CL,0x2a JNZ 0x00161b27 CMP byte ptr [RBX + 0x1],0x2f JNZ 0x00161b27 JMP 0x00161b4b LAB_00161b23: TEST ESI,ESI JNZ 0x00161b54 LAB_00161b27: INC RBX JMP 0x00161b01 LAB_00161b2c: TEST ESI,ESI JNZ 0x00161b54 MOV CL,0x2f LAB_00161b32: CMP CL,0xd JA 0x00161b43 MOVZX ECX,CL BT EAX,ECX JC 0x00161a9c LAB_00161b43: MOV CL,byte ptr [RBX + 0x1] INC RBX JMP 0x00161b32 LAB_00161b4b: ADD RBX,0x2 JMP 0x00161a9c LAB_00161b54: MOV R14D,0xa LAB_00161b5a: MOV EAX,R14D POP RBX POP R14 POP R15 RET LAB_00161b63: CMP R14D,0x3d JNZ 0x00161b7d CMP byte ptr [RBX],0x3e MOV EAX,0xffffffa4 MOV R14D,0x3d CMOVZ R14D,EAX JMP 0x00161b5a LAB_00161b7d: TEST R14B,R14B JS 0x00161ba5 MOV EAX,R14D SHR EAX,0x5 LEA RCX,[0x1a4c40] MOV ECX,dword ptr [RCX + RAX*0x4] XOR EAX,EAX BT ECX,R14D SETC AL JMP 0x00161bad LAB_00161b9d: MOV R14D,0x2f JMP 0x00161b5a LAB_00161ba5: MOV EDI,R14D CALL 0x0019a624 LAB_00161bad: TEST EAX,EAX JZ 0x00161b5a LEA EAX,[R14 + -0x61] CMP EAX,0x8 JA 0x00161c11 LEA RCX,[0x19ebe4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_61: CMP byte ptr [RBX],0x77 JNZ 0x00161d27 CMP byte ptr [R15 + 0x2],0x61 JNZ 0x00161d27 CMP byte ptr [R15 + 0x3],0x69 JNZ 0x00161d27 CMP byte ptr [R15 + 0x4],0x74 JNZ 0x00161d27 MOVZX EDI,byte ptr [R15 + 0x5] CALL 0x00161a4f TEST EAX,EAX JNZ 0x00161d27 MOV R14D,0xffffffd8 JMP 0x00161b5a default: CMP R14D,0x6f JNZ 0x00161d27 CMP byte ptr [RBX],0x66 JNZ 0x00161d27 MOVZX EDI,byte ptr [R15 + 0x2] CALL 0x00161a4f TEST EAX,EAX JNZ 0x00161d27 MOV R14D,0xffffffd9 JMP 0x00161b5a caseD_66: CMP byte ptr [RBX],0x75 JNZ 0x00161d27 CMP byte ptr [R15 + 0x2],0x6e JNZ 0x00161d27 CMP byte ptr [R15 + 0x3],0x63 JNZ 0x00161d27 CMP byte ptr [R15 + 0x4],0x74 JNZ 0x00161d27 CMP byte ptr [R15 + 0x5],0x69 JNZ 0x00161d27 CMP byte ptr [R15 + 0x6],0x6f JNZ 0x00161d27 CMP byte ptr [R15 + 0x7],0x6e JNZ 0x00161d27 MOVZX EDI,byte ptr [R15 + 0x8] CALL 0x00161a4f TEST EAX,EAX JNZ 0x00161d27 MOV R14D,0xffffffc5 JMP 0x00161b5a caseD_69: MOV AL,byte ptr [RBX] CMP AL,0x6e JNZ 0x00161cbf MOVZX EDI,byte ptr [R15 + 0x2] CALL 0x00161a4f TEST EAX,EAX JZ 0x00161d32 MOV AL,byte ptr [RBX] LAB_00161cbf: CMP AL,0x6d JNZ 0x00161d27 CMP byte ptr [R15 + 0x2],0x70 JNZ 0x00161d27 CMP byte ptr [R15 + 0x3],0x6f JNZ 0x00161d27 CMP byte ptr [R15 + 0x4],0x72 JNZ 0x00161d27 CMP byte ptr [R15 + 0x5],0x74 JNZ 0x00161d27 MOVZX EDI,byte ptr [R15 + 0x6] CALL 0x00161a4f TEST EAX,EAX JNZ 0x00161d27 MOV R14D,0xffffffcd JMP 0x00161b5a caseD_65: CMP byte ptr [RBX],0x78 JNZ 0x00161d27 CMP byte ptr [R15 + 0x2],0x70 JNZ 0x00161d27 CMP byte ptr [R15 + 0x3],0x6f JNZ 0x00161d27 CMP byte ptr [R15 + 0x4],0x72 JNZ 0x00161d27 CMP byte ptr [R15 + 0x5],0x74 JNZ 0x00161d27 MOVZX EDI,byte ptr [R15 + 0x6] CALL 0x00161a4f TEST EAX,EAX JZ 0x00161d3d caseD_62: MOV R14D,0xffffff83 JMP 0x00161b5a LAB_00161d32: MOV R14D,0xffffffb7 JMP 0x00161b5a LAB_00161d3d: MOV R14D,0xffffffcb JMP 0x00161b5a
ulong peek_token(byte *param_1,int param_2) { uint uVar1; int iVar2; byte bVar3; byte *pbVar4; uint uVar5; LAB_00161a9c: do { pbVar4 = param_1; param_1 = pbVar4 + 1; bVar3 = *pbVar4; uVar5 = (uint)bVar3; if (bVar3 < 0xd) { if ((1 < bVar3 - 0xb) && (uVar5 != 9)) { if (uVar5 != 10) goto LAB_00161b7d; LAB_00161add: if (param_2 != 0) { return 10; } } goto LAB_00161a9c; } if (bVar3 < 0x2f) { if (uVar5 == 0xd) goto LAB_00161add; if (uVar5 != 0x20) { LAB_00161b7d: if ((char)bVar3 < '\0') { uVar1 = lre_is_id_start((ulong)bVar3); } else { uVar1 = (uint)((*(uint *)(lre_id_start_table_ascii + (ulong)(bVar3 >> 5) * 4) >> (uVar5 & 0x1f) & 1) != 0); } if (uVar1 == 0) { return (ulong)bVar3; } switch(bVar3) { case 0x61: if (((*param_1 == 0x77) && (pbVar4[2] == 0x61)) && ((pbVar4[3] == 0x69 && ((pbVar4[4] == 0x74 && (iVar2 = lre_js_is_ident_next(pbVar4[5]), iVar2 == 0)))))) { return 0xffffffd8; } break; case 0x62: case 99: case 100: case 0x67: case 0x68: break; case 0x65: if (((((*param_1 == 0x78) && (pbVar4[2] == 0x70)) && (pbVar4[3] == 0x6f)) && ((pbVar4[4] == 0x72 && (pbVar4[5] == 0x74)))) && (iVar2 = lre_js_is_ident_next(pbVar4[6]), iVar2 == 0)) { return 0xffffffcb; } break; case 0x66: if (((((*param_1 == 0x75) && (pbVar4[2] == 0x6e)) && (pbVar4[3] == 99)) && ((pbVar4[4] == 0x74 && (pbVar4[5] == 0x69)))) && ((pbVar4[6] == 0x6f && ((pbVar4[7] == 0x6e && (iVar2 = lre_js_is_ident_next(pbVar4[8]), iVar2 == 0)))))) { return 0xffffffc5; } break; case 0x69: bVar3 = *param_1; if (bVar3 == 0x6e) { iVar2 = lre_js_is_ident_next(pbVar4[2]); if (iVar2 == 0) { return 0xffffffb7; } bVar3 = *param_1; } if ((((bVar3 == 0x6d) && (pbVar4[2] == 0x70)) && ((pbVar4[3] == 0x6f && ((pbVar4[4] == 0x72 && (pbVar4[5] == 0x74)))))) && (iVar2 = lre_js_is_ident_next(pbVar4[6]), iVar2 == 0)) { return 0xffffffcd; } break; default: if (((uVar5 == 0x6f) && (*param_1 == 0x66)) && (iVar2 = lre_js_is_ident_next(pbVar4[2]), iVar2 == 0)) { return 0xffffffd9; } } return 0xffffff83; } } else { if (uVar5 != 0x2f) { if (uVar5 == 0x3d) { if (*param_1 == 0x3e) { return 0xffffffa4; } return 0x3d; } goto LAB_00161b7d; } if (*param_1 != 0x2f) { if (*param_1 != 0x2a) { return 0x2f; } param_1 = pbVar4 + 2; do { bVar3 = *param_1; if (bVar3 == 0xd) { if (param_2 != 0) { return 10; } } else { if (bVar3 == 0) goto LAB_00161a9c; if ((param_2 != 0) && (bVar3 == 10)) { return 10; } if ((bVar3 == 0x2a) && (param_1[1] == 0x2f)) goto LAB_00161b4b; } param_1 = param_1 + 1; } while( true ); } if (param_2 != 0) { return 10; } bVar3 = 0x2f; while ((0xd < bVar3 || ((0x2401U >> (bVar3 & 0x1f) & 1) == 0))) { bVar3 = param_1[1]; param_1 = param_1 + 1; } } } while( true ); LAB_00161b4b: param_1 = param_1 + 2; goto LAB_00161a9c; }
39,709
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>::operator[]<char const>(char const*)
monkey531[P]llama/common/json.hpp
reference operator[](T* key) { return operator[](typename object_t::key_type(key)); }
O3
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>& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[]<char const>(char const*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x25866 movq %rbx, %rdi movq %r14, %rsi callq 0xcea46 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc7fe9 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc50 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc8012 movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc50 movq %rbx, %rdi callq 0x1e660
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixIKcEERSD_PT_: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator[](std::string) mov rbx, rax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C7FE9 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C7FE9: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C8012 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C8012: mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]<char const>( long long a1, long long a2) { long long v2; // rbx void *v4[2]; // [rsp+8h] [rbp-30h] BYREF long long v5; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v4, a2); v2 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( a1, v4); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); return v2; }
operator[]<char_const>: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x00125866 LAB_001c7fc0: MOV RDI,RBX MOV RSI,R14 CALL 0x001cea46 LAB_001c7fcb: MOV RBX,RAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001c7fe9 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011dc50 LAB_001c7fe9: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* 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>::operator[]<char const>(char const*) */ basic_json * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[]<char_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> *this,char *param_1) { basic_json *pbVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 001c7fc0 to 001c7fca has its CatchHandler @ 001c7ff4 */ pbVar1 = (basic_json *)operator[](this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return pbVar1; }
39,710
gc_decref_child
bluesky950520[P]quickjs/quickjs.c
static void gc_decref_child(JSRuntime *rt, JSGCObjectHeader *p) { assert(p->ref_count > 0); p->ref_count--; if (p->ref_count == 0 && p->mark == 1) { list_del(&p->link); list_add_tail(&p->link, &rt->tmp_obj_list); } }
O1
c
gc_decref_child: decl (%rsi) je 0x3d214 retq movb 0x4(%rsi), %al andb $-0x10, %al cmpb $0x10, %al jne 0x3d213 leaq 0x8(%rsi), %rax movq 0x8(%rsi), %rcx movq 0x10(%rsi), %rdx movq %rdx, 0x8(%rcx) movq %rcx, (%rdx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsi) leaq 0xb8(%rdi), %rcx movq 0xb8(%rdi), %rdx movq %rax, 0x8(%rdx) movq %rdx, 0x8(%rsi) movq %rcx, 0x10(%rsi) movq %rax, 0xb8(%rdi) retq
gc_decref_child: dec dword ptr [rsi] jz short loc_3D214 locret_3D213: retn loc_3D214: mov al, [rsi+4] and al, 0F0h cmp al, 10h jnz short locret_3D213 lea rax, [rsi+8] mov rcx, [rsi+8] mov rdx, [rsi+10h] mov [rcx+8], rdx mov [rdx], rcx xorps xmm0, xmm0 movups xmmword ptr [rsi+8], xmm0 lea rcx, [rdi+0B8h] mov rdx, [rdi+0B8h] mov [rdx+8], rax mov [rsi+8], rdx mov [rsi+10h], rcx mov [rdi+0B8h], rax retn
char gc_decref_child(long long a1, long long a2) { char result; // al long long v4; // rcx _QWORD *v5; // rdx long long v6; // rdx if ( (*(_DWORD *)a2)-- == 1 ) { result = *(_BYTE *)(a2 + 4) & 0xF0; if ( result == 16 ) { result = a2 + 8; v4 = *(_QWORD *)(a2 + 8); v5 = *(_QWORD **)(a2 + 16); *(_QWORD *)(v4 + 8) = v5; *v5 = v4; *(_OWORD *)(a2 + 8) = 0LL; v6 = *(_QWORD *)(a1 + 184); *(_QWORD *)(v6 + 8) = a2 + 8; *(_QWORD *)(a2 + 8) = v6; *(_QWORD *)(a2 + 16) = a1 + 184; *(_QWORD *)(a1 + 184) = a2 + 8; } } return result; }
gc_decref_child: DEC dword ptr [RSI] JZ 0x0013d214 LAB_0013d213: RET LAB_0013d214: MOV AL,byte ptr [RSI + 0x4] AND AL,0xf0 CMP AL,0x10 JNZ 0x0013d213 LEA RAX,[RSI + 0x8] MOV RCX,qword ptr [RSI + 0x8] MOV RDX,qword ptr [RSI + 0x10] MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RDX],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSI + 0x8],XMM0 LEA RCX,[RDI + 0xb8] MOV RDX,qword ptr [RDI + 0xb8] MOV qword ptr [RDX + 0x8],RAX MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RSI + 0x10],RCX MOV qword ptr [RDI + 0xb8],RAX RET
void gc_decref_child(long param_1,int *param_2) { long lVar1; long *plVar2; *param_2 = *param_2 + -1; if ((*param_2 == 0) && ((*(byte *)(param_2 + 1) & 0xf0) == 0x10)) { lVar1 = *(long *)(param_2 + 2); plVar2 = *(long **)(param_2 + 4); *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; param_2[2] = 0; param_2[3] = 0; param_2[4] = 0; param_2[5] = 0; lVar1 = *(long *)(param_1 + 0xb8); *(int **)(lVar1 + 8) = param_2 + 2; *(long *)(param_2 + 2) = lVar1; *(long *)(param_2 + 4) = param_1 + 0xb8; *(int **)(param_1 + 0xb8) = param_2 + 2; return; } return; }
39,711
uf_space_endspace
eloqsql/storage/myisam/mi_packrec.c
static void uf_space_endspace(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { uint spaces; if (get_bit(bit_buff)) bfill((uchar*) to,(end-to),' '); else { if ((spaces=get_bits(bit_buff,rec->space_length_bits))+to > end) { bit_buff->error=1; return; } if (to+spaces != end) decode_bytes(rec,bit_buff,to,end-spaces); bfill((uchar*) end-spaces,spaces,' '); } }
O3
c
uf_space_endspace: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %r13 movl 0x4(%rsi), %eax testl %eax, %eax je 0x82f86 movl (%r15), %r12d decl %eax movl %eax, 0x4(%r15) btl %eax, %r12d jae 0x82fa3 subq %r14, %rbx movq %r14, %rdi movl $0x20, %esi movq %rbx, %rdx jmp 0x83053 movq %r15, %rdi callq 0x822b5 movl $0x1f, 0x4(%r15) movl (%r15), %r12d movl $0x1f, %eax testl %r12d, %r12d js 0x82f73 movq %r13, %rdx movl 0x1c(%r13), %r13d movl %eax, %ecx subl %r13d, %ecx movq %rdx, -0x30(%rbp) jae 0x82fef subl %eax, %r13d movl %eax, %eax leaq 0x5ea9f(%rip), %rcx # 0xe1a60 andl (%rcx,%rax,4), %r12d movl %r13d, %ecx shll %cl, %r12d movq %r15, %rdi callq 0x822b5 movl $0x20, %eax subl %r13d, %eax movl %eax, 0x4(%r15) movl (%r15), %eax negl %r13d movl %r13d, %ecx shrl %cl, %eax addl %eax, %r12d jmp 0x83004 movl %ecx, 0x4(%r15) shrl %cl, %r12d movl 0x1c(%rdx), %eax leaq 0x5ea60(%rip), %rcx # 0xe1a60 andl (%rcx,%rax,4), %r12d movl %r12d, %r13d leaq (%r14,%r13), %rax cmpq %rbx, %rax jbe 0x83027 movl $0x1, 0x28(%r15) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, %r12 negq %r12 cmpq %rbx, %rax je 0x83045 leaq (%rbx,%r12), %rcx movq -0x30(%rbp), %rdi movq %r15, %rsi movq %r14, %rdx callq 0x82ba6 addq %r12, %rbx movq %rbx, %rdi movl $0x20, %esi movq %r13, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x292c0
uf_space_endspace_0: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r14, rdx mov r15, rsi mov r13, rdi mov eax, [rsi+4] test eax, eax jz short loc_82F86 mov r12d, [r15] dec eax mov [r15+4], eax bt r12d, eax jnb short loc_82FA3 loc_82F73: sub rbx, r14 mov rdi, r14 mov esi, 20h ; ' ' mov rdx, rbx jmp loc_83053 loc_82F86: mov rdi, r15 call fill_buffer_0 mov dword ptr [r15+4], 1Fh mov r12d, [r15] mov eax, 1Fh test r12d, r12d js short loc_82F73 loc_82FA3: mov rdx, r13 mov r13d, [r13+1Ch] mov ecx, eax sub ecx, r13d mov [rbp+var_30], rdx jnb short loc_82FEF sub r13d, eax mov eax, eax lea rcx, mask_0 and r12d, [rcx+rax*4] mov ecx, r13d shl r12d, cl mov rdi, r15 call fill_buffer_0 mov eax, 20h ; ' ' sub eax, r13d mov [r15+4], eax mov eax, [r15] neg r13d mov ecx, r13d shr eax, cl add r12d, eax jmp short loc_83004 loc_82FEF: mov [r15+4], ecx shr r12d, cl mov eax, [rdx+1Ch] lea rcx, mask_0 and r12d, [rcx+rax*4] loc_83004: mov r13d, r12d lea rax, [r14+r13] cmp rax, rbx jbe short loc_83027 mov dword ptr [r15+28h], 1 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_83027: mov r12, r13 neg r12 cmp rax, rbx jz short loc_83045 lea rcx, [rbx+r12] mov rdi, [rbp+var_30] mov rsi, r15 mov rdx, r14 call decode_bytes_0 loc_83045: add rbx, r12 mov rdi, rbx mov esi, 20h ; ' ' mov rdx, r13 loc_83053: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memset
unsigned long long uf_space_endspace_0(long long a1, unsigned int *a2, _BYTE *a3, unsigned long long a4) { unsigned int v6; // eax unsigned int v7; // r12d unsigned int v8; // eax unsigned long long result; // rax unsigned int v10; // r13d unsigned int v11; // ecx int v12; // r13d int v13; // r12d unsigned int v14; // r12d v6 = a2[1]; if ( v6 ) { v7 = *a2; v8 = v6 - 1; a2[1] = v8; if ( _bittest((const int *)&v7, v8) ) return memset(a3, 32LL, a4 - (_QWORD)a3); } else { fill_buffer_0((long long)a2); a2[1] = 31; v7 = *a2; v8 = 31; if ( (*a2 & 0x80000000) != 0 ) return memset(a3, 32LL, a4 - (_QWORD)a3); } v10 = *(_DWORD *)(a1 + 28); v11 = v8 - v10; if ( v8 >= v10 ) { a2[1] = v11; v14 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v11); } else { v12 = v10 - v8; v13 = (mask_0[v8] & v7) << v12; fill_buffer_0((long long)a2); a2[1] = 32 - v12; v14 = (*a2 >> -(char)v12) + v13; } result = (unsigned long long)&a3[v14]; if ( result <= a4 ) { if ( result != a4 ) decode_bytes_0(a1, (long long)a2, a3, (_BYTE *)(a4 - v14)); return memset(a4 - v14, 32LL, v14); } else { a2[10] = 1; } return result; }
uf_space_endspace: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R14,RDX MOV R15,RSI MOV R13,RDI MOV EAX,dword ptr [RSI + 0x4] TEST EAX,EAX JZ 0x00182f86 MOV R12D,dword ptr [R15] DEC EAX MOV dword ptr [R15 + 0x4],EAX BT R12D,EAX JNC 0x00182fa3 LAB_00182f73: SUB RBX,R14 MOV RDI,R14 MOV ESI,0x20 MOV RDX,RBX JMP 0x00183053 LAB_00182f86: MOV RDI,R15 CALL 0x001822b5 MOV dword ptr [R15 + 0x4],0x1f MOV R12D,dword ptr [R15] MOV EAX,0x1f TEST R12D,R12D JS 0x00182f73 LAB_00182fa3: MOV RDX,R13 MOV R13D,dword ptr [R13 + 0x1c] MOV ECX,EAX SUB ECX,R13D MOV qword ptr [RBP + -0x30],RDX JNC 0x00182fef SUB R13D,EAX MOV EAX,EAX LEA RCX,[0x1e1a60] AND R12D,dword ptr [RCX + RAX*0x4] MOV ECX,R13D SHL R12D,CL MOV RDI,R15 CALL 0x001822b5 MOV EAX,0x20 SUB EAX,R13D MOV dword ptr [R15 + 0x4],EAX MOV EAX,dword ptr [R15] NEG R13D MOV ECX,R13D SHR EAX,CL ADD R12D,EAX JMP 0x00183004 LAB_00182fef: MOV dword ptr [R15 + 0x4],ECX SHR R12D,CL MOV EAX,dword ptr [RDX + 0x1c] LEA RCX,[0x1e1a60] AND R12D,dword ptr [RCX + RAX*0x4] LAB_00183004: MOV R13D,R12D LEA RAX,[R14 + R13*0x1] CMP RAX,RBX JBE 0x00183027 MOV dword ptr [R15 + 0x28],0x1 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00183027: MOV R12,R13 NEG R12 CMP RAX,RBX JZ 0x00183045 LEA RCX,[RBX + R12*0x1] MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R15 MOV RDX,R14 CALL 0x00182ba6 LAB_00183045: ADD RBX,R12 MOV RDI,RBX MOV ESI,0x20 MOV RDX,R13 LAB_00183053: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001292c0
void uf_space_endspace(long param_1,uint *param_2,void *param_3,ulong param_4) { uint uVar1; uint uVar2; uint uVar3; byte bVar4; size_t __n; uint uVar5; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar5 = *param_2; uVar3 = 0x1f; if (-1 < (int)uVar5) goto LAB_00182fa3; } else { uVar5 = *param_2; uVar3 = param_2[1] - 1; param_2[1] = uVar3; if ((uVar5 >> (uVar3 & 0x1f) & 1) == 0) { LAB_00182fa3: uVar1 = *(uint *)(param_1 + 0x1c); if (uVar3 < uVar1) { uVar2 = (&mask)[uVar3]; bVar4 = (byte)(uVar1 - uVar3); fill_buffer(param_2); param_2[1] = 0x20 - (uVar1 - uVar3); uVar5 = ((uVar5 & uVar2) << (bVar4 & 0x1f)) + (*param_2 >> (-bVar4 & 0x1f)); } else { param_2[1] = uVar3 - uVar1; uVar5 = uVar5 >> ((byte)(uVar3 - uVar1) & 0x1f) & (&mask)[*(uint *)(param_1 + 0x1c)]; } __n = (size_t)uVar5; if (param_4 < (long)param_3 + __n) { param_2[10] = 1; return; } if ((long)param_3 + __n != param_4) { decode_bytes(param_1,param_2,param_3,param_4 + -__n); } param_3 = (void *)(param_4 + -__n); goto LAB_00183053; } } __n = param_4 - (long)param_3; LAB_00183053: memset(param_3,0x20,__n); return; }
39,712
bitmap_subtract
eloqsql/mysys/my_bitmap.c
void bitmap_subtract(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end; DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map->n_bits==map2->n_bits); end= map->last_word_ptr; while (to <= end) *to++ &= ~(*from++); }
O3
c
bitmap_subtract: movq (%rdi), %rax movq 0x8(%rdi), %rcx cmpq %rcx, %rax ja 0x9d912 pushq %rbp movq %rsp, %rbp movq (%rsi), %rdx movl (%rdx), %esi notl %esi andl %esi, (%rax) addq $0x4, %rdx addq $0x4, %rax cmpq %rcx, %rax jbe 0x9d8fe popq %rbp retq
bitmap_subtract: mov rax, [rdi] mov rcx, [rdi+8] cmp rax, rcx ja short locret_9D912 push rbp mov rbp, rsp mov rdx, [rsi] loc_9D8FE: mov esi, [rdx] not esi and [rax], esi add rdx, 4 add rax, 4 cmp rax, rcx jbe short loc_9D8FE pop rbp locret_9D912: retn
_DWORD * bitmap_subtract(long long a1, _DWORD **a2) { _DWORD *result; // rax unsigned long long v3; // rcx _DWORD *v4; // rdx result = *(_DWORD **)a1; v3 = *(_QWORD *)(a1 + 8); if ( *(_QWORD *)a1 <= v3 ) { v4 = *a2; do *result++ &= ~*v4++; while ( (unsigned long long)result <= v3 ); } return result; }
bitmap_subtract: MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] CMP RAX,RCX JA 0x0019d912 PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RSI] LAB_0019d8fe: MOV ESI,dword ptr [RDX] NOT ESI AND dword ptr [RAX],ESI ADD RDX,0x4 ADD RAX,0x4 CMP RAX,RCX JBE 0x0019d8fe POP RBP LAB_0019d912: RET
void bitmap_subtract(int8 *param_1,int8 *param_2) { uint *puVar1; uint *puVar2; uint *puVar3; puVar2 = (uint *)*param_1; puVar1 = (uint *)param_1[1]; if (puVar2 <= puVar1) { puVar3 = (uint *)*param_2; do { *puVar2 = *puVar2 & ~*puVar3; puVar3 = puVar3 + 1; puVar2 = puVar2 + 1; } while (puVar2 <= puVar1); } return; }
39,713
ma_get_pack_key
eloqsql/storage/maria/ma_search.c
uint _ma_get_pack_key(MARIA_KEY *int_key, uint page_flag, uint nod_flag, uchar **page_pos) { reg1 HA_KEYSEG *keyseg; uchar *page= *page_pos; uint length; uchar *key= int_key->data; MARIA_KEYDEF *keyinfo= int_key->keyinfo; for (keyseg=keyinfo->seg ; keyseg->type ;keyseg++) { if (keyseg->flag & HA_PACK_KEY) { /* key with length, packed to previous key */ uchar *start= key; uint packed= *page & 128,tot_length,rest_length; if (keyseg->length >= 127) { length=mi_uint2korr(page) & 32767; page+=2; } else length= *page++ & 127; if (packed) { if (length > (uint) keyseg->length) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); return 0; /* Error */ } if (length == 0) /* Same key */ { if (keyseg->flag & HA_NULL_PART) *key++=1; /* Can't be NULL */ get_key_length(length,key); key+= length; /* Same diff_key as prev */ if (length > keyseg->length) { DBUG_PRINT("error", ("Found too long null packed key: %u of %u at %p", length, keyseg->length, *page_pos)); DBUG_DUMP("key", *page_pos, 16); _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); return 0; } continue; } if (keyseg->flag & HA_NULL_PART) { key++; /* Skip null marker*/ start++; } get_key_length(rest_length,page); tot_length=rest_length+length; /* If the stored length has changed, we must move the key */ if (tot_length >= 255 && *start != 255) { /* length prefix changed from a length of one to a length of 3 */ bmove_upp(key+length+3, key+length+1, length); *key=255; mi_int2store(key+1,tot_length); key+=3+length; } else if (tot_length < 255 && *start == 255) { bmove(key+1,key+3,length); *key=tot_length; key+=1+length; } else { store_key_length_inc(key,tot_length); key+=length; } memcpy(key,page,rest_length); page+=rest_length; key+=rest_length; continue; } else { /* Key that is not packed against previous key */ if (keyseg->flag & HA_NULL_PART) { if (!length--) /* Null part */ { *key++=0; continue; } *key++=1; /* Not null */ } } if (length > (uint) keyseg->length) { DBUG_PRINT("error",("Found too long packed key: %u of %u at %p", length, keyseg->length, *page_pos)); DBUG_DUMP("key", *page_pos, 16); _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); return 0; /* Error */ } store_key_length_inc(key,length); } else { if (keyseg->flag & HA_NULL_PART) { if (!(*key++ = *page++)) continue; } if (keyseg->flag & (HA_VAR_LENGTH_PART | HA_BLOB_PART | HA_SPACE_PACK)) { uchar *tmp=page; get_key_length(length,tmp); length+=(uint) (tmp-page); } else length=keyseg->length; } memcpy(key, page,(size_t) length); key+=length; page+=length; } int_key->data_length= (uint)(key - int_key->data); int_key->flag= 0; length= keyseg->length; if (page_flag & KEYPAGE_FLAG_HAS_TRANSID) { uchar *end= page + length; if (key_has_transid(end-1)) { length+= transid_packed_length(end); int_key->flag= SEARCH_PAGE_KEY_HAS_TRANSID; } } int_key->ref_length= length; length+= nod_flag; bmove(key, page, length); *page_pos= page+length; return (int_key->data_length + int_key->ref_length); }
O3
c
ma_get_pack_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r15 movq %rdx, -0x60(%rbp) movl %esi, -0x44(%rbp) movq %rdi, %r14 movq (%rcx), %r12 movq (%rdi), %rbx movq 0x8(%rdi), %rcx movq 0xc0(%rcx), %rax cmpb $0x0, 0x18(%rax) je 0x57306 movq %rcx, -0x30(%rbp) movq %r15, -0x50(%rbp) movq %r14, -0x58(%rbp) movq %rax, %r15 movzwl 0x12(%rax), %ecx movzwl %cx, %edx testb $0x2, %dl jne 0x570e3 testb $0x10, %dl je 0x570bf movb (%r12), %al incq %r12 movb %al, (%rbx) incq %rbx testb %al, %al je 0x571ba movzwl 0x12(%r15), %ecx testb $0x29, %cl je 0x57179 movzbl (%r12), %ecx cmpl $0xff, %ecx je 0x5718f movl $0x1, %eax jmp 0x571a1 movzbl (%r12), %edi movzwl 0x14(%r15), %esi cmpl $0x7f, %esi jb 0x57109 movzbl 0x1(%r12), %r8d movl %edi, %eax andl $0x7f, %eax shll $0x8, %eax orl %r8d, %eax addq $0x2, %r12 jmp 0x57111 incq %r12 movl %edi, %eax andl $0x7f, %eax testb %dil, %dil js 0x57149 testb $0x10, %cl je 0x57130 testl %eax, %eax je 0x571f1 decl %eax movb $0x1, (%rbx) incq %rbx movzwl 0x14(%r15), %esi movzwl %si, %ecx cmpl %ecx, %eax ja 0x57379 cmpl $0xfe, %eax ja 0x57180 movb %al, (%rbx) incq %rbx jmp 0x571a3 cmpl %esi, %eax ja 0x57379 testl %eax, %eax je 0x571ce btl $0x4, %edx adcq $0x0, %rbx movzbl (%r12), %r13d cmpl $0xff, %r13d je 0x571f9 movl $0x1, %esi jmp 0x5720c movzwl 0x14(%r15), %eax jmp 0x571a3 movb $-0x1, (%rbx) movb %al, 0x2(%rbx) movb %ah, 0x1(%rbx) addq $0x3, %rbx jmp 0x571a3 movzwl 0x1(%r12), %eax rolw $0x8, %ax movzwl %ax, %ecx movl $0x3, %eax addl %ecx, %eax movl %eax, %r14d movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x29080 addq %r14, %rbx addq %r14, %r12 leaq 0x20(%r15), %rax cmpb $0x0, 0x38(%r15) jne 0x57092 jmp 0x572f9 testb $0x10, %cl je 0x571d9 movb $0x1, (%rbx) incq %rbx movzbl (%rbx), %eax cmpl $0xff, %eax je 0x57269 movl $0x1, %ecx jmp 0x57279 movb $0x0, (%rbx) incq %rbx jmp 0x571ba movzwl 0x1(%r12), %ecx rolw $0x8, %cx movzwl %cx, %r13d movl $0x3, %esi leal (%rax,%r13), %ecx movb (%rbx), %dl cmpl $0xff, %ecx jb 0x57257 cmpb $-0x1, %dl je 0x57293 movl %eax, %edx leaq (%rbx,%rdx), %r14 addq $0x3, %r14 movq %rsi, -0x40(%rbp) leaq (%rbx,%rdx), %rsi incq %rsi movq %r14, %rdi movl %ecx, -0x38(%rbp) callq 0xaa8a4 movq -0x40(%rbp), %rsi movb $-0x1, (%rbx) movl -0x38(%rbp), %eax movb %al, 0x2(%rbx) movb %ah, 0x1(%rbx) movq %r14, %rbx jmp 0x572da movl %ecx, %r14d movl $0x1, %ecx cmpb $-0x1, %dl je 0x572b2 movq %rbx, %rdx jmp 0x572a5 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movl $0x3, %ecx movzwl 0x14(%r15), %edx cmpl %edx, %eax ja 0x57379 addq %rcx, %rbx movl %eax, %eax addq %rax, %rbx jmp 0x571ba leaq 0x1(%rbx), %rdx movb %cl, 0x2(%rbx) shrl $0x8, %ecx movl %ecx, %r14d movl $0x3, %ecx movb %r14b, (%rdx) movl %eax, %eax addq %rcx, %rax addq %rax, %rbx jmp 0x572da leaq 0x1(%rbx), %rdi movq %rsi, -0x40(%rbp) leaq 0x3(%rbx), %rsi movl %eax, %edx movq %rdx, -0x38(%rbp) callq 0x29120 movq -0x40(%rbp), %rsi movb %r14b, (%rbx) movq -0x38(%rbp), %rax addq %rax, %rbx incq %rbx addq %rsi, %r12 movl %r13d, %r14d movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x29080 addq %r14, %r12 addq %r14, %rbx jmp 0x571ba movq -0x58(%rbp), %r14 movq (%r14), %rcx movq -0x50(%rbp), %r15 jmp 0x57309 movq %rbx, %rcx movl %ebx, %edx subl %ecx, %edx movl %edx, 0x10(%r14) movl $0x0, 0x18(%r14) movzwl 0x14(%rax), %eax testb $0x2, -0x44(%rbp) je 0x57350 movl %eax, %ecx testb $0x1, -0x1(%r12,%rcx) je 0x57350 movzbl (%r12,%rcx), %ecx leal -0xf8(%rcx), %edx cmpl $0xf3, %ecx movl $0x1, %ecx cmovael %edx, %ecx addl %ecx, %eax movl $0x100000, 0x18(%r14) # imm = 0x100000 movl %eax, 0x14(%r14) movq -0x60(%rbp), %r13 addl %eax, %r13d movq %rbx, %rdi movq %r12, %rsi movq %r13, %rdx callq 0x29120 addq %r13, %r12 movq %r12, (%r15) movl 0x14(%r14), %eax addl 0x10(%r14), %eax jmp 0x5738c movq -0x30(%rbp), %rax movq (%rax), %rdi movl $0x7e, %esi callq 0x3664e xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_get_pack_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r15, rcx mov [rbp+var_60], rdx mov [rbp+var_44], esi mov r14, rdi mov r12, [rcx] mov rbx, [rdi] mov rcx, [rdi+8] mov rax, [rcx+0C0h] cmp byte ptr [rax+18h], 0 jz loc_57306 mov [rbp+var_30], rcx mov [rbp+var_50], r15 mov [rbp+var_58], r14 loc_57092: mov r15, rax movzx ecx, word ptr [rax+12h] movzx edx, cx test dl, 2 jnz short loc_570E3 test dl, 10h jz short loc_570BF mov al, [r12] inc r12 mov [rbx], al inc rbx test al, al jz loc_571BA movzx ecx, word ptr [r15+12h] loc_570BF: test cl, 29h jz loc_57179 movzx ecx, byte ptr [r12] cmp ecx, 0FFh jz loc_5718F mov eax, 1 jmp loc_571A1 loc_570E3: movzx edi, byte ptr [r12] movzx esi, word ptr [r15+14h] cmp esi, 7Fh jb short loc_57109 movzx r8d, byte ptr [r12+1] mov eax, edi and eax, 7Fh shl eax, 8 or eax, r8d add r12, 2 jmp short loc_57111 loc_57109: inc r12 mov eax, edi and eax, 7Fh loc_57111: test dil, dil js short loc_57149 test cl, 10h jz short loc_57130 test eax, eax jz loc_571F1 dec eax mov byte ptr [rbx], 1 inc rbx movzx esi, word ptr [r15+14h] loc_57130: movzx ecx, si cmp eax, ecx ja loc_57379 cmp eax, 0FEh ja short loc_57180 mov [rbx], al inc rbx jmp short loc_571A3 loc_57149: cmp eax, esi ja loc_57379 test eax, eax jz short loc_571CE bt edx, 4 adc rbx, 0 movzx r13d, byte ptr [r12] cmp r13d, 0FFh jz loc_571F9 mov esi, 1 jmp loc_5720C loc_57179: movzx eax, word ptr [r15+14h] jmp short loc_571A3 loc_57180: mov byte ptr [rbx], 0FFh mov [rbx+2], al mov [rbx+1], ah add rbx, 3 jmp short loc_571A3 loc_5718F: movzx eax, word ptr [r12+1] rol ax, 8 movzx ecx, ax mov eax, 3 loc_571A1: add eax, ecx loc_571A3: mov r14d, eax mov rdi, rbx mov rsi, r12 mov rdx, r14 call _memcpy add rbx, r14 add r12, r14 loc_571BA: lea rax, [r15+20h] cmp byte ptr [r15+38h], 0 jnz loc_57092 jmp loc_572F9 loc_571CE: test cl, 10h jz short loc_571D9 mov byte ptr [rbx], 1 inc rbx loc_571D9: movzx eax, byte ptr [rbx] cmp eax, 0FFh jz loc_57269 mov ecx, 1 jmp loc_57279 loc_571F1: mov byte ptr [rbx], 0 inc rbx jmp short loc_571BA loc_571F9: movzx ecx, word ptr [r12+1] rol cx, 8 movzx r13d, cx mov esi, 3 loc_5720C: lea ecx, [rax+r13] mov dl, [rbx] cmp ecx, 0FFh jb short loc_57257 cmp dl, 0FFh jz short loc_57293 mov edx, eax lea r14, [rbx+rdx] add r14, 3 mov [rbp+var_40], rsi lea rsi, [rbx+rdx] inc rsi mov rdi, r14 mov dword ptr [rbp+var_38], ecx call bmove_upp mov rsi, [rbp+var_40] mov byte ptr [rbx], 0FFh mov eax, dword ptr [rbp+var_38] mov [rbx+2], al mov [rbx+1], ah mov rbx, r14 jmp loc_572DA loc_57257: mov r14d, ecx mov ecx, 1 cmp dl, 0FFh jz short loc_572B2 mov rdx, rbx jmp short loc_572A5 loc_57269: movzx eax, word ptr [rbx+1] rol ax, 8 movzx eax, ax mov ecx, 3 loc_57279: movzx edx, word ptr [r15+14h] cmp eax, edx ja loc_57379 add rbx, rcx mov eax, eax add rbx, rax jmp loc_571BA loc_57293: lea rdx, [rbx+1] mov [rbx+2], cl shr ecx, 8 mov r14d, ecx mov ecx, 3 loc_572A5: mov [rdx], r14b mov eax, eax add rax, rcx add rbx, rax jmp short loc_572DA loc_572B2: lea rdi, [rbx+1] mov [rbp+var_40], rsi lea rsi, [rbx+3] mov edx, eax mov [rbp+var_38], rdx call _memmove mov rsi, [rbp+var_40] mov [rbx], r14b mov rax, [rbp+var_38] add rbx, rax inc rbx loc_572DA: add r12, rsi mov r14d, r13d mov rdi, rbx mov rsi, r12 mov rdx, r14 call _memcpy add r12, r14 add rbx, r14 jmp loc_571BA loc_572F9: mov r14, [rbp+var_58] mov rcx, [r14] mov r15, [rbp+var_50] jmp short loc_57309 loc_57306: mov rcx, rbx loc_57309: mov edx, ebx sub edx, ecx mov [r14+10h], edx mov dword ptr [r14+18h], 0 movzx eax, word ptr [rax+14h] test byte ptr [rbp+var_44], 2 jz short loc_57350 mov ecx, eax test byte ptr [r12+rcx-1], 1 jz short loc_57350 movzx ecx, byte ptr [r12+rcx] lea edx, [rcx-0F8h] cmp ecx, 0F3h mov ecx, 1 cmovnb ecx, edx add eax, ecx mov dword ptr [r14+18h], offset xmmword_100000 loc_57350: mov [r14+14h], eax mov r13, [rbp+var_60] add r13d, eax mov rdi, rbx mov rsi, r12 mov rdx, r13 call _memmove add r12, r13 mov [r15], r12 mov eax, [r14+14h] add eax, [r14+10h] jmp short loc_5738C loc_57379: mov rax, [rbp+var_30] mov rdi, [rax] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share xor eax, eax loc_5738C: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_get_pack_key(unsigned __int8 **a1, char a2, int a3, unsigned __int8 **a4, long long a5, int a6) { _QWORD *v6; // r15 _DWORD *v7; // r14 unsigned __int8 *v8; // r12 unsigned __int8 *v9; // rbx long long v10; // rax long long v11; // r15 long long v12; // rcx long long v13; // rdx unsigned __int8 v14; // al int v15; // ecx int v16; // eax char v17; // di unsigned int v18; // esi unsigned int v19; // eax unsigned __int8 *v20; // rbx unsigned int v21; // r13d long long v22; // rsi long long v23; // r14 unsigned int v24; // eax unsigned __int8 v25; // dl long long v26; // r14 long long v27; // rbx unsigned __int8 v28; // r14 long long v29; // rcx unsigned __int8 *v30; // rdx unsigned __int8 *v31; // r12 long long v32; // rcx int v33; // eax unsigned int v34; // ecx int v35; // edx bool v36; // cf int v37; // ecx long long v38; // r13 __int16 v44; // [rsp+28h] [rbp-38h] long long v45; // [rsp+28h] [rbp-38h] long long *v46; // [rsp+30h] [rbp-30h] v6 = a4; v7 = a1; v8 = *a4; v9 = *a1; v10 = *((_QWORD *)a1[1] + 24); if ( *(_BYTE *)(v10 + 24) ) { v46 = (long long *)a1[1]; while ( 1 ) { v11 = v10; v12 = *(unsigned __int16 *)(v10 + 18); v13 = (unsigned __int16)v12; if ( (v12 & 2) != 0 ) { v17 = *v8; v18 = *(unsigned __int16 *)(v10 + 20); if ( v18 < 0x7F ) { ++v8; v19 = v17 & 0x7F; } else { a5 = v8[1]; v19 = a5 | ((v17 & 0x7F) << 8); v8 += 2; } if ( v17 >= 0 ) { if ( (v12 & 0x10) != 0 ) { if ( !v19 ) { *v9++ = 0; goto LABEL_29; } --v19; *v9++ = 1; LOWORD(v18) = *(_WORD *)(v11 + 20); } v12 = (unsigned __int16)v18; if ( v19 > (unsigned __int16)v18 ) goto LABEL_56; if ( v19 > 0xFE ) { *v9 = -1; v9[2] = v19; v9[1] = BYTE1(v19); v9 += 3; } else { *v9++ = v19; } goto LABEL_28; } if ( v19 > v18 ) goto LABEL_56; if ( v19 ) { v20 = &v9[(v12 & 0x10) != 0]; v21 = *v8; if ( v21 == 255 ) { v21 = (unsigned __int16)__ROL2__(*(_WORD *)(v8 + 1), 8); v22 = 3LL; } else { v22 = 1LL; } v25 = *v20; if ( v19 + v21 < 0xFF ) { v28 = v19 + v21; v29 = 1LL; if ( v25 == 0xFF ) { v45 = v19; memmove(v20 + 1, v20 + 3, v19); *v20 = v28; v27 = (long long)&v20[v45 + 1]; goto LABEL_48; } v30 = v20; } else { if ( v25 != 0xFF ) { v26 = (long long)&v20[v19 + 3]; v44 = v19 + v21; bmove_upp(v26, &v20[v19 + 1]); *v20 = -1; v20[2] = v44; v20[1] = HIBYTE(v44); v27 = v26; LABEL_48: v31 = &v8[v22]; memcpy(v27, v31, v21); v8 = &v31[v21]; v9 = (unsigned __int8 *)(v21 + v27); goto LABEL_29; } v30 = v20 + 1; v20[2] = v19 + v21; v28 = (unsigned __int16)(v19 + v21) >> 8; v29 = 3LL; } *v30 = v28; v27 = (long long)&v20[v29 + v19]; goto LABEL_48; } if ( (v12 & 0x10) != 0 ) *v9++ = 1; v24 = *v9; if ( v24 == 255 ) { v24 = (unsigned __int16)__ROL2__(*(_WORD *)(v9 + 1), 8); v12 = 3LL; } else { v12 = 1LL; } v13 = *(unsigned __int16 *)(v11 + 20); if ( v24 > (unsigned int)v13 ) { LABEL_56: ma_set_fatal_error_with_share(*v46, 126, v13, v12, a5, a6); return 0LL; } v9 += v24 + v12; } else { if ( (v12 & 0x10) == 0 ) goto LABEL_7; v14 = *v8++; *v9++ = v14; if ( v14 ) { LOWORD(v12) = *(_WORD *)(v11 + 18); LABEL_7: if ( (v12 & 0x29) != 0 ) { v15 = *v8; if ( v15 == 255 ) { v15 = (unsigned __int16)__ROL2__(*(_WORD *)(v8 + 1), 8); v16 = 3; } else { v16 = 1; } v19 = v15 + v16; } else { v19 = *(unsigned __int16 *)(v11 + 20); } LABEL_28: v23 = v19; memcpy(v9, v8, v19); v9 += v23; v8 += v23; } } LABEL_29: v10 = v11 + 32; if ( !*(_BYTE *)(v11 + 56) ) { v7 = a1; v32 = (long long)*a1; v6 = a4; goto LABEL_50; } } } v32 = (long long)*a1; LABEL_50: v7[4] = (_DWORD)v9 - v32; v7[6] = 0; v33 = *(unsigned __int16 *)(v10 + 20); if ( (a2 & 2) != 0 && (v8[v33 - 1] & 1) != 0 ) { v34 = v8[v33]; v35 = v34 - 248; v36 = v34 < 0xF3; v37 = 1; if ( !v36 ) v37 = v35; v33 += v37; v7[6] = (_DWORD)&xmmword_100000; } v7[5] = v33; v38 = (unsigned int)(v33 + a3); memmove(v9, v8, v38); *v6 = &v8[v38]; return (unsigned int)(v7[4] + v7[5]); }
_ma_get_pack_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R15,RCX MOV qword ptr [RBP + -0x60],RDX MOV dword ptr [RBP + -0x44],ESI MOV R14,RDI MOV R12,qword ptr [RCX] MOV RBX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RCX + 0xc0] CMP byte ptr [RAX + 0x18],0x0 JZ 0x00157306 MOV qword ptr [RBP + -0x30],RCX MOV qword ptr [RBP + -0x50],R15 MOV qword ptr [RBP + -0x58],R14 LAB_00157092: MOV R15,RAX MOVZX ECX,word ptr [RAX + 0x12] MOVZX EDX,CX TEST DL,0x2 JNZ 0x001570e3 TEST DL,0x10 JZ 0x001570bf MOV AL,byte ptr [R12] INC R12 MOV byte ptr [RBX],AL INC RBX TEST AL,AL JZ 0x001571ba MOVZX ECX,word ptr [R15 + 0x12] LAB_001570bf: TEST CL,0x29 JZ 0x00157179 MOVZX ECX,byte ptr [R12] CMP ECX,0xff JZ 0x0015718f MOV EAX,0x1 JMP 0x001571a1 LAB_001570e3: MOVZX EDI,byte ptr [R12] MOVZX ESI,word ptr [R15 + 0x14] CMP ESI,0x7f JC 0x00157109 MOVZX R8D,byte ptr [R12 + 0x1] MOV EAX,EDI AND EAX,0x7f SHL EAX,0x8 OR EAX,R8D ADD R12,0x2 JMP 0x00157111 LAB_00157109: INC R12 MOV EAX,EDI AND EAX,0x7f LAB_00157111: TEST DIL,DIL JS 0x00157149 TEST CL,0x10 JZ 0x00157130 TEST EAX,EAX JZ 0x001571f1 DEC EAX MOV byte ptr [RBX],0x1 INC RBX MOVZX ESI,word ptr [R15 + 0x14] LAB_00157130: MOVZX ECX,SI CMP EAX,ECX JA 0x00157379 CMP EAX,0xfe JA 0x00157180 MOV byte ptr [RBX],AL INC RBX JMP 0x001571a3 LAB_00157149: CMP EAX,ESI JA 0x00157379 TEST EAX,EAX JZ 0x001571ce BT EDX,0x4 ADC RBX,0x0 MOVZX R13D,byte ptr [R12] CMP R13D,0xff JZ 0x001571f9 MOV ESI,0x1 JMP 0x0015720c LAB_00157179: MOVZX EAX,word ptr [R15 + 0x14] JMP 0x001571a3 LAB_00157180: MOV byte ptr [RBX],0xff MOV byte ptr [RBX + 0x2],AL MOV byte ptr [RBX + 0x1],AH ADD RBX,0x3 JMP 0x001571a3 LAB_0015718f: MOVZX EAX,word ptr [R12 + 0x1] ROL AX,0x8 MOVZX ECX,AX MOV EAX,0x3 LAB_001571a1: ADD EAX,ECX LAB_001571a3: MOV R14D,EAX MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 CALL 0x00129080 ADD RBX,R14 ADD R12,R14 LAB_001571ba: LEA RAX,[R15 + 0x20] CMP byte ptr [R15 + 0x38],0x0 JNZ 0x00157092 JMP 0x001572f9 LAB_001571ce: TEST CL,0x10 JZ 0x001571d9 MOV byte ptr [RBX],0x1 INC RBX LAB_001571d9: MOVZX EAX,byte ptr [RBX] CMP EAX,0xff JZ 0x00157269 MOV ECX,0x1 JMP 0x00157279 LAB_001571f1: MOV byte ptr [RBX],0x0 INC RBX JMP 0x001571ba LAB_001571f9: MOVZX ECX,word ptr [R12 + 0x1] ROL CX,0x8 MOVZX R13D,CX MOV ESI,0x3 LAB_0015720c: LEA ECX,[RAX + R13*0x1] MOV DL,byte ptr [RBX] CMP ECX,0xff JC 0x00157257 CMP DL,0xff JZ 0x00157293 MOV EDX,EAX LEA R14,[RBX + RDX*0x1] ADD R14,0x3 MOV qword ptr [RBP + -0x40],RSI LEA RSI,[RBX + RDX*0x1] INC RSI MOV RDI,R14 MOV dword ptr [RBP + -0x38],ECX CALL 0x001aa8a4 MOV RSI,qword ptr [RBP + -0x40] MOV byte ptr [RBX],0xff MOV EAX,dword ptr [RBP + -0x38] MOV byte ptr [RBX + 0x2],AL MOV byte ptr [RBX + 0x1],AH MOV RBX,R14 JMP 0x001572da LAB_00157257: MOV R14D,ECX MOV ECX,0x1 CMP DL,0xff JZ 0x001572b2 MOV RDX,RBX JMP 0x001572a5 LAB_00157269: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX MOV ECX,0x3 LAB_00157279: MOVZX EDX,word ptr [R15 + 0x14] CMP EAX,EDX JA 0x00157379 ADD RBX,RCX MOV EAX,EAX ADD RBX,RAX JMP 0x001571ba LAB_00157293: LEA RDX,[RBX + 0x1] MOV byte ptr [RBX + 0x2],CL SHR ECX,0x8 MOV R14D,ECX MOV ECX,0x3 LAB_001572a5: MOV byte ptr [RDX],R14B MOV EAX,EAX ADD RAX,RCX ADD RBX,RAX JMP 0x001572da LAB_001572b2: LEA RDI,[RBX + 0x1] MOV qword ptr [RBP + -0x40],RSI LEA RSI,[RBX + 0x3] MOV EDX,EAX MOV qword ptr [RBP + -0x38],RDX CALL 0x00129120 MOV RSI,qword ptr [RBP + -0x40] MOV byte ptr [RBX],R14B MOV RAX,qword ptr [RBP + -0x38] ADD RBX,RAX INC RBX LAB_001572da: ADD R12,RSI MOV R14D,R13D MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 CALL 0x00129080 ADD R12,R14 ADD RBX,R14 JMP 0x001571ba LAB_001572f9: MOV R14,qword ptr [RBP + -0x58] MOV RCX,qword ptr [R14] MOV R15,qword ptr [RBP + -0x50] JMP 0x00157309 LAB_00157306: MOV RCX,RBX LAB_00157309: MOV EDX,EBX SUB EDX,ECX MOV dword ptr [R14 + 0x10],EDX MOV dword ptr [R14 + 0x18],0x0 MOVZX EAX,word ptr [RAX + 0x14] TEST byte ptr [RBP + -0x44],0x2 JZ 0x00157350 MOV ECX,EAX TEST byte ptr [R12 + RCX*0x1 + -0x1],0x1 JZ 0x00157350 MOVZX ECX,byte ptr [R12 + RCX*0x1] LEA EDX,[RCX + -0xf8] CMP ECX,0xf3 MOV ECX,0x1 CMOVNC ECX,EDX ADD EAX,ECX MOV dword ptr [R14 + 0x18],0x100000 LAB_00157350: MOV dword ptr [R14 + 0x14],EAX MOV R13,qword ptr [RBP + -0x60] ADD R13D,EAX MOV RDI,RBX MOV RSI,R12 MOV RDX,R13 CALL 0x00129120 ADD R12,R13 MOV qword ptr [R15],R12 MOV EAX,dword ptr [R14 + 0x14] ADD EAX,dword ptr [R14 + 0x10] JMP 0x0015738c LAB_00157379: MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX] MOV ESI,0x7e CALL 0x0013664e XOR EAX,EAX LAB_0015738c: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int _ma_get_pack_key(int8 *param_1,uint param_2,int param_3,int8 *param_4) { char *pcVar1; uint uVar2; ushort uVar3; ushort uVar4; int8 *puVar5; int iVar6; uint uVar7; long lVar8; long lVar9; byte *pbVar10; long lVar11; byte *__src; uint uVar12; byte bVar13; byte bVar14; ulong uVar15; byte *pbVar16; __src = (byte *)*param_4; pbVar10 = (byte *)*param_1; puVar5 = (int8 *)param_1[1]; lVar8 = puVar5[0x18]; if (*(char *)(lVar8 + 0x18) == '\0') { iVar6 = (int)pbVar10; } else { do { uVar3 = *(ushort *)(lVar8 + 0x12); if ((uVar3 & 2) == 0) { if ((uVar3 & 0x10) != 0) { bVar14 = *__src; __src = __src + 1; *pbVar10 = bVar14; pbVar10 = pbVar10 + 1; if (bVar14 == 0) goto LAB_001571ba; uVar3 = *(ushort *)(lVar8 + 0x12); } if ((uVar3 & 0x29) == 0) { uVar7 = (uint)*(ushort *)(lVar8 + 0x14); } else { uVar7 = (uint)*__src; if (*__src == 0xff) { uVar7 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8); iVar6 = 3; } else { iVar6 = 1; } uVar7 = iVar6 + uVar7; } LAB_001571a3: uVar15 = (ulong)uVar7; memcpy(pbVar10,__src,uVar15); pbVar10 = pbVar10 + uVar15; __src = __src + uVar15; } else { bVar14 = *__src; uVar4 = *(ushort *)(lVar8 + 0x14); if (uVar4 < 0x7f) { __src = __src + 1; uVar7 = bVar14 & 0x7f; } else { uVar7 = (bVar14 & 0x7f) << 8 | (uint)__src[1]; __src = __src + 2; } if (-1 < (char)bVar14) { if ((uVar3 & 0x10) != 0) { if (uVar7 == 0) { *pbVar10 = 0; pbVar10 = pbVar10 + 1; goto LAB_001571ba; } uVar7 = uVar7 - 1; *pbVar10 = 1; pbVar10 = pbVar10 + 1; uVar4 = *(ushort *)(lVar8 + 0x14); } if (uVar4 < uVar7) { LAB_00157379: _ma_set_fatal_error_with_share(*puVar5,0x7e); return 0; } if (uVar7 < 0xff) { *pbVar10 = (byte)uVar7; pbVar10 = pbVar10 + 1; } else { *pbVar10 = 0xff; pbVar10[2] = (byte)uVar7; pbVar10[1] = (byte)(uVar7 >> 8); pbVar10 = pbVar10 + 3; } goto LAB_001571a3; } if (uVar4 <= uVar7 && uVar7 != uVar4) goto LAB_00157379; if (uVar7 == 0) { if ((uVar3 & 0x10) != 0) { *pbVar10 = 1; pbVar10 = pbVar10 + 1; } uVar7 = (uint)*pbVar10; if (*pbVar10 == 0xff) { uVar7 = (uint)(ushort)(*(ushort *)(pbVar10 + 1) << 8 | *(ushort *)(pbVar10 + 1) >> 8); lVar11 = 3; } else { lVar11 = 1; } if (*(ushort *)(lVar8 + 0x14) < uVar7) goto LAB_00157379; pbVar10 = pbVar10 + (ulong)uVar7 + lVar11; goto LAB_001571ba; } pbVar10 = pbVar10 + ((uVar3 >> 4 & 1) != 0); uVar12 = (uint)*__src; if (uVar12 == 0xff) { uVar12 = (uint)(ushort)(*(ushort *)(__src + 1) << 8 | *(ushort *)(__src + 1) >> 8); lVar11 = 3; } else { lVar11 = 1; } uVar2 = uVar7 + uVar12; bVar14 = (byte)uVar2; if (uVar2 < 0xff) { lVar9 = 1; pbVar16 = pbVar10; if (*pbVar10 != 0xff) goto LAB_001572a5; memmove(pbVar10 + 1,pbVar10 + 3,(ulong)uVar7); *pbVar10 = bVar14; pbVar16 = pbVar10 + (ulong)uVar7 + 1; } else { bVar13 = (byte)(uVar2 >> 8); if (*pbVar10 == 0xff) { pbVar10[2] = bVar14; lVar9 = 3; pbVar16 = pbVar10 + 1; bVar14 = bVar13; LAB_001572a5: *pbVar16 = bVar14; pbVar16 = pbVar10 + (ulong)uVar7 + lVar9; } else { pbVar16 = pbVar10 + (ulong)uVar7 + 3; bmove_upp(pbVar16,pbVar10 + (ulong)uVar7 + 1); *pbVar10 = 0xff; pbVar10[2] = bVar14; pbVar10[1] = bVar13; } } uVar15 = (ulong)uVar12; memcpy(pbVar16,__src + lVar11,uVar15); __src = __src + lVar11 + uVar15; pbVar10 = pbVar16 + uVar15; } LAB_001571ba: lVar11 = lVar8 + 0x20; pcVar1 = (char *)(lVar8 + 0x38); lVar8 = lVar11; } while (*pcVar1 != '\0'); iVar6 = (int)*param_1; } *(int *)(param_1 + 2) = (int)pbVar10 - iVar6; *(int4 *)(param_1 + 3) = 0; uVar7 = (uint)*(ushort *)(lVar8 + 0x14); if ((param_2 & 2) != 0) { uVar12 = (uint)*(ushort *)(lVar8 + 0x14); if ((__src[(ulong)uVar12 - 1] & 1) != 0) { iVar6 = 1; if (0xf2 < __src[uVar12]) { iVar6 = __src[uVar12] - 0xf8; } uVar7 = uVar12 + iVar6; *(int4 *)(param_1 + 3) = 0x100000; } } *(uint *)((long)param_1 + 0x14) = uVar7; memmove(pbVar10,__src,(ulong)(param_3 + uVar7)); *param_4 = __src + (param_3 + uVar7); return *(int *)((long)param_1 + 0x14) + *(int *)(param_1 + 2); }
39,714
my_thread_destroy_common_mutex
eloqsql/mysys/my_thr_init.c
void my_thread_destroy_common_mutex(void) { mysql_mutex_destroy(&THR_LOCK_open); mysql_mutex_destroy(&THR_LOCK_lock); mysql_mutex_destroy(&THR_LOCK_myisam); mysql_mutex_destroy(&THR_LOCK_myisam_mmap); mysql_mutex_destroy(&THR_LOCK_heap); mysql_mutex_destroy(&THR_LOCK_net); mysql_mutex_destroy(&THR_LOCK_charset); #if !defined(HAVE_LOCALTIME_R) || !defined(HAVE_GMTIME_R) mysql_mutex_destroy(&LOCK_localtime_r); #endif }
O0
c
my_thread_destroy_common_mutex: pushq %rbp movq %rsp, %rbp leaq 0xb90155(%rip), %rdi # 0xc8e710 callq 0xfe610 leaq 0xb90191(%rip), %rdi # 0xc8e758 callq 0xfe610 leaq 0xb901cd(%rip), %rdi # 0xc8e7a0 callq 0xfe610 leaq 0xb90209(%rip), %rdi # 0xc8e7e8 callq 0xfe610 leaq 0xb90245(%rip), %rdi # 0xc8e830 callq 0xfe610 leaq 0xb90281(%rip), %rdi # 0xc8e878 callq 0xfe610 leaq 0xb902bd(%rip), %rdi # 0xc8e8c0 callq 0xfe610 popq %rbp retq nopw (%rax,%rax)
my_thread_destroy_common_mutex: push rbp mov rbp, rsp lea rdi, THR_LOCK_open call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_lock call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_myisam call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_myisam_mmap call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_heap call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_net call inline_mysql_mutex_destroy_9 lea rdi, THR_LOCK_charset call inline_mysql_mutex_destroy_9 pop rbp retn
long long my_thread_destroy_common_mutex() { inline_mysql_mutex_destroy_9(&THR_LOCK_open); inline_mysql_mutex_destroy_9(&THR_LOCK_lock); inline_mysql_mutex_destroy_9(&THR_LOCK_myisam); inline_mysql_mutex_destroy_9(&THR_LOCK_myisam_mmap); inline_mysql_mutex_destroy_9(&THR_LOCK_heap); inline_mysql_mutex_destroy_9(&THR_LOCK_net); return inline_mysql_mutex_destroy_9(&THR_LOCK_charset); }
my_thread_destroy_common_mutex: PUSH RBP MOV RBP,RSP LEA RDI,[0xd8e710] CALL 0x001fe610 LEA RDI,[0xd8e758] CALL 0x001fe610 LEA RDI,[0xd8e7a0] CALL 0x001fe610 LEA RDI,[0xd8e7e8] CALL 0x001fe610 LEA RDI,[0xd8e830] CALL 0x001fe610 LEA RDI,[0xd8e878] CALL 0x001fe610 LEA RDI,[0xd8e8c0] CALL 0x001fe610 POP RBP RET
void my_thread_destroy_common_mutex(void) { inline_mysql_mutex_destroy(THR_LOCK_open); inline_mysql_mutex_destroy(THR_LOCK_lock); inline_mysql_mutex_destroy(THR_LOCK_myisam); inline_mysql_mutex_destroy(THR_LOCK_myisam_mmap); inline_mysql_mutex_destroy(THR_LOCK_heap); inline_mysql_mutex_destroy(THR_LOCK_net); inline_mysql_mutex_destroy(THR_LOCK_charset); return; }
39,715
rw_pr_wrlock
eloqsql/mysys/thr_rwlock.c
int rw_pr_wrlock(rw_pr_lock_t *rwlock) { pthread_mutex_lock(&rwlock->lock); if (rwlock->active_readers != 0) { /* There are active readers. We have to wait until they are gone. */ rwlock->writers_waiting_readers++; while (rwlock->active_readers != 0) pthread_cond_wait(&rwlock->no_active_readers, &rwlock->lock); rwlock->writers_waiting_readers--; } /* We own 'lock' mutex so there is no active writers. Also there are no active readers. This means that we can grant wr-lock. Not releasing 'lock' mutex until unlock will block both requests for rd and wr-locks. Set 'active_writer' flag to simplify unlock. Thanks to the fact wr-lock/unlock in the absence of contention from readers is essentially mutex lock/unlock with a few simple checks make this rwlock implementation wr-lock optimized. */ rwlock->active_writer= TRUE; #ifdef SAFE_MUTEX rwlock->writer_thread= pthread_self(); #endif return 0; }
O0
c
rw_pr_wrlock: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x2a220 movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) je 0xfa2e6 movq -0x8(%rbp), %rax movl 0x5c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x5c(%rax) movq -0x8(%rbp), %rax cmpl $0x0, 0x58(%rax) je 0xfa2d9 movq -0x8(%rbp), %rdi addq $0x28, %rdi movq -0x8(%rbp), %rsi callq 0x2a400 jmp 0xfa2bc movq -0x8(%rbp), %rax movl 0x5c(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x5c(%rax) movq -0x8(%rbp), %rax movb $0x1, 0x60(%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rw_pr_wrlock: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _pthread_mutex_lock mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jz short loc_FA2E6 mov rax, [rbp+var_8] mov ecx, [rax+5Ch] add ecx, 1 mov [rax+5Ch], ecx loc_FA2BC: mov rax, [rbp+var_8] cmp dword ptr [rax+58h], 0 jz short loc_FA2D9 mov rdi, [rbp+var_8] add rdi, 28h ; '(' mov rsi, [rbp+var_8] call _pthread_cond_wait jmp short loc_FA2BC loc_FA2D9: mov rax, [rbp+var_8] mov ecx, [rax+5Ch] add ecx, 0FFFFFFFFh mov [rax+5Ch], ecx loc_FA2E6: mov rax, [rbp+var_8] mov byte ptr [rax+60h], 1 xor eax, eax add rsp, 10h pop rbp retn
long long rw_pr_wrlock(long long a1) { pthread_mutex_lock(a1); if ( *(_DWORD *)(a1 + 88) ) { ++*(_DWORD *)(a1 + 92); while ( *(_DWORD *)(a1 + 88) ) pthread_cond_wait(a1 + 40, a1); --*(_DWORD *)(a1 + 92); } *(_BYTE *)(a1 + 96) = 1; return 0LL; }
rw_pr_wrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JZ 0x001fa2e6 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x5c] ADD ECX,0x1 MOV dword ptr [RAX + 0x5c],ECX LAB_001fa2bc: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x58],0x0 JZ 0x001fa2d9 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x8] CALL 0x0012a400 JMP 0x001fa2bc LAB_001fa2d9: MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x5c] ADD ECX,-0x1 MOV dword ptr [RAX + 0x5c],ECX LAB_001fa2e6: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x60],0x1 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 rw_pr_wrlock(pthread_mutex_t *param_1) { pthread_mutex_lock(param_1); if (*(int *)((long)param_1 + 0x58) != 0) { *(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + 1; while (*(int *)((long)param_1 + 0x58) != 0) { pthread_cond_wait((pthread_cond_t *)(param_1 + 1),param_1); } *(int *)((long)param_1 + 0x5c) = *(int *)((long)param_1 + 0x5c) + -1; } *(int1 *)((long)param_1 + 0x60) = 1; return 0; }
39,716
my_hash_sort_simple
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end; uint16 space_weight= sort_order[' ']; /* Remove all trailing characters that are equal to space. We have to do this to be able to compare 'A ' and 'A' as identical. If the key is long enough, cut the trailing spaces (0x20) using an optimized function implemented in skip_trailing_spaces(). "len > 16" is just some heuristic here. Calling skip_triling_space() for short values is not desirable, because its initialization block may be more expensive than the performance gained. */ end= len > 16 ? skip_trailing_space(key, len) : key + len; /* We removed all trailing characters that are binary equal to space 0x20. Now remove all trailing characters that have weights equal to space. Some 8bit simple collations may have such characters: - cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE - cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE - koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE */ for ( ; key < end ; ) { if (sort_order[*--end] != space_weight) { end++; break; } } my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2); }
O0
c
my_hash_sort_simple: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movzbl 0x20(%rax), %eax movw %ax, -0x3a(%rbp) cmpq $0x10, -0x18(%rbp) jbe 0x41cde movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x41d60 movq %rax, -0x48(%rbp) jmp 0x41cea movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x41d2f movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, %rdx addq $-0x1, %rdx movq %rdx, -0x38(%rbp) movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movzwl -0x3a(%rbp), %ecx cmpl %ecx, %eax je 0x41d2d movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x41d2f jmp 0x41cf2 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x41bd0 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_simple: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_30], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+20h] mov [rbp+var_3A], ax cmp [rbp+var_18], 10h jbe short loc_41CDE mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call skip_trailing_space_2 mov [rbp+var_48], rax jmp short loc_41CEA loc_41CDE: mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_48], rax loc_41CEA: mov rax, [rbp+var_48] mov [rbp+var_38], rax loc_41CF2: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_41D2F mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov rdx, rcx add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rdx movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_3A] cmp eax, ecx jz short loc_41D2D mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_41D2F loc_41D2D: jmp short loc_41CF2 loc_41D2F: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] mov rax, [rbp+var_10] sub rdx, rax mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call my_hash_sort_simple_nopad add rsp, 50h pop rbp retn
_QWORD * my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, _QWORD *a5) { unsigned long long v5; // rcx long long v7; // [rsp+8h] [rbp-48h] __int16 v8; // [rsp+16h] [rbp-3Ah] unsigned long long v9; // [rsp+18h] [rbp-38h] long long v10; // [rsp+20h] [rbp-30h] v10 = *(_QWORD *)(a1 + 88); v8 = *(unsigned __int8 *)(v10 + 32); if ( a3 <= 0x10 ) v7 = (long long)&a2[a3]; else v7 = skip_trailing_space_2(a2, a3); v9 = v7; while ( (unsigned long long)a2 < v9 ) { v5 = v9--; if ( *(unsigned __int8 *)(v10 + *(unsigned __int8 *)(v5 - 1)) != v8 ) return my_hash_sort_simple_nopad(a1, a2, ++v9 - (_QWORD)a2, a4, a5); } return my_hash_sort_simple_nopad(a1, a2, v9 - (_QWORD)a2, a4, a5); }
my_hash_sort_simple: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x20] MOV word ptr [RBP + -0x3a],AX CMP qword ptr [RBP + -0x18],0x10 JBE 0x00141cde MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00141d60 MOV qword ptr [RBP + -0x48],RAX JMP 0x00141cea LAB_00141cde: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX LAB_00141cea: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX LAB_00141cf2: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00141d2f MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,RCX ADD RDX,-0x1 MOV qword ptr [RBP + -0x38],RDX MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,word ptr [RBP + -0x3a] CMP EAX,ECX JZ 0x00141d2d MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x00141d2f LAB_00141d2d: JMP 0x00141cf2 LAB_00141d2f: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x00141bd0 ADD RSP,0x50 POP RBP RET
void my_hash_sort_simple(long param_1,ulong param_2,ulong param_3,int8 param_4, int8 param_5) { char cVar1; long lVar2; ulong uVar3; ulong local_50; ulong local_40; lVar2 = *(long *)(param_1 + 0x58); cVar1 = *(char *)(lVar2 + 0x20); if (param_3 < 0x11) { local_50 = param_2 + param_3; } else { local_50 = skip_trailing_space(param_2,param_3); } local_40 = local_50; uVar3 = local_40; do { local_40 = uVar3; if (local_40 <= param_2) break; uVar3 = local_40 - 1; } while (*(char *)(lVar2 + (ulong)*(byte *)(local_40 - 1)) == cVar1); my_hash_sort_simple_nopad(param_1,param_2,local_40 - param_2,param_4,param_5); return; }
39,717
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O1
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x96272 testb %al, %al je 0x9faf1 movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x96074 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x9fb10 movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax movl $0x10, %edi callq 0x1b450 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x8916a leaq 0x56697(%rip), %rsi # 0xf61cf leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x7af8f movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x1beb0 xorl %ebp, %ebp movq 0x91488(%rip), %rsi # 0x130fe8 movq 0x913e9(%rip), %rdx # 0x130f50 movq %rbx, %rdi callq 0x1bfb0 movq %rax, %r14 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9fb95 movq 0x38(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9fb95 movq %rax, %r14 movb $0x1, %bpl leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9fbb8 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x9fbb8 movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0x9fbc5 movq %rbx, %rdi callq 0x1b670 movq %r14, %rdi callq 0x1c030 nop
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_9FAF1 mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_9FAF1: mov rdi, [rbx+68h] test rdi, rdi jz short loc_9FB10 mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_9FB10: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUndefinedVaria; "Undefined variable: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+68h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9FB95 mov rsi, [rsp+68h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9FB95 mov r14, rax mov bpl, 1 loc_9FB95: lea rax, [rsp+68h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9FBB8 mov rsi, [rsp+68h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9FBB8 mov r14, rax mov bpl, 1 loc_9FBB8: test bpl, bpl jz short loc_9FBC5 mov rdi, rbx; void * call ___cxa_free_exception loc_9FBC5: mov rdi, r14 call __Unwind_Resume
unsigned long long minja::Context::at(minja::Context *this, const minja::Value *a2, __m128d a3) { long long v4; // rdi void *exception; // rbx _BYTE v6[16]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[16]; // [rsp+28h] [rbp-40h] BYREF if ( (unsigned __int8)minja::Value::contains((minja::Context *)((char *)this + 24), a2, a3) ) return minja::Value::at((minja::Context *)((char *)this + 24), a2); v4 = *((_QWORD *)this + 13); if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*(long long ( **)(long long, const minja::Value *))(*(_QWORD *)v4 + 24LL))(v4, a2); }
at: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x18] MOV RDI,R15 CALL 0x00196272 TEST AL,AL JZ 0x0019faf1 MOV RDI,R15 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x00196074 LAB_0019faf1: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x0019fb10 MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP RAX LAB_0019fb10: MOV EDI,0x10 CALL 0x0011b450 MOV RBX,RAX LAB_0019fb1d: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0018916a LAB_0019fb31: LEA RSI,[0x1f61cf] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0017af8f MOV BPL,0x1 LAB_0019fb4a: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x0011beb0 XOR EBP,EBP MOV RSI,qword ptr [0x00230fe8] MOV RDX,qword ptr [0x00230f50] MOV RDI,RBX CALL 0x0011bfb0
/* minja::Context::at(minja::Value const&) */ void __thiscall minja::Context::at(Context *this,Value *param_1) { long *plVar1; char cVar2; runtime_error *this_00; int1 local_60 [32]; string local_40 [32]; cVar2 = Value::contains((Value *)(this + 0x18),param_1); if (cVar2 != '\0') { Value::at((Value *)(this + 0x18),param_1); return; } plVar1 = *(long **)(this + 0x68); if (plVar1 != (long *)0x0) { /* WARNING: Could not recover jumptable at 0x0019fb0e. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 0x18))(plVar1,param_1); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019fb1d to 0019fb30 has its CatchHandler @ 0019fbb2 */ Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 0019fb31 to 0019fb46 has its CatchHandler @ 0019fb8f */ std::operator+((char *)local_40,(string *)"Undefined variable: "); /* try { // try from 0019fb4a to 0019fb6e has its CatchHandler @ 0019fb6f */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f50); }
39,718
minja::Context::at(minja::Value const&)
monkey531[P]llama/common/minja.hpp
virtual Value & at(const Value & key) { if (values_.contains(key)) return values_.at(key); if (parent_) return parent_->at(key); throw std::runtime_error("Undefined variable: " + key.dump()); }
O2
cpp
minja::Context::at(minja::Value const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x18(%rdi), %r15 movq %r15, %rdi callq 0x6ea88 testb %al, %al je 0x75fc9 movq %r15, %rdi movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x6e8f6 movq 0x68(%rbx), %rdi testq %rdi, %rdi je 0x75fe8 movq (%rdi), %rax movq 0x18(%rax), %rax movq %r14, %rsi addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmpq *%rax pushq $0x10 popq %rdi callq 0x23470 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x64766 leaq 0x401a3(%rip), %rsi # 0xb61af leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x59ebe movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x23ed0 xorl %ebp, %ebp movq 0x88fb4(%rip), %rsi # 0xfefe8 movq 0x88f0d(%rip), %rdx # 0xfef48 movq %rbx, %rdi callq 0x23fb0 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x242a8 jmp 0x76058 movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x242a8 testb %bpl, %bpl jne 0x7606c jmp 0x76074 movq %rax, %r14 movq %rbx, %rdi callq 0x23690 movq %r14, %rdi callq 0x24030
_ZN5minja7Context2atERKNS_5ValueE: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi lea r15, [rdi+18h] mov rdi, r15; this call _ZNK5minja5Value8containsERKS0_; minja::Value::contains(minja::Value const&) test al, al jz short loc_75FC9 mov rdi, r15; this mov rsi, r14; minja::Value * add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp _ZN5minja5Value2atERKS0_; minja::Value::at(minja::Value const&) loc_75FC9: mov rdi, [rbx+68h] test rdi, rdi jz short loc_75FE8 mov rax, [rdi] mov rax, [rax+18h] mov rsi, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp jmp rax loc_75FE8: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUndefinedVaria; "Undefined variable: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_76058 mov r14, rax mov bpl, 1 loc_76058: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7606C jmp short loc_76074 mov r14, rax loc_7606C: mov rdi, rbx; void * call ___cxa_free_exception loc_76074: mov rdi, r14 call __Unwind_Resume
long long minja::Context::at(unsigned __int8 ***this, const minja::Value *a2, __m128d a3) { unsigned __int8 **v4; // rdi void *exception; // rbx _BYTE v6[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v7[64]; // [rsp+28h] [rbp-40h] BYREF if ( (unsigned __int8)minja::Value::contains(this + 3, a2, a3) ) return minja::Value::at((minja::Value *)(this + 3), a2); v4 = this[13]; if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v6, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v7, (long long)"Undefined variable: ", (long long)v6); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return (*((long long ( **)(unsigned __int8 **, const minja::Value *))*v4 + 3))(v4, a2); }
at: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x18] MOV RDI,R15 CALL 0x0016ea88 TEST AL,AL JZ 0x00175fc9 MOV RDI,R15 MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP 0x0016e8f6 LAB_00175fc9: MOV RDI,qword ptr [RBX + 0x68] TEST RDI,RDI JZ 0x00175fe8 MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] MOV RSI,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP JMP RAX LAB_00175fe8: PUSH 0x10 POP RDI CALL 0x00123470 MOV RBX,RAX LAB_00175ff3: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00164766 LAB_00176005: LEA RSI,[0x1b61af] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00159ebe MOV BPL,0x1 LAB_0017601e: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x00123ed0 XOR EBP,EBP MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,RBX CALL 0x00123fb0
/* minja::Context::at(minja::Value const&) */ void __thiscall minja::Context::at(Context *this,Value *param_1) { long *plVar1; char cVar2; runtime_error *this_00; int1 local_60 [32]; string local_40 [32]; cVar2 = Value::contains((Value *)(this + 0x18),param_1); if (cVar2 != '\0') { Value::at((Value *)(this + 0x18),param_1); return; } plVar1 = *(long **)(this + 0x68); if (plVar1 != (long *)0x0) { /* WARNING: Could not recover jumptable at 0x00175fe6. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*plVar1 + 0x18))(plVar1,param_1); return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00175ff3 to 00176004 has its CatchHandler @ 00176069 */ Value::dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 00176005 to 0017601a has its CatchHandler @ 00176052 */ std::operator+((char *)local_40,(string *)"Undefined variable: "); /* try { // try from 0017601e to 00176042 has its CatchHandler @ 00176043 */ std::runtime_error::runtime_error(this_00,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); }
39,719
add_compiled_extra_collation
eloqsql/mysys/charset.c
void add_compiled_extra_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); cs->cs_name= org->cs_name; } }
O0
c
add_compiled_extra_collation: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) jmp 0x6d3ee movq -0x8(%rbp), %rdx movq -0x8(%rbp), %rax movl (%rax), %eax movl %eax, %ecx leaq 0x39051f(%rip), %rax # 0x3fd920 movq %rdx, (%rax,%rcx,8) movq -0x8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x200, %ecx # imm = 0x200 movl %ecx, 0xc(%rax) movq -0x8(%rbp), %rsi leaq 0x394500(%rip), %rdi # 0x401920 callq 0x72550 cmpb $0x0, %al je 0x6d461 movq -0x8(%rbp), %rax movq 0x10(%rax), %rsi movq -0x8(%rbp), %rax movq 0x18(%rax), %rdx leaq 0x3944e0(%rip), %rdi # 0x401920 callq 0x72160 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
add_compiled_extra_collation: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi jmp short $+2 loc_6D3EE: mov rdx, [rbp+var_8] mov rax, [rbp+var_8] mov eax, [rax] mov ecx, eax lea rax, all_charsets mov [rax+rcx*8], rdx mov rax, [rbp+var_8] mov ecx, [rax+0Ch] or ecx, 200h mov [rax+0Ch], ecx mov rsi, [rbp+var_8] lea rdi, charset_name_hash call my_hash_insert cmp al, 0 jz short loc_6D461 mov rax, [rbp+var_8] mov rsi, [rax+10h] mov rax, [rbp+var_8] mov rdx, [rax+18h] lea rdi, charset_name_hash call my_hash_search mov [rbp+var_10], rax mov rax, [rbp+var_8] mov rcx, [rbp+var_10] mov rdx, [rcx+10h] mov [rax+10h], rdx mov rcx, [rcx+18h] mov [rax+18h], rcx loc_6D461: add rsp, 10h pop rbp retn
long long add_compiled_extra_collation(unsigned int *a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-10h] all_charsets[*a1] = a1; a1[3] |= 0x200u; result = my_hash_insert(&charset_name_hash, a1); if ( (_BYTE)result ) { v2 = my_hash_search(&charset_name_hash, *((_QWORD *)a1 + 2), *((_QWORD *)a1 + 3)); result = (long long)a1; *((_QWORD *)a1 + 2) = *(_QWORD *)(v2 + 16); *((_QWORD *)a1 + 3) = *(_QWORD *)(v2 + 24); } return result; }
add_compiled_extra_collation: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI JMP 0x0016d3ee LAB_0016d3ee: MOV RDX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX] MOV ECX,EAX LEA RAX,[0x4fd920] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x200 MOV dword ptr [RAX + 0xc],ECX MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x501920] CALL 0x00172550 CMP AL,0x0 JZ 0x0016d461 MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RAX + 0x18] LEA RDI,[0x501920] CALL 0x00172160 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_0016d461: ADD RSP,0x10 POP RBP RET
void add_compiled_extra_collation(uint *param_1) { char cVar1; long lVar2; (&all_charsets)[*param_1] = param_1; param_1[3] = param_1[3] | 0x200; cVar1 = my_hash_insert(charset_name_hash,param_1); if (cVar1 != '\0') { lVar2 = my_hash_search(charset_name_hash,*(int8 *)(param_1 + 4), *(int8 *)(param_1 + 6)); *(int8 *)(param_1 + 4) = *(int8 *)(lVar2 + 0x10); *(int8 *)(param_1 + 6) = *(int8 *)(lVar2 + 0x18); } return; }
39,720
inline_mysql_file_write
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_write( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, const uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_written; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_WRITE); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_write(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_written= (result == 0) ? count : 0; else bytes_written= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_written); return result; } #endif result= my_write(file, buffer, count, flags); return result; }
O0
c
inline_mysql_file_write: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x26b948(%rip), %rax # 0x2cb2a0 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x7, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x5fa67 leaq 0x26b8fe(%rip), %rax # 0x2cb2a0 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xfb850 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x5fa12 cmpq $0x0, -0x38(%rbp) jne 0x5f9f7 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x5fa02 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0x5fa02 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x5fa3f cmpq $-0x1, -0x38(%rbp) je 0x5fa26 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0x5fa31 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0x5fa31 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x26b85a(%rip), %rax # 0x2cb2a0 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x5fa87 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0xfb850 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_write: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 7 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_5FA67 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_30] and rax, 6 cmp rax, 0 jz short loc_5FA12 cmp [rbp+var_38], 0 jnz short loc_5F9F7 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_5FA02 loc_5F9F7: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_5FA02: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_5FA3F loc_5FA12: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_5FA26 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_5FA31 loc_5FA26: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_5FA31: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_5FA3F: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_5FA87 loc_5FA67: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_write mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_5FA87: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_write( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+8h] [rbp-98h] _BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+70h] [rbp-30h] long long v13; // [rsp+78h] [rbp-28h] long long v14; // [rsp+80h] [rbp-20h] unsigned int v15; // [rsp+88h] [rbp-18h] unsigned int v16; // [rsp+8Ch] [rbp-14h] long long v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v9, a3, 7LL); if ( v10 ) { ((void ( *)(long long, long long, long long, _QWORD))PSI_server[66])(v10, v13, v17, v16); v11 = my_write(v15, v14, v13, v12); if ( (v12 & 6) != 0 ) { if ( v11 ) v8 = 0LL; else v8 = v13; ((void ( *)(long long, long long))PSI_server[67])(v10, v8); } else { if ( v11 == -1 ) v7 = 0LL; else v7 = v11; ((void ( *)(long long, long long))PSI_server[67])(v10, v7); } return v11; } else { return my_write(v15, v14, v13, v12); } }
inline_mysql_file_write: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x3cb2a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x7 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 0x0015fa67 LEA RAX,[0x3cb2a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001fb850 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x0015fa12 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0015f9f7 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x0015fa02 LAB_0015f9f7: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x0015fa02 LAB_0015fa02: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x0015fa3f LAB_0015fa12: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x0015fa26 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x0015fa31 LAB_0015fa26: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x0015fa31 LAB_0015fa31: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_0015fa3f: LEA RAX,[0x3cb2a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x0015fa87 LAB_0015fa67: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001fb850 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_0015fa87: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_write (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,ulong param_6) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; ulong local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,7); if (local_48 == 0) { local_10 = my_write(local_20,local_28,local_30,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_write(local_20,local_28,local_30,local_38); if ((local_38 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
39,721
my_error_register
eloqsql/mysys/my_error.c
int my_error_register(const char** (*get_errmsgs)(int error), uint first, uint last) { struct my_err_head *meh_p; struct my_err_head **search_meh_pp; /* Allocate a new header structure. */ if (! (meh_p= (struct my_err_head*) my_malloc(key_memory_my_err_head, sizeof(struct my_err_head), MYF(MY_WME)))) return 1; meh_p->get_errmsgs= get_errmsgs; meh_p->meh_first= first; meh_p->meh_last= last; /* Search for the right position in the list. */ for (search_meh_pp= &my_errmsgs_list; *search_meh_pp; search_meh_pp= &(*search_meh_pp)->meh_next) { if ((*search_meh_pp)->meh_last > first) break; } /* Error numbers must be unique. No overlapping is allowed. */ if (*search_meh_pp && ((*search_meh_pp)->meh_first <= last)) { my_free(meh_p); return 1; } /* Insert header into the chain. */ meh_p->meh_next= *search_meh_pp; *search_meh_pp= meh_p; return 0; }
O3
c
my_error_register: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r14d movl %esi, %r15d movq %rdi, %r12 leaq 0x33be26(%rip), %rax # 0x36a880 movl (%rax), %edi movl $0x18, %esi movl $0x10, %edx callq 0x28289 movl $0x1, %ebx testq %rax, %rax je 0x2eab1 movq %r12, 0x8(%rax) movl %r15d, 0x10(%rax) movl %r14d, 0x14(%rax) leaq 0x2c51a0(%rip), %rcx # 0x2f3c28 movq %rcx, %rdx movq (%rcx), %rcx testq %rcx, %rcx je 0x2ea9f cmpl %r15d, 0x14(%rcx) jbe 0x2ea88 cmpl %r14d, 0x10(%rcx) jbe 0x2eaa9 movq %rcx, (%rax) movq %rax, (%rdx) xorl %ebx, %ebx jmp 0x2eab1 movq %rax, %rdi callq 0x284b6 movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_error_register: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14d, edx mov r15d, esi mov r12, rdi lea rax, key_memory_my_err_head mov edi, [rax] mov esi, 18h mov edx, 10h call my_malloc mov ebx, 1 test rax, rax jz short loc_2EAB1 mov [rax+8], r12 mov [rax+10h], r15d mov [rax+14h], r14d lea rcx, my_errmsgs_list loc_2EA88: mov rdx, rcx mov rcx, [rcx] test rcx, rcx jz short loc_2EA9F cmp [rcx+14h], r15d jbe short loc_2EA88 cmp [rcx+10h], r14d jbe short loc_2EAA9 loc_2EA9F: mov [rax], rcx mov [rdx], rax xor ebx, ebx jmp short loc_2EAB1 loc_2EAA9: mov rdi, rax call my_free loc_2EAB1: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_error_register(long long a1, unsigned int a2, unsigned int a3) { long long v4; // rax unsigned int v5; // ebx long long **v6; // rcx _QWORD *v7; // rdx v4 = my_malloc(key_memory_my_err_head, 0x18uLL, 16); v5 = 1; if ( v4 ) { *(_QWORD *)(v4 + 8) = a1; *(_DWORD *)(v4 + 16) = a2; *(_DWORD *)(v4 + 20) = a3; v6 = &my_errmsgs_list; do { v7 = v6; v6 = (long long **)*v6; if ( !v6 ) goto LABEL_6; } while ( *((_DWORD *)v6 + 5) <= a2 ); if ( *((_DWORD *)v6 + 4) > a3 ) { LABEL_6: *(_QWORD *)v4 = v6; *v7 = v4; return 0; } my_free(v4); } return v5; }
my_error_register: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,EDX MOV R15D,ESI MOV R12,RDI LEA RAX,[0x46a880] MOV EDI,dword ptr [RAX] MOV ESI,0x18 MOV EDX,0x10 CALL 0x00128289 MOV EBX,0x1 TEST RAX,RAX JZ 0x0012eab1 MOV qword ptr [RAX + 0x8],R12 MOV dword ptr [RAX + 0x10],R15D MOV dword ptr [RAX + 0x14],R14D LEA RCX,[0x3f3c28] LAB_0012ea88: MOV RDX,RCX MOV RCX,qword ptr [RCX] TEST RCX,RCX JZ 0x0012ea9f CMP dword ptr [RCX + 0x14],R15D JBE 0x0012ea88 CMP dword ptr [RCX + 0x10],R14D JBE 0x0012eaa9 LAB_0012ea9f: MOV qword ptr [RAX],RCX MOV qword ptr [RDX],RAX XOR EBX,EBX JMP 0x0012eab1 LAB_0012eaa9: MOV RDI,RAX CALL 0x001284b6 LAB_0012eab1: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 my_error_register(long param_1,uint param_2,uint param_3) { int **ppuVar1; long *plVar2; int **ppuVar3; int8 uVar4; plVar2 = (long *)my_malloc(key_memory_my_err_head,0x18,0x10); uVar4 = 1; if (plVar2 != (long *)0x0) { plVar2[1] = param_1; *(uint *)(plVar2 + 2) = param_2; *(uint *)((long)plVar2 + 0x14) = param_3; ppuVar1 = &my_errmsgs_list; do { ppuVar3 = ppuVar1; ppuVar1 = (int **)*ppuVar3; if (ppuVar1 == (int **)0x0) goto LAB_0012ea9f; } while (*(uint *)((long)ppuVar1 + 0x14) <= param_2); if (param_3 < *(uint *)(ppuVar1 + 2)) { LAB_0012ea9f: *plVar2 = (long)ppuVar1; *ppuVar3 = (int *)plVar2; uVar4 = 0; } else { my_free(plVar2); } } return uVar4; }
39,722
my_strnxfrm_8bit_nopad_bin
eloqsql/strings/ctype-bin.c
static size_t my_strnxfrm_8bit_nopad_bin(CHARSET_INFO *cs, uchar * dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { set_if_smaller(srclen, dstlen); set_if_smaller(srclen, nweights); if (dst != src) memcpy(dst, src, srclen); return my_strxfrm_pad_desc_and_reverse_nopad(cs, dst, dst + srclen, dst + dstlen,(uint)(nweights - srclen), flags, 0); }
O3
c
my_strnxfrm_8bit_nopad_bin: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r13 movl %ecx, %ebx movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movl 0x10(%rbp), %r9d cmpq %rdx, %r13 cmovaeq %rdx, %r13 movl %ecx, %eax cmpq %rax, %r13 cmovaeq %rax, %r13 cmpq %r8, %rsi je 0xb5512 movq %r12, %rdi movq %r8, %rsi movq %r13, %rdx callq 0x2a0a0 movl 0x10(%rbp), %r9d leaq (%r12,%r13), %rdx addq %r12, %r14 subl %r13d, %ebx movl $0x0, (%rsp) movq %r15, %rdi movq %r12, %rsi movq %r14, %rcx movl %ebx, %r8d callq 0xbd832 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_8bit_nopad_bin: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r13, r9 mov ebx, ecx mov r14, rdx mov r12, rsi mov r15, rdi mov r9d, [rbp+arg_0] cmp r13, rdx cmovnb r13, rdx mov eax, ecx cmp r13, rax cmovnb r13, rax cmp rsi, r8 jz short loc_B5512 mov rdi, r12 mov rsi, r8 mov rdx, r13 call _memcpy mov r9d, [rbp+arg_0] loc_B5512: lea rdx, [r12+r13] add r14, r12 sub ebx, r13d mov [rsp+30h+var_30], 0 mov rdi, r15 mov rsi, r12 mov rcx, r14 mov r8d, ebx call my_strxfrm_pad_desc_and_reverse_nopad add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_8bit_nopad_bin( int a1, long long a2, unsigned long long a3, unsigned int a4, long long a5, unsigned long long a6, int a7) { int v9; // r14d int v10; // r9d v9 = a3; v10 = a7; if ( a6 >= a3 ) a6 = a3; if ( a6 >= a4 ) a6 = a4; if ( a2 != a5 ) { memcpy(a2, a5, a6); v10 = a7; } return my_strxfrm_pad_desc_and_reverse_nopad(a1, a2, (int)a2 + (int)a6, (int)a2 + v9, a4 - (unsigned int)a6, v10, 0); }
my_strnxfrm_8bit_nopad_bin: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R13,R9 MOV EBX,ECX MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV R9D,dword ptr [RBP + 0x10] CMP R13,RDX CMOVNC R13,RDX MOV EAX,ECX CMP R13,RAX CMOVNC R13,RAX CMP RSI,R8 JZ 0x001b5512 MOV RDI,R12 MOV RSI,R8 MOV RDX,R13 CALL 0x0012a0a0 MOV R9D,dword ptr [RBP + 0x10] LAB_001b5512: LEA RDX,[R12 + R13*0x1] ADD R14,R12 SUB EBX,R13D MOV dword ptr [RSP],0x0 MOV RDI,R15 MOV RSI,R12 MOV RCX,R14 MOV R8D,EBX CALL 0x001bd832 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void my_strnxfrm_8bit_nopad_bin (int8 param_1,void *param_2,ulong param_3,uint param_4,void *param_5, ulong param_6,int4 param_7) { int8 in_RAX; uint uVar1; uVar1 = (uint)((ulong)in_RAX >> 0x20); if (param_3 <= param_6) { param_6 = param_3; } if (param_4 <= param_6) { param_6 = (ulong)param_4; } if (param_2 != param_5) { memcpy(param_2,param_5,param_6); } my_strxfrm_pad_desc_and_reverse_nopad (param_1,param_2,(long)param_2 + param_6,param_3 + (long)param_2,param_4 - (int)param_6, param_7,(ulong)uVar1 << 0x20); return; }
39,723
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
monkey531[P]llama/common/json.hpp
static std::string diagnostics(const BasicJsonType* leaf_element) { #if JSON_DIAGNOSTICS std::vector<std::string> tokens; for (const auto* current = leaf_element; current != nullptr && current->m_parent != nullptr; current = current->m_parent) { switch (current->m_parent->type()) { case value_t::array: { for (std::size_t i = 0; i < current->m_parent->m_data.m_value.array->size(); ++i) { if (&current->m_parent->m_data.m_value.array->operator[](i) == current) { tokens.emplace_back(std::to_string(i)); break; } } break; } case value_t::object: { for (const auto& element : *current->m_parent->m_data.m_value.object) { if (&element.second == current) { tokens.emplace_back(element.first.c_str()); break; } } break; } case value_t::null: // LCOV_EXCL_LINE case value_t::string: // LCOV_EXCL_LINE case value_t::boolean: // LCOV_EXCL_LINE case value_t::number_integer: // LCOV_EXCL_LINE case value_t::number_unsigned: // LCOV_EXCL_LINE case value_t::number_float: // LCOV_EXCL_LINE case value_t::binary: // LCOV_EXCL_LINE case value_t::discarded: // LCOV_EXCL_LINE default: // LCOV_EXCL_LINE break; // LCOV_EXCL_LINE } } if (tokens.empty()) { return ""; } auto str = std::accumulate(tokens.rbegin(), tokens.rend(), std::string{}, [](const std::string & a, const std::string & b) { return concat(a, '/', detail::escape(b)); }); return concat('(', str, ") "); #else static_cast<void>(leaf_element); return ""; #endif }
O2
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*): pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0x5010a(%rip), %rsi # 0x8ccf5 leaq 0xf(%rsp), %rdx callq 0x22836 movq %rbx, %rax addq $0x10, %rsp popq %rbx retq
_ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_: push rbx sub rsp, 10h mov rbx, rdi lea rsi, aEndIndexOutOfB+19h; "" lea rdx, [rsp+18h+var_9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rax, rbx add rsp, 10h pop rbx retn
_QWORD * nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( _QWORD *a1) { std::string::basic_string<std::allocator<char>>(a1, (long long)""); return a1; }
diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBX SUB RSP,0x10 MOV RBX,RDI LEA RSI,[0x18ccf5] LEA RDX,[RSP + 0xf] CALL 0x00122836 MOV RAX,RBX ADD RSP,0x10 POP RBX RET
/* std::__cxx11::string nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const*) */ basic_json * nlohmann::json_abi_v3_11_3::detail::exception:: diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1) { allocator local_9; std::__cxx11::string::string<std::allocator<char>>((string *)param_1,"",&local_9); return param_1; }
39,724
list_walk
eloqsql/mysys/list.c
int list_walk(LIST *list, list_walk_action action, uchar* argument) { int error=0; while (list) { if ((error = (*action)(list->data,argument))) return error; list=list_rest(list); } return 0; }
O0
c
list_walk: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl $0x0, -0x24(%rbp) cmpq $0x0, -0x10(%rbp) je 0xe6fa2 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rdi movq -0x20(%rbp), %rsi callq *%rax movl %eax, -0x24(%rbp) cmpl $0x0, %eax je 0xe6f94 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xe6fa9 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x10(%rbp) jmp 0xe6f6b movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
list_walk: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], 0 loc_E6F6B: cmp [rbp+var_10], 0 jz short loc_E6FA2 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov rdi, [rcx+10h] mov rsi, [rbp+var_20] call rax mov [rbp+var_24], eax cmp eax, 0 jz short loc_E6F94 mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_E6FA9 loc_E6F94: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_10], rax jmp short loc_E6F6B loc_E6FA2: mov [rbp+var_4], 0 loc_E6FA9: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long list_walk(long long a1, long long ( *a2)(_QWORD, long long), long long a3) { unsigned int v4; // [rsp+Ch] [rbp-24h] while ( a1 ) { v4 = a2(*(_QWORD *)(a1 + 16), a3); if ( v4 ) return v4; a1 = *(_QWORD *)(a1 + 8); } return 0; }
list_walk: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],0x0 LAB_001e6f6b: CMP qword ptr [RBP + -0x10],0x0 JZ 0x001e6fa2 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x10] MOV RSI,qword ptr [RBP + -0x20] CALL RAX MOV dword ptr [RBP + -0x24],EAX CMP EAX,0x0 JZ 0x001e6f94 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x001e6fa9 LAB_001e6f94: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x10],RAX JMP 0x001e6f6b LAB_001e6fa2: MOV dword ptr [RBP + -0x4],0x0 LAB_001e6fa9: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int list_walk(long param_1,code *param_2,int8 param_3) { int iVar1; long local_18; local_18 = param_1; while( true ) { if (local_18 == 0) { return 0; } iVar1 = (*param_2)(*(int8 *)(local_18 + 0x10),param_3); if (iVar1 != 0) break; local_18 = *(long *)(local_18 + 8); } return iVar1; }
39,725
bool fmt::v10::detail::check_char_specs<char>(fmt::v10::format_specs<char> const&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/fmt/bundled/core.h
FMT_CONSTEXPR auto check_char_specs(const format_specs<Char>& specs) -> bool { if (specs.type != presentation_type::none && specs.type != presentation_type::chr && specs.type != presentation_type::debug) { return false; } if (specs.align == align::numeric || specs.sign != sign::none || specs.alt) throw_format_error("invalid format specifier for char"); return true; }
O0
c
bool fmt::v10::detail::check_char_specs<char>(fmt::v10::format_specs<char> const&): subq $0x18, %rsp movq %rdi, 0x8(%rsp) movq 0x8(%rsp), %rax cmpb $0x0, 0x8(%rax) je 0xa97c1 movq 0x8(%rsp), %rax cmpb $0xf, 0x8(%rax) je 0xa97c1 movq 0x8(%rsp), %rax cmpb $0x12, 0x8(%rax) je 0xa97c1 movb $0x0, 0x17(%rsp) jmp 0xa9817 movq 0x8(%rsp), %rax movw 0x9(%rax), %ax andw $0xf, %ax movzbl %al, %eax cmpl $0x4, %eax je 0xa9806 movq 0x8(%rsp), %rax movw 0x9(%rax), %ax shrw $0x4, %ax andw $0x7, %ax movzbl %al, %eax cmpl $0x0, %eax jne 0xa9806 movq 0x8(%rsp), %rax movw 0x9(%rax), %ax shrw $0x7, %ax andw $0x1, %ax testw $0x1, %ax je 0xa9812 leaq 0x66a5b(%rip), %rdi # 0x110268 callq 0x86600 movb $0x1, 0x17(%rsp) movb 0x17(%rsp), %al andb $0x1, %al addq $0x18, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN3fmt3v106detail16check_char_specsIcEEbRKNS0_12format_specsIT_EE: sub rsp, 18h mov [rsp+18h+var_10], rdi mov rax, [rsp+18h+var_10] cmp byte ptr [rax+8], 0 jz short loc_A97C1 mov rax, [rsp+18h+var_10] cmp byte ptr [rax+8], 0Fh jz short loc_A97C1 mov rax, [rsp+18h+var_10] cmp byte ptr [rax+8], 12h jz short loc_A97C1 mov [rsp+18h+var_1], 0 jmp short loc_A9817 loc_A97C1: mov rax, [rsp+18h+var_10] mov ax, [rax+9] and ax, 0Fh movzx eax, al cmp eax, 4 jz short loc_A9806 mov rax, [rsp+18h+var_10] mov ax, [rax+9] shr ax, 4 and ax, 7 movzx eax, al cmp eax, 0 jnz short loc_A9806 mov rax, [rsp+18h+var_10] mov ax, [rax+9] shr ax, 7 and ax, 1 test ax, 1 jz short loc_A9812 loc_A9806: lea rdi, aInvalidFormatS_1; "invalid format specifier for char" call _ZN3fmt3v106detail18throw_format_errorEPKc; fmt::v10::detail::throw_format_error(char const*) loc_A9812: mov [rsp+18h+var_1], 1 loc_A9817: mov al, [rsp+18h+var_1] and al, 1 add rsp, 18h retn
char fmt::v10::detail::check_char_specs<char>(long long a1, const char *a2) { if ( *(_BYTE *)(a1 + 8) && *(_BYTE *)(a1 + 8) != 15 && *(_BYTE *)(a1 + 8) != 18 ) return 0; if ( (*(_WORD *)(a1 + 9) & 0xF) == 4 || ((*(_WORD *)(a1 + 9) >> 4) & 7) != 0 || ((*(_WORD *)(a1 + 9) >> 7) & 1) != 0 ) fmt::v10::detail::throw_format_error((fmt::v10::detail *)"invalid format specifier for char", a2); return 1; }
check_char_specs<char>: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV RAX,qword ptr [RSP + 0x8] CMP byte ptr [RAX + 0x8],0x0 JZ 0x001a97c1 MOV RAX,qword ptr [RSP + 0x8] CMP byte ptr [RAX + 0x8],0xf JZ 0x001a97c1 MOV RAX,qword ptr [RSP + 0x8] CMP byte ptr [RAX + 0x8],0x12 JZ 0x001a97c1 MOV byte ptr [RSP + 0x17],0x0 JMP 0x001a9817 LAB_001a97c1: MOV RAX,qword ptr [RSP + 0x8] MOV AX,word ptr [RAX + 0x9] AND AX,0xf MOVZX EAX,AL CMP EAX,0x4 JZ 0x001a9806 MOV RAX,qword ptr [RSP + 0x8] MOV AX,word ptr [RAX + 0x9] SHR AX,0x4 AND AX,0x7 MOVZX EAX,AL CMP EAX,0x0 JNZ 0x001a9806 MOV RAX,qword ptr [RSP + 0x8] MOV AX,word ptr [RAX + 0x9] SHR AX,0x7 AND AX,0x1 TEST AX,0x1 JZ 0x001a9812 LAB_001a9806: LEA RDI,[0x210268] CALL 0x00186600 LAB_001a9812: MOV byte ptr [RSP + 0x17],0x1 LAB_001a9817: MOV AL,byte ptr [RSP + 0x17] AND AL,0x1 ADD RSP,0x18 RET
/* bool fmt::v10::detail::check_char_specs<char>(fmt::v10::format_specs<char> const&) */ bool fmt::v10::detail::check_char_specs<char>(format_specs *param_1) { bool local_1; if (((param_1[8] == (format_specs)0x0) || (param_1[8] == (format_specs)0xf)) || (param_1[8] == (format_specs)0x12)) { if (((((byte)*(int2 *)(param_1 + 9) & 0xf) == 4) || ((*(ushort *)(param_1 + 9) >> 4 & 7) != 0)) || ((*(ushort *)(param_1 + 9) >> 7 & 1) != 0)) { /* WARNING: Subroutine does not return */ throw_format_error("invalid format specifier for char"); } local_1 = true; } else { local_1 = false; } return local_1; }
39,726
wsrep_run_commit_hook(THD*, bool)
eloqsql/sql/wsrep_trans_observer.h
static inline bool wsrep_run_commit_hook(THD* thd, bool all) { DBUG_ENTER("wsrep_run_commit_hook"); DBUG_PRINT("wsrep", ("Is_active: %d is_real %d has_changes %d is_applying %d " "is_ordered: %d", wsrep_is_active(thd), wsrep_is_real(thd, all), wsrep_has_changes(thd), wsrep_thd_is_applying(thd), wsrep_is_ordered(thd))); /* Is MST commit or autocommit? */ bool ret= wsrep_is_active(thd) && wsrep_is_real(thd, all); /* Do not commit if we are aborting */ ret= ret && (thd->wsrep_trx().state() != wsrep::transaction::s_aborting); if (ret && !(wsrep_has_changes(thd) || /* Has generated write set */ /* Is high priority (replay, applier, storage) and the transaction is scheduled for commit ordering */ (wsrep_thd_is_applying(thd) && wsrep_is_ordered(thd)))) { mysql_mutex_lock(&thd->LOCK_thd_data); DBUG_PRINT("wsrep", ("state: %s", wsrep::to_c_string(thd->wsrep_trx().state()))); /* Transaction is local but has no changes, the commit hooks will be skipped and the wsrep transaction is terminated in wsrep_commit_empty() */ if (thd->wsrep_trx().state() == wsrep::transaction::s_executing) { ret= false; } mysql_mutex_unlock(&thd->LOCK_thd_data); } DBUG_PRINT("wsrep", ("return: %d", ret)); DBUG_RETURN(ret); }
O0
c
wsrep_run_commit_hook(THD*, bool): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) andb $0x1, %al movb %al, -0x9(%rbp) jmp 0xd3a566 movq -0x8(%rbp), %rdi callq 0xd3a4e0 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, -0xb(%rbp) jne 0xd3a57d jmp 0xd3a591 movq -0x8(%rbp), %rdi movb -0x9(%rbp), %al andb $0x1, %al movzbl %al, %esi callq 0xd41820 movb %al, -0xb(%rbp) movb -0xb(%rbp), %al andb $0x1, %al movb %al, -0xa(%rbp) xorl %eax, %eax testb $0x1, -0xa(%rbp) movb %al, -0xc(%rbp) je 0xd3a5be movq -0x8(%rbp), %rdi callq 0x7ec070 movq %rax, %rdi callq 0x7ec0a0 cmpl $0x9, %eax setne %al movb %al, -0xc(%rbp) movb -0xc(%rbp), %al andb $0x1, %al movb %al, -0xa(%rbp) testb $0x1, -0xa(%rbp) je 0xd3a63b movq -0x8(%rbp), %rdi callq 0xd41860 testb $0x1, %al jne 0xd3a63b movq -0x8(%rbp), %rdi callq 0xf8a010 cmpb $0x0, %al je 0xd3a5f3 movq -0x8(%rbp), %rdi callq 0xd41890 testb $0x1, %al jne 0xd3a63b movq -0x8(%rbp), %rdi addq $0x1cf0, %rdi # imm = 0x1CF0 leaq 0x6578cf(%rip), %rsi # 0x1391ed4 movl $0xd0, %edx callq 0xb44d40 jmp 0xd3a611 movq -0x8(%rbp), %rdi callq 0x7ec070 movq %rax, %rdi callq 0x7ec0a0 cmpl $0x0, %eax jne 0xd3a62b movb $0x0, -0xa(%rbp) movq -0x8(%rbp), %rdi addq $0x1cf0, %rdi # imm = 0x1CF0 callq 0xb44fa0 jmp 0xd3a63d jmp 0xd3a63f jmp 0xd3a641 movb -0xa(%rbp), %al andb $0x1, %al addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZL21wsrep_run_commit_hookP3THDb_0: push rbp mov rbp, rsp sub rsp, 10h mov al, sil mov [rbp+var_8], rdi and al, 1 mov [rbp+var_9], al jmp short $+2 loc_D3A566: mov rdi, [rbp+var_8]; THD * call _ZL15wsrep_is_activeP3THD_4; wsrep_is_active(THD *) mov cl, al xor eax, eax test cl, 1 mov [rbp+var_B], al jnz short loc_D3A57D jmp short loc_D3A591 loc_D3A57D: mov rdi, [rbp+var_8]; THD * mov al, [rbp+var_9] and al, 1 movzx esi, al; bool call _ZL13wsrep_is_realP3THDb_0; wsrep_is_real(THD *,bool) mov [rbp+var_B], al loc_D3A591: mov al, [rbp+var_B] and al, 1 mov [rbp+var_A], al xor eax, eax test [rbp+var_A], 1 mov [rbp+var_C], al jz short loc_D3A5BE mov rdi, [rbp+var_8]; this call _ZNK3THD9wsrep_trxEv; THD::wsrep_trx(void) mov rdi, rax; this call _ZNK5wsrep11transaction5stateEv; wsrep::transaction::state(void) cmp eax, 9 setnz al mov [rbp+var_C], al loc_D3A5BE: mov al, [rbp+var_C] and al, 1 mov [rbp+var_A], al test [rbp+var_A], 1 jz short loc_D3A63B mov rdi, [rbp+var_8]; THD * call _ZL17wsrep_has_changesP3THD_1; wsrep_has_changes(THD *) test al, 1 jnz short loc_D3A63B mov rdi, [rbp+var_8] call wsrep_thd_is_applying cmp al, 0 jz short loc_D3A5F3 mov rdi, [rbp+var_8]; THD * call _ZL16wsrep_is_orderedP3THD_0; wsrep_is_ordered(THD *) test al, 1 jnz short loc_D3A63B loc_D3A5F3: mov rdi, [rbp+var_8] add rdi, 1CF0h lea rsi, aWorkspaceLlm4b_12; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 0D0h call _Z15coro_mutex_lockP14st_mysql_mutexPKcj; coro_mutex_lock(st_mysql_mutex *,char const*,uint) jmp short $+2 loc_D3A611: mov rdi, [rbp+var_8]; this call _ZNK3THD9wsrep_trxEv; THD::wsrep_trx(void) mov rdi, rax; this call _ZNK5wsrep11transaction5stateEv; wsrep::transaction::state(void) cmp eax, 0 jnz short loc_D3A62B mov [rbp+var_A], 0 loc_D3A62B: mov rdi, [rbp+var_8] add rdi, 1CF0h call _Z17coro_mutex_unlockP14st_mysql_mutex; coro_mutex_unlock(st_mysql_mutex *) loc_D3A63B: jmp short $+2 loc_D3A63D: jmp short $+2 loc_D3A63F: jmp short $+2 loc_D3A641: mov al, [rbp+var_A] and al, 1 add rsp, 10h pop rbp retn
bool wsrep_run_commit_hook(THD *a1, char a2) { wsrep::transaction *v2; // rax wsrep::transaction *v3; // rax bool v5; // [rsp+4h] [rbp-Ch] char is_real; // [rsp+5h] [rbp-Bh] bool v7; // [rsp+6h] [rbp-Ah] is_real = 0; if ( (wsrep_is_active(a1) & 1) != 0 ) is_real = wsrep_is_real(a1, a2 & 1); v5 = 0; if ( (is_real & 1) != 0 ) { v2 = (wsrep::transaction *)THD::wsrep_trx(a1); v5 = (unsigned int)wsrep::transaction::state(v2) != 9; } v7 = v5; if ( v5 && (wsrep_has_changes(a1) & 1) == 0 && (!(unsigned __int8)wsrep_thd_is_applying(a1) || (wsrep_is_ordered(a1) & 1) == 0) ) { coro_mutex_lock( (long long)a1 + 7408, (long long)"/workspace/llm4binary/github2025/eloqsql/sql/wsrep_trans_observer.h", 0xD0u); v3 = (wsrep::transaction *)THD::wsrep_trx(a1); if ( !(unsigned int)wsrep::transaction::state(v3) ) v7 = 0; coro_mutex_unlock((long long)a1 + 7408); } return v7; }
val_time_packed: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x64],0x1 XOR EAX,EAX POP RBP RET
/* Item_null::val_time_packed(THD*) */ int8 Item_null::val_time_packed(THD *param_1) { param_1[100] = (THD)0x1; return 0; }
39,727
wt_resource_init
eloqsql/mysys/waiting_threads.c
static void wt_resource_init(LF_HASH *hash __attribute__((unused)), WT_RESOURCE *rc, WT_RESOURCE_ID *id) { DBUG_ENTER("wt_resource_init"); rc->id= *id; rc->waiter_count= 0; rc->state= ACTIVE; #ifndef DBUG_OFF rc->cond_mutex= 0; #endif DBUG_VOID_RETURN; }
O3
c
wt_resource_init: pushq %rbp movq %rsp, %rbp movups (%rdx), %xmm0 movups %xmm0, (%rsi) movq $0x0, 0x10(%rsi) popq %rbp retq
wt_resource_init: push rbp mov rbp, rsp movups xmm0, xmmword ptr [rdx] movups xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 pop rbp retn
void wt_resource_init(long long a1, long long a2, _OWORD *a3) { *(_OWORD *)a2 = *a3; *(_QWORD *)(a2 + 16) = 0LL; }
wt_resource_init: PUSH RBP MOV RBP,RSP MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 POP RBP RET
void wt_resource_init(int8 param_1,int8 *param_2,int8 *param_3) { int8 uVar1; uVar1 = param_3[1]; *param_2 = *param_3; param_2[1] = uVar1; param_2[2] = 0; return; }
39,728
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [11], 0>(char const (&) [11]) const
monkey531[P]llama/common/json.hpp
constexpr bool is_object() const noexcept { return m_data.m_type == value_t::object; }
O1
cpp
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [11], 0>(char const (&) [11]) const: cmpb $0x1, (%rdi) jne 0xaa7ea pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x8(%rdi), %r12 movq (%r12), %r15 movq 0x8(%r12), %rax cmpq %rax, %r15 je 0xaa7f0 movq %rsi, %r14 movq %r15, %rdi movq %r14, %rsi callq 0x1b210 testl %eax, %eax je 0xaa7ed addq $0x30, %r15 movq 0x8(%r12), %rax cmpq %rax, %r15 jne 0xaa7cb jmp 0xaa7f0 xorl %eax, %eax retq movq %r15, %rax movq 0x8(%rbx), %rcx cmpq 0x8(%rcx), %rax setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: cmp byte ptr [rdi], 1 jnz short loc_AA7EA push r15 push r14 push r12 push rbx push rax mov rbx, rdi mov r12, [rdi+8] mov r15, [r12] mov rax, [r12+8] cmp r15, rax jz short loc_AA7F0 mov r14, rsi loc_AA7CB: mov rdi, r15 mov rsi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_AA7ED add r15, 30h ; '0' mov rax, [r12+8] cmp r15, rax jnz short loc_AA7CB jmp short loc_AA7F0 loc_AA7EA: xor eax, eax retn loc_AA7ED: mov rax, r15 loc_AA7F0: mov rcx, [rbx+8] cmp rax, [rcx+8] setnz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( long long a1, long long a2) { long long *v2; // r12 long long v3; // r15 long long v4; // rax if ( *(_BYTE *)a1 != 1 ) return 0; v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } v4 = v3; } return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: CMP byte ptr [RDI],0x1 JNZ 0x001aa7ea PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R12,qword ptr [RDI + 0x8] MOV R15,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP R15,RAX JZ 0x001aa7f0 MOV R14,RSI LAB_001aa7cb: MOV RDI,R15 MOV RSI,R14 CALL 0x0011b210 TEST EAX,EAX JZ 0x001aa7ed ADD R15,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP R15,RAX JNZ 0x001aa7cb JMP 0x001aa7f0 LAB_001aa7ea: XOR EAX,EAX RET LAB_001aa7ed: MOV RAX,R15 LAB_001aa7f0: MOV RCX,qword ptr [RBX + 0x8] CMP RAX,qword ptr [RCX + 0x8] SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int8 _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (char *param_1) { long *plVar1; int iVar2; char *pcVar3; char *pcVar4; if (*param_1 != '\x01') { return 0; } plVar1 = *(long **)(param_1 + 8); pcVar3 = (char *)plVar1[1]; pcVar4 = (char *)*plVar1; if ((char *)*plVar1 != pcVar3) { do { pcVar3 = pcVar4; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar4 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar4 != pcVar3); } return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != *(char **)(*(long *)(param_1 + 8) + 8)); }
39,729
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [11], 0>(char const (&) [11]) const
monkey531[P]llama/common/json.hpp
constexpr bool is_object() const noexcept { return m_data.m_type == value_t::object; }
O3
cpp
bool nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::contains<char const (&) [11], 0>(char const (&) [11]) const: cmpb $0x1, (%rdi) jne 0xca66f pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x8(%rdi), %r12 movq (%r12), %rbx cmpq 0x8(%r12), %rbx je 0xca672 movq %rsi, %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x1b210 testl %eax, %eax je 0xca662 addq $0x30, %rbx cmpq 0x8(%r12), %rbx jne 0xca648 movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx jmp 0xca675 xorl %eax, %eax retq movq %rbx, %rax cmpq %rbx, %rax setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA17_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: cmp byte ptr [rdi], 1 jnz short loc_CA66F push r15 push r14 push r12 push rbx push rax mov r14, rdi mov r12, [rdi+8] mov rbx, [r12] cmp rbx, [r12+8] jz short loc_CA672 mov r15, rsi loc_CA648: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_CA662 add rbx, 30h ; '0' cmp rbx, [r12+8] jnz short loc_CA648 loc_CA662: mov rax, rbx mov rcx, [r14+8] mov rbx, [rcx+8] jmp short loc_CA675 loc_CA66F: xor eax, eax retn loc_CA672: mov rax, rbx loc_CA675: cmp rax, rbx setnz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA17_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( long long a1, long long a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax if ( *(_BYTE *)a1 != 1 ) return 0; v2 = *(long long **)(a1 + 8); v3 = *v2; if ( *v2 == v2[1] ) { v4 = *v2; } else { do { if ( !(unsigned int)std::string::compare(v3, a2) ) break; v3 += 48LL; } while ( v3 != v2[1] ); v4 = v3; v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } return v4 != v3; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA17_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: CMP byte ptr [RDI],0x1 JNZ 0x001ca66f PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV R12,qword ptr [RDI + 0x8] MOV RBX,qword ptr [R12] CMP RBX,qword ptr [R12 + 0x8] JZ 0x001ca672 MOV R15,RSI LAB_001ca648: MOV RDI,RBX MOV RSI,R15 CALL 0x0011b210 TEST EAX,EAX JZ 0x001ca662 ADD RBX,0x30 CMP RBX,qword ptr [R12 + 0x8] JNZ 0x001ca648 LAB_001ca662: MOV RAX,RBX MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] JMP 0x001ca675 LAB_001ca66f: XOR EAX,EAX RET LAB_001ca672: MOV RAX,RBX LAB_001ca675: CMP RAX,RBX SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int8 _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA17_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (char *param_1) { long *plVar1; int iVar2; char *pcVar3; char *pcVar4; if (*param_1 != '\x01') { return 0; } plVar1 = *(long **)(param_1 + 8); pcVar3 = (char *)*plVar1; pcVar4 = pcVar3; if (pcVar3 != (char *)plVar1[1]) { do { iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar3 = pcVar3 + 0x30; } while (pcVar3 != (char *)plVar1[1]); pcVar4 = *(char **)(*(long *)(param_1 + 8) + 8); } return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != pcVar4); }
39,730
ma_duplicate_resultset_metadata
eloqsql/libmariadb/libmariadb/mariadb_lib.c
MYSQL_FIELD *ma_duplicate_resultset_metadata(MYSQL_FIELD *fields, size_t count, MA_MEM_ROOT *memroot) { size_t i; MYSQL_FIELD *result= (MYSQL_FIELD *) ma_alloc_root(memroot, sizeof(MYSQL_FIELD) * count); if (!result) return NULL; for (i= 0; i < count; i++) { if (ma_deep_copy_field(&fields[i], &result[i], memroot)) return NULL; } return result; }
O0
c
ma_duplicate_resultset_metadata: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi shlq $0x7, %rsi callq 0x25620 movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x1fc7a movq $0x0, -0x8(%rbp) jmp 0x1fcda movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq -0x18(%rbp), %rax jae 0x1fcd2 movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rax shlq $0x7, %rax addq %rax, %rdi movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rax shlq $0x7, %rax addq %rax, %rsi movq -0x20(%rbp), %rdx callq 0x1fcf0 cmpl $0x0, %eax je 0x1fcc2 movq $0x0, -0x8(%rbp) jmp 0x1fcda jmp 0x1fcc4 movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x1fc82 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_duplicate_resultset_metadata: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rdi, [rbp+var_20] mov rsi, [rbp+var_18] shl rsi, 7 call ma_alloc_root mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_1FC7A mov [rbp+var_8], 0 jmp short loc_1FCDA loc_1FC7A: mov [rbp+var_28], 0 loc_1FC82: mov rax, [rbp+var_28] cmp rax, [rbp+var_18] jnb short loc_1FCD2 mov rdi, [rbp+var_10] mov rax, [rbp+var_28] shl rax, 7 add rdi, rax mov rsi, [rbp+var_30] mov rax, [rbp+var_28] shl rax, 7 add rsi, rax mov rdx, [rbp+var_20] call ma_deep_copy_field cmp eax, 0 jz short loc_1FCC2 mov [rbp+var_8], 0 jmp short loc_1FCDA loc_1FCC2: jmp short $+2 loc_1FCC4: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_1FC82 loc_1FCD2: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_1FCDA: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long ma_duplicate_resultset_metadata(long long a1, unsigned long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-30h] unsigned long long i; // [rsp+8h] [rbp-28h] v4 = ma_alloc_root(a3, a2 << 7); if ( !v4 ) return 0LL; for ( i = 0LL; i < a2; ++i ) { if ( (unsigned int)ma_deep_copy_field((i << 7) + a1, (i << 7) + v4, a3) ) return 0LL; } return v4; }
ma_duplicate_resultset_metadata: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] SHL RSI,0x7 CALL 0x00125620 MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x0011fc7a MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011fcda LAB_0011fc7a: MOV qword ptr [RBP + -0x28],0x0 LAB_0011fc82: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x18] JNC 0x0011fcd2 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x7 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x7 ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] CALL 0x0011fcf0 CMP EAX,0x0 JZ 0x0011fcc2 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011fcda LAB_0011fcc2: JMP 0x0011fcc4 LAB_0011fcc4: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0011fc82 LAB_0011fcd2: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0011fcda: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long ma_duplicate_resultset_metadata(long param_1,ulong param_2,int8 param_3) { int iVar1; ulong local_30; long local_10; local_10 = ma_alloc_root(param_3,param_2 << 7); if (local_10 == 0) { local_10 = 0; } else { for (local_30 = 0; local_30 < param_2; local_30 = local_30 + 1) { iVar1 = ma_deep_copy_field(param_1 + local_30 * 0x80,local_10 + local_30 * 0x80,param_3); if (iVar1 != 0) { return 0; } } } return local_10; }
39,731
ma_read_rnd_mempack_record
eloqsql/storage/maria/ma_packrec.c
static int _ma_read_rnd_mempack_record(MARIA_HA *info, uchar *buf, register MARIA_RECORD_POS filepos, my_bool skip_deleted_blocks __attribute__((unused))) { MARIA_BLOCK_INFO block_info; MARIA_SHARE *share= info->s; uchar *pos,*start; DBUG_ENTER("_ma_read_rnd_mempack_record"); if (filepos >= share->state.state.data_file_length) { my_errno=HA_ERR_END_OF_FILE; goto err; } if (!(pos= (uchar*) _ma_mempack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, &info->rec_buff_size, (uchar*) (start= share->file_map + filepos)))) goto err; #ifndef DBUG_OFF if (block_info.rec_len > info->s->max_pack_length) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } #endif info->packed_length=block_info.rec_len; info->cur_row.lastpos= filepos; info->cur_row.nextpos= filepos+(uint) (pos-start)+block_info.rec_len; info->update|= HA_STATE_AKTIV | HA_STATE_KEY_CHANGED; DBUG_RETURN (_ma_pack_rec_unpack(info, &info->bit_buff, buf, pos, block_info.rec_len)); err: DBUG_RETURN(my_errno); }
O0
c
ma_read_rnd_mempack_record: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movb %cl, %al movq %fs:0x28, %rcx movq %rcx, -0x8(%rbp) movq %rdi, -0x70(%rbp) movq %rsi, -0x78(%rbp) movq %rdx, -0x80(%rbp) movb %al, -0x81(%rbp) movq -0x70(%rbp), %rax movq (%rax), %rax movq %rax, -0x90(%rbp) movq -0x80(%rbp), %rax movq -0x90(%rbp), %rcx cmpq 0x40(%rcx), %rax jb 0x39ecb callq 0xf7440 movl $0x89, (%rax) jmp 0x39fa9 movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x70(%rbp), %rcx addq $0x3a0, %rcx # imm = 0x3A0 movq -0x70(%rbp), %r8 addq $0x460, %r8 # imm = 0x460 movq -0x90(%rbp), %rax movq 0x5f0(%rax), %r9 addq -0x80(%rbp), %r9 movq %r9, -0xa0(%rbp) leaq -0x60(%rbp), %rdx callq 0x3c600 movq %rax, -0x98(%rbp) cmpq $0x0, %rax jne 0x39f24 jmp 0x39fa9 movq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x450(%rax) movq -0x80(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x80(%rbp), %rcx movq -0x98(%rbp), %rax movq -0xa0(%rbp), %rdx subq %rdx, %rax movl %eax, %eax addq %rax, %rcx addq -0x48(%rbp), %rcx movq -0x70(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x70(%rbp), %rax movl 0x624(%rax), %ecx orl $0x82, %ecx movl %ecx, 0x624(%rax) movq -0x70(%rbp), %rdi movq -0x70(%rbp), %rsi addq $0x290, %rsi # imm = 0x290 movq -0x78(%rbp), %rdx movq -0x98(%rbp), %rcx movq -0x48(%rbp), %r8 callq 0x39650 movl %eax, -0x64(%rbp) jmp 0x39fb5 jmp 0x39fab callq 0xf7440 movl (%rax), %eax movl %eax, -0x64(%rbp) movl -0x64(%rbp), %eax movl %eax, -0xa4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x39fdf movl -0xa4(%rbp), %eax addq $0xb0, %rsp popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
_ma_read_rnd_mempack_record: push rbp mov rbp, rsp sub rsp, 0B0h mov al, cl mov rcx, fs:28h mov [rbp+var_8], rcx mov [rbp+var_70], rdi mov [rbp+var_78], rsi mov [rbp+var_80], rdx mov [rbp+var_81], al mov rax, [rbp+var_70] mov rax, [rax] mov [rbp+var_90], rax mov rax, [rbp+var_80] mov rcx, [rbp+var_90] cmp rax, [rcx+40h] jb short loc_39ECB call _my_thread_var mov dword ptr [rax], 89h jmp loc_39FA9 loc_39ECB: mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rcx, [rbp+var_70] add rcx, 3A0h mov r8, [rbp+var_70] add r8, 460h mov rax, [rbp+var_90] mov r9, [rax+5F0h] add r9, [rbp+var_80] mov [rbp+var_A0], r9 lea rdx, [rbp+var_60] call _ma_mempack_get_block_info mov [rbp+var_98], rax cmp rax, 0 jnz short loc_39F24 jmp loc_39FA9 loc_39F24: mov rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+450h], rcx mov rcx, [rbp+var_80] mov rax, [rbp+var_70] mov [rax+98h], rcx mov rcx, [rbp+var_80] mov rax, [rbp+var_98] mov rdx, [rbp+var_A0] sub rax, rdx mov eax, eax add rcx, rax add rcx, [rbp+var_48] mov rax, [rbp+var_70] mov [rax+0A0h], rcx mov rax, [rbp+var_70] mov ecx, [rax+624h] or ecx, 82h mov [rax+624h], ecx mov rdi, [rbp+var_70] mov rsi, [rbp+var_70] add rsi, 290h mov rdx, [rbp+var_78] mov rcx, [rbp+var_98] mov r8, [rbp+var_48] call _ma_pack_rec_unpack mov [rbp+var_64], eax jmp short loc_39FB5 loc_39FA9: jmp short $+2 loc_39FAB: call _my_thread_var mov eax, [rax] mov [rbp+var_64], eax loc_39FB5: mov eax, [rbp+var_64] mov [rbp+var_A4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_39FDF mov eax, [rbp+var_A4] add rsp, 0B0h pop rbp retn loc_39FDF: call ___stack_chk_fail
long long ma_read_rnd_mempack_record(_DWORD *a1, long long a2, unsigned long long a3) { unsigned long long v4; // [rsp+10h] [rbp-A0h] long long block_info; // [rsp+18h] [rbp-98h] _BYTE v8[24]; // [rsp+50h] [rbp-60h] BYREF long long v9; // [rsp+68h] [rbp-48h] unsigned long long v10; // [rsp+A8h] [rbp-8h] v10 = __readfsqword(0x28u); if ( a3 >= *(_QWORD *)(*(_QWORD *)a1 + 64LL) ) { *(_DWORD *)my_thread_var() = 137; return *(unsigned int *)my_thread_var(); } v4 = a3 + *(_QWORD *)(*(_QWORD *)a1 + 1520LL); block_info = ma_mempack_get_block_info(a1, a1 + 164, v8, a1 + 232, a1 + 280, v4); if ( !block_info ) return *(unsigned int *)my_thread_var(); *((_QWORD *)a1 + 138) = v9; *((_QWORD *)a1 + 19) = a3; *((_QWORD *)a1 + 20) = v9 + (unsigned int)(block_info - v4) + a3; a1[393] |= 0x82u; return (unsigned int)ma_pack_rec_unpack(a1, (long long)(a1 + 164), a2, block_info, v9); }
_ma_read_rnd_mempack_record: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV AL,CL MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RCX MOV qword ptr [RBP + -0x70],RDI MOV qword ptr [RBP + -0x78],RSI MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RBP + -0x81],AL MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RCX + 0x40] JC 0x00139ecb CALL 0x001f7440 MOV dword ptr [RAX],0x89 JMP 0x00139fa9 LAB_00139ecb: MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RCX,qword ptr [RBP + -0x70] ADD RCX,0x3a0 MOV R8,qword ptr [RBP + -0x70] ADD R8,0x460 MOV RAX,qword ptr [RBP + -0x90] MOV R9,qword ptr [RAX + 0x5f0] ADD R9,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0xa0],R9 LEA RDX,[RBP + -0x60] CALL 0x0013c600 MOV qword ptr [RBP + -0x98],RAX CMP RAX,0x0 JNZ 0x00139f24 JMP 0x00139fa9 LAB_00139f24: MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x450],RCX MOV RCX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RBP + -0x98] MOV RDX,qword ptr [RBP + -0xa0] SUB RAX,RDX MOV EAX,EAX ADD RCX,RAX ADD RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,dword ptr [RAX + 0x624] OR ECX,0x82 MOV dword ptr [RAX + 0x624],ECX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x70] ADD RSI,0x290 MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x98] MOV R8,qword ptr [RBP + -0x48] CALL 0x00139650 MOV dword ptr [RBP + -0x64],EAX JMP 0x00139fb5 LAB_00139fa9: JMP 0x00139fab LAB_00139fab: CALL 0x001f7440 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x64],EAX LAB_00139fb5: MOV EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0xa4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00139fdf MOV EAX,dword ptr [RBP + -0xa4] ADD RSP,0xb0 POP RBP RET LAB_00139fdf: CALL 0x0012a270
int4 _ma_read_rnd_mempack_record(long *param_1,int8 param_2,ulong param_3) { int8 uVar1; int4 *puVar2; long lVar3; long in_FS_OFFSET; int4 local_6c; int1 local_68 [24]; long local_50; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); if (param_3 < *(ulong *)(*param_1 + 0x40)) { uVar1 = *(int8 *)(*param_1 + 0x5f0); lVar3 = _ma_mempack_get_block_info (param_1,param_1 + 0x52,local_68,param_1 + 0x74,param_1 + 0x8c); if (lVar3 != 0) { param_1[0x8a] = local_50; param_1[0x13] = param_3; param_1[0x14] = param_3 + (uint)((int)lVar3 - ((int)uVar1 + (int)param_3)) + local_50; *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) | 0x82; local_6c = _ma_pack_rec_unpack(param_1,param_1 + 0x52,param_2,lVar3,local_50); goto LAB_00139fb5; } } else { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x89; } puVar2 = (int4 *)_my_thread_var(); local_6c = *puVar2; LAB_00139fb5: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_6c; }
39,732
js_typed_array_get_buffer
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_get_buffer(JSContext *ctx, JSValue this_val) { JSObject *p; JSTypedArray *ta; p = get_typed_array(ctx, this_val); if (!p) return JS_EXCEPTION; ta = p->u.typed_array; return js_dup(JS_MKPTR(JS_TAG_OBJECT, ta->buffer)); }
O1
c
js_typed_array_get_buffer: pushq %rbx subq $0x10, %rsp movq %rsi, 0x8(%rsp) cmpl $-0x1, %edx jne 0x80845 movq 0x8(%rsp), %rbx movzwl 0x6(%rbx), %eax addl $-0x15, %eax cmpw $0xc, %ax jb 0x80855 leaq 0x21bc5(%rip), %rsi # 0xa2411 xorl %ebx, %ebx xorl %eax, %eax callq 0x22567 testq %rbx, %rbx je 0x8086d movq 0x30(%rbx), %rax movq 0x18(%rax), %rax incl (%rax) movq $-0x1, %rdx jmp 0x80874 movl $0x6, %edx xorl %eax, %eax addq $0x10, %rsp popq %rbx retq
js_string_localeCompare: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r13, r8 mov rbx, rdi xor r12d, r12d mov [rsp+78h+var_70], r12 mov [rsp+78h+var_78], r12 call JS_ToStringCheckObject mov r15, rdx mov [rsp+78h+var_38], rax mov ebp, 6 cmp r15d, 6 jz short loc_808C5 mov r14, rax mov rsi, [r13+0] mov rdx, [r13+8] xor r12d, r12d mov rdi, rbx xor ecx, ecx call JS_ToStringInternal mov r13, rdx mov [rsp+78h+var_48], rax mov [rsp+78h+var_40], rax mov ebp, 6 cmp r13d, 6 jnz short loc_808DA loc_8088C: mov rdi, [rbx+18h] mov rsi, r14 mov rdx, r15 call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rsp+78h+var_48] mov rdx, r13 call JS_FreeValueRT mov rsi, [rsp+78h+var_70] mov rdi, rbx call js_free mov rsi, [rsp+78h+var_78] mov rdi, rbx call js_free loc_808C5: mov rax, r12 mov rdx, rbp add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_808DA: mov rsi, [rsp+78h+var_38] lea rdx, [rsp+78h+var_70] mov rdi, rbx call to_utf32_buf cmp eax, 0FFFFFFFFh jnz short loc_808F6 loc_808F1: xor r12d, r12d jmp short loc_8088C loc_808F6: mov r12d, eax mov rsi, [rsp+78h+var_40] mov rdx, rsp mov rdi, rbx call to_utf32_buf cmp eax, 0FFFFFFFFh jz short loc_808F1 mov [rsp+78h+var_5C], eax mov rsi, [rsp+78h+var_70] lea r9, js_realloc lea rdi, [rsp+78h+var_58] mov edx, r12d xor r12d, r12d mov [rsp+78h+var_68], rsi xor ecx, ecx mov r8, rbx call unicode_normalize cmp eax, 0FFFFFFFFh jz loc_8088C mov [rsp+78h+var_60], eax mov rdi, rbx mov rsi, [rsp+78h+var_68] call js_free lea rdi, [rsp+78h+var_58] mov rax, [rdi] mov [rsp+78h+var_68], rax mov [rsp+78h+var_70], rax mov rsi, [rsp+78h+var_78] lea r9, js_realloc xor r12d, r12d mov [rsp+78h+var_50], rsi mov edx, [rsp+78h+var_5C] xor ecx, ecx mov r8, rbx call unicode_normalize cmp eax, 0FFFFFFFFh jz loc_8088C mov rdi, rbx mov rsi, [rsp+78h+var_50] mov ebp, eax call js_free mov r10d, ebp mov rax, [rsp+78h+var_58] mov [rsp+78h+var_78], rax mov r8d, [rsp+78h+var_60] cmp r8d, ebp mov ecx, ebp cmovl ecx, r8d test ecx, ecx mov r9, [rsp+78h+var_68] jle short loc_809D7 mov ecx, ecx xor edx, edx loc_809C4: mov esi, [r9+rdx*4] mov edi, [rax+rdx*4] cmp esi, edi jnz short loc_809DA inc rdx cmp rcx, rdx jnz short loc_809C4 loc_809D7: cmp r8d, r10d loc_809DA: setb al setnbe cl movzx eax, al movzx r12d, cl sub r12d, eax xor ebp, ebp jmp loc_8088C
long long js_string_localeCompare( long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v16; // r12 unsigned long long v17; // rax long long v18; // r8 long long v19; // r9 __m128 v20; // xmm4 __m128 v21; // xmm5 long long v22; // rdx long long v23; // r15 _DWORD *v24; // r14 _DWORD *v25; // rax long long v26; // rdx long long v27; // r13 unsigned int v29; // eax unsigned int v30; // r12d unsigned int v31; // eax long long v32; // rdx int v33; // eax int v34; // eax int v35; // ebp int v36; // ecx long long v37; // rdx unsigned int v38; // esi unsigned int v39; // edi bool v40; // cf bool v41; // zf long long v42; // [rsp+0h] [rbp-78h] BYREF long long v43; // [rsp+8h] [rbp-70h] BYREF long long v44; // [rsp+10h] [rbp-68h] int v45; // [rsp+18h] [rbp-60h] unsigned int v46; // [rsp+1Ch] [rbp-5Ch] long long v47; // [rsp+20h] [rbp-58h] BYREF long long v48; // [rsp+28h] [rbp-50h] _DWORD *v49; // [rsp+30h] [rbp-48h] _DWORD *v50; // [rsp+38h] [rbp-40h] unsigned long long v51; // [rsp+40h] [rbp-38h] v16 = 0LL; v43 = 0LL; v42 = 0LL; v17 = JS_ToStringCheckObject(a1, a2, a3, a4, (long long)a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v23 = v22; v51 = v17; if ( (_DWORD)v22 != 6 ) { v24 = (_DWORD *)v17; v16 = 0LL; v25 = (_DWORD *)JS_ToStringInternal(a1, *a5, a5[1], 0, v18, v19, a7, a8, a9, a10, v20, v21, a13, a14); v27 = v26; v49 = v25; v50 = v25; if ( (_DWORD)v26 != 6 ) { v29 = to_utf32_buf(a1, v51, &v43); if ( v29 == -1 || (v30 = v29, v31 = to_utf32_buf(a1, (long long)v50, &v42), v31 == -1) ) { v16 = 0LL; } else { v46 = v31; v32 = v30; v16 = 0LL; v44 = v43; v33 = unicode_normalize(&v47, v43, v32, 0LL, a1, js_realloc); if ( v33 != -1 ) { v45 = v33; js_free(a1, v44); v44 = v47; v43 = v47; v16 = 0LL; v48 = v42; v34 = unicode_normalize(&v47, v42, v46, 0LL, a1, js_realloc); if ( v34 != -1 ) { v35 = v34; js_free(a1, v48); v42 = v47; v36 = v35; if ( v45 < v35 ) v36 = v45; if ( v36 <= 0 ) { LABEL_16: v40 = v45 < (unsigned int)v35; v41 = v45 == v35; } else { v37 = 0LL; while ( 1 ) { v38 = *(_DWORD *)(v44 + 4 * v37); v39 = *(_DWORD *)(v47 + 4 * v37); v40 = v38 < v39; v41 = v38 == v39; if ( v38 != v39 ) break; if ( v36 == ++v37 ) goto LABEL_16; } } v16 = (!v40 && !v41) - (unsigned int)v40; } } } } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v24, v23); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v49, v27); js_free(a1, v43); js_free(a1, v42); } return v16; }
js_string_localeCompare: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R13,R8 MOV RBX,RDI XOR R12D,R12D MOV qword ptr [RSP + 0x8],R12 MOV qword ptr [RSP],R12 CALL 0x00145fef MOV R15,RDX MOV qword ptr [RSP + 0x40],RAX MOV EBP,0x6 CMP R15D,0x6 JZ 0x001808c5 MOV R14,RAX MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] XOR R12D,R12D MOV RDI,RBX XOR ECX,ECX CALL 0x0012b4cd MOV R13,RDX MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0x38],RAX MOV EBP,0x6 CMP R13D,0x6 JNZ 0x001808da LAB_0018088c: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R14 MOV RDX,R15 CALL 0x001212b6 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x30] MOV RDX,R13 CALL 0x001212b6 MOV RSI,qword ptr [RSP + 0x8] MOV RDI,RBX CALL 0x00120589 MOV RSI,qword ptr [RSP] MOV RDI,RBX CALL 0x00120589 LAB_001808c5: MOV RAX,R12 MOV RDX,RBP ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001808da: MOV RSI,qword ptr [RSP + 0x40] LEA RDX,[RSP + 0x8] MOV RDI,RBX CALL 0x00115902 CMP EAX,-0x1 JNZ 0x001808f6 LAB_001808f1: XOR R12D,R12D JMP 0x0018088c LAB_001808f6: MOV R12D,EAX MOV RSI,qword ptr [RSP + 0x38] MOV RDX,RSP MOV RDI,RBX CALL 0x00115902 CMP EAX,-0x1 JZ 0x001808f1 MOV dword ptr [RSP + 0x1c],EAX MOV RSI,qword ptr [RSP + 0x8] LEA R9,[0x1205c8] LEA RDI,[RSP + 0x20] MOV EDX,R12D XOR R12D,R12D MOV qword ptr [RSP + 0x10],RSI XOR ECX,ECX MOV R8,RBX CALL 0x0019c3ab CMP EAX,-0x1 JZ 0x0018088c MOV dword ptr [RSP + 0x18],EAX MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x10] CALL 0x00120589 LEA RDI,[RSP + 0x20] MOV RAX,qword ptr [RDI] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP] LEA R9,[0x1205c8] XOR R12D,R12D MOV qword ptr [RSP + 0x28],RSI MOV EDX,dword ptr [RSP + 0x1c] XOR ECX,ECX MOV R8,RBX CALL 0x0019c3ab CMP EAX,-0x1 JZ 0x0018088c MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x28] MOV EBP,EAX CALL 0x00120589 MOV R10D,EBP MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX MOV R8D,dword ptr [RSP + 0x18] CMP R8D,EBP MOV ECX,EBP CMOVL ECX,R8D TEST ECX,ECX MOV R9,qword ptr [RSP + 0x10] JLE 0x001809d7 MOV ECX,ECX XOR EDX,EDX LAB_001809c4: MOV ESI,dword ptr [R9 + RDX*0x4] MOV EDI,dword ptr [RAX + RDX*0x4] CMP ESI,EDI JNZ 0x001809da INC RDX CMP RCX,RDX JNZ 0x001809c4 LAB_001809d7: CMP R8D,R10D LAB_001809da: SETC AL SETA CL MOVZX EAX,AL MOVZX R12D,CL SUB R12D,EAX XOR EBP,EBP JMP 0x0018088c
int js_string_localeCompare(long param_1) { uint uVar1; uint uVar2; int iVar3; int iVar4; uint uVar5; uint uVar6; ulong uVar7; int8 *in_R8; int iVar8; bool bVar9; bool bVar10; int1 auVar11 [16]; int1 auVar12 [16]; long local_78; long local_70; long local_68; uint local_60; int local_5c; long local_58; long local_50; int8 local_48; int8 local_40; int8 local_38; local_70 = 0; local_78 = 0; auVar11 = JS_ToStringCheckObject(); if (auVar11._8_4_ == 6) { return 0; } iVar8 = 0; local_38 = auVar11._0_8_; auVar12 = JS_ToStringInternal(param_1,*in_R8,in_R8[1],0); local_48 = auVar12._0_8_; local_40 = local_48; if (auVar12._8_4_ != 6) { iVar3 = to_utf32_buf(param_1,local_38,&local_70); if ((iVar3 == -1) || (iVar4 = to_utf32_buf(param_1,local_40,&local_78), iVar4 == -1)) { iVar8 = 0; } else { iVar8 = 0; local_68 = local_70; local_5c = iVar4; uVar5 = unicode_normalize(&local_58,local_70,iVar3,0,param_1,js_realloc); if (uVar5 != 0xffffffff) { local_60 = uVar5; js_free(param_1,local_68); local_68 = local_58; local_70 = local_58; iVar8 = 0; local_50 = local_78; uVar5 = unicode_normalize(&local_58,local_78,local_5c,0,param_1,js_realloc); if (uVar5 != 0xffffffff) { js_free(param_1,local_50); local_78 = local_58; uVar6 = uVar5; if ((int)local_60 < (int)uVar5) { uVar6 = local_60; } if (0 < (int)uVar6) { uVar7 = 0; do { uVar1 = *(uint *)(local_68 + uVar7 * 4); uVar2 = *(uint *)(local_58 + uVar7 * 4); bVar9 = uVar1 < uVar2; bVar10 = uVar1 == uVar2; if (!bVar10) goto LAB_001809da; uVar7 = uVar7 + 1; } while (uVar6 != uVar7); } bVar9 = local_60 < uVar5; bVar10 = local_60 == uVar5; LAB_001809da: iVar8 = (uint)(!bVar9 && !bVar10) - (uint)bVar9; } } } } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar11._0_8_,auVar11._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_48,auVar12._8_8_); js_free(param_1,local_70); js_free(param_1,local_78); return iVar8; }
39,733
js_typed_array_get_buffer
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_get_buffer(JSContext *ctx, JSValue this_val) { JSObject *p; JSTypedArray *ta; p = get_typed_array(ctx, this_val); if (!p) return JS_EXCEPTION; ta = p->u.typed_array; return js_dup(JS_MKPTR(JS_TAG_OBJECT, ta->buffer)); }
O2
c
js_typed_array_get_buffer: pushq %rax callq 0x3280b testq %rax, %rax je 0x6c130 movq 0x30(%rax), %rax movq 0x18(%rax), %rax incl (%rax) pushq $-0x1 popq %rdx jmp 0x6c135 pushq $0x6 popq %rdx xorl %eax, %eax popq %rcx retq
js_typed_array_get_buffer: push rax call get_typed_array test rax, rax jz short loc_6C130 mov rax, [rax+30h] mov rax, [rax+18h] inc dword ptr [rax] push 0FFFFFFFFFFFFFFFFh pop rdx jmp short loc_6C135 loc_6C130: push 6 pop rdx xor eax, eax loc_6C135: pop rcx retn
_DWORD * js_typed_array_get_buffer( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long typed_array; // rax _DWORD *result; // rax typed_array = get_typed_array(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( !typed_array ) return 0LL; result = *(_DWORD **)(*(_QWORD *)(typed_array + 48) + 24LL); ++*result; return result; }
js_typed_array_get_buffer: PUSH RAX CALL 0x0013280b TEST RAX,RAX JZ 0x0016c130 MOV RAX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RAX + 0x18] INC dword ptr [RAX] PUSH -0x1 POP RDX JMP 0x0016c135 LAB_0016c130: PUSH 0x6 POP RDX XOR EAX,EAX LAB_0016c135: POP RCX RET
int1 [16] js_typed_array_get_buffer(void) { long lVar1; int *piVar2; int8 uVar3; int1 auVar4 [16]; lVar1 = get_typed_array(); if (lVar1 == 0) { uVar3 = 6; piVar2 = (int *)0x0; } else { piVar2 = *(int **)(*(long *)(lVar1 + 0x30) + 0x18); *piVar2 = *piVar2 + 1; uVar3 = 0xffffffffffffffff; } auVar4._8_8_ = uVar3; auVar4._0_8_ = piVar2; return auVar4; }
39,734
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::next_byte_in_range(std::initializer_list<int>)
llama.cpp/common/json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::next_byte_in_range(std::initializer_list<int>): pushq %rbx subq $0x10, %rsp cmpq $0x6, %rdx ja 0x7548f movl $0x54, %eax btq %rdx, %rax jae 0x7548f leaq 0xf(%rsp), %rbx movq %rbx, %rcx callq 0x219a4 movb (%rbx), %al andb $0x1, %al addq $0x10, %rsp popq %rbx retq leaq 0xa4a02(%rip), %rdi # 0x119e98 leaq 0xa4a36(%rip), %rdx # 0x119ed3 leaq 0xa574e(%rip), %rcx # 0x11abf2 movl $0x1da8, %esi # imm = 0x1DA8 xorl %eax, %eax callq 0x20e70
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE18next_byte_in_rangeESt16initializer_listIiE: push rbx sub rsp, 10h cmp rdx, 6 ja short loc_7548F mov eax, 54h ; 'T' bt rax, rdx jnb short loc_7548F lea rbx, [rsp+18h+var_9] mov rcx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE18next_byte_in_rangeESt16initializer_listIiE_cold_1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::next_byte_in_range(std::initializer_list<int>) [clone] mov al, [rbx] and al, 1 add rsp, 10h pop rbx retn loc_7548F: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov esi, 1DA8h xor eax, eax call _ggml_abort
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::next_byte_in_range( __m128i *a1, __int32 *a2, unsigned long long a3) { long long v3; // rax long long v5; // rdx long long v6; // rcx char v7[9]; // [rsp+Fh] [rbp-9h] BYREF if ( a3 <= 6 && (v3 = 84LL, _bittest64(&v3, a3)) ) { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::next_byte_in_range( a1, a2, a3, v7); return v7[0] & 1; } else { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::json_sax_dom_callback_parser( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7592LL, v5, v6); } }
next_byte_in_range: PUSH RBX SUB RSP,0x10 CMP RDX,0x6 JA 0x0017548f MOV EAX,0x54 BT RAX,RDX JNC 0x0017548f LEA RBX,[RSP + 0xf] MOV RCX,RBX CALL 0x001219a4 MOV AL,byte ptr [RBX] AND AL,0x1 ADD RSP,0x10 POP RBX RET LAB_0017548f: LEA RDI,[0x219e98] LEA RDX,[0x219ed3] LEA RCX,[0x21abf2] MOV ESI,0x1da8 XOR EAX,EAX CALL 0x00120e70
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::next_byte_in_range(std::initializer_list<int>) */ ulong nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::next_byte_in_range(int8 param_1,int8 param_2,ulong param_3) { int8 uVar1; int1 local_9; if ((param_3 < 7) && ((0x54UL >> (param_3 & 0x3f) & 1) != 0)) { uVar1 = next_byte_in_range(); return CONCAT71((int7)((ulong)uVar1 >> 8),local_9) & 0xffffffffffffff01; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); }
39,735
my_numchars_mb
eloqsql/strings/ctype-mb.c
size_t my_numchars_mb(CHARSET_INFO *cs __attribute__((unused)), const char *pos, const char *end) { register size_t count= 0; while (pos < end) { uint mb_len; pos+= (mb_len= my_ismbchar(cs,pos,end)) ? mb_len : 1; count++; } return count; }
O3
c
my_numchars_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq %rdx, %rsi jae 0x3d559 movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r12 xorl %r14d, %r14d movl $0x1, %r13d movq 0xb8(%r12), %rax movq %r12, %rdi movq %r15, %rsi movq %rbx, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovbl %r13d, %eax cmovll %r13d, %eax addq %rax, %r15 incq %r14 cmpq %rbx, %r15 jb 0x3d52a jmp 0x3d55c xorl %r14d, %r14d movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_numchars_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp rsi, rdx jnb short loc_3D559 mov rbx, rdx mov r15, rsi mov r12, rdi xor r14d, r14d mov r13d, 1 loc_3D52A: mov rax, [r12+0B8h] mov rdi, r12 mov rsi, r15 mov rdx, rbx call qword ptr [rax+0C0h] cmp eax, 2 cmovb eax, r13d cmovl eax, r13d add r15, rax inc r14 cmp r15, rbx jb short loc_3D52A jmp short loc_3D55C loc_3D559: xor r14d, r14d loc_3D55C: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_numchars_mb(long long a1, unsigned long long a2, unsigned long long a3) { unsigned long long v4; // r15 long long v5; // r14 long long v6; // rax bool v7; // cc if ( a2 >= a3 ) return 0LL; v4 = a2; v5 = 0LL; do { v6 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v4, a3); v7 = (int)v6 < 2; if ( (unsigned int)v6 < 2 ) v6 = 1LL; if ( v7 ) v6 = 1LL; v4 += v6; ++v5; } while ( v4 < a3 ); return v5; }
my_numchars_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP RSI,RDX JNC 0x0013d559 MOV RBX,RDX MOV R15,RSI MOV R12,RDI XOR R14D,R14D MOV R13D,0x1 LAB_0013d52a: MOV RAX,qword ptr [R12 + 0xb8] MOV RDI,R12 MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVC EAX,R13D CMOVL EAX,R13D ADD R15,RAX INC R14 CMP R15,RBX JC 0x0013d52a JMP 0x0013d55c LAB_0013d559: XOR R14D,R14D LAB_0013d55c: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_numchars_mb(long param_1,ulong param_2,ulong param_3) { uint uVar1; ulong uVar2; long lVar3; if (param_2 < param_3) { lVar3 = 0; do { uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,param_3); uVar2 = (ulong)uVar1; if (uVar1 < 2) { uVar2 = 1; } if ((int)uVar1 < 2) { uVar2 = 1; } param_2 = param_2 + uVar2; lVar3 = lVar3 + 1; } while (param_2 < param_3); } else { lVar3 = 0; } return lVar3; }
39,736
bf_cmp_full
bluesky950520[P]quickjs/libbf.c
int bf_cmp_full(const bf_t *a, const bf_t *b) { int res; if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { if (a->expn == b->expn) res = 0; else if (a->expn == BF_EXP_NAN) res = 1; else res = -1; } else if (a->sign != b->sign) { res = 1 - 2 * a->sign; } else { res = bf_cmpu(a, b); if (a->sign) res = -res; } return res; }
O2
c
bf_cmp_full: movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movq 0x10(%rdi), %rcx movq 0x10(%rsi), %rdx cmpq %rax, %rcx jne 0x739ac pushq $0x1 popq %rsi jmp 0x739b7 cmpq %rax, %rdx jne 0x739c0 pushq $-0x1 popq %rsi movq %rax, %rdx xorl %eax, %eax cmpq %rdx, %rcx cmovnel %esi, %eax retq pushq %rbx movl 0x8(%rdi), %ebx cmpl 0x8(%rsi), %ebx jne 0x739d9 callq 0x73916 movl %eax, %ecx negl %eax testl %ebx, %ebx cmovel %ecx, %eax jmp 0x739e0 addl %ebx, %ebx pushq $0x1 popq %rax subl %ebx, %eax popq %rbx retq
bf_cmp_full: mov rax, 7FFFFFFFFFFFFFFFh mov rcx, [rdi+10h] mov rdx, [rsi+10h] cmp rcx, rax jnz short loc_739AC push 1 pop rsi jmp short loc_739B7 loc_739AC: cmp rdx, rax jnz short loc_739C0 push 0FFFFFFFFFFFFFFFFh pop rsi mov rdx, rax loc_739B7: xor eax, eax cmp rcx, rdx cmovnz eax, esi retn loc_739C0: push rbx mov ebx, [rdi+8] cmp ebx, [rsi+8] jnz short loc_739D9 call bf_cmpu mov ecx, eax neg eax test ebx, ebx cmovz eax, ecx jmp short loc_739E0 loc_739D9: add ebx, ebx push 1 pop rax sub eax, ebx loc_739E0: pop rbx retn
long long bf_cmp_full(long long a1, long long a2) { long long v2; // rcx long long v3; // rdx unsigned int v4; // esi long long result; // rax int v6; // ebx unsigned int v7; // ecx v2 = *(_QWORD *)(a1 + 16); v3 = *(_QWORD *)(a2 + 16); if ( v2 == 0x7FFFFFFFFFFFFFFFLL ) { v4 = 1; goto LABEL_5; } if ( v3 == 0x7FFFFFFFFFFFFFFFLL ) { v4 = -1; v3 = 0x7FFFFFFFFFFFFFFFLL; LABEL_5: result = 0LL; if ( v2 != v3 ) return v4; return result; } v6 = *(_DWORD *)(a1 + 8); if ( v6 != *(_DWORD *)(a2 + 8) ) return (unsigned int)(1 - 2 * v6); v7 = bf_cmpu((_QWORD *)a1, (_QWORD *)a2); result = -v7; if ( !v6 ) return v7; return result; }
bf_cmp_full: MOV RAX,0x7fffffffffffffff MOV RCX,qword ptr [RDI + 0x10] MOV RDX,qword ptr [RSI + 0x10] CMP RCX,RAX JNZ 0x001739ac PUSH 0x1 POP RSI JMP 0x001739b7 LAB_001739ac: CMP RDX,RAX JNZ 0x001739c0 PUSH -0x1 POP RSI MOV RDX,RAX LAB_001739b7: XOR EAX,EAX CMP RCX,RDX CMOVNZ EAX,ESI RET LAB_001739c0: PUSH RBX MOV EBX,dword ptr [RDI + 0x8] CMP EBX,dword ptr [RSI + 0x8] JNZ 0x001739d9 CALL 0x00173916 MOV ECX,EAX NEG EAX TEST EBX,EBX CMOVZ EAX,ECX JMP 0x001739e0 LAB_001739d9: ADD EBX,EBX PUSH 0x1 POP RAX SUB EAX,EBX LAB_001739e0: POP RBX RET
int bf_cmp_full(long param_1,long param_2) { int iVar1; int iVar2; long lVar3; int iVar4; lVar3 = *(long *)(param_2 + 0x10); if (*(long *)(param_1 + 0x10) == 0x7fffffffffffffff) { iVar4 = 1; } else { if (lVar3 != 0x7fffffffffffffff) { iVar4 = *(int *)(param_1 + 8); if (iVar4 == *(int *)(param_2 + 8)) { iVar1 = bf_cmpu(); iVar2 = -iVar1; if (iVar4 == 0) { iVar2 = iVar1; } } else { iVar2 = iVar4 * -2 + 1; } return iVar2; } iVar4 = -1; lVar3 = 0x7fffffffffffffff; } iVar2 = 0; if (*(long *)(param_1 + 0x10) != lVar3) { iVar2 = iVar4; } return iVar2; }
39,737
audit_plugin_so_init
eloqsql/plugin/server_audit/server_audit.c
void __attribute__ ((constructor)) audit_plugin_so_init(void) { serv_ver= server_version; #endif /*_WIN32*/ if (!serv_ver) goto exit; started_mariadb= strstr(serv_ver, "MariaDB") != 0; debug_server_started= strstr(serv_ver, "debug") != 0; if (started_mariadb) { if (serv_ver[0] == '1') use_event_data_for_disconnect= 1; else maria_55_started= 1; } else { /* Started MySQL. */ if (serv_ver[0] == '5' && serv_ver[2] == '5') { int sc= serv_ver[4] - '0'; if (serv_ver[5] >= '0' && serv_ver[5] <= '9') sc= sc * 10 + serv_ver[5] - '0'; if (sc <= 10) { mysql_descriptor.interface_version= 0x0200; mysql_descriptor.event_notify= (void *) auditing_v8; } else if (sc < 14) { mysql_descriptor.interface_version= 0x0200; mysql_descriptor.event_notify= (void *) auditing_v13; } } else if (serv_ver[0] == '5' && serv_ver[2] == '6') { int sc= serv_ver[4] - '0'; if (serv_ver[5] >= '0' && serv_ver[5] <= '9') sc= sc * 10 + serv_ver[5] - '0'; if (sc >= 24) use_event_data_for_disconnect= 1; } else if ((serv_ver[0] == '5' && serv_ver[2] == '7') || (serv_ver[0] == '8' && serv_ver[2] == '0')) { mysql_57_started= 1; _mysql_plugin_declarations_[0].info= mysql_v4_descriptor; use_event_data_for_disconnect= 1; } MYSQL_SYSVAR_NAME(loc_info).flags= PLUGIN_VAR_STR | PLUGIN_VAR_THDLOCAL | PLUGIN_VAR_READONLY | PLUGIN_VAR_MEMALLOC; } memset(locinfo_ini_value, 'O', sizeof(locinfo_ini_value)-1); locinfo_ini_value[sizeof(locinfo_ini_value)-1]= 0; exit: #ifdef _WIN32 return 1; #else return; #endif }
O3
c
audit_plugin_so_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq 0x6aa7(%rip), %rbx # 0xbfa0 movq %rbx, 0x8da0(%rip) # 0xe2a0 leaq 0x3d54(%rip), %rsi # 0x925b movq %rbx, %rdi callq 0x3330 movq %rax, %r14 leaq 0x3d4a(%rip), %rsi # 0x9263 movq %rbx, %rdi callq 0x3330 xorl %ecx, %ecx testq %rax, %rax setne %cl movl %ecx, 0x7c25(%rip) # 0xd154 movzbl (%rbx), %eax testq %r14, %r14 je 0x5548 cmpl $0x31, %eax jne 0x55ab movb $0x1, 0x84bd(%rip) # 0xda00 jmp 0x55e7 cmpl $0x38, %eax je 0x55b4 cmpl $0x35, %eax jne 0x55dd movzbl 0x2(%rbx), %eax cmpl $0x37, %eax je 0x55ba cmpl $0x36, %eax je 0x560c cmpl $0x35, %eax jne 0x55dd movsbl 0x4(%rbx), %eax leal -0x30(%rax), %ecx movsbl 0x5(%rbx), %edx leal -0x30(%rdx), %esi cmpb $0xa, %sil leal (%rax,%rax,4), %eax leal -0x210(%rdx,%rax,2), %eax cmovael %ecx, %eax cmpl $0xa, %eax jg 0x5639 movl $0x200, 0x7199(%rip) # imm = 0x200 leaq 0xb2(%rip), %rax # 0x5658 jmp 0x564f movb $0x1, 0x7b9e(%rip) # 0xd150 jmp 0x55e7 cmpb $0x30, 0x2(%rbx) jne 0x55dd movb $0x1, %al movb %al, 0x8ce6(%rip) # 0xe2a8 movq 0x69f7(%rip), %rcx # 0xbfc0 movq (%rcx), %rcx movq 0x6a0d(%rip), %rdx # 0xbfe0 movq %rcx, 0x8(%rdx) movb %al, 0x8423(%rip) # 0xda00 movl $0x8305, 0x7459(%rip) # imm = 0x8305 movq 0x6992(%rip), %rbx # 0xbf80 movl $0x89b, %edx # imm = 0x89B movq %rbx, %rdi movl $0x4f, %esi callq 0x3160 movb $0x0, 0x89b(%rbx) popq %rbx popq %r14 popq %rbp retq movsbl 0x4(%rbx), %eax leal -0x30(%rax), %ecx movsbl 0x5(%rbx), %edx leal -0x30(%rdx), %esi cmpb $0xa, %sil leal (%rax,%rax,4), %eax leal -0x210(%rdx,%rax,2), %eax cmovael %ecx, %eax cmpl $0x18, %eax jl 0x55dd movb $0x1, 0x83c9(%rip) # 0xda00 jmp 0x55dd cmpl $0xd, %eax ja 0x55dd movl $0x200, 0x70f0(%rip) # imm = 0x200 leaq 0xde(%rip), %rax # 0x572d movq %rax, 0x70f2(%rip) # 0xc748 jmp 0x55dd
audit_plugin_so_init: push rbp mov rbp, rsp push r14 push rbx mov rbx, cs:server_version_ptr mov cs:serv_ver, rbx lea rsi, aMariadb; "MariaDB" mov rdi, rbx call _strstr mov r14, rax lea rsi, aDebug; "debug" mov rdi, rbx call _strstr xor ecx, ecx test rax, rax setnz cl mov cs:debug_server_started, ecx movzx eax, byte ptr [rbx] test r14, r14 jz short loc_5548 cmp eax, 31h ; '1' jnz short loc_55AB mov cs:use_event_data_for_disconnect, 1 jmp loc_55E7 loc_5548: cmp eax, 38h ; '8' jz short loc_55B4 cmp eax, 35h ; '5' jnz loc_55DD movzx eax, byte ptr [rbx+2] cmp eax, 37h ; '7' jz short loc_55BA cmp eax, 36h ; '6' jz loc_560C cmp eax, 35h ; '5' jnz short loc_55DD movsx eax, byte ptr [rbx+4] lea ecx, [rax-30h] movsx edx, byte ptr [rbx+5] lea esi, [rdx-30h] cmp sil, 0Ah lea eax, [rax+rax*4] lea eax, [rdx+rax*2-210h] cmovnb eax, ecx cmp eax, 0Ah jg loc_5639 mov cs:mysql_descriptor, 200h lea rax, auditing_v8 jmp loc_564F loc_55AB: mov cs:maria_55_started, 1 jmp short loc_55E7 loc_55B4: cmp byte ptr [rbx+2], 30h ; '0' jnz short loc_55DD loc_55BA: mov al, 1 mov cs:mysql_57_started, al mov rcx, cs:mysql_v4_descriptor_ptr mov rcx, [rcx] mov rdx, cs:_mysql_plugin_declarations__ptr mov [rdx+8], rcx mov cs:use_event_data_for_disconnect, al loc_55DD: mov cs:mysql_sysvar_loc_info, 8305h loc_55E7: mov rbx, cs:locinfo_ini_value_ptr mov edx, 89Bh mov rdi, rbx mov esi, 4Fh ; 'O' call _memset mov byte ptr [rbx+89Bh], 0 pop rbx pop r14 pop rbp retn loc_560C: movsx eax, byte ptr [rbx+4] lea ecx, [rax-30h] movsx edx, byte ptr [rbx+5] lea esi, [rdx-30h] cmp sil, 0Ah lea eax, [rax+rax*4] lea eax, [rdx+rax*2-210h] cmovnb eax, ecx cmp eax, 18h jl short loc_55DD mov cs:use_event_data_for_disconnect, 1 jmp short loc_55DD loc_5639: cmp eax, 0Dh ja short loc_55DD mov cs:mysql_descriptor, 200h lea rax, auditing_v13 loc_564F: mov cs:off_C748, rax jmp short loc_55DD
long long audit_plugin_so_init() { long long v0; // r14 int v1; // eax int v2; // eax int v3; // ecx int v4; // eax long long ( *v5)(); // rax long long result; // rax int v7; // eax int v8; // ecx int v9; // eax serv_ver = (long long)server_version; v0 = strstr(server_version, "MariaDB"); debug_server_started = strstr(server_version, "debug") != 0; if ( !v0 ) { if ( server_version[0] == 56 ) { if ( server_version[2] != 48 ) goto LABEL_16; } else { if ( server_version[0] != 53 ) goto LABEL_16; v1 = server_version[2]; if ( v1 != 55 ) { if ( v1 == 54 ) { v7 = (char)server_version[4]; v8 = v7 - 48; v9 = (char)server_version[5] + 10 * v7 - 528; if ( (unsigned __int8)(server_version[5] - 48) >= 0xAu ) v9 = v8; if ( v9 >= 24 ) use_event_data_for_disconnect = 1; goto LABEL_16; } if ( v1 == 53 ) { v2 = (char)server_version[4]; v3 = v2 - 48; v4 = (char)server_version[5] + 10 * v2 - 528; if ( (unsigned __int8)(server_version[5] - 48) >= 0xAu ) v4 = v3; if ( v4 <= 10 ) { mysql_descriptor = 512; v5 = auditing_v8; LABEL_24: off_C748 = v5; goto LABEL_16; } if ( (unsigned int)v4 <= 0xD ) { mysql_descriptor = 512; v5 = auditing_v13; goto LABEL_24; } } LABEL_16: mysql_sysvar_loc_info = 33541; goto LABEL_17; } } mysql_57_started = 1; *((_QWORD *)&mysql_plugin_declarations_ + 1) = mysql_v4_descriptor; use_event_data_for_disconnect = 1; goto LABEL_16; } if ( server_version[0] == 49 ) use_event_data_for_disconnect = 1; else maria_55_started = 1; LABEL_17: result = memset(locinfo_ini_value, 79LL, 2203LL); locinfo_ini_value[2203] = 0; return result; }
audit_plugin_so_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,qword ptr [0x0010bfa0] MOV qword ptr [0x0010e2a0],RBX LEA RSI,[0x10925b] MOV RDI,RBX CALL 0x00103330 MOV R14,RAX LEA RSI,[0x109263] MOV RDI,RBX CALL 0x00103330 XOR ECX,ECX TEST RAX,RAX SETNZ CL MOV dword ptr [0x0010d154],ECX MOVZX EAX,byte ptr [RBX] TEST R14,R14 JZ 0x00105548 CMP EAX,0x31 JNZ 0x001055ab MOV byte ptr [0x0010da00],0x1 JMP 0x001055e7 LAB_00105548: CMP EAX,0x38 JZ 0x001055b4 CMP EAX,0x35 JNZ 0x001055dd MOVZX EAX,byte ptr [RBX + 0x2] CMP EAX,0x37 JZ 0x001055ba CMP EAX,0x36 JZ 0x0010560c CMP EAX,0x35 JNZ 0x001055dd MOVSX EAX,byte ptr [RBX + 0x4] LEA ECX,[RAX + -0x30] MOVSX EDX,byte ptr [RBX + 0x5] LEA ESI,[RDX + -0x30] CMP SIL,0xa LEA EAX,[RAX + RAX*0x4] LEA EAX,[RDX + RAX*0x2 + -0x210] CMOVNC EAX,ECX CMP EAX,0xa JG 0x00105639 MOV dword ptr [0x0010c738],0x200 LEA RAX,[0x105658] JMP 0x0010564f LAB_001055ab: MOV byte ptr [0x0010d150],0x1 JMP 0x001055e7 LAB_001055b4: CMP byte ptr [RBX + 0x2],0x30 JNZ 0x001055dd LAB_001055ba: MOV AL,0x1 MOV byte ptr [0x0010e2a8],AL MOV RCX,qword ptr [0x0010bfc0] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [0x0010bfe0] MOV qword ptr [RDX + 0x8],RCX MOV byte ptr [0x0010da00],AL LAB_001055dd: MOV dword ptr [0x0010ca40],0x8305 LAB_001055e7: MOV RBX,qword ptr [0x0010bf80] MOV EDX,0x89b MOV RDI,RBX MOV ESI,0x4f CALL 0x00103160 MOV byte ptr [RBX + 0x89b],0x0 POP RBX POP R14 POP RBP RET LAB_0010560c: MOVSX EAX,byte ptr [RBX + 0x4] LEA ECX,[RAX + -0x30] MOVSX EDX,byte ptr [RBX + 0x5] LEA ESI,[RDX + -0x30] CMP SIL,0xa LEA EAX,[RAX + RAX*0x4] LEA EAX,[RDX + RAX*0x2 + -0x210] CMOVNC EAX,ECX CMP EAX,0x18 JL 0x001055dd MOV byte ptr [0x0010da00],0x1 JMP 0x001055dd LAB_00105639: CMP EAX,0xd JA 0x001055dd MOV dword ptr [0x0010c738],0x200 LEA RAX,[0x10572d] LAB_0010564f: MOV qword ptr [0x0010c748],RAX JMP 0x001055dd
void audit_plugin_so_init(void) { char cVar1; int *puVar2; uint uVar3; int iVar4; char *pcVar5; char *pcVar6; code *pcVar7; puVar2 = PTR_server_version_0010bfa0; serv_ver = PTR_server_version_0010bfa0; pcVar5 = strstr(PTR_server_version_0010bfa0,"MariaDB"); pcVar6 = strstr(puVar2,"debug"); debug_server_started = (uint)(pcVar6 != (char *)0x0); cVar1 = *puVar2; if (pcVar5 != (char *)0x0) { if (cVar1 == '1') { use_event_data_for_disconnect = 1; } else { maria_55_started = 1; } goto LAB_001055e7; } if (cVar1 == '8') { if (puVar2[2] == '0') { LAB_001055ba: mysql_57_started = 1; *(int8 *)(PTR__mysql_plugin_declarations__0010bfe0 + 8) = *(int8 *)PTR_mysql_v4_descriptor_0010bfc0; use_event_data_for_disconnect = 1; } } else if (cVar1 == '5') { cVar1 = puVar2[2]; if (cVar1 == '7') goto LAB_001055ba; if (cVar1 == '6') { iVar4 = (char)puVar2[5] + -0x210 + (char)puVar2[4] * 10; if (9 < (byte)(puVar2[5] - 0x30)) { iVar4 = (char)puVar2[4] + -0x30; } if (0x17 < iVar4) { use_event_data_for_disconnect = 1; } } else if (cVar1 == '5') { uVar3 = (char)puVar2[5] + -0x210 + (char)puVar2[4] * 10; if (9 < (byte)(puVar2[5] - 0x30)) { uVar3 = (int)(char)puVar2[4] - 0x30; } if ((int)uVar3 < 0xb) { pcVar7 = auditing_v8; } else { if (0xd < uVar3) goto LAB_001055dd; pcVar7 = auditing_v13; } mysql_descriptor._0_4_ = 0x200; mysql_descriptor._16_8_ = pcVar7; } } LAB_001055dd: mysql_sysvar_loc_info._0_4_ = 0x8305; LAB_001055e7: puVar2 = PTR_locinfo_ini_value_0010bf80; memset(PTR_locinfo_ini_value_0010bf80,0x4f,0x89b); puVar2[0x89b] = 0; return; }
39,738
stbi__YCbCr_to_RGB_simd(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc const *pcb, stbi_uc const *pcr, int count, int step) { int i = 0; #ifdef STBI_SSE2 // step == 3 is pretty ugly on the final interleave, and i'm not convinced // it's useful in practice (you wouldn't use it for textures, for example). // so just accelerate step == 4 case. if (step == 4) { // this is a fairly straightforward implementation and not super-optimized. __m128i signflip = _mm_set1_epi8(-0x80); __m128i cr_const0 = _mm_set1_epi16( (short) ( 1.40200f*4096.0f+0.5f)); __m128i cr_const1 = _mm_set1_epi16( - (short) ( 0.71414f*4096.0f+0.5f)); __m128i cb_const0 = _mm_set1_epi16( - (short) ( 0.34414f*4096.0f+0.5f)); __m128i cb_const1 = _mm_set1_epi16( (short) ( 1.77200f*4096.0f+0.5f)); __m128i y_bias = _mm_set1_epi8((char) (unsigned char) 128); __m128i xw = _mm_set1_epi16(255); // alpha channel for (; i+7 < count; i += 8) { // load __m128i y_bytes = _mm_loadl_epi64((__m128i *) (y+i)); __m128i cr_bytes = _mm_loadl_epi64((__m128i *) (pcr+i)); __m128i cb_bytes = _mm_loadl_epi64((__m128i *) (pcb+i)); __m128i cr_biased = _mm_xor_si128(cr_bytes, signflip); // -128 __m128i cb_biased = _mm_xor_si128(cb_bytes, signflip); // -128 // unpack to short (and left-shift cr, cb by 8) __m128i yw = _mm_unpacklo_epi8(y_bias, y_bytes); __m128i crw = _mm_unpacklo_epi8(_mm_setzero_si128(), cr_biased); __m128i cbw = _mm_unpacklo_epi8(_mm_setzero_si128(), cb_biased); // color transform __m128i yws = _mm_srli_epi16(yw, 4); __m128i cr0 = _mm_mulhi_epi16(cr_const0, crw); __m128i cb0 = _mm_mulhi_epi16(cb_const0, cbw); __m128i cb1 = _mm_mulhi_epi16(cbw, cb_const1); __m128i cr1 = _mm_mulhi_epi16(crw, cr_const1); __m128i rws = _mm_add_epi16(cr0, yws); __m128i gwt = _mm_add_epi16(cb0, yws); __m128i bws = _mm_add_epi16(yws, cb1); __m128i gws = _mm_add_epi16(gwt, cr1); // descale __m128i rw = _mm_srai_epi16(rws, 4); __m128i bw = _mm_srai_epi16(bws, 4); __m128i gw = _mm_srai_epi16(gws, 4); // back to byte, set up for transpose __m128i brb = _mm_packus_epi16(rw, bw); __m128i gxb = _mm_packus_epi16(gw, xw); // transpose to interleave channels __m128i t0 = _mm_unpacklo_epi8(brb, gxb); __m128i t1 = _mm_unpackhi_epi8(brb, gxb); __m128i o0 = _mm_unpacklo_epi16(t0, t1); __m128i o1 = _mm_unpackhi_epi16(t0, t1); // store _mm_storeu_si128((__m128i *) (out + 0), o0); _mm_storeu_si128((__m128i *) (out + 16), o1); out += 32; } } #endif #ifdef STBI_NEON // in this version, step=3 support would be easy to add. but is there demand? if (step == 4) { // this is a fairly straightforward implementation and not super-optimized. uint8x8_t signflip = vdup_n_u8(0x80); int16x8_t cr_const0 = vdupq_n_s16( (short) ( 1.40200f*4096.0f+0.5f)); int16x8_t cr_const1 = vdupq_n_s16( - (short) ( 0.71414f*4096.0f+0.5f)); int16x8_t cb_const0 = vdupq_n_s16( - (short) ( 0.34414f*4096.0f+0.5f)); int16x8_t cb_const1 = vdupq_n_s16( (short) ( 1.77200f*4096.0f+0.5f)); for (; i+7 < count; i += 8) { // load uint8x8_t y_bytes = vld1_u8(y + i); uint8x8_t cr_bytes = vld1_u8(pcr + i); uint8x8_t cb_bytes = vld1_u8(pcb + i); int8x8_t cr_biased = vreinterpret_s8_u8(vsub_u8(cr_bytes, signflip)); int8x8_t cb_biased = vreinterpret_s8_u8(vsub_u8(cb_bytes, signflip)); // expand to s16 int16x8_t yws = vreinterpretq_s16_u16(vshll_n_u8(y_bytes, 4)); int16x8_t crw = vshll_n_s8(cr_biased, 7); int16x8_t cbw = vshll_n_s8(cb_biased, 7); // color transform int16x8_t cr0 = vqdmulhq_s16(crw, cr_const0); int16x8_t cb0 = vqdmulhq_s16(cbw, cb_const0); int16x8_t cr1 = vqdmulhq_s16(crw, cr_const1); int16x8_t cb1 = vqdmulhq_s16(cbw, cb_const1); int16x8_t rws = vaddq_s16(yws, cr0); int16x8_t gws = vaddq_s16(vaddq_s16(yws, cb0), cr1); int16x8_t bws = vaddq_s16(yws, cb1); // undo scaling, round, convert to byte uint8x8x4_t o; o.val[0] = vqrshrun_n_s16(rws, 4); o.val[1] = vqrshrun_n_s16(gws, 4); o.val[2] = vqrshrun_n_s16(bws, 4); o.val[3] = vdup_n_u8(255); // store, interleaving r/g/b/a vst4_u8(out, o); out += 8*4; } } #endif for (; i < count; ++i) { int y_fixed = (y[i] << 20) + (1<<19); // rounding int r,g,b; int cr = pcr[i] - 128; int cb = pcb[i] - 128; r = y_fixed + cr* stbi__float2fixed(1.40200f); g = y_fixed + cr*-stbi__float2fixed(0.71414f) + ((cb*-stbi__float2fixed(0.34414f)) & 0xffff0000); b = y_fixed + cb* stbi__float2fixed(1.77200f); r >>= 20; g >>= 20; b >>= 20; if ((unsigned) r > 255) { if (r < 0) r = 0; else r = 255; } if ((unsigned) g > 255) { if (g < 0) g = 0; else g = 255; } if ((unsigned) b > 255) { if (b < 0) b = 0; else b = 255; } out[0] = (stbi_uc)r; out[1] = (stbi_uc)g; out[2] = (stbi_uc)b; out[3] = 255; out += step; } }
O2
c
stbi__YCbCr_to_RGB_simd(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movslq %r8d, %rax xorl %r8d, %r8d cmpl $0x4, %r9d jne 0x401fb movdqa 0x85ad4(%rip), %xmm0 # 0xc5be0 movdqa 0x85adc(%rip), %xmm1 # 0xc5bf0 movdqa 0x85ae4(%rip), %xmm2 # 0xc5c00 movdqa 0x85aec(%rip), %xmm3 # 0xc5c10 movdqa 0x85af4(%rip), %xmm4 # 0xc5c20 movdqa 0x85afc(%rip), %xmm5 # 0xc5c30 leaq 0x7(%r8), %r10 cmpq %rax, %r10 jge 0x401fb movq (%rsi,%r8), %xmm6 movq (%rcx,%r8), %xmm7 movq (%rdx,%r8), %xmm8 movdqa %xmm0, %xmm9 punpcklbw %xmm6, %xmm9 # xmm9 = xmm9[0],xmm6[0],xmm9[1],xmm6[1],xmm9[2],xmm6[2],xmm9[3],xmm6[3],xmm9[4],xmm6[4],xmm9[5],xmm6[5],xmm9[6],xmm6[6],xmm9[7],xmm6[7] pxor %xmm0, %xmm7 pxor %xmm10, %xmm10 punpcklbw %xmm7, %xmm10 # xmm10 = xmm10[0],xmm7[0],xmm10[1],xmm7[1],xmm10[2],xmm7[2],xmm10[3],xmm7[3],xmm10[4],xmm7[4],xmm10[5],xmm7[5],xmm10[6],xmm7[6],xmm10[7],xmm7[7] pxor %xmm0, %xmm8 pxor %xmm7, %xmm7 punpcklbw %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1],xmm7[2],xmm8[2],xmm7[3],xmm8[3],xmm7[4],xmm8[4],xmm7[5],xmm8[5],xmm7[6],xmm8[6],xmm7[7],xmm8[7] psrlw $0x4, %xmm9 movdqa %xmm10, %xmm6 pmulhw %xmm1, %xmm6 movdqa %xmm7, %xmm8 pmulhw %xmm2, %xmm8 pmulhw %xmm3, %xmm7 pmulhw %xmm4, %xmm10 paddw %xmm9, %xmm6 paddw %xmm9, %xmm8 paddw %xmm10, %xmm8 paddw %xmm9, %xmm7 psraw $0x4, %xmm6 psraw $0x4, %xmm7 packuswb %xmm7, %xmm6 psraw $0x4, %xmm8 packuswb %xmm5, %xmm8 movdqa %xmm6, %xmm7 punpcklbw %xmm8, %xmm7 # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1],xmm7[2],xmm8[2],xmm7[3],xmm8[3],xmm7[4],xmm8[4],xmm7[5],xmm8[5],xmm7[6],xmm8[6],xmm7[7],xmm8[7] punpckhbw %xmm8, %xmm6 # xmm6 = xmm6[8],xmm8[8],xmm6[9],xmm8[9],xmm6[10],xmm8[10],xmm6[11],xmm8[11],xmm6[12],xmm8[12],xmm6[13],xmm8[13],xmm6[14],xmm8[14],xmm6[15],xmm8[15] movdqa %xmm7, %xmm8 punpcklwd %xmm6, %xmm8 # xmm8 = xmm8[0],xmm6[0],xmm8[1],xmm6[1],xmm8[2],xmm6[2],xmm8[3],xmm6[3] punpckhwd %xmm6, %xmm7 # xmm7 = xmm7[4],xmm6[4],xmm7[5],xmm6[5],xmm7[6],xmm6[6],xmm7[7],xmm6[7] movdqu %xmm8, (%rdi) movdqu %xmm7, 0x10(%rdi) addq $0x20, %rdi addq $0x8, %r8 jmp 0x40134 movslq %r9d, %r9 addq $0x3, %rdi movl $0xff, %ebp cmpq %rax, %r8 jge 0x402cd movzbl (%rsi,%r8), %ebx shll $0x14, %ebx movzbl (%rcx,%r8), %r14d addl $-0x80, %r14d imull $0x166f00, %r14d, %r10d # imm = 0x166F00 leal (%r10,%rbx), %r11d addl $0x80000, %r11d # imm = 0x80000 sarl $0x14, %r11d xorl %r10d, %r10d testl %r11d, %r11d cmovlel %r10d, %r11d cmpl %ebp, %r11d jl 0x4024c movl $0xff, %r11d movzbl (%rdx,%r8), %r15d addl $-0x80, %r15d imull $0xfff49300, %r14d, %r14d # imm = 0xFFF49300 leal (%r14,%rbx), %r12d addl $0x80000, %r12d # imm = 0x80000 imull $0xfffa7e00, %r15d, %r14d # imm = 0xFFFA7E00 andl $0xffff0000, %r14d # imm = 0xFFFF0000 addl %r12d, %r14d sarl $0x14, %r14d testl %r14d, %r14d jg 0x40284 xorl %r14d, %r14d cmpl %ebp, %r14d jl 0x4028f movl $0xff, %r14d imull $0x1c5a00, %r15d, %r15d # imm = 0x1C5A00 addl %r15d, %ebx addl $0x80000, %ebx # imm = 0x80000 sarl $0x14, %ebx testl %ebx, %ebx cmovgl %ebx, %r10d cmpl %ebp, %r10d jl 0x402b3 movl $0xff, %r10d movb %r11b, -0x3(%rdi) movb %r14b, -0x2(%rdi) movb %r10b, -0x1(%rdi) movb $-0x1, (%rdi) incq %r8 addq %r9, %rdi jmp 0x40207 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZL23stbi__YCbCr_to_RGB_simdPhPKhS1_S1_ii: push rbp push r15 push r14 push r12 push rbx movsxd rax, r8d xor r8d, r8d cmp r9d, 4 jnz loc_401FB movdqa xmm0, cs:xmmword_C5BE0 movdqa xmm1, cs:xmmword_C5BF0 movdqa xmm2, cs:xmmword_C5C00 movdqa xmm3, cs:xmmword_C5C10 movdqa xmm4, cs:xmmword_C5C20 movdqa xmm5, cs:xmmword_C5C30 loc_40134: lea r10, [r8+7] cmp r10, rax jge loc_401FB movq xmm6, qword ptr [rsi+r8] movq xmm7, qword ptr [rcx+r8] movq xmm8, qword ptr [rdx+r8] movdqa xmm9, xmm0 punpcklbw xmm9, xmm6 pxor xmm7, xmm0 pxor xmm10, xmm10 punpcklbw xmm10, xmm7 pxor xmm8, xmm0 pxor xmm7, xmm7 punpcklbw xmm7, xmm8 psrlw xmm9, 4 movdqa xmm6, xmm10 pmulhw xmm6, xmm1 movdqa xmm8, xmm7 pmulhw xmm8, xmm2 pmulhw xmm7, xmm3 pmulhw xmm10, xmm4 paddw xmm6, xmm9 paddw xmm8, xmm9 paddw xmm8, xmm10 paddw xmm7, xmm9 psraw xmm6, 4 psraw xmm7, 4 packuswb xmm6, xmm7 psraw xmm8, 4 packuswb xmm8, xmm5 movdqa xmm7, xmm6 punpcklbw xmm7, xmm8 punpckhbw xmm6, xmm8 movdqa xmm8, xmm7 punpcklwd xmm8, xmm6 punpckhwd xmm7, xmm6 movdqu xmmword ptr [rdi], xmm8 movdqu xmmword ptr [rdi+10h], xmm7 add rdi, 20h ; ' ' add r8, 8 jmp loc_40134 loc_401FB: movsxd r9, r9d add rdi, 3 mov ebp, 0FFh loc_40207: cmp r8, rax jge loc_402CD movzx ebx, byte ptr [rsi+r8] shl ebx, 14h movzx r14d, byte ptr [rcx+r8] add r14d, 0FFFFFF80h imul r10d, r14d, 166F00h lea r11d, [r10+rbx] add r11d, 80000h sar r11d, 14h xor r10d, r10d test r11d, r11d cmovle r11d, r10d cmp r11d, ebp jl short loc_4024C mov r11d, 0FFh loc_4024C: movzx r15d, byte ptr [rdx+r8] add r15d, 0FFFFFF80h imul r14d, 0FFF49300h lea r12d, [r14+rbx] add r12d, 80000h imul r14d, r15d, 0FFFA7E00h and r14d, 0FFFF0000h add r14d, r12d sar r14d, 14h test r14d, r14d jg short loc_40284 xor r14d, r14d loc_40284: cmp r14d, ebp jl short loc_4028F mov r14d, 0FFh loc_4028F: imul r15d, 1C5A00h add ebx, r15d add ebx, 80000h sar ebx, 14h test ebx, ebx cmovg r10d, ebx cmp r10d, ebp jl short loc_402B3 mov r10d, 0FFh loc_402B3: mov [rdi-3], r11b mov [rdi-2], r14b mov [rdi-1], r10b mov byte ptr [rdi], 0FFh inc r8 add rdi, r9 jmp loc_40207 loc_402CD: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long stbi__YCbCr_to_RGB_simd( __m128i *a1, const unsigned __int8 *a2, const unsigned __int8 *a3, const unsigned __int8 *a4, int a5, int a6) { long long result; // rax long long v7; // r8 __m128i si128; // xmm0 __m128i v9; // xmm1 __m128i v10; // xmm2 __m128i v11; // xmm3 __m128i v12; // xmm4 __m128i v13; // xmm5 __m128i v14; // xmm10 __m128i v15; // xmm7 __m128i v16; // xmm9 __m128i v17; // xmm6 __m128i v18; // xmm8 __m128i v19; // xmm7 __m128i v20; // xmm6 unsigned __int8 *v21; // rdi int v22; // ebx int v23; // r14d int v24; // r11d int v25; // r10d int v26; // r15d int v27; // r14d int v28; // ebx result = a5; v7 = 0LL; if ( a6 == 4 ) { si128 = _mm_load_si128((const __m128i *)&xmmword_C5BE0); v9 = _mm_load_si128((const __m128i *)&xmmword_C5BF0); v10 = _mm_load_si128((const __m128i *)&xmmword_C5C00); v11 = _mm_load_si128((const __m128i *)&xmmword_C5C10); v12 = _mm_load_si128((const __m128i *)&xmmword_C5C20); v13 = _mm_load_si128((const __m128i *)&xmmword_C5C30); while ( v7 + 7 < result ) { v14 = _mm_unpacklo_epi8((__m128i)0LL, _mm_xor_si128(_mm_loadl_epi64((const __m128i *)&a4[v7]), si128)); v15 = _mm_unpacklo_epi8((__m128i)0LL, _mm_xor_si128(_mm_loadl_epi64((const __m128i *)&a3[v7]), si128)); v16 = _mm_srli_epi16(_mm_unpacklo_epi8(si128, _mm_loadl_epi64((const __m128i *)&a2[v7])), 4u); v17 = _mm_packus_epi16( _mm_srai_epi16(_mm_add_epi16(_mm_mulhi_epi16(v14, v9), v16), 4u), _mm_srai_epi16(_mm_add_epi16(_mm_mulhi_epi16(v15, v11), v16), 4u)); v18 = _mm_packus_epi16( _mm_srai_epi16( _mm_add_epi16(_mm_add_epi16(_mm_mulhi_epi16(v15, v10), v16), _mm_mulhi_epi16(v14, v12)), 4u), v13); v19 = _mm_unpacklo_epi8(v17, v18); v20 = _mm_unpackhi_epi8(v17, v18); *a1 = _mm_unpacklo_epi16(v19, v20); a1[1] = _mm_unpackhi_epi16(v19, v20); a1 += 2; v7 += 8LL; } } v21 = &a1->m128i_u8[3]; while ( v7 < result ) { v22 = a2[v7] << 20; v23 = a4[v7] - 128; v24 = (1470208 * v23 + v22 + 0x80000) >> 20; v25 = 0; if ( v24 <= 0 ) v24 = 0; if ( v24 >= 255 ) LOBYTE(v24) = -1; v26 = a3[v7] - 128; v27 = (int)(-748800 * v23 + v22 + 0x80000 + ((-360960 * v26) & 0xFFFF0000)) >> 20; if ( v27 <= 0 ) v27 = 0; if ( v27 >= 255 ) LOBYTE(v27) = -1; v28 = (1858048 * v26 + v22 + 0x80000) >> 20; if ( v28 > 0 ) v25 = v28; if ( v25 >= 255 ) LOBYTE(v25) = -1; *(v21 - 3) = v24; *(v21 - 2) = v27; *(v21 - 1) = v25; *v21 = -1; ++v7; v21 += a6; } return result; }
stbi__YCbCr_to_RGB_simd: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOVSXD RAX,R8D XOR R8D,R8D CMP R9D,0x4 JNZ 0x001401fb MOVDQA XMM0,xmmword ptr [0x001c5be0] MOVDQA XMM1,xmmword ptr [0x001c5bf0] MOVDQA XMM2,xmmword ptr [0x001c5c00] MOVDQA XMM3,xmmword ptr [0x001c5c10] MOVDQA XMM4,xmmword ptr [0x001c5c20] MOVDQA XMM5,xmmword ptr [0x001c5c30] LAB_00140134: LEA R10,[R8 + 0x7] CMP R10,RAX JGE 0x001401fb MOVQ XMM6,qword ptr [RSI + R8*0x1] MOVQ XMM7,qword ptr [RCX + R8*0x1] MOVQ XMM8,qword ptr [RDX + R8*0x1] MOVDQA XMM9,XMM0 PUNPCKLBW XMM9,XMM6 PXOR XMM7,XMM0 PXOR XMM10,XMM10 PUNPCKLBW XMM10,XMM7 PXOR XMM8,XMM0 PXOR XMM7,XMM7 PUNPCKLBW XMM7,XMM8 PSRLW XMM9,0x4 MOVDQA XMM6,XMM10 PMULHW XMM6,XMM1 MOVDQA XMM8,XMM7 PMULHW XMM8,XMM2 PMULHW XMM7,XMM3 PMULHW XMM10,XMM4 PADDW XMM6,XMM9 PADDW XMM8,XMM9 PADDW XMM8,XMM10 PADDW XMM7,XMM9 PSRAW XMM6,0x4 PSRAW XMM7,0x4 PACKUSWB XMM6,XMM7 PSRAW XMM8,0x4 PACKUSWB XMM8,XMM5 MOVDQA XMM7,XMM6 PUNPCKLBW XMM7,XMM8 PUNPCKHBW XMM6,XMM8 MOVDQA XMM8,XMM7 PUNPCKLWD XMM8,XMM6 PUNPCKHWD XMM7,XMM6 MOVDQU xmmword ptr [RDI],XMM8 MOVDQU xmmword ptr [RDI + 0x10],XMM7 ADD RDI,0x20 ADD R8,0x8 JMP 0x00140134 LAB_001401fb: MOVSXD R9,R9D ADD RDI,0x3 MOV EBP,0xff LAB_00140207: CMP R8,RAX JGE 0x001402cd MOVZX EBX,byte ptr [RSI + R8*0x1] SHL EBX,0x14 MOVZX R14D,byte ptr [RCX + R8*0x1] ADD R14D,-0x80 IMUL R10D,R14D,0x166f00 LEA R11D,[R10 + RBX*0x1] ADD R11D,0x80000 SAR R11D,0x14 XOR R10D,R10D TEST R11D,R11D CMOVLE R11D,R10D CMP R11D,EBP JL 0x0014024c MOV R11D,0xff LAB_0014024c: MOVZX R15D,byte ptr [RDX + R8*0x1] ADD R15D,-0x80 IMUL R14D,R14D,-0xb6d00 LEA R12D,[R14 + RBX*0x1] ADD R12D,0x80000 IMUL R14D,R15D,-0x58200 AND R14D,0xffff0000 ADD R14D,R12D SAR R14D,0x14 TEST R14D,R14D JG 0x00140284 XOR R14D,R14D LAB_00140284: CMP R14D,EBP JL 0x0014028f MOV R14D,0xff LAB_0014028f: IMUL R15D,R15D,0x1c5a00 ADD EBX,R15D ADD EBX,0x80000 SAR EBX,0x14 TEST EBX,EBX CMOVG R10D,EBX CMP R10D,EBP JL 0x001402b3 MOV R10D,0xff LAB_001402b3: MOV byte ptr [RDI + -0x3],R11B MOV byte ptr [RDI + -0x2],R14B MOV byte ptr [RDI + -0x1],R10B MOV byte ptr [RDI],0xff INC R8 ADD RDI,R9 JMP 0x00140207 LAB_001402cd: POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* stbi__YCbCr_to_RGB_simd(unsigned char*, unsigned char const*, unsigned char const*, unsigned char const*, int, int) */ void stbi__YCbCr_to_RGB_simd (uchar *param_1,uchar *param_2,uchar *param_3,uchar *param_4,int param_5,int param_6) { char cVar1; short sVar2; short sVar3; short sVar4; short sVar5; short sVar6; short sVar7; short sVar8; short sVar9; short sVar10; short sVar11; short sVar12; short sVar13; short sVar14; short sVar15; short sVar16; short sVar17; short sVar18; short sVar19; short sVar20; short sVar21; short sVar22; short sVar23; short sVar24; int1 auVar25 [16]; int1 auVar26 [16]; int1 auVar27 [14]; int1 auVar28 [12]; unkbyte10 Var29; int1 auVar30 [14]; int1 auVar31 [12]; unkbyte9 Var32; int1 auVar33 [12]; int1 auVar34 [12]; int1 auVar35 [12]; int1 auVar36 [12]; int1 auVar37 [12]; int1 auVar38 [12]; int6 uVar39; int4 uVar40; int2 uVar41; int1 auVar42 [16]; int1 auVar43 [16]; int1 auVar44 [16]; int1 auVar45 [16]; int1 auVar46 [16]; short sVar47; short sVar48; short sVar49; short sVar50; short sVar51; short sVar52; short sVar53; short sVar54; int iVar55; uchar *puVar56; long lVar57; int iVar58; int iVar59; int iVar60; int2 uVar61; int1 auVar67 [16]; int1 auVar68 [16]; int1 auVar70 [16]; int1 auVar71 [16]; int1 auVar72 [16]; int1 auVar73 [16]; int1 auVar74 [16]; int1 auVar75 [16]; int1 auVar76 [16]; int1 auVar77 [16]; ushort uVar81; ushort uVar89; ushort uVar90; ushort uVar91; ushort uVar92; ushort uVar93; ushort uVar94; int1 auVar82 [16]; ushort uVar95; int1 auVar96 [16]; int4 uVar62; int6 uVar63; int8 uVar64; int1 auVar65 [12]; int1 auVar66 [14]; int1 auVar69 [16]; int1 auVar78 [16]; int1 auVar79 [16]; int1 auVar80 [16]; int1 auVar83 [16]; int1 auVar84 [16]; int1 auVar85 [16]; int1 auVar86 [16]; int1 auVar87 [16]; int1 auVar88 [16]; sVar54 = _UNK_001c5c3e; sVar53 = _UNK_001c5c3c; sVar52 = _UNK_001c5c3a; sVar51 = _UNK_001c5c38; sVar50 = _UNK_001c5c36; sVar49 = _UNK_001c5c34; sVar48 = _UNK_001c5c32; sVar47 = _DAT_001c5c30; auVar46 = _DAT_001c5c20; auVar45 = _DAT_001c5c10; auVar44 = _DAT_001c5c00; auVar43 = _DAT_001c5bf0; auVar42 = _DAT_001c5be0; lVar57 = 0; if (param_6 == 4) { for (; lVar57 + 7 < (long)param_5; lVar57 = lVar57 + 8) { uVar64 = *(int8 *)(param_2 + lVar57); auVar70._8_8_ = 0; auVar70._0_8_ = *(ulong *)(param_4 + lVar57); auVar74._8_8_ = 0; auVar74._0_8_ = *(ulong *)(param_3 + lVar57); auVar88._0_14_ = auVar42._0_14_; auVar88[0xe] = auVar42[7]; auVar88[0xf] = (char)((ulong)uVar64 >> 0x38); auVar87._14_2_ = auVar88._14_2_; auVar87._0_13_ = auVar42._0_13_; auVar87[0xd] = (char)((ulong)uVar64 >> 0x30); auVar86._13_3_ = auVar87._13_3_; auVar86._0_12_ = auVar42._0_12_; auVar86[0xc] = auVar42[6]; auVar85._12_4_ = auVar86._12_4_; auVar85._0_11_ = auVar42._0_11_; auVar85[0xb] = (char)((ulong)uVar64 >> 0x28); auVar84._11_5_ = auVar85._11_5_; auVar84._0_10_ = auVar42._0_10_; auVar84[10] = auVar42[5]; auVar83._10_6_ = auVar84._10_6_; auVar83._0_9_ = auVar42._0_9_; auVar83[9] = (char)((ulong)uVar64 >> 0x20); auVar82._9_7_ = auVar83._9_7_; auVar82._0_8_ = auVar42._0_8_; auVar82[8] = auVar42[4]; Var29 = CONCAT91(CONCAT81(auVar82._8_8_,(char)((ulong)uVar64 >> 0x18)),auVar42[3]); auVar28._2_10_ = Var29; auVar28[1] = (char)((ulong)uVar64 >> 0x10); auVar28[0] = auVar42[2]; auVar27._2_12_ = auVar28; auVar27[1] = (char)((ulong)uVar64 >> 8); auVar27[0] = auVar42[1]; auVar70 = auVar70 ^ auVar42; auVar33[10] = 0; auVar33._0_10_ = SUB1610((int1 [16])0x0,0); auVar33[0xb] = auVar70[5]; auVar35[9] = auVar70[4]; auVar35._0_9_ = SUB169((int1 [16])0x0,0); auVar35._10_2_ = auVar33._10_2_; auVar37._9_3_ = auVar35._9_3_; auVar37._0_9_ = (unkuint9)0; auVar75._1_10_ = SUB1610(ZEXT516(CONCAT41(auVar37._8_4_,auVar70[3])) << 0x38,6); auVar75[0] = auVar70[2]; auVar75._11_5_ = 0; auVar67._1_12_ = SUB1612(auVar75 << 0x28,4); auVar67[0] = auVar70[1]; auVar67._13_3_ = 0; auVar96._1_14_ = SUB1614(auVar67 << 0x18,2); auVar96[0] = auVar70[0]; auVar96[0xf] = 0; auVar74 = auVar74 ^ auVar42; auVar34[10] = 0; auVar34._0_10_ = SUB1610((int1 [16])0x0,0); auVar34[0xb] = auVar74[5]; auVar36[9] = auVar74[4]; auVar36._0_9_ = SUB169((int1 [16])0x0,0); auVar36._10_2_ = auVar34._10_2_; auVar38._9_3_ = auVar36._9_3_; auVar38._0_9_ = (unkuint9)0; auVar26._1_10_ = SUB1610(ZEXT516(CONCAT41(auVar38._8_4_,auVar74[3])) << 0x38,6); auVar26[0] = auVar74[2]; auVar26._11_5_ = 0; auVar25._1_12_ = SUB1612(auVar26 << 0x28,4); auVar25[0] = auVar74[1]; auVar25._13_3_ = 0; auVar71._1_14_ = SUB1614(auVar25 << 0x18,2); auVar71[0] = auVar74[0]; auVar71[0xf] = 0; uVar81 = CONCAT11((char)uVar64,auVar42[0]) >> 4; uVar89 = auVar27._0_2_ >> 4; uVar90 = auVar28._0_2_ >> 4; uVar91 = (ushort)Var29 >> 4; uVar92 = auVar82._8_2_ >> 4; uVar93 = auVar84._10_2_ >> 4; uVar94 = auVar86._12_2_ >> 4; uVar95 = auVar87._14_2_ >> 4; auVar67 = pmulhw(auVar96 << 8,auVar43); auVar75 = pmulhw(auVar71 << 8,auVar44); auVar71 = pmulhw(auVar71 << 8,auVar45); auVar96 = pmulhw(auVar96 << 8,auVar46); auVar68._0_2_ = auVar67._0_2_ + uVar81; auVar68._2_2_ = auVar67._2_2_ + uVar89; auVar68._4_2_ = auVar67._4_2_ + uVar90; auVar68._6_2_ = auVar67._6_2_ + uVar91; auVar68._8_2_ = auVar67._8_2_ + uVar92; auVar68._10_2_ = auVar67._10_2_ + uVar93; auVar68._12_2_ = auVar67._12_2_ + uVar94; auVar68._14_2_ = auVar67._14_2_ + uVar95; auVar76._0_2_ = auVar75._0_2_ + uVar81 + auVar96._0_2_; auVar76._2_2_ = auVar75._2_2_ + uVar89 + auVar96._2_2_; auVar76._4_2_ = auVar75._4_2_ + uVar90 + auVar96._4_2_; auVar76._6_2_ = auVar75._6_2_ + uVar91 + auVar96._6_2_; auVar76._8_2_ = auVar75._8_2_ + uVar92 + auVar96._8_2_; auVar76._10_2_ = auVar75._10_2_ + uVar93 + auVar96._10_2_; auVar76._12_2_ = auVar75._12_2_ + uVar94 + auVar96._12_2_; auVar76._14_2_ = auVar75._14_2_ + uVar95 + auVar96._14_2_; auVar72._0_2_ = auVar71._0_2_ + uVar81; auVar72._2_2_ = auVar71._2_2_ + uVar89; auVar72._4_2_ = auVar71._4_2_ + uVar90; auVar72._6_2_ = auVar71._6_2_ + uVar91; auVar72._8_2_ = auVar71._8_2_ + uVar92; auVar72._10_2_ = auVar71._10_2_ + uVar93; auVar72._12_2_ = auVar71._12_2_ + uVar94; auVar72._14_2_ = auVar71._14_2_ + uVar95; auVar96 = psraw(auVar68,4); auVar71 = psraw(auVar72,4); sVar2 = auVar96._0_2_; sVar3 = auVar96._2_2_; sVar5 = auVar96._4_2_; sVar7 = auVar96._6_2_; sVar9 = auVar96._8_2_; sVar11 = auVar96._10_2_; sVar13 = auVar96._12_2_; sVar15 = auVar96._14_2_; cVar1 = (0 < sVar15) * (sVar15 < 0x100) * auVar96[0xe] - (0xff < sVar15); sVar17 = auVar71._0_2_; sVar18 = auVar71._2_2_; sVar19 = auVar71._4_2_; sVar20 = auVar71._6_2_; sVar21 = auVar71._8_2_; sVar22 = auVar71._10_2_; sVar23 = auVar71._12_2_; sVar24 = auVar71._14_2_; auVar67 = psraw(auVar76,4); sVar15 = auVar67._0_2_; sVar4 = auVar67._2_2_; sVar6 = auVar67._4_2_; sVar8 = auVar67._6_2_; sVar10 = auVar67._8_2_; sVar12 = auVar67._10_2_; sVar14 = auVar67._12_2_; sVar16 = auVar67._14_2_; uVar41 = CONCAT11((0 < sVar16) * (sVar16 < 0x100) * auVar67[0xe] - (0xff < sVar16),cVar1); uVar40 = CONCAT31(CONCAT21(uVar41,(0 < sVar14) * (sVar14 < 0x100) * auVar67[0xc] - (0xff < sVar14)), (0 < sVar13) * (sVar13 < 0x100) * auVar96[0xc] - (0xff < sVar13)); uVar39 = CONCAT51(CONCAT41(uVar40,(0 < sVar12) * (sVar12 < 0x100) * auVar67[10] - (0xff < sVar12)), (0 < sVar11) * (sVar11 < 0x100) * auVar96[10] - (0xff < sVar11)); Var32 = CONCAT72(CONCAT61(uVar39,(0 < sVar10) * (sVar10 < 0x100) * auVar67[8] - (0xff < sVar10)), CONCAT11((0 < sVar9) * (sVar9 < 0x100) * auVar96[8] - (0xff < sVar9),cVar1)); Var29 = CONCAT91(CONCAT81((long)((unkuint9)Var32 >> 8), (0 < sVar8) * (sVar8 < 0x100) * auVar67[6] - (0xff < sVar8)), (0 < sVar7) * (sVar7 < 0x100) * auVar96[6] - (0xff < sVar7)); auVar31._2_10_ = Var29; auVar31[1] = (0 < sVar6) * (sVar6 < 0x100) * auVar67[4] - (0xff < sVar6); auVar31[0] = (0 < sVar5) * (sVar5 < 0x100) * auVar96[4] - (0xff < sVar5); auVar30._2_12_ = auVar31; auVar30[1] = (0 < sVar4) * (sVar4 < 0x100) * auVar67[2] - (0xff < sVar4); auVar30[0] = (0 < sVar3) * (sVar3 < 0x100) * auVar96[2] - (0xff < sVar3); auVar73._0_2_ = CONCAT11((0 < sVar15) * (sVar15 < 0x100) * auVar67[0] - (0xff < sVar15), (0 < sVar2) * (sVar2 < 0x100) * auVar96[0] - (0xff < sVar2)); auVar73._2_14_ = auVar30; uVar61 = CONCAT11((0 < sVar47) * (sVar47 < 0x100) * (char)sVar47 - (0xff < sVar47), (0 < sVar17) * (sVar17 < 0x100) * auVar71[0] - (0xff < sVar17)); uVar62 = CONCAT13((0 < sVar48) * (sVar48 < 0x100) * (char)sVar48 - (0xff < sVar48), CONCAT12((0 < sVar18) * (sVar18 < 0x100) * auVar71[2] - (0xff < sVar18), uVar61)); uVar63 = CONCAT15((0 < sVar49) * (sVar49 < 0x100) * (char)sVar49 - (0xff < sVar49), CONCAT14((0 < sVar19) * (sVar19 < 0x100) * auVar71[4] - (0xff < sVar19), uVar62)); uVar64 = CONCAT17((0 < sVar50) * (sVar50 < 0x100) * (char)sVar50 - (0xff < sVar50), CONCAT16((0 < sVar20) * (sVar20 < 0x100) * auVar71[6] - (0xff < sVar20), uVar63)); auVar65._0_10_ = CONCAT19((0 < sVar51) * (sVar51 < 0x100) * (char)sVar51 - (0xff < sVar51), CONCAT18((0 < sVar21) * (sVar21 < 0x100) * auVar71[8] - (0xff < sVar21),uVar64)) ; auVar65[10] = (0 < sVar22) * (sVar22 < 0x100) * auVar71[10] - (0xff < sVar22); auVar65[0xb] = (0 < sVar52) * (sVar52 < 0x100) * (char)sVar52 - (0xff < sVar52); auVar66[0xc] = (0 < sVar23) * (sVar23 < 0x100) * auVar71[0xc] - (0xff < sVar23); auVar66._0_12_ = auVar65; auVar66[0xd] = (0 < sVar53) * (sVar53 < 0x100) * (char)sVar53 - (0xff < sVar53); auVar69[0xe] = (0 < sVar24) * (sVar24 < 0x100) * auVar71[0xe] - (0xff < sVar24); auVar69._0_14_ = auVar66; auVar69[0xf] = (0 < sVar54) * (sVar54 < 0x100) * (char)sVar54 - (0xff < sVar54); auVar80._0_12_ = auVar73._0_12_; auVar80._12_2_ = (short)Var29; auVar80._14_2_ = (short)((ulong)uVar64 >> 0x30); auVar79._12_4_ = auVar80._12_4_; auVar79._0_10_ = auVar73._0_10_; auVar79._10_2_ = (short)((uint6)uVar63 >> 0x20); auVar78._10_6_ = auVar79._10_6_; auVar78._0_8_ = auVar73._0_8_; auVar78._8_2_ = auVar31._0_2_; auVar77._8_8_ = auVar78._8_8_; auVar77._6_2_ = (short)((uint)uVar62 >> 0x10); auVar77._4_2_ = auVar30._0_2_; auVar77._2_2_ = uVar61; auVar77._0_2_ = auVar73._0_2_; *(int1 (*) [16])param_1 = auVar77; *(short *)*(int1 (*) [16])((long)param_1 + 0x10) = (short)((unkuint9)Var32 >> 8); *(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 2) = (short)((unkuint10)auVar65._0_10_ >> 0x40); *(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 4) = (short)uVar39; *(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 6) = auVar65._10_2_; *(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 8) = (short)uVar40; *(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 10) = auVar66._12_2_; *(int2 *)(*(int1 (*) [16])((long)param_1 + 0x10) + 0xc) = uVar41; *(short *)(*(int1 (*) [16])((long)param_1 + 0x10) + 0xe) = auVar69._14_2_; param_1 = (uchar *)((long)param_1 + 0x20); } } puVar56 = *(int1 (*) [16])param_1 + 3; for (; lVar57 < param_5; lVar57 = lVar57 + 1) { iVar58 = (uint)param_2[lVar57] * 0x100000; iVar59 = (int)((param_4[lVar57] - 0x80) * 0x166f00 + iVar58 + 0x80000) >> 0x14; if (iVar59 < 1) { iVar59 = 0; } if (0xfe < iVar59) { iVar59 = 0xff; } iVar60 = ((param_3[lVar57] - 0x80) * -0x58200 & 0xffff0000) + (param_4[lVar57] - 0x80) * -0xb6d00 + iVar58 + 0x80000; if (iVar60 >> 0x14 < 1) { iVar60 = 0; } iVar60 = iVar60 >> 0x14; if (0xfe < iVar60) { iVar60 = 0xff; } iVar55 = (int)(iVar58 + (param_3[lVar57] - 0x80) * 0x1c5a00 + 0x80000) >> 0x14; iVar58 = 0; if (0 < iVar55) { iVar58 = iVar55; } if (0xfe < iVar58) { iVar58 = 0xff; } puVar56[-3] = (uchar)iVar59; puVar56[-2] = (uchar)iVar60; puVar56[-1] = (uchar)iVar58; *puVar56 = 0xff; puVar56 = puVar56 + param_6; } return; }
39,739
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long)
monkey531[P]llama/common/json.hpp
bool start_object(std::size_t len) { ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) { JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); } return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq 0x90(%rsp), %rdi movq %rdi, 0x18(%rsp) movq %rdi, %rax addq $0x8, %rax movq %rax, 0x20(%rsp) movb $0x1, 0x7f(%rsp) leaq 0x7f(%rsp), %rsi callq 0xbbf80 movq 0x20(%rsp), %rdi movq %rax, 0x80(%rsp) leaq 0x80(%rsp), %rsi callq 0xbbf50 xorl %eax, %eax cmpq $-0x1, 0x88(%rsp) movb %al, 0x2a(%rsp) je 0xbb8df movq 0x18(%rsp), %rdi movq 0x88(%rsp), %rax movq %rax, 0x10(%rsp) addq $0x8, %rdi callq 0xaf560 movq (%rax), %rdi callq 0xaf5a0 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax seta %al movb %al, 0x2a(%rsp) movb 0x2a(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xbb8f0 jmp 0xbb9cd movb $0x1, 0x2b(%rsp) movl $0x20, %edi callq 0x5a6b0 movq %rax, 0x8(%rsp) movq 0x88(%rsp), %rsi leaq 0x38(%rsp), %rdi callq 0xaf880 jmp 0xbb918 leaq 0x1529c0(%rip), %rsi # 0x20e2df leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rdx callq 0xaf7d0 jmp 0xbb930 movq 0x18(%rsp), %rdi addq $0x8, %rdi callq 0xaf560 movq 0x8(%rsp), %rdi movq (%rax), %rcx movl $0x198, %esi # imm = 0x198 leaq 0x58(%rsp), %rdx callq 0xaf620 jmp 0xbb957 movq 0x8(%rsp), %rdi movb $0x0, 0x2b(%rsp) leaq 0x1e53a0(%rip), %rsi # 0x2a0d08 leaq -0xcd3f(%rip), %rdx # 0xaec30 callq 0x5ab30 jmp 0xbb9e3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xbb9b8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xbb9ae movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x58(%rsp), %rdi callq 0x5b588 leaq 0x38(%rsp), %rdi callq 0x5b588 testb $0x1, 0x2b(%rsp) jne 0xbb9c1 jmp 0xbb9cb movq 0x8(%rsp), %rdi callq 0x5af90 jmp 0xbb9d9 movb $0x1, %al andb $0x1, %al addq $0x98, %rsp retq movq 0x30(%rsp), %rdi callq 0x5abf0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm: sub rsp, 98h mov qword ptr [rsp+98h+var_8], rdi; char mov [rsp+98h+var_10], rsi; int mov rdi, qword ptr [rsp+98h+var_8] mov qword ptr [rsp+98h+var_80], rdi; char mov rax, rdi add rax, 8 mov qword ptr [rsp+98h+var_78], rax; int mov [rsp+98h+var_19], 1 lea rsi, [rsp+98h+var_19] call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&) mov rdi, qword ptr [rsp+98h+var_78] mov qword ptr [rsp+98h+var_18], rax; int lea rsi, [rsp+98h+var_18] call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backEOSE_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *&&) xor eax, eax cmp [rsp+98h+var_10], 0FFFFFFFFFFFFFFFFh mov [rsp+98h+var_6E], al jz short loc_BB8DF mov rdi, qword ptr [rsp+98h+var_80] mov rax, [rsp+98h+var_10] mov qword ptr [rsp+98h+var_88], rax; int add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void) mov rdi, [rax] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::max_size(void) mov rcx, rax mov rax, qword ptr [rsp+98h+var_88] cmp rax, rcx setnbe al mov [rsp+98h+var_6E], al loc_BB8DF: mov al, [rsp+98h+var_6E] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_BB8F0 jmp loc_BB9CD loc_BB8F0: mov [rsp+98h+var_6D], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+98h+var_90], rax; int mov rsi, [rsp+98h+var_10]; unsigned __int64 lea rdi, [rsp+98h+var_60]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) jmp short $+2 loc_BB918: lea rsi, aExcessiveObjec; "excessive object size: " lea rdi, [rsp+98h+var_40] lea rdx, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&) jmp short $+2 loc_BB930: mov rdi, qword ptr [rsp+98h+var_80] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::back(void) mov rdi, [rsp+98h+var_90]; int mov rcx, [rax] mov esi, 198h lea rdx, [rsp+98h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_BB957: mov rdi, [rsp+98h+var_90]; void * mov [rsp+98h+var_6D], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_BB9E3 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_BB9B8 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_BB9AE mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BB9AE: lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BB9B8: test [rsp+arg_23], 1 jnz short loc_BB9C1 jmp short loc_BB9CB loc_BB9C1: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_BB9CB: jmp short loc_BB9D9 loc_BB9CD: mov al, 1 and al, 1 add rsp, 98h retn loc_BB9D9: mov rdi, [rsp+arg_28] call __Unwind_Resume loc_BB9E3: nop word ptr [rax+rax+00000000h] nop dword ptr [rax]
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::start_object( long long a1, unsigned long long a2) { long long *v2; // rax long long *v3; // rax nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // [rsp+8h] [rbp-90h] unsigned long long v6; // [rsp+10h] [rbp-88h] bool v7; // [rsp+2Ah] [rbp-6Eh] _BYTE v8[32]; // [rsp+38h] [rbp-60h] BYREF _BYTE v9[39]; // [rsp+58h] [rbp-40h] BYREF char v10; // [rsp+7Fh] [rbp-19h] BYREF int v11[2]; // [rsp+80h] [rbp-18h] BYREF unsigned long long v12; // [rsp+88h] [rbp-10h] char v13[8]; // [rsp+90h] [rbp-8h] *(_QWORD *)v13 = a1; v12 = a2; v10 = 1; *(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>( a1, &v10); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::push_back( a1 + 8, v11); v7 = 0; if ( v12 != -1LL ) { v6 = v12; v2 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8); v7 = v6 > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size(*v2); } if ( v7 ) { exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::to_string((std::__cxx11 *)v8, v12); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>( (long long)v9, (long long)"excessive object size: ", (long long)v8); v3 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::back(a1 + 8); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 408, (long long)v9, *v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } return 1; }
start_object: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV RDI,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI ADD RAX,0x8 MOV qword ptr [RSP + 0x20],RAX MOV byte ptr [RSP + 0x7f],0x1 LEA RSI,[RSP + 0x7f] CALL 0x001bbf80 MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x80],RAX LEA RSI,[RSP + 0x80] CALL 0x001bbf50 XOR EAX,EAX CMP qword ptr [RSP + 0x88],-0x1 MOV byte ptr [RSP + 0x2a],AL JZ 0x001bb8df MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x10],RAX ADD RDI,0x8 CALL 0x001af560 MOV RDI,qword ptr [RAX] CALL 0x001af5a0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,RCX SETA AL MOV byte ptr [RSP + 0x2a],AL LAB_001bb8df: MOV AL,byte ptr [RSP + 0x2a] XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001bb8f0 JMP 0x001bb9cd LAB_001bb8f0: MOV byte ptr [RSP + 0x2b],0x1 MOV EDI,0x20 CALL 0x0015a6b0 MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP + 0x88] LAB_001bb90c: LEA RDI,[RSP + 0x38] CALL 0x001af880 JMP 0x001bb918 LAB_001bb918: LEA RSI,[0x30e2df] LEA RDI,[RSP + 0x58] LEA RDX,[RSP + 0x38] CALL 0x001af7d0 JMP 0x001bb930 LAB_001bb930: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001af560 MOV RDI,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] LAB_001bb946: MOV ESI,0x198 LEA RDX,[RSP + 0x58] CALL 0x001af620 JMP 0x001bb957 LAB_001bb957: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x2b],0x0 LEA RSI,[0x3a0d08] LEA RDX,[0x1aec30] CALL 0x0015ab30 LAB_001bb9cd: MOV AL,0x1 AND AL,0x1 ADD RSP,0x98 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::start_object(unsigned long) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::start_object(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,ulong param_1) { bool bVar1; ulong uVar2; int8 *puVar3; ulong uVar4; int7 uVar6; int8 uVar5; __cxx11 local_60 [32]; detail local_40 [39]; value_t local_19; basic_json *local_18; ulong local_10; json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *local_8; local_19 = 1; local_10 = param_1; local_8 = this; local_18 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_19); std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::push_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8),&local_18); uVar2 = local_10; uVar6 = 0; bVar1 = false; if (local_10 != 0xffffffffffffffff) { puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); uVar4 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::max_size((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*puVar3); bVar1 = uVar4 < uVar2; uVar6 = (int7)(uVar2 >> 8); } if (!bVar1) { return CONCAT71(uVar6,1); } uVar5 = __cxa_allocate_exception(0x20); /* try { // try from 001bb90c to 001bb915 has its CatchHandler @ 001bb976 */ std::__cxx11::to_string(local_60,local_10); /* try { // try from 001bb918 to 001bb92d has its CatchHandler @ 001bb986 */ concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string> (local_40,"excessive object size: ",(string *)local_60); puVar3 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); /* try { // try from 001bb946 to 001bb973 has its CatchHandler @ 001bb996 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar5,0x198,local_40,*puVar3); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&out_of_range::typeinfo,out_of_range::~out_of_range); }
39,740
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long)
monkey531[P]llama/common/json.hpp
bool start_object(std::size_t len) { ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) { JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); } return true; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::start_object(unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r15 movq %rdi, %r14 leaq 0x8(%rdi), %rbx leaq 0x8(%rsp), %rsi movb $0x1, (%rsi) callq 0x453b6 leaq 0x28(%rsp), %rsi movq %rax, (%rsi) movq %rbx, %rdi callq 0x45496 cmpq $-0x1, %r15 je 0x45057 movq 0x10(%r14), %rax movq -0x8(%rax), %rdi callq 0x41afc cmpq %r15, %rax jb 0x45064 movb $0x1, %al addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x23470 movq %rax, %rbx leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x41c6f leaq 0x6bcc0(%rip), %rsi # 0xb0d43 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x41c11 movq 0x10(%r14), %rax movq -0x8(%rax), %rcx movb $0x1, %bpl leaq 0x28(%rsp), %rdx movq %rbx, %rdi movl $0x198, %esi # imm = 0x198 callq 0x41b24 xorl %ebp, %ebp leaq 0xb6e10(%rip), %rsi # 0xfbec8 leaq -0x516b(%rip), %rdx # 0x3ff54 movq %rbx, %rdi callq 0x23f40 movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x241f8 jmp 0x450dc movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x241f8 testb %bpl, %bpl jne 0x450f0 jmp 0x450f8 movq %rax, %r14 movq %rbx, %rdi callq 0x236a0 movq %r14, %rdi callq 0x23fc0
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm: push rbp; char push r15; int push r14; int push rbx; int sub rsp, 48h mov r15, rsi mov r14, rdi lea rbx, [rdi+8] lea rsi, [rsp+68h+var_60] mov byte ptr [rsi], 1 call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&) lea rsi, [rsp+68h+var_40] mov [rsi], rax mov rdi, rbx call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE12emplace_backIJSE_EEERSE_DpOT_; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>(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> * &&) cmp r15, 0FFFFFFFFFFFFFFFFh jz short loc_45057 mov rax, [r14+10h] mov rdi, [rax-8] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::max_size(void) cmp rax, r15 jb short loc_45064 loc_45057: mov al, 1 add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_45064: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60]; this mov rsi, r15; unsigned __int64 call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea rsi, aExcessiveObjec; "excessive object size: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&) mov rax, [r14+10h] mov rcx, [rax-8] mov bpl, 1 lea rdx, [rsp+68h+var_40] mov rdi, rbx; this mov esi, 198h; int call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_450DC mov r14, rax mov bpl, 1 loc_450DC: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_450F0 jmp short loc_450F8 mov r14, rax loc_450F0: mov rdi, rbx; void * call ___cxa_free_exception loc_450F8: mov rdi, r14 call __Unwind_Resume
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::start_object( long long a1, unsigned long long a2) { nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // rbx _BYTE v4[32]; // [rsp+8h] [rbp-60h] BYREF _QWORD v5[8]; // [rsp+28h] [rbp-40h] BYREF v4[0] = 1; v5[0] = nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>( a1, v4); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::emplace_back<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> *>(a1 + 8); if ( a2 != -1LL && nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size(*(unsigned __int8 **)(*(_QWORD *)(a1 + 16) - 8LL)) < a2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::to_string((std::__cxx11 *)v4, a2); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>( (long long)v5, (long long)"excessive object size: ", (long long)v4); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 408, (long long)v5, *(_QWORD *)(*(_QWORD *)(a1 + 16) - 8LL)); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return 1; }
start_object: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R15,RSI MOV R14,RDI LEA RBX,[RDI + 0x8] LEA RSI,[RSP + 0x8] MOV byte ptr [RSI],0x1 CALL 0x001453b6 LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RAX MOV RDI,RBX CALL 0x00145496 CMP R15,-0x1 JZ 0x00145057 MOV RAX,qword ptr [R14 + 0x10] MOV RDI,qword ptr [RAX + -0x8] CALL 0x00141afc CMP RAX,R15 JC 0x00145064 LAB_00145057: MOV AL,0x1 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_00145064: PUSH 0x20 POP RDI CALL 0x00123470 MOV RBX,RAX LAB_0014506f: LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x00141c6f LAB_0014507c: LEA RSI,[0x1b0d43] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00141c11 MOV RAX,qword ptr [R14 + 0x10] MOV RCX,qword ptr [RAX + -0x8] MOV BPL,0x1 LAB_0014509d: LEA RDX,[RSP + 0x28] MOV RDI,RBX MOV ESI,0x198 CALL 0x00141b24 XOR EBP,EBP LEA RSI,[0x1fbec8] LEA RDX,[0x13ff54] MOV RDI,RBX CALL 0x00123f40
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::start_object(unsigned long) */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::start_object(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,ulong param_1) { ulong uVar1; int8 uVar2; __cxx11 local_60 [32]; basic_json *local_40 [4]; local_60[0] = (__cxx11)0x1; local_40[0] = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,local_60); std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> :: emplace_back<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>*> ((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8),local_40); if (param_1 != 0xffffffffffffffff) { uVar1 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::max_size(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(*(long *)(this + 0x10) + -8)); if (uVar1 < param_1) { uVar2 = __cxa_allocate_exception(0x20); /* try { // try from 0014506f to 0014507b has its CatchHandler @ 001450ed */ std::__cxx11::to_string(local_60,param_1); /* try { // try from 0014507c to 00145091 has its CatchHandler @ 001450d6 */ concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string> ((detail *)local_40,"excessive object size: ",(string *)local_60); /* try { // try from 0014509d to 001450c6 has its CatchHandler @ 001450c7 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x198,local_40,*(int8 *)(*(long *)(this + 0x10) + -8)); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&out_of_range::typeinfo,exception::~exception); } } return 1; }
39,741
tree_insert
eloqsql/mysys/tree.c
TREE_ELEMENT *tree_insert(TREE *tree, void *key, uint key_size, void* custom_arg) { int cmp; TREE_ELEMENT *element,***parent; parent= tree->parents; *parent = &tree->root; element= tree->root; for (;;) { if (element == &null_element || (cmp = (*tree->compare)(custom_arg, ELEMENT_KEY(tree,element), key)) == 0) break; if (cmp < 0) { *++parent= &element->right; element= element->right; } else { *++parent = &element->left; element= element->left; } } if (element == &null_element) { uint alloc_size; if (tree->flag & TREE_ONLY_DUPS) return TREE_ELEMENT_UNIQUE; alloc_size=sizeof(TREE_ELEMENT)+key_size+tree->size_of_element; tree->allocated+=alloc_size; if (tree->memory_limit && tree->elements_in_tree && tree->allocated > tree->memory_limit) { reset_tree(tree); return tree_insert(tree, key, key_size, custom_arg); } key_size+=tree->size_of_element; if (tree->with_delete) element=(TREE_ELEMENT *) my_malloc(key_memory_TREE, alloc_size, MYF(tree->my_flags | MY_WME)); else element=(TREE_ELEMENT *) alloc_root(&tree->mem_root,alloc_size); if (!element) return(NULL); **parent=element; element->left=element->right= &null_element; if (!tree->offset_to_key) { if (key_size == sizeof(void*)) /* no length, save pointer */ *((void**) (element+1))=key; else { *((void**) (element+1))= (void*) ((void **) (element+1)+1); memcpy((uchar*) *((void **) (element+1)),key, (size_t) (key_size-sizeof(void*))); } } else memcpy((uchar*) element+tree->offset_to_key,key,(size_t) key_size); element->count=1; /* May give warning in purify */ tree->elements_in_tree++; rb_insert(tree,parent,element); /* rebalance tree */ } else { if (tree->flag & TREE_NO_DUPS) return(NULL); element->count++; /* Avoid a wrap over of the count. */ if (! element->count) element->count--; } DBUG_EXECUTE("check_tree", test_rb_tree(tree->root);); return element; }
O3
c
tree_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r13 movq %rsi, %r15 movq %rdi, %rbx leaq 0x8(%rdi), %r12 movq %rdx, -0x38(%rbp) leal 0x18(%rdx), %eax movq %rax, -0x40(%rbp) leaq 0x2e122e(%rip), %rax # 0x385bc0 movq %r12, -0x30(%rbp) movq %rbx, 0x8(%rbx) movq (%rbx), %r14 cmpq %rax, %r14 je 0xa49ed movq -0x30(%rbp), %r12 movl 0x208(%rbx), %esi testq %rsi, %rsi je 0xa49b6 addq %r14, %rsi jmp 0xa49ba movq 0x18(%r14), %rsi movq %r13, %rdi movq %r15, %rdx callq *0x228(%rbx) testl %eax, %eax je 0xa4a51 shrl $0x1f, %eax leaq (%r14,%rax,8), %rax movq %rax, 0x8(%r12) addq $0x8, %r12 movq (%rax), %r14 leaq 0x2e11d8(%rip), %rax # 0x385bc0 cmpq %rax, %r14 jne 0xa49a6 testb $0x2, 0x290(%rbx) jne 0xa4aaf movl 0x210(%rbx), %edx movq -0x40(%rbp), %rax leal (%rax,%rdx), %esi movq 0x220(%rbx), %rax addq %rsi, %rax movq %rax, 0x220(%rbx) movq 0x218(%rbx), %rcx testq %rcx, %rcx je 0xa4a88 cmpl $0x0, 0x20c(%rbx) je 0xa4a88 cmpq %rcx, %rax jbe 0xa4a88 movl $0x2, %edx movq %rbx, %rdi xorl %esi, %esi callq 0xa4883 leaq 0x2e1178(%rip), %rax # 0x385bc0 movq -0x30(%rbp), %r12 jmp 0xa4996 testb $0x1, 0x290(%rbx) jne 0xa4af7 movl 0x10(%r14), %eax leal 0x1(%rax), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF movl %eax, %edx andl $0x80000000, %edx # imm = 0x80000000 orl %ecx, %edx movl %edx, 0x10(%r14) testl %ecx, %ecx jne 0xa4afa orl $0x7fffffff, %eax # imm = 0x7FFFFFFF movl %eax, 0x10(%r14) jmp 0xa4afa movq %rdx, %r13 cmpb $0x0, 0x278(%rbx) je 0xa4ab7 leaq 0xb63781(%rip), %rax # 0xc0821c movl (%rax), %edi movq 0x288(%rbx), %rdx orq $0x10, %rdx callq 0x9fec1 jmp 0xa4ac3 movl $0x1, %r14d jmp 0xa4afa leaq 0x238(%rbx), %rdi callq 0x9cc07 movq %rax, %r14 testq %rax, %rax je 0xa4af7 addl -0x38(%rbp), %r13d movq (%r12), %rax movq %r14, (%rax) leaq 0x2e10e3(%rip), %rax # 0x385bc0 movq %rax, 0x8(%r14) movq %rax, (%r14) movl 0x208(%rbx), %edi testq %rdi, %rdi je 0xa4b0c addq %r14, %rdi movl %r13d, %edx jmp 0xa4b27 xorl %r14d, %r14d movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0x8, %r13d jne 0xa4b18 movq %r15, 0x18(%r14) jmp 0xa4b2f movl %r13d, %edx leaq 0x20(%r14), %rdi movq %rdi, 0x18(%r14) addq $-0x8, %rdx movq %r15, %rsi callq 0x29080 movl $0x80000000, %eax # imm = 0x80000000 andl 0x10(%r14), %eax incl %eax movl %eax, 0x10(%r14) incl 0x20c(%rbx) andb $0x7f, 0x13(%r14) cmpq %r14, (%rbx) je 0xa4c38 addq $-0x10, %r12 movq %r14, %rcx movq 0x8(%r12), %rdi movq (%rdi), %rsi movl 0x10(%rsi), %edx testl %edx, %edx js 0xa4c38 movq (%r12), %rax movq (%rax), %rax movq (%rax), %r8 cmpq %r8, %rsi je 0xa4b84 cmpl $0x0, 0x10(%r8) jns 0xa4b8f jmp 0xa4bb6 movq 0x8(%rax), %r8 cmpl $0x0, 0x10(%r8) js 0xa4bc3 addq $0x10, %r8 orl $0x80000000, %edx # imm = 0x80000000 movl %edx, 0x10(%rsi) orb $-0x80, 0x3(%r8) andb $0x7f, 0x13(%rax) addq $-0x10, %r12 movq %rax, %rcx cmpq (%rbx), %rax jne 0xa4b59 jmp 0xa4c38 movq (%rsi), %r8 cmpq %r8, %rcx je 0xa4bd1 movq %rsi, %rcx jmp 0xa4be2 movq 0x8(%rsi), %r8 cmpq %r8, %rcx je 0xa4c03 movq %rsi, %rcx jmp 0xa4c13 movq 0x8(%r8), %rdx movq %rdx, (%rsi) movq %r8, (%rdi) movq %rsi, 0x8(%r8) movl 0x10(%rcx), %edx orl $0x80000000, %edx # imm = 0x80000000 movl %edx, 0x10(%rcx) andb $0x7f, 0x13(%rax) movq (%r12), %rdx movq 0x8(%rax), %rcx movq (%rcx), %rsi movq %rsi, 0x8(%rax) movq %rcx, (%rdx) jmp 0xa4c35 movq (%r8), %rdx movq %rdx, 0x8(%rsi) movq %r8, (%rdi) movq %rsi, (%r8) movl 0x10(%rcx), %edx orl $0x80000000, %edx # imm = 0x80000000 movl %edx, 0x10(%rcx) andb $0x7f, 0x13(%rax) movq (%r12), %rdx movq (%rax), %rsi leaq 0x8(%rsi), %rcx movq 0x8(%rsi), %rdi movq %rdi, (%rax) movq %rsi, (%rdx) movq %rax, (%rcx) movq (%rbx), %rax orl $0x80000000, 0x10(%rax) # imm = 0x80000000 jmp 0xa4afa
tree_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, rcx mov r15, rsi mov rbx, rdi lea r12, [rdi+8] mov [rbp+var_38], rdx lea eax, [rdx+18h] mov [rbp+var_40], rax lea rax, null_element mov [rbp+var_30], r12 loc_A4996: mov [rbx+8], rbx mov r14, [rbx] cmp r14, rax jz short loc_A49ED mov r12, [rbp+var_30] loc_A49A6: mov esi, [rbx+208h] test rsi, rsi jz short loc_A49B6 add rsi, r14 jmp short loc_A49BA loc_A49B6: mov rsi, [r14+18h] loc_A49BA: mov rdi, r13 mov rdx, r15 call qword ptr [rbx+228h] test eax, eax jz loc_A4A51 shr eax, 1Fh lea rax, [r14+rax*8] mov [r12+8], rax add r12, 8 mov r14, [rax] lea rax, null_element cmp r14, rax jnz short loc_A49A6 loc_A49ED: test byte ptr [rbx+290h], 2 jnz loc_A4AAF mov edx, [rbx+210h] mov rax, [rbp+var_40] lea esi, [rax+rdx] mov rax, [rbx+220h] add rax, rsi mov [rbx+220h], rax mov rcx, [rbx+218h] test rcx, rcx jz short loc_A4A88 cmp dword ptr [rbx+20Ch], 0 jz short loc_A4A88 cmp rax, rcx jbe short loc_A4A88 mov edx, 2 mov rdi, rbx xor esi, esi call free_tree lea rax, null_element mov r12, [rbp+var_30] jmp loc_A4996 loc_A4A51: test byte ptr [rbx+290h], 1 jnz loc_A4AF7 mov eax, [r14+10h] lea ecx, [rax+1] and ecx, 7FFFFFFFh mov edx, eax and edx, 80000000h or edx, ecx mov [r14+10h], edx test ecx, ecx jnz short loc_A4AFA or eax, 7FFFFFFFh mov [r14+10h], eax jmp short loc_A4AFA loc_A4A88: mov r13, rdx cmp byte ptr [rbx+278h], 0 jz short loc_A4AB7 lea rax, key_memory_TREE mov edi, [rax] mov rdx, [rbx+288h] or rdx, 10h call my_malloc jmp short loc_A4AC3 loc_A4AAF: mov r14d, 1 jmp short loc_A4AFA loc_A4AB7: lea rdi, [rbx+238h] call alloc_root loc_A4AC3: mov r14, rax test rax, rax jz short loc_A4AF7 add r13d, dword ptr [rbp+var_38] mov rax, [r12] mov [rax], r14 lea rax, null_element mov [r14+8], rax mov [r14], rax mov edi, [rbx+208h] test rdi, rdi jz short loc_A4B0C add rdi, r14 mov edx, r13d jmp short loc_A4B27 loc_A4AF7: xor r14d, r14d loc_A4AFA: mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A4B0C: cmp r13d, 8 jnz short loc_A4B18 mov [r14+18h], r15 jmp short loc_A4B2F loc_A4B18: mov edx, r13d lea rdi, [r14+20h] mov [r14+18h], rdi add rdx, 0FFFFFFFFFFFFFFF8h loc_A4B27: mov rsi, r15 call _memcpy loc_A4B2F: mov eax, 80000000h and eax, [r14+10h] inc eax mov [r14+10h], eax inc dword ptr [rbx+20Ch] and byte ptr [r14+13h], 7Fh cmp [rbx], r14 jz loc_A4C38 add r12, 0FFFFFFFFFFFFFFF0h mov rcx, r14 loc_A4B59: mov rdi, [r12+8] mov rsi, [rdi] mov edx, [rsi+10h] test edx, edx js loc_A4C38 mov rax, [r12] mov rax, [rax] mov r8, [rax] cmp rsi, r8 jz short loc_A4B84 cmp dword ptr [r8+10h], 0 jns short loc_A4B8F jmp short loc_A4BB6 loc_A4B84: mov r8, [rax+8] cmp dword ptr [r8+10h], 0 js short loc_A4BC3 loc_A4B8F: add r8, 10h or edx, 80000000h mov [rsi+10h], edx or byte ptr [r8+3], 80h and byte ptr [rax+13h], 7Fh add r12, 0FFFFFFFFFFFFFFF0h mov rcx, rax cmp rax, [rbx] jnz short loc_A4B59 jmp loc_A4C38 loc_A4BB6: mov r8, [rsi] cmp rcx, r8 jz short loc_A4BD1 mov rcx, rsi jmp short loc_A4BE2 loc_A4BC3: mov r8, [rsi+8] cmp rcx, r8 jz short loc_A4C03 mov rcx, rsi jmp short loc_A4C13 loc_A4BD1: mov rdx, [r8+8] mov [rsi], rdx mov [rdi], r8 mov [r8+8], rsi mov edx, [rcx+10h] loc_A4BE2: or edx, 80000000h mov [rcx+10h], edx and byte ptr [rax+13h], 7Fh mov rdx, [r12] mov rcx, [rax+8] mov rsi, [rcx] mov [rax+8], rsi mov [rdx], rcx jmp short loc_A4C35 loc_A4C03: mov rdx, [r8] mov [rsi+8], rdx mov [rdi], r8 mov [r8], rsi mov edx, [rcx+10h] loc_A4C13: or edx, 80000000h mov [rcx+10h], edx and byte ptr [rax+13h], 7Fh mov rdx, [r12] mov rsi, [rax] lea rcx, [rsi+8] mov rdi, [rsi+8] mov [rax], rdi mov [rdx], rsi loc_A4C35: mov [rcx], rax loc_A4C38: mov rax, [rbx] or dword ptr [rax+10h], 80000000h jmp loc_A4AFA
long long tree_insert(long long a1, long long a2, int a3, long long a4) { long long v7; // r12 _QWORD *v8; // r14 char *v9; // rsi unsigned int v10; // eax _QWORD *v11; // rax int v12; // edx unsigned long long v13; // rsi unsigned long long v14; // rax unsigned long long v15; // rcx int v16; // eax int v17; // ecx int v18; // r13d _QWORD *v19; // rax unsigned int v20; // r13d long long v21; // rdi _QWORD *v22; // rdi long long v23; // rdx long long v25; // r12 _QWORD *v26; // rcx long long *v27; // rdi long long v28; // rsi int v29; // edx _QWORD *v30; // rax long long v31; // r8 _QWORD *v32; // r8 _QWORD *v33; // r8 _QWORD *v34; // rdx _QWORD *v35; // rcx _QWORD *v36; // rdx long long v37; // rsi int v38; // [rsp+0h] [rbp-40h] v7 = a1 + 8; v38 = a3 + 24; while ( 1 ) { *(_QWORD *)(a1 + 8) = a1; v8 = *(_QWORD **)a1; if ( *(_UNKNOWN **)a1 != &null_element ) { v7 = a1 + 8; while ( 1 ) { v9 = *(_DWORD *)(a1 + 520) ? (char *)v8 + *(unsigned int *)(a1 + 520) : (char *)v8[3]; v10 = (*(long long ( **)(long long, char *, long long))(a1 + 552))(a4, v9, a2); if ( !v10 ) break; v11 = &v8[v10 >> 31]; *(_QWORD *)(v7 + 8) = v11; v7 += 8LL; v8 = (_QWORD *)*v11; if ( (_UNKNOWN *)*v11 == &null_element ) goto LABEL_9; } if ( (*(_BYTE *)(a1 + 656) & 1) == 0 ) { v16 = *((_DWORD *)v8 + 4); v17 = (v16 + 1) & 0x7FFFFFFF; *((_DWORD *)v8 + 4) = v17 | v16 & 0x80000000; if ( !v17 ) *((_DWORD *)v8 + 4) = v16 | 0x7FFFFFFF; return (long long)v8; } return 0LL; } LABEL_9: if ( (*(_BYTE *)(a1 + 656) & 2) != 0 ) return 1LL; v12 = *(_DWORD *)(a1 + 528); v13 = (unsigned int)(v38 + v12); v14 = v13 + *(_QWORD *)(a1 + 544); *(_QWORD *)(a1 + 544) = v14; v15 = *(_QWORD *)(a1 + 536); if ( !v15 || !*(_DWORD *)(a1 + 524) || v14 <= v15 ) break; free_tree((long long *)a1, 0, 2); v7 = a1 + 8; } v18 = v12; if ( *(_BYTE *)(a1 + 632) ) v19 = (_QWORD *)my_malloc(key_memory_TREE, v13, *(_DWORD *)(a1 + 648) | 0x10u); else v19 = alloc_root(a1 + 568, v13); v8 = v19; if ( !v19 ) return 0LL; v20 = a3 + v18; **(_QWORD **)v7 = v19; v19[1] = &null_element; *v19 = &null_element; v21 = *(unsigned int *)(a1 + 520); if ( *(_DWORD *)(a1 + 520) ) { v22 = (_QWORD *)((char *)v19 + v21); v23 = v20; goto LABEL_29; } if ( v20 == 8 ) { v19[3] = a2; } else { v22 = v19 + 4; v19[3] = v19 + 4; v23 = v20 - 8LL; LABEL_29: memcpy(v22, a2, v23); } *((_DWORD *)v8 + 4) = (v8[2] & 0x80000000) + 1; ++*(_DWORD *)(a1 + 524); *((_BYTE *)v8 + 19) &= ~0x80u; if ( *(_QWORD **)a1 != v8 ) { v25 = v7 - 16; v26 = v8; do { v27 = *(long long **)(v25 + 8); v28 = *v27; v29 = *(_DWORD *)(*v27 + 16); if ( v29 < 0 ) break; v30 = **(_QWORD ***)v25; v31 = *v30; if ( v28 == *v30 ) { v31 = v30[1]; if ( *(int *)(v31 + 16) < 0 ) { v33 = *(_QWORD **)(v28 + 8); if ( v26 == v33 ) { *(_QWORD *)(v28 + 8) = *v33; *v27 = (long long)v33; *v33 = v28; v29 = *((_DWORD *)v26 + 4); } else { v26 = (_QWORD *)*v27; } *((_DWORD *)v26 + 4) = v29 | 0x80000000; *((_BYTE *)v30 + 19) &= ~0x80u; v36 = *(_QWORD **)v25; v37 = *v30; v35 = (_QWORD *)(*v30 + 8LL); *v30 = *v35; *v36 = v37; goto LABEL_47; } } else if ( *(int *)(v31 + 16) < 0 ) { v32 = *(_QWORD **)v28; if ( v26 == *(_QWORD **)v28 ) { *(_QWORD *)v28 = v32[1]; *v27 = (long long)v32; v32[1] = v28; v29 = *((_DWORD *)v26 + 4); } else { v26 = (_QWORD *)*v27; } *((_DWORD *)v26 + 4) = v29 | 0x80000000; *((_BYTE *)v30 + 19) &= ~0x80u; v34 = *(_QWORD **)v25; v35 = (_QWORD *)v30[1]; v30[1] = *v35; *v34 = v35; LABEL_47: *v35 = v30; break; } *(_DWORD *)(v28 + 16) = v29 | 0x80000000; *(_BYTE *)(v31 + 19) |= 0x80u; *((_BYTE *)v30 + 19) &= ~0x80u; v25 -= 16LL; v26 = v30; } while ( v30 != *(_QWORD **)a1 ); } *(_DWORD *)(*(_QWORD *)a1 + 16LL) |= 0x80000000; return (long long)v8; }
tree_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,RCX MOV R15,RSI MOV RBX,RDI LEA R12,[RDI + 0x8] MOV qword ptr [RBP + -0x38],RDX LEA EAX,[RDX + 0x18] MOV qword ptr [RBP + -0x40],RAX LEA RAX,[0x485bc0] MOV qword ptr [RBP + -0x30],R12 LAB_001a4996: MOV qword ptr [RBX + 0x8],RBX MOV R14,qword ptr [RBX] CMP R14,RAX JZ 0x001a49ed MOV R12,qword ptr [RBP + -0x30] LAB_001a49a6: MOV ESI,dword ptr [RBX + 0x208] TEST RSI,RSI JZ 0x001a49b6 ADD RSI,R14 JMP 0x001a49ba LAB_001a49b6: MOV RSI,qword ptr [R14 + 0x18] LAB_001a49ba: MOV RDI,R13 MOV RDX,R15 CALL qword ptr [RBX + 0x228] TEST EAX,EAX JZ 0x001a4a51 SHR EAX,0x1f LEA RAX,[R14 + RAX*0x8] MOV qword ptr [R12 + 0x8],RAX ADD R12,0x8 MOV R14,qword ptr [RAX] LEA RAX,[0x485bc0] CMP R14,RAX JNZ 0x001a49a6 LAB_001a49ed: TEST byte ptr [RBX + 0x290],0x2 JNZ 0x001a4aaf MOV EDX,dword ptr [RBX + 0x210] MOV RAX,qword ptr [RBP + -0x40] LEA ESI,[RAX + RDX*0x1] MOV RAX,qword ptr [RBX + 0x220] ADD RAX,RSI MOV qword ptr [RBX + 0x220],RAX MOV RCX,qword ptr [RBX + 0x218] TEST RCX,RCX JZ 0x001a4a88 CMP dword ptr [RBX + 0x20c],0x0 JZ 0x001a4a88 CMP RAX,RCX JBE 0x001a4a88 MOV EDX,0x2 MOV RDI,RBX XOR ESI,ESI CALL 0x001a4883 LEA RAX,[0x485bc0] MOV R12,qword ptr [RBP + -0x30] JMP 0x001a4996 LAB_001a4a51: TEST byte ptr [RBX + 0x290],0x1 JNZ 0x001a4af7 MOV EAX,dword ptr [R14 + 0x10] LEA ECX,[RAX + 0x1] AND ECX,0x7fffffff MOV EDX,EAX AND EDX,0x80000000 OR EDX,ECX MOV dword ptr [R14 + 0x10],EDX TEST ECX,ECX JNZ 0x001a4afa OR EAX,0x7fffffff MOV dword ptr [R14 + 0x10],EAX JMP 0x001a4afa LAB_001a4a88: MOV R13,RDX CMP byte ptr [RBX + 0x278],0x0 JZ 0x001a4ab7 LEA RAX,[0xd0821c] MOV EDI,dword ptr [RAX] MOV RDX,qword ptr [RBX + 0x288] OR RDX,0x10 CALL 0x0019fec1 JMP 0x001a4ac3 LAB_001a4aaf: MOV R14D,0x1 JMP 0x001a4afa LAB_001a4ab7: LEA RDI,[RBX + 0x238] CALL 0x0019cc07 LAB_001a4ac3: MOV R14,RAX TEST RAX,RAX JZ 0x001a4af7 ADD R13D,dword ptr [RBP + -0x38] MOV RAX,qword ptr [R12] MOV qword ptr [RAX],R14 LEA RAX,[0x485bc0] MOV qword ptr [R14 + 0x8],RAX MOV qword ptr [R14],RAX MOV EDI,dword ptr [RBX + 0x208] TEST RDI,RDI JZ 0x001a4b0c ADD RDI,R14 MOV EDX,R13D JMP 0x001a4b27 LAB_001a4af7: XOR R14D,R14D LAB_001a4afa: MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a4b0c: CMP R13D,0x8 JNZ 0x001a4b18 MOV qword ptr [R14 + 0x18],R15 JMP 0x001a4b2f LAB_001a4b18: MOV EDX,R13D LEA RDI,[R14 + 0x20] MOV qword ptr [R14 + 0x18],RDI ADD RDX,-0x8 LAB_001a4b27: MOV RSI,R15 CALL 0x00129080 LAB_001a4b2f: MOV EAX,0x80000000 AND EAX,dword ptr [R14 + 0x10] INC EAX MOV dword ptr [R14 + 0x10],EAX INC dword ptr [RBX + 0x20c] AND byte ptr [R14 + 0x13],0x7f CMP qword ptr [RBX],R14 JZ 0x001a4c38 ADD R12,-0x10 MOV RCX,R14 LAB_001a4b59: MOV RDI,qword ptr [R12 + 0x8] MOV RSI,qword ptr [RDI] MOV EDX,dword ptr [RSI + 0x10] TEST EDX,EDX JS 0x001a4c38 MOV RAX,qword ptr [R12] MOV RAX,qword ptr [RAX] MOV R8,qword ptr [RAX] CMP RSI,R8 JZ 0x001a4b84 CMP dword ptr [R8 + 0x10],0x0 JNS 0x001a4b8f JMP 0x001a4bb6 LAB_001a4b84: MOV R8,qword ptr [RAX + 0x8] CMP dword ptr [R8 + 0x10],0x0 JS 0x001a4bc3 LAB_001a4b8f: ADD R8,0x10 OR EDX,0x80000000 MOV dword ptr [RSI + 0x10],EDX OR byte ptr [R8 + 0x3],0x80 AND byte ptr [RAX + 0x13],0x7f ADD R12,-0x10 MOV RCX,RAX CMP RAX,qword ptr [RBX] JNZ 0x001a4b59 JMP 0x001a4c38 LAB_001a4bb6: MOV R8,qword ptr [RSI] CMP RCX,R8 JZ 0x001a4bd1 MOV RCX,RSI JMP 0x001a4be2 LAB_001a4bc3: MOV R8,qword ptr [RSI + 0x8] CMP RCX,R8 JZ 0x001a4c03 MOV RCX,RSI JMP 0x001a4c13 LAB_001a4bd1: MOV RDX,qword ptr [R8 + 0x8] MOV qword ptr [RSI],RDX MOV qword ptr [RDI],R8 MOV qword ptr [R8 + 0x8],RSI MOV EDX,dword ptr [RCX + 0x10] LAB_001a4be2: OR EDX,0x80000000 MOV dword ptr [RCX + 0x10],EDX AND byte ptr [RAX + 0x13],0x7f MOV RDX,qword ptr [R12] MOV RCX,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RCX] MOV qword ptr [RAX + 0x8],RSI MOV qword ptr [RDX],RCX JMP 0x001a4c35 LAB_001a4c03: MOV RDX,qword ptr [R8] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RDI],R8 MOV qword ptr [R8],RSI MOV EDX,dword ptr [RCX + 0x10] LAB_001a4c13: OR EDX,0x80000000 MOV dword ptr [RCX + 0x10],EDX AND byte ptr [RAX + 0x13],0x7f MOV RDX,qword ptr [R12] MOV RSI,qword ptr [RAX] LEA RCX,[RSI + 0x8] MOV RDI,qword ptr [RSI + 0x8] MOV qword ptr [RAX],RDI MOV qword ptr [RDX],RSI LAB_001a4c35: MOV qword ptr [RCX],RAX LAB_001a4c38: MOV RAX,qword ptr [RBX] OR dword ptr [RAX + 0x10],0x80000000 JMP 0x001a4afa
long * tree_insert(long *param_1,void *param_2,int param_3,int8 param_4) { int8 *puVar1; long *plVar2; long *plVar3; uint uVar4; ulong uVar5; long *plVar6; uint uVar7; long *plVar8; size_t __n; int1 *puVar9; ulong uVar10; long *plVar11; long lVar12; long *plVar13; while( true ) { param_1[1] = (long)param_1; plVar6 = (long *)*param_1; plVar8 = param_1 + 1; if (plVar6 != (long *)null_element) { do { if ((ulong)*(uint *)(param_1 + 0x41) == 0) { puVar9 = (int1 *)plVar6[3]; } else { puVar9 = (int1 *)((ulong)*(uint *)(param_1 + 0x41) + (long)plVar6); } uVar4 = (*(code *)param_1[0x45])(param_4,puVar9,param_2); if (uVar4 == 0) { if ((*(byte *)(param_1 + 0x52) & 1) != 0) { return (long *)0x0; } uVar4 = *(uint *)(plVar6 + 2); uVar7 = uVar4 + 1 & 0x7fffffff; *(uint *)(plVar6 + 2) = uVar4 & 0x80000000 | uVar7; if (uVar7 == 0) { *(uint *)(plVar6 + 2) = uVar4 | 0x7fffffff; return plVar6; } return plVar6; } plVar8[1] = (long)(plVar6 + (uVar4 >> 0x1f)); plVar8 = plVar8 + 1; plVar6 = (long *)plVar6[uVar4 >> 0x1f]; } while (plVar6 != (long *)null_element); } if ((*(byte *)(param_1 + 0x52) & 2) != 0) { return (long *)0x1; } lVar12 = param_1[0x42]; uVar10 = (ulong)(uint)(param_3 + 0x18 + (int)lVar12); uVar5 = param_1[0x44] + uVar10; param_1[0x44] = uVar5; if (((param_1[0x43] == 0) || (*(int *)((long)param_1 + 0x20c) == 0)) || (uVar5 <= (ulong)param_1[0x43])) break; free_tree(param_1,0,2); } if ((char)param_1[0x4f] == '\0') { plVar6 = (long *)alloc_root(param_1 + 0x47); } else { plVar6 = (long *)my_malloc(key_memory_TREE,uVar10,param_1[0x51] | 0x10); } if (plVar6 == (long *)0x0) { return (long *)0x0; } uVar4 = (int)lVar12 + param_3; *(long **)*plVar8 = plVar6; plVar6[1] = (long)null_element; *plVar6 = (long)null_element; if ((ulong)*(uint *)(param_1 + 0x41) == 0) { if (uVar4 == 8) { plVar6[3] = (long)param_2; goto LAB_001a4b2f; } plVar11 = plVar6 + 4; plVar6[3] = (long)plVar11; __n = (ulong)uVar4 - 8; } else { plVar11 = (long *)((ulong)*(uint *)(param_1 + 0x41) + (long)plVar6); __n = (size_t)uVar4; } memcpy(plVar11,param_2,__n); LAB_001a4b2f: *(uint *)(plVar6 + 2) = (*(uint *)(plVar6 + 2) & 0x80000000) + 1; *(int *)((long)param_1 + 0x20c) = *(int *)((long)param_1 + 0x20c) + 1; *(byte *)((long)plVar6 + 0x13) = *(byte *)((long)plVar6 + 0x13) & 0x7f; plVar11 = plVar6; if ((long *)*param_1 != plVar6) { do { plVar13 = plVar8 + -2; puVar1 = (int8 *)plVar8[-1]; plVar8 = (long *)*puVar1; uVar4 = *(uint *)(plVar8 + 2); if ((int)uVar4 < 0) break; plVar2 = *(long **)*plVar13; lVar12 = *plVar2; if (plVar8 == (long *)lVar12) { lVar12 = plVar2[1]; if (*(int *)(lVar12 + 0x10) < 0) { plVar3 = (long *)plVar8[1]; if (plVar11 == plVar3) { plVar8[1] = *plVar3; *puVar1 = plVar3; *plVar3 = (long)plVar8; uVar4 = *(uint *)(plVar11 + 2); plVar8 = plVar11; } *(uint *)(plVar8 + 2) = uVar4 | 0x80000000; *(byte *)((long)plVar2 + 0x13) = *(byte *)((long)plVar2 + 0x13) & 0x7f; plVar13 = (long *)*plVar13; lVar12 = *plVar2; plVar8 = (long *)(lVar12 + 8); *plVar2 = *(long *)(lVar12 + 8); *plVar13 = lVar12; goto LAB_001a4c35; } } else if (*(int *)(lVar12 + 0x10) < 0) { plVar3 = (long *)*plVar8; if (plVar11 == plVar3) { *plVar8 = plVar3[1]; *puVar1 = plVar3; plVar3[1] = (long)plVar8; uVar4 = *(uint *)(plVar11 + 2); plVar8 = plVar11; } *(uint *)(plVar8 + 2) = uVar4 | 0x80000000; *(byte *)((long)plVar2 + 0x13) = *(byte *)((long)plVar2 + 0x13) & 0x7f; plVar13 = (long *)*plVar13; plVar8 = (long *)plVar2[1]; plVar2[1] = *plVar8; *plVar13 = (long)plVar8; LAB_001a4c35: *plVar8 = (long)plVar2; break; } *(uint *)(plVar8 + 2) = uVar4 | 0x80000000; *(byte *)(lVar12 + 0x13) = *(byte *)(lVar12 + 0x13) | 0x80; *(byte *)((long)plVar2 + 0x13) = *(byte *)((long)plVar2 + 0x13) & 0x7f; plVar11 = plVar2; plVar8 = plVar13; } while (plVar2 != (long *)*param_1); } *(uint *)(*param_1 + 0x10) = *(uint *)(*param_1 + 0x10) | 0x80000000; return plVar6; }
39,742
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::ControlRow, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>(int, OpenSubdiv::v3_6_0::Tmr::ControlRow const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../far/primvarRefiner.h
inline void PrimvarRefinerReal<REAL>::interpFromFaces(int level, T const & src, U & dst) const { Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1); Vtr::internal::Level const & parent = refinement.parent(); if (refinement.getNumChildVerticesFromFaces() == 0) return; Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions); Vtr::internal::StackBuffer<Weight,16> fVertWeights(parent.getMaxValence()); for (int face = 0; face < parent.getNumFaces(); ++face) { Vtr::Index cVert = refinement.getFaceChildVertex(face); if (!Vtr::IndexIsValid(cVert)) continue; // Declare and compute mask weights for this vertex relative to its parent face: ConstIndexArray fVerts = parent.getFaceVertices(face); Mask fMask(fVertWeights, 0, 0); Vtr::internal::FaceInterface fHood(fVerts.size()); scheme.ComputeFaceVertexMask(fHood, fMask); // Apply the weights to the parent face's vertices: dst[cVert].Clear(); for (int i = 0; i < fVerts.size(); ++i) { dst[cVert].AddWithWeight(src[fVerts[i]], fVertWeights[i]); } } }
O0
c
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::ControlRow, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>(int, OpenSubdiv::v3_6_0::Tmr::ControlRow const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const: pushq %rbp movq %rsp, %rbp subq $0x1c0, %rsp # imm = 0x1C0 movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x168(%rbp) movq (%rax), %rdi movl -0xc(%rbp), %esi subl $0x1, %esi callq 0xd4c60 movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi callq 0xc52b0 movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rdi callq 0xd3990 cmpl $0x0, %eax jne 0x1d90d7 jmp 0x1d9428 movq -0x168(%rbp), %rax movq (%rax), %rsi addq $0x4, %rsi leaq -0x34(%rbp), %rdi callq 0xc3df0 movq -0x30(%rbp), %rdi callq 0xc5720 movl %eax, %esi leaq -0x90(%rbp), %rdi callq 0xcad00 movl $0x0, -0x94(%rbp) movl -0x94(%rbp), %eax movl %eax, -0x16c(%rbp) movq -0x30(%rbp), %rdi callq 0xc3430 movl %eax, %ecx movl -0x16c(%rbp), %eax cmpl %ecx, %eax jge 0x1d941c movq -0x28(%rbp), %rdi movl -0x94(%rbp), %esi callq 0xd6a40 movl %eax, -0x98(%rbp) movl -0x98(%rbp), %edi callq 0xd63b0 testb $0x1, %al jne 0x1d915d jmp 0x1d93fa movq -0x30(%rbp), %rdi movl -0x94(%rbp), %esi callq 0xce580 movl %edx, -0x17c(%rbp) movq %rax, -0x178(%rbp) jmp 0x1d917b movl -0x17c(%rbp), %eax movq -0x178(%rbp), %rcx movq %rcx, -0xc8(%rbp) movl %eax, -0xc0(%rbp) movl -0xc0(%rbp), %eax movl %eax, -0xa0(%rbp) movq -0xc8(%rbp), %rax movq %rax, -0xa8(%rbp) leaq -0x90(%rbp), %rdi callq 0xd6ea0 movq %rax, %rsi xorl %eax, %eax movl %eax, %ecx leaq -0xf0(%rbp), %rdi movq %rcx, %rdx callq 0xc92a0 jmp 0x1d91d3 leaq -0xa8(%rbp), %rdi callq 0xcc250 movl %eax, %esi leaq -0xf4(%rbp), %rdi callq 0xc4470 jmp 0x1d91ef leaq -0x34(%rbp), %rdi leaq -0xf4(%rbp), %rsi leaq -0xf0(%rbp), %rdx callq 0xc6230 jmp 0x1d9208 movq -0x20(%rbp), %rdi movl -0x98(%rbp), %esi callq 0xcc320 movl %edx, -0x18c(%rbp) movq %rax, -0x188(%rbp) jmp 0x1d9226 movl -0x18c(%rbp), %eax movq -0x188(%rbp), %rcx movq %rcx, -0x118(%rbp) movl %eax, -0x110(%rbp) movq -0x118(%rbp), %rax movq %rax, -0x108(%rbp) movl -0x110(%rbp), %eax movl %eax, -0x100(%rbp) leaq -0x108(%rbp), %rdi callq 0xce830 movl $0x0, -0x11c(%rbp) movl -0x11c(%rbp), %eax movl %eax, -0x190(%rbp) leaq -0xa8(%rbp), %rdi callq 0xcc250 movl %eax, %ecx movl -0x190(%rbp), %eax cmpl %ecx, %eax jge 0x1d93e2 movq -0x20(%rbp), %rdi movl -0x98(%rbp), %esi callq 0xcc320 movl %edx, -0x19c(%rbp) movq %rax, -0x198(%rbp) jmp 0x1d92b6 movl -0x19c(%rbp), %eax movq -0x198(%rbp), %rcx movq %rcx, -0x140(%rbp) movl %eax, -0x138(%rbp) movl -0x138(%rbp), %eax movl %eax, -0x128(%rbp) movq -0x140(%rbp), %rax movq %rax, -0x130(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x1b8(%rbp) movl -0x11c(%rbp), %esi leaq -0xa8(%rbp), %rdi callq 0xcabf0 movq -0x1b8(%rbp), %rdi movl (%rax), %esi callq 0xcc320 movl %edx, -0x1ac(%rbp) movq %rax, -0x1a8(%rbp) jmp 0x1d9324 movl -0x1ac(%rbp), %eax movq -0x1a8(%rbp), %rcx movq %rcx, -0x160(%rbp) movl %eax, -0x158(%rbp) movq -0x160(%rbp), %rax movq %rax, -0x150(%rbp) movl -0x158(%rbp), %eax movl %eax, -0x148(%rbp) leaq -0x90(%rbp), %rdi callq 0xd6ea0 movslq -0x11c(%rbp), %rcx movss (%rax,%rcx,4), %xmm0 leaq -0x130(%rbp), %rdi leaq -0x150(%rbp), %rsi callq 0xd6b10 movl -0x11c(%rbp), %eax addl $0x1, %eax movl %eax, -0x11c(%rbp) jmp 0x1d9270 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb0(%rbp) movl %eax, -0xb4(%rbp) jmp 0x1d9431 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb0(%rbp) movl %eax, -0xb4(%rbp) jmp 0x1d940e movq %rax, %rcx movl %edx, %eax movq %rcx, -0xb0(%rbp) movl %eax, -0xb4(%rbp) leaq -0xf4(%rbp), %rdi callq 0xd4760 jmp 0x1d940e leaq -0xf4(%rbp), %rdi callq 0xd4760 leaq -0xf0(%rbp), %rdi callq 0xcce50 movl -0x94(%rbp), %eax addl $0x1, %eax movl %eax, -0x94(%rbp) jmp 0x1d910f leaq -0xf0(%rbp), %rdi callq 0xcce50 jmp 0x1d9431 leaq -0x90(%rbp), %rdi callq 0xd0de0 addq $0x1c0, %rsp # imm = 0x1C0 popq %rbp retq leaq -0x90(%rbp), %rdi callq 0xd0de0 movq -0xb0(%rbp), %rdi callq 0xd58b0 nopl (%rax)
_ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE15interpFromFacesILNS0_3Sdc10SchemeTypeE1ENS0_3Tmr10StencilRowIfEES9_EEviRKT0_RT1_: push rbp mov rbp, rsp sub rsp, 1C0h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_8] mov [rbp+var_168], rax mov rdi, [rax]; this mov esi, [rbp+var_C] sub esi, 1; int call __ZNK10OpenSubdiv6v3_6_03Far15TopologyRefiner13getRefinementEi; OpenSubdiv::v3_6_0::Far::TopologyRefiner::getRefinement(int) mov [rbp+var_28], rax mov rdi, [rbp+var_28]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal10Refinement6parentEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::parent(void) mov [rbp+var_30], rax mov rdi, [rbp+var_28]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal10Refinement28getNumChildVerticesFromFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getNumChildVerticesFromFaces(void) cmp eax, 0 jnz short loc_1D90D7 jmp loc_1D9428 loc_1D90D7: mov rax, [rbp+var_168] mov rsi, [rax] add rsi, 4 lea rdi, [rbp+var_34] call __ZN10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE1EEC2ERKNS1_7OptionsE; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::Scheme(OpenSubdiv::v3_6_0::Sdc::Options const&) mov rdi, [rbp+var_30]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level13getMaxValenceEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getMaxValence(void) mov esi, eax lea rdi, [rbp+var_90] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb0EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::StackBuffer(uint) mov dword ptr [rbp+var_98+4], 0 loc_1D910F: mov eax, dword ptr [rbp+var_98+4] mov [rbp+var_16C], eax mov rdi, [rbp+var_30]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level11getNumFacesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(void) mov ecx, eax mov eax, [rbp+var_16C] cmp eax, ecx jge loc_1D941C mov rdi, [rbp+var_28]; this mov esi, dword ptr [rbp+var_98+4]; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal10Refinement18getFaceChildVertexEi; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildVertex(int) mov dword ptr [rbp+var_98], eax mov edi, dword ptr [rbp+var_98]; this call __ZN10OpenSubdiv6v3_6_03Vtr12IndexIsValidEi; OpenSubdiv::v3_6_0::Vtr::IndexIsValid(int) test al, 1 jnz short loc_1D915D jmp loc_1D93FA loc_1D915D: mov rdi, [rbp+var_30]; this mov esi, dword ptr [rbp+var_98+4]; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int) mov [rbp+var_17C], edx mov [rbp+var_178], rax jmp short $+2 loc_1D917B: mov eax, [rbp+var_17C] mov rcx, [rbp+var_178] mov [rbp+var_C8], rcx mov [rbp+var_C0], eax mov eax, [rbp+var_C0] mov [rbp+var_A0], eax mov rax, [rbp+var_C8] mov [rbp+var_A8], rax lea rdi, [rbp+var_90] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb0EEcvPfEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::operator float *(void) mov rsi, rax xor eax, eax mov ecx, eax lea rdi, [rbp+var_F0] mov rdx, rcx call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE4MaskC2EPfS5_S5_; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask::Mask(float *,float *,float *) jmp short $+2 loc_1D91D3: lea rdi, [rbp+var_A8] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void) mov esi, eax; int lea rdi, [rbp+var_F4]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13FaceInterfaceC2Ei; OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface::FaceInterface(int) jmp short $+2 loc_1D91EF: lea rdi, [rbp+var_34] lea rsi, [rbp+var_F4] lea rdx, [rbp+var_F0] call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE1EE21ComputeFaceVertexMaskINS0_3Vtr8internal13FaceInterfaceENS0_3Far18PrimvarRefinerRealIfE4MaskEEEvRKT_RT0_; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::ComputeFaceVertexMask<OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface const&,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask &) jmp short $+2 loc_1D9208: mov rdi, [rbp+var_20] mov esi, dword ptr [rbp+var_98] call __ZNK10OpenSubdiv6v3_6_03Tmr10StencilRowIfEixEi; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::operator[](int) mov [rbp+var_18C], edx mov [rbp+var_188], rax jmp short $+2 loc_1D9226: mov eax, [rbp+var_18C] mov rcx, [rbp+var_188] mov [rbp+var_118], rcx mov [rbp+var_110], eax mov rax, [rbp+var_118] mov [rbp+var_108], rax mov eax, [rbp+var_110] mov [rbp+var_100], eax lea rdi, [rbp+var_108] call __ZN10OpenSubdiv6v3_6_03Tmr10StencilRowIfE5ClearEv; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::Clear(void) mov [rbp+var_11C], 0 loc_1D9270: mov eax, [rbp+var_11C] mov [rbp+var_190], eax lea rdi, [rbp+var_A8] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void) mov ecx, eax mov eax, [rbp+var_190] cmp eax, ecx jge loc_1D93E2 mov rdi, [rbp+var_20] mov esi, dword ptr [rbp+var_98] call __ZNK10OpenSubdiv6v3_6_03Tmr10StencilRowIfEixEi; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::operator[](int) mov [rbp+var_19C], edx mov [rbp+var_198], rax jmp short $+2 loc_1D92B6: mov eax, [rbp+var_19C] mov rcx, [rbp+var_198] mov [rbp+var_140], rcx mov [rbp+var_138], eax mov eax, [rbp+var_138] mov [rbp+var_128], eax mov rax, [rbp+var_140] mov [rbp+var_130], rax mov rax, [rbp+var_18] mov [rbp+var_1B8], rax mov esi, [rbp+var_11C] lea rdi, [rbp+var_A8] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int) mov rdi, [rbp+var_1B8] mov esi, [rax] call __ZNK10OpenSubdiv6v3_6_03Tmr10StencilRowIfEixEi; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::operator[](int) mov [rbp+var_1AC], edx mov [rbp+var_1A8], rax jmp short $+2 loc_1D9324: mov eax, [rbp+var_1AC] mov rcx, [rbp+var_1A8] mov [rbp+var_160], rcx mov [rbp+var_158], eax mov rax, [rbp+var_160] mov [rbp+var_150], rax mov eax, [rbp+var_158] mov [rbp+var_148], eax lea rdi, [rbp+var_90] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb0EEcvPfEv; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::operator float *(void) movsxd rcx, [rbp+var_11C] movss xmm0, dword ptr [rax+rcx*4] lea rdi, [rbp+var_130] lea rsi, [rbp+var_150] call __ZN10OpenSubdiv6v3_6_03Tmr10StencilRowIfE13AddWithWeightERKS3_f; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(OpenSubdiv::v3_6_0::Tmr::StencilRow<float> const&,float) mov eax, [rbp+var_11C] add eax, 1 mov [rbp+var_11C], eax jmp loc_1D9270 mov rcx, rax mov eax, edx mov [rbp+var_B0], rcx mov [rbp+var_B4], eax jmp loc_1D9431 mov rcx, rax mov eax, edx mov [rbp+var_B0], rcx mov [rbp+var_B4], eax jmp short loc_1D940E mov rcx, rax mov eax, edx mov [rbp+var_B0], rcx mov [rbp+var_B4], eax lea rdi, [rbp+var_F4]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13FaceInterfaceD2Ev; OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface::~FaceInterface() jmp short loc_1D940E loc_1D93E2: lea rdi, [rbp+var_F4]; this call __ZN10OpenSubdiv6v3_6_03Vtr8internal13FaceInterfaceD2Ev; OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface::~FaceInterface() lea rdi, [rbp+var_F0] call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE4MaskD2Ev; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask::~Mask() loc_1D93FA: mov eax, dword ptr [rbp+var_98+4] add eax, 1 mov dword ptr [rbp+var_98+4], eax jmp loc_1D910F loc_1D940E: lea rdi, [rbp+var_F0] call __ZN10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE4MaskD2Ev; OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask::~Mask() jmp short loc_1D9431 loc_1D941C: lea rdi, [rbp+var_90] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb0EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::~StackBuffer() loc_1D9428: add rsp, 1C0h pop rbp retn loc_1D9431: lea rdi, [rbp+var_90] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb0EED2Ev; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::~StackBuffer() mov rdi, [rbp+var_B0] call __Unwind_Resume
long long OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>( OpenSubdiv::v3_6_0::Far::TopologyRefiner **a1, int a2, long long a3, long long a4) { long long result; // rax unsigned int MaxValence; // eax int v6; // esi int v7; // edx long long v8; // rax int v9; // eax int v10; // edx int v11; // edx unsigned int *v12; // rax int v13; // edx long long v14; // rax long long v15; // [rsp+8h] [rbp-1B8h] int v16; // [rsp+30h] [rbp-190h] int v17; // [rsp+54h] [rbp-16Ch] long long v18; // [rsp+70h] [rbp-150h] BYREF int v19; // [rsp+78h] [rbp-148h] long long v20; // [rsp+80h] [rbp-140h] int v21; // [rsp+88h] [rbp-138h] long long v22; // [rsp+90h] [rbp-130h] BYREF int v23; // [rsp+98h] [rbp-128h] int j; // [rsp+A4h] [rbp-11Ch] long long v25; // [rsp+A8h] [rbp-118h] int v26; // [rsp+B0h] [rbp-110h] long long v27; // [rsp+B8h] [rbp-108h] BYREF int v28; // [rsp+C0h] [rbp-100h] _BYTE v29[4]; // [rsp+CCh] [rbp-F4h] BYREF _BYTE v30[40]; // [rsp+D0h] [rbp-F0h] BYREF long long FaceVertices; // [rsp+F8h] [rbp-C8h] int v32; // [rsp+100h] [rbp-C0h] long long v33; // [rsp+118h] [rbp-A8h] BYREF int v34; // [rsp+120h] [rbp-A0h] unsigned int FaceChildVertex; // [rsp+128h] [rbp-98h] int i; // [rsp+12Ch] [rbp-94h] _BYTE v37[92]; // [rsp+130h] [rbp-90h] BYREF _BYTE v38[4]; // [rsp+18Ch] [rbp-34h] BYREF OpenSubdiv::v3_6_0::Vtr::internal::Level *v39; // [rsp+190h] [rbp-30h] OpenSubdiv::v3_6_0::Vtr::internal::Refinement *Refinement; // [rsp+198h] [rbp-28h] long long v41; // [rsp+1A0h] [rbp-20h] long long v42; // [rsp+1A8h] [rbp-18h] int v43; // [rsp+1B4h] [rbp-Ch] OpenSubdiv::v3_6_0::Far::TopologyRefiner **v44; // [rsp+1B8h] [rbp-8h] v44 = a1; v43 = a2; v42 = a3; v41 = a4; Refinement = (OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)OpenSubdiv::v3_6_0::Far::TopologyRefiner::getRefinement( *a1, a2 - 1); v39 = (OpenSubdiv::v3_6_0::Vtr::internal::Level *)OpenSubdiv::v3_6_0::Vtr::internal::Refinement::parent(Refinement); result = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getNumChildVerticesFromFaces(Refinement); if ( (_DWORD)result ) { OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::Scheme(v38, (char *)*a1 + 4); MaxValence = OpenSubdiv::v3_6_0::Vtr::internal::Level::getMaxValence(v39); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::StackBuffer(v37, MaxValence); for ( i = 0; ; ++i ) { v17 = i; if ( v17 >= (int)OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumFaces(v39) ) break; v6 = i; FaceChildVertex = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getFaceChildVertex(Refinement, i); if ( (OpenSubdiv::v3_6_0::Vtr::IndexIsValid((OpenSubdiv::v3_6_0::Vtr *)FaceChildVertex, v6) & 1) != 0 ) { FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(v39, i); v32 = v7; v34 = v7; v33 = FaceVertices; v8 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::operator float *(v37); OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask::Mask(v30, v8, 0LL); v9 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v33); OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface::FaceInterface( (OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface *)v29, v9); OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)1>::ComputeFaceVertexMask<OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>( v38, v29, v30); v25 = OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::operator[](v41, FaceChildVertex); v26 = v10; v27 = v25; v28 = v10; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::Clear(&v27); for ( j = 0; ; ++j ) { v16 = j; if ( v16 >= (int)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v33) ) break; v20 = OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::operator[](v41, FaceChildVertex); v21 = v11; v23 = v11; v22 = v20; v15 = v42; v12 = (unsigned int *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v33, (unsigned int)j); v18 = OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::operator[](v15, *v12); v19 = v13; v14 = OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::operator float *(v37); OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(&v22, &v18, *(float *)(v14 + 4LL * j)); } OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface::~FaceInterface((OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface *)v29); OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask::~Mask(v30); } } return OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::~StackBuffer(v37); } return result; }
39,743
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::ControlRow, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>(int, OpenSubdiv::v3_6_0::Tmr::ControlRow const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../far/primvarRefiner.h
inline void PrimvarRefinerReal<REAL>::interpFromFaces(int level, T const & src, U & dst) const { Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1); Vtr::internal::Level const & parent = refinement.parent(); if (refinement.getNumChildVerticesFromFaces() == 0) return; Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions); Vtr::internal::StackBuffer<Weight,16> fVertWeights(parent.getMaxValence()); for (int face = 0; face < parent.getNumFaces(); ++face) { Vtr::Index cVert = refinement.getFaceChildVertex(face); if (!Vtr::IndexIsValid(cVert)) continue; // Declare and compute mask weights for this vertex relative to its parent face: ConstIndexArray fVerts = parent.getFaceVertices(face); Mask fMask(fVertWeights, 0, 0); Vtr::internal::FaceInterface fHood(fVerts.size()); scheme.ComputeFaceVertexMask(fHood, fMask); // Apply the weights to the parent face's vertices: dst[cVert].Clear(); for (int i = 0; i < fVerts.size(); ++i) { dst[cVert].AddWithWeight(src[fVerts[i]], fVertWeights[i]); } } }
O1
c
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::ControlRow, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>(int, OpenSubdiv::v3_6_0::Tmr::ControlRow const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rcx, %rbx movq (%rdi), %rax movq 0x48(%rax), %rax movslq %esi, %rcx movq -0x8(%rax,%rcx,8), %r12 cmpl $0x0, 0x34(%r12) je 0xacbab movq %rdx, %r14 movq 0x8(%r12), %rax movq %rax, 0x8(%rsp) movl 0x14(%rax), %r15d leaq 0x50(%rsp), %rax movq %rax, -0x10(%rax) movl %r15d, -0x8(%rax) movl $0x10, -0x4(%rax) movq $0x0, 0x40(%rax) cmpq $0x11, %r15 jb 0xaca82 movq %r15, %rdi shlq $0x2, %rdi callq 0x3a230 movq %rax, 0x90(%rsp) movq %rax, 0x40(%rsp) movl %r15d, 0x4c(%rsp) movq 0x8(%rsp), %rax cmpl $0x0, (%rax) jle 0xacb9e xorl %ecx, %ecx movq %r12, 0x18(%rsp) movq 0xa8(%r12), %rax movq %rcx, 0x10(%rsp) movl (%rax,%rcx,4), %ebp cmpl $-0x1, %ebp je 0xacb80 movq 0x8(%rsp), %rcx movq 0x18(%rcx), %rax movq 0x10(%rsp), %rdx movslq 0x4(%rax,%rdx,8), %r15 shlq $0x2, %r15 addq 0x30(%rcx), %r15 movslq (%rax,%rdx,8), %r12 testq %r12, %r12 jle 0xacafc xorps %xmm1, %xmm1 cvtsi2ss %r12d, %xmm1 movq 0x40(%rsp), %rax movss 0x5517(%rip), %xmm0 # 0xb2000 divss %xmm1, %xmm0 xorl %ecx, %ecx movss %xmm0, (%rax,%rcx,4) incq %rcx cmpq %rcx, %r12 jne 0xacaef movslq 0x8(%rbx), %rdx testq %rdx, %rdx jle 0xacb1f movl %edx, %eax imull %ebp, %eax movslq %eax, %rdi shlq $0x2, %rdi addq (%rbx), %rdi shlq $0x2, %rdx xorl %esi, %esi callq 0x391b0 testl %r12d, %r12d jle 0xacb80 xorl %r13d, %r13d movl 0x8(%rbx), %eax movl %eax, %ecx imull %ebp, %ecx movslq %ecx, %rcx shlq $0x2, %rcx addq (%rbx), %rcx movq %rcx, 0x30(%rsp) movl %eax, 0x38(%rsp) movslq (%r15,%r13,4), %rax movslq 0x8(%r14), %rcx imulq %rcx, %rax shlq $0x2, %rax addq (%r14), %rax movq %rax, 0x20(%rsp) movl %ecx, 0x28(%rsp) movq 0x40(%rsp), %rax movss (%rax,%r13,4), %xmm0 leaq 0x30(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x3c100 incq %r13 cmpq %r13, %r12 jne 0xacb27 movq 0x10(%rsp), %rcx incq %rcx movq 0x8(%rsp), %rax movslq (%rax), %rax cmpq %rax, %rcx movq 0x18(%rsp), %r12 jl 0xaca97 movq 0x90(%rsp), %rdi callq 0x3a0c0 addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE15interpFromFacesILNS0_3Sdc10SchemeTypeE0ENS0_3Tmr10StencilRowIfEES9_EEviRKT0_RT1_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbx, rcx mov rax, [rdi] mov rax, [rax+48h] movsxd rcx, esi mov r12, [rax+rcx*8-8] cmp dword ptr [r12+34h], 0 jz loc_ACBAB mov r14, rdx mov rax, [r12+8] mov [rsp+0C8h+var_C0], rax mov r15d, [rax+14h] lea rax, [rsp+0C8h+var_78] mov [rax-10h], rax mov [rax-8], r15d mov dword ptr [rax-4], 10h mov qword ptr [rax+40h], 0 cmp r15, 11h jb short loc_ACA82 mov rdi, r15 shl rdi, 2; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+0C8h+var_38], rax mov [rsp+0C8h+var_88], rax mov [rsp+0C8h+var_7C], r15d loc_ACA82: mov rax, [rsp+0C8h+var_C0] cmp dword ptr [rax], 0 jle loc_ACB9E xor ecx, ecx mov [rsp+0C8h+var_B0], r12 loc_ACA97: mov rax, [r12+0A8h] mov [rsp+0C8h+var_B8], rcx mov ebp, [rax+rcx*4] cmp ebp, 0FFFFFFFFh jz loc_ACB80 mov rcx, [rsp+0C8h+var_C0] mov rax, [rcx+18h] mov rdx, [rsp+0C8h+var_B8] movsxd r15, dword ptr [rax+rdx*8+4] shl r15, 2 add r15, [rcx+30h] movsxd r12, dword ptr [rax+rdx*8] test r12, r12 jle short loc_ACAFC xorps xmm1, xmm1 cvtsi2ss xmm1, r12d mov rax, [rsp+0C8h+var_88] movss xmm0, cs:dword_B2000 divss xmm0, xmm1 xor ecx, ecx loc_ACAEF: movss dword ptr [rax+rcx*4], xmm0 inc rcx cmp r12, rcx jnz short loc_ACAEF loc_ACAFC: movsxd rdx, dword ptr [rbx+8] test rdx, rdx jle short loc_ACB1F mov eax, edx imul eax, ebp movsxd rdi, eax shl rdi, 2 add rdi, [rbx] shl rdx, 2 xor esi, esi call _memset loc_ACB1F: test r12d, r12d jle short loc_ACB80 xor r13d, r13d loc_ACB27: mov eax, [rbx+8] mov ecx, eax imul ecx, ebp movsxd rcx, ecx shl rcx, 2 add rcx, [rbx] mov [rsp+0C8h+var_98], rcx mov [rsp+0C8h+var_90], eax movsxd rax, dword ptr [r15+r13*4] movsxd rcx, dword ptr [r14+8] imul rax, rcx shl rax, 2 add rax, [r14] mov [rsp+0C8h+var_A8], rax mov [rsp+0C8h+var_A0], ecx mov rax, [rsp+0C8h+var_88] movss xmm0, dword ptr [rax+r13*4] lea rdi, [rsp+0C8h+var_98] lea rsi, [rsp+0C8h+var_A8] call __ZN10OpenSubdiv6v3_6_03Tmr10StencilRowIfE13AddWithWeightERKS3_f; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(OpenSubdiv::v3_6_0::Tmr::StencilRow<float> const&,float) inc r13 cmp r12, r13 jnz short loc_ACB27 loc_ACB80: mov rcx, [rsp+0C8h+var_B8] inc rcx mov rax, [rsp+0C8h+var_C0] movsxd rax, dword ptr [rax] cmp rcx, rax mov r12, [rsp+0C8h+var_B0] jl loc_ACA97 loc_ACB9E: mov rdi, [rsp+0C8h+var_38]; void * call __ZdlPv; operator delete(void *) loc_ACBAB: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>( long long a1, int a2, long long a3, long long a4) { long long v5; // r12 unsigned long long v7; // r15 long long v8; // rcx int v9; // ebp long long v10; // rax long long v11; // r15 long long v12; // r12 char *v13; // rax long long i; // rcx long long v15; // rdx long long j; // r13 int v17; // eax long long v18; // rcx int *v19; // [rsp+8h] [rbp-C0h] long long v20; // [rsp+10h] [rbp-B8h] long long v21; // [rsp+18h] [rbp-B0h] long long v22; // [rsp+20h] [rbp-A8h] BYREF int v23; // [rsp+28h] [rbp-A0h] long long v24; // [rsp+30h] [rbp-98h] BYREF int v25; // [rsp+38h] [rbp-90h] char *v26; // [rsp+40h] [rbp-88h] int v27; // [rsp+48h] [rbp-80h] int v28; // [rsp+4Ch] [rbp-7Ch] char v29; // [rsp+50h] [rbp-78h] BYREF void *v30; // [rsp+90h] [rbp-38h] v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 72LL) + 8LL * a2 - 8); if ( *(_DWORD *)(v5 + 52) ) { v19 = *(int **)(v5 + 8); v7 = (unsigned int)v19[5]; v26 = &v29; v27 = v7; v28 = 16; v30 = 0LL; if ( v7 >= 0x11 ) { v30 = (void *)operator new(4 * v7); v26 = (char *)v30; v28 = v7; } if ( *v19 > 0 ) { v8 = 0LL; v21 = v5; do { v20 = v8; v9 = *(_DWORD *)(*(_QWORD *)(v5 + 168) + 4 * v8); if ( v9 != -1 ) { v10 = *((_QWORD *)v19 + 3); v11 = *((_QWORD *)v19 + 6) + 4LL * *(int *)(v10 + 8 * v8 + 4); v12 = *(int *)(v10 + 8 * v8); if ( v12 > 0 ) { v13 = v26; for ( i = 0LL; i != v12; ++i ) *(float *)&v13[4 * i] = 1.0 / (float)(int)v12; } v15 = *(int *)(a4 + 8); if ( v15 > 0 ) memset(*(_QWORD *)a4 + 4LL * v9 * (int)v15, 0LL, 4 * v15); if ( (int)v12 > 0 ) { for ( j = 0LL; j != v12; ++j ) { v17 = *(_DWORD *)(a4 + 8); v24 = *(_QWORD *)a4 + 4LL * v9 * v17; v25 = v17; v18 = *(int *)(a3 + 8); v22 = *(_QWORD *)a3 + 4 * v18 * *(int *)(v11 + 4 * j); v23 = v18; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(&v24, &v22, *(float *)&v26[4 * j]); } } } v8 = v20 + 1; v5 = v21; } while ( v20 + 1 < *v19 ); } operator delete(v30); } }
interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBX,RCX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x48] MOVSXD RCX,ESI MOV R12,qword ptr [RAX + RCX*0x8 + -0x8] CMP dword ptr [R12 + 0x34],0x0 JZ 0x001acbab MOV R14,RDX MOV RAX,qword ptr [R12 + 0x8] MOV qword ptr [RSP + 0x8],RAX MOV R15D,dword ptr [RAX + 0x14] LEA RAX,[RSP + 0x50] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],R15D MOV dword ptr [RAX + -0x4],0x10 MOV qword ptr [RAX + 0x40],0x0 CMP R15,0x11 JC 0x001aca82 MOV RDI,R15 SHL RDI,0x2 CALL 0x0013a230 MOV qword ptr [RSP + 0x90],RAX MOV qword ptr [RSP + 0x40],RAX MOV dword ptr [RSP + 0x4c],R15D LAB_001aca82: MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX],0x0 JLE 0x001acb9e XOR ECX,ECX MOV qword ptr [RSP + 0x18],R12 LAB_001aca97: MOV RAX,qword ptr [R12 + 0xa8] MOV qword ptr [RSP + 0x10],RCX MOV EBP,dword ptr [RAX + RCX*0x4] CMP EBP,-0x1 JZ 0x001acb80 MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RCX + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOVSXD R15,dword ptr [RAX + RDX*0x8 + 0x4] SHL R15,0x2 ADD R15,qword ptr [RCX + 0x30] MOVSXD R12,dword ptr [RAX + RDX*0x8] TEST R12,R12 JLE 0x001acafc XORPS XMM1,XMM1 CVTSI2SS XMM1,R12D MOV RAX,qword ptr [RSP + 0x40] MOVSS XMM0,dword ptr [0x001b2000] DIVSS XMM0,XMM1 XOR ECX,ECX LAB_001acaef: MOVSS dword ptr [RAX + RCX*0x4],XMM0 INC RCX CMP R12,RCX JNZ 0x001acaef LAB_001acafc: MOVSXD RDX,dword ptr [RBX + 0x8] TEST RDX,RDX JLE 0x001acb1f MOV EAX,EDX IMUL EAX,EBP MOVSXD RDI,EAX SHL RDI,0x2 ADD RDI,qword ptr [RBX] SHL RDX,0x2 XOR ESI,ESI CALL 0x001391b0 LAB_001acb1f: TEST R12D,R12D JLE 0x001acb80 XOR R13D,R13D LAB_001acb27: MOV EAX,dword ptr [RBX + 0x8] MOV ECX,EAX IMUL ECX,EBP MOVSXD RCX,ECX SHL RCX,0x2 ADD RCX,qword ptr [RBX] MOV qword ptr [RSP + 0x30],RCX MOV dword ptr [RSP + 0x38],EAX MOVSXD RAX,dword ptr [R15 + R13*0x4] MOVSXD RCX,dword ptr [R14 + 0x8] IMUL RAX,RCX SHL RAX,0x2 ADD RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0x28],ECX MOV RAX,qword ptr [RSP + 0x40] MOVSS XMM0,dword ptr [RAX + R13*0x4] LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x20] CALL 0x0013c100 INC R13 CMP R12,R13 JNZ 0x001acb27 LAB_001acb80: MOV RCX,qword ptr [RSP + 0x10] INC RCX MOV RAX,qword ptr [RSP + 0x8] MOVSXD RAX,dword ptr [RAX] CMP RCX,RAX MOV R12,qword ptr [RSP + 0x18] JL 0x001aca97 LAB_001acb9e: MOV RDI,qword ptr [RSP + 0x90] CALL 0x0013a0c0 LAB_001acbab: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>, OpenSubdiv::v3_6_0::Tmr::StencilRow<float> >(int, OpenSubdiv::v3_6_0::Tmr::StencilRow<float> const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>:: interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>> (PrimvarRefinerReal<float> *this,int param_1,StencilRow *param_2,StencilRow *param_3) { uint uVar1; int iVar2; int iVar3; int iVar4; int iVar5; long lVar6; int *piVar7; long lVar8; long lVar9; long lVar10; long lVar11; float fVar12; long local_a8; int local_a0; long local_98; int local_90; int1 *local_88; uint local_80; uint local_7c; int1 local_78 [64]; int1 *local_38; lVar6 = *(long *)(*(long *)(*(long *)this + 0x48) + -8 + (long)param_1 * 8); if (*(int *)(lVar6 + 0x34) != 0) { piVar7 = *(int **)(lVar6 + 8); uVar1 = piVar7[5]; local_88 = local_78; local_7c = 0x10; local_38 = (int1 *)0x0; local_80 = uVar1; if (0x10 < (ulong)uVar1) { local_88 = (int1 *)operator_new((ulong)uVar1 << 2); local_7c = uVar1; local_38 = local_88; } if (0 < *piVar7) { lVar10 = 0; do { iVar2 = *(int *)(*(long *)(lVar6 + 0xa8) + lVar10 * 4); if (iVar2 != -1) { iVar3 = *(int *)(*(long *)(piVar7 + 6) + 4 + lVar10 * 8); lVar8 = *(long *)(piVar7 + 0xc); iVar4 = *(int *)(*(long *)(piVar7 + 6) + lVar10 * 8); lVar11 = (long)iVar4; if (0 < lVar11) { fVar12 = DAT_001b2000 / (float)iVar4; lVar9 = 0; do { *(float *)(local_88 + lVar9 * 4) = fVar12; lVar9 = lVar9 + 1; } while (lVar11 != lVar9); } iVar5 = *(int *)(param_3 + 8); if (0 < (long)iVar5) { memset((void *)((long)(iVar5 * iVar2) * 4 + *(long *)param_3),0,(long)iVar5 << 2); } if (0 < iVar4) { lVar9 = 0; do { local_90 = *(int *)(param_3 + 8); local_98 = (long)(local_90 * iVar2) * 4 + *(long *)param_3; local_a0 = *(int *)(param_2 + 8); local_a8 = (long)*(int *)((long)iVar3 * 4 + lVar8 + lVar9 * 4) * (long)local_a0 * 4 + *(long *)param_2; Tmr::StencilRow<float>::AddWithWeight ((StencilRow<float> *)&local_98,(StencilRow *)&local_a8, *(float *)(local_88 + lVar9 * 4)); lVar9 = lVar9 + 1; } while (lVar11 != lVar9); } } lVar10 = lVar10 + 1; } while (lVar10 < *piVar7); } operator_delete(local_38); } return; }
39,744
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::ControlRow, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>(int, OpenSubdiv::v3_6_0::Tmr::ControlRow const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../far/primvarRefiner.h
inline void PrimvarRefinerReal<REAL>::interpFromFaces(int level, T const & src, U & dst) const { Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1); Vtr::internal::Level const & parent = refinement.parent(); if (refinement.getNumChildVerticesFromFaces() == 0) return; Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions); Vtr::internal::StackBuffer<Weight,16> fVertWeights(parent.getMaxValence()); for (int face = 0; face < parent.getNumFaces(); ++face) { Vtr::Index cVert = refinement.getFaceChildVertex(face); if (!Vtr::IndexIsValid(cVert)) continue; // Declare and compute mask weights for this vertex relative to its parent face: ConstIndexArray fVerts = parent.getFaceVertices(face); Mask fMask(fVertWeights, 0, 0); Vtr::internal::FaceInterface fHood(fVerts.size()); scheme.ComputeFaceVertexMask(fHood, fMask); // Apply the weights to the parent face's vertices: dst[cVert].Clear(); for (int i = 0; i < fVerts.size(); ++i) { dst[cVert].AddWithWeight(src[fVerts[i]], fVertWeights[i]); } } }
O2
c
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::ControlRow, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>(int, OpenSubdiv::v3_6_0::Tmr::ControlRow const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rcx, %rbx movq %rdx, %r14 movq (%rdi), %rax movq 0x48(%rax), %rcx movslq %esi, %rdx movq -0x8(%rcx,%rdx,8), %r15 cmpl $0x0, 0x34(%r15) je 0xb75aa movq 0x8(%r15), %r12 movl 0x4(%rax), %eax leaq 0xc(%rsp), %rcx movl %eax, (%rcx) movl 0x14(%r12), %esi leaq 0x70(%rsp), %rdi callq 0x51a30 xorl %esi, %esi movq %r15, 0x28(%rsp) movq %r12, 0x20(%rsp) movslq (%r12), %rax cmpq %rax, %rsi jge 0xb759d movq 0xa8(%r15), %rax movl (%rax,%rsi,4), %r13d cmpl $-0x1, %r13d je 0xb7595 movq %r12, %rdi movq %rsi, 0x30(%rsp) callq 0x52db0 movq %rax, %r15 movl %edx, %ebp movq 0x70(%rsp), %rax movq %rax, 0x48(%rsp) leaq 0x50(%rsp), %rax xorps %xmm0, %xmm0 movups %xmm0, 0xd(%rax) movups %xmm0, (%rax) movl %edx, 0x8(%rsp) leaq 0xc(%rsp), %rdi leaq 0x8(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0x4f630 movl 0x8(%rbx), %eax movl %eax, %ecx imull %r13d, %ecx movslq %ecx, %rcx shlq $0x2, %rcx addq (%rbx), %rcx movq %rcx, 0x10(%rsp) movl %eax, 0x18(%rsp) leaq 0x10(%rsp), %rdi callq 0x52e40 testl %ebp, %ebp movl $0x0, %eax cmovlel %eax, %ebp xorl %r12d, %r12d cmpq %r12, %rbp je 0xb7586 movl 0x8(%rbx), %eax movl %eax, %ecx imull %r13d, %ecx movslq %ecx, %rcx shlq $0x2, %rcx addq (%rbx), %rcx movq %rcx, 0x10(%rsp) movl %eax, 0x18(%rsp) movslq (%r15,%r12,4), %rax movslq 0x8(%r14), %rcx imulq %rcx, %rax shlq $0x2, %rax addq (%r14), %rax movq %rax, 0x38(%rsp) movl %ecx, 0x40(%rsp) movq 0x70(%rsp), %rax movss (%rax,%r12,4), %xmm0 leaq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x558e0 incq %r12 jmp 0xb752a movq 0x28(%rsp), %r15 movq 0x20(%rsp), %r12 movq 0x30(%rsp), %rsi incq %rsi jmp 0xb7492 movq 0xc0(%rsp), %rdi callq 0x524d0 addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0xc0(%rsp), %rdi callq 0x524d0 movq %rbx, %rdi callq 0x55300
_ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE15interpFromFacesILNS0_3Sdc10SchemeTypeE0ENS0_3Tmr10StencilRowIfEES9_EEviRKT0_RT1_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov rbx, rcx mov r14, rdx mov rax, [rdi] mov rcx, [rax+48h] movsxd rdx, esi mov r15, [rcx+rdx*8-8] cmp dword ptr [r15+34h], 0 jz loc_B75AA mov r12, [r15+8] mov eax, [rax+4] lea rcx, [rsp+0F8h+var_EC] mov [rcx], eax mov esi, [r12+14h] lea rdi, [rsp+0F8h+var_88] call __ZN10OpenSubdiv6v3_6_03Vtr8internal11StackBufferIfLj16ELb0EEC2Ej; OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::StackBuffer(uint) xor esi, esi; int mov [rsp+0F8h+var_D0], r15 mov [rsp+0F8h+var_D8], r12 loc_B7492: movsxd rax, dword ptr [r12] cmp rsi, rax jge loc_B759D mov rax, [r15+0A8h] mov r13d, [rax+rsi*4] cmp r13d, 0FFFFFFFFh jz loc_B7595 mov rdi, r12; this mov [rsp+0F8h+var_C8], rsi call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level15getFaceVerticesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices(int) mov r15, rax mov ebp, edx mov rax, [rsp+0F8h+var_88] mov [rsp+0F8h+var_B0], rax lea rax, [rsp+0F8h+var_A8] xorps xmm0, xmm0 movups xmmword ptr [rax+0Dh], xmm0 movups xmmword ptr [rax], xmm0 mov [rsp+0F8h+var_F0], edx lea rdi, [rsp+0F8h+var_EC] lea rsi, [rsp+0F8h+var_F0] lea rdx, [rsp+0F8h+var_B0] call __ZNK10OpenSubdiv6v3_6_03Sdc6SchemeILNS1_10SchemeTypeE0EE21ComputeFaceVertexMaskINS0_3Vtr8internal13FaceInterfaceENS0_3Far18PrimvarRefinerRealIfE4MaskEEEvRKT_RT0_; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0>::ComputeFaceVertexMask<OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>(OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface const&,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask &) mov eax, [rbx+8] mov ecx, eax imul ecx, r13d movsxd rcx, ecx shl rcx, 2 add rcx, [rbx] mov [rsp+0F8h+var_E8], rcx mov [rsp+0F8h+var_E0], eax lea rdi, [rsp+0F8h+var_E8] call __ZN10OpenSubdiv6v3_6_03Tmr10StencilRowIfE5ClearEv; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::Clear(void) test ebp, ebp mov eax, 0 cmovle ebp, eax xor r12d, r12d loc_B752A: cmp rbp, r12 jz short loc_B7586 mov eax, [rbx+8] mov ecx, eax imul ecx, r13d movsxd rcx, ecx shl rcx, 2 add rcx, [rbx] mov [rsp+0F8h+var_E8], rcx mov [rsp+0F8h+var_E0], eax movsxd rax, dword ptr [r15+r12*4] movsxd rcx, dword ptr [r14+8] imul rax, rcx shl rax, 2 add rax, [r14] mov [rsp+0F8h+var_C0], rax mov [rsp+0F8h+var_B8], ecx mov rax, [rsp+0F8h+var_88] movss xmm0, dword ptr [rax+r12*4] lea rdi, [rsp+0F8h+var_E8] lea rsi, [rsp+0F8h+var_C0] call __ZN10OpenSubdiv6v3_6_03Tmr10StencilRowIfE13AddWithWeightERKS3_f; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(OpenSubdiv::v3_6_0::Tmr::StencilRow<float> const&,float) inc r12 jmp short loc_B752A loc_B7586: mov r15, [rsp+0F8h+var_D0] mov r12, [rsp+0F8h+var_D8] mov rsi, [rsp+0F8h+var_C8] loc_B7595: inc rsi jmp loc_B7492 loc_B759D: mov rdi, [rsp+0F8h+var_38]; void * call __ZdlPv; operator delete(void *) loc_B75AA: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_B8]; void * call __ZdlPv; operator delete(void *) mov rdi, rbx call __Unwind_Resume
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>( long long a1, int a2, long long a3, long long a4) { long long v6; // r15 unsigned int *v7; // r12 long long v8; // rsi int v9; // r13d long long FaceVertices; // r15 unsigned int v11; // edx long long v12; // rbp int v13; // eax long long i; // r12 int v15; // eax long long v16; // rcx unsigned int v17; // [rsp+8h] [rbp-F0h] BYREF int v18; // [rsp+Ch] [rbp-ECh] BYREF long long v19; // [rsp+10h] [rbp-E8h] BYREF int v20; // [rsp+18h] [rbp-E0h] unsigned int *v21; // [rsp+20h] [rbp-D8h] long long v22; // [rsp+28h] [rbp-D0h] long long v23; // [rsp+30h] [rbp-C8h] long long v24; // [rsp+38h] [rbp-C0h] BYREF int v25; // [rsp+40h] [rbp-B8h] _QWORD v26[5]; // [rsp+48h] [rbp-B0h] BYREF _QWORD v27[17]; // [rsp+70h] [rbp-88h] BYREF v6 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 72LL) + 8LL * a2 - 8); if ( *(_DWORD *)(v6 + 52) ) { v7 = *(unsigned int **)(v6 + 8); v18 = *(_DWORD *)(*(_QWORD *)a1 + 4LL); OpenSubdiv::v3_6_0::Vtr::internal::StackBuffer<float,16u,false>::StackBuffer(v27, v7[5]); v8 = 0LL; v22 = v6; v21 = v7; while ( v8 < (int)*v7 ) { v9 = *(_DWORD *)(*(_QWORD *)(v6 + 168) + 4 * v8); if ( v9 != -1 ) { v23 = v8; FaceVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceVertices( (OpenSubdiv::v3_6_0::Vtr::internal::Level *)v7, v8); v12 = v11; v26[0] = v27[0]; memset(&v26[1], 0, 29); v17 = v11; OpenSubdiv::v3_6_0::Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0>::ComputeFaceVertexMask<OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask>( &v18, &v17, v26); v13 = *(_DWORD *)(a4 + 8); v19 = *(_QWORD *)a4 + 4LL * v9 * v13; v20 = v13; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::Clear(&v19); if ( (int)v12 <= 0 ) v12 = 0LL; for ( i = 0LL; v12 != i; ++i ) { v15 = *(_DWORD *)(a4 + 8); v19 = *(_QWORD *)a4 + 4LL * v9 * v15; v20 = v15; v16 = *(int *)(a3 + 8); v24 = *(_QWORD *)a3 + 4 * v16 * *(int *)(FaceVertices + 4 * i); v25 = v16; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(&v19, &v24, *(float *)(v27[0] + 4 * i)); } v6 = v22; v7 = v21; v8 = v23; } ++v8; } operator delete((void *)v27[10]); } }
interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RBX,RCX MOV R14,RDX MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RAX + 0x48] MOVSXD RDX,ESI MOV R15,qword ptr [RCX + RDX*0x8 + -0x8] CMP dword ptr [R15 + 0x34],0x0 JZ 0x001b75aa MOV R12,qword ptr [R15 + 0x8] MOV EAX,dword ptr [RAX + 0x4] LEA RCX,[RSP + 0xc] MOV dword ptr [RCX],EAX MOV ESI,dword ptr [R12 + 0x14] LEA RDI,[RSP + 0x70] CALL 0x00151a30 XOR ESI,ESI MOV qword ptr [RSP + 0x28],R15 MOV qword ptr [RSP + 0x20],R12 LAB_001b7492: MOVSXD RAX,dword ptr [R12] CMP RSI,RAX JGE 0x001b759d MOV RAX,qword ptr [R15 + 0xa8] MOV R13D,dword ptr [RAX + RSI*0x4] CMP R13D,-0x1 JZ 0x001b7595 LAB_001b74b4: MOV RDI,R12 MOV qword ptr [RSP + 0x30],RSI CALL 0x00152db0 LAB_001b74c1: MOV R15,RAX MOV EBP,EDX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x48],RAX LEA RAX,[RSP + 0x50] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0xd],XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV dword ptr [RSP + 0x8],EDX LEA RDI,[RSP + 0xc] LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x48] CALL 0x0014f630 MOV EAX,dword ptr [RBX + 0x8] MOV ECX,EAX IMUL ECX,R13D MOVSXD RCX,ECX SHL RCX,0x2 ADD RCX,qword ptr [RBX] MOV qword ptr [RSP + 0x10],RCX MOV dword ptr [RSP + 0x18],EAX LEA RDI,[RSP + 0x10] CALL 0x00152e40 TEST EBP,EBP MOV EAX,0x0 CMOVLE EBP,EAX XOR R12D,R12D LAB_001b752a: CMP RBP,R12 JZ 0x001b7586 MOV EAX,dword ptr [RBX + 0x8] MOV ECX,EAX IMUL ECX,R13D MOVSXD RCX,ECX SHL RCX,0x2 ADD RCX,qword ptr [RBX] MOV qword ptr [RSP + 0x10],RCX MOV dword ptr [RSP + 0x18],EAX MOVSXD RAX,dword ptr [R15 + R12*0x4] MOVSXD RCX,dword ptr [R14 + 0x8] IMUL RAX,RCX SHL RAX,0x2 ADD RAX,qword ptr [R14] MOV qword ptr [RSP + 0x38],RAX MOV dword ptr [RSP + 0x40],ECX MOV RAX,qword ptr [RSP + 0x70] MOVSS XMM0,dword ptr [RAX + R12*0x4] LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x38] CALL 0x001558e0 INC R12 JMP 0x001b752a LAB_001b7586: MOV R15,qword ptr [RSP + 0x28] MOV R12,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x30] LAB_001b7595: INC RSI JMP 0x001b7492 LAB_001b759d: MOV RDI,qword ptr [RSP + 0xc0] CALL 0x001524d0 LAB_001b75aa: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>, OpenSubdiv::v3_6_0::Tmr::StencilRow<float> >(int, OpenSubdiv::v3_6_0::Tmr::StencilRow<float> const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>:: interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>> (PrimvarRefinerReal<float> *this,int param_1,StencilRow *param_2,StencilRow *param_3) { int iVar1; uint uVar2; ulong uVar3; long lVar4; ulong uVar5; Level *this_00; long lVar6; int1 auVar7 [12]; uint local_f0; int4 local_ec; long local_e8; int local_e0; Level *local_d8; long local_d0; long local_c8; long local_c0; int local_b8; long local_b0 [2]; int5 uStack_a0; int3 uStack_9b; int5 uStack_98; int8 uStack_93; long local_88 [10]; void *local_38; lVar6 = *(long *)(*(long *)(*(long *)this + 0x48) + -8 + (long)param_1 * 8); if (*(int *)(lVar6 + 0x34) != 0) { this_00 = *(Level **)(lVar6 + 8); local_ec = *(int4 *)(*(long *)this + 4); Vtr::internal::StackBuffer<float,16u,false>::StackBuffer ((StackBuffer<float,16u,false> *)local_88,*(uint *)(this_00 + 0x14)); local_d8 = this_00; local_d0 = lVar6; for (lVar4 = 0; lVar4 < *(int *)this_00; lVar4 = lVar4 + 1) { iVar1 = *(int *)(*(long *)(lVar6 + 0xa8) + lVar4 * 4); if (iVar1 != -1) { local_c8 = lVar4; /* try { // try from 001b74b4 to 001b74c0 has its CatchHandler @ 001b75bc */ auVar7 = Vtr::internal::Level::getFaceVertices(this_00,(int)lVar4); uVar2 = auVar7._8_4_; uVar3 = (ulong)uVar2; local_b0[0] = local_88[0]; uStack_98 = 0; uStack_93 = 0; local_b0[1] = 0; uStack_a0 = 0; uStack_9b = 0; local_f0 = uVar2; Sdc::Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0>:: ComputeFaceVertexMask<OpenSubdiv::v3_6_0::Vtr::internal::FaceInterface,OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::Mask> ((Scheme<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0> *)&local_ec, (FaceInterface *)&local_f0,(Mask *)local_b0); local_e0 = *(int *)(param_3 + 8); local_e8 = (long)(local_e0 * iVar1) * 4 + *(long *)param_3; Tmr::StencilRow<float>::Clear((StencilRow<float> *)&local_e8); if ((int)uVar2 < 1) { uVar3 = 0; } for (uVar5 = 0; lVar4 = local_c8, this_00 = local_d8, lVar6 = local_d0, uVar3 != uVar5; uVar5 = uVar5 + 1) { local_e0 = *(int *)(param_3 + 8); local_e8 = (long)(local_e0 * iVar1) * 4 + *(long *)param_3; local_b8 = *(int *)(param_2 + 8); local_c0 = (long)*(int *)(auVar7._0_8_ + uVar5 * 4) * (long)local_b8 * 4 + *(long *)param_2; Tmr::StencilRow<float>::AddWithWeight ((StencilRow<float> *)&local_e8,(StencilRow *)&local_c0, *(float *)(local_88[0] + uVar5 * 4)); } } } operator_delete(local_38); } return; }
39,745
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::ControlRow, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>(int, OpenSubdiv::v3_6_0::Tmr::ControlRow const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/../far/primvarRefiner.h
inline void PrimvarRefinerReal<REAL>::interpFromFaces(int level, T const & src, U & dst) const { Vtr::internal::Refinement const & refinement = _refiner.getRefinement(level-1); Vtr::internal::Level const & parent = refinement.parent(); if (refinement.getNumChildVerticesFromFaces() == 0) return; Sdc::Scheme<SCHEME> scheme(_refiner._subdivOptions); Vtr::internal::StackBuffer<Weight,16> fVertWeights(parent.getMaxValence()); for (int face = 0; face < parent.getNumFaces(); ++face) { Vtr::Index cVert = refinement.getFaceChildVertex(face); if (!Vtr::IndexIsValid(cVert)) continue; // Declare and compute mask weights for this vertex relative to its parent face: ConstIndexArray fVerts = parent.getFaceVertices(face); Mask fMask(fVertWeights, 0, 0); Vtr::internal::FaceInterface fHood(fVerts.size()); scheme.ComputeFaceVertexMask(fHood, fMask); // Apply the weights to the parent face's vertices: dst[cVert].Clear(); for (int i = 0; i < fVerts.size(); ++i) { dst[cVert].AddWithWeight(src[fVerts[i]], fVertWeights[i]); } } }
O3
c
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::ControlRow, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>(int, OpenSubdiv::v3_6_0::Tmr::ControlRow const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rcx, %rbx movq (%rdi), %rax movq 0x48(%rax), %rax movslq %esi, %rcx movq -0x8(%rax,%rcx,8), %r13 cmpl $0x0, 0x34(%r13) je 0xafcaf movq %rdx, %r14 movq 0x8(%r13), %rax movq %rax, 0x8(%rsp) movl 0x14(%rax), %r15d leaq 0x50(%rsp), %rax movq %rax, -0x10(%rax) movl %r15d, -0x8(%rax) movl $0x10, -0x4(%rax) movq $0x0, 0x40(%rax) cmpq $0x11, %r15 jb 0xafa3f movq %r15, %rdi shlq $0x2, %rdi callq 0x3a210 movq %rax, %rdi movq %rax, 0x90(%rsp) movq %rax, 0x40(%rsp) movl %r15d, 0x4c(%rsp) jmp 0xafa41 xorl %edi, %edi movq 0x8(%rsp), %rax movl (%rax), %r10d testl %r10d, %r10d jle 0xafcaa xorl %r8d, %r8d movdqa 0x5613(%rip), %xmm7 # 0xb5070 pcmpeqd %xmm8, %xmm8 movdqa 0x7125(%rip), %xmm9 # 0xb6b90 leaq 0x30(%rsp), %rdi leaq 0x20(%rsp), %rsi movq %r13, 0x10(%rsp) movq 0xa8(%r13), %rax movl (%rax,%r8,4), %ebp cmpl $-0x1, %ebp je 0xafc93 movq 0x8(%rsp), %rcx movq 0x18(%rcx), %rax movslq 0x4(%rax,%r8,8), %r15 shlq $0x2, %r15 addq 0x30(%rcx), %r15 movslq (%rax,%r8,8), %r12 testq %r12, %r12 jle 0xafbae movq 0x40(%rsp), %rax cvtsi2ss %r12d, %xmm1 movss 0x553d(%rip), %xmm0 # 0xb5000 divss %xmm1, %xmm0 leal 0x3(%r12), %ecx leaq -0x1(%r12), %rdx movq %rdx, %xmm1 pshufd $0x44, %xmm1, %xmm1 # xmm1 = xmm1[0,1,0,1] shrl $0x2, %ecx shlq $0x4, %rcx pxor %xmm7, %xmm1 xorl %edx, %edx movdqa 0x5570(%rip), %xmm2 # 0xb5060 movdqa 0x5558(%rip), %xmm3 # 0xb5050 movdqa %xmm2, %xmm4 pxor %xmm7, %xmm4 movdqa %xmm4, %xmm5 pcmpgtd %xmm1, %xmm5 pcmpeqd %xmm1, %xmm4 pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3] pand %xmm5, %xmm6 pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3] por %xmm6, %xmm4 movd %xmm4, %r9d notl %r9d testb $0x1, %r9b je 0xafb31 movss %xmm0, (%rax,%rdx) pxor %xmm8, %xmm4 pextrw $0x4, %xmm4, %r9d testb $0x1, %r9b je 0xafb48 movss %xmm0, 0x4(%rax,%rdx) movdqa %xmm3, %xmm4 pxor %xmm7, %xmm4 movdqa %xmm4, %xmm5 pcmpgtd %xmm1, %xmm5 pcmpeqd %xmm1, %xmm4 pshufd $0xf5, %xmm4, %xmm6 # xmm6 = xmm4[1,1,3,3] pand %xmm5, %xmm6 pshufd $0xf5, %xmm5, %xmm4 # xmm4 = xmm5[1,1,3,3] por %xmm6, %xmm4 pxor %xmm8, %xmm4 pextrw $0x0, %xmm4, %r9d testb $0x1, %r9b je 0xafb85 movss %xmm0, 0x8(%rax,%rdx) pextrw $0x4, %xmm4, %r9d testb $0x1, %r9b je 0xafb97 movss %xmm0, 0xc(%rax,%rdx) paddq %xmm9, %xmm2 paddq %xmm9, %xmm3 addq $0x10, %rdx cmpq %rdx, %rcx jne 0xafaf8 movslq 0x8(%rbx), %rdx testq %rdx, %rdx movq %r8, 0x18(%rsp) jle 0xafc06 movl %edx, %eax imull %ebp, %eax movslq %eax, %rdi shlq $0x2, %rdi addq (%rbx), %rdi shlq $0x2, %rdx xorl %esi, %esi movl %r10d, %r13d callq 0x391a0 movl %r13d, %r10d leaq 0x20(%rsp), %rsi leaq 0x30(%rsp), %rdi movdqa 0x6fa1(%rip), %xmm9 # 0xb6b90 pcmpeqd %xmm8, %xmm8 movdqa 0x5474(%rip), %xmm7 # 0xb5070 movq 0x18(%rsp), %r8 movq 0x10(%rsp), %r13 testl %r12d, %r12d jle 0xafc93 xorl %r13d, %r13d movl 0x8(%rbx), %eax movl %eax, %ecx imull %ebp, %ecx movslq %ecx, %rcx shlq $0x2, %rcx addq (%rbx), %rcx movq %rcx, 0x30(%rsp) movl %eax, 0x38(%rsp) movslq (%r15,%r13,4), %rax movslq 0x8(%r14), %rcx imulq %rcx, %rax shlq $0x2, %rax addq (%r14), %rax movq %rax, 0x20(%rsp) movl %ecx, 0x28(%rsp) movq 0x40(%rsp), %rax movss (%rax,%r13,4), %xmm0 callq 0x3c0b0 leaq 0x20(%rsp), %rsi leaq 0x30(%rsp), %rdi incq %r13 cmpq %r13, %r12 jne 0xafc12 movq 0x8(%rsp), %rax movl (%rax), %r10d movq 0x10(%rsp), %r13 movq 0x18(%rsp), %r8 movdqa 0x53eb(%rip), %xmm7 # 0xb5070 pcmpeqd %xmm8, %xmm8 movdqa 0x6efd(%rip), %xmm9 # 0xb6b90 incq %r8 movslq %r10d, %rax cmpq %rax, %r8 jl 0xafa7a movq 0x90(%rsp), %rdi callq 0x3a0a0 addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZNK10OpenSubdiv6v3_6_03Far18PrimvarRefinerRealIfE15interpFromFacesILNS0_3Sdc10SchemeTypeE0ENS0_3Tmr10StencilRowIfEES9_EEviRKT0_RT1_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbx, rcx mov rax, [rdi] mov rax, [rax+48h] movsxd rcx, esi mov r13, [rax+rcx*8-8] cmp dword ptr [r13+34h], 0 jz loc_AFCAF mov r14, rdx mov rax, [r13+8] mov [rsp+0C8h+var_C0], rax mov r15d, [rax+14h] lea rax, [rsp+0C8h+var_78] mov [rax-10h], rax mov [rax-8], r15d mov dword ptr [rax-4], 10h mov qword ptr [rax+40h], 0 cmp r15, 11h jb short loc_AFA3F mov rdi, r15 shl rdi, 2; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax mov [rsp+0C8h+var_38], rax mov [rsp+0C8h+var_88], rax mov [rsp+0C8h+var_7C], r15d jmp short loc_AFA41 loc_AFA3F: xor edi, edi loc_AFA41: mov rax, [rsp+0C8h+var_C0] mov r10d, [rax] test r10d, r10d jle loc_AFCAA xor r8d, r8d movdqa xmm7, cs:xmmword_B5070 pcmpeqd xmm8, xmm8 movdqa xmm9, cs:xmmword_B6B90 lea rdi, [rsp+0C8h+var_98] lea rsi, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B8], r13 loc_AFA7A: mov rax, [r13+0A8h] mov ebp, [rax+r8*4] cmp ebp, 0FFFFFFFFh jz loc_AFC93 mov rcx, [rsp+0C8h+var_C0] mov rax, [rcx+18h] movsxd r15, dword ptr [rax+r8*8+4] shl r15, 2 add r15, [rcx+30h] movsxd r12, dword ptr [rax+r8*8] test r12, r12 jle loc_AFBAE mov rax, [rsp+0C8h+var_88] cvtsi2ss xmm1, r12d movss xmm0, cs:dword_B5000 divss xmm0, xmm1 lea ecx, [r12+3] lea rdx, [r12-1] movq xmm1, rdx pshufd xmm1, xmm1, 44h ; 'D' shr ecx, 2 shl rcx, 4 pxor xmm1, xmm7 xor edx, edx movdqa xmm2, cs:xmmword_B5060 movdqa xmm3, cs:xmmword_B5050 loc_AFAF8: movdqa xmm4, xmm2 pxor xmm4, xmm7 movdqa xmm5, xmm4 pcmpgtd xmm5, xmm1 pcmpeqd xmm4, xmm1 pshufd xmm6, xmm4, 0F5h pand xmm6, xmm5 pshufd xmm4, xmm5, 0F5h por xmm4, xmm6 movd r9d, xmm4 not r9d test r9b, 1 jz short loc_AFB31 movss dword ptr [rax+rdx], xmm0 loc_AFB31: pxor xmm4, xmm8 pextrw r9d, xmm4, 4 test r9b, 1 jz short loc_AFB48 movss dword ptr [rax+rdx+4], xmm0 loc_AFB48: movdqa xmm4, xmm3 pxor xmm4, xmm7 movdqa xmm5, xmm4 pcmpgtd xmm5, xmm1 pcmpeqd xmm4, xmm1 pshufd xmm6, xmm4, 0F5h pand xmm6, xmm5 pshufd xmm4, xmm5, 0F5h por xmm4, xmm6 pxor xmm4, xmm8 pextrw r9d, xmm4, 0 test r9b, 1 jz short loc_AFB85 movss dword ptr [rax+rdx+8], xmm0 loc_AFB85: pextrw r9d, xmm4, 4 test r9b, 1 jz short loc_AFB97 movss dword ptr [rax+rdx+0Ch], xmm0 loc_AFB97: paddq xmm2, xmm9 paddq xmm3, xmm9 add rdx, 10h cmp rcx, rdx jnz loc_AFAF8 loc_AFBAE: movsxd rdx, dword ptr [rbx+8] test rdx, rdx mov [rsp+0C8h+var_B0], r8 jle short loc_AFC06 mov eax, edx imul eax, ebp movsxd rdi, eax shl rdi, 2 add rdi, [rbx] shl rdx, 2 xor esi, esi mov r13d, r10d call _memset mov r10d, r13d lea rsi, [rsp+0C8h+var_A8] lea rdi, [rsp+0C8h+var_98] movdqa xmm9, cs:xmmword_B6B90 pcmpeqd xmm8, xmm8 movdqa xmm7, cs:xmmword_B5070 mov r8, [rsp+0C8h+var_B0] mov r13, [rsp+0C8h+var_B8] loc_AFC06: test r12d, r12d jle loc_AFC93 xor r13d, r13d loc_AFC12: mov eax, [rbx+8] mov ecx, eax imul ecx, ebp movsxd rcx, ecx shl rcx, 2 add rcx, [rbx] mov [rsp+0C8h+var_98], rcx mov [rsp+0C8h+var_90], eax movsxd rax, dword ptr [r15+r13*4] movsxd rcx, dword ptr [r14+8] imul rax, rcx shl rax, 2 add rax, [r14] mov [rsp+0C8h+var_A8], rax mov [rsp+0C8h+var_A0], ecx mov rax, [rsp+0C8h+var_88] movss xmm0, dword ptr [rax+r13*4] call __ZN10OpenSubdiv6v3_6_03Tmr10StencilRowIfE13AddWithWeightERKS3_f; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(OpenSubdiv::v3_6_0::Tmr::StencilRow<float> const&,float) lea rsi, [rsp+0C8h+var_A8] lea rdi, [rsp+0C8h+var_98] inc r13 cmp r12, r13 jnz short loc_AFC12 mov rax, [rsp+0C8h+var_C0] mov r10d, [rax] mov r13, [rsp+0C8h+var_B8] mov r8, [rsp+0C8h+var_B0] movdqa xmm7, cs:xmmword_B5070 pcmpeqd xmm8, xmm8 movdqa xmm9, cs:xmmword_B6B90 loc_AFC93: inc r8 movsxd rax, r10d cmp r8, rax jl loc_AFA7A mov rdi, [rsp+0C8h+var_38]; void * loc_AFCAA: call __ZdlPv; operator delete(void *) loc_AFCAF: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>( long long a1, int a2, long long a3, long long a4) { long long v5; // r13 unsigned long long v7; // r15 void *v8; // rdi int v9; // r10d long long v10; // r8 __m128i si128; // xmm7 __m128i v12; // xmm8 __m128i v13; // xmm9 int v14; // ebp long long v15; // rax long long v16; // r15 long long v17; // r12 char *v18; // rax float v19; // xmm0_4 __m128i v20; // xmm1 long long v21; // rdx __m128i v22; // xmm2 __m128i v23; // xmm3 __m128i v24; // xmm4 __m128i v25; // xmm5 __m128i v26; // xmm4 __m128i v27; // xmm4 __m128i v28; // xmm5 __m128i v29; // xmm4 long long v30; // rdx int v31; // r13d long long i; // r13 int v33; // eax long long v34; // rcx long long v35; // [rsp+8h] [rbp-C0h] long long v36; // [rsp+10h] [rbp-B8h] long long v37; // [rsp+18h] [rbp-B0h] long long v38; // [rsp+20h] [rbp-A8h] BYREF int v39; // [rsp+28h] [rbp-A0h] long long v40; // [rsp+30h] [rbp-98h] BYREF int v41; // [rsp+38h] [rbp-90h] char *v42; // [rsp+40h] [rbp-88h] int v43; // [rsp+48h] [rbp-80h] int v44; // [rsp+4Ch] [rbp-7Ch] char v45; // [rsp+50h] [rbp-78h] BYREF void *v46; // [rsp+90h] [rbp-38h] v5 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 72LL) + 8LL * a2 - 8); if ( *(_DWORD *)(v5 + 52) ) { v35 = *(_QWORD *)(v5 + 8); v7 = *(unsigned int *)(v35 + 20); v42 = &v45; v43 = v7; v44 = 16; v46 = 0LL; if ( v7 < 0x11 ) { v8 = 0LL; } else { v8 = (void *)operator new(4 * v7); v46 = v8; v42 = (char *)v8; v44 = v7; } v9 = *(_DWORD *)v35; if ( *(int *)v35 > 0 ) { v10 = 0LL; si128 = _mm_load_si128((const __m128i *)&xmmword_B5070); v12 = (__m128i)-1LL; v13 = _mm_load_si128((const __m128i *)&xmmword_B6B90); v36 = v5; do { v14 = *(_DWORD *)(*(_QWORD *)(v5 + 168) + 4 * v10); if ( v14 != -1 ) { v15 = *(_QWORD *)(v35 + 24); v16 = *(_QWORD *)(v35 + 48) + 4LL * *(int *)(v15 + 8 * v10 + 4); v17 = *(int *)(v15 + 8 * v10); if ( v17 > 0 ) { v18 = v42; v19 = 1.0 / (float)(int)v17; v20 = _mm_xor_si128(_mm_shuffle_epi32((__m128i)(unsigned long long)(v17 - 1), 68), si128); v21 = 0LL; v22 = _mm_load_si128((const __m128i *)&xmmword_B5060); v23 = _mm_load_si128((const __m128i *)&xmmword_B5050); do { v24 = _mm_xor_si128(v22, si128); v25 = _mm_cmpgt_epi32(v24, v20); v26 = _mm_or_si128( _mm_shuffle_epi32(v25, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v24, v20), 245), v25)); if ( (~_mm_cvtsi128_si32(v26) & 1) != 0 ) *(float *)&v18[v21] = v19; if ( (_mm_extract_epi16(_mm_xor_si128(v26, v12), 4) & 1) != 0 ) *(float *)&v18[v21 + 4] = v19; v27 = _mm_xor_si128(v23, si128); v28 = _mm_cmpgt_epi32(v27, v20); v29 = _mm_xor_si128( _mm_or_si128( _mm_shuffle_epi32(v28, 245), _mm_and_si128(_mm_shuffle_epi32(_mm_cmpeq_epi32(v27, v20), 245), v28)), v12); if ( (_mm_extract_epi16(v29, 0) & 1) != 0 ) *(float *)&v18[v21 + 8] = v19; if ( (_mm_extract_epi16(v29, 4) & 1) != 0 ) *(float *)&v18[v21 + 12] = v19; v22 = _mm_add_epi64(v22, v13); v23 = _mm_add_epi64(v23, v13); v21 += 16LL; } while ( 16LL * ((unsigned int)(v17 + 3) >> 2) != v21 ); } v30 = *(int *)(a4 + 8); v37 = v10; if ( v30 > 0 ) { v31 = v9; memset(*(_QWORD *)a4 + 4LL * v14 * (int)v30, 0LL, 4 * v30); v9 = v31; v13 = _mm_load_si128((const __m128i *)&xmmword_B6B90); v12 = (__m128i)-1LL; si128 = _mm_load_si128((const __m128i *)&xmmword_B5070); v10 = v37; v5 = v36; } if ( (int)v17 > 0 ) { for ( i = 0LL; i != v17; ++i ) { v33 = *(_DWORD *)(a4 + 8); v40 = *(_QWORD *)a4 + 4LL * v14 * v33; v41 = v33; v34 = *(int *)(a3 + 8); v38 = *(_QWORD *)a3 + 4 * v34 * *(int *)(v16 + 4 * i); v39 = v34; OpenSubdiv::v3_6_0::Tmr::StencilRow<float>::AddWithWeight(&v40, &v38, *(float *)&v42[4 * i]); } v9 = *(_DWORD *)v35; v5 = v36; v10 = v37; si128 = _mm_load_si128((const __m128i *)&xmmword_B5070); v12 = (__m128i)-1LL; v13 = _mm_load_si128((const __m128i *)&xmmword_B6B90); } } ++v10; } while ( v10 < v9 ); v8 = v46; } operator delete(v8); } }
interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBX,RCX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x48] MOVSXD RCX,ESI MOV R13,qword ptr [RAX + RCX*0x8 + -0x8] CMP dword ptr [R13 + 0x34],0x0 JZ 0x001afcaf MOV R14,RDX MOV RAX,qword ptr [R13 + 0x8] MOV qword ptr [RSP + 0x8],RAX MOV R15D,dword ptr [RAX + 0x14] LEA RAX,[RSP + 0x50] MOV qword ptr [RAX + -0x10],RAX MOV dword ptr [RAX + -0x8],R15D MOV dword ptr [RAX + -0x4],0x10 MOV qword ptr [RAX + 0x40],0x0 CMP R15,0x11 JC 0x001afa3f MOV RDI,R15 SHL RDI,0x2 CALL 0x0013a210 MOV RDI,RAX MOV qword ptr [RSP + 0x90],RAX MOV qword ptr [RSP + 0x40],RAX MOV dword ptr [RSP + 0x4c],R15D JMP 0x001afa41 LAB_001afa3f: XOR EDI,EDI LAB_001afa41: MOV RAX,qword ptr [RSP + 0x8] MOV R10D,dword ptr [RAX] TEST R10D,R10D JLE 0x001afcaa XOR R8D,R8D MOVDQA XMM7,xmmword ptr [0x001b5070] PCMPEQD XMM8,XMM8 MOVDQA XMM9,xmmword ptr [0x001b6b90] LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x20] MOV qword ptr [RSP + 0x10],R13 LAB_001afa7a: MOV RAX,qword ptr [R13 + 0xa8] MOV EBP,dword ptr [RAX + R8*0x4] CMP EBP,-0x1 JZ 0x001afc93 MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RCX + 0x18] MOVSXD R15,dword ptr [RAX + R8*0x8 + 0x4] SHL R15,0x2 ADD R15,qword ptr [RCX + 0x30] MOVSXD R12,dword ptr [RAX + R8*0x8] TEST R12,R12 JLE 0x001afbae MOV RAX,qword ptr [RSP + 0x40] CVTSI2SS XMM1,R12D MOVSS XMM0,dword ptr [0x001b5000] DIVSS XMM0,XMM1 LEA ECX,[R12 + 0x3] LEA RDX,[R12 + -0x1] MOVQ XMM1,RDX PSHUFD XMM1,XMM1,0x44 SHR ECX,0x2 SHL RCX,0x4 PXOR XMM1,XMM7 XOR EDX,EDX MOVDQA XMM2,xmmword ptr [0x001b5060] MOVDQA XMM3,xmmword ptr [0x001b5050] LAB_001afaf8: MOVDQA XMM4,XMM2 PXOR XMM4,XMM7 MOVDQA XMM5,XMM4 PCMPGTD XMM5,XMM1 PCMPEQD XMM4,XMM1 PSHUFD XMM6,XMM4,0xf5 PAND XMM6,XMM5 PSHUFD XMM4,XMM5,0xf5 POR XMM4,XMM6 MOVD R9D,XMM4 NOT R9D TEST R9B,0x1 JZ 0x001afb31 MOVSS dword ptr [RAX + RDX*0x1],XMM0 LAB_001afb31: PXOR XMM4,XMM8 PEXTRW R9D,XMM4,0x4 TEST R9B,0x1 JZ 0x001afb48 MOVSS dword ptr [RAX + RDX*0x1 + 0x4],XMM0 LAB_001afb48: MOVDQA XMM4,XMM3 PXOR XMM4,XMM7 MOVDQA XMM5,XMM4 PCMPGTD XMM5,XMM1 PCMPEQD XMM4,XMM1 PSHUFD XMM6,XMM4,0xf5 PAND XMM6,XMM5 PSHUFD XMM4,XMM5,0xf5 POR XMM4,XMM6 PXOR XMM4,XMM8 PEXTRW R9D,XMM4,0x0 TEST R9B,0x1 JZ 0x001afb85 MOVSS dword ptr [RAX + RDX*0x1 + 0x8],XMM0 LAB_001afb85: PEXTRW R9D,XMM4,0x4 TEST R9B,0x1 JZ 0x001afb97 MOVSS dword ptr [RAX + RDX*0x1 + 0xc],XMM0 LAB_001afb97: PADDQ XMM2,XMM9 PADDQ XMM3,XMM9 ADD RDX,0x10 CMP RCX,RDX JNZ 0x001afaf8 LAB_001afbae: MOVSXD RDX,dword ptr [RBX + 0x8] TEST RDX,RDX MOV qword ptr [RSP + 0x18],R8 JLE 0x001afc06 MOV EAX,EDX IMUL EAX,EBP MOVSXD RDI,EAX SHL RDI,0x2 ADD RDI,qword ptr [RBX] SHL RDX,0x2 XOR ESI,ESI MOV R13D,R10D CALL 0x001391a0 MOV R10D,R13D LEA RSI,[RSP + 0x20] LEA RDI,[RSP + 0x30] MOVDQA XMM9,xmmword ptr [0x001b6b90] PCMPEQD XMM8,XMM8 MOVDQA XMM7,xmmword ptr [0x001b5070] MOV R8,qword ptr [RSP + 0x18] MOV R13,qword ptr [RSP + 0x10] LAB_001afc06: TEST R12D,R12D JLE 0x001afc93 XOR R13D,R13D LAB_001afc12: MOV EAX,dword ptr [RBX + 0x8] MOV ECX,EAX IMUL ECX,EBP MOVSXD RCX,ECX SHL RCX,0x2 ADD RCX,qword ptr [RBX] MOV qword ptr [RSP + 0x30],RCX MOV dword ptr [RSP + 0x38],EAX MOVSXD RAX,dword ptr [R15 + R13*0x4] MOVSXD RCX,dword ptr [R14 + 0x8] IMUL RAX,RCX SHL RAX,0x2 ADD RAX,qword ptr [R14] MOV qword ptr [RSP + 0x20],RAX MOV dword ptr [RSP + 0x28],ECX MOV RAX,qword ptr [RSP + 0x40] MOVSS XMM0,dword ptr [RAX + R13*0x4] CALL 0x0013c0b0 LEA RSI,[RSP + 0x20] LEA RDI,[RSP + 0x30] INC R13 CMP R12,R13 JNZ 0x001afc12 MOV RAX,qword ptr [RSP + 0x8] MOV R10D,dword ptr [RAX] MOV R13,qword ptr [RSP + 0x10] MOV R8,qword ptr [RSP + 0x18] MOVDQA XMM7,xmmword ptr [0x001b5070] PCMPEQD XMM8,XMM8 MOVDQA XMM9,xmmword ptr [0x001b6b90] LAB_001afc93: INC R8 MOVSXD RAX,R10D CMP R8,RAX JL 0x001afa7a MOV RDI,qword ptr [RSP + 0x90] LAB_001afcaa: CALL 0x0013a0a0 LAB_001afcaf: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* void OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>::interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>, OpenSubdiv::v3_6_0::Tmr::StencilRow<float> >(int, OpenSubdiv::v3_6_0::Tmr::StencilRow<float> const&, OpenSubdiv::v3_6_0::Tmr::StencilRow<float>&) const */ void __thiscall OpenSubdiv::v3_6_0::Far::PrimvarRefinerReal<float>:: interpFromFaces<(OpenSubdiv::v3_6_0::Sdc::SchemeType)0,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>,OpenSubdiv::v3_6_0::Tmr::StencilRow<float>> (PrimvarRefinerReal<float> *this,int param_1,StencilRow *param_2,StencilRow *param_3) { uint uVar1; int iVar2; int iVar3; int iVar4; long lVar5; int *piVar6; long lVar7; long lVar8; long lVar9; int iVar10; long lVar11; long lVar12; float fVar13; int iVar15; int1 auVar14 [16]; int1 auVar16 [16]; int1 auVar18 [16]; int1 auVar19 [16]; int iVar20; int1 auVar21 [16]; long lVar22; long local_a8; int local_a0; long local_98; int local_90; int1 *local_88; uint local_80; uint local_7c; int1 local_78 [64]; int1 *local_38; long lVar17; lVar5 = *(long *)(*(long *)(*(long *)this + 0x48) + -8 + (long)param_1 * 8); if (*(int *)(lVar5 + 0x34) != 0) { piVar6 = *(int **)(lVar5 + 8); uVar1 = piVar6[5]; local_88 = local_78; local_7c = 0x10; local_38 = (int1 *)0x0; local_80 = uVar1; if (0x10 < (ulong)uVar1) { local_88 = (int1 *)operator_new((ulong)uVar1 << 2); local_7c = uVar1; local_38 = local_88; } iVar10 = *piVar6; if (0 < iVar10) { lVar9 = 0; auVar21 = _DAT_001b5070; lVar12 = _DAT_001b6b90; lVar22 = _UNK_001b6b98; do { iVar2 = *(int *)(*(long *)(lVar5 + 0xa8) + lVar9 * 4); if (iVar2 != -1) { iVar3 = *(int *)(*(long *)(piVar6 + 6) + 4 + lVar9 * 8); lVar7 = *(long *)(piVar6 + 0xc); iVar4 = *(int *)(*(long *)(piVar6 + 6) + lVar9 * 8); lVar11 = (long)iVar4; if (0 < lVar11) { fVar13 = DAT_001b5000 / (float)iVar4; lVar8 = lVar11 + -1; auVar14._8_4_ = (int)lVar8; auVar14._0_8_ = lVar8; auVar14._12_4_ = (int)((ulong)lVar8 >> 0x20); auVar14 = auVar14 ^ auVar21; lVar8 = 0; auVar16 = _DAT_001b5060; auVar18 = _DAT_001b5050; do { auVar19 = auVar16 ^ auVar21; iVar15 = auVar14._4_4_; if ((bool)(~(auVar19._4_4_ == iVar15 && auVar14._0_4_ < auVar19._0_4_ || iVar15 < auVar19._4_4_) & 1)) { *(float *)(local_88 + lVar8) = fVar13; } if ((auVar19._12_4_ != auVar14._12_4_ || auVar19._8_4_ <= auVar14._8_4_) && auVar19._12_4_ <= auVar14._12_4_) { *(float *)(local_88 + lVar8 + 4) = fVar13; } iVar20 = SUB164(auVar18 ^ auVar21,4); if (iVar20 <= iVar15 && (iVar20 != iVar15 || SUB164(auVar18 ^ auVar21,0) <= auVar14._0_4_)) { *(float *)(local_88 + lVar8 + 8) = fVar13; *(float *)(local_88 + lVar8 + 0xc) = fVar13; } lVar17 = auVar16._8_8_; auVar16._0_8_ = auVar16._0_8_ + lVar12; auVar16._8_8_ = lVar17 + lVar22; lVar17 = auVar18._8_8_; auVar18._0_8_ = auVar18._0_8_ + lVar12; auVar18._8_8_ = lVar17 + lVar22; lVar8 = lVar8 + 0x10; } while ((ulong)(iVar4 + 3U >> 2) << 4 != lVar8); } iVar15 = *(int *)(param_3 + 8); if (0 < (long)iVar15) { memset((void *)((long)(iVar15 * iVar2) * 4 + *(long *)param_3),0,(long)iVar15 << 2); auVar21 = _DAT_001b5070; lVar12 = _DAT_001b6b90; lVar22 = _UNK_001b6b98; } if (0 < iVar4) { lVar12 = 0; do { local_90 = *(int *)(param_3 + 8); local_98 = (long)(local_90 * iVar2) * 4 + *(long *)param_3; local_a0 = *(int *)(param_2 + 8); local_a8 = (long)*(int *)((long)iVar3 * 4 + lVar7 + lVar12 * 4) * (long)local_a0 * 4 + *(long *)param_2; Tmr::StencilRow<float>::AddWithWeight ((StencilRow<float> *)&local_98,(StencilRow *)&local_a8, *(float *)(local_88 + lVar12 * 4)); lVar12 = lVar12 + 1; } while (lVar11 != lVar12); iVar10 = *piVar6; auVar21 = _DAT_001b5070; lVar12 = _DAT_001b6b90; lVar22 = _UNK_001b6b98; } } lVar9 = lVar9 + 1; } while (lVar9 < iVar10); } operator_delete(local_38); } return; }
39,746
JS_NewStringLen
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewStringLen(JSContext *ctx, const char *buf, size_t buf_len) { JSString *str; size_t len; int kind; if (buf_len <= 0) { return JS_AtomToString(ctx, JS_ATOM_empty_string); } /* Compute string kind and length: 7-bit, 8-bit, 16-bit, 16-bit UTF-16 */ kind = utf8_scan(buf, buf_len, &len); if (len > JS_STRING_LEN_MAX) return JS_ThrowRangeError(ctx, "invalid string length"); switch (kind) { case UTF8_PLAIN_ASCII: str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; break; case UTF8_NON_ASCII: /* buf contains non-ASCII code-points, but limited to 8-bit values */ str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; utf8_decode_buf8(str->u.str8, len + 1, buf, buf_len); break; default: // This causes a potential problem in JS_ThrowError if message is invalid //if (kind & UTF8_HAS_ERRORS) // return JS_ThrowRangeError(ctx, "invalid UTF-8 sequence"); str = js_alloc_string(ctx, len, 1); if (!str) return JS_EXCEPTION; utf8_decode_buf16(str->u.str16, len, buf, buf_len); break; } return JS_MKPTR(JS_TAG_STRING, str); }
O0
c
JS_NewStringLen: subq $0x48, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) cmpq $0x0, 0x20(%rsp) ja 0x282a9 movq 0x30(%rsp), %rdi movl $0x2f, %esi callq 0x29000 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) jmp 0x2842b movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi leaq 0x10(%rsp), %rdx callq 0x1ee90 movl %eax, 0xc(%rsp) cmpq $0x3fffffff, 0x10(%rsp) # imm = 0x3FFFFFFF jbe 0x282ee movq 0x30(%rsp), %rdi leaq 0xe56f6(%rip), %rsi # 0x10d9ce movb $0x0, %al callq 0x29670 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) jmp 0x2842b movl 0xc(%rsp), %eax movl %eax, 0x8(%rsp) testl %eax, %eax je 0x2830a jmp 0x282fc movl 0x8(%rsp), %eax subl $0x1, %eax je 0x2836c jmp 0x283c5 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rax movl %eax, %esi xorl %edx, %edx callq 0x29760 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x28340 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x2842b movq 0x18(%rsp), %rdi addq $0x18, %rdi movq 0x28(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0xe5b0 movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movb $0x0, 0x18(%rax,%rcx) jmp 0x28418 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rax movl %eax, %esi xorl %edx, %edx callq 0x29760 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x283a2 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x2842b movq 0x18(%rsp), %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi addq $0x1, %rsi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx callq 0x1f020 jmp 0x28418 movq 0x30(%rsp), %rdi movq 0x10(%rsp), %rax movl %eax, %esi movl $0x1, %edx callq 0x29760 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) jne 0x283fb movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x2842b movq 0x18(%rsp), %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x20(%rsp), %rcx callq 0x1f120 movq 0x18(%rsp), %rax movq %rax, 0x38(%rsp) movq $-0x7, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x48, %rsp retq nopw (%rax,%rax)
JS_NewStringLen: sub rsp, 48h mov [rsp+48h+var_18], rdi mov [rsp+48h+var_20], rsi mov [rsp+48h+var_28], rdx cmp [rsp+48h+var_28], 0 ja short loc_282A9 mov rdi, [rsp+48h+var_18] mov esi, 2Fh ; '/' call JS_AtomToString mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx jmp loc_2842B loc_282A9: mov rdi, [rsp+48h+var_20] mov rsi, [rsp+48h+var_28] lea rdx, [rsp+48h+var_38] call utf8_scan mov [rsp+48h+var_3C], eax cmp [rsp+48h+var_38], 3FFFFFFFh jbe short loc_282EE mov rdi, [rsp+48h+var_18] lea rsi, aInvalidStringL; "invalid string length" mov al, 0 call JS_ThrowRangeError mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], rdx jmp loc_2842B loc_282EE: mov eax, [rsp+48h+var_3C] mov [rsp+48h+var_40], eax test eax, eax jz short loc_2830A jmp short $+2 loc_282FC: mov eax, [rsp+48h+var_40] sub eax, 1 jz short loc_2836C jmp loc_283C5 loc_2830A: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_38] mov esi, eax xor edx, edx call js_alloc_string mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jnz short loc_28340 mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp loc_2842B loc_28340: mov rdi, [rsp+48h+var_30] add rdi, 18h mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_38] call _memcpy mov rax, [rsp+48h+var_30] mov rcx, [rsp+48h+var_38] mov byte ptr [rax+rcx+18h], 0 jmp loc_28418 loc_2836C: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_38] mov esi, eax xor edx, edx call js_alloc_string mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jnz short loc_283A2 mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp loc_2842B loc_283A2: mov rdi, [rsp+48h+var_30] add rdi, 18h mov rsi, [rsp+48h+var_38] add rsi, 1 mov rdx, [rsp+48h+var_20] mov rcx, [rsp+48h+var_28] call utf8_decode_buf8 jmp short loc_28418 loc_283C5: mov rdi, [rsp+48h+var_18] mov rax, [rsp+48h+var_38] mov esi, eax mov edx, 1 call js_alloc_string mov [rsp+48h+var_30], rax cmp [rsp+48h+var_30], 0 jnz short loc_283FB mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp short loc_2842B loc_283FB: mov rdi, [rsp+48h+var_30] add rdi, 18h mov rsi, [rsp+48h+var_38] mov rdx, [rsp+48h+var_20] mov rcx, [rsp+48h+var_28] call utf8_decode_buf16 loc_28418: mov rax, [rsp+48h+var_30] mov [rsp+48h+var_10], rax mov [rsp+48h+var_8], 0FFFFFFFFFFFFFFF9h loc_2842B: mov rax, [rsp+48h+var_10] mov rdx, [rsp+48h+var_8] add rsp, 48h retn
long long JS_NewStringLen(long long a1, unsigned __int8 *a2, unsigned __int8 *a3) { long long v3; // rdx int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rdx long long v9; // rax int v11; // [rsp+Ch] [rbp-3Ch] unsigned long long v12; // [rsp+10h] [rbp-38h] BYREF long long v13; // [rsp+18h] [rbp-30h] unsigned __int8 *v14; // [rsp+20h] [rbp-28h] unsigned __int8 *v15; // [rsp+28h] [rbp-20h] long long v16; // [rsp+30h] [rbp-18h] long long v17; // [rsp+38h] [rbp-10h] long long v18; // [rsp+40h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; if ( a3 ) { v11 = utf8_scan(v15, (unsigned long long)v14, &v12); if ( v12 <= 0x3FFFFFFF ) { if ( v11 ) { if ( v11 == 1 ) { v13 = js_alloc_string(v16, (unsigned int)v12, 0LL); if ( !v13 ) { LODWORD(v17) = 0; v18 = 6LL; return v17; } utf8_decode_buf8(v13 + 24, v12 + 1, v15, (long long)v14); } else { v9 = js_alloc_string(v16, (unsigned int)v12, 1LL); v13 = v9; if ( !v9 ) { LODWORD(v17) = 0; v18 = 6LL; return v17; } utf8_decode_buf16(v13 + 24, v12, v15, v14); } } else { v13 = js_alloc_string(v16, (unsigned int)v12, 0LL); if ( !v13 ) { LODWORD(v17) = 0; v18 = 6LL; return v17; } memcpy(v13 + 24, v15, v12); *(_BYTE *)(v13 + v12 + 24) = 0; } v17 = v13; v18 = -7LL; return v17; } v17 = JS_ThrowRangeError(v16, (unsigned int)"invalid string length", v4, v5, v6, v7); v18 = v8; } else { v17 = JS_AtomToString(v16, 47LL); v18 = v3; } return v17; }
JS_NewStringLen: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX CMP qword ptr [RSP + 0x20],0x0 JA 0x001282a9 MOV RDI,qword ptr [RSP + 0x30] MOV ESI,0x2f CALL 0x00129000 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX JMP 0x0012842b LAB_001282a9: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] LEA RDX,[RSP + 0x10] CALL 0x0011ee90 MOV dword ptr [RSP + 0xc],EAX CMP qword ptr [RSP + 0x10],0x3fffffff JBE 0x001282ee MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[0x20d9ce] MOV AL,0x0 CALL 0x00129670 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX JMP 0x0012842b LAB_001282ee: MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RSP + 0x8],EAX TEST EAX,EAX JZ 0x0012830a JMP 0x001282fc LAB_001282fc: MOV EAX,dword ptr [RSP + 0x8] SUB EAX,0x1 JZ 0x0012836c JMP 0x001283c5 LAB_0012830a: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x10] MOV ESI,EAX XOR EDX,EDX CALL 0x00129760 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x00128340 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0012842b LAB_00128340: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0010e5b0 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 JMP 0x00128418 LAB_0012836c: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x10] MOV ESI,EAX XOR EDX,EDX CALL 0x00129760 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x001283a2 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0012842b LAB_001283a2: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0x1 MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] CALL 0x0011f020 JMP 0x00128418 LAB_001283c5: MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x10] MOV ESI,EAX MOV EDX,0x1 CALL 0x00129760 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JNZ 0x001283fb MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0012842b LAB_001283fb: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] CALL 0x0011f120 LAB_00128418: MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],-0x7 LAB_0012842b: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
int1 [16] JS_NewStringLen(int8 param_1,void *param_2,long param_3) { int iVar1; int1 auVar2 [16]; ulong local_38; long local_30; long local_28; void *local_20; int8 local_18; int4 local_10; int4 uStack_c; int8 local_8; local_28 = param_3; local_20 = param_2; local_18 = param_1; if (param_3 == 0) { auVar2 = JS_AtomToString(param_1,0x2f); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } else { iVar1 = utf8_scan(param_2,param_3,&local_38); if (local_38 < 0x40000000) { if (iVar1 == 0) { local_30 = js_alloc_string(local_18,local_38 & 0xffffffff,0); if (local_30 == 0) { local_10 = 0; local_8 = 6; goto LAB_0012842b; } memcpy((void *)(local_30 + 0x18),local_20,local_38); *(int1 *)(local_30 + 0x18 + local_38) = 0; } else if (iVar1 == 1) { local_30 = js_alloc_string(local_18,local_38 & 0xffffffff,0); if (local_30 == 0) { local_10 = 0; local_8 = 6; goto LAB_0012842b; } utf8_decode_buf8(local_30 + 0x18,local_38 + 1,local_20,local_28); } else { local_30 = js_alloc_string(local_18,local_38 & 0xffffffff,1); if (local_30 == 0) { local_10 = 0; local_8 = 6; goto LAB_0012842b; } utf8_decode_buf16(local_30 + 0x18,local_38,local_20,local_28); } local_10 = (int4)local_30; uStack_c = (int4)((ulong)local_30 >> 0x20); local_8 = 0xfffffffffffffff9; } else { auVar2 = JS_ThrowRangeError(local_18,"invalid string length"); local_8 = auVar2._8_8_; local_10 = auVar2._0_4_; uStack_c = auVar2._4_4_; } } LAB_0012842b: auVar2._4_4_ = uStack_c; auVar2._0_4_ = local_10; auVar2._8_8_ = local_8; return auVar2; }
39,747
JS_NewStringLen
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewStringLen(JSContext *ctx, const char *buf, size_t buf_len) { JSString *str; size_t len; int kind; if (buf_len <= 0) { return JS_AtomToString(ctx, JS_ATOM_empty_string); } /* Compute string kind and length: 7-bit, 8-bit, 16-bit, 16-bit UTF-16 */ kind = utf8_scan(buf, buf_len, &len); if (len > JS_STRING_LEN_MAX) return JS_ThrowRangeError(ctx, "invalid string length"); switch (kind) { case UTF8_PLAIN_ASCII: str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; break; case UTF8_NON_ASCII: /* buf contains non-ASCII code-points, but limited to 8-bit values */ str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; utf8_decode_buf8(str->u.str8, len + 1, buf, buf_len); break; default: // This causes a potential problem in JS_ThrowError if message is invalid //if (kind & UTF8_HAS_ERRORS) // return JS_ThrowRangeError(ctx, "invalid UTF-8 sequence"); str = js_alloc_string(ctx, len, 1); if (!str) return JS_EXCEPTION; utf8_decode_buf16(str->u.str16, len, buf, buf_len); break; } return JS_MKPTR(JS_TAG_STRING, str); }
O1
c
JS_NewStringLen: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r15 testq %rdx, %rdx je 0x1ff5f movq %rdx, %r14 movq %rsi, %rbx leaq 0x10(%rsp), %r12 movq %rsi, %rdi movq %rdx, %rsi movq %r12, %rdx callq 0x1b872 movq (%r12), %rsi cmpq $0x40000000, %rsi # imm = 0x40000000 jb 0x1ff7a leaq 0x7ea27(%rip), %rsi # 0x9e96e movq %r15, %rdi xorl %eax, %eax callq 0x20add movq $0x0, 0x8(%rsp) jmp 0x20022 movq 0x18(%r15), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %rax incl (%rax) movq %rax, 0x8(%rsp) jmp 0x20011 movq %r15, %rdi cmpl $0x1, %eax je 0x1ffb8 testl %eax, %eax jne 0x1ffe3 xorl %edx, %edx callq 0x20b73 testq %rax, %rax je 0x2001a movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %r14 movq %rbx, %rsi movq %r14, %rdx callq 0xe5b0 movb $0x0, 0x18(%r15,%r14) jmp 0x2000c xorl %edx, %edx callq 0x20b73 testq %rax, %rax je 0x2001a movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi incq %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x1b927 jmp 0x2000c movl $0x1, %edx callq 0x20b73 testq %rax, %rax je 0x2001a movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x1b97d movq %r15, 0x8(%rsp) movq $-0x7, %rdx jmp 0x20027 movl $0x0, 0x8(%rsp) movl $0x6, %edx movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
JS_NewStringLen: push r15 push r14 push r12 push rbx sub rsp, 18h mov r15, rdi test rdx, rdx jz short loc_1FF5F mov r14, rdx mov rbx, rsi lea r12, [rsp+38h+var_28] mov rdi, rsi mov rsi, rdx mov rdx, r12 call utf8_scan mov rsi, [r12] cmp rsi, 40000000h jb short loc_1FF7A lea rsi, aInvalidStringL; "invalid string length" mov rdi, r15 xor eax, eax call JS_ThrowRangeError mov [rsp+38h+var_30], 0 jmp loc_20022 loc_1FF5F: mov rax, [r15+18h] mov rax, [rax+68h] mov rax, [rax+178h] inc dword ptr [rax] mov [rsp+38h+var_30], rax jmp loc_20011 loc_1FF7A: mov rdi, r15 cmp eax, 1 jz short loc_1FFB8 test eax, eax jnz short loc_1FFE3 xor edx, edx call js_alloc_string test rax, rax jz loc_2001A mov r15, rax mov rdi, rax add rdi, 18h mov r14, [rsp+38h+var_28] mov rsi, rbx mov rdx, r14 call _memcpy mov byte ptr [r15+r14+18h], 0 jmp short loc_2000C loc_1FFB8: xor edx, edx call js_alloc_string test rax, rax jz short loc_2001A mov r15, rax mov rdi, rax add rdi, 18h mov rsi, [rsp+38h+var_28] inc rsi mov rdx, rbx mov rcx, r14 call utf8_decode_buf8 jmp short loc_2000C loc_1FFE3: mov edx, 1 call js_alloc_string test rax, rax jz short loc_2001A mov r15, rax mov rdi, rax add rdi, 18h mov rsi, [rsp+38h+var_28] loc_20001: mov rdx, rbx mov rcx, r14 call utf8_decode_buf16 loc_2000C: mov [rsp+38h+var_30], r15 loc_20011: mov rdx, 0FFFFFFFFFFFFFFF9h jmp short loc_20027 loc_2001A: mov dword ptr [rsp+38h+var_30], 0 loc_20022: mov edx, 6 loc_20027: mov rax, [rsp+38h+var_30] add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
_DWORD * JS_NewStringLen(long long a1, char *a2, long long a3) { int v4; // eax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d _DWORD *v9; // rax long long v10; // rax long long v11; // r15 unsigned long long v12; // r14 long long v13; // rax long long v14; // rax long long v16; // [rsp+8h] [rbp-30h] unsigned long long v17[5]; // [rsp+10h] [rbp-28h] BYREF if ( !a3 ) { v9 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 104LL) + 376LL); ++*v9; return v9; } v4 = utf8_scan(a2, a3, (long long *)v17); if ( v17[0] < 0x40000000 ) { if ( v4 == 1 ) { v13 = js_alloc_string(a1, v17[0], 0LL); if ( v13 ) { v11 = v13; utf8_decode_buf8(v13 + 24, v17[0] + 1, a2, a3); return (_DWORD *)v11; } } else if ( v4 ) { v14 = js_alloc_string(a1, v17[0], 1LL); if ( v14 ) { v11 = v14; utf8_decode_buf16(v14 + 24, v17[0], a2, a3); return (_DWORD *)v11; } } else { v10 = js_alloc_string(a1, v17[0], 0LL); if ( v10 ) { v11 = v10; v12 = v17[0]; memcpy(v10 + 24, a2, v17[0]); *(_BYTE *)(v11 + v12 + 24) = 0; return (_DWORD *)v11; } } LODWORD(v16) = 0; return (_DWORD *)v16; } JS_ThrowRangeError(a1, (unsigned int)"invalid string length", v5, v6, v7, v8); return 0LL; }
JS_NewStringLen: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDI TEST RDX,RDX JZ 0x0011ff5f MOV R14,RDX MOV RBX,RSI LEA R12,[RSP + 0x10] MOV RDI,RSI MOV RSI,RDX MOV RDX,R12 CALL 0x0011b872 MOV RSI,qword ptr [R12] CMP RSI,0x40000000 JC 0x0011ff7a LEA RSI,[0x19e96e] MOV RDI,R15 XOR EAX,EAX CALL 0x00120add MOV qword ptr [RSP + 0x8],0x0 JMP 0x00120022 LAB_0011ff5f: MOV RAX,qword ptr [R15 + 0x18] MOV RAX,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RAX + 0x178] INC dword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX JMP 0x00120011 LAB_0011ff7a: MOV RDI,R15 CMP EAX,0x1 JZ 0x0011ffb8 TEST EAX,EAX JNZ 0x0011ffe3 XOR EDX,EDX CALL 0x00120b73 TEST RAX,RAX JZ 0x0012001a MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOV R14,qword ptr [RSP + 0x10] MOV RSI,RBX MOV RDX,R14 CALL 0x0010e5b0 MOV byte ptr [R15 + R14*0x1 + 0x18],0x0 JMP 0x0012000c LAB_0011ffb8: XOR EDX,EDX CALL 0x00120b73 TEST RAX,RAX JZ 0x0012001a MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] INC RSI MOV RDX,RBX MOV RCX,R14 CALL 0x0011b927 JMP 0x0012000c LAB_0011ffe3: MOV EDX,0x1 CALL 0x00120b73 TEST RAX,RAX JZ 0x0012001a MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBX MOV RCX,R14 CALL 0x0011b97d LAB_0012000c: MOV qword ptr [RSP + 0x8],R15 LAB_00120011: MOV RDX,-0x7 JMP 0x00120027 LAB_0012001a: MOV dword ptr [RSP + 0x8],0x0 LAB_00120022: MOV EDX,0x6 LAB_00120027: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] JS_NewStringLen(long param_1,void *param_2,long param_3) { int iVar1; int *piVar2; int8 uVar3; int1 auVar4 [16]; int *local_30; ulong local_28; if (param_3 == 0) { local_30 = *(int **)(*(long *)(*(long *)(param_1 + 0x18) + 0x68) + 0x178); *local_30 = *local_30 + 1; } else { iVar1 = utf8_scan(param_2,param_3,&local_28); if (0x3fffffff < local_28) { JS_ThrowRangeError(param_1,"invalid string length"); local_30 = (int *)0x0; LAB_00120022: uVar3 = 6; goto LAB_00120027; } if (iVar1 == 1) { piVar2 = (int *)js_alloc_string(param_1,local_28,0); if (piVar2 == (int *)0x0) goto LAB_0012001a; utf8_decode_buf8(piVar2 + 6,local_28 + 1,param_2,param_3); local_30 = piVar2; } else if (iVar1 == 0) { piVar2 = (int *)js_alloc_string(param_1,local_28,0); if (piVar2 == (int *)0x0) { LAB_0012001a: local_30 = (int *)((ulong)local_30 & 0xffffffff00000000); goto LAB_00120022; } memcpy(piVar2 + 6,param_2,local_28); *(int1 *)((long)piVar2 + local_28 + 0x18) = 0; local_30 = piVar2; } else { piVar2 = (int *)js_alloc_string(param_1,local_28,1); if (piVar2 == (int *)0x0) goto LAB_0012001a; utf8_decode_buf16(piVar2 + 6,local_28,param_2,param_3); local_30 = piVar2; } } uVar3 = 0xfffffffffffffff9; LAB_00120027: auVar4._8_8_ = uVar3; auVar4._0_8_ = local_30; return auVar4; }
39,748
JS_NewStringLen
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewStringLen(JSContext *ctx, const char *buf, size_t buf_len) { JSString *str; size_t len; int kind; if (buf_len <= 0) { return JS_AtomToString(ctx, JS_ATOM_empty_string); } /* Compute string kind and length: 7-bit, 8-bit, 16-bit, 16-bit UTF-16 */ kind = utf8_scan(buf, buf_len, &len); if (len > JS_STRING_LEN_MAX) return JS_ThrowRangeError(ctx, "invalid string length"); switch (kind) { case UTF8_PLAIN_ASCII: str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; break; case UTF8_NON_ASCII: /* buf contains non-ASCII code-points, but limited to 8-bit values */ str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; utf8_decode_buf8(str->u.str8, len + 1, buf, buf_len); break; default: // This causes a potential problem in JS_ThrowError if message is invalid //if (kind & UTF8_HAS_ERRORS) // return JS_ThrowRangeError(ctx, "invalid UTF-8 sequence"); str = js_alloc_string(ctx, len, 1); if (!str) return JS_EXCEPTION; utf8_decode_buf16(str->u.str16, len, buf, buf_len); break; } return JS_MKPTR(JS_TAG_STRING, str); }
O2
c
JS_NewStringLen: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r15 testq %rdx, %rdx je 0x1a33f movq %rdx, %r14 movq %rsi, %rbx leaq 0x10(%rsp), %r12 movq %rsi, %rdi movq %rdx, %rsi movq %r12, %rdx callq 0x160c9 movq (%r12), %rsi cmpq $0x40000000, %rsi # imm = 0x40000000 jb 0x1a354 leaq 0x6b594(%rip), %rsi # 0x858be movq %r15, %rdi xorl %eax, %eax callq 0x1acb3 andq $0x0, 0x8(%rsp) jmp 0x1a3f8 pushq $0x2f popq %rsi movq %r15, %rdi callq 0x1a990 movq %rax, 0x8(%rsp) jmp 0x1a3fb cmpl $0x1, %eax je 0x1a392 testl %eax, %eax jne 0x1a3c0 movq %r15, %rdi xorl %edx, %edx callq 0x1ad45 testq %rax, %rax je 0x1a3f3 movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %r14 movq %rbx, %rsi movq %r14, %rdx callq 0xe5c0 movb $0x0, 0x18(%r15,%r14) jmp 0x1a3ea movq %r15, %rdi xorl %edx, %edx callq 0x1ad45 testq %rax, %rax je 0x1a3f3 movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi incq %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x161a9 jmp 0x1a3ea pushq $0x1 popq %rdx movq %r15, %rdi callq 0x1ad45 testq %rax, %rax je 0x1a3f3 movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movq 0x10(%rsp), %rsi movq %rbx, %rdx movq %r14, %rcx callq 0x161f8 movq %r15, 0x8(%rsp) pushq $-0x7 jmp 0x1a3fa andl $0x0, 0x8(%rsp) pushq $0x6 popq %rdx movq 0x8(%rsp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
JS_NewStringLen: push r15 push r14 push r12 push rbx sub rsp, 18h mov r15, rdi test rdx, rdx jz short loc_1A33F mov r14, rdx mov rbx, rsi lea r12, [rsp+38h+var_28] mov rdi, rsi mov rsi, rdx mov rdx, r12 call utf8_scan mov rsi, [r12] cmp rsi, 40000000h jb short loc_1A354 lea rsi, aInvalidStringL; "invalid string length" mov rdi, r15 xor eax, eax call JS_ThrowRangeError and [rsp+38h+var_30], 0 jmp loc_1A3F8 loc_1A33F: push 2Fh ; '/' pop rsi mov rdi, r15 call JS_AtomToString mov [rsp+38h+var_30], rax jmp loc_1A3FB loc_1A354: cmp eax, 1 jz short loc_1A392 test eax, eax jnz short loc_1A3C0 mov rdi, r15 xor edx, edx call js_alloc_string test rax, rax jz loc_1A3F3 mov r15, rax mov rdi, rax add rdi, 18h mov r14, [rsp+38h+var_28] mov rsi, rbx mov rdx, r14 call _memcpy mov byte ptr [r15+r14+18h], 0 jmp short loc_1A3EA loc_1A392: mov rdi, r15 xor edx, edx call js_alloc_string test rax, rax jz short loc_1A3F3 mov r15, rax mov rdi, rax add rdi, 18h mov rsi, [rsp+38h+var_28] inc rsi mov rdx, rbx mov rcx, r14 call utf8_decode_buf8 jmp short loc_1A3EA loc_1A3C0: push 1 pop rdx mov rdi, r15 call js_alloc_string test rax, rax jz short loc_1A3F3 mov r15, rax mov rdi, rax add rdi, 18h mov rsi, [rsp+38h+var_28] mov rdx, rbx mov rcx, r14 call utf8_decode_buf16 loc_1A3EA: mov [rsp+38h+var_30], r15 push 0FFFFFFFFFFFFFFF9h jmp short loc_1A3FA loc_1A3F3: and dword ptr [rsp+38h+var_30], 0 loc_1A3F8: push 6 loc_1A3FA: pop rdx loc_1A3FB: mov rax, [rsp+38h+var_30] add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn
long long JS_NewStringLen(long long a1, char *a2, long long a3) { int v4; // eax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long v9; // rax long long v10; // r15 unsigned long long v11; // r14 long long v12; // rax long long v13; // rax long long v15; // [rsp+8h] [rbp-30h] unsigned long long v16[5]; // [rsp+10h] [rbp-28h] BYREF if ( !a3 ) return JS_AtomToString(a1, 47LL); v4 = utf8_scan(a2, a3, v16); if ( v16[0] < 0x40000000 ) { if ( v4 == 1 ) { v12 = js_alloc_string(a1, v16[0], 0LL); if ( v12 ) { v10 = v12; utf8_decode_buf8(v12 + 24, v16[0] + 1, a2, a3); return v10; } } else if ( v4 ) { v13 = js_alloc_string(a1, v16[0], 1LL); if ( v13 ) { v10 = v13; utf8_decode_buf16(v13 + 24, v16[0], a2, a3); return v10; } } else { v9 = js_alloc_string(a1, v16[0], 0LL); if ( v9 ) { v10 = v9; v11 = v16[0]; memcpy(v9 + 24, a2, v16[0]); *(_BYTE *)(v10 + v11 + 24) = 0; return v10; } } LODWORD(v15) = 0; return v15; } JS_ThrowRangeError(a1, (unsigned int)"invalid string length", v5, v6, v7, v8); return 0LL; }
JS_NewStringLen: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RDI TEST RDX,RDX JZ 0x0011a33f MOV R14,RDX MOV RBX,RSI LEA R12,[RSP + 0x10] MOV RDI,RSI MOV RSI,RDX MOV RDX,R12 CALL 0x001160c9 MOV RSI,qword ptr [R12] CMP RSI,0x40000000 JC 0x0011a354 LEA RSI,[0x1858be] MOV RDI,R15 XOR EAX,EAX CALL 0x0011acb3 AND qword ptr [RSP + 0x8],0x0 JMP 0x0011a3f8 LAB_0011a33f: PUSH 0x2f POP RSI MOV RDI,R15 CALL 0x0011a990 MOV qword ptr [RSP + 0x8],RAX JMP 0x0011a3fb LAB_0011a354: CMP EAX,0x1 JZ 0x0011a392 TEST EAX,EAX JNZ 0x0011a3c0 MOV RDI,R15 XOR EDX,EDX CALL 0x0011ad45 TEST RAX,RAX JZ 0x0011a3f3 MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOV R14,qword ptr [RSP + 0x10] MOV RSI,RBX MOV RDX,R14 CALL 0x0010e5c0 MOV byte ptr [R15 + R14*0x1 + 0x18],0x0 JMP 0x0011a3ea LAB_0011a392: MOV RDI,R15 XOR EDX,EDX CALL 0x0011ad45 TEST RAX,RAX JZ 0x0011a3f3 MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] INC RSI MOV RDX,RBX MOV RCX,R14 CALL 0x001161a9 JMP 0x0011a3ea LAB_0011a3c0: PUSH 0x1 POP RDX MOV RDI,R15 CALL 0x0011ad45 TEST RAX,RAX JZ 0x0011a3f3 MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBX MOV RCX,R14 CALL 0x001161f8 LAB_0011a3ea: MOV qword ptr [RSP + 0x8],R15 PUSH -0x7 JMP 0x0011a3fa LAB_0011a3f3: AND dword ptr [RSP + 0x8],0x0 LAB_0011a3f8: PUSH 0x6 LAB_0011a3fa: POP RDX LAB_0011a3fb: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
ulong JS_NewStringLen(int8 param_1,void *param_2,long param_3) { int iVar1; ulong uVar2; ulong local_30; ulong local_28; if (param_3 == 0) { local_30 = JS_AtomToString(param_1,0x2f); } else { iVar1 = utf8_scan(param_2,param_3,&local_28); if (local_28 < 0x40000000) { if (iVar1 == 1) { uVar2 = js_alloc_string(param_1,local_28,0); if (uVar2 != 0) { utf8_decode_buf8(uVar2 + 0x18,local_28 + 1,param_2,param_3); return uVar2; } } else if (iVar1 == 0) { uVar2 = js_alloc_string(param_1,local_28,0); if (uVar2 != 0) { memcpy((void *)(uVar2 + 0x18),param_2,local_28); *(int1 *)(uVar2 + 0x18 + local_28) = 0; return uVar2; } } else { uVar2 = js_alloc_string(param_1,local_28,1); if (uVar2 != 0) { utf8_decode_buf16(uVar2 + 0x18,local_28,param_2,param_3); return uVar2; } } local_30 = local_30 & 0xffffffff00000000; } else { JS_ThrowRangeError(param_1,"invalid string length"); local_30 = 0; } } return local_30; }
39,749
psi_rwlock_tryrdlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_tryrdlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait) (&state, that->m_psi, PSI_RWLOCK_TRYREADLOCK, file, line); int result= rw_tryrdlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); return result; }
O3
c
psi_rwlock_tryrdlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x356360(%rip), %r15 # 0x385010 movq (%r15), %rax movq 0x90(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x2 popq %rdx callq *0x1a0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0xa3cc6 movl %eax, %r14d testq %rbx, %rbx je 0x2ece9 movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1a8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_rwlock_tryrdlock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+90h] lea rdi, [rbp+var_48] push 2 pop rdx call qword ptr [rax+1A0h] mov rbx, rax mov rdi, r14 call my_rw_tryrdlock mov r14d, eax test rbx, rbx jz short loc_2ECE9 mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1A8h] loc_2ECE9: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_rwlock_tryrdlock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[52])( v6, *(_QWORD *)(a1 + 144), 2LL, a2, a3); v4 = my_rw_tryrdlock(a1); if ( v3 ) ((void ( *)(long long, _QWORD))PSI_server[53])(v3, v4); return v4; }
psi_rwlock_tryrdlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x485010] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x90] LEA RDI,[RBP + -0x48] PUSH 0x2 POP RDX CALL qword ptr [RAX + 0x1a0] MOV RBX,RAX MOV RDI,R14 CALL 0x001a3cc6 MOV R14D,EAX TEST RBX,RBX JZ 0x0012ece9 MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1a8] LAB_0012ece9: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_rwlock_tryrdlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1a0)) (local_50,*(int8 *)(param_1 + 0x90),2,param_2,param_3); uVar1 = my_rw_tryrdlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1a8))(lVar2,uVar1); } return uVar1; }
39,750
mysql_stmt_store_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_store_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_store_result, (parms->stmt), parms->stmt->mysql, int, r_int) }
O3
c
mysql_stmt_store_result_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x38(%rdi), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rbx callq 0x2426e movl %eax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_stmt_store_result_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+38h] mov rax, [rax+480h] mov rbx, [rax+28h] call mysql_stmt_store_result mov [rbx+8], eax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_stmt_store_result_start_internal(long long *a1) { long long v1; // rdi _DWORD *v2; // rbx long long result; // rax v1 = *a1; v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v1 + 56) + 1152LL) + 40LL); result = mysql_stmt_store_result(v1); v2[2] = result; *v2 = 0; return result; }
mysql_stmt_store_result_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x0012426e MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_stmt_store_result_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_store_result(); puVar1[2] = uVar2; *puVar1 = 0; return; }
39,751
my_hash_sort_utf8mb4_nopad
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb4_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0) { my_tosort_unicode(uni_plane, &wc, cs->state); MY_HASH_ADD_16(m1, m2, (uint) (wc & 0xFFFF)); if (wc > 0xFFFF) { /* Put the highest byte only if it is non-zero, to make hash functions for utf8mb3 and utf8mb4 compatible for BMP characters. This is useful to keep order of records in test results, e.g. for "SHOW GRANTS". */ MY_HASH_ADD(m1, m2, (uint) ((wc >> 16) & 0xFF)); } s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf8mb4_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x648a0 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0x6991a movq -0x48(%rbp), %rdi movq -0x8(%rbp), %rax movl 0xc(%rax), %edx leaq -0x30(%rbp), %rsi callq 0x64fc0 jmp 0x69831 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF andl $0xff, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x69875 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF shrl $0x8, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x698b6 cmpq $0xffff, -0x30(%rbp) # imm = 0xFFFF jbe 0x69904 jmp 0x698c2 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x10, %rcx andq $0xff, %rcx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x69904 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x697fa movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf8mb4_nopad: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_697FA: mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4 mov [rbp+var_34], eax cmp eax, 0 jle loc_6991A mov rdi, [rbp+var_48] mov rax, [rbp+var_8] mov edx, [rax+0Ch] lea rsi, [rbp+var_30] call my_tosort_unicode jmp short $+2 loc_69831: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh and ecx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_69875: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh shr ecx, 8 mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_698B6: cmp [rbp+var_30], 0FFFFh jbe short loc_69904 jmp short $+2 loc_698C2: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 10h and rcx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_69904: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_697FA loc_6991A: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_utf8mb4_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax long long v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+10h] [rbp-50h] long long v10; // [rsp+10h] [rbp-50h] _QWORD *v11; // [rsp+18h] [rbp-48h] long long v12; // [rsp+20h] [rbp-40h] int v13; // [rsp+2Ch] [rbp-34h] unsigned long long v14; // [rsp+30h] [rbp-30h] BYREF _QWORD *v15; // [rsp+38h] [rbp-28h] long long *v16; // [rsp+40h] [rbp-20h] long long v17; // [rsp+48h] [rbp-18h] long long v18; // [rsp+50h] [rbp-10h] long long v19; // [rsp+58h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v12 = a3 + a2; v11 = *(_QWORD **)(a1 + 120); v9 = *a4; v7 = *a5; while ( 1 ) { v13 = my_mb_wc_utf8mb4(v19, (long long)&v14, v18, v12, (long long)a5, a6); if ( v13 <= 0 ) break; my_tosort_unicode(v11, &v14, *(_DWORD *)(v19 + 12)); v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v14 * (v7 + (v9 & 0x3F))); v8 = v7 + 3; v9 = v10 ^ ((v10 << 8) + BYTE1(v14) * (v8 + (v10 & 0x3F))); v7 = v8 + 3; if ( v14 > 0xFFFF ) { v9 ^= (v9 << 8) + BYTE2(v14) * (v7 + (v9 & 0x3F)); v7 += 3LL; } v18 += v13; } *v16 = v9; result = v15; *v15 = v7; return result; }
my_hash_sort_utf8mb4_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_001697fa: MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x001648a0 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x0016991a MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xc] LEA RSI,[RBP + -0x30] CALL 0x00164fc0 JMP 0x00169831 LAB_00169831: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff AND ECX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00169875 LAB_00169875: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff SHR ECX,0x8 MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x001698b6 LAB_001698b6: CMP qword ptr [RBP + -0x30],0xffff JBE 0x00169904 JMP 0x001698c2 LAB_001698c2: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x10 AND RCX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x00169904 LAB_00169904: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001697fa LAB_0016991a: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_utf8mb4_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; long lVar2; int iVar3; long local_60; ulong local_58; ulong local_38; long *local_30; ulong *local_28; long local_20; long local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { iVar3 = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3); if (iVar3 < 1) break; my_tosort_unicode(uVar1,&local_38,*(int4 *)(local_10 + 0xc)); local_58 = ((local_58 & 0x3f) + local_60) * (ulong)((uint)local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)(((uint)local_38 & 0xffff) >> 8) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 6; if (0xffff < local_38) { local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 0x10) & 0xff) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 9; } local_60 = lVar2; local_18 = local_18 + iVar3; } *local_28 = local_58; *local_30 = local_60; return; }
39,752
string_buffer_end
bluesky950520[P]quickjs/quickjs.c
static JSValue string_buffer_end(StringBuffer *s) { JSString *str; str = s->str; if (s->error_status) return JS_EXCEPTION; if (s->len == 0) { js_free(s->ctx, str); s->str = NULL; return JS_AtomToString(s->ctx, JS_ATOM_empty_string); } if (s->len < s->size) { /* smaller size so js_realloc should not fail, but OK if it does */ /* XXX: should add some slack to avoid unnecessary calls */ /* XXX: might need to use malloc+free to ensure smaller size */ str = js_realloc_rt(s->ctx->rt, str, sizeof(JSString) + (s->len << s->is_wide_char) + 1 - s->is_wide_char); if (str == NULL) str = s->str; s->str = str; } if (!s->is_wide_char) str->u.str8[s->len] = 0; #ifdef DUMP_LEAKS list_add_tail(&str->link, &s->ctx->rt->string_list); #endif str->is_wide_char = s->is_wide_char; str->len = s->len; s->str = NULL; return JS_MKPTR(JS_TAG_STRING, str); }
O1
c
string_buffer_end: pushq %rbx subq $0x10, %rsp cmpl $0x0, 0x1c(%rdi) je 0x33461 movl $0x0, 0x8(%rsp) movl $0x6, %edx jmp 0x33523 movq %rdi, %rbx movq 0x8(%rdi), %rsi movl 0x10(%rdi), %eax testl %eax, %eax je 0x334f3 cmpl 0x14(%rbx), %eax jge 0x334a4 movq (%rbx), %rdx movslq 0x18(%rbx), %rcx shll %cl, %eax movq 0x18(%rdx), %rdi movslq %eax, %rdx subq %rcx, %rdx addq $0x19, %rdx callq 0x1cac2 movq %rax, %rsi testq %rax, %rax jne 0x334a0 movq 0x8(%rbx), %rsi movq %rsi, 0x8(%rbx) cmpl $0x0, 0x18(%rbx) jne 0x334b3 movslq 0x10(%rbx), %rax movb $0x0, 0x18(%rsi,%rax) movl 0x18(%rbx), %eax shll $0x1f, %eax movabsq $-0x80000001, %rcx # imm = 0xFFFFFFFF7FFFFFFF andq 0x4(%rsi), %rcx orq %rax, %rcx movq %rcx, 0x4(%rsi) movl 0x10(%rbx), %eax andl $0x7fffffff, %eax # imm = 0x7FFFFFFF andq $-0x80000000, %rcx # imm = 0x80000000 orq %rax, %rcx movq %rcx, 0x4(%rsi) movq $0x0, 0x8(%rbx) movq %rsi, 0x8(%rsp) jmp 0x3351c movq (%rbx), %rdi callq 0x1cb99 movq $0x0, 0x8(%rbx) movq (%rbx), %rax movq 0x18(%rax), %rax movq 0x68(%rax), %rax movq 0x178(%rax), %rax incl (%rax) movq %rax, 0x8(%rsp) movq $-0x7, %rdx movq 0x8(%rsp), %rax addq $0x10, %rsp popq %rbx retq
string_buffer_end: push rbx sub rsp, 10h cmp dword ptr [rdi+1Ch], 0 jz short loc_33461 mov dword ptr [rsp+18h+var_10], 0 mov edx, 6 jmp loc_33523 loc_33461: mov rbx, rdi mov rsi, [rdi+8] mov eax, [rdi+10h] test eax, eax jz loc_334F3 cmp eax, [rbx+14h] jge short loc_334A4 mov rdx, [rbx] movsxd rcx, dword ptr [rbx+18h] shl eax, cl mov rdi, [rdx+18h] movsxd rdx, eax sub rdx, rcx add rdx, 19h call js_realloc_rt mov rsi, rax test rax, rax jnz short loc_334A0 mov rsi, [rbx+8] loc_334A0: mov [rbx+8], rsi loc_334A4: cmp dword ptr [rbx+18h], 0 jnz short loc_334B3 movsxd rax, dword ptr [rbx+10h] mov byte ptr [rsi+rax+18h], 0 loc_334B3: mov eax, [rbx+18h] shl eax, 1Fh mov rcx, 0FFFFFFFF7FFFFFFFh and rcx, [rsi+4] or rcx, rax mov [rsi+4], rcx mov eax, [rbx+10h] and eax, 7FFFFFFFh and rcx, 0FFFFFFFF80000000h or rcx, rax mov [rsi+4], rcx mov qword ptr [rbx+8], 0 mov [rsp+18h+var_10], rsi jmp short loc_3351C loc_334F3: mov rdi, [rbx] call js_free mov qword ptr [rbx+8], 0 mov rax, [rbx] mov rax, [rax+18h] mov rax, [rax+68h] mov rax, [rax+178h] inc dword ptr [rax] mov [rsp+18h+var_10], rax loc_3351C: mov rdx, 0FFFFFFFFFFFFFFF9h loc_33523: mov rax, [rsp+18h+var_10] add rsp, 10h pop rbx retn
_DWORD * string_buffer_end(long long a1) { long long v1; // rsi int v2; // eax unsigned long long v3; // rcx _DWORD *v4; // rax long long v6; // [rsp+8h] [rbp-10h] if ( *(_DWORD *)(a1 + 28) ) { LODWORD(v6) = 0; } else { v1 = *(_QWORD *)(a1 + 8); v2 = *(_DWORD *)(a1 + 16); if ( v2 ) { if ( v2 < *(_DWORD *)(a1 + 20) ) { v1 = js_realloc_rt( *(_QWORD *)(*(_QWORD *)a1 + 24LL), v1, (v2 << *(_DWORD *)(a1 + 24)) - (long long)*(int *)(a1 + 24) + 25); if ( !v1 ) v1 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 8) = v1; } if ( !*(_DWORD *)(a1 + 24) ) *(_BYTE *)(v1 + *(int *)(a1 + 16) + 24) = 0; v3 = (unsigned int)(*(_DWORD *)(a1 + 24) << 31) | *(_QWORD *)(v1 + 4) & 0xFFFFFFFF7FFFFFFFLL; *(_QWORD *)(v1 + 4) = v3; *(_QWORD *)(v1 + 4) = *(_DWORD *)(a1 + 16) & 0x7FFFFFFF | v3 & 0xFFFFFFFF80000000LL; *(_QWORD *)(a1 + 8) = 0LL; return (_DWORD *)v1; } else { js_free(*(_QWORD *)a1, v1); *(_QWORD *)(a1 + 8) = 0LL; v4 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 24LL) + 104LL) + 376LL); ++*v4; return v4; } } return (_DWORD *)v6; }
39,753
string_buffer_end
bluesky950520[P]quickjs/quickjs.c
static JSValue string_buffer_end(StringBuffer *s) { JSString *str; str = s->str; if (s->error_status) return JS_EXCEPTION; if (s->len == 0) { js_free(s->ctx, str); s->str = NULL; return JS_AtomToString(s->ctx, JS_ATOM_empty_string); } if (s->len < s->size) { /* smaller size so js_realloc should not fail, but OK if it does */ /* XXX: should add some slack to avoid unnecessary calls */ /* XXX: might need to use malloc+free to ensure smaller size */ str = js_realloc_rt(s->ctx->rt, str, sizeof(JSString) + (s->len << s->is_wide_char) + 1 - s->is_wide_char); if (str == NULL) str = s->str; s->str = str; } if (!s->is_wide_char) str->u.str8[s->len] = 0; #ifdef DUMP_LEAKS list_add_tail(&str->link, &s->ctx->rt->string_list); #endif str->is_wide_char = s->is_wide_char; str->len = s->len; s->str = NULL; return JS_MKPTR(JS_TAG_STRING, str); }
O2
c
string_buffer_end: cmpl $0x0, 0x1c(%rdi) je 0x2cae0 pushq $0x6 popq %rdx xorl %eax, %eax retq pushq %rbx movq %rdi, %rbx movq 0x8(%rdi), %rax movl 0x10(%rdi), %edx testl %edx, %edx je 0x2cb6c cmpl 0x14(%rbx), %edx jge 0x2cb20 movq (%rbx), %rsi movslq 0x18(%rbx), %rcx shll %cl, %edx movq 0x18(%rsi), %rdi movslq %edx, %rdx subq %rcx, %rdx addq $0x19, %rdx movq %rax, %rsi callq 0x17109 testq %rax, %rax jne 0x2cb1c movq 0x8(%rbx), %rax movq %rax, 0x8(%rbx) movl 0x18(%rbx), %ecx testl %ecx, %ecx jne 0x2cb33 movslq 0x10(%rbx), %rcx movb $0x0, 0x18(%rax,%rcx) movl 0x18(%rbx), %ecx movabsq $-0x80000001, %rdx # imm = 0xFFFFFFFF7FFFFFFF andq 0x4(%rax), %rdx shll $0x1f, %ecx orq %rcx, %rdx movq %rdx, 0x4(%rax) movl 0x10(%rbx), %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF andq $-0x80000000, %rdx # imm = 0x80000000 orq %rcx, %rdx movq %rdx, 0x4(%rax) andq $0x0, 0x8(%rbx) pushq $-0x7 popq %rdx jmp 0x2cb87 movq (%rbx), %rdi movq %rax, %rsi callq 0x1726e andq $0x0, 0x8(%rbx) movq (%rbx), %rdi pushq $0x2f popq %rsi callq 0x1a990 popq %rbx retq
string_buffer_end: cmp dword ptr [rdi+1Ch], 0 jz short loc_2CAE0 push 6 pop rdx xor eax, eax retn loc_2CAE0: push rbx mov rbx, rdi mov rax, [rdi+8] mov edx, [rdi+10h] test edx, edx jz short loc_2CB6C cmp edx, [rbx+14h] jge short loc_2CB20 mov rsi, [rbx] movsxd rcx, dword ptr [rbx+18h] shl edx, cl mov rdi, [rsi+18h] movsxd rdx, edx sub rdx, rcx add rdx, 19h mov rsi, rax call js_realloc_rt test rax, rax jnz short loc_2CB1C mov rax, [rbx+8] loc_2CB1C: mov [rbx+8], rax loc_2CB20: mov ecx, [rbx+18h] test ecx, ecx jnz short loc_2CB33 movsxd rcx, dword ptr [rbx+10h] mov byte ptr [rax+rcx+18h], 0 mov ecx, [rbx+18h] loc_2CB33: mov rdx, 0FFFFFFFF7FFFFFFFh and rdx, [rax+4] shl ecx, 1Fh or rdx, rcx mov [rax+4], rdx mov ecx, [rbx+10h] and ecx, 7FFFFFFFh and rdx, 0FFFFFFFF80000000h or rdx, rcx mov [rax+4], rdx and qword ptr [rbx+8], 0 push 0FFFFFFFFFFFFFFF9h pop rdx jmp short loc_2CB87 loc_2CB6C: mov rdi, [rbx] mov rsi, rax call js_free and qword ptr [rbx+8], 0 mov rdi, [rbx] push 2Fh ; '/' pop rsi call JS_AtomToString loc_2CB87: pop rbx retn
long long string_buffer_end(long long *a1) { long long result; // rax int v2; // edx int v3; // ecx unsigned long long v4; // rdx if ( *((_DWORD *)a1 + 7) ) return 0LL; result = a1[1]; v2 = *((_DWORD *)a1 + 4); if ( v2 ) { if ( v2 < *((_DWORD *)a1 + 5) ) { result = js_realloc_rt( *(_QWORD *)(*a1 + 24), result, (v2 << *((_DWORD *)a1 + 6)) - (long long)*((int *)a1 + 6) + 25); if ( !result ) result = a1[1]; a1[1] = result; } v3 = *((_DWORD *)a1 + 6); if ( !v3 ) { *(_BYTE *)(result + *((int *)a1 + 4) + 24) = 0; v3 = *((_DWORD *)a1 + 6); } v4 = (unsigned int)(v3 << 31) | *(_QWORD *)(result + 4) & 0xFFFFFFFF7FFFFFFFLL; *(_QWORD *)(result + 4) = v4; *(_QWORD *)(result + 4) = a1[2] & 0x7FFFFFFF | v4 & 0xFFFFFFFF80000000LL; a1[1] = 0LL; } else { js_free(*a1, result); a1[1] = 0LL; return JS_AtomToString(*a1, 47); } return result; }
string_buffer_end: CMP dword ptr [RDI + 0x1c],0x0 JZ 0x0012cae0 PUSH 0x6 POP RDX XOR EAX,EAX RET LAB_0012cae0: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x8] MOV EDX,dword ptr [RDI + 0x10] TEST EDX,EDX JZ 0x0012cb6c CMP EDX,dword ptr [RBX + 0x14] JGE 0x0012cb20 MOV RSI,qword ptr [RBX] MOVSXD RCX,dword ptr [RBX + 0x18] SHL EDX,CL MOV RDI,qword ptr [RSI + 0x18] MOVSXD RDX,EDX SUB RDX,RCX ADD RDX,0x19 MOV RSI,RAX CALL 0x00117109 TEST RAX,RAX JNZ 0x0012cb1c MOV RAX,qword ptr [RBX + 0x8] LAB_0012cb1c: MOV qword ptr [RBX + 0x8],RAX LAB_0012cb20: MOV ECX,dword ptr [RBX + 0x18] TEST ECX,ECX JNZ 0x0012cb33 MOVSXD RCX,dword ptr [RBX + 0x10] MOV byte ptr [RAX + RCX*0x1 + 0x18],0x0 MOV ECX,dword ptr [RBX + 0x18] LAB_0012cb33: MOV RDX,-0x80000001 AND RDX,qword ptr [RAX + 0x4] SHL ECX,0x1f OR RDX,RCX MOV qword ptr [RAX + 0x4],RDX MOV ECX,dword ptr [RBX + 0x10] AND ECX,0x7fffffff AND RDX,-0x80000000 OR RDX,RCX MOV qword ptr [RAX + 0x4],RDX AND qword ptr [RBX + 0x8],0x0 PUSH -0x7 POP RDX JMP 0x0012cb87 LAB_0012cb6c: MOV RDI,qword ptr [RBX] MOV RSI,RAX CALL 0x0011726e AND qword ptr [RBX + 0x8],0x0 MOV RDI,qword ptr [RBX] PUSH 0x2f POP RSI CALL 0x0011a990 LAB_0012cb87: POP RBX RET
int1 [16] string_buffer_end(long *param_1) { ulong uVar1; long lVar2; int iVar3; int1 auVar4 [16]; if (*(int *)((long)param_1 + 0x1c) != 0) { return ZEXT816(6) << 0x40; } lVar2 = param_1[1]; iVar3 = (int)param_1[2]; if (iVar3 == 0) { js_free(*param_1,lVar2); param_1[1] = 0; auVar4 = JS_AtomToString(*param_1,0x2f); } else { if (iVar3 < *(int *)((long)param_1 + 0x14)) { lVar2 = js_realloc_rt(*(int8 *)(*param_1 + 0x18),lVar2, ((long)(iVar3 << ((byte)(int)param_1[3] & 0x1f)) - (long)(int)param_1[3] ) + 0x19); if (lVar2 == 0) { lVar2 = param_1[1]; } param_1[1] = lVar2; } iVar3 = (int)param_1[3]; if (iVar3 == 0) { *(int1 *)(lVar2 + 0x18 + (long)(int)param_1[2]) = 0; iVar3 = (int)param_1[3]; } uVar1 = *(ulong *)(lVar2 + 4); *(ulong *)(lVar2 + 4) = uVar1 & 0xffffffff7fffffff | (ulong)(uint)(iVar3 << 0x1f); *(ulong *)(lVar2 + 4) = uVar1 & 0xffffffff00000000 | (ulong)(uint)(iVar3 << 0x1f) | (ulong)(*(uint *)(param_1 + 2) & 0x7fffffff); param_1[1] = 0; auVar4._8_8_ = 0xfffffffffffffff9; auVar4._0_8_ = lVar2; } return auVar4; }
39,754
blst_p2_on_curve
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e2.c
int blst_p2_on_curve(const POINTonE2 *p) { return (int)POINTonE2_on_curve(p); }
O1
c
blst_p2_on_curve: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movq %rdi, %r14 leaq 0xc0(%rdi), %r13 movl $0x60, %esi movq %r13, %rdi callq 0x30680 movq %rax, -0x30(%rbp) leaq 0x2380b(%rip), %r15 # 0x3fb20 leaq -0xf0(%rbp), %rbx movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD movq %rbx, %rdi movq %r13, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x33a20 movq %rbx, %rdi movq %rbx, %rsi movq %r13, %rdx movq %r15, %rcx movq %r12, %r8 callq 0x338e0 leaq -0x90(%rbp), %r13 movq %r13, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x33a20 leaq -0x60(%rbp), %rdx movq %rbx, %rdi movq %r13, %rsi movq %r15, %rcx callq 0x2fae0 leaq -0xc0(%rbp), %r12 movq %r12, %rdi movq %r13, %rsi leaq -0x60(%rbp), %rdx movq %r15, %rcx callq 0x2f380 movl $0x2, %edx movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rcx callq 0x2f680 movl $0x2, %edx movq %r12, %rdi movq %r12, %rsi movq %r15, %rcx callq 0x2f680 movq %r13, %rdi movq %r14, %rsi movq %r15, %rdx movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD movq %r12, %rcx callq 0x33a20 movq %r13, %rdi movq %r13, %rsi movq %r14, %rdx movq %r15, %rcx movq %r12, %r8 callq 0x338e0 movq %r13, %rdi movq %r13, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x2f460 addq $0x60, %r14 leaq -0x150(%rbp), %rbx movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x33a20 movl $0x60, %edx movq %r13, %rdi movq %rbx, %rsi callq 0x306c0 orl -0x30(%rbp), %eax addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
blst_p2_on_curve: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov r14, rdi lea r13, [rdi+0C0h] mov esi, 60h ; '`' mov rdi, r13 call vec_is_zero_16x mov [rbp+var_30], rax lea r15, BLS12_381_P lea rbx, [rbp+var_F0] mov r12, 89F3FFFCFFFCFFFDh mov rdi, rbx mov rsi, r13 mov rdx, r15 mov rcx, r12 call sqr_mont_384x mov rdi, rbx mov rsi, rbx mov rdx, r13 mov rcx, r15 mov r8, r12 call mul_mont_384x lea r13, [rbp+var_90] mov rdi, r13 mov rsi, rbx mov rdx, r15 mov rcx, r12 call sqr_mont_384x lea rdx, [rbp+var_60] mov rdi, rbx mov rsi, r13 mov rcx, r15 call _sub_mod_384 lea r12, [rbp+var_C0] mov rdi, r12 mov rsi, r13 lea rdx, [rbp+var_60] mov rcx, r15 call add_mod_384 mov edx, 2 mov rdi, rbx mov rsi, rbx mov rcx, r15 call lshift_mod_384 mov edx, 2 mov rdi, r12 mov rsi, r12 mov rcx, r15 call lshift_mod_384 mov rdi, r13 mov rsi, r14 mov rdx, r15 mov r12, 89F3FFFCFFFCFFFDh mov rcx, r12 call sqr_mont_384x mov rdi, r13 mov rsi, r13 mov rdx, r14 mov rcx, r15 mov r8, r12 call mul_mont_384x mov rdi, r13 mov rsi, r13 mov rdx, rbx mov rcx, r15 call add_mod_384x add r14, 60h ; '`' lea rbx, [rbp+var_150] mov rdi, rbx mov rsi, r14 mov rdx, r15 mov rcx, r12 call sqr_mont_384x mov edx, 60h ; '`' mov rdi, r13 mov rsi, rbx call vec_is_equal_16x or eax, dword ptr [rbp+var_30] add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long blst_p2_on_curve(long long a1) { int is_equal_16x; // eax _BYTE v3[96]; // [rsp+0h] [rbp-150h] BYREF _BYTE v4[48]; // [rsp+60h] [rbp-F0h] BYREF _BYTE v5[48]; // [rsp+90h] [rbp-C0h] BYREF _BYTE v6[48]; // [rsp+C0h] [rbp-90h] BYREF _BYTE v7[48]; // [rsp+F0h] [rbp-60h] BYREF long long is_zero_16x; // [rsp+120h] [rbp-30h] is_zero_16x = vec_is_zero_16x(a1 + 192, 96LL); sqr_mont_384x(v4, a1 + 192, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v4, v4, a1 + 192, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); sqr_mont_384x(v6, v4, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); sub_mod_384(v4, v6, v7, &BLS12_381_P); add_mod_384(v5, v6, v7, &BLS12_381_P); lshift_mod_384(v4, v4, 2LL, &BLS12_381_P); lshift_mod_384(v5, v5, 2LL, &BLS12_381_P); sqr_mont_384x(v6, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384x(v6, v6, a1, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); add_mod_384x(v6, v6, v4, &BLS12_381_P); sqr_mont_384x(v3, a1 + 96, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); is_equal_16x = vec_is_equal_16x(v6, v3, 96LL); return (unsigned int)is_zero_16x | is_equal_16x; }
blst_p2_on_curve: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV R14,RDI LEA R13,[RDI + 0xc0] MOV ESI,0x60 MOV RDI,R13 CALL 0x00130680 MOV qword ptr [RBP + -0x30],RAX LEA R15,[0x13fb20] LEA RBX,[RBP + -0xf0] MOV R12,-0x760c000300030003 MOV RDI,RBX MOV RSI,R13 MOV RDX,R15 MOV RCX,R12 CALL 0x00133a20 MOV RDI,RBX MOV RSI,RBX MOV RDX,R13 MOV RCX,R15 MOV R8,R12 CALL 0x001338e0 LEA R13,[RBP + -0x90] MOV RDI,R13 MOV RSI,RBX MOV RDX,R15 MOV RCX,R12 CALL 0x00133a20 LEA RDX,[RBP + -0x60] MOV RDI,RBX MOV RSI,R13 MOV RCX,R15 CALL 0x0012fae0 LEA R12,[RBP + -0xc0] MOV RDI,R12 MOV RSI,R13 LEA RDX,[RBP + -0x60] MOV RCX,R15 CALL 0x0012f380 MOV EDX,0x2 MOV RDI,RBX MOV RSI,RBX MOV RCX,R15 CALL 0x0012f680 MOV EDX,0x2 MOV RDI,R12 MOV RSI,R12 MOV RCX,R15 CALL 0x0012f680 MOV RDI,R13 MOV RSI,R14 MOV RDX,R15 MOV R12,-0x760c000300030003 MOV RCX,R12 CALL 0x00133a20 MOV RDI,R13 MOV RSI,R13 MOV RDX,R14 MOV RCX,R15 MOV R8,R12 CALL 0x001338e0 MOV RDI,R13 MOV RSI,R13 MOV RDX,RBX MOV RCX,R15 CALL 0x0012f460 ADD R14,0x60 LEA RBX,[RBP + -0x150] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV RCX,R12 CALL 0x00133a20 MOV EDX,0x60 MOV RDI,R13 MOV RSI,RBX CALL 0x001306c0 OR EAX,dword ptr [RBP + -0x30] ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint blst_p2_on_curve(long param_1) { long lVar1; uint uVar2; int1 local_158 [96]; int1 local_f8 [48]; int1 local_c8 [48]; int1 local_98 [48]; int1 local_68 [48]; int8 local_38; lVar1 = param_1 + 0xc0; local_38 = vec_is_zero_16x(lVar1,0x60); sqr_mont_384x(local_f8,lVar1,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_f8,local_f8,lVar1,BLS12_381_P,0x89f3fffcfffcfffd); sqr_mont_384x(local_98,local_f8,BLS12_381_P,0x89f3fffcfffcfffd); sub_mod_384(local_f8,local_98,local_68,BLS12_381_P); add_mod_384(local_c8,local_98,local_68,BLS12_381_P); lshift_mod_384(local_f8,local_f8,2,BLS12_381_P); lshift_mod_384(local_c8,local_c8,2,BLS12_381_P); sqr_mont_384x(local_98,param_1,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384x(local_98,local_98,param_1,BLS12_381_P,0x89f3fffcfffcfffd); add_mod_384x(local_98,local_98,local_f8,BLS12_381_P); sqr_mont_384x(local_158,param_1 + 0x60,BLS12_381_P,0x89f3fffcfffcfffd); uVar2 = vec_is_equal_16x(local_98,local_158,0x60); return uVar2 | (uint)local_38; }
39,755
generate_primary_key_list
eloqsql/client/mysqlslap.c
static int generate_primary_key_list(MYSQL *mysql, option_string *engine_stmt) { MYSQL_RES *result; MYSQL_ROW row; unsigned long long counter; DBUG_ENTER("generate_primary_key_list"); /* Blackhole is a special case, this allows us to test the upper end of the server during load runs. */ if (opt_only_print || (engine_stmt && strstr(engine_stmt->string, "blackhole"))) { primary_keys_number_of= 1; primary_keys= (char **)my_malloc(PSI_NOT_INSTRUMENTED, (size_t)(sizeof(char *) * primary_keys_number_of), MYF(MY_ZEROFILL|MY_FAE|MY_WME)); /* Yes, we strdup a const string to simplify the interface */ primary_keys[0]= my_strdup(PSI_NOT_INSTRUMENTED, "796c4422-1d94-102a-9d6d-00e0812d", MYF(0)); } else { if (run_query(mysql, "SELECT id from t1", strlen("SELECT id from t1"))) { fprintf(stderr,"%s: Cannot select GUID primary keys. (%s)\n", my_progname, mysql_error(mysql)); exit(1); } if (!(result= mysql_store_result(mysql))) { fprintf(stderr, "%s: Error when storing result: %d %s\n", my_progname, mysql_errno(mysql), mysql_error(mysql)); exit(1); } primary_keys_number_of= mysql_num_rows(result); /* So why check this? Blackhole :) */ if (primary_keys_number_of) { /* We create the structure and loop and create the items. */ primary_keys= (char **)my_malloc(PSI_NOT_INSTRUMENTED, (size_t)(sizeof(char *) * primary_keys_number_of), MYF(MY_ZEROFILL|MY_FAE|MY_WME)); row= mysql_fetch_row(result); for (counter= 0; counter < primary_keys_number_of; counter++, row= mysql_fetch_row(result)) primary_keys[counter]= my_strdup(PSI_NOT_INSTRUMENTED, row[0], MYF(0)); } mysql_free_result(result); } DBUG_RETURN(0); }
O0
c
generate_primary_key_list: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movsbl 0x3b55c9(%rip), %eax # 0x3ef2b0 cmpl $0x0, %eax jne 0x39d0c cmpq $0x0, -0x10(%rbp) je 0x39d59 movq -0x10(%rbp), %rax movq (%rax), %rdi leaq 0x94cfe(%rip), %rsi # 0xce9ff callq 0x37470 cmpq $0x0, %rax je 0x39d59 movq $0x1, 0x3b56f9(%rip) # 0x3ef410 movq 0x3b56f2(%rip), %rsi # 0x3ef410 shlq $0x3, %rsi xorl %edi, %edi movl $0x38, %edx callq 0x7fad0 movq %rax, 0x3b56e3(%rip) # 0x3ef418 xorl %edi, %edi leaq 0x94ccb(%rip), %rsi # 0xcea09 xorl %eax, %eax movl %eax, %edx callq 0x7ff50 movq %rax, %rcx movq 0x3b56c7(%rip), %rax # 0x3ef418 movq %rcx, (%rax) jmp 0x39ecd movq -0x8(%rbp), %rdi leaq 0x94cc6(%rip), %rsi # 0xcea2a movl $0x11, %edx callq 0x39ee0 cmpl $0x0, %eax je 0x39dbb movq 0x1fa25e(%rip), %rax # 0x233fd8 movq (%rax), %rax movq %rax, -0x38(%rbp) leaq 0x3bfa88(%rip), %rax # 0x3f9810 movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rdi callq 0x48ab0 movq -0x38(%rbp), %rdi movq -0x30(%rbp), %rdx movq %rax, %rcx leaq 0x94c92(%rip), %rsi # 0xcea3c movb $0x0, %al callq 0x371e0 movl $0x1, %edi callq 0x37670 movq -0x8(%rbp), %rdi callq 0x46780 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x39e25 movq 0x1fa203(%rip), %rax # 0x233fd8 movq (%rax), %rax movq %rax, -0x50(%rbp) leaq 0x3bfa2d(%rip), %rax # 0x3f9810 movq (%rax), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rdi callq 0x48a80 movl %eax, -0x3c(%rbp) movq -0x8(%rbp), %rdi callq 0x48ab0 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rdx movl -0x3c(%rbp), %ecx movq %rax, %r8 leaq 0x933d4(%rip), %rsi # 0xcd1e8 movb $0x0, %al callq 0x371e0 movl $0x1, %edi callq 0x37670 movq -0x18(%rbp), %rdi callq 0x488a0 movq %rax, 0x3b55db(%rip) # 0x3ef410 cmpq $0x0, 0x3b55d3(%rip) # 0x3ef410 je 0x39ec4 movq 0x3b55c6(%rip), %rsi # 0x3ef410 shlq $0x3, %rsi xorl %edi, %edi movl $0x38, %edx callq 0x7fad0 movq %rax, 0x3b55b7(%rip) # 0x3ef418 movq -0x18(%rbp), %rdi callq 0x46ac0 movq %rax, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x28(%rbp), %rax cmpq 0x3b558f(%rip), %rax # 0x3ef410 jae 0x39ec2 movq -0x20(%rbp), %rax movq (%rax), %rsi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0x7ff50 movq %rax, %rdx movq 0x3b5579(%rip), %rax # 0x3ef418 movq -0x28(%rbp), %rcx movq %rdx, (%rax,%rcx,8) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0x46ac0 movq %rax, -0x20(%rbp) jmp 0x39e76 jmp 0x39ec4 movq -0x18(%rbp), %rdi callq 0x3dfc0 jmp 0x39ecf jmp 0x39ed1 xorl %eax, %eax addq $0x50, %rsp popq %rbp retq nopl (%rax)
generate_primary_key_list: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi movsx eax, cs:opt_only_print cmp eax, 0 jnz short loc_39D0C cmp [rbp+var_10], 0 jz short loc_39D59 mov rax, [rbp+var_10] mov rdi, [rax] lea rsi, aBlackhole; "blackhole" call _strstr cmp rax, 0 jz short loc_39D59 loc_39D0C: mov cs:primary_keys_number_of, 1 mov rsi, cs:primary_keys_number_of shl rsi, 3 xor edi, edi mov edx, 38h ; '8' call my_malloc mov cs:primary_keys, rax xor edi, edi lea rsi, a796c44221d9410; "796c4422-1d94-102a-9d6d-00e0812d" xor eax, eax mov edx, eax call my_strdup mov rcx, rax mov rax, cs:primary_keys mov [rax], rcx jmp loc_39ECD loc_39D59: mov rdi, [rbp+var_8] lea rsi, aSelectIdFromT1; "SELECT id from t1" mov edx, 11h call run_query cmp eax, 0 jz short loc_39DBB mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_38], rax lea rax, my_progname mov rax, [rax] mov [rbp+var_30], rax mov rdi, [rbp+var_8] call mysql_error mov rdi, [rbp+var_38] mov rdx, [rbp+var_30] mov rcx, rax lea rsi, aSCannotSelectG; "%s: Cannot select GUID primary keys. (%"... mov al, 0 call _fprintf mov edi, 1 call _exit loc_39DBB: mov rdi, [rbp+var_8] call mysql_store_result mov [rbp+var_18], rax cmp rax, 0 jnz short loc_39E25 mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_50], rax lea rax, my_progname mov rax, [rax] mov [rbp+var_48], rax mov rdi, [rbp+var_8] call mysql_errno mov [rbp+var_3C], eax mov rdi, [rbp+var_8] call mysql_error mov rdi, [rbp+var_50] mov rdx, [rbp+var_48] mov ecx, [rbp+var_3C] mov r8, rax lea rsi, aSErrorWhenStor; "%s: Error when storing result: %d %s\n" mov al, 0 call _fprintf mov edi, 1 call _exit loc_39E25: mov rdi, [rbp+var_18] call mysql_num_rows mov cs:primary_keys_number_of, rax cmp cs:primary_keys_number_of, 0 jz loc_39EC4 mov rsi, cs:primary_keys_number_of shl rsi, 3 xor edi, edi mov edx, 38h ; '8' call my_malloc mov cs:primary_keys, rax mov rdi, [rbp+var_18] call mysql_fetch_row mov [rbp+var_20], rax mov [rbp+var_28], 0 loc_39E76: mov rax, [rbp+var_28] cmp rax, cs:primary_keys_number_of jnb short loc_39EC2 mov rax, [rbp+var_20] mov rsi, [rax] xor edi, edi xor eax, eax mov edx, eax call my_strdup mov rdx, rax mov rax, cs:primary_keys mov rcx, [rbp+var_28] mov [rax+rcx*8], rdx mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov rdi, [rbp+var_18] call mysql_fetch_row mov [rbp+var_20], rax jmp short loc_39E76 loc_39EC2: jmp short $+2 loc_39EC4: mov rdi, [rbp+var_18] call mysql_free_result loc_39ECD: jmp short $+2 loc_39ECF: jmp short $+2 loc_39ED1: xor eax, eax add rsp, 50h pop rbp retn
long long generate_primary_key_list(long long a1, _QWORD *a2) { const char *v2; // rax const char *v3; // rax long long v5; // [rsp+0h] [rbp-50h] const char *v6; // [rsp+8h] [rbp-48h] int v7; // [rsp+14h] [rbp-3Ch] long long v8; // [rsp+18h] [rbp-38h] const char *v9; // [rsp+20h] [rbp-30h] unsigned long long i; // [rsp+28h] [rbp-28h] _QWORD *row; // [rsp+30h] [rbp-20h] long long v12; // [rsp+38h] [rbp-18h] if ( opt_only_print || a2 && strstr(*a2, "blackhole") ) { primary_keys_number_of = 1LL; primary_keys = my_malloc(0LL, 8LL, 56LL); *(_QWORD *)primary_keys = my_strdup(0LL, "796c4422-1d94-102a-9d6d-00e0812d", 0LL); } else { if ( (unsigned int)run_query(a1, "SELECT id from t1", 17LL) ) { v8 = stderr; v9 = my_progname; v2 = (const char *)mysql_error(a1); fprintf(v8, "%s: Cannot select GUID primary keys. (%s)\n", v9, v2); exit(1LL); } v12 = mysql_store_result(a1); if ( !v12 ) { v5 = stderr; v6 = my_progname; v7 = mysql_errno(a1); v3 = (const char *)mysql_error(a1); fprintf(v5, "%s: Error when storing result: %d %s\n", v6, v7, v3); exit(1LL); } primary_keys_number_of = mysql_num_rows(v12); if ( primary_keys_number_of ) { primary_keys = my_malloc(0LL, 8 * primary_keys_number_of, 56LL); row = (_QWORD *)mysql_fetch_row(v12); for ( i = 0LL; i < primary_keys_number_of; ++i ) { *(_QWORD *)(primary_keys + 8 * i) = my_strdup(0LL, *row, 0LL); row = (_QWORD *)mysql_fetch_row(v12); } } mysql_free_result(v12); } return 0LL; }
generate_primary_key_list: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOVSX EAX,byte ptr [0x004ef2b0] CMP EAX,0x0 JNZ 0x00139d0c CMP qword ptr [RBP + -0x10],0x0 JZ 0x00139d59 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] LEA RSI,[0x1ce9ff] CALL 0x00137470 CMP RAX,0x0 JZ 0x00139d59 LAB_00139d0c: MOV qword ptr [0x004ef410],0x1 MOV RSI,qword ptr [0x004ef410] SHL RSI,0x3 XOR EDI,EDI MOV EDX,0x38 CALL 0x0017fad0 MOV qword ptr [0x004ef418],RAX XOR EDI,EDI LEA RSI,[0x1cea09] XOR EAX,EAX MOV EDX,EAX CALL 0x0017ff50 MOV RCX,RAX MOV RAX,qword ptr [0x004ef418] MOV qword ptr [RAX],RCX JMP 0x00139ecd LAB_00139d59: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x1cea2a] MOV EDX,0x11 CALL 0x00139ee0 CMP EAX,0x0 JZ 0x00139dbb MOV RAX,qword ptr [0x00333fd8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LEA RAX,[0x4f9810] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00148ab0 MOV RDI,qword ptr [RBP + -0x38] MOV RDX,qword ptr [RBP + -0x30] MOV RCX,RAX LEA RSI,[0x1cea3c] MOV AL,0x0 CALL 0x001371e0 MOV EDI,0x1 CALL 0x00137670 LAB_00139dbb: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00146780 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x00139e25 MOV RAX,qword ptr [0x00333fd8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX LEA RAX,[0x4f9810] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00148a80 MOV dword ptr [RBP + -0x3c],EAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00148ab0 MOV RDI,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RBP + -0x3c] MOV R8,RAX LEA RSI,[0x1cd1e8] MOV AL,0x0 CALL 0x001371e0 MOV EDI,0x1 CALL 0x00137670 LAB_00139e25: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001488a0 MOV qword ptr [0x004ef410],RAX CMP qword ptr [0x004ef410],0x0 JZ 0x00139ec4 MOV RSI,qword ptr [0x004ef410] SHL RSI,0x3 XOR EDI,EDI MOV EDX,0x38 CALL 0x0017fad0 MOV qword ptr [0x004ef418],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00146ac0 MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x28],0x0 LAB_00139e76: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [0x004ef410] JNC 0x00139ec2 MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x0017ff50 MOV RDX,RAX MOV RAX,qword ptr [0x004ef418] MOV RCX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + RCX*0x8],RDX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00146ac0 MOV qword ptr [RBP + -0x20],RAX JMP 0x00139e76 LAB_00139ec2: JMP 0x00139ec4 LAB_00139ec4: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0013dfc0 LAB_00139ecd: JMP 0x00139ecf LAB_00139ecf: JMP 0x00139ed1 LAB_00139ed1: XOR EAX,EAX ADD RSP,0x50 POP RBP RET
int8 generate_primary_key_list(int8 param_1,int8 *param_2) { FILE *pFVar1; int iVar2; uint uVar3; char *pcVar4; int8 uVar5; int8 uVar6; long lVar7; ulong local_30; int8 *local_28; if ((opt_only_print == '\0') && ((param_2 == (int8 *)0x0 || (pcVar4 = strstr((char *)*param_2,"blackhole"), pcVar4 == (char *)0x0)))) { iVar2 = run_query(param_1,"SELECT id from t1",0x11); uVar5 = my_progname; if (iVar2 != 0) { pFVar1 = *(FILE **)PTR_stderr_00333fd8; uVar6 = mysql_error(param_1); fprintf(pFVar1,"%s: Cannot select GUID primary keys. (%s)\n",uVar5,uVar6); /* WARNING: Subroutine does not return */ exit(1); } lVar7 = mysql_store_result(param_1); uVar5 = my_progname; if (lVar7 == 0) { pFVar1 = *(FILE **)PTR_stderr_00333fd8; uVar3 = mysql_errno(param_1); uVar6 = mysql_error(param_1); fprintf(pFVar1,"%s: Error when storing result: %d %s\n",uVar5,(ulong)uVar3,uVar6); /* WARNING: Subroutine does not return */ exit(1); } primary_keys_number_of = mysql_num_rows(lVar7); if (primary_keys_number_of != 0) { primary_keys = (int8 *)my_malloc(0,primary_keys_number_of << 3,0x38); local_28 = (int8 *)mysql_fetch_row(lVar7); local_30 = 0; while (local_30 < primary_keys_number_of) { uVar5 = my_strdup(0,*local_28,0); primary_keys[local_30] = uVar5; local_30 = local_30 + 1; local_28 = (int8 *)mysql_fetch_row(); } } mysql_free_result(lVar7); } else { primary_keys_number_of = 1; primary_keys = (int8 *)my_malloc(0,8,0x38); uVar5 = my_strdup(0,"796c4422-1d94-102a-9d6d-00e0812d",0); *primary_keys = uVar5; } return 0; }
39,756
madb_get_os_character_set
eloqsql/libmariadb/libmariadb/ma_charset.c
const char *madb_get_os_character_set() { unsigned int i= 0; char *p= NULL; #ifdef _WIN32 char codepage[FN_REFLEN]; snprintf(codepage, FN_REFLEN, "%u", GetConsoleCP() ? GetConsoleCP() : GetACP()); p= codepage; #elif defined(HAVE_NL_LANGINFO) && defined(HAVE_SETLOCALE) if (setlocale(LC_CTYPE, "")) p= nl_langinfo(CODESET); #endif if (!p) return MADB_DEFAULT_CHARSET_NAME; while (MADB_OS_CHARSET[i].identifier) { if (MADB_OS_CHARSET[i].supported > MADB_CS_UNSUPPORTED && strcasecmp(MADB_OS_CHARSET[i].identifier, p) == 0) return MADB_OS_CHARSET[i].charset; i++; } return MADB_DEFAULT_CHARSET_NAME; }
O3
c
madb_get_os_character_set: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax leaq 0x42b23(%rip), %rsi # 0xa1b77 xorl %edi, %edi callq 0x37810 leaq 0x411a4(%rip), %rbx # 0xa0206 testq %rax, %rax je 0x5f0c7 movl $0xe, %edi callq 0x37780 movq %rax, %r14 testq %rax, %rax sete %al leaq 0x2eda3f(%rip), %r15 # 0x34cac0 movq (%r15), %rdi testq %rdi, %rdi sete %cl orb %al, %cl jne 0x5f0c7 movl $0x1, %r12d movq %r15, %r13 cmpb $0x0, 0x20(%r13) je 0x5f0aa movq %r14, %rsi callq 0x37870 testl %eax, %eax je 0x5f0c3 movl %r12d, %eax leaq (%rax,%rax,4), %rax leaq (%r15,%rax,8), %r13 movq (%r13), %rdi incl %r12d testq %rdi, %rdi jne 0x5f097 jmp 0x5f0c7 movq 0x10(%r13), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
madb_get_os_character_set: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax lea rsi, asc_A1B75+2; "" xor edi, edi call _setlocale lea rbx, aLatin1; "latin1" test rax, rax jz short loc_5F0C7 mov edi, 0Eh call _nl_langinfo mov r14, rax test rax, rax setz al lea r15, MADB_OS_CHARSET mov rdi, [r15] test rdi, rdi setz cl or cl, al jnz short loc_5F0C7 mov r12d, 1 mov r13, r15 loc_5F097: cmp byte ptr [r13+20h], 0 jz short loc_5F0AA mov rsi, r14 call _strcasecmp test eax, eax jz short loc_5F0C3 loc_5F0AA: mov eax, r12d lea rax, [rax+rax*4] lea r13, [r15+rax*8] mov rdi, [r13+0] inc r12d test rdi, rdi jnz short loc_5F097 jmp short loc_5F0C7 loc_5F0C3: mov rbx, [r13+10h] loc_5F0C7: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
const char *madb_get_os_character_set() { const char *v0; // rbx long long v1; // r14 void *v2; // rdi unsigned int v3; // r12d _UNKNOWN **v4; // r13 v0 = "latin1"; if ( setlocale(0LL, "") ) { v1 = nl_langinfo(14LL); v2 = MADB_OS_CHARSET; if ( v1 != 0 && MADB_OS_CHARSET != 0LL ) { v3 = 1; v4 = &MADB_OS_CHARSET; while ( !*((_BYTE *)v4 + 32) || (unsigned int)strcasecmp(v2, v1) ) { v4 = &MADB_OS_CHARSET + 5 * v3; v2 = *v4; ++v3; if ( !*v4 ) return v0; } return (const char *)v4[2]; } } return v0; }
madb_get_os_character_set: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX LEA RSI,[0x1a1b77] XOR EDI,EDI CALL 0x00137810 LEA RBX,[0x1a0206] TEST RAX,RAX JZ 0x0015f0c7 MOV EDI,0xe CALL 0x00137780 MOV R14,RAX TEST RAX,RAX SETZ AL LEA R15,[0x44cac0] MOV RDI,qword ptr [R15] TEST RDI,RDI SETZ CL OR CL,AL JNZ 0x0015f0c7 MOV R12D,0x1 MOV R13,R15 LAB_0015f097: CMP byte ptr [R13 + 0x20],0x0 JZ 0x0015f0aa MOV RSI,R14 CALL 0x00137870 TEST EAX,EAX JZ 0x0015f0c3 LAB_0015f0aa: MOV EAX,R12D LEA RAX,[RAX + RAX*0x4] LEA R13,[R15 + RAX*0x8] MOV RDI,qword ptr [R13] INC R12D TEST RDI,RDI JNZ 0x0015f097 JMP 0x0015f0c7 LAB_0015f0c3: MOV RBX,qword ptr [R13 + 0x10] LAB_0015f0c7: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
char * madb_get_os_character_set(void) { int iVar1; char *pcVar2; char *__s1; ulong uVar3; int **ppuVar4; pcVar2 = setlocale(0,""); if ((pcVar2 != (char *)0x0) && (pcVar2 = nl_langinfo(0xe), MADB_OS_CHARSET != (int *)0x0 && pcVar2 != (char *)0x0)) { uVar3 = 1; ppuVar4 = &MADB_OS_CHARSET; __s1 = MADB_OS_CHARSET; do { if ((*(char *)(ppuVar4 + 4) != '\0') && (iVar1 = strcasecmp(__s1,pcVar2), iVar1 == 0)) { return ppuVar4[2]; } ppuVar4 = &MADB_OS_CHARSET + uVar3 * 5; __s1 = *ppuVar4; uVar3 = (ulong)((int)uVar3 + 1); } while (__s1 != (char *)0x0); } return "latin1"; }
39,757
safe_hash_init
eloqsql/mysys/my_safehash.c
my_bool safe_hash_init(SAFE_HASH *hash, uint elements, uchar *default_value) { DBUG_ENTER("safe_hash_init"); if (my_hash_init(key_memory_SAFE_HASH_ENTRY, &hash->hash, &my_charset_bin, elements, 0, 0, (my_hash_get_key) safe_hash_entry_get, (void (*)(void*)) safe_hash_entry_free, 0)) { hash->default_value= 0; DBUG_RETURN(1); } mysql_rwlock_init(key_SAFEHASH_mutex, &hash->mutex); hash->default_value= default_value; hash->root= 0; DBUG_RETURN(0); }
O3
c
safe_hash_init: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %r14 movq %rdi, %rbx leaq 0x34f975(%rip), %rax # 0x3af3b4 movl (%rax), %edi leaq 0x98(%rbx), %rax movl %esi, %r8d subq $0x8, %rsp leaq 0x8d(%rip), %r10 # 0x5fae3 xorl %r15d, %r15d leaq 0x74(%rip), %r11 # 0x5fad4 leaq 0x2d3959(%rip), %rcx # 0x3333c0 movq %rax, %rsi xorl %edx, %edx xorl %r9d, %r9d pushq $0x0 pushq %r10 pushq %r15 pushq %r11 pushq %r15 callq 0x4eee9 addq $0x30, %rsp movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x5fac2 leaq 0x34efc7(%rip), %rax # 0x3aea58 movl (%rax), %edi leaq 0x2d08b6(%rip), %rax # 0x330350 movq (%rax), %rax movq %rbx, %rsi callq *0x50(%rax) movq %rax, 0x90(%rbx) movq %rbx, %rdi callq 0x5e894 movq $0x0, 0x110(%rbx) xorl %eax, %eax movq %r14, %r15 movq %r15, 0x108(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
safe_hash_init: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdx mov rbx, rdi lea rax, key_memory_SAFE_HASH_ENTRY mov edi, [rax] lea rax, [rbx+98h] mov r8d, esi sub rsp, 8 lea r10, safe_hash_entry_free xor r15d, r15d lea r11, safe_hash_entry_get lea rcx, my_charset_bin mov rsi, rax xor edx, edx xor r9d, r9d push 0 push r10 push r15 push r11 push r15 call my_hash_init2 add rsp, 30h mov ecx, eax mov al, 1 test cl, cl jnz short loc_5FAC2 lea rax, key_SAFEHASH_mutex mov edi, [rax] lea rax, PSI_server mov rax, [rax] mov rsi, rbx call qword ptr [rax+50h] mov [rbx+90h], rax mov rdi, rbx call my_rw_init mov qword ptr [rbx+110h], 0 xor eax, eax mov r15, r14 loc_5FAC2: mov [rbx+108h], r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char safe_hash_init(_QWORD *a1, unsigned int a2, long long a3) { long long v4; // r15 char v5; // cl char result; // al v4 = 0LL; v5 = my_hash_init2( key_memory_SAFE_HASH_ENTRY, (long long)(a1 + 19), 0, (long long)&my_charset_bin, a2, 0LL, 0LL, (long long)safe_hash_entry_get, 0LL, (long long)safe_hash_entry_free, 0); result = 1; if ( !v5 ) { a1[18] = ((long long ( *)(_QWORD, _QWORD *))PSI_server[10])(key_SAFEHASH_mutex, a1); my_rw_init((long long)a1); a1[34] = 0LL; result = 0; v4 = a3; } a1[33] = v4; return result; }
safe_hash_init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RDI LEA RAX,[0x4af3b4] MOV EDI,dword ptr [RAX] LEA RAX,[RBX + 0x98] MOV R8D,ESI SUB RSP,0x8 LEA R10,[0x15fae3] XOR R15D,R15D LEA R11,[0x15fad4] LEA RCX,[0x4333c0] MOV RSI,RAX XOR EDX,EDX XOR R9D,R9D PUSH 0x0 PUSH R10 PUSH R15 PUSH R11 PUSH R15 CALL 0x0014eee9 ADD RSP,0x30 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x0015fac2 LEA RAX,[0x4aea58] MOV EDI,dword ptr [RAX] LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] MOV RSI,RBX CALL qword ptr [RAX + 0x50] MOV qword ptr [RBX + 0x90],RAX MOV RDI,RBX CALL 0x0015e894 MOV qword ptr [RBX + 0x110],0x0 XOR EAX,EAX MOV R15,R14 LAB_0015fac2: MOV qword ptr [RBX + 0x108],R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
bool safe_hash_init(long param_1,int4 param_2,int8 param_3) { char cVar1; int8 uVar2; cVar1 = my_hash_init2(key_memory_SAFE_HASH_ENTRY,param_1 + 0x98,0,my_charset_bin,param_2,0,0, safe_hash_entry_get,0,safe_hash_entry_free,0); uVar2 = 0; if (cVar1 == '\0') { uVar2 = (**(code **)(PSI_server + 0x50))(key_SAFEHASH_mutex,param_1); *(int8 *)(param_1 + 0x90) = uVar2; my_rw_init(param_1); *(int8 *)(param_1 + 0x110) = 0; uVar2 = param_3; } *(int8 *)(param_1 + 0x108) = uVar2; return cVar1 != '\0'; }
39,758
list_free
eloqsql/mysys/list.c
void list_free(LIST *root, uint free_data) { LIST *next; while (root) { next=root->next; if (free_data) my_free(root->data); my_free(root); root=next; } }
O0
c
list_free: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpq $0x0, -0x8(%rbp) je 0xe2c38 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) cmpl $0x0, -0xc(%rbp) je 0xe2c25 movq -0x8(%rbp), %rax movq 0x10(%rax), %rdi callq 0xf7370 movq -0x8(%rbp), %rdi callq 0xf7370 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0xe2bff addq $0x20, %rsp popq %rbp retq nop
list_free: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi loc_E2BFF: cmp [rbp+var_8], 0 jz short loc_E2C38 mov rax, [rbp+var_8] mov rax, [rax+8] mov [rbp+var_18], rax cmp [rbp+var_C], 0 jz short loc_E2C25 mov rax, [rbp+var_8] mov rdi, [rax+10h] call my_free loc_E2C25: mov rdi, [rbp+var_8] call my_free mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_E2BFF loc_E2C38: add rsp, 20h pop rbp retn
long long list_free(long long a1, int a2) { long long result; // rax long long v3; // [rsp+8h] [rbp-18h] while ( a1 ) { v3 = *(_QWORD *)(a1 + 8); if ( a2 ) my_free(*(_QWORD *)(a1 + 16)); my_free(a1); result = v3; a1 = v3; } return result; }
list_free: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI LAB_001e2bff: CMP qword ptr [RBP + -0x8],0x0 JZ 0x001e2c38 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX CMP dword ptr [RBP + -0xc],0x0 JZ 0x001e2c25 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX + 0x10] CALL 0x001f7370 LAB_001e2c25: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001f7370 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x001e2bff LAB_001e2c38: ADD RSP,0x20 POP RBP RET
void list_free(long param_1,int param_2) { long lVar1; int8 local_10; local_10 = param_1; while (local_10 != 0) { lVar1 = *(long *)(local_10 + 8); if (param_2 != 0) { my_free(*(int8 *)(local_10 + 0x10)); } my_free(local_10); local_10 = lVar1; } return; }
39,759
my_hash_sort_utf8mb3_nopad
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb3_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e= s+slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((s < e) && (res=my_utf8mb3_uni(cs,&wc, (uchar *)s, (uchar*)e))>0 ) { my_tosort_unicode(uni_plane, &wc, cs->state); MY_HASH_ADD_16(m1, m2, wc); s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf8mb3_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x59(%rbp) jae 0x6cf1a movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x6ad70 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0x6cf26 jmp 0x6cfc7 movq -0x48(%rbp), %rdi movq -0x8(%rbp), %rax movl 0xc(%rax), %edx leaq -0x30(%rbp), %rsi callq 0x6bb20 jmp 0x6cf3c movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xff, %rcx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x6cf78 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x8, %rcx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x6cfb1 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x6ceea movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf8mb3_nopad: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_6CEEA: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_59], al jnb short loc_6CF1A mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_utf8mb3_uni mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_59], al loc_6CF1A: mov al, [rbp+var_59] test al, 1 jnz short loc_6CF26 jmp loc_6CFC7 loc_6CF26: mov rdi, [rbp+var_48] mov rax, [rbp+var_8] mov edx, [rax+0Ch] lea rsi, [rbp+var_30] call my_tosort_unicode jmp short $+2 loc_6CF3C: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFh imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_6CF78: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 8 imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_6CFB1: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_6CEEA loc_6CFC7: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_utf8mb3_nopad( long long a1, unsigned long long a2, long long a3, unsigned long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax bool v7; // [rsp+7h] [rbp-59h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+8h] [rbp-58h] unsigned long long v10; // [rsp+10h] [rbp-50h] long long v11; // [rsp+10h] [rbp-50h] _QWORD *v12; // [rsp+18h] [rbp-48h] unsigned long long v13; // [rsp+20h] [rbp-40h] int v14; // [rsp+2Ch] [rbp-34h] unsigned long long v15; // [rsp+30h] [rbp-30h] BYREF _QWORD *v16; // [rsp+38h] [rbp-28h] unsigned long long *v17; // [rsp+40h] [rbp-20h] long long v18; // [rsp+48h] [rbp-18h] unsigned long long v19; // [rsp+50h] [rbp-10h] long long v20; // [rsp+58h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; v17 = a4; v16 = a5; v13 = a3 + a2; v12 = *(_QWORD **)(a1 + 120); v10 = *a4; v8 = *a5; while ( 1 ) { v7 = 0; if ( v19 < v13 ) { v14 = my_utf8mb3_uni(v20, (long long)&v15, v19, v13, (long long)a5, a6); v7 = v14 > 0; } if ( !v7 ) break; my_tosort_unicode(v12, &v15, *(_DWORD *)(v20 + 12)); v11 = v10 ^ ((v10 << 8) + (unsigned __int8)v15 * (v8 + (v10 & 0x3F))); v9 = v8 + 3; v10 = v11 ^ ((v11 << 8) + (v15 >> 8) * (v9 + (v11 & 0x3F))); v8 = v9 + 3; v19 += v14; } *v17 = v10; result = v16; *v16 = v8; return result; }
my_hash_sort_utf8mb3_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_0016ceea: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x59],AL JNC 0x0016cf1a MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x0016ad70 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x59],AL LAB_0016cf1a: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x0016cf26 JMP 0x0016cfc7 LAB_0016cf26: MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xc] LEA RSI,[RBP + -0x30] CALL 0x0016bb20 JMP 0x0016cf3c LAB_0016cf3c: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xff IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x0016cf78 LAB_0016cf78: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x8 IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x0016cfb1 LAB_0016cfb1: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x0016ceea LAB_0016cfc7: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_utf8mb3_nopad (long param_1,ulong param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; bool bVar2; long local_60; ulong local_58; int local_3c; ulong local_38; long *local_30; ulong *local_28; long local_20; ulong local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (local_18 < param_2 + param_3) { local_3c = my_utf8mb3_uni(local_10,&local_38,local_18,param_2 + param_3); bVar2 = 0 < local_3c; } if (!bVar2) break; my_tosort_unicode(uVar1,&local_38,*(int4 *)(local_10 + 0xc)); local_58 = ((local_58 & 0x3f) + local_60) * (local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (local_38 >> 8) + local_58 * 0x100 ^ local_58; local_60 = local_60 + 6; local_18 = local_18 + (long)local_3c; } *local_28 = local_58; *local_30 = local_60; return; }
39,760
glfwMakeContextCurrent
untodesu[P]riteg/build_O3/_deps/glfw-src/src/context.c
GLFWAPI void glfwMakeContextCurrent(GLFWwindow* handle) { _GLFWwindow* window = (_GLFWwindow*) handle; _GLFWwindow* previous = _glfwPlatformGetTls(&_glfw.contextSlot); _GLFW_REQUIRE_INIT(); if (window && window->context.client == GLFW_NO_API) { _glfwInputError(GLFW_NO_WINDOW_CONTEXT, "Cannot make current with a window that has no OpenGL or OpenGL ES context"); return; } if (previous) { if (!window || window->context.source != previous->context.source) previous->context.makeCurrent(NULL); } if (window) window->context.makeCurrent(window); }
O3
c
glfwMakeContextCurrent: pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 leaq 0x8fb96(%rip), %rbx # 0xa8638 leaq 0x1fe1c(%rbx), %rdi callq 0x25f2d cmpl $0x0, (%rbx) je 0x18af6 testq %r14, %r14 je 0x18aff movq %r14, %rdx cmpl $0x0, 0x1f8(%r14) je 0x18b13 testq %rax, %rax je 0x18ae6 movl 0x1fc(%rdx), %ecx cmpl 0x1fc(%rax), %ecx je 0x18ae6 xorl %edi, %edi movq %rdx, %rbx callq *0x240(%rax) movq %rbx, %rdx movq %rdx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmpq *0x240(%rdx) movl $0x10001, %edi # imm = 0x10001 xorl %esi, %esi jmp 0x18b1f testq %rax, %rax je 0x18b2d xorl %edi, %edi addq $0x8, %rsp popq %rbx popq %r14 jmpq *0x240(%rax) leaq 0x4ea9a(%rip), %rsi # 0x675b4 movl $0x1000a, %edi # imm = 0x1000A xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 jmp 0x18e91 addq $0x8, %rsp popq %rbx popq %r14 retq
glfwMakeContextCurrent: push r14 push rbx push rax mov r14, rdi lea rbx, _glfw lea rdi, [rbx+1FE1Ch] call _glfwPlatformGetTls cmp dword ptr [rbx], 0 jz short loc_18AF6 test r14, r14 jz short loc_18AFF mov rdx, r14 cmp dword ptr [r14+1F8h], 0 jz short loc_18B13 test rax, rax jz short loc_18AE6 mov ecx, [rdx+1FCh] cmp ecx, [rax+1FCh] jz short loc_18AE6 xor edi, edi mov rbx, rdx call qword ptr [rax+240h] mov rdx, rbx loc_18AE6: mov rdi, rdx add rsp, 8 pop rbx pop r14 jmp qword ptr [rdx+240h] loc_18AF6: mov edi, offset loc_10001 xor esi, esi jmp short loc_18B1F loc_18AFF: test rax, rax jz short loc_18B2D xor edi, edi add rsp, 8 pop rbx pop r14 jmp qword ptr [rax+240h] loc_18B13: lea rsi, aCannotMakeCurr; "Cannot make current with a window that "... mov edi, 1000Ah loc_18B1F: xor eax, eax add rsp, 8 pop rbx pop r14 jmp _glfwInputError loc_18B2D: add rsp, 8 pop rbx pop r14 retn
long long glfwMakeContextCurrent(long long a1) { long long result; // rax long long v2; // rdx int v3; // ecx int v4; // r8d int v5; // r9d void *v6; // rdi const char *v7; // rsi result = glfwPlatformGetTls(&glfw[32647]); if ( !glfw[0] ) { v6 = &loc_10001; LODWORD(v7) = 0; return glfwInputError((_DWORD)v6, (_DWORD)v7, v2, v3, v4, v5); } if ( a1 ) { v2 = a1; if ( *(_DWORD *)(a1 + 504) ) { if ( result ) { if ( *(_DWORD *)(a1 + 508) != *(_DWORD *)(result + 508) ) { (*(void ( **)(_QWORD))(result + 576))(0LL); v2 = a1; } } return (*(long long ( **)(long long))(v2 + 576))(v2); } v7 = "Cannot make current with a window that has no OpenGL or OpenGL ES context"; LODWORD(v6) = 65546; return glfwInputError((_DWORD)v6, (_DWORD)v7, v2, v3, v4, v5); } if ( result ) return (*(long long ( **)(_QWORD))(result + 576))(0LL); return result; }
glfwMakeContextCurrent: PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI LEA RBX,[0x1a8638] LEA RDI,[RBX + 0x1fe1c] CALL 0x00125f2d CMP dword ptr [RBX],0x0 JZ 0x00118af6 TEST R14,R14 JZ 0x00118aff MOV RDX,R14 CMP dword ptr [R14 + 0x1f8],0x0 JZ 0x00118b13 TEST RAX,RAX JZ 0x00118ae6 MOV ECX,dword ptr [RDX + 0x1fc] CMP ECX,dword ptr [RAX + 0x1fc] JZ 0x00118ae6 XOR EDI,EDI MOV RBX,RDX CALL qword ptr [RAX + 0x240] MOV RDX,RBX LAB_00118ae6: MOV RDI,RDX ADD RSP,0x8 POP RBX POP R14 JMP qword ptr [RDX + 0x240] LAB_00118af6: MOV EDI,0x10001 XOR ESI,ESI JMP 0x00118b1f LAB_00118aff: TEST RAX,RAX JZ 0x00118b2d XOR EDI,EDI ADD RSP,0x8 POP RBX POP R14 JMP qword ptr [RAX + 0x240] LAB_00118b13: LEA RSI,[0x1675b4] MOV EDI,0x1000a LAB_00118b1f: XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 JMP 0x00118e91 LAB_00118b2d: ADD RSP,0x8 POP RBX POP R14 RET
void glfwMakeContextCurrent(long param_1) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = _glfwPlatformGetTls(&DAT_001c8454); if (_glfw == 0) { uVar3 = 0x10001; pcVar2 = (char *)0x0; } else { if (param_1 == 0) { if (lVar1 != 0) { /* WARNING: Could not recover jumptable at 0x00118b0d. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(lVar1 + 0x240))(0); return; } return; } if (*(int *)(param_1 + 0x1f8) != 0) { if ((lVar1 != 0) && (*(int *)(param_1 + 0x1fc) != *(int *)(lVar1 + 0x1fc))) { (**(code **)(lVar1 + 0x240))(0); } /* WARNING: Could not recover jumptable at 0x00118af0. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x240))(param_1); return; } pcVar2 = "Cannot make current with a window that has no OpenGL or OpenGL ES context"; uVar3 = 0x1000a; } _glfwInputError(uVar3,pcVar2); return; }
39,761
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 0x2a4ae movq -0x8(%rbp), %rdi callq 0x2a4f0 movq -0x8(%rbp), %rax movq $0x0, 0x60(%rax) movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0x2f350 movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) jmp 0x2a4de 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_2A4AE: 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_2A4DE: 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 0x0012a4ae LAB_0012a4ae: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a4f0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x60],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x0012f350 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 JMP 0x0012a4de LAB_0012a4de: 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,762
my_hash_free
eloqsql/mysys/hash.c
void my_hash_free(HASH *hash) { DBUG_ENTER("my_hash_free"); DBUG_PRINT("enter",("hash:%p elements: %ld", hash, hash->records)); my_hash_free_elements(hash); hash->free= 0; delete_dynamic(&hash->array); hash->blength= 0; DBUG_VOID_RETURN; }
O3
c
my_hash_free: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x18(%rdi), %r14d testq %r14, %r14 je 0x281f5 movq $0x0, 0x18(%rbx) cmpq $0x0, 0x60(%rbx) je 0x281f5 movq 0x28(%rbx), %r15 shlq $0x4, %r14 addq %r15, %r14 movq 0x8(%r15), %rdi addq $0x10, %r15 callq *0x60(%rbx) cmpq %r14, %r15 jb 0x281e5 xorl %r14d, %r14d movq %r14, 0x60(%rbx) leaq 0x28(%rbx), %rdi callq 0x2b0dc movq %r14, 0x10(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
my_hash_free: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov r14d, [rdi+18h] test r14, r14 jz short loc_281F5 mov qword ptr [rbx+18h], 0 cmp qword ptr [rbx+60h], 0 jz short loc_281F5 mov r15, [rbx+28h] shl r14, 4 add r14, r15 loc_281E5: mov rdi, [r15+8] add r15, 10h call qword ptr [rbx+60h] cmp r15, r14 jb short loc_281E5 loc_281F5: xor r14d, r14d mov [rbx+60h], r14 lea rdi, [rbx+28h] call delete_dynamic mov [rbx+10h], r14 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long my_hash_free(long long a1) { long long v2; // r14 unsigned long long v3; // r15 unsigned long long v4; // r14 long long v5; // rdi long long result; // rax v2 = *(unsigned int *)(a1 + 24); if ( *(_DWORD *)(a1 + 24) ) { *(_QWORD *)(a1 + 24) = 0LL; if ( *(_QWORD *)(a1 + 96) ) { v3 = *(_QWORD *)(a1 + 40); v4 = v3 + 16 * v2; do { v5 = *(_QWORD *)(v3 + 8); v3 += 16LL; (*(void ( **)(long long))(a1 + 96))(v5); } while ( v3 < v4 ); } } *(_QWORD *)(a1 + 96) = 0LL; result = delete_dynamic(a1 + 40); *(_QWORD *)(a1 + 16) = 0LL; return result; }
my_hash_free: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV R14D,dword ptr [RDI + 0x18] TEST R14,R14 JZ 0x001281f5 MOV qword ptr [RBX + 0x18],0x0 CMP qword ptr [RBX + 0x60],0x0 JZ 0x001281f5 MOV R15,qword ptr [RBX + 0x28] SHL R14,0x4 ADD R14,R15 LAB_001281e5: MOV RDI,qword ptr [R15 + 0x8] ADD R15,0x10 CALL qword ptr [RBX + 0x60] CMP R15,R14 JC 0x001281e5 LAB_001281f5: XOR R14D,R14D MOV qword ptr [RBX + 0x60],R14 LEA RDI,[RBX + 0x28] CALL 0x0012b0dc MOV qword ptr [RBX + 0x10],R14 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void my_hash_free(long param_1) { int8 *puVar1; uint uVar2; ulong uVar3; ulong uVar4; uVar2 = *(uint *)(param_1 + 0x18); if (((ulong)uVar2 != 0) && (*(int8 *)(param_1 + 0x18) = 0, *(long *)(param_1 + 0x60) != 0)) { uVar4 = *(ulong *)(param_1 + 0x28); uVar3 = (ulong)uVar2 * 0x10 + uVar4; do { puVar1 = (int8 *)(uVar4 + 8); uVar4 = uVar4 + 0x10; (**(code **)(param_1 + 0x60))(*puVar1); } while (uVar4 < uVar3); } *(int8 *)(param_1 + 0x60) = 0; delete_dynamic(param_1 + 0x28); *(int8 *)(param_1 + 0x10) = 0; return; }
39,763
mi_cmp_static_unique
eloqsql/storage/myisam/mi_statrec.c
int _mi_cmp_static_unique(MI_INFO *info, MI_UNIQUEDEF *def, const uchar *record, my_off_t pos) { DBUG_ENTER("_mi_cmp_static_unique"); info->rec_cache.seek_not_done=1; /* We have done a seek */ if (info->s->file_read(info, info->rec_buff, info->s->base.reclength, pos, MYF(MY_NABP))) DBUG_RETURN(-1); DBUG_RETURN(mi_unique_comp(def, record, info->rec_buff, def->null_are_equal)); }
O0
c
mi_cmp_static_unique: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movl $0x1, 0x300(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x2e0(%rax), %rax movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rcx movq 0x120(%rcx), %rsi movq -0x10(%rbp), %rcx movq (%rcx), %rcx movq 0x140(%rcx), %rdx movq -0x28(%rbp), %rcx movl $0x4, %r8d callq *%rax cmpq $0x0, %rax je 0xc432e jmp 0xc4325 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc4353 jmp 0xc4330 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x120(%rax), %rdx movq -0x18(%rbp), %rax movsbl 0x3(%rax), %ecx callq 0xc4ea0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
_mi_cmp_static_unique: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov dword ptr [rax+300h], 1 mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+2E0h] mov rdi, [rbp+var_10] mov rcx, [rbp+var_10] mov rsi, [rcx+120h] mov rcx, [rbp+var_10] mov rcx, [rcx] mov rdx, [rcx+140h] mov rcx, [rbp+var_28] mov r8d, 4 call rax cmp rax, 0 jz short loc_C432E jmp short $+2 loc_C4325: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_C4353 loc_C432E: jmp short $+2 loc_C4330: mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rax, [rbp+var_10] mov rdx, [rax+120h] mov rax, [rbp+var_18] movsx ecx, byte ptr [rax+3] call mi_unique_comp mov [rbp+var_4], eax loc_C4353: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mi_cmp_static_unique(long long a1, long long a2, long long a3, long long a4) { *(_DWORD *)(a1 + 768) = 1; if ( (*(long long ( **)(long long, _QWORD, _QWORD, long long, long long))(*(_QWORD *)a1 + 736LL))( a1, *(_QWORD *)(a1 + 288), *(_QWORD *)(*(_QWORD *)a1 + 320LL), a4, 4LL) ) { return (unsigned int)-1; } else { return (unsigned int)mi_unique_comp(a2, a3, *(_QWORD *)(a1 + 288), (unsigned int)*(char *)(a2 + 3)); } }
_mi_cmp_static_unique: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x300],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x2e0] MOV RDI,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RCX + 0x120] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] MOV RDX,qword ptr [RCX + 0x140] MOV RCX,qword ptr [RBP + -0x28] MOV R8D,0x4 CALL RAX CMP RAX,0x0 JZ 0x001c432e JMP 0x001c4325 LAB_001c4325: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c4353 LAB_001c432e: JMP 0x001c4330 LAB_001c4330: MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x120] MOV RAX,qword ptr [RBP + -0x18] MOVSX ECX,byte ptr [RAX + 0x3] CALL 0x001c4ea0 MOV dword ptr [RBP + -0x4],EAX LAB_001c4353: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 _mi_cmp_static_unique(long *param_1,long param_2,int8 param_3,int8 param_4) { long lVar1; int4 local_c; *(int4 *)(param_1 + 0x60) = 1; lVar1 = (**(code **)(*param_1 + 0x2e0)) (param_1,param_1[0x24],*(int8 *)(*param_1 + 0x140),param_4,4); if (lVar1 == 0) { local_c = mi_unique_comp(param_2,param_3,param_1[0x24],(int)*(char *)(param_2 + 3)); } else { local_c = 0xffffffff; } return local_c; }
39,764
maria_scan_init
eloqsql/storage/maria/ma_scan.c
int maria_scan_init(register MARIA_HA *info) { DBUG_ENTER("maria_scan_init"); info->cur_row.nextpos= info->s->pack.header_length; /* Read first record */ info->lastinx= -1; /* Can't forward or backward */ if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache)) DBUG_RETURN(my_errno); if ((*info->s->scan_init)(info)) DBUG_RETURN(my_errno); DBUG_RETURN(0); }
O3
c
maria_scan_init: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %rax movq 0x590(%rax), %rcx movq %rcx, 0xa0(%rdi) movl $0xffffffff, 0x62c(%rdi) # imm = 0xFFFFFFFF testb $0x10, 0x61c(%rdi) je 0x41445 leaq 0x4b8(%rbx), %rdi movl $0x1, %esi callq 0x9a43d testl %eax, %eax jne 0x41452 movq (%rbx), %rax movq %rbx, %rdi callq *0x650(%rax) testb %al, %al je 0x4145b callq 0xa8ec2 movl (%rax), %eax jmp 0x4145d xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
maria_scan_init: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rax, [rdi] mov rcx, [rax+590h] mov [rdi+0A0h], rcx mov dword ptr [rdi+62Ch], 0FFFFFFFFh test byte ptr [rdi+61Ch], 10h jz short loc_41445 lea rdi, [rbx+4B8h] mov esi, 1 call my_b_flush_io_cache test eax, eax jnz short loc_41452 mov rax, [rbx] loc_41445: mov rdi, rbx call qword ptr [rax+650h] test al, al jz short loc_4145B loc_41452: call _my_thread_var mov eax, [rax] jmp short loc_4145D loc_4145B: xor eax, eax loc_4145D: add rsp, 8 pop rbx pop rbp retn
long long maria_scan_init(long long *a1) { long long v2; // rax long long *v3; // rdi v2 = *a1; a1[20] = *(_QWORD *)(*a1 + 1424); *((_DWORD *)a1 + 395) = -1; if ( (*((_BYTE *)a1 + 1564) & 0x10) != 0 ) { v3 = a1 + 151; if ( (unsigned int)my_b_flush_io_cache(v3, 1LL) ) return *(unsigned int *)my_thread_var(v3); v2 = *a1; } v3 = a1; if ( (*(unsigned __int8 ( **)(long long *))(v2 + 1616))(a1) ) return *(unsigned int *)my_thread_var(v3); return 0LL; }
maria_scan_init: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RAX + 0x590] MOV qword ptr [RDI + 0xa0],RCX MOV dword ptr [RDI + 0x62c],0xffffffff TEST byte ptr [RDI + 0x61c],0x10 JZ 0x00141445 LEA RDI,[RBX + 0x4b8] MOV ESI,0x1 CALL 0x0019a43d TEST EAX,EAX JNZ 0x00141452 MOV RAX,qword ptr [RBX] LAB_00141445: MOV RDI,RBX CALL qword ptr [RAX + 0x650] TEST AL,AL JZ 0x0014145b LAB_00141452: CALL 0x001a8ec2 MOV EAX,dword ptr [RAX] JMP 0x0014145d LAB_0014145b: XOR EAX,EAX LAB_0014145d: ADD RSP,0x8 POP RBX POP RBP RET
int4 maria_scan_init(long *param_1) { char cVar1; int iVar2; long lVar3; int4 *puVar4; lVar3 = *param_1; param_1[0x14] = *(long *)(lVar3 + 0x590); *(int4 *)((long)param_1 + 0x62c) = 0xffffffff; if ((*(byte *)((long)param_1 + 0x61c) & 0x10) != 0) { iVar2 = my_b_flush_io_cache(param_1 + 0x97,1); if (iVar2 != 0) goto LAB_00141452; lVar3 = *param_1; } cVar1 = (**(code **)(lVar3 + 0x650))(param_1); if (cVar1 == '\0') { return 0; } LAB_00141452: puVar4 = (int4 *)_my_thread_var(); return *puVar4; }
39,765
mariadb_field_attr
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mariadb_field_attr(MARIADB_CONST_STRING *attr, const MYSQL_FIELD *field, enum mariadb_field_attr_t type) { MA_FIELD_EXTENSION *ext= (MA_FIELD_EXTENSION*) field->extension; if (!ext || type > MARIADB_FIELD_ATTR_LAST) { *attr= null_const_string; return 1; } *attr= ext->metadata[type]; return 0; }
O0
c
mariadb_field_attr: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x18(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x256b8 cmpl $0x1, -0x1c(%rbp) jbe 0x256da movq -0x10(%rbp), %rax movq 0x420bd(%rip), %rcx # 0x67780 movq %rcx, (%rax) movq 0x420bb(%rip), %rcx # 0x67788 movq %rcx, 0x8(%rax) movl $0x1, -0x4(%rbp) jmp 0x25701 movq -0x10(%rbp), %rax movq -0x28(%rbp), %rcx movl -0x1c(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
mariadb_field_attr: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_18] mov rax, [rax+78h] mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_256B8 cmp [rbp+var_1C], 1 jbe short loc_256DA loc_256B8: mov rax, [rbp+var_10] mov rcx, cs:null_const_string mov [rax], rcx mov rcx, cs:qword_67788 mov [rax+8], rcx mov [rbp+var_4], 1 jmp short loc_25701 loc_256DA: mov rax, [rbp+var_10] mov rcx, [rbp+var_28] mov edx, [rbp+var_1C] shl rdx, 4 add rcx, rdx mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov [rbp+var_4], 0 loc_25701: mov eax, [rbp+var_4] pop rbp retn
long long mariadb_field_attr(_QWORD *a1, long long a2, unsigned int a3) { long long v3; // rdx long long v5; // [rsp+0h] [rbp-28h] v5 = *(_QWORD *)(a2 + 120); if ( v5 && a3 <= 1 ) { v3 = 16LL * a3; *a1 = *(_QWORD *)(v3 + v5); a1[1] = *(_QWORD *)(v3 + v5 + 8); return 0; } else { *a1 = null_const_string; a1[1] = qword_67788; return 1; } }
mariadb_field_attr: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x001256b8 CMP dword ptr [RBP + -0x1c],0x1 JBE 0x001256da LAB_001256b8: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [0x00167780] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [0x00167788] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00125701 LAB_001256da: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x1c] SHL RDX,0x4 ADD RCX,RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x4],0x0 LAB_00125701: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 mariadb_field_attr(int8 *param_1,long param_2,uint param_3) { int8 *puVar1; int4 local_c; if ((*(long *)(param_2 + 0x78) == 0) || (1 < param_3)) { *param_1 = null_const_string; param_1[1] = DAT_00167788; local_c = 1; } else { puVar1 = (int8 *)(*(long *)(param_2 + 0x78) + (ulong)param_3 * 0x10); *param_1 = *puVar1; param_1[1] = puVar1[1]; local_c = 0; } return local_c; }
39,766
string_buffer_concat
bluesky950520[P]quickjs/quickjs.c
static int string_buffer_concat(StringBuffer *s, const JSString *p, uint32_t from, uint32_t to) { if (to <= from) return 0; if (p->is_wide_char) return string_buffer_write16(s, p->u.str16 + from, to - from); else return string_buffer_write8(s, p->u.str8 + from, to - from); }
O0
c
string_buffer_concat: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movl %edx, 0xc(%rsp) movl %ecx, 0x8(%rsp) movl 0x8(%rsp), %eax cmpl 0xc(%rsp), %eax ja 0x6fc5a movl $0x0, 0x24(%rsp) jmp 0x6fcc0 movq 0x10(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al je 0x6fc9a movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi addq $0x18, %rsi movl 0xc(%rsp), %eax shlq %rax addq %rax, %rsi movl 0x8(%rsp), %edx subl 0xc(%rsp), %edx callq 0x6ffa0 movl %eax, 0x24(%rsp) jmp 0x6fcc0 movq 0x18(%rsp), %rdi movq 0x10(%rsp), %rsi addq $0x18, %rsi movl 0xc(%rsp), %eax addq %rax, %rsi movl 0x8(%rsp), %edx subl 0xc(%rsp), %edx callq 0x6fb20 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax)
string_buffer_concat: 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], ecx mov eax, [rsp+28h+var_20] cmp eax, [rsp+28h+var_1C] ja short loc_6FC5A mov [rsp+28h+var_4], 0 jmp short loc_6FCC0 loc_6FC5A: mov rax, [rsp+28h+var_18] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jz short loc_6FC9A mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_18] add rsi, 18h mov eax, [rsp+28h+var_1C] shl rax, 1 add rsi, rax mov edx, [rsp+28h+var_20] sub edx, [rsp+28h+var_1C] call string_buffer_write16 mov [rsp+28h+var_4], eax jmp short loc_6FCC0 loc_6FC9A: mov rdi, [rsp+28h+var_10] mov rsi, [rsp+28h+var_18] add rsi, 18h mov eax, [rsp+28h+var_1C] add rsi, rax mov edx, [rsp+28h+var_20] sub edx, [rsp+28h+var_1C] call string_buffer_write8 mov [rsp+28h+var_4], eax loc_6FCC0: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long string_buffer_concat(long long a1, long long a2, unsigned int a3, unsigned int a4) { if ( a4 > a3 ) { if ( (*(_QWORD *)(a2 + 4) & 0x80000000LL) != 0 ) return (unsigned int)string_buffer_write16(a1, 2LL * a3 + a2 + 24, a4 - a3); else return (unsigned int)string_buffer_write8(a1, a3 + a2 + 24, a4 - a3); } else { return 0; } }
string_buffer_concat: 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],ECX MOV EAX,dword ptr [RSP + 0x8] CMP EAX,dword ptr [RSP + 0xc] JA 0x0016fc5a MOV dword ptr [RSP + 0x24],0x0 JMP 0x0016fcc0 LAB_0016fc5a: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JZ 0x0016fc9a MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0x18 MOV EAX,dword ptr [RSP + 0xc] SHL RAX,0x1 ADD RSI,RAX MOV EDX,dword ptr [RSP + 0x8] SUB EDX,dword ptr [RSP + 0xc] CALL 0x0016ffa0 MOV dword ptr [RSP + 0x24],EAX JMP 0x0016fcc0 LAB_0016fc9a: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0x18 MOV EAX,dword ptr [RSP + 0xc] ADD RSI,RAX MOV EDX,dword ptr [RSP + 0x8] SUB EDX,dword ptr [RSP + 0xc] CALL 0x0016fb20 MOV dword ptr [RSP + 0x24],EAX LAB_0016fcc0: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 string_buffer_concat(int8 param_1,long param_2,uint param_3,uint param_4) { int4 local_4; if (param_3 < param_4) { if ((*(ulong *)(param_2 + 4) >> 0x1f & 1) == 0) { local_4 = string_buffer_write8(param_1,param_2 + 0x18 + (ulong)param_3,param_4 - param_3); } else { local_4 = string_buffer_write16(param_1,param_2 + 0x18 + (ulong)param_3 * 2,param_4 - param_3) ; } } else { local_4 = 0; } return local_4; }
39,767
string_buffer_concat
bluesky950520[P]quickjs/quickjs.c
static int string_buffer_concat(StringBuffer *s, const JSString *p, uint32_t from, uint32_t to) { if (to <= from) return 0; if (p->is_wide_char) return string_buffer_write16(s, p->u.str16 + from, to - from); else return string_buffer_write8(s, p->u.str8 + from, to - from); }
O1
c
string_buffer_concat: pushq %r15 pushq %r14 pushq %rbx movl %ecx, %ebx xorl %eax, %eax subl %edx, %ebx jbe 0x4219d movq %rsi, %rcx movq %rdi, %r14 addq $0x18, %rsi testb $-0x80, 0x7(%rcx) movl %edx, %eax jne 0x420ee addq %rax, %rsi movq %r14, %rdi movl %ebx, %edx popq %rbx popq %r14 popq %r15 jmp 0x42038 leaq (%rsi,%rax,2), %r15 testl %ebx, %ebx jle 0x4210d movl %ebx, %eax xorl %ecx, %ecx xorl %edx, %edx movzwl (%r15,%rcx,2), %esi orl %esi, %edx incq %rcx cmpq %rcx, %rax jne 0x420fc jmp 0x4210f xorl %edx, %edx movl 0x10(%r14), %eax addl %ebx, %eax movl 0x14(%r14), %esi cmpl %esi, %eax jle 0x42129 movq %r14, %rdi movl %eax, %esi callq 0x421a3 jmp 0x42140 cmpl $0x0, 0x18(%r14) jne 0x4214b cmpl $0x100, %edx # imm = 0x100 jl 0x4214b movq %r14, %rdi callq 0x422b2 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x4219d cmpl $0x0, 0x18(%r14) je 0x42172 movq 0x8(%r14), %rax movslq 0x10(%r14), %rcx leaq (%rax,%rcx,2), %rdi addq $0x18, %rdi leal (%rbx,%rbx), %eax movslq %eax, %rdx movq %r15, %rsi callq 0xe5b0 jmp 0x42197 testl %ebx, %ebx jle 0x42197 movl %ebx, %eax xorl %ecx, %ecx movb (%r15,%rcx,2), %dl movq 0x8(%r14), %rsi movl 0x10(%r14), %edi addl %ecx, %edi movslq %edi, %rdi movb %dl, 0x18(%rsi,%rdi) incq %rcx cmpq %rcx, %rax jne 0x4217a addl %ebx, 0x10(%r14) xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq
string_buffer_concat: push r15 push r14 push rbx mov ebx, ecx xor eax, eax sub ebx, edx jbe loc_4219D mov rcx, rsi mov r14, rdi add rsi, 18h test byte ptr [rcx+7], 80h mov eax, edx jnz short loc_420EE add rsi, rax mov rdi, r14 mov edx, ebx pop rbx pop r14 pop r15 jmp string_buffer_write8 loc_420EE: lea r15, [rsi+rax*2] test ebx, ebx jle short loc_4210D mov eax, ebx xor ecx, ecx xor edx, edx loc_420FC: movzx esi, word ptr [r15+rcx*2] or edx, esi inc rcx cmp rax, rcx jnz short loc_420FC jmp short loc_4210F loc_4210D: xor edx, edx loc_4210F: mov eax, [r14+10h] add eax, ebx mov esi, [r14+14h] cmp eax, esi jle short loc_42129 mov rdi, r14 mov esi, eax call string_buffer_realloc jmp short loc_42140 loc_42129: cmp dword ptr [r14+18h], 0 jnz short loc_4214B cmp edx, 100h jl short loc_4214B mov rdi, r14 call string_buffer_widen loc_42140: mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_4219D loc_4214B: cmp dword ptr [r14+18h], 0 jz short loc_42172 mov rax, [r14+8] movsxd rcx, dword ptr [r14+10h] lea rdi, [rax+rcx*2] add rdi, 18h lea eax, [rbx+rbx] movsxd rdx, eax mov rsi, r15 call _memcpy jmp short loc_42197 loc_42172: test ebx, ebx jle short loc_42197 mov eax, ebx xor ecx, ecx loc_4217A: mov dl, [r15+rcx*2] mov rsi, [r14+8] mov edi, [r14+10h] add edi, ecx movsxd rdi, edi mov [rsi+rdi+18h], dl inc rcx cmp rax, rcx jnz short loc_4217A loc_42197: add [r14+10h], ebx xor eax, eax loc_4219D: pop rbx pop r14 pop r15 retn
long long string_buffer_concat(long long a1, long long a2, unsigned int a3, unsigned int a4) { long long result; // rax int v5; // ebx long long v7; // rsi long long v8; // r15 long long v9; // rcx long long v10; // rdx int v11; // eax int v12; // eax int v13; // ecx long long i; // rcx result = 0LL; v5 = a4 - a3; if ( a4 <= a3 ) return result; v7 = a2 + 24; if ( *(char *)(a2 + 7) >= 0 ) return string_buffer_write8(a1, a3 + v7, v5); v8 = v7 + 2LL * a3; if ( v5 <= 0 ) { v10 = 0LL; } else { v9 = 0LL; LODWORD(v10) = 0; do v10 = *(unsigned __int16 *)(v8 + 2 * v9++) | (unsigned int)v10; while ( v5 != v9 ); } v11 = v5 + *(_DWORD *)(a1 + 16); if ( v11 > *(_DWORD *)(a1 + 20) ) { v12 = string_buffer_realloc(a1, (unsigned int)v11, v10); goto LABEL_14; } if ( !*(_DWORD *)(a1 + 24) && (int)v10 >= 256 ) { v12 = string_buffer_widen(a1); LABEL_14: v13 = v12; result = 0xFFFFFFFFLL; if ( v13 ) return result; } if ( *(_DWORD *)(a1 + 24) ) { memcpy(*(_QWORD *)(a1 + 8) + 2LL * *(int *)(a1 + 16) + 24, v8, 2 * v5); } else if ( v5 > 0 ) { for ( i = 0LL; i != v5; ++i ) *(_BYTE *)(*(_QWORD *)(a1 + 8) + (int)i + *(_DWORD *)(a1 + 16) + 24LL) = *(_BYTE *)(v8 + 2 * i); } *(_DWORD *)(a1 + 16) += v5; return 0LL; }
string_buffer_concat: PUSH R15 PUSH R14 PUSH RBX MOV EBX,ECX XOR EAX,EAX SUB EBX,EDX JBE 0x0014219d MOV RCX,RSI MOV R14,RDI ADD RSI,0x18 TEST byte ptr [RCX + 0x7],0x80 MOV EAX,EDX JNZ 0x001420ee ADD RSI,RAX MOV RDI,R14 MOV EDX,EBX POP RBX POP R14 POP R15 JMP 0x00142038 LAB_001420ee: LEA R15,[RSI + RAX*0x2] TEST EBX,EBX JLE 0x0014210d MOV EAX,EBX XOR ECX,ECX XOR EDX,EDX LAB_001420fc: MOVZX ESI,word ptr [R15 + RCX*0x2] OR EDX,ESI INC RCX CMP RAX,RCX JNZ 0x001420fc JMP 0x0014210f LAB_0014210d: XOR EDX,EDX LAB_0014210f: MOV EAX,dword ptr [R14 + 0x10] ADD EAX,EBX MOV ESI,dword ptr [R14 + 0x14] CMP EAX,ESI JLE 0x00142129 MOV RDI,R14 MOV ESI,EAX CALL 0x001421a3 JMP 0x00142140 LAB_00142129: CMP dword ptr [R14 + 0x18],0x0 JNZ 0x0014214b CMP EDX,0x100 JL 0x0014214b MOV RDI,R14 CALL 0x001422b2 LAB_00142140: MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x0014219d LAB_0014214b: CMP dword ptr [R14 + 0x18],0x0 JZ 0x00142172 MOV RAX,qword ptr [R14 + 0x8] MOVSXD RCX,dword ptr [R14 + 0x10] LEA RDI,[RAX + RCX*0x2] ADD RDI,0x18 LEA EAX,[RBX + RBX*0x1] MOVSXD RDX,EAX MOV RSI,R15 CALL 0x0010e5b0 JMP 0x00142197 LAB_00142172: TEST EBX,EBX JLE 0x00142197 MOV EAX,EBX XOR ECX,ECX LAB_0014217a: MOV DL,byte ptr [R15 + RCX*0x2] MOV RSI,qword ptr [R14 + 0x8] MOV EDI,dword ptr [R14 + 0x10] ADD EDI,ECX MOVSXD RDI,EDI MOV byte ptr [RSI + RDI*0x1 + 0x18],DL INC RCX CMP RAX,RCX JNZ 0x0014217a LAB_00142197: ADD dword ptr [R14 + 0x10],EBX XOR EAX,EAX LAB_0014219d: POP RBX POP R14 POP R15 RET
int8 string_buffer_concat(long param_1,long param_2,uint param_3,uint param_4) { void *__src; int iVar1; int8 uVar2; ulong uVar3; ushort uVar4; uint uVar5; uVar5 = param_4 - param_3; if (param_4 < param_3 || uVar5 == 0) { return 0; } if ((*(byte *)(param_2 + 7) & 0x80) == 0) { uVar2 = string_buffer_write8(param_1,param_2 + 0x18 + (ulong)param_3,uVar5); return uVar2; } __src = (void *)(param_2 + 0x18 + (ulong)param_3 * 2); if ((int)uVar5 < 1) { uVar4 = 0; } else { uVar3 = 0; uVar4 = 0; do { uVar4 = uVar4 | *(ushort *)((long)__src + uVar3 * 2); uVar3 = uVar3 + 1; } while (uVar5 != uVar3); } iVar1 = *(int *)(param_1 + 0x10) + uVar5; if (*(int *)(param_1 + 0x14) < iVar1) { iVar1 = string_buffer_realloc(param_1,iVar1); } else { if ((*(int *)(param_1 + 0x18) != 0) || (uVar4 < 0x100)) goto LAB_0014214b; iVar1 = string_buffer_widen(param_1); } if (iVar1 != 0) { return 0xffffffff; } LAB_0014214b: if (*(int *)(param_1 + 0x18) == 0) { if (0 < (int)uVar5) { uVar3 = 0; do { *(int1 *) (*(long *)(param_1 + 8) + 0x18 + (long)(*(int *)(param_1 + 0x10) + (int)uVar3)) = *(int1 *)((long)__src + uVar3 * 2); uVar3 = uVar3 + 1; } while (uVar5 != uVar3); } } else { memcpy((void *)(*(long *)(param_1 + 8) + (long)*(int *)(param_1 + 0x10) * 2 + 0x18),__src, (long)(int)(uVar5 * 2)); } *(int *)(param_1 + 0x10) = *(int *)(param_1 + 0x10) + uVar5; return 0; }
39,768
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); }
O0
c
my_ll10tostr_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movq %rdx, -0x68(%rbp) movl %ecx, -0x6c(%rbp) movq %r8, -0x78(%rbp) movl $0x0, -0x9c(%rbp) movq -0x78(%rbp), %rax movq %rax, -0xa8(%rbp) cmpl $0x0, -0x6c(%rbp) jge 0x901c9 cmpq $0x0, -0x78(%rbp) jge 0x901c7 movl $0x1, -0x9c(%rbp) xorl %eax, %eax subq -0xa8(%rbp), %rax movq %rax, -0xa8(%rbp) jmp 0x901c9 leaq -0x50(%rbp), %rax addq $0x40, %rax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movb $0x0, (%rax) cmpq $0x0, -0xa8(%rbp) jne 0x901fe movq -0x80(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x80(%rbp) movb $0x30, -0x1(%rax) jmp 0x902dc jmp 0x90200 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0xa8(%rbp) jbe 0x90270 movq -0xa8(%rbp), %rax movl $0xa, %ecx xorl %edx, %edx divq %rcx movq %rax, -0xb0(%rbp) movq -0xa8(%rbp), %rax imulq $0xa, -0xb0(%rbp), %rcx subq %rcx, %rax movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax addl $0x30, %eax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xb0(%rbp), %rax movq %rax, -0xa8(%rbp) jmp 0x90200 movq -0xa8(%rbp), %rax movq %rax, -0x98(%rbp) cmpq $0x0, -0x98(%rbp) je 0x902da movq -0x98(%rbp), %rax movl $0xa, %ecx cqto idivq %rcx movq %rax, -0xc0(%rbp) movq -0x98(%rbp), %rax imulq $0xa, -0xc0(%rbp), %rcx subq %rcx, %rax addq $0x30, %rax movb %al, %cl movq -0x80(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x80(%rbp) movb %cl, -0x1(%rax) movq -0xc0(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x9027e jmp 0x902dc cmpl $0x0, -0x9c(%rbp) je 0x902f8 movq -0x80(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x80(%rbp) movb $0x2d, -0x1(%rax) movq -0x60(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x60(%rbp), %rax addq -0x68(%rbp), %rax movq %rax, -0x90(%rbp) movq -0x60(%rbp), %rcx xorl %eax, %eax cmpq -0x90(%rbp), %rcx movb %al, -0xc5(%rbp) jae 0x9033a movq -0x80(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0xc5(%rbp) movb -0xc5(%rbp), %al testb $0x1, %al jne 0x90346 jmp 0x903a8 movq -0x58(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq -0x58(%rbp), %rdi movq -0x80(%rbp), %rcx movsbq (%rcx), %rsi movq -0x60(%rbp), %rdx movq -0x90(%rbp), %rcx callq *%rax movl %eax, -0xc4(%rbp) cmpl $0x0, -0xc4(%rbp) jle 0x90393 movl -0xc4(%rbp), %ecx movq -0x60(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) jmp 0x90395 jmp 0x903a8 jmp 0x90397 movq -0x80(%rbp), %rax addq $0x1, %rax movq %rax, -0x80(%rbp) jmp 0x90312 movl -0x60(%rbp), %eax movl -0x88(%rbp), %ecx subl %ecx, %eax cltq movq %rax, -0xd0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x903de movq -0xd0(%rbp), %rax addq $0xd0, %rsp popq %rbp retq callq 0x26370 nopw %cs:(%rax,%rax)
my_ll10tostr_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0D0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_68], rdx mov [rbp+var_6C], ecx mov [rbp+var_78], r8 mov [rbp+var_9C], 0 mov rax, [rbp+var_78] mov [rbp+var_A8], rax cmp [rbp+var_6C], 0 jge short loc_901C9 cmp [rbp+var_78], 0 jge short loc_901C7 mov [rbp+var_9C], 1 xor eax, eax sub rax, [rbp+var_A8] mov [rbp+var_A8], rax loc_901C7: jmp short $+2 loc_901C9: lea rax, [rbp+var_50] add rax, 40h ; '@' mov [rbp+var_80], rax mov rax, [rbp+var_80] mov byte ptr [rax], 0 cmp [rbp+var_A8], 0 jnz short loc_901FE mov rax, [rbp+var_80] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rcx mov byte ptr [rax-1], 30h ; '0' jmp loc_902DC loc_901FE: jmp short $+2 loc_90200: mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_A8], rax jbe short loc_90270 mov rax, [rbp+var_A8] mov ecx, 0Ah xor edx, edx div rcx mov [rbp+var_B0], rax mov rax, [rbp+var_A8] imul rcx, [rbp+var_B0], 0Ah sub rax, rcx mov [rbp+var_B4], eax mov eax, [rbp+var_B4] add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_B0] mov [rbp+var_A8], rax jmp short loc_90200 loc_90270: mov rax, [rbp+var_A8] mov [rbp+var_98], rax loc_9027E: cmp [rbp+var_98], 0 jz short loc_902DA mov rax, [rbp+var_98] mov ecx, 0Ah cqo idiv rcx mov [rbp+var_C0], rax mov rax, [rbp+var_98] imul rcx, [rbp+var_C0], 0Ah sub rax, rcx add rax, 30h ; '0' mov cl, al mov rax, [rbp+var_80] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rdx mov [rax-1], cl mov rax, [rbp+var_C0] mov [rbp+var_98], rax jmp short loc_9027E loc_902DA: jmp short $+2 loc_902DC: cmp [rbp+var_9C], 0 jz short loc_902F8 mov rax, [rbp+var_80] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_80], rcx mov byte ptr [rax-1], 2Dh ; '-' loc_902F8: mov rax, [rbp+var_60] mov [rbp+var_88], rax mov rax, [rbp+var_60] add rax, [rbp+var_68] mov [rbp+var_90], rax loc_90312: mov rcx, [rbp+var_60] xor eax, eax cmp rcx, [rbp+var_90] mov [rbp+var_C5], al jnb short loc_9033A mov rax, [rbp+var_80] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_C5], al loc_9033A: mov al, [rbp+var_C5] test al, 1 jnz short loc_90346 jmp short loc_903A8 loc_90346: mov rax, [rbp+var_58] mov rax, [rax+0B8h] mov rax, [rax+30h] mov rdi, [rbp+var_58] mov rcx, [rbp+var_80] movsx rsi, byte ptr [rcx] mov rdx, [rbp+var_60] mov rcx, [rbp+var_90] call rax mov [rbp+var_C4], eax cmp [rbp+var_C4], 0 jle short loc_90393 mov ecx, [rbp+var_C4] mov rax, [rbp+var_60] movsxd rcx, ecx add rax, rcx mov [rbp+var_60], rax jmp short loc_90395 loc_90393: jmp short loc_903A8 loc_90395: jmp short $+2 loc_90397: mov rax, [rbp+var_80] add rax, 1 mov [rbp+var_80], rax jmp loc_90312 loc_903A8: mov eax, dword ptr [rbp+var_60] mov ecx, dword ptr [rbp+var_88] sub eax, ecx cdqe mov [rbp+var_D0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_903DE mov rax, [rbp+var_D0] add rsp, 0D0h pop rbp retn loc_903DE: call ___stack_chk_fail
long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, long long a5) { char *v5; // rax char *v6; // rax char *v7; // rax bool v9; // [rsp+Bh] [rbp-C5h] int v10; // [rsp+Ch] [rbp-C4h] unsigned long long v11; // [rsp+28h] [rbp-A8h] int v12; // [rsp+34h] [rbp-9Ch] signed long long i; // [rsp+38h] [rbp-98h] unsigned long long v14; // [rsp+40h] [rbp-90h] char *v15; // [rsp+50h] [rbp-80h] unsigned long long v16; // [rsp+70h] [rbp-60h] char v17; // [rsp+BFh] [rbp-11h] BYREF char v18; // [rsp+C0h] [rbp-10h] BYREF unsigned long long v19; // [rsp+C8h] [rbp-8h] v19 = __readfsqword(0x28u); v16 = a2; v12 = 0; v11 = a5; if ( a4 < 0 && a5 < 0 ) { v12 = 1; v11 = -a5; } v15 = &v18; v18 = 0; if ( v11 ) { while ( v11 > 0x7FFFFFFFFFFFFFFFLL ) { v5 = v15--; *(v5 - 1) = v11 % 0xA + 48; v11 /= 0xAuLL; } for ( i = v11; i; i /= 10LL ) { v6 = v15--; *(v6 - 1) = i % 10 + 48; } } else { v15 = &v17; v17 = 48; } if ( v12 ) { v7 = v15--; *(v7 - 1) = 45; } v14 = a3 + a2; while ( 1 ) { v9 = 0; if ( v16 < v14 ) v9 = *v15 != 0; if ( !v9 ) break; v10 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, *v15, v16, v14); if ( v10 <= 0 ) break; v16 += v10; ++v15; } return (int)v16 - (int)a2; }
my_ll10tostr_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV qword ptr [RBP + -0x68],RDX MOV dword ptr [RBP + -0x6c],ECX MOV qword ptr [RBP + -0x78],R8 MOV dword ptr [RBP + -0x9c],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0xa8],RAX CMP dword ptr [RBP + -0x6c],0x0 JGE 0x001901c9 CMP qword ptr [RBP + -0x78],0x0 JGE 0x001901c7 MOV dword ptr [RBP + -0x9c],0x1 XOR EAX,EAX SUB RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xa8],RAX LAB_001901c7: JMP 0x001901c9 LAB_001901c9: LEA RAX,[RBP + -0x50] ADD RAX,0x40 MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX],0x0 CMP qword ptr [RBP + -0xa8],0x0 JNZ 0x001901fe MOV RAX,qword ptr [RBP + -0x80] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x80],RCX MOV byte ptr [RAX + -0x1],0x30 JMP 0x001902dc LAB_001901fe: JMP 0x00190200 LAB_00190200: MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0xa8],RAX JBE 0x00190270 MOV RAX,qword ptr [RBP + -0xa8] MOV ECX,0xa XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr [RBP + -0xa8] IMUL RCX,qword ptr [RBP + -0xb0],0xa SUB RAX,RCX MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0xa8],RAX JMP 0x00190200 LAB_00190270: MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x98],RAX LAB_0019027e: CMP qword ptr [RBP + -0x98],0x0 JZ 0x001902da MOV RAX,qword ptr [RBP + -0x98] MOV ECX,0xa CQO IDIV RCX MOV qword ptr [RBP + -0xc0],RAX MOV RAX,qword ptr [RBP + -0x98] IMUL RCX,qword ptr [RBP + -0xc0],0xa SUB RAX,RCX ADD RAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x80] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x80],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0xc0] MOV qword ptr [RBP + -0x98],RAX JMP 0x0019027e LAB_001902da: JMP 0x001902dc LAB_001902dc: CMP dword ptr [RBP + -0x9c],0x0 JZ 0x001902f8 MOV RAX,qword ptr [RBP + -0x80] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x80],RCX MOV byte ptr [RAX + -0x1],0x2d LAB_001902f8: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr [RBP + -0x60] ADD RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x90],RAX LAB_00190312: MOV RCX,qword ptr [RBP + -0x60] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x90] MOV byte ptr [RBP + -0xc5],AL JNC 0x0019033a MOV RAX,qword ptr [RBP + -0x80] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0xc5],AL LAB_0019033a: MOV AL,byte ptr [RBP + -0xc5] TEST AL,0x1 JNZ 0x00190346 JMP 0x001903a8 LAB_00190346: MOV RAX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x80] MOVSX RSI,byte ptr [RCX] MOV RDX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x90] CALL RAX MOV dword ptr [RBP + -0xc4],EAX CMP dword ptr [RBP + -0xc4],0x0 JLE 0x00190393 MOV ECX,dword ptr [RBP + -0xc4] MOV RAX,qword ptr [RBP + -0x60] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX JMP 0x00190395 LAB_00190393: JMP 0x001903a8 LAB_00190395: JMP 0x00190397 LAB_00190397: MOV RAX,qword ptr [RBP + -0x80] ADD RAX,0x1 MOV qword ptr [RBP + -0x80],RAX JMP 0x00190312 LAB_001903a8: MOV EAX,dword ptr [RBP + -0x60] MOV ECX,dword ptr [RBP + -0x88] SUB EAX,ECX CDQE MOV qword ptr [RBP + -0xd0],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001903de MOV RAX,qword ptr [RBP + -0xd0] ADD RSP,0xd0 POP RBP RET LAB_001903de: CALL 0x00126370
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5) { int iVar1; long in_FS_OFFSET; bool bVar2; ulong local_b0; ulong local_a0; int local_90; char *local_88; ulong local_68; char local_19 [9]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); bVar2 = false; local_b0 = param_5; if ((param_4 < 0) && (bVar2 = (long)param_5 < 0, bVar2)) { local_b0 = -param_5; } local_88 = local_19 + 1; local_19[1] = 0; if (local_b0 == 0) { local_88 = local_19; local_19[0] = '0'; } else { while (0x7fffffffffffffff < local_b0) { local_88[-1] = (char)local_b0 + (char)(local_b0 / 10) * -10 + '0'; local_b0 = local_b0 / 10; local_88 = local_88 + -1; } local_a0 = local_b0; while (local_a0 != 0) { local_88[-1] = (char)local_a0 + (char)((long)local_a0 / 10) * -10 + '0'; local_a0 = (long)local_a0 / 10; local_88 = local_88 + -1; } } if (bVar2) { local_88[-1] = '-'; local_88 = local_88 + -1; } local_68 = param_2; while( true ) { bVar2 = false; if (local_68 < param_2 + param_3) { bVar2 = *local_88 != '\0'; } if ((!bVar2) || (iVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,(long)*local_88,local_68,param_2 + param_3), iVar1 < 1)) break; local_68 = local_68 + (long)iVar1; local_88 = local_88 + 1; } local_90 = (int)param_2; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)((int)local_68 - local_90); }
39,769
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const
llama.cpp/common/minja/minja.hpp
std::unique_ptr<std::string> parseString() { auto doParse = [&](char quote) -> std::unique_ptr<std::string> { if (it == end || *it != quote) return nullptr; std::string result; bool escape = false; for (++it; it != end; ++it) { if (escape) { escape = false; switch (*it) { case 'n': result += '\n'; break; case 'r': result += '\r'; break; case 't': result += '\t'; break; case 'b': result += '\b'; break; case 'f': result += '\f'; break; case '\\': result += '\\'; break; default: if (*it == quote) { result += quote; } else { result += *it; } break; } } else if (*it == '\\') { escape = true; } else if (*it == quote) { ++it; return std::make_unique<std::string>(std::move(result)); } else { result += *it; } } return nullptr; }; consumeSpaces(); if (it == end) return nullptr; if (*it == '"') return doParse('"'); if (*it == '\'') return doParse('\''); return nullptr; }
O3
cpp
minja::Parser::parseString[abi:cxx11]()::'lambda'(char)::operator()[abi:cxx11](char) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq (%rsi), %r12 movq 0x18(%r12), %rcx movq 0x20(%r12), %rax cmpq %rcx, %rax je 0xe53c5 movl %edx, %ebp cmpb %bpl, (%rax) jne 0xe53c5 leaq 0x18(%rsp), %r14 movq %r14, -0x10(%r14) movq $0x0, -0x8(%r14) movb $0x0, (%r14) leaq 0x1(%rax), %rdx movq %rdx, 0x20(%r12) cmpq %rcx, %rdx je 0xe53de xorl %edx, %edx movl $0x1a29, %r13d # imm = 0x1A29 leaq 0x8(%rsp), %r15 movb 0x1(%rax), %cl testb $0x1, %dl je 0xe5377 movsbl %cl, %eax addl $-0x5c, %eax rorl %eax cmpl $0xc, %eax ja 0xe5383 btl %eax, %r13d jae 0xe5383 movl %eax, %eax leaq 0x39c06(%rip), %rcx # 0x11ef78 movb (%rax,%rcx), %cl jmp 0xe5383 movb $0x1, %dl cmpb $0x5c, %cl je 0xe5390 cmpb %bpl, %cl je 0xe53e3 movsbl %cl, %esi movq %r15, %rdi callq 0x213b0 xorl %edx, %edx movq 0x20(%r12), %rax leaq 0x1(%rax), %rcx movq %rcx, 0x20(%r12) cmpq 0x18(%r12), %rcx jne 0xe534e movq 0x8(%rsp), %rdi movq $0x0, (%rbx) cmpq %r14, %rdi je 0xe53cc movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xe53cc movq $0x0, (%rbx) movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r15d, %r15d jmp 0xe543f addq $0x2, %rax movq %rax, 0x20(%r12) movl $0x20, %edi callq 0x20220 movq %rax, %r15 movq %rax, %rdi addq $0x10, %rdi movq %rdi, (%rax) movq 0x8(%rsp), %rax cmpq %r14, %rax je 0xe5420 movq %rax, (%r15) movq 0x18(%rsp), %rax movq %rax, 0x10(%r15) movq 0x10(%rsp), %r12 jmp 0xe5432 movq 0x10(%rsp), %r12 leaq 0x1(%r12), %rdx movq %r14, %rsi callq 0x200f0 movq %r12, 0x8(%r15) movq $0x0, 0x10(%rsp) movq %r15, (%rbx) jmp 0xe53cc jmp 0xe5446 movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r14, %rdi je 0xe5460 movq 0x18(%rsp), %rsi incq %rsi callq 0x20180 movq %rbx, %rdi callq 0x20b00
_ZZN5minja6Parser11parseStringB5cxx11EvENKUlcE_clB5cxx11Ec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi mov r12, [rsi] mov rcx, [r12+18h] mov rax, [r12+20h] cmp rax, rcx jz loc_E53C5 mov ebp, edx cmp [rax], bpl jnz loc_E53C5 lea r14, [rsp+58h+var_40] mov [r14-10h], r14 mov qword ptr [r14-8], 0 mov byte ptr [r14], 0 lea rdx, [rax+1] mov [r12+20h], rdx cmp rdx, rcx jz loc_E53DE xor edx, edx mov r13d, 1A29h lea r15, [rsp+58h+var_50] loc_E534E: mov cl, [rax+1] test dl, 1 jz short loc_E5377 movsx eax, cl add eax, 0FFFFFFA4h ror eax, 1 cmp eax, 0Ch ja short loc_E5383 bt r13d, eax jnb short loc_E5383 mov eax, eax lea rcx, unk_11EF78 mov cl, [rax+rcx] jmp short loc_E5383 loc_E5377: mov dl, 1 cmp cl, 5Ch ; '\' jz short loc_E5390 cmp cl, bpl jz short loc_E53E3 loc_E5383: movsx esi, cl mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) xor edx, edx loc_E5390: mov rax, [r12+20h] lea rcx, [rax+1] mov [r12+20h], rcx cmp rcx, [r12+18h] jnz short loc_E534E mov rdi, [rsp+58h+var_50]; void * mov qword ptr [rbx], 0 cmp rdi, r14 jz short loc_E53CC mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_E53CC loc_E53C5: mov qword ptr [rbx], 0 loc_E53CC: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_E53DE: xor r15d, r15d jmp short loc_E543F loc_E53E3: add rax, 2 mov [r12+20h], rax mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax add rdi, 10h mov [rax], rdi mov rax, [rsp+58h+var_50] cmp rax, r14 jz short loc_E5420 mov [r15], rax mov rax, [rsp+58h+var_40] mov [r15+10h], rax mov r12, [rsp+58h+var_48] jmp short loc_E5432 loc_E5420: mov r12, [rsp+58h+var_48] lea rdx, [r12+1] mov rsi, r14 call _memcpy loc_E5432: mov [r15+8], r12 mov [rsp+58h+var_48], 0 loc_E543F: mov [rbx], r15 jmp short loc_E53CC jmp short $+2 loc_E5446: mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r14 jz short loc_E5460 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_E5460: mov rdi, rbx call __Unwind_Resume
void *** minja::Parser::parseString[abi:cxx11](void)::{lambda(char)#1}::operator()[abi:cxx11]( void ***a1, long long *a2, char a3) { long long v4; // r12 _BYTE *v5; // rcx _BYTE *v6; // rax char v8; // dl int v9; // r13d char v10; // cl unsigned int v11; // eax _QWORD *v12; // rdi void **v14; // r15 void *v15; // r12 void *v16; // [rsp+8h] [rbp-50h] BYREF char *v17; // [rsp+10h] [rbp-48h] _QWORD v18[8]; // [rsp+18h] [rbp-40h] BYREF v4 = *a2; v5 = *(_BYTE **)(*a2 + 24); v6 = *(_BYTE **)(*a2 + 32); if ( v6 == v5 || *v6 != a3 ) { *a1 = 0LL; return a1; } v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; *(_QWORD *)(v4 + 32) = v6 + 1; if ( v6 + 1 == v5 ) { v14 = 0LL; goto LABEL_22; } v8 = 0; v9 = 6697; while ( 1 ) { v10 = v6[1]; if ( (v8 & 1) != 0 ) { v11 = __ROR4__(v10 - 92, 1); if ( v11 <= 0xC && _bittest(&v9, v11) ) v10 = byte_11EF78[v11]; goto LABEL_11; } v8 = 1; if ( v10 != 92 ) break; LABEL_12: v6 = *(_BYTE **)(v4 + 32); *(_QWORD *)(v4 + 32) = v6 + 1; if ( v6 + 1 == *(_BYTE **)(v4 + 24) ) { v12 = v16; *a1 = 0LL; if ( v12 != v18 ) operator delete(v12, v18[0] + 1LL); return a1; } } if ( v10 != a3 ) { LABEL_11: std::string::push_back(&v16, (unsigned int)v10); v8 = 0; goto LABEL_12; } *(_QWORD *)(v4 + 32) = v6 + 2; v14 = (void **)operator new(0x20uLL); *v14 = v14 + 2; if ( v16 == v18 ) { v15 = v17; memcpy(v14 + 2, v18, v17 + 1); } else { *v14 = v16; v14[2] = (void *)v18[0]; v15 = v17; } v14[1] = v15; v17 = 0LL; LABEL_22: *a1 = v14; return a1; }
operator()[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV R12,qword ptr [RSI] MOV RCX,qword ptr [R12 + 0x18] MOV RAX,qword ptr [R12 + 0x20] CMP RAX,RCX JZ 0x001e53c5 MOV EBP,EDX CMP byte ptr [RAX],BPL JNZ 0x001e53c5 LEA R14,[RSP + 0x18] MOV qword ptr [R14 + -0x10],R14 MOV qword ptr [R14 + -0x8],0x0 MOV byte ptr [R14],0x0 LEA RDX,[RAX + 0x1] MOV qword ptr [R12 + 0x20],RDX CMP RDX,RCX JZ 0x001e53de XOR EDX,EDX MOV R13D,0x1a29 LEA R15,[RSP + 0x8] LAB_001e534e: MOV CL,byte ptr [RAX + 0x1] TEST DL,0x1 JZ 0x001e5377 MOVSX EAX,CL ADD EAX,-0x5c ROR EAX,0x1 CMP EAX,0xc JA 0x001e5383 BT R13D,EAX JNC 0x001e5383 MOV EAX,EAX LEA RCX,[0x21ef78] MOV CL,byte ptr [RAX + RCX*0x1] JMP 0x001e5383 LAB_001e5377: MOV DL,0x1 CMP CL,0x5c JZ 0x001e5390 CMP CL,BPL JZ 0x001e53e3 LAB_001e5383: MOVSX ESI,CL MOV RDI,R15 CALL 0x001213b0 XOR EDX,EDX LAB_001e5390: MOV RAX,qword ptr [R12 + 0x20] LEA RCX,[RAX + 0x1] MOV qword ptr [R12 + 0x20],RCX CMP RCX,qword ptr [R12 + 0x18] JNZ 0x001e534e MOV RDI,qword ptr [RSP + 0x8] MOV qword ptr [RBX],0x0 CMP RDI,R14 JZ 0x001e53cc MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00120180 JMP 0x001e53cc LAB_001e53c5: MOV qword ptr [RBX],0x0 LAB_001e53cc: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001e53de: XOR R15D,R15D JMP 0x001e543f LAB_001e53e3: ADD RAX,0x2 MOV qword ptr [R12 + 0x20],RAX LAB_001e53ec: MOV EDI,0x20 CALL 0x00120220 LAB_001e53f6: MOV R15,RAX MOV RDI,RAX ADD RDI,0x10 MOV qword ptr [RAX],RDI MOV RAX,qword ptr [RSP + 0x8] CMP RAX,R14 JZ 0x001e5420 MOV qword ptr [R15],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [R15 + 0x10],RAX MOV R12,qword ptr [RSP + 0x10] JMP 0x001e5432 LAB_001e5420: MOV R12,qword ptr [RSP + 0x10] LEA RDX,[R12 + 0x1] MOV RSI,R14 CALL 0x001200f0 LAB_001e5432: MOV qword ptr [R15 + 0x8],R12 MOV qword ptr [RSP + 0x10],0x0 LAB_001e543f: MOV qword ptr [RBX],R15 JMP 0x001e53cc
/* operator()[abi:cxx11](char) const */ int8 * minja::Parser::parseString[abi:cxx11]()::{lambda(char)#1}::operator()[abi_cxx11_(char param_1) { long lVar1; char *pcVar2; int8 *puVar3; char in_DL; bool bVar4; long *in_RSI; int7 in_register_00000039; int8 *puVar5; int1 *local_50; long local_48; int1 local_40; int7 uStack_3f; puVar5 = (int8 *)CONCAT71(in_register_00000039,param_1); lVar1 = *in_RSI; pcVar2 = *(char **)(lVar1 + 0x20); if ((pcVar2 == *(char **)(lVar1 + 0x18)) || (*pcVar2 != in_DL)) { *puVar5 = 0; } else { local_48 = 0; local_40 = 0; *(char **)(lVar1 + 0x20) = pcVar2 + 1; if (pcVar2 + 1 == *(char **)(lVar1 + 0x18)) { puVar3 = (int8 *)0x0; LAB_001e543f: *puVar5 = puVar3; } else { bVar4 = false; local_50 = &local_40; do { if (bVar4) { LAB_001e5383: /* try { // try from 001e5383 to 001e538d has its CatchHandler @ 001e5446 */ std::__cxx11::string::push_back((char)&local_50); bVar4 = false; } else { bVar4 = true; if (pcVar2[1] != '\\') { if (pcVar2[1] != in_DL) goto LAB_001e5383; *(char **)(lVar1 + 0x20) = pcVar2 + 2; /* try { // try from 001e53ec to 001e53f5 has its CatchHandler @ 001e5444 */ puVar3 = (int8 *)operator_new(0x20); lVar1 = local_48; *puVar3 = puVar3 + 2; if (local_50 == &local_40) { memcpy(puVar3 + 2,&local_40,local_48 + 1); } else { *puVar3 = local_50; puVar3[2] = CONCAT71(uStack_3f,local_40); } puVar3[1] = lVar1; goto LAB_001e543f; } } pcVar2 = *(char **)(lVar1 + 0x20); *(char **)(lVar1 + 0x20) = pcVar2 + 1; } while (pcVar2 + 1 != *(char **)(lVar1 + 0x18)); *puVar5 = 0; if (local_50 != &local_40) { operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1); } } } return puVar5; }
39,770
link_into_queue
eloqsql/mysys/mf_keycache.c
static void link_into_queue(KEYCACHE_WQUEUE *wqueue, struct st_my_thread_var *thread) { struct st_my_thread_var *last; DBUG_ASSERT(!thread->next && !thread->prev); if (! (last= wqueue->last_thread)) { /* Queue is empty */ thread->next= thread; thread->prev= &thread->next; } else { DBUG_ASSERT(last->next->prev == &last->next); /* Add backlink to previous element */ thread->prev= last->next->prev; /* Fix first in list to point backwords to current */ last->next->prev= &thread->next; /* Next should point to the first element in list */ thread->next= last->next; /* Fix old element to point to new one */ last->next= thread; } wqueue->last_thread= thread; }
O0
c
link_into_queue: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x76a7e movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x76ab6 movq -0x10(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx addq $0x88, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x90(%rax) jmp 0x76b19 jmp 0x76ab8 jmp 0x76aba movq -0x18(%rbp), %rax movq 0x88(%rax), %rax movq 0x90(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x90(%rax) movq -0x10(%rbp), %rcx addq $0x88, %rcx movq -0x18(%rbp), %rax movq 0x88(%rax), %rax movq %rcx, 0x90(%rax) movq -0x18(%rbp), %rax movq 0x88(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, (%rax) popq %rbp retq nopw %cs:(%rax,%rax)
link_into_queue: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_76A7E: mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax cmp rax, 0 jnz short loc_76AB6 mov rcx, [rbp+var_10] mov rax, [rbp+var_10] mov [rax+88h], rcx mov rcx, [rbp+var_10] add rcx, 88h mov rax, [rbp+var_10] mov [rax+90h], rcx jmp short loc_76B19 loc_76AB6: jmp short $+2 loc_76AB8: jmp short $+2 loc_76ABA: mov rax, [rbp+var_18] mov rax, [rax+88h] mov rcx, [rax+90h] mov rax, [rbp+var_10] mov [rax+90h], rcx mov rcx, [rbp+var_10] add rcx, 88h mov rax, [rbp+var_18] mov rax, [rax+88h] mov [rax+90h], rcx mov rax, [rbp+var_18] mov rcx, [rax+88h] mov rax, [rbp+var_10] mov [rax+88h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_18] mov [rax+88h], rcx loc_76B19: mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax], rcx pop rbp retn
_QWORD * link_into_queue(_QWORD *a1, long long a2) { _QWORD *result; // rax long long v3; // [rsp+0h] [rbp-18h] v3 = *a1; if ( *a1 ) { *(_QWORD *)(a2 + 144) = *(_QWORD *)(*(_QWORD *)(v3 + 136) + 144LL); *(_QWORD *)(*(_QWORD *)(v3 + 136) + 144LL) = a2 + 136; *(_QWORD *)(a2 + 136) = *(_QWORD *)(v3 + 136); *(_QWORD *)(v3 + 136) = a2; } else { *(_QWORD *)(a2 + 136) = a2; *(_QWORD *)(a2 + 144) = a2 + 136; } result = a1; *a1 = a2; return result; }
link_into_queue: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x00176a7e LAB_00176a7e: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x00176ab6 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x88],RCX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x88 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x90],RCX JMP 0x00176b19 LAB_00176ab6: JMP 0x00176ab8 LAB_00176ab8: JMP 0x00176aba LAB_00176aba: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x88] MOV RCX,qword ptr [RAX + 0x90] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x90],RCX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x88 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RAX + 0x90],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x88] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x88],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x88],RCX LAB_00176b19: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],RCX POP RBP RET
void link_into_queue(long *param_1,long param_2) { long lVar1; lVar1 = *param_1; if (lVar1 == 0) { *(long *)(param_2 + 0x88) = param_2; *(long *)(param_2 + 0x90) = param_2 + 0x88; } else { *(int8 *)(param_2 + 0x90) = *(int8 *)(*(long *)(lVar1 + 0x88) + 0x90); *(long *)(*(long *)(lVar1 + 0x88) + 0x90) = param_2 + 0x88; *(int8 *)(param_2 + 0x88) = *(int8 *)(lVar1 + 0x88); *(long *)(lVar1 + 0x88) = param_2; } *param_1 = param_2; return; }
39,771
coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>> coro::when_all<std::vector<coro::task<void>, std::allocator<coro::task<void>>>, coro::task<void>, void>(std::vector<coro::task<void>, std::allocator<coro::task<void>>>)
AlayaLite/build_O3/_deps/libcoro-src/include/coro/when_all.hpp
[[nodiscard]] auto when_all(range_type awaitables) -> detail::when_all_ready_awaitable<std::vector<detail::when_all_task<return_type>>> { std::vector<detail::when_all_task<return_type>> output_tasks; // If the size is known in constant time reserve the output tasks size. if constexpr (std::ranges::sized_range<range_type>) { output_tasks.reserve(std::size(awaitables)); } // Wrap each task into a when_all_task. for (auto&& a : awaitables) { output_tasks.emplace_back(detail::make_when_all_task(std::move(a))); } // Return the single awaitable that drives all the user's tasks. return detail::when_all_ready_awaitable(std::move(output_tasks)); }
O3
cpp
coro::detail::when_all_ready_awaitable<std::vector<coro::detail::when_all_task<void>, std::allocator<coro::detail::when_all_task<void>>>> coro::when_all<std::vector<coro::task<void>, std::allocator<coro::task<void>>>, coro::task<void>, void>(std::vector<coro::task<void>, std::allocator<coro::task<void>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, 0x8(%rsp) xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rdi movaps %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq 0x8(%rsi), %rsi subq (%r14), %rsi sarq $0x3, %rsi callq 0x4820 movq (%r14), %r13 movq 0x8(%r14), %rbp cmpq %rbp, %r13 je 0x3ff2 leaq -0x489(%rip), %rbx # 0x3b0a leaq 0x10(%rsp), %r14 movq %rsp, %r15 movq (%r13), %r12 movq $0x0, (%r13) movl $0x38, %edi callq 0x3230 leaq -0x544(%rip), %rcx # 0x3a74 movq %rcx, (%rax) movq %rbx, 0x8(%rax) movq %r12, 0x28(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax) movb $0x0, 0x30(%rax) movq %rax, (%rsp) movq %r14, %rdi movq %r15, %rsi callq 0x48cc movq (%rsp), %rdi testq %rdi, %rdi je 0x3fe9 callq *0x8(%rdi) addq $0x8, %r13 cmpq %rbp, %r13 jne 0x3f9b leaq 0x10(%rsp), %rdi movq (%rdi), %rax movq 0x8(%rdi), %rcx movq %rcx, %rdx subq %rax, %rdx sarq $0x3, %rdx incq %rdx movq 0x8(%rsp), %rbx movq %rdx, (%rbx) xorl %edx, %edx movq %rdx, 0x8(%rbx) movq %rax, 0x10(%rbx) movq %rcx, 0x18(%rbx) movq 0x10(%rdi), %rax movq %rax, 0x20(%rbx) movq %rdx, 0x10(%rdi) xorps %xmm0, %xmm0 movaps %xmm0, (%rdi) callq 0x4602 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx jmp 0x4074 jmp 0x4086 movq %rax, %rbx testq %r12, %r12 je 0x4074 movq %r12, %rdi callq *0x8(%r12) jmp 0x4074 jmp 0x4086 movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0x4074 callq *0x8(%rdi) leaq 0x10(%rsp), %rdi callq 0x4602 movq %rbx, %rdi callq 0x3380 movq %rax, %rdi callq 0x40e0
_ZN4coro8when_allITkNSt6ranges5rangeESt6vectorINS_4taskIvEESaIS4_EETkNS_8concepts9awaitableES4_vEENS_6detail24when_all_ready_awaitableIS2_INS8_13when_all_taskIT1_EESaISC_EEEET_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rsi mov [rsp+58h+var_50], rdi xorps xmm0, xmm0 lea rdi, [rsp+58h+var_48] movaps xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov rsi, [rsi+8] sub rsi, [r14] sar rsi, 3 call _ZNSt6vectorIN4coro6detail13when_all_taskIvEESaIS3_EE7reserveEm; std::vector<coro::detail::when_all_task<void>>::reserve(ulong) mov r13, [r14] mov rbp, [r14+8] cmp r13, rbp jz short loc_3FF2 lea rbx, _ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__destroy lea r14, [rsp+58h+var_48] mov r15, rsp loc_3F9B: mov r12, [r13+0] mov qword ptr [r13+0], 0 mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, _ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__resume mov [rax], rcx mov [rax+8], rbx mov [rax+28h], r12 xorps xmm0, xmm0 movups xmmword ptr [rax+10h], xmm0 mov byte ptr [rax+30h], 0 mov [rsp+58h+var_58], rax mov rdi, r14 mov rsi, r15 call _ZNSt6vectorIN4coro6detail13when_all_taskIvEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<coro::detail::when_all_task<void>>::emplace_back<coro::detail::when_all_task<void>>(coro::detail::when_all_task<void> &&) mov rdi, [rsp+58h+var_58] test rdi, rdi jz short loc_3FE9 call qword ptr [rdi+8] loc_3FE9: add r13, 8 cmp r13, rbp jnz short loc_3F9B loc_3FF2: lea rdi, [rsp+58h+var_48] mov rax, [rdi] mov rcx, [rdi+8] mov rdx, rcx sub rdx, rax sar rdx, 3 inc rdx mov rbx, [rsp+58h+var_50] mov [rbx], rdx xor edx, edx mov [rbx+8], rdx mov [rbx+10h], rax mov [rbx+18h], rcx mov rax, [rdi+10h] mov [rbx+20h], rax mov [rdi+10h], rdx xorps xmm0, xmm0 movaps xmmword ptr [rdi], xmm0 call _ZNSt6vectorIN4coro6detail13when_all_taskIvEESaIS3_EED2Ev; std::vector<coro::detail::when_all_task<void>>::~vector() mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax jmp short loc_4074 jmp short loc_4086 mov rbx, rax test r12, r12 jz short loc_4074 mov rdi, r12 call qword ptr [r12+8] jmp short loc_4074 jmp short loc_4086 mov rbx, rax mov rdi, [rsp+58h+var_58] test rdi, rdi jz short loc_4074 call qword ptr [rdi+8] loc_4074: lea rdi, [rsp+58h+var_48] call _ZNSt6vectorIN4coro6detail13when_all_taskIvEESaIS3_EED2Ev; std::vector<coro::detail::when_all_task<void>>::~vector() mov rdi, rbx call __Unwind_Resume loc_4086: mov rdi, rax call __clang_call_terminate
_QWORD * ZN4coro8when_allITkNSt6ranges5rangeESt6vectorINS_4taskIvEESaIS4_EETkNS_8concepts9awaitableES4_vEENS_6detail24when_all_ready_awaitableIS2_INS8_13when_all_taskIT1_EESaISC_EEEET_( _QWORD *a1, long long **a2) { long long *v2; // r13 long long *v3; // rbp long long v4; // r12 long long v5; // rax __int128 v6; // kr00_16 _QWORD *v7; // rbx long long v9; // [rsp+0h] [rbp-58h] BYREF _QWORD *v10; // [rsp+8h] [rbp-50h] __int128 v11; // [rsp+10h] [rbp-48h] BYREF long long v12; // [rsp+20h] [rbp-38h] v10 = a1; v11 = 0LL; v12 = 0LL; std::vector<coro::detail::when_all_task<void>>::reserve(&v11, a2[1] - *a2); v2 = *a2; v3 = a2[1]; if ( *a2 != v3 ) { do { v4 = *v2; *v2 = 0LL; v5 = operator new(0x38uLL); *(_QWORD *)v5 = ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__resume; *(_QWORD *)(v5 + 8) = ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__destroy; *(_QWORD *)(v5 + 40) = v4; *(_OWORD *)(v5 + 16) = 0LL; *(_BYTE *)(v5 + 48) = 0; v9 = v5; std::vector<coro::detail::when_all_task<void>>::emplace_back<coro::detail::when_all_task<void>>(&v11, &v9); if ( v9 ) (*(void (**)(void))(v9 + 8))(); ++v2; } while ( v2 != v3 ); } v6 = v11; v7 = v10; *v10 = ((long long)(*((_QWORD *)&v11 + 1) - v11) >> 3) + 1; v7[1] = 0LL; *((_OWORD *)v7 + 1) = v6; v7[4] = v12; v12 = 0LL; v11 = 0LL; std::vector<coro::detail::when_all_task<void>>::~vector(&v11); return v7; }
_ZN4coro8when_allITkNSt6ranges5rangeESt6vectorINS_4taskIvEESaIS4_EETkNS_8concepts9awaitableES4_vEENS_6detail24when_all_ready_awaitableIS2_INS8_13when_all_taskIT1_EESaISC_EEEET_: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV qword ptr [RSP + 0x8],RDI XORPS XMM0,XMM0 LEA RDI,[RSP + 0x10] MOVAPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV RSI,qword ptr [RSI + 0x8] SUB RSI,qword ptr [R14] SAR RSI,0x3 LAB_00103f7b: CALL 0x00104820 MOV R13,qword ptr [R14] MOV RBP,qword ptr [R14 + 0x8] CMP R13,RBP JZ 0x00103ff2 LEA RBX,[0x103b0a] LEA R14,[RSP + 0x10] MOV R15,RSP LAB_00103f9b: MOV R12,qword ptr [R13] MOV qword ptr [R13],0x0 LAB_00103fa7: MOV EDI,0x38 CALL 0x00103230 LEA RCX,[0x103a74] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],RBX MOV qword ptr [RAX + 0x28],R12 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOV byte ptr [RAX + 0x30],0x0 MOV qword ptr [RSP],RAX LAB_00103fd2: MOV RDI,R14 MOV RSI,R15 CALL 0x001048cc MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x00103fe9 LAB_00103fe6: CALL qword ptr [RDI + 0x8] LAB_00103fe9: ADD R13,0x8 CMP R13,RBP JNZ 0x00103f9b LAB_00103ff2: LEA RDI,[RSP + 0x10] MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] MOV RDX,RCX SUB RDX,RAX SAR RDX,0x3 INC RDX MOV RBX,qword ptr [RSP + 0x8] MOV qword ptr [RBX],RDX XOR EDX,EDX MOV qword ptr [RBX + 0x8],RDX MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [RBX + 0x18],RCX MOV RAX,qword ptr [RDI + 0x10] MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RDI + 0x10],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RDI],XMM0 CALL 0x00104602 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * _ZN4coro8when_allITkNSt6ranges5rangeESt6vectorINS_4taskIvEESaIS4_EETkNS_8concepts9awaitableES4_vEENS_6detail24when_all_ready_awaitableIS2_INS8_13when_all_taskIT1_EESaISC_EEEET_ (long *param_1,long *param_2) { int8 *puVar1; int8 uVar2; long *plVar3; int8 *puVar4; int8 *local_58; long *local_50; long local_48; long lStack_40; long local_38; local_48 = 0; lStack_40 = 0; local_38 = 0; local_50 = param_1; /* try { // try from 00103f7b to 00103f7f has its CatchHandler @ 0010404a */ std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>:: reserve((vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>> *)&local_48,param_2[1] - *param_2 >> 3); puVar4 = (int8 *)*param_2; puVar1 = (int8 *)param_2[1]; if (puVar4 != puVar1) { do { uVar2 = *puVar4; *puVar4 = 0; /* try { // try from 00103fa7 to 00103fb0 has its CatchHandler @ 00104051 */ local_58 = (int8 *)operator_new(0x38); *local_58 = _ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__resume ; local_58[1] = _ZN4coro6detailL18make_when_all_taskITkNS_8concepts9awaitableENS_4taskIvEEvEENS0_13when_all_taskIT0_EET__destroy ; local_58[5] = uVar2; local_58[2] = 0; local_58[3] = 0; *(int1 *)(local_58 + 6) = 0; /* try { // try from 00103fd2 to 00103fdc has its CatchHandler @ 00104065 */ std:: vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>:: emplace_back<coro::detail::when_all_task<void>> ((vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>> *)&local_48,(when_all_task *)&local_58); if (local_58 != (int8 *)0x0) { /* try { // try from 00103fe6 to 00103fe8 has its CatchHandler @ 0010404f */ (*(code *)local_58[1])(); } puVar4 = puVar4 + 1; } while (puVar4 != puVar1); } plVar3 = local_50; *local_50 = (lStack_40 - local_48 >> 3) + 1; local_50[1] = 0; local_50[2] = local_48; local_50[3] = lStack_40; local_50[4] = local_38; local_38 = 0; local_48 = 0; lStack_40 = 0; std::vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>>:: ~vector((vector<coro::detail::when_all_task<void>,std::allocator<coro::detail::when_all_task<void>>> *)&local_48); return plVar3; }
39,772
maria_reset
eloqsql/storage/maria/ma_extra.c
int maria_reset(MARIA_HA *info) { int error= 0; MARIA_SHARE *share= info->s; myf flag= MY_WME | (share->temporary ? MY_THREAD_SPECIFIC : 0); DBUG_ENTER("maria_reset"); /* Free buffers and reset the following flags: EXTRA_CACHE, EXTRA_WRITE_CACHE, EXTRA_KEYREAD, EXTRA_QUICK If the row buffer cache is large (for dynamic tables), reduce it to save memory. */ if (info->opt_flag & (READ_CACHE_USED | WRITE_CACHE_USED)) { info->opt_flag&= ~(READ_CACHE_USED | WRITE_CACHE_USED); error= end_io_cache(&info->rec_cache); } /* Free memory used for keeping blobs */ if (share->base.blobs) { if (info->rec_buff_size > share->base.default_rec_buff_size) { info->rec_buff_size= 1; /* Force realloc */ _ma_alloc_buffer(&info->rec_buff, &info->rec_buff_size, share->base.default_rec_buff_size, flag); } if (info->blob_buff_size > MARIA_SMALL_BLOB_BUFFER) { info->blob_buff_size= 1; /* Force realloc */ _ma_alloc_buffer(&info->blob_buff, &info->blob_buff_size, MARIA_SMALL_BLOB_BUFFER, flag); } } #if defined(HAVE_MMAP) && defined(HAVE_MADVISE) if (info->opt_flag & MEMMAP_USED) madvise((char*) share->file_map, share->state.state.data_file_length, MADV_RANDOM); #endif info->opt_flag&= ~(KEY_READ_USED | REMEMBER_OLD_POS); info->quick_mode= 0; info->lastinx= ~0; /* detect index changes */ info->last_search_keypage= info->cur_row.lastpos= HA_OFFSET_ERROR; info->page_changed= 1; info->update= ((info->update & HA_STATE_CHANGED) | HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND); info->error_count= 0; DBUG_RETURN(error); }
O3
c
maria_reset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq (%rdi), %r12 xorl %r15d, %r15d cmpb $0x0, 0x7d9(%r12) setne %r13b movl 0x61c(%rdi), %eax testb $0x12, %al je 0x37477 andl $-0x13, %eax movl %eax, 0x61c(%rbx) leaq 0x4b8(%rbx), %rdi callq 0x973e3 movl %eax, %r14d jmp 0x3747a xorl %r14d, %r14d cmpl $0x0, 0x3f0(%r12) je 0x374fd movb %r13b, %r15b shll $0x10, %r15d orq $0x10, %r15 movl 0x420(%r12), %eax cmpq %rax, 0x460(%rbx) jbe 0x374ca leaq 0x460(%rbx), %rsi movq $0x1, 0x460(%rbx) leaq 0x3a0(%rbx), %rdi movl 0x420(%r12), %edx movq %r15, %rcx callq 0x55d87 cmpq $0x401, 0x468(%rbx) # imm = 0x401 jb 0x374fd leaq 0x468(%rbx), %rsi movq $0x1, 0x468(%rbx) leaq 0x3a8(%rbx), %rdi movl $0x400, %edx # imm = 0x400 movq %r15, %rcx callq 0x55d87 movl 0x61c(%rbx), %eax testb $0x20, %al je 0x37524 movq 0x5f0(%r12), %rdi movq 0x40(%r12), %rsi movl $0x1, %edx callq 0x29490 movl 0x61c(%rbx), %eax andl $-0x49, %eax movl %eax, 0x61c(%rbx) movb $0x0, 0x682(%rbx) movq $-0x1, %rax movq %rax, 0x98(%rbx) movq %rax, 0x448(%rbx) movb $0x1, 0x684(%rbx) movl 0x624(%rbx), %eax andl $0x1, %eax orl $0x30, %eax movl %eax, 0x624(%rbx) movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rax, 0x628(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
maria_reset: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov r12, [rdi] xor r15d, r15d cmp byte ptr [r12+7D9h], 0 setnz r13b mov eax, [rdi+61Ch] test al, 12h jz short loc_37477 and eax, 0FFFFFFEDh mov [rbx+61Ch], eax lea rdi, [rbx+4B8h] call end_io_cache mov r14d, eax jmp short loc_3747A loc_37477: xor r14d, r14d loc_3747A: cmp dword ptr [r12+3F0h], 0 jz short loc_374FD mov r15b, r13b shl r15d, 10h or r15, 10h mov eax, [r12+420h] cmp [rbx+460h], rax jbe short loc_374CA lea rsi, [rbx+460h] mov qword ptr [rbx+460h], 1 lea rdi, [rbx+3A0h] mov edx, [r12+420h] mov rcx, r15 call _ma_alloc_buffer loc_374CA: cmp qword ptr [rbx+468h], 401h jb short loc_374FD lea rsi, [rbx+468h] mov qword ptr [rbx+468h], 1 lea rdi, [rbx+3A8h] mov edx, 400h mov rcx, r15 call _ma_alloc_buffer loc_374FD: mov eax, [rbx+61Ch] test al, 20h jz short loc_37524 mov rdi, [r12+5F0h] mov rsi, [r12+40h] mov edx, 1 call _madvise mov eax, [rbx+61Ch] loc_37524: and eax, 0FFFFFFB7h mov [rbx+61Ch], eax mov byte ptr [rbx+682h], 0 mov rax, 0FFFFFFFFFFFFFFFFh mov [rbx+98h], rax mov [rbx+448h], rax mov byte ptr [rbx+684h], 1 mov eax, [rbx+624h] and eax, 1 or eax, 30h mov [rbx+624h], eax mov rax, 0FFFFFFFF00000000h mov [rbx+628h], rax mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long maria_reset(long long *a1) { long long v1; // r12 int v2; // r15d bool v3; // r13 int v4; // eax unsigned int v5; // r14d long long v6; // r15 int v7; // eax v1 = *a1; v2 = 0; v3 = *(_BYTE *)(*a1 + 2009) != 0; v4 = *((_DWORD *)a1 + 391); if ( (v4 & 0x12) != 0 ) { *((_DWORD *)a1 + 391) = v4 & 0xFFFFFFED; v5 = end_io_cache(a1 + 151); } else { v5 = 0; } if ( *(_DWORD *)(v1 + 1008) ) { LOBYTE(v2) = v3; v6 = (unsigned int)(v2 << 16) | 0x10LL; if ( a1[140] > (unsigned long long)*(unsigned int *)(v1 + 1056) ) { a1[140] = 1LL; ma_alloc_buffer(a1 + 116, a1 + 140, *(unsigned int *)(v1 + 1056), v6); } if ( (unsigned long long)a1[141] >= 0x401 ) { a1[141] = 1LL; ma_alloc_buffer(a1 + 117, a1 + 141, 1024LL, v6); } } v7 = *((_DWORD *)a1 + 391); if ( (v7 & 0x20) != 0 ) { madvise(*(_QWORD *)(v1 + 1520), *(_QWORD *)(v1 + 64), 1LL); v7 = *((_DWORD *)a1 + 391); } *((_DWORD *)a1 + 391) = v7 & 0xFFFFFFB7; *((_BYTE *)a1 + 1666) = 0; a1[19] = -1LL; a1[137] = -1LL; *((_BYTE *)a1 + 1668) = 1; *((_DWORD *)a1 + 393) = *((_DWORD *)a1 + 393) & 1 | 0x30; a1[197] = 0xFFFFFFFF00000000LL; return v5; }
maria_reset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R12,qword ptr [RDI] XOR R15D,R15D CMP byte ptr [R12 + 0x7d9],0x0 SETNZ R13B MOV EAX,dword ptr [RDI + 0x61c] TEST AL,0x12 JZ 0x00137477 AND EAX,0xffffffed MOV dword ptr [RBX + 0x61c],EAX LEA RDI,[RBX + 0x4b8] CALL 0x001973e3 MOV R14D,EAX JMP 0x0013747a LAB_00137477: XOR R14D,R14D LAB_0013747a: CMP dword ptr [R12 + 0x3f0],0x0 JZ 0x001374fd MOV R15B,R13B SHL R15D,0x10 OR R15,0x10 MOV EAX,dword ptr [R12 + 0x420] CMP qword ptr [RBX + 0x460],RAX JBE 0x001374ca LEA RSI,[RBX + 0x460] MOV qword ptr [RBX + 0x460],0x1 LEA RDI,[RBX + 0x3a0] MOV EDX,dword ptr [R12 + 0x420] MOV RCX,R15 CALL 0x00155d87 LAB_001374ca: CMP qword ptr [RBX + 0x468],0x401 JC 0x001374fd LEA RSI,[RBX + 0x468] MOV qword ptr [RBX + 0x468],0x1 LEA RDI,[RBX + 0x3a8] MOV EDX,0x400 MOV RCX,R15 CALL 0x00155d87 LAB_001374fd: MOV EAX,dword ptr [RBX + 0x61c] TEST AL,0x20 JZ 0x00137524 MOV RDI,qword ptr [R12 + 0x5f0] MOV RSI,qword ptr [R12 + 0x40] MOV EDX,0x1 CALL 0x00129490 MOV EAX,dword ptr [RBX + 0x61c] LAB_00137524: AND EAX,0xffffffb7 MOV dword ptr [RBX + 0x61c],EAX MOV byte ptr [RBX + 0x682],0x0 MOV RAX,-0x1 MOV qword ptr [RBX + 0x98],RAX MOV qword ptr [RBX + 0x448],RAX MOV byte ptr [RBX + 0x684],0x1 MOV EAX,dword ptr [RBX + 0x624] AND EAX,0x1 OR EAX,0x30 MOV dword ptr [RBX + 0x624],EAX MOV RAX,-0x100000000 MOV qword ptr [RBX + 0x628],RAX MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 maria_reset(long *param_1) { char cVar1; long lVar2; int4 uVar3; uint uVar4; ulong uVar5; lVar2 = *param_1; cVar1 = *(char *)(lVar2 + 0x7d9); if ((*(uint *)((long)param_1 + 0x61c) & 0x12) == 0) { uVar3 = 0; } else { *(uint *)((long)param_1 + 0x61c) = *(uint *)((long)param_1 + 0x61c) & 0xffffffed; uVar3 = end_io_cache(param_1 + 0x97); } if (*(int *)(lVar2 + 0x3f0) != 0) { uVar5 = (ulong)(cVar1 != '\0') << 0x10 | 0x10; if ((ulong)*(uint *)(lVar2 + 0x420) < (ulong)param_1[0x8c]) { param_1[0x8c] = 1; _ma_alloc_buffer(param_1 + 0x74,param_1 + 0x8c,*(int4 *)(lVar2 + 0x420),uVar5); } if (0x400 < (ulong)param_1[0x8d]) { param_1[0x8d] = 1; _ma_alloc_buffer(param_1 + 0x75,param_1 + 0x8d,0x400,uVar5); } } uVar4 = *(uint *)((long)param_1 + 0x61c); if ((uVar4 & 0x20) != 0) { madvise(*(void **)(lVar2 + 0x5f0),*(size_t *)(lVar2 + 0x40),1); uVar4 = *(uint *)((long)param_1 + 0x61c); } *(uint *)((long)param_1 + 0x61c) = uVar4 & 0xffffffb7; *(int1 *)((long)param_1 + 0x682) = 0; param_1[0x13] = -1; param_1[0x89] = -1; *(int1 *)((long)param_1 + 0x684) = 1; *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 1 | 0x30; param_1[0xc5] = -0x100000000; return uVar3; }
39,773
my_xml_attr_ensure_space
eloqsql/strings/xml.c
static int my_xml_attr_ensure_space(MY_XML_PARSER *st, size_t len) { size_t ofs= st->attr.end - st->attr.start; len++; // Add terminating zero. if (ofs + len > st->attr.buffer_size) { st->attr.buffer_size= (SIZE_T_MAX - len) / 2 > st->attr.buffer_size ? st->attr.buffer_size * 2 + len : SIZE_T_MAX; if (!st->attr.buffer) { st->attr.buffer= (char *) my_malloc(PSI_INSTRUMENT_ME, st->attr.buffer_size, MYF(0)); if (st->attr.buffer) memcpy(st->attr.buffer, st->attr.static_buffer, ofs + 1 /*term. zero */); } else st->attr.buffer= (char *) my_realloc(PSI_INSTRUMENT_ME, st->attr.buffer, st->attr.buffer_size, MYF(0)); st->attr.start= st->attr.buffer; st->attr.end= st->attr.start + ofs; return st->attr.buffer ? MY_XML_OK : MY_XML_ERROR; } return MY_XML_OK; }
O0
c
my_xml_attr_ensure_space: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movq -0x10(%rbp), %rcx movq 0x118(%rcx), %rcx subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax addq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x110(%rcx), %rax jbe 0xad763 movq $-0x1, %rax subq -0x18(%rbp), %rax shrq %rax movq -0x10(%rbp), %rcx cmpq 0x110(%rcx), %rax jbe 0xad665 movq -0x10(%rbp), %rax movq 0x110(%rax), %rax shlq %rax addq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0xad672 movq $-0x1, %rax movq %rax, -0x28(%rbp) jmp 0xad672 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x110(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x108(%rax) jne 0xad6e6 movq -0x10(%rbp), %rax movq 0x110(%rax), %rsi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0x58f20 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x108(%rax) movq -0x10(%rbp), %rax cmpq $0x0, 0x108(%rax) je 0xad6e4 movq -0x10(%rbp), %rax movq 0x108(%rax), %rdi movq -0x10(%rbp), %rsi addq $0x88, %rsi movq -0x20(%rbp), %rdx addq $0x1, %rdx callq 0x26280 jmp 0xad715 movq -0x10(%rbp), %rax movq 0x108(%rax), %rsi movq -0x10(%rbp), %rax movq 0x110(%rax), %rdx xorl %edi, %edi xorl %eax, %eax movl %eax, %ecx callq 0x590f0 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x108(%rax) movq -0x10(%rbp), %rax movq 0x108(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x118(%rax) movq -0x10(%rbp), %rax movq 0x118(%rax), %rcx addq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x120(%rax) movq -0x10(%rbp), %rax movq 0x108(%rax), %rdx movl $0x1, %eax xorl %ecx, %ecx cmpq $0x0, %rdx cmovnel %ecx, %eax movl %eax, -0x4(%rbp) jmp 0xad76a movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
my_xml_attr_ensure_space: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax+120h] mov rcx, [rbp+var_10] mov rcx, [rcx+118h] sub rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_20] add rax, [rbp+var_18] mov rcx, [rbp+var_10] cmp rax, [rcx+110h] jbe loc_AD763 mov rax, 0FFFFFFFFFFFFFFFFh sub rax, [rbp+var_18] shr rax, 1 mov rcx, [rbp+var_10] cmp rax, [rcx+110h] jbe short loc_AD665 mov rax, [rbp+var_10] mov rax, [rax+110h] shl rax, 1 add rax, [rbp+var_18] mov [rbp+var_28], rax jmp short loc_AD672 loc_AD665: mov rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_28], rax jmp short $+2 loc_AD672: mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+110h], rcx mov rax, [rbp+var_10] cmp qword ptr [rax+108h], 0 jnz short loc_AD6E6 mov rax, [rbp+var_10] mov rsi, [rax+110h] xor edi, edi xor eax, eax mov edx, eax call my_malloc mov rcx, rax mov rax, [rbp+var_10] mov [rax+108h], rcx mov rax, [rbp+var_10] cmp qword ptr [rax+108h], 0 jz short loc_AD6E4 mov rax, [rbp+var_10] mov rdi, [rax+108h] mov rsi, [rbp+var_10] add rsi, 88h mov rdx, [rbp+var_20] add rdx, 1 call _memcpy loc_AD6E4: jmp short loc_AD715 loc_AD6E6: mov rax, [rbp+var_10] mov rsi, [rax+108h] mov rax, [rbp+var_10] mov rdx, [rax+110h] xor edi, edi xor eax, eax mov ecx, eax call my_realloc mov rcx, rax mov rax, [rbp+var_10] mov [rax+108h], rcx loc_AD715: mov rax, [rbp+var_10] mov rcx, [rax+108h] mov rax, [rbp+var_10] mov [rax+118h], rcx mov rax, [rbp+var_10] mov rcx, [rax+118h] add rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+120h], rcx mov rax, [rbp+var_10] mov rdx, [rax+108h] mov eax, 1 xor ecx, ecx cmp rdx, 0 cmovnz eax, ecx mov [rbp+var_4], eax jmp short loc_AD76A loc_AD763: mov [rbp+var_4], 0 loc_AD76A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
_BOOL8 my_xml_attr_ensure_space(_QWORD *a1, long long a2) { long long v3; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] v4 = a1[36] - a1[35]; v5 = a2 + 1; if ( (unsigned long long)(a2 + 1 + v4) <= a1[34] ) { return 0; } else { if ( (unsigned long long)(-1 - v5) >> 1 <= a1[34] ) v3 = -1LL; else v3 = v5 + 2LL * a1[34]; a1[34] = v3; if ( a1[33] ) { a1[33] = my_realloc(0, a1[33], a1[34], 0); } else { a1[33] = my_malloc(0, a1[34], 0); if ( a1[33] ) memcpy(a1[33], a1 + 17, v4 + 1); } a1[35] = a1[33]; a1[36] = v4 + a1[35]; return a1[33] == 0LL; } }
my_xml_attr_ensure_space: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x118] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x110] JBE 0x001ad763 MOV RAX,-0x1 SUB RAX,qword ptr [RBP + -0x18] SHR RAX,0x1 MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x110] JBE 0x001ad665 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x110] SHL RAX,0x1 ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX JMP 0x001ad672 LAB_001ad665: MOV RAX,-0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x001ad672 LAB_001ad672: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x110],RCX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x108],0x0 JNZ 0x001ad6e6 MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x110] XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x00158f20 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x108],RCX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x108],0x0 JZ 0x001ad6e4 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x108] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x88 MOV RDX,qword ptr [RBP + -0x20] ADD RDX,0x1 CALL 0x00126280 LAB_001ad6e4: JMP 0x001ad715 LAB_001ad6e6: MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x108] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x110] XOR EDI,EDI XOR EAX,EAX MOV ECX,EAX CALL 0x001590f0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x108],RCX LAB_001ad715: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x108] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x118],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x118] ADD RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x120],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x108] MOV EAX,0x1 XOR ECX,ECX CMP RDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX JMP 0x001ad76a LAB_001ad763: MOV dword ptr [RBP + -0x4],0x0 LAB_001ad76a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
bool my_xml_attr_ensure_space(long param_1,long param_2) { long lVar1; int8 uVar2; bool bVar3; long local_30; lVar1 = *(long *)(param_1 + 0x120) - *(long *)(param_1 + 0x118); param_2 = param_2 + 1; if (*(ulong *)(param_1 + 0x110) < (ulong)(lVar1 + param_2)) { if (*(ulong *)(param_1 + 0x110) < -param_2 - 1U >> 1) { local_30 = *(long *)(param_1 + 0x110) * 2 + param_2; } else { local_30 = -1; } *(long *)(param_1 + 0x110) = local_30; if (*(long *)(param_1 + 0x108) == 0) { uVar2 = my_malloc(0,*(int8 *)(param_1 + 0x110),0); *(int8 *)(param_1 + 0x108) = uVar2; if (*(long *)(param_1 + 0x108) != 0) { memcpy(*(void **)(param_1 + 0x108),(void *)(param_1 + 0x88),lVar1 + 1); } } else { uVar2 = my_realloc(0,*(int8 *)(param_1 + 0x108),*(int8 *)(param_1 + 0x110),0); *(int8 *)(param_1 + 0x108) = uVar2; } *(int8 *)(param_1 + 0x118) = *(int8 *)(param_1 + 0x108); *(long *)(param_1 + 0x120) = *(long *)(param_1 + 0x118) + lVar1; bVar3 = *(long *)(param_1 + 0x108) == 0; } else { bVar3 = false; } return bVar3; }
39,774
spdlog::details::p_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h
void format(const details::log_msg &, const std::tm &tm_time, memory_buf_t &dest) override { const size_t field_size = 2; ScopedPadder p(field_size, padinfo_, dest); fmt_helper::append_string_view(ampm(tm_time), dest); }
O0
c
spdlog::details::p_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&): subq $0x98, %rsp movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) movq %rcx, 0x68(%rsp) movq 0x80(%rsp), %rdx movq $0x2, 0x60(%rsp) addq $0x8, %rdx movq 0x68(%rsp), %rcx leaq 0x38(%rsp), %rdi movl $0x2, %esi callq 0x539a0 movq 0x70(%rsp), %rdi callq 0x384e0 movq %rax, 0x10(%rsp) jmp 0x5bdb8 movq 0x10(%rsp), %rax leaq 0x28(%rsp), %rcx movq %rcx, 0x90(%rsp) movq %rax, 0x88(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x88(%rsp), %rcx movq %rcx, (%rax) movq 0x88(%rsp), %rdi callq 0x14280 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x8(%rax) movq 0x68(%rsp), %rdx movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x3b4e0 jmp 0x5be19 leaq 0x38(%rsp), %rdi callq 0x53a90 addq $0x98, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x38(%rsp), %rdi callq 0x53a90 movq 0x20(%rsp), %rdi callq 0x14c80 nopl (%rax)
_ZN6spdlog7details11p_formatterINS0_13scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE: sub rsp, 98h mov [rsp+98h+var_18], rdi mov [rsp+98h+var_20], rsi mov [rsp+98h+var_28], rdx mov [rsp+98h+var_30], rcx mov rdx, [rsp+98h+var_18] mov [rsp+98h+var_38], 2 add rdx, 8 mov rcx, [rsp+98h+var_30] lea rdi, [rsp+98h+var_60] mov esi, 2 call _ZN6spdlog7details13scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::scoped_padder::scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rdi, [rsp+98h+var_28] call _ZN6spdlog7detailsL4ampmERK2tm; spdlog::details::ampm(tm const&) mov [rsp+98h+var_88], rax jmp short $+2 loc_5BDB8: mov rax, [rsp+98h+var_88] lea rcx, [rsp+98h+var_70] mov [rsp+98h+var_8], rcx mov [rsp+98h+var_10], rax mov rax, [rsp+98h+var_8] mov [rsp+98h+var_90], rax mov rcx, [rsp+98h+var_10] mov [rax], rcx mov rdi, [rsp+98h+var_10] call _strlen mov rcx, rax mov rax, [rsp+98h+var_90] mov [rax+8], rcx mov rdx, [rsp+98h+var_30] mov rdi, [rsp+98h+var_70] mov rsi, [rsp+98h+var_68] call _ZN6spdlog7details10fmt_helper18append_string_viewEN3fmt3v1017basic_string_viewIcEERNS3_19basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_string_view(fmt::v10::basic_string_view<char>,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) jmp short $+2 loc_5BE19: lea rdi, [rsp+98h+var_60]; this call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder() add rsp, 98h retn mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax lea rdi, [rsp+arg_30]; this call _ZN6spdlog7details13scoped_padderD2Ev; spdlog::details::scoped_padder::~scoped_padder() mov rdi, [rsp+arg_18] call __Unwind_Resume
void spdlog::details::p_formatter<spdlog::details::scoped_padder>::format( long long a1, long long a2, long long a3, _QWORD *a4) { const char *v4; // [rsp+10h] [rbp-88h] const char *v5; // [rsp+28h] [rbp-70h] BYREF long long v6; // [rsp+30h] [rbp-68h] _BYTE v7[40]; // [rsp+38h] [rbp-60h] BYREF long long v8; // [rsp+60h] [rbp-38h] _QWORD *v9; // [rsp+68h] [rbp-30h] long long v10; // [rsp+70h] [rbp-28h] long long v11; // [rsp+78h] [rbp-20h] long long v12; // [rsp+80h] [rbp-18h] const char *v13; // [rsp+88h] [rbp-10h] long long *v14; // [rsp+90h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; v8 = 2LL; spdlog::details::scoped_padder::scoped_padder( (spdlog::details::scoped_padder *)v7, 2LL, (_QWORD *)(a1 + 8), (long long)a4); v4 = spdlog::details::ampm(v10); v14 = (long long *)&v5; v13 = v4; v5 = v4; v6 = strlen(v4); spdlog::details::fmt_helper::append_string_view((long long)v5, v6, v9); spdlog::details::scoped_padder::~scoped_padder((spdlog::details::scoped_padder *)v7); }
format: SUB RSP,0x98 MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX MOV qword ptr [RSP + 0x68],RCX MOV RDX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x60],0x2 ADD RDX,0x8 MOV RCX,qword ptr [RSP + 0x68] LEA RDI,[RSP + 0x38] MOV ESI,0x2 CALL 0x001539a0 MOV RDI,qword ptr [RSP + 0x70] LAB_0015bdac: CALL 0x001384e0 MOV qword ptr [RSP + 0x10],RAX JMP 0x0015bdb8 LAB_0015bdb8: MOV RAX,qword ptr [RSP + 0x10] LEA RCX,[RSP + 0x28] MOV qword ptr [RSP + 0x90],RCX MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x88] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x88] CALL 0x00114280 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] CALL 0x0013b4e0 LAB_0015be17: JMP 0x0015be19 LAB_0015be19: LEA RDI,[RSP + 0x38] CALL 0x00153a90 ADD RSP,0x98 RET
/* spdlog::details::p_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */ void __thiscall spdlog::details::p_formatter<spdlog::details::scoped_padder>::format (p_formatter<spdlog::details::scoped_padder> *this,log_msg *param_1,tm *param_2, basic_memory_buffer *param_3) { size_t sVar1; fmt_helper *local_70 [2]; scoped_padder local_60 [40]; int8 local_38; basic_memory_buffer *local_30; tm *local_28; log_msg *local_20; p_formatter<spdlog::details::scoped_padder> *local_18; fmt_helper *local_10; fmt_helper **local_8; local_38 = 2; local_30 = param_3; local_28 = param_2; local_20 = param_1; local_18 = this; scoped_padder::scoped_padder(local_60,2,(padding_info *)(this + 8),param_3); /* try { // try from 0015bdac to 0015be16 has its CatchHandler @ 0015be2b */ local_70[0] = (fmt_helper *)ampm(local_28); local_8 = local_70; local_10 = local_70[0]; sVar1 = strlen((char *)local_70[0]); fmt_helper::append_string_view(local_70[0],sVar1,local_30); scoped_padder::~scoped_padder(local_60); return; }
39,775
js_string_to_bigint
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_to_bigint(JSContext *ctx, const char *buf, int radix) { bf_t *a; int ret; JSValue val; val = JS_NewBigInt(ctx); if (JS_IsException(val)) return val; a = JS_GetBigInt(val); ret = bf_atof(a, buf, NULL, radix, BF_PREC_INF, BF_RNDZ); if (ret & BF_ST_MEM_ERROR) { JS_FreeValue(ctx, val); return JS_ThrowOutOfMemory(ctx); } return JS_CompactBigInt1(ctx, val); }
O0
c
js_string_to_bigint: subq $0x58, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movl %edx, 0x34(%rsp) movq 0x40(%rsp), %rdi callq 0x400c0 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq (%rsp), %rax movq %rax, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0x69d45 movq 0x10(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x50(%rsp) jmp 0x69dd8 movq 0x10(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x40140 movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi movq 0x38(%rsp), %rsi movl 0x34(%rsp), %ecx xorl %eax, %eax movl %eax, %edx movabsq $0x3fffffffffffffff, %r8 # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %r9d callq 0xf2b30 movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax andl $0x20, %eax cmpl $0x0, %eax je 0x69dba movq 0x40(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x29f80 movq 0x40(%rsp), %rdi callq 0x27f00 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) jmp 0x69dd8 movq 0x40(%rsp), %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x69fc0 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq 0x48(%rsp), %rax movq 0x50(%rsp), %rdx addq $0x58, %rsp retq nopw (%rax,%rax)
js_string_to_bigint: sub rsp, 58h mov [rsp+58h+var_18], rdi mov [rsp+58h+var_20], rsi mov [rsp+58h+var_24], edx mov rdi, [rsp+58h+var_18] call JS_NewBigInt mov [rsp+58h+var_58], rax mov [rsp+58h+var_50], rdx mov rax, [rsp+58h+var_58] mov [rsp+58h+var_48], rax mov rax, [rsp+58h+var_50] mov [rsp+58h+var_40], rax mov rdi, [rsp+58h+var_48] mov rsi, [rsp+58h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_69D45 mov rax, [rsp+58h+var_48] mov [rsp+58h+var_10], rax mov rax, [rsp+58h+var_40] mov [rsp+58h+var_8], rax jmp loc_69DD8 loc_69D45: mov rdi, [rsp+58h+var_48] mov rsi, [rsp+58h+var_40] call JS_GetBigInt mov [rsp+58h+var_30], rax mov rdi, [rsp+58h+var_30] mov rsi, [rsp+58h+var_20] mov ecx, [rsp+58h+var_24] xor eax, eax mov edx, eax mov r8, 3FFFFFFFFFFFFFFFh mov r9d, 1 call bf_atof mov [rsp+58h+var_34], eax mov eax, [rsp+58h+var_34] and eax, 20h cmp eax, 0 jz short loc_69DBA mov rdi, [rsp+58h+var_18] mov rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_40] call JS_FreeValue mov rdi, [rsp+58h+var_18] call JS_ThrowOutOfMemory mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx jmp short loc_69DD8 loc_69DBA: mov rdi, [rsp+58h+var_18] mov rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_40] call JS_CompactBigInt1 mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx loc_69DD8: mov rax, [rsp+58h+var_10] mov rdx, [rsp+58h+var_8] add rsp, 58h retn
long long js_string_to_bigint(long long a1, long long a2, unsigned int a3) { long long v3; // rdx int v4; // edx long long v5; // rcx int v6; // r8d int v7; // r9d _DWORD *v9; // [rsp+0h] [rbp-58h] long long v10; // [rsp+8h] [rbp-50h] long long v11; // [rsp+10h] [rbp-48h] long long v12; // [rsp+18h] [rbp-40h] long long BigInt; // [rsp+28h] [rbp-30h] v9 = JS_NewBigInt(a1); v10 = v3; v11 = (long long)v9; v12 = v3; if ( JS_IsException_1((long long)v9, v3) ) return (long long)v9; BigInt = JS_GetBigInt((long long)v9); if ( (bf_atof(BigInt, a2, 0LL, a3, 0x3FFFFFFFFFFFFFFFLL, 1LL, v9, v10) & 0x20) == 0 ) return JS_CompactBigInt1(a1, v11, v12); JS_FreeValue(a1, v11, v12); return JS_ThrowOutOfMemory(a1, v11, v4, v5, v6, v7); }
js_string_to_bigint: SUB RSP,0x58 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV dword ptr [RSP + 0x34],EDX MOV RDI,qword ptr [RSP + 0x40] CALL 0x001400c0 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x00169d45 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x50],RAX JMP 0x00169dd8 LAB_00169d45: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00140140 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x38] MOV ECX,dword ptr [RSP + 0x34] XOR EAX,EAX MOV EDX,EAX MOV R8,0x3fffffffffffffff MOV R9D,0x1 CALL 0x001f2b30 MOV dword ptr [RSP + 0x24],EAX MOV EAX,dword ptr [RSP + 0x24] AND EAX,0x20 CMP EAX,0x0 JZ 0x00169dba MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] CALL 0x00129f80 MOV RDI,qword ptr [RSP + 0x40] CALL 0x00127f00 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX JMP 0x00169dd8 LAB_00169dba: MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] CALL 0x00169fc0 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX LAB_00169dd8: MOV RAX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] ADD RSP,0x58 RET
int1 [16] js_string_to_bigint(int8 param_1,int8 param_2,int4 param_3) { int iVar1; uint uVar2; int8 uVar3; int8 uVar4; int8 uVar5; int1 auVar6 [16]; auVar6 = JS_NewBigInt(param_1); uVar5 = auVar6._8_8_; uVar3 = auVar6._0_8_; iVar1 = JS_IsException(uVar3,uVar5); if (iVar1 == 0) { uVar4 = JS_GetBigInt(uVar3,uVar5); uVar2 = bf_atof(uVar4,param_2,0,param_3,0x3fffffffffffffff,1); if ((uVar2 & 0x20) == 0) { auVar6 = JS_CompactBigInt1(param_1,uVar3,uVar5); } else { JS_FreeValue(param_1,uVar3,uVar5); auVar6 = JS_ThrowOutOfMemory(param_1); } } return auVar6; }
39,776
js_std_setenv
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_setenv(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *name, *value; name = JS_ToCString(ctx, argv[0]); if (!name) return JS_EXCEPTION; value = JS_ToCString(ctx, argv[1]); if (!value) { JS_FreeCString(ctx, name); return JS_EXCEPTION; } setenv(name, value, TRUE); JS_FreeCString(ctx, name); JS_FreeCString(ctx, value); return JS_UNDEFINED; }
O0
c
js_std_setenv: subq $0x48, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x1aad0 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x1b3d5 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x1b45a movq 0x20(%rsp), %rdi movq 0x10(%rsp), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x1aad0 movq %rax, (%rsp) cmpq $0x0, (%rsp) jne 0x1b419 movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x30140 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x1b45a movq 0x8(%rsp), %rdi movq (%rsp), %rsi movl $0x1, %edx callq 0xe1e0 movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x30140 movq 0x20(%rsp), %rdi movq (%rsp), %rsi callq 0x30140 movl $0x0, 0x38(%rsp) movq $0x3, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x48, %rsp retq nopl (%rax)
js_std_setenv: sub rsp, 48h mov [rsp+48h+var_20], rsi mov [rsp+48h+var_18], rdx mov [rsp+48h+var_28], rdi mov [rsp+48h+var_2C], ecx mov [rsp+48h+var_38], r8 mov rdi, [rsp+48h+var_28] mov rax, [rsp+48h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ToCString_0 mov [rsp+48h+var_40], rax cmp [rsp+48h+var_40], 0 jnz short loc_1B3D5 mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp loc_1B45A loc_1B3D5: mov rdi, [rsp+48h+var_28] mov rax, [rsp+48h+var_38] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_ToCString_0 mov [rsp+48h+var_48], rax cmp [rsp+48h+var_48], 0 jnz short loc_1B419 mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_40] call JS_FreeCString mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 6 jmp short loc_1B45A loc_1B419: mov rdi, [rsp+48h+var_40] mov rsi, [rsp+48h+var_48] mov edx, 1 call _setenv mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_40] call JS_FreeCString mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_48] call JS_FreeCString mov dword ptr [rsp+48h+var_10], 0 mov [rsp+48h+var_8], 3 loc_1B45A: mov rax, [rsp+48h+var_10] mov rdx, [rsp+48h+var_8] add rsp, 48h retn
long long js_std_setenv(long long a1, long long a2, long long a3, long long a4, long long *a5, long long a6) { long long v6; // rcx long long v7; // r8 long long v8; // r9 long long v10; // [rsp+0h] [rbp-48h] long long v11; // [rsp+8h] [rbp-40h] long long v13; // [rsp+38h] [rbp-10h] v11 = JS_ToCString_0(a1, *a5, a5[1], a4, (long long)a5, a6); if ( v11 ) { v10 = JS_ToCString_0(a1, a5[2], a5[3], v6, v7, v8); if ( v10 ) { setenv(v11, v10, 1LL); JS_FreeCString(a1, v11); JS_FreeCString(a1, v10); } else { JS_FreeCString(a1, v11); } LODWORD(v13) = 0; } else { LODWORD(v13) = 0; } return v13; }
js_std_setenv: SUB RSP,0x48 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0011aad0 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x0011b3d5 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0011b45a LAB_0011b3d5: MOV RDI,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0011aad0 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JNZ 0x0011b419 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00130140 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0011b45a LAB_0011b419: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP] MOV EDX,0x1 CALL 0x0010e1e0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00130140 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP] CALL 0x00130140 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x3 LAB_0011b45a: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x48 RET
int1 [16] js_std_setenv(int8 param_1) { int1 auVar1 [16]; char *__name; char *__value; int8 *in_R8; int4 uStack_c; int8 local_8; __name = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]); if (__name == (char *)0x0) { local_8 = 6; } else { __value = (char *)JS_ToCString(param_1,in_R8[2],in_R8[3]); if (__value == (char *)0x0) { JS_FreeCString(param_1,__name); local_8 = 6; } else { setenv(__name,__value,1); JS_FreeCString(param_1,__name); JS_FreeCString(param_1,__value); local_8 = 3; } } auVar1._4_8_ = local_8; auVar1._0_4_ = uStack_c; auVar1._12_4_ = 0; return auVar1 << 0x20; }
39,777
minja::Parser::parseVarNames[abi:cxx11]()
monkey531[P]llama/common/minja.hpp
std::vector<std::string> parseVarNames() { static std::regex varnames_regex(R"(((?:\w+)(?:[\r\n\s]*,[\r\n\s]*(?:\w+))*)[\r\n\s]*)"); std::vector<std::string> group; if ((group = consumeTokenGroups(varnames_regex)).empty()) throw std::runtime_error("Expected variable names"); std::vector<std::string> varnames; std::istringstream iss(group[1]); std::string varname; while (std::getline(iss, varname, ',')) { varnames.push_back(strip(varname)); } return varnames; }
O2
cpp
minja::Parser::parseVarNames[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x1e0, %rsp # imm = 0x1E0 movq %rsi, %r14 movq %rdi, %rbx leaq 0xa5d30(%rip), %rax # 0x1226a0 movb (%rax), %al testb %al, %al je 0x7ca76 xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) andq $0x0, 0x10(%rsp) leaq 0xa5cf2(%rip), %rdx # 0x122680 leaq 0x60(%rsp), %rdi pushq $0x1 popq %rcx movq %r14, %rsi callq 0x7c29a movq %rsp, %r14 leaq 0x60(%rsp), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x7d5da movq (%r14), %r12 movq 0x8(%r14), %r14 movq %r15, %rdi callq 0x2b0d2 cmpq %r14, %r12 je 0x7cacb andq $0x0, 0x10(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq (%rsp), %rsi addq $0x20, %rsi leaq 0x60(%rsp), %rdi pushq $0x8 popq %rdx callq 0x27530 leaq 0x30(%rsp), %rax movq %rax, -0x10(%rax) andq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0x60(%rsp), %r14 leaq 0x20(%rsp), %r15 pushq $0x2c popq %rbp leaq 0x40(%rsp), %r12 movq %r14, %rdi movq %r15, %rsi movl %ebp, %edx callq 0x277b0 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x7ca47 movq %r12, %rdi movq %r15, %rsi callq 0x73e6d movq %rbx, %rdi movq %r12, %rsi callq 0x62216 movq %r12, %rdi callq 0x27998 jmp 0x7ca0c leaq 0x20(%rsp), %rdi callq 0x27998 leaq 0x60(%rsp), %rdi callq 0x26580 movq %rsp, %rdi callq 0x2b0d2 movq %rbx, %rax addq $0x1e0, %rsp # imm = 0x1E0 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0xa5c23(%rip), %rdi # 0x1226a0 callq 0x27700 testl %eax, %eax je 0x7c97a leaq 0xa5bef(%rip), %rdi # 0x122680 leaq 0x5530d(%rip), %rsi # 0xd1da5 pushq $0x10 popq %rdx callq 0x6d5d0 leaq -0x3a653(%rip), %rdi # 0x42454 leaq 0xa5bd2(%rip), %rsi # 0x122680 leaq 0xa5223(%rip), %rdx # 0x121cd8 callq 0x26aa0 leaq 0xa5bdf(%rip), %rdi # 0x1226a0 callq 0x26800 jmp 0x7c97a pushq $0x10 popq %rdi callq 0x265e0 movq %rax, %rbx leaq 0x552fa(%rip), %rsi # 0xd1dd7 movq %rax, %rdi callq 0x26420 movq 0xa44fc(%rip), %rsi # 0x120fe8 movq 0xa4455(%rip), %rdx # 0x120f48 movq %rbx, %rdi callq 0x275b0 movq %rax, %r14 leaq 0xa5b9b(%rip), %rdi # 0x1226a0 callq 0x267e0 jmp 0x7cb5d jmp 0x7cb20 movq %rax, %r14 movq %rbx, %rdi callq 0x268f0 jmp 0x7cb55 movq %rax, %r14 jmp 0x7cb4d movq %rax, %r14 jmp 0x7cb55 movq %rax, %r14 leaq 0x40(%rsp), %rdi callq 0x27998 jmp 0x7cb39 jmp 0x7cb36 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x27998 leaq 0x60(%rsp), %rdi callq 0x26580 movq %rbx, %rdi callq 0x2b0d2 movq %rsp, %rdi callq 0x2b0d2 movq %r14, %rdi callq 0x27660
_ZN5minja6Parser13parseVarNamesB5cxx11Ev: push rbp push r15 push r14 push r12 push rbx sub rsp, 1E0h mov r14, rsi mov rbx, rdi lea rax, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; `guard variable for'minja::Parser::parseVarNames(void)::varnames_regex mov al, [rax] test al, al jz loc_7CA76 loc_7C97A: xorps xmm0, xmm0 movaps [rsp+208h+var_208], xmm0 and [rsp+208h+var_1F8], 0 lea rdx, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rdi, [rsp+208h+var_1A8] push 1 pop rcx mov rsi, r14 call _ZN5minja6Parser18consumeTokenGroupsERKNSt7__cxx1111basic_regexIcNS1_12regex_traitsIcEEEENS_13SpaceHandlingE; minja::Parser::consumeTokenGroups(std::basic_regex<char,std::regex_traits<char>> const&,minja::SpaceHandling) mov r14, rsp lea r15, [rsp+208h+var_1A8] mov rdi, r14 mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE14_M_move_assignEOS7_St17integral_constantIbLb1EE; std::vector<std::string>::_M_move_assign(std::vector<std::string>&&,std::integral_constant<bool,true>) mov r12, [r14] mov r14, [r14+8] mov rdi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() cmp r12, r14 jz loc_7CACB and qword ptr [rbx+10h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rsi, qword ptr [rsp+208h+var_208] add rsi, 20h ; ' ' lea rdi, [rsp+208h+var_1A8] push 8 pop rdx call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rax, [rsp+208h+var_1D8] mov [rax-10h], rax and qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea r14, [rsp+208h+var_1A8] lea r15, [rsp+208h+var_1E8] push 2Ch ; ',' pop rbp lea r12, [rsp+208h+var_1C8] loc_7CA0C: mov rdi, r14 mov rsi, r15 mov edx, ebp call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_7CA47 mov rdi, r12 mov rsi, r15 call _ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::strip(std::string const&) mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEERS5_DpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, r12; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7CA0C loc_7CA47: lea rdi, [rsp+208h+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+208h+var_1A8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, rbx add rsp, 1E0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_7CA76: lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz loc_7C97A lea rdi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; minja::Parser::parseVarNames(void)::varnames_regex lea rsi, aWRNSRNSWRNS; "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?"... push 10h pop rdx call _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEEC2EPKcNSt15regex_constants18syntax_option_typeE; std::basic_regex<char,std::regex_traits<char>>::basic_regex(char const*,std::regex_constants::syntax_option_type) lea rdi, _ZNSt7__cxx1111basic_regexIcNS_12regex_traitsIcEEED2Ev; lpfunc lea rsi, _ZZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_release jmp loc_7C97A loc_7CACB: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aExpectedVariab; "Expected variable names" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, _ZGVZN5minja6Parser13parseVarNamesB5cxx11EvE14varnames_regexB5cxx11; __guard * call ___cxa_guard_abort jmp short loc_7CB5D jmp short loc_7CB20 mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_7CB55 mov r14, rax jmp short loc_7CB4D loc_7CB20: mov r14, rax jmp short loc_7CB55 mov r14, rax lea rdi, [rsp+208h+var_1C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7CB39 jmp short $+2 loc_7CB36: mov r14, rax loc_7CB39: lea rdi, [rsp+208h+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+208h+var_1A8] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev; std::istringstream::~istringstream() loc_7CB4D: mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_7CB55: mov rdi, rsp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() loc_7CB5D: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseVarNames[abi:cxx11](long long a1, long long a2) { __int128 v2; // kr00_16 _QWORD *v3; // rax std::runtime_error *exception; // rbx __int128 v6; // [rsp+0h] [rbp-208h] BYREF long long v7; // [rsp+10h] [rbp-1F8h] _QWORD v8[2]; // [rsp+20h] [rbp-1E8h] BYREF char v9; // [rsp+30h] [rbp-1D8h] BYREF _QWORD v10[4]; // [rsp+40h] [rbp-1C8h] BYREF _BYTE v11[424]; // [rsp+60h] [rbp-1A8h] BYREF if ( !(_BYTE)`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]) ) { std::basic_regex<char,std::regex_traits<char>>::basic_regex( (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], (long long)"((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*", 0x10u); __cxa_atexit( (void (*)(void *))std::basic_regex<char,std::regex_traits<char>>::~basic_regex, &minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11]); } v6 = 0LL; v7 = 0LL; minja::Parser::consumeTokenGroups( (long long)v11, a2, (long long)&minja::Parser::parseVarNames[abi:cxx11](void)::varnames_regex[abi:cxx11], 1u); std::vector<std::string>::_M_move_assign(&v6, v11); v2 = v6; std::vector<std::string>::~vector((long long)v11); if ( (_QWORD)v2 == *((_QWORD *)&v2 + 1) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected variable names"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; std::istringstream::basic_istringstream(v11, v6 + 32, 8LL); v8[0] = &v9; v8[1] = 0LL; v9 = 0; while ( 1 ) { v3 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v11, v8, 44LL); if ( (*((_BYTE *)v3 + *(_QWORD *)(*v3 - 24LL) + 32) & 5) != 0 ) break; minja::strip(v10, (long long)v8); std::vector<std::string>::emplace_back<std::string>(a1, (long long)v10); std::string::~string(v10); } std::string::~string(v8); std::istringstream::~istringstream(v11); std::vector<std::string>::~vector((long long)&v6); return a1; }
parseVarNames[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x1e0 MOV R14,RSI MOV RBX,RDI LEA RAX,[0x2226a0] MOV AL,byte ptr [RAX] TEST AL,AL JZ 0x0017ca76 LAB_0017c97a: XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 AND qword ptr [RSP + 0x10],0x0 LAB_0017c987: LEA RDX,[0x222680] LEA RDI,[RSP + 0x60] PUSH 0x1 POP RCX MOV RSI,R14 CALL 0x0017c29a MOV R14,RSP LEA R15,[RSP + 0x60] MOV RDI,R14 MOV RSI,R15 CALL 0x0017d5da MOV R12,qword ptr [R14] MOV R14,qword ptr [R14 + 0x8] MOV RDI,R15 CALL 0x0012b0d2 CMP R12,R14 JZ 0x0017cacb AND qword ptr [RBX + 0x10],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV RSI,qword ptr [RSP] ADD RSI,0x20 LAB_0017c9dc: LEA RDI,[RSP + 0x60] PUSH 0x8 POP RDX CALL 0x00127530 LEA RAX,[RSP + 0x30] MOV qword ptr [RAX + -0x10],RAX AND qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA R14,[RSP + 0x60] LEA R15,[RSP + 0x20] PUSH 0x2c POP RBP LEA R12,[RSP + 0x40] LAB_0017ca0c: MOV RDI,R14 MOV RSI,R15 MOV EDX,EBP CALL 0x001277b0 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x0017ca47 LAB_0017ca27: MOV RDI,R12 MOV RSI,R15 CALL 0x00173e6d LAB_0017ca32: MOV RDI,RBX MOV RSI,R12 CALL 0x00162216 MOV RDI,R12 CALL 0x00127998 JMP 0x0017ca0c LAB_0017ca47: LEA RDI,[RSP + 0x20] CALL 0x00127998 LEA RDI,[RSP + 0x60] CALL 0x00126580 MOV RDI,RSP CALL 0x0012b0d2 MOV RAX,RBX ADD RSP,0x1e0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0017ca76: LEA RDI,[0x2226a0] CALL 0x00127700 TEST EAX,EAX JZ 0x0017c97a LAB_0017ca8a: LEA RDI,[0x222680] LEA RSI,[0x1d1da5] PUSH 0x10 POP RDX CALL 0x0016d5d0 LAB_0017caa0: LEA RDI,[0x142454] LEA RSI,[0x222680] LEA RDX,[0x221cd8] CALL 0x00126aa0 LEA RDI,[0x2226a0] CALL 0x00126800 JMP 0x0017c97a LAB_0017cacb: PUSH 0x10 POP RDI CALL 0x001265e0 MOV RBX,RAX LAB_0017cad6: LEA RSI,[0x1d1dd7] MOV RDI,RAX CALL 0x00126420 LAB_0017cae5: MOV RSI,qword ptr [0x00220fe8] MOV RDX,qword ptr [0x00220f48] MOV RDI,RBX CALL 0x001275b0
/* minja::Parser::parseVarNames[abi:cxx11]() */ void minja::Parser::parseVarNames_abi_cxx11_(void) { long lVar1; long lVar2; int iVar3; istream *piVar4; runtime_error *this; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *in_RDI; long local_208; long lStack_200; int8 local_1f8; int1 *local_1e8; int8 local_1e0; int1 local_1d8 [16]; minja local_1c8 [32]; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_1a8 [384]; if (parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_ == '\0') { iVar3 = __cxa_guard_acquire(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); if (iVar3 != 0) { /* try { // try from 0017ca8a to 0017ca9f has its CatchHandler @ 0017cafb */ std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::basic_regex ((basic_regex<char,std::__cxx11::regex_traits<char>> *) parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_, "((?:\\w+)(?:[\\r\\n\\s]*,[\\r\\n\\s]*(?:\\w+))*)[\\r\\n\\s]*",0x10); __cxa_atexit(std::__cxx11::basic_regex<char,std::__cxx11::regex_traits<char>>::~basic_regex, parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_,&__dso_handle); __cxa_guard_release(&parseVarNames[abi:cxx11]()::varnames_regex_abi_cxx11_); } } local_208 = 0; lStack_200 = 0; local_1f8 = 0; /* try { // try from 0017c987 to 0017c99d has its CatchHandler @ 0017cb20 */ consumeTokenGroups(local_1a8); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::_M_move_assign (&local_208,local_1a8); lVar2 = lStack_200; lVar1 = local_208; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_1a8); if (lVar1 != lVar2) { *(int8 *)(in_RDI + 0x10) = 0; *(int8 *)in_RDI = 0; *(int8 *)(in_RDI + 8) = 0; /* try { // try from 0017c9dc to 0017c9e8 has its CatchHandler @ 0017cb1b */ std::__cxx11::istringstream::istringstream((istringstream *)local_1a8,local_208 + 0x20,8); local_1e8 = local_1d8; local_1e0 = 0; local_1d8[0] = 0; while( true ) { /* try { // try from 0017ca0c to 0017ca18 has its CatchHandler @ 0017cb36 */ piVar4 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_1a8,(string *)&local_1e8,','); if (((byte)piVar4[*(long *)(*(long *)piVar4 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 0017ca27 to 0017ca31 has its CatchHandler @ 0017cb34 */ strip(local_1c8,(string *)&local_1e8); /* try { // try from 0017ca32 to 0017ca3c has its CatchHandler @ 0017cb25 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string>(in_RDI,(string *)local_1c8); std::__cxx11::string::~string((string *)local_1c8); } std::__cxx11::string::~string((string *)&local_1e8); std::__cxx11::istringstream::~istringstream((istringstream *)local_1a8); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_208); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017cad6 to 0017cae4 has its CatchHandler @ 0017cb0e */ std::runtime_error::runtime_error(this,"Expected variable names"); /* try { // try from 0017cae5 to 0017cafa has its CatchHandler @ 0017cb0c */ /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00220fe8,PTR__runtime_error_00220f48); }
39,778
ma_net_init
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_init(NET *net, MARIADB_PVIO* pvio) { if (!(net->buff=(uchar*) malloc(net_buffer_length))) return 1; if (!net->extension) return 1; memset(net->buff, 0, net_buffer_length); net->max_packet_size= MAX(net_buffer_length, max_allowed_packet); net->buff_end=net->buff+(net->max_packet=net_buffer_length); net->pvio = pvio; net->error=0; net->return_status=0; net->read_timeout=(uint) net_read_timeout; /* Timeout for read */ net->compress_pkt_nr= net->pkt_nr= 0; net->write_pos=net->read_pos = net->buff; net->last_error[0]= net->sqlstate[0] =0; net->compress=0; net->reading_or_writing=0; net->where_b = net->remain_in_buf=0; net->last_errno=0; if (pvio != 0) /* If real connection */ { ma_pvio_get_handle(pvio, &net->fd); ma_pvio_blocking(pvio, 1, 0); ma_pvio_fast_send(pvio); } return 0; }
O0
c
ma_net_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) leaq 0x1a551(%rip), %rax # 0x5fe48 movq (%rax), %rdi callq 0x135b0 movq -0x10(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax jne 0x45919 movl $0x1, -0x4(%rbp) jmp 0x45aa0 movq -0x10(%rbp), %rax cmpq $0x0, 0x2a0(%rax) jne 0x45933 movl $0x1, -0x4(%rbp) jmp 0x45aa0 movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi leaq 0x1a506(%rip), %rax # 0x5fe48 movq (%rax), %rdx xorl %esi, %esi callq 0x13250 leaq 0x1a4f5(%rip), %rax # 0x5fe48 movq (%rax), %rax leaq 0x1a4d3(%rip), %rcx # 0x5fe30 cmpq (%rcx), %rax jbe 0x45972 leaq 0x1a4df(%rip), %rax # 0x5fe48 movq (%rax), %rax movq %rax, -0x20(%rbp) jmp 0x45980 leaq 0x1a4b7(%rip), %rax # 0x5fe30 movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x58(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx leaq 0x1a4ad(%rip), %rax # 0x5fe48 movq (%rax), %rax movq -0x10(%rbp), %rdx movq %rax, 0x50(%rdx) addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movb $0x0, 0x94(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x78(%rax) leaq 0x1a45e(%rip), %rax # 0x5fe38 movq (%rax), %rax movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x6c(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x60(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x64(%rax) movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x297(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x97(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x84(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x80(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x48(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x90(%rax) cmpq $0x0, -0x18(%rbp) je 0x45a99 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rsi addq $0x28, %rsi callq 0x23c00 movq -0x18(%rbp), %rdi movl $0x1, %esi xorl %eax, %eax movl %eax, %edx callq 0x23670 movq -0x18(%rbp), %rdi callq 0x23200 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
ma_net_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi lea rax, net_buffer_length mov rdi, [rax] call _malloc mov rcx, [rbp+var_10] mov [rcx+8], rax cmp rax, 0 jnz short loc_45919 mov [rbp+var_4], 1 jmp loc_45AA0 loc_45919: mov rax, [rbp+var_10] cmp qword ptr [rax+2A0h], 0 jnz short loc_45933 mov [rbp+var_4], 1 jmp loc_45AA0 loc_45933: mov rax, [rbp+var_10] mov rdi, [rax+8] lea rax, net_buffer_length mov rdx, [rax] xor esi, esi call _memset lea rax, net_buffer_length mov rax, [rax] lea rcx, max_allowed_packet cmp rax, [rcx] jbe short loc_45972 lea rax, net_buffer_length mov rax, [rax] mov [rbp+var_20], rax jmp short loc_45980 loc_45972: lea rax, max_allowed_packet mov rax, [rax] mov [rbp+var_20], rax loc_45980: mov rcx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax+58h], rcx mov rax, [rbp+var_10] mov rcx, [rax+8] lea rax, net_buffer_length mov rax, [rax] mov rdx, [rbp+var_10] mov [rdx+50h], rax add rcx, rax mov rax, [rbp+var_10] mov [rax+10h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov byte ptr [rax+94h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+78h], 0 lea rax, net_read_timeout mov rax, [rax] mov ecx, eax mov rax, [rbp+var_10] mov [rax+6Ch], ecx mov rax, [rbp+var_10] mov dword ptr [rax+60h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+64h], 0 mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_10] mov [rax+20h], rcx mov rax, [rbp+var_10] mov [rax+18h], rcx mov rax, [rbp+var_10] mov byte ptr [rax+297h], 0 mov rax, [rbp+var_10] mov byte ptr [rax+97h], 0 mov rax, [rbp+var_10] mov byte ptr [rax+84h], 0 mov rax, [rbp+var_10] mov byte ptr [rax+80h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+48h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+90h], 0 cmp [rbp+var_18], 0 jz short loc_45A99 mov rdi, [rbp+var_18] mov rsi, [rbp+var_10] add rsi, 28h ; '(' call ma_pvio_get_handle mov rdi, [rbp+var_18] mov esi, 1 xor eax, eax mov edx, eax call ma_pvio_blocking mov rdi, [rbp+var_18] call ma_pvio_fast_send loc_45A99: mov [rbp+var_4], 0 loc_45AA0: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ma_net_init(long long a1, long long a2) { long long v2; // rax long long v3; // rcx long long v4; // rax long long v5; // rcx long long v7; // [rsp+0h] [rbp-20h] v2 = malloc(net_buffer_length); *(_QWORD *)(a1 + 8) = v2; if ( v2 ) { if ( *(_QWORD *)(a1 + 672) ) { memset(*(_QWORD *)(a1 + 8), 0LL, net_buffer_length); if ( net_buffer_length <= max_allowed_packet ) v7 = max_allowed_packet; else v7 = net_buffer_length; *(_QWORD *)(a1 + 88) = v7; v3 = *(_QWORD *)(a1 + 8); v4 = net_buffer_length; *(_QWORD *)(a1 + 80) = net_buffer_length; *(_QWORD *)(a1 + 16) = v4 + v3; *(_QWORD *)a1 = a2; *(_BYTE *)(a1 + 148) = 0; *(_QWORD *)(a1 + 120) = 0LL; *(_DWORD *)(a1 + 108) = net_read_timeout; *(_DWORD *)(a1 + 96) = 0; *(_DWORD *)(a1 + 100) = 0; v5 = *(_QWORD *)(a1 + 8); *(_QWORD *)(a1 + 32) = v5; *(_QWORD *)(a1 + 24) = v5; *(_BYTE *)(a1 + 663) = 0; *(_BYTE *)(a1 + 151) = 0; *(_BYTE *)(a1 + 132) = 0; *(_BYTE *)(a1 + 128) = 0; *(_QWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = 0LL; *(_DWORD *)(a1 + 144) = 0; if ( a2 ) { ma_pvio_get_handle(a2, a1 + 40); ma_pvio_blocking(a2, 1, 0LL); ma_pvio_fast_send(a2); } return 0; } else { return 1; } } else { return 1; } }
ma_net_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LEA RAX,[0x15fe48] MOV RDI,qword ptr [RAX] CALL 0x001135b0 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JNZ 0x00145919 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00145aa0 LAB_00145919: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x2a0],0x0 JNZ 0x00145933 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00145aa0 LAB_00145933: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] LEA RAX,[0x15fe48] MOV RDX,qword ptr [RAX] XOR ESI,ESI CALL 0x00113250 LEA RAX,[0x15fe48] MOV RAX,qword ptr [RAX] LEA RCX,[0x15fe30] CMP RAX,qword ptr [RCX] JBE 0x00145972 LEA RAX,[0x15fe48] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX JMP 0x00145980 LAB_00145972: LEA RAX,[0x15fe30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LAB_00145980: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x58],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] LEA RAX,[0x15fe48] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV qword ptr [RDX + 0x50],RAX ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x94],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x78],0x0 LEA RAX,[0x15fe38] MOV RAX,qword ptr [RAX] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x6c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x64],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x297],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x97],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x84],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x80],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x0 CMP qword ptr [RBP + -0x18],0x0 JZ 0x00145a99 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x28 CALL 0x00123c00 MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x1 XOR EAX,EAX MOV EDX,EAX CALL 0x00123670 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00123200 LAB_00145a99: MOV dword ptr [RBP + -0x4],0x0 LAB_00145aa0: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 ma_net_init(long *param_1,long param_2) { size_t sVar1; void *pvVar2; ulong local_28; int4 local_c; pvVar2 = malloc(net_buffer_length); param_1[1] = (long)pvVar2; if (pvVar2 == (void *)0x0) { local_c = 1; } else if (param_1[0x54] == 0) { local_c = 1; } else { memset((void *)param_1[1],0,net_buffer_length); if (max_allowed_packet < net_buffer_length) { local_28 = net_buffer_length; } else { local_28 = max_allowed_packet; } param_1[0xb] = local_28; sVar1 = net_buffer_length; param_1[10] = net_buffer_length; param_1[2] = param_1[1] + sVar1; *param_1 = param_2; *(int1 *)((long)param_1 + 0x94) = 0; param_1[0xf] = 0; *(int *)((long)param_1 + 0x6c) = (int)net_read_timeout; *(int4 *)(param_1 + 0xc) = 0; *(int4 *)((long)param_1 + 100) = 0; param_1[4] = param_1[1]; param_1[3] = param_1[1]; *(int1 *)((long)param_1 + 0x297) = 0; *(int1 *)((long)param_1 + 0x97) = 0; *(int1 *)((long)param_1 + 0x84) = 0; *(int1 *)(param_1 + 0x10) = 0; param_1[6] = 0; param_1[9] = 0; *(int4 *)(param_1 + 0x12) = 0; if (param_2 != 0) { ma_pvio_get_handle(param_2,param_1 + 5); ma_pvio_blocking(param_2,1,0); ma_pvio_fast_send(param_2); } local_c = 0; } return local_c; }
39,779
httplib::Response::set_redirect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
hkr04[P]cpp-mcp/common/httplib.h
inline void Response::set_redirect(const std::string &url, int stat) { if (detail::fields::is_field_value(url)) { set_header("Location", url); if (300 <= stat && stat < 400) { this->status = stat; } else { this->status = StatusCode::Found_302; } } }
O0
c
httplib::Response::set_redirect(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movl %edx, 0x54(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x58(%rsp), %rdi callq 0x1ce20 testb $0x1, %al jne 0x33b7f jmp 0x33c35 leaq 0x2f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xbe20 movq 0x8(%rsp), %rdx leaq 0x9a34e(%rip), %rsi # 0xcdee8 leaq 0x30(%rsp), %rdi callq 0xf160 jmp 0x33ba6 movq 0x10(%rsp), %rdi movq 0x58(%rsp), %rdx leaq 0x30(%rsp), %rsi callq 0x18ab0 jmp 0x33bbc leaq 0x30(%rsp), %rdi callq 0xbfb0 leaq 0x2f(%rsp), %rdi callq 0xb8e0 movl $0x12c, %eax # imm = 0x12C cmpl 0x54(%rsp), %eax jg 0x33c27 cmpl $0x190, 0x54(%rsp) # imm = 0x190 jge 0x33c27 movq 0x10(%rsp), %rax movl 0x54(%rsp), %ecx movl %ecx, 0x20(%rax) jmp 0x33c33 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) jmp 0x33c1b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) leaq 0x30(%rsp), %rdi callq 0xbfb0 leaq 0x2f(%rsp), %rdi callq 0xb8e0 jmp 0x33c3a movq 0x10(%rsp), %rax movl $0x12e, 0x20(%rax) # imm = 0x12E jmp 0x33c35 addq $0x68, %rsp retq movq 0x20(%rsp), %rdi callq 0xbe10 nopw %cs:(%rax,%rax) nop
_ZN7httplib8Response12set_redirectERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_14], edx mov rax, [rsp+68h+var_8] mov [rsp+68h+var_58], rax mov rdi, [rsp+68h+var_10] call _ZN7httplib6detail6fields14is_field_valueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; httplib::detail::fields::is_field_value(std::string const&) test al, 1 jnz short loc_33B7F jmp loc_33C35 loc_33B7F: lea rdi, [rsp+68h+var_39] mov [rsp+68h+var_60], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+68h+var_60] lea rsi, aLocation; "Location" lea rdi, [rsp+68h+var_38] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_33BA6: mov rdi, [rsp+68h+var_58] mov rdx, [rsp+68h+var_10] lea rsi, [rsp+68h+var_38] call _ZN7httplib8Response10set_headerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_; httplib::Response::set_header(std::string const&,std::string const&) jmp short $+2 loc_33BBC: lea rdi, [rsp+68h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+68h+var_39] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, 12Ch cmp eax, [rsp+68h+var_14] jg short loc_33C27 cmp [rsp+68h+var_14], 190h jge short loc_33C27 mov rax, [rsp+68h+var_58] mov ecx, [rsp+68h+var_14] mov [rax+20h], ecx jmp short loc_33C33 mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax jmp short loc_33C1B mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_33C1B: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_33C3A loc_33C27: mov rax, [rsp+68h+var_58] mov dword ptr [rax+20h], 12Eh loc_33C33: jmp short $+2 loc_33C35: add rsp, 68h retn loc_33C3A: mov rdi, [rsp+arg_18] call __Unwind_Resume
char httplib::Response::set_redirect(long long a1, long long a2, int a3) { char result; // al long long v4; // rdx char v5; // [rsp+2Fh] [rbp-39h] BYREF _BYTE v6[36]; // [rsp+30h] [rbp-38h] BYREF int v7; // [rsp+54h] [rbp-14h] long long v8; // [rsp+58h] [rbp-10h] long long v9; // [rsp+60h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; result = httplib::detail::fields::is_field_value(a2); if ( (result & 1) != 0 ) { std::allocator<char>::allocator(&v5, a2, v4); std::string::basic_string<std::allocator<char>>((long long)v6, (long long)"Location", (long long)&v5); httplib::Response::set_header(a1, (long long)v6, v8); std::string::~string(v6); std::allocator<char>::~allocator(&v5); if ( v7 < 300 || v7 >= 400 ) { result = a1; *(_DWORD *)(a1 + 32) = 302; } else { result = a1; *(_DWORD *)(a1 + 32) = v7; } } return result; }
set_redirect: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV dword ptr [RSP + 0x54],EDX MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x0011ce20 TEST AL,0x1 JNZ 0x00133b7f JMP 0x00133c35 LAB_00133b7f: LEA RDI,[RSP + 0x2f] MOV qword ptr [RSP + 0x8],RDI CALL 0x0010be20 MOV RDX,qword ptr [RSP + 0x8] LAB_00133b93: LEA RSI,[0x1cdee8] LEA RDI,[RSP + 0x30] CALL 0x0010f160 JMP 0x00133ba6 LAB_00133ba6: MOV RDI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x58] LAB_00133bb0: LEA RSI,[RSP + 0x30] CALL 0x00118ab0 LAB_00133bba: JMP 0x00133bbc LAB_00133bbc: LEA RDI,[RSP + 0x30] CALL 0x0010bfb0 LEA RDI,[RSP + 0x2f] CALL 0x0010b8e0 MOV EAX,0x12c CMP EAX,dword ptr [RSP + 0x54] JG 0x00133c27 CMP dword ptr [RSP + 0x54],0x190 JGE 0x00133c27 MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RSP + 0x54] MOV dword ptr [RAX + 0x20],ECX JMP 0x00133c33 LAB_00133c27: MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + 0x20],0x12e LAB_00133c33: JMP 0x00133c35 LAB_00133c35: ADD RSP,0x68 RET
/* httplib::Response::set_redirect(std::__cxx11::string const&, int) */ void __thiscall httplib::Response::set_redirect(Response *this,string *param_1,int param_2) { ulong uVar1; allocator local_39; string local_38 [36]; int local_14; string *local_10; Response *local_8; local_14 = param_2; local_10 = param_1; local_8 = this; uVar1 = detail::fields::is_field_value(param_1); if ((uVar1 & 1) != 0) { std::allocator<char>::allocator(); /* try { // try from 00133b93 to 00133ba3 has its CatchHandler @ 00133bf3 */ std::__cxx11::string::string<std::allocator<char>>(local_38,"Location",&local_39); /* try { // try from 00133bb0 to 00133bb9 has its CatchHandler @ 00133c03 */ set_header(this,local_38,local_10); std::__cxx11::string::~string(local_38); std::allocator<char>::~allocator((allocator<char> *)&local_39); if ((local_14 < 300) || (399 < local_14)) { *(int4 *)(this + 0x20) = 0x12e; } else { *(int *)(this + 0x20) = local_14; } } return; }
39,780
my_thread_destroy_internal_mutex
eloqsql/mysys/my_thr_init.c
void my_thread_destroy_internal_mutex(void) { mysql_mutex_destroy(&THR_LOCK_threads); mysql_mutex_destroy(&THR_LOCK_malloc); mysql_cond_destroy(&THR_COND_threads); }
O3
c
my_thread_destroy_internal_mutex: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0xb66cac(%rip), %rbx # 0xc08468 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0xa17da leaq 0x2e4844(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0xb66c87(%rip), %rdi # 0xc08468 callq 0x290c0 leaq 0xb66cc3(%rip), %rbx # 0xc084b0 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0xa180b leaq 0x2e4813(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0xb66c9e(%rip), %rdi # 0xc084b0 callq 0x290c0 leaq 0xb66cda(%rip), %rax # 0xc084f8 movq 0x30(%rax), %rdi testq %rdi, %rdi jne 0xa1839 leaq 0xb66cca(%rip), %rdi # 0xc084f8 addq $0x8, %rsp popq %rbx popq %rbp jmp 0x29260 callq 0x2ef6d jmp 0xa1827
my_thread_destroy_internal_mutex: push rbp mov rbp, rsp push rbx push rax lea rbx, THR_LOCK_threads mov rdi, [rbx+40h] test rdi, rdi jz short loc_A17DA lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_A17DA: lea rdi, THR_LOCK_threads call _pthread_mutex_destroy lea rbx, THR_LOCK_malloc mov rdi, [rbx+40h] test rdi, rdi jz short loc_A180B lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_A180B: lea rdi, THR_LOCK_malloc call _pthread_mutex_destroy lea rax, THR_COND_threads mov rdi, [rax+30h] test rdi, rdi jnz short loc_A1839 loc_A1827: lea rdi, THR_COND_threads add rsp, 8 pop rbx pop rbp jmp _pthread_cond_destroy loc_A1839: call my_thread_destroy_internal_mutex_cold_1 jmp short loc_A1827
long long my_thread_destroy_internal_mutex() { long long v0; // rdi long long v1; // rdi v0 = THR_LOCK_threads[8]; if ( v0 ) { ((void ( *)(long long))PSI_server[9])(v0); THR_LOCK_threads[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_threads); v1 = THR_LOCK_malloc[8]; if ( v1 ) { ((void ( *)(long long))PSI_server[9])(v1); THR_LOCK_malloc[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_malloc); if ( THR_COND_threads[6] ) my_thread_destroy_internal_mutex_cold_1(); return pthread_cond_destroy(THR_COND_threads); }
my_thread_destroy_internal_mutex: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0xd08468] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x001a17da LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_001a17da: LEA RDI,[0xd08468] CALL 0x001290c0 LEA RBX,[0xd084b0] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x001a180b LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_001a180b: LEA RDI,[0xd084b0] CALL 0x001290c0 LEA RAX,[0xd084f8] MOV RDI,qword ptr [RAX + 0x30] TEST RDI,RDI JNZ 0x001a1839 LAB_001a1827: LEA RDI,[0xd084f8] ADD RSP,0x8 POP RBX POP RBP JMP 0x00129260 LAB_001a1839: CALL 0x0012ef6d JMP 0x001a1827
void my_thread_destroy_internal_mutex(void) { if (THR_LOCK_threads._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_threads._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_threads); if (THR_LOCK_malloc._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_malloc._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_malloc); if (THR_COND_threads._48_8_ != 0) { my_thread_destroy_internal_mutex_cold_1(); } pthread_cond_destroy((pthread_cond_t *)THR_COND_threads); return; }
39,781
JS_AddRuntimeFinalizer
bluesky950520[P]quickjs/quickjs.c
int JS_AddRuntimeFinalizer(JSRuntime *rt, JSRuntimeFinalizer *finalizer, void *arg) { JSRuntimeFinalizerState *fs = js_malloc_rt(rt, sizeof(*fs)); if (!fs) return -1; fs->next = rt->finalizers; fs->finalizer = finalizer; fs->arg = arg; rt->finalizers = fs; return 0; }
O0
c
JS_AddRuntimeFinalizer: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq %rdx, 0x8(%rsp) movq 0x18(%rsp), %rdi movl $0x18, %esi callq 0x21890 movq %rax, (%rsp) cmpq $0x0, (%rsp) jne 0x23767 movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x237ac movq 0x18(%rsp), %rax movq 0x220(%rax), %rcx movq (%rsp), %rax movq %rcx, (%rax) movq 0x10(%rsp), %rcx movq (%rsp), %rax movq %rcx, 0x8(%rax) movq 0x8(%rsp), %rcx movq (%rsp), %rax movq %rcx, 0x10(%rax) movq (%rsp), %rcx movq 0x18(%rsp), %rax movq %rcx, 0x220(%rax) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
JS_AddRuntimeFinalizer: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_20], rdx mov rdi, [rsp+28h+var_10] mov esi, 18h call js_malloc_rt mov [rsp+28h+var_28], rax cmp [rsp+28h+var_28], 0 jnz short loc_23767 mov [rsp+28h+var_4], 0FFFFFFFFh jmp short loc_237AC loc_23767: mov rax, [rsp+28h+var_10] mov rcx, [rax+220h] mov rax, [rsp+28h+var_28] mov [rax], rcx mov rcx, [rsp+28h+var_18] mov rax, [rsp+28h+var_28] mov [rax+8], rcx mov rcx, [rsp+28h+var_20] mov rax, [rsp+28h+var_28] mov [rax+10h], rcx mov rcx, [rsp+28h+var_28] mov rax, [rsp+28h+var_10] mov [rax+220h], rcx mov [rsp+28h+var_4], 0 loc_237AC: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long JS_AddRuntimeFinalizer(long long a1, long long a2, long long a3) { _QWORD *v4; // [rsp+0h] [rbp-28h] v4 = (_QWORD *)js_malloc_rt(a1, 24LL); if ( v4 ) { *v4 = *(_QWORD *)(a1 + 544); v4[1] = a2; v4[2] = a3; *(_QWORD *)(a1 + 544) = v4; return 0; } else { return (unsigned int)-1; } }
JS_AddRuntimeFinalizer: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDX MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x18 CALL 0x00121890 MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JNZ 0x00123767 MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x001237ac LAB_00123767: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RAX + 0x220] MOV RAX,qword ptr [RSP] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x220],RCX MOV dword ptr [RSP + 0x24],0x0 LAB_001237ac: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int4 JS_AddRuntimeFinalizer(long param_1,int8 param_2,int8 param_3) { int8 *puVar1; int4 local_4; puVar1 = (int8 *)js_malloc_rt(param_1,0x18); if (puVar1 == (int8 *)0x0) { local_4 = 0xffffffff; } else { *puVar1 = *(int8 *)(param_1 + 0x220); puVar1[1] = param_2; puVar1[2] = param_3; *(int8 **)(param_1 + 0x220) = puVar1; local_4 = 0; } return local_4; }
39,782
JS_AddRuntimeFinalizer
bluesky950520[P]quickjs/quickjs.c
int JS_AddRuntimeFinalizer(JSRuntime *rt, JSRuntimeFinalizer *finalizer, void *arg) { JSRuntimeFinalizerState *fs = js_malloc_rt(rt, sizeof(*fs)); if (!fs) return -1; fs->next = rt->finalizers; fs->finalizer = finalizer; fs->arg = arg; rt->finalizers = fs; return 0; }
O2
c
JS_AddRuntimeFinalizer: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %rbx movq %rsi, %r15 movq %rdi, %r14 pushq $0x18 popq %rsi callq 0x17079 testq %rax, %rax je 0x17e3d movq 0x220(%r14), %rcx movq %rcx, (%rax) movq %r15, 0x8(%rax) movq %rbx, 0x10(%rax) movq %rax, 0x220(%r14) xorl %eax, %eax jmp 0x17e40 pushq $-0x1 popq %rax popq %rbx popq %r14 popq %r15 retq
JS_AddRuntimeFinalizer: push r15 push r14 push rbx mov rbx, rdx mov r15, rsi mov r14, rdi push 18h pop rsi call js_malloc_rt test rax, rax jz short loc_17E3D mov rcx, [r14+220h] mov [rax], rcx mov [rax+8], r15 mov [rax+10h], rbx mov [r14+220h], rax xor eax, eax jmp short loc_17E40 loc_17E3D: push 0FFFFFFFFFFFFFFFFh pop rax loc_17E40: pop rbx pop r14 pop r15 retn
long long JS_AddRuntimeFinalizer(long long a1, long long a2, long long a3) { _QWORD *v4; // rax v4 = (_QWORD *)js_malloc_rt(a1, 24LL); if ( !v4 ) return -1LL; *v4 = *(_QWORD *)(a1 + 544); v4[1] = a2; v4[2] = a3; *(_QWORD *)(a1 + 544) = v4; return 0LL; }
JS_AddRuntimeFinalizer: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDX MOV R15,RSI MOV R14,RDI PUSH 0x18 POP RSI CALL 0x00117079 TEST RAX,RAX JZ 0x00117e3d MOV RCX,qword ptr [R14 + 0x220] MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],R15 MOV qword ptr [RAX + 0x10],RBX MOV qword ptr [R14 + 0x220],RAX XOR EAX,EAX JMP 0x00117e40 LAB_00117e3d: PUSH -0x1 POP RAX LAB_00117e40: POP RBX POP R14 POP R15 RET
int8 JS_AddRuntimeFinalizer(long param_1,int8 param_2,int8 param_3) { int8 *puVar1; int8 uVar2; puVar1 = (int8 *)js_malloc_rt(param_1,0x18); if (puVar1 == (int8 *)0x0) { uVar2 = 0xffffffffffffffff; } else { *puVar1 = *(int8 *)(param_1 + 0x220); puVar1[1] = param_2; puVar1[2] = param_3; *(int8 **)(param_1 + 0x220) = puVar1; uVar2 = 0; } return uVar2; }
39,783
buffer_append
corpus-core[P]colibri-stateless/src/util/bytes.c
uint32_t buffer_append(buffer_t* buffer, bytes_t data) { if (buffer->allocated < 0 && buffer->data.len + data.len > (uint32_t) (0 - buffer->allocated)) data.len = ((uint32_t) (0 - buffer->allocated)) - buffer->data.len; if (!data.len) return 0; buffer_grow(buffer, buffer->data.len + data.len); if (data.data) memcpy(buffer->data.data + buffer->data.len, data.data, data.len); else memset(buffer->data.data + buffer->data.len, 0, data.len); buffer->data.len += data.len; return data.len; }
O2
c
buffer_append: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r15 movl %esi, %ebx movq %rdi, %r14 movl 0x10(%rdi), %eax testl %eax, %eax jns 0x4b0af movl (%r14), %ecx negl %eax movl %eax, %edx subl %ecx, %edx addl %ebx, %ecx cmpl %eax, %ecx cmoval %edx, %ebx testl %ebx, %ebx je 0x4b0e2 movl (%r14), %esi addl %ebx, %esi movq %r14, %rdi callq 0x4b01d movl (%r14), %edi addq 0x8(%r14), %rdi movl %ebx, %edx testq %r15, %r15 je 0x4b0d8 movq %r15, %rsi callq 0x22090 jmp 0x4b0df xorl %esi, %esi callq 0x221a0 addl %ebx, (%r14) movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq
buffer_append: push r15 push r14 push rbx mov r15, rdx mov ebx, esi mov r14, rdi mov eax, [rdi+10h] test eax, eax jns short loc_4B0AF mov ecx, [r14] neg eax mov edx, eax sub edx, ecx add ecx, ebx cmp ecx, eax cmova ebx, edx loc_4B0AF: test ebx, ebx jz short loc_4B0E2 mov esi, [r14] add esi, ebx mov rdi, r14 call buffer_grow mov edi, [r14] add rdi, [r14+8] mov edx, ebx test r15, r15 jz short loc_4B0D8 mov rsi, r15 call _memcpy jmp short loc_4B0DF loc_4B0D8: xor esi, esi call _memset loc_4B0DF: add [r14], ebx loc_4B0E2: mov eax, ebx pop rbx pop r14 pop r15 retn
long long buffer_append(unsigned int *a1, unsigned int a2, long long a3) { unsigned int v4; // ebx int v6; // eax unsigned int v7; // eax long long v8; // rcx long long v9; // rdi v4 = a2; v6 = a1[4]; if ( v6 < 0 ) { v7 = -v6; if ( a2 + *a1 > v7 ) v4 = v7 - *a1; } if ( v4 ) { buffer_grow((long long)a1, v4 + *a1); v9 = *((_QWORD *)a1 + 1) + *a1; if ( a3 ) memcpy(v9, a3, v4, v8); else memset(v9, 0LL, v4); *a1 += v4; } return v4; }
buffer_append: PUSH R15 PUSH R14 PUSH RBX MOV R15,RDX MOV EBX,ESI MOV R14,RDI MOV EAX,dword ptr [RDI + 0x10] TEST EAX,EAX JNS 0x0014b0af MOV ECX,dword ptr [R14] NEG EAX MOV EDX,EAX SUB EDX,ECX ADD ECX,EBX CMP ECX,EAX CMOVA EBX,EDX LAB_0014b0af: TEST EBX,EBX JZ 0x0014b0e2 MOV ESI,dword ptr [R14] ADD ESI,EBX MOV RDI,R14 CALL 0x0014b01d MOV EDI,dword ptr [R14] ADD RDI,qword ptr [R14 + 0x8] MOV EDX,EBX TEST R15,R15 JZ 0x0014b0d8 MOV RSI,R15 CALL 0x00122090 JMP 0x0014b0df LAB_0014b0d8: XOR ESI,ESI CALL 0x001221a0 LAB_0014b0df: ADD dword ptr [R14],EBX LAB_0014b0e2: MOV EAX,EBX POP RBX POP R14 POP R15 RET
uint buffer_append(uint *param_1,uint param_2,void *param_3) { uint uVar1; if ((int)param_1[4] < 0) { uVar1 = -param_1[4]; if (uVar1 < *param_1 + param_2) { param_2 = uVar1 - *param_1; } } if (param_2 != 0) { buffer_grow(param_1); if (param_3 == (void *)0x0) { memset((void *)((ulong)*param_1 + *(long *)(param_1 + 2)),0,(ulong)param_2); } else { memcpy((void *)((ulong)*param_1 + *(long *)(param_1 + 2)),param_3,(ulong)param_2); } *param_1 = *param_1 + param_2; } return param_2; }
39,784
buffer_append
corpus-core[P]colibri-stateless/src/util/bytes.c
uint32_t buffer_append(buffer_t* buffer, bytes_t data) { if (buffer->allocated < 0 && buffer->data.len + data.len > (uint32_t) (0 - buffer->allocated)) data.len = ((uint32_t) (0 - buffer->allocated)) - buffer->data.len; if (!data.len) return 0; buffer_grow(buffer, buffer->data.len + data.len); if (data.data) memcpy(buffer->data.data + buffer->data.len, data.data, data.len); else memset(buffer->data.data + buffer->data.len, 0, data.len); buffer->data.len += data.len; return data.len; }
O3
c
buffer_append: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r15 movl %esi, %ebx movq %rdi, %r14 movl 0x10(%rdi), %eax testl %eax, %eax jns 0x5304d movl (%r14), %ecx negl %eax movl %eax, %edx subl %ecx, %edx addl %ebx, %ecx cmpl %eax, %ecx cmoval %edx, %ebx testl %ebx, %ebx je 0x53080 movl (%r14), %esi addl %ebx, %esi movq %r14, %rdi callq 0x52fbd movl (%r14), %edi addq 0x8(%r14), %rdi movl %ebx, %edx testq %r15, %r15 je 0x53076 movq %r15, %rsi callq 0x22090 jmp 0x5307d xorl %esi, %esi callq 0x22190 addl %ebx, (%r14) movl %ebx, %eax popq %rbx popq %r14 popq %r15 retq
buffer_append: push r15 push r14 push rbx mov r15, rdx mov ebx, esi mov r14, rdi mov eax, [rdi+10h] test eax, eax jns short loc_5304D mov ecx, [r14] neg eax mov edx, eax sub edx, ecx add ecx, ebx cmp ecx, eax cmova ebx, edx loc_5304D: test ebx, ebx jz short loc_53080 mov esi, [r14] add esi, ebx mov rdi, r14 call buffer_grow mov edi, [r14] add rdi, [r14+8] mov edx, ebx test r15, r15 jz short loc_53076 mov rsi, r15 call _memcpy jmp short loc_5307D loc_53076: xor esi, esi call _memset loc_5307D: add [r14], ebx loc_53080: mov eax, ebx pop rbx pop r14 pop r15 retn
long long buffer_append(unsigned int *a1, unsigned int a2, long long a3) { unsigned int v4; // ebx int v6; // eax unsigned int v7; // eax long long v8; // rdi v4 = a2; v6 = a1[4]; if ( v6 < 0 ) { v7 = -v6; if ( a2 + *a1 > v7 ) v4 = v7 - *a1; } if ( v4 ) { buffer_grow((long long)a1, v4 + *a1); v8 = *((_QWORD *)a1 + 1) + *a1; if ( a3 ) memcpy(v8); else memset(v8, 0LL, v4); *a1 += v4; } return v4; }
buffer_append: PUSH R15 PUSH R14 PUSH RBX MOV R15,RDX MOV EBX,ESI MOV R14,RDI MOV EAX,dword ptr [RDI + 0x10] TEST EAX,EAX JNS 0x0015304d MOV ECX,dword ptr [R14] NEG EAX MOV EDX,EAX SUB EDX,ECX ADD ECX,EBX CMP ECX,EAX CMOVA EBX,EDX LAB_0015304d: TEST EBX,EBX JZ 0x00153080 MOV ESI,dword ptr [R14] ADD ESI,EBX MOV RDI,R14 CALL 0x00152fbd MOV EDI,dword ptr [R14] ADD RDI,qword ptr [R14 + 0x8] MOV EDX,EBX TEST R15,R15 JZ 0x00153076 MOV RSI,R15 CALL 0x00122090 JMP 0x0015307d LAB_00153076: XOR ESI,ESI CALL 0x00122190 LAB_0015307d: ADD dword ptr [R14],EBX LAB_00153080: MOV EAX,EBX POP RBX POP R14 POP R15 RET
uint buffer_append(uint *param_1,uint param_2,void *param_3) { uint uVar1; if ((int)param_1[4] < 0) { uVar1 = -param_1[4]; if (uVar1 < *param_1 + param_2) { param_2 = uVar1 - *param_1; } } if (param_2 != 0) { buffer_grow(param_1); if (param_3 == (void *)0x0) { memset((void *)((ulong)*param_1 + *(long *)(param_1 + 2)),0,(ulong)param_2); } else { memcpy((void *)((ulong)*param_1 + *(long *)(param_1 + 2)),param_3,(ulong)param_2); } *param_1 = *param_1 + param_2; } return param_2; }
39,785
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE FileDescriptor OpenObjectFileContainingPcAndGetStartAddress(uint64_t pc, uint64_t& start_address, uint64_t& base_address, char* out_file_name, size_t out_file_name_size) { FileDescriptor maps_fd{ FailureRetry([] { return open("/proc/self/maps", O_RDONLY); })}; if (!maps_fd) { return nullptr; } FileDescriptor mem_fd{ FailureRetry([] { return open("/proc/self/mem", O_RDONLY); })}; if (!mem_fd) { return nullptr; } // Iterate over maps and look for the map containing the pc. Then // look into the symbol tables inside. char buf[1024]; // Big enough for line of sane /proc/self/maps LineReader reader(maps_fd.get(), buf, sizeof(buf), 0); while (true) { const char* cursor; const char* eol; if (!reader.ReadLine(&cursor, &eol)) { // EOF or malformed line. return nullptr; } // Start parsing line in /proc/self/maps. Here is an example: // // 08048000-0804c000 r-xp 00000000 08:01 2142121 /bin/cat // // We want start address (08048000), end address (0804c000), flags // (r-xp) and file name (/bin/cat). // Read start address. cursor = GetHex(cursor, eol, &start_address); if (cursor == eol || *cursor != '-') { return nullptr; // Malformed line. } ++cursor; // Skip '-'. // Read end address. uint64_t end_address; cursor = GetHex(cursor, eol, &end_address); if (cursor == eol || *cursor != ' ') { return nullptr; // Malformed line. } ++cursor; // Skip ' '. // Read flags. Skip flags until we encounter a space or eol. const char* const flags_start = cursor; while (cursor < eol && *cursor != ' ') { ++cursor; } // We expect at least four letters for flags (ex. "r-xp"). if (cursor == eol || cursor < flags_start + 4) { return nullptr; // Malformed line. } // Determine the base address by reading ELF headers in process memory. ElfW(Ehdr) ehdr; // Skip non-readable maps. if (flags_start[0] == 'r' && ReadFromOffsetExact(mem_fd.get(), &ehdr, sizeof(ElfW(Ehdr)), start_address) && memcmp(ehdr.e_ident, ELFMAG, SELFMAG) == 0) { switch (ehdr.e_type) { case ET_EXEC: base_address = 0; break; case ET_DYN: // Find the segment containing file offset 0. This will correspond // to the ELF header that we just read. Normally this will have // virtual address 0, but this is not guaranteed. We must subtract // the virtual address from the address where the ELF header was // mapped to get the base address. // // If we fail to find a segment for file offset 0, use the address // of the ELF header as the base address. base_address = start_address; for (unsigned i = 0; i != ehdr.e_phnum; ++i) { ElfW(Phdr) phdr; if (ReadFromOffsetExact( mem_fd.get(), &phdr, sizeof(phdr), start_address + ehdr.e_phoff + i * sizeof(phdr)) && phdr.p_type == PT_LOAD && phdr.p_offset == 0) { base_address = start_address - phdr.p_vaddr; break; } } break; default: // ET_REL or ET_CORE. These aren't directly executable, so they don't // affect the base address. break; } } // Check start and end addresses. if (start_address > pc || pc >= end_address) { continue; // We skip this map. PC isn't in this map. } // Check flags. We are only interested in "r*x" maps. if (flags_start[0] != 'r' || flags_start[2] != 'x') { continue; // We skip this map. } ++cursor; // Skip ' '. // Read file offset. uint64_t file_offset; cursor = GetHex(cursor, eol, &file_offset); if (cursor == eol || *cursor != ' ') { return nullptr; // Malformed line. } ++cursor; // Skip ' '. // Skip to file name. "cursor" now points to dev. We need to // skip at least two spaces for dev and inode. int num_spaces = 0; while (cursor < eol) { if (*cursor == ' ') { ++num_spaces; } else if (num_spaces >= 2) { // The first non-space character after skipping two spaces // is the beginning of the file name. break; } ++cursor; } if (cursor == eol) { return nullptr; // Malformed line. } strncpy(out_file_name, cursor, out_file_name_size); // Making sure |out_file_name| is always null-terminated. out_file_name[out_file_name_size - 1] = '\0'; // Finally, "cursor" now points to file name of our interest. return FileDescriptor{ FailureRetry([cursor] { return open(cursor, O_RDONLY); })}; } }
O3
cpp
nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x4d8, %rsp # imm = 0x4D8 movq %r9, %r12 movq %r8, %r13 movq %rcx, 0x10(%rsp) movq %rdx, 0x8(%rsp) movq %rsi, 0x20(%rsp) movq %rdi, %r15 leaq 0x3b93(%rip), %r14 # 0x25f60 movq %r14, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x7390 cmpl $-0x1, %eax jne 0x223f4 callq 0x7040 cmpl $0x4, (%rax) je 0x223cd movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF jmp 0x226e3 movl %eax, %ebx leaq 0x3b73(%rip), %r14 # 0x25f70 movq %r14, %rdi xorl %esi, %esi xorl %eax, %eax callq 0x7390 movl %eax, %ebp cmpl $-0x1, %eax jne 0x22426 callq 0x7040 cmpl $0x4, (%rax) je 0x223fd movl $0xffffffff, (%r15) # imm = 0xFFFFFFFF jmp 0x226dc movq %r13, 0x28(%rsp) movq %r12, 0x30(%rsp) movq %r15, (%rsp) leaq 0xd0(%rsp), %r15 xorl %r12d, %r12d movq %r15, %r13 movq %r15, %r14 cmpq %r14, %r15 je 0x2247d incq %r13 cmpq %r14, %r13 ja 0x22784 movq %r14, 0x18(%rsp) subq %r13, %r14 movq %r13, %rdi movl $0xa, %esi movq %r14, %rdx callq 0x7590 testq %rax, %rax je 0x224a8 movq %r13, %r15 movq 0x18(%rsp), %rdx jmp 0x224e8 movl $0x400, %edx # imm = 0x400 movl %ebx, %edi movq %r15, %rsi movq %r12, %rcx callq 0x21fa9 testq %rax, %rax jle 0x226cb addq %rax, %r12 leaq (%rsp,%rax), %rdx addq $0xd0, %rdx jmp 0x224e8 movq %r15, %rdi movq %r13, %rsi movq %r14, %rdx callq 0x7880 leaq (%rsp,%r14), %rsi addq $0xd0, %rsi movl $0x400, %edx # imm = 0x400 subq %r14, %rdx movl %ebx, %edi movq %rsi, %r14 movq %r12, %rcx callq 0x21fa9 testq %rax, %rax jle 0x226cb addq %rax, %r12 addq %rax, %r14 movq %r14, %rdx movq %rdx, 0x18(%rsp) subq %r15, %rdx movq %r15, %rdi movl $0xa, %esi callq 0x7590 testq %rax, %rax je 0x226cb movq %rax, %r13 movb $0x0, (%rax) movq %r15, %rdi movq %rax, %rsi movq 0x8(%rsp), %rdx callq 0x22897 cmpq %r13, %rax je 0x226cb cmpb $0x2d, (%rax) jne 0x226cb incq %rax movq %rax, %rdi movq %r13, %rsi leaq 0x50(%rsp), %rdx callq 0x22897 cmpq %r13, %rax je 0x226cb movq %rax, %r14 cmpb $0x20, (%rax) jne 0x226cb leaq 0x1(%r14), %rdx cmpq %r13, %rdx jae 0x226cb movq %r13, %rcx subq %r14, %rcx movl $0x1, %eax cmpb $0x20, (%r14,%rax) je 0x22585 incq %rax cmpq %rax, %rcx jne 0x2256e movq %rcx, %rax movq %r13, %rcx jmp 0x2258b movq %r14, %rcx addq %rax, %rcx cmpq $0x5, %rax jb 0x226cb cmpq %r13, %rcx je 0x226cb movq %rcx, 0x38(%rsp) movq %r12, 0x48(%rsp) movq %rdx, 0x40(%rsp) cmpb $0x72, (%rdx) jne 0x22688 movq 0x8(%rsp), %rax movq (%rax), %rcx movl $0x40, %edx movl %ebp, %edi leaq 0x90(%rsp), %rsi callq 0x21fa9 cmpq $0x40, %rax jne 0x22688 cmpl $0x464c457f, 0x90(%rsp) # imm = 0x464C457F jne 0x22688 movzwl 0xa0(%rsp), %eax cmpl $0x2, %eax je 0x22665 cmpl $0x3, %eax jne 0x22688 movq 0x8(%rsp), %rax movq (%rax), %rax movq 0x10(%rsp), %rcx movq %rax, (%rcx) movzwl 0xc8(%rsp), %r12d testq %r12, %r12 je 0x22688 movq 0xb0(%rsp), %r15 movq 0x8(%rsp), %rax movq (%rax), %rcx addq %r15, %rcx movl $0x38, %edx movl %ebp, %edi leaq 0x58(%rsp), %rsi callq 0x21fa9 cmpq $0x38, %rax jne 0x2265a cmpl $0x1, 0x58(%rsp) jne 0x2265a cmpq $0x0, 0x60(%rsp) je 0x22673 addq $0x38, %r15 decq %r12 jne 0x22629 jmp 0x22688 movq 0x10(%rsp), %rax movq $0x0, (%rax) jmp 0x22688 movq 0x8(%rsp), %rax movq (%rax), %rax subq 0x68(%rsp), %rax movq 0x10(%rsp), %rcx movq %rax, (%rcx) movq 0x8(%rsp), %rax movq 0x20(%rsp), %rcx cmpq %rcx, (%rax) ja 0x226b4 movq 0x20(%rsp), %rax cmpq %rax, 0x50(%rsp) jbe 0x226b4 movq 0x40(%rsp), %rax cmpb $0x72, (%rax) jne 0x226b4 cmpb $0x78, 0x3(%r14) je 0x226f5 leaq 0xd0(%rsp), %r15 movq 0x48(%rsp), %r12 movq 0x18(%rsp), %r14 jmp 0x22445 movq (%rsp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movl %ebp, %edi callq 0x79e0 movl %ebx, %edi callq 0x79e0 addq $0x4d8, %rsp # imm = 0x4D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x38(%rsp), %rdi incq %rdi leaq 0x58(%rsp), %rdx movq %r13, %rsi callq 0x22897 movq %rax, %rcx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %r13, %rcx je 0x22778 cmpb $0x20, (%rcx) jne 0x22778 leaq 0x1(%rcx), %r14 cmpq %r13, %r14 jae 0x22747 notq %rcx addq %r13, %rcx xorl %edx, %edx cmpb $0x20, (%r14) jne 0x22737 incl %edx jmp 0x2273c cmpl $0x1, %edx jg 0x22747 incq %r14 decq %rcx jne 0x2272d movq %r13, %r14 cmpq %r13, %r14 movq (%rsp), %r15 je 0x2277c movq 0x28(%rsp), %r13 movq %r13, %rdi movq %r14, %rsi movq 0x30(%rsp), %r12 movq %r12, %rdx callq 0x7230 movb $0x0, -0x1(%r13,%r12) movq %r14, %rdi callq 0x22910 jmp 0x2277c movq (%rsp), %r15 movl %eax, (%r15) jmp 0x226d5 callq 0x72a0 jmp 0x22793 jmp 0x227b3 jmp 0x22793 jmp 0x227b3 jmp 0x22793 movq %rax, %r14 movl %ebp, %edi callq 0x79e0 jmp 0x227a4 jmp 0x227b3 movq %rax, %r14 movl %ebx, %edi callq 0x79e0 movq %r14, %rdi callq 0x7930 movq %rax, %rdi callq 0x9c33
_ZN5nglog5toolsL44OpenObjectFileContainingPcAndGetStartAddressEmRmS1_Pcm: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 4D8h mov r12, r9 mov r13, r8 mov [rsp+508h+var_4F8], rcx mov [rsp+508h+var_500], rdx mov [rsp+508h+var_4E8], rsi mov r15, rdi lea r14, aProcSelfMaps; "/proc/self/maps" loc_223CD: mov rdi, r14 xor esi, esi xor eax, eax call _open cmp eax, 0FFFFFFFFh jnz short loc_223F4 call ___errno_location cmp dword ptr [rax], 4 jz short loc_223CD mov dword ptr [r15], 0FFFFFFFFh jmp loc_226E3 loc_223F4: mov ebx, eax lea r14, aProcSelfMem; "/proc/self/mem" loc_223FD: mov rdi, r14 xor esi, esi xor eax, eax call _open mov ebp, eax cmp eax, 0FFFFFFFFh jnz short loc_22426 call ___errno_location cmp dword ptr [rax], 4 jz short loc_223FD mov dword ptr [r15], 0FFFFFFFFh jmp loc_226DC loc_22426: mov [rsp+508h+var_4E0], r13 mov [rsp+508h+var_4D8], r12 mov [rsp+508h+var_508], r15 lea r15, [rsp+508h+var_438] xor r12d, r12d mov r13, r15 mov r14, r15 loc_22445: cmp r15, r14 jz short loc_2247D inc r13 cmp r13, r14 ja loc_22784 mov [rsp+508h+var_4F0], r14 sub r14, r13 mov rdi, r13 mov esi, 0Ah mov rdx, r14 call _memchr test rax, rax jz short loc_224A8 mov r15, r13 mov rdx, [rsp+508h+var_4F0] jmp short loc_224E8 loc_2247D: mov edx, offset stru_3F0.st_size; void * mov edi, ebx; this mov rsi, r15; int mov rcx, r12; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle loc_226CB add r12, rax lea rdx, [rsp+rax+508h+var_508] add rdx, 0D0h jmp short loc_224E8 loc_224A8: mov rdi, r15 mov rsi, r13 mov rdx, r14 call _memmove lea rsi, [rsp+r14+508h+var_508] add rsi, 0D0h; int mov edx, 400h sub rdx, r14; void * mov edi, ebx; this mov r14, rsi mov rcx, r12; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle loc_226CB add r12, rax add r14, rax mov rdx, r14 loc_224E8: mov [rsp+508h+var_4F0], rdx sub rdx, r15 mov rdi, r15 mov esi, 0Ah call _memchr test rax, rax jz loc_226CB mov r13, rax mov byte ptr [rax], 0 mov rdi, r15; this mov rsi, rax; char * mov rdx, [rsp+508h+var_500]; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) cmp rax, r13 jz loc_226CB cmp byte ptr [rax], 2Dh ; '-' jnz loc_226CB inc rax mov rdi, rax; this mov rsi, r13; char * lea rdx, [rsp+508h+var_4B8]; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) cmp rax, r13 jz loc_226CB mov r14, rax cmp byte ptr [rax], 20h ; ' ' jnz loc_226CB lea rdx, [r14+1] cmp rdx, r13 jnb loc_226CB mov rcx, r13 sub rcx, r14 mov eax, 1 loc_2256E: cmp byte ptr [r14+rax], 20h ; ' ' jz short loc_22585 inc rax cmp rcx, rax jnz short loc_2256E mov rax, rcx mov rcx, r13 jmp short loc_2258B loc_22585: mov rcx, r14 add rcx, rax loc_2258B: cmp rax, 5 jb loc_226CB cmp rcx, r13 jz loc_226CB mov [rsp+508h+var_4D0], rcx mov [rsp+508h+var_4C0], r12 mov [rsp+508h+var_4C8], rdx cmp byte ptr [rdx], 72h ; 'r' jnz loc_22688 mov rax, [rsp+508h+var_500] mov rcx, [rax]; unsigned __int64 mov edx, offset dword_40; void * mov edi, ebp; this lea rsi, [rsp+508h+var_478]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 40h ; '@' jnz loc_22688 cmp [rsp+508h+var_478], 464C457Fh jnz loc_22688 movzx eax, [rsp+508h+var_468] cmp eax, 2 jz short loc_22665 cmp eax, 3 jnz loc_22688 mov rax, [rsp+508h+var_500] mov rax, [rax] mov rcx, [rsp+508h+var_4F8] mov [rcx], rax movzx r12d, [rsp+508h+var_440] test r12, r12 jz short loc_22688 mov r15, [rsp+508h+var_458] loc_22629: mov rax, [rsp+508h+var_500] mov rcx, [rax] add rcx, r15; unsigned __int64 mov edx, offset word_38; void * mov edi, ebp; this lea rsi, [rsp+508h+var_4B0]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) cmp rax, 38h ; '8' jnz short loc_2265A cmp dword ptr [rsp+508h+var_4B0], 1 jnz short loc_2265A cmp [rsp+508h+var_4A8], 0 jz short loc_22673 loc_2265A: add r15, 38h ; '8' dec r12 jnz short loc_22629 jmp short loc_22688 loc_22665: mov rax, [rsp+508h+var_4F8] mov qword ptr [rax], 0 jmp short loc_22688 loc_22673: mov rax, [rsp+508h+var_500] mov rax, [rax] sub rax, [rsp+508h+var_4A0] mov rcx, [rsp+508h+var_4F8] mov [rcx], rax loc_22688: mov rax, [rsp+508h+var_500] mov rcx, [rsp+508h+var_4E8]; unsigned __int64 * cmp [rax], rcx ja short loc_226B4 mov rax, [rsp+508h+var_4E8] cmp qword ptr [rsp+508h+var_4B8], rax jbe short loc_226B4 mov rax, [rsp+508h+var_4C8] cmp byte ptr [rax], 72h ; 'r' jnz short loc_226B4 cmp byte ptr [r14+3], 78h ; 'x' jz short loc_226F5 loc_226B4: lea r15, [rsp+508h+var_438] mov r12, [rsp+508h+var_4C0] mov r14, [rsp+508h+var_4F0] jmp loc_22445 loc_226CB: mov rax, [rsp+508h+var_508] mov dword ptr [rax], 0FFFFFFFFh loc_226D5: mov edi, ebp call _close loc_226DC: mov edi, ebx call _close loc_226E3: add rsp, 4D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_226F5: mov rdi, [rsp+508h+var_4D0] inc rdi; this lea rdx, [rsp+508h+var_4B0]; char * mov rsi, r13; char * call _ZN5nglog5toolsL6GetHexEPKcS2_Pm; nglog::tools::GetHex(char const*,char const*,ulong *) mov rcx, rax mov eax, 0FFFFFFFFh cmp rcx, r13 jz short loc_22778 cmp byte ptr [rcx], 20h ; ' ' jnz short loc_22778 lea r14, [rcx+1] cmp r14, r13 jnb short loc_22747 not rcx add rcx, r13 xor edx, edx loc_2272D: cmp byte ptr [r14], 20h ; ' ' jnz short loc_22737 inc edx jmp short loc_2273C loc_22737: cmp edx, 1 jg short loc_22747 loc_2273C: inc r14 dec rcx jnz short loc_2272D mov r14, r13 loc_22747: cmp r14, r13 mov r15, [rsp+508h+var_508] jz short loc_2277C mov r13, [rsp+508h+var_4E0] mov rdi, r13 mov rsi, r14 mov r12, [rsp+508h+var_4D8] mov rdx, r12 call _strncpy mov byte ptr [r13+r12-1], 0 mov rdi, r14 call _ZN5nglog5tools12_GLOBAL__N_112FailureRetryIZNS0_L44OpenObjectFileContainingPcAndGetStartAddressEmRmS3_PcmE3$_2EEDaT_i jmp short loc_2277C loc_22778: mov r15, [rsp+508h+var_508] loc_2277C: mov [r15], eax jmp loc_226D5 loc_22784: call _abort jmp short loc_22793 jmp short loc_227B3 jmp short loc_22793 jmp short loc_227B3 jmp short $+2 loc_22793: mov r14, rax mov edi, ebp call _close jmp short loc_227A4 jmp short loc_227B3 mov r14, rax loc_227A4: mov edi, ebx call _close mov rdi, r14 call __Unwind_Resume loc_227B3: mov rdi, rax call __clang_call_terminate
_DWORD * nglog::tools::OpenObjectFileContainingPcAndGetStartAddress( nglog::tools *this, unsigned long long *a2, const char *a3, unsigned long long *a4, char *a5, long long a6) { unsigned int v9; // eax _DWORD *result; // rax unsigned int v11; // ebx unsigned long long v12; // rdi unsigned int v13; // ebp int *v14; // r15 long long v15; // r12 int *v16; // r13 int *i; // r14 int *v18; // r13 char *v19; // r14 char *v20; // rdx signed long long v21; // rax char *v22; // rdx char *v23; // r14 signed long long v24; // rax const char *v25; // rax unsigned long long *v26; // rcx int *Hex; // rax unsigned long long *v28; // rcx int *v29; // rax int *v30; // r14 _BYTE *v31; // rdx signed long long v32; // rcx unsigned long long v33; // rax int *v34; // rcx long long v35; // r12 long long v36; // r15 long long v37; // rcx int v38; // eax int *v39; // r14 char *v40; // rcx int v41; // edx _DWORD *v42; // r15 nglog::tools *v43; // [rsp+0h] [rbp-508h] int *v46; // [rsp+18h] [rbp-4F0h] int *v47; // [rsp+18h] [rbp-4F0h] char *v48; // [rsp+28h] [rbp-4E0h] long long v49; // [rsp+30h] [rbp-4D8h] int *v50; // [rsp+38h] [rbp-4D0h] long long v51; // [rsp+48h] [rbp-4C0h] char v52[8]; // [rsp+50h] [rbp-4B8h] BYREF char v53[8]; // [rsp+58h] [rbp-4B0h] BYREF long long v54; // [rsp+60h] [rbp-4A8h] long long v55; // [rsp+68h] [rbp-4A0h] int v56[4]; // [rsp+90h] [rbp-478h] BYREF __int16 v57; // [rsp+A0h] [rbp-468h] long long v58; // [rsp+B0h] [rbp-458h] unsigned __int16 v59; // [rsp+C8h] [rbp-440h] int v60[270]; // [rsp+D0h] [rbp-438h] BYREF while ( 1 ) { v9 = open("/proc/self/maps", 0LL); if ( v9 != -1 ) break; result = (_DWORD *)__errno_location("/proc/self/maps"); if ( *result != 4 ) { *(_DWORD *)this = -1; return result; } } v11 = v9; while ( 1 ) { v12 = (unsigned long long)"/proc/self/mem"; v13 = open("/proc/self/mem", 0LL); if ( v13 != -1 ) break; if ( *(_DWORD *)__errno_location("/proc/self/mem") != 4 ) { *(_DWORD *)this = -1; return (_DWORD *)close(v11); } } v48 = a5; v49 = a6; v43 = this; v14 = v60; v15 = 0LL; v16 = v60; for ( i = v60; ; i = v47 ) { if ( v60 == i ) { v21 = nglog::tools::ReadFromOffset(v11, (long long)v60, (char *)&stru_3F0.st_size, v15); if ( v21 <= 0 ) goto LABEL_49; v15 += v21; v20 = (char *)v60 + v21; } else { v18 = (int *)((char *)v16 + 1); if ( v18 > i ) abort(v12); v46 = i; v19 = (char *)((char *)i - (char *)v18); if ( memchr(v18, 10LL, v19) ) { v14 = v18; v20 = (char *)v46; } else { memmove(v60, v18, v19); v22 = (char *)(1024LL - (_QWORD)v19); v23 = (char *)v60 + (_QWORD)v19; v24 = nglog::tools::ReadFromOffset(v11, (long long)v23, v22, v15); if ( v24 <= 0 ) goto LABEL_49; v15 += v24; v20 = &v23[v24]; } } v47 = (int *)v20; v25 = (const char *)memchr(v14, 10LL, v20 - (char *)v14); if ( !v25 ) goto LABEL_49; v16 = (int *)v25; *v25 = 0; Hex = (int *)nglog::tools::GetHex((nglog::tools *)v14, v25, a3, v26); if ( Hex == v16 ) goto LABEL_49; if ( *(_BYTE *)Hex != 45 ) goto LABEL_49; v12 = (unsigned long long)Hex + 1; v29 = (int *)nglog::tools::GetHex((nglog::tools *)((char *)Hex + 1), (const char *)v16, v52, v28); if ( v29 == v16 ) goto LABEL_49; v30 = v29; if ( *(_BYTE *)v29 != 32 ) goto LABEL_49; v31 = (char *)v29 + 1; if ( (int *)((char *)v29 + 1) >= v16 ) goto LABEL_49; v32 = (char *)v16 - (char *)v29; v33 = 1LL; while ( *((_BYTE *)v30 + v33) != 32 ) { if ( v32 == ++v33 ) { v33 = (char *)v16 - (char *)v30; v34 = v16; goto LABEL_28; } } v34 = (int *)((char *)v30 + v33); LABEL_28: if ( v33 < 5 || v34 == v16 ) { LABEL_49: *(_DWORD *)v43 = -1; goto LABEL_50; } v50 = v34; v51 = v15; if ( *v31 == 114 ) { v12 = v13; if ( nglog::tools::ReadFromOffset(v13, (long long)v56, (char *)&dword_40, *(_QWORD *)a3) == 64 && v56[0] == 1179403647 ) { if ( v57 == 2 ) { *a4 = 0LL; } else if ( v57 == 3 ) { *a4 = *(_QWORD *)a3; v35 = v59; if ( v59 ) { v36 = v58; while ( 1 ) { v12 = v13; if ( nglog::tools::ReadFromOffset(v13, (long long)v53, (char *)&word_38, v36 + *(_QWORD *)a3) == 56 && *(_DWORD *)v53 == 1 && !v54 ) { break; } v36 += 56LL; if ( !--v35 ) goto LABEL_44; } *a4 = *(_QWORD *)a3 - v55; } } } } LABEL_44: if ( *(_QWORD *)a3 <= (unsigned long long)a2 && *(_QWORD *)v52 > (unsigned long long)a2 && *((_BYTE *)v30 + 1) == 114 && *((_BYTE *)v30 + 3) == 120 ) { break; } v14 = v60; v15 = v51; } v37 = nglog::tools::GetHex((nglog::tools *)((char *)v50 + 1), (const char *)v16, v53, a2); v38 = -1; if ( (int *)v37 == v16 || *(_BYTE *)v37 != 32 ) { v42 = v43; } else { v39 = (int *)(v37 + 1); if ( v37 + 1 < (unsigned long long)v16 ) { v40 = (char *)v16 + ~v37; v41 = 0; do { if ( *(_BYTE *)v39 == 32 ) { ++v41; } else if ( v41 > 1 ) { goto LABEL_61; } v39 = (int *)((char *)v39 + 1); --v40; } while ( v40 ); v39 = v16; } LABEL_61: v42 = v43; if ( v39 != v16 ) { strncpy(v48, v39, v49); v48[v49 - 1] = 0; v38 = nglog::tools::`anonymous namespace'::FailureRetry<nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long,unsigned long &,unsigned long &,char *,unsigned long)::$_2>(v39); } } *v42 = v38; LABEL_50: close(v13); return (_DWORD *)close(v11); }
OpenObjectFileContainingPcAndGetStartAddress: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x4d8 MOV R12,R9 MOV R13,R8 MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x20],RSI MOV R15,RDI LEA R14,[0x125f60] LAB_001223cd: MOV RDI,R14 XOR ESI,ESI XOR EAX,EAX CALL 0x00107390 CMP EAX,-0x1 JNZ 0x001223f4 CALL 0x00107040 CMP dword ptr [RAX],0x4 JZ 0x001223cd MOV dword ptr [R15],0xffffffff JMP 0x001226e3 LAB_001223f4: MOV EBX,EAX LEA R14,[0x125f70] LAB_001223fd: MOV RDI,R14 XOR ESI,ESI XOR EAX,EAX CALL 0x00107390 MOV EBP,EAX CMP EAX,-0x1 JNZ 0x00122426 CALL 0x00107040 CMP dword ptr [RAX],0x4 JZ 0x001223fd MOV dword ptr [R15],0xffffffff JMP 0x001226dc LAB_00122426: MOV qword ptr [RSP + 0x28],R13 MOV qword ptr [RSP + 0x30],R12 MOV qword ptr [RSP],R15 LEA R15,[RSP + 0xd0] XOR R12D,R12D MOV R13,R15 MOV R14,R15 LAB_00122445: CMP R15,R14 JZ 0x0012247d INC R13 CMP R13,R14 JA 0x00122784 MOV qword ptr [RSP + 0x18],R14 SUB R14,R13 MOV RDI,R13 MOV ESI,0xa MOV RDX,R14 CALL 0x00107590 TEST RAX,RAX JZ 0x001224a8 MOV R15,R13 MOV RDX,qword ptr [RSP + 0x18] JMP 0x001224e8 LAB_0012247d: MOV EDX,0x400 MOV EDI,EBX MOV RSI,R15 MOV RCX,R12 CALL 0x00121fa9 LAB_0012248f: TEST RAX,RAX JLE 0x001226cb ADD R12,RAX LEA RDX,[RSP + RAX*0x1] ADD RDX,0xd0 JMP 0x001224e8 LAB_001224a8: MOV RDI,R15 MOV RSI,R13 MOV RDX,R14 CALL 0x00107880 LEA RSI,[RSP + R14*0x1] ADD RSI,0xd0 MOV EDX,0x400 SUB RDX,R14 LAB_001224c9: MOV EDI,EBX MOV R14,RSI MOV RCX,R12 CALL 0x00121fa9 TEST RAX,RAX JLE 0x001226cb ADD R12,RAX ADD R14,RAX MOV RDX,R14 LAB_001224e8: MOV qword ptr [RSP + 0x18],RDX SUB RDX,R15 MOV RDI,R15 MOV ESI,0xa CALL 0x00107590 TEST RAX,RAX JZ 0x001226cb MOV R13,RAX MOV byte ptr [RAX],0x0 MOV RDI,R15 MOV RSI,RAX MOV RDX,qword ptr [RSP + 0x8] CALL 0x00122897 CMP RAX,R13 JZ 0x001226cb CMP byte ptr [RAX],0x2d JNZ 0x001226cb INC RAX MOV RDI,RAX MOV RSI,R13 LEA RDX,[RSP + 0x50] CALL 0x00122897 CMP RAX,R13 JZ 0x001226cb MOV R14,RAX CMP byte ptr [RAX],0x20 JNZ 0x001226cb LEA RDX,[R14 + 0x1] CMP RDX,R13 JNC 0x001226cb MOV RCX,R13 SUB RCX,R14 MOV EAX,0x1 LAB_0012256e: CMP byte ptr [R14 + RAX*0x1],0x20 JZ 0x00122585 INC RAX CMP RCX,RAX JNZ 0x0012256e MOV RAX,RCX MOV RCX,R13 JMP 0x0012258b LAB_00122585: MOV RCX,R14 ADD RCX,RAX LAB_0012258b: CMP RAX,0x5 JC 0x001226cb CMP RCX,R13 JZ 0x001226cb MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x48],R12 MOV qword ptr [RSP + 0x40],RDX CMP byte ptr [RDX],0x72 JNZ 0x00122688 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] LAB_001225be: MOV EDX,0x40 MOV EDI,EBP LEA RSI,[RSP + 0x90] CALL 0x00121fa9 CMP RAX,0x40 JNZ 0x00122688 CMP dword ptr [RSP + 0x90],0x464c457f JNZ 0x00122688 MOVZX EAX,word ptr [RSP + 0xa0] CMP EAX,0x2 JZ 0x00122665 CMP EAX,0x3 JNZ 0x00122688 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RCX],RAX MOVZX R12D,word ptr [RSP + 0xc8] TEST R12,R12 JZ 0x00122688 MOV R15,qword ptr [RSP + 0xb0] LAB_00122629: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] ADD RCX,R15 LAB_00122634: MOV EDX,0x38 MOV EDI,EBP LEA RSI,[RSP + 0x58] CALL 0x00121fa9 CMP RAX,0x38 JNZ 0x0012265a CMP dword ptr [RSP + 0x58],0x1 JNZ 0x0012265a CMP qword ptr [RSP + 0x60],0x0 JZ 0x00122673 LAB_0012265a: ADD R15,0x38 DEC R12 JNZ 0x00122629 JMP 0x00122688 LAB_00122665: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],0x0 JMP 0x00122688 LAB_00122673: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] SUB RAX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RCX],RAX LAB_00122688: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x20] CMP qword ptr [RAX],RCX JA 0x001226b4 MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RSP + 0x50],RAX JBE 0x001226b4 MOV RAX,qword ptr [RSP + 0x40] CMP byte ptr [RAX],0x72 JNZ 0x001226b4 CMP byte ptr [R14 + 0x3],0x78 JZ 0x001226f5 LAB_001226b4: LEA R15,[RSP + 0xd0] MOV R12,qword ptr [RSP + 0x48] MOV R14,qword ptr [RSP + 0x18] JMP 0x00122445 LAB_001226cb: MOV RAX,qword ptr [RSP] MOV dword ptr [RAX],0xffffffff LAB_001226d5: MOV EDI,EBP CALL 0x001079e0 LAB_001226dc: MOV EDI,EBX CALL 0x001079e0 LAB_001226e3: ADD RSP,0x4d8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001226f5: MOV RDI,qword ptr [RSP + 0x38] INC RDI LEA RDX,[RSP + 0x58] MOV RSI,R13 CALL 0x00122897 MOV RCX,RAX MOV EAX,0xffffffff CMP RCX,R13 JZ 0x00122778 CMP byte ptr [RCX],0x20 JNZ 0x00122778 LEA R14,[RCX + 0x1] CMP R14,R13 JNC 0x00122747 NOT RCX ADD RCX,R13 XOR EDX,EDX LAB_0012272d: CMP byte ptr [R14],0x20 JNZ 0x00122737 INC EDX JMP 0x0012273c LAB_00122737: CMP EDX,0x1 JG 0x00122747 LAB_0012273c: INC R14 DEC RCX JNZ 0x0012272d MOV R14,R13 LAB_00122747: CMP R14,R13 MOV R15,qword ptr [RSP] JZ 0x0012277c MOV R13,qword ptr [RSP + 0x28] MOV RDI,R13 MOV RSI,R14 MOV R12,qword ptr [RSP + 0x30] MOV RDX,R12 CALL 0x00107230 MOV byte ptr [R13 + R12*0x1 + -0x1],0x0 LAB_0012276e: MOV RDI,R14 CALL 0x00122910 JMP 0x0012277c LAB_00122778: MOV R15,qword ptr [RSP] LAB_0012277c: MOV dword ptr [R15],EAX JMP 0x001226d5 LAB_00122784: CALL 0x001072a0
/* nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned long, unsigned long&, unsigned long&, char*, unsigned long) */ void __thiscall nglog::tools::OpenObjectFileContainingPcAndGetStartAddress (tools *this,ulong param_1,ulong *param_2,ulong *param_3,char *param_4,ulong param_5) { int __fd; int __fd_00; int4 uVar1; int *piVar2; void *pvVar3; char *pcVar4; ulong uVar5; long lVar6; long lVar7; char *pcVar8; ulong uVar9; char *pcVar10; int iVar11; ulong uVar12; char *pcVar13; size_t __n; char *pcVar14; ulong local_4b8; int local_4b0 [2]; long local_4a8; long local_4a0; int local_478 [4]; short local_468; long local_458; ushort local_440; char local_438 [1032]; while (__fd = open("/proc/self/maps",0), __fd == -1) { piVar2 = __errno_location(); if (*piVar2 != 4) { *(int4 *)this = 0xffffffff; return; } } do { /* try { // try from 001223fd to 00122408 has its CatchHandler @ 001227a1 */ __fd_00 = open("/proc/self/mem",0); if (__fd_00 != -1) { pcVar4 = local_438; uVar12 = 0; pcVar8 = pcVar4; goto LAB_00122445; } piVar2 = __errno_location(); } while (*piVar2 == 4); *(int4 *)this = 0xffffffff; goto LAB_001226dc; LAB_00122445: do { if (local_438 == pcVar8) { /* try { // try from 0012247d to 0012248e has its CatchHandler @ 00122791 */ lVar6 = ReadFromOffset(__fd,local_438,0x400,uVar12); if (0 < lVar6) { uVar12 = uVar12 + lVar6; pcVar8 = local_438 + lVar6; pcVar13 = local_438; goto LAB_001224e8; } LAB_001226cb: *(int4 *)this = 0xffffffff; goto LAB_001226d5; } pcVar13 = pcVar4 + 1; if (pcVar8 < pcVar13) { /* WARNING: Subroutine does not return */ abort(); } __n = (long)pcVar8 - (long)pcVar13; pvVar3 = memchr(pcVar13,10,__n); if (pvVar3 == (void *)0x0) { memmove(local_438,pcVar13,__n); /* try { // try from 001224c9 to 001224d5 has its CatchHandler @ 00122791 */ lVar6 = ReadFromOffset(__fd,local_438 + __n,0x400 - __n,uVar12); if (lVar6 < 1) goto LAB_001226cb; uVar12 = uVar12 + lVar6; pcVar8 = local_438 + __n + lVar6; pcVar13 = local_438; } LAB_001224e8: pcVar4 = (char *)memchr(pcVar13,10,(long)pcVar8 - (long)pcVar13); if (pcVar4 == (char *)0x0) goto LAB_001226cb; *pcVar4 = '\0'; pcVar13 = (char *)GetHex(pcVar13,pcVar4,param_2); if ((((pcVar13 == pcVar4) || (*pcVar13 != '-')) || (pcVar13 = (char *)GetHex(pcVar13 + 1,pcVar4,&local_4b8), pcVar13 == pcVar4)) || ((*pcVar13 != ' ' || (pcVar14 = pcVar13 + 1, pcVar4 <= pcVar14)))) goto LAB_001226cb; uVar9 = (long)pcVar4 - (long)pcVar13; uVar5 = 1; do { if (pcVar13[uVar5] == ' ') { uVar9 = uVar5; pcVar10 = pcVar13 + uVar5; break; } uVar5 = uVar5 + 1; pcVar10 = pcVar4; } while (uVar9 != uVar5); if ((uVar9 < 5) || (pcVar10 == pcVar4)) goto LAB_001226cb; /* try { // try from 001225be to 001225d1 has its CatchHandler @ 0012278d */ if (((*pcVar14 == 'r') && (lVar6 = ReadFromOffset(__fd_00,local_478,0x40,*param_2), lVar6 == 0x40)) && (local_478[0] == 0x464c457f)) { if (local_468 == 2) { *param_3 = 0; } else if (local_468 == 3) { *param_3 = *param_2; lVar6 = local_458; for (uVar9 = (ulong)local_440; uVar9 != 0; uVar9 = uVar9 - 1) { /* try { // try from 00122634 to 00122644 has its CatchHandler @ 00122793 */ lVar7 = ReadFromOffset(__fd_00,local_4b0,0x38,*param_2 + lVar6); if (((lVar7 == 0x38) && (local_4b0[0] == 1)) && (local_4a8 == 0)) { *param_3 = *param_2 - local_4a0; break; } lVar6 = lVar6 + 0x38; } } } } while (((param_1 < *param_2) || (local_4b8 <= param_1)) || ((*pcVar14 != 'r' || (pcVar13[3] != 'x')))); pcVar8 = (char *)GetHex(pcVar10 + 1,pcVar4,(ulong *)local_4b0); uVar1 = 0xffffffff; if ((pcVar8 != pcVar4) && (*pcVar8 == ' ')) { pcVar13 = pcVar8 + 1; pcVar14 = pcVar13; if (pcVar13 < pcVar4) { pcVar8 = pcVar4 + ~(ulong)pcVar8; iVar11 = 0; do { if (*pcVar13 == ' ') { iVar11 = iVar11 + 1; } else { pcVar14 = pcVar13; if (1 < iVar11) break; } pcVar13 = pcVar13 + 1; pcVar8 = pcVar8 + -1; pcVar14 = pcVar4; } while (pcVar8 != (char *)0x0); } if (pcVar14 != pcVar4) { strncpy(param_4,pcVar14,param_5); param_4[param_5 - 1] = '\0'; /* try { // try from 0012276e to 00122775 has its CatchHandler @ 00122789 */ uVar1 = (anonymous_namespace):: FailureRetry<nglog::tools::OpenObjectFileContainingPcAndGetStartAddress(unsigned_long,unsigned_long&,unsigned_long&,char*,unsigned_long)::__2> (pcVar14); } } *(int4 *)this = uVar1; LAB_001226d5: /* try { // try from 001226d5 to 001226db has its CatchHandler @ 0012278b */ close(__fd_00); LAB_001226dc: /* try { // try from 001226dc to 001226e2 has its CatchHandler @ 0012278f */ close(__fd); return; }
39,786
my_char_weight_put
eloqsql/strings/ctype-uca.c
static my_bool my_char_weight_put(MY_UCA_WEIGHT_LEVEL *dst, uint16 *to, size_t to_length, size_t *nweights, my_wc_t *str, size_t len) { size_t count; int rc= FALSE; if (!to_length) { *nweights= 0; return len > 0; } to_length--; /* Without trailing zero */ for (count= 0; len; ) { size_t chlen; const uint16 *from= NULL; uint16 implicit_weights[3]; for (chlen= len; chlen > 1; chlen--) { const MY_CONTRACTION *cnt; if (chlen <= MY_UCA_MAX_CONTRACTION && (cnt= my_uca_contraction_find(&dst->contractions, str, chlen))) { from= cnt->weight; str+= chlen; len-= chlen; break; } } if (!from) { from= my_char_weight_addr(dst, *str); if (!from) { from= implicit_weights; my_uca_implicit_weight_put(implicit_weights, *str, dst->levelno); } str++; len--; } for ( ; from && *from && count < to_length; ) { *to++= *from++; count++; } if (count == to_length && from && * from) rc= TRUE; /* All weights did not fit */ } *to= 0; *nweights= count; return rc; }
O0
c
my_char_weight_put: pushq %rbp movq %rsp, %rbp subq $0x70, %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) movl $0x0, -0x44(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x4fd4e movq -0x28(%rbp), %rax movq $0x0, (%rax) cmpq $0x0, -0x38(%rbp) seta %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) jmp 0x4feed movq -0x20(%rbp), %rax addq $-0x1, %rax movq %rax, -0x20(%rbp) movq $0x0, -0x40(%rbp) cmpq $0x0, -0x38(%rbp) je 0x4fed3 movq $0x0, -0x58(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x50(%rbp) cmpq $0x1, -0x50(%rbp) jbe 0x4fde7 cmpq $0x6, -0x50(%rbp) ja 0x4fdd7 movq -0x10(%rbp), %rdi addq $0x18, %rdi movq -0x30(%rbp), %rsi movq -0x50(%rbp), %rdx callq 0x501a0 movq %rax, -0x68(%rbp) cmpq $0x0, %rax je 0x4fdd7 movq -0x68(%rbp), %rax addq $0x30, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax shlq $0x3, %rax addq -0x30(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x50(%rbp), %rcx movq -0x38(%rbp), %rax subq %rcx, %rax movq %rax, -0x38(%rbp) jmp 0x4fde7 jmp 0x4fdd9 movq -0x50(%rbp), %rax addq $-0x1, %rax movq %rax, -0x50(%rbp) jmp 0x4fd7d cmpq $0x0, -0x58(%rbp) jne 0x4fe42 movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rax movq (%rax), %rax movl %eax, %esi callq 0x4d4c0 movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) jne 0x4fe2a leaq -0x5e(%rbp), %rax movq %rax, -0x58(%rbp) leaq -0x5e(%rbp), %rdi movq -0x30(%rbp), %rax movq (%rax), %rsi movq -0x10(%rbp), %rax movl 0x30(%rax), %edx callq 0x4fac0 movq -0x30(%rbp), %rax addq $0x8, %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rax addq $-0x1, %rax movq %rax, -0x38(%rbp) jmp 0x4fe44 xorl %eax, %eax cmpq $0x0, -0x58(%rbp) movb %al, -0x69(%rbp) je 0x4fe6f movq -0x58(%rbp), %rax movzwl (%rax), %ecx xorl %eax, %eax cmpl $0x0, %ecx movb %al, -0x69(%rbp) je 0x4fe6f movq -0x40(%rbp), %rax cmpq -0x20(%rbp), %rax setb %al movb %al, -0x69(%rbp) movb -0x69(%rbp), %al testb $0x1, %al jne 0x4fe78 jmp 0x4feaa movq -0x58(%rbp), %rax movq %rax, %rcx addq $0x2, %rcx movq %rcx, -0x58(%rbp) movw (%rax), %cx movq -0x18(%rbp), %rax movq %rax, %rdx addq $0x2, %rdx movq %rdx, -0x18(%rbp) movw %cx, (%rax) movq -0x40(%rbp), %rax addq $0x1, %rax movq %rax, -0x40(%rbp) jmp 0x4fe44 movq -0x40(%rbp), %rax cmpq -0x20(%rbp), %rax jne 0x4fece cmpq $0x0, -0x58(%rbp) je 0x4fece movq -0x58(%rbp), %rax movzwl (%rax), %eax cmpl $0x0, %eax je 0x4fece movl $0x1, -0x44(%rbp) jmp 0x4fd62 movq -0x18(%rbp), %rax movw $0x0, (%rax) movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_char_weight_put: push rbp mov rbp, rsp sub rsp, 70h 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 [rbp+var_44], 0 cmp [rbp+var_20], 0 jnz short loc_4FD4E mov rax, [rbp+var_28] mov qword ptr [rax], 0 cmp [rbp+var_38], 0 setnbe al and al, 1 movzx eax, al mov [rbp+var_1], al jmp loc_4FEED loc_4FD4E: mov rax, [rbp+var_20] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax mov [rbp+var_40], 0 loc_4FD62: cmp [rbp+var_38], 0 jz loc_4FED3 mov [rbp+var_58], 0 mov rax, [rbp+var_38] mov [rbp+var_50], rax loc_4FD7D: cmp [rbp+var_50], 1 jbe short loc_4FDE7 cmp [rbp+var_50], 6 ja short loc_4FDD7 mov rdi, [rbp+var_10] add rdi, 18h mov rsi, [rbp+var_30] mov rdx, [rbp+var_50] call my_uca_contraction_find mov [rbp+var_68], rax cmp rax, 0 jz short loc_4FDD7 mov rax, [rbp+var_68] add rax, 30h ; '0' mov [rbp+var_58], rax mov rax, [rbp+var_50] shl rax, 3 add rax, [rbp+var_30] mov [rbp+var_30], rax mov rcx, [rbp+var_50] mov rax, [rbp+var_38] sub rax, rcx mov [rbp+var_38], rax jmp short loc_4FDE7 loc_4FDD7: jmp short $+2 loc_4FDD9: mov rax, [rbp+var_50] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_50], rax jmp short loc_4FD7D loc_4FDE7: cmp [rbp+var_58], 0 jnz short loc_4FE42 mov rdi, [rbp+var_10] mov rax, [rbp+var_30] mov rax, [rax] mov esi, eax call my_char_weight_addr mov [rbp+var_58], rax cmp [rbp+var_58], 0 jnz short loc_4FE2A lea rax, [rbp+var_5E] mov [rbp+var_58], rax lea rdi, [rbp+var_5E] mov rax, [rbp+var_30] mov rsi, [rax] mov rax, [rbp+var_10] mov edx, [rax+30h] call my_uca_implicit_weight_put loc_4FE2A: mov rax, [rbp+var_30] add rax, 8 mov [rbp+var_30], rax mov rax, [rbp+var_38] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rax loc_4FE42: jmp short $+2 loc_4FE44: xor eax, eax cmp [rbp+var_58], 0 mov [rbp+var_69], al jz short loc_4FE6F mov rax, [rbp+var_58] movzx ecx, word ptr [rax] xor eax, eax cmp ecx, 0 mov [rbp+var_69], al jz short loc_4FE6F mov rax, [rbp+var_40] cmp rax, [rbp+var_20] setb al mov [rbp+var_69], al loc_4FE6F: mov al, [rbp+var_69] test al, 1 jnz short loc_4FE78 jmp short loc_4FEAA loc_4FE78: mov rax, [rbp+var_58] mov rcx, rax add rcx, 2 mov [rbp+var_58], rcx mov cx, [rax] mov rax, [rbp+var_18] mov rdx, rax add rdx, 2 mov [rbp+var_18], rdx mov [rax], cx mov rax, [rbp+var_40] add rax, 1 mov [rbp+var_40], rax jmp short loc_4FE44 loc_4FEAA: mov rax, [rbp+var_40] cmp rax, [rbp+var_20] jnz short loc_4FECE cmp [rbp+var_58], 0 jz short loc_4FECE mov rax, [rbp+var_58] movzx eax, word ptr [rax] cmp eax, 0 jz short loc_4FECE mov [rbp+var_44], 1 loc_4FECE: jmp loc_4FD62 loc_4FED3: mov rax, [rbp+var_18] mov word ptr [rax], 0 mov rcx, [rbp+var_40] mov rax, [rbp+var_28] mov [rax], rcx mov eax, [rbp+var_44] mov [rbp+var_1], al loc_4FEED: mov al, [rbp+var_1] add rsp, 70h pop rbp retn
bool my_char_weight_put( _QWORD *a1, _WORD *a2, unsigned long long a3, unsigned long long *a4, unsigned long long *a5, unsigned long long a6) { __int16 *v6; // rax __int16 v7; // cx _WORD *v8; // rax bool v10; // [rsp+7h] [rbp-69h] long long v11; // [rsp+8h] [rbp-68h] _WORD v12[3]; // [rsp+12h] [rbp-5Eh] BYREF __int16 *v13; // [rsp+18h] [rbp-58h] unsigned long long i; // [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] unsigned long long *v18; // [rsp+40h] [rbp-30h] unsigned long long *v19; // [rsp+48h] [rbp-28h] unsigned long long v20; // [rsp+50h] [rbp-20h] _WORD *v21; // [rsp+58h] [rbp-18h] _QWORD *v22; // [rsp+60h] [rbp-10h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; v17 = a6; v15 = 0; if ( a3 ) { --v20; v16 = 0LL; while ( v17 ) { v13 = 0LL; for ( i = v17; i > 1; --i ) { if ( i <= 6 ) { v11 = my_uca_contraction_find(v22 + 3, v18, i); if ( v11 ) { v13 = (__int16 *)(v11 + 48); v18 += i; v17 -= i; break; } } } if ( !v13 ) { v13 = (__int16 *)my_char_weight_addr(v22, *v18); if ( !v13 ) { v13 = v12; my_uca_implicit_weight_put(v12, *v18, *((_DWORD *)v22 + 12)); } ++v18; --v17; } while ( 1 ) { v10 = 0; if ( v13 ) { v10 = 0; if ( *v13 ) v10 = v16 < v20; } if ( !v10 ) break; v6 = v13++; v7 = *v6; v8 = v21++; *v8 = v7; ++v16; } if ( v16 == v20 && v13 && *v13 ) v15 = 1; } *v21 = 0; *v19 = v16; return v15; } else { *v19 = 0LL; return v17 != 0; } }
my_char_weight_put: PUSH RBP MOV RBP,RSP SUB RSP,0x70 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 dword ptr [RBP + -0x44],0x0 CMP qword ptr [RBP + -0x20],0x0 JNZ 0x0014fd4e MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],0x0 CMP qword ptr [RBP + -0x38],0x0 SETA AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL JMP 0x0014feed LAB_0014fd4e: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x40],0x0 LAB_0014fd62: CMP qword ptr [RBP + -0x38],0x0 JZ 0x0014fed3 MOV qword ptr [RBP + -0x58],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x50],RAX LAB_0014fd7d: CMP qword ptr [RBP + -0x50],0x1 JBE 0x0014fde7 CMP qword ptr [RBP + -0x50],0x6 JA 0x0014fdd7 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x18 MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x50] CALL 0x001501a0 MOV qword ptr [RBP + -0x68],RAX CMP RAX,0x0 JZ 0x0014fdd7 MOV RAX,qword ptr [RBP + -0x68] ADD RAX,0x30 MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] SHL RAX,0x3 ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x30],RAX MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX JMP 0x0014fde7 LAB_0014fdd7: JMP 0x0014fdd9 LAB_0014fdd9: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,-0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0014fd7d LAB_0014fde7: CMP qword ptr [RBP + -0x58],0x0 JNZ 0x0014fe42 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ESI,EAX CALL 0x0014d4c0 MOV qword ptr [RBP + -0x58],RAX CMP qword ptr [RBP + -0x58],0x0 JNZ 0x0014fe2a LEA RAX,[RBP + -0x5e] MOV qword ptr [RBP + -0x58],RAX LEA RDI,[RBP + -0x5e] MOV RAX,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x30] CALL 0x0014fac0 LAB_0014fe2a: MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x8 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,-0x1 MOV qword ptr [RBP + -0x38],RAX LAB_0014fe42: JMP 0x0014fe44 LAB_0014fe44: XOR EAX,EAX CMP qword ptr [RBP + -0x58],0x0 MOV byte ptr [RBP + -0x69],AL JZ 0x0014fe6f MOV RAX,qword ptr [RBP + -0x58] MOVZX ECX,word ptr [RAX] XOR EAX,EAX CMP ECX,0x0 MOV byte ptr [RBP + -0x69],AL JZ 0x0014fe6f MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x20] SETC AL MOV byte ptr [RBP + -0x69],AL LAB_0014fe6f: MOV AL,byte ptr [RBP + -0x69] TEST AL,0x1 JNZ 0x0014fe78 JMP 0x0014feaa LAB_0014fe78: MOV RAX,qword ptr [RBP + -0x58] MOV RCX,RAX ADD RCX,0x2 MOV qword ptr [RBP + -0x58],RCX MOV CX,word ptr [RAX] MOV RAX,qword ptr [RBP + -0x18] MOV RDX,RAX ADD RDX,0x2 MOV qword ptr [RBP + -0x18],RDX MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x1 MOV qword ptr [RBP + -0x40],RAX JMP 0x0014fe44 LAB_0014feaa: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0014fece CMP qword ptr [RBP + -0x58],0x0 JZ 0x0014fece MOV RAX,qword ptr [RBP + -0x58] MOVZX EAX,word ptr [RAX] CMP EAX,0x0 JZ 0x0014fece MOV dword ptr [RBP + -0x44],0x1 LAB_0014fece: JMP 0x0014fd62 LAB_0014fed3: MOV RAX,qword ptr [RBP + -0x18] MOV word ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RBP + -0x44] MOV byte ptr [RBP + -0x1],AL LAB_0014feed: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x70 POP RBP RET
int8 my_char_weight_put(long param_1,short *param_2,long param_3,ulong *param_4,ulong *param_5, ulong param_6) { long lVar1; ulong uVar2; bool bVar3; short local_66 [3]; short *local_60; ulong local_58; uint local_4c; ulong local_48; ulong local_40; ulong *local_38; ulong *local_30; ulong local_28; short *local_20; long local_18; int1 local_9; local_4c = 0; if (param_3 == 0) { *param_4 = 0; local_9 = param_6 != 0; uVar2 = 0; } else { local_28 = param_3 - 1; local_48 = 0; local_40 = param_6; local_38 = param_5; local_30 = param_4; local_20 = param_2; local_18 = param_1; while (local_40 != 0) { local_60 = (short *)0x0; for (local_58 = local_40; 1 < local_58; local_58 = local_58 - 1) { if ((local_58 < 7) && (lVar1 = my_uca_contraction_find(local_18 + 0x18,local_38,local_58), lVar1 != 0)) { local_60 = (short *)(lVar1 + 0x30); local_38 = local_38 + local_58; local_40 = local_40 - local_58; break; } } if (local_60 == (short *)0x0) { local_60 = (short *)my_char_weight_addr(local_18,*local_38 & 0xffffffff); if (local_60 == (short *)0x0) { local_60 = local_66; my_uca_implicit_weight_put(local_66,*local_38,*(int4 *)(local_18 + 0x30)); } local_38 = local_38 + 1; local_40 = local_40 - 1; } while( true ) { bVar3 = false; if ((local_60 != (short *)0x0) && (bVar3 = false, *local_60 != 0)) { bVar3 = local_48 < local_28; } if (!bVar3) break; *local_20 = *local_60; local_48 = local_48 + 1; local_60 = local_60 + 1; local_20 = local_20 + 1; } if (((local_48 == local_28) && (local_60 != (short *)0x0)) && (*local_60 != 0)) { local_4c = 1; } } *local_20 = 0; *local_30 = local_48; uVar2 = (ulong)local_4c; local_9 = (int1)local_4c; } return CONCAT71((int7)(uVar2 >> 8),local_9); }
39,787
httpclient_post_stream
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal_http-src/src/httpclient.c
int32_t httpclient_post_stream (HTTP_CLIENT_T* client, const char* endpoint, HTTP_STREAM_NEXT_T stream, uint32_t parm, int32_t len, const char *credentials) { int32_t status = httpclient_post_start (client, endpoint, len, credentials, 0) ; if (status >= 0) { status = httpclient_write_stream(client, stream, parm, len, 8000) ; } return status ; }
O3
c
httpclient_post_stream: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r8d, %r14d movl %ecx, %r15d movq %rdx, %r13 movq %rdi, %r12 xorl %ebx, %ebx movl %r8d, %edx movq %r9, %rcx xorl %r8d, %r8d callq 0x2000e testl %eax, %eax js 0x20418 leaq -0x2c(%rbp), %rcx movl $0x1f40, (%rcx) # imm = 0x1F40 movl (%r12), %edi movl $0x1, %esi movl $0x15, %edx movl $0x4, %r8d callq 0x6110 movl (%r12), %esi movl %r14d, %ecx subl %ebx, %ecx leaq 0xa32(%rip), %rdi # 0x20e37 movl %r15d, %edx callq *%r13 testl %eax, %eax jle 0x2041c addl %eax, %ebx cmpl %r14d, %ebx jl 0x203f5 jmp 0x2043d movl %eax, %ebx jmp 0x2043d movl (%r12), %ecx leaq 0x13680(%rip), %rdx # 0x33aa7 movl $0x2, %edi xorl %esi, %esi movl %eax, %r8d xorl %eax, %eax callq 0x160ad movl $0xfffffffe, %ebx # imm = 0xFFFFFFFE movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
httpclient_post_stream: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, r8d mov r15d, ecx mov r13, rdx mov r12, rdi xor ebx, ebx mov edx, r8d mov rcx, r9 xor r8d, r8d call httpclient_post_start test eax, eax js short loc_20418 lea rcx, [rbp+var_2C] mov dword ptr [rcx], 1F40h mov edi, [r12] mov esi, 1 mov edx, 15h mov r8d, 4 call _setsockopt loc_203F5: mov esi, [r12] mov ecx, r14d sub ecx, ebx lea rdi, socket_send mov edx, r15d call r13 test eax, eax jle short loc_2041C add ebx, eax cmp ebx, r14d jl short loc_203F5 jmp short loc_2043D loc_20418: mov ebx, eax jmp short loc_2043D loc_2041C: mov ecx, [r12] lea rdx, aHttpserverWrit; "httpserver_write : ERROR: socket 0x%x s"... mov edi, 2 xor esi, esi mov r8d, eax xor eax, eax call svc_logger_type_log mov ebx, 0FFFFFFFEh loc_2043D: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long httpclient_post_stream( unsigned int *a1, char *a2, long long ( *a3)(long long ( *)(), _QWORD, _QWORD, _QWORD), unsigned int a4, signed int a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rax signed int v18; // ebx int v19; // eax int v20; // eax long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 long long v25; // [rsp-4h] [rbp-30h] BYREF v25 = v14; v18 = 0; v19 = httpclient_post_start((long long)a1, a2, a5, a6, 0LL, a6, a7, a8, a9, a10, a11, a12, a13, a14); if ( v19 < 0 ) { return (unsigned int)v19; } else { HIDWORD(v25) = 8000; setsockopt(*a1, 1LL, 21LL, (char *)&v25 + 4, 4LL); while ( 1 ) { v20 = a3(socket_send, *a1, a4, (unsigned int)(a5 - v18)); if ( v20 <= 0 ) break; v18 += v20; if ( v18 >= a5 ) return (unsigned int)v18; } svc_logger_type_log( 2LL, 0, (long long)aHttpserverWrit, *a1, (unsigned int)v20, v21, a7, a8, a9, a10, v22, v23, a13, a14, v25); return (unsigned int)-2; } }
httpclient_post_stream: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14D,R8D MOV R15D,ECX MOV R13,RDX MOV R12,RDI XOR EBX,EBX MOV EDX,R8D MOV RCX,R9 XOR R8D,R8D CALL 0x0012000e TEST EAX,EAX JS 0x00120418 LEA RCX,[RBP + -0x2c] MOV dword ptr [RCX],0x1f40 MOV EDI,dword ptr [R12] MOV ESI,0x1 MOV EDX,0x15 MOV R8D,0x4 CALL 0x00106110 LAB_001203f5: MOV ESI,dword ptr [R12] MOV ECX,R14D SUB ECX,EBX LEA RDI,[0x120e37] MOV EDX,R15D CALL R13 TEST EAX,EAX JLE 0x0012041c ADD EBX,EAX CMP EBX,R14D JL 0x001203f5 JMP 0x0012043d LAB_00120418: MOV EBX,EAX JMP 0x0012043d LAB_0012041c: MOV ECX,dword ptr [R12] LEA RDX,[0x133aa7] MOV EDI,0x2 XOR ESI,ESI MOV R8D,EAX XOR EAX,EAX CALL 0x001160ad MOV EBX,0xfffffffe LAB_0012043d: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int httpclient_post_stream (int *param_1,int8 param_2,code *param_3,int4 param_4,int param_5, int8 param_6) { int iVar1; int iVar2; int1 local_34 [4]; iVar2 = 0; iVar1 = httpclient_post_start(param_1,param_2,param_5,param_6,0); if (-1 < iVar1) { setsockopt(*param_1,1,0x15,local_34,4); do { iVar1 = (*param_3)(socket_send,*param_1,param_4,param_5 - iVar2); if (iVar1 < 1) { svc_logger_type_log(2,0,s_httpserver_write___ERROR__socket_00133aa7,*param_1,iVar1); return -2; } iVar2 = iVar2 + iVar1; iVar1 = iVar2; } while (iVar2 < param_5); } return iVar1; }
39,788
mysql_stmt_execute_start
eloqsql/libmariadb/libmariadb/mariadb_async.c
int STDCALL mysql_stmt_execute_start(int *ret, MYSQL_STMT *stmt) { MK_ASYNC_START_BODY( mysql_stmt_execute, stmt->mysql, { WIN_SET_NONBLOCKING(stmt->mysql) parms.stmt= stmt; }, 1, r_int, /* If eg. mysql_change_user(), stmt->mysql will be NULL. In this case, we cannot block. */ if (!stmt->mysql) { *ret= mysql_stmt_execute(stmt); return 0; }) }
O3
c
mysql_stmt_execute_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 0x5ace7 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 # 0x5ad6f callq 0x5c670 movw $0x0, 0x14(%r15) testl %eax, %eax jle 0x5acf1 movb $0x1, 0x15(%r15) movl (%r15), %eax jmp 0x5ad64 movq %r14, %rdi callq 0x50965 jmp 0x5ad60 js 0x5acf9 movl 0x8(%r15), %eax jmp 0x5ad60 movq 0x38(%r14), %rax movl $0x7d8, 0x90(%rax) # imm = 0x7D8 movl $0x297, %edi # imm = 0x297 addq 0x38(%r14), %rdi leaq 0x2f2869(%rip), %rax # 0x34d580 movq (%rax), %rsi movl $0x5, %edx callq 0x37130 movq 0x38(%r14), %rax xorl %r15d, %r15d movb %r15b, 0x29c(%rax) movl $0x97, %edi addq 0x38(%r14), %rdi leaq 0x2f284e(%rip), %rax # 0x34d590 movq 0x40(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37130 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_execute_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_5ACE7 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_execute_start_internal call my_context_spawn mov word ptr [r15+14h], 0 test eax, eax jle short loc_5ACF1 mov byte ptr [r15+15h], 1 mov eax, [r15] jmp short loc_5AD64 loc_5ACE7: mov rdi, r14 call mysql_stmt_execute jmp short loc_5AD60 loc_5ACF1: js short loc_5ACF9 mov eax, [r15+8] jmp short loc_5AD60 loc_5ACF9: 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_5AD60: mov [rbx], eax xor eax, eax loc_5AD64: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long mysql_stmt_execute_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_execute_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_execute(a2); } *a1 = v7; return 0LL; }
mysql_stmt_execute_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 0x0015ace7 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,[0x15ad6f] CALL 0x0015c670 MOV word ptr [R15 + 0x14],0x0 TEST EAX,EAX JLE 0x0015acf1 MOV byte ptr [R15 + 0x15],0x1 MOV EAX,dword ptr [R15] JMP 0x0015ad64 LAB_0015ace7: MOV RDI,R14 CALL 0x00150965 JMP 0x0015ad60 LAB_0015acf1: JS 0x0015acf9 MOV EAX,dword ptr [R15 + 0x8] JMP 0x0015ad60 LAB_0015acf9: MOV RAX,qword ptr [R14 + 0x38] MOV dword ptr [RAX + 0x90],0x7d8 MOV EDI,0x297 ADD RDI,qword ptr [R14 + 0x38] LEA RAX,[0x44d580] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137130 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,[0x44d590] MOV RSI,qword ptr [RAX + 0x40] MOV EDX,0x1ff CALL 0x00137130 MOV RAX,qword ptr [R14 + 0x38] MOV byte ptr [RAX + 0x296],R15B MOV EAX,0x1 LAB_0015ad60: MOV dword ptr [RBX],EAX XOR EAX,EAX LAB_0015ad64: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 mysql_stmt_execute_start(int4 *param_1,long param_2) { int4 *puVar1; int iVar2; int4 uVar3; if (*(long *)(param_2 + 0x38) == 0) { uVar3 = mysql_stmt_execute(param_2); } else { puVar1 = *(int4 **)(*(long *)(*(long *)(param_2 + 0x38) + 0x480) + 0x28); *(int1 *)(puVar1 + 5) = 1; iVar2 = my_context_spawn(puVar1 + 0xe,mysql_stmt_execute_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_0044d5d0, 0x1ff); *(int1 *)(*(long *)(param_2 + 0x38) + 0x296) = 0; uVar3 = 1; } else { uVar3 = puVar1[2]; } } *param_1 = uVar3; return 0; }
39,789
common_sampler_sample(common_sampler*, llama_context*, int, bool)
monkey531[P]llama/common/sampling.cpp
llama_token common_sampler_sample(struct common_sampler * gsmpl, struct llama_context * ctx, int idx, bool grammar_first) { gsmpl->set_logits(ctx, idx); auto & grmr = gsmpl->grmr; auto & chain = gsmpl->chain; auto & cur_p = gsmpl->cur_p; // initialized by set_logits if (grammar_first) { llama_sampler_apply(grmr, &cur_p); } llama_sampler_apply(chain, &cur_p); GGML_ASSERT(cur_p.selected != -1 && "no selected token during sampling - check your sampling configuration"); const llama_token id = cur_p.data[cur_p.selected].id; if (grammar_first) { return id; } // check if it the sampled token fits the grammar { llama_token_data single_token_data = { id, 1.0f, 0.0f }; llama_token_data_array single_token_data_array = { &single_token_data, 1, -1, false }; llama_sampler_apply(grmr, &single_token_data_array); const bool is_valid = single_token_data_array.data[0].logit != -INFINITY; if (is_valid) { return id; } } // resampling: // if the token is not valid, sample again, but first apply the grammar sampler and then the sampling chain gsmpl->set_logits(ctx, idx); llama_sampler_apply(grmr, &cur_p); llama_sampler_apply(chain, &cur_p); GGML_ASSERT(cur_p.selected != -1 && "no selected token during re-sampling - check your sampling configuration"); return cur_p.data[cur_p.selected].id; }
O1
cpp
common_sampler_sample(common_sampler*, llama_context*, int, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %ecx, %r12d movl %edx, %ebp movq %rsi, %r15 movq %rdi, %rbx callq 0xcf8e6 leaq 0x198(%rbx), %r14 testl %r12d, %r12d je 0xce779 movq 0x138(%rbx), %rdi movq %r14, %rsi callq 0x1bd90 movq 0x140(%rbx), %rdi movq %r14, %rsi callq 0x1bd90 movq 0x1a8(%rbx), %rax cmpq $-0x1, %rax je 0xce858 movq (%r14), %rcx leaq (%rax,%rax,2), %rax movl (%rcx,%rax,4), %r13d testb %r12b, %r12b jne 0xce846 leaq 0xc(%rsp), %rax movl %r13d, (%rax) movss 0x19923(%rip), %xmm0 # 0xe80e0 movlps %xmm0, 0x4(%rax) leaq 0x18(%rsp), %r12 movq %rax, (%r12) movq $0x1, 0x8(%r12) movq $-0x1, 0x10(%r12) movb $0x0, 0x18(%r12) movq 0x138(%rbx), %rdi movq %r12, %rsi callq 0x1bd90 movq (%r12), %rax movss 0x2886f(%rip), %xmm0 # 0xf706c ucomiss 0x4(%rax), %xmm0 jb 0xce846 movq %rbx, %rdi movq %r15, %rsi movl %ebp, %edx callq 0xcf8e6 movq 0x138(%rbx), %rdi movq %r14, %rsi callq 0x1bd90 movq 0x140(%rbx), %rdi movq %r14, %rsi callq 0x1bd90 movq 0x1a8(%rbx), %rax cmpq $-0x1, %rax je 0xce874 movq (%r14), %rcx leaq (%rax,%rax,2), %rax movl (%rcx,%rax,4), %r13d movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x28982(%rip), %rdi # 0xf71e1 leaq 0x1f5d7(%rip), %rdx # 0xede3d leaq 0x28a3e(%rip), %rcx # 0xf72ab movl $0x133, %esi # imm = 0x133 jmp 0xce88e leaq 0x28966(%rip), %rdi # 0xf71e1 leaq 0x1f5bb(%rip), %rdx # 0xede3d leaq 0x28a82(%rip), %rcx # 0xf730b movl $0x14f, %esi # imm = 0x14F xorl %eax, %eax callq 0x1beb0
_Z21common_sampler_sampleP14common_samplerP13llama_contextib: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12d, ecx mov ebp, edx mov r15, rsi mov rbx, rdi call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int) lea r14, [rbx+198h] test r12d, r12d jz short loc_CE779 mov rdi, [rbx+138h] mov rsi, r14 call _llama_sampler_apply loc_CE779: mov rdi, [rbx+140h] mov rsi, r14 call _llama_sampler_apply mov rax, [rbx+1A8h] cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_CE858 mov rcx, [r14] lea rax, [rax+rax*2] mov r13d, [rcx+rax*4] test r12b, r12b jnz loc_CE846 lea rax, [rsp+68h+var_5C] mov [rax], r13d movss xmm0, cs:dword_E80E0 movlps qword ptr [rax+4], xmm0 lea r12, [rsp+68h+var_50] mov [r12], rax mov qword ptr [r12+8], 1 mov qword ptr [r12+10h], 0FFFFFFFFFFFFFFFFh mov byte ptr [r12+18h], 0 mov rdi, [rbx+138h] mov rsi, r12 call _llama_sampler_apply mov rax, [r12] movss xmm0, cs:dword_F706C ucomiss xmm0, dword ptr [rax+4] jb short loc_CE846 mov rdi, rbx mov rsi, r15 mov edx, ebp call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int) mov rdi, [rbx+138h] mov rsi, r14 call _llama_sampler_apply mov rdi, [rbx+140h] mov rsi, r14 call _llama_sampler_apply mov rax, [rbx+1A8h] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_CE874 mov rcx, [r14] lea rax, [rax+rax*2] mov r13d, [rcx+rax*4] loc_CE846: mov eax, r13d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CE858: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurPSelected1N; "cur_p.selected != -1 && \"no selected t"... mov esi, 133h jmp short loc_CE88E loc_CE874: lea rdi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurPSelected1N_0; "cur_p.selected != -1 && \"no selected t"... mov esi, 14Fh loc_CE88E: xor eax, eax call _ggml_abort
long long common_sampler_sample(_QWORD *a1, long long a2, unsigned int a3, int a4) { _QWORD *v6; // r14 long long v7; // rax unsigned int v8; // r13d long long v9; // rax double v11; // xmm0_8 int v12; // [rsp+Ch] [rbp-5Ch] BYREF double v13; // [rsp+10h] [rbp-58h] BYREF _QWORD v14[3]; // [rsp+18h] [rbp-50h] BYREF char v15; // [rsp+30h] [rbp-38h] ((void (*)(void))common_sampler::set_logits)(); v6 = a1 + 51; if ( a4 ) llama_sampler_apply(a1[39], a1 + 51); llama_sampler_apply(a1[40], a1 + 51); v7 = a1[53]; if ( v7 == -1 ) { v11 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 307LL, "GGML_ASSERT(%s) failed", "cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\""); } else { v8 = *(_DWORD *)(*v6 + 12 * v7); if ( (_BYTE)a4 ) return v8; v12 = *(_DWORD *)(*v6 + 12 * v7); _mm_storel_ps(&v13, (__m128)0x3F800000u); v14[0] = &v12; v14[1] = 1LL; v14[2] = -1LL; v15 = 0; llama_sampler_apply(a1[39], v14); if ( *(float *)(v14[0] + 4LL) > -INFINITY ) return v8; common_sampler::set_logits(a1, a2, a3); llama_sampler_apply(a1[39], a1 + 51); llama_sampler_apply(a1[40], a1 + 51); v9 = a1[53]; if ( v9 != -1 ) return *(unsigned int *)(*v6 + 12 * v9); v11 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 335LL, "GGML_ASSERT(%s) failed", "cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\""); } return common_sampler_sample_and_accept_n(v11); }
common_sampler_sample: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12D,ECX MOV EBP,EDX MOV R15,RSI MOV RBX,RDI CALL 0x001cf8e6 LEA R14,[RBX + 0x198] TEST R12D,R12D JZ 0x001ce779 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R14 CALL 0x0011bd90 LAB_001ce779: MOV RDI,qword ptr [RBX + 0x140] MOV RSI,R14 CALL 0x0011bd90 MOV RAX,qword ptr [RBX + 0x1a8] CMP RAX,-0x1 JZ 0x001ce858 MOV RCX,qword ptr [R14] LEA RAX,[RAX + RAX*0x2] MOV R13D,dword ptr [RCX + RAX*0x4] TEST R12B,R12B JNZ 0x001ce846 LEA RAX,[RSP + 0xc] MOV dword ptr [RAX],R13D MOVSS XMM0,dword ptr [0x001e80e0] MOVLPS qword ptr [RAX + 0x4],XMM0 LEA R12,[RSP + 0x18] MOV qword ptr [R12],RAX MOV qword ptr [R12 + 0x8],0x1 MOV qword ptr [R12 + 0x10],-0x1 MOV byte ptr [R12 + 0x18],0x0 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R12 CALL 0x0011bd90 MOV RAX,qword ptr [R12] MOVSS XMM0,dword ptr [0x001f706c] UCOMISS XMM0,dword ptr [RAX + 0x4] JC 0x001ce846 MOV RDI,RBX MOV RSI,R15 MOV EDX,EBP CALL 0x001cf8e6 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R14 CALL 0x0011bd90 MOV RDI,qword ptr [RBX + 0x140] MOV RSI,R14 CALL 0x0011bd90 MOV RAX,qword ptr [RBX + 0x1a8] CMP RAX,-0x1 JZ 0x001ce874 MOV RCX,qword ptr [R14] LEA RAX,[RAX + RAX*0x2] MOV R13D,dword ptr [RCX + RAX*0x4] LAB_001ce846: MOV EAX,R13D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001ce858: LEA RDI,[0x1f71e1] LEA RDX,[0x1ede3d] LEA RCX,[0x1f72ab] MOV ESI,0x133 JMP 0x001ce88e LAB_001ce874: LEA RDI,[0x1f71e1] LEA RDX,[0x1ede3d] LEA RCX,[0x1f730b] MOV ESI,0x14f LAB_001ce88e: XOR EAX,EAX CALL 0x0011beb0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* common_sampler_sample(common_sampler*, llama_context*, int, bool) */ int4 common_sampler_sample(common_sampler *param_1,llama_context *param_2,int param_3,bool param_4) { common_sampler *pcVar1; int7 in_register_00000009; char *pcVar2; int8 uVar3; int4 uVar4; int4 local_5c; ulong local_58; int4 *local_50; int8 local_48; int8 local_40; int1 local_38; common_sampler::set_logits(param_1,param_2,param_3); pcVar1 = param_1 + 0x198; if ((int)CONCAT71(in_register_00000009,param_4) != 0) { llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1); } llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1); if (*(long *)(param_1 + 0x1a8) != -1) { uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc); if (!param_4) { local_50 = &local_5c; local_58 = (ulong)_DAT_001e80e0; local_48 = 1; local_40 = 0xffffffffffffffff; local_38 = 0; local_5c = uVar4; llama_sampler_apply(*(int8 *)(param_1 + 0x138),&local_50); if ((float)local_50[1] <= DAT_001f706c) { common_sampler::set_logits(param_1,param_2,param_3); llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1); llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1); if (*(long *)(param_1 + 0x1a8) == -1) { pcVar2 = "cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\"" ; uVar3 = 0x14f; goto LAB_001ce88e; } uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc); } } return uVar4; } pcVar2 = "cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\"" ; uVar3 = 0x133; LAB_001ce88e: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
39,790
init_available_charsets
eloqsql/mysys/charset.c
static void init_available_charsets(void) { char fname[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; struct charset_info_st **cs; MY_CHARSET_LOADER loader; DBUG_ENTER("init_available_charsets"); bzero((char*) &all_charsets,sizeof(all_charsets)); bzero((char*) &my_collation_statistics, sizeof(my_collation_statistics)); my_hash_init2(key_memory_charsets, &charset_name_hash, 16, &my_charset_latin1, 64, 0, 0, get_charset_key, 0, 0, HASH_UNIQUE); init_compiled_charsets(MYF(0)); /* Copy compiled charsets */ for (cs= (struct charset_info_st**) all_charsets; cs < (struct charset_info_st**) all_charsets + array_elements(all_charsets)-1 ; cs++) { if (*cs) { DBUG_ASSERT(cs[0]->mbmaxlen <= MY_CS_MBMAXLEN); if (cs[0]->m_ctype) if (init_state_maps(*cs)) *cs= NULL; } } my_charset_loader_init_mysys(&loader); strmov(get_charsets_dir(fname), MY_CHARSET_INDEX); my_read_charset_file(&loader, fname, MYF(0)); DBUG_VOID_RETURN; }
O0
c
init_available_charsets: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq 0xba7e81(%rip), %rdi # 0xc85660 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x2a2c0 leaq 0xbabede(%rip), %rdi # 0xc896d0 xorl %esi, %esi movl $0x4000, %edx # imm = 0x4000 callq 0x2a2c0 leaq 0xbb0ee7(%rip), %rax # 0xc8e6ec movl (%rax), %edi leaq 0xbabe52(%rip), %rsi # 0xc89660 movl $0x10, %edx leaq 0x293bd6(%rip), %rcx # 0x3713f0 movl $0x40, %r8d xorl %eax, %eax movl %eax, %r9d leaq 0x1ab4(%rip), %rax # 0xdf2e0 movq $0x0, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movl $0x1, 0x20(%rsp) callq 0xe2120 xorl %eax, %eax movl %eax, %edi callq 0x10b390 leaq 0xba7df8(%rip), %rax # 0xc85660 movq %rax, -0x2d8(%rbp) leaq 0xba7dea(%rip), %rax # 0xc85660 addq $0x4000, %rax # imm = 0x4000 addq $-0x8, %rax cmpq %rax, -0x2d8(%rbp) jae 0xdd8e6 movq -0x2d8(%rbp), %rax cmpq $0x0, (%rax) je 0xdd8d0 jmp 0xdd898 jmp 0xdd89a movq -0x2d8(%rbp), %rax movq (%rax), %rax cmpq $0x0, 0x40(%rax) je 0xdd8ce movq -0x2d8(%rbp), %rax movq (%rax), %rdi callq 0xdee40 cmpb $0x0, %al je 0xdd8cc movq -0x2d8(%rbp), %rax movq $0x0, (%rax) jmp 0xdd8ce jmp 0xdd8d0 jmp 0xdd8d2 movq -0x2d8(%rbp), %rax addq $0x8, %rax movq %rax, -0x2d8(%rbp) jmp 0xdd86f leaq -0x2d0(%rbp), %rdi callq 0xdcde0 leaq -0x220(%rbp), %rdi callq 0xdd480 movq %rax, %rdi leaq 0x7fca9(%rip), %rsi # 0x15d5b1 callq 0x2a7a0 leaq -0x220(%rbp), %rsi leaq -0x2d0(%rbp), %rdi xorl %eax, %eax movl %eax, %edx callq 0xdf320 jmp 0xdd926 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xdd941 addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x2a270 nopw %cs:(%rax,%rax)
init_available_charsets: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax lea rdi, all_charsets xor esi, esi mov edx, 4000h call _memset lea rdi, my_collation_statistics xor esi, esi mov edx, 4000h call _memset lea rax, key_memory_charsets mov edi, [rax] lea rsi, charset_name_hash mov edx, 10h lea rcx, my_charset_latin1 mov r8d, 40h ; '@' xor eax, eax mov r9d, eax lea rax, get_charset_key mov [rsp+300h+var_300], 0 mov [rsp+300h+var_2F8], rax mov [rsp+300h+var_2F0], 0 mov [rsp+300h+var_2E8], 0 mov [rsp+300h+var_2E0], 1 call my_hash_init2 xor eax, eax mov edi, eax call init_compiled_charsets lea rax, all_charsets mov [rbp+var_2D8], rax loc_DD86F: lea rax, all_charsets add rax, 4000h add rax, 0FFFFFFFFFFFFFFF8h cmp [rbp+var_2D8], rax jnb short loc_DD8E6 mov rax, [rbp+var_2D8] cmp qword ptr [rax], 0 jz short loc_DD8D0 jmp short $+2 loc_DD898: jmp short $+2 loc_DD89A: mov rax, [rbp+var_2D8] mov rax, [rax] cmp qword ptr [rax+40h], 0 jz short loc_DD8CE mov rax, [rbp+var_2D8] mov rdi, [rax] call init_state_maps cmp al, 0 jz short loc_DD8CC mov rax, [rbp+var_2D8] mov qword ptr [rax], 0 loc_DD8CC: jmp short $+2 loc_DD8CE: jmp short $+2 loc_DD8D0: jmp short $+2 loc_DD8D2: mov rax, [rbp+var_2D8] add rax, 8 mov [rbp+var_2D8], rax jmp short loc_DD86F loc_DD8E6: lea rdi, [rbp+var_2D0] call my_charset_loader_init_mysys lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy lea rsi, [rbp+var_220] lea rdi, [rbp+var_2D0] xor eax, eax mov edx, eax call my_read_charset_file jmp short $+2 loc_DD926: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_DD941 add rsp, 300h pop rbp retn loc_DD941: call ___stack_chk_fail
unsigned long long init_available_charsets() { long long charsets_dir; // rax _QWORD *i; // [rsp+28h] [rbp-2D8h] _BYTE v3[176]; // [rsp+30h] [rbp-2D0h] BYREF _BYTE v4[536]; // [rsp+E0h] [rbp-220h] BYREF unsigned long long v5; // [rsp+2F8h] [rbp-8h] v5 = __readfsqword(0x28u); memset(all_charsets, 0LL, sizeof(all_charsets)); memset(my_collation_statistics, 0LL, sizeof(my_collation_statistics)); my_hash_init2( key_memory_charsets, (unsigned int)&charset_name_hash, 16, (unsigned int)&my_charset_latin1, 64, 0, 0LL, (long long)get_charset_key, 0LL, 0LL, 1); init_compiled_charsets(0LL); for ( i = all_charsets; i < &all_charsets[2047]; ++i ) { if ( *i && *(_QWORD *)(*i + 64LL) ) { if ( (unsigned __int8)init_state_maps(*i) ) *i = 0LL; } } my_charset_loader_init_mysys((long long)v3); charsets_dir = get_charsets_dir((long long)v4); stpcpy(charsets_dir, "Index.xml"); my_read_charset_file(v3, v4, 0LL); return __readfsqword(0x28u); }
init_available_charsets: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[0xd85660] XOR ESI,ESI MOV EDX,0x4000 CALL 0x0012a2c0 LEA RDI,[0xd896d0] XOR ESI,ESI MOV EDX,0x4000 CALL 0x0012a2c0 LEA RAX,[0xd8e6ec] MOV EDI,dword ptr [RAX] LEA RSI,[0xd89660] MOV EDX,0x10 LEA RCX,[0x4713f0] MOV R8D,0x40 XOR EAX,EAX MOV R9D,EAX LEA RAX,[0x1df2e0] MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x20],0x1 CALL 0x001e2120 XOR EAX,EAX MOV EDI,EAX CALL 0x0020b390 LEA RAX,[0xd85660] MOV qword ptr [RBP + -0x2d8],RAX LAB_001dd86f: LEA RAX,[0xd85660] ADD RAX,0x4000 ADD RAX,-0x8 CMP qword ptr [RBP + -0x2d8],RAX JNC 0x001dd8e6 MOV RAX,qword ptr [RBP + -0x2d8] CMP qword ptr [RAX],0x0 JZ 0x001dd8d0 JMP 0x001dd898 LAB_001dd898: JMP 0x001dd89a LAB_001dd89a: MOV RAX,qword ptr [RBP + -0x2d8] MOV RAX,qword ptr [RAX] CMP qword ptr [RAX + 0x40],0x0 JZ 0x001dd8ce MOV RAX,qword ptr [RBP + -0x2d8] MOV RDI,qword ptr [RAX] CALL 0x001dee40 CMP AL,0x0 JZ 0x001dd8cc MOV RAX,qword ptr [RBP + -0x2d8] MOV qword ptr [RAX],0x0 LAB_001dd8cc: JMP 0x001dd8ce LAB_001dd8ce: JMP 0x001dd8d0 LAB_001dd8d0: JMP 0x001dd8d2 LAB_001dd8d2: MOV RAX,qword ptr [RBP + -0x2d8] ADD RAX,0x8 MOV qword ptr [RBP + -0x2d8],RAX JMP 0x001dd86f LAB_001dd8e6: LEA RDI,[RBP + -0x2d0] CALL 0x001dcde0 LEA RDI,[RBP + -0x220] CALL 0x001dd480 MOV RDI,RAX LEA RSI,[0x25d5b1] CALL 0x0012a7a0 LEA RSI,[RBP + -0x220] LEA RDI,[RBP + -0x2d0] XOR EAX,EAX MOV EDX,EAX CALL 0x001df320 JMP 0x001dd926 LAB_001dd926: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001dd941 ADD RSP,0x300 POP RBP RET LAB_001dd941: CALL 0x0012a270
void init_available_charsets(void) { char cVar1; char *__dest; long in_FS_OFFSET; long *local_2e0; int1 local_2d8 [176]; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); memset(&all_charsets,0,0x4000); memset(my_collation_statistics,0,0x4000); my_hash_init2(key_memory_charsets,charset_name_hash,0x10,&my_charset_latin1,0x40,0,0, get_charset_key,0,0,1); init_compiled_charsets(0); for (local_2e0 = &all_charsets; local_2e0 < (long *)0xd89658; local_2e0 = local_2e0 + 1) { if (((*local_2e0 != 0) && (*(long *)(*local_2e0 + 0x40) != 0)) && (cVar1 = init_state_maps(*local_2e0), cVar1 != '\0')) { *local_2e0 = 0; } } my_charset_loader_init_mysys(local_2d8); __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_read_charset_file(local_2d8,local_228,0); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
39,791
my_printf_error
eloqsql/mysys/my_error.c
void my_printf_error(uint error, const char *format, myf MyFlags, ...) { va_list args; char ebuff[ERRMSGSIZE]; DBUG_ENTER("my_printf_error"); DBUG_PRINT("my", ("nr: %d MyFlags: %lu errno: %d format: %s", error, MyFlags, errno, format)); va_start(args,MyFlags); (void) my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, ebuff, sizeof(ebuff), format, args); va_end(args); (*error_handler_hook)(error, ebuff, MyFlags); DBUG_VOID_RETURN; }
O0
c
my_printf_error: pushq %rbp movq %rsp, %rbp subq $0x2f0, %rsp # imm = 0x2F0 testb %al, %al je 0x77397 movaps %xmm0, -0x2c0(%rbp) movaps %xmm1, -0x2b0(%rbp) movaps %xmm2, -0x2a0(%rbp) movaps %xmm3, -0x290(%rbp) movaps %xmm4, -0x280(%rbp) movaps %xmm5, -0x270(%rbp) movaps %xmm6, -0x260(%rbp) movaps %xmm7, -0x250(%rbp) movq %r9, -0x2c8(%rbp) movq %r8, -0x2d0(%rbp) movq %rcx, -0x2d8(%rbp) movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x214(%rbp) movq %rsi, -0x220(%rbp) movq %rdx, -0x228(%rbp) jmp 0x773cf leaq -0x240(%rbp), %rax leaq -0x2f0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x18, (%rax) leaq -0x210(%rbp), %rsi movq -0x220(%rbp), %rcx leaq -0x240(%rbp), %r8 leaq 0x36e57e(%rip), %rdi # 0x3e5990 movl $0x200, %edx # imm = 0x200 callq 0xc3c30 leaq -0x240(%rbp), %rax leaq 0x1baf26(%rip), %rax # 0x232350 movq (%rax), %rax movl -0x214(%rbp), %edi leaq -0x210(%rbp), %rsi movq -0x228(%rbp), %rdx callq *%rax jmp 0x77445 movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x77460 addq $0x2f0, %rsp # imm = 0x2F0 popq %rbp retq callq 0x362a0 nopw %cs:(%rax,%rax)
my_printf_error: push rbp mov rbp, rsp sub rsp, 2F0h test al, al jz short loc_77397 movaps [rbp+var_2C0], xmm0 movaps [rbp+var_2B0], xmm1 movaps [rbp+var_2A0], xmm2 movaps [rbp+var_290], xmm3 movaps [rbp+var_280], xmm4 movaps [rbp+var_270], xmm5 movaps [rbp+var_260], xmm6 movaps [rbp+var_250], xmm7 loc_77397: mov [rbp+var_2C8], r9 mov [rbp+var_2D0], r8 mov [rbp+var_2D8], rcx mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_214], edi mov [rbp+var_220], rsi mov [rbp+var_228], rdx jmp short $+2 loc_773CF: lea rax, [rbp+var_240] lea rcx, [rbp+var_2F0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 18h lea rsi, [rbp+var_210] mov rcx, [rbp+var_220] lea r8, [rbp+var_240] lea rdi, my_charset_utf8mb3_general_ci mov edx, 200h call my_vsnprintf_ex lea rax, [rbp+var_240] lea rax, error_handler_hook mov rax, [rax] mov edi, [rbp+var_214] lea rsi, [rbp+var_210] mov rdx, [rbp+var_228] call rax jmp short $+2 loc_77445: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_77460 add rsp, 2F0h pop rbp retn loc_77460: call ___stack_chk_fail
unsigned long long my_printf_error(int a1, long long a2, long long a3, ...) { va_list va; // [rsp+B0h] [rbp-240h] BYREF long long v5; // [rsp+C8h] [rbp-228h] long long v6; // [rsp+D0h] [rbp-220h] int v7; // [rsp+DCh] [rbp-214h] _BYTE v8[520]; // [rsp+E0h] [rbp-210h] BYREF unsigned long long v9; // [rsp+2E8h] [rbp-8h] va_start(va, a3); v9 = __readfsqword(0x28u); v7 = a1; v6 = a2; v5 = a3; my_vsnprintf_ex(&my_charset_utf8mb3_general_ci, v8, 512LL, a2, va); error_handler_hook(); return __readfsqword(0x28u); }
my_printf_error: PUSH RBP MOV RBP,RSP SUB RSP,0x2f0 TEST AL,AL JZ 0x00177397 MOVAPS xmmword ptr [RBP + -0x2c0],XMM0 MOVAPS xmmword ptr [RBP + -0x2b0],XMM1 MOVAPS xmmword ptr [RBP + -0x2a0],XMM2 MOVAPS xmmword ptr [RBP + -0x290],XMM3 MOVAPS xmmword ptr [RBP + -0x280],XMM4 MOVAPS xmmword ptr [RBP + -0x270],XMM5 MOVAPS xmmword ptr [RBP + -0x260],XMM6 MOVAPS xmmword ptr [RBP + -0x250],XMM7 LAB_00177397: MOV qword ptr [RBP + -0x2c8],R9 MOV qword ptr [RBP + -0x2d0],R8 MOV qword ptr [RBP + -0x2d8],RCX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x214],EDI MOV qword ptr [RBP + -0x220],RSI MOV qword ptr [RBP + -0x228],RDX JMP 0x001773cf LAB_001773cf: LEA RAX,[RBP + -0x240] LEA RCX,[RBP + -0x2f0] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x18 LEA RSI,[RBP + -0x210] MOV RCX,qword ptr [RBP + -0x220] LEA R8,[RBP + -0x240] LEA RDI,[0x4e5990] MOV EDX,0x200 CALL 0x001c3c30 LEA RAX,[RBP + -0x240] LEA RAX,[0x332350] MOV RAX,qword ptr [RAX] MOV EDI,dword ptr [RBP + -0x214] LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x228] CALL RAX JMP 0x00177445 LAB_00177445: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00177460 ADD RSP,0x2f0 POP RBP RET LAB_00177460: CALL 0x001362a0
void my_printf_error(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; long in_FS_OFFSET; int1 local_2f8 [24]; int8 local_2e0; int8 local_2d8; int8 local_2d0; int8 local_2c8; int8 local_2b8; int8 local_2a8; int8 local_298; int8 local_288; int8 local_278; int8 local_268; int8 local_258; int4 local_248; int4 local_244; int1 *local_240; int1 *local_238; int8 local_230; int8 local_228; int4 local_21c; int1 local_218 [520]; long local_10; if (in_AL != '\0') { local_2c8 = param_1; local_2b8 = param_2; local_2a8 = param_3; local_298 = param_4; local_288 = param_5; local_278 = param_6; local_268 = param_7; local_258 = param_8; } local_10 = *(long *)(in_FS_OFFSET + 0x28); local_238 = local_2f8; local_240 = &stack0x00000008; local_244 = 0x30; local_248 = 0x18; local_2e0 = param_12; local_2d8 = param_13; local_2d0 = param_14; local_230 = param_11; local_228 = param_10; local_21c = param_9; my_vsnprintf_ex(my_charset_utf8mb3_general_ci,local_218,0x200,param_10,&local_248); (*(code *)error_handler_hook)(local_21c,local_218,local_230); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
39,792
my_caseup_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int srcres, dstres; const char *srcend= src + srclen; char *dstend= dst + dstlen, *dst0= dst; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->caseup_multiply == 1); while ((src < srcend) && (srcres= my_mb_wc_utf8mb4(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O0
c
my_caseup_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x58(%rbp) jmp 0xc3e1a jmp 0xc3e1c movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x59(%rbp) jae 0xc3e4c movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0xc3a80 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x59(%rbp) movb -0x59(%rbp), %al testb $0x1, %al jne 0xc3e55 jmp 0xc3ea8 movq -0x58(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0xc7d30 movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x48(%rbp), %rcx callq 0xc3ab0 movl %eax, -0x38(%rbp) cmpl $0x0, %eax jg 0xc3e81 jmp 0xc3ea8 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x38(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0xc3e1c movq -0x20(%rbp), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
my_caseup_utf8mb4: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov [rbp+var_50], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_58], rax jmp short $+2 loc_C3E1A: jmp short $+2 loc_C3E1C: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_59], al jnb short loc_C3E4C mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4 mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_59], al loc_C3E4C: mov al, [rbp+var_59] test al, 1 jnz short loc_C3E55 jmp short loc_C3EA8 loc_C3E55: mov rdi, [rbp+var_58] lea rsi, [rbp+var_30] call my_toupper_utf8mb4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] mov rcx, [rbp+var_48] call my_wc_mb_utf8mb4 mov [rbp+var_38], eax cmp eax, 0 jg short loc_C3E81 jmp short loc_C3EA8 loc_C3E81: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_38] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax jmp loc_C3E1C loc_C3EA8: mov rax, [rbp+var_20] mov rcx, [rbp+var_50] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * my_caseup_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6) { bool v7; // [rsp+7h] [rbp-59h] long long v8; // [rsp+8h] [rbp-58h] unsigned long long v10; // [rsp+18h] [rbp-48h] unsigned long long v11; // [rsp+20h] [rbp-40h] int v12; // [rsp+28h] [rbp-38h] int v13; // [rsp+2Ch] [rbp-34h] unsigned long long v14[2]; // [rsp+30h] [rbp-30h] BYREF _BYTE *v15; // [rsp+40h] [rbp-20h] long long v16; // [rsp+48h] [rbp-18h] unsigned long long v17; // [rsp+50h] [rbp-10h] long long v18; // [rsp+58h] [rbp-8h] v18 = a1; v17 = a2; v16 = a3; v15 = a4; v14[1] = a5; v11 = a3 + a2; v10 = (unsigned long long)&a4[a5]; v8 = *(_QWORD *)(a1 + 120); while ( 1 ) { v7 = 0; if ( v17 < v11 ) { v13 = my_mb_wc_utf8mb4(v18, (long long)v14, v17, v11, a5, a6); v7 = v13 > 0; } if ( !v7 ) break; my_toupper_utf8mb4(v8, v14); v12 = my_wc_mb_utf8mb4(v18, v14[0], v15, v10); if ( v12 <= 0 ) break; v17 += v13; v15 += v12; } return (_BYTE *)(v15 - a4); }
my_caseup_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x58],RAX JMP 0x001c3e1a LAB_001c3e1a: JMP 0x001c3e1c LAB_001c3e1c: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x59],AL JNC 0x001c3e4c MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x001c3a80 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x59],AL LAB_001c3e4c: MOV AL,byte ptr [RBP + -0x59] TEST AL,0x1 JNZ 0x001c3e55 JMP 0x001c3ea8 LAB_001c3e55: MOV RDI,qword ptr [RBP + -0x58] LEA RSI,[RBP + -0x30] CALL 0x001c7d30 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x48] CALL 0x001c3ab0 MOV dword ptr [RBP + -0x38],EAX CMP EAX,0x0 JG 0x001c3e81 JMP 0x001c3ea8 LAB_001c3e81: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x001c3e1c LAB_001c3ea8: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_caseup_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5) { int8 uVar1; bool bVar2; int iVar3; int local_3c; int8 local_38; long local_30; long local_28; long local_20; ulong local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (local_18 < param_2 + param_3) { local_3c = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3); bVar2 = 0 < local_3c; } if (!bVar2) break; my_toupper_utf8mb4(uVar1,&local_38); iVar3 = my_wc_mb_utf8mb4(local_10,local_38,local_28,param_4 + param_5); if (iVar3 < 1) break; local_18 = local_18 + (long)local_3c; local_28 = local_28 + iVar3; } return local_28 - param_4; }
39,793
my_caseup_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int srcres, dstres; const char *srcend= src + srclen; char *dstend= dst + dstlen, *dst0= dst; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->caseup_multiply == 1); while ((src < srcend) && (srcres= my_mb_wc_utf8mb4(cs, &wc, (uchar *) src, (uchar*) srcend)) > 0) { my_toupper_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O3
c
my_caseup_utf8mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, -0x38(%rbp) movq %rcx, %r13 movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0x908f5 movq %rdx, %r15 movq %rsi, %r12 addq %rsi, %r15 movq -0x30(%rbp), %r13 addq %r13, -0x38(%rbp) movq 0x78(%rdi), %r14 leaq -0x40(%rbp), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x93986 testl %eax, %eax jle 0x908f5 movl %eax, %ebx movq -0x40(%rbp), %rsi cmpq (%r14), %rsi ja 0x908d6 movq 0x8(%r14), %rax movq %rsi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0x908d6 movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rax,%rcx,4), %esi movq %rsi, -0x40(%rbp) movq %r13, %rdx movq -0x38(%rbp), %rcx callq 0x90675 testl %eax, %eax jle 0x908f5 movl %ebx, %ecx addq %rcx, %r12 movl %eax, %eax addq %rax, %r13 cmpq %r15, %r12 jb 0x90895 subq -0x30(%rbp), %r13 movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_utf8mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], r8 mov r13, rcx mov [rbp+var_30], rcx test rdx, rdx jle short loc_908F5 mov r15, rdx mov r12, rsi add r15, rsi mov r13, [rbp+var_30] add [rbp+var_38], r13 mov r14, [rdi+78h] loc_90895: lea rdi, [rbp+var_40] mov rsi, r12 mov rdx, r15 call my_mb_wc_utf8mb4_quick_0 test eax, eax jle short loc_908F5 mov ebx, eax mov rsi, [rbp+var_40] cmp rsi, [r14] ja short loc_908D6 mov rax, [r14+8] mov rcx, rsi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_908D6 movzx ecx, sil lea rcx, [rcx+rcx*2] mov esi, [rax+rcx*4] mov [rbp+var_40], rsi loc_908D6: mov rdx, r13 mov rcx, [rbp+var_38] call my_wc_mb_utf8mb4 test eax, eax jle short loc_908F5 mov ecx, ebx add r12, rcx mov eax, eax add r13, rax cmp r12, r15 jb short loc_90895 loc_908F5: sub r13, [rbp+var_30] mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_caseup_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, unsigned long long a5) { _BYTE *v5; // r13 unsigned long long v6; // r12 unsigned long long v7; // r15 unsigned long long *v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rsi long long v12; // rax int v13; // eax unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF unsigned long long v16; // [rsp+8h] [rbp-38h] _BYTE *v17; // [rsp+10h] [rbp-30h] v16 = a5; v5 = a4; v17 = a4; if ( a3 > 0 ) { v6 = a2; v7 = a2 + a3; v5 = v17; v16 += (unsigned long long)v17; v8 = *(unsigned long long **)(a1 + 120); do { v9 = my_mb_wc_utf8mb4_quick_0(&v15, v6, v7); if ( v9 <= 0 ) break; v10 = v9; v11 = v15; if ( v15 <= *v8 ) { v12 = *(_QWORD *)(v8[1] + 8 * (v15 >> 8)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v15); v15 = v11; } } v13 = my_wc_mb_utf8mb4((long long)&v15, v11, v5, v16); if ( v13 <= 0 ) break; v6 += v10; v5 += (unsigned int)v13; } while ( v6 < v7 ); } return (_BYTE *)(v5 - v17); }
my_caseup_utf8mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],R8 MOV R13,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x001908f5 MOV R15,RDX MOV R12,RSI ADD R15,RSI MOV R13,qword ptr [RBP + -0x30] ADD qword ptr [RBP + -0x38],R13 MOV R14,qword ptr [RDI + 0x78] LAB_00190895: LEA RDI,[RBP + -0x40] MOV RSI,R12 MOV RDX,R15 CALL 0x00193986 TEST EAX,EAX JLE 0x001908f5 MOV EBX,EAX MOV RSI,qword ptr [RBP + -0x40] CMP RSI,qword ptr [R14] JA 0x001908d6 MOV RAX,qword ptr [R14 + 0x8] MOV RCX,RSI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x001908d6 MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] MOV ESI,dword ptr [RAX + RCX*0x4] MOV qword ptr [RBP + -0x40],RSI LAB_001908d6: MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x38] CALL 0x00190675 TEST EAX,EAX JLE 0x001908f5 MOV ECX,EBX ADD R12,RCX MOV EAX,EAX ADD R13,RAX CMP R12,R15 JC 0x00190895 LAB_001908f5: SUB R13,qword ptr [RBP + -0x30] MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5) { ulong *puVar1; long lVar2; uint uVar3; uint uVar4; ulong uVar5; ulong local_48; long local_40; long local_38; local_38 = param_4; if (0 < param_3) { uVar5 = param_3 + param_2; local_40 = param_5 + param_4; puVar1 = *(ulong **)(param_1 + 0x78); do { uVar3 = my_mb_wc_utf8mb4_quick(&local_48,param_2,uVar5); if ((int)uVar3 < 1) break; if ((local_48 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (local_48 >> 8) * 8), lVar2 != 0)) { local_48 = (ulong)*(uint *)(lVar2 + (local_48 & 0xff) * 0xc); } uVar4 = my_wc_mb_utf8mb4(); if ((int)uVar4 < 1) break; param_2 = param_2 + uVar3; param_4 = param_4 + (ulong)uVar4; } while (param_2 < uVar5); } return param_4 - local_38; }
39,794
my_strntoul_8bit
eloqsql/strings/ctype-simple.c
ulong my_strntoul_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register uint32 cutoff; register uint cutlim; register uint32 i; register const char *s; const char *save, *e; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for( ; s<e && my_isspace(cs, *s); s++); if (s==e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = ((uint32)~0L) / (uint32) base; cutlim = (uint) (((uint32)~0L) % (uint32) base); overflow = 0; i = 0; for ( ; s != e; ++s) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (uint32) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(uint32) 0); } return (negative ? -((long) i) : (long) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntoul_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0xb5344 movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0xb5344 incq %r10 cmpq %r11, %r10 jb 0xb5331 cmpq %r11, %r10 je 0xb5422 movb (%r10), %dil leal -0x2b(%rdi), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl %ecx xorl %r15d, %r15d cmpq %r11, %r10 je 0xb53ff movq %rdi, -0x30(%rbp) movq %r10, %rbx xorl %r13d, %r13d movl %r13d, %r14d movl %r15d, %r12d movb (%rbx), %r15b leal -0x30(%r15), %edi cmpb $0xa, %dil jb 0xb53ae leal -0x41(%r15), %edi cmpb $0x19, %dil ja 0xb539d addb $-0x37, %r15b jmp 0xb53ab leal -0x61(%r15), %edi cmpb $0x19, %dil ja 0xb53ed addb $-0x57, %r15b movl %r15d, %edi movzbl %dil, %edi cmpl %ecx, %edi jge 0xb53ed movl $0x1, %r15d cmpl %eax, %r14d jbe 0xb53c6 movl %r14d, %r13d jmp 0xb53dc jne 0xb53cf movl %eax, %r13d cmpl %edi, %edx jb 0xb53dc imull %ecx, %r14d addl %edi, %r14d movl %r14d, %r13d movl %r12d, %r15d incq %rbx cmpq %r11, %rbx jne 0xb537a movl %r13d, %r14d movq %r11, %rbx movl %r15d, %r12d testl %r12d, %r12d sete %al movl %r14d, %r15d movq %rbx, %r11 movq -0x30(%rbp), %rdi jmp 0xb5401 movb $0x1, %al cmpq %r10, %r11 je 0xb5422 testq %r8, %r8 je 0xb540e movq %r11, (%r8) testb %al, %al je 0xb5435 movq %r15, %rax negq %rax cmpb $0x2d, %dil cmovneq %r15, %rax jmp 0xb5441 movl $0x21, (%r9) testq %r8, %r8 je 0xb5431 movq %rsi, (%r8) xorl %eax, %eax jmp 0xb5441 movl $0x22, (%r9) movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strntoul_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_B5344 mov rax, [rdi+40h] mov r10, rsi loc_B5331: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_B5344 inc r10 cmp r10, r11 jb short loc_B5331 loc_B5344: cmp r10, r11 jz loc_B5422 mov dil, [r10] lea eax, [rdi-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 mov eax, 0FFFFFFFFh xor edx, edx div ecx xor r15d, r15d cmp r10, r11 jz loc_B53FF mov [rbp+var_30], rdi mov rbx, r10 xor r13d, r13d loc_B537A: mov r14d, r13d mov r12d, r15d mov r15b, [rbx] lea edi, [r15-30h] cmp dil, 0Ah jb short loc_B53AE lea edi, [r15-41h] cmp dil, 19h ja short loc_B539D add r15b, 0C9h jmp short loc_B53AB loc_B539D: lea edi, [r15-61h] cmp dil, 19h ja short loc_B53ED add r15b, 0A9h loc_B53AB: mov edi, r15d loc_B53AE: movzx edi, dil cmp edi, ecx jge short loc_B53ED mov r15d, 1 cmp r14d, eax jbe short loc_B53C6 mov r13d, r14d jmp short loc_B53DC loc_B53C6: jnz short loc_B53CF mov r13d, eax cmp edx, edi jb short loc_B53DC loc_B53CF: imul r14d, ecx add r14d, edi mov r13d, r14d mov r15d, r12d loc_B53DC: inc rbx cmp rbx, r11 jnz short loc_B537A mov r14d, r13d mov rbx, r11 mov r12d, r15d loc_B53ED: test r12d, r12d setz al mov r15d, r14d mov r11, rbx mov rdi, [rbp+var_30] jmp short loc_B5401 loc_B53FF: mov al, 1 loc_B5401: cmp r11, r10 jz short loc_B5422 test r8, r8 jz short loc_B540E mov [r8], r11 loc_B540E: test al, al jz short loc_B5435 mov rax, r15 neg rax cmp dil, 2Dh ; '-' cmovnz rax, r15 jmp short loc_B5441 loc_B5422: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_B5431 mov [r8], rsi loc_B5431: xor eax, eax jmp short loc_B5441 loc_B5435: mov dword ptr [r9], 22h ; '"' mov eax, 0FFFFFFFFh loc_B5441: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strntoul_8bit( long long a1, unsigned __int8 *a2, long long a3, unsigned int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // di unsigned __int8 *v9; // r10 unsigned int v10; // eax long long v11; // r15 unsigned __int8 *v12; // rbx unsigned int v13; // r13d unsigned int v14; // r14d int v15; // r12d unsigned __int8 v16; // r15 unsigned __int8 v17; // di unsigned __int8 v18; // r15 bool v19; // al long long result; // rax unsigned __int8 v21; // [rsp+0h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_30; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFF / a4; v11 = 0LL; if ( v9 == v6 ) { v19 = 1; } else { v21 = v8; v12 = v9; v13 = 0; while ( 1 ) { v14 = v13; v15 = v11; v16 = *v12; v17 = *v12 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } if ( v17 >= (int)a4 ) break; LODWORD(v11) = 1; if ( v13 <= v10 ) { if ( v13 != v10 || (v13 = 0xFFFFFFFF / a4, 0xFFFFFFFF % a4 >= v17) ) { v13 = v17 + a4 * v14; LODWORD(v11) = v15; } } if ( ++v12 == v6 ) { v14 = v13; v12 = &a2[a3]; v15 = v11; break; } } v19 = v15 == 0; v11 = v14; v6 = v12; v8 = v21; } if ( v6 == v9 ) { LABEL_30: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v6; if ( v19 ) { result = -v11; if ( v8 != 45 ) return v11; } else { *a6 = 34; return 0xFFFFFFFFLL; } } return result; }
my_strntoul_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x001b5344 MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_001b5331: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x001b5344 INC R10 CMP R10,R11 JC 0x001b5331 LAB_001b5344: CMP R10,R11 JZ 0x001b5422 MOV DIL,byte ptr [R10] LEA EAX,[RDI + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOV EAX,0xffffffff XOR EDX,EDX DIV ECX XOR R15D,R15D CMP R10,R11 JZ 0x001b53ff MOV qword ptr [RBP + -0x30],RDI MOV RBX,R10 XOR R13D,R13D LAB_001b537a: MOV R14D,R13D MOV R12D,R15D MOV R15B,byte ptr [RBX] LEA EDI,[R15 + -0x30] CMP DIL,0xa JC 0x001b53ae LEA EDI,[R15 + -0x41] CMP DIL,0x19 JA 0x001b539d ADD R15B,0xc9 JMP 0x001b53ab LAB_001b539d: LEA EDI,[R15 + -0x61] CMP DIL,0x19 JA 0x001b53ed ADD R15B,0xa9 LAB_001b53ab: MOV EDI,R15D LAB_001b53ae: MOVZX EDI,DIL CMP EDI,ECX JGE 0x001b53ed MOV R15D,0x1 CMP R14D,EAX JBE 0x001b53c6 MOV R13D,R14D JMP 0x001b53dc LAB_001b53c6: JNZ 0x001b53cf MOV R13D,EAX CMP EDX,EDI JC 0x001b53dc LAB_001b53cf: IMUL R14D,ECX ADD R14D,EDI MOV R13D,R14D MOV R15D,R12D LAB_001b53dc: INC RBX CMP RBX,R11 JNZ 0x001b537a MOV R14D,R13D MOV RBX,R11 MOV R12D,R15D LAB_001b53ed: TEST R12D,R12D SETZ AL MOV R15D,R14D MOV R11,RBX MOV RDI,qword ptr [RBP + -0x30] JMP 0x001b5401 LAB_001b53ff: MOV AL,0x1 LAB_001b5401: CMP R11,R10 JZ 0x001b5422 TEST R8,R8 JZ 0x001b540e MOV qword ptr [R8],R11 LAB_001b540e: TEST AL,AL JZ 0x001b5435 MOV RAX,R15 NEG RAX CMP DIL,0x2d CMOVNZ RAX,R15 JMP 0x001b5441 LAB_001b5422: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x001b5431 MOV qword ptr [R8],RSI LAB_001b5431: XOR EAX,EAX JMP 0x001b5441 LAB_001b5435: MOV dword ptr [R9],0x22 MOV EAX,0xffffffff LAB_001b5441: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strntoul_8bit(long param_1,byte *param_2,long param_3,uint param_4,ulong *param_5, int4 *param_6) { byte bVar1; byte bVar2; uint uVar3; uint uVar4; byte *pbVar5; byte *pbVar6; byte *pbVar7; int iVar8; uint uVar9; byte bVar10; ulong uVar11; ulong uVar12; bool bVar13; *param_6 = 0; pbVar7 = param_2 + param_3; pbVar6 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar6) & 8) == 0) break; pbVar6 = pbVar6 + 1; } while (pbVar6 < pbVar7); } if (pbVar6 != pbVar7) { bVar1 = *pbVar6; pbVar6 = pbVar6 + ((bVar1 - 0x2b & 0xfd) == 0); uVar11 = 0; if (pbVar6 == pbVar7) { bVar13 = true; } else { uVar9 = 0; pbVar5 = pbVar6; do { iVar8 = (int)uVar11; bVar2 = *pbVar5; bVar10 = bVar2 - 0x30; if (9 < bVar10) { if ((byte)(bVar2 + 0xbf) < 0x1a) { bVar10 = bVar2 - 0x37; } else { if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_001b53ed; bVar10 = bVar2 + 0xa9; } } if ((int)param_4 <= (int)(uint)bVar10) goto LAB_001b53ed; uVar12 = 1; uVar4 = (uint)(0xffffffff / (ulong)param_4); uVar3 = uVar9; if ((uVar9 <= uVar4) && ((uVar9 != uVar4 || (uVar3 = uVar4, (uint)bVar10 <= (uint)(0xffffffff % (ulong)param_4))) )) { uVar12 = uVar11; uVar3 = uVar9 * param_4 + (uint)bVar10; } uVar9 = uVar3; pbVar5 = pbVar5 + 1; uVar11 = uVar12; } while (pbVar5 != pbVar7); iVar8 = (int)uVar12; pbVar5 = pbVar7; LAB_001b53ed: bVar13 = iVar8 == 0; uVar11 = (ulong)uVar9; pbVar7 = pbVar5; } if (pbVar7 != pbVar6) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar7; } if (bVar13) { if (bVar1 == 0x2d) { return -uVar11; } return uVar11; } *param_6 = 0x22; return 0xffffffff; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
39,795
YAML::detail::node* YAML::detail::node_data::get<char [9]>(char const (&) [9], std::shared_ptr<YAML::detail::memory_holder>) const
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/impl.h
inline node* node_data::get(const Key& key, shared_memory_holder pMemory) const { switch (m_type) { case NodeType::Map: break; case NodeType::Undefined: case NodeType::Null: return nullptr; case NodeType::Sequence: if (node* pNode = get_idx<Key>::get(m_sequence, key, pMemory)) return pNode; return nullptr; case NodeType::Scalar: throw BadSubscript(m_mark, key); } auto it = std::find_if(m_map.begin(), m_map.end(), [&](const kv_pair m) { return m.first->equals(key, pMemory); }); return it != m_map.end() ? it->second : nullptr; }
O0
c
YAML::detail::node* YAML::detail::node_data::get<char [9]>(char const (&) [9], std::shared_ptr<YAML::detail::memory_holder>) const: subq $0xc8, %rsp movq %rdx, 0x38(%rsp) movq %rdi, 0xb8(%rsp) movq %rsi, 0xb0(%rsp) movq %rdx, 0xa8(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x40(%rsp) movl 0x10(%rax), %eax movq %rax, 0x48(%rsp) subq $0x4, %rax ja 0x13c844 movq 0x48(%rsp), %rax leaq 0x75d1d(%rip), %rcx # 0x1b241c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0x13c844 movq $0x0, 0xc0(%rsp) jmp 0x13c900 movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rax addq $0x60, %rax movq %rax, 0x18(%rsp) movq 0xb0(%rsp), %rax movq %rax, 0x20(%rsp) leaq 0x90(%rsp), %rdi movq %rdi, 0x28(%rsp) callq 0x9d120 movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx callq 0x13c920 movq %rax, 0x30(%rsp) jmp 0x13c76b leaq 0x90(%rsp), %rdi callq 0x9d260 movq 0x30(%rsp), %rax movq %rax, 0xa0(%rsp) cmpq $0x0, 0xa0(%rsp) je 0x13c7cb movq 0xa0(%rsp), %rax movq %rax, 0xc0(%rsp) jmp 0x13c900 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x90(%rsp), %rdi callq 0x9d260 jmp 0x13c910 movq $0x0, 0xc0(%rsp) jmp 0x13c900 movl $0x40, %edi callq 0x89b90 movq 0x40(%rsp), %rsi movq %rax, %rdi movq %rdi, %rax movq %rax, 0x10(%rsp) addq $0x4, %rsi movq 0xb0(%rsp), %rdx callq 0x13c940 jmp 0x13c809 movq 0x10(%rsp), %rdi leaq 0xd7193(%rip), %rsi # 0x2139a8 leaq 0x613d4(%rip), %rdx # 0x19dbf0 callq 0x92530 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) callq 0x8b4e0 jmp 0x13c910 movq 0x40(%rsp), %rdi addq $0x80, %rdi callq 0xccba0 movq 0x40(%rsp), %rdi movq %rax, 0x70(%rsp) addq $0x80, %rdi callq 0xccbd0 movq %rax, %rcx movq 0x38(%rsp), %rax movq %rcx, 0x68(%rsp) movq 0xb0(%rsp), %rcx movq %rcx, 0x58(%rsp) movq %rax, 0x60(%rsp) movq 0x70(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x60(%rsp), %rcx callq 0x13c9e0 movq 0x40(%rsp), %rdi movq %rax, 0x78(%rsp) addq $0x80, %rdi callq 0xccbd0 movq %rax, 0x50(%rsp) leaq 0x78(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0xccc00 xorb $-0x1, %al testb $0x1, %al jne 0x13c8d5 jmp 0x13c8ea leaq 0x78(%rsp), %rdi callq 0xccc40 movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) jmp 0x13c8f3 xorl %eax, %eax movq %rax, 0x8(%rsp) jmp 0x13c8f3 movq 0x8(%rsp), %rax movq %rax, 0xc0(%rsp) movq 0xc0(%rsp), %rax addq $0xc8, %rsp retq movq 0x88(%rsp), %rdi callq 0x92a70 nopl (%rax)
_ZNK4YAML6detail9node_data3getIA19_cEEPNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE: sub rsp, 0C8h mov [rsp+0C8h+var_90], rdx mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_18], rsi mov [rsp+0C8h+var_20], rdx mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_88], rax mov eax, [rax+10h] mov [rsp+0C8h+var_80], rax sub rax, 4; switch 5 cases ja def_13C706; jumptable 000000000013C706 default case mov rax, [rsp+0C8h+var_80] lea rcx, jpt_13C706 movsxd rax, ds:(jpt_13C706 - 1B241Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_13C708: jmp def_13C706; jumptable 000000000013C706 case 4 loc_13C70D: mov [rsp+0C8h+var_8], 0; jumptable 000000000013C706 cases 0,1 jmp loc_13C900 loc_13C71E: mov rsi, [rsp+0C8h+var_90]; jumptable 000000000013C706 case 3 mov rax, [rsp+0C8h+var_88] add rax, 60h ; '`' mov [rsp+0C8h+var_B0], rax mov rax, [rsp+0C8h+var_18] mov [rsp+0C8h+var_A8], rax lea rdi, [rsp+0C8h+var_38] mov [rsp+0C8h+var_A0], rdi call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEEC2ERKS3_; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr(std::shared_ptr<YAML::detail::memory_holder> const&) mov rdi, [rsp+0C8h+var_B0] mov rsi, [rsp+0C8h+var_A8] mov rdx, [rsp+0C8h+var_A0] call _ZN4YAML6detail7get_idxIA19_cvE3getERKSt6vectorIPNS0_4nodeESaIS6_EERA19_KcSt10shared_ptrINS0_13memory_holderEE; YAML::detail::get_idx<char [19],void>::get(std::vector<YAML::detail::node *> const&,char const(&)[19],std::shared_ptr<YAML::detail::memory_holder>) mov [rsp+0C8h+var_98], rax jmp short $+2 loc_13C76B: lea rdi, [rsp+0C8h+var_38] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() mov rax, [rsp+0C8h+var_98] mov [rsp+0C8h+var_28], rax cmp [rsp+0C8h+var_28], 0 jz short loc_13C7CB mov rax, [rsp+0C8h+var_28] mov [rsp+0C8h+var_8], rax jmp loc_13C900 mov rcx, rax mov eax, edx mov [rsp+0C8h+var_40], rcx mov [rsp+0C8h+var_44], eax lea rdi, [rsp+0C8h+var_38] call _ZNSt10shared_ptrIN4YAML6detail13memory_holderEED2Ev; std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr() jmp loc_13C910 loc_13C7CB: mov [rsp+0C8h+var_8], 0 jmp loc_13C900 loc_13C7DC: mov edi, 40h ; '@'; jumptable 000000000013C706 case 2 call ___cxa_allocate_exception mov rsi, [rsp+0C8h+var_88] mov rdi, rax mov rax, rdi mov [rsp+0C8h+var_B8], rax add rsi, 4 mov rdx, [rsp+0C8h+var_18] call _ZN4YAML12BadSubscriptC2IA19_cEERKNS_4MarkERKT_; YAML::BadSubscript::BadSubscript<char [19]>(YAML::Mark const&,char [19] const&) jmp short $+2 loc_13C809: mov rdi, [rsp+0C8h+var_B8]; void * lea rsi, _ZTIN4YAML12BadSubscriptE; lptinfo lea rdx, _ZN4YAML12BadSubscriptD2Ev; void (*)(void *) call ___cxa_throw mov rdi, [rsp+0C8h+var_B8]; void * mov rcx, rax mov eax, edx mov [rsp+0C8h+var_40], rcx mov [rsp+0C8h+var_44], eax call ___cxa_free_exception jmp loc_13C910 def_13C706: mov rdi, [rsp+0C8h+var_88]; jumptable 000000000013C706 default case add rdi, 80h call _ZNKSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE5beginEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin(void) mov rdi, [rsp+0C8h+var_88] mov [rsp+0C8h+var_58], rax add rdi, 80h call _ZNKSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE3endEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(void) mov rcx, rax mov rax, [rsp+0C8h+var_90] mov [rsp+0C8h+var_60], rcx mov rcx, [rsp+0C8h+var_18] mov [rsp+0C8h+var_70], rcx mov [rsp+0C8h+var_68], rax mov rdi, [rsp+0C8h+var_58] mov rsi, [rsp+0C8h+var_60] mov rdx, [rsp+0C8h+var_70] mov rcx, [rsp+0C8h+var_68] call _ZSt7find_ifIN9__gnu_cxx17__normal_iteratorIPKSt4pairIPN4YAML6detail4nodeES6_ESt6vectorIS7_SaIS7_EEEEZNKS4_9node_data3getIA19_cEES6_RKT_St10shared_ptrINS4_13memory_holderEEEUlS7_E_ESH_SH_SH_T0_; std::find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,YAML::detail::node_data::get<char [19]>(char [19] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>(char [19],char [19],YAML::detail::node_data::get<char [19]>(char [19] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}) mov rdi, [rsp+0C8h+var_88] mov [rsp+0C8h+var_50], rax add rdi, 80h call _ZNKSt6vectorISt4pairIPN4YAML6detail4nodeES4_ESaIS5_EE3endEv; std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(void) mov [rsp+0C8h+var_78], rax lea rdi, [rsp+0C8h+var_50] lea rsi, [rsp+0C8h+var_78] call _ZN9__gnu_cxxeqIPKSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESH_QrqXeqcldtfp_4baseEcldtfp0_4baseERSt14convertible_toIbEE xor al, 0FFh test al, 1 jnz short loc_13C8D5 jmp short loc_13C8EA loc_13C8D5: lea rdi, [rsp+0C8h+var_50] call _ZNK9__gnu_cxx17__normal_iteratorIPKSt4pairIPN4YAML6detail4nodeES5_ESt6vectorIS6_SaIS6_EEEptEv; __gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->(void) mov rax, [rax+8] mov [rsp+0C8h+var_C0], rax jmp short loc_13C8F3 loc_13C8EA: xor eax, eax mov [rsp+0C8h+var_C0], rax jmp short $+2 loc_13C8F3: mov rax, [rsp+0C8h+var_C0] mov [rsp+0C8h+var_8], rax loc_13C900: mov rax, [rsp+0C8h+var_8] add rsp, 0C8h retn loc_13C910: mov rdi, [rsp+0C8h+var_40] call __Unwind_Resume
long long YAML::detail::node_data::get<char [19]>(long long a1, long long a2, long long a3) { int v3; // ecx int v4; // r8d int v5; // r9d long long v7; // [rsp+8h] [rbp-C0h] void *exception; // [rsp+10h] [rbp-B8h] long long v9; // [rsp+20h] [rbp-A8h] long long v10; // [rsp+30h] [rbp-98h] _QWORD v12[3]; // [rsp+50h] [rbp-78h] BYREF long long v13; // [rsp+68h] [rbp-60h] long long v14; // [rsp+70h] [rbp-58h] long long v15; // [rsp+78h] [rbp-50h] BYREF _BYTE v16[16]; // [rsp+90h] [rbp-38h] BYREF long long v17; // [rsp+A0h] [rbp-28h] long long v18; // [rsp+A8h] [rbp-20h] long long v19; // [rsp+B0h] [rbp-18h] long long v20; // [rsp+B8h] [rbp-10h] long long v21; // [rsp+C0h] [rbp-8h] v20 = a1; v19 = a2; v18 = a3; switch ( *(_DWORD *)(a1 + 16) ) { case 0: case 1: v21 = 0LL; break; case 2: exception = __cxa_allocate_exception(0x40uLL); YAML::BadSubscript::BadSubscript<char [19]>((_DWORD)exception, a1 + 4, v19, v3, v4, v5); __cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::BadSubscript, YAML::BadSubscript::~BadSubscript); case 3: v9 = v19; std::shared_ptr<YAML::detail::memory_holder>::shared_ptr((long long)v16, a3); v10 = YAML::detail::get_idx<char [19],void>::get(a1 + 96, v9, v16); std::shared_ptr<YAML::detail::memory_holder>::~shared_ptr((long long)v16); v17 = v10; if ( v10 ) v21 = v17; else v21 = 0LL; break; default: v14 = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::begin(a1 + 128); v13 = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(a1 + 128); v12[1] = v19; v12[2] = a3; v15 = std::find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,YAML::detail::node * YAML::detail::node_data::get<char [19]>(char [19] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>( v14, v13, v19, a3); v12[0] = std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>::end(a1 + 128); if ( __gnu_cxx::operator==<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>( (long long)&v15, (long long)v12) ) { v7 = 0LL; } else { v7 = *(_QWORD *)(__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>::operator->((long long)&v15) + 8); } v21 = v7; break; } return v21; }
39,796
YAML::detail::node* YAML::detail::node_data::get<char [9]>(char const (&) [9], std::shared_ptr<YAML::detail::memory_holder>) const
aimrt_mujoco_sim/_deps/yaml-cpp-src/include/yaml-cpp/node/detail/impl.h
inline node* node_data::get(const Key& key, shared_memory_holder pMemory) const { switch (m_type) { case NodeType::Map: break; case NodeType::Undefined: case NodeType::Null: return nullptr; case NodeType::Sequence: if (node* pNode = get_idx<Key>::get(m_sequence, key, pMemory)) return pNode; return nullptr; case NodeType::Scalar: throw BadSubscript(m_mark, key); } auto it = std::find_if(m_map.begin(), m_map.end(), [&](const kv_pair m) { return m.first->equals(key, pMemory); }); return it != m_map.end() ? it->second : nullptr; }
O3
c
YAML::detail::node* YAML::detail::node_data::get<char [9]>(char const (&) [9], std::shared_ptr<YAML::detail::memory_holder>) const: pushq %r15 pushq %r14 pushq %rbx movl 0x10(%rdi), %eax cmpl $0x2, %eax jb 0x6bce4 movq %rdx, %rcx cmpl $0x3, %eax je 0x6bcc1 movq %rsi, %r14 movq %rdi, %rbx cmpl $0x2, %eax je 0x6bcec movq 0x80(%rbx), %rdi movq 0x88(%rbx), %rsi movq %r14, %rdx callq 0x6bdc6 cmpq 0x88(%rbx), %rax je 0x6bce4 movq 0x8(%rax), %rax jmp 0x6bce6 movq 0x8(%rcx), %rdi testq %rdi, %rdi je 0x6bce4 movq 0x4422f(%rip), %rax # 0xaff00 cmpb $0x0, (%rax) je 0x6bcdb incl 0x8(%rdi) jmp 0x6bcdf lock incl 0x8(%rdi) callq 0x1ed80 xorl %eax, %eax popq %rbx popq %r14 popq %r15 retq movl $0x40, %edi callq 0x1e7e0 movq %rax, %r15 addq $0x4, %rbx movq %rax, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x6bd34 leaq 0x43cc6(%rip), %rsi # 0xaf9d8 leaq 0x14a6b(%rip), %rdx # 0x80784 movq %r15, %rdi callq 0x1fec0 movq %rax, %rbx movq %r15, %rdi callq 0x1ebc0 movq %rbx, %rdi callq 0x1ffd0
_ZNK4YAML6detail9node_data3getIA6_cEEPNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE: push r15 push r14 push rbx mov eax, [rdi+10h] cmp eax, 2 jb short loc_6BCE4 mov rcx, rdx cmp eax, 3 jz short loc_6BCC1 mov r14, rsi mov rbx, rdi cmp eax, 2 jz short loc_6BCEC mov rdi, [rbx+80h] mov rsi, [rbx+88h] mov rdx, r14 call _ZSt9__find_ifIN9__gnu_cxx17__normal_iteratorIPKSt4pairIPN4YAML6detail4nodeES6_ESt6vectorIS7_SaIS7_EEEENS0_5__ops10_Iter_predIZNKS4_9node_data3getIA6_cEES6_RKT_St10shared_ptrINS4_13memory_holderEEEUlS7_E_EEESJ_SJ_SJ_T0_St26random_access_iterator_tag; std::__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char [6]>(char [6] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>>(char [6],char [6],__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char [6]>(char [6] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>,std::random_access_iterator_tag) cmp rax, [rbx+88h] jz short loc_6BCE4 mov rax, [rax+8] jmp short loc_6BCE6 loc_6BCC1: mov rdi, [rcx+8] test rdi, rdi jz short loc_6BCE4 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_6BCDB inc dword ptr [rdi+8] jmp short loc_6BCDF loc_6BCDB: lock inc dword ptr [rdi+8] loc_6BCDF: call __ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6BCE4: xor eax, eax loc_6BCE6: pop rbx pop r14 pop r15 retn loc_6BCEC: mov edi, 40h ; '@'; thrown_size call ___cxa_allocate_exception mov r15, rax add rbx, 4 mov rdi, rax mov rsi, rbx mov rdx, r14 call _ZN4YAML12BadSubscriptC2IA6_cEERKNS_4MarkERKT_; YAML::BadSubscript::BadSubscript<char [6]>(YAML::Mark const&,char [6] const&) lea rsi, _ZTIN4YAML12BadSubscriptE; lptinfo lea rdx, _ZN4YAML9ExceptionD2Ev; void (*)(void *) mov rdi, r15; void * call ___cxa_throw mov rbx, rax mov rdi, r15; void * call ___cxa_free_exception mov rdi, rbx call __Unwind_Resume
long long YAML::detail::node_data::get<char [6]>(long long a1, long long a2, long long a3) { unsigned int v3; // eax long long v4; // rax long long v6; // rdi void *exception; // r15 int v8; // ecx int v9; // r8d int v10; // r9d v3 = *(_DWORD *)(a1 + 16); if ( v3 >= 2 ) { if ( v3 == 3 ) { v6 = *(_QWORD *)(a3 + 8); if ( v6 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v6 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v6 + 8)); std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); } } else { if ( v3 == 2 ) { exception = __cxa_allocate_exception(0x40uLL); YAML::BadSubscript::BadSubscript<char [6]>((_DWORD)exception, a1 + 4, a2, v8, v9, v10); __cxa_throw(exception, (struct type_info *)&`typeinfo for'YAML::BadSubscript, YAML::Exception::~Exception); } v4 = std::__find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node *,YAML::detail::node *> const*,std::vector<std::pair<YAML::detail::node *,YAML::detail::node *>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node * YAML::detail::node_data::get<char [6]>(char [6] const&,std::shared_ptr<YAML::detail::memory_holder>)::{lambda(std::pair<YAML::detail::node *,YAML::detail::node *>)#1}>>( *(_QWORD *)(a1 + 128), *(_QWORD *)(a1 + 136), a2, a3); if ( v4 != *(_QWORD *)(a1 + 136) ) return *(_QWORD *)(v4 + 8); } } return 0LL; }
get<char[6]>: PUSH R15 PUSH R14 PUSH RBX MOV EAX,dword ptr [RDI + 0x10] CMP EAX,0x2 JC 0x0016bce4 MOV RCX,RDX CMP EAX,0x3 JZ 0x0016bcc1 MOV R14,RSI MOV RBX,RDI CMP EAX,0x2 JZ 0x0016bcec MOV RDI,qword ptr [RBX + 0x80] MOV RSI,qword ptr [RBX + 0x88] MOV RDX,R14 CALL 0x0016bdc6 CMP RAX,qword ptr [RBX + 0x88] JZ 0x0016bce4 MOV RAX,qword ptr [RAX + 0x8] JMP 0x0016bce6 LAB_0016bcc1: MOV RDI,qword ptr [RCX + 0x8] TEST RDI,RDI JZ 0x0016bce4 MOV RAX,qword ptr [0x001aff00] CMP byte ptr [RAX],0x0 JZ 0x0016bcdb INC dword ptr [RDI + 0x8] JMP 0x0016bcdf LAB_0016bcdb: INC.LOCK dword ptr [RDI + 0x8] LAB_0016bcdf: CALL 0x0011ed80 LAB_0016bce4: XOR EAX,EAX LAB_0016bce6: POP RBX POP R14 POP R15 RET LAB_0016bcec: MOV EDI,0x40 CALL 0x0011e7e0 MOV R15,RAX ADD RBX,0x4 LAB_0016bcfd: MOV RDI,RAX MOV RSI,RBX MOV RDX,R14 CALL 0x0016bd34 LAB_0016bd0b: LEA RSI,[0x1af9d8] LEA RDX,[0x180784] MOV RDI,R15 CALL 0x0011fec0
/* YAML::detail::node* YAML::detail::node_data::get<char [6]>(char const (&) [6], std::shared_ptr<YAML::detail::memory_holder>) const */ node * __thiscall YAML::detail::node_data::get<char[6]>(node_data *this,char *param_1,long param_3) { uint uVar1; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *this_00; long lVar2; BadSubscript *this_01; uVar1 = *(uint *)(this + 0x10); if (1 < uVar1) { if (uVar1 == 3) { this_00 = *(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(param_3 + 8); if (this_00 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_001aff00 == '\0') { LOCK(); *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; UNLOCK(); } else { *(int *)(this_00 + 8) = *(int *)(this_00 + 8) + 1; } std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(this_00); } } else { if (uVar1 == 2) { this_01 = (BadSubscript *)__cxa_allocate_exception(0x40); /* try { // try from 0016bcfd to 0016bd0a has its CatchHandler @ 0016bd21 */ BadSubscript::BadSubscript<char[6]>(this_01,(Mark *)(this + 4),param_1); /* WARNING: Subroutine does not return */ __cxa_throw(this_01,&BadSubscript::typeinfo,BadInsert::~BadInsert); } lVar2 = std:: __find_if<__gnu_cxx::__normal_iterator<std::pair<YAML::detail::node*,YAML::detail::node*>const*,std::vector<std::pair<YAML::detail::node*,YAML::detail::node*>,std::allocator<std::pair<YAML::detail::node*,YAML::detail::node*>>>>,__gnu_cxx::__ops::_Iter_pred<YAML::detail::node_data::get<char[6]>(char_const(&)[6],std::shared_ptr<YAML::detail::memory_holder>)const::_lambda(std::pair<YAML::detail::node*,YAML::detail::node*>)_1_>> (*(int8 *)(this + 0x80),*(int8 *)(this + 0x88),param_1); if (lVar2 != *(long *)(this + 0x88)) { return *(node **)(lVar2 + 8); } } } return (node *)0x0; }
39,797
ndr(LefDefParser::defrCallbackType_e, LefDefParser::defiNonDefault*, void*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/defrw/defrw.cpp
int ndr(defrCallbackType_e c, defiNonDefault* nd, defiUserData ud) { // For nondefaultrule int i; checkType(c); if (ud != userData) dataError(); if (c != defrNonDefaultCbkType) fprintf(fout, "BOGUS NONDEFAULTRULE TYPE "); fprintf(fout, "- %s\n", nd->name()); if (nd->hasHardspacing()) fprintf(fout, " + HARDSPACING\n"); for (i = 0; i < nd->numLayers(); i++) { fprintf(fout, " + LAYER %s", nd->layerName(i)); fprintf(fout, " WIDTH %d", nd->layerWidthVal(i)); if (nd->hasLayerDiagWidth(i)) fprintf(fout, " DIAGWIDTH %d", nd->layerDiagWidthVal(i)); if (nd->hasLayerSpacing(i)) fprintf(fout, " SPACING %d", nd->layerSpacingVal(i)); if (nd->hasLayerWireExt(i)) fprintf(fout, " WIREEXT %d", nd->layerWireExtVal(i)); fprintf(fout, "\n"); } for (i = 0; i < nd->numVias(); i++) fprintf(fout, " + VIA %s\n", nd->viaName(i)); for (i = 0; i < nd->numViaRules(); i++) fprintf(fout, " + VIARULE %s\n", ignoreViaNames ? "XXX" : nd->viaRuleName(i)); for (i = 0; i < nd->numMinCuts(); i++) fprintf(fout, " + MINCUTS %s %d\n", nd->cutLayerName(i), nd->numCuts(i)); for (i = 0; i < nd->numProps(); i++) { fprintf(fout, " + PROPERTY %s %s ", nd->propName(i), nd->propValue(i)); switch (nd->propType(i)) { case 'R': fprintf(fout, "REAL\n"); break; case 'I': fprintf(fout, "INTEGER\n"); break; case 'S': fprintf(fout, "STRING\n"); break; case 'Q': fprintf(fout, "QUOTESTRING\n"); break; case 'N': fprintf(fout, "NUMBER\n"); break; } } --numObjs; if (numObjs <= 0) fprintf(fout, "END NONDEFAULTRULES\n"); return 0; }
O3
cpp
ndr(LefDefParser::defrCallbackType_e, LefDefParser::defiNonDefault*, void*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movq %rsi, %rbx movl %edi, %ebp cmpl $0x68, %edi jb 0xc052 movq 0x5a214(%rip), %rcx # 0x66250 leaq 0x34532(%rip), %rdi # 0x40575 movl $0x27, %esi movl $0x1, %edx callq 0x7350 cmpq %r14, 0x5a1ff(%rip) # 0x66258 je 0xc078 movq 0x5a1ee(%rip), %rcx # 0x66250 leaq 0x344e1(%rip), %rdi # 0x4054a movl $0x2a, %esi movl $0x1, %edx callq 0x7350 cmpl $0x60, %ebp je 0xc09a movq 0x5a1cc(%rip), %rcx # 0x66250 leaq 0x349c7(%rip), %rdi # 0x40a52 movl $0x1b, %esi movl $0x1, %edx callq 0x7350 movq 0x5a1af(%rip), %r14 # 0x66250 movq %rbx, %rdi callq 0x2ba7c leaq 0x349be(%rip), %rsi # 0x40a6e movq %r14, %rdi movq %rax, %rdx xorl %eax, %eax callq 0x7290 movq %rbx, %rdi callq 0x2ba80 testl %eax, %eax je 0xc0e6 movq 0x5a180(%rip), %rcx # 0x66250 leaq 0x3499d(%rip), %rdi # 0x40a74 movl $0x11, %esi movl $0x1, %edx callq 0x7350 movq %rbx, %rdi callq 0x2ba86 testl %eax, %eax jle 0xc20e leaq 0x34989(%rip), %r14 # 0x40a86 leaq 0x34990(%rip), %r15 # 0x40a94 leaq 0x34993(%rip), %rbp # 0x40a9e xorl %r12d, %r12d movq 0x5a13b(%rip), %r13 # 0x66250 movq %rbx, %rdi movl %r12d, %esi callq 0x2ba8a movq %r13, %rdi movq %r14, %rsi movq %rax, %rdx xorl %eax, %eax callq 0x7290 movq 0x5a119(%rip), %r13 # 0x66250 movq %rbx, %rdi movl %r12d, %esi callq 0x2bb5e movq %r13, %rdi movq %r15, %rsi movl %eax, %edx xorl %eax, %eax callq 0x7290 movq %rbx, %rdi movl %r12d, %esi callq 0x2bbc8 testl %eax, %eax je 0xc181 movq 0x5a0e9(%rip), %r13 # 0x66250 movq %rbx, %rdi movl %r12d, %esi callq 0x2bc9a movq %r13, %rdi movq %rbp, %rsi movl %eax, %edx xorl %eax, %eax callq 0x7290 movq %rbx, %rdi movl %r12d, %esi callq 0x2bd6e testl %eax, %eax je 0xc1b5 movq 0x5a0b9(%rip), %r13 # 0x66250 movq %rbx, %rdi movl %r12d, %esi callq 0x2bf12 movq %r13, %rdi leaq 0x34900(%rip), %rsi # 0x40aac movl %eax, %edx xorl %eax, %eax callq 0x7290 movq %rbx, %rdi movl %r12d, %esi callq 0x2bd04 testl %eax, %eax je 0xc1e9 movq 0x5a085(%rip), %r13 # 0x66250 movq %rbx, %rdi movl %r12d, %esi callq 0x2be40 movq %r13, %rdi leaq 0x348d8(%rip), %rsi # 0x40ab8 movl %eax, %edx xorl %eax, %eax callq 0x7290 movq 0x5a060(%rip), %rsi # 0x66250 movl $0xa, %edi callq 0x7240 incl %r12d movq %rbx, %rdi callq 0x2ba86 cmpl %eax, %r12d jl 0xc10e movq %rbx, %rdi callq 0x2bf7c testl %eax, %eax jle 0xc252 leaq 0x348a3(%rip), %r14 # 0x40ac4 xorl %ebp, %ebp movq 0x5a026(%rip), %r15 # 0x66250 movq %rbx, %rdi movl %ebp, %esi callq 0x2bf80 movq %r15, %rdi movq %r14, %rsi movq %rax, %rdx xorl %eax, %eax callq 0x7290 incl %ebp movq %rbx, %rdi callq 0x2bf7c cmpl %eax, %ebp jl 0xc223 movq %rbx, %rdi callq 0x2bfe8 testl %eax, %eax jle 0xc2a9 leaq 0x34503(%rip), %r12 # 0x40768 leaq 0x34865(%rip), %r14 # 0x40ad1 xorl %ebp, %ebp movq 0x59fdb(%rip), %r15 # 0x66250 cmpb $0x0, 0x5a004(%rip) # 0x66280 movq %r12, %rdx jne 0xc28e movq %rbx, %rdi movl %ebp, %esi callq 0x2bfec movq %rax, %rdx movq %r15, %rdi movq %r14, %rsi xorl %eax, %eax callq 0x7290 incl %ebp movq %rbx, %rdi callq 0x2bfe8 cmpl %eax, %ebp jl 0xc26e movq %rbx, %rdi callq 0x2c054 testl %eax, %eax jle 0xc2fc leaq 0x34826(%rip), %r14 # 0x40ae2 xorl %ebp, %ebp movq 0x59f8b(%rip), %r15 # 0x66250 movq %rbx, %rdi movl %ebp, %esi callq 0x2c058 movq %rax, %r12 movq %rbx, %rdi movl %ebp, %esi callq 0x2c0c2 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movl %eax, %ecx xorl %eax, %eax callq 0x7290 incl %ebp movq %rbx, %rdi callq 0x2c054 cmpl %eax, %ebp jl 0xc2be movq %rbx, %rdi callq 0x2c2fa testl %eax, %eax jle 0xc40c leaq 0x347e3(%rip), %r14 # 0x40af6 leaq 0x33f66(%rip), %r15 # 0x40280 xorl %r12d, %r12d movq 0x59f2c(%rip), %r13 # 0x66250 movq %rbx, %rdi movl %r12d, %esi callq 0x2c6d0 movq %rax, %rbp movq %rbx, %rdi movl %r12d, %esi callq 0x2c742 movq %r13, %rdi movq %r14, %rsi movq %rbp, %rdx movq %rax, %rcx xorl %eax, %eax callq 0x7290 movq %rbx, %rdi movl %r12d, %esi callq 0x2c822 movzbl %al, %eax addl $-0x49, %eax cmpl $0xa, %eax ja 0xc3f8 movslq (%r15,%rax,4), %rax addq %r15, %rax jmpq *%rax movq 0x59ed6(%rip), %rcx # 0x66250 movl $0x8, %esi movl $0x1, %edx leaq 0x34786(%rip), %rdi # 0x40b11 jmp 0xc3f3 movq 0x59ebc(%rip), %rcx # 0x66250 movl $0xc, %esi movl $0x1, %edx leaq 0x34775(%rip), %rdi # 0x40b1a jmp 0xc3f3 movq 0x59ea2(%rip), %rcx # 0x66250 movl $0x7, %esi movl $0x1, %edx leaq 0x34768(%rip), %rdi # 0x40b27 jmp 0xc3f3 movq 0x59e88(%rip), %rcx # 0x66250 movl $0x5, %esi movl $0x1, %edx leaq 0x34732(%rip), %rdi # 0x40b0b jmp 0xc3f3 movq 0x59e6e(%rip), %rcx # 0x66250 movl $0x7, %esi movl $0x1, %edx leaq 0x3472c(%rip), %rdi # 0x40b1f callq 0x7350 incl %r12d movq %rbx, %rdi callq 0x2c2fa cmpl %eax, %r12d jl 0xc31d movl 0x59e4e(%rip), %eax # 0x66260 leal -0x1(%rax), %ecx movl %ecx, 0x59e45(%rip) # 0x66260 cmpl $0x1, %eax jg 0xc43d movq 0x59e29(%rip), %rcx # 0x66250 leaq 0x34701(%rip), %rdi # 0x40b2f movl $0x14, %esi movl $0x1, %edx callq 0x7350 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z3ndrN12LefDefParser18defrCallbackType_eEPNS_14defiNonDefaultEPv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov rbx, rsi mov ebp, edi cmp edi, 68h ; 'h' jb short loc_C052 mov rcx, cs:fout lea rdi, aErrorCallbackT; "ERROR: callback type is out of bounds!"... mov esi, 27h ; ''' mov edx, 1 call _fwrite loc_C052: cmp cs:userData, r14 jz short loc_C078 mov rcx, cs:fout lea rdi, aErrorReturnedU; "ERROR: returned user data is not correc"... mov esi, 2Ah ; '*' mov edx, 1 call _fwrite loc_C078: cmp ebp, 60h ; '`' jz short loc_C09A mov rcx, cs:fout lea rdi, aBogusNondefaul; "BOGUS NONDEFAULTRULE TYPE " mov esi, 1Bh mov edx, 1 call _fwrite loc_C09A: mov r14, cs:fout mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault4nameEv; LefDefParser::defiNonDefault::name(void) lea rsi, aS_3; "- %s\n" mov rdi, r14 mov rdx, rax xor eax, eax call _fprintf mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault14hasHardspacingEv; LefDefParser::defiNonDefault::hasHardspacing(void) test eax, eax jz short loc_C0E6 mov rcx, cs:fout lea rdi, aHardspacing; " + HARDSPACING\n" mov esi, 11h mov edx, 1 call _fwrite loc_C0E6: mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault9numLayersEv; LefDefParser::defiNonDefault::numLayers(void) test eax, eax jle loc_C20E lea r14, aLayerS; " + LAYER %s" lea r15, aWidthD; " WIDTH %d" lea rbp, aDiagwidthD; " DIAGWIDTH %d" xor r12d, r12d loc_C10E: mov r13, cs:fout mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault9layerNameEi; LefDefParser::defiNonDefault::layerName(int) mov rdi, r13 mov rsi, r14 mov rdx, rax xor eax, eax call _fprintf mov r13, cs:fout mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault13layerWidthValEi; LefDefParser::defiNonDefault::layerWidthVal(int) mov rdi, r13 mov rsi, r15 mov edx, eax xor eax, eax call _fprintf mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault17hasLayerDiagWidthEi; LefDefParser::defiNonDefault::hasLayerDiagWidth(int) test eax, eax jz short loc_C181 mov r13, cs:fout mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault17layerDiagWidthValEi; LefDefParser::defiNonDefault::layerDiagWidthVal(int) mov rdi, r13 mov rsi, rbp mov edx, eax xor eax, eax call _fprintf loc_C181: mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault15hasLayerSpacingEi; LefDefParser::defiNonDefault::hasLayerSpacing(int) test eax, eax jz short loc_C1B5 mov r13, cs:fout mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault15layerSpacingValEi; LefDefParser::defiNonDefault::layerSpacingVal(int) mov rdi, r13 lea rsi, aSpacingD; " SPACING %d" mov edx, eax xor eax, eax call _fprintf loc_C1B5: mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault15hasLayerWireExtEi; LefDefParser::defiNonDefault::hasLayerWireExt(int) test eax, eax jz short loc_C1E9 mov r13, cs:fout mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault15layerWireExtValEi; LefDefParser::defiNonDefault::layerWireExtVal(int) mov rdi, r13 lea rsi, aWireextD; " WIREEXT %d" mov edx, eax xor eax, eax call _fprintf loc_C1E9: mov rsi, cs:fout mov edi, 0Ah call _fputc inc r12d mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault9numLayersEv; LefDefParser::defiNonDefault::numLayers(void) cmp r12d, eax jl loc_C10E loc_C20E: mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault7numViasEv; LefDefParser::defiNonDefault::numVias(void) test eax, eax jle short loc_C252 lea r14, aViaS_0; " + VIA %s\n" xor ebp, ebp loc_C223: mov r15, cs:fout mov rdi, rbx; this mov esi, ebp; int call _ZNK12LefDefParser14defiNonDefault7viaNameEi; LefDefParser::defiNonDefault::viaName(int) mov rdi, r15 mov rsi, r14 mov rdx, rax xor eax, eax call _fprintf inc ebp mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault7numViasEv; LefDefParser::defiNonDefault::numVias(void) cmp ebp, eax jl short loc_C223 loc_C252: mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault11numViaRulesEv; LefDefParser::defiNonDefault::numViaRules(void) test eax, eax jle short loc_C2A9 lea r12, aXxx; "XXX" lea r14, aViaruleS; " + VIARULE %s\n" xor ebp, ebp loc_C26E: mov r15, cs:fout cmp cs:_ZL14ignoreViaNames, 0; ignoreViaNames mov rdx, r12 jnz short loc_C28E mov rdi, rbx; this mov esi, ebp; int call _ZNK12LefDefParser14defiNonDefault11viaRuleNameEi; LefDefParser::defiNonDefault::viaRuleName(int) mov rdx, rax loc_C28E: mov rdi, r15 mov rsi, r14 xor eax, eax call _fprintf inc ebp mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault11numViaRulesEv; LefDefParser::defiNonDefault::numViaRules(void) cmp ebp, eax jl short loc_C26E loc_C2A9: mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault10numMinCutsEv; LefDefParser::defiNonDefault::numMinCuts(void) test eax, eax jle short loc_C2FC lea r14, aMincutsSD; " + MINCUTS %s %d\n" xor ebp, ebp loc_C2BE: mov r15, cs:fout mov rdi, rbx; this mov esi, ebp; int call _ZNK12LefDefParser14defiNonDefault12cutLayerNameEi; LefDefParser::defiNonDefault::cutLayerName(int) mov r12, rax mov rdi, rbx; this mov esi, ebp; int call _ZNK12LefDefParser14defiNonDefault7numCutsEi; LefDefParser::defiNonDefault::numCuts(int) mov rdi, r15 mov rsi, r14 mov rdx, r12 mov ecx, eax xor eax, eax call _fprintf inc ebp mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault10numMinCutsEv; LefDefParser::defiNonDefault::numMinCuts(void) cmp ebp, eax jl short loc_C2BE loc_C2FC: mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault8numPropsEv; LefDefParser::defiNonDefault::numProps(void) test eax, eax jle loc_C40C lea r14, aPropertySS_0; " + PROPERTY %s %s " lea r15, jpt_C371 xor r12d, r12d loc_C31D: mov r13, cs:fout mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault8propNameEi; LefDefParser::defiNonDefault::propName(int) mov rbp, rax mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault9propValueEi; LefDefParser::defiNonDefault::propValue(int) mov rdi, r13 mov rsi, r14 mov rdx, rbp mov rcx, rax xor eax, eax call _fprintf mov rdi, rbx; this mov esi, r12d; int call _ZNK12LefDefParser14defiNonDefault8propTypeEi; LefDefParser::defiNonDefault::propType(int) movzx eax, al add eax, 0FFFFFFB7h; switch 11 cases cmp eax, 0Ah ja def_C371; jumptable 000000000000C371 default case, cases 74-77,79,80 movsxd rax, ds:(jpt_C371 - 40280h)[r15+rax*4] add rax, r15 jmp rax; switch jump loc_C373: mov rcx, cs:fout; jumptable 000000000000C371 case 73 mov esi, 8 mov edx, 1 lea rdi, aInteger; "INTEGER\n" jmp short loc_C3F3 loc_C38D: mov rcx, cs:fout; jumptable 000000000000C371 case 81 mov esi, 0Ch mov edx, 1 lea rdi, aQuotestring; "QUOTESTRING\n" jmp short loc_C3F3 loc_C3A7: mov rcx, cs:fout; jumptable 000000000000C371 case 78 mov esi, 7 mov edx, 1 lea rdi, aNumber; "NUMBER\n" jmp short loc_C3F3 loc_C3C1: mov rcx, cs:fout; jumptable 000000000000C371 case 82 mov esi, 5 mov edx, 1 lea rdi, aReal; "REAL\n" jmp short loc_C3F3 loc_C3DB: mov rcx, cs:fout; jumptable 000000000000C371 case 83 mov esi, 7 mov edx, 1 lea rdi, aQuotestring+5; "STRING\n" loc_C3F3: call _fwrite def_C371: inc r12d; jumptable 000000000000C371 default case, cases 74-77,79,80 mov rdi, rbx; this call _ZNK12LefDefParser14defiNonDefault8numPropsEv; LefDefParser::defiNonDefault::numProps(void) cmp r12d, eax jl loc_C31D loc_C40C: mov eax, cs:numObjs lea ecx, [rax-1] mov cs:numObjs, ecx cmp eax, 1 jg short loc_C43D mov rcx, cs:fout lea rdi, aEndNondefaultr; "END NONDEFAULTRULES\n" mov esi, 14h mov edx, 1 call _fwrite loc_C43D: xor eax, eax add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ndr(unsigned int a1, LefDefParser::defiNonDefault *a2, long long a3) { LefDefParser *v5; // r14 const char *v6; // rax int v7; // r12d LefDefParser *v8; // r13 const char *v9; // rax LefDefParser *v10; // r13 int v11; // eax LefDefParser *v12; // r13 int v13; // eax LefDefParser *v14; // r13 int v15; // eax LefDefParser *v16; // r13 int v17; // eax int v18; // ebp LefDefParser *v19; // r15 const char *v20; // rax int v21; // ebp LefDefParser *v22; // r15 const char *v23; // rdx int v24; // ebp LefDefParser *v25; // r15 const char *v26; // r12 int v27; // eax int v28; // r12d LefDefParser *v29; // r13 const char *v30; // rbp const char *v31; // rax LefDefParser *v32; // rcx long long v33; // rsi char *v34; // rdi int v35; // eax if ( a1 >= 0x68 ) fwrite("ERROR: callback type is out of bounds!\n", 39LL, 1LL, fout); if ( userData != a3 ) fwrite("ERROR: returned user data is not correct!\n", 42LL, 1LL, fout); if ( a1 != 96 ) fwrite("BOGUS NONDEFAULTRULE TYPE ", 27LL, 1LL, fout); v5 = fout; v6 = (const char *)LefDefParser::defiNonDefault::name(a2); fprintf(v5, "- %s\n", v6); if ( (unsigned int)LefDefParser::defiNonDefault::hasHardspacing(a2) ) fwrite(" + HARDSPACING\n", 17LL, 1LL, fout); if ( (int)LefDefParser::defiNonDefault::numLayers(a2) > 0 ) { v7 = 0; do { v8 = fout; v9 = (const char *)LefDefParser::defiNonDefault::layerName(a2, v7); fprintf(v8, " + LAYER %s", v9); v10 = fout; v11 = LefDefParser::defiNonDefault::layerWidthVal(a2, v7); fprintf(v10, " WIDTH %d", v11); if ( (unsigned int)LefDefParser::defiNonDefault::hasLayerDiagWidth(a2, v7) ) { v12 = fout; v13 = LefDefParser::defiNonDefault::layerDiagWidthVal(a2, v7); fprintf(v12, " DIAGWIDTH %d", v13); } if ( (unsigned int)LefDefParser::defiNonDefault::hasLayerSpacing(a2, v7) ) { v14 = fout; v15 = LefDefParser::defiNonDefault::layerSpacingVal(a2, v7); fprintf(v14, " SPACING %d", v15); } if ( (unsigned int)LefDefParser::defiNonDefault::hasLayerWireExt(a2, v7) ) { v16 = fout; v17 = LefDefParser::defiNonDefault::layerWireExtVal(a2, v7); fprintf(v16, " WIREEXT %d", v17); } fputc(10LL, fout); ++v7; } while ( v7 < (int)LefDefParser::defiNonDefault::numLayers(a2) ); } if ( (int)LefDefParser::defiNonDefault::numVias(a2) > 0 ) { v18 = 0; do { v19 = fout; v20 = (const char *)LefDefParser::defiNonDefault::viaName(a2, v18); fprintf(v19, " + VIA %s\n", v20); ++v18; } while ( v18 < (int)LefDefParser::defiNonDefault::numVias(a2) ); } if ( (int)LefDefParser::defiNonDefault::numViaRules(a2) > 0 ) { v21 = 0; do { v22 = fout; v23 = "XXX"; if ( !ignoreViaNames ) v23 = (const char *)LefDefParser::defiNonDefault::viaRuleName(a2, v21); fprintf(v22, " + VIARULE %s\n", v23); ++v21; } while ( v21 < (int)LefDefParser::defiNonDefault::numViaRules(a2) ); } if ( (int)LefDefParser::defiNonDefault::numMinCuts(a2) > 0 ) { v24 = 0; do { v25 = fout; v26 = (const char *)LefDefParser::defiNonDefault::cutLayerName(a2, v24); v27 = LefDefParser::defiNonDefault::numCuts(a2, v24); fprintf(v25, " + MINCUTS %s %d\n", v26, v27); ++v24; } while ( v24 < (int)LefDefParser::defiNonDefault::numMinCuts(a2) ); } if ( (int)LefDefParser::defiNonDefault::numProps(a2) > 0 ) { v28 = 0; do { v29 = fout; v30 = (const char *)LefDefParser::defiNonDefault::propName(a2, v28); v31 = (const char *)LefDefParser::defiNonDefault::propValue(a2, v28); fprintf(v29, " + PROPERTY %s %s ", v30, v31); switch ( (unsigned __int8)LefDefParser::defiNonDefault::propType(a2, v28) ) { case 'I': v32 = fout; v33 = 8LL; v34 = "INTEGER\n"; goto LABEL_37; case 'N': v32 = fout; v33 = 7LL; v34 = "NUMBER\n"; goto LABEL_37; case 'Q': v32 = fout; v33 = 12LL; v34 = "QUOTESTRING\n"; goto LABEL_37; case 'R': v32 = fout; v33 = 5LL; v34 = "REAL\n"; goto LABEL_37; case 'S': v32 = fout; v33 = 7LL; v34 = "STRING\n"; LABEL_37: fwrite(v34, v33, 1LL, v32); break; default: break; } ++v28; } while ( v28 < (int)LefDefParser::defiNonDefault::numProps(a2) ); } v35 = numObjs--; if ( v35 <= 1 ) fwrite("END NONDEFAULTRULES\n", 20LL, 1LL, fout); return 0LL; }
ndr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV RBX,RSI MOV EBP,EDI CMP EDI,0x68 JC 0x0010c052 MOV RCX,qword ptr [0x00166250] LEA RDI,[0x140575] MOV ESI,0x27 MOV EDX,0x1 CALL 0x00107350 LAB_0010c052: CMP qword ptr [0x00166258],R14 JZ 0x0010c078 MOV RCX,qword ptr [0x00166250] LEA RDI,[0x14054a] MOV ESI,0x2a MOV EDX,0x1 CALL 0x00107350 LAB_0010c078: CMP EBP,0x60 JZ 0x0010c09a MOV RCX,qword ptr [0x00166250] LEA RDI,[0x140a52] MOV ESI,0x1b MOV EDX,0x1 CALL 0x00107350 LAB_0010c09a: MOV R14,qword ptr [0x00166250] MOV RDI,RBX CALL 0x0012ba7c LEA RSI,[0x140a6e] MOV RDI,R14 MOV RDX,RAX XOR EAX,EAX CALL 0x00107290 MOV RDI,RBX CALL 0x0012ba80 TEST EAX,EAX JZ 0x0010c0e6 MOV RCX,qword ptr [0x00166250] LEA RDI,[0x140a74] MOV ESI,0x11 MOV EDX,0x1 CALL 0x00107350 LAB_0010c0e6: MOV RDI,RBX CALL 0x0012ba86 TEST EAX,EAX JLE 0x0010c20e LEA R14,[0x140a86] LEA R15,[0x140a94] LEA RBP,[0x140a9e] XOR R12D,R12D LAB_0010c10e: MOV R13,qword ptr [0x00166250] MOV RDI,RBX MOV ESI,R12D CALL 0x0012ba8a MOV RDI,R13 MOV RSI,R14 MOV RDX,RAX XOR EAX,EAX CALL 0x00107290 MOV R13,qword ptr [0x00166250] MOV RDI,RBX MOV ESI,R12D CALL 0x0012bb5e MOV RDI,R13 MOV RSI,R15 MOV EDX,EAX XOR EAX,EAX CALL 0x00107290 MOV RDI,RBX MOV ESI,R12D CALL 0x0012bbc8 TEST EAX,EAX JZ 0x0010c181 MOV R13,qword ptr [0x00166250] MOV RDI,RBX MOV ESI,R12D CALL 0x0012bc9a MOV RDI,R13 MOV RSI,RBP MOV EDX,EAX XOR EAX,EAX CALL 0x00107290 LAB_0010c181: MOV RDI,RBX MOV ESI,R12D CALL 0x0012bd6e TEST EAX,EAX JZ 0x0010c1b5 MOV R13,qword ptr [0x00166250] MOV RDI,RBX MOV ESI,R12D CALL 0x0012bf12 MOV RDI,R13 LEA RSI,[0x140aac] MOV EDX,EAX XOR EAX,EAX CALL 0x00107290 LAB_0010c1b5: MOV RDI,RBX MOV ESI,R12D CALL 0x0012bd04 TEST EAX,EAX JZ 0x0010c1e9 MOV R13,qword ptr [0x00166250] MOV RDI,RBX MOV ESI,R12D CALL 0x0012be40 MOV RDI,R13 LEA RSI,[0x140ab8] MOV EDX,EAX XOR EAX,EAX CALL 0x00107290 LAB_0010c1e9: MOV RSI,qword ptr [0x00166250] MOV EDI,0xa CALL 0x00107240 INC R12D MOV RDI,RBX CALL 0x0012ba86 CMP R12D,EAX JL 0x0010c10e LAB_0010c20e: MOV RDI,RBX CALL 0x0012bf7c TEST EAX,EAX JLE 0x0010c252 LEA R14,[0x140ac4] XOR EBP,EBP LAB_0010c223: MOV R15,qword ptr [0x00166250] MOV RDI,RBX MOV ESI,EBP CALL 0x0012bf80 MOV RDI,R15 MOV RSI,R14 MOV RDX,RAX XOR EAX,EAX CALL 0x00107290 INC EBP MOV RDI,RBX CALL 0x0012bf7c CMP EBP,EAX JL 0x0010c223 LAB_0010c252: MOV RDI,RBX CALL 0x0012bfe8 TEST EAX,EAX JLE 0x0010c2a9 LEA R12,[0x140768] LEA R14,[0x140ad1] XOR EBP,EBP LAB_0010c26e: MOV R15,qword ptr [0x00166250] CMP byte ptr [0x00166280],0x0 MOV RDX,R12 JNZ 0x0010c28e MOV RDI,RBX MOV ESI,EBP CALL 0x0012bfec MOV RDX,RAX LAB_0010c28e: MOV RDI,R15 MOV RSI,R14 XOR EAX,EAX CALL 0x00107290 INC EBP MOV RDI,RBX CALL 0x0012bfe8 CMP EBP,EAX JL 0x0010c26e LAB_0010c2a9: MOV RDI,RBX CALL 0x0012c054 TEST EAX,EAX JLE 0x0010c2fc LEA R14,[0x140ae2] XOR EBP,EBP LAB_0010c2be: MOV R15,qword ptr [0x00166250] MOV RDI,RBX MOV ESI,EBP CALL 0x0012c058 MOV R12,RAX MOV RDI,RBX MOV ESI,EBP CALL 0x0012c0c2 MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV ECX,EAX XOR EAX,EAX CALL 0x00107290 INC EBP MOV RDI,RBX CALL 0x0012c054 CMP EBP,EAX JL 0x0010c2be LAB_0010c2fc: MOV RDI,RBX CALL 0x0012c2fa TEST EAX,EAX JLE 0x0010c40c LEA R14,[0x140af6] LEA R15,[0x140280] XOR R12D,R12D LAB_0010c31d: MOV R13,qword ptr [0x00166250] MOV RDI,RBX MOV ESI,R12D CALL 0x0012c6d0 MOV RBP,RAX MOV RDI,RBX MOV ESI,R12D CALL 0x0012c742 MOV RDI,R13 MOV RSI,R14 MOV RDX,RBP MOV RCX,RAX XOR EAX,EAX CALL 0x00107290 MOV RDI,RBX MOV ESI,R12D CALL 0x0012c822 MOVZX EAX,AL ADD EAX,-0x49 CMP EAX,0xa JA 0x0010c3f8 MOVSXD RAX,dword ptr [R15 + RAX*0x4] ADD RAX,R15 switchD: JMP RAX caseD_49: MOV RCX,qword ptr [0x00166250] MOV ESI,0x8 MOV EDX,0x1 LEA RDI,[0x140b11] JMP 0x0010c3f3 caseD_51: MOV RCX,qword ptr [0x00166250] MOV ESI,0xc MOV EDX,0x1 LEA RDI,[0x140b1a] JMP 0x0010c3f3 caseD_4e: MOV RCX,qword ptr [0x00166250] MOV ESI,0x7 MOV EDX,0x1 LEA RDI,[0x140b27] JMP 0x0010c3f3 caseD_52: MOV RCX,qword ptr [0x00166250] MOV ESI,0x5 MOV EDX,0x1 LEA RDI,[0x140b0b] JMP 0x0010c3f3 caseD_53: MOV RCX,qword ptr [0x00166250] MOV ESI,0x7 MOV EDX,0x1 LEA RDI,[0x140b1f] LAB_0010c3f3: CALL 0x00107350 caseD_4a: INC R12D MOV RDI,RBX CALL 0x0012c2fa CMP R12D,EAX JL 0x0010c31d LAB_0010c40c: MOV EAX,dword ptr [0x00166260] LEA ECX,[RAX + -0x1] MOV dword ptr [0x00166260],ECX CMP EAX,0x1 JG 0x0010c43d MOV RCX,qword ptr [0x00166250] LEA RDI,[0x140b2f] MOV ESI,0x14 MOV EDX,0x1 CALL 0x00107350 LAB_0010c43d: XOR EAX,EAX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* ndr(LefDefParser::defrCallbackType_e, LefDefParser::defiNonDefault*, void*) */ int8 ndr(uint param_1,defiNonDefault *param_2,long param_3) { bool bVar1; FILE *pFVar2; int1 uVar3; int iVar4; uint uVar5; int iVar6; int8 uVar7; int8 uVar8; int *puVar9; size_t __size; char *__ptr; if (0x67 < param_1) { fwrite("ERROR: callback type is out of bounds!\n",0x27,1,fout); } if (userData != param_3) { fwrite("ERROR: returned user data is not correct!\n",0x2a,1,fout); } if (param_1 != 0x60) { fwrite("BOGUS NONDEFAULTRULE TYPE ",0x1b,1,fout); } pFVar2 = fout; uVar7 = LefDefParser::defiNonDefault::name(param_2); fprintf(pFVar2,"- %s\n",uVar7); iVar4 = LefDefParser::defiNonDefault::hasHardspacing(param_2); if (iVar4 != 0) { fwrite(" + HARDSPACING\n",0x11,1,fout); } iVar4 = LefDefParser::defiNonDefault::numLayers(param_2); if (0 < iVar4) { iVar4 = 0; do { pFVar2 = fout; uVar7 = LefDefParser::defiNonDefault::layerName(param_2,iVar4); fprintf(pFVar2," + LAYER %s",uVar7); pFVar2 = fout; uVar5 = LefDefParser::defiNonDefault::layerWidthVal(param_2,iVar4); fprintf(pFVar2," WIDTH %d",(ulong)uVar5); iVar6 = LefDefParser::defiNonDefault::hasLayerDiagWidth(param_2,iVar4); pFVar2 = fout; if (iVar6 != 0) { uVar5 = LefDefParser::defiNonDefault::layerDiagWidthVal(param_2,iVar4); fprintf(pFVar2," DIAGWIDTH %d",(ulong)uVar5); } iVar6 = LefDefParser::defiNonDefault::hasLayerSpacing(param_2,iVar4); pFVar2 = fout; if (iVar6 != 0) { uVar5 = LefDefParser::defiNonDefault::layerSpacingVal(param_2,iVar4); fprintf(pFVar2," SPACING %d",(ulong)uVar5); } iVar6 = LefDefParser::defiNonDefault::hasLayerWireExt(param_2,iVar4); pFVar2 = fout; if (iVar6 != 0) { uVar5 = LefDefParser::defiNonDefault::layerWireExtVal(param_2,iVar4); fprintf(pFVar2," WIREEXT %d",(ulong)uVar5); } fputc(10,fout); iVar4 = iVar4 + 1; iVar6 = LefDefParser::defiNonDefault::numLayers(param_2); } while (iVar4 < iVar6); } iVar4 = LefDefParser::defiNonDefault::numVias(param_2); if (0 < iVar4) { iVar4 = 0; do { pFVar2 = fout; uVar7 = LefDefParser::defiNonDefault::viaName(param_2,iVar4); fprintf(pFVar2," + VIA %s\n",uVar7); iVar4 = iVar4 + 1; iVar6 = LefDefParser::defiNonDefault::numVias(param_2); } while (iVar4 < iVar6); } iVar4 = LefDefParser::defiNonDefault::numViaRules(param_2); if (0 < iVar4) { iVar4 = 0; do { pFVar2 = fout; puVar9 = &DAT_00140768; if (ignoreViaNames == '\0') { puVar9 = (int *)LefDefParser::defiNonDefault::viaRuleName(param_2,iVar4); } fprintf(pFVar2," + VIARULE %s\n",puVar9); iVar4 = iVar4 + 1; iVar6 = LefDefParser::defiNonDefault::numViaRules(param_2); } while (iVar4 < iVar6); } iVar4 = LefDefParser::defiNonDefault::numMinCuts(param_2); if (0 < iVar4) { iVar4 = 0; do { pFVar2 = fout; uVar7 = LefDefParser::defiNonDefault::cutLayerName(param_2,iVar4); uVar5 = LefDefParser::defiNonDefault::numCuts(param_2,iVar4); fprintf(pFVar2," + MINCUTS %s %d\n",uVar7,(ulong)uVar5); iVar4 = iVar4 + 1; iVar6 = LefDefParser::defiNonDefault::numMinCuts(param_2); } while (iVar4 < iVar6); } iVar4 = LefDefParser::defiNonDefault::numProps(param_2); if (0 < iVar4) { iVar4 = 0; do { pFVar2 = fout; uVar7 = LefDefParser::defiNonDefault::propName(param_2,iVar4); uVar8 = LefDefParser::defiNonDefault::propValue(param_2,iVar4); fprintf(pFVar2," + PROPERTY %s %s ",uVar7,uVar8); uVar3 = LefDefParser::defiNonDefault::propType(param_2,iVar4); switch(uVar3) { case 0x49: __size = 8; __ptr = "INTEGER\n"; break; default: goto switchD_0010c371_caseD_4a; case 0x4e: __size = 7; __ptr = "NUMBER\n"; break; case 0x51: __size = 0xc; __ptr = "QUOTESTRING\n"; break; case 0x52: __size = 5; __ptr = "REAL\n"; break; case 0x53: __size = 7; __ptr = "STRING\n"; } fwrite(__ptr,__size,1,fout); switchD_0010c371_caseD_4a: iVar4 = iVar4 + 1; iVar6 = LefDefParser::defiNonDefault::numProps(param_2); } while (iVar4 < iVar6); } iVar4 = numObjs + -1; bVar1 = numObjs < 2; numObjs = iVar4; if (bVar1) { fwrite("END NONDEFAULTRULES\n",0x14,1,fout); } return 0; }
39,798
key_cache_read
eloqsql/mysys/mf_keycache.c
uchar *key_cache_read(KEY_CACHE *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, uint block_length, int return_buffer) { if (keycache->can_be_used) return keycache->interface_funcs->read(keycache->keycache_cb, file, filepos, level, buff, length, block_length, return_buffer); /* We can't use mutex here as the key cache may not be initialized */ if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP))) return (uchar *) 0; return buff; }
O0
c
key_cache_read: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x18(%rbp), %eax movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movl %r9d, -0x34(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x49(%rax) je 0xe9b7d movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq 0x18(%rax), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rdi movl -0x14(%rbp), %esi movq -0x20(%rbp), %rdx movl -0x24(%rbp), %ecx movq -0x30(%rbp), %r8 movl -0x34(%rbp), %r9d movl 0x10(%rbp), %r11d movl 0x18(%rbp), %r10d movl %r11d, (%rsp) movl %r10d, 0x8(%rsp) callq *%rax movq %rax, -0x8(%rbp) jmp 0xe9bb0 movl -0x14(%rbp), %edi movq -0x30(%rbp), %rsi movl -0x34(%rbp), %eax movl %eax, %edx movq -0x20(%rbp), %rcx movl $0x4, %r8d callq 0xfcdf0 cmpq $0x0, %rax je 0xe9ba8 movq $0x0, -0x8(%rbp) jmp 0xe9bb0 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
key_cache_read: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_34], r9d mov rax, [rbp+var_10] cmp byte ptr [rax+49h], 0 jz short loc_E9B7D mov rax, [rbp+var_10] mov rax, [rax+10h] mov rax, [rax+18h] mov rcx, [rbp+var_10] mov rdi, [rcx+8] mov esi, [rbp+var_14] mov rdx, [rbp+var_20] mov ecx, [rbp+var_24] mov r8, [rbp+var_30] mov r9d, [rbp+var_34] mov r11d, [rbp+arg_0] mov r10d, [rbp+arg_8] mov [rsp+50h+var_50], r11d mov [rsp+50h+var_48], r10d call rax mov [rbp+var_8], rax jmp short loc_E9BB0 loc_E9B7D: mov edi, [rbp+var_14] mov rsi, [rbp+var_30] mov eax, [rbp+var_34] mov edx, eax mov rcx, [rbp+var_20] mov r8d, 4 call my_pread cmp rax, 0 jz short loc_E9BA8 mov [rbp+var_8], 0 jmp short loc_E9BB0 loc_E9BA8: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_E9BB0: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long key_cache_read( long long a1, unsigned int a2, long long a3, unsigned int a4, long long a5, unsigned int a6, int a7, int a8) { if ( *(_BYTE *)(a1 + 73) ) return (*(long long ( **)(_QWORD, _QWORD, long long, _QWORD, long long, _QWORD, int, int))(*(_QWORD *)(a1 + 16) + 24LL))( *(_QWORD *)(a1 + 8), a2, a3, a4, a5, a6, a7, a8); if ( my_pread(a2, a5, a6, a3, 4LL) ) return 0LL; return a5; }
key_cache_read: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV dword ptr [RBP + -0x34],R9D MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x49],0x0 JZ 0x001e9b7d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0x14] MOV RDX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x30] MOV R9D,dword ptr [RBP + -0x34] MOV R11D,dword ptr [RBP + 0x10] MOV R10D,dword ptr [RBP + 0x18] MOV dword ptr [RSP],R11D MOV dword ptr [RSP + 0x8],R10D CALL RAX MOV qword ptr [RBP + -0x8],RAX JMP 0x001e9bb0 LAB_001e9b7d: MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x34] MOV EDX,EAX MOV RCX,qword ptr [RBP + -0x20] MOV R8D,0x4 CALL 0x001fcdf0 CMP RAX,0x0 JZ 0x001e9ba8 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001e9bb0 LAB_001e9ba8: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_001e9bb0: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
int8 key_cache_read(long param_1,int4 param_2,int8 param_3,int4 param_4, int8 param_5,int4 param_6,int4 param_7,int4 param_8) { long lVar1; int8 local_10; if (*(char *)(param_1 + 0x49) == '\0') { lVar1 = my_pread(param_2,param_5,param_6,param_3,4); local_10 = param_5; if (lVar1 != 0) { local_10 = 0; } } else { local_10 = (**(code **)(*(long *)(param_1 + 0x10) + 0x18)) (*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5,param_6, param_7,param_8); } return local_10; }
39,799
key_cache_read
eloqsql/mysys/mf_keycache.c
uchar *key_cache_read(KEY_CACHE *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, uint block_length, int return_buffer) { if (keycache->can_be_used) return keycache->interface_funcs->read(keycache->keycache_cb, file, filepos, level, buff, length, block_length, return_buffer); /* We can't use mutex here as the key cache may not be initialized */ if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP))) return (uchar *) 0; return buff; }
O3
c
key_cache_read: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %r8, %rbx movq %rdx, %rax cmpb $0x0, 0x49(%rdi) je 0x9d478 movq 0x8(%rdi), %rdx movq 0x10(%rdi), %rdi movq 0x18(%rdi), %r11 movq %rdx, %rdi movq %rax, %rdx movq %rbx, %r8 addq $0x8, %rsp popq %rbx popq %rbp jmpq *%r11 movl %r9d, %edx movl $0x4, %r8d movl %esi, %edi movq %rbx, %rsi movq %rax, %rcx callq 0xa77dc xorl %ecx, %ecx testq %rax, %rax cmoveq %rbx, %rcx movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
key_cache_read: push rbp mov rbp, rsp push rbx push rax mov rbx, r8 mov rax, rdx cmp byte ptr [rdi+49h], 0 jz short loc_9D478 mov rdx, [rdi+8] mov rdi, [rdi+10h] mov r11, [rdi+18h] mov rdi, rdx mov rdx, rax mov r8, rbx add rsp, 8 pop rbx pop rbp jmp r11 loc_9D478: mov edx, r9d mov r8d, 4 mov edi, esi mov rsi, rbx mov rcx, rax call my_pread xor ecx, ecx test rax, rax cmovz rcx, rbx mov rax, rcx add rsp, 8 pop rbx pop rbp retn
long long key_cache_read(long long a1, long long a2, long long a3, long long a4, long long a5, unsigned int a6) { long long v8; // rax long long v9; // rcx if ( *(_BYTE *)(a1 + 73) ) return (*(long long ( **)(_QWORD, long long, long long, long long, long long))(*(_QWORD *)(a1 + 16) + 24LL))( *(_QWORD *)(a1 + 8), a2, a3, a4, a5); v8 = my_pread((unsigned int)a2, a5, a6, a3, 4LL); v9 = 0LL; if ( !v8 ) return a5; return v9; }
key_cache_read: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,R8 MOV RAX,RDX CMP byte ptr [RDI + 0x49],0x0 JZ 0x0019d478 MOV RDX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI + 0x10] MOV R11,qword ptr [RDI + 0x18] MOV RDI,RDX MOV RDX,RAX MOV R8,RBX ADD RSP,0x8 POP RBX POP RBP JMP R11 LAB_0019d478: MOV EDX,R9D MOV R8D,0x4 MOV EDI,ESI MOV RSI,RBX MOV RCX,RAX CALL 0x001a77dc XOR ECX,ECX TEST RAX,RAX CMOVZ RCX,RBX MOV RAX,RCX ADD RSP,0x8 POP RBX POP RBP RET
int8 key_cache_read(long param_1,ulong param_2,int8 param_3,int8 param_4,int8 param_5, int4 param_6) { int8 uVar1; long lVar2; if (*(char *)(param_1 + 0x49) != '\0') { /* WARNING: Could not recover jumptable at 0x0019d475. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar1 = (**(code **)(*(long *)(param_1 + 0x10) + 0x18)) (*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5); return uVar1; } lVar2 = my_pread(param_2 & 0xffffffff,param_5,param_6,param_3,4); uVar1 = 0; if (lVar2 == 0) { uVar1 = param_5; } return uVar1; }