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
46,200
ggml_compute_forward_upscale
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_upscale( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; switch (src0->type) { case GGML_TYPE_F32: { ggml_compute_forward_upscale_f32(params, dst); } break; default: { GGML_ABORT("fatal error"); } } }
O0
c
ggml_compute_forward_upscale: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax testl %eax, %eax jne 0x1893a jmp 0x1892b movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0x34350 jmp 0x18954 leaq 0x5b221(%rip), %rdi # 0x73b62 movl $0x28fd, %esi # imm = 0x28FD leaq 0x5b470(%rip), %rdx # 0x73dbd movb $0x0, %al callq 0xe270 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
ggml_compute_forward_upscale: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+98h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax] test eax, eax jnz short loc_1893A jmp short $+2 loc_1892B: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call ggml_compute_forward_upscale_f32 jmp short loc_18954 loc_1893A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 28FDh lea rdx, aFatalError; "fatal error" mov al, 0 call _ggml_abort loc_18954: add rsp, 20h pop rbp retn
double ggml_compute_forward_upscale(long long a1, long long a2) { double result; // xmm0_8 if ( **(_DWORD **)(a2 + 152) ) return ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c", 10493LL, "fatal error"); ggml_compute_forward_upscale_f32(a1, a2); return result; }
ggml_compute_forward_upscale: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] TEST EAX,EAX JNZ 0x0011893a JMP 0x0011892b LAB_0011892b: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x00134350 JMP 0x00118954 LAB_0011893a: LEA RDI,[0x173b62] MOV ESI,0x28fd LEA RDX,[0x173dbd] MOV AL,0x0 CALL 0x0010e270 LAB_00118954: ADD RSP,0x20 POP RBP RET
void ggml_compute_forward_upscale(int8 param_1,long param_2) { if (**(int **)(param_2 + 0x98) == 0) { ggml_compute_forward_upscale_f32(param_1,param_2); } else { ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c" ,0x28fd,"fatal error"); } return; }
46,201
unlock_io_cache
eloqsql/mysys/mf_iocache.c
static void unlock_io_cache(IO_CACHE *cache) { IO_CACHE_SHARE *cshare= cache->share; DBUG_ENTER("unlock_io_cache"); DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u", (cache == cshare->source_cache) ? "writer" : "reader", cache, (ulong) cshare->pos_in_file, cshare->total_threads)); cshare->running_threads= cshare->total_threads; mysql_cond_broadcast(&cshare->cond); mysql_mutex_unlock(&cshare->mutex); DBUG_VOID_RETURN; }
O0
c
unlock_io_cache: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x98(%rax), %rax movq %rax, -0x10(%rbp) jmp 0xe302d movq -0x10(%rbp), %rax movl 0xdc(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0xd8(%rax) movq -0x10(%rbp), %rdi addq $0x48, %rdi callq 0xe1860 movq -0x10(%rbp), %rdi callq 0xe18c0 jmp 0xe3059 addq $0x10, %rsp popq %rbp retq nop
unlock_io_cache: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+98h] mov [rbp+var_10], rax jmp short $+2 loc_E302D: mov rax, [rbp+var_10] mov ecx, [rax+0DCh] mov rax, [rbp+var_10] mov [rax+0D8h], ecx mov rdi, [rbp+var_10] add rdi, 48h ; 'H' call inline_mysql_cond_broadcast_2 mov rdi, [rbp+var_10] call inline_mysql_mutex_unlock_24 jmp short $+2 loc_E3059: add rsp, 10h pop rbp retn
long long unlock_io_cache(long long a1) { long long v2; // [rsp+0h] [rbp-10h] v2 = *(_QWORD *)(a1 + 152); *(_DWORD *)(v2 + 216) = *(_DWORD *)(v2 + 220); inline_mysql_cond_broadcast_2(v2 + 72); return inline_mysql_mutex_unlock_24(v2); }
unlock_io_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RBP + -0x10],RAX JMP 0x001e302d LAB_001e302d: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0xdc] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xd8],ECX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x48 CALL 0x001e1860 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001e18c0 JMP 0x001e3059 LAB_001e3059: ADD RSP,0x10 POP RBP RET
void unlock_io_cache(long param_1) { long lVar1; lVar1 = *(long *)(param_1 + 0x98); *(int4 *)(lVar1 + 0xd8) = *(int4 *)(lVar1 + 0xdc); inline_mysql_cond_broadcast(lVar1 + 0x48); inline_mysql_mutex_unlock(lVar1); return; }
46,202
my_caseup_str_utf8mb3
eloqsql/strings/ctype-utf8.c
static size_t my_caseup_str_utf8mb3(CHARSET_INFO *cs, char *src) { my_wc_t wc; int srcres, dstres; char *dst= src, *dst0= src; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(cs->caseup_multiply == 1); while (*src && (srcres= my_utf8mb3_uni_no_range(cs, &wc, (uchar *) src)) > 0) { my_toupper_utf8mb3(uni_plane, &wc); if ((dstres= my_uni_utf8mb3_no_range(cs, wc, (uchar*) dst)) <= 0) break; src+= srcres; dst+= dstres; } *dst= '\0'; return (size_t) (dst - dst0); }
O3
c
my_caseup_str_utf8mb3: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpb $0x0, (%rsi) movq %rsi, %r14 je 0xcbc9f movq 0x78(%rdi), %r13 leaq -0x30(%rbp), %r15 movq %rbx, %r12 movq %rbx, %r14 movq %r15, %rdi movq %r12, %rsi callq 0xcc578 testl %eax, %eax je 0xcbc9f movq 0x8(%r13), %rdx movq -0x30(%rbp), %rcx movzbl %ch, %esi movq (%rdx,%rsi,8), %rdx testq %rdx, %rdx je 0xcbc2e movzbl %cl, %ecx leaq (%rcx,%rcx,2), %rcx movl (%rdx,%rcx,4), %ecx movq %rcx, -0x30(%rbp) movl $0x1, %edx cmpq $0x80, %rcx jb 0xcbc88 movl $0x2, %edx cmpq $0x800, %rcx # imm = 0x800 jb 0xcbc6f cmpq $0xffff, %rcx # imm = 0xFFFF ja 0xcbc9f movl %ecx, %edx andb $0x3f, %dl orb $-0x80, %dl movb %dl, 0x2(%r14) shrq $0x6, %rcx orq $0x800, %rcx # imm = 0x800 movl $0x3, %edx movl %ecx, %esi andb $0x3f, %sil orb $-0x80, %sil movb %sil, 0x1(%r14) shrq $0x6, %rcx orq $0xc0, %rcx movb %cl, (%r14) movl %eax, %eax addq %rdx, %r14 cmpb $0x0, (%r12,%rax) leaq (%r12,%rax), %r12 jne 0xcbbf9 movb $0x0, (%r14) subq %rbx, %r14 movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_caseup_str_utf8mb3: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp byte ptr [rsi], 0 mov r14, rsi jz loc_CBC9F mov r13, [rdi+78h] lea r15, [rbp+var_30] mov r12, rbx mov r14, rbx loc_CBBF9: mov rdi, r15 mov rsi, r12 call my_utf8mb3_uni_no_range test eax, eax jz loc_CBC9F mov rdx, [r13+8] mov rcx, [rbp+var_30] movzx esi, ch mov rdx, [rdx+rsi*8] test rdx, rdx jz short loc_CBC2E movzx ecx, cl lea rcx, [rcx+rcx*2] mov ecx, [rdx+rcx*4] mov [rbp+var_30], rcx loc_CBC2E: mov edx, 1 cmp rcx, 80h jb short loc_CBC88 mov edx, 2 cmp rcx, 800h jb short loc_CBC6F cmp rcx, 0FFFFh ja short loc_CBC9F mov edx, ecx and dl, 3Fh or dl, 80h mov [r14+2], dl shr rcx, 6 or rcx, 800h mov edx, 3 loc_CBC6F: mov esi, ecx and sil, 3Fh or sil, 80h mov [r14+1], sil shr rcx, 6 or rcx, 0C0h loc_CBC88: mov [r14], cl mov eax, eax add r14, rdx cmp byte ptr [r12+rax], 0 lea r12, [r12+rax] jnz loc_CBBF9 loc_CBC9F: mov byte ptr [r14], 0 sub r14, rbx mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_caseup_str_utf8mb3(long long a1, _BYTE *a2) { unsigned long long v2; // rax _BYTE *v3; // r14 long long v4; // r13 _BYTE *v5; // r12 unsigned int v6; // eax unsigned long long v7; // rcx long long v8; // rdx long long v9; // rdx bool v10; // zf unsigned long long v12; // [rsp+0h] [rbp-30h] BYREF v12 = v2; v3 = a2; if ( *a2 ) { v4 = *(_QWORD *)(a1 + 120); v5 = a2; v3 = a2; do { v6 = my_utf8mb3_uni_no_range(&v12, v5); if ( !v6 ) break; v7 = v12; v8 = *(_QWORD *)(*(_QWORD *)(v4 + 8) + 8LL * BYTE1(v12)); if ( v8 ) { v7 = *(unsigned int *)(v8 + 12LL * (unsigned __int8)v12); v12 = v7; } v9 = 1LL; if ( v7 >= 0x80 ) { v9 = 2LL; if ( v7 >= 0x800 ) { if ( v7 > 0xFFFF ) break; v3[2] = v7 & 0x3F | 0x80; v7 = (v7 >> 6) | 0x800; v9 = 3LL; } v3[1] = v7 & 0x3F | 0x80; v7 = (v7 >> 6) | 0xC0; } *v3 = v7; v3 += v9; v10 = v5[v6] == 0; v5 += v6; } while ( !v10 ); } *v3 = 0; return v3 - a2; }
my_caseup_str_utf8mb3: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP byte ptr [RSI],0x0 MOV R14,RSI JZ 0x001cbc9f MOV R13,qword ptr [RDI + 0x78] LEA R15,[RBP + -0x30] MOV R12,RBX MOV R14,RBX LAB_001cbbf9: MOV RDI,R15 MOV RSI,R12 CALL 0x001cc578 TEST EAX,EAX JZ 0x001cbc9f MOV RDX,qword ptr [R13 + 0x8] MOV RCX,qword ptr [RBP + -0x30] MOVZX ESI,CH MOV RDX,qword ptr [RDX + RSI*0x8] TEST RDX,RDX JZ 0x001cbc2e MOVZX ECX,CL LEA RCX,[RCX + RCX*0x2] MOV ECX,dword ptr [RDX + RCX*0x4] MOV qword ptr [RBP + -0x30],RCX LAB_001cbc2e: MOV EDX,0x1 CMP RCX,0x80 JC 0x001cbc88 MOV EDX,0x2 CMP RCX,0x800 JC 0x001cbc6f CMP RCX,0xffff JA 0x001cbc9f MOV EDX,ECX AND DL,0x3f OR DL,0x80 MOV byte ptr [R14 + 0x2],DL SHR RCX,0x6 OR RCX,0x800 MOV EDX,0x3 LAB_001cbc6f: MOV ESI,ECX AND SIL,0x3f OR SIL,0x80 MOV byte ptr [R14 + 0x1],SIL SHR RCX,0x6 OR RCX,0xc0 LAB_001cbc88: MOV byte ptr [R14],CL MOV EAX,EAX ADD R14,RDX CMP byte ptr [R12 + RAX*0x1],0x0 LEA R12,[R12 + RAX*0x1] JNZ 0x001cbbf9 LAB_001cbc9f: MOV byte ptr [R14],0x0 SUB R14,RBX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_caseup_str_utf8mb3(long param_1,char *param_2) { char *pcVar1; long lVar2; uint uVar3; ulong in_RAX; ulong uVar4; long lVar5; char *pcVar6; char *pcVar7; ulong local_38; pcVar7 = param_2; if (*param_2 != '\0') { lVar2 = *(long *)(param_1 + 0x78); pcVar6 = param_2; local_38 = in_RAX; do { uVar3 = my_utf8mb3_uni_no_range(&local_38,pcVar6); if (uVar3 == 0) break; lVar5 = *(long *)(*(long *)(lVar2 + 8) + (local_38 >> 8 & 0xff) * 8); if (lVar5 != 0) { local_38 = (ulong)*(uint *)(lVar5 + (local_38 & 0xff) * 0xc); } lVar5 = 1; uVar4 = local_38; if (0x7f < local_38) { lVar5 = 2; if (0x7ff < local_38) { if (0xffff < local_38) break; pcVar7[2] = (byte)local_38 & 0x3f | 0x80; uVar4 = local_38 >> 6 | 0x800; lVar5 = 3; } pcVar7[1] = (byte)uVar4 & 0x3f | 0x80; uVar4 = uVar4 >> 6 | 0xc0; } *pcVar7 = (char)uVar4; pcVar7 = pcVar7 + lVar5; pcVar1 = pcVar6 + uVar3; pcVar6 = pcVar6 + uVar3; } while (*pcVar1 != '\0'); } *pcVar7 = '\0'; return (long)pcVar7 - (long)param_2; }
46,203
js_get_atom_index
bluesky950520[P]quickjs/quickjs.c
static JSAtom js_get_atom_index(JSRuntime *rt, JSAtomStruct *p) { uint32_t i = p->hash_next; /* atom_index */ if (p->atom_type != JS_ATOM_TYPE_SYMBOL) { JSAtomStruct *p1; i = rt->atom_hash[p->hash & (rt->atom_hash_size - 1)]; p1 = rt->atom_array[i]; while (p1 != p) { assert(i != 0); i = p1->hash_next; p1 = rt->atom_array[i]; } } return i; }
O0
c
js_get_atom_index: movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movq -0x10(%rsp), %rax movl 0xc(%rax), %eax movl %eax, -0x14(%rsp) movq -0x10(%rsp), %rax movq 0x4(%rax), %rax shrq $0x3e, %rax movzbl %al, %eax cmpl $0x3, %eax je 0x313c7 movq -0x8(%rsp), %rax movq 0x60(%rax), %rax movq -0x10(%rsp), %rcx movq 0x4(%rcx), %rcx shrq $0x20, %rcx andq $0x3fffffff, %rcx # imm = 0x3FFFFFFF movq -0x8(%rsp), %rdx movl 0x50(%rdx), %edx subl $0x1, %edx andl %edx, %ecx movslq %ecx, %rcx movl (%rax,%rcx,4), %eax movl %eax, -0x14(%rsp) movq -0x8(%rsp), %rax movq 0x68(%rax), %rax movl -0x14(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x20(%rsp) movq -0x20(%rsp), %rax cmpq -0x10(%rsp), %rax je 0x313c5 movq -0x20(%rsp), %rax movl 0xc(%rax), %eax movl %eax, -0x14(%rsp) movq -0x8(%rsp), %rax movq 0x68(%rax), %rax movl -0x14(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x20(%rsp) jmp 0x31395 jmp 0x313c7 movl -0x14(%rsp), %eax retq nopl (%rax)
js_get_atom_index: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov rax, [rsp+var_10] mov eax, [rax+0Ch] mov [rsp+var_14], eax mov rax, [rsp+var_10] mov rax, [rax+4] shr rax, 3Eh movzx eax, al cmp eax, 3 jz short loc_313C7 mov rax, [rsp+var_8] mov rax, [rax+60h] mov rcx, [rsp+var_10] mov rcx, [rcx+4] shr rcx, 20h and rcx, 3FFFFFFFh mov rdx, [rsp+var_8] mov edx, [rdx+50h] sub edx, 1 and ecx, edx movsxd rcx, ecx mov eax, [rax+rcx*4] mov [rsp+var_14], eax mov rax, [rsp+var_8] mov rax, [rax+68h] mov ecx, [rsp+var_14] mov rax, [rax+rcx*8] mov [rsp+var_20], rax loc_31395: mov rax, [rsp+var_20] cmp rax, [rsp+var_10] jz short loc_313C5 mov rax, [rsp+var_20] mov eax, [rax+0Ch] mov [rsp+var_14], eax mov rax, [rsp+var_8] mov rax, [rax+68h] mov ecx, [rsp+var_14] mov rax, [rax+rcx*8] mov [rsp+var_20], rax jmp short loc_31395 loc_313C5: jmp short $+2 loc_313C7: mov eax, [rsp+var_14] retn
long long js_get_atom_index(long long a1, long long a2) { long long i; // [rsp+0h] [rbp-20h] unsigned int v4; // [rsp+Ch] [rbp-14h] v4 = *(_DWORD *)(a2 + 12); if ( *(_QWORD *)(a2 + 4) >> 62 != 3 ) { v4 = *(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * ((*(_DWORD *)(a1 + 80) - 1) & (unsigned int)HIDWORD(*(_QWORD *)(a2 + 4)) & 0x3FFFFFFF)); for ( i = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * v4); i != a2; i = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * v4) ) v4 = *(_DWORD *)(i + 12); } return v4; }
js_get_atom_index: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV RAX,qword ptr [RSP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RSP + -0x14],EAX MOV RAX,qword ptr [RSP + -0x10] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x3e MOVZX EAX,AL CMP EAX,0x3 JZ 0x001313c7 MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RSP + -0x10] MOV RCX,qword ptr [RCX + 0x4] SHR RCX,0x20 AND RCX,0x3fffffff MOV RDX,qword ptr [RSP + -0x8] MOV EDX,dword ptr [RDX + 0x50] SUB EDX,0x1 AND ECX,EDX MOVSXD RCX,ECX MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + -0x14],EAX MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,dword ptr [RSP + -0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + -0x20],RAX LAB_00131395: MOV RAX,qword ptr [RSP + -0x20] CMP RAX,qword ptr [RSP + -0x10] JZ 0x001313c5 MOV RAX,qword ptr [RSP + -0x20] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RSP + -0x14],EAX MOV RAX,qword ptr [RSP + -0x8] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,dword ptr [RSP + -0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + -0x20],RAX JMP 0x00131395 LAB_001313c5: JMP 0x001313c7 LAB_001313c7: MOV EAX,dword ptr [RSP + -0x14] RET
uint js_get_atom_index(long param_1,long param_2) { int8 local_20; int4 local_14; local_14 = *(uint *)(param_2 + 0xc); if ((uint)((ulong)*(int8 *)(param_2 + 4) >> 0x3e) != 3) { local_14 = *(uint *)(*(long *)(param_1 + 0x60) + (long)(int)((uint)((ulong)*(int8 *)(param_2 + 4) >> 0x20) & 0x3fffffff & *(int *)(param_1 + 0x50) - 1U) * 4); local_20 = *(long *)(*(long *)(param_1 + 0x68) + (ulong)local_14 * 8); while (local_20 != param_2) { local_14 = *(uint *)(local_20 + 0xc); local_20 = *(long *)(*(long *)(param_1 + 0x68) + (ulong)local_14 * 8); } } return local_14; }
46,204
js_get_atom_index
bluesky950520[P]quickjs/quickjs.c
static JSAtom js_get_atom_index(JSRuntime *rt, JSAtomStruct *p) { uint32_t i = p->hash_next; /* atom_index */ if (p->atom_type != JS_ATOM_TYPE_SYMBOL) { JSAtomStruct *p1; i = rt->atom_hash[p->hash & (rt->atom_hash_size - 1)]; p1 = rt->atom_array[i]; while (p1 != p) { assert(i != 0); i = p1->hash_next; p1 = rt->atom_array[i]; } } return i; }
O2
c
js_get_atom_index: movq 0x4(%rsi), %rax movq %rax, %rcx shrq $0x3e, %rcx cmpl $0x2, %ecx jbe 0x1e143 movl 0xc(%rsi), %eax retq shrq $0x20, %rax movl 0x50(%rdi), %ecx decl %ecx andl %eax, %ecx shll $0x2, %ecx addq 0x60(%rdi), %rcx movq 0x68(%rdi), %rdx movl (%rcx), %eax movq (%rdx,%rax,8), %rdi leaq 0xc(%rdi), %rcx cmpq %rsi, %rdi jne 0x1e159 retq
js_get_atom_index: mov rax, [rsi+4] mov rcx, rax shr rcx, 3Eh cmp ecx, 2 jbe short loc_1E143 mov eax, [rsi+0Ch] retn loc_1E143: shr rax, 20h mov ecx, [rdi+50h] dec ecx and ecx, eax shl ecx, 2 add rcx, [rdi+60h] mov rdx, [rdi+68h] loc_1E159: mov eax, [rcx] mov rdi, [rdx+rax*8] lea rcx, [rdi+0Ch] cmp rdi, rsi jnz short loc_1E159 retn
long long js_get_atom_index(long long a1, long long a2) { long long result; // rax unsigned int *v3; // rcx long long v4; // rdx long long v5; // rdi if ( (unsigned int)(*(_QWORD *)(a2 + 4) >> 62) > 2 ) return *(unsigned int *)(a2 + 12); v3 = (unsigned int *)(*(_QWORD *)(a1 + 96) + 4 * ((unsigned int)HIDWORD(*(_QWORD *)(a2 + 4)) & (*(_DWORD *)(a1 + 80) - 1))); v4 = *(_QWORD *)(a1 + 104); do { result = *v3; v5 = *(_QWORD *)(v4 + 8 * result); v3 = (unsigned int *)(v5 + 12); } while ( v5 != a2 ); return result; }
js_get_atom_index: MOV RAX,qword ptr [RSI + 0x4] MOV RCX,RAX SHR RCX,0x3e CMP ECX,0x2 JBE 0x0011e143 MOV EAX,dword ptr [RSI + 0xc] RET LAB_0011e143: SHR RAX,0x20 MOV ECX,dword ptr [RDI + 0x50] DEC ECX AND ECX,EAX SHL ECX,0x2 ADD RCX,qword ptr [RDI + 0x60] MOV RDX,qword ptr [RDI + 0x68] LAB_0011e159: MOV EAX,dword ptr [RCX] MOV RDI,qword ptr [RDX + RAX*0x8] LEA RCX,[RDI + 0xc] CMP RDI,RSI JNZ 0x0011e159 RET
ulong js_get_atom_index(long param_1,long param_2) { uint uVar1; long lVar2; uint *puVar3; uVar1 = (uint)((ulong)*(int8 *)(param_2 + 4) >> 0x20); if (2 < uVar1 >> 0x1e) { return (ulong)*(uint *)(param_2 + 0xc); } puVar3 = (uint *)((ulong)((*(int *)(param_1 + 0x50) - 1U & uVar1) << 2) + *(long *)(param_1 + 0x60)); do { uVar1 = *puVar3; lVar2 = *(long *)(*(long *)(param_1 + 0x68) + (ulong)uVar1 * 8); puVar3 = (uint *)(lVar2 + 0xc); } while (lVar2 != param_2); return (ulong)uVar1; }
46,205
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>::get_binary() const
monkey531[P]llama/common/json.hpp
const binary_t& get_binary() const { if (!is_binary()) { JSON_THROW(type_error::create(302, detail::concat("type must be binary, but is ", type_name()), this)); } return *get_ptr<const binary_t*>(); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::get_binary() const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x8, (%rdi) jne 0x8318b movq 0x8(%r14), %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x24460 movq %rax, %rbx movq %r14, %rdi callq 0x434f0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x33e1f(%rip), %rsi # 0xb6fcc leaq 0x10(%rsp), %rdi callq 0x6355f movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x63472 xorl %ebp, %ebp leaq 0x7ad60(%rip), %rsi # 0xfdf38 leaq -0x4315f(%rip), %rdx # 0x40080 movq %rbx, %rdi callq 0x24ee0 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x251b8 testb %bpl, %bpl jne 0x831fe jmp 0x83206 movq %rax, %r14 movq %rbx, %rdi callq 0x24670 movq %r14, %rdi callq 0x24f60
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10get_binaryEv: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 8 jnz short loc_8318B mov rax, [r14+8] add rsp, 30h pop rbx pop r14 pop rbp retn loc_8318B: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aTypeMustBeBina; "type must be binary, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_831FE jmp short loc_83206 mov r14, rax loc_831FE: mov rdi, rbx; void * call ___cxa_free_exception loc_83206: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::get_binary( long long a1) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v3; // [rsp+8h] [rbp-40h] BYREF _BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 8 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v3 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v4, (long long)"type must be binary, but is ", &v3); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, (long long)v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return *(_QWORD *)(a1 + 8); }
get_binary: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x8 JNZ 0x0018318b MOV RAX,qword ptr [R14 + 0x8] ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_0018318b: PUSH 0x20 POP RDI CALL 0x00124460 MOV RBX,RAX MOV RDI,R14 CALL 0x001434f0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001831a6: LEA RSI,[0x1b6fcc] LEA RDI,[RSP + 0x10] CALL 0x0016355f MOV BPL,0x1 LAB_001831ba: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x00163472 XOR EBP,EBP LEA RSI,[0x1fdf38] LEA RDX,[0x140080] MOV RDI,RBX CALL 0x00124ee0
/* 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>::get_binary() const */ int8 __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> ::get_binary(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) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8) { return *(int8 *)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001831a6 to 001831b6 has its CatchHandler @ 001831fb */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be binary, but is ",&local_40); /* try { // try from 001831ba to 001831e6 has its CatchHandler @ 001831e7 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
46,206
mariadb_server_version_id
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static size_t mariadb_server_version_id(MYSQL *mysql) { size_t major, minor, patch; char *p; if (!(p = mysql->server_version)) { return 0; } major = strtol(p, &p, 10); p += 1; /* consume the dot */ minor = strtol(p, &p, 10); p += 1; /* consume the dot */ patch = strtol(p, &p, 10); return (major * 10000L + (unsigned long)(minor * 100L + patch)); }
O0
c
mariadb_server_version_id: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x2d0(%rax), %rax movq %rax, -0x30(%rbp) cmpq $0x0, %rax jne 0xa8e3b movq $0x0, -0x8(%rbp) jmp 0xa8ead movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x3a8e0 movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x3a8e0 movq %rax, -0x20(%rbp) movq -0x30(%rbp), %rax addq $0x1, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi leaq -0x30(%rbp), %rsi movl $0xa, %edx callq 0x3a8e0 movq %rax, -0x28(%rbp) imulq $0x2710, -0x18(%rbp), %rax # imm = 0x2710 imulq $0x64, -0x20(%rbp), %rcx addq -0x28(%rbp), %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
mariadb_server_version_id: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+2D0h] mov [rbp+var_30], rax cmp rax, 0 jnz short loc_A8E3B mov [rbp+var_8], 0 jmp short loc_A8EAD loc_A8E3B: mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_18], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_20], rax mov rax, [rbp+var_30] add rax, 1 mov [rbp+var_30], rax mov rdi, [rbp+var_30] lea rsi, [rbp+var_30] mov edx, 0Ah call _strtol mov [rbp+var_28], rax imul rax, [rbp+var_18], 2710h imul rcx, [rbp+var_20], 64h ; 'd' add rcx, [rbp+var_28] add rax, rcx mov [rbp+var_8], rax loc_A8EAD: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long mariadb_server_version_id(long long a1) { long long v2; // [rsp+0h] [rbp-30h] BYREF long long v3; // [rsp+8h] [rbp-28h] long long v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] long long v6; // [rsp+20h] [rbp-10h] v6 = a1; v2 = *(_QWORD *)(a1 + 720); if ( !v2 ) return 0LL; v5 = strtol(v2, &v2, 10LL); ++v2; v4 = strtol(v2, &v2, 10LL); ++v2; v3 = strtol(v2, &v2, 10LL); return v3 + 100 * v4 + 10000 * v5; }
mariadb_server_version_id: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2d0] MOV qword ptr [RBP + -0x30],RAX CMP RAX,0x0 JNZ 0x001a8e3b MOV qword ptr [RBP + -0x8],0x0 JMP 0x001a8ead LAB_001a8e3b: MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x0013a8e0 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x0013a8e0 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,0x1 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x30] MOV EDX,0xa CALL 0x0013a8e0 MOV qword ptr [RBP + -0x28],RAX IMUL RAX,qword ptr [RBP + -0x18],0x2710 IMUL RCX,qword ptr [RBP + -0x20],0x64 ADD RCX,qword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_001a8ead: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long mariadb_server_version_id(long param_1) { long lVar1; char *local_38 [2]; long local_28; long local_20; long local_18; long local_10; local_38[0] = *(char **)(param_1 + 0x2d0); if (local_38[0] == (char *)0x0) { local_10 = 0; } else { local_18 = param_1; local_20 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; local_28 = strtol(local_38[0],local_38,10); local_38[0] = local_38[0] + 1; lVar1 = strtol(local_38[0],local_38,10); local_10 = local_20 * 10000 + local_28 * 100 + lVar1; } return local_10; }
46,207
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!left) throw std::runtime_error("BinaryOpExpr.left is null"); if (!right) throw std::runtime_error("BinaryOpExpr.right is null"); auto l = left->evaluate(context); auto do_eval = [&](const Value & l) -> Value { if (op == Op::Is || op == Op::IsNot) { auto t = dynamic_cast<VariableExpr*>(right.get()); if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable"); auto eval = [&]() { const auto & name = t->get_name(); if (name == "none") return l.is_null(); if (name == "boolean") return l.is_boolean(); if (name == "integer") return l.is_number_integer(); if (name == "float") return l.is_number_float(); if (name == "number") return l.is_number(); if (name == "string") return l.is_string(); if (name == "mapping") return l.is_object(); if (name == "iterable") return l.is_iterable(); if (name == "sequence") return l.is_array(); if (name == "defined") return !l.is_null(); throw std::runtime_error("Unknown type for 'is' operator: " + name); }; auto value = eval(); return Value(op == Op::Is ? value : !value); } if (op == Op::And) { if (!l.to_bool()) return Value(false); return right->evaluate(context).to_bool(); } else if (op == Op::Or) { if (l.to_bool()) return l; return right->evaluate(context); } auto r = right->evaluate(context); switch (op) { case Op::StrConcat: return l.to_str() + r.to_str(); case Op::Add: return l + r; case Op::Sub: return l - r; case Op::Mul: return l * r; case Op::Div: return l / r; case Op::MulMul: return std::pow(l.get<double>(), r.get<double>()); case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>(); case Op::Mod: return l.get<int64_t>() % r.get<int64_t>(); case Op::Eq: return l == r; case Op::Ne: return l != r; case Op::Lt: return l < r; case Op::Gt: return l > r; case Op::Le: return l <= r; case Op::Ge: return l >= r; case Op::In: return (r.is_array() || r.is_object()) && r.contains(l); case Op::NotIn: return !(r.is_array() && r.contains(l)); default: break; } throw std::runtime_error("Unknown binary operator"); }; if (l.is_callable()) { return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) { auto ll = l.call(context, args); return do_eval(ll); //args[0].second); }); } else { return do_eval(l); } }
O1
cpp
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x7b1ad cmpq $0x0, 0x30(%r15) je 0x7b1cb movq %rdx, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r12 movq %r12, %rdi callq 0x6c37a movq %r15, 0x8(%rsp) movq %r14, 0x10(%rsp) cmpq $0x0, 0x30(%r12) je 0x7b0f9 leaq 0x88(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x72f12 movups 0x8(%rsp), %xmm0 leaq 0x88(%rsp), %rsi movups %xmm0, 0x50(%rsi) leaq 0x18(%rsp), %rdi callq 0x7b370 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x7b304 movq 0x28(%rsp), %rax testq %rax, %rax je 0x7b089 leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0xc8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x28fd0 movq %r14, %rdi callq 0x2e790 movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x7b0b1 callq 0x42d00 movq 0xb0(%rsp), %rdi testq %rdi, %rdi je 0x7b0c3 callq 0x42d00 movq 0xa0(%rsp), %rdi testq %rdi, %rdi je 0x7b0d5 callq 0x42d00 movq 0x90(%rsp), %rdi testq %rdi, %rdi je 0x7b122 movq 0x73ea7(%rip), %rax # 0xeef90 cmpb $0x0, (%rax) je 0x7b10d movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x7b117 leaq 0x8(%rsp), %rsi leaq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x7b45a jmp 0x7b122 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x7b122 movq (%rdi), %rax callq *0x18(%rax) leaq 0x78(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x28fd0 movq %r14, %rdi callq 0x2e790 movq -0x8(%r14), %rdi testq %rdi, %rdi je 0x7b147 callq 0x42d00 movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x7b156 callq 0x42d00 movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x7b165 callq 0x42d00 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x7b19b movq 0x73e1a(%rip), %rax # 0xeef90 cmpb $0x0, (%rax) je 0x7b186 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x7b190 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x7b19b movq (%rdi), %rax callq *0x18(%rax) movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x10, %edi callq 0x19370 movq %rax, %r14 leaq 0x43861(%rip), %rsi # 0xbea22 movq %rax, %rdi callq 0x19270 jmp 0x7b1e7 movl $0x10, %edi callq 0x19370 movq %rax, %r14 leaq 0x4385d(%rip), %rsi # 0xbea3c movq %rax, %rdi callq 0x19270 movq 0x73dfa(%rip), %rsi # 0xeefe8 movq 0x73d73(%rip), %rdx # 0xeef68 movq %r14, %rdi callq 0x19b70 jmp 0x7b248 jmp 0x7b22e jmp 0x7b203 movq %rax, %rbx movq %r14, %rdi callq 0x19510 jmp 0x7b255 movq %rax, %rbx movq 0x28(%rsp), %rax testq %rax, %rax je 0x7b239 leaq 0x18(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x7b239 movq %rax, %rdi callq 0x28537 movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x7b3ce jmp 0x7b24b movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x6c670 movq %rbx, %rdi callq 0x19be0 nop
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 0E8h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_7B1AD cmp qword ptr [r15+30h], 0 jz loc_7B1CB mov r14, rdx mov rbx, rdi lea r12, [rsp+108h+var_D0] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov qword ptr [rsp+108h+var_100], r15 mov qword ptr [rsp+108h+var_100+8], r14 cmp qword ptr [r12+30h], 0 jz loc_7B0F9 lea rdi, [rsp+108h+var_80]; this lea rsi, [rsp+108h+var_D0]; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) movups xmm0, [rsp+108h+var_100] lea rsi, [rsp+108h+var_80] movups xmmword ptr [rsi+50h], xmm0 lea rdi, [rsp+108h+var_F0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&) lea rsi, [rsp+108h+var_F0] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) mov rax, [rsp+108h+var_E0] test rax, rax jz short loc_7B089 lea rdi, [rsp+108h+var_F0] mov rsi, rdi mov edx, 3 call rax loc_7B089: lea r14, [rsp+108h+var_40] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_7B0B1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7B0B1: mov rdi, [rsp+108h+var_58] test rdi, rdi jz short loc_7B0C3 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7B0C3: mov rdi, [rsp+108h+var_68] test rdi, rdi jz short loc_7B0D5 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7B0D5: mov rdi, [rsp+108h+var_78] test rdi, rdi jz short loc_7B122 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_7B10D mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_7B117 loc_7B0F9: lea rsi, [rsp+108h+var_100] lea rdx, [rsp+108h+var_D0] mov rdi, rbx; this call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&) jmp short loc_7B122 loc_7B10D: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_7B117: cmp eax, 1 jnz short loc_7B122 mov rax, [rdi] call qword ptr [rax+18h] loc_7B122: lea r14, [rsp+108h+var_90] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [r14-8] test rdi, rdi jz short loc_7B147 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7B147: mov rdi, [rsp+108h+var_A8] test rdi, rdi jz short loc_7B156 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7B156: mov rdi, [rsp+108h+var_B8] test rdi, rdi jz short loc_7B165 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7B165: mov rdi, [rsp+108h+var_C8] test rdi, rdi jz short loc_7B19B mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_7B186 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_7B190 loc_7B186: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_7B190: cmp eax, 1 jnz short loc_7B19B mov rax, [rdi] call qword ptr [rax+18h] loc_7B19B: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r14 pop r15 retn loc_7B1AD: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_7B1E7 loc_7B1CB: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_7B1E7: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_7B248 jmp short loc_7B22E jmp short $+2 loc_7B203: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_7B255 mov rbx, rax mov rax, [rsp+108h+var_E0] test rax, rax jz short loc_7B239 lea rdi, [rsp+108h+var_F0] mov rsi, rdi mov edx, 3 call rax jmp short loc_7B239 loc_7B22E: mov rdi, rax call __clang_call_terminate mov rbx, rax loc_7B239: lea rdi, [rsp+108h+var_80] call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENUlS5_RNS_14ArgumentsValueEE_D2Ev; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}::~ArgumentsValue() jmp short loc_7B24B loc_7B248: mov rbx, rax loc_7B24B: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_7B255: mov rdi, rbx call __Unwind_Resume
minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3) { void (***v4)(void); // rsi int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // rdi signed __int32 v12; // eax long long v13; // rdi signed __int32 v14; // eax std::runtime_error *exception; // r14 __int128 v17; // [rsp+8h] [rbp-100h] _BYTE v18[16]; // [rsp+18h] [rbp-F0h] BYREF void ( *v19)(_BYTE *, _BYTE *, long long); // [rsp+28h] [rbp-E0h] _BYTE v20[8]; // [rsp+38h] [rbp-D0h] BYREF long long v21; // [rsp+40h] [rbp-C8h] volatile signed __int32 *v22; // [rsp+50h] [rbp-B8h] volatile signed __int32 *v23; // [rsp+60h] [rbp-A8h] long long v24; // [rsp+68h] [rbp-A0h] volatile signed __int32 *v25; // [rsp+70h] [rbp-98h] char v26[16]; // [rsp+78h] [rbp-90h] BYREF _BYTE v27[8]; // [rsp+88h] [rbp-80h] BYREF long long v28; // [rsp+90h] [rbp-78h] volatile signed __int32 *v29; // [rsp+A0h] [rbp-68h] volatile signed __int32 *v30; // [rsp+B0h] [rbp-58h] volatile signed __int32 *v31; // [rsp+C0h] [rbp-48h] char v32[16]; // [rsp+C8h] [rbp-40h] BYREF __int128 v33; // [rsp+D8h] [rbp-30h] v4 = *(void (****)(void))(a2 + 32); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null"); goto LABEL_34; } if ( !*(_QWORD *)(a2 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null"); LABEL_34: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v20, v4); *(_QWORD *)&v17 = a2; *((_QWORD *)&v17 + 1) = a3; if ( v24 ) { minja::Value::Value((minja::Value *)v27, (const minja::Value *)v20); v33 = v17; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v18); minja::Value::callable((_DWORD)this, (unsigned int)v18, v7, v8, v9, v10); if ( v19 ) v19(v18, v18, 3LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v32); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v32); if ( v31 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v31); if ( v30 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v30); if ( v29 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v29); v11 = v28; if ( v28 ) { if ( _libc_single_threaded ) { v12 = *(_DWORD *)(v28 + 12); *(_DWORD *)(v28 + 12) = v12 - 1; } else { v12 = _InterlockedExchangeAdd((volatile signed __int32 *)(v28 + 12), 0xFFFFFFFF); } if ( v12 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v11 + 24LL))(v11, 0LL); } } else { minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this); } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v26); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v26); if ( v25 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v25); if ( v23 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v23); if ( v22 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v22); v13 = v21; if ( v21 ) { if ( _libc_single_threaded ) { v14 = *(_DWORD *)(v21 + 12); *(_DWORD *)(v21 + 12) = v14 - 1; } else { v14 = _InterlockedExchangeAdd((volatile signed __int32 *)(v21 + 12), 0xFFFFFFFF); } if ( v14 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v13 + 24LL))(v13, 0LL); } return this; }
do_evaluate: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x0017b1ad CMP qword ptr [R15 + 0x30],0x0 JZ 0x0017b1cb MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x38] MOV RDI,R12 CALL 0x0016c37a MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],R14 CMP qword ptr [R12 + 0x30],0x0 JZ 0x0017b0f9 LAB_0017b036: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x38] CALL 0x00172f12 MOVUPS XMM0,xmmword ptr [RSP + 0x8] LEA RSI,[RSP + 0x88] MOVUPS xmmword ptr [RSI + 0x50],XMM0 LAB_0017b059: LEA RDI,[RSP + 0x18] CALL 0x0017b370 LAB_0017b063: LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x0017b304 MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x0017b089 LAB_0017b07a: LEA RDI,[RSP + 0x18] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0017b089: LEA R14,[RSP + 0xc8] MOV RDI,R14 XOR ESI,ESI CALL 0x00128fd0 MOV RDI,R14 CALL 0x0012e790 MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x0017b0b1 CALL 0x00142d00 LAB_0017b0b1: MOV RDI,qword ptr [RSP + 0xb0] TEST RDI,RDI JZ 0x0017b0c3 CALL 0x00142d00 LAB_0017b0c3: MOV RDI,qword ptr [RSP + 0xa0] TEST RDI,RDI JZ 0x0017b0d5 CALL 0x00142d00 LAB_0017b0d5: MOV RDI,qword ptr [RSP + 0x90] TEST RDI,RDI JZ 0x0017b122 MOV RAX,qword ptr [0x001eef90] CMP byte ptr [RAX],0x0 JZ 0x0017b10d MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0017b117 LAB_0017b0f9: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x38] MOV RDI,RBX CALL 0x0017b45a LAB_0017b10b: JMP 0x0017b122 LAB_0017b10d: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0017b117: CMP EAX,0x1 JNZ 0x0017b122 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0017b122: LEA R14,[RSP + 0x78] MOV RDI,R14 XOR ESI,ESI CALL 0x00128fd0 MOV RDI,R14 CALL 0x0012e790 MOV RDI,qword ptr [R14 + -0x8] TEST RDI,RDI JZ 0x0017b147 CALL 0x00142d00 LAB_0017b147: MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x0017b156 CALL 0x00142d00 LAB_0017b156: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x0017b165 CALL 0x00142d00 LAB_0017b165: MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0017b19b MOV RAX,qword ptr [0x001eef90] CMP byte ptr [RAX],0x0 JZ 0x0017b186 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0017b190 LAB_0017b186: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0017b190: CMP EAX,0x1 JNZ 0x0017b19b MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0017b19b: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R14 POP R15 RET LAB_0017b1ad: MOV EDI,0x10 CALL 0x00119370 MOV R14,RAX LAB_0017b1ba: LEA RSI,[0x1bea22] MOV RDI,RAX CALL 0x00119270 LAB_0017b1c9: JMP 0x0017b1e7 LAB_0017b1cb: MOV EDI,0x10 CALL 0x00119370 MOV R14,RAX LAB_0017b1d8: LEA RSI,[0x1bea3c] MOV RDI,RAX CALL 0x00119270 LAB_0017b1e7: MOV RSI,qword ptr [0x001eefe8] MOV RDX,qword ptr [0x001eef68] MOV RDI,R14 CALL 0x00119b70
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1) { int *piVar1; int iVar2; runtime_error *this; int8 in_RDX; long in_RSI; long local_100; int8 uStack_f8; _lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [16]; code *local_e0; Expression local_d0 [8]; long *local_c8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_b8; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_a8; long local_a0; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_98; data local_90 [16]; Value local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; long local_30; int8 uStack_28; if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017b1ba to 0017b1c8 has its CatchHandler @ 0017b203 */ std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null"); } else { if (*(long *)(in_RSI + 0x30) != 0) { Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20)); if (local_a0 == 0) { /* try { // try from 0017b0f9 to 0017b10a has its CatchHandler @ 0017b1fd */ const::{lambda(minja::Value_const&)#1}::operator() ((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100); } else { /* try { // try from 0017b036 to 0017b047 has its CatchHandler @ 0017b248 */ local_100 = in_RSI; uStack_f8 = in_RDX; Value::Value(local_80,(Value *)local_d0); local_30 = local_100; uStack_28 = uStack_f8; /* try { // try from 0017b059 to 0017b062 has its CatchHandler @ 0017b236 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void> (local_f0); /* try { // try from 0017b063 to 0017b06f has its CatchHandler @ 0017b210 */ Value::callable((Value *)param_1,local_f0); if (local_e0 != (code *)0x0) { /* try { // try from 0017b07a to 0017b088 has its CatchHandler @ 0017b1ff */ (*local_e0)(local_f0,local_f0,3); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001eef90 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_78 + 0x18))(); } } } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_90,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_90); if (local_98 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_98); } if (local_a8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_a8); } if (local_b8 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_b8); } if (local_c8 != (long *)0x0) { if (*PTR___libc_single_threaded_001eef90 == '\0') { LOCK(); piVar1 = (int *)((long)local_c8 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_c8 + 0xc); *(int *)((long)local_c8 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_c8 + 0x18))(); } } return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017b1d8 to 0017b1e6 has its CatchHandler @ 0017b201 */ std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001eefe8,PTR__runtime_error_001eef68); }
46,208
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!left) throw std::runtime_error("BinaryOpExpr.left is null"); if (!right) throw std::runtime_error("BinaryOpExpr.right is null"); auto l = left->evaluate(context); auto do_eval = [&](const Value & l) -> Value { if (op == Op::Is || op == Op::IsNot) { auto t = dynamic_cast<VariableExpr*>(right.get()); if (!t) throw std::runtime_error("Right side of 'is' operator must be a variable"); auto eval = [&]() { const auto & name = t->get_name(); if (name == "none") return l.is_null(); if (name == "boolean") return l.is_boolean(); if (name == "integer") return l.is_number_integer(); if (name == "float") return l.is_number_float(); if (name == "number") return l.is_number(); if (name == "string") return l.is_string(); if (name == "mapping") return l.is_object(); if (name == "iterable") return l.is_iterable(); if (name == "sequence") return l.is_array(); if (name == "defined") return !l.is_null(); throw std::runtime_error("Unknown type for 'is' operator: " + name); }; auto value = eval(); return Value(op == Op::Is ? value : !value); } if (op == Op::And) { if (!l.to_bool()) return Value(false); return right->evaluate(context).to_bool(); } else if (op == Op::Or) { if (l.to_bool()) return l; return right->evaluate(context); } auto r = right->evaluate(context); switch (op) { case Op::StrConcat: return l.to_str() + r.to_str(); case Op::Add: return l + r; case Op::Sub: return l - r; case Op::Mul: return l * r; case Op::Div: return l / r; case Op::MulMul: return std::pow(l.get<double>(), r.get<double>()); case Op::DivDiv: return l.get<int64_t>() / r.get<int64_t>(); case Op::Mod: return l.get<int64_t>() % r.get<int64_t>(); case Op::Eq: return l == r; case Op::Ne: return l != r; case Op::Lt: return l < r; case Op::Gt: return l > r; case Op::Le: return l <= r; case Op::Ge: return l >= r; case Op::In: return (r.is_array() || r.is_object()) && r.contains(l); case Op::NotIn: return !(r.is_array() && r.contains(l)); default: break; } throw std::runtime_error("Unknown binary operator"); }; if (l.is_callable()) { return Value::callable([l, do_eval](const std::shared_ptr<Context> & context, ArgumentsValue & args) { auto ll = l.call(context, args); return do_eval(ll); //args[0].second); }); } else { return do_eval(l); } }
O2
cpp
minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x6b869 cmpq $0x0, 0x30(%r15) je 0x6b885 movq %rdx, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r12 movq %r12, %rdi callq 0x5fa48 movq %r15, 0x8(%rsp) movq %r14, 0x10(%rsp) cmpq $0x0, 0x30(%r12) je 0x6b83b leaq 0x88(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x649a0 movups 0x8(%rsp), %xmm0 leaq 0x88(%rsp), %rsi movups %xmm0, 0x50(%rsi) leaq 0x18(%rsp), %rdi callq 0x6b98c leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x6b940 leaq 0x18(%rsp), %rdi callq 0x2a646 leaq 0x88(%rsp), %rdi callq 0x5fcd8 jmp 0x6b84d leaq 0x8(%rsp), %rsi leaq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x6b9d4 leaq 0x38(%rsp), %rdi callq 0x5fcd8 movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x213a0 movq %rax, %r14 leaq 0x321e7(%rip), %rsi # 0x9da62 movq %rax, %rdi callq 0x21280 jmp 0x6b89f pushq $0x10 popq %rdi callq 0x213a0 movq %rax, %r14 leaq 0x321e5(%rip), %rsi # 0x9da7c movq %rax, %rdi callq 0x21280 movq 0x70742(%rip), %rsi # 0xdbfe8 movq 0x706bb(%rip), %rdx # 0xdbf68 movq %r14, %rdi callq 0x21b70 jmp 0x6b8e7 jmp 0x6b8b9 movq %rax, %rbx movq %r14, %rdi callq 0x21530 jmp 0x6b8f4 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x2a646 jmp 0x6b8d8 movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x5fcd8 jmp 0x6b8ea movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x5fcd8 movq %rbx, %rdi callq 0x21be0
_ZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 0E8h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_6B869 cmp qword ptr [r15+30h], 0 jz loc_6B885 mov r14, rdx mov rbx, rdi lea r12, [rsp+108h+var_D0] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov qword ptr [rsp+108h+var_100], r15 mov qword ptr [rsp+108h+var_100+8], r14 cmp qword ptr [r12+30h], 0 jz short loc_6B83B lea rdi, [rsp+108h+var_80]; this lea rsi, [rsp+108h+var_D0]; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) movups xmm0, [rsp+108h+var_100] lea rsi, [rsp+108h+var_80] movups xmmword ptr [rsi+50h], xmm0 lea rdi, [rsp+108h+var_F0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNKS0_12BinaryOpExpr11do_evaluateES6_EUlS6_S8_E_vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1} &&) lea rsi, [rsp+108h+var_F0] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) lea rdi, [rsp+108h+var_F0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+108h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_6B84D loc_6B83B: lea rsi, [rsp+108h+var_100] lea rdx, [rsp+108h+var_D0] mov rdi, rbx; this call _ZZNK5minja12BinaryOpExpr11do_evaluateERKSt10shared_ptrINS_7ContextEEENKUlRKNS_5ValueEE_clES8_; minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(minja::Value const&)#1}::operator()(minja::Value const&) loc_6B84D: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r14 pop r15 retn loc_6B869: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprLe; "BinaryOpExpr.left is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_6B89F loc_6B885: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aBinaryopexprRi; "BinaryOpExpr.right is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_6B89F: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_6B8E7 jmp short $+2 loc_6B8B9: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_6B8F4 mov rbx, rax lea rdi, [rsp+108h+var_F0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_6B8D8 mov rbx, rax loc_6B8D8: lea rdi, [rsp+108h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_6B8EA loc_6B8E7: mov rbx, rax loc_6B8EA: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6B8F4: mov rdi, rbx call __Unwind_Resume
minja::Value * minja::BinaryOpExpr::do_evaluate(minja::Value *this, long long a2, long long a3) { void (***v4)(void); // rsi int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d std::runtime_error *exception; // r14 __int128 v12; // [rsp+8h] [rbp-100h] _BYTE v13[32]; // [rsp+18h] [rbp-F0h] BYREF _BYTE v14[48]; // [rsp+38h] [rbp-D0h] BYREF long long v15; // [rsp+68h] [rbp-A0h] _BYTE v16[80]; // [rsp+88h] [rbp-80h] BYREF __int128 v17; // [rsp+D8h] [rbp-30h] v4 = *(void (****)(void))(a2 + 32); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.left is null"); goto LABEL_9; } if ( !*(_QWORD *)(a2 + 48) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "BinaryOpExpr.right is null"); LABEL_9: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v14, v4); *(_QWORD *)&v12 = a2; *((_QWORD *)&v12 + 1) = a3; if ( v15 ) { minja::Value::Value((minja::Value *)v16, (const minja::Value *)v14); v17 = v12; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1},void>(v13); minja::Value::callable((_DWORD)this, (unsigned int)v13, v6, v7, v8, v9); std::_Function_base::~_Function_base((std::_Function_base *)v13); minja::Value::~Value((minja::Value *)v16); } else { minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&)const::{lambda(minja::Value const&)#1}::operator()(this); } minja::Value::~Value((minja::Value *)v14); return this; }
do_evaluate: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x0016b869 CMP qword ptr [R15 + 0x30],0x0 JZ 0x0016b885 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x38] MOV RDI,R12 CALL 0x0015fa48 MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],R14 CMP qword ptr [R12 + 0x30],0x0 JZ 0x0016b83b LAB_0016b7e8: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x38] CALL 0x001649a0 MOVUPS XMM0,xmmword ptr [RSP + 0x8] LEA RSI,[RSP + 0x88] MOVUPS xmmword ptr [RSI + 0x50],XMM0 LAB_0016b80b: LEA RDI,[RSP + 0x18] CALL 0x0016b98c LAB_0016b815: LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x0016b940 LEA RDI,[RSP + 0x18] CALL 0x0012a646 LEA RDI,[RSP + 0x88] CALL 0x0015fcd8 JMP 0x0016b84d LAB_0016b83b: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x38] MOV RDI,RBX CALL 0x0016b9d4 LAB_0016b84d: LEA RDI,[RSP + 0x38] CALL 0x0015fcd8 MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R14 POP R15 RET LAB_0016b869: PUSH 0x10 POP RDI CALL 0x001213a0 MOV R14,RAX LAB_0016b874: LEA RSI,[0x19da62] MOV RDI,RAX CALL 0x00121280 LAB_0016b883: JMP 0x0016b89f LAB_0016b885: PUSH 0x10 POP RDI CALL 0x001213a0 MOV R14,RAX LAB_0016b890: LEA RSI,[0x19da7c] MOV RDI,RAX CALL 0x00121280 LAB_0016b89f: MOV RSI,qword ptr [0x001dbfe8] MOV RDX,qword ptr [0x001dbf68] MOV RDI,R14 CALL 0x00121b70
/* minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ shared_ptr * minja::BinaryOpExpr::do_evaluate(shared_ptr *param_1) { runtime_error *this; int8 in_RDX; long in_RSI; long local_100; int8 uStack_f8; _lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ local_f0 [32]; Expression local_d0 [48]; long local_a0; Value local_80 [80]; long local_30; int8 uStack_28; if (*(shared_ptr **)(in_RSI + 0x20) == (shared_ptr *)0x0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016b874 to 0016b882 has its CatchHandler @ 0016b8b9 */ std::runtime_error::runtime_error(this,"BinaryOpExpr.left is null"); } else { if (*(long *)(in_RSI + 0x30) != 0) { Expression::evaluate(local_d0,*(shared_ptr **)(in_RSI + 0x20)); if (local_a0 == 0) { /* try { // try from 0016b83b to 0016b84c has its CatchHandler @ 0016b8b5 */ const::{lambda(minja::Value_const&)#1}::operator() ((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100); } else { /* try { // try from 0016b7e8 to 0016b7f9 has its CatchHandler @ 0016b8e7 */ local_100 = in_RSI; uStack_f8 = in_RDX; Value::Value(local_80,(Value *)local_d0); local_30 = local_100; uStack_28 = uStack_f8; /* try { // try from 0016b80b to 0016b814 has its CatchHandler @ 0016b8d5 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: function<minja::BinaryOpExpr::do_evaluate(std::shared_ptr<minja::Context>const&)const::_lambda(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)_1_,void> (local_f0); /* try { // try from 0016b815 to 0016b821 has its CatchHandler @ 0016b8c6 */ Value::callable(param_1); std::_Function_base::~_Function_base((_Function_base *)local_f0); Value::~Value(local_80); } Value::~Value((Value *)local_d0); return param_1; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016b890 to 0016b89e has its CatchHandler @ 0016b8b7 */ std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001dbfe8,PTR__runtime_error_001dbf68); }
46,209
mi_pack_get_block_info
eloqsql/storage/myisam/mi_packrec.c
uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, MI_BLOCK_INFO *info, uchar **rec_buff_p, File file, my_off_t filepos) { uchar *header=info->header; uint head_length, UNINIT_VAR(ref_length); if (file >= 0) { ref_length=myisam->s->pack.ref_length; /* We can't use mysql_file_pread() here because mi_read_rnd_pack_record assumes position is ok */ mysql_file_seek(file, filepos, MY_SEEK_SET, MYF(0)); if (mysql_file_read(file, header, ref_length, MYF(MY_NABP))) return BLOCK_FATAL_ERROR; DBUG_DUMP("header",(uchar*) header,ref_length); } head_length= read_pack_length((uint) myisam->s->pack.version, header, &info->rec_len); if (myisam->s->base.blobs) { head_length+= read_pack_length((uint) myisam->s->pack.version, header + head_length, &info->blob_len); /* Ensure that the record buffer is big enough for the compressed record plus all expanded blobs. [We do not have an extra buffer for the resulting blobs. Sigh.] */ if (!(mi_alloc_rec_buff(myisam,info->rec_len + info->blob_len, rec_buff_p))) return BLOCK_FATAL_ERROR; /* not enough memory */ bit_buff->blob_pos= (uchar*) *rec_buff_p + info->rec_len; bit_buff->blob_end= bit_buff->blob_pos + info->blob_len; myisam->blob_length=info->blob_len; } info->filepos=filepos+head_length; if (file > 0) { info->offset=MY_MIN(info->rec_len, ref_length - head_length); memcpy(*rec_buff_p, header + head_length, info->offset); } return 0; }
O0
c
mi_pack_get_block_info: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movq %r9, -0x38(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movl -0x48(%rbp), %eax movl %eax, -0x48(%rbp) cmpl $0x0, -0x2c(%rbp) jl 0xbb2b0 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x240(%rax), %eax movl %eax, -0x48(%rbp) movl -0x2c(%rbp), %edx movq -0x38(%rbp), %rcx leaq 0x98781(%rip), %rdi # 0x1539e3 movl $0x565, %esi # imm = 0x565 xorl %r8d, %r8d xorl %eax, %eax movl %eax, %r9d callq 0xbb7c0 movl -0x2c(%rbp), %edx movq -0x40(%rbp), %rcx movl -0x48(%rbp), %eax movl %eax, %r8d leaq 0x9875b(%rip), %rdi # 0x1539e3 movl $0x566, %esi # imm = 0x566 movl $0x4, %r9d callq 0xba680 cmpq $0x0, %rax je 0xbb2aa movl $0x20, -0x4(%rbp) jmp 0xbb3fc jmp 0xbb2ac jmp 0xbb2ae jmp 0xbb2b0 movq -0x10(%rbp), %rax movq (%rax), %rax movzbl 0x244(%rax), %edi movq -0x40(%rbp), %rsi movq -0x20(%rbp), %rdx addq $0x18, %rdx callq 0xbb8b0 movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x188(%rax) je 0xbb382 movq -0x10(%rbp), %rax movq (%rax), %rax movzbl 0x244(%rax), %edi movq -0x40(%rbp), %rsi movl -0x44(%rbp), %eax addq %rax, %rsi movq -0x20(%rbp), %rdx addq $0x30, %rdx callq 0xbb8b0 addl -0x44(%rbp), %eax movl %eax, -0x44(%rbp) movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x18(%rax), %rsi movq -0x20(%rbp), %rax addq 0x30(%rax), %rsi movq -0x28(%rbp), %rdx callq 0xb6af0 cmpq $0x0, %rax jne 0xbb340 movl $0x20, -0x4(%rbp) jmp 0xbb3fc movq -0x28(%rbp), %rax movq (%rax), %rcx movq -0x20(%rbp), %rax addq 0x18(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax movq 0x18(%rax), %rcx movq -0x20(%rbp), %rax addq 0x30(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x20(%rbp), %rax movq 0x30(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x1b8(%rax) movq -0x38(%rbp), %rcx movl -0x44(%rbp), %eax addq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x38(%rax) cmpl $0x0, -0x2c(%rbp) jle 0xbb3f5 movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movl -0x48(%rbp), %ecx subl -0x44(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jae 0xbb3bd movq -0x20(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x50(%rbp) jmp 0xbb3c9 movl -0x48(%rbp), %eax subl -0x44(%rbp), %eax movl %eax, %eax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax movl %eax, %ecx movq -0x20(%rbp), %rax movl %ecx, 0x54(%rax) movq -0x28(%rbp), %rax movq (%rax), %rdi movq -0x40(%rbp), %rsi movl -0x44(%rbp), %eax addq %rax, %rsi movq -0x20(%rbp), %rax movl 0x54(%rax), %eax movl %eax, %edx callq 0x2a090 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_pack_get_block_info: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov [rbp+var_38], r9 mov rax, [rbp+var_20] mov [rbp+var_40], rax mov eax, [rbp+var_48] mov [rbp+var_48], eax cmp [rbp+var_2C], 0 jl short loc_BB2B0 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+240h] mov [rbp+var_48], eax mov edx, [rbp+var_2C] mov rcx, [rbp+var_38] lea rdi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 565h xor r8d, r8d xor eax, eax mov r9d, eax call inline_mysql_file_seek_5 mov edx, [rbp+var_2C] mov rcx, [rbp+var_40] mov eax, [rbp+var_48] mov r8d, eax lea rdi, aWorkspaceLlm4b_30; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 566h mov r9d, 4 call inline_mysql_file_read_3 cmp rax, 0 jz short loc_BB2AA mov [rbp+var_4], 20h ; ' ' jmp loc_BB3FC loc_BB2AA: jmp short $+2 loc_BB2AC: jmp short $+2 loc_BB2AE: jmp short $+2 loc_BB2B0: mov rax, [rbp+var_10] mov rax, [rax] movzx edi, byte ptr [rax+244h] mov rsi, [rbp+var_40] mov rdx, [rbp+var_20] add rdx, 18h call read_pack_length_0 mov [rbp+var_44], eax mov rax, [rbp+var_10] mov rax, [rax] cmp dword ptr [rax+188h], 0 jz loc_BB382 mov rax, [rbp+var_10] mov rax, [rax] movzx edi, byte ptr [rax+244h] mov rsi, [rbp+var_40] mov eax, [rbp+var_44] add rsi, rax mov rdx, [rbp+var_20] add rdx, 30h ; '0' call read_pack_length_0 add eax, [rbp+var_44] mov [rbp+var_44], eax mov rdi, [rbp+var_10] mov rax, [rbp+var_20] mov rsi, [rax+18h] mov rax, [rbp+var_20] add rsi, [rax+30h] mov rdx, [rbp+var_28] call mi_alloc_rec_buff cmp rax, 0 jnz short loc_BB340 mov [rbp+var_4], 20h ; ' ' jmp loc_BB3FC loc_BB340: mov rax, [rbp+var_28] mov rcx, [rax] mov rax, [rbp+var_20] add rcx, [rax+18h] mov rax, [rbp+var_18] mov [rax+18h], rcx mov rax, [rbp+var_18] mov rcx, [rax+18h] mov rax, [rbp+var_20] add rcx, [rax+30h] mov rax, [rbp+var_18] mov [rax+20h], rcx mov rax, [rbp+var_20] mov rcx, [rax+30h] mov rax, [rbp+var_10] mov [rax+1B8h], rcx loc_BB382: mov rcx, [rbp+var_38] mov eax, [rbp+var_44] add rcx, rax mov rax, [rbp+var_20] mov [rax+38h], rcx cmp [rbp+var_2C], 0 jle short loc_BB3F5 mov rax, [rbp+var_20] mov rax, [rax+18h] mov ecx, [rbp+var_48] sub ecx, [rbp+var_44] mov ecx, ecx cmp rax, rcx jnb short loc_BB3BD mov rax, [rbp+var_20] mov rax, [rax+18h] mov [rbp+var_50], rax jmp short loc_BB3C9 loc_BB3BD: mov eax, [rbp+var_48] sub eax, [rbp+var_44] mov eax, eax mov [rbp+var_50], rax loc_BB3C9: mov rax, [rbp+var_50] mov ecx, eax mov rax, [rbp+var_20] mov [rax+54h], ecx mov rax, [rbp+var_28] mov rdi, [rax] mov rsi, [rbp+var_40] mov eax, [rbp+var_44] add rsi, rax mov rax, [rbp+var_20] mov eax, [rax+54h] mov edx, eax call _memcpy loc_BB3F5: mov [rbp+var_4], 0 loc_BB3FC: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long mi_pack_get_block_info(_QWORD *a1, long long a2, long long a3, long long *a4, signed int a5, long long a6) { long long v7; // [rsp+0h] [rbp-50h] unsigned int v8; // [rsp+8h] [rbp-48h] unsigned int pack_length_0; // [rsp+Ch] [rbp-44h] if ( a5 >= 0 && (v8 = *(_DWORD *)(*a1 + 576LL), inline_mysql_file_seek_5( "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 1381LL, (unsigned int)a5, a6, 0LL, 0LL), inline_mysql_file_read_3( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x566u, a5, a3, v8, 4LL)) ) { return 32; } else { pack_length_0 = read_pack_length_0(*(unsigned __int8 *)(*a1 + 580LL), a3, a3 + 24); if ( *(_DWORD *)(*a1 + 392LL) ) { pack_length_0 += read_pack_length_0(*(unsigned __int8 *)(*a1 + 580LL), pack_length_0 + a3, a3 + 48); if ( !mi_alloc_rec_buff((long long)a1, *(_QWORD *)(a3 + 48) + *(_QWORD *)(a3 + 24), a4) ) return 32; *(_QWORD *)(a2 + 24) = *(_QWORD *)(a3 + 24) + *a4; *(_QWORD *)(a2 + 32) = *(_QWORD *)(a3 + 48) + *(_QWORD *)(a2 + 24); a1[55] = *(_QWORD *)(a3 + 48); } *(_QWORD *)(a3 + 56) = pack_length_0 + a6; if ( a5 > 0 ) { if ( *(_QWORD *)(a3 + 24) >= (unsigned long long)(v8 - pack_length_0) ) LODWORD(v7) = v8 - pack_length_0; else v7 = *(_QWORD *)(a3 + 24); *(_DWORD *)(a3 + 84) = v7; memcpy(*a4, pack_length_0 + a3, *(unsigned int *)(a3 + 84)); } return 0; } }
_mi_pack_get_block_info: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV dword ptr [RBP + -0x2c],R8D MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x48],EAX CMP dword ptr [RBP + -0x2c],0x0 JL 0x001bb2b0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x240] MOV dword ptr [RBP + -0x48],EAX MOV EDX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x38] LEA RDI,[0x2539e3] MOV ESI,0x565 XOR R8D,R8D XOR EAX,EAX MOV R9D,EAX CALL 0x001bb7c0 MOV EDX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x48] MOV R8D,EAX LEA RDI,[0x2539e3] MOV ESI,0x566 MOV R9D,0x4 CALL 0x001ba680 CMP RAX,0x0 JZ 0x001bb2aa MOV dword ptr [RBP + -0x4],0x20 JMP 0x001bb3fc LAB_001bb2aa: JMP 0x001bb2ac LAB_001bb2ac: JMP 0x001bb2ae LAB_001bb2ae: JMP 0x001bb2b0 LAB_001bb2b0: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVZX EDI,byte ptr [RAX + 0x244] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x20] ADD RDX,0x18 CALL 0x001bb8b0 MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x188],0x0 JZ 0x001bb382 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVZX EDI,byte ptr [RAX + 0x244] MOV RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x44] ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x20] ADD RDX,0x30 CALL 0x001bb8b0 ADD EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x44],EAX MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x20] ADD RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RBP + -0x28] CALL 0x001b6af0 CMP RAX,0x0 JNZ 0x001bb340 MOV dword ptr [RBP + -0x4],0x20 JMP 0x001bb3fc LAB_001bb340: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x20] ADD RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x1b8],RCX LAB_001bb382: MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x44] ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x38],RCX CMP dword ptr [RBP + -0x2c],0x0 JLE 0x001bb3f5 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x48] SUB ECX,dword ptr [RBP + -0x44] MOV ECX,ECX CMP RAX,RCX JNC 0x001bb3bd MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x50],RAX JMP 0x001bb3c9 LAB_001bb3bd: MOV EAX,dword ptr [RBP + -0x48] SUB EAX,dword ptr [RBP + -0x44] MOV EAX,EAX MOV qword ptr [RBP + -0x50],RAX LAB_001bb3c9: MOV RAX,qword ptr [RBP + -0x50] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x54],ECX MOV RAX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x44] ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0x54] MOV EDX,EAX CALL 0x0012a090 LAB_001bb3f5: MOV dword ptr [RBP + -0x4],0x0 LAB_001bb3fc: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 _mi_pack_get_block_info (long *param_1,long param_2,long param_3,long *param_4,int param_5,long param_6) { int iVar1; long lVar2; int local_58; int local_50; uint local_4c; if (-1 < param_5) { local_50 = *(int *)(*param_1 + 0x240); inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x565,param_5, param_6,0,0); lVar2 = inline_mysql_file_read ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c",0x566, param_5,param_3,local_50,4); if (lVar2 != 0) { return 0x20; } } local_4c = read_pack_length(*(int1 *)(*param_1 + 0x244),param_3,param_3 + 0x18); if (*(int *)(*param_1 + 0x188) != 0) { iVar1 = read_pack_length(*(int1 *)(*param_1 + 0x244),param_3 + (ulong)local_4c, param_3 + 0x30); local_4c = iVar1 + local_4c; lVar2 = mi_alloc_rec_buff(param_1,*(long *)(param_3 + 0x18) + *(long *)(param_3 + 0x30),param_4) ; if (lVar2 == 0) { return 0x20; } *(long *)(param_2 + 0x18) = *param_4 + *(long *)(param_3 + 0x18); *(long *)(param_2 + 0x20) = *(long *)(param_2 + 0x18) + *(long *)(param_3 + 0x30); param_1[0x37] = *(long *)(param_3 + 0x30); } *(ulong *)(param_3 + 0x38) = param_6 + (ulong)local_4c; if (0 < param_5) { if (*(ulong *)(param_3 + 0x18) < (ulong)(local_50 - local_4c)) { local_58 = (int)*(int8 *)(param_3 + 0x18); } else { local_58 = local_50 - local_4c; } *(int *)(param_3 + 0x54) = local_58; memcpy((void *)*param_4,(void *)(param_3 + (ulong)local_4c),(ulong)*(uint *)(param_3 + 0x54)); } return 0; }
46,210
mi_pack_get_block_info
eloqsql/storage/myisam/mi_packrec.c
uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, MI_BLOCK_INFO *info, uchar **rec_buff_p, File file, my_off_t filepos) { uchar *header=info->header; uint head_length, UNINIT_VAR(ref_length); if (file >= 0) { ref_length=myisam->s->pack.ref_length; /* We can't use mysql_file_pread() here because mi_read_rnd_pack_record assumes position is ok */ mysql_file_seek(file, filepos, MY_SEEK_SET, MYF(0)); if (mysql_file_read(file, header, ref_length, MYF(MY_NABP))) return BLOCK_FATAL_ERROR; DBUG_DUMP("header",(uchar*) header,ref_length); } head_length= read_pack_length((uint) myisam->s->pack.version, header, &info->rec_len); if (myisam->s->base.blobs) { head_length+= read_pack_length((uint) myisam->s->pack.version, header + head_length, &info->blob_len); /* Ensure that the record buffer is big enough for the compressed record plus all expanded blobs. [We do not have an extra buffer for the resulting blobs. Sigh.] */ if (!(mi_alloc_rec_buff(myisam,info->rec_len + info->blob_len, rec_buff_p))) return BLOCK_FATAL_ERROR; /* not enough memory */ bit_buff->blob_pos= (uchar*) *rec_buff_p + info->rec_len; bit_buff->blob_end= bit_buff->blob_pos + info->blob_len; myisam->blob_length=info->blob_len; } info->filepos=filepos+head_length; if (file > 0) { info->offset=MY_MIN(info->rec_len, ref_length - head_length); memcpy(*rec_buff_p, header + head_length, info->offset); } return 0; }
O3
c
mi_pack_get_block_info: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %r8d, %r12d movq %rdx, %rbx movq %rsi, -0x40(%rbp) movq %rdi, %r14 testl %r8d, %r8d movq %r9, -0x48(%rbp) js 0x81853 movq %r9, %r15 movq %rcx, -0x30(%rbp) movq (%r14), %rax movl 0x240(%rax), %r13d leaq 0x304844(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x90(%rbp), %rdi movl %r12d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x819b5 movl %r12d, %edi movq %r15, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0xa0b40 leaq 0x30480d(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x90(%rbp), %rdi movl %r12d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax movq %r13, -0x38(%rbp) jne 0x819c8 movl $0x4, %ecx movl %r12d, %edi movq %rbx, %rsi movq %r13, %rdx callq 0xa0940 movq %rax, %r13 movl $0x20, %r15d testq %r13, %r13 movq -0x30(%rbp), %rcx jne 0x819a3 jmp 0x81857 movq %rax, -0x38(%rbp) movzbl (%rbx), %esi cmpq $0xfd, %rsi ja 0x8186f movl $0x1, %r15d movq -0x38(%rbp), %rdi jmp 0x818b2 cmpl $0xfe, %esi movq -0x38(%rbp), %rdi jne 0x81887 movzwl 0x1(%rbx), %esi movl $0x3, %r15d jmp 0x818b2 movq (%r14), %rax cmpb $0x1, 0x244(%rax) jne 0x818a9 movzwl 0x1(%rbx), %eax movzbl 0x3(%rbx), %esi shll $0x10, %esi orq %rax, %rsi movl $0x4, %r15d jmp 0x818b2 movl 0x1(%rbx), %esi movl $0x5, %r15d movq %rsi, 0x18(%rbx) movq (%r14), %rdx cmpl $0x0, 0x188(%rdx) je 0x81968 movl %r15d, %edi movzbl (%rbx,%rdi), %eax cmpq $0xfd, %rax ja 0x818de movl $0x1, -0x30(%rbp) jmp 0x81920 cmpl $0xfe, %eax jne 0x818f3 movzwl 0x1(%rbx,%rdi), %eax movl $0x3, -0x30(%rbp) jmp 0x81920 cmpb $0x1, 0x244(%rdx) jne 0x81915 movzwl 0x1(%rbx,%rdi), %edx movzbl 0x3(%rbx,%rdi), %eax shll $0x10, %eax orq %rdx, %rax movl $0x4, -0x30(%rbp) jmp 0x81920 movl 0x1(%rbx,%rdi), %eax movl $0x5, -0x30(%rbp) movq %rax, 0x30(%rbx) addq %rax, %rsi movq %r14, %rdi movq %rcx, %rdx movq %rcx, %r13 callq 0x7faf9 testq %rax, %rax je 0x8199d movq (%r13), %rax addq 0x18(%rbx), %rax movq -0x40(%rbp), %rcx movq %rax, 0x18(%rcx) addq 0x30(%rbx), %rax addl -0x30(%rbp), %r15d movq %rax, 0x20(%rcx) movq 0x30(%rbx), %rax movq %rax, 0x1b8(%r14) movq %r13, %rcx movq -0x38(%rbp), %rdi movl %r15d, %eax movq -0x48(%rbp), %rdx addq %rax, %rdx movq %rdx, 0x38(%rbx) xorl %r15d, %r15d testl %r12d, %r12d jle 0x819a3 movq 0x18(%rbx), %rdx subl %eax, %edi cmpq %rdi, %rdx cmovael %edi, %edx movl %edx, 0x54(%rbx) movq (%rcx), %rdi addq %rax, %rbx movq %rbx, %rsi callq 0x29080 jmp 0x819a3 movl $0x20, %r15d movl %r15d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rdi movl %r12d, %esi movq %r15, %rdx callq 0x2e459 jmp 0x817fc movq %rax, %r15 leaq 0x30463e(%rip), %rax # 0x386010 movq (%rax), %rax leaq 0x5a19f(%rip), %rdx # 0xdbb7b movq %r15, %rdi movq %r13, %rsi movl $0x566, %ecx # imm = 0x566 callq *0x210(%rax) movl $0x4, %ecx movl %r12d, %edi movq %rbx, %rsi movq %r13, %rdx callq 0xa0940 movq %r13, %rcx movq %rax, %r13 xorl %esi, %esi testq %rax, %rax cmoveq %rcx, %rsi leaq 0x3045fa(%rip), %rax # 0x386010 movq (%rax), %rax movq %r15, %rdi callq *0x218(%rax) jmp 0x8183e
_mi_pack_get_block_info: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r12d, r8d mov rbx, rdx mov [rbp+var_40], rsi mov r14, rdi test r8d, r8d mov [rbp+var_48], r9 js loc_81853 mov r15, r9 mov [rbp+var_30], rcx mov rax, [r14] mov r13d, [rax+240h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] mov esi, r12d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_819B5 mov edi, r12d mov rsi, r15 xor edx, edx xor ecx, ecx call my_seek loc_817FC: lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] mov esi, r12d mov edx, 6 call qword ptr [rax+158h] test rax, rax mov [rbp+var_38], r13 jnz loc_819C8 mov ecx, 4 mov edi, r12d mov rsi, rbx mov rdx, r13 call my_read mov r13, rax loc_8183E: mov r15d, 20h ; ' ' test r13, r13 mov rcx, [rbp+var_30] jnz loc_819A3 jmp short loc_81857 loc_81853: mov [rbp+var_38], rax loc_81857: movzx esi, byte ptr [rbx] cmp rsi, 0FDh ja short loc_8186F mov r15d, 1 mov rdi, [rbp+var_38] jmp short loc_818B2 loc_8186F: cmp esi, 0FEh mov rdi, [rbp+var_38] jnz short loc_81887 movzx esi, word ptr [rbx+1] mov r15d, 3 jmp short loc_818B2 loc_81887: mov rax, [r14] cmp byte ptr [rax+244h], 1 jnz short loc_818A9 movzx eax, word ptr [rbx+1] movzx esi, byte ptr [rbx+3] shl esi, 10h or rsi, rax mov r15d, 4 jmp short loc_818B2 loc_818A9: mov esi, [rbx+1] mov r15d, 5 loc_818B2: mov [rbx+18h], rsi mov rdx, [r14] cmp dword ptr [rdx+188h], 0 jz loc_81968 mov edi, r15d movzx eax, byte ptr [rbx+rdi] cmp rax, 0FDh ja short loc_818DE mov dword ptr [rbp+var_30], 1 jmp short loc_81920 loc_818DE: cmp eax, 0FEh jnz short loc_818F3 movzx eax, word ptr [rbx+rdi+1] mov dword ptr [rbp+var_30], 3 jmp short loc_81920 loc_818F3: cmp byte ptr [rdx+244h], 1 jnz short loc_81915 movzx edx, word ptr [rbx+rdi+1] movzx eax, byte ptr [rbx+rdi+3] shl eax, 10h or rax, rdx mov dword ptr [rbp+var_30], 4 jmp short loc_81920 loc_81915: mov eax, [rbx+rdi+1] mov dword ptr [rbp+var_30], 5 loc_81920: mov [rbx+30h], rax add rsi, rax mov rdi, r14 mov rdx, rcx mov r13, rcx call mi_alloc_rec_buff test rax, rax jz short loc_8199D mov rax, [r13+0] add rax, [rbx+18h] mov rcx, [rbp+var_40] mov [rcx+18h], rax add rax, [rbx+30h] add r15d, dword ptr [rbp+var_30] mov [rcx+20h], rax mov rax, [rbx+30h] mov [r14+1B8h], rax mov rcx, r13 mov rdi, [rbp+var_38] loc_81968: mov eax, r15d mov rdx, [rbp+var_48] add rdx, rax mov [rbx+38h], rdx xor r15d, r15d test r12d, r12d jle short loc_819A3 mov rdx, [rbx+18h] sub edi, eax cmp rdx, rdi cmovnb edx, edi mov [rbx+54h], edx mov rdi, [rcx] add rbx, rax mov rsi, rbx call _memcpy jmp short loc_819A3 loc_8199D: mov r15d, 20h ; ' ' loc_819A3: mov eax, r15d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_819B5: mov rdi, rax mov esi, r12d mov rdx, r15 call _mi_pack_get_block_info_cold_1 jmp loc_817FC loc_819C8: mov r15, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov rsi, r13 mov ecx, 566h call qword ptr [rax+210h] mov ecx, 4 mov edi, r12d mov rsi, rbx mov rdx, r13 call my_read mov rcx, r13 mov r13, rax xor esi, esi test rax, rax cmovz rsi, rcx lea rax, PSI_server mov rax, [rax] mov rdi, r15 call qword ptr [rax+218h] jmp loc_8183E
long long mi_pack_get_block_info( long long *a1, long long a2, unsigned __int8 *a3, _QWORD *a4, long long a5, long long a6) { long long v6; // rax unsigned int v7; // r12d long long v11; // r13 long long v12; // rax long long v13; // rax long long v14; // r13 unsigned int v15; // r15d unsigned long long v16; // rsi unsigned int v17; // r15d int v18; // edi unsigned long long v19; // rax _QWORD *v20; // r13 long long v21; // rax long long v22; // rcx long long v23; // rax unsigned long long v24; // rdx unsigned long long v25; // rdi long long v27; // r15 long long v28; // rax long long v29; // rcx long long v30; // rsi _BYTE v31[72]; // [rsp+0h] [rbp-90h] BYREF long long v32; // [rsp+48h] [rbp-48h] long long v33; // [rsp+50h] [rbp-40h] long long v34; // [rsp+58h] [rbp-38h] _QWORD *v35; // [rsp+60h] [rbp-30h] v7 = a5; v33 = a2; v32 = a6; if ( (int)a5 < 0 ) { v34 = v6; } else { v35 = a4; v11 = *(unsigned int *)(*a1 + 576); v12 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v31, (unsigned int)a5, 8LL); if ( v12 ) mi_pack_get_block_info_cold_1(v12, v7, a6); else my_seek(v7, a6, 0LL, 0LL); v13 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v31, v7, 6LL); v34 = v11; if ( v13 ) { v27 = v13; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v13, v11, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 1382LL); v28 = my_read(v7, a3, v11, 4LL); v29 = v11; v14 = v28; v30 = 0LL; if ( !v28 ) v30 = v29; ((void ( *)(long long, long long))PSI_server[67])(v27, v30); } else { v14 = my_read(v7, a3, v11, 4LL); } v15 = 32; a4 = v35; if ( v14 ) return v15; } v16 = *a3; if ( v16 > 0xFD ) { v18 = v34; if ( (_DWORD)v16 == 254 ) { v16 = *(unsigned __int16 *)(a3 + 1); v17 = 3; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v16 = *(unsigned __int16 *)(a3 + 1) | (unsigned long long)(a3[3] << 16); v17 = 4; } else { v16 = *(unsigned int *)(a3 + 1); v17 = 5; } } else { v17 = 1; v18 = v34; } *((_QWORD *)a3 + 3) = v16; if ( *(_DWORD *)(*a1 + 392) ) { v19 = a3[v17]; if ( v19 > 0xFD ) { if ( (_DWORD)v19 == 254 ) { v19 = *(unsigned __int16 *)&a3[v17 + 1]; LODWORD(v35) = 3; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v19 = *(unsigned __int16 *)&a3[v17 + 1] | (unsigned long long)(a3[v17 + 3] << 16); LODWORD(v35) = 4; } else { v19 = *(unsigned int *)&a3[v17 + 1]; LODWORD(v35) = 5; } } else { LODWORD(v35) = 1; } *((_QWORD *)a3 + 6) = v19; v20 = a4; if ( !mi_alloc_rec_buff(a1, v19 + v16, a4, (long long)a4, a5, a6) ) return 32; v21 = *((_QWORD *)a3 + 3) + *v20; v22 = v33; *(_QWORD *)(v33 + 24) = v21; v17 += (unsigned int)v35; *(_QWORD *)(v22 + 32) = *((_QWORD *)a3 + 6) + v21; a1[55] = *((_QWORD *)a3 + 6); a4 = v20; v18 = v34; } v23 = v17; *((_QWORD *)a3 + 7) = v17 + v32; v15 = 0; if ( (int)v7 > 0 ) { v24 = *((_QWORD *)a3 + 3); v25 = (unsigned int)(v18 - v23); if ( v24 >= v25 ) v24 = (unsigned int)v25; *((_DWORD *)a3 + 21) = v24; memcpy(*a4, &a3[v23], v24); } return v15; }
_mi_pack_get_block_info: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R12D,R8D MOV RBX,RDX MOV qword ptr [RBP + -0x40],RSI MOV R14,RDI TEST R8D,R8D MOV qword ptr [RBP + -0x48],R9 JS 0x00181853 MOV R15,R9 MOV qword ptr [RBP + -0x30],RCX MOV RAX,qword ptr [R14] MOV R13D,dword ptr [RAX + 0x240] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] MOV ESI,R12D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001819b5 MOV EDI,R12D MOV RSI,R15 XOR EDX,EDX XOR ECX,ECX CALL 0x001a0b40 LAB_001817fc: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] MOV ESI,R12D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX MOV qword ptr [RBP + -0x38],R13 JNZ 0x001819c8 MOV ECX,0x4 MOV EDI,R12D MOV RSI,RBX MOV RDX,R13 CALL 0x001a0940 MOV R13,RAX LAB_0018183e: MOV R15D,0x20 TEST R13,R13 MOV RCX,qword ptr [RBP + -0x30] JNZ 0x001819a3 JMP 0x00181857 LAB_00181853: MOV qword ptr [RBP + -0x38],RAX LAB_00181857: MOVZX ESI,byte ptr [RBX] CMP RSI,0xfd JA 0x0018186f MOV R15D,0x1 MOV RDI,qword ptr [RBP + -0x38] JMP 0x001818b2 LAB_0018186f: CMP ESI,0xfe MOV RDI,qword ptr [RBP + -0x38] JNZ 0x00181887 MOVZX ESI,word ptr [RBX + 0x1] MOV R15D,0x3 JMP 0x001818b2 LAB_00181887: MOV RAX,qword ptr [R14] CMP byte ptr [RAX + 0x244],0x1 JNZ 0x001818a9 MOVZX EAX,word ptr [RBX + 0x1] MOVZX ESI,byte ptr [RBX + 0x3] SHL ESI,0x10 OR RSI,RAX MOV R15D,0x4 JMP 0x001818b2 LAB_001818a9: MOV ESI,dword ptr [RBX + 0x1] MOV R15D,0x5 LAB_001818b2: MOV qword ptr [RBX + 0x18],RSI MOV RDX,qword ptr [R14] CMP dword ptr [RDX + 0x188],0x0 JZ 0x00181968 MOV EDI,R15D MOVZX EAX,byte ptr [RBX + RDI*0x1] CMP RAX,0xfd JA 0x001818de MOV dword ptr [RBP + -0x30],0x1 JMP 0x00181920 LAB_001818de: CMP EAX,0xfe JNZ 0x001818f3 MOVZX EAX,word ptr [RBX + RDI*0x1 + 0x1] MOV dword ptr [RBP + -0x30],0x3 JMP 0x00181920 LAB_001818f3: CMP byte ptr [RDX + 0x244],0x1 JNZ 0x00181915 MOVZX EDX,word ptr [RBX + RDI*0x1 + 0x1] MOVZX EAX,byte ptr [RBX + RDI*0x1 + 0x3] SHL EAX,0x10 OR RAX,RDX MOV dword ptr [RBP + -0x30],0x4 JMP 0x00181920 LAB_00181915: MOV EAX,dword ptr [RBX + RDI*0x1 + 0x1] MOV dword ptr [RBP + -0x30],0x5 LAB_00181920: MOV qword ptr [RBX + 0x30],RAX ADD RSI,RAX MOV RDI,R14 MOV RDX,RCX MOV R13,RCX CALL 0x0017faf9 TEST RAX,RAX JZ 0x0018199d MOV RAX,qword ptr [R13] ADD RAX,qword ptr [RBX + 0x18] MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RCX + 0x18],RAX ADD RAX,qword ptr [RBX + 0x30] ADD R15D,dword ptr [RBP + -0x30] MOV qword ptr [RCX + 0x20],RAX MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [R14 + 0x1b8],RAX MOV RCX,R13 MOV RDI,qword ptr [RBP + -0x38] LAB_00181968: MOV EAX,R15D MOV RDX,qword ptr [RBP + -0x48] ADD RDX,RAX MOV qword ptr [RBX + 0x38],RDX XOR R15D,R15D TEST R12D,R12D JLE 0x001819a3 MOV RDX,qword ptr [RBX + 0x18] SUB EDI,EAX CMP RDX,RDI CMOVNC EDX,EDI MOV dword ptr [RBX + 0x54],EDX MOV RDI,qword ptr [RCX] ADD RBX,RAX MOV RSI,RBX CALL 0x00129080 JMP 0x001819a3 LAB_0018199d: MOV R15D,0x20 LAB_001819a3: MOV EAX,R15D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001819b5: MOV RDI,RAX MOV ESI,R12D MOV RDX,R15 CALL 0x0012e459 JMP 0x001817fc LAB_001819c8: MOV R15,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1dbb7b] MOV RDI,R15 MOV RSI,R13 MOV ECX,0x566 CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,R12D MOV RSI,RBX MOV RDX,R13 CALL 0x001a0940 MOV RCX,R13 MOV R13,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,RCX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R15 CALL qword ptr [RAX + 0x218] JMP 0x0018183e
int8 _mi_pack_get_block_info (long *param_1,long param_2,byte *param_3,long *param_4,int param_5,long param_6) { ulong in_RAX; long lVar1; long lVar2; ulong uVar3; ulong uVar4; int iVar5; ulong uVar6; int1 local_98 [72]; long local_50; long local_48; ulong local_40; long *local_38; local_50 = param_6; local_48 = param_2; local_40 = in_RAX; if (-1 < param_5) { uVar4 = (ulong)*(uint *)(*param_1 + 0x240); local_38 = param_4; lVar1 = (**(code **)(PSI_server + 0x158))(local_98,param_5,8); if (lVar1 == 0) { my_seek(param_5,param_6,0,0); } else { _mi_pack_get_block_info_cold_1(lVar1,param_5,param_6); } lVar1 = (**(code **)(PSI_server + 0x158))(local_98,param_5,6); local_40 = uVar4; if (lVar1 == 0) { lVar2 = my_read(param_5,param_3,uVar4,4); } else { (**(code **)(PSI_server + 0x210)) (lVar1,uVar4,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x566); lVar2 = my_read(param_5,param_3,uVar4,4); uVar6 = 0; if (lVar2 == 0) { uVar6 = uVar4; } (**(code **)(PSI_server + 0x218))(lVar1,uVar6); } param_4 = local_38; if (lVar2 != 0) { return 0x20; } } uVar4 = (ulong)*param_3; if (uVar4 < 0xfe) { uVar6 = 1; } else if (*param_3 == 0xfe) { uVar4 = (ulong)*(ushort *)(param_3 + 1); uVar6 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar4 = (ulong)*(uint3 *)(param_3 + 1); uVar6 = 4; } else { uVar4 = (ulong)*(uint *)(param_3 + 1); uVar6 = 5; } iVar5 = (int)local_40; *(ulong *)(param_3 + 0x18) = uVar4; if (*(int *)(*param_1 + 0x188) != 0) { uVar3 = (ulong)param_3[uVar6]; if (uVar3 < 0xfe) { local_38 = (long *)CONCAT44(local_38._4_4_,1); } else if (param_3[uVar6] == 0xfe) { uVar3 = (ulong)*(ushort *)(param_3 + uVar6 + 1); local_38 = (long *)CONCAT44(local_38._4_4_,3); } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)CONCAT12(param_3[uVar6 + 3],*(int2 *)(param_3 + uVar6 + 1)); local_38 = (long *)CONCAT44(local_38._4_4_,4); } else { uVar3 = (ulong)*(uint *)(param_3 + uVar6 + 1); local_38 = (long *)CONCAT44(local_38._4_4_,5); } *(ulong *)(param_3 + 0x30) = uVar3; lVar1 = mi_alloc_rec_buff(param_1,uVar4 + uVar3,param_4); if (lVar1 == 0) { return 0x20; } lVar1 = *param_4; lVar2 = *(long *)(param_3 + 0x18); *(long *)(local_48 + 0x18) = lVar1 + lVar2; uVar6 = (ulong)(uint)((int)uVar6 + (int)local_38); *(long *)(local_48 + 0x20) = lVar1 + lVar2 + *(long *)(param_3 + 0x30); param_1[0x37] = *(long *)(param_3 + 0x30); iVar5 = (int)local_40; } *(ulong *)(param_3 + 0x38) = local_50 + uVar6; if (0 < param_5) { uVar3 = (ulong)(uint)(iVar5 - (int)uVar6); uVar4 = *(ulong *)(param_3 + 0x18) & 0xffffffff; if (uVar3 <= *(ulong *)(param_3 + 0x18)) { uVar4 = uVar3; } *(int *)(param_3 + 0x54) = (int)uVar4; memcpy((void *)*param_4,param_3 + uVar6,uVar4); } return 0; }
46,211
testing::internal::(anonymous namespace)::SplitEscapedString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/src/gtest.cc
std::vector<std::string> SplitEscapedString(const std::string& str) { std::vector<std::string> lines; size_t start = 0, end = str.size(); if (end > 2 && str[0] == '"' && str[end - 1] == '"') { ++start; --end; } bool escaped = false; for (size_t i = start; i + 1 < end; ++i) { if (escaped) { escaped = false; if (str[i] == 'n') { lines.push_back(str.substr(start, i - start - 1)); start = i + 1; } } else { escaped = str[i] == '\\'; } } lines.push_back(str.substr(start, end - start)); return lines; }
O3
cpp
testing::internal::(anonymous namespace)::SplitEscapedString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) movq 0x8(%rsi), %r15 cmpq $0x3, %r15 jb 0x1dcfa movq (%r14), %rax cmpb $0x22, (%rax) jne 0x1dcfa xorl %edx, %edx cmpb $0x22, -0x1(%rax,%r15) leaq -0x1(%r15), %rax sete %dl cmoveq %rax, %r15 jmp 0x1dcfc xorl %edx, %edx leaq 0x1(%rdx), %rbp cmpq %r15, %rbp jae 0x1dd71 leaq 0x18(%rsp), %r13 xorl %eax, %eax leaq 0x8(%rsp), %r12 movq (%r14), %rcx movb -0x1(%rcx,%rbp), %cl testb $0x1, %al je 0x1dd5f cmpb $0x6e, %cl jne 0x1dd67 movq %rbp, %rcx subq %rdx, %rcx addq $-0x2, %rcx movq %r12, %rdi movq %r14, %rsi callq 0x8510 movq %rbx, %rdi movq %r12, %rsi callq 0x39de6 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x1dd58 movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 xorl %eax, %eax movq %rbp, %rdx jmp 0x1dd69 cmpb $0x5c, %cl sete %al jmp 0x1dd69 xorl %eax, %eax incq %rbp cmpq %rbp, %r15 jne 0x1dd11 subq %rdx, %r15 leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %r15, %rcx callq 0x8510 leaq 0x8(%rsp), %rsi movq %rbx, %rdi callq 0x39de6 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x1ddac movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi jne 0x1dddd jmp 0x1ddef jmp 0x1ddec movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x1ddef movq 0x18(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0x1ddef movq %rax, %r14 movq %rbx, %rdi callq 0x31f9e movq %r14, %rdi callq 0x8990
_ZN7testing8internal12_GLOBAL__N_118SplitEscapedStringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 mov r15, [rsi+8] cmp r15, 3 jb short loc_1DCFA mov rax, [r14] cmp byte ptr [rax], 22h ; '"' jnz short loc_1DCFA xor edx, edx cmp byte ptr [rax+r15-1], 22h ; '"' lea rax, [r15-1] setz dl cmovz r15, rax jmp short loc_1DCFC loc_1DCFA: xor edx, edx loc_1DCFC: lea rbp, [rdx+1] cmp rbp, r15 jnb short loc_1DD71 lea r13, [rsp+58h+var_40] xor eax, eax lea r12, [rsp+58h+var_50] loc_1DD11: mov rcx, [r14] mov cl, [rcx+rbp-1] test al, 1 jz short loc_1DD5F cmp cl, 6Eh ; 'n' jnz short loc_1DD67 mov rcx, rbp sub rcx, rdx add rcx, 0FFFFFFFFFFFFFFFEh mov rdi, r12 mov rsi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, rbx mov rsi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEEvDpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) mov rdi, [rsp+58h+var_50]; void * cmp rdi, r13 jz short loc_1DD58 mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1DD58: xor eax, eax mov rdx, rbp jmp short loc_1DD69 loc_1DD5F: cmp cl, 5Ch ; '\' setz al jmp short loc_1DD69 loc_1DD67: xor eax, eax loc_1DD69: inc rbp cmp r15, rbp jnz short loc_1DD11 loc_1DD71: sub r15, rdx lea rdi, [rsp+58h+var_50] mov rsi, r14 mov rcx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rsi, [rsp+58h+var_50] mov rdi, rbx call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE12emplace_backIJS5_EEEvDpOT_; std::vector<std::string>::emplace_back<std::string>(std::string &&) lea rax, [rsp+58h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_1DDAC mov rsi, [rsp+58h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1DDAC: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h] cmp rdi, rax jnz short loc_1DDDD jmp short loc_1DDEF jmp short loc_1DDEC mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_1DDEF loc_1DDDD: mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1DDEF loc_1DDEC: mov r14, rax loc_1DDEF: mov rdi, rbx; void * call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r14 call __Unwind_Resume
void testing::internal::`anonymous namespace'::SplitEscapedString(long long a1, _QWORD *a2) { unsigned long long v2; // r15 _BYTE *v3; // rax _BOOL8 v4; // rdx long long v5; // rbp bool v6; // al char v7; // cl void *v8[2]; // [rsp+8h] [rbp-50h] BYREF _QWORD v9[8]; // [rsp+18h] [rbp-40h] BYREF *(_OWORD *)a1 = 0LL; *(_QWORD *)(a1 + 16) = 0LL; v2 = a2[1]; if ( v2 >= 3 && (v3 = (_BYTE *)*a2, *(_BYTE *)*a2 == 34) ) { v4 = v3[v2 - 1] == 34; if ( v3[v2 - 1] == 34 ) --v2; } else { v4 = 0LL; } v5 = v4 + 1; if ( v4 + 1 < v2 ) { v6 = 0; do { v7 = *(_BYTE *)(*a2 + v5 - 1); if ( v6 ) { if ( v7 == 110 ) { std::string::substr(v8, a2, v4, v5 - v4 - 2); std::vector<std::string>::emplace_back<std::string>(a1, v8); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); v6 = 0; v4 = v5; } else { v6 = 0; } } else { v6 = v7 == 92; } ++v5; } while ( v2 != v5 ); } std::string::substr(v8, a2, v4, v2 - v4); std::vector<std::string>::emplace_back<std::string>(a1, v8); if ( v8[0] != v9 ) operator delete(v8[0], v9[0] + 1LL); }
SplitEscapedString: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 MOV R15,qword ptr [RSI + 0x8] CMP R15,0x3 JC 0x0011dcfa MOV RAX,qword ptr [R14] CMP byte ptr [RAX],0x22 JNZ 0x0011dcfa XOR EDX,EDX CMP byte ptr [RAX + R15*0x1 + -0x1],0x22 LEA RAX,[R15 + -0x1] SETZ DL CMOVZ R15,RAX JMP 0x0011dcfc LAB_0011dcfa: XOR EDX,EDX LAB_0011dcfc: LEA RBP,[RDX + 0x1] CMP RBP,R15 JNC 0x0011dd71 LEA R13,[RSP + 0x18] XOR EAX,EAX LEA R12,[RSP + 0x8] LAB_0011dd11: MOV RCX,qword ptr [R14] MOV CL,byte ptr [RCX + RBP*0x1 + -0x1] TEST AL,0x1 JZ 0x0011dd5f CMP CL,0x6e JNZ 0x0011dd67 MOV RCX,RBP SUB RCX,RDX ADD RCX,-0x2 LAB_0011dd2b: MOV RDI,R12 MOV RSI,R14 CALL 0x00108510 LAB_0011dd36: MOV RDI,RBX MOV RSI,R12 CALL 0x00139de6 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0011dd58 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_0011dd58: XOR EAX,EAX MOV RDX,RBP JMP 0x0011dd69 LAB_0011dd5f: CMP CL,0x5c SETZ AL JMP 0x0011dd69 LAB_0011dd67: XOR EAX,EAX LAB_0011dd69: INC RBP CMP R15,RBP JNZ 0x0011dd11 LAB_0011dd71: SUB R15,RDX LAB_0011dd74: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RCX,R15 CALL 0x00108510 LAB_0011dd84: LEA RSI,[RSP + 0x8] MOV RDI,RBX CALL 0x00139de6 LAB_0011dd91: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0011ddac MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001084e0 LAB_0011ddac: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::(anonymous namespace)::SplitEscapedString(std::__cxx11::string const&) */ void __thiscall testing::internal::(anonymous_namespace)::SplitEscapedString (_anonymous_namespace_ *this,string *param_1) { char cVar1; ulong uVar2; ulong uVar3; bool bVar4; long *local_50 [2]; long local_40 [2]; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; uVar3 = *(ulong *)(param_1 + 8); if ((uVar3 < 3) || (**(char **)param_1 != '\"')) { uVar2 = 0; } else { bVar4 = (*(char **)param_1)[uVar3 - 1] == '\"'; uVar2 = (ulong)bVar4; if (bVar4) { uVar3 = uVar3 - 1; } } uVar2 = uVar2 + 1; if (uVar2 < uVar3) { bVar4 = false; do { cVar1 = *(char *)(*(long *)param_1 + -1 + uVar2); if (bVar4) { if (cVar1 == 'n') { /* try { // try from 0011dd2b to 0011dd35 has its CatchHandler @ 0011ddec */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); /* try { // try from 0011dd36 to 0011dd40 has its CatchHandler @ 0011ddd0 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } bVar4 = false; } else { bVar4 = false; } } else { bVar4 = cVar1 == '\\'; } uVar2 = uVar2 + 1; } while (uVar3 != uVar2); } /* try { // try from 0011dd74 to 0011dd83 has its CatchHandler @ 0011ddce */ std::__cxx11::string::substr((ulong)local_50,(ulong)param_1); /* try { // try from 0011dd84 to 0011dd90 has its CatchHandler @ 0011ddbb */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: emplace_back<std::__cxx11::string> ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)this, (string *)local_50); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } return; }
46,212
ggml_acc_impl
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static struct ggml_tensor * ggml_acc_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, size_t nb1, size_t nb2, size_t nb3, size_t offset, bool inplace) { GGML_ASSERT(ggml_nelements(b) <= ggml_nelements(a)); GGML_ASSERT(ggml_is_contiguous(a)); GGML_ASSERT(a->type == GGML_TYPE_F32); GGML_ASSERT(b->type == GGML_TYPE_F32); bool is_node = false; if (!inplace && (a->grad || b->grad)) { is_node = true; } struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); int32_t params[] = { nb1, nb2, nb3, offset, inplace ? 1 : 0 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_ACC; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; result->src[1] = b; return result; }
O1
c
ggml_acc_impl: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rcx, %r13 movq 0x18(%rdx), %rax imulq 0x10(%rdx), %rax imulq 0x20(%rdx), %rax imulq 0x28(%rdx), %rax movq 0x18(%rsi), %rcx imulq 0x10(%rsi), %rcx imulq 0x20(%rsi), %rcx movq %rdi, 0x8(%rsp) imulq 0x28(%rsi), %rcx cmpq %rcx, %rax jg 0x911b3 movq %r9, %rbp movq %r8, %r15 movq %rdx, %rbx movq %rsi, %r14 movq %rsi, %rdi callq 0x8e334 testb %al, %al je 0x911b8 movl (%r14), %esi testl %esi, %esi jne 0x911bd cmpl $0x0, (%rbx) jne 0x911c2 movb 0x68(%rsp), %al testb %al, %al je 0x910e2 movl $0x0, 0x4(%rsp) jmp 0x910fc cmpq $0x0, 0x98(%r14) jne 0x910f6 cmpq $0x0, 0x98(%rbx) je 0x910d8 movb $0x1, %cl movl %ecx, 0x4(%rsp) testb %al, %al je 0x9110f movq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x90b1a jmp 0x91128 leaq 0x10(%r14), %rcx movq 0x8(%rsp), %rdi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x8e8b7 movq %rax, %r12 leaq 0x10(%rsp), %rsi movl %r13d, (%rsi) movl %r15d, 0x4(%rsi) movl %ebp, 0x8(%rsi) movq 0x60(%rsp), %rax movl %eax, 0xc(%rsi) movzbl 0x68(%rsp), %eax movl %eax, 0x10(%rsi) movl $0x14, %edx movq %r12, %rdi callq 0x91e91 movl $0x4, 0x50(%r12) cmpb $0x0, 0x4(%rsp) je 0x91187 movl (%r12), %esi leaq 0x10(%r12), %rcx movq 0x8(%rsp), %rdi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x8e8b7 jmp 0x91189 xorl %eax, %eax movq %rax, 0x98(%r12) movq %r14, 0xa0(%r12) movq %rbx, 0xa8(%r12) movq %r12, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xcdbb callq 0xccec callq 0xcd31 callq 0xcd76
ggml_acc_impl: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r13, rcx mov rax, [rdx+18h] imul rax, [rdx+10h] imul rax, [rdx+20h] imul rax, [rdx+28h] mov rcx, [rsi+18h] imul rcx, [rsi+10h] imul rcx, [rsi+20h] mov [rsp+58h+var_50], rdi imul rcx, [rsi+28h] cmp rax, rcx jg loc_911B3 mov rbp, r9 mov r15, r8 mov rbx, rdx mov r14, rsi mov rdi, rsi call ggml_is_contiguous test al, al jz loc_911B8 mov esi, [r14] test esi, esi jnz loc_911BD cmp dword ptr [rbx], 0 jnz loc_911C2 mov al, [rsp+58h+arg_8] test al, al jz short loc_910E2 loc_910D8: mov [rsp+58h+var_54], 0 jmp short loc_910FC loc_910E2: cmp qword ptr [r14+98h], 0 jnz short loc_910F6 cmp qword ptr [rbx+98h], 0 jz short loc_910D8 loc_910F6: mov cl, 1 mov [rsp+58h+var_54], ecx loc_910FC: test al, al jz short loc_9110F mov rdi, [rsp+58h+var_50] mov rsi, r14 call ggml_view_tensor jmp short loc_91128 loc_9110F: lea rcx, [r14+10h] mov rdi, [rsp+58h+var_50] mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl loc_91128: mov r12, rax lea rsi, [rsp+58h+var_48] mov [rsi], r13d mov [rsi+4], r15d mov [rsi+8], ebp mov rax, [rsp+58h+arg_0] mov [rsi+0Ch], eax movzx eax, [rsp+58h+arg_8] mov [rsi+10h], eax mov edx, 14h mov rdi, r12 call ggml_set_op_params mov dword ptr [r12+50h], 4 cmp byte ptr [rsp+58h+var_54], 0 jz short loc_91187 mov esi, [r12] lea rcx, [r12+10h] mov rdi, [rsp+58h+var_50] mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl jmp short loc_91189 loc_91187: xor eax, eax loc_91189: mov [r12+98h], rax mov [r12+0A0h], r14 mov [r12+0A8h], rbx mov rax, r12 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_911B3: call ggml_acc_impl_cold_4 loc_911B8: call ggml_acc_impl_cold_1 loc_911BD: call ggml_acc_impl_cold_2 loc_911C2: call ggml_acc_impl_cold_3
long long ggml_acc_impl( long long a1, _QWORD *a2, long long a3, int a4, int a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, long long a15, unsigned __int8 a16) { double v20; // xmm4_8 double v21; // xmm5_8 long long v22; // rax long long v23; // r12 long long v24; // rax bool v26; // [rsp+4h] [rbp-54h] _DWORD v27[18]; // [rsp+10h] [rbp-48h] BYREF if ( *(_QWORD *)(a3 + 40) * *(_QWORD *)(a3 + 32) * *(_QWORD *)(a3 + 16) * *(_QWORD *)(a3 + 24) > a2[5] * a2[4] * a2[2] * a2[3] ) ggml_acc_impl_cold_4(); if ( !(unsigned __int8)ggml_is_contiguous(a2) ) ggml_acc_impl_cold_1(); if ( *(_DWORD *)a2 ) ggml_acc_impl_cold_2(); if ( *(_DWORD *)a3 ) ggml_acc_impl_cold_3(); v26 = !a16 && (a2[19] || *(_QWORD *)(a3 + 152)); if ( a16 ) v22 = ggml_view_tensor(a1, (long long)a2, a7, a8, a9, a10, v20, v21, a13, a14); else v22 = ggml_new_tensor_impl(a1, 0, 4, a2 + 2, 0LL, 0LL, a7, a8); v23 = v22; v27[0] = a4; v27[1] = a5; v27[2] = a6; v27[3] = a15; v27[4] = a16; ggml_set_op_params(v22, v27, 20LL); *(_DWORD *)(v23 + 80) = 4; if ( v26 ) v24 = ggml_new_tensor_impl(a1, *(_DWORD *)v23, 4, (_QWORD *)(v23 + 16), 0LL, 0LL, a7, a8); else v24 = 0LL; *(_QWORD *)(v23 + 152) = v24; *(_QWORD *)(v23 + 160) = a2; *(_QWORD *)(v23 + 168) = a3; return v23; }
46,213
ggml_acc_impl
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
static struct ggml_tensor * ggml_acc_impl( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, size_t nb1, size_t nb2, size_t nb3, size_t offset, bool inplace) { GGML_ASSERT(ggml_nelements(b) <= ggml_nelements(a)); GGML_ASSERT(ggml_is_contiguous(a)); GGML_ASSERT(a->type == GGML_TYPE_F32); GGML_ASSERT(b->type == GGML_TYPE_F32); bool is_node = false; if (!inplace && (a->grad || b->grad)) { is_node = true; } struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); int32_t params[] = { nb1, nb2, nb3, offset, inplace ? 1 : 0 }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_ACC; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; result->src[1] = b; return result; }
O2
c
ggml_acc_impl: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rcx, %r12 movq 0x18(%rdx), %rax imulq 0x10(%rdx), %rax imulq 0x20(%rdx), %rax imulq 0x28(%rdx), %rax movq 0x18(%rsi), %rcx imulq 0x10(%rsi), %rcx imulq 0x20(%rsi), %rcx imulq 0x28(%rsi), %rcx cmpq %rcx, %rax jg 0x69fab movq %r9, %r15 movq %r8, %r13 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %rbp movq %rsi, %rdi callq 0x67db9 testb %al, %al je 0x69fe3 cmpl $0x0, (%r14) jne 0x6a018 cmpl $0x0, (%rbx) jne 0x6a04d movq %r12, 0x18(%rsp) movb 0x78(%rsp), %r12b testb %r12b, %r12b movq %rbp, 0x8(%rsp) movq %r13, 0x10(%rsp) je 0x69efc movq %r15, %r13 movq %rbp, %rdi movq %r14, %rsi callq 0x69922 movq %rax, %r15 xorl %ebp, %ebp jmp 0x69f2a cmpq $0x0, 0x98(%r14) jne 0x69f14 cmpq $0x0, 0x98(%rbx) je 0x69fa1 movq %r15, %r13 movb $0x1, %bpl movq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x68a65 movq %rax, %r15 leaq 0x20(%rsp), %rsi movq 0x18(%rsp), %rax movl %eax, (%rsi) movq 0x10(%rsp), %rax movl %eax, 0x4(%rsi) movl %r13d, 0x8(%rsi) movq 0x70(%rsp), %rax movl %eax, 0xc(%rsi) movzbl %r12b, %eax movl %eax, 0x10(%rsi) pushq $0x14 popq %rdx movq %r15, %rdi callq 0x6ab3d movl $0x4, 0x50(%r15) testb %bpl, %bpl je 0x69f78 movq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x68a65 jmp 0x69f7a xorl %eax, %eax movq %rax, 0x98(%r15) movq %r14, 0xa0(%r15) movq %rbx, 0xa8(%r15) movq %r15, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r15, %r13 xorl %ebp, %ebp jmp 0x69f1a movq 0x6bf96(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6bfe7(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x30253(%rip), %rsi # 0x9a21e leaq 0x378ac(%rip), %rdx # 0xa187e leaq 0x39534(%rip), %r8 # 0xa350d movl $0xce5, %ecx # imm = 0xCE5 jmp 0x6a080 movq 0x6bf5e(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6bfaf(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x3021b(%rip), %rsi # 0x9a21e leaq 0x37874(%rip), %rdx # 0xa187e leaq 0x37d1e(%rip), %r8 # 0xa1d2f movl $0xce6, %ecx # imm = 0xCE6 jmp 0x6a080 movq 0x6bf29(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6bf7a(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x301e6(%rip), %rsi # 0x9a21e leaq 0x3783f(%rip), %rdx # 0xa187e leaq 0x38120(%rip), %r8 # 0xa2166 movl $0xce7, %ecx # imm = 0xCE7 jmp 0x6a080 movq 0x6bef4(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6bf45(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x301b1(%rip), %rsi # 0x9a21e leaq 0x3780a(%rip), %rdx # 0xa187e leaq 0x394b9(%rip), %r8 # 0xa3534 movl $0xce8, %ecx # imm = 0xCE8 xorl %eax, %eax callq 0xa8b0 callq 0x67550 callq 0xa300
ggml_acc_impl: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12, rcx mov rax, [rdx+18h] imul rax, [rdx+10h] imul rax, [rdx+20h] imul rax, [rdx+28h] mov rcx, [rsi+18h] imul rcx, [rsi+10h] imul rcx, [rsi+20h] imul rcx, [rsi+28h] cmp rax, rcx jg loc_69FAB mov r15, r9 mov r13, r8 mov rbx, rdx mov r14, rsi mov rbp, rdi mov rdi, rsi call ggml_is_contiguous test al, al jz loc_69FE3 cmp dword ptr [r14], 0 jnz loc_6A018 cmp dword ptr [rbx], 0 jnz loc_6A04D mov [rsp+68h+var_50], r12 mov r12b, [rsp+68h+arg_8] test r12b, r12b mov [rsp+68h+var_60], rbp mov [rsp+68h+var_58], r13 jz short loc_69EFC mov r13, r15 mov rdi, rbp mov rsi, r14 call ggml_view_tensor mov r15, rax xor ebp, ebp jmp short loc_69F2A loc_69EFC: cmp qword ptr [r14+98h], 0 jnz short loc_69F14 cmp qword ptr [rbx+98h], 0 jz loc_69FA1 loc_69F14: mov r13, r15 mov bpl, 1 loc_69F1A: mov rdi, [rsp+68h+var_60] mov rsi, r14 call ggml_dup_tensor mov r15, rax loc_69F2A: lea rsi, [rsp+68h+var_48] mov rax, [rsp+68h+var_50] mov [rsi], eax mov rax, [rsp+68h+var_58] mov [rsi+4], eax mov [rsi+8], r13d mov rax, [rsp+68h+arg_0] mov [rsi+0Ch], eax movzx eax, r12b mov [rsi+10h], eax push 14h pop rdx mov rdi, r15 call ggml_set_op_params mov dword ptr [r15+50h], 4 test bpl, bpl jz short loc_69F78 mov rdi, [rsp+68h+var_60] mov rsi, r15 call ggml_dup_tensor jmp short loc_69F7A loc_69F78: xor eax, eax loc_69F7A: mov [r15+98h], rax mov [r15+0A0h], r14 mov [r15+0A8h], rbx mov rax, r15 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_69FA1: mov r13, r15 xor ebp, ebp jmp loc_69F1A loc_69FAB: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aGgmlNelementsB; "ggml_nelements(b) <= ggml_nelements(a)" mov ecx, 0CE5h jmp loc_6A080 loc_69FE3: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aGgmlIsContiguo; "ggml_is_contiguous(a)" mov ecx, 0CE6h jmp short loc_6A080 loc_6A018: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aATypeGgmlTypeF; "a->type == GGML_TYPE_F32" mov ecx, 0CE7h jmp short loc_6A080 loc_6A04D: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aBTypeGgmlTypeF; "b->type == GGML_TYPE_F32" mov ecx, 0CE8h loc_6A080: xor eax, eax call _fprintf call ggml_print_backtrace call _abort
long long ggml_acc_impl( long long a1, unsigned int *a2, long long a3, int a4, int a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, long long a15, unsigned __int8 a16) { double v20; // xmm4_8 double v21; // xmm5_8 int v22; // r13d long long v23; // r15 char v24; // bp long long v25; // rax long long v27; // rdi int v28; // [rsp+10h] [rbp-58h] _DWORD v29[18]; // [rsp+20h] [rbp-48h] BYREF if ( *(_QWORD *)(a3 + 40) * *(_QWORD *)(a3 + 32) * *(_QWORD *)(a3 + 16) * *(_QWORD *)(a3 + 24) > *((_QWORD *)a2 + 5) * *((_QWORD *)a2 + 4) * *((_QWORD *)a2 + 2) * *((_QWORD *)a2 + 3) ) { fflush(stdout); v27 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 3301LL, "ggml_nelements(b) <= ggml_nelements(a)"); goto LABEL_20; } if ( !(unsigned __int8)ggml_is_contiguous(a2) ) { fflush(stdout); v27 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 3302LL, "ggml_is_contiguous(a)"); goto LABEL_20; } if ( *a2 ) { fflush(stdout); v27 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 3303LL, "a->type == GGML_TYPE_F32"); goto LABEL_20; } if ( *(_DWORD *)a3 ) { fflush(stdout); v27 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 3304LL, "b->type == GGML_TYPE_F32"); LABEL_20: ggml_print_backtrace(); abort(v27); } v28 = a5; if ( a16 ) { v22 = a6; v23 = ggml_view_tensor(a1, (long long)a2, a7, a8, a9, a10, v20, v21, a13, a14); v24 = 0; } else { if ( *((_QWORD *)a2 + 19) || *(_QWORD *)(a3 + 152) ) { v22 = a6; v24 = 1; } else { v22 = a6; v24 = 0; } v23 = ggml_dup_tensor(a1, a2); } v29[0] = a4; v29[1] = v28; v29[2] = v22; v29[3] = a15; v29[4] = a16; ggml_set_op_params(v23, v29, 20LL); *(_DWORD *)(v23 + 80) = 4; if ( v24 ) v25 = ggml_dup_tensor(a1, (unsigned int *)v23); else v25 = 0LL; *(_QWORD *)(v23 + 152) = v25; *(_QWORD *)(v23 + 160) = a2; *(_QWORD *)(v23 + 168) = a3; return v23; }
ggml_acc_impl: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12,RCX MOV RAX,qword ptr [RDX + 0x18] IMUL RAX,qword ptr [RDX + 0x10] IMUL RAX,qword ptr [RDX + 0x20] IMUL RAX,qword ptr [RDX + 0x28] MOV RCX,qword ptr [RSI + 0x18] IMUL RCX,qword ptr [RSI + 0x10] IMUL RCX,qword ptr [RSI + 0x20] IMUL RCX,qword ptr [RSI + 0x28] CMP RAX,RCX JG 0x00169fab MOV R15,R9 MOV R13,R8 MOV RBX,RDX MOV R14,RSI MOV RBP,RDI MOV RDI,RSI CALL 0x00167db9 TEST AL,AL JZ 0x00169fe3 CMP dword ptr [R14],0x0 JNZ 0x0016a018 CMP dword ptr [RBX],0x0 JNZ 0x0016a04d MOV qword ptr [RSP + 0x18],R12 MOV R12B,byte ptr [RSP + 0x78] TEST R12B,R12B MOV qword ptr [RSP + 0x8],RBP MOV qword ptr [RSP + 0x10],R13 JZ 0x00169efc MOV R13,R15 MOV RDI,RBP MOV RSI,R14 CALL 0x00169922 MOV R15,RAX XOR EBP,EBP JMP 0x00169f2a LAB_00169efc: CMP qword ptr [R14 + 0x98],0x0 JNZ 0x00169f14 CMP qword ptr [RBX + 0x98],0x0 JZ 0x00169fa1 LAB_00169f14: MOV R13,R15 MOV BPL,0x1 LAB_00169f1a: MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R14 CALL 0x00168a65 MOV R15,RAX LAB_00169f2a: LEA RSI,[RSP + 0x20] MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RSI],EAX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RSI + 0x4],EAX MOV dword ptr [RSI + 0x8],R13D MOV RAX,qword ptr [RSP + 0x70] MOV dword ptr [RSI + 0xc],EAX MOVZX EAX,R12B MOV dword ptr [RSI + 0x10],EAX PUSH 0x14 POP RDX MOV RDI,R15 CALL 0x0016ab3d MOV dword ptr [R15 + 0x50],0x4 TEST BPL,BPL JZ 0x00169f78 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,R15 CALL 0x00168a65 JMP 0x00169f7a LAB_00169f78: XOR EAX,EAX LAB_00169f7a: MOV qword ptr [R15 + 0x98],RAX MOV qword ptr [R15 + 0xa0],R14 MOV qword ptr [R15 + 0xa8],RBX MOV RAX,R15 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00169fa1: MOV R13,R15 XOR EBP,EBP JMP 0x00169f1a LAB_00169fab: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a350d] MOV ECX,0xce5 JMP 0x0016a080 LAB_00169fe3: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a1d2f] MOV ECX,0xce6 JMP 0x0016a080 LAB_0016a018: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a2166] MOV ECX,0xce7 JMP 0x0016a080 LAB_0016a04d: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a3534] MOV ECX,0xce8 LAB_0016a080: XOR EAX,EAX CALL 0x0010a8b0 CALL 0x00167550 CALL 0x0010a300
long ggml_acc_impl(int8 param_1,int *param_2,int *param_3,int4 param_4, int4 param_5,int4 param_6,int4 param_7,byte param_8) { bool bVar1; char cVar2; long lVar3; int8 uVar4; long lVar5; FILE *__stream; char *pcVar6; int4 local_48; int4 local_44; int4 local_40; int4 local_3c; uint local_38; lVar3 = *(long *)(param_3 + 6) * *(long *)(param_3 + 4) * *(long *)(param_3 + 8) * *(long *)(param_3 + 10); lVar5 = *(long *)(param_2 + 6) * *(long *)(param_2 + 4) * *(long *)(param_2 + 8) * *(long *)(param_2 + 10); if (lVar3 - lVar5 == 0 || lVar3 < lVar5) { cVar2 = ggml_is_contiguous(param_2); if (cVar2 == '\0') { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar6 = "ggml_is_contiguous(a)"; uVar4 = 0xce6; } else if (*param_2 == 0) { if (*param_3 == 0) { if (param_8 == 0) { if ((*(long *)(param_2 + 0x26) == 0) && (*(long *)(param_3 + 0x26) == 0)) { bVar1 = false; } else { bVar1 = true; } lVar3 = ggml_dup_tensor(param_1,param_2); } else { lVar3 = ggml_view_tensor(param_1,param_2); bVar1 = false; } local_3c = param_7; local_38 = (uint)param_8; local_48 = param_4; local_44 = param_5; local_40 = param_6; ggml_set_op_params(lVar3,&local_48,0x14); *(int4 *)(lVar3 + 0x50) = 4; if (bVar1) { uVar4 = ggml_dup_tensor(param_1,lVar3); } else { uVar4 = 0; } *(int8 *)(lVar3 + 0x98) = uVar4; *(int **)(lVar3 + 0xa0) = param_2; *(int **)(lVar3 + 0xa8) = param_3; return lVar3; } fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar6 = "b->type == GGML_TYPE_F32"; uVar4 = 0xce8; } else { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar6 = "a->type == GGML_TYPE_F32"; uVar4 = 0xce7; } } else { fflush(*(FILE **)PTR_stdout_001d5f48); __stream = *(FILE **)PTR_stderr_001d5fa8; pcVar6 = "ggml_nelements(b) <= ggml_nelements(a)"; uVar4 = 0xce5; } fprintf(__stream,"GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", uVar4,pcVar6); ggml_print_backtrace(); /* WARNING: Subroutine does not return */ abort(); }
46,214
settings::add_checkbox(int, ConfigBoolean&, settings_location, char const*, bool)
untodesu[P]voxelius/game/client/settings.cc
void settings::add_checkbox(int priority, ConfigBoolean &value, settings_location location, const char *name, bool tooltip) { auto setting_value = new SettingValue_CheckBox; setting_value->type = setting_type::CHECKBOX; setting_value->priority = priority; setting_value->has_tooltip = tooltip; setting_value->value = &value; setting_value->name = name; setting_value->refresh_wids(); values[static_cast<unsigned int>(location)].push_back(setting_value); values_all.push_back(setting_value); }
O2
cpp
settings::add_checkbox(int, ConfigBoolean&, settings_location, char const*, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %r8d, %ebp movq %rcx, %r14 movl %edx, %r15d movq %rsi, %r12 movl %edi, %r13d movl $0xc0, %edi callq 0x26940 movq %rax, %rbx movq %rax, %rdi callq 0x65ea4 andl $0x0, 0x8(%rbx) movl %r13d, 0x74(%rbx) movb %bpl, 0x70(%rbx) movq %r12, 0x78(%rbx) leaq 0x50(%rbx), %rdi movq %r14, %rsi callq 0x271c0 movq %rbx, %rdi callq 0x638c8 movl %r15d, %eax imulq $0x18, %rax, %rax leaq 0x1f1db2(%rip), %rdi # 0x256860 addq %rax, %rdi movq %rsp, %r14 movq %rbx, (%r14) movq %r14, %rsi callq 0x6667a movq %rbx, (%r14) leaq 0x1f1d7f(%rip), %rdi # 0x256848 movq %rsp, %rsi callq 0x6667a addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8settings12add_checkboxEiR13ConfigBoolean17settings_locationPKcb: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, r8d mov r14, rcx mov r15d, edx mov r12, rsi mov r13d, edi mov edi, 0C0h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rax; this call _ZN21SettingValue_CheckBoxC2Ev; SettingValue_CheckBox::SettingValue_CheckBox(void) and dword ptr [rbx+8], 0 mov [rbx+74h], r13d mov [rbx+70h], bpl mov [rbx+78h], r12 lea rdi, [rbx+50h] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) mov rdi, rbx; this call _ZN21SettingValue_CheckBox12refresh_widsEv; SettingValue_CheckBox::refresh_wids(void) mov eax, r15d imul rax, 18h lea rdi, _ZL6values; values add rdi, rax mov r14, rsp mov [r14], rbx mov rsi, r14 call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&) mov [r14], rbx lea rdi, _ZL10values_all; values_all mov rsi, rsp call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&) add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long settings::add_checkbox(int a1, long long a2, unsigned int a3, long long a4, char a5) { long long v8; // rbx long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 _QWORD v14[7]; // [rsp-8h] [rbp-38h] BYREF v8 = operator new(0xC0uLL); SettingValue_CheckBox::SettingValue_CheckBox((SettingValue_CheckBox *)v8); *(_DWORD *)(v8 + 8) = 0; *(_DWORD *)(v8 + 116) = a1; *(_BYTE *)(v8 + 112) = a5; *(_QWORD *)(v8 + 120) = a2; std::string::assign(v8 + 80, a4, v9, v10, v11, v12); SettingValue_CheckBox::refresh_wids((SettingValue_CheckBox *)v8); v14[0] = v8; std::vector<SettingValue *>::emplace_back<SettingValue *>(&values[3 * a3], v14); v14[0] = v8; return std::vector<SettingValue *>::emplace_back<SettingValue *>(&values_all, v14); }
add_checkbox: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,R8D MOV R14,RCX MOV R15D,EDX MOV R12,RSI MOV R13D,EDI MOV EDI,0xc0 CALL 0x00126940 MOV RBX,RAX MOV RDI,RAX CALL 0x00165ea4 AND dword ptr [RBX + 0x8],0x0 MOV dword ptr [RBX + 0x74],R13D MOV byte ptr [RBX + 0x70],BPL MOV qword ptr [RBX + 0x78],R12 LEA RDI,[RBX + 0x50] MOV RSI,R14 CALL 0x001271c0 MOV RDI,RBX CALL 0x001638c8 MOV EAX,R15D IMUL RAX,RAX,0x18 LEA RDI,[0x356860] ADD RDI,RAX MOV R14,RSP MOV qword ptr [R14],RBX MOV RSI,R14 CALL 0x0016667a MOV qword ptr [R14],RBX LEA RDI,[0x356848] MOV RSI,RSP CALL 0x0016667a ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* settings::add_checkbox(int, ConfigBoolean&, settings_location, char const*, bool) */ void settings::add_checkbox (int4 param_1,int8 param_2,uint param_3,int8 param_4, SettingValue_CheckBox param_5) { SettingValue_CheckBox *this; SettingValue_CheckBox *local_38; this = (SettingValue_CheckBox *)operator_new(0xc0); SettingValue_CheckBox::SettingValue_CheckBox(this); *(int4 *)(this + 8) = 0; *(int4 *)(this + 0x74) = param_1; this[0x70] = param_5; *(int8 *)(this + 0x78) = param_2; std::__cxx11::string::assign((char *)(this + 0x50)); SettingValue_CheckBox::refresh_wids(this); local_38 = this; std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*> ((vector<SettingValue*,std::allocator<SettingValue*>> *)(&values + (ulong)param_3 * 3), (SettingValue **)&local_38); local_38 = this; std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*> ((vector<SettingValue*,std::allocator<SettingValue*>> *)&values_all, (SettingValue **)&local_38); return; }
46,215
settings::add_checkbox(int, ConfigBoolean&, settings_location, char const*, bool)
untodesu[P]voxelius/game/client/settings.cc
void settings::add_checkbox(int priority, ConfigBoolean &value, settings_location location, const char *name, bool tooltip) { auto setting_value = new SettingValue_CheckBox; setting_value->type = setting_type::CHECKBOX; setting_value->priority = priority; setting_value->has_tooltip = tooltip; setting_value->value = &value; setting_value->name = name; setting_value->refresh_wids(); values[static_cast<unsigned int>(location)].push_back(setting_value); values_all.push_back(setting_value); }
O3
cpp
settings::add_checkbox(int, ConfigBoolean&, settings_location, char const*, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, %r15d movq %rcx, %r14 movl %edx, 0xc(%rsp) movq %rsi, %r12 movl %edi, %r13d movl $0xc0, %edi callq 0x268c0 movq %rax, %rbx addq $0x20, %rax movq %rax, 0x10(%rbx) xorl %eax, %eax movq %rax, 0x18(%rbx) movb %al, 0x20(%rbx) leaq 0x40(%rbx), %rcx movq %rcx, 0x30(%rbx) movq %rax, 0x38(%rbx) movb %al, 0x40(%rbx) leaq 0x50(%rbx), %rbp leaq 0x60(%rbx), %rcx movq %rcx, 0x50(%rbx) movq %rax, 0x58(%rbx) movb %al, 0x60(%rbx) leaq 0x1e6bce(%rip), %rax # 0x251308 movq %rax, (%rbx) movl $0x90, %eax leaq (%rbx,%rax), %rcx movq %rcx, -0x10(%rbx,%rax) movq $0x0, -0x8(%rbx,%rax) movb $0x0, (%rbx,%rax) addq $0x20, %rax cmpq $0xd0, %rax jne 0x6a742 movl $0x0, 0x8(%rbx) movl %r13d, 0x74(%rbx) movb %r15b, 0x70(%rbx) movq %r12, 0x78(%rbx) movq 0x58(%rbx), %r15 movq %r14, %rdi callq 0x26330 movq %rbp, %rdi xorl %esi, %esi movq %r15, %rdx movq %r14, %rcx movq %rax, %r8 callq 0x26dc0 movq %rbx, %rdi callq 0x68b7c movl 0xc(%rsp), %eax leaq (%rax,%rax,2), %rax leaq 0x1f1063(%rip), %rcx # 0x25b810 leaq (%rcx,%rax,8), %rdi leaq 0x10(%rsp), %r14 movq %rbx, (%r14) movq %r14, %rsi callq 0x6c8a4 movq %rbx, (%r14) leaq 0x1f102d(%rip), %rdi # 0x25b7f8 leaq 0x10(%rsp), %rsi callq 0x6c8a4 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8settings12add_checkboxEiR13ConfigBoolean17settings_locationPKcb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15d, r8d mov r14, rcx mov [rsp+48h+var_3C], edx mov r12, rsi mov r13d, edi mov edi, 0C0h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax add rax, 20h ; ' ' mov [rbx+10h], rax xor eax, eax mov [rbx+18h], rax mov [rbx+20h], al lea rcx, [rbx+40h] mov [rbx+30h], rcx mov [rbx+38h], rax mov [rbx+40h], al lea rbp, [rbx+50h] lea rcx, [rbx+60h] mov [rbx+50h], rcx mov [rbx+58h], rax mov [rbx+60h], al lea rax, off_251308 mov [rbx], rax mov eax, 90h loc_6A742: lea rcx, [rbx+rax] mov [rbx+rax-10h], rcx mov qword ptr [rbx+rax-8], 0 mov byte ptr [rbx+rax], 0 add rax, 20h ; ' ' cmp rax, 0D0h jnz short loc_6A742 mov dword ptr [rbx+8], 0 mov [rbx+74h], r13d mov [rbx+70h], r15b mov [rbx+78h], r12 mov r15, [rbx+58h] mov rdi, r14 call _strlen mov rdi, rbp xor esi, esi mov rdx, r15 mov rcx, r14 mov r8, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE10_M_replaceEmmPKcm; std::string::_M_replace(ulong,ulong,char const*,ulong) mov rdi, rbx; this call _ZN21SettingValue_CheckBox12refresh_widsEv; SettingValue_CheckBox::refresh_wids(void) mov eax, [rsp+48h+var_3C] lea rax, [rax+rax*2] lea rcx, _ZL6values; values lea rdi, [rcx+rax*8] lea r14, [rsp+48h+var_38] mov [r14], rbx mov rsi, r14 call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&) mov [r14], rbx lea rdi, _ZL10values_all; values_all lea rsi, [rsp+48h+var_38] call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long settings::add_checkbox(int a1, long long a2, unsigned int a3, long long a4, char a5) { long long v7; // rbx long long i; // rax long long v9; // r15 long long v10; // rax long long v11; // r9 long long v12; // rdx long long v13; // rcx long long v14; // r8 int v15; // r9d _QWORD v18[7]; // [rsp+10h] [rbp-38h] BYREF v7 = operator new(0xC0uLL); *(_QWORD *)(v7 + 16) = v7 + 32; *(_QWORD *)(v7 + 24) = 0LL; *(_BYTE *)(v7 + 32) = 0; *(_QWORD *)(v7 + 48) = v7 + 64; *(_QWORD *)(v7 + 56) = 0LL; *(_BYTE *)(v7 + 64) = 0; *(_QWORD *)(v7 + 80) = v7 + 96; *(_QWORD *)(v7 + 88) = 0LL; *(_BYTE *)(v7 + 96) = 0; *(_QWORD *)v7 = off_251308; for ( i = 144LL; i != 208; i += 32LL ) { *(_QWORD *)(v7 + i - 16) = v7 + i; *(_QWORD *)(v7 + i - 8) = 0LL; *(_BYTE *)(v7 + i) = 0; } *(_DWORD *)(v7 + 8) = 0; *(_DWORD *)(v7 + 116) = a1; *(_BYTE *)(v7 + 112) = a5; *(_QWORD *)(v7 + 120) = a2; v9 = *(_QWORD *)(v7 + 88); v10 = strlen(a4); std::string::_M_replace(v7 + 80, 0LL, v9, a4, v10, v11); SettingValue_CheckBox::refresh_wids((SettingValue_CheckBox *)v7, 0LL, v12, v13, v14, v15); v18[0] = v7; std::vector<SettingValue *>::emplace_back<SettingValue *>(&values[3 * a3], v18); v18[0] = v7; return std::vector<SettingValue *>::emplace_back<SettingValue *>(&values_all, v18); }
add_checkbox: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15D,R8D MOV R14,RCX MOV dword ptr [RSP + 0xc],EDX MOV R12,RSI MOV R13D,EDI MOV EDI,0xc0 CALL 0x001268c0 MOV RBX,RAX ADD RAX,0x20 MOV qword ptr [RBX + 0x10],RAX XOR EAX,EAX MOV qword ptr [RBX + 0x18],RAX MOV byte ptr [RBX + 0x20],AL LEA RCX,[RBX + 0x40] MOV qword ptr [RBX + 0x30],RCX MOV qword ptr [RBX + 0x38],RAX MOV byte ptr [RBX + 0x40],AL LEA RBP,[RBX + 0x50] LEA RCX,[RBX + 0x60] MOV qword ptr [RBX + 0x50],RCX MOV qword ptr [RBX + 0x58],RAX MOV byte ptr [RBX + 0x60],AL LEA RAX,[0x351308] MOV qword ptr [RBX],RAX MOV EAX,0x90 LAB_0016a742: LEA RCX,[RBX + RAX*0x1] MOV qword ptr [RBX + RAX*0x1 + -0x10],RCX MOV qword ptr [RBX + RAX*0x1 + -0x8],0x0 MOV byte ptr [RBX + RAX*0x1],0x0 ADD RAX,0x20 CMP RAX,0xd0 JNZ 0x0016a742 MOV dword ptr [RBX + 0x8],0x0 MOV dword ptr [RBX + 0x74],R13D MOV byte ptr [RBX + 0x70],R15B MOV qword ptr [RBX + 0x78],R12 MOV R15,qword ptr [RBX + 0x58] MOV RDI,R14 CALL 0x00126330 MOV RDI,RBP XOR ESI,ESI MOV RDX,R15 MOV RCX,R14 MOV R8,RAX CALL 0x00126dc0 MOV RDI,RBX CALL 0x00168b7c MOV EAX,dword ptr [RSP + 0xc] LEA RAX,[RAX + RAX*0x2] LEA RCX,[0x35b810] LEA RDI,[RCX + RAX*0x8] LEA R14,[RSP + 0x10] MOV qword ptr [R14],RBX MOV RSI,R14 CALL 0x0016c8a4 MOV qword ptr [R14],RBX LEA RDI,[0x35b7f8] LEA RSI,[RSP + 0x10] CALL 0x0016c8a4 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* settings::add_checkbox(int, ConfigBoolean&, settings_location, char const*, bool) */ void settings::add_checkbox (int4 param_1,int8 param_2,uint param_3,char *param_4, SettingValue_CheckBox param_5) { char *pcVar1; SettingValue_CheckBox *this; long lVar2; SettingValue_CheckBox *local_38; this = (SettingValue_CheckBox *)operator_new(0xc0); *(SettingValue_CheckBox **)(this + 0x10) = this + 0x20; *(int8 *)(this + 0x18) = 0; this[0x20] = (SettingValue_CheckBox)0x0; *(SettingValue_CheckBox **)(this + 0x30) = this + 0x40; *(int8 *)(this + 0x38) = 0; this[0x40] = (SettingValue_CheckBox)0x0; *(SettingValue_CheckBox **)(this + 0x50) = this + 0x60; *(int8 *)(this + 0x58) = 0; this[0x60] = (SettingValue_CheckBox)0x0; *(int ***)this = &PTR__SettingValue_CheckBox_00351308; lVar2 = 0x90; do { *(SettingValue_CheckBox **)(this + lVar2 + -0x10) = this + lVar2; *(int8 *)(this + lVar2 + -8) = 0; this[lVar2] = (SettingValue_CheckBox)0x0; lVar2 = lVar2 + 0x20; } while (lVar2 != 0xd0); *(int4 *)(this + 8) = 0; *(int4 *)(this + 0x74) = param_1; this[0x70] = param_5; *(int8 *)(this + 0x78) = param_2; pcVar1 = *(char **)(this + 0x58); strlen(param_4); std::__cxx11::string::_M_replace((ulong)(this + 0x50),0,pcVar1,(ulong)param_4); SettingValue_CheckBox::refresh_wids(this); local_38 = this; std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*> ((vector<SettingValue*,std::allocator<SettingValue*>> *)(&values + (ulong)param_3 * 3), (SettingValue **)&local_38); local_38 = this; std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*> ((vector<SettingValue*,std::allocator<SettingValue*>> *)&values_all, (SettingValue **)&local_38); return; }
46,216
R3D_SetBloomMode
r3d/src/r3d_environment.c
void R3D_SetBloomMode(R3D_Bloom mode) { R3D.env.bloomMode = mode; if (mode != R3D_BLOOM_DISABLED) { if (R3D.framebuffer.pingPongBloom.id == 0) { r3d_framebuffer_load_pingpong_bloom( R3D.state.resolution.width, R3D.state.resolution.height ); } if (R3D.shader.screen.bloom.id == 0) { r3d_shader_load_screen_bloom(); } } }
O3
c
R3D_SetBloomMode: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0xf2774(%rip), %rbx # 0x1affb0 movl %edi, 0x14e8(%rbx) testl %edi, %edi je 0xbd866 cmpl $0x0, 0x40(%rbx) jne 0xbd85d movl 0x1700(%rbx), %edi movl 0x1704(%rbx), %esi callq 0xbfb85 cmpl $0x0, 0x139c(%rbx) je 0xbd86d addq $0x8, %rsp popq %rbx popq %rbp retq addq $0x8, %rsp popq %rbx popq %rbp jmp 0xc3306
R3D_SetBloomMode: push rbp mov rbp, rsp push rbx push rax lea rbx, R3D mov [rbx+14E8h], edi test edi, edi jz short loc_BD866 cmp dword ptr [rbx+40h], 0 jnz short loc_BD85D mov edi, [rbx+1700h] mov esi, [rbx+1704h] call r3d_framebuffer_load_pingpong_bloom loc_BD85D: cmp dword ptr [rbx+139Ch], 0 jz short loc_BD86D loc_BD866: add rsp, 8 pop rbx pop rbp retn loc_BD86D: add rsp, 8 pop rbx pop rbp jmp r3d_shader_load_screen_bloom
long long R3D_SetBloomMode(int a1) { long long result; // rax *((_DWORD *)&R3D + 1338) = a1; if ( a1 ) { if ( !*((_DWORD *)&R3D + 16) ) result = r3d_framebuffer_load_pingpong_bloom(*((unsigned int *)&R3D + 1472), *((unsigned int *)&R3D + 1473)); if ( !*((_DWORD *)&R3D + 1255) ) return r3d_shader_load_screen_bloom(); } return result; }
R3D_SetBloomMode: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0x2affb0] MOV dword ptr [RBX + 0x14e8],EDI TEST EDI,EDI JZ 0x001bd866 CMP dword ptr [RBX + 0x40],0x0 JNZ 0x001bd85d MOV EDI,dword ptr [RBX + 0x1700] MOV ESI,dword ptr [RBX + 0x1704] CALL 0x001bfb85 LAB_001bd85d: CMP dword ptr [RBX + 0x139c],0x0 JZ 0x001bd86d LAB_001bd866: ADD RSP,0x8 POP RBX POP RBP RET LAB_001bd86d: ADD RSP,0x8 POP RBX POP RBP JMP 0x001c3306
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void R3D_SetBloomMode(int param_1) { DAT_002b1494._4_4_ = param_1; if (param_1 != 0) { if (_DAT_002afff0 == 0) { r3d_framebuffer_load_pingpong_bloom(DAT_002b16b0,DAT_002b16b4); } if (DAT_002b134c == 0) { r3d_shader_load_screen_bloom(); return; } } return; }
46,217
settings::add_slider(int, ConfigInt&, settings_location, char const*, bool)
untodesu[P]voxelius/game/client/settings.cc
void settings::add_slider(int priority, ConfigInt &value, settings_location location, const char *name, bool tooltip) { auto setting_value = new SettingValue_SliderInt; setting_value->type = setting_type::SLIDER_INT; setting_value->priority = priority; setting_value->has_tooltip = tooltip; setting_value->value = &value; setting_value->name = name; setting_value->wid = fmt::format("###{}", static_cast<const void *>(setting_value->value)); values[static_cast<unsigned int>(location)].push_back(setting_value); values_all.push_back(setting_value); }
O2
cpp
settings::add_slider(int, ConfigInt&, settings_location, char const*, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %r14d movq %rcx, %r15 movl %edx, %ebp movq %rsi, %r12 movl %edi, %r13d movl $0xa0, %edi callq 0x26940 movq %rax, %rbx movq %rax, %rdi callq 0x65f54 movl $0x5, 0x8(%rbx) movl %r13d, 0x74(%rbx) movb %r14b, 0x70(%rbx) movq %r12, 0x98(%rbx) leaq 0x50(%rbx), %rdi movq %r15, %rsi callq 0x271c0 movq 0x98(%rbx), %rax movq %rsp, %rcx movq %rax, (%rcx) leaq 0x111636(%rip), %rsi # 0x1764c3 leaq 0x8(%rsp), %r14 pushq $0x5 popq %rdx movq %r14, %rdi callq 0x65e81 leaq 0x78(%rbx), %rdi movq %r14, %rsi callq 0x26b30 movq %r14, %rdi callq 0x272a8 movl %ebp, %eax imulq $0x18, %rax, %rax leaq 0x1f19a2(%rip), %rdi # 0x256860 addq %rax, %rdi movq %rbx, (%r14) leaq 0x8(%rsp), %r14 movq %r14, %rsi callq 0x6667a movq %rbx, (%r14) leaq 0x1f196d(%rip), %rdi # 0x256848 leaq 0x8(%rsp), %rsi callq 0x6667a addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN8settings10add_sliderEiR9ConfigInt17settings_locationPKcb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14d, r8d mov r15, rcx mov ebp, edx mov r12, rsi mov r13d, edi mov edi, 0A0h; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rax; this call _ZN22SettingValue_SliderIntC2Ev; SettingValue_SliderInt::SettingValue_SliderInt(void) mov dword ptr [rbx+8], 5 mov [rbx+74h], r13d mov [rbx+70h], r14b mov [rbx+98h], r12 lea rdi, [rbx+50h] mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6assignEPKc; std::string::assign(char const*) mov rax, [rbx+98h] mov rcx, rsp mov [rcx], rax lea rsi, asc_1764C0+3; "###{}" lea r14, [rsp+58h+var_50] push 5 pop rdx mov rdi, r14 call _ZN3fmt3v116formatIJPKvEEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_19basic_format_stringIcJDpNS0_13type_identityIT_E4typeEEEEDpOSC_; fmt::v11::format<void const*>(fmt::v11::basic_format_string<char,fmt::v11::type_identity<void const*>::type>,void const*&&) lea rdi, [rbx+78h] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov eax, ebp imul rax, 18h lea rdi, _ZL6values; values add rdi, rax mov [r14], rbx lea r14, [rsp+58h+var_50] mov rsi, r14 call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&) mov [r14], rbx lea rdi, _ZL10values_all; values_all lea rsi, [rsp+58h+var_50] call _ZNSt6vectorIP12SettingValueSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<SettingValue *>::emplace_back<SettingValue *>(SettingValue * &&) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long settings::add_slider(int a1, long long a2, unsigned int a3, long long a4, char a5) { long long v8; // rbx long long v9; // rdx long long v10; // rcx long long v11; // r8 long long v12; // r9 long long v14; // [rsp+0h] [rbp-58h] BYREF _QWORD v15[10]; // [rsp+8h] [rbp-50h] BYREF v8 = operator new(0xA0uLL); SettingValue_SliderInt::SettingValue_SliderInt((SettingValue_SliderInt *)v8); *(_DWORD *)(v8 + 8) = 5; *(_DWORD *)(v8 + 116) = a1; *(_BYTE *)(v8 + 112) = a5; *(_QWORD *)(v8 + 152) = a2; std::string::assign(v8 + 80, a4, v9, v10, v11, v12); v14 = *(_QWORD *)(v8 + 152); fmt::v11::format<void const*>(v15, "###{}", 5LL, &v14); std::string::operator=(v8 + 120, v15); std::string::~string(v15); v15[0] = v8; std::vector<SettingValue *>::emplace_back<SettingValue *>(&values[3 * a3], v15); v15[0] = v8; return std::vector<SettingValue *>::emplace_back<SettingValue *>(&values_all, v15); }
add_slider: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14D,R8D MOV R15,RCX MOV EBP,EDX MOV R12,RSI MOV R13D,EDI MOV EDI,0xa0 CALL 0x00126940 MOV RBX,RAX MOV RDI,RAX CALL 0x00165f54 MOV dword ptr [RBX + 0x8],0x5 MOV dword ptr [RBX + 0x74],R13D MOV byte ptr [RBX + 0x70],R14B MOV qword ptr [RBX + 0x98],R12 LEA RDI,[RBX + 0x50] MOV RSI,R15 CALL 0x001271c0 MOV RAX,qword ptr [RBX + 0x98] MOV RCX,RSP MOV qword ptr [RCX],RAX LEA RSI,[0x2764c3] LEA R14,[RSP + 0x8] PUSH 0x5 POP RDX MOV RDI,R14 CALL 0x00165e81 LEA RDI,[RBX + 0x78] MOV RSI,R14 CALL 0x00126b30 MOV RDI,R14 CALL 0x001272a8 MOV EAX,EBP IMUL RAX,RAX,0x18 LEA RDI,[0x356860] ADD RDI,RAX MOV qword ptr [R14],RBX LEA R14,[RSP + 0x8] MOV RSI,R14 CALL 0x0016667a MOV qword ptr [R14],RBX LEA RDI,[0x356848] LEA RSI,[RSP + 0x8] CALL 0x0016667a ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* settings::add_slider(int, ConfigInt&, settings_location, char const*, bool) */ void settings::add_slider (int4 param_1,int8 param_2,uint param_3,int8 param_4, SettingValue_SliderInt param_5) { SettingValue_SliderInt *this; SettingValue_SliderInt *local_50 [4]; this = (SettingValue_SliderInt *)operator_new(0xa0); SettingValue_SliderInt::SettingValue_SliderInt(this); *(int4 *)(this + 8) = 5; *(int4 *)(this + 0x74) = param_1; this[0x70] = param_5; *(int8 *)(this + 0x98) = param_2; std::__cxx11::string::assign((char *)(this + 0x50)); fmt::v11::format<void_const*>((string *)local_50,"###{}",5); std::__cxx11::string::operator=((string *)(this + 0x78),(string *)local_50); std::__cxx11::string::~string((string *)local_50); local_50[0] = this; std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*> ((vector<SettingValue*,std::allocator<SettingValue*>> *)(&values + (ulong)param_3 * 3), (SettingValue **)local_50); local_50[0] = this; std::vector<SettingValue*,std::allocator<SettingValue*>>::emplace_back<SettingValue*> ((vector<SettingValue*,std::allocator<SettingValue*>> *)&values_all, (SettingValue **)local_50); return; }
46,218
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp
void QuadRefinement::populateVertexEdgesFromParentVertices() { for (int pVert = 0; pVert < _parent->getNumVertices(); ++pVert) { int cVert = _vertChildVertIndex[pVert]; if (!IndexIsValid(cVert)) continue; ConstIndexArray pVertEdges = _parent->getVertexEdges(pVert); ConstLocalIndexArray pVertInEdge = _parent->getVertexEdgeLocalIndices(pVert); // // Reserve enough vert-edges, populate and trim to the actual size: // _child->resizeVertexEdges(cVert, pVertEdges.size()); IndexArray cVertEdges = _child->getVertexEdges(cVert); LocalIndexArray cVertInEdge = _child->getVertexEdgeLocalIndices(cVert); int cVertEdgeCount = 0; for (int i = 0; i < pVertEdges.size(); ++i) { Index pEdgeIndex = pVertEdges[i]; LocalIndex pEdgeVert = pVertInEdge[i]; Index pEdgeChildIndex = getEdgeChildEdges(pEdgeIndex)[pEdgeVert]; if (IndexIsValid(pEdgeChildIndex)) { cVertEdges[cVertEdgeCount] = pEdgeChildIndex; cVertInEdge[cVertEdgeCount] = 1; cVertEdgeCount++; } } _child->trimVertexEdges(cVert, cVertEdgeCount); } }
O0
cpp
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices(): pushq %rbp movq %rsp, %rbp subq $0xf0, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xd0(%rbp) movl $0x0, -0xc(%rbp) movq -0xd0(%rbp), %rax movl -0xc(%rbp), %ecx movl %ecx, -0xd4(%rbp) movq 0x8(%rax), %rdi callq 0xc8fe0 movl %eax, %ecx movl -0xd4(%rbp), %eax cmpl %ecx, %eax jge 0xfbcb5 movq -0xd0(%rbp), %rdi addq $0xf0, %rdi movslq -0xc(%rbp), %rsi callq 0xc7140 movl (%rax), %eax movl %eax, -0x10(%rbp) movl -0x10(%rbp), %edi callq 0xd63b0 testb $0x1, %al jne 0xfba77 jmp 0xfbca7 movq -0xd0(%rbp), %rax movq 0x8(%rax), %rdi movl -0xc(%rbp), %esi callq 0xd31e0 movq %rax, %rcx movq -0xd0(%rbp), %rax movl %edx, -0x28(%rbp) movq %rcx, -0x30(%rbp) movl -0x28(%rbp), %ecx movl %ecx, -0x18(%rbp) movq -0x30(%rbp), %rcx movq %rcx, -0x20(%rbp) movq 0x8(%rax), %rdi movl -0xc(%rbp), %esi callq 0xc4440 movq %rax, %rcx movq -0xd0(%rbp), %rax movl %edx, -0x48(%rbp) movq %rcx, -0x50(%rbp) movl -0x48(%rbp), %ecx movl %ecx, -0x38(%rbp) movq -0x50(%rbp), %rcx movq %rcx, -0x40(%rbp) movq 0x10(%rax), %rax movq %rax, -0xe0(%rbp) movl -0x10(%rbp), %eax movl %eax, -0xd8(%rbp) leaq -0x20(%rbp), %rdi callq 0xcc250 movq -0xe0(%rbp), %rdi movl -0xd8(%rbp), %esi movl %eax, %edx callq 0xc3ee0 movq -0xd0(%rbp), %rax movq 0x10(%rax), %rdi movl -0x10(%rbp), %esi callq 0xc3970 movq %rax, %rcx movq -0xd0(%rbp), %rax movl %edx, -0x68(%rbp) movq %rcx, -0x70(%rbp) movl -0x68(%rbp), %ecx movl %ecx, -0x58(%rbp) movq -0x70(%rbp), %rcx movq %rcx, -0x60(%rbp) movq 0x10(%rax), %rdi movl -0x10(%rbp), %esi callq 0xca110 movl %edx, -0x88(%rbp) movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x88(%rbp), %eax movl %eax, -0x78(%rbp) movl $0x0, -0x94(%rbp) movl $0x0, -0x98(%rbp) movl -0x98(%rbp), %eax movl %eax, -0xe4(%rbp) leaq -0x20(%rbp), %rdi callq 0xcc250 movl %eax, %ecx movl -0xe4(%rbp), %eax cmpl %ecx, %eax jge 0xfbc8e movl -0x98(%rbp), %esi leaq -0x20(%rbp), %rdi callq 0xcabf0 movl (%rax), %eax movl %eax, -0x9c(%rbp) movl -0x98(%rbp), %esi leaq -0x40(%rbp), %rdi callq 0xcafa0 movq -0xd0(%rbp), %rdi movw (%rax), %ax movw %ax, -0x9e(%rbp) movl -0x9c(%rbp), %esi callq 0xd6850 movl %edx, -0xc0(%rbp) movq %rax, -0xc8(%rbp) movq -0xc8(%rbp), %rax movq %rax, -0xb8(%rbp) movl -0xc0(%rbp), %eax movl %eax, -0xb0(%rbp) movzwl -0x9e(%rbp), %esi leaq -0xb8(%rbp), %rdi callq 0xc37f0 movl (%rax), %eax movl %eax, -0xa4(%rbp) movl -0xa4(%rbp), %edi callq 0xd63b0 testb $0x1, %al jne 0xfbc32 jmp 0xfbc78 movl -0xa4(%rbp), %eax movl %eax, -0xe8(%rbp) movl -0x94(%rbp), %esi leaq -0x60(%rbp), %rdi callq 0xc37f0 movl -0xe8(%rbp), %ecx movl %ecx, (%rax) movl -0x94(%rbp), %esi leaq -0x80(%rbp), %rdi callq 0xd1fd0 movw $0x1, (%rax) movl -0x94(%rbp), %eax addl $0x1, %eax movl %eax, -0x94(%rbp) jmp 0xfbc7a movl -0x98(%rbp), %eax addl $0x1, %eax movl %eax, -0x98(%rbp) jmp 0xfbb78 movq -0xd0(%rbp), %rax movq 0x10(%rax), %rdi movl -0x10(%rbp), %esi movl -0x94(%rbp), %edx callq 0xcdf60 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0xfba21 addq $0xf0, %rsp popq %rbp retq nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement37populateVertexEdgesFromParentVerticesEv: push rbp mov rbp, rsp sub rsp, 0F0h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_D0], rax mov dword ptr [rbp+var_10+4], 0 loc_FBA21: mov rax, [rbp+var_D0] mov ecx, dword ptr [rbp+var_10+4] mov [rbp+var_D4], ecx mov rdi, [rax+8]; this call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getNumVerticesEv; OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(void) mov ecx, eax mov eax, [rbp+var_D4] cmp eax, ecx jge loc_FBCB5 mov rdi, [rbp+var_D0] add rdi, 0F0h movsxd rsi, dword ptr [rbp+var_10+4]; int call __ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov eax, [rax] mov dword ptr [rbp+var_10], eax mov edi, dword ptr [rbp+var_10]; this call __ZN10OpenSubdiv6v3_6_03Vtr12IndexIsValidEi; OpenSubdiv::v3_6_0::Vtr::IndexIsValid(int) test al, 1 jnz short loc_FBA77 jmp loc_FBCA7 loc_FBA77: mov rax, [rbp+var_D0] mov rdi, [rax+8]; this mov esi, dword ptr [rbp+var_10+4]; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int) mov rcx, rax mov rax, [rbp+var_D0] mov [rbp+var_28], edx mov [rbp+var_30], rcx mov ecx, [rbp+var_28] mov [rbp+var_18], ecx mov rcx, [rbp+var_30] mov [rbp+var_20], rcx mov rdi, [rax+8]; this mov esi, dword ptr [rbp+var_10+4]; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexEdgeLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices(int) mov rcx, rax mov rax, [rbp+var_D0] mov [rbp+var_48], edx mov [rbp+var_50], rcx mov ecx, [rbp+var_48] mov [rbp+var_38], ecx mov rcx, [rbp+var_50] mov [rbp+var_40], rcx mov rax, [rax+10h] mov [rbp+var_E0], rax mov eax, dword ptr [rbp+var_10] mov [rbp+var_D8], eax lea rdi, [rbp+var_20] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void) mov rdi, [rbp+var_E0]; this mov esi, [rbp+var_D8]; int mov edx, eax; int call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level17resizeVertexEdgesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::resizeVertexEdges(int,int) mov rax, [rbp+var_D0] mov rdi, [rax+10h]; this mov esi, dword ptr [rbp+var_10]; int call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int) mov rcx, rax mov rax, [rbp+var_D0] mov [rbp+var_68], edx mov [rbp+var_70], rcx mov ecx, [rbp+var_68] mov [rbp+var_58], ecx mov rcx, [rbp+var_70] mov [rbp+var_60], rcx mov rdi, [rax+10h]; this mov esi, dword ptr [rbp+var_10]; int call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexEdgeLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices(int) mov [rbp+var_88], edx mov [rbp+var_90], rax mov rax, [rbp+var_90] mov [rbp+var_80], rax mov eax, [rbp+var_88] mov [rbp+var_78], eax mov [rbp+var_94], 0 mov [rbp+var_98], 0 loc_FBB78: mov eax, [rbp+var_98] mov [rbp+var_E4], eax lea rdi, [rbp+var_20] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiE4sizeEv; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(void) mov ecx, eax mov eax, [rbp+var_E4] cmp eax, ecx jge loc_FBC8E mov esi, [rbp+var_98] lea rdi, [rbp+var_20] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](int) mov eax, [rax] mov [rbp+var_9C], eax mov esi, [rbp+var_98] lea rdi, [rbp+var_40] call __ZNK10OpenSubdiv6v3_6_03Vtr10ConstArrayItEixEi; OpenSubdiv::v3_6_0::Vtr::ConstArray<ushort>::operator[](int) mov rdi, [rbp+var_D0]; this mov ax, [rax] mov word ptr [rbp+var_A4+6], ax mov esi, [rbp+var_9C]; int call __ZN10OpenSubdiv6v3_6_03Vtr8internal10Refinement17getEdgeChildEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getEdgeChildEdges(int) mov [rbp+var_C0], edx mov [rbp+var_C8], rax mov rax, [rbp+var_C8] mov [rbp+var_B8], rax mov eax, [rbp+var_C0] mov [rbp+var_B0], eax movzx esi, word ptr [rbp+var_A4+6]; int lea rdi, [rbp+var_B8] call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int) mov eax, [rax] mov dword ptr [rbp+var_A4], eax mov edi, dword ptr [rbp+var_A4]; this call __ZN10OpenSubdiv6v3_6_03Vtr12IndexIsValidEi; OpenSubdiv::v3_6_0::Vtr::IndexIsValid(int) test al, 1 jnz short loc_FBC32 jmp short loc_FBC78 loc_FBC32: mov eax, dword ptr [rbp+var_A4] mov [rbp+var_E8], eax mov esi, [rbp+var_94] lea rdi, [rbp+var_60] call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayIiEixEi; OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](int) mov ecx, [rbp+var_E8] mov [rax], ecx mov esi, [rbp+var_94] lea rdi, [rbp+var_80] call __ZN10OpenSubdiv6v3_6_03Vtr5ArrayItEixEi; OpenSubdiv::v3_6_0::Vtr::Array<ushort>::operator[](int) mov word ptr [rax], 1 mov eax, [rbp+var_94] add eax, 1 mov [rbp+var_94], eax loc_FBC78: jmp short $+2 loc_FBC7A: mov eax, [rbp+var_98] add eax, 1 mov [rbp+var_98], eax jmp loc_FBB78 loc_FBC8E: mov rax, [rbp+var_D0] mov rdi, [rax+10h]; this mov esi, dword ptr [rbp+var_10]; int mov edx, [rbp+var_94]; int call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level15trimVertexEdgesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::trimVertexEdges(int,int) loc_FBCA7: mov eax, dword ptr [rbp+var_10+4] add eax, 1 mov dword ptr [rbp+var_10+4], eax jmp loc_FBA21 loc_FBCB5: add rsp, 0F0h pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices( OpenSubdiv::v3_6_0::Vtr::internal::Level **this) { int NumVertices; // ecx long long result; // rax int v3; // esi long long VertexEdges; // rax int v5; // edx long long VertexEdgeLocalIndices; // rax int v7; // edx int v8; // eax long long v9; // rax int v10; // edx long long v11; // rax int v12; // edx int v13; // edx int v14; // esi unsigned int v15; // [rsp+8h] [rbp-E8h] int v16; // [rsp+Ch] [rbp-E4h] OpenSubdiv::v3_6_0::Vtr::internal::Level *v17; // [rsp+10h] [rbp-E0h] unsigned int v18; // [rsp+18h] [rbp-D8h] int v19; // [rsp+1Ch] [rbp-D4h] long long EdgeChildEdges; // [rsp+38h] [rbp-B8h] BYREF int v21; // [rsp+40h] [rbp-B0h] unsigned int v22; // [rsp+4Ch] [rbp-A4h] unsigned __int16 v23; // [rsp+52h] [rbp-9Eh] int v24; // [rsp+54h] [rbp-9Ch] unsigned int j; // [rsp+58h] [rbp-98h] int v26; // [rsp+5Ch] [rbp-94h] long long v27; // [rsp+60h] [rbp-90h] int v28; // [rsp+68h] [rbp-88h] long long v29; // [rsp+70h] [rbp-80h] BYREF int v30; // [rsp+78h] [rbp-78h] long long v31; // [rsp+80h] [rbp-70h] int v32; // [rsp+88h] [rbp-68h] long long v33; // [rsp+90h] [rbp-60h] BYREF int v34; // [rsp+98h] [rbp-58h] long long v35; // [rsp+A0h] [rbp-50h] int v36; // [rsp+A8h] [rbp-48h] long long v37; // [rsp+B0h] [rbp-40h] BYREF int v38; // [rsp+B8h] [rbp-38h] long long v39; // [rsp+C0h] [rbp-30h] int v40; // [rsp+C8h] [rbp-28h] long long v41; // [rsp+D0h] [rbp-20h] BYREF int v42; // [rsp+D8h] [rbp-18h] unsigned int v43; // [rsp+E0h] [rbp-10h] int i; // [rsp+E4h] [rbp-Ch] OpenSubdiv::v3_6_0::Vtr::internal::Level **v45; // [rsp+E8h] [rbp-8h] v45 = this; for ( i = 0; ; ++i ) { v19 = i; NumVertices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getNumVertices(this[1]); result = (unsigned int)v19; if ( v19 >= NumVertices ) break; v3 = i; v43 = *(_DWORD *)std::vector<int>::operator[](this + 30, i); if ( (OpenSubdiv::v3_6_0::Vtr::IndexIsValid((OpenSubdiv::v3_6_0::Vtr *)v43, v3) & 1) != 0 ) { VertexEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(this[1], i); v40 = v5; v39 = VertexEdges; v42 = v5; v41 = VertexEdges; VertexEdgeLocalIndices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices(this[1], i); v36 = v7; v35 = VertexEdgeLocalIndices; v38 = v7; v37 = VertexEdgeLocalIndices; v17 = this[2]; v18 = v43; v8 = OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v41); OpenSubdiv::v3_6_0::Vtr::internal::Level::resizeVertexEdges(v17, v18, v8); v9 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(this[2], v43); v32 = v10; v31 = v9; v34 = v10; v33 = v9; v11 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices(this[2], v43); v28 = v12; v27 = v11; v29 = v11; v30 = v12; v26 = 0; for ( j = 0; ; ++j ) { v16 = j; if ( v16 >= (int)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::size(&v41) ) break; v24 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<int>::operator[](&v41, j); v23 = *(_WORD *)OpenSubdiv::v3_6_0::Vtr::ConstArray<unsigned short>::operator[](&v37, j); EdgeChildEdges = OpenSubdiv::v3_6_0::Vtr::internal::Refinement::getEdgeChildEdges( (OpenSubdiv::v3_6_0::Vtr::internal::Refinement *)this, v24); v21 = v13; v14 = v23; v22 = *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&EdgeChildEdges, v23); if ( (OpenSubdiv::v3_6_0::Vtr::IndexIsValid((OpenSubdiv::v3_6_0::Vtr *)v22, v14) & 1) != 0 ) { v15 = v22; *(_DWORD *)OpenSubdiv::v3_6_0::Vtr::Array<int>::operator[](&v33, (unsigned int)v26) = v15; *(_WORD *)OpenSubdiv::v3_6_0::Vtr::Array<unsigned short>::operator[](&v29, (unsigned int)v26++) = 1; } } OpenSubdiv::v3_6_0::Vtr::internal::Level::trimVertexEdges(this[2], v43, v26); } } return result; }
populateVertexEdgesFromParentVertices: PUSH RBP MOV RBP,RSP SUB RSP,0xf0 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xd0],RAX MOV dword ptr [RBP + -0xc],0x0 LAB_001fba21: MOV RAX,qword ptr [RBP + -0xd0] MOV ECX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0xd4],ECX MOV RDI,qword ptr [RAX + 0x8] CALL 0x001c8fe0 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0xd4] CMP EAX,ECX JGE 0x001fbcb5 MOV RDI,qword ptr [RBP + -0xd0] ADD RDI,0xf0 MOVSXD RSI,dword ptr [RBP + -0xc] CALL 0x001c7140 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x10],EAX MOV EDI,dword ptr [RBP + -0x10] CALL 0x001d63b0 TEST AL,0x1 JNZ 0x001fba77 JMP 0x001fbca7 LAB_001fba77: MOV RAX,qword ptr [RBP + -0xd0] MOV RDI,qword ptr [RAX + 0x8] MOV ESI,dword ptr [RBP + -0xc] CALL 0x001d31e0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0x28],EDX MOV qword ptr [RBP + -0x30],RCX MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x18],ECX MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x20],RCX MOV RDI,qword ptr [RAX + 0x8] MOV ESI,dword ptr [RBP + -0xc] CALL 0x001c4440 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0x48],EDX MOV qword ptr [RBP + -0x50],RCX MOV ECX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x38],ECX MOV RCX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x40],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0xe0],RAX MOV EAX,dword ptr [RBP + -0x10] MOV dword ptr [RBP + -0xd8],EAX LEA RDI,[RBP + -0x20] CALL 0x001cc250 MOV RDI,qword ptr [RBP + -0xe0] MOV ESI,dword ptr [RBP + -0xd8] MOV EDX,EAX CALL 0x001c3ee0 MOV RAX,qword ptr [RBP + -0xd0] MOV RDI,qword ptr [RAX + 0x10] MOV ESI,dword ptr [RBP + -0x10] CALL 0x001c3970 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xd0] MOV dword ptr [RBP + -0x68],EDX MOV qword ptr [RBP + -0x70],RCX MOV ECX,dword ptr [RBP + -0x68] MOV dword ptr [RBP + -0x58],ECX MOV RCX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x60],RCX MOV RDI,qword ptr [RAX + 0x10] MOV ESI,dword ptr [RBP + -0x10] CALL 0x001ca110 MOV dword ptr [RBP + -0x88],EDX MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x80],RAX MOV EAX,dword ptr [RBP + -0x88] MOV dword ptr [RBP + -0x78],EAX MOV dword ptr [RBP + -0x94],0x0 MOV dword ptr [RBP + -0x98],0x0 LAB_001fbb78: MOV EAX,dword ptr [RBP + -0x98] MOV dword ptr [RBP + -0xe4],EAX LEA RDI,[RBP + -0x20] CALL 0x001cc250 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0xe4] CMP EAX,ECX JGE 0x001fbc8e MOV ESI,dword ptr [RBP + -0x98] LEA RDI,[RBP + -0x20] CALL 0x001cabf0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x9c],EAX MOV ESI,dword ptr [RBP + -0x98] LEA RDI,[RBP + -0x40] CALL 0x001cafa0 MOV RDI,qword ptr [RBP + -0xd0] MOV AX,word ptr [RAX] MOV word ptr [RBP + -0x9e],AX MOV ESI,dword ptr [RBP + -0x9c] CALL 0x001d6850 MOV dword ptr [RBP + -0xc0],EDX MOV qword ptr [RBP + -0xc8],RAX MOV RAX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0xb8],RAX MOV EAX,dword ptr [RBP + -0xc0] MOV dword ptr [RBP + -0xb0],EAX MOVZX ESI,word ptr [RBP + -0x9e] LEA RDI,[RBP + -0xb8] CALL 0x001c37f0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xa4],EAX MOV EDI,dword ptr [RBP + -0xa4] CALL 0x001d63b0 TEST AL,0x1 JNZ 0x001fbc32 JMP 0x001fbc78 LAB_001fbc32: MOV EAX,dword ptr [RBP + -0xa4] MOV dword ptr [RBP + -0xe8],EAX MOV ESI,dword ptr [RBP + -0x94] LEA RDI,[RBP + -0x60] CALL 0x001c37f0 MOV ECX,dword ptr [RBP + -0xe8] MOV dword ptr [RAX],ECX MOV ESI,dword ptr [RBP + -0x94] LEA RDI,[RBP + -0x80] CALL 0x001d1fd0 MOV word ptr [RAX],0x1 MOV EAX,dword ptr [RBP + -0x94] ADD EAX,0x1 MOV dword ptr [RBP + -0x94],EAX LAB_001fbc78: JMP 0x001fbc7a LAB_001fbc7a: MOV EAX,dword ptr [RBP + -0x98] ADD EAX,0x1 MOV dword ptr [RBP + -0x98],EAX JMP 0x001fbb78 LAB_001fbc8e: MOV RAX,qword ptr [RBP + -0xd0] MOV RDI,qword ptr [RAX + 0x10] MOV ESI,dword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x94] CALL 0x001cdf60 LAB_001fbca7: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x001fba21 LAB_001fbcb5: ADD RSP,0xf0 POP RBP RET
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices (QuadRefinement *this) { Level *this_00; int iVar1; int iVar2; int *piVar3; ulong uVar4; ushort *puVar5; int2 *puVar6; int1 auVar7 [12]; int1 local_c0 [12]; int local_ac; ushort local_a6; int local_a4; int local_a0; int local_9c; int1 local_98 [12]; int1 local_88 [12]; int1 local_78 [12]; int1 local_68 [12]; int1 local_58 [12]; int1 local_48 [12]; int1 local_38 [12]; int1 local_28 [12]; int local_18; int local_14; QuadRefinement *local_10; local_14 = 0; local_10 = this; while( true ) { iVar1 = local_14; iVar2 = Level::getNumVertices(*(Level **)(this + 8)); if (iVar2 <= iVar1) break; piVar3 = (int *)std::vector<int,std::allocator<int>>::operator[] ((vector<int,std::allocator<int>> *)(this + 0xf0),(long)local_14); local_18 = *piVar3; uVar4 = IndexIsValid(local_18); if ((uVar4 & 1) != 0) { auVar7 = Level::getVertexEdges(*(Level **)(this + 8),local_14); local_38 = auVar7; local_28 = auVar7; auVar7 = Level::getVertexEdgeLocalIndices(*(Level **)(this + 8),local_14); iVar1 = local_18; this_00 = *(Level **)(this + 0x10); local_58 = auVar7; local_48 = auVar7; iVar2 = ConstArray<int>::size((ConstArray<int> *)local_28); Level::resizeVertexEdges(this_00,iVar1,iVar2); auVar7 = Level::getVertexEdges(*(Level **)(this + 0x10),local_18); local_78 = auVar7; local_68 = auVar7; auVar7 = Level::getVertexEdgeLocalIndices(*(Level **)(this + 0x10),local_18); local_9c = 0; local_a0 = 0; local_88 = auVar7; while( true ) { iVar1 = local_a0; local_98 = auVar7; iVar2 = ConstArray<int>::size((ConstArray<int> *)local_28); if (iVar2 <= iVar1) break; piVar3 = (int *)ConstArray<int>::operator[]((ConstArray<int> *)local_28,local_a0); local_a4 = *piVar3; puVar5 = (ushort *) ConstArray<unsigned_short>::operator[] ((ConstArray<unsigned_short> *)local_48,local_a0); local_a6 = *puVar5; auVar7 = Refinement::getEdgeChildEdges((Refinement *)this,local_a4); local_c0 = auVar7; piVar3 = (int *)Array<int>::operator[]((Array<int> *)local_c0,(uint)local_a6); local_ac = *piVar3; uVar4 = IndexIsValid(local_ac); iVar1 = local_ac; auVar7 = local_98; if ((uVar4 & 1) != 0) { piVar3 = (int *)Array<int>::operator[]((Array<int> *)local_68,local_9c); *piVar3 = iVar1; puVar6 = (int2 *) Array<unsigned_short>::operator[]((Array<unsigned_short> *)local_88,local_9c); *puVar6 = 1; local_9c = local_9c + 1; auVar7 = local_98; } local_a0 = local_a0 + 1; } Level::trimVertexEdges(*(Level **)(this + 0x10),local_18,local_9c); } local_14 = local_14 + 1; } return; }
46,219
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp
void QuadRefinement::populateVertexEdgesFromParentVertices() { for (int pVert = 0; pVert < _parent->getNumVertices(); ++pVert) { int cVert = _vertChildVertIndex[pVert]; if (!IndexIsValid(cVert)) continue; ConstIndexArray pVertEdges = _parent->getVertexEdges(pVert); ConstLocalIndexArray pVertInEdge = _parent->getVertexEdgeLocalIndices(pVert); // // Reserve enough vert-edges, populate and trim to the actual size: // _child->resizeVertexEdges(cVert, pVertEdges.size()); IndexArray cVertEdges = _child->getVertexEdges(cVert); LocalIndexArray cVertInEdge = _child->getVertexEdgeLocalIndices(cVert); int cVertEdgeCount = 0; for (int i = 0; i < pVertEdges.size(); ++i) { Index pEdgeIndex = pVertEdges[i]; LocalIndex pEdgeVert = pVertInEdge[i]; Index pEdgeChildIndex = getEdgeChildEdges(pEdgeIndex)[pEdgeVert]; if (IndexIsValid(pEdgeChildIndex)) { cVertEdges[cVertEdgeCount] = pEdgeChildIndex; cVertInEdge[cVertEdgeCount] = 1; cVertEdgeCount++; } } _child->trimVertexEdges(cVert, cVertEdgeCount); } }
O1
cpp
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq 0x8(%rdi), %rax cmpl $0x0, 0x8(%rax) jle 0x47de7 movq 0xf0(%rdi), %rcx movq %rcx, -0x8(%rsp) movq 0x10(%rdi), %rdx movq 0xc0(%rdi), %rsi xorl %edi, %edi movq -0x8(%rsp), %rcx movslq (%rcx,%rdi,4), %r8 cmpq $-0x1, %r8 je 0x47dd7 movl %r8d, %r15d movq 0x150(%rax), %r11 movslq 0x4(%r11,%rdi,8), %r9 leaq (,%r9,4), %r10 addq 0x168(%rax), %r10 movl (%r11,%rdi,8), %r11d addq %r9, %r9 addq 0x180(%rax), %r9 movq 0x150(%rdx), %rbx movl %r11d, (%rbx,%r8,8) addq %r8, %r8 xorl %r14d, %r14d movl $0x0, %ebp testl %r15d, %r15d je 0x47d61 movl -0x4(%rbx,%r8,4), %ebp addl -0x8(%rbx,%r8,4), %ebp movl %ebp, 0x4(%rbx,%r8,4) movl 0x14(%rdx), %ebp cmpl %r11d, %ebp cmovlel %r11d, %ebp movl %ebp, 0x14(%rdx) testl %r11d, %r11d jle 0x47dd3 movl %r8d, %ebp orl $0x1, %ebp movslq %ebp, %r14 movslq (%rbx,%r14,4), %r15 leaq (,%r15,4), %r12 addq 0x168(%rdx), %r12 addq %r15, %r15 addq 0x180(%rdx), %r15 xorl %r13d, %r13d xorl %r14d, %r14d movslq (%r10,%r13,4), %rbp movzwl (%r9,%r13,2), %ecx leaq (%rsi,%rbp,8), %rbp movl (%rbp,%rcx,4), %ebp cmpl $-0x1, %ebp je 0x47dcb movslq %r14d, %r14 movl %ebp, (%r12,%r14,4) movw $0x1, (%r15,%r14,2) incl %r14d incq %r13 cmpq %r13, %r11 jne 0x47da4 movl %r14d, (%rbx,%r8,4) incq %rdi movslq 0x8(%rax), %rcx cmpq %rcx, %rdi jl 0x47cfd popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement37populateVertexEdgesFromParentVerticesEv: push rbp push r15 push r14 push r13 push r12 push rbx mov rax, [rdi+8] cmp dword ptr [rax+8], 0 jle loc_47DE7 mov rcx, [rdi+0F0h] mov [rsp+30h+var_38], rcx mov rdx, [rdi+10h] mov rsi, [rdi+0C0h] xor edi, edi loc_47CFD: mov rcx, [rsp+30h+var_38] movsxd r8, dword ptr [rcx+rdi*4] cmp r8, 0FFFFFFFFFFFFFFFFh jz loc_47DD7 mov r15d, r8d mov r11, [rax+150h] movsxd r9, dword ptr [r11+rdi*8+4] lea r10, ds:0[r9*4] add r10, [rax+168h] mov r11d, [r11+rdi*8] add r9, r9 add r9, [rax+180h] mov rbx, [rdx+150h] mov [rbx+r8*8], r11d add r8, r8 xor r14d, r14d mov ebp, 0 test r15d, r15d jz short loc_47D61 mov ebp, [rbx+r8*4-4] add ebp, [rbx+r8*4-8] loc_47D61: mov [rbx+r8*4+4], ebp mov ebp, [rdx+14h] cmp ebp, r11d cmovle ebp, r11d mov [rdx+14h], ebp test r11d, r11d jle short loc_47DD3 mov ebp, r8d or ebp, 1 movsxd r14, ebp movsxd r15, dword ptr [rbx+r14*4] lea r12, ds:0[r15*4] add r12, [rdx+168h] add r15, r15 add r15, [rdx+180h] xor r13d, r13d xor r14d, r14d loc_47DA4: movsxd rbp, dword ptr [r10+r13*4] movzx ecx, word ptr [r9+r13*2] lea rbp, [rsi+rbp*8] mov ebp, [rbp+rcx*4+0] cmp ebp, 0FFFFFFFFh jz short loc_47DCB movsxd r14, r14d mov [r12+r14*4], ebp mov word ptr [r15+r14*2], 1 inc r14d loc_47DCB: inc r13 cmp r11, r13 jnz short loc_47DA4 loc_47DD3: mov [rbx+r8*4], r14d loc_47DD7: inc rdi movsxd rcx, dword ptr [rax+8] cmp rdi, rcx jl loc_47CFD loc_47DE7: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices( OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this) { long long result; // rax long long v2; // rdx long long v3; // rsi long long v4; // rdi long long v5; // r8 int v6; // r15d long long v7; // r11 long long v8; // r9 long long v9; // r10 long long v10; // r11 long long v11; // r9 long long v12; // rbx long long v13; // r8 int v14; // r14d int v15; // ebp int v16; // ebp long long v17; // r15 long long v18; // r12 long long v19; // r15 long long v20; // r13 int v21; // ebp long long v22; // [rsp+0h] [rbp-38h] result = *((_QWORD *)this + 1); if ( *(int *)(result + 8) > 0 ) { v22 = *((_QWORD *)this + 30); v2 = *((_QWORD *)this + 2); v3 = *((_QWORD *)this + 24); v4 = 0LL; do { v5 = *(int *)(v22 + 4 * v4); if ( v5 != -1 ) { v6 = *(_DWORD *)(v22 + 4 * v4); v7 = *(_QWORD *)(result + 336); v8 = *(int *)(v7 + 8 * v4 + 4); v9 = *(_QWORD *)(result + 360) + 4 * v8; v10 = *(unsigned int *)(v7 + 8 * v4); v11 = *(_QWORD *)(result + 384) + 2 * v8; v12 = *(_QWORD *)(v2 + 336); *(_DWORD *)(v12 + 8 * v5) = v10; v13 = 2 * v5; v14 = 0; v15 = 0; if ( v6 ) v15 = *(_DWORD *)(v12 + 4 * v13 - 8) + *(_DWORD *)(v12 + 4 * v13 - 4); *(_DWORD *)(v12 + 4 * v13 + 4) = v15; v16 = *(_DWORD *)(v2 + 20); if ( v16 <= (int)v10 ) v16 = v10; *(_DWORD *)(v2 + 20) = v16; if ( (int)v10 > 0 ) { v17 = *(int *)(v12 + 4LL * (int)(v13 | 1)); v18 = *(_QWORD *)(v2 + 360) + 4 * v17; v19 = *(_QWORD *)(v2 + 384) + 2 * v17; v20 = 0LL; v14 = 0; do { v21 = *(_DWORD *)(v3 + 8LL * *(int *)(v9 + 4 * v20) + 4LL * *(unsigned __int16 *)(v11 + 2 * v20)); if ( v21 != -1 ) { *(_DWORD *)(v18 + 4LL * v14) = v21; *(_WORD *)(v19 + 2LL * v14++) = 1; } ++v20; } while ( v10 != v20 ); } *(_DWORD *)(v12 + 4 * v13) = v14; } ++v4; } while ( v4 < *(int *)(result + 8) ); } return result; }
populateVertexEdgesFromParentVertices: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RAX,qword ptr [RDI + 0x8] CMP dword ptr [RAX + 0x8],0x0 JLE 0x00147de7 MOV RCX,qword ptr [RDI + 0xf0] MOV qword ptr [RSP + -0x8],RCX MOV RDX,qword ptr [RDI + 0x10] MOV RSI,qword ptr [RDI + 0xc0] XOR EDI,EDI LAB_00147cfd: MOV RCX,qword ptr [RSP + -0x8] MOVSXD R8,dword ptr [RCX + RDI*0x4] CMP R8,-0x1 JZ 0x00147dd7 MOV R15D,R8D MOV R11,qword ptr [RAX + 0x150] MOVSXD R9,dword ptr [R11 + RDI*0x8 + 0x4] LEA R10,[R9*0x4] ADD R10,qword ptr [RAX + 0x168] MOV R11D,dword ptr [R11 + RDI*0x8] ADD R9,R9 ADD R9,qword ptr [RAX + 0x180] MOV RBX,qword ptr [RDX + 0x150] MOV dword ptr [RBX + R8*0x8],R11D ADD R8,R8 XOR R14D,R14D MOV EBP,0x0 TEST R15D,R15D JZ 0x00147d61 MOV EBP,dword ptr [RBX + R8*0x4 + -0x4] ADD EBP,dword ptr [RBX + R8*0x4 + -0x8] LAB_00147d61: MOV dword ptr [RBX + R8*0x4 + 0x4],EBP MOV EBP,dword ptr [RDX + 0x14] CMP EBP,R11D CMOVLE EBP,R11D MOV dword ptr [RDX + 0x14],EBP TEST R11D,R11D JLE 0x00147dd3 MOV EBP,R8D OR EBP,0x1 MOVSXD R14,EBP MOVSXD R15,dword ptr [RBX + R14*0x4] LEA R12,[R15*0x4] ADD R12,qword ptr [RDX + 0x168] ADD R15,R15 ADD R15,qword ptr [RDX + 0x180] XOR R13D,R13D XOR R14D,R14D LAB_00147da4: MOVSXD RBP,dword ptr [R10 + R13*0x4] MOVZX ECX,word ptr [R9 + R13*0x2] LEA RBP,[RSI + RBP*0x8] MOV EBP,dword ptr [RBP + RCX*0x4] CMP EBP,-0x1 JZ 0x00147dcb MOVSXD R14,R14D MOV dword ptr [R12 + R14*0x4],EBP MOV word ptr [R15 + R14*0x2],0x1 INC R14D LAB_00147dcb: INC R13 CMP R11,R13 JNZ 0x00147da4 LAB_00147dd3: MOV dword ptr [RBX + R8*0x4],R14D LAB_00147dd7: INC RDI MOVSXD RCX,dword ptr [RAX + 0x8] CMP RDI,RCX JL 0x00147cfd LAB_00147de7: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices (QuadRefinement *this) { int iVar1; uint uVar2; long lVar3; long lVar4; long lVar5; long lVar6; long lVar7; long lVar8; long lVar9; long lVar10; long lVar11; int iVar12; uint uVar13; long lVar14; long lVar15; long lVar16; ulong uVar17; int iVar18; long lVar19; lVar3 = *(long *)(this + 8); if (0 < *(int *)(lVar3 + 8)) { lVar4 = *(long *)(this + 0xf0); lVar5 = *(long *)(this + 0x10); lVar6 = *(long *)(this + 0xc0); lVar14 = 0; do { iVar1 = *(int *)(lVar4 + lVar14 * 4); lVar15 = (long)iVar1; if (lVar15 != -1) { lVar16 = (long)*(int *)(*(long *)(lVar3 + 0x150) + 4 + lVar14 * 8); lVar7 = *(long *)(lVar3 + 0x168); uVar2 = *(uint *)(*(long *)(lVar3 + 0x150) + lVar14 * 8); lVar8 = *(long *)(lVar3 + 0x180); lVar9 = *(long *)(lVar5 + 0x150); *(uint *)(lVar9 + lVar15 * 8) = uVar2; iVar18 = 0; iVar12 = 0; if (iVar1 != 0) { iVar12 = *(int *)(lVar9 + -4 + lVar15 * 8) + *(int *)(lVar9 + -8 + lVar15 * 8); } *(int *)(lVar9 + 4 + lVar15 * 8) = iVar12; uVar13 = *(uint *)(lVar5 + 0x14); if ((int)*(uint *)(lVar5 + 0x14) <= (int)uVar2) { uVar13 = uVar2; } *(uint *)(lVar5 + 0x14) = uVar13; if (0 < (int)uVar2) { lVar19 = (long)*(int *)(lVar9 + (long)(int)(iVar1 * 2 | 1) * 4); lVar10 = *(long *)(lVar5 + 0x168); lVar11 = *(long *)(lVar5 + 0x180); uVar17 = 0; iVar18 = 0; do { iVar1 = *(int *)(lVar6 + (long)*(int *)(lVar16 * 4 + lVar7 + uVar17 * 4) * 8 + (ulong)*(ushort *)(lVar16 * 2 + lVar8 + uVar17 * 2) * 4); if (iVar1 != -1) { *(int *)(lVar19 * 4 + lVar10 + (long)iVar18 * 4) = iVar1; *(int2 *)(lVar19 * 2 + lVar11 + (long)iVar18 * 2) = 1; iVar18 = iVar18 + 1; } uVar17 = uVar17 + 1; } while (uVar2 != uVar17); } *(int *)(lVar9 + lVar15 * 8) = iVar18; } lVar14 = lVar14 + 1; } while (lVar14 < *(int *)(lVar3 + 8)); } return; }
46,220
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices()
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/quadRefinement.cpp
void QuadRefinement::populateVertexEdgesFromParentVertices() { for (int pVert = 0; pVert < _parent->getNumVertices(); ++pVert) { int cVert = _vertChildVertIndex[pVert]; if (!IndexIsValid(cVert)) continue; ConstIndexArray pVertEdges = _parent->getVertexEdges(pVert); ConstLocalIndexArray pVertInEdge = _parent->getVertexEdgeLocalIndices(pVert); // // Reserve enough vert-edges, populate and trim to the actual size: // _child->resizeVertexEdges(cVert, pVertEdges.size()); IndexArray cVertEdges = _child->getVertexEdges(cVert); LocalIndexArray cVertInEdge = _child->getVertexEdgeLocalIndices(cVert); int cVertEdgeCount = 0; for (int i = 0; i < pVertEdges.size(); ++i) { Index pEdgeIndex = pVertEdges[i]; LocalIndex pEdgeVert = pVertInEdge[i]; Index pEdgeChildIndex = getEdgeChildEdges(pEdgeIndex)[pEdgeVert]; if (IndexIsValid(pEdgeChildIndex)) { cVertEdges[cVertEdgeCount] = pEdgeChildIndex; cVertInEdge[cVertEdgeCount] = 1; cVertEdgeCount++; } } _child->trimVertexEdges(cVert, cVertEdgeCount); } }
O2
cpp
OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx xorl %r14d, %r14d movq 0x8(%rbx), %rdi movslq 0x8(%rdi), %rax cmpq %rax, %r14 jge 0x5ff60 movq 0xf0(%rbx), %rax movslq (%rax,%r14,4), %r15 cmpq $-0x1, %r15 je 0x5ff58 movl %r14d, %esi callq 0x54550 movq %rax, %r12 movl %edx, %r13d movq 0x8(%rbx), %rdi movl %r14d, %esi callq 0x4f6b0 movq %rax, %rbp movq 0x10(%rbx), %rdi movl %r15d, %esi movl %r13d, %edx callq 0x4f4f0 movq 0x10(%rbx), %rdi movl %r15d, %esi callq 0x4f370 movq %r15, %rsi movq %rax, %r15 movq 0x10(%rbx), %rdi movq %rsi, (%rsp) callq 0x516c0 movq 0xc0(%rbx), %rcx xorl %edx, %edx testl %r13d, %r13d cmovlel %edx, %r13d xorl %esi, %esi cmpq %rdx, %r13 je 0x5ff46 movslq (%r12,%rdx,4), %rdi movzwl (%rbp,%rdx,2), %r8d leaq (%rcx,%rdi,8), %rdi movl (%rdi,%r8,4), %edi cmpl $-0x1, %edi je 0x5ff41 movslq %esi, %rsi movl %edi, (%r15,%rsi,4) movw $0x1, (%rax,%rsi,2) incl %esi incq %rdx jmp 0x5ff16 movq 0x10(%rbx), %rax movq 0x150(%rax), %rax movq (%rsp), %rcx movl %esi, (%rax,%rcx,8) incq %r14 jmp 0x5fe93 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN10OpenSubdiv6v3_6_03Vtr8internal14QuadRefinement37populateVertexEdgesFromParentVerticesEv: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi xor r14d, r14d loc_5FE93: mov rdi, [rbx+8]; this movsxd rax, dword ptr [rdi+8] cmp r14, rax jge loc_5FF60 mov rax, [rbx+0F0h] movsxd r15, dword ptr [rax+r14*4] cmp r15, 0FFFFFFFFFFFFFFFFh jz loc_5FF58 mov esi, r14d; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int) mov r12, rax mov r13d, edx mov rdi, [rbx+8]; this mov esi, r14d; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexEdgeLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices(int) mov rbp, rax mov rdi, [rbx+10h]; this mov esi, r15d; int mov edx, r13d; int call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level17resizeVertexEdgesEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::resizeVertexEdges(int,int) mov rdi, [rbx+10h]; this mov esi, r15d; int call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level14getVertexEdgesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges(int) mov rsi, r15; int mov r15, rax mov rdi, [rbx+10h]; this mov [rsp+38h+var_38], rsi call __ZN10OpenSubdiv6v3_6_03Vtr8internal5Level25getVertexEdgeLocalIndicesEi; OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices(int) mov rcx, [rbx+0C0h] xor edx, edx test r13d, r13d cmovle r13d, edx xor esi, esi loc_5FF16: cmp r13, rdx jz short loc_5FF46 movsxd rdi, dword ptr [r12+rdx*4] movzx r8d, word ptr [rbp+rdx*2+0] lea rdi, [rcx+rdi*8] mov edi, [rdi+r8*4] cmp edi, 0FFFFFFFFh jz short loc_5FF41 movsxd rsi, esi mov [r15+rsi*4], edi mov word ptr [rax+rsi*2], 1 inc esi loc_5FF41: inc rdx jmp short loc_5FF16 loc_5FF46: mov rax, [rbx+10h] mov rax, [rax+150h] mov rcx, [rsp+38h+var_38] mov [rax+rcx*8], esi loc_5FF58: inc r14 jmp loc_5FE93 loc_5FF60: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices( OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement *this) { long long i; // r14 int *v3; // rdi long long result; // rax long long v5; // r15 long long VertexEdges; // r12 unsigned int v7; // edx long long v8; // r13 long long VertexEdgeLocalIndices; // rbp long long v10; // rsi long long v11; // r15 long long v12; // rax long long v13; // rcx long long v14; // rdx int v15; // esi int v16; // edi long long v17; // [rsp+0h] [rbp-38h] for ( i = 0LL; ; ++i ) { v3 = (int *)*((_QWORD *)this + 1); result = v3[2]; if ( i >= result ) break; v5 = *(int *)(*((_QWORD *)this + 30) + 4 * i); if ( v5 != -1 ) { VertexEdges = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges( (OpenSubdiv::v3_6_0::Vtr::internal::Level *)v3, i); v8 = v7; VertexEdgeLocalIndices = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices( *((OpenSubdiv::v3_6_0::Vtr::internal::Level **)this + 1), i); OpenSubdiv::v3_6_0::Vtr::internal::Level::resizeVertexEdges( *((OpenSubdiv::v3_6_0::Vtr::internal::Level **)this + 2), v5, v8); v10 = v5; v11 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdges( *((OpenSubdiv::v3_6_0::Vtr::internal::Level **)this + 2), v5); v17 = v10; v12 = OpenSubdiv::v3_6_0::Vtr::internal::Level::getVertexEdgeLocalIndices( *((OpenSubdiv::v3_6_0::Vtr::internal::Level **)this + 2), v10); v13 = *((_QWORD *)this + 24); v14 = 0LL; if ( (int)v8 <= 0 ) v8 = 0LL; v15 = 0; while ( v8 != v14 ) { v16 = *(_DWORD *)(v13 + 8LL * *(int *)(VertexEdges + 4 * v14) + 4LL * *(unsigned __int16 *)(VertexEdgeLocalIndices + 2 * v14)); if ( v16 != -1 ) { *(_DWORD *)(v11 + 4LL * v15) = v16; *(_WORD *)(v12 + 2LL * v15++) = 1; } ++v14; } *(_DWORD *)(*(_QWORD *)(*((_QWORD *)this + 2) + 336LL) + 8 * v17) = v15; } } return result; }
populateVertexEdgesFromParentVertices: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI XOR R14D,R14D LAB_0015fe93: MOV RDI,qword ptr [RBX + 0x8] MOVSXD RAX,dword ptr [RDI + 0x8] CMP R14,RAX JGE 0x0015ff60 MOV RAX,qword ptr [RBX + 0xf0] MOVSXD R15,dword ptr [RAX + R14*0x4] CMP R15,-0x1 JZ 0x0015ff58 MOV ESI,R14D CALL 0x00154550 MOV R12,RAX MOV R13D,EDX MOV RDI,qword ptr [RBX + 0x8] MOV ESI,R14D CALL 0x0014f6b0 MOV RBP,RAX MOV RDI,qword ptr [RBX + 0x10] MOV ESI,R15D MOV EDX,R13D CALL 0x0014f4f0 MOV RDI,qword ptr [RBX + 0x10] MOV ESI,R15D CALL 0x0014f370 MOV RSI,R15 MOV R15,RAX MOV RDI,qword ptr [RBX + 0x10] MOV qword ptr [RSP],RSI CALL 0x001516c0 MOV RCX,qword ptr [RBX + 0xc0] XOR EDX,EDX TEST R13D,R13D CMOVLE R13D,EDX XOR ESI,ESI LAB_0015ff16: CMP R13,RDX JZ 0x0015ff46 MOVSXD RDI,dword ptr [R12 + RDX*0x4] MOVZX R8D,word ptr [RBP + RDX*0x2] LEA RDI,[RCX + RDI*0x8] MOV EDI,dword ptr [RDI + R8*0x4] CMP EDI,-0x1 JZ 0x0015ff41 MOVSXD RSI,ESI MOV dword ptr [R15 + RSI*0x4],EDI MOV word ptr [RAX + RSI*0x2],0x1 INC ESI LAB_0015ff41: INC RDX JMP 0x0015ff16 LAB_0015ff46: MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + 0x150] MOV RCX,qword ptr [RSP] MOV dword ptr [RAX + RCX*0x8],ESI LAB_0015ff58: INC R14 JMP 0x0015fe93 LAB_0015ff60: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices() */ void __thiscall OpenSubdiv::v3_6_0::Vtr::internal::QuadRefinement::populateVertexEdgesFromParentVertices (QuadRefinement *this) { int iVar1; int iVar2; long lVar3; long lVar4; long lVar5; long lVar6; uint uVar7; ulong uVar8; int iVar9; ulong uVar10; long lVar11; int1 auVar12 [12]; for (lVar11 = 0; lVar11 < *(int *)(*(Level **)(this + 8) + 8); lVar11 = lVar11 + 1) { iVar1 = *(int *)(*(long *)(this + 0xf0) + lVar11 * 4); if ((long)iVar1 != -1) { auVar12 = Level::getVertexEdges(*(Level **)(this + 8),(int)lVar11); uVar7 = auVar12._8_4_; lVar4 = Level::getVertexEdgeLocalIndices(*(Level **)(this + 8),(int)lVar11); Level::resizeVertexEdges(*(Level **)(this + 0x10),iVar1,uVar7); lVar5 = Level::getVertexEdges(*(Level **)(this + 0x10),iVar1); lVar6 = Level::getVertexEdgeLocalIndices(*(Level **)(this + 0x10),iVar1); lVar3 = *(long *)(this + 0xc0); uVar8 = 0; uVar10 = (ulong)uVar7; if ((int)uVar7 < 1) { uVar10 = uVar8; } iVar9 = 0; for (; uVar10 != uVar8; uVar8 = uVar8 + 1) { iVar2 = *(int *)(lVar3 + (long)*(int *)(auVar12._0_8_ + uVar8 * 4) * 8 + (ulong)*(ushort *)(lVar4 + uVar8 * 2) * 4); if (iVar2 != -1) { *(int *)(lVar5 + (long)iVar9 * 4) = iVar2; *(int2 *)(lVar6 + (long)iVar9 * 2) = 1; iVar9 = iVar9 + 1; } } *(int *)(*(long *)(*(long *)(this + 0x10) + 0x150) + (long)iVar1 * 8) = iVar9; } } return; }
46,221
typed_array_init
bluesky950520[P]quickjs/quickjs.c
static int typed_array_init(JSContext *ctx, JSValue obj, JSValue buffer, uint64_t offset, uint64_t len, BOOL track_rab) { JSTypedArray *ta; JSObject *p, *pbuffer; JSArrayBuffer *abuf; int size_log2; p = JS_VALUE_GET_OBJ(obj); size_log2 = typed_array_size_log2(p->class_id); ta = js_malloc(ctx, sizeof(*ta)); if (!ta) { JS_FreeValue(ctx, buffer); return -1; } pbuffer = JS_VALUE_GET_OBJ(buffer); abuf = pbuffer->u.array_buffer; ta->obj = p; ta->buffer = pbuffer; ta->offset = offset; ta->length = len << size_log2; ta->track_rab = track_rab; list_add_tail(&ta->link, &abuf->array_list); p->u.typed_array = ta; p->u.array.count = len; p->u.array.u.ptr = abuf->data + offset; return 0; }
O0
c
typed_array_init: subq $0x68, %rsp movl 0x78(%rsp), %eax movq 0x70(%rsp), %rax movq %rsi, 0x50(%rsp) movq %rdx, 0x58(%rsp) movq %rcx, 0x40(%rsp) movq %r8, 0x48(%rsp) movq %rdi, 0x38(%rsp) movq %r9, 0x30(%rsp) movq 0x50(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movzwl 0x6(%rax), %eax subl $0x15, %eax movslq %eax, %rcx leaq 0x31594(%rip), %rax # 0x10b27f movzbl (%rax,%rcx), %eax movl %eax, 0xc(%rsp) movq 0x38(%rsp), %rdi movl $0x30, %esi callq 0x209f0 movq %rax, 0x28(%rsp) cmpq $0x0, 0x28(%rsp) jne 0xd9d30 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx callq 0x229d0 movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF jmp 0xd9de4 movq 0x40(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x10(%rsp) movq 0x20(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x10(%rax) movq 0x18(%rsp), %rcx movq 0x28(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x30(%rsp), %rax movl %eax, %ecx movq 0x28(%rsp), %rax movl %ecx, 0x20(%rax) movq 0x70(%rsp), %rax movl 0xc(%rsp), %ecx shlq %cl, %rax movl %eax, %ecx movq 0x28(%rsp), %rax movl %ecx, 0x24(%rax) movl 0x78(%rsp), %ecx movq 0x28(%rsp), %rax movl %ecx, 0x28(%rax) movq 0x28(%rsp), %rdi movq 0x10(%rsp), %rsi addq $0x18, %rsi callq 0x22790 movq 0x28(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x30(%rax) movq 0x70(%rsp), %rax movl %eax, %ecx movq 0x20(%rsp), %rax movl %ecx, 0x40(%rax) movq 0x10(%rsp), %rax movq 0x10(%rax), %rcx addq 0x30(%rsp), %rcx movq 0x20(%rsp), %rax movq %rcx, 0x38(%rax) movl $0x0, 0x64(%rsp) movl 0x64(%rsp), %eax addq $0x68, %rsp retq nopl (%rax)
typed_array_init: sub rsp, 68h mov eax, [rsp+68h+arg_8] mov rax, [rsp+68h+arg_0] mov [rsp+68h+var_18], rsi mov [rsp+68h+var_10], rdx mov [rsp+68h+var_28], rcx mov [rsp+68h+var_20], r8 mov [rsp+68h+var_30], rdi mov [rsp+68h+var_38], r9 mov rax, [rsp+68h+var_18] mov [rsp+68h+var_48], rax mov rax, [rsp+68h+var_48] movzx eax, word ptr [rax+6] sub eax, 15h movsxd rcx, eax lea rax, typed_array_size_log2 movzx eax, byte ptr [rax+rcx] mov [rsp+68h+var_5C], eax mov rdi, [rsp+68h+var_30] mov esi, 30h ; '0' call js_malloc mov [rsp+68h+var_40], rax cmp [rsp+68h+var_40], 0 jnz short loc_D9D30 mov rdi, [rsp+68h+var_30] mov rsi, [rsp+68h+var_28] mov rdx, [rsp+68h+var_20] call JS_FreeValue mov [rsp+68h+var_4], 0FFFFFFFFh jmp loc_D9DE4 loc_D9D30: mov rax, [rsp+68h+var_28] mov [rsp+68h+var_50], rax mov rax, [rsp+68h+var_50] mov rax, [rax+30h] mov [rsp+68h+var_58], rax mov rcx, [rsp+68h+var_48] mov rax, [rsp+68h+var_40] mov [rax+10h], rcx mov rcx, [rsp+68h+var_50] mov rax, [rsp+68h+var_40] mov [rax+18h], rcx mov rax, [rsp+68h+var_38] mov ecx, eax mov rax, [rsp+68h+var_40] mov [rax+20h], ecx mov rax, [rsp+68h+arg_0] mov ecx, [rsp+68h+var_5C] shl rax, cl mov ecx, eax mov rax, [rsp+68h+var_40] mov [rax+24h], ecx mov ecx, [rsp+68h+arg_8] mov rax, [rsp+68h+var_40] mov [rax+28h], ecx mov rdi, [rsp+68h+var_40] mov rsi, [rsp+68h+var_58] add rsi, 18h call list_add_tail_0 mov rcx, [rsp+68h+var_40] mov rax, [rsp+68h+var_48] mov [rax+30h], rcx mov rax, [rsp+68h+arg_0] mov ecx, eax mov rax, [rsp+68h+var_48] mov [rax+40h], ecx mov rax, [rsp+68h+var_58] mov rcx, [rax+10h] add rcx, [rsp+68h+var_38] mov rax, [rsp+68h+var_48] mov [rax+38h], rcx mov [rsp+68h+var_4], 0 loc_D9DE4: mov eax, [rsp+68h+var_4] add rsp, 68h retn
long long typed_array_init( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, long long a7, int a8) { char v9; // [rsp+Ch] [rbp-5Ch] long long v10; // [rsp+10h] [rbp-58h] long long v11; // [rsp+28h] [rbp-40h] v9 = typed_array_size_log2[*(unsigned __int16 *)(a2 + 6) - 21]; v11 = js_malloc(a1, 48LL); if ( v11 ) { v10 = *(_QWORD *)(a4 + 48); *(_QWORD *)(v11 + 16) = a2; *(_QWORD *)(v11 + 24) = a4; *(_DWORD *)(v11 + 32) = a6; *(_DWORD *)(v11 + 36) = a7 << v9; *(_DWORD *)(v11 + 40) = a8; list_add_tail_0(v11, (_QWORD *)(v10 + 24)); *(_QWORD *)(a2 + 48) = v11; *(_DWORD *)(a2 + 64) = a7; *(_QWORD *)(a2 + 56) = a6 + *(_QWORD *)(v10 + 16); return 0; } else { JS_FreeValue(a1, a4, a5); return (unsigned int)-1; } }
typed_array_init: SUB RSP,0x68 MOV EAX,dword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x50],RSI MOV qword ptr [RSP + 0x58],RDX MOV qword ptr [RSP + 0x40],RCX MOV qword ptr [RSP + 0x48],R8 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],R9 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,word ptr [RAX + 0x6] SUB EAX,0x15 MOVSXD RCX,EAX LEA RAX,[0x20b27f] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + 0xc],EAX MOV RDI,qword ptr [RSP + 0x38] MOV ESI,0x30 CALL 0x001209f0 MOV qword ptr [RSP + 0x28],RAX CMP qword ptr [RSP + 0x28],0x0 JNZ 0x001d9d30 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] CALL 0x001229d0 MOV dword ptr [RSP + 0x64],0xffffffff JMP 0x001d9de4 LAB_001d9d30: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x10],RAX MOV RCX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RSP + 0x30] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x20],ECX MOV RAX,qword ptr [RSP + 0x70] MOV ECX,dword ptr [RSP + 0xc] SHL RAX,CL MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x24],ECX MOV ECX,dword ptr [RSP + 0x78] MOV RAX,qword ptr [RSP + 0x28] MOV dword ptr [RAX + 0x28],ECX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x10] ADD RSI,0x18 CALL 0x00122790 MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x30],RCX MOV RAX,qword ptr [RSP + 0x70] MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX + 0x40],ECX MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0x10] ADD RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x38],RCX MOV dword ptr [RSP + 0x64],0x0 LAB_001d9de4: MOV EAX,dword ptr [RSP + 0x64] ADD RSP,0x68 RET
int4 typed_array_init(int8 param_1,long param_2,int8 param_3,long param_4,int8 param_5, long param_6,long param_7,int4 param_8) { byte bVar1; long lVar2; long lVar3; int4 local_4; bVar1 = (&typed_array_size_log2)[(int)(*(ushort *)(param_2 + 6) - 0x15)]; lVar3 = js_malloc(param_1,0x30); if (lVar3 == 0) { JS_FreeValue(param_1,param_4,param_5); local_4 = 0xffffffff; } else { lVar2 = *(long *)(param_4 + 0x30); *(long *)(lVar3 + 0x10) = param_2; *(long *)(lVar3 + 0x18) = param_4; *(int *)(lVar3 + 0x20) = (int)param_6; *(int *)(lVar3 + 0x24) = (int)(param_7 << (bVar1 & 0x3f)); *(int4 *)(lVar3 + 0x28) = param_8; list_add_tail(lVar3,lVar2 + 0x18); *(long *)(param_2 + 0x30) = lVar3; *(int *)(param_2 + 0x40) = (int)param_7; *(long *)(param_2 + 0x38) = *(long *)(lVar2 + 0x10) + param_6; local_4 = 0; } return local_4; }
46,222
typed_array_init
bluesky950520[P]quickjs/quickjs.c
static int typed_array_init(JSContext *ctx, JSValue obj, JSValue buffer, uint64_t offset, uint64_t len, BOOL track_rab) { JSTypedArray *ta; JSObject *p, *pbuffer; JSArrayBuffer *abuf; int size_log2; p = JS_VALUE_GET_OBJ(obj); size_log2 = typed_array_size_log2(p->class_id); ta = js_malloc(ctx, sizeof(*ta)); if (!ta) { JS_FreeValue(ctx, buffer); return -1; } pbuffer = JS_VALUE_GET_OBJ(buffer); abuf = pbuffer->u.array_buffer; ta->obj = p; ta->buffer = pbuffer; ta->offset = offset; ta->length = len << size_log2; ta->track_rab = track_rab; list_add_tail(&ta->link, &abuf->array_list); p->u.typed_array = ta; p->u.array.count = len; p->u.array.u.ptr = abuf->data + offset; return 0; }
O1
c
typed_array_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, %r14 movq %r8, %rbx movq %rcx, 0x8(%rsp) movq %rdx, %rbp movq %rsi, %r15 movq %rdi, %r13 movq %rdx, 0x10(%rsp) movzwl 0x6(%rsi), %eax leaq 0x89713(%rip), %rcx # 0x9c1cf movzbl -0x15(%rax,%rcx), %r12d pushq $0x30 popq %rsi callq 0xed5d testq %rax, %rax je 0x12b22 movl 0x50(%rsp), %edx movq 0x10(%rsp), %rsi movq 0x30(%rsi), %rdi movq %r15, 0x10(%rax) movq %r14, %r8 movl %r12d, %ecx shlq %cl, %r8 movq %rsi, 0x18(%rax) movl %ebx, 0x20(%rax) movl %r8d, 0x24(%rax) movl %edx, 0x28(%rax) leaq 0x18(%rdi), %rcx movq 0x18(%rdi), %rdx movq %rax, 0x8(%rdx) movq %rdx, (%rax) movq %rcx, 0x8(%rax) movq %rax, 0x18(%rdi) movq %rax, 0x30(%r15) movl %r14d, 0x40(%r15) addq 0x10(%rdi), %rbx movq %rbx, 0x38(%r15) xorl %eax, %eax jmp 0x12b36 movq 0x18(%r13), %rdi movq %rbp, %rsi movq 0x8(%rsp), %rdx callq 0x1ccb2 pushq $-0x1 popq %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
typed_array_init: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, r9 mov rbx, r8 mov [rsp+48h+var_40], rcx mov rbp, rdx mov r15, rsi mov r13, rdi mov [rsp+48h+var_38], rdx movzx eax, word ptr [rsi+6] lea rcx, typed_array_size_log2 movzx r12d, byte ptr [rax+rcx-15h] push 30h ; '0' pop rsi call js_malloc test rax, rax jz short loc_12B22 mov edx, [rsp+48h+arg_0] mov rsi, [rsp+48h+var_38] mov rdi, [rsi+30h] mov [rax+10h], r15 mov r8, r14 mov ecx, r12d shl r8, cl mov [rax+18h], rsi mov [rax+20h], ebx mov [rax+24h], r8d mov [rax+28h], edx lea rcx, [rdi+18h] mov rdx, [rdi+18h] mov [rdx+8], rax mov [rax], rdx mov [rax+8], rcx mov [rdi+18h], rax mov [r15+30h], rax mov [r15+40h], r14d add rbx, [rdi+10h] mov [r15+38h], rbx xor eax, eax jmp short loc_12B36 loc_12B22: mov rdi, [r13+18h] mov rsi, rbp mov rdx, [rsp+48h+var_40] call JS_FreeValueRT push 0FFFFFFFFFFFFFFFFh pop rax loc_12B36: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long typed_array_init(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, int a7) { char v10; // r12 long long v11; // rax long long v12; // rdi long long v13; // rdx v10 = typed_array_size_log2[*(unsigned __int16 *)(a2 + 6) - 21]; v11 = js_malloc(a1, 48LL); if ( v11 ) { v12 = *(_QWORD *)(a3 + 48); *(_QWORD *)(v11 + 16) = a2; *(_QWORD *)(v11 + 24) = a3; *(_DWORD *)(v11 + 32) = a5; *(_DWORD *)(v11 + 36) = a6 << v10; *(_DWORD *)(v11 + 40) = a7; v13 = *(_QWORD *)(v12 + 24); *(_QWORD *)(v13 + 8) = v11; *(_QWORD *)v11 = v13; *(_QWORD *)(v11 + 8) = v12 + 24; *(_QWORD *)(v12 + 24) = v11; *(_QWORD *)(a2 + 48) = v11; *(_DWORD *)(a2 + 64) = a6; *(_QWORD *)(a2 + 56) = *(_QWORD *)(v12 + 16) + a5; return 0LL; } else { JS_FreeValueRT(*(_QWORD *)(a1 + 24), a3); return -1LL; } }
typed_array_init: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,R9 MOV RBX,R8 MOV qword ptr [RSP + 0x8],RCX MOV RBP,RDX MOV R15,RSI MOV R13,RDI MOV qword ptr [RSP + 0x10],RDX MOVZX EAX,word ptr [RSI + 0x6] LEA RCX,[0x19c1cf] MOVZX R12D,byte ptr [RAX + RCX*0x1 + -0x15] PUSH 0x30 POP RSI CALL 0x0010ed5d TEST RAX,RAX JZ 0x00112b22 MOV EDX,dword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSI + 0x30] MOV qword ptr [RAX + 0x10],R15 MOV R8,R14 MOV ECX,R12D SHL R8,CL MOV qword ptr [RAX + 0x18],RSI MOV dword ptr [RAX + 0x20],EBX MOV dword ptr [RAX + 0x24],R8D MOV dword ptr [RAX + 0x28],EDX LEA RCX,[RDI + 0x18] MOV RDX,qword ptr [RDI + 0x18] MOV qword ptr [RDX + 0x8],RAX MOV qword ptr [RAX],RDX MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RDI + 0x18],RAX MOV qword ptr [R15 + 0x30],RAX MOV dword ptr [R15 + 0x40],R14D ADD RBX,qword ptr [RDI + 0x10] MOV qword ptr [R15 + 0x38],RBX XOR EAX,EAX JMP 0x00112b36 LAB_00112b22: MOV RDI,qword ptr [R13 + 0x18] MOV RSI,RBP MOV RDX,qword ptr [RSP + 0x8] CALL 0x0011ccb2 PUSH -0x1 POP RAX LAB_00112b36: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 typed_array_init(long param_1,long param_2,long param_3,int8 param_4,long param_5,long param_6 ,int4 param_7) { byte bVar1; long lVar2; long lVar3; long *plVar4; int8 uVar5; bVar1 = "toSorted"[(ulong)*(ushort *)(param_2 + 6) + 6]; plVar4 = (long *)js_malloc(param_1,0x30); if (plVar4 == (long *)0x0) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),param_3,param_4); uVar5 = 0xffffffffffffffff; } else { lVar2 = *(long *)(param_3 + 0x30); plVar4[2] = param_2; plVar4[3] = param_3; *(int *)(plVar4 + 4) = (int)param_5; *(int *)((long)plVar4 + 0x24) = (int)(param_6 << (bVar1 & 0x3f)); *(int4 *)(plVar4 + 5) = param_7; lVar3 = *(long *)(lVar2 + 0x18); *(long **)(lVar3 + 8) = plVar4; *plVar4 = lVar3; plVar4[1] = lVar2 + 0x18; *(long **)(lVar2 + 0x18) = plVar4; *(long **)(param_2 + 0x30) = plVar4; *(int *)(param_2 + 0x40) = (int)param_6; *(long *)(param_2 + 0x38) = param_5 + *(long *)(lVar2 + 0x10); uVar5 = 0; } return uVar5; }
46,223
LefDefParser::lefwBusBitChars(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwBusBitChars(const char *busBitChars) { if (!lefwFile) return LEFW_UNINITIALIZED; if (!lefwDidInit) return LEFW_BAD_ORDER; if (lefwState != LEFW_INIT && lefwState < LEFW_END) return LEFW_BAD_ORDER; // not of the ENDs if (lefwSynArray[LEFW_BUSBITCHARS]) return LEFW_ALREADY_DEFINED; if (busBitChars && busBitChars != 0 && *busBitChars != 0) { if (lefwWriteEncrypt) encPrint(lefwFile, (char*) "BUSBITCHARS \"%s\" ;\n", busBitChars); else fprintf(lefwFile, "BUSBITCHARS \"%s\" ;\n", busBitChars); } lefwLines++; lefwSynArray[LEFW_BUSBITCHARS] = 1; return LEFW_OK; }
O0
cpp
LefDefParser::lefwBusBitChars(char const*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) leaq 0x264c0(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0xc953 movl $0x1, 0x14(%rsp) jmp 0xca3a leaq 0x266fa(%rip), %rax # 0x33054 cmpl $0x0, (%rax) jne 0xc96c movl $0x2, 0x14(%rsp) jmp 0xca3a leaq 0x266dd(%rip), %rax # 0x33050 cmpl $0x1, (%rax) je 0xc991 leaq 0x266d1(%rip), %rax # 0x33050 cmpl $0x4f, (%rax) jge 0xc991 movl $0x2, 0x14(%rsp) jmp 0xca3a leaq 0x26478(%rip), %rax # 0x32e10 cmpl $0x0, 0x54(%rax) je 0xc9ab movl $0x4, 0x14(%rsp) jmp 0xca3a cmpq $0x0, 0x8(%rsp) je 0xca0f cmpq $0x0, 0x8(%rsp) je 0xca0f movq 0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0xca0f cmpl $0x0, 0x2671d(%rip) # 0x330ec je 0xc9f0 leaq 0x26428(%rip), %rax # 0x32e00 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x1d548(%rip), %rsi # 0x29f2f movb $0x0, %al callq 0x289b0 jmp 0xca0d leaq 0x26409(%rip), %rax # 0x32e00 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x1d529(%rip), %rsi # 0x29f2f movb $0x0, %al callq 0x1100 jmp 0xca0f leaq 0x26636(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0x2662a(%rip), %rax # 0x3304c movl %ecx, (%rax) leaq 0x263e5(%rip), %rax # 0x32e10 movl $0x1, 0x54(%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser15lefwBusBitCharsEPKc: sub rsp, 18h mov [rsp+18h+var_10], rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_C953 mov [rsp+18h+var_4], 1 jmp loc_CA3A loc_C953: lea rax, _ZN12LefDefParser11lefwDidInitE; LefDefParser::lefwDidInit cmp dword ptr [rax], 0 jnz short loc_C96C mov [rsp+18h+var_4], 2 jmp loc_CA3A loc_C96C: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1 jz short loc_C991 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 4Fh ; 'O' jge short loc_C991 mov [rsp+18h+var_4], 2 jmp loc_CA3A loc_C991: lea rax, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray cmp dword ptr [rax+54h], 0 jz short loc_C9AB mov [rsp+18h+var_4], 4 jmp loc_CA3A loc_C9AB: cmp [rsp+18h+var_10], 0 jz short loc_CA0F cmp [rsp+18h+var_10], 0 jz short loc_CA0F mov rax, [rsp+18h+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_CA0F cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_C9F0 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aBusbitcharsS; "BUSBITCHARS \"%s\" ;\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_CA0D loc_C9F0: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aBusbitcharsS; "BUSBITCHARS \"%s\" ;\n" mov al, 0 call _fprintf loc_CA0D: jmp short $+2 loc_CA0F: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser12lefwSynArrayE; LefDefParser::lefwSynArray mov dword ptr [rax+54h], 1 mov [rsp+18h+var_4], 0 loc_CA3A: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwBusBitChars( LefDefParser *this, const char *a2, long long a3, int a4, int a5, int a6) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwDidInit ) { if ( LefDefParser::lefwState == 1 || LefDefParser::lefwState >= 79 ) { if ( LefDefParser::lefwSynArray[21] ) { return 4; } else { if ( this && *(_BYTE *)this ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"BUSBITCHARS \"%s\" ;\n", (_DWORD)this, a4, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, "BUSBITCHARS \"%s\" ;\n", (const char *)this); } ++LefDefParser::lefwLines; LefDefParser::lefwSynArray[21] = 1; return 0; } } else { return 2; } } else { return 2; } } else { return 1; } }
lefwBusBitChars: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x0010c953 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0010ca3a LAB_0010c953: LEA RAX,[0x133054] CMP dword ptr [RAX],0x0 JNZ 0x0010c96c MOV dword ptr [RSP + 0x14],0x2 JMP 0x0010ca3a LAB_0010c96c: LEA RAX,[0x133050] CMP dword ptr [RAX],0x1 JZ 0x0010c991 LEA RAX,[0x133050] CMP dword ptr [RAX],0x4f JGE 0x0010c991 MOV dword ptr [RSP + 0x14],0x2 JMP 0x0010ca3a LAB_0010c991: LEA RAX,[0x132e10] CMP dword ptr [RAX + 0x54],0x0 JZ 0x0010c9ab MOV dword ptr [RSP + 0x14],0x4 JMP 0x0010ca3a LAB_0010c9ab: CMP qword ptr [RSP + 0x8],0x0 JZ 0x0010ca0f CMP qword ptr [RSP + 0x8],0x0 JZ 0x0010ca0f MOV RAX,qword ptr [RSP + 0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x0010ca0f CMP dword ptr [0x001330ec],0x0 JZ 0x0010c9f0 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x129f2f] MOV AL,0x0 CALL 0x001289b0 JMP 0x0010ca0d LAB_0010c9f0: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x129f2f] MOV AL,0x0 CALL 0x00101100 LAB_0010ca0d: JMP 0x0010ca0f LAB_0010ca0f: LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX LEA RAX,[0x132e10] MOV dword ptr [RAX + 0x54],0x1 MOV dword ptr [RSP + 0x14],0x0 LAB_0010ca3a: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwBusBitChars(char const*) */ int4 LefDefParser::lefwBusBitChars(char *param_1) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if (lefwDidInit == 0) { local_4 = 2; } else if ((lefwState == 1) || (0x4e < lefwState)) { if (lefwSynArray._84_4_ == 0) { if (((param_1 != (char *)0x0) && (param_1 != (char *)0x0)) && (*param_1 != '\0')) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,"BUSBITCHARS \"%s\" ;\n",param_1); } else { encPrint(lefwFile,"BUSBITCHARS \"%s\" ;\n",param_1); } } lefwLines = lefwLines + 1; lefwSynArray._84_4_ = 1; local_4 = 0; } else { local_4 = 4; } } else { local_4 = 2; } return local_4; }
46,224
has_path
eloqsql/mysys/my_getwd.c
my_bool has_path(const char *name) { return MY_TEST(strchr(name, FN_LIBCHAR)) #if FN_LIBCHAR != '/' || MY_TEST(strchr(name, '/')) #endif #ifdef FN_DEVCHAR || MY_TEST(strchr(name, FN_DEVCHAR)) #endif ; }
O3
c
has_path: pushq %rbp movq %rsp, %rbp movl $0x2f, %esi callq 0x29440 testq %rax, %rax setne %al popq %rbp retq nopl (%rax)
has_path: push rbp mov rbp, rsp mov esi, 2Fh ; '/' call _strchr test rax, rax setnz al pop rbp retn
bool has_path(long long a1) { return strchr(a1, 47LL) != 0; }
has_path: PUSH RBP MOV RBP,RSP MOV ESI,0x2f CALL 0x00129440 TEST RAX,RAX SETNZ AL POP RBP RET
bool has_path(char *param_1) { char *pcVar1; pcVar1 = strchr(param_1,0x2f); return pcVar1 != (char *)0x0; }
46,225
get_collation_number_internal
eloqsql/mysys/charset.c
static uint get_collation_number_internal(const char *name) { CHARSET_INFO **cs; for (cs= all_charsets; cs < all_charsets + array_elements(all_charsets); cs++) { if (cs[0] && cs[0]->coll_name.str && !my_strcasecmp(&my_charset_latin1, cs[0]->coll_name.str, name)) return cs[0]->number; } return 0; }
O3
c
get_collation_number_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx movq $-0x8, %r15 leaq 0x35ba51(%rip), %r12 # 0x3b6270 leaq 0x30958a(%rip), %r14 # 0x363db0 movq 0x8(%r12,%r15), %rax testq %rax, %rax je 0x5a84d movq 0x20(%rax), %rsi testq %rsi, %rsi je 0x5a84d movq 0xc0(%r14), %rax movq %r14, %rdi movq %rbx, %rdx callq *0x40(%rax) testl %eax, %eax je 0x5a85e addq $0x8, %r15 cmpq $0x3ff8, %r15 # imm = 0x3FF8 jb 0x5a826 xorl %eax, %eax jmp 0x5a865 movq 0x8(%r12,%r15), %rax movl (%rax), %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
get_collation_number_internal: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi mov r15, 0FFFFFFFFFFFFFFF8h lea r12, all_charsets lea r14, my_charset_latin1 loc_5A826: mov rax, [r12+r15+8] test rax, rax jz short loc_5A84D mov rsi, [rax+20h] test rsi, rsi jz short loc_5A84D mov rax, [r14+0C0h] mov rdi, r14 mov rdx, rbx call qword ptr [rax+40h] test eax, eax jz short loc_5A85E loc_5A84D: add r15, 8 cmp r15, 3FF8h jb short loc_5A826 xor eax, eax jmp short loc_5A865 loc_5A85E: mov rax, [r12+r15+8] mov eax, [rax] loc_5A865: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long get_collation_number_internal(long long a1) { long long v1; // r15 long long v2; // rax long long v3; // rsi v1 = 0x1FFFFFFFFFFFFFFFLL; while ( 1 ) { v2 = all_charsets[v1 + 1]; if ( v2 ) { v3 = *(_QWORD *)(v2 + 32); if ( v3 ) { if ( !(*(unsigned int ( **)(void *, long long, long long))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, v3, a1) ) break; } } if ( (unsigned long long)++v1 >= 2047 ) return 0LL; } return *(unsigned int *)all_charsets[v1 + 1]; }
get_collation_number_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI MOV R15,-0x8 LEA R12,[0x4b6270] LEA R14,[0x463db0] LAB_0015a826: MOV RAX,qword ptr [R12 + R15*0x1 + 0x8] TEST RAX,RAX JZ 0x0015a84d MOV RSI,qword ptr [RAX + 0x20] TEST RSI,RSI JZ 0x0015a84d MOV RAX,qword ptr [R14 + 0xc0] MOV RDI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x40] TEST EAX,EAX JZ 0x0015a85e LAB_0015a84d: ADD R15,0x8 CMP R15,0x3ff8 JC 0x0015a826 XOR EAX,EAX JMP 0x0015a865 LAB_0015a85e: MOV RAX,qword ptr [R12 + R15*0x1 + 0x8] MOV EAX,dword ptr [RAX] LAB_0015a865: POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 get_collation_number_internal(int8 param_1) { long lVar1; int iVar2; ulong uVar3; uVar3 = 0xfffffffffffffff8; while (((*(long *)((long)&DAT_004b6278 + uVar3) == 0 || (lVar1 = *(long *)(*(long *)((long)&DAT_004b6278 + uVar3) + 0x20), lVar1 == 0)) || (iVar2 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00463e70 + 0x40)) (&my_charset_latin1,lVar1,param_1), iVar2 != 0))) { uVar3 = uVar3 + 8; if (0x3ff7 < uVar3) { return 0; } } return **(int4 **)((long)&DAT_004b6278 + uVar3); }
46,226
ImPlot3D::PixelsToNDCRay(ImVec2 const&)
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d.cpp
ImPlot3DRay PixelsToNDCRay(const ImVec2& pix) { ImPlot3DContext& gp = *GImPlot3D; IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "PixelsToNDCRay() needs to be called between BeginPlot() and EndPlot()!"); ImPlot3DPlot& plot = *gp.CurrentPlot; SetupLock(); // Calculate zoom factor and plot center float zoom = plot.GetBoxZoom(); ImVec2 center = plot.PlotRect.GetCenter(); // Undo screen transformations to get back to NDC space float x = (pix.x - center.x) / zoom; float y = -(pix.y - center.y) / zoom; // Invert y-axis // Define near and far points in NDC space along the z-axis ImPlot3DPoint ndc_near = plot.Rotation.Inverse() * ImPlot3DPoint(x, y, -10.0f); ImPlot3DPoint ndc_far = plot.Rotation.Inverse() * ImPlot3DPoint(x, y, 10.0f); // Create the ray in NDC space ImPlot3DRay ndc_ray; ndc_ray.Origin = ndc_near; ndc_ray.Direction = (ndc_far - ndc_near).Normalized(); return ndc_ray; }
O1
cpp
ImPlot3D::PixelsToNDCRay(ImVec2 const&): pushq %r15 pushq %r14 pushq %rbx subq $0x60, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x2e5333(%rip), %r15 # 0x336c98 cmpq $0x0, 0x28(%r15) jne 0x51978 leaq 0x243b0e(%rip), %rdi # 0x295481 callq 0x2161f4 movq 0x28(%r15), %r15 callq 0x50ce3 movsd 0x4c(%r15), %xmm0 movsd 0x44(%r15), %xmm1 subps %xmm1, %xmm0 movaps %xmm0, %xmm2 shufps $0x55, %xmm0, %xmm2 # xmm2 = xmm2[1,1],xmm0[1,1] minss %xmm2, %xmm0 divss 0x2429e5(%rip), %xmm0 # 0x294388 addss 0x4c(%r15), %xmm1 movss 0x23d66f(%rip), %xmm2 # 0x28f020 mulss %xmm2, %xmm1 movss 0x48(%r15), %xmm3 addss 0x50(%r15), %xmm3 mulss %xmm2, %xmm3 movss (%r14), %xmm6 movss 0x4(%r14), %xmm4 subss %xmm1, %xmm6 subss %xmm3, %xmm4 movaps 0x241c31(%rip), %xmm2 # 0x293610 xorps %xmm2, %xmm4 unpcklps %xmm4, %xmm6 # xmm6 = xmm6[0],xmm4[0],xmm6[1],xmm4[1] movss 0x6c(%r15), %xmm1 movss 0x70(%r15), %xmm3 movsd 0x64(%r15), %xmm7 movaps %xmm7, %xmm4 mulps %xmm7, %xmm4 shufps $0x55, %xmm4, %xmm4 # xmm4 = xmm4[1,1,1,1] movaps %xmm7, %xmm5 mulss %xmm7, %xmm5 addss %xmm4, %xmm5 movaps %xmm1, %xmm4 mulss %xmm1, %xmm4 addss %xmm5, %xmm4 xorps %xmm2, %xmm1 unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1] mulss %xmm3, %xmm3 addss %xmm4, %xmm3 xorps %xmm2, %xmm7 shufps $0x0, %xmm3, %xmm3 # xmm3 = xmm3[0,0,0,0] divps %xmm3, %xmm7 divps %xmm3, %xmm1 movlhps %xmm1, %xmm7 # xmm7 = xmm7[0],xmm1[0] movaps %xmm7, 0x40(%rsp) leaq 0x50(%rsp), %r14 movups %xmm7, (%r14) unpcklps %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1] divps %xmm0, %xmm6 movaps %xmm6, 0x30(%rsp) leaq 0x20(%rsp), %r15 movlps %xmm6, (%r15) movl $0xc1200000, 0x8(%r15) # imm = 0xC1200000 movq %r14, %rdi movq %r15, %rsi callq 0x4dcf6 movaps %xmm0, 0x10(%rsp) movss %xmm1, 0xc(%rsp) movaps 0x40(%rsp), %xmm0 movups %xmm0, (%r14) movaps 0x30(%rsp), %xmm0 movlps %xmm0, (%r15) movl $0x41200000, 0x8(%r15) # imm = 0x41200000 leaq 0x50(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x4dcf6 movaps %xmm0, %xmm2 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movaps 0x10(%rsp), %xmm0 movlps %xmm0, (%rbx) movss 0xc(%rsp), %xmm3 movss %xmm3, 0x8(%rbx) subss %xmm3, %xmm1 subps %xmm0, %xmm2 movaps %xmm2, %xmm0 mulps %xmm2, %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] movaps %xmm2, %xmm3 mulss %xmm2, %xmm3 addss %xmm0, %xmm3 movaps %xmm1, %xmm0 mulss %xmm1, %xmm0 addss %xmm3, %xmm0 xorps %xmm3, %xmm3 ucomiss %xmm3, %xmm0 jb 0x51af7 sqrtss %xmm0, %xmm0 jmp 0x51b12 movaps %xmm2, 0x10(%rsp) movss %xmm1, 0xc(%rsp) callq 0x10240 movss 0xc(%rsp), %xmm1 movaps 0x10(%rsp), %xmm2 divss %xmm0, %xmm1 unpcklps %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1] divps %xmm0, %xmm2 movlps %xmm2, 0xc(%rbx) movss %xmm1, 0x14(%rbx) movq %rbx, %rax addq $0x60, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN8ImPlot3D14PixelsToNDCRayERK6ImVec2: push r15 push r14 push rbx sub rsp, 60h mov r14, rsi mov rbx, rdi mov r15, cs:_ZN8ImPlot3D9GImPlot3DE; ImPlot3D::GImPlot3D cmp qword ptr [r15+28h], 0 jnz short loc_51978 lea rdi, aPixelstondcray; "PixelsToNDCRay() needs to be called bet"... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_51978: mov r15, [r15+28h] call _ZN8ImPlot3D9SetupLockEv; ImPlot3D::SetupLock(void) movsd xmm0, qword ptr [r15+4Ch] movsd xmm1, qword ptr [r15+44h] subps xmm0, xmm1 movaps xmm2, xmm0 shufps xmm2, xmm0, 55h ; 'U' minss xmm0, xmm2 divss xmm0, cs:dword_294388 addss xmm1, dword ptr [r15+4Ch] movss xmm2, dword ptr cs:xmmword_28F020 mulss xmm1, xmm2 movss xmm3, dword ptr [r15+48h] addss xmm3, dword ptr [r15+50h] mulss xmm3, xmm2 movss xmm6, dword ptr [r14] movss xmm4, dword ptr [r14+4] subss xmm6, xmm1 subss xmm4, xmm3 movaps xmm2, cs:xmmword_293610 xorps xmm4, xmm2 unpcklps xmm6, xmm4 movss xmm1, dword ptr [r15+6Ch] movss xmm3, dword ptr [r15+70h] movsd xmm7, qword ptr [r15+64h] movaps xmm4, xmm7 mulps xmm4, xmm7 shufps xmm4, xmm4, 55h ; 'U' movaps xmm5, xmm7 mulss xmm5, xmm7 addss xmm5, xmm4 movaps xmm4, xmm1 mulss xmm4, xmm1 addss xmm4, xmm5 xorps xmm1, xmm2 unpcklps xmm1, xmm3 mulss xmm3, xmm3 addss xmm3, xmm4 xorps xmm7, xmm2 shufps xmm3, xmm3, 0 divps xmm7, xmm3 divps xmm1, xmm3 movlhps xmm7, xmm1 movaps [rsp+78h+var_38], xmm7 lea r14, [rsp+78h+var_28] movups xmmword ptr [r14], xmm7 unpcklps xmm0, xmm0 divps xmm6, xmm0 movaps [rsp+78h+var_48], xmm6 lea r15, [rsp+78h+var_58] movlps qword ptr [r15], xmm6 mov dword ptr [r15+8], 0C1200000h mov rdi, r14 mov rsi, r15 call _ZNK12ImPlot3DQuatmlERK13ImPlot3DPoint; ImPlot3DQuat::operator*(ImPlot3DPoint const&) movaps [rsp+78h+var_68], xmm0 movss [rsp+78h+var_6C], xmm1 movaps xmm0, [rsp+78h+var_38] movups xmmword ptr [r14], xmm0 movaps xmm0, [rsp+78h+var_48] movlps qword ptr [r15], xmm0 mov dword ptr [r15+8], 41200000h lea rdi, [rsp+78h+var_28] lea rsi, [rsp+78h+var_58] call _ZNK12ImPlot3DQuatmlERK13ImPlot3DPoint; ImPlot3DQuat::operator*(ImPlot3DPoint const&) movaps xmm2, xmm0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 movaps xmm0, [rsp+78h+var_68] movlps qword ptr [rbx], xmm0 movss xmm3, [rsp+78h+var_6C] movss dword ptr [rbx+8], xmm3 subss xmm1, xmm3 subps xmm2, xmm0 movaps xmm0, xmm2 mulps xmm0, xmm2 shufps xmm0, xmm0, 55h ; 'U' movaps xmm3, xmm2 mulss xmm3, xmm2 addss xmm3, xmm0 movaps xmm0, xmm1 mulss xmm0, xmm1 addss xmm0, xmm3 xorps xmm3, xmm3 ucomiss xmm0, xmm3 jb short loc_51AF7 sqrtss xmm0, xmm0 jmp short loc_51B12 loc_51AF7: movaps [rsp+78h+var_68], xmm2 movss [rsp+78h+var_6C], xmm1 call _sqrtf movss xmm1, [rsp+78h+var_6C] movaps xmm2, [rsp+78h+var_68] loc_51B12: divss xmm1, xmm0 unpcklps xmm0, xmm0 divps xmm2, xmm0 movlps qword ptr [rbx+0Ch], xmm2 movss dword ptr [rbx+14h], xmm1 mov rax, rbx add rsp, 60h pop rbx pop r14 pop r15 retn
ImPlot3D * ImPlot3D::PixelsToNDCRay(ImPlot3D *a1, const char *a2, double a3) { ImPlot3D *v3; // rbx ImGui *v4; // r15 long long v5; // r15 __m128 v6; // xmm1 __m128 v7; // xmm0 __m128 v8; // xmm6 __m128 v9; // xmm4 __m128 v10; // xmm6 __m128 v11; // xmm1 __m128 v12; // xmm3 __m128 v13; // xmm7 __m128 v14; // xmm4 __m128 v15; // xmm1 __m128 v16; // xmm3 __m128 v17; // xmm0 __m128 v18; // xmm1 __m128 v19; // xmm2 __m128 v20; // xmm0 __m128 v21; // xmm0 __m128 v23; // [rsp+10h] [rbp-68h] unsigned long long v24; // [rsp+20h] [rbp-58h] BYREF int v25; // [rsp+28h] [rbp-50h] __m128 v26; // [rsp+30h] [rbp-48h] __m128 v27; // [rsp+40h] [rbp-38h] __m128 v28[2]; // [rsp+50h] [rbp-28h] BYREF v3 = a1; v4 = ImPlot3D::GImPlot3D; if ( !*((_QWORD *)ImPlot3D::GImPlot3D + 5) ) { a1 = (ImPlot3D *)"PixelsToNDCRay() needs to be called between BeginPlot() and EndPlot()!"; ImGui::ErrorLog((ImGui *)"PixelsToNDCRay() needs to be called between BeginPlot() and EndPlot()!", a2); } v5 = *((_QWORD *)v4 + 5); ImPlot3D::SetupLock(a1, a2, a3); v6 = (__m128)*(unsigned long long *)(v5 + 68); v7 = _mm_sub_ps((__m128)*(unsigned long long *)(v5 + 76), v6); v7.m128_f32[0] = fminf(v7.m128_f32[0], _mm_shuffle_ps(v7, v7, 85).m128_f32[0]) / 1.8; v8 = (__m128)*(unsigned int *)a2; v9 = (__m128)*((unsigned int *)a2 + 1); v8.m128_f32[0] = v8.m128_f32[0] - (float)((float)(v6.m128_f32[0] + *(float *)(v5 + 76)) * 0.5); v9.m128_f32[0] = v9.m128_f32[0] - (float)((float)(*(float *)(v5 + 72) + *(float *)(v5 + 80)) * 0.5); v10 = _mm_unpacklo_ps(v8, _mm_xor_ps(v9, (__m128)xmmword_293610)); v11 = (__m128)*(unsigned int *)(v5 + 108); v12 = (__m128)*(unsigned int *)(v5 + 112); v13 = (__m128)*(unsigned long long *)(v5 + 100); v14 = _mm_mul_ps(v13, v13); v14.m128_f32[0] = (float)(v11.m128_f32[0] * v11.m128_f32[0]) + (float)((float)(COERCE_FLOAT(*(_QWORD *)(v5 + 100)) * v13.m128_f32[0]) + _mm_shuffle_ps(v14, v14, 85).m128_f32[0]); v15 = _mm_unpacklo_ps(_mm_xor_ps(v11, (__m128)xmmword_293610), v12); v12.m128_f32[0] = (float)(v12.m128_f32[0] * v12.m128_f32[0]) + v14.m128_f32[0]; v16 = _mm_shuffle_ps(v12, v12, 0); v18 = _mm_div_ps(v15, v16); v27 = _mm_movelh_ps(_mm_div_ps(_mm_xor_ps(v13, (__m128)xmmword_293610), v16), v18); v28[0] = v27; v26 = _mm_div_ps(v10, _mm_unpacklo_ps(v7, v7)); _mm_storel_ps((double *)&v24, v26); v25 = -1054867456; v23 = ImPlot3DQuat::operator*((unsigned int *)v28, &v24); v28[0] = v27; _mm_storel_ps((double *)&v24, v26); v25 = 1092616192; v17 = ImPlot3DQuat::operator*((unsigned int *)v28, &v24); *(_OWORD *)v3 = 0LL; *((_QWORD *)v3 + 2) = 0LL; _mm_storel_ps((double *)v3, v23); *((_DWORD *)v3 + 2) = v18.m128_i32[0]; v18.m128_f32[0] = v18.m128_f32[0] - v18.m128_f32[0]; v19 = _mm_sub_ps(v17, v23); v20 = _mm_mul_ps(v19, v19); v16.m128_f32[0] = (float)(v19.m128_f32[0] * v19.m128_f32[0]) + _mm_shuffle_ps(v20, v20, 85).m128_f32[0]; v21 = v18; v21.m128_f32[0] = (float)(v18.m128_f32[0] * v18.m128_f32[0]) + v16.m128_f32[0]; if ( v21.m128_f32[0] < 0.0 ) *(double *)v21.m128_u64 = sqrtf(v28, &v24); else v21.m128_f32[0] = fsqrt(v21.m128_f32[0]); _mm_storel_ps((double *)((char *)v3 + 12), _mm_div_ps(v19, _mm_unpacklo_ps(v21, v21))); *((float *)v3 + 5) = v18.m128_f32[0] / v21.m128_f32[0]; return v3; }
PixelsToNDCRay: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x60 MOV R14,RSI MOV RBX,RDI MOV R15,qword ptr [0x00436c98] CMP qword ptr [R15 + 0x28],0x0 JNZ 0x00151978 LEA RDI,[0x395481] CALL 0x003161f4 LAB_00151978: MOV R15,qword ptr [R15 + 0x28] CALL 0x00150ce3 MOVSD XMM0,qword ptr [R15 + 0x4c] MOVSD XMM1,qword ptr [R15 + 0x44] SUBPS XMM0,XMM1 MOVAPS XMM2,XMM0 SHUFPS XMM2,XMM0,0x55 MINSS XMM0,XMM2 DIVSS XMM0,dword ptr [0x00394388] ADDSS XMM1,dword ptr [R15 + 0x4c] MOVSS XMM2,dword ptr [0x0038f020] MULSS XMM1,XMM2 MOVSS XMM3,dword ptr [R15 + 0x48] ADDSS XMM3,dword ptr [R15 + 0x50] MULSS XMM3,XMM2 MOVSS XMM6,dword ptr [R14] MOVSS XMM4,dword ptr [R14 + 0x4] SUBSS XMM6,XMM1 SUBSS XMM4,XMM3 MOVAPS XMM2,xmmword ptr [0x00393610] XORPS XMM4,XMM2 UNPCKLPS XMM6,XMM4 MOVSS XMM1,dword ptr [R15 + 0x6c] MOVSS XMM3,dword ptr [R15 + 0x70] MOVSD XMM7,qword ptr [R15 + 0x64] MOVAPS XMM4,XMM7 MULPS XMM4,XMM7 SHUFPS XMM4,XMM4,0x55 MOVAPS XMM5,XMM7 MULSS XMM5,XMM7 ADDSS XMM5,XMM4 MOVAPS XMM4,XMM1 MULSS XMM4,XMM1 ADDSS XMM4,XMM5 XORPS XMM1,XMM2 UNPCKLPS XMM1,XMM3 MULSS XMM3,XMM3 ADDSS XMM3,XMM4 XORPS XMM7,XMM2 SHUFPS XMM3,XMM3,0x0 DIVPS XMM7,XMM3 DIVPS XMM1,XMM3 MOVLHPS XMM7,XMM1 MOVAPS xmmword ptr [RSP + 0x40],XMM7 LEA R14,[RSP + 0x50] MOVUPS xmmword ptr [R14],XMM7 UNPCKLPS XMM0,XMM0 DIVPS XMM6,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM6 LEA R15,[RSP + 0x20] MOVLPS qword ptr [R15],XMM6 MOV dword ptr [R15 + 0x8],0xc1200000 MOV RDI,R14 MOV RSI,R15 CALL 0x0014dcf6 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVSS dword ptr [RSP + 0xc],XMM1 MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [R14],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVLPS qword ptr [R15],XMM0 MOV dword ptr [R15 + 0x8],0x41200000 LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x20] CALL 0x0014dcf6 MOVAPS XMM2,XMM0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOVAPS XMM0,xmmword ptr [RSP + 0x10] MOVLPS qword ptr [RBX],XMM0 MOVSS XMM3,dword ptr [RSP + 0xc] MOVSS dword ptr [RBX + 0x8],XMM3 SUBSS XMM1,XMM3 SUBPS XMM2,XMM0 MOVAPS XMM0,XMM2 MULPS XMM0,XMM2 SHUFPS XMM0,XMM0,0x55 MOVAPS XMM3,XMM2 MULSS XMM3,XMM2 ADDSS XMM3,XMM0 MOVAPS XMM0,XMM1 MULSS XMM0,XMM1 ADDSS XMM0,XMM3 XORPS XMM3,XMM3 UCOMISS XMM0,XMM3 JC 0x00151af7 SQRTSS XMM0,XMM0 JMP 0x00151b12 LAB_00151af7: MOVAPS xmmword ptr [RSP + 0x10],XMM2 MOVSS dword ptr [RSP + 0xc],XMM1 CALL 0x00110240 MOVSS XMM1,dword ptr [RSP + 0xc] MOVAPS XMM2,xmmword ptr [RSP + 0x10] LAB_00151b12: DIVSS XMM1,XMM0 UNPCKLPS XMM0,XMM0 DIVPS XMM2,XMM0 MOVLPS qword ptr [RBX + 0xc],XMM2 MOVSS dword ptr [RBX + 0x14],XMM1 MOV RAX,RBX ADD RSP,0x60 POP RBX POP R14 POP R15 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlot3D::PixelsToNDCRay(ImVec2 const&) */ ImPlot3D * __thiscall ImPlot3D::PixelsToNDCRay(ImPlot3D *this,ImVec2 *param_1) { float fVar1; long lVar2; int1 auVar3 [16]; int1 auVar4 [16]; float fVar5; float fVar8; int8 uVar6; int8 uVar7; int4 extraout_XMM0_Db; int4 uVar9; float extraout_XMM0_Dc; float extraout_XMM0_Dc_00; float extraout_XMM0_Dd; float extraout_XMM0_Dd_00; float extraout_XMM1_Da; float extraout_XMM1_Da_00; int4 extraout_XMM1_Db; int1 auVar10 [16]; int1 auVar11 [16]; int1 auVar12 [16]; float fVar13; int1 auVar14 [16]; float fVar16; float fVar19; int1 auVar17 [16]; int1 auVar18 [16]; int8 local_58; int4 local_50; int1 local_48 [16]; int8 local_38; int8 uStack_30; int8 local_28; int8 uStack_20; int1 auVar15 [16]; lVar2 = GImPlot3D; if (*(long *)(GImPlot3D + 0x28) == 0) { ImGui::ErrorLog("PixelsToNDCRay() needs to be called between BeginPlot() and EndPlot()!"); } lVar2 = *(long *)(lVar2 + 0x28); SetupLock(); fVar13 = (float)*(int8 *)(lVar2 + 0x44); fVar5 = (float)*(int8 *)(lVar2 + 0x4c) - fVar13; fVar8 = (float)((ulong)*(int8 *)(lVar2 + 0x4c) >> 0x20) - (float)((ulong)*(int8 *)(lVar2 + 0x44) >> 0x20); if (fVar8 <= fVar5) { fVar5 = fVar8; } auVar14._0_4_ = *(float *)param_1 - (fVar13 + *(float *)(lVar2 + 0x4c)) * DAT_0038f020; auVar15._4_8_ = 0; auVar15._0_4_ = auVar14._0_4_; auVar15._12_4_ = _UNK_00393614; auVar14._8_8_ = auVar15._8_8_; auVar14._4_4_ = (uint)(*(float *)(param_1 + 4) - (*(float *)(lVar2 + 0x48) + *(float *)(lVar2 + 0x50)) * DAT_0038f020) ^ _DAT_00393610; fVar13 = *(float *)(lVar2 + 0x6c); fVar1 = *(float *)(lVar2 + 0x70); fVar16 = (float)*(int8 *)(lVar2 + 100); fVar19 = (float)((ulong)*(int8 *)(lVar2 + 100) >> 0x20); auVar10._0_4_ = (uint)fVar13 ^ _DAT_00393610; auVar10._4_4_ = fVar1; auVar10._8_4_ = _UNK_00393614; auVar10._12_4_ = 0; fVar13 = fVar1 * fVar1 + fVar13 * fVar13 + fVar16 * fVar16 + fVar19 * fVar19; auVar17._0_4_ = (uint)fVar16 ^ _DAT_00393610; auVar17._4_4_ = (uint)fVar19 ^ _UNK_00393614; auVar17._8_4_ = _UNK_00393618; auVar17._12_4_ = _UNK_0039361c; auVar18._4_4_ = fVar13; auVar18._0_4_ = fVar13; auVar18._8_4_ = fVar13; auVar18._12_4_ = fVar13; auVar18 = divps(auVar17,auVar18); auVar4._4_4_ = fVar13; auVar4._0_4_ = fVar13; auVar4._8_4_ = fVar13; auVar4._12_4_ = fVar13; auVar11 = divps(auVar10,auVar4); uStack_30 = auVar11._0_8_; local_38 = auVar18._0_8_; auVar11._4_4_ = fVar5 / _DAT_00394388; auVar11._0_4_ = fVar5 / _DAT_00394388; auVar11._8_4_ = fVar8; auVar11._12_4_ = fVar8; local_48 = divps(auVar14,auVar11); local_58 = local_48._0_8_; local_50 = 0xc1200000; local_28 = local_38; uStack_20 = uStack_30; uVar6 = ImPlot3DQuat::operator*((ImPlot3DQuat *)&local_28,(ImPlot3DPoint *)&local_58); local_28 = local_38; uStack_20 = uStack_30; local_58 = local_48._0_8_; local_50 = 0x41200000; uVar7 = ImPlot3DQuat::operator*((ImPlot3DQuat *)&local_28,(ImPlot3DPoint *)&local_58); *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)this = uVar6; *(float *)(this + 8) = extraout_XMM1_Da; fVar8 = extraout_XMM1_Da_00 - extraout_XMM1_Da; auVar12._0_4_ = (float)uVar7 - (float)uVar6; auVar12._4_4_ = (float)((ulong)uVar7 >> 0x20) - (float)((ulong)uVar6 >> 0x20); auVar12._8_4_ = extraout_XMM0_Dc_00 - extraout_XMM0_Dc; auVar12._12_4_ = extraout_XMM0_Dd_00 - extraout_XMM0_Dd; fVar5 = fVar8 * fVar8 + auVar12._0_4_ * auVar12._0_4_ + auVar12._4_4_ * auVar12._4_4_; if (fVar5 < 0.0) { fVar5 = sqrtf(fVar5); uVar9 = extraout_XMM0_Db; } else { fVar5 = SQRT(fVar5); uVar9 = extraout_XMM1_Db; } auVar3._4_4_ = fVar5; auVar3._0_4_ = fVar5; auVar3._8_4_ = uVar9; auVar3._12_4_ = uVar9; auVar11 = divps(auVar12,auVar3); *(long *)(this + 0xc) = auVar11._0_8_; *(float *)(this + 0x14) = fVar8 / fVar5; return this; }
46,227
copy_to_tree
eloqsql/sql/item_sum.cc
int copy_to_tree(void* key, element_count count __attribute__((unused)), void* arg) { struct st_repack_tree *st= (struct st_repack_tree*)arg; TABLE *table= st->table; Field* field= table->field[0]; const uchar *ptr= field->ptr_in_record((uchar*)key - table->s->null_bytes); size_t len= (size_t)field->val_int(ptr); DBUG_ASSERT(count == 1); if (!tree_insert(&st->tree, key, 0, st->tree.custom_arg)) return 1; st->len += len; return st->len > st->maxlen; }
O0
cpp
copy_to_tree: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movq 0x298(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0xb0(%rax), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x30(%rbp), %rax movq (%rax), %rax movl 0x360(%rax), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi callq 0xa21180 movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0xad1b80 movq %rax, -0x48(%rbp) jmp 0xd096e7 movq -0x28(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x28(%rbp), %rax movq 0x230(%rax), %rcx xorl %edx, %edx callq 0x12d1640 cmpq $0x0, %rax jne 0xd09710 movl $0x1, -0x4(%rbp) jmp 0xd09747 movq -0x48(%rbp), %rcx movq -0x28(%rbp), %rax addq 0x2a0(%rax), %rcx movq %rcx, 0x2a0(%rax) movq -0x28(%rbp), %rax movq 0x2a0(%rax), %rax movq -0x28(%rbp), %rcx cmpq 0x2a8(%rcx), %rax seta %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq
copy_to_tree: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rax, [rbp+var_20] mov [rbp+var_28], rax mov rax, [rbp+var_28] mov rax, [rax+298h] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax+0B0h] mov rax, [rax] mov [rbp+var_38], rax mov rdi, [rbp+var_38]; this mov rsi, [rbp+var_10] mov rax, [rbp+var_30] mov rax, [rax] mov eax, [rax+360h] mov ecx, eax xor eax, eax sub rax, rcx add rsi, rax; unsigned __int8 * call _ZNK5Field13ptr_in_recordEPKh; Field::ptr_in_record(uchar const*) mov [rbp+var_40], rax mov rdi, [rbp+var_38]; this mov rsi, [rbp+var_40]; unsigned __int8 * call _ZN5Field7val_intEPKh; Field::val_int(uchar const*) mov [rbp+var_48], rax jmp short $+2 loc_D096E7: mov rdi, [rbp+var_28] mov rsi, [rbp+var_10] mov rax, [rbp+var_28] mov rcx, [rax+230h] xor edx, edx call tree_insert cmp rax, 0 jnz short loc_D09710 mov [rbp+var_4], 1 jmp short loc_D09747 loc_D09710: mov rcx, [rbp+var_48] mov rax, [rbp+var_28] add rcx, [rax+2A0h] mov [rax+2A0h], rcx mov rax, [rbp+var_28] mov rax, [rax+2A0h] mov rcx, [rbp+var_28] cmp rax, [rcx+2A8h] setnbe al and al, 1 movzx eax, al mov [rbp+var_4], eax loc_D09747: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
_BOOL8 copy_to_tree(long long a1, long long a2, _QWORD *a3) { long long v4; // [rsp+8h] [rbp-48h] unsigned __int8 *v5; // [rsp+10h] [rbp-40h] Field *v6; // [rsp+18h] [rbp-38h] _QWORD **v7; // [rsp+20h] [rbp-30h] v7 = (_QWORD **)a3[83]; v6 = (Field *)*v7[22]; v5 = (unsigned __int8 *)Field::ptr_in_record(v6, (const unsigned __int8 *)(a1 - *((unsigned int *)*v7 + 216))); v4 = Field::val_int(v6, v5); if ( tree_insert(a3, a1, 0LL, a3[70]) ) { a3[84] += v4; return a3[84] > a3[85]; } else { return 1; } }
key_type: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV EAX,0xd POP RBP RET
/* Field_newdate::key_type() const */ int8 Field_newdate::key_type(void) { return 0xd; }
46,228
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [13], 0>(char const (&) [13]) const
llama.cpp/common/json.hpp
const_reference at(KeyType && key) const { // at only works for objects if (JSON_HEDLEY_UNLIKELY(!is_object())) { JSON_THROW(type_error::create(304, detail::concat("cannot use at() with ", type_name()), this)); } auto it = m_data.m_value.object->find(std::forward<KeyType>(key)); if (it == m_data.m_value.object->end()) { JSON_THROW(out_of_range::create(403, detail::concat("key '", string_t(std::forward<KeyType>(key)), "' not found"), this)); } return it->second; }
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> const& nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::at<char const (&) [13], 0>(char const (&) [13]) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpb $0x1, (%rdi) jne 0xb1f1b movq %rsi, %r15 movq 0x8(%r14), %r12 movq (%r12), %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx je 0xb1f05 movq %rbx, %rdi movq %r15, %rsi callq 0x20f10 testl %eax, %eax je 0xb1efa addq $0x30, %rbx movq 0x8(%r12), %rax cmpq %rax, %rbx jne 0xb1edb jmp 0xb1efd movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx cmpq %rbx, %rax je 0xb1f79 addq $0x20, %rax addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x20620 movq %rax, %rbx movq %r14, %rdi callq 0x8af7c movq %rsp, %rdx movq %rax, (%rdx) leaq 0x6923f(%rip), %rsi # 0x11b17c leaq 0x20(%rsp), %rdi callq 0x8063d movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x130, %esi # imm = 0x130 movq %r14, %rcx callq 0xbc7d0 xorl %ebp, %ebp leaq 0xae0d8(%rip), %rsi # 0x160040 leaq -0x3afdf(%rip), %rdx # 0x76f90 movq %rbx, %rdi callq 0x20a30 jmp 0xb1ff2 movl $0x20, %edi callq 0x20620 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x20650 leaq (%rax,%r15), %rdx movq %rsp, %rdi movq %r15, %rsi callq 0x28e86 leaq 0x691e4(%rip), %rsi # 0x11b192 leaq 0x691e3(%rip), %rcx # 0x11b198 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x806c5 movb $0x1, %bpl leaq 0x20(%rsp), %rdx movq %rbx, %rdi movl $0x193, %esi # imm = 0x193 movq %r14, %rcx callq 0xd1848 xorl %ebp, %ebp leaq 0xadfdd(%rip), %rsi # 0x15ffc0 leaq -0x3b05a(%rip), %rdx # 0x76f90 movq %rbx, %rdi callq 0x20a30 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb2010 movq 0x30(%rsp), %rsi incq %rsi callq 0x20170 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb205b movq 0x10(%rsp), %rsi jmp 0xb2053 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0xb2065 movq 0x10(%rsp), %rsi incq %rsi callq 0x20170 jmp 0xb2065 jmp 0xb2062 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xb205b movq 0x30(%rsp), %rsi incq %rsi callq 0x20170 testb %bpl, %bpl jne 0xb2065 jmp 0xb206d movq %rax, %r14 movq %rbx, %rdi callq 0x20eb0 movq %r14, %rdi callq 0x20ad0 nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: push rbp; void * push r15; int push r14; __int64 push r12; int push rbx; void * sub rsp, 40h mov r14, rdi cmp byte ptr [rdi], 1 jnz short loc_B1F1B mov r15, rsi mov r12, [r14+8] mov rbx, [r12] mov rax, [r12+8] cmp rbx, rax jz short loc_B1F05 loc_B1EDB: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_B1EFA add rbx, 30h ; '0' mov rax, [r12+8] cmp rbx, rax jnz short loc_B1EDB jmp short loc_B1EFD loc_B1EFA: mov rax, rbx loc_B1EFD: mov rcx, [r14+8] mov rbx, [rcx+8] loc_B1F05: cmp rax, rbx jz short loc_B1F79 add rax, 20h ; ' ' add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_B1F1B: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov rdx, rsp mov [rdx], rax lea rsi, aCannotUseAtWit; "cannot use at() with " lea rdi, [rsp+68h+var_48] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA22_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[22],char const*>(char const(&)[22],char const* &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 130h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_B1FF2 loc_B1F79: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r12, [rsp+68h+var_58] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rax+r15] mov rdi, rsp mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aKey; "key '" lea rcx, aNotFound; "' not found" lea rdi, [rsp+68h+var_48] mov rdx, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA6_KcS8_RA12_S9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[6],std::string,char const(&)[12]>(char const(&)[6],std::string,char const(&)[12] &&) mov bpl, 1 lea rdx, [rsp+68h+var_48] mov rdi, rbx; this mov esi, 193h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B1FF2: mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B2010 mov rsi, [rsp+68h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B2010: mov rdi, [rsp+68h+var_68] cmp rdi, r12 jz short loc_B205B mov rsi, [rsp+68h+var_58] jmp short loc_B2053 mov r14, rax mov rdi, [rsp+68h+var_68]; void * cmp rdi, r12 jz short loc_B2065 mov rsi, [rsp+68h+var_58] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B2065 jmp short loc_B2062 mov r14, rax lea rax, [rsp+68h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_B205B mov rsi, [rsp+68h+var_38] loc_B2053: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B205B: test bpl, bpl jnz short loc_B2065 jmp short loc_B206D loc_B2062: mov r14, rax loc_B2065: mov rdi, rbx; void * call ___cxa_free_exception loc_B206D: mov rdi, r14 call __Unwind_Resume
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP byte ptr [RDI],0x1 JNZ 0x001b1f1b MOV R15,RSI MOV R12,qword ptr [R14 + 0x8] MOV RBX,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JZ 0x001b1f05 LAB_001b1edb: MOV RDI,RBX MOV RSI,R15 CALL 0x00120f10 TEST EAX,EAX JZ 0x001b1efa ADD RBX,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP RBX,RAX JNZ 0x001b1edb JMP 0x001b1efd LAB_001b1efa: MOV RAX,RBX LAB_001b1efd: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] LAB_001b1f05: CMP RAX,RBX JZ 0x001b1f79 ADD RAX,0x20 ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001b1f1b: MOV EDI,0x20 CALL 0x00120620 MOV RBX,RAX MOV RDI,R14 CALL 0x0018af7c MOV RDX,RSP MOV qword ptr [RDX],RAX LAB_001b1f36: LEA RSI,[0x21b17c] LEA RDI,[RSP + 0x20] CALL 0x0018063d MOV BPL,0x1 LAB_001b1f4a: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x130 MOV RCX,R14 CALL 0x001bc7d0 XOR EBP,EBP LEA RSI,[0x260040] LEA RDX,[0x176f90] MOV RDI,RBX CALL 0x00120a30 LAB_001b1f79: MOV EDI,0x20 CALL 0x00120620 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x00120650 LEA RDX,[RAX + R15*0x1] LAB_001b1f9c: MOV RDI,RSP MOV RSI,R15 CALL 0x00128e86 LAB_001b1fa7: LEA RSI,[0x21b192] LEA RCX,[0x21b198] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001806c5 MOV BPL,0x1 LAB_001b1fc5: LEA RDX,[RSP + 0x20] MOV RDI,RBX MOV ESI,0x193 MOV RCX,R14 CALL 0x001d1848 XOR EBP,EBP LEA RSI,[0x25ffc0] LEA RDX,[0x176f90] MOV RDI,RBX CALL 0x00120a30
char * _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE2atIRA12_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEERKSD_OSJ_ (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *param_1,char *param_2) { long *plVar1; int iVar2; char *pcVar3; int8 uVar4; size_t sVar5; char *pcVar6; char *local_68 [2]; char local_58 [16]; detail local_48 [32]; if (*param_1 != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = (char *)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> ::type_name(param_1); /* try { // try from 001b1f36 to 001b1f46 has its CatchHandler @ 001b2062 */ nlohmann::json_abi_v3_11_3::detail::concat<std::__cxx11::string,char_const(&)[22],char_const*> (local_48,"cannot use at() with ",local_68); /* try { // try from 001b1f4a to 001b1f76 has its CatchHandler @ 001b203d */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x130,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::type_error::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } plVar1 = *(long **)(param_1 + 8); pcVar6 = (char *)*plVar1; pcVar3 = (char *)plVar1[1]; if (pcVar6 != pcVar3) { do { pcVar3 = pcVar6; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar6 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar6 != pcVar3); pcVar6 = *(char **)(*(long *)(param_1 + 8) + 8); } if (pcVar3 == pcVar6) { uVar4 = __cxa_allocate_exception(0x20); local_68[0] = local_58; sVar5 = strlen(param_2); /* try { // try from 001b1f9c to 001b1fa6 has its CatchHandler @ 001b203b */ std::__cxx11::string::_M_construct<char_const*>(local_68,param_2,param_2 + sVar5); /* try { // try from 001b1fa7 to 001b1fc1 has its CatchHandler @ 001b2020 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,char_const(&)[6],std::__cxx11::string,char_const(&)[12]> (local_48,"key \'",(string *)local_68,"\' not found"); /* try { // try from 001b1fc5 to 001b1ff1 has its CatchHandler @ 001b1ff2 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar4,0x193,local_48,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&nlohmann::json_abi_v3_11_3::detail::out_of_range::typeinfo, nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return pcVar3 + 0x20; }
46,229
tree_search_edge
eloqsql/mysys/tree.c
void *tree_search_edge(TREE *tree, TREE_ELEMENT **parents, TREE_ELEMENT ***last_pos, int child_offs) { TREE_ELEMENT *element= tree->root; *parents= &null_element; while (element != &null_element) { *++parents= element; element= ELEMENT_CHILD(element, child_offs); } *last_pos= parents; return **last_pos != &null_element ? ELEMENT_KEY(tree, **last_pos) : NULL; }
O3
c
tree_search_edge: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax leaq 0x2e09f6(%rip), %r8 # 0x385bc0 movq %r8, (%rsi) cmpq %r8, %rax je 0xa51e6 movslq %ecx, %rcx movq %rax, 0x8(%rsi) addq $0x8, %rsi movq (%rax,%rcx), %rax cmpq %r8, %rax jne 0xa51d5 movq %rsi, (%rdx) movq (%rsi), %rax cmpq %r8, %rax je 0xa5201 movl 0x208(%rdi), %ecx testq %rcx, %rcx je 0xa5205 addq %rcx, %rax jmp 0xa5209 xorl %eax, %eax jmp 0xa5209 movq 0x18(%rax), %rax popq %rbp retq
tree_search_edge: push rbp mov rbp, rsp mov rax, [rdi] lea r8, null_element mov [rsi], r8 cmp rax, r8 jz short loc_A51E6 movsxd rcx, ecx loc_A51D5: mov [rsi+8], rax add rsi, 8 mov rax, [rax+rcx] cmp rax, r8 jnz short loc_A51D5 loc_A51E6: mov [rdx], rsi mov rax, [rsi] cmp rax, r8 jz short loc_A5201 mov ecx, [rdi+208h] test rcx, rcx jz short loc_A5205 add rax, rcx jmp short loc_A5209 loc_A5201: xor eax, eax jmp short loc_A5209 loc_A5205: mov rax, [rax+18h] loc_A5209: pop rbp retn
char * tree_search_edge(char **a1, _QWORD *a2, _QWORD *a3, int a4) { char *v4; // rax _QWORD *v5; // rax v4 = *a1; for ( *a2 = &null_element; v4 != (char *)&null_element; v4 = *(char **)&v4[a4] ) { a2[1] = v4; ++a2; } *a3 = a2; v5 = (_QWORD *)*a2; if ( (_UNKNOWN *)*a2 == &null_element ) return 0LL; if ( *((_DWORD *)a1 + 130) ) return (char *)v5 + *((unsigned int *)a1 + 130); return (char *)v5[3]; }
tree_search_edge: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] LEA R8,[0x485bc0] MOV qword ptr [RSI],R8 CMP RAX,R8 JZ 0x001a51e6 MOVSXD RCX,ECX LAB_001a51d5: MOV qword ptr [RSI + 0x8],RAX ADD RSI,0x8 MOV RAX,qword ptr [RAX + RCX*0x1] CMP RAX,R8 JNZ 0x001a51d5 LAB_001a51e6: MOV qword ptr [RDX],RSI MOV RAX,qword ptr [RSI] CMP RAX,R8 JZ 0x001a5201 MOV ECX,dword ptr [RDI + 0x208] TEST RCX,RCX JZ 0x001a5205 ADD RAX,RCX JMP 0x001a5209 LAB_001a5201: XOR EAX,EAX JMP 0x001a5209 LAB_001a5205: MOV RAX,qword ptr [RAX + 0x18] LAB_001a5209: POP RBP RET
int1 * tree_search_edge(long *param_1,long *param_2,int8 *param_3,int param_4) { int1 *puVar1; puVar1 = (int1 *)*param_1; *param_2 = (long)null_element; if (puVar1 != null_element) { do { param_2[1] = (long)puVar1; param_2 = param_2 + 1; puVar1 = *(int1 **)(puVar1 + param_4); } while (puVar1 != null_element); } *param_3 = param_2; puVar1 = (int1 *)*param_2; if (puVar1 == null_element) { puVar1 = (int1 *)0x0; } else if ((ulong)*(uint *)(param_1 + 0x41) == 0) { puVar1 = *(int1 **)(puVar1 + 0x18); } else { puVar1 = puVar1 + *(uint *)(param_1 + 0x41); } return puVar1; }
46,230
trnman_init
eloqsql/storage/maria/trnman.c
int trnman_init(TrID initial_trid) { DBUG_ENTER("trnman_init"); DBUG_PRINT("enter", ("initial_trid: %lu", (ulong) initial_trid)); short_trid_to_active_trn= (TRN **)my_malloc(PSI_INSTRUMENT_ME, SHORT_TRID_MAX*sizeof(TRN*), MYF(MY_WME|MY_ZEROFILL)); if (unlikely(!short_trid_to_active_trn)) DBUG_RETURN(1); short_trid_to_active_trn--; /* min short_id is 1 */ /* Initialize lists. active_list_max.min_read_from must be larger than any trid, so that when an active list is empty we would could free all committed list. And committed_list_max itself can not be freed so committed_list_max.commit_trid must not be smaller that active_list_max.min_read_from */ active_list_max.trid= active_list_min.trid= 0; active_list_max.min_read_from= MAX_TRID; active_list_max.next= active_list_min.prev= 0; active_list_max.prev= &active_list_min; active_list_min.next= &active_list_max; committed_list_max.commit_trid= MAX_TRID; committed_list_max.next= committed_list_min.prev= 0; committed_list_max.prev= &committed_list_min; committed_list_min.next= &committed_list_max; trnman_active_transactions= 0; trnman_committed_transactions= 0; trnman_allocated_transactions= 0; /* This is needed for recovery and repair */ dummy_transaction_object.min_read_from= ~(TrID) 0; dummy_transaction_object.first_undo_lsn= TRANSACTION_LOGGED_LONG_ID; pool= 0; global_trid_generator= initial_trid; trid_min_read_from= initial_trid; lf_hash_init(&trid_to_trn, sizeof(TRN*), LF_HASH_UNIQUE, 0, 0, trn_get_hash_key, 0); DBUG_PRINT("info", ("mysql_mutex_init LOCK_trn_list")); mysql_mutex_init(key_LOCK_trn_list, &LOCK_trn_list, MY_MUTEX_INIT_FAST); DBUG_RETURN(0); }
O0
c
trnman_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) jmp 0x41e8e xorl %edi, %edi movl $0x7fff8, %esi # imm = 0x7FFF8 movl $0x30, %edx callq 0x11f690 movq %rax, 0x46b24a(%rip) # 0x4ad0f0 cmpq $0x0, 0x46b242(%rip) # 0x4ad0f0 setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x41ed9 jmp 0x41ecd movl $0x1, -0x4(%rbp) jmp 0x42036 movq 0x46b210(%rip), %rax # 0x4ad0f0 addq $-0x8, %rax movq %rax, 0x46b205(%rip) # 0x4ad0f0 movq $0x0, 0x46b27a(%rip) # 0x4ad170 movq $0x0, 0x46b31f(%rip) # 0x4ad220 movq $-0x1, 0x46b31c(%rip) # 0x4ad228 movq $0x0, 0x46b251(%rip) # 0x4ad168 movq $0x0, 0x46b2ee(%rip) # 0x4ad210 leaq 0x46b1cf(%rip), %rax # 0x4ad0f8 movq %rax, 0x46b2e8(%rip) # 0x4ad218 leaq 0x46b271(%rip), %rax # 0x4ad1a8 movq %rax, 0x46b222(%rip) # 0x4ad160 movq $-0x1, 0x46b397(%rip) # 0x4ad2e0 movq $0x0, 0x46b424(%rip) # 0x4ad378 movq $0x0, 0x46b361(%rip) # 0x4ad2c0 leaq 0x46b3a2(%rip), %rax # 0x4ad308 movq %rax, 0x46b35b(%rip) # 0x4ad2c8 leaq 0x46b2e4(%rip), %rax # 0x4ad258 movq %rax, 0x46b3f5(%rip) # 0x4ad370 movl $0x0, 0x46b433(%rip) # 0x4ad3b8 movl $0x0, 0x46b42d(%rip) # 0x4ad3bc movl $0x0, 0x46b427(%rip) # 0x4ad3c0 leaq 0x46afc0(%rip), %rax # 0x4acf60 movq $-0x1, 0x80(%rax) leaq 0x46afae(%rip), %rax # 0x4acf60 movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 movq %rcx, 0xa0(%rax) movq $0x0, 0x46b3fa(%rip) # 0x4ad3c8 movq -0x10(%rbp), %rax movq %rax, 0x46b3f7(%rip) # 0x4ad3d0 movq -0x10(%rbp), %rax movq %rax, 0x2b0af4(%rip) # 0x2f2ad8 leaq 0x46b3ed(%rip), %rdi # 0x4ad3d8 movl $0x8, %esi movl $0x1, %edx xorl %r8d, %r8d leaq 0x41(%rip), %r9 # 0x42040 xorl %eax, %eax movl %r8d, %ecx movq $0x0, (%rsp) callq 0x12a0f0 jmp 0x42013 leaq 0x46b036(%rip), %rax # 0x4ad050 movl (%rax), %edi leaq 0x46b47d(%rip), %rsi # 0x4ad4a0 leaq 0xc76ec6(%rip), %rdx # 0xcb8ef0 callq 0x42070 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
trnman_init: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi jmp short $+2 loc_41E8E: xor edi, edi mov esi, 7FFF8h mov edx, 30h ; '0' call my_malloc mov cs:short_trid_to_active_trn, rax cmp cs:short_trid_to_active_trn, 0 setnz al xor al, 0FFh and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_41ED9 jmp short $+2 loc_41ECD: mov [rbp+var_4], 1 jmp loc_42036 loc_41ED9: mov rax, cs:short_trid_to_active_trn add rax, 0FFFFFFFFFFFFFFF8h mov cs:short_trid_to_active_trn, rax mov cs:qword_4AD170, 0 mov cs:qword_4AD220, 0 mov cs:qword_4AD228, 0FFFFFFFFFFFFFFFFh mov cs:qword_4AD168, 0 mov cs:qword_4AD210, 0 lea rax, active_list_min mov cs:qword_4AD218, rax lea rax, active_list_max mov cs:qword_4AD160, rax mov cs:qword_4AD2E0, 0FFFFFFFFFFFFFFFFh mov cs:qword_4AD378, 0 mov cs:qword_4AD2C0, 0 lea rax, committed_list_min mov cs:qword_4AD2C8, rax lea rax, committed_list_max mov cs:qword_4AD370, rax mov cs:trnman_active_transactions, 0 mov cs:trnman_committed_transactions, 0 mov cs:trnman_allocated_transactions, 0 lea rax, dummy_transaction_object mov qword ptr [rax+80h], 0FFFFFFFFFFFFFFFFh lea rax, dummy_transaction_object mov rcx, 8000000000000000h mov [rax+0A0h], rcx mov cs:pool, 0 mov rax, [rbp+var_10] mov cs:global_trid_generator, rax mov rax, [rbp+var_10] mov cs:trid_min_read_from, rax lea rdi, trid_to_trn mov esi, 8 mov edx, 1 xor r8d, r8d lea r9, trn_get_hash_key xor eax, eax mov ecx, r8d mov [rsp+20h+var_20], 0 call lf_hash_init jmp short $+2 loc_42013: lea rax, key_LOCK_trn_list mov edi, [rax] lea rsi, LOCK_trn_list lea rdx, my_fast_mutexattr call inline_mysql_mutex_init_1 mov [rbp+var_4], 0 loc_42036: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long trnman_init(long long a1) { short_trid_to_active_trn = my_malloc(0LL, 524280LL, 48LL); if ( short_trid_to_active_trn ) { short_trid_to_active_trn -= 8LL; qword_4AD170 = 0LL; qword_4AD220 = 0LL; qword_4AD228 = -1LL; qword_4AD168 = 0LL; qword_4AD210 = 0LL; qword_4AD218 = (long long)&active_list_min; qword_4AD160 = (long long)&active_list_max; qword_4AD2E0 = -1LL; qword_4AD378 = 0LL; qword_4AD2C0 = 0LL; qword_4AD2C8 = (long long)&committed_list_min; qword_4AD370 = (long long)&committed_list_max; trnman_active_transactions = 0; trnman_committed_transactions = 0; trnman_allocated_transactions = 0; dummy_transaction_object[16] = -1LL; dummy_transaction_object[20] = 0x8000000000000000LL; pool = 0LL; global_trid_generator = a1; trid_min_read_from = a1; lf_hash_init((unsigned int)&trid_to_trn, 8, 1, 0, 0, (unsigned int)trn_get_hash_key, 0LL); inline_mysql_mutex_init_1(key_LOCK_trn_list, &LOCK_trn_list, &my_fast_mutexattr); return 0; } else { return 1; } }
trnman_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI JMP 0x00141e8e LAB_00141e8e: XOR EDI,EDI MOV ESI,0x7fff8 MOV EDX,0x30 CALL 0x0021f690 MOV qword ptr [0x005ad0f0],RAX CMP qword ptr [0x005ad0f0],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00141ed9 JMP 0x00141ecd LAB_00141ecd: MOV dword ptr [RBP + -0x4],0x1 JMP 0x00142036 LAB_00141ed9: MOV RAX,qword ptr [0x005ad0f0] ADD RAX,-0x8 MOV qword ptr [0x005ad0f0],RAX MOV qword ptr [0x005ad170],0x0 MOV qword ptr [0x005ad220],0x0 MOV qword ptr [0x005ad228],-0x1 MOV qword ptr [0x005ad168],0x0 MOV qword ptr [0x005ad210],0x0 LEA RAX,[0x5ad0f8] MOV qword ptr [0x005ad218],RAX LEA RAX,[0x5ad1a8] MOV qword ptr [0x005ad160],RAX MOV qword ptr [0x005ad2e0],-0x1 MOV qword ptr [0x005ad378],0x0 MOV qword ptr [0x005ad2c0],0x0 LEA RAX,[0x5ad308] MOV qword ptr [0x005ad2c8],RAX LEA RAX,[0x5ad258] MOV qword ptr [0x005ad370],RAX MOV dword ptr [0x005ad3b8],0x0 MOV dword ptr [0x005ad3bc],0x0 MOV dword ptr [0x005ad3c0],0x0 LEA RAX,[0x5acf60] MOV qword ptr [RAX + 0x80],-0x1 LEA RAX,[0x5acf60] MOV RCX,-0x8000000000000000 MOV qword ptr [RAX + 0xa0],RCX MOV qword ptr [0x005ad3c8],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [0x005ad3d0],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [0x003f2ad8],RAX LEA RDI,[0x5ad3d8] MOV ESI,0x8 MOV EDX,0x1 XOR R8D,R8D LEA R9,[0x142040] XOR EAX,EAX MOV ECX,R8D MOV qword ptr [RSP],0x0 CALL 0x0022a0f0 JMP 0x00142013 LAB_00142013: LEA RAX,[0x5ad050] MOV EDI,dword ptr [RAX] LEA RSI,[0x5ad4a0] LEA RDX,[0xdb8ef0] CALL 0x00142070 MOV dword ptr [RBP + -0x4],0x0 LAB_00142036: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
bool trnman_init(int8 param_1) { long lVar1; lVar1 = my_malloc(0,0x7fff8,0x30); if (lVar1 != 0) { short_trid_to_active_trn = lVar1 + -8; active_list_min._120_8_ = 0; active_list_max._120_8_ = 0; active_list_max._128_8_ = 0xffffffffffffffff; active_list_min._112_8_ = 0; active_list_max._104_8_ = 0; active_list_max._112_8_ = active_list_min; active_list_min._104_8_ = active_list_max; committed_list_max._136_8_ = 0xffffffffffffffff; committed_list_min._112_8_ = 0; committed_list_max._104_8_ = 0; committed_list_max._112_8_ = committed_list_min; committed_list_min._104_8_ = committed_list_max; trnman_active_transactions = 0; trnman_committed_transactions = 0; trnman_allocated_transactions = 0; dummy_transaction_object._128_8_ = 0xffffffffffffffff; dummy_transaction_object._160_8_ = 0x8000000000000000; pool = 0; trid_min_read_from = param_1; global_trid_generator = param_1; lf_hash_init(trid_to_trn,8,1,0,0,trn_get_hash_key,0); inline_mysql_mutex_init(key_LOCK_trn_list,LOCK_trn_list,&my_fast_mutexattr); } else { short_trid_to_active_trn = 0; } return lVar1 == 0; }
46,231
ftparser_call_deinitializer
eloqsql/storage/myisam/ft_parser.c
void ftparser_call_deinitializer(MI_INFO *info) { uint i, j, keys= info->s->state.header.keys; free_root(&info->ft_memroot, MYF(0)); if (! info->ftparser_param) return; for (i= 0; i < keys; i++) { MI_KEYDEF *keyinfo= &info->s->keyinfo[i]; for (j=0; j < MAX_PARAM_NR; j++) { MYSQL_FTPARSER_PARAM *ftparser_param= &info->ftparser_param[keyinfo->ftkey_nr * MAX_PARAM_NR + j]; if (keyinfo->flag & HA_FULLTEXT && ftparser_param->mysql_add_word) { if (keyinfo->parser->deinit) keyinfo->parser->deinit(ftparser_param); ftparser_param->mysql_add_word= 0; } else break; } } }
O0
c
ftparser_call_deinitializer: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movzbl 0x12(%rax), %eax movl %eax, -0x14(%rbp) movq -0x8(%rbp), %rdi addq $0x90, %rdi xorl %eax, %eax movl %eax, %esi callq 0xefa40 movq -0x8(%rbp), %rax cmpq $0x0, 0xd0(%rax) jne 0xa2331 jmp 0xa2403 movl $0x0, -0xc(%rbp) movl -0xc(%rbp), %eax cmpl -0x14(%rbp), %eax jae 0xa2403 movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movl $0x0, -0x10(%rbp) cmpl $0x2, -0x10(%rbp) jae 0xa23f3 movq -0x8(%rbp), %rax movq 0xd0(%rax), %rax movq -0x20(%rbp), %rcx movl 0x20(%rcx), %ecx shll %ecx addl -0x10(%rbp), %ecx movl %ecx, %ecx shlq $0x6, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movzwl 0xa(%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xa23e1 movq -0x28(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0xa23e1 movq -0x20(%rbp), %rax movq 0x38(%rax), %rax cmpq $0x0, 0x18(%rax) je 0xa23d3 movq -0x20(%rbp), %rax movq 0x38(%rax), %rax movq 0x18(%rax), %rax movq -0x28(%rbp), %rdi callq *%rax movq -0x28(%rbp), %rax movq $0x0, 0x8(%rax) jmp 0xa23e3 jmp 0xa23f3 jmp 0xa23e5 movl -0x10(%rbp), %eax addl $0x1, %eax movl %eax, -0x10(%rbp) jmp 0xa2367 jmp 0xa23f5 movl -0xc(%rbp), %eax addl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0xa2338 addq $0x30, %rsp popq %rbp retq nopl (%rax)
ftparser_call_deinitializer: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax] movzx eax, byte ptr [rax+12h] mov [rbp+var_14], eax mov rdi, [rbp+var_8] add rdi, 90h xor eax, eax mov esi, eax call free_root mov rax, [rbp+var_8] cmp qword ptr [rax+0D0h], 0 jnz short loc_A2331 jmp loc_A2403 loc_A2331: mov [rbp+var_C], 0 loc_A2338: mov eax, [rbp+var_C] cmp eax, [rbp+var_14] jnb loc_A2403 mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_C] imul rcx, 70h ; 'p' add rax, rcx mov [rbp+var_20], rax mov [rbp+var_10], 0 loc_A2367: cmp [rbp+var_10], 2 jnb loc_A23F3 mov rax, [rbp+var_8] mov rax, [rax+0D0h] mov rcx, [rbp+var_20] mov ecx, [rcx+20h] shl ecx, 1 add ecx, [rbp+var_10] mov ecx, ecx shl rcx, 6 add rax, rcx mov [rbp+var_28], rax mov rax, [rbp+var_20] movzx eax, word ptr [rax+0Ah] and eax, 80h cmp eax, 0 jz short loc_A23E1 mov rax, [rbp+var_28] cmp qword ptr [rax+8], 0 jz short loc_A23E1 mov rax, [rbp+var_20] mov rax, [rax+38h] cmp qword ptr [rax+18h], 0 jz short loc_A23D3 mov rax, [rbp+var_20] mov rax, [rax+38h] mov rax, [rax+18h] mov rdi, [rbp+var_28] call rax loc_A23D3: mov rax, [rbp+var_28] mov qword ptr [rax+8], 0 jmp short loc_A23E3 loc_A23E1: jmp short loc_A23F3 loc_A23E3: jmp short $+2 loc_A23E5: mov eax, [rbp+var_10] add eax, 1 mov [rbp+var_10], eax jmp loc_A2367 loc_A23F3: jmp short $+2 loc_A23F5: mov eax, [rbp+var_C] add eax, 1 mov [rbp+var_C], eax jmp loc_A2338 loc_A2403: add rsp, 30h pop rbp retn
unsigned long long ftparser_call_deinitializer(_QWORD *a1) { unsigned long long result; // rax unsigned long long v2; // [rsp+8h] [rbp-28h] long long v3; // [rsp+10h] [rbp-20h] unsigned int v4; // [rsp+1Ch] [rbp-14h] unsigned int j; // [rsp+20h] [rbp-10h] unsigned int i; // [rsp+24h] [rbp-Ch] v4 = *(unsigned __int8 *)(*a1 + 18LL); free_root(a1 + 18, 0LL); result = (unsigned long long)a1; if ( a1[26] ) { for ( i = 0; ; ++i ) { result = i; if ( i >= v4 ) break; v3 = 112LL * i + *(_QWORD *)(*a1 + 536LL); for ( j = 0; j < 2; ++j ) { v2 = ((unsigned long long)(j + 2 * *(_DWORD *)(v3 + 32)) << 6) + a1[26]; if ( (*(_WORD *)(v3 + 10) & 0x80) == 0 || !*(_QWORD *)(v2 + 8) ) break; if ( *(_QWORD *)(*(_QWORD *)(v3 + 56) + 24LL) ) (*(void ( **)(unsigned long long))(*(_QWORD *)(v3 + 56) + 24LL))(v2); *(_QWORD *)(v2 + 8) = 0LL; } } } return result; }
ftparser_call_deinitializer: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX + 0x12] MOV dword ptr [RBP + -0x14],EAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x90 XOR EAX,EAX MOV ESI,EAX CALL 0x001efa40 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0xd0],0x0 JNZ 0x001a2331 JMP 0x001a2403 LAB_001a2331: MOV dword ptr [RBP + -0xc],0x0 LAB_001a2338: MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x14] JNC 0x001a2403 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x10],0x0 LAB_001a2367: CMP dword ptr [RBP + -0x10],0x2 JNC 0x001a23f3 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xd0] MOV RCX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RCX + 0x20] SHL ECX,0x1 ADD ECX,dword ptr [RBP + -0x10] MOV ECX,ECX SHL RCX,0x6 ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0xa] AND EAX,0x80 CMP EAX,0x0 JZ 0x001a23e1 MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x8],0x0 JZ 0x001a23e1 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x38] CMP qword ptr [RAX + 0x18],0x0 JZ 0x001a23d3 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x18] MOV RDI,qword ptr [RBP + -0x28] CALL RAX LAB_001a23d3: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x8],0x0 JMP 0x001a23e3 LAB_001a23e1: JMP 0x001a23f3 LAB_001a23e3: JMP 0x001a23e5 LAB_001a23e5: MOV EAX,dword ptr [RBP + -0x10] ADD EAX,0x1 MOV dword ptr [RBP + -0x10],EAX JMP 0x001a2367 LAB_001a23f3: JMP 0x001a23f5 LAB_001a23f5: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x001a2338 LAB_001a2403: ADD RSP,0x30 POP RBP RET
void ftparser_call_deinitializer(long *param_1) { byte bVar1; long lVar2; long lVar3; uint local_18; uint local_14; bVar1 = *(byte *)(*param_1 + 0x12); free_root(param_1 + 0x12,0); if (param_1[0x1a] != 0) { for (local_14 = 0; local_14 < bVar1; local_14 = local_14 + 1) { lVar2 = *(long *)(*param_1 + 0x218) + (ulong)local_14 * 0x70; local_18 = 0; while (((local_18 < 2 && (lVar3 = param_1[0x1a] + (ulong)(*(int *)(lVar2 + 0x20) * 2 + local_18) * 0x40, (*(ushort *)(lVar2 + 10) & 0x80) != 0)) && (*(long *)(lVar3 + 8) != 0))) { if (*(long *)(*(long *)(lVar2 + 0x38) + 0x18) != 0) { (**(code **)(*(long *)(lVar2 + 0x38) + 0x18))(lVar3); } *(int8 *)(lVar3 + 8) = 0; local_18 = local_18 + 1; } } } return; }
46,232
my_hash_first
eloqsql/mysys/hash.c
uchar* my_hash_first(const HASH *hash, const uchar *key, size_t length, HASH_SEARCH_STATE *current_record) { uchar *res; DBUG_ASSERT(my_hash_inited(hash)); res= my_hash_first_from_hash_value(hash, hash->hash_function(hash->charset, key, length ? length : hash->key_length), key, length, current_record); return res; }
O3
c
my_hash_first: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rcx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x58(%rdi), %rax movq 0x68(%rdi), %rdi movq %rdx, %r12 testq %rdx, %rdx jne 0x282b0 movq 0x8(%r15), %rdx xorl %r12d, %r12d movq %r14, %rsi callq *%rax movq %r15, %rdi movl %eax, %esi movq %r14, %rdx movq %r12, %rcx movq %rbx, %r8 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x282e7
my_hash_first: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rcx mov r14, rsi mov r15, rdi mov rax, [rdi+58h] mov rdi, [rdi+68h] mov r12, rdx test rdx, rdx jnz short loc_282B0 mov rdx, [r15+8] xor r12d, r12d loc_282B0: mov rsi, r14 call rax mov rdi, r15 mov esi, eax mov rdx, r14 mov rcx, r12 mov r8, rbx pop rbx pop r12 pop r14 pop r15 pop rbp jmp my_hash_first_from_hash_value
long long my_hash_first(_QWORD *a1, long long a2, long long a3, long long a4) { long long ( *v6)(long long, long long, long long); // rax long long v7; // rdi long long v8; // r12 unsigned int v9; // eax v6 = (long long ( *)(long long, long long, long long))a1[11]; v7 = a1[13]; v8 = a3; if ( !a3 ) { a3 = a1[1]; v8 = 0LL; } v9 = v6(v7, a2, a3); return my_hash_first_from_hash_value(a1, v9, a2, v8, a4); }
my_hash_first: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RCX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0x58] MOV RDI,qword ptr [RDI + 0x68] MOV R12,RDX TEST RDX,RDX JNZ 0x001282b0 MOV RDX,qword ptr [R15 + 0x8] XOR R12D,R12D LAB_001282b0: MOV RSI,R14 CALL RAX MOV RDI,R15 MOV ESI,EAX MOV RDX,R14 MOV RCX,R12 MOV R8,RBX POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001282e7
void my_hash_first(long param_1,int8 param_2,long param_3,int8 param_4) { int4 uVar1; long lVar2; lVar2 = param_3; if (param_3 == 0) { param_3 = *(long *)(param_1 + 8); lVar2 = 0; } uVar1 = (**(code **)(param_1 + 0x58))(*(int8 *)(param_1 + 0x68),param_2,param_3); my_hash_first_from_hash_value(param_1,uVar1,param_2,lVar2,param_4); return; }
46,233
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, float, 0>(fmt::v10::appender, float, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref)
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
FMT_CONSTEXPR20 auto write(OutputIt out, T value, format_specs<Char> specs, locale_ref loc = {}) -> OutputIt { if (const_check(!is_supported_floating_point(value))) return out; return specs.localized && write_loc(out, value, specs, loc) ? out : write_float(out, value, specs, loc); }
O3
c
fmt::v10::appender fmt::v10::detail::write<char, fmt::v10::appender, float, 0>(fmt::v10::appender, float, fmt::v10::format_specs<char>, fmt::v10::detail::locale_ref): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rcx, %rbx movq %rdi, %r14 movq %rsi, 0x30(%rsp) movq %rdx, 0x38(%rsp) btl $0x10, %edx jae 0x4c2c8 movl $0x9, 0x50(%rsp) movd %xmm0, 0x2c(%rsp) movd %xmm0, %eax movq %rax, 0x40(%rsp) movaps 0x40(%rsp), %xmm0 movaps 0x50(%rsp), %xmm1 movaps %xmm1, 0x10(%rsp) movaps %xmm0, (%rsp) leaq 0x30(%rsp), %rsi movq %r14, %rdi movq %rbx, %rdx callq 0x403fe testb %al, %al jne 0x4c2d6 movq 0x30(%rsp), %rsi movq 0x38(%rsp), %rdx movss 0x2c(%rsp), %xmm0 movq %r14, %rdi movq %rbx, %rcx callq 0x4c2e1 movq %rax, %r14 movq %r14, %rax addq $0x68, %rsp popq %rbx popq %r14 retq
_ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE: push r14 push rbx sub rsp, 68h mov rbx, rcx mov r14, rdi mov [rsp+78h+var_48], rsi mov [rsp+78h+var_40], rdx bt edx, 10h jnb short loc_4C2C8 mov dword ptr [rsp+78h+var_28], 9 movd [rsp+78h+var_4C], xmm0 movd eax, xmm0 mov qword ptr [rsp+78h+var_38], rax movaps xmm0, [rsp+78h+var_38] movaps xmm1, [rsp+78h+var_28] movaps [rsp+78h+var_68], xmm1 movaps [rsp+78h+var_78], xmm0 lea rsi, [rsp+78h+var_48] mov rdi, r14 mov rdx, rbx call _ZN3fmt3v106detail9write_locENS0_8appenderENS0_9loc_valueERKNS0_12format_specsIcEENS1_10locale_refE; fmt::v10::detail::write_loc(fmt::v10::appender,fmt::v10::loc_value,fmt::v10::format_specs<char> const&,fmt::v10::detail::locale_ref) test al, al jnz short loc_4C2D6 mov rsi, [rsp+78h+var_48] mov rdx, [rsp+78h+var_40] movss xmm0, [rsp+78h+var_4C] loc_4C2C8: mov rdi, r14; int mov rcx, rbx call _ZN3fmt3v106detail11write_floatIcNS0_8appenderEfEET0_S4_T1_NS0_12format_specsIT_EENS1_10locale_refE; fmt::v10::detail::write_float<char,fmt::v10::appender,float>(fmt::v10::appender,float,fmt::v10::format_specs<char>,fmt::v10::detail::locale_ref) mov r14, rax loc_4C2D6: mov rax, r14 add rsp, 68h pop rbx pop r14 retn
long long ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE( long long a1, long long a2, long long a3, const std::locale *a4, long long a5, long long a6, __m128i a7) { long long v7; // r14 _QWORD v9[2]; // [rsp+30h] [rbp-48h] BYREF long long v10; // [rsp+40h] [rbp-38h] long long v11; // [rsp+48h] [rbp-30h] long long v12; // [rsp+50h] [rbp-28h] long long v13; // [rsp+58h] [rbp-20h] v7 = a1; v9[0] = a2; v9[1] = a3; if ( (a3 & 0x10000) == 0 ) return fmt::v10::detail::write_float<char,fmt::v10::appender,float>(a1); LODWORD(v12) = 9; v10 = (unsigned int)_mm_cvtsi128_si32(a7); if ( !(unsigned __int8)fmt::v10::detail::write_loc(a1, (long long)v9, a4, (long long)a4, a5, a6, v10, v11, v12, v13) ) return fmt::v10::detail::write_float<char,fmt::v10::appender,float>(a1); return v7; }
_ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE: PUSH R14 PUSH RBX SUB RSP,0x68 MOV RBX,RCX MOV R14,RDI MOV qword ptr [RSP + 0x30],RSI MOV qword ptr [RSP + 0x38],RDX BT EDX,0x10 JNC 0x0014c2c8 MOV dword ptr [RSP + 0x50],0x9 MOVD dword ptr [RSP + 0x2c],XMM0 MOVD EAX,XMM0 MOV qword ptr [RSP + 0x40],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVAPS XMM1,xmmword ptr [RSP + 0x50] MOVAPS xmmword ptr [RSP + 0x10],XMM1 MOVAPS xmmword ptr [RSP],XMM0 LEA RSI,[RSP + 0x30] MOV RDI,R14 MOV RDX,RBX CALL 0x001403fe TEST AL,AL JNZ 0x0014c2d6 MOV RSI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x38] MOVSS XMM0,dword ptr [RSP + 0x2c] LAB_0014c2c8: MOV RDI,R14 MOV RCX,RBX CALL 0x0014c2e1 MOV R14,RAX LAB_0014c2d6: MOV RAX,R14 ADD RSP,0x68 POP RBX POP R14 RET
int8 _ZN3fmt3v106detail5writeIcNS0_8appenderEfTnNSt9enable_ifIXsr17is_floating_pointIT1_EE5valueEiE4typeELi0EEET0_S8_S5_NS0_12format_specsIT_EENS1_10locale_refE (detail *param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { char cVar1; int8 uVar2; int8 local_48; int8 local_40; ulong local_38; int4 local_28; local_48 = param_3; local_40 = param_4; if (((uint)param_4 >> 0x10 & 1) != 0) { local_28 = 9; local_38 = (ulong)(uint)param_1._0_4_; cVar1 = fmt::v10::detail::write_loc(param_2,&local_48,param_5); if (cVar1 != '\0') { return param_2; } } uVar2 = fmt::v10::detail::write_float<char,fmt::v10::appender,float> (param_1._0_4_,param_2,local_48,local_40,param_5); return uVar2; }
46,234
find_type_with_warning
eloqsql/mysys/typelib.c
int find_type_with_warning(const char *x, TYPELIB *typelib, const char *option) { int res; const char **ptr; if ((res= find_type((char *) x, typelib, FIND_TYPE_BASIC)) <= 0) { ptr= typelib->type_names; if (!*x) fprintf(stderr, "No option given to %s\n", option); else fprintf(stderr, "Unknown option to %s: %s\n", option, x); fprintf(stderr, "Alternatives are: '%s'", *ptr); while (*++ptr) fprintf(stderr, ",'%s'", *ptr); fprintf(stderr, "\n"); } return res; }
O0
c
find_type_with_warning: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi xorl %edx, %edx callq 0x3a430 movl %eax, -0x1c(%rbp) cmpl $0x0, %eax jg 0x3a420 movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, (%rax) jne 0x3a392 movq 0x1a6c65(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq -0x18(%rbp), %rdx leaq 0x4fe2a(%rip), %rsi # 0x8a1b3 movb $0x0, %al callq 0x254a0 jmp 0x3a3b2 movq 0x1a6c47(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq -0x18(%rbp), %rdx movq -0x8(%rbp), %rcx leaq 0x4fe1f(%rip), %rsi # 0x8a1ca movb $0x0, %al callq 0x254a0 movq 0x1a6c27(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq -0x28(%rbp), %rax movq (%rax), %rdx leaq 0x4fe1a(%rip), %rsi # 0x8a1e4 movb $0x0, %al callq 0x254a0 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, -0x28(%rbp) cmpq $0x0, 0x8(%rax) je 0x3a408 movq 0x1a6bf2(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi movq -0x28(%rbp), %rax movq (%rax), %rdx leaq 0x4fdfc(%rip), %rsi # 0x8a1fb movb $0x0, %al callq 0x254a0 jmp 0x3a3d1 movq 0x1a6bd1(%rip), %rax # 0x1e0fe0 movq (%rax), %rdi leaq 0x53696(%rip), %rsi # 0x8daaf movb $0x0, %al callq 0x254a0 movl -0x1c(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
find_type_with_warning: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] xor edx, edx call find_type mov [rbp+var_1C], eax cmp eax, 0 jg loc_3A420 mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_28], rax mov rax, [rbp+var_8] cmp byte ptr [rax], 0 jnz short loc_3A392 mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_18] lea rsi, aNoOptionGivenT; "No option given to %s\n" mov al, 0 call _fprintf jmp short loc_3A3B2 loc_3A392: mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_18] mov rcx, [rbp+var_8] lea rsi, aUnknownOptionT; "Unknown option to %s: %s\n" mov al, 0 call _fprintf loc_3A3B2: mov rax, cs:stderr_ptr mov rdi, [rax] mov rax, [rbp+var_28] mov rdx, [rax] lea rsi, aAlternativesAr; "Alternatives are: '%s'" mov al, 0 call _fprintf loc_3A3D1: mov rax, [rbp+var_28] mov rcx, rax add rcx, 8 mov [rbp+var_28], rcx cmp qword ptr [rax+8], 0 jz short loc_3A408 mov rax, cs:stderr_ptr mov rdi, [rax] mov rax, [rbp+var_28] mov rdx, [rax] lea rsi, aS_0; ",'%s'" mov al, 0 call _fprintf jmp short loc_3A3D1 loc_3A408: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, asc_8DAAC+3; "\n" mov al, 0 call _fprintf loc_3A420: mov eax, [rbp+var_1C] add rsp, 30h pop rbp retn
long long find_type_with_warning(const char *a1, long long a2, const char *a3) { const char **v3; // rax const char **v5; // [rsp+8h] [rbp-28h] int type; // [rsp+14h] [rbp-1Ch] type = find_type(a1, a2, 0LL); if ( type <= 0 ) { v5 = *(const char ***)(a2 + 16); if ( *a1 ) fprintf(stderr, "Unknown option to %s: %s\n", a3, a1); else fprintf(stderr, "No option given to %s\n", a3); fprintf(stderr, "Alternatives are: '%s'", *v5); while ( 1 ) { v3 = v5++; if ( !v3[1] ) break; fprintf(stderr, ",'%s'", *v5); } fprintf(stderr, "\n"); } return (unsigned int)type; }
find_type_with_warning: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] XOR EDX,EDX CALL 0x0013a430 MOV dword ptr [RBP + -0x1c],EAX CMP EAX,0x0 JG 0x0013a420 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX],0x0 JNZ 0x0013a392 MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x18a1b3] MOV AL,0x0 CALL 0x001254a0 JMP 0x0013a3b2 LAB_0013a392: MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] LEA RSI,[0x18a1ca] MOV AL,0x0 CALL 0x001254a0 LAB_0013a3b2: MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX] LEA RSI,[0x18a1e4] MOV AL,0x0 CALL 0x001254a0 LAB_0013a3d1: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RAX + 0x8],0x0 JZ 0x0013a408 MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RAX] LEA RSI,[0x18a1fb] MOV AL,0x0 CALL 0x001254a0 JMP 0x0013a3d1 LAB_0013a408: MOV RAX,qword ptr [0x002e0fe0] MOV RDI,qword ptr [RAX] LEA RSI,[0x18daaf] MOV AL,0x0 CALL 0x001254a0 LAB_0013a420: MOV EAX,dword ptr [RBP + -0x1c] ADD RSP,0x30 POP RBP RET
int find_type_with_warning(char *param_1,long param_2,int8 param_3) { int iVar1; int8 *local_30; iVar1 = find_type(param_1,param_2,0); if (iVar1 < 1) { local_30 = *(int8 **)(param_2 + 0x10); if (*param_1 == '\0') { fprintf(*(FILE **)PTR_stderr_002e0fe0,"No option given to %s\n",param_3); } else { fprintf(*(FILE **)PTR_stderr_002e0fe0,"Unknown option to %s: %s\n",param_3,param_1); } fprintf(*(FILE **)PTR_stderr_002e0fe0,"Alternatives are: \'%s\'",*local_30); while( true ) { if (local_30[1] == 0) break; fprintf(*(FILE **)PTR_stderr_002e0fe0,",\'%s\'",local_30[1]); local_30 = local_30 + 1; } fprintf(*(FILE **)PTR_stderr_002e0fe0,"\n"); } return iVar1; }
46,235
js_std_file_eof
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_file_eof(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { FILE *f = js_std_file_get(ctx, this_val); if (!f) return JS_EXCEPTION; return JS_NewBool(ctx, feof(f)); }
O0
c
js_std_file_eof: subq $0x68, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movl %ecx, 0x1c(%rsp) movq %r8, 0x10(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0x13a80 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x12ff0 movl $0x0, 0x38(%rsp) movq $0x6, 0x40(%rsp) jmp 0x1303d movq 0x20(%rsp), %rax movq %rax, (%rsp) movq 0x8(%rsp), %rdi callq 0xe570 movq (%rsp), %rcx movq %rcx, 0x50(%rsp) movl %eax, 0x4c(%rsp) movl 0x4c(%rsp), %eax testl %eax, %eax setne %al movzbl %al, %eax movl %eax, 0x58(%rsp) movq $0x1, 0x60(%rsp) movq 0x58(%rsp), %rcx movq 0x60(%rsp), %rax movq %rcx, 0x38(%rsp) movq %rax, 0x40(%rsp) movq 0x38(%rsp), %rax movq 0x40(%rsp), %rdx addq $0x68, %rsp retq nopl (%rax)
js_std_file_eof: sub rsp, 68h mov [rsp+68h+var_40], rsi mov [rsp+68h+var_38], rdx mov [rsp+68h+var_48], rdi mov [rsp+68h+var_4C], ecx mov [rsp+68h+var_58], r8 mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_40] mov rdx, [rsp+68h+var_38] call js_std_file_get mov [rsp+68h+var_60], rax cmp [rsp+68h+var_60], 0 jnz short loc_12FF0 mov dword ptr [rsp+68h+var_30], 0 mov [rsp+68h+var_28], 6 jmp short loc_1303D loc_12FF0: mov rax, [rsp+68h+var_48] mov [rsp+68h+var_68], rax mov rdi, [rsp+68h+var_60] call _feof mov rcx, [rsp+68h+var_68] mov [rsp+68h+var_18], rcx mov [rsp+68h+var_1C], eax mov eax, [rsp+68h+var_1C] test eax, eax setnz al movzx eax, al mov dword ptr [rsp+68h+var_10], eax mov [rsp+68h+var_8], 1 mov rcx, [rsp+68h+var_10] mov rax, [rsp+68h+var_8] mov [rsp+68h+var_30], rcx mov [rsp+68h+var_28], rax loc_1303D: mov rax, [rsp+68h+var_30] mov rdx, [rsp+68h+var_28] add rsp, 68h retn
long long js_std_file_eof(long long a1, long long a2, long long a3) { long long v4; // [rsp+8h] [rbp-60h] long long v5; // [rsp+38h] [rbp-30h] long long v6; // [rsp+58h] [rbp-10h] v4 = js_std_file_get(a1, a2, a3); if ( v4 ) { LODWORD(v6) = feof(v4) != 0; return v6; } else { LODWORD(v5) = 0; } return v5; }
js_std_file_eof: SUB RSP,0x68 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ECX MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] CALL 0x00113a80 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00112ff0 MOV dword ptr [RSP + 0x38],0x0 MOV qword ptr [RSP + 0x40],0x6 JMP 0x0011303d LAB_00112ff0: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x8] CALL 0x0010e570 MOV RCX,qword ptr [RSP] MOV qword ptr [RSP + 0x50],RCX MOV dword ptr [RSP + 0x4c],EAX MOV EAX,dword ptr [RSP + 0x4c] TEST EAX,EAX SETNZ AL MOVZX EAX,AL MOV dword ptr [RSP + 0x58],EAX MOV qword ptr [RSP + 0x60],0x1 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RAX LAB_0011303d: MOV RAX,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] ADD RSP,0x68 RET
int1 [16] js_std_file_eof(int8 param_1,int8 param_2,int8 param_3) { int1 auVar1 [16]; int iVar2; FILE *__stream; int4 local_30; int4 uStack_2c; int8 local_28; int4 uStack_c; __stream = (FILE *)js_std_file_get(param_1,param_2,param_3); if (__stream == (FILE *)0x0) { local_30 = 0; local_28 = 6; } else { iVar2 = feof(__stream); local_30 = (uint)(iVar2 != 0); uStack_2c = uStack_c; local_28 = 1; } auVar1._4_4_ = uStack_2c; auVar1._0_4_ = local_30; auVar1._8_8_ = local_28; return auVar1; }
46,236
translog_mark_file_finished
eloqsql/storage/maria/ma_loghandler.c
static void translog_mark_file_finished(uint32 file) { int i; struct st_file_counter *UNINIT_VAR(fc_ptr); DBUG_ENTER("translog_mark_file_finished"); DBUG_PRINT("enter", ("file: %lu", (ulong) file)); mysql_mutex_lock(&log_descriptor.unfinished_files_lock); DBUG_ASSERT(log_descriptor.unfinished_files.elements > 0); for (i= 0; i < (int) log_descriptor.unfinished_files.elements; i++) { fc_ptr= dynamic_element(&log_descriptor.unfinished_files, i, struct st_file_counter *); if (fc_ptr->file == file) { break; } } DBUG_ASSERT(i < (int) log_descriptor.unfinished_files.elements); if (! --fc_ptr->counter) delete_dynamic_element(&log_descriptor.unfinished_files, i); mysql_mutex_unlock(&log_descriptor.unfinished_files_lock); DBUG_VOID_RETURN; }
O0
c
translog_mark_file_finished: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl %edi, -0x4(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x3c175 leaq 0x447dd4(%rip), %rdi # 0x483f50 addq $0x800e08, %rdi # imm = 0x800E08 leaq 0x11edd5(%rip), %rsi # 0x15af5f movl $0x58d, %edx # imm = 0x58D callq 0x2fbb0 jmp 0x3c196 movl $0x0, -0x8(%rbp) movl -0x8(%rbp), %eax cmpl 0xc48c02(%rip), %eax # 0xc84da8 jge 0x3c1d8 movq 0xc48bf1(%rip), %rax # 0xc84da0 movslq -0x8(%rbp), %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movl (%rax), %eax cmpl -0x4(%rbp), %eax jne 0x3c1cb jmp 0x3c1d8 jmp 0x3c1cd movl -0x8(%rbp), %eax addl $0x1, %eax movl %eax, -0x8(%rbp) jmp 0x3c19d jmp 0x3c1da jmp 0x3c1dc movq -0x10(%rbp), %rcx movl 0x4(%rcx), %eax addl $-0x1, %eax movl %eax, 0x4(%rcx) cmpl $0x0, %eax jne 0x3c204 movl -0x8(%rbp), %esi leaq 0x447d58(%rip), %rdi # 0x483f50 addq $0x800e50, %rdi # imm = 0x800E50 callq 0xdcbd0 leaq 0x447d45(%rip), %rdi # 0x483f50 addq $0x800e08, %rdi # imm = 0x800E08 callq 0x2fc20 jmp 0x3c219 addq $0x10, %rsp popq %rbp retq nop
translog_mark_file_finished: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi mov rax, [rbp+var_10] mov [rbp+var_10], rax jmp short $+2 loc_3C175: lea rdi, log_descriptor add rdi, 800E08h lea rsi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 58Dh call inline_mysql_mutex_lock jmp short $+2 loc_3C196: mov [rbp+var_8], 0 loc_3C19D: mov eax, [rbp+var_8] cmp eax, cs:dword_C84DA8 jge short loc_3C1D8 mov rax, cs:qword_C84DA0 movsxd rcx, [rbp+var_8] shl rcx, 3 add rax, rcx mov [rbp+var_10], rax mov rax, [rbp+var_10] mov eax, [rax] cmp eax, [rbp+var_4] jnz short loc_3C1CB jmp short loc_3C1D8 loc_3C1CB: jmp short $+2 loc_3C1CD: mov eax, [rbp+var_8] add eax, 1 mov [rbp+var_8], eax jmp short loc_3C19D loc_3C1D8: jmp short $+2 loc_3C1DA: jmp short $+2 loc_3C1DC: mov rcx, [rbp+var_10] mov eax, [rcx+4] add eax, 0FFFFFFFFh mov [rcx+4], eax cmp eax, 0 jnz short loc_3C204 mov esi, [rbp+var_8] lea rdi, log_descriptor add rdi, 800E50h call delete_dynamic_element loc_3C204: lea rdi, log_descriptor add rdi, 800E08h call inline_mysql_mutex_unlock jmp short $+2 loc_3C219: add rsp, 10h pop rbp retn
long long translog_mark_file_finished(int a1) { int v1; // eax _DWORD *v3; // [rsp+0h] [rbp-10h] int i; // [rsp+8h] [rbp-8h] inline_mysql_mutex_lock( (long long)&log_descriptor[1049025], (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x58Du); for ( i = 0; i < dword_C84DA8; ++i ) { v3 = (_DWORD *)(8LL * i + qword_C84DA0); if ( *v3 == a1 ) break; } v1 = v3[1] - 1; v3[1] = v1; if ( !v1 ) delete_dynamic_element(&log_descriptor[1049034], (unsigned int)i); return inline_mysql_mutex_unlock((long long)&log_descriptor[1049025]); }
translog_mark_file_finished: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x0013c175 LAB_0013c175: LEA RDI,[0x583f50] ADD RDI,0x800e08 LEA RSI,[0x25af5f] MOV EDX,0x58d CALL 0x0012fbb0 JMP 0x0013c196 LAB_0013c196: MOV dword ptr [RBP + -0x8],0x0 LAB_0013c19d: MOV EAX,dword ptr [RBP + -0x8] CMP EAX,dword ptr [0x00d84da8] JGE 0x0013c1d8 MOV RAX,qword ptr [0x00d84da0] MOVSXD RCX,dword ptr [RBP + -0x8] SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RBP + -0x4] JNZ 0x0013c1cb JMP 0x0013c1d8 LAB_0013c1cb: JMP 0x0013c1cd LAB_0013c1cd: MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0x1 MOV dword ptr [RBP + -0x8],EAX JMP 0x0013c19d LAB_0013c1d8: JMP 0x0013c1da LAB_0013c1da: JMP 0x0013c1dc LAB_0013c1dc: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x4] ADD EAX,-0x1 MOV dword ptr [RCX + 0x4],EAX CMP EAX,0x0 JNZ 0x0013c204 MOV ESI,dword ptr [RBP + -0x8] LEA RDI,[0x583f50] ADD RDI,0x800e50 CALL 0x001dcbd0 LAB_0013c204: LEA RDI,[0x583f50] ADD RDI,0x800e08 CALL 0x0012fc20 JMP 0x0013c219 LAB_0013c219: ADD RSP,0x10 POP RBP RET
void translog_mark_file_finished(int param_1) { int iVar1; int *local_18; int local_10; inline_mysql_mutex_lock (&DAT_00d84d58,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x58d); local_10 = 0; while ((local_10 < DAT_00d84da8 && (local_18 = (int *)(DAT_00d84da0 + (long)local_10 * 8), *local_18 != param_1))) { local_10 = local_10 + 1; } iVar1 = local_18[1]; local_18[1] = iVar1 + -1; if (iVar1 + -1 == 0) { delete_dynamic_element(&DAT_00d84da0,local_10); } inline_mysql_mutex_unlock(&DAT_00d84d58); return; }
46,237
google::protobuf::io::CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor(google::protobuf::io::CopyingOutputStream*, int)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor( CopyingOutputStream* copying_stream, int block_size) : copying_stream_(copying_stream), owns_copying_stream_(false), failed_(false), position_(0), buffer_size_(block_size > 0 ? block_size : kDefaultBlockSize), buffer_used_(0) {}
O0
cpp
google::protobuf::io::CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor(google::protobuf::io::CopyingOutputStream*, int): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movl %edx, 0x24(%rsp) movq 0x30(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x36cb0 movq 0x10(%rsp), %rdi leaq 0x2fca03(%rip), %rax # 0x4ee180 addq $0x10, %rax movq %rax, (%rdi) movq 0x28(%rsp), %rax movq %rax, 0x8(%rdi) movb $0x0, 0x10(%rdi) movb $0x0, 0x11(%rdi) movq $0x0, 0x18(%rdi) addq $0x20, %rdi callq 0x1f2290 movq 0x10(%rsp), %rax addq $0x28, %rax movq %rax, 0x18(%rsp) cmpl $0x0, 0x24(%rsp) jle 0x1f17c5 movl 0x24(%rsp), %eax movl %eax, 0xc(%rsp) jmp 0x1f17d0 movl $0x2000, %eax # imm = 0x2000 movl %eax, 0xc(%rsp) jmp 0x1f17d0 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movl 0xc(%rsp), %edx movl %edx, (%rcx) movl $0x0, 0x2c(%rax) addq $0x38, %rsp retq nopl (%rax)
_ZN6google8protobuf2io26CopyingOutputStreamAdaptorC2EPNS1_19CopyingOutputStreamEi: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_14], edx mov rdi, [rsp+38h+var_8]; this mov [rsp+38h+var_28], rdi call _ZN6google8protobuf2io20ZeroCopyOutputStreamC2Ev; google::protobuf::io::ZeroCopyOutputStream::ZeroCopyOutputStream(void) mov rdi, [rsp+38h+var_28] lea rax, _ZTVN6google8protobuf2io26CopyingOutputStreamAdaptorE; `vtable for'google::protobuf::io::CopyingOutputStreamAdaptor add rax, 10h mov [rdi], rax mov rax, [rsp+38h+var_10] mov [rdi+8], rax mov byte ptr [rdi+10h], 0 mov byte ptr [rdi+11h], 0 mov qword ptr [rdi+18h], 0 add rdi, 20h ; ' ' call _ZNSt10unique_ptrIA_hSt14default_deleteIS0_EEC2IS2_vEEv; std::unique_ptr<uchar []>::unique_ptr<std::default_delete<uchar []>,void>(void) mov rax, [rsp+38h+var_28] add rax, 28h ; '(' mov [rsp+38h+var_20], rax cmp [rsp+38h+var_14], 0 jle short loc_1F17C5 mov eax, [rsp+38h+var_14] mov [rsp+38h+var_2C], eax jmp short loc_1F17D0 loc_1F17C5: mov eax, 2000h mov [rsp+38h+var_2C], eax jmp short $+2 loc_1F17D0: mov rax, [rsp+38h+var_28] mov rcx, [rsp+38h+var_20] mov edx, [rsp+38h+var_2C] mov [rcx], edx mov dword ptr [rax+2Ch], 0 add rsp, 38h retn
google::protobuf::io::CopyingOutputStreamAdaptor * google::protobuf::io::CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor( google::protobuf::io::CopyingOutputStreamAdaptor *this, google::protobuf::io::CopyingOutputStream *a2, int a3) { google::protobuf::io::CopyingOutputStreamAdaptor *result; // rax int v4; // [rsp+Ch] [rbp-2Ch] google::protobuf::io::ZeroCopyOutputStream::ZeroCopyOutputStream(this); *(_QWORD *)this = &`vtable for'google::protobuf::io::CopyingOutputStreamAdaptor + 2; *((_QWORD *)this + 1) = a2; *((_BYTE *)this + 16) = 0; *((_BYTE *)this + 17) = 0; *((_QWORD *)this + 3) = 0LL; std::unique_ptr<unsigned char []>::unique_ptr<std::default_delete<unsigned char []>,void>((char *)this + 32); if ( a3 <= 0 ) v4 = 0x2000; else v4 = a3; result = this; *((_DWORD *)this + 10) = v4; *((_DWORD *)this + 11) = 0; return result; }
46,238
google::protobuf::io::CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor(google::protobuf::io::CopyingOutputStream*, int)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor( CopyingOutputStream* copying_stream, int block_size) : copying_stream_(copying_stream), owns_copying_stream_(false), failed_(false), position_(0), buffer_size_(block_size > 0 ? block_size : kDefaultBlockSize), buffer_used_(0) {}
O3
cpp
google::protobuf::io::CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor(google::protobuf::io::CopyingOutputStream*, int): leaq 0x17ec61(%rip), %rax # 0x27b8b8 movq %rax, (%rdi) movq %rsi, 0x8(%rdi) movw $0x0, 0x10(%rdi) testl %edx, %edx movl $0x2000, %eax # imm = 0x2000 cmovgl %edx, %eax xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rdi) movl %eax, 0x28(%rdi) movl $0x0, 0x2c(%rdi) retq
_ZN6google8protobuf2io26CopyingOutputStreamAdaptorC2EPNS1_19CopyingOutputStreamEi: lea rax, off_27B8B8 mov [rdi], rax mov [rdi+8], rsi mov word ptr [rdi+10h], 0 test edx, edx mov eax, 2000h cmovg eax, edx xorps xmm0, xmm0 movups xmmword ptr [rdi+18h], xmm0 mov [rdi+28h], eax mov dword ptr [rdi+2Ch], 0 retn
long long google::protobuf::io::CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor( long long a1, long long a2, int a3) { long long result; // rax *(_QWORD *)a1 = off_27B8B8; *(_QWORD *)(a1 + 8) = a2; *(_WORD *)(a1 + 16) = 0; result = 0x2000LL; if ( a3 > 0 ) result = (unsigned int)a3; *(_OWORD *)(a1 + 24) = 0LL; *(_DWORD *)(a1 + 40) = result; *(_DWORD *)(a1 + 44) = 0; return result; }
CopyingOutputStreamAdaptor: LEA RAX,[0x37b8b8] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],RSI MOV word ptr [RDI + 0x10],0x0 TEST EDX,EDX MOV EAX,0x2000 CMOVG EAX,EDX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x18],XMM0 MOV dword ptr [RDI + 0x28],EAX MOV dword ptr [RDI + 0x2c],0x0 RET
/* google::protobuf::io::CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor(google::protobuf::io::CopyingOutputStream*, int) */ void __thiscall google::protobuf::io::CopyingOutputStreamAdaptor::CopyingOutputStreamAdaptor (CopyingOutputStreamAdaptor *this,CopyingOutputStream *param_1,int param_2) { int iVar1; *(int ***)this = &PTR__CopyingOutputStreamAdaptor_0037b8b8; *(CopyingOutputStream **)(this + 8) = param_1; *(int2 *)(this + 0x10) = 0; iVar1 = 0x2000; if (0 < param_2) { iVar1 = param_2; } *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int *)(this + 0x28) = iVar1; *(int4 *)(this + 0x2c) = 0; return; }
46,239
TextSubtext
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
const char *TextSubtext(const char *text, int position, int length) { static char buffer[MAX_TEXT_BUFFER_LENGTH] = { 0 }; memset(buffer, 0, MAX_TEXT_BUFFER_LENGTH); int textLength = TextLength(text); if (position >= textLength) { position = textLength - 1; length = 0; } if (length >= textLength) length = textLength; // NOTE: Alternative: memcpy(buffer, text + position, length) for (int c = 0 ; c < length ; c++) { *(buffer + c) = *(text + position); text++; } *(buffer + length) = '\0'; return buffer; }
O0
c
TextSubtext: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) leaq 0x13ab77(%rip), %rdi # 0x221a00 xorl %esi, %esi movl $0x400, %edx # imm = 0x400 callq 0xa2d0 movq -0x8(%rbp), %rdi callq 0xe5fe0 movl %eax, -0x14(%rbp) movl -0xc(%rbp), %eax cmpl -0x14(%rbp), %eax jl 0xe6eb9 movl -0x14(%rbp), %eax subl $0x1, %eax movl %eax, -0xc(%rbp) movl $0x0, -0x10(%rbp) movl -0x10(%rbp), %eax cmpl -0x14(%rbp), %eax jl 0xe6ec7 movl -0x14(%rbp), %eax movl %eax, -0x10(%rbp) movl $0x0, -0x18(%rbp) movl -0x18(%rbp), %eax cmpl -0x10(%rbp), %eax jge 0xe6f06 movq -0x8(%rbp), %rax movslq -0xc(%rbp), %rcx movb (%rax,%rcx), %dl movslq -0x18(%rbp), %rcx leaq 0x13ab14(%rip), %rax # 0x221a00 movb %dl, (%rax,%rcx) movq -0x8(%rbp), %rax addq $0x1, %rax movq %rax, -0x8(%rbp) movl -0x18(%rbp), %eax addl $0x1, %eax movl %eax, -0x18(%rbp) jmp 0xe6ece movslq -0x10(%rbp), %rcx leaq 0x13aaef(%rip), %rax # 0x221a00 movb $0x0, (%rax,%rcx) leaq 0x13aae4(%rip), %rax # 0x221a00 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
TextSubtext: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx lea rdi, TextSubtext_buffer xor esi, esi mov edx, 400h call _memset mov rdi, [rbp+var_8] call TextLength mov [rbp+var_14], eax mov eax, [rbp+var_C] cmp eax, [rbp+var_14] jl short loc_E6EB9 mov eax, [rbp+var_14] sub eax, 1 mov [rbp+var_C], eax mov [rbp+var_10], 0 loc_E6EB9: mov eax, [rbp+var_10] cmp eax, [rbp+var_14] jl short loc_E6EC7 mov eax, [rbp+var_14] mov [rbp+var_10], eax loc_E6EC7: mov [rbp+var_18], 0 loc_E6ECE: mov eax, [rbp+var_18] cmp eax, [rbp+var_10] jge short loc_E6F06 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_C] mov dl, [rax+rcx] movsxd rcx, [rbp+var_18] lea rax, TextSubtext_buffer mov [rax+rcx], dl mov rax, [rbp+var_8] add rax, 1 mov [rbp+var_8], rax mov eax, [rbp+var_18] add eax, 1 mov [rbp+var_18], eax jmp short loc_E6ECE loc_E6F06: movsxd rcx, [rbp+var_10] lea rax, TextSubtext_buffer mov byte ptr [rax+rcx], 0 lea rax, TextSubtext_buffer add rsp, 20h pop rbp retn
_BYTE * TextSubtext(_BYTE *a1, int a2, int a3) { int i; // [rsp+8h] [rbp-18h] int v5; // [rsp+Ch] [rbp-14h] int v7; // [rsp+14h] [rbp-Ch] _BYTE *v8; // [rsp+18h] [rbp-8h] v8 = a1; v7 = a2; memset(TextSubtext_buffer, 0LL, sizeof(TextSubtext_buffer)); v5 = TextLength(a1); if ( a2 >= v5 ) { v7 = v5 - 1; a3 = 0; } if ( a3 >= v5 ) a3 = v5; for ( i = 0; i < a3; ++i ) { TextSubtext_buffer[i] = v8[v7]; ++v8; } TextSubtext_buffer[a3] = 0; return TextSubtext_buffer; }
TextSubtext: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX LEA RDI,[0x321a00] XOR ESI,ESI MOV EDX,0x400 CALL 0x0010a2d0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001e5fe0 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0xc] CMP EAX,dword ptr [RBP + -0x14] JL 0x001e6eb9 MOV EAX,dword ptr [RBP + -0x14] SUB EAX,0x1 MOV dword ptr [RBP + -0xc],EAX MOV dword ptr [RBP + -0x10],0x0 LAB_001e6eb9: MOV EAX,dword ptr [RBP + -0x10] CMP EAX,dword ptr [RBP + -0x14] JL 0x001e6ec7 MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x10],EAX LAB_001e6ec7: MOV dword ptr [RBP + -0x18],0x0 LAB_001e6ece: MOV EAX,dword ptr [RBP + -0x18] CMP EAX,dword ptr [RBP + -0x10] JGE 0x001e6f06 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0xc] MOV DL,byte ptr [RAX + RCX*0x1] MOVSXD RCX,dword ptr [RBP + -0x18] LEA RAX,[0x321a00] MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x1 MOV qword ptr [RBP + -0x8],RAX MOV EAX,dword ptr [RBP + -0x18] ADD EAX,0x1 MOV dword ptr [RBP + -0x18],EAX JMP 0x001e6ece LAB_001e6f06: MOVSXD RCX,dword ptr [RBP + -0x10] LEA RAX,[0x321a00] MOV byte ptr [RAX + RCX*0x1],0x0 LEA RAX,[0x321a00] ADD RSP,0x20 POP RBP RET
int1 * TextSubtext(long param_1,int param_2,int param_3) { int iVar1; int local_20; int local_18; int local_14; long local_10; memset(TextSubtext_buffer,0,0x400); iVar1 = TextLength(param_1); local_18 = param_3; local_14 = param_2; if (iVar1 <= param_2) { local_14 = iVar1 + -1; local_18 = 0; } if (iVar1 <= local_18) { local_18 = iVar1; } local_10 = param_1; for (local_20 = 0; local_20 < local_18; local_20 = local_20 + 1) { TextSubtext_buffer[local_20] = *(int1 *)(local_10 + local_14); local_10 = local_10 + 1; } TextSubtext_buffer[local_18] = 0; return TextSubtext_buffer; }
46,240
TextSubtext
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
const char *TextSubtext(const char *text, int position, int length) { static char buffer[MAX_TEXT_BUFFER_LENGTH] = { 0 }; memset(buffer, 0, MAX_TEXT_BUFFER_LENGTH); int textLength = TextLength(text); if (position >= textLength) { position = textLength - 1; length = 0; } if (length >= textLength) length = textLength; // NOTE: Alternative: memcpy(buffer, text + position, length) for (int c = 0 ; c < length ; c++) { *(buffer + c) = *(text + position); text++; } *(buffer + length) = '\0'; return buffer; }
O1
c
TextSubtext: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %r15d movl %esi, %ebp movq %rdi, %r14 leaq 0xbdb37(%rip), %rbx # 0x148930 xorl %r12d, %r12d movl $0x400, %edx # imm = 0x400 movq %rbx, %rdi xorl %esi, %esi callq 0x92d0 movl $0x0, %eax testq %r14, %r14 je 0x8ae2e cmpb $0x0, (%r14) movl $0x0, %eax je 0x8ae2e xorl %eax, %eax cmpb $0x0, 0x1(%r14,%rax) leaq 0x1(%rax), %rax jne 0x8ae22 cmpl %ebp, %eax cmovgl %r15d, %r12d cmpl %eax, %r12d cmovgel %eax, %r12d testl %r12d, %r12d jle 0x8ae62 leal -0x1(%rax), %ecx cmpl %ebp, %eax cmovgl %ebp, %ecx movslq %ecx, %rcx movl %r12d, %eax addq %rcx, %r14 xorl %ecx, %ecx movb (%r14,%rcx), %dl movb %dl, (%rcx,%rbx) incq %rcx cmpq %rcx, %rax jne 0x8ae53 movslq %r12d, %rax movb $0x0, (%rax,%rbx) movq %rbx, %rax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
TextSubtext: push rbp push r15 push r14 push r12 push rbx mov r15d, edx mov ebp, esi mov r14, rdi lea rbx, TextSubtext_buffer xor r12d, r12d mov edx, 400h mov rdi, rbx xor esi, esi call _memset mov eax, 0 test r14, r14 jz short loc_8AE2E cmp byte ptr [r14], 0 mov eax, 0 jz short loc_8AE2E xor eax, eax loc_8AE22: cmp byte ptr [r14+rax+1], 0 lea rax, [rax+1] jnz short loc_8AE22 loc_8AE2E: cmp eax, ebp cmovg r12d, r15d cmp r12d, eax cmovge r12d, eax test r12d, r12d jle short loc_8AE62 lea ecx, [rax-1] cmp eax, ebp cmovg ecx, ebp movsxd rcx, ecx mov eax, r12d add r14, rcx xor ecx, ecx loc_8AE53: mov dl, [r14+rcx] mov [rcx+rbx], dl inc rcx cmp rax, rcx jnz short loc_8AE53 loc_8AE62: movsxd rax, r12d mov byte ptr [rax+rbx], 0 mov rax, rbx pop rbx pop r12 pop r14 pop r15 pop rbp retn
_BYTE * TextSubtext(_BYTE *a1, int a2, int a3) { int v4; // r12d long long v5; // rax int v7; // ecx _BYTE *v8; // r14 long long i; // rcx v4 = 0; memset(TextSubtext_buffer, 0LL, sizeof(TextSubtext_buffer)); LODWORD(v5) = 0; if ( a1 ) { LODWORD(v5) = 0; if ( *a1 ) { v5 = 0LL; while ( a1[++v5] != 0 ) ; } } if ( (int)v5 > a2 ) v4 = a3; if ( v4 >= (int)v5 ) v4 = v5; if ( v4 > 0 ) { v7 = v5 - 1; if ( (int)v5 > a2 ) v7 = a2; v8 = &a1[v7]; for ( i = 0LL; i != v4; ++i ) TextSubtext_buffer[i] = v8[i]; } TextSubtext_buffer[v4] = 0; return TextSubtext_buffer; }
TextSubtext: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15D,EDX MOV EBP,ESI MOV R14,RDI LEA RBX,[0x248930] XOR R12D,R12D MOV EDX,0x400 MOV RDI,RBX XOR ESI,ESI CALL 0x001092d0 MOV EAX,0x0 TEST R14,R14 JZ 0x0018ae2e CMP byte ptr [R14],0x0 MOV EAX,0x0 JZ 0x0018ae2e XOR EAX,EAX LAB_0018ae22: CMP byte ptr [R14 + RAX*0x1 + 0x1],0x0 LEA RAX,[RAX + 0x1] JNZ 0x0018ae22 LAB_0018ae2e: CMP EAX,EBP CMOVG R12D,R15D CMP R12D,EAX CMOVGE R12D,EAX TEST R12D,R12D JLE 0x0018ae62 LEA ECX,[RAX + -0x1] CMP EAX,EBP CMOVG ECX,EBP MOVSXD RCX,ECX MOV EAX,R12D ADD R14,RCX XOR ECX,ECX LAB_0018ae53: MOV DL,byte ptr [R14 + RCX*0x1] MOV byte ptr [RCX + RBX*0x1],DL INC RCX CMP RAX,RCX JNZ 0x0018ae53 LAB_0018ae62: MOVSXD RAX,R12D MOV byte ptr [RAX + RBX*0x1],0x0 MOV RAX,RBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
int1 * TextSubtext(char *param_1,int param_2,uint param_3) { long lVar1; uint uVar2; long lVar3; int iVar4; ulong uVar5; uint uVar6; memset(&TextSubtext_buffer,0,0x400); lVar3 = 0; if ((param_1 != (char *)0x0) && (lVar3 = 0, *param_1 != '\0')) { lVar3 = 0; do { lVar1 = lVar3 + 1; lVar3 = lVar3 + 1; } while (param_1[lVar1] != '\0'); } uVar2 = (uint)lVar3; uVar6 = 0; if (param_2 < (int)uVar2) { uVar6 = param_3; } if ((int)uVar2 <= (int)uVar6) { uVar6 = uVar2; } if (0 < (int)uVar6) { iVar4 = uVar2 - 1; if (param_2 < (int)uVar2) { iVar4 = param_2; } uVar5 = 0; do { (&TextSubtext_buffer)[uVar5] = param_1[uVar5 + (long)iVar4]; uVar5 = uVar5 + 1; } while (uVar6 != uVar5); } (&TextSubtext_buffer)[(int)uVar6] = 0; return &TextSubtext_buffer; }
46,241
ma_calc_length_for_store_length
eloqsql/storage/maria/ma_blockrec.c
uint ma_calc_length_for_store_length(ulong nr) { if (nr < 251) return 1; if (nr < 65536) { if (nr <= 255) return 2; return 3; } if (nr < 16777216) return 4; return 5; }
O0
c
ma_calc_length_for_store_length: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) cmpq $0xfb, -0x10(%rbp) jae 0x795bb movl $0x1, -0x4(%rbp) jmp 0x795fb cmpq $0x10000, -0x10(%rbp) # imm = 0x10000 jae 0x795e1 cmpq $0xff, -0x10(%rbp) ja 0x795d8 movl $0x2, -0x4(%rbp) jmp 0x795fb movl $0x3, -0x4(%rbp) jmp 0x795fb cmpq $0x1000000, -0x10(%rbp) # imm = 0x1000000 jae 0x795f4 movl $0x4, -0x4(%rbp) jmp 0x795fb movl $0x5, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq
ma_calc_length_for_store_length: push rbp mov rbp, rsp mov [rbp+var_10], rdi cmp [rbp+var_10], 0FBh jnb short loc_795BB mov [rbp+var_4], 1 jmp short loc_795FB loc_795BB: cmp [rbp+var_10], 10000h jnb short loc_795E1 cmp [rbp+var_10], 0FFh ja short loc_795D8 mov [rbp+var_4], 2 jmp short loc_795FB loc_795D8: mov [rbp+var_4], 3 jmp short loc_795FB loc_795E1: cmp [rbp+var_10], 1000000h jnb short loc_795F4 mov [rbp+var_4], 4 jmp short loc_795FB loc_795F4: mov [rbp+var_4], 5 loc_795FB: mov eax, [rbp+var_4] pop rbp retn
long long ma_calc_length_for_store_length(unsigned long long a1) { if ( a1 >= 0xFB ) { if ( a1 >= 0x10000 ) { if ( a1 >= 0x1000000 ) return 5; else return 4; } else if ( a1 > 0xFF ) { return 3; } else { return 2; } } else { return 1; } }
ma_calc_length_for_store_length: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0xfb JNC 0x001795bb MOV dword ptr [RBP + -0x4],0x1 JMP 0x001795fb LAB_001795bb: CMP qword ptr [RBP + -0x10],0x10000 JNC 0x001795e1 CMP qword ptr [RBP + -0x10],0xff JA 0x001795d8 MOV dword ptr [RBP + -0x4],0x2 JMP 0x001795fb LAB_001795d8: MOV dword ptr [RBP + -0x4],0x3 JMP 0x001795fb LAB_001795e1: CMP qword ptr [RBP + -0x10],0x1000000 JNC 0x001795f4 MOV dword ptr [RBP + -0x4],0x4 JMP 0x001795fb LAB_001795f4: MOV dword ptr [RBP + -0x4],0x5 LAB_001795fb: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 ma_calc_length_for_store_length(ulong param_1) { int4 local_c; if (param_1 < 0xfb) { local_c = 1; } else if (param_1 < 0x10000) { if (param_1 < 0x100) { local_c = 2; } else { local_c = 3; } } else if (param_1 < 0x1000000) { local_c = 4; } else { local_c = 5; } return local_c; }
46,242
c4_chain_genesis_validators_root
corpus-core[P]colibri-stateless/src/util/chains.c
bool c4_chain_genesis_validators_root(chain_id_t chain_id, bytes32_t genesis_validators_root) { void* hash; switch (chain_id) { case C4_CHAIN_MAINNET: hash = "\x4b\x36\x3d\xb9\x4e\x28\x61\x20\xd7\x6e\xb9\x05\x34\x0f\xdd\x4e\x54\xbf\xe9\xf0\x6b\xf3\x3f\xf6\xcf\x5a\xd2\x7f\x51\x1b\xfe\x95"; break; default: return false; } memcpy(genesis_validators_root, hash, 32); return true; }
O0
c
c4_chain_genesis_validators_root: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl -0x8(%rbp), %eax subl $0x1, %eax jne 0xa5f72 jmp 0xa5f65 leaq 0x3fd4c(%rip), %rax # 0xe5cb8 movq %rax, -0x18(%rbp) jmp 0xa5f78 movb $0x0, -0x1(%rbp) jmp 0xa5fa2 movq -0x10(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rdx movq %rdx, 0x8(%rax) movq 0x10(%rcx), %rdx movq %rdx, 0x10(%rax) movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al popq %rbp retq nopl (%rax)
c4_chain_genesis_validators_root: push rbp mov rbp, rsp mov [rbp+var_8], edi mov [rbp+var_10], rsi mov eax, [rbp+var_8] sub eax, 1 jnz short loc_A5F72 jmp short $+2 loc_A5F65: lea rax, unk_E5CB8 mov [rbp+var_18], rax jmp short loc_A5F78 loc_A5F72: mov [rbp+var_1], 0 jmp short loc_A5FA2 loc_A5F78: mov rax, [rbp+var_10] mov rcx, [rbp+var_18] mov rdx, [rcx] mov [rax], rdx mov rdx, [rcx+8] mov [rax+8], rdx mov rdx, [rcx+10h] mov [rax+10h], rdx mov rcx, [rcx+18h] mov [rax+18h], rcx mov [rbp+var_1], 1 loc_A5FA2: mov al, [rbp+var_1] and al, 1 pop rbp retn
char c4_chain_genesis_validators_root(int a1, _QWORD *a2) { if ( a1 != 1 ) return 0; *a2 = qword_E5CB8[0]; a2[1] = qword_E5CB8[1]; a2[2] = qword_E5CB8[2]; a2[3] = qword_E5CB8[3]; return 1; }
c4_chain_genesis_validators_root: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x1 JNZ 0x001a5f72 JMP 0x001a5f65 LAB_001a5f65: LEA RAX,[0x1e5cb8] MOV qword ptr [RBP + -0x18],RAX JMP 0x001a5f78 LAB_001a5f72: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001a5fa2 LAB_001a5f78: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RDX MOV RDX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RDX MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX MOV byte ptr [RBP + -0x1],0x1 LAB_001a5fa2: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 POP RBP RET
bool c4_chain_genesis_validators_root(int param_1,int8 *param_2) { if (param_1 == 1) { *param_2 = DAT_001e5cb8; param_2[1] = DAT_001e5cc0; param_2[2] = DAT_001e5cc8; param_2[3] = DAT_001e5cd0; } return param_1 == 1; }
46,243
ggml_win_unpart
llama.cpp/ggml/src/ggml.c
struct ggml_tensor * ggml_win_unpart( struct ggml_context * ctx, struct ggml_tensor * a, int w0, int h0, int w) { GGML_ASSERT(a->type == GGML_TYPE_F32); const int64_t ne[4] = { a->ne[0], w0, h0, 1, }; struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, 3, ne); int32_t params[] = { w }; ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_WIN_UNPART; result->src[0] = a; return result; }
O3
c
ggml_win_unpart: pushq %r14 pushq %rbx subq $0x28, %rsp cmpl $0x0, (%rsi) jne 0x1e88f movl %r8d, %ebx movq %rsi, %r14 movq 0x10(%rsi), %rsi movq %rsp, %rax movq %rsi, (%rax) movslq %edx, %rdx movq %rdx, 0x8(%rax) movslq %ecx, %rcx movq %rcx, 0x10(%rax) movq $0x1, 0x18(%rax) xorl %esi, %esi movl $0x3, %edx movq %rax, %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x19be7 testq %rax, %rax je 0x1e8ab movl %ebx, 0x54(%rax) movl $0x43, 0x50(%rax) movq %r14, 0x98(%rax) addq $0x28, %rsp popq %rbx popq %r14 retq leaq 0x2bd7d(%rip), %rdi # 0x4a613 leaq 0x2bdb1(%rip), %rdx # 0x4a64e leaq 0x2c4ae(%rip), %rcx # 0x4ad52 movl $0x11f3, %esi # imm = 0x11F3 jmp 0x1e8c5 leaq 0x2ded1(%rip), %rdi # 0x4c783 leaq 0x2bd95(%rip), %rdx # 0x4a64e leaq 0x2df03(%rip), %rcx # 0x4c7c3 movl $0x70, %esi xorl %eax, %eax callq 0x17c80
ggml_win_unpart: push r14 push rbx sub rsp, 28h cmp dword ptr [rsi], 0 jnz short loc_1E88F mov ebx, r8d mov r14, rsi mov rsi, [rsi+10h] mov rax, rsp mov [rax], rsi movsxd rdx, edx mov [rax+8], rdx movsxd rcx, ecx mov [rax+10h], rcx mov qword ptr [rax+18h], 1 xor esi, esi mov edx, 3 mov rcx, rax xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl test rax, rax jz short loc_1E8AB mov [rax+54h], ebx mov dword ptr [rax+50h], 43h ; 'C' mov [rax+98h], r14 add rsp, 28h pop rbx pop r14 retn loc_1E88F: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aATypeGgmlTypeF; "a->type == GGML_TYPE_F32" mov esi, 11F3h jmp short loc_1E8C5 loc_1E8AB: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' loc_1E8C5: xor eax, eax call _ggml_abort
long long ggml_win_unpart(long long a1, long long a2, int a3, int a4, int a5, int a6) { long long result; // rax const char *v8; // rdi const char *v9; // rcx int v10; // esi _QWORD v11[7]; // [rsp+0h] [rbp-38h] BYREF if ( *(_DWORD *)a2 ) { v8 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v9 = "a->type == GGML_TYPE_F32"; v10 = 4595; goto LABEL_6; } v11[0] = *(_QWORD *)(a2 + 16); v11[1] = a3; v11[2] = a4; v11[3] = 1LL; result = ggml_new_tensor_impl(a1, 0, 3u, v11, 0LL, 0LL); if ( !result ) { v8 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-impl.h"; v9 = "tensor != NULL"; v10 = 112; LABEL_6: ggml_abort((_DWORD)v8, v10, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v9, a5, a6); } *(_DWORD *)(result + 84) = a5; *(_DWORD *)(result + 80) = 67; *(_QWORD *)(result + 152) = a2; return result; }
ggml_win_unpart: PUSH R14 PUSH RBX SUB RSP,0x28 CMP dword ptr [RSI],0x0 JNZ 0x0011e88f MOV EBX,R8D MOV R14,RSI MOV RSI,qword ptr [RSI + 0x10] MOV RAX,RSP MOV qword ptr [RAX],RSI MOVSXD RDX,EDX MOV qword ptr [RAX + 0x8],RDX MOVSXD RCX,ECX MOV qword ptr [RAX + 0x10],RCX MOV qword ptr [RAX + 0x18],0x1 XOR ESI,ESI MOV EDX,0x3 MOV RCX,RAX XOR R8D,R8D XOR R9D,R9D CALL 0x00119be7 TEST RAX,RAX JZ 0x0011e8ab MOV dword ptr [RAX + 0x54],EBX MOV dword ptr [RAX + 0x50],0x43 MOV qword ptr [RAX + 0x98],R14 ADD RSP,0x28 POP RBX POP R14 RET LAB_0011e88f: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14ad52] MOV ESI,0x11f3 JMP 0x0011e8c5 LAB_0011e8ab: LEA RDI,[0x14c783] LEA RDX,[0x14a64e] LEA RCX,[0x14c7c3] MOV ESI,0x70 LAB_0011e8c5: XOR EAX,EAX CALL 0x00117c80
void ggml_win_unpart(int8 param_1,int *param_2,int param_3,int param_4,int4 param_5) { long lVar1; char *pcVar2; int8 uVar3; char *pcVar4; int8 local_38; long local_30; long local_28; int8 local_20; if (*param_2 == 0) { local_38 = *(int8 *)(param_2 + 4); local_30 = (long)param_3; local_28 = (long)param_4; local_20 = 1; lVar1 = ggml_new_tensor_impl(param_1,0,3,&local_38,0,0); if (lVar1 != 0) { *(int4 *)(lVar1 + 0x54) = param_5; *(int4 *)(lVar1 + 0x50) = 0x43; *(int **)(lVar1 + 0x98) = param_2; return; } pcVar4 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-impl.h"; pcVar2 = "tensor != NULL"; uVar3 = 0x70; } else { pcVar4 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar2 = "a->type == GGML_TYPE_F32"; uVar3 = 0x11f3; } /* WARNING: Subroutine does not return */ ggml_abort(pcVar4,uVar3,"GGML_ASSERT(%s) failed",pcVar2); }
46,244
WaitTime
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
void WaitTime(double seconds) { if (seconds < 0) return; // Security check #if defined(SUPPORT_BUSY_WAIT_LOOP) || defined(SUPPORT_PARTIALBUSY_WAIT_LOOP) double destinationTime = GetTime() + seconds; #endif #if defined(SUPPORT_BUSY_WAIT_LOOP) while (GetTime() < destinationTime) { } #else #if defined(SUPPORT_PARTIALBUSY_WAIT_LOOP) double sleepSeconds = seconds - seconds*0.05; // NOTE: We reserve a percentage of the time for busy waiting #else double sleepSeconds = seconds; #endif // System halt functions #if defined(_WIN32) Sleep((unsigned long)(sleepSeconds*1000.0)); #endif #if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__) struct timespec req = { 0 }; time_t sec = sleepSeconds; long nsec = (sleepSeconds - sec)*1000000000L; req.tv_sec = sec; req.tv_nsec = nsec; // NOTE: Use nanosleep() on Unix platforms... usleep() it's deprecated while (nanosleep(&req, &req) == -1) continue; #endif #if defined(__APPLE__) usleep(sleepSeconds*1000000.0); #endif #if defined(SUPPORT_PARTIALBUSY_WAIT_LOOP) while (GetTime() < destinationTime) { } #endif #endif }
O0
c
WaitTime: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movsd %xmm0, -0x8(%rbp) xorps %xmm0, %xmm0 ucomisd -0x8(%rbp), %xmm0 jbe 0xce81c jmp 0xce8d9 callq 0xca7a0 addsd -0x8(%rbp), %xmm0 movsd %xmm0, -0x10(%rbp) movsd -0x8(%rbp), %xmm1 movsd -0x8(%rbp), %xmm0 movq %xmm0, %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 xorq %rcx, %rax movq %rax, %xmm0 movsd 0xe5a4c(%rip), %xmm2 # 0x1b42a0 mulsd %xmm2, %xmm0 addsd %xmm1, %xmm0 movsd %xmm0, -0x18(%rbp) leaq -0x28(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0xa2d0 cvttsd2si -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movsd -0x18(%rbp), %xmm0 cvtsi2sdq -0x30(%rbp), %xmm1 subsd %xmm1, %xmm0 movsd 0xd987e(%rip), %xmm1 # 0x1a8110 mulsd %xmm1, %xmm0 cvttsd2si %xmm0, %rax movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x20(%rbp) leaq -0x28(%rbp), %rsi movq %rsi, %rdi callq 0xa190 cmpl $-0x1, %eax jne 0xce8c2 jmp 0xce8af jmp 0xce8c4 callq 0xca7a0 movaps %xmm0, %xmm1 movsd -0x10(%rbp), %xmm0 ucomisd %xmm1, %xmm0 jbe 0xce8d9 jmp 0xce8c4 addq $0x40, %rsp popq %rbp retq nop
WaitTime: push rbp mov rbp, rsp sub rsp, 40h movsd [rbp+var_8], xmm0 xorps xmm0, xmm0 ucomisd xmm0, [rbp+var_8] jbe short loc_CE81C jmp loc_CE8D9 loc_CE81C: call GetTime addsd xmm0, [rbp+var_8] movsd [rbp+var_10], xmm0 movsd xmm1, [rbp+var_8] movsd xmm0, [rbp+var_8] movq rax, xmm0 mov rcx, 8000000000000000h xor rax, rcx movq xmm0, rax movsd xmm2, cs:qword_1B42A0 mulsd xmm0, xmm2 addsd xmm0, xmm1 movsd [rbp+var_18], xmm0 lea rdi, [rbp+var_28] xor esi, esi mov edx, 10h call _memset cvttsd2si rax, [rbp+var_18] mov [rbp+var_30], rax movsd xmm0, [rbp+var_18] cvtsi2sd xmm1, [rbp+var_30] subsd xmm0, xmm1 movsd xmm1, cs:qword_1A8110 mulsd xmm0, xmm1 cvttsd2si rax, xmm0 mov [rbp+var_38], rax mov rax, [rbp+var_30] mov [rbp+var_28], rax mov rax, [rbp+var_38] mov [rbp+var_20], rax loc_CE8AF: lea rsi, [rbp+var_28] mov rdi, rsi call _nanosleep cmp eax, 0FFFFFFFFh jnz short loc_CE8C2 jmp short loc_CE8AF loc_CE8C2: jmp short $+2 loc_CE8C4: call GetTime movaps xmm1, xmm0 movsd xmm0, [rbp+var_10] ucomisd xmm0, xmm1 jbe short loc_CE8D9 jmp short loc_CE8C4 loc_CE8D9: add rsp, 40h pop rbp retn
double WaitTime(double a1) { double result; // xmm0_8 double v2; // xmm1_8 _QWORD v3[2]; // [rsp+18h] [rbp-28h] BYREF double v4; // [rsp+28h] [rbp-18h] double v5; // [rsp+30h] [rbp-10h] double v6; // [rsp+38h] [rbp-8h] v6 = a1; result = 0.0; if ( v6 >= 0.0 ) { GetTime(); v5 = v6 + 0.0; v4 = COERCE_DOUBLE(*(_QWORD *)&v6 ^ 0x8000000000000000LL) * 0.05 + v6; memset(v3, 0LL, sizeof(v3)); result = (v4 - (double)(int)v4) * 1000000000.0; v3[0] = (unsigned int)(int)v4; v3[1] = (unsigned int)(int)result; while ( (unsigned int)nanosleep(v3, v3) == -1 ) ; do { GetTime(); v2 = result; result = v5; } while ( v5 > v2 ); } return result; }
WaitTime: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOVSD qword ptr [RBP + -0x8],XMM0 XORPS XMM0,XMM0 UCOMISD XMM0,qword ptr [RBP + -0x8] JBE 0x001ce81c JMP 0x001ce8d9 LAB_001ce81c: CALL 0x001ca7a0 ADDSD XMM0,qword ptr [RBP + -0x8] MOVSD qword ptr [RBP + -0x10],XMM0 MOVSD XMM1,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RBP + -0x8] MOVQ RAX,XMM0 MOV RCX,-0x8000000000000000 XOR RAX,RCX MOVQ XMM0,RAX MOVSD XMM2,qword ptr [0x002b42a0] MULSD XMM0,XMM2 ADDSD XMM0,XMM1 MOVSD qword ptr [RBP + -0x18],XMM0 LEA RDI,[RBP + -0x28] XOR ESI,ESI MOV EDX,0x10 CALL 0x0010a2d0 CVTTSD2SI RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOVSD XMM0,qword ptr [RBP + -0x18] CVTSI2SD XMM1,qword ptr [RBP + -0x30] SUBSD XMM0,XMM1 MOVSD XMM1,qword ptr [0x002a8110] MULSD XMM0,XMM1 CVTTSD2SI RAX,XMM0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x20],RAX LAB_001ce8af: LEA RSI,[RBP + -0x28] MOV RDI,RSI CALL 0x0010a190 CMP EAX,-0x1 JNZ 0x001ce8c2 JMP 0x001ce8af LAB_001ce8c2: JMP 0x001ce8c4 LAB_001ce8c4: CALL 0x001ca7a0 MOVAPS XMM1,XMM0 MOVSD XMM0,qword ptr [RBP + -0x10] UCOMISD XMM0,XMM1 JBE 0x001ce8d9 JMP 0x001ce8c4 LAB_001ce8d9: ADD RSP,0x40 POP RBP RET
void WaitTime(double param_1) { int iVar1; double dVar2; timespec local_30; double local_20; double local_18; double local_10; if (0.0 <= param_1) { local_10 = param_1; local_18 = (double)GetTime(); local_18 = local_18 + local_10; local_20 = -local_10 * DAT_002b42a0 + local_10; memset(&local_30,0,0x10); local_30.tv_sec = (__time_t)local_20; local_30.tv_nsec = (long)((local_20 - (double)local_30.tv_sec) * DAT_002a8110); do { iVar1 = nanosleep(&local_30,&local_30); } while (iVar1 == -1); do { dVar2 = (double)GetTime(); } while (dVar2 < local_18); } return; }
46,245
WaitTime
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rcore.c
void WaitTime(double seconds) { if (seconds < 0) return; // Security check #if defined(SUPPORT_BUSY_WAIT_LOOP) || defined(SUPPORT_PARTIALBUSY_WAIT_LOOP) double destinationTime = GetTime() + seconds; #endif #if defined(SUPPORT_BUSY_WAIT_LOOP) while (GetTime() < destinationTime) { } #else #if defined(SUPPORT_PARTIALBUSY_WAIT_LOOP) double sleepSeconds = seconds - seconds*0.05; // NOTE: We reserve a percentage of the time for busy waiting #else double sleepSeconds = seconds; #endif // System halt functions #if defined(_WIN32) Sleep((unsigned long)(sleepSeconds*1000.0)); #endif #if defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__) struct timespec req = { 0 }; time_t sec = sleepSeconds; long nsec = (sleepSeconds - sec)*1000000000L; req.tv_sec = sec; req.tv_nsec = nsec; // NOTE: Use nanosleep() on Unix platforms... usleep() it's deprecated while (nanosleep(&req, &req) == -1) continue; #endif #if defined(__APPLE__) usleep(sleepSeconds*1000000.0); #endif #if defined(SUPPORT_PARTIALBUSY_WAIT_LOOP) while (GetTime() < destinationTime) { } #endif #endif }
O3
c
WaitTime: xorpd %xmm1, %xmm1 ucomisd %xmm0, %xmm1 ja 0x72dea pushq %rbx subq $0x20, %rsp movsd %xmm0, 0x8(%rsp) callq 0xbe92e movsd 0x6bb30(%rip), %xmm1 # 0xde8a8 movsd 0x8(%rsp), %xmm2 mulsd %xmm2, %xmm1 addsd %xmm2, %xmm1 cvttsd2si %xmm1, %rax xorps %xmm2, %xmm2 cvtsi2sd %rax, %xmm2 subsd %xmm2, %xmm1 mulsd 0x60fa9(%rip), %xmm1 # 0xd3d48 cvttsd2si %xmm1, %rcx movsd %xmm0, (%rsp) leaq 0x10(%rsp), %rbx movq %rax, (%rbx) movq %rcx, 0x8(%rbx) movq %rbx, %rdi movq %rbx, %rsi callq 0xa180 cmpl $-0x1, %eax je 0x72db5 movsd (%rsp), %xmm0 addsd 0x8(%rsp), %xmm0 movsd %xmm0, (%rsp) callq 0xbe92e movsd (%rsp), %xmm1 ucomisd %xmm0, %xmm1 ja 0x72dd5 addq $0x20, %rsp popq %rbx retq
WaitTime: xorpd xmm1, xmm1 ucomisd xmm1, xmm0 ja locret_72DEA push rbx sub rsp, 20h movsd [rsp+28h+var_20], xmm0 call glfwGetTime movsd xmm1, cs:qword_DE8A8 movsd xmm2, [rsp+28h+var_20] mulsd xmm1, xmm2 addsd xmm1, xmm2 cvttsd2si rax, xmm1 xorps xmm2, xmm2 cvtsi2sd xmm2, rax subsd xmm1, xmm2 mulsd xmm1, cs:qword_D3D48 cvttsd2si rcx, xmm1 movsd [rsp+28h+var_28], xmm0 lea rbx, [rsp+28h+var_18] mov [rbx], rax mov [rbx+8], rcx loc_72DB5: mov rdi, rbx mov rsi, rbx call _nanosleep cmp eax, 0FFFFFFFFh jz short loc_72DB5 movsd xmm0, [rsp+28h+var_28] addsd xmm0, [rsp+28h+var_20] movsd [rsp+28h+var_28], xmm0 loc_72DD5: call glfwGetTime movsd xmm1, [rsp+28h+var_28] ucomisd xmm1, xmm0 ja short loc_72DD5 add rsp, 20h pop rbx locret_72DEA: retn
void WaitTime(double a1, double a2, double a3, double a4, double a5) { double Time; // xmm0_8 double v6; // xmm1_8 long long v7; // rax double v8; // xmm2_8 double v9; // xmm1_8 double v10; // xmm4_8 double v11; // xmm0_8 double v12; // [rsp+0h] [rbp-28h] double v13; // [rsp+0h] [rbp-28h] _QWORD v15[3]; // [rsp+10h] [rbp-18h] BYREF if ( a1 >= 0.0 ) { Time = glfwGetTime(a1, 0.0, a3, a4, a5); v6 = -0.05 * a1 + a1; v7 = (unsigned int)(int)v6; v8 = (double)(int)v7; v9 = (v6 - (double)(int)v7) * 1000000000.0; v12 = Time; v15[0] = v7; v15[1] = (unsigned int)(int)v9; while ( (unsigned int)nanosleep(v15, v15) == -1 ) ; v11 = Time + a1; v13 = v12 + a1; do { v11 = glfwGetTime(v11, v9, v8, a4, v10); v9 = v13; } while ( v13 > v11 ); } }
WaitTime: XORPD XMM1,XMM1 UCOMISD XMM1,XMM0 JA 0x00172dea PUSH RBX SUB RSP,0x20 MOVSD qword ptr [RSP + 0x8],XMM0 CALL 0x001be92e MOVSD XMM1,qword ptr [0x001de8a8] MOVSD XMM2,qword ptr [RSP + 0x8] MULSD XMM1,XMM2 ADDSD XMM1,XMM2 CVTTSD2SI RAX,XMM1 XORPS XMM2,XMM2 CVTSI2SD XMM2,RAX SUBSD XMM1,XMM2 MULSD XMM1,qword ptr [0x001d3d48] CVTTSD2SI RCX,XMM1 MOVSD qword ptr [RSP],XMM0 LEA RBX,[RSP + 0x10] MOV qword ptr [RBX],RAX MOV qword ptr [RBX + 0x8],RCX LAB_00172db5: MOV RDI,RBX MOV RSI,RBX CALL 0x0010a180 CMP EAX,-0x1 JZ 0x00172db5 MOVSD XMM0,qword ptr [RSP] ADDSD XMM0,qword ptr [RSP + 0x8] MOVSD qword ptr [RSP],XMM0 LAB_00172dd5: CALL 0x001be92e MOVSD XMM1,qword ptr [RSP] UCOMISD XMM1,XMM0 JA 0x00172dd5 ADD RSP,0x20 POP RBX LAB_00172dea: RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void WaitTime(double param_1) { int iVar1; double dVar2; double dVar3; timespec local_18; if (0.0 <= param_1) { dVar2 = (double)glfwGetTime(); dVar3 = DAT_001de8a8 * param_1 + param_1; local_18.tv_sec = (__time_t)dVar3; local_18.tv_nsec = (long)((dVar3 - (double)local_18.tv_sec) * _DAT_001d3d48); do { iVar1 = nanosleep(&local_18,&local_18); } while (iVar1 == -1); do { dVar3 = (double)glfwGetTime(); } while (dVar3 < dVar2 + param_1); } return; }
46,246
list_delete
eloqsql/mysys/list.c
LIST *list_delete(LIST *root, LIST *element) { if (element->prev) element->prev->next=element->next; else root=element->next; if (element->next) element->next->prev=element->prev; return root; }
O0
c
list_delete: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0xe36db movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) jmp 0xe36e7 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0xe3704 movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax popq %rbp retq nopw (%rax,%rax)
list_delete: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_E36DB mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+8], rcx jmp short loc_E36E7 loc_E36DB: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_8], rax loc_E36E7: mov rax, [rbp+var_10] cmp qword ptr [rax+8], 0 jz short loc_E3704 mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax], rcx loc_E3704: mov rax, [rbp+var_8] pop rbp retn
long long list_delete(long long a1, _QWORD *a2) { if ( *a2 ) *(_QWORD *)(*a2 + 8LL) = a2[1]; else a1 = a2[1]; if ( a2[1] ) *(_QWORD *)a2[1] = *a2; return a1; }
list_delete: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x001e36db MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX JMP 0x001e36e7 LAB_001e36db: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x8],RAX LAB_001e36e7: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x8],0x0 JZ 0x001e3704 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RAX],RCX LAB_001e3704: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
long list_delete(long param_1,long *param_2) { long local_10; if (*param_2 == 0) { local_10 = param_2[1]; } else { *(long *)(*param_2 + 8) = param_2[1]; local_10 = param_1; } if (param_2[1] != 0) { *(long *)param_2[1] = *param_2; } return local_10; }
46,247
my_interval_timer
eloqsql/mysys/my_getsystime.c
ulonglong my_interval_timer() { #ifdef HAVE_CLOCK_GETTIME struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp); return tp.tv_sec*1000000000ULL+tp.tv_nsec; #elif defined(HAVE_GETHRTIME) return gethrtime(); #elif defined(_WIN32) DBUG_ASSERT(query_performance_frequency); LARGE_INTEGER t_cnt; QueryPerformanceCounter(&t_cnt); return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) + ((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL / query_performance_frequency); #else /* TODO: check for other possibilities for hi-res timestamping */ struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL; #endif }
O0
c
my_interval_timer: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl $0x1, %edi leaq -0x10(%rbp), %rsi callq 0x38370 imulq $0x3b9aca00, -0x10(%rbp), %rax # imm = 0x3B9ACA00 addq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
my_interval_timer: push rbp mov rbp, rsp sub rsp, 10h mov edi, 1 lea rsi, [rbp+var_10] call _clock_gettime imul rax, [rbp+var_10], 3B9ACA00h add rax, [rbp+var_8] add rsp, 10h pop rbp retn
long long my_interval_timer() { _QWORD v1[2]; // [rsp+0h] [rbp-10h] BYREF clock_gettime(1LL, v1); return v1[1] + 1000000000LL * v1[0]; }
my_interval_timer: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV EDI,0x1 LEA RSI,[RBP + -0x10] CALL 0x00138370 IMUL RAX,qword ptr [RBP + -0x10],0x3b9aca00 ADD RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
long my_interval_timer(void) { timespec local_18; clock_gettime(1,&local_18); return local_18.tv_sec * 1000000000 + local_18.tv_nsec; }
46,248
my_interval_timer
eloqsql/mysys/my_getsystime.c
ulonglong my_interval_timer() { #ifdef HAVE_CLOCK_GETTIME struct timespec tp; clock_gettime(CLOCK_MONOTONIC, &tp); return tp.tv_sec*1000000000ULL+tp.tv_nsec; #elif defined(HAVE_GETHRTIME) return gethrtime(); #elif defined(_WIN32) DBUG_ASSERT(query_performance_frequency); LARGE_INTEGER t_cnt; QueryPerformanceCounter(&t_cnt); return (t_cnt.QuadPart / query_performance_frequency * 1000000000ULL) + ((t_cnt.QuadPart % query_performance_frequency) * 1000000000ULL / query_performance_frequency); #else /* TODO: check for other possibilities for hi-res timestamping */ struct timeval tv; gettimeofday(&tv,NULL); return tv.tv_sec*1000000000ULL+tv.tv_usec*1000ULL; #endif }
O3
c
my_interval_timer: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp leaq -0x18(%rbp), %rbx movl $0x1, %edi movq %rbx, %rsi callq 0x37370 imulq $0x3b9aca00, (%rbx), %rax # imm = 0x3B9ACA00 addq 0x8(%rbx), %rax addq $0x18, %rsp popq %rbx popq %rbp retq
my_interval_timer: push rbp mov rbp, rsp push rbx sub rsp, 18h lea rbx, [rbp+var_18] mov edi, 1 mov rsi, rbx call _clock_gettime imul rax, [rbx], 3B9ACA00h add rax, [rbx+8] add rsp, 18h pop rbx pop rbp retn
long long my_interval_timer() { _QWORD v1[3]; // [rsp+8h] [rbp-18h] BYREF clock_gettime(1LL, v1); return v1[1] + 1000000000LL * v1[0]; }
my_interval_timer: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 LEA RBX,[RBP + -0x18] MOV EDI,0x1 MOV RSI,RBX CALL 0x00137370 IMUL RAX,qword ptr [RBX],0x3b9aca00 ADD RAX,qword ptr [RBX + 0x8] ADD RSP,0x18 POP RBX POP RBP RET
long my_interval_timer(void) { timespec local_20; clock_gettime(1,&local_20); return local_20.tv_sec * 1000000000 + local_20.tv_nsec; }
46,249
bitmap_xor
eloqsql/mysys/my_bitmap.c
void bitmap_xor(MY_BITMAP *map, const MY_BITMAP *map2) { my_bitmap_map *to= map->bitmap, *from= map2->bitmap, *end= map->last_word_ptr; DBUG_ASSERT(map->bitmap); DBUG_ASSERT(map2->bitmap); DBUG_ASSERT(map->n_bits == map2->n_bits); while (to <= end) *to++ ^= *from++; }
O3
c
bitmap_xor: movq (%rdi), %rax movq 0x8(%rdi), %rcx cmpq %rcx, %rax ja 0xa50fe pushq %rbp movq %rsp, %rbp movq (%rsi), %rdx movl (%rdx), %esi xorl %esi, (%rax) addq $0x4, %rdx addq $0x4, %rax cmpq %rcx, %rax jbe 0xa50ec popq %rbp retq
bitmap_xor: mov rax, [rdi] mov rcx, [rdi+8] cmp rax, rcx ja short locret_A50FE push rbp mov rbp, rsp mov rdx, [rsi] loc_A50EC: mov esi, [rdx] xor [rax], esi add rdx, 4 add rax, 4 cmp rax, rcx jbe short loc_A50EC pop rbp locret_A50FE: retn
_DWORD * bitmap_xor(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_xor: MOV RAX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x8] CMP RAX,RCX JA 0x001a50fe PUSH RBP MOV RBP,RSP MOV RDX,qword ptr [RSI] LAB_001a50ec: MOV ESI,dword ptr [RDX] XOR dword ptr [RAX],ESI ADD RDX,0x4 ADD RAX,0x4 CMP RAX,RCX JBE 0x001a50ec POP RBP LAB_001a50fe: RET
void bitmap_xor(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; }
46,250
_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; }
O0
c
_JS_FindAtom: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movl %ecx, 0x14(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi movl $0x1, %edx callq 0x5b710 movl %eax, 0x10(%rsp) movl 0x10(%rsp), %eax andl $0x3fffffff, %eax # imm = 0x3FFFFFFF movl %eax, 0x10(%rsp) movl 0x10(%rsp), %eax movq 0x28(%rsp), %rcx movl 0x50(%rcx), %ecx subl $0x1, %ecx andl %ecx, %eax movl %eax, 0xc(%rsp) movq 0x28(%rsp), %rax movq 0x60(%rax), %rax movl 0xc(%rsp), %ecx movl (%rax,%rcx,4), %eax movl %eax, 0x8(%rsp) cmpl $0x0, 0x8(%rsp) je 0x26f93 movq 0x28(%rsp), %rax movq 0x68(%rax), %rax movl 0x8(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, (%rsp) movq (%rsp), %rax movq 0x4(%rax), %rax shrq $0x20, %rax andq $0x3fffffff, %rax # imm = 0x3FFFFFFF cmpl 0x10(%rsp), %eax jne 0x26f83 movq (%rsp), %rax movq 0x4(%rax), %rax shrq $0x3e, %rax movzbl %al, %eax cmpl $0x1, %eax jne 0x26f83 movq (%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, %eax cmpq 0x18(%rsp), %rax jne 0x26f83 movq (%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax movzbl %al, %eax cmpl $0x0, %eax jne 0x26f83 movq (%rsp), %rdi addq $0x18, %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0xe470 cmpl $0x0, %eax jne 0x26f83 movl 0x8(%rsp), %edi callq 0x26d40 cmpl $0x0, %eax jne 0x26f79 movq (%rsp), %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) movl 0x8(%rsp), %eax movl %eax, 0x34(%rsp) jmp 0x26f9b movq (%rsp), %rax movl 0xc(%rax), %eax movl %eax, 0x8(%rsp) jmp 0x26ec5 movl $0x0, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
__JS_FindAtom: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx mov [rsp+38h+var_24], ecx mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_20] mov edx, 1 call hash_string8 mov [rsp+38h+var_28], eax mov eax, [rsp+38h+var_28] and eax, 3FFFFFFFh mov [rsp+38h+var_28], eax mov eax, [rsp+38h+var_28] mov rcx, [rsp+38h+var_10] mov ecx, [rcx+50h] sub ecx, 1 and eax, ecx mov [rsp+38h+var_2C], eax mov rax, [rsp+38h+var_10] mov rax, [rax+60h] mov ecx, [rsp+38h+var_2C] mov eax, [rax+rcx*4] mov [rsp+38h+var_30], eax loc_26EC5: cmp [rsp+38h+var_30], 0 jz loc_26F93 mov rax, [rsp+38h+var_10] mov rax, [rax+68h] mov ecx, [rsp+38h+var_30] mov rax, [rax+rcx*8] mov [rsp+38h+var_38], rax mov rax, [rsp+38h+var_38] mov rax, [rax+4] shr rax, 20h and rax, 3FFFFFFFh cmp eax, [rsp+38h+var_28] jnz loc_26F83 mov rax, [rsp+38h+var_38] mov rax, [rax+4] shr rax, 3Eh movzx eax, al cmp eax, 1 jnz short loc_26F83 mov rax, [rsp+38h+var_38] mov rax, [rax+4] and rax, 7FFFFFFFh mov eax, eax cmp rax, [rsp+38h+var_20] jnz short loc_26F83 mov rax, [rsp+38h+var_38] mov rax, [rax+4] shr rax, 1Fh and rax, 1 movzx eax, al cmp eax, 0 jnz short loc_26F83 mov rdi, [rsp+38h+var_38] add rdi, 18h mov rsi, [rsp+38h+var_18] mov rdx, [rsp+38h+var_20] call _memcmp cmp eax, 0 jnz short loc_26F83 mov edi, [rsp+38h+var_30] call __JS_AtomIsConst cmp eax, 0 jnz short loc_26F79 mov rax, [rsp+38h+var_38] mov ecx, [rax] add ecx, 1 mov [rax], ecx loc_26F79: mov eax, [rsp+38h+var_30] mov [rsp+38h+var_4], eax jmp short loc_26F9B loc_26F83: mov rax, [rsp+38h+var_38] mov eax, [rax+0Ch] mov [rsp+38h+var_30], eax jmp loc_26EC5 loc_26F93: mov [rsp+38h+var_4], 0 loc_26F9B: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long _JS_FindAtom(long long a1, long long a2, long long a3) { long long v4; // [rsp+0h] [rbp-38h] unsigned int i; // [rsp+8h] [rbp-30h] unsigned int v6; // [rsp+10h] [rbp-28h] v6 = hash_string8(a2, a3, 1LL) & 0x3FFFFFFF; for ( i = *(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * ((*(_DWORD *)(a1 + 80) - 1) & v6)); ; i = *(_DWORD *)(v4 + 12) ) { if ( !i ) return 0; v4 = *(_QWORD *)(*(_QWORD *)(a1 + 104) + 8LL * i); if ( (HIDWORD(*(_QWORD *)(v4 + 4)) & 0x3FFFFFFF) == v6 && *(_QWORD *)(v4 + 4) >> 62 == 1 && (*(_QWORD *)(v4 + 4) & 0x7FFFFFFFLL) == a3 && (*(_QWORD *)(v4 + 4) & 0x80000000LL) == 0 && !(unsigned int)memcmp(v4 + 24, a2, a3) ) { break; } } if ( !_JS_AtomIsConst(i) ) ++*(_DWORD *)v4; return i; }
__JS_FindAtom: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV dword ptr [RSP + 0x14],ECX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV EDX,0x1 CALL 0x0015b710 MOV dword ptr [RSP + 0x10],EAX MOV EAX,dword ptr [RSP + 0x10] AND EAX,0x3fffffff MOV dword ptr [RSP + 0x10],EAX MOV EAX,dword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RCX + 0x50] SUB ECX,0x1 AND EAX,ECX MOV dword ptr [RSP + 0xc],EAX MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x60] MOV ECX,dword ptr [RSP + 0xc] MOV EAX,dword ptr [RAX + RCX*0x4] MOV dword ptr [RSP + 0x8],EAX LAB_00126ec5: CMP dword ptr [RSP + 0x8],0x0 JZ 0x00126f93 MOV RAX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + 0x68] MOV ECX,dword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x20 AND RAX,0x3fffffff CMP EAX,dword ptr [RSP + 0x10] JNZ 0x00126f83 MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x3e MOVZX EAX,AL CMP EAX,0x1 JNZ 0x00126f83 MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV EAX,EAX CMP RAX,qword ptr [RSP + 0x18] JNZ 0x00126f83 MOV RAX,qword ptr [RSP] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 MOVZX EAX,AL CMP EAX,0x0 JNZ 0x00126f83 MOV RDI,qword ptr [RSP] ADD RDI,0x18 MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] CALL 0x0010e470 CMP EAX,0x0 JNZ 0x00126f83 MOV EDI,dword ptr [RSP + 0x8] CALL 0x00126d40 CMP EAX,0x0 JNZ 0x00126f79 MOV RAX,qword ptr [RSP] MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_00126f79: MOV EAX,dword ptr [RSP + 0x8] MOV dword ptr [RSP + 0x34],EAX JMP 0x00126f9b LAB_00126f83: MOV RAX,qword ptr [RSP] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RSP + 0x8],EAX JMP 0x00126ec5 LAB_00126f93: MOV dword ptr [RSP + 0x34],0x0 LAB_00126f9b: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
uint __JS_FindAtom(long param_1,void *param_2,size_t param_3) { int *piVar1; uint uVar2; int iVar3; uint local_30; uVar2 = hash_string8(param_2,param_3,1); local_30 = *(uint *)(*(long *)(param_1 + 0x60) + (ulong)(uVar2 & 0x3fffffff & *(int *)(param_1 + 0x50) - 1U) * 4); while( true ) { if (local_30 == 0) { return 0; } piVar1 = *(int **)(*(long *)(param_1 + 0x68) + (ulong)local_30 * 8); if ((((((uint)((ulong)*(int8 *)(piVar1 + 1) >> 0x20) & 0x3fffffff) == (uVar2 & 0x3fffffff) ) && ((uint)((ulong)*(int8 *)(piVar1 + 1) >> 0x3e) == 1)) && (((uint)*(int8 *)(piVar1 + 1) & 0x7fffffff) == param_3)) && (((*(ulong *)(piVar1 + 1) >> 0x1f & 1) == 0 && (iVar3 = memcmp(piVar1 + 6,param_2,param_3), iVar3 == 0)))) break; local_30 = piVar1[3]; } iVar3 = __JS_AtomIsConst(local_30); if (iVar3 == 0) { *piVar1 = *piVar1 + 1; } return local_30; }
46,251
_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; }
O1
c
_JS_FindAtom: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movl $0x1, %r15d testq %rdx, %rdx je 0x1f258 xorl %eax, %eax imull $0x107, %r15d, %ecx # imm = 0x107 movzbl (%r14,%rax), %r15d addl %ecx, %r15d incq %rax cmpq %rax, %rbx jne 0x1f23a andl $0x3fffffff, %r15d # imm = 0x3FFFFFFF movl 0x50(%rdi), %eax decl %eax andl %r15d, %eax movq 0x60(%rdi), %rcx movl (%rcx,%rax,4), %ebp testl %ebp, %ebp je 0x1f2d2 movq 0x68(%rdi), %r12 movl %ebp, %eax movq (%r12,%rax,8), %r13 movq 0x4(%r13), %rax testl %eax, %eax js 0x1f2ca movl %eax, %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF cmpq %rbx, %rcx jne 0x1f2ca movq %rax, %rcx movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000 andq %rdx, %rcx movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000 cmpq %rdx, %rcx jne 0x1f2ca shrq $0x20, %rax andl $0x3fffffff, %eax # imm = 0x3FFFFFFF cmpl %r15d, %eax jne 0x1f2ca leaq 0x18(%r13), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0xe690 testl %eax, %eax je 0x1f2e5 movl 0xc(%r13), %ebp testl %ebp, %ebp jne 0x1f26f xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0xe0, %ebp jl 0x1f2d4 incl (%r13) jmp 0x1f2d4
__JS_FindAtom: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r15d, 1 test rdx, rdx jz short loc_1F258 xor eax, eax loc_1F23A: imul ecx, r15d, 107h movzx r15d, byte ptr [r14+rax] add r15d, ecx inc rax cmp rbx, rax jnz short loc_1F23A and r15d, 3FFFFFFFh loc_1F258: mov eax, [rdi+50h] dec eax and eax, r15d mov rcx, [rdi+60h] mov ebp, [rcx+rax*4] test ebp, ebp jz short loc_1F2D2 mov r12, [rdi+68h] loc_1F26F: mov eax, ebp mov r13, [r12+rax*8] mov rax, [r13+4] test eax, eax js short loc_1F2CA mov ecx, eax and ecx, 7FFFFFFFh cmp rcx, rbx jnz short loc_1F2CA mov rcx, rax mov rdx, 0C000000000000000h and rcx, rdx mov rdx, 4000000000000000h cmp rcx, rdx jnz short loc_1F2CA shr rax, 20h and eax, 3FFFFFFFh cmp eax, r15d jnz short loc_1F2CA lea rdi, [r13+18h] mov rsi, r14 mov rdx, rbx call _bcmp test eax, eax jz short loc_1F2E5 loc_1F2CA: mov ebp, [r13+0Ch] test ebp, ebp jnz short loc_1F26F loc_1F2D2: xor ebp, ebp loc_1F2D4: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1F2E5: cmp ebp, 0E0h jl short loc_1F2D4 inc dword ptr [r13+0] jmp short loc_1F2D4
long long _JS_FindAtom(long long a1, long long a2, long long a3) { int v4; // r15d long long i; // rax int v6; // ebp long long v7; // r12 long long v8; // r13 long long v9; // rax v4 = 1; if ( a3 ) { for ( i = 0LL; i != a3; ++i ) v4 = 263 * v4 + *(unsigned __int8 *)(a2 + i); v4 &= 0x3FFFFFFFu; } v6 = *(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * (v4 & (unsigned int)(*(_DWORD *)(a1 + 80) - 1))); if ( v6 ) { v7 = *(_QWORD *)(a1 + 104); while ( 1 ) { v8 = *(_QWORD *)(v7 + 8LL * (unsigned int)v6); v9 = *(_QWORD *)(v8 + 4); if ( (int)v9 >= 0 && (*(_QWORD *)(v8 + 4) & 0x7FFFFFFFLL) == a3 && (v9 & 0xC000000000000000LL) == 0x4000000000000000LL && (HIDWORD(v9) & 0x3FFFFFFF) == v4 && !(unsigned int)bcmp(v8 + 24, a2, a3, 0x4000000000000000LL) ) { break; } v6 = *(_DWORD *)(v8 + 12); if ( !v6 ) return 0; } if ( v6 >= 224 ) ++*(_DWORD *)v8; } else { return 0; } return (unsigned int)v6; }
__JS_FindAtom: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15D,0x1 TEST RDX,RDX JZ 0x0011f258 XOR EAX,EAX LAB_0011f23a: IMUL ECX,R15D,0x107 MOVZX R15D,byte ptr [R14 + RAX*0x1] ADD R15D,ECX INC RAX CMP RBX,RAX JNZ 0x0011f23a AND R15D,0x3fffffff LAB_0011f258: MOV EAX,dword ptr [RDI + 0x50] DEC EAX AND EAX,R15D MOV RCX,qword ptr [RDI + 0x60] MOV EBP,dword ptr [RCX + RAX*0x4] TEST EBP,EBP JZ 0x0011f2d2 MOV R12,qword ptr [RDI + 0x68] LAB_0011f26f: MOV EAX,EBP MOV R13,qword ptr [R12 + RAX*0x8] MOV RAX,qword ptr [R13 + 0x4] TEST EAX,EAX JS 0x0011f2ca MOV ECX,EAX AND ECX,0x7fffffff CMP RCX,RBX JNZ 0x0011f2ca MOV RCX,RAX MOV RDX,-0x4000000000000000 AND RCX,RDX MOV RDX,0x4000000000000000 CMP RCX,RDX JNZ 0x0011f2ca SHR RAX,0x20 AND EAX,0x3fffffff CMP EAX,R15D JNZ 0x0011f2ca LEA RDI,[R13 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0010e690 TEST EAX,EAX JZ 0x0011f2e5 LAB_0011f2ca: MOV EBP,dword ptr [R13 + 0xc] TEST EBP,EBP JNZ 0x0011f26f LAB_0011f2d2: XOR EBP,EBP LAB_0011f2d4: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011f2e5: CMP EBP,0xe0 JL 0x0011f2d4 INC dword ptr [R13] JMP 0x0011f2d4
uint __JS_FindAtom(long param_1,void *param_2,size_t param_3) { long lVar1; int *piVar2; ulong uVar3; int iVar4; size_t sVar5; uint uVar6; uint uVar7; uVar7 = 1; if (param_3 != 0) { sVar5 = 0; do { uVar7 = (uint)*(byte *)((long)param_2 + sVar5) + uVar7 * 0x107; sVar5 = sVar5 + 1; } while (param_3 != sVar5); uVar7 = uVar7 & 0x3fffffff; } uVar6 = *(uint *)(*(long *)(param_1 + 0x60) + (ulong)(*(int *)(param_1 + 0x50) - 1U & uVar7) * 4); if (uVar6 != 0) { lVar1 = *(long *)(param_1 + 0x68); do { piVar2 = *(int **)(lVar1 + (ulong)uVar6 * 8); uVar3 = *(ulong *)(piVar2 + 1); if ((((-1 < (int)(uint)uVar3) && (((uint)uVar3 & 0x7fffffff) == param_3)) && ((uVar3 & 0xc000000000000000) == 0x4000000000000000)) && ((((uint)(uVar3 >> 0x20) & 0x3fffffff) == uVar7 && (iVar4 = bcmp(piVar2 + 6,param_2,param_3), iVar4 == 0)))) { if ((int)uVar6 < 0xe0) { return uVar6; } *piVar2 = *piVar2 + 1; return uVar6; } uVar6 = piVar2[3]; } while (uVar6 != 0); } return 0; }
46,252
_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; }
O3
c
_JS_FindAtom: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movl $0x1, %r15d testq %rdx, %rdx je 0x1f997 xorl %eax, %eax imull $0x107, %r15d, %ecx # imm = 0x107 movzbl (%r14,%rax), %r15d addl %ecx, %r15d incq %rax cmpq %rax, %rbx jne 0x1f979 andl $0x3fffffff, %r15d # imm = 0x3FFFFFFF movl 0x50(%rdi), %eax decl %eax andl %r15d, %eax movq 0x60(%rdi), %rcx movl (%rcx,%rax,4), %ebp testl %ebp, %ebp je 0x1fa11 movq 0x68(%rdi), %r12 movl %ebp, %eax movq (%r12,%rax,8), %r13 movq 0x4(%r13), %rax testl %eax, %eax js 0x1fa09 movl %eax, %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF cmpq %rbx, %rcx jne 0x1fa09 movq %rax, %rcx movabsq $-0x4000000000000000, %rdx # imm = 0xC000000000000000 andq %rdx, %rcx movabsq $0x4000000000000000, %rdx # imm = 0x4000000000000000 cmpq %rdx, %rcx jne 0x1fa09 shrq $0x20, %rax andl $0x3fffffff, %eax # imm = 0x3FFFFFFF cmpl %r15d, %eax jne 0x1fa09 leaq 0x18(%r13), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0xe690 testl %eax, %eax je 0x1fa24 movl 0xc(%r13), %ebp testl %ebp, %ebp jne 0x1f9ae xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpl $0xe0, %ebp jl 0x1fa13 incl (%r13) jmp 0x1fa13
__JS_FindAtom: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r15d, 1 test rdx, rdx jz short loc_1F997 xor eax, eax loc_1F979: imul ecx, r15d, 107h movzx r15d, byte ptr [r14+rax] add r15d, ecx inc rax cmp rbx, rax jnz short loc_1F979 and r15d, 3FFFFFFFh loc_1F997: mov eax, [rdi+50h] dec eax and eax, r15d mov rcx, [rdi+60h] mov ebp, [rcx+rax*4] test ebp, ebp jz short loc_1FA11 mov r12, [rdi+68h] loc_1F9AE: mov eax, ebp mov r13, [r12+rax*8] mov rax, [r13+4] test eax, eax js short loc_1FA09 mov ecx, eax and ecx, 7FFFFFFFh cmp rcx, rbx jnz short loc_1FA09 mov rcx, rax mov rdx, 0C000000000000000h and rcx, rdx mov rdx, 4000000000000000h cmp rcx, rdx jnz short loc_1FA09 shr rax, 20h and eax, 3FFFFFFFh cmp eax, r15d jnz short loc_1FA09 lea rdi, [r13+18h] mov rsi, r14 mov rdx, rbx call _bcmp test eax, eax jz short loc_1FA24 loc_1FA09: mov ebp, [r13+0Ch] test ebp, ebp jnz short loc_1F9AE loc_1FA11: xor ebp, ebp loc_1FA13: mov eax, ebp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1FA24: cmp ebp, 0E0h jl short loc_1FA13 inc dword ptr [r13+0] jmp short loc_1FA13
long long _JS_FindAtom(long long a1, long long a2, long long a3) { int v4; // r15d long long i; // rax int v6; // ebp long long v7; // r12 long long v8; // r13 long long v9; // rax v4 = 1; if ( a3 ) { for ( i = 0LL; i != a3; ++i ) v4 = 263 * v4 + *(unsigned __int8 *)(a2 + i); v4 &= 0x3FFFFFFFu; } v6 = *(_DWORD *)(*(_QWORD *)(a1 + 96) + 4LL * (v4 & (unsigned int)(*(_DWORD *)(a1 + 80) - 1))); if ( v6 ) { v7 = *(_QWORD *)(a1 + 104); while ( 1 ) { v8 = *(_QWORD *)(v7 + 8LL * (unsigned int)v6); v9 = *(_QWORD *)(v8 + 4); if ( (int)v9 >= 0 && (*(_QWORD *)(v8 + 4) & 0x7FFFFFFFLL) == a3 && (v9 & 0xC000000000000000LL) == 0x4000000000000000LL && (HIDWORD(v9) & 0x3FFFFFFF) == v4 && !(unsigned int)bcmp(v8 + 24, a2, a3, 0x4000000000000000LL) ) { break; } v6 = *(_DWORD *)(v8 + 12); if ( !v6 ) return 0; } if ( v6 >= 224 ) ++*(_DWORD *)v8; } else { return 0; } return (unsigned int)v6; }
__JS_FindAtom: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R15D,0x1 TEST RDX,RDX JZ 0x0011f997 XOR EAX,EAX LAB_0011f979: IMUL ECX,R15D,0x107 MOVZX R15D,byte ptr [R14 + RAX*0x1] ADD R15D,ECX INC RAX CMP RBX,RAX JNZ 0x0011f979 AND R15D,0x3fffffff LAB_0011f997: MOV EAX,dword ptr [RDI + 0x50] DEC EAX AND EAX,R15D MOV RCX,qword ptr [RDI + 0x60] MOV EBP,dword ptr [RCX + RAX*0x4] TEST EBP,EBP JZ 0x0011fa11 MOV R12,qword ptr [RDI + 0x68] LAB_0011f9ae: MOV EAX,EBP MOV R13,qword ptr [R12 + RAX*0x8] MOV RAX,qword ptr [R13 + 0x4] TEST EAX,EAX JS 0x0011fa09 MOV ECX,EAX AND ECX,0x7fffffff CMP RCX,RBX JNZ 0x0011fa09 MOV RCX,RAX MOV RDX,-0x4000000000000000 AND RCX,RDX MOV RDX,0x4000000000000000 CMP RCX,RDX JNZ 0x0011fa09 SHR RAX,0x20 AND EAX,0x3fffffff CMP EAX,R15D JNZ 0x0011fa09 LEA RDI,[R13 + 0x18] MOV RSI,R14 MOV RDX,RBX CALL 0x0010e690 TEST EAX,EAX JZ 0x0011fa24 LAB_0011fa09: MOV EBP,dword ptr [R13 + 0xc] TEST EBP,EBP JNZ 0x0011f9ae LAB_0011fa11: XOR EBP,EBP LAB_0011fa13: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011fa24: CMP EBP,0xe0 JL 0x0011fa13 INC dword ptr [R13] JMP 0x0011fa13
uint __JS_FindAtom(long param_1,void *param_2,size_t param_3) { long lVar1; int *piVar2; ulong uVar3; int iVar4; size_t sVar5; uint uVar6; uint uVar7; uVar7 = 1; if (param_3 != 0) { sVar5 = 0; do { uVar7 = (uint)*(byte *)((long)param_2 + sVar5) + uVar7 * 0x107; sVar5 = sVar5 + 1; } while (param_3 != sVar5); uVar7 = uVar7 & 0x3fffffff; } uVar6 = *(uint *)(*(long *)(param_1 + 0x60) + (ulong)(*(int *)(param_1 + 0x50) - 1U & uVar7) * 4); if (uVar6 != 0) { lVar1 = *(long *)(param_1 + 0x68); do { piVar2 = *(int **)(lVar1 + (ulong)uVar6 * 8); uVar3 = *(ulong *)(piVar2 + 1); if ((((-1 < (int)(uint)uVar3) && (((uint)uVar3 & 0x7fffffff) == param_3)) && ((uVar3 & 0xc000000000000000) == 0x4000000000000000)) && ((((uint)(uVar3 >> 0x20) & 0x3fffffff) == uVar7 && (iVar4 = bcmp(piVar2 + 6,param_2,param_3), iVar4 == 0)))) { if ((int)uVar6 < 0xe0) { return uVar6; } *piVar2 = *piVar2 + 1; return uVar6; } uVar6 = piVar2[3]; } while (uVar6 != 0); } return 0; }
46,253
minja::Parser::parseBracedExpressionOrArray()
monkey531[P]llama/common/minja.hpp
std::shared_ptr<Expression> parseBracedExpressionOrArray() { if (consumeToken("(").empty()) return nullptr; auto expr = parseExpression(); if (!expr) throw std::runtime_error("Expected expression in braced expression"); if (!consumeToken(")").empty()) { return expr; // Drop the parentheses } std::vector<std::shared_ptr<Expression>> tuple; tuple.emplace_back(std::move(expr)); while (it != end) { if (consumeToken(",").empty()) throw std::runtime_error("Expected comma in tuple"); auto next = parseExpression(); if (!next) throw std::runtime_error("Expected expression in tuple"); tuple.push_back(std::move(next)); if (!consumeToken(")").empty()) { return std::make_shared<ArrayExpr>(get_location(), std::move(tuple)); } } throw std::runtime_error("Expected closing parenthesis"); }
O2
cpp
minja::Parser::parseBracedExpressionOrArray(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %r15 movq %rdi, %r14 leaq 0x532e0(%rip), %rsi # 0xbc7ea leaq 0x20(%rsp), %rdi leaq 0x70(%rsp), %rdx callq 0x29c20 leaq 0x40(%rsp), %rdi leaq 0x20(%rsp), %rdx pushq $0x1 popq %rcx movq %r15, %rsi callq 0x6403e leaq 0x40(%rsp), %rdi movq 0x8(%rdi), %rbx callq 0x24348 leaq 0x20(%rsp), %rdi callq 0x24348 testq %rbx, %rbx je 0x695ca leaq 0x10(%rsp), %rbx pushq $0x1 popq %rdx movq %rbx, %rdi movq %r15, %rsi callq 0x6384c cmpq $0x0, (%rbx) je 0x697ce leaq 0x52f34(%rip), %rsi # 0xbc4a3 leaq 0x20(%rsp), %rdi leaq 0x70(%rsp), %rdx callq 0x29c20 leaq 0x40(%rsp), %rdi leaq 0x20(%rsp), %rdx pushq $0x1 popq %rcx movq %r15, %rsi callq 0x6403e leaq 0x40(%rsp), %rdi movq 0x8(%rdi), %rbx callq 0x24348 leaq 0x20(%rsp), %rdi callq 0x24348 testq %rbx, %rbx je 0x695d6 movaps 0x10(%rsp), %xmm0 andq $0x0, 0x18(%rsp) movups %xmm0, (%r14) andq $0x0, 0x10(%rsp) jmp 0x69731 xorps %xmm0, %xmm0 movups %xmm0, (%r14) jmp 0x6973b movq %r14, 0x90(%rsp) xorps %xmm0, %xmm0 leaq 0x70(%rsp), %rdi movaps %xmm0, (%rdi) andq $0x0, 0x10(%rdi) leaq 0x10(%rsp), %rsi callq 0x67e64 leaq 0x20(%rsp), %r13 leaq 0x60(%rsp), %rbp leaq 0x40(%rsp), %rbx pushq $0x1 popq %r14 movq 0x20(%r15), %rax cmpq 0x18(%r15), %rax je 0x69782 movq %r13, %rdi leaq 0x4e8a7(%rip), %rsi # 0xb7eca movq %rbp, %rdx callq 0x29c20 movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx movl %r14d, %ecx callq 0x6403e movq 0x48(%rsp), %r12 movq %rbx, %rdi callq 0x24348 movq %r13, %rdi callq 0x24348 testq %r12, %r12 je 0x6979e movq %rbp, %rdi movq %r15, %rsi movl %r14d, %edx callq 0x6384c cmpq $0x0, 0x60(%rsp) je 0x69750 leaq 0x70(%rsp), %rdi movq %rbp, %rsi callq 0x67e64 movq %r13, %rdi leaq 0x52e18(%rip), %rsi # 0xbc4a3 leaq 0xf(%rsp), %rdx callq 0x29c20 movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx movl %r14d, %ecx callq 0x6403e movq 0x48(%rsp), %r12 movq %rbx, %rdi callq 0x24348 movq %r13, %rdi callq 0x24348 testq %r12, %r12 jne 0x696cf leaq 0x68(%rsp), %rdi callq 0x2adb8 jmp 0x6960b leaq 0x40(%rsp), %rdi movq %r15, %rsi callq 0x6360e leaq 0x20(%rsp), %rdi leaq 0x40(%rsp), %rsi leaq 0x70(%rsp), %rdx callq 0x6c2c1 movq 0x90(%rsp), %r14 leaq 0x28(%rsp), %rdi movaps -0x8(%rdi), %xmm0 andq $0x0, (%rdi) movups %xmm0, (%r14) andq $0x0, -0x8(%rdi) callq 0x2adb8 leaq 0x48(%rsp), %rdi callq 0x2adb8 leaq 0x68(%rsp), %rdi callq 0x2adb8 leaq 0x70(%rsp), %rdi callq 0x67eca leaq 0x18(%rsp), %rdi callq 0x2adb8 movq %r14, %rax addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x234b0 movq %rax, %r14 leaq 0x4e782(%rip), %rsi # 0xb7ee4 movq %rax, %rdi callq 0x23360 movq 0x98877(%rip), %rsi # 0x101fe8 movq 0x987d0(%rip), %rdx # 0x101f48 movq %r14, %rdi callq 0x24050 jmp 0x697fe pushq $0x10 popq %rdi callq 0x234b0 movq %rax, %r14 leaq 0x4e76d(%rip), %rsi # 0xb7f01 movq %rax, %rdi callq 0x23360 jmp 0x697b8 pushq $0x10 popq %rdi callq 0x234b0 movq %rax, %r14 leaq 0x4e71c(%rip), %rsi # 0xb7ecc movq %rax, %rdi callq 0x23360 movq 0x98829(%rip), %rsi # 0x101fe8 movq 0x98782(%rip), %rdx # 0x101f48 movq %r14, %rdi callq 0x24050 pushq $0x10 popq %rdi callq 0x234b0 movq %rax, %r14 leaq 0x4e6c1(%rip), %rsi # 0xb7ea1 movq %rax, %rdi callq 0x23360 movq 0x987f9(%rip), %rsi # 0x101fe8 movq 0x98752(%rip), %rdx # 0x101f48 movq %r14, %rdi callq 0x24050 movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x2adb8 jmp 0x69891 jmp 0x6987f jmp 0x69833 movq %rax, %rbx movq %r14, %rdi callq 0x236f0 jmp 0x698aa movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x24348 jmp 0x698aa movq %rax, %rbx jmp 0x698aa movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x24348 jmp 0x698b4 movq %rax, %rbx jmp 0x698b4 jmp 0x6984e movq %rax, %rbx movq %r14, %rdi callq 0x236f0 jmp 0x698a0 jmp 0x6987f movq %rax, %rbx movq %r14, %rdi callq 0x236f0 jmp 0x69891 jmp 0x6989d movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x24348 jmp 0x698a0 jmp 0x6989d jmp 0x6987f movq %rax, %rbx jmp 0x69891 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x24348 leaq 0x68(%rsp), %rdi callq 0x2adb8 jmp 0x698a0 movq %rax, %rbx leaq 0x70(%rsp), %rdi callq 0x67eca leaq 0x18(%rsp), %rdi callq 0x2adb8 movq %rbx, %rdi callq 0x240e0
_ZN5minja6Parser28parseBracedExpressionOrArrayEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov r15, rsi mov r14, rdi lea rsi, asc_BC7E5+5; "(" lea rdi, [rsp+0C8h+var_A8] lea rdx, [rsp+0C8h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0C8h+var_88] lea rdx, [rsp+0C8h+var_A8] push 1 pop rcx mov rsi, r15 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rdi, [rsp+0C8h+var_88]; void * mov rbx, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbx, rbx jz short loc_695CA lea rbx, [rsp+0C8h+var_B8] push 1 pop rdx mov rdi, rbx; this mov rsi, r15; bool call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool) cmp qword ptr [rbx], 0 jz loc_697CE lea rsi, a09401910201912+51h; ")" lea rdi, [rsp+0C8h+var_A8] lea rdx, [rsp+0C8h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0C8h+var_88] lea rdx, [rsp+0C8h+var_A8] push 1 pop rcx mov rsi, r15 call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) lea rdi, [rsp+0C8h+var_88]; void * mov rbx, [rdi+8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0C8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test rbx, rbx jz short loc_695D6 movaps xmm0, [rsp+0C8h+var_B8] and qword ptr [rsp+0C8h+var_B8+8], 0 movups xmmword ptr [r14], xmm0 and qword ptr [rsp+0C8h+var_B8], 0 jmp loc_69731 loc_695CA: xorps xmm0, xmm0 movups xmmword ptr [r14], xmm0 jmp loc_6973B loc_695D6: mov [rsp+0C8h+var_38], r14 xorps xmm0, xmm0 lea rdi, [rsp+0C8h+var_58] movaps xmmword ptr [rdi], xmm0 and qword ptr [rdi+10h], 0 lea rsi, [rsp+0C8h+var_B8] call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&) lea r13, [rsp+0C8h+var_A8] lea rbp, [rsp+0C8h+var_68] lea rbx, [rsp+0C8h+var_88] push 1 pop r14 loc_6960B: mov rax, [r15+20h] cmp rax, [r15+18h] jz loc_69782 mov rdi, r13 lea rsi, asc_B7ECA; "," mov rdx, rbp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r15 mov rdx, r13 mov ecx, r14d call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov r12, [rsp+0C8h+var_80] mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r12, r12 jz loc_6979E mov rdi, rbp; this mov rsi, r15; bool mov edx, r14d call _ZN5minja6Parser15parseExpressionEb; minja::Parser::parseExpression(bool) cmp [rsp+0C8h+var_68], 0 jz loc_69750 lea rdi, [rsp+0C8h+var_58] mov rsi, rbp call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EE12emplace_backIJS3_EEERS3_DpOT_; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>(std::shared_ptr<minja::Expression> &&) mov rdi, r13 lea rsi, a09401910201912+51h; ")" lea rdx, [rsp+0C8h+var_B9] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r15 mov rdx, r13 mov ecx, r14d call _ZN5minja6Parser12consumeTokenERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_13SpaceHandlingE; minja::Parser::consumeToken(std::string const&,minja::SpaceHandling) mov r12, [rsp+0C8h+var_80] mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test r12, r12 jnz short loc_696CF lea rdi, [rsp+0C8h+var_60] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp loc_6960B loc_696CF: lea rdi, [rsp+0C8h+var_88]; this mov rsi, r15 call _ZNK5minja6Parser12get_locationEv; minja::Parser::get_location(void) lea rdi, [rsp+0C8h+var_A8] lea rsi, [rsp+0C8h+var_88] lea rdx, [rsp+0C8h+var_58] call _ZSt11make_sharedIN5minja9ArrayExprEJNS0_8LocationESt6vectorISt10shared_ptrINS0_10ExpressionEESaIS6_EEEES4_IT_EDpOT0_; std::make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>(minja::Location,std::vector<std::shared_ptr<minja::Expression>> &&) mov r14, [rsp+0C8h+var_38] lea rdi, [rsp+0C8h+var_A0] movaps xmm0, xmmword ptr [rdi-8] and qword ptr [rdi], 0 movups xmmword ptr [r14], xmm0 and qword ptr [rdi-8], 0 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0C8h+var_80] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0C8h+var_60] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+0C8h+var_58] call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector() loc_69731: lea rdi, [rsp+0C8h+var_B8+8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_6973B: mov rax, r14 add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_69750: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExpres_3; "Expected expression in tuple" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_697FE loc_69782: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedClosin_3; "Expected closing parenthesis" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_697B8 loc_6979E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedCommaI; "Expected comma in tuple" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_697B8: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_697CE: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aExpectedExpres_4; "Expected expression in braced expressio"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_697FE: mov rbx, rax lea rdi, [rsp+0C8h+var_80] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp loc_69891 jmp short loc_6987F jmp short loc_69833 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp loc_698AA mov rbx, rax lea rdi, [rsp+0C8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_698AA loc_69833: mov rbx, rax jmp short loc_698AA mov rbx, rax lea rdi, [rsp+0C8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_698B4 mov rbx, rax jmp short loc_698B4 jmp short $+2 loc_6984E: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_698A0 jmp short loc_6987F mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_69891 jmp short loc_6989D mov rbx, rax lea rdi, [rsp+0C8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_698A0 jmp short loc_6989D jmp short $+2 loc_6987F: mov rbx, rax jmp short loc_69891 mov rbx, rax lea rdi, [rsp+0C8h+var_A8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_69891: lea rdi, [rsp+0C8h+var_60] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() jmp short loc_698A0 loc_6989D: mov rbx, rax loc_698A0: lea rdi, [rsp+0C8h+var_58] call _ZNSt6vectorISt10shared_ptrIN5minja10ExpressionEESaIS3_EED2Ev; std::vector<std::shared_ptr<minja::Expression>>::~vector() loc_698AA: lea rdi, [rsp+0C8h+var_B8+8] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() loc_698B4: mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::parseBracedExpressionOrArray(minja::Parser *this, _QWORD *a2) { minja::Parser *v2; // r14 long long v3; // rbx long long v4; // rbx __int128 v5; // xmm0 long long v6; // r12 long long v7; // r12 __int128 v8; // xmm0 std::runtime_error *v10; // r14 std::runtime_error *v11; // r14 std::runtime_error *exception; // r14 __int128 v13; // [rsp+10h] [rbp-B8h] BYREF _OWORD v14[2]; // [rsp+20h] [rbp-A8h] BYREF long long v15; // [rsp+40h] [rbp-88h] BYREF _QWORD v16[3]; // [rsp+48h] [rbp-80h] BYREF __int128 v17; // [rsp+60h] [rbp-68h] BYREF __int128 v18; // [rsp+70h] [rbp-58h] BYREF long long v19; // [rsp+80h] [rbp-48h] minja::Parser *v20; // [rsp+90h] [rbp-38h] v2 = this; std::string::basic_string<std::allocator<char>>(v14, (long long)"("); minja::Parser::consumeToken(&v15, (long long)a2, v14, 1u); v3 = v16[0]; std::string::~string(&v15); std::string::~string(v14); if ( !v3 ) { *(_OWORD *)this = 0LL; return v2; } minja::Parser::parseExpression((minja::Parser *)&v13, a2, 1); if ( !(_QWORD)v13 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Expected expression in braced expression"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::string::basic_string<std::allocator<char>>(v14, (long long)")"); minja::Parser::consumeToken(&v15, (long long)a2, v14, 1u); v4 = v16[0]; std::string::~string(&v15); std::string::~string(v14); if ( v4 ) { v5 = v13; *((_QWORD *)&v13 + 1) = 0LL; *(_OWORD *)this = v5; *(_QWORD *)&v13 = 0LL; goto LABEL_13; } v20 = this; v18 = 0LL; v19 = 0LL; std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>((long long)&v18, &v13); while ( 1 ) { if ( a2[4] == a2[3] ) { v11 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v11, "Expected closing parenthesis"); goto LABEL_18; } std::string::basic_string<std::allocator<char>>(v14, (long long)","); minja::Parser::consumeToken(&v15, (long long)a2, v14, 1u); v6 = v16[0]; std::string::~string(&v15); std::string::~string(v14); if ( !v6 ) { v11 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v11, "Expected comma in tuple"); LABEL_18: __cxa_throw( v11, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Parser::parseExpression((minja::Parser *)&v17, a2, 1); if ( !(_QWORD)v17 ) { v10 = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(v10, "Expected expression in tuple"); __cxa_throw( v10, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::vector<std::shared_ptr<minja::Expression>>::emplace_back<std::shared_ptr<minja::Expression>>( (long long)&v18, &v17); std::string::basic_string<std::allocator<char>>(v14, (long long)")"); minja::Parser::consumeToken(&v15, (long long)a2, v14, 1u); v7 = v16[0]; std::string::~string(&v15); std::string::~string(v14); if ( v7 ) break; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v17 + 1); } minja::Parser::get_location((minja::Parser *)&v15, a2); std::make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>>>(v14, &v15, &v18); v2 = v20; v8 = v14[0]; *((_QWORD *)&v14[0] + 1) = 0LL; *(_OWORD *)v20 = v8; *(_QWORD *)&v14[0] = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)v14 + 1); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v16); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v17 + 1); std::vector<std::shared_ptr<minja::Expression>>::~vector(&v18); LABEL_13: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count((_QWORD *)&v13 + 1); return v2; }
parseBracedExpressionOrArray: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R15,RSI MOV R14,RDI LAB_00169503: LEA RSI,[0x1bc7ea] LEA RDI,[RSP + 0x20] LEA RDX,[RSP + 0x70] CALL 0x00129c20 LAB_00169519: LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x20] PUSH 0x1 POP RCX MOV RSI,R15 CALL 0x0016403e LAB_0016952e: LEA RDI,[RSP + 0x40] MOV RBX,qword ptr [RDI + 0x8] CALL 0x00124348 LEA RDI,[RSP + 0x20] CALL 0x00124348 TEST RBX,RBX JZ 0x001695ca LEA RBX,[RSP + 0x10] PUSH 0x1 POP RDX MOV RDI,RBX MOV RSI,R15 CALL 0x0016384c CMP qword ptr [RBX],0x0 JZ 0x001697ce LAB_00169568: LEA RSI,[0x1bc4a3] LEA RDI,[RSP + 0x20] LEA RDX,[RSP + 0x70] CALL 0x00129c20 LAB_0016957e: LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x20] PUSH 0x1 POP RCX MOV RSI,R15 CALL 0x0016403e LEA RDI,[RSP + 0x40] MOV RBX,qword ptr [RDI + 0x8] CALL 0x00124348 LEA RDI,[RSP + 0x20] CALL 0x00124348 TEST RBX,RBX JZ 0x001695d6 MOVAPS XMM0,xmmword ptr [RSP + 0x10] AND qword ptr [RSP + 0x18],0x0 MOVUPS xmmword ptr [R14],XMM0 AND qword ptr [RSP + 0x10],0x0 JMP 0x00169731 LAB_001695ca: XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14],XMM0 JMP 0x0016973b LAB_001695d6: MOV qword ptr [RSP + 0x90],R14 XORPS XMM0,XMM0 LEA RDI,[RSP + 0x70] MOVAPS xmmword ptr [RDI],XMM0 AND qword ptr [RDI + 0x10],0x0 LAB_001695ee: LEA RSI,[RSP + 0x10] CALL 0x00167e64 LEA R13,[RSP + 0x20] LEA RBP,[RSP + 0x60] LEA RBX,[RSP + 0x40] PUSH 0x1 POP R14 LAB_0016960b: MOV RAX,qword ptr [R15 + 0x20] CMP RAX,qword ptr [R15 + 0x18] JZ 0x00169782 LAB_00169619: MOV RDI,R13 LEA RSI,[0x1b7eca] MOV RDX,RBP CALL 0x00129c20 LAB_0016962b: MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 MOV ECX,R14D CALL 0x0016403e MOV R12,qword ptr [RSP + 0x48] MOV RDI,RBX CALL 0x00124348 MOV RDI,R13 CALL 0x00124348 TEST R12,R12 JZ 0x0016979e LAB_0016965a: MOV RDI,RBP MOV RSI,R15 MOV EDX,R14D CALL 0x0016384c CMP qword ptr [RSP + 0x60],0x0 JZ 0x00169750 LAB_00169674: LEA RDI,[RSP + 0x70] MOV RSI,RBP CALL 0x00167e64 LAB_00169681: MOV RDI,R13 LEA RSI,[0x1bc4a3] LEA RDX,[RSP + 0xf] CALL 0x00129c20 LAB_00169695: MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 MOV ECX,R14D CALL 0x0016403e MOV R12,qword ptr [RSP + 0x48] MOV RDI,RBX CALL 0x00124348 MOV RDI,R13 CALL 0x00124348 TEST R12,R12 JNZ 0x001696cf LEA RDI,[RSP + 0x68] CALL 0x0012adb8 JMP 0x0016960b LAB_001696cf: LEA RDI,[RSP + 0x40] MOV RSI,R15 CALL 0x0016360e LAB_001696dc: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x40] LEA RDX,[RSP + 0x70] CALL 0x0016c2c1 LAB_001696f0: MOV R14,qword ptr [RSP + 0x90] LEA RDI,[RSP + 0x28] MOVAPS XMM0,xmmword ptr [RDI + -0x8] AND qword ptr [RDI],0x0 MOVUPS xmmword ptr [R14],XMM0 AND qword ptr [RDI + -0x8],0x0 CALL 0x0012adb8 LEA RDI,[RSP + 0x48] CALL 0x0012adb8 LEA RDI,[RSP + 0x68] CALL 0x0012adb8 LEA RDI,[RSP + 0x70] CALL 0x00167eca LAB_00169731: LEA RDI,[RSP + 0x18] CALL 0x0012adb8 LAB_0016973b: MOV RAX,R14 ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00169750: PUSH 0x10 POP RDI CALL 0x001234b0 MOV R14,RAX LAB_0016975b: LEA RSI,[0x1b7ee4] MOV RDI,RAX CALL 0x00123360 LAB_0016976a: MOV RSI,qword ptr [0x00201fe8] MOV RDX,qword ptr [0x00201f48] MOV RDI,R14 CALL 0x00124050 LAB_00169782: PUSH 0x10 POP RDI CALL 0x001234b0 MOV R14,RAX LAB_0016978d: LEA RSI,[0x1b7f01] MOV RDI,RAX CALL 0x00123360 LAB_0016979c: JMP 0x001697b8 LAB_0016979e: PUSH 0x10 POP RDI CALL 0x001234b0 MOV R14,RAX LAB_001697a9: LEA RSI,[0x1b7ecc] MOV RDI,RAX CALL 0x00123360 LAB_001697b8: MOV RSI,qword ptr [0x00201fe8] MOV RDX,qword ptr [0x00201f48] MOV RDI,R14 CALL 0x00124050 LAB_001697ce: PUSH 0x10 POP RDI CALL 0x001234b0 MOV R14,RAX LAB_001697d9: LEA RSI,[0x1b7ea1] MOV RDI,RAX CALL 0x00123360 LAB_001697e8: MOV RSI,qword ptr [0x00201fe8] MOV RDX,qword ptr [0x00201f48] MOV RDI,R14 CALL 0x00124050
/* minja::Parser::parseBracedExpressionOrArray() */ long * minja::Parser::parseBracedExpressionOrArray(void) { long lVar1; long lVar2; runtime_error *prVar3; long in_RSI; long *in_RDI; allocator local_b9; long local_b8; long lStack_b0; long local_a8; long alStack_a0 [3]; string local_88 [8]; long local_80 [3]; long local_68; __shared_count<(__gnu_cxx::_Lock_policy)2> local_60 [8]; int8 local_58; int8 uStack_50; int8 local_48; long *local_38; /* try { // try from 00169503 to 00169518 has its CatchHandler @ 00169847 */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,"(",(allocator *)&local_58) ; /* try { // try from 00169519 to 0016952d has its CatchHandler @ 00169838 */ consumeToken(local_88); lVar1 = local_80[0]; std::__cxx11::string::~string(local_88); std::__cxx11::string::~string((string *)&local_a8); if (lVar1 == 0) { *in_RDI = 0; in_RDI[1] = 0; } else { parseExpression(SUB81(&local_b8,0)); if (local_b8 == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001697d9 to 001697e7 has its CatchHandler @ 00169814 */ std::runtime_error::runtime_error(prVar3,"Expected expression in braced expression"); /* try { // try from 001697e8 to 001697fd has its CatchHandler @ 00169812 */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48); } /* try { // try from 00169568 to 0016957d has its CatchHandler @ 00169833 */ std::__cxx11::string::string<std::allocator<char>> ((string *)&local_a8,")",(allocator *)&local_58); /* try { // try from 0016957e to 00169592 has its CatchHandler @ 00169824 */ consumeToken(local_88); lVar2 = local_80[0]; std::__cxx11::string::~string(local_88); std::__cxx11::string::~string((string *)&local_a8); lVar1 = lStack_b0; if (lVar2 == 0) { local_58 = 0; uStack_50 = 0; local_48 = 0; /* try { // try from 001695ee to 001695f7 has its CatchHandler @ 0016989d */ local_38 = in_RDI; std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::emplace_back<std::shared_ptr<minja::Expression>> ((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)&local_58,(shared_ptr *)&local_b8); do { if (*(long *)(in_RSI + 0x20) == *(long *)(in_RSI + 0x18)) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016978d to 0016979b has its CatchHandler @ 0016984e */ std::runtime_error::runtime_error(prVar3,"Expected closing parenthesis"); LAB_001697b8: /* try { // try from 001697b8 to 001697cd has its CatchHandler @ 0016989d */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48); } /* try { // try from 00169619 to 0016962a has its CatchHandler @ 0016986a */ std::__cxx11::string::string<std::allocator<char>> ((string *)&local_a8,",",(allocator *)&local_68); /* try { // try from 0016962b to 0016963b has its CatchHandler @ 0016986c */ consumeToken(local_88); lVar1 = local_80[0]; std::__cxx11::string::~string(local_88); std::__cxx11::string::~string((string *)&local_a8); if (lVar1 == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001697a9 to 001697b7 has its CatchHandler @ 0016984c */ std::runtime_error::runtime_error(prVar3,"Expected comma in tuple"); goto LAB_001697b8; } /* try { // try from 0016965a to 00169667 has its CatchHandler @ 0016987b */ parseExpression(SUB81((allocator *)&local_68,0)); if (local_68 == 0) { prVar3 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016975b to 00169769 has its CatchHandler @ 0016985d */ std::runtime_error::runtime_error(prVar3,"Expected expression in tuple"); /* try { // try from 0016976a to 0016977f has its CatchHandler @ 0016985b */ /* WARNING: Subroutine does not return */ __cxa_throw(prVar3,PTR_typeinfo_00201fe8,PTR__runtime_error_00201f48); } /* try { // try from 00169674 to 00169680 has its CatchHandler @ 0016987d */ std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::emplace_back<std::shared_ptr<minja::Expression>> ((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)&local_58,(allocator *)&local_68); /* try { // try from 00169681 to 00169694 has its CatchHandler @ 0016987f */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_a8,")",&local_b9); /* try { // try from 00169695 to 001696a5 has its CatchHandler @ 00169884 */ consumeToken(local_88); lVar1 = local_80[0]; std::__cxx11::string::~string(local_88); std::__cxx11::string::~string((string *)&local_a8); if (lVar1 != 0) { /* try { // try from 001696cf to 001696db has its CatchHandler @ 00169810 */ get_location(); /* try { // try from 001696dc to 001696ef has its CatchHandler @ 001697fe */ std:: make_shared<minja::ArrayExpr,minja::Location,std::vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>>> ((Location *)&local_a8,(vector *)local_88); lVar1 = alStack_a0[0]; alStack_a0[0] = 0; *local_38 = local_a8; local_38[1] = lVar1; local_a8 = 0; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)alStack_a0); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)local_80); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_60); std:: vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> ::~vector((vector<std::shared_ptr<minja::Expression>,std::allocator<std::shared_ptr<minja::Expression>>> *)&local_58); in_RDI = local_38; goto LAB_00169731; } std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_60); } while( true ); } lStack_b0 = 0; *in_RDI = local_b8; in_RDI[1] = lVar1; local_b8 = 0; LAB_00169731: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)&lStack_b0); } return in_RDI; }
46,254
my_snprintf_8bit
eloqsql/strings/ctype-simple.c
size_t my_snprintf_8bit(CHARSET_INFO *cs __attribute__((unused)), char* to, size_t n __attribute__((unused)), const char* fmt, ...) { va_list args; size_t result; va_start(args,fmt); result= my_vsnprintf(to, n, fmt, args); va_end(args); return result; }
O0
c
my_snprintf_8bit: pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 testb %al, %al je 0xc26ee movaps %xmm0, -0xd0(%rbp) movaps %xmm1, -0xc0(%rbp) movaps %xmm2, -0xb0(%rbp) movaps %xmm3, -0xa0(%rbp) movaps %xmm4, -0x90(%rbp) movaps %xmm5, -0x80(%rbp) movaps %xmm6, -0x70(%rbp) movaps %xmm7, -0x60(%rbp) movq %r9, -0xd8(%rbp) movq %r8, -0xe0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) leaq -0x100(%rbp), %rax movq %rax, -0x30(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movl $0x30, -0x3c(%rbp) movl $0x20, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx leaq -0x40(%rbp), %rcx callq 0xf5910 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax addq $0x100, %rsp # imm = 0x100 popq %rbp retq nopw %cs:(%rax,%rax)
my_snprintf_8bit: push rbp mov rbp, rsp sub rsp, 100h test al, al jz short loc_C26EE movaps [rbp+var_D0], xmm0 movaps [rbp+var_C0], xmm1 movaps [rbp+var_B0], xmm2 movaps [rbp+var_A0], xmm3 movaps [rbp+var_90], xmm4 movaps [rbp+var_80], xmm5 movaps [rbp+var_70], xmm6 movaps [rbp+var_60], xmm7 loc_C26EE: mov [rbp+var_D8], r9 mov [rbp+var_E0], r8 mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx lea rax, [rbp+var_100] mov [rbp+var_30], rax lea rax, [rbp+arg_0] mov [rbp+var_38], rax mov [rbp+var_3C], 30h ; '0' mov [rbp+var_40], 20h ; ' ' mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] lea rcx, [rbp+var_40] call my_vsnprintf mov [rbp+var_48], rax mov rax, [rbp+var_48] add rsp, 100h pop rbp retn
long long my_snprintf_8bit( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, char a15) { char v16; // [rsp+0h] [rbp-100h] BYREF long long v17; // [rsp+20h] [rbp-E0h] long long v18; // [rsp+28h] [rbp-D8h] __m128 v19; // [rsp+30h] [rbp-D0h] __m128 v20; // [rsp+40h] [rbp-C0h] __m128 v21; // [rsp+50h] [rbp-B0h] __m128 v22; // [rsp+60h] [rbp-A0h] __m128 v23; // [rsp+70h] [rbp-90h] __m128 v24; // [rsp+80h] [rbp-80h] __m128 v25; // [rsp+90h] [rbp-70h] __m128 v26; // [rsp+A0h] [rbp-60h] _DWORD v27[2]; // [rsp+C0h] [rbp-40h] BYREF char *v28; // [rsp+C8h] [rbp-38h] char *v29; // [rsp+D0h] [rbp-30h] long long v30; // [rsp+E0h] [rbp-20h] long long v31; // [rsp+E8h] [rbp-18h] long long v32; // [rsp+F0h] [rbp-10h] long long v33; // [rsp+F8h] [rbp-8h] v19 = a7; v20 = a8; v21 = a9; v22 = a10; v23 = a11; v24 = a12; v25 = a13; v26 = a14; v18 = a6; v17 = a5; v33 = a1; v32 = a2; v31 = a3; v30 = a4; v29 = &v16; v28 = &a15; v27[1] = 48; v27[0] = 32; return my_vsnprintf(a2, a3, a4, v27); }
my_snprintf_8bit: PUSH RBP MOV RBP,RSP SUB RSP,0x100 TEST AL,AL JZ 0x001c26ee MOVAPS xmmword ptr [RBP + -0xd0],XMM0 MOVAPS xmmword ptr [RBP + -0xc0],XMM1 MOVAPS xmmword ptr [RBP + -0xb0],XMM2 MOVAPS xmmword ptr [RBP + -0xa0],XMM3 MOVAPS xmmword ptr [RBP + -0x90],XMM4 MOVAPS xmmword ptr [RBP + -0x80],XMM5 MOVAPS xmmword ptr [RBP + -0x70],XMM6 MOVAPS xmmword ptr [RBP + -0x60],XMM7 LAB_001c26ee: MOV qword ptr [RBP + -0xd8],R9 MOV qword ptr [RBP + -0xe0],R8 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[RBP + -0x100] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV dword ptr [RBP + -0x3c],0x30 MOV dword ptr [RBP + -0x40],0x20 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] LEA RCX,[RBP + -0x40] CALL 0x001f5910 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RSP,0x100 POP RBP RET
int8 my_snprintf_8bit(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; int8 uVar1; int1 local_108 [32]; int8 local_e8; int8 local_e0; int8 local_d8; int8 local_c8; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int4 local_48; int4 local_44; int1 *local_40; int1 *local_38; int8 local_28; int8 local_20; int8 local_18; int8 local_10; if (in_AL != '\0') { local_d8 = param_1; local_c8 = param_2; local_b8 = param_3; local_a8 = param_4; local_98 = param_5; local_88 = param_6; local_78 = param_7; local_68 = param_8; } local_38 = local_108; local_40 = &stack0x00000008; local_44 = 0x30; local_48 = 0x20; local_e8 = param_13; local_e0 = param_14; local_28 = param_12; local_20 = param_11; local_18 = param_10; local_10 = param_9; uVar1 = my_vsnprintf(param_10,param_11,param_12,&local_48); return uVar1; }
46,255
Write_rows_log_event_old::do_exec_row(rpl_group_info*)
eloqsql/sql/log_event_old.cc
int Write_rows_log_event_old::do_exec_row(rpl_group_info *rgi) { DBUG_ASSERT(m_table != NULL); int error= write_row(rgi, TRUE /* overwrite */); if (unlikely(error) && !thd->net.last_errno) thd->net.last_errno= error; return error; }
O0
cpp
Write_rows_log_event_old::do_exec_row(rpl_group_info*): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) jmp 0xd742ea movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x1, %edx callq 0xd733e0 movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) je 0xd74327 movq -0x20(%rbp), %rax movq 0x60(%rax), %rax cmpl $0x0, 0x358(%rax) jne 0xd74327 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movq 0x60(%rax), %rax movl %ecx, 0x358(%rax) movl -0x14(%rbp), %eax addq $0x20, %rsp popq %rbp retq
_ZN24Write_rows_log_event_old11do_exec_rowEP14rpl_group_info: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_20], rax jmp short $+2 loc_D742EA: mov rdi, [rbp+var_20]; this mov rsi, [rbp+var_10]; rpl_group_info * mov edx, 1; bool call _ZN18Old_rows_log_event9write_rowEP14rpl_group_infob; Old_rows_log_event::write_row(rpl_group_info *,bool) mov [rbp+var_14], eax cmp [rbp+var_14], 0 jz short loc_D74327 mov rax, [rbp+var_20] mov rax, [rax+60h] cmp dword ptr [rax+358h], 0 jnz short loc_D74327 mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov rax, [rax+60h] mov [rax+358h], ecx loc_D74327: mov eax, [rbp+var_14] add rsp, 20h pop rbp retn
long long Write_rows_log_event_old::do_exec_row(Write_rows_log_event_old *this, rpl_group_info *a2) { unsigned int v3; // [rsp+Ch] [rbp-14h] v3 = Old_rows_log_event::write_row(this, a2, 1); if ( v3 && !*(_DWORD *)(*((_QWORD *)this + 12) + 856LL) ) *(_DWORD *)(*((_QWORD *)this + 12) + 856LL) = v3; return v3; }
Item_func_le: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RDI MOV RSI,qword ptr [RBP + -0x10] CALL 0x00d73c60 MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x1b08100] ADD RCX,0x10 MOV qword ptr [RAX],RCX LEA RCX,[0x1b08100] ADD RCX,0x690 MOV qword ptr [RAX + 0xa8],RCX ADD RSP,0x20 POP RBP RET
/* Item_func_le::Item_func_le(Item_func_le const&) */ void __thiscall Item_func_le::Item_func_le(Item_func_le *this,Item_func_le *param_1) { Item_bool_rowready_func2::Item_bool_rowready_func2 ((Item_bool_rowready_func2 *)this,(Item_bool_rowready_func2 *)param_1); *(int ***)this = &PTR__Item_func_le_01b08110; *(int ***)(this + 0xa8) = &PTR__Item_func_le_01b08790; return; }
46,256
mthd_stmt_get_param_metadata
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_stmt_get_param_metadata(MYSQL_STMT *stmt) { MYSQL_DATA *result; if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0, 7 + ma_extended_type_info_rows(stmt->mysql)))) return(1); free_rows(result); return(0); }
O0
c
mthd_stmt_get_param_metadata: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4d0(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x38(%rax), %rdi callq 0x2a890 movq -0x28(%rbp), %rdi movl %eax, %edx movq -0x20(%rbp), %rax addl $0x7, %edx xorl %ecx, %ecx movl %ecx, %esi callq *%rax movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x2a86f movb $0x1, -0x1(%rbp) jmp 0x2a87c movq -0x18(%rbp), %rdi callq 0x16540 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
mthd_stmt_get_param_metadata: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4D0h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rax, [rax+38h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rdi, [rax+38h] call ma_extended_type_info_rows mov rdi, [rbp+var_28] mov edx, eax mov rax, [rbp+var_20] add edx, 7 xor ecx, ecx mov esi, ecx call rax mov [rbp+var_18], rax cmp rax, 0 jnz short loc_2A86F mov [rbp+var_1], 1 jmp short loc_2A87C loc_2A86F: mov rdi, [rbp+var_18] call free_rows mov [rbp+var_1], 0 loc_2A87C: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char mthd_stmt_get_param_metadata(long long a1) { int v1; // eax long long v3; // [rsp+8h] [rbp-28h] long long ( *v4)(long long, _QWORD, _QWORD); // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] v4 = *(long long ( **)(long long, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL); v3 = *(_QWORD *)(a1 + 56); v1 = ma_extended_type_info_rows(v3); v5 = v4(v3, 0LL, (unsigned int)(v1 + 7)); if ( !v5 ) return 1; free_rows(v5); return 0; }
mthd_stmt_get_param_metadata: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x38] CALL 0x0012a890 MOV RDI,qword ptr [RBP + -0x28] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] ADD EDX,0x7 XOR ECX,ECX MOV ESI,ECX CALL RAX MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0012a86f MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012a87c LAB_0012a86f: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00116540 MOV byte ptr [RBP + -0x1],0x0 LAB_0012a87c: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
bool mthd_stmt_get_param_metadata(long param_1) { code *pcVar1; int8 uVar2; int iVar3; long lVar4; bool local_9; pcVar1 = *(code **)(*(long *)(*(long *)(param_1 + 0x38) + 0x4d0) + 0x28); uVar2 = *(int8 *)(param_1 + 0x38); iVar3 = ma_extended_type_info_rows(*(int8 *)(param_1 + 0x38)); lVar4 = (*pcVar1)(uVar2,0,iVar3 + 7); if (lVar4 != 0) { free_rows(lVar4); } local_9 = lVar4 == 0; return local_9; }
46,257
mthd_stmt_get_param_metadata
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_stmt_get_param_metadata(MYSQL_STMT *stmt) { MYSQL_DATA *result; if (!(result= stmt->mysql->methods->db_read_rows(stmt->mysql, (MYSQL_FIELD *)0, 7 + ma_extended_type_info_rows(stmt->mysql)))) return(1); free_rows(result); return(0); }
O3
c
mthd_stmt_get_param_metadata: pushq %rbp movq %rsp, %rbp movq 0x38(%rdi), %rdi movq 0x4d0(%rdi), %rax movq 0x4f0(%rdi), %rcx xorl %edx, %edx btl $0x3, 0x70(%rcx) adcl $0x7, %edx xorl %esi, %esi callq *0x28(%rax) testq %rax, %rax je 0x20f11 movq %rax, %rdi callq 0x15942 xorl %eax, %eax jmp 0x20f13 movb $0x1, %al popq %rbp retq
mthd_stmt_get_param_metadata: push rbp mov rbp, rsp mov rdi, [rdi+38h] mov rax, [rdi+4D0h] mov rcx, [rdi+4F0h] xor edx, edx bt dword ptr [rcx+70h], 3 adc edx, 7 xor esi, esi call qword ptr [rax+28h] test rax, rax jz short loc_20F11 mov rdi, rax call free_rows xor eax, eax jmp short loc_20F13 loc_20F11: mov al, 1 loc_20F13: pop rbp retn
long long mthd_stmt_get_param_metadata(long long a1) { long long v1; // rax v1 = (*(long long ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1232LL) + 40LL))( *(_QWORD *)(a1 + 56), 0LL, (unsigned int)_bittest((const signed __int32 *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1264LL) + 112LL), 3u) + 7); if ( !v1 ) return 1LL; free_rows(v1); return 0LL; }
mthd_stmt_get_param_metadata: PUSH RBP MOV RBP,RSP MOV RDI,qword ptr [RDI + 0x38] MOV RAX,qword ptr [RDI + 0x4d0] MOV RCX,qword ptr [RDI + 0x4f0] XOR EDX,EDX BT dword ptr [RCX + 0x70],0x3 ADC EDX,0x7 XOR ESI,ESI CALL qword ptr [RAX + 0x28] TEST RAX,RAX JZ 0x00120f11 MOV RDI,RAX CALL 0x00115942 XOR EAX,EAX JMP 0x00120f13 LAB_00120f11: MOV AL,0x1 LAB_00120f13: POP RBP RET
bool mthd_stmt_get_param_metadata(long param_1) { long lVar1; lVar1 = *(long *)(param_1 + 0x38); lVar1 = (**(code **)(*(long *)(lVar1 + 0x4d0) + 0x28)) (lVar1,0,((*(uint *)(*(long *)(lVar1 + 0x4f0) + 0x70) >> 3 & 1) != 0) + '\a'); if (lVar1 != 0) { free_rows(lVar1); } return lVar1 == 0; }
46,258
bf_sqrt_sin
bluesky950520[P]quickjs/libbf.c
static void bf_sqrt_sin(bf_t *r, const bf_t *x, limb_t prec1) { bf_context_t *s = r->ctx; bf_t T_s, *T = &T_s; bf_init(s, T); bf_set(T, x); bf_mul(r, T, T, prec1, BF_RNDN); bf_mul_2exp(T, 1, BF_PREC_INF, BF_RNDZ); bf_add(T, T, r, prec1, BF_RNDN); bf_neg(T); bf_sqrt(r, T, prec1, BF_RNDF); bf_delete(T); }
O2
c
bf_sqrt_sin: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdx, %r14 movq %rdi, %r15 movq (%rdi), %rax leaq 0x8(%rsp), %rbx movq %rax, (%rbx) andl $0x0, 0x8(%rbx) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rbx) movq %rbx, %rdi callq 0x6f666 movq %r15, %rdi movq %rbx, %rsi movq %rbx, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x70da9 pushq $0x1 popq %rsi movabsq $0x3fffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFFF pushq $0x1 popq %rcx movq %rbx, %rdi callq 0x70fe2 movq %rbx, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r14, %rcx xorl %r8d, %r8d callq 0x71c49 xorb $0x1, 0x8(%rbx) pushq $0x6 popq %rcx movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx callq 0x71a35 movq %rbx, %rdi callq 0x7145e addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq
bf_sqrt_sin: push r15 push r14 push rbx sub rsp, 30h mov r14, rdx mov r15, rdi mov rax, [rdi] lea rbx, [rsp+48h+var_40] mov [rbx], rax and dword ptr [rbx+8], 0 mov rax, 8000000000000000h mov [rbx+10h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+18h], xmm0 mov rdi, rbx call bf_set mov rdi, r15 mov rsi, rbx mov rdx, rbx mov rcx, r14 xor r8d, r8d call bf_mul push 1 pop rsi mov rdx, 3FFFFFFFFFFFFFFFh push 1 pop rcx mov rdi, rbx call bf_mul_2exp mov rdi, rbx mov rsi, rbx mov rdx, r15 mov rcx, r14 xor r8d, r8d call bf_add xor byte ptr [rbx+8], 1 push 6 pop rcx mov rdi, r15 mov rsi, rbx mov rdx, r14 call bf_sqrt mov rdi, rbx call bf_delete_0 add rsp, 30h pop rbx pop r14 pop r15 retn
long long bf_sqrt_sin(long long *a1, long long a2, long long a3) { long long v5; // [rsp+8h] [rbp-40h] BYREF int v6; // [rsp+10h] [rbp-38h] unsigned long long v7; // [rsp+18h] [rbp-30h] __int128 v8; // [rsp+20h] [rbp-28h] v5 = *a1; v6 = 0; v7 = 0x8000000000000000LL; v8 = 0LL; bf_set((long long)&v5, a2); bf_mul(a1, &v5, &v5, a3, 0); bf_mul_2exp((long long)&v5, 1LL, 0x3FFFFFFFFFFFFFFFLL, 1u); bf_add((long long)&v5, (long long)&v5, (long long)a1, a3, 0LL); LOBYTE(v6) = v6 ^ 1; bf_sqrt((long long)a1, (long long)&v5, a3, 6u); return bf_delete_0(&v5); }
bf_sqrt_sin: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDX MOV R15,RDI MOV RAX,qword ptr [RDI] LEA RBX,[RSP + 0x8] MOV qword ptr [RBX],RAX AND dword ptr [RBX + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [RBX + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x18],XMM0 MOV RDI,RBX CALL 0x0016f666 MOV RDI,R15 MOV RSI,RBX MOV RDX,RBX MOV RCX,R14 XOR R8D,R8D CALL 0x00170da9 PUSH 0x1 POP RSI MOV RDX,0x3fffffffffffffff PUSH 0x1 POP RCX MOV RDI,RBX CALL 0x00170fe2 MOV RDI,RBX MOV RSI,RBX MOV RDX,R15 MOV RCX,R14 XOR R8D,R8D CALL 0x00171c49 XOR byte ptr [RBX + 0x8],0x1 PUSH 0x6 POP RCX MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 CALL 0x00171a35 MOV RDI,RBX CALL 0x0017145e ADD RSP,0x30 POP RBX POP R14 POP R15 RET
void bf_sqrt_sin(int8 *param_1,int8 param_2,int8 param_3) { int8 local_40; uint local_38; int8 local_30; int8 local_28; int8 uStack_20; local_40 = *param_1; local_38 = 0; local_30 = 0x8000000000000000; local_28 = 0; uStack_20 = 0; bf_set(&local_40); bf_mul(param_1,&local_40,&local_40,param_3,0); bf_mul_2exp(&local_40,1,0x3fffffffffffffff,1); bf_add(&local_40,&local_40,param_1,param_3,0); local_38 = local_38 ^ 1; bf_sqrt(param_1,&local_40,param_3,6); bf_delete(&local_40); return; }
46,259
bf_sqrt_sin
bluesky950520[P]quickjs/libbf.c
static void bf_sqrt_sin(bf_t *r, const bf_t *x, limb_t prec1) { bf_context_t *s = r->ctx; bf_t T_s, *T = &T_s; bf_init(s, T); bf_set(T, x); bf_mul(r, T, T, prec1, BF_RNDN); bf_mul_2exp(T, 1, BF_PREC_INF, BF_RNDZ); bf_add(T, T, r, prec1, BF_RNDN); bf_neg(T); bf_sqrt(r, T, prec1, BF_RNDF); bf_delete(T); }
O3
c
bf_sqrt_sin: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdx, %rbx movq %rdi, %r14 movq (%rdi), %rax leaq 0x8(%rsp), %r15 movq %rax, (%r15) movl $0x0, 0x8(%r15) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) movq %r15, %rdi callq 0x876d6 movq %r14, %rdi movq %r15, %rsi movq %r15, %rdx movq %rbx, %rcx xorl %r8d, %r8d callq 0x89178 movq 0x18(%r15), %rcx testq %rcx, %rcx je 0x954a1 leaq 0x8(%rsp), %rdi incq 0x10(%rdi) movabsq $0x3fffffffffffffff, %rsi # imm = 0x3FFFFFFFFFFFFFFF movl $0x1, %edx xorl %r8d, %r8d callq 0x8787f leaq -0xadd5(%rip), %r9 # 0x8a6d3 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r15, %rsi movq %r14, %rdx movq %rbx, %rcx xorl %r8d, %r8d callq 0x8a639 xorb $0x1, 0x8(%r15) movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movl $0x6, %ecx callq 0x8a2f4 movq (%r15), %rax testq %rax, %rax je 0x954f3 movq 0x28(%rsp), %rsi testq %rsi, %rsi je 0x954f3 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq
bf_sqrt_sin: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdx mov r14, rdi mov rax, [rdi] lea r15, [rsp+48h+var_40] mov [r15], rax mov dword ptr [r15+8], 0 mov rax, 8000000000000000h mov [r15+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 mov rdi, r15 call bf_set mov rdi, r14 mov rsi, r15 mov rdx, r15 mov rcx, rbx xor r8d, r8d call bf_mul mov rcx, [r15+18h] test rcx, rcx jz short loc_954A1 lea rdi, [rsp+48h+var_40] inc qword ptr [rdi+10h] mov rsi, 3FFFFFFFFFFFFFFFh mov edx, 1 xor r8d, r8d call __bf_round loc_954A1: lea r9, __bf_add lea r15, [rsp+48h+var_40] mov rdi, r15 mov rsi, r15 mov rdx, r14 mov rcx, rbx xor r8d, r8d call bf_op2 xor byte ptr [r15+8], 1 mov rdi, r14 mov rsi, r15 mov rdx, rbx mov ecx, 6 call bf_sqrt mov rax, [r15] test rax, rax jz short loc_954F3 mov rsi, [rsp+48h+var_20] test rsi, rsi jz short loc_954F3 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_954F3: add rsp, 30h pop rbx pop r14 pop r15 retn
long long bf_sqrt_sin(__int128 *a1, long long a2, long long a3) { long long result; // rax __int128 v5; // [rsp+8h] [rbp-40h] BYREF unsigned long long v6; // [rsp+18h] [rbp-30h] __int128 v7; // [rsp+20h] [rbp-28h] *(_QWORD *)&v5 = *(_QWORD *)a1; DWORD2(v5) = 0; v6 = 0x8000000000000000LL; v7 = 0LL; bf_set(&v5, a2); bf_mul(a1, (long long)&v5, (long long)&v5, a3, 0); if ( (_QWORD)v7 ) { ++v6; _bf_round((_QWORD **)&v5, 0x3FFFFFFFFFFFFFFFLL, 1u, v7, 0); } bf_op2(&v5, &v5, a1, a3, 0LL, (long long ( *)(__int128 *))_bf_add); BYTE8(v5) ^= 1u; bf_sqrt((_QWORD **)a1, (long long)&v5, a3, 6u); result = v5; if ( (_QWORD)v5 ) { if ( *((_QWORD *)&v7 + 1) ) return (*(long long ( **)(_QWORD, _QWORD, _QWORD))(v5 + 8))(*(_QWORD *)v5, *((_QWORD *)&v7 + 1), 0LL); } return result; }
bf_sqrt_sin: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDX MOV R14,RDI MOV RAX,qword ptr [RDI] LEA R15,[RSP + 0x8] MOV qword ptr [R15],RAX MOV dword ptr [R15 + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R15 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 MOV RDI,R15 CALL 0x001876d6 MOV RDI,R14 MOV RSI,R15 MOV RDX,R15 MOV RCX,RBX XOR R8D,R8D CALL 0x00189178 MOV RCX,qword ptr [R15 + 0x18] TEST RCX,RCX JZ 0x001954a1 LEA RDI,[RSP + 0x8] INC qword ptr [RDI + 0x10] MOV RSI,0x3fffffffffffffff MOV EDX,0x1 XOR R8D,R8D CALL 0x0018787f LAB_001954a1: LEA R9,[0x18a6d3] LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,R15 MOV RDX,R14 MOV RCX,RBX XOR R8D,R8D CALL 0x0018a639 XOR byte ptr [R15 + 0x8],0x1 MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX MOV ECX,0x6 CALL 0x0018a2f4 MOV RAX,qword ptr [R15] TEST RAX,RAX JZ 0x001954f3 MOV RSI,qword ptr [RSP + 0x28] TEST RSI,RSI JZ 0x001954f3 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_001954f3: ADD RSP,0x30 POP RBX POP R14 POP R15 RET
void bf_sqrt_sin(int8 *param_1,int8 param_2,int8 param_3) { int8 *local_40; uint local_38; long local_30; long local_28; long lStack_20; local_40 = (int8 *)*param_1; local_38 = 0; local_30 = -0x8000000000000000; local_28 = 0; lStack_20 = 0; bf_set(&local_40); bf_mul(param_1,&local_40,&local_40,param_3,0); if (local_28 != 0) { local_30 = local_30 + 1; __bf_round(&local_40,0x3fffffffffffffff,1,local_28,0); } bf_op2(&local_40,&local_40,param_1,param_3,0,__bf_add); local_38 = local_38 ^ 1; bf_sqrt(param_1,&local_40,param_3,6); if ((local_40 != (int8 *)0x0) && (lStack_20 != 0)) { (*(code *)local_40[1])(*local_40,lStack_20,0); } return; }
46,260
my_hash_sort_bin
eloqsql/strings/ctype-bin.c
void my_hash_sort_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len,ulong *nr1, ulong *nr2) { const uchar *end = key + len; ulong tmp1= *nr1; ulong tmp2= *nr2; for (; key < end ; key++) { MY_HASH_ADD(tmp1, tmp2, (uint) *key); } *nr1= tmp1; *nr2= tmp2; }
O3
c
my_hash_sort_bin: movq (%rcx), %rax movq (%r8), %rdi testq %rdx, %rdx jle 0x4a2f3 pushq %rbp movq %rsp, %rbp addq %rsi, %rdx movl %eax, %r9d andl $0x3f, %r9d addq %rdi, %r9 movzbl (%rsi), %r10d imulq %r9, %r10 movq %rax, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r9, %rax addq $0x3, %rdi incq %rsi cmpq %rdx, %rsi jb 0x4a2c7 popq %rbp movq %rax, (%rcx) movq %rdi, (%r8) retq
my_hash_sort_bin: mov rax, [rcx] mov rdi, [r8] test rdx, rdx jle short loc_4A2F3 push rbp mov rbp, rsp add rdx, rsi loc_4A2C7: mov r9d, eax and r9d, 3Fh add r9, rdi movzx r10d, byte ptr [rsi] imul r10, r9 mov r9, rax shl r9, 8 add r9, r10 xor rax, r9 add rdi, 3 inc rsi cmp rsi, rdx jb short loc_4A2C7 pop rbp loc_4A2F3: mov [rcx], rax mov [r8], rdi retn
long long my_hash_sort_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long result; // rax long long v6; // rdi unsigned __int8 *v7; // rdx result = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = &a2[a3]; do { result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8); v6 += 3LL; ++a2; } while ( a2 < v7 ); } *a4 = result; *a5 = v6; return result; }
my_hash_sort_bin: MOV RAX,qword ptr [RCX] MOV RDI,qword ptr [R8] TEST RDX,RDX JLE 0x0014a2f3 PUSH RBP MOV RBP,RSP ADD RDX,RSI LAB_0014a2c7: MOV R9D,EAX AND R9D,0x3f ADD R9,RDI MOVZX R10D,byte ptr [RSI] IMUL R10,R9 MOV R9,RAX SHL R9,0x8 ADD R9,R10 XOR RAX,R9 ADD RDI,0x3 INC RSI CMP RSI,RDX JC 0x0014a2c7 POP RBP LAB_0014a2f3: MOV qword ptr [RCX],RAX MOV qword ptr [R8],RDI RET
void my_hash_sort_bin(int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { ulong uVar1; byte *pbVar2; long lVar3; uVar1 = *param_4; lVar3 = *param_5; if (0 < param_3) { pbVar2 = param_2 + param_3; do { uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3); lVar3 = lVar3 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar1; *param_5 = lVar3; return; }
46,261
coro::io_scheduler::shutdown()
AlayaLite/build_O3/_deps/libcoro-src/src/io_scheduler.cpp
auto io_scheduler::shutdown() noexcept -> void { // Only allow shutdown to occur once. if (m_shutdown_requested.exchange(true, std::memory_order::acq_rel) == false) { if (m_thread_pool != nullptr) { m_thread_pool->shutdown(); } // Signal the event loop to stop asap, triggering the event fd is safe. uint64_t value{1}; auto written = ::write(m_shutdown_fd, &value, sizeof(value)); (void)written; if (m_io_thread.joinable()) { m_io_thread.join(); } } }
O3
cpp
coro::io_scheduler::shutdown(): pushq %rbx subq $0x10, %rsp movb $0x1, %al xchgb %al, 0x130(%rdi) testb $0x1, %al jne 0x6a1e movq %rdi, %rbx movq 0xd0(%rdi), %rdi testq %rdi, %rdi je 0x69e9 callq 0x58ba leaq 0x8(%rsp), %rsi movq $0x1, (%rsi) movl 0xac(%rbx), %edi movl $0x8, %edx callq 0x30e0 cmpq $0x0, 0xc8(%rbx) je 0x6a1e addq $0xc8, %rbx movq %rbx, %rdi callq 0x3400 addq $0x10, %rsp popq %rbx retq movq %rax, %rdi callq 0x45a6
_ZN4coro12io_scheduler8shutdownEv: push rbx sub rsp, 10h mov al, 1 xchg al, [rdi+130h] test al, 1 jnz short loc_6A1E mov rbx, rdi mov rdi, [rdi+0D0h]; this test rdi, rdi jz short loc_69E9 call _ZN4coro11thread_pool8shutdownEv; coro::thread_pool::shutdown(void) loc_69E9: lea rsi, [rsp+18h+var_10] mov qword ptr [rsi], 1 mov edi, [rbx+0ACh] mov edx, 8 call _write cmp qword ptr [rbx+0C8h], 0 jz short loc_6A1E add rbx, 0C8h mov rdi, rbx; this call __ZNSt6thread4joinEv; std::thread::join(void) loc_6A1E: add rsp, 10h pop rbx retn mov rdi, rax call __clang_call_terminate
char coro::io_scheduler::shutdown(coro::io_scheduler *this) { char result; // al coro::thread_pool *v3; // rdi long long v4; // [rsp+8h] [rbp-10h] BYREF result = *((_BYTE *)this + 304); *((_BYTE *)this + 304) = 1; if ( (result & 1) == 0 ) { v3 = (coro::thread_pool *)*((_QWORD *)this + 26); if ( v3 ) coro::thread_pool::shutdown(v3); v4 = 1LL; result = write(*((unsigned int *)this + 43), &v4, 8LL); if ( *((_QWORD *)this + 25) ) return std::thread::join((coro::io_scheduler *)((char *)this + 200)); } return result; }
shutdown: PUSH RBX SUB RSP,0x10 MOV AL,0x1 XCHG byte ptr [RDI + 0x130],AL TEST AL,0x1 JNZ 0x00106a1e MOV RBX,RDI MOV RDI,qword ptr [RDI + 0xd0] TEST RDI,RDI JZ 0x001069e9 CALL 0x001058ba LAB_001069e9: LEA RSI,[RSP + 0x8] MOV qword ptr [RSI],0x1 MOV EDI,dword ptr [RBX + 0xac] LAB_001069fb: MOV EDX,0x8 CALL 0x001030e0 CMP qword ptr [RBX + 0xc8],0x0 JZ 0x00106a1e ADD RBX,0xc8 MOV RDI,RBX CALL 0x00103400 LAB_00106a1e: ADD RSP,0x10 POP RBX RET
/* coro::io_scheduler::shutdown() */ void __thiscall coro::io_scheduler::shutdown(io_scheduler *this) { io_scheduler iVar1; int8 local_10; LOCK(); iVar1 = this[0x130]; this[0x130] = (io_scheduler)0x1; UNLOCK(); if (((byte)iVar1 & 1) == 0) { if (*(thread_pool **)(this + 0xd0) != (thread_pool *)0x0) { thread_pool::shutdown(*(thread_pool **)(this + 0xd0)); } local_10 = 1; /* try { // try from 001069fb to 00106a1d has its CatchHandler @ 00106a24 */ write(*(int *)(this + 0xac),&local_10,8); if (*(long *)(this + 200) != 0) { std::thread::join(); } } return; }
46,262
mysql_list_tables_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_list_tables_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_list_tables, (parms->mysql, parms->wild), parms->mysql, MYSQL_RES *, r_ptr) }
O3
c
mysql_list_tables_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movq 0x8(%rdi), %rsi movq 0x480(%rax), %rcx movq 0x28(%rcx), %rbx movq %rax, %rdi callq 0x1c1de movq %rax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_list_tables_start_internal: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov rsi, [rdi+8] mov rcx, [rax+480h] mov rbx, [rcx+28h] mov rdi, rax call mysql_list_tables mov [rbx+8], rax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_list_tables_start_internal(long long a1) { long long v1; // rbx long long result; // rax v1 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); result = mysql_list_tables(*(_QWORD *)a1, *(const char **)(a1 + 8)); *(_QWORD *)(v1 + 8) = result; *(_DWORD *)v1 = 0; return result; }
mysql_list_tables_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RCX + 0x28] MOV RDI,RAX CALL 0x0011c1de MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_list_tables_start_internal(long *param_1) { int4 *puVar1; int8 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_list_tables(*param_1,param_1[1]); *(int8 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
46,263
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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, bool)
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movl $0x1, %esi callq 0x5c5ee movq %rbx, %rdi movl $0x1, %esi callq 0x5c5ee movq (%r12), %r15 movq 0x8(%r12), %r12 movq %rsp, %rdi movq %r13, %rsi callq 0x5bf90 addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x20(%rsp), %rdi movq %rsp, %rcx movq %r15, %rsi movq %r12, %rdx callq 0x5bee4 leaq 0x20(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x5bfee leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x5caae movq -0x18(%r14), %rax testq %rax, %rax je 0xa8a11 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0xa8a28 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xa8a6c jmp 0xa8a6c movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x5c5c0 jmp 0xa8a53 movq %rax, %r14 movq 0x10(%rsp), %rax testq %rax, %rax je 0xa8a77 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xa8a77 movq %rax, %rdi callq 0x2445b movq %rax, %r14 movq %rbx, %rdi xorl %esi, %esi callq 0x5c5ee movq %rbx, %rdi callq 0x61a6a movq %r14, %rdi callq 0x1c250 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14d, ecx mov r13, rdx mov r12, rsi mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov r15, [r12] mov r12, [r12+8] mov rdi, rsp mov rsi, r13 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F8] mov rcx, rsp mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>,bool,bool) lea rdi, [rsp+118h+var_F8]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&) lea r14, [rsp+118h+var_D0] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_A8A11 lea rdi, [rsp+118h+var_F8] mov rsi, rdi mov edx, 3 call rax loc_A8A11: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_A8A28 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_A8A28: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_A8A6C jmp short loc_A8A6C mov r14, rax lea rdi, [rsp+118h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_A8A53 mov r14, rax loc_A8A53: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_A8A77 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_A8A77 loc_A8A6C: mov rdi, rax call __clang_call_terminate mov r14, rax loc_A8A77: mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v8; // r15 long long v9; // r12 __int128 v11; // [rsp+0h] [rbp-118h] BYREF void ( *v12)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-108h] int v13[4]; // [rsp+20h] [rbp-F8h] BYREF void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h] _QWORD v15[26]; // [rsp+48h] [rbp-D0h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); v8 = *a2; v9 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function( &v11, a3); 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v13, v8, v8 + v9, &v11, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v13, 1, (_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(v15); if ( v14 ) v14(v13, v13, 3LL); if ( v12 ) v12(&v11, &v11, 3LL); return a1; }
parse<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14D,ECX MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV ESI,0x1 CALL 0x0015c5ee MOV RDI,RBX MOV ESI,0x1 CALL 0x0015c5ee MOV R15,qword ptr [R12] MOV R12,qword ptr [R12 + 0x8] LAB_001a89b1: MOV RDI,RSP MOV RSI,R13 CALL 0x0015bf90 ADD R12,R15 LAB_001a89bf: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x20] MOV RCX,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x0015bee4 LAB_001a89da: LEA RDI,[RSP + 0x20] MOV ESI,0x1 MOV RDX,RBX CALL 0x0015bfee LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x0015caae MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001a8a11 LAB_001a8a02: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001a8a11: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001a8a28 LAB_001a8a1b: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001a8a28: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP 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>::parse<std::__cxx11::string >(std::__cxx11::string&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, 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>&)>, bool, bool) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)> afStack_118 [16]; code *local_108; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f8 [16]; code *local_e8; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_d0 [160]; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; *(int8 *)(this + 8) = 0; assert_invariant(SUB81(this,0)); assert_invariant(SUB81(this,0)); lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 001a89b1 to 001a89bb has its CatchHandler @ 001a8a74 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)> ::function(afStack_118,param_3); /* try { // try from 001a89bf to 001a89d9 has its CatchHandler @ 001a8a50 */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5); /* try { // try from 001a89da to 001a89eb has its CatchHandler @ 001a8a41 */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f8,true,(basic_json *)this); detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~lexer(local_d0); if (local_e8 != (code *)0x0) { /* try { // try from 001a8a02 to 001a8a10 has its CatchHandler @ 001a8a3f */ (*local_e8)(local_f8,local_f8,3); } if (local_108 != (code *)0x0) { /* try { // try from 001a8a1b to 001a8a27 has its CatchHandler @ 001a8a3d */ (*local_108)(afStack_118,afStack_118,3); } return this; }
46,264
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan()
hkr04[P]cpp-mcp/common/json.hpp
token_type scan() { // initially, skip the BOM if (position.chars_read_total == 0 && !skip_bom()) { error_message = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return token_type::parse_error; } // read next character and ignore whitespace skip_whitespace(); // ignore comments while (ignore_comments && current == '/') { if (!scan_comment()) { return token_type::parse_error; } // skip following whitespace skip_whitespace(); } switch (current) { // structural characters case '[': return token_type::begin_array; case ']': return token_type::end_array; case '{': return token_type::begin_object; case '}': return token_type::end_object; case ':': return token_type::name_separator; case ',': return token_type::value_separator; // literals case 't': { std::array<char_type, 4> true_literal = {{static_cast<char_type>('t'), static_cast<char_type>('r'), static_cast<char_type>('u'), static_cast<char_type>('e')}}; return scan_literal(true_literal.data(), true_literal.size(), token_type::literal_true); } case 'f': { std::array<char_type, 5> false_literal = {{static_cast<char_type>('f'), static_cast<char_type>('a'), static_cast<char_type>('l'), static_cast<char_type>('s'), static_cast<char_type>('e')}}; return scan_literal(false_literal.data(), false_literal.size(), token_type::literal_false); } case 'n': { std::array<char_type, 4> null_literal = {{static_cast<char_type>('n'), static_cast<char_type>('u'), static_cast<char_type>('l'), static_cast<char_type>('l')}}; return scan_literal(null_literal.data(), null_literal.size(), token_type::literal_null); } // string case '\"': return scan_string(); // number case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return scan_number(); // end of input (the null byte is needed when parsing from // string literals) case '\0': case char_traits<char_type>::eof(): return token_type::end_of_input; // error default: error_message = "invalid literal"; return token_type::parse_error; } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::scan(): pushq %rbp pushq %rbx subq $0x18, %rsp movq %rdi, %rbx cmpq $0x0, 0x20(%rdi) jne 0x3bfce movq %rbx, %rdi callq 0x3c0ee testb %al, %al je 0x3c023 movq %rbx, %rdi callq 0x3c130 pushq $0xe popq %rbp movl 0x14(%rbx), %eax cmpb $0x1, 0x10(%rbx) jne 0x3bffd cmpl $0x2f, %eax jne 0x3bffd movq %rbx, %rdi callq 0x3c160 testb %al, %al je 0x3c031 movq %rbx, %rdi callq 0x3c130 jmp 0x3bfd9 leal -0x22(%rax), %ecx cmpl $0x18, %ecx ja 0x3c03a leaq 0xef3c(%rip), %rax # 0x4af48 movslq (%rax,%rcx,4), %rcx addq %rax, %rcx jmpq *%rcx movq %rbx, %rdi addq $0x18, %rsp popq %rbx popq %rbp jmp 0x3c634 leaq 0x10fc1(%rip), %rax # 0x4cfeb movq %rax, 0x70(%rbx) pushq $0xe popq %rbp movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %rbp retq leal 0x1(%rax), %ecx cmpl $0x2, %ecx jb 0x3c06d cmpl $0x5b, %eax je 0x3c0bc cmpl $0x7d, %eax je 0x3c0e7 cmpl $0x66, %eax je 0x3c0c3 cmpl $0x6e, %eax je 0x3c094 cmpl $0x74, %eax je 0x3c0aa cmpl $0x7b, %eax je 0x3c0a6 cmpl $0x5d, %eax jne 0x3c071 pushq $0xa jmp 0x3c030 pushq $0xf jmp 0x3c030 leaq 0x10fa0(%rip), %rax # 0x4d018 movq %rax, 0x70(%rbx) jmp 0x3c031 pushq $0xc jmp 0x3c030 pushq $0xd jmp 0x3c030 movq %rbx, %rdi addq $0x18, %rsp popq %rbx popq %rbp jmp 0x3c228 leaq 0x8(%rsp), %rsi movl $0x6c6c756e, (%rsi) # imm = 0x6C6C756E pushq $0x4 popq %rdx pushq $0x3 jmp 0x3c0d7 pushq $0x9 jmp 0x3c030 leaq 0xc(%rsp), %rsi movl $0x65757274, (%rsi) # imm = 0x65757274 pushq $0x4 popq %rdx pushq $0x1 jmp 0x3c0d7 pushq $0x8 jmp 0x3c030 leaq 0x10(%rsp), %rsi movb $0x65, 0x4(%rsi) movl $0x736c6166, (%rsi) # imm = 0x736C6166 pushq $0x5 popq %rdx pushq $0x2 popq %rcx movq %rbx, %rdi callq 0x3c1dc movl %eax, %ebp jmp 0x3c031 pushq $0xb jmp 0x3c030
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE4scanEv: push rbp push rbx sub rsp, 18h mov rbx, rdi cmp qword ptr [rdi+20h], 0 jnz short loc_3BFCE mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE8skip_bomEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(void) test al, al jz short loc_3C023 loc_3BFCE: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE15skip_whitespaceEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_whitespace(void) push 0Eh pop rbp loc_3BFD9: mov eax, [rbx+14h] cmp byte ptr [rbx+10h], 1 jnz short loc_3BFFD cmp eax, 2Fh ; '/' jnz short loc_3BFFD mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_commentEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(void) test al, al jz short loc_3C031 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE15skip_whitespaceEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_whitespace(void) jmp short loc_3BFD9 loc_3BFFD: lea ecx, [rax-22h]; switch 25 cases cmp ecx, 18h ja short def_3C013; jumptable 000000000003C013 default case lea rax, jpt_3C013 movsxd rcx, ds:(jpt_3C013 - 4AF48h)[rax+rcx*4] add rcx, rax jmp rcx; switch jump loc_3C015: mov rdi, rbx; jumptable 000000000003C013 cases 45,48-57 add rsp, 18h pop rbx pop rbp jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_numberEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(void) loc_3C023: lea rax, aInvalidBomMust; "invalid BOM; must be 0xEF 0xBB 0xBF if "... mov [rbx+70h], rax push 0Eh loc_3C030: pop rbp loc_3C031: mov eax, ebp add rsp, 18h pop rbx pop rbp retn def_3C013: lea ecx, [rax+1]; jumptable 000000000003C013 default case cmp ecx, 2 jb short loc_3C06D cmp eax, 5Bh ; '[' jz short loc_3C0BC cmp eax, 7Dh ; '}' jz loc_3C0E7 cmp eax, 66h ; 'f' jz short loc_3C0C3 cmp eax, 6Eh ; 'n' jz short loc_3C094 cmp eax, 74h ; 't' jz short loc_3C0AA cmp eax, 7Bh ; '{' jz short loc_3C0A6 cmp eax, 5Dh ; ']' jnz short loc_3C071; jumptable 000000000003C013 cases 35-43,46,47 push 0Ah jmp short loc_3C030 loc_3C06D: push 0Fh jmp short loc_3C030 loc_3C071: lea rax, aInvalidLiteral; jumptable 000000000003C013 cases 35-43,46,47 mov [rbx+70h], rax jmp short loc_3C031 loc_3C07E: push 0Ch; jumptable 000000000003C013 case 58 jmp short loc_3C030 loc_3C082: push 0Dh; jumptable 000000000003C013 case 44 jmp short loc_3C030 loc_3C086: mov rdi, rbx; jumptable 000000000003C013 case 34 add rsp, 18h pop rbx pop rbp jmp _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE11scan_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(void) loc_3C094: lea rsi, [rsp+28h+var_20] mov dword ptr [rsi], 6C6C756Eh push 4 pop rdx push 3 jmp short loc_3C0D7 loc_3C0A6: push 9 jmp short loc_3C030 loc_3C0AA: lea rsi, [rsp+28h+var_1C] mov dword ptr [rsi], 65757274h push 4 pop rdx push 1 jmp short loc_3C0D7 loc_3C0BC: push 8 jmp loc_3C030 loc_3C0C3: lea rsi, [rsp+28h+var_18] mov byte ptr [rsi+4], 65h ; 'e' mov dword ptr [rsi], 736C6166h push 5 pop rdx push 2 loc_3C0D7: pop rcx mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE12scan_literalESK_mNS1_10lexer_baseISF_E10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal(char const*,ulong,nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov ebp, eax jmp loc_3C031 loc_3C0E7: push 0Bh jmp loc_3C030
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan( long long a1) { unsigned int v1; // ebp int v2; // eax int v6; // [rsp+8h] [rbp-20h] BYREF int v7; // [rsp+Ch] [rbp-1Ch] BYREF _BYTE v8[24]; // [rsp+10h] [rbp-18h] BYREF if ( !*(_QWORD *)(a1 + 32) && !(unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_bom(a1) ) { *(_QWORD *)(a1 + 112) = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return 14; } nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_whitespace(a1); v1 = 14; while ( 1 ) { v2 = *(_DWORD *)(a1 + 20); if ( *(_BYTE *)(a1 + 16) != 1 || v2 != 47 ) break; if ( !(unsigned __int8)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_comment(a1) ) return v1; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::skip_whitespace(a1); } switch ( v2 ) { case '"': return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_string(a1); case '#': case '$': case '%': case '&': case '\'': case '(': case ')': case '*': case '+': case '.': case '/': goto LABEL_23; case ',': return 13; case '-': case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': return nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_number(a1); case ':': return 12; default: if ( (unsigned int)(v2 + 1) < 2 ) return 15; switch ( v2 ) { case '[': return 8; case '}': return 11; case 'f': qmemcpy(v8, "false", 5); return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal( a1, v8, 5LL, 2LL); case 'n': v6 = 1819047278; return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal( a1, &v6, 4LL, 3LL); case 't': v7 = 1702195828; return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::scan_literal( a1, &v7, 4LL, 1LL); case '{': return 9; case ']': return 10; } LABEL_23: *(_QWORD *)(a1 + 112) = "invalid literal"; return v1; } }
scan: PUSH RBP PUSH RBX SUB RSP,0x18 MOV RBX,RDI CMP qword ptr [RDI + 0x20],0x0 JNZ 0x0013bfce MOV RDI,RBX CALL 0x0013c0ee TEST AL,AL JZ 0x0013c023 LAB_0013bfce: MOV RDI,RBX CALL 0x0013c130 PUSH 0xe POP RBP LAB_0013bfd9: MOV EAX,dword ptr [RBX + 0x14] CMP byte ptr [RBX + 0x10],0x1 JNZ 0x0013bffd CMP EAX,0x2f JNZ 0x0013bffd MOV RDI,RBX CALL 0x0013c160 TEST AL,AL JZ 0x0013c031 MOV RDI,RBX CALL 0x0013c130 JMP 0x0013bfd9 LAB_0013bffd: LEA ECX,[RAX + -0x22] CMP ECX,0x18 JA 0x0013c03a LEA RAX,[0x14af48] MOVSXD RCX,dword ptr [RAX + RCX*0x4] ADD RCX,RAX switchD: JMP RCX caseD_2d: MOV RDI,RBX ADD RSP,0x18 POP RBX POP RBP JMP 0x0013c634 LAB_0013c023: LEA RAX,[0x14cfeb] MOV qword ptr [RBX + 0x70],RAX PUSH 0xe LAB_0013c030: POP RBP LAB_0013c031: MOV EAX,EBP ADD RSP,0x18 POP RBX POP RBP RET default: LEA ECX,[RAX + 0x1] CMP ECX,0x2 JC 0x0013c06d CMP EAX,0x5b JZ 0x0013c0bc CMP EAX,0x7d JZ 0x0013c0e7 CMP EAX,0x66 JZ 0x0013c0c3 CMP EAX,0x6e JZ 0x0013c094 CMP EAX,0x74 JZ 0x0013c0aa CMP EAX,0x7b JZ 0x0013c0a6 CMP EAX,0x5d JNZ 0x0013c071 PUSH 0xa JMP 0x0013c030 LAB_0013c06d: PUSH 0xf JMP 0x0013c030 caseD_23: LEA RAX,[0x14d018] MOV qword ptr [RBX + 0x70],RAX JMP 0x0013c031 caseD_3a: PUSH 0xc JMP 0x0013c030 caseD_2c: PUSH 0xd JMP 0x0013c030 caseD_22: MOV RDI,RBX ADD RSP,0x18 POP RBX POP RBP JMP 0x0013c228 LAB_0013c094: LEA RSI,[RSP + 0x8] MOV dword ptr [RSI],0x6c6c756e PUSH 0x4 POP RDX PUSH 0x3 JMP 0x0013c0d7 LAB_0013c0a6: PUSH 0x9 JMP 0x0013c030 LAB_0013c0aa: LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],0x65757274 PUSH 0x4 POP RDX PUSH 0x1 JMP 0x0013c0d7 LAB_0013c0bc: PUSH 0x8 JMP 0x0013c030 LAB_0013c0c3: LEA RSI,[RSP + 0x10] MOV byte ptr [RSI + 0x4],0x65 MOV dword ptr [RSI],0x736c6166 PUSH 0x5 POP RDX PUSH 0x2 LAB_0013c0d7: POP RCX MOV RDI,RBX CALL 0x0013c1dc MOV EBP,EAX JMP 0x0013c031 LAB_0013c0e7: PUSH 0xb JMP 0x0013c030
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::scan() */ ulong __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::scan(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> *this) { int iVar1; char cVar2; uint uVar3; ulong uVar4; int8 uVar5; int4 *puVar6; ulong uStack_30; int4 local_20; int4 local_1c; int4 local_18; int1 local_14; if ((*(long *)(this + 0x20) == 0) && (cVar2 = skip_bom(this), cVar2 == '\0')) { *(char **)(this + 0x70) = "invalid BOM; must be 0xEF 0xBB 0xBF if given"; return 0xe; } skip_whitespace(this); uStack_30 = 0xe; while ((iVar1 = *(int *)(this + 0x14), this[0x10] == (lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> )0x1 && (iVar1 == 0x2f))) { cVar2 = scan_comment(this); if (cVar2 == '\0') { return 0xe; } skip_whitespace(this); } switch(iVar1) { case 0x22: uVar4 = scan_string(this); return uVar4; case 0x23: case 0x24: case 0x25: case 0x26: case 0x27: case 0x28: case 0x29: case 0x2a: case 0x2b: case 0x2e: case 0x2f: switchD_0013c013_caseD_23: *(char **)(this + 0x70) = "invalid literal"; break; case 0x2c: uStack_30 = 0xd; break; case 0x2d: case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: uVar4 = scan_number(this); return uVar4; case 0x3a: uStack_30 = 0xc; break; default: if (iVar1 + 1U < 2) { return 0xf; } if (iVar1 == 0x5b) { return 8; } if (iVar1 == 0x7d) { return 0xb; } if (iVar1 == 0x66) { puVar6 = &local_18; local_14 = 0x65; local_18 = 0x736c6166; uVar5 = 5; uStack_30 = 2; } else if (iVar1 == 0x6e) { puVar6 = &local_20; local_20 = 0x6c6c756e; uVar5 = 4; uStack_30 = 3; } else { if (iVar1 != 0x74) { if (iVar1 == 0x7b) { return 9; } if (iVar1 == 0x5d) { return 10; } goto switchD_0013c013_caseD_23; } puVar6 = &local_1c; local_1c = 0x65757274; uVar5 = 4; uStack_30 = 1; } uVar3 = scan_literal(this,puVar6,uVar5,uStack_30); uStack_30 = (ulong)uVar3; } return uStack_30; }
46,265
mcp::server::server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/src/mcp_server.cpp
server::server(const std::string& host, int port, const std::string& name, const std::string& version, const std::string& sse_endpoint, const std::string& msg_endpoint) : host_(host), port_(port), name_(name), version_(version), sse_endpoint_(sse_endpoint), msg_endpoint_(msg_endpoint) { http_server_ = std::make_unique<httplib::Server>(); }
O0
cpp
mcp::server::server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0xf8, %rsp movq 0x100(%rsp), %rax movq %rdi, 0xf0(%rsp) movq %rsi, 0xe8(%rsp) movl %edx, 0xe4(%rsp) movq %rcx, 0xd8(%rsp) movq %r8, 0xd0(%rsp) movq %r9, 0xc8(%rsp) movq 0xf0(%rsp), %rdi movq %rdi, 0xa0(%rsp) movq %rdi, %rax movq %rax, 0x98(%rsp) movq 0xe8(%rsp), %rsi callq 0xc360 movq 0xa0(%rsp), %rdi movl 0xe4(%rsp), %eax movl %eax, 0x20(%rdi) addq $0x28, %rdi movq %rdi, 0xa8(%rsp) movq 0xd8(%rsp), %rsi callq 0xc360 jmp 0x7b953 movq 0x98(%rsp), %rdi addq $0x48, %rdi movq %rdi, 0x90(%rsp) movq 0xd0(%rsp), %rsi callq 0xc360 jmp 0x7b976 movq 0x98(%rsp), %rdi addq $0x68, %rdi movq %rdi, 0x68(%rsp) xorl %eax, %eax movl %eax, %esi callq 0x779f0 movq 0x98(%rsp), %rdi addq $0x78, %rdi movq %rdi, 0x70(%rsp) callq 0x92270 movq 0x98(%rsp), %rdi subq $-0x80, %rdi movq %rdi, 0x78(%rsp) callq 0x922a0 movq 0x98(%rsp), %rdi addq $0x88, %rdi movq %rdi, 0x80(%rsp) callq 0x922d0 movq 0x98(%rsp), %rdi addq $0xb8, %rdi movq %rdi, 0x88(%rsp) callq 0x922e0 jmp 0x7b9f6 movq 0x98(%rsp), %rdi addq $0x148, %rdi # imm = 0x148 movq %rdi, 0x58(%rsp) callq 0x923b0 movq 0x98(%rsp), %rdi addq $0x178, %rdi # imm = 0x178 movq %rdi, 0x60(%rsp) movq 0xc8(%rsp), %rsi callq 0xc360 jmp 0x7ba32 movq 0x98(%rsp), %rdi addq $0x198, %rdi # imm = 0x198 movq %rdi, 0x50(%rsp) movq 0x100(%rsp), %rsi callq 0xc360 jmp 0x7ba55 movq 0x98(%rsp), %rdi addq $0x1b8, %rdi # imm = 0x1B8 movq %rdi, 0x20(%rsp) callq 0x923c0 movq 0x98(%rsp), %rdi addq $0x1e8, %rdi # imm = 0x1E8 movq %rdi, 0x28(%rsp) callq 0x923d0 movq 0x98(%rsp), %rdi addq $0x218, %rdi # imm = 0x218 movq %rdi, 0x30(%rsp) callq 0x923e0 movq 0x98(%rsp), %rdi addq $0x248, %rdi # imm = 0x248 movq %rdi, 0x38(%rsp) callq 0x923f0 movq 0x98(%rsp), %rdi addq $0x278, %rdi # imm = 0x278 movq %rdi, 0x40(%rsp) callq 0x92400 movq 0x98(%rsp), %rdi addq $0x298, %rdi # imm = 0x298 callq 0x92440 movq 0x98(%rsp), %rax movb $0x0, 0x2c0(%rax) addq $0x2c8, %rax # imm = 0x2C8 movq %rax, 0x48(%rsp) callq 0xcb90 movq 0x48(%rsp), %rdi movl %eax, %eax movl %eax, %esi callq 0x92450 jmp 0x7bb15 movq 0x98(%rsp), %rdi addq $0x390, %rdi # imm = 0x390 movq %rdi, 0x8(%rsp) callq 0x92550 movq 0x98(%rsp), %rdi addq $0x3c0, %rdi # imm = 0x3C0 movq %rdi, 0x10(%rsp) callq 0x922a0 movq 0x98(%rsp), %rdi addq $0x3c8, %rdi # imm = 0x3C8 movq %rdi, 0x18(%rsp) callq 0x92560 leaq 0xb0(%rsp), %rdi callq 0x92570 jmp 0x7bb6f movq 0x98(%rsp), %rdi addq $0x78, %rdi leaq 0xb0(%rsp), %rsi callq 0x925f0 leaq 0xb0(%rsp), %rdi callq 0x92620 addq $0xf8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc0(%rsp) movl %eax, 0xbc(%rsp) jmp 0x7bd0e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc0(%rsp) movl %eax, 0xbc(%rsp) jmp 0x7bd01 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc0(%rsp) movl %eax, 0xbc(%rsp) jmp 0x7bcc9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc0(%rsp) movl %eax, 0xbc(%rsp) jmp 0x7bcb2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc0(%rsp) movl %eax, 0xbc(%rsp) jmp 0x7bca8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc0(%rsp) movl %eax, 0xbc(%rsp) jmp 0x7bc6c movq 0x18(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xc0(%rsp) movl %eax, 0xbc(%rsp) callq 0x92680 movq 0x10(%rsp), %rdi callq 0x92690 movq 0x8(%rsp), %rdi callq 0x926f0 movq 0x48(%rsp), %rdi callq 0x92700 movq 0x40(%rsp), %rdi callq 0x92810 movq 0x38(%rsp), %rdi callq 0x92820 movq 0x30(%rsp), %rdi callq 0x92830 movq 0x28(%rsp), %rdi callq 0x92840 movq 0x20(%rsp), %rdi callq 0x92850 movq 0x50(%rsp), %rdi callq 0xcfd0 movq 0x60(%rsp), %rdi callq 0xcfd0 movq 0x58(%rsp), %rdi callq 0x92860 movq 0x88(%rsp), %rdi callq 0x92870 movq 0x80(%rsp), %rdi callq 0x928c0 movq 0x78(%rsp), %rdi callq 0x92690 movq 0x70(%rsp), %rdi callq 0x92620 movq 0x68(%rsp), %rdi callq 0x13240 movq 0x90(%rsp), %rdi callq 0xcfd0 movq 0xa8(%rsp), %rdi callq 0xcfd0 movq 0xa0(%rsp), %rdi callq 0xcfd0 movq 0xc0(%rsp), %rdi callq 0xce40 nopl (%rax,%rax)
_ZN3mcp6serverC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_S8_S8_S8_: sub rsp, 0F8h mov rax, [rsp+0F8h+arg_0] mov [rsp+0F8h+var_8], rdi mov [rsp+0F8h+var_10], rsi mov [rsp+0F8h+var_14], edx mov [rsp+0F8h+var_20], rcx mov [rsp+0F8h+var_28], r8 mov [rsp+0F8h+var_30], r9 mov rdi, [rsp+0F8h+var_8] mov [rsp+0F8h+var_58], rdi mov rax, rdi mov [rsp+0F8h+var_60], rax mov rsi, [rsp+0F8h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) mov rdi, [rsp+0F8h+var_58] mov eax, [rsp+0F8h+var_14] mov [rdi+20h], eax add rdi, 28h ; '(' mov [rsp+0F8h+var_50], rdi mov rsi, [rsp+0F8h+var_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_7B953: mov rdi, [rsp+0F8h+var_60] add rdi, 48h ; 'H' mov [rsp+0F8h+var_68], rdi mov rsi, [rsp+0F8h+var_28] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_7B976: mov rdi, [rsp+0F8h+var_60] add rdi, 68h ; 'h' mov [rsp+0F8h+var_90], rdi xor eax, eax mov esi, eax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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>::basic_json(decltype(nullptr)) mov rdi, [rsp+0F8h+var_60] add rdi, 78h ; 'x' mov [rsp+0F8h+var_88], rdi call _ZNSt10unique_ptrIN7httplib6ServerESt14default_deleteIS1_EEC2IS3_vEEv; std::unique_ptr<httplib::Server>::unique_ptr<std::default_delete<httplib::Server>,void>(void) mov rdi, [rsp+0F8h+var_60] sub rdi, 0FFFFFFFFFFFFFF80h mov [rsp+0F8h+var_80], rdi call _ZNSt10unique_ptrISt6threadSt14default_deleteIS0_EEC2IS2_vEEv; std::unique_ptr<std::thread>::unique_ptr<std::default_delete<std::thread>,void>(void) mov rdi, [rsp+0F8h+var_60] add rdi, 88h mov [rsp+0F8h+var_78], rdi call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrISt6threadSt14default_deleteIS7_EESt4lessIS5_ESaISt4pairIKS5_SA_EEEC2Ev; std::map<std::string,std::unique_ptr<std::thread>>::map(void) mov rdi, [rsp+0F8h+var_60] add rdi, 0B8h; this mov [rsp+0F8h+var_70], rdi call _ZN3mcp16event_dispatcherC2Ev; mcp::event_dispatcher::event_dispatcher(void) jmp short $+2 loc_7B9F6: mov rdi, [rsp+0F8h+var_60] add rdi, 148h mov [rsp+0F8h+var_A0], rdi call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN3mcp16event_dispatcherEESt4lessIS5_ESaISt4pairIKS5_S9_EEEC2Ev; std::map<std::string,std::shared_ptr<mcp::event_dispatcher>>::map(void) mov rdi, [rsp+0F8h+var_60] add rdi, 178h mov [rsp+0F8h+var_98], rdi mov rsi, [rsp+0F8h+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_7BA32: mov rdi, [rsp+0F8h+var_60] add rdi, 198h mov [rsp+0F8h+var_A8], rdi mov rsi, [rsp+0F8h+arg_0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_7BA55: mov rdi, [rsp+0F8h+var_60] add rdi, 1B8h mov [rsp+0F8h+var_D8], rdi; __int64 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEERKSF_RKS5_EESt4lessIS5_ESaISt4pairISI_SL_EEEC2Ev; std::map<std::string,std::function<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> const&,std::string const&)>>::map(void) mov rdi, [rsp+0F8h+var_60] add rdi, 1E8h mov [rsp+0F8h+var_D0], rdi call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFvRKN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEERKS5_EESt4lessIS5_ESaISt4pairISI_SL_EEEC2Ev; std::map<std::string,std::function<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> const&,std::string const&)>>::map(void) mov rdi, [rsp+0F8h+var_60] add rdi, 218h mov [rsp+0F8h+var_C8], rdi call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN3mcp8resourceEESt4lessIS5_ESaISt4pairIKS5_S9_EEEC2Ev; std::map<std::string,std::shared_ptr<mcp::resource>>::map(void) mov rdi, [rsp+0F8h+var_60] add rdi, 248h mov [rsp+0F8h+var_C0], rdi call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIN3mcp4toolESt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS5_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEERKSI_RKS5_EEESt4lessIS5_ESaIS6_ISL_SP_EEEC2Ev; std::map<std::string,std::pair<mcp::tool,std::function<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> const&,std::string const&)>>>::map(void) mov rdi, [rsp+0F8h+var_60] add rdi, 278h mov [rsp+0F8h+var_B8], rdi call _ZNSt8functionIFbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_EEC2Ev; std::function<bool ()(std::string const&,std::string const&)>::function(void) mov rdi, [rsp+0F8h+var_60] add rdi, 298h; this call _ZNSt5mutexC2Ev; std::mutex::mutex(void) mov rax, [rsp+0F8h+var_60] mov byte ptr [rax+2C0h], 0 add rax, 2C8h mov [rsp+0F8h+var_B0], rax call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov rdi, [rsp+0F8h+var_B0]; this mov eax, eax mov esi, eax; unsigned __int64 call _ZN3mcp11thread_poolC2Em; mcp::thread_pool::thread_pool(ulong) jmp short $+2 loc_7BB15: mov rdi, [rsp+0F8h+var_60] add rdi, 390h mov qword ptr [rsp+0F8h+var_F0], rdi; int call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbSt4lessIS5_ESaISt4pairIKS5_bEEEC2Ev; std::map<std::string,bool>::map(void) mov rdi, [rsp+0F8h+var_60] add rdi, 3C0h mov [rsp+0F8h+var_E8], rdi; void * call _ZNSt10unique_ptrISt6threadSt14default_deleteIS0_EEC2IS2_vEEv; std::unique_ptr<std::thread>::unique_ptr<std::default_delete<std::thread>,void>(void) mov rdi, [rsp+0F8h+var_60] add rdi, 3C8h mov qword ptr [rsp+0F8h+var_E0], rdi; int call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFvRKS5_EESt4lessIS5_ESaISt4pairIS7_SA_EEEC2Ev; std::map<std::string,std::function<void ()(std::string const&)>>::map(void) lea rdi, [rsp+0F8h+var_48]; int call _ZSt11make_uniqueIN7httplib6ServerEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<httplib::Server>() jmp short $+2 loc_7BB6F: mov rdi, [rsp+0F8h+var_60] add rdi, 78h ; 'x' lea rsi, [rsp+0F8h+var_48] call _ZNSt10unique_ptrIN7httplib6ServerESt14default_deleteIS1_EEaSEOS4_; std::unique_ptr<httplib::Server>::operator=(std::unique_ptr<httplib::Server>&&) lea rdi, [rsp+0F8h+var_48] call _ZNSt10unique_ptrIN7httplib6ServerESt14default_deleteIS1_EED2Ev; std::unique_ptr<httplib::Server>::~unique_ptr() add rsp, 0F8h retn mov rcx, rax mov eax, edx mov [rsp+arg_B8], rcx mov [rsp+arg_B4], eax jmp loc_7BD0E mov rcx, rax mov eax, edx mov [rsp+arg_B8], rcx mov [rsp+arg_B4], eax jmp loc_7BD01 mov rcx, rax mov eax, edx mov [rsp+arg_B8], rcx mov [rsp+arg_B4], eax jmp loc_7BCC9 mov rcx, rax mov eax, edx mov [rsp+arg_B8], rcx mov [rsp+arg_B4], eax jmp loc_7BCB2 mov rcx, rax mov eax, edx mov [rsp+arg_B8], rcx mov [rsp+arg_B4], eax jmp loc_7BCA8 mov rcx, rax mov eax, edx mov [rsp+arg_B8], rcx mov [rsp+arg_B4], eax jmp short loc_7BC6C mov rdi, [rsp+arg_10] mov rcx, rax mov eax, edx mov [rsp+arg_B8], rcx mov [rsp+arg_B4], eax call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFvRKS5_EESt4lessIS5_ESaISt4pairIS7_SA_EEED2Ev; std::map<std::string,std::function<void ()(std::string const&)>>::~map() mov rdi, [rsp+arg_8] call _ZNSt10unique_ptrISt6threadSt14default_deleteIS0_EED2Ev; std::unique_ptr<std::thread>::~unique_ptr() mov rdi, [rsp+arg_0] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbSt4lessIS5_ESaISt4pairIKS5_bEEED2Ev; std::map<std::string,bool>::~map() mov rdi, [rsp+arg_40]; this call _ZN3mcp11thread_poolD2Ev; mcp::thread_pool::~thread_pool() loc_7BC6C: mov rdi, [rsp+arg_38] call _ZNSt8functionIFbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES7_EED2Ev; std::function<bool ()(std::string const&,std::string const&)>::~function() mov rdi, [rsp+arg_30] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIN3mcp4toolESt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINSB_11ordered_mapESt6vectorS5_blmdSaNSB_14adl_serializerESE_IhSaIhEEvEERKSI_RKS5_EEESt4lessIS5_ESaIS6_ISL_SP_EEED2Ev; std::map<std::string,std::pair<mcp::tool,std::function<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> const&,std::string const&)>>>::~map() mov rdi, [rsp+arg_28] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN3mcp8resourceEESt4lessIS5_ESaISt4pairIKS5_S9_EEED2Ev; std::map<std::string,std::shared_ptr<mcp::resource>>::~map() mov rdi, [rsp+arg_20] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFvRKN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEERKS5_EESt4lessIS5_ESaISt4pairISI_SL_EEED2Ev; std::map<std::string,std::function<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> const&,std::string const&)>>::~map() mov rdi, [rsp+arg_18] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS8_11ordered_mapESt6vectorS5_blmdSaNS8_14adl_serializerESB_IhSaIhEEvEERKSF_RKS5_EESt4lessIS5_ESaISt4pairISI_SL_EEED2Ev; std::map<std::string,std::function<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> const&,std::string const&)>>::~map() mov rdi, [rsp+arg_48]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7BCA8: mov rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7BCB2: mov rdi, [rsp+arg_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10shared_ptrIN3mcp16event_dispatcherEESt4lessIS5_ESaISt4pairIKS5_S9_EEED2Ev; std::map<std::string,std::shared_ptr<mcp::event_dispatcher>>::~map() mov rdi, [rsp+arg_80]; this call _ZN3mcp16event_dispatcherD2Ev; mcp::event_dispatcher::~event_dispatcher() loc_7BCC9: mov rdi, [rsp+arg_78] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt10unique_ptrISt6threadSt14default_deleteIS7_EESt4lessIS5_ESaISt4pairIKS5_SA_EEED2Ev; std::map<std::string,std::unique_ptr<std::thread>>::~map() mov rdi, [rsp+arg_70] call _ZNSt10unique_ptrISt6threadSt14default_deleteIS0_EED2Ev; std::unique_ptr<std::thread>::~unique_ptr() mov rdi, [rsp+arg_68] call _ZNSt10unique_ptrIN7httplib6ServerESt14default_deleteIS1_EED2Ev; std::unique_ptr<httplib::Server>::~unique_ptr() mov rdi, [rsp+arg_60] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; 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>::~basic_json() mov rdi, [rsp+arg_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7BD01: mov rdi, [rsp+arg_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_7BD0E: mov rdi, [rsp+arg_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_B8] call __Unwind_Resume
long long mcp::server::server(long long a1, long long a2, int a3, long long a4, long long a5, long long a6, long long a7) { std::mutex *v7; // rdi unsigned long long v8; // rsi int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d int v14; // [rsp+0h] [rbp-F8h] long long v15; // [rsp+20h] [rbp-D8h] int v17[6]; // [rsp+B0h] [rbp-48h] BYREF long long v18; // [rsp+C8h] [rbp-30h] long long v19; // [rsp+D0h] [rbp-28h] long long v20; // [rsp+D8h] [rbp-20h] int v21; // [rsp+E4h] [rbp-14h] long long v22; // [rsp+E8h] [rbp-10h] long long v23; // [rsp+F0h] [rbp-8h] v23 = a1; v22 = a2; v21 = a3; v20 = a4; v19 = a5; v18 = a6; std::string::basic_string(a1, a2); *(_DWORD *)(a1 + 32) = v21; std::string::basic_string(a1 + 40, v20); std::string::basic_string(a1 + 72, v19); 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>::basic_json(a1 + 104); std::unique_ptr<httplib::Server>::unique_ptr<std::default_delete<httplib::Server>,void>(a1 + 120, 0LL); std::unique_ptr<std::thread>::unique_ptr<std::default_delete<std::thread>,void>(); std::map<std::string,std::unique_ptr<std::thread>>::map(); mcp::event_dispatcher::event_dispatcher((mcp::event_dispatcher *)(a1 + 184)); std::map<std::string,std::shared_ptr<mcp::event_dispatcher>>::map(); std::string::basic_string(a1 + 376, v18); std::string::basic_string(a1 + 408, a7); v15 = a1 + 440; std::map<std::string,std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,std::string const&)>>::map(); std::map<std::string,std::function<void ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,std::string const&)>>::map(); std::map<std::string,std::shared_ptr<mcp::resource>>::map(); std::map<std::string,std::pair<mcp::tool,std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> ()(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const&,std::string const&)>>>::map(); std::function<bool ()(std::string const&,std::string const&)>::function(); v7 = (std::mutex *)(a1 + 664); std::mutex::mutex(v7); *(_BYTE *)(a1 + 704) = 0; v8 = (unsigned int)std::thread::hardware_concurrency(v7); mcp::thread_pool::thread_pool((mcp::thread_pool *)(a1 + 712), v8); std::map<std::string,bool>::map(); std::unique_ptr<std::thread>::unique_ptr<std::default_delete<std::thread>,void>(); std::map<std::string,std::function<void ()(std::string const&)>>::map(); std::make_unique<httplib::Server>((int)v17, v8, v9, v10, v11, v12, v14, a1 + 912, (void *)(a1 + 960), a1 + 968, v15); std::unique_ptr<httplib::Server>::operator=(a1 + 120, v17); return std::unique_ptr<httplib::Server>::~unique_ptr(v17); }
server: SUB RSP,0xf8 MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0xf0],RDI MOV qword ptr [RSP + 0xe8],RSI MOV dword ptr [RSP + 0xe4],EDX MOV qword ptr [RSP + 0xd8],RCX MOV qword ptr [RSP + 0xd0],R8 MOV qword ptr [RSP + 0xc8],R9 MOV RDI,qword ptr [RSP + 0xf0] MOV qword ptr [RSP + 0xa0],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x98],RAX MOV RSI,qword ptr [RSP + 0xe8] CALL 0x0010c360 MOV RDI,qword ptr [RSP + 0xa0] MOV EAX,dword ptr [RSP + 0xe4] MOV dword ptr [RDI + 0x20],EAX ADD RDI,0x28 MOV qword ptr [RSP + 0xa8],RDI MOV RSI,qword ptr [RSP + 0xd8] LAB_0017b94c: CALL 0x0010c360 JMP 0x0017b953 LAB_0017b953: MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x48 MOV qword ptr [RSP + 0x90],RDI MOV RSI,qword ptr [RSP + 0xd0] LAB_0017b96f: CALL 0x0010c360 JMP 0x0017b976 LAB_0017b976: MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x68 MOV qword ptr [RSP + 0x68],RDI XOR EAX,EAX MOV ESI,EAX CALL 0x001779f0 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x78 MOV qword ptr [RSP + 0x70],RDI CALL 0x00192270 MOV RDI,qword ptr [RSP + 0x98] SUB RDI,-0x80 MOV qword ptr [RSP + 0x78],RDI CALL 0x001922a0 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x88 MOV qword ptr [RSP + 0x80],RDI CALL 0x001922d0 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0xb8 MOV qword ptr [RSP + 0x88],RDI LAB_0017b9ef: CALL 0x001922e0 JMP 0x0017b9f6 LAB_0017b9f6: MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x148 MOV qword ptr [RSP + 0x58],RDI CALL 0x001923b0 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x178 MOV qword ptr [RSP + 0x60],RDI MOV RSI,qword ptr [RSP + 0xc8] LAB_0017ba2b: CALL 0x0010c360 JMP 0x0017ba32 LAB_0017ba32: MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x198 MOV qword ptr [RSP + 0x50],RDI MOV RSI,qword ptr [RSP + 0x100] LAB_0017ba4e: CALL 0x0010c360 JMP 0x0017ba55 LAB_0017ba55: MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x1b8 MOV qword ptr [RSP + 0x20],RDI CALL 0x001923c0 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x1e8 MOV qword ptr [RSP + 0x28],RDI CALL 0x001923d0 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x218 MOV qword ptr [RSP + 0x30],RDI CALL 0x001923e0 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x248 MOV qword ptr [RSP + 0x38],RDI CALL 0x001923f0 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x278 MOV qword ptr [RSP + 0x40],RDI CALL 0x00192400 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x298 CALL 0x00192440 MOV RAX,qword ptr [RSP + 0x98] MOV byte ptr [RAX + 0x2c0],0x0 ADD RAX,0x2c8 MOV qword ptr [RSP + 0x48],RAX CALL 0x0010cb90 MOV RDI,qword ptr [RSP + 0x48] MOV EAX,EAX MOV ESI,EAX LAB_0017bb0e: CALL 0x00192450 JMP 0x0017bb15 LAB_0017bb15: MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x390 MOV qword ptr [RSP + 0x8],RDI CALL 0x00192550 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x3c0 MOV qword ptr [RSP + 0x10],RDI CALL 0x001922a0 MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x3c8 MOV qword ptr [RSP + 0x18],RDI CALL 0x00192560 LAB_0017bb60: LEA RDI,[RSP + 0xb0] CALL 0x00192570 LAB_0017bb6d: JMP 0x0017bb6f LAB_0017bb6f: MOV RDI,qword ptr [RSP + 0x98] ADD RDI,0x78 LEA RSI,[RSP + 0xb0] CALL 0x001925f0 LEA RDI,[RSP + 0xb0] CALL 0x00192620 ADD RSP,0xf8 RET
/* mcp::server::server(std::__cxx11::string const&, int, std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&) */ void __thiscall mcp::server::server(server *this,string *param_1,int param_2,string *param_3,string *param_4, string *param_5,string *param_6) { uint uVar1; unique_ptr local_48 [24]; string *local_30; string *local_28; string *local_20; int local_14; string *local_10; server *local_8; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; local_8 = this; std::__cxx11::string::string((string *)this,param_1); *(int *)(this + 0x20) = local_14; /* try { // try from 0017b94c to 0017b950 has its CatchHandler @ 0017bb9d */ std::__cxx11::string::string((string *)(this + 0x28),local_20); /* try { // try from 0017b96f to 0017b973 has its CatchHandler @ 0017bbb6 */ std::__cxx11::string::string((string *)(this + 0x48),local_28); 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((_func_decltype_nullptr *)(this + 0x68)); std::unique_ptr<httplib::Server,std::default_delete<httplib::Server>>:: unique_ptr<std::default_delete<httplib::Server>,void> ((unique_ptr<httplib::Server,std::default_delete<httplib::Server>> *)(this + 0x78)); std::unique_ptr<std::thread,std::default_delete<std::thread>>:: unique_ptr<std::default_delete<std::thread>,void> ((unique_ptr<std::thread,std::default_delete<std::thread>> *)(this + 0x80)); std:: map<std::__cxx11::string,std::unique_ptr<std::thread,std::default_delete<std::thread>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::unique_ptr<std::thread,std::default_delete<std::thread>>>>> ::map((map<std::__cxx11::string,std::unique_ptr<std::thread,std::default_delete<std::thread>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::unique_ptr<std::thread,std::default_delete<std::thread>>>>> *)(this + 0x88)); /* try { // try from 0017b9ef to 0017b9f3 has its CatchHandler @ 0017bbcf */ event_dispatcher::event_dispatcher((event_dispatcher *)(this + 0xb8)); std:: map<std::__cxx11::string,std::shared_ptr<mcp::event_dispatcher>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<mcp::event_dispatcher>>>> ::map((map<std::__cxx11::string,std::shared_ptr<mcp::event_dispatcher>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<mcp::event_dispatcher>>>> *)(this + 0x148)); /* try { // try from 0017ba2b to 0017ba2f has its CatchHandler @ 0017bbe8 */ std::__cxx11::string::string((string *)(this + 0x178),local_30); /* try { // try from 0017ba4e to 0017ba52 has its CatchHandler @ 0017bc01 */ std::__cxx11::string::string((string *)(this + 0x198),param_6); std:: map<std::__cxx11::string,std::function<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&,std::__cxx11::string_const&)>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::function<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&,std::__cxx11::string_const&)>>>> ::map((map<std::__cxx11::string,std::function<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&,std::__cxx11::string_const&)>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::function<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&,std::__cxx11::string_const&)>>>> *)(this + 0x1b8)); std:: map<std::__cxx11::string,std::function<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&,std::__cxx11::string_const&)>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::function<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&,std::__cxx11::string_const&)>>>> ::map((map<std::__cxx11::string,std::function<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&,std::__cxx11::string_const&)>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::function<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&,std::__cxx11::string_const&)>>>> *)(this + 0x1e8)); std:: map<std::__cxx11::string,std::shared_ptr<mcp::resource>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<mcp::resource>>>> ::map((map<std::__cxx11::string,std::shared_ptr<mcp::resource>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::shared_ptr<mcp::resource>>>> *)(this + 0x218)); std:: map<std::__cxx11::string,std::pair<mcp::tool,std::function<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&,std::__cxx11::string_const&)>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::pair<mcp::tool,std::function<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&,std::__cxx11::string_const&)>>>>> ::map((map<std::__cxx11::string,std::pair<mcp::tool,std::function<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&,std::__cxx11::string_const&)>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::pair<mcp::tool,std::function<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&,std::__cxx11::string_const&)>>>>> *)(this + 0x248)); std::function<bool(std::__cxx11::string_const&,std::__cxx11::string_const&)>::function ((function<bool(std::__cxx11::string_const&,std::__cxx11::string_const&)> *) (this + 0x278)); std::mutex::mutex((mutex *)(this + 0x298)); this[0x2c0] = (server)0x0; uVar1 = std::thread::hardware_concurrency(); /* try { // try from 0017bb0e to 0017bb12 has its CatchHandler @ 0017bc1a */ thread_pool::thread_pool((thread_pool *)(this + 0x2c8),(ulong)uVar1); std:: map<std::__cxx11::string,bool,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,bool>>> ::map((map<std::__cxx11::string,bool,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,bool>>> *)(this + 0x390)); std::unique_ptr<std::thread,std::default_delete<std::thread>>:: unique_ptr<std::default_delete<std::thread>,void> ((unique_ptr<std::thread,std::default_delete<std::thread>> *)(this + 0x3c0)); std:: map<std::__cxx11::string,std::function<void(std::__cxx11::string_const&)>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::function<void(std::__cxx11::string_const&)>>>> ::map((map<std::__cxx11::string,std::function<void(std::__cxx11::string_const&)>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::function<void(std::__cxx11::string_const&)>>>> *)(this + 0x3c8)); /* try { // try from 0017bb60 to 0017bb6c has its CatchHandler @ 0017bc30 */ std::make_unique<httplib::Server>(); std::unique_ptr<httplib::Server,std::default_delete<httplib::Server>>::operator= ((unique_ptr<httplib::Server,std::default_delete<httplib::Server>> *)(this + 0x78), local_48); std::unique_ptr<httplib::Server,std::default_delete<httplib::Server>>::~unique_ptr ((unique_ptr<httplib::Server,std::default_delete<httplib::Server>> *)local_48); return; }
46,266
mcp::server::server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
hkr04[P]cpp-mcp/src/mcp_server.cpp
server::server(const std::string& host, int port, const std::string& name, const std::string& version, const std::string& sse_endpoint, const std::string& msg_endpoint) : host_(host), port_(port), name_(name), version_(version), sse_endpoint_(sse_endpoint), msg_endpoint_(msg_endpoint) { http_server_ = std::make_unique<httplib::Server>(); }
O2
cpp
mcp::server::server(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, %r15 movq %r8, %r14 movq %rcx, %r12 movl %edx, %ebp movq %rdi, %rbx callq 0xa8c0 movl %ebp, 0x20(%rbx) leaq 0x28(%rbx), %r13 movq %r13, %rdi movq %r12, %rsi callq 0xa8c0 movq %r13, 0x40(%rsp) leaq 0x48(%rbx), %r12 movq %r12, %rdi movq %r14, %rsi callq 0xa8c0 leaq 0x68(%rbx), %rdi movq %rdi, 0x30(%rsp) xorl %esi, %esi callq 0xf490 leaq 0x78(%rbx), %r13 andl $0x0, 0x90(%rbx) leaq 0x90(%rbx), %rax andq $0x0, 0x98(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x78(%rbx) movq %rax, 0xa0(%rbx) movq %rax, 0xa8(%rbx) andq $0x0, 0xb0(%rbx) leaq 0xb8(%rbx), %rbp movq %rbp, %rdi movq %r12, 0x38(%rsp) callq 0x1718e andl $0x0, 0x150(%rbx) andq $0x0, 0x158(%rbx) leaq 0x150(%rbx), %rax movq %rax, 0x160(%rbx) movq %rax, 0x168(%rbx) andq $0x0, 0x170(%rbx) leaq 0x178(%rbx), %r14 movq %r14, %rdi movq %r15, %rsi callq 0xa8c0 movq 0x80(%rsp), %rsi leaq 0x198(%rbx), %r15 movq %r15, %rdi callq 0xa8c0 leaq 0x1c0(%rbx), %rax andl $0x0, 0x1c0(%rbx) andq $0x0, 0x1c8(%rbx) movq %rax, 0x1d0(%rbx) movq %rax, 0x1d8(%rbx) andq $0x0, 0x1e0(%rbx) leaq 0x1f0(%rbx), %rax andl $0x0, 0x1f0(%rbx) andq $0x0, 0x1f8(%rbx) movq %rax, 0x200(%rbx) movq %rax, 0x208(%rbx) andq $0x0, 0x210(%rbx) leaq 0x220(%rbx), %rax andl $0x0, 0x220(%rbx) andq $0x0, 0x228(%rbx) movq %rax, 0x230(%rbx) movq %rax, 0x238(%rbx) andq $0x0, 0x240(%rbx) andl $0x0, 0x250(%rbx) andq $0x0, 0x258(%rbx) leaq 0x250(%rbx), %rax movq %rax, 0x260(%rbx) movq %rax, 0x268(%rbx) leaq 0x2c8(%rbx), %r12 xorps %xmm0, %xmm0 movups %xmm0, 0x2b0(%rbx) movups %xmm0, 0x2a0(%rbx) movups %xmm0, 0x290(%rbx) movups %xmm0, 0x280(%rbx) movups %xmm0, 0x270(%rbx) movb $0x0, 0x2c0(%rbx) callq 0xa8b0 movl %eax, %esi movq %r12, %rdi callq 0x17218 leaq 0x398(%rbx), %rax andl $0x0, 0x398(%rbx) andq $0x0, 0x3a0(%rbx) movq %rax, 0x3a8(%rbx) movq %rax, 0x3b0(%rbx) andl $0x0, 0x3d0(%rbx) andq $0x0, 0x3d8(%rbx) leaq 0x3d0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x3b8(%rbx) movq %rax, 0x3e0(%rbx) movq %rax, 0x3e8(%rbx) andq $0x0, 0x3f0(%rbx) leaq 0x20(%rsp), %rdi callq 0x172be movq 0x20(%rsp), %rax andq $0x0, 0x20(%rsp) movq (%r13), %rdi movq %rax, (%r13) testq %rdi, %rdi je 0xfdc8 movq (%rdi), %rax callq *0x8(%rax) movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0xfdc8 movq (%rdi), %rax callq *0x8(%rax) addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, 0x8(%rsp) leaq 0x3c0(%rbx), %rax movq %rax, 0x10(%rsp) leaq 0x3c8(%rbx), %rdi leaq 0x390(%rbx), %rax movq %rax, 0x18(%rsp) callq 0x1a278 movq 0x10(%rsp), %rdi callq 0x17318 movq 0x18(%rsp), %rdi callq 0x1a2f2 movq %r12, %rdi callq 0x17332 jmp 0xfe23 movq %rax, 0x8(%rsp) leaq 0x1b8(%rbx), %rax movq %rax, 0x18(%rsp) leaq 0x1e8(%rbx), %rax movq %rax, 0x10(%rsp) leaq 0x218(%rbx), %rax movq %rax, 0x28(%rsp) leaq 0x248(%rbx), %r12 leaq 0x278(%rbx), %rdi callq 0xf7f4 movq %r12, %rdi callq 0x1a356 movq 0x28(%rsp), %rdi callq 0x1a3d2 movq 0x10(%rsp), %rdi callq 0x1a4c8 movq 0x18(%rsp), %rdi callq 0x1a542 movq %r15, %rdi callq 0xac20 jmp 0xfe8f movq %rax, 0x8(%rsp) movq %r14, %rdi callq 0xac20 jmp 0xfe9e movq %rax, 0x8(%rsp) leaq 0x148(%rbx), %rdi callq 0x1a5bc movq %rbp, %rdi callq 0x173be jmp 0xfeb9 movq %rax, 0x8(%rsp) leaq 0x80(%rbx), %r14 leaq 0x88(%rbx), %rdi callq 0x1a636 movq %r14, %rdi callq 0x17318 movq %r13, %rdi callq 0x17300 movq 0x30(%rsp), %rdi callq 0xdc84 movq 0x38(%rsp), %rdi callq 0xac20 movq 0x40(%rsp), %rdi callq 0xac20 movq %rbx, %rdi callq 0xac20 movq 0x8(%rsp), %rdi callq 0xaac0 movq %rax, 0x8(%rsp) jmp 0xfef0 movq %rax, 0x8(%rsp) jmp 0xfefa
_ZN3mcp6serverC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS8_S8_S8_S8_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r15, r9 mov r14, r8 mov r12, rcx mov ebp, edx mov rbx, rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov [rbx+20h], ebp lea r13, [rbx+28h] mov rdi, r13 mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov [rsp+78h+var_38], r13 lea r12, [rbx+48h] mov rdi, r12 mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rdi, [rbx+68h] mov [rsp+78h+var_48], rdi xor esi, esi call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2EDn; 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>::basic_json(decltype(nullptr)) lea r13, [rbx+78h] and dword ptr [rbx+90h], 0 lea rax, [rbx+90h] and qword ptr [rbx+98h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx+78h], xmm0 mov [rbx+0A0h], rax mov [rbx+0A8h], rax and qword ptr [rbx+0B0h], 0 lea rbp, [rbx+0B8h] mov rdi, rbp; this mov [rsp+78h+var_40], r12 call _ZN3mcp16event_dispatcherC2Ev; mcp::event_dispatcher::event_dispatcher(void) and dword ptr [rbx+150h], 0 and qword ptr [rbx+158h], 0 lea rax, [rbx+150h] mov [rbx+160h], rax mov [rbx+168h], rax and qword ptr [rbx+170h], 0 lea r14, [rbx+178h] mov rdi, r14 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov rsi, [rsp+78h+arg_0] lea r15, [rbx+198h] mov rdi, r15; this call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rax, [rbx+1C0h] and dword ptr [rbx+1C0h], 0 and qword ptr [rbx+1C8h], 0 mov [rbx+1D0h], rax mov [rbx+1D8h], rax and qword ptr [rbx+1E0h], 0 lea rax, [rbx+1F0h] and dword ptr [rbx+1F0h], 0 and qword ptr [rbx+1F8h], 0 mov [rbx+200h], rax mov [rbx+208h], rax and qword ptr [rbx+210h], 0 lea rax, [rbx+220h] and dword ptr [rbx+220h], 0 and qword ptr [rbx+228h], 0 mov [rbx+230h], rax mov [rbx+238h], rax and qword ptr [rbx+240h], 0 and dword ptr [rbx+250h], 0 and qword ptr [rbx+258h], 0 lea rax, [rbx+250h] mov [rbx+260h], rax mov [rbx+268h], rax lea r12, [rbx+2C8h] xorps xmm0, xmm0 movups xmmword ptr [rbx+2B0h], xmm0 movups xmmword ptr [rbx+2A0h], xmm0 movups xmmword ptr [rbx+290h], xmm0 movups xmmword ptr [rbx+280h], xmm0 movups xmmword ptr [rbx+270h], xmm0 mov byte ptr [rbx+2C0h], 0 call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov esi, eax; unsigned __int64 mov rdi, r12; this call _ZN3mcp11thread_poolC2Em; mcp::thread_pool::thread_pool(ulong) lea rax, [rbx+398h] and dword ptr [rbx+398h], 0 and qword ptr [rbx+3A0h], 0 mov [rbx+3A8h], rax mov [rbx+3B0h], rax and dword ptr [rbx+3D0h], 0 and qword ptr [rbx+3D8h], 0 lea rax, [rbx+3D0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+3B8h], xmm0 mov [rbx+3E0h], rax mov [rbx+3E8h], rax and qword ptr [rbx+3F0h], 0 lea rdi, [rsp+78h+var_58] call _ZSt11make_uniqueIN7httplib6ServerEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<httplib::Server>() mov rax, [rsp+78h+var_58] and [rsp+78h+var_58], 0 mov rdi, [r13+0] mov [r13+0], rax test rdi, rdi jz short loc_FDC8 mov rax, [rdi] call qword ptr [rax+8] mov rdi, [rsp+78h+var_58] test rdi, rdi jz short loc_FDC8 mov rax, [rdi] call qword ptr [rax+8] loc_FDC8: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov [rsp+arg_0], rax lea rax, [rbx+3C0h] mov [rsp+arg_8], rax lea rdi, [rbx+3C8h] lea rax, [rbx+390h] mov [rsp+arg_10], rax call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St8functionIFvRS7_EEESt10_Select1stISC_ESt4lessIS5_ESaISC_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::function<void ()(std::string const&)>>,std::_Select1st<std::pair<std::string const,std::function<void ()(std::string const&)>>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::function<void ()(std::string const&)>>>>::~_Rb_tree() mov rdi, [rsp+arg_8] call _ZNSt10unique_ptrISt6threadSt14default_deleteIS0_EED2Ev; std::unique_ptr<std::thread>::~unique_ptr() mov rdi, [rsp+arg_10] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_bESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,bool>,std::_Select1st<std::pair<std::string const,bool>>,std::less<std::string>,std::allocator<std::pair<std::string const,bool>>>::~_Rb_tree() mov rdi, r12; this call _ZN3mcp11thread_poolD2Ev; mcp::thread_pool::~thread_pool() jmp short loc_FE23 mov [rsp+arg_0], rax loc_FE23: lea rax, [rbx+1B8h] mov [rsp+arg_10], rax lea rax, [rbx+1E8h] mov [rsp+arg_8], rax lea rax, [rbx+218h] mov [rsp+arg_20], rax lea r12, [rbx+248h] lea rdi, [rbx+278h]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() mov rdi, r12 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S6_IN3mcp4toolESt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINSC_11ordered_mapESt6vectorS5_blmdSaNSC_14adl_serializerESF_IhSaIhEEvEERKSJ_RS7_EEEESt10_Select1stISQ_ESt4lessIS5_ESaISQ_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::pair<mcp::tool,std::function<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> const&,std::string const&)>>>,std::_Select1st<std::pair<std::string const,std::pair<mcp::tool,std::function<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> const&,std::string const&)>>>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::pair<mcp::tool,std::function<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> const&,std::string const&)>>>>>::~_Rb_tree() mov rdi, [rsp+arg_20] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN3mcp8resourceEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::shared_ptr<mcp::resource>>,std::_Select1st<std::pair<std::string const,std::shared_ptr<mcp::resource>>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::shared_ptr<mcp::resource>>>>::~_Rb_tree() mov rdi, [rsp+arg_8] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St8functionIFvRKN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS5_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEERS7_EEESt10_Select1stISN_ESt4lessIS5_ESaISN_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::function<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> const&,std::string const&)>>,std::_Select1st<std::pair<std::string const,std::function<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> const&,std::string const&)>>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::function<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> const&,std::string const&)>>>>::~_Rb_tree() mov rdi, [rsp+arg_10] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapESt6vectorS5_blmdSaNSA_14adl_serializerESD_IhSaIhEEvEERKSH_RS7_EEESt10_Select1stISN_ESt4lessIS5_ESaISN_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::function<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> const&,std::string const&)>>,std::_Select1st<std::pair<std::string const,std::function<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> const&,std::string const&)>>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::function<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> const&,std::string const&)>>>>::~_Rb_tree() mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_FE8F mov [rsp+arg_0], rax loc_FE8F: mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_FE9E mov [rsp+arg_0], rax loc_FE9E: lea rdi, [rbx+148h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10shared_ptrIN3mcp16event_dispatcherEEESt10_Select1stISC_ESt4lessIS5_ESaISC_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::shared_ptr<mcp::event_dispatcher>>,std::_Select1st<std::pair<std::string const,std::shared_ptr<mcp::event_dispatcher>>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::shared_ptr<mcp::event_dispatcher>>>>::~_Rb_tree() mov rdi, rbp; this call _ZN3mcp16event_dispatcherD2Ev; mcp::event_dispatcher::~event_dispatcher() jmp short loc_FEB9 mov [rsp+arg_0], rax loc_FEB9: lea r14, [rbx+80h] lea rdi, [rbx+88h] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_St10unique_ptrISt6threadSt14default_deleteIS9_EEESt10_Select1stISD_ESt4lessIS5_ESaISD_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::unique_ptr<std::thread>>,std::_Select1st<std::pair<std::string const,std::unique_ptr<std::thread>>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::unique_ptr<std::thread>>>>::~_Rb_tree() mov rdi, r14 call _ZNSt10unique_ptrISt6threadSt14default_deleteIS0_EED2Ev; std::unique_ptr<std::thread>::~unique_ptr() mov rdi, r13 call _ZNSt10unique_ptrIN7httplib6ServerESt14default_deleteIS1_EED2Ev; std::unique_ptr<httplib::Server>::~unique_ptr() mov rdi, [rsp+arg_28] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_FEF0: mov rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_FEFA: mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+arg_0] call __Unwind_Resume mov [rsp+arg_0], rax jmp short loc_FEF0 mov [rsp+arg_0], rax jmp short loc_FEFA
long long mcp::server::server(long long a1, int a2, int a3) { long long *v5; // r13 std::thread *v6; // rdi unsigned long long v7; // rsi long long result; // rax long long v9; // rdi _QWORD v10[11]; // [rsp+20h] [rbp-58h] BYREF std::string::basic_string(a1); *(_DWORD *)(a1 + 32) = a3; std::string::basic_string(a1 + 40); v10[4] = a1 + 40; std::string::basic_string(a1 + 72); v10[2] = a1 + 104; 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>::basic_json(a1 + 104); v5 = (long long *)(a1 + 120); *(_DWORD *)(a1 + 144) = 0; *(_QWORD *)(a1 + 152) = 0LL; *(_OWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 160) = a1 + 144; *(_QWORD *)(a1 + 168) = a1 + 144; *(_QWORD *)(a1 + 176) = 0LL; v10[3] = a1 + 72; mcp::event_dispatcher::event_dispatcher((mcp::event_dispatcher *)(a1 + 184)); *(_DWORD *)(a1 + 336) = 0; *(_QWORD *)(a1 + 344) = 0LL; *(_QWORD *)(a1 + 352) = a1 + 336; *(_QWORD *)(a1 + 360) = a1 + 336; *(_QWORD *)(a1 + 368) = 0LL; std::string::basic_string(a1 + 376); v6 = (std::thread *)(a1 + 408); std::string::basic_string(v6); *(_DWORD *)(a1 + 448) = 0; *(_QWORD *)(a1 + 456) = 0LL; *(_QWORD *)(a1 + 464) = a1 + 448; *(_QWORD *)(a1 + 472) = a1 + 448; *(_QWORD *)(a1 + 480) = 0LL; *(_DWORD *)(a1 + 496) = 0; *(_QWORD *)(a1 + 504) = 0LL; *(_QWORD *)(a1 + 512) = a1 + 496; *(_QWORD *)(a1 + 520) = a1 + 496; *(_QWORD *)(a1 + 528) = 0LL; *(_DWORD *)(a1 + 544) = 0; *(_QWORD *)(a1 + 552) = 0LL; *(_QWORD *)(a1 + 560) = a1 + 544; *(_QWORD *)(a1 + 568) = a1 + 544; *(_QWORD *)(a1 + 576) = 0LL; *(_DWORD *)(a1 + 592) = 0; *(_QWORD *)(a1 + 600) = 0LL; *(_QWORD *)(a1 + 608) = a1 + 592; *(_QWORD *)(a1 + 616) = a1 + 592; *(_OWORD *)(a1 + 688) = 0LL; *(_OWORD *)(a1 + 672) = 0LL; *(_OWORD *)(a1 + 656) = 0LL; *(_OWORD *)(a1 + 640) = 0LL; *(_OWORD *)(a1 + 624) = 0LL; *(_BYTE *)(a1 + 704) = 0; v7 = (unsigned int)std::thread::hardware_concurrency(v6); mcp::thread_pool::thread_pool((mcp::thread_pool *)(a1 + 712), v7); *(_DWORD *)(a1 + 920) = 0; *(_QWORD *)(a1 + 928) = 0LL; *(_QWORD *)(a1 + 936) = a1 + 920; *(_QWORD *)(a1 + 944) = a1 + 920; *(_DWORD *)(a1 + 976) = 0; *(_QWORD *)(a1 + 984) = 0LL; *(_OWORD *)(a1 + 952) = 0LL; *(_QWORD *)(a1 + 992) = a1 + 976; *(_QWORD *)(a1 + 1000) = a1 + 976; *(_QWORD *)(a1 + 1008) = 0LL; std::make_unique<httplib::Server>(v10); result = v10[0]; v10[0] = 0LL; v9 = *v5; *v5 = result; if ( v9 ) { result = (*(long long ( **)(long long))(*(_QWORD *)v9 + 8LL))(v9); if ( v10[0] ) return (*(long long ( **)(_QWORD))(*(_QWORD *)v10[0] + 8LL))(v10[0]); } return result; }
server: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R15,R9 MOV R14,R8 MOV R12,RCX MOV EBP,EDX MOV RBX,RDI CALL 0x0010a8c0 MOV dword ptr [RBX + 0x20],EBP LEA R13,[RBX + 0x28] LAB_0010fb7c: MOV RDI,R13 MOV RSI,R12 CALL 0x0010a8c0 MOV qword ptr [RSP + 0x40],R13 LEA R12,[RBX + 0x48] LAB_0010fb90: MOV RDI,R12 MOV RSI,R14 CALL 0x0010a8c0 LEA RDI,[RBX + 0x68] MOV qword ptr [RSP + 0x30],RDI XOR ESI,ESI CALL 0x0010f490 LEA R13,[RBX + 0x78] AND dword ptr [RBX + 0x90],0x0 LEA RAX,[RBX + 0x90] AND qword ptr [RBX + 0x98],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x78],XMM0 MOV qword ptr [RBX + 0xa0],RAX MOV qword ptr [RBX + 0xa8],RAX AND qword ptr [RBX + 0xb0],0x0 LEA RBP,[RBX + 0xb8] LAB_0010fbe9: MOV RDI,RBP MOV qword ptr [RSP + 0x38],R12 CALL 0x0011718e AND dword ptr [RBX + 0x150],0x0 AND qword ptr [RBX + 0x158],0x0 LEA RAX,[RBX + 0x150] MOV qword ptr [RBX + 0x160],RAX MOV qword ptr [RBX + 0x168],RAX AND qword ptr [RBX + 0x170],0x0 LEA R14,[RBX + 0x178] LAB_0010fc29: MOV RDI,R14 MOV RSI,R15 CALL 0x0010a8c0 MOV RSI,qword ptr [RSP + 0x80] LEA R15,[RBX + 0x198] LAB_0010fc43: MOV RDI,R15 CALL 0x0010a8c0 LEA RAX,[RBX + 0x1c0] AND dword ptr [RBX + 0x1c0],0x0 AND qword ptr [RBX + 0x1c8],0x0 MOV qword ptr [RBX + 0x1d0],RAX MOV qword ptr [RBX + 0x1d8],RAX AND qword ptr [RBX + 0x1e0],0x0 LEA RAX,[RBX + 0x1f0] AND dword ptr [RBX + 0x1f0],0x0 AND qword ptr [RBX + 0x1f8],0x0 MOV qword ptr [RBX + 0x200],RAX MOV qword ptr [RBX + 0x208],RAX AND qword ptr [RBX + 0x210],0x0 LEA RAX,[RBX + 0x220] AND dword ptr [RBX + 0x220],0x0 AND qword ptr [RBX + 0x228],0x0 MOV qword ptr [RBX + 0x230],RAX MOV qword ptr [RBX + 0x238],RAX AND qword ptr [RBX + 0x240],0x0 AND dword ptr [RBX + 0x250],0x0 AND qword ptr [RBX + 0x258],0x0 LEA RAX,[RBX + 0x250] MOV qword ptr [RBX + 0x260],RAX MOV qword ptr [RBX + 0x268],RAX LEA R12,[RBX + 0x2c8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x2b0],XMM0 MOVUPS xmmword ptr [RBX + 0x2a0],XMM0 MOVUPS xmmword ptr [RBX + 0x290],XMM0 MOVUPS xmmword ptr [RBX + 0x280],XMM0 MOVUPS xmmword ptr [RBX + 0x270],XMM0 MOV byte ptr [RBX + 0x2c0],0x0 CALL 0x0010a8b0 MOV ESI,EAX LAB_0010fd2e: MOV RDI,R12 CALL 0x00117218 LEA RAX,[RBX + 0x398] AND dword ptr [RBX + 0x398],0x0 AND qword ptr [RBX + 0x3a0],0x0 MOV qword ptr [RBX + 0x3a8],RAX MOV qword ptr [RBX + 0x3b0],RAX AND dword ptr [RBX + 0x3d0],0x0 AND qword ptr [RBX + 0x3d8],0x0 LEA RAX,[RBX + 0x3d0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x3b8],XMM0 MOV qword ptr [RBX + 0x3e0],RAX MOV qword ptr [RBX + 0x3e8],RAX AND qword ptr [RBX + 0x3f0],0x0 LAB_0010fd90: LEA RDI,[RSP + 0x20] CALL 0x001172be LAB_0010fd9a: MOV RAX,qword ptr [RSP + 0x20] AND qword ptr [RSP + 0x20],0x0 MOV RDI,qword ptr [R13] MOV qword ptr [R13],RAX TEST RDI,RDI JZ 0x0010fdc8 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0010fdc8 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010fdc8: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x0010fdc2) */ /* mcp::server::server(std::__cxx11::string const&, int, std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&, std::__cxx11::string const&) */ void __thiscall mcp::server::server(server *this,string *param_1,int param_2,string *param_3,string *param_4, string *param_5,string *param_6) { long *plVar1; uint uVar2; long local_58; std::__cxx11::string::string((string *)this,param_1); *(int *)(this + 0x20) = param_2; /* try { // try from 0010fb7c to 0010fb86 has its CatchHandler @ 0010ff13 */ std::__cxx11::string::string((string *)(this + 0x28),param_3); /* try { // try from 0010fb90 to 0010fb9a has its CatchHandler @ 0010ff0c */ std::__cxx11::string::string((string *)(this + 0x48),param_4); 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((_func_decltype_nullptr *)(this + 0x68)); *(int4 *)(this + 0x90) = 0; *(int8 *)(this + 0x98) = 0; *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(server **)(this + 0xa0) = this + 0x90; *(server **)(this + 0xa8) = this + 0x90; *(int8 *)(this + 0xb0) = 0; /* try { // try from 0010fbe9 to 0010fbf5 has its CatchHandler @ 0010feb4 */ event_dispatcher::event_dispatcher((event_dispatcher *)(this + 0xb8)); *(int4 *)(this + 0x150) = 0; *(int8 *)(this + 0x158) = 0; *(server **)(this + 0x160) = this + 0x150; *(server **)(this + 0x168) = this + 0x150; *(int8 *)(this + 0x170) = 0; /* try { // try from 0010fc29 to 0010fc33 has its CatchHandler @ 0010fe99 */ std::__cxx11::string::string((string *)(this + 0x178),param_5); /* try { // try from 0010fc43 to 0010fc4a has its CatchHandler @ 0010fe8a */ std::__cxx11::string::string((string *)(this + 0x198),param_6); *(int4 *)(this + 0x1c0) = 0; *(int8 *)(this + 0x1c8) = 0; *(server **)(this + 0x1d0) = this + 0x1c0; *(server **)(this + 0x1d8) = this + 0x1c0; *(int8 *)(this + 0x1e0) = 0; *(int4 *)(this + 0x1f0) = 0; *(int8 *)(this + 0x1f8) = 0; *(server **)(this + 0x200) = this + 0x1f0; *(server **)(this + 0x208) = this + 0x1f0; *(int8 *)(this + 0x210) = 0; *(int4 *)(this + 0x220) = 0; *(int8 *)(this + 0x228) = 0; *(server **)(this + 0x230) = this + 0x220; *(server **)(this + 0x238) = this + 0x220; *(int8 *)(this + 0x240) = 0; *(int4 *)(this + 0x250) = 0; *(int8 *)(this + 600) = 0; *(server **)(this + 0x260) = this + 0x250; *(server **)(this + 0x268) = this + 0x250; *(int8 *)(this + 0x2b0) = 0; *(int8 *)(this + 0x2b8) = 0; *(int8 *)(this + 0x2a0) = 0; *(int8 *)(this + 0x2a8) = 0; *(int8 *)(this + 0x290) = 0; *(int8 *)(this + 0x298) = 0; *(int8 *)(this + 0x280) = 0; *(int8 *)(this + 0x288) = 0; *(int8 *)(this + 0x270) = 0; *(int8 *)(this + 0x278) = 0; this[0x2c0] = (server)0x0; uVar2 = std::thread::hardware_concurrency(); /* try { // try from 0010fd2e to 0010fd35 has its CatchHandler @ 0010fe1e */ thread_pool::thread_pool((thread_pool *)(this + 0x2c8),(ulong)uVar2); *(int4 *)(this + 0x398) = 0; *(int8 *)(this + 0x3a0) = 0; *(server **)(this + 0x3a8) = this + 0x398; *(server **)(this + 0x3b0) = this + 0x398; *(int4 *)(this + 0x3d0) = 0; *(int8 *)(this + 0x3d8) = 0; *(int8 *)(this + 0x3b8) = 0; *(int8 *)(this + 0x3c0) = 0; *(server **)(this + 0x3e0) = this + 0x3d0; *(server **)(this + 1000) = this + 0x3d0; *(int8 *)(this + 0x3f0) = 0; /* try { // try from 0010fd90 to 0010fd99 has its CatchHandler @ 0010fdd7 */ std::make_unique<httplib::Server>(); plVar1 = *(long **)(this + 0x78); *(long *)(this + 0x78) = local_58; if (plVar1 != (long *)0x0) { (**(code **)(*plVar1 + 8))(); } return; }
46,267
CLI::Option::multi_option_policy(CLI::MultiOptionPolicy)
MikePodsytnik[P]TCRtrie/build_O2/_deps/cli11-src/include/CLI/impl/Option_inl.hpp
CLI11_INLINE Option *Option::multi_option_policy(MultiOptionPolicy value) { if(value != multi_option_policy_) { if(multi_option_policy_ == MultiOptionPolicy::Throw && expected_max_ == detail::expected_max_vector_size && expected_min_ > 1) { // this bizarre condition is to maintain backwards compatibility // with the previous behavior of expected_ with vectors expected_max_ = expected_min_; } multi_option_policy_ = value; current_option_state_ = option_state::parsing; } return this; }
O2
cpp
CLI::Option::multi_option_policy(CLI::MultiOptionPolicy): movq %rdi, %rax movb 0x27(%rdi), %cl cmpb %sil, %cl je 0x13b37 testb %cl, %cl jne 0x13b2c cmpl $0x20000000, 0x174(%rax) # imm = 0x20000000 jne 0x13b2c movl 0x170(%rax), %ecx cmpl $0x2, %ecx jl 0x13b2c movl %ecx, 0x174(%rax) movb %sil, 0x27(%rax) movb $0x0, 0x248(%rax) retq
_ZN3CLI6Option19multi_option_policyENS_17MultiOptionPolicyE: mov rax, rdi mov cl, [rdi+27h] cmp cl, sil jz short locret_13B37 test cl, cl jnz short loc_13B2C cmp dword ptr [rax+174h], 20000000h jnz short loc_13B2C mov ecx, [rax+170h] cmp ecx, 2 jl short loc_13B2C mov [rax+174h], ecx loc_13B2C: mov [rax+27h], sil mov byte ptr [rax+248h], 0 locret_13B37: retn
long long CLI::Option::multi_option_policy(long long a1, char a2) { long long result; // rax char v3; // cl int v4; // ecx result = a1; v3 = *(_BYTE *)(a1 + 39); if ( v3 != a2 ) { if ( !v3 && *(_DWORD *)(a1 + 372) == 0x20000000 ) { v4 = *(_DWORD *)(a1 + 368); if ( v4 >= 2 ) *(_DWORD *)(a1 + 372) = v4; } *(_BYTE *)(a1 + 39) = a2; *(_BYTE *)(a1 + 584) = 0; } return result; }
multi_option_policy: MOV RAX,RDI MOV CL,byte ptr [RDI + 0x27] CMP CL,SIL JZ 0x00113b37 TEST CL,CL JNZ 0x00113b2c CMP dword ptr [RAX + 0x174],0x20000000 JNZ 0x00113b2c MOV ECX,dword ptr [RAX + 0x170] CMP ECX,0x2 JL 0x00113b2c MOV dword ptr [RAX + 0x174],ECX LAB_00113b2c: MOV byte ptr [RAX + 0x27],SIL MOV byte ptr [RAX + 0x248],0x0 LAB_00113b37: RET
/* CLI::Option::multi_option_policy(CLI::MultiOptionPolicy) */ void __thiscall CLI::Option::multi_option_policy(Option *this,Option param_2) { if (this[0x27] != param_2) { if (((this[0x27] == (Option)0x0) && (*(int *)(this + 0x174) == 0x20000000)) && (1 < *(int *)(this + 0x170))) { *(int *)(this + 0x174) = *(int *)(this + 0x170); } this[0x27] = param_2; this[0x248] = (Option)0x0; } return; }
46,268
my_strnxfrm_unicode_full_nopad_bin
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_nopad_bin(CHARSET_INFO *cs, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags) { uchar *dst0= dst; uchar *de= dst + dstlen; dst+= my_strnxfrm_unicode_full_bin_internal(cs, dst, de, &nweights, src, src + srclen); DBUG_ASSERT(dst <= de); /* Safety */ if (dst < de && nweights && (flags & MY_STRXFRM_PAD_WITH_SPACE)) { size_t len= de - dst; set_if_smaller(len, nweights * 3); memset(dst, 0x00, len); dst+= len; } my_strxfrm_desc_and_reverse(dst0, dst, flags, 0); if ((flags & MY_STRXFRM_PAD_TO_MAXLEN) && dst < de) { memset(dst, 0x00, de - dst); dst= de; } return dst - dst0; }
O0
c
my_strnxfrm_unicode_full_nopad_bin: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x40(%rbp), %rdx movq -0x28(%rbp), %r8 movq -0x28(%rbp), %r9 addq -0x30(%rbp), %r9 leaq -0x1c(%rbp), %rcx callq 0x2d8a0 addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0x2dbc1 movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x2dc21 cmpl $0x0, -0x1c(%rbp) je 0x2dc21 movl 0x10(%rbp), %eax andl $0x40, %eax cmpl $0x0, %eax je 0x2dc21 movq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax imull $0x3, -0x1c(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jbe 0x2dc04 imull $0x3, -0x1c(%rbp), %eax movl %eax, %eax movq %rax, -0x48(%rbp) jmp 0x2dc06 movq -0x10(%rbp), %rdi movq -0x48(%rbp), %rdx xorl %esi, %esi callq 0x24180 movq -0x48(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl 0x10(%rbp), %edx xorl %ecx, %ecx callq 0x2c970 movl 0x10(%rbp), %eax andl $0x80, %eax cmpl $0x0, %eax je 0x2dc68 movq -0x10(%rbp), %rax cmpq -0x40(%rbp), %rax jae 0x2dc68 movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx xorl %esi, %esi callq 0x24180 movq -0x40(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax addq $0x50, %rsp popq %rbp retq nopl (%rax)
my_strnxfrm_unicode_full_nopad_bin: push rbp mov rbp, rsp sub rsp, 50h mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] mov [rbp+var_38], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_40] mov r8, [rbp+var_28] mov r9, [rbp+var_28] add r9, [rbp+var_30] lea rcx, [rbp+var_1C] call my_strnxfrm_unicode_full_bin_internal add rax, [rbp+var_10] mov [rbp+var_10], rax jmp short $+2 loc_2DBC1: mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_2DC21 cmp [rbp+var_1C], 0 jz short loc_2DC21 mov eax, [rbp+arg_0] and eax, 40h cmp eax, 0 jz short loc_2DC21 mov rax, [rbp+var_40] mov rcx, [rbp+var_10] sub rax, rcx mov [rbp+var_48], rax mov rax, [rbp+var_48] imul ecx, [rbp+var_1C], 3 mov ecx, ecx cmp rax, rcx jbe short loc_2DC04 imul eax, [rbp+var_1C], 3 mov eax, eax mov [rbp+var_48], rax loc_2DC04: jmp short $+2 loc_2DC06: mov rdi, [rbp+var_10] mov rdx, [rbp+var_48] xor esi, esi call _memset mov rax, [rbp+var_48] add rax, [rbp+var_10] mov [rbp+var_10], rax loc_2DC21: mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+arg_0] xor ecx, ecx call my_strxfrm_desc_and_reverse mov eax, [rbp+arg_0] and eax, 80h cmp eax, 0 jz short loc_2DC68 mov rax, [rbp+var_10] cmp rax, [rbp+var_40] jnb short loc_2DC68 mov rdi, [rbp+var_10] mov rdx, [rbp+var_40] mov rax, [rbp+var_10] sub rdx, rax xor esi, esi call _memset mov rax, [rbp+var_40] mov [rbp+var_10], rax loc_2DC68: mov rax, [rbp+var_10] mov rcx, [rbp+var_38] sub rax, rcx add rsp, 50h pop rbp retn
unsigned long long my_strnxfrm_unicode_full_nopad_bin( long long a1, _BYTE *a2, long long a3, int a4, long long a5, long long a6, unsigned int a7) { _BYTE *v7; // rax unsigned long long v9; // [rsp+8h] [rbp-48h] unsigned long long v10; // [rsp+10h] [rbp-40h] int v11; // [rsp+34h] [rbp-1Ch] BYREF long long v12; // [rsp+38h] [rbp-18h] unsigned long long v13; // [rsp+40h] [rbp-10h] long long v14; // [rsp+48h] [rbp-8h] v14 = a1; v13 = (unsigned long long)a2; v12 = a3; v11 = a4; v10 = (unsigned long long)&a2[a3]; v7 = my_strnxfrm_unicode_full_bin_internal(a1, a2, (unsigned long long)&a2[a3], &v11, a5, a6 + a5); v13 += (unsigned long long)v7; if ( v13 < v10 && v11 && (a7 & 0x40) != 0 ) { v9 = v10 - v13; if ( v10 - v13 > (unsigned int)(3 * v11) ) v9 = (unsigned int)(3 * v11); memset(v13, 0LL, v9); v13 += v9; } my_strxfrm_desc_and_reverse(a2, v13, a7, 0); if ( (a7 & 0x80) != 0 && v13 < v10 ) { memset(v13, 0LL, v10 - v13); v13 = v10; } return v13 - (_QWORD)a2; }
my_strnxfrm_unicode_full_nopad_bin: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x28] MOV R9,qword ptr [RBP + -0x28] ADD R9,qword ptr [RBP + -0x30] LEA RCX,[RBP + -0x1c] CALL 0x0012d8a0 ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX JMP 0x0012dbc1 LAB_0012dbc1: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0012dc21 CMP dword ptr [RBP + -0x1c],0x0 JZ 0x0012dc21 MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x40 CMP EAX,0x0 JZ 0x0012dc21 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] IMUL ECX,dword ptr [RBP + -0x1c],0x3 MOV ECX,ECX CMP RAX,RCX JBE 0x0012dc04 IMUL EAX,dword ptr [RBP + -0x1c],0x3 MOV EAX,EAX MOV qword ptr [RBP + -0x48],RAX LAB_0012dc04: JMP 0x0012dc06 LAB_0012dc06: MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x48] XOR ESI,ESI CALL 0x00124180 MOV RAX,qword ptr [RBP + -0x48] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x10],RAX LAB_0012dc21: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + 0x10] XOR ECX,ECX CALL 0x0012c970 MOV EAX,dword ptr [RBP + 0x10] AND EAX,0x80 CMP EAX,0x0 JZ 0x0012dc68 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x40] JNC 0x0012dc68 MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX XOR ESI,ESI CALL 0x00124180 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x10],RAX LAB_0012dc68: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX ADD RSP,0x50 POP RBP RET
long my_strnxfrm_unicode_full_nopad_bin (int8 param_1,long param_2,long param_3,int param_4,long param_5,long param_6, uint param_7) { void *pvVar1; long lVar2; size_t local_50; int local_24; long local_20; void *local_18; int8 local_10; pvVar1 = (void *)(param_2 + param_3); local_24 = param_4; local_20 = param_3; local_18 = (void *)param_2; local_10 = param_1; lVar2 = my_strnxfrm_unicode_full_bin_internal (param_1,param_2,pvVar1,&local_24,param_5,param_5 + param_6); local_18 = (void *)(lVar2 + (long)local_18); if (((local_18 < pvVar1) && (local_24 != 0)) && ((param_7 & 0x40) != 0)) { local_50 = (long)pvVar1 - (long)local_18; if ((uint)(local_24 * 3) < local_50) { local_50 = (size_t)(uint)(local_24 * 3); } memset(local_18,0,local_50); local_18 = (void *)(local_50 + (long)local_18); } my_strxfrm_desc_and_reverse(param_2,local_18,param_7,0); if (((param_7 & 0x80) != 0) && (local_18 < pvVar1)) { memset(local_18,0,(long)pvVar1 - (long)local_18); local_18 = pvVar1; } return (long)local_18 - param_2; }
46,269
diff
eloqsql/strings/dtoa.c
static Bigint *diff(Bigint *a, Bigint *b, Stack_alloc *alloc) { Bigint *c; int i, wa, wb; ULong *xa, *xae, *xb, *xbe, *xc; ULLong borrow, y; i= cmp(a,b); if (!i) { c= Balloc(0, alloc); c->wds= 1; c->p.x[0]= 0; return c; } if (i < 0) { c= a; a= b; b= c; i= 1; } else i= 0; c= Balloc(a->k, alloc); c->sign= i; wa= a->wds; xa= a->p.x; xae= xa + wa; wb= b->wds; xb= b->p.x; xbe= xb + wb; xc= c->p.x; borrow= 0; do { y= (ULLong)*xa++ - *xb++ - borrow; borrow= y >> 32 & (ULong)1; *xc++= (ULong) (y & FFFFFFFF); } while (xb < xbe); while (xa < xae) { y= *xa++ - borrow; borrow= y >> 32 & (ULong)1; *xc++= (ULong) (y & FFFFFFFF); } while (!*--xc) wa--; c->wds= wa; return c; }
O3
c
diff: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0x14(%rdi), %eax movslq 0x14(%rsi), %rdi subl %edi, %eax jne 0x5757b movq (%rbx), %rax leaq (%rax,%rdi,4), %rcx movq (%rsi), %r8 leaq (%r8,%rdi,4), %rdi addq $-0x4, %rdi movl -0x4(%rcx), %r8d movl (%rdi), %r9d cmpl %r9d, %r8d jne 0x57571 addq $-0x4, %rcx addq $-0x4, %rdi cmpq %rax, %rcx ja 0x57539 xorl %edi, %edi movq %rdx, %rsi callq 0x56ff8 movl $0x1, 0x14(%rax) movq (%rax), %rcx movl $0x0, (%rcx) jmp 0x57617 xorl %eax, %eax cmpl %r9d, %r8d sbbl %eax, %eax orl $0x1, %eax movl %eax, %r14d shrl $0x1f, %r14d testl %eax, %eax movq %rsi, %r15 cmovsq %rbx, %r15 cmovsq %rsi, %rbx movl 0x8(%rbx), %edi movq %rdx, %rsi callq 0x56ff8 movl %r14d, 0x10(%rax) movslq 0x14(%rbx), %rcx movq (%rbx), %r8 movslq 0x14(%r15), %rdx movq (%r15), %r9 leaq (%r9,%rdx,4), %r10 movq (%rax), %rdx xorl %edi, %edi movq %r8, %rsi movl (%r9), %r11d addq %rdi, %r11 movl (%rsi), %edi addq $0x4, %rsi addq $0x4, %r9 subq %r11, %rdi movl %edi, (%rdx) shrq $0x20, %rdi andl $0x1, %edi addq $0x4, %rdx cmpq %r10, %r9 jb 0x575b8 leaq (%r8,%rcx,4), %r8 cmpq %r8, %rsi jae 0x57603 movl (%rsi), %r9d addq $0x4, %rsi subq %rdi, %r9 movq %r9, %rdi shrq $0x20, %rdi andl $0x1, %edi movl %r9d, (%rdx) addq $0x4, %rdx jmp 0x575e1 incl %ecx addq $-0x4, %rdx decl %ecx cmpl $0x0, (%rdx) leaq -0x4(%rdx), %rdx je 0x57609 movl %ecx, 0x14(%rax) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
diff: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov eax, [rdi+14h] movsxd rdi, dword ptr [rsi+14h] sub eax, edi jnz short loc_5757B mov rax, [rbx] lea rcx, [rax+rdi*4] mov r8, [rsi] lea rdi, [r8+rdi*4] add rdi, 0FFFFFFFFFFFFFFFCh loc_57539: mov r8d, [rcx-4] mov r9d, [rdi] cmp r8d, r9d jnz short loc_57571 add rcx, 0FFFFFFFFFFFFFFFCh add rdi, 0FFFFFFFFFFFFFFFCh cmp rcx, rax ja short loc_57539 xor edi, edi mov rsi, rdx call Balloc mov dword ptr [rax+14h], 1 mov rcx, [rax] mov dword ptr [rcx], 0 jmp loc_57617 loc_57571: xor eax, eax cmp r8d, r9d sbb eax, eax or eax, 1 loc_5757B: mov r14d, eax shr r14d, 1Fh test eax, eax mov r15, rsi cmovs r15, rbx cmovs rbx, rsi mov edi, [rbx+8] mov rsi, rdx call Balloc mov [rax+10h], r14d movsxd rcx, dword ptr [rbx+14h] mov r8, [rbx] movsxd rdx, dword ptr [r15+14h] mov r9, [r15] lea r10, [r9+rdx*4] mov rdx, [rax] xor edi, edi mov rsi, r8 loc_575B8: mov r11d, [r9] add r11, rdi mov edi, [rsi] add rsi, 4 add r9, 4 sub rdi, r11 mov [rdx], edi shr rdi, 20h and edi, 1 add rdx, 4 cmp r9, r10 jb short loc_575B8 lea r8, [r8+rcx*4] loc_575E1: cmp rsi, r8 jnb short loc_57603 mov r9d, [rsi] add rsi, 4 sub r9, rdi mov rdi, r9 shr rdi, 20h and edi, 1 mov [rdx], r9d add rdx, 4 jmp short loc_575E1 loc_57603: inc ecx add rdx, 0FFFFFFFFFFFFFFFCh loc_57609: dec ecx cmp dword ptr [rdx], 0 lea rdx, [rdx-4] jz short loc_57609 mov [rax+14h], ecx loc_57617: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long diff(unsigned int **a1, unsigned int **a2, long long a3) { unsigned int **v3; // rbx int v4; // eax long long v5; // rdi int v6; // eax unsigned long long v7; // rcx unsigned int *i; // rdi unsigned int v9; // r8d long long result; // rax unsigned int v11; // r14d unsigned int **v12; // r15 long long v13; // rcx unsigned int *v14; // r8 unsigned int *v15; // r9 unsigned long long v16; // r10 _DWORD *v17; // rdx long long v18; // rdi unsigned int *v19; // rsi long long v20; // r11 long long v21; // rdi long long v22; // rdi unsigned long long v23; // r8 long long v24; // r9 long long v25; // r9 int v26; // ecx _DWORD *v27; // rdx v3 = a1; v4 = *((_DWORD *)a1 + 5); v5 = *((int *)a2 + 5); v6 = v4 - v5; if ( !v6 ) { v7 = (unsigned long long)&(*v3)[v5]; for ( i = &(*a2)[v5 - 1]; ; --i ) { v9 = *(_DWORD *)(v7 - 4); if ( v9 != *i ) break; v7 -= 4LL; if ( v7 <= (unsigned long long)*v3 ) { result = Balloc(0, a3); *(_DWORD *)(result + 20) = 1; **(_DWORD **)result = 0; return result; } } v6 = v9 < *i ? -1 : 1; } v11 = (unsigned int)v6 >> 31; v12 = a2; if ( v6 < 0 ) { v12 = v3; v3 = a2; } result = Balloc(*((_DWORD *)v3 + 2), a3); *(_DWORD *)(result + 16) = v11; v13 = *((int *)v3 + 5); v14 = *v3; v15 = *v12; v16 = (unsigned long long)&(*v12)[*((int *)v12 + 5)]; v17 = *(_DWORD **)result; v18 = 0LL; v19 = *v3; do { v20 = v18 + *v15; v21 = *v19++; ++v15; v22 = v21 - v20; *v17 = v22; v18 = BYTE4(v22) & 1; ++v17; } while ( (unsigned long long)v15 < v16 ); v23 = (unsigned long long)&v14[v13]; while ( (unsigned long long)v19 < v23 ) { v24 = *v19++; v25 = v24 - v18; v18 = BYTE4(v25) & 1; *v17++ = v25; } v26 = v13 + 1; v27 = v17 - 1; do --v26; while ( *v27-- == 0 ); *(_DWORD *)(result + 20) = v26; return result; }
diff: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0x14] MOVSXD RDI,dword ptr [RSI + 0x14] SUB EAX,EDI JNZ 0x0015757b MOV RAX,qword ptr [RBX] LEA RCX,[RAX + RDI*0x4] MOV R8,qword ptr [RSI] LEA RDI,[R8 + RDI*0x4] ADD RDI,-0x4 LAB_00157539: MOV R8D,dword ptr [RCX + -0x4] MOV R9D,dword ptr [RDI] CMP R8D,R9D JNZ 0x00157571 ADD RCX,-0x4 ADD RDI,-0x4 CMP RCX,RAX JA 0x00157539 XOR EDI,EDI MOV RSI,RDX CALL 0x00156ff8 MOV dword ptr [RAX + 0x14],0x1 MOV RCX,qword ptr [RAX] MOV dword ptr [RCX],0x0 JMP 0x00157617 LAB_00157571: XOR EAX,EAX CMP R8D,R9D SBB EAX,EAX OR EAX,0x1 LAB_0015757b: MOV R14D,EAX SHR R14D,0x1f TEST EAX,EAX MOV R15,RSI CMOVS R15,RBX CMOVS RBX,RSI MOV EDI,dword ptr [RBX + 0x8] MOV RSI,RDX CALL 0x00156ff8 MOV dword ptr [RAX + 0x10],R14D MOVSXD RCX,dword ptr [RBX + 0x14] MOV R8,qword ptr [RBX] MOVSXD RDX,dword ptr [R15 + 0x14] MOV R9,qword ptr [R15] LEA R10,[R9 + RDX*0x4] MOV RDX,qword ptr [RAX] XOR EDI,EDI MOV RSI,R8 LAB_001575b8: MOV R11D,dword ptr [R9] ADD R11,RDI MOV EDI,dword ptr [RSI] ADD RSI,0x4 ADD R9,0x4 SUB RDI,R11 MOV dword ptr [RDX],EDI SHR RDI,0x20 AND EDI,0x1 ADD RDX,0x4 CMP R9,R10 JC 0x001575b8 LEA R8,[R8 + RCX*0x4] LAB_001575e1: CMP RSI,R8 JNC 0x00157603 MOV R9D,dword ptr [RSI] ADD RSI,0x4 SUB R9,RDI MOV RDI,R9 SHR RDI,0x20 AND EDI,0x1 MOV dword ptr [RDX],R9D ADD RDX,0x4 JMP 0x001575e1 LAB_00157603: INC ECX ADD RDX,-0x4 LAB_00157609: DEC ECX CMP dword ptr [RDX],0x0 LEA RDX,[RDX + -0x4] JZ 0x00157609 MOV dword ptr [RAX + 0x14],ECX LAB_00157617: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void diff(ulong *param_1,ulong *param_2,int8 param_3) { uint uVar1; uint *puVar2; uint uVar3; int8 *puVar4; int iVar5; ulong uVar6; int *piVar7; ulong *puVar8; uint *puVar9; uint *puVar10; long lVar11; uint *puVar12; iVar5 = *(int *)((long)param_2 + 0x14); uVar3 = *(int *)((long)param_1 + 0x14) - iVar5; if (uVar3 == 0) { uVar6 = *param_1 + (long)iVar5 * 4; puVar10 = (uint *)(*param_2 + (long)iVar5 * 4); do { puVar10 = puVar10 + -1; if (*(uint *)(uVar6 - 4) != *puVar10) { uVar3 = -(uint)(*(uint *)(uVar6 - 4) < *puVar10) | 1; goto LAB_0015757b; } uVar6 = uVar6 - 4; } while (*param_1 < uVar6); puVar4 = (int8 *)Balloc(0,param_3); *(int4 *)((long)puVar4 + 0x14) = 1; *(int4 *)*puVar4 = 0; } else { LAB_0015757b: puVar8 = param_1; if ((int)uVar3 < 0) { puVar8 = param_2; param_2 = param_1; } puVar4 = (int8 *)Balloc((int)puVar8[1],param_3); *(uint *)(puVar4 + 2) = uVar3 >> 0x1f; iVar5 = *(int *)((long)puVar8 + 0x14); puVar2 = (uint *)*puVar8; puVar12 = (uint *)*param_2; puVar10 = puVar12 + *(int *)((long)param_2 + 0x14); piVar7 = (int *)*puVar4; uVar6 = 0; puVar9 = puVar2; do { uVar3 = *puVar12; uVar1 = *puVar9; puVar9 = puVar9 + 1; puVar12 = puVar12 + 1; lVar11 = (ulong)uVar1 - (uVar3 + uVar6); *piVar7 = (int)lVar11; uVar6 = (ulong)((uint)((ulong)lVar11 >> 0x20) & 1); piVar7 = piVar7 + 1; } while (puVar12 < puVar10); for (; puVar9 < puVar2 + iVar5; puVar9 = puVar9 + 1) { lVar11 = *puVar9 - uVar6; uVar6 = (ulong)((uint)((ulong)lVar11 >> 0x20) & 1); *piVar7 = (int)lVar11; piVar7 = piVar7 + 1; } iVar5 = iVar5 + 1; do { piVar7 = piVar7 + -1; iVar5 = iVar5 + -1; } while (*piVar7 == 0); *(int *)((long)puVar4 + 0x14) = iVar5; } return; }
46,270
testing::TestSuite::~TestSuite()
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest.cc
TestSuite::~TestSuite() { // Deletes every Test in the collection. ForEach(test_info_list_, internal::Delete<TestInfo>); }
O1
cpp
testing::TestSuite::~TestSuite(): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x3668e(%rip), %rax # 0x58048 movq %rax, (%rdi) movq 0x30(%rdi), %r15 movq 0x38(%rdi), %r12 cmpq %r12, %r15 je 0x219ed movq (%r15), %r14 testq %r14, %r14 je 0x219e7 movq %r14, %rdi callq 0x20fcc movl $0x110, %esi # imm = 0x110 movq %r14, %rdi callq 0x84e0 addq $0x8, %r15 jmp 0x219c5 leaq 0x88(%rbx), %r14 leaq 0xd8(%rbx), %rdi callq 0x33ed2 leaq 0xc0(%rbx), %rdi callq 0x33f02 movq %r14, %rdi callq 0x33f32 movq 0x48(%rbx), %rdi testq %rdi, %rdi je 0x21a29 movq 0x58(%rbx), %rsi subq %rdi, %rsi callq 0x84e0 movq 0x30(%rbx), %rdi testq %rdi, %rdi je 0x21a3e movq 0x40(%rbx), %rsi subq %rdi, %rsi callq 0x84e0 movq 0x28(%rbx), %rsi testq %rsi, %rsi je 0x21a50 leaq 0x28(%rbx), %rdi callq 0x3b7c6 movq $0x0, 0x28(%rbx) movq 0x8(%rbx), %rdi addq $0x18, %rbx cmpq %rbx, %rdi je 0x21a7b movq (%rbx), %rsi incq %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x84e0 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN7testing9TestSuiteD2Ev: push r15; Alternative name is 'testing::TestSuite::~TestSuite()' push r14 push r12 push rbx push rax mov rbx, rdi lea rax, off_58048 mov [rdi], rax mov r15, [rdi+30h] mov r12, [rdi+38h] loc_219C5: cmp r15, r12 jz short loc_219ED mov r14, [r15] test r14, r14 jz short loc_219E7 mov rdi, r14; this call _ZN7testing8TestInfoD2Ev; testing::TestInfo::~TestInfo() mov esi, 110h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) loc_219E7: add r15, 8 jmp short loc_219C5 loc_219ED: lea r14, [rbx+88h] lea rdi, [rbx+0D8h] call _ZNSt6vectorIN7testing12TestPropertyESaIS1_EED2Ev; std::vector<testing::TestProperty>::~vector() lea rdi, [rbx+0C0h] call _ZNSt6vectorIN7testing14TestPartResultESaIS1_EED2Ev; std::vector<testing::TestPartResult>::~vector() mov rdi, r14; this call _ZN7testing8internal5MutexD2Ev; testing::internal::Mutex::~Mutex() mov rdi, [rbx+48h]; void * test rdi, rdi jz short loc_21A29 mov rsi, [rbx+58h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_21A29: mov rdi, [rbx+30h]; void * test rdi, rdi jz short loc_21A3E mov rsi, [rbx+40h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_21A3E: mov rsi, [rbx+28h] test rsi, rsi jz short loc_21A50 lea rdi, [rbx+28h] call _ZNKSt14default_deleteIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS6_; std::default_delete<std::string const>::operator()(std::string const*) loc_21A50: mov qword ptr [rbx+28h], 0 mov rdi, [rbx+8]; void * add rbx, 18h cmp rdi, rbx jz short loc_21A7B mov rsi, [rbx] inc rsi; unsigned __int64 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp __ZdlPvm; operator delete(void *,ulong) loc_21A7B: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
void testing::TestSuite::~TestSuite(testing::TestSuite *this) { testing::TestInfo **v2; // r15 testing::TestInfo **v3; // r12 testing::TestInfo *v4; // r14 void *v5; // rdi void *v6; // rdi _QWORD *v7; // rdi _QWORD *v8; // rbx *(_QWORD *)this = off_58048; v2 = (testing::TestInfo **)*((_QWORD *)this + 6); v3 = (testing::TestInfo **)*((_QWORD *)this + 7); while ( v2 != v3 ) { v4 = *v2; if ( *v2 ) { testing::TestInfo::~TestInfo(*v2); operator delete(v4, 0x110uLL); } ++v2; } std::vector<testing::TestProperty>::~vector((char *)this + 216); std::vector<testing::TestPartResult>::~vector((char *)this + 192); testing::internal::Mutex::~Mutex((testing::TestSuite *)((char *)this + 136)); v5 = (void *)*((_QWORD *)this + 9); if ( v5 ) operator delete(v5, *((_QWORD *)this + 11) - (_QWORD)v5); v6 = (void *)*((_QWORD *)this + 6); if ( v6 ) operator delete(v6, *((_QWORD *)this + 8) - (_QWORD)v6); if ( *((_QWORD *)this + 5) ) std::default_delete<std::string const>::operator()((char *)this + 40); *((_QWORD *)this + 5) = 0LL; v7 = (_QWORD *)*((_QWORD *)this + 1); v8 = (_QWORD *)((char *)this + 24); if ( v7 != v8 ) operator delete(v7, *v8 + 1LL); }
~TestSuite: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0x158048] MOV qword ptr [RDI],RAX MOV R15,qword ptr [RDI + 0x30] MOV R12,qword ptr [RDI + 0x38] LAB_001219c5: CMP R15,R12 JZ 0x001219ed MOV R14,qword ptr [R15] TEST R14,R14 JZ 0x001219e7 MOV RDI,R14 CALL 0x00120fcc MOV ESI,0x110 MOV RDI,R14 CALL 0x001084e0 LAB_001219e7: ADD R15,0x8 JMP 0x001219c5 LAB_001219ed: LEA R14,[RBX + 0x88] LEA RDI,[RBX + 0xd8] CALL 0x00133ed2 LEA RDI,[RBX + 0xc0] CALL 0x00133f02 MOV RDI,R14 CALL 0x00133f32 MOV RDI,qword ptr [RBX + 0x48] TEST RDI,RDI JZ 0x00121a29 MOV RSI,qword ptr [RBX + 0x58] SUB RSI,RDI CALL 0x001084e0 LAB_00121a29: MOV RDI,qword ptr [RBX + 0x30] TEST RDI,RDI JZ 0x00121a3e MOV RSI,qword ptr [RBX + 0x40] SUB RSI,RDI CALL 0x001084e0 LAB_00121a3e: MOV RSI,qword ptr [RBX + 0x28] TEST RSI,RSI JZ 0x00121a50 LEA RDI,[RBX + 0x28] CALL 0x0013b7c6 LAB_00121a50: MOV qword ptr [RBX + 0x28],0x0 MOV RDI,qword ptr [RBX + 0x8] ADD RBX,0x18 CMP RDI,RBX JZ 0x00121a7b MOV RSI,qword ptr [RBX] INC RSI ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x001084e0 LAB_00121a7b: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* testing::TestSuite::~TestSuite() */ void __thiscall testing::TestSuite::~TestSuite(TestSuite *this) { int8 *puVar1; TestInfo *this_00; void *pvVar2; int8 *puVar3; *(int ***)this = &PTR__TestSuite_00158048; puVar1 = *(int8 **)(this + 0x38); for (puVar3 = *(int8 **)(this + 0x30); puVar3 != puVar1; puVar3 = puVar3 + 1) { this_00 = (TestInfo *)*puVar3; if (this_00 != (TestInfo *)0x0) { TestInfo::~TestInfo(this_00); operator_delete(this_00,0x110); } } std::vector<testing::TestProperty,std::allocator<testing::TestProperty>>::~vector ((vector<testing::TestProperty,std::allocator<testing::TestProperty>> *)(this + 0xd8)); std::vector<testing::TestPartResult,std::allocator<testing::TestPartResult>>::~vector ((vector<testing::TestPartResult,std::allocator<testing::TestPartResult>> *) (this + 0xc0)); internal::Mutex::~Mutex((Mutex *)(this + 0x88)); pvVar2 = *(void **)(this + 0x48); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x58) - (long)pvVar2); } pvVar2 = *(void **)(this + 0x30); if (pvVar2 != (void *)0x0) { operator_delete(pvVar2,*(long *)(this + 0x40) - (long)pvVar2); } if (*(string **)(this + 0x28) != (string *)0x0) { std::default_delete<std::__cxx11::string_const>::operator() ((default_delete<std::__cxx11::string_const> *)(this + 0x28),*(string **)(this + 0x28) ); } *(int8 *)(this + 0x28) = 0; if (*(TestSuite **)(this + 8) != this + 0x18) { operator_delete(*(TestSuite **)(this + 8),*(long *)(this + 0x18) + 1); return; } return; }
46,271
my_uni_utf16le
eloqsql/strings/ctype-ucs2.c
static int my_uni_utf16le(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { uint32 first, second, total; if (wc < MY_UTF16_SURROGATE_HIGH_FIRST || (wc > MY_UTF16_SURROGATE_LOW_LAST && wc <= 0xFFFF)) { if (s + 2 > e) return MY_CS_TOOSMALL2; int2store(s, wc); return 2; /* [0000-D7FF,E000-FFFF] */ } if (wc < 0xFFFF || wc > 0x10FFFF) return MY_CS_ILUNI; /* [D800-DFFF,10FFFF+] */ if (s + 4 > e) return MY_CS_TOOSMALL4; wc-= 0x10000; first= (0xD800 | ((wc >> 10) & 0x3FF)); second= (0xDC00 | (wc & 0x3FF)); total= first | (second << 16); int4store(s, total); return 4; /* [010000-10FFFF] */ }
O0
c
my_uni_utf16le: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0xd800, -0x18(%rbp) # imm = 0xD800 jb 0x92b82 cmpq $0xdfff, -0x18(%rbp) # imm = 0xDFFF jbe 0x92bc0 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x92bc0 movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x92b9c movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x92c52 jmp 0x92b9e movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax movw %ax, %cx movq -0x40(%rbp), %rax movw %cx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x92c52 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF jb 0x92bd4 cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF jbe 0x92bdd movl $0x0, -0x4(%rbp) jmp 0x92c52 movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x92bf4 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x92c52 movq -0x18(%rbp), %rax subq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax shrq $0xa, %rax andq $0x3ff, %rax # imm = 0x3FF orq $0xd800, %rax # imm = 0xD800 movl %eax, -0x2c(%rbp) movq -0x18(%rbp), %rax andq $0x3ff, %rax # imm = 0x3FF orq $0xdc00, %rax # imm = 0xDC00 movl %eax, -0x30(%rbp) movl -0x2c(%rbp), %eax movl -0x30(%rbp), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) movl -0x34(%rbp), %ecx movq -0x48(%rbp), %rax movl %ecx, (%rax) movl $0x4, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_uni_utf16le: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_18], 0D800h jb short loc_92B82 cmp [rbp+var_18], 0DFFFh jbe short loc_92BC0 cmp [rbp+var_18], 0FFFFh ja short loc_92BC0 loc_92B82: mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_92B9C mov [rbp+var_4], 0FFFFFF9Ah jmp loc_92C52 loc_92B9C: jmp short $+2 loc_92B9E: mov rax, [rbp+var_20] mov [rbp+var_40], rax mov rax, [rbp+var_18] mov cx, ax mov rax, [rbp+var_40] mov [rax], cx mov [rbp+var_4], 2 jmp loc_92C52 loc_92BC0: cmp [rbp+var_18], 0FFFFh jb short loc_92BD4 cmp [rbp+var_18], offset unk_10FFFF jbe short loc_92BDD loc_92BD4: mov [rbp+var_4], 0 jmp short loc_92C52 loc_92BDD: mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_92BF4 mov [rbp+var_4], 0FFFFFF98h jmp short loc_92C52 loc_92BF4: mov rax, [rbp+var_18] sub rax, 10000h mov [rbp+var_18], rax mov rax, [rbp+var_18] shr rax, 0Ah and rax, 3FFh or rax, 0D800h mov [rbp+var_2C], eax mov rax, [rbp+var_18] and rax, 3FFh or rax, 0DC00h mov [rbp+var_30], eax mov eax, [rbp+var_2C] mov ecx, [rbp+var_30] shl ecx, 10h or eax, ecx mov [rbp+var_34], eax mov rax, [rbp+var_20] mov [rbp+var_48], rax mov ecx, [rbp+var_34] mov rax, [rbp+var_48] mov [rax], ecx mov [rbp+var_4], 4 loc_92C52: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf16le(long long a1, unsigned long long a2, _DWORD *a3, unsigned long long a4) { if ( a2 >= 0xD800 && (a2 <= 0xDFFF || a2 > 0xFFFF) ) { if ( a2 >= 0xFFFF && a2 <= (unsigned long long)&unk_10FFFF ) { if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = ((a2 & 0x3FF | 0xDC00) << 16) | ((a2 - 0x10000) >> 10) & 0x3FF | 0xD800; return 4; } else { return (unsigned int)-104; } } else { return 0; } } else if ( (unsigned long long)a3 + 2 <= a4 ) { *(_WORD *)a3 = a2; return 2; } else { return (unsigned int)-102; } }
my_uni_utf16le: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RBP + -0x18],0xd800 JC 0x00192b82 CMP qword ptr [RBP + -0x18],0xdfff JBE 0x00192bc0 CMP qword ptr [RBP + -0x18],0xffff JA 0x00192bc0 LAB_00192b82: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00192b9c MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00192c52 LAB_00192b9c: JMP 0x00192b9e LAB_00192b9e: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CX,AX MOV RAX,qword ptr [RBP + -0x40] MOV word ptr [RAX],CX MOV dword ptr [RBP + -0x4],0x2 JMP 0x00192c52 LAB_00192bc0: CMP qword ptr [RBP + -0x18],0xffff JC 0x00192bd4 CMP qword ptr [RBP + -0x18],0x10ffff JBE 0x00192bdd LAB_00192bd4: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00192c52 LAB_00192bdd: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00192bf4 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x00192c52 LAB_00192bf4: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa AND RAX,0x3ff OR RAX,0xd800 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x3ff OR RAX,0xdc00 MOV dword ptr [RBP + -0x30],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,dword ptr [RBP + -0x30] SHL ECX,0x10 OR EAX,ECX MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x4 LAB_00192c52: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf16le(int8 param_1,ulong param_2,uint *param_3,uint *param_4) { int4 local_c; if ((param_2 < 0xd800) || ((0xdfff < param_2 && (param_2 < 0x10000)))) { if (param_4 < (uint *)((long)param_3 + 2)) { local_c = 0xffffff9a; } else { *(short *)param_3 = (short)param_2; local_c = 2; } } else if ((param_2 < 0xffff) || (0x10ffff < param_2)) { local_c = 0; } else if (param_4 < param_3 + 1) { local_c = 0xffffff98; } else { *param_3 = (uint)(param_2 - 0x10000 >> 10) & 0x3ff | 0xd800 | ((uint)(param_2 - 0x10000) & 0x3ff | 0xdc00) << 0x10; local_c = 4; } return local_c; }
46,272
get_field
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_account_proof.c
static eth_account_field_t get_field(verify_ctx_t* ctx) { if (ctx->method && strcmp(ctx->method, "eth_getBalance") == 0) return ETH_ACCOUNT_BALANCE; if (ctx->method && strcmp(ctx->method, "eth_getStorageAt") == 0) return ETH_ACCOUNT_STORAGE_HASH; if (ctx->method && strcmp(ctx->method, "eth_getCode") == 0) return ETH_ACCOUNT_CODE_HASH; if (ctx->method && strcmp(ctx->method, "eth_getTransactionCount") == 0) return ETH_ACCOUNT_NONCE; if (ctx->method && strcmp(ctx->method, "eth_getProof") == 0) return ETH_ACCOUNT_PROOF; return ETH_ACCOUNT_NONE; }
O0
c
get_field: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x25bca movq -0x10(%rbp), %rax movq (%rax), %rdi leaq 0xb46a5(%rip), %rsi # 0xda259 callq 0x23320 cmpl $0x0, %eax jne 0x25bca movl $0x2, -0x4(%rbp) jmp 0x25c80 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x25bf8 movq -0x10(%rbp), %rax movq (%rax), %rdi leaq 0xb46de(%rip), %rsi # 0xda2c0 callq 0x23320 cmpl $0x0, %eax jne 0x25bf8 movl $0x3, -0x4(%rbp) jmp 0x25c80 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x25c23 movq -0x10(%rbp), %rax movq (%rax), %rdi leaq 0xb4680(%rip), %rsi # 0xda290 callq 0x23320 cmpl $0x0, %eax jne 0x25c23 movl $0x4, -0x4(%rbp) jmp 0x25c80 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x25c4e movq -0x10(%rbp), %rax movq (%rax), %rdi leaq 0xb466d(%rip), %rsi # 0xda2a8 callq 0x23320 cmpl $0x0, %eax jne 0x25c4e movl $0x1, -0x4(%rbp) jmp 0x25c80 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) je 0x25c79 movq -0x10(%rbp), %rax movq (%rax), %rdi leaq 0xb45e6(%rip), %rsi # 0xda24c callq 0x23320 cmpl $0x0, %eax jne 0x25c79 movl $0x5, -0x4(%rbp) jmp 0x25c80 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopl (%rax)
get_field: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_25BCA mov rax, [rbp+var_10] mov rdi, [rax] lea rsi, aEthGetbalance; "eth_getBalance" call _strcmp cmp eax, 0 jnz short loc_25BCA mov [rbp+var_4], 2 jmp loc_25C80 loc_25BCA: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_25BF8 mov rax, [rbp+var_10] mov rdi, [rax] lea rsi, aEthGetstoragea; "eth_getStorageAt" call _strcmp cmp eax, 0 jnz short loc_25BF8 mov [rbp+var_4], 3 jmp loc_25C80 loc_25BF8: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_25C23 mov rax, [rbp+var_10] mov rdi, [rax] lea rsi, aEthGetcode; "eth_getCode" call _strcmp cmp eax, 0 jnz short loc_25C23 mov [rbp+var_4], 4 jmp short loc_25C80 loc_25C23: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_25C4E mov rax, [rbp+var_10] mov rdi, [rax] lea rsi, aEthGettransact; "eth_getTransactionCount" call _strcmp cmp eax, 0 jnz short loc_25C4E mov [rbp+var_4], 1 jmp short loc_25C80 loc_25C4E: mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jz short loc_25C79 mov rax, [rbp+var_10] mov rdi, [rax] lea rsi, aEthGetproof; "eth_getProof" call _strcmp cmp eax, 0 jnz short loc_25C79 mov [rbp+var_4], 5 jmp short loc_25C80 loc_25C79: mov [rbp+var_4], 0 loc_25C80: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
long long get_field(_QWORD *a1) { if ( *a1 && !(unsigned int)strcmp(*a1, "eth_getBalance") ) { return 2; } else if ( *a1 && !(unsigned int)strcmp(*a1, "eth_getStorageAt") ) { return 3; } else if ( *a1 && !(unsigned int)strcmp(*a1, "eth_getCode") ) { return 4; } else if ( *a1 && !(unsigned int)strcmp(*a1, "eth_getTransactionCount") ) { return 1; } else if ( *a1 && !(unsigned int)strcmp(*a1, "eth_getProof") ) { return 5; } else { return 0; } }
get_field: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x00125bca MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] LEA RSI,[0x1da259] CALL 0x00123320 CMP EAX,0x0 JNZ 0x00125bca MOV dword ptr [RBP + -0x4],0x2 JMP 0x00125c80 LAB_00125bca: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x00125bf8 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] LEA RSI,[0x1da2c0] CALL 0x00123320 CMP EAX,0x0 JNZ 0x00125bf8 MOV dword ptr [RBP + -0x4],0x3 JMP 0x00125c80 LAB_00125bf8: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x00125c23 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] LEA RSI,[0x1da290] CALL 0x00123320 CMP EAX,0x0 JNZ 0x00125c23 MOV dword ptr [RBP + -0x4],0x4 JMP 0x00125c80 LAB_00125c23: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x00125c4e MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] LEA RSI,[0x1da2a8] CALL 0x00123320 CMP EAX,0x0 JNZ 0x00125c4e MOV dword ptr [RBP + -0x4],0x1 JMP 0x00125c80 LAB_00125c4e: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JZ 0x00125c79 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] LEA RSI,[0x1da24c] CALL 0x00123320 CMP EAX,0x0 JNZ 0x00125c79 MOV dword ptr [RBP + -0x4],0x5 JMP 0x00125c80 LAB_00125c79: MOV dword ptr [RBP + -0x4],0x0 LAB_00125c80: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 get_field(long *param_1) { int iVar1; if ((*param_1 != 0) && (iVar1 = strcmp((char *)*param_1,"eth_getBalance"), iVar1 == 0)) { return 2; } if ((*param_1 != 0) && (iVar1 = strcmp((char *)*param_1,"eth_getStorageAt"), iVar1 == 0)) { return 3; } if ((*param_1 != 0) && (iVar1 = strcmp((char *)*param_1,"eth_getCode"), iVar1 == 0)) { return 4; } if ((*param_1 != 0) && (iVar1 = strcmp((char *)*param_1,"eth_getTransactionCount"), iVar1 == 0)) { return 1; } if ((*param_1 != 0) && (iVar1 = strcmp((char *)*param_1,"eth_getProof"), iVar1 == 0)) { return 5; } return 0; }
46,273
testing::Test::Run()
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
void Test::Run() { if (!HasSameFixtureClass()) return; internal::UnitTestImpl* const impl = internal::GetUnitTestImpl(); impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported(this, &Test::SetUp, "SetUp()"); // We will run the test only if SetUp() was successful and didn't call // GTEST_SKIP(). if (!HasFatalFailure() && !IsSkipped()) { impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported(this, &Test::TestBody, "the test body"); } // However, we want to clean up as much as possible. Hence we will // always call TearDown(), even if SetUp() or the test body has // failed. impl->os_stack_trace_getter()->UponLeavingGTest(); internal::HandleExceptionsInMethodIfSupported(this, &Test::TearDown, "TearDown()"); }
O0
cpp
testing::Test::Run(): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, (%rsp) callq 0xc5bc0 testb $0x1, %al jne 0xc6440 jmp 0xc6522 callq 0xe2720 movq %rax, 0x38(%rsp) movq 0x38(%rsp), %rdi callq 0xc04d0 movq %rax, %rdi movq (%rdi), %rax movq 0x18(%rax), %rax callq *%rax movq (%rsp), %rdi movq $0x0, 0x30(%rsp) movq $0x11, 0x28(%rsp) movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx leaq 0x4d281(%rip), %rcx # 0x113708 callq 0xe7a90 callq 0xc6530 testb $0x1, %al jne 0xc64e0 callq 0xc6550 testb $0x1, %al jne 0xc64e0 movq 0x38(%rsp), %rdi callq 0xc04d0 movq %rax, %rdi movq (%rdi), %rax movq 0x18(%rax), %rax callq *%rax movq (%rsp), %rdi movq $0x0, 0x20(%rsp) movq $0x21, 0x18(%rsp) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0x4d235(%rip), %rcx # 0x113710 callq 0xe7a90 movq 0x38(%rsp), %rdi callq 0xc04d0 movq %rax, %rdi movq (%rdi), %rax movq 0x18(%rax), %rax callq *%rax movq (%rsp), %rdi movq $0x0, 0x10(%rsp) movq $0x19, 0x8(%rsp) movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x4d201(%rip), %rcx # 0x11371e callq 0xe7a90 addq $0x48, %rsp retq nopw (%rax,%rax)
_ZN7testing4Test3RunEv: sub rsp, 48h mov [rsp+48h+var_8], rdi mov rax, [rsp+48h+var_8] mov [rsp+48h+var_48], rax call _ZN7testing4Test19HasSameFixtureClassEv; testing::Test::HasSameFixtureClass(void) test al, 1 jnz short loc_C6440 jmp loc_C6522 loc_C6440: call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void) mov [rsp+48h+var_10], rax mov rdi, [rsp+48h+var_10]; this call _ZN7testing8internal12UnitTestImpl21os_stack_trace_getterEv; testing::internal::UnitTestImpl::os_stack_trace_getter(void) mov rdi, rax mov rax, [rdi] mov rax, [rax+18h] call rax mov rdi, [rsp+48h+var_48]; this mov [rsp+48h+var_18], 0 mov [rsp+48h+var_20], 11h mov rsi, [rsp+48h+var_20] mov rdx, [rsp+48h+var_18] lea rcx, aSetup; "SetUp()" call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test *,void (testing::Test::*)(void),char const*) call _ZN7testing4Test15HasFatalFailureEv; testing::Test::HasFatalFailure(void) test al, 1 jnz short loc_C64E0 call _ZN7testing4Test9IsSkippedEv; testing::Test::IsSkipped(void) test al, 1 jnz short loc_C64E0 mov rdi, [rsp+48h+var_10]; this call _ZN7testing8internal12UnitTestImpl21os_stack_trace_getterEv; testing::internal::UnitTestImpl::os_stack_trace_getter(void) mov rdi, rax mov rax, [rdi] mov rax, [rax+18h] call rax mov rdi, [rsp+48h+var_48] mov [rsp+48h+var_28], 0 mov [rsp+48h+var_30], 21h ; '!' mov rsi, [rsp+48h+var_30] mov rdx, [rsp+48h+var_28] lea rcx, aTheTestBody; "the test body" call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test *,void (testing::Test::*)(void),char const*) loc_C64E0: mov rdi, [rsp+48h+var_10]; this call _ZN7testing8internal12UnitTestImpl21os_stack_trace_getterEv; testing::internal::UnitTestImpl::os_stack_trace_getter(void) mov rdi, rax mov rax, [rdi] mov rax, [rax+18h] call rax mov rdi, [rsp+48h+var_48] mov [rsp+48h+var_38], 0 mov [rsp+48h+var_40], 19h mov rsi, [rsp+48h+var_40] mov rdx, [rsp+48h+var_38] lea rcx, aTeardown; "TearDown()" call _ZN7testing8internal35HandleExceptionsInMethodIfSupportedINS_4TestEvEET0_PT_MS4_FS3_vEPKc; testing::internal::HandleExceptionsInMethodIfSupported<testing::Test,void>(testing::Test *,void (testing::Test::*)(void),char const*) loc_C6522: add rsp, 48h retn
Run: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP],RAX CALL 0x001c5bc0 TEST AL,0x1 JNZ 0x001c6440 JMP 0x001c6522 LAB_001c6440: CALL 0x001e2720 MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x001c04d0 MOV RDI,RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] CALL RAX MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x28],0x11 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LEA RCX,[0x213708] CALL 0x001e7a90 CALL 0x001c6530 TEST AL,0x1 JNZ 0x001c64e0 CALL 0x001c6550 TEST AL,0x1 JNZ 0x001c64e0 MOV RDI,qword ptr [RSP + 0x38] CALL 0x001c04d0 MOV RDI,RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] CALL RAX MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x18],0x21 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LEA RCX,[0x213710] CALL 0x001e7a90 LAB_001c64e0: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001c04d0 MOV RDI,RAX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x18] CALL RAX MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x8],0x19 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LEA RCX,[0x21371e] CALL 0x001e7a90 LAB_001c6522: ADD RSP,0x48 RET
/* testing::Test::Run() */ void __thiscall testing::Test::Run(Test *this) { ulong uVar1; UnitTestImpl *this_00; long *plVar2; uVar1 = HasSameFixtureClass(); if ((uVar1 & 1) != 0) { this_00 = (UnitTestImpl *)internal::GetUnitTestImpl(); plVar2 = (long *)internal::UnitTestImpl::os_stack_trace_getter(this_00); (**(code **)(*plVar2 + 0x18))(); internal::HandleExceptionsInMethodIfSupported<testing::Test,void> (this,(_func_void *)0x11,(char *)0x0); uVar1 = HasFatalFailure(); if (((uVar1 & 1) == 0) && (uVar1 = IsSkipped(), (uVar1 & 1) == 0)) { plVar2 = (long *)internal::UnitTestImpl::os_stack_trace_getter(this_00); (**(code **)(*plVar2 + 0x18))(); internal::HandleExceptionsInMethodIfSupported<testing::Test,void> (this,(_func_void *)0x21,(char *)0x0); } plVar2 = (long *)internal::UnitTestImpl::os_stack_trace_getter(this_00); (**(code **)(*plVar2 + 0x18))(); internal::HandleExceptionsInMethodIfSupported<testing::Test,void> (this,(_func_void *)0x19,(char *)0x0); } return; }
46,274
check_mb_gb18030_valid
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_gb18030_valid(const char * start, const char * end) { if (end - start <= 1 || !is_gb18030_odd(start[0])) { return 0; } if (is_gb18030_even_2(start[1])) { return 2; } else if (end - start > 3 && is_gb18030_even_4(start[1]) && is_gb18030_odd(start[2]) && is_gb18030_even_4(start[3])) { return 4; } return 0; }
O0
c
check_mb_gb18030_valid: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax cmpq $0x1, %rax jle 0x758fb movq -0x10(%rbp), %rax movzbl (%rax), %ecx movl $0x81, %eax cmpl %ecx, %eax jg 0x758fb movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0xfe, %eax jle 0x75907 movl $0x0, -0x4(%rbp) jmp 0x759cd movq -0x10(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x40, %eax cmpl %ecx, %eax jg 0x75925 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x7e, %eax jle 0x75945 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x80, %eax cmpl %ecx, %eax jg 0x7594e movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xfe, %eax jg 0x7594e movl $0x2, -0x4(%rbp) jmp 0x759cd movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax cmpq $0x3, %rax jle 0x759c4 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %ecx movl $0x30, %eax cmpl %ecx, %eax jg 0x759c4 movq -0x10(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x39, %eax jg 0x759c4 movq -0x10(%rbp), %rax movzbl 0x2(%rax), %ecx movl $0x81, %eax cmpl %ecx, %eax jg 0x759c4 movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax cmpl $0xfe, %eax jg 0x759c4 movq -0x10(%rbp), %rax movzbl 0x3(%rax), %ecx movl $0x30, %eax cmpl %ecx, %eax jg 0x759c4 movq -0x10(%rbp), %rax movzbl 0x3(%rax), %eax cmpl $0x39, %eax jg 0x759c4 movl $0x4, -0x4(%rbp) jmp 0x759cd jmp 0x759c6 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
check_mb_gb18030_valid: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx cmp rax, 1 jle short loc_758FB mov rax, [rbp+var_10] movzx ecx, byte ptr [rax] mov eax, 81h cmp eax, ecx jg short loc_758FB mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 0FEh jle short loc_75907 loc_758FB: mov [rbp+var_4], 0 jmp loc_759CD loc_75907: mov rax, [rbp+var_10] movzx ecx, byte ptr [rax+1] mov eax, 40h ; '@' cmp eax, ecx jg short loc_75925 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 7Eh ; '~' jle short loc_75945 loc_75925: mov rax, [rbp+var_10] movzx ecx, byte ptr [rax+1] mov eax, 80h cmp eax, ecx jg short loc_7594E mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 0FEh jg short loc_7594E loc_75945: mov [rbp+var_4], 2 jmp short loc_759CD loc_7594E: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx cmp rax, 3 jle short loc_759C4 mov rax, [rbp+var_10] movzx ecx, byte ptr [rax+1] mov eax, 30h ; '0' cmp eax, ecx jg short loc_759C4 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+1] cmp eax, 39h ; '9' jg short loc_759C4 mov rax, [rbp+var_10] movzx ecx, byte ptr [rax+2] mov eax, 81h cmp eax, ecx jg short loc_759C4 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] cmp eax, 0FEh jg short loc_759C4 mov rax, [rbp+var_10] movzx ecx, byte ptr [rax+3] mov eax, 30h ; '0' cmp eax, ecx jg short loc_759C4 mov rax, [rbp+var_10] movzx eax, byte ptr [rax+3] cmp eax, 39h ; '9' jg short loc_759C4 mov [rbp+var_4], 4 jmp short loc_759CD loc_759C4: jmp short $+2 loc_759C6: mov [rbp+var_4], 0 loc_759CD: mov eax, [rbp+var_4] pop rbp retn
long long check_mb_gb18030_valid(unsigned __int8 *a1, long long a2) { if ( a2 - (long long)a1 <= 1 || *a1 < 0x81u || *a1 == 255 ) { return 0; } else if ( (a1[1] < 0x40u || a1[1] > 0x7Eu) && (a1[1] < 0x80u || a1[1] == 255) ) { if ( a2 - (long long)a1 <= 3 || a1[1] < 0x30u || a1[1] > 0x39u || a1[2] < 0x81u || a1[2] == 255 || a1[3] < 0x30u || a1[3] > 0x39u ) { return 0; } else { return 4; } } else { return 2; } }
check_mb_gb18030_valid: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX CMP RAX,0x1 JLE 0x001758fb MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RAX] MOV EAX,0x81 CMP EAX,ECX JG 0x001758fb MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0xfe JLE 0x00175907 LAB_001758fb: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001759cd LAB_00175907: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x40 CMP EAX,ECX JG 0x00175925 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x7e JLE 0x00175945 LAB_00175925: MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x80 CMP EAX,ECX JG 0x0017594e MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xfe JG 0x0017594e LAB_00175945: MOV dword ptr [RBP + -0x4],0x2 JMP 0x001759cd LAB_0017594e: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX CMP RAX,0x3 JLE 0x001759c4 MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RAX + 0x1] MOV EAX,0x30 CMP EAX,ECX JG 0x001759c4 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x39 JG 0x001759c4 MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RAX + 0x2] MOV EAX,0x81 CMP EAX,ECX JG 0x001759c4 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] CMP EAX,0xfe JG 0x001759c4 MOV RAX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RAX + 0x3] MOV EAX,0x30 CMP EAX,ECX JG 0x001759c4 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x3] CMP EAX,0x39 JG 0x001759c4 MOV dword ptr [RBP + -0x4],0x4 JMP 0x001759cd LAB_001759c4: JMP 0x001759c6 LAB_001759c6: MOV dword ptr [RBP + -0x4],0x0 LAB_001759cd: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 check_mb_gb18030_valid(byte *param_1,long param_2) { int4 local_c; if (((param_2 - (long)param_1 < 2) || (*param_1 < 0x81)) || (*param_1 == 0xff)) { local_c = 0; } else if (((param_1[1] < 0x40) || (0x7e < param_1[1])) && ((param_1[1] < 0x80 || (param_1[1] == 0xff)))) { if (((param_2 - (long)param_1 < 4) || (param_1[1] < 0x30)) || ((0x39 < param_1[1] || ((((param_1[2] < 0x81 || (0xfe < param_1[2])) || (param_1[3] < 0x30)) || (0x39 < param_1[3]) ))))) { local_c = 0; } else { local_c = 4; } } else { local_c = 2; } return local_c; }
46,275
my_strnncollsp_padspace_bin
eloqsql/strings/ctype-bin.c
int my_strnncollsp_padspace_bin(const uchar *str, size_t length) { for ( ; length ; str++, length--) { if (*str < ' ') return -1; else if (*str > ' ') return 1; } return 0; }
O0
c
my_strnncollsp_padspace_bin: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x3676b movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jge 0x36738 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x36772 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x20, %eax jle 0x3674d movl $0x1, -0x4(%rbp) jmp 0x36772 jmp 0x3674f jmp 0x36751 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x3671c movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_strnncollsp_padspace_bin: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi loc_3671C: cmp [rbp+var_18], 0 jz short loc_3676B mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jge short loc_36738 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_36772 loc_36738: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 20h ; ' ' jle short loc_3674D mov [rbp+var_4], 1 jmp short loc_36772 loc_3674D: jmp short $+2 loc_3674F: jmp short $+2 loc_36751: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_3671C loc_3676B: mov [rbp+var_4], 0 loc_36772: mov eax, [rbp+var_4] pop rbp retn
long long my_strnncollsp_padspace_bin(unsigned __int8 *a1, long long a2) { while ( a2 ) { if ( *a1 < 0x20u ) return (unsigned int)-1; if ( *a1 > 0x20u ) return 1; ++a1; --a2; } return 0; }
my_strnncollsp_padspace_bin: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI LAB_0013671c: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0013676b MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JGE 0x00136738 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x00136772 LAB_00136738: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x20 JLE 0x0013674d MOV dword ptr [RBP + -0x4],0x1 JMP 0x00136772 LAB_0013674d: JMP 0x0013674f LAB_0013674f: JMP 0x00136751 LAB_00136751: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0013671c LAB_0013676b: MOV dword ptr [RBP + -0x4],0x0 LAB_00136772: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_strnncollsp_padspace_bin(byte *param_1,long param_2) { long local_20; byte *local_18; local_20 = param_2; local_18 = param_1; while( true ) { if (local_20 == 0) { return 0; } if (*local_18 < 0x20) break; if (0x20 < *local_18) { return 1; } local_18 = local_18 + 1; local_20 = local_20 + -1; } return 0xffffffff; }
46,276
copy_decode_table
eloqsql/storage/myisam/mi_packrec.c
static uint copy_decode_table(uint16 *to_pos, uint offset, uint16 *decode_table) { uint prev_offset= offset; DBUG_ENTER("copy_decode_table"); /* Descent on the left side. */ if (!(*decode_table & IS_CHAR)) { /* Set a pointer to the next target node. */ to_pos[offset]=2; /* Copy the left hand subtree there. */ offset=copy_decode_table(to_pos,offset+2,decode_table+ *decode_table); } else { /* Copy the byte value. */ to_pos[offset]= *decode_table; /* Step behind this node. */ offset+=2; } /* Descent on the right side. */ decode_table++; if (!(*decode_table & IS_CHAR)) { /* Set a pointer to the next free target node. */ to_pos[prev_offset+1]=(uint16) (offset-prev_offset-1); /* Copy the right hand subtree to the entry of that node. */ offset=copy_decode_table(to_pos,offset,decode_table+ *decode_table); } else { /* Copy the byte value. */ to_pos[prev_offset+1]= *decode_table; } DBUG_RETURN(offset); }
O0
c
copy_decode_table: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0xbc40e movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx movw $0x2, (%rax,%rcx,2) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi addl $0x2, %esi movq -0x18(%rbp), %rdx movq -0x18(%rbp), %rax movzwl (%rax), %eax cltq shlq %rax addq %rax, %rdx callq 0xbc3b0 movl %eax, -0xc(%rbp) jmp 0xbc429 movq -0x18(%rbp), %rax movw (%rax), %dx movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx movw %dx, (%rax,%rcx,2) movl -0xc(%rbp), %eax addl $0x2, %eax movl %eax, -0xc(%rbp) movq -0x18(%rbp), %rax addq $0x2, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movzwl (%rax), %eax andl $0x8000, %eax # imm = 0x8000 cmpl $0x0, %eax jne 0xbc486 movl -0xc(%rbp), %eax subl -0x1c(%rbp), %eax subl $0x1, %eax movw %ax, %dx movq -0x8(%rbp), %rax movl -0x1c(%rbp), %ecx addl $0x1, %ecx movl %ecx, %ecx movw %dx, (%rax,%rcx,2) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x18(%rbp), %rax movzwl (%rax), %eax cltq shlq %rax addq %rax, %rdx callq 0xbc3b0 movl %eax, -0xc(%rbp) jmp 0xbc49d movq -0x18(%rbp), %rax movw (%rax), %dx movq -0x8(%rbp), %rax movl -0x1c(%rbp), %ecx addl $0x1, %ecx movl %ecx, %ecx movw %dx, (%rax,%rcx,2) jmp 0xbc49f movl -0xc(%rbp), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
copy_decode_table_0: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov eax, [rbp+var_C] mov [rbp+var_1C], eax mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_BC40E mov rax, [rbp+var_8] mov ecx, [rbp+var_C] mov word ptr [rax+rcx*2], 2 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] add esi, 2 mov rdx, [rbp+var_18] mov rax, [rbp+var_18] movzx eax, word ptr [rax] cdqe shl rax, 1 add rdx, rax call copy_decode_table_0 mov [rbp+var_C], eax jmp short loc_BC429 loc_BC40E: mov rax, [rbp+var_18] mov dx, [rax] mov rax, [rbp+var_8] mov ecx, [rbp+var_C] mov [rax+rcx*2], dx mov eax, [rbp+var_C] add eax, 2 mov [rbp+var_C], eax loc_BC429: mov rax, [rbp+var_18] add rax, 2 mov [rbp+var_18], rax mov rax, [rbp+var_18] movzx eax, word ptr [rax] and eax, 8000h cmp eax, 0 jnz short loc_BC486 mov eax, [rbp+var_C] sub eax, [rbp+var_1C] sub eax, 1 mov dx, ax mov rax, [rbp+var_8] mov ecx, [rbp+var_1C] add ecx, 1 mov ecx, ecx mov [rax+rcx*2], dx mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rax, [rbp+var_18] movzx eax, word ptr [rax] cdqe shl rax, 1 add rdx, rax call copy_decode_table_0 mov [rbp+var_C], eax jmp short loc_BC49D loc_BC486: mov rax, [rbp+var_18] mov dx, [rax] mov rax, [rbp+var_8] mov ecx, [rbp+var_1C] add ecx, 1 mov ecx, ecx mov [rax+rcx*2], dx loc_BC49D: jmp short $+2 loc_BC49F: mov eax, [rbp+var_C] mov [rbp+var_20], eax mov eax, [rbp+var_20] add rsp, 20h pop rbp retn
long long copy_decode_table_0(long long a1, unsigned int a2, _WORD *a3) { _WORD *v5; // [rsp+8h] [rbp-18h] unsigned int v6; // [rsp+14h] [rbp-Ch] if ( (*a3 & 0x8000) != 0 ) { *(_WORD *)(a1 + 2LL * a2) = *a3; v6 = a2 + 2; } else { *(_WORD *)(a1 + 2LL * a2) = 2; v6 = copy_decode_table_0(a1, a2 + 2, &a3[(unsigned __int16)*a3]); } v5 = a3 + 1; if ( (*v5 & 0x8000) != 0 ) { *(_WORD *)(a1 + 2LL * (a2 + 1)) = *v5; } else { *(_WORD *)(a1 + 2LL * (a2 + 1)) = v6 - a2 - 1; return (unsigned int)copy_decode_table_0(a1, v6, &v5[(unsigned __int16)*v5]); } return v6; }
copy_decode_table: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x001bc40e MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] MOV word ptr [RAX + RCX*0x2],0x2 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] ADD ESI,0x2 MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] CDQE SHL RAX,0x1 ADD RDX,RAX CALL 0x001bc3b0 MOV dword ptr [RBP + -0xc],EAX JMP 0x001bc429 LAB_001bc40e: MOV RAX,qword ptr [RBP + -0x18] MOV DX,word ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] MOV word ptr [RAX + RCX*0x2],DX MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x2 MOV dword ptr [RBP + -0xc],EAX LAB_001bc429: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x2 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] AND EAX,0x8000 CMP EAX,0x0 JNZ 0x001bc486 MOV EAX,dword ptr [RBP + -0xc] SUB EAX,dword ptr [RBP + -0x1c] SUB EAX,0x1 MOV DX,AX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x1 MOV ECX,ECX MOV word ptr [RAX + RCX*0x2],DX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,word ptr [RAX] CDQE SHL RAX,0x1 ADD RDX,RAX CALL 0x001bc3b0 MOV dword ptr [RBP + -0xc],EAX JMP 0x001bc49d LAB_001bc486: MOV RAX,qword ptr [RBP + -0x18] MOV DX,word ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0x1c] ADD ECX,0x1 MOV ECX,ECX MOV word ptr [RAX + RCX*0x2],DX LAB_001bc49d: JMP 0x001bc49f LAB_001bc49f: MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] ADD RSP,0x20 POP RBP RET
int copy_decode_table(long param_1,uint param_2,ushort *param_3) { int local_14; if ((*param_3 & 0x8000) == 0) { *(int2 *)(param_1 + (ulong)param_2 * 2) = 2; local_14 = copy_decode_table(param_1,param_2 + 2,param_3 + (int)(uint)*param_3); } else { *(ushort *)(param_1 + (ulong)param_2 * 2) = *param_3; local_14 = param_2 + 2; } param_3 = param_3 + 1; if ((*param_3 & 0x8000) == 0) { *(short *)(param_1 + (ulong)(param_2 + 1) * 2) = ((short)local_14 - (short)param_2) + -1; local_14 = copy_decode_table(param_1,local_14,param_3 + (int)(uint)*param_3); } else { *(ushort *)(param_1 + (ulong)(param_2 + 1) * 2) = *param_3; } return local_14; }
46,277
bench(llama_sampler*, char const*, std::vector<llama_token_data, std::allocator<llama_token_data>> const&, int)
monkey531[P]llama/tests/test-sampling.cpp
static void bench(llama_sampler * cnstr, const char * cnstr_name, const std::vector<llama_token_data> & data, int n_iter) { std::vector<llama_token_data> cur(data.size()); std::copy(data.begin(), data.end(), cur.begin()); llama_token_data_array cur_p = { cur.data(), cur.size(), -1, false }; llama_sampler_apply(cnstr, &cur_p); llama_sampler_reset(cnstr); const int64_t t_start = ggml_time_us(); for (int i = 0; i < n_iter; i++) { std::copy(data.begin(), data.end(), cur.begin()); llama_token_data_array cur_p = { cur.data(), cur.size(), -1, false }; llama_sampler_apply(cnstr, &cur_p); llama_sampler_reset(cnstr); } const int64_t t_end = ggml_time_us(); llama_sampler_free(cnstr); printf("%-43s: %8.3f us/iter\n", cnstr_name, (t_end - t_start) / (float)n_iter); }
O2
cpp
bench(llama_sampler*, char const*, std::vector<llama_token_data, std::allocator<llama_token_data>> const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq 0x8(%rdx), %rax subq (%rdx), %rax pushq $0xc popq %rbp cqto idivq %rbp leaq 0x8(%rsp), %rdi leaq 0x48(%rsp), %rdx movq %rax, %rsi callq 0x568c movq (%r15), %rsi movq 0x8(%r15), %rdx subq %rsi, %rdx je 0x4e9a movq 0x8(%rsp), %rdi callq 0x2230 movq 0x8(%rsp), %rcx movq 0x10(%rsp), %rax leaq 0x48(%rsp), %rsi movq %rcx, (%rsi) subq %rcx, %rax cqto idivq %rbp movq %rax, 0x8(%rsi) orq $-0x1, 0x10(%rsi) movb $0x0, 0x18(%rsi) movq %r14, %rdi callq 0x2220 movq %r14, %rdi callq 0x2280 movq %rbx, 0x20(%rsp) callq 0x2260 movq %rax, %r12 pushq $0x20 popq %rbx leaq 0x28(%rsp), %r13 subl $0x1, %ebx jb 0x4f3d movq (%r15), %rsi movq 0x8(%r15), %rdx subq %rsi, %rdx je 0x4f01 movq 0x8(%rsp), %rdi callq 0x2230 movq 0x8(%rsp), %rcx movq 0x10(%rsp), %rax movq %rcx, 0x28(%rsp) subq %rcx, %rax cqto idivq %rbp movq %rax, 0x30(%rsp) orq $-0x1, 0x38(%rsp) movb $0x0, 0x40(%rsp) movq %r14, %rdi movq %r13, %rsi callq 0x2220 movq %r14, %rdi callq 0x2280 jmp 0x4ee6 callq 0x2260 movq %rax, %r15 movq %r14, %rdi callq 0x2190 subq %r12, %r15 cvtsi2ss %r15, %xmm0 mulss 0x11f7(%rip), %xmm0 # 0x6154 cvtss2sd %xmm0, %xmm0 leaq 0x169c(%rip), %rdi # 0x6604 movq 0x20(%rsp), %rsi movb $0x1, %al callq 0x2030 leaq 0x8(%rsp), %rdi callq 0x55ae addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x4f93 jmp 0x4f93 jmp 0x4f93 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x55ae movq %rbx, %rdi callq 0x2270
_ZL5benchP13llama_samplerPKcRKSt6vectorI16llama_token_dataSaIS4_EEi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r15, rdx mov rbx, rsi mov r14, rdi mov rax, [rdx+8] sub rax, [rdx] push 0Ch pop rbp cqo idiv rbp lea rdi, [rsp+98h+var_90] lea rdx, [rsp+98h+var_50] mov rsi, rax call _ZNSt6vectorI16llama_token_dataSaIS0_EEC2EmRKS1_; std::vector<llama_token_data>::vector(ulong,std::allocator<llama_token_data> const&) mov rsi, [r15] mov rdx, [r15+8] sub rdx, rsi jz short loc_4E9A mov rdi, [rsp+98h+var_90] call _memmove loc_4E9A: mov rcx, [rsp+98h+var_90] mov rax, [rsp+98h+var_88] lea rsi, [rsp+98h+var_50] mov [rsi], rcx sub rax, rcx cqo idiv rbp mov [rsi+8], rax or qword ptr [rsi+10h], 0FFFFFFFFFFFFFFFFh mov byte ptr [rsi+18h], 0 mov rdi, r14 call _llama_sampler_apply mov rdi, r14 call _llama_sampler_reset mov [rsp+98h+var_78], rbx call _ggml_time_us mov r12, rax push 20h ; ' ' pop rbx lea r13, [rsp+98h+var_70] loc_4EE6: sub ebx, 1 jb short loc_4F3D mov rsi, [r15] mov rdx, [r15+8] sub rdx, rsi jz short loc_4F01 mov rdi, [rsp+98h+var_90] call _memmove loc_4F01: mov rcx, [rsp+98h+var_90] mov rax, [rsp+98h+var_88] mov [rsp+98h+var_70], rcx sub rax, rcx cqo idiv rbp mov [rsp+98h+var_68], rax or [rsp+98h+var_60], 0FFFFFFFFFFFFFFFFh mov [rsp+98h+var_58], 0 mov rdi, r14 mov rsi, r13 call _llama_sampler_apply mov rdi, r14 call _llama_sampler_reset jmp short loc_4EE6 loc_4F3D: call _ggml_time_us mov r15, rax mov rdi, r14 call _llama_sampler_free sub r15, r12 cvtsi2ss xmm0, r15 mulss xmm0, cs:dword_6154 cvtss2sd xmm0, xmm0 lea rdi, a43s83fUsIter; "%-43s: %8.3f us/iter\n" mov rsi, [rsp+98h+var_78] mov al, 1 call _printf lea rdi, [rsp+98h+var_90] call _ZNSt12_Vector_baseI16llama_token_dataSaIS0_EED2Ev; std::_Vector_base<llama_token_data>::~_Vector_base() add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_4F93 jmp short loc_4F93 jmp short $+2 loc_4F93: mov rbx, rax lea rdi, [rsp+arg_0] call _ZNSt12_Vector_baseI16llama_token_dataSaIS0_EED2Ev; std::_Vector_base<llama_token_data>::~_Vector_base() mov rdi, rbx call __Unwind_Resume
long long bench(long long a1, const char *a2, _QWORD *a3) { int v4; // r12d int v5; // ebx int v7; // r15d long long v9; // [rsp+8h] [rbp-90h] BYREF long long v10; // [rsp+10h] [rbp-88h] const char *v11; // [rsp+20h] [rbp-78h] _QWORD v12[3]; // [rsp+28h] [rbp-70h] BYREF char v13; // [rsp+40h] [rbp-58h] _QWORD v14[3]; // [rsp+48h] [rbp-50h] BYREF char v15; // [rsp+60h] [rbp-38h] std::vector<llama_token_data>::vector(&v9, (a3[1] - *a3) / 12LL, v14); if ( a3[1] != *a3 ) memmove(v9); v14[0] = v9; v14[1] = (v10 - v9) / 12; v14[2] = -1LL; v15 = 0; llama_sampler_apply(a1, v14, (v10 - v9) % 12); llama_sampler_reset(a1); v11 = a2; v4 = ggml_time_us(); v5 = 32; while ( v5-- != 0 ) { if ( a3[1] != *a3 ) memmove(v9); v12[0] = v9; v12[1] = (v10 - v9) / 12; v12[2] = -1LL; v13 = 0; llama_sampler_apply(a1, v12, (v10 - v9) % 12); llama_sampler_reset(a1); } v7 = ggml_time_us(); llama_sampler_free(a1); printf("%-43s: %8.3f us/iter\n", v11, (float)((float)(v7 - v4) * 0.03125)); return std::_Vector_base<llama_token_data>::~_Vector_base(&v9); }
bench: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R15,RDX MOV RBX,RSI MOV R14,RDI MOV RAX,qword ptr [RDX + 0x8] SUB RAX,qword ptr [RDX] PUSH 0xc POP RBP CQO IDIV RBP LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x48] MOV RSI,RAX CALL 0x0010568c MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] SUB RDX,RSI JZ 0x00104e9a MOV RDI,qword ptr [RSP + 0x8] CALL 0x00102230 LAB_00104e9a: MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x48] MOV qword ptr [RSI],RCX SUB RAX,RCX CQO IDIV RBP MOV qword ptr [RSI + 0x8],RAX OR qword ptr [RSI + 0x10],-0x1 MOV byte ptr [RSI + 0x18],0x0 LAB_00104ec1: MOV RDI,R14 CALL 0x00102220 MOV RDI,R14 CALL 0x00102280 LAB_00104ed1: MOV qword ptr [RSP + 0x20],RBX CALL 0x00102260 LAB_00104edb: MOV R12,RAX PUSH 0x20 POP RBX LEA R13,[RSP + 0x28] LAB_00104ee6: SUB EBX,0x1 JC 0x00104f3d MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] SUB RDX,RSI JZ 0x00104f01 MOV RDI,qword ptr [RSP + 0x8] CALL 0x00102230 LAB_00104f01: MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x28],RCX SUB RAX,RCX CQO IDIV RBP MOV qword ptr [RSP + 0x30],RAX OR qword ptr [RSP + 0x38],-0x1 MOV byte ptr [RSP + 0x40],0x0 LAB_00104f28: MOV RDI,R14 MOV RSI,R13 CALL 0x00102220 MOV RDI,R14 CALL 0x00102280 JMP 0x00104ee6 LAB_00104f3d: CALL 0x00102260 MOV R15,RAX MOV RDI,R14 CALL 0x00102190 LAB_00104f4d: SUB R15,R12 CVTSI2SS XMM0,R15 MULSS XMM0,dword ptr [0x00106154] CVTSS2SD XMM0,XMM0 LEA RDI,[0x106604] MOV RSI,qword ptr [RSP + 0x20] MOV AL,0x1 CALL 0x00102030 LEA RDI,[RSP + 0x8] CALL 0x001055ae ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* bench(llama_sampler*, char const*, std::vector<llama_token_data, std::allocator<llama_token_data> > const&, int) */ void bench(llama_sampler *param_1,char *param_2,vector *param_3,int param_4) { long lVar1; long lVar2; size_t sVar3; int iVar4; bool bVar5; void *local_90; long local_88; char *local_78; void *local_70; long local_68; int8 local_60; int1 local_58; void *local_50; long local_48; int8 local_40; int1 local_38; std::vector<llama_token_data,std::allocator<llama_token_data>>::vector ((vector<llama_token_data,std::allocator<llama_token_data>> *)&local_90, (*(long *)(param_3 + 8) - *(long *)param_3) / 0xc,(allocator *)&local_50); sVar3 = *(long *)(param_3 + 8) - (long)*(void **)param_3; if (sVar3 != 0) { memmove(local_90,*(void **)param_3,sVar3); } local_50 = local_90; local_48 = (local_88 - (long)local_90) / 0xc; local_40 = 0xffffffffffffffff; local_38 = 0; /* try { // try from 00104ec1 to 00104ed0 has its CatchHandler @ 00104f91 */ llama_sampler_apply(param_1,&local_50,(local_88 - (long)local_90) % 0xc); llama_sampler_reset(param_1); local_78 = param_2; /* try { // try from 00104ed1 to 00104eda has its CatchHandler @ 00104f8d */ lVar1 = ggml_time_us(); iVar4 = 0x20; while (bVar5 = iVar4 != 0, iVar4 = iVar4 + -1, bVar5) { sVar3 = *(long *)(param_3 + 8) - (long)*(void **)param_3; if (sVar3 != 0) { memmove(local_90,*(void **)param_3,sVar3); } local_70 = local_90; local_68 = (local_88 - (long)local_90) / 0xc; local_60 = 0xffffffffffffffff; local_58 = 0; /* try { // try from 00104f28 to 00104f3a has its CatchHandler @ 00104f93 */ llama_sampler_apply(param_1,&local_70,(local_88 - (long)local_90) % 0xc); llama_sampler_reset(param_1); } /* try { // try from 00104f3d to 00104f4c has its CatchHandler @ 00104f8f */ lVar2 = ggml_time_us(); llama_sampler_free(param_1); printf("%-43s: %8.3f us/iter\n",(double)((float)(lVar2 - lVar1) * _DAT_00106154),local_78); std::_Vector_base<llama_token_data,std::allocator<llama_token_data>>::~_Vector_base ((_Vector_base<llama_token_data,std::allocator<llama_token_data>> *)&local_90); return; }
46,278
int testing::internal::CountIf<std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*>>, bool (*)(testing::TestSuite const*)>(std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*>> const&, bool (*)(testing::TestSuite const*))
giladroyz[P]FindPeaks/build_O0/_deps/googletest-src/googletest/src/gtest-internal-inl.h
inline int CountIf(const Container& c, Predicate predicate) { // Implemented as an explicit loop since std::count_if() in libCstd on // Solaris has a non-standard signature. int count = 0; for (auto it = c.begin(); it != c.end(); ++it) { if (predicate(*it)) ++count; } return count; }
O0
c
int testing::internal::CountIf<std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*>>, bool (*)(testing::TestSuite const*)>(std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*>> const&, bool (*)(testing::TestSuite const*)): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0x0, -0x14(%rbp) movq -0x8(%rbp), %rdi callq 0x4b990 movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rdi callq 0x4b9c0 movq %rax, -0x28(%rbp) leaq -0x20(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0x4b9f0 testb $0x1, %al jne 0x47604 jmp 0x4763d movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) leaq -0x20(%rbp), %rdi callq 0x4ba30 movq %rax, %rcx movq -0x30(%rbp), %rax movq (%rcx), %rdi callq *%rax testb $0x1, %al jne 0x47627 jmp 0x47630 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) jmp 0x47632 leaq -0x20(%rbp), %rdi callq 0x4ba50 jmp 0x475e4 movl -0x14(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN7testing8internal7CountIfISt6vectorIPNS_9TestSuiteESaIS4_EEPFbPKS3_EEEiRKT_T0_: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], 0 mov rdi, [rbp+var_8] call _ZNKSt6vectorIPN7testing9TestSuiteESaIS2_EE5beginEv; std::vector<testing::TestSuite *>::begin(void) mov [rbp+var_20], rax loc_475E4: mov rdi, [rbp+var_8] call _ZNKSt6vectorIPN7testing9TestSuiteESaIS2_EE3endEv; std::vector<testing::TestSuite *>::end(void) mov [rbp+var_28], rax lea rdi, [rbp+var_20] lea rsi, [rbp+var_28] call _ZN9__gnu_cxxneIPKPN7testing9TestSuiteESt6vectorIS3_SaIS3_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<testing::TestSuite * const*,std::vector<testing::TestSuite *>>(__gnu_cxx::__normal_iterator<testing::TestSuite * const*,std::vector<testing::TestSuite *>> const&,__gnu_cxx::__normal_iterator<testing::TestSuite * const*,std::vector<testing::TestSuite *>> const&) test al, 1 jnz short loc_47604 jmp short loc_4763D loc_47604: mov rax, [rbp+var_10] mov [rbp+var_30], rax lea rdi, [rbp+var_20] call _ZNK9__gnu_cxx17__normal_iteratorIPKPN7testing9TestSuiteESt6vectorIS3_SaIS3_EEEdeEv; __gnu_cxx::__normal_iterator<testing::TestSuite * const*,std::vector<testing::TestSuite *>>::operator*(void) mov rcx, rax mov rax, [rbp+var_30] mov rdi, [rcx] call rax test al, 1 jnz short loc_47627 jmp short loc_47630 loc_47627: mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax loc_47630: jmp short $+2 loc_47632: lea rdi, [rbp+var_20] call _ZN9__gnu_cxx17__normal_iteratorIPKPN7testing9TestSuiteESt6vectorIS3_SaIS3_EEEppEv; __gnu_cxx::__normal_iterator<testing::TestSuite * const*,std::vector<testing::TestSuite *>>::operator++(void) jmp short loc_475E4 loc_4763D: mov eax, [rbp+var_14] add rsp, 30h pop rbp retn
long long testing::internal::CountIf<std::vector<testing::TestSuite *>,bool (*)(testing::TestSuite const*)>( long long a1, long long ( *a2)(_QWORD)) { _QWORD *v2; // rax long long ( *v4)(_QWORD); // [rsp+0h] [rbp-30h] long long v5; // [rsp+8h] [rbp-28h] BYREF long long i; // [rsp+10h] [rbp-20h] BYREF unsigned int v7; // [rsp+1Ch] [rbp-14h] long long ( *v8)(_QWORD); // [rsp+20h] [rbp-10h] long long v9; // [rsp+28h] [rbp-8h] v9 = a1; v8 = a2; v7 = 0; for ( i = std::vector<testing::TestSuite *>::begin(a1); ; __gnu_cxx::__normal_iterator<testing::TestSuite * const*,std::vector<testing::TestSuite *>>::operator++(&i) ) { v5 = std::vector<testing::TestSuite *>::end(v9); if ( (__gnu_cxx::operator!=<testing::TestSuite * const*,std::vector<testing::TestSuite *>>(&i, &v5) & 1) == 0 ) break; v4 = v8; v2 = (_QWORD *)__gnu_cxx::__normal_iterator<testing::TestSuite * const*,std::vector<testing::TestSuite *>>::operator*(&i); if ( (v4(*v2) & 1) != 0 ) ++v7; } return v7; }
CountIf<std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>,bool(*)(testing::TestSuite_const*)>: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],0x0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014b990 MOV qword ptr [RBP + -0x20],RAX LAB_001475e4: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0014b9c0 MOV qword ptr [RBP + -0x28],RAX LEA RDI,[RBP + -0x20] LEA RSI,[RBP + -0x28] CALL 0x0014b9f0 TEST AL,0x1 JNZ 0x00147604 JMP 0x0014763d LAB_00147604: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX LEA RDI,[RBP + -0x20] CALL 0x0014ba30 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RCX] CALL RAX TEST AL,0x1 JNZ 0x00147627 JMP 0x00147630 LAB_00147627: MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX LAB_00147630: JMP 0x00147632 LAB_00147632: LEA RDI,[RBP + -0x20] CALL 0x0014ba50 JMP 0x001475e4 LAB_0014763d: MOV EAX,dword ptr [RBP + -0x14] ADD RSP,0x30 POP RBP RET
/* int testing::internal::CountIf<std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*> >, bool (*)(testing::TestSuite const*)>(std::vector<testing::TestSuite*, std::allocator<testing::TestSuite*> > const&, bool (*)(testing::TestSuite const*)) */ int testing::internal:: CountIf<std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>,bool(*)(testing::TestSuite_const*)> (vector *param_1,_func_bool_TestSuite_ptr *param_2) { _func_bool_TestSuite_ptr *p_Var1; bool bVar2; int8 *puVar3; int8 local_30; int8 local_28; int local_1c; _func_bool_TestSuite_ptr *local_18; vector *local_10; local_1c = 0; local_18 = param_2; local_10 = param_1; local_28 = std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>::begin ((vector<testing::TestSuite*,std::allocator<testing::TestSuite*>> *)param_1); while( true ) { local_30 = std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>::end ((vector<testing::TestSuite*,std::allocator<testing::TestSuite*>> *) local_10); bVar2 = __gnu_cxx::operator!=((__normal_iterator *)&local_28,(__normal_iterator *)&local_30); p_Var1 = local_18; if (!bVar2) break; puVar3 = (int8 *) __gnu_cxx:: __normal_iterator<testing::TestSuite*const*,std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>> ::operator*((__normal_iterator<testing::TestSuite*const*,std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>> *)&local_28); bVar2 = (*p_Var1)((TestSuite *)*puVar3); if (bVar2) { local_1c = local_1c + 1; } __gnu_cxx:: __normal_iterator<testing::TestSuite*const*,std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>> ::operator++((__normal_iterator<testing::TestSuite*const*,std::vector<testing::TestSuite*,std::allocator<testing::TestSuite*>>> *)&local_28); } return local_1c; }
46,279
reset_root_defaults
eloqsql/mysys/my_alloc.c
void reset_root_defaults(MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size __attribute__((unused))) { DBUG_ENTER("reset_root_defaults"); DBUG_ASSERT(alloc_root_inited(mem_root)); mem_root->block_size= (((block_size - ALLOC_ROOT_MIN_BLOCK_SIZE) & ~1) | (mem_root->block_size & 1)); #if !(defined(HAVE_valgrind) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { size_t size= pre_alloc_size + ALIGN_SIZE(sizeof(USED_MEM)); if (!mem_root->pre_alloc || mem_root->pre_alloc->size != size) { USED_MEM *mem, **prev= &mem_root->free; /* Free unused blocks, so that consequent calls to reset_root_defaults won't eat away memory. */ while (*prev) { mem= *prev; if (mem->size == size) { /* We found a suitable block, no need to do anything else */ mem_root->pre_alloc= mem; DBUG_VOID_RETURN; } if (mem->left + ALIGN_SIZE(sizeof(USED_MEM)) == mem->size) { /* remove block from the list and free it */ *prev= mem->next; my_free(mem); } else prev= &mem->next; } /* Allocate new prealloc block and add it to the end of free list */ if ((mem= (USED_MEM *) my_malloc(mem_root->m_psi_key, size, MYF(MALLOC_FLAG(mem_root-> block_size))))) { mem->size= size; mem->left= pre_alloc_size; mem->next= *prev; *prev= mem_root->pre_alloc= mem; TRASH_MEM(mem); } else { mem_root->pre_alloc= 0; } } } else #endif mem_root->pre_alloc= 0; DBUG_VOID_RETURN; }
O3
c
reset_root_defaults: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx andq $-0x2, %rsi movq 0x20(%rdi), %rax andl $0x1, %eax leaq (%rsi,%rax), %rdx addq $-0x28, %rdx movq %rdx, 0x20(%rdi) testq %r14, %r14 je 0x9db60 leaq 0x18(%r14), %r15 movq 0x10(%rbx), %rax testq %rax, %rax je 0x9daef cmpq %r15, 0x10(%rax) je 0x9db6e movq (%rbx), %rdi movq %rbx, %r12 testq %rdi, %rdi je 0x9db31 movq %rbx, %r12 movq 0x10(%rdi), %rax cmpq %r15, %rax je 0x9db6a movq 0x8(%rdi), %rcx addq $0x18, %rcx cmpq %rax, %rcx jne 0x9db21 movq (%rdi), %rax movq %rax, (%r12) callq 0xa0eba jmp 0x9db24 movq %rdi, %r12 movq (%r12), %rdi testq %rdi, %rdi jne 0x9dafd movq 0x20(%rbx), %rdx movl 0x38(%rbx), %edi andl $0x1, %edx shll $0x10, %edx movq %r15, %rsi callq 0xa0c8d testq %rax, %rax je 0x9db60 movq %r15, 0x10(%rax) movq %r14, 0x8(%rax) movq (%r12), %rcx movq %rcx, (%rax) movq %rax, 0x10(%rbx) movq %rax, (%r12) jmp 0x9db6e movq $0x0, 0x10(%rbx) jmp 0x9db6e movq %rdi, 0x10(%rbx) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
reset_root_defaults: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdx mov rbx, rdi and rsi, 0FFFFFFFFFFFFFFFEh mov rax, [rdi+20h] and eax, 1 lea rdx, [rsi+rax] add rdx, 0FFFFFFFFFFFFFFD8h mov [rdi+20h], rdx test r14, r14 jz loc_9DB60 lea r15, [r14+18h] mov rax, [rbx+10h] test rax, rax jz short loc_9DAEF cmp [rax+10h], r15 jz short loc_9DB6E loc_9DAEF: mov rdi, [rbx] mov r12, rbx test rdi, rdi jz short loc_9DB31 mov r12, rbx loc_9DAFD: mov rax, [rdi+10h] cmp rax, r15 jz short loc_9DB6A mov rcx, [rdi+8] add rcx, 18h cmp rcx, rax jnz short loc_9DB21 mov rax, [rdi] mov [r12], rax call my_free jmp short loc_9DB24 loc_9DB21: mov r12, rdi loc_9DB24: mov rdi, [r12] test rdi, rdi jnz short loc_9DAFD mov rdx, [rbx+20h] loc_9DB31: mov edi, [rbx+38h] and edx, 1 shl edx, 10h mov rsi, r15 call my_malloc test rax, rax jz short loc_9DB60 mov [rax+10h], r15 mov [rax+8], r14 mov rcx, [r12] mov [rax], rcx mov [rbx+10h], rax mov [r12], rax jmp short loc_9DB6E loc_9DB60: mov qword ptr [rbx+10h], 0 jmp short loc_9DB6E loc_9DB6A: mov [rbx+10h], rdi loc_9DB6E: pop rbx pop r12 pop r14 pop r15 pop rbp retn
_QWORD * reset_root_defaults(long long a1, long long a2, long long a3) { _QWORD *result; // rax unsigned long long v6; // rdx _QWORD *v7; // r15 _QWORD *v8; // rdi _QWORD *v9; // r12 result = (_QWORD *)(*(_QWORD *)(a1 + 32) & 1LL); v6 = (unsigned long long)result + (a2 & 0xFFFFFFFFFFFFFFFELL) - 40; *(_QWORD *)(a1 + 32) = v6; if ( !a3 ) { LABEL_14: *(_QWORD *)(a1 + 16) = 0LL; return result; } v7 = (_QWORD *)(a3 + 24); result = *(_QWORD **)(a1 + 16); if ( result && (_QWORD *)result[2] == v7 ) return result; v8 = *(_QWORD **)a1; v9 = (_QWORD *)a1; if ( !*(_QWORD *)a1 ) { LABEL_12: result = (_QWORD *)my_malloc(*(unsigned int *)(a1 + 56), a3 + 24, (unsigned __int8)(v6 & 1) << 16); if ( result ) { result[2] = v7; result[1] = a3; *result = *v9; *(_QWORD *)(a1 + 16) = result; *v9 = result; return result; } goto LABEL_14; } v9 = (_QWORD *)a1; while ( 1 ) { result = (_QWORD *)v8[2]; if ( result == v7 ) break; if ( (_QWORD *)(v8[1] + 24LL) == result ) { *v9 = *v8; my_free(v8); } else { v9 = v8; } v8 = (_QWORD *)*v9; if ( !*v9 ) { v6 = *(_QWORD *)(a1 + 32); goto LABEL_12; } } *(_QWORD *)(a1 + 16) = v8; return result; }
reset_root_defaults: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV RBX,RDI AND RSI,-0x2 MOV RAX,qword ptr [RDI + 0x20] AND EAX,0x1 LEA RDX,[RSI + RAX*0x1] ADD RDX,-0x28 MOV qword ptr [RDI + 0x20],RDX TEST R14,R14 JZ 0x0019db60 LEA R15,[R14 + 0x18] MOV RAX,qword ptr [RBX + 0x10] TEST RAX,RAX JZ 0x0019daef CMP qword ptr [RAX + 0x10],R15 JZ 0x0019db6e LAB_0019daef: MOV RDI,qword ptr [RBX] MOV R12,RBX TEST RDI,RDI JZ 0x0019db31 MOV R12,RBX LAB_0019dafd: MOV RAX,qword ptr [RDI + 0x10] CMP RAX,R15 JZ 0x0019db6a MOV RCX,qword ptr [RDI + 0x8] ADD RCX,0x18 CMP RCX,RAX JNZ 0x0019db21 MOV RAX,qword ptr [RDI] MOV qword ptr [R12],RAX CALL 0x001a0eba JMP 0x0019db24 LAB_0019db21: MOV R12,RDI LAB_0019db24: MOV RDI,qword ptr [R12] TEST RDI,RDI JNZ 0x0019dafd MOV RDX,qword ptr [RBX + 0x20] LAB_0019db31: MOV EDI,dword ptr [RBX + 0x38] AND EDX,0x1 SHL EDX,0x10 MOV RSI,R15 CALL 0x001a0c8d TEST RAX,RAX JZ 0x0019db60 MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RAX + 0x8],R14 MOV RCX,qword ptr [R12] MOV qword ptr [RAX],RCX MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [R12],RAX JMP 0x0019db6e LAB_0019db60: MOV qword ptr [RBX + 0x10],0x0 JMP 0x0019db6e LAB_0019db6a: MOV qword ptr [RBX + 0x10],RDI LAB_0019db6e: POP RBX POP R12 POP R14 POP R15 POP RBP RET
void reset_root_defaults(long *param_1,ulong param_2,long param_3) { long lVar1; long *plVar2; long lVar3; long *plVar4; long *plVar5; lVar3 = (param_2 & 0xfffffffffffffffe) + (ulong)((uint)param_1[4] & 1) + -0x28; param_1[4] = lVar3; if (param_3 != 0) { lVar1 = param_3 + 0x18; if ((param_1[2] != 0) && (*(long *)(param_1[2] + 0x10) == lVar1)) { return; } plVar2 = (long *)*param_1; plVar4 = param_1; plVar5 = param_1; if (plVar2 != (long *)0x0) { do { if (plVar2[2] == lVar1) { param_1[2] = (long)plVar2; return; } plVar5 = plVar2; if (plVar2[1] + 0x18 == plVar2[2]) { *plVar4 = *plVar2; my_free(); plVar5 = plVar4; } plVar2 = (long *)*plVar5; plVar4 = plVar5; } while (plVar2 != (long *)0x0); lVar3 = param_1[4]; } plVar2 = (long *)my_malloc((int)param_1[7],lVar1,((uint)lVar3 & 1) << 0x10); if (plVar2 != (long *)0x0) { plVar2[2] = lVar1; plVar2[1] = param_3; *plVar2 = *plVar5; param_1[2] = (long)plVar2; *plVar5 = (long)plVar2; return; } } param_1[2] = 0; return; }
46,280
flux::parser::Parser::typeDeclaration()
kvthweatt[P]FluxLang/src/parser/parser.cpp
std::unique_ptr<Decl> Parser::typeDeclaration() { // Parse the type name auto name = consume(lexer::TokenType::IDENTIFIER, "Expected type name"); // Parse the underlying type auto underlyingType = type(); if (!underlyingType) { error("Expected underlying type"); return nullptr; } consume(lexer::TokenType::SEMICOLON, "Expected ';' after type declaration"); return std::make_unique<TypeDecl>( name.lexeme(), std::move(underlyingType), makeRange(name, previous_) ); }
O0
cpp
flux::parser::Parser::typeDeclaration(): pushq %rbp movq %rsp, %rbp subq $0x180, %rsp # imm = 0x180 movq %rdi, -0x170(%rbp) movq %rdi, %rax movq %rax, -0x168(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x160(%rbp) leaq 0x1a280(%rip), %rsi # 0x644d6 leaq -0x80(%rbp), %rdi callq 0xd130 movq -0x160(%rbp), %rsi movq -0x80(%rbp), %rcx movq -0x78(%rbp), %r8 leaq -0x70(%rbp), %rdi movl $0x5, %edx callq 0x43180 movq -0x160(%rbp), %rsi leaq -0x88(%rbp), %rdi callq 0x4c500 jmp 0x4a291 leaq -0x88(%rbp), %rdi callq 0x1f250 testb $0x1, %al jne 0x4a32d leaq 0x1a23d(%rip), %rsi # 0x644e9 leaq -0xa8(%rbp), %rdi callq 0xd130 movq -0x160(%rbp), %rdi movq -0xa8(%rbp), %rsi movq -0xa0(%rbp), %rdx callq 0x42ba0 jmp 0x4a2d4 movq -0x170(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x58f80 movl $0x1, -0xac(%rbp) jmp 0x4a415 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x90(%rbp) movl %eax, -0x94(%rbp) jmp 0x4a43a movq %rax, %rcx movl %edx, %eax movq %rcx, -0x90(%rbp) movl %eax, -0x94(%rbp) leaq -0x88(%rbp), %rdi callq 0x1ea30 jmp 0x4a43a leaq 0x1a1ce(%rip), %rsi # 0x64502 leaq -0x120(%rbp), %rdi callq 0xd130 movq -0x160(%rbp), %rsi movq -0x120(%rbp), %rcx movq -0x118(%rbp), %r8 leaq -0x110(%rbp), %rdi movl $0x58, %edx callq 0x43180 jmp 0x4a368 leaq -0x110(%rbp), %rdi callq 0xa300 leaq -0x70(%rbp), %rdi callq 0x2a860 movq %rdx, -0x180(%rbp) movq %rax, -0x178(%rbp) jmp 0x4a38d movq -0x160(%rbp), %rsi movq -0x180(%rbp), %rax movq -0x178(%rbp), %rcx movq %rcx, -0x138(%rbp) movq %rax, -0x130(%rbp) movq %rsi, %rcx addq $0x68, %rcx leaq -0x158(%rbp), %rdi leaq -0x70(%rbp), %rdx callq 0x43570 jmp 0x4a3c9 leaq -0x128(%rbp), %rdi leaq -0x138(%rbp), %rsi leaq -0x88(%rbp), %rdx leaq -0x158(%rbp), %rcx callq 0x5b140 jmp 0x4a3ec movq -0x170(%rbp), %rdi leaq -0x128(%rbp), %rsi callq 0x21e70 leaq -0x128(%rbp), %rdi callq 0x21ec0 movl $0x1, -0xac(%rbp) leaq -0x88(%rbp), %rdi callq 0x1ea30 leaq -0x70(%rbp), %rdi callq 0xa300 movq -0x168(%rbp), %rax addq $0x180, %rsp # imm = 0x180 popq %rbp retq leaq -0x70(%rbp), %rdi callq 0xa300 movq -0x90(%rbp), %rdi callq 0x75a0 nop
_ZN4flux6parser6Parser15typeDeclarationEv: push rbp mov rbp, rsp sub rsp, 180h mov [rbp+var_170], rdi mov rax, rdi mov [rbp+var_168], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_160], rax lea rsi, aExpectedTypeNa; "Expected type name" lea rdi, [rbp+var_80] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rsi, [rbp+var_160] mov rcx, [rbp+var_80] mov r8, [rbp+var_78] lea rdi, [rbp+var_70] mov edx, 5 call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) mov rsi, [rbp+var_160] lea rdi, [rbp+var_88]; this call _ZN4flux6parser6Parser4typeEv; flux::parser::Parser::type(void) jmp short $+2 loc_4A291: lea rdi, [rbp+var_88] call _ZNKSt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS2_EEcvbEv; std::unique_ptr<flux::parser::TypeExpr>::operator bool(void) test al, 1 jnz loc_4A32D lea rsi, aExpectedUnderl; "Expected underlying type" lea rdi, [rbp+var_A8] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdi, [rbp+var_160] mov rsi, [rbp+var_A8] mov rdx, [rbp+var_A0] call _ZN4flux6parser6Parser5errorESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::error(std::string_view) jmp short $+2 loc_4A2D4: mov rdi, [rbp+var_170] xor eax, eax mov esi, eax call _ZNSt10unique_ptrIN4flux6parser4DeclESt14default_deleteIS2_EEC2IS4_vEEDn; std::unique_ptr<flux::parser::Decl>::unique_ptr<std::default_delete<flux::parser::Decl>,void>(decltype(nullptr)) mov [rbp+var_AC], 1 jmp loc_4A415 mov rcx, rax mov eax, edx mov [rbp+var_90], rcx mov [rbp+var_94], eax jmp loc_4A43A mov rcx, rax mov eax, edx mov [rbp+var_90], rcx mov [rbp+var_94], eax lea rdi, [rbp+var_88] call _ZNSt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::TypeExpr>::~unique_ptr() jmp loc_4A43A loc_4A32D: lea rsi, aExpectedAfterT_1; "Expected ';' after type declaration" lea rdi, [rbp+var_120] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rsi, [rbp+var_160] mov rcx, [rbp+var_120] mov r8, [rbp+var_118] lea rdi, [rbp+var_110] mov edx, 58h ; 'X' call _ZN4flux6parser6Parser7consumeENS_5lexer9TokenTypeESt17basic_string_viewIcSt11char_traitsIcEE; flux::parser::Parser::consume(flux::lexer::TokenType,std::string_view) jmp short $+2 loc_4A368: lea rdi, [rbp+var_110]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() lea rdi, [rbp+var_70]; this call _ZNK4flux5lexer5Token6lexemeEv; flux::lexer::Token::lexeme(void) mov [rbp+var_180], rdx mov [rbp+var_178], rax jmp short $+2 loc_4A38D: mov rsi, [rbp+var_160]; flux::lexer::Token * mov rax, [rbp+var_180] mov rcx, [rbp+var_178] mov [rbp+var_138], rcx mov [rbp+var_130], rax mov rcx, rsi add rcx, 68h ; 'h' lea rdi, [rbp+var_158]; this lea rdx, [rbp+var_70]; flux::lexer::Token * call _ZNK4flux6parser6Parser9makeRangeERKNS_5lexer5TokenES5_; flux::parser::Parser::makeRange(flux::lexer::Token const&,flux::lexer::Token const&) jmp short $+2 loc_4A3C9: lea rdi, [rbp+var_128] lea rsi, [rbp+var_138] lea rdx, [rbp+var_88] lea rcx, [rbp+var_158] call _ZSt11make_uniqueIN4flux6parser8TypeDeclEJSt17basic_string_viewIcSt11char_traitsIcEESt10unique_ptrINS1_8TypeExprESt14default_deleteIS8_EENS0_6common11SourceRangeEEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<flux::parser::TypeDecl,std::string_view,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange>(std::string_view,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange &&) jmp short $+2 loc_4A3EC: mov rdi, [rbp+var_170] lea rsi, [rbp+var_128] call _ZNSt10unique_ptrIN4flux6parser4DeclESt14default_deleteIS2_EEC2INS1_8TypeDeclES3_IS7_EvEEOS_IT_T0_E; std::unique_ptr<flux::parser::Decl>::unique_ptr<flux::parser::TypeDecl,std::default_delete<flux::parser::TypeDecl>,void>(std::unique_ptr&&<flux::parser::TypeDecl,std::default_delete<flux::parser::TypeDecl>>) lea rdi, [rbp+var_128] call _ZNSt10unique_ptrIN4flux6parser8TypeDeclESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::TypeDecl>::~unique_ptr() mov [rbp+var_AC], 1 loc_4A415: lea rdi, [rbp+var_88] call _ZNSt10unique_ptrIN4flux6parser8TypeExprESt14default_deleteIS2_EED2Ev; std::unique_ptr<flux::parser::TypeExpr>::~unique_ptr() lea rdi, [rbp+var_70]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() mov rax, [rbp+var_168] add rsp, 180h pop rbp retn loc_4A43A: lea rdi, [rbp+var_70]; this call _ZN4flux5lexer5TokenD2Ev; flux::lexer::Token::~Token() mov rdi, [rbp+var_90] call __Unwind_Resume
flux::parser::Parser * flux::parser::Parser::typeDeclaration(flux::parser::Parser *this, _BYTE *a2) { long long v2; // rdx _BYTE v4[32]; // [rsp+28h] [rbp-158h] BYREF _QWORD v5[2]; // [rsp+48h] [rbp-138h] BYREF _BYTE v6[8]; // [rsp+58h] [rbp-128h] BYREF long long v7[2]; // [rsp+60h] [rbp-120h] BYREF _BYTE v8[100]; // [rsp+70h] [rbp-110h] BYREF int v9; // [rsp+D4h] [rbp-ACh] long long v10[2]; // [rsp+D8h] [rbp-A8h] BYREF _BYTE v11[8]; // [rsp+F8h] [rbp-88h] BYREF long long v12[2]; // [rsp+100h] [rbp-80h] BYREF _BYTE v13[96]; // [rsp+110h] [rbp-70h] BYREF _BYTE *v14; // [rsp+170h] [rbp-10h] flux::parser::Parser *v15; // [rsp+178h] [rbp-8h] v15 = this; v14 = a2; std::string_view::basic_string_view(v12, (long long)"Expected type name"); flux::parser::Parser::consume((flux::parser::Parser *)v13, a2, 5, v12[0], v12[1]); flux::parser::Parser::type((flux::parser::Parser *)v11); if ( std::unique_ptr<flux::parser::TypeExpr>::operator bool((long long)v11) ) { std::string_view::basic_string_view(v7, (long long)"Expected ';' after type declaration"); flux::parser::Parser::consume((flux::parser::Parser *)v8, a2, 88, v7[0], v7[1]); flux::lexer::Token::~Token((flux::lexer::Token *)v8); v5[0] = flux::lexer::Token::lexeme((flux::lexer::Token *)v13); v5[1] = v2; flux::parser::Parser::makeRange( (flux::parser::Parser *)v4, (const flux::lexer::Token *)a2, (const flux::lexer::Token *)v13, (flux::lexer::Token *)(a2 + 104)); std::make_unique<flux::parser::TypeDecl,std::string_view,std::unique_ptr<flux::parser::TypeExpr>,flux::common::SourceRange>( v6, v5, v11, v4); std::unique_ptr<flux::parser::Decl>::unique_ptr<flux::parser::TypeDecl,std::default_delete<flux::parser::TypeDecl>,void>( (long long)this, (long long)v6); std::unique_ptr<flux::parser::TypeDecl>::~unique_ptr((long long)v6); } else { std::string_view::basic_string_view(v10, (long long)"Expected underlying type"); flux::parser::Parser::error((long long)a2, v10[0], v10[1]); std::unique_ptr<flux::parser::Decl>::unique_ptr<std::default_delete<flux::parser::Decl>,void>(this, 0LL); } v9 = 1; std::unique_ptr<flux::parser::TypeExpr>::~unique_ptr((long long)v11); flux::lexer::Token::~Token((flux::lexer::Token *)v13); return this; }
typeDeclaration: PUSH RBP MOV RBP,RSP SUB RSP,0x180 MOV qword ptr [RBP + -0x170],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x168],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x160],RAX LEA RSI,[0x1644d6] LEA RDI,[RBP + -0x80] CALL 0x0010d130 MOV RSI,qword ptr [RBP + -0x160] MOV RCX,qword ptr [RBP + -0x80] MOV R8,qword ptr [RBP + -0x78] LEA RDI,[RBP + -0x70] MOV EDX,0x5 CALL 0x00143180 MOV RSI,qword ptr [RBP + -0x160] LAB_0014a283: LEA RDI,[RBP + -0x88] CALL 0x0014c500 JMP 0x0014a291 LAB_0014a291: LEA RDI,[RBP + -0x88] CALL 0x0011f250 TEST AL,0x1 JNZ 0x0014a32d LEA RSI,[0x1644e9] LEA RDI,[RBP + -0xa8] CALL 0x0010d130 MOV RDI,qword ptr [RBP + -0x160] MOV RSI,qword ptr [RBP + -0xa8] MOV RDX,qword ptr [RBP + -0xa0] LAB_0014a2cd: CALL 0x00142ba0 JMP 0x0014a2d4 LAB_0014a2d4: MOV RDI,qword ptr [RBP + -0x170] XOR EAX,EAX MOV ESI,EAX CALL 0x00158f80 MOV dword ptr [RBP + -0xac],0x1 JMP 0x0014a415 LAB_0014a32d: LEA RSI,[0x164502] LEA RDI,[RBP + -0x120] CALL 0x0010d130 MOV RSI,qword ptr [RBP + -0x160] MOV RCX,qword ptr [RBP + -0x120] MOV R8,qword ptr [RBP + -0x118] LEA RDI,[RBP + -0x110] MOV EDX,0x58 CALL 0x00143180 JMP 0x0014a368 LAB_0014a368: LEA RDI,[RBP + -0x110] CALL 0x0010a300 LEA RDI,[RBP + -0x70] CALL 0x0012a860 MOV qword ptr [RBP + -0x180],RDX MOV qword ptr [RBP + -0x178],RAX JMP 0x0014a38d LAB_0014a38d: MOV RSI,qword ptr [RBP + -0x160] MOV RAX,qword ptr [RBP + -0x180] MOV RCX,qword ptr [RBP + -0x178] MOV qword ptr [RBP + -0x138],RCX MOV qword ptr [RBP + -0x130],RAX MOV RCX,RSI ADD RCX,0x68 LEA RDI,[RBP + -0x158] LEA RDX,[RBP + -0x70] CALL 0x00143570 JMP 0x0014a3c9 LAB_0014a3c9: LEA RDI,[RBP + -0x128] LEA RSI,[RBP + -0x138] LEA RDX,[RBP + -0x88] LEA RCX,[RBP + -0x158] CALL 0x0015b140 LAB_0014a3ea: JMP 0x0014a3ec LAB_0014a3ec: MOV RDI,qword ptr [RBP + -0x170] LEA RSI,[RBP + -0x128] CALL 0x00121e70 LEA RDI,[RBP + -0x128] CALL 0x00121ec0 MOV dword ptr [RBP + -0xac],0x1 LAB_0014a415: LEA RDI,[RBP + -0x88] CALL 0x0011ea30 LEA RDI,[RBP + -0x70] CALL 0x0010a300 MOV RAX,qword ptr [RBP + -0x168] ADD RSP,0x180 POP RBP RET
/* flux::parser::Parser::typeDeclaration() */ unique_ptr<flux::parser::Decl,std::default_delete<flux::parser::Decl>> * flux::parser::Parser::typeDeclaration(void) { bool bVar1; Token *in_RSI; unique_ptr<flux::parser::Decl,std::default_delete<flux::parser::Decl>> *in_RDI; Token local_160 [32]; int1 local_140 [16]; unique_ptr local_130 [8]; int8 local_128; int8 local_120; Token local_118 [100]; int4 local_b4; int8 local_b0; int8 local_a8; unique_ptr local_90 [8]; int8 local_88; int8 local_80; Token local_78 [112]; std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_88,"Expected type name"); consume(local_78,in_RSI,5,local_88,local_80); /* try { // try from 0014a283 to 0014a28e has its CatchHandler @ 0014a2f3 */ type(); bVar1 = std::unique_ptr::operator_cast_to_bool(local_90); if (bVar1) { std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_128, "Expected \';\' after type declaration"); consume(local_118,in_RSI,0x58,local_128,local_120); lexer::Token::~Token(local_118); local_140 = lexer::Token::lexeme(local_78); makeRange(local_160,in_RSI); std:: make_unique<flux::parser::TypeDecl,std::basic_string_view<char,std::char_traits<char>>,std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>,flux::common::SourceRange> (local_130,(unique_ptr *)local_140,(SourceRange *)local_90); std::unique_ptr<flux::parser::Decl,std::default_delete<flux::parser::Decl>>:: unique_ptr<flux::parser::TypeDecl,std::default_delete<flux::parser::TypeDecl>,void> (in_RDI,local_130); std::unique_ptr<flux::parser::TypeDecl,std::default_delete<flux::parser::TypeDecl>>::~unique_ptr ((unique_ptr<flux::parser::TypeDecl,std::default_delete<flux::parser::TypeDecl>> *) local_130); } else { std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_b0, "Expected underlying type"); /* try { // try from 0014a2cd to 0014a3e9 has its CatchHandler @ 0014a30a */ error(in_RSI,local_b0,local_a8); std::unique_ptr<flux::parser::Decl,std::default_delete<flux::parser::Decl>>:: unique_ptr<std::default_delete<flux::parser::Decl>,void>((_func_decltype_nullptr *)in_RDI); } local_b4 = 1; std::unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>>::~unique_ptr ((unique_ptr<flux::parser::TypeExpr,std::default_delete<flux::parser::TypeExpr>> *) local_90); lexer::Token::~Token(local_78); return in_RDI; }
46,281
my_open
eloqsql/mysys/my_open.c
File my_open(const char *FileName, int Flags, myf MyFlags) /* Path-name of file */ /* Read | write .. */ /* Special flags */ { File fd; DBUG_ENTER("my_open"); DBUG_PRINT("my",("Name: '%s' Flags: %d MyFlags: %lu", FileName, Flags, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE | MY_FFNF))) MyFlags|= my_global_flags; #if defined(_WIN32) fd= my_win_open(FileName, Flags); #else if (MyFlags & MY_NOSYMLINKS) fd = open_nosymlinks(FileName, Flags | O_CLOEXEC, my_umask); else fd = open(FileName, Flags | O_CLOEXEC, my_umask); #endif fd= my_register_filename(fd, FileName, FILE_BY_OPEN, EE_FILENOTFOUND, MyFlags); DBUG_RETURN(fd); }
O3
c
my_open: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %esi, %r15d movq %rdi, %rbx testb $0x19, %dl jne 0x3069e leaq 0x348dff(%rip), %rax # 0x379498 movq (%rax), %r14 jmp 0x306a1 xorl %r14d, %r14d orq %rdx, %r14 btl $0x9, %r14d jb 0x306cd orl $0x80000, %r15d # imm = 0x80000 leaq 0x2c9faf(%rip), %rax # 0x2fa668 movl (%rax), %edx movq %rbx, %rdi movl %r15d, %esi xorl %eax, %eax callq 0x24680 movl %eax, %r15d jmp 0x30719 leaq 0x2c9f94(%rip), %rax # 0x2fa668 movl (%rax), %r12d leaq -0x24(%rbp), %rsi movq %rbx, %rdi callq 0x3113c testq %rax, %rax je 0x30713 movl -0x24(%rbp), %edi orl $0xa0000, %r15d # imm = 0xA0000 movq %rax, %rsi movl %r15d, %edx movl %r12d, %ecx xorl %eax, %eax callq 0x24340 movl %eax, %r15d movl -0x24(%rbp), %edi testl %edi, %edi js 0x30719 callq 0x24710 jmp 0x30719 movl $0xffffffff, %r15d # imm = 0xFFFFFFFF movl %r15d, %edi movq %rbx, %rsi movl $0x1, %edx movl $0x1d, %ecx movq %r14, %r8 callq 0x3073e addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
my_open: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov r15d, esi mov rbx, rdi test dl, 19h jnz short loc_3069E lea rax, my_global_flags mov r14, [rax] jmp short loc_306A1 loc_3069E: xor r14d, r14d loc_306A1: or r14, rdx bt r14d, 9 jb short loc_306CD or r15d, 80000h lea rax, my_umask mov edx, [rax] mov rdi, rbx mov esi, r15d xor eax, eax call _open64 mov r15d, eax jmp short loc_30719 loc_306CD: lea rax, my_umask mov r12d, [rax] lea rsi, [rbp+var_24] mov rdi, rbx call my_open_parent_dir_nosymlinks test rax, rax jz short loc_30713 mov edi, [rbp+var_24] or r15d, 0A0000h mov rsi, rax mov edx, r15d mov ecx, r12d xor eax, eax call _openat64 mov r15d, eax mov edi, [rbp+var_24] test edi, edi js short loc_30719 call _close jmp short loc_30719 loc_30713: mov r15d, 0FFFFFFFFh loc_30719: mov edi, r15d mov rsi, rbx mov edx, 1 mov ecx, 1Dh mov r8, r14 call my_register_filename add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long my_open(long long a1, int a2, long long a3) { long long v3; // r14 long long v4; // r14 unsigned int v5; // r15d unsigned int v6; // r12d long long v7; // rax int v9[9]; // [rsp+Ch] [rbp-24h] BYREF if ( (a3 & 0x19) != 0 ) v3 = 0LL; else v3 = my_global_flags; v4 = a3 | v3; if ( (v4 & 0x200) != 0 ) { v6 = my_umask; v7 = my_open_parent_dir_nosymlinks(a1, v9); if ( v7 ) { v5 = openat64((unsigned int)v9[0], v7, a2 | 0xA0000u, v6); if ( v9[0] >= 0 ) close(); } else { v5 = -1; } } else { v5 = open64(a1, a2 | 0x80000u, my_umask); } return my_register_filename(v5, a1, 1LL, 29LL, v4); }
my_open: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R15D,ESI MOV RBX,RDI TEST DL,0x19 JNZ 0x0013069e LEA RAX,[0x479498] MOV R14,qword ptr [RAX] JMP 0x001306a1 LAB_0013069e: XOR R14D,R14D LAB_001306a1: OR R14,RDX BT R14D,0x9 JC 0x001306cd OR R15D,0x80000 LEA RAX,[0x3fa668] MOV EDX,dword ptr [RAX] MOV RDI,RBX MOV ESI,R15D XOR EAX,EAX CALL 0x00124680 MOV R15D,EAX JMP 0x00130719 LAB_001306cd: LEA RAX,[0x3fa668] MOV R12D,dword ptr [RAX] LEA RSI,[RBP + -0x24] MOV RDI,RBX CALL 0x0013113c TEST RAX,RAX JZ 0x00130713 MOV EDI,dword ptr [RBP + -0x24] OR R15D,0xa0000 MOV RSI,RAX MOV EDX,R15D MOV ECX,R12D XOR EAX,EAX CALL 0x00124340 MOV R15D,EAX MOV EDI,dword ptr [RBP + -0x24] TEST EDI,EDI JS 0x00130719 CALL 0x00124710 JMP 0x00130719 LAB_00130713: MOV R15D,0xffffffff LAB_00130719: MOV EDI,R15D MOV RSI,RBX MOV EDX,0x1 MOV ECX,0x1d MOV R8,R14 CALL 0x0013073e ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
void my_open(char *param_1,uint param_2,ulong param_3) { uint uVar1; int iVar2; char *__file; ulong uVar3; int local_2c; uVar1 = my_umask; uVar3 = my_global_flags; if ((param_3 & 0x19) != 0) { uVar3 = 0; } if (((uint)(uVar3 | param_3) >> 9 & 1) == 0) { iVar2 = open64(param_1,param_2 | 0x80000,(ulong)my_umask); } else { __file = (char *)my_open_parent_dir_nosymlinks(param_1,&local_2c); if (__file == (char *)0x0) { iVar2 = -1; } else { iVar2 = openat64(local_2c,__file,param_2 | 0xa0000,(ulong)uVar1); if (-1 < local_2c) { close(local_2c); } } } my_register_filename(iVar2,param_1,1,0x1d,uVar3 | param_3); return; }
46,282
ma_get_indicator
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
static signed char ma_get_indicator(MYSQL_STMT *stmt, unsigned int param_nr, unsigned long row_nr) { if (!MARIADB_STMT_BULK_SUPPORTED(stmt) || !stmt->array_size || !stmt->params[param_nr].u.indicator) return 0; if (stmt->param_callback) return *stmt->params[param_nr].u.indicator; if (stmt->row_size) return *((char *)stmt->params[param_nr].u.indicator + (row_nr * stmt->row_size)); return stmt->params[param_nr].u.indicator[row_nr]; }
O0
c
ma_get_indicator: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x2b7c6 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x370(%rax), %rax andq $0x1, %rax cmpq $0x0, %rax jne 0x2b7c6 movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq 0x4f0(%rax), %rax movq 0x70(%rax), %rax andq $0x4, %rax cmpq $0x0, %rax je 0x2b7c6 movq -0x10(%rbp), %rax cmpl $0x0, 0x368(%rax) je 0x2b7c6 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax cmpq $0x0, 0x20(%rax) jne 0x2b7cf movb $0x0, -0x1(%rbp) jmp 0x2b856 movq -0x10(%rbp), %rax cmpq $0x0, 0x390(%rax) je 0x2b7fa movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x20(%rax), %rax movb (%rax), %al movb %al, -0x1(%rbp) jmp 0x2b856 movq -0x10(%rbp), %rax cmpq $0x0, 0x370(%rax) je 0x2b836 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x20(%rax), %rax movq -0x20(%rbp), %rcx movq -0x10(%rbp), %rdx imulq 0x370(%rdx), %rcx movb (%rax,%rcx), %al movb %al, -0x1(%rbp) jmp 0x2b856 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq 0x20(%rax), %rax movq -0x20(%rbp), %rcx movb (%rax,%rcx), %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax,%rax)
ma_get_indicator: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jz short loc_2B7C6 mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+370h] and rax, 1 cmp rax, 0 jnz short loc_2B7C6 mov rax, [rbp+var_10] mov rax, [rax+38h] mov rax, [rax+4F0h] mov rax, [rax+70h] and rax, 4 cmp rax, 0 jz short loc_2B7C6 mov rax, [rbp+var_10] cmp dword ptr [rax+368h], 0 jz short loc_2B7C6 mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx cmp qword ptr [rax+20h], 0 jnz short loc_2B7CF loc_2B7C6: mov [rbp+var_1], 0 jmp loc_2B856 loc_2B7CF: mov rax, [rbp+var_10] cmp qword ptr [rax+390h], 0 jz short loc_2B7FA mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+20h] mov al, [rax] mov [rbp+var_1], al jmp short loc_2B856 loc_2B7FA: mov rax, [rbp+var_10] cmp qword ptr [rax+370h], 0 jz short loc_2B836 mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+20h] mov rcx, [rbp+var_20] mov rdx, [rbp+var_10] imul rcx, [rdx+370h] mov al, [rax+rcx] mov [rbp+var_1], al jmp short loc_2B856 loc_2B836: mov rax, [rbp+var_10] mov rax, [rax+70h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov rax, [rax+20h] mov rcx, [rbp+var_20] mov al, [rax+rcx] mov [rbp+var_1], al loc_2B856: mov al, [rbp+var_1] pop rbp retn
char ma_get_indicator(long long a1, unsigned int a2, long long a3) { if ( !*(_QWORD *)(a1 + 56) || (*(_QWORD *)(*(_QWORD *)(a1 + 56) + 880LL) & 1LL) != 0 || (*(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 56) + 1264LL) + 112LL) & 4LL) == 0 || !*(_DWORD *)(a1 + 872) || !*(_QWORD *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 32) ) { return 0; } if ( *(_QWORD *)(a1 + 912) ) return **(_BYTE **)(112LL * a2 + *(_QWORD *)(a1 + 112) + 32); if ( *(_QWORD *)(a1 + 880) ) return *(_BYTE *)(*(_QWORD *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 32) + *(_QWORD *)(a1 + 880) * a3); else return *(_BYTE *)(*(_QWORD *)(112LL * a2 + *(_QWORD *)(a1 + 112) + 32) + a3); }
ma_get_indicator: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JZ 0x0012b7c6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x370] AND RAX,0x1 CMP RAX,0x0 JNZ 0x0012b7c6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RAX,qword ptr [RAX + 0x4f0] MOV RAX,qword ptr [RAX + 0x70] AND RAX,0x4 CMP RAX,0x0 JZ 0x0012b7c6 MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x368],0x0 JZ 0x0012b7c6 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX CMP qword ptr [RAX + 0x20],0x0 JNZ 0x0012b7cf LAB_0012b7c6: MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012b856 LAB_0012b7cf: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x390],0x0 JZ 0x0012b7fa MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x1],AL JMP 0x0012b856 LAB_0012b7fa: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x370],0x0 JZ 0x0012b836 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x10] IMUL RCX,qword ptr [RDX + 0x370] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x1],AL JMP 0x0012b856 LAB_0012b836: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x1],AL LAB_0012b856: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int1 ma_get_indicator(long param_1,uint param_2,long param_3) { int1 local_9; if ((((*(long *)(param_1 + 0x38) == 0) || ((*(ulong *)(*(long *)(param_1 + 0x38) + 0x370) & 1) != 0)) || ((*(ulong *)(*(long *)(*(long *)(param_1 + 0x38) + 0x4f0) + 0x70) & 4) == 0)) || ((*(int *)(param_1 + 0x368) == 0 || (*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x20) == 0)))) { local_9 = 0; } else if (*(long *)(param_1 + 0x390) == 0) { if (*(long *)(param_1 + 0x370) == 0) { local_9 = *(int1 *) (*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x20) + param_3); } else { local_9 = *(int1 *) (*(long *)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x20) + param_3 * *(long *)(param_1 + 0x370)); } } else { local_9 = **(int1 **)(*(long *)(param_1 + 0x70) + (ulong)param_2 * 0x70 + 0x20); } return local_9; }
46,283
common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&)
monkey531[P]llama/common/chat.cpp
static common_chat_params common_chat_params_init_command_r7b(const common_chat_template & tmpl, const struct common_chat_inputs & inputs) { common_chat_params data; data.grammar_lazy = inputs.tool_choice != "required"; data.grammar = build_grammar([&](const common_grammar_builder & builder) { auto schemas = json::array(); foreach_function(inputs.tools, [&](const json & tool) { const auto & function = tool["function"]; schemas.push_back({ {"type", "object"}, {"properties", { {"tool_call_id", { {"type", "string"}, // Command-R's template expects an integer string. {"pattern", "^[0-9]{1,10}$"}, }}, {"tool_name", { {"type", "string"}, {"const", function["name"]}, }}, {"parameters", function["parameters"]}, }}, {"required", json::array({"tool_call_id", "tool_name", "parameters"})}, }); }); auto schema = json { {"type", "array"}, {"items", schemas.size() == 1 ? schemas[0] : json {{"anyOf", schemas}}}, {"minItems", 1}, }; if (!inputs.parallel_tool_calls) { schema["maxItems"] = 1; } builder.add_rule("root", "\"<|START_ACTION|>\" " + builder.add_schema("tool_calls", schema) + " \"<|END_ACTION|>\""); }, grammar_options); data.grammar_triggers.push_back({"<|START_ACTION|>", /* .at_start = */ false}); data.preserved_tokens = { "<|START_RESPONSE|>", "<|END_RESPONSE|>", "<|START_THINKING|>", "<|END_THINKING|>", "<|END_ACTION|>", }; data.prompt = tmpl.apply(inputs.messages, inputs.tools.empty() ? json() : inputs.tools, inputs.add_generation_prompt); data.format = COMMON_CHAT_FORMAT_COMMAND_R7B; return data; }
O1
cpp
common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rdx, %r14 movq %rsi, %rbp movq %rdi, %rbx movl $0x0, (%rdi) xorl %eax, %eax movb %al, 0x8(%rdi) movq %rax, 0x10(%rdi) leaq 0x28(%rdi), %rcx movq %rcx, 0x18(%rdi) movq %rax, 0x20(%rdi) movb %al, 0x28(%rdi) movb %al, 0x38(%rdi) xorps %xmm0, %xmm0 movups %xmm0, 0x40(%rdi) movups %xmm0, 0x50(%rdi) movups %xmm0, 0x60(%rdi) movups %xmm0, 0x70(%rdi) movq %rax, 0x80(%rdi) leaq 0x20(%rdx), %rdi leaq 0x20065(%rip), %rsi # 0xba85c callq 0x84415 movb %al, 0x38(%rbx) leaq 0x10(%rsp), %rsi xorps %xmm0, %xmm0 movaps %xmm0, (%rsi) movaps %xmm0, 0x10(%rsi) movq %r14, (%rsi) leaq 0xf2de(%rip), %rax # 0xa9af6 movq %rax, 0x18(%rsi) leaq 0xfc4d(%rip), %rax # 0xaa470 movq %rax, 0x10(%rsi) leaq 0x26336(%rip), %rdx # 0xc0b64 leaq 0x38(%rsp), %rdi callq 0x3b8f6 leaq 0x18(%rbx), %rdi leaq 0x38(%rsp), %r12 movq %r12, %rsi callq 0x19840 movq (%r12), %rdi leaq 0x48(%rsp), %r15 cmpq %r15, %rdi je 0x9a864 movq 0x48(%rsp), %rsi incq %rsi callq 0x196d0 movq 0x20(%rsp), %rax testq %rax, %rax je 0x9a87d leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x38(%rsp), %rdi movq %r15, (%rdi) leaq 0x273c4(%rip), %rsi # 0xc1c50 leaq 0x273cd(%rip), %rdx # 0xc1c60 callq 0x22f42 leaq 0x40(%rbx), %rdi leaq 0x38(%rsp), %rsi movb $0x0, 0x20(%rsi) callq 0xae68e movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x9a8c1 movq 0x48(%rsp), %rsi incq %rsi callq 0x196d0 leaq 0x38(%rsp), %r12 movq %r15, (%r12) leaq 0x27855(%rip), %rsi # 0xc2126 leaq 0x27860(%rip), %rdx # 0xc2138 movq %r12, %rdi callq 0x22f42 leaq 0x58(%rsp), %r12 leaq 0x68(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x27844(%rip), %rsi # 0xc2139 leaq 0x2784d(%rip), %rdx # 0xc2149 movq %r12, %rdi callq 0x22f42 leaq 0x78(%rsp), %r12 leaq 0x88(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x2782e(%rip), %rsi # 0xc214a leaq 0x27839(%rip), %rdx # 0xc215c movq %r12, %rdi callq 0x22f42 leaq 0x98(%rsp), %r12 leaq 0xa8(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x27817(%rip), %rsi # 0xc215d leaq 0x27820(%rip), %rdx # 0xc216d movq %r12, %rdi callq 0x22f42 leaq 0xb8(%rsp), %r12 leaq 0xc8(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x277fe(%rip), %rsi # 0xc216e leaq 0x27805(%rip), %rdx # 0xc217c movq %r12, %rdi callq 0x22f42 leaq 0x58(%rbx), %rdi leaq 0xd8(%rsp), %r15 leaq 0x38(%rsp), %rsi movq %r15, %rdx callq 0xaea8e movq $-0xa0, %r12 movq -0x10(%r13), %rdi cmpq %rdi, %r13 je 0x9a9b4 movq (%r13), %rsi incq %rsi callq 0x196d0 addq $-0x20, %r13 addq $0x20, %r12 jne 0x9a99f movzbl 0x10(%r14), %eax leal -0x1(%rax), %ecx cmpl $0x2, %ecx jae 0x9a9e8 movq 0x18(%r14), %rax movq (%rax), %rcx cmpq 0x8(%rax), %rcx je 0x9a9ec leaq 0x10(%r14), %rsi leaq 0x10(%rsp), %rdi callq 0x36864 jmp 0x9a9fa testl %eax, %eax jne 0x9a9d8 movb $0x0, 0x10(%rsp) movq $0x0, 0x18(%rsp) movzbl 0x68(%r14), %r8d leaq 0xd8(%rsp), %r9 movb $0x0, (%r9) movq $0x0, 0x8(%r9) movl $0x1, (%rsp) leaq 0x38(%rsp), %rdi leaq 0x10(%rsp), %rcx movq %rbp, %rsi movq %r14, %rdx callq 0x80e86 leaq 0xe8(%rsp), %rdi leaq 0x38(%rsp), %rsi leaq 0x48(%rsp), %r15 callq 0x515e6 movb 0x8(%rbx), %al leaq 0xe8(%rsp), %rdi movb (%rdi), %cl movb %cl, 0x8(%rbx) movb %al, (%rdi) movq 0x10(%rbx), %rax movq 0x8(%rdi), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x8(%rdi) callq 0x36dc4 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x9aa84 movq 0x48(%rsp), %rsi incq %rsi callq 0x196d0 leaq 0xd8(%rsp), %rdi callq 0x36dc4 leaq 0x10(%rsp), %rdi callq 0x36dc4 movl $0xa, (%rbx) movq %rbx, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9ab79 jmp 0x9abaa movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x9aadf movq 0x48(%rsp), %rsi incq %rsi callq 0x196d0 jmp 0x9aadf movq %rax, %r14 leaq 0xd8(%rsp), %rdi callq 0x36dc4 leaq 0x10(%rsp), %rdi callq 0x36dc4 jmp 0x9ab9a movq %rax, %r14 leaq 0x38(%rsp), %rsi movq %r15, %rdi callq 0x1c243 movb $0x1, %al jmp 0x9ab1c jmp 0x9ab17 jmp 0x9ab17 jmp 0x9ab17 jmp 0x9ab17 movq %rax, %r14 xorl %eax, %eax leaq 0x38(%rsp), %rcx cmpq %r12, %rcx sete %cl orb %al, %cl jne 0x9ab9a addq $-0x10, %r12 leaq 0x38(%rsp), %r15 movq -0x10(%r12), %rdi cmpq %rdi, %r12 je 0x9ab4a movq (%r12), %rsi incq %rsi callq 0x196d0 leaq -0x20(%r12), %rax addq $-0x10, %r12 cmpq %r15, %r12 movq %rax, %r12 jne 0x9ab34 jmp 0x9ab9a movq %rax, %r14 movq 0x38(%rsp), %rdi cmpq %r15, %rdi je 0x9ab9a movq 0x48(%rsp), %rsi incq %rsi callq 0x196d0 jmp 0x9ab9a movq %rax, %r14 jmp 0x9ab9a movq %rax, %r14 movq 0x20(%rsp), %rax testq %rax, %rax je 0x9ab9a leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x5f36a movq %r14, %rdi callq 0x19c00 movq %rax, %rdi callq 0x22f37
_ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r14, rdx mov rbp, rsi mov rbx, rdi mov dword ptr [rdi], 0 xor eax, eax mov [rdi+8], al mov [rdi+10h], rax lea rcx, [rdi+28h] mov [rdi+18h], rcx mov [rdi+20h], rax mov [rdi+28h], al mov [rdi+38h], al xorps xmm0, xmm0 movups xmmword ptr [rdi+40h], xmm0 movups xmmword ptr [rdi+50h], xmm0 movups xmmword ptr [rdi+60h], xmm0 movups xmmword ptr [rdi+70h], xmm0 mov [rdi+80h], rax lea rdi, [rdx+20h] lea rsi, aRequired; "required" call _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ mov [rbx+38h], al lea rsi, [rsp+128h+var_118] xorps xmm0, xmm0 movaps xmmword ptr [rsi], xmm0 movaps xmmword ptr [rsi+10h], xmm0 mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke(std::_Any_data const&,common_grammar_builder const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFvRK22common_grammar_builderEZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputsE3$_0E10_M_managerERSt9_Any_dataRKSD_St18_Manager_operation; std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax lea rdx, _ZL15grammar_options; grammar_options lea rdi, [rsp+128h+var_F0] call _Z13build_grammarB5cxx11RKSt8functionIFvRK22common_grammar_builderEERK22common_grammar_options; build_grammar(std::function<void ()(common_grammar_builder const&)> const&,common_grammar_options const&) lea rdi, [rbx+18h] lea r12, [rsp+128h+var_F0] mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [r12]; void * lea r15, [rsp+128h+var_E0] cmp rdi, r15 jz short loc_9A864 mov rsi, [rsp+128h+var_E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9A864: mov rax, [rsp+128h+var_108] test rax, rax jz short loc_9A87D lea rdi, [rsp+128h+var_118] mov rsi, rdi mov edx, 3 call rax loc_9A87D: lea rdi, [rsp+128h+var_F0] mov [rdi], r15 lea rsi, aEndThinkingSta+10h; "<|START_ACTION|>" lea rdx, aEndThinkingSta+20h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rbx+40h] lea rsi, [rsp+128h+var_F0] mov byte ptr [rsi+20h], 0 call _ZNSt6vectorI22common_grammar_triggerSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>(common_grammar_trigger &&) mov rdi, [rsp+128h+var_F0]; void * cmp rdi, r15 jz short loc_9A8C1 mov rsi, [rsp+128h+var_E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9A8C1: lea r12, [rsp+128h+var_F0] mov [r12], r15 lea rsi, aStartResponse; "<|START_RESPONSE|>" lea rdx, aStartResponse+12h; "" mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r12, [rsp+128h+var_D0] lea rax, [rsp+128h+var_C0] mov [rax-10h], rax lea rsi, aEndResponse; "<|END_RESPONSE|>" lea rdx, aEndResponse+10h; "" mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r12, [rsp+128h+var_B0] lea rax, [rsp+128h+var_A0] mov [rax-10h], rax lea rsi, aStartThinking; "<|START_THINKING|>" lea rdx, aStartThinking+12h; "" mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r12, [rsp+128h+var_90] lea rax, [rsp+128h+var_80] mov [rax-10h], rax lea rsi, aEndThinking; "<|END_THINKING|>" lea rdx, aEndThinking+10h; "" mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea r12, [rsp+128h+var_70] lea r13, [rsp+128h+var_60] mov [r13-10h], r13 lea rsi, aEndAction; "<|END_ACTION|>" lea rdx, aEndAction+0Eh; "" mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rdi, [rbx+58h] lea r15, [rsp+128h+var_50] lea rsi, [rsp+128h+var_F0] mov rdx, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE13_M_assign_auxIPKS5_EEvT_SB_St20forward_iterator_tag; std::vector<std::string>::_M_assign_aux<std::string const*>(std::string const*,std::string const*,std::forward_iterator_tag) mov r12, 0FFFFFFFFFFFFFF60h loc_9A99F: mov rdi, [r13-10h]; void * cmp r13, rdi jz short loc_9A9B4 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9A9B4: add r13, 0FFFFFFFFFFFFFFE0h add r12, 20h ; ' ' jnz short loc_9A99F movzx eax, byte ptr [r14+10h] lea ecx, [rax-1] cmp ecx, 2 jnb short loc_9A9E8 mov rax, [r14+18h] mov rcx, [rax] cmp rcx, [rax+8] jz short loc_9A9EC loc_9A9D8: lea rsi, [r14+10h] lea rdi, [rsp+128h+var_118] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; 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>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_9A9FA loc_9A9E8: test eax, eax jnz short loc_9A9D8 loc_9A9EC: mov [rsp+128h+var_118], 0 mov [rsp+128h+var_110], 0 loc_9A9FA: movzx r8d, byte ptr [r14+68h] lea r9, [rsp+128h+var_50] mov byte ptr [r9], 0 mov qword ptr [r9+8], 0 mov [rsp+128h+var_128], 1 lea rdi, [rsp+128h+var_F0] lea rcx, [rsp+128h+var_118] mov rsi, rbp mov rdx, r14 call _ZNK5minja13chat_template5applyERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEESH_bSH_b; minja::chat_template::apply(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,bool) lea rdi, [rsp+128h+var_40] lea rsi, [rsp+128h+var_F0] lea r15, [rsp+128h+var_E0] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ mov al, [rbx+8] lea rdi, [rsp+128h+var_40] mov cl, [rdi] mov [rbx+8], cl mov [rdi], al mov rax, [rbx+10h] mov rcx, [rdi+8] mov [rbx+10h], rcx mov [rdi+8], rax call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+128h+var_F0]; void * cmp rdi, r15 jz short loc_9AA84 mov rsi, [rsp+128h+var_E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9AA84: lea rdi, [rsp+128h+var_50] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+128h+var_118] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov dword ptr [rbx], 0Ah mov rax, rbx add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp loc_9AB79 jmp loc_9ABAA mov r14, rax mov rdi, [rsp+128h+var_F0]; void * cmp rdi, r15 jz short loc_9AADF mov rsi, [rsp+128h+var_E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9AADF mov r14, rax loc_9AADF: lea rdi, [rsp+128h+var_50] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() lea rdi, [rsp+128h+var_118] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() jmp loc_9AB9A mov r14, rax lea rsi, [rsp+128h+var_F0] mov rdi, r15 call _ZL35common_chat_params_init_command_r7bRKN5minja13chat_templateERK18common_chat_inputs_cold_1; common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&) [clone] mov al, 1 jmp short loc_9AB1C jmp short loc_9AB17 jmp short loc_9AB17 jmp short loc_9AB17 jmp short $+2 loc_9AB17: mov r14, rax xor eax, eax loc_9AB1C: lea rcx, [rsp+128h+var_F0] cmp rcx, r12 setz cl or cl, al jnz short loc_9AB9A add r12, 0FFFFFFFFFFFFFFF0h lea r15, [rsp+128h+var_F0] loc_9AB34: mov rdi, [r12-10h]; void * cmp r12, rdi jz short loc_9AB4A mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9AB4A: lea rax, [r12-20h] add r12, 0FFFFFFFFFFFFFFF0h cmp r12, r15 mov r12, rax jnz short loc_9AB34 jmp short loc_9AB9A mov r14, rax mov rdi, [rsp+128h+var_F0]; void * cmp rdi, r15 jz short loc_9AB9A mov rsi, [rsp+128h+var_E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9AB9A loc_9AB79: mov r14, rax jmp short loc_9AB9A mov r14, rax mov rax, [rsp+128h+var_108] test rax, rax jz short loc_9AB9A lea rdi, [rsp+128h+var_118] mov rsi, rdi mov edx, 3 call rax loc_9AB9A: mov rdi, rbx; this call _ZN18common_chat_paramsD2Ev; common_chat_params::~common_chat_params() mov rdi, r14 call __Unwind_Resume loc_9ABAA: mov rdi, rax call __clang_call_terminate
const minja::chat_template * common_chat_params_init_command_r7b( const minja::chat_template *a1, const common_chat_inputs *a2, long long a3) { long long v5; // rcx int v6; // r8d int v7; // r9d _QWORD *v8; // r13 long long v9; // r12 _QWORD *v10; // rdi int v11; // r8d char v12; // al long long v13; // rax __int128 v15; // [rsp+10h] [rbp-118h] BYREF long long ( *v16)(); // [rsp+20h] [rbp-108h] long long ( *v17)(); // [rsp+28h] [rbp-100h] void *v18[2]; // [rsp+38h] [rbp-F0h] BYREF _QWORD v19[2]; // [rsp+48h] [rbp-E0h] BYREF char *v20; // [rsp+58h] [rbp-D0h] BYREF char v21; // [rsp+68h] [rbp-C0h] BYREF char *v22; // [rsp+78h] [rbp-B0h] BYREF char v23; // [rsp+88h] [rbp-A0h] BYREF char *v24; // [rsp+98h] [rbp-90h] BYREF char v25; // [rsp+A8h] [rbp-80h] BYREF _BYTE *v26; // [rsp+B8h] [rbp-70h] BYREF _BYTE v27[16]; // [rsp+C8h] [rbp-60h] BYREF unsigned __int8 v28[8]; // [rsp+D8h] [rbp-50h] BYREF long long v29; // [rsp+E0h] [rbp-48h] char v30[8]; // [rsp+E8h] [rbp-40h] BYREF long long v31; // [rsp+F0h] [rbp-38h] *(_DWORD *)a1 = 0; *((_BYTE *)a1 + 8) = 0; *((_QWORD *)a1 + 2) = 0LL; *((_QWORD *)a1 + 3) = (char *)a1 + 40; *((_QWORD *)a1 + 4) = 0LL; *((_BYTE *)a1 + 40) = 0; *((_BYTE *)a1 + 56) = 0; *((_OWORD *)a1 + 4) = 0LL; *((_OWORD *)a1 + 5) = 0LL; *((_OWORD *)a1 + 6) = 0LL; *((_OWORD *)a1 + 7) = 0LL; *((_QWORD *)a1 + 16) = 0LL; *((_BYTE *)a1 + 56) = ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_( (unsigned __int8 *)(a3 + 32), (long long)"required", (__m128d)0LL); v15 = 0LL; *(_QWORD *)&v15 = a3; v17 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_invoke; v16 = std::_Function_handler<void ()(common_grammar_builder const&),common_chat_params_init_command_r7b(minja::chat_template const&,common_chat_inputs const&)::$_0>::_M_manager; build_grammar[abi:cxx11]((long long)v18, (long long)&v15, grammar_options, v5, v6, v7); std::string::operator=((char *)a1 + 24, v18); if ( v18[0] != v19 ) operator delete(v18[0], v19[0] + 1LL); if ( v16 ) ((void ( *)(__int128 *, __int128 *, long long))v16)(&v15, &v15, 3LL); v18[0] = v19; std::string::_M_construct<char const*>(v18, "<|START_ACTION|>", (long long)""); LOBYTE(v20) = 0; std::vector<common_grammar_trigger>::emplace_back<common_grammar_trigger>((char *)a1 + 64); if ( v18[0] != v19 ) operator delete(v18[0], v19[0] + 1LL); v18[0] = v19; std::string::_M_construct<char const*>(v18, "<|START_RESPONSE|>", (long long)""); v20 = &v21; std::string::_M_construct<char const*>(&v20, "<|END_RESPONSE|>", (long long)""); v22 = &v23; std::string::_M_construct<char const*>(&v22, "<|START_THINKING|>", (long long)""); v24 = &v25; std::string::_M_construct<char const*>(&v24, "<|END_THINKING|>", (long long)""); v8 = v27; v26 = v27; std::string::_M_construct<char const*>(&v26, "<|END_ACTION|>", (long long)""); std::vector<std::string>::_M_assign_aux<std::string const*>((char *)a1 + 88, v18, v28); v9 = -160LL; do { v10 = (_QWORD *)*(v8 - 2); if ( v8 != v10 ) operator delete(v10, *v8 + 1LL); v8 -= 4; v9 += 32LL; } while ( v9 ); if ( (unsigned int)*(unsigned __int8 *)(a3 + 16) - 1 >= 2 ) { if ( *(_BYTE *)(a3 + 16) ) goto LABEL_13; } else if ( **(_QWORD **)(a3 + 24) != *(_QWORD *)(*(_QWORD *)(a3 + 24) + 8LL) ) { LABEL_13: 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>::basic_json( (unsigned __int8 *)&v15, (unsigned __int8 *)(a3 + 16)); goto LABEL_16; } LOBYTE(v15) = 0; *((_QWORD *)&v15 + 1) = 0LL; LABEL_16: v11 = *(unsigned __int8 *)(a3 + 104); v28[0] = 0; v29 = 0LL; minja::chat_template::apply((long long)v18, a2, (unsigned __int8 *)a3, (unsigned __int8 *)&v15, v11, v28, 1); ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_(v30); v12 = *((_BYTE *)a1 + 8); *((_BYTE *)a1 + 8) = v30[0]; v30[0] = v12; v13 = *((_QWORD *)a1 + 2); *((_QWORD *)a1 + 2) = v31; v31 = v13; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v30); if ( v18[0] != v19 ) operator delete(v18[0], v19[0] + 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>::data::~data(v28); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(&v15); *(_DWORD *)a1 = 10; return a1; }
common_chat_params_init_command_r7b: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R14,RDX MOV RBP,RSI MOV RBX,RDI MOV dword ptr [RDI],0x0 XOR EAX,EAX MOV byte ptr [RDI + 0x8],AL MOV qword ptr [RDI + 0x10],RAX LEA RCX,[RDI + 0x28] MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],RAX MOV byte ptr [RDI + 0x28],AL MOV byte ptr [RDI + 0x38],AL XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x40],XMM0 MOVUPS xmmword ptr [RDI + 0x50],XMM0 MOVUPS xmmword ptr [RDI + 0x60],XMM0 MOVUPS xmmword ptr [RDI + 0x70],XMM0 MOV qword ptr [RDI + 0x80],RAX LEA RDI,[RDX + 0x20] LEA RSI,[0x1ba85c] CALL 0x00184415 MOV byte ptr [RBX + 0x38],AL LEA RSI,[RSP + 0x10] XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSI],XMM0 MOVAPS xmmword ptr [RSI + 0x10],XMM0 MOV qword ptr [RSI],R14 LEA RAX,[0x1a9af6] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1aa470] MOV qword ptr [RSI + 0x10],RAX LAB_0019a827: LEA RDX,[0x1c0b64] LEA RDI,[RSP + 0x38] CALL 0x0013b8f6 LEA RDI,[RBX + 0x18] LEA R12,[RSP + 0x38] MOV RSI,R12 CALL 0x00119840 MOV RDI,qword ptr [R12] LEA R15,[RSP + 0x48] CMP RDI,R15 JZ 0x0019a864 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x001196d0 LAB_0019a864: MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x0019a87d LAB_0019a86e: LEA RDI,[RSP + 0x10] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0019a87d: LEA RDI,[RSP + 0x38] MOV qword ptr [RDI],R15 LAB_0019a885: LEA RSI,[0x1c1c50] LEA RDX,[0x1c1c60] CALL 0x00122f42 LEA RDI,[RBX + 0x40] LEA RSI,[RSP + 0x38] MOV byte ptr [RSI + 0x20],0x0 LAB_0019a8a5: CALL 0x001ae68e MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R15 JZ 0x0019a8c1 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x001196d0 LAB_0019a8c1: LEA R12,[RSP + 0x38] MOV qword ptr [R12],R15 LAB_0019a8ca: LEA RSI,[0x1c2126] LEA RDX,[0x1c2138] MOV RDI,R12 CALL 0x00122f42 LEA R12,[RSP + 0x58] LEA RAX,[RSP + 0x68] MOV qword ptr [RAX + -0x10],RAX LAB_0019a8ee: LEA RSI,[0x1c2139] LEA RDX,[0x1c2149] MOV RDI,R12 CALL 0x00122f42 LEA R12,[RSP + 0x78] LEA RAX,[RSP + 0x88] MOV qword ptr [RAX + -0x10],RAX LAB_0019a915: LEA RSI,[0x1c214a] LEA RDX,[0x1c215c] MOV RDI,R12 CALL 0x00122f42 LEA R12,[RSP + 0x98] LEA RAX,[RSP + 0xa8] MOV qword ptr [RAX + -0x10],RAX LAB_0019a93f: LEA RSI,[0x1c215d] LEA RDX,[0x1c216d] MOV RDI,R12 CALL 0x00122f42 LEA R12,[RSP + 0xb8] LEA R13,[RSP + 0xc8] MOV qword ptr [R13 + -0x10],R13 LAB_0019a969: LEA RSI,[0x1c216e] LEA RDX,[0x1c217c] MOV RDI,R12 CALL 0x00122f42 LEA RDI,[RBX + 0x58] LEA R15,[RSP + 0xd8] LAB_0019a98b: LEA RSI,[RSP + 0x38] MOV RDX,R15 CALL 0x001aea8e MOV R12,-0xa0 LAB_0019a99f: MOV RDI,qword ptr [R13 + -0x10] CMP R13,RDI JZ 0x0019a9b4 MOV RSI,qword ptr [R13] INC RSI CALL 0x001196d0 LAB_0019a9b4: ADD R13,-0x20 ADD R12,0x20 JNZ 0x0019a99f MOVZX EAX,byte ptr [R14 + 0x10] LEA ECX,[RAX + -0x1] CMP ECX,0x2 JNC 0x0019a9e8 MOV RAX,qword ptr [R14 + 0x18] MOV RCX,qword ptr [RAX] CMP RCX,qword ptr [RAX + 0x8] JZ 0x0019a9ec LAB_0019a9d8: LEA RSI,[R14 + 0x10] LEA RDI,[RSP + 0x10] CALL 0x00136864 JMP 0x0019a9fa LAB_0019a9e8: TEST EAX,EAX JNZ 0x0019a9d8 LAB_0019a9ec: MOV byte ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x0 LAB_0019a9fa: MOVZX R8D,byte ptr [R14 + 0x68] LEA R9,[RSP + 0xd8] MOV byte ptr [R9],0x0 MOV qword ptr [R9 + 0x8],0x0 LAB_0019aa13: MOV dword ptr [RSP],0x1 LEA RDI,[RSP + 0x38] LEA RCX,[RSP + 0x10] MOV RSI,RBP MOV RDX,R14 CALL 0x00180e86 LAB_0019aa2f: LEA RDI,[RSP + 0xe8] LEA RSI,[RSP + 0x38] LEA R15,[RSP + 0x48] CALL 0x001515e6 LAB_0019aa46: MOV AL,byte ptr [RBX + 0x8] LEA RDI,[RSP + 0xe8] MOV CL,byte ptr [RDI] MOV byte ptr [RBX + 0x8],CL MOV byte ptr [RDI],AL MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RDI + 0x8] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RDI + 0x8],RAX CALL 0x00136dc4 MOV RDI,qword ptr [RSP + 0x38] CMP RDI,R15 JZ 0x0019aa84 MOV RSI,qword ptr [RSP + 0x48] INC RSI CALL 0x001196d0 LAB_0019aa84: LEA RDI,[RSP + 0xd8] CALL 0x00136dc4 LEA RDI,[RSP + 0x10] CALL 0x00136dc4 MOV dword ptr [RBX],0xa MOV RAX,RBX ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_params_init_command_r7b(minja::chat_template const&, common_chat_inputs const&) */ chat_template * common_chat_params_init_command_r7b(chat_template *param_1,common_chat_inputs *param_2) { int8 uVar1; chat_template cVar2; ulong in_RDX; long lVar3; long *plVar4; ulong local_118 [2]; code *local_108; code *pcStack_100; long *local_f0 [2]; long local_e0 [2]; int1 *local_d0 [2]; int1 local_c0 [16]; int1 *local_b0 [2]; int1 local_a0 [16]; int1 *local_90 [2]; int1 local_80 [16]; long *local_70 [2]; long local_60 [2]; data local_50 [8]; int8 local_48; chat_template local_40 [8]; int8 local_38; *(int4 *)param_1 = 0; param_1[8] = (chat_template)0x0; *(int8 *)(param_1 + 0x10) = 0; *(chat_template **)(param_1 + 0x18) = param_1 + 0x28; *(int8 *)(param_1 + 0x20) = 0; param_1[0x28] = (chat_template)0x0; param_1[0x38] = (chat_template)0x0; *(int8 *)(param_1 + 0x40) = 0; *(int8 *)(param_1 + 0x48) = 0; *(int8 *)(param_1 + 0x50) = 0; *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; *(int8 *)(param_1 + 0x68) = 0; *(int8 *)(param_1 + 0x70) = 0; *(int8 *)(param_1 + 0x78) = 0; *(int8 *)(param_1 + 0x80) = 0; cVar2 = (chat_template) _ZN8nlohmann16json_abi_v3_11_3neIPKcTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerESA_IhSaIhEEvEES5_ (in_RDX + 0x20,"required"); param_1[0x38] = cVar2; local_118[1] = 0; pcStack_100 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_invoke; local_108 = std:: _Function_handler<void(common_grammar_builder_const&),common_chat_params_init_command_r7b(minja::chat_template_const&,common_chat_inputs_const&)::$_0> ::_M_manager; /* try { // try from 0019a827 to 0019a837 has its CatchHandler @ 0019ab7e */ local_118[0] = in_RDX; build_grammar_abi_cxx11_((function *)local_f0,(common_grammar_options *)local_118); std::__cxx11::string::operator=((string *)(param_1 + 0x18),(string *)local_f0); if (local_f0[0] != local_e0) { operator_delete(local_f0[0],local_e0[0] + 1); } if (local_108 != (code *)0x0) { /* try { // try from 0019a86e to 0019a87c has its CatchHandler @ 0019aabb */ (*local_108)(local_118,local_118,3); } local_f0[0] = local_e0; /* try { // try from 0019a885 to 0019a897 has its CatchHandler @ 0019ab79 */ std::__cxx11::string::_M_construct<char_const*>(local_f0,"<|START_ACTION|>",""); local_d0[0] = (int1 *)((ulong)local_d0[0] & 0xffffffffffffff00); /* try { // try from 0019a8a5 to 0019a8a9 has its CatchHandler @ 0019ab5d */ std::vector<common_grammar_trigger,std::allocator<common_grammar_trigger>>:: emplace_back<common_grammar_trigger> ((vector<common_grammar_trigger,std::allocator<common_grammar_trigger>> *) (param_1 + 0x40),(common_grammar_trigger *)local_f0); if (local_f0[0] != local_e0) { operator_delete(local_f0[0],local_e0[0] + 1); } local_f0[0] = local_e0; /* try { // try from 0019a8ca to 0019a8df has its CatchHandler @ 0019ab17 */ std::__cxx11::string::_M_construct<char_const*>(local_f0,"<|START_RESPONSE|>",""); local_d0[0] = local_c0; /* try { // try from 0019a8ee to 0019a903 has its CatchHandler @ 0019ab15 */ std::__cxx11::string::_M_construct<char_const*>(local_d0,"<|END_RESPONSE|>",""); local_b0[0] = local_a0; /* try { // try from 0019a915 to 0019a92a has its CatchHandler @ 0019ab13 */ std::__cxx11::string::_M_construct<char_const*>(local_b0,"<|START_THINKING|>",""); local_90[0] = local_80; /* try { // try from 0019a93f to 0019a954 has its CatchHandler @ 0019ab11 */ std::__cxx11::string::_M_construct<char_const*>(local_90,"<|END_THINKING|>",""); plVar4 = local_60; local_70[0] = plVar4; /* try { // try from 0019a969 to 0019a97e has its CatchHandler @ 0019ab0f */ std::__cxx11::string::_M_construct<char_const*>(local_70,"<|END_ACTION|>",""); /* try { // try from 0019a98b to 0019a997 has its CatchHandler @ 0019aafb */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>:: _M_assign_aux<std::__cxx11::string_const*>(param_1 + 0x58,local_f0,local_50); lVar3 = -0xa0; do { if (plVar4 != (long *)plVar4[-2]) { operator_delete((long *)plVar4[-2],*plVar4 + 1); } plVar4 = plVar4 + -4; lVar3 = lVar3 + 0x20; } while (lVar3 != 0); if (*(byte *)(in_RDX + 0x10) - 1 < 2) { if (**(long **)(in_RDX + 0x18) == (*(long **)(in_RDX + 0x18))[1]) { LAB_0019a9ec: local_118[0] = local_118[0] & 0xffffffffffffff00; local_118[1] = 0; goto LAB_0019a9fa; } } else if (*(byte *)(in_RDX + 0x10) == 0) goto LAB_0019a9ec; /* try { // try from 0019a9d8 to 0019a9e5 has its CatchHandler @ 0019aab6 */ 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((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_118,(basic_json *)(in_RDX + 0x10)); LAB_0019a9fa: local_50[0] = (data)0x0; local_48 = 0; /* try { // try from 0019aa13 to 0019aa2e has its CatchHandler @ 0019aadc */ minja::chat_template::apply ((basic_json *)local_f0,(basic_json *)param_2,SUB81(in_RDX,0),(basic_json *)local_118, *(bool *)(in_RDX + 0x68)); /* try { // try from 0019aa2f to 0019aa45 has its CatchHandler @ 0019aac0 */ _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IS9_S9_TnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SG_EE5valueEiE4typeELi0EEEOT_ (local_40,local_f0); cVar2 = param_1[8]; param_1[8] = local_40[0]; uVar1 = *(int8 *)(param_1 + 0x10); *(int8 *)(param_1 + 0x10) = local_38; local_40[0] = cVar2; local_38 = uVar1; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_40); if (local_f0[0] != local_e0) { operator_delete(local_f0[0],local_e0[0] + 1); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_50); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_118); *(int4 *)param_1 = 10; return param_1; }
46,284
js_string_isWellFormed
bluesky950520[P]quickjs/quickjs.c
static JSValue js_string_isWellFormed(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue str; JSValue ret; JSString *p; uint32_t c, i, n; ret = JS_TRUE; str = JS_ToStringCheckObject(ctx, this_val); if (JS_IsException(str)) return JS_EXCEPTION; p = JS_VALUE_GET_STRING(str); if (!p->is_wide_char || p->len == 0) goto done; // by definition well-formed for (i = 0, n = p->len; i < n; i++) { c = p->u.str16[i]; if (!is_surrogate(c)) continue; if (is_lo_surrogate(c) || i + 1 == n) break; c = p->u.str16[++i]; if (!is_lo_surrogate(c)) break; } if (i < n) ret = JS_FALSE; done: JS_FreeValue(ctx, str); return ret; }
O0
c
js_string_isWellFormed: subq $0xa8, %rsp movq %rsi, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq %rdi, 0x80(%rsp) movl %ecx, 0x7c(%rsp) movq %r8, 0x70(%rsp) movl $0x1, 0x28(%rsp) movq $0x1, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx callq 0x76ac0 movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x29fb0 cmpl $0x0, %eax je 0xd9968 movl $0x0, 0x98(%rsp) movq $0x6, 0xa0(%rsp) jmp 0xd9aa3 movq 0x60(%rsp), %rax movq %rax, 0x48(%rsp) movq 0x48(%rsp), %rax movq 0x4(%rax), %rax shrq $0x1f, %rax andq $0x1, %rax cmpb $0x0, %al je 0xd999b movq 0x48(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF cmpl $0x0, %eax jne 0xd99a0 jmp 0xd9a72 movl $0x0, 0x40(%rsp) movq 0x48(%rsp), %rax movq 0x4(%rax), %rax andq $0x7fffffff, %rax # imm = 0x7FFFFFFF movl %eax, 0x3c(%rsp) movl 0x40(%rsp), %eax cmpl 0x3c(%rsp), %eax jae 0xd9a41 movq 0x48(%rsp), %rax movl 0x40(%rsp), %ecx movzwl 0x18(%rax,%rcx,2), %eax movl %eax, 0x44(%rsp) movl 0x44(%rsp), %edi callq 0x8c3b0 cmpl $0x0, %eax jne 0xd99e7 jmp 0xd9a31 movl 0x44(%rsp), %edi callq 0x300f0 cmpl $0x0, %eax jne 0xd9a02 movl 0x40(%rsp), %eax addl $0x1, %eax cmpl 0x3c(%rsp), %eax jne 0xd9a04 jmp 0xd9a41 movq 0x48(%rsp), %rax movl 0x40(%rsp), %ecx addl $0x1, %ecx movl %ecx, 0x40(%rsp) movl %ecx, %ecx movzwl 0x18(%rax,%rcx,2), %eax movl %eax, 0x44(%rsp) movl 0x44(%rsp), %edi callq 0x300f0 cmpl $0x0, %eax jne 0xd9a2f jmp 0xd9a41 jmp 0xd9a31 movl 0x40(%rsp), %eax addl $0x1, %eax movl %eax, 0x40(%rsp) jmp 0xd99bb movl 0x40(%rsp), %eax cmpl 0x3c(%rsp), %eax jae 0xd9a70 movl $0x0, 0x8(%rsp) movq $0x1, 0x10(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x58(%rsp) jmp 0xd9a72 movq 0x80(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x29f80 movq 0x50(%rsp), %rax movq %rax, 0x98(%rsp) movq 0x58(%rsp), %rax movq %rax, 0xa0(%rsp) movq 0x98(%rsp), %rax movq 0xa0(%rsp), %rdx addq $0xa8, %rsp retq nopl (%rax,%rax)
js_string_isWellFormed: sub rsp, 0A8h mov [rsp+0A8h+var_20], rsi mov [rsp+0A8h+var_18], rdx mov [rsp+0A8h+var_28], rdi mov [rsp+0A8h+var_2C], ecx mov [rsp+0A8h+var_38], r8 mov dword ptr [rsp+0A8h+var_80], 1 mov [rsp+0A8h+var_78], 1 mov rax, [rsp+0A8h+var_80] mov [rsp+0A8h+var_58], rax mov rax, [rsp+0A8h+var_78] mov [rsp+0A8h+var_50], rax mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_20] mov rdx, [rsp+0A8h+var_18] call JS_ToStringCheckObject mov [rsp+0A8h+var_90], rax mov [rsp+0A8h+var_88], rdx mov rax, [rsp+0A8h+var_90] mov [rsp+0A8h+var_48], rax mov rax, [rsp+0A8h+var_88] mov [rsp+0A8h+var_40], rax mov rdi, [rsp+0A8h+var_48] mov rsi, [rsp+0A8h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_D9968 mov dword ptr [rsp+0A8h+var_10], 0 mov [rsp+0A8h+var_8], 6 jmp loc_D9AA3 loc_D9968: mov rax, [rsp+0A8h+var_48] mov [rsp+0A8h+var_60], rax mov rax, [rsp+0A8h+var_60] mov rax, [rax+4] shr rax, 1Fh and rax, 1 cmp al, 0 jz short loc_D999B mov rax, [rsp+0A8h+var_60] mov rax, [rax+4] and rax, 7FFFFFFFh cmp eax, 0 jnz short loc_D99A0 loc_D999B: jmp loc_D9A72 loc_D99A0: mov [rsp+0A8h+var_68], 0 mov rax, [rsp+0A8h+var_60] mov rax, [rax+4] and rax, 7FFFFFFFh mov [rsp+0A8h+var_6C], eax loc_D99BB: mov eax, [rsp+0A8h+var_68] cmp eax, [rsp+0A8h+var_6C] jnb short loc_D9A41 mov rax, [rsp+0A8h+var_60] mov ecx, [rsp+0A8h+var_68] movzx eax, word ptr [rax+rcx*2+18h] mov [rsp+0A8h+var_64], eax mov edi, [rsp+0A8h+var_64] call is_surrogate cmp eax, 0 jnz short loc_D99E7 jmp short loc_D9A31 loc_D99E7: mov edi, [rsp+0A8h+var_64] call is_lo_surrogate_0 cmp eax, 0 jnz short loc_D9A02 mov eax, [rsp+0A8h+var_68] add eax, 1 cmp eax, [rsp+0A8h+var_6C] jnz short loc_D9A04 loc_D9A02: jmp short loc_D9A41 loc_D9A04: mov rax, [rsp+0A8h+var_60] mov ecx, [rsp+0A8h+var_68] add ecx, 1 mov [rsp+0A8h+var_68], ecx mov ecx, ecx movzx eax, word ptr [rax+rcx*2+18h] mov [rsp+0A8h+var_64], eax mov edi, [rsp+0A8h+var_64] call is_lo_surrogate_0 cmp eax, 0 jnz short loc_D9A2F jmp short loc_D9A41 loc_D9A2F: jmp short $+2 loc_D9A31: mov eax, [rsp+0A8h+var_68] add eax, 1 mov [rsp+0A8h+var_68], eax jmp loc_D99BB loc_D9A41: mov eax, [rsp+0A8h+var_68] cmp eax, [rsp+0A8h+var_6C] jnb short loc_D9A70 mov dword ptr [rsp+0A8h+var_A0], 0 mov [rsp+0A8h+var_98], 1 mov rax, [rsp+0A8h+var_A0] mov [rsp+0A8h+var_58], rax mov rax, [rsp+0A8h+var_98] mov [rsp+0A8h+var_50], rax loc_D9A70: jmp short $+2 loc_D9A72: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_48] mov rdx, [rsp+0A8h+var_40] call JS_FreeValue mov rax, [rsp+0A8h+var_58] mov [rsp+0A8h+var_10], rax mov rax, [rsp+0A8h+var_50] mov [rsp+0A8h+var_8], rax loc_D9AA3: mov rax, [rsp+0A8h+var_10] mov rdx, [rsp+0A8h+var_8] add rsp, 0A8h retn
long long js_string_isWellFormed( long long a1, long long a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rdx long long v16; // [rsp+8h] [rbp-A0h] long long v17; // [rsp+18h] [rbp-90h] long long v18; // [rsp+28h] [rbp-80h] unsigned int v19; // [rsp+3Ch] [rbp-6Ch] unsigned int v20; // [rsp+40h] [rbp-68h] unsigned int v21; // [rsp+44h] [rbp-64h] long long v22; // [rsp+50h] [rbp-58h] long long v23; // [rsp+68h] [rbp-40h] long long v24; // [rsp+98h] [rbp-10h] LODWORD(v18) = 1; v22 = v18; v17 = JS_ToStringCheckObject(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v23 = v14; if ( JS_IsException_1(v17, v14) ) { LODWORD(v24) = 0; } else { if ( (*(_QWORD *)(v17 + 4) & 0x80000000LL) != 0 && (*(_DWORD *)(v17 + 4) & 0x7FFFFFFF) != 0 ) { v20 = 0; v19 = *(_DWORD *)(v17 + 4) & 0x7FFFFFFF; while ( v20 < v19 ) { v21 = *(unsigned __int16 *)(v17 + 2LL * v20 + 24); if ( is_surrogate(v21) ) { if ( is_lo_surrogate_0(v21) ) break; if ( v20 + 1 == v19 ) break; if ( !is_lo_surrogate_0(*(unsigned __int16 *)(v17 + 2LL * ++v20 + 24)) ) break; } ++v20; } if ( v20 < v19 ) { LODWORD(v16) = 0; v22 = v16; } } JS_FreeValue(a1, v17, v23); return v22; } return v24; }
js_string_isWellFormed: SUB RSP,0xa8 MOV qword ptr [RSP + 0x88],RSI MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RSP + 0x80],RDI MOV dword ptr [RSP + 0x7c],ECX MOV qword ptr [RSP + 0x70],R8 MOV dword ptr [RSP + 0x28],0x1 MOV qword ptr [RSP + 0x30],0x1 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] CALL 0x00176ac0 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x68],RAX MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x68] CALL 0x00129fb0 CMP EAX,0x0 JZ 0x001d9968 MOV dword ptr [RSP + 0x98],0x0 MOV qword ptr [RSP + 0xa0],0x6 JMP 0x001d9aa3 LAB_001d9968: MOV RAX,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x4] SHR RAX,0x1f AND RAX,0x1 CMP AL,0x0 JZ 0x001d999b MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff CMP EAX,0x0 JNZ 0x001d99a0 LAB_001d999b: JMP 0x001d9a72 LAB_001d99a0: MOV dword ptr [RSP + 0x40],0x0 MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x4] AND RAX,0x7fffffff MOV dword ptr [RSP + 0x3c],EAX LAB_001d99bb: MOV EAX,dword ptr [RSP + 0x40] CMP EAX,dword ptr [RSP + 0x3c] JNC 0x001d9a41 MOV RAX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RSP + 0x40] MOVZX EAX,word ptr [RAX + RCX*0x2 + 0x18] MOV dword ptr [RSP + 0x44],EAX MOV EDI,dword ptr [RSP + 0x44] CALL 0x0018c3b0 CMP EAX,0x0 JNZ 0x001d99e7 JMP 0x001d9a31 LAB_001d99e7: MOV EDI,dword ptr [RSP + 0x44] CALL 0x001300f0 CMP EAX,0x0 JNZ 0x001d9a02 MOV EAX,dword ptr [RSP + 0x40] ADD EAX,0x1 CMP EAX,dword ptr [RSP + 0x3c] JNZ 0x001d9a04 LAB_001d9a02: JMP 0x001d9a41 LAB_001d9a04: MOV RAX,qword ptr [RSP + 0x48] MOV ECX,dword ptr [RSP + 0x40] ADD ECX,0x1 MOV dword ptr [RSP + 0x40],ECX MOV ECX,ECX MOVZX EAX,word ptr [RAX + RCX*0x2 + 0x18] MOV dword ptr [RSP + 0x44],EAX MOV EDI,dword ptr [RSP + 0x44] CALL 0x001300f0 CMP EAX,0x0 JNZ 0x001d9a2f JMP 0x001d9a41 LAB_001d9a2f: JMP 0x001d9a31 LAB_001d9a31: MOV EAX,dword ptr [RSP + 0x40] ADD EAX,0x1 MOV dword ptr [RSP + 0x40],EAX JMP 0x001d99bb LAB_001d9a41: MOV EAX,dword ptr [RSP + 0x40] CMP EAX,dword ptr [RSP + 0x3c] JNC 0x001d9a70 MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x1 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x58],RAX LAB_001d9a70: JMP 0x001d9a72 LAB_001d9a72: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] CALL 0x00129f80 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xa0],RAX LAB_001d9aa3: MOV RAX,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] ADD RSP,0xa8 RET
int1 [16] js_string_isWellFormed(int8 param_1,int8 param_2,int8 param_3) { int2 uVar1; int iVar2; uint uVar3; int1 auVar5 [16]; int4 uStack_9c; int4 uStack_7c; uint local_68; uint local_58; int4 uStack_54; uint local_10; int4 uStack_c; int8 local_8; long lVar4; local_58 = 1; uStack_54 = uStack_7c; auVar5 = JS_ToStringCheckObject(param_1,param_2,param_3); lVar4 = auVar5._0_8_; iVar2 = JS_IsException(lVar4,auVar5._8_8_); if (iVar2 == 0) { if (((*(ulong *)(lVar4 + 4) >> 0x1f & 1) != 0) && ((*(ulong *)(lVar4 + 4) & 0x7fffffff) != 0)) { local_68 = 0; uVar3 = (uint)*(int8 *)(lVar4 + 4) & 0x7fffffff; for (; local_68 < uVar3; local_68 = local_68 + 1) { uVar1 = *(int2 *)(lVar4 + 0x18 + (ulong)local_68 * 2); iVar2 = is_surrogate(uVar1); if (iVar2 != 0) { iVar2 = is_lo_surrogate(uVar1); if ((iVar2 != 0) || (local_68 + 1 == uVar3)) break; local_68 = local_68 + 1; iVar2 = is_lo_surrogate(*(int2 *)(lVar4 + 0x18 + (ulong)local_68 * 2)); if (iVar2 == 0) break; } } if (local_68 < uVar3) { uStack_54 = uStack_9c; } local_58 = (uint)(local_68 >= uVar3); } JS_FreeValue(param_1,lVar4,auVar5._8_8_); local_10 = local_58; uStack_c = uStack_54; local_8 = 1; } else { local_10 = 0; local_8 = 6; } auVar5._4_4_ = uStack_c; auVar5._0_4_ = local_10; auVar5._8_8_ = local_8; return auVar5; }
46,285
translog_buffer_next
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_buffer_next(TRANSLOG_ADDRESS *horizon, struct st_buffer_cursor *cursor, my_bool new_file) { uint old_buffer_no= cursor->buffer_no; uint new_buffer_no= (old_buffer_no + 1) % TRANSLOG_BUFFERS_NO; struct st_translog_buffer *new_buffer= log_descriptor.buffers + new_buffer_no; my_bool chasing= cursor->chaser; DBUG_ENTER("translog_buffer_next"); DBUG_PRINT("info", ("horizon: " LSN_FMT " chasing: %d", LSN_IN_PARTS(log_descriptor.horizon), chasing)); DBUG_ASSERT(cmp_translog_addr(log_descriptor.horizon, *horizon) >= 0); translog_finish_page(horizon, cursor); if (!chasing) { translog_buffer_lock(new_buffer); #ifndef DBUG_OFF { TRANSLOG_ADDRESS offset= new_buffer->offset; TRANSLOG_FILE *file= new_buffer->file; uint8 ver= new_buffer->ver; translog_lock_assert_owner(); #endif translog_wait_for_buffer_free(new_buffer); #ifndef DBUG_OFF /* We keep the handler locked so nobody can start this new buffer */ DBUG_ASSERT(offset == new_buffer->offset && new_buffer->file == NULL && (file == NULL ? ver : (uint8)(ver + 1)) == new_buffer->ver); } #endif } else DBUG_ASSERT(new_buffer->file != NULL); if (new_file) { /* move the horizon to the next file and its header page */ (*horizon)+= LSN_ONE_FILE; (*horizon)= LSN_REPLACE_OFFSET(*horizon, TRANSLOG_PAGE_SIZE); if (!chasing && translog_create_new_file()) { DBUG_RETURN(1); } } /* prepare next page */ if (chasing) translog_cursor_init(cursor, new_buffer, new_buffer_no); else { translog_lock_assert_owner(); translog_start_buffer(new_buffer, cursor, new_buffer_no); new_buffer->prev_buffer_offset= log_descriptor.buffers[old_buffer_no].offset; new_buffer->prev_last_lsn= BUFFER_MAX_LSN(log_descriptor.buffers + old_buffer_no); } log_descriptor.buffers[old_buffer_no].next_buffer_offset= new_buffer->offset; DBUG_PRINT("info", ("prev_last_lsn set to " LSN_FMT " buffer:%p", LSN_IN_PARTS(new_buffer->prev_last_lsn), new_buffer)); translog_new_page_header(horizon, cursor); DBUG_RETURN(0); }
O0
c
translog_buffer_next: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %dl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb %al, -0x19(%rbp) movq -0x18(%rbp), %rax movzbl 0x36(%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax addl $0x1, %eax andl $0x7, %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movl %eax, %ecx leaq 0x443638(%rip), %rax # 0x47ac70 addq $0x2f8, %rax # imm = 0x2F8 imulq $0x100120, %rcx, %rcx # imm = 0x100120 addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movb 0x37(%rax), %al movb %al, -0x31(%rbp) jmp 0x37658 jmp 0x3765a jmp 0x3765c movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x33430 cmpb $0x0, -0x31(%rbp) jne 0x37683 movq -0x30(%rbp), %rdi callq 0x2f9c0 movq -0x30(%rbp), %rdi callq 0x3b710 jmp 0x37689 jmp 0x37685 jmp 0x37687 jmp 0x37689 cmpb $0x0, -0x19(%rbp) je 0x376e2 movq -0x10(%rbp), %rax movabsq $0x100000000, %rcx # imm = 0x100000000 addq (%rax), %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movabsq $0xffffff00000000, %rcx # imm = 0xFFFFFF00000000 andq (%rax), %rcx orq $0x2000, %rcx # imm = 0x2000 movq -0x10(%rbp), %rax movq %rcx, (%rax) cmpb $0x0, -0x31(%rbp) jne 0x376e0 callq 0x38d80 movsbl %al, %eax cmpl $0x0, %eax je 0x376e0 jmp 0x376d7 movb $0x1, -0x1(%rbp) jmp 0x37804 jmp 0x376e2 cmpb $0x0, -0x31(%rbp) je 0x37700 movq -0x18(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x24(%rbp), %eax movzbl %al, %edx callq 0x38190 jmp 0x377c3 movq -0x30(%rbp), %rdi movq -0x18(%rbp), %rsi movl -0x24(%rbp), %edx callq 0x31240 movl -0x20(%rbp), %eax movl %eax, %ecx leaq 0x443554(%rip), %rax # 0x47ac70 addq $0x2f8, %rax # imm = 0x2F8 imulq $0x100120, %rcx, %rcx # imm = 0x100120 addq %rcx, %rax movq 0x100010(%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x100020(%rax) movl -0x20(%rbp), %eax movl %eax, %ecx leaq 0x443526(%rip), %rax # 0x47ac70 addq $0x2f8, %rax # imm = 0x2F8 imulq $0x100120, %rcx, %rcx # imm = 0x100120 addq %rcx, %rax cmpq $0x0, 0x100000(%rax) jne 0x3778d movl -0x20(%rbp), %eax movl %eax, %ecx leaq 0x443500(%rip), %rax # 0x47ac70 addq $0x2f8, %rax # imm = 0x2F8 imulq $0x100120, %rcx, %rcx # imm = 0x100120 addq %rcx, %rax movq 0x100008(%rax), %rax movq %rax, -0x40(%rbp) jmp 0x377b4 movl -0x20(%rbp), %eax movl %eax, %ecx leaq 0x4434d7(%rip), %rax # 0x47ac70 addq $0x2f8, %rax # imm = 0x2F8 imulq $0x100120, %rcx, %rcx # imm = 0x100120 addq %rcx, %rax movq 0x100000(%rax), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x100008(%rax) movq -0x30(%rbp), %rax movq 0x100010(%rax), %rcx movl -0x20(%rbp), %eax movl %eax, %edx leaq 0x443496(%rip), %rax # 0x47ac70 addq $0x2f8, %rax # imm = 0x2F8 imulq $0x100120, %rdx, %rdx # imm = 0x100120 addq %rdx, %rax movq %rcx, 0x100018(%rax) jmp 0x377f3 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x323a0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x40, %rsp popq %rbp retq nopl (%rax)
translog_buffer_next: push rbp mov rbp, rsp sub rsp, 40h mov al, dl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], al mov rax, [rbp+var_18] movzx eax, byte ptr [rax+36h] mov [rbp+var_20], eax mov eax, [rbp+var_20] add eax, 1 and eax, 7 mov [rbp+var_24], eax mov eax, [rbp+var_24] mov ecx, eax lea rax, log_descriptor add rax, 2F8h imul rcx, 100120h add rax, rcx mov [rbp+var_30], rax mov rax, [rbp+var_18] mov al, [rax+37h] mov [rbp+var_31], al jmp short $+2 loc_37658: jmp short $+2 loc_3765A: jmp short $+2 loc_3765C: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call translog_finish_page cmp [rbp+var_31], 0 jnz short loc_37683 mov rdi, [rbp+var_30] call translog_buffer_lock mov rdi, [rbp+var_30] call translog_wait_for_buffer_free jmp short loc_37689 loc_37683: jmp short $+2 loc_37685: jmp short $+2 loc_37687: jmp short $+2 loc_37689: cmp [rbp+var_19], 0 jz short loc_376E2 mov rax, [rbp+var_10] mov rcx, 100000000h add rcx, [rax] mov [rax], rcx mov rax, [rbp+var_10] mov rcx, 0FFFFFF00000000h and rcx, [rax] or rcx, 2000h mov rax, [rbp+var_10] mov [rax], rcx cmp [rbp+var_31], 0 jnz short loc_376E0 call translog_create_new_file movsx eax, al cmp eax, 0 jz short loc_376E0 jmp short $+2 loc_376D7: mov [rbp+var_1], 1 jmp loc_37804 loc_376E0: jmp short $+2 loc_376E2: cmp [rbp+var_31], 0 jz short loc_37700 mov rdi, [rbp+var_18] mov rsi, [rbp+var_30] mov eax, [rbp+var_24] movzx edx, al call translog_cursor_init jmp loc_377C3 loc_37700: mov rdi, [rbp+var_30] mov rsi, [rbp+var_18] mov edx, [rbp+var_24] call translog_start_buffer mov eax, [rbp+var_20] mov ecx, eax lea rax, log_descriptor add rax, 2F8h imul rcx, 100120h add rax, rcx mov rcx, qword ptr ds:_ZL17my_assume_alignedILm8EPmET0_S1_[rax]; my_assume_aligned<8ul,ulong *>(ulong *) mov rax, [rbp+var_30] mov qword ptr ds:_ZL10LF_BACKOFFv[rax], rcx; LF_BACKOFF(void) mov eax, [rbp+var_20] mov ecx, eax lea rax, log_descriptor add rax, 2F8h imul rcx, 100120h add rax, rcx cmp qword ptr ds:_ZL17my_assume_alignedILm8EP8LF_SLISTET0_S2_[rax], 0; my_assume_aligned<8ul,LF_SLIST *>(LF_SLIST *) jnz short loc_3778D mov eax, [rbp+var_20] mov ecx, eax lea rax, log_descriptor add rax, 2F8h imul rcx, 100120h add rax, rcx mov rax, qword ptr ds:loc_100008[rax] mov [rbp+var_40], rax jmp short loc_377B4 loc_3778D: mov eax, [rbp+var_20] mov ecx, eax lea rax, log_descriptor add rax, 2F8h imul rcx, 100120h add rax, rcx mov rax, qword ptr ds:_ZL17my_assume_alignedILm8EP8LF_SLISTET0_S2_[rax]; my_assume_aligned<8ul,LF_SLIST *>(LF_SLIST *) mov [rbp+var_40], rax loc_377B4: mov rcx, [rbp+var_40] mov rax, [rbp+var_30] mov qword ptr ds:loc_100008[rax], rcx loc_377C3: mov rax, [rbp+var_30] mov rcx, qword ptr ds:_ZL17my_assume_alignedILm8EPmET0_S1_[rax]; my_assume_aligned<8ul,ulong *>(ulong *) mov eax, [rbp+var_20] mov edx, eax lea rax, log_descriptor add rax, 2F8h imul rdx, 100120h add rax, rdx mov qword ptr ds:loc_100018[rax], rcx jmp short $+2 loc_377F3: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call translog_new_page_header mov [rbp+var_1], 0 loc_37804: mov al, [rbp+var_1] add rsp, 40h pop rbp retn
char translog_buffer_next(long long *a1, long long a2, char a3) { long long v4; // [rsp+0h] [rbp-40h] char v5; // [rsp+Fh] [rbp-31h] long long *v6; // [rsp+10h] [rbp-30h] unsigned __int8 v7; // [rsp+1Ch] [rbp-24h] unsigned int v8; // [rsp+20h] [rbp-20h] v8 = *(unsigned __int8 *)(a2 + 54); v7 = (v8 + 1) & 7; v6 = &log_descriptor[131108 * v7 + 95]; v5 = *(_BYTE *)(a2 + 55); translog_finish_page(a1, a2); if ( !v5 ) { translog_buffer_lock((long long)v6); translog_wait_for_buffer_free(v6); } if ( a3 ) { *a1 += 0x100000000LL; *a1 = *a1 & 0xFFFFFF00000000LL | 0x2000; if ( !v5 ) { if ( (unsigned __int8)translog_create_new_file() ) return 1; } } if ( v5 ) { translog_cursor_init(a2, v6, v7); } else { translog_start_buffer((long long)v6, a2, v7); *(_QWORD *)((char *)LF_BACKOFF + (_QWORD)v6) = *(_QWORD *)((char *)my_assume_aligned<8ul,unsigned long *> + (_QWORD)&log_descriptor[131108 * v8 + 95]); if ( *(_QWORD *)((char *)my_assume_aligned<8ul,LF_SLIST *> + (_QWORD)&log_descriptor[131108 * v8 + 95]) ) v4 = *(_QWORD *)((char *)my_assume_aligned<8ul,LF_SLIST *> + (_QWORD)&log_descriptor[131108 * v8 + 95]); else v4 = *(_QWORD *)((char *)&loc_100008 + (_QWORD)&log_descriptor[131108 * v8 + 95]); *(_QWORD *)((char *)&loc_100008 + (_QWORD)v6) = v4; } *(_QWORD *)((char *)&loc_100018 + (_QWORD)&log_descriptor[131108 * v8 + 95]) = *(_QWORD *)((char *)my_assume_aligned<8ul,unsigned long *> + (_QWORD)v6); translog_new_page_header(a1, a2); return 0; }
translog_buffer_next: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,DL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x36] MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 AND EAX,0x7 MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV ECX,EAX LEA RAX,[0x57ac70] ADD RAX,0x2f8 IMUL RCX,RCX,0x100120 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX + 0x37] MOV byte ptr [RBP + -0x31],AL JMP 0x00137658 LAB_00137658: JMP 0x0013765a LAB_0013765a: JMP 0x0013765c LAB_0013765c: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00133430 CMP byte ptr [RBP + -0x31],0x0 JNZ 0x00137683 MOV RDI,qword ptr [RBP + -0x30] CALL 0x0012f9c0 MOV RDI,qword ptr [RBP + -0x30] CALL 0x0013b710 JMP 0x00137689 LAB_00137683: JMP 0x00137685 LAB_00137685: JMP 0x00137687 LAB_00137687: JMP 0x00137689 LAB_00137689: CMP byte ptr [RBP + -0x19],0x0 JZ 0x001376e2 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,0x100000000 ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,0xffffff00000000 AND RCX,qword ptr [RAX] OR RCX,0x2000 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX CMP byte ptr [RBP + -0x31],0x0 JNZ 0x001376e0 CALL 0x00138d80 MOVSX EAX,AL CMP EAX,0x0 JZ 0x001376e0 JMP 0x001376d7 LAB_001376d7: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00137804 LAB_001376e0: JMP 0x001376e2 LAB_001376e2: CMP byte ptr [RBP + -0x31],0x0 JZ 0x00137700 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x24] MOVZX EDX,AL CALL 0x00138190 JMP 0x001377c3 LAB_00137700: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RBP + -0x24] CALL 0x00131240 MOV EAX,dword ptr [RBP + -0x20] MOV ECX,EAX LEA RAX,[0x57ac70] ADD RAX,0x2f8 IMUL RCX,RCX,0x100120 ADD RAX,RCX MOV RCX,qword ptr [RAX + 0x100010] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x100020],RCX MOV EAX,dword ptr [RBP + -0x20] MOV ECX,EAX LEA RAX,[0x57ac70] ADD RAX,0x2f8 IMUL RCX,RCX,0x100120 ADD RAX,RCX CMP qword ptr [RAX + 0x100000],0x0 JNZ 0x0013778d MOV EAX,dword ptr [RBP + -0x20] MOV ECX,EAX LEA RAX,[0x57ac70] ADD RAX,0x2f8 IMUL RCX,RCX,0x100120 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x100008] MOV qword ptr [RBP + -0x40],RAX JMP 0x001377b4 LAB_0013778d: MOV EAX,dword ptr [RBP + -0x20] MOV ECX,EAX LEA RAX,[0x57ac70] ADD RAX,0x2f8 IMUL RCX,RCX,0x100120 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0x100000] MOV qword ptr [RBP + -0x40],RAX LAB_001377b4: MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x100008],RCX LAB_001377c3: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x100010] MOV EAX,dword ptr [RBP + -0x20] MOV EDX,EAX LEA RAX,[0x57ac70] ADD RAX,0x2f8 IMUL RDX,RDX,0x100120 ADD RAX,RDX MOV qword ptr [RAX + 0x100018],RCX JMP 0x001377f3 LAB_001377f3: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001323a0 MOV byte ptr [RBP + -0x1],0x0 LAB_00137804: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x40 POP RBP RET
int1 translog_buffer_next(ulong *param_1,long param_2,char param_3) { char cVar1; char cVar2; uint uVar3; uint uVar4; int *puVar5; long lVar6; int8 local_48; uVar3 = (uint)*(byte *)(param_2 + 0x36); uVar4 = uVar3 + 1 & 7; lVar6 = (ulong)uVar4 * 0x100120; puVar5 = &DAT_0057af68 + lVar6; cVar1 = *(char *)(param_2 + 0x37); translog_finish_page(param_1,param_2); if (cVar1 == '\0') { translog_buffer_lock(puVar5); translog_wait_for_buffer_free(puVar5); } if (param_3 != '\0') { *param_1 = *param_1 + 0x100000000; *param_1 = *param_1 & 0xffffff00000000 | 0x2000; if ((cVar1 == '\0') && (cVar2 = translog_create_new_file(), cVar2 != '\0')) { return 1; } } if (cVar1 == '\0') { translog_start_buffer(puVar5,param_2,uVar4); *(int8 *)(&DAT_0067af88 + lVar6) = *(int8 *)(&DAT_0067af78 + (ulong)uVar3 * 0x100120); if (*(long *)(&DAT_0067af68 + (ulong)uVar3 * 0x100120) == 0) { local_48 = *(int8 *)(&DAT_0067af70 + (ulong)uVar3 * 0x100120); } else { local_48 = *(int8 *)(&DAT_0067af68 + (ulong)uVar3 * 0x100120); } *(int8 *)(&DAT_0067af70 + lVar6) = local_48; } else { translog_cursor_init(param_2,puVar5,uVar4); } *(int8 *)(&DAT_0067af80 + (ulong)uVar3 * 0x100120) = *(int8 *)(&DAT_0067af78 + lVar6); translog_new_page_header(param_1,param_2); return 0; }
46,286
evmc::hex[abi:cxx11](std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/evmc/include/evmc/hex.hpp
inline std::string hex(bytes_view bs) { std::string str; str.reserve(bs.size() * 2); for (const auto b : bs) str += hex(b); return str; }
O2
cpp
evmc::hex[abi:cxx11](std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movq %rdx, %r14 movq %rsi, %r15 movb $0x0, 0x10(%rdi) addq %rsi, %rsi callq 0x46392 xorl %ebp, %ebp leaq 0x36851(%rip), %r13 # 0x7c974 leaq 0x8(%rsp), %r12 cmpq %rbp, %r15 je 0x4617e movzbl (%r14,%rbp), %eax movl %eax, %ecx shrl $0x4, %ecx movzbl (%rcx,%r13), %ecx andl $0xf, %eax leaq 0x18(%rsp), %rdx movq %rdx, 0x8(%rsp) movzbl (%rax,%r13), %eax shll $0x8, %eax orl %ecx, %eax movw %ax, 0x18(%rsp) movq $0x2, 0x10(%rsp) movb $0x0, 0x1a(%rsp) movq %rbx, %rdi movq %r12, %rsi callq 0x46402 movq %r12, %rdi callq 0x45b22 incq %rbp jmp 0x46128 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 jmp 0x461a2 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x45b22 movq %rbx, %rdi callq 0x45b22 movq %r14, %rdi callq 0x22330
_ZN4evmc3hexB5cxx11ESt17basic_string_viewIhNS_11byte_traitsIhEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov r14, rdx mov r15, rsi mov byte ptr [rdi+10h], 0 add rsi, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) xor ebp, ebp lea r13, a0123456789abcd; "0123456789abcdef" lea r12, [rsp+58h+var_50] loc_46128: cmp r15, rbp jz short loc_4617E movzx eax, byte ptr [r14+rbp] mov ecx, eax shr ecx, 4 movzx ecx, byte ptr [rcx+r13] and eax, 0Fh lea rdx, [rsp+58h+var_40] mov [rsp+58h+var_50], rdx movzx eax, byte ptr [rax+r13] shl eax, 8 or eax, ecx mov [rsp+58h+var_40], ax mov [rsp+58h+var_48], 2 mov [rsp+58h+var_3E], 0 mov rdi, rbx mov rsi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendERKS4_; std::string::append(std::string const&) mov rdi, r12 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() inc rbp jmp short loc_46128 loc_4617E: mov rax, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax jmp short loc_461A2 mov r14, rax lea rdi, [rsp+arg_0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_461A2: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long evmc::hex[abi:cxx11](long long a1, long long a2, long long a3) { long long i; // rbp __int16 v5; // cx long long v6; // rax _QWORD v8[2]; // [rsp+8h] [rbp-50h] BYREF __int16 v9; // [rsp+18h] [rbp-40h] BYREF char v10; // [rsp+1Ah] [rbp-3Eh] *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::reserve(a1, 2 * a2); for ( i = 0LL; a2 != i; ++i ) { v5 = (unsigned __int8)a0123456789abcd[*(unsigned __int8 *)(a3 + i) >> 4]; v6 = *(_BYTE *)(a3 + i) & 0xF; v8[0] = &v9; v9 = v5 | ((unsigned __int8)a0123456789abcd[v6] << 8); v8[1] = 2LL; v10 = 0; std::string::append(a1, v8); std::string::~string(); } return a1; }
hex[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV R14,RDX MOV R15,RSI MOV byte ptr [RDI + 0x10],0x0 ADD RSI,RSI LAB_00146115: CALL 0x00146392 XOR EBP,EBP LEA R13,[0x17c974] LEA R12,[RSP + 0x8] LAB_00146128: CMP R15,RBP JZ 0x0014617e MOVZX EAX,byte ptr [R14 + RBP*0x1] MOV ECX,EAX SHR ECX,0x4 MOVZX ECX,byte ptr [RCX + R13*0x1] AND EAX,0xf LEA RDX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RDX MOVZX EAX,byte ptr [RAX + R13*0x1] SHL EAX,0x8 OR EAX,ECX MOV word ptr [RSP + 0x18],AX MOV qword ptr [RSP + 0x10],0x2 MOV byte ptr [RSP + 0x1a],0x0 LAB_00146166: MOV RDI,RBX MOV RSI,R12 CALL 0x00146402 LAB_00146171: MOV RDI,R12 CALL 0x00145b22 INC RBP JMP 0x00146128 LAB_0014617e: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* evmc::hex[abi:cxx11](std::basic_string_view<unsigned char, evmc::byte_traits<unsigned char> >) */ string * evmc::hex_abi_cxx11_(string *param_1,long param_2,long param_3) { long lVar1; int2 *local_50; int8 local_48; int2 local_40; int1 local_3e; *(string **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; /* try { // try from 00146115 to 00146119 has its CatchHandler @ 00146190 */ std::__cxx11::string::reserve(param_1,param_2 * 2); for (lVar1 = 0; param_2 != lVar1; lVar1 = lVar1 + 1) { local_50 = &local_40; local_40 = CONCAT11("0123456789abcdef"[*(byte *)(param_3 + lVar1) & 0xf], "0123456789abcdef"[*(byte *)(param_3 + lVar1) >> 4]); local_48 = 2; local_3e = 0; /* try { // try from 00146166 to 00146170 has its CatchHandler @ 00146195 */ std::__cxx11::string::append(param_1,(string *)&local_50); std::__cxx11::string::~string((string *)&local_50); } return param_1; }
46,287
dequantize_row_tq2_0
llama.cpp/ggml/src/ggml-quants.c
void dequantize_row_tq2_0(const block_tq2_0 * GGML_RESTRICT x, float * GGML_RESTRICT y, int64_t k) { assert(k % QK_K == 0); const int64_t nb = k / QK_K; for (int64_t i = 0; i < nb; ++i) { const float d = GGML_FP16_TO_FP32(x[i].d); for (size_t j = 0; j < sizeof(x->qs); j += 32) { for (size_t l = 0; l < 4; ++l) { for (size_t m = 0; m < 32; ++m) { int8_t q = (x[i].qs[j + m] >> (l*2)) & 3; *y++ = (float) (q - 1) * d; } } } } }
O3
c
dequantize_row_tq2_0: leaq 0xff(%rdx), %rax testq %rdx, %rdx cmovnsq %rdx, %rax cmpq $0x100, %rdx # imm = 0x100 jl 0x323ca pushq %rbp pushq %r14 pushq %rbx sarq $0x8, %rax xorl %edx, %edx movq 0x37c5b(%rip), %r8 # 0x69fa8 movq %rdi, %r9 movq %rdx, %rcx shlq $0x6, %rcx leaq (%rcx,%rdx,2), %rcx movzwl 0x40(%rdi,%rcx), %ecx movss (%r8,%rcx,4), %xmm0 movb $0x1, %r10b xorl %r11d, %r11d addq %r9, %r11 xorl %ebx, %ebx leal (%rbx,%rbx), %ecx xorl %r14d, %r14d movzbl (%r11,%r14), %ebp shrl %cl, %ebp andl $0x3, %ebp decl %ebp xorps %xmm1, %xmm1 cvtsi2ss %ebp, %xmm1 mulss %xmm0, %xmm1 movss %xmm1, (%rsi) addq $0x4, %rsi incq %r14 cmpq $0x20, %r14 jne 0x32377 incq %rbx cmpq $0x4, %rbx jne 0x32371 movl $0x20, %r11d testb $0x1, %r10b movl $0x0, %r10d jne 0x3236c incq %rdx addq $0x42, %r9 cmpq %rax, %rdx jne 0x32350 popq %rbx popq %r14 popq %rbp retq
dequantize_row_tq2_0: lea rax, [rdx+0FFh] test rdx, rdx cmovns rax, rdx cmp rdx, 100h jl locret_323CA push rbp push r14 push rbx sar rax, 8 xor edx, edx mov r8, cs:ggml_table_f32_f16_ptr mov r9, rdi loc_32350: mov rcx, rdx shl rcx, 6 lea rcx, [rcx+rdx*2] movzx ecx, word ptr [rdi+rcx+40h] movss xmm0, dword ptr [r8+rcx*4] mov r10b, 1 xor r11d, r11d loc_3236C: add r11, r9 xor ebx, ebx loc_32371: lea ecx, [rbx+rbx] xor r14d, r14d loc_32377: movzx ebp, byte ptr [r11+r14] shr ebp, cl and ebp, 3 dec ebp xorps xmm1, xmm1 cvtsi2ss xmm1, ebp mulss xmm1, xmm0 movss dword ptr [rsi], xmm1 add rsi, 4 inc r14 cmp r14, 20h ; ' ' jnz short loc_32377 inc rbx cmp rbx, 4 jnz short loc_32371 mov r11d, 20h ; ' ' test r10b, 1 mov r10d, 0 jnz short loc_3236C inc rdx add r9, 42h ; 'B' cmp rdx, rax jnz short loc_32350 pop rbx pop r14 pop rbp locret_323CA: retn
long long dequantize_row_tq2_0(long long a1, float *a2, long long a3) { long long result; // rax long long v4; // rdx long long v5; // r9 float v6; // xmm0_4 char v7; // r10 long long v8; // r11 long long v9; // r11 long long i; // rbx long long j; // r14 bool v12; // zf result = a3 + 255; if ( a3 >= 0 ) result = a3; if ( a3 >= 256 ) { result >>= 8; v4 = 0LL; v5 = a1; do { v6 = ggml_table_f32_f16[*(unsigned __int16 *)(a1 + 66 * v4 + 64)]; v7 = 1; v8 = 0LL; do { v9 = v5 + v8; for ( i = 0LL; i != 4; ++i ) { for ( j = 0LL; j != 32; ++j ) *a2++ = (float)(((*(unsigned __int8 *)(v9 + j) >> (2 * i)) & 3) - 1) * v6; } v8 = 32LL; v12 = (v7 & 1) == 0; v7 = 0; } while ( !v12 ); ++v4; v5 += 66LL; } while ( v4 != result ); } return result; }
dequantize_row_tq2_0: LEA RAX,[RDX + 0xff] TEST RDX,RDX CMOVNS RAX,RDX CMP RDX,0x100 JL 0x001323ca PUSH RBP PUSH R14 PUSH RBX SAR RAX,0x8 XOR EDX,EDX MOV R8,qword ptr [0x00169fa8] MOV R9,RDI LAB_00132350: MOV RCX,RDX SHL RCX,0x6 LEA RCX,[RCX + RDX*0x2] MOVZX ECX,word ptr [RDI + RCX*0x1 + 0x40] MOVSS XMM0,dword ptr [R8 + RCX*0x4] MOV R10B,0x1 XOR R11D,R11D LAB_0013236c: ADD R11,R9 XOR EBX,EBX LAB_00132371: LEA ECX,[RBX + RBX*0x1] XOR R14D,R14D LAB_00132377: MOVZX EBP,byte ptr [R11 + R14*0x1] SHR EBP,CL AND EBP,0x3 DEC EBP XORPS XMM1,XMM1 CVTSI2SS XMM1,EBP MULSS XMM1,XMM0 MOVSS dword ptr [RSI],XMM1 ADD RSI,0x4 INC R14 CMP R14,0x20 JNZ 0x00132377 INC RBX CMP RBX,0x4 JNZ 0x00132371 MOV R11D,0x20 TEST R10B,0x1 MOV R10D,0x0 JNZ 0x0013236c INC RDX ADD R9,0x42 CMP RDX,RAX JNZ 0x00132350 POP RBX POP R14 POP RBP LAB_001323ca: RET
void dequantize_row_tq2_0(long param_1,float *param_2,long param_3) { float fVar1; int *puVar2; bool bVar3; long lVar4; long lVar5; long lVar6; long lVar7; bool bVar8; long lVar9; long lVar10; puVar2 = PTR_ggml_table_f32_f16_00169fa8; lVar4 = param_3 + 0xff; if (-1 < param_3) { lVar4 = param_3; } if (0xff < param_3) { lVar5 = 0; lVar7 = param_1; do { fVar1 = *(float *)(puVar2 + (ulong)*(ushort *)(param_1 + 0x40 + lVar5 * 0x42) * 4); lVar9 = 0; bVar3 = true; do { bVar8 = bVar3; lVar6 = 0; do { lVar10 = 0; do { *param_2 = (float)(int)((*(byte *)(lVar9 + lVar7 + lVar10) >> ((char)lVar6 * '\x02' & 0x1fU) & 3) - 1) * fVar1; param_2 = param_2 + 1; lVar10 = lVar10 + 1; } while (lVar10 != 0x20); lVar6 = lVar6 + 1; } while (lVar6 != 4); lVar9 = 0x20; bVar3 = false; } while (bVar8); lVar5 = lVar5 + 1; lVar7 = lVar7 + 0x42; } while (lVar5 != lVar4 >> 8); } return; }
46,288
ggml_repeat
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
struct ggml_tensor * ggml_repeat( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b) { GGML_ASSERT(ggml_can_repeat(a, b)); bool is_node = false; if (a->grad) { is_node = true; } struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, GGML_MAX_DIMS, b->ne); result->op = GGML_OP_REPEAT; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; return result; }
O2
c
ggml_repeat: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r15 movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi movq %rdx, %rsi callq 0x6a83d testb %al, %al je 0x6a7f9 movq 0x98(%rbx), %r12 movl (%rbx), %esi addq $0x10, %r15 pushq $0x4 popq %rdx movq %r14, %rdi movq %r15, %rcx callq 0x6835b movq %rax, %r15 movl $0xf, 0x50(%rax) testq %r12, %r12 je 0x6a7da movq %r14, %rdi movq %r15, %rsi callq 0x68a65 jmp 0x6a7dc xorl %eax, %eax movq %rax, 0x98(%r15) movq %rbx, 0xa0(%r15) movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x6b748(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6b799(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x2fa05(%rip), %rsi # 0x9a21e leaq 0x3705e(%rip), %rdx # 0xa187e leaq 0x3733c(%rip), %r8 # 0xa1b63 movl $0xe54, %ecx # imm = 0xE54 xorl %eax, %eax callq 0xa8b0 callq 0x67550 callq 0xa300
ggml_repeat: push r15 push r14 push r12 push rbx push rax mov r15, rdx mov rbx, rsi mov r14, rdi mov rdi, rsi mov rsi, rdx call ggml_can_repeat test al, al jz short loc_6A7F9 mov r12, [rbx+98h] mov esi, [rbx] add r15, 10h push 4 pop rdx mov rdi, r14 mov rcx, r15 call ggml_new_tensor mov r15, rax mov dword ptr [rax+50h], 0Fh test r12, r12 jz short loc_6A7DA mov rdi, r14 mov rsi, r15 call ggml_dup_tensor jmp short loc_6A7DC loc_6A7DA: xor eax, eax loc_6A7DC: mov [r15+98h], rax mov [r15+0A0h], rbx mov rax, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_6A7F9: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlAssertSDS; "GGML_ASSERT: %s:%d: %s\n" lea rdx, aWorkspaceLlm4b_7; "/workspace/llm4binary/github/2025_star3"... lea r8, aGgmlCanRepeatA; "ggml_can_repeat(a, b)" mov ecx, 0E54h xor eax, eax call _fprintf call ggml_print_backtrace call _abort
unsigned int * ggml_repeat(long long a1, unsigned int *a2, long long a3) { long long v4; // r12 unsigned int *v5; // rax unsigned int *v6; // r15 long long v7; // rax long long v9; // rdi if ( !(unsigned __int8)ggml_can_repeat(a2) ) { fflush(stdout); v9 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 3668, "ggml_can_repeat(a, b)"); ggml_print_backtrace(); abort(v9); } v4 = *((_QWORD *)a2 + 19); v5 = (unsigned int *)ggml_new_tensor(a1, *a2, 4LL, a3 + 16); v6 = v5; v5[20] = 15; if ( v4 ) v7 = ggml_dup_tensor(a1, v5); else v7 = 0LL; *((_QWORD *)v6 + 19) = v7; *((_QWORD *)v6 + 20) = a2; return v6; }
ggml_repeat: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,RDX MOV RBX,RSI MOV R14,RDI MOV RDI,RSI MOV RSI,RDX CALL 0x0016a83d TEST AL,AL JZ 0x0016a7f9 MOV R12,qword ptr [RBX + 0x98] MOV ESI,dword ptr [RBX] ADD R15,0x10 PUSH 0x4 POP RDX MOV RDI,R14 MOV RCX,R15 CALL 0x0016835b MOV R15,RAX MOV dword ptr [RAX + 0x50],0xf TEST R12,R12 JZ 0x0016a7da MOV RDI,R14 MOV RSI,R15 CALL 0x00168a65 JMP 0x0016a7dc LAB_0016a7da: XOR EAX,EAX LAB_0016a7dc: MOV qword ptr [R15 + 0x98],RAX MOV qword ptr [R15 + 0xa0],RBX MOV RAX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET LAB_0016a7f9: MOV RAX,qword ptr [0x001d5f48] MOV RDI,qword ptr [RAX] CALL 0x0010a6f0 MOV RAX,qword ptr [0x001d5fa8] MOV RDI,qword ptr [RAX] LEA RSI,[0x19a21e] LEA RDX,[0x1a187e] LEA R8,[0x1a1b63] MOV ECX,0xe54 XOR EAX,EAX CALL 0x0010a8b0 CALL 0x00167550 CALL 0x0010a300
long ggml_repeat(int8 param_1,int4 *param_2,long param_3) { long lVar1; char cVar2; long lVar3; int8 uVar4; cVar2 = ggml_can_repeat(param_2,param_3); if (cVar2 != '\0') { lVar1 = *(long *)(param_2 + 0x26); lVar3 = ggml_new_tensor(param_1,*param_2,4,param_3 + 0x10); *(int4 *)(lVar3 + 0x50) = 0xf; if (lVar1 == 0) { uVar4 = 0; } else { uVar4 = ggml_dup_tensor(param_1,lVar3); } *(int8 *)(lVar3 + 0x98) = uVar4; *(int4 **)(lVar3 + 0xa0) = param_2; return lVar3; } fflush(*(FILE **)PTR_stdout_001d5f48); fprintf(*(FILE **)PTR_stderr_001d5fa8,"GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 0xe54,"ggml_can_repeat(a, b)"); ggml_print_backtrace(); /* WARNING: Subroutine does not return */ abort(); }
46,289
ggml_repeat
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
struct ggml_tensor * ggml_repeat( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b) { GGML_ASSERT(ggml_can_repeat(a, b)); bool is_node = false; if (a->grad) { is_node = true; } struct ggml_tensor * result = ggml_new_tensor(ctx, a->type, GGML_MAX_DIMS, b->ne); result->op = GGML_OP_REPEAT; result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL; result->src[0] = a; return result; }
O3
c
ggml_repeat: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %rcx movq 0x10(%rdx), %rax cqto idivq 0x10(%rsi) testq %rdx, %rdx jne 0x90848 movq %rsi, %rbx movq 0x18(%rcx), %rax cqto idivq 0x18(%rsi) testq %rdx, %rdx jne 0x90848 movq 0x20(%rcx), %rax cqto idivq 0x20(%rbx) testq %rdx, %rdx jne 0x90848 movq 0x28(%rcx), %rax cqto idivq 0x28(%rbx) testq %rdx, %rdx jne 0x90848 movq %rdi, %r14 addq $0x10, %rcx movq 0x98(%rbx), %r13 movl (%rbx), %esi xorl %r12d, %r12d movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x8d64f movq %rax, %r15 movl $0xf, 0x50(%rax) testq %r13, %r13 je 0x9082d movl (%r15), %esi movq %r15, %rcx addq $0x10, %rcx movq %r14, %rdi movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x8d64f movq %rax, %r12 movq %r12, 0x98(%r15) movq %rbx, 0xa0(%r15) movq %r15, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq callq 0xcf8e
ggml_repeat: push r15 push r14 push r13 push r12 push rbx mov rcx, rdx mov rax, [rdx+10h] cqo idiv qword ptr [rsi+10h] test rdx, rdx jnz loc_90848 mov rbx, rsi mov rax, [rcx+18h] cqo idiv qword ptr [rsi+18h] test rdx, rdx jnz loc_90848 mov rax, [rcx+20h] cqo idiv qword ptr [rbx+20h] test rdx, rdx jnz short loc_90848 mov rax, [rcx+28h] cqo idiv qword ptr [rbx+28h] test rdx, rdx jnz short loc_90848 mov r14, rdi add rcx, 10h mov r13, [rbx+98h] mov esi, [rbx] xor r12d, r12d mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov r15, rax mov dword ptr [rax+50h], 0Fh test r13, r13 jz short loc_9082D mov esi, [r15] mov rcx, r15 add rcx, 10h mov rdi, r14 mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl mov r12, rax loc_9082D: mov [r15+98h], r12 mov [r15+0A0h], rbx mov rax, r15 pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_90848: call ggml_repeat_cold_1
long long ggml_repeat(long long a1, long long a2, _QWORD *a3, __m128 a4, __m128 a5) { long long v6; // rdx long long v7; // r13 long long v8; // r12 long long v9; // rax long long v10; // r15 v6 = (long long)a3[2] % *(_QWORD *)(a2 + 16); if ( v6 || (v6 = (long long)a3[3] % *(_QWORD *)(a2 + 24)) != 0 || (v6 = (long long)a3[4] % *(_QWORD *)(a2 + 32)) != 0 || (v6 = (long long)a3[5] % *(_QWORD *)(a2 + 40)) != 0 ) { ggml_repeat_cold_1(a1, a2, v6, a3); } v7 = *(_QWORD *)(a2 + 152); v8 = 0LL; v9 = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, a3 + 2, 0LL, 0LL, a4, a5); v10 = v9; *(_DWORD *)(v9 + 80) = 15; if ( v7 ) v8 = ggml_new_tensor_impl(a1, *(_DWORD *)v9, 4, (_QWORD *)(v9 + 16), 0LL, 0LL, a4, a5); *(_QWORD *)(v10 + 152) = v8; *(_QWORD *)(v10 + 160) = a2; return v10; }
46,290
free_small
seiftnesse[P]memoryallocator/src/custom_alloc_small.c
void free_small(void *ptr) { if (!ptr || ptr < (void *) small_pool || ptr >= (void *) (small_pool + SMALL_POOL_SIZE)) { HEAP_LOG("Invalid pointer for small free: %p\n", ptr); return; } // Calculate block index size_t offset = (uint8_t *) ptr - small_pool; int start_block = offset / SMALL_BLOCK_SIZE; HEAP_LOG("Freeing small allocation: ptr=%p, block=%d\n", ptr, start_block); // First pass: Count blocks without freeing them int blocks_to_free = 0; size_t total_size_freed = 0; // This loop just counts the blocks that will be freed for (int i = 0; start_block + i < SMALL_POOL_SIZE / SMALL_BLOCK_SIZE; i++) { int bmap_idx = (start_block + i) / 32; int bit_idx = (start_block + i) % 32; // Check if this block is actually allocated if (!(small_block_bitmap[bmap_idx] & (1 << bit_idx))) { break; } blocks_to_free++; total_size_freed += SMALL_BLOCK_SIZE; } // Apply zero-on-free according to configured depth if (zero_on_free_depth > ZERO_DEPTH_NONE && blocks_to_free > 0) { size_t user_size = blocks_to_free * SMALL_BLOCK_SIZE; size_t zero_size = 0; switch (zero_on_free_depth) { case ZERO_DEPTH_SHALLOW: // Zero only the first portion (headers/pointers) zero_size = (shallow_zero_size < user_size) ? shallow_zero_size : user_size; break; case ZERO_DEPTH_MEDIUM: // Zero half the memory zero_size = user_size / 2; break; case ZERO_DEPTH_DEEP: default: // Zero all memory (most secure, but slowest) zero_size = user_size; break; } if (zero_size > 0) { HEAP_LOG("Zeroing %zu bytes on small free at %p (depth=%d)\n", zero_size, ptr, zero_on_free_depth); _memset(ptr, 0, zero_size); } } // Second pass: Now mark the blocks as free in the bitmap for (int i = 0; i < blocks_to_free; i++) { int block = start_block + i; int bmap_idx = block / 32; int bit_idx = block % 32; small_block_bitmap[bmap_idx] &= ~(1 << bit_idx); } if (blocks_to_free > 0) { // Update stats - ensure we don't underflow if (allocation_stats.small_pool_used >= total_size_freed) { allocation_stats.small_pool_used -= total_size_freed; } else { allocation_stats.small_pool_used = 0; } update_stats_free(total_size_freed); HEAP_LOG("Small allocation freed: %d blocks, total size=%zu bytes\n", blocks_to_free, total_size_freed); } else { HEAP_LOG("Warning: No blocks freed from small pool\n"); } }
O1
c
free_small: pushq %r15 pushq %r14 pushq %rbx leaq 0x4879(%rip), %rax # 0x8140 cmpq %rax, %rdi setb %cl addq $0x100000, %rax # imm = 0x100000 cmpq %rax, %rdi setae %al orb %cl, %al jne 0x39f5 movq %rdi, %rbx subq 0x46e5(%rip), %rbx # 0x7fd0 shrq $0x5, %rbx cmpl $0x7fff, %ebx # imm = 0x7FFF jg 0x3953 xorl %r15d, %r15d leaq 0x410483f(%rip), %rax # 0x4108140 movl %ebx, %ecx xorl %r14d, %r14d movq %r14, %rdx movl %r15d, %esi leal 0x1f(%rcx), %r8d testl %ecx, %ecx cmovnsl %ecx, %r8d sarl $0x5, %r8d movslq %r8d, %r8 movl $0x1, %r9d shll %cl, %r9d movl (%rax,%r8,4), %r8d xorl %r15d, %r15d testl %r9d, %r8d setne %r15b addq $0x20, %r14 addl %esi, %r15d testl %r9d, %r8d cmoveq %rdx, %r14 je 0x3959 leal 0x1(%rcx), %edx cmpl $0x7fff, %ecx # imm = 0x7FFF movl %edx, %ecx jne 0x3906 jmp 0x3959 xorl %r14d, %r14d xorl %r15d, %r15d leaq 0x4105818(%rip), %rax # 0x4109178 movl (%rax), %eax testl %eax, %eax jle 0x399c testl %r15d, %r15d jle 0x399c movl %r15d, %edx shll $0x5, %edx cmpl $0x2, %eax je 0x398e cmpl $0x1, %eax jne 0x3990 leaq 0x4786(%rip), %rax # 0x8108 movq (%rax), %rax cmpq %rdx, %rax cmovbq %rax, %rdx jmp 0x3990 shrl %edx testq %rdx, %rdx je 0x399c xorl %esi, %esi callq 0x3ff6 testl %r15d, %r15d jle 0x39cb leaq 0x4104798(%rip), %rax # 0x4108140 movl %r15d, %edx leal 0x1f(%rbx), %esi testl %ebx, %ebx cmovnsl %ebx, %esi sarl $0x5, %esi movl $0xfffffffe, %edi # imm = 0xFFFFFFFE movl %ebx, %ecx roll %cl, %edi movslq %esi, %rcx andl %edi, (%rax,%rcx,4) incl %ebx decl %edx jne 0x39ab testl %r15d, %r15d jle 0x39f5 leaq 0x4105769(%rip), %rax # 0x4109140 movq 0x28(%rax), %rcx xorl %edx, %edx subq %r14, %rcx cmovaeq %rcx, %rdx movq %rdx, 0x28(%rax) movq %r14, %rdi popq %rbx popq %r14 popq %r15 jmp 0x4183 popq %rbx popq %r14 popq %r15 retq
free_small: push r15 push r14 push rbx lea rax, small_pool cmp rdi, rax setb cl add rax, 100000h cmp rdi, rax setnb al or al, cl jnz loc_39F5 mov rbx, rdi sub rbx, cs:small_pool_ptr shr rbx, 5 cmp ebx, 7FFFh jg short loc_3953 xor r15d, r15d lea rax, small_block_bitmap mov ecx, ebx xor r14d, r14d loc_3906: mov rdx, r14 mov esi, r15d lea r8d, [rcx+1Fh] test ecx, ecx cmovns r8d, ecx sar r8d, 5 movsxd r8, r8d mov r9d, 1 shl r9d, cl mov r8d, [rax+r8*4] xor r15d, r15d test r8d, r9d setnz r15b add r14, 20h ; ' ' add r15d, esi test r8d, r9d cmovz r14, rdx jz short loc_3959 lea edx, [rcx+1] cmp ecx, 7FFFh mov ecx, edx jnz short loc_3906 jmp short loc_3959 loc_3953: xor r14d, r14d xor r15d, r15d loc_3959: lea rax, zero_on_free_depth mov eax, [rax] test eax, eax jle short loc_399C test r15d, r15d jle short loc_399C mov edx, r15d shl edx, 5 cmp eax, 2 jz short loc_398E cmp eax, 1 jnz short loc_3990 lea rax, shallow_zero_size mov rax, [rax] cmp rax, rdx cmovb rdx, rax jmp short loc_3990 loc_398E: shr edx, 1 loc_3990: test rdx, rdx jz short loc_399C xor esi, esi call _memset loc_399C: test r15d, r15d jle short loc_39CB lea rax, small_block_bitmap mov edx, r15d loc_39AB: lea esi, [rbx+1Fh] test ebx, ebx cmovns esi, ebx sar esi, 5 mov edi, 0FFFFFFFEh mov ecx, ebx rol edi, cl movsxd rcx, esi and [rax+rcx*4], edi inc ebx dec edx jnz short loc_39AB loc_39CB: test r15d, r15d jle short loc_39F5 lea rax, allocation_stats mov rcx, [rax+28h] xor edx, edx sub rcx, r14 cmovnb rdx, rcx mov [rax+28h], rdx mov rdi, r14 pop rbx pop r14 pop r15 jmp update_stats_free loc_39F5: pop rbx pop r14 pop r15 retn
long long free_small(unsigned long long a1) { long long result; // rax unsigned long long v2; // rbx int v3; // r15d int v4; // ecx unsigned long long v5; // r14 unsigned long long v6; // rdx int v7; // r8d unsigned long long v9; // rdx int v10; // edx unsigned long long v11; // rcx long long v12; // rdx bool v13; // cf long long v14; // rcx result = (long long)&small_pool + 0x100000; LOBYTE(result) = a1 < (unsigned long long)&small_pool || a1 >= (unsigned long long)&small_pool + 0x100000; if ( !(_BYTE)result ) { v2 = (a1 - (unsigned long long)&small_pool) >> 5; if ( (int)v2 > 0x7FFF ) { v5 = 0LL; v3 = 0; } else { v3 = 0; v4 = (a1 - (unsigned long long)&small_pool) >> 5; v5 = 0LL; while ( 1 ) { v6 = v5; v7 = small_block_bitmap[v4 / 32]; v5 += 32LL; v3 += ((1 << v4) & v7) != 0; if ( ((1 << v4) & v7) == 0 ) break; if ( v4++ == 0x7FFF ) goto LABEL_9; } v5 = v6; } LABEL_9: result = (unsigned int)zero_on_free_depth; if ( zero_on_free_depth > 0 && v3 > 0 ) { v9 = (unsigned int)(32 * v3); if ( zero_on_free_depth == 2 ) { v9 = (unsigned int)v9 >> 1; } else if ( zero_on_free_depth == 1 ) { result = (long long)shallow_zero_size; if ( (unsigned long long)shallow_zero_size < v9 ) v9 = (unsigned long long)shallow_zero_size; } if ( v9 ) result = memset(a1, 0LL, v9); } if ( v3 > 0 ) { result = (long long)small_block_bitmap; v10 = v3; do { small_block_bitmap[(int)v2 / 32] &= __ROL4__(-2, v2); LODWORD(v2) = v2 + 1; --v10; } while ( v10 ); } if ( v3 > 0 ) { v11 = *(&allocation_stats + 5); v12 = 0LL; v13 = v11 < v5; v14 = v11 - v5; if ( !v13 ) v12 = v14; *(&allocation_stats + 5) = v12; return update_stats_free(v5); } } return result; }
free_small: PUSH R15 PUSH R14 PUSH RBX LEA RAX,[0x108140] CMP RDI,RAX SETC CL ADD RAX,0x100000 CMP RDI,RAX SETNC AL OR AL,CL JNZ 0x001039f5 MOV RBX,RDI SUB RBX,qword ptr [0x00107fd0] SHR RBX,0x5 CMP EBX,0x7fff JG 0x00103953 XOR R15D,R15D LEA RAX,[0x4208140] MOV ECX,EBX XOR R14D,R14D LAB_00103906: MOV RDX,R14 MOV ESI,R15D LEA R8D,[RCX + 0x1f] TEST ECX,ECX CMOVNS R8D,ECX SAR R8D,0x5 MOVSXD R8,R8D MOV R9D,0x1 SHL R9D,CL MOV R8D,dword ptr [RAX + R8*0x4] XOR R15D,R15D TEST R8D,R9D SETNZ R15B ADD R14,0x20 ADD R15D,ESI TEST R8D,R9D CMOVZ R14,RDX JZ 0x00103959 LEA EDX,[RCX + 0x1] CMP ECX,0x7fff MOV ECX,EDX JNZ 0x00103906 JMP 0x00103959 LAB_00103953: XOR R14D,R14D XOR R15D,R15D LAB_00103959: LEA RAX,[0x4209178] MOV EAX,dword ptr [RAX] TEST EAX,EAX JLE 0x0010399c TEST R15D,R15D JLE 0x0010399c MOV EDX,R15D SHL EDX,0x5 CMP EAX,0x2 JZ 0x0010398e CMP EAX,0x1 JNZ 0x00103990 LEA RAX,[0x108108] MOV RAX,qword ptr [RAX] CMP RAX,RDX CMOVC RDX,RAX JMP 0x00103990 LAB_0010398e: SHR EDX,0x1 LAB_00103990: TEST RDX,RDX JZ 0x0010399c XOR ESI,ESI CALL 0x00103ff6 LAB_0010399c: TEST R15D,R15D JLE 0x001039cb LEA RAX,[0x4208140] MOV EDX,R15D LAB_001039ab: LEA ESI,[RBX + 0x1f] TEST EBX,EBX CMOVNS ESI,EBX SAR ESI,0x5 MOV EDI,0xfffffffe MOV ECX,EBX ROL EDI,CL MOVSXD RCX,ESI AND dword ptr [RAX + RCX*0x4],EDI INC EBX DEC EDX JNZ 0x001039ab LAB_001039cb: TEST R15D,R15D JLE 0x001039f5 LEA RAX,[0x4209140] MOV RCX,qword ptr [RAX + 0x28] XOR EDX,EDX SUB RCX,R14 CMOVNC RDX,RCX MOV qword ptr [RAX + 0x28],RDX MOV RDI,R14 POP RBX POP R14 POP R15 JMP 0x00104183 LAB_001039f5: POP RBX POP R14 POP R15 RET
void free_small(int1 *param_1) { byte bVar1; ulong uVar2; long lVar3; int iVar4; ulong uVar5; ulong uVar6; int iVar7; int iVar8; uint uVar9; ulong uVar10; int iVar11; bool bVar12; if (param_1 < memory && (int1 *)0x10813f < param_1) { uVar6 = (ulong)((long)param_1 - (long)PTR_small_pool_00107fd0) >> 5; if ((int)uVar6 < 0x8000) { iVar11 = 0; uVar2 = uVar6 & 0xffffffff; uVar5 = 0; do { iVar4 = (int)uVar2; iVar8 = iVar4 + 0x1f; if (-1 < iVar4) { iVar8 = iVar4; } uVar9 = 1 << ((byte)uVar2 & 0x1f); iVar11 = (uint)(((&small_block_bitmap)[iVar8 >> 5] & uVar9) != 0) + iVar11; uVar10 = uVar5; } while ((((&small_block_bitmap)[iVar8 >> 5] & uVar9) != 0) && (uVar2 = (ulong)(iVar4 + 1), uVar10 = uVar5 + 0x20, uVar5 = uVar5 + 0x20, iVar4 != 0x7fff)); } else { iVar11 = 0; uVar10 = 0; } if ((0 < zero_on_free_depth) && (0 < iVar11)) { uVar5 = (ulong)(uint)(iVar11 << 5); if (zero_on_free_depth == 2) { uVar5 = (ulong)((uint)(iVar11 << 5) >> 1); } else if ((zero_on_free_depth == 1) && (shallow_zero_size < uVar5)) { uVar5 = shallow_zero_size; } if (uVar5 != 0) { _memset(param_1,0); } } iVar4 = iVar11; if (0 < iVar11) { do { iVar8 = (int)uVar6; iVar7 = iVar8 + 0x1f; if (-1 < iVar8) { iVar7 = iVar8; } bVar1 = (byte)uVar6 & 0x1f; (&small_block_bitmap)[iVar7 >> 5] = (&small_block_bitmap)[iVar7 >> 5] & (-2 << bVar1 | 0xfffffffeU >> 0x20 - bVar1); uVar6 = (ulong)(iVar8 + 1); iVar4 = iVar4 + -1; } while (iVar4 != 0); } if (0 < iVar11) { bVar12 = uVar10 <= DAT_04209168; lVar3 = DAT_04209168 - uVar10; DAT_04209168 = 0; if (bVar12) { DAT_04209168 = lVar3; } update_stats_free(uVar10); return; } } return; }
46,291
my_scan_8bit
eloqsql/strings/ctype-simple.c
size_t my_scan_8bit(CHARSET_INFO *cs, const char *str, const char *end, int sq) { const char *str0= str; switch (sq) { case MY_SEQ_INTTAIL: if (*str == '.') { for(str++ ; str != end && *str == '0' ; str++); return (size_t) (str - str0); } return 0; case MY_SEQ_SPACES: for ( ; str < end ; str++) { if (!my_isspace(cs,*str)) break; } return (size_t) (str - str0); case MY_SEQ_NONSPACES: for ( ; str < end ; str++) { if (my_isspace(cs, *str)) break; } return (size_t) (str - str0); default: return 0; } }
O0
c
my_scan_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x34(%rbp) subl $0x1, %eax je 0x7e107 jmp 0x7e0e8 movl -0x34(%rbp), %eax subl $0x2, %eax je 0x7e178 jmp 0x7e0f6 movl -0x34(%rbp), %eax subl $0x3, %eax je 0x7e1c3 jmp 0x7e20e movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x2e, %eax jne 0x7e16b movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x35(%rbp) je 0x7e13e movq -0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax sete %al movb %al, -0x35(%rbp) movb -0x35(%rbp), %al testb $0x1, %al jne 0x7e147 jmp 0x7e157 jmp 0x7e149 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x7e11f movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x7e216 movq $0x0, -0x8(%rbp) jmp 0x7e216 jmp 0x7e17a movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x7e1b2 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax jne 0x7e1a2 jmp 0x7e1b2 jmp 0x7e1a4 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x7e17a movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x7e216 jmp 0x7e1c5 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x7e1fd movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x18(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax je 0x7e1ed jmp 0x7e1fd jmp 0x7e1ef movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x7e1c5 movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x7e216 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax)
my_scan_8bit: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov [rbp+var_30], rax mov eax, [rbp+var_24] mov [rbp+var_34], eax sub eax, 1 jz short loc_7E107 jmp short $+2 loc_7E0E8: mov eax, [rbp+var_34] sub eax, 2 jz loc_7E178 jmp short $+2 loc_7E0F6: mov eax, [rbp+var_34] sub eax, 3 jz loc_7E1C3 jmp loc_7E20E loc_7E107: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 2Eh ; '.' jnz short loc_7E16B mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax loc_7E11F: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_35], al jz short loc_7E13E mov rax, [rbp+var_18] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' setz al mov [rbp+var_35], al loc_7E13E: mov al, [rbp+var_35] test al, 1 jnz short loc_7E147 jmp short loc_7E157 loc_7E147: jmp short $+2 loc_7E149: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_7E11F loc_7E157: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp loc_7E216 loc_7E16B: mov [rbp+var_8], 0 jmp loc_7E216 loc_7E178: jmp short $+2 loc_7E17A: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_7E1B2 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 jnz short loc_7E1A2 jmp short loc_7E1B2 loc_7E1A2: jmp short $+2 loc_7E1A4: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_7E17A loc_7E1B2: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp short loc_7E216 loc_7E1C3: jmp short $+2 loc_7E1C5: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_7E1FD mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_18] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 jz short loc_7E1ED jmp short loc_7E1FD loc_7E1ED: jmp short $+2 loc_7E1EF: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp short loc_7E1C5 loc_7E1FD: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp short loc_7E216 loc_7E20E: mov [rbp+var_8], 0 loc_7E216: mov rax, [rbp+var_8] pop rbp retn
long long my_scan_8bit(long long a1, unsigned __int8 *a2, unsigned __int8 *a3, int a4) { bool v5; // [rsp+1h] [rbp-35h] unsigned __int8 *v6; // [rsp+1Eh] [rbp-18h] unsigned __int8 *i; // [rsp+1Eh] [rbp-18h] v6 = a2; switch ( a4 ) { case 1: if ( *a2 == 46 ) { for ( i = a2 + 1; ; ++i ) { v5 = 0; if ( i != a3 ) v5 = *i == 48; if ( !v5 ) break; } return i - a2; } else { return 0LL; } case 2: while ( v6 < a3 && (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v6 + 1LL) & 8) != 0 ) ++v6; return v6 - a2; case 3: while ( v6 < a3 && (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v6 + 1LL) & 8) == 0 ) ++v6; return v6 - a2; default: return 0LL; } }
my_scan_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x34],EAX SUB EAX,0x1 JZ 0x0017e107 JMP 0x0017e0e8 LAB_0017e0e8: MOV EAX,dword ptr [RBP + -0x34] SUB EAX,0x2 JZ 0x0017e178 JMP 0x0017e0f6 LAB_0017e0f6: MOV EAX,dword ptr [RBP + -0x34] SUB EAX,0x3 JZ 0x0017e1c3 JMP 0x0017e20e LAB_0017e107: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2e JNZ 0x0017e16b MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX LAB_0017e11f: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x35],AL JZ 0x0017e13e MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 SETZ AL MOV byte ptr [RBP + -0x35],AL LAB_0017e13e: MOV AL,byte ptr [RBP + -0x35] TEST AL,0x1 JNZ 0x0017e147 JMP 0x0017e157 LAB_0017e147: JMP 0x0017e149 LAB_0017e149: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0017e11f LAB_0017e157: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0017e216 LAB_0017e16b: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0017e216 LAB_0017e178: JMP 0x0017e17a LAB_0017e17a: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0017e1b2 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 JNZ 0x0017e1a2 JMP 0x0017e1b2 LAB_0017e1a2: JMP 0x0017e1a4 LAB_0017e1a4: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0017e17a LAB_0017e1b2: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0017e216 LAB_0017e1c3: JMP 0x0017e1c5 LAB_0017e1c5: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x0017e1fd MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 JZ 0x0017e1ed JMP 0x0017e1fd LAB_0017e1ed: JMP 0x0017e1ef LAB_0017e1ef: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0017e1c5 LAB_0017e1fd: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0017e216 LAB_0017e20e: MOV qword ptr [RBP + -0x8],0x0 LAB_0017e216: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
long my_scan_8bit(long param_1,byte *param_2,byte *param_3,int param_4) { bool bVar1; byte *local_20; long local_10; if (param_4 == 1) { if (*param_2 == 0x2e) { local_20 = param_2 + 1; while( true ) { bVar1 = false; if (local_20 != param_3) { bVar1 = *local_20 == 0x30; } if (!bVar1) break; local_20 = local_20 + 1; } local_10 = (long)local_20 - (long)param_2; } else { local_10 = 0; } } else { local_20 = param_2; if (param_4 == 2) { while ((local_20 < param_3 && ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_20) & 8) != 0))) { local_20 = local_20 + 1; } local_10 = (long)local_20 - (long)param_2; } else if (param_4 == 3) { while ((local_20 < param_3 && ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_20) & 8) == 0))) { local_20 = local_20 + 1; } local_10 = (long)local_20 - (long)param_2; } else { local_10 = 0; } } return local_10; }
46,292
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
monkey531[P]llama/common/minja.hpp
json parseNumber(CharIterator& it, const CharIterator& end) { auto before = it; consumeSpaces(); auto start = it; bool hasDecimal = false; bool hasExponent = false; if (it != end && (*it == '-' || *it == '+')) ++it; while (it != end) { if (std::isdigit(*it)) { ++it; } else if (*it == '.') { if (hasDecimal) throw std::runtime_error("Multiple decimal points"); hasDecimal = true; ++it; } else if (it != start && (*it == 'e' || *it == 'E')) { if (hasExponent) throw std::runtime_error("Multiple exponents"); hasExponent = true; ++it; } else { break; } } if (start == it) { it = before; return json(); // No valid characters found } std::string str(start, it); try { return json::parse(str); } catch (json::parse_error& e) { throw std::runtime_error("Failed to parse number: '" + str + "' (" + std::string(e.what()) + ")"); return json(); } }
O3
cpp
minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rcx, %r15 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movq (%rdx), %r9 movq 0x18(%rsi), %rbp movq 0x20(%rsi), %r13 movq %r9, %rsi cmpq %rbp, %r13 je 0x91306 movq %rbx, 0x8(%rsp) movq %r9, %rbx movsbl (%r13), %edi callq 0x1b0c0 testl %eax, %eax je 0x912fb incq %r13 movq %r13, 0x20(%r12) cmpq %rbp, %r13 jne 0x912e0 movq (%r14), %rsi movq %rbx, %r9 movq 0x8(%rsp), %rbx movq (%r15), %rax cmpq %rsi, %rax je 0x913f0 movzbl (%rsi), %ecx cmpl $0x2d, %ecx je 0x91322 movq %rsi, %rdx cmpl $0x2b, %ecx jne 0x9132c leaq 0x1(%rsi), %rdx movq %rdx, (%r14) movq (%r15), %rax cmpq %rax, %rdx je 0x91379 xorl %eax, %eax xorl %ecx, %ecx movsbl (%rdx), %edi leal -0x30(%rdi), %r8d cmpl $0xa, %r8d jb 0x9136e movzbl %dil, %edi cmpl $0x2e, %edi jne 0x91356 testb $0x1, %al movb $0x1, %al je 0x9136e jmp 0x9142d cmpq %rsi, %rdx je 0x91379 orl $0x20, %edi cmpl $0x65, %edi jne 0x91379 testb $0x1, %cl movb $0x1, %cl jne 0x9144b incq %rdx movq %rdx, (%r14) cmpq (%r15), %rdx jne 0x91335 cmpq %rsi, %rdx je 0x913f0 leaq 0x20(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x10(%rsp), %rdi callq 0x28aea xorps %xmm0, %xmm0 leaq 0x90(%rsp), %rdx movaps %xmm0, 0x10(%rdx) movaps %xmm0, (%rdx) leaq 0x10(%rsp), %rsi movq %rbx, %rdi movl $0x1, %ecx xorl %r8d, %r8d callq 0x91ca4 movq 0xa0(%rsp), %rax testq %rax, %rax je 0x913d7 leaq 0x90(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x91418 movq 0x20(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x91418 movq %r9, (%r14) movb $0x0, (%rbx) movq $0x0, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x6b800 movq %rbx, %rdi movl $0x1, %esi callq 0x6b800 movq %rbx, %rax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x1b450 movq %rax, %rbx leaq 0x63de1(%rip), %rsi # 0xf5222 movq %rax, %rdi callq 0x1b330 jmp 0x91467 movl $0x10, %edi callq 0x1b450 movq %rax, %rbx leaq 0x63ddb(%rip), %rsi # 0xf523a movq %rax, %rdi callq 0x1b330 movq 0x9fb7a(%rip), %rsi # 0x130fe8 movq 0x9fae3(%rip), %rdx # 0x130f58 movq %rbx, %rdi callq 0x1bf60 jmp 0x916f2 movq %rdx, %rbx movq %rax, %r14 movq 0xa0(%rsp), %rax testq %rax, %rax je 0x914a7 leaq 0x90(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax cmpl $0x1, %ebx jne 0x916d7 movq %r14, %rdi callq 0x1b390 movq %rax, %r14 movl $0x10, %edi callq 0x1b450 movq %rax, %rbx leaq 0x63d7e(%rip), %rsi # 0xf524d leaq 0x50(%rsp), %rdi leaq 0x10(%rsp), %rdx callq 0x288ef leaq 0x63d82(%rip), %rsi # 0xf5267 leaq 0x50(%rsp), %rdi callq 0x1c160 leaq 0x40(%rsp), %r12 movq %r12, -0x10(%r12) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x91512 movups (%rcx), %xmm0 movups %xmm0, (%r12) jmp 0x9151f movq %rdx, 0x30(%rsp) movq (%rcx), %rdx movq %rdx, 0x40(%rsp) movq 0x8(%rax), %rdx movq %rdx, 0x38(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movq (%r14), %rax movq %r14, %rdi callq *0x10(%rax) leaq 0xb8(%rsp), %rdi leaq 0x7(%rsp), %rdx movq %rax, %rsi callq 0x65cd2 leaq 0xd8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0xb8(%rsp), %rdx callq 0x7e94a leaq 0x682bd(%rip), %rsi # 0xf9833 leaq 0xd8(%rsp), %rdi callq 0x1c160 leaq 0x80(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx jne 0x915a8 movups (%rcx), %xmm0 movups %xmm0, (%r13) jmp 0x915b8 movq %rdx, 0x70(%rsp) movq (%rcx), %rdx movq %rdx, 0x80(%rsp) movq 0x8(%rax), %rdx leaq 0x70(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movb $0x1, %bpl movq %rbx, %rdi callq 0x1be70 xorl %ebp, %ebp movq 0x9fa00(%rip), %rsi # 0x130fe8 movq 0x9f969(%rip), %rdx # 0x130f58 movq %rbx, %rdi callq 0x1bf60 movq %rax, %r14 movq 0x70(%rsp), %rdi cmpq %r13, %rdi je 0x9161c movq 0x80(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x9161c movq %rax, %r14 movb $0x1, %bpl leaq 0xe8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x91645 movq 0xe8(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x91645 movq %rax, %r14 movb $0x1, %bpl leaq 0xc8(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9166e movq 0xc8(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x9166e movq %rax, %r14 movb $0x1, %bpl movq 0x30(%rsp), %rdi cmpq %r12, %rdi je 0x91685 movq 0x40(%rsp), %rsi incq %rsi callq 0x1b910 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x916a0 movq 0x60(%rsp), %rsi incq %rsi callq 0x1b910 testb %bpl, %bpl jne 0x916ca jmp 0x916d2 movq %rax, %r14 leaq 0x60(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x916ca movq 0x60(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x916ca movq %rax, %r14 movq %rbx, %rdi callq 0x1b690 callq 0x1bea0 movq 0x10(%rsp), %rdi cmpq %r15, %rdi je 0x9170c movq 0x20(%rsp), %rsi incq %rsi callq 0x1b910 jmp 0x9170c jmp 0x916f2 movq %rax, %rdi callq 0x259fd movq %rax, %r14 jmp 0x9170c jmp 0x91701 movq %rax, %r14 movq %rbx, %rdi callq 0x1b690 movq %r14, %rdi callq 0x1bff0
_ZN5minja6Parser11parseNumberERN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKSB_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov r15, rcx mov r14, rdx mov r12, rsi mov rbx, rdi mov r9, [rdx] mov rbp, [rsi+18h] mov r13, [rsi+20h] mov rsi, r9 cmp r13, rbp jz short loc_91306 mov [rsp+128h+var_120], rbx mov rbx, r9 loc_912E0: movsx edi, byte ptr [r13+0] call _isspace test eax, eax jz short loc_912FB inc r13 mov [r12+20h], r13 cmp r13, rbp jnz short loc_912E0 loc_912FB: mov rsi, [r14] mov r9, rbx mov rbx, [rsp+128h+var_120] loc_91306: mov rax, [r15] cmp rax, rsi jz loc_913F0 movzx ecx, byte ptr [rsi] cmp ecx, 2Dh ; '-' jz short loc_91322 mov rdx, rsi cmp ecx, 2Bh ; '+' jnz short loc_9132C loc_91322: lea rdx, [rsi+1] mov [r14], rdx mov rax, [r15] loc_9132C: cmp rdx, rax jz short loc_91379 xor eax, eax xor ecx, ecx loc_91335: movsx edi, byte ptr [rdx] lea r8d, [rdi-30h] cmp r8d, 0Ah jb short loc_9136E movzx edi, dil cmp edi, 2Eh ; '.' jnz short loc_91356 test al, 1 mov al, 1 jz short loc_9136E jmp loc_9142D loc_91356: cmp rdx, rsi jz short loc_91379 or edi, 20h cmp edi, 65h ; 'e' jnz short loc_91379 test cl, 1 mov cl, 1 jnz loc_9144B loc_9136E: inc rdx mov [r14], rdx cmp rdx, [r15] jnz short loc_91335 loc_91379: cmp rdx, rsi jz short loc_913F0 lea r15, [rsp+128h+var_108] mov [r15-10h], r15 lea rdi, [rsp+128h+var_118] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIN9__gnu_cxx17__normal_iteratorIPKcS4_EEEEvT_SB_St20forward_iterator_tag; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::forward_iterator_tag) xorps xmm0, xmm0 lea rdx, [rsp+128h+var_98] movaps xmmword ptr [rdx+10h], xmm0 movaps xmmword ptr [rdx], xmm0 lea rsi, [rsp+128h+var_118] mov rdi, rbx mov ecx, 1 xor r8d, r8d call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb; 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>::parse<std::string&>(std::string&,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)>,bool,bool) mov rax, [rsp+128h+var_88] test rax, rax jz short loc_913D7 lea rdi, [rsp+128h+var_98] mov rsi, rdi mov edx, 3 call rax loc_913D7: mov rdi, [rsp+128h+var_118]; void * cmp rdi, r15 jz short loc_91418 mov rsi, [rsp+128h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_91418 loc_913F0: mov [r14], r9 mov byte ptr [rbx], 0 mov qword ptr [rbx+8], 0 mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) loc_91418: mov rax, rbx add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_9142D: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMultipleDecima; "Multiple decimal points" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_91467 loc_9144B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMultipleExpone; "Multiple exponents" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_91467: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp loc_916F2 mov rbx, rdx mov r14, rax mov rax, [rsp+128h+var_88] test rax, rax jz short loc_914A7 lea rdi, [rsp+128h+var_98] mov rsi, rdi mov edx, 3 call rax loc_914A7: cmp ebx, 1 jnz loc_916D7 mov rdi, r14; void * call ___cxa_begin_catch mov r14, rax mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aFailedToParseN; "Failed to parse number: '" lea rdi, [rsp+128h+var_D8] lea rdx, [rsp+128h+var_118] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, asc_F5267; "' (" lea rdi, [rsp+128h+var_D8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r12, [rsp+128h+var_E8] mov [r12-10h], r12 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_91512 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r12], xmm0 jmp short loc_9151F loc_91512: mov [rsp+128h+var_F8], rdx mov rdx, [rcx] mov [rsp+128h+var_E8], rdx loc_9151F: mov rdx, [rax+8] mov [rsp+128h+var_F0], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov rax, [r14] mov rdi, r14 call qword ptr [rax+10h] lea rdi, [rsp+128h+var_70] lea rdx, [rsp+128h+var_121] mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+128h+var_50] lea rsi, [rsp+128h+var_F8] lea rdx, [rsp+128h+var_70] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, a09401910201912+51h; ")" lea rdi, [rsp+128h+var_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+128h+var_A8] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jnz short loc_915A8 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 jmp short loc_915B8 loc_915A8: mov [rsp+128h+var_B8], rdx mov rdx, [rcx] mov [rsp+128h+var_A8], rdx loc_915B8: mov rdx, [rax+8] lea rsi, [rsp+128h+var_B8] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov bpl, 1 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 mov rdi, [rsp+128h+var_B8]; void * cmp rdi, r13 jz short loc_9161C mov rsi, [rsp+128h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9161C mov r14, rax mov bpl, 1 loc_9161C: lea rax, [rsp+128h+var_40] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_91645 mov rsi, [rsp+128h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_91645 mov r14, rax mov bpl, 1 loc_91645: lea rax, [rsp+128h+var_60] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9166E mov rsi, [rsp+128h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9166E mov r14, rax mov bpl, 1 loc_9166E: mov rdi, [rsp+128h+var_F8]; void * cmp rdi, r12 jz short loc_91685 mov rsi, [rsp+128h+var_E8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_91685: lea rax, [rsp+128h+var_C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_916A0 mov rsi, [rsp+128h+var_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_916A0: test bpl, bpl jnz short loc_916CA jmp short loc_916D2 mov r14, rax lea rax, [rsp+128h+var_C8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_916CA mov rsi, [rsp+128h+var_C8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_916CA mov r14, rax loc_916CA: mov rdi, rbx; void * call ___cxa_free_exception loc_916D2: call ___cxa_end_catch loc_916D7: mov rdi, [rsp+128h+var_118]; void * cmp rdi, r15 jz short loc_9170C mov rsi, [rsp+128h+var_108] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9170C jmp short $+2 loc_916F2: mov rdi, rax call __clang_call_terminate mov r14, rax jmp short loc_9170C jmp short $+2 loc_91701: mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception loc_9170C: mov rdi, r14 call __Unwind_Resume
long long minja::Parser::parseNumber(long long a1, long long a2, char **a3, char **a4) { long long v7; // rbx char *v8; // r9 char *v9; // rbp char *v10; // r13 char *v11; // rsi char *v12; // rbx char *v13; // rax int v14; // ecx char *v15; // rdx char v16; // al char v17; // cl int v18; // edi bool v19; // zf std::runtime_error *exception; // rbx void *v22[2]; // [rsp+10h] [rbp-118h] BYREF _QWORD v23[2]; // [rsp+20h] [rbp-108h] BYREF __int128 v24; // [rsp+90h] [rbp-98h] BYREF __int128 v25; // [rsp+A0h] [rbp-88h] v7 = a1; v8 = *a3; v9 = *(char **)(a2 + 24); v10 = *(char **)(a2 + 32); v11 = *a3; if ( v10 != v9 ) { v12 = *a3; do { if ( !(unsigned int)isspace((unsigned int)*v10) ) break; *(_QWORD *)(a2 + 32) = ++v10; } while ( v10 != v9 ); v11 = *a3; v8 = v12; v7 = a1; } v13 = *a4; if ( *a4 == v11 ) goto LABEL_25; v14 = (unsigned __int8)*v11; if ( v14 == 45 || (v15 = v11, v14 == 43) ) { v15 = v11 + 1; *a3 = v11 + 1; v13 = *a4; } if ( v15 != v13 ) { v16 = 0; v17 = 0; do { v18 = *v15; if ( (unsigned int)(v18 - 48) >= 0xA ) { if ( (unsigned __int8)v18 == 46 ) { v19 = (v16 & 1) == 0; v16 = 1; if ( !v19 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Multiple decimal points"); goto LABEL_28; } } else { if ( v15 == v11 || ((unsigned __int8)v18 | 0x20) != 0x65 ) break; v19 = (v17 & 1) == 0; v17 = 1; if ( !v19 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Multiple exponents"); LABEL_28: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } } } *a3 = ++v15; } while ( v15 != *a4 ); } if ( v15 == v11 ) { LABEL_25: *a3 = v8; *(_BYTE *)v7 = 0; *(_QWORD *)(v7 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7); } else { v22[0] = v23; std::string::_M_construct<__gnu_cxx::__normal_iterator<char const*,std::string>>((long long)v22, v11, (long long)v15); v25 = 0LL; v24 = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string&>( v7, v22, &v24, 1LL, 0LL); if ( (_QWORD)v25 ) ((void ( *)(__int128 *, __int128 *, long long))v25)(&v24, &v24, 3LL); if ( v22[0] != v23 ) operator delete(v22[0], v23[0] + 1LL); } return v7; }
parseNumber: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV R15,RCX MOV R14,RDX MOV R12,RSI MOV RBX,RDI MOV R9,qword ptr [RDX] MOV RBP,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] MOV RSI,R9 CMP R13,RBP JZ 0x00191306 MOV qword ptr [RSP + 0x8],RBX MOV RBX,R9 LAB_001912e0: MOVSX EDI,byte ptr [R13] CALL 0x0011b0c0 TEST EAX,EAX JZ 0x001912fb INC R13 MOV qword ptr [R12 + 0x20],R13 CMP R13,RBP JNZ 0x001912e0 LAB_001912fb: MOV RSI,qword ptr [R14] MOV R9,RBX MOV RBX,qword ptr [RSP + 0x8] LAB_00191306: MOV RAX,qword ptr [R15] CMP RAX,RSI JZ 0x001913f0 MOVZX ECX,byte ptr [RSI] CMP ECX,0x2d JZ 0x00191322 MOV RDX,RSI CMP ECX,0x2b JNZ 0x0019132c LAB_00191322: LEA RDX,[RSI + 0x1] MOV qword ptr [R14],RDX MOV RAX,qword ptr [R15] LAB_0019132c: CMP RDX,RAX JZ 0x00191379 XOR EAX,EAX XOR ECX,ECX LAB_00191335: MOVSX EDI,byte ptr [RDX] LEA R8D,[RDI + -0x30] CMP R8D,0xa JC 0x0019136e MOVZX EDI,DIL CMP EDI,0x2e JNZ 0x00191356 TEST AL,0x1 MOV AL,0x1 JZ 0x0019136e JMP 0x0019142d LAB_00191356: CMP RDX,RSI JZ 0x00191379 OR EDI,0x20 CMP EDI,0x65 JNZ 0x00191379 TEST CL,0x1 MOV CL,0x1 JNZ 0x0019144b LAB_0019136e: INC RDX MOV qword ptr [R14],RDX CMP RDX,qword ptr [R15] JNZ 0x00191335 LAB_00191379: CMP RDX,RSI JZ 0x001913f0 LEA R15,[RSP + 0x20] MOV qword ptr [R15 + -0x10],R15 LAB_00191387: LEA RDI,[RSP + 0x10] CALL 0x00128aea XORPS XMM0,XMM0 LEA RDX,[RSP + 0x90] MOVAPS xmmword ptr [RDX + 0x10],XMM0 MOVAPS xmmword ptr [RDX],XMM0 LAB_001913a3: LEA RSI,[RSP + 0x10] MOV RDI,RBX MOV ECX,0x1 XOR R8D,R8D CALL 0x00191ca4 MOV RAX,qword ptr [RSP + 0xa0] TEST RAX,RAX JZ 0x001913d7 LAB_001913c5: LEA RDI,[RSP + 0x90] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001913d7: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R15 JZ 0x00191418 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0011b910 JMP 0x00191418 LAB_001913f0: MOV qword ptr [R14],R9 MOV byte ptr [RBX],0x0 MOV qword ptr [RBX + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x0016b800 MOV RDI,RBX MOV ESI,0x1 CALL 0x0016b800 LAB_00191418: MOV RAX,RBX ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0019142d: MOV EDI,0x10 CALL 0x0011b450 MOV RBX,RAX LAB_0019143a: LEA RSI,[0x1f5222] MOV RDI,RAX CALL 0x0011b330 LAB_00191449: JMP 0x00191467 LAB_0019144b: MOV EDI,0x10 CALL 0x0011b450 MOV RBX,RAX LAB_00191458: LEA RSI,[0x1f523a] MOV RDI,RAX CALL 0x0011b330 LAB_00191467: MOV RSI,qword ptr [0x00230fe8] MOV RDX,qword ptr [0x00230f58] MOV RDI,RBX CALL 0x0011bf60
/* minja::Parser::parseNumber(__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string >&, __gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > const&) */ __normal_iterator * minja::Parser::parseNumber(__normal_iterator *param_1,__normal_iterator *param_2) { byte bVar1; byte *pbVar2; char *pcVar3; bool bVar4; bool bVar5; bool bVar6; int iVar7; byte *pbVar8; runtime_error *this; bool bVar9; int8 *in_RCX; long *in_RDX; byte *pbVar10; byte *pbVar11; char *pcVar12; long *local_118 [2]; long local_108 [14]; int8 local_98; int8 uStack_90; code *local_88; int8 uStack_80; pbVar2 = (byte *)*in_RDX; pcVar3 = *(char **)(param_2 + 0x18); pcVar12 = *(char **)(param_2 + 0x20); pbVar11 = pbVar2; if (pcVar12 != pcVar3) { do { iVar7 = isspace((int)*pcVar12); if (iVar7 == 0) break; pcVar12 = pcVar12 + 1; *(char **)(param_2 + 0x20) = pcVar12; } while (pcVar12 != pcVar3); pbVar11 = (byte *)*in_RDX; } pbVar8 = (byte *)*in_RCX; if (pbVar8 != pbVar11) { if ((*pbVar11 == 0x2d) || (pbVar10 = pbVar11, *pbVar11 == 0x2b)) { pbVar10 = pbVar11 + 1; *in_RDX = (long)pbVar10; pbVar8 = (byte *)*in_RCX; } if (pbVar10 != pbVar8) { bVar6 = false; bVar9 = false; do { bVar1 = *pbVar10; bVar4 = bVar6; bVar5 = bVar9; if (9 < (int)(char)bVar1 - 0x30U) { if (bVar1 == 0x2e) { bVar4 = true; if (bVar6) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019143a to 00191448 has its CatchHandler @ 00191701 */ std::runtime_error::runtime_error(this,"Multiple decimal points"); LAB_00191467: /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00230fe8,PTR__runtime_error_00230f58); } } else { if ((pbVar10 == pbVar11) || ((bVar1 | 0x20) != 0x65)) break; bVar5 = true; if (bVar9) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00191458 to 00191466 has its CatchHandler @ 001916ff */ std::runtime_error::runtime_error(this,"Multiple exponents"); goto LAB_00191467; } } } bVar9 = bVar5; bVar6 = bVar4; pbVar10 = pbVar10 + 1; *in_RDX = (long)pbVar10; } while (pbVar10 != (byte *)*in_RCX); } if (pbVar10 != pbVar11) { /* try { // try from 00191387 to 00191390 has its CatchHandler @ 001916fa */ local_118[0] = local_108; std::__cxx11::string:: _M_construct<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>(local_118); local_88 = (code *)0x0; uStack_80 = 0; local_98 = 0; uStack_90 = 0; /* try { // try from 001913a3 to 001913b7 has its CatchHandler @ 00191482 */ 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> ::parse<std::__cxx11::string&> ((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1,local_118,&local_98,1,0); if (local_88 != (code *)0x0) { /* try { // try from 001913c5 to 001913d6 has its CatchHandler @ 0019147d */ (*local_88)(&local_98,&local_98,3); } if (local_118[0] == local_108) { return param_1; } operator_delete(local_118[0],local_108[0] + 1); return param_1; } } *in_RDX = (long)pbVar2; *param_1 = 0; *(int8 *)(param_1 + 8) = 0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(param_1,0)); return param_1; }
46,293
inline_mysql_rwlock_destroy
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_rwlock_destroy( mysql_rwlock_t *that) { #ifdef HAVE_PSI_RWLOCK_INTERFACE if (psi_likely(that->m_psi != NULL)) { PSI_RWLOCK_CALL(destroy_rwlock)(that->m_psi); that->m_psi= NULL; } #endif return rwlock_destroy(&that->m_rwlock); }
O0
c
inline_mysql_rwlock_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x90(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xfea7d leaq 0x1c17ee(%rip), %rax # 0x2c0248 movq (%rax), %rax movq 0x58(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq $0x0, 0x90(%rax) movq -0x8(%rbp), %rdi callq 0xfa0d0 addq $0x10, %rsp popq %rbp retq nopl (%rax)
inline_mysql_rwlock_destroy_1: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+90h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_FEA7D lea rax, PSI_server mov rax, [rax] mov rax, [rax+58h] mov rcx, [rbp+var_8] mov rdi, [rcx+90h] call rax mov rax, [rbp+var_8] mov qword ptr [rax+90h], 0 loc_FEA7D: mov rdi, [rbp+var_8] call my_rw_destroy add rsp, 10h pop rbp retn
long long inline_mysql_rwlock_destroy_1(long long a1) { if ( *(_QWORD *)(a1 + 144) ) { ((void ( *)(_QWORD))PSI_server[11])(*(_QWORD *)(a1 + 144)); *(_QWORD *)(a1 + 144) = 0LL; } return my_rw_destroy(a1); }
inline_mysql_rwlock_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x90],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 0x001fea7d LEA RAX,[0x3c0248] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x90],0x0 LAB_001fea7d: MOV RDI,qword ptr [RBP + -0x8] CALL 0x001fa0d0 ADD RSP,0x10 POP RBP RET
void inline_mysql_rwlock_destroy(long param_1) { if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x58))(*(int8 *)(param_1 + 0x90)); *(int8 *)(param_1 + 0x90) = 0; } my_rw_destroy(param_1); return; }
46,294
MemoryManager::dumpMemory[abi:cxx11]()
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
std::string MemoryManager::dumpMemory() { char buf[65536]; std::string dump; dump += "Memory Dump: \n"; for (uint32_t addr = 0; addr < UINT32_MAX; addr += 4096) { sprintf(buf, "0x%x-0x%x\n", addr, addr + 4096); dump += buf; for (uint32_t offset = 0; offset < 4096; ++offset) { sprintf(buf, " 0x%x: 0x%x\n", addr + offset, this->memory[addr + offset]); dump += buf; } } return dump; }
O0
cpp
MemoryManager::dumpMemory[abi:cxx11](): subq $0x10068, %rsp # imm = 0x10068 movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0x10060(%rsp) movq %rsi, 0x10058(%rsp) movq 0x10058(%rsp), %rax movq %rax, 0x20(%rsp) movb $0x0, 0x4f(%rsp) callq 0x6210 movq 0x28(%rsp), %rdi leaq 0x41c5(%rip), %rsi # 0xc2ac callq 0x6160 jmp 0x80ee movl $0x0, 0x38(%rsp) cmpl $-0x1, 0x38(%rsp) jae 0x81c6 movl 0x38(%rsp), %edx movl %edx, %ecx addl $0x1000, %ecx # imm = 0x1000 leaq 0x41a7(%rip), %rsi # 0xc2bb xorl %eax, %eax leaq 0x50(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x6060 movq 0x28(%rsp), %rdi movq 0x10(%rsp), %rsi callq 0x6160 jmp 0x8136 movl $0x0, 0x34(%rsp) cmpl $0x1000, 0x34(%rsp) # imm = 0x1000 jae 0x81b2 movq 0x20(%rsp), %rax movl 0x38(%rsp), %edx movl 0x34(%rsp), %ecx addl %ecx, %edx movq (%rax), %rax movl %edx, %ecx movzbl (%rax,%rcx), %ecx leaq 0x415f(%rip), %rsi # 0xc2c6 xorl %eax, %eax leaq 0x50(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x6060 movq 0x28(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x6160 jmp 0x8189 jmp 0x818b movl 0x34(%rsp), %eax addl $0x1, %eax movl %eax, 0x34(%rsp) jmp 0x813e movq 0x28(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) callq 0x6110 jmp 0x81e9 jmp 0x81b4 movl 0x38(%rsp), %eax addl $0x1000, %eax # imm = 0x1000 movl %eax, 0x38(%rsp) jmp 0x80f6 movb $0x1, 0x4f(%rsp) testb $0x1, 0x4f(%rsp) jne 0x81dc movq 0x28(%rsp), %rdi callq 0x6110 movq 0x18(%rsp), %rax addq $0x10068, %rsp # imm = 0x10068 retq movq 0x40(%rsp), %rdi callq 0x62c0 nopw %cs:(%rax,%rax)
_ZN13MemoryManager10dumpMemoryB5cxx11Ev: sub rsp, 10068h mov [rsp+10068h+var_10040], rdi mov rax, rdi mov [rsp+10068h+var_10050], rax mov [rsp+10068h+var_8], rdi mov [rsp+10068h+var_10], rsi mov rax, [rsp+10068h+var_10] mov [rsp+10068h+var_10048], rax mov [rsp+10068h+var_10019], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rsp+10068h+var_10040] lea rsi, aMemoryDump; "Memory Dump: \n" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_80EE: mov [rsp+10068h+var_10030], 0 loc_80F6: cmp [rsp+10068h+var_10030], 0FFFFFFFFh jnb loc_81C6 mov edx, [rsp+10068h+var_10030] mov ecx, edx add ecx, 1000h lea rsi, a0xX0xX; "0x%x-0x%x\n" xor eax, eax lea rdi, [rsp+10068h+var_10018] mov [rsp+10068h+var_10058], rdi call _sprintf mov rdi, [rsp+10068h+var_10040] mov rsi, [rsp+10068h+var_10058] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_8136: mov [rsp+10068h+var_10034], 0 loc_813E: cmp [rsp+10068h+var_10034], 1000h jnb short loc_81B2 mov rax, [rsp+10068h+var_10048] mov edx, [rsp+10068h+var_10030] mov ecx, [rsp+10068h+var_10034] add edx, ecx mov rax, [rax] mov ecx, edx movzx ecx, byte ptr [rax+rcx] lea rsi, a0xX0xX_0; " 0x%x: 0x%x\n" xor eax, eax lea rdi, [rsp+10068h+var_10018] mov [rsp+10068h+var_10060], rdi call _sprintf mov rdi, [rsp+10068h+var_10040] mov rsi, [rsp+10068h+var_10060] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_8189: jmp short $+2 loc_818B: mov eax, [rsp+10068h+var_10034] add eax, 1 mov [rsp+10068h+var_10034], eax jmp short loc_813E mov rdi, [rsp+arg_20] mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_81E9 loc_81B2: jmp short $+2 loc_81B4: mov eax, [rsp+10068h+var_10030] add eax, 1000h mov [rsp+10068h+var_10030], eax jmp loc_80F6 loc_81C6: mov [rsp+10068h+var_10019], 1 test [rsp+10068h+var_10019], 1 jnz short loc_81DC mov rdi, [rsp+10068h+var_10040] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_81DC: mov rax, [rsp+10068h+var_10050] add rsp, 10068h retn loc_81E9: mov rdi, [rsp+arg_38] call __Unwind_Resume
long long MemoryManager::dumpMemory[abi:cxx11](long long a1, _QWORD *a2) { unsigned int j; // [rsp+34h] [rbp-10034h] int i; // [rsp+38h] [rbp-10030h] _BYTE v5[65544]; // [rsp+50h] [rbp-10018h] BYREF _QWORD *v6; // [rsp+10058h] [rbp-10h] long long v7; // [rsp+10060h] [rbp-8h] v7 = a1; v6 = a2; std::string::basic_string(); std::string::operator+=(a1, "Memory Dump: \n"); for ( i = 0; i != -1; i += 4096 ) { sprintf(v5, "0x%x-0x%x\n", i, i + 4096); std::string::operator+=(a1, v5); for ( j = 0; j < 0x1000; ++j ) { sprintf(v5, " 0x%x: 0x%x\n", j + i, *(unsigned __int8 *)(*a2 + j + i)); std::string::operator+=(a1, v5); } } return a1; }
dumpMemory[abi:cxx11]: SUB RSP,0x10068 MOV qword ptr [RSP + 0x28],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10060],RDI MOV qword ptr [RSP + 0x10058],RSI MOV RAX,qword ptr [RSP + 0x10058] MOV qword ptr [RSP + 0x20],RAX MOV byte ptr [RSP + 0x4f],0x0 CALL 0x00106210 MOV RDI,qword ptr [RSP + 0x28] LAB_001080e0: LEA RSI,[0x10c2ac] CALL 0x00106160 JMP 0x001080ee LAB_001080ee: MOV dword ptr [RSP + 0x38],0x0 LAB_001080f6: CMP dword ptr [RSP + 0x38],-0x1 JNC 0x001081c6 MOV EDX,dword ptr [RSP + 0x38] MOV ECX,EDX ADD ECX,0x1000 LEA RSI,[0x10c2bb] XOR EAX,EAX LEA RDI,[RSP + 0x50] MOV qword ptr [RSP + 0x10],RDI CALL 0x00106060 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x10] CALL 0x00106160 JMP 0x00108136 LAB_00108136: MOV dword ptr [RSP + 0x34],0x0 LAB_0010813e: CMP dword ptr [RSP + 0x34],0x1000 JNC 0x001081b2 MOV RAX,qword ptr [RSP + 0x20] MOV EDX,dword ptr [RSP + 0x38] MOV ECX,dword ptr [RSP + 0x34] ADD EDX,ECX MOV RAX,qword ptr [RAX] MOV ECX,EDX MOVZX ECX,byte ptr [RAX + RCX*0x1] LEA RSI,[0x10c2c6] XOR EAX,EAX LEA RDI,[RSP + 0x50] MOV qword ptr [RSP + 0x8],RDI CALL 0x00106060 MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00106160 LAB_00108187: JMP 0x00108189 LAB_00108189: JMP 0x0010818b LAB_0010818b: MOV EAX,dword ptr [RSP + 0x34] ADD EAX,0x1 MOV dword ptr [RSP + 0x34],EAX JMP 0x0010813e LAB_001081b2: JMP 0x001081b4 LAB_001081b4: MOV EAX,dword ptr [RSP + 0x38] ADD EAX,0x1000 MOV dword ptr [RSP + 0x38],EAX JMP 0x001080f6 LAB_001081c6: MOV byte ptr [RSP + 0x4f],0x1 TEST byte ptr [RSP + 0x4f],0x1 JNZ 0x001081dc MOV RDI,qword ptr [RSP + 0x28] CALL 0x00106110 LAB_001081dc: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0x10068 RET
/* WARNING: Removing unreachable block (ram,0x001081d2) */ /* MemoryManager::dumpMemory[abi:cxx11]() */ string * MemoryManager::dumpMemory_abi_cxx11_(void) { long *in_RSI; string *in_RDI; uint uStack_10034; uint uStack_10030; char acStack_10018 [65560]; std::__cxx11::string::string(in_RDI); /* try { // try from 001080e0 to 00108186 has its CatchHandler @ 00108198 */ std::__cxx11::string::operator+=(in_RDI,"Memory Dump: \n"); for (uStack_10030 = 0; uStack_10030 != 0xffffffff; uStack_10030 = uStack_10030 + 0x1000) { sprintf(acStack_10018,"0x%x-0x%x\n",(ulong)uStack_10030,(ulong)(uStack_10030 + 0x1000)); std::__cxx11::string::operator+=(in_RDI,acStack_10018); for (uStack_10034 = 0; uStack_10034 < 0x1000; uStack_10034 = uStack_10034 + 1) { sprintf(acStack_10018," 0x%x: 0x%x\n",(ulong)(uStack_10030 + uStack_10034), (ulong)*(byte *)(*in_RSI + (ulong)(uStack_10030 + uStack_10034))); std::__cxx11::string::operator+=(in_RDI,acStack_10018); } } return in_RDI; }
46,295
MemoryManager::dumpMemory[abi:cxx11]()
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
std::string MemoryManager::dumpMemory() { char buf[65536]; std::string dump; dump += "Memory Dump: \n"; for (uint32_t addr = 0; addr < UINT32_MAX; addr += 4096) { sprintf(buf, "0x%x-0x%x\n", addr, addr + 4096); dump += buf; for (uint32_t offset = 0; offset < 4096; ++offset) { sprintf(buf, " 0x%x: 0x%x\n", addr + offset, this->memory[addr + offset]); dump += buf; } } return dump; }
O1
cpp
MemoryManager::dumpMemory[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10018, %rsp # imm = 0x10018 movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) leaq 0x1f7b(%rip), %rsi # 0x623a callq 0x3280 movq %r15, 0x8(%rsp) leaq 0x10(%rsp), %r12 leaq 0x1f7f(%rip), %r13 # 0x6254 xorl %r15d, %r15d leal 0x1000(%r15), %ebp movq %r12, %rdi leaq 0x1f60(%rip), %rsi # 0x6249 movl %r15d, %edx movl %ebp, %ecx xorl %eax, %eax callq 0x3060 movq %rbx, %rdi movq %r12, %rsi callq 0x3280 movl %ebp, 0x4(%rsp) movl %r15d, %r15d movl $0x1000, %ebp # imm = 0x1000 movq (%r14), %rax movzbl (%rax,%r15), %ecx movq %r12, %rdi movq %r13, %rsi movl %r15d, %edx xorl %eax, %eax callq 0x3060 movq %rbx, %rdi movq %r12, %rsi callq 0x3280 incq %r15 decq %rbp jne 0x430c movl 0x4(%rsp), %eax movl %eax, %r15d jmp 0x42d8 jmp 0x4342 movq %rax, %r14 movq 0x8(%rsp), %r15 jmp 0x434f movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x435c callq 0x3150 movq %r14, %rdi callq 0x3260
_ZN13MemoryManager10dumpMemoryB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 10018h mov r14, rsi mov rbx, rdi lea r15, [rdi+10h] mov [rdi], r15 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 lea rsi, aMemoryDump; "Memory Dump: \n" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+10048h+var_10040], r15 lea r12, [rsp+10048h+var_10038] lea r13, a0xX0xX; " 0x%x: 0x%x\n" xor r15d, r15d loc_42D8: lea ebp, [r15+1000h] mov rdi, r12 lea rsi, a0xX0xX_0; "0x%x-0x%x\n" mov edx, r15d mov ecx, ebp xor eax, eax call _sprintf mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+10048h+var_10044], ebp mov r15d, r15d mov ebp, 1000h loc_430C: mov rax, [r14] movzx ecx, byte ptr [rax+r15] mov rdi, r12 mov rsi, r13 mov edx, r15d xor eax, eax call _sprintf mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) inc r15 dec rbp jnz short loc_430C mov eax, [rsp+10048h+var_10044] mov r15d, eax jmp short loc_42D8 jmp short $+2 loc_4342: mov r14, rax mov r15, [rsp+arg_0] jmp short loc_434F mov r14, rax loc_434F: mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_435C call __ZdlPv; operator delete(void *) loc_435C: mov rdi, r14 call __Unwind_Resume
void __noreturn MemoryManager::dumpMemory[abi:cxx11]( long long a1, _QWORD *a2, long long a3, long long a4, long long a5, long long a6, long long a7) { long long v7; // r15 long long v8; // rbp int v9; // [rsp+4h] [rbp-10044h] _BYTE v10[65592]; // [rsp+10h] [rbp-10038h] BYREF *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::append(a1, "Memory Dump: \n"); for ( LODWORD(v7) = 0; ; LODWORD(v7) = v9 ) { sprintf(v10, "0x%x-0x%x\n", v7, v7 + 4096); std::string::append(a1, v10); v9 = v7 + 4096; v7 = (unsigned int)v7; v8 = 4096LL; do { sprintf(v10, " 0x%x: 0x%x\n", v7, *(unsigned __int8 *)(*a2 + v7)); std::string::append(a1, v10); ++v7; --v8; } while ( v8 ); } }
dumpMemory[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10018 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_001042b8: LEA RSI,[0x10623a] CALL 0x00103280 MOV qword ptr [RSP + 0x8],R15 LEA R12,[RSP + 0x10] LEA R13,[0x106254] XOR R15D,R15D LAB_001042d8: LEA EBP,[R15 + 0x1000] MOV RDI,R12 LEA RSI,[0x106249] MOV EDX,R15D MOV ECX,EBP XOR EAX,EAX CALL 0x00103060 LAB_001042f5: MOV RDI,RBX MOV RSI,R12 CALL 0x00103280 MOV dword ptr [RSP + 0x4],EBP MOV R15D,R15D MOV EBP,0x1000 LAB_0010430c: MOV RAX,qword ptr [R14] MOVZX ECX,byte ptr [RAX + R15*0x1] MOV RDI,R12 MOV RSI,R13 MOV EDX,R15D XOR EAX,EAX CALL 0x00103060 LAB_00104324: MOV RDI,RBX MOV RSI,R12 CALL 0x00103280 LAB_0010432f: INC R15 DEC RBP JNZ 0x0010430c MOV EAX,dword ptr [RSP + 0x4] MOV R15D,EAX JMP 0x001042d8
/* MemoryManager::dumpMemory[abi:cxx11]() */ void MemoryManager::dumpMemory_abi_cxx11_(void) { uint uVar1; long lVar2; long *in_RSI; long *in_RDI; uint uVar3; ulong uVar4; char acStack_10038 [65544]; *in_RDI = (long)(in_RDI + 2); in_RDI[1] = 0; *(int1 *)(in_RDI + 2) = 0; /* try { // try from 001042b8 to 001042c3 has its CatchHandler @ 0010434c */ std::__cxx11::string::append((char *)in_RDI); uVar3 = 0; do { uVar1 = uVar3 + 0x1000; sprintf(acStack_10038,"0x%x-0x%x\n",(ulong)uVar3,(ulong)uVar1); /* try { // try from 001042f5 to 001042ff has its CatchHandler @ 00104340 */ std::__cxx11::string::append((char *)in_RDI); uVar4 = (ulong)uVar3; lVar2 = 0x1000; do { sprintf(acStack_10038," 0x%x: 0x%x\n",uVar4 & 0xffffffff,(ulong)*(byte *)(*in_RSI + uVar4)); /* try { // try from 00104324 to 0010432e has its CatchHandler @ 00104342 */ std::__cxx11::string::append((char *)in_RDI); uVar4 = uVar4 + 1; lVar2 = lVar2 + -1; uVar3 = uVar1; } while (lVar2 != 0); } while( true ); }
46,296
MemoryManager::dumpMemory[abi:cxx11]()
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
std::string MemoryManager::dumpMemory() { char buf[65536]; std::string dump; dump += "Memory Dump: \n"; for (uint32_t addr = 0; addr < UINT32_MAX; addr += 4096) { sprintf(buf, "0x%x-0x%x\n", addr, addr + 4096); dump += buf; for (uint32_t offset = 0; offset < 4096; ++offset) { sprintf(buf, " 0x%x: 0x%x\n", addr + offset, this->memory[addr + offset]); dump += buf; } } return dump; }
O2
cpp
MemoryManager::dumpMemory[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10018, %rsp # imm = 0x10018 movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) leaq 0x11e8(%rip), %rsi # 0x523a callq 0x3280 leaq 0x10(%rsp), %r12 xorl %ebp, %ebp leaq 0x1000(%rbp), %r15 movq %r12, %rdi leaq 0x11da(%rip), %rsi # 0x5249 movl %ebp, %edx movl %r15d, %ecx xorl %eax, %eax callq 0x3050 movq %rbx, %rdi movq %r12, %rsi callq 0x3280 movq %r15, 0x8(%rsp) movl %ebp, %r15d xorl %r13d, %r13d cmpq $0x1000, %r13 # imm = 0x1000 je 0x40cc movq (%r14), %rax addq %r15, %rax movzbl (%r13,%rax), %ecx leal (%rbp,%r13), %edx movq %r12, %rdi leaq 0x119f(%rip), %rsi # 0x5254 xorl %eax, %eax callq 0x3050 movq %rbx, %rdi movq %r12, %rsi callq 0x3280 incq %r13 jmp 0x4091 movq 0x8(%rsp), %rbp jmp 0x405e jmp 0x40d7 jmp 0x40d7 movq %rax, %r14 movq %rbx, %rdi callq 0x30c0 movq %r14, %rdi callq 0x3260
_ZN13MemoryManager10dumpMemoryB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 10018h mov r14, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 lea rsi, aMemoryDump; "Memory Dump: \n" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r12, [rsp+10048h+var_10038] xor ebp, ebp loc_405E: lea r15, [rbp+1000h] mov rdi, r12 lea rsi, a0xX0xX; "0x%x-0x%x\n" mov edx, ebp mov ecx, r15d xor eax, eax call _sprintf mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+10048h+var_10040], r15 mov r15d, ebp xor r13d, r13d loc_4091: cmp r13, 1000h jz short loc_40CC mov rax, [r14] add rax, r15 movzx ecx, byte ptr [r13+rax+0] lea edx, [rbp+r13+0] mov rdi, r12 lea rsi, a0xX0xX_0; " 0x%x: 0x%x\n" xor eax, eax call _sprintf mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) inc r13 jmp short loc_4091 loc_40CC: mov rbp, [rsp+10048h+var_10040] jmp short loc_405E jmp short loc_40D7 jmp short $+2 loc_40D7: mov r14, rax mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
void __noreturn MemoryManager::dumpMemory[abi:cxx11](long long a1, _QWORD *a2) { unsigned int i; // ebp long long j; // r13 _BYTE v4[65592]; // [rsp+10h] [rbp-10038h] BYREF *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::append(a1, "Memory Dump: \n"); for ( i = 0; ; i += 4096 ) { sprintf(v4, "0x%x-0x%x\n", i, i + 4096); std::string::append(a1, v4); for ( j = 0LL; j != 4096; ++j ) { sprintf(v4, " 0x%x: 0x%x\n", i + j, *(unsigned __int8 *)(j + i + *a2)); std::string::append(a1, v4); } } }
dumpMemory[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10018 MOV R14,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_0010404b: LEA RSI,[0x10523a] CALL 0x00103280 LEA R12,[RSP + 0x10] XOR EBP,EBP LAB_0010405e: LEA R15,[RBP + 0x1000] MOV RDI,R12 LEA RSI,[0x105249] MOV EDX,EBP MOV ECX,R15D XOR EAX,EAX CALL 0x00103050 LAB_0010407b: MOV RDI,RBX MOV RSI,R12 CALL 0x00103280 MOV qword ptr [RSP + 0x8],R15 MOV R15D,EBP XOR R13D,R13D LAB_00104091: CMP R13,0x1000 JZ 0x001040cc MOV RAX,qword ptr [R14] ADD RAX,R15 MOVZX ECX,byte ptr [R13 + RAX*0x1] LEA EDX,[RBP + R13*0x1] MOV RDI,R12 LEA RSI,[0x105254] XOR EAX,EAX CALL 0x00103050 LAB_001040bc: MOV RDI,RBX MOV RSI,R12 CALL 0x00103280 LAB_001040c7: INC R13 JMP 0x00104091 LAB_001040cc: MOV RBP,qword ptr [RSP + 0x8] JMP 0x0010405e
/* MemoryManager::dumpMemory[abi:cxx11]() */ void MemoryManager::dumpMemory_abi_cxx11_(void) { uint uVar1; uint uVar2; long *in_RSI; long *in_RDI; long lVar3; char acStack_10038 [65544]; *in_RDI = (long)(in_RDI + 2); in_RDI[1] = 0; *(int1 *)(in_RDI + 2) = 0; /* try { // try from 0010404b to 00104056 has its CatchHandler @ 001040d7 */ std::__cxx11::string::append((char *)in_RDI); uVar1 = 0; do { uVar2 = uVar1; sprintf(acStack_10038,"0x%x-0x%x\n",(ulong)uVar2,(ulong)(uVar2 + 0x1000)); /* try { // try from 0010407b to 00104085 has its CatchHandler @ 001040d3 */ std::__cxx11::string::append((char *)in_RDI); for (lVar3 = 0; uVar1 = uVar2 + 0x1000, lVar3 != 0x1000; lVar3 = lVar3 + 1) { sprintf(acStack_10038," 0x%x: 0x%x\n",(ulong)(uVar2 + (int)lVar3), (ulong)*(byte *)(lVar3 + *in_RSI + (ulong)uVar2)); /* try { // try from 001040bc to 001040c6 has its CatchHandler @ 001040d5 */ std::__cxx11::string::append((char *)in_RDI); } } while( true ); }
46,297
MemoryManager::dumpMemory[abi:cxx11]()
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
std::string MemoryManager::dumpMemory() { char buf[65536]; std::string dump; dump += "Memory Dump: \n"; for (uint32_t addr = 0; addr < UINT32_MAX; addr += 4096) { sprintf(buf, "0x%x-0x%x\n", addr, addr + 4096); dump += buf; for (uint32_t offset = 0; offset < 4096; ++offset) { sprintf(buf, " 0x%x: 0x%x\n", addr + offset, this->memory[addr + offset]); dump += buf; } } return dump; }
O3
cpp
MemoryManager::dumpMemory[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10018, %rsp # imm = 0x10018 movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r15 movq %r15, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) leaq 0x1f8d(%rip), %rsi # 0x623a callq 0x3280 movq %r15, 0x8(%rsp) leaq 0x10(%rsp), %r12 leaq 0x1f91(%rip), %r13 # 0x6254 xorl %r15d, %r15d leal 0x1000(%r15), %ebp movq %r12, %rdi leaq 0x1f72(%rip), %rsi # 0x6249 movl %r15d, %edx movl %ebp, %ecx xorl %eax, %eax callq 0x3060 movq %rbx, %rdi movq %r12, %rsi callq 0x3280 movl %ebp, 0x4(%rsp) movl %r15d, %r15d movl $0x1000, %ebp # imm = 0x1000 movq (%r14), %rax movzbl (%rax,%r15), %ecx movq %r12, %rdi movq %r13, %rsi movl %r15d, %edx xorl %eax, %eax callq 0x3060 movq %rbx, %rdi movq %r12, %rsi callq 0x3280 incq %r15 decq %rbp jne 0x42fa movl 0x4(%rsp), %eax movl %eax, %r15d jmp 0x42c6 jmp 0x4330 movq %rax, %r14 movq 0x8(%rsp), %r15 jmp 0x433d movq %rax, %r14 movq (%rbx), %rdi cmpq %r15, %rdi je 0x434a callq 0x3150 movq %r14, %rdi callq 0x3260
_ZN13MemoryManager10dumpMemoryB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 10018h mov r14, rsi mov rbx, rdi lea r15, [rdi+10h] mov [rdi], r15 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 lea rsi, aMemoryDump; "Memory Dump: \n" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+10048h+var_10040], r15 lea r12, [rsp+10048h+var_10038] lea r13, a0xX0xX; " 0x%x: 0x%x\n" xor r15d, r15d loc_42C6: lea ebp, [r15+1000h] mov rdi, r12 lea rsi, a0xX0xX_0; "0x%x-0x%x\n" mov edx, r15d mov ecx, ebp xor eax, eax call _sprintf mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+10048h+var_10044], ebp mov r15d, r15d mov ebp, 1000h loc_42FA: mov rax, [r14] movzx ecx, byte ptr [rax+r15] mov rdi, r12 mov rsi, r13 mov edx, r15d xor eax, eax call _sprintf mov rdi, rbx mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) inc r15 dec rbp jnz short loc_42FA mov eax, [rsp+10048h+var_10044] mov r15d, eax jmp short loc_42C6 jmp short $+2 loc_4330: mov r14, rax mov r15, [rsp+arg_0] jmp short loc_433D mov r14, rax loc_433D: mov rdi, [rbx]; void * cmp rdi, r15 jz short loc_434A call __ZdlPv; operator delete(void *) loc_434A: mov rdi, r14 call __Unwind_Resume
void __noreturn MemoryManager::dumpMemory[abi:cxx11]( long long a1, _QWORD *a2, long long a3, long long a4, long long a5, long long a6, long long a7) { long long v7; // r15 long long v8; // rbp int v9; // [rsp+4h] [rbp-10044h] _BYTE v10[65592]; // [rsp+10h] [rbp-10038h] BYREF *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::append(a1, "Memory Dump: \n"); for ( LODWORD(v7) = 0; ; LODWORD(v7) = v9 ) { sprintf(v10, "0x%x-0x%x\n", v7, v7 + 4096); std::string::append(a1, v10); v9 = v7 + 4096; v7 = (unsigned int)v7; v8 = 4096LL; do { sprintf(v10, " 0x%x: 0x%x\n", v7, *(unsigned __int8 *)(*a2 + v7)); std::string::append(a1, v10); ++v7; --v8; } while ( v8 ); } }
dumpMemory[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10018 MOV R14,RSI MOV RBX,RDI LEA R15,[RDI + 0x10] MOV qword ptr [RDI],R15 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_001042a6: LEA RSI,[0x10623a] CALL 0x00103280 MOV qword ptr [RSP + 0x8],R15 LEA R12,[RSP + 0x10] LEA R13,[0x106254] XOR R15D,R15D LAB_001042c6: LEA EBP,[R15 + 0x1000] MOV RDI,R12 LEA RSI,[0x106249] MOV EDX,R15D MOV ECX,EBP XOR EAX,EAX CALL 0x00103060 LAB_001042e3: MOV RDI,RBX MOV RSI,R12 CALL 0x00103280 MOV dword ptr [RSP + 0x4],EBP MOV R15D,R15D MOV EBP,0x1000 LAB_001042fa: MOV RAX,qword ptr [R14] MOVZX ECX,byte ptr [RAX + R15*0x1] MOV RDI,R12 MOV RSI,R13 MOV EDX,R15D XOR EAX,EAX CALL 0x00103060 LAB_00104312: MOV RDI,RBX MOV RSI,R12 CALL 0x00103280 LAB_0010431d: INC R15 DEC RBP JNZ 0x001042fa MOV EAX,dword ptr [RSP + 0x4] MOV R15D,EAX JMP 0x001042c6
/* MemoryManager::dumpMemory[abi:cxx11]() */ void MemoryManager::dumpMemory_abi_cxx11_(void) { uint uVar1; long lVar2; long *in_RSI; long *in_RDI; uint uVar3; ulong uVar4; char acStack_10038 [65544]; *in_RDI = (long)(in_RDI + 2); in_RDI[1] = 0; *(int1 *)(in_RDI + 2) = 0; /* try { // try from 001042a6 to 001042b1 has its CatchHandler @ 0010433a */ std::__cxx11::string::append((char *)in_RDI); uVar3 = 0; do { uVar1 = uVar3 + 0x1000; sprintf(acStack_10038,"0x%x-0x%x\n",(ulong)uVar3,(ulong)uVar1); /* try { // try from 001042e3 to 001042ed has its CatchHandler @ 0010432e */ std::__cxx11::string::append((char *)in_RDI); uVar4 = (ulong)uVar3; lVar2 = 0x1000; do { sprintf(acStack_10038," 0x%x: 0x%x\n",uVar4 & 0xffffffff,(ulong)*(byte *)(*in_RSI + uVar4)); /* try { // try from 00104312 to 0010431c has its CatchHandler @ 00104330 */ std::__cxx11::string::append((char *)in_RDI); uVar4 = uVar4 + 1; lVar2 = lVar2 + -1; uVar3 = uVar1; } while (lVar2 != 0); } while( true ); }
46,298
ma_crypt_data_post_read_hook
eloqsql/storage/maria/ma_crypt.c
static my_bool ma_crypt_data_post_read_hook(int res, PAGECACHE_IO_HOOK_ARGS *args) { MARIA_SHARE *share= (MARIA_SHARE*) args->data; const uint size= share->block_size; const uchar page_type= args->page[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK; const uint32 key_version_offset= (page_type <= TAIL_PAGE) ? KEY_VERSION_OFFSET : FULL_PAGE_KEY_VERSION_OFFSET; if (res == 0) { const uchar *src= args->page; uchar* dst= args->crypt_buf; uint pageno= (uint)args->pageno; LSN lsn= lsn_korr(src); const uint head= (page_type <= TAIL_PAGE) ? PAGE_HEADER_SIZE(share) : FULL_PAGE_HEADER_SIZE(share); const uint tail= CRC_SIZE; const uint32 key_version= uint4korr(src + key_version_offset); /* 1 - copy head */ memcpy(dst, src, head); /* 2 - decrypt page */ res= ma_decrypt(share, share->crypt_data, src + head, dst + head, size - (head + tail), pageno, lsn, key_version); /* 3 - copy tail */ memcpy(dst + size - tail, src + size - tail, tail); /* 4 clear key version to get correct crc */ int4store(dst + key_version_offset, 0); } if (args->crypt_buf != NULL) { uchar *tmp= args->page; args->page= args->crypt_buf; args->crypt_buf= NULL; my_free(tmp); } return maria_page_crc_check_data(res, args); }
O0
c
ma_crypt_data_post_read_hook: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movzbl 0x7(%rax), %eax andl $0x7, %eax movb %al, -0x1d(%rbp) movzbl -0x1d(%rbp), %edx movl $0x8, %eax movl $0xc, %ecx cmpl $0x2, %edx cmovlel %ecx, %eax movl %eax, -0x24(%rbp) cmpl $0x0, -0x4(%rbp) jne 0x5eb86 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax movq -0x30(%rbp), %rcx movzbl 0x1(%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movq -0x30(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movq -0x30(%rbp), %rcx movl 0x3(%rcx), %ecx orq %rcx, %rax movq %rax, -0x48(%rbp) movzbl -0x1d(%rbp), %eax cmpl $0x2, %eax jg 0x5eacf movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0xc, %eax movl %eax, -0x6c(%rbp) jmp 0x5eadf movq -0x18(%rbp), %rax movl 0xc18(%rax), %eax addl $0x8, %eax movl %eax, -0x6c(%rbp) movl -0x6c(%rbp), %eax movl %eax, -0x4c(%rbp) movl $0x4, -0x50(%rbp) movq -0x30(%rbp), %rax movl -0x24(%rbp), %ecx movl (%rax,%rcx), %eax movl %eax, -0x54(%rbp) movq -0x38(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x4c(%rbp), %eax movl %eax, %edx callq 0x2a090 movq -0x18(%rbp), %rdi movq -0x18(%rbp), %rax movq 0xc20(%rax), %rsi movq -0x30(%rbp), %rdx movl -0x4c(%rbp), %eax addq %rax, %rdx movq -0x38(%rbp), %rcx movl -0x4c(%rbp), %eax addq %rax, %rcx movl -0x1c(%rbp), %r8d movl -0x4c(%rbp), %eax addl $0x4, %eax subl %eax, %r8d movl -0x3c(%rbp), %r9d movq -0x48(%rbp), %r10 movl -0x54(%rbp), %eax movq %r10, (%rsp) movl %eax, 0x8(%rsp) callq 0x5f360 movl %eax, -0x4(%rbp) movq -0x38(%rbp), %rax movl -0x1c(%rbp), %ecx movq -0x30(%rbp), %rdx movl -0x1c(%rbp), %esi movl -0x4(%rdx,%rsi), %edx movl %edx, -0x4(%rax,%rcx) movq -0x38(%rbp), %rax movl -0x24(%rbp), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movl $0x0, (%rax) jmp 0x5eb86 movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) je 0x5ebc0 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x68(%rbp), %rdi callq 0xf3bb0 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq 0x5d6a0 addq $0x80, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_crypt_data_post_read_hook: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_18], rax mov rax, [rbp+var_18] mov eax, [rax+7BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] movzx eax, byte ptr [rax+7] and eax, 7 mov [rbp+var_1D], al movzx edx, [rbp+var_1D] mov eax, 8 mov ecx, 0Ch cmp edx, 2 cmovle eax, ecx mov [rbp+var_24], eax cmp [rbp+var_4], 0 jnz loc_5EB86 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_3C], eax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+1] shl ecx, 8 or eax, ecx mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx+2] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov rcx, [rbp+var_30] mov ecx, [rcx+3] or rax, rcx mov [rbp+var_48], rax movzx eax, [rbp+var_1D] cmp eax, 2 jg short loc_5EACF mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 0Ch mov [rbp+var_6C], eax jmp short loc_5EADF loc_5EACF: mov rax, [rbp+var_18] mov eax, [rax+0C18h] add eax, 8 mov [rbp+var_6C], eax loc_5EADF: mov eax, [rbp+var_6C] mov [rbp+var_4C], eax mov [rbp+var_50], 4 mov rax, [rbp+var_30] mov ecx, [rbp+var_24] mov eax, [rax+rcx] mov [rbp+var_54], eax mov rdi, [rbp+var_38] mov rsi, [rbp+var_30] mov eax, [rbp+var_4C] mov edx, eax call _memcpy mov rdi, [rbp+var_18] mov rax, [rbp+var_18] mov rsi, [rax+0C20h] mov rdx, [rbp+var_30] mov eax, [rbp+var_4C] add rdx, rax mov rcx, [rbp+var_38] mov eax, [rbp+var_4C] add rcx, rax mov r8d, [rbp+var_1C] mov eax, [rbp+var_4C] add eax, 4 sub r8d, eax mov r9d, [rbp+var_3C] mov r10, [rbp+var_48] mov eax, [rbp+var_54] mov [rsp+80h+var_80], r10 mov [rsp+80h+var_78], eax call ma_decrypt mov [rbp+var_4], eax mov rax, [rbp+var_38] mov ecx, [rbp+var_1C] mov rdx, [rbp+var_30] mov esi, [rbp+var_1C] mov edx, [rdx+rsi-4] mov [rax+rcx-4], edx mov rax, [rbp+var_38] mov ecx, [rbp+var_24] add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_60] mov dword ptr [rax], 0 jmp short $+2 loc_5EB86: mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jz short loc_5EBC0 mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_68], rax mov rax, [rbp+var_10] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax], rcx mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov rdi, [rbp+var_68] call my_free loc_5EBC0: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call maria_page_crc_check_data add rsp, 80h pop rbp retn
bool ma_crypt_data_post_read_hook(int a1, _QWORD *a2) { int v2; // eax unsigned int v3; // eax long long v5; // [rsp+18h] [rbp-68h] int v6; // [rsp+2Ch] [rbp-54h] unsigned int v7; // [rsp+34h] [rbp-4Ch] unsigned long long v8; // [rsp+38h] [rbp-48h] int v9; // [rsp+44h] [rbp-3Ch] long long v10; // [rsp+48h] [rbp-38h] unsigned __int16 *v11; // [rsp+50h] [rbp-30h] unsigned int v12; // [rsp+5Ch] [rbp-24h] unsigned __int8 v13; // [rsp+63h] [rbp-1Dh] unsigned int v14; // [rsp+64h] [rbp-1Ch] long long v15; // [rsp+68h] [rbp-18h] int v16; // [rsp+7Ch] [rbp-4h] v16 = a1; v15 = a2[2]; v14 = *(_DWORD *)(v15 + 1980); v13 = *(_BYTE *)(*a2 + 7LL) & 7; v2 = 8; if ( v13 <= 2u ) v2 = 12; v12 = v2; if ( !a1 ) { v11 = (unsigned __int16 *)*a2; v10 = a2[3]; v9 = a2[1]; v8 = *(unsigned int *)((char *)v11 + 3) | ((unsigned long long)((*((unsigned __int8 *)v11 + 2) << 16) | (unsigned int)*v11) << 32); if ( v13 > 2u ) v3 = *(_DWORD *)(v15 + 3096) + 8; else v3 = *(_DWORD *)(v15 + 3096) + 12; v7 = v3; v6 = *(_DWORD *)((char *)v11 + v12); memcpy(v10, v11, v3); v16 = ma_decrypt( v15, *(_QWORD *)(v15 + 3104), v7 + (unsigned int)v11, v7 + (unsigned int)v10, v14 - (v7 + 4), v9, v8, v6); *(_DWORD *)(v10 + v14 - 4) = *(_DWORD *)((char *)v11 + v14 - 4); *(_DWORD *)(v12 + v10) = 0; } if ( a2[3] ) { v5 = *a2; *a2 = a2[3]; a2[3] = 0LL; my_free(v5); } return maria_page_crc_check_data(v16, (long long)a2); }
ma_crypt_data_post_read_hook: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOVZX EAX,byte ptr [RAX + 0x7] AND EAX,0x7 MOV byte ptr [RBP + -0x1d],AL MOVZX EDX,byte ptr [RBP + -0x1d] MOV EAX,0x8 MOV ECX,0xc CMP EDX,0x2 CMOVLE EAX,ECX MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x4],0x0 JNZ 0x0015eb86 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x1] SHL ECX,0x8 OR EAX,ECX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV RCX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RCX + 0x3] OR RAX,RCX MOV qword ptr [RBP + -0x48],RAX MOVZX EAX,byte ptr [RBP + -0x1d] CMP EAX,0x2 JG 0x0015eacf MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0xc MOV dword ptr [RBP + -0x6c],EAX JMP 0x0015eadf LAB_0015eacf: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0xc18] ADD EAX,0x8 MOV dword ptr [RBP + -0x6c],EAX LAB_0015eadf: MOV EAX,dword ptr [RBP + -0x6c] MOV dword ptr [RBP + -0x4c],EAX MOV dword ptr [RBP + -0x50],0x4 MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RBP + -0x24] MOV EAX,dword ptr [RAX + RCX*0x1] MOV dword ptr [RBP + -0x54],EAX MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x4c] MOV EDX,EAX CALL 0x0012a090 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0xc20] MOV RDX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x4c] ADD RDX,RAX MOV RCX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x4c] ADD RCX,RAX MOV R8D,dword ptr [RBP + -0x1c] MOV EAX,dword ptr [RBP + -0x4c] ADD EAX,0x4 SUB R8D,EAX MOV R9D,dword ptr [RBP + -0x3c] MOV R10,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0x54] MOV qword ptr [RSP],R10 MOV dword ptr [RSP + 0x8],EAX CALL 0x0015f360 MOV dword ptr [RBP + -0x4],EAX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x1c] MOV RDX,qword ptr [RBP + -0x30] MOV ESI,dword ptr [RBP + -0x1c] MOV EDX,dword ptr [RDX + RSI*0x1 + -0x4] MOV dword ptr [RAX + RCX*0x1 + -0x4],EDX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RBP + -0x24] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],0x0 JMP 0x0015eb86 LAB_0015eb86: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x18],0x0 JZ 0x0015ebc0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV RDI,qword ptr [RBP + -0x68] CALL 0x001f3bb0 LAB_0015ebc0: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0015d6a0 ADD RSP,0x80 POP RBP RET
void ma_crypt_data_post_read_hook(int param_1,long *param_2) { uint uVar1; int4 uVar2; int4 uVar3; long lVar4; int3 *__src; void *__dest; ulong uVar5; int3 uVar6; byte bVar7; uint uVar8; uint local_74; int local_c; lVar4 = param_2[2]; uVar1 = *(uint *)(lVar4 + 0x7bc); bVar7 = *(byte *)(*param_2 + 7) & 7; uVar8 = 8; if (bVar7 < 3) { uVar8 = 0xc; } local_c = param_1; if (param_1 == 0) { __src = (int3 *)*param_2; __dest = (void *)param_2[3]; uVar5 = param_2[1]; uVar6 = *__src; uVar2 = *(int4 *)((long)__src + 3); if (bVar7 < 3) { local_74 = *(int *)(lVar4 + 0xc18) + 0xc; } else { local_74 = *(int *)(lVar4 + 0xc18) + 8; } uVar3 = *(int4 *)((long)__src + (ulong)uVar8); memcpy(__dest,__src,(ulong)local_74); local_c = ma_decrypt(lVar4,*(int8 *)(lVar4 + 0xc20),(long)__src + (ulong)local_74, (long)__dest + (ulong)local_74,uVar1 - (local_74 + 4),uVar5 & 0xffffffff, (ulong)CONCAT34(uVar6,uVar2),uVar3); *(int4 *)((long)__dest + ((ulong)uVar1 - 4)) = *(int4 *)((long)__src + ((ulong)uVar1 - 4)); *(int4 *)((long)__dest + (ulong)uVar8) = 0; } if (param_2[3] != 0) { lVar4 = *param_2; *param_2 = param_2[3]; param_2[3] = 0; my_free(lVar4); } maria_page_crc_check_data(local_c,param_2); return; }
46,299
ma_bitmap_unpin_all
eloqsql/storage/maria/ma_bitmap.c
static void _ma_bitmap_unpin_all(MARIA_SHARE *share) { MARIA_FILE_BITMAP *bitmap= &share->bitmap; MARIA_PINNED_PAGE *page_link= ((MARIA_PINNED_PAGE*) dynamic_array_ptr(&bitmap->pinned_pages, 0)); MARIA_PINNED_PAGE *pinned_page= page_link + bitmap->pinned_pages.elements; DBUG_ENTER("_ma_bitmap_unpin_all"); DBUG_PRINT("info", ("pinned: %u", bitmap->pinned_pages.elements)); while (pinned_page-- != page_link) pagecache_unlock_by_link(share->pagecache, pinned_page->link, pinned_page->unlock, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, FALSE, TRUE); bitmap->pinned_pages.elements= 0; DBUG_VOID_RETURN; }
O3
c
ma_bitmap_unpin_all: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movl 0xb58(%rdi), %eax testq %rax, %rax je 0x40217 movq 0xb50(%rbx), %r14 shlq $0x3, %rax leaq (%rax,%rax,2), %r15 movq 0x600(%rbx), %rdi movq -0x18(%r14,%r15), %rsi movl -0x10(%r14,%r15), %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq $0x1 pushq $0x0 callq 0x32355 addq $0x10, %rsp addq $-0x18, %r15 jne 0x401e8 movl $0x0, 0xb58(%rbx) addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_bitmap_unpin_all: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi mov eax, [rdi+0B58h] test rax, rax jz short loc_40217 mov r14, [rbx+0B50h] shl rax, 3 lea r15, [rax+rax*2] loc_401E8: mov rdi, [rbx+600h] mov rsi, [r14+r15-18h] mov edx, [r14+r15-10h] mov ecx, 3 xor r8d, r8d xor r9d, r9d push 1 push 0 call pagecache_unlock_by_link add rsp, 10h add r15, 0FFFFFFFFFFFFFFE8h jnz short loc_401E8 loc_40217: mov dword ptr [rbx+0B58h], 0 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long ma_bitmap_unpin_all(long long a1) { long long result; // rax long long v2; // r14 long long v3; // r15 result = *(unsigned int *)(a1 + 2904); if ( *(_DWORD *)(a1 + 2904) ) { v2 = *(_QWORD *)(a1 + 2896); v3 = 24 * result; do { result = pagecache_unlock_by_link( *(_QWORD *)(a1 + 1536), *(_QWORD *)(v2 + v3 - 24), *(_DWORD *)(v2 + v3 - 16), 3, 0LL, 0LL, 0); v3 -= 24LL; } while ( v3 ); } *(_DWORD *)(a1 + 2904) = 0; return result; }
_ma_bitmap_unpin_all: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV EAX,dword ptr [RDI + 0xb58] TEST RAX,RAX JZ 0x00140217 MOV R14,qword ptr [RBX + 0xb50] SHL RAX,0x3 LEA R15,[RAX + RAX*0x2] LAB_001401e8: MOV RDI,qword ptr [RBX + 0x600] MOV RSI,qword ptr [R14 + R15*0x1 + -0x18] MOV EDX,dword ptr [R14 + R15*0x1 + -0x10] MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D PUSH 0x1 PUSH 0x0 CALL 0x00132355 ADD RSP,0x10 ADD R15,-0x18 JNZ 0x001401e8 LAB_00140217: MOV dword ptr [RBX + 0xb58],0x0 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void _ma_bitmap_unpin_all(long param_1) { long lVar1; long lVar2; if ((ulong)*(uint *)(param_1 + 0xb58) != 0) { lVar1 = *(long *)(param_1 + 0xb50); lVar2 = (ulong)*(uint *)(param_1 + 0xb58) * 0x18; do { pagecache_unlock_by_link (*(int8 *)(param_1 + 0x600),*(int8 *)(lVar1 + -0x18 + lVar2), *(int4 *)(lVar1 + -0x10 + lVar2),3,0,0,0,1); lVar2 = lVar2 + -0x18; } while (lVar2 != 0); } *(int4 *)(param_1 + 0xb58) = 0; return; }