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
0
mi_cmp_dynamic_unique
eloqsql/storage/myisam/mi_dynrec.c
int _mi_cmp_dynamic_unique(MI_INFO *info, MI_UNIQUEDEF *def, const uchar *record, my_off_t pos) { uchar *rec_buff,*old_record; int error; DBUG_ENTER("_mi_cmp_dynamic_unique"); if (!(old_record=my_alloca(info->s->base.reclength))) DBUG_RETURN(1); /* Don't let the compare destroy blobs that may be in use */ rec_buff=info->rec_buff; if (info->s->base.blobs) info->rec_buff=0; error=_mi_read_dynamic_record(info,pos,old_record); if (!error) error=mi_unique_comp(def, record, old_record, def->null_are_equal); if (info->s->base.blobs) { my_free(mi_get_rec_buff_ptr(info, info->rec_buff)); info->rec_buff=rec_buff; } my_afree(old_record); DBUG_RETURN(error); }
O0
c
mi_cmp_dynamic_unique: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x140(%rax), %rsi xorl %edi, %edi xorl %eax, %eax movl %eax, %edx callq 0xf99f0 movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0xab559 jmp 0xab54d movl $0x1, -0x4(%rbp) jmp 0xab63e movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x188(%rax) je 0xab587 movq -0x10(%rbp), %rax movq $0x0, 0x120(%rax) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0xab110 movl %eax, -0x3c(%rbp) cmpl $0x0, -0x3c(%rbp) jne 0xab5bd movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x18(%rbp), %rax movsbl 0x3(%rax), %ecx callq 0xc47a0 movl %eax, -0x3c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax cmpl $0x0, 0x188(%rax) je 0xab62f movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x318(%rax), %rax andq $0x1, %rax cmpq $0x0, %rax je 0xab608 movq -0x10(%rbp), %rax cmpq $0x0, 0x120(%rax) je 0xab608 movq -0x10(%rbp), %rax movq 0x120(%rax), %rax addq $-0x18, %rax movq %rax, -0x48(%rbp) jmp 0xab617 movq -0x10(%rbp), %rax movq 0x120(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rdi callq 0xf9d70 movq -0x30(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x120(%rax) movq -0x38(%rbp), %rdi callq 0xf9d70 movl -0x3c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
_mi_cmp_dynamic_unique: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax] mov rsi, [rax+140h] xor edi, edi xor eax, eax mov edx, eax call my_malloc mov [rbp+var_38], rax cmp rax, 0 jnz short loc_AB559 jmp short $+2 loc_AB54D: mov [rbp+var_4], 1 jmp loc_AB63E loc_AB559: mov rax, [rbp+var_10] mov rax, [rax+120h] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax] cmp dword ptr [rax+188h], 0 jz short loc_AB587 mov rax, [rbp+var_10] mov qword ptr [rax+120h], 0 loc_AB587: mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_38] call _mi_read_dynamic_record mov [rbp+var_3C], eax cmp [rbp+var_3C], 0 jnz short loc_AB5BD mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_38] mov rax, [rbp+var_18] movsx ecx, byte ptr [rax+3] call mi_unique_comp mov [rbp+var_3C], eax loc_AB5BD: mov rax, [rbp+var_10] mov rax, [rax] cmp dword ptr [rax+188h], 0 jz short loc_AB62F mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+318h] and rax, 1 cmp rax, 0 jz short loc_AB608 mov rax, [rbp+var_10] cmp qword ptr [rax+120h], 0 jz short loc_AB608 mov rax, [rbp+var_10] mov rax, [rax+120h] add rax, 0FFFFFFFFFFFFFFE8h mov [rbp+var_48], rax jmp short loc_AB617 loc_AB608: mov rax, [rbp+var_10] mov rax, [rax+120h] mov [rbp+var_48], rax loc_AB617: mov rdi, [rbp+var_48] call my_free mov rcx, [rbp+var_30] mov rax, [rbp+var_10] mov [rax+120h], rcx loc_AB62F: mov rdi, [rbp+var_38] call my_free mov eax, [rbp+var_3C] mov [rbp+var_4], eax loc_AB63E: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long mi_cmp_dynamic_unique(char *a1, long long a2, long long a3, const char *a4) { unsigned int dynamic_record; // [rsp+14h] [rbp-3Ch] const char *v6; // [rsp+18h] [rbp-38h] long long v7; // [rsp+20h] [rbp-30h] v6 = (const char *)my_malloc(0LL, *(_QWORD *)(*(_QWORD *)a1 + 320LL), 0LL); if ( v6 ) { v7 = *((_QWORD *)a1 + 36); if ( *(_DWORD *)(*(_QWORD *)a1 + 392LL) ) *((_QWORD *)a1 + 36) = 0LL; dynamic_record = mi_read_dynamic_record(a1, a4, v6); if ( !dynamic_record ) dynamic_record = mi_unique_comp(a2, a3, v6, (unsigned int)*(char *)(a2 + 3)); if ( *(_DWORD *)(*(_QWORD *)a1 + 392LL) ) { if ( (*(_QWORD *)(*(_QWORD *)a1 + 792LL) & 1LL) != 0 && *((_QWORD *)a1 + 36) ) my_free(*((_QWORD *)a1 + 36) - 24LL); else my_free(*((_QWORD *)a1 + 36)); *((_QWORD *)a1 + 36) = v7; } my_free(v6); return dynamic_record; } else { return 1; } }
_mi_cmp_dynamic_unique: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x140] XOR EDI,EDI XOR EAX,EAX MOV EDX,EAX CALL 0x001f99f0 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x001ab559 JMP 0x001ab54d LAB_001ab54d: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001ab63e LAB_001ab559: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x188],0x0 JZ 0x001ab587 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x120],0x0 LAB_001ab587: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x38] CALL 0x001ab110 MOV dword ptr [RBP + -0x3c],EAX CMP dword ptr [RBP + -0x3c],0x0 JNZ 0x001ab5bd MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x18] MOVSX ECX,byte ptr [RAX + 0x3] CALL 0x001c47a0 MOV dword ptr [RBP + -0x3c],EAX LAB_001ab5bd: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x188],0x0 JZ 0x001ab62f MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x318] AND RAX,0x1 CMP RAX,0x0 JZ 0x001ab608 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x120],0x0 JZ 0x001ab608 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] ADD RAX,-0x18 MOV qword ptr [RBP + -0x48],RAX JMP 0x001ab617 LAB_001ab608: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x120] MOV qword ptr [RBP + -0x48],RAX LAB_001ab617: MOV RDI,qword ptr [RBP + -0x48] CALL 0x001f9d70 MOV RCX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x120],RCX LAB_001ab62f: MOV RDI,qword ptr [RBP + -0x38] CALL 0x001f9d70 MOV EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x4],EAX LAB_001ab63e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int _mi_cmp_dynamic_unique(long *param_1,long param_2,int8 param_3,int8 param_4) { long lVar1; long lVar2; long local_50; int local_44; int local_c; lVar2 = my_malloc(0,*(int8 *)(*param_1 + 0x140),0); if (lVar2 == 0) { local_c = 1; } else { lVar1 = param_1[0x24]; if (*(int *)(*param_1 + 0x188) != 0) { param_1[0x24] = 0; } local_44 = _mi_read_dynamic_record(param_1,param_4,lVar2); if (local_44 == 0) { local_44 = mi_unique_comp(param_2,param_3,lVar2,(int)*(char *)(param_2 + 3)); } if (*(int *)(*param_1 + 0x188) != 0) { if (((*(ulong *)(*param_1 + 0x318) & 1) == 0) || (param_1[0x24] == 0)) { local_50 = param_1[0x24]; } else { local_50 = param_1[0x24] + -0x18; } my_free(local_50); param_1[0x24] = lVar1; } my_free(lVar2); local_c = local_44; } return local_c; }
1
pcmp
eloqsql/strings/ctype-simple.c
static int pcmp(const void * f, const void * s) { const uni_idx *F= (const uni_idx*) f; const uni_idx *S= (const uni_idx*) s; int res; if (!(res=((S->nchars)-(F->nchars)))) res=((F->uidx.from)-(S->uidx.to)); return res; }
O3
c
pcmp: pushq %rbp movq %rsp, %rbp movl (%rsi), %eax subl (%rdi), %eax jne 0xbd5bd movzwl 0x8(%rdi), %eax movzwl 0xa(%rsi), %ecx subl %ecx, %eax popq %rbp retq nop
pcmp: push rbp mov rbp, rsp mov eax, [rsi] sub eax, [rdi] jnz short loc_BD5BD movzx eax, word ptr [rdi+8] movzx ecx, word ptr [rsi+0Ah] sub eax, ecx loc_BD5BD: pop rbp retn
long long pcmp(long long a1, long long a2) { long long result; // rax result = (unsigned int)(*(_DWORD *)a2 - *(_DWORD *)a1); if ( *(_DWORD *)a2 == *(_DWORD *)a1 ) return *(unsigned __int16 *)(a1 + 8) - (unsigned int)*(unsigned __int16 *)(a2 + 10); return result; }
pcmp: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RSI] SUB EAX,dword ptr [RDI] JNZ 0x001bd5bd MOVZX EAX,word ptr [RDI + 0x8] MOVZX ECX,word ptr [RSI + 0xa] SUB EAX,ECX LAB_001bd5bd: POP RBP RET
int pcmp(int *param_1,int *param_2) { int iVar1; iVar1 = *param_2 - *param_1; if (iVar1 == 0) { iVar1 = (uint)*(ushort *)(param_1 + 2) - (uint)*(ushort *)((long)param_2 + 10); } return iVar1; }
2
JS_NewTypedArray
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewTypedArray(JSContext *ctx, int argc, JSValue *argv, JSTypedArrayEnum type) { if (type < JS_TYPED_ARRAY_UINT8C || type > JS_TYPED_ARRAY_FLOAT64) return JS_ThrowRangeError(ctx, "invalid typed array type"); return js_typed_array_constructor(ctx, JS_UNDEFINED, argc, argv, JS_CLASS_UINT8C_ARRAY + type); }
O1
c
JS_NewTypedArray: pushq %rbx cmpl $0xc, %ecx jb 0x38407 leaq 0x65342(%rip), %rsi # 0x9d739 xorl %ebx, %ebx xorl %eax, %eax callq 0x1fec9 movl $0x6, %edx jmp 0x3841f movq %rdx, %r8 addl $0x15, %ecx movl $0x3, %edx xorl %esi, %esi movl %ecx, %r9d callq 0x38424 movq %rax, %rbx movq %rbx, %rax popq %rbx retq
JS_NewTypedArray: push rbx cmp ecx, 0Ch jb short loc_38407 lea rsi, aInvalidTypedAr; "invalid typed array type" xor ebx, ebx xor eax, eax call JS_ThrowRangeError mov edx, 6 jmp short loc_3841F loc_38407: mov r8, rdx add ecx, 15h mov edx, 3 xor esi, esi mov r9d, ecx call js_typed_array_constructor mov rbx, rax loc_3841F: mov rax, rbx pop rbx retn
long long JS_NewTypedArray( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14) { long long v14; // rbx char v16; // [rsp+0h] [rbp-8h] if ( (unsigned int)a12 < 0xC ) return js_typed_array_constructor(a1, 0LL, 3LL, (unsigned int)(a12 + 21), a11, (unsigned int)(a12 + 21)); v14 = 0LL; JS_ThrowRangeError(a1, (long long)"invalid typed array type", a11, a12, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v16); return v14; }
JS_NewTypedArray: PUSH RBX CMP ECX,0xc JC 0x00138407 LEA RSI,[0x19d739] XOR EBX,EBX XOR EAX,EAX CALL 0x0011fec9 MOV EDX,0x6 JMP 0x0013841f LAB_00138407: MOV R8,RDX ADD ECX,0x15 MOV EDX,0x3 XOR ESI,ESI MOV R9D,ECX CALL 0x00138424 MOV RBX,RAX LAB_0013841f: MOV RAX,RBX POP RBX RET
int8 JS_NewTypedArray(int8 param_1,int8 param_2,int8 param_3,uint param_4) { int8 uVar1; if (param_4 < 0xc) { uVar1 = js_typed_array_constructor(param_1,0,3,param_4 + 0x15,param_3,param_4 + 0x15); } else { uVar1 = 0; JS_ThrowRangeError(param_1,"invalid typed array type"); } return uVar1; }
3
JS_NewTypedArray
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewTypedArray(JSContext *ctx, int argc, JSValue *argv, JSTypedArrayEnum type) { if (type < JS_TYPED_ARRAY_UINT8C || type > JS_TYPED_ARRAY_FLOAT64) return JS_ThrowRangeError(ctx, "invalid typed array type"); return js_typed_array_constructor(ctx, JS_UNDEFINED, argc, argv, JS_CLASS_UINT8C_ARRAY + type); }
O2
c
JS_NewTypedArray: pushq %rbx cmpl $0xc, %ecx jb 0x315ce leaq 0x530d9(%rip), %rsi # 0x84699 xorl %ebx, %ebx xorl %eax, %eax callq 0x1a137 pushq $0x6 popq %rdx jmp 0x315e4 movq %rdx, %r8 addl $0x15, %ecx pushq $0x3 popq %rdx xorl %esi, %esi movl %ecx, %r9d callq 0x315e9 movq %rax, %rbx movq %rbx, %rax popq %rbx retq
JS_NewTypedArray: push rbx cmp ecx, 0Ch jb short loc_315CE lea rsi, aInvalidTypedAr_0; "invalid typed array type" xor ebx, ebx xor eax, eax call JS_ThrowRangeError push 6 pop rdx jmp short loc_315E4 loc_315CE: mov r8, rdx add ecx, 15h push 3 pop rdx xor esi, esi mov r9d, ecx call js_typed_array_constructor mov rbx, rax loc_315E4: mov rax, rbx pop rbx retn
long long JS_NewTypedArray( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14) { long long v14; // rbx char v16; // [rsp+0h] [rbp-8h] if ( (unsigned int)a12 < 0xC ) return js_typed_array_constructor(a1, 0LL, 3LL, (unsigned int)(a12 + 21), a11, (unsigned int)(a12 + 21)); v14 = 0LL; JS_ThrowRangeError(a1, (long long)"invalid typed array type", a11, a12, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v16); return v14; }
JS_NewTypedArray: PUSH RBX CMP ECX,0xc JC 0x001315ce LEA RSI,[0x184699] XOR EBX,EBX XOR EAX,EAX CALL 0x0011a137 PUSH 0x6 POP RDX JMP 0x001315e4 LAB_001315ce: MOV R8,RDX ADD ECX,0x15 PUSH 0x3 POP RDX XOR ESI,ESI MOV R9D,ECX CALL 0x001315e9 MOV RBX,RAX LAB_001315e4: MOV RAX,RBX POP RBX RET
int8 JS_NewTypedArray(int8 param_1,int8 param_2,int8 param_3,uint param_4) { int8 uVar1; if (param_4 < 0xc) { uVar1 = js_typed_array_constructor(param_1,0,3,param_4 + 0x15,param_3,param_4 + 0x15); } else { uVar1 = 0; JS_ThrowRangeError(param_1,"invalid typed array type"); } return uVar1; }
4
JS_NewTypedArray
bluesky950520[P]quickjs/quickjs.c
JSValue JS_NewTypedArray(JSContext *ctx, int argc, JSValue *argv, JSTypedArrayEnum type) { if (type < JS_TYPED_ARRAY_UINT8C || type > JS_TYPED_ARRAY_FLOAT64) return JS_ThrowRangeError(ctx, "invalid typed array type"); return js_typed_array_constructor(ctx, JS_UNDEFINED, argc, argv, JS_CLASS_UINT8C_ARRAY + type); }
O3
c
JS_NewTypedArray: pushq %rbx cmpl $0xc, %ecx jb 0x396bb leaq 0x6705e(%rip), %rsi # 0xa0709 xorl %ebx, %ebx xorl %eax, %eax callq 0x205f0 movl $0x6, %edx jmp 0x396d3 movq %rdx, %r8 addl $0x15, %ecx movl $0x3, %edx xorl %esi, %esi movl %ecx, %r9d callq 0x396d8 movq %rax, %rbx movq %rbx, %rax popq %rbx retq
JS_NewTypedArray: push rbx cmp ecx, 0Ch jb short loc_396BB lea rsi, aInvalidTypedAr; "invalid typed array type" xor ebx, ebx xor eax, eax call JS_ThrowRangeError mov edx, 6 jmp short loc_396D3 loc_396BB: mov r8, rdx add ecx, 15h mov edx, 3 xor esi, esi mov r9d, ecx call js_typed_array_constructor mov rbx, rax loc_396D3: mov rax, rbx pop rbx retn
long long JS_NewTypedArray( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, long long a10, long long a11, long long a12, long long a13, long long a14) { long long v14; // rbx char v16; // [rsp+0h] [rbp-8h] if ( (unsigned int)a12 < 0xC ) return js_typed_array_constructor(a1, 0LL, 3LL, (unsigned int)(a12 + 21), a11, (unsigned int)(a12 + 21)); v14 = 0LL; JS_ThrowRangeError(a1, (long long)"invalid typed array type", a11, a12, a13, a14, a2, a3, a4, a5, a6, a7, a8, a9, v16); return v14; }
JS_NewTypedArray: PUSH RBX CMP ECX,0xc JC 0x001396bb LEA RSI,[0x1a0709] XOR EBX,EBX XOR EAX,EAX CALL 0x001205f0 MOV EDX,0x6 JMP 0x001396d3 LAB_001396bb: MOV R8,RDX ADD ECX,0x15 MOV EDX,0x3 XOR ESI,ESI MOV R9D,ECX CALL 0x001396d8 MOV RBX,RAX LAB_001396d3: MOV RAX,RBX POP RBX RET
int8 JS_NewTypedArray(int8 param_1,int8 param_2,int8 param_3,uint param_4) { int8 uVar1; if (param_4 < 0xc) { uVar1 = js_typed_array_constructor(param_1,0,3,param_4 + 0x15,param_3,param_4 + 0x15); } else { uVar1 = 0; JS_ThrowRangeError(param_1,"invalid typed array type"); } return uVar1; }
5
my_parse_charset_xml
eloqsql/strings/ctype.c
my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader, const char *buf, size_t len) { MY_XML_PARSER p; struct my_cs_file_info info; my_bool rc; my_charset_file_init(&info); my_xml_parser_create(&p); my_xml_set_enter_handler(&p,cs_enter); my_xml_set_value_handler(&p,cs_value); my_xml_set_leave_handler(&p,cs_leave); info.loader= loader; my_xml_set_user_data(&p, (void *) &info); rc= (my_xml_parse(&p,buf,len) == MY_XML_OK) ? FALSE : TRUE; my_xml_parser_free(&p); my_charset_file_free(&info); if (rc != MY_XML_OK) { const char *errstr= my_xml_error_string(&p); if (sizeof(loader->error) > 32 + strlen(errstr)) { /* We cannot use my_snprintf() here. See previous comment. */ sprintf(loader->error, "at line %d pos %d: %s", my_xml_error_lineno(&p)+1, (int) my_xml_error_pos(&p), my_xml_error_string(&p)); } } return rc; }
O3
c
my_parse_charset_xml: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x928, %rsp # imm = 0x928 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x260(%rbp), %r15 movl $0xc8, %edx movq %r15, %rdi xorl %esi, %esi callq 0x261c0 xorps %xmm0, %xmm0 movups %xmm0, -0x58(%r15) movups %xmm0, -0x4f(%r15) leaq -0x190(%rbp), %r13 movq %r13, %rdi callq 0x7ac44 leaq 0x10e(%rip), %rsi # 0x73b61 movq %r13, %rdi callq 0x7acb9 leaq 0x1ec(%rip), %rsi # 0x73c4e movq %r13, %rdi callq 0x7acac leaq 0x9e5(%rip), %rsi # 0x74456 movq %r13, %rdi callq 0x7acc6 movq %rbx, -0x948(%rbp) movq %rbx, 0xc8(%r15) leaq -0x940(%rbp), %rbx movq %r13, %rdi movq %rbx, %rsi callq 0x7acd3 movq %r13, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x7a1a4 movl %eax, %r14d movq %r13, %rdi callq 0x7ac80 movq -0x58(%r15), %rdi movq 0x7a8(%rbx), %rax callq *0x98(%rax) testl %r14d, %r14d je 0x73b35 leaq -0x190(%rbp), %rdi callq 0x7ace0 movq %rax, %rdi callq 0x26150 addq $0x20, %rax cmpq $0x7f, %rax ja 0x73b35 leaq -0x190(%rbp), %rbx movq %rbx, %rdi callq 0x7ad1d leal 0x1(%rax), %r15d movq %rbx, %rdi callq 0x7acea movq %rax, %r12 movq %rbx, %rdi callq 0x7ace0 movq %rax, (%rsp) leaq 0xb5da(%rip), %rcx # 0x7f0f1 movl $0x80, %edx movq -0x948(%rbp), %rdi movl $0x1, %esi movl %r15d, %r8d movl %r12d, %r9d xorl %eax, %eax callq 0x26200 testl %r14d, %r14d setne %al movq %fs:0x28, %rcx cmpq -0x30(%rbp), %rcx jne 0x73b5c addq $0x928, %rsp # imm = 0x928 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x263a0
my_parse_charset_xml: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 928h mov r14, rdx mov r12, rsi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax lea r15, [rbp+var_260] mov edx, 0C8h mov rdi, r15 xor esi, esi call _memset xorps xmm0, xmm0 movups xmmword ptr [r15-58h], xmm0 movups xmmword ptr [r15-4Fh], xmm0 lea r13, [rbp+var_190] mov rdi, r13 call my_xml_parser_create lea rsi, cs_enter mov rdi, r13 call my_xml_set_enter_handler lea rsi, cs_value mov rdi, r13 call my_xml_set_value_handler lea rsi, cs_leave mov rdi, r13 call my_xml_set_leave_handler mov [rbp+var_948], rbx mov [r15+0C8h], rbx lea rbx, [rbp+var_940] mov rdi, r13 mov rsi, rbx call my_xml_set_user_data mov rdi, r13 mov rsi, r12 mov rdx, r14 call my_xml_parse mov r14d, eax mov rdi, r13 call my_xml_parser_free mov rdi, [r15-58h] mov rax, [rbx+7A8h] call qword ptr [rax+98h] test r14d, r14d jz short loc_73B35 lea rdi, [rbp+var_190] call my_xml_error_string mov rdi, rax call _strlen add rax, 20h ; ' ' cmp rax, 7Fh ja short loc_73B35 lea rbx, [rbp+var_190] mov rdi, rbx call my_xml_error_lineno lea r15d, [rax+1] mov rdi, rbx call my_xml_error_pos mov r12, rax mov rdi, rbx call my_xml_error_string mov [rsp+950h+var_950], rax lea rcx, aAtLineDPosDS; "at line %d pos %d: %s" mov edx, 80h mov rdi, [rbp+var_948] mov esi, 1 mov r8d, r15d mov r9d, r12d xor eax, eax call ___sprintf_chk loc_73B35: test r14d, r14d setnz al mov rcx, fs:28h cmp rcx, [rbp+var_30] jnz short loc_73B5C add rsp, 928h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_73B5C: call ___stack_chk_fail
bool my_parse_charset_xml(long long a1, long long a2, long long a3) { int v4; // r14d long long v5; // rax int v6; // r15d int v7; // r12d const char *v8; // rax _QWORD v10[220]; // [rsp+10h] [rbp-940h] BYREF _BYTE v11[200]; // [rsp+6F0h] [rbp-260h] BYREF long long v12; // [rsp+7B8h] [rbp-198h] _BYTE v13[352]; // [rsp+7C0h] [rbp-190h] BYREF unsigned long long v14; // [rsp+920h] [rbp-30h] v14 = __readfsqword(0x28u); memset(v11, 0LL, sizeof(v11)); memset(&v10[209], 0, 25); my_xml_parser_create(v13); my_xml_set_enter_handler(v13, cs_enter); my_xml_set_value_handler(v13, cs_value); my_xml_set_leave_handler(v13, cs_leave); v12 = a1; my_xml_set_user_data(v13, v10); v4 = my_xml_parse(v13, a2, a3); my_xml_parser_free(v13); (*(void ( **)(_QWORD))(v12 + 152))(v10[209]); if ( v4 ) { v5 = my_xml_error_string(v13); if ( (unsigned long long)(strlen(v5) + 32) <= 0x7F ) { v6 = my_xml_error_lineno(v13) + 1; v7 = my_xml_error_pos(v13); v8 = (const char *)my_xml_error_string(v13); __sprintf_chk(a1, 1LL, 128LL, "at line %d pos %d: %s", v6, v7, v8); } } return v4 != 0; }
my_parse_charset_xml: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x928 MOV R14,RDX MOV R12,RSI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R15,[RBP + -0x260] MOV EDX,0xc8 MOV RDI,R15 XOR ESI,ESI CALL 0x001261c0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + -0x58],XMM0 MOVUPS xmmword ptr [R15 + -0x4f],XMM0 LEA R13,[RBP + -0x190] MOV RDI,R13 CALL 0x0017ac44 LEA RSI,[0x173b61] MOV RDI,R13 CALL 0x0017acb9 LEA RSI,[0x173c4e] MOV RDI,R13 CALL 0x0017acac LEA RSI,[0x174456] MOV RDI,R13 CALL 0x0017acc6 MOV qword ptr [RBP + -0x948],RBX MOV qword ptr [R15 + 0xc8],RBX LEA RBX,[RBP + -0x940] MOV RDI,R13 MOV RSI,RBX CALL 0x0017acd3 MOV RDI,R13 MOV RSI,R12 MOV RDX,R14 CALL 0x0017a1a4 MOV R14D,EAX MOV RDI,R13 CALL 0x0017ac80 MOV RDI,qword ptr [R15 + -0x58] MOV RAX,qword ptr [RBX + 0x7a8] CALL qword ptr [RAX + 0x98] TEST R14D,R14D JZ 0x00173b35 LEA RDI,[RBP + -0x190] CALL 0x0017ace0 MOV RDI,RAX CALL 0x00126150 ADD RAX,0x20 CMP RAX,0x7f JA 0x00173b35 LEA RBX,[RBP + -0x190] MOV RDI,RBX CALL 0x0017ad1d LEA R15D,[RAX + 0x1] MOV RDI,RBX CALL 0x0017acea MOV R12,RAX MOV RDI,RBX CALL 0x0017ace0 MOV qword ptr [RSP],RAX LEA RCX,[0x17f0f1] MOV EDX,0x80 MOV RDI,qword ptr [RBP + -0x948] MOV ESI,0x1 MOV R8D,R15D MOV R9D,R12D XOR EAX,EAX CALL 0x00126200 LAB_00173b35: TEST R14D,R14D SETNZ AL MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x30] JNZ 0x00173b5c ADD RSP,0x928 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00173b5c: CALL 0x001263a0
bool my_parse_charset_xml(long param_1,int8 param_2,int8 param_3) { int iVar1; int iVar2; int4 uVar3; char *__s; size_t sVar4; int8 uVar5; long in_FS_OFFSET; int1 local_948 [1672]; int8 local_2c0; int1 uStack_2b8; int7 uStack_2b7; int1 uStack_2b0; int8 uStack_2af; int1 local_268 [200]; long local_1a0; int1 local_198 [352]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); memset(local_268,0,200); local_2c0 = 0; uStack_2b8 = 0; uStack_2b7 = 0; uStack_2b0 = 0; uStack_2af = 0; my_xml_parser_create(local_198); my_xml_set_enter_handler(local_198,cs_enter); my_xml_set_value_handler(local_198,cs_value); my_xml_set_leave_handler(local_198,cs_leave); local_1a0 = param_1; my_xml_set_user_data(local_198,local_948); iVar1 = my_xml_parse(local_198,param_2,param_3); my_xml_parser_free(local_198); (**(code **)(local_1a0 + 0x98))(local_2c0); if (iVar1 != 0) { __s = (char *)my_xml_error_string(local_198); sVar4 = strlen(__s); if (sVar4 + 0x20 < 0x80) { iVar2 = my_xml_error_lineno(local_198); uVar3 = my_xml_error_pos(local_198); uVar5 = my_xml_error_string(local_198); __sprintf_chk(param_1,1,0x80,"at line %d pos %d: %s",iVar2 + 1,uVar3,uVar5); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return iVar1 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
6
dump_header_page
eloqsql/storage/maria/ma_loghandler.c
static void dump_header_page(uchar *buff) { LOGHANDLER_FILE_INFO desc; char strbuff[21]; struct tm tmp_tm; time_t header_time; translog_interpret_file_header(&desc, buff); header_time= desc.timestamp/1000000ULL; localtime_r(&header_time, &tmp_tm); printf(" This can be header page:\n" " Timestamp: %04d.%02d.%02d %02d.%02d.%02d (%s)\n" " Aria log version: %lu\n" " Server version: %lu\n" " Server id %lu\n" " Page size %lu\n", tmp_tm.tm_year+1900, tmp_tm.tm_mon+1, tmp_tm.tm_mday, tmp_tm.tm_hour, tmp_tm.tm_min, tmp_tm.tm_sec, llstr(desc.timestamp, strbuff), desc.maria_version, desc.mysql_version, desc.server_id, desc.page_size); if (desc.page_size != TRANSLOG_PAGE_SIZE) printf(" WARNING: page size is not equal compiled in one %lu!!!\n", (ulong) TRANSLOG_PAGE_SIZE); printf(" File number %lu\n" " Max lsn: " LSN_FMT "\n", desc.file_number, LSN_IN_PARTS(desc.max_lsn)); }
O0
c
dump_header_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xf8, %rsp movq %fs:0x28, %rax movq %rax, -0x20(%rbp) movq %rdi, -0x48(%rbp) movq -0x48(%rbp), %rsi leaq -0x80(%rbp), %rdi callq 0x2f760 movq -0x78(%rbp), %rax movl $0xf4240, %ecx # imm = 0xF4240 xorl %edx, %edx divq %rcx movq %rax, -0xc0(%rbp) leaq -0xc0(%rbp), %rdi leaq -0xb8(%rbp), %rsi callq 0x2a130 movl -0xa4(%rbp), %eax addl $0x76c, %eax # imm = 0x76C movl %eax, -0xd4(%rbp) movl -0xa8(%rbp), %eax addl $0x1, %eax movl %eax, -0xd0(%rbp) movl -0xac(%rbp), %eax movl %eax, -0xcc(%rbp) movl -0xb0(%rbp), %eax movl %eax, -0xc8(%rbp) movl -0xb4(%rbp), %eax movl %eax, -0xc4(%rbp) movl -0xb8(%rbp), %r15d movq -0x78(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x1537b0 movl -0xd4(%rbp), %esi movl -0xd0(%rbp), %edx movl -0xcc(%rbp), %ecx movl -0xc8(%rbp), %r8d movl -0xc4(%rbp), %r9d movq %rax, %r14 movq -0x70(%rbp), %rbx movq -0x68(%rbp), %r11 movq -0x60(%rbp), %r10 movq -0x58(%rbp), %rax leaq 0x1230b1(%rip), %rdi # 0x15b319 movl %r15d, (%rsp) movq %r14, 0x8(%rsp) movq %rbx, 0x10(%rsp) movq %r11, 0x18(%rsp) movq %r10, 0x20(%rsp) movq %rax, 0x28(%rsp) movb $0x0, %al callq 0x2a060 cmpq $0x2000, -0x58(%rbp) # imm = 0x2000 je 0x382a9 leaq 0x123121(%rip), %rdi # 0x15b3be movl $0x2000, %esi # imm = 0x2000 movb $0x0, %al callq 0x2a060 movq -0x80(%rbp), %rax movq -0x50(%rbp), %rsi movq %rax, %rcx shrq $0x20, %rcx movl %ecx, %edx movl %eax, %ecx leaq 0x123139(%rip), %rdi # 0x15b3fc xorl %eax, %eax callq 0x2a060 movq %fs:0x28, %rax movq -0x20(%rbp), %rcx cmpq %rcx, %rax jne 0x382ea addq $0xf8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2a270 nop
dump_header_page: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0F8h mov rax, fs:28h mov [rbp+var_20], rax mov [rbp+var_48], rdi mov rsi, [rbp+var_48] lea rdi, [rbp+var_80] call translog_interpret_file_header mov rax, [rbp+var_78] mov ecx, 0F4240h xor edx, edx div rcx mov [rbp+var_C0], rax lea rdi, [rbp+var_C0] lea rsi, [rbp+var_B8] call _localtime_r mov eax, [rbp+var_A4] add eax, 76Ch mov [rbp+var_D4], eax mov eax, [rbp+var_A8] add eax, 1 mov [rbp+var_D0], eax mov eax, [rbp+var_AC] mov [rbp+var_CC], eax mov eax, [rbp+var_B0] mov [rbp+var_C8], eax mov eax, [rbp+var_B4] mov [rbp+var_C4], eax mov r15d, [rbp+var_B8] mov rdi, [rbp+var_78] lea rsi, [rbp+var_40] call llstr mov esi, [rbp+var_D4] mov edx, [rbp+var_D0] mov ecx, [rbp+var_CC] mov r8d, [rbp+var_C8] mov r9d, [rbp+var_C4] mov r14, rax mov rbx, [rbp+var_70] mov r11, [rbp+var_68] mov r10, [rbp+var_60] mov rax, [rbp+var_58] lea rdi, aThisCanBeHeade; " This can be header page:\n Timesta"... mov [rsp+110h+var_110], r15d mov [rsp+110h+var_108], r14 mov [rsp+110h+var_100], rbx mov [rsp+110h+var_F8], r11 mov [rsp+110h+var_F0], r10 mov [rsp+110h+var_E8], rax mov al, 0 call _printf cmp [rbp+var_58], 2000h jz short loc_382A9 lea rdi, aWarningPageSiz; " WARNING: page size is not equal c"... mov esi, 2000h mov al, 0 call _printf loc_382A9: mov rax, [rbp+var_80] mov rsi, [rbp+var_50] mov rcx, rax shr rcx, 20h mov edx, ecx mov ecx, eax lea rdi, aFileNumberLuMa; " File number %lu\n Max lsn: (%u,0"... xor eax, eax call _printf mov rax, fs:28h mov rcx, [rbp+var_20] cmp rax, rcx jnz short loc_382EA add rsp, 0F8h pop rbx pop r14 pop r15 pop rbp retn loc_382EA: call ___stack_chk_fail
unsigned long long dump_header_page(long long a1) { int v1; // r15d const char *v2; // rax int v4; // [rsp+3Ch] [rbp-D4h] int v5; // [rsp+40h] [rbp-D0h] int v6; // [rsp+44h] [rbp-CCh] int v7; // [rsp+48h] [rbp-C8h] int v8; // [rsp+4Ch] [rbp-C4h] unsigned long long v9; // [rsp+50h] [rbp-C0h] BYREF _DWORD v10[14]; // [rsp+58h] [rbp-B8h] BYREF unsigned long long v11; // [rsp+90h] [rbp-80h] BYREF unsigned long long v12; // [rsp+98h] [rbp-78h] long long v13; // [rsp+A0h] [rbp-70h] long long v14; // [rsp+A8h] [rbp-68h] long long v15; // [rsp+B0h] [rbp-60h] long long v16; // [rsp+B8h] [rbp-58h] long long v17; // [rsp+C0h] [rbp-50h] long long v18; // [rsp+C8h] [rbp-48h] _BYTE v19[32]; // [rsp+D0h] [rbp-40h] BYREF unsigned long long v20; // [rsp+F0h] [rbp-20h] v20 = __readfsqword(0x28u); v18 = a1; translog_interpret_file_header(&v11, a1); v9 = v12 / 0xF4240; localtime_r(&v9, v10, v12 % 0xF4240); v4 = v10[5] + 1900; v5 = v10[4] + 1; v6 = v10[3]; v7 = v10[2]; v8 = v10[1]; v1 = v10[0]; v2 = (const char *)llstr(v12, v19); printf( " This can be header page:\n" " Timestamp: %04d.%02d.%02d %02d.%02d.%02d (%s)\n" " Aria log version: %lu\n" " Server version: %lu\n" " Server id %lu\n" " Page size %lu\n", v4, v5, v6, v7, v8, v1, v2, v13, v14, v15, v16); if ( v16 != 0x2000 ) printf(" WARNING: page size is not equal compiled in one %lu!!!\n", 0x2000LL); printf(" File number %lu\n Max lsn: (%u,0x%x)\n", v17, HIDWORD(v11), v11); return __readfsqword(0x28u); }
dump_header_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xf8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x48],RDI MOV RSI,qword ptr [RBP + -0x48] LEA RDI,[RBP + -0x80] CALL 0x0012f760 MOV RAX,qword ptr [RBP + -0x78] MOV ECX,0xf4240 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xc0],RAX LEA RDI,[RBP + -0xc0] LEA RSI,[RBP + -0xb8] CALL 0x0012a130 MOV EAX,dword ptr [RBP + -0xa4] ADD EAX,0x76c MOV dword ptr [RBP + -0xd4],EAX MOV EAX,dword ptr [RBP + -0xa8] ADD EAX,0x1 MOV dword ptr [RBP + -0xd0],EAX MOV EAX,dword ptr [RBP + -0xac] MOV dword ptr [RBP + -0xcc],EAX MOV EAX,dword ptr [RBP + -0xb0] MOV dword ptr [RBP + -0xc8],EAX MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xc4],EAX MOV R15D,dword ptr [RBP + -0xb8] MOV RDI,qword ptr [RBP + -0x78] LEA RSI,[RBP + -0x40] CALL 0x002537b0 MOV ESI,dword ptr [RBP + -0xd4] MOV EDX,dword ptr [RBP + -0xd0] MOV ECX,dword ptr [RBP + -0xcc] MOV R8D,dword ptr [RBP + -0xc8] MOV R9D,dword ptr [RBP + -0xc4] MOV R14,RAX MOV RBX,qword ptr [RBP + -0x70] MOV R11,qword ptr [RBP + -0x68] MOV R10,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x58] LEA RDI,[0x25b319] MOV dword ptr [RSP],R15D MOV qword ptr [RSP + 0x8],R14 MOV qword ptr [RSP + 0x10],RBX MOV qword ptr [RSP + 0x18],R11 MOV qword ptr [RSP + 0x20],R10 MOV qword ptr [RSP + 0x28],RAX MOV AL,0x0 CALL 0x0012a060 CMP qword ptr [RBP + -0x58],0x2000 JZ 0x001382a9 LEA RDI,[0x25b3be] MOV ESI,0x2000 MOV AL,0x0 CALL 0x0012a060 LAB_001382a9: MOV RAX,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x50] MOV RCX,RAX SHR RCX,0x20 MOV EDX,ECX MOV ECX,EAX LEA RDI,[0x25b3fc] XOR EAX,EAX CALL 0x0012a060 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x20] CMP RAX,RCX JNZ 0x001382ea ADD RSP,0xf8 POP RBX POP R14 POP R15 POP RBP RET LAB_001382ea: CALL 0x0012a270
void dump_header_page(int8 param_1) { int8 uVar1; long in_FS_OFFSET; ulong local_c8; tm local_c0; ulong local_88; ulong local_80; int8 local_78; int8 local_70; int8 local_68; long local_60; int8 local_58; int8 local_50; int1 local_48 [32]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); local_50 = param_1; translog_interpret_file_header(&local_88,param_1); local_c8 = local_80 / 1000000; localtime_r((time_t *)&local_c8,&local_c0); uVar1 = llstr(local_80,local_48); printf(" This can be header page:\n Timestamp: %04d.%02d.%02d %02d.%02d.%02d (%s)\n Aria log version: %lu\n Server version: %lu\n Server id %lu\n Page size %lu\n" ,(ulong)(local_c0.tm_year + 0x76c),(ulong)(local_c0.tm_mon + 1), (ulong)(uint)local_c0.tm_mday,(ulong)(uint)local_c0.tm_hour,(ulong)(uint)local_c0.tm_min, local_c0.tm_sec,uVar1,local_78,local_70,local_68,local_60); if (local_60 != 0x2000) { printf(" WARNING: page size is not equal compiled in one %lu!!!\n",0x2000); } printf(" File number %lu\n Max lsn: (%u,0x%x)\n",local_58,local_88 >> 0x20, local_88 & 0xffffffff); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
7
LefDefParser::lefwStartArrayFloorplan(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwStartArrayFloorplan(const char *name) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_ARRAY_START && lefwState != LEFW_ARRAY) return LEFW_BAD_ORDER; if (lefwIsArrayFloorp) return LEFW_BAD_ORDER; if (!name || name == 0 || *name == 0) return LEFW_BAD_DATA; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " FLOORPLAN %s\n", name); else fprintf(lefwFile, " FLOORPLAN %s\n", name); lefwLines++; lefwHasArrayReq = 1; lefwIsArrayFloorp = 1; return LEFW_OK; }
O0
cpp
LefDefParser::lefwStartArrayFloorplan(char const*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) leaq 0x9c310(%rip), %rax # 0xc5250 cmpq $0x0, (%rax) jne 0x28f53 movl $0x1, 0x14(%rsp) jmp 0x29034 leaq 0x9c546(%rip), %rax # 0xc54a0 cmpl $0x2, (%rax) je 0x28f78 leaq 0x9c53a(%rip), %rax # 0xc54a0 cmpl $0x13, (%rax) je 0x28f78 movl $0x2, 0x14(%rsp) jmp 0x29034 leaq 0x9c549(%rip), %rax # 0xc54c8 cmpl $0x0, (%rax) je 0x28f91 movl $0x2, 0x14(%rsp) jmp 0x29034 cmpq $0x0, 0x8(%rsp) je 0x28fae cmpq $0x0, 0x8(%rsp) je 0x28fae movq 0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x28fb8 movl $0x3, 0x14(%rsp) jmp 0x29034 cmpl $0x0, 0x9c57d(%rip) # 0xc553c je 0x28fe0 leaq 0x9c288(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x6ad22(%rip), %rsi # 0x93cf9 movb $0x0, %al callq 0x8bf50 jmp 0x28ffd leaq 0x9c269(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x6ad03(%rip), %rsi # 0x93cf9 movb $0x0, %al callq 0x2370 leaq 0x9c498(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x1, %ecx leaq 0x9c48c(%rip), %rax # 0xc549c movl %ecx, (%rax) leaq 0x9c4ab(%rip), %rax # 0xc54c4 movl $0x1, (%rax) leaq 0x9c4a2(%rip), %rax # 0xc54c8 movl $0x1, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopl (%rax)
_ZN12LefDefParser23lefwStartArrayFloorplanEPKc: sub rsp, 18h mov [rsp+18h+var_10], rdi lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_28F53 mov [rsp+18h+var_4], 1 jmp loc_29034 loc_28F53: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 2 jz short loc_28F78 lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 13h jz short loc_28F78 mov [rsp+18h+var_4], 2 jmp loc_29034 loc_28F78: lea rax, _ZN12LefDefParser17lefwIsArrayFloorpE; LefDefParser::lefwIsArrayFloorp cmp dword ptr [rax], 0 jz short loc_28F91 mov [rsp+18h+var_4], 2 jmp loc_29034 loc_28F91: cmp [rsp+18h+var_10], 0 jz short loc_28FAE cmp [rsp+18h+var_10], 0 jz short loc_28FAE mov rax, [rsp+18h+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_28FB8 loc_28FAE: mov [rsp+18h+var_4], 3 jmp short loc_29034 loc_28FB8: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_28FE0 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aFloorplanS; " FLOORPLAN %s\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_28FFD loc_28FE0: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aFloorplanS; " FLOORPLAN %s\n" mov al, 0 call _fprintf loc_28FFD: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx lea rax, _ZN12LefDefParser15lefwHasArrayReqE; LefDefParser::lefwHasArrayReq mov dword ptr [rax], 1 lea rax, _ZN12LefDefParser17lefwIsArrayFloorpE; LefDefParser::lefwIsArrayFloorp mov dword ptr [rax], 1 mov [rsp+18h+var_4], 0 loc_29034: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwStartArrayFloorplan( LefDefParser *this, const char *a2, long long a3, int a4, int a5, int a6) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 2 || LefDefParser::lefwState == 19 ) { if ( LefDefParser::lefwIsArrayFloorp ) { return 2; } else if ( this && *(_BYTE *)this ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" FLOORPLAN %s\n", (_DWORD)this, a4, a5, a6); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " FLOORPLAN %s\n", (const char *)this); ++LefDefParser::lefwLines; LefDefParser::lefwHasArrayReq = 1; LefDefParser::lefwIsArrayFloorp = 1; return 0; } else { return 3; } } else { return 2; } } else { return 1; } }
lefwStartArrayFloorplan: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI LEA RAX,[0x1c5250] CMP qword ptr [RAX],0x0 JNZ 0x00128f53 MOV dword ptr [RSP + 0x14],0x1 JMP 0x00129034 LAB_00128f53: LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x2 JZ 0x00128f78 LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x13 JZ 0x00128f78 MOV dword ptr [RSP + 0x14],0x2 JMP 0x00129034 LAB_00128f78: LEA RAX,[0x1c54c8] CMP dword ptr [RAX],0x0 JZ 0x00128f91 MOV dword ptr [RSP + 0x14],0x2 JMP 0x00129034 LAB_00128f91: CMP qword ptr [RSP + 0x8],0x0 JZ 0x00128fae CMP qword ptr [RSP + 0x8],0x0 JZ 0x00128fae MOV RAX,qword ptr [RSP + 0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x00128fb8 LAB_00128fae: MOV dword ptr [RSP + 0x14],0x3 JMP 0x00129034 LAB_00128fb8: CMP dword ptr [0x001c553c],0x0 JZ 0x00128fe0 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x193cf9] MOV AL,0x0 CALL 0x0018bf50 JMP 0x00128ffd LAB_00128fe0: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x193cf9] MOV AL,0x0 CALL 0x00102370 LAB_00128ffd: LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX LEA RAX,[0x1c54c4] MOV dword ptr [RAX],0x1 LEA RAX,[0x1c54c8] MOV dword ptr [RAX],0x1 MOV dword ptr [RSP + 0x14],0x0 LAB_00129034: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwStartArrayFloorplan(char const*) */ int4 LefDefParser::lefwStartArrayFloorplan(char *param_1) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if ((lefwState == 2) || (lefwState == 0x13)) { if (lefwIsArrayFloorp == 0) { if (((param_1 == (char *)0x0) || (param_1 == (char *)0x0)) || (*param_1 == '\0')) { local_4 = 3; } else { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," FLOORPLAN %s\n",param_1); } else { encPrint(lefwFile," FLOORPLAN %s\n",param_1); } lefwLines = lefwLines + 1; lefwHasArrayReq = 1; lefwIsArrayFloorp = 1; local_4 = 0; } } else { local_4 = 2; } } else { local_4 = 2; } return local_4; }
8
my_mb_wc_latin1
eloqsql/strings/ctype-latin1.c
static int my_mb_wc_latin1(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *wc, const uchar *str, const uchar *end __attribute__((unused))) { if (str >= end) return MY_CS_TOOSMALL; /* There are no unassigned characters in latin1. Every code point in latin1 is mapped to some Unicode code point. We can always return 1, no needs to check the value of cs_to_uni[*str]. */ *wc= cs_to_uni[*str]; DBUG_ASSERT(wc[0] || !str[0]); return 1; }
O0
c
my_mb_wc_latin1: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x53ec7 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x53eed movq -0x20(%rbp), %rax movzbl (%rax), %eax movl %eax, %ecx leaq 0x103399(%rip), %rax # 0x157270 movzwl (%rax,%rcx,2), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) jmp 0x53ee6 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
my_mb_wc_latin1: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_53EC7 mov [rbp+var_4], 0FFFFFF9Bh jmp short loc_53EED loc_53EC7: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] mov ecx, eax lea rax, cs_to_uni movzx eax, word ptr [rax+rcx*2] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx jmp short $+2 loc_53EE6: mov [rbp+var_4], 1 loc_53EED: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_latin1(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { if ( (unsigned long long)a3 < a4 ) { *a2 = cs_to_uni[*a3]; return 1; } else { return (unsigned int)-101; } }
my_mb_wc_latin1: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x00153ec7 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00153eed LAB_00153ec7: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] MOV ECX,EAX LEA RAX,[0x257270] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX JMP 0x00153ee6 LAB_00153ee6: MOV dword ptr [RBP + -0x4],0x1 LAB_00153eed: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_latin1(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { int4 local_c; if (param_3 < param_4) { *param_2 = (ulong)*(ushort *)(cs_to_uni + (ulong)*param_3 * 2); local_c = 1; } else { local_c = 0xffffff9b; } return local_c; }
9
hexlo
eloqsql/strings/ctype-utf8.c
static int hexlo(int x) { static const char hex_lo_digit[256]= { -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* !"#$%&'()*+,-./ */ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,-1,-1,-1,-1,-1,-1, /* 0123456789:;<=>? */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* @ABCDEFGHIJKLMNO */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* PQRSTUVWXYZ[\]^_ */ -1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* `abcdefghijklmno */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* pqrstuvwxyz{|}~. */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, /* ................ */ }; return hex_lo_digit[(unsigned int) x]; }
O0
c
hexlo: pushq %rbp movq %rsp, %rbp movl %edi, -0x4(%rbp) movl -0x4(%rbp), %eax movl %eax, %ecx leaq 0x14c0dd(%rip), %rax # 0x1bb380 movsbl (%rax,%rcx), %eax popq %rbp retq nopl (%rax)
hexlo: push rbp mov rbp, rsp mov [rbp+var_4], edi mov eax, [rbp+var_4] mov ecx, eax lea rax, hexlo_hex_lo_digit movsx eax, byte ptr [rax+rcx] pop rbp retn
long long hexlo(int a1) { return (unsigned int)hexlo_hex_lo_digit[a1]; }
hexlo: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] MOV ECX,EAX LEA RAX,[0x2bb380] MOVSX EAX,byte ptr [RAX + RCX*0x1] POP RBP RET
int hexlo(uint param_1) { return (int)(char)hexlo_hex_lo_digit[param_1]; }
10
ma_close
eloqsql/libmariadb/libmariadb/ma_io.c
int ma_close(MA_FILE *file) { int rc; if (!file) return -1; switch (file->type) { case MA_FILE_LOCAL: rc= fclose((FILE *)file->ptr); free(file); break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: rc= rio_plugin->methods->mclose(file); break; #endif default: return -1; } return rc; }
O0
c
ma_close: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x3799c movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x379fd movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x18(%rbp) subl $0x1, %eax je 0x379b6 jmp 0x379ac movl -0x18(%rbp), %eax subl $0x2, %eax je 0x379d1 jmp 0x379ee movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi callq 0x13420 movl %eax, -0x14(%rbp) movq -0x10(%rbp), %rdi callq 0x13520 jmp 0x379f7 leaq 0x2b4b8(%rip), %rax # 0x62e90 movq (%rax), %rax movq 0x58(%rax), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movl %eax, -0x14(%rbp) jmp 0x379f7 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x379fd movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_close: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jnz short loc_3799C mov [rbp+var_4], 0FFFFFFFFh jmp short loc_379FD loc_3799C: mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_18], eax sub eax, 1 jz short loc_379B6 jmp short $+2 loc_379AC: mov eax, [rbp+var_18] sub eax, 2 jz short loc_379D1 jmp short loc_379EE loc_379B6: mov rax, [rbp+var_10] mov rdi, [rax+8] call _fclose mov [rbp+var_14], eax mov rdi, [rbp+var_10] call _free jmp short loc_379F7 loc_379D1: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax+8] mov rdi, [rbp+var_10] call rax mov [rbp+var_14], eax jmp short loc_379F7 loc_379EE: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_379FD loc_379F7: mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_379FD: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ma_close(long long a1) { unsigned int v2; // [rsp+Ch] [rbp-14h] if ( a1 ) { if ( *(_DWORD *)a1 == 1 ) { v2 = fclose(*(_QWORD *)(a1 + 8)); free(a1); } else { if ( *(_DWORD *)a1 != 2 ) return (unsigned int)-1; return (unsigned int)(*(long long ( **)(long long))(*(_QWORD *)(rio_plugin + 88LL) + 8LL))(a1); } return v2; } return (unsigned int)-1; }
ma_close: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x0013799c MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001379fd LAB_0013799c: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x18],EAX SUB EAX,0x1 JZ 0x001379b6 JMP 0x001379ac LAB_001379ac: MOV EAX,dword ptr [RBP + -0x18] SUB EAX,0x2 JZ 0x001379d1 JMP 0x001379ee LAB_001379b6: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] CALL 0x00113420 MOV dword ptr [RBP + -0x14],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00113520 JMP 0x001379f7 LAB_001379d1: LEA RAX,[0x162e90] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x10] CALL RAX MOV dword ptr [RBP + -0x14],EAX JMP 0x001379f7 LAB_001379ee: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001379fd LAB_001379f7: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_001379fd: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int ma_close(int *param_1) { int local_1c; int local_c; if (param_1 == (int *)0x0) { local_c = -1; } else { if (*param_1 == 1) { local_1c = fclose(*(FILE **)(param_1 + 2)); free(param_1); } else { if (*param_1 != 2) { return -1; } local_1c = (**(code **)(*(long *)(rio_plugin + 0x58) + 8))(param_1); } local_c = local_1c; } return local_c; }
11
ma_mark_file_changed
eloqsql/storage/maria/ma_locking.c
int _ma_mark_file_changed(register MARIA_SHARE *share) { if (!share->base.born_transactional) { if (!_MA_ALREADY_MARKED_FILE_CHANGED) return _ma_mark_file_changed_now(share); } else { /* For transactional tables, the table is marked changed when the first page is written. Here we just mark the state to be updated so that caller can do 'analyze table' and find that is has changed before any pages are written. */ if (! test_all_bits(share->state.changed, (STATE_CHANGED | STATE_NOT_ANALYZED | STATE_NOT_OPTIMIZED_KEYS))) { mysql_mutex_lock(&share->intern_lock); share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED | STATE_NOT_OPTIMIZED_KEYS); mysql_mutex_unlock(&share->intern_lock); } } return 0; }
O3
c
ma_mark_file_changed: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx cmpb $0x0, 0x44c(%rdi) movl 0x170(%rdi), %eax je 0x4424b notl %eax testb $0x19, %al je 0x44258 leaq 0x8f0(%rbx), %r14 cmpq $0x0, 0x930(%rbx) jne 0x4426b movq %r14, %rdi callq 0x2b230 orb $0x19, 0x170(%rbx) movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x44281 movq %r14, %rdi callq 0x2b1f0 jmp 0x44258 testb $0x1, %al je 0x4425f cmpb $0x0, 0x7df(%rbx) je 0x4425f xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x44293 leaq 0xbe0c9(%rip), %rsi # 0x10233b movq %r14, %rdi movl $0x19c, %edx # imm = 0x19C callq 0x324c0 jmp 0x4422e leaq 0x374980(%rip), %rax # 0x3b8c08 movq (%rax), %rax callq *0x160(%rax) jmp 0x44241
_ma_mark_file_changed: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi cmp byte ptr [rdi+44Ch], 0 mov eax, [rdi+170h] jz short loc_4424B not eax test al, 19h jz short loc_44258 lea r14, [rbx+8F0h] cmp qword ptr [rbx+930h], 0 jnz short loc_4426B mov rdi, r14 call _pthread_mutex_lock loc_4422E: or byte ptr [rbx+170h], 19h mov rdi, [rbx+930h] test rdi, rdi jnz short loc_44281 loc_44241: mov rdi, r14 call _pthread_mutex_unlock jmp short loc_44258 loc_4424B: test al, 1 jz short loc_4425F cmp byte ptr [rbx+7DFh], 0 jz short loc_4425F loc_44258: xor eax, eax pop rbx pop r14 pop rbp retn loc_4425F: mov rdi, rbx pop rbx pop r14 pop rbp jmp _ma_mark_file_changed_now loc_4426B: lea rsi, aWorkspaceLlm4b_36; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r14 mov edx, 19Ch call psi_mutex_lock jmp short loc_4422E loc_44281: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_44241
long long ma_mark_file_changed(long long a1) { int v1; // eax v1 = *(_DWORD *)(a1 + 368); if ( *(_BYTE *)(a1 + 1100) ) { if ( (~(_BYTE)v1 & 0x19) != 0 ) { if ( *(_QWORD *)(a1 + 2352) ) psi_mutex_lock( a1 + 2288, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x19Cu); else pthread_mutex_lock(a1 + 2288); *(_BYTE *)(a1 + 368) |= 0x19u; if ( *(_QWORD *)(a1 + 2352) ) PSI_server[44](); pthread_mutex_unlock(a1 + 2288); } return 0LL; } if ( (v1 & 1) != 0 && *(_BYTE *)(a1 + 2015) ) return 0LL; return ma_mark_file_changed_now(a1); }
_ma_mark_file_changed: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CMP byte ptr [RDI + 0x44c],0x0 MOV EAX,dword ptr [RDI + 0x170] JZ 0x0014424b NOT EAX TEST AL,0x19 JZ 0x00144258 LEA R14,[RBX + 0x8f0] CMP qword ptr [RBX + 0x930],0x0 JNZ 0x0014426b MOV RDI,R14 CALL 0x0012b230 LAB_0014422e: OR byte ptr [RBX + 0x170],0x19 MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x00144281 LAB_00144241: MOV RDI,R14 CALL 0x0012b1f0 JMP 0x00144258 LAB_0014424b: TEST AL,0x1 JZ 0x0014425f CMP byte ptr [RBX + 0x7df],0x0 JZ 0x0014425f LAB_00144258: XOR EAX,EAX POP RBX POP R14 POP RBP RET LAB_0014425f: MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x00144293 LAB_0014426b: LEA RSI,[0x20233b] MOV RDI,R14 MOV EDX,0x19c CALL 0x001324c0 JMP 0x0014422e LAB_00144281: LEA RAX,[0x4b8c08] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00144241
int8 _ma_mark_file_changed(long param_1) { pthread_mutex_t *__mutex; int8 uVar1; if (*(char *)(param_1 + 0x44c) == '\0') { if (((*(uint *)(param_1 + 0x170) & 1) == 0) || (*(char *)(param_1 + 0x7df) == '\0')) { uVar1 = _ma_mark_file_changed_now(param_1); return uVar1; } } else if ((~*(uint *)(param_1 + 0x170) & 0x19) != 0) { __mutex = (pthread_mutex_t *)(param_1 + 0x8f0); if (*(long *)(param_1 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_locking.c", 0x19c); } *(byte *)(param_1 + 0x170) = *(byte *)(param_1 + 0x170) | 0x19; if (*(long *)(param_1 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } return 0; }
12
minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value evaluate(const std::shared_ptr<Context> & context) const { try { return do_evaluate(context); } catch (const std::exception & e) { std::ostringstream out; out << e.what(); if (location.source) out << error_location_suffix(*location.source, location.pos); throw std::runtime_error(out.str()); } }
O2
cpp
minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r14 pushq %rbx subq $0x1a0, %rsp # imm = 0x1A0 movq %rsi, %r14 movq %rdi, %rbx movq (%rsi), %rax callq *(%rax) movq %rbx, %rax addq $0x1a0, %rsp # imm = 0x1A0 popq %rbx popq %r14 popq %rbp retq movq %rax, %rbx cmpl $0x1, %edx jne 0x626cb movq %rbx, %rdi callq 0x23380 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x23bb0 movq (%rbx), %rax movq %rbx, %rdi callq *0x10(%rax) leaq 0x28(%rsp), %rdi movq %rax, %rsi callq 0x238c0 movq 0x8(%r14), %rsi testq %rsi, %rsi jne 0x62659 pushq $0x10 popq %rdi callq 0x23460 movq %rax, %r14 leaq 0x30(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x23dd0 movb $0x1, %bpl leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x23e50 xorl %ebp, %ebp movq 0x999a6(%rip), %rsi # 0xfbff0 movq 0x99907(%rip), %rdx # 0xfbf58 movq %r14, %rdi callq 0x23f20 movq 0x18(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x5768a leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x237f0 leaq 0x8(%rsp), %rdi callq 0x241d8 jmp 0x62617 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x241d8 jmp 0x626b7 jmp 0x626b4 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x241d8 testb %bpl, %bpl jne 0x626aa jmp 0x626b7 movq %rax, %rbx movq %r14, %rdi callq 0x236b0 jmp 0x626b7 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x231f0 jmp 0x626c6 movq %rax, %rbx callq 0x23e70 movq %rbx, %rdi callq 0x23fa0 movq %rax, %rdi callq 0x27215 nop
_ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r14 push rbx sub rsp, 1A0h mov r14, rsi mov rbx, rdi mov rax, [rsi] call qword ptr [rax] mov rax, rbx add rsp, 1A0h pop rbx pop r14 pop rbp retn mov rbx, rax cmp edx, 1 jnz loc_626CB mov rdi, rbx; void * call ___cxa_begin_catch mov rbx, rax lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [rbx] mov rdi, rbx call qword ptr [rax+10h] lea rdi, [rsp+arg_20] mov rsi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rsi, [r14+8] test rsi, rsi jnz short loc_62659 loc_62617: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, [rsp+arg_28] lea rdi, [rsp+arg_0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov bpl, 1 lea rsi, [rsp+arg_0] mov rdi, r14 call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_62659: mov rdx, [r14+18h] lea rdi, [rsp+arg_0] call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong) lea rdi, [rsp+arg_20] lea rsi, [rsp+arg_0] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_62617 mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_626B7 jmp short loc_626B4 mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_626AA jmp short loc_626B7 mov rbx, rax loc_626AA: mov rdi, r14; void * call ___cxa_free_exception jmp short loc_626B7 loc_626B4: mov rbx, rax loc_626B7: lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() jmp short loc_626C6 mov rbx, rax loc_626C6: call ___cxa_end_catch loc_626CB: mov rdi, rbx call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long minja::Expression::evaluate(long long a1, void (***a2)(void)) { (**a2)(); return a1; }
evaluate: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x1a0 MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RSI] LAB_001625c6: CALL qword ptr [RAX] LAB_001625c8: MOV RAX,RBX ADD RSP,0x1a0 POP RBX POP R14 POP RBP RET
/* minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) const */ Expression * __thiscall minja::Expression::evaluate(Expression *this,shared_ptr *param_1) { /* try { // try from 001625c6 to 001625c7 has its CatchHandler @ 001625d7 */ (*(code *)**(int8 **)param_1)(); return this; }
13
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
llama.cpp/common/common.cpp
void string_process_escapes(std::string & input) { std::size_t input_len = input.length(); std::size_t output_idx = 0; for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) { if (input[input_idx] == '\\' && input_idx + 1 < input_len) { switch (input[++input_idx]) { case 'n': input[output_idx++] = '\n'; break; case 'r': input[output_idx++] = '\r'; break; case 't': input[output_idx++] = '\t'; break; case '\'': input[output_idx++] = '\''; break; case '\"': input[output_idx++] = '\"'; break; case '\\': input[output_idx++] = '\\'; break; case 'x': // Handle \x12, etc if (input_idx + 2 < input_len) { const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 }; char *err_p = nullptr; const long val = std::strtol(x, &err_p, 16); if (err_p == x + 2) { input_idx += 2; input[output_idx++] = char(val); break; } } // fall through default: input[output_idx++] = '\\'; input[output_idx++] = input[input_idx]; break; } } else { input[output_idx++] = input[input_idx]; } } input.resize(output_idx); }
O3
cpp
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq 0x8(%rdi), %r13 testq %r13, %r13 je 0xf6d2b leaq 0xf(%rsp), %r12 xorl %r14d, %r14d leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi xorl %ecx, %ecx movq (%rbx), %rax movb (%rax,%rcx), %dl cmpb $0x5c, %dl jne 0xf6c4a leaq 0x1(%rcx), %rbp cmpq %r13, %rbp jae 0xf6c4a movzbl (%rax,%rbp), %edx cmpl $0x6d, %edx jle 0xf6c64 cmpl $0x73, %edx jg 0xf6c85 cmpl $0x6e, %edx je 0xf6cf4 cmpl $0x72, %edx jne 0xf6cd4 movb $0xd, (%rax,%r14) jmp 0xf6d07 movb %dl, (%rax,%r14) incq %r14 movq %rcx, %rbp incq %rbp movq %rbp, %rcx cmpq %r13, %rbp jb 0xf6c0c jmp 0xf6d2e cmpl $0x22, %edx je 0xf6ced cmpl $0x27, %edx je 0xf6d02 cmpl $0x5c, %edx jne 0xf6cd4 movb $0x5c, (%rax,%r14) jmp 0xf6d07 cmpl $0x74, %edx je 0xf6cfb cmpl $0x78, %edx jne 0xf6cd4 leaq 0x3(%rcx), %r15 cmpq %r13, %r15 jae 0xf6cd4 movb 0x2(%rax,%rcx), %dl movb %dl, 0xd(%rsp) movb 0x3(%rax,%rcx), %al movb %al, 0xe(%rsp) movb $0x0, 0xf(%rsp) movq $0x0, 0x10(%rsp) movl $0x10, %edx callq 0x20e30 cmpq %r12, 0x10(%rsp) je 0xf6d0f movq (%rbx), %rax leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi movb $0x5c, (%rax,%r14) movq (%rbx), %rax movb (%rax,%rbp), %cl movb %cl, 0x1(%rax,%r14) addq $0x2, %r14 jmp 0xf6c54 movb $0x22, (%rax,%r14) jmp 0xf6d07 movb $0xa, (%rax,%r14) jmp 0xf6d07 movb $0x9, (%rax,%r14) jmp 0xf6d07 movb $0x27, (%rax,%r14) incq %r14 jmp 0xf6c54 movq (%rbx), %rcx movb %al, (%rcx,%r14) incq %r14 movq %r15, %rbp leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi jmp 0xf6c54 xorl %r14d, %r14d movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x20b30 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov r13, [rdi+8] test r13, r13 jz loc_F6D2B lea r12, [rsp+48h+var_39] xor r14d, r14d lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] xor ecx, ecx loc_F6C0C: mov rax, [rbx] mov dl, [rax+rcx] cmp dl, 5Ch ; '\' jnz short loc_F6C4A lea rbp, [rcx+1] cmp rbp, r13 jnb short loc_F6C4A movzx edx, byte ptr [rax+rbp] cmp edx, 6Dh ; 'm' jle short loc_F6C64 cmp edx, 73h ; 's' jg short loc_F6C85 cmp edx, 6Eh ; 'n' jz loc_F6CF4 cmp edx, 72h ; 'r' jnz loc_F6CD4 mov byte ptr [rax+r14], 0Dh jmp loc_F6D07 loc_F6C4A: mov [rax+r14], dl inc r14 mov rbp, rcx loc_F6C54: inc rbp mov rcx, rbp cmp rbp, r13 jb short loc_F6C0C jmp loc_F6D2E loc_F6C64: cmp edx, 22h ; '"' jz loc_F6CED cmp edx, 27h ; ''' jz loc_F6D02 cmp edx, 5Ch ; '\' jnz short loc_F6CD4 mov byte ptr [rax+r14], 5Ch ; '\' jmp loc_F6D07 loc_F6C85: cmp edx, 74h ; 't' jz short loc_F6CFB cmp edx, 78h ; 'x' jnz short loc_F6CD4 lea r15, [rcx+3] cmp r15, r13 jnb short loc_F6CD4 mov dl, [rax+rcx+2] mov [rsp+48h+var_3B], dl mov al, [rax+rcx+3] mov [rsp+48h+var_3A], al mov [rsp+48h+var_39], 0 mov [rsp+48h+var_38], 0 mov edx, 10h call _strtol cmp [rsp+48h+var_38], r12 jz short loc_F6D0F mov rax, [rbx] lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] loc_F6CD4: mov byte ptr [rax+r14], 5Ch ; '\' mov rax, [rbx] mov cl, [rax+rbp] mov [rax+r14+1], cl add r14, 2 jmp loc_F6C54 loc_F6CED: mov byte ptr [rax+r14], 22h ; '"' jmp short loc_F6D07 loc_F6CF4: mov byte ptr [rax+r14], 0Ah jmp short loc_F6D07 loc_F6CFB: mov byte ptr [rax+r14], 9 jmp short loc_F6D07 loc_F6D02: mov byte ptr [rax+r14], 27h ; ''' loc_F6D07: inc r14 jmp loc_F6C54 loc_F6D0F: mov rcx, [rbx] mov [rcx+r14], al inc r14 mov rbp, r15 lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] jmp loc_F6C54 loc_F6D2B: xor r14d, r14d loc_F6D2E: mov rdi, rbx mov rsi, r14 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long string_process_escapes(long long *a1) { unsigned long long v1; // r13 long long v2; // r14 long long v3; // rcx long long v4; // rax char v5; // dl long long v6; // rbp unsigned int v7; // edx long long v8; // r15 char v9; // al _BYTE v11[2]; // [rsp+Dh] [rbp-3Bh] BYREF char v12; // [rsp+Fh] [rbp-39h] BYREF char *v13; // [rsp+10h] [rbp-38h] BYREF v1 = a1[1]; if ( v1 ) { v2 = 0LL; v3 = 0LL; while ( 1 ) { v4 = *a1; v5 = *(_BYTE *)(*a1 + v3); if ( v5 == 92 && (v6 = v3 + 1, v3 + 1 < v1) ) { v7 = *(unsigned __int8 *)(v4 + v6); if ( v7 <= 0x6D ) { switch ( v7 ) { case '"': *(_BYTE *)(v4 + v2) = 34; goto LABEL_27; case '\'': *(_BYTE *)(v4 + v2) = 39; goto LABEL_27; case '\\': *(_BYTE *)(v4 + v2) = 92; goto LABEL_27; } } else if ( *(unsigned __int8 *)(v4 + v6) > 0x73u ) { if ( v7 == 116 ) { *(_BYTE *)(v4 + v2) = 9; goto LABEL_27; } if ( v7 == 120 ) { v8 = v3 + 3; if ( v3 + 3 < v1 ) { v11[0] = *(_BYTE *)(v4 + v3 + 2); v11[1] = *(_BYTE *)(v4 + v3 + 3); v12 = 0; v13 = 0LL; v9 = strtol(v11, &v13, 16LL); if ( v13 == &v12 ) { *(_BYTE *)(*a1 + v2++) = v9; v6 = v8; goto LABEL_11; } v4 = *a1; } } } else { if ( v7 == 110 ) { *(_BYTE *)(v4 + v2) = 10; goto LABEL_27; } if ( v7 == 114 ) { *(_BYTE *)(v4 + v2) = 13; LABEL_27: ++v2; goto LABEL_11; } } *(_BYTE *)(v4 + v2) = 92; *(_BYTE *)(*a1 + v2 + 1) = *(_BYTE *)(*a1 + v6); v2 += 2LL; } else { *(_BYTE *)(v4 + v2++) = v5; v6 = v3; } LABEL_11: v3 = v6 + 1; if ( v6 + 1 >= v1 ) return std::string::resize(a1, v2, 0LL); } } v2 = 0LL; return std::string::resize(a1, v2, 0LL); }
string_process_escapes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R13,qword ptr [RDI + 0x8] TEST R13,R13 JZ 0x001f6d2b LEA R12,[RSP + 0xf] XOR R14D,R14D LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] XOR ECX,ECX LAB_001f6c0c: MOV RAX,qword ptr [RBX] MOV DL,byte ptr [RAX + RCX*0x1] CMP DL,0x5c JNZ 0x001f6c4a LEA RBP,[RCX + 0x1] CMP RBP,R13 JNC 0x001f6c4a MOVZX EDX,byte ptr [RAX + RBP*0x1] CMP EDX,0x6d JLE 0x001f6c64 CMP EDX,0x73 JG 0x001f6c85 CMP EDX,0x6e JZ 0x001f6cf4 CMP EDX,0x72 JNZ 0x001f6cd4 MOV byte ptr [RAX + R14*0x1],0xd JMP 0x001f6d07 LAB_001f6c4a: MOV byte ptr [RAX + R14*0x1],DL INC R14 MOV RBP,RCX LAB_001f6c54: INC RBP MOV RCX,RBP CMP RBP,R13 JC 0x001f6c0c JMP 0x001f6d2e LAB_001f6c64: CMP EDX,0x22 JZ 0x001f6ced CMP EDX,0x27 JZ 0x001f6d02 CMP EDX,0x5c JNZ 0x001f6cd4 MOV byte ptr [RAX + R14*0x1],0x5c JMP 0x001f6d07 LAB_001f6c85: CMP EDX,0x74 JZ 0x001f6cfb CMP EDX,0x78 JNZ 0x001f6cd4 LEA R15,[RCX + 0x3] CMP R15,R13 JNC 0x001f6cd4 MOV DL,byte ptr [RAX + RCX*0x1 + 0x2] MOV byte ptr [RSP + 0xd],DL MOV AL,byte ptr [RAX + RCX*0x1 + 0x3] MOV byte ptr [RSP + 0xe],AL MOV byte ptr [RSP + 0xf],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV EDX,0x10 CALL 0x00120e30 CMP qword ptr [RSP + 0x10],R12 JZ 0x001f6d0f MOV RAX,qword ptr [RBX] LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] LAB_001f6cd4: MOV byte ptr [RAX + R14*0x1],0x5c MOV RAX,qword ptr [RBX] MOV CL,byte ptr [RAX + RBP*0x1] MOV byte ptr [RAX + R14*0x1 + 0x1],CL ADD R14,0x2 JMP 0x001f6c54 LAB_001f6ced: MOV byte ptr [RAX + R14*0x1],0x22 JMP 0x001f6d07 LAB_001f6cf4: MOV byte ptr [RAX + R14*0x1],0xa JMP 0x001f6d07 LAB_001f6cfb: MOV byte ptr [RAX + R14*0x1],0x9 JMP 0x001f6d07 LAB_001f6d02: MOV byte ptr [RAX + R14*0x1],0x27 LAB_001f6d07: INC R14 JMP 0x001f6c54 LAB_001f6d0f: MOV RCX,qword ptr [RBX] MOV byte ptr [RCX + R14*0x1],AL INC R14 MOV RBP,R15 LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] JMP 0x001f6c54 LAB_001f6d2b: XOR R14D,R14D LAB_001f6d2e: MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00120b30 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_process_escapes(std::__cxx11::string&) */ void string_process_escapes(string *param_1) { ulong uVar1; byte bVar2; ulong uVar3; long lVar4; ulong uVar5; long lVar6; char local_3b; int1 local_3a; char local_39; char *local_38; uVar3 = *(ulong *)(param_1 + 8); if (uVar3 == 0) { lVar6 = 0; } else { lVar6 = 0; uVar5 = 0; do { lVar4 = *(long *)param_1; if ((*(char *)(lVar4 + uVar5) == '\\') && (uVar1 = uVar5 + 1, uVar1 < uVar3)) { bVar2 = *(byte *)(lVar4 + uVar1); if (bVar2 < 0x6e) { if (bVar2 == 0x22) { *(int1 *)(lVar4 + lVar6) = 0x22; } else if (bVar2 == 0x27) { *(int1 *)(lVar4 + lVar6) = 0x27; } else { if (bVar2 != 0x5c) goto LAB_001f6cd4; *(int1 *)(lVar4 + lVar6) = 0x5c; } } else if (bVar2 < 0x74) { if (bVar2 == 0x6e) { *(int1 *)(lVar4 + lVar6) = 10; } else { if (bVar2 != 0x72) goto LAB_001f6cd4; *(int1 *)(lVar4 + lVar6) = 0xd; } } else { if (bVar2 != 0x74) { if ((bVar2 == 0x78) && (uVar5 + 3 < uVar3)) { local_3b = *(char *)(lVar4 + 2 + uVar5); local_3a = *(int1 *)(lVar4 + 3 + uVar5); local_39 = '\0'; local_38 = (char *)0x0; lVar4 = strtol(&local_3b,&local_38,0x10); if (local_38 == &local_39) { *(char *)(*(long *)param_1 + lVar6) = (char)lVar4; lVar6 = lVar6 + 1; uVar5 = uVar5 + 3; goto LAB_001f6c54; } lVar4 = *(long *)param_1; } LAB_001f6cd4: *(int1 *)(lVar4 + lVar6) = 0x5c; *(int1 *)(*(long *)param_1 + 1 + lVar6) = *(int1 *)(*(long *)param_1 + uVar1); lVar6 = lVar6 + 2; uVar5 = uVar1; goto LAB_001f6c54; } *(int1 *)(lVar4 + lVar6) = 9; } lVar6 = lVar6 + 1; uVar5 = uVar1; } else { *(char *)(lVar4 + lVar6) = *(char *)(lVar4 + uVar5); lVar6 = lVar6 + 1; } LAB_001f6c54: uVar5 = uVar5 + 1; } while (uVar5 < uVar3); } std::__cxx11::string::resize((ulong)param_1,(char)lVar6); return; }
14
ftxui::StackedContainer::Render()
Andrewchistyakov[P]flashcards_lyc/build_O0/_deps/ftxui-src/src/ftxui/component/container.cpp
Element Render() final { Elements elements; for (auto& child : children_) { elements.push_back(child->Render()); } // Reverse the order of the elements. std::reverse(elements.begin(), elements.end()); return dbox(std::move(elements)); }
O0
cpp
ftxui::StackedContainer::Render(): pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0xa8(%rbp) movq %rdi, %rax movq %rax, -0xa0(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x98(%rbp) leaq -0x28(%rbp), %rdi callq 0x24340 movq -0x98(%rbp), %rax addq $0x8, %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi callq 0x514d0 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi callq 0x51500 movq %rax, -0x40(%rbp) leaq -0x38(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x51530 testb $0x1, %al jne 0x56ce4 jmp 0x56d5a leaq -0x38(%rbp), %rdi callq 0x51570 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rdi callq 0x23bd0 movq %rax, %rsi movq (%rsi), %rax movq 0x10(%rax), %rax leaq -0x58(%rbp), %rdi callq *%rax jmp 0x56d0c leaq -0x28(%rbp), %rdi leaq -0x58(%rbp), %rsi callq 0x24410 jmp 0x56d1b leaq -0x58(%rbp), %rdi callq 0x23cb0 leaq -0x38(%rbp), %rdi callq 0x51590 jmp 0x56cd1 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) jmp 0x56df6 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) leaq -0x58(%rbp), %rdi callq 0x23cb0 jmp 0x56df6 leaq -0x28(%rbp), %rdi movq %rdi, -0xb0(%rbp) callq 0x24830 movq -0xb0(%rbp), %rdi movq %rax, -0x70(%rbp) callq 0x24670 movq %rax, -0x78(%rbp) movq -0x70(%rbp), %rdi movq -0x78(%rbp), %rsi callq 0x57100 jmp 0x56d8d leaq -0x90(%rbp), %rdi movq %rdi, -0xb8(%rbp) leaq -0x28(%rbp), %rsi callq 0x3e4b0 movq -0xa8(%rbp), %rdi movq -0xb8(%rbp), %rsi callq 0x7f910 jmp 0x56db9 leaq -0x90(%rbp), %rdi callq 0x23cd0 leaq -0x28(%rbp), %rdi callq 0x23cd0 movq -0xa0(%rbp), %rax addq $0xc0, %rsp popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x60(%rbp) movl %eax, -0x64(%rbp) leaq -0x90(%rbp), %rdi callq 0x23cd0 leaq -0x28(%rbp), %rdi callq 0x23cd0 movq -0x60(%rbp), %rdi callq 0xda90 nopl (%rax,%rax)
_ZN5ftxui16StackedContainer6RenderEv: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_A8], rdi mov rax, rdi mov [rbp+var_A0], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_98], rax lea rdi, [rbp+var_28] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EEC2Ev; std::vector<std::shared_ptr<ftxui::Node>>::vector(void) mov rax, [rbp+var_98] add rax, 8 mov [rbp+var_30], rax mov rdi, [rbp+var_30] call _ZNSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE5beginEv; std::vector<std::shared_ptr<ftxui::ComponentBase>>::begin(void) mov [rbp+var_38], rax mov rdi, [rbp+var_30] call _ZNSt6vectorISt10shared_ptrIN5ftxui13ComponentBaseEESaIS3_EE3endEv; std::vector<std::shared_ptr<ftxui::ComponentBase>>::end(void) mov [rbp+var_40], rax loc_56CD1: lea rdi, [rbp+var_38] lea rsi, [rbp+var_40] call _ZN9__gnu_cxxneIPSt10shared_ptrIN5ftxui13ComponentBaseEESt6vectorIS4_SaIS4_EEEEbRKNS_17__normal_iteratorIT_T0_EESE_; __gnu_cxx::operator!=<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>> const&,__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>> const&) test al, 1 jnz short loc_56CE4 jmp short loc_56D5A loc_56CE4: lea rdi, [rbp+var_38] call _ZNK9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN5ftxui13ComponentBaseEESt6vectorIS4_SaIS4_EEEdeEv; __gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>::operator*(void) mov [rbp+var_48], rax mov rdi, [rbp+var_48] call _ZNKSt19__shared_ptr_accessIN5ftxui13ComponentBaseELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, rax mov rax, [rsi] mov rax, [rax+10h] lea rdi, [rbp+var_58] call rax jmp short $+2 loc_56D0C: lea rdi, [rbp+var_28] lea rsi, [rbp+var_58] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE9push_backEOS3_; std::vector<std::shared_ptr<ftxui::Node>>::push_back(std::shared_ptr<ftxui::Node>&&) jmp short $+2 loc_56D1B: lea rdi, [rbp+var_58] call _ZNSt10shared_ptrIN5ftxui4NodeEED2Ev; std::shared_ptr<ftxui::Node>::~shared_ptr() lea rdi, [rbp+var_38] call _ZN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN5ftxui13ComponentBaseEESt6vectorIS4_SaIS4_EEEppEv; __gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>::operator++(void) jmp short loc_56CD1 mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax jmp loc_56DF6 mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax lea rdi, [rbp+var_58] call _ZNSt10shared_ptrIN5ftxui4NodeEED2Ev; std::shared_ptr<ftxui::Node>::~shared_ptr() jmp loc_56DF6 loc_56D5A: lea rdi, [rbp+var_28] mov [rbp+var_B0], rdi call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE5beginEv; std::vector<std::shared_ptr<ftxui::Node>>::begin(void) mov rdi, [rbp+var_B0] mov [rbp+var_70], rax call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EE3endEv; std::vector<std::shared_ptr<ftxui::Node>>::end(void) mov [rbp+var_78], rax mov rdi, [rbp+var_70] mov rsi, [rbp+var_78] call _ZSt7reverseIN9__gnu_cxx17__normal_iteratorIPSt10shared_ptrIN5ftxui4NodeEESt6vectorIS5_SaIS5_EEEEEvT_SB_; std::reverse<__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>>(__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>,__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>) jmp short $+2 loc_56D8D: lea rdi, [rbp+var_90] mov [rbp+var_B8], rdi lea rsi, [rbp+var_28] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EEC2EOS5_; std::vector<std::shared_ptr<ftxui::Node>>::vector(std::vector<std::shared_ptr<ftxui::Node>>&&) mov rdi, [rbp+var_A8] mov rsi, [rbp+var_B8] call _ZN5ftxui4dboxESt6vectorISt10shared_ptrINS_4NodeEESaIS3_EE; ftxui::dbox(std::vector<std::shared_ptr<ftxui::Node>>) jmp short $+2 loc_56DB9: lea rdi, [rbp+var_90] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() lea rdi, [rbp+var_28] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rax, [rbp+var_A0] add rsp, 0C0h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_60], rcx mov [rbp+var_64], eax lea rdi, [rbp+var_90] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() loc_56DF6: lea rdi, [rbp+var_28] call _ZNSt6vectorISt10shared_ptrIN5ftxui4NodeEESaIS3_EED2Ev; std::vector<std::shared_ptr<ftxui::Node>>::~vector() mov rdi, [rbp+var_60] call __Unwind_Resume
ftxui::StackedContainer * ftxui::StackedContainer::Render(ftxui::StackedContainer *this, long long a2) { long long v2; // rsi long long v4[3]; // [rsp+30h] [rbp-90h] BYREF long long v5; // [rsp+48h] [rbp-78h] long long v6; // [rsp+50h] [rbp-70h] _BYTE v7[16]; // [rsp+68h] [rbp-58h] BYREF long long v8; // [rsp+78h] [rbp-48h] long long v9; // [rsp+80h] [rbp-40h] BYREF _QWORD v10[2]; // [rsp+88h] [rbp-38h] BYREF long long v11[5]; // [rsp+98h] [rbp-28h] BYREF v11[4] = (long long)this; v11[3] = a2; std::vector<std::shared_ptr<ftxui::Node>>::vector((long long)v11); v10[1] = a2 + 8; v10[0] = std::vector<std::shared_ptr<ftxui::ComponentBase>>::begin(a2 + 8); v9 = std::vector<std::shared_ptr<ftxui::ComponentBase>>::end(a2 + 8); while ( __gnu_cxx::operator!=<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>( (long long)v10, (long long)&v9) ) { v8 = __gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>::operator*((long long)v10); v2 = std::__shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v8); (*(void ( **)(_BYTE *))(*(_QWORD *)v2 + 16LL))(v7); std::vector<std::shared_ptr<ftxui::Node>>::push_back((long long)v11, (long long)v7); std::shared_ptr<ftxui::Node>::~shared_ptr((long long)v7); __gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::ComponentBase> *,std::vector<std::shared_ptr<ftxui::ComponentBase>>>::operator++(v10); } v6 = std::vector<std::shared_ptr<ftxui::Node>>::begin((long long)v11); v5 = std::vector<std::shared_ptr<ftxui::Node>>::end((long long)v11); std::reverse<__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node> *,std::vector<std::shared_ptr<ftxui::Node>>>>( v6, v5); std::vector<std::shared_ptr<ftxui::Node>>::vector((long long)v4, (long long)v11); ftxui::dbox(this, v4); std::vector<std::shared_ptr<ftxui::Node>>::~vector(v4); std::vector<std::shared_ptr<ftxui::Node>>::~vector(v11); return this; }
Render: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0xa8],RDI MOV RAX,RDI MOV qword ptr [RBP + -0xa0],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x98],RAX LEA RDI,[RBP + -0x28] CALL 0x00124340 MOV RAX,qword ptr [RBP + -0x98] ADD RAX,0x8 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x001514d0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x00151500 MOV qword ptr [RBP + -0x40],RAX LAB_00156cd1: LEA RDI,[RBP + -0x38] LEA RSI,[RBP + -0x40] CALL 0x00151530 TEST AL,0x1 JNZ 0x00156ce4 JMP 0x00156d5a LAB_00156ce4: LEA RDI,[RBP + -0x38] CALL 0x00151570 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x48] CALL 0x00123bd0 MOV RSI,RAX MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + 0x10] LAB_00156d04: LEA RDI,[RBP + -0x58] CALL RAX JMP 0x00156d0c LAB_00156d0c: LEA RDI,[RBP + -0x28] LEA RSI,[RBP + -0x58] CALL 0x00124410 JMP 0x00156d1b LAB_00156d1b: LEA RDI,[RBP + -0x58] CALL 0x00123cb0 LEA RDI,[RBP + -0x38] CALL 0x00151590 JMP 0x00156cd1 LAB_00156d5a: LEA RDI,[RBP + -0x28] MOV qword ptr [RBP + -0xb0],RDI CALL 0x00124830 MOV RDI,qword ptr [RBP + -0xb0] MOV qword ptr [RBP + -0x70],RAX CALL 0x00124670 MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0x70] MOV RSI,qword ptr [RBP + -0x78] LAB_00156d86: CALL 0x00157100 JMP 0x00156d8d LAB_00156d8d: LEA RDI,[RBP + -0x90] MOV qword ptr [RBP + -0xb8],RDI LEA RSI,[RBP + -0x28] CALL 0x0013e4b0 MOV RDI,qword ptr [RBP + -0xa8] MOV RSI,qword ptr [RBP + -0xb8] LAB_00156db2: CALL 0x0017f910 LAB_00156db7: JMP 0x00156db9 LAB_00156db9: LEA RDI,[RBP + -0x90] CALL 0x00123cd0 LEA RDI,[RBP + -0x28] CALL 0x00123cd0 MOV RAX,qword ptr [RBP + -0xa0] ADD RSP,0xc0 POP RBP RET
/* ftxui::StackedContainer::Render() */ ftxui * ftxui::StackedContainer::Render(void) { bool bVar1; long *plVar2; long in_RSI; ftxui *in_RDI; vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> local_98 [24]; int8 local_80; int8 local_78; shared_ptr<ftxui::Node> local_60 [16]; __shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false> *local_50; int8 local_48; int8 local_40; vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *local_38; vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> local_30 [40]; std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::vector (local_30); local_38 = (vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> *)(in_RSI + 8); local_40 = std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::begin(local_38); local_48 = std:: vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>> ::end(local_38); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_40,(__normal_iterator *)&local_48); if (!bVar1) break; local_50 = (__shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false> *) __gnu_cxx:: __normal_iterator<std::shared_ptr<ftxui::ComponentBase>*,std::vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>> ::operator*((__normal_iterator<std::shared_ptr<ftxui::ComponentBase>*,std::vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>> *)&local_40); plVar2 = (long *)std:: __shared_ptr_access<ftxui::ComponentBase,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->(local_50); /* try { // try from 00156d04 to 00156d09 has its CatchHandler @ 00156d2f */ (**(code **)(*plVar2 + 0x10))(local_60); /* try { // try from 00156d0c to 00156d18 has its CatchHandler @ 00156d40 */ std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>:: push_back(local_30,local_60); std::shared_ptr<ftxui::Node>::~shared_ptr(local_60); __gnu_cxx:: __normal_iterator<std::shared_ptr<ftxui::ComponentBase>*,std::vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>> ::operator++((__normal_iterator<std::shared_ptr<ftxui::ComponentBase>*,std::vector<std::shared_ptr<ftxui::ComponentBase>,std::allocator<std::shared_ptr<ftxui::ComponentBase>>>> *)&local_40); } local_78 = std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> ::begin(local_30); local_80 = std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>> ::end(local_30); /* try { // try from 00156d86 to 00156d8a has its CatchHandler @ 00156d2f */ std:: reverse<__gnu_cxx::__normal_iterator<std::shared_ptr<ftxui::Node>*,std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>>> (local_78,local_80); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::vector (local_98,(vector *)local_30); /* try { // try from 00156db2 to 00156db6 has its CatchHandler @ 00156dde */ dbox(in_RDI,local_98); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector (local_98); std::vector<std::shared_ptr<ftxui::Node>,std::allocator<std::shared_ptr<ftxui::Node>>>::~vector (local_30); return in_RDI; }
15
translog_scanner_set_last_page
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_scanner_set_last_page(TRANSLOG_SCANNER_DATA *scanner) { my_bool page_ok; if (LSN_FILE_NO(scanner->page_addr) == LSN_FILE_NO(scanner->horizon)) { /* It is last file => we can easy find last page address by horizon */ uint pagegrest= LSN_OFFSET(scanner->horizon) % TRANSLOG_PAGE_SIZE; scanner->last_file_page= (scanner->horizon - (pagegrest ? pagegrest : TRANSLOG_PAGE_SIZE)); return (0); } scanner->last_file_page= scanner->page_addr; return (translog_get_last_page_addr(&scanner->last_file_page, &page_ok, 0)); }
O0
c
translog_scanner_set_last_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x2000(%rax), %rax sarq $0x20, %rax movq -0x10(%rbp), %rcx movq 0x2008(%rcx), %rcx sarq $0x20, %rcx cmpl %ecx, %eax jne 0x32ae0 movq -0x10(%rbp), %rcx movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq 0x2008(%rcx), %rax andq $0x1fff, %rax # imm = 0x1FFF movl %eax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x2008(%rax), %rax movq %rax, -0x20(%rbp) cmpl $0x0, -0x18(%rbp) je 0x32ab9 movl -0x18(%rbp), %eax movl %eax, -0x24(%rbp) jmp 0x32ac3 movl $0x2000, %eax # imm = 0x2000 movl %eax, -0x24(%rbp) jmp 0x32ac3 movq -0x20(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %eax subq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x2010(%rax) movb $0x0, -0x1(%rbp) jmp 0x32b0f movq -0x10(%rbp), %rax movq 0x2000(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x2010(%rax) movq -0x10(%rbp), %rdi addq $0x2010, %rdi # imm = 0x2010 leaq -0x11(%rbp), %rsi xorl %edx, %edx callq 0x2fad0 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
translog_scanner_set_last_page: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax+2000h] sar rax, 20h mov rcx, [rbp+var_10] mov rcx, [rcx+2008h] sar rcx, 20h cmp eax, ecx jnz short loc_32AE0 mov rcx, [rbp+var_10] mov rax, 0FFFFFFFFh and rax, [rcx+2008h] and rax, 1FFFh mov [rbp+var_18], eax mov rax, [rbp+var_10] mov rax, [rax+2008h] mov [rbp+var_20], rax cmp [rbp+var_18], 0 jz short loc_32AB9 mov eax, [rbp+var_18] mov [rbp+var_24], eax jmp short loc_32AC3 loc_32AB9: mov eax, 2000h mov [rbp+var_24], eax jmp short $+2 loc_32AC3: mov rcx, [rbp+var_20] mov eax, [rbp+var_24] mov eax, eax sub rcx, rax mov rax, [rbp+var_10] mov [rax+2010h], rcx mov [rbp+var_1], 0 jmp short loc_32B0F loc_32AE0: mov rax, [rbp+var_10] mov rcx, [rax+2000h] mov rax, [rbp+var_10] mov [rax+2010h], rcx mov rdi, [rbp+var_10] add rdi, 2010h lea rsi, [rbp+var_11] xor edx, edx call translog_get_last_page_addr mov [rbp+var_1], al loc_32B0F: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char translog_scanner_set_last_page(_QWORD *a1) { unsigned int v2; // [rsp+Ch] [rbp-24h] bool v3; // [rsp+1Fh] [rbp-11h] BYREF _QWORD *v4; // [rsp+20h] [rbp-10h] v4 = a1; if ( HIDWORD(a1[1024]) == HIDWORD(a1[1025]) ) { if ( (v4[1025] & 0x1FFF) != 0 ) v2 = v4[1025] & 0x1FFF; else v2 = 0x2000; v4[1026] = v4[1025] - v2; return 0; } else { v4[1026] = v4[1024]; return translog_get_last_page_addr(v4 + 1026, &v3, 0); } }
translog_scanner_set_last_page: 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 + 0x2000] SAR RAX,0x20 MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x2008] SAR RCX,0x20 CMP EAX,ECX JNZ 0x00132ae0 MOV RCX,qword ptr [RBP + -0x10] MOV RAX,0xffffffff AND RAX,qword ptr [RCX + 0x2008] AND RAX,0x1fff MOV dword ptr [RBP + -0x18],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x2008] MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [RBP + -0x18],0x0 JZ 0x00132ab9 MOV EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x24],EAX JMP 0x00132ac3 LAB_00132ab9: MOV EAX,0x2000 MOV dword ptr [RBP + -0x24],EAX JMP 0x00132ac3 LAB_00132ac3: MOV RCX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV EAX,EAX SUB RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x2010],RCX MOV byte ptr [RBP + -0x1],0x0 JMP 0x00132b0f LAB_00132ae0: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x2000] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x2010],RCX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x2010 LEA RSI,[RBP + -0x11] XOR EDX,EDX CALL 0x0012fad0 MOV byte ptr [RBP + -0x1],AL LAB_00132b0f: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 translog_scanner_set_last_page(long param_1) { uint local_2c; int1 local_19; long local_18; int1 local_9; if ((int)((ulong)*(int8 *)(param_1 + 0x2000) >> 0x20) == (int)((ulong)*(int8 *)(param_1 + 0x2008) >> 0x20)) { local_2c = (uint)*(ulong *)(param_1 + 0x2008) & 0x1fff; if ((*(ulong *)(param_1 + 0x2008) & 0x1fff) == 0) { local_2c = 0x2000; } *(ulong *)(param_1 + 0x2010) = *(long *)(param_1 + 0x2008) - (ulong)local_2c; local_9 = 0; } else { *(int8 *)(param_1 + 0x2010) = *(int8 *)(param_1 + 0x2000); local_18 = param_1; local_9 = translog_get_last_page_addr(param_1 + 0x2010,&local_19,0); } return local_9; }
16
usage
eloqsql/client/mysql_plugin.c
static void usage(void) { PRINT_VERSION; puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. " "All rights reserved.\n"); puts("Enable or disable plugins."); printf("\nUsage: %s [options] <plugin> ENABLE|DISABLE\n\nOptions:\n", my_progname); my_print_help(my_long_options); puts("\n"); }
O0
c
usage: pushq %rbp movq %rsp, %rbp jmp 0x26a56 leaq 0x36a723(%rip), %rax # 0x391180 movq (%rax), %rsi leaq 0x5b981(%rip), %rdi # 0x823e8 leaq 0x5b991(%rip), %rdx # 0x823ff leaq 0x5b990(%rip), %rcx # 0x82405 movb $0x0, %al callq 0x25050 leaq 0x5ba45(%rip), %rdi # 0x824c8 callq 0x255a0 leaq 0x5ba87(%rip), %rdi # 0x82516 callq 0x255a0 leaq 0x36a6e5(%rip), %rax # 0x391180 movq (%rax), %rsi leaq 0x5ba8c(%rip), %rdi # 0x82531 movb $0x0, %al callq 0x25050 leaq 0x1b255d(%rip), %rdi # 0x1d9010 callq 0x2bc40 leaq 0x6091a(%rip), %rdi # 0x873d9 callq 0x255a0 popq %rbp retq nopw %cs:(%rax,%rax)
usage: push rbp mov rbp, rsp jmp short $+2 loc_26A56: lea rax, my_progname mov rsi, [rax] lea rdi, aSVerSDistribS; "%s Ver %s Distrib %s\n" lea rdx, a100; "1.0.0" lea rcx, a10610Mariadb; "10.6.10-MariaDB" mov al, 0 call _printf lea rdi, aCopyrightC2011; "Copyright (c) 2011, 2015, Oracle and/or"... call _puts lea rdi, aEnableOrDisabl; "Enable or disable plugins." call _puts lea rax, my_progname mov rsi, [rax] lea rdi, aUsageSOptionsP; "\nUsage: %s [options] <plugin> ENABLE|D"... mov al, 0 call _printf lea rdi, my_long_options call my_print_help lea rdi, asc_873D6+3; "\n" call _puts pop rbp retn
long long usage() { printf("%s Ver %s Distrib %s\n", my_progname, "1.0.0", "10.6.10-MariaDB"); puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.\n"); puts("Enable or disable plugins."); printf("\nUsage: %s [options] <plugin> ENABLE|DISABLE\n\nOptions:\n", my_progname); my_print_help(&my_long_options); return puts("\n"); }
usage: PUSH RBP MOV RBP,RSP JMP 0x00126a56 LAB_00126a56: LEA RAX,[0x491180] MOV RSI,qword ptr [RAX] LEA RDI,[0x1823e8] LEA RDX,[0x1823ff] LEA RCX,[0x182405] MOV AL,0x0 CALL 0x00125050 LEA RDI,[0x1824c8] CALL 0x001255a0 LEA RDI,[0x182516] CALL 0x001255a0 LEA RAX,[0x491180] MOV RSI,qword ptr [RAX] LEA RDI,[0x182531] MOV AL,0x0 CALL 0x00125050 LEA RDI,[0x2d9010] CALL 0x0012bc40 LEA RDI,[0x1873d9] CALL 0x001255a0 POP RBP RET
void usage(void) { printf("%s Ver %s Distrib %s\n",my_progname,&DAT_001823ff,"10.6.10-MariaDB"); puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.\n"); puts("Enable or disable plugins."); printf("\nUsage: %s [options] <plugin> ENABLE|DISABLE\n\nOptions:\n",my_progname); my_print_help(my_long_options); puts("\n"); return; }
17
usage
eloqsql/client/mysql_plugin.c
static void usage(void) { PRINT_VERSION; puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. " "All rights reserved.\n"); puts("Enable or disable plugins."); printf("\nUsage: %s [options] <plugin> ENABLE|DISABLE\n\nOptions:\n", my_progname); my_print_help(my_long_options); puts("\n"); }
O3
c
usage: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0x346e81(%rip), %rbx # 0x36d590 movq (%rbx), %rdx leaq 0x3ac63(%rip), %rsi # 0x6137c leaq 0x3ac73(%rip), %rcx # 0x61393 leaq 0x3ac72(%rip), %r8 # 0x61399 movl $0x1, %edi xorl %eax, %eax callq 0x24030 leaq 0x3ad22(%rip), %rdi # 0x6145c callq 0x245f0 leaq 0x3ad64(%rip), %rdi # 0x614aa callq 0x245f0 movq (%rbx), %rdx leaq 0x3ad70(%rip), %rsi # 0x614c5 movl $0x1, %edi xorl %eax, %eax callq 0x24030 leaq 0x2cf8a8(%rip), %rdi # 0x2f6010 callq 0x29731 leaq 0x3fbc1(%rip), %rdi # 0x66335 addq $0x8, %rsp popq %rbx popq %rbp jmp 0x245f0
usage: push rbp mov rbp, rsp push rbx push rax lea rbx, my_progname mov rdx, [rbx] lea rsi, aSVerSDistribS; "%s Ver %s Distrib %s\n" lea rcx, a100; "1.0.0" lea r8, a10610Mariadb; "10.6.10-MariaDB" mov edi, 1 xor eax, eax call ___printf_chk lea rdi, aCopyrightC2011; "Copyright (c) 2011, 2015, Oracle and/or"... call _puts lea rdi, aEnableOrDisabl; "Enable or disable plugins." call _puts mov rdx, [rbx] lea rsi, aUsageSOptionsP; "\nUsage: %s [options] <plugin> ENABLE|D"... mov edi, 1 xor eax, eax call ___printf_chk lea rdi, my_long_options call my_print_help lea rdi, asc_66332+3; "\n" add rsp, 8 pop rbx pop rbp jmp _puts
long long usage() { __printf_chk(1LL, "%s Ver %s Distrib %s\n", my_progname, "1.0.0", "10.6.10-MariaDB"); puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.\n"); puts("Enable or disable plugins."); __printf_chk(1LL, "\nUsage: %s [options] <plugin> ENABLE|DISABLE\n\nOptions:\n", my_progname); my_print_help(&my_long_options); return puts("\n"); }
usage: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0x46d590] MOV RDX,qword ptr [RBX] LEA RSI,[0x16137c] LEA RCX,[0x161393] LEA R8,[0x161399] MOV EDI,0x1 XOR EAX,EAX CALL 0x00124030 LEA RDI,[0x16145c] CALL 0x001245f0 LEA RDI,[0x1614aa] CALL 0x001245f0 MOV RDX,qword ptr [RBX] LEA RSI,[0x1614c5] MOV EDI,0x1 XOR EAX,EAX CALL 0x00124030 LEA RDI,[0x3f6010] CALL 0x00129731 LEA RDI,[0x166335] ADD RSP,0x8 POP RBX POP RBP JMP 0x001245f0
void usage(void) { __printf_chk(1,"%s Ver %s Distrib %s\n",my_progname,&DAT_00161393,"10.6.10-MariaDB"); puts("Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.\n"); puts("Enable or disable plugins."); __printf_chk(1,"\nUsage: %s [options] <plugin> ENABLE|DISABLE\n\nOptions:\n",my_progname); my_print_help(my_long_options); puts("\n"); return; }
18
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 0x70b1d cmpq $0x0, 0x30(%r15) je 0x70b39 movq %rdx, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r12 movq %r12, %rdi callq 0x63f0a movq %r15, 0x8(%rsp) movq %r14, 0x10(%rsp) cmpq $0x0, 0x30(%r12) je 0x70aef leaq 0x88(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x69b70 movups 0x8(%rsp), %xmm0 leaq 0x88(%rsp), %rsi movups %xmm0, 0x50(%rsi) leaq 0x18(%rsp), %rdi callq 0x70c40 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x70bf4 leaq 0x18(%rsp), %rdi callq 0x49072 leaq 0x88(%rsp), %rdi callq 0x6419a jmp 0x70b01 leaq 0x8(%rsp), %rsi leaq 0x38(%rsp), %rdx movq %rbx, %rdi callq 0x70c88 leaq 0x38(%rsp), %rdi callq 0x6419a movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 leaq 0x44e01(%rip), %rsi # 0xb5930 movq %rax, %rdi callq 0x23330 jmp 0x70b53 pushq $0x10 popq %rdi callq 0x23470 movq %rax, %r14 leaq 0x44dff(%rip), %rsi # 0xb594a movq %rax, %rdi callq 0x23330 movq 0x8e48e(%rip), %rsi # 0xfefe8 movq 0x8e3e7(%rip), %rdx # 0xfef48 movq %r14, %rdi callq 0x23f00 jmp 0x70b9b jmp 0x70b6d movq %rax, %rbx movq %r14, %rdi callq 0x236a0 jmp 0x70ba8 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x49072 jmp 0x70b8c movq %rax, %rbx leaq 0x88(%rsp), %rdi callq 0x6419a jmp 0x70b9e movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x6419a movq %rbx, %rdi callq 0x23f80
_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_70B1D cmp qword ptr [r15+30h], 0 jz loc_70B39 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_70AEF 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_70B01 loc_70AEF: 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_70B01: 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_70B1D: 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_70B53 loc_70B39: 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_70B53: 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_70B9B jmp short $+2 loc_70B6D: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_70BA8 mov rbx, rax lea rdi, [rsp+108h+var_F0]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() jmp short loc_70B8C mov rbx, rax loc_70B8C: lea rdi, [rsp+108h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_70B9E loc_70B9B: mov rbx, rax loc_70B9E: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_70BA8: 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 0x00170b1d CMP qword ptr [R15 + 0x30],0x0 JZ 0x00170b39 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x38] MOV RDI,R12 CALL 0x00163f0a MOV qword ptr [RSP + 0x8],R15 MOV qword ptr [RSP + 0x10],R14 CMP qword ptr [R12 + 0x30],0x0 JZ 0x00170aef LAB_00170a9c: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x38] CALL 0x00169b70 MOVUPS XMM0,xmmword ptr [RSP + 0x8] LEA RSI,[RSP + 0x88] MOVUPS xmmword ptr [RSI + 0x50],XMM0 LAB_00170abf: LEA RDI,[RSP + 0x18] CALL 0x00170c40 LAB_00170ac9: LEA RSI,[RSP + 0x18] MOV RDI,RBX CALL 0x00170bf4 LEA RDI,[RSP + 0x18] CALL 0x00149072 LEA RDI,[RSP + 0x88] CALL 0x0016419a JMP 0x00170b01 LAB_00170aef: LEA RSI,[RSP + 0x8] LEA RDX,[RSP + 0x38] MOV RDI,RBX CALL 0x00170c88 LAB_00170b01: LEA RDI,[RSP + 0x38] CALL 0x0016419a MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R14 POP R15 RET LAB_00170b1d: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_00170b28: LEA RSI,[0x1b5930] MOV RDI,RAX CALL 0x00123330 LAB_00170b37: JMP 0x00170b53 LAB_00170b39: PUSH 0x10 POP RDI CALL 0x00123470 MOV R14,RAX LAB_00170b44: LEA RSI,[0x1b594a] MOV RDI,RAX CALL 0x00123330 LAB_00170b53: MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,R14 CALL 0x00123f00
/* 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 00170b28 to 00170b36 has its CatchHandler @ 00170b6d */ 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 00170aef to 00170b00 has its CatchHandler @ 00170b69 */ const::{lambda(minja::Value_const&)#1}::operator() ((_lambda_minja__Value_const___1_ *)param_1,(Value *)&local_100); } else { /* try { // try from 00170a9c to 00170aad has its CatchHandler @ 00170b9b */ 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 00170abf to 00170ac8 has its CatchHandler @ 00170b89 */ 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 00170ac9 to 00170ad5 has its CatchHandler @ 00170b7a */ 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 00170b44 to 00170b52 has its CatchHandler @ 00170b6b */ std::runtime_error::runtime_error(this,"BinaryOpExpr.right is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); }
19
int10_to_str
eloqsql/strings/int2str.c
char *int10_to_str(long int val,char *dst,int radix) { char buffer[65]; register char *p; long int new_val; unsigned long int uval = (unsigned long int) val; if (radix < 0) /* -10 */ { if (val < 0) { *dst++ = '-'; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (unsigned long int)0 - uval; } } p = &buffer[sizeof(buffer)-1]; *p = '\0'; new_val= (long) (uval / 10); *--p = '0'+ (char) (uval - (unsigned long) new_val * 10); val = new_val; while (val != 0) { new_val=val/10; *--p = '0' + (char) (val-new_val*10); val= new_val; } while ((*dst++ = *p++) != 0) ; return dst-1; }
O0
c
int10_to_str: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x58(%rbp) movq %rsi, -0x60(%rbp) movl %edx, -0x64(%rbp) movq -0x58(%rbp), %rax movq %rax, -0x80(%rbp) cmpl $0x0, -0x64(%rbp) jge 0x798c6 cmpq $0x0, -0x58(%rbp) jge 0x798c4 movq -0x60(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x60(%rbp) movb $0x2d, (%rax) xorl %eax, %eax subq -0x80(%rbp), %rax movq %rax, -0x80(%rbp) jmp 0x798c6 leaq -0x50(%rbp), %rax addq $0x40, %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movb $0x0, (%rax) movq -0x80(%rbp), %rax movl $0xa, %ecx xorl %edx, %edx divq %rcx movq %rax, -0x78(%rbp) movq -0x80(%rbp), %rax imulq $0xa, -0x78(%rbp), %rcx subq %rcx, %rax movsbl %al, %eax addl $0x30, %eax movb %al, %cl movq -0x70(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x70(%rbp) movb %cl, -0x1(%rax) movq -0x78(%rbp), %rax movq %rax, -0x58(%rbp) cmpq $0x0, -0x58(%rbp) je 0x79962 movq -0x58(%rbp), %rax movl $0xa, %ecx cqto idivq %rcx movq %rax, -0x78(%rbp) movq -0x58(%rbp), %rax imulq $0xa, -0x78(%rbp), %rcx subq %rcx, %rax movsbl %al, %eax addl $0x30, %eax movb %al, %cl movq -0x70(%rbp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x70(%rbp) movb %cl, -0x1(%rax) movq -0x78(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x79919 jmp 0x79964 movq -0x70(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x70(%rbp) movb (%rax), %al movq -0x60(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x60(%rbp) movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0x79990 jmp 0x79964 movq -0x60(%rbp), %rax decq %rax movq %rax, -0x88(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x799c0 movq -0x88(%rbp), %rax addq $0x90, %rsp popq %rbp retq callq 0x24300 nopw %cs:(%rax,%rax) nop
int10_to_str: push rbp mov rbp, rsp sub rsp, 90h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_58], rdi mov [rbp+var_60], rsi mov [rbp+var_64], edx mov rax, [rbp+var_58] mov [rbp+var_80], rax cmp [rbp+var_64], 0 jge short loc_798C6 cmp [rbp+var_58], 0 jge short loc_798C4 mov rax, [rbp+var_60] mov rcx, rax add rcx, 1 mov [rbp+var_60], rcx mov byte ptr [rax], 2Dh ; '-' xor eax, eax sub rax, [rbp+var_80] mov [rbp+var_80], rax loc_798C4: jmp short $+2 loc_798C6: lea rax, [rbp+var_50] add rax, 40h ; '@' mov [rbp+var_70], rax mov rax, [rbp+var_70] mov byte ptr [rax], 0 mov rax, [rbp+var_80] mov ecx, 0Ah xor edx, edx div rcx mov [rbp+var_78], rax mov rax, [rbp+var_80] imul rcx, [rbp+var_78], 0Ah sub rax, rcx movsx eax, al add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_70] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_70], rdx mov [rax-1], cl mov rax, [rbp+var_78] mov [rbp+var_58], rax loc_79919: cmp [rbp+var_58], 0 jz short loc_79962 mov rax, [rbp+var_58] mov ecx, 0Ah cqo idiv rcx mov [rbp+var_78], rax mov rax, [rbp+var_58] imul rcx, [rbp+var_78], 0Ah sub rax, rcx movsx eax, al add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_70] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_70], rdx mov [rax-1], cl mov rax, [rbp+var_78] mov [rbp+var_58], rax jmp short loc_79919 loc_79962: jmp short $+2 loc_79964: mov rax, [rbp+var_70] mov rcx, rax add rcx, 1 mov [rbp+var_70], rcx mov al, [rax] mov rcx, [rbp+var_60] mov rdx, rcx add rdx, 1 mov [rbp+var_60], rdx mov [rcx], al movsx eax, al cmp eax, 0 jz short loc_79990 jmp short loc_79964 loc_79990: mov rax, [rbp+var_60] dec rax mov [rbp+var_88], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_799C0 mov rax, [rbp+var_88] add rsp, 90h pop rbp retn loc_799C0: call ___stack_chk_fail
_BYTE * int10_to_str(long long a1, _BYTE *a2, int a3) { _BYTE *v3; // rax _BYTE *v4; // rax _BYTE *v5; // rcx unsigned long long v7; // [rsp+10h] [rbp-80h] _BYTE *v8; // [rsp+20h] [rbp-70h] _BYTE *v9; // [rsp+30h] [rbp-60h] signed long long i; // [rsp+38h] [rbp-58h] _BYTE v11[9]; // [rsp+7Fh] [rbp-11h] BYREF unsigned long long v12; // [rsp+88h] [rbp-8h] v12 = __readfsqword(0x28u); v9 = a2; v7 = a1; if ( a3 < 0 && a1 < 0 ) { v9 = a2 + 1; *a2 = 45; v7 = -a1; } v11[1] = 0; v8 = v11; v11[0] = v7 % 0xA + 48; for ( i = v7 / 0xA; i; i /= 10LL ) { v3 = v8--; *(v3 - 1) = i % 10 + 48; } do { v4 = v8++; LOBYTE(v4) = *v4; v5 = v9++; *v5 = (_BYTE)v4; } while ( (_BYTE)v4 ); return v9 - 1; }
int10_to_str: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x58],RDI MOV qword ptr [RBP + -0x60],RSI MOV dword ptr [RBP + -0x64],EDX MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x80],RAX CMP dword ptr [RBP + -0x64],0x0 JGE 0x001798c6 CMP qword ptr [RBP + -0x58],0x0 JGE 0x001798c4 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x60],RCX MOV byte ptr [RAX],0x2d XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x80] MOV qword ptr [RBP + -0x80],RAX LAB_001798c4: JMP 0x001798c6 LAB_001798c6: LEA RAX,[RBP + -0x50] ADD RAX,0x40 MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x70] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x80] MOV ECX,0xa XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x80] IMUL RCX,qword ptr [RBP + -0x78],0xa SUB RAX,RCX MOVSX EAX,AL ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x70] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x70],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x58],RAX LAB_00179919: CMP qword ptr [RBP + -0x58],0x0 JZ 0x00179962 MOV RAX,qword ptr [RBP + -0x58] MOV ECX,0xa CQO IDIV RCX MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x58] IMUL RCX,qword ptr [RBP + -0x78],0xa SUB RAX,RCX MOVSX EAX,AL ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x70] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RBP + -0x70],RDX MOV byte ptr [RAX + -0x1],CL MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x58],RAX JMP 0x00179919 LAB_00179962: JMP 0x00179964 LAB_00179964: MOV RAX,qword ptr [RBP + -0x70] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x70],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x60] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x60],RDX MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x00179990 JMP 0x00179964 LAB_00179990: MOV RAX,qword ptr [RBP + -0x60] DEC RAX MOV qword ptr [RBP + -0x88],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001799c0 MOV RAX,qword ptr [RBP + -0x88] ADD RSP,0x90 POP RBP RET LAB_001799c0: CALL 0x00124300
char * int10_to_str(ulong param_1,char *param_2,int param_3) { char cVar1; char *pcVar2; long in_FS_OFFSET; ulong local_88; char *local_78; char *local_68; ulong local_60; char local_1a [10]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_88 = param_1; local_68 = param_2; if ((param_3 < 0) && ((long)param_1 < 0)) { local_68 = param_2 + 1; *param_2 = '-'; local_88 = -param_1; } local_1a[2] = 0; local_1a[1] = (char)local_88 + (char)(local_88 / 10) * -10 + '0'; local_78 = local_1a + 1; local_60 = local_88 / 10; while (pcVar2 = local_68, local_60 != 0) { local_78[-1] = (char)local_60 + (char)((long)local_60 / 10) * -10 + '0'; local_78 = local_78 + -1; local_60 = (long)local_60 / 10; } do { local_68 = pcVar2; cVar1 = *local_78; *local_68 = cVar1; local_78 = local_78 + 1; pcVar2 = local_68 + 1; } while (cVar1 != '\0'); if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_68; }
20
ma_init_alloc_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void ma_init_alloc_root(MA_MEM_ROOT *mem_root, size_t block_size, size_t pre_alloc_size) { mem_root->free= mem_root->used= mem_root->pre_alloc= 0; mem_root->min_malloc=32; mem_root->block_size= (block_size-MALLOC_OVERHEAD-sizeof(MA_USED_MEM)+8); mem_root->error_handler=0; mem_root->block_num= 4; mem_root->first_block_usage= 0; #if !(defined(HAVE_purify) && defined(EXTRA_DEBUG)) if (pre_alloc_size) { if ((mem_root->free = mem_root->pre_alloc= (MA_USED_MEM*) malloc(pre_alloc_size+ ALIGN_SIZE(sizeof(MA_USED_MEM))))) { mem_root->free->size=pre_alloc_size+ALIGN_SIZE(sizeof(MA_USED_MEM)); mem_root->free->left=pre_alloc_size; mem_root->free->next=0; } } #endif }
O0
c
ma_init_alloc_root: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq $0x0, 0x10(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movq $0x20, 0x18(%rax) movq -0x10(%rbp), %rcx subq $0x8, %rcx subq $0x18, %rcx addq $0x8, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x8(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rax movl $0x4, 0x28(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x2c(%rax) cmpq $0x0, -0x18(%rbp) je 0x28ab8 movq -0x18(%rbp), %rdi addq $0x18, %rdi callq 0x135c0 movq -0x8(%rbp), %rcx movq %rax, 0x10(%rcx) movq -0x8(%rbp), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x28ab6 movq -0x18(%rbp), %rcx addq $0x18, %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rcx movq -0x8(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq (%rax), %rax movq $0x0, (%rax) jmp 0x28ab8 addq $0x20, %rsp popq %rbp retq nop
ma_init_alloc_root: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov qword ptr [rax+10h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+8], 0 mov rax, [rbp+var_8] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov qword ptr [rax+18h], 20h ; ' ' mov rcx, [rbp+var_10] sub rcx, 8 sub rcx, 18h add rcx, 8 mov rax, [rbp+var_8] mov [rax+20h], rcx mov rax, [rbp+var_8] mov qword ptr [rax+30h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+28h], 4 mov rax, [rbp+var_8] mov dword ptr [rax+2Ch], 0 cmp [rbp+var_18], 0 jz short loc_28AB8 mov rdi, [rbp+var_18] add rdi, 18h call _malloc mov rcx, [rbp+var_8] mov [rcx+10h], rax mov rcx, [rbp+var_8] mov [rcx], rax cmp rax, 0 jz short loc_28AB6 mov rcx, [rbp+var_18] add rcx, 18h mov rax, [rbp+var_8] mov rax, [rax] mov [rax+10h], rcx mov rcx, [rbp+var_18] mov rax, [rbp+var_8] mov rax, [rax] mov [rax+8], rcx mov rax, [rbp+var_8] mov rax, [rax] mov qword ptr [rax], 0 loc_28AB6: jmp short $+2 loc_28AB8: add rsp, 20h pop rbp retn
long long ma_init_alloc_root(long long *a1, long long a2, long long a3) { long long result; // rax a1[2] = 0LL; a1[1] = 0LL; *a1 = 0LL; a1[3] = 32LL; a1[4] = a2 - 32 + 8; a1[6] = 0LL; *((_DWORD *)a1 + 10) = 4; result = (long long)a1; *((_DWORD *)a1 + 11) = 0; if ( a3 ) { result = malloc(a3 + 24); a1[2] = result; *a1 = result; if ( result ) { *(_QWORD *)(*a1 + 16) = a3 + 24; *(_QWORD *)(*a1 + 8) = a3; result = *a1; *(_QWORD *)*a1 = 0LL; } } return result; }
ma_init_alloc_root: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x10],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],0x20 MOV RCX,qword ptr [RBP + -0x10] SUB RCX,0x8 SUB RCX,0x18 ADD RCX,0x8 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x28],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x2c],0x0 CMP qword ptr [RBP + -0x18],0x0 JZ 0x00128ab8 MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x18 CALL 0x001135c0 MOV RCX,qword ptr [RBP + -0x8] MOV qword ptr [RCX + 0x10],RAX MOV RCX,qword ptr [RBP + -0x8] MOV qword ptr [RCX],RAX CMP RAX,0x0 JZ 0x00128ab6 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x18 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RAX],0x0 LAB_00128ab6: JMP 0x00128ab8 LAB_00128ab8: ADD RSP,0x20 POP RBP RET
void ma_init_alloc_root(long *param_1,long param_2,long param_3) { void *pvVar1; param_1[2] = 0; param_1[1] = 0; *param_1 = 0; param_1[3] = 0x20; param_1[4] = param_2 + -0x18; param_1[6] = 0; *(int4 *)(param_1 + 5) = 4; *(int4 *)((long)param_1 + 0x2c) = 0; if (param_3 != 0) { pvVar1 = malloc(param_3 + 0x18); param_1[2] = (long)pvVar1; *param_1 = (long)pvVar1; if (pvVar1 != (void *)0x0) { *(long *)(*param_1 + 0x10) = param_3 + 0x18; *(long *)(*param_1 + 8) = param_3; *(int8 *)*param_1 = 0; } } return; }
21
my_coll_parser_scan_rule
eloqsql/strings/ctype-uca.c
static int my_coll_parser_scan_rule(MY_COLL_RULE_PARSER *p) { if (!my_coll_parser_scan_term(p, MY_COLL_LEXEM_RESET) || !my_coll_parser_scan_reset_sequence(p)) return 0; /* Scan the first required shift command */ if (!my_coll_parser_scan_shift(p)) return my_coll_parser_expected_error(p, MY_COLL_LEXEM_SHIFT); /* Scan the first shift sequence */ if (!my_coll_parser_scan_shift_sequence(p)) return 0; /* Scan subsequent shift rules */ while (my_coll_parser_scan_shift(p)) { if (!my_coll_parser_scan_shift_sequence(p)) return 0; } return 1; }
O0
c
my_coll_parser_scan_rule: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movl $0x4, %esi callq 0x9eb80 cmpl $0x0, %eax je 0x9eafd movq -0x10(%rbp), %rdi callq 0x9ede0 cmpl $0x0, %eax jne 0x9eb06 movl $0x0, -0x4(%rbp) jmp 0x9eb6e movq -0x10(%rbp), %rdi callq 0x9ee90 cmpl $0x0, %eax jne 0x9eb27 movq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x9eef0 movl %eax, -0x4(%rbp) jmp 0x9eb6e movq -0x10(%rbp), %rdi callq 0x9ef40 cmpl $0x0, %eax jne 0x9eb3e movl $0x0, -0x4(%rbp) jmp 0x9eb6e jmp 0x9eb40 movq -0x10(%rbp), %rdi callq 0x9ee90 cmpl $0x0, %eax je 0x9eb67 movq -0x10(%rbp), %rdi callq 0x9ef40 cmpl $0x0, %eax jne 0x9eb65 movl $0x0, -0x4(%rbp) jmp 0x9eb6e jmp 0x9eb40 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw (%rax,%rax)
my_coll_parser_scan_rule: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] mov esi, 4 call my_coll_parser_scan_term cmp eax, 0 jz short loc_9EAFD mov rdi, [rbp+var_10] call my_coll_parser_scan_reset_sequence cmp eax, 0 jnz short loc_9EB06 loc_9EAFD: mov [rbp+var_4], 0 jmp short loc_9EB6E loc_9EB06: mov rdi, [rbp+var_10] call my_coll_parser_scan_shift cmp eax, 0 jnz short loc_9EB27 mov rdi, [rbp+var_10] mov esi, 1 call my_coll_parser_expected_error mov [rbp+var_4], eax jmp short loc_9EB6E loc_9EB27: mov rdi, [rbp+var_10] call my_coll_parser_scan_shift_sequence cmp eax, 0 jnz short loc_9EB3E mov [rbp+var_4], 0 jmp short loc_9EB6E loc_9EB3E: jmp short $+2 loc_9EB40: mov rdi, [rbp+var_10] call my_coll_parser_scan_shift cmp eax, 0 jz short loc_9EB67 mov rdi, [rbp+var_10] call my_coll_parser_scan_shift_sequence cmp eax, 0 jnz short loc_9EB65 mov [rbp+var_4], 0 jmp short loc_9EB6E loc_9EB65: jmp short loc_9EB40 loc_9EB67: mov [rbp+var_4], 1 loc_9EB6E: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
long long my_coll_parser_scan_rule(long long a1) { if ( (unsigned int)my_coll_parser_scan_term(a1, 4LL) && (unsigned int)my_coll_parser_scan_reset_sequence(a1) ) { if ( (unsigned int)my_coll_parser_scan_shift(a1) ) { if ( (unsigned int)my_coll_parser_scan_shift_sequence(a1) ) { while ( (unsigned int)my_coll_parser_scan_shift(a1) ) { if ( !(unsigned int)my_coll_parser_scan_shift_sequence(a1) ) return 0; } return 1; } else { return 0; } } else { return (unsigned int)my_coll_parser_expected_error(a1, 1LL); } } else { return 0; } }
my_coll_parser_scan_rule: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x4 CALL 0x0019eb80 CMP EAX,0x0 JZ 0x0019eafd MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019ede0 CMP EAX,0x0 JNZ 0x0019eb06 LAB_0019eafd: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019eb6e LAB_0019eb06: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019ee90 CMP EAX,0x0 JNZ 0x0019eb27 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 CALL 0x0019eef0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0019eb6e LAB_0019eb27: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019ef40 CMP EAX,0x0 JNZ 0x0019eb3e MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019eb6e LAB_0019eb3e: JMP 0x0019eb40 LAB_0019eb40: MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019ee90 CMP EAX,0x0 JZ 0x0019eb67 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0019ef40 CMP EAX,0x0 JNZ 0x0019eb65 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019eb6e LAB_0019eb65: JMP 0x0019eb40 LAB_0019eb67: MOV dword ptr [RBP + -0x4],0x1 LAB_0019eb6e: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 my_coll_parser_scan_rule(int8 param_1) { int iVar1; int4 local_c; iVar1 = my_coll_parser_scan_term(param_1,4); if ((iVar1 == 0) || (iVar1 = my_coll_parser_scan_reset_sequence(param_1), iVar1 == 0)) { local_c = 0; } else { iVar1 = my_coll_parser_scan_shift(param_1); if (iVar1 == 0) { local_c = my_coll_parser_expected_error(param_1,1); } else { iVar1 = my_coll_parser_scan_shift_sequence(param_1); if (iVar1 == 0) { local_c = 0; } else { do { iVar1 = my_coll_parser_scan_shift(param_1); if (iVar1 == 0) { return 1; } iVar1 = my_coll_parser_scan_shift_sequence(param_1); } while (iVar1 != 0); local_c = 0; } } } return local_c; }
22
ggml_compute_forward_diag_mask_f32
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_diag_mask_f32( const struct ggml_compute_params * params, struct ggml_tensor * dst, const float value) { const struct ggml_tensor * src0 = dst->src[0]; const int ith = params->ith; const int nth = params->nth; const int n_past = ((int32_t *) dst->op_params)[0]; const bool inplace = src0->data == dst->data; GGML_ASSERT(n_past >= 0); if (!inplace) { if (ith == 0) { // memcpy needs to be synchronized across threads to avoid race conditions. // => do it in INIT phase GGML_ASSERT(ggml_nelements(dst) == ggml_nelements(src0)); GGML_ASSERT(ggml_is_contiguous(dst) && ggml_is_contiguous(src0)); memcpy( ((char *) dst->data), ((char *) src0->data), ggml_nbytes(dst)); } ggml_barrier(params->threadpool); } // TODO: handle transposed/permuted matrices const int n = ggml_nrows(src0); const int nc = src0->ne[0]; const int nr = src0->ne[1]; const int nz = n/nr; GGML_ASSERT( dst->nb[0] == sizeof(float)); GGML_ASSERT(src0->nb[0] == sizeof(float)); for (int k = 0; k < nz; k++) { for (int j = ith; j < nr; j += nth) { for (int i = n_past; i < nc; i++) { if (i > n_past + j) { *(float *)((char *) dst->data + k*dst->nb[2] + j*dst->nb[1] + i*dst->nb[0]) = value; } } } } }
O0
c
ggml_compute_forward_diag_mask_f32: subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) vmovss %xmm0, 0x54(%rsp) movq 0x58(%rsp), %rax movq 0x98(%rax), %rax movq %rax, 0x48(%rsp) movq 0x60(%rsp), %rax movl (%rax), %eax movl %eax, 0x44(%rsp) movq 0x60(%rsp), %rax movl 0x4(%rax), %eax movl %eax, 0x40(%rsp) movq 0x58(%rsp), %rax movl 0x54(%rax), %eax movl %eax, 0x3c(%rsp) movq 0x48(%rsp), %rax movq 0xf8(%rax), %rax movq 0x58(%rsp), %rcx cmpq 0xf8(%rcx), %rax sete %al andb $0x1, %al movb %al, 0x3b(%rsp) cmpl $0x0, 0x3c(%rsp) jge 0x30b11 leaq 0x81063(%rip), %rdi # 0xb1b5a movl $0x224b, %esi # imm = 0x224B leaq 0x810ae(%rip), %rdx # 0xb1bb1 leaq 0x81d0e(%rip), %rcx # 0xb2818 movb $0x0, %al callq 0xd030 testb $0x1, 0x3b(%rsp) jne 0x30bf7 cmpl $0x0, 0x44(%rsp) jne 0x30be9 movq 0x58(%rsp), %rdi callq 0xc9e0 movq %rax, 0x10(%rsp) movq 0x48(%rsp), %rdi callq 0xc9e0 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax je 0x30b6e leaq 0x81006(%rip), %rdi # 0xb1b5a movl $0x2251, %esi # imm = 0x2251 leaq 0x81051(%rip), %rdx # 0xb1bb1 leaq 0x8147b(%rip), %rcx # 0xb1fe2 movb $0x0, %al callq 0xd030 movq 0x58(%rsp), %rdi callq 0xc210 testb $0x1, %al jne 0x30b7e jmp 0x30b8c movq 0x48(%rsp), %rdi callq 0xc210 testb $0x1, %al jne 0x30bad leaq 0x80fc7(%rip), %rdi # 0xb1b5a movl $0x2252, %esi # imm = 0x2252 leaq 0x81012(%rip), %rdx # 0xb1bb1 leaq 0x81480(%rip), %rcx # 0xb2026 movb $0x0, %al callq 0xd030 movq 0x58(%rsp), %rax movq 0xf8(%rax), %rax movq %rax, (%rsp) movq 0x48(%rsp), %rax movq 0xf8(%rax), %rax movq %rax, 0x8(%rsp) movq 0x58(%rsp), %rdi callq 0xc0b0 movq (%rsp), %rdi movq 0x8(%rsp), %rsi movq %rax, %rdx callq 0xc7d0 movq 0x60(%rsp), %rax movq 0x18(%rax), %rdi callq 0xc050 movq 0x48(%rsp), %rdi callq 0xcae0 movl %eax, 0x34(%rsp) movq 0x48(%rsp), %rax movq 0x10(%rax), %rax movl %eax, 0x30(%rsp) movq 0x48(%rsp), %rax movq 0x18(%rax), %rax movl %eax, 0x2c(%rsp) movl 0x34(%rsp), %eax cltd idivl 0x2c(%rsp) movl %eax, 0x28(%rsp) movq 0x58(%rsp), %rax cmpq $0x4, 0x30(%rax) je 0x30c59 leaq 0x80f1b(%rip), %rdi # 0xb1b5a movl $0x2262, %esi # imm = 0x2262 leaq 0x80f66(%rip), %rdx # 0xb1bb1 leaq 0x81865(%rip), %rcx # 0xb24b7 movb $0x0, %al callq 0xd030 movq 0x48(%rsp), %rax cmpq $0x4, 0x30(%rax) je 0x30c86 leaq 0x80eee(%rip), %rdi # 0xb1b5a movl $0x2263, %esi # imm = 0x2263 leaq 0x80f39(%rip), %rdx # 0xb1bb1 leaq 0x81854(%rip), %rcx # 0xb24d3 movb $0x0, %al callq 0xd030 movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax cmpl 0x28(%rsp), %eax jge 0x30d52 movl 0x44(%rsp), %eax movl %eax, 0x20(%rsp) movl 0x20(%rsp), %eax cmpl 0x2c(%rsp), %eax jge 0x30d40 movl 0x3c(%rsp), %eax movl %eax, 0x1c(%rsp) movl 0x1c(%rsp), %eax cmpl 0x30(%rsp), %eax jge 0x30d2d movl 0x1c(%rsp), %eax movl 0x3c(%rsp), %ecx addl 0x20(%rsp), %ecx cmpl %ecx, %eax jle 0x30d1e vmovss 0x54(%rsp), %xmm0 movq 0x58(%rsp), %rax movq 0xf8(%rax), %rax movslq 0x24(%rsp), %rcx movq 0x58(%rsp), %rdx imulq 0x40(%rdx), %rcx addq %rcx, %rax movslq 0x20(%rsp), %rcx movq 0x58(%rsp), %rdx imulq 0x38(%rdx), %rcx addq %rcx, %rax movslq 0x1c(%rsp), %rcx movq 0x58(%rsp), %rdx imulq 0x30(%rdx), %rcx vmovss %xmm0, (%rax,%rcx) jmp 0x30d20 movl 0x1c(%rsp), %eax addl $0x1, %eax movl %eax, 0x1c(%rsp) jmp 0x30cba jmp 0x30d2f movl 0x40(%rsp), %eax addl 0x20(%rsp), %eax movl %eax, 0x20(%rsp) jmp 0x30ca4 jmp 0x30d42 movl 0x24(%rsp), %eax addl $0x1, %eax movl %eax, 0x24(%rsp) jmp 0x30c8e addq $0x68, %rsp retq nopw (%rax,%rax)
ggml_compute_forward_diag_mask_f32: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi vmovss [rsp+68h+var_14], xmm0 mov rax, [rsp+68h+var_10] mov rax, [rax+98h] mov [rsp+68h+var_20], rax mov rax, [rsp+68h+var_8] mov eax, [rax] mov [rsp+68h+var_24], eax mov rax, [rsp+68h+var_8] mov eax, [rax+4] mov [rsp+68h+var_28], eax mov rax, [rsp+68h+var_10] mov eax, [rax+54h] mov [rsp+68h+var_2C], eax mov rax, [rsp+68h+var_20] mov rax, [rax+0F8h] mov rcx, [rsp+68h+var_10] cmp rax, [rcx+0F8h] setz al and al, 1 mov [rsp+68h+var_2D], al cmp [rsp+68h+var_2C], 0 jge short loc_30B11 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 224Bh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNPast0; "n_past >= 0" mov al, 0 call _ggml_abort loc_30B11: test [rsp+68h+var_2D], 1 jnz loc_30BF7 cmp [rsp+68h+var_24], 0 jnz loc_30BE9 mov rdi, [rsp+68h+var_10] call _ggml_nelements mov [rsp+68h+var_58], rax mov rdi, [rsp+68h+var_20] call _ggml_nelements mov rcx, rax mov rax, [rsp+68h+var_58] cmp rax, rcx jz short loc_30B6E lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 2251h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlNelementsD; "ggml_nelements(dst) == ggml_nelements(s"... mov al, 0 call _ggml_abort loc_30B6E: mov rdi, [rsp+68h+var_10] call _ggml_is_contiguous test al, 1 jnz short loc_30B7E jmp short loc_30B8C loc_30B7E: mov rdi, [rsp+68h+var_20] call _ggml_is_contiguous test al, 1 jnz short loc_30BAD loc_30B8C: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 2252h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsContiguo_0; "ggml_is_contiguous(dst) && ggml_is_cont"... mov al, 0 call _ggml_abort loc_30BAD: mov rax, [rsp+68h+var_10] mov rax, [rax+0F8h] mov [rsp+68h+var_68], rax mov rax, [rsp+68h+var_20] mov rax, [rax+0F8h] mov [rsp+68h+var_60], rax mov rdi, [rsp+68h+var_10] call _ggml_nbytes mov rdi, [rsp+68h+var_68] mov rsi, [rsp+68h+var_60] mov rdx, rax call _memcpy loc_30BE9: mov rax, [rsp+68h+var_8] mov rdi, [rax+18h] call _ggml_barrier loc_30BF7: mov rdi, [rsp+68h+var_20] call _ggml_nrows mov [rsp+68h+var_34], eax mov rax, [rsp+68h+var_20] mov rax, [rax+10h] mov [rsp+68h+var_38], eax mov rax, [rsp+68h+var_20] mov rax, [rax+18h] mov [rsp+68h+var_3C], eax mov eax, [rsp+68h+var_34] cdq idiv [rsp+68h+var_3C] mov [rsp+68h+var_40], eax mov rax, [rsp+68h+var_10] cmp qword ptr [rax+30h], 4 jz short loc_30C59 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 2262h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstNb0SizeofFl; "dst->nb[0] == sizeof(float)" mov al, 0 call _ggml_abort loc_30C59: mov rax, [rsp+68h+var_20] cmp qword ptr [rax+30h], 4 jz short loc_30C86 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 2263h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)" mov al, 0 call _ggml_abort loc_30C86: mov [rsp+68h+var_44], 0 loc_30C8E: mov eax, [rsp+68h+var_44] cmp eax, [rsp+68h+var_40] jge loc_30D52 mov eax, [rsp+68h+var_24] mov [rsp+68h+var_48], eax loc_30CA4: mov eax, [rsp+68h+var_48] cmp eax, [rsp+68h+var_3C] jge loc_30D40 mov eax, [rsp+68h+var_2C] mov [rsp+68h+var_4C], eax loc_30CBA: mov eax, [rsp+68h+var_4C] cmp eax, [rsp+68h+var_38] jge short loc_30D2D mov eax, [rsp+68h+var_4C] mov ecx, [rsp+68h+var_2C] add ecx, [rsp+68h+var_48] cmp eax, ecx jle short loc_30D1E vmovss xmm0, [rsp+68h+var_14] mov rax, [rsp+68h+var_10] mov rax, [rax+0F8h] movsxd rcx, [rsp+68h+var_44] mov rdx, [rsp+68h+var_10] imul rcx, [rdx+40h] add rax, rcx movsxd rcx, [rsp+68h+var_48] mov rdx, [rsp+68h+var_10] imul rcx, [rdx+38h] add rax, rcx movsxd rcx, [rsp+68h+var_4C] mov rdx, [rsp+68h+var_10] imul rcx, [rdx+30h] vmovss dword ptr [rax+rcx], xmm0 loc_30D1E: jmp short $+2 loc_30D20: mov eax, [rsp+68h+var_4C] add eax, 1 mov [rsp+68h+var_4C], eax jmp short loc_30CBA loc_30D2D: jmp short $+2 loc_30D2F: mov eax, [rsp+68h+var_28] add eax, [rsp+68h+var_48] mov [rsp+68h+var_48], eax jmp loc_30CA4 loc_30D40: jmp short $+2 loc_30D42: mov eax, [rsp+68h+var_44] add eax, 1 mov [rsp+68h+var_44], eax jmp loc_30C8E loc_30D52: add rsp, 68h retn
long long ggml_compute_forward_diag_mask_f32(int *a1, long long a2, __m128 _XMM0) { long long v3; // rax long long result; // rax long long v8; // [rsp+0h] [rbp-68h] long long v9; // [rsp+8h] [rbp-60h] long long v10; // [rsp+10h] [rbp-58h] int k; // [rsp+1Ch] [rbp-4Ch] int j; // [rsp+20h] [rbp-48h] int i; // [rsp+24h] [rbp-44h] int v14; // [rsp+2Ch] [rbp-3Ch] int v15; // [rsp+30h] [rbp-38h] int v16; // [rsp+34h] [rbp-34h] bool v17; // [rsp+3Bh] [rbp-2Dh] int v18; // [rsp+3Ch] [rbp-2Ch] int v19; // [rsp+40h] [rbp-28h] int v20; // [rsp+44h] [rbp-24h] _QWORD *v21; // [rsp+48h] [rbp-20h] __asm { vmovss [rsp+68h+var_14], xmm0 } v21 = *(_QWORD **)(a2 + 152); v20 = *a1; v19 = a1[1]; v18 = *(_DWORD *)(a2 + 84); v17 = v21[31] == *(_QWORD *)(a2 + 248); if ( v18 < 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 8779LL, "GGML_ASSERT(%s) failed", "n_past >= 0"); if ( !v17 ) { if ( !v20 ) { v10 = ggml_nelements(a2); if ( v10 != ggml_nelements(v21) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 8785LL, "GGML_ASSERT(%s) failed", "ggml_nelements(dst) == ggml_nelements(src0)"); if ( (ggml_is_contiguous(a2) & 1) == 0 || (ggml_is_contiguous(v21) & 1) == 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 8786LL, "GGML_ASSERT(%s) failed", "ggml_is_contiguous(dst) && ggml_is_contiguous(src0)"); v8 = *(_QWORD *)(a2 + 248); v9 = v21[31]; v3 = ggml_nbytes(a2); memcpy(v8, v9, v3); } ggml_barrier(*((_QWORD *)a1 + 3)); } v16 = ggml_nrows(v21); v15 = v21[2]; v14 = v21[3]; if ( *(_QWORD *)(a2 + 48) != 4LL ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 8802LL, "GGML_ASSERT(%s) failed", "dst->nb[0] == sizeof(float)"); if ( v21[6] != 4LL ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 8803LL, "GGML_ASSERT(%s) failed", "src0->nb[0] == sizeof(float)"); for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= v16 / v14 ) break; for ( j = v20; j < v14; j += v19 ) { for ( k = v18; k < v15; ++k ) { if ( k > j + v18 ) { __asm { vmovss xmm0, [rsp+68h+var_14] } _RAX = *(_QWORD *)(a2 + 56) * j + *(_QWORD *)(a2 + 64) * i + *(_QWORD *)(a2 + 248); _RCX = *(_QWORD *)(a2 + 48) * k; __asm { vmovss dword ptr [rax+rcx], xmm0 } } } } } return result; }
ggml_compute_forward_diag_mask_f32: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI VMOVSS dword ptr [RSP + 0x54],XMM0 MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + 0x44],EAX MOV RAX,qword ptr [RSP + 0x60] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RSP + 0x40],EAX MOV RAX,qword ptr [RSP + 0x58] MOV EAX,dword ptr [RAX + 0x54] MOV dword ptr [RSP + 0x3c],EAX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RSP + 0x58] CMP RAX,qword ptr [RCX + 0xf8] SETZ AL AND AL,0x1 MOV byte ptr [RSP + 0x3b],AL CMP dword ptr [RSP + 0x3c],0x0 JGE 0x00130b11 LEA RDI,[0x1b1b5a] MOV ESI,0x224b LEA RDX,[0x1b1bb1] LEA RCX,[0x1b2818] MOV AL,0x0 CALL 0x0010d030 LAB_00130b11: TEST byte ptr [RSP + 0x3b],0x1 JNZ 0x00130bf7 CMP dword ptr [RSP + 0x44],0x0 JNZ 0x00130be9 MOV RDI,qword ptr [RSP + 0x58] CALL 0x0010c9e0 MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x48] CALL 0x0010c9e0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,RCX JZ 0x00130b6e LEA RDI,[0x1b1b5a] MOV ESI,0x2251 LEA RDX,[0x1b1bb1] LEA RCX,[0x1b1fe2] MOV AL,0x0 CALL 0x0010d030 LAB_00130b6e: MOV RDI,qword ptr [RSP + 0x58] CALL 0x0010c210 TEST AL,0x1 JNZ 0x00130b7e JMP 0x00130b8c LAB_00130b7e: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0010c210 TEST AL,0x1 JNZ 0x00130bad LAB_00130b8c: LEA RDI,[0x1b1b5a] MOV ESI,0x2252 LEA RDX,[0x1b1bb1] LEA RCX,[0x1b2026] MOV AL,0x0 CALL 0x0010d030 LAB_00130bad: MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0xf8] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0xf8] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x58] CALL 0x0010c0b0 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] MOV RDX,RAX CALL 0x0010c7d0 LAB_00130be9: MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX + 0x18] CALL 0x0010c050 LAB_00130bf7: MOV RDI,qword ptr [RSP + 0x48] CALL 0x0010cae0 MOV dword ptr [RSP + 0x34],EAX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x10] MOV dword ptr [RSP + 0x30],EAX MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x18] MOV dword ptr [RSP + 0x2c],EAX MOV EAX,dword ptr [RSP + 0x34] CDQ IDIV dword ptr [RSP + 0x2c] MOV dword ptr [RSP + 0x28],EAX MOV RAX,qword ptr [RSP + 0x58] CMP qword ptr [RAX + 0x30],0x4 JZ 0x00130c59 LEA RDI,[0x1b1b5a] MOV ESI,0x2262 LEA RDX,[0x1b1bb1] LEA RCX,[0x1b24b7] MOV AL,0x0 CALL 0x0010d030 LAB_00130c59: MOV RAX,qword ptr [RSP + 0x48] CMP qword ptr [RAX + 0x30],0x4 JZ 0x00130c86 LEA RDI,[0x1b1b5a] MOV ESI,0x2263 LEA RDX,[0x1b1bb1] LEA RCX,[0x1b24d3] MOV AL,0x0 CALL 0x0010d030 LAB_00130c86: MOV dword ptr [RSP + 0x24],0x0 LAB_00130c8e: MOV EAX,dword ptr [RSP + 0x24] CMP EAX,dword ptr [RSP + 0x28] JGE 0x00130d52 MOV EAX,dword ptr [RSP + 0x44] MOV dword ptr [RSP + 0x20],EAX LAB_00130ca4: MOV EAX,dword ptr [RSP + 0x20] CMP EAX,dword ptr [RSP + 0x2c] JGE 0x00130d40 MOV EAX,dword ptr [RSP + 0x3c] MOV dword ptr [RSP + 0x1c],EAX LAB_00130cba: MOV EAX,dword ptr [RSP + 0x1c] CMP EAX,dword ptr [RSP + 0x30] JGE 0x00130d2d MOV EAX,dword ptr [RSP + 0x1c] MOV ECX,dword ptr [RSP + 0x3c] ADD ECX,dword ptr [RSP + 0x20] CMP EAX,ECX JLE 0x00130d1e VMOVSS XMM0,dword ptr [RSP + 0x54] MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0xf8] MOVSXD RCX,dword ptr [RSP + 0x24] MOV RDX,qword ptr [RSP + 0x58] IMUL RCX,qword ptr [RDX + 0x40] ADD RAX,RCX MOVSXD RCX,dword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x58] IMUL RCX,qword ptr [RDX + 0x38] ADD RAX,RCX MOVSXD RCX,dword ptr [RSP + 0x1c] MOV RDX,qword ptr [RSP + 0x58] IMUL RCX,qword ptr [RDX + 0x30] VMOVSS dword ptr [RAX + RCX*0x1],XMM0 LAB_00130d1e: JMP 0x00130d20 LAB_00130d20: MOV EAX,dword ptr [RSP + 0x1c] ADD EAX,0x1 MOV dword ptr [RSP + 0x1c],EAX JMP 0x00130cba LAB_00130d2d: JMP 0x00130d2f LAB_00130d2f: MOV EAX,dword ptr [RSP + 0x40] ADD EAX,dword ptr [RSP + 0x20] MOV dword ptr [RSP + 0x20],EAX JMP 0x00130ca4 LAB_00130d40: JMP 0x00130d42 LAB_00130d42: MOV EAX,dword ptr [RSP + 0x24] ADD EAX,0x1 MOV dword ptr [RSP + 0x24],EAX JMP 0x00130c8e LAB_00130d52: ADD RSP,0x68 RET
void ggml_compute_forward_diag_mask_f32(int4 param_1,int *param_2,long param_3) { int iVar1; int iVar2; int iVar3; long lVar4; void *__dest; void *__src; int8 uVar5; int iVar6; int iVar7; long lVar8; long lVar9; ulong uVar10; size_t __n; int local_4c; int local_48; int local_44; lVar4 = *(long *)(param_3 + 0x98); iVar1 = *param_2; iVar2 = param_2[1]; iVar3 = *(int *)(param_3 + 0x54); if (iVar3 < 0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x224b,"GGML_ASSERT(%s) failed","n_past >= 0"); } if (*(long *)(lVar4 + 0xf8) != *(long *)(param_3 + 0xf8)) { if (iVar1 == 0) { lVar8 = ggml_nelements(param_3); lVar9 = ggml_nelements(lVar4); if (lVar8 != lVar9) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2251,"GGML_ASSERT(%s) failed","ggml_nelements(dst) == ggml_nelements(src0)"); } uVar10 = ggml_is_contiguous(param_3); if (((uVar10 & 1) == 0) || (uVar10 = ggml_is_contiguous(lVar4), (uVar10 & 1) == 0)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2252,"GGML_ASSERT(%s) failed", "ggml_is_contiguous(dst) && ggml_is_contiguous(src0)"); } __dest = *(void **)(param_3 + 0xf8); __src = *(void **)(lVar4 + 0xf8); __n = ggml_nbytes(param_3); memcpy(__dest,__src,__n); } ggml_barrier(*(int8 *)(param_2 + 6)); } iVar6 = ggml_nrows(lVar4); uVar5 = *(int8 *)(lVar4 + 0x10); iVar7 = (int)*(int8 *)(lVar4 + 0x18); if (*(long *)(param_3 + 0x30) != 4) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2262,"GGML_ASSERT(%s) failed","dst->nb[0] == sizeof(float)"); } if (*(long *)(lVar4 + 0x30) == 4) { for (local_44 = 0; local_48 = iVar1, local_44 < iVar6 / iVar7; local_44 = local_44 + 1) { for (; local_4c = iVar3, local_48 < iVar7; local_48 = iVar2 + local_48) { for (; local_4c < (int)uVar5; local_4c = local_4c + 1) { if (iVar3 + local_48 < local_4c) { *(int4 *) (*(long *)(param_3 + 0xf8) + (long)local_44 * *(long *)(param_3 + 0x40) + (long)local_48 * *(long *)(param_3 + 0x38) + (long)local_4c * *(long *)(param_3 + 0x30)) = param_1; } } } } return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x2263,"GGML_ASSERT(%s) failed","src0->nb[0] == sizeof(float)"); }
23
ggml_numa_init
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
void ggml_numa_init(void) { if (g_state.numa.n_nodes > 0) { fprintf(stderr, "ggml_numa_init: NUMA already initialized\n"); return; } #ifdef __linux__ struct stat st; char path[256]; int rv; // enumerate nodes while (g_state.numa.n_nodes < GGML_NUMA_MAX_NODES) { rv = snprintf(path, sizeof(path), "/sys/devices/system/node/node%u", g_state.numa.n_nodes); GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path)); if (stat(path, &st) != 0) { break; } ++g_state.numa.n_nodes; } // enumerate CPUs while (g_state.numa.total_cpus < GGML_NUMA_MAX_CPUS) { rv = snprintf(path, sizeof(path), "/sys/devices/system/cpu/cpu%u", g_state.numa.total_cpus); GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path)); if (stat(path, &st) != 0) { break; } ++g_state.numa.total_cpus; } GGML_PRINT_DEBUG("found %u numa nodes, %u CPUs\n", g_state.numa.n_nodes, g_state.numa.total_cpus); if (g_state.numa.n_nodes < 1 || g_state.numa.total_cpus < 1) { g_state.numa.n_nodes = 0; return; } for (uint32_t n = 0; n < g_state.numa.n_nodes; ++n) { struct ggml_numa_node * node = &g_state.numa.nodes[n]; GGML_PRINT_DEBUG("CPUs on node %u:", n); node->n_cpus = 0; for (uint32_t c = 0; c < g_state.numa.total_cpus; ++c) { rv = snprintf(path, sizeof(path), "/sys/devices/system/node/node%u/cpu%u", n, c); GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path)); if (stat(path, &st) == 0) { node->cpus[node->n_cpus++] = c; GGML_PRINT_DEBUG(" %u", c); } } GGML_PRINT_DEBUG("\n"); } if (ggml_is_numa()) { FILE *fptr = fopen("/proc/sys/kernel/numa_balancing", "r"); if (fptr != NULL) { char buf[42]; if (fgets(buf, sizeof(buf), fptr) && strncmp(buf, "0\n", sizeof(buf)) != 0) { GGML_PRINT("WARNING: /proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance\n"); } fclose(fptr); } } #else // TODO #endif }
O0
c
ggml_numa_init: subq $0x1e8, %rsp # imm = 0x1E8 cmpl $0x0, 0x1455a2(%rip) # 0x25ffa0 jbe 0x11aa1d movq 0xbd5a1(%rip), %rax # 0x1d7fa8 movq (%rax), %rdi leaq 0x6ecca(%rip), %rsi # 0x1896db movb $0x0, %al callq 0xbae0 jmp 0x11ad63 jmp 0x11aa1f cmpl $0x8, 0x14557a(%rip) # 0x25ffa0 jae 0x11aad4 leaq 0x50(%rsp), %rdi movl 0x145569(%rip), %ecx # 0x25ffa0 movl $0x100, %esi # imm = 0x100 leaq 0x6ecc2(%rip), %rdx # 0x189705 movb $0x0, %al callq 0xbbf0 movl %eax, 0x4c(%rsp) cmpl $0x0, 0x4c(%rsp) jle 0x11aa61 movl 0x4c(%rsp), %eax cmpq $0x100, %rax # imm = 0x100 jb 0x11aaa5 movq 0xbd4c0(%rip), %rax # 0x1d7f28 movq (%rax), %rdi callq 0xb8e0 movq 0xbd531(%rip), %rax # 0x1d7fa8 movq (%rax), %rdi leaq 0x65199(%rip), %rsi # 0x17fc1a leaq 0x6ebe6(%rip), %rdx # 0x18966e movl $0x763, %ecx # imm = 0x763 leaq 0x6ec91(%rip), %r8 # 0x189725 movb $0x0, %al callq 0xbae0 callq 0x11a4f0 callq 0xb3a0 jmp 0x11aaa7 leaq 0x50(%rsp), %rdi leaq 0x158(%rsp), %rsi callq 0xb6b0 cmpl $0x0, %eax je 0x11aac0 jmp 0x11aad4 movl 0x1454da(%rip), %eax # 0x25ffa0 addl $0x1, %eax movl %eax, 0x1454d1(%rip) # 0x25ffa0 jmp 0x11aa1f jmp 0x11aad6 cmpl $0x200, 0x1454c4(%rip) # imm = 0x200 jae 0x11ab8e leaq 0x50(%rsp), %rdi movl 0x1454b3(%rip), %ecx # 0x25ffa4 movl $0x100, %esi # imm = 0x100 leaq 0x6ec4e(%rip), %rdx # 0x18974b movb $0x0, %al callq 0xbbf0 movl %eax, 0x4c(%rsp) cmpl $0x0, 0x4c(%rsp) jle 0x11ab1b movl 0x4c(%rsp), %eax cmpq $0x100, %rax # imm = 0x100 jb 0x11ab5f movq 0xbd406(%rip), %rax # 0x1d7f28 movq (%rax), %rdi callq 0xb8e0 movq 0xbd477(%rip), %rax # 0x1d7fa8 movq (%rax), %rdi leaq 0x650df(%rip), %rsi # 0x17fc1a leaq 0x6eb2c(%rip), %rdx # 0x18966e movl $0x76b, %ecx # imm = 0x76B leaq 0x6ebd7(%rip), %r8 # 0x189725 movb $0x0, %al callq 0xbae0 callq 0x11a4f0 callq 0xb3a0 jmp 0x11ab61 leaq 0x50(%rsp), %rdi leaq 0x158(%rsp), %rsi callq 0xb6b0 cmpl $0x0, %eax je 0x11ab7a jmp 0x11ab8e movl 0x145424(%rip), %eax # 0x25ffa4 addl $0x1, %eax movl %eax, 0x14541b(%rip) # 0x25ffa4 jmp 0x11aad6 cmpl $0x1, 0x14540b(%rip) # 0x25ffa0 jb 0x11aba0 cmpl $0x1, 0x145406(%rip) # 0x25ffa4 jae 0x11abaf movl $0x0, 0x1453f6(%rip) # 0x25ffa0 jmp 0x11ad63 movl $0x0, 0x48(%rsp) movl 0x48(%rsp), %eax cmpl 0x1453df(%rip), %eax # 0x25ffa0 jae 0x11aced movl 0x48(%rsp), %eax movl %eax, %ecx leaq 0x13fbac(%rip), %rax # 0x25a780 addq $0x1800, %rax # imm = 0x1800 imulq $0x804, %rcx, %rcx # imm = 0x804 addq %rcx, %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movl $0x0, 0x800(%rax) movl $0x0, 0x3c(%rsp) movl 0x3c(%rsp), %eax cmpl 0x14539a(%rip), %eax # 0x25ffa4 jae 0x11acdb leaq 0x50(%rsp), %rdi movl 0x48(%rsp), %ecx movl 0x3c(%rsp), %r8d movl $0x100, %esi # imm = 0x100 leaq 0x6eb3f(%rip), %rdx # 0x189769 movb $0x0, %al callq 0xbbf0 movl %eax, 0x4c(%rsp) cmpl $0x0, 0x4c(%rsp) jle 0x11ac48 movl 0x4c(%rsp), %eax cmpq $0x100, %rax # imm = 0x100 jb 0x11ac8c movq 0xbd2d9(%rip), %rax # 0x1d7f28 movq (%rax), %rdi callq 0xb8e0 movq 0xbd34a(%rip), %rax # 0x1d7fa8 movq (%rax), %rdi leaq 0x64fb2(%rip), %rsi # 0x17fc1a leaq 0x6e9ff(%rip), %rdx # 0x18966e movl $0x77d, %ecx # imm = 0x77D leaq 0x6eaaa(%rip), %r8 # 0x189725 movb $0x0, %al callq 0xbae0 callq 0x11a4f0 callq 0xb3a0 jmp 0x11ac8e leaq 0x50(%rsp), %rdi leaq 0x158(%rsp), %rsi callq 0xb6b0 cmpl $0x0, %eax jne 0x11acc9 movl 0x3c(%rsp), %edx movq 0x40(%rsp), %rax movq 0x40(%rsp), %rsi movl 0x800(%rsi), %ecx movl %ecx, %edi addl $0x1, %edi movl %edi, 0x800(%rsi) movl %ecx, %ecx movl %edx, (%rax,%rcx,4) jmp 0x11accb movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0x11ac00 jmp 0x11acdd movl 0x48(%rsp), %eax addl $0x1, %eax movl %eax, 0x48(%rsp) jmp 0x11abb7 callq 0x11ad70 testb $0x1, %al jne 0x11acf8 jmp 0x11ad63 leaq 0x6ea90(%rip), %rdi # 0x18978f leaq 0x69db9(%rip), %rsi # 0x184abf callq 0xb8f0 movq %rax, 0x30(%rsp) cmpq $0x0, 0x30(%rsp) je 0x11ad61 movq %rsp, %rdi movq 0x30(%rsp), %rdx movl $0x2a, %esi callq 0xbbc0 cmpq $0x0, %rax je 0x11ad57 movq %rsp, %rdi leaq 0x63abd(%rip), %rsi # 0x17e7f7 movl $0x2a, %edx callq 0xb310 cmpl $0x0, %eax je 0x11ad57 leaq 0x6ea5f(%rip), %rdi # 0x1897af movb $0x0, %al callq 0xb0a0 movq 0x30(%rsp), %rdi callq 0xb770 jmp 0x11ad63 addq $0x1e8, %rsp # imm = 0x1E8 retq nopl (%rax,%rax)
ggml_numa_init: sub rsp, 1E8h cmp cs:dword_25FFA0, 0 jbe short loc_11AA1D mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aGgmlNumaInitNu; "ggml_numa_init: NUMA already initialize"... mov al, 0 call _fprintf jmp loc_11AD63 loc_11AA1D: jmp short $+2 loc_11AA1F: cmp cs:dword_25FFA0, 8 jnb loc_11AAD4 lea rdi, [rsp+1E8h+var_198] mov ecx, cs:dword_25FFA0 mov esi, 100h lea rdx, aSysDevicesSyst_0; "/sys/devices/system/node/node%u" mov al, 0 call _snprintf mov [rsp+1E8h+var_19C], eax cmp [rsp+1E8h+var_19C], 0 jle short loc_11AA61 mov eax, [rsp+1E8h+var_19C] cmp rax, 100h jb short loc_11AAA5 loc_11AA61: 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"... mov ecx, 763h lea r8, aRv0UnsignedRvS; "rv > 0 && (unsigned)rv < sizeof(path)" mov al, 0 call _fprintf call ggml_print_backtrace call _abort loc_11AAA5: jmp short $+2 loc_11AAA7: lea rdi, [rsp+1E8h+var_198] lea rsi, [rsp+1E8h+var_90] call _stat cmp eax, 0 jz short loc_11AAC0 jmp short loc_11AAD4 loc_11AAC0: mov eax, cs:dword_25FFA0 add eax, 1 mov cs:dword_25FFA0, eax jmp loc_11AA1F loc_11AAD4: jmp short $+2 loc_11AAD6: cmp cs:dword_25FFA4, 200h jnb loc_11AB8E lea rdi, [rsp+1E8h+var_198] mov ecx, cs:dword_25FFA4 mov esi, 100h lea rdx, aSysDevicesSyst_1; "/sys/devices/system/cpu/cpu%u" mov al, 0 call _snprintf mov [rsp+1E8h+var_19C], eax cmp [rsp+1E8h+var_19C], 0 jle short loc_11AB1B mov eax, [rsp+1E8h+var_19C] cmp rax, 100h jb short loc_11AB5F loc_11AB1B: 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"... mov ecx, 76Bh lea r8, aRv0UnsignedRvS; "rv > 0 && (unsigned)rv < sizeof(path)" mov al, 0 call _fprintf call ggml_print_backtrace call _abort loc_11AB5F: jmp short $+2 loc_11AB61: lea rdi, [rsp+1E8h+var_198] lea rsi, [rsp+1E8h+var_90] call _stat cmp eax, 0 jz short loc_11AB7A jmp short loc_11AB8E loc_11AB7A: mov eax, cs:dword_25FFA4 add eax, 1 mov cs:dword_25FFA4, eax jmp loc_11AAD6 loc_11AB8E: cmp cs:dword_25FFA0, 1 jb short loc_11ABA0 cmp cs:dword_25FFA4, 1 jnb short loc_11ABAF loc_11ABA0: mov cs:dword_25FFA0, 0 jmp loc_11AD63 loc_11ABAF: mov [rsp+1E8h+var_1A0], 0 loc_11ABB7: mov eax, [rsp+1E8h+var_1A0] cmp eax, cs:dword_25FFA0 jnb loc_11ACED mov eax, [rsp+1E8h+var_1A0] mov ecx, eax lea rax, g_state add rax, 1800h imul rcx, 804h add rax, rcx mov [rsp+1E8h+var_1A8], rax mov rax, [rsp+1E8h+var_1A8] mov dword ptr [rax+800h], 0 mov [rsp+1E8h+var_1AC], 0 loc_11AC00: mov eax, [rsp+1E8h+var_1AC] cmp eax, cs:dword_25FFA4 jnb loc_11ACDB lea rdi, [rsp+1E8h+var_198] mov ecx, [rsp+1E8h+var_1A0] mov r8d, [rsp+1E8h+var_1AC] mov esi, 100h lea rdx, aSysDevicesSyst_2; "/sys/devices/system/node/node%u/cpu%u" mov al, 0 call _snprintf mov [rsp+1E8h+var_19C], eax cmp [rsp+1E8h+var_19C], 0 jle short loc_11AC48 mov eax, [rsp+1E8h+var_19C] cmp rax, 100h jb short loc_11AC8C loc_11AC48: 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"... mov ecx, 77Dh lea r8, aRv0UnsignedRvS; "rv > 0 && (unsigned)rv < sizeof(path)" mov al, 0 call _fprintf call ggml_print_backtrace call _abort loc_11AC8C: jmp short $+2 loc_11AC8E: lea rdi, [rsp+1E8h+var_198] lea rsi, [rsp+1E8h+var_90] call _stat cmp eax, 0 jnz short loc_11ACC9 mov edx, [rsp+1E8h+var_1AC] mov rax, [rsp+1E8h+var_1A8] mov rsi, [rsp+1E8h+var_1A8] mov ecx, [rsi+800h] mov edi, ecx add edi, 1 mov [rsi+800h], edi mov ecx, ecx mov [rax+rcx*4], edx loc_11ACC9: jmp short $+2 loc_11ACCB: mov eax, [rsp+1E8h+var_1AC] add eax, 1 mov [rsp+1E8h+var_1AC], eax jmp loc_11AC00 loc_11ACDB: jmp short $+2 loc_11ACDD: mov eax, [rsp+1E8h+var_1A0] add eax, 1 mov [rsp+1E8h+var_1A0], eax jmp loc_11ABB7 loc_11ACED: call ggml_is_numa test al, 1 jnz short loc_11ACF8 jmp short loc_11AD63 loc_11ACF8: lea rdi, aProcSysKernelN; "/proc/sys/kernel/numa_balancing" lea rsi, aInvalidStringC_12+4Ch; "r" call _fopen mov [rsp+1E8h+var_1B8], rax cmp [rsp+1E8h+var_1B8], 0 jz short loc_11AD61 mov rdi, rsp mov rdx, [rsp+1E8h+var_1B8] mov esi, 2Ah ; '*' call _fgets cmp rax, 0 jz short loc_11AD57 mov rdi, rsp lea rsi, aErrorTheSample+2Dh; "0\n" mov edx, 2Ah ; '*' call _strncmp cmp eax, 0 jz short loc_11AD57 lea rdi, aWarningProcSys; "WARNING: /proc/sys/kernel/numa_balancin"... mov al, 0 call _printf loc_11AD57: mov rdi, [rsp+1E8h+var_1B8] call _fclose loc_11AD61: jmp short $+2 loc_11AD63: add rsp, 1E8h retn
void ggml_numa_init() { long long v0; // rdi long long v1; // rdi long long v2; // rdi unsigned int v3; // edx char *v4; // rax int v5; // ecx _BYTE v6[48]; // [rsp+0h] [rbp-1E8h] BYREF long long v7; // [rsp+30h] [rbp-1B8h] unsigned int j; // [rsp+3Ch] [rbp-1ACh] char *v9; // [rsp+40h] [rbp-1A8h] unsigned int i; // [rsp+48h] [rbp-1A0h] int v11; // [rsp+4Ch] [rbp-19Ch] _BYTE v12[264]; // [rsp+50h] [rbp-198h] BYREF _BYTE v13[144]; // [rsp+158h] [rbp-90h] BYREF if ( dword_25FFA0 ) { fprintf(stderr, "ggml_numa_init: NUMA already initialized\n"); } else { while ( (unsigned int)dword_25FFA0 < 8 ) { v11 = snprintf(v12, 256LL, "/sys/devices/system/node/node%u", dword_25FFA0); if ( v11 <= 0 || (unsigned int)v11 >= 0x100uLL ) { fflush(stdout); v0 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 1891, "rv > 0 && (unsigned)rv < sizeof(path)"); ggml_print_backtrace(); abort(v0); } if ( (unsigned int)stat(v12, v13) ) break; ++dword_25FFA0; } while ( (unsigned int)dword_25FFA4 < 0x200 ) { v11 = snprintf(v12, 256LL, "/sys/devices/system/cpu/cpu%u", dword_25FFA4); if ( v11 <= 0 || (unsigned int)v11 >= 0x100uLL ) { fflush(stdout); v1 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 1899, "rv > 0 && (unsigned)rv < sizeof(path)"); ggml_print_backtrace(); abort(v1); } if ( (unsigned int)stat(v12, v13) ) break; ++dword_25FFA4; } if ( dword_25FFA0 && dword_25FFA4 ) { for ( i = 0; i < dword_25FFA0; ++i ) { v9 = (char *)&g_state + 2052 * i + 6144; *((_DWORD *)v9 + 512) = 0; for ( j = 0; j < dword_25FFA4; ++j ) { v11 = snprintf(v12, 256LL, "/sys/devices/system/node/node%u/cpu%u", i, j); if ( v11 <= 0 || (unsigned int)v11 >= 0x100uLL ) { fflush(stdout); v2 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 1917, "rv > 0 && (unsigned)rv < sizeof(path)"); ggml_print_backtrace(); abort(v2); } if ( !(unsigned int)stat(v12, v13) ) { v3 = j; v4 = v9; v5 = *((_DWORD *)v9 + 512); *((_DWORD *)v9 + 512) = v5 + 1; *(_DWORD *)&v4[4 * v5] = v3; } } } if ( (ggml_is_numa() & 1) != 0 ) { v7 = fopen("/proc/sys/kernel/numa_balancing", "r"); if ( v7 ) { if ( fgets(v6, 42LL, v7) && (unsigned int)strncmp(v6, "0\n", 42LL) ) printf("WARNING: /proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance\n"); fclose(v7); } } } else { dword_25FFA0 = 0; } } }
24
ggml_numa_init
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
void ggml_numa_init(void) { if (g_state.numa.n_nodes > 0) { fprintf(stderr, "ggml_numa_init: NUMA already initialized\n"); return; } #ifdef __linux__ struct stat st; char path[256]; int rv; // enumerate nodes while (g_state.numa.n_nodes < GGML_NUMA_MAX_NODES) { rv = snprintf(path, sizeof(path), "/sys/devices/system/node/node%u", g_state.numa.n_nodes); GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path)); if (stat(path, &st) != 0) { break; } ++g_state.numa.n_nodes; } // enumerate CPUs while (g_state.numa.total_cpus < GGML_NUMA_MAX_CPUS) { rv = snprintf(path, sizeof(path), "/sys/devices/system/cpu/cpu%u", g_state.numa.total_cpus); GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path)); if (stat(path, &st) != 0) { break; } ++g_state.numa.total_cpus; } GGML_PRINT_DEBUG("found %u numa nodes, %u CPUs\n", g_state.numa.n_nodes, g_state.numa.total_cpus); if (g_state.numa.n_nodes < 1 || g_state.numa.total_cpus < 1) { g_state.numa.n_nodes = 0; return; } for (uint32_t n = 0; n < g_state.numa.n_nodes; ++n) { struct ggml_numa_node * node = &g_state.numa.nodes[n]; GGML_PRINT_DEBUG("CPUs on node %u:", n); node->n_cpus = 0; for (uint32_t c = 0; c < g_state.numa.total_cpus; ++c) { rv = snprintf(path, sizeof(path), "/sys/devices/system/node/node%u/cpu%u", n, c); GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path)); if (stat(path, &st) == 0) { node->cpus[node->n_cpus++] = c; GGML_PRINT_DEBUG(" %u", c); } } GGML_PRINT_DEBUG("\n"); } if (ggml_is_numa()) { FILE *fptr = fopen("/proc/sys/kernel/numa_balancing", "r"); if (fptr != NULL) { char buf[42]; if (fgets(buf, sizeof(buf), fptr) && strncmp(buf, "0\n", sizeof(buf)) != 0) { GGML_PRINT("WARNING: /proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance\n"); } fclose(fptr); } } #else // TODO #endif }
O1
c
ggml_numa_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1c8, %rsp # imm = 0x1C8 cmpl $0x0, 0xf04f7(%rip) # 0x17e270 jne 0x8df9c movl 0xf04eb(%rip), %ecx # 0x17e270 cmpl $0x7, %ecx ja 0x8dddf leaq 0x37dac(%rip), %rbx # 0xc5b3d leaq 0xc0(%rsp), %r14 leaq 0x30(%rsp), %r15 movl $0x100, %esi # imm = 0x100 movq %r14, %rdi movq %rbx, %rdx xorl %eax, %eax callq 0xa9d0 decl %eax cmpl $0xff, %eax jae 0x8dfa8 movq %r14, %rdi movq %r15, %rsi callq 0xa540 testl %eax, %eax jne 0x8dddf movl 0xf049e(%rip), %ecx # 0x17e270 incl %ecx movl %ecx, 0xf0496(%rip) # 0x17e270 cmpl $0x8, %ecx jb 0x8dd9e movl 0xf048f(%rip), %ecx # 0x17e274 cmpl $0x1ff, %ecx # imm = 0x1FF ja 0x8de45 leaq 0x37d8f(%rip), %rbx # 0xc5b83 leaq 0xc0(%rsp), %r14 leaq 0x30(%rsp), %r15 movl $0x100, %esi # imm = 0x100 movq %r14, %rdi movq %rbx, %rdx xorl %eax, %eax callq 0xa9d0 decl %eax cmpl $0xff, %eax jae 0x8dfad movq %r14, %rdi movq %r15, %rsi callq 0xa540 testl %eax, %eax jne 0x8de45 movl 0xf043f(%rip), %ecx # 0x17e274 incl %ecx movl %ecx, 0xf0437(%rip) # 0x17e274 cmpl $0x200, %ecx # imm = 0x200 jb 0x8de01 cmpl $0x0, 0xf0424(%rip) # 0x17e270 je 0x8df80 cmpl $0x0, 0xf041b(%rip) # 0x17e274 je 0x8df80 cmpl $0x0, 0xf040a(%rip) # 0x17e270 je 0x8df8a leaq 0x37d2e(%rip), %rbx # 0xc5ba1 leaq 0xc0(%rsp), %r14 leaq 0x30(%rsp), %r15 xorl %r12d, %r12d movq %r12, %rax shlq $0xb, %rax leaq (%rax,%r12,4), %rax leaq 0xeabbb(%rip), %rcx # 0x178a50 movl $0x0, 0x2000(%rcx,%rax) cmpl $0x0, 0xf03cd(%rip) # 0x17e274 je 0x8df11 leaq 0xeaba0(%rip), %rcx # 0x178a50 leaq (%rcx,%rax), %r13 addq $0x1800, %r13 # imm = 0x1800 xorl %ebp, %ebp movl $0x100, %esi # imm = 0x100 movq %r14, %rdi movq %rbx, %rdx movl %r12d, %ecx movl %ebp, %r8d xorl %eax, %eax callq 0xa9d0 decl %eax cmpl $0xff, %eax jae 0x8dfa3 movq %r14, %rdi movq %r15, %rsi callq 0xa540 testl %eax, %eax jne 0x8df07 movl 0x800(%r13), %eax leal 0x1(%rax), %ecx movl %ecx, 0x800(%r13) movl %ebp, (%r13,%rax,4) incl %ebp cmpl 0xf0365(%rip), %ebp # 0x17e274 jb 0x8debd incq %r12 movl 0xf0356(%rip), %eax # 0x17e270 cmpq %rax, %r12 jb 0x8de83 cmpl $0x1, %eax jbe 0x8df8a leaq 0x37c98(%rip), %rdi # 0xc5bc7 leaq 0x34ab9(%rip), %rsi # 0xc29ef callq 0xa6f0 testq %rax, %rax je 0x8df8a movq %rax, %rbx movq %rsp, %rdi movl $0x2a, %esi movq %rax, %rdx callq 0xa9a0 testq %rax, %rax je 0x8df76 movl $0xa30, %eax # imm = 0xA30 xorl (%rsp), %eax movzbl 0x2(%rsp), %ecx orw %ax, %cx je 0x8df76 leaq 0x3a748(%rip), %rdi # 0xc86b9 callq 0xa940 movq %rbx, %rdi callq 0xa5c0 jmp 0x8df8a movl $0x0, 0xf02e6(%rip) # 0x17e270 addq $0x1c8, %rsp # imm = 0x1C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xc0af jmp 0x8df8a callq 0xc155 callq 0xc0cb callq 0xc110
ggml_numa_init: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1C8h cmp cs:dword_17E270, 0 jnz loc_8DF9C mov ecx, cs:dword_17E270 cmp ecx, 7 ja short loc_8DDDF lea rbx, aSysDevicesSyst_0; "/sys/devices/system/node/node%u" lea r14, [rsp+1F8h+var_138] lea r15, [rsp+1F8h+var_1C8] loc_8DD9E: mov esi, 100h mov rdi, r14 mov rdx, rbx xor eax, eax call _snprintf dec eax cmp eax, 0FFh jnb loc_8DFA8 mov rdi, r14 mov rsi, r15 call _stat test eax, eax jnz short loc_8DDDF mov ecx, cs:dword_17E270 inc ecx mov cs:dword_17E270, ecx cmp ecx, 8 jb short loc_8DD9E loc_8DDDF: mov ecx, cs:dword_17E274 cmp ecx, 1FFh ja short loc_8DE45 lea rbx, aSysDevicesSyst_1; "/sys/devices/system/cpu/cpu%u" lea r14, [rsp+1F8h+var_138] lea r15, [rsp+1F8h+var_1C8] loc_8DE01: mov esi, 100h mov rdi, r14 mov rdx, rbx xor eax, eax call _snprintf dec eax cmp eax, 0FFh jnb loc_8DFAD mov rdi, r14 mov rsi, r15 call _stat test eax, eax jnz short loc_8DE45 mov ecx, cs:dword_17E274 inc ecx mov cs:dword_17E274, ecx cmp ecx, 200h jb short loc_8DE01 loc_8DE45: cmp cs:dword_17E270, 0 jz loc_8DF80 cmp cs:dword_17E274, 0 jz loc_8DF80 cmp cs:dword_17E270, 0 jz loc_8DF8A lea rbx, aSysDevicesSyst_2; "/sys/devices/system/node/node%u/cpu%u" lea r14, [rsp+1F8h+var_138] lea r15, [rsp+1F8h+var_1C8] xor r12d, r12d loc_8DE83: mov rax, r12 shl rax, 0Bh lea rax, [rax+r12*4] lea rcx, g_state mov dword ptr [rcx+rax+2000h], 0 cmp cs:dword_17E274, 0 jz short loc_8DF11 lea rcx, g_state lea r13, [rcx+rax] add r13, 1800h xor ebp, ebp loc_8DEBD: mov esi, 100h mov rdi, r14 mov rdx, rbx mov ecx, r12d mov r8d, ebp xor eax, eax call _snprintf dec eax cmp eax, 0FFh jnb loc_8DFA3 mov rdi, r14 mov rsi, r15 call _stat test eax, eax jnz short loc_8DF07 mov eax, [r13+800h] lea ecx, [rax+1] mov [r13+800h], ecx mov [r13+rax*4+0], ebp loc_8DF07: inc ebp cmp ebp, cs:dword_17E274 jb short loc_8DEBD loc_8DF11: inc r12 mov eax, cs:dword_17E270 cmp r12, rax jb loc_8DE83 cmp eax, 1 jbe short loc_8DF8A lea rdi, aProcSysKernelN; "/proc/sys/kernel/numa_balancing" lea rsi, aInvalidStringC_22+4Ch; "r" call _fopen test rax, rax jz short loc_8DF8A mov rbx, rax mov rdi, rsp mov esi, 2Ah ; '*' mov rdx, rax call _fgets test rax, rax jz short loc_8DF76 mov eax, 0A30h xor eax, [rsp+1F8h+var_1F8] movzx ecx, byte ptr [rsp+1F8h+var_1F8+2] or cx, ax jz short loc_8DF76 lea rdi, aWarningProcSys; "WARNING: /proc/sys/kernel/numa_balancin"... call _puts loc_8DF76: mov rdi, rbx call _fclose jmp short loc_8DF8A loc_8DF80: mov cs:dword_17E270, 0 loc_8DF8A: add rsp, 1C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8DF9C: call ggml_numa_init_cold_1 jmp short loc_8DF8A loc_8DFA3: call ggml_numa_init_cold_4 loc_8DFA8: call ggml_numa_init_cold_2 loc_8DFAD: call ggml_numa_init_cold_3
long long ggml_numa_init() { unsigned int i; // ecx long long result; // rax unsigned int v2; // ecx unsigned long long v3; // r12 unsigned int v4; // ebp long long v5; // rax long long v6; // rbx unsigned __int16 v7; // [rsp+0h] [rbp-1F8h] BYREF unsigned __int8 v8; // [rsp+2h] [rbp-1F6h] _BYTE v9[144]; // [rsp+30h] [rbp-1C8h] BYREF _BYTE v10[312]; // [rsp+C0h] [rbp-138h] BYREF if ( dword_17E270 ) return ggml_numa_init_cold_1(); for ( i = 0; i < 8; dword_17E270 = i ) { if ( (unsigned int)snprintf(v10, 256LL, "/sys/devices/system/node/node%u", i) - 1 >= 0xFF ) ggml_numa_init_cold_2(); result = stat(v10, v9); if ( (_DWORD)result ) break; i = dword_17E270 + 1; } v2 = dword_17E274; if ( (unsigned int)dword_17E274 <= 0x1FF ) { do { if ( (unsigned int)snprintf(v10, 256LL, "/sys/devices/system/cpu/cpu%u", v2) - 1 >= 0xFF ) ggml_numa_init_cold_3(); result = stat(v10, v9); if ( (_DWORD)result ) break; v2 = dword_17E274 + 1; dword_17E274 = v2; } while ( v2 < 0x200 ); } if ( dword_17E270 && dword_17E274 ) { if ( dword_17E270 ) { v3 = 0LL; do { g_state[513 * v3 + 2048] = 0; if ( dword_17E274 ) { v4 = 0; do { if ( (unsigned int)snprintf(v10, 256LL, "/sys/devices/system/node/node%u/cpu%u", v3, v4) - 1 >= 0xFF ) ggml_numa_init_cold_4(); if ( !(unsigned int)stat(v10, v9) ) { v5 = g_state[513 * v3 + 2048]; g_state[513 * v3 + 2048] = v5 + 1; g_state[513 * v3 + 1536 + v5] = v4; } ++v4; } while ( v4 < dword_17E274 ); } ++v3; result = (unsigned int)dword_17E270; } while ( v3 < (unsigned int)dword_17E270 ); if ( (unsigned int)dword_17E270 > 1 ) { result = fopen("/proc/sys/kernel/numa_balancing", "r"); if ( result ) { v6 = result; if ( fgets(&v7, 42LL, result) ) { if ( v7 ^ 0xA30 | v8 ) puts("WARNING: /proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance"); } return fclose(v6); } } } } else { dword_17E270 = 0; } return result; }
25
ggml_numa_init
7CodeWizard[P]stablediffusion/ggml/src/ggml.c
void ggml_numa_init(void) { if (g_state.numa.n_nodes > 0) { fprintf(stderr, "ggml_numa_init: NUMA already initialized\n"); return; } #ifdef __linux__ struct stat st; char path[256]; int rv; // enumerate nodes while (g_state.numa.n_nodes < GGML_NUMA_MAX_NODES) { rv = snprintf(path, sizeof(path), "/sys/devices/system/node/node%u", g_state.numa.n_nodes); GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path)); if (stat(path, &st) != 0) { break; } ++g_state.numa.n_nodes; } // enumerate CPUs while (g_state.numa.total_cpus < GGML_NUMA_MAX_CPUS) { rv = snprintf(path, sizeof(path), "/sys/devices/system/cpu/cpu%u", g_state.numa.total_cpus); GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path)); if (stat(path, &st) != 0) { break; } ++g_state.numa.total_cpus; } GGML_PRINT_DEBUG("found %u numa nodes, %u CPUs\n", g_state.numa.n_nodes, g_state.numa.total_cpus); if (g_state.numa.n_nodes < 1 || g_state.numa.total_cpus < 1) { g_state.numa.n_nodes = 0; return; } for (uint32_t n = 0; n < g_state.numa.n_nodes; ++n) { struct ggml_numa_node * node = &g_state.numa.nodes[n]; GGML_PRINT_DEBUG("CPUs on node %u:", n); node->n_cpus = 0; for (uint32_t c = 0; c < g_state.numa.total_cpus; ++c) { rv = snprintf(path, sizeof(path), "/sys/devices/system/node/node%u/cpu%u", n, c); GGML_ASSERT(rv > 0 && (unsigned)rv < sizeof(path)); if (stat(path, &st) == 0) { node->cpus[node->n_cpus++] = c; GGML_PRINT_DEBUG(" %u", c); } } GGML_PRINT_DEBUG("\n"); } if (ggml_is_numa()) { FILE *fptr = fopen("/proc/sys/kernel/numa_balancing", "r"); if (fptr != NULL) { char buf[42]; if (fgets(buf, sizeof(buf), fptr) && strncmp(buf, "0\n", sizeof(buf)) != 0) { GGML_PRINT("WARNING: /proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance\n"); } fclose(fptr); } } #else // TODO #endif }
O2
c
ggml_numa_init: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1c8, %rsp # imm = 0x1C8 cmpl $0x0, 0xf5ae9(%rip) # 0x15d280 jne 0x67992 leaq 0x3a171(%rip), %rbx # 0xa1915 leaq 0xc0(%rsp), %r14 leaq 0x30(%rsp), %r15 xorl %ecx, %ecx cmpl $0x7, %ecx ja 0x677f6 movl $0x100, %esi # imm = 0x100 movq %r14, %rdi movq %rbx, %rdx xorl %eax, %eax callq 0xa9d0 decl %eax cmpl $0xff, %eax jae 0x67a03 movq %r14, %rdi movq %r15, %rsi callq 0xa550 testl %eax, %eax jne 0x677f6 movl 0xf5a94(%rip), %ecx # 0x15d280 incl %ecx movl %ecx, 0xf5a8c(%rip) # 0x15d280 jmp 0x677b3 movl 0xf5a88(%rip), %ecx # 0x15d284 leaq 0x3a158(%rip), %rbx # 0xa195b leaq 0xc0(%rsp), %r14 leaq 0x30(%rsp), %r15 cmpl $0x1ff, %ecx # imm = 0x1FF ja 0x67856 movl $0x100, %esi # imm = 0x100 movq %r14, %rdi movq %rbx, %rdx xorl %eax, %eax callq 0xa9d0 decl %eax cmpl $0xff, %eax jae 0x67a38 movq %r14, %rdi movq %r15, %rsi callq 0xa550 movl 0xf5a3c(%rip), %ecx # 0x15d284 testl %eax, %eax jne 0x67856 incl %ecx movl %ecx, 0xf5a30(%rip) # 0x15d284 jmp 0x67810 movl 0xf5a24(%rip), %eax # 0x15d280 testl %eax, %eax sete %dl testl %ecx, %ecx sete %sil orb %dl, %sil je 0x67878 andl $0x0, 0xf5a0d(%rip) # 0x15d280 jmp 0x67980 leaq 0x3a0fa(%rip), %rbx # 0xa1979 leaq 0xc0(%rsp), %r14 leaq 0x30(%rsp), %r15 xorl %r12d, %r12d movl %eax, %edx cmpq %rdx, %r12 jae 0x67923 imulq $0x804, %r12, %rax # imm = 0x804 leaq 0xf01b8(%rip), %rdx # 0x157a60 leaq (%rax,%rdx), %r13 addq $0x1800, %r13 # imm = 0x1800 andl $0x0, 0x800(%r13) xorl %ebp, %ebp cmpl %ecx, %ebp jae 0x67915 movl $0x100, %esi # imm = 0x100 movq %r14, %rdi movq %rbx, %rdx movl %r12d, %ecx movl %ebp, %r8d xorl %eax, %eax callq 0xa9d0 decl %eax cmpl $0xff, %eax jae 0x679bf movq %r14, %rdi movq %r15, %rsi callq 0xa550 testl %eax, %eax jne 0x6790b movl 0x800(%r13), %eax leal 0x1(%rax), %ecx movl %ecx, 0x800(%r13) movl %ebp, (%r13,%rax,4) incl %ebp movl 0xf5971(%rip), %ecx # 0x15d284 jmp 0x678bd incq %r12 movl 0xf5962(%rip), %eax # 0x15d280 jmp 0x6788f cmpl $0x1, %eax jbe 0x67980 leaq 0x3a070(%rip), %rdi # 0xa199f leaq 0x36fc9(%rip), %rsi # 0x9e8ff callq 0xa700 testq %rax, %rax je 0x67980 movq %rax, %rbx movq %rsp, %rdi pushq $0x2a popq %rsi movq %rax, %rdx callq 0xa990 testq %rax, %rax je 0x67978 leaq 0x30ab4(%rip), %rsi # 0x98411 movq %rsp, %rdi pushq $0x3 popq %rdx callq 0xa620 testl %eax, %eax je 0x67978 leaq 0x3caf9(%rip), %rdi # 0xa446c callq 0xa940 movq %rbx, %rdi callq 0xa5e0 addq $0x1c8, %rsp # imm = 0x1C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x6e60f(%rip), %rax # 0xd5fa8 movq (%rax), %rcx leaq 0x39f48(%rip), %rdi # 0xa18eb pushq $0x29 popq %rsi pushq $0x1 popq %rdx addq $0x1c8, %rsp # imm = 0x1C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xabe0 movq 0x6e582(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6e5d3(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x3283f(%rip), %rsi # 0x9a21e leaq 0x39e98(%rip), %rdx # 0xa187e leaq 0x39f48(%rip), %r8 # 0xa1935 movl $0x77d, %ecx # imm = 0x77D xorl %eax, %eax callq 0xa8b0 callq 0x67550 callq 0xa300 movq 0x6e53e(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6e58f(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x327fb(%rip), %rsi # 0x9a21e leaq 0x39e54(%rip), %rdx # 0xa187e leaq 0x39f04(%rip), %r8 # 0xa1935 movl $0x763, %ecx # imm = 0x763 jmp 0x679f2 movq 0x6e509(%rip), %rax # 0xd5f48 movq (%rax), %rdi callq 0xa6f0 movq 0x6e55a(%rip), %rax # 0xd5fa8 movq (%rax), %rdi leaq 0x327c6(%rip), %rsi # 0x9a21e leaq 0x39e1f(%rip), %rdx # 0xa187e leaq 0x39ecf(%rip), %r8 # 0xa1935 movl $0x76b, %ecx # imm = 0x76B jmp 0x679f2
ggml_numa_init: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1C8h cmp cs:dword_15D280, 0 jnz loc_67992 lea rbx, aSysDevicesSyst_0; "/sys/devices/system/node/node%u" lea r14, [rsp+1F8h+var_138] lea r15, [rsp+1F8h+var_1C8] xor ecx, ecx loc_677B3: cmp ecx, 7 ja short loc_677F6 mov esi, 100h mov rdi, r14 mov rdx, rbx xor eax, eax call _snprintf dec eax cmp eax, 0FFh jnb loc_67A03 mov rdi, r14 mov rsi, r15 call _stat test eax, eax jnz short loc_677F6 mov ecx, cs:dword_15D280 inc ecx mov cs:dword_15D280, ecx jmp short loc_677B3 loc_677F6: mov ecx, cs:dword_15D284 lea rbx, aSysDevicesSyst_1; "/sys/devices/system/cpu/cpu%u" lea r14, [rsp+1F8h+var_138] lea r15, [rsp+1F8h+var_1C8] loc_67810: cmp ecx, 1FFh ja short loc_67856 mov esi, 100h mov rdi, r14 mov rdx, rbx xor eax, eax call _snprintf dec eax cmp eax, 0FFh jnb loc_67A38 mov rdi, r14 mov rsi, r15 call _stat mov ecx, cs:dword_15D284 test eax, eax jnz short loc_67856 inc ecx mov cs:dword_15D284, ecx jmp short loc_67810 loc_67856: mov eax, cs:dword_15D280 test eax, eax setz dl test ecx, ecx setz sil or sil, dl jz short loc_67878 and cs:dword_15D280, 0 jmp loc_67980 loc_67878: lea rbx, aSysDevicesSyst_2; "/sys/devices/system/node/node%u/cpu%u" lea r14, [rsp+1F8h+var_138] lea r15, [rsp+1F8h+var_1C8] xor r12d, r12d loc_6788F: mov edx, eax cmp r12, rdx jnb loc_67923 imul rax, r12, 804h lea rdx, g_state lea r13, [rax+rdx] add r13, 1800h and dword ptr [r13+800h], 0 xor ebp, ebp loc_678BD: cmp ebp, ecx jnb short loc_67915 mov esi, 100h mov rdi, r14 mov rdx, rbx mov ecx, r12d mov r8d, ebp xor eax, eax call _snprintf dec eax cmp eax, 0FFh jnb loc_679BF mov rdi, r14 mov rsi, r15 call _stat test eax, eax jnz short loc_6790B mov eax, [r13+800h] lea ecx, [rax+1] mov [r13+800h], ecx mov [r13+rax*4+0], ebp loc_6790B: inc ebp mov ecx, cs:dword_15D284 jmp short loc_678BD loc_67915: inc r12 mov eax, cs:dword_15D280 jmp loc_6788F loc_67923: cmp eax, 1 jbe short loc_67980 lea rdi, aProcSysKernelN; "/proc/sys/kernel/numa_balancing" lea rsi, aInvalidStringC_4+4Ch; "r" call _fopen test rax, rax jz short loc_67980 mov rbx, rax mov rdi, rsp push 2Ah ; '*' pop rsi mov rdx, rax call _fgets test rax, rax jz short loc_67978 lea rsi, aErrorTheSample+2Dh; "0\n" mov rdi, rsp push 3 pop rdx call _bcmp test eax, eax jz short loc_67978 lea rdi, aWarningProcSys; "WARNING: /proc/sys/kernel/numa_balancin"... call _puts loc_67978: mov rdi, rbx call _fclose loc_67980: add rsp, 1C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_67992: mov rax, cs:stderr_ptr mov rcx, [rax] lea rdi, aGgmlNumaInitNu; "ggml_numa_init: NUMA already initialize"... push 29h ; ')' pop rsi push 1 pop rdx add rsp, 1C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _fwrite loc_679BF: 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, aRv0UnsignedRvS; "rv > 0 && (unsigned)rv < sizeof(path)" mov ecx, 77Dh loc_679F2: xor eax, eax call _fprintf call ggml_print_backtrace call _abort loc_67A03: 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, aRv0UnsignedRvS; "rv > 0 && (unsigned)rv < sizeof(path)" mov ecx, 763h jmp short loc_679F2 loc_67A38: 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, aRv0UnsignedRvS; "rv > 0 && (unsigned)rv < sizeof(path)" mov ecx, 76Bh jmp short loc_679F2
long long ggml_numa_init() { unsigned int i; // ecx unsigned int j; // ecx int v2; // eax long long result; // rax unsigned long long k; // r12 unsigned int m; // ebp long long v6; // rax long long v7; // rbx long long v8; // rdi _BYTE v9[48]; // [rsp+0h] [rbp-1F8h] BYREF _BYTE v10[144]; // [rsp+30h] [rbp-1C8h] BYREF _BYTE v11[312]; // [rsp+C0h] [rbp-138h] BYREF if ( dword_15D280 ) return fwrite("ggml_numa_init: NUMA already initialized\n", 41LL, 1LL, stderr); for ( i = 0; i <= 7; i = ++dword_15D280 ) { if ( (unsigned int)snprintf(v11, 256LL, "/sys/devices/system/node/node%u", i) - 1 >= 0xFF ) { fflush(stdout); v8 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 1891LL, "rv > 0 && (unsigned)rv < sizeof(path)"); goto LABEL_32; } if ( (unsigned int)stat(v11, v10) ) break; } for ( j = dword_15D284; j <= 0x1FF; j = ++dword_15D284 ) { if ( (unsigned int)snprintf(v11, 256LL, "/sys/devices/system/cpu/cpu%u", j) - 1 >= 0xFF ) { fflush(stdout); v8 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 1899LL, "rv > 0 && (unsigned)rv < sizeof(path)"); LABEL_32: ggml_print_backtrace(); abort(v8); } v2 = stat(v11, v10); j = dword_15D284; if ( v2 ) break; } result = (unsigned int)dword_15D280; if ( dword_15D280 == 0 || j == 0 ) { dword_15D280 = 0; } else { for ( k = 0LL; k < (unsigned int)result; ++k ) { g_state[513 * k + 2048] = 0; for ( m = 0; m < j; ++m ) { if ( (unsigned int)snprintf(v11, 256LL, "/sys/devices/system/node/node%u/cpu%u", k, m) - 1 >= 0xFF ) { fflush(stdout); v8 = stderr; fprintf( stderr, "GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c", 1917LL, "rv > 0 && (unsigned)rv < sizeof(path)"); goto LABEL_32; } if ( !(unsigned int)stat(v11, v10) ) { v6 = g_state[513 * k + 2048]; g_state[513 * k + 2048] = v6 + 1; g_state[513 * k + 1536 + v6] = m; } j = dword_15D284; } result = (unsigned int)dword_15D280; } if ( (unsigned int)result > 1 ) { result = fopen("/proc/sys/kernel/numa_balancing", "r"); if ( result ) { v7 = result; if ( fgets(v9, 42LL, result) && (unsigned int)bcmp(v9, "0\n", 3LL) ) puts("WARNING: /proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance"); return fclose(v7); } } } return result; }
ggml_numa_init: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1c8 CMP dword ptr [0x0025d280],0x0 JNZ 0x00167992 LEA RBX,[0x1a1915] LEA R14,[RSP + 0xc0] LEA R15,[RSP + 0x30] XOR ECX,ECX LAB_001677b3: CMP ECX,0x7 JA 0x001677f6 MOV ESI,0x100 MOV RDI,R14 MOV RDX,RBX XOR EAX,EAX CALL 0x0010a9d0 DEC EAX CMP EAX,0xff JNC 0x00167a03 MOV RDI,R14 MOV RSI,R15 CALL 0x0010a550 TEST EAX,EAX JNZ 0x001677f6 MOV ECX,dword ptr [0x0025d280] INC ECX MOV dword ptr [0x0025d280],ECX JMP 0x001677b3 LAB_001677f6: MOV ECX,dword ptr [0x0025d284] LEA RBX,[0x1a195b] LEA R14,[RSP + 0xc0] LEA R15,[RSP + 0x30] LAB_00167810: CMP ECX,0x1ff JA 0x00167856 MOV ESI,0x100 MOV RDI,R14 MOV RDX,RBX XOR EAX,EAX CALL 0x0010a9d0 DEC EAX CMP EAX,0xff JNC 0x00167a38 MOV RDI,R14 MOV RSI,R15 CALL 0x0010a550 MOV ECX,dword ptr [0x0025d284] TEST EAX,EAX JNZ 0x00167856 INC ECX MOV dword ptr [0x0025d284],ECX JMP 0x00167810 LAB_00167856: MOV EAX,dword ptr [0x0025d280] TEST EAX,EAX SETZ DL TEST ECX,ECX SETZ SIL OR SIL,DL JZ 0x00167878 AND dword ptr [0x0025d280],0x0 JMP 0x00167980 LAB_00167878: LEA RBX,[0x1a1979] LEA R14,[RSP + 0xc0] LEA R15,[RSP + 0x30] XOR R12D,R12D LAB_0016788f: MOV EDX,EAX CMP R12,RDX JNC 0x00167923 IMUL RAX,R12,0x804 LEA RDX,[0x257a60] LEA R13,[RAX + RDX*0x1] ADD R13,0x1800 AND dword ptr [R13 + 0x800],0x0 XOR EBP,EBP LAB_001678bd: CMP EBP,ECX JNC 0x00167915 MOV ESI,0x100 MOV RDI,R14 MOV RDX,RBX MOV ECX,R12D MOV R8D,EBP XOR EAX,EAX CALL 0x0010a9d0 DEC EAX CMP EAX,0xff JNC 0x001679bf MOV RDI,R14 MOV RSI,R15 CALL 0x0010a550 TEST EAX,EAX JNZ 0x0016790b MOV EAX,dword ptr [R13 + 0x800] LEA ECX,[RAX + 0x1] MOV dword ptr [R13 + 0x800],ECX MOV dword ptr [R13 + RAX*0x4],EBP LAB_0016790b: INC EBP MOV ECX,dword ptr [0x0025d284] JMP 0x001678bd LAB_00167915: INC R12 MOV EAX,dword ptr [0x0025d280] JMP 0x0016788f LAB_00167923: CMP EAX,0x1 JBE 0x00167980 LEA RDI,[0x1a199f] LEA RSI,[0x19e8ff] CALL 0x0010a700 TEST RAX,RAX JZ 0x00167980 MOV RBX,RAX MOV RDI,RSP PUSH 0x2a POP RSI MOV RDX,RAX CALL 0x0010a990 TEST RAX,RAX JZ 0x00167978 LEA RSI,[0x198411] MOV RDI,RSP PUSH 0x3 POP RDX CALL 0x0010a620 TEST EAX,EAX JZ 0x00167978 LEA RDI,[0x1a446c] CALL 0x0010a940 LAB_00167978: MOV RDI,RBX CALL 0x0010a5e0 LAB_00167980: ADD RSP,0x1c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00167992: MOV RAX,qword ptr [0x001d5fa8] MOV RCX,qword ptr [RAX] LEA RDI,[0x1a18eb] PUSH 0x29 POP RSI PUSH 0x1 POP RDX ADD RSP,0x1c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0010abe0 LAB_001679bf: 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,[0x1a1935] MOV ECX,0x77d LAB_001679f2: XOR EAX,EAX CALL 0x0010a8b0 CALL 0x00167550 CALL 0x0010a300 LAB_00167a03: 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,[0x1a1935] MOV ECX,0x763 JMP 0x001679f2 LAB_00167a38: 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,[0x1a1935] MOV ECX,0x76b JMP 0x001679f2
void ggml_numa_init(void) { int iVar1; FILE *pFVar2; char *pcVar3; uint uVar4; int8 uVar5; uint uVar6; ulong uVar7; ulong uVar8; char acStack_1f8 [48]; stat local_1c8; char local_138 [264]; if (DAT_0025d280 != 0) { fwrite("ggml_numa_init: NUMA already initialized\n",0x29,1,*(FILE **)PTR_stderr_001d5fa8); return; } uVar4 = 0; while (uVar4 < 8) { iVar1 = snprintf(local_138,0x100,"/sys/devices/system/node/node%u"); if (0xfe < iVar1 - 1U) { fflush(*(FILE **)PTR_stdout_001d5f48); pFVar2 = *(FILE **)PTR_stderr_001d5fa8; uVar5 = 0x763; goto LAB_001679f2; } iVar1 = stat(local_138,&local_1c8); if (iVar1 != 0) break; DAT_0025d280 = DAT_0025d280 + 1; uVar4 = DAT_0025d280; } for (; DAT_0025d284 < 0x200; DAT_0025d284 = DAT_0025d284 + 1) { iVar1 = snprintf(local_138,0x100,"/sys/devices/system/cpu/cpu%u"); if (0xfe < iVar1 - 1U) { fflush(*(FILE **)PTR_stdout_001d5f48); pFVar2 = *(FILE **)PTR_stderr_001d5fa8; uVar5 = 0x76b; LAB_001679f2: fprintf(pFVar2,"GGML_ASSERT: %s:%d: %s\n", "/workspace/llm4binary/github/2025_star3/7CodeWizard[P]stablediffusion/ggml/src/ggml.c" ,uVar5,"rv > 0 && (unsigned)rv < sizeof(path)"); ggml_print_backtrace(); /* WARNING: Subroutine does not return */ abort(); } iVar1 = stat(local_138,&local_1c8); if (iVar1 != 0) break; } if (DAT_0025d284 == 0 || DAT_0025d280 == 0) { DAT_0025d280 = 0; } else { uVar4 = DAT_0025d284; for (uVar8 = 0; uVar8 < DAT_0025d280; uVar8 = uVar8 + 1) { (&DAT_00259a60)[uVar8 * 0x201] = 0; uVar7 = 0; while (uVar6 = (uint)uVar7, uVar6 < uVar4) { iVar1 = snprintf(local_138,0x100,"/sys/devices/system/node/node%u/cpu%u",uVar8 & 0xffffffff, uVar7); if (0xfe < iVar1 - 1U) { fflush(*(FILE **)PTR_stdout_001d5f48); pFVar2 = *(FILE **)PTR_stderr_001d5fa8; uVar5 = 0x77d; goto LAB_001679f2; } iVar1 = stat(local_138,&local_1c8); if (iVar1 == 0) { uVar4 = (&DAT_00259a60)[uVar8 * 0x201]; (&DAT_00259a60)[uVar8 * 0x201] = uVar4 + 1; *(uint *)(&DAT_00259260 + (ulong)uVar4 * 4 + uVar8 * 0x804) = uVar6; } uVar4 = DAT_0025d284; uVar7 = (ulong)(uVar6 + 1); } } if (1 < DAT_0025d280) { pFVar2 = fopen("/proc/sys/kernel/numa_balancing","r"); if (pFVar2 != (FILE *)0x0) { pcVar3 = fgets(acStack_1f8,0x2a,pFVar2); if (pcVar3 != (char *)0x0) { iVar1 = bcmp(acStack_1f8,"0\n",3); if (iVar1 != 0) { puts( "WARNING: /proc/sys/kernel/numa_balancing is enabled, this has been observed to impair performance" ); } } fclose(pFVar2); } } } return; }
26
mariadb_get_socket
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static my_socket mariadb_get_socket(MYSQL *mysql) { my_socket sock= INVALID_SOCKET; if (mysql->net.pvio) { ma_pvio_get_handle(mysql->net.pvio, &sock); } /* if an asynchronous connect is in progress, we need to obtain pvio handle from async_context until the connection was successfully established. */ else if (mysql->options.extension && mysql->options.extension->async_context && mysql->options.extension->async_context->pvio) { ma_pvio_get_handle(mysql->options.extension->async_context->pvio, &sock); } return sock; }
O0
c
mariadb_get_socket: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x3c95f movq -0x8(%rbp), %rax movq (%rax), %rdi leaq -0xc(%rbp), %rsi callq 0x3e400 jmp 0x3c9b3 movq -0x8(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x3c9b1 movq -0x8(%rbp), %rax movq 0x480(%rax), %rax cmpq $0x0, 0x28(%rax) je 0x3c9b1 movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax cmpq $0x0, 0x18(%rax) je 0x3c9b1 movq -0x8(%rbp), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq 0x18(%rax), %rdi leaq -0xc(%rbp), %rsi callq 0x3e400 jmp 0x3c9b3 movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopl (%rax)
mariadb_get_socket: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], 0FFFFFFFFh mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_3C95F mov rax, [rbp+var_8] mov rdi, [rax] lea rsi, [rbp+var_C] call ma_pvio_get_handle jmp short loc_3C9B3 loc_3C95F: mov rax, [rbp+var_8] cmp qword ptr [rax+480h], 0 jz short loc_3C9B1 mov rax, [rbp+var_8] mov rax, [rax+480h] cmp qword ptr [rax+28h], 0 jz short loc_3C9B1 mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] cmp qword ptr [rax+18h], 0 jz short loc_3C9B1 mov rax, [rbp+var_8] mov rax, [rax+480h] mov rax, [rax+28h] mov rdi, [rax+18h] lea rsi, [rbp+var_C] call ma_pvio_get_handle loc_3C9B1: jmp short $+2 loc_3C9B3: mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long mariadb_get_socket(_QWORD *a1) { unsigned int v2; // [rsp+4h] [rbp-Ch] BYREF _QWORD *v3; // [rsp+8h] [rbp-8h] v3 = a1; v2 = -1; if ( *a1 ) { ma_pvio_get_handle(*v3, &v2); } else if ( v3[144] && *(_QWORD *)(v3[144] + 40LL) && *(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL) ) { ma_pvio_get_handle(*(_QWORD *)(*(_QWORD *)(v3[144] + 40LL) + 24LL), &v2); } return v2; }
mariadb_get_socket: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0xffffffff MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0013c95f MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] LEA RSI,[RBP + -0xc] CALL 0x0013e400 JMP 0x0013c9b3 LAB_0013c95f: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0013c9b1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] CMP qword ptr [RAX + 0x28],0x0 JZ 0x0013c9b1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] CMP qword ptr [RAX + 0x18],0x0 JZ 0x0013c9b1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV RDI,qword ptr [RAX + 0x18] LEA RSI,[RBP + -0xc] CALL 0x0013e400 LAB_0013c9b1: JMP 0x0013c9b3 LAB_0013c9b3: MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int4 mariadb_get_socket(long *param_1) { int4 local_14; long *local_10; local_14 = 0xffffffff; local_10 = param_1; if (*param_1 == 0) { if (((param_1[0x90] != 0) && (*(long *)(param_1[0x90] + 0x28) != 0)) && (*(long *)(*(long *)(param_1[0x90] + 0x28) + 0x18) != 0)) { ma_pvio_get_handle(*(int8 *)(*(long *)(param_1[0x90] + 0x28) + 0x18),&local_14); } } else { ma_pvio_get_handle(*param_1,&local_14); } return local_14; }
27
my_uni_ucs2
eloqsql/strings/ctype-ucs2.c
static int my_uni_ucs2(CHARSET_INFO *cs __attribute__((unused)) , my_wc_t wc, uchar *r, uchar *e) { if ( r+2 > e ) return MY_CS_TOOSMALL2; if (wc > 0xFFFF) /* UCS2 does not support characters outside BMP */ return MY_CS_ILUNI; r[0]= (uchar) (wc >> 8); r[1]= (uchar) (wc & 0xFF); return 2; }
O3
c
my_uni_ucs2: pushq %rbp movq %rsp, %rbp leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0xc515c xorl %eax, %eax cmpq $0xffff, %rsi # imm = 0xFFFF ja 0xc515c rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax popq %rbp retq
my_uni_ucs2: push rbp mov rbp, rsp lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_C515C xor eax, eax cmp rsi, 0FFFFh ja short loc_C515C rol si, 8 mov [rdx], si mov eax, 2 loc_C515C: pop rbp retn
long long my_uni_ucs2(long long a1, unsigned long long a2, _WORD *a3, unsigned long long a4) { long long result; // rax result = 4294967194LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { result = 0LL; if ( a2 <= 0xFFFF ) { *a3 = __ROL2__(a2, 8); return 2LL; } } return result; }
my_uni_ucs2: PUSH RBP MOV RBP,RSP LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x001c515c XOR EAX,EAX CMP RSI,0xffff JA 0x001c515c ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 LAB_001c515c: POP RBP RET
int8 my_uni_ucs2(int8 param_1,ulong param_2,ushort *param_3,ushort *param_4) { int8 uVar1; uVar1 = 0xffffff9a; if ((param_3 + 1 <= param_4) && (uVar1 = 0, param_2 < 0x10000)) { *param_3 = (ushort)param_2 << 8 | (ushort)param_2 >> 8; uVar1 = 2; } return uVar1; }
28
exec_REDO_LOGREC_COMMIT
eloqsql/storage/maria/ma_recovery.c
prototype_redo_exec_hook(COMMIT) { uint16 sid= rec->short_trid; TrID long_trid= all_active_trans[sid].long_trid; char llbuf[22]; if (long_trid == 0) { tprint(tracef, "We don't know about transaction with short_trid %u;" "it probably committed long ago, forget it\n", sid); bzero(&all_active_trans[sid], sizeof(all_active_trans[sid])); return 0; } llstr(long_trid, llbuf); tprint(tracef, "Transaction long_trid %s short_trid %u committed\n", llbuf, sid); bzero(&all_active_trans[sid], sizeof(all_active_trans[sid])); #ifdef MARIA_VERSIONING /* if real recovery: transaction was committed, move it to some separate list for later purging (but don't purge now! purging may have been started before, we may find REDO_PURGE records soon). */ #endif return 0; }
O3
c
exec_REDO_LOGREC_COMMIT: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movq %fs:0x28, %rax movq %rax, -0x18(%rbp) movzwl 0x10(%rdi), %ebx movq 0xbc6f75(%rip), %rax # 0xc52c68 movl %ebx, %ecx shll $0x5, %ecx movq 0x18(%rax,%rcx), %rdi testq %rdi, %rdi je 0x8bd2d leaq -0x30(%rbp), %r14 movq %r14, %rsi callq 0xfa484 leaq 0xbc70b3(%rip), %rax # 0xc52dc8 movq (%rax), %rdi leaq 0x7b090(%rip), %rsi # 0x106daf movq %r14, %rdx movl %ebx, %ecx xorl %eax, %eax callq 0x8da80 jmp 0x8bd47 leaq 0xbc7094(%rip), %rax # 0xc52dc8 movq (%rax), %rdi leaq 0x7b013(%rip), %rsi # 0x106d51 movl %ebx, %edx xorl %eax, %eax callq 0x8da80 movq 0xbc6f1a(%rip), %rax # 0xc52c68 shll $0x5, %ebx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rax,%rbx) movups %xmm0, (%rax,%rbx) movq %fs:0x28, %rax cmpq -0x18(%rbp), %rax jne 0x8bd77 xorl %eax, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq callq 0x2b280
exec_REDO_LOGREC_COMMIT: push rbp mov rbp, rsp push r14 push rbx sub rsp, 20h mov rax, fs:28h mov [rbp+var_18], rax movzx ebx, word ptr [rdi+10h] mov rax, cs:all_active_trans mov ecx, ebx shl ecx, 5 mov rdi, [rax+rcx+18h] test rdi, rdi jz short loc_8BD2D lea r14, [rbp+var_30] mov rsi, r14 call llstr lea rax, tracef mov rdi, [rax] lea rsi, aTransactionLon_0; "Transaction long_trid %s short_trid %u "... mov rdx, r14 mov ecx, ebx xor eax, eax call tprint jmp short loc_8BD47 loc_8BD2D: lea rax, tracef mov rdi, [rax] lea rsi, aWeDonTKnowAbou; "We don't know about transaction with sh"... mov edx, ebx xor eax, eax call tprint loc_8BD47: mov rax, cs:all_active_trans shl ebx, 5 xorps xmm0, xmm0 movups xmmword ptr [rax+rbx+10h], xmm0 movups xmmword ptr [rax+rbx], xmm0 mov rax, fs:28h cmp rax, [rbp+var_18] jnz short loc_8BD77 xor eax, eax add rsp, 20h pop rbx pop r14 pop rbp retn loc_8BD77: call ___stack_chk_fail
long long exec_REDO_LOGREC_COMMIT(long long a1, long long a2, long long a3, long long a4, int a5, int a6) { int v6; // ebx long long v7; // rcx long long v8; // rdi int v9; // r8d int v10; // r9d long long v11; // rax long long v12; // rbx _BYTE v14[24]; // [rsp+0h] [rbp-30h] BYREF unsigned long long v15; // [rsp+18h] [rbp-18h] v15 = __readfsqword(0x28u); v6 = *(unsigned __int16 *)(a1 + 16); v7 = (unsigned int)(32 * v6); v8 = *(_QWORD *)(all_active_trans + v7 + 24); if ( v8 ) { llstr(v8, v14); tprint(tracef, (unsigned int)"Transaction long_trid %s short_trid %u committed\n", (unsigned int)v14, v6, v9, v10); } else { tprint( tracef, (unsigned int)"We don't know about transaction with short_trid %u;it probably committed long ago, forget it\n", v6, v7, a5, a6); } v11 = all_active_trans; v12 = (unsigned int)(32 * v6); *(_OWORD *)(all_active_trans + v12 + 16) = 0LL; *(_OWORD *)(v11 + v12) = 0LL; return 0LL; }
exec_REDO_LOGREC_COMMIT: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x20 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x18],RAX MOVZX EBX,word ptr [RDI + 0x10] MOV RAX,qword ptr [0x00d52c68] MOV ECX,EBX SHL ECX,0x5 MOV RDI,qword ptr [RAX + RCX*0x1 + 0x18] TEST RDI,RDI JZ 0x0018bd2d LEA R14,[RBP + -0x30] MOV RSI,R14 CALL 0x001fa484 LEA RAX,[0xd52dc8] MOV RDI,qword ptr [RAX] LEA RSI,[0x206daf] MOV RDX,R14 MOV ECX,EBX XOR EAX,EAX CALL 0x0018da80 JMP 0x0018bd47 LAB_0018bd2d: LEA RAX,[0xd52dc8] MOV RDI,qword ptr [RAX] LEA RSI,[0x206d51] MOV EDX,EBX XOR EAX,EAX CALL 0x0018da80 LAB_0018bd47: MOV RAX,qword ptr [0x00d52c68] SHL EBX,0x5 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + RBX*0x1 + 0x10],XMM0 MOVUPS xmmword ptr [RAX + RBX*0x1],XMM0 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0018bd77 XOR EAX,EAX ADD RSP,0x20 POP RBX POP R14 POP RBP RET LAB_0018bd77: CALL 0x0012b280
int8 exec_REDO_LOGREC_COMMIT(long param_1) { int8 *puVar1; ushort uVar2; long lVar3; long in_FS_OFFSET; int1 local_38 [24]; long local_20; local_20 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = *(ushort *)(param_1 + 0x10); lVar3 = *(long *)(all_active_trans + 0x18 + (ulong)uVar2 * 0x20); if (lVar3 == 0) { tprint(tracef, "We don\'t know about transaction with short_trid %u;it probably committed long ago, forget it\n" ,uVar2); } else { llstr(lVar3,local_38); tprint(tracef,"Transaction long_trid %s short_trid %u committed\n",local_38,uVar2); } lVar3 = all_active_trans; puVar1 = (int8 *)(all_active_trans + 0x10 + (ulong)uVar2 * 0x20); *puVar1 = 0; puVar1[1] = 0; puVar1 = (int8 *)(lVar3 + (ulong)uVar2 * 0x20); *puVar1 = 0; puVar1[1] = 0; if (*(long *)(in_FS_OFFSET + 0x28) == local_20) { return 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
29
iq1_find_best_neighbour2
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
static int iq1_find_best_neighbour2(const uint16_t * restrict neighbours, const uint64_t * restrict grid, const float * restrict xval, const float * restrict weight, float scale, const float * restrict xg, int8_t * restrict L, int ngrid) { int num_neighbors = neighbours[0]; GGML_ASSERT(num_neighbors > 0); float best_score = FLT_MAX; int grid_index = -1; for (int j = 1; j <= num_neighbors; ++j) { const int8_t * pg = (const int8_t *)(grid + neighbours[j]); float d2 = 0; for (int i = 0; i < 8; ++i) { float q = xg[(pg[i] - 1)/2]; float w = weight[i]; float diff = scale*q - xval[i]; d2 += w*diff*diff; } if (d2 < best_score) { best_score = d2; grid_index = neighbours[j]; } } if (grid_index < 0) { for (int i = 0; i < ngrid; ++i) { const int8_t * grid_i = (const int8_t *)(grid + i); float d2 = 0; for (int j = 0; j < 8; ++j) { float w = weight[j]; float q = xg[(grid_i[j] - 1)/2]; float diff = scale*q - xval[i]; d2 += w*diff*diff; } if (d2 < best_score) { best_score = d2; grid_index = i; } } } if (grid_index < 0) { printf("Oops, did not find grid point\n"); printf("Have %d neighbours\n", num_neighbors); for (int j = 1; j <= num_neighbors; ++j) { const int8_t * pg = (const int8_t *)(grid + neighbours[j]); float sumqx = 0, sumq2 = 0; for (int i = 0; i < 8; ++i) { float q = xg[(pg[i] - 1)/2]; float w = weight[i]; sumqx += w*q*xval[i]; sumq2 += w*q*q; } printf(" neighbour %d: sumqx = %g sumq2 = %g\n", j, (double)sumqx, (double)sumq2); } } GGML_ASSERT(grid_index >= 0); const int8_t * pg = (const int8_t *)(grid + grid_index); for (int i = 0; i < 8; ++i) L[i] = (pg[i] - 1)/2; return grid_index; }
O1
c
iq1_find_best_neighbour2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movzwl (%rdi), %r14d testl %r14d, %r14d je 0x3d1cc movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rdi, %rbx leaq 0x1(%r14), %rax movl $0xffffffff, %ebp # imm = 0xFFFFFFFF movss 0x13dd1(%rip), %xmm2 # 0x50dac movl $0x1, %ecx movzwl (%rbx,%rcx,2), %edx leaq (%rsi,%rdx,8), %r11 xorps %xmm1, %xmm1 xorl %edi, %edi movsbl (%r11,%rdi), %r8d movl %r8d, %r10d decl %r10d shrl $0x1f, %r10d addl %r10d, %r8d decl %r8d shrl %r8d movswq %r8w, %r8 movss (%r15,%r8,4), %xmm3 mulss %xmm0, %xmm3 subss (%r13,%rdi,4), %xmm3 movss (%r12,%rdi,4), %xmm4 mulss %xmm3, %xmm4 mulss %xmm3, %xmm4 addss %xmm4, %xmm1 incq %rdi cmpq $0x8, %rdi jne 0x3cfed ucomiss %xmm1, %xmm2 cmoval %edx, %ebp minss %xmm2, %xmm1 incq %rcx movaps %xmm1, %xmm2 cmpq %rax, %rcx jne 0x3cfe0 testl %ebp, %ebp jns 0x3d0cb movl $0xffffffff, %ebp # imm = 0xFFFFFFFF xorl %eax, %eax movaps 0x13d14(%rip), %xmm2 # 0x50d70 movq %rsi, %rcx movss (%r13,%rax,4), %xmm4 xorps %xmm2, %xmm4 xorps %xmm3, %xmm3 xorl %edx, %edx movsbl (%rcx,%rdx), %r8d movl %r8d, %edi decl %edi shrl $0x1f, %edi addl %r8d, %edi decl %edi shrl %edi movswq %di, %rdi movss (%r15,%rdi,4), %xmm5 mulss %xmm0, %xmm5 addss %xmm4, %xmm5 movss (%r12,%rdx,4), %xmm6 mulss %xmm5, %xmm6 mulss %xmm5, %xmm6 addss %xmm6, %xmm3 incq %rdx cmpq $0x8, %rdx jne 0x3d06e ucomiss %xmm3, %xmm1 cmoval %eax, %ebp minss %xmm1, %xmm3 incq %rax addq $0x8, %rcx movaps %xmm3, %xmm1 cmpq $0x800, %rax # imm = 0x800 jne 0x3d05f movq %r9, 0x8(%rsp) testl %ebp, %ebp jns 0x3d18d leaq 0x1fb19(%rip), %rdi # 0x5cbf8 movq %rsi, (%rsp) callq 0x18a30 leaq 0x1fa36(%rip), %rdi # 0x5cb25 movl %r14d, %esi xorl %eax, %eax callq 0x170a0 movq (%rsp), %rsi cmpl $0x1, %r14d adcl $0x1, %r14d movq %r14, 0x10(%rsp) movl $0x1, %r14d movzwl (%rbx,%r14,2), %eax leaq (%rsi,%rax,8), %rax xorps %xmm1, %xmm1 xorl %ecx, %ecx xorps %xmm0, %xmm0 movsbl (%rax,%rcx), %edx movl %edx, %esi decl %esi shrl $0x1f, %esi addl %esi, %edx decl %edx shrl %edx movswq %dx, %rdx movss (%r15,%rdx,4), %xmm2 movss (%r12,%rcx,4), %xmm3 mulss %xmm2, %xmm3 movss (%r13,%rcx,4), %xmm4 mulss %xmm3, %xmm4 addss %xmm4, %xmm0 mulss %xmm2, %xmm3 addss %xmm3, %xmm1 incq %rcx cmpq $0x8, %rcx jne 0x3d121 cvtss2sd %xmm0, %xmm0 cvtss2sd %xmm1, %xmm1 leaq 0x1f9c4(%rip), %rdi # 0x5cb39 movl %r14d, %esi movb $0x2, %al callq 0x170a0 incq %r14 cmpq 0x10(%rsp), %r14 movq (%rsp), %rsi jne 0x3d110 testl %ebp, %ebp js 0x3d1e8 movl %ebp, %eax leaq (%rsi,%rax,8), %rax xorl %ecx, %ecx movq 0x8(%rsp), %rdi movsbl (%rax,%rcx), %edx movl %edx, %esi decl %esi shrl $0x1f, %esi addl %esi, %edx decl %edx shrl %edx movb %dl, (%rdi,%rcx) incq %rcx cmpq $0x8, %rcx jne 0x3d19e movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1e631(%rip), %rdi # 0x5b804 leaq 0xf3e7(%rip), %rdx # 0x4c5c1 leaq 0x1f851(%rip), %rcx # 0x5ca32 movl $0xfd6, %esi # imm = 0xFD6 jmp 0x3d202 leaq 0x1e615(%rip), %rdi # 0x5b804 leaq 0xf3cb(%rip), %rdx # 0x4c5c1 leaq 0x1f847(%rip), %rcx # 0x5ca44 movl $0x1006, %esi # imm = 0x1006 xorl %eax, %eax callq 0x18ce0 nopl (%rax)
iq1_find_best_neighbour2: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h movzx r14d, word ptr [rdi] test r14d, r14d jz loc_3D1CC mov r15, r8 mov r12, rcx mov r13, rdx mov rbx, rdi lea rax, [r14+1] mov ebp, 0FFFFFFFFh movss xmm2, cs:dword_50DAC mov ecx, 1 loc_3CFE0: movzx edx, word ptr [rbx+rcx*2] lea r11, [rsi+rdx*8] xorps xmm1, xmm1 xor edi, edi loc_3CFED: movsx r8d, byte ptr [r11+rdi] mov r10d, r8d dec r10d shr r10d, 1Fh add r8d, r10d dec r8d shr r8d, 1 movsx r8, r8w movss xmm3, dword ptr [r15+r8*4] mulss xmm3, xmm0 subss xmm3, dword ptr [r13+rdi*4+0] movss xmm4, dword ptr [r12+rdi*4] mulss xmm4, xmm3 mulss xmm4, xmm3 addss xmm1, xmm4 inc rdi cmp rdi, 8 jnz short loc_3CFED ucomiss xmm2, xmm1 cmova ebp, edx minss xmm1, xmm2 inc rcx movaps xmm2, xmm1 cmp rcx, rax jnz short loc_3CFE0 test ebp, ebp jns short loc_3D0CB mov ebp, 0FFFFFFFFh xor eax, eax movaps xmm2, cs:xmmword_50D70 mov rcx, rsi loc_3D05F: movss xmm4, dword ptr [r13+rax*4+0] xorps xmm4, xmm2 xorps xmm3, xmm3 xor edx, edx loc_3D06E: movsx r8d, byte ptr [rcx+rdx] mov edi, r8d dec edi shr edi, 1Fh add edi, r8d dec edi shr edi, 1 movsx rdi, di movss xmm5, dword ptr [r15+rdi*4] mulss xmm5, xmm0 addss xmm5, xmm4 movss xmm6, dword ptr [r12+rdx*4] mulss xmm6, xmm5 mulss xmm6, xmm5 addss xmm3, xmm6 inc rdx cmp rdx, 8 jnz short loc_3D06E ucomiss xmm1, xmm3 cmova ebp, eax minss xmm3, xmm1 inc rax add rcx, 8 movaps xmm1, xmm3 cmp rax, 800h jnz short loc_3D05F loc_3D0CB: mov [rsp+48h+var_40], r9 test ebp, ebp jns loc_3D18D lea rdi, aOopsDidNotFind; "Oops, did not find grid point" mov [rsp+48h+var_48], rsi call _puts lea rdi, aHaveDNeighbour; "Have %d neighbours\n" mov esi, r14d xor eax, eax call _printf mov rsi, [rsp+48h+var_48] cmp r14d, 1 adc r14d, 1 mov [rsp+48h+var_38], r14 mov r14d, 1 loc_3D110: movzx eax, word ptr [rbx+r14*2] lea rax, [rsi+rax*8] xorps xmm1, xmm1 xor ecx, ecx xorps xmm0, xmm0 loc_3D121: movsx edx, byte ptr [rax+rcx] mov esi, edx dec esi shr esi, 1Fh add edx, esi dec edx shr edx, 1 movsx rdx, dx movss xmm2, dword ptr [r15+rdx*4] movss xmm3, dword ptr [r12+rcx*4] mulss xmm3, xmm2 movss xmm4, dword ptr [r13+rcx*4+0] mulss xmm4, xmm3 addss xmm0, xmm4 mulss xmm3, xmm2 addss xmm1, xmm3 inc rcx cmp rcx, 8 jnz short loc_3D121 cvtss2sd xmm0, xmm0 cvtss2sd xmm1, xmm1 lea rdi, aNeighbourDSumq; " neighbour %d: sumqx = %g sumq2 = %g"... mov esi, r14d mov al, 2 call _printf inc r14 cmp r14, [rsp+48h+var_38] mov rsi, [rsp+48h+var_48] jnz short loc_3D110 loc_3D18D: test ebp, ebp js short loc_3D1E8 mov eax, ebp lea rax, [rsi+rax*8] xor ecx, ecx mov rdi, [rsp+48h+var_40] loc_3D19E: movsx edx, byte ptr [rax+rcx] mov esi, edx dec esi shr esi, 1Fh add edx, esi dec edx shr edx, 1 mov [rdi+rcx], dl inc rcx cmp rcx, 8 jnz short loc_3D19E mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3D1CC: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNumNeighbors0; "num_neighbors > 0" mov esi, 0FD6h jmp short loc_3D202 loc_3D1E8: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGridIndex0; "grid_index >= 0" mov esi, 1006h loc_3D202: xor eax, eax call _ggml_abort
long long iq1_find_best_neighbour2( _WORD *a1, long long a2, long long a3, long long a4, long long a5, long long a6, double a7) { long long v7; // r14 long long v8; // r15 int v12; // ebp double v13; // xmm2_8 long long v14; // rcx long long j; // rdx double v16; // xmm1_8 long long i; // rdi float v18; // xmm3_4 long long v19; // rax double v20; // xmm3_8 float v21; // xmm5_4 long long v22; // r14 long long v23; // rax float v24; // xmm1_4 long long v25; // rcx float v26; // xmm0_4 float v27; // xmm2_4 float v28; // xmm3_4 long long k; // rcx const char *v31; // rcx int v32; // esi long long v33; // [rsp+0h] [rbp-48h] long long v35; // [rsp+10h] [rbp-38h] v7 = (unsigned __int16)*a1; if ( !*a1 ) { v31 = "num_neighbors > 0"; v32 = 4054; goto LABEL_26; } v8 = a5; v12 = -1; LODWORD(v13) = 2139095039; v14 = 1LL; do { j = (unsigned __int16)a1[v14]; v16 = 0.0; for ( i = 0LL; i != 8; ++i ) { a5 = (__int16)((((unsigned int)(*(char *)(a2 + 8 * j + i) - 1) >> 31) + *(char *)(a2 + 8 * j + i) - 1) >> 1); v18 = (float)(*(float *)(v8 + 4 * a5) * *(float *)&a7) - *(float *)(a3 + 4 * i); *(float *)&v16 = *(float *)&v16 + (float)((float)(*(float *)(a4 + 4 * i) * v18) * v18); } if ( *(float *)&v13 > *(float *)&v16 ) v12 = (unsigned __int16)a1[v14]; *(float *)&v16 = fminf(*(float *)&v16, *(float *)&v13); ++v14; v13 = v16; } while ( v14 != v7 + 1 ); if ( v12 < 0 ) { v12 = -1; v19 = 0LL; *(_QWORD *)&v13 = 0x8000000080000000LL; v14 = a2; do { v20 = 0.0; for ( j = 0LL; j != 8; ++j ) { LODWORD(a5) = *(char *)(v14 + j); v21 = (float)(*(float *)(v8 + 4LL * (__int16)(((unsigned int)a5 + ((unsigned int)(a5 - 1) >> 31) - 1) >> 1)) * *(float *)&a7) - *(float *)(a3 + 4 * v19); *(float *)&v20 = *(float *)&v20 + (float)((float)(*(float *)(a4 + 4 * j) * v21) * v21); } if ( *(float *)&v16 > *(float *)&v20 ) v12 = v19; *(float *)&v20 = fminf(*(float *)&v20, *(float *)&v16); ++v19; v14 += 8LL; v16 = v20; } while ( v19 != 2048 ); } if ( v12 < 0 ) { v33 = a2; puts("Oops, did not find grid point", a2, j, v14, a7, v16, v13); printf("Have %d neighbours\n", v7); v35 = ((_DWORD)v7 == 0) + (unsigned int)v7 + 1; v22 = 1LL; do { v24 = 0.0; v25 = 0LL; v26 = 0.0; do { v23 = a2 + 8LL * (unsigned __int16)a1[v22]; v27 = *(float *)(v8 + 4LL * (__int16)((((unsigned int)(*(char *)(v23 + v25) - 1) >> 31) + *(char *)(v23 + v25) - 1) >> 1)); v28 = *(float *)(a4 + 4 * v25) * v27; v26 = v26 + (float)(*(float *)(a3 + 4 * v25) * v28); v24 = v24 + (float)(v28 * v27); ++v25; } while ( v25 != 8 ); printf(" neighbour %d: sumqx = %g sumq2 = %g\n", v22++, v26, v24); a2 = v33; } while ( v22 != v35 ); } if ( v12 < 0 ) { v31 = "grid_index >= 0"; v32 = 4102; LABEL_26: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", v32, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v31, a5, a6); } for ( k = 0LL; k != 8; ++k ) *(_BYTE *)(a6 + k) = (((unsigned int)(*(char *)(a2 + 8LL * (unsigned int)v12 + k) - 1) >> 31) + *(char *)(a2 + 8LL * (unsigned int)v12 + k) - 1) >> 1; return (unsigned int)v12; }
iq1_find_best_neighbour2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOVZX R14D,word ptr [RDI] TEST R14D,R14D JZ 0x0013d1cc MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV RBX,RDI LEA RAX,[R14 + 0x1] MOV EBP,0xffffffff MOVSS XMM2,dword ptr [0x00150dac] MOV ECX,0x1 LAB_0013cfe0: MOVZX EDX,word ptr [RBX + RCX*0x2] LEA R11,[RSI + RDX*0x8] XORPS XMM1,XMM1 XOR EDI,EDI LAB_0013cfed: MOVSX R8D,byte ptr [R11 + RDI*0x1] MOV R10D,R8D DEC R10D SHR R10D,0x1f ADD R8D,R10D DEC R8D SHR R8D,0x1 MOVSX R8,R8W MOVSS XMM3,dword ptr [R15 + R8*0x4] MULSS XMM3,XMM0 SUBSS XMM3,dword ptr [R13 + RDI*0x4] MOVSS XMM4,dword ptr [R12 + RDI*0x4] MULSS XMM4,XMM3 MULSS XMM4,XMM3 ADDSS XMM1,XMM4 INC RDI CMP RDI,0x8 JNZ 0x0013cfed UCOMISS XMM2,XMM1 CMOVA EBP,EDX MINSS XMM1,XMM2 INC RCX MOVAPS XMM2,XMM1 CMP RCX,RAX JNZ 0x0013cfe0 TEST EBP,EBP JNS 0x0013d0cb MOV EBP,0xffffffff XOR EAX,EAX MOVAPS XMM2,xmmword ptr [0x00150d70] MOV RCX,RSI LAB_0013d05f: MOVSS XMM4,dword ptr [R13 + RAX*0x4] XORPS XMM4,XMM2 XORPS XMM3,XMM3 XOR EDX,EDX LAB_0013d06e: MOVSX R8D,byte ptr [RCX + RDX*0x1] MOV EDI,R8D DEC EDI SHR EDI,0x1f ADD EDI,R8D DEC EDI SHR EDI,0x1 MOVSX RDI,DI MOVSS XMM5,dword ptr [R15 + RDI*0x4] MULSS XMM5,XMM0 ADDSS XMM5,XMM4 MOVSS XMM6,dword ptr [R12 + RDX*0x4] MULSS XMM6,XMM5 MULSS XMM6,XMM5 ADDSS XMM3,XMM6 INC RDX CMP RDX,0x8 JNZ 0x0013d06e UCOMISS XMM1,XMM3 CMOVA EBP,EAX MINSS XMM3,XMM1 INC RAX ADD RCX,0x8 MOVAPS XMM1,XMM3 CMP RAX,0x800 JNZ 0x0013d05f LAB_0013d0cb: MOV qword ptr [RSP + 0x8],R9 TEST EBP,EBP JNS 0x0013d18d LEA RDI,[0x15cbf8] MOV qword ptr [RSP],RSI CALL 0x00118a30 LEA RDI,[0x15cb25] MOV ESI,R14D XOR EAX,EAX CALL 0x001170a0 MOV RSI,qword ptr [RSP] CMP R14D,0x1 ADC R14D,0x1 MOV qword ptr [RSP + 0x10],R14 MOV R14D,0x1 LAB_0013d110: MOVZX EAX,word ptr [RBX + R14*0x2] LEA RAX,[RSI + RAX*0x8] XORPS XMM1,XMM1 XOR ECX,ECX XORPS XMM0,XMM0 LAB_0013d121: MOVSX EDX,byte ptr [RAX + RCX*0x1] MOV ESI,EDX DEC ESI SHR ESI,0x1f ADD EDX,ESI DEC EDX SHR EDX,0x1 MOVSX RDX,DX MOVSS XMM2,dword ptr [R15 + RDX*0x4] MOVSS XMM3,dword ptr [R12 + RCX*0x4] MULSS XMM3,XMM2 MOVSS XMM4,dword ptr [R13 + RCX*0x4] MULSS XMM4,XMM3 ADDSS XMM0,XMM4 MULSS XMM3,XMM2 ADDSS XMM1,XMM3 INC RCX CMP RCX,0x8 JNZ 0x0013d121 CVTSS2SD XMM0,XMM0 CVTSS2SD XMM1,XMM1 LEA RDI,[0x15cb39] MOV ESI,R14D MOV AL,0x2 CALL 0x001170a0 INC R14 CMP R14,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP] JNZ 0x0013d110 LAB_0013d18d: TEST EBP,EBP JS 0x0013d1e8 MOV EAX,EBP LEA RAX,[RSI + RAX*0x8] XOR ECX,ECX MOV RDI,qword ptr [RSP + 0x8] LAB_0013d19e: MOVSX EDX,byte ptr [RAX + RCX*0x1] MOV ESI,EDX DEC ESI SHR ESI,0x1f ADD EDX,ESI DEC EDX SHR EDX,0x1 MOV byte ptr [RDI + RCX*0x1],DL INC RCX CMP RCX,0x8 JNZ 0x0013d19e MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013d1cc: LEA RDI,[0x15b804] LEA RDX,[0x14c5c1] LEA RCX,[0x15ca32] MOV ESI,0xfd6 JMP 0x0013d202 LAB_0013d1e8: LEA RDI,[0x15b804] LEA RDX,[0x14c5c1] LEA RCX,[0x15ca44] MOV ESI,0x1006 LAB_0013d202: XOR EAX,EAX CALL 0x00118ce0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ uint iq1_find_best_neighbour2 (float param_1,ushort *param_2,long param_3,long param_4,long param_5,long param_6, long param_7) { ushort uVar1; uint uVar2; long lVar3; char *pcVar4; long lVar5; uint uVar6; int8 uVar7; long lVar8; int iVar9; ulong uVar10; float fVar11; float fVar12; float fVar13; float fVar14; uVar1 = *param_2; if (uVar1 == 0) { pcVar4 = "num_neighbors > 0"; uVar7 = 0xfd6; } else { uVar6 = 0xffffffff; lVar3 = 1; fVar11 = DAT_00150dac; do { fVar12 = 0.0; lVar8 = 0; do { iVar9 = (int)*(char *)(param_3 + (ulong)param_2[lVar3] * 8 + lVar8); fVar13 = *(float *)(param_6 + (long)(short)((iVar9 - (iVar9 + -1 >> 0x1f)) - 1U >> 1) * 4) * param_1 - *(float *)(param_4 + lVar8 * 4); fVar12 = fVar12 + *(float *)(param_5 + lVar8 * 4) * fVar13 * fVar13; lVar8 = lVar8 + 1; } while (lVar8 != 8); uVar2 = (uint)param_2[lVar3]; if (fVar11 <= fVar12) { fVar12 = fVar11; uVar2 = uVar6; } uVar6 = uVar2; fVar11 = fVar12; lVar3 = lVar3 + 1; } while (lVar3 != (ulong)uVar1 + 1); if ((int)uVar6 < 0) { uVar6 = 0xffffffff; lVar8 = 0; lVar3 = param_3; do { fVar12 = 0.0; lVar5 = 0; do { fVar13 = *(float *)(param_6 + (long)(short)(((int)*(char *)(lVar3 + lVar5) - (*(char *)(lVar3 + lVar5) + -1 >> 0x1f)) - 1U >> 1) * 4) * param_1 + (float)(*(uint *)(param_4 + lVar8 * 4) ^ _DAT_00150d70); fVar12 = fVar12 + *(float *)(param_5 + lVar5 * 4) * fVar13 * fVar13; lVar5 = lVar5 + 1; } while (lVar5 != 8); uVar2 = (uint)lVar8; if (fVar11 <= fVar12) { fVar12 = fVar11; uVar2 = uVar6; } uVar6 = uVar2; lVar8 = lVar8 + 1; lVar3 = lVar3 + 8; fVar11 = fVar12; } while (lVar8 != 0x800); } if ((int)uVar6 < 0) { puts("Oops, did not find grid point"); printf("Have %d neighbours\n",(ulong)uVar1); uVar10 = 1; do { fVar12 = 0.0; lVar3 = 0; fVar11 = 0.0; do { iVar9 = (int)*(char *)(param_3 + (ulong)param_2[uVar10] * 8 + lVar3); fVar13 = *(float *)(param_6 + (long)(short)((iVar9 - (iVar9 + -1 >> 0x1f)) - 1U >> 1) * 4) ; fVar14 = *(float *)(param_5 + lVar3 * 4) * fVar13; fVar11 = fVar11 + *(float *)(param_4 + lVar3 * 4) * fVar14; fVar12 = fVar12 + fVar14 * fVar13; lVar3 = lVar3 + 1; } while (lVar3 != 8); printf(" neighbour %d: sumqx = %g sumq2 = %g\n",(double)fVar11,(double)fVar12, uVar10 & 0xffffffff); uVar10 = uVar10 + 1; } while (uVar10 != uVar1 + 1 + (uint)(uVar1 == 0)); } if (-1 < (int)uVar6) { lVar3 = 0; do { iVar9 = (int)*(char *)(param_3 + (ulong)uVar6 * 8 + lVar3); *(char *)(param_7 + lVar3) = (char)((iVar9 - (iVar9 + -1 >> 0x1f)) - 1U >> 1); lVar3 = lVar3 + 1; } while (lVar3 != 8); return uVar6; } pcVar4 = "grid_index >= 0"; uVar7 = 0x1006; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,uVar7,"GGML_ASSERT(%s) failed",pcVar4); }
30
iq1_find_best_neighbour2
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
static int iq1_find_best_neighbour2(const uint16_t * restrict neighbours, const uint64_t * restrict grid, const float * restrict xval, const float * restrict weight, float scale, const float * restrict xg, int8_t * restrict L, int ngrid) { int num_neighbors = neighbours[0]; GGML_ASSERT(num_neighbors > 0); float best_score = FLT_MAX; int grid_index = -1; for (int j = 1; j <= num_neighbors; ++j) { const int8_t * pg = (const int8_t *)(grid + neighbours[j]); float d2 = 0; for (int i = 0; i < 8; ++i) { float q = xg[(pg[i] - 1)/2]; float w = weight[i]; float diff = scale*q - xval[i]; d2 += w*diff*diff; } if (d2 < best_score) { best_score = d2; grid_index = neighbours[j]; } } if (grid_index < 0) { for (int i = 0; i < ngrid; ++i) { const int8_t * grid_i = (const int8_t *)(grid + i); float d2 = 0; for (int j = 0; j < 8; ++j) { float w = weight[j]; float q = xg[(grid_i[j] - 1)/2]; float diff = scale*q - xval[i]; d2 += w*diff*diff; } if (d2 < best_score) { best_score = d2; grid_index = i; } } } if (grid_index < 0) { printf("Oops, did not find grid point\n"); printf("Have %d neighbours\n", num_neighbors); for (int j = 1; j <= num_neighbors; ++j) { const int8_t * pg = (const int8_t *)(grid + neighbours[j]); float sumqx = 0, sumq2 = 0; for (int i = 0; i < 8; ++i) { float q = xg[(pg[i] - 1)/2]; float w = weight[i]; sumqx += w*q*xval[i]; sumq2 += w*q*q; } printf(" neighbour %d: sumqx = %g sumq2 = %g\n", j, (double)sumqx, (double)sumq2); } } GGML_ASSERT(grid_index >= 0); const int8_t * pg = (const int8_t *)(grid + grid_index); for (int i = 0; i < 8; ++i) L[i] = (pg[i] - 1)/2; return grid_index; }
O2
c
iq1_find_best_neighbour2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movzwl (%rdi), %eax testl %eax, %eax je 0x3f91e movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r13 movq %rax, (%rsp) leaq 0x1(%rax), %rbp movss 0x1383e(%rip), %xmm1 # 0x5302c pushq $-0x1 popq %rcx pushq $0x1 popq %rsi movw $0x2, %di cmpq %rbp, %rsi je 0x3f85d movzwl (%r13,%rsi,2), %r8d leaq (%rbx,%r8,8), %r10 xorps %xmm2, %xmm2 xorl %r11d, %r11d cmpq $0x8, %r11 je 0x3f84a movsbl (%r10,%r11), %eax decl %eax cwtd idivw %di movswq %ax, %rax movss (%r14,%rax,4), %xmm3 mulss %xmm0, %xmm3 subss (%r12,%r11,4), %xmm3 movss (%r15,%r11,4), %xmm4 mulss %xmm3, %xmm4 mulss %xmm3, %xmm4 addss %xmm4, %xmm2 incq %r11 jmp 0x3f80d ucomiss %xmm2, %xmm1 cmoval %r8d, %ecx minss %xmm1, %xmm2 incq %rsi movaps %xmm2, %xmm1 jmp 0x3f7f8 testl %ecx, %ecx jns 0x3f8e5 pushq $-0x1 popq %rcx xorl %esi, %esi movaps 0x1362f(%rip), %xmm2 # 0x52ea0 movw $0x2, %di movq %rbx, %r8 cmpq $0x800, %rsi # imm = 0x800 je 0x3f8e1 movss (%r12,%rsi,4), %xmm4 xorps %xmm2, %xmm4 xorps %xmm3, %xmm3 xorl %r10d, %r10d cmpq $0x8, %r10 je 0x3f8cb movsbl (%r8,%r10), %eax decl %eax cwtd idivw %di movswq %ax, %rax movss (%r14,%rax,4), %xmm5 mulss %xmm0, %xmm5 addss %xmm4, %xmm5 movss (%r15,%r10,4), %xmm6 mulss %xmm5, %xmm6 mulss %xmm5, %xmm6 addss %xmm6, %xmm3 incq %r10 jmp 0x3f890 ucomiss %xmm3, %xmm1 cmoval %esi, %ecx minss %xmm1, %xmm3 incq %rsi addq $0x8, %r8 movaps %xmm3, %xmm1 jmp 0x3f878 testl %ecx, %ecx js 0x3f93d movl %ecx, %eax leaq (%rbx,%rax,8), %rsi xorl %edi, %edi movw $0x2, %r8w cmpq $0x8, %rdi je 0x3f90d movsbl (%rsi,%rdi), %eax decl %eax cwtd idivw %r8w movb %al, (%r9,%rdi) incq %rdi jmp 0x3f8f2 movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1e13f(%rip), %rdi # 0x5da64 leaq 0xeca9(%rip), %rdx # 0x4e5d5 leaq 0x1f35f(%rip), %rcx # 0x5ec92 movl $0xfd6, %esi # imm = 0xFD6 jmp 0x3f9f6 leaq 0x1f514(%rip), %rdi # 0x5ee58 callq 0x1f610 leaq 0x1f435(%rip), %rdi # 0x5ed85 movq (%rsp), %rsi xorl %eax, %eax callq 0x1d100 pushq $0x1 popq %rsi cmpq %rbp, %rsi je 0x3f9dc movzwl (%r13,%rsi,2), %eax leaq (%rbx,%rax,8), %rcx xorps %xmm1, %xmm1 xorl %edi, %edi movw $0x2, %r8w cmpq $0x8, %rdi je 0x3f9b5 movsbl (%rcx,%rdi), %eax decl %eax cwtd idivw %r8w movswq %ax, %rax movss (%r14,%rax,4), %xmm0 movss (%r15,%rdi,4), %xmm2 mulss %xmm0, %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss (%r12,%rdi,4), %xmm3 unpcklps %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1] mulps %xmm2, %xmm3 addps %xmm3, %xmm1 incq %rdi jmp 0x3f977 cvtss2sd %xmm1, %xmm0 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] cvtss2sd %xmm1, %xmm1 leaq 0x1f3d1(%rip), %rdi # 0x5ed99 movb $0x2, %al movq %rsi, (%rsp) callq 0x1d100 movq (%rsp), %rsi incq %rsi jmp 0x3f95e leaq 0x1e081(%rip), %rdi # 0x5da64 leaq 0xebeb(%rip), %rdx # 0x4e5d5 leaq 0x1f2b3(%rip), %rcx # 0x5eca4 movl $0x1006, %esi # imm = 0x1006 xorl %eax, %eax callq 0x1f9b0
iq1_find_best_neighbour2: push rbp push r15 push r14 push r13 push r12 push rbx push rax movzx eax, word ptr [rdi] test eax, eax jz loc_3F91E mov r14, r8 mov r15, rcx mov r12, rdx mov rbx, rsi mov r13, rdi mov [rsp+38h+var_38], rax lea rbp, [rax+1] movss xmm1, cs:dword_5302C push 0FFFFFFFFFFFFFFFFh pop rcx push 1 pop rsi mov di, 2 loc_3F7F8: cmp rsi, rbp jz short loc_3F85D movzx r8d, word ptr [r13+rsi*2+0] lea r10, [rbx+r8*8] xorps xmm2, xmm2 xor r11d, r11d loc_3F80D: cmp r11, 8 jz short loc_3F84A movsx eax, byte ptr [r10+r11] dec eax cwd idiv di movsx rax, ax movss xmm3, dword ptr [r14+rax*4] mulss xmm3, xmm0 subss xmm3, dword ptr [r12+r11*4] movss xmm4, dword ptr [r15+r11*4] mulss xmm4, xmm3 mulss xmm4, xmm3 addss xmm2, xmm4 inc r11 jmp short loc_3F80D loc_3F84A: ucomiss xmm1, xmm2 cmova ecx, r8d minss xmm2, xmm1 inc rsi movaps xmm1, xmm2 jmp short loc_3F7F8 loc_3F85D: test ecx, ecx jns loc_3F8E5 push 0FFFFFFFFFFFFFFFFh pop rcx xor esi, esi movaps xmm2, cs:xmmword_52EA0 mov di, 2 mov r8, rbx loc_3F878: cmp rsi, 800h jz short loc_3F8E1 movss xmm4, dword ptr [r12+rsi*4] xorps xmm4, xmm2 xorps xmm3, xmm3 xor r10d, r10d loc_3F890: cmp r10, 8 jz short loc_3F8CB movsx eax, byte ptr [r8+r10] dec eax cwd idiv di movsx rax, ax movss xmm5, dword ptr [r14+rax*4] mulss xmm5, xmm0 addss xmm5, xmm4 movss xmm6, dword ptr [r15+r10*4] mulss xmm6, xmm5 mulss xmm6, xmm5 addss xmm3, xmm6 inc r10 jmp short loc_3F890 loc_3F8CB: ucomiss xmm1, xmm3 cmova ecx, esi minss xmm3, xmm1 inc rsi add r8, 8 movaps xmm1, xmm3 jmp short loc_3F878 loc_3F8E1: test ecx, ecx js short loc_3F93D loc_3F8E5: mov eax, ecx lea rsi, [rbx+rax*8] xor edi, edi mov r8w, 2 loc_3F8F2: cmp rdi, 8 jz short loc_3F90D movsx eax, byte ptr [rsi+rdi] dec eax cwd idiv r8w mov [r9+rdi], al inc rdi jmp short loc_3F8F2 loc_3F90D: mov eax, ecx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3F91E: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNumNeighbors0; "num_neighbors > 0" mov esi, 0FD6h jmp loc_3F9F6 loc_3F93D: lea rdi, aOopsDidNotFind; "Oops, did not find grid point" call _puts lea rdi, aHaveDNeighbour; "Have %d neighbours\n" mov rsi, [rsp+38h+var_38] xor eax, eax call _printf push 1 pop rsi loc_3F95E: cmp rsi, rbp jz short loc_3F9DC movzx eax, word ptr [r13+rsi*2+0] lea rcx, [rbx+rax*8] xorps xmm1, xmm1 xor edi, edi mov r8w, 2 loc_3F977: cmp rdi, 8 jz short loc_3F9B5 movsx eax, byte ptr [rcx+rdi] dec eax cwd idiv r8w movsx rax, ax movss xmm0, dword ptr [r14+rax*4] movss xmm2, dword ptr [r15+rdi*4] mulss xmm2, xmm0 shufps xmm2, xmm2, 0 movss xmm3, dword ptr [r12+rdi*4] unpcklps xmm3, xmm0 mulps xmm3, xmm2 addps xmm1, xmm3 inc rdi jmp short loc_3F977 loc_3F9B5: cvtss2sd xmm0, xmm1 shufps xmm1, xmm1, 55h ; 'U' cvtss2sd xmm1, xmm1 lea rdi, aNeighbourDSumq; " neighbour %d: sumqx = %g sumq2 = %g"... mov al, 2 mov [rsp+38h+var_38], rsi call _printf mov rsi, [rsp+38h+var_38] inc rsi jmp short loc_3F95E loc_3F9DC: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGridIndex0; "grid_index >= 0" mov esi, 1006h loc_3F9F6: xor eax, eax call _ggml_abort
long long iq1_find_best_neighbour2( _WORD *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 v14; // al long long v16; // r15 long long v17; // r12 long long v20; // rbp long long i; // rsi long long v22; // r10 __m128 v23; // xmm2 long long j; // r11 long long v25; // rsi long long v26; // r8 long long k; // r10 float v28; // xmm5_4 long long ii; // rdi const char *v31; // rcx int v32; // esi long long m; // rsi __m128 v34; // xmm1 long long n; // rdi __m128 v36; // xmm2 int v37; // [rsp+0h] [rbp-38h] LOBYTE(v37) = v14; if ( !*a1 ) { v31 = "num_neighbors > 0"; v32 = 4054; goto LABEL_32; } v16 = a4; v17 = a3; v37 = (unsigned __int16)*a1; v20 = (unsigned __int16)*a1 + 1LL; a8 = (__m128)0x7F7FFFFFu; LODWORD(a4) = -1; for ( i = 1LL; i != v20; ++i ) { v22 = a2 + 8LL * (unsigned __int16)a1[i]; v23 = 0LL; for ( j = 0LL; j != 8; ++j ) { LOWORD(a3) = (__int16)(*(char *)(v22 + j) - 1) % 2; a10 = (__m128)*(unsigned int *)(a5 + 4LL * ((__int16)(*(char *)(v22 + j) - 1) / 2)); a10.m128_f32[0] = (float)(a10.m128_f32[0] * a7.m128_f32[0]) - *(float *)(v17 + 4 * j); v23.m128_f32[0] = v23.m128_f32[0] + (float)((float)(*(float *)(v16 + 4 * j) * a10.m128_f32[0]) * a10.m128_f32[0]); } if ( a8.m128_f32[0] > v23.m128_f32[0] ) LODWORD(a4) = (unsigned __int16)a1[i]; v23.m128_f32[0] = fminf(v23.m128_f32[0], a8.m128_f32[0]); a8 = v23; } if ( (int)a4 < 0 ) { a4 = -1LL; v25 = 0LL; a9 = (__m128)xmmword_52EA0; v26 = a2; while ( v25 != 2048 ) { a10 = 0LL; for ( k = 0LL; k != 8; ++k ) { LOWORD(a3) = (__int16)(*(char *)(v26 + k) - 1) % 2; v28 = (float)(*(float *)(a5 + 4LL * ((__int16)(*(char *)(v26 + k) - 1) / 2)) * a7.m128_f32[0]) - *(float *)(v17 + 4 * v25); a13 = (__m128)*(unsigned int *)(v16 + 4 * k); a13.m128_f32[0] = (float)(a13.m128_f32[0] * v28) * v28; a10.m128_f32[0] = a10.m128_f32[0] + a13.m128_f32[0]; } if ( a8.m128_f32[0] > a10.m128_f32[0] ) a4 = (unsigned int)v25; a10.m128_f32[0] = fminf(a10.m128_f32[0], a8.m128_f32[0]); ++v25; v26 += 8LL; a8 = a10; } if ( (int)a4 < 0 ) { puts( "Oops, did not find grid point", 2048LL, a3, a4, v26, *(double *)a7.m128_u64, *(double *)a8.m128_u64, COERCE_DOUBLE(0x8000000080000000LL)); printf("Have %d neighbours\n", v37); for ( m = 1LL; m != v20; ++m ) { v34 = 0LL; for ( n = 0LL; n != 8; ++n ) { a7 = (__m128)*(unsigned int *)(a5 + 4LL * ((__int16)(*(char *)(a2 + 8LL * (unsigned __int16)a1[m] + n) - 1) / 2)); v36 = (__m128)*(unsigned int *)(v16 + 4 * n); v36.m128_f32[0] = v36.m128_f32[0] * a7.m128_f32[0]; a9 = _mm_shuffle_ps(v36, v36, 0); a10 = _mm_mul_ps(_mm_unpacklo_ps((__m128)*(unsigned int *)(v17 + 4 * n), a7), a9); v34 = _mm_add_ps(v34, a10); } *(double *)a7.m128_u64 = v34.m128_f32[0]; a8 = _mm_shuffle_ps(v34, v34, 85); *(double *)a8.m128_u64 = a8.m128_f32[0]; LOBYTE(v37) = m; printf(" neighbour %d: sumqx = %g sumq2 = %g\n", m, *(double *)a7.m128_u64, *(double *)a8.m128_u64); } v31 = "grid_index >= 0"; v32 = 4102; LABEL_32: ggml_abort( "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", v32, (long long)"GGML_ASSERT(%s) failed", (long long)v31, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v37); } } for ( ii = 0LL; ii != 8; ++ii ) *(_BYTE *)(a6 + ii) = (__int16)(*(char *)(a2 + 8LL * (unsigned int)a4 + ii) - 1) / 2; return (unsigned int)a4; }
iq1_find_best_neighbour2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOVZX EAX,word ptr [RDI] TEST EAX,EAX JZ 0x0013f91e MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBX,RSI MOV R13,RDI MOV qword ptr [RSP],RAX LEA RBP,[RAX + 0x1] MOVSS XMM1,dword ptr [0x0015302c] PUSH -0x1 POP RCX PUSH 0x1 POP RSI MOV DI,0x2 LAB_0013f7f8: CMP RSI,RBP JZ 0x0013f85d MOVZX R8D,word ptr [R13 + RSI*0x2] LEA R10,[RBX + R8*0x8] XORPS XMM2,XMM2 XOR R11D,R11D LAB_0013f80d: CMP R11,0x8 JZ 0x0013f84a MOVSX EAX,byte ptr [R10 + R11*0x1] DEC EAX CWD IDIV DI MOVSX RAX,AX MOVSS XMM3,dword ptr [R14 + RAX*0x4] MULSS XMM3,XMM0 SUBSS XMM3,dword ptr [R12 + R11*0x4] MOVSS XMM4,dword ptr [R15 + R11*0x4] MULSS XMM4,XMM3 MULSS XMM4,XMM3 ADDSS XMM2,XMM4 INC R11 JMP 0x0013f80d LAB_0013f84a: UCOMISS XMM1,XMM2 CMOVA ECX,R8D MINSS XMM2,XMM1 INC RSI MOVAPS XMM1,XMM2 JMP 0x0013f7f8 LAB_0013f85d: TEST ECX,ECX JNS 0x0013f8e5 PUSH -0x1 POP RCX XOR ESI,ESI MOVAPS XMM2,xmmword ptr [0x00152ea0] MOV DI,0x2 MOV R8,RBX LAB_0013f878: CMP RSI,0x800 JZ 0x0013f8e1 MOVSS XMM4,dword ptr [R12 + RSI*0x4] XORPS XMM4,XMM2 XORPS XMM3,XMM3 XOR R10D,R10D LAB_0013f890: CMP R10,0x8 JZ 0x0013f8cb MOVSX EAX,byte ptr [R8 + R10*0x1] DEC EAX CWD IDIV DI MOVSX RAX,AX MOVSS XMM5,dword ptr [R14 + RAX*0x4] MULSS XMM5,XMM0 ADDSS XMM5,XMM4 MOVSS XMM6,dword ptr [R15 + R10*0x4] MULSS XMM6,XMM5 MULSS XMM6,XMM5 ADDSS XMM3,XMM6 INC R10 JMP 0x0013f890 LAB_0013f8cb: UCOMISS XMM1,XMM3 CMOVA ECX,ESI MINSS XMM3,XMM1 INC RSI ADD R8,0x8 MOVAPS XMM1,XMM3 JMP 0x0013f878 LAB_0013f8e1: TEST ECX,ECX JS 0x0013f93d LAB_0013f8e5: MOV EAX,ECX LEA RSI,[RBX + RAX*0x8] XOR EDI,EDI MOV R8W,0x2 LAB_0013f8f2: CMP RDI,0x8 JZ 0x0013f90d MOVSX EAX,byte ptr [RSI + RDI*0x1] DEC EAX CWD IDIV R8W MOV byte ptr [R9 + RDI*0x1],AL INC RDI JMP 0x0013f8f2 LAB_0013f90d: MOV EAX,ECX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013f91e: LEA RDI,[0x15da64] LEA RDX,[0x14e5d5] LEA RCX,[0x15ec92] MOV ESI,0xfd6 JMP 0x0013f9f6 LAB_0013f93d: LEA RDI,[0x15ee58] CALL 0x0011f610 LEA RDI,[0x15ed85] MOV RSI,qword ptr [RSP] XOR EAX,EAX CALL 0x0011d100 PUSH 0x1 POP RSI LAB_0013f95e: CMP RSI,RBP JZ 0x0013f9dc MOVZX EAX,word ptr [R13 + RSI*0x2] LEA RCX,[RBX + RAX*0x8] XORPS XMM1,XMM1 XOR EDI,EDI MOV R8W,0x2 LAB_0013f977: CMP RDI,0x8 JZ 0x0013f9b5 MOVSX EAX,byte ptr [RCX + RDI*0x1] DEC EAX CWD IDIV R8W MOVSX RAX,AX MOVSS XMM0,dword ptr [R14 + RAX*0x4] MOVSS XMM2,dword ptr [R15 + RDI*0x4] MULSS XMM2,XMM0 SHUFPS XMM2,XMM2,0x0 MOVSS XMM3,dword ptr [R12 + RDI*0x4] UNPCKLPS XMM3,XMM0 MULPS XMM3,XMM2 ADDPS XMM1,XMM3 INC RDI JMP 0x0013f977 LAB_0013f9b5: CVTSS2SD XMM0,XMM1 SHUFPS XMM1,XMM1,0x55 CVTSS2SD XMM1,XMM1 LEA RDI,[0x15ed99] MOV AL,0x2 MOV qword ptr [RSP],RSI CALL 0x0011d100 MOV RSI,qword ptr [RSP] INC RSI JMP 0x0013f95e LAB_0013f9dc: LEA RDI,[0x15da64] LEA RDX,[0x14e5d5] LEA RCX,[0x15eca4] MOV ESI,0x1006 LAB_0013f9f6: XOR EAX,EAX CALL 0x0011f9b0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong iq1_find_best_neighbour2 (float param_1,ushort *param_2,long param_3,long param_4,long param_5,long param_6, long param_7) { ushort uVar1; ulong uVar2; ulong uVar3; char *pcVar4; long lVar5; int8 uVar6; long lVar7; long lVar8; float fVar9; float fVar10; float fVar11; uVar1 = *param_2; if (uVar1 == 0) { pcVar4 = "num_neighbors > 0"; uVar6 = 0xfd6; LAB_0013f9f6: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,uVar6,"GGML_ASSERT(%s) failed",pcVar4); } lVar7 = (ulong)uVar1 + 1; uVar3 = 0xffffffffffffffff; fVar9 = DAT_0015302c; for (lVar5 = 1; lVar5 != lVar7; lVar5 = lVar5 + 1) { fVar10 = 0.0; for (lVar8 = 0; lVar8 != 8; lVar8 = lVar8 + 1) { fVar11 = *(float *)(param_6 + (long)((short)(*(char *)(param_3 + (ulong)param_2[lVar5] * 8 + lVar8) + -1) / 2) * 4) * param_1 - *(float *)(param_4 + lVar8 * 4); fVar10 = fVar10 + *(float *)(param_5 + lVar8 * 4) * fVar11 * fVar11; } uVar2 = uVar3 & 0xffffffff; uVar3 = (ulong)param_2[lVar5]; if (fVar9 <= fVar10) { fVar10 = fVar9; uVar3 = uVar2; } fVar9 = fVar10; } if ((int)uVar3 < 0) { uVar3 = 0xffffffffffffffff; lVar5 = param_3; for (uVar2 = 0; uVar2 != 0x800; uVar2 = uVar2 + 1) { fVar10 = 0.0; for (lVar8 = 0; lVar8 != 8; lVar8 = lVar8 + 1) { fVar11 = *(float *)(param_6 + (long)((short)(*(char *)(lVar5 + lVar8) + -1) / 2) * 4) * param_1 + (float)(*(uint *)(param_4 + uVar2 * 4) ^ _DAT_00152ea0); fVar10 = fVar10 + *(float *)(param_5 + lVar8 * 4) * fVar11 * fVar11; } if (fVar10 < fVar9) { uVar3 = uVar2; } uVar3 = uVar3 & 0xffffffff; if (fVar9 <= fVar10) { fVar10 = fVar9; } lVar5 = lVar5 + 8; fVar9 = fVar10; } if ((int)uVar3 < 0) { puts("Oops, did not find grid point"); printf("Have %d neighbours\n",(ulong)uVar1); for (lVar5 = 1; lVar5 != lVar7; lVar5 = lVar5 + 1) { fVar9 = 0.0; for (lVar8 = 0; lVar8 != 8; lVar8 = lVar8 + 1) { fVar9 = fVar9 + *(float *)(param_4 + lVar8 * 4) * *(float *)(param_5 + lVar8 * 4) * *(float *)(param_6 + (long)((short)(*(char *)(param_3 + (ulong)param_2[lVar5] * 8 + lVar8) + -1) / 2) * 4); } printf(" neighbour %d: sumqx = %g sumq2 = %g\n",(double)fVar9); } pcVar4 = "grid_index >= 0"; uVar6 = 0x1006; goto LAB_0013f9f6; } } for (lVar7 = 0; lVar7 != 8; lVar7 = lVar7 + 1) { *(char *)(param_7 + lVar7) = (char)((int)(short)(*(char *)(param_3 + (uVar3 & 0xffffffff) * 8 + lVar7) + -1) / 2); } return uVar3 & 0xffffffff; }
31
iq1_find_best_neighbour2
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
static int iq1_find_best_neighbour2(const uint16_t * restrict neighbours, const uint64_t * restrict grid, const float * restrict xval, const float * restrict weight, float scale, const float * restrict xg, int8_t * restrict L, int ngrid) { int num_neighbors = neighbours[0]; GGML_ASSERT(num_neighbors > 0); float best_score = FLT_MAX; int grid_index = -1; for (int j = 1; j <= num_neighbors; ++j) { const int8_t * pg = (const int8_t *)(grid + neighbours[j]); float d2 = 0; for (int i = 0; i < 8; ++i) { float q = xg[(pg[i] - 1)/2]; float w = weight[i]; float diff = scale*q - xval[i]; d2 += w*diff*diff; } if (d2 < best_score) { best_score = d2; grid_index = neighbours[j]; } } if (grid_index < 0) { for (int i = 0; i < ngrid; ++i) { const int8_t * grid_i = (const int8_t *)(grid + i); float d2 = 0; for (int j = 0; j < 8; ++j) { float w = weight[j]; float q = xg[(grid_i[j] - 1)/2]; float diff = scale*q - xval[i]; d2 += w*diff*diff; } if (d2 < best_score) { best_score = d2; grid_index = i; } } } if (grid_index < 0) { printf("Oops, did not find grid point\n"); printf("Have %d neighbours\n", num_neighbors); for (int j = 1; j <= num_neighbors; ++j) { const int8_t * pg = (const int8_t *)(grid + neighbours[j]); float sumqx = 0, sumq2 = 0; for (int i = 0; i < 8; ++i) { float q = xg[(pg[i] - 1)/2]; float w = weight[i]; sumqx += w*q*xval[i]; sumq2 += w*q*q; } printf(" neighbour %d: sumqx = %g sumq2 = %g\n", j, (double)sumqx, (double)sumq2); } } GGML_ASSERT(grid_index >= 0); const int8_t * pg = (const int8_t *)(grid + grid_index); for (int i = 0; i < 8; ++i) L[i] = (pg[i] - 1)/2; return grid_index; }
O3
c
iq1_find_best_neighbour2: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movzwl (%rdi), %r11d testl %r11d, %r11d je 0x3cacf movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbx movq %rdi, %r13 leaq 0x1(%r11), %rbp movl $0xffffffff, %eax # imm = 0xFFFFFFFF movss 0x14938(%rip), %xmm2 # 0x512b8 movl $0x1, %ecx movzwl (%r13,%rcx,2), %edx leaq (%rbx,%rdx,8), %rsi xorps %xmm1, %xmm1 xorl %edi, %edi movsbl (%rsi,%rdi), %r8d leal -0x1(%r8), %r10d movzwl %r10w, %r10d shrl $0xf, %r10d addl %r10d, %r8d decl %r8d movswl %r8w, %r8d shrl %r8d movswq %r8w, %r8 movss (%r14,%r8,4), %xmm3 mulss %xmm0, %xmm3 subss (%r12,%rdi,4), %xmm3 movss (%r15,%rdi,4), %xmm4 mulss %xmm3, %xmm4 mulss %xmm3, %xmm4 addss %xmm4, %xmm1 incq %rdi cmpq $0x8, %rdi jne 0x3c994 ucomiss %xmm1, %xmm2 cmoval %edx, %eax minss %xmm2, %xmm1 incq %rcx movaps %xmm1, %xmm2 cmpq %rbp, %rcx jne 0x3c985 testl %eax, %eax jns 0x3ca85 movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %ecx, %ecx movaps 0xf674(%rip), %xmm2 # 0x4c080 movq %rbx, %rdx movss (%r12,%rcx,4), %xmm4 xorps %xmm2, %xmm4 xorps %xmm3, %xmm3 xorl %esi, %esi movsbl (%rdx,%rsi), %edi leal -0x1(%rdi), %r8d movzwl %r8w, %r8d shrl $0xf, %r8d addl %r8d, %edi decl %edi movswl %di, %edi shrl %edi movswq %di, %rdi movss (%r14,%rdi,4), %xmm5 mulss %xmm0, %xmm5 addss %xmm4, %xmm5 movss (%r15,%rsi,4), %xmm6 mulss %xmm5, %xmm6 mulss %xmm5, %xmm6 addss %xmm6, %xmm3 incq %rsi cmpq $0x8, %rsi jne 0x3ca1d ucomiss %xmm3, %xmm1 cmoval %ecx, %eax minss %xmm1, %xmm3 incq %rcx addq $0x8, %rdx movaps %xmm3, %xmm1 cmpq $0x800, %rcx # imm = 0x800 jne 0x3ca0f testl %eax, %eax js 0x3caee movl %eax, %ecx movq (%rbx,%rcx,8), %xmm0 punpcklbw %xmm0, %xmm0 # xmm0 = xmm0[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7] psraw $0x8, %xmm0 pcmpeqd %xmm1, %xmm1 paddw %xmm0, %xmm1 movdqa %xmm1, %xmm0 psrlw $0xf, %xmm0 paddw %xmm1, %xmm0 psrlw $0x1, %xmm0 pand 0x14649(%rip), %xmm0 # 0x51100 packuswb %xmm0, %xmm0 movq %xmm0, (%r9) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x1f21e(%rip), %rdi # 0x5bcf4 leaq 0xfb88(%rip), %rdx # 0x4c665 leaq 0x2043e(%rip), %rcx # 0x5cf22 movl $0xfd6, %esi # imm = 0xFD6 jmp 0x3cbb5 leaq 0x205f3(%rip), %rdi # 0x5d0e8 movq %r11, (%rsp) callq 0x17a20 leaq 0x20510(%rip), %rdi # 0x5d015 movq (%rsp), %rsi xorl %eax, %eax callq 0x160a0 movl $0x1, %esi movzwl (%r13,%rsi,2), %eax leaq (%rbx,%rax,8), %rax xorps %xmm0, %xmm0 xorl %ecx, %ecx movsbl (%rax,%rcx), %edx leal -0x1(%rdx), %edi movzwl %di, %edi shrl $0xf, %edi addl %edi, %edx decl %edx movswl %dx, %edx shrl %edx movswq %dx, %rdx movss (%r14,%rdx,4), %xmm1 movss (%r15,%rcx,4), %xmm2 mulss %xmm1, %xmm2 shufps $0x0, %xmm2, %xmm2 # xmm2 = xmm2[0,0,0,0] movss (%r12,%rcx,4), %xmm3 unpcklps %xmm3, %xmm1 # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1] mulps %xmm2, %xmm1 addps %xmm1, %xmm0 incq %rcx cmpq $0x8, %rcx jne 0x3cb24 xorps %xmm1, %xmm1 cvtss2sd %xmm0, %xmm1 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] cvtss2sd %xmm0, %xmm0 leaq 0x204a9(%rip), %rdi # 0x5d029 movb $0x2, %al movq %rsi, (%rsp) callq 0x160a0 movq (%rsp), %rsi incq %rsi cmpq %rbp, %rsi jne 0x3cb15 leaq 0x1f152(%rip), %rdi # 0x5bcf4 leaq 0xfabc(%rip), %rdx # 0x4c665 leaq 0x20384(%rip), %rcx # 0x5cf34 movl $0x1006, %esi # imm = 0x1006 xorl %eax, %eax callq 0x17cd0
iq1_find_best_neighbour2: push rbp push r15 push r14 push r13 push r12 push rbx push rax movzx r11d, word ptr [rdi] test r11d, r11d jz loc_3CACF mov r14, r8 mov r15, rcx mov r12, rdx mov rbx, rsi mov r13, rdi lea rbp, [r11+1] mov eax, 0FFFFFFFFh movss xmm2, cs:dword_512B8 mov ecx, 1 loc_3C985: movzx edx, word ptr [r13+rcx*2+0] lea rsi, [rbx+rdx*8] xorps xmm1, xmm1 xor edi, edi loc_3C994: movsx r8d, byte ptr [rsi+rdi] lea r10d, [r8-1] movzx r10d, r10w shr r10d, 0Fh add r8d, r10d dec r8d movsx r8d, r8w shr r8d, 1 movsx r8, r8w movss xmm3, dword ptr [r14+r8*4] mulss xmm3, xmm0 subss xmm3, dword ptr [r12+rdi*4] movss xmm4, dword ptr [r15+rdi*4] mulss xmm4, xmm3 mulss xmm4, xmm3 addss xmm1, xmm4 inc rdi cmp rdi, 8 jnz short loc_3C994 ucomiss xmm2, xmm1 cmova eax, edx minss xmm1, xmm2 inc rcx movaps xmm2, xmm1 cmp rcx, rbp jnz short loc_3C985 test eax, eax jns loc_3CA85 mov eax, 0FFFFFFFFh xor ecx, ecx movaps xmm2, cs:xmmword_4C080 mov rdx, rbx loc_3CA0F: movss xmm4, dword ptr [r12+rcx*4] xorps xmm4, xmm2 xorps xmm3, xmm3 xor esi, esi loc_3CA1D: movsx edi, byte ptr [rdx+rsi] lea r8d, [rdi-1] movzx r8d, r8w shr r8d, 0Fh add edi, r8d dec edi movsx edi, di shr edi, 1 movsx rdi, di movss xmm5, dword ptr [r14+rdi*4] mulss xmm5, xmm0 addss xmm5, xmm4 movss xmm6, dword ptr [r15+rsi*4] mulss xmm6, xmm5 mulss xmm6, xmm5 addss xmm3, xmm6 inc rsi cmp rsi, 8 jnz short loc_3CA1D ucomiss xmm1, xmm3 cmova eax, ecx minss xmm3, xmm1 inc rcx add rdx, 8 movaps xmm1, xmm3 cmp rcx, 800h jnz short loc_3CA0F test eax, eax js short loc_3CAEE loc_3CA85: mov ecx, eax movq xmm0, qword ptr [rbx+rcx*8] punpcklbw xmm0, xmm0 psraw xmm0, 8 pcmpeqd xmm1, xmm1 paddw xmm1, xmm0 movdqa xmm0, xmm1 psrlw xmm0, 0Fh paddw xmm0, xmm1 psrlw xmm0, 1 pand xmm0, cs:xmmword_51100 packuswb xmm0, xmm0 movq qword ptr [r9], xmm0 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3CACF: lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNumNeighbors0; "num_neighbors > 0" mov esi, 0FD6h jmp loc_3CBB5 loc_3CAEE: lea rdi, aOopsDidNotFind; "Oops, did not find grid point" mov [rsp+38h+var_38], r11 call _puts lea rdi, aHaveDNeighbour; "Have %d neighbours\n" mov rsi, [rsp+38h+var_38] xor eax, eax call _printf mov esi, 1 loc_3CB15: movzx eax, word ptr [r13+rsi*2+0] lea rax, [rbx+rax*8] xorps xmm0, xmm0 xor ecx, ecx loc_3CB24: movsx edx, byte ptr [rax+rcx] lea edi, [rdx-1] movzx edi, di shr edi, 0Fh add edx, edi dec edx movsx edx, dx shr edx, 1 movsx rdx, dx movss xmm1, dword ptr [r14+rdx*4] movss xmm2, dword ptr [r15+rcx*4] mulss xmm2, xmm1 shufps xmm2, xmm2, 0 movss xmm3, dword ptr [r12+rcx*4] unpcklps xmm1, xmm3 mulps xmm1, xmm2 addps xmm0, xmm1 inc rcx cmp rcx, 8 jnz short loc_3CB24 xorps xmm1, xmm1 cvtss2sd xmm1, xmm0 shufps xmm0, xmm0, 55h ; 'U' cvtss2sd xmm0, xmm0 lea rdi, aNeighbourDSumq; " neighbour %d: sumqx = %g sumq2 = %g"... mov al, 2 mov [rsp+38h+var_38], rsi call _printf mov rsi, [rsp+38h+var_38] inc rsi cmp rsi, rbp jnz loc_3CB15 lea rdi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGridIndex0; "grid_index >= 0" mov esi, 1006h loc_3CBB5: xor eax, eax call _ggml_abort
long long iq1_find_best_neighbour2( _WORD *a1, long long a2, long long a3, long long a4, long long a5, _QWORD *a6, double a7) { long long v7; // r11 long long v13; // rbp long long result; // rax float v15; // xmm2_4 long long v16; // rcx float v17; // xmm1_4 long long i; // rdi __int16 v19; // r8 float v20; // xmm3_4 float v21; // xmm1_4 long long v22; // rcx long long v23; // rdx double v24; // xmm3_8 long long j; // rsi float v26; // xmm5_4 __m128i v27; // xmm0 __m128i v28; // xmm1 __m128i v29; // xmm0 const char *v30; // rcx int v31; // esi long long v32; // rsi long long v33; // rax __m128 v34; // xmm0 long long k; // rcx __m128 v36; // xmm1 __m128 v37; // xmm2 int v38; // [rsp+0h] [rbp-38h] v7 = (unsigned __int16)*a1; if ( !*a1 ) { v30 = "num_neighbors > 0"; v31 = 4054; goto LABEL_23; } v13 = v7 + 1; result = 0xFFFFFFFFLL; v15 = 3.4028235e38; v16 = 1LL; do { v17 = 0.0; for ( i = 0LL; i != 8; ++i ) { v19 = *(char *)(a2 + 8LL * (unsigned __int16)a1[v16] + i); v20 = (float)(*(float *)(a5 + 4LL * (__int16)((unsigned int)(__int16)(((unsigned __int16)(v19 - 1) >> 15) + v19 - 1) >> 1)) * *(float *)&a7) - *(float *)(a3 + 4 * i); v17 = v17 + (float)((float)(*(float *)(a4 + 4 * i) * v20) * v20); } if ( v15 > v17 ) result = (unsigned __int16)a1[v16]; v21 = fminf(v17, v15); ++v16; v15 = v21; } while ( v16 != v13 ); if ( (int)result < 0 ) { result = 0xFFFFFFFFLL; v22 = 0LL; v23 = a2; do { v24 = 0.0; for ( j = 0LL; j != 8; ++j ) { v26 = (float)(*(float *)(a5 + 4LL * (__int16)((unsigned int)(__int16)(((unsigned __int16)(*(char *)(v23 + j) - 1) >> 15) + *(char *)(v23 + j) - 1) >> 1)) * *(float *)&a7) - *(float *)(a3 + 4 * v22); *(float *)&v24 = *(float *)&v24 + (float)((float)(*(float *)(a4 + 4 * j) * v26) * v26); } if ( v21 > *(float *)&v24 ) result = (unsigned int)v22; *(float *)&v24 = fminf(*(float *)&v24, v21); ++v22; v23 += 8LL; v21 = *(float *)&v24; } while ( v22 != 2048 ); if ( (int)result < 0 ) { v38 = v7; puts("Oops, did not find grid point", 8LL, v23, a7, v24, COERCE_DOUBLE(0x8000000080000000LL)); printf("Have %d neighbours\n", v38); v32 = 1LL; do { v34 = 0LL; for ( k = 0LL; k != 8; ++k ) { v33 = a2 + 8LL * (unsigned __int16)a1[v32]; v36 = (__m128)*(unsigned int *)(a5 + 4LL * (__int16)((unsigned int)(__int16)(((unsigned __int16)(*(char *)(v33 + k) - 1) >> 15) + *(char *)(v33 + k) - 1) >> 1)); v37 = (__m128)*(unsigned int *)(a4 + 4 * k); v37.m128_f32[0] = v37.m128_f32[0] * v36.m128_f32[0]; v34 = _mm_add_ps( v34, _mm_mul_ps(_mm_unpacklo_ps(v36, (__m128)*(unsigned int *)(a3 + 4 * k)), _mm_shuffle_ps(v37, v37, 0))); } printf( " neighbour %d: sumqx = %g sumq2 = %g\n", v32++, _mm_shuffle_ps(v34, v34, 85).m128_f32[0], v34.m128_f32[0]); } while ( v32 != v13 ); v30 = "grid_index >= 0"; v31 = 4102; LABEL_23: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", v31, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v30, a5, (_DWORD)a6); } } v27 = _mm_loadl_epi64((const __m128i *)(a2 + 8LL * (unsigned int)result)); v28 = _mm_add_epi16((__m128i)-1LL, _mm_srai_epi16(_mm_unpacklo_epi8(v27, v27), 8u)); v29 = _mm_and_si128(_mm_srli_epi16(_mm_add_epi16(_mm_srli_epi16(v28, 0xFu), v28), 1u), (__m128i)xmmword_51100); *a6 = _mm_packus_epi16(v29, v29).m128i_u64[0]; return result; }
iq1_find_best_neighbour2: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOVZX R11D,word ptr [RDI] TEST R11D,R11D JZ 0x0013cacf MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBX,RSI MOV R13,RDI LEA RBP,[R11 + 0x1] MOV EAX,0xffffffff MOVSS XMM2,dword ptr [0x001512b8] MOV ECX,0x1 LAB_0013c985: MOVZX EDX,word ptr [R13 + RCX*0x2] LEA RSI,[RBX + RDX*0x8] XORPS XMM1,XMM1 XOR EDI,EDI LAB_0013c994: MOVSX R8D,byte ptr [RSI + RDI*0x1] LEA R10D,[R8 + -0x1] MOVZX R10D,R10W SHR R10D,0xf ADD R8D,R10D DEC R8D MOVSX R8D,R8W SHR R8D,0x1 MOVSX R8,R8W MOVSS XMM3,dword ptr [R14 + R8*0x4] MULSS XMM3,XMM0 SUBSS XMM3,dword ptr [R12 + RDI*0x4] MOVSS XMM4,dword ptr [R15 + RDI*0x4] MULSS XMM4,XMM3 MULSS XMM4,XMM3 ADDSS XMM1,XMM4 INC RDI CMP RDI,0x8 JNZ 0x0013c994 UCOMISS XMM2,XMM1 CMOVA EAX,EDX MINSS XMM1,XMM2 INC RCX MOVAPS XMM2,XMM1 CMP RCX,RBP JNZ 0x0013c985 TEST EAX,EAX JNS 0x0013ca85 MOV EAX,0xffffffff XOR ECX,ECX MOVAPS XMM2,xmmword ptr [0x0014c080] MOV RDX,RBX LAB_0013ca0f: MOVSS XMM4,dword ptr [R12 + RCX*0x4] XORPS XMM4,XMM2 XORPS XMM3,XMM3 XOR ESI,ESI LAB_0013ca1d: MOVSX EDI,byte ptr [RDX + RSI*0x1] LEA R8D,[RDI + -0x1] MOVZX R8D,R8W SHR R8D,0xf ADD EDI,R8D DEC EDI MOVSX EDI,DI SHR EDI,0x1 MOVSX RDI,DI MOVSS XMM5,dword ptr [R14 + RDI*0x4] MULSS XMM5,XMM0 ADDSS XMM5,XMM4 MOVSS XMM6,dword ptr [R15 + RSI*0x4] MULSS XMM6,XMM5 MULSS XMM6,XMM5 ADDSS XMM3,XMM6 INC RSI CMP RSI,0x8 JNZ 0x0013ca1d UCOMISS XMM1,XMM3 CMOVA EAX,ECX MINSS XMM3,XMM1 INC RCX ADD RDX,0x8 MOVAPS XMM1,XMM3 CMP RCX,0x800 JNZ 0x0013ca0f TEST EAX,EAX JS 0x0013caee LAB_0013ca85: MOV ECX,EAX MOVQ XMM0,qword ptr [RBX + RCX*0x8] PUNPCKLBW XMM0,XMM0 PSRAW XMM0,0x8 PCMPEQD XMM1,XMM1 PADDW XMM1,XMM0 MOVDQA XMM0,XMM1 PSRLW XMM0,0xf PADDW XMM0,XMM1 PSRLW XMM0,0x1 PAND XMM0,xmmword ptr [0x00151100] PACKUSWB XMM0,XMM0 MOVQ qword ptr [R9],XMM0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013cacf: LEA RDI,[0x15bcf4] LEA RDX,[0x14c665] LEA RCX,[0x15cf22] MOV ESI,0xfd6 JMP 0x0013cbb5 LAB_0013caee: LEA RDI,[0x15d0e8] MOV qword ptr [RSP],R11 CALL 0x00117a20 LEA RDI,[0x15d015] MOV RSI,qword ptr [RSP] XOR EAX,EAX CALL 0x001160a0 MOV ESI,0x1 LAB_0013cb15: MOVZX EAX,word ptr [R13 + RSI*0x2] LEA RAX,[RBX + RAX*0x8] XORPS XMM0,XMM0 XOR ECX,ECX LAB_0013cb24: MOVSX EDX,byte ptr [RAX + RCX*0x1] LEA EDI,[RDX + -0x1] MOVZX EDI,DI SHR EDI,0xf ADD EDX,EDI DEC EDX MOVSX EDX,DX SHR EDX,0x1 MOVSX RDX,DX MOVSS XMM1,dword ptr [R14 + RDX*0x4] MOVSS XMM2,dword ptr [R15 + RCX*0x4] MULSS XMM2,XMM1 SHUFPS XMM2,XMM2,0x0 MOVSS XMM3,dword ptr [R12 + RCX*0x4] UNPCKLPS XMM1,XMM3 MULPS XMM1,XMM2 ADDPS XMM0,XMM1 INC RCX CMP RCX,0x8 JNZ 0x0013cb24 XORPS XMM1,XMM1 CVTSS2SD XMM1,XMM0 SHUFPS XMM0,XMM0,0x55 CVTSS2SD XMM0,XMM0 LEA RDI,[0x15d029] MOV AL,0x2 MOV qword ptr [RSP],RSI CALL 0x001160a0 MOV RSI,qword ptr [RSP] INC RSI CMP RSI,RBP JNZ 0x0013cb15 LEA RDI,[0x15bcf4] LEA RDX,[0x14c665] LEA RCX,[0x15cf34] MOV ESI,0x1006 LAB_0013cbb5: XOR EAX,EAX CALL 0x00117cd0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void iq1_find_best_neighbour2 (float param_1,ushort *param_2,long param_3,long param_4,long param_5,long param_6, int8 *param_7) { long lVar1; char cVar2; uint uVar3; ulong uVar4; long lVar5; ulong uVar6; char *pcVar7; int8 uVar8; long lVar9; ushort uVar10; ushort uVar20; ushort uVar21; ushort uVar23; float fVar22; ushort uVar24; ushort uVar25; ushort uVar26; int1 auVar11 [16]; int1 auVar18 [16]; ushort uVar27; short sVar28; short sVar29; short sVar30; short sVar31; short sVar32; short sVar33; short sVar34; short sVar35; float fVar36; float fVar37; int1 auVar12 [16]; int1 auVar13 [16]; int1 auVar14 [16]; int1 auVar15 [16]; int1 auVar16 [16]; int1 auVar17 [16]; int1 uVar19; uVar10 = *param_2; if (uVar10 == 0) { pcVar7 = "num_neighbors > 0"; uVar8 = 0xfd6; LAB_0013cbb5: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,uVar8,"GGML_ASSERT(%s) failed",pcVar7); } lVar1 = (ulong)uVar10 + 1; uVar4 = 0xffffffff; lVar5 = 1; fVar22 = DAT_001512b8; do { fVar37 = 0.0; lVar9 = 0; do { cVar2 = *(char *)(param_3 + (ulong)param_2[lVar5] * 8 + lVar9); fVar36 = *(float *)(param_6 + (long)(short)((uint)(int)(short)((short)cVar2 + (short)(((int)cVar2 - 1U & 0xffff) >> 0xf) + -1) >> 1) * 4) * param_1 - *(float *)(param_4 + lVar9 * 4); fVar37 = fVar37 + *(float *)(param_5 + lVar9 * 4) * fVar36 * fVar36; lVar9 = lVar9 + 1; } while (lVar9 != 8); if (fVar37 < fVar22) { uVar4 = (ulong)param_2[lVar5]; } uVar3 = (uint)uVar4; if (fVar22 <= fVar37) { fVar37 = fVar22; } fVar22 = fVar37; lVar5 = lVar5 + 1; } while (lVar5 != lVar1); if ((int)uVar3 < 0) { uVar4 = 0xffffffff; uVar6 = 0; lVar5 = param_3; do { fVar37 = 0.0; lVar9 = 0; do { fVar36 = *(float *)(param_6 + (long)(short)((uint)(int)(short)((short)*(char *)(lVar5 + lVar9) + (short)(((int)*(char *)(lVar5 + lVar9) - 1U & 0xffff) >> 0xf) + -1) >> 1 ) * 4) * param_1 + (float)(*(uint *)(param_4 + uVar6 * 4) ^ _DAT_0014c080); fVar37 = fVar37 + *(float *)(param_5 + lVar9 * 4) * fVar36 * fVar36; lVar9 = lVar9 + 1; } while (lVar9 != 8); if (fVar37 < fVar22) { uVar4 = uVar6 & 0xffffffff; } uVar3 = (uint)uVar4; if (fVar22 <= fVar37) { fVar37 = fVar22; } uVar6 = uVar6 + 1; lVar5 = lVar5 + 8; fVar22 = fVar37; } while (uVar6 != 0x800); if ((int)uVar3 < 0) { puts("Oops, did not find grid point"); printf("Have %d neighbours\n",(ulong)uVar10); lVar5 = 1; do { fVar22 = 0.0; lVar9 = 0; do { cVar2 = *(char *)(param_3 + (ulong)param_2[lVar5] * 8 + lVar9); fVar22 = fVar22 + *(float *)(param_4 + lVar9 * 4) * *(float *)(param_5 + lVar9 * 4) * *(float *)(param_6 + (long)(short)((uint)(int)(short)((short)cVar2 + (short)(((int)cVar2 - 1U & 0xffff) >> 0xf) + -1) >> 1) * 4); lVar9 = lVar9 + 1; } while (lVar9 != 8); printf(" neighbour %d: sumqx = %g sumq2 = %g\n",(double)fVar22); lVar5 = lVar5 + 1; } while (lVar5 != lVar1); pcVar7 = "grid_index >= 0"; uVar8 = 0x1006; goto LAB_0013cbb5; } } uVar4 = *(ulong *)(param_3 + (ulong)uVar3 * 8); uVar19 = (int1)(uVar4 >> 0x38); auVar17._8_6_ = 0; auVar17._0_8_ = uVar4; auVar17[0xe] = uVar19; auVar17[0xf] = uVar19; uVar19 = (int1)(uVar4 >> 0x30); auVar16._14_2_ = auVar17._14_2_; auVar16._8_5_ = 0; auVar16._0_8_ = uVar4; auVar16[0xd] = uVar19; auVar15._13_3_ = auVar16._13_3_; auVar15._8_4_ = 0; auVar15._0_8_ = uVar4; auVar15[0xc] = uVar19; uVar19 = (int1)(uVar4 >> 0x28); auVar14._12_4_ = auVar15._12_4_; auVar14._8_3_ = 0; auVar14._0_8_ = uVar4; auVar14[0xb] = uVar19; auVar13._11_5_ = auVar14._11_5_; auVar13._8_2_ = 0; auVar13._0_8_ = uVar4; auVar13[10] = uVar19; uVar19 = (int1)(uVar4 >> 0x20); auVar12._10_6_ = auVar13._10_6_; auVar12[8] = 0; auVar12._0_8_ = uVar4; auVar12[9] = uVar19; auVar11._9_7_ = auVar12._9_7_; auVar11[8] = uVar19; auVar11._0_8_ = uVar4; uVar19 = (int1)(uVar4 >> 0x18); auVar18._8_8_ = auVar11._8_8_; auVar18[7] = uVar19; auVar18[6] = uVar19; uVar19 = (int1)(uVar4 >> 0x10); auVar18[5] = uVar19; auVar18[4] = uVar19; uVar19 = (int1)(uVar4 >> 8); auVar18[3] = uVar19; auVar18[2] = uVar19; auVar18[0] = (int1)uVar4; auVar18[1] = auVar18[0]; auVar18 = psraw(auVar18,8); sVar28 = auVar18._0_2_ + -1; sVar29 = auVar18._2_2_ + -1; sVar30 = auVar18._4_2_ + -1; sVar31 = auVar18._6_2_ + -1; sVar32 = auVar18._8_2_ + -1; sVar33 = auVar18._10_2_ + -1; sVar34 = auVar18._12_2_ + -1; sVar35 = auVar18._14_2_ + -1; uVar10 = (ushort)(sVar28 - (sVar28 >> 0xf)) >> 1 & _DAT_00151100; uVar20 = (ushort)(sVar29 - (sVar29 >> 0xf)) >> 1 & _UNK_00151102; uVar21 = (ushort)(sVar30 - (sVar30 >> 0xf)) >> 1 & _UNK_00151104; uVar23 = (ushort)(sVar31 - (sVar31 >> 0xf)) >> 1 & _UNK_00151106; uVar24 = (ushort)(sVar32 - (sVar32 >> 0xf)) >> 1 & _UNK_00151108; uVar25 = (ushort)(sVar33 - (sVar33 >> 0xf)) >> 1 & _UNK_0015110a; uVar26 = (ushort)(sVar34 - (sVar34 >> 0xf)) >> 1 & _UNK_0015110c; uVar27 = (ushort)(sVar35 - (sVar35 >> 0xf)) >> 1 & _UNK_0015110e; *param_7 = CONCAT17((uVar27 != 0) * (uVar27 < 0x100) * (char)uVar27 - (0xff < uVar27), CONCAT16((uVar26 != 0) * (uVar26 < 0x100) * (char)uVar26 - (0xff < uVar26), CONCAT15((uVar25 != 0) * (uVar25 < 0x100) * (char)uVar25 - (0xff < uVar25), CONCAT14((uVar24 != 0) * (uVar24 < 0x100) * (char)uVar24 - (0xff < uVar24), CONCAT13((uVar23 != 0) * (uVar23 < 0x100) * (char)uVar23 - (0xff < uVar23), CONCAT12((uVar21 != 0) * (uVar21 < 0x100) * (char)uVar21 - (0xff < uVar21), CONCAT11((uVar20 != 0) * (uVar20 < 0x100) * (char)uVar20 - (0xff < uVar20), (uVar10 != 0) * (uVar10 < 0x100) * (char)uVar10 - (0xff < uVar10)))))))); return; }
32
coro::detail::sync_wait_task_promise_base::unhandled_exception()
AlayaLite/build_O3/_deps/libcoro-src/include/coro/sync_wait.hpp
auto unhandled_exception() -> void { m_exception = std::current_exception(); }
O3
cpp
coro::detail::sync_wait_task_promise_base::unhandled_exception(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x32e0 movq (%r14), %rax movq $0x0, (%r14) movq 0x8(%rbx), %rcx movq %rcx, 0x10(%rsp) movq %rax, 0x8(%rbx) testq %rcx, %rcx je 0x4e05 leaq 0x10(%rsp), %rdi callq 0x3270 cmpq $0x0, 0x8(%rsp) je 0x4e05 leaq 0x8(%rsp), %rdi callq 0x3270 addq $0x18, %rsp popq %rbx popq %r14 retq nop
_ZN4coro6detail27sync_wait_task_promise_base19unhandled_exceptionEv: push r14 push rbx sub rsp, 18h mov rbx, rdi lea r14, [rsp+28h+var_20] mov rdi, r14 call __ZSt17current_exceptionv; std::current_exception(void) mov rax, [r14] mov qword ptr [r14], 0 mov rcx, [rbx+8] mov [rsp+28h+var_18], rcx mov [rbx+8], rax test rcx, rcx jz short loc_4E05 lea rdi, [rsp+28h+var_18]; this call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void) cmp [rsp+28h+var_20], 0 jz short loc_4E05 lea rdi, [rsp+28h+var_20]; this call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void) loc_4E05: add rsp, 18h pop rbx pop r14 retn
long long coro::detail::sync_wait_task_promise_base::unhandled_exception( coro::detail::sync_wait_task_promise_base *this) { long long result; // rax long long v2; // rcx long long v3; // [rsp+8h] [rbp-20h] BYREF _QWORD v4[3]; // [rsp+10h] [rbp-18h] BYREF std::current_exception(); result = v3; v3 = 0LL; v4[0] = *((_QWORD *)this + 1); v2 = v4[0]; *((_QWORD *)this + 1) = result; if ( v2 ) { result = std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)v4); if ( v3 ) return std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)&v3); } return result; }
unhandled_exception: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x001032e0 MOV RAX,qword ptr [R14] MOV qword ptr [R14],0x0 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RBX + 0x8],RAX TEST RCX,RCX JZ 0x00104e05 LEA RDI,[RSP + 0x10] CALL 0x00103270 CMP qword ptr [RSP + 0x8],0x0 JZ 0x00104e05 LEA RDI,[RSP + 0x8] CALL 0x00103270 LAB_00104e05: ADD RSP,0x18 POP RBX POP R14 RET
/* WARNING: Removing unreachable block (ram,0x00104dfb) */ /* coro::detail::sync_wait_task_promise_base::unhandled_exception() */ void __thiscall coro::detail::sync_wait_task_promise_base::unhandled_exception(sync_wait_task_promise_base *this) { long lVar1; int8 local_20; std::current_exception(); lVar1 = *(long *)(this + 8); *(int8 *)(this + 8) = local_20; if (lVar1 != 0) { std::__exception_ptr::exception_ptr::_M_release(); } return; }
33
coro::thread_pool::schedule_impl(std::__n4861::coroutine_handle<void>)
AlayaLite/build_O3/_deps/libcoro-src/src/thread_pool.cpp
auto thread_pool::schedule_impl(std::coroutine_handle<> handle) noexcept -> void { if (handle == nullptr || handle.done()) { return; } { std::scoped_lock lk{m_wait_mutex}; m_queue.emplace_back(handle); m_wait_cv.notify_one(); } }
O3
cpp
coro::thread_pool::schedule_impl(std::__n4861::coroutine_handle<void>): pushq %r14 pushq %rbx pushq %rax movq %rsi, (%rsp) testq %rsi, %rsi je 0x3f8c cmpq $0x0, (%rsi) je 0x3f8c movq %rdi, %rbx leaq 0x68(%rdi), %r14 movq %r14, %rdi callq 0x2220 testl %eax, %eax jne 0x3f94 leaq 0xd0(%rbx), %rdi movq %rsp, %rsi callq 0x494c addq $0x90, %rbx movq %rbx, %rdi callq 0x499a movq %r14, %rdi callq 0x2120 addq $0x8, %rsp popq %rbx popq %r14 retq movl %eax, %edi callq 0x20e0 movq %rax, %rdi callq 0x2ed6 nop
_ZN4coro11thread_pool13schedule_implENSt7__n486116coroutine_handleIvEE: push r14 push rbx push rax mov [rsp+18h+var_18], rsi test rsi, rsi jz short loc_3F8C cmp qword ptr [rsi], 0 jz short loc_3F8C mov rbx, rdi lea r14, [rdi+68h] mov rdi, r14 call _pthread_mutex_lock test eax, eax jnz short loc_3F94 lea rdi, [rbx+0D0h] mov rsi, rsp call _ZNSt5dequeINSt7__n486116coroutine_handleIvEESaIS2_EE12emplace_backIJRS2_EEES6_DpOT_; std::deque<std::__n4861::coroutine_handle<void>>::emplace_back<std::__n4861::coroutine_handle<void>&>(std::__n4861::coroutine_handle<void>&) add rbx, 90h mov rdi, rbx; this call _ZNSt3_V222condition_variable_any10notify_oneEv; std::_V2::condition_variable_any::notify_one(void) mov rdi, r14 call _pthread_mutex_unlock loc_3F8C: add rsp, 8 pop rbx pop r14 retn loc_3F94: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rdi, rax call __clang_call_terminate
void coro::thread_pool::schedule_impl(long long a1, _QWORD *a2) { int v2; // eax _QWORD *v3; // [rsp+0h] [rbp-18h] BYREF v3 = a2; if ( a2 && *a2 ) { v2 = pthread_mutex_lock(a1 + 104); if ( v2 ) std::__throw_system_error(v2); std::deque<std::__n4861::coroutine_handle<void>>::emplace_back<std::__n4861::coroutine_handle<void>&>(a1 + 208, &v3); std::_V2::condition_variable_any::notify_one((std::_V2::condition_variable_any *)(a1 + 144)); pthread_mutex_unlock(a1 + 104); } }
schedule_impl: PUSH R14 PUSH RBX PUSH RAX MOV qword ptr [RSP],RSI TEST RSI,RSI JZ 0x00103f8c CMP qword ptr [RSI],0x0 JZ 0x00103f8c MOV RBX,RDI LEA R14,[RDI + 0x68] MOV RDI,R14 CALL 0x00102220 TEST EAX,EAX JNZ 0x00103f94 LEA RDI,[RBX + 0xd0] LAB_00103f6d: MOV RSI,RSP CALL 0x0010494c ADD RBX,0x90 MOV RDI,RBX CALL 0x0010499a MOV RDI,R14 CALL 0x00102120 LAB_00103f8c: ADD RSP,0x8 POP RBX POP R14 RET LAB_00103f94: MOV EDI,EAX CALL 0x001020e0 LAB_00103f9b: MOV RDI,RAX CALL 0x00102ed6
/* coro::thread_pool::schedule_impl(std::__n4861::coroutine_handle<void>) */ void __thiscall coro::thread_pool::schedule_impl(thread_pool *this,long *param_2) { int iVar1; int8 uVar2; long *local_18; if ((param_2 != (long *)0x0) && (*param_2 != 0)) { local_18 = param_2; iVar1 = pthread_mutex_lock((pthread_mutex_t *)(this + 0x68)); if (iVar1 != 0) { uVar2 = std::__throw_system_error(iVar1); /* catch(type#1 @ 00000000) { ... } // from try @ 00103f6d with catch @ 00103f9b */ /* WARNING: Subroutine does not return */ __clang_call_terminate(uVar2); } /* try { // try from 00103f6d to 00103f9a has its CatchHandler @ 00103f9b */ std:: deque<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>> ::emplace_back<std::__n4861::coroutine_handle<void>&> ((deque<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>> *)(this + 0xd0),(coroutine_handle *)&local_18); std::_V2::condition_variable_any::notify_one((condition_variable_any *)(this + 0x90)); pthread_mutex_unlock((pthread_mutex_t *)(this + 0x68)); } return; }
34
Common::GetEscapedHtml(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Dolphin-anty/Source/Core/Common/StringUtil.cpp
std::string GetEscapedHtml(std::string html) { static constexpr std::array<std::array<const char*, 2>, 5> replacements{{ // Escape ampersand first to avoid escaping the ampersands in other replacements {{"&", "&amp;"}}, {{"<", "&lt;"}}, {{">", "&gt;"}}, {{"\"", "&quot;"}}, {{"'", "&apos;"}}, }}; for (const auto& [unescaped, escaped] : replacements) { html = ReplaceAll(html, unescaped, escaped); } return html; }
O0
cpp
Common::GetEscapedHtml(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): subq $0xb8, %rsp movq %rsi, (%rsp) movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xb0(%rsp) movq %rsi, 0xa8(%rsp) leaq 0x9c6f1(%rip), %rax # 0xc5710 movq %rax, 0xa0(%rsp) leaq 0x9c6e2(%rip), %rdi # 0xc5710 callq 0x2b2b0 movq %rax, 0x98(%rsp) leaq 0x9c6ce(%rip), %rdi # 0xc5710 callq 0x2b2c0 movq %rax, 0x90(%rsp) movq 0x98(%rsp), %rax cmpq 0x90(%rsp), %rax je 0x2912f movq 0x98(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rdi callq 0x2b2e0 movq %rax, 0x80(%rsp) movq 0x88(%rsp), %rdi callq 0x2b300 movq (%rsp), %rsi movq %rax, 0x78(%rsp) leaq 0x38(%rsp), %rdi callq 0x163c0 movq 0x80(%rsp), %rax movq (%rax), %rsi leaq 0x28(%rsp), %rdi callq 0x2b320 movq 0x78(%rsp), %rax movq (%rax), %rsi leaq 0x18(%rsp), %rdi callq 0x2b320 movq 0x28(%rsp), %rdx movq 0x30(%rsp), %rcx movq 0x18(%rsp), %r8 movq 0x20(%rsp), %r9 leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rsi callq 0x28a00 movq (%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x1a3d0 leaq 0x58(%rsp), %rdi callq 0x12a10 leaq 0x38(%rsp), %rdi callq 0x12a10 movq 0x98(%rsp), %rax addq $0x10, %rax movq %rax, 0x98(%rsp) jmp 0x2904f movq (%rsp), %rsi movq 0x8(%rsp), %rdi callq 0x19d30 movq 0x10(%rsp), %rax addq $0xb8, %rsp retq nopw (%rax,%rax)
_ZN6Common14GetEscapedHtmlENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 0B8h mov [rsp+0B8h+var_B8], rsi mov [rsp+0B8h+var_B0], rdi mov rax, rdi mov [rsp+0B8h+var_A8], rax mov [rsp+0B8h+var_8], rdi mov [rsp+0B8h+var_10], rsi lea rax, _ZZN6Common14GetEscapedHtmlENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE12replacements; Common::GetEscapedHtml(std::string)::replacements mov [rsp+0B8h+var_18], rax lea rdi, _ZZN6Common14GetEscapedHtmlENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE12replacements; Common::GetEscapedHtml(std::string)::replacements call _ZNKSt5arrayIS_IPKcLm2EELm5EE5beginEv; std::array<std::array<char const*,2ul>,5ul>::begin(void) mov [rsp+0B8h+var_20], rax lea rdi, _ZZN6Common14GetEscapedHtmlENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE12replacements; Common::GetEscapedHtml(std::string)::replacements call _ZNKSt5arrayIS_IPKcLm2EELm5EE3endEv; std::array<std::array<char const*,2ul>,5ul>::end(void) mov [rsp+0B8h+var_28], rax loc_2904F: mov rax, [rsp+0B8h+var_20] cmp rax, [rsp+0B8h+var_28] jz loc_2912F mov rax, [rsp+0B8h+var_20] mov [rsp+0B8h+var_30], rax mov rdi, [rsp+0B8h+var_30] call _ZSt3getILm0EPKcLm2EERKT0_RKSt5arrayIS2_XT1_EE; std::get<0ul,char const*,2ul>(std::array<char const*,2ul> const&) mov [rsp+0B8h+var_38], rax mov rdi, [rsp+0B8h+var_30] call _ZSt3getILm1EPKcLm2EERKT0_RKSt5arrayIS2_XT1_EE; std::get<1ul,char const*,2ul>(std::array<char const*,2ul> const&) mov rsi, [rsp+0B8h+var_B8] mov [rsp+0B8h+var_40], rax lea rdi, [rsp+0B8h+var_80] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov rax, [rsp+0B8h+var_38] mov rsi, [rax] lea rdi, [rsp+0B8h+var_90] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rax, [rsp+0B8h+var_40] mov rsi, [rax] lea rdi, [rsp+0B8h+var_A0] call _ZNSt17basic_string_viewIcSt11char_traitsIcEEC2EPKc; std::string_view::basic_string_view(char const*) mov rdx, [rsp+0B8h+var_90] mov rcx, [rsp+0B8h+var_88] mov r8, [rsp+0B8h+var_A0] mov r9, [rsp+0B8h+var_98] lea rdi, [rsp+0B8h+var_60] lea rsi, [rsp+0B8h+var_80] call _Z10ReplaceAllNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt17basic_string_viewIcS2_ES6_; ReplaceAll(std::string,std::string_view,std::string_view) mov rdi, [rsp+0B8h+var_B8] lea rsi, [rsp+0B8h+var_60] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+0B8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0B8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rsp+0B8h+var_20] add rax, 10h mov [rsp+0B8h+var_20], rax jmp loc_2904F loc_2912F: mov rsi, [rsp+0B8h+var_B8] mov rdi, [rsp+0B8h+var_B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EOS4_; std::string::basic_string(std::string&&) mov rax, [rsp+0B8h+var_A8] add rsp, 0B8h retn
_QWORD * Common::GetEscapedHtml(_QWORD *a1, _QWORD *a2) { long long v3[2]; // [rsp+18h] [rbp-A0h] BYREF long long v4[2]; // [rsp+28h] [rbp-90h] BYREF _QWORD v5[4]; // [rsp+38h] [rbp-80h] BYREF _QWORD v6[4]; // [rsp+58h] [rbp-60h] BYREF _QWORD *v7; // [rsp+78h] [rbp-40h] _QWORD *v8; // [rsp+80h] [rbp-38h] long long v9; // [rsp+88h] [rbp-30h] long long v10; // [rsp+90h] [rbp-28h] long long v11; // [rsp+98h] [rbp-20h] char **v12; // [rsp+A0h] [rbp-18h] _QWORD *v13; // [rsp+A8h] [rbp-10h] _QWORD *v14; // [rsp+B0h] [rbp-8h] v14 = a1; v13 = a2; v12 = Common::GetEscapedHtml(std::string)::replacements; v11 = std::array<std::array<char const*,2ul>,5ul>::begin(Common::GetEscapedHtml(std::string)::replacements); v10 = std::array<std::array<char const*,2ul>,5ul>::end(Common::GetEscapedHtml(std::string)::replacements); while ( v11 != v10 ) { v9 = v11; v8 = (_QWORD *)std::get<0ul,char const*,2ul>(v11); v7 = (_QWORD *)std::get<1ul,char const*,2ul>(v9); std::string::basic_string((long long)v5, (long long)a2); std::string_view::basic_string_view(v4, *v8); std::string_view::basic_string_view(v3, *v7); ReplaceAll(v6, v5, v4[0], v4[1], v3[0], v3[1]); std::string::operator=(a2, v6); std::string::~string(v6); std::string::~string(v5); v11 += 16LL; } std::string::basic_string(a1, a2); return a1; }
GetEscapedHtml: SUB RSP,0xb8 MOV qword ptr [RSP],RSI MOV qword ptr [RSP + 0x8],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0xb0],RDI MOV qword ptr [RSP + 0xa8],RSI LEA RAX,[0x1c5710] MOV qword ptr [RSP + 0xa0],RAX LEA RDI,[0x1c5710] CALL 0x0012b2b0 MOV qword ptr [RSP + 0x98],RAX LEA RDI,[0x1c5710] CALL 0x0012b2c0 MOV qword ptr [RSP + 0x90],RAX LAB_0012904f: MOV RAX,qword ptr [RSP + 0x98] CMP RAX,qword ptr [RSP + 0x90] JZ 0x0012912f MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x88] CALL 0x0012b2e0 MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x88] CALL 0x0012b300 MOV RSI,qword ptr [RSP] MOV qword ptr [RSP + 0x78],RAX LEA RDI,[RSP + 0x38] CALL 0x001163c0 MOV RAX,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RAX] LEA RDI,[RSP + 0x28] CALL 0x0012b320 MOV RAX,qword ptr [RSP + 0x78] MOV RSI,qword ptr [RAX] LEA RDI,[RSP + 0x18] CALL 0x0012b320 MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x18] MOV R9,qword ptr [RSP + 0x20] LEA RDI,[RSP + 0x58] LEA RSI,[RSP + 0x38] CALL 0x00128a00 MOV RDI,qword ptr [RSP] LEA RSI,[RSP + 0x58] CALL 0x0011a3d0 LEA RDI,[RSP + 0x58] CALL 0x00112a10 LEA RDI,[RSP + 0x38] CALL 0x00112a10 MOV RAX,qword ptr [RSP + 0x98] ADD RAX,0x10 MOV qword ptr [RSP + 0x98],RAX JMP 0x0012904f LAB_0012912f: MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x8] CALL 0x00119d30 MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0xb8 RET
/* Common::GetEscapedHtml(std::__cxx11::string) */ Common * __thiscall Common::GetEscapedHtml(Common *this,string *param_2) { int8 local_a0; int8 local_98; int8 local_90; int8 local_88; string local_80 [32]; string local_60 [32]; char **local_40; char **local_38; array *local_30; array *local_28; array *local_20; int1 *local_18; string *local_10; Common *local_8; local_18 = GetEscapedHtml(std::__cxx11::string)::replacements; local_10 = param_2; local_8 = this; local_20 = (array *)std::array<std::array<char_const*,2ul>,5ul>::begin ((array<std::array<char_const*,2ul>,5ul> *) GetEscapedHtml(std::__cxx11::string)::replacements); local_28 = (array *)std::array<std::array<char_const*,2ul>,5ul>::end ((array<std::array<char_const*,2ul>,5ul> *) GetEscapedHtml(std::__cxx11::string)::replacements); for (; local_20 != local_28; local_20 = local_20 + 0x10) { local_30 = local_20; local_38 = std::get<0ul,char_const*,2ul>(local_20); local_40 = std::get<1ul,char_const*,2ul>(local_30); std::__cxx11::string::string(local_80,param_2); std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_90,*local_38); std::basic_string_view<char,std::char_traits<char>>::basic_string_view ((basic_string_view<char,std::char_traits<char>> *)&local_a0,*local_40); ReplaceAll(local_60,local_80,local_90,local_88,local_a0,local_98); std::__cxx11::string::operator=(param_2,local_60); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string(local_80); } std::__cxx11::string::string((string *)this,param_2); return this; }
35
js_typed_array_constructor_ta
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_constructor_ta(JSContext *ctx, JSValue new_target, JSValue src_obj, int classid, uint32_t len) { JSObject *p, *src_buffer; JSTypedArray *ta; JSValue obj, buffer; uint32_t i; int size_log2; JSArrayBuffer *src_abuf, *abuf; obj = js_create_from_ctor(ctx, new_target, classid); if (JS_IsException(obj)) return obj; p = JS_VALUE_GET_OBJ(src_obj); if (typed_array_is_oob(p)) { JS_ThrowTypeErrorArrayBufferOOB(ctx); goto fail; } ta = p->u.typed_array; src_buffer = ta->buffer; src_abuf = src_buffer->u.array_buffer; size_log2 = typed_array_size_log2(classid); buffer = js_array_buffer_constructor1(ctx, JS_UNDEFINED, (uint64_t)len << size_log2, NULL); if (JS_IsException(buffer)) goto fail; /* necessary because it could have been detached */ if (typed_array_is_oob(p)) { JS_FreeValue(ctx, buffer); JS_ThrowTypeErrorArrayBufferOOB(ctx); goto fail; } abuf = JS_GetOpaque(buffer, JS_CLASS_ARRAY_BUFFER); if (typed_array_init(ctx, obj, buffer, 0, len, /*track_rab*/FALSE)) goto fail; if (p->class_id == classid) { /* same type: copy the content */ memcpy(abuf->data, src_abuf->data + ta->offset, abuf->byte_length); } else { for(i = 0; i < len; i++) { JSValue val; val = JS_GetPropertyUint32(ctx, src_obj, i); if (JS_IsException(val)) goto fail; if (JS_SetPropertyUint32(ctx, obj, i, val) < 0) goto fail; } } return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O1
c
js_typed_array_constructor_ta: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %r9d, %ebp movq %r8, %r12 movq %rdi, %r15 movq %rcx, 0x18(%rsp) movl %r9d, %ecx callq 0x36d56 movq %rax, %r14 movq %rdx, %rbx cmpl $0x6, %ebx jne 0x7eb9c movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r14, %rcx andq %rax, %rcx jmp 0x7ec74 movq 0x18(%rsp), %r13 movq %r13, %rdi callq 0x396c4 testl %eax, %eax jne 0x7ec4a movq %r12, 0x40(%rsp) movq 0x30(%r13), %rax movq %rax, 0x30(%rsp) movq 0x18(%rax), %rax movq 0x30(%rax), %rax movq %rax, 0x38(%rsp) movslq %ebp, %rax leaq 0x1ed09(%rip), %rcx # 0x9d8df movb -0x15(%rax,%rcx), %cl movl 0x80(%rsp), %eax movq %rax, 0x10(%rsp) shlq %cl, %rax xorl %r10d, %r10d leaq -0x45d3a(%rip), %r11 # 0x38eb9 movl $0x3, %edx movq %r15, %rdi xorl %esi, %esi movq %rax, %rcx xorl %r8d, %r8d movl $0x13, %r9d pushq $0x1 pushq %r10 pushq %r11 pushq %r10 callq 0x38c19 addq $0x20, %rsp movl %edx, %r12d cmpq $0x6, %r12 je 0x7ec5b movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq %r13, %rdi callq 0x396c4 testl %eax, %eax je 0x7ec8c movq 0x18(%r15), %rdi movq (%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x1d8c6 leaq 0x237d1(%rip), %rsi # 0xa2422 movq %r15, %rdi xorl %eax, %eax callq 0x22567 movq 0x18(%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x1d8c6 movl $0x6, %ebx xorl %r14d, %r14d xorl %ecx, %ecx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq (%rsp), %rdx movq %rdx, 0x20(%rsp) cmpl $-0x1, %r12d jne 0x7ecad movq 0x20(%rsp), %rax cmpw $0x13, 0x6(%rax) jne 0x7ecad movq 0x30(%rax), %r12 jmp 0x7ecb0 xorl %r12d, %r12d subq $0x8, %rsp movq %r15, %rdi movq %r14, %rsi movq 0x10(%rsp), %rcx xorl %r8d, %r8d movq 0x18(%rsp), %r9 pushq $0x0 callq 0x12b13 addq $0x10, %rsp testl %eax, %eax jne 0x7ec5b movzwl 0x6(%r13), %eax cmpl %ebp, %eax jne 0x7ed03 movq 0x10(%r12), %rdi movq 0x30(%rsp), %rax movl 0x20(%rax), %esi movq 0x38(%rsp), %rax addq 0x10(%rax), %rsi movslq (%r12), %rdx callq 0xe5b0 jmp 0x7eb87 cmpl $0x0, 0x80(%rsp) je 0x7eb87 movq 0x18(%rsp), %r13 xorl %ebp, %ebp movq %r15, %rdi movq %r13, %rsi movq 0x40(%rsp), %rdx movq %rbp, %rcx callq 0x241b4 cmpl $0x6, %edx je 0x7ec5b movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movslq %ebp, %rax movq %rax, %r8 shrq $0x1f, %r8 testl %eax, %eax movl %eax, %eax xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 movq %xmm0, %rcx cmovnsq %rbp, %rcx andl $0x7, %r8d subq $0x10, %rsp movups 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx movl $0x4000, %r9d # imm = 0x4000 callq 0x24d59 addq $0x10, %rsp testl %eax, %eax js 0x7ec5b incq %rbp cmpq %rbp, 0x10(%rsp) jne 0x7ed18 jmp 0x7eb87
js_typed_array_constructor_ta: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, r9d mov r12, r8 mov r15, rdi mov [rsp+78h+var_60], rcx mov ecx, r9d call js_create_from_ctor mov r14, rax mov rbx, rdx cmp ebx, 6 jnz short loc_7EB9C loc_7EB87: mov rax, 0FFFFFFFF00000000h mov rcx, r14 and rcx, rax jmp loc_7EC74 loc_7EB9C: mov r13, [rsp+78h+var_60] mov rdi, r13 call typed_array_is_oob test eax, eax jnz loc_7EC4A mov [rsp+78h+var_38], r12 mov rax, [r13+30h] mov [rsp+78h+var_48], rax mov rax, [rax+18h] mov rax, [rax+30h] mov [rsp+78h+var_40], rax movsxd rax, ebp lea rcx, typed_array_size_log2 mov cl, [rax+rcx-15h] mov eax, [rsp+78h+arg_0] mov [rsp+78h+var_68], rax shl rax, cl xor r10d, r10d lea r11, js_array_buffer_free mov edx, 3 mov rdi, r15 xor esi, esi mov rcx, rax xor r8d, r8d mov r9d, 13h push 1 push r10 push r11 push r10 call js_array_buffer_constructor3 add rsp, 20h mov r12d, edx cmp r12, 6 jz short loc_7EC5B mov [rsp+78h+var_78], rax mov [rsp+78h+var_70], rdx mov rdi, r13 call typed_array_is_oob test eax, eax jz short loc_7EC8C mov rdi, [r15+18h] mov rsi, [rsp+78h+var_78] mov rdx, [rsp+78h+var_70] call JS_FreeValueRT loc_7EC4A: lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" mov rdi, r15 xor eax, eax call JS_ThrowTypeError loc_7EC5B: mov rdi, [r15+18h] mov rsi, r14 mov rdx, rbx call JS_FreeValueRT mov ebx, 6 xor r14d, r14d xor ecx, ecx loc_7EC74: mov eax, r14d or rax, rcx mov rdx, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7EC8C: mov rdx, [rsp+78h+var_78] mov qword ptr [rsp+78h+var_58], rdx cmp r12d, 0FFFFFFFFh jnz short loc_7ECAD mov rax, qword ptr [rsp+78h+var_58] cmp word ptr [rax+6], 13h jnz short loc_7ECAD mov r12, [rax+30h] jmp short loc_7ECB0 loc_7ECAD: xor r12d, r12d loc_7ECB0: sub rsp, 8 mov rdi, r15 mov rsi, r14 mov rcx, [rsp+80h+var_70] xor r8d, r8d mov r9, [rsp+80h+var_68] push 0 call typed_array_init add rsp, 10h test eax, eax jnz short loc_7EC5B movzx eax, word ptr [r13+6] cmp eax, ebp jnz short loc_7ED03 mov rdi, [r12+10h] mov rax, [rsp+78h+var_48] mov esi, [rax+20h] mov rax, [rsp+78h+var_40] add rsi, [rax+10h] movsxd rdx, dword ptr [r12] call _memcpy jmp loc_7EB87 loc_7ED03: cmp [rsp+78h+arg_0], 0 jz loc_7EB87 mov r13, [rsp+78h+var_60] xor ebp, ebp loc_7ED18: mov rdi, r15 mov rsi, r13 mov rdx, [rsp+78h+var_38] mov rcx, rbp call JS_GetPropertyInt64 cmp edx, 6 jz loc_7EC5B mov qword ptr [rsp+78h+var_58], rax mov qword ptr [rsp+78h+var_58+8], rdx movsxd rax, ebp mov r8, rax shr r8, 1Fh test eax, eax mov eax, eax xorps xmm0, xmm0 cvtsi2sd xmm0, rax movq rcx, xmm0 cmovns rcx, rbp and r8d, 7 sub rsp, 10h movups xmm0, [rsp+88h+var_58] movups [rsp+88h+var_88], xmm0 mov rdi, r15 mov rsi, r14 mov rdx, rbx mov r9d, 4000h call JS_SetPropertyValue add rsp, 10h test eax, eax js loc_7EC5B inc rbp cmp [rsp+78h+var_68], rbp jnz short loc_7ED18 jmp loc_7EB87
unsigned long long js_typed_array_constructor_ta( long long a1, long long a2, long long a3, long long a4, long long a5, signed int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, unsigned int a15) { unsigned long long v17; // r14 unsigned long long v18; // rdx unsigned long long v19; // rbx unsigned long long v20; // rcx long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 unsigned long long v27; // rax long long v28; // rdx int v29; // r12d int *v31; // r12 unsigned long long v32; // rbp __int128 v33; // rax double v34; // xmm4_8 double v35; // xmm5_8 double v36; // rcx long long v37; // [rsp+10h] [rbp-78h] long long v38; // [rsp+18h] [rbp-70h] long long v40; // [rsp+40h] [rbp-48h] long long v41; // [rsp+48h] [rbp-40h] long long v42; // [rsp+50h] [rbp-38h] v17 = js_create_from_ctor(a1, a2, a3, a6); v19 = v18; if ( (_DWORD)v18 == 6 ) goto LABEL_2; if ( typed_array_is_oob(a4) ) goto LABEL_7; v42 = a5; v40 = *(_QWORD *)(a4 + 48); v41 = *(_QWORD *)(*(_QWORD *)(v40 + 24) + 48LL); v27 = js_array_buffer_constructor3( a1, 0LL, 3LL, (unsigned long long)a15 << typed_array_size_log2[a6 - 21], 0LL, 19LL, a7, a8, a9, a10, v25, v26, a13, a14, 0LL, (long long ( *)())js_array_buffer_free, 0LL, 1); v29 = v28; if ( (unsigned int)v28 == 6LL ) { LABEL_8: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v17, v19); LODWORD(v17) = 0; v20 = 0LL; return v20 | (unsigned int)v17; } v37 = v27; v38 = v28; if ( typed_array_is_oob(a4) ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v37, v38); LABEL_7: JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached or resized", v21, v22, v23, v24, a7, a8, a9, a10, v25, v26, a13, a14, v37); goto LABEL_8; } if ( v29 == -1 && *(_WORD *)(v37 + 6) == 19 ) v31 = *(int **)(v37 + 48); else v31 = 0LL; if ( (unsigned int)typed_array_init(a1, v17, v37, v38, 0LL, a15, 0) ) goto LABEL_8; if ( *(unsigned __int16 *)(a4 + 6) == a6 ) { memcpy(*((_QWORD *)v31 + 2), *(_QWORD *)(v41 + 16) + *(unsigned int *)(v40 + 32), *v31); } else if ( a15 ) { *(double *)&v32 = 0.0; do { *(_QWORD *)&v33 = JS_GetPropertyInt64(a1, a4, v42, v32); if ( DWORD2(v33) == 6 ) goto LABEL_8; v36 = (double)(int)v32; if ( (v32 & 0x80000000) == 0LL ) v36 = *(double *)&v32; if ( (int)JS_SetPropertyValue( a1, v17, v19, *(_DWORD **)&v36, ((unsigned long long)(int)v32 >> 31) & 7, 0x4000u, *(double *)&v33, a8, a9, a10, v34, v35, a13, a14, v33) < 0 ) goto LABEL_8; } while ( a15 != ++v32 ); } LABEL_2: v20 = v17 & 0xFFFFFFFF00000000LL; return v20 | (unsigned int)v17; }
36
js_typed_array_constructor_ta
bluesky950520[P]quickjs/quickjs.c
static JSValue js_typed_array_constructor_ta(JSContext *ctx, JSValue new_target, JSValue src_obj, int classid, uint32_t len) { JSObject *p, *src_buffer; JSTypedArray *ta; JSValue obj, buffer; uint32_t i; int size_log2; JSArrayBuffer *src_abuf, *abuf; obj = js_create_from_ctor(ctx, new_target, classid); if (JS_IsException(obj)) return obj; p = JS_VALUE_GET_OBJ(src_obj); if (typed_array_is_oob(p)) { JS_ThrowTypeErrorArrayBufferOOB(ctx); goto fail; } ta = p->u.typed_array; src_buffer = ta->buffer; src_abuf = src_buffer->u.array_buffer; size_log2 = typed_array_size_log2(classid); buffer = js_array_buffer_constructor1(ctx, JS_UNDEFINED, (uint64_t)len << size_log2, NULL); if (JS_IsException(buffer)) goto fail; /* necessary because it could have been detached */ if (typed_array_is_oob(p)) { JS_FreeValue(ctx, buffer); JS_ThrowTypeErrorArrayBufferOOB(ctx); goto fail; } abuf = JS_GetOpaque(buffer, JS_CLASS_ARRAY_BUFFER); if (typed_array_init(ctx, obj, buffer, 0, len, /*track_rab*/FALSE)) goto fail; if (p->class_id == classid) { /* same type: copy the content */ memcpy(abuf->data, src_abuf->data + ta->offset, abuf->byte_length); } else { for(i = 0; i < len; i++) { JSValue val; val = JS_GetPropertyUint32(ctx, src_obj, i); if (JS_IsException(val)) goto fail; if (JS_SetPropertyUint32(ctx, obj, i, val) < 0) goto fail; } } return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O3
c
js_typed_array_constructor_ta: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %r9d, %ebp movq %r8, %r12 movq %rcx, %r13 movq %rdi, %r15 movl %r9d, %ecx callq 0x3802f movq %rax, %rbx movq %rdx, %r14 cmpl $0x6, %r14d jne 0x81668 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbx, %rcx andq %rax, %rcx jmp 0x816b0 movq %r13, %rdi callq 0x3aa19 testl %eax, %eax je 0x816c7 leaq 0x23d51(%rip), %rsi # 0xa53cc movq %r15, %rdi xorl %eax, %eax callq 0x22d8b cmpl $-0x9, %r14d jb 0x816a6 movq 0x18(%r15), %rdi movl (%rbx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rbx) cmpl $0x1, %eax jg 0x816a6 movq %rbx, %rsi movq %r14, %rdx callq 0x219cc xorl %ebx, %ebx xorl %ecx, %ecx movl $0x6, %r14d movl %ebx, %eax orq %rcx, %rax movq %r14, %rdx addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, 0x30(%rsp) movq 0x30(%r13), %rax movq %rax, 0x20(%rsp) movq 0x18(%rax), %rax movq 0x30(%rax), %rax movq %rax, 0x28(%rsp) movslq %ebp, %rax leaq 0x1f173(%rip), %rcx # 0xa085f movb -0x15(%rax,%rcx), %cl movl 0x70(%rsp), %eax movq %rax, 0x18(%rsp) shlq %cl, %rax xorl %r10d, %r10d leaq -0x47534(%rip), %r11 # 0x3a1d2 movl $0x3, %edx movq %r15, %rdi xorl %esi, %esi movq %rax, %rcx xorl %r8d, %r8d movl $0x13, %r9d pushq $0x1 pushq %r10 pushq %r11 pushq %r10 callq 0x39eef addq $0x20, %rsp movl %edx, %r12d cmpq $0x6, %r12 je 0x81685 movq %rax, 0x8(%rsp) movq %rdx, 0x10(%rsp) movq %r13, %rdi callq 0x3aa19 testl %eax, %eax je 0x81781 movq 0x10(%rsp), %rdx cmpl $-0x9, %edx movq 0x8(%rsp), %rsi jb 0x81674 movq 0x18(%r15), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x81674 callq 0x219cc jmp 0x81674 cmpl $-0x1, %r12d movq 0x8(%rsp), %rdx jne 0x81799 cmpw $0x13, 0x6(%rdx) jne 0x81799 movq 0x30(%rdx), %r12 jmp 0x8179c xorl %r12d, %r12d subq $0x8, %rsp movq %r15, %rdi movq %rbx, %rsi movq 0x18(%rsp), %rcx xorl %r8d, %r8d movq 0x20(%rsp), %r9 pushq $0x0 callq 0x131b2 addq $0x10, %rsp testl %eax, %eax jne 0x81685 movzwl 0x6(%r13), %eax cmpl %ebp, %eax jne 0x817f3 movq 0x10(%r12), %rdi movq 0x20(%rsp), %rax movl 0x20(%rax), %esi movq 0x28(%rsp), %rax addq 0x10(%rax), %rsi movslq (%r12), %rdx callq 0xe5b0 jmp 0x81656 cmpl $0x0, 0x70(%rsp) je 0x81656 xorl %ebp, %ebp xorl %r12d, %r12d movq %r15, %rdi movq %r13, %rsi movq 0x30(%rsp), %rdx movq %r12, %rcx callq 0x24808 movq %rax, %r9 movq %rdx, %rax cmpl $0x6, %eax je 0x81685 movl %r12d, %ecx xorps %xmm0, %xmm0 cvtsi2sd %rcx, %xmm0 testl %r12d, %r12d movq %xmm0, %rcx cmovnsq %r12, %rcx movl $0x7, %r8d cmovnsq %rbp, %r8 movq %r15, %rdi movq %rbx, %rsi movq %r14, %rdx pushq $0x4000 # imm = 0x4000 pushq %rax callq 0x253af addq $0x10, %rsp testl %eax, %eax js 0x81685 incq %r12 cmpq %r12, 0x18(%rsp) jne 0x81803 jmp 0x81656
js_typed_array_constructor_ta: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov ebp, r9d mov r12, r8 mov r13, rcx mov r15, rdi mov ecx, r9d call js_create_from_ctor mov rbx, rax mov r14, rdx cmp r14d, 6 jnz short loc_81668 loc_81656: mov rax, 0FFFFFFFF00000000h mov rcx, rbx and rcx, rax jmp short loc_816B0 loc_81668: mov rdi, r13 call typed_array_is_oob test eax, eax jz short loc_816C7 loc_81674: lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" mov rdi, r15 xor eax, eax call JS_ThrowTypeError loc_81685: cmp r14d, 0FFFFFFF7h jb short loc_816A6 mov rdi, [r15+18h] mov eax, [rbx] lea ecx, [rax-1] mov [rbx], ecx cmp eax, 1 jg short loc_816A6 mov rsi, rbx mov rdx, r14 call js_free_value_rt loc_816A6: xor ebx, ebx xor ecx, ecx mov r14d, 6 loc_816B0: mov eax, ebx or rax, rcx mov rdx, r14 add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_816C7: mov [rsp+68h+var_38], r12 mov rax, [r13+30h] mov [rsp+68h+var_48], rax mov rax, [rax+18h] mov rax, [rax+30h] mov [rsp+68h+var_40], rax movsxd rax, ebp lea rcx, typed_array_size_log2 mov cl, [rax+rcx-15h] mov eax, [rsp+68h+arg_0] mov [rsp+68h+var_50], rax shl rax, cl xor r10d, r10d lea r11, js_array_buffer_free mov edx, 3 mov rdi, r15 xor esi, esi mov rcx, rax xor r8d, r8d mov r9d, 13h push 1 push r10 push r11 push r10 call js_array_buffer_constructor3 add rsp, 20h mov r12d, edx cmp r12, 6 jz loc_81685 mov [rsp+68h+var_60], rax mov [rsp+68h+var_58], rdx mov rdi, r13 call typed_array_is_oob test eax, eax jz short loc_81781 mov rdx, [rsp+68h+var_58] cmp edx, 0FFFFFFF7h mov rsi, [rsp+68h+var_60] jb loc_81674 mov rdi, [r15+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg loc_81674 call js_free_value_rt jmp loc_81674 loc_81781: cmp r12d, 0FFFFFFFFh mov rdx, [rsp+68h+var_60] jnz short loc_81799 cmp word ptr [rdx+6], 13h jnz short loc_81799 mov r12, [rdx+30h] jmp short loc_8179C loc_81799: xor r12d, r12d loc_8179C: sub rsp, 8 mov rdi, r15 mov rsi, rbx mov rcx, [rsp+70h+var_58] xor r8d, r8d mov r9, [rsp+70h+var_50] push 0 call typed_array_init add rsp, 10h test eax, eax jnz loc_81685 movzx eax, word ptr [r13+6] cmp eax, ebp jnz short loc_817F3 mov rdi, [r12+10h] mov rax, [rsp+68h+var_48] mov esi, [rax+20h] mov rax, [rsp+68h+var_40] add rsi, [rax+10h] movsxd rdx, dword ptr [r12] call _memcpy jmp loc_81656 loc_817F3: cmp [rsp+68h+arg_0], 0 jz loc_81656 xor ebp, ebp xor r12d, r12d loc_81803: mov rdi, r15 mov rsi, r13 mov rdx, [rsp+68h+var_38] mov rcx, r12 call JS_GetPropertyInt64 mov r9, rax mov rax, rdx cmp eax, 6 jz loc_81685 mov ecx, r12d xorps xmm0, xmm0 cvtsi2sd xmm0, rcx test r12d, r12d movq rcx, xmm0 cmovns rcx, r12 mov r8d, 7 cmovns r8, rbp mov rdi, r15 mov rsi, rbx mov rdx, r14 push 4000h push rax call JS_SetPropertyValue add rsp, 10h test eax, eax js loc_81685 inc r12 cmp [rsp+68h+var_50], r12 jnz short loc_81803 jmp loc_81656
unsigned long long js_typed_array_constructor_ta( long long a1, long long a2, long long a3, long long a4, long long a5, signed int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, unsigned int a15) { unsigned long long v19; // rbx unsigned long long v20; // rdx unsigned long long v21; // r14 unsigned long long v22; // rcx long long v23; // rdx long long v24; // rcx long long v25; // r8 long long v26; // r9 __m128 v27; // xmm4 __m128 v28; // xmm5 long long v29; // rdi int v30; // eax unsigned long long v32; // rax long long v33; // rdx int v34; // r12d long long v35; // rdi int v36; // eax int *v37; // r12 unsigned long long v38; // r12 long long v39; // rdx int *PropertyInt64; // r9 double v41; // xmm4_8 double v42; // xmm5_8 double v43; // rcx long long v44; // r8 char v45; // [rsp+0h] [rbp-68h] long long v46; // [rsp+8h] [rbp-60h] long long v47; // [rsp+10h] [rbp-58h] long long v48; // [rsp+20h] [rbp-48h] long long v49; // [rsp+28h] [rbp-40h] long long v50; // [rsp+30h] [rbp-38h] v19 = js_create_from_ctor(a1, a2, a3, a6); v21 = v20; if ( (_DWORD)v20 == 6 ) goto LABEL_2; if ( typed_array_is_oob(a4) ) goto LABEL_4; v50 = a5; v48 = *(_QWORD *)(a4 + 48); v49 = *(_QWORD *)(*(_QWORD *)(v48 + 24) + 48LL); v32 = js_array_buffer_constructor3( a1, 0LL, 3LL, (unsigned long long)a15 << typed_array_size_log2[a6 - 21], 0LL, 19LL, a7, a8, a9, a10, v27, v28, a13, a14, 0LL, (long long ( *)())js_array_buffer_free, 0LL, 1u); v34 = v33; if ( (unsigned int)v33 != 6LL ) { v46 = v32; v47 = v33; if ( typed_array_is_oob(a4) ) { v23 = v47; if ( (unsigned int)v47 >= 0xFFFFFFF7 ) { v35 = *(_QWORD *)(a1 + 24); v36 = *(_DWORD *)v46; v24 = (unsigned int)(*(_DWORD *)v46 - 1); *(_DWORD *)v46 = v24; if ( v36 <= 1 ) js_free_value_rt(v35, (_QWORD *)v46, v47); } LABEL_4: JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached or resized", v23, v24, v25, v26, a7, a8, a9, a10, v27, v28, a13, a14, v45); goto LABEL_5; } if ( v34 == -1 && *(_WORD *)(v46 + 6) == 19 ) v37 = *(int **)(v46 + 48); else v37 = 0LL; if ( !(unsigned int)typed_array_init(a1, v19, v46, v47, 0LL, a15, 0) ) { if ( *(unsigned __int16 *)(a4 + 6) == a6 ) { memcpy(*((_QWORD *)v37 + 2), *(_QWORD *)(v49 + 16) + *(unsigned int *)(v48 + 32), *v37); } else if ( a15 ) { *(double *)&v38 = 0.0; do { PropertyInt64 = (int *)JS_GetPropertyInt64(a1, a4, v50, v38); if ( (_DWORD)v39 == 6 ) goto LABEL_5; v43 = (double)(int)v38; if ( (v38 & 0x80000000) == 0LL ) v43 = *(double *)&v38; v44 = 7LL; if ( (v38 & 0x80000000) == 0LL ) v44 = 0LL; if ( (int)JS_SetPropertyValue( a1, v19, v21, *(_DWORD **)&v43, v44, PropertyInt64, (double)(int)v38, a8, a9, a10, v41, v42, a13, a14, v39, 0x4000u) < 0 ) goto LABEL_5; } while ( a15 != ++v38 ); } LABEL_2: v22 = v19 & 0xFFFFFFFF00000000LL; return v22 | (unsigned int)v19; } } LABEL_5: if ( (unsigned int)v21 >= 0xFFFFFFF7 ) { v29 = *(_QWORD *)(a1 + 24); v30 = (*(_DWORD *)v19)--; if ( v30 <= 1 ) js_free_value_rt(v29, (_QWORD *)v19, v21); } LODWORD(v19) = 0; v22 = 0LL; return v22 | (unsigned int)v19; }
js_typed_array_constructor_ta: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV EBP,R9D MOV R12,R8 MOV R13,RCX MOV R15,RDI MOV ECX,R9D CALL 0x0013802f MOV RBX,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x00181668 LAB_00181656: MOV RAX,-0x100000000 MOV RCX,RBX AND RCX,RAX JMP 0x001816b0 LAB_00181668: MOV RDI,R13 CALL 0x0013aa19 TEST EAX,EAX JZ 0x001816c7 LAB_00181674: LEA RSI,[0x1a53cc] MOV RDI,R15 XOR EAX,EAX CALL 0x00122d8b LAB_00181685: CMP R14D,-0x9 JC 0x001816a6 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RBX] LEA ECX,[RAX + -0x1] MOV dword ptr [RBX],ECX CMP EAX,0x1 JG 0x001816a6 MOV RSI,RBX MOV RDX,R14 CALL 0x001219cc LAB_001816a6: XOR EBX,EBX XOR ECX,ECX MOV R14D,0x6 LAB_001816b0: MOV EAX,EBX OR RAX,RCX MOV RDX,R14 ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001816c7: MOV qword ptr [RSP + 0x30],R12 MOV RAX,qword ptr [R13 + 0x30] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x28],RAX MOVSXD RAX,EBP LEA RCX,[0x1a085f] MOV CL,byte ptr [RAX + RCX*0x1 + -0x15] MOV EAX,dword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x18],RAX SHL RAX,CL XOR R10D,R10D LEA R11,[0x13a1d2] MOV EDX,0x3 MOV RDI,R15 XOR ESI,ESI MOV RCX,RAX XOR R8D,R8D MOV R9D,0x13 PUSH 0x1 PUSH R10 PUSH R11 PUSH R10 CALL 0x00139eef ADD RSP,0x20 MOV R12D,EDX CMP R12,0x6 JZ 0x00181685 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],RDX MOV RDI,R13 CALL 0x0013aa19 TEST EAX,EAX JZ 0x00181781 MOV RDX,qword ptr [RSP + 0x10] CMP EDX,-0x9 MOV RSI,qword ptr [RSP + 0x8] JC 0x00181674 MOV RDI,qword ptr [R15 + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00181674 CALL 0x001219cc JMP 0x00181674 LAB_00181781: CMP R12D,-0x1 MOV RDX,qword ptr [RSP + 0x8] JNZ 0x00181799 CMP word ptr [RDX + 0x6],0x13 JNZ 0x00181799 MOV R12,qword ptr [RDX + 0x30] JMP 0x0018179c LAB_00181799: XOR R12D,R12D LAB_0018179c: SUB RSP,0x8 MOV RDI,R15 MOV RSI,RBX MOV RCX,qword ptr [RSP + 0x18] XOR R8D,R8D MOV R9,qword ptr [RSP + 0x20] PUSH 0x0 CALL 0x001131b2 ADD RSP,0x10 TEST EAX,EAX JNZ 0x00181685 MOVZX EAX,word ptr [R13 + 0x6] CMP EAX,EBP JNZ 0x001817f3 MOV RDI,qword ptr [R12 + 0x10] MOV RAX,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RAX + 0x20] MOV RAX,qword ptr [RSP + 0x28] ADD RSI,qword ptr [RAX + 0x10] MOVSXD RDX,dword ptr [R12] CALL 0x0010e5b0 JMP 0x00181656 LAB_001817f3: CMP dword ptr [RSP + 0x70],0x0 JZ 0x00181656 XOR EBP,EBP XOR R12D,R12D LAB_00181803: MOV RDI,R15 MOV RSI,R13 MOV RDX,qword ptr [RSP + 0x30] MOV RCX,R12 CALL 0x00124808 MOV R9,RAX MOV RAX,RDX CMP EAX,0x6 JZ 0x00181685 MOV ECX,R12D XORPS XMM0,XMM0 CVTSI2SD XMM0,RCX TEST R12D,R12D MOVQ RCX,XMM0 CMOVNS RCX,R12 MOV R8D,0x7 CMOVNS R8,RBP MOV RDI,R15 MOV RSI,RBX MOV RDX,R14 PUSH 0x4000 PUSH RAX CALL 0x001253af ADD RSP,0x10 TEST EAX,EAX JS 0x00181685 INC R12 CMP qword ptr [RSP + 0x18],R12 JNZ 0x00181803 JMP 0x00181656
int1 [16] js_typed_array_constructor_ta (long param_1,int8 param_2,int8 param_3,long param_4,int8 param_5, uint param_6,uint param_7) { long lVar1; long lVar2; int iVar3; int *piVar4; double dVar5; ulong uVar7; double dVar8; int8 uVar9; int *piVar10; double dVar11; bool bVar12; int1 auVar13 [16]; int1 auVar14 [16]; int *piVar6; auVar13 = js_create_from_ctor(); piVar4 = auVar13._0_8_; if (auVar13._8_4_ == 6) { LAB_00181656: uVar7 = (ulong)piVar4 & 0xffffffff00000000; goto LAB_001816b0; } iVar3 = typed_array_is_oob(param_4); if (iVar3 == 0) { lVar1 = *(long *)(param_4 + 0x30); lVar2 = *(long *)(*(long *)(lVar1 + 0x18) + 0x30); dVar5 = (double)(ulong)param_7; auVar14 = js_array_buffer_constructor3 (param_1,0,3,(long)dVar5 << ("toSorted"[(long)(int)param_6 + 6] & 0x3fU),0, 0x13,0,js_array_buffer_free,0,1); piVar6 = auVar14._0_8_; if ((auVar14._8_8_ & 0xffffffff) != 6) { iVar3 = typed_array_is_oob(param_4); if (iVar3 != 0) { if (0xfffffff6 < auVar14._8_4_) { uVar9 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar6; *piVar6 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar9); } } goto LAB_00181674; } if ((auVar14._8_4_ == 0xffffffff) && (*(short *)((long)piVar6 + 6) == 0x13)) { piVar10 = *(int **)(piVar6 + 0xc); } else { piVar10 = (int *)0x0; } iVar3 = typed_array_init(param_1,piVar4,piVar6,auVar14._8_8_,0,dVar5,0); if (iVar3 == 0) { if (*(ushort *)(param_4 + 6) == param_6) { memcpy(*(void **)(piVar10 + 4), (void *)((ulong)*(uint *)(lVar1 + 0x20) + *(long *)(lVar2 + 0x10)),(long)*piVar10); } else if (param_7 != 0) { dVar11 = 0.0; do { auVar14 = JS_GetPropertyInt64(param_1,param_4,param_5,dVar11); if (auVar14._8_4_ == 6) goto LAB_00181685; bVar12 = -1 < SUB84(dVar11,0); dVar8 = (double)((ulong)dVar11 & 0xffffffff); if (bVar12) { dVar8 = dVar11; } uVar9 = 7; if (bVar12) { uVar9 = 0; } iVar3 = JS_SetPropertyValue(param_1,piVar4,auVar13._8_8_,dVar8,uVar9,auVar14._0_8_, auVar14._8_8_,0x4000); if (iVar3 < 0) goto LAB_00181685; dVar11 = (double)((long)dVar11 + 1); } while (dVar5 != dVar11); } goto LAB_00181656; } } } else { LAB_00181674: JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized"); } LAB_00181685: if (0xfffffff6 < auVar13._8_4_) { uVar9 = *(int8 *)(param_1 + 0x18); iVar3 = *piVar4; *piVar4 = iVar3 + -1; if (iVar3 < 2) { js_free_value_rt(uVar9,piVar4,auVar13._8_8_); } } uVar7 = 0; auVar13 = ZEXT816(6) << 0x40; LAB_001816b0: auVar14._0_8_ = auVar13._0_8_ & 0xffffffff | uVar7; auVar14._8_8_ = auVar13._8_8_; return auVar14; }
37
LefDefParser::lefiLayer::hasMinstepLengthsum(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefiLayer.cpp
int lefiLayer::hasMinstepLengthsum(int index) const { char msg[160]; if (index < 0 || index > numMinstep_) { sprintf(msg, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d", index, numMinstep_); lefiError(0, 1302, msg); return 0; } return minstepLengthsum_[index] == -1 ? 0 : 1; }
O0
cpp
LefDefParser::lefiLayer::hasMinstepLengthsum(int) const: subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movl %esi, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xb4(%rsp) jl 0x27b01 movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0x278(%rcx), %eax jle 0x27b44 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0x278(%rax), %ecx leaq 0x5048b(%rip), %rsi # 0x77faa movb $0x0, %al callq 0x2050 leaq 0x10(%rsp), %rdx xorl %edi, %edi movl $0x516, %esi # imm = 0x516 callq 0x3f4e0 movl $0x0, 0xc4(%rsp) jmp 0x27b84 movq 0x8(%rsp), %rax movq 0x290(%rax), %rax movslq 0xb4(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 movsd 0x4d4bb(%rip), %xmm1 # 0x75020 movl $0x1, %eax xorl %ecx, %ecx ucomisd %xmm1, %xmm0 setnp %sil sete %dl testb %sil, %dl cmovnel %ecx, %eax movl %eax, 0xc4(%rsp) movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nopw %cs:(%rax,%rax)
_ZNK12LefDefParser9lefiLayer19hasMinstepLengthsumEi: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_14], esi mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_C0], rax cmp [rsp+0C8h+var_14], 0 jl short loc_27B01 mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+278h] jle short loc_27B44 loc_27B01: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+278h] lea rsi, aErrorLefpars13_19; "ERROR (LEFPARS-1302): The index number "... mov al, 0 call _sprintf lea rdx, [rsp+0C8h+var_B8]; int xor edi, edi; this mov esi, 516h; int call _ZN12LefDefParser9lefiErrorEiiPKc; LefDefParser::lefiError(int,int,char const*) mov [rsp+0C8h+var_4], 0 jmp short loc_27B84 loc_27B44: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+290h] movsxd rcx, [rsp+0C8h+var_14] movsd xmm0, qword ptr [rax+rcx*8] movsd xmm1, cs:dbl_75020 mov eax, 1 xor ecx, ecx ucomisd xmm0, xmm1 setnp sil setz dl test dl, sil cmovnz eax, ecx mov [rsp+0C8h+var_4], eax loc_27B84: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
_BOOL8 LefDefParser::lefiLayer::hasMinstepLengthsum(LefDefParser::lefiLayer *this, int a2) { const char *v2; // rcx int v4[41]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::lefiLayer *v6; // [rsp+B8h] [rbp-10h] v6 = this; v5 = a2; if ( a2 >= 0 && v5 <= *((_DWORD *)this + 158) ) { return *(double *)(*((_QWORD *)this + 82) + 8LL * v5) != -1.0; } else { sprintf( v4, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d", v5, *((_DWORD *)this + 158)); LefDefParser::lefiError(0LL, 1302, (int)v4, v2); return 0; } }
hasMinstepLengthsum: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb8],RDI MOV dword ptr [RSP + 0xb4],ESI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xb4],0x0 JL 0x00127b01 MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0x278] JLE 0x00127b44 LAB_00127b01: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0x278] LEA RSI,[0x177faa] MOV AL,0x0 CALL 0x00102050 LEA RDX,[RSP + 0x10] XOR EDI,EDI MOV ESI,0x516 CALL 0x0013f4e0 MOV dword ptr [RSP + 0xc4],0x0 JMP 0x00127b84 LAB_00127b44: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x290] MOVSXD RCX,dword ptr [RSP + 0xb4] MOVSD XMM0,qword ptr [RAX + RCX*0x8] MOVSD XMM1,qword ptr [0x00175020] MOV EAX,0x1 XOR ECX,ECX UCOMISD XMM0,XMM1 SETNP SIL SETZ DL TEST DL,SIL CMOVNZ EAX,ECX MOV dword ptr [RSP + 0xc4],EAX LAB_00127b84: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
/* LefDefParser::lefiLayer::hasMinstepLengthsum(int) const */ bool __thiscall LefDefParser::lefiLayer::hasMinstepLengthsum(lefiLayer *this,int param_1) { bool bVar1; char local_b8 [164]; int local_14; lefiLayer *local_10; if ((param_1 < 0) || (*(int *)(this + 0x278) < param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (LEFPARS-1302): The index number %d given for the layer MINSTEP is invalid.\nValid index is from 0 to %d" ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x278)); lefiError(0,0x516,local_b8); bVar1 = false; } else { bVar1 = *(double *)(*(long *)(this + 0x290) + (long)param_1 * 8) != DAT_00175020; } return bVar1; }
38
gguf_writer::write(gguf_kv const&) const
ngxson[P]ggml-easy/ggml/src/gguf.cpp
void write(const struct gguf_kv & kv) const { const uint64_t ne = kv.get_ne(); write(kv.get_key()); if (kv.is_array) { write(GGUF_TYPE_ARRAY); write(kv.get_type()); write(ne); } else { write(kv.get_type()); } switch (kv.get_type()) { case GGUF_TYPE_UINT8: case GGUF_TYPE_INT8: case GGUF_TYPE_UINT16: case GGUF_TYPE_INT16: case GGUF_TYPE_UINT32: case GGUF_TYPE_INT32: case GGUF_TYPE_FLOAT32: case GGUF_TYPE_UINT64: case GGUF_TYPE_INT64: case GGUF_TYPE_FLOAT64: { write(kv.data); } break; case GGUF_TYPE_BOOL: { for (size_t i = 0; i < ne; ++i) { write(kv.get_val<bool>(i)); } } break; case GGUF_TYPE_STRING: { for (size_t i = 0; i < ne; ++i) { write(kv.get_val<std::string>(i)); } } break; case GGUF_TYPE_ARRAY: default: GGML_ABORT("invalid type"); } }
O0
cpp
gguf_writer::write(gguf_kv const&) const: subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x38(%rsp), %rdi callq 0x415e0 movq %rax, 0x30(%rsp) movq 0x38(%rsp), %rdi callq 0x43420 movq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x47c50 movq 0x38(%rsp), %rax testb $0x1, 0x20(%rax) je 0x965a8 movq 0x10(%rsp), %rdi movl $0x9, 0x2c(%rsp) leaq 0x2c(%rsp), %rsi callq 0x42250 movq 0x38(%rsp), %rdi callq 0x465d0 movq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x42250 movq 0x10(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x41530 jmp 0x965bf movq 0x38(%rsp), %rdi callq 0x465d0 movq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x42250 movq 0x38(%rsp), %rdi callq 0x465d0 movl (%rax), %eax movq %rax, 0x8(%rsp) subq $0xc, %rax ja 0x9668f movq 0x8(%rsp), %rax leaq 0x2d2aa(%rip), %rcx # 0xc3890 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq 0x10(%rsp), %rdi movq 0x38(%rsp), %rsi addq $0x28, %rsi callq 0x456d0 jmp 0x966a9 movq $0x0, 0x20(%rsp) movq 0x20(%rsp), %rax cmpq 0x30(%rsp), %rax jae 0x96648 movq 0x38(%rsp), %rdi movq 0x20(%rsp), %rsi callq 0x43d40 movq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x405c0 movq 0x20(%rsp), %rax addq $0x1, %rax movq %rax, 0x20(%rsp) jmp 0x96610 jmp 0x966a9 movq $0x0, 0x18(%rsp) movq 0x18(%rsp), %rax cmpq 0x30(%rsp), %rax jae 0x9668b movq 0x38(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x446b0 movq 0x10(%rsp), %rdi movq %rax, %rsi callq 0x47c50 movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) jmp 0x96653 jmp 0x966a9 jmp 0x9668f leaq 0x2d4cb(%rip), %rdi # 0xc3b61 movl $0x4c5, %esi # imm = 0x4C5 leaq 0x2da6e(%rip), %rdx # 0xc4110 movb $0x0, %al callq 0x46780 addq $0x48, %rsp retq nop
_ZNK11gguf_writer5writeERK7gguf_kv: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov rax, [rsp+48h+var_8] mov [rsp+48h+var_38], rax mov rdi, [rsp+48h+var_10]; this call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void) mov [rsp+48h+var_18], rax mov rdi, [rsp+48h+var_10] call __ZNK7gguf_kv7get_keyB5cxx11Ev; gguf_kv::get_key(void) mov rdi, [rsp+48h+var_38] mov rsi, rax call __ZNK11gguf_writer5writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; gguf_writer::write(std::string const&) mov rax, [rsp+48h+var_10] test byte ptr [rax+20h], 1 jz short loc_965A8 mov rdi, [rsp+48h+var_38] mov [rsp+48h+var_1C], 9 lea rsi, [rsp+48h+var_1C] call __ZNK11gguf_writer5writeERK9gguf_type; gguf_writer::write(gguf_type const&) mov rdi, [rsp+48h+var_10]; this call __ZNK7gguf_kv8get_typeEv; gguf_kv::get_type(void) mov rdi, [rsp+48h+var_38] mov rsi, rax call __ZNK11gguf_writer5writeERK9gguf_type; gguf_writer::write(gguf_type const&) mov rdi, [rsp+48h+var_38] lea rsi, [rsp+48h+var_18] call __ZNK11gguf_writer5writeImEEvRKT_; gguf_writer::write<ulong>(ulong const&) jmp short loc_965BF loc_965A8: mov rdi, [rsp+48h+var_10]; this call __ZNK7gguf_kv8get_typeEv; gguf_kv::get_type(void) mov rdi, [rsp+48h+var_38] mov rsi, rax call __ZNK11gguf_writer5writeERK9gguf_type; gguf_writer::write(gguf_type const&) loc_965BF: mov rdi, [rsp+48h+var_10]; this call __ZNK7gguf_kv8get_typeEv; gguf_kv::get_type(void) mov eax, [rax] mov [rsp+48h+var_40], rax sub rax, 0Ch; switch 13 cases ja def_965ED; jumptable 00000000000965ED default case mov rax, [rsp+48h+var_40] lea rcx, jpt_965ED movsxd rax, ds:(jpt_965ED - 0C3890h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_965EF: mov rdi, [rsp+48h+var_38]; jumptable 00000000000965ED cases 0-6,10-12 mov rsi, [rsp+48h+var_10] add rsi, 28h ; '(' call __ZNK11gguf_writer5writeERKSt6vectorIaSaIaEE; gguf_writer::write(std::vector<signed char> const&) jmp loc_966A9 loc_96607: mov [rsp+48h+var_28], 0; jumptable 00000000000965ED case 7 loc_96610: mov rax, [rsp+48h+var_28] cmp rax, [rsp+48h+var_18] jnb short loc_96648 mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_28] call __ZNK7gguf_kv7get_valIbEERKT_m; gguf_kv::get_val<bool>(ulong) mov rdi, [rsp+48h+var_38]; this mov rsi, rax; bool * call __ZNK11gguf_writer5writeERKb; gguf_writer::write(bool const&) mov rax, [rsp+48h+var_28] add rax, 1 mov [rsp+48h+var_28], rax jmp short loc_96610 loc_96648: jmp short loc_966A9 loc_9664A: mov [rsp+48h+var_30], 0; jumptable 00000000000965ED case 8 loc_96653: mov rax, [rsp+48h+var_30] cmp rax, [rsp+48h+var_18] jnb short loc_9668B mov rdi, [rsp+48h+var_10] mov rsi, [rsp+48h+var_30] call __ZNK7gguf_kv7get_valINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_m; gguf_kv::get_val<std::string>(ulong) mov rdi, [rsp+48h+var_38] mov rsi, rax call __ZNK11gguf_writer5writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; gguf_writer::write(std::string const&) mov rax, [rsp+48h+var_30] add rax, 1 mov [rsp+48h+var_30], rax jmp short loc_96653 loc_9668B: jmp short loc_966A9 loc_9668D: jmp short $+2; jumptable 00000000000965ED case 9 def_965ED: lea rdi, aWorkspaceLlm4b_5; jumptable 00000000000965ED default case mov esi, 4C5h lea rdx, aInvalidType; "invalid type" mov al, 0 call _ggml_abort loc_966A9: add rsp, 48h retn
unsigned long long gguf_writer::write(gguf_writer *this, const gguf_kv *a2) { long long v2; // rax long long type; // rax long long v4; // rax unsigned long long result; // rax const bool *v6; // rax long long v7; // rax unsigned long long j; // [rsp+18h] [rbp-30h] unsigned long long i; // [rsp+20h] [rbp-28h] int v10; // [rsp+2Ch] [rbp-1Ch] BYREF unsigned long long ne; // [rsp+30h] [rbp-18h] BYREF gguf_kv *v12; // [rsp+38h] [rbp-10h] gguf_writer *v13; // [rsp+40h] [rbp-8h] v13 = this; v12 = a2; ne = gguf_kv::get_ne(a2); v2 = gguf_kv::get_key[abi:cxx11](a2); gguf_writer::write(this, v2); if ( (*((_BYTE *)a2 + 32) & 1) != 0 ) { v10 = 9; gguf_writer::write(this, &v10); type = gguf_kv::get_type(v12); gguf_writer::write(this, type); gguf_writer::write<unsigned long>(this, &ne); } else { v4 = gguf_kv::get_type(v12); gguf_writer::write(this, v4); } switch ( *(_DWORD *)gguf_kv::get_type(v12) ) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 0xA: case 0xB: case 0xC: result = gguf_writer::write(this, (char *)v12 + 40); break; case 7: for ( i = 0LL; ; ++i ) { result = i; if ( i >= ne ) break; v6 = (const bool *)gguf_kv::get_val<bool>(v12, i); gguf_writer::write(this, v6); } break; case 8: for ( j = 0LL; ; ++j ) { result = j; if ( j >= ne ) break; v7 = gguf_kv::get_val<std::string>(v12, j); gguf_writer::write(this, v7); } break; default: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp", 1221, (long long)"invalid type"); } return result; }
write: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x001415e0 MOV qword ptr [RSP + 0x30],RAX MOV RDI,qword ptr [RSP + 0x38] CALL 0x00143420 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX CALL 0x00147c50 MOV RAX,qword ptr [RSP + 0x38] TEST byte ptr [RAX + 0x20],0x1 JZ 0x001965a8 MOV RDI,qword ptr [RSP + 0x10] MOV dword ptr [RSP + 0x2c],0x9 LEA RSI,[RSP + 0x2c] CALL 0x00142250 MOV RDI,qword ptr [RSP + 0x38] CALL 0x001465d0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX CALL 0x00142250 MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x30] CALL 0x00141530 JMP 0x001965bf LAB_001965a8: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001465d0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX CALL 0x00142250 LAB_001965bf: MOV RDI,qword ptr [RSP + 0x38] CALL 0x001465d0 MOV EAX,dword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX SUB RAX,0xc JA 0x0019668f MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x1c3890] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x38] ADD RSI,0x28 CALL 0x001456d0 JMP 0x001966a9 caseD_7: MOV qword ptr [RSP + 0x20],0x0 LAB_00196610: MOV RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0x30] JNC 0x00196648 MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x20] CALL 0x00143d40 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX CALL 0x001405c0 MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x1 MOV qword ptr [RSP + 0x20],RAX JMP 0x00196610 LAB_00196648: JMP 0x001966a9 caseD_8: MOV qword ptr [RSP + 0x18],0x0 LAB_00196653: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0x30] JNC 0x0019668b MOV RDI,qword ptr [RSP + 0x38] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001446b0 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,RAX CALL 0x00147c50 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX JMP 0x00196653 LAB_0019668b: JMP 0x001966a9 caseD_9: JMP 0x0019668f default: LEA RDI,[0x1c3b61] MOV ESI,0x4c5 LEA RDX,[0x1c4110] MOV AL,0x0 CALL 0x00146780 LAB_001966a9: ADD RSP,0x48 RET
/* gguf_writer::write(gguf_kv const&) const */ void __thiscall gguf_writer::write(gguf_writer *this,gguf_kv *param_1) { string *psVar1; gguf_type *pgVar2; int4 *puVar3; bool *pbVar4; ulong local_30; ulong local_28; int4 local_1c; ulong local_18; gguf_kv *local_10; gguf_writer *local_8; local_10 = param_1; local_8 = this; local_18 = gguf_kv::get_ne(param_1); psVar1 = (string *)gguf_kv::get_key_abi_cxx11_(local_10); write(this,psVar1); if (((byte)local_10[0x20] & 1) == 0) { pgVar2 = (gguf_type *)gguf_kv::get_type(local_10); write(this,pgVar2); } else { local_1c = 9; write(this,(gguf_type *)&local_1c); pgVar2 = (gguf_type *)gguf_kv::get_type(local_10); write(this,pgVar2); write<unsigned_long>(this,&local_18); } puVar3 = (int4 *)gguf_kv::get_type(local_10); switch(*puVar3) { case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 10: case 0xb: case 0xc: write(this,(vector *)(local_10 + 0x28)); break; case 7: for (local_28 = 0; local_28 < local_18; local_28 = local_28 + 1) { pbVar4 = gguf_kv::get_val<bool>(local_10,local_28); write(this,pbVar4); } break; case 8: for (local_30 = 0; local_30 < local_18; local_30 = local_30 + 1) { psVar1 = gguf_kv::get_val<std::__cxx11::string>(local_10,local_30); write(this,psVar1); } break; case 9: default: ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",0x4c5, "invalid type"); } return; }
39
gguf_writer::write(gguf_kv const&) const
ngxson[P]ggml-easy/ggml/src/gguf.cpp
void write(const struct gguf_kv & kv) const { const uint64_t ne = kv.get_ne(); write(kv.get_key()); if (kv.is_array) { write(GGUF_TYPE_ARRAY); write(kv.get_type()); write(ne); } else { write(kv.get_type()); } switch (kv.get_type()) { case GGUF_TYPE_UINT8: case GGUF_TYPE_INT8: case GGUF_TYPE_UINT16: case GGUF_TYPE_INT16: case GGUF_TYPE_UINT32: case GGUF_TYPE_INT32: case GGUF_TYPE_FLOAT32: case GGUF_TYPE_UINT64: case GGUF_TYPE_INT64: case GGUF_TYPE_FLOAT64: { write(kv.data); } break; case GGUF_TYPE_BOOL: { for (size_t i = 0; i < ne; ++i) { write(kv.get_val<bool>(i)); } } break; case GGUF_TYPE_STRING: { for (size_t i = 0; i < ne; ++i) { write(kv.get_val<std::string>(i)); } } break; case GGUF_TYPE_ARRAY: default: GGML_ABORT("invalid type"); } }
O1
cpp
gguf_writer::write(gguf_kv const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rsi, %rdi callq 0x16620 movq %rax, 0x10(%rsp) movq %r14, %rdi movq %rbx, %rsi callq 0x18210 cmpb $0x1, 0x20(%rbx) jne 0x41698 leaq 0xc(%rsp), %r15 movl $0x9, (%r15) movq %r14, %rdi movq %r15, %rsi callq 0x16390 movl 0x24(%rbx), %eax movl %eax, (%r15) leaq 0xc(%rsp), %rsi movq %r14, %rdi callq 0x16390 leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x165d0 jmp 0x416aa movl 0x24(%rbx), %eax leaq 0xc(%rsp), %rsi movl %eax, (%rsi) movq %r14, %rdi callq 0x16390 movl 0x24(%rbx), %eax cmpl $0xc, %eax ja 0x4174f movl $0x1c7f, %ecx # imm = 0x1C7F btl %eax, %ecx jae 0x416e0 movq (%r14), %rdi movq 0x8(%rdi), %rsi movq 0x28(%rbx), %rdx movq 0x30(%rbx), %rcx callq 0x171a0 addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq cmpl $0x7, %eax je 0x41717 cmpl $0x8, %eax jne 0x4174f cmpq $0x0, 0x10(%rsp) je 0x416d4 xorl %r15d, %r15d movq %rbx, %rdi movq %r15, %rsi callq 0x17320 movq %r14, %rdi movq %rax, %rsi callq 0x18210 incq %r15 cmpq 0x10(%rsp), %r15 jb 0x416f5 jmp 0x416d4 cmpq $0x0, 0x10(%rsp) je 0x416d4 xorl %r15d, %r15d leaq 0xc(%rsp), %r12 movq %rbx, %rdi movq %r15, %rsi callq 0x17070 movb (%rax), %al movb %al, 0xc(%rsp) movq %r14, %rdi movq %r12, %rsi callq 0x169d0 incq %r15 cmpq 0x10(%rsp), %r15 jb 0x41727 jmp 0x416d4 leaq 0x186cf(%rip), %rdi # 0x59e25 leaq 0x18c77(%rip), %rdx # 0x5a3d4 movl $0x4c5, %esi # imm = 0x4C5 xorl %eax, %eax callq 0x17c70 nop
_ZNK11gguf_writer5writeERK7gguf_kv: push r15 push r14 push r12 push rbx sub rsp, 18h mov rbx, rsi mov r14, rdi mov rdi, rsi; this call __ZNK7gguf_kv6get_neEv; gguf_kv::get_ne(void) mov [rsp+38h+var_28], rax mov rdi, r14 mov rsi, rbx call __ZNK11gguf_writer5writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; gguf_writer::write(std::string const&) cmp byte ptr [rbx+20h], 1 jnz short loc_41698 lea r15, [rsp+38h+var_2C] mov dword ptr [r15], 9 mov rdi, r14 mov rsi, r15 call __ZNK11gguf_writer5writeIiEEvRKT_; gguf_writer::write<int>(int const&) mov eax, [rbx+24h] mov [r15], eax lea rsi, [rsp+38h+var_2C] mov rdi, r14 call __ZNK11gguf_writer5writeIiEEvRKT_; gguf_writer::write<int>(int const&) lea rsi, [rsp+38h+var_28] mov rdi, r14 call __ZNK11gguf_writer5writeImEEvRKT_; gguf_writer::write<ulong>(ulong const&) jmp short loc_416AA loc_41698: mov eax, [rbx+24h] lea rsi, [rsp+38h+var_2C] mov [rsi], eax mov rdi, r14 call __ZNK11gguf_writer5writeIiEEvRKT_; gguf_writer::write<int>(int const&) loc_416AA: mov eax, [rbx+24h] cmp eax, 0Ch ja loc_4174F mov ecx, 1C7Fh bt ecx, eax jnb short loc_416E0 mov rdi, [r14] mov rsi, [rdi+8] mov rdx, [rbx+28h] mov rcx, [rbx+30h] call __ZNSt6vectorIaSaIaEE15_M_range_insertIN9__gnu_cxx17__normal_iteratorIPKaS1_EEEEvNS4_IPaS1_EET_SA_St20forward_iterator_tag; std::vector<signed char>::_M_range_insert<__gnu_cxx::__normal_iterator<signed char const*,std::vector<signed char>>>(__gnu_cxx::__normal_iterator<signed char *,std::vector<signed char>>,__gnu_cxx::__normal_iterator<signed char const*,std::vector<signed char>>,__gnu_cxx::__normal_iterator<signed char const*,std::vector<signed char>>,std::forward_iterator_tag) loc_416D4: add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn loc_416E0: cmp eax, 7 jz short loc_41717 cmp eax, 8 jnz short loc_4174F cmp [rsp+38h+var_28], 0 jz short loc_416D4 xor r15d, r15d loc_416F5: mov rdi, rbx mov rsi, r15 call __ZNK7gguf_kv7get_valINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERKT_m; gguf_kv::get_val<std::string>(ulong) mov rdi, r14 mov rsi, rax call __ZNK11gguf_writer5writeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; gguf_writer::write(std::string const&) inc r15 cmp r15, [rsp+38h+var_28] jb short loc_416F5 jmp short loc_416D4 loc_41717: cmp [rsp+38h+var_28], 0 jz short loc_416D4 xor r15d, r15d lea r12, [rsp+38h+var_2C] loc_41727: mov rdi, rbx mov rsi, r15 call __ZNK7gguf_kv7get_valIbEERKT_m; gguf_kv::get_val<bool>(ulong) mov al, [rax] mov [rsp+38h+var_2C], al mov rdi, r14 mov rsi, r12 call __ZNK11gguf_writer5writeIaEEvRKT_; gguf_writer::write<signed char>(signed char const&) inc r15 cmp r15, [rsp+38h+var_28] jb short loc_41727 jmp short loc_416D4 loc_4174F: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aInvalidType; "invalid type" mov esi, 4C5h xor eax, eax call _ggml_abort
long long gguf_writer::write(gguf_writer *this, const gguf_kv *a2) { int v2; // ecx int v3; // r8d int v4; // r9d long long result; // rax unsigned long long v6; // r15 long long v7; // rax unsigned long long v8; // r15 int v9; // [rsp+Ch] [rbp-2Ch] BYREF unsigned long long v10[5]; // [rsp+10h] [rbp-28h] BYREF v10[0] = gguf_kv::get_ne(a2); gguf_writer::write(this, a2); if ( *((_BYTE *)a2 + 32) == 1 ) { v9 = 9; gguf_writer::write<int>(this); v9 = *((_DWORD *)a2 + 9); gguf_writer::write<int>(this); gguf_writer::write<unsigned long>(this, v10); } else { v9 = *((_DWORD *)a2 + 9); gguf_writer::write<int>(this); } result = *((unsigned int *)a2 + 9); if ( (unsigned int)result > 0xC ) goto LABEL_18; v2 = 7295; if ( _bittest(&v2, result) ) return std::vector<signed char>::_M_range_insert<__gnu_cxx::__normal_iterator<signed char const*,std::vector<signed char>>>( *(_QWORD *)this, *(_QWORD *)(*(_QWORD *)this + 8LL), *((_QWORD *)a2 + 5), *((_QWORD *)a2 + 6)); if ( (_DWORD)result != 7 ) { if ( (_DWORD)result == 8 ) { if ( v10[0] ) { v6 = 0LL; do { v7 = gguf_kv::get_val<std::string>(a2, v6); result = gguf_writer::write(this, v7); ++v6; } while ( v6 < v10[0] ); } return result; } LABEL_18: ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp", 1221, (unsigned int)"invalid type", v2, v3, v4); } if ( v10[0] ) { v8 = 0LL; do { LOBYTE(v9) = *(_BYTE *)gguf_kv::get_val<bool>(a2, v8); result = gguf_writer::write<signed char>(this, &v9); ++v8; } while ( v8 < v10[0] ); } return result; }
write: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RSI MOV R14,RDI MOV RDI,RSI CALL 0x00116620 MOV qword ptr [RSP + 0x10],RAX MOV RDI,R14 MOV RSI,RBX CALL 0x00118210 CMP byte ptr [RBX + 0x20],0x1 JNZ 0x00141698 LEA R15,[RSP + 0xc] MOV dword ptr [R15],0x9 MOV RDI,R14 MOV RSI,R15 CALL 0x00116390 MOV EAX,dword ptr [RBX + 0x24] MOV dword ptr [R15],EAX LEA RSI,[RSP + 0xc] MOV RDI,R14 CALL 0x00116390 LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x001165d0 JMP 0x001416aa LAB_00141698: MOV EAX,dword ptr [RBX + 0x24] LEA RSI,[RSP + 0xc] MOV dword ptr [RSI],EAX MOV RDI,R14 CALL 0x00116390 LAB_001416aa: MOV EAX,dword ptr [RBX + 0x24] CMP EAX,0xc JA 0x0014174f MOV ECX,0x1c7f BT ECX,EAX JNC 0x001416e0 MOV RDI,qword ptr [R14] MOV RSI,qword ptr [RDI + 0x8] MOV RDX,qword ptr [RBX + 0x28] MOV RCX,qword ptr [RBX + 0x30] CALL 0x001171a0 LAB_001416d4: ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET LAB_001416e0: CMP EAX,0x7 JZ 0x00141717 CMP EAX,0x8 JNZ 0x0014174f CMP qword ptr [RSP + 0x10],0x0 JZ 0x001416d4 XOR R15D,R15D LAB_001416f5: MOV RDI,RBX MOV RSI,R15 CALL 0x00117320 MOV RDI,R14 MOV RSI,RAX CALL 0x00118210 INC R15 CMP R15,qword ptr [RSP + 0x10] JC 0x001416f5 JMP 0x001416d4 LAB_00141717: CMP qword ptr [RSP + 0x10],0x0 JZ 0x001416d4 XOR R15D,R15D LEA R12,[RSP + 0xc] LAB_00141727: MOV RDI,RBX MOV RSI,R15 CALL 0x00117070 MOV AL,byte ptr [RAX] MOV byte ptr [RSP + 0xc],AL MOV RDI,R14 MOV RSI,R12 CALL 0x001169d0 INC R15 CMP R15,qword ptr [RSP + 0x10] JC 0x00141727 JMP 0x001416d4 LAB_0014174f: LEA RDI,[0x159e25] LEA RDX,[0x15a3d4] MOV ESI,0x4c5 XOR EAX,EAX CALL 0x00117c70
/* gguf_writer::write(gguf_kv const&) const */ void __thiscall gguf_writer::write(gguf_writer *this,gguf_kv *param_1) { uint uVar1; string *psVar2; bool *pbVar3; ulong uVar4; int local_2c; ulong local_28; local_28 = gguf_kv::get_ne(param_1); write(this,(string *)param_1); if (param_1[0x20] == (gguf_kv)0x1) { local_2c = 9; write<int>(this,&local_2c); local_2c = *(int *)(param_1 + 0x24); write<int>(this,&local_2c); write<unsigned_long>(this,&local_28); } else { local_2c = *(int *)(param_1 + 0x24); write<int>(this,&local_2c); } uVar1 = *(uint *)(param_1 + 0x24); if (0xc < uVar1) { LAB_0014174f: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",0x4c5, "invalid type"); } if ((0x1c7fU >> (uVar1 & 0x1f) & 1) == 0) { if (uVar1 == 7) { if (local_28 != 0) { uVar4 = 0; do { pbVar3 = gguf_kv::get_val<bool>(param_1,uVar4); local_2c = CONCAT31(local_2c._1_3_,*pbVar3); write<signed_char>(this,(signed *)&local_2c); uVar4 = uVar4 + 1; } while (uVar4 < local_28); } } else { if (uVar1 != 8) goto LAB_0014174f; if (local_28 != 0) { uVar4 = 0; do { psVar2 = gguf_kv::get_val<std::__cxx11::string>(param_1,uVar4); write(this,psVar2); uVar4 = uVar4 + 1; } while (uVar4 < local_28); } } } else { std::vector<signed_char,std::allocator<signed_char>>:: _M_range_insert<__gnu_cxx::__normal_iterator<signed_char_const*,std::vector<signed_char,std::allocator<signed_char>>>> (*(long *)this,*(int8 *)(*(long *)this + 8),*(int8 *)(param_1 + 0x28), *(int8 *)(param_1 + 0x30)); } return; }
40
minja::Value::keys()
monkey531[P]llama/common/./minja.hpp
std::vector<Value> keys() { if (!object_) throw std::runtime_error("Value is not an object: " + dump()); std::vector<Value> res; for (const auto& item : *object_) { res.push_back(item.first); } return res; }
O0
cpp
minja::Value::keys(): subq $0xf8, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0xf0(%rsp) movq %rsi, 0xe8(%rsp) movq 0xe8(%rsp), %rdi movq %rdi, 0x20(%rsp) addq $0x20, %rdi callq 0xb7280 testb $0x1, %al jne 0xc5400 movb $0x1, 0x9b(%rsp) movl $0x10, %edi callq 0x52670 movq 0x20(%rsp), %rsi movq %rax, 0x8(%rsp) leaq 0xa8(%rsp), %rdi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb6dd0 jmp 0xc5334 leaq 0x11787b(%rip), %rsi # 0x1dcbb6 leaq 0xc8(%rsp), %rdi leaq 0xa8(%rsp), %rdx callq 0x5cf00 jmp 0xc5352 movq 0x8(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0x524b0 jmp 0xc5366 movq 0x8(%rsp), %rdi movb $0x0, 0x9b(%rsp) movq 0x1a1c26(%rip), %rsi # 0x266fa0 movq 0x1a1bdf(%rip), %rdx # 0x266f60 callq 0x52a60 jmp 0xc5533 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0xc53e5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0xc53d8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0xc8(%rsp), %rdi callq 0x53408 leaq 0xa8(%rsp), %rdi callq 0x53408 testb $0x1, 0x9b(%rsp) jne 0xc53f1 jmp 0xc53fb movq 0x8(%rsp), %rdi callq 0x52e60 jmp 0xc5526 movq 0x10(%rsp), %rdi movb $0x0, 0x9a(%rsp) callq 0xbed20 movq 0x20(%rsp), %rdi addq $0x20, %rdi callq 0xb9d70 movq %rax, 0x90(%rsp) movq 0x90(%rsp), %rdi callq 0xb7a20 movq %rax, 0x88(%rsp) movq 0x90(%rsp), %rdi callq 0xb7a90 movq %rax, 0x80(%rsp) leaq 0x88(%rsp), %rdi leaq 0x80(%rsp), %rsi callq 0xb7a50 testb $0x1, %al jne 0xc5470 jmp 0xc54f3 leaq 0x88(%rsp), %rdi callq 0xb9da0 movq %rax, 0x78(%rsp) movq 0x78(%rsp), %rsi leaq 0x28(%rsp), %rdi callq 0x95c30 jmp 0xc5493 movq 0x10(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0xbdb30 jmp 0xc54a4 leaq 0x28(%rsp), %rdi callq 0x9b080 leaq 0x88(%rsp), %rdi callq 0xb7e10 jmp 0xc5452 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0xc551c movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0x28(%rsp), %rdi callq 0x9b080 jmp 0xc551c movb $0x1, 0x9a(%rsp) testb $0x1, 0x9a(%rsp) jne 0xc550f movq 0x10(%rsp), %rdi callq 0xbee60 movq 0x18(%rsp), %rax addq $0xf8, %rsp retq movq 0x10(%rsp), %rdi callq 0xbee60 movq 0xa0(%rsp), %rdi callq 0x52ae0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5minja5Value4keysEv: sub rsp, 0F8h mov [rsp+0F8h+var_E8], rdi mov rax, rdi mov [rsp+0F8h+var_E0], rax mov [rsp+0F8h+var_8], rdi mov [rsp+0F8h+var_10], rsi mov rdi, [rsp+0F8h+var_10] mov [rsp+0F8h+var_D8], rdi add rdi, 20h ; ' ' call _ZNKSt12__shared_ptrIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2EEcvbEv; std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool(void) test al, 1 jnz loc_C5400 mov [rsp+0F8h+var_5D], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rsi, [rsp+0F8h+var_D8] mov [rsp+0F8h+var_F0], rax lea rdi, [rsp+0F8h+var_50] mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) jmp short $+2 loc_C5334: lea rsi, aValueIsNotAnOb; "Value is not an object: " lea rdi, [rsp+0F8h+var_30] lea rdx, [rsp+0F8h+var_50] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) jmp short $+2 loc_C5352: mov rdi, [rsp+0F8h+var_F0] lea rsi, [rsp+0F8h+var_30] call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) jmp short $+2 loc_C5366: mov rdi, [rsp+0F8h+var_F0]; void * mov [rsp+0F8h+var_5D], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_C5533 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp short loc_C53E5 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp short loc_C53D8 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C53D8: lea rdi, [rsp+arg_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_C53E5: test [rsp+arg_93], 1 jnz short loc_C53F1 jmp short loc_C53FB loc_C53F1: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_C53FB: jmp loc_C5526 loc_C5400: mov rdi, [rsp+0F8h+var_E8] mov [rsp+0F8h+var_5E], 0 call _ZNSt6vectorIN5minja5ValueESaIS1_EEC2Ev; std::vector<minja::Value>::vector(void) mov rdi, [rsp+0F8h+var_D8] add rdi, 20h ; ' ' call _ZNKSt19__shared_ptr_accessIN8nlohmann16json_abi_v3_11_311ordered_mapINS1_10basic_jsonIS2_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueESt4lessISE_ESaISt4pairIKSE_SG_EEEELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEdeEv; std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(void) mov [rsp+0F8h+var_68], rax mov rdi, [rsp+0F8h+var_68] call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE5beginEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::begin(void) mov [rsp+0F8h+var_70], rax mov rdi, [rsp+0F8h+var_68] call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE3endEv; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::end(void) mov [rsp+0F8h+var_78], rax loc_C5452: lea rdi, [rsp+0F8h+var_70] lea rsi, [rsp+0F8h+var_78] call _ZN9__gnu_cxxneIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEEbRKNS_17__normal_iteratorIT_T0_EEST_; __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&,__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>> const&) test al, 1 jnz short loc_C5470 jmp loc_C54F3 loc_C5470: lea rdi, [rsp+0F8h+var_70] call _ZNK9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEdeEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator*(void) mov [rsp+0F8h+var_80], rax mov rsi, [rsp+0F8h+var_80] lea rdi, [rsp+0F8h+var_D0] call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::Value(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 $+2 loc_C5493: mov rdi, [rsp+0F8h+var_E8] lea rsi, [rsp+0F8h+var_D0] call _ZNSt6vectorIN5minja5ValueESaIS1_EE9push_backEOS1_; std::vector<minja::Value>::push_back(minja::Value&&) jmp short $+2 loc_C54A4: lea rdi, [rsp+0F8h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() lea rdi, [rsp+0F8h+var_70] call _ZN9__gnu_cxx17__normal_iteratorIPSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS3_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS3_14adl_serializerES6_IhSaIhEEvEEN5minja5ValueEES6_ISK_SaISK_EEEppEv; __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator++(void) jmp short loc_C5452 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp short loc_C551C mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_20]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_C551C loc_C54F3: mov [rsp+0F8h+var_5E], 1 test [rsp+0F8h+var_5E], 1 jnz short loc_C550F mov rdi, [rsp+0F8h+var_E8] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() loc_C550F: mov rax, [rsp+0F8h+var_E0] add rsp, 0F8h retn loc_C551C: mov rdi, [rsp+arg_8] call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() loc_C5526: mov rdi, [rsp+arg_98] call __Unwind_Resume loc_C5533: nop word ptr [rax+rax+00000000h] nop dword ptr [rax]
minja::Value * minja::Value::keys(minja::Value *this, long long a2) { void *exception; // [rsp+8h] [rbp-F0h] _BYTE v4[80]; // [rsp+28h] [rbp-D0h] BYREF _BYTE *v5; // [rsp+78h] [rbp-80h] long long v6; // [rsp+80h] [rbp-78h] BYREF long long v7; // [rsp+88h] [rbp-70h] BYREF long long v8; // [rsp+90h] [rbp-68h] char v9; // [rsp+9Ah] [rbp-5Eh] char v10; // [rsp+9Bh] [rbp-5Dh] _BYTE v11[32]; // [rsp+A8h] [rbp-50h] BYREF _BYTE v12[32]; // [rsp+C8h] [rbp-30h] BYREF long long v13; // [rsp+E8h] [rbp-10h] minja::Value *v14; // [rsp+F0h] [rbp-8h] v14 = this; v13 = a2; if ( !std::__shared_ptr<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2>::operator bool((_QWORD *)(a2 + 32)) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v11, a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v12, (long long)"Value is not an object: ", (long long)v11); std::runtime_error::runtime_error(exception, v12); v10 = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v9 = 0; std::vector<minja::Value>::vector((long long)this); v8 = std::__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false>::operator*(a2 + 32); v7 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::begin(v8); v6 = std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::end(v8); while ( __gnu_cxx::operator!=<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>( (long long)&v7, (long long)&v6) ) { v5 = (_BYTE *)__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator*((long long)&v7); minja::Value::Value((long long)v4, v5); std::vector<minja::Value>::push_back((long long)this, (long long)v4); minja::Value::~Value((minja::Value *)v4); __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value> *,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator++(&v7); } return this; }
keys: SUB RSP,0xf8 MOV qword ptr [RSP + 0x10],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0xf0],RDI MOV qword ptr [RSP + 0xe8],RSI MOV RDI,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0x20],RDI ADD RDI,0x20 CALL 0x001b7280 TEST AL,0x1 JNZ 0x001c5400 MOV byte ptr [RSP + 0x9b],0x1 MOV EDI,0x10 CALL 0x00152670 MOV RSI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX LAB_001c531e: LEA RDI,[RSP + 0xa8] MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b6dd0 JMP 0x001c5334 LAB_001c5334: LEA RSI,[0x2dcbb6] LEA RDI,[RSP + 0xc8] LEA RDX,[RSP + 0xa8] CALL 0x0015cf00 JMP 0x001c5352 LAB_001c5352: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0xc8] CALL 0x001524b0 JMP 0x001c5366 LAB_001c5366: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x9b],0x0 MOV RSI,qword ptr [0x00366fa0] MOV RDX,qword ptr [0x00366f60] CALL 0x00152a60 LAB_001c5400: MOV RDI,qword ptr [RSP + 0x10] MOV byte ptr [RSP + 0x9a],0x0 CALL 0x001bed20 MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0x20 CALL 0x001b9d70 MOV qword ptr [RSP + 0x90],RAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x001b7a20 MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x90] CALL 0x001b7a90 MOV qword ptr [RSP + 0x80],RAX LAB_001c5452: LEA RDI,[RSP + 0x88] LEA RSI,[RSP + 0x80] CALL 0x001b7a50 TEST AL,0x1 JNZ 0x001c5470 JMP 0x001c54f3 LAB_001c5470: LEA RDI,[RSP + 0x88] CALL 0x001b9da0 MOV qword ptr [RSP + 0x78],RAX MOV RSI,qword ptr [RSP + 0x78] LAB_001c5487: LEA RDI,[RSP + 0x28] CALL 0x00195c30 JMP 0x001c5493 LAB_001c5493: MOV RDI,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x28] CALL 0x001bdb30 LAB_001c54a2: JMP 0x001c54a4 LAB_001c54a4: LEA RDI,[RSP + 0x28] CALL 0x0019b080 LEA RDI,[RSP + 0x88] CALL 0x001b7e10 JMP 0x001c5452 LAB_001c54f3: MOV byte ptr [RSP + 0x9a],0x1 TEST byte ptr [RSP + 0x9a],0x1 JNZ 0x001c550f MOV RDI,qword ptr [RSP + 0x10] CALL 0x001bee60 LAB_001c550f: MOV RAX,qword ptr [RSP + 0x18] ADD RSP,0xf8 RET
/* WARNING: Removing unreachable block (ram,0x001c5505) */ /* minja::Value::keys() */ vector<minja::Value,std::allocator<minja::Value>> * minja::Value::keys(void) { bool bVar1; runtime_error *this; long in_RSI; vector<minja::Value,std::allocator<minja::Value>> *in_RDI; Value local_d0 [80]; basic_json *local_80; int8 local_78; int8 local_70; vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *local_68; int1 local_5e; int1 local_5d; int1 local_50 [32]; string local_30 [48]; bVar1 = std::__shared_ptr::operator_cast_to_bool((__shared_ptr *)(in_RSI + 0x20)); if (bVar1) { local_5e = 0; std::vector<minja::Value,std::allocator<minja::Value>>::vector(in_RDI); local_68 = (vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)std:: __shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> ::operator*((__shared_ptr_access<nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>,(__gnu_cxx::_Lock_policy)2,false,false> *)(in_RSI + 0x20)); local_70 = std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::begin(local_68); local_78 = std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::end(local_68); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_70,(__normal_iterator *)&local_78), bVar1) { local_80 = (basic_json *) __gnu_cxx:: __normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> ::operator*((__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> *)&local_70); /* try { // try from 001c5487 to 001c5490 has its CatchHandler @ 001c54bd */ Value(local_d0,local_80); /* try { // try from 001c5493 to 001c54a1 has its CatchHandler @ 001c54d3 */ std::vector<minja::Value,std::allocator<minja::Value>>::push_back(in_RDI,local_d0); ~Value(local_d0); __gnu_cxx:: __normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> ::operator++((__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>*,std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>>> *)&local_70); } return in_RDI; } local_5d = 1; this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001c531e to 001c5331 has its CatchHandler @ 001c538b */ dump_abi_cxx11_((int)local_50,SUB81(in_RSI,0)); /* try { // try from 001c5334 to 001c534f has its CatchHandler @ 001c53a1 */ std::operator+((char *)local_30,(string *)"Value is not an object: "); /* try { // try from 001c5352 to 001c5385 has its CatchHandler @ 001c53b7 */ std::runtime_error::runtime_error(this,local_30); local_5d = 0; /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00366fa0,PTR__runtime_error_00366f60); }
41
minja::Value::at(minja::Value const&)
llama.cpp/common/minja/minja.hpp
Value& at(const Value & index) { if (!index.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); if (is_array()) return array_->at(index.get<int>()); if (is_object()) return object_->at(index.primitive_); throw std::runtime_error("Value is not an array or object: " + dump()); }
O3
cpp
minja::Value::at(minja::Value const&): pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 cmpq $0x0, 0x10(%rsi) jne 0xc0309 cmpq $0x0, 0x20(%rsi) jne 0xc0309 cmpq $0x0, 0x30(%rsi) jne 0xc0309 movq 0x10(%r14), %rbx testq %rbx, %rbx je 0xc02ef movq %rsi, %rdi callq 0xc0692 movslq %eax, %rsi movq (%rbx), %rax movq 0x8(%rbx), %rcx subq %rax, %rcx sarq $0x4, %rcx movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD imulq %rcx, %rdx cmpq %rsi, %rdx jbe 0xc0366 leaq (%rsi,%rsi,4), %rcx shlq $0x4, %rcx addq %rcx, %rax addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movq 0x20(%r14), %rdi testq %rdi, %rdi je 0xc0374 addq $0x40, %rsi addq $0x40, %rsp popq %rbx popq %r14 popq %rbp jmp 0xc0612 movl $0x10, %edi callq 0x20640 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb6034 leaq 0x5f74f(%rip), %rsi # 0x11fa7e leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xaf8d4 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x20470 xorl %ebp, %ebp movq 0xa1c6b(%rip), %rsi # 0x161fc0 movq 0xa1c24(%rip), %rdx # 0x161f80 movq %rbx, %rdi callq 0x20a40 jmp 0xc03cf leaq 0x5f5c9(%rip), %rdi # 0x11f936 xorl %eax, %eax callq 0x20090 movl $0x10, %edi callq 0x20640 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0xb6034 leaq 0x5f737(%rip), %rsi # 0x11fad1 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0xaf8d4 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x20470 xorl %ebp, %ebp movq 0xa1c00(%rip), %rsi # 0x161fc0 movq 0xa1bb9(%rip), %rdx # 0x161f80 movq %rbx, %rdi callq 0x20a40 jmp 0xc03d5 jmp 0xc0415 jmp 0xc0435 movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc03f3 movq 0x30(%rsp), %rsi incq %rsi callq 0x20180 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc040e movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 testb %bpl, %bpl jne 0xc0438 jmp 0xc0440 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xc0438 movq 0x10(%rsp), %rsi incq %rsi callq 0x20180 jmp 0xc0438 movq %rax, %r14 movq %rbx, %rdi callq 0x20ef0 movq %r14, %rdi callq 0x20ae0
_ZN5minja5Value2atERKS0_: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi cmp qword ptr [rsi+10h], 0 jnz short loc_C0309 cmp qword ptr [rsi+20h], 0 jnz short loc_C0309 cmp qword ptr [rsi+30h], 0 jnz short loc_C0309 mov rbx, [r14+10h] test rbx, rbx jz short loc_C02EF mov rdi, rsi call _ZNK5minja5Value3getIiEET_v; minja::Value::get<int>(void) movsxd rsi, eax mov rax, [rbx] mov rcx, [rbx+8] sub rcx, rax sar rcx, 4 mov rdx, 0CCCCCCCCCCCCCCCDh imul rdx, rcx cmp rdx, rsi jbe loc_C0366 lea rcx, [rsi+rsi*4] shl rcx, 4 add rax, rcx add rsp, 40h pop rbx pop r14 pop rbp retn loc_C02EF: mov rdi, [r14+20h] test rdi, rdi jz short loc_C0374 add rsi, 40h ; '@' add rsp, 40h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::at(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&) loc_C0309: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_C03CF loc_C0366: lea rdi, aVectorMRangeCh; "vector::_M_range_check: __n (which is %"... xor eax, eax call __ZSt24__throw_out_of_range_fmtPKcz; std::__throw_out_of_range_fmt(char const*,...) loc_C0374: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnAr; "Value is not an array or object: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_C03CF: jmp short loc_C03D5 jmp short loc_C0415 jmp short loc_C0435 loc_C03D5: mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C03F3 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C03F3: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C040E mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_C040E: test bpl, bpl jnz short loc_C0438 jmp short loc_C0440 loc_C0415: mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_C0438 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_C0438 loc_C0435: mov r14, rax loc_C0438: mov rdi, rbx; void * call ___cxa_free_exception loc_C0440: mov rdi, r14 call __Unwind_Resume
unsigned long long minja::Value::at(minja::Value *this, const minja::Value *a2) { _QWORD *v3; // rbx unsigned long long v4; // rsi unsigned long long v5; // rdx long long v7; // rdi void *exception; // rbx void *v9; // rbx _BYTE v10[16]; // [rsp+0h] [rbp-58h] BYREF _QWORD v11[2]; // [rsp+20h] [rbp-38h] BYREF if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>(v11, (long long)"Unashable type: ", (long long)v10); std::runtime_error::runtime_error(exception, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v3 = (_QWORD *)*((_QWORD *)this + 2); if ( v3 ) { v4 = (int)minja::Value::get<int>(a2); v5 = 0xCCCCCCCCCCCCCCCDLL * ((long long)(v3[1] - *v3) >> 4); if ( v5 <= v4 ) std::__throw_out_of_range_fmt("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)", v4, v5); return 80 * v4 + *v3; } else { v7 = *((_QWORD *)this + 4); if ( !v7 ) { v9 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>(v11, (long long)"Value is not an array or object: ", (long long)v10); std::runtime_error::runtime_error(v9, v11); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::at( v7, (char *)a2 + 64); } }
at: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI CMP qword ptr [RSI + 0x10],0x0 JNZ 0x001c0309 CMP qword ptr [RSI + 0x20],0x0 JNZ 0x001c0309 CMP qword ptr [RSI + 0x30],0x0 JNZ 0x001c0309 MOV RBX,qword ptr [R14 + 0x10] TEST RBX,RBX JZ 0x001c02ef MOV RDI,RSI CALL 0x001c0692 MOVSXD RSI,EAX MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] SUB RCX,RAX SAR RCX,0x4 MOV RDX,-0x3333333333333333 IMUL RDX,RCX CMP RDX,RSI JBE 0x001c0366 LEA RCX,[RSI + RSI*0x4] SHL RCX,0x4 ADD RAX,RCX ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_001c02ef: MOV RDI,qword ptr [R14 + 0x20] TEST RDI,RDI JZ 0x001c0374 ADD RSI,0x40 ADD RSP,0x40 POP RBX POP R14 POP RBP JMP 0x001c0612 LAB_001c0309: MOV EDI,0x10 CALL 0x00120640 MOV RBX,RAX LAB_001c0316: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b6034 LAB_001c0328: LEA RSI,[0x21fa7e] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001af8d4 MOV BPL,0x1 LAB_001c033f: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00120470 XOR EBP,EBP MOV RSI,qword ptr [0x00261fc0] MOV RDX,qword ptr [0x00261f80] MOV RDI,RBX CALL 0x00120a40 LAB_001c0366: LEA RDI,[0x21f936] XOR EAX,EAX CALL 0x00120090 LAB_001c0374: MOV EDI,0x10 CALL 0x00120640 MOV RBX,RAX LAB_001c0381: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x001b6034 LAB_001c0393: LEA RSI,[0x21fad1] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001af8d4 MOV BPL,0x1 LAB_001c03aa: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00120470 XOR EBP,EBP MOV RSI,qword ptr [0x00261fc0] MOV RDX,qword ptr [0x00261f80] MOV RDI,RBX CALL 0x00120a40
/* minja::Value::at(minja::Value const&) */ long __thiscall minja::Value::at(Value *this,Value *param_1) { long *plVar1; int iVar2; long lVar3; runtime_error *prVar4; ulong uVar5; ulong uVar6; int1 auStack_58 [32]; string local_38 [32]; if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) && (*(long *)(param_1 + 0x30) == 0)) { plVar1 = *(long **)(this + 0x10); if (plVar1 == (long *)0x0) { if (*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20) != (ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)0x0) { lVar3 = nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::at(*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20),(basic_json *)(param_1 + 0x40)); return lVar3; } } else { iVar2 = get<int>(param_1); uVar6 = (ulong)iVar2; uVar5 = (plVar1[1] - *plVar1 >> 4) * -0x3333333333333333; if (uVar6 <= uVar5 && uVar5 - uVar6 != 0) { return *plVar1 + uVar6 * 0x50; } std::__throw_out_of_range_fmt ("vector::_M_range_check: __n (which is %zu) >= this->size() (which is %zu)"); } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001c0381 to 001c0392 has its CatchHandler @ 001c03d3 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001c0393 to 001c03a6 has its CatchHandler @ 001c03d1 */ std::operator+((char *)local_38,(string *)"Value is not an array or object: "); /* try { // try from 001c03aa to 001c03ce has its CatchHandler @ 001c03cf */ std::runtime_error::runtime_error(prVar4,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80); } prVar4 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001c0316 to 001c0327 has its CatchHandler @ 001c0435 */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 001c0328 to 001c033b has its CatchHandler @ 001c0415 */ std::operator+((char *)local_38,(string *)"Unashable type: "); /* try { // try from 001c033f to 001c0363 has its CatchHandler @ 001c03d5 */ std::runtime_error::runtime_error(prVar4,local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar4,PTR_typeinfo_00261fc0,PTR__runtime_error_00261f80); }
42
psi_prlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_prlock_wrlock(mysql_prlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_WRITELOCK, file, line); int result= rw_pr_wrlock(&that->m_prlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O3
c
psi_prlock_wrlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movl %edx, %r8d movq %rsi, %rcx movq %rdi, %r14 leaq 0x3571d4(%rip), %r15 # 0x386010 movq (%r15), %rax movq 0x68(%rdi), %rsi leaq -0x48(%rbp), %rdi pushq $0x1 popq %rdx callq *0x1b0(%rax) movq %rax, %rbx movq %r14, %rdi callq 0xa46d1 movl %eax, %r14d testq %rbx, %rbx je 0x2ee72 movq (%r15), %rax movq %rbx, %rdi movl %r14d, %esi callq *0x1b8(%rax) movl %r14d, %eax addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
psi_prlock_wrlock: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r8d, edx mov rcx, rsi mov r14, rdi lea r15, PSI_server mov rax, [r15] mov rsi, [rdi+68h] lea rdi, [rbp+var_48] push 1 pop rdx call qword ptr [rax+1B0h] mov rbx, rax mov rdi, r14 call rw_pr_wrlock mov r14d, eax test rbx, rbx jz short loc_2EE72 mov rax, [r15] mov rdi, rbx mov esi, r14d call qword ptr [rax+1B8h] loc_2EE72: mov eax, r14d add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long psi_prlock_wrlock(long long a1, long long a2, unsigned int a3) { long long v3; // rbx unsigned int v4; // r14d _BYTE v6[72]; // [rsp+8h] [rbp-48h] BYREF v3 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])( v6, *(_QWORD *)(a1 + 104), 1LL, a2, a3); v4 = rw_pr_wrlock(a1); if ( v3 ) ((void ( *)(long long, _QWORD))PSI_server[55])(v3, v4); return v4; }
psi_prlock_wrlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R8D,EDX MOV RCX,RSI MOV R14,RDI LEA R15,[0x486010] MOV RAX,qword ptr [R15] MOV RSI,qword ptr [RDI + 0x68] LEA RDI,[RBP + -0x48] PUSH 0x1 POP RDX CALL qword ptr [RAX + 0x1b0] MOV RBX,RAX MOV RDI,R14 CALL 0x001a46d1 MOV R14D,EAX TEST RBX,RBX JZ 0x0012ee72 MOV RAX,qword ptr [R15] MOV RDI,RBX MOV ESI,R14D CALL qword ptr [RAX + 0x1b8] LAB_0012ee72: MOV EAX,R14D ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
int4 psi_prlock_wrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [48]; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x68),1,param_2,param_3); uVar1 = rw_pr_wrlock(param_1); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
43
JS_SetPropertyStr
bluesky950520[P]quickjs/quickjs.c
int JS_SetPropertyStr(JSContext *ctx, JSValue this_obj, const char *prop, JSValue val) { JSAtom atom; int ret; atom = JS_NewAtom(ctx, prop); ret = JS_SetPropertyInternal(ctx, this_obj, atom, val, JS_PROP_THROW); JS_FreeAtom(ctx, atom); return ret; }
O0
c
JS_SetPropertyStr: subq $0x48, %rsp movq %rsi, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq %r8, 0x28(%rsp) movq %r9, 0x30(%rsp) movq %rdi, 0x20(%rsp) movq %rcx, 0x18(%rsp) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x284c0 movl %eax, 0x14(%rsp) movq 0x20(%rsp), %rdi movl 0x14(%rsp), %ecx movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x28(%rsp), %r8 movq 0x30(%rsp), %r9 movl $0x4000, (%rsp) # imm = 0x4000 callq 0x33d60 movl %eax, 0x10(%rsp) movq 0x20(%rsp), %rdi movl 0x14(%rsp), %esi callq 0x29040 movl 0x10(%rsp), %eax addq $0x48, %rsp retq nopl (%rax)
JS_SetPropertyStr: sub rsp, 48h mov [rsp+48h+var_10], rsi mov [rsp+48h+var_8], rdx mov [rsp+48h+var_20], r8 mov [rsp+48h+var_18], r9 mov [rsp+48h+var_28], rdi mov [rsp+48h+var_30], rcx mov rdi, [rsp+48h+var_28] mov rsi, [rsp+48h+var_30] call JS_NewAtom mov [rsp+48h+var_34], eax mov rdi, [rsp+48h+var_28] mov ecx, [rsp+48h+var_34] mov rsi, [rsp+48h+var_10] mov rdx, [rsp+48h+var_8] mov r8, [rsp+48h+var_20] mov r9, [rsp+48h+var_18] mov [rsp+48h+var_48], 4000h call JS_SetPropertyInternal mov [rsp+48h+var_38], eax mov rdi, [rsp+48h+var_28] mov esi, [rsp+48h+var_34] call JS_FreeAtom mov eax, [rsp+48h+var_38] add rsp, 48h retn
long long JS_SetPropertyStr(long long a1, int a2, int a3, unsigned __int8 *a4, int a5, int a6) { unsigned int v7; // [rsp+10h] [rbp-38h] unsigned int v8; // [rsp+14h] [rbp-34h] v8 = JS_NewAtom(a1, a4); v7 = JS_SetPropertyInternal(a1, a2, a3, v8, a5, a6, 0x4000); JS_FreeAtom(a1, v8); return v7; }
JS_SetPropertyStr: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x28],R8 MOV qword ptr [RSP + 0x30],R9 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RCX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001284c0 MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RSP + 0x14] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] MOV R8,qword ptr [RSP + 0x28] MOV R9,qword ptr [RSP + 0x30] MOV dword ptr [RSP],0x4000 CALL 0x00133d60 MOV dword ptr [RSP + 0x10],EAX MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x14] CALL 0x00129040 MOV EAX,dword ptr [RSP + 0x10] ADD RSP,0x48 RET
int4 JS_SetPropertyStr(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { int4 uVar1; int4 uVar2; uVar1 = JS_NewAtom(param_1,param_4); uVar2 = JS_SetPropertyInternal(param_1,param_2,param_3,uVar1,param_5,param_6,0x4000); JS_FreeAtom(param_1,uVar1); return uVar2; }
44
JS_SetPropertyStr
bluesky950520[P]quickjs/quickjs.c
int JS_SetPropertyStr(JSContext *ctx, JSValue this_obj, const char *prop, JSValue val) { JSAtom atom; int ret; atom = JS_NewAtom(ctx, prop); ret = JS_SetPropertyInternal(ctx, this_obj, atom, val, JS_PROP_THROW); JS_FreeAtom(ctx, atom); return ret; }
O1
c
JS_SetPropertyStr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %r14 movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %rbp movq %rdi, %rbx movq %rcx, %rdi callq 0xe240 movq %rbx, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x1fdc0 movl %eax, %r12d movq %rbp, 0x28(%rsp) movq %r13, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movq $0x0, 0x18(%rsp) movl $0x4000, 0x10(%rsp) # imm = 0x4000 movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx movl %eax, %ecx movq %r15, %r8 movq %r14, %r9 callq 0x24388 movl %eax, %ebp movq %rbx, %rdi movl %r12d, %esi callq 0x207d8 movl %ebp, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_SetPropertyStr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r9 mov r15, r8 mov r12, rcx mov r13, rdx mov rbp, rsi mov rbx, rdi mov rdi, rcx call _strlen mov rdi, rbx mov rsi, r12 mov rdx, rax call JS_NewAtomLen mov r12d, eax mov qword ptr [rsp+68h+var_40], rbp mov qword ptr [rsp+68h+var_40+8], r13 movups xmm0, [rsp+68h+var_40] movups [rsp+68h+var_68], xmm0 mov [rsp+68h+var_50], 0 mov [rsp+68h+var_58], 4000h mov rdi, rbx mov rsi, rbp mov rdx, r13 mov ecx, eax mov r8, r15 mov r9, r14 call JS_SetPropertyInternal2 mov ebp, eax mov rdi, rbx mov esi, r12d call JS_FreeAtom mov eax, ebp add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_SetPropertyStr( long long a1, long long a2, unsigned long long a3, unsigned __int8 *a4, _DWORD *a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { unsigned __int8 *v16; // r12 long long v18; // rax double v19; // xmm4_8 double v20; // xmm5_8 unsigned int v21; // ebp __m128 v23; // [rsp+28h] [rbp-40h] v16 = a4; v18 = strlen(a4); LODWORD(v16) = JS_NewAtomLen(a1, v16, v18); v23.m128_u64[0] = a2; v23.m128_u64[1] = a3; v21 = JS_SetPropertyInternal2( a1, a2, a3, (unsigned int)v16, a5, a6, v23, a8, a9, a10, v19, v20, a13, a14, a2, a3, 0x4000u, 0LL); JS_FreeAtom(a1, (int)v16); return v21; }
45
JS_SetPropertyStr
bluesky950520[P]quickjs/quickjs.c
int JS_SetPropertyStr(JSContext *ctx, JSValue this_obj, const char *prop, JSValue val) { JSAtom atom; int ret; atom = JS_NewAtom(ctx, prop); ret = JS_SetPropertyInternal(ctx, this_obj, atom, val, JS_PROP_THROW); JS_FreeAtom(ctx, atom); return ret; }
O3
c
JS_SetPropertyStr: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %r14 movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %rbp movq %rdi, %rbx movq %rcx, %rdi callq 0xe240 movq %rbx, %rdi movq %r12, %rsi movq %rax, %rdx callq 0x2052b movl %eax, %r12d movq %rbp, 0x28(%rsp) movq %r13, 0x30(%rsp) movups 0x28(%rsp), %xmm0 movups %xmm0, (%rsp) movq $0x0, 0x18(%rsp) movl $0x4000, 0x10(%rsp) # imm = 0x4000 movq %rbx, %rdi movq %rbp, %rsi movq %r13, %rdx movl %eax, %ecx movq %r15, %r8 movq %r14, %r9 callq 0x249bb movl %eax, %ebp movq %rbx, %rdi movl %r12d, %esi callq 0x20f31 movl %ebp, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_SetPropertyStr: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r9 mov r15, r8 mov r12, rcx mov r13, rdx mov rbp, rsi mov rbx, rdi mov rdi, rcx call _strlen mov rdi, rbx mov rsi, r12 mov rdx, rax call JS_NewAtomLen mov r12d, eax mov qword ptr [rsp+68h+var_40], rbp mov qword ptr [rsp+68h+var_40+8], r13 movups xmm0, [rsp+68h+var_40] movups [rsp+68h+var_68], xmm0 mov [rsp+68h+var_50], 0 mov [rsp+68h+var_58], 4000h mov rdi, rbx mov rsi, rbp mov rdx, r13 mov ecx, eax mov r8, r15 mov r9, r14 call JS_SetPropertyInternal2 mov ebp, eax mov rdi, rbx mov esi, r12d call JS_FreeAtom mov eax, ebp add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long JS_SetPropertyStr( long long a1, long long a2, long long a3, unsigned __int8 *a4, int *a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { unsigned __int8 *v16; // r12 long long v18; // rax double v19; // xmm4_8 double v20; // xmm5_8 unsigned int v21; // ebp __m128 v23; // [rsp+28h] [rbp-40h] v16 = a4; v18 = strlen(a4); LODWORD(v16) = JS_NewAtomLen(a1, v16, v18); v23.m128_u64[0] = a2; v23.m128_u64[1] = a3; v21 = JS_SetPropertyInternal2( a1, a2, a3, (unsigned int)v16, a5, a6, v23, a8, a9, a10, v19, v20, a13, a14, a2, a3, 0x4000u, 0LL); JS_FreeAtom(a1, (int)v16); return v21; }
JS_SetPropertyStr: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R9 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV RBP,RSI MOV RBX,RDI MOV RDI,RCX CALL 0x0010e240 MOV RDI,RBX MOV RSI,R12 MOV RDX,RAX CALL 0x0012052b MOV R12D,EAX MOV qword ptr [RSP + 0x28],RBP MOV qword ptr [RSP + 0x30],R13 MOVUPS XMM0,xmmword ptr [RSP + 0x28] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x18],0x0 MOV dword ptr [RSP + 0x10],0x4000 MOV RDI,RBX MOV RSI,RBP MOV RDX,R13 MOV ECX,EAX MOV R8,R15 MOV R9,R14 CALL 0x001249bb MOV EBP,EAX MOV RDI,RBX MOV ESI,R12D CALL 0x00120f31 MOV EAX,EBP ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 JS_SetPropertyStr(int8 param_1,int8 param_2,int8 param_3,char *param_4, int8 param_5,int8 param_6) { int4 uVar1; int4 uVar2; size_t sVar3; int4 local_40; int4 uStack_38; sVar3 = strlen(param_4); uVar1 = JS_NewAtomLen(param_1,param_4,sVar3); local_40 = (int4)param_2; uStack_38 = (int4)param_3; uVar2 = JS_SetPropertyInternal2 (param_1,param_2,param_3,uVar1,param_5,param_6,local_40,uStack_38,0x4000,0); JS_FreeAtom(param_1,uVar1); return uVar2; }
46
mi_delete_static_record
eloqsql/storage/myisam/mi_statrec.c
int _mi_delete_static_record(MI_INFO *info) { uchar temp[9]; /* 1+sizeof(uint32) */ info->state->del++; info->state->empty+=info->s->base.pack_reclength; temp[0]= '\0'; /* Mark that record is deleted */ _mi_dpointer(info,temp+1,info->s->state.dellink); info->s->state.dellink = info->lastpos; info->rec_cache.seek_not_done=1; return (info->s->file_write(info,(uchar*) temp, 1+info->s->rec_reflength, info->lastpos, MYF(MY_NABP)) != 0); }
O0
c
mi_delete_static_record: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %rcx incq %rcx movq %rcx, 0x8(%rax) movq -0x20(%rbp), %rax movq (%rax), %rcx movq 0x8(%rax), %rax movq 0x148(%rcx), %rdx movq 0x10(%rax), %rcx addq %rdx, %rcx movq %rcx, 0x10(%rax) movb $0x0, -0x11(%rbp) movq -0x20(%rbp), %rdi leaq -0x10(%rbp), %rsi movq (%rdi), %rax movq 0x58(%rax), %rdx callq 0x4c740 movq -0x20(%rbp), %rcx movq (%rcx), %rax movq 0x170(%rcx), %rcx movq %rcx, 0x58(%rax) movq -0x20(%rbp), %rax movl $0x1, 0x300(%rax) movq -0x20(%rbp), %rdi movq (%rdi), %rdx movq 0x170(%rdi), %rcx movq 0x2e8(%rdx), %rax movl 0x338(%rdx), %edx incl %edx leaq -0x11(%rbp), %rsi movl $0x4, %r8d callq *%rax testq %rax, %rax setne %al movzbl %al, %eax movl %eax, -0x24(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x4fff1 movl -0x24(%rbp), %eax addq $0x30, %rsp popq %rbp retq callq 0x29420 nopw %cs:(%rax,%rax)
_mi_delete_static_record: push rbp mov rbp, rsp sub rsp, 30h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov rax, [rbp+var_20] mov rax, [rax+8] mov rcx, [rax+8] inc rcx mov [rax+8], rcx mov rax, [rbp+var_20] mov rcx, [rax] mov rax, [rax+8] mov rdx, [rcx+148h] mov rcx, [rax+10h] add rcx, rdx mov [rax+10h], rcx mov [rbp+var_11], 0 mov rdi, [rbp+var_20] lea rsi, [rbp+var_10] mov rax, [rdi] mov rdx, [rax+58h] call _mi_dpointer mov rcx, [rbp+var_20] mov rax, [rcx] mov rcx, [rcx+170h] mov [rax+58h], rcx mov rax, [rbp+var_20] mov dword ptr [rax+300h], 1 mov rdi, [rbp+var_20] mov rdx, [rdi] mov rcx, [rdi+170h] mov rax, [rdx+2E8h] mov edx, [rdx+338h] inc edx lea rsi, [rbp+var_11] mov r8d, 4 call rax test rax, rax setnz al movzx eax, al mov [rbp+var_24], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_4FFF1 mov eax, [rbp+var_24] add rsp, 30h pop rbp retn loc_4FFF1: call ___stack_chk_fail
_BOOL8 mi_delete_static_record(_QWORD *a1) { char v2; // [rsp+1Fh] [rbp-11h] BYREF _BYTE v3[8]; // [rsp+20h] [rbp-10h] BYREF unsigned long long v4; // [rsp+28h] [rbp-8h] v4 = __readfsqword(0x28u); ++*(_QWORD *)(a1[1] + 8LL); *(_QWORD *)(a1[1] + 16LL) += *(_QWORD *)(*a1 + 328LL); v2 = 0; mi_dpointer((long long)a1, v3, *(_QWORD *)(*a1 + 88LL)); *(_QWORD *)(*a1 + 88LL) = a1[46]; *((_DWORD *)a1 + 192) = 1; return (*(long long ( **)(_QWORD *, char *, _QWORD, _QWORD, long long))(*a1 + 744LL))( a1, &v2, (unsigned int)(*(_DWORD *)(*a1 + 824LL) + 1), a1[46], 4LL) != 0; }
_mi_delete_static_record: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX + 0x8] INC RCX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RCX + 0x148] MOV RCX,qword ptr [RAX + 0x10] ADD RCX,RDX MOV qword ptr [RAX + 0x10],RCX MOV byte ptr [RBP + -0x11],0x0 MOV RDI,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x10] MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RAX + 0x58] CALL 0x0014c740 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RCX] MOV RCX,qword ptr [RCX + 0x170] MOV qword ptr [RAX + 0x58],RCX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x300],0x1 MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RDI] MOV RCX,qword ptr [RDI + 0x170] MOV RAX,qword ptr [RDX + 0x2e8] MOV EDX,dword ptr [RDX + 0x338] INC EDX LEA RSI,[RBP + -0x11] MOV R8D,0x4 CALL RAX TEST RAX,RAX SETNZ AL MOVZX EAX,AL MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0014fff1 MOV EAX,dword ptr [RBP + -0x24] ADD RSP,0x30 POP RBP RET LAB_0014fff1: CALL 0x00129420
bool _mi_delete_static_record(long *param_1) { long lVar1; long in_FS_OFFSET; int1 local_19; int1 local_18 [8]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + 1; *(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) + *(long *)(*param_1 + 0x148); local_19 = 0; _mi_dpointer(param_1,local_18,*(int8 *)(*param_1 + 0x58)); *(long *)(*param_1 + 0x58) = param_1[0x2e]; *(int4 *)(param_1 + 0x60) = 1; lVar1 = (**(code **)(*param_1 + 0x2e8)) (param_1,&local_19,*(int *)(*param_1 + 0x338) + 1,param_1[0x2e],4); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return lVar1 != 0; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
47
mthd_supported_buffer_type
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
my_bool mthd_supported_buffer_type(enum enum_field_types type) { switch (type) { case MYSQL_TYPE_BIT: case MYSQL_TYPE_BLOB: case MYSQL_TYPE_DATE: case MYSQL_TYPE_DATETIME: case MYSQL_TYPE_DECIMAL: case MYSQL_TYPE_DOUBLE: case MYSQL_TYPE_FLOAT: case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_INT24: case MYSQL_TYPE_LONG: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_LONGLONG: case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_NEWDATE: case MYSQL_TYPE_NEWDECIMAL: case MYSQL_TYPE_NULL: case MYSQL_TYPE_SHORT: case MYSQL_TYPE_STRING: case MYSQL_TYPE_JSON: case MYSQL_TYPE_TIME: case MYSQL_TYPE_TIMESTAMP: case MYSQL_TYPE_TINY: case MYSQL_TYPE_TINY_BLOB: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_YEAR: return 1; break; default: return 0; break; } }
O0
c
mthd_supported_buffer_type: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) movl -0x8(%rbp), %eax movl %eax, -0xc(%rbp) subl $0xf, %eax jb 0x256dc jmp 0x256b4 movl -0xc(%rbp), %eax subl $0x10, %eax je 0x256dc jmp 0x256be movl -0xc(%rbp), %eax addl $0xffffff0b, %eax # imm = 0xFFFFFF0B subl $0x2, %eax jb 0x256dc jmp 0x256cd movl -0xc(%rbp), %eax addl $0xffffff07, %eax # imm = 0xFFFFFF07 subl $0x6, %eax ja 0x256e2 jmp 0x256dc movb $0x1, -0x1(%rbp) jmp 0x256e6 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax,%rax)
mthd_supported_buffer_type: push rbp mov rbp, rsp mov [rbp+var_8], edi mov eax, [rbp+var_8] mov [rbp+var_C], eax sub eax, 0Fh jb short loc_256DC jmp short $+2 loc_256B4: mov eax, [rbp+var_C] sub eax, 10h jz short loc_256DC jmp short $+2 loc_256BE: mov eax, [rbp+var_C] add eax, 0FFFFFF0Bh sub eax, 2 jb short loc_256DC jmp short $+2 loc_256CD: mov eax, [rbp+var_C] add eax, 0FFFFFF07h sub eax, 6 ja short loc_256E2 jmp short $+2 loc_256DC: mov [rbp+var_1], 1 jmp short loc_256E6 loc_256E2: mov [rbp+var_1], 0 loc_256E6: mov al, [rbp+var_1] pop rbp retn
bool mthd_supported_buffer_type(unsigned int a1) { return a1 < 0xF || a1 == 16 || a1 - 245 < 2 || a1 - 249 <= 6; }
mthd_supported_buffer_type: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI MOV EAX,dword ptr [RBP + -0x8] MOV dword ptr [RBP + -0xc],EAX SUB EAX,0xf JC 0x001256dc JMP 0x001256b4 LAB_001256b4: MOV EAX,dword ptr [RBP + -0xc] SUB EAX,0x10 JZ 0x001256dc JMP 0x001256be LAB_001256be: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0xffffff0b SUB EAX,0x2 JC 0x001256dc JMP 0x001256cd LAB_001256cd: MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0xffffff07 SUB EAX,0x6 JA 0x001256e2 JMP 0x001256dc LAB_001256dc: MOV byte ptr [RBP + -0x1],0x1 JMP 0x001256e6 LAB_001256e2: MOV byte ptr [RBP + -0x1],0x0 LAB_001256e6: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int8 mthd_supported_buffer_type(uint param_1) { ulong uVar1; int1 local_9; uVar1 = (ulong)(param_1 - 0xf); if ((((param_1 < 0xf) || (uVar1 = (ulong)(param_1 - 0x10), param_1 - 0x10 == 0)) || (uVar1 = (ulong)(param_1 - 0xf7), param_1 - 0xf5 < 2)) || (uVar1 = (ulong)(param_1 - 0xff), param_1 - 0xf9 < 6 || param_1 - 0xff == 0)) { local_9 = 1; } else { local_9 = 0; } return CONCAT71((int7)(uVar1 >> 8),local_9); }
48
my_hash_sort_ucs2_nopad_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len, ulong *nr1, ulong *nr2) { const uchar *end= key + len; register ulong m1= *nr1, m2= *nr2; for ( ; key < end ; key++) { MY_HASH_ADD(m1, m2, (uint)*key); } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_ucs2_nopad_bin: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x138bde jmp 0x138b96 movq -0x38(%rbp), %rax andq $0x3f, %rax addq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x38(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x38(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x40(%rbp), %rax addq $0x3, %rax movq %rax, -0x40(%rbp) jmp 0x138bd0 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x138b8a movq -0x38(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x40(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_ucs2_nopad_bin: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_40], rax loc_138B8A: mov rax, [rbp+var_10] cmp rax, [rbp+var_30] jnb short loc_138BDE jmp short $+2 loc_138B96: mov rax, [rbp+var_38] and rax, 3Fh add rax, [rbp+var_40] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_38] shl rcx, 8 add rax, rcx xor rax, [rbp+var_38] mov [rbp+var_38], rax mov rax, [rbp+var_40] add rax, 3 mov [rbp+var_40], rax jmp short $+2 loc_138BD0: mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_138B8A loc_138BDE: mov rcx, [rbp+var_38] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_40] mov rax, [rbp+var_28] mov [rax], rcx pop rbp retn
_QWORD * my_hash_sort_ucs2_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, _QWORD *a5) { _QWORD *result; // rax long long v6; // [rsp+0h] [rbp-40h] long long v7; // [rsp+8h] [rbp-38h] unsigned __int8 *v8; // [rsp+30h] [rbp-10h] v8 = a2; v7 = *a4; v6 = *a5; while ( v8 < &a2[a3] ) { v7 ^= (v7 << 8) + *v8 * (v6 + (v7 & 0x3F)); v6 += 3LL; ++v8; } *a4 = v7; result = a5; *a5 = v6; return result; }
49
my_hash_sort_ucs2_nopad_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_ucs2_nopad_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *key, size_t len, ulong *nr1, ulong *nr2) { const uchar *end= key + len; register ulong m1= *nr1, m2= *nr2; for ( ; key < end ; key++) { MY_HASH_ADD(m1, m2, (uint)*key); } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_ucs2_nopad_bin: movq (%rcx), %rax movq (%r8), %rdi testq %rdx, %rdx jle 0xc9415 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 0xc93e9 popq %rbp movq %rax, (%rcx) movq %rdi, (%r8) retq
my_hash_sort_ucs2_nopad_bin: mov rax, [rcx] mov rdi, [r8] test rdx, rdx jle short loc_C9415 push rbp mov rbp, rsp add rdx, rsi loc_C93E9: 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_C93E9 pop rbp loc_C9415: mov [rcx], rax mov [r8], rdi retn
long long my_hash_sort_ucs2_nopad_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_ucs2_nopad_bin: MOV RAX,qword ptr [RCX] MOV RDI,qword ptr [R8] TEST RDX,RDX JLE 0x001c9415 PUSH RBP MOV RBP,RSP ADD RDX,RSI LAB_001c93e9: 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 0x001c93e9 POP RBP LAB_001c9415: MOV qword ptr [RCX],RAX MOV qword ptr [R8],RDI RET
void my_hash_sort_ucs2_nopad_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; }
50
bitmap_is_set_all
eloqsql/mysys/my_bitmap.c
my_bool bitmap_is_set_all(const MY_BITMAP *map) { my_bitmap_map *data_ptr= map->bitmap; my_bitmap_map *end= map->last_word_ptr; for (; data_ptr < end; data_ptr++) if (*data_ptr != 0xFFFFFFFF) return FALSE; return (*data_ptr | map->last_word_mask) == 0xFFFFFFFF; }
O0
c
bitmap_is_set_all: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xedd18 movq -0x18(%rbp), %rax cmpl $-0x1, (%rax) je 0xedd08 movb $0x0, -0x1(%rbp) jmp 0xedd33 jmp 0xedd0a movq -0x18(%rbp), %rax addq $0x4, %rax movq %rax, -0x18(%rbp) jmp 0xedcef movq -0x18(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rcx orl 0x18(%rcx), %eax cmpl $-0x1, %eax sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax,%rax)
bitmap_is_set_all: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_20], rax loc_EDCEF: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jnb short loc_EDD18 mov rax, [rbp+var_18] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_EDD08 mov [rbp+var_1], 0 jmp short loc_EDD33 loc_EDD08: jmp short $+2 loc_EDD0A: mov rax, [rbp+var_18] add rax, 4 mov [rbp+var_18], rax jmp short loc_EDCEF loc_EDD18: mov rax, [rbp+var_18] mov eax, [rax] mov rcx, [rbp+var_10] or eax, [rcx+18h] cmp eax, 0FFFFFFFFh setz al and al, 1 movzx eax, al mov [rbp+var_1], al loc_EDD33: mov al, [rbp+var_1] pop rbp retn
bool bitmap_is_set_all(long long a1) { _DWORD *i; // [rsp+8h] [rbp-18h] for ( i = *(_DWORD **)a1; (unsigned long long)i < *(_QWORD *)(a1 + 8); ++i ) { if ( *i != -1 ) return 0; } return (*(_DWORD *)(a1 + 24) | *i) == -1; }
bitmap_is_set_all: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x20],RAX LAB_001edcef: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001edd18 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],-0x1 JZ 0x001edd08 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001edd33 LAB_001edd08: JMP 0x001edd0a LAB_001edd0a: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 MOV qword ptr [RBP + -0x18],RAX JMP 0x001edcef LAB_001edd18: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] OR EAX,dword ptr [RCX + 0x18] CMP EAX,-0x1 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x1],AL LAB_001edd33: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int8 bitmap_is_set_all(int8 *param_1) { uint *local_20; bool local_9; local_20 = (uint *)*param_1; do { if ((uint *)param_1[1] <= local_20) { local_9 = (*local_20 | *(uint *)(param_1 + 3)) == 0xffffffff; local_20 = (uint *)0x0; LAB_001edd33: return CONCAT71((int7)((ulong)local_20 >> 8),local_9); } if (*local_20 != 0xffffffff) { local_9 = false; goto LAB_001edd33; } local_20 = local_20 + 1; } while( true ); }
51
ImPlot::GetPlotLimits(int, int)
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
ImPlotRect GetPlotLimits(ImAxis x_idx, ImAxis y_idx) { ImPlotContext& gp = *GImPlot; IM_ASSERT_USER_ERROR(gp.CurrentPlot != nullptr, "GetPlotLimits() needs to be called between BeginPlot() and EndPlot()!"); IM_ASSERT_USER_ERROR(x_idx == IMPLOT_AUTO || (x_idx >= ImAxis_X1 && x_idx < ImAxis_Y1), "X-Axis index out of bounds!"); IM_ASSERT_USER_ERROR(y_idx == IMPLOT_AUTO || (y_idx >= ImAxis_Y1 && y_idx < ImAxis_COUNT), "Y-Axis index out of bounds!"); SetupLock(); ImPlotPlot& plot = *gp.CurrentPlot; ImPlotAxis& x_axis = x_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentX] : plot.Axes[x_idx]; ImPlotAxis& y_axis = y_idx == IMPLOT_AUTO ? plot.Axes[plot.CurrentY] : plot.Axes[y_idx]; ImPlotRect limits; limits.X = x_axis.Range; limits.Y = y_axis.Range; return limits; }
O1
cpp
ImPlot::GetPlotLimits(int, int): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %edx, %r14d movl %esi, %r15d movq %rdi, %rbx movq 0x2765fa(%rip), %r12 # 0x336ca0 cmpq $0x0, 0x50(%r12) jne 0xc06ba leaq 0x1da252(%rip), %rdi # 0x29a907 callq 0x2161f4 leal 0x1(%r15), %eax cmpl $0x4, %eax jae 0xc0757 leal 0x1(%r14), %eax cmpl $0x6, %eax ja 0xc0768 movl $0x71, %ecx btl %eax, %ecx jae 0xc0768 movq 0x2765b7(%rip), %r13 # 0x336ca0 movq 0x50(%r13), %rax cmpb $0x0, 0x9de(%rax) jne 0xc06fb callq 0xb930f movq 0x50(%r13), %rax movb $0x1, 0x9de(%rax) movq 0x50(%r12), %rax cmpl $-0x1, %r15d jne 0xc0718 movl 0x978(%rax), %r15d cmpl $-0x1, %r14d jne 0xc0725 movl 0x97c(%rax), %r14d movslq %r15d, %rcx movslq %r14d, %rdx imulq $0x178, %rcx, %rcx # imm = 0x178 movups 0x28(%rax,%rcx), %xmm0 movups %xmm0, (%rbx) imulq $0x178, %rdx, %rcx # imm = 0x178 movups 0x28(%rax,%rcx), %xmm0 movups %xmm0, 0x10(%rbx) movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq leaq 0x1da0e4(%rip), %rdi # 0x29a842 callq 0x2161f4 jmp 0xc06c7 leaq 0x1da0ef(%rip), %rdi # 0x29a85e callq 0x2161f4 jmp 0xc06e2
_ZN6ImPlot13GetPlotLimitsEii: push r15 push r14 push r13 push r12 push rbx mov r14d, edx mov r15d, esi mov rbx, rdi mov r12, cs:GImPlot cmp qword ptr [r12+50h], 0 jnz short loc_C06BA lea rdi, aGetplotlimitsN; "GetPlotLimits() needs to be called betw"... call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_C06BA: lea eax, [r15+1] cmp eax, 4 jnb loc_C0757 loc_C06C7: lea eax, [r14+1] cmp eax, 6 ja loc_C0768 mov ecx, 71h ; 'q' bt ecx, eax jnb loc_C0768 loc_C06E2: mov r13, cs:GImPlot mov rax, [r13+50h] cmp byte ptr [rax+9DEh], 0 jnz short loc_C06FB call _ZN6ImPlot11SetupFinishEv; ImPlot::SetupFinish(void) loc_C06FB: mov rax, [r13+50h] mov byte ptr [rax+9DEh], 1 mov rax, [r12+50h] cmp r15d, 0FFFFFFFFh jnz short loc_C0718 mov r15d, [rax+978h] loc_C0718: cmp r14d, 0FFFFFFFFh jnz short loc_C0725 mov r14d, [rax+97Ch] loc_C0725: movsxd rcx, r15d movsxd rdx, r14d imul rcx, 178h movups xmm0, xmmword ptr [rax+rcx+28h] movups xmmword ptr [rbx], xmm0 imul rcx, rdx, 178h movups xmm0, xmmword ptr [rax+rcx+28h] movups xmmword ptr [rbx+10h], xmm0 mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_C0757: lea rdi, aXAxisIndexOutO; "X-Axis index out of bounds!" call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) jmp loc_C06C7 loc_C0768: lea rdi, aYAxisIndexOutO; "Y-Axis index out of bounds!" call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) jmp loc_C06E2
ImPlot * ImPlot::GetPlotLimits(ImPlot *this, const char *a2, int a3) { int v4; // r15d ImPlot *v5; // rbx ImGui *v6; // r12 int v7; // ecx ImGui *v8; // r13 long long v9; // rax v4 = (int)a2; v5 = this; v6 = GImPlot; if ( !*((_QWORD *)GImPlot + 10) ) { this = (ImPlot *)"GetPlotLimits() needs to be called between BeginPlot() and EndPlot()!"; ImGui::ErrorLog((ImGui *)"GetPlotLimits() needs to be called between BeginPlot() and EndPlot()!", a2); } if ( (unsigned int)((_DWORD)a2 + 1) >= 4 ) { this = (ImPlot *)"X-Axis index out of bounds!"; ImGui::ErrorLog((ImGui *)"X-Axis index out of bounds!", a2); } if ( (unsigned int)(a3 + 1) > 6 || (v7 = 113, !_bittest(&v7, a3 + 1)) ) { this = (ImPlot *)"Y-Axis index out of bounds!"; ImGui::ErrorLog((ImGui *)"Y-Axis index out of bounds!", a2); } v8 = GImPlot; if ( !*(_BYTE *)(*((_QWORD *)GImPlot + 10) + 2526LL) ) ImPlot::SetupFinish(this, a2); *(_BYTE *)(*((_QWORD *)v8 + 10) + 2526LL) = 1; v9 = *((_QWORD *)v6 + 10); if ( (_DWORD)a2 == -1 ) v4 = *(_DWORD *)(v9 + 2424); if ( a3 == -1 ) a3 = *(_DWORD *)(v9 + 2428); *(_OWORD *)v5 = *(_OWORD *)(v9 + 376LL * v4 + 40); *((_OWORD *)v5 + 1) = *(_OWORD *)(v9 + 376LL * a3 + 40); return v5; }
GetPlotLimits: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14D,EDX MOV R15D,ESI MOV RBX,RDI MOV R12,qword ptr [0x00436ca0] CMP qword ptr [R12 + 0x50],0x0 JNZ 0x001c06ba LEA RDI,[0x39a907] CALL 0x003161f4 LAB_001c06ba: LEA EAX,[R15 + 0x1] CMP EAX,0x4 JNC 0x001c0757 LAB_001c06c7: LEA EAX,[R14 + 0x1] CMP EAX,0x6 JA 0x001c0768 MOV ECX,0x71 BT ECX,EAX JNC 0x001c0768 LAB_001c06e2: MOV R13,qword ptr [0x00436ca0] MOV RAX,qword ptr [R13 + 0x50] CMP byte ptr [RAX + 0x9de],0x0 JNZ 0x001c06fb CALL 0x001b930f LAB_001c06fb: MOV RAX,qword ptr [R13 + 0x50] MOV byte ptr [RAX + 0x9de],0x1 MOV RAX,qword ptr [R12 + 0x50] CMP R15D,-0x1 JNZ 0x001c0718 MOV R15D,dword ptr [RAX + 0x978] LAB_001c0718: CMP R14D,-0x1 JNZ 0x001c0725 MOV R14D,dword ptr [RAX + 0x97c] LAB_001c0725: MOVSXD RCX,R15D MOVSXD RDX,R14D IMUL RCX,RCX,0x178 MOVUPS XMM0,xmmword ptr [RAX + RCX*0x1 + 0x28] MOVUPS xmmword ptr [RBX],XMM0 IMUL RCX,RDX,0x178 MOVUPS XMM0,xmmword ptr [RAX + RCX*0x1 + 0x28] MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_001c0757: LEA RDI,[0x39a842] CALL 0x003161f4 JMP 0x001c06c7 LAB_001c0768: LEA RDI,[0x39a85e] CALL 0x003161f4 JMP 0x001c06e2
/* ImPlot::GetPlotLimits(int, int) */ ImPlot * __thiscall ImPlot::GetPlotLimits(ImPlot *this,int param_1,int param_2) { int8 *puVar1; long lVar2; int8 uVar3; long lVar4; lVar2 = GImPlot; if (*(long *)(GImPlot + 0x50) == 0) { ImGui::ErrorLog("GetPlotLimits() needs to be called between BeginPlot() and EndPlot()!"); } if (3 < param_1 + 1U) { ImGui::ErrorLog("X-Axis index out of bounds!"); } if ((6 < param_2 + 1U) || ((0x71U >> (param_2 + 1U & 0x1f) & 1) == 0)) { ImGui::ErrorLog("Y-Axis index out of bounds!"); } lVar4 = GImPlot; if (*(char *)(*(long *)(GImPlot + 0x50) + 0x9de) == '\0') { SetupFinish(); } *(int1 *)(*(long *)(lVar4 + 0x50) + 0x9de) = 1; lVar2 = *(long *)(lVar2 + 0x50); if (param_1 == -1) { param_1 = *(int *)(lVar2 + 0x978); } if (param_2 == -1) { param_2 = *(int *)(lVar2 + 0x97c); } puVar1 = (int8 *)(lVar2 + 0x28 + (long)param_1 * 0x178); uVar3 = puVar1[1]; *(int8 *)this = *puVar1; *(int8 *)(this + 8) = uVar3; puVar1 = (int8 *)(lVar2 + 0x28 + (long)param_2 * 0x178); uVar3 = puVar1[1]; *(int8 *)(this + 0x10) = *puVar1; *(int8 *)(this + 0x18) = uVar3; return this; }
52
my_casefold_mb
eloqsql/strings/ctype-mb.c
static size_t my_casefold_mb(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar *map, size_t is_upper) { const char *srcend= src + srclen; char *dst0= dst; DBUG_ASSERT(cs->mbmaxlen == 2); while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; if ((ch= get_case_info_for_ch(cs, (uchar) src[0], (uchar) src[1]))) { int code= is_upper ? ch->toupper : ch->tolower; src+= 2; if (code > 0xFF) *dst++= code >> 8; *dst++= code & 0xFF; } else { *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O0
c
my_casefold_mb: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x3ff4a jmp 0x3ff4c movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x40080 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x3fdb0 movl %eax, %eax movq %rax, -0x48(%rbp) cmpq $0x0, -0x48(%rbp) je 0x40051 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movzbl (%rax), %esi movq -0x10(%rbp), %rax movzbl 0x1(%rax), %edx callq 0x42a90 movq %rax, -0x50(%rbp) cmpq $0x0, %rax je 0x4000b cmpq $0x0, 0x10(%rbp) je 0x3ffb0 movq -0x50(%rbp), %rax movl (%rax), %eax movl %eax, -0x58(%rbp) jmp 0x3ffba movq -0x50(%rbp), %rax movl 0x4(%rax), %eax movl %eax, -0x58(%rbp) movl -0x58(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0x10(%rbp) cmpl $0xff, -0x54(%rbp) jle 0x3ffee movl -0x54(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl -0x54(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0x4004f movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb (%rax), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movb (%rax), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0x4007b movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movzbl (%rcx), %ecx movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) jmp 0x3ff4c movq -0x20(%rbp), %rax movq -0x40(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_casefold_mb: push rbp mov rbp, rsp sub rsp, 60h mov rax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_38], rax mov rax, [rbp+var_20] mov [rbp+var_40], rax jmp short $+2 loc_3FF4A: jmp short $+2 loc_3FF4C: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb loc_40080 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] call my_ismbchar_0 mov eax, eax mov [rbp+var_48], rax cmp [rbp+var_48], 0 jz loc_40051 mov rdi, [rbp+var_8] mov rax, [rbp+var_10] movzx esi, byte ptr [rax] mov rax, [rbp+var_10] movzx edx, byte ptr [rax+1] call get_case_info_for_ch mov [rbp+var_50], rax cmp rax, 0 jz short loc_4000B cmp [rbp+arg_0], 0 jz short loc_3FFB0 mov rax, [rbp+var_50] mov eax, [rax] mov [rbp+var_58], eax jmp short loc_3FFBA loc_3FFB0: mov rax, [rbp+var_50] mov eax, [rax+4] mov [rbp+var_58], eax loc_3FFBA: mov eax, [rbp+var_58] mov [rbp+var_54], eax mov rax, [rbp+var_10] add rax, 2 mov [rbp+var_10], rax cmp [rbp+var_54], 0FFh jle short loc_3FFEE mov eax, [rbp+var_54] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_3FFEE: mov eax, [rbp+var_54] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl jmp short loc_4004F loc_4000B: mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov cl, [rax] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx mov cl, [rax] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_4004F: jmp short loc_4007B loc_40051: mov rax, [rbp+var_30] mov rcx, [rbp+var_10] mov rdx, rcx add rdx, 1 mov [rbp+var_10], rdx movzx ecx, byte ptr [rcx] mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl loc_4007B: jmp loc_3FF4C loc_40080: mov rax, [rbp+var_20] mov rcx, [rbp+var_40] sub rax, rcx add rsp, 60h pop rbp retn
_BYTE * my_casefold_mb( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6, long long a7) { unsigned __int8 *v7; // rax unsigned __int8 *v8; // rax char *v9; // rax char v10; // cl _BYTE *v11; // rax unsigned __int8 *v12; // rcx unsigned __int8 *v13; // rax int v15; // [rsp+8h] [rbp-58h] int *case_info_for_ch; // [rsp+10h] [rbp-50h] unsigned long long v18; // [rsp+28h] [rbp-38h] unsigned __int8 *v20; // [rsp+40h] [rbp-20h] unsigned __int8 *v21; // [rsp+50h] [rbp-10h] v21 = a2; v20 = a4; v18 = (unsigned long long)&a2[a3]; while ( (unsigned long long)v21 < v18 ) { if ( (unsigned int)my_ismbchar_0(a1, (long long)v21, v18) ) { case_info_for_ch = (int *)get_case_info_for_ch(a1, *v21, v21[1]); if ( case_info_for_ch ) { if ( a7 ) v15 = *case_info_for_ch; else v15 = case_info_for_ch[1]; v21 += 2; if ( v15 > 255 ) { v7 = v20++; *v7 = BYTE1(v15); } v8 = v20++; *v8 = v15; } else { *v20 = *v21; v9 = (char *)(v21 + 1); v21 += 2; v10 = *v9; v11 = v20 + 1; v20 += 2; *v11 = v10; } } else { v12 = v21++; v13 = v20++; *v13 = *(_BYTE *)(a6 + *v12); } } return (_BYTE *)(v20 - a4); }
my_casefold_mb: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX JMP 0x0013ff4a LAB_0013ff4a: JMP 0x0013ff4c LAB_0013ff4c: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x00140080 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] CALL 0x0013fdb0 MOV EAX,EAX MOV qword ptr [RBP + -0x48],RAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x00140051 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOVZX ESI,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOVZX EDX,byte ptr [RAX + 0x1] CALL 0x00142a90 MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JZ 0x0014000b CMP qword ptr [RBP + 0x10],0x0 JZ 0x0013ffb0 MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x58],EAX JMP 0x0013ffba LAB_0013ffb0: MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x58],EAX LAB_0013ffba: MOV EAX,dword ptr [RBP + -0x58] MOV dword ptr [RBP + -0x54],EAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0x10],RAX CMP dword ptr [RBP + -0x54],0xff JLE 0x0013ffee MOV EAX,dword ptr [RBP + -0x54] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_0013ffee: MOV EAX,dword ptr [RBP + -0x54] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL JMP 0x0014004f LAB_0014000b: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_0014004f: JMP 0x0014007b LAB_00140051: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOVZX ECX,byte ptr [RCX] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL LAB_0014007b: JMP 0x0013ff4c LAB_00140080: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x40] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_casefold_mb(int8 param_1,byte *param_2,long param_3,byte *param_4,int8 param_5, long param_6,long param_7) { int iVar1; int *piVar2; byte *pbVar3; int local_60; byte *local_28; byte *local_18; local_28 = param_4; local_18 = param_2; while (local_18 < param_2 + param_3) { iVar1 = my_ismbchar(param_1,local_18,param_2 + param_3); if (iVar1 == 0) { *local_28 = *(byte *)(param_6 + (ulong)*local_18); local_28 = local_28 + 1; local_18 = local_18 + 1; } else { piVar2 = (int *)get_case_info_for_ch(param_1,*local_18,local_18[1]); if (piVar2 == (int *)0x0) { pbVar3 = local_28 + 1; *local_28 = *local_18; local_28 = local_28 + 2; *pbVar3 = local_18[1]; } else { if (param_7 == 0) { local_60 = piVar2[1]; } else { local_60 = *piVar2; } if (0xff < local_60) { *local_28 = (byte)((uint)local_60 >> 8); local_28 = local_28 + 1; } *local_28 = (byte)local_60; local_28 = local_28 + 1; } local_18 = local_18 + 2; } } return (long)local_28 - (long)param_4; }
53
my_context_continue
eloqsql/libmariadb/libmariadb/ma_context.c
int my_context_continue(struct my_context *c) { int ret; __asm__ __volatile__ ( "movq (%[save]), %%rax\n\t" "movq %%rsp, (%[save])\n\t" "movq %%rax, %%rsp\n\t" "movq 8(%[save]), %%rax\n\t" "movq %%rbp, 8(%[save])\n\t" "movq %%rax, %%rbp\n\t" "movq 24(%[save]), %%rax\n\t" "movq %%r12, 24(%[save])\n\t" "movq %%rax, %%r12\n\t" "movq 32(%[save]), %%rax\n\t" "movq %%r13, 32(%[save])\n\t" "movq %%rax, %%r13\n\t" "movq 40(%[save]), %%rax\n\t" "movq %%r14, 40(%[save])\n\t" "movq %%rax, %%r14\n\t" "movq 48(%[save]), %%rax\n\t" "movq %%r15, 48(%[save])\n\t" "movq %%rax, %%r15\n\t" "leaq 1f(%%rip), %%rax\n\t" "leaq 2f(%%rip), %%rcx\n\t" "movq %%rax, 56(%[save])\n\t" "movq 64(%[save]), %%rax\n\t" "movq %%rcx, 64(%[save])\n\t" "movq 16(%[save]), %%rcx\n\t" "movq %%rbx, 16(%[save])\n\t" "movq %%rcx, %%rbx\n\t" "jmpq *%%rax\n" /* Come here when operation is done. Be sure to use the same callee-save register for %[save] here and in my_context_spawn(), so we preserve the value correctly at this point. */ "1:\n\t" "movq (%[save]), %%rsp\n\t" "movq 8(%[save]), %%rbp\n\t" /* %rbx is preserved from my_context_spawn() in this case. */ "movq 24(%[save]), %%r12\n\t" "movq 32(%[save]), %%r13\n\t" "movq 40(%[save]), %%r14\n\t" "movq 48(%[save]), %%r15\n\t" "xorl %[ret], %[ret]\n\t" "jmp 3f\n" /* Come here when operation is suspended. */ "2:\n\t" "movl $1, %[ret]\n" "3:\n" : [ret] "=a" (ret) : /* Need this in callee-save register to preserve in function call. */ [save] "b" (&c->save[0]) : "rcx", "rdx", "rsi", "rdi", "r8", "r9", "r10", "r11", "memory", "cc" ); return ret; }
O3
c
my_context_continue: pushq %rbp movq %rsp, %rbp pushq %rbx movq %rdi, %rbx movq (%rbx), %rax movq %rsp, (%rbx) movq %rax, %rsp movq 0x8(%rbx), %rax movq %rbp, 0x8(%rbx) movq %rax, %rbp movq 0x18(%rbx), %rax movq %r12, 0x18(%rbx) movq %rax, %r12 movq 0x20(%rbx), %rax movq %r13, 0x20(%rbx) movq %rax, %r13 movq 0x28(%rbx), %rax movq %r14, 0x28(%rbx) movq %rax, %r14 movq 0x30(%rbx), %rax movq %r15, 0x30(%rbx) movq %rax, %r15 leaq 0x20(%rip), %rax # 0x2d876 leaq 0x34(%rip), %rcx # 0x2d891 movq %rax, 0x38(%rbx) movq 0x40(%rbx), %rax movq %rcx, 0x40(%rbx) movq 0x10(%rbx), %rcx movq %rbx, 0x10(%rbx) movq %rcx, %rbx jmpq *%rax movq (%rbx), %rsp movq 0x8(%rbx), %rbp movq 0x18(%rbx), %r12 movq 0x20(%rbx), %r13 movq 0x28(%rbx), %r14 movq 0x30(%rbx), %r15 xorl %eax, %eax jmp 0x2d896 movl $0x1, %eax popq %rbx popq %rbp retq
my_context_continue: push rbp mov rbp, rsp push rbx mov rbx, rdi mov rax, [rbx] mov [rbx], rsp mov rsp, rax mov rax, [rbx+8] mov [rbx+8], rbp mov rbp, rax mov rax, [rbx+18h] mov [rbx+18h], r12 mov r12, rax mov rax, [rbx+20h] mov [rbx+20h], r13 mov r13, rax mov rax, [rbx+28h] mov [rbx+28h], r14 mov r14, rax mov rax, [rbx+30h] mov [rbx+30h], r15 mov r15, rax lea rax, sub_2D876 lea rcx, loc_2D891 mov [rbx+38h], rax mov rax, [rbx+40h] mov [rbx+40h], rcx mov rcx, [rbx+10h] mov [rbx+10h], rbx mov rbx, rcx jmp rax
long long my_context_continue(_QWORD *a1) { long long v1; // r12 long long v2; // r13 long long v3; // r14 long long v4; // r15 long long (*v5)(void); // rax long long v7; // [rsp+0h] [rbp-8h] BYREF long long savedregs; // [rsp+8h] [rbp+0h] BYREF *a1 = &v7; a1[1] = &savedregs; a1[3] = v1; a1[4] = v2; a1[5] = v3; a1[6] = v4; a1[7] = sub_2D876; v5 = (long long (*)(void))a1[8]; a1[8] = &loc_2D891; a1[2] = a1; return v5(); }
my_context_continue: PUSH RBP MOV RBP,RSP PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RBX] MOV qword ptr [RBX],RSP MOV RSP,RAX MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x8],RBP MOV RBP,RAX MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [RBX + 0x18],R12 MOV R12,RAX MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x20],R13 MOV R13,RAX MOV RAX,qword ptr [RBX + 0x28] MOV qword ptr [RBX + 0x28],R14 MOV R14,RAX MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [RBX + 0x30],R15 MOV R15,RAX LEA RAX,[0x12d876] LEA RCX,[0x12d891] MOV qword ptr [RBX + 0x38],RAX MOV RAX,qword ptr [RBX + 0x40] MOV qword ptr [RBX + 0x40],RCX MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RBX + 0x10],RBX MOV RBX,RCX JMP RAX
void my_context_continue(long param_1) { code *UNRECOVERED_JUMPTABLE; int8 unaff_R12; int8 unaff_R13; int8 unaff_R14; int8 unaff_R15; *(int1 **)param_1 = &stack0xfffffffffffffff0; *(int1 **)(param_1 + 8) = &stack0xfffffffffffffff8; *(int8 *)(param_1 + 0x18) = unaff_R12; *(int8 *)(param_1 + 0x20) = unaff_R13; *(int8 *)(param_1 + 0x28) = unaff_R14; *(int8 *)(param_1 + 0x30) = unaff_R15; *(int1 **)(param_1 + 0x38) = &LAB_0012d876; UNRECOVERED_JUMPTABLE = *(code **)(param_1 + 0x40); *(int1 **)(param_1 + 0x40) = &LAB_0012d891; *(long *)(param_1 + 0x10) = param_1; /* WARNING: Could not recover jumptable at 0x0012d874. Too many branches */ /* WARNING: Treating indirect jump as call */ (*UNRECOVERED_JUMPTABLE)(); return; }
54
my_uca_copy_page
eloqsql/strings/ctype-uca.c
static my_bool my_uca_copy_page(MY_CHARSET_LOADER *loader, const MY_UCA_WEIGHT_LEVEL *src, MY_UCA_WEIGHT_LEVEL *dst, size_t page) { uint chc, size= 256 * dst->lengths[page] * sizeof(uint16); if (!(dst->weights[page]= (uint16 *) (loader->once_alloc)(size))) return TRUE; DBUG_ASSERT(src->lengths[page] <= dst->lengths[page]); memset(dst->weights[page], 0, size); for (chc=0 ; chc < 256; chc++) { memcpy(dst->weights[page] + chc * dst->lengths[page], src->weights[page] + chc * src->lengths[page], src->lengths[page] * sizeof(uint16)); } return FALSE; }
O0
c
my_uca_copy_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax shll $0x8, %eax cltq shlq %rax movl %eax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x80(%rax), %rax movl -0x30(%rbp), %ecx movl %ecx, %edi callq *%rax movq -0x20(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x28(%rbp), %rdx movq %rax, (%rcx,%rdx,8) cmpq $0x0, %rax jne 0x436f4 movb $0x1, -0x1(%rbp) jmp 0x437b0 jmp 0x436f6 jmp 0x436f8 movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x30(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x25180 movl $0x0, -0x2c(%rbp) cmpl $0x100, -0x2c(%rbp) # imm = 0x100 jae 0x437ac movq -0x20(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rdi movl -0x2c(%rbp), %eax movq -0x20(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rdi movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq -0x28(%rbp), %rcx movq (%rax,%rcx,8), %rsi movl -0x2c(%rbp), %eax movq -0x18(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x28(%rbp), %rdx movzbl (%rcx,%rdx), %ecx imull %ecx, %eax movl %eax, %eax shlq %rax addq %rax, %rsi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx shlq %rdx callq 0x25220 movl -0x2c(%rbp), %eax addl $0x1, %eax movl %eax, -0x2c(%rbp) jmp 0x4371b movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopl (%rax)
my_uca_copy_page: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] shl eax, 8 cdqe shl rax, 1 mov [rbp+var_30], eax mov rax, [rbp+var_10] mov rax, [rax+80h] mov ecx, [rbp+var_30] mov edi, ecx call rax mov rcx, [rbp+var_20] mov rcx, [rcx+10h] mov rdx, [rbp+var_28] mov [rcx+rdx*8], rax cmp rax, 0 jnz short loc_436F4 mov [rbp+var_1], 1 jmp loc_437B0 loc_436F4: jmp short $+2 loc_436F6: jmp short $+2 loc_436F8: mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_30] mov edx, eax xor esi, esi call _memset mov [rbp+var_2C], 0 loc_4371B: cmp [rbp+var_2C], 100h jnb loc_437AC mov rax, [rbp+var_20] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rdi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_20] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rdi, rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov rcx, [rbp+var_28] mov rsi, [rax+rcx*8] mov eax, [rbp+var_2C] mov rcx, [rbp+var_18] mov rcx, [rcx+8] mov rdx, [rbp+var_28] movzx ecx, byte ptr [rcx+rdx] imul eax, ecx mov eax, eax shl rax, 1 add rsi, rax mov rax, [rbp+var_18] mov rax, [rax+8] mov rcx, [rbp+var_28] movzx eax, byte ptr [rax+rcx] mov edx, eax shl rdx, 1 call _memcpy mov eax, [rbp+var_2C] add eax, 1 mov [rbp+var_2C], eax jmp loc_4371B loc_437AC: mov [rbp+var_1], 0 loc_437B0: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_uca_copy_page(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax unsigned int v6; // [rsp+0h] [rbp-30h] unsigned int i; // [rsp+4h] [rbp-2Ch] v6 = *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) << 9; v4 = (*(long long ( **)(_QWORD))(a1 + 128))(v6); *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4) = v4; if ( !v4 ) return 1; memset(*(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 0LL, v6); for ( i = 0; i < 0x100; ++i ) memcpy( 2LL * *(unsigned __int8 *)(*(_QWORD *)(a3 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a3 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4) * i + *(_QWORD *)(*(_QWORD *)(a2 + 16) + 8 * a4), 2LL * *(unsigned __int8 *)(*(_QWORD *)(a2 + 8) + a4)); return 0; }
my_uca_copy_page: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] SHL EAX,0x8 CDQE SHL RAX,0x1 MOV dword ptr [RBP + -0x30],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x30] MOV EDI,ECX CALL RAX MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x28] MOV qword ptr [RCX + RDX*0x8],RAX CMP RAX,0x0 JNZ 0x001436f4 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001437b0 LAB_001436f4: JMP 0x001436f6 LAB_001436f6: JMP 0x001436f8 LAB_001436f8: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x30] MOV EDX,EAX XOR ESI,ESI CALL 0x00125180 MOV dword ptr [RBP + -0x2c],0x0 LAB_0014371b: CMP dword ptr [RBP + -0x2c],0x100 JNC 0x001437ac MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RDI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x28] MOVZX ECX,byte ptr [RCX + RDX*0x1] IMUL EAX,ECX MOV EAX,EAX SHL RAX,0x1 ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX SHL RDX,0x1 CALL 0x00125220 MOV EAX,dword ptr [RBP + -0x2c] ADD EAX,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x0014371b LAB_001437ac: MOV byte ptr [RBP + -0x1],0x0 LAB_001437b0: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_uca_copy_page(long param_1,long param_2,long param_3,long param_4) { size_t __n; long lVar1; int4 local_34; int1 local_9; __n = (long)(int)((uint)*(byte *)(*(long *)(param_3 + 8) + param_4) << 8) << 1; lVar1 = (**(code **)(param_1 + 0x80))(__n); *(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) = lVar1; if (lVar1 == 0) { local_9 = 1; } else { memset(*(void **)(*(long *)(param_3 + 0x10) + param_4 * 8),0,__n); for (local_34 = 0; local_34 < 0x100; local_34 = local_34 + 1) { memcpy((void *)(*(long *)(*(long *)(param_3 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_3 + 8) + param_4)) * 2), (void *)(*(long *)(*(long *)(param_2 + 0x10) + param_4 * 8) + (ulong)(local_34 * *(byte *)(*(long *)(param_2 + 8) + param_4)) * 2), (ulong)*(byte *)(*(long *)(param_2 + 8) + param_4) << 1); } local_9 = 0; } return local_9; }
55
JS_SetThisTimeValue
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_SetThisTimeValue(JSContext *ctx, JSValue this_val, double v) { if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(this_val); if (p->class_id == JS_CLASS_DATE) { JS_FreeValue(ctx, p->u.object_data); p->u.object_data = js_float64(v); return js_dup(p->u.object_data); } } return JS_ThrowTypeError(ctx, "not a Date object"); }
O0
c
JS_SetThisTimeValue: subq $0x58, %rsp movq %rsi, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq %rdi, 0x30(%rsp) movsd %xmm0, 0x28(%rsp) movq 0x40(%rsp), %rax cmpl $-0x1, %eax jne 0x9812f movq 0x38(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax movzwl 0x6(%rax), %eax cmpl $0xa, %eax jne 0x9812d movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rax movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx callq 0x229d0 movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movsd 0x28(%rsp), %xmm0 callq 0x4c3a0 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rcx movq %rcx, 0x30(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x38(%rax) movq 0x20(%rsp), %rax movq 0x30(%rax), %rdi movq 0x38(%rax), %rsi callq 0x20410 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) jmp 0x9814c jmp 0x9812f movq 0x30(%rsp), %rdi leaq 0x75e00(%rip), %rsi # 0x10df3b movb $0x0, %al callq 0x2c040 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq 0x48(%rsp), %rax movq 0x50(%rsp), %rdx addq $0x58, %rsp retq nopl (%rax,%rax)
JS_SetThisTimeValue: sub rsp, 58h mov [rsp+58h+var_20], rsi mov [rsp+58h+var_18], rdx mov [rsp+58h+var_28], rdi movsd [rsp+58h+var_30], xmm0 mov rax, [rsp+58h+var_18] cmp eax, 0FFFFFFFFh jnz loc_9812F mov rax, [rsp+58h+var_20] mov [rsp+58h+var_38], rax mov rax, [rsp+58h+var_38] movzx eax, word ptr [rax+6] cmp eax, 0Ah jnz short loc_9812D mov rdi, [rsp+58h+var_28] mov rax, [rsp+58h+var_38] mov rsi, [rax+30h] mov rdx, [rax+38h] call JS_FreeValue mov rax, [rsp+58h+var_38] mov [rsp+58h+var_50], rax movsd xmm0, [rsp+58h+var_30] call js_float64 mov rcx, rax mov rax, [rsp+58h+var_50] mov [rsp+58h+var_48], rcx mov [rsp+58h+var_40], rdx mov rcx, [rsp+58h+var_48] mov [rax+30h], rcx mov rcx, [rsp+58h+var_40] mov [rax+38h], rcx mov rax, [rsp+58h+var_38] mov rdi, [rax+30h] mov rsi, [rax+38h] call js_dup mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx jmp short loc_9814C loc_9812D: jmp short $+2 loc_9812F: mov rdi, [rsp+58h+var_28] lea rsi, aNotADateObject; "not a Date object" mov al, 0 call JS_ThrowTypeError mov [rsp+58h+var_10], rax mov [rsp+58h+var_8], rdx loc_9814C: mov rax, [rsp+58h+var_10] mov rdx, [rsp+58h+var_8] add rsp, 58h retn
_DWORD * JS_SetThisTimeValue( 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 char v16; // [rsp+0h] [rbp-58h] if ( (_DWORD)a3 != -1 || *(_WORD *)(a2 + 6) != 10 ) return (_DWORD *)JS_ThrowTypeError( a1, (long long)"not a Date object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v16); JS_FreeValue(a1, *(_QWORD *)(a2 + 48), *(_QWORD *)(a2 + 56)); *(_QWORD *)(a2 + 48) = js_float64(*(double *)a7.m128_u64); *(_QWORD *)(a2 + 56) = v14; return js_dup(*(_DWORD **)(a2 + 48), *(_QWORD *)(a2 + 56)); }
JS_SetThisTimeValue: SUB RSP,0x58 MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x30],RDI MOVSD qword ptr [RSP + 0x28],XMM0 MOV RAX,qword ptr [RSP + 0x40] CMP EAX,-0x1 JNZ 0x0019812f MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,0xa JNZ 0x0019812d MOV RDI,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] CALL 0x001229d0 MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOVSD XMM0,qword ptr [RSP + 0x28] CALL 0x0014c3a0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RSP + 0x18],RDX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x38],RCX MOV RAX,qword ptr [RSP + 0x20] MOV RDI,qword ptr [RAX + 0x30] MOV RSI,qword ptr [RAX + 0x38] CALL 0x00120410 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX JMP 0x0019814c LAB_0019812d: JMP 0x0019812f LAB_0019812f: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[0x20df3b] MOV AL,0x0 CALL 0x0012c040 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX LAB_0019814c: MOV RAX,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] ADD RSP,0x58 RET
int1 [16] JS_SetThisTimeValue(int8 param_1,int8 param_2,long param_3,int param_4) { int1 auVar1 [16]; if ((param_4 == -1) && (*(short *)(param_3 + 6) == 10)) { JS_FreeValue(param_2,*(int8 *)(param_3 + 0x30),*(int8 *)(param_3 + 0x38)); auVar1 = js_float64(param_1); *(int1 (*) [16])(param_3 + 0x30) = auVar1; auVar1 = js_dup(*(int8 *)(param_3 + 0x30),*(int8 *)(param_3 + 0x38)); } else { auVar1 = JS_ThrowTypeError(param_2,"not a Date object"); } return auVar1; }
56
JS_SetThisTimeValue
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_SetThisTimeValue(JSContext *ctx, JSValue this_val, double v) { if (JS_VALUE_GET_TAG(this_val) == JS_TAG_OBJECT) { JSObject *p = JS_VALUE_GET_OBJ(this_val); if (p->class_id == JS_CLASS_DATE) { JS_FreeValue(ctx, p->u.object_data); p->u.object_data = js_float64(v); return js_dup(p->u.object_data); } } return JS_ThrowTypeError(ctx, "not a Date object"); }
O2
c
JS_SetThisTimeValue: pushq %r14 pushq %rbx pushq %rax cmpl $-0x1, %edx jne 0x49c2b movq %rsi, %rbx cmpw $0xa, 0x6(%rsi) jne 0x49c2b movq 0x30(%rbx), %rsi movq 0x38(%rbx), %rdx movsd %xmm0, (%rsp) callq 0x174a2 movq (%rsp), %xmm0 movq %xmm0, %r14 movq %xmm0, 0x30(%rbx) movq $0x7, 0x38(%rbx) pushq $0x7 jmp 0x49c3e leaq 0x3c257(%rip), %rsi # 0x85e89 xorl %r14d, %r14d xorl %eax, %eax callq 0x1bad1 pushq $0x6 popq %rdx movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
JS_SetThisTimeValue: push r14 push rbx push rax cmp edx, 0FFFFFFFFh jnz short loc_49C2B mov rbx, rsi cmp word ptr [rsi+6], 0Ah jnz short loc_49C2B mov rsi, [rbx+30h] mov rdx, [rbx+38h] movsd [rsp+18h+var_18], xmm0 call JS_FreeValue movq xmm0, [rsp+18h+var_18] movq r14, xmm0 movq qword ptr [rbx+30h], xmm0 mov qword ptr [rbx+38h], 7 push 7 jmp short loc_49C3E loc_49C2B: lea rsi, aNotADateObject; "not a Date object" xor r14d, r14d xor eax, eax call JS_ThrowTypeError push 6 loc_49C3E: pop rdx mov rax, r14 add rsp, 8 pop rbx pop r14 retn
unsigned long long JS_SetThisTimeValue( 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 v14; // al unsigned long long v15; // r14 if ( (_DWORD)a3 == -1 && *(_WORD *)(a2 + 6) == 10 ) { JS_FreeValue(a1, *(_QWORD *)(a2 + 48), *(_QWORD *)(a2 + 56)); v15 = a7.m128_u64[0]; *(_QWORD *)(a2 + 48) = a7.m128_u64[0]; *(_QWORD *)(a2 + 56) = 7LL; } else { v15 = 0LL; JS_ThrowTypeError(a1, (long long)"not a Date object", a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v14); } return v15; }
JS_SetThisTimeValue: PUSH R14 PUSH RBX PUSH RAX CMP EDX,-0x1 JNZ 0x00149c2b MOV RBX,RSI CMP word ptr [RSI + 0x6],0xa JNZ 0x00149c2b MOV RSI,qword ptr [RBX + 0x30] MOV RDX,qword ptr [RBX + 0x38] MOVSD qword ptr [RSP],XMM0 CALL 0x001174a2 MOVQ XMM0,qword ptr [RSP] MOVQ R14,XMM0 MOVQ qword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x38],0x7 PUSH 0x7 JMP 0x00149c3e LAB_00149c2b: LEA RSI,[0x185e89] XOR R14D,R14D XOR EAX,EAX CALL 0x0011bad1 PUSH 0x6 LAB_00149c3e: POP RDX MOV RAX,R14 ADD RSP,0x8 POP RBX POP R14 RET
int1 [16] JS_SetThisTimeValue(int8 param_1,int8 param_2,long param_3,int param_4) { int1 auVar1 [16]; int8 uStack_20; if ((param_4 == -1) && (*(short *)(param_3 + 6) == 10)) { JS_FreeValue(param_2,*(int8 *)(param_3 + 0x30),*(int8 *)(param_3 + 0x38)); *(int8 *)(param_3 + 0x30) = param_1; *(int8 *)(param_3 + 0x38) = 7; uStack_20 = 7; } else { param_1 = 0; JS_ThrowTypeError(param_2,"not a Date object"); uStack_20 = 6; } auVar1._8_8_ = uStack_20; auVar1._0_8_ = param_1; return auVar1; }
57
blst_p2_mult
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e2.c
void blst_p2_mult(POINTonE2 *out, const POINTonE2 *a, const byte *scalar, size_t nbits) { if (nbits < 144) { if (nbits) POINTonE2_mult_w4(out, a, scalar, nbits); else vec_zero(out, sizeof(*out)); } else if (nbits <= 256) { union { vec256 l; pow256 s; } val; size_t i, j, top, mask = (size_t)0 - 1; /* this is not about constant-time-ness, but branch optimization */ for (top = (nbits + 7)/8, i=0, j=0; i<sizeof(val.s);) { val.s[i++] = scalar[j] & mask; mask = 0 - ((i - top) >> (8*sizeof(top)-1)); j += 1 & mask; } if (check_mod_256(val.s, BLS12_381_r)) /* z^4 is the formal limit */ POINTonE2_mult_gls(out, a, val.s); else /* should never be the case, added for formal completeness */ POINTonE2_mult_w5(out, a, scalar, nbits); vec_zero(val.l, sizeof(val)); } else { /* should never be the case, added for formal completeness */ POINTonE2_mult_w5(out, a, scalar, nbits); } }
O0
c
blst_p2_mult: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) cmpq $0x90, -0x20(%rbp) jae 0xac5e3 cmpq $0x0, -0x20(%rbp) je 0xac5d0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xac6e0 jmp 0xac5de movq -0x8(%rbp), %rdi movl $0x120, %esi # imm = 0x120 callq 0xa7170 jmp 0xac6d1 cmpq $0x100, -0x20(%rbp) # imm = 0x100 ja 0xac6ba movq $-0x1, -0x60(%rbp) movq -0x20(%rbp), %rax addq $0x7, %rax shrq $0x3, %rax movq %rax, -0x58(%rbp) movq $0x0, -0x48(%rbp) movq $0x0, -0x50(%rbp) cmpq $0x20, -0x48(%rbp) jae 0xac66c movq -0x18(%rbp), %rax movq -0x50(%rbp), %rcx movzbl (%rax,%rcx), %eax andq -0x60(%rbp), %rax movb %al, %cl movq -0x48(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x48(%rbp) movb %cl, -0x40(%rbp,%rax) movq -0x48(%rbp), %rcx subq -0x58(%rbp), %rcx shrq $0x3f, %rcx xorl %eax, %eax subq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax andq $0x1, %rax addq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0xac619 leaq -0x40(%rbp), %rdi leaq 0x39789(%rip), %rsi # 0xe5e00 callq 0xcbac0 cmpq $0x0, %rax je 0xac695 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x40(%rbp), %rdx callq 0xac9a0 jmp 0xac6aa movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xacb80 leaq -0x40(%rbp), %rdi movl $0x20, %esi callq 0xa7170 jmp 0xac6cf movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0xacb80 jmp 0xac6d1 addq $0x60, %rsp popq %rbp retq nopw (%rax,%rax)
blst_p2_mult: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx cmp [rbp+var_20], 90h jnb short loc_AC5E3 cmp [rbp+var_20], 0 jz short loc_AC5D0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call POINTonE2_mult_w4 jmp short loc_AC5DE loc_AC5D0: mov rdi, [rbp+var_8] mov esi, 120h call vec_zero loc_AC5DE: jmp loc_AC6D1 loc_AC5E3: cmp [rbp+var_20], 100h ja loc_AC6BA mov [rbp+var_60], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_20] add rax, 7 shr rax, 3 mov [rbp+var_58], rax mov [rbp+var_48], 0 mov [rbp+var_50], 0 loc_AC619: cmp [rbp+var_48], 20h ; ' ' jnb short loc_AC66C mov rax, [rbp+var_18] mov rcx, [rbp+var_50] movzx eax, byte ptr [rax+rcx] and rax, [rbp+var_60] mov cl, al mov rax, [rbp+var_48] mov rdx, rax add rdx, 1 mov [rbp+var_48], rdx mov [rbp+rax+var_40], cl mov rcx, [rbp+var_48] sub rcx, [rbp+var_58] shr rcx, 3Fh xor eax, eax sub rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_60] and rax, 1 add rax, [rbp+var_50] mov [rbp+var_50], rax jmp short loc_AC619 loc_AC66C: lea rdi, [rbp+var_40] lea rsi, BLS12_381_r call check_mod_256 cmp rax, 0 jz short loc_AC695 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] lea rdx, [rbp+var_40] call POINTonE2_mult_gls jmp short loc_AC6AA loc_AC695: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call POINTonE2_mult_w5 loc_AC6AA: lea rdi, [rbp+var_40] mov esi, 20h ; ' ' call vec_zero jmp short loc_AC6CF loc_AC6BA: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] call POINTonE2_mult_w5 loc_AC6CF: jmp short $+2 loc_AC6D1: add rsp, 60h pop rbp retn
long long blst_p2_mult(long long a1, long long a2, long long a3, unsigned long long a4) { unsigned long long v5; // rax long long v6; // [rsp+0h] [rbp-60h] unsigned long long v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+10h] [rbp-50h] unsigned long long v9; // [rsp+18h] [rbp-48h] _BYTE v10[32]; // [rsp+20h] [rbp-40h] BYREF unsigned long long v11; // [rsp+40h] [rbp-20h] long long v12; // [rsp+48h] [rbp-18h] long long v13; // [rsp+50h] [rbp-10h] long long v14; // [rsp+58h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; if ( a4 >= 0x90 ) { if ( v11 > 0x100 ) { return POINTonE2_mult_w5(v14, v13, v12, v11); } else { LOBYTE(v6) = -1; v7 = (v11 + 7) >> 3; v9 = 0LL; v8 = 0LL; while ( v9 < 0x20 ) { v5 = v9++; v10[v5] = v6 & *(_BYTE *)(v12 + v8); v6 = -(long long)((v9 - v7) >> 63); v8 += (long long)(v9 - v7) < 0; } if ( check_mod_256(v10, &BLS12_381_r) ) POINTonE2_mult_gls(v14, v13, v10); else POINTonE2_mult_w5(v14, v13, v12, v11); return vec_zero((long long)v10, 0x20uLL); } } else if ( v11 ) { return POINTonE2_mult_w4(v14, v13, v12, v11); } else { return vec_zero(v14, 0x120uLL); } }
blst_p2_mult: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX CMP qword ptr [RBP + -0x20],0x90 JNC 0x001ac5e3 CMP qword ptr [RBP + -0x20],0x0 JZ 0x001ac5d0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001ac6e0 JMP 0x001ac5de LAB_001ac5d0: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x120 CALL 0x001a7170 LAB_001ac5de: JMP 0x001ac6d1 LAB_001ac5e3: CMP qword ptr [RBP + -0x20],0x100 JA 0x001ac6ba MOV qword ptr [RBP + -0x60],-0x1 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x7 SHR RAX,0x3 MOV qword ptr [RBP + -0x58],RAX MOV qword ptr [RBP + -0x48],0x0 MOV qword ptr [RBP + -0x50],0x0 LAB_001ac619: CMP qword ptr [RBP + -0x48],0x20 JNC 0x001ac66c MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x50] MOVZX EAX,byte ptr [RAX + RCX*0x1] AND RAX,qword ptr [RBP + -0x60] MOV CL,AL MOV RAX,qword ptr [RBP + -0x48] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x48],RDX MOV byte ptr [RBP + RAX*0x1 + -0x40],CL MOV RCX,qword ptr [RBP + -0x48] SUB RCX,qword ptr [RBP + -0x58] SHR RCX,0x3f XOR EAX,EAX SUB RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] AND RAX,0x1 ADD RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX JMP 0x001ac619 LAB_001ac66c: LEA RDI,[RBP + -0x40] LEA RSI,[0x1e5e00] CALL 0x001cbac0 CMP RAX,0x0 JZ 0x001ac695 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x40] CALL 0x001ac9a0 JMP 0x001ac6aa LAB_001ac695: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001acb80 LAB_001ac6aa: LEA RDI,[RBP + -0x40] MOV ESI,0x20 CALL 0x001a7170 JMP 0x001ac6cf LAB_001ac6ba: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] CALL 0x001acb80 LAB_001ac6cf: JMP 0x001ac6d1 LAB_001ac6d1: ADD RSP,0x60 POP RBP RET
void blst_p2_mult(int8 param_1,int8 param_2,long param_3,ulong param_4) { long lVar1; ulong local_68; long local_58; ulong local_50; byte local_48 [32]; ulong local_28; long local_20; int8 local_18; int8 local_10; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; if (param_4 < 0x90) { if (param_4 == 0) { vec_zero(param_1,0x120); } else { POINTonE2_mult_w4(param_1,param_2,param_3,param_4); } } else if (param_4 < 0x101) { local_68 = 0xffffffffffffffff; local_50 = 0; local_58 = 0; while (local_50 < 0x20) { local_48[local_50] = *(byte *)(param_3 + local_58) & (byte)local_68; local_68 = (long)((local_50 + 1) - (param_4 + 7 >> 3)) >> 0x3f; local_58 = (local_68 & 1) + local_58; local_50 = local_50 + 1; } lVar1 = check_mod_256(local_48,BLS12_381_r); if (lVar1 == 0) { POINTonE2_mult_w5(local_10,local_18,local_20,local_28); } else { POINTonE2_mult_gls(local_10,local_18,local_48); } vec_zero(local_48,0x20); } else { POINTonE2_mult_w5(param_1,param_2,param_3,param_4); } return; }
58
extend_area_on_page
eloqsql/storage/maria/ma_blockrec.c
static my_bool extend_area_on_page(MARIA_HA *info, uchar *buff, uchar *dir, uint rownr, uint request_length, uint *empty_space, uint *ret_offset, uint *ret_length, my_bool head_page) { uint rec_offset, length, org_rec_length; uint max_entry= (uint) buff[DIR_COUNT_OFFSET]; MARIA_SHARE *share= info->s; uint block_size= share->block_size; DBUG_ENTER("extend_area_on_page"); /* We can't check for min length here as we may have called extend_directory() to create a new (empty) entry just before */ check_directory(share, buff, block_size, 0, *empty_space); rec_offset= uint2korr(dir); if (rec_offset) { /* Extending old row; Mark current space as 'free' */ length= org_rec_length= uint2korr(dir + 2); DBUG_PRINT("info", ("rec_offset: %u length: %u request_length: %u " "empty_space: %u", rec_offset, org_rec_length, request_length, *empty_space)); *empty_space+= org_rec_length; } else { /* Reusing free directory entry; Free it from the directory list */ if (dir[2] == END_OF_DIR_FREE_LIST) buff[DIR_FREE_OFFSET]= dir[3]; else { uchar *prev_dir= dir_entry_pos(buff, block_size, (uint) dir[2]); DBUG_ASSERT(uint2korr(prev_dir) == 0 && prev_dir[3] == (uchar) rownr); prev_dir[3]= dir[3]; } if (dir[3] != END_OF_DIR_FREE_LIST) { uchar *next_dir= dir_entry_pos(buff, block_size, (uint) dir[3]); DBUG_ASSERT(uint2korr(next_dir) == 0 && next_dir[2] == (uchar) rownr); next_dir[2]= dir[2]; } rec_offset= start_of_next_entry(dir); length= 0; } if (length < request_length) { uint old_rec_offset; /* New data did not fit in old position. Find first possible position where to put new data. */ old_rec_offset= rec_offset; rec_offset= end_of_previous_entry(share, dir, buff + block_size - PAGE_SUFFIX_SIZE); length+= (uint) (old_rec_offset - rec_offset); DBUG_ASSERT(old_rec_offset); /* 'length' is 0 if we are doing an insert into a not allocated block. This can only happen during "REDO of INSERT" or "UNDO of DELETE." */ if (length < request_length) { /* Did not fit in current block + empty space. Extend with empty space after block. */ if (rownr == max_entry - 1) { /* Last entry; Everything is free between this and directory */ length= ((block_size - PAGE_SUFFIX_SIZE - DIR_ENTRY_SIZE * max_entry) - rec_offset); } else length= start_of_next_entry(dir) - rec_offset; DBUG_ASSERT((int) length >= 0); if (length < request_length) { /* Not enough continuous space, compact page to get more */ int2store(dir, rec_offset); /* Reset length, as this may be a deleted block */ int2store(dir+2, 0); _ma_compact_block_page(share, buff, rownr, 1, head_page ? info->trn->min_read_from: 0, head_page ? share->base.min_block_length : 0); rec_offset= uint2korr(dir); length= uint2korr(dir+2); if (length < request_length) { DBUG_PRINT("error", ("Not enough space: " "length: %u request_length: %u", length, request_length)); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); DBUG_RETURN(1); /* Error in block */ } *empty_space= length; /* All space is here */ } } } int2store(dir, rec_offset); int2store(dir + 2, length); *ret_offset= rec_offset; *ret_length= length; check_directory(share, buff, block_size, head_page ? share->base.min_block_length : 0, *empty_space - length); DBUG_RETURN(0); }
O0
c
extend_area_on_page: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movb 0x20(%rbp), %al movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movl %r8d, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x18(%rbp), %rax movzbl 0x8(%rax), %eax movl %eax, -0x40(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movl 0x7bc(%rax), %eax movl %eax, -0x4c(%rbp) movq -0x20(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x34(%rbp) cmpl $0x0, -0x34(%rbp) je 0x7a3c0 movq -0x20(%rbp), %rax movzwl 0x2(%rax), %eax movl %eax, -0x3c(%rbp) movl %eax, -0x38(%rbp) jmp 0x7a3b0 movl -0x3c(%rbp), %ecx movq -0x30(%rbp), %rax addl (%rax), %ecx movl %ecx, (%rax) jmp 0x7a451 movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax cmpl $0xff, %eax jne 0x7a3df movq -0x20(%rbp), %rax movb 0x3(%rax), %cl movq -0x18(%rbp), %rax movb %cl, 0x9(%rax) jmp 0x7a407 movq -0x18(%rbp), %rdi movl -0x4c(%rbp), %esi movq -0x20(%rbp), %rax movzbl 0x2(%rax), %edx callq 0x75000 movq %rax, -0x58(%rbp) jmp 0x7a3f9 movq -0x20(%rbp), %rax movb 0x3(%rax), %cl movq -0x58(%rbp), %rax movb %cl, 0x3(%rax) movq -0x20(%rbp), %rax movzbl 0x3(%rax), %eax cmpl $0xff, %eax je 0x7a43e movq -0x18(%rbp), %rdi movl -0x4c(%rbp), %esi movq -0x20(%rbp), %rax movzbl 0x3(%rax), %edx callq 0x75000 movq %rax, -0x60(%rbp) jmp 0x7a430 movq -0x20(%rbp), %rax movb 0x2(%rax), %cl movq -0x60(%rbp), %rax movb %cl, 0x2(%rax) movq -0x20(%rbp), %rdi callq 0x80240 movl %eax, -0x34(%rbp) movl $0x0, -0x38(%rbp) movl -0x38(%rbp), %eax cmpl -0x28(%rbp), %eax jae 0x7a5fd movl -0x34(%rbp), %eax movl %eax, -0x64(%rbp) movq -0x48(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x18(%rbp), %rdx movl -0x4c(%rbp), %eax addq %rax, %rdx addq $-0x4, %rdx callq 0x801d0 movl %eax, -0x34(%rbp) movl -0x64(%rbp), %eax subl -0x34(%rbp), %eax addl -0x38(%rbp), %eax movl %eax, -0x38(%rbp) jmp 0x7a48f movl -0x38(%rbp), %eax cmpl -0x28(%rbp), %eax jae 0x7a5fb movl -0x24(%rbp), %eax movl -0x40(%rbp), %ecx subl $0x1, %ecx cmpl %ecx, %eax jne 0x7a4be movl -0x4c(%rbp), %eax subl $0x4, %eax movl -0x40(%rbp), %ecx shll $0x2, %ecx subl %ecx, %eax subl -0x34(%rbp), %eax movl %eax, -0x38(%rbp) jmp 0x7a4cd movq -0x20(%rbp), %rdi callq 0x80240 subl -0x34(%rbp), %eax movl %eax, -0x38(%rbp) jmp 0x7a4cf jmp 0x7a4d1 movl -0x38(%rbp), %eax cmpl -0x28(%rbp), %eax jae 0x7a5f9 jmp 0x7a4df movq -0x20(%rbp), %rax movq %rax, -0x70(%rbp) movl -0x34(%rbp), %eax movw %ax, %cx movq -0x70(%rbp), %rax movw %cx, (%rax) jmp 0x7a4f6 movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rax movw $0x0, (%rax) movq -0x48(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x98(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x8c(%rbp) movsbl 0x20(%rbp), %eax cmpl $0x0, %eax je 0x7a54b movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0x80(%rax), %rax movq %rax, -0xa8(%rbp) jmp 0x7a556 xorl %eax, %eax movq %rax, -0xa8(%rbp) jmp 0x7a556 movq -0xa8(%rbp), %rax movq %rax, -0xb0(%rbp) movsbl 0x20(%rbp), %eax cmpl $0x0, %eax je 0x7a581 movq -0x48(%rbp), %rax movq 0x3b8(%rax), %rax movq %rax, -0xb8(%rbp) jmp 0x7a58c xorl %eax, %eax movq %rax, -0xb8(%rbp) jmp 0x7a58c movq -0xb0(%rbp), %r8 movl -0x8c(%rbp), %edx movq -0x98(%rbp), %rsi movq -0xa0(%rbp), %rdi movq -0xb8(%rbp), %rax movl %eax, %r9d movl $0x1, %ecx callq 0x748d0 movq -0x20(%rbp), %rax movzwl (%rax), %eax movl %eax, -0x34(%rbp) movq -0x20(%rbp), %rax movzwl 0x2(%rax), %eax movl %eax, -0x38(%rbp) movl -0x38(%rbp), %eax cmpl -0x28(%rbp), %eax jae 0x7a5f0 jmp 0x7a5da jmp 0x7a5dc movq -0x10(%rbp), %rdi movl $0x7f, %esi callq 0x338b0 movb $0x1, -0x1(%rbp) jmp 0x7a64b movl -0x38(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, (%rax) jmp 0x7a5fb jmp 0x7a5fd jmp 0x7a5ff movq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) movl -0x34(%rbp), %eax movw %ax, %cx movq -0x80(%rbp), %rax movw %cx, (%rax) jmp 0x7a616 movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x88(%rbp) movl -0x38(%rbp), %eax movw %ax, %cx movq -0x88(%rbp), %rax movw %cx, (%rax) movl -0x34(%rbp), %ecx movq 0x10(%rbp), %rax movl %ecx, (%rax) movl -0x38(%rbp), %ecx movq 0x18(%rbp), %rax movl %ecx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0xc0, %rsp popq %rbp retq nopw (%rax,%rax)
extend_area_on_page: push rbp mov rbp, rsp sub rsp, 0C0h mov al, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_28], r8d mov [rbp+var_30], r9 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+8] mov [rbp+var_40], eax mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_48], rax mov rax, [rbp+var_48] mov eax, [rax+7BCh] mov [rbp+var_4C], eax mov rax, [rbp+var_20] movzx eax, word ptr [rax] mov [rbp+var_34], eax cmp [rbp+var_34], 0 jz short loc_7A3C0 mov rax, [rbp+var_20] movzx eax, word ptr [rax+2] mov [rbp+var_3C], eax mov [rbp+var_38], eax jmp short $+2 loc_7A3B0: mov ecx, [rbp+var_3C] mov rax, [rbp+var_30] add ecx, [rax] mov [rax], ecx jmp loc_7A451 loc_7A3C0: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] cmp eax, 0FFh jnz short loc_7A3DF mov rax, [rbp+var_20] mov cl, [rax+3] mov rax, [rbp+var_18] mov [rax+9], cl jmp short loc_7A407 loc_7A3DF: mov rdi, [rbp+var_18] mov esi, [rbp+var_4C] mov rax, [rbp+var_20] movzx edx, byte ptr [rax+2] call dir_entry_pos mov [rbp+var_58], rax jmp short $+2 loc_7A3F9: mov rax, [rbp+var_20] mov cl, [rax+3] mov rax, [rbp+var_58] mov [rax+3], cl loc_7A407: mov rax, [rbp+var_20] movzx eax, byte ptr [rax+3] cmp eax, 0FFh jz short loc_7A43E mov rdi, [rbp+var_18] mov esi, [rbp+var_4C] mov rax, [rbp+var_20] movzx edx, byte ptr [rax+3] call dir_entry_pos mov [rbp+var_60], rax jmp short $+2 loc_7A430: mov rax, [rbp+var_20] mov cl, [rax+2] mov rax, [rbp+var_60] mov [rax+2], cl loc_7A43E: mov rdi, [rbp+var_20] call start_of_next_entry mov [rbp+var_34], eax mov [rbp+var_38], 0 loc_7A451: mov eax, [rbp+var_38] cmp eax, [rbp+var_28] jnb loc_7A5FD mov eax, [rbp+var_34] mov [rbp+var_64], eax mov rdi, [rbp+var_48] mov rsi, [rbp+var_20] mov rdx, [rbp+var_18] mov eax, [rbp+var_4C] add rdx, rax add rdx, 0FFFFFFFFFFFFFFFCh call end_of_previous_entry mov [rbp+var_34], eax mov eax, [rbp+var_64] sub eax, [rbp+var_34] add eax, [rbp+var_38] mov [rbp+var_38], eax jmp short $+2 loc_7A48F: mov eax, [rbp+var_38] cmp eax, [rbp+var_28] jnb loc_7A5FB mov eax, [rbp+var_24] mov ecx, [rbp+var_40] sub ecx, 1 cmp eax, ecx jnz short loc_7A4BE mov eax, [rbp+var_4C] sub eax, 4 mov ecx, [rbp+var_40] shl ecx, 2 sub eax, ecx sub eax, [rbp+var_34] mov [rbp+var_38], eax jmp short loc_7A4CD loc_7A4BE: mov rdi, [rbp+var_20] call start_of_next_entry sub eax, [rbp+var_34] mov [rbp+var_38], eax loc_7A4CD: jmp short $+2 loc_7A4CF: jmp short $+2 loc_7A4D1: mov eax, [rbp+var_38] cmp eax, [rbp+var_28] jnb loc_7A5F9 jmp short $+2 loc_7A4DF: mov rax, [rbp+var_20] mov [rbp+var_70], rax mov eax, [rbp+var_34] mov cx, ax mov rax, [rbp+var_70] mov [rax], cx jmp short $+2 loc_7A4F6: mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_78], rax mov rax, [rbp+var_78] mov word ptr [rax], 0 mov rax, [rbp+var_48] mov [rbp+var_A0], rax mov rax, [rbp+var_18] mov [rbp+var_98], rax mov eax, [rbp+var_24] mov [rbp+var_8C], eax movsx eax, [rbp+arg_10] cmp eax, 0 jz short loc_7A54B mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax+80h] mov [rbp+var_A8], rax jmp short loc_7A556 loc_7A54B: xor eax, eax mov [rbp+var_A8], rax jmp short $+2 loc_7A556: mov rax, [rbp+var_A8] mov [rbp+var_B0], rax movsx eax, [rbp+arg_10] cmp eax, 0 jz short loc_7A581 mov rax, [rbp+var_48] mov rax, [rax+3B8h] mov [rbp+var_B8], rax jmp short loc_7A58C loc_7A581: xor eax, eax mov [rbp+var_B8], rax jmp short $+2 loc_7A58C: mov r8, [rbp+var_B0] mov edx, [rbp+var_8C] mov rsi, [rbp+var_98] mov rdi, [rbp+var_A0] mov rax, [rbp+var_B8] mov r9d, eax mov ecx, 1 call _ma_compact_block_page mov rax, [rbp+var_20] movzx eax, word ptr [rax] mov [rbp+var_34], eax mov rax, [rbp+var_20] movzx eax, word ptr [rax+2] mov [rbp+var_38], eax mov eax, [rbp+var_38] cmp eax, [rbp+var_28] jnb short loc_7A5F0 jmp short $+2 loc_7A5DA: jmp short $+2 loc_7A5DC: mov rdi, [rbp+var_10] mov esi, 7Fh call _ma_set_fatal_error mov [rbp+var_1], 1 jmp short loc_7A64B loc_7A5F0: mov ecx, [rbp+var_38] mov rax, [rbp+var_30] mov [rax], ecx loc_7A5F9: jmp short $+2 loc_7A5FB: jmp short $+2 loc_7A5FD: jmp short $+2 loc_7A5FF: mov rax, [rbp+var_20] mov [rbp+var_80], rax mov eax, [rbp+var_34] mov cx, ax mov rax, [rbp+var_80] mov [rax], cx jmp short $+2 loc_7A616: mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_88], rax mov eax, [rbp+var_38] mov cx, ax mov rax, [rbp+var_88] mov [rax], cx mov ecx, [rbp+var_34] mov rax, [rbp+arg_0] mov [rax], ecx mov ecx, [rbp+var_38] mov rax, [rbp+arg_8] mov [rax], ecx mov [rbp+var_1], 0 loc_7A64B: mov al, [rbp+var_1] add rsp, 0C0h pop rbp retn
char extend_area_on_page( long long *a1, long long a2, unsigned __int16 *a3, unsigned int a4, unsigned int a5, unsigned int *a6, _DWORD *a7, unsigned int *a8, char a9) { long long v9; // rdx long long v10; // rcx long long v11; // r8 int v12; // r9d unsigned long long v14; // [rsp+18h] [rbp-A8h] int v15; // [rsp+5Ch] [rbp-64h] unsigned int v16; // [rsp+74h] [rbp-4Ch] long long v17; // [rsp+78h] [rbp-48h] int v18; // [rsp+80h] [rbp-40h] unsigned int v19; // [rsp+88h] [rbp-38h] int entry; // [rsp+8Ch] [rbp-34h] v18 = *(unsigned __int8 *)(a2 + 8); v17 = *a1; v16 = *(_DWORD *)(*a1 + 1980); entry = *a3; if ( *a3 ) { v19 = a3[1]; *a6 += v19; } else { if ( *((unsigned __int8 *)a3 + 2) == 255 ) *(_BYTE *)(a2 + 9) = *((_BYTE *)a3 + 3); else *(_BYTE *)(dir_entry_pos(a2, v16, *((unsigned __int8 *)a3 + 2)) + 3) = *((_BYTE *)a3 + 3); if ( *((unsigned __int8 *)a3 + 3) != 255 ) *(_BYTE *)(dir_entry_pos(a2, v16, *((unsigned __int8 *)a3 + 3)) + 2) = *((_BYTE *)a3 + 2); entry = start_of_next_entry(a3); v19 = 0; } if ( v19 >= a5 ) goto LABEL_24; v15 = entry; entry = end_of_previous_entry(v17, a3, v16 + a2 - 4); v19 += v15 - entry; if ( v19 >= a5 ) goto LABEL_24; v19 = a4 == v18 - 1 ? v16 - 4 - 4 * v18 - entry : start_of_next_entry(a3) - entry; if ( v19 >= a5 ) goto LABEL_24; *a3 = entry; a3[1] = 0; if ( a9 ) v14 = *(_QWORD *)(a1[1] + 128); else v14 = 0LL; if ( a9 ) ma_compact_block_page(v17, a2, a4, 1, v14, *(_QWORD *)(v17 + 952)); else ma_compact_block_page(v17, a2, a4, 1, v14, 0); entry = *a3; v19 = a3[1]; if ( v19 >= a5 ) { *a6 = v19; LABEL_24: *a3 = entry; a3[1] = v19; *a7 = entry; *a8 = v19; return 0; } ma_set_fatal_error(a1, 127, v9, v10, v11, v12); return 1; }
extend_area_on_page: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV AL,byte ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] 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 dword ptr [RBP + -0x28],R8D MOV qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x8] MOV dword ptr [RBP + -0x40],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x7bc] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x34],EAX CMP dword ptr [RBP + -0x34],0x0 JZ 0x0017a3c0 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x2] MOV dword ptr [RBP + -0x3c],EAX MOV dword ptr [RBP + -0x38],EAX JMP 0x0017a3b0 LAB_0017a3b0: MOV ECX,dword ptr [RBP + -0x3c] MOV RAX,qword ptr [RBP + -0x30] ADD ECX,dword ptr [RAX] MOV dword ptr [RAX],ECX JMP 0x0017a451 LAB_0017a3c0: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] CMP EAX,0xff JNZ 0x0017a3df MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x9],CL JMP 0x0017a407 LAB_0017a3df: MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RAX + 0x2] CALL 0x00175000 MOV qword ptr [RBP + -0x58],RAX JMP 0x0017a3f9 LAB_0017a3f9: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x58] MOV byte ptr [RAX + 0x3],CL LAB_0017a407: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x3] CMP EAX,0xff JZ 0x0017a43e MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x20] MOVZX EDX,byte ptr [RAX + 0x3] CALL 0x00175000 MOV qword ptr [RBP + -0x60],RAX JMP 0x0017a430 LAB_0017a430: MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX + 0x2] MOV RAX,qword ptr [RBP + -0x60] MOV byte ptr [RAX + 0x2],CL LAB_0017a43e: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00180240 MOV dword ptr [RBP + -0x34],EAX MOV dword ptr [RBP + -0x38],0x0 LAB_0017a451: MOV EAX,dword ptr [RBP + -0x38] CMP EAX,dword ptr [RBP + -0x28] JNC 0x0017a5fd MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x64],EAX MOV RDI,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x4c] ADD RDX,RAX ADD RDX,-0x4 CALL 0x001801d0 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x64] SUB EAX,dword ptr [RBP + -0x34] ADD EAX,dword ptr [RBP + -0x38] MOV dword ptr [RBP + -0x38],EAX JMP 0x0017a48f LAB_0017a48f: MOV EAX,dword ptr [RBP + -0x38] CMP EAX,dword ptr [RBP + -0x28] JNC 0x0017a5fb MOV EAX,dword ptr [RBP + -0x24] MOV ECX,dword ptr [RBP + -0x40] SUB ECX,0x1 CMP EAX,ECX JNZ 0x0017a4be MOV EAX,dword ptr [RBP + -0x4c] SUB EAX,0x4 MOV ECX,dword ptr [RBP + -0x40] SHL ECX,0x2 SUB EAX,ECX SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x38],EAX JMP 0x0017a4cd LAB_0017a4be: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00180240 SUB EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x38],EAX LAB_0017a4cd: JMP 0x0017a4cf LAB_0017a4cf: JMP 0x0017a4d1 LAB_0017a4d1: MOV EAX,dword ptr [RBP + -0x38] CMP EAX,dword ptr [RBP + -0x28] JNC 0x0017a5f9 JMP 0x0017a4df LAB_0017a4df: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x70],RAX MOV EAX,dword ptr [RBP + -0x34] MOV CX,AX MOV RAX,qword ptr [RBP + -0x70] MOV word ptr [RAX],CX JMP 0x0017a4f6 LAB_0017a4f6: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x78] MOV word ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x98],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x8c],EAX MOVSX EAX,byte ptr [RBP + 0x20] CMP EAX,0x0 JZ 0x0017a54b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x80] MOV qword ptr [RBP + -0xa8],RAX JMP 0x0017a556 LAB_0017a54b: XOR EAX,EAX MOV qword ptr [RBP + -0xa8],RAX JMP 0x0017a556 LAB_0017a556: MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0xb0],RAX MOVSX EAX,byte ptr [RBP + 0x20] CMP EAX,0x0 JZ 0x0017a581 MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x3b8] MOV qword ptr [RBP + -0xb8],RAX JMP 0x0017a58c LAB_0017a581: XOR EAX,EAX MOV qword ptr [RBP + -0xb8],RAX JMP 0x0017a58c LAB_0017a58c: MOV R8,qword ptr [RBP + -0xb0] MOV EDX,dword ptr [RBP + -0x8c] MOV RSI,qword ptr [RBP + -0x98] MOV RDI,qword ptr [RBP + -0xa0] MOV RAX,qword ptr [RBP + -0xb8] MOV R9D,EAX MOV ECX,0x1 CALL 0x001748d0 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX] MOV dword ptr [RBP + -0x34],EAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x2] MOV dword ptr [RBP + -0x38],EAX MOV EAX,dword ptr [RBP + -0x38] CMP EAX,dword ptr [RBP + -0x28] JNC 0x0017a5f0 JMP 0x0017a5da LAB_0017a5da: JMP 0x0017a5dc LAB_0017a5dc: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x7f CALL 0x001338b0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0017a64b LAB_0017a5f0: MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],ECX LAB_0017a5f9: JMP 0x0017a5fb LAB_0017a5fb: JMP 0x0017a5fd LAB_0017a5fd: JMP 0x0017a5ff LAB_0017a5ff: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX MOV EAX,dword ptr [RBP + -0x34] MOV CX,AX MOV RAX,qword ptr [RBP + -0x80] MOV word ptr [RAX],CX JMP 0x0017a616 LAB_0017a616: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x88],RAX MOV EAX,dword ptr [RBP + -0x38] MOV CX,AX MOV RAX,qword ptr [RBP + -0x88] MOV word ptr [RAX],CX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + 0x18] MOV dword ptr [RAX],ECX MOV byte ptr [RBP + -0x1],0x0 LAB_0017a64b: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0xc0 POP RBP RET
int1 extend_area_on_page(long *param_1,long param_2,ushort *param_3,int param_4,uint param_5, uint *param_6,uint *param_7,uint *param_8,char param_9) { byte bVar1; uint uVar2; long lVar3; uint uVar4; int iVar5; long lVar6; ulong local_c0; int8 local_b0; uint local_40; uint local_3c; bVar1 = *(byte *)(param_2 + 8); lVar3 = *param_1; uVar2 = *(uint *)(lVar3 + 0x7bc); local_3c = (uint)*param_3; if (local_3c == 0) { if ((char)param_3[1] == -1) { *(int1 *)(param_2 + 9) = *(int1 *)((long)param_3 + 3); } else { lVar6 = dir_entry_pos(param_2,uVar2,(char)param_3[1]); *(int1 *)(lVar6 + 3) = *(int1 *)((long)param_3 + 3); } if (*(char *)((long)param_3 + 3) != -1) { lVar6 = dir_entry_pos(param_2,uVar2,*(int1 *)((long)param_3 + 3)); *(char *)(lVar6 + 2) = (char)param_3[1]; } local_3c = start_of_next_entry(param_3); local_40 = 0; } else { local_40 = (uint)param_3[1]; *param_6 = local_40 + *param_6; } if (local_40 < param_5) { uVar4 = end_of_previous_entry(lVar3,param_3,param_2 + (ulong)uVar2 + -4); local_40 = (local_3c - uVar4) + local_40; local_3c = uVar4; if (local_40 < param_5) { if (param_4 == bVar1 - 1) { local_40 = ((uVar2 - 4) + (uint)bVar1 * -4) - uVar4; } else { iVar5 = start_of_next_entry(param_3); local_40 = iVar5 - uVar4; } if (local_40 < param_5) { *param_3 = (ushort)uVar4; param_3[1] = 0; if (param_9 == '\0') { local_b0 = 0; local_c0 = 0; } else { local_b0 = *(int8 *)(param_1[1] + 0x80); local_c0 = *(ulong *)(lVar3 + 0x3b8); } _ma_compact_block_page(lVar3,param_2,param_4,1,local_b0,local_c0 & 0xffffffff); local_3c = (uint)*param_3; local_40 = (uint)param_3[1]; if (local_40 < param_5) { _ma_set_fatal_error(param_1,0x7f); return 1; } *param_6 = local_40; } } } *param_3 = (ushort)local_3c; param_3[1] = (ushort)local_40; *param_7 = local_3c; *param_8 = local_40; return 0; }
59
my_caseup_ucs2
eloqsql/strings/ctype-ucs2.c
static size_t my_caseup_ucs2(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= my_ucs2_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0) { my_toupper_ucs2(uni_plane, &wc); if (res != my_uni_ucs2(cs, wc, (uchar*) dst, (uchar*) dstend)) break; src+= res; dst+= res; } return srclen; }
O0
c
my_caseup_ucs2: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rax addq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x50(%rbp) jmp 0xaf6c2 jmp 0xaf6c4 movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x51(%rbp) jae 0xaf6f4 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0xaf5e0 movl %eax, -0x34(%rbp) cmpl $0x0, %eax setg %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al testb $0x1, %al jne 0xaf6fd jmp 0xaf757 movq -0x50(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0xb4510 movl -0x34(%rbp), %eax movl %eax, -0x58(%rbp) movq -0x8(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x48(%rbp), %rcx callq 0xaf610 movl %eax, %ecx movl -0x58(%rbp), %eax cmpl %ecx, %eax je 0xaf730 jmp 0xaf757 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) movl -0x34(%rbp), %ecx movq -0x20(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) jmp 0xaf6c4 movq -0x18(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_caseup_ucs2: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_20] add rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_50], rax jmp short $+2 loc_AF6C2: jmp short $+2 loc_AF6C4: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_51], al jnb short loc_AF6F4 mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_ucs2_uni mov [rbp+var_34], eax cmp eax, 0 setnle al mov [rbp+var_51], al loc_AF6F4: mov al, [rbp+var_51] test al, 1 jnz short loc_AF6FD jmp short loc_AF757 loc_AF6FD: mov rdi, [rbp+var_50] lea rsi, [rbp+var_30] call my_toupper_ucs2 mov eax, [rbp+var_34] mov [rbp+var_58], eax mov rdi, [rbp+var_8] mov rsi, [rbp+var_30] mov rdx, [rbp+var_20] mov rcx, [rbp+var_48] call my_uni_ucs2 mov ecx, eax mov eax, [rbp+var_58] cmp eax, ecx jz short loc_AF730 jmp short loc_AF757 loc_AF730: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax mov ecx, [rbp+var_34] mov rax, [rbp+var_20] movsxd rcx, ecx add rax, rcx mov [rbp+var_20], rax jmp loc_AF6C4 loc_AF757: mov rax, [rbp+var_18] add rsp, 60h pop rbp retn
long long my_caseup_ucs2(long long a1, unsigned long long a2, long long a3, _BYTE *a4, long long a5, long long a6) { bool v7; // [rsp+Fh] [rbp-51h] long long v8; // [rsp+10h] [rbp-50h] unsigned long long v9; // [rsp+18h] [rbp-48h] unsigned long long v10; // [rsp+20h] [rbp-40h] int v11; // [rsp+2Ch] [rbp-34h] unsigned long long v12[2]; // [rsp+30h] [rbp-30h] BYREF _BYTE *v13; // [rsp+40h] [rbp-20h] long long v14; // [rsp+48h] [rbp-18h] unsigned long long v15; // [rsp+50h] [rbp-10h] long long v16; // [rsp+58h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12[1] = a5; v10 = a3 + a2; v9 = (unsigned long long)&a4[a5]; v8 = *(_QWORD *)(a1 + 120); while ( 1 ) { v7 = 0; if ( v15 < v10 ) { v11 = my_ucs2_uni(v16, (long long)v12, v15, v10, a5, a6); v7 = v11 > 0; } if ( !v7 ) break; my_toupper_ucs2(v8, v12); if ( v11 != (unsigned int)my_uni_ucs2(v16, v12[0], v13, v9) ) break; v15 += v11; v13 += v11; } return v14; }
my_caseup_ucs2: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x50],RAX JMP 0x001af6c2 LAB_001af6c2: JMP 0x001af6c4 LAB_001af6c4: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x51],AL JNC 0x001af6f4 MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x001af5e0 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 SETG AL MOV byte ptr [RBP + -0x51],AL LAB_001af6f4: MOV AL,byte ptr [RBP + -0x51] TEST AL,0x1 JNZ 0x001af6fd JMP 0x001af757 LAB_001af6fd: MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x30] CALL 0x001b4510 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x58],EAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x48] CALL 0x001af610 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x58] CMP EAX,ECX JZ 0x001af730 JMP 0x001af757 LAB_001af730: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x20] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX JMP 0x001af6c4 LAB_001af757: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x60 POP RBP RET
long my_caseup_ucs2(long param_1,ulong param_2,long param_3,long param_4,long param_5) { int8 uVar1; bool bVar2; int iVar3; int local_3c; int8 local_38; long local_30; long local_28; long local_20; ulong local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { bVar2 = false; if (local_18 < param_2 + param_3) { local_3c = my_ucs2_uni(local_10,&local_38,local_18,param_2 + param_3); bVar2 = 0 < local_3c; } if (!bVar2) break; my_toupper_ucs2(uVar1,&local_38); iVar3 = my_uni_ucs2(local_10,local_38,local_28,param_4 + param_5); if (local_3c != iVar3) { return local_20; } local_18 = local_18 + (long)local_3c; local_28 = local_28 + local_3c; } return local_20; }
60
my_caseup_ucs2
eloqsql/strings/ctype-ucs2.c
static size_t my_caseup_ucs2(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int res; const char *srcend= src + srclen; char *dstend= dst + dstlen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(srclen <= dstlen); while ((src < srcend) && (res= my_ucs2_uni(cs, &wc, (uchar *)src, (uchar*) srcend)) > 0) { my_toupper_ucs2(uni_plane, &wc); if (res != my_uni_ucs2(cs, wc, (uchar*) dst, (uchar*) dstend)) break; src+= res; dst+= res; } return srclen; }
O3
c
my_caseup_ucs2: movq %rdx, %rax cmpq $0x2, %rdx jl 0x80a27 pushq %rbp movq %rsp, %rbp leaq (%rsi,%rax), %rdx addq %rcx, %r8 movq 0x78(%rdi), %rdi addq $0x2, %rcx movzbl (%rsi), %r9d movzbl 0x1(%rsi), %r10d movq 0x8(%rdi), %r11 movq (%r11,%r9,8), %r11 testq %r11, %r11 je 0x809ee leaq (%r10,%r10,2), %r9 movl (%r11,%r9,4), %r9d jmp 0x809f5 shll $0x8, %r9d orq %r10, %r9 cmpq %r8, %rcx ja 0x80a26 cmpl $0xffff, %r9d # imm = 0xFFFF ja 0x80a26 rolw $0x8, %r9w movw %r9w, -0x2(%rcx) leaq 0x2(%rsi), %r9 cmpq %rdx, %r9 jae 0x80a26 addq $0x4, %rsi addq $0x2, %rcx cmpq %rdx, %rsi movq %r9, %rsi jbe 0x809ce popq %rbp retq
my_caseup_ucs2: mov rax, rdx cmp rdx, 2 jl short locret_80A27 push rbp mov rbp, rsp lea rdx, [rsi+rax] add r8, rcx mov rdi, [rdi+78h] add rcx, 2 loc_809CE: movzx r9d, byte ptr [rsi] movzx r10d, byte ptr [rsi+1] mov r11, [rdi+8] mov r11, [r11+r9*8] test r11, r11 jz short loc_809EE lea r9, [r10+r10*2] mov r9d, [r11+r9*4] jmp short loc_809F5 loc_809EE: shl r9d, 8 or r9, r10 loc_809F5: cmp rcx, r8 ja short loc_80A26 cmp r9d, 0FFFFh ja short loc_80A26 rol r9w, 8 mov [rcx-2], r9w lea r9, [rsi+2] cmp r9, rdx jnb short loc_80A26 add rsi, 4 add rcx, 2 cmp rsi, rdx mov rsi, r9 jbe short loc_809CE loc_80A26: pop rbp locret_80A27: retn
long long my_caseup_ucs2(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5) { long long result; // rax unsigned long long v6; // rdx unsigned long long v7; // r8 long long v8; // rdi unsigned long long v9; // rcx long long v10; // r9 long long v11; // r10 long long v12; // r11 unsigned int v13; // r9d bool v14; // cc result = a3; if ( a3 >= 2 ) { v6 = (unsigned long long)&a2[a3]; v7 = a4 + a5; v8 = *(_QWORD *)(a1 + 120); v9 = a4 + 2; do { v10 = *a2; v11 = a2[1]; v12 = *(_QWORD *)(*(_QWORD *)(v8 + 8) + 8 * v10); if ( v12 ) v13 = *(_DWORD *)(v12 + 12 * v11); else v13 = v11 | ((_DWORD)v10 << 8); if ( v9 > v7 ) break; if ( v13 > 0xFFFF ) break; *(_WORD *)(v9 - 2) = __ROL2__(v13, 8); if ( (unsigned long long)(a2 + 2) >= v6 ) break; v9 += 2LL; v14 = (unsigned long long)(a2 + 4) <= v6; a2 += 2; } while ( v14 ); } return result; }
my_caseup_ucs2: MOV RAX,RDX CMP RDX,0x2 JL 0x00180a27 PUSH RBP MOV RBP,RSP LEA RDX,[RSI + RAX*0x1] ADD R8,RCX MOV RDI,qword ptr [RDI + 0x78] ADD RCX,0x2 LAB_001809ce: MOVZX R9D,byte ptr [RSI] MOVZX R10D,byte ptr [RSI + 0x1] MOV R11,qword ptr [RDI + 0x8] MOV R11,qword ptr [R11 + R9*0x8] TEST R11,R11 JZ 0x001809ee LEA R9,[R10 + R10*0x2] MOV R9D,dword ptr [R11 + R9*0x4] JMP 0x001809f5 LAB_001809ee: SHL R9D,0x8 OR R9,R10 LAB_001809f5: CMP RCX,R8 JA 0x00180a26 CMP R9D,0xffff JA 0x00180a26 ROL R9W,0x8 MOV word ptr [RCX + -0x2],R9W LEA R9,[RSI + 0x2] CMP R9,RDX JNC 0x00180a26 ADD RSI,0x4 ADD RCX,0x2 CMP RSI,RDX MOV RSI,R9 JBE 0x001809ce LAB_00180a26: POP RBP LAB_00180a27: RET
void my_caseup_ucs2(long param_1,byte *param_2,long param_3,long param_4,long param_5) { long lVar1; long lVar2; ulong uVar3; byte *pbVar4; byte *pbVar5; uint uVar6; if (1 < param_3) { lVar1 = *(long *)(param_1 + 0x78); uVar3 = param_4 + 2; pbVar4 = param_2; while( true ) { lVar2 = *(long *)(*(long *)(lVar1 + 8) + (ulong)*pbVar4 * 8); if (lVar2 == 0) { uVar6 = (uint)CONCAT11(*pbVar4,pbVar4[1]); } else { uVar6 = *(uint *)(lVar2 + (ulong)pbVar4[1] * 0xc); } if (((ulong)(param_5 + param_4) < uVar3) || (0xffff < uVar6)) break; *(ushort *)(uVar3 - 2) = (ushort)uVar6 << 8 | (ushort)uVar6 >> 8; if (param_2 + param_3 <= pbVar4 + 2) { return; } pbVar5 = pbVar4 + 4; uVar3 = uVar3 + 2; pbVar4 = pbVar4 + 2; if (param_2 + param_3 < pbVar5) { return; } } } return; }
61
print_aria_log_control
eloqsql/storage/maria/ma_control_file.c
my_bool print_aria_log_control() { uchar buffer[CF_MAX_SIZE]; char name[FN_REFLEN], uuid_str[MY_UUID_STRING_LENGTH+1]; const char *errmsg; uint new_cf_create_time_size, new_cf_changeable_size; my_off_t file_size; ulong logno; ulonglong trid,checkpoint_lsn; int open_flags= O_BINARY | /*O_DIRECT |*/ O_RDWR | O_CLOEXEC; int error= CONTROL_FILE_UNKNOWN_ERROR; uint recovery_fails; File file; DBUG_ENTER("ma_control_file_open"); if (fn_format(name, CONTROL_FILE_BASE_NAME, maria_data_root, "", MYF(MY_WME)) == NullS) DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR); if ((file= mysql_file_open(key_file_control, name, open_flags, MYF(MY_WME))) < 0) { errmsg= "Can't open file"; goto err; } file_size= mysql_file_seek(file, 0, SEEK_END, MYF(MY_WME)); if (file_size == MY_FILEPOS_ERROR) { errmsg= "Can't read size"; goto err; } if (file_size < CF_MIN_SIZE) { /* Given that normally we write only a sector and it's atomic, the only possibility for a file to be of too short size is if we crashed at the very first startup, between file creation and file write. Quite unlikely (and can be made even more unlikely by doing this: create a temp file, write it, and then rename it to be the control file). What's more likely is if someone forgot to restore the control file, just did a "touch control" to try to get Maria to start, or if the disk/filesystem has a problem. So let's be rigid. */ error= CONTROL_FILE_TOO_SMALL; errmsg= "Size of control file is smaller than expected"; goto err; } /* Check if control file is unexpectedly big */ if (file_size > CF_MAX_SIZE) { error= CONTROL_FILE_TOO_BIG; errmsg= "File size bigger than expected"; goto err; } if (mysql_file_pread(file, buffer, (size_t)file_size, 0, MYF(MY_FNABP))) { errmsg= "Can't read file"; goto err; } if (memcmp(buffer + CF_MAGIC_STRING_OFFSET, CF_MAGIC_STRING, CF_MAGIC_STRING_SIZE)) { error= CONTROL_FILE_BAD_MAGIC_STRING; errmsg= "Missing valid id at start of file. File is not a valid aria control file"; goto err; } printf("Aria file version: %u\n", buffer[CF_VERSION_OFFSET]); new_cf_create_time_size= uint2korr(buffer + CF_CREATE_TIME_SIZE_OFFSET); new_cf_changeable_size= uint2korr(buffer + CF_CHANGEABLE_SIZE_OFFSET); if (new_cf_create_time_size < CF_MIN_CREATE_TIME_TOTAL_SIZE || new_cf_changeable_size < CF_MIN_CHANGEABLE_TOTAL_SIZE || new_cf_create_time_size + new_cf_changeable_size != file_size) { error= CONTROL_FILE_INCONSISTENT_INFORMATION; errmsg= "Sizes stored in control file are inconsistent"; goto err; } checkpoint_lsn= lsn_korr(buffer + new_cf_create_time_size + CF_LSN_OFFSET); logno= uint4korr(buffer + new_cf_create_time_size + CF_FILENO_OFFSET); my_uuid2str(buffer + CF_UUID_OFFSET, uuid_str); uuid_str[MY_UUID_STRING_LENGTH]= 0; printf("Block size: %u\n", uint2korr(buffer + CF_BLOCKSIZE_OFFSET)); printf("maria_uuid: %s\n", uuid_str); printf("last_checkpoint_lsn: " LSN_FMT "\n", LSN_IN_PARTS(checkpoint_lsn)); printf("last_log_number: %lu\n", (ulong) logno); if (new_cf_changeable_size >= (CF_MAX_TRID_OFFSET + CF_MAX_TRID_SIZE)) { trid= transid_korr(buffer + new_cf_create_time_size + CF_MAX_TRID_OFFSET); printf("trid: %llu\n", (ulonglong) trid); } if (new_cf_changeable_size >= (CF_RECOV_FAIL_OFFSET + CF_RECOV_FAIL_SIZE)) { recovery_fails= (buffer + new_cf_create_time_size + CF_RECOV_FAIL_OFFSET)[0]; printf("recovery_failures: %u\n", recovery_fails); } DBUG_RETURN(0); err: my_printf_error(HA_ERR_INITIALIZATION, "Got error '%s' when trying to use aria control file " "'%s'", 0, errmsg, name); DBUG_RETURN(error); }
O0
c
print_aria_log_control: pushq %rbp movq %rsp, %rbp subq $0x4a0, %rsp # imm = 0x4A0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl $0x80002, -0x47c(%rbp) # imm = 0x80002 movl $0xb, -0x480(%rbp) leaq -0x410(%rbp), %rdi leaq 0x3ec816(%rip), %rax # 0x440740 movq (%rax), %rdx leaq 0xcaed5(%rip), %rsi # 0x11ee09 leaq 0xca41a(%rip), %rcx # 0x11e355 movl $0x10, %r8d callq 0xae980 cmpq $0x0, %rax jne 0x53f5a jmp 0x53f4e movb $0xb, -0x441(%rbp) jmp 0x542da leaq 0x3ec99f(%rip), %rax # 0x440900 movl (%rax), %edi leaq -0x410(%rbp), %rcx movl -0x47c(%rbp), %r8d leaq 0xcaec4(%rip), %rsi # 0x11ee3c movl $0x280, %edx # imm = 0x280 movl $0x10, %r9d callq 0x535b0 movl %eax, -0x488(%rbp) cmpl $0x0, %eax jge 0x53fa6 leaq 0xcaeeb(%rip), %rax # 0x11ee85 movq %rax, -0x450(%rbp) jmp 0x542a9 movl -0x488(%rbp), %edx leaq 0xcae89(%rip), %rdi # 0x11ee3c movl $0x286, %esi # imm = 0x286 xorl %eax, %eax movl %eax, %ecx movl $0x2, %r8d movl $0x10, %r9d callq 0x536a0 movq %rax, -0x460(%rbp) cmpq $-0x1, -0x460(%rbp) jne 0x53ff1 leaq 0xcaeb0(%rip), %rax # 0x11ee95 movq %rax, -0x450(%rbp) jmp 0x542a9 cmpq $0x2d, -0x460(%rbp) jae 0x54018 movl $0x1, -0x480(%rbp) leaq 0xcae99(%rip), %rax # 0x11eea5 movq %rax, -0x450(%rbp) jmp 0x542a9 cmpq $0x200, -0x460(%rbp) # imm = 0x200 jbe 0x54042 movl $0x2, -0x480(%rbp) leaq 0xcae9d(%rip), %rax # 0x11eed3 movq %rax, -0x450(%rbp) jmp 0x542a9 movl -0x488(%rbp), %edx leaq -0x210(%rbp), %rcx movq -0x460(%rbp), %r8 leaq 0xcaddf(%rip), %rdi # 0x11ee3c movl $0x2a6, %esi # imm = 0x2A6 xorl %eax, %eax movl %eax, %r9d movq $0x2, (%rsp) callq 0x53790 cmpq $0x0, %rax je 0x5408d leaq 0xcae71(%rip), %rax # 0x11eef2 movq %rax, -0x450(%rbp) jmp 0x542a9 leaq -0x210(%rbp), %rdi leaq 0xcae67(%rip), %rsi # 0x11ef02 movl $0x3, %edx callq 0x27a50 cmpl $0x0, %eax je 0x540c7 movl $0x3, -0x480(%rbp) leaq 0xcae4b(%rip), %rax # 0x11ef06 movq %rax, -0x450(%rbp) jmp 0x542a9 movzbl -0x20d(%rbp), %esi leaq 0xcb036(%rip), %rdi # 0x11f10b movb $0x0, %al callq 0x27080 movzwl -0x1fc(%rbp), %eax movl %eax, -0x454(%rbp) movzwl -0x1fa(%rbp), %eax movl %eax, -0x458(%rbp) movl -0x454(%rbp), %eax cmpq $0x1e, %rax jb 0x54122 cmpl $0xf, -0x458(%rbp) jb 0x54122 movl -0x454(%rbp), %eax addl -0x458(%rbp), %eax movl %eax, %eax cmpq -0x460(%rbp), %rax je 0x5413f movl $0x8, -0x480(%rbp) leaq 0xcae5a(%rip), %rax # 0x11ef8d movq %rax, -0x450(%rbp) jmp 0x542a9 movl -0x454(%rbp), %eax movzbl -0x20c(%rbp,%rax), %eax movl -0x454(%rbp), %ecx movzbl -0x20b(%rbp,%rcx), %ecx shll $0x8, %ecx orl %ecx, %eax movl -0x454(%rbp), %ecx movzbl -0x20a(%rbp,%rcx), %ecx shll $0x10, %ecx orl %ecx, %eax movl %eax, %eax shlq $0x20, %rax movl -0x454(%rbp), %ecx movl -0x209(%rbp,%rcx), %ecx orq %rcx, %rax movq %rax, -0x478(%rbp) movl -0x454(%rbp), %eax movl -0x205(%rbp,%rax), %eax movq %rax, -0x468(%rbp) leaq -0x210(%rbp), %rdi addq $0x4, %rdi leaq -0x440(%rbp), %rsi callq 0xca100 movb $0x0, -0x41c(%rbp) movzwl -0x1f8(%rbp), %esi leaq 0xcaf54(%rip), %rdi # 0x11f124 movb $0x0, %al callq 0x27080 leaq -0x440(%rbp), %rsi leaq 0xcaf58(%rip), %rdi # 0x11f13d movb $0x0, %al callq 0x27080 movq -0x478(%rbp), %rax shrq $0x20, %rax movl %eax, %esi movabsq $0xffffffff, %rax # imm = 0xFFFFFFFF andq -0x478(%rbp), %rax movl %eax, %edx leaq 0xcaf43(%rip), %rdi # 0x11f156 movb $0x0, %al callq 0x27080 movq -0x468(%rbp), %rsi leaq 0xcaf4e(%rip), %rdi # 0x11f176 movb $0x0, %al callq 0x27080 cmpl $0x15, -0x458(%rbp) jb 0x5426d leaq -0x210(%rbp), %rdi movl -0x454(%rbp), %eax addq %rax, %rdi addq $0xf, %rdi callq 0x53900 movq %rax, -0x470(%rbp) movq -0x470(%rbp), %rsi leaq 0xcaf2a(%rip), %rdi # 0x11f190 movb $0x0, %al callq 0x27080 cmpl $0x16, -0x458(%rbp) jb 0x5429e movl -0x454(%rbp), %eax movzbl -0x1fb(%rbp,%rax), %eax movl %eax, -0x484(%rbp) movl -0x484(%rbp), %esi leaq 0xcaf14(%rip), %rdi # 0x11f1ab movb $0x0, %al callq 0x27080 jmp 0x542a0 movb $0x0, -0x441(%rbp) jmp 0x542da movq -0x450(%rbp), %rcx leaq -0x410(%rbp), %r8 movl $0xae, %edi leaq 0xcad99(%rip), %rsi # 0x11f05c xorl %eax, %eax movl %eax, %edx movb $0x0, %al callq 0xb6900 movl -0x480(%rbp), %eax movb %al, -0x441(%rbp) movb -0x441(%rbp), %al movb %al, -0x489(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x54307 movb -0x489(%rbp), %al addq $0x4a0, %rsp # imm = 0x4A0 popq %rbp retq callq 0x272b0 nopl (%rax)
print_aria_log_control: push rbp mov rbp, rsp sub rsp, 4A0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_47C], 80002h mov [rbp+var_480], 0Bh lea rdi, [rbp+var_410] lea rax, maria_data_root mov rdx, [rax] lea rsi, aAriaLogControl; "aria_log_control" lea rcx, aLibmarias3SDS+19h; "" mov r8d, 10h call fn_format cmp rax, 0 jnz short loc_53F5A jmp short $+2 loc_53F4E: mov [rbp+var_441], 0Bh jmp loc_542DA loc_53F5A: lea rax, key_file_control mov edi, [rax] lea rcx, [rbp+var_410] mov r8d, [rbp+var_47C] lea rsi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 280h mov r9d, 10h call inline_mysql_file_open mov [rbp+var_488], eax cmp eax, 0 jge short loc_53FA6 lea rax, aCanTOpenFile; "Can't open file" mov [rbp+var_450], rax jmp loc_542A9 loc_53FA6: mov edx, [rbp+var_488] lea rdi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 286h xor eax, eax mov ecx, eax mov r8d, 2 mov r9d, 10h call inline_mysql_file_seek_1 mov [rbp+var_460], rax cmp [rbp+var_460], 0FFFFFFFFFFFFFFFFh jnz short loc_53FF1 lea rax, aCanTReadSize; "Can't read size" mov [rbp+var_450], rax jmp loc_542A9 loc_53FF1: cmp [rbp+var_460], 2Dh ; '-' jnb short loc_54018 mov [rbp+var_480], 1 lea rax, aSizeOfControlF; "Size of control file is smaller than ex"... mov [rbp+var_450], rax jmp loc_542A9 loc_54018: cmp [rbp+var_460], 200h jbe short loc_54042 mov [rbp+var_480], 2 lea rax, aFileSizeBigger; "File size bigger than expected" mov [rbp+var_450], rax jmp loc_542A9 loc_54042: mov edx, [rbp+var_488] lea rcx, [rbp+var_210] mov r8, [rbp+var_460] lea rdi, aWorkspaceLlm4b_13; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 2A6h xor eax, eax mov r9d, eax mov [rsp+4A0h+var_4A0], 2 call inline_mysql_file_pread_1 cmp rax, 0 jz short loc_5408D lea rax, aCanTReadFile; "Can't read file" mov [rbp+var_450], rax jmp loc_542A9 loc_5408D: lea rdi, [rbp+var_210] lea rsi, word_11EF02 mov edx, 3 call _memcmp cmp eax, 0 jz short loc_540C7 mov [rbp+var_480], 3 lea rax, aMissingValidId; "Missing valid id at start of file. File"... mov [rbp+var_450], rax jmp loc_542A9 loc_540C7: movzx esi, [rbp+var_20D] lea rdi, aAriaFileVersio; "Aria file version: %u\n" mov al, 0 call _printf movzx eax, [rbp+var_1FC] mov [rbp+var_454], eax movzx eax, [rbp+var_1FA] mov [rbp+var_458], eax mov eax, [rbp+var_454] cmp rax, 1Eh jb short loc_54122 cmp [rbp+var_458], 0Fh jb short loc_54122 mov eax, [rbp+var_454] add eax, [rbp+var_458] mov eax, eax cmp rax, [rbp+var_460] jz short loc_5413F loc_54122: mov [rbp+var_480], 8 lea rax, aSizesStoredInC; "Sizes stored in control file are incons"... mov [rbp+var_450], rax jmp loc_542A9 loc_5413F: mov eax, [rbp+var_454] movzx eax, [rbp+rax+var_20C] mov ecx, [rbp+var_454] movzx ecx, [rbp+rcx+var_20B] shl ecx, 8 or eax, ecx mov ecx, [rbp+var_454] movzx ecx, [rbp+rcx+var_20A] shl ecx, 10h or eax, ecx mov eax, eax shl rax, 20h mov ecx, [rbp+var_454] mov ecx, [rbp+rcx+var_209] or rax, rcx mov [rbp+var_478], rax mov eax, [rbp+var_454] mov eax, [rbp+rax+var_205] mov [rbp+var_468], rax lea rdi, [rbp+var_210] add rdi, 4 lea rsi, [rbp+var_440] call my_uuid2str mov [rbp+var_41C], 0 movzx esi, [rbp+var_1F8] lea rdi, aBlockSizeU; "Block size: %u\n" mov al, 0 call _printf lea rsi, [rbp+var_440] lea rdi, aMariaUuidS; "maria_uuid: %s\n" mov al, 0 call _printf mov rax, [rbp+var_478] shr rax, 20h mov esi, eax mov rax, 0FFFFFFFFh and rax, [rbp+var_478] mov edx, eax lea rdi, aLastCheckpoint; "last_checkpoint_lsn: (%u,0x%x)\n" mov al, 0 call _printf mov rsi, [rbp+var_468] lea rdi, aLastLogNumberL; "last_log_number: %lu\n" mov al, 0 call _printf cmp [rbp+var_458], 15h jb short loc_5426D lea rdi, [rbp+var_210] mov eax, [rbp+var_454] add rdi, rax add rdi, 0Fh call uint6korr_0 mov [rbp+var_470], rax mov rsi, [rbp+var_470] lea rdi, aTridLlu; "trid: %llu\n" mov al, 0 call _printf loc_5426D: cmp [rbp+var_458], 16h jb short loc_5429E mov eax, [rbp+var_454] movzx eax, byte ptr [rbp+rax+var_1FC+1] mov [rbp+var_484], eax mov esi, [rbp+var_484] lea rdi, aRecoveryFailur; "recovery_failures: %u\n" mov al, 0 call _printf loc_5429E: jmp short $+2 loc_542A0: mov [rbp+var_441], 0 jmp short loc_542DA loc_542A9: mov rcx, [rbp+var_450] lea r8, [rbp+var_410] mov edi, 0AEh lea rsi, aGotErrorSWhenT; "Got error '%s' when trying to use aria "... xor eax, eax mov edx, eax mov al, 0 call my_printf_error mov eax, [rbp+var_480] mov [rbp+var_441], al loc_542DA: mov al, [rbp+var_441] mov [rbp+var_489], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_54307 mov al, [rbp+var_489] add rsp, 4A0h pop rbp retn loc_54307: call ___stack_chk_fail
char print_aria_log_control() { int v0; // r9d int v1; // r9d int v2; // r9d int v3; // r9d int v4; // r9d signed int v6; // [rsp+18h] [rbp-488h] char v7; // [rsp+20h] [rbp-480h] unsigned long long v8; // [rsp+28h] [rbp-478h] unsigned long long v9; // [rsp+30h] [rbp-470h] long long v10; // [rsp+38h] [rbp-468h] unsigned long long v11; // [rsp+40h] [rbp-460h] unsigned int v12; // [rsp+48h] [rbp-458h] unsigned int v13; // [rsp+4Ch] [rbp-454h] char v15[48]; // [rsp+60h] [rbp-440h] BYREF _BYTE v16[512]; // [rsp+90h] [rbp-410h] BYREF _BYTE v17[4]; // [rsp+290h] [rbp-210h] BYREF _BYTE v18[16]; // [rsp+294h] [rbp-20Ch] BYREF unsigned __int16 v19; // [rsp+2A4h] [rbp-1FCh] unsigned __int16 v20; // [rsp+2A6h] [rbp-1FAh] unsigned __int16 v21; // [rsp+2A8h] [rbp-1F8h] unsigned long long v22; // [rsp+498h] [rbp-8h] v22 = __readfsqword(0x28u); v7 = 11; if ( !fn_format(v16, "aria_log_control", maria_data_root, "", 16LL) ) return 11; v6 = inline_mysql_file_open( key_file_control, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x280u, (long long)v16, 0x80002u, 16LL); if ( v6 < 0 ) { my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Can't open file", (unsigned int)v16, v0); return v7; } v11 = inline_mysql_file_seek_1( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x286u, v6, 0LL, 2u, 16LL); if ( v11 == -1LL ) { my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Can't read size", (unsigned int)v16, v1); return v7; } if ( v11 < 0x2D ) { v7 = 1; my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Size of control file is smaller than expected", (unsigned int)v16, v1); return v7; } if ( v11 > 0x200 ) { v7 = 2; my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"File size bigger than expected", (unsigned int)v16, v1); return v7; } if ( inline_mysql_file_pread_1( (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x2A6u, v6, (long long)v17, v11, 0LL, 2LL) ) { my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Can't read file", (unsigned int)v16, v2); return v7; } if ( (unsigned int)memcmp(v17, &word_11EF02, 3LL) ) { v7 = 3; my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Missing valid id at start of file. File is not a valid aria control file", (unsigned int)v16, v3); return v7; } printf("Aria file version: %u\n", v17[3]); v13 = v19; v12 = v20; if ( v19 < 0x1EuLL || v20 < 0xFu || v20 + v19 != v11 ) { v7 = 8; my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (unsigned int)"Sizes stored in control file are inconsistent", (unsigned int)v16, v4); return v7; } v8 = *(unsigned int *)&v18[v19 + 3] | ((unsigned long long)(((unsigned __int8)v18[v19 + 2] << 16) | ((unsigned __int8)v18[v19 + 1] << 8) | (unsigned int)(unsigned __int8)v18[v19]) << 32); v10 = *(unsigned int *)&v18[v19 + 7]; my_uuid2str(v18, v15); v15[36] = 0; printf("Block size: %u\n", v21); printf("maria_uuid: %s\n", v15); printf("last_checkpoint_lsn: (%u,0x%x)\n", HIDWORD(v8), v8); printf("last_log_number: %lu\n", v10); if ( v12 >= 0x15 ) { v9 = uint6korr_0((unsigned int *)&v17[v13 + 15]); printf("trid: %llu\n", v9); } if ( v12 >= 0x16 ) printf("recovery_failures: %u\n", *((unsigned __int8 *)&v19 + v13 + 1)); return 0; }
print_aria_log_control: PUSH RBP MOV RBP,RSP SUB RSP,0x4a0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x47c],0x80002 MOV dword ptr [RBP + -0x480],0xb LEA RDI,[RBP + -0x410] LEA RAX,[0x540740] MOV RDX,qword ptr [RAX] LEA RSI,[0x21ee09] LEA RCX,[0x21e355] MOV R8D,0x10 CALL 0x001ae980 CMP RAX,0x0 JNZ 0x00153f5a JMP 0x00153f4e LAB_00153f4e: MOV byte ptr [RBP + -0x441],0xb JMP 0x001542da LAB_00153f5a: LEA RAX,[0x540900] MOV EDI,dword ptr [RAX] LEA RCX,[RBP + -0x410] MOV R8D,dword ptr [RBP + -0x47c] LEA RSI,[0x21ee3c] MOV EDX,0x280 MOV R9D,0x10 CALL 0x001535b0 MOV dword ptr [RBP + -0x488],EAX CMP EAX,0x0 JGE 0x00153fa6 LEA RAX,[0x21ee85] MOV qword ptr [RBP + -0x450],RAX JMP 0x001542a9 LAB_00153fa6: MOV EDX,dword ptr [RBP + -0x488] LEA RDI,[0x21ee3c] MOV ESI,0x286 XOR EAX,EAX MOV ECX,EAX MOV R8D,0x2 MOV R9D,0x10 CALL 0x001536a0 MOV qword ptr [RBP + -0x460],RAX CMP qword ptr [RBP + -0x460],-0x1 JNZ 0x00153ff1 LEA RAX,[0x21ee95] MOV qword ptr [RBP + -0x450],RAX JMP 0x001542a9 LAB_00153ff1: CMP qword ptr [RBP + -0x460],0x2d JNC 0x00154018 MOV dword ptr [RBP + -0x480],0x1 LEA RAX,[0x21eea5] MOV qword ptr [RBP + -0x450],RAX JMP 0x001542a9 LAB_00154018: CMP qword ptr [RBP + -0x460],0x200 JBE 0x00154042 MOV dword ptr [RBP + -0x480],0x2 LEA RAX,[0x21eed3] MOV qword ptr [RBP + -0x450],RAX JMP 0x001542a9 LAB_00154042: MOV EDX,dword ptr [RBP + -0x488] LEA RCX,[RBP + -0x210] MOV R8,qword ptr [RBP + -0x460] LEA RDI,[0x21ee3c] MOV ESI,0x2a6 XOR EAX,EAX MOV R9D,EAX MOV qword ptr [RSP],0x2 CALL 0x00153790 CMP RAX,0x0 JZ 0x0015408d LEA RAX,[0x21eef2] MOV qword ptr [RBP + -0x450],RAX JMP 0x001542a9 LAB_0015408d: LEA RDI,[RBP + -0x210] LEA RSI,[0x21ef02] MOV EDX,0x3 CALL 0x00127a50 CMP EAX,0x0 JZ 0x001540c7 MOV dword ptr [RBP + -0x480],0x3 LEA RAX,[0x21ef06] MOV qword ptr [RBP + -0x450],RAX JMP 0x001542a9 LAB_001540c7: MOVZX ESI,byte ptr [RBP + -0x20d] LEA RDI,[0x21f10b] MOV AL,0x0 CALL 0x00127080 MOVZX EAX,word ptr [RBP + -0x1fc] MOV dword ptr [RBP + -0x454],EAX MOVZX EAX,word ptr [RBP + -0x1fa] MOV dword ptr [RBP + -0x458],EAX MOV EAX,dword ptr [RBP + -0x454] CMP RAX,0x1e JC 0x00154122 CMP dword ptr [RBP + -0x458],0xf JC 0x00154122 MOV EAX,dword ptr [RBP + -0x454] ADD EAX,dword ptr [RBP + -0x458] MOV EAX,EAX CMP RAX,qword ptr [RBP + -0x460] JZ 0x0015413f LAB_00154122: MOV dword ptr [RBP + -0x480],0x8 LEA RAX,[0x21ef8d] MOV qword ptr [RBP + -0x450],RAX JMP 0x001542a9 LAB_0015413f: MOV EAX,dword ptr [RBP + -0x454] MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x20c] MOV ECX,dword ptr [RBP + -0x454] MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x20b] SHL ECX,0x8 OR EAX,ECX MOV ECX,dword ptr [RBP + -0x454] MOVZX ECX,byte ptr [RBP + RCX*0x1 + -0x20a] SHL ECX,0x10 OR EAX,ECX MOV EAX,EAX SHL RAX,0x20 MOV ECX,dword ptr [RBP + -0x454] MOV ECX,dword ptr [RBP + RCX*0x1 + -0x209] OR RAX,RCX MOV qword ptr [RBP + -0x478],RAX MOV EAX,dword ptr [RBP + -0x454] MOV EAX,dword ptr [RBP + RAX*0x1 + -0x205] MOV qword ptr [RBP + -0x468],RAX LEA RDI,[RBP + -0x210] ADD RDI,0x4 LEA RSI,[RBP + -0x440] CALL 0x001ca100 MOV byte ptr [RBP + -0x41c],0x0 MOVZX ESI,word ptr [RBP + -0x1f8] LEA RDI,[0x21f124] MOV AL,0x0 CALL 0x00127080 LEA RSI,[RBP + -0x440] LEA RDI,[0x21f13d] MOV AL,0x0 CALL 0x00127080 MOV RAX,qword ptr [RBP + -0x478] SHR RAX,0x20 MOV ESI,EAX MOV RAX,0xffffffff AND RAX,qword ptr [RBP + -0x478] MOV EDX,EAX LEA RDI,[0x21f156] MOV AL,0x0 CALL 0x00127080 MOV RSI,qword ptr [RBP + -0x468] LEA RDI,[0x21f176] MOV AL,0x0 CALL 0x00127080 CMP dword ptr [RBP + -0x458],0x15 JC 0x0015426d LEA RDI,[RBP + -0x210] MOV EAX,dword ptr [RBP + -0x454] ADD RDI,RAX ADD RDI,0xf CALL 0x00153900 MOV qword ptr [RBP + -0x470],RAX MOV RSI,qword ptr [RBP + -0x470] LEA RDI,[0x21f190] MOV AL,0x0 CALL 0x00127080 LAB_0015426d: CMP dword ptr [RBP + -0x458],0x16 JC 0x0015429e MOV EAX,dword ptr [RBP + -0x454] MOVZX EAX,byte ptr [RBP + RAX*0x1 + -0x1fb] MOV dword ptr [RBP + -0x484],EAX MOV ESI,dword ptr [RBP + -0x484] LEA RDI,[0x21f1ab] MOV AL,0x0 CALL 0x00127080 LAB_0015429e: JMP 0x001542a0 LAB_001542a0: MOV byte ptr [RBP + -0x441],0x0 JMP 0x001542da LAB_001542a9: MOV RCX,qword ptr [RBP + -0x450] LEA R8,[RBP + -0x410] MOV EDI,0xae LEA RSI,[0x21f05c] XOR EAX,EAX MOV EDX,EAX MOV AL,0x0 CALL 0x001b6900 MOV EAX,dword ptr [RBP + -0x480] MOV byte ptr [RBP + -0x441],AL LAB_001542da: MOV AL,byte ptr [RBP + -0x441] MOV byte ptr [RBP + -0x489],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00154307 MOV AL,byte ptr [RBP + -0x489] ADD RSP,0x4a0 POP RBP RET LAB_00154307: CALL 0x001272b0
int8 print_aria_log_control(void) { int4 uVar1; uint uVar2; uint3 uVar3; int iVar4; uint uVar5; uint uVar6; long lVar7; ulong uVar8; int8 uVar9; long in_FS_OFFSET; int1 local_488; char *local_458; int1 local_449; int1 local_448 [36]; int1 local_424; int1 local_418 [512]; int1 local_218 [3]; byte local_215; int1 auStack_214 [3]; uint auStack_211 [2]; int1 auStack_209 [5]; int2 local_204; ushort local_202; ushort local_200; int1 auStack_1f6 [486]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_488 = 0xb; lVar7 = fn_format(local_418,"aria_log_control",maria_data_root,"",0x10); if (lVar7 == 0) { local_449 = 0xb; } else { iVar4 = inline_mysql_file_open (key_file_control, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x280,local_418,0x80002,0x10); if (iVar4 < 0) { local_458 = "Can\'t open file"; } else { uVar8 = inline_mysql_file_seek ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x286,iVar4,0,2,0x10); if (uVar8 == 0xffffffffffffffff) { local_458 = "Can\'t read size"; } else if (uVar8 < 0x2d) { local_488 = 1; local_458 = "Size of control file is smaller than expected"; } else if (uVar8 < 0x201) { lVar7 = inline_mysql_file_pread ("/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c" ,0x2a6,iVar4,local_218,uVar8,0,2); if (lVar7 == 0) { iVar4 = memcmp(local_218,&DAT_0021ef02,3); if (iVar4 == 0) { printf("Aria file version: %u\n",(ulong)local_215); uVar5 = (uint)local_204; uVar6 = (uint)local_202; if (((0x1d < uVar5) && (0xe < uVar6)) && (uVar5 + uVar6 == uVar8)) { uVar3 = CONCAT12(auStack_214[(ulong)uVar5 + 2], CONCAT11(auStack_214[(ulong)uVar5 + 1],auStack_214[uVar5])); uVar1 = *(int4 *)(auStack_214 + (ulong)uVar5 + 3); uVar2 = *(uint *)((long)auStack_211 + (ulong)uVar5 + 4); my_uuid2str(auStack_214,local_448); local_424 = 0; printf("Block size: %u\n",(ulong)local_200); printf("maria_uuid: %s\n",local_448); printf("last_checkpoint_lsn: (%u,0x%x)\n",(ulong)uVar3, (ulong)CONCAT34(uVar3,uVar1) & 0xffffffff); printf("last_log_number: %lu\n",(ulong)uVar2); if (0x14 < uVar6) { uVar9 = uint6korr(auStack_209 + uVar5); printf("trid: %llu\n",uVar9); } if (0x15 < uVar6) { printf("recovery_failures: %u\n", (ulong)*(byte *)((long)&local_204 + (ulong)uVar5 + 1)); } local_449 = 0; goto LAB_001542da; } local_488 = 8; local_458 = "Sizes stored in control file are inconsistent"; } else { local_488 = 3; local_458 = "Missing valid id at start of file. File is not a valid aria control file"; } } else { local_458 = "Can\'t read file"; } } else { local_488 = 2; local_458 = "File size bigger than expected"; } } my_printf_error(0xae,"Got error \'%s\' when trying to use aria control file \'%s\'",0,local_458, local_418); local_449 = local_488; } LAB_001542da: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_449); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
62
string_strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/common.cpp
std::string string_strip(const std::string & str) { size_t start = 0; size_t end = str.size(); while (start < end && std::isspace(str[start])) { start++; } while (end > start && std::isspace(str[end - 1])) { end--; } return str.substr(start, end - start); }
O3
cpp
string_strip(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 pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq (%rsi), %rbp movq 0x8(%rsi), %r13 xorl %r15d, %r15d testq %r13, %r13 je 0xf6b96 movsbl (%rbp,%r15), %edi callq 0x21d10 testl %eax, %eax je 0xf6b96 incq %r15 cmpq %r15, %r13 jne 0xf6b7c movq %r13, %r15 cmpq %r13, %r15 movq %r13, %r12 cmovbq %r15, %r12 cmpq %r15, %r13 jbe 0xf6bbd movsbl -0x1(%rbp,%r13), %edi decq %r13 callq 0x21d10 testl %eax, %eax jne 0xf6ba0 incq %r13 movq %r13, %r12 subq %r15, %r12 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %r12, %rcx callq 0x220d0 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z12string_stripRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rsi mov rbx, rdi mov rbp, [rsi] mov r13, [rsi+8] xor r15d, r15d test r13, r13 jz short loc_F6B96 loc_F6B7C: movsx edi, byte ptr [rbp+r15+0] call _isspace test eax, eax jz short loc_F6B96 inc r15 cmp r13, r15 jnz short loc_F6B7C mov r15, r13 loc_F6B96: cmp r15, r13 mov r12, r13 cmovb r12, r15 loc_F6BA0: cmp r13, r15 jbe short loc_F6BBD movsx edi, byte ptr [rbp+r13-1] dec r13 call _isspace test eax, eax jnz short loc_F6BA0 inc r13 mov r12, r13 loc_F6BBD: sub r12, r15 mov rdi, rbx mov rsi, r14 mov rdx, r15 mov rcx, r12 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long string_strip(long long a1, long long *a2) { long long v3; // rbp unsigned long long v4; // r13 unsigned long long v5; // r15 unsigned long long v6; // r12 long long v7; // rdi v3 = *a2; v4 = a2[1]; v5 = 0LL; if ( v4 ) { while ( (unsigned int)isspace((unsigned int)*(char *)(v3 + v5)) ) { if ( v4 == ++v5 ) { v5 = v4; break; } } } v6 = v4; if ( v5 < v4 ) v6 = v5; while ( v4 > v5 ) { v7 = (unsigned int)*(char *)(v3 + v4-- - 1); if ( !(unsigned int)isspace(v7) ) { v6 = v4 + 1; break; } } std::string::substr(a1, a2, v5, v6 - v5); return a1; }
string_strip: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RBP,qword ptr [RSI] MOV R13,qword ptr [RSI + 0x8] XOR R15D,R15D TEST R13,R13 JZ 0x001f6b96 LAB_001f6b7c: MOVSX EDI,byte ptr [RBP + R15*0x1] CALL 0x00121d10 TEST EAX,EAX JZ 0x001f6b96 INC R15 CMP R13,R15 JNZ 0x001f6b7c MOV R15,R13 LAB_001f6b96: CMP R15,R13 MOV R12,R13 CMOVC R12,R15 LAB_001f6ba0: CMP R13,R15 JBE 0x001f6bbd MOVSX EDI,byte ptr [RBP + R13*0x1 + -0x1] DEC R13 CALL 0x00121d10 TEST EAX,EAX JNZ 0x001f6ba0 INC R13 MOV R12,R13 LAB_001f6bbd: SUB R12,R15 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV RCX,R12 CALL 0x001220d0 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_strip(std::__cxx11::string const&) */ string * string_strip(string *param_1) { char *pcVar1; long lVar2; int iVar3; long *in_RSI; ulong uVar4; ulong uVar5; ulong uVar6; lVar2 = *in_RSI; uVar4 = in_RSI[1]; uVar5 = 0; uVar6 = uVar5; if (uVar4 != 0) { do { iVar3 = isspace((int)*(char *)(lVar2 + uVar5)); uVar6 = uVar5; if (iVar3 == 0) break; uVar5 = uVar5 + 1; uVar6 = uVar4; } while (uVar4 != uVar5); } do { if (uVar4 <= uVar6) break; pcVar1 = (char *)(lVar2 + -1 + uVar4); uVar4 = uVar4 - 1; iVar3 = isspace((int)*pcVar1); } while (iVar3 != 0); std::__cxx11::string::substr((ulong)param_1,(ulong)in_RSI); return param_1; }
63
ssz_add_builders
corpus-core[P]colibri-stateless/src/util/ssz_builder.c
void ssz_add_builders(ssz_builder_t* buffer, const char* name, ssz_builder_t data) { const ssz_def_t* def = find_def(buffer->def, name); if (def && def->type == SSZ_TYPE_UNION) { bool found = false; for (int i = 0; i < def->def.container.len; i++) { if (def->def.container.elements + i == data.def || (data.def->type == SSZ_TYPE_CONTAINER && def->def.container.elements[i].def.container.elements == data.def->def.container.elements)) { uint8_t selector = i; found = true; buffer_splice(&data.fixed, 0, 0, bytes(&selector, 1)); break; } } if (!found) { log_error("ssz_add_builders: Uniontype %s not found in %s.%s\n", data.def->name, buffer->def->name, name); return; } } ssz_ob_t element = ssz_builder_to_bytes(&data); ssz_add_bytes(buffer, name, element.bytes); safe_free(element.bytes.data); }
O0
c
ssz_add_builders: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x70(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rsi callq 0x1e620 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0x1e5e3 movq -0x18(%rbp), %rax cmpl $0x7, 0x8(%rax) jne 0x1e5e3 movb $0x0, -0x19(%rbp) movl $0x0, -0x20(%rbp) movl -0x20(%rbp), %eax movq -0x18(%rbp), %rcx cmpl 0x18(%rcx), %eax jae 0x1e552 movq -0x70(%rbp), %rcx movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movslq -0x20(%rbp), %rdx shlq $0x5, %rdx addq %rdx, %rax cmpq (%rcx), %rax je 0x1e50d movq -0x70(%rbp), %rax movq (%rax), %rax cmpl $0x2, 0x8(%rax) jne 0x1e542 movq -0x70(%rbp), %rcx movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movslq -0x20(%rbp), %rdx shlq $0x5, %rdx addq %rdx, %rax movq 0x10(%rax), %rax movq (%rcx), %rcx cmpq 0x10(%rcx), %rax jne 0x1e542 movq -0x70(%rbp), %rdi movl -0x20(%rbp), %eax movb %al, -0x21(%rbp) movb $0x1, -0x19(%rbp) addq $0x8, %rdi movl $0x1, -0x38(%rbp) leaq -0x21(%rbp), %rax movq %rax, -0x30(%rbp) movl -0x38(%rbp), %ecx movq -0x30(%rbp), %r8 xorl %eax, %eax movl %eax, %esi xorl %edx, %edx callq 0x18ca0 jmp 0x1e552 jmp 0x1e544 movl -0x20(%rbp), %eax addl $0x1, %eax movl %eax, -0x20(%rbp) jmp 0x1e4b0 testb $0x1, -0x19(%rbp) jne 0x1e5e1 jmp 0x1e55e movb $0x0, %al callq 0x220e0 cmpl $0x1, %eax jb 0x1e5dd leaq -0x50(%rbp), %rdi xorl %esi, %esi movl $0x18, %edx callq 0x5110 movq -0x70(%rbp), %rax movq (%rax), %rax movq (%rax), %rdx movq -0x8(%rbp), %rax movq (%rax), %rax movq (%rax), %rcx movq -0x10(%rbp), %r8 leaq -0x50(%rbp), %rdi leaq 0x35ec7(%rip), %rsi # 0x54464 movb $0x0, %al callq 0x19740 movq 0x50a35(%rip), %rax # 0x6efe0 movq (%rax), %rdi movq -0x48(%rbp), %r9 leaq 0x33dbf(%rip), %rsi # 0x52378 leaq 0x35dec(%rip), %rdx # 0x543ac leaq 0x35ed0(%rip), %rcx # 0x54497 movl $0x2d, %r8d movb $0x0, %al callq 0x50d0 leaq -0x50(%rbp), %rdi callq 0x18d90 jmp 0x1e5df jmp 0x1e60d jmp 0x1e5e3 movq -0x70(%rbp), %rsi leaq -0x68(%rbp), %rdi callq 0x1e6c0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x68(%rbp), %edx movq -0x60(%rbp), %rcx callq 0x1e730 movq -0x60(%rbp), %rdi callq 0x18740 addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ssz_add_builders: push rbp mov rbp, rsp sub rsp, 70h lea rax, [rbp+arg_0] mov [rbp+var_70], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rdi, [rax] mov rsi, [rbp+var_10] call find_def mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz loc_1E5E3 mov rax, [rbp+var_18] cmp dword ptr [rax+8], 7 jnz loc_1E5E3 mov [rbp+var_19], 0 mov [rbp+var_20], 0 loc_1E4B0: mov eax, [rbp+var_20] mov rcx, [rbp+var_18] cmp eax, [rcx+18h] jnb loc_1E552 mov rcx, [rbp+var_70] mov rax, [rbp+var_18] mov rax, [rax+10h] movsxd rdx, [rbp+var_20] shl rdx, 5 add rax, rdx cmp rax, [rcx] jz short loc_1E50D mov rax, [rbp+var_70] mov rax, [rax] cmp dword ptr [rax+8], 2 jnz short loc_1E542 mov rcx, [rbp+var_70] mov rax, [rbp+var_18] mov rax, [rax+10h] movsxd rdx, [rbp+var_20] shl rdx, 5 add rax, rdx mov rax, [rax+10h] mov rcx, [rcx] cmp rax, [rcx+10h] jnz short loc_1E542 loc_1E50D: mov rdi, [rbp+var_70] mov eax, [rbp+var_20] mov [rbp+var_21], al mov [rbp+var_19], 1 add rdi, 8 mov [rbp+var_38], 1 lea rax, [rbp+var_21] mov [rbp+var_30], rax mov ecx, [rbp+var_38] mov r8, [rbp+var_30] xor eax, eax mov esi, eax xor edx, edx call buffer_splice jmp short loc_1E552 loc_1E542: jmp short $+2 loc_1E544: mov eax, [rbp+var_20] add eax, 1 mov [rbp+var_20], eax jmp loc_1E4B0 loc_1E552: test [rbp+var_19], 1 jnz loc_1E5E1 jmp short $+2 loc_1E55E: mov al, 0 call c4_get_log_level cmp eax, 1 jb short loc_1E5DD lea rdi, [rbp+var_50] xor esi, esi mov edx, 18h call _memset mov rax, [rbp+var_70] mov rax, [rax] mov rdx, [rax] mov rax, [rbp+var_8] mov rax, [rax] mov rcx, [rax] mov r8, [rbp+var_10] lea rdi, [rbp+var_50] lea rsi, aSszAddBuilders; "ssz_add_builders: Uniontype %s not foun"... mov al, 0 call bprintf mov rax, cs:stderr_ptr mov rdi, [rax] mov r9, [rbp+var_48] lea rsi, aS0m32mSD0mS; "%s\x1B[0m\x1B[32m %s:%d\x1B[0m %s\n" lea rdx, a31merror; "\x1B[31mERROR" lea rcx, aSszAddBuilders_0; "ssz_add_builders" mov r8d, 2Dh ; '-' mov al, 0 call _fprintf lea rdi, [rbp+var_50] call buffer_free loc_1E5DD: jmp short $+2 loc_1E5DF: jmp short loc_1E60D loc_1E5E1: jmp short $+2 loc_1E5E3: mov rsi, [rbp+var_70] lea rdi, [rbp+var_68] call ssz_builder_to_bytes mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, [rbp+var_68] mov rcx, [rbp+var_60] call ssz_add_bytes mov rdi, [rbp+var_60] call safe_free loc_1E60D: add rsp, 70h pop rbp retn
long long ssz_add_builders( long long **a1, long long a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14, long long a15, long long a16) { long long result; // rax long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 unsigned int v20; // [rsp+8h] [rbp-68h] BYREF long long v21; // [rsp+10h] [rbp-60h] unsigned int v22; // [rsp+20h] [rbp-50h] BYREF const char *v23; // [rsp+28h] [rbp-48h] int v24; // [rsp+38h] [rbp-38h] char *v25; // [rsp+40h] [rbp-30h] char v26; // [rsp+4Fh] [rbp-21h] BYREF unsigned int i; // [rsp+50h] [rbp-20h] char v28; // [rsp+57h] [rbp-19h] long long def; // [rsp+58h] [rbp-18h] long long v30; // [rsp+60h] [rbp-10h] long long **v31; // [rsp+68h] [rbp-8h] v31 = a1; v30 = a2; def = find_def(*a1, a2); if ( !def || *(_DWORD *)(def + 8) != 7 ) goto LABEL_14; v28 = 0; for ( i = 0; i < *(_DWORD *)(def + 24); ++i ) { if ( 32LL * (int)i + *(_QWORD *)(def + 16) == a15 || *(_DWORD *)(a15 + 8) == 2 && *(_QWORD *)(32LL * (int)i + *(_QWORD *)(def + 16) + 16) == *(_QWORD *)(a15 + 16) ) { v26 = i; v28 = 1; v24 = 1; v25 = &v26; buffer_splice((unsigned long long)&a16, 0LL, 0, 1u, (long long)&v26); break; } } if ( (v28 & 1) == 0 ) { result = c4_get_log_level(); if ( (_DWORD)result ) { memset(&v22, 0LL, 24LL); bprintf( &v22, (long long)"ssz_add_builders: Uniontype %s not found in %s.%s\n", *(_QWORD *)a15, **v31, v30, v17, a7, a8, a9, a10, v18, v19, a13, a14, (char)&a15); fprintf(stderr, "%s\x1B[0m\x1B[32m %s:%d\x1B[0m %s\n", "\x1B[31mERROR", "ssz_add_builders", 45, v23); return buffer_free((long long)&v22); } } else { LABEL_14: ssz_builder_to_bytes(&v20, &a15); ssz_add_bytes(v31, v30, v20, v21); return safe_free(v21); } return result; }
ssz_add_builders: PUSH RBP MOV RBP,RSP SUB RSP,0x70 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x70],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0011e620 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x0011e5e3 MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x8],0x7 JNZ 0x0011e5e3 MOV byte ptr [RBP + -0x19],0x0 MOV dword ptr [RBP + -0x20],0x0 LAB_0011e4b0: MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] CMP EAX,dword ptr [RCX + 0x18] JNC 0x0011e552 MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RDX,dword ptr [RBP + -0x20] SHL RDX,0x5 ADD RAX,RDX CMP RAX,qword ptr [RCX] JZ 0x0011e50d MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] CMP dword ptr [RAX + 0x8],0x2 JNZ 0x0011e542 MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOVSXD RDX,dword ptr [RBP + -0x20] SHL RDX,0x5 ADD RAX,RDX MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RCX] CMP RAX,qword ptr [RCX + 0x10] JNZ 0x0011e542 LAB_0011e50d: MOV RDI,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x21],AL MOV byte ptr [RBP + -0x19],0x1 ADD RDI,0x8 MOV dword ptr [RBP + -0x38],0x1 LEA RAX,[RBP + -0x21] MOV qword ptr [RBP + -0x30],RAX MOV ECX,dword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x30] XOR EAX,EAX MOV ESI,EAX XOR EDX,EDX CALL 0x00118ca0 JMP 0x0011e552 LAB_0011e542: JMP 0x0011e544 LAB_0011e544: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX JMP 0x0011e4b0 LAB_0011e552: TEST byte ptr [RBP + -0x19],0x1 JNZ 0x0011e5e1 JMP 0x0011e55e LAB_0011e55e: MOV AL,0x0 CALL 0x001220e0 CMP EAX,0x1 JC 0x0011e5dd LEA RDI,[RBP + -0x50] XOR ESI,ESI MOV EDX,0x18 CALL 0x00105110 MOV RAX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RAX] MOV RDX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX] MOV R8,qword ptr [RBP + -0x10] LEA RDI,[RBP + -0x50] LEA RSI,[0x154464] MOV AL,0x0 CALL 0x00119740 MOV RAX,qword ptr [0x0016efe0] MOV RDI,qword ptr [RAX] MOV R9,qword ptr [RBP + -0x48] LEA RSI,[0x152378] LEA RDX,[0x1543ac] LEA RCX,[0x154497] MOV R8D,0x2d MOV AL,0x0 CALL 0x001050d0 LEA RDI,[RBP + -0x50] CALL 0x00118d90 LAB_0011e5dd: JMP 0x0011e5df LAB_0011e5df: JMP 0x0011e60d LAB_0011e5e1: JMP 0x0011e5e3 LAB_0011e5e3: MOV RSI,qword ptr [RBP + -0x70] LEA RDI,[RBP + -0x68] CALL 0x0011e6c0 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] CALL 0x0011e730 MOV RDI,qword ptr [RBP + -0x60] CALL 0x00118740 LAB_0011e60d: ADD RSP,0x70 POP RBP RET
void ssz_add_builders(int8 *param_1,int8 param_2) { int iVar1; int8 *in_stack_00000008; int4 local_70 [2]; int8 local_68; int1 local_58 [8]; int8 local_50; int4 local_40; int1 *local_38; int1 local_29; uint local_28; byte local_21; long local_20; int8 local_18; int8 *local_10; local_18 = param_2; local_10 = param_1; local_20 = find_def(*param_1); if ((local_20 != 0) && (*(int *)(local_20 + 8) == 7)) { local_21 = 0; for (local_28 = 0; local_28 < *(uint *)(local_20 + 0x18); local_28 = local_28 + 1) { if (((int8 *)(*(long *)(local_20 + 0x10) + (long)(int)local_28 * 0x20) == in_stack_00000008) || ((*(int *)(in_stack_00000008 + 1) == 2 && (*(long *)(*(long *)(local_20 + 0x10) + (long)(int)local_28 * 0x20 + 0x10) == in_stack_00000008[2])))) { local_29 = (int1)local_28; local_21 = 1; local_40 = 1; local_38 = &local_29; buffer_splice(&stack0x00000010,0,0,1,local_38); break; } } if ((local_21 & 1) == 0) { iVar1 = c4_get_log_level(); if (iVar1 == 0) { return; } memset(local_58,0,0x18); bprintf(local_58,"ssz_add_builders: Uniontype %s not found in %s.%s\n",*in_stack_00000008, *(int8 *)*local_10,local_18); fprintf(*(FILE **)PTR_stderr_0016efe0,"%s\x1b[0m\x1b[32m %s:%d\x1b[0m %s\n",&DAT_001543ac, "ssz_add_builders",0x2d,local_50); buffer_free(local_58); return; } } ssz_builder_to_bytes(local_70,&stack0x00000008); ssz_add_bytes(local_10,local_18,local_70[0],local_68); safe_free(local_68); return; }
64
ssz_add_builders
corpus-core[P]colibri-stateless/src/util/ssz_builder.c
void ssz_add_builders(ssz_builder_t* buffer, const char* name, ssz_builder_t data) { const ssz_def_t* def = find_def(buffer->def, name); if (def && def->type == SSZ_TYPE_UNION) { bool found = false; for (int i = 0; i < def->def.container.len; i++) { if (def->def.container.elements + i == data.def || (data.def->type == SSZ_TYPE_CONTAINER && def->def.container.elements[i].def.container.elements == data.def->def.container.elements)) { uint8_t selector = i; found = true; buffer_splice(&data.fixed, 0, 0, bytes(&selector, 1)); break; } } if (!found) { log_error("ssz_add_builders: Uniontype %s not found in %s.%s\n", data.def->name, buffer->def->name, name); return; } } ssz_ob_t element = ssz_builder_to_bytes(&data); ssz_add_bytes(buffer, name, element.bytes); safe_free(element.bytes.data); }
O1
c
ssz_add_builders: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, %r14 leaq 0x40(%rsp), %r15 movq (%rdi), %rdi callq 0x161bf testq %rax, %rax je 0x16167 cmpl $0x7, 0x8(%rax) jne 0x16167 movl 0x18(%rax), %ecx testq %rcx, %rcx setne %bpl je 0x1613b movq 0x10(%rax), %rdx movq (%r15), %rsi xorl %eax, %eax cmpq %rsi, %rdx je 0x1614d cmpl $0x2, 0x8(%rsi) jne 0x1612b movq 0x10(%rdx), %rdi cmpq 0x10(%rsi), %rdi je 0x1614d incq %rax addq $0x20, %rdx cmpq %rax, %rcx jne 0x16116 seta %bpl xorl %eax, %eax callq 0x1869f testl %eax, %eax jne 0x161af testb %bpl, %bpl jne 0x16167 jmp 0x161a2 leaq 0xf(%rsp), %r8 movb %al, (%r8) leaq 0x8(%r15), %rdi xorl %esi, %esi xorl %edx, %edx movl $0x1, %ecx callq 0x129b0 leaq 0x8(%r15), %rdi leaq 0x20(%r15), %r12 movl 0x20(%r15), %esi movq 0x28(%r15), %rdx callq 0x1294d movq %r12, %rdi callq 0x12a33 movl 0x8(%r15), %edx movq 0x10(%r15), %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rcx callq 0x1623c movq %r15, %rdi callq 0x128b8 addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x561c jmp 0x16146
ssz_add_builders: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rsi mov r14, rdi lea r15, [rsp+38h+arg_0] mov rdi, [rdi] call find_def test rax, rax jz short loc_16167 cmp dword ptr [rax+8], 7 jnz short loc_16167 mov ecx, [rax+18h] test rcx, rcx setnz bpl jz short loc_1613B mov rdx, [rax+10h] mov rsi, [r15] xor eax, eax loc_16116: cmp rdx, rsi jz short loc_1614D cmp dword ptr [rsi+8], 2 jnz short loc_1612B mov rdi, [rdx+10h] cmp rdi, [rsi+10h] jz short loc_1614D loc_1612B: inc rax add rdx, 20h ; ' ' cmp rcx, rax jnz short loc_16116 setnbe bpl loc_1613B: xor eax, eax call c4_get_log_level test eax, eax jnz short loc_161AF loc_16146: test bpl, bpl jnz short loc_16167 jmp short loc_161A2 loc_1614D: lea r8, [rsp+38h+var_29] mov [r8], al lea rdi, [r15+8] xor esi, esi xor edx, edx mov ecx, 1 call buffer_splice loc_16167: lea rdi, [r15+8] lea r12, [r15+20h] mov esi, [r15+20h] mov rdx, [r15+28h] call buffer_append mov rdi, r12 call buffer_free mov edx, [r15+8] mov r15, [r15+10h] mov rdi, r14 mov rsi, rbx mov rcx, r15 call ssz_add_bytes mov rdi, r15 call safe_free loc_161A2: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_161AF: mov rdi, r15 mov rsi, r14 mov rdx, rbx call ssz_add_builders_cold_1 jmp short loc_16146
long long ssz_add_builders( _QWORD **a1, long long a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, _QWORD *a7, unsigned int a8, long long a9, long long a10, unsigned int a11, long long a12) { long long def; // rax unsigned long long v13; // rcx bool v14; // bp _QWORD *v15; // rdx unsigned long long v16; // rax long long result; // rax long long v18; // rcx long long v19; // r8 int v20; // r9d long long v21; // r15 _BYTE v22[41]; // [rsp+Fh] [rbp-29h] BYREF def = find_def(*a1); if ( !def || *(_DWORD *)(def + 8) != 7 ) goto LABEL_15; v13 = *(unsigned int *)(def + 24); v14 = v13 != 0; if ( *(_DWORD *)(def + 24) ) { v15 = *(_QWORD **)(def + 16); v16 = 0LL; while ( v15 != a7 && (*((_DWORD *)a7 + 2) != 2 || v15[2] != a7[2]) ) { ++v16; v15 += 4; if ( v13 == v16 ) { v14 = v13 > v16; goto LABEL_10; } } v22[0] = v16; buffer_splice((long long)&a8, 0LL, 0, 1u, (long long)v22); goto LABEL_15; } LABEL_10: result = c4_get_log_level(); if ( (_DWORD)result ) result = ssz_add_builders_cold_1(&a7, a1, a2, v18, v19, v20); if ( v14 ) { LABEL_15: buffer_append(&a8, a11, a12); buffer_free((long long)&a11); v21 = a9; ssz_add_bytes(a1, a2, a8, a9); return safe_free(v21); } return result; }
ssz_add_builders: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV R14,RDI LEA R15,[RSP + 0x40] MOV RDI,qword ptr [RDI] CALL 0x001161bf TEST RAX,RAX JZ 0x00116167 CMP dword ptr [RAX + 0x8],0x7 JNZ 0x00116167 MOV ECX,dword ptr [RAX + 0x18] TEST RCX,RCX SETNZ BPL JZ 0x0011613b MOV RDX,qword ptr [RAX + 0x10] MOV RSI,qword ptr [R15] XOR EAX,EAX LAB_00116116: CMP RDX,RSI JZ 0x0011614d CMP dword ptr [RSI + 0x8],0x2 JNZ 0x0011612b MOV RDI,qword ptr [RDX + 0x10] CMP RDI,qword ptr [RSI + 0x10] JZ 0x0011614d LAB_0011612b: INC RAX ADD RDX,0x20 CMP RCX,RAX JNZ 0x00116116 SETA BPL LAB_0011613b: XOR EAX,EAX CALL 0x0011869f TEST EAX,EAX JNZ 0x001161af LAB_00116146: TEST BPL,BPL JNZ 0x00116167 JMP 0x001161a2 LAB_0011614d: LEA R8,[RSP + 0xf] MOV byte ptr [R8],AL LEA RDI,[R15 + 0x8] XOR ESI,ESI XOR EDX,EDX MOV ECX,0x1 CALL 0x001129b0 LAB_00116167: LEA RDI,[R15 + 0x8] LEA R12,[R15 + 0x20] MOV ESI,dword ptr [R15 + 0x20] MOV RDX,qword ptr [R15 + 0x28] CALL 0x0011294d MOV RDI,R12 CALL 0x00112a33 MOV EDX,dword ptr [R15 + 0x8] MOV R15,qword ptr [R15 + 0x10] MOV RDI,R14 MOV RSI,RBX MOV RCX,R15 CALL 0x0011623c MOV RDI,R15 CALL 0x001128b8 LAB_001161a2: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001161af: MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x0010561c JMP 0x00116146
void ssz_add_builders(int8 *param_1,int8 param_2) { void *__ptr; int iVar1; long lVar2; ulong uVar3; ulong uVar4; bool bVar5; long in_stack_00000008; int4 in_stack_00000010; void *in_stack_00000018; int4 in_stack_00000028; int8 in_stack_00000030; lVar2 = find_def(*param_1); if ((lVar2 != 0) && (*(int *)(lVar2 + 8) == 7)) { uVar4 = (ulong)*(uint *)(lVar2 + 0x18); bVar5 = uVar4 != 0; if (bVar5) { lVar2 = *(long *)(lVar2 + 0x10); uVar3 = 0; do { if ((lVar2 == in_stack_00000008) || ((*(int *)(in_stack_00000008 + 8) == 2 && (*(long *)(lVar2 + 0x10) == *(long *)(in_stack_00000008 + 0x10))))) { buffer_splice(&stack0x00000010,0,0,1); goto LAB_00116167; } uVar3 = uVar3 + 1; lVar2 = lVar2 + 0x20; } while (uVar4 != uVar3); bVar5 = uVar3 < uVar4; } iVar1 = c4_get_log_level(); if (iVar1 != 0) { ssz_add_builders_cold_1(&stack0x00000008,param_1,param_2); } if (!bVar5) { return; } } LAB_00116167: buffer_append(&stack0x00000010,in_stack_00000028,in_stack_00000030); buffer_free(&stack0x00000028); __ptr = in_stack_00000018; ssz_add_bytes(param_1,param_2,in_stack_00000010,in_stack_00000018); safe_free(__ptr); return; }
65
ssz_add_builders
corpus-core[P]colibri-stateless/src/util/ssz_builder.c
void ssz_add_builders(ssz_builder_t* buffer, const char* name, ssz_builder_t data) { const ssz_def_t* def = find_def(buffer->def, name); if (def && def->type == SSZ_TYPE_UNION) { bool found = false; for (int i = 0; i < def->def.container.len; i++) { if (def->def.container.elements + i == data.def || (data.def->type == SSZ_TYPE_CONTAINER && def->def.container.elements[i].def.container.elements == data.def->def.container.elements)) { uint8_t selector = i; found = true; buffer_splice(&data.fixed, 0, 0, bytes(&selector, 1)); break; } } if (!found) { log_error("ssz_add_builders: Uniontype %s not found in %s.%s\n", data.def->name, buffer->def->name, name); return; } } ssz_ob_t element = ssz_builder_to_bytes(&data); ssz_add_bytes(buffer, name, element.bytes); safe_free(element.bytes.data); }
O3
c
ssz_add_builders: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq 0x30(%rsp), %r15 movq (%rdi), %rdi callq 0x15a97 testq %rax, %rax je 0x15a50 cmpl $0x7, 0x8(%rax) jne 0x15a50 movl 0x18(%rax), %ecx testq %rcx, %rcx je 0x15a1b movq 0x10(%rax), %rdx movq (%r15), %rsi xorl %eax, %eax cmpq %rsi, %rdx je 0x15a36 cmpl $0x2, 0x8(%rsi) jne 0x15a0f movq 0x10(%rdx), %rdi cmpq 0x10(%rsi), %rdi je 0x15a36 incq %rax addq $0x20, %rdx cmpq %rax, %rcx jne 0x159fa xorl %eax, %eax callq 0x17e1b testl %eax, %eax je 0x15a8b movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x5615 jmp 0x15a8b leaq 0x7(%rsp), %r8 movb %al, (%r8) leaq 0x8(%r15), %rdi xorl %esi, %esi xorl %edx, %edx movl $0x1, %ecx callq 0x126b0 leaq 0x8(%r15), %rdi leaq 0x20(%r15), %r12 movl 0x20(%r15), %esi movq 0x28(%r15), %rdx callq 0x12651 movq %r12, %rdi callq 0x12733 movl 0x8(%r15), %edx movq 0x10(%r15), %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rcx callq 0x15b14 movq %r15, %rdi callq 0x125c0 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
ssz_add_builders: push r15 push r14 push r12 push rbx push rax mov rbx, rsi mov r14, rdi lea r15, [rsp+28h+arg_0] mov rdi, [rdi] call find_def test rax, rax jz short loc_15A50 cmp dword ptr [rax+8], 7 jnz short loc_15A50 mov ecx, [rax+18h] test rcx, rcx jz short loc_15A1B mov rdx, [rax+10h] mov rsi, [r15] xor eax, eax loc_159FA: cmp rdx, rsi jz short loc_15A36 cmp dword ptr [rsi+8], 2 jnz short loc_15A0F mov rdi, [rdx+10h] cmp rdi, [rsi+10h] jz short loc_15A36 loc_15A0F: inc rax add rdx, 20h ; ' ' cmp rcx, rax jnz short loc_159FA loc_15A1B: xor eax, eax call c4_get_log_level test eax, eax jz short loc_15A8B mov rdi, r15 mov rsi, r14 mov rdx, rbx call ssz_add_builders_cold_1 jmp short loc_15A8B loc_15A36: lea r8, [rsp+28h+var_21] mov [r8], al lea rdi, [r15+8] xor esi, esi xor edx, edx mov ecx, 1 call buffer_splice loc_15A50: lea rdi, [r15+8] lea r12, [r15+20h] mov esi, [r15+20h] mov rdx, [r15+28h] call buffer_append mov rdi, r12 call buffer_free mov edx, [r15+8] mov r15, [r15+10h] mov rdi, r14 mov rsi, rbx mov rcx, r15 call ssz_add_bytes mov rdi, r15 call safe_free loc_15A8B: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long ssz_add_builders( _QWORD **a1, _QWORD *a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, _QWORD *a7, unsigned int a8, long long a9, long long a10, unsigned int a11, long long a12) { long long v12; // rax _QWORD *v13; // rbx _QWORD *v15; // rdi long long def; // rax _QWORD *v17; // rdx long long v18; // rcx long long v19; // rax long long result; // rax long long v21; // rcx long long v22; // r8 int v23; // r9d long long v24; // r15 _BYTE v25[33]; // [rsp+1h] [rbp-21h] BYREF v25[0] = HIBYTE(v12); v13 = a2; v15 = *a1; def = find_def(v15); if ( !def || *(_DWORD *)(def + 8) != 7 ) { LABEL_12: buffer_append(&a8, a11, a12); buffer_free((long long)&a11); v24 = a9; ssz_add_bytes(a1, v13, a8, a9); return safe_free(v24); } v18 = *(unsigned int *)(def + 24); if ( *(_DWORD *)(def + 24) ) { v17 = *(_QWORD **)(def + 16); a2 = a7; v19 = 0LL; while ( v17 != a7 ) { if ( *((_DWORD *)a7 + 2) == 2 ) { v15 = (_QWORD *)v17[2]; if ( v15 == (_QWORD *)a7[2] ) break; } ++v19; v17 += 4; if ( v18 == v19 ) goto LABEL_9; } v25[0] = v19; buffer_splice((long long)&a8, 0LL, 0, 1u, (long long)v25); goto LABEL_12; } LABEL_9: result = c4_get_log_level(v15, a2, v17); if ( (_DWORD)result ) return ssz_add_builders_cold_1(&a7, a1, (int)v13, v21, v22, v23); return result; }
ssz_add_builders: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI LEA R15,[RSP + 0x30] MOV RDI,qword ptr [RDI] CALL 0x00115a97 TEST RAX,RAX JZ 0x00115a50 CMP dword ptr [RAX + 0x8],0x7 JNZ 0x00115a50 MOV ECX,dword ptr [RAX + 0x18] TEST RCX,RCX JZ 0x00115a1b MOV RDX,qword ptr [RAX + 0x10] MOV RSI,qword ptr [R15] XOR EAX,EAX LAB_001159fa: CMP RDX,RSI JZ 0x00115a36 CMP dword ptr [RSI + 0x8],0x2 JNZ 0x00115a0f MOV RDI,qword ptr [RDX + 0x10] CMP RDI,qword ptr [RSI + 0x10] JZ 0x00115a36 LAB_00115a0f: INC RAX ADD RDX,0x20 CMP RCX,RAX JNZ 0x001159fa LAB_00115a1b: XOR EAX,EAX CALL 0x00117e1b TEST EAX,EAX JZ 0x00115a8b MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00105615 JMP 0x00115a8b LAB_00115a36: LEA R8,[RSP + 0x7] MOV byte ptr [R8],AL LEA RDI,[R15 + 0x8] XOR ESI,ESI XOR EDX,EDX MOV ECX,0x1 CALL 0x001126b0 LAB_00115a50: LEA RDI,[R15 + 0x8] LEA R12,[R15 + 0x20] MOV ESI,dword ptr [R15 + 0x20] MOV RDX,qword ptr [R15 + 0x28] CALL 0x00112651 MOV RDI,R12 CALL 0x00112733 MOV EDX,dword ptr [R15 + 0x8] MOV R15,qword ptr [R15 + 0x10] MOV RDI,R14 MOV RSI,RBX MOV RCX,R15 CALL 0x00115b14 MOV RDI,R15 CALL 0x001125c0 LAB_00115a8b: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
void ssz_add_builders(int8 *param_1,int8 param_2) { void *__ptr; int iVar1; int8 in_RAX; long lVar2; ulong uVar3; long lVar4; int8 in_R9; long in_stack_00000008; int4 in_stack_00000010; void *in_stack_00000018; int4 in_stack_00000028; int8 in_stack_00000030; lVar2 = find_def(*param_1); if ((lVar2 == 0) || (*(int *)(lVar2 + 8) != 7)) { LAB_00115a50: buffer_append(&stack0x00000010,in_stack_00000028,in_stack_00000030); buffer_free(&stack0x00000028); __ptr = in_stack_00000018; ssz_add_bytes(param_1,param_2,in_stack_00000010,in_stack_00000018); safe_free(__ptr); } else { if ((ulong)*(uint *)(lVar2 + 0x18) != 0) { lVar4 = *(long *)(lVar2 + 0x10); uVar3 = 0; do { if ((lVar4 == in_stack_00000008) || ((*(int *)(in_stack_00000008 + 8) == 2 && (*(long *)(lVar4 + 0x10) == *(long *)(in_stack_00000008 + 0x10))))) { buffer_splice(&stack0x00000010,0,0,1,&stack0xffffffffffffffdf,in_R9, CONCAT17((char)uVar3,(int7)in_RAX)); goto LAB_00115a50; } uVar3 = uVar3 + 1; lVar4 = lVar4 + 0x20; } while (*(uint *)(lVar2 + 0x18) != uVar3); } iVar1 = c4_get_log_level(); if (iVar1 != 0) { ssz_add_builders_cold_1(&stack0x00000008,param_1,param_2); } } return; }
66
my_large_malloc
eloqsql/mysys/my_largepage.c
uchar *my_large_malloc(size_t *size, myf my_flags) { uchar *ptr= NULL; #ifdef _WIN32 DWORD alloc_type= MEM_COMMIT | MEM_RESERVE; size_t orig_size= *size; DBUG_ENTER("my_large_malloc"); if (my_use_large_pages) { alloc_type|= MEM_LARGE_PAGES; /* Align block size to my_large_page_size */ *size= MY_ALIGN(*size, (size_t) my_large_page_size); } ptr= VirtualAlloc(NULL, *size, alloc_type, PAGE_READWRITE); if (!ptr) { if (my_flags & MY_WME) { if (my_use_large_pages) { my_printf_error(EE_OUTOFMEMORY, "Couldn't allocate %zu bytes (MEM_LARGE_PAGES page " "size %zu); Windows error %lu", MYF(ME_WARNING | ME_ERROR_LOG_ONLY), *size, my_large_page_size, GetLastError()); } else { my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG), *size); } } if (my_use_large_pages) { *size= orig_size; ptr= VirtualAlloc(NULL, *size, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE); if (!ptr && my_flags & MY_WME) { my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG), *size); } } } #elif defined(HAVE_MMAP) int mapflag; int page_i= 0; size_t large_page_size= 0; size_t aligned_size= *size; DBUG_ENTER("my_large_malloc"); while (1) { mapflag= MAP_PRIVATE | OS_MAP_ANON; if (my_use_large_pages) { large_page_size= my_next_large_page_size(*size, &page_i); /* this might be 0, in which case we do a standard mmap */ if (large_page_size) { #if defined(MAP_HUGETLB) /* linux 2.6.32 */ mapflag|= MAP_HUGETLB; #if defined(MAP_HUGE_SHIFT) /* Linux-3.8+ */ mapflag|= my_bit_log2_size_t(large_page_size) << MAP_HUGE_SHIFT; #else # warning "No explicit large page (HUGETLB pages) support in Linux < 3.8" #endif #elif defined(MAP_ALIGNED) mapflag|= MAP_ALIGNED(my_bit_log2_size_t(large_page_size)); #if defined(MAP_ALIGNED_SUPER) mapflag|= MAP_ALIGNED_SUPER; #endif #endif aligned_size= MY_ALIGN(*size, (size_t) large_page_size); } else { aligned_size= *size; } } ptr= mmap(NULL, aligned_size, PROT_READ | PROT_WRITE, mapflag, -1, 0); if (ptr == (void*) -1) { ptr= NULL; if (my_flags & MY_WME) { if (large_page_size) { my_printf_error(EE_OUTOFMEMORY, "Couldn't allocate %zu bytes (Large/HugeTLB memory " "page size %zu); errno %u; continuing to smaller size", MYF(ME_WARNING | ME_ERROR_LOG_ONLY), aligned_size, large_page_size, errno); } else { my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_ERROR_LOG), aligned_size); } } /* try next smaller memory size */ if (large_page_size && errno == ENOMEM) continue; /* other errors are more serious */ break; } else /* success */ { if (large_page_size) { /* we do need to record the adjustment so that munmap gets called with the right size. This is only the case for HUGETLB pages. */ *size= aligned_size; } break; } if (large_page_size == 0) { break; /* no more options to try */ } } #else DBUG_RETURN(my_malloc_lock(*size, my_flags)); #endif /* defined(HAVE_MMAP) */ if (ptr != NULL) { MEM_MAKE_DEFINED(ptr, *size); } DBUG_RETURN(ptr); }
O3
c
my_large_malloc: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, -0x30(%rbp) movq (%rdi), %rbx xorl %r14d, %r14d xorl %r13d, %r13d movl $0x22, %ecx cmpb $0x1, 0xb63dbe(%rip) # 0xc13230 jne 0xaf4c9 movq -0x30(%rbp), %rax movq (%rax), %rbx cmpl $0x9, %r14d movl $0x8, %edx cmovgel %r14d, %edx cmpl $0x7, %r14d jg 0xaf4c6 movslq %r14d, %rsi leaq 0xb63da8(%rip), %rax # 0xc13240 leaq (%rax,%rsi,8), %rdi subq %rdx, %rsi xorl %eax, %eax movq (%rdi), %r13 testq %r13, %r13 je 0xaf4c3 cmpq %rbx, %r13 jbe 0xaf546 decq %rax addq $0x8, %rdi cmpq %rax, %rsi jne 0xaf4a1 movl %edx, %r14d jmp 0xaf4c6 subl %eax, %r14d xorl %r13d, %r13d xorl %edi, %edi movq %rbx, %rsi movl $0x3, %edx movl $0xffffffff, %r8d # imm = 0xFFFFFFFF xorl %r9d, %r9d callq 0x2a5e0 cmpq $-0x1, %rax jne 0xaf8bd testb $0x10, %r15b jne 0xaf504 testq %r13, %r13 je 0xaf8b8 callq 0x2a7a0 movq %rax, %r12 jmp 0xaf536 testq %r13, %r13 je 0xaf8ce callq 0x2a7a0 movq %rax, %r12 movl (%rax), %r9d movl $0x880, %edx # imm = 0x880 movl $0x5, %edi leaq 0x35de2(%rip), %rsi # 0xe530b movq %rbx, %rcx movq %r13, %r8 xorl %eax, %eax callq 0xa31cd cmpl $0xc, (%r12) je 0xaf466 jmp 0xaf8b8 movq %r13, %rcx shrq $0x20, %rcx jne 0xaf583 cmpq $0x10000, %r13 # imm = 0x10000 jae 0xaf5ba cmpq $0x100, %r13 # imm = 0x100 jae 0xaf61b cmpq $0x10, %r13 jae 0xaf6a9 cmpq $0x4, %r13 jae 0xaf7e3 movl %r13d, %ecx shrl %ecx jmp 0xaf891 movq %r13, %rdx shrq $0x30, %rdx jne 0xaf5ec movq %r13, %rdx shrq $0x28, %rdx jne 0xaf640 movq %r13, %rdx shrq $0x24, %rdx jne 0xaf6cd movq %r13, %rdx shrq $0x22, %rdx jne 0xaf7f4 shrl %ecx jmp 0xaf88e cmpq $0x1000000, %r13 # imm = 0x1000000 jae 0xaf662 cmpq $0x100000, %r13 # imm = 0x100000 jae 0xaf6f8 cmpq $0x40000, %r13 # imm = 0x40000 jae 0xaf80c movl %r13d, %ecx shrl $0x11, %ecx jmp 0xaf870 movq %r13, %rdx shrq $0x38, %rdx jne 0xaf687 movq %r13, %rdx shrq $0x34, %rdx jne 0xaf71f movq %r13, %rdx shrq $0x32, %rdx jne 0xaf81d shrl $0x11, %ecx jmp 0xaf88b cmpq $0x1000, %r13 # imm = 0x1000 jae 0xaf74a cmpq $0x400, %r13 # imm = 0x400 jae 0xaf832 movl %r13d, %ecx shrl $0x9, %ecx jmp 0xaf841 movq %r13, %rdx shrq $0x2c, %rdx jne 0xaf771 movq %r13, %rdx shrq $0x2a, %rdx jne 0xaf846 shrl $0x9, %ecx jmp 0xaf859 cmpq $0x10000000, %r13 # imm = 0x10000000 jae 0xaf79c cmpq $0x4000000, %r13 # imm = 0x4000000 jae 0xaf85e movl %r13d, %ecx shrl $0x19, %ecx jmp 0xaf86d movq %r13, %rdx shrq $0x3c, %rdx jne 0xaf7bf movq %r13, %rdx shrq $0x3a, %rdx jne 0xaf875 shrl $0x19, %ecx jmp 0xaf888 cmpq $0x80, %r13 movl $0x3, %edx sbbl $0x0, %edx movl %r13d, %ecx shrl $0x5, %ecx cmpq $0x40, %r13 cmovael %edx, %ecx orl $0x4, %ecx jmp 0xaf891 movq %r13, %rdx shrq $0x26, %rdx movq %r13, %rsi shrq $0x27, %rsi cmpq $0x1, %rsi movl $0x3, %esi sbbl $0x0, %esi shrl $0x5, %ecx testq %rdx, %rdx cmovnel %esi, %ecx orl $0x4, %ecx jmp 0xaf88e cmpq $0x800000, %r13 # imm = 0x800000 movl $0x3, %edx sbbl $0x0, %edx movl %r13d, %ecx shrl $0x15, %ecx cmpq $0x400000, %r13 # imm = 0x400000 cmovael %edx, %ecx orl $0x4, %ecx jmp 0xaf870 movq %r13, %rdx shrq $0x36, %rdx movq %r13, %rsi shrq $0x37, %rsi cmpq $0x1, %rsi movl $0x3, %esi sbbl $0x0, %esi shrl $0x15, %ecx testq %rdx, %rdx cmovnel %esi, %ecx orl $0x4, %ecx jmp 0xaf88b cmpq $0x8000, %r13 # imm = 0x8000 movl $0x3, %edx sbbl $0x0, %edx movl %r13d, %ecx shrl $0xd, %ecx cmpq $0x4000, %r13 # imm = 0x4000 cmovael %edx, %ecx orl $0x4, %ecx jmp 0xaf841 movq %r13, %rdx shrq $0x2e, %rdx movq %r13, %rsi shrq $0x2f, %rsi cmpq $0x1, %rsi movl $0x3, %esi sbbl $0x0, %esi shrl $0xd, %ecx testq %rdx, %rdx cmovnel %esi, %ecx orl $0x4, %ecx jmp 0xaf859 movl %r13d, %edx notl %edx shrl $0x1f, %edx xorl $0x3, %edx movl %r13d, %ecx shrl $0x1d, %ecx cmpq $0x40000000, %r13 # imm = 0x40000000 cmovael %edx, %ecx orl $0x4, %ecx jmp 0xaf86d movq %r13, %rdx shrq $0x3e, %rdx xorl %esi, %esi testq %r13, %r13 setns %sil xorl $0x3, %esi shrl $0x1d, %ecx testq %rdx, %rdx cmovnel %esi, %ecx orl $0x4, %ecx jmp 0xaf888 cmpq $0x8, %r13 movl $0x3, %ecx sbbl $0x0, %ecx jmp 0xaf891 movq %r13, %rcx shrq $0x23, %rcx cmpq $0x1, %rcx movl $0x3, %ecx sbbl $0x0, %ecx jmp 0xaf88e cmpq $0x80000, %r13 # imm = 0x80000 movl $0x3, %ecx sbbl $0x0, %ecx jmp 0xaf870 movq %r13, %rcx shrq $0x33, %rcx cmpq $0x1, %rcx movl $0x3, %ecx sbbl $0x0, %ecx jmp 0xaf88b cmpq $0x800, %r13 # imm = 0x800 movl $0x3, %ecx sbbl $0x0, %ecx addl $0x8, %ecx jmp 0xaf891 movq %r13, %rcx shrq $0x2b, %rcx cmpq $0x1, %rcx movl $0x3, %ecx sbbl $0x0, %ecx addl $0x8, %ecx jmp 0xaf88e cmpq $0x8000000, %r13 # imm = 0x8000000 movl $0x3, %ecx sbbl $0x0, %ecx addl $0x8, %ecx addl $0x10, %ecx jmp 0xaf891 movq %r13, %rcx shrq $0x3b, %rcx cmpq $0x1, %rcx movl $0x3, %ecx sbbl $0x0, %ecx addl $0x8, %ecx addl $0x10, %ecx addl $0x20, %ecx movl %r14d, %r14d subq %rax, %r14 incq %r14 shll $0x1a, %ecx orl $0x40022, %ecx # imm = 0x40022 leaq (%rbx,%r13), %rax decq %rax movq %r13, %rbx negq %rbx andq %rax, %rbx jmp 0xaf4c9 xorl %r12d, %r12d jmp 0xaf8e5 movq %rax, %r12 testq %r13, %r13 je 0xaf8e5 movq -0x30(%rbp), %rax movq %rbx, (%rax) jmp 0xaf8e5 xorl %r12d, %r12d movl $0x44, %esi movl $0x5, %edi movq %rbx, %rdx xorl %eax, %eax callq 0xa30b3 movq %r12, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_large_malloc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rsi mov [rbp+var_30], rdi mov rbx, [rdi] xor r14d, r14d xor r13d, r13d loc_AF466: mov ecx, 22h ; '"' cmp cs:my_use_large_pages, 1 jnz short loc_AF4C9 mov rax, [rbp+var_30] mov rbx, [rax] cmp r14d, 9 mov edx, 8 cmovge edx, r14d cmp r14d, 7 jg short loc_AF4C6 movsxd rsi, r14d lea rax, my_large_page_sizes lea rdi, [rax+rsi*8] sub rsi, rdx xor eax, eax loc_AF4A1: mov r13, [rdi] test r13, r13 jz short loc_AF4C3 cmp r13, rbx jbe loc_AF546 dec rax add rdi, 8 cmp rsi, rax jnz short loc_AF4A1 mov r14d, edx jmp short loc_AF4C6 loc_AF4C3: sub r14d, eax loc_AF4C6: xor r13d, r13d loc_AF4C9: xor edi, edi mov rsi, rbx mov edx, 3 mov r8d, 0FFFFFFFFh xor r9d, r9d call _mmap64 cmp rax, 0FFFFFFFFFFFFFFFFh jnz loc_AF8BD test r15b, 10h jnz short loc_AF504 test r13, r13 jz loc_AF8B8 call ___errno_location mov r12, rax jmp short loc_AF536 loc_AF504: test r13, r13 jz loc_AF8CE call ___errno_location mov r12, rax mov r9d, [rax] mov edx, 880h mov edi, 5 lea rsi, aCouldnTAllocat; "Couldn't allocate %zu bytes (Large/Huge"... mov rcx, rbx mov r8, r13 xor eax, eax call my_printf_error loc_AF536: cmp dword ptr [r12], 0Ch jz loc_AF466 jmp loc_AF8B8 loc_AF546: mov rcx, r13 shr rcx, 20h jnz short loc_AF583 cmp r13, 10000h jnb short loc_AF5BA cmp r13, 100h jnb loc_AF61B cmp r13, 10h jnb loc_AF6A9 cmp r13, 4 jnb loc_AF7E3 mov ecx, r13d shr ecx, 1 jmp loc_AF891 loc_AF583: mov rdx, r13 shr rdx, 30h jnz short loc_AF5EC mov rdx, r13 shr rdx, 28h jnz loc_AF640 mov rdx, r13 shr rdx, 24h jnz loc_AF6CD mov rdx, r13 shr rdx, 22h jnz loc_AF7F4 shr ecx, 1 jmp loc_AF88E loc_AF5BA: cmp r13, 1000000h jnb loc_AF662 cmp r13, offset xmmword_100000 jnb loc_AF6F8 cmp r13, offset loc_40000 jnb loc_AF80C mov ecx, r13d shr ecx, 11h jmp loc_AF870 loc_AF5EC: mov rdx, r13 shr rdx, 38h jnz loc_AF687 mov rdx, r13 shr rdx, 34h jnz loc_AF71F mov rdx, r13 shr rdx, 32h jnz loc_AF81D shr ecx, 11h jmp loc_AF88B loc_AF61B: cmp r13, 1000h jnb loc_AF74A cmp r13, 400h jnb loc_AF832 mov ecx, r13d shr ecx, 9 jmp loc_AF841 loc_AF640: mov rdx, r13 shr rdx, 2Ch jnz loc_AF771 mov rdx, r13 shr rdx, 2Ah jnz loc_AF846 shr ecx, 9 jmp loc_AF859 loc_AF662: cmp r13, 10000000h jnb loc_AF79C cmp r13, 4000000h jnb loc_AF85E mov ecx, r13d shr ecx, 19h jmp loc_AF86D loc_AF687: mov rdx, r13 shr rdx, 3Ch jnz loc_AF7BF mov rdx, r13 shr rdx, 3Ah jnz loc_AF875 shr ecx, 19h jmp loc_AF888 loc_AF6A9: cmp r13, 80h mov edx, 3 sbb edx, 0 mov ecx, r13d shr ecx, 5 cmp r13, 40h ; '@' cmovnb ecx, edx or ecx, 4 jmp loc_AF891 loc_AF6CD: mov rdx, r13 shr rdx, 26h mov rsi, r13 shr rsi, 27h cmp rsi, 1 mov esi, 3 sbb esi, 0 shr ecx, 5 test rdx, rdx cmovnz ecx, esi or ecx, 4 jmp loc_AF88E loc_AF6F8: cmp r13, offset unk_800000 mov edx, 3 sbb edx, 0 mov ecx, r13d shr ecx, 15h cmp r13, offset unk_400000 cmovnb ecx, edx or ecx, 4 jmp loc_AF870 loc_AF71F: mov rdx, r13 shr rdx, 36h mov rsi, r13 shr rsi, 37h cmp rsi, 1 mov esi, 3 sbb esi, 0 shr ecx, 15h test rdx, rdx cmovnz ecx, esi or ecx, 4 jmp loc_AF88B loc_AF74A: cmp r13, 8000h mov edx, 3 sbb edx, 0 mov ecx, r13d shr ecx, 0Dh cmp r13, 4000h cmovnb ecx, edx or ecx, 4 jmp loc_AF841 loc_AF771: mov rdx, r13 shr rdx, 2Eh mov rsi, r13 shr rsi, 2Fh cmp rsi, 1 mov esi, 3 sbb esi, 0 shr ecx, 0Dh test rdx, rdx cmovnz ecx, esi or ecx, 4 jmp loc_AF859 loc_AF79C: mov edx, r13d not edx shr edx, 1Fh xor edx, 3 mov ecx, r13d shr ecx, 1Dh cmp r13, 40000000h cmovnb ecx, edx or ecx, 4 jmp loc_AF86D loc_AF7BF: mov rdx, r13 shr rdx, 3Eh xor esi, esi test r13, r13 setns sil xor esi, 3 shr ecx, 1Dh test rdx, rdx cmovnz ecx, esi or ecx, 4 jmp loc_AF888 loc_AF7E3: cmp r13, 8 mov ecx, 3 sbb ecx, 0 jmp loc_AF891 loc_AF7F4: mov rcx, r13 shr rcx, 23h cmp rcx, 1 mov ecx, 3 sbb ecx, 0 jmp loc_AF88E loc_AF80C: cmp r13, 80000h mov ecx, 3 sbb ecx, 0 jmp short loc_AF870 loc_AF81D: mov rcx, r13 shr rcx, 33h cmp rcx, 1 mov ecx, 3 sbb ecx, 0 jmp short loc_AF88B loc_AF832: cmp r13, 800h mov ecx, 3 sbb ecx, 0 loc_AF841: add ecx, 8 jmp short loc_AF891 loc_AF846: mov rcx, r13 shr rcx, 2Bh cmp rcx, 1 mov ecx, 3 sbb ecx, 0 loc_AF859: add ecx, 8 jmp short loc_AF88E loc_AF85E: cmp r13, 8000000h mov ecx, 3 sbb ecx, 0 loc_AF86D: add ecx, 8 loc_AF870: add ecx, 10h jmp short loc_AF891 loc_AF875: mov rcx, r13 shr rcx, 3Bh cmp rcx, 1 mov ecx, 3 sbb ecx, 0 loc_AF888: add ecx, 8 loc_AF88B: add ecx, 10h loc_AF88E: add ecx, 20h ; ' ' loc_AF891: mov r14d, r14d sub r14, rax inc r14 shl ecx, 1Ah or ecx, 40022h lea rax, [rbx+r13] dec rax mov rbx, r13 neg rbx and rbx, rax jmp loc_AF4C9 loc_AF8B8: xor r12d, r12d jmp short loc_AF8E5 loc_AF8BD: mov r12, rax test r13, r13 jz short loc_AF8E5 mov rax, [rbp+var_30] mov [rax], rbx jmp short loc_AF8E5 loc_AF8CE: xor r12d, r12d mov esi, 44h ; 'D' mov edi, 5 mov rdx, rbx xor eax, eax call my_error loc_AF8E5: mov rax, r12 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_large_malloc( unsigned long long *a1, char a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { unsigned long long v10; // rbx int v11; // r14d unsigned long long v12; // r13 long long v13; // rcx long long v14; // rdx unsigned long long *v15; // rdi long long v16; // rax long long v17; // rax _DWORD *v18; // r12 __m128 v19; // xmm4 __m128 v20; // xmm5 int v21; // ecx int v22; // ecx int v23; // ecx int v24; // ecx int v25; // ecx int v26; // ecx int v27; // ecx int v28; // ecx unsigned int v29; // ecx int v30; // ecx unsigned int v31; // ecx int v32; // ecx unsigned int v33; // ecx int v34; // ecx unsigned int v35; // ecx int v36; // ecx long long v37; // r12 unsigned long long *v39; // [rsp+0h] [rbp-30h] v39 = a1; v10 = *a1; v11 = 0; v12 = 0LL; while ( 1 ) { v13 = 34LL; if ( my_use_large_pages == 1 ) { v10 = *v39; v14 = 8LL; if ( v11 >= 9 ) v14 = (unsigned int)v11; if ( v11 > 7 ) { LABEL_12: v12 = 0LL; } else { v15 = &my_large_page_sizes[v11]; v16 = 0LL; while ( 1 ) { v12 = *v15; if ( !*v15 ) { v11 -= v16; goto LABEL_12; } if ( v12 <= v10 ) break; --v16; ++v15; if ( v11 - v14 == v16 ) { v11 = v14; goto LABEL_12; } } if ( HIDWORD(v12) ) { if ( HIWORD(v12) ) { if ( HIBYTE(v12) ) { if ( v12 >> 60 ) { v36 = HIDWORD(v12) >> 29; if ( v12 >> 62 ) v36 = ((v12 & 0x8000000000000000LL) == 0LL) ^ 3; v28 = v36 | 4; } else if ( v12 >> 58 ) { v28 = 3 - (v12 >> 59 == 0); } else { v28 = HIDWORD(v12) >> 25; } v24 = v28 + 8; } else if ( v12 >> 52 ) { v32 = HIDWORD(v12) >> 21; if ( v12 >> 54 ) v32 = 3 - (v12 >> 55 == 0); v24 = v32 | 4; } else if ( v12 >> 50 ) { v24 = 3 - (v12 >> 51 == 0); } else { v24 = HIDWORD(v12) >> 17; } v22 = v24 + 16; } else if ( v12 >> 40 ) { if ( v12 >> 44 ) { v34 = HIDWORD(v12) >> 13; if ( v12 >> 46 ) v34 = 3 - (v12 >> 47 == 0); v26 = v34 | 4; } else if ( v12 >> 42 ) { v26 = 3 - (v12 >> 43 == 0); } else { v26 = HIDWORD(v12) >> 9; } v22 = v26 + 8; } else if ( v12 >> 36 ) { v30 = HIDWORD(v12) >> 5; if ( v12 >> 38 ) v30 = 3 - (v12 >> 39 == 0); v22 = v30 | 4; } else if ( v12 >> 34 ) { v22 = 3 - (v12 >> 35 == 0); } else { v22 = HIDWORD(v12) >> 1; } v21 = v22 + 32; } else if ( v12 >= 0x10000 ) { if ( v12 >= 0x1000000 ) { if ( v12 >= 0x10000000 ) { v35 = (unsigned int)v12 >> 29; if ( v12 >= 0x40000000 ) v35 = ((v12 & 0x80000000) == 0LL) ^ 3; v27 = v35 | 4; } else if ( v12 >= 0x4000000 ) { v27 = 3 - (v12 < 0x8000000); } else { v27 = (unsigned int)v12 >> 25; } v23 = v27 + 8; } else if ( v12 >= (unsigned long long)&xmmword_100000 ) { v31 = (unsigned int)v12 >> 21; if ( v12 >= (unsigned long long)&unk_400000 ) v31 = 3 - (v12 < (unsigned long long)&unk_800000); v23 = v31 | 4; } else if ( v12 >= (unsigned long long)&loc_40000 ) { v23 = 3 - (v12 < 0x80000); } else { v23 = (unsigned int)v12 >> 17; } v21 = v23 + 16; } else if ( v12 >= 0x100 ) { if ( v12 >= 0x1000 ) { v33 = (unsigned int)v12 >> 13; if ( v12 >= 0x4000 ) v33 = 3 - (v12 < 0x8000); v25 = v33 | 4; } else if ( v12 >= 0x400 ) { v25 = 3 - (v12 < 0x800); } else { v25 = (unsigned int)v12 >> 9; } v21 = v25 + 8; } else if ( v12 >= 0x10 ) { v29 = (unsigned int)v12 >> 5; if ( v12 >= 0x40 ) v29 = 3 - (v12 < 0x80); v21 = v29 | 4; } else if ( v12 >= 4 ) { v21 = 3 - (v12 < 8); } else { v21 = (unsigned int)v12 >> 1; } v11 = v11 - v16 + 1; v13 = (v21 << 26) | 0x40022u; v10 = (v10 + v12 - 1) & -(long long)v12; } } v17 = mmap64(0LL, v10, 3LL, v13, 0xFFFFFFFFLL, 0LL, v39); if ( v17 != -1 ) break; if ( (a2 & 0x10) != 0 ) { if ( !v12 ) { v37 = 0LL; my_error(5u, 68LL, v10); return v37; } v18 = (_DWORD *)__errno_location(0LL); my_printf_error( 5, (long long)"Couldn't allocate %zu bytes (Large/HugeTLB memory page size %zu); errno %u; continuing to smaller size", 2176, v10, v12, (unsigned int)*v18, a3, a4, a5, a6, v19, v20, a9, a10, (char)v39); } else { if ( !v12 ) return 0LL; v18 = (_DWORD *)__errno_location(0LL); } if ( *v18 != 12 ) return 0LL; } v37 = v17; if ( v12 ) *v39 = v10; return v37; }
my_large_malloc: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RSI MOV qword ptr [RBP + -0x30],RDI MOV RBX,qword ptr [RDI] XOR R14D,R14D XOR R13D,R13D LAB_001af466: MOV ECX,0x22 CMP byte ptr [0x00d13230],0x1 JNZ 0x001af4c9 MOV RAX,qword ptr [RBP + -0x30] MOV RBX,qword ptr [RAX] CMP R14D,0x9 MOV EDX,0x8 CMOVGE EDX,R14D CMP R14D,0x7 JG 0x001af4c6 MOVSXD RSI,R14D LEA RAX,[0xd13240] LEA RDI,[RAX + RSI*0x8] SUB RSI,RDX XOR EAX,EAX LAB_001af4a1: MOV R13,qword ptr [RDI] TEST R13,R13 JZ 0x001af4c3 CMP R13,RBX JBE 0x001af546 DEC RAX ADD RDI,0x8 CMP RSI,RAX JNZ 0x001af4a1 MOV R14D,EDX JMP 0x001af4c6 LAB_001af4c3: SUB R14D,EAX LAB_001af4c6: XOR R13D,R13D LAB_001af4c9: XOR EDI,EDI MOV RSI,RBX MOV EDX,0x3 MOV R8D,0xffffffff XOR R9D,R9D CALL 0x0012a5e0 CMP RAX,-0x1 JNZ 0x001af8bd TEST R15B,0x10 JNZ 0x001af504 TEST R13,R13 JZ 0x001af8b8 CALL 0x0012a7a0 MOV R12,RAX JMP 0x001af536 LAB_001af504: TEST R13,R13 JZ 0x001af8ce CALL 0x0012a7a0 MOV R12,RAX MOV R9D,dword ptr [RAX] MOV EDX,0x880 MOV EDI,0x5 LEA RSI,[0x1e530b] MOV RCX,RBX MOV R8,R13 XOR EAX,EAX CALL 0x001a31cd LAB_001af536: CMP dword ptr [R12],0xc JZ 0x001af466 JMP 0x001af8b8 LAB_001af546: MOV RCX,R13 SHR RCX,0x20 JNZ 0x001af583 CMP R13,0x10000 JNC 0x001af5ba CMP R13,0x100 JNC 0x001af61b CMP R13,0x10 JNC 0x001af6a9 CMP R13,0x4 JNC 0x001af7e3 MOV ECX,R13D SHR ECX,0x1 JMP 0x001af891 LAB_001af583: MOV RDX,R13 SHR RDX,0x30 JNZ 0x001af5ec MOV RDX,R13 SHR RDX,0x28 JNZ 0x001af640 MOV RDX,R13 SHR RDX,0x24 JNZ 0x001af6cd MOV RDX,R13 SHR RDX,0x22 JNZ 0x001af7f4 SHR ECX,0x1 JMP 0x001af88e LAB_001af5ba: CMP R13,0x1000000 JNC 0x001af662 CMP R13,0x100000 JNC 0x001af6f8 CMP R13,0x40000 JNC 0x001af80c MOV ECX,R13D SHR ECX,0x11 JMP 0x001af870 LAB_001af5ec: MOV RDX,R13 SHR RDX,0x38 JNZ 0x001af687 MOV RDX,R13 SHR RDX,0x34 JNZ 0x001af71f MOV RDX,R13 SHR RDX,0x32 JNZ 0x001af81d SHR ECX,0x11 JMP 0x001af88b LAB_001af61b: CMP R13,0x1000 JNC 0x001af74a CMP R13,0x400 JNC 0x001af832 MOV ECX,R13D SHR ECX,0x9 JMP 0x001af841 LAB_001af640: MOV RDX,R13 SHR RDX,0x2c JNZ 0x001af771 MOV RDX,R13 SHR RDX,0x2a JNZ 0x001af846 SHR ECX,0x9 JMP 0x001af859 LAB_001af662: CMP R13,0x10000000 JNC 0x001af79c CMP R13,0x4000000 JNC 0x001af85e MOV ECX,R13D SHR ECX,0x19 JMP 0x001af86d LAB_001af687: MOV RDX,R13 SHR RDX,0x3c JNZ 0x001af7bf MOV RDX,R13 SHR RDX,0x3a JNZ 0x001af875 SHR ECX,0x19 JMP 0x001af888 LAB_001af6a9: CMP R13,0x80 MOV EDX,0x3 SBB EDX,0x0 MOV ECX,R13D SHR ECX,0x5 CMP R13,0x40 CMOVNC ECX,EDX OR ECX,0x4 JMP 0x001af891 LAB_001af6cd: MOV RDX,R13 SHR RDX,0x26 MOV RSI,R13 SHR RSI,0x27 CMP RSI,0x1 MOV ESI,0x3 SBB ESI,0x0 SHR ECX,0x5 TEST RDX,RDX CMOVNZ ECX,ESI OR ECX,0x4 JMP 0x001af88e LAB_001af6f8: CMP R13,0x800000 MOV EDX,0x3 SBB EDX,0x0 MOV ECX,R13D SHR ECX,0x15 CMP R13,0x400000 CMOVNC ECX,EDX OR ECX,0x4 JMP 0x001af870 LAB_001af71f: MOV RDX,R13 SHR RDX,0x36 MOV RSI,R13 SHR RSI,0x37 CMP RSI,0x1 MOV ESI,0x3 SBB ESI,0x0 SHR ECX,0x15 TEST RDX,RDX CMOVNZ ECX,ESI OR ECX,0x4 JMP 0x001af88b LAB_001af74a: CMP R13,0x8000 MOV EDX,0x3 SBB EDX,0x0 MOV ECX,R13D SHR ECX,0xd CMP R13,0x4000 CMOVNC ECX,EDX OR ECX,0x4 JMP 0x001af841 LAB_001af771: MOV RDX,R13 SHR RDX,0x2e MOV RSI,R13 SHR RSI,0x2f CMP RSI,0x1 MOV ESI,0x3 SBB ESI,0x0 SHR ECX,0xd TEST RDX,RDX CMOVNZ ECX,ESI OR ECX,0x4 JMP 0x001af859 LAB_001af79c: MOV EDX,R13D NOT EDX SHR EDX,0x1f XOR EDX,0x3 MOV ECX,R13D SHR ECX,0x1d CMP R13,0x40000000 CMOVNC ECX,EDX OR ECX,0x4 JMP 0x001af86d LAB_001af7bf: MOV RDX,R13 SHR RDX,0x3e XOR ESI,ESI TEST R13,R13 SETNS SIL XOR ESI,0x3 SHR ECX,0x1d TEST RDX,RDX CMOVNZ ECX,ESI OR ECX,0x4 JMP 0x001af888 LAB_001af7e3: CMP R13,0x8 MOV ECX,0x3 SBB ECX,0x0 JMP 0x001af891 LAB_001af7f4: MOV RCX,R13 SHR RCX,0x23 CMP RCX,0x1 MOV ECX,0x3 SBB ECX,0x0 JMP 0x001af88e LAB_001af80c: CMP R13,0x80000 MOV ECX,0x3 SBB ECX,0x0 JMP 0x001af870 LAB_001af81d: MOV RCX,R13 SHR RCX,0x33 CMP RCX,0x1 MOV ECX,0x3 SBB ECX,0x0 JMP 0x001af88b LAB_001af832: CMP R13,0x800 MOV ECX,0x3 SBB ECX,0x0 LAB_001af841: ADD ECX,0x8 JMP 0x001af891 LAB_001af846: MOV RCX,R13 SHR RCX,0x2b CMP RCX,0x1 MOV ECX,0x3 SBB ECX,0x0 LAB_001af859: ADD ECX,0x8 JMP 0x001af88e LAB_001af85e: CMP R13,0x8000000 MOV ECX,0x3 SBB ECX,0x0 LAB_001af86d: ADD ECX,0x8 LAB_001af870: ADD ECX,0x10 JMP 0x001af891 LAB_001af875: MOV RCX,R13 SHR RCX,0x3b CMP RCX,0x1 MOV ECX,0x3 SBB ECX,0x0 LAB_001af888: ADD ECX,0x8 LAB_001af88b: ADD ECX,0x10 LAB_001af88e: ADD ECX,0x20 LAB_001af891: MOV R14D,R14D SUB R14,RAX INC R14 SHL ECX,0x1a OR ECX,0x40022 LEA RAX,[RBX + R13*0x1] DEC RAX MOV RBX,R13 NEG RBX AND RBX,RAX JMP 0x001af4c9 LAB_001af8b8: XOR R12D,R12D JMP 0x001af8e5 LAB_001af8bd: MOV R12,RAX TEST R13,R13 JZ 0x001af8e5 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RBX JMP 0x001af8e5 LAB_001af8ce: XOR R12D,R12D MOV ESI,0x44 MOV EDI,0x5 MOV RDX,RBX XOR EAX,EAX CALL 0x001a30b3 LAB_001af8e5: MOV RAX,R12 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void * my_large_malloc(ulong *param_1,ulong param_2) { long lVar1; void *pvVar2; int *piVar3; uint uVar4; ulong uVar5; ulong __len; ulong *puVar6; ulong uVar7; int iVar8; ulong uVar9; __len = *param_1; uVar9 = 0; uVar7 = 0; do { uVar4 = 0x22; if (my_use_large_pages == '\x01') { __len = *param_1; iVar8 = (int)uVar9; uVar5 = 8; if (8 < iVar8) { uVar5 = uVar9 & 0xffffffff; } uVar7 = uVar9; if (iVar8 < 8) { puVar6 = &my_large_page_sizes + iVar8; lVar1 = 0; do { uVar7 = *puVar6; if (uVar7 == 0) { uVar7 = (ulong)(uint)(iVar8 - (int)lVar1); break; } if (uVar7 <= __len) { if (uVar7 >> 0x20 == 0) { if (uVar7 < 0x10000) { if (uVar7 < 0x100) { if (uVar7 < 0x10) { if (uVar7 < 4) { uVar4 = (uint)(uVar7 >> 1) & 0x7fffffff; } else { uVar4 = 3 - (uVar7 < 8); } } else { uVar4 = (uint)(uVar7 >> 5) & 0x7ffffff; if (0x3f < uVar7) { uVar4 = 3 - (uVar7 < 0x80); } uVar4 = uVar4 | 4; } } else { if (uVar7 < 0x1000) { if (uVar7 < 0x400) { uVar4 = (uint)(uVar7 >> 9) & 0x7fffff; } else { uVar4 = 3 - (uVar7 < 0x800); } } else { uVar4 = (uint)(uVar7 >> 0xd) & 0x7ffff; if (0x3fff < uVar7) { uVar4 = 3 - (uVar7 < 0x8000); } uVar4 = uVar4 | 4; } uVar4 = uVar4 + 8; } } else { if (uVar7 < 0x1000000) { if (uVar7 < 0x100000) { if (uVar7 < 0x40000) { uVar4 = (uint)(uVar7 >> 0x11) & 0x7fff; } else { uVar4 = 3 - (uVar7 < 0x80000); } } else { uVar4 = (uint)(uVar7 >> 0x15) & 0x7ff; if (0x3fffff < uVar7) { uVar4 = 3 - (uVar7 < 0x800000); } uVar4 = uVar4 | 4; } } else { if (uVar7 < 0x10000000) { if (uVar7 < 0x4000000) { uVar4 = (uint)(uVar7 >> 0x19) & 0x7f; } else { uVar4 = 3 - (uVar7 < 0x8000000); } } else { uVar4 = (uint)(uVar7 >> 0x1d) & 7; if (0x3fffffff < uVar7) { uVar4 = ~(uint)uVar7 >> 0x1f ^ 3; } uVar4 = uVar4 | 4; } uVar4 = uVar4 + 8; } uVar4 = uVar4 + 0x10; } } else { uVar4 = (uint)(uVar7 >> 0x20); if (uVar7 >> 0x30 == 0) { if (uVar7 >> 0x28 == 0) { if (uVar7 >> 0x24 == 0) { if (uVar7 >> 0x22 == 0) { uVar4 = uVar4 >> 1; } else { uVar4 = 3 - (uVar7 >> 0x23 == 0); } } else { uVar4 = uVar4 >> 5; if (uVar7 >> 0x26 != 0) { uVar4 = 3 - (uVar7 >> 0x27 == 0); } uVar4 = uVar4 | 4; } } else { if (uVar7 >> 0x2c == 0) { if (uVar7 >> 0x2a == 0) { uVar4 = uVar4 >> 9; } else { uVar4 = 3 - (uVar7 >> 0x2b == 0); } } else { uVar4 = uVar4 >> 0xd; if (uVar7 >> 0x2e != 0) { uVar4 = 3 - (uVar7 >> 0x2f == 0); } uVar4 = uVar4 | 4; } uVar4 = uVar4 + 8; } } else { if (uVar7 >> 0x38 == 0) { if (uVar7 >> 0x34 == 0) { if (uVar7 >> 0x32 == 0) { uVar4 = uVar4 >> 0x11; } else { uVar4 = 3 - (uVar7 >> 0x33 == 0); } } else { uVar4 = uVar4 >> 0x15; if (uVar7 >> 0x36 != 0) { uVar4 = 3 - (uVar7 >> 0x37 == 0); } uVar4 = uVar4 | 4; } } else { if (uVar7 >> 0x3c == 0) { if (uVar7 >> 0x3a == 0) { uVar4 = uVar4 >> 0x19; } else { uVar4 = 3 - (uVar7 >> 0x3b == 0); } } else { uVar4 = uVar4 >> 0x1d; if (uVar7 >> 0x3e != 0) { uVar4 = -1 < (long)uVar7 ^ 3; } uVar4 = uVar4 | 4; } uVar4 = uVar4 + 8; } uVar4 = uVar4 + 0x10; } uVar4 = uVar4 + 0x20; } uVar9 = ((uVar9 & 0xffffffff) - lVar1) + 1; uVar4 = uVar4 << 0x1a | 0x40022; __len = -uVar7 & (__len + uVar7) - 1; goto LAB_001af4c9; } lVar1 = lVar1 + -1; puVar6 = puVar6 + 1; uVar7 = uVar5; } while ((long)iVar8 - uVar5 != lVar1); } uVar9 = uVar7; uVar7 = 0; } LAB_001af4c9: pvVar2 = mmap64((void *)0x0,__len,3,uVar4,-1,0); if (pvVar2 != (void *)0xffffffffffffffff) { if (uVar7 != 0) { *param_1 = __len; return pvVar2; } return pvVar2; } if ((param_2 & 0x10) == 0) { if (uVar7 == 0) { return (void *)0x0; } piVar3 = __errno_location(); } else { if (uVar7 == 0) { my_error(5,0x44,__len); return (void *)0x0; } piVar3 = __errno_location(); my_printf_error(5, "Couldn\'t allocate %zu bytes (Large/HugeTLB memory page size %zu); errno %u; continuing to smaller size" ,0x880,__len,uVar7); } if (*piVar3 != 0xc) { return (void *)0x0; } } while( true ); }
67
unlink_block
eloqsql/storage/maria/ma_pagecache.c
static void unlink_block(PAGECACHE *pagecache, PAGECACHE_BLOCK_LINK *block) { DBUG_ENTER("unlink_block"); DBUG_PRINT("pagecache", ("unlink %p", block)); DBUG_ASSERT(block->next_used != NULL); if (block->next_used == block) { /* The list contains only one member */ pagecache->used_last= pagecache->used_ins= NULL; } else { block->next_used->prev_used= block->prev_used; *block->prev_used= block->next_used; if (pagecache->used_last == block) pagecache->used_last= STRUCT_PTR(PAGECACHE_BLOCK_LINK, next_used, block->prev_used); if (pagecache->used_ins == block) pagecache->used_ins= STRUCT_PTR(PAGECACHE_BLOCK_LINK, next_used, block->prev_used); } block->next_used= NULL; KEYCACHE_THREAD_TRACE("unlink_block"); #if defined(PAGECACHE_DEBUG) KEYCACHE_DBUG_ASSERT(pagecache->blocks_available != 0); pagecache->blocks_available--; KEYCACHE_DBUG_PRINT("pagecache", ("unlinked block: %p (%u) status: %x #requests: %u #available: %u", block, PCBLOCK_NUMBER(pagecache, block), block->status, block->requests, pagecache->blocks_available)); PCBLOCK_INFO(block); #endif DBUG_VOID_RETURN; }
O0
c
unlink_block: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x9c99e jmp 0x9c9a0 jmp 0x9c9a2 movq -0x10(%rbp), %rax movq (%rax), %rax cmpq -0x10(%rbp), %rax jne 0x9c9cf movq -0x8(%rbp), %rax movq $0x0, 0xc0(%rax) movq -0x8(%rbp), %rax movq $0x0, 0xb8(%rax) jmp 0x9ca3e movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq (%rax), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax cmpq -0x10(%rbp), %rax jne 0x9ca18 movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xb8(%rax) movq -0x8(%rbp), %rax movq 0xc0(%rax), %rax cmpq -0x10(%rbp), %rax jne 0x9ca3c movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xc0(%rax) jmp 0x9ca3e movq -0x10(%rbp), %rax movq $0x0, (%rax) jmp 0x9ca4b popq %rbp retq nopl (%rax)
unlink_block: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_9C99E: jmp short $+2 loc_9C9A0: jmp short $+2 loc_9C9A2: mov rax, [rbp+var_10] mov rax, [rax] cmp rax, [rbp+var_10] jnz short loc_9C9CF mov rax, [rbp+var_8] mov qword ptr [rax+0C0h], 0 mov rax, [rbp+var_8] mov qword ptr [rax+0B8h], 0 jmp short loc_9CA3E loc_9C9CF: mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_10] mov rax, [rax] mov [rax+8], rcx mov rax, [rbp+var_10] mov rcx, [rax] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax], rcx mov rax, [rbp+var_8] mov rax, [rax+0B8h] cmp rax, [rbp+var_10] jnz short loc_9CA18 mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_8] mov [rax+0B8h], rcx loc_9CA18: mov rax, [rbp+var_8] mov rax, [rax+0C0h] cmp rax, [rbp+var_10] jnz short loc_9CA3C mov rax, [rbp+var_10] mov rcx, [rax+8] mov rax, [rbp+var_8] mov [rax+0C0h], rcx loc_9CA3C: jmp short $+2 loc_9CA3E: mov rax, [rbp+var_10] mov qword ptr [rax], 0 jmp short $+2 loc_9CA4B: pop rbp retn
_QWORD * unlink_block(long long a1, _QWORD *a2) { _QWORD *result; // rax if ( (_QWORD *)*a2 == a2 ) { *(_QWORD *)(a1 + 192) = 0LL; *(_QWORD *)(a1 + 184) = 0LL; } else { *(_QWORD *)(*a2 + 8LL) = a2[1]; *(_QWORD *)a2[1] = *a2; if ( *(_QWORD **)(a1 + 184) == a2 ) *(_QWORD *)(a1 + 184) = a2[1]; if ( *(_QWORD **)(a1 + 192) == a2 ) *(_QWORD *)(a1 + 192) = a2[1]; } result = a2; *a2 = 0LL; return result; }
unlink_block: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x0019c99e LAB_0019c99e: JMP 0x0019c9a0 LAB_0019c9a0: JMP 0x0019c9a2 LAB_0019c9a2: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0019c9cf MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xc0],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb8],0x0 JMP 0x0019ca3e LAB_0019c9cf: 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 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 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0019ca18 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xb8],RCX LAB_0019ca18: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xc0] CMP RAX,qword ptr [RBP + -0x10] JNZ 0x0019ca3c MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xc0],RCX LAB_0019ca3c: JMP 0x0019ca3e LAB_0019ca3e: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 JMP 0x0019ca4b LAB_0019ca4b: POP RBP RET
void unlink_block(long param_1,long *param_2) { if ((long *)*param_2 == param_2) { *(int8 *)(param_1 + 0xc0) = 0; *(int8 *)(param_1 + 0xb8) = 0; } else { *(long *)(*param_2 + 8) = param_2[1]; *(long *)param_2[1] = *param_2; if (*(long **)(param_1 + 0xb8) == param_2) { *(long *)(param_1 + 0xb8) = param_2[1]; } if (*(long **)(param_1 + 0xc0) == param_2) { *(long *)(param_1 + 0xc0) = param_2[1]; } } *param_2 = 0; return; }
68
fmt::v11::basic_memory_buffer<char, 500ul, fmt::v11::detail::allocator<char>>::grow(fmt::v11::detail::buffer<char>&, unsigned long)
zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format.h
static FMT_CONSTEXPR20 void grow(detail::buffer<T>& buf, size_t size) { detail::abort_fuzzing_if(size > 5000); auto& self = static_cast<basic_memory_buffer&>(buf); const size_t max_size = std::allocator_traits<Allocator>::max_size(self.alloc_); size_t old_capacity = buf.capacity(); size_t new_capacity = old_capacity + old_capacity / 2; if (size > new_capacity) new_capacity = size; else if (new_capacity > max_size) new_capacity = max_of(size, max_size); T* old_data = buf.data(); T* new_data = self.alloc_.allocate(new_capacity); // Suppress a bogus -Wstringop-overflow in gcc 13.1 (#3481). detail::assume(buf.size() <= new_capacity); // The following code doesn't throw, so the raw pointer above doesn't leak. memcpy(new_data, old_data, buf.size() * sizeof(T)); self.set(new_data, new_capacity); // deallocate must not throw according to the standard, but even if it does, // the buffer already uses the new storage and will deallocate it in // destructor. if (old_data != self.store_) self.alloc_.deallocate(old_data, old_capacity); }
O1
c
fmt::v11::basic_memory_buffer<char, 500ul, fmt::v11::detail::allocator<char>>::grow(fmt::v11::detail::buffer<char>&, unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx addq $0xa0, %rdi movq 0x10(%rbx), %rax movq %rax, %r14 shrq %r14 addq %rax, %r14 cmpq %rsi, %r14 jae 0x44bc1 movq %rsi, %r14 jmp 0x44bdb movq %r14, %rax shrq $0x3e, %rax je 0x44bdb movabsq $0x3fffffffffffffff, %r14 # imm = 0x3FFFFFFFFFFFFFFF cmpq %r14, %rsi cmovaq %rsi, %r14 movq (%rbx), %r15 movq %r14, %rsi callq 0x44c2c movq %rax, %r12 movq 0x8(%rbx), %rdx shlq $0x2, %rdx movq %rax, %rdi movq %r15, %rsi callq 0xf810 movq %r12, (%rbx) movq %r14, 0x10(%rbx) addq $0x20, %rbx cmpq %rbx, %r15 je 0x44c1f movq %r15, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0xfc50 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZN3fmt3v1119basic_memory_bufferIjLm32ENS0_6detail9allocatorIjEEE4growERNS2_6bufferIjEEm: push r15 push r14 push r12 push rbx push rax mov rbx, rdi add rdi, 0A0h mov rax, [rbx+10h] mov r14, rax shr r14, 1 add r14, rax cmp r14, rsi jnb short loc_44BC1 mov r14, rsi jmp short loc_44BDB loc_44BC1: mov rax, r14 shr rax, 3Eh jz short loc_44BDB mov r14, 3FFFFFFFFFFFFFFFh cmp rsi, r14 cmova r14, rsi loc_44BDB: mov r15, [rbx] mov rsi, r14 call _ZN3fmt3v116detail9allocatorIjE8allocateEm; fmt::v11::detail::allocator<uint>::allocate(ulong) mov r12, rax mov rdx, [rbx+8] shl rdx, 2 mov rdi, rax mov rsi, r15 call _memcpy mov [rbx], r12 mov [rbx+10h], r14 add rbx, 20h ; ' ' cmp r15, rbx jz short loc_44C1F mov rdi, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 jmp _free loc_44C1F: add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long fmt::v11::basic_memory_buffer<unsigned int,32ul,fmt::v11::detail::allocator<unsigned int>>::grow( long long *a1, unsigned long long a2) { _QWORD *v3; // rdi unsigned long long v4; // r14 long long *v5; // r15 long long v6; // r12 long long result; // rax v3 = a1 + 20; v4 = a1[2] + ((unsigned long long)a1[2] >> 1); if ( v4 >= a2 ) { if ( v4 >> 62 ) { v4 = 0x3FFFFFFFFFFFFFFFLL; if ( a2 > 0x3FFFFFFFFFFFFFFFLL ) v4 = a2; } } else { v4 = a2; } v5 = (long long *)*a1; v6 = fmt::v11::detail::allocator<unsigned int>::allocate(v3, v4); result = memcpy(v6, v5, 4 * a1[1]); *a1 = v6; a1[2] = v4; if ( v5 != a1 + 4 ) return free(v5); return result; }
grow: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI ADD RDI,0xa0 MOV RAX,qword ptr [RBX + 0x10] MOV R14,RAX SHR R14,0x1 ADD R14,RAX CMP R14,RSI JNC 0x00144bc1 MOV R14,RSI JMP 0x00144bdb LAB_00144bc1: MOV RAX,R14 SHR RAX,0x3e JZ 0x00144bdb MOV R14,0x3fffffffffffffff CMP RSI,R14 CMOVA R14,RSI LAB_00144bdb: MOV R15,qword ptr [RBX] MOV RSI,R14 CALL 0x00144c2c MOV R12,RAX MOV RDX,qword ptr [RBX + 0x8] SHL RDX,0x2 MOV RDI,RAX MOV RSI,R15 CALL 0x0010f810 MOV qword ptr [RBX],R12 MOV qword ptr [RBX + 0x10],R14 ADD RBX,0x20 CMP R15,RBX JZ 0x00144c1f MOV RDI,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 JMP 0x0010fc50 LAB_00144c1f: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* fmt::v11::basic_memory_buffer<unsigned int, 32ul, fmt::v11::detail::allocator<unsigned int> >::grow(fmt::v11::detail::buffer<unsigned int>&, unsigned long) */ void fmt::v11::basic_memory_buffer<unsigned_int,32ul,fmt::v11::detail::allocator<unsigned_int>>:: grow(buffer *param_1,ulong param_2) { buffer *__src; void *__dest; ulong uVar1; ulong uVar2; uVar1 = (*(ulong *)(param_1 + 0x10) >> 1) + *(ulong *)(param_1 + 0x10); uVar2 = param_2; if (((param_2 <= uVar1) && (uVar2 = uVar1, uVar1 >> 0x3e != 0)) && (uVar2 = 0x3fffffffffffffff, 0x3fffffffffffffff < param_2)) { uVar2 = param_2; } __src = *(buffer **)param_1; __dest = (void *)detail::allocator<unsigned_int>::allocate ((allocator<unsigned_int> *)(param_1 + 0xa0),uVar2); memcpy(__dest,__src,*(long *)(param_1 + 8) << 2); *(void **)param_1 = __dest; *(ulong *)(param_1 + 0x10) = uVar2; if (__src == param_1 + 0x20) { return; } free(__src); return; }
69
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double)
monkey531[P]llama/common/json.hpp
boundaries compute_boundaries(FloatType value) { JSON_ASSERT(std::isfinite(value)); JSON_ASSERT(value > 0); // Convert the IEEE representation into a diyfp. // // If v is denormal: // value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1)) // If v is normalized: // value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1)) static_assert(std::numeric_limits<FloatType>::is_iec559, "internal error: dtoa_short requires an IEEE-754 floating-point implementation"); constexpr int kPrecision = std::numeric_limits<FloatType>::digits; // = p (includes the hidden bit) constexpr int kBias = std::numeric_limits<FloatType>::max_exponent - 1 + (kPrecision - 1); constexpr int kMinExp = 1 - kBias; constexpr std::uint64_t kHiddenBit = std::uint64_t{1} << (kPrecision - 1); // = 2^(p-1) using bits_type = typename std::conditional<kPrecision == 24, std::uint32_t, std::uint64_t >::type; const auto bits = static_cast<std::uint64_t>(reinterpret_bits<bits_type>(value)); const std::uint64_t E = bits >> (kPrecision - 1); const std::uint64_t F = bits & (kHiddenBit - 1); const bool is_denormal = E == 0; const diyfp v = is_denormal ? diyfp(F, kMinExp) : diyfp(F + kHiddenBit, static_cast<int>(E) - kBias); // Compute the boundaries m- and m+ of the floating-point value // v = f * 2^e. // // Determine v- and v+, the floating-point predecessor and successor if v, // respectively. // // v- = v - 2^e if f != 2^(p-1) or e == e_min (A) // = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B) // // v+ = v + 2^e // // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_ // between m- and m+ round to v, regardless of how the input rounding // algorithm breaks ties. // // ---+-------------+-------------+-------------+-------------+--- (A) // v- m- v m+ v+ // // -----------------+------+------+-------------+-------------+--- (B) // v- m- v m+ v+ const bool lower_boundary_is_closer = F == 0 && E > 1; const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); const diyfp m_minus = lower_boundary_is_closer ? diyfp(4 * v.f - 1, v.e - 2) // (B) : diyfp(2 * v.f - 1, v.e - 1); // (A) // Determine the normalized w+ = m+. const diyfp w_plus = diyfp::normalize(m_plus); // Determine w- = m- such that e_(w-) = e_(w+). const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); return {diyfp::normalize(v), w_minus, w_plus}; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %xmm0, %rax movq %rax, %rcx btrq $0x3f, %rcx movabsq $0x7ff0000000000000, %rdx # imm = 0x7FF0000000000000 cmpq %rdx, %rcx jge 0xdce92 xorpd %xmm1, %xmm1 ucomisd %xmm1, %xmm0 jbe 0xdceae movq %rdi, %rbx movabsq $0x10000000000000, %rcx # imm = 0x10000000000000 decq %rcx andq %rax, %rcx movq %rax, %rdx shrq $0x34, %rdx movq %rcx, %r14 btsq $0x34, %r14 leal -0x433(%rdx), %esi testq %rdx, %rdx cmoveq %rcx, %r14 movl $0xfffffbce, %r15d # imm = 0xFFFFFBCE cmovnel %esi, %r15d testq %rcx, %rcx sete %cl shrq $0x35, %rax setne %al leaq (%r14,%r14), %rdx leal -0x1(%r15), %esi leaq (,%r14,4), %rdi testb %cl, %al cmoveq %rdx, %rdi leal -0x2(%r15), %eax cmovel %esi, %eax decq %rdi leaq 0x8(%rsp), %r12 movq %rdi, (%r12) movl %eax, 0x8(%r12) leaq 0x1(,%r14,2), %rdi callq 0xdd000 movq %rax, (%rsp) movl %edx, %ebp movq %r12, %rdi movl %edx, %esi callq 0xdd042 movq %rax, %r12 movl %edx, %r13d movq %r14, %rdi movl %r15d, %esi callq 0xdd000 movq %rax, (%rbx) movl %edx, 0x8(%rbx) movq %r12, 0x10(%rbx) movl %r13d, 0x18(%rbx) movq (%rsp), %rax movq %rax, 0x20(%rbx) movl %ebp, 0x28(%rbx) movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x384f3(%rip), %rdi # 0x11538c leaq 0x30bc3(%rip), %rdx # 0x10da63 leaq 0x3cbb1(%rip), %rcx # 0x119a58 movl $0x42cb, %esi # imm = 0x42CB jmp 0xdcec8 leaq 0x384d7(%rip), %rdi # 0x11538c leaq 0x30ba7(%rip), %rdx # 0x10da63 leaq 0x3ccae(%rip), %rcx # 0x119b71 movl $0x42cc, %esi # imm = 0x42CC xorl %eax, %eax callq 0x1e4f0
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18compute_boundariesIdEENS2_10boundariesET_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h movq rax, xmm0 mov rcx, rax btr rcx, 3Fh ; '?' mov rdx, 7FF0000000000000h cmp rcx, rdx jge loc_DCE92 xorpd xmm1, xmm1 ucomisd xmm0, xmm1 jbe loc_DCEAE mov rbx, rdi mov rcx, 10000000000000h dec rcx and rcx, rax mov rdx, rax shr rdx, 34h mov r14, rcx bts r14, 34h ; '4' lea esi, [rdx-433h] test rdx, rdx cmovz r14, rcx mov r15d, 0FFFFFBCEh cmovnz r15d, esi test rcx, rcx setz cl shr rax, 35h setnz al lea rdx, [r14+r14] lea esi, [r15-1] lea rdi, ds:0[r14*4] test al, cl cmovz rdi, rdx lea eax, [r15-2] cmovz eax, esi dec rdi lea r12, [rsp+48h+var_40] mov [r12], rdi mov [r12+8], eax lea rdi, ds:1[r14*2] call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) mov [rsp+48h+var_48], rax mov ebp, edx mov rdi, r12 mov esi, edx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp12normalize_toERKS3_i; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,int) mov r12, rax mov r13d, edx mov rdi, r14 mov esi, r15d call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp9normalizeES3_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) mov [rbx], rax mov [rbx+8], edx mov [rbx+10h], r12 mov [rbx+18h], r13d mov rax, [rsp+48h+var_48] mov [rbx+20h], rax mov [rbx+28h], ebp mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_DCE92: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aStdIsfiniteVal; "std::isfinite(value)" mov esi, 42CBh jmp short loc_DCEC8 loc_DCEAE: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aValue0; "value > 0" mov esi, 42CCh loc_DCEC8: xor eax, eax call _ggml_abort
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>( long long a1, double a2, long long a3, long long a4, long long a5, long long a6, long long a7, char a8, int a9, char a10, nlohmann::json_abi_v3_11_3::detail::dtoa_impl *a11) { long long v12; // r14 unsigned int v13; // r15d bool v14; // cl bool v15; // al long long v16; // rdi bool v17; // zf unsigned int v18; // eax unsigned int v19; // edx unsigned int v20; // ebp long long v21; // r12 int v22; // edx int v23; // r13d int v24; // edx int v26; // esi int v27; // edx int v28; // ecx int v29; // r8d int v30; // r9d long long v31; // [rsp+0h] [rbp-48h] long long v32; // [rsp+8h] [rbp-40h] BYREF unsigned int v33; // [rsp+10h] [rbp-38h] if ( (*(_QWORD *)&a2 & 0x7FFFFFFFFFFFFFFFuLL) >= 0x7FF0000000000000LL ) { v26 = 17099; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17099LL, "GGML_ASSERT(%s) failed", "std::isfinite(value)"); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( (int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v26, v27, v28, v29, v30, a8, a9, a10, a11); } if ( a2 <= 0.0 ) { v26 = 17100; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17100LL, "GGML_ASSERT(%s) failed", "value > 0"); return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2( (int)"/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v26, v27, v28, v29, v30, a8, a9, a10, a11); } v12 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL | 0x10000000000000LL; if ( !(*(_QWORD *)&a2 >> 52) ) v12 = *(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL; v13 = -1074; if ( *(_QWORD *)&a2 >> 52 ) v13 = (*(_QWORD *)&a2 >> 52) - 1075; v14 = (*(_QWORD *)&a2 & 0xFFFFFFFFFFFFFLL) == 0; v15 = *(_QWORD *)&a2 >> 53 != 0LL; v16 = 4 * v12; v17 = !v14 || !v15; if ( !v14 || !v15 ) v16 = 2 * v12; v18 = v13 - 2; if ( v17 ) v18 = v13 - 1; v32 = v16 - 1; v33 = v18; v31 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(2 * v12 + 1, v13 - 1); v20 = v19; v21 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize_to(&v32, v19); v23 = v22; *(_QWORD *)a1 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::normalize(v12, v13); *(_DWORD *)(a1 + 8) = v24; *(_QWORD *)(a1 + 16) = v21; *(_DWORD *)(a1 + 24) = v23; *(_QWORD *)(a1 + 32) = v31; *(_DWORD *)(a1 + 40) = v20; return a1; }
compute_boundaries<double>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOVQ RAX,XMM0 MOV RCX,RAX BTR RCX,0x3f MOV RDX,0x7ff0000000000000 CMP RCX,RDX JGE 0x001dce92 XORPD XMM1,XMM1 UCOMISD XMM0,XMM1 JBE 0x001dceae MOV RBX,RDI MOV RCX,0x10000000000000 DEC RCX AND RCX,RAX MOV RDX,RAX SHR RDX,0x34 MOV R14,RCX BTS R14,0x34 LEA ESI,[RDX + -0x433] TEST RDX,RDX CMOVZ R14,RCX MOV R15D,0xfffffbce CMOVNZ R15D,ESI TEST RCX,RCX SETZ CL SHR RAX,0x35 SETNZ AL LEA RDX,[R14 + R14*0x1] LEA ESI,[R15 + -0x1] LEA RDI,[R14*0x4] TEST AL,CL CMOVZ RDI,RDX LEA EAX,[R15 + -0x2] CMOVZ EAX,ESI DEC RDI LEA R12,[RSP + 0x8] MOV qword ptr [R12],RDI MOV dword ptr [R12 + 0x8],EAX LEA RDI,[0x1 + R14*0x2] CALL 0x001dd000 MOV qword ptr [RSP],RAX MOV EBP,EDX MOV RDI,R12 MOV ESI,EDX CALL 0x001dd042 MOV R12,RAX MOV R13D,EDX MOV RDI,R14 MOV ESI,R15D CALL 0x001dd000 MOV qword ptr [RBX],RAX MOV dword ptr [RBX + 0x8],EDX MOV qword ptr [RBX + 0x10],R12 MOV dword ptr [RBX + 0x18],R13D MOV RAX,qword ptr [RSP] MOV qword ptr [RBX + 0x20],RAX MOV dword ptr [RBX + 0x28],EBP MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001dce92: LEA RDI,[0x21538c] LEA RDX,[0x20da63] LEA RCX,[0x219a58] MOV ESI,0x42cb JMP 0x001dcec8 LAB_001dceae: LEA RDI,[0x21538c] LEA RDX,[0x20da63] LEA RCX,[0x219b71] MOV ESI,0x42cc LAB_001dcec8: XOR EAX,EAX CALL 0x0011e4f0
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::boundaries nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double>(double) */ dtoa_impl * __thiscall nlohmann::json_abi_v3_11_3::detail::dtoa_impl::compute_boundaries<double> (dtoa_impl *this,double param_1) { diyfp *pdVar1; char *pcVar2; int8 uVar3; diyfp *pdVar4; int iVar5; bool bVar6; int1 auVar7 [12]; int1 auVar8 [12]; int1 auVar9 [12]; long local_40; int local_38; if ((ulong)ABS(param_1) < 0x7ff0000000000000) { if (0.0 < param_1) { pdVar1 = (diyfp *)((ulong)param_1 & 0xfffffffffffff); bVar6 = (ulong)param_1 >> 0x34 == 0; pdVar4 = (diyfp *)((ulong)pdVar1 | 0x10000000000000); if (bVar6) { pdVar4 = pdVar1; } iVar5 = -0x432; if (!bVar6) { iVar5 = (uint)((ulong)param_1 >> 0x34) - 0x433; } bVar6 = (ulong)param_1 >> 0x35 == 0; local_40 = (long)pdVar4 * 4; if (bVar6 || pdVar1 != (diyfp *)0x0) { local_40 = (long)pdVar4 * 2; } local_38 = iVar5 + -2; if (bVar6 || pdVar1 != (diyfp *)0x0) { local_38 = iVar5 + -1; } local_40 = local_40 + -1; auVar7 = diyfp::normalize((diyfp *)((long)pdVar4 * 2 + 1)); auVar8 = diyfp::normalize_to((diyfp *)&local_40,auVar7._8_4_); auVar9 = diyfp::normalize(pdVar4,iVar5); *(int1 (*) [12])this = auVar9; *(int1 (*) [12])(this + 0x10) = auVar8; *(int1 (*) [12])(this + 0x20) = auVar7; return this; } pcVar2 = "value > 0"; uVar3 = 0x42cc; } else { pcVar2 = "std::isfinite(value)"; uVar3 = 0x42cb; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
70
maria_init_bulk_insert
eloqsql/storage/maria/ma_write.c
int maria_init_bulk_insert(MARIA_HA *info, size_t cache_size, ha_rows rows) { MARIA_SHARE *share= info->s; MARIA_KEYDEF *key=share->keyinfo; bulk_insert_param *params; uint i, num_keys, total_keylength; ulonglong key_map; DBUG_ENTER("_ma_init_bulk_insert"); DBUG_PRINT("enter",("cache_size: %lu", (ulong) cache_size)); DBUG_ASSERT(!info->bulk_insert && (!rows || rows >= MARIA_MIN_ROWS_TO_USE_BULK_INSERT)); maria_clear_all_keys_active(key_map); for (i=total_keylength=num_keys=0 ; i < share->base.keys ; i++) { if (! (key[i].flag & HA_NOSAME) && (share->base.auto_key != i + 1) && maria_is_key_active(share->state.key_map, i)) { num_keys++; maria_set_key_active(key_map, i); total_keylength+=key[i].maxlength+TREE_ELEMENT_EXTRA_SIZE; } } if (num_keys==0 || num_keys * (size_t) MARIA_MIN_SIZE_BULK_INSERT_TREE > cache_size) DBUG_RETURN(0); if (rows && rows*total_keylength < cache_size) cache_size= (size_t)rows; else cache_size/=total_keylength*16; info->bulk_insert=(TREE *) my_malloc(PSI_INSTRUMENT_ME, (sizeof(TREE)*share->base.keys+ sizeof(bulk_insert_param)*num_keys),MYF(0)); if (!info->bulk_insert) DBUG_RETURN(HA_ERR_OUT_OF_MEM); params=(bulk_insert_param *)(info->bulk_insert+share->base.keys); for (i=0 ; i < share->base.keys ; i++) { if (maria_is_key_active(key_map, i)) { params->info=info; params->keynr=i; /* Only allocate a 16'th of the buffer at a time */ init_tree(&info->bulk_insert[i], cache_size * key[i].maxlength, cache_size * key[i].maxlength, 0, (qsort_cmp2) keys_compare, keys_free, (void *)params++, MYF(0)); } else info->bulk_insert[i].root=0; } DBUG_RETURN(0); }
O3
c
maria_init_bulk_insert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, -0x30(%rbp) movq (%rdi), %r13 movl 0x3e8(%r13), %edi testq %rdi, %rdi je 0x595e6 movq %rdx, %rbx movq 0x570(%r13), %r14 xorl %ecx, %ecx xorl %r15d, %r15d xorl %r8d, %r8d xorl %eax, %eax imulq $0x118, %rcx, %r9 # imm = 0x118 testb $0x1, 0xa2(%r14,%r9) jne 0x594bb movl 0x3ec(%r13), %r10d leaq 0x1(%rcx), %rdx cmpq %r10, %rdx je 0x594c1 movq 0x140(%r13), %r11 movl $0x1, %r10d shlq %cl, %r10 btq %rcx, %r11 jae 0x594c1 addq %r14, %r9 incl %eax orq %r10, %r15 movzwl 0xae(%r9), %ecx addl %ecx, %r8d addl $0x20, %r8d jmp 0x594c1 incq %rcx movq %rcx, %rdx movq %rdx, %rcx cmpq %rdi, %rdx jne 0x5946a xorl %r12d, %r12d testl %eax, %eax je 0x595e9 movq %r15, -0x40(%rbp) movl %eax, %ecx movq %rcx, %rax shlq $0xe, %rax cmpq %rsi, %rax ja 0x595e9 testq %rbx, %rbx je 0x594fb movl %r8d, %eax imulq %rbx, %rax cmpq %rsi, %rax jb 0x5950a shll $0x4, %r8d movq %rsi, %rax xorl %edx, %edx divq %r8 movq %rax, %rbx imulq $0x298, %rdi, %rax # imm = 0x298 shlq $0x4, %rcx addq %rax, %rcx xorl %r12d, %r12d xorl %edi, %edi movq %rcx, %rsi xorl %edx, %edx callq 0xa11e5 movq %rax, %r15 movq -0x30(%rbp), %rax movq %r15, 0x310(%rax) testq %r15, %r15 je 0x595fb movl 0x3e8(%r13), %eax testq %rax, %rax je 0x595e9 movq %rbx, -0x38(%rbp) imulq $0x298, %rax, %rax # imm = 0x298 addq %rax, %r15 addq $0xae, %r14 xorl %r12d, %r12d xorl %ebx, %ebx movq -0x40(%rbp), %rax btq %rbx, %rax jae 0x595b6 movq -0x30(%rbp), %rax movq %rax, (%r15) movl %ebx, 0x8(%r15) movq 0x310(%rax), %rdi addq %r12, %rdi movzwl (%r14), %edx imulq -0x38(%rbp), %rdx movq %rdx, %rsi xorl %ecx, %ecx leaq 0x67(%rip), %r8 # 0x59603 leaq 0xa1(%rip), %r9 # 0x59644 pushq $0x0 pushq %r15 addq $0x10, %r15 callq 0xa5a74 addq $0x10, %rsp jmp 0x595c9 movq -0x30(%rbp), %rax movq 0x310(%rax), %rax movq $0x0, (%rax,%r12) incq %rbx movl 0x3e8(%r13), %eax addq $0x298, %r12 # imm = 0x298 addq $0x118, %r14 # imm = 0x118 cmpq %rax, %rbx jb 0x59568 xorl %r12d, %r12d movl %r12d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x80, %r12d jmp 0x595e9
maria_init_bulk_insert: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], rdi mov r13, [rdi] mov edi, [r13+3E8h] test rdi, rdi jz loc_595E6 mov rbx, rdx mov r14, [r13+570h] xor ecx, ecx xor r15d, r15d xor r8d, r8d xor eax, eax loc_5946A: imul r9, rcx, 118h test byte ptr [r14+r9+0A2h], 1 jnz short loc_594BB mov r10d, [r13+3ECh] lea rdx, [rcx+1] cmp rdx, r10 jz short loc_594C1 mov r11, [r13+140h] mov r10d, 1 shl r10, cl bt r11, rcx jnb short loc_594C1 add r9, r14 inc eax or r15, r10 movzx ecx, word ptr [r9+0AEh] add r8d, ecx add r8d, 20h ; ' ' jmp short loc_594C1 loc_594BB: inc rcx mov rdx, rcx loc_594C1: mov rcx, rdx cmp rdx, rdi jnz short loc_5946A xor r12d, r12d test eax, eax jz loc_595E9 mov [rbp+var_40], r15 mov ecx, eax mov rax, rcx shl rax, 0Eh cmp rax, rsi ja loc_595E9 test rbx, rbx jz short loc_594FB mov eax, r8d imul rax, rbx cmp rax, rsi jb short loc_5950A loc_594FB: shl r8d, 4 mov rax, rsi xor edx, edx div r8 mov rbx, rax loc_5950A: imul rax, rdi, 298h shl rcx, 4 add rcx, rax xor r12d, r12d xor edi, edi mov rsi, rcx xor edx, edx call my_malloc mov r15, rax mov rax, [rbp+var_30] mov [rax+310h], r15 test r15, r15 jz loc_595FB mov eax, [r13+3E8h] test rax, rax jz loc_595E9 mov [rbp+var_38], rbx imul rax, 298h add r15, rax add r14, 0AEh xor r12d, r12d xor ebx, ebx loc_59568: mov rax, [rbp+var_40] bt rax, rbx jnb short loc_595B6 mov rax, [rbp+var_30] mov [r15], rax mov [r15+8], ebx mov rdi, [rax+310h] add rdi, r12 movzx edx, word ptr [r14] imul rdx, [rbp+var_38] mov rsi, rdx xor ecx, ecx lea r8, keys_compare lea r9, keys_free push 0 push r15 add r15, 10h call init_tree add rsp, 10h jmp short loc_595C9 loc_595B6: mov rax, [rbp+var_30] mov rax, [rax+310h] mov qword ptr [rax+r12], 0 loc_595C9: inc rbx mov eax, [r13+3E8h] add r12, 298h add r14, 118h cmp rbx, rax jb short loc_59568 loc_595E6: xor r12d, r12d loc_595E9: mov eax, r12d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_595FB: mov r12d, 80h jmp short loc_595E9
long long maria_init_bulk_insert(_QWORD *a1, unsigned long long a2, unsigned long long a3) { long long v3; // r13 long long v4; // rdi long long v6; // r14 unsigned long long v7; // rcx long long v8; // r15 unsigned int v9; // r8d unsigned int v10; // eax unsigned long long v11; // rdx long long v12; // r11 unsigned int v13; // r12d long long v14; // r15 long long v15; // r15 unsigned __int16 *v16; // r14 long long v17; // r12 unsigned long long v18; // rbx long long v19; // rax long long v21; // [rsp-10h] [rbp-50h] long long v22; // [rsp+0h] [rbp-40h] int v23; // [rsp+8h] [rbp-38h] v3 = *a1; v4 = *(unsigned int *)(*a1 + 1000LL); if ( !v4 ) return 0; v6 = *(_QWORD *)(v3 + 1392); v7 = 0LL; v8 = 0LL; v9 = 0; v10 = 0; do { if ( (*(_BYTE *)(v6 + 280 * v7 + 162) & 1) != 0 ) { v11 = v7 + 1; } else { v11 = v7 + 1; if ( v7 + 1 != *(_DWORD *)(v3 + 1004) ) { v12 = *(_QWORD *)(v3 + 320); if ( _bittest64(&v12, v7) ) { ++v10; v8 |= 1LL << v7; v9 += *(unsigned __int16 *)(v6 + 280 * v7 + 174) + 32; } } } v7 = v11; } while ( v11 != v4 ); v13 = 0; if ( v10 ) { v22 = v8; if ( (unsigned long long)v10 << 14 <= a2 ) { if ( !a3 || a3 * v9 >= a2 ) a3 = a2 / (16 * v9); v13 = 0; v14 = my_malloc(0LL, 664 * v4 + 16LL * v10, 0LL); a1[98] = v14; if ( !v14 ) return 128; if ( *(_DWORD *)(v3 + 1000) ) { v23 = a3; v15 = 664LL * *(unsigned int *)(v3 + 1000) + v14; v16 = (unsigned __int16 *)(v6 + 174); v17 = 0LL; v18 = 0LL; do { v19 = v22; if ( _bittest64(&v19, v18) ) { *(_QWORD *)v15 = a1; *(_DWORD *)(v15 + 8) = v18; v21 = v15; v15 += 16LL; init_tree( v17 + *((_DWORD *)a1 + 196), v23 * *v16, v23 * *v16, 0, (unsigned int)keys_compare, (unsigned int)keys_free, v21, 0LL); } else { *(_QWORD *)(a1[98] + v17) = 0LL; } ++v18; v17 += 664LL; v16 += 140; } while ( v18 < *(unsigned int *)(v3 + 1000) ); return 0; } } } return v13; }
maria_init_bulk_insert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x30],RDI MOV R13,qword ptr [RDI] MOV EDI,dword ptr [R13 + 0x3e8] TEST RDI,RDI JZ 0x001595e6 MOV RBX,RDX MOV R14,qword ptr [R13 + 0x570] XOR ECX,ECX XOR R15D,R15D XOR R8D,R8D XOR EAX,EAX LAB_0015946a: IMUL R9,RCX,0x118 TEST byte ptr [R14 + R9*0x1 + 0xa2],0x1 JNZ 0x001594bb MOV R10D,dword ptr [R13 + 0x3ec] LEA RDX,[RCX + 0x1] CMP RDX,R10 JZ 0x001594c1 MOV R11,qword ptr [R13 + 0x140] MOV R10D,0x1 SHL R10,CL BT R11,RCX JNC 0x001594c1 ADD R9,R14 INC EAX OR R15,R10 MOVZX ECX,word ptr [R9 + 0xae] ADD R8D,ECX ADD R8D,0x20 JMP 0x001594c1 LAB_001594bb: INC RCX MOV RDX,RCX LAB_001594c1: MOV RCX,RDX CMP RDX,RDI JNZ 0x0015946a XOR R12D,R12D TEST EAX,EAX JZ 0x001595e9 MOV qword ptr [RBP + -0x40],R15 MOV ECX,EAX MOV RAX,RCX SHL RAX,0xe CMP RAX,RSI JA 0x001595e9 TEST RBX,RBX JZ 0x001594fb MOV EAX,R8D IMUL RAX,RBX CMP RAX,RSI JC 0x0015950a LAB_001594fb: SHL R8D,0x4 MOV RAX,RSI XOR EDX,EDX DIV R8 MOV RBX,RAX LAB_0015950a: IMUL RAX,RDI,0x298 SHL RCX,0x4 ADD RCX,RAX XOR R12D,R12D XOR EDI,EDI MOV RSI,RCX XOR EDX,EDX CALL 0x001a11e5 MOV R15,RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x310],R15 TEST R15,R15 JZ 0x001595fb MOV EAX,dword ptr [R13 + 0x3e8] TEST RAX,RAX JZ 0x001595e9 MOV qword ptr [RBP + -0x38],RBX IMUL RAX,RAX,0x298 ADD R15,RAX ADD R14,0xae XOR R12D,R12D XOR EBX,EBX LAB_00159568: MOV RAX,qword ptr [RBP + -0x40] BT RAX,RBX JNC 0x001595b6 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [R15],RAX MOV dword ptr [R15 + 0x8],EBX MOV RDI,qword ptr [RAX + 0x310] ADD RDI,R12 MOVZX EDX,word ptr [R14] IMUL RDX,qword ptr [RBP + -0x38] MOV RSI,RDX XOR ECX,ECX LEA R8,[0x159603] LEA R9,[0x159644] PUSH 0x0 PUSH R15 ADD R15,0x10 CALL 0x001a5a74 ADD RSP,0x10 JMP 0x001595c9 LAB_001595b6: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x310] MOV qword ptr [RAX + R12*0x1],0x0 LAB_001595c9: INC RBX MOV EAX,dword ptr [R13 + 0x3e8] ADD R12,0x298 ADD R14,0x118 CMP RBX,RAX JC 0x00159568 LAB_001595e6: XOR R12D,R12D LAB_001595e9: MOV EAX,R12D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001595fb: MOV R12D,0x80 JMP 0x001595e9
int8 maria_init_bulk_insert(long *param_1,ulong param_2,ulong param_3) { long lVar1; uint uVar2; long lVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; ushort *puVar8; ulong uVar9; int8 *puVar10; lVar1 = *param_1; uVar5 = (ulong)*(uint *)(lVar1 + 1000); if (uVar5 != 0) { lVar7 = *(long *)(lVar1 + 0x570); uVar4 = 0; uVar9 = 0; uVar6 = 0; uVar2 = 0; do { if ((((*(byte *)(lVar7 + 0xa2 + uVar4 * 0x118) & 1) == 0) && (uVar4 + 1 != (ulong)*(uint *)(lVar1 + 0x3ec))) && ((*(ulong *)(lVar1 + 0x140) >> (uVar4 & 0x3f) & 1) != 0)) { uVar2 = uVar2 + 1; uVar9 = uVar9 | 1L << ((byte)uVar4 & 0x3f); uVar6 = (ulong)((int)uVar6 + (uint)*(ushort *)(uVar4 * 0x118 + lVar7 + 0xae) + 0x20); } uVar4 = uVar4 + 1; } while (uVar4 != uVar5); if (uVar2 == 0) { return 0; } if (param_2 < (ulong)uVar2 << 0xe) { return 0; } if ((param_3 == 0) || (param_2 <= uVar6 * param_3)) { param_3 = param_2 / (uint)((int)uVar6 << 4); } lVar3 = my_malloc(0,(ulong)uVar2 * 0x10 + uVar5 * 0x298,0); param_1[0x62] = lVar3; if (lVar3 == 0) { return 0x80; } if ((ulong)*(uint *)(lVar1 + 1000) == 0) { return 0; } puVar10 = (int8 *)(lVar3 + (ulong)*(uint *)(lVar1 + 1000) * 0x298); puVar8 = (ushort *)(lVar7 + 0xae); lVar7 = 0; uVar5 = 0; do { if ((uVar9 >> (uVar5 & 0x3f) & 1) == 0) { *(int8 *)(param_1[0x62] + lVar7) = 0; } else { *puVar10 = param_1; *(int *)(puVar10 + 1) = (int)uVar5; init_tree(param_1[0x62] + lVar7,*puVar8 * param_3,*puVar8 * param_3,0,keys_compare,keys_free ,puVar10,0,uVar9,param_3); puVar10 = puVar10 + 2; } uVar5 = uVar5 + 1; lVar7 = lVar7 + 0x298; puVar8 = puVar8 + 0x8c; } while (uVar5 < *(uint *)(lVar1 + 1000)); } return 0; }
71
Catch::UnaryExpr<Circle*&>::streamReconstructedExpression(std::ostream&) const
11AgReS1SoR11[P]Graph/build_O1/_deps/catch2-src/src/catch2/../catch2/internal/catch_decomposer.hpp
void streamReconstructedExpression( std::ostream &os ) const override { os << Catch::Detail::stringify( m_lhs ); }
O1
cpp
Catch::UnaryExpr<Circle*&>::streamReconstructedExpression(std::ostream&) const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq 0x10(%rdi), %rax movq (%rax), %rsi leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x29346 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0x15590 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x29300 movq 0x18(%rsp), %rsi incq %rsi callq 0x154d0 addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x29326 movq 0x18(%rsp), %rsi incq %rsi callq 0x154d0 movq %rbx, %rdi callq 0x158e0
_ZNK5Catch9UnaryExprIRP8DotCloudE29streamReconstructedExpressionERSo: push r14 push rbx sub rsp, 28h mov rbx, rsi mov rax, [rdi+10h] mov rsi, [rax] lea r14, [rsp+38h+var_30] mov rdi, r14 call _ZN5Catch11StringMakerIP8DotCloudvE7convertIS1_EENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPT_; Catch::StringMaker<DotCloud *,void>::convert<DotCloud>(DotCloud *) mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_29300 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_29300: add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_29326 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_29326: mov rdi, rbx call __Unwind_Resume
void Catch::UnaryExpr<DotCloud *&>::streamReconstructedExpression(long long a1, long long a2) { void *v2[2]; // [rsp+8h] [rbp-30h] BYREF long long v3; // [rsp+18h] [rbp-20h] BYREF Catch::StringMaker<DotCloud *,void>::convert<DotCloud>(v2, **(_QWORD **)(a1 + 16)); std::__ostream_insert<char,std::char_traits<char>>(a2, v2[0], v2[1]); if ( v2[0] != &v3 ) operator delete(v2[0], v3 + 1); }
streamReconstructedExpression: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV RAX,qword ptr [RDI + 0x10] MOV RSI,qword ptr [RAX] LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00129346 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_001292dd: MOV RDI,RBX CALL 0x00115590 LAB_001292e5: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00129300 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001154d0 LAB_00129300: ADD RSP,0x28 POP RBX POP R14 RET
/* Catch::UnaryExpr<DotCloud*&>::streamReconstructedExpression(std::ostream&) const */ void __thiscall Catch::UnaryExpr<DotCloud*&>::streamReconstructedExpression (UnaryExpr<DotCloud*&> *this,ostream *param_1) { long *local_30; long local_28; long local_20 [2]; StringMaker<DotCloud*,void>::convert<DotCloud> ((StringMaker<DotCloud*,void> *)&local_30,(DotCloud *)**(int8 **)(this + 0x10)); /* try { // try from 001292dd to 001292e4 has its CatchHandler @ 00129308 */ std::__ostream_insert<char,std::char_traits<char>>(param_1,(char *)local_30,local_28); if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } return; }
72
js_proxy_define_own_property
bluesky950520[P]quickjs/quickjs.c
static int js_proxy_define_own_property(JSContext *ctx, JSValue obj, JSAtom prop, JSValue val, JSValue getter, JSValue setter, int flags) { JSProxyData *s; JSValue method, ret1, prop_val, desc_val; int res, ret; JSObject *p; JSValue args[3]; JSPropertyDescriptor desc; BOOL setting_not_configurable; s = get_proxy_method(ctx, &method, obj, JS_ATOM_defineProperty); if (!s) return -1; if (JS_IsUndefined(method)) { return JS_DefineProperty(ctx, s->target, prop, val, getter, setter, flags); } prop_val = JS_AtomToValue(ctx, prop); if (JS_IsException(prop_val)) { JS_FreeValue(ctx, method); return -1; } desc_val = js_create_desc(ctx, val, getter, setter, flags); if (JS_IsException(desc_val)) { JS_FreeValue(ctx, prop_val); JS_FreeValue(ctx, method); return -1; } args[0] = s->target; args[1] = prop_val; args[2] = desc_val; ret1 = JS_CallFree(ctx, method, s->handler, 3, args); JS_FreeValue(ctx, prop_val); JS_FreeValue(ctx, desc_val); if (JS_IsException(ret1)) return -1; ret = JS_ToBoolFree(ctx, ret1); if (!ret) { if (flags & JS_PROP_THROW) { JS_ThrowTypeError(ctx, "proxy: defineProperty exception"); return -1; } else { return 0; } } p = JS_VALUE_GET_OBJ(s->target); res = JS_GetOwnPropertyInternal(ctx, &desc, p, prop); if (res < 0) return -1; setting_not_configurable = ((flags & (JS_PROP_HAS_CONFIGURABLE | JS_PROP_CONFIGURABLE)) == JS_PROP_HAS_CONFIGURABLE); if (!res) { if (!p->extensible || setting_not_configurable) goto fail; } else { if (!check_define_prop_flags(desc.flags, flags) || ((desc.flags & JS_PROP_CONFIGURABLE) && setting_not_configurable)) { goto fail1; } if (flags & (JS_PROP_HAS_GET | JS_PROP_HAS_SET)) { if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE)) == JS_PROP_GETSET) { if ((flags & JS_PROP_HAS_GET) && !js_same_value(ctx, getter, desc.getter)) { goto fail1; } if ((flags & JS_PROP_HAS_SET) && !js_same_value(ctx, setter, desc.setter)) { goto fail1; } } } else if (flags & JS_PROP_HAS_VALUE) { if ((desc.flags & (JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE)) == JS_PROP_WRITABLE && !(flags & JS_PROP_WRITABLE)) { /* missing-proxy-check feature */ goto fail1; } else if ((desc.flags & (JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE)) == 0 && !js_same_value(ctx, val, desc.value)) { goto fail1; } } if (flags & JS_PROP_HAS_WRITABLE) { if ((desc.flags & (JS_PROP_GETSET | JS_PROP_CONFIGURABLE | JS_PROP_WRITABLE)) == JS_PROP_WRITABLE) { /* proxy-missing-checks */ fail1: js_free_desc(ctx, &desc); fail: JS_ThrowTypeError(ctx, "proxy: inconsistent defineProperty"); return -1; } } js_free_desc(ctx, &desc); } return 1; }
O1
c
js_proxy_define_own_property: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %r9, %r15 movq %r8, 0x28(%rsp) movl %ecx, %r13d movq %rdx, %rcx movq %rsi, %rdx movq %rdi, %rbx movl 0x140(%rsp), %ebp leaq 0x48(%rsp), %rsi movl $0x66, %r8d callq 0x3d3e0 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testq %rax, %rax je 0x4ec93 movq %rax, %r14 movq %r15, 0x20(%rsp) movq 0x50(%rsp), %r15 cmpl $0x3, %r15d jne 0x4ea64 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi movl %r13d, %ecx movq 0x28(%rsp), %r8 movq 0x20(%rsp), %r9 addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x254b9 movq %rbx, %rdi movl %r13d, %esi xorl %edx, %edx callq 0x2075a cmpl $0x6, %edx je 0x4ec7c movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) leaq 0x130(%rsp), %rax leaq 0x120(%rsp), %rcx movq (%rcx), %rdx movq %rdx, 0x98(%rsp) movq 0x8(%rcx), %rcx movq %rcx, 0x90(%rsp) movq (%rax), %rcx movq %rcx, 0xa8(%rsp) movq 0x8(%rax), %rax movq %rax, 0xa0(%rsp) movq 0x40(%rbx), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq %rbx, %rdi movl $0x1, %ecx callq 0x20f05 movq %rax, 0x18(%rsp) movq %rdx, 0x10(%rsp) movl %edx, %eax movq %rax, 0x30(%rsp) cmpq $0x6, %rax je 0x4ec69 btl $0xb, %ebp jae 0x4eb3c movq 0x98(%rsp), %r8 movq %r8, 0x58(%rsp) movq 0x90(%rsp), %r9 cmpl $-0x9, %r9d jb 0x4eb1e movq 0x58(%rsp), %rax incl (%rax) movl $0x7, (%rsp) movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl $0x42, %ecx callq 0x26abb btl $0xc, %ebp jae 0x4eb82 movq 0xa8(%rsp), %r8 movq %r8, 0x58(%rsp) movq 0xa0(%rsp), %r9 cmpl $-0x9, %r9d jb 0x4eb64 movq 0x58(%rsp), %rax incl (%rax) movl $0x7, (%rsp) movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl $0x43, %ecx callq 0x26abb btl $0xd, %ebp jae 0x4ebc8 movq 0x28(%rsp), %rax movq %rax, 0x58(%rsp) cmpl $-0x9, 0x20(%rsp) jb 0x4eba0 movq 0x58(%rsp), %rax incl (%rax) movl $0x7, (%rsp) movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl $0x41, %ecx movq 0x28(%rsp), %r8 movq 0x20(%rsp), %r9 callq 0x26abb btl $0x9, %ebp jae 0x4ebfc movl %ebp, %r8d shrl %r8d andl $0x1, %r8d movl $0x7, (%rsp) movl $0x1, %r9d movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl $0x3f, %ecx callq 0x26abb btl $0xa, %ebp jae 0x4ec31 movl %ebp, %r8d shrl $0x2, %r8d andl $0x1, %r8d movl $0x7, (%rsp) movl $0x1, %r9d movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl $0x40, %ecx callq 0x26abb btl $0x8, %ebp jae 0x4ec62 movl %ebp, %r8d andl $0x1, %r8d movl $0x7, (%rsp) movl $0x1, %r9d movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx movl $0x3e, %ecx callq 0x26abb cmpl $0x6, 0x30(%rsp) jne 0x4eca8 movq 0x18(%rbx), %rdi movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx callq 0x1d8c6 movq 0x48(%rsp), %rsi movq 0x18(%rbx), %rdi movq %r15, %rdx callq 0x1d8c6 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movl %r12d, %eax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movups (%r14), %xmm0 leaq 0xb0(%rsp), %rax movaps %xmm0, (%rax) movq 0x38(%rsp), %rcx movq %rcx, 0x10(%rax) movq 0x40(%rsp), %rcx movq %rcx, 0x18(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x20(%rax) movq 0x10(%rsp), %rcx movq %rcx, 0x28(%rax) movq 0x48(%rsp), %rsi movq 0x10(%r14), %rcx movq 0x18(%r14), %r8 movq %rax, (%rsp) movq %rbx, %rdi movq %r15, %rdx movl $0x3, %r9d callq 0x22c9d movq %rax, 0x30(%rsp) movq %rdx, %r15 movq 0x18(%rbx), %rdi movq 0x38(%rsp), %rsi movq 0x40(%rsp), %rdx callq 0x1d8c6 movq 0x18(%rbx), %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x1d8c6 cmpl $0x6, %r15d je 0x4ec93 movq %rbx, %rdi movq 0x30(%rsp), %rsi movq %r15, %rdx callq 0x22d0d testl %eax, %eax je 0x4edad movq (%r14), %r14 leaq 0x58(%rsp), %rsi movq %rbx, %rdi movq %r14, %rdx movl %r13d, %ecx callq 0x23bd9 testl %eax, %eax js 0x4ec93 movl %ebp, %r15d andl $0x101, %r15d # imm = 0x101 testl %eax, %eax je 0x4edd0 movl 0x58(%rsp), %r14d movl %r14d, %edi movl %ebp, %esi callq 0x2616c testl %eax, %eax je 0x4ed97 cmpl $0x100, %r15d # imm = 0x100 sete %al testb %r14b, %al je 0x4eded leaq 0x58(%rsp), %rsi movq %rbx, %rdi callq 0x3d8c3 leaq 0x5135b(%rip), %rsi # 0xa0106 jmp 0x4edc1 xorl %r12d, %r12d btl $0xe, %ebp jae 0x4ec93 leaq 0x51325(%rip), %rsi # 0xa00e6 movq %rbx, %rdi xorl %eax, %eax callq 0x22567 jmp 0x4ec8d cmpl $0x100, %r15d # imm = 0x100 je 0x4eda4 movb 0x5(%r14), %al movl $0x1, %r12d andb $0x1, %al jne 0x4ec93 jmp 0x4eda4 testl $0x1800, %ebp # imm = 0x1800 je 0x4ee5c andl $0x11, %r14d cmpl $0x10, %r14d jne 0x4eea2 btl $0xb, %ebp jae 0x4ee32 leaq 0x120(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movq 0x70(%rsp), %rcx movq 0x78(%rsp), %r8 movq %rbx, %rdi callq 0x26461 testl %eax, %eax je 0x4ed97 btl $0xc, %ebp jae 0x4eea2 leaq 0x130(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx movq 0x80(%rsp), %rcx movq 0x88(%rsp), %r8 movq %rbx, %rdi jmp 0x4ee95 btl $0xd, %ebp jae 0x4eea2 andl $0x3, %r14d movl %r14d, %eax xorl $0x2, %eax movl %ebp, %ecx andl $0x2, %ecx orl %eax, %ecx je 0x4ed97 testl %r14d, %r14d jne 0x4eea2 movq 0x60(%rsp), %rcx movq 0x68(%rsp), %r8 movq %rbx, %rdi movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx callq 0x26461 testl %eax, %eax je 0x4ed97 btl $0x9, %ebp jae 0x4eeb8 movl 0x58(%rsp), %eax andl $0x13, %eax cmpl $0x2, %eax je 0x4ed97 leaq 0x58(%rsp), %rsi movq %rbx, %rdi callq 0x3d8c3 movl $0x1, %r12d jmp 0x4ec93
js_proxy_define_own_property: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov r15, r9 mov [rsp+118h+var_F0], r8 mov r13d, ecx mov rcx, rdx mov rdx, rsi mov rbx, rdi mov ebp, [rsp+118h+arg_20] lea rsi, [rsp+118h+var_D0] mov r8d, 66h ; 'f' call get_proxy_method mov r12d, 0FFFFFFFFh test rax, rax jz loc_4EC93 mov r14, rax mov [rsp+118h+var_F8], r15 mov r15, [rsp+118h+var_C8] cmp r15d, 3 jnz short loc_4EA64 mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx mov ecx, r13d mov r8, [rsp+118h+var_F0] mov r9, [rsp+118h+var_F8] add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp JS_DefineProperty loc_4EA64: mov rdi, rbx mov esi, r13d xor edx, edx call __JS_AtomToValue cmp edx, 6 jz loc_4EC7C mov [rsp+118h+var_E0], rax mov [rsp+118h+var_D8], rdx lea rax, [rsp+118h+arg_10] lea rcx, [rsp+118h+arg_0] mov rdx, [rcx] mov [rsp+118h+var_80], rdx mov rcx, [rcx+8] mov [rsp+118h+var_88], rcx mov rcx, [rax] mov [rsp+118h+var_70], rcx mov rax, [rax+8] mov [rsp+118h+var_78], rax mov rax, [rbx+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov rdi, rbx mov ecx, 1 call JS_NewObjectProtoClass mov [rsp+118h+var_100], rax mov [rsp+118h+var_108], rdx mov eax, edx mov [rsp+118h+var_E8], rax cmp rax, 6 jz loc_4EC69 bt ebp, 0Bh jnb short loc_4EB3C mov r8, [rsp+118h+var_80] mov [rsp+118h+var_C0], r8 mov r9, [rsp+118h+var_88] cmp r9d, 0FFFFFFF7h jb short loc_4EB1E mov rax, [rsp+118h+var_C0] inc dword ptr [rax] loc_4EB1E: mov dword ptr [rsp+118h+var_118], 7 mov rdi, rbx mov rsi, [rsp+118h+var_100] mov rdx, [rsp+118h+var_108] mov ecx, 42h ; 'B' call JS_DefinePropertyValue loc_4EB3C: bt ebp, 0Ch jnb short loc_4EB82 mov r8, [rsp+118h+var_70] mov [rsp+118h+var_C0], r8 mov r9, [rsp+118h+var_78] cmp r9d, 0FFFFFFF7h jb short loc_4EB64 mov rax, [rsp+118h+var_C0] inc dword ptr [rax] loc_4EB64: mov dword ptr [rsp+118h+var_118], 7 mov rdi, rbx mov rsi, [rsp+118h+var_100] mov rdx, [rsp+118h+var_108] mov ecx, 43h ; 'C' call JS_DefinePropertyValue loc_4EB82: bt ebp, 0Dh jnb short loc_4EBC8 mov rax, [rsp+118h+var_F0] mov [rsp+118h+var_C0], rax cmp dword ptr [rsp+118h+var_F8], 0FFFFFFF7h jb short loc_4EBA0 mov rax, [rsp+118h+var_C0] inc dword ptr [rax] loc_4EBA0: mov dword ptr [rsp+118h+var_118], 7 mov rdi, rbx mov rsi, [rsp+118h+var_100] mov rdx, [rsp+118h+var_108] mov ecx, 41h ; 'A' mov r8, [rsp+118h+var_F0] mov r9, [rsp+118h+var_F8] call JS_DefinePropertyValue loc_4EBC8: bt ebp, 9 jnb short loc_4EBFC mov r8d, ebp shr r8d, 1 and r8d, 1 mov dword ptr [rsp+118h+var_118], 7 mov r9d, 1 mov rdi, rbx mov rsi, [rsp+118h+var_100] mov rdx, [rsp+118h+var_108] mov ecx, 3Fh ; '?' call JS_DefinePropertyValue loc_4EBFC: bt ebp, 0Ah jnb short loc_4EC31 mov r8d, ebp shr r8d, 2 and r8d, 1 mov dword ptr [rsp+118h+var_118], 7 mov r9d, 1 mov rdi, rbx mov rsi, [rsp+118h+var_100] mov rdx, [rsp+118h+var_108] mov ecx, 40h ; '@' call JS_DefinePropertyValue loc_4EC31: bt ebp, 8 jnb short loc_4EC62 mov r8d, ebp and r8d, 1 mov dword ptr [rsp+118h+var_118], 7 mov r9d, 1 mov rdi, rbx mov rsi, [rsp+118h+var_100] mov rdx, [rsp+118h+var_108] mov ecx, 3Eh ; '>' call JS_DefinePropertyValue loc_4EC62: cmp dword ptr [rsp+118h+var_E8], 6 jnz short loc_4ECA8 loc_4EC69: mov rdi, [rbx+18h] mov rsi, [rsp+118h+var_E0] mov rdx, [rsp+118h+var_D8] call JS_FreeValueRT loc_4EC7C: mov rsi, [rsp+118h+var_D0] mov rdi, [rbx+18h] mov rdx, r15 call JS_FreeValueRT loc_4EC8D: mov r12d, 0FFFFFFFFh loc_4EC93: mov eax, r12d add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4ECA8: movups xmm0, xmmword ptr [r14] lea rax, [rsp+118h+var_68] movaps xmmword ptr [rax], xmm0 mov rcx, [rsp+118h+var_E0] mov [rax+10h], rcx mov rcx, [rsp+118h+var_D8] mov [rax+18h], rcx mov rcx, [rsp+118h+var_100] mov [rax+20h], rcx mov rcx, [rsp+118h+var_108] mov [rax+28h], rcx mov rsi, [rsp+118h+var_D0] mov rcx, [r14+10h] mov r8, [r14+18h] mov [rsp+118h+var_118], rax mov rdi, rbx mov rdx, r15 mov r9d, 3 call JS_CallFree mov [rsp+118h+var_E8], rax mov r15, rdx mov rdi, [rbx+18h] mov rsi, [rsp+118h+var_E0] mov rdx, [rsp+118h+var_D8] call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rsp+118h+var_100] mov rdx, [rsp+118h+var_108] call JS_FreeValueRT cmp r15d, 6 jz loc_4EC93 mov rdi, rbx mov rsi, [rsp+118h+var_E8] mov rdx, r15 call JS_ToBoolFree test eax, eax jz short loc_4EDAD mov r14, [r14] lea rsi, [rsp+118h+var_C0] mov rdi, rbx mov rdx, r14 mov ecx, r13d call JS_GetOwnPropertyInternal test eax, eax js loc_4EC93 mov r15d, ebp and r15d, 101h test eax, eax jz short loc_4EDD0 mov r14d, dword ptr [rsp+118h+var_C0] mov edi, r14d mov esi, ebp call check_define_prop_flags test eax, eax jz short loc_4ED97 cmp r15d, 100h setz al test al, r14b jz short loc_4EDED loc_4ED97: lea rsi, [rsp+118h+var_C0] mov rdi, rbx call js_free_desc loc_4EDA4: lea rsi, aProxyInconsist_4; "proxy: inconsistent defineProperty" jmp short loc_4EDC1 loc_4EDAD: xor r12d, r12d bt ebp, 0Eh jnb loc_4EC93 lea rsi, aProxyDefinepro; "proxy: defineProperty exception" loc_4EDC1: mov rdi, rbx xor eax, eax call JS_ThrowTypeError jmp loc_4EC8D loc_4EDD0: cmp r15d, 100h jz short loc_4EDA4 mov al, [r14+5] mov r12d, 1 and al, 1 jnz loc_4EC93 jmp short loc_4EDA4 loc_4EDED: test ebp, 1800h jz short loc_4EE5C and r14d, 11h cmp r14d, 10h jnz loc_4EEA2 bt ebp, 0Bh jnb short loc_4EE32 lea rax, [rsp+118h+arg_0] mov rsi, [rax] mov rdx, [rax+8] mov rcx, [rsp+118h+var_A8] mov r8, [rsp+118h+var_A0] mov rdi, rbx call js_same_value test eax, eax jz loc_4ED97 loc_4EE32: bt ebp, 0Ch jnb short loc_4EEA2 lea rax, [rsp+118h+arg_10] mov rsi, [rax] mov rdx, [rax+8] mov rcx, [rsp+118h+var_98] mov r8, [rsp+118h+var_90] mov rdi, rbx jmp short loc_4EE95 loc_4EE5C: bt ebp, 0Dh jnb short loc_4EEA2 and r14d, 3 mov eax, r14d xor eax, 2 mov ecx, ebp and ecx, 2 or ecx, eax jz loc_4ED97 test r14d, r14d jnz short loc_4EEA2 mov rcx, [rsp+118h+var_B8] mov r8, [rsp+118h+var_B0] mov rdi, rbx mov rsi, [rsp+118h+var_F0] mov rdx, [rsp+118h+var_F8] loc_4EE95: call js_same_value test eax, eax jz loc_4ED97 loc_4EEA2: bt ebp, 9 jnb short loc_4EEB8 mov eax, dword ptr [rsp+118h+var_C0] and eax, 13h cmp eax, 2 jz loc_4ED97 loc_4EEB8: lea rsi, [rsp+118h+var_C0] mov rdi, rbx call js_free_desc mov r12d, 1 jmp loc_4EC93
long long js_proxy_define_own_property( long long a1, long long a2, long long a3, unsigned int a4, _DWORD *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14, _DWORD *a15, long long a16, _DWORD *a17, long long a18, unsigned int a19) { long long proxy_method; // rax __m128 v22; // xmm4 __m128 v23; // xmm5 unsigned int v24; // r12d __m128 *v25; // r14 long long v26; // r15 long long v28; // rax long long v29; // rdx long long v30; // rdx __m128 v31; // xmm4 __m128 v32; // xmm5 _DWORD *v33; // r8 long long v34; // r9 _DWORD *v35; // r8 long long v36; // r9 __m128 v37; // xmm0 long long v38; // rdx long long v39; // r15 long long v40; // rdx long long v41; // rcx long long v42; // r8 long long v43; // r9 __m128 v44; // xmm4 __m128 v45; // xmm5 long long v46; // r14 int OwnPropertyInternal; // eax int v48; // r15d unsigned __int8 v49; // r14 const char *v50; // rsi _DWORD *v51; // rsi long long v52; // rdx _DWORD *v53; // rcx long long v54; // r8 int v55; // r14d char v56; // [rsp+0h] [rbp-118h] long long v57; // [rsp+10h] [rbp-108h] _DWORD *v58; // [rsp+18h] [rbp-100h] long long v59; // [rsp+20h] [rbp-F8h] int v61; // [rsp+30h] [rbp-E8h] long long v62; // [rsp+30h] [rbp-E8h] _DWORD *v63; // [rsp+38h] [rbp-E0h] long long v64; // [rsp+40h] [rbp-D8h] _DWORD *v65; // [rsp+48h] [rbp-D0h] BYREF long long v66; // [rsp+50h] [rbp-C8h] _QWORD v67[7]; // [rsp+58h] [rbp-C0h] BYREF long long v68; // [rsp+90h] [rbp-88h] _DWORD *v69; // [rsp+98h] [rbp-80h] long long v70; // [rsp+A0h] [rbp-78h] _DWORD *v71; // [rsp+A8h] [rbp-70h] __m128 v72; // [rsp+B0h] [rbp-68h] BYREF _DWORD *v73; // [rsp+C0h] [rbp-58h] long long v74; // [rsp+C8h] [rbp-50h] _DWORD *v75; // [rsp+D0h] [rbp-48h] long long v76; // [rsp+D8h] [rbp-40h] proxy_method = get_proxy_method(a1, (unsigned long long *)&v65, a2, a3, 102LL, a6, a7, a8, a9, a10, a11, a12, a13, a14); v24 = -1; if ( !proxy_method ) return v24; v25 = (__m128 *)proxy_method; v59 = a6; v26 = v66; if ( (_DWORD)v66 == 3 ) return JS_DefineProperty( a1, *(_QWORD *)proxy_method, *(_QWORD *)(proxy_method + 8), a4, (long long)a5, v59, a7, a8, a9, a10, v22, v23, a13, a14, a15, a16, a17, a18, a19); v28 = _JS_AtomToValue(a1, a4, 0); if ( (_DWORD)v29 == 6 ) goto LABEL_26; v63 = (_DWORD *)v28; v64 = v29; v69 = a15; v68 = a16; v71 = a17; v70 = a18; v58 = (_DWORD *)JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL), 1u); v57 = v30; v61 = v30; if ( (unsigned int)v30 != 6LL ) { if ( (a19 & 0x800) != 0 ) { v33 = v69; v67[0] = v69; v34 = v68; if ( (unsigned int)v68 >= 0xFFFFFFF7 ) ++*(_DWORD *)v67[0]; JS_DefinePropertyValue( a1, (unsigned long long)v58, v30, 66LL, v33, v34, *(double *)a7.m128_u64, a8, a9, a10, v31, v32, a13, a14, 7); } if ( (a19 & 0x1000) != 0 ) { v35 = v71; v67[0] = v71; v36 = v70; if ( (unsigned int)v70 >= 0xFFFFFFF7 ) ++*(_DWORD *)v67[0]; JS_DefinePropertyValue( a1, (unsigned long long)v58, v57, 67LL, v35, v36, *(double *)a7.m128_u64, a8, a9, a10, v31, v32, a13, a14, 7); } if ( (a19 & 0x2000) != 0 ) { v67[0] = a5; if ( (unsigned int)v59 >= 0xFFFFFFF7 ) ++*(_DWORD *)v67[0]; JS_DefinePropertyValue( a1, (unsigned long long)v58, v57, 65LL, a5, v59, *(double *)a7.m128_u64, a8, a9, a10, v31, v32, a13, a14, 7); } if ( (a19 & 0x200) != 0 ) JS_DefinePropertyValue( a1, (unsigned long long)v58, v57, 63LL, (_DWORD *)((a19 >> 1) & 1), 1LL, *(double *)a7.m128_u64, a8, a9, a10, v31, v32, a13, a14, 7); if ( (a19 & 0x400) != 0 ) JS_DefinePropertyValue( a1, (unsigned long long)v58, v57, 64LL, (_DWORD *)((a19 >> 2) & 1), 1LL, *(double *)a7.m128_u64, a8, a9, a10, v31, v32, a13, a14, 7); if ( (a19 & 0x100) != 0 ) JS_DefinePropertyValue( a1, (unsigned long long)v58, v57, 62LL, (_DWORD *)(a19 & 1), 1LL, *(double *)a7.m128_u64, a8, a9, a10, v31, v32, a13, a14, 7); if ( v61 != 6 ) { v37 = *v25; v72 = *v25; v73 = v63; v74 = v64; v75 = v58; v76 = v57; v62 = JS_CallFree(a1, v65, v26, v25[1].m128_u64[0], v25[1].m128_u64[1], 3, (long long)&v72); v39 = v38; JS_FreeValueRT(*(_QWORD *)(a1 + 24), v63, v64); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v58, v57); if ( (_DWORD)v39 == 6 ) return v24; if ( !(unsigned int)JS_ToBoolFree(a1, v62, v39) ) { v24 = 0; if ( (a19 & 0x4000) == 0 ) return v24; v50 = "proxy: defineProperty exception"; goto LABEL_39; } v46 = v25->m128_u64[0]; OwnPropertyInternal = JS_GetOwnPropertyInternal(a1, (long long)v67, v46, a4); if ( OwnPropertyInternal < 0 ) return v24; v48 = a19 & 0x101; if ( !OwnPropertyInternal ) { if ( v48 != 256 ) { v24 = 1; if ( (*(_BYTE *)(v46 + 5) & 1) != 0 ) return v24; } goto LABEL_36; } v49 = v67[0]; if ( !(unsigned int)check_define_prop_flags(v67[0], a19) || (v49 & (v48 == 256)) != 0 ) { LABEL_35: js_free_desc(a1, (long long)v67); LABEL_36: v50 = "proxy: inconsistent defineProperty"; LABEL_39: JS_ThrowTypeError(a1, (long long)v50, v40, v41, v42, v43, v37, a8, a9, a10, v44, v45, a13, a14, v56); return (unsigned int)-1; } if ( (a19 & 0x1800) != 0 ) { if ( (v49 & 0x11) != 0x10 ) goto LABEL_54; if ( (a19 & 0x800) != 0 && !(unsigned int)js_same_value(a1, a15, a16, (_DWORD *)v67[3], v67[4]) ) goto LABEL_35; if ( (a19 & 0x1000) == 0 ) goto LABEL_54; v51 = a17; v52 = a18; v53 = (_DWORD *)v67[5]; v54 = v67[6]; } else { if ( (a19 & 0x2000) == 0 ) goto LABEL_54; v55 = v49 & 3; if ( !(v55 ^ 2 | a19 & 2) ) goto LABEL_35; if ( v55 ) { LABEL_54: if ( (a19 & 0x200) == 0 || (v67[0] & 0x13) != 2 ) { js_free_desc(a1, (long long)v67); return 1; } goto LABEL_35; } v53 = (_DWORD *)v67[1]; v54 = v67[2]; v51 = a5; v52 = v59; } if ( !(unsigned int)js_same_value(a1, v51, v52, v53, v54) ) goto LABEL_35; goto LABEL_54; } } JS_FreeValueRT(*(_QWORD *)(a1 + 24), v63, v64); LABEL_26: JS_FreeValueRT(*(_QWORD *)(a1 + 24), v65, v26); return (unsigned int)-1; }
js_proxy_define_own_property: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV R15,R9 MOV qword ptr [RSP + 0x28],R8 MOV R13D,ECX MOV RCX,RDX MOV RDX,RSI MOV RBX,RDI MOV EBP,dword ptr [RSP + 0x140] LEA RSI,[RSP + 0x48] MOV R8D,0x66 CALL 0x0013d3e0 MOV R12D,0xffffffff TEST RAX,RAX JZ 0x0014ec93 MOV R14,RAX MOV qword ptr [RSP + 0x20],R15 MOV R15,qword ptr [RSP + 0x50] CMP R15D,0x3 JNZ 0x0014ea64 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] MOV RDI,RBX MOV ECX,R13D MOV R8,qword ptr [RSP + 0x28] MOV R9,qword ptr [RSP + 0x20] ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001254b9 LAB_0014ea64: MOV RDI,RBX MOV ESI,R13D XOR EDX,EDX CALL 0x0012075a CMP EDX,0x6 JZ 0x0014ec7c MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX LEA RAX,[RSP + 0x130] LEA RCX,[RSP + 0x120] MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x98],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RSP + 0x90],RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xa8],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RBX + 0x40] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RDI,RBX MOV ECX,0x1 CALL 0x00120f05 MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],RDX MOV EAX,EDX MOV qword ptr [RSP + 0x30],RAX CMP RAX,0x6 JZ 0x0014ec69 BT EBP,0xb JNC 0x0014eb3c MOV R8,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x58],R8 MOV R9,qword ptr [RSP + 0x90] CMP R9D,-0x9 JC 0x0014eb1e MOV RAX,qword ptr [RSP + 0x58] INC dword ptr [RAX] LAB_0014eb1e: MOV dword ptr [RSP],0x7 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,0x42 CALL 0x00126abb LAB_0014eb3c: BT EBP,0xc JNC 0x0014eb82 MOV R8,qword ptr [RSP + 0xa8] MOV qword ptr [RSP + 0x58],R8 MOV R9,qword ptr [RSP + 0xa0] CMP R9D,-0x9 JC 0x0014eb64 MOV RAX,qword ptr [RSP + 0x58] INC dword ptr [RAX] LAB_0014eb64: MOV dword ptr [RSP],0x7 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,0x43 CALL 0x00126abb LAB_0014eb82: BT EBP,0xd JNC 0x0014ebc8 MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x58],RAX CMP dword ptr [RSP + 0x20],-0x9 JC 0x0014eba0 MOV RAX,qword ptr [RSP + 0x58] INC dword ptr [RAX] LAB_0014eba0: MOV dword ptr [RSP],0x7 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,0x41 MOV R8,qword ptr [RSP + 0x28] MOV R9,qword ptr [RSP + 0x20] CALL 0x00126abb LAB_0014ebc8: BT EBP,0x9 JNC 0x0014ebfc MOV R8D,EBP SHR R8D,0x1 AND R8D,0x1 MOV dword ptr [RSP],0x7 MOV R9D,0x1 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,0x3f CALL 0x00126abb LAB_0014ebfc: BT EBP,0xa JNC 0x0014ec31 MOV R8D,EBP SHR R8D,0x2 AND R8D,0x1 MOV dword ptr [RSP],0x7 MOV R9D,0x1 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,0x40 CALL 0x00126abb LAB_0014ec31: BT EBP,0x8 JNC 0x0014ec62 MOV R8D,EBP AND R8D,0x1 MOV dword ptr [RSP],0x7 MOV R9D,0x1 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] MOV ECX,0x3e CALL 0x00126abb LAB_0014ec62: CMP dword ptr [RSP + 0x30],0x6 JNZ 0x0014eca8 LAB_0014ec69: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] CALL 0x0011d8c6 LAB_0014ec7c: MOV RSI,qword ptr [RSP + 0x48] MOV RDI,qword ptr [RBX + 0x18] MOV RDX,R15 CALL 0x0011d8c6 LAB_0014ec8d: MOV R12D,0xffffffff LAB_0014ec93: MOV EAX,R12D ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014eca8: MOVUPS XMM0,xmmword ptr [R14] LEA RAX,[RSP + 0xb0] MOVAPS xmmword ptr [RAX],XMM0 MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x28],RCX MOV RSI,qword ptr [RSP + 0x48] MOV RCX,qword ptr [R14 + 0x10] MOV R8,qword ptr [R14 + 0x18] MOV qword ptr [RSP],RAX MOV RDI,RBX MOV RDX,R15 MOV R9D,0x3 CALL 0x00122c9d MOV qword ptr [RSP + 0x30],RAX MOV R15,RDX MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x40] CALL 0x0011d8c6 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011d8c6 CMP R15D,0x6 JZ 0x0014ec93 MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x30] MOV RDX,R15 CALL 0x00122d0d TEST EAX,EAX JZ 0x0014edad MOV R14,qword ptr [R14] LEA RSI,[RSP + 0x58] MOV RDI,RBX MOV RDX,R14 MOV ECX,R13D CALL 0x00123bd9 TEST EAX,EAX JS 0x0014ec93 MOV R15D,EBP AND R15D,0x101 TEST EAX,EAX JZ 0x0014edd0 MOV R14D,dword ptr [RSP + 0x58] MOV EDI,R14D MOV ESI,EBP CALL 0x0012616c TEST EAX,EAX JZ 0x0014ed97 CMP R15D,0x100 SETZ AL TEST AL,R14B JZ 0x0014eded LAB_0014ed97: LEA RSI,[RSP + 0x58] MOV RDI,RBX CALL 0x0013d8c3 LAB_0014eda4: LEA RSI,[0x1a0106] JMP 0x0014edc1 LAB_0014edad: XOR R12D,R12D BT EBP,0xe JNC 0x0014ec93 LEA RSI,[0x1a00e6] LAB_0014edc1: MOV RDI,RBX XOR EAX,EAX CALL 0x00122567 JMP 0x0014ec8d LAB_0014edd0: CMP R15D,0x100 JZ 0x0014eda4 MOV AL,byte ptr [R14 + 0x5] MOV R12D,0x1 AND AL,0x1 JNZ 0x0014ec93 JMP 0x0014eda4 LAB_0014eded: TEST EBP,0x1800 JZ 0x0014ee5c AND R14D,0x11 CMP R14D,0x10 JNZ 0x0014eea2 BT EBP,0xb JNC 0x0014ee32 LEA RAX,[RSP + 0x120] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x70] MOV R8,qword ptr [RSP + 0x78] MOV RDI,RBX CALL 0x00126461 TEST EAX,EAX JZ 0x0014ed97 LAB_0014ee32: BT EBP,0xc JNC 0x0014eea2 LEA RAX,[RSP + 0x130] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x80] MOV R8,qword ptr [RSP + 0x88] MOV RDI,RBX JMP 0x0014ee95 LAB_0014ee5c: BT EBP,0xd JNC 0x0014eea2 AND R14D,0x3 MOV EAX,R14D XOR EAX,0x2 MOV ECX,EBP AND ECX,0x2 OR ECX,EAX JZ 0x0014ed97 TEST R14D,R14D JNZ 0x0014eea2 MOV RCX,qword ptr [RSP + 0x60] MOV R8,qword ptr [RSP + 0x68] MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] LAB_0014ee95: CALL 0x00126461 TEST EAX,EAX JZ 0x0014ed97 LAB_0014eea2: BT EBP,0x9 JNC 0x0014eeb8 MOV EAX,dword ptr [RSP + 0x58] AND EAX,0x13 CMP EAX,0x2 JZ 0x0014ed97 LAB_0014eeb8: LEA RSI,[RSP + 0x58] MOV RDI,RBX CALL 0x0013d8c3 MOV R12D,0x1 JMP 0x0014ec93
int8 js_proxy_define_own_property (long param_1,int8 param_2,int8 param_3,int4 param_4,int *param_5, int8 param_6,int *param_7,int8 param_8,int *param_9,int8 param_10, uint param_11) { long lVar1; uint uVar2; int *piVar3; int iVar4; long *plVar5; int8 uVar6; ulong uVar7; char *pcVar8; int1 auVar9 [16]; int1 auVar10 [16]; int8 in_stack_fffffffffffffee8; int8 uVar11; int4 uVar12; uint local_f8; int local_e8; int8 local_d0; int8 local_c8; int *local_c0; int8 local_b8; int8 local_b0; int8 local_a8; int8 local_a0; int8 local_98; int8 local_90; int8 local_88; int *local_80; int8 local_78; int *local_70; int4 local_68; int4 uStack_64; int4 uStack_60; int4 uStack_5c; int1 local_58 [16]; int1 local_48 [16]; uVar12 = (int4)((ulong)in_stack_fffffffffffffee8 >> 0x20); plVar5 = (long *)get_proxy_method(param_1,&local_d0,param_2,param_3,0x66); if (plVar5 == (long *)0x0) { return 0xffffffff; } if ((int)local_c8 == 3) { uVar6 = JS_DefineProperty(param_1,*plVar5,plVar5[1],param_4,param_5,param_6); return uVar6; } auVar9 = __JS_AtomToValue(param_1,param_4,0); if (auVar9._8_4_ == 6) goto LAB_0014ec7c; local_80 = param_7; local_88 = param_8; local_70 = param_9; local_78 = param_10; auVar10 = JS_NewObjectProtoClass (param_1,*(int8 *)(*(long *)(param_1 + 0x40) + 0x10), *(int8 *)(*(long *)(param_1 + 0x40) + 0x18),1); uVar7 = auVar10._8_8_; uVar6 = auVar10._0_8_; if ((uVar7 & 0xffffffff) != 6) { if ((param_11 >> 0xb & 1) != 0) { local_c0 = local_80; if (0xfffffff6 < (uint)local_88) { *local_80 = *local_80 + 1; } uVar11 = CONCAT44(uVar12,7); JS_DefinePropertyValue(param_1,uVar6,uVar7,0x42,local_80,local_88,uVar11); uVar12 = (int4)((ulong)uVar11 >> 0x20); } if ((param_11 >> 0xc & 1) != 0) { local_c0 = local_70; if (0xfffffff6 < (uint)local_78) { *local_70 = *local_70 + 1; } uVar11 = CONCAT44(uVar12,7); JS_DefinePropertyValue(param_1,uVar6,uVar7,0x43,local_70,local_78,uVar11); uVar12 = (int4)((ulong)uVar11 >> 0x20); } if ((param_11 >> 0xd & 1) != 0) { local_f8 = (uint)param_6; if (0xfffffff6 < local_f8) { *param_5 = *param_5 + 1; } uVar11 = CONCAT44(uVar12,7); local_c0 = param_5; JS_DefinePropertyValue(param_1,uVar6,uVar7,0x41,param_5,param_6,uVar11); uVar12 = (int4)((ulong)uVar11 >> 0x20); } if ((param_11 >> 9 & 1) != 0) { uVar11 = CONCAT44(uVar12,7); JS_DefinePropertyValue(param_1,uVar6,uVar7,0x3f,param_11 >> 1 & 1,1,uVar11); uVar12 = (int4)((ulong)uVar11 >> 0x20); } if ((param_11 >> 10 & 1) != 0) { uVar11 = CONCAT44(uVar12,7); JS_DefinePropertyValue(param_1,uVar6,uVar7,0x40,param_11 >> 2 & 1,1,uVar11); uVar12 = (int4)((ulong)uVar11 >> 0x20); } if ((param_11 >> 8 & 1) != 0) { JS_DefinePropertyValue(param_1,uVar6,uVar7,0x3e,param_11 & 1,1,CONCAT44(uVar12,7)); } local_e8 = auVar10._8_4_; if (local_e8 != 6) { local_68 = (int4)*plVar5; uStack_64 = *(int4 *)((long)plVar5 + 4); uStack_60 = (int4)plVar5[1]; uStack_5c = *(int4 *)((long)plVar5 + 0xc); local_58 = auVar9; local_48 = auVar10; auVar10 = JS_CallFree(param_1,local_d0,local_c8,plVar5[2],plVar5[3],3,&local_68); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar6,uVar7); if (auVar10._8_4_ == 6) { return 0xffffffff; } iVar4 = JS_ToBoolFree(param_1,auVar10._0_8_,auVar10._8_8_); if (iVar4 == 0) { if ((param_11 >> 0xe & 1) == 0) { return 0; } pcVar8 = "proxy: defineProperty exception"; goto LAB_0014edc1; } lVar1 = *plVar5; iVar4 = JS_GetOwnPropertyInternal(param_1,&local_c0,lVar1,param_4); piVar3 = local_c0; if (iVar4 < 0) { return 0xffffffff; } if (iVar4 == 0) { if (((param_11 & 0x101) != 0x100) && ((*(byte *)(lVar1 + 5) & 1) != 0)) { return 1; } } else { uVar2 = (uint)local_c0; iVar4 = check_define_prop_flags((ulong)local_c0 & 0xffffffff,param_11); if ((iVar4 != 0) && (((param_11 & 0x101) == 0x100 & (byte)piVar3) == 0)) { if ((param_11 & 0x1800) == 0) { if ((param_11 >> 0xd & 1) != 0) { if ((param_11 & 2) == 0 && (uVar2 & 3) == 2) goto LAB_0014ed97; if (((ulong)piVar3 & 3) == 0) goto LAB_0014ee95; } } else if ((uVar2 & 0x11) == 0x10) { if ((param_11 >> 0xb & 1) != 0) { iVar4 = js_same_value(param_1,param_7,param_8,local_a8,local_a0); if (iVar4 == 0) goto LAB_0014ed97; } local_b8 = local_98; param_6 = param_10; param_5 = param_9; local_b0 = local_90; if ((param_11 >> 0xc & 1) != 0) { LAB_0014ee95: iVar4 = js_same_value(param_1,param_5,param_6,local_b8,local_b0); if (iVar4 == 0) goto LAB_0014ed97; } } if (((param_11 >> 9 & 1) == 0) || (((uint)local_c0 & 0x13) != 2)) { js_free_desc(param_1,&local_c0); return 1; } } LAB_0014ed97: js_free_desc(param_1,&local_c0); } pcVar8 = "proxy: inconsistent defineProperty"; LAB_0014edc1: JS_ThrowTypeError(param_1,pcVar8); return 0xffffffff; } } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),auVar9._0_8_,auVar9._8_8_); LAB_0014ec7c: JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_d0,local_c8); return 0xffffffff; }
73
mi_new
eloqsql/storage/myisam/mi_page.c
my_off_t _mi_new(register MI_INFO *info, MI_KEYDEF *keyinfo, int level) { my_off_t pos; uchar buff[8]; DBUG_ENTER("_mi_new"); if ((pos= info->s->state.key_del[keyinfo->block_size_index]) == HA_OFFSET_ERROR) { if (info->state->key_file_length >= info->s->base.max_key_file_length - keyinfo->block_length) { my_errno=HA_ERR_INDEX_FILE_FULL; DBUG_RETURN(HA_OFFSET_ERROR); } pos=info->state->key_file_length; info->state->key_file_length+= keyinfo->block_length; } else { if (!key_cache_read(info->s->key_cache, info->s->kfile, pos, level, buff, (uint) sizeof(buff), (uint) keyinfo->block_length,0)) pos= HA_OFFSET_ERROR; else info->s->state.key_del[keyinfo->block_size_index]= mi_sizekorr(buff); } info->s->state.changed|= STATE_NOT_SORTED_PAGES; DBUG_PRINT("exit",("Pos: %ld",(long) pos)); DBUG_RETURN(pos); }
O3
c
mi_new: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movl %edx, %ecx movq %rsi, %r15 movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) movq (%rdi), %rax movq 0xa0(%rax), %rdx movzwl 0x18(%rsi), %esi movq (%rdx,%rsi,8), %rbx cmpq $-0x1, %rbx je 0x84ee8 movq 0x278(%rax), %rdi movl 0x350(%rax), %esi movzwl 0xe(%r15), %eax leaq -0x28(%rbp), %r8 movq %rbx, %rdx movl $0x8, %r9d pushq $0x0 pushq %rax callq 0x99580 addq $0x10, %rsp testq %rax, %rax je 0x84f0d movq -0x28(%rbp), %rax bswapq %rax movq (%r14), %rcx movq 0xa0(%rcx), %rcx movzwl 0x18(%r15), %edx movq %rax, (%rcx,%rdx,8) jmp 0x84f14 movq 0x8(%r14), %rcx movq 0x20(%rcx), %rbx movq 0x118(%rax), %rdx movzwl 0xe(%r15), %eax subq %rax, %rdx cmpq %rdx, %rbx jae 0x84f3b addq %rbx, %rax movq %rax, 0x20(%rcx) jmp 0x84f14 movq $-0x1, %rbx movq (%r14), %rax orb $0x20, 0xf0(%rax) movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x84f4f movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0xa2a4e movl $0x88, (%rax) movq $-0x1, %rbx jmp 0x84f1e callq 0x29270
_mi_new: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov ecx, edx mov r15, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_20], rax mov rax, [rdi] mov rdx, [rax+0A0h] movzx esi, word ptr [rsi+18h] mov rbx, [rdx+rsi*8] cmp rbx, 0FFFFFFFFFFFFFFFFh jz short loc_84EE8 mov rdi, [rax+278h] mov esi, [rax+350h] movzx eax, word ptr [r15+0Eh] lea r8, [rbp+var_28] mov rdx, rbx mov r9d, 8 push 0 push rax call key_cache_read add rsp, 10h test rax, rax jz short loc_84F0D mov rax, [rbp+var_28] bswap rax mov rcx, [r14] mov rcx, [rcx+0A0h] movzx edx, word ptr [r15+18h] mov [rcx+rdx*8], rax jmp short loc_84F14 loc_84EE8: mov rcx, [r14+8] mov rbx, [rcx+20h] mov rdx, [rax+118h] movzx eax, word ptr [r15+0Eh] sub rdx, rax cmp rbx, rdx jnb short loc_84F3B add rax, rbx mov [rcx+20h], rax jmp short loc_84F14 loc_84F0D: mov rbx, 0FFFFFFFFFFFFFFFFh loc_84F14: mov rax, [r14] or byte ptr [rax+0F0h], 20h loc_84F1E: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_84F4F mov rax, rbx add rsp, 18h pop rbx pop r14 pop r15 pop rbp retn loc_84F3B: call _my_thread_var mov dword ptr [rax], 88h mov rbx, 0FFFFFFFFFFFFFFFFh jmp short loc_84F1E loc_84F4F: call ___stack_chk_fail
long long mi_new(_QWORD *a1, long long a2) { long long v3; // rax const char *v4; // rsi unsigned long long v5; // rbx long long v6; // rcx long long v7; // rdx long long v8; // rax unsigned long long v10; // [rsp+8h] [rbp-28h] v3 = *a1; v4 = (const char *)*(unsigned __int16 *)(a2 + 24); v5 = *(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * (_QWORD)v4); if ( v5 == -1LL ) { v6 = a1[1]; v5 = *(_QWORD *)(v6 + 32); v7 = *(_QWORD *)(v3 + 280); v8 = *(unsigned __int16 *)(a2 + 14); if ( v5 >= v7 - v8 ) { *(_DWORD *)my_thread_var(a1, v4) = 136; return -1LL; } *(_QWORD *)(v6 + 32) = v5 + v8; } else if ( key_cache_read(*(_QWORD *)(v3 + 632), *(unsigned int *)(v3 + 848), v5) ) { *(_QWORD *)(*(_QWORD *)(*a1 + 160LL) + 8LL * *(unsigned __int16 *)(a2 + 24)) = _byteswap_uint64(v10); } else { v5 = -1LL; } *(_BYTE *)(*a1 + 240LL) |= 0x20u; return v5; }
_mi_new: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x18 MOV ECX,EDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RAX + 0xa0] MOVZX ESI,word ptr [RSI + 0x18] MOV RBX,qword ptr [RDX + RSI*0x8] CMP RBX,-0x1 JZ 0x00184ee8 MOV RDI,qword ptr [RAX + 0x278] MOV ESI,dword ptr [RAX + 0x350] MOVZX EAX,word ptr [R15 + 0xe] LEA R8,[RBP + -0x28] MOV RDX,RBX MOV R9D,0x8 PUSH 0x0 PUSH RAX CALL 0x00199580 ADD RSP,0x10 TEST RAX,RAX JZ 0x00184f0d MOV RAX,qword ptr [RBP + -0x28] BSWAP RAX MOV RCX,qword ptr [R14] MOV RCX,qword ptr [RCX + 0xa0] MOVZX EDX,word ptr [R15 + 0x18] MOV qword ptr [RCX + RDX*0x8],RAX JMP 0x00184f14 LAB_00184ee8: MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x20] MOV RDX,qword ptr [RAX + 0x118] MOVZX EAX,word ptr [R15 + 0xe] SUB RDX,RAX CMP RBX,RDX JNC 0x00184f3b ADD RAX,RBX MOV qword ptr [RCX + 0x20],RAX JMP 0x00184f14 LAB_00184f0d: MOV RBX,-0x1 LAB_00184f14: MOV RAX,qword ptr [R14] OR byte ptr [RAX + 0xf0],0x20 LAB_00184f1e: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00184f4f MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 POP R15 POP RBP RET LAB_00184f3b: CALL 0x001a2a4e MOV dword ptr [RAX],0x88 MOV RBX,-0x1 JMP 0x00184f1e LAB_00184f4f: CALL 0x00129270
ulong _mi_new(long *param_1,long param_2,int4 param_3) { long lVar1; int4 *puVar2; ulong uVar3; long in_FS_OFFSET; ulong local_30; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); lVar1 = *param_1; uVar3 = *(ulong *)(*(long *)(lVar1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8); if (uVar3 == 0xffffffffffffffff) { uVar3 = *(ulong *)(param_1[1] + 0x20); if (*(long *)(lVar1 + 0x118) - (ulong)*(ushort *)(param_2 + 0xe) <= uVar3) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x88; uVar3 = 0xffffffffffffffff; goto LAB_00184f1e; } *(ulong *)(param_1[1] + 0x20) = *(ushort *)(param_2 + 0xe) + uVar3; } else { lVar1 = key_cache_read(*(int8 *)(lVar1 + 0x278),*(int4 *)(lVar1 + 0x350),uVar3, param_3,&local_30,8,*(int2 *)(param_2 + 0xe),0); if (lVar1 == 0) { uVar3 = 0xffffffffffffffff; } else { *(ulong *)(*(long *)(*param_1 + 0xa0) + (ulong)*(ushort *)(param_2 + 0x18) * 8) = local_30 >> 0x38 | (local_30 & 0xff000000000000) >> 0x28 | (local_30 & 0xff0000000000) >> 0x18 | (local_30 & 0xff00000000) >> 8 | (local_30 & 0xff000000) << 8 | (local_30 & 0xff0000) << 0x18 | (local_30 & 0xff00) << 0x28 | local_30 << 0x38; } } *(byte *)(*param_1 + 0xf0) = *(byte *)(*param_1 + 0xf0) | 0x20; LAB_00184f1e: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
74
my_charlen_utf8mb4
eloqsql/strings/ctype-utf8.c
static int my_charlen_utf8mb4(CHARSET_INFO *cs __attribute__((unused)), const uchar *s, const uchar *e) { uchar c; if (s >= e) return MY_CS_TOOSMALL; c= s[0]; if (c < 0xf0) return my_valid_mbcharlen_utf8mb3(s, e); if (c < 0xf5) { if (s + 4 > e) /* We need 4 characters */ return MY_CS_TOOSMALL4; if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; return 4; } return MY_CS_ILSEQ; }
O0
c
my_charlen_utf8mb4: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax jb 0x9c89a movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x9c96f movq -0x18(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x9c8c3 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x9d0c0 movl %eax, -0x4(%rbp) jmp 0x9c96f movzbl -0x21(%rbp), %eax cmpl $0xf5, %eax jge 0x9c968 movq -0x18(%rbp), %rax addq $0x4, %rax cmpq -0x20(%rbp), %rax jbe 0x9c8ec movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x9c96f movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x9c956 movq -0x18(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x9c956 movq -0x18(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x9c956 movzbl -0x21(%rbp), %eax cmpl $0xf1, %eax jge 0x9c93c movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x90, %eax jl 0x9c956 movzbl -0x21(%rbp), %eax cmpl $0xf3, %eax jle 0x9c95f movq -0x18(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x8f, %eax jle 0x9c95f movl $0x0, -0x4(%rbp) jmp 0x9c96f movl $0x4, -0x4(%rbp) jmp 0x9c96f movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_charlen_utf8mb4: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jb short loc_9C89A mov [rbp+var_4], 0FFFFFF9Bh jmp loc_9C96F loc_9C89A: mov rax, [rbp+var_18] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 0F0h jge short loc_9C8C3 mov rdi, [rbp+var_18] mov rsi, [rbp+var_20] call my_valid_mbcharlen_utf8mb3 mov [rbp+var_4], eax jmp loc_9C96F loc_9C8C3: movzx eax, [rbp+var_21] cmp eax, 0F5h jge loc_9C968 mov rax, [rbp+var_18] add rax, 4 cmp rax, [rbp+var_20] jbe short loc_9C8EC mov [rbp+var_4], 0FFFFFF98h jmp loc_9C96F loc_9C8EC: mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_9C956 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_9C956 mov rax, [rbp+var_18] movzx eax, byte ptr [rax+3] xor eax, 80h cmp eax, 40h ; '@' jge short loc_9C956 movzx eax, [rbp+var_21] cmp eax, 0F1h jge short loc_9C93C mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 90h jl short loc_9C956 loc_9C93C: movzx eax, [rbp+var_21] cmp eax, 0F3h jle short loc_9C95F mov rax, [rbp+var_18] movzx eax, byte ptr [rax+1] cmp eax, 8Fh jle short loc_9C95F loc_9C956: mov [rbp+var_4], 0 jmp short loc_9C96F loc_9C95F: mov [rbp+var_4], 4 jmp short loc_9C96F loc_9C968: mov [rbp+var_4], 0 loc_9C96F: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long my_charlen_utf8mb4(long long a1, unsigned __int8 *a2, unsigned long long a3) { unsigned __int8 v4; // [rsp+Fh] [rbp-21h] if ( (unsigned long long)a2 < a3 ) { v4 = *a2; if ( *a2 >= 0xF0u ) { if ( v4 >= 0xF5u ) { return 0; } else if ( (unsigned long long)(a2 + 4) <= a3 ) { if ( (a2[1] ^ 0x80) < 64 && (a2[2] ^ 0x80) < 64 && (a2[3] ^ 0x80) < 64 && (v4 >= 0xF1u || a2[1] >= 0x90u) && (v4 <= 0xF3u || a2[1] <= 0x8Fu) ) { return 4; } else { return 0; } } else { return (unsigned int)-104; } } else { return (unsigned int)my_valid_mbcharlen_utf8mb3(a2, a3); } } else { return (unsigned int)-101; } }
my_charlen_utf8mb4: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JC 0x0019c89a MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0019c96f LAB_0019c89a: MOV RAX,qword ptr [RBP + -0x18] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x0019c8c3 MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0019d0c0 MOV dword ptr [RBP + -0x4],EAX JMP 0x0019c96f LAB_0019c8c3: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf5 JGE 0x0019c968 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x20] JBE 0x0019c8ec MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x0019c96f LAB_0019c8ec: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0019c956 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0019c956 MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0019c956 MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf1 JGE 0x0019c93c MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x90 JL 0x0019c956 LAB_0019c93c: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf3 JLE 0x0019c95f MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x8f JLE 0x0019c95f LAB_0019c956: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0019c96f LAB_0019c95f: MOV dword ptr [RBP + -0x4],0x4 JMP 0x0019c96f LAB_0019c968: MOV dword ptr [RBP + -0x4],0x0 LAB_0019c96f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 my_charlen_utf8mb4(int8 param_1,byte *param_2,byte *param_3) { byte bVar1; int4 local_c; if (param_2 < param_3) { bVar1 = *param_2; if (bVar1 < 0xf0) { local_c = my_valid_mbcharlen_utf8mb3(param_2,param_3); } else if (bVar1 < 0xf5) { if (param_3 < param_2 + 4) { local_c = 0xffffff98; } else if (((((param_2[1] ^ 0x80) < 0x40) && ((param_2[2] ^ 0x80) < 0x40)) && ((param_2[3] ^ 0x80) < 0x40)) && (((0xf0 < bVar1 || (0x8f < param_2[1])) && ((bVar1 < 0xf4 || (param_2[1] < 0x90)))))) { local_c = 4; } else { local_c = 0; } } else { local_c = 0; } } else { local_c = 0xffffff9b; } return local_c; }
75
gc_decref
bluesky950520[P]quickjs/quickjs.c
static void gc_decref(JSRuntime *rt) { struct list_head *el, *el1; JSGCObjectHeader *p; init_list_head(&rt->tmp_obj_list); /* decrement the refcount of all the children of all the GC objects and move the GC objects with zero refcount to tmp_obj_list */ list_for_each_safe(el, el1, &rt->gc_obj_list) { p = list_entry(el, JSGCObjectHeader, link); assert(p->mark == 0); mark_children(rt, p, gc_decref_child); p->mark = 1; if (p->ref_count == 0) { list_del(&p->link); list_add_tail(&p->link, &rt->tmp_obj_list); } } }
O0
c
gc_decref: subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq 0x20(%rsp), %rdi addq $0xb8, %rdi callq 0x210d0 movq 0x20(%rsp), %rax movq 0xa0(%rax), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax movq 0x20(%rsp), %rcx addq $0x98, %rcx cmpq %rcx, %rax je 0x29a49 movq 0x18(%rsp), %rax addq $-0x8, %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rsi leaq 0x34a6e(%rip), %rdx # 0x5e450 callq 0x5df50 movq 0x8(%rsp), %rax movb 0x4(%rax), %cl andb $0xf, %cl orb $0x10, %cl movb %cl, 0x4(%rax) movq 0x8(%rsp), %rax cmpl $0x0, (%rax) jne 0x29a2a movq 0x8(%rsp), %rdi addq $0x8, %rdi callq 0x22970 movq 0x8(%rsp), %rdi addq $0x8, %rdi movq 0x20(%rsp), %rsi addq $0xb8, %rsi callq 0x22790 jmp 0x29a2c movq 0x10(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0x299a9 addq $0x28, %rsp retq nop
gc_decref: sub rsp, 28h mov [rsp+28h+var_8], rdi mov rdi, [rsp+28h+var_8] add rdi, 0B8h call init_list_head_0 mov rax, [rsp+28h+var_8] mov rax, [rax+0A0h] mov [rsp+28h+var_10], rax mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov [rsp+28h+var_18], rax loc_299A9: mov rax, [rsp+28h+var_10] mov rcx, [rsp+28h+var_8] add rcx, 98h cmp rax, rcx jz loc_29A49 mov rax, [rsp+28h+var_10] add rax, 0FFFFFFFFFFFFFFF8h mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_8] mov rsi, [rsp+28h+var_20] lea rdx, gc_decref_child call mark_children mov rax, [rsp+28h+var_20] mov cl, [rax+4] and cl, 0Fh or cl, 10h mov [rax+4], cl mov rax, [rsp+28h+var_20] cmp dword ptr [rax], 0 jnz short loc_29A2A mov rdi, [rsp+28h+var_20] add rdi, 8 call list_del_0 mov rdi, [rsp+28h+var_20] add rdi, 8 mov rsi, [rsp+28h+var_8] add rsi, 0B8h call list_add_tail_0 loc_29A2A: jmp short $+2 loc_29A2C: mov rax, [rsp+28h+var_18] mov [rsp+28h+var_10], rax mov rax, [rsp+28h+var_10] mov rax, [rax+8] mov [rsp+28h+var_18], rax jmp loc_299A9 loc_29A49: add rsp, 28h retn
_QWORD * gc_decref(_QWORD *a1) { _QWORD *result; // rax _QWORD *i; // [rsp+10h] [rbp-18h] _QWORD *v3; // [rsp+18h] [rbp-10h] init_list_head_0(a1 + 23); v3 = (_QWORD *)a1[20]; for ( i = (_QWORD *)v3[1]; ; i = (_QWORD *)i[1] ) { result = v3; if ( v3 == a1 + 19 ) break; mark_children(a1, v3 - 1, gc_decref_child); *((_BYTE *)v3 - 4) = *((_BYTE *)v3 - 4) & 0xF | 0x10; if ( !*((_DWORD *)v3 - 2) ) { list_del_0(v3); list_add_tail_0((long long)v3, a1 + 23); } v3 = i; } return result; }
gc_decref: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV RDI,qword ptr [RSP + 0x20] ADD RDI,0xb8 CALL 0x001210d0 MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX LAB_001299a9: MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x20] ADD RCX,0x98 CMP RAX,RCX JZ 0x00129a49 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,-0x8 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x8] LEA RDX,[0x15e450] CALL 0x0015df50 MOV RAX,qword ptr [RSP + 0x8] MOV CL,byte ptr [RAX + 0x4] AND CL,0xf OR CL,0x10 MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX],0x0 JNZ 0x00129a2a MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 CALL 0x00122970 MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 MOV RSI,qword ptr [RSP + 0x20] ADD RSI,0xb8 CALL 0x00122790 LAB_00129a2a: JMP 0x00129a2c LAB_00129a2c: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x001299a9 LAB_00129a49: ADD RSP,0x28 RET
void gc_decref(long param_1) { long local_18; long local_10; init_list_head(param_1 + 0xb8); local_10 = *(long *)(param_1 + 0xa0); local_18 = *(long *)(local_10 + 8); while (local_10 != param_1 + 0x98) { mark_children(param_1,(int *)(local_10 + -8),gc_decref_child); *(byte *)(local_10 + -4) = *(byte *)(local_10 + -4) & 0xf | 0x10; if (*(int *)(local_10 + -8) == 0) { list_del(local_10); list_add_tail(local_10,param_1 + 0xb8); } local_10 = local_18; local_18 = *(long *)(local_18 + 8); } return; }
76
families_to_flags(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
msxemulator/build_O0/_deps/picotool-src/main.cpp
uint32_t families_to_flags(std::vector<string> families) { uint32_t ret = 0; for (auto family : families) { if (family == data_family_name) { ret |= PICOBIN_PARTITION_FLAGS_ACCEPTS_DEFAULT_FAMILY_DATA_BITS; } else if (family == absolute_family_name) { ret |= PICOBIN_PARTITION_FLAGS_ACCEPTS_DEFAULT_FAMILY_ABSOLUTE_BITS; } else if (family == rp2040_family_name) { ret |= PICOBIN_PARTITION_FLAGS_ACCEPTS_DEFAULT_FAMILY_RP2040_BITS; } else if (family == rp2350_arm_s_family_name) { ret |= PICOBIN_PARTITION_FLAGS_ACCEPTS_DEFAULT_FAMILY_RP2350_ARM_S_BITS; } else if (family == rp2350_arm_ns_family_name) { ret |= PICOBIN_PARTITION_FLAGS_ACCEPTS_DEFAULT_FAMILY_RP2350_ARM_NS_BITS; } else if (family == rp2350_riscv_family_name) { ret |= PICOBIN_PARTITION_FLAGS_ACCEPTS_DEFAULT_FAMILY_RP2350_RISCV_BITS; } } return ret; }
O0
cpp
families_to_flags(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movl $0x0, 0x3c(%rsp) movq %rdi, 0x30(%rsp) movq 0x30(%rsp), %rdi callq 0x577b0 movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rdi callq 0x5dc40 movq %rax, 0x20(%rsp) leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rsi callq 0x62130 testb $0x1, %al jne 0x469bc jmp 0x46ace leaq 0x28(%rsp), %rdi callq 0x62170 movq %rax, %rsi movq %rsp, %rdi callq 0xf2b0 movq %rsp, %rdi leaq 0x19c0dd(%rip), %rsi # 0x1e2ab8 callq 0x57620 testb $0x1, %al jne 0x469e6 jmp 0x469f8 movl 0x3c(%rsp), %eax orl $0x10000, %eax # imm = 0x10000 movl %eax, 0x3c(%rsp) jmp 0x46ab7 movq %rsp, %rdi leaq 0x19c0d6(%rip), %rsi # 0x1e2ad8 callq 0x57620 testb $0x1, %al jne 0x46a0d jmp 0x46a1f movl 0x3c(%rsp), %eax orl $0x8000, %eax # imm = 0x8000 movl %eax, 0x3c(%rsp) jmp 0x46ab5 movq %rsp, %rdi leaq 0x19c0cf(%rip), %rsi # 0x1e2af8 callq 0x57620 testb $0x1, %al jne 0x46a34 jmp 0x46a43 movl 0x3c(%rsp), %eax orl $0x4000, %eax # imm = 0x4000 movl %eax, 0x3c(%rsp) jmp 0x46ab3 movq %rsp, %rdi leaq 0x19c0cb(%rip), %rsi # 0x1e2b18 callq 0x57620 testb $0x1, %al jne 0x46a58 jmp 0x46a67 movl 0x3c(%rsp), %eax orl $0x20000, %eax # imm = 0x20000 movl %eax, 0x3c(%rsp) jmp 0x46ab1 movq %rsp, %rdi leaq 0x19c0c7(%rip), %rsi # 0x1e2b38 callq 0x57620 testb $0x1, %al jne 0x46a7c jmp 0x46a8b movl 0x3c(%rsp), %eax orl $0x80000, %eax # imm = 0x80000 movl %eax, 0x3c(%rsp) jmp 0x46aaf movq %rsp, %rdi leaq 0x19c0c3(%rip), %rsi # 0x1e2b58 callq 0x57620 testb $0x1, %al jne 0x46aa0 jmp 0x46aad movl 0x3c(%rsp), %eax orl $0x40000, %eax # imm = 0x40000 movl %eax, 0x3c(%rsp) jmp 0x46aaf jmp 0x46ab1 jmp 0x46ab3 jmp 0x46ab5 jmp 0x46ab7 movq %rsp, %rdi callq 0xfb10 leaq 0x28(%rsp), %rdi callq 0x624f0 jmp 0x469a4 movl 0x3c(%rsp), %eax addq $0x48, %rsp retq nopw (%rax,%rax)
_Z17families_to_flagsSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_C], 0 mov [rsp+48h+var_18], rdi mov rdi, [rsp+48h+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rsp+48h+var_20], rax mov rdi, [rsp+48h+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rsp+48h+var_28], rax loc_469A4: lea rdi, [rsp+48h+var_20] lea rsi, [rsp+48h+var_28] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_469BC jmp loc_46ACE loc_469BC: lea rdi, [rsp+48h+var_20] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov rsi, rax mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) mov rdi, rsp lea rsi, _ZL16data_family_nameB5cxx11; data_family_name call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, 1 jnz short loc_469E6 jmp short loc_469F8 loc_469E6: mov eax, [rsp+48h+var_C] or eax, 10000h mov [rsp+48h+var_C], eax jmp loc_46AB7 loc_469F8: mov rdi, rsp lea rsi, _ZL20absolute_family_nameB5cxx11; absolute_family_name call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, 1 jnz short loc_46A0D jmp short loc_46A1F loc_46A0D: mov eax, [rsp+48h+var_C] or eax, 8000h mov [rsp+48h+var_C], eax jmp loc_46AB5 loc_46A1F: mov rdi, rsp lea rsi, _ZL18rp2040_family_nameB5cxx11; rp2040_family_name call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, 1 jnz short loc_46A34 jmp short loc_46A43 loc_46A34: mov eax, [rsp+48h+var_C] or eax, 4000h mov [rsp+48h+var_C], eax jmp short loc_46AB3 loc_46A43: mov rdi, rsp lea rsi, _ZL24rp2350_arm_s_family_nameB5cxx11; rp2350_arm_s_family_name call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, 1 jnz short loc_46A58 jmp short loc_46A67 loc_46A58: mov eax, [rsp+48h+var_C] or eax, 20000h mov [rsp+48h+var_C], eax jmp short loc_46AB1 loc_46A67: mov rdi, rsp lea rsi, _ZL25rp2350_arm_ns_family_nameB5cxx11; rp2350_arm_ns_family_name call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, 1 jnz short loc_46A7C jmp short loc_46A8B loc_46A7C: mov eax, [rsp+48h+var_C] or eax, 80000h mov [rsp+48h+var_C], eax jmp short loc_46AAF loc_46A8B: mov rdi, rsp lea rsi, _ZL24rp2350_riscv_family_nameB5cxx11; rp2350_riscv_family_name call _ZSteqIcEN9__gnu_cxx11__enable_ifIXsr9__is_charIT_EE7__valueEbE6__typeERKNSt7__cxx1112basic_stringIS2_St11char_traitsIS2_ESaIS2_EEESC_ test al, 1 jnz short loc_46AA0 jmp short loc_46AAD loc_46AA0: mov eax, [rsp+48h+var_C] or eax, 40000h mov [rsp+48h+var_C], eax loc_46AAD: jmp short $+2 loc_46AAF: jmp short $+2 loc_46AB1: jmp short $+2 loc_46AB3: jmp short $+2 loc_46AB5: jmp short $+2 loc_46AB7: mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+48h+var_20] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp loc_469A4 loc_46ACE: mov eax, [rsp+48h+var_C] add rsp, 48h retn
long long families_to_flags(long long a1) { long long v1; // rax _BYTE v3[32]; // [rsp+0h] [rbp-48h] BYREF long long v4; // [rsp+20h] [rbp-28h] BYREF _QWORD v5[2]; // [rsp+28h] [rbp-20h] BYREF unsigned int v6; // [rsp+3Ch] [rbp-Ch] long long v7; // [rsp+40h] [rbp-8h] v7 = a1; v6 = 0; v5[1] = a1; v5[0] = std::vector<std::string>::begin(a1); v4 = std::vector<std::string>::end(a1); while ( (__gnu_cxx::operator!=<std::string *,std::vector<std::string>>(v5, &v4) & 1) != 0 ) { v1 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(v5); std::string::basic_string(v3, v1); if ( (std::operator==<char>(v3, &data_family_name[abi:cxx11]) & 1) != 0 ) { v6 |= 0x10000u; } else if ( (std::operator==<char>(v3, &absolute_family_name[abi:cxx11]) & 1) != 0 ) { v6 |= 0x8000u; } else if ( (std::operator==<char>(v3, &rp2040_family_name[abi:cxx11]) & 1) != 0 ) { v6 |= 0x4000u; } else if ( (std::operator==<char>(v3, &rp2350_arm_s_family_name[abi:cxx11]) & 1) != 0 ) { v6 |= 0x20000u; } else if ( (std::operator==<char>(v3, &rp2350_arm_ns_family_name[abi:cxx11]) & 1) != 0 ) { v6 |= 0x80000u; } else if ( (std::operator==<char>(v3, &rp2350_riscv_family_name[abi:cxx11]) & 1) != 0 ) { v6 |= 0x40000u; } std::string::~string(v3); __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v5); } return v6; }
families_to_flags: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV dword ptr [RSP + 0x3c],0x0 MOV qword ptr [RSP + 0x30],RDI MOV RDI,qword ptr [RSP + 0x30] CALL 0x001577b0 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x30] CALL 0x0015dc40 MOV qword ptr [RSP + 0x20],RAX LAB_001469a4: LEA RDI,[RSP + 0x28] LEA RSI,[RSP + 0x20] CALL 0x00162130 TEST AL,0x1 JNZ 0x001469bc JMP 0x00146ace LAB_001469bc: LEA RDI,[RSP + 0x28] CALL 0x00162170 MOV RSI,RAX MOV RDI,RSP CALL 0x0010f2b0 MOV RDI,RSP LEA RSI,[0x2e2ab8] CALL 0x00157620 TEST AL,0x1 JNZ 0x001469e6 JMP 0x001469f8 LAB_001469e6: MOV EAX,dword ptr [RSP + 0x3c] OR EAX,0x10000 MOV dword ptr [RSP + 0x3c],EAX JMP 0x00146ab7 LAB_001469f8: MOV RDI,RSP LEA RSI,[0x2e2ad8] CALL 0x00157620 TEST AL,0x1 JNZ 0x00146a0d JMP 0x00146a1f LAB_00146a0d: MOV EAX,dword ptr [RSP + 0x3c] OR EAX,0x8000 MOV dword ptr [RSP + 0x3c],EAX JMP 0x00146ab5 LAB_00146a1f: MOV RDI,RSP LEA RSI,[0x2e2af8] CALL 0x00157620 TEST AL,0x1 JNZ 0x00146a34 JMP 0x00146a43 LAB_00146a34: MOV EAX,dword ptr [RSP + 0x3c] OR EAX,0x4000 MOV dword ptr [RSP + 0x3c],EAX JMP 0x00146ab3 LAB_00146a43: MOV RDI,RSP LEA RSI,[0x2e2b18] CALL 0x00157620 TEST AL,0x1 JNZ 0x00146a58 JMP 0x00146a67 LAB_00146a58: MOV EAX,dword ptr [RSP + 0x3c] OR EAX,0x20000 MOV dword ptr [RSP + 0x3c],EAX JMP 0x00146ab1 LAB_00146a67: MOV RDI,RSP LEA RSI,[0x2e2b38] CALL 0x00157620 TEST AL,0x1 JNZ 0x00146a7c JMP 0x00146a8b LAB_00146a7c: MOV EAX,dword ptr [RSP + 0x3c] OR EAX,0x80000 MOV dword ptr [RSP + 0x3c],EAX JMP 0x00146aaf LAB_00146a8b: MOV RDI,RSP LEA RSI,[0x2e2b58] CALL 0x00157620 TEST AL,0x1 JNZ 0x00146aa0 JMP 0x00146aad LAB_00146aa0: MOV EAX,dword ptr [RSP + 0x3c] OR EAX,0x40000 MOV dword ptr [RSP + 0x3c],EAX LAB_00146aad: JMP 0x00146aaf LAB_00146aaf: JMP 0x00146ab1 LAB_00146ab1: JMP 0x00146ab3 LAB_00146ab3: JMP 0x00146ab5 LAB_00146ab5: JMP 0x00146ab7 LAB_00146ab7: MOV RDI,RSP CALL 0x0010fb10 LEA RDI,[RSP + 0x28] CALL 0x001624f0 JMP 0x001469a4 LAB_00146ace: MOV EAX,dword ptr [RSP + 0x3c] ADD RSP,0x48 RET
/* families_to_flags(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >) */ uint families_to_flags(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *param_1) { bool bVar1; string *psVar2; ulong uVar3; string asStack_48 [32]; int8 local_28; int8 local_20; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18; uint local_c; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_8; local_c = 0; local_18 = param_1; local_8 = param_1; local_20 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(param_1); local_28 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_18); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_20,(__normal_iterator *)&local_28), bVar1) { psVar2 = (string *) __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_20); std::__cxx11::string::string(asStack_48,psVar2); uVar3 = std::operator==(asStack_48,(string *)data_family_name_abi_cxx11_); if ((uVar3 & 1) == 0) { uVar3 = std::operator==(asStack_48,(string *)absolute_family_name_abi_cxx11_); if ((uVar3 & 1) == 0) { uVar3 = std::operator==(asStack_48,(string *)rp2040_family_name_abi_cxx11_); if ((uVar3 & 1) == 0) { uVar3 = std::operator==(asStack_48,(string *)rp2350_arm_s_family_name_abi_cxx11_); if ((uVar3 & 1) == 0) { uVar3 = std::operator==(asStack_48,(string *)rp2350_arm_ns_family_name_abi_cxx11_); if ((uVar3 & 1) == 0) { uVar3 = std::operator==(asStack_48,(string *)rp2350_riscv_family_name_abi_cxx11_); if ((uVar3 & 1) != 0) { local_c = local_c | 0x40000; } } else { local_c = local_c | 0x80000; } } else { local_c = local_c | 0x20000; } } else { local_c = local_c | 0x4000; } } else { local_c = local_c | 0x8000; } } else { local_c = local_c | 0x10000; } std::__cxx11::string::~string(asStack_48); __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_20); } return local_c; }
77
strmake_root
eloqsql/mysys/my_alloc.c
char *strmake_root(MEM_ROOT *root, const char *str, size_t len) { char *pos; if ((pos=alloc_root(root,len+1))) { if (len) memcpy(pos,str,len); pos[len]=0; } return pos; }
O3
c
strmake_root: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 leaq 0x1(%rdx), %rsi callq 0x27567 movq %rax, %r15 testq %rax, %rax je 0x27962 testq %rbx, %rbx je 0x2795d movq %r15, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x24220 movb $0x0, (%r15,%rbx) movq %r15, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
strmake_root: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdx mov r14, rsi lea rsi, [rdx+1] call alloc_root mov r15, rax test rax, rax jz short loc_27962 test rbx, rbx jz short loc_2795D mov rdi, r15 mov rsi, r14 mov rdx, rbx call _memcpy loc_2795D: mov byte ptr [r15+rbx], 0 loc_27962: mov rax, r15 add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
char * strmake_root(long long a1, long long a2, long long a3) { char *v4; // rax char *v5; // r15 v4 = alloc_root(a1, a3 + 1); v5 = v4; if ( v4 ) { if ( a3 ) memcpy(v4, a2, a3); v5[a3] = 0; } return v5; }
strmake_root: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI LEA RSI,[RDX + 0x1] CALL 0x00127567 MOV R15,RAX TEST RAX,RAX JZ 0x00127962 TEST RBX,RBX JZ 0x0012795d MOV RDI,R15 MOV RSI,R14 MOV RDX,RBX CALL 0x00124220 LAB_0012795d: MOV byte ptr [R15 + RBX*0x1],0x0 LAB_00127962: MOV RAX,R15 ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
void * strmake_root(int8 param_1,void *param_2,size_t param_3) { void *__dest; __dest = (void *)alloc_root(param_1,param_3 + 1); if (__dest != (void *)0x0) { if (param_3 != 0) { memcpy(__dest,param_2,param_3); } *(int1 *)((long)__dest + param_3) = 0; } return __dest; }
78
ok
eloqsql/unittest/mytap/tap.c
void ok(int pass, char const *fmt, ...) { va_list ap; va_start(ap, fmt); if (!pass && *g_test.todo == '\0') ++g_test.failed; vemit_tap(pass, fmt, ap); va_end(ap); if (*g_test.todo != '\0') emit_dir("todo", g_test.todo); emit_endl(); }
O0
c
ok: pushq %rbp movq %rsp, %rbp subq $0xe0, %rsp testb %al, %al je 0x25038 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) movq %r9, -0xb8(%rbp) movq %r8, -0xc0(%rbp) movq %rcx, -0xc8(%rbp) movq %rdx, -0xd0(%rbp) movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) leaq -0x30(%rbp), %rax leaq -0xe0(%rbp), %rcx movq %rcx, 0x10(%rax) leaq 0x10(%rbp), %rcx movq %rcx, 0x8(%rax) movl $0x30, 0x4(%rax) movl $0x10, (%rax) cmpl $0x0, -0x4(%rbp) jne 0x250a0 movsbl 0x368748(%rip), %eax # 0x38d7d4 cmpl $0x0, %eax jne 0x250a0 movl 0x368739(%rip), %eax # 0x38d7d0 addl $0x1, %eax movl %eax, 0x368730(%rip) # 0x38d7d0 movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi leaq -0x30(%rbp), %rdx callq 0x250f0 leaq -0x30(%rbp), %rax movsbl 0x368719(%rip), %eax # 0x38d7d4 cmpl $0x0, %eax je 0x250d7 leaq 0x5b197(%rip), %rdi # 0x8025e leaq 0x3686fa(%rip), %rsi # 0x38d7c8 addq $0xc, %rsi callq 0x251d0 callq 0x25630 addq $0xe0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ok: push rbp mov rbp, rsp sub rsp, 0E0h test al, al jz short loc_25038 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_25038: mov [rbp+var_B8], r9 mov [rbp+var_C0], r8 mov [rbp+var_C8], rcx mov [rbp+var_D0], rdx mov [rbp+var_4], edi mov [rbp+var_10], rsi lea rax, [rbp+var_30] lea rcx, [rbp+var_E0] mov [rax+10h], rcx lea rcx, [rbp+arg_0] mov [rax+8], rcx mov dword ptr [rax+4], 30h ; '0' mov dword ptr [rax], 10h cmp [rbp+var_4], 0 jnz short loc_250A0 movsx eax, cs:byte_38D7D4 cmp eax, 0 jnz short loc_250A0 mov eax, cs:dword_38D7D0 add eax, 1 mov cs:dword_38D7D0, eax loc_250A0: mov edi, [rbp+var_4] mov rsi, [rbp+var_10] lea rdx, [rbp+var_30] call vemit_tap lea rax, [rbp+var_30] movsx eax, cs:byte_38D7D4 cmp eax, 0 jz short loc_250D7 lea rdi, aTodo; "todo" lea rsi, g_test add rsi, 0Ch call emit_dir loc_250D7: call emit_endl add rsp, 0E0h pop rbp retn
long long ok(unsigned int a1, long long a2, ...) { va_list va; // [rsp+B0h] [rbp-30h] BYREF long long v4; // [rsp+D0h] [rbp-10h] unsigned int v5; // [rsp+DCh] [rbp-4h] va_start(va, a2); v5 = a1; v4 = a2; if ( !a1 && !byte_38D7D4 ) ++dword_38D7D0; vemit_tap(v5, v4, va); if ( byte_38D7D4 ) emit_dir("todo", &g_test + 3); return emit_endl(); }
ok: PUSH RBP MOV RBP,RSP SUB RSP,0xe0 TEST AL,AL JZ 0x00125038 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_00125038: MOV qword ptr [RBP + -0xb8],R9 MOV qword ptr [RBP + -0xc0],R8 MOV qword ptr [RBP + -0xc8],RCX MOV qword ptr [RBP + -0xd0],RDX MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI LEA RAX,[RBP + -0x30] LEA RCX,[RBP + -0xe0] MOV qword ptr [RAX + 0x10],RCX LEA RCX,[RBP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RAX + 0x4],0x30 MOV dword ptr [RAX],0x10 CMP dword ptr [RBP + -0x4],0x0 JNZ 0x001250a0 MOVSX EAX,byte ptr [0x0048d7d4] CMP EAX,0x0 JNZ 0x001250a0 MOV EAX,dword ptr [0x0048d7d0] ADD EAX,0x1 MOV dword ptr [0x0048d7d0],EAX LAB_001250a0: MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] LEA RDX,[RBP + -0x30] CALL 0x001250f0 LEA RAX,[RBP + -0x30] MOVSX EAX,byte ptr [0x0048d7d4] CMP EAX,0x0 JZ 0x001250d7 LEA RDI,[0x18025e] LEA RSI,[0x48d7c8] ADD RSI,0xc CALL 0x001251d0 LAB_001250d7: CALL 0x00125630 ADD RSP,0xe0 POP RBP RET
void ok(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8,int param_9, int8 param_10,int8 param_11,int8 param_12,int8 param_13, int8 param_14) { char in_AL; int1 local_e8 [16]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int4 local_38; int4 local_34; int1 *local_30; int1 *local_28; int8 local_18; int local_c; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_28 = local_e8; local_30 = &stack0x00000008; local_34 = 0x30; local_38 = 0x10; if ((param_9 == 0) && (DAT_0048d7d4 == '\0')) { DAT_0048d7d0 = DAT_0048d7d0 + 1; } local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; local_18 = param_10; local_c = param_9; vemit_tap(param_9,param_10,&local_38); if (DAT_0048d7d4 != '\0') { emit_dir(&DAT_0018025e,&DAT_0048d7d4); } emit_endl(); return; }
79
spdlog::details::z_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v8::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/pattern_formatter-inl.h
void format(const details::log_msg &msg, const std::tm &tm_time, memory_buf_t &dest) override { const size_t field_size = 6; ScopedPadder p(field_size, padinfo_, dest); auto total_minutes = get_cached_offset(msg, tm_time); bool is_negative = total_minutes < 0; if (is_negative) { total_minutes = -total_minutes; dest.push_back('-'); } else { dest.push_back('+'); } fmt_helper::pad2(total_minutes / 60, dest); // hours dest.push_back(':'); fmt_helper::pad2(total_minutes % 60, dest); // minutes }
O0
c
spdlog::details::z_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v8::basic_memory_buffer<char, 250ul, std::allocator<char>>&): subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movq %rcx, 0x28(%rsp) movq 0x40(%rsp), %rdx movq %rdx, 0x8(%rsp) movq $0x6, 0x20(%rsp) addq $0x8, %rdx movq 0x28(%rsp), %rcx leaq 0x1f(%rsp), %rdi movl $0x6, %esi callq 0xf3330 movq 0x8(%rsp), %rdi movq 0x38(%rsp), %rsi movq 0x30(%rsp), %rdx callq 0xfbe20 movl %eax, 0x18(%rsp) cmpl $0x0, 0x18(%rsp) setl %al andb $0x1, %al movb %al, 0x17(%rsp) testb $0x1, 0x17(%rsp) je 0xfbdc0 xorl %eax, %eax subl 0x18(%rsp), %eax movl %eax, 0x18(%rsp) movq 0x28(%rsp), %rdi movb $0x2d, 0x16(%rsp) leaq 0x16(%rsp), %rsi callq 0x9a6a0 jmp 0xfbdd4 movq 0x28(%rsp), %rdi movb $0x2b, 0x15(%rsp) leaq 0x15(%rsp), %rsi callq 0x9a6a0 movl 0x18(%rsp), %eax movl $0x3c, %ecx cltd idivl %ecx movl %eax, %edi movq 0x28(%rsp), %rsi callq 0xdaf90 movq 0x28(%rsp), %rdi movb $0x3a, 0x14(%rsp) leaq 0x14(%rsp), %rsi callq 0x9a6a0 movl 0x18(%rsp), %eax movl $0x3c, %ecx cltd idivl %ecx movl %edx, %edi movq 0x28(%rsp), %rsi callq 0xdaf90 addq $0x48, %rsp retq nopl (%rax)
_ZN6spdlog7details11z_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx mov [rsp+48h+var_20], rcx mov rdx, [rsp+48h+var_8] mov [rsp+48h+var_40], rdx mov [rsp+48h+var_28], 6 add rdx, 8 mov rcx, [rsp+48h+var_20] lea rdi, [rsp+48h+var_29] mov esi, 6 call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rdi, [rsp+48h+var_40] mov rsi, [rsp+48h+var_10] mov rdx, [rsp+48h+var_18] call _ZN6spdlog7details11z_formatterINS0_18null_scoped_padderEE17get_cached_offsetERKNS0_7log_msgERK2tm; spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::get_cached_offset(spdlog::details::log_msg const&,tm const&) mov [rsp+48h+var_30], eax cmp [rsp+48h+var_30], 0 setl al and al, 1 mov [rsp+48h+var_31], al test [rsp+48h+var_31], 1 jz short loc_FBDC0 xor eax, eax sub eax, [rsp+48h+var_30] mov [rsp+48h+var_30], eax mov rdi, [rsp+48h+var_20] mov [rsp+48h+var_32], 2Dh ; '-' lea rsi, [rsp+48h+var_32] call _ZN3fmt2v86detail6bufferIcE9push_backERKc; fmt::v8::detail::buffer<char>::push_back(char const&) jmp short loc_FBDD4 loc_FBDC0: mov rdi, [rsp+48h+var_20] mov [rsp+48h+var_33], 2Bh ; '+' lea rsi, [rsp+48h+var_33] call _ZN3fmt2v86detail6bufferIcE9push_backERKc; fmt::v8::detail::buffer<char>::push_back(char const&) loc_FBDD4: mov eax, [rsp+48h+var_30] mov ecx, 3Ch ; '<' cdq idiv ecx mov edi, eax mov rsi, [rsp+48h+var_20] call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rdi, [rsp+48h+var_20] mov [rsp+48h+var_34], 3Ah ; ':' lea rsi, [rsp+48h+var_34] call _ZN3fmt2v86detail6bufferIcE9push_backERKc; fmt::v8::detail::buffer<char>::push_back(char const&) mov eax, [rsp+48h+var_30] mov ecx, 3Ch ; '<' cdq idiv ecx mov edi, edx mov rsi, [rsp+48h+var_20] call _ZN6spdlog7details10fmt_helper4pad2EiRN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::pad2(int,fmt::v8::basic_memory_buffer<char,250ul,std::allocator<char>> &) add rsp, 48h retn
long long spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format( long long a1, long long a2, long long a3, long long a4) { char v5; // [rsp+14h] [rbp-34h] BYREF char v6; // [rsp+15h] [rbp-33h] BYREF char v7[2]; // [rsp+16h] [rbp-32h] BYREF int cached_offset; // [rsp+18h] [rbp-30h] long long v9; // [rsp+20h] [rbp-28h] long long v10; // [rsp+28h] [rbp-20h] long long v11; // [rsp+30h] [rbp-18h] long long v12; // [rsp+38h] [rbp-10h] long long v13; // [rsp+40h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = 6LL; spdlog::details::null_scoped_padder::null_scoped_padder(); cached_offset = spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::get_cached_offset(a1, a2, v11); v7[1] = cached_offset < 0; if ( cached_offset >= 0 ) { v6 = 43; fmt::v8::detail::buffer<char>::push_back(v10, &v6); } else { cached_offset = -cached_offset; v7[0] = 45; fmt::v8::detail::buffer<char>::push_back(v10, v7); } spdlog::details::fmt_helper::pad2(cached_offset / 60, v10); v5 = 58; fmt::v8::detail::buffer<char>::push_back(v10, &v5); return spdlog::details::fmt_helper::pad2(cached_offset % 60, v10); }
format: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x28],RCX MOV RDX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x20],0x6 ADD RDX,0x8 MOV RCX,qword ptr [RSP + 0x28] LEA RDI,[RSP + 0x1f] MOV ESI,0x6 CALL 0x001f3330 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x38] MOV RDX,qword ptr [RSP + 0x30] CALL 0x001fbe20 MOV dword ptr [RSP + 0x18],EAX CMP dword ptr [RSP + 0x18],0x0 SETL AL AND AL,0x1 MOV byte ptr [RSP + 0x17],AL TEST byte ptr [RSP + 0x17],0x1 JZ 0x001fbdc0 XOR EAX,EAX SUB EAX,dword ptr [RSP + 0x18] MOV dword ptr [RSP + 0x18],EAX MOV RDI,qword ptr [RSP + 0x28] MOV byte ptr [RSP + 0x16],0x2d LEA RSI,[RSP + 0x16] CALL 0x0019a6a0 JMP 0x001fbdd4 LAB_001fbdc0: MOV RDI,qword ptr [RSP + 0x28] MOV byte ptr [RSP + 0x15],0x2b LEA RSI,[RSP + 0x15] CALL 0x0019a6a0 LAB_001fbdd4: MOV EAX,dword ptr [RSP + 0x18] MOV ECX,0x3c CDQ IDIV ECX MOV EDI,EAX MOV RSI,qword ptr [RSP + 0x28] CALL 0x001daf90 MOV RDI,qword ptr [RSP + 0x28] MOV byte ptr [RSP + 0x14],0x3a LEA RSI,[RSP + 0x14] CALL 0x0019a6a0 MOV EAX,dword ptr [RSP + 0x18] MOV ECX,0x3c CDQ IDIV ECX MOV EDI,EDX MOV RSI,qword ptr [RSP + 0x28] CALL 0x001daf90 ADD RSP,0x48 RET
/* spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v8::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */ void __thiscall spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format (z_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,tm *param_2, basic_memory_buffer *param_3) { char local_34 [4]; int local_30; null_scoped_padder local_29; int8 local_28; basic_memory_buffer *local_20; tm *local_18; log_msg *local_10; z_formatter<spdlog::details::null_scoped_padder> *local_8; local_28 = 6; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; null_scoped_padder::null_scoped_padder(&local_29,6,(padding_info *)(this + 8),param_3); local_30 = get_cached_offset(this,local_10,local_18); local_34[3] = local_30 < 0; if ((bool)local_34[3]) { local_30 = -local_30; local_34[2] = 0x2d; fmt::v8::detail::buffer<char>::push_back((buffer<char> *)local_20,local_34 + 2); } else { local_34[1] = 0x2b; fmt::v8::detail::buffer<char>::push_back((buffer<char> *)local_20,local_34 + 1); } fmt_helper::pad2(local_30 / 0x3c,local_20); local_34[0] = ':'; fmt::v8::detail::buffer<char>::push_back((buffer<char> *)local_20,local_34); fmt_helper::pad2(local_30 % 0x3c,local_20); return; }
80
spdlog::details::z_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v8::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
aimrt_mujoco_sim/_deps/spdlog_lib-src/include/spdlog/pattern_formatter-inl.h
void format(const details::log_msg &msg, const std::tm &tm_time, memory_buf_t &dest) override { const size_t field_size = 6; ScopedPadder p(field_size, padinfo_, dest); auto total_minutes = get_cached_offset(msg, tm_time); bool is_negative = total_minutes < 0; if (is_negative) { total_minutes = -total_minutes; dest.push_back('-'); } else { dest.push_back('+'); } fmt_helper::pad2(total_minutes / 60, dest); // hours dest.push_back(':'); fmt_helper::pad2(total_minutes % 60, dest); // minutes }
O3
c
spdlog::details::z_formatter<spdlog::details::scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v8::basic_memory_buffer<char, 250ul, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x40, %rsp movq %rcx, %rbx movq 0x18(%rsi), %rsi movq %rsi, %rax subq 0x18(%rdi), %rax movabsq $0x2540be3ff, %rcx # imm = 0x2540BE3FF cmpq %rcx, %rax jle 0x43641 movq 0x28(%rdx), %rcx movabsq $-0x7777777777777777, %rdx # imm = 0x8888888888888889 movq %rcx, %rax imulq %rdx movq %rdx, %r14 addq %rcx, %r14 movq %r14, %rax shrq $0x3f, %rax shrq $0x5, %r14 addl %eax, %r14d movl %r14d, 0x20(%rdi) movq %rsi, 0x18(%rdi) jmp 0x43645 movl 0x20(%rdi), %r14d testl %r14d, %r14d js 0x43676 movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x43668 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb $0x2b, (%rcx,%rax) jmp 0x436a3 movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x43694 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi negl %r14d movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb $0x2d, (%rcx,%rax) movl %r14d, %ecx movl $0x88888889, %eax # imm = 0x88888889 imulq %rcx, %rax shrq $0x25, %rax imull $0x3c, %eax, %ebp cmpl $0x176f, %r14d # imm = 0x176F ja 0x43736 movzbl %al, %r15d imull $0xcd, %r15d, %r12d shrl $0xb, %r12d leal (%r12,%r12), %eax leal (%rax,%rax,4), %eax subb %al, %r15b orb $0x30, %r12b movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x436fa movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb %r12b, (%rcx,%rax) orb $0x30, %r15b movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x43728 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb %r15b, (%rcx,%rax) jmp 0x43776 movl %eax, %eax movq %rsp, %r8 movq %rax, (%r8) movq 0x10(%rbx), %rax leaq 0x18(%rsp), %rdi movq %rax, 0x10(%rdi) movq %rax, 0x18(%rdi) leaq 0x18f42(%rip), %rax # 0x5c698 movq %rax, (%rdi) movq %rbx, 0x20(%rdi) leaq 0x7c0b(%rip), %rsi # 0x4b36f movl $0x5, %edx movl $0x1, %ecx xorl %r9d, %r9d callq 0x2b306 subl %ebp, %r14d movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x43797 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb $0x3a, (%rcx,%rax) movzbl %r14b, %eax imull $0xcd, %eax, %r15d shrl $0xb, %r15d leal (%r15,%r15), %eax leal (%rax,%rax,4), %ebp orb $0x30, %r15b movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x437db movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi subb %bpl, %r14b movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb %r15b, (%rcx,%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x43808 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi orb $0x30, %r14b movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb %r14b, (%rcx,%rax) addq $0x40, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq nop
_ZN6spdlog7details11z_formatterINS0_18null_scoped_padderEE6formatERKNS0_7log_msgERK2tmRN3fmt2v819basic_memory_bufferIcLm250ESaIcEEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 40h mov rbx, rcx mov rsi, [rsi+18h] mov rax, rsi sub rax, [rdi+18h] mov rcx, 2540BE3FFh cmp rax, rcx jle short loc_43641 mov rcx, [rdx+28h] mov rdx, 8888888888888889h mov rax, rcx imul rdx mov r14, rdx add r14, rcx mov rax, r14 shr rax, 3Fh shr r14, 5 add r14d, eax mov [rdi+20h], r14d mov [rdi+18h], rsi jmp short loc_43645 loc_43641: mov r14d, [rdi+20h] loc_43645: test r14d, r14d js short loc_43676 mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_43668 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_43668: mov rcx, [rbx+8] mov [rbx+10h], rsi mov byte ptr [rcx+rax], 2Bh ; '+' jmp short loc_436A3 loc_43676: mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_43694 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_43694: neg r14d mov rcx, [rbx+8] mov [rbx+10h], rsi mov byte ptr [rcx+rax], 2Dh ; '-' loc_436A3: mov ecx, r14d mov eax, 88888889h imul rax, rcx shr rax, 25h imul ebp, eax, 3Ch ; '<' cmp r14d, 176Fh ja short loc_43736 movzx r15d, al imul r12d, r15d, 0CDh shr r12d, 0Bh lea eax, [r12+r12] lea eax, [rax+rax*4] sub r15b, al or r12b, 30h mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_436FA mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_436FA: mov rcx, [rbx+8] mov [rbx+10h], rsi mov [rcx+rax], r12b or r15b, 30h mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_43728 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_43728: mov rcx, [rbx+8] mov [rbx+10h], rsi mov [rcx+rax], r15b jmp short loc_43776 loc_43736: mov eax, eax mov r8, rsp mov [r8], rax mov rax, [rbx+10h] lea rdi, [rsp+68h+var_50] mov [rdi+10h], rax mov [rdi+18h], rax lea rax, off_5C698 mov [rdi], rax mov [rdi+20h], rbx lea rsi, a02; "{:02}" mov edx, 5 mov ecx, 1 xor r9d, r9d call _ZN3fmt2v86detail10vformat_toIcEEvRNS1_6bufferIT_EENS0_17basic_string_viewIS4_EENS0_17basic_format_argsINS0_20basic_format_contextINSt11conditionalIXsr3std7is_sameINS0_13type_identityIS4_E4typeEcEE5valueENS0_8appenderESt20back_insert_iteratorINS3_ISE_EEEE4typeESE_EEEENS1_10locale_refE loc_43776: sub r14d, ebp mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_43797 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_43797: mov rcx, [rbx+8] mov [rbx+10h], rsi mov byte ptr [rcx+rax], 3Ah ; ':' movzx eax, r14b imul r15d, eax, 0CDh shr r15d, 0Bh lea eax, [r15+r15] lea ebp, [rax+rax*4] or r15b, 30h mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_437DB mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_437DB: sub r14b, bpl mov rcx, [rbx+8] mov [rbx+10h], rsi mov [rcx+rax], r15b mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_43808 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_43808: or r14b, 30h mov rcx, [rbx+8] loc_43810: mov [rbx+10h], rsi mov [rcx+rax], r14b add rsp, 40h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format( long long a1, long long a2, long long a3, long long a4) { long long v5; // rsi unsigned int v6; // r14d long long v7; // rax long long v8; // rsi long long v9; // rcx long long v10; // rax long long v11; // rsi long long v12; // rcx unsigned int v13; // eax char v14; // r15 char v15; // r12 long long v16; // rax long long v17; // rsi long long v18; // rcx char v19; // r15 long long v20; // rax long long v21; // rsi long long v22; // rcx unsigned __int8 v23; // r14 long long v24; // rax long long v25; // rsi long long v26; // rcx char v27; // r15 long long v28; // rax long long v29; // rsi char v30; // r14 long long v31; // rcx long long result; // rax long long v33; // rsi long long v34; // rcx _QWORD v35[3]; // [rsp+0h] [rbp-68h] BYREF long long ( **v36)(); // [rsp+18h] [rbp-50h] BYREF long long v37; // [rsp+28h] [rbp-40h] long long v38; // [rsp+30h] [rbp-38h] long long v39; // [rsp+38h] [rbp-30h] v5 = *(_QWORD *)(a2 + 24); if ( v5 - *(_QWORD *)(a1 + 24) <= 0x2540BE3FFLL ) { v6 = *(_DWORD *)(a1 + 32); } else { v6 = (int)*(_QWORD *)(a3 + 40) / 60; *(_DWORD *)(a1 + 32) = v6; *(_QWORD *)(a1 + 24) = v5; } if ( (v6 & 0x80000000) != 0 ) { v10 = *(_QWORD *)(a4 + 16); v11 = v10 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v10 + 1) ) { (**(void ( ***)(long long))a4)(a4); v10 = *(_QWORD *)(a4 + 16); v11 = v10 + 1; } v6 = -v6; v12 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v11; *(_BYTE *)(v12 + v10) = 45; } else { v7 = *(_QWORD *)(a4 + 16); v8 = v7 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v7 + 1) ) { (**(void ( ***)(long long))a4)(a4); v7 = *(_QWORD *)(a4 + 16); v8 = v7 + 1; } v9 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v8; *(_BYTE *)(v9 + v7) = 43; } v13 = v6 / 0x3C; if ( v6 > 0x176F ) { v35[0] = v13; v37 = *(_QWORD *)(a4 + 16); v38 = v37; v36 = &off_5C698; v39 = a4; fmt::v8::detail::vformat_to<char>((long long)&v36, "{:02}", 5LL, 1LL, (long long)v35, 0LL); } else { v14 = (unsigned __int8)v13 % 0xAu; v15 = ((unsigned __int8)v13 / 0xAu) | 0x30; v16 = *(_QWORD *)(a4 + 16); v17 = v16 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v16 + 1) ) { (**(void ( ***)(long long))a4)(a4); v16 = *(_QWORD *)(a4 + 16); v17 = v16 + 1; } v18 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v17; *(_BYTE *)(v18 + v16) = v15; v19 = v14 | 0x30; v20 = *(_QWORD *)(a4 + 16); v21 = v20 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v20 + 1) ) { (**(void ( ***)(long long))a4)(a4); v20 = *(_QWORD *)(a4 + 16); v21 = v20 + 1; } v22 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v21; *(_BYTE *)(v22 + v20) = v19; } v23 = v6 % 0x3C; v24 = *(_QWORD *)(a4 + 16); v25 = v24 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v24 + 1) ) { (**(void ( ***)(long long))a4)(a4); v24 = *(_QWORD *)(a4 + 16); v25 = v24 + 1; } v26 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v25; *(_BYTE *)(v26 + v24) = 58; v27 = (v23 / 0xAu) | 0x30; v28 = *(_QWORD *)(a4 + 16); v29 = v28 + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(v28 + 1) ) { (**(void ( ***)(long long))a4)(a4); v28 = *(_QWORD *)(a4 + 16); v29 = v28 + 1; } v30 = v23 % 0xAu; v31 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v29; *(_BYTE *)(v31 + v28) = v27; result = *(_QWORD *)(a4 + 16); v33 = result + 1; if ( *(_QWORD *)(a4 + 24) < (unsigned long long)(result + 1) ) { (**(void ( ***)(long long))a4)(a4); result = *(_QWORD *)(a4 + 16); v33 = result + 1; } v34 = *(_QWORD *)(a4 + 8); *(_QWORD *)(a4 + 16) = v33; *(_BYTE *)(v34 + result) = v30 | 0x30; return result; }
format: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x40 MOV RBX,RCX MOV RSI,qword ptr [RSI + 0x18] MOV RAX,RSI SUB RAX,qword ptr [RDI + 0x18] MOV RCX,0x2540be3ff CMP RAX,RCX JLE 0x00143641 MOV RCX,qword ptr [RDX + 0x28] MOV RDX,-0x7777777777777777 MOV RAX,RCX IMUL RDX MOV R14,RDX ADD R14,RCX MOV RAX,R14 SHR RAX,0x3f SHR R14,0x5 ADD R14D,EAX MOV dword ptr [RDI + 0x20],R14D MOV qword ptr [RDI + 0x18],RSI JMP 0x00143645 LAB_00143641: MOV R14D,dword ptr [RDI + 0x20] LAB_00143645: TEST R14D,R14D JS 0x00143676 MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00143668 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00143668: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x2b JMP 0x001436a3 LAB_00143676: MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00143694 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00143694: NEG R14D MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x2d LAB_001436a3: MOV ECX,R14D MOV EAX,0x88888889 IMUL RAX,RCX SHR RAX,0x25 IMUL EBP,EAX,0x3c CMP R14D,0x176f JA 0x00143736 MOVZX R15D,AL IMUL R12D,R15D,0xcd SHR R12D,0xb LEA EAX,[R12 + R12*0x1] LEA EAX,[RAX + RAX*0x4] SUB R15B,AL OR R12B,0x30 MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x001436fa MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_001436fa: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],R12B OR R15B,0x30 MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00143728 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00143728: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],R15B JMP 0x00143776 LAB_00143736: MOV EAX,EAX MOV R8,RSP MOV qword ptr [R8],RAX MOV RAX,qword ptr [RBX + 0x10] LEA RDI,[RSP + 0x18] MOV qword ptr [RDI + 0x10],RAX MOV qword ptr [RDI + 0x18],RAX LEA RAX,[0x15c698] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x20],RBX LEA RSI,[0x14b36f] MOV EDX,0x5 MOV ECX,0x1 XOR R9D,R9D CALL 0x0012b306 LAB_00143776: SUB R14D,EBP MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00143797 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00143797: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],0x3a MOVZX EAX,R14B IMUL R15D,EAX,0xcd SHR R15D,0xb LEA EAX,[R15 + R15*0x1] LEA EBP,[RAX + RAX*0x4] OR R15B,0x30 MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x001437db MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_001437db: SUB R14B,BPL MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],R15B MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x00143808 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_00143808: OR R14B,0x30 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],R14B ADD RSP,0x40 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format(spdlog::details::log_msg const&, tm const&, fmt::v8::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */ void __thiscall spdlog::details::z_formatter<spdlog::details::null_scoped_padder>::format (z_formatter<spdlog::details::null_scoped_padder> *this,log_msg *param_1,tm *param_2, basic_memory_buffer *param_3) { int1 auVar1 [16]; byte bVar2; long lVar3; ulong uVar4; uint uVar5; ulong local_68 [3]; int **local_50 [2]; int8 local_40; int8 local_38; basic_memory_buffer *local_30; lVar3 = *(long *)(param_1 + 0x18); if (lVar3 - *(long *)(this + 0x18) < 10000000000) { uVar5 = *(uint *)(this + 0x20); } else { auVar1 = SEXT816(param_2->tm_gmtoff) * ZEXT816(0x8888888888888889); uVar5 = (int)(auVar1._8_8_ >> 5) - (auVar1._12_4_ >> 0x1f); *(uint *)(this + 0x20) = uVar5; *(long *)(this + 0x18) = lVar3; } if ((int)uVar5 < 0) { lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar4) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; } uVar5 = -uVar5; *(ulong *)(param_3 + 0x10) = uVar4; *(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x2d; } else { lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar4) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar4; *(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x2b; } if (uVar5 < 6000) { bVar2 = (byte)((uVar5 / 0x3c & 0xff) / 10); lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar4) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar4; *(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar2 | 0x30; lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar4) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar4; *(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)((ulong)uVar5 / 0x3c) + bVar2 * -10 | 0x30; } else { local_68[0] = (ulong)(uVar5 / 0x3c); local_40 = *(int8 *)(param_3 + 0x10); local_50[0] = &PTR_grow_0015c698; local_38 = local_40; local_30 = param_3; fmt::v8::detail::vformat_to<char>(local_50,"{:02}",5,1,local_68,0); } lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar4) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar4; *(int1 *)(*(long *)(param_3 + 8) + lVar3) = 0x3a; bVar2 = (byte)((uVar5 % 0x3c) / 10); lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar4) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar4; *(byte *)(*(long *)(param_3 + 8) + lVar3) = bVar2 | 0x30; lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; if (*(ulong *)(param_3 + 0x18) < uVar4) { (*(code *)**(int8 **)param_3)(param_3); lVar3 = *(long *)(param_3 + 0x10); uVar4 = lVar3 + 1; } *(ulong *)(param_3 + 0x10) = uVar4; *(byte *)(*(long *)(param_3 + 8) + lVar3) = (char)(uVar5 % 0x3c) + bVar2 * -10 | 0x30; return; }
81
SchemaConverter::format_grammar[abi:cxx11]()
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string format_grammar() { std::stringstream ss; for (const auto & kv : _rules) { ss << kv.first << " ::= " << kv.second << std::endl; } return ss.str(); }
O3
cpp
SchemaConverter::format_grammar[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x188, %rsp # imm = 0x188 movq %rsi, %r14 movq %rdi, %rbx movq %rsp, %rdi callq 0x1a660 movq 0x40(%r14), %r15 addq $0x30, %r14 cmpq %r14, %r15 je 0xbf343 leaq 0x10(%rsp), %r12 leaq 0x35743(%rip), %r13 # 0xf4a19 movq 0x20(%r15), %rsi movq 0x28(%r15), %rdx movq %r12, %rdi callq 0x1aa00 movq %rax, %rbp movl $0x5, %edx movq %rax, %rdi movq %r13, %rsi callq 0x1aa00 movq 0x40(%r15), %rsi movq 0x48(%r15), %rdx movq %rbp, %rdi callq 0x1aa00 movq %rax, %rbp movq (%rax), %rax movq -0x18(%rax), %rdi addq %rbp, %rdi movl $0xa, %esi callq 0x1a870 movsbl %al, %esi movq %rbp, %rdi callq 0x1a040 movq %rax, %rdi callq 0x1a630 movq %r15, %rdi callq 0x1a650 movq %rax, %r15 cmpq %r14, %rax jne 0xbf2d6 leaq 0x18(%rsp), %rsi movq %rbx, %rdi callq 0x1adb0 movq 0x6cbd1(%rip), %rsi # 0x12bf28 movq %rsp, %rdi callq 0x1a6a0 leaq 0x80(%rsp), %rdi callq 0x1a2c0 movq %rbx, %rax addq $0x188, %rsp # imm = 0x188 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xbf383 movq %rax, %rbx movq 0x6cb9b(%rip), %rsi # 0x12bf28 movq %rsp, %rdi callq 0x1a6a0 leaq 0x80(%rsp), %rdi callq 0x1a2c0 movq %rbx, %rdi callq 0x1af90
_ZN15SchemaConverter14format_grammarB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 188h mov r14, rsi mov rbx, rdi mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) mov r15, [r14+40h] add r14, 30h ; '0' cmp r15, r14 jz short loc_BF343 lea r12, [rsp+1B8h+var_1A8] lea r13, asc_F4A19; " ::= " loc_BF2D6: mov rsi, [r15+20h] mov rdx, [r15+28h] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbp, rax mov edx, 5 mov rdi, rax mov rsi, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [r15+40h] mov rdx, [r15+48h] mov rdi, rbp call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbp, rax mov rax, [rax] mov rdi, [rax-18h] add rdi, rbp mov esi, 0Ah call __ZNKSt9basic_iosIcSt11char_traitsIcEE5widenEc; std::ios::widen(char) movsx esi, al; char mov rdi, rbp; this call __ZNSo3putEc; std::ostream::put(char) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) mov rdi, r15 call __ZSt18_Rb_tree_incrementPSt18_Rb_tree_node_base; std::_Rb_tree_increment(std::_Rb_tree_node_base *) mov r15, rax cmp rax, r14 jnz short loc_BF2D6 loc_BF343: lea rsi, [rsp+1B8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1B8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 188h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_BF383: mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr mov rdi, rsp call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_78]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long SchemaConverter::format_grammar[abi:cxx11](long long a1, long long a2) { _QWORD *i; // r15 long long v3; // rbp std::ostream *v4; // rbp char v5; // al std::ostream *v6; // rax _BYTE v8[16]; // [rsp+0h] [rbp-1B8h] BYREF _BYTE v9[8]; // [rsp+10h] [rbp-1A8h] BYREF _BYTE v10[104]; // [rsp+18h] [rbp-1A0h] BYREF _BYTE v11[312]; // [rsp+80h] [rbp-138h] BYREF std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v8); for ( i = *(_QWORD **)(a2 + 64); i != (_QWORD *)(a2 + 48); i = (_QWORD *)std::_Rb_tree_increment(i) ) { v3 = std::__ostream_insert<char,std::char_traits<char>>(v9, i[4], i[5]); std::__ostream_insert<char,std::char_traits<char>>(v3, " ::= ", 5LL); v4 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v3, i[8], i[9]); v5 = std::ios::widen((char *)v4 + *(_QWORD *)(*(_QWORD *)v4 - 24LL), 10LL); v6 = (std::ostream *)std::ostream::put(v4, v5); std::ostream::flush(v6); } std::stringbuf::str(a1, v10); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v8, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v11); return a1; }
format_grammar[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x188 MOV R14,RSI MOV RBX,RDI MOV RDI,RSP CALL 0x0011a660 MOV R15,qword ptr [R14 + 0x40] ADD R14,0x30 CMP R15,R14 JZ 0x001bf343 LEA R12,[RSP + 0x10] LEA R13,[0x1f4a19] LAB_001bf2d6: MOV RSI,qword ptr [R15 + 0x20] MOV RDX,qword ptr [R15 + 0x28] LAB_001bf2de: MOV RDI,R12 CALL 0x0011aa00 MOV RBP,RAX MOV EDX,0x5 MOV RDI,RAX MOV RSI,R13 CALL 0x0011aa00 MOV RSI,qword ptr [R15 + 0x40] MOV RDX,qword ptr [R15 + 0x48] MOV RDI,RBP CALL 0x0011aa00 MOV RBP,RAX MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + -0x18] ADD RDI,RBP MOV ESI,0xa CALL 0x0011a870 MOVSX ESI,AL MOV RDI,RBP CALL 0x0011a040 MOV RDI,RAX CALL 0x0011a630 MOV RDI,R15 CALL 0x0011a650 MOV R15,RAX CMP RAX,R14 JNZ 0x001bf2d6 LAB_001bf343: LEA RSI,[RSP + 0x18] LAB_001bf348: MOV RDI,RBX CALL 0x0011adb0 LAB_001bf350: MOV RSI,qword ptr [0x0022bf28] MOV RDI,RSP CALL 0x0011a6a0 LEA RDI,[RSP + 0x80] CALL 0x0011a2c0 MOV RAX,RBX ADD RSP,0x188 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::format_grammar[abi:cxx11]() */ void SchemaConverter::format_grammar_abi_cxx11_(void) { ostream *poVar1; _Rb_tree_node_base *p_Var2; long in_RSI; stringstream asStack_1b8 [16]; ostream local_1a8 [112]; ios_base local_138 [264]; std::__cxx11::stringstream::stringstream(asStack_1b8); p_Var2 = *(_Rb_tree_node_base **)(in_RSI + 0x40); if (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30)) { do { /* try { // try from 001bf2de to 001bf332 has its CatchHandler @ 001bf383 */ poVar1 = std::__ostream_insert<char,std::char_traits<char>> (local_1a8,*(char **)(p_Var2 + 0x20),*(long *)(p_Var2 + 0x28)); std::__ostream_insert<char,std::char_traits<char>>(poVar1," ::= ",5); poVar1 = std::__ostream_insert<char,std::char_traits<char>> (poVar1,*(char **)(p_Var2 + 0x40),*(long *)(p_Var2 + 0x48)); std::ios::widen((char)*(int8 *)(*(long *)poVar1 + -0x18) + (char)poVar1); std::ostream::put((char)poVar1); std::ostream::flush(); p_Var2 = (_Rb_tree_node_base *)std::_Rb_tree_increment(p_Var2); } while (p_Var2 != (_Rb_tree_node_base *)(in_RSI + 0x30)); } /* try { // try from 001bf348 to 001bf34f has its CatchHandler @ 001bf381 */ std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(asStack_1b8); std::ios_base::~ios_base(local_138); return; }
82
Lex_input_stream::body_utf8_append_ident(THD*, Lex_string_with_metadata_st const*, char const*)
eloqsql/sql/sql_lex.cc
void Lex_input_stream::body_utf8_append_ident(THD *thd, const Lex_string_with_metadata_st *txt, const char *end_ptr) { if (!m_cpp_utf8_processed_ptr) return; LEX_CSTRING utf_txt; thd->make_text_string_sys(&utf_txt, txt); // QQ: check return value? /* NOTE: utf_txt.length is in bytes, not in symbols. */ memcpy(m_body_utf8_ptr, utf_txt.str, utf_txt.length); m_body_utf8_ptr += utf_txt.length; *m_body_utf8_ptr= 0; m_cpp_utf8_processed_ptr= end_ptr; }
O3
cpp
Lex_input_stream::body_utf8_append_ident(THD*, Lex_string_with_metadata_st const*, char const*): cmpq $0x0, 0x90(%rdi) je 0x74003e pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movq %rdx, %rcx movq %rdi, %r14 leaq 0xe176a9(%rip), %rax # 0x1557688 movq (%rax), %rdx movq 0xb50(%rsi), %r8 movzbl 0x3fc1(%rsi), %r9d leaq -0x28(%rbp), %r15 movq %rsi, %rdi movq %r15, %rsi callq 0x7530a2 movq 0x88(%r14), %rdi movq (%r15), %rsi movq 0x8(%r15), %rdx callq 0x61b1b0 movq 0x8(%r15), %rax movq 0x88(%r14), %rcx leaq (%rcx,%rax), %rdx movq %rdx, 0x88(%r14) movb $0x0, (%rcx,%rax) movq %rbx, 0x90(%r14) addq $0x18, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ZN16Lex_input_stream22body_utf8_append_identEP3THDPK27Lex_string_with_metadata_stPKc: cmp qword ptr [rdi+90h], 0 jz short locret_74003E push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 18h mov rbx, rcx mov rcx, rdx mov r14, rdi lea rax, system_charset_info mov rdx, [rax] mov r8, [rsi+0B50h] movzx r9d, byte ptr [rsi+3FC1h] lea r15, [rbp-28h] mov rdi, rsi mov rsi, r15 call _ZN3THD14convert_stringEP25st_mysql_const_lex_stringPK15charset_info_stPKS0_S4_b; THD::convert_string(st_mysql_const_lex_string *,charset_info_st const*,st_mysql_const_lex_string const*,charset_info_st const*,bool) mov rdi, [r14+88h] mov rsi, [r15] mov rdx, [r15+8] call _memcpy mov rax, [r15+8] mov rcx, [r14+88h] lea rdx, [rcx+rax] mov [r14+88h], rdx mov byte ptr [rcx+rax], 0 mov [r14+90h], rbx add rsp, 18h pop rbx pop r14 pop r15 pop rbp locret_74003E: retn
long long Lex_input_stream::body_utf8_append_ident(long long a1, long long a2, long long a3, long long a4) { long long result; // rax _BYTE *v6; // rdx long long v7; // [rsp-30h] [rbp-30h] BYREF long long v8; // [rsp-28h] [rbp-28h] if ( *(_QWORD *)(a1 + 144) ) { THD::convert_string(a2, &v7, system_charset_info, a3, *(_QWORD *)(a2 + 2896), *(unsigned __int8 *)(a2 + 16321)); memcpy(*(_QWORD *)(a1 + 136), v7); result = v8; v6 = (_BYTE *)(*(_QWORD *)(a1 + 136) + v8); *(_QWORD *)(a1 + 136) = v6; *v6 = 0; *(_QWORD *)(a1 + 144) = a4; } return result; }
update_first_row: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RAX,qword ptr [RDI] PUSH 0x1 POP RSI CALL qword ptr [RAX + 0x4e0] XOR ECX,ECX TEST EAX,EAX SETZ CL AND qword ptr [RBX + 0x170],0x0 ADD ECX,ECX MOV dword ptr [RBX + 0x1b0],ECX TEST EAX,EAX JNZ 0x00740060 MOV RAX,qword ptr [RBX + 0x10] MOV RSI,qword ptr [RAX + 0x58] MOV RDI,RBX CALL 0x0073f336 TEST EAX,EAX JNZ 0x00740036 MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x58] MOV RDX,qword ptr [RCX + 0x328] MOV RDI,R14 MOV RSI,R15 CALL 0x0071c2d0 TEST EAX,EAX JZ 0x0074003b MOV RAX,qword ptr [RBX] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL qword ptr [RAX + 0x4f8] LAB_00740036: MOV R15D,EAX JMP 0x0074003e LAB_0074003b: XOR R15D,R15D LAB_0074003e: AND dword ptr [RBX + 0x1b0],0x0 AND qword ptr [RBX + 0x170],0x0 MOV RAX,qword ptr [RBX] MOV RDI,RBX CALL qword ptr [RAX + 0x4e8] TEST R15D,R15D CMOVNZ EAX,R15D LAB_00740060: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* handler::update_first_row(unsigned char const*) */ ulong __thiscall handler::update_first_row(handler *this,uchar *param_1) { void *__s2; uint uVar1; int iVar2; ulong uVar3; uVar3 = (**(code **)(*(long *)this + 0x4e0))(this,1); *(int8 *)(this + 0x170) = 0; *(uint *)(this + 0x1b0) = (uint)((int)uVar3 == 0) * 2; if ((int)uVar3 == 0) { uVar1 = ha_rnd_next(this,*(uchar **)(*(long *)(this + 0x10) + 0x58)); if (uVar1 == 0) { __s2 = (void *)(*(long **)(this + 0x10))[0xb]; iVar2 = bcmp(param_1,__s2,*(size_t *)(**(long **)(this + 0x10) + 0x328)); if (iVar2 == 0) { uVar1 = 0; } else { uVar1 = (**(code **)(*(long *)this + 0x4f8))(this,__s2,param_1); } } *(int4 *)(this + 0x1b0) = 0; *(int8 *)(this + 0x170) = 0; uVar3 = (**(code **)(*(long *)this + 0x4e8))(this); uVar3 = uVar3 & 0xffffffff; if (uVar1 != 0) { uVar3 = (ulong)uVar1; } } return uVar3; }
83
cpu_get_num_math()
monkey531[P]llama/common/common.cpp
int32_t cpu_get_num_math() { #if defined(__x86_64__) && defined(__linux__) && !defined(__ANDROID__) int n_cpu = sysconf(_SC_NPROCESSORS_ONLN); if (n_cpu < 1) { return cpu_get_num_physical_cores(); } if (is_hybrid_cpu()) { cpu_set_t affinity; if (!pthread_getaffinity_np(pthread_self(), sizeof(affinity), &affinity)) { int result = cpu_count_math_cpus(n_cpu); pthread_setaffinity_np(pthread_self(), sizeof(affinity), &affinity); if (result > 0) { return result; } } } #endif return cpu_get_num_physical_cores(); }
O2
cpp
cpu_get_num_math(): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x108, %rsp # imm = 0x108 pushq $0x54 popq %rdi callq 0x235f0 movq %rax, %rbx testl %ebx, %ebx jle 0x54a49 pushq $0x7 popq %rax xorl %ecx, %ecx movq %rbx, %rsi cpuid xchgq %rbx, %rsi testw %dx, %dx jns 0x54a2e callq 0x237e0 movq %rax, %r14 leaq 0x88(%rsp), %rdx movl $0x80, %esi movq %rax, %rdi callq 0x24060 testl %eax, %eax je 0x54a5f callq 0x54818 movl %eax, %ebp movl %ebp, %eax addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq addq $0x108, %rsp # imm = 0x108 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x54818 xorl %ebp, %ebp movq %rsp, %r15 pushq $0x1a popq %r12 xorl %r13d, %r13d cmpl %ebx, %r13d jge 0x54afa xorps %xmm0, %xmm0 movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) movaps %xmm0, 0x50(%rsp) movaps %xmm0, 0x40(%rsp) movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) cmpl $0x3ff, %r13d # imm = 0x3FF ja 0x54aba pushq $0x1 popq %rax movl %r13d, %ecx shlq %cl, %rax movl %r13d, %ecx shrl $0x6, %ecx orq %rax, (%rsp,%rcx,8) movl $0x80, %esi movq %r14, %rdi movq %r15, %rdx callq 0x24000 testl %eax, %eax jne 0x54af7 movl %r12d, %eax xorl %ecx, %ecx movq %rbx, %rsi cpuid xchgq %rbx, %rsi andl $0xff000000, %eax # imm = 0xFF000000 xorl %ecx, %ecx cmpl $0x20000000, %eax # imm = 0x20000000 setne %cl addl %ecx, %ebp addl %ecx, %r13d incl %r13d jmp 0x54a6b pushq $-0x1 popq %rbp leaq 0x88(%rsp), %rdx movl $0x80, %esi movq %r14, %rdi callq 0x24000 testl %ebp, %ebp jg 0x54a35 jmp 0x54a2e
_Z16cpu_get_num_mathv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 108h push 54h ; 'T' pop rdi call _sysconf mov rbx, rax test ebx, ebx jle short loc_54A49 push 7 pop rax xor ecx, ecx mov rsi, rbx cpuid xchg rsi, rbx test dx, dx jns short loc_54A2E call _pthread_self mov r14, rax lea rdx, [rsp+138h+var_B0] mov esi, 80h mov rdi, rax call _pthread_getaffinity_np test eax, eax jz short loc_54A5F loc_54A2E: call _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void) mov ebp, eax loc_54A35: mov eax, ebp add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_54A49: add rsp, 108h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _Z26cpu_get_num_physical_coresv; cpu_get_num_physical_cores(void) loc_54A5F: xor ebp, ebp mov r15, rsp push 1Ah pop r12 xor r13d, r13d loc_54A6B: cmp r13d, ebx jge loc_54AFA xorps xmm0, xmm0 movaps [rsp+138h+var_C8], xmm0 movaps [rsp+138h+var_D8], xmm0 movaps [rsp+138h+var_E8], xmm0 movaps [rsp+138h+var_F8], xmm0 movaps [rsp+138h+var_108], xmm0 movaps [rsp+138h+var_118], xmm0 movaps [rsp+138h+var_128], xmm0 movaps [rsp+138h+var_138], xmm0 cmp r13d, 3FFh ja short loc_54ABA push 1 pop rax mov ecx, r13d shl rax, cl mov ecx, r13d shr ecx, 6 or qword ptr [rsp+rcx*8+138h+var_138], rax loc_54ABA: mov esi, 80h mov rdi, r14 mov rdx, r15 call _pthread_setaffinity_np test eax, eax jnz short loc_54AF7 mov eax, r12d xor ecx, ecx mov rsi, rbx cpuid xchg rsi, rbx and eax, 0FF000000h xor ecx, ecx cmp eax, 20000000h setnz cl add ebp, ecx add r13d, ecx inc r13d jmp loc_54A6B loc_54AF7: push 0FFFFFFFFFFFFFFFFh pop rbp loc_54AFA: lea rdx, [rsp+138h+var_B0] mov esi, 80h mov rdi, r14 call _pthread_setaffinity_np test ebp, ebp jg loc_54A35 jmp loc_54A2E
long long cpu_get_num_math(void) { std::thread *v0; // rdi long long v1; // rbx long long v3; // rsi long long v8; // rbx long long v9; // rsi long long v10; // rt0 long long v11; // r14 long long v12; // rcx long long v13; // r8 long long v14; // r9 int v15; // ebp unsigned int i; // r13d long long v19; // rsi __int128 v24; // [rsp+0h] [rbp-138h] BYREF __int128 v25; // [rsp+10h] [rbp-128h] __int128 v26; // [rsp+20h] [rbp-118h] __int128 v27; // [rsp+30h] [rbp-108h] __int128 v28; // [rsp+40h] [rbp-F8h] __int128 v29; // [rsp+50h] [rbp-E8h] __int128 v30; // [rsp+60h] [rbp-D8h] __int128 v31; // [rsp+70h] [rbp-C8h] _BYTE v32[176]; // [rsp+88h] [rbp-B0h] BYREF v0 = (std::thread *)(off_50 + 4); v1 = sysconf(84LL); if ( (int)v1 <= 0 ) return cpu_get_num_physical_cores((std::thread *)((char *)off_50 + 4)); _RAX = 7LL; v3 = v1; __asm { cpuid } v10 = v3; v9 = _RBX; v8 = v10; if ( (_RDX & 0x8000u) == 0LL ) return (unsigned int)cpu_get_num_physical_cores(v0); v11 = pthread_self(84LL, v9, _RDX, _RCX); v0 = (std::thread *)v11; if ( (unsigned int)pthread_getaffinity_np(v11, 128LL, v32) ) return (unsigned int)cpu_get_num_physical_cores(v0); v15 = 0; for ( i = 0; (int)i < (int)v8; i += v12 + 1 ) { v31 = 0LL; v30 = 0LL; v29 = 0LL; v28 = 0LL; v27 = 0LL; v26 = 0LL; v25 = 0LL; v24 = 0LL; if ( i <= 0x3FF ) *((_QWORD *)&v24 + (i >> 6)) |= 1LL << i; if ( (unsigned int)((long long ( *)(long long, long long, __int128 *))pthread_setaffinity_np)(v11, 128LL, &v24) ) { v15 = -1; break; } _RAX = 26LL; v19 = v8; __asm { cpuid } v8 = v19; v12 = (_RAX & 0xFF000000) != 0x20000000; v15 += v12; } v0 = (std::thread *)v11; pthread_setaffinity_np( v11, 128LL, v32, v12, v13, v14, v24, *((_QWORD *)&v24 + 1), v25, *((_QWORD *)&v25 + 1), v26, *((_QWORD *)&v26 + 1), v27, *((_QWORD *)&v27 + 1), v28, *((_QWORD *)&v28 + 1), v29, *((_QWORD *)&v29 + 1), v30, *((_QWORD *)&v30 + 1), v31, *((_QWORD *)&v31 + 1)); if ( v15 <= 0 ) return (unsigned int)cpu_get_num_physical_cores(v0); return (unsigned int)v15; }
cpu_get_num_math: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x108 PUSH 0x54 POP RDI CALL 0x001235f0 MOV RBX,RAX TEST EBX,EBX JLE 0x00154a49 PUSH 0x7 POP RAX XOR ECX,ECX MOV RSI,RBX CPUID XCHG RBX,RSI TEST DX,DX JNS 0x00154a2e CALL 0x001237e0 MOV R14,RAX LEA RDX,[RSP + 0x88] MOV ESI,0x80 MOV RDI,RAX CALL 0x00124060 TEST EAX,EAX JZ 0x00154a5f LAB_00154a2e: CALL 0x00154818 MOV EBP,EAX LAB_00154a35: MOV EAX,EBP ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00154a49: ADD RSP,0x108 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00154818 LAB_00154a5f: XOR EBP,EBP MOV R15,RSP PUSH 0x1a POP R12 XOR R13D,R13D LAB_00154a6b: CMP R13D,EBX JGE 0x00154afa XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 CMP R13D,0x3ff JA 0x00154aba PUSH 0x1 POP RAX MOV ECX,R13D SHL RAX,CL MOV ECX,R13D SHR ECX,0x6 OR qword ptr [RSP + RCX*0x8],RAX LAB_00154aba: MOV ESI,0x80 MOV RDI,R14 MOV RDX,R15 CALL 0x00124000 TEST EAX,EAX JNZ 0x00154af7 MOV EAX,R12D XOR ECX,ECX MOV RSI,RBX CPUID XCHG RBX,RSI AND EAX,0xff000000 XOR ECX,ECX CMP EAX,0x20000000 SETNZ CL ADD EBP,ECX ADD R13D,ECX INC R13D JMP 0x00154a6b LAB_00154af7: PUSH -0x1 POP RBP LAB_00154afa: LEA RDX,[RSP + 0x88] MOV ESI,0x80 MOV RDI,R14 CALL 0x00124000 TEST EBP,EBP JG 0x00154a35 JMP 0x00154a2e
/* WARNING: Removing unreachable block (ram,0x00154ad6) */ /* WARNING: Removing unreachable block (ram,0x00154a03) */ /* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cpu_get_num_math() */ ulong cpu_get_num_math(void) { long lVar1; uint *puVar2; uint uVar3; int iVar4; uint uVar5; long lVar6; pthread_t __th; ulong uVar7; uint uVar8; cpu_set_t local_138; cpu_set_t local_b0; lVar6 = sysconf(0x54); if ((int)lVar6 < 1) { uVar7 = cpu_get_num_physical_cores(); return uVar7; } lVar1 = cpuid_Extended_Feature_Enumeration_info(7); if ((short)*(int4 *)(lVar1 + 8) < 0) { __th = pthread_self(); iVar4 = pthread_getaffinity_np(__th,0x80,&local_b0); if (iVar4 == 0) { uVar5 = 0; for (uVar8 = 0; (int)uVar8 < (int)lVar6; uVar8 = uVar8 + uVar3 + 1) { local_138.__bits[0xe] = 0; local_138.__bits[0xf] = 0; local_138.__bits[0xc] = 0; local_138.__bits[0xd] = 0; local_138.__bits[10] = 0; local_138.__bits[0xb] = 0; local_138.__bits[8] = 0; local_138.__bits[9] = 0; local_138.__bits[6] = 0; local_138.__bits[7] = 0; local_138.__bits[4] = 0; local_138.__bits[5] = 0; local_138.__bits[2] = 0; local_138.__bits[3] = 0; local_138.__bits[0] = 0; local_138.__bits[1] = 0; if (uVar8 < 0x400) { local_138.__bits[uVar8 >> 6] = local_138.__bits[uVar8 >> 6] | 1L << ((byte)uVar8 & 0x3f); } iVar4 = pthread_setaffinity_np(__th,0x80,&local_138); if (iVar4 != 0) { uVar5 = 0xffffffff; break; } puVar2 = (uint *)cpuid(0x1a); uVar3 = (uint)((*puVar2 & 0xff000000) != 0x20000000); uVar5 = uVar5 + uVar3; } pthread_setaffinity_np(__th,0x80,&local_b0); if (0 < (int)uVar5) goto LAB_00154a35; } } uVar5 = cpu_get_num_physical_cores(); LAB_00154a35: return (ulong)uVar5; }
84
NetworkThread<AuthSession>::Wait()
SylCore-WoTLK/src/server/shared/Network/NetworkThread.h
void Wait() { ASSERT(_thread); if (_thread->joinable()) { _thread->join(); } _thread.reset(); }
O3
c
NetworkThread<AuthSession>::Wait(): pushq %rbx subq $0x80, %rsp movq %rdi, %rbx movq 0x10(%rdi), %rdi testq %rdi, %rdi je 0x2a9b9 addq $0x10, %rbx cmpq $0x0, (%rdi) je 0x2a9a7 callq 0x1c8c0 movq %rbx, %rdi xorl %esi, %esi addq $0x80, %rsp popq %rbx jmp 0x2ac02 leaq 0x60(%rsp), %rbx movq %rbx, %rdi callq 0xc7c65 movq (%rbx), %rax movq 0x8(%rbx), %rcx movq %rcx, 0x40(%rsp) movq %rax, 0x48(%rsp) movq $0x7, 0x30(%rsp) leaq 0xe5d33(%rip), %rax # 0x11071a movq %rax, 0x38(%rsp) xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) movaps 0x50(%rsp), %xmm0 movups %xmm0, 0x20(%rsp) movups 0x30(%rsp), %xmm0 movups %xmm0, 0x10(%rsp) movups 0x40(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0xced79(%rip), %rsi # 0xf9791 leaq 0xcedcb(%rip), %r8 # 0xf97ea movl $0x58, %edi movl $0x4, %ecx movl $0x46, %edx callq 0xc7130 movq %rax, %rbx leaq 0x70(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2aa51 movq 0x70(%rsp), %rsi incq %rsi callq 0xd32e8 movq %rbx, %rdi callq 0x1bba0 nop
_ZN13NetworkThreadI11AuthSessionE4WaitEv: push rbx sub rsp, 80h mov rbx, rdi mov rdi, [rdi+10h]; this test rdi, rdi jz short loc_2A9B9 add rbx, 10h cmp qword ptr [rdi], 0 jz short loc_2A9A7 call _ZNSt6thread4joinEv; std::thread::join(void) loc_2A9A7: mov rdi, rbx xor esi, esi add rsp, 80h pop rbx jmp _ZNSt15__uniq_ptr_implISt6threadSt14default_deleteIS0_EE5resetEPS0_; std::__uniq_ptr_impl<std::thread,std::default_delete<std::thread>>::reset(std::thread*) loc_2A9B9: lea rbx, [rsp+88h+var_28] mov rdi, rbx call _Z12GetDebugInfoB5cxx11v; GetDebugInfo(void) mov rax, [rbx] mov rcx, [rbx+8] mov qword ptr [rsp+88h+var_48], rcx mov qword ptr [rsp+88h+var_48+8], rax mov qword ptr [rsp+88h+var_58], 7 lea rax, aOptBackgroundT+0Eh; "_thread" mov qword ptr [rsp+88h+var_58+8], rax xorps xmm0, xmm0 movaps [rsp+88h+var_38], xmm0 movaps xmm0, [rsp+88h+var_38] movups [rsp+88h+var_68], xmm0 movups xmm0, [rsp+88h+var_58] movups [rsp+88h+var_78], xmm0 movups xmm0, [rsp+88h+var_48] movups [rsp+88h+var_88], xmm0 lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/SylCor"... lea r8, aWait; "Wait" mov edi, 58h ; 'X' mov ecx, 4 mov edx, 46h ; 'F' call _ZN5Acore6AssertESt17basic_string_viewIcSt11char_traitsIcEEjS3_S3_S3_S3_; Acore::Assert(std::string_view,uint,std::string_view,std::string_view,std::string_view,std::string_view) mov rbx, rax lea rax, [rsp+88h+var_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2AA51 mov rsi, [rsp+88h+var_18] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_2AA51: mov rdi, rbx call __Unwind_Resume
long long NetworkThread<AuthSession>::Wait(long long a1) { std::thread *v2; // rdi long long v3; // rbx long long v5; // r9 _QWORD v6[2]; // [rsp+60h] [rbp-28h] BYREF v2 = *(std::thread **)(a1 + 16); if ( !v2 ) { GetDebugInfo[abi:cxx11](v6); Acore::Assert( 88LL, "/workspace/llm4binary/github2025/SylCore-WoTLK/src/server/shared/Network/NetworkThread.h", 70LL, 4LL, "Wait", v5, v6[1], v6[0], 7LL, "_thread", 0LL, 0LL); } v3 = a1 + 16; if ( *(_QWORD *)v2 ) std::thread::join(v2); return std::__uniq_ptr_impl<std::thread,std::default_delete<std::thread>>::reset(v3, 0LL); }
Wait: PUSH RBX SUB RSP,0x80 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x10] TEST RDI,RDI JZ 0x0012a9b9 ADD RBX,0x10 CMP qword ptr [RDI],0x0 JZ 0x0012a9a7 CALL 0x0011c8c0 LAB_0012a9a7: MOV RDI,RBX XOR ESI,ESI ADD RSP,0x80 POP RBX JMP 0x0012ac02 LAB_0012a9b9: LEA RBX,[RSP + 0x60] MOV RDI,RBX CALL 0x001c7c65 MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x40],RCX MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x30],0x7 LEA RAX,[0x21071a] MOV qword ptr [RSP + 0x38],RAX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 LAB_0012a9f4: MOVAPS XMM0,xmmword ptr [RSP + 0x50] MOVUPS xmmword ptr [RSP + 0x20],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[0x1f9791] LEA R8,[0x1f97ea] MOV EDI,0x58 MOV ECX,0x4 MOV EDX,0x46 CALL 0x001c7130 LAB_0012aa33: MOV RBX,RAX LEA RAX,[RSP + 0x70] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0012aa51 MOV RSI,qword ptr [RSP + 0x70] INC RSI CALL 0x001d32e8 LAB_0012aa51: MOV RDI,RBX CALL 0x0011bba0
/* NetworkThread<AuthSession>::Wait() */ void __thiscall NetworkThread<AuthSession>::Wait(NetworkThread<AuthSession> *this) { int8 uVar1; int8 in_R9; int4 uStack_40; long *local_28; int4 local_20; long local_18 [2]; if (*(long **)(this + 0x10) != (long *)0x0) { if (**(long **)(this + 0x10) != 0) { std::thread::join(); } std::__uniq_ptr_impl<std::thread,std::default_delete<std::thread>>::reset ((__uniq_ptr_impl<std::thread,std::default_delete<std::thread>> *)(this + 0x10), (thread *)0x0); return; } GetDebugInfo_abi_cxx11_(); /* try { // try from 0012a9f4 to 0012aa32 has its CatchHandler @ 0012aa33 */ uStack_40 = SUB84(local_28,0); uVar1 = Acore::Assert(0x58, "/workspace/llm4binary/github2025/SylCore-WoTLK/src/server/shared/Network/NetworkThread.h" ,0x46,4,&DAT_001f97ea,in_R9,local_20,uStack_40,7,"_thread",0,0); /* catch() { ... } // from try @ 0012a9f4 with catch @ 0012aa33 */ if (local_28 != local_18) { operator_delete(local_28,local_18[0] + 1); } /* WARNING: Subroutine does not return */ _Unwind_Resume(uVar1); }
85
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
std::string exception_message(const token_type expected, const std::string& context) { std::string error_msg = "syntax error "; if (!context.empty()) { error_msg += concat("while parsing ", context, ' '); } error_msg += "- "; if (last_token == token_type::parse_error) { error_msg += concat(m_lexer.get_error_message(), "; last read: '", m_lexer.get_token_string(), '\''); } else { error_msg += concat("unexpected ", lexer_t::token_type_name(last_token)); } if (expected != token_type::uninitialized) { error_msg += concat("; expected ", lexer_t::token_type_name(expected)); } return error_msg; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::token_type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %r15 movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) leaq 0x91dfd(%rip), %rsi # 0xef580 leaq 0x91e03(%rip), %rdx # 0xef58d callq 0x24458 movq 0x8(%r15), %rsi testq %rsi, %rsi je 0x5d816 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq $0x0, -0x8(%r13) movb $0x0, (%r13) addq $0xf, %rsi leaq 0x8(%rsp), %rdi callq 0x1be10 leaq 0x91dcb(%rip), %rsi # 0xef58e leaq 0x8(%rsp), %rdi callq 0x1c1b0 movq (%r15), %rsi movq 0x8(%r15), %rdx leaq 0x8(%rsp), %rdi callq 0x1b250 leaq 0x8(%rsp), %rdi movl $0x20, %esi callq 0x1b750 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x1b250 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x5d816 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 leaq 0x91d80(%rip), %rsi # 0xef59d movq %rbx, %rdi callq 0x1c1b0 movl 0x20(%r14), %edi cmpl $0xe, %edi jne 0x5d8b9 movq 0x98(%r14), %rax addq $0x28, %r14 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi movq %r14, %rsi callq 0x5d4a0 leaq 0x2f(%rsp), %r8 movb $0x27, (%r8) leaq 0x91d41(%rip), %rdx # 0xef5a0 leaq 0x8(%rsp), %rdi leaq 0x30(%rsp), %rsi leaq 0x38(%rsp), %rcx callq 0x63ad8 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x1b250 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5d8a0 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5d933 movq 0x48(%rsp), %rsi jmp 0x5d92b callq 0x63b9a movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x1b3f0 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x1be10 leaq 0x91cbc(%rip), %rsi # 0xef5af leaq 0x8(%rsp), %rdi callq 0x1c1b0 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x1c1b0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x1b250 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x5d933 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 testl %ebp, %ebp je 0x5d9b3 movl %ebp, %edi callq 0x63b9a movq %rax, %r14 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) movq %rax, %rdi callq 0x1b3f0 leaq 0xb(%rax), %rsi leaq 0x8(%rsp), %rdi callq 0x1be10 leaq 0x91c48(%rip), %rsi # 0xef5bb leaq 0x8(%rsp), %rdi callq 0x1c1b0 leaq 0x8(%rsp), %rdi movq %r14, %rsi callq 0x1c1b0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x1b250 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x5d9b3 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 movq %rbx, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x5da0c movq %rax, %r14 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5d9ea movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 jmp 0x5d9ea movq %rax, %r14 leaq 0x48(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5da35 movq 0x48(%rsp), %rsi jmp 0x5da2d jmp 0x5da05 jmp 0x5da0c jmp 0x5da1b movq %rax, %r14 jmp 0x5da35 jmp 0x5da0c movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi jne 0x5da28 jmp 0x5da35 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x5da35 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8e0 movq (%rbx), %rdi cmpq %r12, %rdi je 0x5da49 movq (%r12), %rsi incq %rsi callq 0x1b8e0 movq %r14, %rdi callq 0x1c030 nop
_ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE17exception_messageENS1_10lexer_baseISF_E10token_typeERKSB_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r15, rcx mov ebp, edx mov r14, rsi mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 lea rsi, aSyntaxError; "syntax error " lea rdx, aSyntaxError+0Dh; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rsi, [r15+8] test rsi, rsi jz short loc_5D816 lea r13, [rsp+88h+var_70] mov [r13-10h], r13 mov qword ptr [r13-8], 0 mov byte ptr [r13+0], 0 add rsi, 0Fh lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aWhileParsing; "while parsing " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [r15] mov rdx, [r15+8] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rdi, [rsp+88h+var_80] mov esi, 20h ; ' ' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r13 jz short loc_5D816 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5D816: lea rsi, asc_EF59D; "- " mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov edi, [r14+20h] cmp edi, 0Eh jnz loc_5D8B9 mov rax, [r14+98h] add r14, 28h ; '(' mov [rsp+88h+var_58], rax lea rdi, [rsp+88h+var_50] mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE16get_token_stringEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string(void) lea r8, [rsp+88h+var_59] mov byte ptr [r8], 27h ; ''' lea rdx, aLastRead; "; last read: '" lea rdi, [rsp+88h+var_80] lea rsi, [rsp+88h+var_58] lea rcx, [rsp+88h+var_50] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJPKcRA15_S9_S8_cEEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>(char const*,char const(&)[15],std::string,char &&) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5D8A0 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5D8A0: lea rax, [rsp+88h+var_40] mov rdi, [rax-10h] cmp rdi, rax jz loc_5D933 mov rsi, [rsp+88h+var_40] jmp short loc_5D92B loc_5D8B9: call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aUnexpected; "unexpected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_5D933 mov rsi, [rsp+88h+var_70] loc_5D92B: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5D933: test ebp, ebp jz short loc_5D9B3 mov edi, ebp call _ZN8nlohmann16json_abi_v3_11_36detail10lexer_baseINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15token_type_nameENSG_10token_typeE; nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type_name(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::token_type) mov r14, rax lea r15, [rsp+88h+var_70] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 mov rdi, rax call _strlen lea rsi, [rax+0Bh] lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) lea rsi, aExpected; "; expected " lea rdi, [rsp+88h+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdi, [rsp+88h+var_80] mov rsi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov rsi, [rsp+88h+var_80] mov rdx, [rsp+88h+var_78] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+88h+var_80]; void * cmp rdi, r15 jz short loc_5D9B3 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5D9B3: mov rax, rbx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_5DA0C mov r14, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5D9EA mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_5D9EA mov r14, rax loc_5D9EA: lea rax, [rsp+arg_40] mov rdi, [rax-10h] cmp rdi, rax jz short loc_5DA35 mov rsi, [rsp+arg_40] jmp short loc_5DA2D jmp short loc_5DA05 jmp short loc_5DA0C jmp short loc_5DA1B loc_5DA05: mov r14, rax jmp short loc_5DA35 jmp short $+2 loc_5DA0C: mov r14, rax mov rdi, [rsp+arg_0] cmp rdi, r15 jnz short loc_5DA28 jmp short loc_5DA35 loc_5DA1B: mov r14, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_5DA35 loc_5DA28: mov rsi, [rsp+arg_10] loc_5DA2D: inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5DA35: mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_5DA49 mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5DA49: mov rdi, r14 call __Unwind_Resume
_QWORD * nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::exception_message( _QWORD *a1, long long a2, unsigned int a3, _QWORD *a4) { long long v8; // rsi void *v9; // rdi long long v10; // rsi long long v11; // r14 long long v12; // rax long long v13; // r14 long long v14; // rax void *v16; // [rsp+8h] [rbp-80h] BYREF long long v17; // [rsp+10h] [rbp-78h] _QWORD v18[2]; // [rsp+18h] [rbp-70h] BYREF char v19; // [rsp+2Fh] [rbp-59h] BYREF long long v20; // [rsp+30h] [rbp-58h] BYREF _QWORD v21[2]; // [rsp+38h] [rbp-50h] BYREF long long v22; // [rsp+48h] [rbp-40h] BYREF *a1 = a1 + 2; std::string::_M_construct<char const*>((long long)a1, "syntax error ", (long long)""); v8 = a4[1]; if ( v8 ) { v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; std::string::reserve(&v16, v8 + 15); std::string::append(&v16, "while parsing "); std::string::_M_append(&v16, *a4); std::string::push_back(&v16, 32LL); std::string::_M_append(a1, v16); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } std::string::append(a1, "- "); if ( *(_DWORD *)(a2 + 32) == 14 ) { v20 = *(_QWORD *)(a2 + 152); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::get_token_string( (long long)v21, a2 + 40); v19 = 39; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const*,char const(&)[15],std::string,char>( &v16, &v20, "; last read: '", v21, &v19); std::string::_M_append(a1, v16); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); v9 = (void *)v21[0]; if ( (long long *)v21[0] != &v22 ) { v10 = v22; LABEL_11: operator delete(v9, v10 + 1); } } else { v11 = ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name)(); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v12 = strlen(v11); std::string::reserve(&v16, v12 + 11); std::string::append(&v16, "unexpected "); std::string::append(&v16, v11); std::string::_M_append(a1, v16); v9 = v16; if ( v16 != v18 ) { v10 = v18[0]; goto LABEL_11; } } if ( a3 ) { v13 = nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::token_type_name(a3); v16 = v18; v17 = 0LL; LOBYTE(v18[0]) = 0; v14 = strlen(v13); std::string::reserve(&v16, v14 + 11); std::string::append(&v16, "; expected "); std::string::append(&v16, v13); std::string::_M_append(a1, v16); if ( v16 != v18 ) operator delete(v16, v18[0] + 1LL); } return a1; }
exception_message: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R15,RCX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 LEA RSI,[0x1ef580] LEA RDX,[0x1ef58d] CALL 0x00124458 MOV RSI,qword ptr [R15 + 0x8] TEST RSI,RSI JZ 0x0015d816 LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV qword ptr [R13 + -0x8],0x0 MOV byte ptr [R13],0x0 ADD RSI,0xf LAB_0015d7b2: LEA RDI,[RSP + 0x8] CALL 0x0011be10 LEA RSI,[0x1ef58e] LEA RDI,[RSP + 0x8] CALL 0x0011c1b0 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LEA RDI,[RSP + 0x8] CALL 0x0011b250 LEA RDI,[RSP + 0x8] MOV ESI,0x20 CALL 0x0011b750 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0015d7f7: MOV RDI,RBX CALL 0x0011b250 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0015d816 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8e0 LAB_0015d816: LEA RSI,[0x1ef59d] MOV RDI,RBX CALL 0x0011c1b0 MOV EDI,dword ptr [R14 + 0x20] CMP EDI,0xe JNZ 0x0015d8b9 MOV RAX,qword ptr [R14 + 0x98] ADD R14,0x28 MOV qword ptr [RSP + 0x30],RAX LAB_0015d842: LEA RDI,[RSP + 0x38] MOV RSI,R14 CALL 0x0015d4a0 LEA R8,[RSP + 0x2f] MOV byte ptr [R8],0x27 LAB_0015d858: LEA RDX,[0x1ef5a0] LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x30] LEA RCX,[RSP + 0x38] CALL 0x00163ad8 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0015d87d: MOV RDI,RBX CALL 0x0011b250 LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015d8a0 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8e0 LAB_0015d8a0: LEA RAX,[RSP + 0x48] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015d933 MOV RSI,qword ptr [RSP + 0x48] JMP 0x0015d92b LAB_0015d8b9: CALL 0x00163b9a MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x0011b3f0 LEA RSI,[RAX + 0xb] LAB_0015d8e2: LEA RDI,[RSP + 0x8] CALL 0x0011be10 LEA RSI,[0x1ef5af] LEA RDI,[RSP + 0x8] CALL 0x0011c1b0 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x0011c1b0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0015d914: MOV RDI,RBX CALL 0x0011b250 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x0015d933 MOV RSI,qword ptr [RSP + 0x18] LAB_0015d92b: INC RSI CALL 0x0011b8e0 LAB_0015d933: TEST EBP,EBP JZ 0x0015d9b3 MOV EDI,EBP CALL 0x00163b9a MOV R14,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 MOV RDI,RAX CALL 0x0011b3f0 LEA RSI,[RAX + 0xb] LAB_0015d962: LEA RDI,[RSP + 0x8] CALL 0x0011be10 LEA RSI,[0x1ef5bb] LEA RDI,[RSP + 0x8] CALL 0x0011c1b0 LEA RDI,[RSP + 0x8] MOV RSI,R14 CALL 0x0011c1b0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0015d994: MOV RDI,RBX CALL 0x0011b250 LAB_0015d99c: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x0015d9b3 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8e0 LAB_0015d9b3: MOV RAX,RBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::exception_message(nlohmann::json_abi_v3_11_3::detail::lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::token_type, std::__cxx11::string const&) */ long * nlohmann::json_abi_v3_11_3::detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::exception_message(long *param_1,long param_2,int param_3,ulong *param_4) { char *pcVar1; long *local_80; int8 local_78; int1 local_70; int7 uStack_6f; int1 local_59; int8 local_58; long *local_50 [2]; long local_40 [2]; *param_1 = (long)(param_1 + 2); std::__cxx11::string::_M_construct<char_const*>(param_1,"syntax error ",""); if (param_4[1] != 0) { local_78 = 0; local_70 = 0; /* try { // try from 0015d7b2 to 0015d7ec has its CatchHandler @ 0015da1b */ local_80 = (long *)&local_70; std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::_M_append((char *)&local_80,*param_4); std::__cxx11::string::push_back((char)&local_80); /* try { // try from 0015d7f7 to 0015d7fe has its CatchHandler @ 0015da03 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } /* try { // try from 0015d816 to 0015d824 has its CatchHandler @ 0015da05 */ std::__cxx11::string::append((char *)param_1); if (*(int *)(param_2 + 0x20) == 0xe) { local_58 = *(int8 *)(param_2 + 0x98); /* try { // try from 0015d842 to 0015d84e has its CatchHandler @ 0015d9ff */ lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::get_token_string(); local_59 = 0x27; /* try { // try from 0015d858 to 0015d872 has its CatchHandler @ 0015d9e7 */ concat<std::__cxx11::string,char_const*,char_const(&)[15],std::__cxx11::string,char> ((char **)&local_80,(char *)&local_58,(string *)"; last read: \'",(char *)local_50); /* try { // try from 0015d87d to 0015d884 has its CatchHandler @ 0015d9c7 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } if (local_50[0] == local_40) goto LAB_0015d933; } else { pcVar1 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 0015d8e2 to 0015d909 has its CatchHandler @ 0015da0a */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 0015d914 to 0015d91b has its CatchHandler @ 0015d9c5 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 == (long *)&local_70) goto LAB_0015d933; local_40[0] = CONCAT71(uStack_6f,local_70); local_50[0] = local_80; } operator_delete(local_50[0],local_40[0] + 1); LAB_0015d933: if (param_3 != 0) { pcVar1 = (char *)lexer_base<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::token_type_name(param_3); local_78 = 0; local_70 = 0; local_80 = (long *)&local_70; strlen(pcVar1); /* try { // try from 0015d962 to 0015d989 has its CatchHandler @ 0015da0c */ std::__cxx11::string::reserve((ulong)&local_80); std::__cxx11::string::append((char *)&local_80); std::__cxx11::string::append((char *)&local_80); /* try { // try from 0015d994 to 0015d99b has its CatchHandler @ 0015da01 */ std::__cxx11::string::_M_append((char *)param_1,(ulong)local_80); if (local_80 != (long *)&local_70) { operator_delete(local_80,CONCAT71(uStack_6f,local_70) + 1); } } return param_1; }
86
QUICK_GROUP_MIN_MAX_SELECT::next_max()
eloqsql/sql/opt_range.cc
int QUICK_GROUP_MIN_MAX_SELECT::next_max() { int result; DBUG_ENTER("QUICK_GROUP_MIN_MAX_SELECT::next_max"); /* Get the last key in the (possibly extended) group. */ if (min_max_ranges.elements > 0) result= next_max_in_range(); else result= file->ha_index_read_map(record, group_prefix, make_prev_keypart_map(real_key_parts), HA_READ_PREFIX_LAST); DBUG_RETURN(result); }
O0
cpp
QUICK_GROUP_MIN_MAX_SELECT::next_max(): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) cmpl $0x0, 0xb0(%rax) jbe 0x8c1a8b movq -0x18(%rbp), %rdi callq 0x8c1dd0 movl %eax, -0xc(%rbp) jmp 0x8c1ac0 movq -0x18(%rbp), %rax movq 0x40(%rax), %rdi movq 0x58(%rax), %rsi movq 0x68(%rax), %rdx movl 0xd4(%rax), %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax movq %rax, %rcx subq $0x1, %rcx movl $0x6, %r8d callq 0xd0efc0 movl %eax, -0xc(%rbp) jmp 0x8c1ac2 movl -0xc(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN26QUICK_GROUP_MIN_MAX_SELECT8next_maxEv: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_18], rax cmp dword ptr [rax+0B0h], 0 jbe short loc_8C1A8B mov rdi, [rbp+var_18]; this call _ZN26QUICK_GROUP_MIN_MAX_SELECT17next_max_in_rangeEv; QUICK_GROUP_MIN_MAX_SELECT::next_max_in_range(void) mov [rbp+var_C], eax jmp short loc_8C1AC0 loc_8C1A8B: mov rax, [rbp+var_18] mov rdi, [rax+40h] mov rsi, [rax+58h] mov rdx, [rax+68h] mov eax, [rax+0D4h] mov ecx, eax mov eax, 1 shl rax, cl mov rcx, rax sub rcx, 1 mov r8d, 6 call _ZN7handler17ha_index_read_mapEPhPKhm16ha_rkey_function; handler::ha_index_read_map(uchar *,uchar const*,ulong,ha_rkey_function) mov [rbp+var_C], eax loc_8C1AC0: jmp short $+2 loc_8C1AC2: mov eax, [rbp+var_C] add rsp, 20h pop rbp retn
long long QUICK_GROUP_MIN_MAX_SELECT::next_max(QUICK_GROUP_MIN_MAX_SELECT *this) { if ( *((_DWORD *)this + 44) ) return (unsigned int)QUICK_GROUP_MIN_MAX_SELECT::next_max_in_range(this); else return (unsigned int)handler::ha_index_read_map( *((_QWORD *)this + 8), *((_QWORD *)this + 11), *((_QWORD *)this + 13), (1LL << *((_DWORD *)this + 53)) - 1, 6LL); }
__cxx_global_var_init.12: PUSH RBP MOV RBP,RSP LEA RDI,[0x26c1190] MOV ESI,0x40 CALL 0x008fd550 POP RBP RET
void __cxx_global_var_init_12(void) { time_round_mode_t::time_round_mode_t((time_round_mode_t *)&TIME_FRAC_ROUND,0x40); return; }
87
rebuild_table
eloqsql/client/mysqlcheck.c
static int rebuild_table(char *name) { char *query, *ptr; int rc= 0; DBUG_ENTER("rebuild_table"); query= (char*)my_malloc(PSI_NOT_INSTRUMENTED, 12+strlen(name)+6+1, MYF(MY_WME)); if (!query) DBUG_RETURN(1); ptr= strxmov(query, "ALTER TABLE ", name, " FORCE", NullS); if (verbose >= 3) puts(query); if (mysql_real_query(sock, query, (ulong)(ptr - query))) { fprintf(stderr, "Failed to %s\n", query); fprintf(stderr, "Error: %s\n", mysql_error(sock)); rc= 1; } if (verbose) printf("%-50s %s\n", name, rc ? "FAILED" : "FIXED"); my_free(query); DBUG_RETURN(rc); }
O0
c
rebuild_table: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl $0x0, -0x24(%rbp) movq -0x10(%rbp), %rdi callq 0x363e0 movq %rax, %rsi addq $0xc, %rsi addq $0x6, %rsi addq $0x1, %rsi xorl %edi, %edi movl $0x10, %edx callq 0x7d1e0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) jne 0x38200 jmp 0x381f4 movl $0x1, -0x4(%rbp) jmp 0x382ec movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rdx leaq 0x92a0a(%rip), %rsi # 0xcac19 leaq 0x92a10(%rip), %rcx # 0xcac26 xorl %eax, %eax movl %eax, %r8d movb $0x0, %al callq 0xc6ed0 movq %rax, -0x20(%rbp) cmpl $0x3, 0x3b3053(%rip) # 0x3eb280 jb 0x38238 movq -0x18(%rbp), %rdi callq 0x369b0 movq 0x3b3541(%rip), %rdi # 0x3eb780 movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx callq 0x40ed0 cmpl $0x0, %eax je 0x382aa movq 0x1f7d81(%rip), %rax # 0x22ffe0 movq (%rax), %rdi movq -0x18(%rbp), %rdx leaq 0x927ca(%rip), %rsi # 0xcaa37 movb $0x0, %al callq 0x361c0 movq 0x1f7d65(%rip), %rax # 0x22ffe0 movq (%rax), %rax movq %rax, -0x30(%rbp) movq 0x3b34f7(%rip), %rdi # 0x3eb780 callq 0x45ad0 movq -0x30(%rbp), %rdi movq %rax, %rdx leaq 0x927a9(%rip), %rsi # 0xcaa45 movb $0x0, %al callq 0x361c0 movl $0x1, -0x24(%rbp) cmpl $0x0, 0x3b2fcf(%rip) # 0x3eb280 je 0x382dd movq -0x10(%rbp), %rsi movl -0x24(%rbp), %ecx leaq 0x9296c(%rip), %rdx # 0xcac2d leaq 0x92622(%rip), %rax # 0xca8ea cmpl $0x0, %ecx cmovneq %rax, %rdx leaq 0x9260a(%rip), %rdi # 0xca8e0 movb $0x0, %al callq 0x36070 movq -0x18(%rbp), %rdi callq 0x7d560 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rebuild_table: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_24], 0 mov rdi, [rbp+var_10] call _strlen mov rsi, rax add rsi, 0Ch add rsi, 6 add rsi, 1 xor edi, edi mov edx, 10h call my_malloc mov [rbp+var_18], rax cmp [rbp+var_18], 0 jnz short loc_38200 jmp short $+2 loc_381F4: mov [rbp+var_4], 1 jmp loc_382EC loc_38200: mov rdi, [rbp+var_18] mov rdx, [rbp+var_10] lea rsi, aAlterTable; "ALTER TABLE " lea rcx, aForce; " FORCE" xor eax, eax mov r8d, eax mov al, 0 call strxmov mov [rbp+var_20], rax cmp cs:verbose, 3 jb short loc_38238 mov rdi, [rbp+var_18] call _puts loc_38238: mov rdi, cs:sock mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax call mysql_real_query cmp eax, 0 jz short loc_382AA mov rax, cs:stderr_ptr mov rdi, [rax] mov rdx, [rbp+var_18] lea rsi, aFailedToS; "Failed to %s\n" mov al, 0 call _fprintf mov rax, cs:stderr_ptr mov rax, [rax] mov [rbp+var_30], rax mov rdi, cs:sock call mysql_error mov rdi, [rbp+var_30] mov rdx, rax lea rsi, aErrorS; "Error: %s\n" mov al, 0 call _fprintf mov [rbp+var_24], 1 loc_382AA: cmp cs:verbose, 0 jz short loc_382DD mov rsi, [rbp+var_10] mov ecx, [rbp+var_24] lea rdx, aFixed; "FIXED" lea rax, aFailed; "FAILED" cmp ecx, 0 cmovnz rdx, rax lea rdi, a50sS; "%-50s %s\n" mov al, 0 call _printf loc_382DD: mov rdi, [rbp+var_18] call my_free mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_382EC: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long rebuild_table(const char *a1) { long long v1; // rax int v2; // r9d const char *v3; // rax const char *v4; // rdx long long v6; // [rsp+0h] [rbp-30h] unsigned int v7; // [rsp+Ch] [rbp-24h] long long v8; // [rsp+10h] [rbp-20h] const char *v9; // [rsp+18h] [rbp-18h] v7 = 0; v1 = strlen(a1); v9 = (const char *)my_malloc(0LL, v1 + 19, 16LL); if ( v9 ) { v8 = strxmov((_DWORD)v9, (unsigned int)"ALTER TABLE ", (_DWORD)a1, (unsigned int)" FORCE", 0, v2); if ( (unsigned int)verbose >= 3 ) puts(v9); if ( (unsigned int)mysql_real_query(sock, v9, v8 - (_QWORD)v9) ) { fprintf(stderr, "Failed to %s\n", v9); v6 = stderr; v3 = (const char *)mysql_error(sock); fprintf(v6, "Error: %s\n", v3); v7 = 1; } if ( verbose ) { v4 = "FIXED"; if ( v7 ) v4 = "FAILED"; printf("%-50s %s\n", a1, v4); } my_free(v9); return v7; } else { return 1; } }
rebuild_table: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x24],0x0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001363e0 MOV RSI,RAX ADD RSI,0xc ADD RSI,0x6 ADD RSI,0x1 XOR EDI,EDI MOV EDX,0x10 CALL 0x0017d1e0 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JNZ 0x00138200 JMP 0x001381f4 LAB_001381f4: MOV dword ptr [RBP + -0x4],0x1 JMP 0x001382ec LAB_00138200: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] LEA RSI,[0x1cac19] LEA RCX,[0x1cac26] XOR EAX,EAX MOV R8D,EAX MOV AL,0x0 CALL 0x001c6ed0 MOV qword ptr [RBP + -0x20],RAX CMP dword ptr [0x004eb280],0x3 JC 0x00138238 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001369b0 LAB_00138238: MOV RDI,qword ptr [0x004eb780] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX CALL 0x00140ed0 CMP EAX,0x0 JZ 0x001382aa MOV RAX,qword ptr [0x0032ffe0] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RBP + -0x18] LEA RSI,[0x1caa37] MOV AL,0x0 CALL 0x001361c0 MOV RAX,qword ptr [0x0032ffe0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [0x004eb780] CALL 0x00145ad0 MOV RDI,qword ptr [RBP + -0x30] MOV RDX,RAX LEA RSI,[0x1caa45] MOV AL,0x0 CALL 0x001361c0 MOV dword ptr [RBP + -0x24],0x1 LAB_001382aa: CMP dword ptr [0x004eb280],0x0 JZ 0x001382dd MOV RSI,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x24] LEA RDX,[0x1cac2d] LEA RAX,[0x1ca8ea] CMP ECX,0x0 CMOVNZ RDX,RAX LEA RDI,[0x1ca8e0] MOV AL,0x0 CALL 0x00136070 LAB_001382dd: MOV RDI,qword ptr [RBP + -0x18] CALL 0x0017d560 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_001382ec: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
bool rebuild_table(char *param_1) { FILE *__stream; int iVar1; size_t sVar2; char *__s; long lVar3; int8 uVar4; char *pcVar5; bool bVar6; sVar2 = strlen(param_1); __s = (char *)my_malloc(0,sVar2 + 0x13,0x10); if (__s == (char *)0x0) { bVar6 = true; } else { lVar3 = strxmov(__s,"ALTER TABLE ",param_1," FORCE",0); if (2 < verbose) { puts(__s); } iVar1 = mysql_real_query(sock,__s,lVar3 - (long)__s); bVar6 = iVar1 != 0; if (bVar6) { fprintf(*(FILE **)PTR_stderr_0032ffe0,"Failed to %s\n",__s); __stream = *(FILE **)PTR_stderr_0032ffe0; uVar4 = mysql_error(sock); fprintf(__stream,"Error: %s\n",uVar4); } if (verbose != 0) { pcVar5 = "FIXED"; if (bVar6) { pcVar5 = "FAILED"; } printf("%-50s %s\n",param_1,pcVar5); } my_free(__s); } return bVar6; }
88
lunasvg::SVGTextFragmentsBuilder::fillCharacterPositions(lunasvg::SVGTextPosition const&)
dmazzella[P]pylunasvg/lunasvg/source/svgtextelement.cpp
void SVGTextFragmentsBuilder::fillCharacterPositions(const SVGTextPosition& position) { if(!position.node->isTextPositioningElement()) return; auto element = toSVGTextPositioningElement(position.node); const auto& xList = element->x(); const auto& yList = element->y(); const auto& dxList = element->dx(); const auto& dyList = element->dy(); const auto& rotateList = element->rotate(); auto xListSize = xList.size(); auto yListSize = yList.size(); auto dxListSize = dxList.size(); auto dyListSize = dyList.size(); auto rotateListSize = rotateList.size(); if(!xListSize && !yListSize && !dxListSize && !dyListSize && !rotateListSize) { return; } LengthContext lengthContext(element); std::optional<float> lastRotation; for(auto offset = position.startOffset; offset < position.endOffset; ++offset) { auto index = offset - position.startOffset; if(index >= xListSize && index >= yListSize && index >= dxListSize && index >= dyListSize && index >= rotateListSize) break; auto& characterPosition = m_characterPositions[offset]; if(index < xListSize) characterPosition.x = lengthContext.valueForLength(xList[index], LengthDirection::Horizontal); if(index < yListSize) characterPosition.y = lengthContext.valueForLength(yList[index], LengthDirection::Vertical); if(index < dxListSize) characterPosition.dx = lengthContext.valueForLength(dxList[index], LengthDirection::Horizontal); if(index < dyListSize) characterPosition.dy = lengthContext.valueForLength(dyList[index], LengthDirection::Vertical); if(index < rotateListSize) { characterPosition.rotate = rotateList[index]; lastRotation = characterPosition.rotate; } } if(lastRotation == std::nullopt) return; auto offset = position.startOffset + rotateList.size(); while(offset < position.endOffset) { m_characterPositions[offset++].rotate = lastRotation; } }
O0
cpp
lunasvg::SVGTextFragmentsBuilder::fillCharacterPositions(lunasvg::SVGTextPosition const&): pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0xf0(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq (%rdi), %rax callq *0x38(%rax) testb $0x1, %al jne 0x4d734 jmp 0x4dafa movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x4f690 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x4fe00 movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi callq 0x4fe30 movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rdi callq 0x4fe60 movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rdi callq 0x4fe90 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rdi callq 0x4fec0 movq %rax, -0x40(%rbp) movq -0x20(%rbp), %rdi callq 0x344b0 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi callq 0x344b0 movq %rax, -0x50(%rbp) movq -0x30(%rbp), %rdi callq 0x344b0 movq %rax, -0x58(%rbp) movq -0x38(%rbp), %rdi callq 0x344b0 movq %rax, -0x60(%rbp) movq -0x40(%rbp), %rdi callq 0x14e50 movq %rax, -0x68(%rbp) cmpq $0x0, -0x48(%rbp) jne 0x4d7ee cmpq $0x0, -0x50(%rbp) jne 0x4d7ee cmpq $0x0, -0x58(%rbp) jne 0x4d7ee cmpq $0x0, -0x60(%rbp) jne 0x4d7ee cmpq $0x0, -0x68(%rbp) jne 0x4d7ee jmp 0x4dafa movq -0x18(%rbp), %rsi leaq -0x78(%rbp), %rdi xorl %edx, %edx callq 0x20050 leaq -0x80(%rbp), %rdi callq 0x4fef0 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x4da6f movq -0x88(%rbp), %rax movq -0x10(%rbp), %rcx subq 0x8(%rcx), %rax movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax cmpq -0x48(%rbp), %rax jb 0x4d886 movq -0x90(%rbp), %rax cmpq -0x50(%rbp), %rax jb 0x4d886 movq -0x90(%rbp), %rax cmpq -0x58(%rbp), %rax jb 0x4d886 movq -0x90(%rbp), %rax cmpq -0x60(%rbp), %rax jb 0x4d886 movq -0x90(%rbp), %rax cmpq -0x68(%rbp), %rax jb 0x4d886 jmp 0x4da6f movq -0xf0(%rbp), %rdi addq $0x10, %rdi leaq -0x88(%rbp), %rsi callq 0x4ff10 movq %rax, -0x98(%rbp) movq -0x90(%rbp), %rax cmpq -0x48(%rbp), %rax jae 0x4d8fb movq -0x20(%rbp), %rdi movq -0x90(%rbp), %rsi callq 0x4fff0 movq %rax, %rsi leaq -0x78(%rbp), %rdi xorl %edx, %edx callq 0x49a10 movss %xmm0, -0xa4(%rbp) leaq -0xa0(%rbp), %rdi leaq -0xa4(%rbp), %rsi callq 0x50010 movq -0x98(%rbp), %rax movq -0xa0(%rbp), %rcx movq %rcx, (%rax) movq -0x90(%rbp), %rax cmpq -0x50(%rbp), %rax jae 0x4d956 movq -0x28(%rbp), %rdi movq -0x90(%rbp), %rsi callq 0x4fff0 movq %rax, %rsi leaq -0x78(%rbp), %rdi movl $0x1, %edx callq 0x49a10 movss %xmm0, -0xb0(%rbp) leaq -0xac(%rbp), %rdi leaq -0xb0(%rbp), %rsi callq 0x50010 movq -0x98(%rbp), %rax movq -0xac(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x90(%rbp), %rax cmpq -0x58(%rbp), %rax jae 0x4d9ae movq -0x30(%rbp), %rdi movq -0x90(%rbp), %rsi callq 0x4fff0 movq %rax, %rsi leaq -0x78(%rbp), %rdi xorl %edx, %edx callq 0x49a10 movss %xmm0, -0xbc(%rbp) leaq -0xb8(%rbp), %rdi leaq -0xbc(%rbp), %rsi callq 0x50010 movq -0x98(%rbp), %rax movq -0xb8(%rbp), %rcx movq %rcx, 0x10(%rax) movq -0x90(%rbp), %rax cmpq -0x60(%rbp), %rax jae 0x4da09 movq -0x38(%rbp), %rdi movq -0x90(%rbp), %rsi callq 0x4fff0 movq %rax, %rsi leaq -0x78(%rbp), %rdi movl $0x1, %edx callq 0x49a10 movss %xmm0, -0xc8(%rbp) leaq -0xc4(%rbp), %rdi leaq -0xc8(%rbp), %rsi callq 0x50010 movq -0x98(%rbp), %rax movq -0xc4(%rbp), %rcx movq %rcx, 0x18(%rax) movq -0x90(%rbp), %rax cmpq -0x68(%rbp), %rax jae 0x4da56 movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq 0x50040 movq %rax, %rsi leaq -0xd0(%rbp), %rdi callq 0x50060 movq -0x98(%rbp), %rax movq -0xd0(%rbp), %rcx movq %rcx, 0x20(%rax) movq -0x98(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x80(%rbp) jmp 0x4da58 movq -0x88(%rbp), %rax addq $0x1, %rax movq %rax, -0x88(%rbp) jmp 0x4d815 leaq -0x80(%rbp), %rdi callq 0x50090 testb $0x1, %al jne 0x4da7e jmp 0x4da80 jmp 0x4dafa movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0xf8(%rbp) movq -0x40(%rbp), %rdi callq 0x14e50 movq %rax, %rcx movq -0xf8(%rbp), %rax addq %rcx, %rax movq %rax, -0xe0(%rbp) movq -0xe0(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x4dafa movq -0xf0(%rbp), %rdi addq $0x10, %rdi movq -0xe0(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0xe0(%rbp) movq %rax, -0xe8(%rbp) leaq -0xe8(%rbp), %rsi callq 0x500b0 movq -0x80(%rbp), %rcx movq %rcx, 0x20(%rax) jmp 0x4daac addq $0x100, %rsp # imm = 0x100 popq %rbp retq nopw %cs:(%rax,%rax)
_ZN7lunasvg23SVGTextFragmentsBuilder22fillCharacterPositionsERKNS_15SVGTextPositionE: push rbp mov rbp, rsp sub rsp, 100h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_F0], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rdi] call qword ptr [rax+38h] test al, 1 jnz short loc_4D734 jmp loc_4DAFA loc_4D734: mov rax, [rbp+var_10] mov rdi, [rax]; this call _ZN7lunasvg27toSVGTextPositioningElementEPKNS_7SVGNodeE; lunasvg::toSVGTextPositioningElement(lunasvg::SVGNode const*) mov [rbp+var_18], rax mov rdi, [rbp+var_18]; this call _ZNK7lunasvg25SVGTextPositioningElement1xEv; lunasvg::SVGTextPositioningElement::x(void) mov [rbp+var_20], rax mov rdi, [rbp+var_18]; this call _ZNK7lunasvg25SVGTextPositioningElement1yEv; lunasvg::SVGTextPositioningElement::y(void) mov [rbp+var_28], rax mov rdi, [rbp+var_18]; this call _ZNK7lunasvg25SVGTextPositioningElement2dxEv; lunasvg::SVGTextPositioningElement::dx(void) mov [rbp+var_30], rax mov rdi, [rbp+var_18]; this call _ZNK7lunasvg25SVGTextPositioningElement2dyEv; lunasvg::SVGTextPositioningElement::dy(void) mov [rbp+var_38], rax mov rdi, [rbp+var_18]; this call _ZNK7lunasvg25SVGTextPositioningElement6rotateEv; lunasvg::SVGTextPositioningElement::rotate(void) mov [rbp+var_40], rax mov rdi, [rbp+var_20] call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EE4sizeEv; std::vector<lunasvg::Length>::size(void) mov [rbp+var_48], rax mov rdi, [rbp+var_28] call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EE4sizeEv; std::vector<lunasvg::Length>::size(void) mov [rbp+var_50], rax mov rdi, [rbp+var_30] call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EE4sizeEv; std::vector<lunasvg::Length>::size(void) mov [rbp+var_58], rax mov rdi, [rbp+var_38] call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EE4sizeEv; std::vector<lunasvg::Length>::size(void) mov [rbp+var_60], rax mov rdi, [rbp+var_40] call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void) mov [rbp+var_68], rax cmp [rbp+var_48], 0 jnz short loc_4D7EE cmp [rbp+var_50], 0 jnz short loc_4D7EE cmp [rbp+var_58], 0 jnz short loc_4D7EE cmp [rbp+var_60], 0 jnz short loc_4D7EE cmp [rbp+var_68], 0 jnz short loc_4D7EE jmp loc_4DAFA loc_4D7EE: mov rsi, [rbp+var_18] lea rdi, [rbp+var_78] xor edx, edx call _ZN7lunasvg13LengthContextC2EPKNS_10SVGElementENS_5UnitsE; lunasvg::LengthContext::LengthContext(lunasvg::SVGElement const*,lunasvg::Units) lea rdi, [rbp+var_80] call _ZNSt8optionalIfEC2Ev; std::optional<float>::optional(void) mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_88], rax loc_4D815: mov rax, [rbp+var_88] mov rcx, [rbp+var_10] cmp rax, [rcx+10h] jnb loc_4DA6F mov rax, [rbp+var_88] mov rcx, [rbp+var_10] sub rax, [rcx+8] mov [rbp+var_90], rax mov rax, [rbp+var_90] cmp rax, [rbp+var_48] jb short loc_4D886 mov rax, [rbp+var_90] cmp rax, [rbp+var_50] jb short loc_4D886 mov rax, [rbp+var_90] cmp rax, [rbp+var_58] jb short loc_4D886 mov rax, [rbp+var_90] cmp rax, [rbp+var_60] jb short loc_4D886 mov rax, [rbp+var_90] cmp rax, [rbp+var_68] jb short loc_4D886 jmp loc_4DA6F loc_4D886: mov rdi, [rbp+var_F0] add rdi, 10h lea rsi, [rbp+var_88] call _ZNSt3mapImN7lunasvg20SVGCharacterPositionESt4lessImESaISt4pairIKmS1_EEEixERS5_; std::map<ulong,lunasvg::SVGCharacterPosition>::operator[](ulong const&) mov [rbp+var_98], rax mov rax, [rbp+var_90] cmp rax, [rbp+var_48] jnb short loc_4D8FB mov rdi, [rbp+var_20] mov rsi, [rbp+var_90] call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EEixEm; std::vector<lunasvg::Length>::operator[](ulong) mov rsi, rax lea rdi, [rbp+var_78] xor edx, edx call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movss [rbp+var_A4], xmm0 lea rdi, [rbp+var_A0] lea rsi, [rbp+var_A4] call _ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_ mov rax, [rbp+var_98] mov rcx, [rbp+var_A0] mov [rax], rcx loc_4D8FB: mov rax, [rbp+var_90] cmp rax, [rbp+var_50] jnb short loc_4D956 mov rdi, [rbp+var_28] mov rsi, [rbp+var_90] call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EEixEm; std::vector<lunasvg::Length>::operator[](ulong) mov rsi, rax lea rdi, [rbp+var_78] mov edx, 1 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movss [rbp+var_B0], xmm0 lea rdi, [rbp+var_AC] lea rsi, [rbp+var_B0] call _ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_ mov rax, [rbp+var_98] mov rcx, [rbp+var_AC] mov [rax+8], rcx loc_4D956: mov rax, [rbp+var_90] cmp rax, [rbp+var_58] jnb short loc_4D9AE mov rdi, [rbp+var_30] mov rsi, [rbp+var_90] call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EEixEm; std::vector<lunasvg::Length>::operator[](ulong) mov rsi, rax lea rdi, [rbp+var_78] xor edx, edx call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movss [rbp+var_BC], xmm0 lea rdi, [rbp+var_B8] lea rsi, [rbp+var_BC] call _ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_ mov rax, [rbp+var_98] mov rcx, [rbp+var_B8] mov [rax+10h], rcx loc_4D9AE: mov rax, [rbp+var_90] cmp rax, [rbp+var_60] jnb short loc_4DA09 mov rdi, [rbp+var_38] mov rsi, [rbp+var_90] call _ZNKSt6vectorIN7lunasvg6LengthESaIS1_EEixEm; std::vector<lunasvg::Length>::operator[](ulong) mov rsi, rax lea rdi, [rbp+var_78] mov edx, 1 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movss [rbp+var_C8], xmm0 lea rdi, [rbp+var_C4] lea rsi, [rbp+var_C8] call _ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_ mov rax, [rbp+var_98] mov rcx, [rbp+var_C4] mov [rax+18h], rcx loc_4DA09: mov rax, [rbp+var_90] cmp rax, [rbp+var_68] jnb short loc_4DA56 mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call _ZNKSt6vectorIfSaIfEEixEm; std::vector<float>::operator[](ulong) mov rsi, rax lea rdi, [rbp+var_D0] call _ZNSt8optionalIfEC2IRKfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES5_IS6_ISt10in_place_tSD_EESt16is_constructibleIfJS9_EESt14is_convertibleIS9_fEEEbE4typeELb1EEEOS9_ mov rax, [rbp+var_98] mov rcx, [rbp+var_D0] mov [rax+20h], rcx mov rax, [rbp+var_98] mov rax, [rax+20h] mov [rbp+var_80], rax loc_4DA56: jmp short $+2 loc_4DA58: mov rax, [rbp+var_88] add rax, 1 mov [rbp+var_88], rax jmp loc_4D815 loc_4DA6F: lea rdi, [rbp+var_80] call _ZSteqIfEbRKSt8optionalIT_ESt9nullopt_t; std::operator==<float>(std::optional<float> const&,std::nullopt_t) test al, 1 jnz short loc_4DA7E jmp short loc_4DA80 loc_4DA7E: jmp short loc_4DAFA loc_4DA80: mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_F8], rax mov rdi, [rbp+var_40] call _ZNKSt6vectorIfSaIfEE4sizeEv; std::vector<float>::size(void) mov rcx, rax mov rax, [rbp+var_F8] add rax, rcx mov [rbp+var_E0], rax loc_4DAAC: mov rax, [rbp+var_E0] mov rcx, [rbp+var_10] cmp rax, [rcx+10h] jnb short loc_4DAFA mov rdi, [rbp+var_F0] add rdi, 10h mov rax, [rbp+var_E0] mov rcx, rax add rcx, 1 mov [rbp+var_E0], rcx mov [rbp+var_E8], rax lea rsi, [rbp+var_E8] call _ZNSt3mapImN7lunasvg20SVGCharacterPositionESt4lessImESaISt4pairIKmS1_EEEixEOm; std::map<ulong,lunasvg::SVGCharacterPosition>::operator[](ulong &&) mov rcx, [rbp+var_80] mov [rax+20h], rcx jmp short loc_4DAAC loc_4DAFA: add rsp, 100h pop rbp retn
long long lunasvg::SVGTextFragmentsBuilder::fillCharacterPositions( lunasvg::SVGTextFragmentsBuilder *this, const lunasvg::SVGTextPosition *a2) { long long result; // rax lunasvg::Length *v3; // rax lunasvg::Length *v4; // rax lunasvg::Length *v5; // rax lunasvg::Length *v6; // rax long long v7; // rax unsigned long long v8; // rax long long v9; // rax long long v10; // [rsp+8h] [rbp-F8h] unsigned long long v11; // [rsp+18h] [rbp-E8h] BYREF unsigned long long v12; // [rsp+20h] [rbp-E0h] long long v13; // [rsp+30h] [rbp-D0h] BYREF float v14; // [rsp+38h] [rbp-C8h] BYREF long long v15; // [rsp+3Ch] [rbp-C4h] BYREF float v16; // [rsp+44h] [rbp-BCh] BYREF long long v17; // [rsp+48h] [rbp-B8h] BYREF float v18; // [rsp+50h] [rbp-B0h] BYREF long long v19; // [rsp+54h] [rbp-ACh] BYREF float v20; // [rsp+5Ch] [rbp-A4h] BYREF long long v21; // [rsp+60h] [rbp-A0h] BYREF _QWORD *v22; // [rsp+68h] [rbp-98h] unsigned long long v23; // [rsp+70h] [rbp-90h] unsigned long long i; // [rsp+78h] [rbp-88h] BYREF long long v25; // [rsp+80h] [rbp-80h] BYREF _BYTE v26[16]; // [rsp+88h] [rbp-78h] BYREF unsigned long long v27; // [rsp+98h] [rbp-68h] unsigned long long v28; // [rsp+A0h] [rbp-60h] unsigned long long v29; // [rsp+A8h] [rbp-58h] __int128 v30; // [rsp+B0h] [rbp-50h] _QWORD *v31; // [rsp+C0h] [rbp-40h] _QWORD *v32; // [rsp+C8h] [rbp-38h] _QWORD *v33; // [rsp+D0h] [rbp-30h] _QWORD *v34; // [rsp+D8h] [rbp-28h] _QWORD *v35; // [rsp+E0h] [rbp-20h] lunasvg::SVGTextPositioningElement *v36; // [rsp+E8h] [rbp-18h] const lunasvg::SVGTextPosition *v37; // [rsp+F0h] [rbp-10h] lunasvg::SVGTextFragmentsBuilder *v38; // [rsp+F8h] [rbp-8h] v38 = this; v37 = a2; result = (*(long long ( **)(_QWORD))(**(_QWORD **)a2 + 56LL))(*(_QWORD *)a2); if ( (result & 1) != 0 ) { v36 = (lunasvg::SVGTextPositioningElement *)lunasvg::toSVGTextPositioningElement(*(lunasvg **)v37, a2); v35 = (_QWORD *)lunasvg::SVGTextPositioningElement::x(v36); v34 = (_QWORD *)lunasvg::SVGTextPositioningElement::y(v36); v33 = (_QWORD *)lunasvg::SVGTextPositioningElement::dx(v36); v32 = (_QWORD *)lunasvg::SVGTextPositioningElement::dy(v36); v31 = (_QWORD *)lunasvg::SVGTextPositioningElement::rotate(v36); *((_QWORD *)&v30 + 1) = std::vector<lunasvg::Length>::size(v35); *(_QWORD *)&v30 = std::vector<lunasvg::Length>::size(v34); v29 = std::vector<lunasvg::Length>::size(v33); v28 = std::vector<lunasvg::Length>::size(v32); result = std::vector<float>::size(v31); v27 = result; if ( v30 != 0 || v29 || v28 || v27 ) { lunasvg::LengthContext::LengthContext((long long)v26, (long long)v36, 0); std::optional<float>::optional(&v25); for ( i = *((_QWORD *)v37 + 1); i < *((_QWORD *)v37 + 2); ++i ) { v23 = i - *((_QWORD *)v37 + 1); if ( v23 >= *((_QWORD *)&v30 + 1) && v23 >= (unsigned long long)v30 && v23 >= v29 && v23 >= v28 && v23 >= v27 ) break; v22 = (_QWORD *)std::map<unsigned long,lunasvg::SVGCharacterPosition>::operator[]((char *)this + 16, &i); if ( v23 < *((_QWORD *)&v30 + 1) ) { v3 = (lunasvg::Length *)std::vector<lunasvg::Length>::operator[](v35, v23); v20 = lunasvg::LengthContext::valueForLength((long long)v26, v3, 0); ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_( &v21, &v20); *v22 = v21; } if ( v23 < (unsigned long long)v30 ) { v4 = (lunasvg::Length *)std::vector<lunasvg::Length>::operator[](v34, v23); v18 = lunasvg::LengthContext::valueForLength((long long)v26, v4, 1u); ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_( &v19, &v18); v22[1] = v19; } if ( v23 < v29 ) { v5 = (lunasvg::Length *)std::vector<lunasvg::Length>::operator[](v33, v23); v16 = lunasvg::LengthContext::valueForLength((long long)v26, v5, 0); ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_( &v17, &v16); v22[2] = v17; } if ( v23 < v28 ) { v6 = (lunasvg::Length *)std::vector<lunasvg::Length>::operator[](v32, v23); v14 = lunasvg::LengthContext::valueForLength((long long)v26, v6, 1u); ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_( &v15, &v14); v22[3] = v15; } if ( v23 < v27 ) { v7 = std::vector<float>::operator[](v31, v23); ZNSt8optionalIfEC2IRKfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES5_IS6_ISt10in_place_tSD_EESt16is_constructibleIfJS9_EESt14is_convertibleIS9_fEEEbE4typeELb1EEEOS9_( &v13, v7); v22[4] = v13; v25 = v22[4]; } } result = std::operator==<float>(&v25); if ( (result & 1) == 0 ) { v10 = *((_QWORD *)v37 + 1); v12 = std::vector<float>::size(v31) + v10; while ( 1 ) { result = v12; if ( v12 >= *((_QWORD *)v37 + 2) ) break; v8 = v12++; v11 = v8; v9 = std::map<unsigned long,lunasvg::SVGCharacterPosition>::operator[]((char *)this + 16, &v11); *(_QWORD *)(v9 + 32) = v25; } } } } return result; }
fillCharacterPositions: PUSH RBP MOV RBP,RSP SUB RSP,0x100 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0xf0],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x38] TEST AL,0x1 JNZ 0x0014d734 JMP 0x0014dafa LAB_0014d734: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x0014f690 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014fe00 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014fe30 MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014fe60 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014fe90 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x0014fec0 MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x001344b0 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x28] CALL 0x001344b0 MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x001344b0 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x38] CALL 0x001344b0 MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x00114e50 MOV qword ptr [RBP + -0x68],RAX CMP qword ptr [RBP + -0x48],0x0 JNZ 0x0014d7ee CMP qword ptr [RBP + -0x50],0x0 JNZ 0x0014d7ee CMP qword ptr [RBP + -0x58],0x0 JNZ 0x0014d7ee CMP qword ptr [RBP + -0x60],0x0 JNZ 0x0014d7ee CMP qword ptr [RBP + -0x68],0x0 JNZ 0x0014d7ee JMP 0x0014dafa LAB_0014d7ee: MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0x78] XOR EDX,EDX CALL 0x00120050 LEA RDI,[RBP + -0x80] CALL 0x0014fef0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x88],RAX LAB_0014d815: MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JNC 0x0014da6f MOV RAX,qword ptr [RBP + -0x88] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,qword ptr [RCX + 0x8] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x48] JC 0x0014d886 MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x50] JC 0x0014d886 MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x58] JC 0x0014d886 MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x60] JC 0x0014d886 MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x68] JC 0x0014d886 JMP 0x0014da6f LAB_0014d886: MOV RDI,qword ptr [RBP + -0xf0] ADD RDI,0x10 LEA RSI,[RBP + -0x88] CALL 0x0014ff10 MOV qword ptr [RBP + -0x98],RAX MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x48] JNC 0x0014d8fb MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x90] CALL 0x0014fff0 MOV RSI,RAX LEA RDI,[RBP + -0x78] XOR EDX,EDX CALL 0x00149a10 MOVSS dword ptr [RBP + -0xa4],XMM0 LEA RDI,[RBP + -0xa0] LEA RSI,[RBP + -0xa4] CALL 0x00150010 MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0xa0] MOV qword ptr [RAX],RCX LAB_0014d8fb: MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x50] JNC 0x0014d956 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x90] CALL 0x0014fff0 MOV RSI,RAX LEA RDI,[RBP + -0x78] MOV EDX,0x1 CALL 0x00149a10 MOVSS dword ptr [RBP + -0xb0],XMM0 LEA RDI,[RBP + -0xac] LEA RSI,[RBP + -0xb0] CALL 0x00150010 MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0xac] MOV qword ptr [RAX + 0x8],RCX LAB_0014d956: MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x58] JNC 0x0014d9ae MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [RBP + -0x90] CALL 0x0014fff0 MOV RSI,RAX LEA RDI,[RBP + -0x78] XOR EDX,EDX CALL 0x00149a10 MOVSS dword ptr [RBP + -0xbc],XMM0 LEA RDI,[RBP + -0xb8] LEA RSI,[RBP + -0xbc] CALL 0x00150010 MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0xb8] MOV qword ptr [RAX + 0x10],RCX LAB_0014d9ae: MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x60] JNC 0x0014da09 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x90] CALL 0x0014fff0 MOV RSI,RAX LEA RDI,[RBP + -0x78] MOV EDX,0x1 CALL 0x00149a10 MOVSS dword ptr [RBP + -0xc8],XMM0 LEA RDI,[RBP + -0xc4] LEA RSI,[RBP + -0xc8] CALL 0x00150010 MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0xc4] MOV qword ptr [RAX + 0x18],RCX LAB_0014da09: MOV RAX,qword ptr [RBP + -0x90] CMP RAX,qword ptr [RBP + -0x68] JNC 0x0014da56 MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL 0x00150040 MOV RSI,RAX LEA RDI,[RBP + -0xd0] CALL 0x00150060 MOV RAX,qword ptr [RBP + -0x98] MOV RCX,qword ptr [RBP + -0xd0] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x98] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x80],RAX LAB_0014da56: JMP 0x0014da58 LAB_0014da58: MOV RAX,qword ptr [RBP + -0x88] ADD RAX,0x1 MOV qword ptr [RBP + -0x88],RAX JMP 0x0014d815 LAB_0014da6f: LEA RDI,[RBP + -0x80] CALL 0x00150090 TEST AL,0x1 JNZ 0x0014da7e JMP 0x0014da80 LAB_0014da7e: JMP 0x0014dafa LAB_0014da80: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0xf8],RAX MOV RDI,qword ptr [RBP + -0x40] CALL 0x00114e50 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0xf8] ADD RAX,RCX MOV qword ptr [RBP + -0xe0],RAX LAB_0014daac: MOV RAX,qword ptr [RBP + -0xe0] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] JNC 0x0014dafa MOV RDI,qword ptr [RBP + -0xf0] ADD RDI,0x10 MOV RAX,qword ptr [RBP + -0xe0] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0xe0],RCX MOV qword ptr [RBP + -0xe8],RAX LEA RSI,[RBP + -0xe8] CALL 0x001500b0 MOV RCX,qword ptr [RBP + -0x80] MOV qword ptr [RAX + 0x20],RCX JMP 0x0014daac LAB_0014dafa: ADD RSP,0x100 POP RBP RET
/* lunasvg::SVGTextFragmentsBuilder::fillCharacterPositions(lunasvg::SVGTextPosition const&) */ void __thiscall lunasvg::SVGTextFragmentsBuilder::fillCharacterPositions (SVGTextFragmentsBuilder *this,SVGTextPosition *param_1) { bool bVar1; ulong uVar2; int8 uVar3; long lVar4; long lVar5; ulong local_f0; ulong local_e8; int8 local_d8; int4 local_d0; int8 local_cc; int4 local_c4; int8 local_c0; int4 local_b8; int8 local_b4; int4 local_ac; int8 local_a8; int8 *local_a0; ulong local_98; ulong local_90; int8 local_88; LengthContext local_80 [16]; ulong local_70; ulong local_68; ulong local_60; ulong local_58; ulong local_50; vector<float,std::allocator<float>> *local_48; vector<lunasvg::Length,std::allocator<lunasvg::Length>> *local_40; vector<lunasvg::Length,std::allocator<lunasvg::Length>> *local_38; vector<lunasvg::Length,std::allocator<lunasvg::Length>> *local_30; vector<lunasvg::Length,std::allocator<lunasvg::Length>> *local_28; SVGTextPositioningElement *local_20; SVGTextPosition *local_18; SVGTextFragmentsBuilder *local_10; local_18 = param_1; local_10 = this; uVar2 = (**(code **)(**(long **)param_1 + 0x38))(); if ((uVar2 & 1) != 0) { local_20 = (SVGTextPositioningElement *)toSVGTextPositioningElement(*(SVGNode **)local_18); local_28 = (vector<lunasvg::Length,std::allocator<lunasvg::Length>> *) SVGTextPositioningElement::x(local_20); local_30 = (vector<lunasvg::Length,std::allocator<lunasvg::Length>> *) SVGTextPositioningElement::y(local_20); local_38 = (vector<lunasvg::Length,std::allocator<lunasvg::Length>> *) SVGTextPositioningElement::dx(local_20); local_40 = (vector<lunasvg::Length,std::allocator<lunasvg::Length>> *) SVGTextPositioningElement::dy(local_20); local_48 = (vector<float,std::allocator<float>> *)SVGTextPositioningElement::rotate(local_20); local_50 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::size(local_28); local_58 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::size(local_30); local_60 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::size(local_38); local_68 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::size(local_40); local_70 = std::vector<float,std::allocator<float>>::size(local_48); if ((((local_50 != 0) || (local_58 != 0)) || (local_60 != 0)) || ((local_68 != 0 || (local_70 != 0)))) { LengthContext::LengthContext(local_80,local_20,0); std::optional<float>::optional((optional<float> *)&local_88); for (local_90 = *(ulong *)(local_18 + 8); (local_90 < *(ulong *)(local_18 + 0x10) && (((local_98 = local_90 - *(long *)(local_18 + 8), local_98 < local_50 || (local_98 < local_58)) || ((local_98 < local_60 || ((local_98 < local_68 || (local_98 < local_70)))))))); local_90 = local_90 + 1) { local_a0 = (int8 *) std:: map<unsigned_long,lunasvg::SVGCharacterPosition,std::less<unsigned_long>,std::allocator<std::pair<unsigned_long_const,lunasvg::SVGCharacterPosition>>> ::operator[]((map<unsigned_long,lunasvg::SVGCharacterPosition,std::less<unsigned_long>,std::allocator<std::pair<unsigned_long_const,lunasvg::SVGCharacterPosition>>> *)(this + 0x10),&local_90); if (local_98 < local_50) { uVar3 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::operator[] (local_28,local_98); local_ac = LengthContext::valueForLength(local_80,uVar3,0); _ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_ (&local_a8,&local_ac); *local_a0 = local_a8; } if (local_98 < local_58) { uVar3 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::operator[] (local_30,local_98); local_b8 = LengthContext::valueForLength(local_80,uVar3,1); _ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_ (&local_b4,&local_b8); local_a0[1] = local_b4; } if (local_98 < local_60) { uVar3 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::operator[] (local_38,local_98); local_c4 = LengthContext::valueForLength(local_80,uVar3,0); _ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_ (&local_c0,&local_c4); local_a0[2] = local_c0; } if (local_98 < local_68) { uVar3 = std::vector<lunasvg::Length,std::allocator<lunasvg::Length>>::operator[] (local_40,local_98); local_d0 = LengthContext::valueForLength(local_80,uVar3,1); _ZNSt8optionalIfEC2IfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES3_IS4_ISt10in_place_tSB_EESt16is_constructibleIfJS7_EESt14is_convertibleIS7_fEEEbE4typeELb1EEEOS7_ (&local_cc,&local_d0); local_a0[3] = local_cc; } if (local_98 < local_70) { uVar3 = std::vector<float,std::allocator<float>>::operator[](local_48,local_98); _ZNSt8optionalIfEC2IRKfTnNSt9enable_ifIX7__and_vISt6__not_ISt7is_sameIS0_NSt9remove_cvINSt16remove_referenceIT_E4typeEE4typeEEES5_IS6_ISt10in_place_tSD_EESt16is_constructibleIfJS9_EESt14is_convertibleIS9_fEEEbE4typeELb1EEEOS9_ (&local_d8,uVar3); local_a0[4] = local_d8; local_88 = local_a0[4]; } } bVar1 = std::operator==(&local_88); if (!bVar1) { lVar5 = *(long *)(local_18 + 8); lVar4 = std::vector<float,std::allocator<float>>::size(local_48); local_e8 = lVar5 + lVar4; while (local_e8 < *(ulong *)(local_18 + 0x10)) { local_f0 = local_e8; local_e8 = local_e8 + 1; lVar5 = std:: map<unsigned_long,lunasvg::SVGCharacterPosition,std::less<unsigned_long>,std::allocator<std::pair<unsigned_long_const,lunasvg::SVGCharacterPosition>>> ::operator[]((map<unsigned_long,lunasvg::SVGCharacterPosition,std::less<unsigned_long>,std::allocator<std::pair<unsigned_long_const,lunasvg::SVGCharacterPosition>>> *)(this + 0x10),&local_f0); *(int8 *)(lVar5 + 0x20) = local_88; } } } } return; }
89
LefDefParser::lefwLayerRoutingMinimumcut(double, double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerRoutingMinimumcut(double numCuts, double minWidth) { if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING) return LEFW_BAD_ORDER; if (!lefwIsRouting) return LEFW_BAD_DATA; // only routing calls this func if (prtSemiColon) { // the previous statement hasn't written the ; yet if (lefwWriteEncrypt) encPrint(lefwFile, (char*) ";\n"); else fprintf(lefwFile, ";\n"); prtSemiColon = 0; } if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " MINIMUMCUT %.11g WIDTH %.11g ", numCuts, minWidth); else fprintf(lefwFile, " MINIMUMCUT %.11g WIDTH %.11g ", numCuts, minWidth); lefwLines++; prtSemiColon = 1; lefwIsRoutingMinCut = 1; lefwIsRoutingMinCutDist = 0; lefwIsRoutingMinCutLen = 0; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerRoutingMinimumcut(double, double): subq $0x18, %rsp movsd %xmm0, 0x8(%rsp) movsd %xmm1, (%rsp) leaq 0x2289a(%rip), %rax # 0x32e00 cmpq $0x0, (%rax) jne 0x10579 movl $0x1, 0x14(%rsp) jmp 0x106a4 leaq 0x22ad0(%rip), %rax # 0x33050 cmpl $0x7, (%rax) je 0x1059e leaq 0x22ac4(%rip), %rax # 0x33050 cmpl $0x1f, (%rax) je 0x1059e movl $0x2, 0x14(%rsp) jmp 0x106a4 leaq 0x22b1f(%rip), %rax # 0x330c4 cmpl $0x0, (%rax) jne 0x105b7 movl $0x3, 0x14(%rsp) jmp 0x106a4 cmpl $0x0, 0x22b36(%rip) # 0x330f4 je 0x10605 cmpl $0x0, 0x22b25(%rip) # 0x330ec je 0x105e3 leaq 0x22830(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x1997a(%rip), %rsi # 0x29f54 movb $0x0, %al callq 0x289b0 jmp 0x105fb leaq 0x22816(%rip), %rax # 0x32e00 movq (%rax), %rdi leaq 0x19960(%rip), %rsi # 0x29f54 movb $0x0, %al callq 0x1100 movl $0x0, 0x22aef(%rip) # 0x330f4 cmpl $0x0, 0x22ae0(%rip) # 0x330ec je 0x10633 leaq 0x227eb(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 movsd (%rsp), %xmm1 leaq 0x19df0(%rip), %rsi # 0x2a41a movb $0x2, %al callq 0x289b0 jmp 0x10656 leaq 0x227c6(%rip), %rax # 0x32e00 movq (%rax), %rdi movsd 0x8(%rsp), %xmm0 movsd (%rsp), %xmm1 leaq 0x19dcb(%rip), %rsi # 0x2a41a movb $0x2, %al callq 0x1100 leaq 0x229ef(%rip), %rax # 0x3304c movl (%rax), %ecx addl $0x1, %ecx leaq 0x229e3(%rip), %rax # 0x3304c movl %ecx, (%rax) movl $0x1, 0x22a7f(%rip) # 0x330f4 leaq 0x22a4c(%rip), %rax # 0x330c8 movl $0x1, (%rax) leaq 0x22a43(%rip), %rax # 0x330cc movl $0x0, (%rax) leaq 0x22a3a(%rip), %rax # 0x330d0 movl $0x0, (%rax) movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopl (%rax)
_ZN12LefDefParser26lefwLayerRoutingMinimumcutEdd: sub rsp, 18h movsd [rsp+18h+var_10], xmm0 movsd [rsp+18h+var_18], xmm1 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_10579 mov [rsp+18h+var_4], 1 jmp loc_106A4 loc_10579: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 7 jz short loc_1059E lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Fh jz short loc_1059E mov [rsp+18h+var_4], 2 jmp loc_106A4 loc_1059E: lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting cmp dword ptr [rax], 0 jnz short loc_105B7 mov [rsp+18h+var_4], 3 jmp loc_106A4 loc_105B7: cmp cs:_ZN12LefDefParserL12prtSemiColonE, 0; LefDefParser::prtSemiColon jz short loc_10605 cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_105E3 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_105FB loc_105E3: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aDividercharS+11h; ";\n" mov al, 0 call _fprintf loc_105FB: mov cs:_ZN12LefDefParserL12prtSemiColonE, 0; LefDefParser::prtSemiColon loc_10605: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz short loc_10633 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] movsd xmm1, [rsp+18h+var_18] lea rsi, aMinimumcut11gW; " MINIMUMCUT %.11g WIDTH %.11g " mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_10656 loc_10633: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] movsd xmm0, [rsp+18h+var_10] movsd xmm1, [rsp+18h+var_18] lea rsi, aMinimumcut11gW; " MINIMUMCUT %.11g WIDTH %.11g " mov al, 2 call _fprintf loc_10656: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov cs:_ZN12LefDefParserL12prtSemiColonE, 1; LefDefParser::prtSemiColon lea rax, _ZN12LefDefParser19lefwIsRoutingMinCutE; LefDefParser::lefwIsRoutingMinCut mov dword ptr [rax], 1 lea rax, _ZN12LefDefParser23lefwIsRoutingMinCutDistE; LefDefParser::lefwIsRoutingMinCutDist mov dword ptr [rax], 0 lea rax, _ZN12LefDefParser22lefwIsRoutingMinCutLenE; LefDefParser::lefwIsRoutingMinCutLen mov dword ptr [rax], 0 mov [rsp+18h+var_4], 0 loc_106A4: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::lefwLayerRoutingMinimumcut( LefDefParser *this, double a2, double a3, long long a4, int a5, int a6, int a7, int a8) { if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 7 || LefDefParser::lefwState == 31 ) { if ( LefDefParser::lefwIsRouting ) { if ( LefDefParser::prtSemiColon ) { if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)";\n", a5, a6, a7, a8); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, ";\n"); LefDefParser::prtSemiColon = 0; } if ( LefDefParser::lefwWriteEncrypt ) LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" MINIMUMCUT %.11g WIDTH %.11g ", a5, a6, a7, a8); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " MINIMUMCUT %.11g WIDTH %.11g ", a2, a3); ++LefDefParser::lefwLines; LefDefParser::prtSemiColon = 1; LefDefParser::lefwIsRoutingMinCut = 1; LefDefParser::lefwIsRoutingMinCutDist = 0; LefDefParser::lefwIsRoutingMinCutLen = 0; return 0; } else { return 3; } } else { return 2; } } else { return 1; } }
lefwLayerRoutingMinimumcut: SUB RSP,0x18 MOVSD qword ptr [RSP + 0x8],XMM0 MOVSD qword ptr [RSP],XMM1 LEA RAX,[0x132e00] CMP qword ptr [RAX],0x0 JNZ 0x00110579 MOV dword ptr [RSP + 0x14],0x1 JMP 0x001106a4 LAB_00110579: LEA RAX,[0x133050] CMP dword ptr [RAX],0x7 JZ 0x0011059e LEA RAX,[0x133050] CMP dword ptr [RAX],0x1f JZ 0x0011059e MOV dword ptr [RSP + 0x14],0x2 JMP 0x001106a4 LAB_0011059e: LEA RAX,[0x1330c4] CMP dword ptr [RAX],0x0 JNZ 0x001105b7 MOV dword ptr [RSP + 0x14],0x3 JMP 0x001106a4 LAB_001105b7: CMP dword ptr [0x001330f4],0x0 JZ 0x00110605 CMP dword ptr [0x001330ec],0x0 JZ 0x001105e3 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f54] MOV AL,0x0 CALL 0x001289b0 JMP 0x001105fb LAB_001105e3: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] LEA RSI,[0x129f54] MOV AL,0x0 CALL 0x00101100 LAB_001105fb: MOV dword ptr [0x001330f4],0x0 LAB_00110605: CMP dword ptr [0x001330ec],0x0 JZ 0x00110633 LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD XMM1,qword ptr [RSP] LEA RSI,[0x12a41a] MOV AL,0x2 CALL 0x001289b0 JMP 0x00110656 LAB_00110633: LEA RAX,[0x132e00] MOV RDI,qword ptr [RAX] MOVSD XMM0,qword ptr [RSP + 0x8] MOVSD XMM1,qword ptr [RSP] LEA RSI,[0x12a41a] MOV AL,0x2 CALL 0x00101100 LAB_00110656: LEA RAX,[0x13304c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x13304c] MOV dword ptr [RAX],ECX MOV dword ptr [0x001330f4],0x1 LEA RAX,[0x1330c8] MOV dword ptr [RAX],0x1 LEA RAX,[0x1330cc] MOV dword ptr [RAX],0x0 LEA RAX,[0x1330d0] MOV dword ptr [RAX],0x0 MOV dword ptr [RSP + 0x14],0x0 LAB_001106a4: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::lefwLayerRoutingMinimumcut(double, double) */ int4 LefDefParser::lefwLayerRoutingMinimumcut(double param_1,double param_2) { int4 local_4; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if ((lefwState == 7) || (lefwState == 0x1f)) { if (lefwIsRouting == 0) { local_4 = 3; } else { if (prtSemiColon != 0) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile,";\n"); } else { encPrint(lefwFile,";\n"); } prtSemiColon = 0; } if (lefwWriteEncrypt == 0) { fprintf(lefwFile," MINIMUMCUT %.11g WIDTH %.11g ",param_1,param_2); } else { encPrint(lefwFile," MINIMUMCUT %.11g WIDTH %.11g ",param_1,param_2); } lefwLines = lefwLines + 1; prtSemiColon = 1; lefwIsRoutingMinCut = 1; lefwIsRoutingMinCutDist = 0; lefwIsRoutingMinCutLen = 0; local_4 = 0; } } else { local_4 = 2; } return local_4; }
90
my_print_help
eloqsql/mysys/my_getopt.c
void my_print_help(const struct my_option *options) { uint col, name_space= 22, comment_space= 57; const struct my_option *optp; DBUG_ENTER("my_print_help"); for (optp= options; optp->name; optp++) { const char *typelib_help= 0; if (!optp->comment) continue; if (optp->id && optp->id < 256) { printf(" -%c%s", optp->id, strlen(optp->name) ? ", " : " "); col= 6; } else { printf(" "); col= 2; } if (strlen(optp->name)) { printf("--"); col+= 2 + print_name(optp); if (optp->arg_type == NO_ARG || (optp->var_type & GET_TYPE_MASK) == GET_BOOL || (optp->var_type & GET_TYPE_MASK) == GET_BIT) { putchar(' '); col++; } else if ((optp->var_type & GET_TYPE_MASK) == GET_STR || (optp->var_type & GET_TYPE_MASK) == GET_STR_ALLOC || (optp->var_type & GET_TYPE_MASK) == GET_ENUM || (optp->var_type & GET_TYPE_MASK) == GET_SET || (optp->var_type & GET_TYPE_MASK) == GET_FLAGSET ) { printf("%s=name%s ", optp->arg_type == OPT_ARG ? "[" : "", optp->arg_type == OPT_ARG ? "]" : ""); col+= (optp->arg_type == OPT_ARG) ? 8 : 6; } else { printf("%s=#%s ", optp->arg_type == OPT_ARG ? "[" : "", optp->arg_type == OPT_ARG ? "]" : ""); col+= (optp->arg_type == OPT_ARG) ? 5 : 3; } } if (optp->comment && *optp->comment) { uint count; if (col > name_space) { putchar('\n'); col= 0; } col= print_comment(optp->comment, col, name_space, comment_space); if (optp->var_type & GET_AUTO) { col= print_comment(" (Automatically configured unless set explicitly)", col, name_space, comment_space); } switch (optp->var_type & GET_TYPE_MASK) { case GET_ENUM: typelib_help= ". One of: "; count= optp->typelib->count; break; case GET_SET: typelib_help= ". Any combination of: "; count= optp->typelib->count; break; case GET_FLAGSET: typelib_help= ". Takes a comma-separated list of option=value pairs, " "where value is on, off, or default, and options are: "; count= optp->typelib->count - 1; break; } if (typelib_help && strstr(optp->comment, optp->typelib->type_names[0]) == NULL) { uint i; col= print_comment(typelib_help, col, name_space, comment_space); col= print_comment(optp->typelib->type_names[0], col, name_space, comment_space); for (i= 1; i < count; i++) { col= print_comment(", ", col, name_space, comment_space); col= print_comment(optp->typelib->type_names[i], col, name_space, comment_space); } } } putchar('\n'); if ((optp->var_type & GET_TYPE_MASK) == GET_BOOL || (optp->var_type & GET_TYPE_MASK) == GET_BIT) { if (optp->def_value != 0) { printf("%*s(Defaults to on; use --skip-", name_space, ""); print_name(optp); printf(" to disable.)\n"); } } } DBUG_VOID_RETURN; }
O3
c
my_print_help: movq (%rdi), %rax testq %rax, %rax je 0x2c455 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x36d64(%rip), %r15 # 0x62e89 cmpq $0x0, 0x10(%rbx) je 0x2c3e4 movl 0x8(%rbx), %edx testl %edx, %edx sete %cl cmpl $0x100, %edx # imm = 0x100 setge %sil orb %cl, %sil jne 0x2c173 cmpb $0x0, (%rax) movq %r15, %rcx leaq 0x36d38(%rip), %rax # 0x62e8c cmoveq %rax, %rcx movl $0x1, %edi leaq 0x36d1d(%rip), %rsi # 0x62e81 xorl %eax, %eax callq 0x24030 movl $0x6, %r12d jmp 0x2c18c movl $0x1, %edi leaq 0x36d0d(%rip), %rsi # 0x62e8c xorl %eax, %eax callq 0x24030 movl $0x2, %r12d movq (%rbx), %rax cmpb $0x0, (%rax) je 0x2c269 movl $0x1, %edi leaq 0x3bbf2(%rip), %rsi # 0x67d96 xorl %eax, %eax callq 0x24030 movq (%rbx), %r14 addl %r14d, %r12d addl $0x2, %r12d movzbl (%r14), %eax movl $0x2d, %edi cmpl $0x5f, %eax je 0x2c1ca testl %eax, %eax je 0x2c1d7 movsbl %al, %edi callq 0x24480 incq %r14 incl %r12d jmp 0x2c1b5 movq (%rbx), %r14 movl 0x38(%rbx), %eax testl %eax, %eax je 0x2c259 movq 0x30(%rbx), %rcx andl $0x3f, %ecx cmpq $0x10, %rcx ja 0x2c3f7 movl $0xb600, %edx # imm = 0xB600 btq %rcx, %rdx jae 0x2c24a cmpl $0x1, %eax leaq 0x35f28(%rip), %rcx # 0x6212f movq %rcx, %rdx leaq 0x3bb94(%rip), %rax # 0x67da5 cmoveq %rax, %rdx leaq 0x39af9(%rip), %rax # 0x65d15 cmoveq %rax, %rcx movl $0x1, %edi leaq 0x36c63(%rip), %rsi # 0x62e8f xorl %eax, %eax callq 0x24030 xorl %eax, %eax cmpl $0x1, 0x38(%rbx) sete %al addl %eax, %eax subl %r14d, %eax addl %eax, %r12d addl $0x6, %r12d jmp 0x2c269 movl $0x10004, %edx # imm = 0x10004 btq %rcx, %rdx jae 0x2c3f7 movl $0x20, %edi callq 0x24480 subl %r14d, %r12d incl %r12d movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x2c36d cmpb $0x0, (%rdi) je 0x2c36d cmpl $0x17, %r12d jb 0x2c296 movl $0xa, %edi callq 0x24480 movq 0x10(%rbx), %rdi xorl %r12d, %r12d movl %r12d, %esi callq 0x2c456 movl %eax, %r12d movq 0x30(%rbx), %rax testb $0x40, %al je 0x2c2bf leaq 0x36bf2(%rip), %rdi # 0x62ea2 movl %r12d, %esi callq 0x2c456 movl %eax, %r12d movq 0x30(%rbx), %rax andl $0x3f, %eax cmpq $0xf, %rax je 0x2c2f6 cmpl $0xd, %eax je 0x2c2e6 cmpl $0xc, %eax jne 0x2c36d movq 0x28(%rbx), %rax movl (%rax), %r13d leaq 0x36bf0(%rip), %r14 # 0x62ed4 jmp 0x2c307 movq 0x28(%rbx), %rax movl (%rax), %r13d leaq 0x36beb(%rip), %r14 # 0x62edf jmp 0x2c307 movq 0x28(%rbx), %rax movl (%rax), %r13d decl %r13d leaq 0x36bef(%rip), %r14 # 0x62ef6 movq 0x10(%rbx), %rdi movq 0x10(%rax), %rax movq (%rax), %rsi callq 0x240c0 testq %rax, %rax jne 0x2c36d movq %r14, %rdi movl %r12d, %esi callq 0x2c456 movq 0x28(%rbx), %rcx movq 0x10(%rcx), %rcx movq (%rcx), %rdi movl %eax, %esi callq 0x2c456 cmpl $0x2, %r13d jb 0x2c36d movl %r13d, %r14d movl $0x1, %r12d movq %r15, %rdi movl %eax, %esi callq 0x2c456 movq 0x28(%rbx), %rcx movq 0x10(%rcx), %rcx movq (%rcx,%r12,8), %rdi movl %eax, %esi callq 0x2c456 incq %r12 cmpq %r12, %r14 jne 0x2c348 movl $0xa, %edi callq 0x24480 movq 0x30(%rbx), %rax andl $0x3f, %eax cmpq $0x10, %rax je 0x2c389 cmpl $0x2, %eax jne 0x2c3e4 cmpq $0x0, 0x40(%rbx) je 0x2c3e4 movl $0x1, %edi leaq 0x36bc6(%rip), %rsi # 0x62f62 movl $0x16, %edx leaq 0x35d87(%rip), %rcx # 0x6212f xorl %eax, %eax callq 0x24030 movq (%rbx), %r14 movzbl (%r14), %eax movl $0x2d, %edi cmpl $0x5f, %eax je 0x2c3c7 testl %eax, %eax je 0x2c3d1 movsbl %al, %edi callq 0x24480 incq %r14 jmp 0x2c3b2 movl $0x1, %edi leaq 0x36ba5(%rip), %rsi # 0x62f82 xorl %eax, %eax callq 0x24030 movq 0x70(%rbx), %rax addq $0x70, %rbx testq %rax, %rax jne 0x2c125 jmp 0x2c447 cmpl $0x1, %eax leaq 0x35d2e(%rip), %rcx # 0x6212f movq %rcx, %rdx leaq 0x3b99a(%rip), %rax # 0x67da5 cmoveq %rax, %rdx leaq 0x398ff(%rip), %rax # 0x65d15 cmoveq %rax, %rcx movl $0x1, %edi leaq 0x36a74(%rip), %rsi # 0x62e9a xorl %eax, %eax callq 0x24030 xorl %eax, %eax cmpl $0x1, 0x38(%rbx) sete %al addl %eax, %eax subl %r14d, %eax addl %eax, %r12d addl $0x3, %r12d jmp 0x2c269 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_print_help: mov rax, [rdi] test rax, rax jz locret_2C455 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi lea r15, asc_62E89; ", " loc_2C125: cmp qword ptr [rbx+10h], 0 jz loc_2C3E4 mov edx, [rbx+8] test edx, edx setz cl cmp edx, 100h setnl sil or sil, cl jnz short loc_2C173 cmp byte ptr [rax], 0 mov rcx, r15 lea rax, asc_62E8C; " " cmovz rcx, rax mov edi, 1 lea rsi, aCS; " -%c%s" xor eax, eax call ___printf_chk mov r12d, 6 jmp short loc_2C18C loc_2C173: mov edi, 1 lea rsi, asc_62E8C; " " xor eax, eax call ___printf_chk mov r12d, 2 loc_2C18C: mov rax, [rbx] cmp byte ptr [rax], 0 jz loc_2C269 mov edi, 1 lea rsi, asc_67D94+2; "--" xor eax, eax call ___printf_chk mov r14, [rbx] add r12d, r14d add r12d, 2 loc_2C1B5: movzx eax, byte ptr [r14] mov edi, 2Dh ; '-' cmp eax, 5Fh ; '_' jz short loc_2C1CA test eax, eax jz short loc_2C1D7 movsx edi, al loc_2C1CA: call _putchar inc r14 inc r12d jmp short loc_2C1B5 loc_2C1D7: mov r14, [rbx] mov eax, [rbx+38h] test eax, eax jz short loc_2C259 mov rcx, [rbx+30h] and ecx, 3Fh cmp rcx, 10h ja loc_2C3F7 mov edx, 0B600h bt rdx, rcx jnb short loc_2C24A cmp eax, 1 lea rcx, aNewSection+14h; "" mov rdx, rcx lea rax, aCdata_0+8; "[" cmovz rdx, rax lea rax, aVersion400+0Eh; "]" cmovz rcx, rax mov edi, 1 lea rsi, aSNameS; "%s=name%s " xor eax, eax call ___printf_chk xor eax, eax cmp dword ptr [rbx+38h], 1 setz al add eax, eax sub eax, r14d add r12d, eax add r12d, 6 jmp short loc_2C269 loc_2C24A: mov edx, 10004h bt rdx, rcx jnb loc_2C3F7 loc_2C259: mov edi, 20h ; ' ' call _putchar sub r12d, r14d inc r12d loc_2C269: mov rdi, [rbx+10h] test rdi, rdi jz loc_2C36D cmp byte ptr [rdi], 0 jz loc_2C36D cmp r12d, 17h jb short loc_2C296 mov edi, 0Ah call _putchar mov rdi, [rbx+10h] xor r12d, r12d loc_2C296: mov esi, r12d call print_comment mov r12d, eax mov rax, [rbx+30h] test al, 40h jz short loc_2C2BF lea rdi, aAutomaticallyC; " (Automatically configured unless set e"... mov esi, r12d call print_comment mov r12d, eax mov rax, [rbx+30h] loc_2C2BF: and eax, 3Fh cmp rax, 0Fh jz short loc_2C2F6 cmp eax, 0Dh jz short loc_2C2E6 cmp eax, 0Ch jnz loc_2C36D mov rax, [rbx+28h] mov r13d, [rax] lea r14, aOneOf; ". One of: " jmp short loc_2C307 loc_2C2E6: mov rax, [rbx+28h] mov r13d, [rax] lea r14, aAnyCombination; ". Any combination of: " jmp short loc_2C307 loc_2C2F6: mov rax, [rbx+28h] mov r13d, [rax] dec r13d lea r14, aTakesACommaSep; ". Takes a comma-separated list of optio"... loc_2C307: mov rdi, [rbx+10h] mov rax, [rax+10h] mov rsi, [rax] call _strstr test rax, rax jnz short loc_2C36D mov rdi, r14 mov esi, r12d call print_comment mov rcx, [rbx+28h] mov rcx, [rcx+10h] mov rdi, [rcx] mov esi, eax call print_comment cmp r13d, 2 jb short loc_2C36D mov r14d, r13d mov r12d, 1 loc_2C348: mov rdi, r15 mov esi, eax call print_comment mov rcx, [rbx+28h] mov rcx, [rcx+10h] mov rdi, [rcx+r12*8] mov esi, eax call print_comment inc r12 cmp r14, r12 jnz short loc_2C348 loc_2C36D: mov edi, 0Ah call _putchar mov rax, [rbx+30h] and eax, 3Fh cmp rax, 10h jz short loc_2C389 cmp eax, 2 jnz short loc_2C3E4 loc_2C389: cmp qword ptr [rbx+40h], 0 jz short loc_2C3E4 mov edi, 1 lea rsi, aSDefaultsToOnU; "%*s(Defaults to on; use --skip-" mov edx, 16h lea rcx, aNewSection+14h; "" xor eax, eax call ___printf_chk mov r14, [rbx] loc_2C3B2: movzx eax, byte ptr [r14] mov edi, 2Dh ; '-' cmp eax, 5Fh ; '_' jz short loc_2C3C7 test eax, eax jz short loc_2C3D1 movsx edi, al loc_2C3C7: call _putchar inc r14 jmp short loc_2C3B2 loc_2C3D1: mov edi, 1 lea rsi, aToDisable; " to disable.)\n" xor eax, eax call ___printf_chk loc_2C3E4: mov rax, [rbx+70h] add rbx, 70h ; 'p' test rax, rax jnz loc_2C125 jmp short loc_2C447 loc_2C3F7: cmp eax, 1 lea rcx, aNewSection+14h; "" mov rdx, rcx lea rax, aCdata_0+8; "[" cmovz rdx, rax lea rax, aVersion400+0Eh; "]" cmovz rcx, rax mov edi, 1 lea rsi, aSS; "%s=#%s " xor eax, eax call ___printf_chk xor eax, eax cmp dword ptr [rbx+38h], 1 setz al add eax, eax sub eax, r14d add r12d, eax add r12d, 3 jmp loc_2C269 loc_2C447: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_2C455: retn
_BYTE * my_print_help(_BYTE **a1) { _BYTE *result; // rax _BYTE **v2; // rbx long long v3; // rdx const char *v4; // rcx unsigned int v5; // r12d _BYTE *v6; // r14 unsigned int i; // r12d int v8; // eax long long v9; // rdi _BYTE *v10; // r14 int v11; // eax unsigned long long v12; // rcx long long v13; // rdx const char *v14; // rcx const char *v15; // rdx long long v16; // rdx _BYTE *v17; // rdi unsigned int v18; // r12d _BYTE *v19; // rax long long v20; // rax _BYTE *v21; // rax unsigned int v22; // r13d const char *v23; // r14 unsigned int v24; // eax unsigned int v25; // eax long long j; // r12 unsigned int v27; // eax long long v28; // rax _BYTE *k; // r14 int v30; // eax long long v31; // rdi const char *v32; // rcx const char *v33; // rdx result = *a1; if ( !*a1 ) return result; v2 = a1; do { if ( !v2[2] ) goto LABEL_48; v3 = *((unsigned int *)v2 + 2); if ( (_DWORD)v3 == 0 || (int)v3 >= 256 ) { __printf_chk(1LL, " "); v5 = 2; } else { v4 = ", "; if ( !*result ) v4 = " "; __printf_chk(1LL, " -%c%s", v3, v4); v5 = 6; } if ( !**v2 ) goto LABEL_23; __printf_chk(1LL, "--"); v6 = *v2; for ( i = (unsigned int)*v2 + v5 + 2; ; ++i ) { v8 = (unsigned __int8)*v6; v9 = 45LL; if ( v8 == 95 ) goto LABEL_14; if ( !*v6 ) break; v9 = (unsigned int)(char)v8; LABEL_14: putchar(v9); ++v6; } v10 = *v2; v11 = *((_DWORD *)v2 + 14); if ( !v11 ) goto LABEL_22; v12 = (unsigned long long)v2[6] & 0x3F; if ( v12 <= 0x10 ) { v13 = 46592LL; if ( _bittest64(&v13, v12) ) { v14 = ""; v15 = ""; if ( v11 == 1 ) { v15 = "["; v14 = "]"; } __printf_chk(1LL, "%s=name%s ", v15, v14); v5 = 2 * (*((_DWORD *)v2 + 14) == 1) - (_DWORD)v10 + i + 6; goto LABEL_23; } v16 = 65540LL; if ( _bittest64(&v16, v12) ) { LABEL_22: putchar(32LL); v5 = i - (_DWORD)v10 + 1; goto LABEL_23; } } v32 = ""; v33 = ""; if ( v11 == 1 ) { v33 = "["; v32 = "]"; } __printf_chk(1LL, "%s=#%s ", v33, v32); v5 = 2 * (*((_DWORD *)v2 + 14) == 1) - (_DWORD)v10 + i + 3; LABEL_23: v17 = v2[2]; if ( !v17 || !*v17 ) goto LABEL_39; if ( v5 >= 0x17 ) { putchar(10LL); v17 = v2[2]; v5 = 0; } v18 = print_comment(v17, v5); v19 = v2[6]; if ( ((unsigned __int8)v19 & 0x40) != 0 ) { v18 = print_comment(" (Automatically configured unless set explicitly)", v18); v19 = v2[6]; } v20 = (unsigned __int8)v19 & 0x3F; if ( v20 == 15 ) { v21 = v2[5]; v22 = *(_DWORD *)v21 - 1; v23 = ". Takes a comma-separated list of option=value pairs, where value is on, off, or default, and options are: "; goto LABEL_35; } if ( (_DWORD)v20 == 13 ) { v21 = v2[5]; v22 = *(_DWORD *)v21; v23 = ". Any combination of: "; LABEL_35: if ( !strstr(v2[2], **((_QWORD **)v21 + 2)) ) { v24 = print_comment(v23, v18); v25 = print_comment(**((_QWORD **)v2[5] + 2), v24); if ( v22 >= 2 ) { for ( j = 1LL; j != v22; v25 = print_comment(*(_QWORD *)(*((_QWORD *)v2[5] + 2) + 8 * j++), v27) ) v27 = print_comment(", ", v25); } } goto LABEL_39; } if ( (_DWORD)v20 == 12 ) { v21 = v2[5]; v22 = *(_DWORD *)v21; v23 = ". One of: "; goto LABEL_35; } LABEL_39: putchar(10LL); v28 = (unsigned long long)v2[6] & 0x3F; if ( (v28 == 16 || (_DWORD)v28 == 2) && v2[8] ) { __printf_chk(1LL, "%*s(Defaults to on; use --skip-", 22, ""); for ( k = *v2; ; ++k ) { v30 = (unsigned __int8)*k; v31 = 45LL; if ( v30 != 95 ) { if ( !*k ) { __printf_chk(1LL, " to disable.)\n"); break; } v31 = (unsigned int)(char)v30; } putchar(v31); } } LABEL_48: result = v2[14]; v2 += 14; } while ( result ); return result; }
my_print_help: MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0012c455 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA R15,[0x162e89] LAB_0012c125: CMP qword ptr [RBX + 0x10],0x0 JZ 0x0012c3e4 MOV EDX,dword ptr [RBX + 0x8] TEST EDX,EDX SETZ CL CMP EDX,0x100 SETGE SIL OR SIL,CL JNZ 0x0012c173 CMP byte ptr [RAX],0x0 MOV RCX,R15 LEA RAX,[0x162e8c] CMOVZ RCX,RAX MOV EDI,0x1 LEA RSI,[0x162e81] XOR EAX,EAX CALL 0x00124030 MOV R12D,0x6 JMP 0x0012c18c LAB_0012c173: MOV EDI,0x1 LEA RSI,[0x162e8c] XOR EAX,EAX CALL 0x00124030 MOV R12D,0x2 LAB_0012c18c: MOV RAX,qword ptr [RBX] CMP byte ptr [RAX],0x0 JZ 0x0012c269 MOV EDI,0x1 LEA RSI,[0x167d96] XOR EAX,EAX CALL 0x00124030 MOV R14,qword ptr [RBX] ADD R12D,R14D ADD R12D,0x2 LAB_0012c1b5: MOVZX EAX,byte ptr [R14] MOV EDI,0x2d CMP EAX,0x5f JZ 0x0012c1ca TEST EAX,EAX JZ 0x0012c1d7 MOVSX EDI,AL LAB_0012c1ca: CALL 0x00124480 INC R14 INC R12D JMP 0x0012c1b5 LAB_0012c1d7: MOV R14,qword ptr [RBX] MOV EAX,dword ptr [RBX + 0x38] TEST EAX,EAX JZ 0x0012c259 MOV RCX,qword ptr [RBX + 0x30] AND ECX,0x3f CMP RCX,0x10 JA 0x0012c3f7 MOV EDX,0xb600 BT RDX,RCX JNC 0x0012c24a CMP EAX,0x1 LEA RCX,[0x16212f] MOV RDX,RCX LEA RAX,[0x167da5] CMOVZ RDX,RAX LEA RAX,[0x165d15] CMOVZ RCX,RAX MOV EDI,0x1 LEA RSI,[0x162e8f] XOR EAX,EAX CALL 0x00124030 XOR EAX,EAX CMP dword ptr [RBX + 0x38],0x1 SETZ AL ADD EAX,EAX SUB EAX,R14D ADD R12D,EAX ADD R12D,0x6 JMP 0x0012c269 LAB_0012c24a: MOV EDX,0x10004 BT RDX,RCX JNC 0x0012c3f7 LAB_0012c259: MOV EDI,0x20 CALL 0x00124480 SUB R12D,R14D INC R12D LAB_0012c269: MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0012c36d CMP byte ptr [RDI],0x0 JZ 0x0012c36d CMP R12D,0x17 JC 0x0012c296 MOV EDI,0xa CALL 0x00124480 MOV RDI,qword ptr [RBX + 0x10] XOR R12D,R12D LAB_0012c296: MOV ESI,R12D CALL 0x0012c456 MOV R12D,EAX MOV RAX,qword ptr [RBX + 0x30] TEST AL,0x40 JZ 0x0012c2bf LEA RDI,[0x162ea2] MOV ESI,R12D CALL 0x0012c456 MOV R12D,EAX MOV RAX,qword ptr [RBX + 0x30] LAB_0012c2bf: AND EAX,0x3f CMP RAX,0xf JZ 0x0012c2f6 CMP EAX,0xd JZ 0x0012c2e6 CMP EAX,0xc JNZ 0x0012c36d MOV RAX,qword ptr [RBX + 0x28] MOV R13D,dword ptr [RAX] LEA R14,[0x162ed4] JMP 0x0012c307 LAB_0012c2e6: MOV RAX,qword ptr [RBX + 0x28] MOV R13D,dword ptr [RAX] LEA R14,[0x162edf] JMP 0x0012c307 LAB_0012c2f6: MOV RAX,qword ptr [RBX + 0x28] MOV R13D,dword ptr [RAX] DEC R13D LEA R14,[0x162ef6] LAB_0012c307: MOV RDI,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RSI,qword ptr [RAX] CALL 0x001240c0 TEST RAX,RAX JNZ 0x0012c36d MOV RDI,R14 MOV ESI,R12D CALL 0x0012c456 MOV RCX,qword ptr [RBX + 0x28] MOV RCX,qword ptr [RCX + 0x10] MOV RDI,qword ptr [RCX] MOV ESI,EAX CALL 0x0012c456 CMP R13D,0x2 JC 0x0012c36d MOV R14D,R13D MOV R12D,0x1 LAB_0012c348: MOV RDI,R15 MOV ESI,EAX CALL 0x0012c456 MOV RCX,qword ptr [RBX + 0x28] MOV RCX,qword ptr [RCX + 0x10] MOV RDI,qword ptr [RCX + R12*0x8] MOV ESI,EAX CALL 0x0012c456 INC R12 CMP R14,R12 JNZ 0x0012c348 LAB_0012c36d: MOV EDI,0xa CALL 0x00124480 MOV RAX,qword ptr [RBX + 0x30] AND EAX,0x3f CMP RAX,0x10 JZ 0x0012c389 CMP EAX,0x2 JNZ 0x0012c3e4 LAB_0012c389: CMP qword ptr [RBX + 0x40],0x0 JZ 0x0012c3e4 MOV EDI,0x1 LEA RSI,[0x162f62] MOV EDX,0x16 LEA RCX,[0x16212f] XOR EAX,EAX CALL 0x00124030 MOV R14,qword ptr [RBX] LAB_0012c3b2: MOVZX EAX,byte ptr [R14] MOV EDI,0x2d CMP EAX,0x5f JZ 0x0012c3c7 TEST EAX,EAX JZ 0x0012c3d1 MOVSX EDI,AL LAB_0012c3c7: CALL 0x00124480 INC R14 JMP 0x0012c3b2 LAB_0012c3d1: MOV EDI,0x1 LEA RSI,[0x162f82] XOR EAX,EAX CALL 0x00124030 LAB_0012c3e4: MOV RAX,qword ptr [RBX + 0x70] ADD RBX,0x70 TEST RAX,RAX JNZ 0x0012c125 JMP 0x0012c447 LAB_0012c3f7: CMP EAX,0x1 LEA RCX,[0x16212f] MOV RDX,RCX LEA RAX,[0x167da5] CMOVZ RDX,RAX LEA RAX,[0x165d15] CMOVZ RCX,RAX MOV EDI,0x1 LEA RSI,[0x162e9a] XOR EAX,EAX CALL 0x00124030 XOR EAX,EAX CMP dword ptr [RBX + 0x38],0x1 SETZ AL ADD EAX,EAX SUB EAX,R14D ADD R12D,EAX ADD R12D,0x3 JMP 0x0012c269 LAB_0012c447: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_0012c455: RET
void my_print_help(int8 *param_1) { char cVar1; int4 uVar2; uint *puVar3; int *puVar4; char *pcVar5; int iVar6; int8 in_R8; int8 in_R9; int iVar7; uint uVar8; ulong uVar9; int iVar10; char *pcVar11; char *pcVar12; pcVar11 = (char *)*param_1; pcVar12 = pcVar11; joined_r0x0012c107: if (pcVar11 == (char *)0x0) { return; } if (param_1[2] != 0) { iVar7 = *(int *)(param_1 + 1); if (iVar7 < 0x100 && iVar7 != 0) { puVar4 = &DAT_00162e89; if (*pcVar11 == '\0') { puVar4 = &DAT_00162e8c; } __printf_chk(1," -%c%s",iVar7,puVar4,in_R8,in_R9,pcVar12); uVar8 = 6; } else { __printf_chk(1,&DAT_00162e8c); uVar8 = 2; } if (*(char *)*param_1 != '\0') { __printf_chk(1,&DAT_00167d96); pcVar11 = (char *)*param_1; iVar7 = uVar8 + (int)pcVar11 + 2; do { cVar1 = *pcVar11; iVar6 = 0x2d; if (cVar1 != '_') { if (cVar1 == '\0') goto LAB_0012c1d7; iVar6 = (int)cVar1; } putchar(iVar6); pcVar11 = pcVar11 + 1; iVar7 = iVar7 + 1; } while( true ); } goto LAB_0012c269; } goto LAB_0012c3e4; LAB_0012c1d7: iVar6 = *(int *)(param_1 + 7); iVar10 = (int)*param_1; if (iVar6 == 0) { LAB_0012c259: putchar(0x20); uVar8 = (iVar7 - iVar10) + 1; } else { uVar9 = (ulong)((uint)param_1[6] & 0x3f); if (uVar9 < 0x11) { if ((0xb600UL >> uVar9 & 1) != 0) { pcVar5 = ""; pcVar11 = ""; if (iVar6 == 1) { pcVar11 = "["; pcVar5 = "]"; } __printf_chk(1,"%s=name%s ",pcVar11,pcVar5); uVar8 = iVar7 + ((uint)(*(int *)(param_1 + 7) == 1) * 2 - iVar10) + 6; goto LAB_0012c269; } if ((0x10004UL >> uVar9 & 1) != 0) goto LAB_0012c259; } pcVar5 = ""; pcVar11 = ""; if (iVar6 == 1) { pcVar11 = "["; pcVar5 = "]"; } __printf_chk(1,&DAT_00162e9a,pcVar11,pcVar5); uVar8 = iVar7 + ((uint)(*(int *)(param_1 + 7) == 1) * 2 - iVar10) + 3; } LAB_0012c269: pcVar11 = (char *)param_1[2]; if ((pcVar11 != (char *)0x0) && (*pcVar11 != '\0')) { if (0x16 < uVar8) { putchar(10); pcVar11 = (char *)param_1[2]; uVar8 = 0; } uVar2 = print_comment(pcVar11,uVar8); uVar8 = (uint)param_1[6]; if ((param_1[6] & 0x40) != 0) { uVar2 = print_comment(" (Automatically configured unless set explicitly)",uVar2); uVar8 = (uint)param_1[6]; } uVar8 = uVar8 & 0x3f; if (uVar8 == 0xf) { puVar3 = (uint *)param_1[5]; uVar8 = *puVar3 - 1; pcVar11 = ". Takes a comma-separated list of option=value pairs, where value is on, off, or default, and options are: " ; } else if (uVar8 == 0xd) { puVar3 = (uint *)param_1[5]; uVar8 = *puVar3; pcVar11 = ". Any combination of: "; } else { if (uVar8 != 0xc) goto LAB_0012c36d; puVar3 = (uint *)param_1[5]; uVar8 = *puVar3; pcVar11 = ". One of: "; } pcVar5 = strstr((char *)param_1[2],(char *)**(int8 **)(puVar3 + 4)); if (pcVar5 == (char *)0x0) { uVar2 = print_comment(pcVar11,uVar2); uVar2 = print_comment(**(int8 **)(param_1[5] + 0x10),uVar2); if (1 < uVar8) { uVar9 = 1; do { uVar2 = print_comment(&DAT_00162e89,uVar2); uVar2 = print_comment(*(int8 *)(*(long *)(param_1[5] + 0x10) + uVar9 * 8),uVar2); uVar9 = uVar9 + 1; } while (uVar8 != uVar9); } } } LAB_0012c36d: putchar(10); uVar8 = (uint)param_1[6] & 0x3f; if (((uVar8 == 0x10) || (uVar8 == 2)) && (param_1[8] != 0)) { __printf_chk(1,"%*s(Defaults to on; use --skip-",0x16,""); pcVar11 = (char *)*param_1; do { cVar1 = *pcVar11; iVar7 = 0x2d; if (cVar1 != '_') { if (cVar1 == '\0') goto LAB_0012c3d1; iVar7 = (int)cVar1; } putchar(iVar7); pcVar11 = pcVar11 + 1; } while( true ); } LAB_0012c3e4: pcVar11 = (char *)param_1[0xe]; param_1 = param_1 + 0xe; goto joined_r0x0012c107; LAB_0012c3d1: __printf_chk(1," to disable.)\n"); goto LAB_0012c3e4; }
91
trnman_new_trn
eloqsql/storage/maria/trnman.c
TRN *trnman_new_trn(WT_THD *wt) { int res; TRN *trn; union { TRN *trn; void *v; } tmp; DBUG_ENTER("trnman_new_trn"); /* we have a mutex, to do simple things under it - allocate a TRN, increment trnman_active_transactions, set trn->min_read_from. Note that all the above is fast. generating short_id may be slow, as it involves scanning a large array - so it's done outside of the mutex. */ DBUG_PRINT("info", ("mysql_mutex_lock LOCK_trn_list")); mysql_mutex_lock(&LOCK_trn_list); /* Allocating a new TRN structure */ tmp.trn= pool; /* Popping an unused TRN from the pool (ABA isn't possible, we're behind a mutex */ while (tmp.trn && !my_atomic_casptr((void **)(char*) &pool, &tmp.v, (void *)tmp.trn->next)) /* no-op */; /* Nothing in the pool ? Allocate a new one */ if (!(trn= tmp.trn)) { /* trn should be completely initialized at create time to allow one to keep a known state on it. (Like redo_lns, which is assumed to be 0 at start of row handling and reset to zero before end of row handling) */ trn= (TRN *)my_malloc(PSI_INSTRUMENT_ME, sizeof(TRN), MYF(MY_WME | MY_ZEROFILL)); if (unlikely(!trn)) { DBUG_PRINT("info", ("mysql_mutex_unlock LOCK_trn_list")); mysql_mutex_unlock(&LOCK_trn_list); return 0; } trnman_allocated_transactions++; mysql_mutex_init(key_TRN_state_lock, &trn->state_lock, MY_MUTEX_INIT_FAST); } trn->wt= wt; trn->pins= lf_hash_get_pins(&trid_to_trn); if (!trn->pins) { trnman_free_trn(trn); mysql_mutex_unlock(&LOCK_trn_list); return 0; } trnman_active_transactions++; trn->min_read_from= active_list_min.next->trid; trn->trid= new_trid(); trn->next= &active_list_max; trn->prev= active_list_max.prev; active_list_max.prev= trn->prev->next= trn; trid_min_read_from= active_list_min.next->min_read_from; DBUG_PRINT("info", ("mysql_mutex_unlock LOCK_trn_list")); mysql_mutex_unlock(&LOCK_trn_list); if (unlikely(!trn->min_read_from)) { /* We are the only transaction. Set min_read_from so that we can read our own rows */ trn->min_read_from= trn->trid + 1; } /* no other transaction can read changes done by this one */ trn->commit_trid= MAX_TRID; trn->rec_lsn= trn->undo_lsn= trn->first_undo_lsn= 0; trn->used_tables= 0; trn->used_instances= 0; trn->locked_tables= 0; trn->flags= 0; /* only after the following function TRN is considered initialized, so it must be done the last */ mysql_mutex_lock(&trn->state_lock); trn->short_id= get_short_trid(trn); mysql_mutex_unlock(&trn->state_lock); res= lf_hash_insert(&trid_to_trn, trn->pins, &trn); DBUG_ASSERT(res <= 0); if (res) { trnman_end_trn(trn, 0); return 0; } DBUG_PRINT("exit", ("trn: %p trid: 0x%lu min_read_from: 0x%lu", trn, (ulong) trn->trid, (ulong) trn->min_read_from)); DBUG_RETURN(trn); }
O0
c
trnman_new_trn: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) jmp 0x4da2e leaq 0x42b98b(%rip), %rdi # 0x4793c0 leaq 0x1050cb(%rip), %rsi # 0x152b07 movl $0x128, %edx # imm = 0x128 callq 0x4dd60 movq 0x42b89b(%rip), %rax # 0x4792e8 movq %rax, -0x28(%rbp) xorl %eax, %eax cmpq $0x0, -0x28(%rbp) movb %al, -0x32(%rbp) je 0x4daa3 movq -0x28(%rbp), %rax movq 0x68(%rax), %rax movq %rax, -0x30(%rbp) movq -0x28(%rbp), %rax movq -0x30(%rbp), %rcx lock cmpxchgq %rcx, 0x42b86e(%rip) # 0x4792e8 movq %rax, %rcx sete %al movb %al, -0x41(%rbp) movq %rcx, -0x40(%rbp) testb $0x1, %al jne 0x4da93 movq -0x40(%rbp), %rax movq %rax, -0x28(%rbp) movb -0x41(%rbp), %al andb $0x1, %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al xorb $-0x1, %al movb %al, -0x32(%rbp) movb -0x32(%rbp), %al testb $0x1, %al jne 0x4daac jmp 0x4daae jmp 0x4da51 movq -0x28(%rbp), %rax movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x4db40 xorl %edi, %edi movl $0xb0, %esi movl $0x30, %edx callq 0xf4be0 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) 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 0x4db14 jmp 0x4daf9 jmp 0x4dafb leaq 0x42b8be(%rip), %rdi # 0x4793c0 callq 0x4ddd0 movq $0x0, -0x8(%rbp) jmp 0x4dd50 movl 0x42b7c6(%rip), %eax # 0x4792e0 addl $0x1, %eax movl %eax, 0x42b7bd(%rip) # 0x4792e0 leaq 0x42b44a(%rip), %rax # 0x478f74 movl (%rax), %edi movq -0x20(%rbp), %rsi addq $0x10, %rsi leaq 0xc36d95(%rip), %rdx # 0xc848d0 callq 0x4d8a0 movq -0x10(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x8(%rax) leaq 0x42b7a5(%rip), %rdi # 0x4792f8 addq $0x28, %rdi callq 0xfd550 movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x4db92 movq -0x20(%rbp), %rdi callq 0x4de30 leaq 0x42b840(%rip), %rdi # 0x4793c0 callq 0x4ddd0 movq $0x0, -0x8(%rbp) jmp 0x4dd50 movl 0x42b740(%rip), %eax # 0x4792d8 addl $0x1, %eax movl %eax, 0x42b737(%rip) # 0x4792d8 movq 0x42b4d8(%rip), %rax # 0x479080 movq 0x78(%rax), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x80(%rax) callq 0x4ee70 movq %rax, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x20(%rbp), %rax leaq 0x42b4f6(%rip), %rcx # 0x4790c8 movq %rcx, 0x68(%rax) movq 0x42b55b(%rip), %rcx # 0x479138 movq -0x20(%rbp), %rax movq %rcx, 0x70(%rax) movq -0x20(%rbp), %rax movq -0x20(%rbp), %rcx movq 0x70(%rcx), %rcx movq %rax, 0x68(%rcx) movq %rax, 0x42b53c(%rip) # 0x479138 movq 0x42b47d(%rip), %rax # 0x479080 movq 0x80(%rax), %rax movq %rax, 0x270847(%rip) # 0x2be458 jmp 0x4dc13 leaq 0x42b7a6(%rip), %rdi # 0x4793c0 callq 0x4ddd0 movq -0x20(%rbp), %rax cmpq $0x0, 0x80(%rax) 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 0x4dc5f movq -0x20(%rbp), %rax movq 0x78(%rax), %rcx addq $0x1, %rcx movq -0x20(%rbp), %rax movq %rcx, 0x80(%rax) movq -0x20(%rbp), %rax movq $-0x1, 0x88(%rax) movq -0x20(%rbp), %rax movq $0x0, 0xa0(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x98(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x90(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x58(%rax) movq -0x20(%rbp), %rax movq $0x0, 0x60(%rax) movq -0x20(%rbp), %rax movl $0x0, 0xa8(%rax) movq -0x20(%rbp), %rax movw $0x0, 0xae(%rax) movq -0x20(%rbp), %rdi addq $0x10, %rdi leaq 0x104e2a(%rip), %rsi # 0x152b07 movl $0x173, %edx # imm = 0x173 callq 0x4dd60 movq -0x20(%rbp), %rdi callq 0x4dee0 movw %ax, %cx movq -0x20(%rbp), %rax movw %cx, 0xac(%rax) movq -0x20(%rbp), %rdi addq $0x10, %rdi callq 0x4ddd0 movq -0x20(%rbp), %rax movq (%rax), %rsi leaq 0x42b5df(%rip), %rdi # 0x4792f8 leaq -0x20(%rbp), %rdx callq 0xfe8e0 movl %eax, -0x14(%rbp) jmp 0x4dd27 cmpl $0x0, -0x14(%rbp) je 0x4dd42 movq -0x20(%rbp), %rdi xorl %esi, %esi callq 0x4dfc0 movq $0x0, -0x8(%rbp) jmp 0x4dd50 jmp 0x4dd44 jmp 0x4dd46 jmp 0x4dd48 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw (%rax,%rax)
trnman_new_trn: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi jmp short $+2 loc_4DA2E: lea rdi, LOCK_trn_list lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 128h call inline_mysql_mutex_lock_7 mov rax, cs:pool mov [rbp+var_28], rax loc_4DA51: xor eax, eax cmp [rbp+var_28], 0 mov [rbp+var_32], al jz short loc_4DAA3 mov rax, [rbp+var_28] mov rax, [rax+68h] mov [rbp+var_30], rax mov rax, [rbp+var_28] mov rcx, [rbp+var_30] lock cmpxchg cs:pool, rcx mov rcx, rax setz al mov [rbp+var_41], al mov [rbp+var_40], rcx test al, 1 jnz short loc_4DA93 mov rax, [rbp+var_40] mov [rbp+var_28], rax loc_4DA93: mov al, [rbp+var_41] and al, 1 mov [rbp+var_31], al mov al, [rbp+var_31] xor al, 0FFh mov [rbp+var_32], al loc_4DAA3: mov al, [rbp+var_32] test al, 1 jnz short loc_4DAAC jmp short loc_4DAAE loc_4DAAC: jmp short loc_4DA51 loc_4DAAE: mov rax, [rbp+var_28] mov [rbp+var_20], rax cmp rax, 0 jnz loc_4DB40 xor edi, edi mov esi, 0B0h mov edx, 30h ; '0' call my_malloc mov [rbp+var_20], rax cmp [rbp+var_20], 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_4DB14 jmp short $+2 loc_4DAF9: jmp short $+2 loc_4DAFB: lea rdi, LOCK_trn_list call inline_mysql_mutex_unlock_7 mov [rbp+var_8], 0 jmp loc_4DD50 loc_4DB14: mov eax, cs:trnman_allocated_transactions add eax, 1 mov cs:trnman_allocated_transactions, eax lea rax, key_TRN_state_lock mov edi, [rax] mov rsi, [rbp+var_20] add rsi, 10h lea rdx, my_fast_mutexattr call inline_mysql_mutex_init_1 loc_4DB40: mov rcx, [rbp+var_10] mov rax, [rbp+var_20] mov [rax+8], rcx lea rdi, trid_to_trn add rdi, 28h ; '(' call lf_pinbox_get_pins mov rcx, rax mov rax, [rbp+var_20] mov [rax], rcx mov rax, [rbp+var_20] cmp qword ptr [rax], 0 jnz short loc_4DB92 mov rdi, [rbp+var_20] call trnman_free_trn lea rdi, LOCK_trn_list call inline_mysql_mutex_unlock_7 mov [rbp+var_8], 0 jmp loc_4DD50 loc_4DB92: mov eax, cs:trnman_active_transactions add eax, 1 mov cs:trnman_active_transactions, eax mov rax, cs:qword_479080 mov rcx, [rax+78h] mov rax, [rbp+var_20] mov [rax+80h], rcx call new_trid mov rcx, rax mov rax, [rbp+var_20] mov [rax+78h], rcx mov rax, [rbp+var_20] lea rcx, active_list_max mov [rax+68h], rcx mov rcx, cs:qword_479138 mov rax, [rbp+var_20] mov [rax+70h], rcx mov rax, [rbp+var_20] mov rcx, [rbp+var_20] mov rcx, [rcx+70h] mov [rcx+68h], rax mov cs:qword_479138, rax mov rax, cs:qword_479080 mov rax, [rax+80h] mov cs:trid_min_read_from, rax jmp short $+2 loc_4DC13: lea rdi, LOCK_trn_list call inline_mysql_mutex_unlock_7 mov rax, [rbp+var_20] cmp qword ptr [rax+80h], 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_4DC5F mov rax, [rbp+var_20] mov rcx, [rax+78h] add rcx, 1 mov rax, [rbp+var_20] mov [rax+80h], rcx loc_4DC5F: mov rax, [rbp+var_20] mov qword ptr [rax+88h], 0FFFFFFFFFFFFFFFFh mov rax, [rbp+var_20] mov qword ptr [rax+0A0h], 0 mov rax, [rbp+var_20] mov qword ptr [rax+98h], 0 mov rax, [rbp+var_20] mov qword ptr [rax+90h], 0 mov rax, [rbp+var_20] mov qword ptr [rax+58h], 0 mov rax, [rbp+var_20] mov qword ptr [rax+60h], 0 mov rax, [rbp+var_20] mov dword ptr [rax+0A8h], 0 mov rax, [rbp+var_20] mov word ptr [rax+0AEh], 0 mov rdi, [rbp+var_20] add rdi, 10h lea rsi, aWorkspaceLlm4b_9; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 173h call inline_mysql_mutex_lock_7 mov rdi, [rbp+var_20] call get_short_trid mov cx, ax mov rax, [rbp+var_20] mov [rax+0ACh], cx mov rdi, [rbp+var_20] add rdi, 10h call inline_mysql_mutex_unlock_7 mov rax, [rbp+var_20] mov rsi, [rax] lea rdi, trid_to_trn lea rdx, [rbp+var_20] call lf_hash_insert mov [rbp+var_14], eax jmp short $+2 loc_4DD27: cmp [rbp+var_14], 0 jz short loc_4DD42 mov rdi, [rbp+var_20] xor esi, esi call trnman_end_trn mov [rbp+var_8], 0 jmp short loc_4DD50 loc_4DD42: jmp short $+2 loc_4DD44: jmp short $+2 loc_4DD46: jmp short $+2 loc_4DD48: mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_4DD50: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long trnman_new_trn(long long a1) { signed long long v1; // rcx long long v2; // rax bool v4; // [rsp+Fh] [rbp-41h] char v5; // [rsp+1Eh] [rbp-32h] signed long long v6; // [rsp+28h] [rbp-28h] long long v7; // [rsp+30h] [rbp-20h] BYREF long long v9; // [rsp+40h] [rbp-10h] v9 = a1; inline_mysql_mutex_lock_7(&LOCK_trn_list, "/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 296LL); v6 = pool; do { v5 = 0; if ( v6 ) { v1 = _InterlockedCompareExchange64(&pool, *(_QWORD *)(v6 + 104), v6); v4 = v6 == v1; if ( v6 != v1 ) v6 = v1; v5 = ~v4; } } while ( (v5 & 1) != 0 ); v7 = v6; if ( !v6 ) { v7 = my_malloc(0LL, 176LL, 48LL); if ( !v7 ) { inline_mysql_mutex_unlock_7(&LOCK_trn_list); return 0LL; } ++trnman_allocated_transactions; inline_mysql_mutex_init_1(key_TRN_state_lock, (_QWORD *)(v7 + 16), (long long)&my_fast_mutexattr); } *(_QWORD *)(v7 + 8) = v9; *(_QWORD *)v7 = lf_pinbox_get_pins((char *)&trid_to_trn + 40); if ( *(_QWORD *)v7 ) { ++trnman_active_transactions; *(_QWORD *)(v7 + 128) = *(_QWORD *)(qword_479080 + 120); *(_QWORD *)(v7 + 120) = new_trid(); *(_QWORD *)(v7 + 104) = &active_list_max; *(_QWORD *)(v7 + 112) = qword_479138; v2 = v7; *(_QWORD *)(*(_QWORD *)(v7 + 112) + 104LL) = v7; qword_479138 = v2; trid_min_read_from = *(_QWORD *)(qword_479080 + 128); inline_mysql_mutex_unlock_7(&LOCK_trn_list); if ( !*(_QWORD *)(v7 + 128) ) *(_QWORD *)(v7 + 128) = *(_QWORD *)(v7 + 120) + 1LL; *(_QWORD *)(v7 + 136) = -1LL; *(_QWORD *)(v7 + 160) = 0LL; *(_QWORD *)(v7 + 152) = 0LL; *(_QWORD *)(v7 + 144) = 0LL; *(_QWORD *)(v7 + 88) = 0LL; *(_QWORD *)(v7 + 96) = 0LL; *(_DWORD *)(v7 + 168) = 0; *(_WORD *)(v7 + 174) = 0; inline_mysql_mutex_lock_7(v7 + 16, "/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 371LL); *(_WORD *)(v7 + 172) = get_short_trid(v7); inline_mysql_mutex_unlock_7(v7 + 16); if ( (unsigned int)lf_hash_insert(&trid_to_trn, *(_QWORD *)v7, &v7) ) { trnman_end_trn(v7, 0LL); return 0LL; } else { return v7; } } else { trnman_free_trn(v7); inline_mysql_mutex_unlock_7(&LOCK_trn_list); return 0LL; } }
trnman_new_trn: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI JMP 0x0014da2e LAB_0014da2e: LEA RDI,[0x5793c0] LEA RSI,[0x252b07] MOV EDX,0x128 CALL 0x0014dd60 MOV RAX,qword ptr [0x005792e8] MOV qword ptr [RBP + -0x28],RAX LAB_0014da51: XOR EAX,EAX CMP qword ptr [RBP + -0x28],0x0 MOV byte ptr [RBP + -0x32],AL JZ 0x0014daa3 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CMPXCHG.LOCK qword ptr [0x005792e8],RCX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x41],AL MOV qword ptr [RBP + -0x40],RCX TEST AL,0x1 JNZ 0x0014da93 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x28],RAX LAB_0014da93: MOV AL,byte ptr [RBP + -0x41] AND AL,0x1 MOV byte ptr [RBP + -0x31],AL MOV AL,byte ptr [RBP + -0x31] XOR AL,0xff MOV byte ptr [RBP + -0x32],AL LAB_0014daa3: MOV AL,byte ptr [RBP + -0x32] TEST AL,0x1 JNZ 0x0014daac JMP 0x0014daae LAB_0014daac: JMP 0x0014da51 LAB_0014daae: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0014db40 XOR EDI,EDI MOV ESI,0xb0 MOV EDX,0x30 CALL 0x001f4be0 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],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 0x0014db14 JMP 0x0014daf9 LAB_0014daf9: JMP 0x0014dafb LAB_0014dafb: LEA RDI,[0x5793c0] CALL 0x0014ddd0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014dd50 LAB_0014db14: MOV EAX,dword ptr [0x005792e0] ADD EAX,0x1 MOV dword ptr [0x005792e0],EAX LEA RAX,[0x578f74] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x10 LEA RDX,[0xd848d0] CALL 0x0014d8a0 LAB_0014db40: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x8],RCX LEA RDI,[0x5792f8] ADD RDI,0x28 CALL 0x001fd550 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX],0x0 JNZ 0x0014db92 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0014de30 LEA RDI,[0x5793c0] CALL 0x0014ddd0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014dd50 LAB_0014db92: MOV EAX,dword ptr [0x005792d8] ADD EAX,0x1 MOV dword ptr [0x005792d8],EAX MOV RAX,qword ptr [0x00579080] MOV RCX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x80],RCX CALL 0x0014ee70 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x78],RCX MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x5790c8] MOV qword ptr [RAX + 0x68],RCX MOV RCX,qword ptr [0x00579138] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x70],RCX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RCX + 0x70] MOV qword ptr [RCX + 0x68],RAX MOV qword ptr [0x00579138],RAX MOV RAX,qword ptr [0x00579080] MOV RAX,qword ptr [RAX + 0x80] MOV qword ptr [0x003be458],RAX JMP 0x0014dc13 LAB_0014dc13: LEA RDI,[0x5793c0] CALL 0x0014ddd0 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x80],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 0x0014dc5f MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x78] ADD RCX,0x1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x80],RCX LAB_0014dc5f: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x88],-0x1 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0xa0],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x98],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x90],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x58],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x60],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0xa8],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV word ptr [RAX + 0xae],0x0 MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x10 LEA RSI,[0x252b07] MOV EDX,0x173 CALL 0x0014dd60 MOV RDI,qword ptr [RBP + -0x20] CALL 0x0014dee0 MOV CX,AX MOV RAX,qword ptr [RBP + -0x20] MOV word ptr [RAX + 0xac],CX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x10 CALL 0x0014ddd0 MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX] LEA RDI,[0x5792f8] LEA RDX,[RBP + -0x20] CALL 0x001fe8e0 MOV dword ptr [RBP + -0x14],EAX JMP 0x0014dd27 LAB_0014dd27: CMP dword ptr [RBP + -0x14],0x0 JZ 0x0014dd42 MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI CALL 0x0014dfc0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0014dd50 LAB_0014dd42: JMP 0x0014dd44 LAB_0014dd44: JMP 0x0014dd46 LAB_0014dd46: JMP 0x0014dd48 LAB_0014dd48: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_0014dd50: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long * trnman_new_trn(long param_1) { long *plVar1; int2 uVar2; long *plVar3; long lVar4; bool bVar5; long *local_30; long *local_28; int local_1c; long local_18; long *local_10; local_18 = param_1; inline_mysql_mutex_lock (LOCK_trn_list,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x128); local_30 = pool; do { bVar5 = false; if (local_30 != (long *)0x0) { LOCK(); bVar5 = local_30 != pool; plVar3 = local_30; plVar1 = (long *)local_30[0xd]; if (bVar5) { plVar3 = pool; plVar1 = pool; } pool = plVar1; UNLOCK(); if (bVar5) { local_30 = plVar3; } } } while (bVar5); local_28 = local_30; if (local_30 == (long *)0x0) { local_28 = (long *)my_malloc(0,0xb0,0x30); if (local_28 == (long *)0x0) { inline_mysql_mutex_unlock(LOCK_trn_list); return (long *)0x0; } trnman_allocated_transactions = trnman_allocated_transactions + 1; inline_mysql_mutex_init(key_TRN_state_lock,local_28 + 2,&my_fast_mutexattr); } local_28[1] = local_18; lVar4 = lf_pinbox_get_pins(0x579320); *local_28 = lVar4; if (*local_28 == 0) { trnman_free_trn(local_28); inline_mysql_mutex_unlock(LOCK_trn_list); local_10 = (long *)0x0; } else { trnman_active_transactions = trnman_active_transactions + 1; local_28[0x10] = *(long *)(active_list_min._104_8_ + 0x78); lVar4 = new_trid(); local_28[0xf] = lVar4; local_28[0xd] = (long)active_list_max; local_28[0xe] = active_list_max._112_8_; *(long **)(local_28[0xe] + 0x68) = local_28; active_list_max._112_8_ = local_28; trid_min_read_from = *(int8 *)(active_list_min._104_8_ + 0x80); inline_mysql_mutex_unlock(LOCK_trn_list); if (local_28[0x10] == 0) { local_28[0x10] = local_28[0xf] + 1; } local_28[0x11] = -1; local_28[0x14] = 0; local_28[0x13] = 0; local_28[0x12] = 0; local_28[0xb] = 0; local_28[0xc] = 0; *(int4 *)(local_28 + 0x15) = 0; *(int2 *)((long)local_28 + 0xae) = 0; inline_mysql_mutex_lock (local_28 + 2,"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x173) ; uVar2 = get_short_trid(local_28); *(int2 *)((long)local_28 + 0xac) = uVar2; inline_mysql_mutex_unlock(local_28 + 2); local_1c = lf_hash_insert(trid_to_trn,*local_28,&local_28); if (local_1c == 0) { local_10 = local_28; } else { trnman_end_trn(local_28,0); local_10 = (long *)0x0; } } return local_10; }
92
StartTree::Builder<StartTree::NJMatrix<float>>::constructTreeInMemory(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, double*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
iqtree3/utils/starttree.h
virtual bool constructTreeInMemory ( const std::vector<std::string> &sequenceNames , double *distanceMatrix , const std::string & newickTreeFilePath) { B builder; if (!builder.loadMatrix(sequenceNames, distanceMatrix)) { return false; } constructTreeWith(builder); builder.setZippedOutput(isOutputToBeZipped); return builder.writeTreeFile(newickTreeFilePath); }
O0
c
StartTree::Builder<StartTree::NJMatrix<float>>::constructTreeInMemory(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, double*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x238, %rsp # imm = 0x238 movq %rdi, 0x228(%rsp) movq %rsi, 0x220(%rsp) movq %rdx, 0x218(%rsp) movq %rcx, 0x210(%rsp) movq 0x228(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x40(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x59670 movq 0x20(%rsp), %rdi movq 0x220(%rsp), %rsi movq 0x218(%rsp), %rdx callq 0x59d40 movb %al, 0x2f(%rsp) jmp 0x59583 movb 0x2f(%rsp), %al testb $0x1, %al jne 0x595b9 jmp 0x5958d movb $0x0, 0x237(%rsp) movl $0x1, 0x30(%rsp) jmp 0x59612 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x38(%rsp) movl %eax, 0x34(%rsp) leaq 0x40(%rsp), %rdi callq 0x59a20 jmp 0x5962d movq 0x18(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0x59870 jmp 0x595ca movq 0x18(%rsp), %rax movzbl 0x49(%rax), %esi andl $0x1, %esi leaq 0x40(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x599c0 movq 0x8(%rsp), %rdi movq 0x210(%rsp), %rsi callq 0x599e0 movb %al, 0x17(%rsp) jmp 0x595fd movb 0x17(%rsp), %al andb $0x1, %al movb %al, 0x237(%rsp) movl $0x1, 0x30(%rsp) leaq 0x40(%rsp), %rdi callq 0x59a20 movb 0x237(%rsp), %al andb $0x1, %al addq $0x238, %rsp # imm = 0x238 retq movq 0x38(%rsp), %rdi callq 0x37770 nopw (%rax,%rax)
_ZN9StartTree7BuilderINS_14BoundingMatrixIdNS_11BIONJMatrixIdEEEEE21constructTreeInMemoryERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISC_EEPdRKSC_: sub rsp, 238h mov [rsp+238h+var_10], rdi mov [rsp+238h+var_18], rsi mov [rsp+238h+var_20], rdx mov [rsp+238h+var_28], rcx mov rax, [rsp+238h+var_10] mov [rsp+238h+var_220], rax lea rdi, [rsp+238h+var_1F8] mov [rsp+238h+var_218], rdi call _ZN9StartTree14BoundingMatrixIdNS_11BIONJMatrixIdEEEC2Ev; StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>::BoundingMatrix(void) mov rdi, [rsp+238h+var_218] mov rsi, [rsp+238h+var_18] mov rdx, [rsp+238h+var_20] call _ZN9StartTree11BIONJMatrixIdE10loadMatrixERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEPd; StartTree::BIONJMatrix<double>::loadMatrix(std::vector<std::string> const&,double *) mov [rsp+238h+var_209], al jmp short $+2 loc_59583: mov al, [rsp+238h+var_209] test al, 1 jnz short loc_595B9 jmp short $+2 loc_5958D: mov [rsp+238h+var_1], 0 mov [rsp+238h+var_208], 1 jmp short loc_59612 mov rcx, rax mov eax, edx mov [rsp+arg_30], rcx mov [rsp+arg_2C], eax lea rdi, [rsp+arg_38] call _ZN9StartTree14BoundingMatrixIdNS_11BIONJMatrixIdEEED2Ev; StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>::~BoundingMatrix() jmp short loc_5962D loc_595B9: mov rdi, [rsp+238h+var_220] lea rsi, [rsp+238h+var_1F8] call _ZN9StartTree7BuilderINS_14BoundingMatrixIdNS_11BIONJMatrixIdEEEEE17constructTreeWithERS4_; StartTree::Builder<StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>>::constructTreeWith(StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>&) jmp short $+2 loc_595CA: mov rax, [rsp+238h+var_220] movzx esi, byte ptr [rax+49h] and esi, 1 lea rdi, [rsp+238h+var_1F8] mov [rsp+238h+var_230], rdi call _ZN9StartTree12UPGMA_MatrixIdE15setZippedOutputEb; StartTree::UPGMA_Matrix<double>::setZippedOutput(bool) mov rdi, [rsp+238h+var_230] mov rsi, [rsp+238h+var_28] call _ZNK9StartTree12UPGMA_MatrixIdE13writeTreeFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; StartTree::UPGMA_Matrix<double>::writeTreeFile(std::string const&) mov [rsp+238h+var_221], al jmp short $+2 loc_595FD: mov al, [rsp+238h+var_221] and al, 1 mov [rsp+238h+var_1], al mov [rsp+238h+var_208], 1 loc_59612: lea rdi, [rsp+238h+var_1F8] call _ZN9StartTree14BoundingMatrixIdNS_11BIONJMatrixIdEEED2Ev; StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>::~BoundingMatrix() mov al, [rsp+238h+var_1] and al, 1 add rsp, 238h retn loc_5962D: mov rdi, [rsp+arg_30] call __Unwind_Resume
char StartTree::Builder<StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>>::constructTreeInMemory( long long a1, long long a2, long long a3, long long a4, int a5, int a6) { _BYTE v7[464]; // [rsp+40h] [rbp-1F8h] BYREF long long v8; // [rsp+210h] [rbp-28h] long long v9; // [rsp+218h] [rbp-20h] long long v10; // [rsp+220h] [rbp-18h] long long v11; // [rsp+228h] [rbp-10h] char v12; // [rsp+237h] [rbp-1h] v11 = a1; v10 = a2; v9 = a3; v8 = a4; StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>::BoundingMatrix((unsigned int)v7, a2, a3, a4, a5, a6); if ( (StartTree::BIONJMatrix<double>::loadMatrix(v7, v10, v9) & 1) != 0 ) { StartTree::Builder<StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>>::constructTreeWith(a1, v7); StartTree::UPGMA_Matrix<double>::setZippedOutput(v7, *(_BYTE *)(a1 + 73) & 1); v12 = StartTree::UPGMA_Matrix<double>::writeTreeFile(v7, v8) & 1; } else { v12 = 0; } StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>::~BoundingMatrix(v7); return v12 & 1; }
constructTreeInMemory: SUB RSP,0x238 MOV qword ptr [RSP + 0x228],RDI MOV qword ptr [RSP + 0x220],RSI MOV qword ptr [RSP + 0x218],RDX MOV qword ptr [RSP + 0x210],RCX MOV RAX,qword ptr [RSP + 0x228] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x20],RDI CALL 0x00159670 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x220] MOV RDX,qword ptr [RSP + 0x218] LAB_00159578: CALL 0x00159d40 MOV byte ptr [RSP + 0x2f],AL JMP 0x00159583 LAB_00159583: MOV AL,byte ptr [RSP + 0x2f] TEST AL,0x1 JNZ 0x001595b9 JMP 0x0015958d LAB_0015958d: MOV byte ptr [RSP + 0x237],0x0 MOV dword ptr [RSP + 0x30],0x1 JMP 0x00159612 LAB_001595b9: MOV RDI,qword ptr [RSP + 0x18] LEA RSI,[RSP + 0x40] CALL 0x00159870 JMP 0x001595ca LAB_001595ca: MOV RAX,qword ptr [RSP + 0x18] MOVZX ESI,byte ptr [RAX + 0x49] AND ESI,0x1 LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x8],RDI CALL 0x001599c0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP + 0x210] CALL 0x001599e0 LAB_001595f7: MOV byte ptr [RSP + 0x17],AL JMP 0x001595fd LAB_001595fd: MOV AL,byte ptr [RSP + 0x17] AND AL,0x1 MOV byte ptr [RSP + 0x237],AL MOV dword ptr [RSP + 0x30],0x1 LAB_00159612: LEA RDI,[RSP + 0x40] CALL 0x00159a20 MOV AL,byte ptr [RSP + 0x237] AND AL,0x1 ADD RSP,0x238 RET
/* StartTree::Builder<StartTree::BoundingMatrix<double, StartTree::BIONJMatrix<double> > >::constructTreeInMemory(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, double*, std::__cxx11::string const&) */ ulong __thiscall StartTree::Builder<StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>>:: constructTreeInMemory (Builder<StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>> *this, vector *param_1,double *param_2,string *param_3) { byte bVar1; int8 uVar2; BoundingMatrix<double,StartTree::BIONJMatrix<double>> local_1f8 [464]; string *local_28; double *local_20; vector *local_18; Builder<StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>> *local_10; byte local_1; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_10 = this; BoundingMatrix<double,StartTree::BIONJMatrix<double>>::BoundingMatrix(local_1f8); /* try { // try from 00159578 to 001595f6 has its CatchHandler @ 0015959f */ bVar1 = BIONJMatrix<double>::loadMatrix((BIONJMatrix<double> *)local_1f8,local_18,local_20); if ((bVar1 & 1) == 0) { local_1 = 0; } else { constructTreeWith(this,(BoundingMatrix *)local_1f8); UPGMA_Matrix<double>::setZippedOutput ((UPGMA_Matrix<double> *)local_1f8,(bool)((byte)this[0x49] & 1)); local_1 = UPGMA_Matrix<double>::writeTreeFile((UPGMA_Matrix<double> *)local_1f8,local_28); local_1 = local_1 & 1; } uVar2 = BoundingMatrix<double,StartTree::BIONJMatrix<double>>::~BoundingMatrix(local_1f8); return CONCAT71((int7)((ulong)uVar2 >> 8),local_1) & 0xffffffffffffff01; }
93
StartTree::Builder<StartTree::NJMatrix<float>>::constructTreeInMemory(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, double*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
iqtree3/utils/starttree.h
virtual bool constructTreeInMemory ( const std::vector<std::string> &sequenceNames , double *distanceMatrix , const std::string & newickTreeFilePath) { B builder; if (!builder.loadMatrix(sequenceNames, distanceMatrix)) { return false; } constructTreeWith(builder); builder.setZippedOutput(isOutputToBeZipped); return builder.writeTreeFile(newickTreeFilePath); }
O3
c
StartTree::Builder<StartTree::NJMatrix<float>>::constructTreeInMemory(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, double*, 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 $0x1d8, %rsp # imm = 0x1D8 movq %rcx, %rbx movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r14 leaq 0x10(%rsp), %r13 xorl %ebp, %ebp movl $0x90, %edx movq %r13, %rdi xorl %esi, %esi callq 0x15180 leaq 0x12874(%rip), %rax # 0x34040 movq %rax, 0x90(%r13) xorps %xmm0, %xmm0 movups %xmm0, 0x98(%r13) movups %xmm0, 0xa8(%r13) movq %rbp, 0xb8(%r13) leaq 0x12f04(%rip), %rcx # 0x346f8 movq %rcx, -0x8(%r13) movq %rbp, 0x130(%r13) movl $0x0, 0x138(%r13) movups %xmm0, 0xc0(%r13) movups %xmm0, 0xd0(%r13) movups %xmm0, 0xe0(%r13) movups %xmm0, 0xf0(%r13) movups %xmm0, 0x100(%r13) movups %xmm0, 0x110(%r13) movups %xmm0, 0x11c(%r13) movups %xmm0, 0x140(%r13) movups %xmm0, 0x150(%r13) movq %rax, 0x160(%r13) movq %rbp, 0x188(%r13) movups %xmm0, 0x178(%r13) movups %xmm0, 0x168(%r13) leaq 0x12c01(%rip), %rax # 0x34478 movq %rax, 0x190(%r13) movups %xmm0, 0x1b8(%r13) movups %xmm0, 0x1a8(%r13) movups %xmm0, 0x198(%r13) leaq 0x8(%rsp), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x19b3c movl %eax, %ebp leaq 0xa0(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x214ea testb %bpl, %bpl je 0x218e6 leaq 0x8(%rsp), %rsi movq %r14, %rdi callq 0x2192e movzbl 0x49(%r14), %esi leaq 0x50(%rsp), %rdi movb %sil, 0x30(%rdi) movq %rbx, %rdx callq 0x1bee4 movl %eax, %ebx jmp 0x218e8 xorl %ebx, %ebx leaq 0x8(%rsp), %rdi callq 0x21b3e movl %ebx, %eax addq $0x1d8, %rsp # imm = 0x1D8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x21b3e movq %rbx, %rdi callq 0x15580 nop
_ZN9StartTree7BuilderINS_14BoundingMatrixIfNS_11BIONJMatrixIfEEEEE21constructTreeInMemoryERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISC_EEPdRKSC_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1D8h mov rbx, rcx mov r15, rdx mov r12, rsi mov r14, rdi lea r13, [rsp+208h+var_1F8] xor ebp, ebp mov edx, 90h mov rdi, r13 xor esi, esi call _memset lea rax, off_34040 mov [r13+90h], rax xorps xmm0, xmm0 movups xmmword ptr [r13+98h], xmm0 movups xmmword ptr [r13+0A8h], xmm0 mov [r13+0B8h], rbp lea rcx, off_346F8 mov [r13-8], rcx mov [r13+130h], rbp mov dword ptr [r13+138h], 0 movups xmmword ptr [r13+0C0h], xmm0 movups xmmword ptr [r13+0D0h], xmm0 movups xmmword ptr [r13+0E0h], xmm0 movups xmmword ptr [r13+0F0h], xmm0 movups xmmword ptr [r13+100h], xmm0 movups xmmword ptr [r13+110h], xmm0 movups xmmword ptr [r13+11Ch], xmm0 movups xmmword ptr [r13+140h], xmm0 movups xmmword ptr [r13+150h], xmm0 mov [r13+160h], rax mov [r13+188h], rbp movups xmmword ptr [r13+178h], xmm0 movups xmmword ptr [r13+168h], xmm0 lea rax, off_34478 mov [r13+190h], rax movups xmmword ptr [r13+1B8h], xmm0 movups xmmword ptr [r13+1A8h], xmm0 movups xmmword ptr [r13+198h], xmm0 lea rdi, [rsp+208h+var_200] mov rsi, r12 mov rdx, r15 call _ZN9StartTree12UPGMA_MatrixIfE10loadMatrixERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EEPd; StartTree::UPGMA_Matrix<float>::loadMatrix(std::vector<std::string> const&,double *) mov ebp, eax lea rdi, [rsp+208h+var_168] lea rsi, [rsp+208h+var_200] call _ZN9StartTree6MatrixIfE6assignERKS1_; StartTree::Matrix<float>::assign(StartTree::Matrix<float> const&) test bpl, bpl jz short loc_218E6 lea rsi, [rsp+208h+var_200] mov rdi, r14 call _ZN9StartTree7BuilderINS_14BoundingMatrixIfNS_11BIONJMatrixIfEEEEE17constructTreeWithERS4_; StartTree::Builder<StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>>::constructTreeWith(StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>&) movzx esi, byte ptr [r14+49h] lea rdi, [rsp+208h+var_1B8] mov [rdi+30h], sil mov rdx, rbx call _ZNK9StartTree11ClusterTreeIfE13writeTreeFileEbRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; StartTree::ClusterTree<float>::writeTreeFile(bool,std::string const&) mov ebx, eax jmp short loc_218E8 loc_218E6: xor ebx, ebx loc_218E8: lea rdi, [rsp+208h+var_200] call _ZN9StartTree14BoundingMatrixIfNS_11BIONJMatrixIfEEED2Ev; StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>::~BoundingMatrix() mov eax, ebx add rsp, 1D8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_0] call _ZN9StartTree14BoundingMatrixIfNS_11BIONJMatrixIfEEED2Ev; StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>::~BoundingMatrix() mov rdi, rbx call __Unwind_Resume
long long StartTree::Builder<StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>>::constructTreeInMemory( long long a1, long long *a2, long long a3, long long a4) { char v6; // bp unsigned int v7; // ebx long long ( **v9)(); // [rsp+8h] [rbp-200h] BYREF _BYTE v10[64]; // [rsp+10h] [rbp-1F8h] BYREF _BYTE v11[48]; // [rsp+50h] [rbp-1B8h] BYREF unsigned __int8 v12; // [rsp+80h] [rbp-188h] long long ( **v13)(); // [rsp+A0h] [rbp-168h] BYREF __int128 v14; // [rsp+A8h] [rbp-160h] __int128 v15; // [rsp+B8h] [rbp-150h] long long v16; // [rsp+C8h] [rbp-140h] __int128 v17; // [rsp+D0h] [rbp-138h] __int128 v18; // [rsp+E0h] [rbp-128h] __int128 v19; // [rsp+F0h] [rbp-118h] __int128 v20; // [rsp+100h] [rbp-108h] __int128 v21; // [rsp+110h] [rbp-F8h] _BYTE v22[28]; // [rsp+120h] [rbp-E8h] BYREF long long v23; // [rsp+140h] [rbp-C8h] int v24; // [rsp+148h] [rbp-C0h] __int128 v25; // [rsp+150h] [rbp-B8h] __int128 v26; // [rsp+160h] [rbp-A8h] long long ( **v27)(); // [rsp+170h] [rbp-98h] __int128 v28; // [rsp+178h] [rbp-90h] __int128 v29; // [rsp+188h] [rbp-80h] long long v30; // [rsp+198h] [rbp-70h] long long ( **v31)(); // [rsp+1A0h] [rbp-68h] __int128 v32; // [rsp+1A8h] [rbp-60h] __int128 v33; // [rsp+1B8h] [rbp-50h] __int128 v34; // [rsp+1C8h] [rbp-40h] memset(v10, 0LL, 144LL); v13 = off_34040; v14 = 0LL; v15 = 0LL; v16 = 0LL; v9 = off_346F8; v23 = 0LL; v24 = 0; v17 = 0LL; v18 = 0LL; v19 = 0LL; v20 = 0LL; v21 = 0LL; memset(v22, 0, sizeof(v22)); v25 = 0LL; v26 = 0LL; v27 = off_34040; v30 = 0LL; v29 = 0LL; v28 = 0LL; v31 = off_34478; v34 = 0LL; v33 = 0LL; v32 = 0LL; v6 = StartTree::UPGMA_Matrix<float>::loadMatrix(&v9, a2, a3); StartTree::Matrix<float>::assign(&v13, &v9); if ( v6 ) { StartTree::Builder<StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>>::constructTreeWith(a1, &v9); v12 = *(_BYTE *)(a1 + 73); v7 = StartTree::ClusterTree<float>::writeTreeFile((long long)v11, v12, a4); } else { v7 = 0; } StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>::~BoundingMatrix(&v9); return v7; }
constructTreeInMemory: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1d8 MOV RBX,RCX MOV R15,RDX MOV R12,RSI MOV R14,RDI LEA R13,[RSP + 0x10] XOR EBP,EBP MOV EDX,0x90 MOV RDI,R13 XOR ESI,ESI CALL 0x00115180 LEA RAX,[0x134040] MOV qword ptr [R13 + 0x90],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R13 + 0x98],XMM0 MOVUPS xmmword ptr [R13 + 0xa8],XMM0 MOV qword ptr [R13 + 0xb8],RBP LEA RCX,[0x1346f8] MOV qword ptr [R13 + -0x8],RCX MOV qword ptr [R13 + 0x130],RBP MOV dword ptr [R13 + 0x138],0x0 MOVUPS xmmword ptr [R13 + 0xc0],XMM0 MOVUPS xmmword ptr [R13 + 0xd0],XMM0 MOVUPS xmmword ptr [R13 + 0xe0],XMM0 MOVUPS xmmword ptr [R13 + 0xf0],XMM0 MOVUPS xmmword ptr [R13 + 0x100],XMM0 MOVUPS xmmword ptr [R13 + 0x110],XMM0 MOVUPS xmmword ptr [R13 + 0x11c],XMM0 MOVUPS xmmword ptr [R13 + 0x140],XMM0 MOVUPS xmmword ptr [R13 + 0x150],XMM0 MOV qword ptr [R13 + 0x160],RAX MOV qword ptr [R13 + 0x188],RBP MOVUPS xmmword ptr [R13 + 0x178],XMM0 MOVUPS xmmword ptr [R13 + 0x168],XMM0 LEA RAX,[0x134478] MOV qword ptr [R13 + 0x190],RAX MOVUPS xmmword ptr [R13 + 0x1b8],XMM0 MOVUPS xmmword ptr [R13 + 0x1a8],XMM0 MOVUPS xmmword ptr [R13 + 0x198],XMM0 LAB_00121896: LEA RDI,[RSP + 0x8] MOV RSI,R12 MOV RDX,R15 CALL 0x00119b3c MOV EBP,EAX LEA RDI,[RSP + 0xa0] LEA RSI,[RSP + 0x8] CALL 0x001214ea TEST BPL,BPL JZ 0x001218e6 LEA RSI,[RSP + 0x8] MOV RDI,R14 CALL 0x0012192e MOVZX ESI,byte ptr [R14 + 0x49] LEA RDI,[RSP + 0x50] MOV byte ptr [RDI + 0x30],SIL MOV RDX,RBX CALL 0x0011bee4 LAB_001218e2: MOV EBX,EAX JMP 0x001218e8 LAB_001218e6: XOR EBX,EBX LAB_001218e8: LEA RDI,[RSP + 0x8] CALL 0x00121b3e MOV EAX,EBX ADD RSP,0x1d8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* StartTree::Builder<StartTree::BoundingMatrix<float, StartTree::BIONJMatrix<float> > >::constructTreeInMemory(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, double*, std::__cxx11::string const&) */ int4 __thiscall StartTree::Builder<StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>>:: constructTreeInMemory (Builder<StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>> *this, vector *param_1,double *param_2,string *param_3) { char cVar1; int4 uVar2; int **local_200; int1 local_1f8 [64]; ClusterTree<float> local_1b8 [48]; Builder<StartTree::BoundingMatrix<float,StartTree::BIONJMatrix<float>>> local_188; int **local_168; int8 local_160; int8 uStack_158; int8 local_150; int8 uStack_148; int8 local_140; int8 local_138; int8 uStack_130; int8 local_128; int8 uStack_120; int8 local_118; int8 uStack_110; int8 local_108; int8 uStack_100; int8 local_f8; int8 uStack_f0; int8 local_e8; int4 uStack_e0; int4 uStack_dc; int4 uStack_d8; int8 uStack_d4; int8 local_c8; int4 local_c0; int8 local_b8; int8 uStack_b0; int8 local_a8; int8 uStack_a0; int **local_98; int8 local_90; int8 uStack_88; int8 local_80; int8 uStack_78; int8 local_70; int **local_68; int8 local_60; int8 uStack_58; int8 local_50; int8 uStack_48; int8 local_40; int8 uStack_38; memset(local_1f8,0,0x90); local_168 = &PTR_setSize_00134040; local_160 = 0; uStack_158 = 0; local_150 = 0; uStack_148 = 0; local_140 = 0; local_200 = &PTR_setSize_001346f8; local_c8 = 0; local_c0 = 0; local_138 = 0; uStack_130 = 0; local_128 = 0; uStack_120 = 0; local_118 = 0; uStack_110 = 0; local_108 = 0; uStack_100 = 0; local_f8 = 0; uStack_f0 = 0; local_e8 = 0; uStack_e0 = 0; uStack_dc = 0; uStack_d8 = 0; uStack_d4 = 0; local_b8 = 0; uStack_b0 = 0; local_a8 = 0; uStack_a0 = 0; local_98 = &PTR_setSize_00134040; local_70 = 0; local_80 = 0; uStack_78 = 0; local_90 = 0; uStack_88 = 0; local_68 = &PTR_setSize_00134478; local_40 = 0; uStack_38 = 0; local_50 = 0; uStack_48 = 0; local_60 = 0; uStack_58 = 0; /* try { // try from 00121896 to 001218e1 has its CatchHandler @ 00121906 */ cVar1 = UPGMA_Matrix<float>::loadMatrix((UPGMA_Matrix<float> *)&local_200,param_1,param_2); Matrix<float>::assign((Matrix<float> *)&local_168,(Matrix *)&local_200); if (cVar1 == '\0') { uVar2 = 0; } else { constructTreeWith(this,(BoundingMatrix *)&local_200); local_188 = this[0x49]; uVar2 = ClusterTree<float>::writeTreeFile(local_1b8,(bool)local_188,param_3); } BoundingMatrix<float,StartTree::BIONJMatrix<float>>::~BoundingMatrix ((BoundingMatrix<float,StartTree::BIONJMatrix<float>> *)&local_200); return uVar2; }
94
SetDimensionsFromMonitor
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/platforms/rcore_desktop_glfw.c
static void SetDimensionsFromMonitor(GLFWmonitor *monitor) { const GLFWvidmode *mode = glfwGetVideoMode(monitor); // Default display resolution to that of the current mode CORE.Window.display.width = mode->width; CORE.Window.display.height = mode->height; // Set screen width/height to the display width/height if they are 0 if (CORE.Window.screen.width == 0) CORE.Window.screen.width = CORE.Window.display.width; if (CORE.Window.screen.height == 0) CORE.Window.screen.height = CORE.Window.display.height; }
O1
c
SetDimensionsFromMonitor: pushq %rax callq 0xc4f2f movl (%rax), %ecx movl %ecx, 0xccdef(%rip) # 0x141bd4 movl 0x4(%rax), %eax movl %eax, 0xccdea(%rip) # 0x141bd8 cmpl $0x0, 0xccde7(%rip) # 0x141bdc jne 0x74dfd movl %ecx, 0xccddf(%rip) # 0x141bdc cmpl $0x0, 0xccddc(%rip) # 0x141be0 jne 0x74e0c movl %eax, 0xccdd4(%rip) # 0x141be0 popq %rax retq
SetDimensionsFromMonitor: push rax call glfwGetVideoMode mov ecx, [rax] mov dword ptr cs:qword_141BD4, ecx mov eax, [rax+4] mov dword ptr cs:qword_141BD4+4, eax cmp dword ptr cs:qword_141BDC, 0 jnz short loc_74DFD mov dword ptr cs:qword_141BDC, ecx loc_74DFD: cmp dword ptr cs:qword_141BDC+4, 0 jnz short loc_74E0C mov dword ptr cs:qword_141BDC+4, eax loc_74E0C: pop rax retn
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> SetDimensionsFromMonitor(long long a1) { int *VideoMode; // rax int v2; // ecx int v3; // eax VideoMode = (int *)glfwGetVideoMode(a1); v2 = *VideoMode; LODWORD(qword_141BD4) = *VideoMode; v3 = VideoMode[1]; HIDWORD(qword_141BD4) = v3; if ( !(_DWORD)qword_141BDC ) LODWORD(qword_141BDC) = v2; if ( !HIDWORD(qword_141BDC) ) HIDWORD(qword_141BDC) = v3; }
SetDimensionsFromMonitor: PUSH RAX CALL 0x001c4f2f MOV ECX,dword ptr [RAX] MOV dword ptr [0x00241bd4],ECX MOV EAX,dword ptr [RAX + 0x4] MOV dword ptr [0x00241bd8],EAX CMP dword ptr [0x00241bdc],0x0 JNZ 0x00174dfd MOV dword ptr [0x00241bdc],ECX LAB_00174dfd: CMP dword ptr [0x00241be0],0x0 JNZ 0x00174e0c MOV dword ptr [0x00241be0],EAX LAB_00174e0c: POP RAX RET
int8 SetDimensionsFromMonitor(void) { int8 in_RAX; int *piVar1; piVar1 = (int *)glfwGetVideoMode(); DAT_00241bd4 = *piVar1; DAT_00241bd8 = piVar1[1]; if (DAT_00241bdc == 0) { DAT_00241bdc = *piVar1; } if (DAT_00241be0 == 0) { DAT_00241be0 = piVar1[1]; } return in_RAX; }
95
POINTonE1_mult_glv
corpus-core[P]colibri-stateless/build_O0/_deps/blst-src/src/e1.c
static void POINTonE1_mult_glv(POINTonE1 *out, const POINTonE1 *in, const pow256 SK) { union { vec256 l; pow256 s; } val; /* SK/z^2 [in constant time] */ limbs_from_le_bytes(val.l, SK, 32); div_by_zz(val.l); le_bytes_from_limbs(val.s, val.l, 32); { const byte *scalars[2] = { val.s+16, val.s }; POINTonE1 table[2][1<<(5-1)]; /* 4.5KB */ size_t i; POINTonE1_precompute_w5(table[0], in); for (i = 0; i < 1<<(5-1); i++) { mul_fp(table[1][i].X, table[0][i].X, beta); cneg_fp(table[1][i].Y, table[0][i].Y, 1); vec_copy(table[1][i].Z, table[0][i].Z, sizeof(table[1][i].Z)); } POINTonE1s_mult_w5(out, NULL, 2, scalars, 128, table); POINTonE1_cneg(out, 1); mul_fp(out->Z, out->Z, beta); mul_fp(out->Z, out->Z, beta); } vec_zero(val.l, sizeof(val)); /* scrub the copy of SK */ }
O0
c
POINTonE1_mult_glv: pushq %rbp movq %rsp, %rbp subq $0x1260, %rsp # imm = 0x1260 movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq -0x38(%rbp), %rdi movq -0x18(%rbp), %rsi movl $0x20, %edx callq 0xb58e0 leaq -0x38(%rbp), %rdi callq 0xb9680 leaq -0x38(%rbp), %rdi leaq -0x38(%rbp), %rsi movl $0x20, %edx callq 0xb59f0 leaq -0x38(%rbp), %rax addq $0x10, %rax movq %rax, -0x50(%rbp) leaq -0x38(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x1250(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xb9740 movq $0x0, -0x1258(%rbp) cmpq $0x10, -0x1258(%rbp) jae 0xab0fb leaq -0x1250(%rbp), %rdi addq $0x900, %rdi # imm = 0x900 imulq $0x90, -0x1258(%rbp), %rax addq %rax, %rdi leaq -0x1250(%rbp), %rsi imulq $0x90, -0x1258(%rbp), %rax addq %rax, %rsi leaq 0x3d767(%rip), %rdx # 0xe87c0 callq 0xb6080 leaq -0x1250(%rbp), %rdi addq $0x900, %rdi # imm = 0x900 imulq $0x90, -0x1258(%rbp), %rax addq %rax, %rdi addq $0x30, %rdi leaq -0x1250(%rbp), %rsi imulq $0x90, -0x1258(%rbp), %rax addq %rax, %rsi addq $0x30, %rsi movl $0x1, %edx callq 0xafe20 leaq -0x1250(%rbp), %rdi addq $0x900, %rdi # imm = 0x900 imulq $0x90, -0x1258(%rbp), %rax addq %rax, %rdi addq $0x60, %rdi leaq -0x1250(%rbp), %rsi imulq $0x90, -0x1258(%rbp), %rax addq %rax, %rsi addq $0x60, %rsi movl $0x30, %edx callq 0xa8ad0 movq -0x1258(%rbp), %rax addq $0x1, %rax movq %rax, -0x1258(%rbp) jmp 0xab013 movq -0x8(%rbp), %rdi leaq -0x50(%rbp), %rcx leaq -0x1250(%rbp), %r9 xorl %eax, %eax movl %eax, %esi movl $0x2, %edx movl $0x80, %r8d callq 0xb9820 movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0xa8860 movq -0x8(%rbp), %rdi addq $0x60, %rdi movq -0x8(%rbp), %rsi addq $0x60, %rsi leaq 0x3d67d(%rip), %rdx # 0xe87c0 callq 0xb6080 movq -0x8(%rbp), %rdi addq $0x60, %rdi movq -0x8(%rbp), %rsi addq $0x60, %rsi leaq 0x3d661(%rip), %rdx # 0xe87c0 callq 0xb6080 leaq -0x38(%rbp), %rdi movl $0x20, %esi callq 0xa87c0 addq $0x1260, %rsp # imm = 0x1260 popq %rbp retq nopl (%rax,%rax)
POINTonE1_mult_glv: push rbp mov rbp, rsp sub rsp, 1260h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rdi, [rbp+var_38] mov rsi, [rbp+var_18] mov edx, 20h ; ' ' call limbs_from_le_bytes lea rdi, [rbp+var_38] call div_by_zz lea rdi, [rbp+var_38] lea rsi, [rbp+var_38] mov edx, 20h ; ' ' call le_bytes_from_limbs lea rax, [rbp+var_38] add rax, 10h mov [rbp+var_50], rax lea rax, [rbp+var_38] mov [rbp+var_48], rax lea rdi, [rbp+var_1250] mov rsi, [rbp+var_10] call POINTonE1_precompute_w5 mov [rbp+var_1258], 0 loc_AB013: cmp [rbp+var_1258], 10h jnb loc_AB0FB lea rdi, [rbp+var_1250] add rdi, 900h imul rax, [rbp+var_1258], 90h add rdi, rax lea rsi, [rbp+var_1250] imul rax, [rbp+var_1258], 90h add rsi, rax lea rdx, beta call mul_fp lea rdi, [rbp+var_1250] add rdi, 900h imul rax, [rbp+var_1258], 90h add rdi, rax add rdi, 30h ; '0' lea rsi, [rbp+var_1250] imul rax, [rbp+var_1258], 90h add rsi, rax add rsi, 30h ; '0' mov edx, 1 call cneg_fp lea rdi, [rbp+var_1250] add rdi, 900h imul rax, [rbp+var_1258], 90h add rdi, rax add rdi, 60h ; '`' lea rsi, [rbp+var_1250] imul rax, [rbp+var_1258], 90h add rsi, rax add rsi, 60h ; '`' mov edx, 30h ; '0' call vec_copy mov rax, [rbp+var_1258] add rax, 1 mov [rbp+var_1258], rax jmp loc_AB013 loc_AB0FB: mov rdi, [rbp+var_8] lea rcx, [rbp+var_50] lea r9, [rbp+var_1250] xor eax, eax mov esi, eax mov edx, 2 mov r8d, 80h call POINTonE1s_mult_w5 mov rdi, [rbp+var_8] mov esi, 1 call POINTonE1_cneg mov rdi, [rbp+var_8] add rdi, 60h ; '`' mov rsi, [rbp+var_8] add rsi, 60h ; '`' lea rdx, beta call mul_fp mov rdi, [rbp+var_8] add rdi, 60h ; '`' mov rsi, [rbp+var_8] add rsi, 60h ; '`' lea rdx, beta call mul_fp lea rdi, [rbp+var_38] mov esi, 20h ; ' ' call vec_zero add rsp, 1260h pop rbp retn
long long POINTonE1_mult_glv(long long a1, long long a2, long long a3) { unsigned long long i; // [rsp+8h] [rbp-1258h] _OWORD v5[288]; // [rsp+10h] [rbp-1250h] BYREF _QWORD v6[3]; // [rsp+1210h] [rbp-50h] BYREF _BYTE v7[16]; // [rsp+1228h] [rbp-38h] BYREF _QWORD v8[3]; // [rsp+1238h] [rbp-28h] BYREF long long v9; // [rsp+1250h] [rbp-10h] long long v10; // [rsp+1258h] [rbp-8h] v10 = a1; v9 = a2; v8[2] = a3; limbs_from_le_bytes(v7, a3, 32LL); div_by_zz(v7); le_bytes_from_limbs(v7, v7, 32LL); v6[0] = v8; v6[1] = v7; POINTonE1_precompute_w5(v5, v9); for ( i = 0LL; i < 0x10; ++i ) { mul_fp(&v5[9 * i + 144], &v5[9 * i], &beta); cneg_fp(&v5[9 * i + 147], &v5[9 * i + 3], 1LL); vec_copy((long long)&v5[9 * i + 150], (long long)&v5[9 * i + 6], 0x30uLL); } POINTonE1s_mult_w5(v10, 0LL, 2LL, v6, 128LL, v5); POINTonE1_cneg(v10, 1LL); mul_fp(v10 + 96, v10 + 96, &beta); mul_fp(v10 + 96, v10 + 96, &beta); return vec_zero((long long)v7, 0x20uLL); }
POINTonE1_mult_glv: PUSH RBP MOV RBP,RSP SUB RSP,0x1260 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RDI,[RBP + -0x38] MOV RSI,qword ptr [RBP + -0x18] MOV EDX,0x20 CALL 0x001b58e0 LEA RDI,[RBP + -0x38] CALL 0x001b9680 LEA RDI,[RBP + -0x38] LEA RSI,[RBP + -0x38] MOV EDX,0x20 CALL 0x001b59f0 LEA RAX,[RBP + -0x38] ADD RAX,0x10 MOV qword ptr [RBP + -0x50],RAX LEA RAX,[RBP + -0x38] MOV qword ptr [RBP + -0x48],RAX LEA RDI,[RBP + -0x1250] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001b9740 MOV qword ptr [RBP + -0x1258],0x0 LAB_001ab013: CMP qword ptr [RBP + -0x1258],0x10 JNC 0x001ab0fb LEA RDI,[RBP + -0x1250] ADD RDI,0x900 IMUL RAX,qword ptr [RBP + -0x1258],0x90 ADD RDI,RAX LEA RSI,[RBP + -0x1250] IMUL RAX,qword ptr [RBP + -0x1258],0x90 ADD RSI,RAX LEA RDX,[0x1e87c0] CALL 0x001b6080 LEA RDI,[RBP + -0x1250] ADD RDI,0x900 IMUL RAX,qword ptr [RBP + -0x1258],0x90 ADD RDI,RAX ADD RDI,0x30 LEA RSI,[RBP + -0x1250] IMUL RAX,qword ptr [RBP + -0x1258],0x90 ADD RSI,RAX ADD RSI,0x30 MOV EDX,0x1 CALL 0x001afe20 LEA RDI,[RBP + -0x1250] ADD RDI,0x900 IMUL RAX,qword ptr [RBP + -0x1258],0x90 ADD RDI,RAX ADD RDI,0x60 LEA RSI,[RBP + -0x1250] IMUL RAX,qword ptr [RBP + -0x1258],0x90 ADD RSI,RAX ADD RSI,0x60 MOV EDX,0x30 CALL 0x001a8ad0 MOV RAX,qword ptr [RBP + -0x1258] ADD RAX,0x1 MOV qword ptr [RBP + -0x1258],RAX JMP 0x001ab013 LAB_001ab0fb: MOV RDI,qword ptr [RBP + -0x8] LEA RCX,[RBP + -0x50] LEA R9,[RBP + -0x1250] XOR EAX,EAX MOV ESI,EAX MOV EDX,0x2 MOV R8D,0x80 CALL 0x001b9820 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x001a8860 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x60 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x60 LEA RDX,[0x1e87c0] CALL 0x001b6080 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x60 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x60 LEA RDX,[0x1e87c0] CALL 0x001b6080 LEA RDI,[RBP + -0x38] MOV ESI,0x20 CALL 0x001a87c0 ADD RSP,0x1260 POP RBP RET
void POINTonE1_mult_glv(long param_1,int8 param_2,int8 param_3) { ulong local_1260; int1 local_1258 [48]; int1 auStack_1228 [48]; int1 auStack_11f8 [2208]; int1 auStack_958 [48]; int1 auStack_928 [48]; int1 auStack_8f8 [2208]; int1 *local_58; int1 *local_50; int1 local_40 [16]; int1 auStack_30 [16]; int8 local_20; int8 local_18; long local_10; local_20 = param_3; local_18 = param_2; local_10 = param_1; limbs_from_le_bytes(local_40,param_3,0x20); div_by_zz(local_40); le_bytes_from_limbs(local_40,local_40,0x20); local_58 = auStack_30; local_50 = local_40; POINTonE1_precompute_w5(local_1258,local_18); for (local_1260 = 0; local_1260 < 0x10; local_1260 = local_1260 + 1) { mul_fp(auStack_958 + local_1260 * 0x90,local_1258 + local_1260 * 0x90,beta); cneg_fp(auStack_928 + local_1260 * 0x90,auStack_1228 + local_1260 * 0x90,1); vec_copy(auStack_8f8 + local_1260 * 0x90,auStack_11f8 + local_1260 * 0x90,0x30); } POINTonE1s_mult_w5(local_10,0,2,&local_58,0x80,local_1258); POINTonE1_cneg(local_10,1); mul_fp(local_10 + 0x60,local_10 + 0x60,beta); mul_fp(local_10 + 0x60,local_10 + 0x60,beta); vec_zero(local_40,0x20); return; }
96
mi_copy_status
eloqsql/storage/myisam/mi_locking.c
void mi_copy_status(void* to,void *from) { MI_INFO *info= (MI_INFO*) to; DBUG_ENTER("mi_copy_status"); info->state= &((MI_INFO*) from)->save_state; DBUG_PRINT("info",("key_file: %ld data_file: %ld", (long) info->state->key_file_length, (long) info->state->data_file_length)); DBUG_VOID_RETURN; }
O0
c
mi_copy_status: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rcx addq $0x10, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x8(%rax) jmp 0xb05f6 jmp 0xb05f8 jmp 0xb05fa popq %rbp retq nopl (%rax)
mi_copy_status: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rcx, [rbp+var_10] add rcx, 10h mov rax, [rbp+var_18] mov [rax+8], rcx jmp short $+2 loc_B05F6: jmp short $+2 loc_B05F8: jmp short $+2 loc_B05FA: pop rbp retn
long long mi_copy_status(long long a1, long long a2) { long long result; // rax result = a1; *(_QWORD *)(a1 + 8) = a2 + 16; return result; }
mi_copy_status: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,0x10 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],RCX JMP 0x001b05f6 LAB_001b05f6: JMP 0x001b05f8 LAB_001b05f8: JMP 0x001b05fa LAB_001b05fa: POP RBP RET
void mi_copy_status(long param_1,long param_2) { *(long *)(param_1 + 8) = param_2 + 0x10; return; }
97
mi_copy_status
eloqsql/storage/myisam/mi_locking.c
void mi_copy_status(void* to,void *from) { MI_INFO *info= (MI_INFO*) to; DBUG_ENTER("mi_copy_status"); info->state= &((MI_INFO*) from)->save_state; DBUG_PRINT("info",("key_file: %ld data_file: %ld", (long) info->state->key_file_length, (long) info->state->data_file_length)); DBUG_VOID_RETURN; }
O3
c
mi_copy_status: pushq %rbp movq %rsp, %rbp addq $0x10, %rsi movq %rsi, 0x8(%rdi) popq %rbp retq
mi_copy_status: push rbp mov rbp, rsp add rsi, 10h mov [rdi+8], rsi pop rbp retn
void mi_copy_status(long long a1, long long a2) { *(_QWORD *)(a1 + 8) = a2 + 16; }
mi_copy_status: PUSH RBP MOV RBP,RSP ADD RSI,0x10 MOV qword ptr [RDI + 0x8],RSI POP RBP RET
void mi_copy_status(long param_1,long param_2) { *(long *)(param_1 + 8) = param_2 + 0x10; return; }
98
my_stat
eloqsql/mysys/my_lib.c
MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags) { int m_used; DBUG_ENTER("my_stat"); DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path, stat_area, my_flags)); if ((m_used= (stat_area == NULL))) if (!(stat_area= (MY_STAT *) my_malloc(key_memory_MY_STAT, sizeof(MY_STAT), my_flags))) goto error; #ifndef _WIN32 if (!stat((char *) path, (struct stat *) stat_area)) { MSAN_STAT_WORKAROUND(stat_area); DBUG_RETURN(stat_area); } #else if (!my_win_stat(path, stat_area)) DBUG_RETURN(stat_area); #endif DBUG_PRINT("error",("Got errno: %d from stat", errno)); my_errno= errno; if (m_used) /* Free if new area */ my_free(stat_area); error: if (my_flags & (MY_FAE+MY_WME)) { my_error(EE_STAT, MYF(ME_BELL), path, my_errno); DBUG_RETURN((MY_STAT *) NULL); } DBUG_RETURN((MY_STAT *) NULL); }
O0
c
my_stat: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) jmp 0x36516 cmpq $0x0, -0x18(%rbp) sete %al movb %al, %cl andb $0x1, %cl movzbl %cl, %ecx movl %ecx, -0x24(%rbp) testb $0x1, %al jne 0x3652f jmp 0x36554 leaq 0x356eb2(%rip), %rax # 0x38d3e8 movl (%rax), %edi movq -0x20(%rbp), %rdx movl $0x90, %esi callq 0x28ce0 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x36552 jmp 0x3659b jmp 0x36554 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x245e0 cmpl $0x0, %eax jne 0x36572 jmp 0x36568 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x365e1 jmp 0x36574 jmp 0x36576 callq 0x24040 movl (%rax), %eax movl %eax, -0x28(%rbp) callq 0x29900 movl -0x28(%rbp), %ecx movl %ecx, (%rax) cmpl $0x0, -0x24(%rbp) je 0x36599 movq -0x18(%rbp), %rdi callq 0x29060 jmp 0x3659b movq -0x20(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0x365d7 movq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) callq 0x29900 movq -0x30(%rbp), %rdx movl (%rax), %ecx movl $0xd, %edi movl $0x4, %esi movb $0x0, %al callq 0x34df0 movq $0x0, -0x8(%rbp) jmp 0x365e1 jmp 0x365d9 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
my_stat: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx jmp short $+2 loc_36516: cmp [rbp+var_18], 0 setz al mov cl, al and cl, 1 movzx ecx, cl mov [rbp+var_24], ecx test al, 1 jnz short loc_3652F jmp short loc_36554 loc_3652F: lea rax, key_memory_MY_STAT mov edi, [rax] mov rdx, [rbp+var_20] mov esi, 90h call my_malloc mov [rbp+var_18], rax cmp rax, 0 jnz short loc_36552 jmp short loc_3659B loc_36552: jmp short $+2 loc_36554: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _stat64 cmp eax, 0 jnz short loc_36572 jmp short $+2 loc_36568: mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_365E1 loc_36572: jmp short $+2 loc_36574: jmp short $+2 loc_36576: call ___errno_location mov eax, [rax] mov [rbp+var_28], eax call _my_thread_var mov ecx, [rbp+var_28] mov [rax], ecx cmp [rbp+var_24], 0 jz short loc_36599 mov rdi, [rbp+var_18] call my_free loc_36599: jmp short $+2 loc_3659B: mov rax, [rbp+var_20] and rax, 18h cmp rax, 0 jz short loc_365D7 mov rax, [rbp+var_10] mov [rbp+var_30], rax call _my_thread_var mov rdx, [rbp+var_30] mov ecx, [rax] mov edi, 0Dh mov esi, 4 mov al, 0 call my_error mov [rbp+var_8], 0 jmp short loc_365E1 loc_365D7: jmp short $+2 loc_365D9: mov [rbp+var_8], 0 loc_365E1: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long my_stat(long long a1, long long a2, char a3) { unsigned int *v3; // rax int v5; // [rsp+8h] [rbp-28h] long long v7; // [rsp+18h] [rbp-18h] v7 = a2; if ( a2 || (v7 = my_malloc(key_memory_MY_STAT, 0x90uLL, a3)) != 0 ) { if ( !(unsigned int)stat64(a1, v7) ) return v7; v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v5; if ( !a2 ) my_free(v7); } if ( (a3 & 0x18) != 0 ) { v3 = (unsigned int *)my_thread_var(); my_error(0xDu, 4LL, a1, *v3); } return 0LL; }
my_stat: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX JMP 0x00136516 LAB_00136516: CMP qword ptr [RBP + -0x18],0x0 SETZ AL MOV CL,AL AND CL,0x1 MOVZX ECX,CL MOV dword ptr [RBP + -0x24],ECX TEST AL,0x1 JNZ 0x0013652f JMP 0x00136554 LAB_0013652f: LEA RAX,[0x48d3e8] MOV EDI,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x20] MOV ESI,0x90 CALL 0x00128ce0 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x00136552 JMP 0x0013659b LAB_00136552: JMP 0x00136554 LAB_00136554: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x001245e0 CMP EAX,0x0 JNZ 0x00136572 JMP 0x00136568 LAB_00136568: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x001365e1 LAB_00136572: JMP 0x00136574 LAB_00136574: JMP 0x00136576 LAB_00136576: CALL 0x00124040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x28],EAX CALL 0x00129900 MOV ECX,dword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX CMP dword ptr [RBP + -0x24],0x0 JZ 0x00136599 MOV RDI,qword ptr [RBP + -0x18] CALL 0x00129060 LAB_00136599: JMP 0x0013659b LAB_0013659b: MOV RAX,qword ptr [RBP + -0x20] AND RAX,0x18 CMP RAX,0x0 JZ 0x001365d7 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX CALL 0x00129900 MOV RDX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX] MOV EDI,0xd MOV ESI,0x4 MOV AL,0x0 CALL 0x00134df0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001365e1 LAB_001365d7: JMP 0x001365d9 LAB_001365d9: MOV qword ptr [RBP + -0x8],0x0 LAB_001365e1: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
stat64 * my_stat(char *param_1,stat64 *param_2,ulong param_3) { int iVar1; int *piVar2; int4 *puVar3; stat64 *local_20; local_20 = param_2; if ((param_2 != (stat64 *)0x0) || (local_20 = (stat64 *)my_malloc(key_memory_MY_STAT,0x90,param_3), local_20 != (stat64 *)0x0)) { iVar1 = stat64(param_1,local_20); if (iVar1 == 0) { return local_20; } piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if (param_2 == (stat64 *)0x0) { my_free(local_20); } } if ((param_3 & 0x18) != 0) { puVar3 = (int4 *)_my_thread_var(); my_error(0xd,4,param_1,*puVar3); } return (stat64 *)0x0; }
99
void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&)
ng-log[P]ng-log/src/logging.cc
void MakeCheckOpValueString(std::ostream* os, const char& v) { if (v >= 32 && v <= 126) { (*os) << "'" << v << "'"; } else { (*os) << "char value " << static_cast<short>(v); } }
O3
cpp
void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx movb (%rsi), %al addb $-0x7f, %al cmpb $-0x5f, %al jae 0xdda1 leaq 0x14a3e(%rip), %rsi # 0x227bd movl $0xb, %edx movq %rbx, %rdi callq 0x7600 movsbl (%r14), %esi movq %rbx, %rdi addq $0x10, %rsp popq %rbx popq %r14 popq %r15 jmp 0x7490 leaq 0x14856(%rip), %r15 # 0x225fe movl $0x1, %edx movq %rbx, %rdi movq %r15, %rsi callq 0x7600 movb (%r14), %al leaq 0xf(%rsp), %rsi movb %al, (%rsi) movl $0x1, %edx movq %rbx, %rdi callq 0x7600 movl $0x1, %edx movq %rax, %rdi movq %r15, %rsi callq 0x7600 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN5nglog8internal22MakeCheckOpValueStringIcEEvPSoRKT_: push r15 push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi mov al, [rsi] add al, 81h cmp al, 0A1h jnb short loc_DDA1 lea rsi, aUnsignedCharVa+9; "char value " mov edx, 0Bh mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) movsx esi, byte ptr [r14] mov rdi, rbx add rsp, 10h pop rbx pop r14 pop r15 jmp __ZNSolsEs; std::ostream::operator<<(short) loc_DDA1: lea r15, aDataNumCharsTo+59h; "'" mov edx, 1 mov rdi, rbx mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov al, [r14] lea rsi, [rsp+28h+var_19] mov [rsi], al mov edx, 1 mov rdi, rbx call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, rax mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add rsp, 10h pop rbx pop r14 pop r15 retn
long long nglog::internal::MakeCheckOpValueString<char>(long long a1, char *a2) { long long v3; // rax _BYTE v4[25]; // [rsp+Fh] [rbp-19h] BYREF if ( (unsigned __int8)(*a2 - 127) >= 0xA1u ) { std::__ostream_insert<char,std::char_traits<char>>(a1, "'", 1LL); v4[0] = *a2; v3 = std::__ostream_insert<char,std::char_traits<char>>(a1, v4, 1LL); return std::__ostream_insert<char,std::char_traits<char>>(v3, "'", 1LL); } else { std::__ostream_insert<char,std::char_traits<char>>(a1, "char value ", 11LL); return std::ostream::operator<<(a1, (unsigned int)*a2); } }
MakeCheckOpValueString<char>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI MOV AL,byte ptr [RSI] ADD AL,0x81 CMP AL,0xa1 JNC 0x0010dda1 LEA RSI,[0x1227bd] MOV EDX,0xb MOV RDI,RBX CALL 0x00107600 MOVSX ESI,byte ptr [R14] MOV RDI,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 JMP 0x00107490 LAB_0010dda1: LEA R15,[0x1225fe] MOV EDX,0x1 MOV RDI,RBX MOV RSI,R15 CALL 0x00107600 MOV AL,byte ptr [R14] LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],AL MOV EDX,0x1 MOV RDI,RBX CALL 0x00107600 MOV EDX,0x1 MOV RDI,RAX MOV RSI,R15 CALL 0x00107600 ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* void nglog::internal::MakeCheckOpValueString<char>(std::ostream*, char const&) */ void nglog::internal::MakeCheckOpValueString<char>(ostream *param_1,char *param_2) { ostream *poVar1; char local_19; if ((byte)(*param_2 + 0x81U) < 0xa1) { std::__ostream_insert<char,std::char_traits<char>>(param_1,"char value ",0xb); std::ostream::operator<<(param_1,(short)*param_2); return; } std::__ostream_insert<char,std::char_traits<char>>(param_1,"\'",1); local_19 = *param_2; poVar1 = std::__ostream_insert<char,std::char_traits<char>>(param_1,&local_19,1); std::__ostream_insert<char,std::char_traits<char>>(poVar1,"\'",1); return; }